diff --git a/apps/keycloak.yaml b/apps/keycloak.yaml index 181e6e6f..965ba119 100644 --- a/apps/keycloak.yaml +++ b/apps/keycloak.yaml @@ -10,7 +10,7 @@ spec: namespace: idp sources: - repoURL: https://charts.bitnami.com/bitnami - targetRevision: 18.3.4 + targetRevision: 24.0.2 chart: keycloak helm: valueFiles: diff --git a/apps/opentelemetry-collector.yaml b/apps/opentelemetry-collector.yaml index 96a5e054..b919a36d 100644 --- a/apps/opentelemetry-collector.yaml +++ b/apps/opentelemetry-collector.yaml @@ -90,12 +90,12 @@ spec: ingress: enabled: true annotations: - cert-manager.io/cluster-issuer: letsencrypt-staging + cert-manager.io/cluster-issuer: letsencrypt-production nginx.ingress.kubernetes.io/ssl-redirect: "true" atlantis.oceanbox.io/expose: internal ingressClassName: nginx hosts: - - host: collector.adm.oceanbox.io + - host: opentelemetry-collector.adm.oceanbox.io paths: - path: / pathType: Prefix @@ -103,4 +103,4 @@ spec: tls: - secretName: collector-tls hosts: - - collector.adm.oceanbox.io + - opentelemetry-collector.adm.oceanbox.io diff --git a/charts/archmeister/values.yaml b/charts/archmeister/values.yaml index b81bda5d..fc111412 100644 --- a/charts/archmeister/values.yaml +++ b/charts/archmeister/values.yaml @@ -11,6 +11,17 @@ init: enabled: false image: ubuntu:rolling command: ["/bin/sh", "-c", "true"] +env: + - name: LOG_LEVEL + value: "3" + - name: APP_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: APP_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace imagePullSecrets: - name: gitlab-pull-secret nameOverride: "" diff --git a/charts/atlantis/values.yaml b/charts/atlantis/values.yaml index eaff8068..6ac5c7d8 100644 --- a/charts/atlantis/values.yaml +++ b/charts/atlantis/values.yaml @@ -17,6 +17,14 @@ init: env: - name: LOG_LEVEL value: "3" + - name: APP_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: APP_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace imagePullSecrets: - name: gitlab-pull-secret diff --git a/charts/hipster/values.yaml b/charts/hipster/values.yaml index d49471e4..66f2ece3 100644 --- a/charts/hipster/values.yaml +++ b/charts/hipster/values.yaml @@ -11,6 +11,17 @@ init: enabled: false image: ubuntu:rolling command: ["/bin/sh", "-c", "true"] +env: + - name: LOG_LEVEL + value: "3" + - name: APP_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: APP_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace imagePullSecrets: - name: gitlab-pull-secret nameOverride: "" diff --git a/charts/petimeter/values.yaml b/charts/petimeter/values.yaml index b02e2cef..8f4fcf6b 100644 --- a/charts/petimeter/values.yaml +++ b/charts/petimeter/values.yaml @@ -11,6 +11,17 @@ init: enabled: false image: ubuntu:rolling command: ["/bin/sh", "-c", "true"] +env: + - name: LOG_LEVEL + value: "3" + - name: APP_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: APP_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace imagePullSecrets: - name: gitlab-pull-secret nameOverride: "" diff --git a/charts/sorcerer/Chart.lock b/charts/sorcerer/Chart.lock new file mode 100644 index 00000000..862f0ccb --- /dev/null +++ b/charts/sorcerer/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: redis + repository: https://charts.bitnami.com/bitnami + version: 20.1.7 +digest: sha256:9c9be148366bb3d50f7394ba5a33e1a00a087b5ed61d2bcf1faec9b369e76582 +generated: "2024-11-16T14:23:53.686487149+01:00" diff --git a/charts/sorcerer/templates/deployment.yaml b/charts/sorcerer/templates/deployment.yaml index a2630a54..bdb675ba 100644 --- a/charts/sorcerer/templates/deployment.yaml +++ b/charts/sorcerer/templates/deployment.yaml @@ -38,8 +38,7 @@ spec: containerPort: {{ .Values.service.port }} protocol: TCP env: - - name: LOG_LEVEL - value: "3" + {{- toYaml .Values.env | nindent 12 }} livenessProbe: httpGet: path: / diff --git a/charts/sorcerer/values.yaml b/charts/sorcerer/values.yaml index e268839a..0f2c92bb 100644 --- a/charts/sorcerer/values.yaml +++ b/charts/sorcerer/values.yaml @@ -17,6 +17,14 @@ init: env: - name: LOG_LEVEL value: "3" + - name: APP_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: APP_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace imagePullSecrets: - name: gitlab-pull-secret diff --git a/policies/ekman/kyverno/sync-keyvault-secret.yaml b/policies/ekman/kyverno/sync-keyvault-secret.yaml new file mode 100644 index 00000000..48f0277e --- /dev/null +++ b/policies/ekman/kyverno/sync-keyvault-secret.yaml @@ -0,0 +1,32 @@ +apiVersion: kyverno.io/v1 +kind: ClusterPolicy +metadata: + annotations: + policies.kyverno.io/category: Sample + policies.kyverno.io/description: 'Access dataprotection keys from Azure Key Vault' + creationTimestamp: "2024-01-15T11:58:24Z" + name: sync-keyvault-secrets +spec: + admission: true + background: true + generateExisting: true + rules: + - generate: + apiVersion: v1 + clone: + name: azure-keyvault + namespace: sorcerer + kind: Secret + name: azure-keyvault + namespace: '{{request.object.metadata.name}}' + synchronize: true + match: + any: + - resources: + kinds: + - Namespace + names: + - "*-sorcerer" + name: sync-keyvault-secrets + + diff --git a/policies/ekman/kyverno/sync-oceanbox-regcred.yaml b/policies/ekman/kyverno/sync-oceanbox-regcred.yaml new file mode 100644 index 00000000..26a3514a --- /dev/null +++ b/policies/ekman/kyverno/sync-oceanbox-regcred.yaml @@ -0,0 +1,44 @@ +apiVersion: kyverno.io/v1 +kind: ClusterPolicy +metadata: + annotations: + policies.kyverno.io/category: Sample + policies.kyverno.io/description: 'Secrets like registry credentials often need + to exist in multiple Namespaces so Pods there have access. Manually duplicating + those Secrets is time consuming and error prone. This policy will copy a Secret + called `regcred` which exists in the `default` Namespace to new Namespaces when + they are created. It will also push updates to the copied Secrets should the + source Secret be changed. ' + creationTimestamp: "2024-01-15T11:58:24Z" + name: sync-oceanbox-regcred +spec: + admission: true + background: true + generateExisting: true + rules: + - generate: + apiVersion: v1 + clone: + # name: oceanbox-regcred + name: gitlab-pull-secret + namespace: default + kind: Secret + # name: oceanbox-regcred + name: gitlab-pull-secret + namespace: '{{request.object.metadata.name}}' + synchronize: true + exclude: + any: + - resources: + kinds: + - Namespace + names: + - "vcluster-*" + match: + any: + - resources: + kinds: + - Namespace + name: sync-oceanbox-regcred + + diff --git a/policies/oceanbox/kyverno/sync-atlantis-secrets.yaml b/policies/oceanbox/kyverno/sync-atlantis-secrets.yaml index 3c1a3a2a..92447654 100644 --- a/policies/oceanbox/kyverno/sync-atlantis-secrets.yaml +++ b/policies/oceanbox/kyverno/sync-atlantis-secrets.yaml @@ -25,6 +25,11 @@ spec: - "*-rabbitmq" annotations: kyverno/clone: "true" + exclude: + any: + - resources: + annotations: + vcluster.loft.sh/controlled-by: secret/v1/GenericImport - name: sync-redis-secret generate: apiVersion: v1 @@ -44,6 +49,11 @@ spec: - "*-redis" annotations: kyverno/clone: "true" + exclude: + any: + - resources: + annotations: + vcluster.loft.sh/controlled-by: secret/v1/GenericImport - name: sync-archmaester-secret generate: apiVersion: v1 @@ -63,6 +73,11 @@ spec: - "*-db-superuser" annotations: kyverno/clone: "true" + exclude: + any: + - resources: + annotations: + vcluster.loft.sh/controlled-by: secret/v1/GenericImport - name: sync-archmaester-replication-secret generate: apiVersion: v1 @@ -82,6 +97,11 @@ spec: - prod-archmeister-replication annotations: kyverno/clone: "true" + exclude: + any: + - resources: + annotations: + vcluster.loft.sh/controlled-by: secret/v1/GenericImport - name: sync-archmaester-ca generate: apiVersion: v1 @@ -101,11 +121,8 @@ spec: - prod-archmeister-ca annotations: kyverno/clone: "true" - # exclude: - # any: - # - resources: - # kinds: - # - Secret - # selector: - # matchLabels: - # generate.kyverno.io/clone-source: "" + exclude: + any: + - resources: + annotations: + vcluster.loft.sh/controlled-by: secret/v1/GenericImport diff --git a/policies/oceanbox/kyverno/sync-keyvault-secret.yaml b/policies/oceanbox/kyverno/sync-keyvault-secret.yaml new file mode 100644 index 00000000..eb6ec222 --- /dev/null +++ b/policies/oceanbox/kyverno/sync-keyvault-secret.yaml @@ -0,0 +1,32 @@ +apiVersion: kyverno.io/v1 +kind: ClusterPolicy +metadata: + annotations: + policies.kyverno.io/category: Sample + policies.kyverno.io/description: 'Access dataprotection keys from Azure Key Vault' + creationTimestamp: "2024-01-15T11:58:24Z" + name: sync-keyvault-secrets +spec: + admission: true + background: true + generateExisting: true + rules: + - generate: + apiVersion: v1 + clone: + name: azure-keyvault + namespace: atlantis + kind: Secret + name: azure-keyvault + namespace: '{{request.object.metadata.name}}' + synchronize: true + match: + any: + - resources: + kinds: + - Namespace + names: + - "*-atlantis" + name: sync-keyvault-secrets + + diff --git a/policies/oceanbox/kyverno/sync-regcred.yaml b/policies/oceanbox/kyverno/sync-regcred.yaml index 26a3514a..87790582 100644 --- a/policies/oceanbox/kyverno/sync-regcred.yaml +++ b/policies/oceanbox/kyverno/sync-regcred.yaml @@ -10,7 +10,7 @@ metadata: they are created. It will also push updates to the copied Secrets should the source Secret be changed. ' creationTimestamp: "2024-01-15T11:58:24Z" - name: sync-oceanbox-regcred + name: sync-regcred spec: admission: true background: true @@ -30,10 +30,8 @@ spec: exclude: any: - resources: - kinds: - - Namespace - names: - - "vcluster-*" + annotations: + vcluster.loft.sh/controlled-by: secret/v1/GenericImport match: any: - resources: diff --git a/policies/oceanbox/network/atlantis/atlantis-policies.yaml b/policies/oceanbox/network/atlantis/atlantis-policies.yaml index 5b5611cd..fe53f6e0 100644 --- a/policies/oceanbox/network/atlantis/atlantis-policies.yaml +++ b/policies/oceanbox/network/atlantis/atlantis-policies.yaml @@ -1,5 +1,5 @@ apiVersion: cilium.io/v2 -kind: CiliumNetworkPolicy +kind: CiliumClusterwideNetworkPolicy metadata: name: allow-atlantis-services namespace: {{ .Release.Namespace }} @@ -15,12 +15,12 @@ spec: - matchLabels: k8s:io.kubernetes.pod.namespace: {{ .Values.tracing.namespace | default "otel" }} - toFQDNs: - - matchName: '*.oceanbox.io' - - matchName: api.github.com - matchName: dapr.github.io - - matchName: gitlab.com - - matchPattern: '*.gitlab.com' - - matchPattern: "*.k1.itpartner.no" - matchName: analytics.loft.rocks + # - matchName: gitlab.com + # - matchName: api.github.com + - matchPattern: "*.k1.itpartner.no" + - matchPattern: '*.oceanbox.io' + # - matchPattern: '*.gitlab.com' endpointSelector: matchLabels: {} diff --git a/policies/oceanbox/network/clusterpolicy-allow-oceanboxio.yaml b/policies/oceanbox/network/clusterpolicy-allow-oceanboxio.yaml index 01670e13..2dbd2992 100644 --- a/policies/oceanbox/network/clusterpolicy-allow-oceanboxio.yaml +++ b/policies/oceanbox/network/clusterpolicy-allow-oceanboxio.yaml @@ -7,7 +7,6 @@ spec: egress: - toFQDNs: - matchName: oceanbox.io - - matchName: hubble.srv.oceanbox.io - matchPattern: "*oceanbox.io" - matchPattern: "*.oceanbox.io" diff --git a/policies/oceanbox/network/csi-addons-controller/allow-9070-host.yaml b/policies/oceanbox/network/csi-addons-controller/allow-9070-host.yaml index 49af9d1c..0242a579 100644 --- a/policies/oceanbox/network/csi-addons-controller/allow-9070-host.yaml +++ b/policies/oceanbox/network/csi-addons-controller/allow-9070-host.yaml @@ -14,3 +14,15 @@ spec: - ports: - port: "9070" protocol: TCP +--- +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: addons-to-remote-node + namespace: csi-addons-system +spec: + description: remote node + egress: + - toEntities: + - remote-node + endpointSelector: {} diff --git a/policies/oceanbox/network/templ.nix b/policies/oceanbox/network/templ.nix index 18cd3759..d22e976c 100644 --- a/policies/oceanbox/network/templ.nix +++ b/policies/oceanbox/network/templ.nix @@ -3,8 +3,9 @@ applications.xxx = { resources = { ciliumClusterwideNetworkPolicies = { - xxx.spec = { - }; + xxx.spec = + { + }; }; }; }; diff --git a/values/atlantis/prod/tracing.yaml b/values/atlantis/prod/tracing.yaml index f3b3fdf2..47ea1d3e 100644 --- a/values/atlantis/prod/tracing.yaml +++ b/values/atlantis/prod/tracing.yaml @@ -6,4 +6,4 @@ spec: tracing: samplingRate: "1" zipkin: - endpointAddress: "http://opentelemetry-collector.otel:9411/api/v2/spans" + endpointAddress: "http://opentelemetry-collector.otel.svc.cluster.local:9411/api/v2/spans" diff --git a/values/dex/base/config.yaml b/values/dex/base/config.yaml index 0b9e5e31..0411856c 100644 --- a/values/dex/base/config.yaml +++ b/values/dex/base/config.yaml @@ -91,6 +91,7 @@ staticClients: - 'https://stig-atlantis.dev.oceanbox.io/signin-oidc' - 'https://simkir-atlantis.dev.oceanbox.io/signin-oidc' - 'https://atlantis.local.oceanbox.io:8080/signin-oidc' + - 'https://atlantis.local.oceanbox.io:8085/signin-oidc' name: 'Atlantis dev' secret: 3QjfSPmAemjn34XVA2o1fvoS7I4gKvOR - id: petimeter @@ -119,6 +120,8 @@ staticClients: - 'https://jonas-sorcerer.ekman.oceanbox.io/signin-oidc' - 'https://stig-sorcerer.ekman.oceanbox.io/signin-oidc' - 'https://simkir-sorcerer.ekman.oceanbox.io/signin-oidc' + - 'https://sorcerer.local.oceanbox.io:8080/signin-oidc' + - 'https://sorcerer.local.oceanbox.io:8085/signin-oidc' name: 'Sorcerer dev' secret: cyrgDr1UzhQrJn8nRVqEt9BJ9mLk3OBy - id: archmeister diff --git a/values/dex/templates/.config/dotnet-tools.json b/values/dex/templates/.config/dotnet-tools.json new file mode 100644 index 00000000..f65a4aee --- /dev/null +++ b/values/dex/templates/.config/dotnet-tools.json @@ -0,0 +1,18 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "fable": { + "version": "3.6.1", + "commands": [ + "fable" + ] + }, + "femto": { + "version": "0.11.0", + "commands": [ + "femto" + ] + } + } +} \ No newline at end of file diff --git a/values/dex/templates/.gitignore b/values/dex/templates/.gitignore new file mode 100644 index 00000000..1f42bc48 --- /dev/null +++ b/values/dex/templates/.gitignore @@ -0,0 +1,355 @@ +build/client/* +build/test/* +!build/test/__snapshots__ +dist/ + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/values/dex/templates/.vscode/launch.json b/values/dex/templates/.vscode/launch.json new file mode 100644 index 00000000..36ad4e7b --- /dev/null +++ b/values/dex/templates/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "pwa-chrome", + "request": "launch", + "name": "Launch Chrome", + "url": "http://localhost:3000", + "webRoot": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/values/dex/templates/.vscode/settings.json b/values/dex/templates/.vscode/settings.json new file mode 100644 index 00000000..e58fff5a --- /dev/null +++ b/values/dex/templates/.vscode/settings.json @@ -0,0 +1,8 @@ +{ + "editor.detectIndentation": false, + "files.trimTrailingWhitespace": true, + "css.styleSheets": [ + "https://cdn.jsdelivr.net/npm/bulma@0.9.3/css/bulma.min.css", + "https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css" + ] +} \ No newline at end of file diff --git a/values/dex/templates/DexTemplates.sln b/values/dex/templates/DexTemplates.sln new file mode 100644 index 00000000..4bbaf895 --- /dev/null +++ b/values/dex/templates/DexTemplates.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "DexTemplates", "src\DexTemplates.fsproj", "{FA05EC30-6BCD-440D-AD18-4F2030BA1E83}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FA05EC30-6BCD-440D-AD18-4F2030BA1E83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA05EC30-6BCD-440D-AD18-4F2030BA1E83}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA05EC30-6BCD-440D-AD18-4F2030BA1E83}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA05EC30-6BCD-440D-AD18-4F2030BA1E83}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/values/dex/templates/README.md b/values/dex/templates/README.md new file mode 100644 index 00000000..677006f1 --- /dev/null +++ b/values/dex/templates/README.md @@ -0,0 +1,24 @@ +# Oceanbox IdP + +``` +npm install && npm start +``` + +Other commands: + +```bash +npm test # Run tests +npm run test:watch # Run tests in watch mode +npm test -- --update-snapshots # Update test snapshots +npm run build # Build optimized site for deployment and put in dist/ +``` + +## Vite.js repository structure conventions + +- Put static files in `public/` folder +- Put `index.html` in app root (next to `package.json`) +- Add a reference to the entry JS file (relative path is important): + +```html + +``` diff --git a/values/dex/templates/deploy.sh b/values/dex/templates/deploy.sh new file mode 100755 index 00000000..0a1ea077 --- /dev/null +++ b/values/dex/templates/deploy.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +server="root@fs1-0" +path="/vol/brick0/nfs0/k1/pv-oceanbox-dex" +dest="$server:$path" + +index=$(basename dist/assets/index-*.js) + +ssh $server -- rm $path/static/js/*.js +scp dist/assets/*.js $dest/static/js/ + +sed -r "s/@index@/$index/" ./dex/templates/login.html > login.html.$$ +scp ./dex/templates/* $dest/templates/ +scp ./dex/static/*.* $dest/static/ +scp login.html.$$ $dest/templates/login.html +rm login.html.$$ +ssh admin@k1-0.itpartner.intern -- kubectl rollout restart -n oceanbox deployment/dex diff --git a/values/dex/templates/dex/static/img/atlassian-crowd-icon.svg b/values/dex/templates/dex/static/img/atlassian-crowd-icon.svg new file mode 100644 index 00000000..cd94e300 --- /dev/null +++ b/values/dex/templates/dex/static/img/atlassian-crowd-icon.svg @@ -0,0 +1,17 @@ + + + + + + + + diff --git a/values/dex/templates/dex/static/img/bitbucket-icon.svg b/values/dex/templates/dex/static/img/bitbucket-icon.svg new file mode 100644 index 00000000..72f4eb10 --- /dev/null +++ b/values/dex/templates/dex/static/img/bitbucket-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/values/dex/templates/dex/static/img/email-icon.svg b/values/dex/templates/dex/static/img/email-icon.svg new file mode 100644 index 00000000..10f0d8d0 --- /dev/null +++ b/values/dex/templates/dex/static/img/email-icon.svg @@ -0,0 +1,12 @@ + + + + Shape + Created with Sketch. + + + + + + + diff --git a/values/dex/templates/dex/static/img/gitea-icon.svg b/values/dex/templates/dex/static/img/gitea-icon.svg new file mode 100644 index 00000000..afeeacb7 --- /dev/null +++ b/values/dex/templates/dex/static/img/gitea-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/values/dex/templates/dex/static/img/github-icon.svg b/values/dex/templates/dex/static/img/github-icon.svg new file mode 100644 index 00000000..5d607282 --- /dev/null +++ b/values/dex/templates/dex/static/img/github-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/values/dex/templates/dex/static/img/gitlab-icon.svg b/values/dex/templates/dex/static/img/gitlab-icon.svg new file mode 100644 index 00000000..e8d408fa --- /dev/null +++ b/values/dex/templates/dex/static/img/gitlab-icon.svg @@ -0,0 +1,53 @@ + + + + logo-square + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/values/dex/templates/dex/static/img/google-icon.svg b/values/dex/templates/dex/static/img/google-icon.svg new file mode 100644 index 00000000..d667afdf --- /dev/null +++ b/values/dex/templates/dex/static/img/google-icon.svg @@ -0,0 +1,16 @@ + + + + logo_googleg_48dp + Created with Sketch. + + + + + + + + + + + \ No newline at end of file diff --git a/values/dex/templates/dex/static/img/keystone-icon.svg b/values/dex/templates/dex/static/img/keystone-icon.svg new file mode 100644 index 00000000..7a30aba1 --- /dev/null +++ b/values/dex/templates/dex/static/img/keystone-icon.svg @@ -0,0 +1,12 @@ + + + + + OpenStack_Logo_Mark + + + + + + + diff --git a/values/dex/templates/dex/static/img/ldap-icon.svg b/values/dex/templates/dex/static/img/ldap-icon.svg new file mode 100644 index 00000000..506dadc0 --- /dev/null +++ b/values/dex/templates/dex/static/img/ldap-icon.svg @@ -0,0 +1,12 @@ + + + + Combined-Shape + Created with Sketch. + + + + + + + diff --git a/values/dex/templates/dex/static/img/linkedin-icon.svg b/values/dex/templates/dex/static/img/linkedin-icon.svg new file mode 100644 index 00000000..409bad5e --- /dev/null +++ b/values/dex/templates/dex/static/img/linkedin-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/values/dex/templates/dex/static/img/microsoft-icon.svg b/values/dex/templates/dex/static/img/microsoft-icon.svg new file mode 100644 index 00000000..739c395a --- /dev/null +++ b/values/dex/templates/dex/static/img/microsoft-icon.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/values/dex/templates/dex/static/img/ob.png b/values/dex/templates/dex/static/img/ob.png new file mode 100644 index 00000000..8c041554 Binary files /dev/null and b/values/dex/templates/dex/static/img/ob.png differ diff --git a/values/dex/templates/dex/static/img/oidc-icon.svg b/values/dex/templates/dex/static/img/oidc-icon.svg new file mode 100644 index 00000000..e2817b0a --- /dev/null +++ b/values/dex/templates/dex/static/img/oidc-icon.svg @@ -0,0 +1,156 @@ + + + + + facebook web + + + + + + + + + + + + + image/svg+xml + + facebook web + + + User:ZyMOS + + + + + + + + + + + + + + + Open Icon Library + + + + + + + + + + + + + + + + + + diff --git a/values/dex/templates/dex/static/img/saml-icon.svg b/values/dex/templates/dex/static/img/saml-icon.svg new file mode 100644 index 00000000..506dadc0 --- /dev/null +++ b/values/dex/templates/dex/static/img/saml-icon.svg @@ -0,0 +1,12 @@ + + + + Combined-Shape + Created with Sketch. + + + + + + + diff --git a/values/dex/templates/dex/static/js/index.c3f9eb2e.js b/values/dex/templates/dex/static/js/index.c3f9eb2e.js new file mode 100644 index 00000000..20025e83 --- /dev/null +++ b/values/dex/templates/dex/static/js/index.c3f9eb2e.js @@ -0,0 +1,44 @@ +import{s as Je,y as Ke}from"./vendor.86e21c29.js";const Ze=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerpolicy&&(i.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?i.credentials="include":o.crossorigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}};Ze();function q(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function ze(e){return typeof e.CompareTo=="function"}function Xe(e){return typeof e.Equals=="function"}function Ye(e){return typeof e.GetHashCode=="function"}function we(e,t){return Object.getPrototypeOf(e).constructor===Object.getPrototypeOf(t).constructor}class Qe{constructor(t){this.iter=t}["System.Collections.Generic.IEnumerator`1.get_Current"](){return this.current}["System.Collections.IEnumerator.get_Current"](){return this.current}["System.Collections.IEnumerator.MoveNext"](){const t=this.iter.next();return this.current=t.value,!t.done}["System.Collections.IEnumerator.Reset"](){throw new Error("JS iterators cannot be reset")}Dispose(){}}function le(e){return typeof e.GetEnumerator=="function"?e.GetEnumerator():new Qe(e[Symbol.iterator]())}function $e(e){return{[Symbol.iterator](){return this},next(){const t=e["System.Collections.IEnumerator.MoveNext"](),n=t?e["System.Collections.IEnumerator.get_Current"]():void 0;return{done:!t,value:n}}}}function me(e){const t=e;return typeof t.offset=="number"?t.offset:e.kind===1?0:e.getTimezoneOffset()*-6e4}class P{static id(t){return P.idMap.has(t)||P.idMap.set(t,++P.count),P.idMap.get(t)}}P.idMap=new WeakMap;P.count=0;function et(e){let t=0,n=5381;const r=e.length;for(;t(t<<5)+t^n)}function tt(e){return e.getTime()}function nt(e){const t=e.length,n=new Array(t);for(let r=0;rne(n));return te(t)}else return ae(P.id(e))}}}function rt(e,t,n){if(e==null)return t==null;if(t==null||e.length!==t.length)return!1;for(let r=0;rt===1?n(...e.concat([r])):be(e.concat([r]),t-1,n)}function ct(e,t){return t==null||t.length===1?t:ve in t?t[ve]:be([],e,t)}function ft(e){let t=0,n="[";for(const r of e){if(t===0)n+=H(r);else if(t===100){n+="; ...";break}else n+="; "+H(r);t++}return n+"]"}function H(e,t=0){if(e!=null&&typeof e=="object"){if(typeof e.toString=="function")return e.toString();if(Symbol.iterator in e)return ft(e);{const n=Object.getPrototypeOf(e).constructor;return n===Object&&t<10?"{ "+Object.entries(e).map(([r,o])=>r+" = "+H(o,t+1)).join(` + `)+" }":n.name}}return String(e)}function lt(e,t){if(t.length===0)return e;{let n="",r=!0;return t.length===1?(n=H(t[0]),r=n.indexOf(" ")>=0):n=t.map(o=>H(o)).join(", "),e+(r?" (":" ")+n+(r?")":"")}}class at{get name(){return this.cases()[this.tag]}toJSON(){return this.fields.length===0?this.name:[this.name].concat(this.fields)}toString(){return lt(this.name,this.fields)}GetHashCode(){const t=this.fields.map(n=>ne(n));return t.splice(0,0,ae(this.tag)),te(t)}Equals(t){return this===t?!0:we(this,t)&&this.tag===t.tag?de(this.fields,t.fields):!1}CompareTo(t){return this===t?0:we(this,t)?this.tag===t.tag?Fe(this.fields,t.fields):this.tagt,this.setter=r=>{t=r})}get contents(){return this.getter()}set contents(t){this.setter(t)}}class gt{}const Se=Symbol("numeric");var g={GetHashCode(){return te([this.s,this.e].concat(this.c))},Equals(e){return!this.cmp(e)},CompareTo(e){return this.cmp(e)},[Se](){const e=this;return{multiply:t=>e.mul(t),toPrecision:t=>e.toPrecision(t),toExponential:t=>e.toExponential(t),toFixed:t=>e.toFixed(t),toHex:()=>(Number(e)>>>0).toString(16)}}},pt=28,_t=1,R=1e6,ye=1e6,wt=-29,mt=29,dt=!1,z="[big.js] ",A=z+"Invalid ",re=A+"decimal places",Et=A+"rounding mode",Ie=z+"Division by zero",C=void 0,Ft=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function Ce(){function e(t){var n=this;if(!(n instanceof e))return t===C?Ce():new e(t);if(t instanceof e)n.s=t.s,n.e=t.e,n.c=t.c.slice(),vt(n);else{if(typeof t!="string"){if(e.strict===!0)throw TypeError(A+"number");t=t===0&&1/t<0?"-0":String(t)}bt(n,t)}n.constructor=e}return e.prototype=g,e.DP=pt,e.RM=_t,e.NE=wt,e.PE=mt,e.strict=dt,e}function vt(e){if(e.c.length>1&&!e.c[0]){let t=e.c.findIndex(n=>n);e.c=e.c.slice(t),e.e=e.e-t}}function bt(e,t){var n,r,o;if(!Ft.test(t))throw Error(A+"number");for(e.s=t.charAt(0)=="-"?(t=t.slice(1),-1):1,(n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),o=t.length,r=0;r=5||n===2&&(o[0]>5||o[0]===5&&(r||o[1]!==C))),o.length=1,r?(e.e=e.e-t+1,o[0]=1):o[0]=e.e=0;else if(tu>=t&&s>0)<0;if(r=n===1&&o[t]>=5||n===2&&(o[t]>5||o[t]===5&&(r||o[t+1]!==C||o[t-1]&1))||n===3&&(r||!i),o.length=t--,r)for(;++o[t]>9;)o[t]=0,t--||(++e.e,o.unshift(1));for(t=o.length;!o[--t];)o.pop()}return e}function U(e,t,n){var r=e.e,o=e.c.join(""),i=o.length;if(t)o=o.charAt(0)+(i>1?"."+o.slice(1):"")+(r<0?"e":"e+")+r;else if(r<0){for(;++r;)o="0"+o;o="0."+o}else if(r>0)if(++r>i)for(r-=i;r--;)o+="0";else r1&&(o=o.charAt(0)+"."+o.slice(1));return e.s<0&&n?"-"+o:o}g.abs=function(){var e=new this.constructor(this);return e.s=1,e};g.cmp=function(e){var t,n=this.constructor,r=new n(this),e=new n(e),o=r.c,i=e.c,s=r.s,u=e.s,f=r.e,c=e.e;if(!o[0]||!i[0])return o[0]?s:i[0]?-u:0;if(s!=u)return s;if(t=s<0,f!=c)return f>c^t?1:-1;for(u=Math.max(o.length,i.length),s=0;sc^t?1:-1;return 0};g.div=function(e){var t=this.constructor,n=new t(this),e=new t(e),r=n.c,o=e.c,i=n.s==e.s?1:-1,s=t.DP;if(s!==~~s||s<0||s>R)throw Error(re);if(!o[0])throw Error(Ie);if(!r[0])return e.s=i,e.c=[e.e=0],e;var u,f,c,l,a,h=o.slice(),p=u=o.length,I=r.length,_=r.slice(0,u),d=_.length,T=e,ce=T.c=[],fe=0,K=s+(T.e=n.e-e.e)+1;for(T.s=i,i=K<0?0:K,h.unshift(0);d++d?1:-1;else for(a=-1,l=0;++a_[a]?1:-1;break}if(l<0){for(f=d==u?o:h;d;){if(_[--d]K&&k(T,K,t.RM,_[0]!==C),T};g.eq=function(e){return this.cmp(e)===0};g.gt=function(e){return this.cmp(e)>0};g.gte=function(e){return this.cmp(e)>-1};g.lt=function(e){return this.cmp(e)<0};g.lte=function(e){return this.cmp(e)<1};g.minus=g.sub=function(e){var t,n,r,o,i=this.constructor,s=new i(this),e=new i(e),u=s.s,f=e.s;if(u!=f)return e.s=-f,s.plus(e);var c=s.c.slice(),l=s.e,a=e.c,h=e.e;if(!c[0]||!a[0])return a[0]?e.s=-f:c[0]?e=new i(s):e.s=1,e;if(u=l-h){for((o=u<0)?(u=-u,r=c):(h=l,r=a),r.reverse(),f=u;f--;)r.push(0);r.reverse()}else for(n=((o=c.length0)for(;f--;)c[t++]=0;for(f=t;n>u;){if(c[--n]0?(f=s,r=c):(t=-t,r=u),r.reverse();t--;)r.push(0);r.reverse()}for(u.length-c.length<0&&(r=c,c=u,u=r),t=c.length,n=0;t;u[t]%=10)n=(u[--t]=u[t]+c[t]+n)/10|0;for(n&&(u.unshift(n),++f),t=u.length;u[--t]===0;)u.pop();return e.c=u,e.e=f,e};g.pow=function(e){var t=this.constructor,n=new t(this),r=new t("1"),o=new t("1"),i=e<0;if(e!==~~e||e<-ye||e>ye)throw Error(A+"exponent");for(i&&(e=-e);e&1&&(r=r.times(n)),e>>=1,!!e;)n=n.times(n);return i?o.div(r):r};g.prec=function(e,t){if(e!==~~e||e<1||e>R)throw Error(A+"precision");return k(new this.constructor(this),e,t)};g.round=function(e,t){if(e===C)e=0;else if(e!==~~e||e<-R||e>R)throw Error(re);return k(new this.constructor(this),e+this.e+1,t)};g.sqrt=function(){var e,t,n,r=this.constructor,o=new r(this),i=o.s,s=o.e,u=new r("0.5");if(!o.c[0])return new r(o);if(i<0)throw Error(z+"No square root");i=Math.sqrt(o+""),i===0||i===1/0?(t=o.c.join(""),t.length+s&1||(t+="0"),i=Math.sqrt(t),s=((s+1)/2|0)-(s<0||s&1),e=new r((i==1/0?"5e":(i=i.toExponential()).slice(0,i.indexOf("e")+1))+s)):e=new r(i+""),s=e.e+(r.DP+=4);do n=e,e=u.times(n.plus(o.div(n)));while(n.c.slice(0,s).join("")!==e.c.slice(0,s).join(""));return k(e,(r.DP-=4)+e.e+1,r.RM)};g.times=g.mul=function(e){var t,n=this.constructor,r=new n(this),e=new n(e),o=r.c,i=e.c,s=o.length,u=i.length,f=r.e,c=e.e;if(e.s=r.s==e.s?1:-1,!o[0]||!i[0])return e.c=[e.e=0],e;for(e.e=f+c,sf;)u=t[c]+i[f]*o[c-f-1]+u,t[c--]=u%10,u=u/10|0;t[c]=u}for(u?++e.e:t.shift(),f=t.length;!t[--f];)t.pop();return e.c=t,e};g.toExponential=function(e,t){var n=this,r=n.c[0];if(e!==C){if(e!==~~e||e<0||e>R)throw Error(re);for(n=k(new n.constructor(n),++e,t);n.c.lengthR)throw Error(re);for(n=k(new n.constructor(n),e+n.e+1,t),e=e+n.e+1;n.c.length=t.PE,!!e.c[0])};g.toNumber=function(){var e=Number(U(this,!0,!0));if(this.constructor.strict===!0&&!this.eq(e.toString()))throw Error(z+"Imprecise conversion");return e};g.toPrecision=function(e,t){var n=this,r=n.constructor,o=n.c[0];if(e!==C){if(e!==~~e||e<1||e>R)throw Error(A+"precision");for(n=k(new r(n),e,t);n.c.length=r.PE,!!o)};g.valueOf=function(){var e=this,t=e.constructor;if(t.strict===!0)throw Error(z+"valueOf disallowed");return U(e,e.e<=t.NE||e.e>=t.PE,!0)};var D=Ce();new D(0);new D(1);new D(-1);new D("79228162514264337593543950335");new D("-79228162514264337593543950335");var Oe;(function(e){e[e.AllowHexSpecifier=512]="AllowHexSpecifier"})(Oe||(Oe={}));var M=null;try{M=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function O(e,t,n){this.low=e|0,this.high=t|0,this.unsigned=!!n}O.prototype.GetHashCode=function(){let e=this.unsigned?1:0;return e=(e<<5)+e^this.high,e=(e<<5)+e^this.low,e};O.prototype.Equals=function(e){return v(this,e)};O.prototype.CompareTo=function(e){return se(this,e)};O.prototype.toString=function(e){return Q(this,e)};O.prototype.toJSON=function(){return Q(this)};O.prototype[Se]=function(){const e=this;return{multiply:t=>y(e,t),toPrecision:t=>String(e)+0 .toPrecision(t).substr(1),toExponential:t=>String(e)+0 .toExponential(t).substr(1),toFixed:t=>String(e)+0 .toFixed(t).substr(1),toHex:()=>Q(e.unsigned?e:jt(Lt(e),!0),16)}};Object.defineProperty(O.prototype,"__isLong__",{value:!0});function N(e){return(e&&e.__isLong__)===!0}var Ne={},Pe={};function V(e,t){var n,r,o;return t?(e>>>=0,(o=0<=e&&e<256)&&(r=Pe[e],r)?r:(n=w(e,(e|0)<0?-1:0,!0),o&&(Pe[e]=n),n)):(e|=0,(o=-128<=e&&e<128)&&(r=Ne[e],r)?r:(n=w(e,e<0?-1:0,!1),o&&(Ne[e]=n),n))}function b(e,t){if(isNaN(e))return t?L:S;if(t){if(e<0)return L;if(e>=Me)return Ct}else{if(e<=-Le)return E;if(e+1>=Le)return It}return e<0?m(b(-e,t)):w(e%G|0,e/G|0,t)}function w(e,t,n){return new O(e,t,n)}var oe=Math.pow;function ke(e,t,n){if(e.length===0)throw Error("empty string");if(e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return S;if(typeof t=="number"?(n=t,t=!1):t=!!t,n=n||10,n<2||360)throw Error("interior hyphen");if(r===0)return m(ke(e.substring(1),t,n));for(var o=b(oe(n,8)),i=S,s=0;s>>0:e.low}function ie(e){return e.unsigned?(e.high>>>0)*G+(e.low>>>0):e.high*G+(e.low>>>0)}function Q(e,t){if(t=t||10,t<2||36>>0,l=c.toString(t);if(s=f,j(s))return l+u;for(;l.length<6;)l="0"+l;u=""+l+u}}function j(e){return e.high===0&&e.low===0}function F(e){return!e.unsigned&&e.high<0}function je(e){return(e.low&1)==1}function v(e,t){return N(t)||(t=W(t)),e.unsigned!==t.unsigned&&e.high>>>31==1&&t.high>>>31==1?!1:e.high===t.high&&e.low===t.low}function xe(e,t){return se(e,t)<0}function ge(e,t){return se(e,t)>0}function Ot(e,t){return se(e,t)>=0}function se(e,t){if(N(t)||(t=W(t)),v(e,t))return 0;var n=F(e),r=F(t);return n&&!r?-1:!n&&r?1:e.unsigned?t.high>>>0>e.high>>>0||t.high===e.high&&t.low>>>0>e.low>>>0?-1:1:F($(e,t))?-1:1}function m(e){return!e.unsigned&&v(e,E)?E:B(Nt(e),X)}function B(e,t){N(t)||(t=W(t));var n=e.high>>>16,r=e.high&65535,o=e.low>>>16,i=e.low&65535,s=t.high>>>16,u=t.high&65535,f=t.low>>>16,c=t.low&65535,l=0,a=0,h=0,p=0;return p+=i+c,h+=p>>>16,p&=65535,h+=o+f,a+=h>>>16,h&=65535,a+=r+u,l+=a>>>16,a&=65535,l+=n+s,l&=65535,w(h<<16|p,l<<16|a,e.unsigned)}function $(e,t){return N(t)||(t=W(t)),B(e,m(t))}function y(e,t){if(j(e))return e.unsigned?L:S;if(N(t)||(t=W(t)),M){var n=M.mul(e.low,e.high,t.low,t.high);return w(n,M.get_high(),e.unsigned)}if(j(t))return e.unsigned?L:S;if(v(e,E))return je(t)?E:S;if(v(t,E))return je(e)?E:S;if(F(e))return F(t)?y(m(e),m(t)):m(y(m(e),t));if(F(t))return m(y(e,m(t)));if(xe(e,Re)&&xe(t,Re))return b(ie(e)*ie(t),e.unsigned);var r=e.high>>>16,o=e.high&65535,i=e.low>>>16,s=e.low&65535,u=t.high>>>16,f=t.high&65535,c=t.low>>>16,l=t.low&65535,a=0,h=0,p=0,I=0;return I+=s*l,p+=I>>>16,I&=65535,p+=i*l,h+=p>>>16,p&=65535,p+=s*c,h+=p>>>16,p&=65535,h+=o*l,a+=h>>>16,h&=65535,h+=i*c,a+=h>>>16,h&=65535,h+=s*f,a+=h>>>16,h&=65535,a+=r*l+o*c+i*f+s*u,a&=65535,w(p<<16|I,a<<16|h,e.unsigned)}function x(e,t){if(N(t)||(t=W(t)),j(t))throw Error("division by zero");if(M){if(!e.unsigned&&e.high===-2147483648&&t.low===-1&&t.high===-1)return e;var n=(e.unsigned?M.div_u:M.div_s)(e.low,e.high,t.low,t.high);return w(n,M.get_high(),e.unsigned)}if(j(e))return e.unsigned?L:S;var r,o,i;if(e.unsigned){if(t.unsigned||(t=Mt(t)),ge(t,e))return L;if(ge(t,Dt(e,1)))return yt;i=L}else{if(v(e,E)){if(v(t,X)||v(t,Ae))return E;if(v(t,E))return X;var s=kt(e,1);return r=Pt(x(s,t),1),v(r,S)?F(t)?X:Ae:(o=$(e,y(t,r)),i=B(r,x(o,t)),i)}else if(v(t,E))return e.unsigned?L:S;if(F(e))return F(t)?x(m(e),m(t)):m(x(m(e),t));if(F(t))return m(x(e,m(t)));i=S}for(o=e;Ot(o,t);){r=Math.max(1,Math.floor(ie(o)/ie(t)));for(var u=Math.ceil(Math.log(r)/Math.LN2),f=u<=48?1:oe(2,u-48),c=b(r),l=y(c,t);F(l)||ge(l,o);)r-=f,c=b(r,e.unsigned),l=y(c,t);j(c)&&(c=X),i=B(i,c),o=$(o,l)}return i}function Nt(e){return w(~e.low,~e.high,e.unsigned)}function Pt(e,t){return N(t)&&(t=Y(t)),(t&=63)==0?e:t<32?w(e.low<>>32-t,e.unsigned):w(0,e.low<>>t|e.high<<32-t,e.high>>t,e.unsigned):w(e.high>>t-32,e.high>=0?0:-1,e.unsigned)}function Dt(e,t){if(N(t)&&(t=Y(t)),t&=63,t===0)return e;var n=e.high;if(t<32){var r=e.low;return w(r>>>t|n<<32-t,n>>>t,e.unsigned)}else return w(t===32?n:n>>>t-32,0,e.unsigned)}function Mt(e){return e.unsigned?e:w(e.low,e.high,!0)}function Lt(e,t){return t?Rt(e):At(e)}function Rt(e){var t=e.high,n=e.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]}function At(e){var t=e.high,n=e.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,n>>>24,n>>>16&255,n>>>8&255,n&255]}function jt(e,t,n){return n?xt(e,t):Tt(e,t)}function xt(e,t){return new O(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)}function Tt(e,t){return new O(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}class J{constructor(t){this.value=t}toJSON(){return this.value}toString(){return String(this.value)}GetHashCode(){return ne(this.value)}Equals(t){return t==null?!1:Z(this.value,t instanceof J?t.value:t)}CompareTo(t){return t==null?1:he(this.value,t instanceof J?t.value:t)}}function pe(e){return e==null||e instanceof J?new J(e):e}function ue(e){if(e==null)throw new Error("Option has no value");return e instanceof J?e.value:e}function Te(e){return e==null?[]:[ue(e)]}function qt(e,...t){return{strs:e,args:t}}function Ht(e){throw new Error(e)}function Ut(e,t,n,r){const o=t|0;return e.fill(r,o,o+n)}function Vt(e,t,n){if(t==null)return n==null;if(n==null)return!1;{let r=0,o=!0;const i=t.length|0,s=n.length|0;if(i>s)return!1;if(i{e:for(;;){const o=n,s=r.tail;if(s!=null){n=o+1,r=s;continue e}else return o|0}})(0,e)|0}function Bt(e){if(e.tail!=null)return e.head;throw new Error(qe+"\\nParameter name: list")}function Jt(e){const t=e.tail;if(t!=null)return t;throw new Error(qe+"\\nParameter name: list")}function Kt(e){const t=Gt(e)|0,n=Ut(new Array(t),0,t,null);return((o,i)=>{e:for(;;){const s=o,u=i;if(!Wt(u)){n[s]=Bt(u),o=s+1,i=Jt(u);continue e}break}})(0,e),n}const Zt="Enumeration already finished.",zt="Enumeration has not started. Call MoveNext.",Xt="Reset is not supported on this enumerator.";function Yt(){throw new Error(Xt)}function Qt(){throw new Error(zt)}function $t(){throw new Error(Zt)}class en{constructor(t){this.f=t}toString(){const t=this,n=4;let r=0,o="seq [";const i=le(t);try{for(;r0&&(o=o+"; "),o=o+H(i["System.Collections.Generic.IEnumerator`1.get_Current"]()),r=r+1|0;return r===n&&(o=o+"; ..."),o+"]"}finally{i.Dispose()}}GetEnumerator(){return this.f()}[Symbol.iterator](){return $e(this.GetEnumerator())}["System.Collections.IEnumerable.GetEnumerator"](){return this.f()}}function tn(e){return new en(e)}class nn{constructor(t,n,r){this.current=t,this.next=n,this.dispose=r}["System.Collections.Generic.IEnumerator`1.get_Current"](){return this.current()}["System.Collections.IEnumerator.get_Current"](){return this.current()}["System.Collections.IEnumerator.MoveNext"](){return this.next()}["System.Collections.IEnumerator.Reset"](){Yt()}Dispose(){this.dispose()}}function rn(e,t,n){return new nn(e,t,n)}function on(e,t,n){let r=!1,o,i=pe(e());const s=()=>{if(i!=null){const f=ue(i);try{n(f)}finally{i=void 0}}},u=()=>{try{s()}finally{o=void 0}};return rn(()=>(r||Qt(),o!=null?ue(o):$t()),()=>{if(r||(r=!0),i!=null){const f=ue(i);let c;try{c=t(f)}catch(l){throw u(),l}return c!=null?(o=c,!0):(u(),!1)}else return!1},s)}function sn(e,t){t==null&&Ht(e)}function un(e){return tn(e)}function _e(e){return sn("source",e),le(e)}function cn(e,t,n){return un(()=>on(e,t,n))}function fn(e,t,n){const r=_e(n);try{let o=t;for(;r["System.Collections.IEnumerator.MoveNext"]();)o=e(o,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return o}finally{r.Dispose()}}function ee(e,t){fn((n,r)=>{e(r)},void 0,t)}function ln(e,t,n){return cn(()=>[_e(t),_e(n)],r=>{const o=r[0],i=r[1];return(o["System.Collections.IEnumerator.MoveNext"]()?i["System.Collections.IEnumerator.MoveNext"]():!1)?pe(e(o["System.Collections.Generic.IEnumerator`1.get_Current"](),i["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0},r=>{try{r[0].Dispose()}finally{r[1].Dispose()}})}function an(e,t){return ln((n,r)=>[n,r],e,t)}function hn(e,t){setTimeout(t,e)}function He(e){hn(0,e)}class Ue extends at{constructor(t,...n){super();this.tag=t|0,this.fields=n}cases(){return["OnConnected","OnRender"]}}class Ve{constructor(t){this["host@80"]=t,this._firstRun=!0,this._rendering=!1,this._args=[],this._stateIndex=0,this._effectIndex=0,this._states=[],this._effects=[],this._disposables=[]}get host(){return this["host@80"]}fail(){throw new Error("Hooks must be called consistently for each render call")}requestUpdate(){this["host@80"].requestUpdate()}renderWith(t){const n=this;if(n._firstRun?!0:!Vt((r,o)=>Z(r,o),t,n._args))return n._args=t,n.render()}render(){const t=this;t._stateIndex=0,t._effectIndex=0,t._rendering=!0;const n=t["host@80"].renderFn.apply(t["host@80"],t._args);return(t._firstRun?!1:t._stateIndex!==t._states.length?!0:t._effectIndex!==t._effects.length)&&t.fail(),t._rendering=!1,t["host@80"].isConnected&&t.runEffects(t._firstRun,!0),t._firstRun=!1,n}checkRendering(){const t=this;t._rendering||t.fail()}runEffects(t,n){const r=this;He(()=>{ee(o=>{o.tag===0?t&&r._disposables.push(o.fields[0]()):n&&o.fields[0]()},r._effects)})}setState(t,n,r){let o,i;const s=this;o=n,i=s._states[t],!(ct(2,r)==null?Z(i,o):r(i,o))&&(s._states[t]=n,s._rendering?He(()=>{s["host@80"].requestUpdate()}):s["host@80"].requestUpdate())}getState(){const t=this;t._stateIndex>=t._states.length&&t.fail();const n=t._stateIndex|0;return t._stateIndex=n+1|0,[n,t._states[n]]}addState(t){const n=this;return n._states.push(t),[n._states.length-1,t]}disconnect(){const t=this;let n=le(t._disposables);try{for(;n["System.Collections.IEnumerator.MoveNext"]();)n["System.Collections.Generic.IEnumerator`1.get_Current"]().Dispose()}finally{n.Dispose()}ut(t._disposables)}useState(t){const n=this;n.checkRendering();const r=n._firstRun?n.addState(t()):n.getState();return[r[1],o=>{n.setState(r[0],o)}]}useRef(t){const n=this;return n.checkRendering(),n._firstRun?n.addState(new ht(t()))[1]:n.getState()[1]}setEffect(t){const n=this;if(n.checkRendering(),n._firstRun)n._effects.push(t);else{n._effectIndex>=n._effects.length&&n.fail();const r=n._effectIndex|0;n._effectIndex=r+1|0,n._effects[r]=t}}useEffect(t){this.setEffect(new Ue(1,t))}useEffectOnce(t){this.setEffect(new Ue(0,t))}}function gn(e){if(e==null?!0:!(e.hooks instanceof Ve))throw new Error("Cannot access hook context, make sure the hook is called on top of a HookComponent function");return e.hooks}function We(e){return e!=null}function Ge(){throw new Error("LitElement.init must be called on top of the render function")}function pn(e){throw new Error(`'${e}' field in \`props\` record is not of Prop<'T> type`)}class _n{constructor(t,n){this.defaultValue=t,this.options=n}}function wn(e){return[e.defaultValue,e.options]}class mn{constructor(){this._initPromise=null,this._useShadowDom=!0,this._props=null,this._styles=null}get props(){return this._props}set props(t){const n=this;n._props=t}get styles(){return this._styles}set styles(t){const n=this;n._styles=t}get useShadowDom(){return this._useShadowDom}set useShadowDom(t){const n=this;n._useShadowDom=t}init(t){const n=this;return n._initPromise=t(n),[null,null]}get hooks(){return Ge()}}function dn(){return new mn}function Be(e){return e._initPromise}class En extends Je{constructor(t){super();this._hooks=new Ve(this),t(this)}render(){return this._hooks.render()}disconnectedCallback(){const t=this;super.disconnectedCallback(),t._hooks.disconnect()}init(t){const n=this;return[n,n]}get hooks(){return this._hooks}}class Fn extends gt{constructor(t){super();this.name=t}Decorate(t){const n=this,r=dn();if(t.length>0)throw new Error("Render function for LitElement cannot take arguments");try{t.apply(r,[])}catch(i){}return Be(r)==null&&Ge(),Be(r).then(()=>{let i;const s=r,u=We(s.styles)?Kt(s.styles):void 0;let f;if(We(s.props)){const l=[],a={};ee(h=>{const p=h[0];let I;const _=h[1];I=_ instanceof _n?wn(_):pn(p);const d=I[0];a[p]=I[1],d!=null&&l.push([p,d])},(i=Object.values(s.props),an(Object.keys(s.props),i))),f=[pe(a),h=>{ee(p=>{h[p[0]]=p[1]},l)}]}else f=[void 0,l=>{}];const c=class extends En{constructor(){super(f[1])}get renderFn(){return t}};ee(l=>{Object.defineProperty(c,"properties",{get:()=>l})},Te(f[0])),ee(l=>{Object.defineProperty(c,"styles",{get:()=>l})},Te(u)),s.useShadowDom||(c.prototype.createRenderRoot=function(){return this}),customElements.define(n.name,c)}),()=>{throw new Error(`${n.name} is not immediately callable, it must be created in HTML`)}}}function vn(e,t){return e(t.strs,...t.args)}const bn=(()=>{const e=Ke;return t=>vn(e,t)})();function Sn(e){return e.value}function yn(e){throw new Error("A function supposed to be replaced by JS native code has been called, please check.")}yn();new Fn("login-app").Decorate(function(){this.init(n=>(n.useShadowDom=!1,Promise.resolve(void 0)));const e=gn(this).useState(()=>""),t=n=>{let r;const o=e[0].split("@");r=o.length===1?[o[0],"default"]:[o[0],o[1]];let i;const s=document.getElementById(r[1]);i=s==null?document.getElementById("default"):s;const u=i.attributes[0];u.value.indexOf("?")>=0?u.value=u.value+"&":u.value=u.value+"?",u.value=u.value+r[0],i.click()};return bn(qt` + + {n.key==="Enter"&&t()}}> + + + + + {e[1](Sn(n.target))}}> + + + Next + + + + + + `)}); diff --git a/values/dex/templates/dex/static/js/vendor.86e21c29.js b/values/dex/templates/dex/static/js/vendor.86e21c29.js new file mode 100644 index 00000000..e7f1cb0f --- /dev/null +++ b/values/dex/templates/dex/static/js/vendor.86e21c29.js @@ -0,0 +1,1393 @@ +var Xt=Object.defineProperty,Ze=Object.defineProperties,Je=Object.getOwnPropertyDescriptor,Ye=Object.getOwnPropertyDescriptors,Qt=Object.getOwnPropertySymbols,Ge=Object.prototype.hasOwnProperty,Xe=Object.prototype.propertyIsEnumerable,te=(t,e,r)=>e in t?Xt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,N=(t,e)=>{for(var r in e||(e={}))Ge.call(e,r)&&te(t,r,e[r]);if(Qt)for(var r of Qt(e))Xe.call(e,r)&&te(t,r,e[r]);return t},$t=(t,e)=>Ze(t,Ye(e)),a=(t,e,r,o)=>{for(var i=o>1?void 0:o?Je(e,r):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(i=(o?n(e,r,i):n(i))||i);return o&&i&&Xt(e,r,i),i},W=new WeakMap,ee=new WeakMap,K=new WeakMap,re=class{constructor(t,e){(this.host=t).addController(this),this.options=N({form:r=>r.closest("form"),name:r=>r.name,value:r=>r.value,defaultValue:r=>r.defaultValue,disabled:r=>{var o;return(o=r.disabled)!=null?o:!1},reportValidity:r=>typeof r.reportValidity=="function"?r.reportValidity():!0,setValue:(r,o)=>r.value=o},e),this.handleFormData=this.handleFormData.bind(this),this.handleFormSubmit=this.handleFormSubmit.bind(this),this.handleFormReset=this.handleFormReset.bind(this),this.reportFormValidity=this.reportFormValidity.bind(this),this.handleUserInput=this.handleUserInput.bind(this)}hostConnected(){this.form=this.options.form(this.host),this.form&&(W.has(this.form)?W.get(this.form).add(this.host):W.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),K.has(this.form)||(K.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity())),this.host.addEventListener("sl-input",this.handleUserInput)}hostDisconnected(){var t;this.form&&((t=W.get(this.form))==null||t.delete(this.host),this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),K.has(this.form)&&(this.form.reportValidity=K.get(this.form),K.delete(this.form)),this.form=void 0),this.host.removeEventListener("sl-input",this.handleUserInput)}hostUpdated(){var t;const e=this.host,r=Boolean(ee.get(e)),o=Boolean(e.invalid),i=Boolean(e.required);((t=this.form)==null?void 0:t.noValidate)?(e.removeAttribute("data-required"),e.removeAttribute("data-optional"),e.removeAttribute("data-invalid"),e.removeAttribute("data-valid"),e.removeAttribute("data-user-invalid"),e.removeAttribute("data-user-valid")):(e.toggleAttribute("data-required",i),e.toggleAttribute("data-optional",!i),e.toggleAttribute("data-invalid",o),e.toggleAttribute("data-valid",!o),e.toggleAttribute("data-user-invalid",o&&r),e.toggleAttribute("data-user-valid",!o&&r))}handleFormData(t){const e=this.options.disabled(this.host),r=this.options.name(this.host),o=this.options.value(this.host),i=this.host.tagName.toLowerCase()==="sl-button";!e&&!i&&typeof r=="string"&&r.length>0&&typeof o!="undefined"&&(Array.isArray(o)?o.forEach(s=>{t.formData.append(r,s.toString())}):t.formData.append(r,o.toString()))}handleFormSubmit(t){var e;const r=this.options.disabled(this.host),o=this.options.reportValidity;this.form&&!this.form.noValidate&&((e=W.get(this.form))==null||e.forEach(i=>{this.setUserInteracted(i,!0)})),this.form&&!this.form.noValidate&&!r&&!o(this.host)&&(t.preventDefault(),t.stopImmediatePropagation())}handleFormReset(){this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1)}async handleUserInput(){await this.host.updateComplete,this.setUserInteracted(this.host,!0)}reportFormValidity(){if(this.form&&!this.form.noValidate){const t=this.form.querySelectorAll("*");for(const e of t)if(typeof e.reportValidity=="function"&&!e.reportValidity())return!1}return!0}setUserInteracted(t,e){ee.set(t,e),t.requestUpdate()}doAction(t,e){if(this.form){const r=document.createElement("button");r.type=t,r.style.position="absolute",r.style.width="0",r.style.height="0",r.style.clipPath="inset(50%)",r.style.overflow="hidden",r.style.whiteSpace="nowrap",e&&(r.name=e.name,r.value=e.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(o=>{e.hasAttribute(o)&&r.setAttribute(o,e.getAttribute(o))})),this.form.append(r),r.click(),r.remove()}}reset(t){this.doAction("reset",t)}submit(t){this.doAction("submit",t)}},ut=window,wt=ut.ShadowRoot&&(ut.ShadyCSS===void 0||ut.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,At=Symbol(),oe=new WeakMap,ie=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==At)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(wt&&t===void 0){const r=e!==void 0&&e.length===1;r&&(t=oe.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&oe.set(e,t))}return t}toString(){return this.cssText}},Qe=t=>new ie(typeof t=="string"?t:t+"",void 0,At),T=(t,...e)=>{const r=t.length===1?t[0]:e.reduce((o,i,s)=>o+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1],t[0]);return new ie(r,t,At)},tr=(t,e)=>{wt?t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):e.forEach(r=>{const o=document.createElement("style"),i=ut.litNonce;i!==void 0&&o.setAttribute("nonce",i),o.textContent=r.cssText,t.appendChild(o)})},se=wt?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(const o of e.cssRules)r+=o.cssText;return Qe(r)})(t):t,xt,dt=window,ne=dt.trustedTypes,er=ne?ne.emptyScript:"",le=dt.reactiveElementPolyfillSupport,Z={toAttribute(t,e){switch(e){case Boolean:t=t?er:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch(o){r=null}}return r}},ae=(t,e)=>e!==t&&(e==e||t==t),Et={attribute:!0,type:String,converter:Z,reflect:!1,hasChanged:ae},O=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,r)=>{const o=this._$Ep(r,e);o!==void 0&&(this._$Ev.set(o,r),t.push(o))}),t}static createProperty(t,e=Et){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const r=typeof t=="symbol"?Symbol():"__"+t,o=this.getPropertyDescriptor(t,r,e);o!==void 0&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,r){return{get(){return this[e]},set(o){const i=this[t];this[e]=o,this.requestUpdate(t,i,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||Et}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,r=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const o of r)this.createProperty(o,e[o])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const o of r)e.unshift(se(o))}else t!==void 0&&e.push(se(t));return e}static _$Ep(t,e){const r=e.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,r;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((r=t.hostConnected)===null||r===void 0||r.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return tr(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var r;return(r=e.hostConnected)===null||r===void 0?void 0:r.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var r;return(r=e.hostDisconnected)===null||r===void 0?void 0:r.call(e)})}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$EO(t,e,r=Et){var o;const i=this.constructor._$Ep(t,r);if(i!==void 0&&r.reflect===!0){const s=(((o=r.converter)===null||o===void 0?void 0:o.toAttribute)!==void 0?r.converter:Z).toAttribute(e,r.type);this._$El=t,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$El=null}}_$AK(t,e){var r;const o=this.constructor,i=o._$Ev.get(t);if(i!==void 0&&this._$El!==i){const s=o.getPropertyOptions(i),n=typeof s.converter=="function"?{fromAttribute:s.converter}:((r=s.converter)===null||r===void 0?void 0:r.fromAttribute)!==void 0?s.converter:Z;this._$El=i,this[i]=n.fromAttribute(e,s.type),this._$El=null}}requestUpdate(t,e,r){let o=!0;t!==void 0&&(((r=r||this.constructor.getPropertyOptions(t)).hasChanged||ae)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),r.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,r))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((o,i)=>this[i]=o),this._$Ei=void 0);let e=!1;const r=this._$AL;try{e=this.shouldUpdate(r),e?(this.willUpdate(r),(t=this._$ES)===null||t===void 0||t.forEach(o=>{var i;return(i=o.hostUpdate)===null||i===void 0?void 0:i.call(o)}),this.update(r)):this._$Ek()}catch(o){throw e=!1,this._$Ek(),o}e&&this._$AE(r)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(r=>{var o;return(o=r.hostUpdated)===null||o===void 0?void 0:o.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,r)=>this._$EO(r,this[r],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};O.finalized=!0,O.elementProperties=new Map,O.elementStyles=[],O.shadowRootOptions={mode:"open"},le==null||le({ReactiveElement:O}),((xt=dt.reactiveElementVersions)!==null&&xt!==void 0?xt:dt.reactiveElementVersions=[]).push("1.4.2");var St,ct=window,L=ct.trustedTypes,ue=L?L.createPolicy("lit-html",{createHTML:t=>t}):void 0,E=`lit$${(Math.random()+"").slice(9)}$`,de="?"+E,rr=`<${de}>`,M=document,J=(t="")=>M.createComment(t),Y=t=>t===null||typeof t!="object"&&typeof t!="function",ce=Array.isArray,or=t=>ce(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",G=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,he=/-->/g,pe=/>/g,z=RegExp(`>|[ +\f\r](?:([^\\s"'>=/]+)([ +\f\r]*=[ +\f\r]*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),ve=/'/g,be=/"/g,fe=/^(?:script|style|textarea|title)$/i,ir=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),x=ir(1),w=Symbol.for("lit-noChange"),m=Symbol.for("lit-nothing"),me=new WeakMap,B=M.createTreeWalker(M,129,null,!1),sr=(t,e)=>{const r=t.length-1,o=[];let i,s=e===2?"":"",n=G;for(let l=0;l"?(n=i!=null?i:G,v=-1):c[1]===void 0?v=-2:(v=n.lastIndex-c[2].length,b=c[1],n=c[3]===void 0?z:c[3]==='"'?be:ve):n===be||n===ve?n=z:n===he||n===pe?n=G:(n=z,i=void 0);const $=n===z&&t[l+1].startsWith("/>")?" ":"";s+=n===G?u+rr:v>=0?(o.push(b),u.slice(0,v)+"$lit$"+u.slice(v)+E+$):u+E+(v===-2?(o.push(void 0),l):$)}const d=s+(t[r]||">")+(e===2?"":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[ue!==void 0?ue.createHTML(d):d,o]},ht=class{constructor({strings:t,_$litType$:e},r){let o;this.parts=[];let i=0,s=0;const n=t.length-1,d=this.parts,[l,u]=sr(t,e);if(this.el=ht.createElement(l,r),B.currentNode=this.el.content,e===2){const b=this.el.content,c=b.firstChild;c.remove(),b.append(...c.childNodes)}for(;(o=B.nextNode())!==null&&d.length0){o.textContent=L?L.emptyScript:"";for(let v=0;v2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=m}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,r,o){const i=this.strings;let s=!1;if(i===void 0)t=H(this,t,e,0),s=!Y(t)||t!==this._$AH&&t!==w,s&&(this._$AH=t);else{const n=t;let d,l;for(t=i[0],d=0;d{var o,i;const s=(o=r==null?void 0:r.renderBefore)!==null&&o!==void 0?o:e;let n=s._$litPart$;if(n===void 0){const d=(i=r==null?void 0:r.renderBefore)!==null&&i!==void 0?i:null;s._$litPart$=n=new pt(e.insertBefore(J(),d),d,void 0,r!=null?r:{})}return n._$AI(t),n},Ct,kt,X=class extends O{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const r=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=r.firstChild),r}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=hr(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Dt)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Dt)===null||t===void 0||t.setConnected(!1)}render(){return w}};X.finalized=!0,X._$litElement$=!0,(Ct=globalThis.litElementHydrateSupport)===null||Ct===void 0||Ct.call(globalThis,{LitElement:X});var _e=globalThis.litElementPolyfillSupport;_e==null||_e({LitElement:X});((kt=globalThis.litElementVersions)!==null&&kt!==void 0?kt:globalThis.litElementVersions=[]).push("3.2.0");/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *//** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *//** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var Q=T` + :host { + box-sizing: border-box; + } + + :host *, + :host *::before, + :host *::after { + box-sizing: inherit; + } + + [hidden] { + display: none !important; + } +`,pr=T` + ${Q} + + :host { + display: inline-block; + position: relative; + width: auto; + cursor: pointer; + } + + .button { + display: inline-flex; + align-items: stretch; + justify-content: center; + width: 100%; + border-style: solid; + border-width: var(--sl-input-border-width); + font-family: var(--sl-input-font-family); + font-weight: var(--sl-font-weight-semibold); + text-decoration: none; + user-select: none; + white-space: nowrap; + vertical-align: middle; + padding: 0; + transition: var(--sl-transition-x-fast) background-color, var(--sl-transition-x-fast) color, + var(--sl-transition-x-fast) border, var(--sl-transition-x-fast) box-shadow; + cursor: inherit; + } + + .button::-moz-focus-inner { + border: 0; + } + + .button:focus { + outline: none; + } + + .button:focus-visible { + outline: var(--sl-focus-ring); + outline-offset: var(--sl-focus-ring-offset); + } + + .button--disabled { + opacity: 0.5; + cursor: not-allowed; + } + + /* When disabled, prevent mouse events from bubbling up */ + .button--disabled * { + pointer-events: none; + } + + .button__prefix, + .button__suffix { + flex: 0 0 auto; + display: flex; + align-items: center; + pointer-events: none; + } + + .button__label { + display: inline-block; + } + + .button__label::slotted(sl-icon) { + vertical-align: -2px; + } + + /* + * Standard buttons + */ + + /* Default */ + .button--standard.button--default { + background-color: var(--sl-color-neutral-0); + border-color: var(--sl-color-neutral-300); + color: var(--sl-color-neutral-700); + } + + .button--standard.button--default:hover:not(.button--disabled) { + background-color: var(--sl-color-primary-50); + border-color: var(--sl-color-primary-300); + color: var(--sl-color-primary-700); + } + + .button--standard.button--default:active:not(.button--disabled) { + background-color: var(--sl-color-primary-100); + border-color: var(--sl-color-primary-400); + color: var(--sl-color-primary-700); + } + + /* Primary */ + .button--standard.button--primary { + background-color: var(--sl-color-primary-600); + border-color: var(--sl-color-primary-600); + color: var(--sl-color-neutral-0); + } + + .button--standard.button--primary:hover:not(.button--disabled) { + background-color: var(--sl-color-primary-500); + border-color: var(--sl-color-primary-500); + color: var(--sl-color-neutral-0); + } + + .button--standard.button--primary:active:not(.button--disabled) { + background-color: var(--sl-color-primary-600); + border-color: var(--sl-color-primary-600); + color: var(--sl-color-neutral-0); + } + + /* Success */ + .button--standard.button--success { + background-color: var(--sl-color-success-600); + border-color: var(--sl-color-success-600); + color: var(--sl-color-neutral-0); + } + + .button--standard.button--success:hover:not(.button--disabled) { + background-color: var(--sl-color-success-500); + border-color: var(--sl-color-success-500); + color: var(--sl-color-neutral-0); + } + + .button--standard.button--success:active:not(.button--disabled) { + background-color: var(--sl-color-success-600); + border-color: var(--sl-color-success-600); + color: var(--sl-color-neutral-0); + } + + /* Neutral */ + .button--standard.button--neutral { + background-color: var(--sl-color-neutral-600); + border-color: var(--sl-color-neutral-600); + color: var(--sl-color-neutral-0); + } + + .button--standard.button--neutral:hover:not(.button--disabled) { + background-color: var(--sl-color-neutral-500); + border-color: var(--sl-color-neutral-500); + color: var(--sl-color-neutral-0); + } + + .button--standard.button--neutral:active:not(.button--disabled) { + background-color: var(--sl-color-neutral-600); + border-color: var(--sl-color-neutral-600); + color: var(--sl-color-neutral-0); + } + + /* Warning */ + .button--standard.button--warning { + background-color: var(--sl-color-warning-600); + border-color: var(--sl-color-warning-600); + color: var(--sl-color-neutral-0); + } + .button--standard.button--warning:hover:not(.button--disabled) { + background-color: var(--sl-color-warning-500); + border-color: var(--sl-color-warning-500); + color: var(--sl-color-neutral-0); + } + + .button--standard.button--warning:active:not(.button--disabled) { + background-color: var(--sl-color-warning-600); + border-color: var(--sl-color-warning-600); + color: var(--sl-color-neutral-0); + } + + /* Danger */ + .button--standard.button--danger { + background-color: var(--sl-color-danger-600); + border-color: var(--sl-color-danger-600); + color: var(--sl-color-neutral-0); + } + + .button--standard.button--danger:hover:not(.button--disabled) { + background-color: var(--sl-color-danger-500); + border-color: var(--sl-color-danger-500); + color: var(--sl-color-neutral-0); + } + + .button--standard.button--danger:active:not(.button--disabled) { + background-color: var(--sl-color-danger-600); + border-color: var(--sl-color-danger-600); + color: var(--sl-color-neutral-0); + } + + /* + * Outline buttons + */ + + .button--outline { + background: none; + border: solid 1px; + } + + /* Default */ + .button--outline.button--default { + border-color: var(--sl-color-neutral-300); + color: var(--sl-color-neutral-700); + } + + .button--outline.button--default:hover:not(.button--disabled), + .button--outline.button--default.button--checked:not(.button--disabled) { + border-color: var(--sl-color-primary-600); + background-color: var(--sl-color-primary-600); + color: var(--sl-color-neutral-0); + } + + .button--outline.button--default:active:not(.button--disabled) { + border-color: var(--sl-color-primary-700); + background-color: var(--sl-color-primary-700); + color: var(--sl-color-neutral-0); + } + + /* Primary */ + .button--outline.button--primary { + border-color: var(--sl-color-primary-600); + color: var(--sl-color-primary-600); + } + + .button--outline.button--primary:hover:not(.button--disabled), + .button--outline.button--primary.button--checked:not(.button--disabled) { + background-color: var(--sl-color-primary-600); + color: var(--sl-color-neutral-0); + } + + .button--outline.button--primary:active:not(.button--disabled) { + border-color: var(--sl-color-primary-700); + background-color: var(--sl-color-primary-700); + color: var(--sl-color-neutral-0); + } + + /* Success */ + .button--outline.button--success { + border-color: var(--sl-color-success-600); + color: var(--sl-color-success-600); + } + + .button--outline.button--success:hover:not(.button--disabled), + .button--outline.button--success.button--checked:not(.button--disabled) { + background-color: var(--sl-color-success-600); + color: var(--sl-color-neutral-0); + } + + .button--outline.button--success:active:not(.button--disabled) { + border-color: var(--sl-color-success-700); + background-color: var(--sl-color-success-700); + color: var(--sl-color-neutral-0); + } + + /* Neutral */ + .button--outline.button--neutral { + border-color: var(--sl-color-neutral-600); + color: var(--sl-color-neutral-600); + } + + .button--outline.button--neutral:hover:not(.button--disabled), + .button--outline.button--neutral.button--checked:not(.button--disabled) { + background-color: var(--sl-color-neutral-600); + color: var(--sl-color-neutral-0); + } + + .button--outline.button--neutral:active:not(.button--disabled) { + border-color: var(--sl-color-neutral-700); + background-color: var(--sl-color-neutral-700); + color: var(--sl-color-neutral-0); + } + + /* Warning */ + .button--outline.button--warning { + border-color: var(--sl-color-warning-600); + color: var(--sl-color-warning-600); + } + + .button--outline.button--warning:hover:not(.button--disabled), + .button--outline.button--warning.button--checked:not(.button--disabled) { + background-color: var(--sl-color-warning-600); + color: var(--sl-color-neutral-0); + } + + .button--outline.button--warning:active:not(.button--disabled) { + border-color: var(--sl-color-warning-700); + background-color: var(--sl-color-warning-700); + color: var(--sl-color-neutral-0); + } + + /* Danger */ + .button--outline.button--danger { + border-color: var(--sl-color-danger-600); + color: var(--sl-color-danger-600); + } + + .button--outline.button--danger:hover:not(.button--disabled), + .button--outline.button--danger.button--checked:not(.button--disabled) { + background-color: var(--sl-color-danger-600); + color: var(--sl-color-neutral-0); + } + + .button--outline.button--danger:active:not(.button--disabled) { + border-color: var(--sl-color-danger-700); + background-color: var(--sl-color-danger-700); + color: var(--sl-color-neutral-0); + } + + @media (forced-colors: active) { + .button.button--outline.button--checked:not(.button--disabled) { + outline: solid 2px transparent; + } + } + + /* + * Text buttons + */ + + .button--text { + background-color: transparent; + border-color: transparent; + color: var(--sl-color-primary-600); + } + + .button--text:hover:not(.button--disabled) { + background-color: transparent; + border-color: transparent; + color: var(--sl-color-primary-500); + } + + .button--text:focus-visible:not(.button--disabled) { + background-color: transparent; + border-color: transparent; + color: var(--sl-color-primary-500); + } + + .button--text:active:not(.button--disabled) { + background-color: transparent; + border-color: transparent; + color: var(--sl-color-primary-700); + } + + /* + * Size modifiers + */ + + .button--small { + font-size: var(--sl-button-font-size-small); + height: var(--sl-input-height-small); + line-height: calc(var(--sl-input-height-small) - var(--sl-input-border-width) * 2); + border-radius: var(--sl-input-border-radius-small); + } + + .button--medium { + font-size: var(--sl-button-font-size-medium); + height: var(--sl-input-height-medium); + line-height: calc(var(--sl-input-height-medium) - var(--sl-input-border-width) * 2); + border-radius: var(--sl-input-border-radius-medium); + } + + .button--large { + font-size: var(--sl-button-font-size-large); + height: var(--sl-input-height-large); + line-height: calc(var(--sl-input-height-large) - var(--sl-input-border-width) * 2); + border-radius: var(--sl-input-border-radius-large); + } + + /* + * Pill modifier + */ + + .button--pill.button--small { + border-radius: var(--sl-input-height-small); + } + + .button--pill.button--medium { + border-radius: var(--sl-input-height-medium); + } + + .button--pill.button--large { + border-radius: var(--sl-input-height-large); + } + + /* + * Circle modifier + */ + + .button--circle { + padding-left: 0; + padding-right: 0; + } + + .button--circle.button--small { + width: var(--sl-input-height-small); + border-radius: 50%; + } + + .button--circle.button--medium { + width: var(--sl-input-height-medium); + border-radius: 50%; + } + + .button--circle.button--large { + width: var(--sl-input-height-large); + border-radius: 50%; + } + + .button--circle .button__prefix, + .button--circle .button__suffix, + .button--circle .button__caret { + display: none; + } + + /* + * Caret modifier + */ + + .button--caret .button__suffix { + display: none; + } + + .button--caret .button__caret { + height: auto; + } + + /* + * Loading modifier + */ + + .button--loading { + position: relative; + cursor: wait; + } + + .button--loading .button__prefix, + .button--loading .button__label, + .button--loading .button__suffix, + .button--loading .button__caret { + visibility: hidden; + } + + .button--loading sl-spinner { + --indicator-color: currentColor; + position: absolute; + font-size: 1em; + height: 1em; + width: 1em; + top: calc(50% - 0.5em); + left: calc(50% - 0.5em); + } + + /* + * Badges + */ + + .button ::slotted(sl-badge) { + position: absolute; + top: 0; + right: 0; + translate: 50% -50%; + pointer-events: none; + } + + .button--rtl ::slotted(sl-badge) { + right: auto; + left: 0; + translate: -50% -50%; + } + + /* + * Button spacing + */ + + .button--has-label.button--small .button__label { + padding: 0 var(--sl-spacing-small); + } + + .button--has-label.button--medium .button__label { + padding: 0 var(--sl-spacing-medium); + } + + .button--has-label.button--large .button__label { + padding: 0 var(--sl-spacing-large); + } + + .button--has-prefix.button--small { + padding-inline-start: var(--sl-spacing-x-small); + } + + .button--has-prefix.button--small .button__label { + padding-inline-start: var(--sl-spacing-x-small); + } + + .button--has-prefix.button--medium { + padding-inline-start: var(--sl-spacing-small); + } + + .button--has-prefix.button--medium .button__label { + padding-inline-start: var(--sl-spacing-small); + } + + .button--has-prefix.button--large { + padding-inline-start: var(--sl-spacing-small); + } + + .button--has-prefix.button--large .button__label { + padding-inline-start: var(--sl-spacing-small); + } + + .button--has-suffix.button--small, + .button--caret.button--small { + padding-inline-end: var(--sl-spacing-x-small); + } + + .button--has-suffix.button--small .button__label, + .button--caret.button--small .button__label { + padding-inline-end: var(--sl-spacing-x-small); + } + + .button--has-suffix.button--medium, + .button--caret.button--medium { + padding-inline-end: var(--sl-spacing-small); + } + + .button--has-suffix.button--medium .button__label, + .button--caret.button--medium .button__label { + padding-inline-end: var(--sl-spacing-small); + } + + .button--has-suffix.button--large, + .button--caret.button--large { + padding-inline-end: var(--sl-spacing-small); + } + + .button--has-suffix.button--large .button__label, + .button--caret.button--large .button__label { + padding-inline-end: var(--sl-spacing-small); + } + + /* + * Button groups support a variety of button types (e.g. buttons with tooltips, buttons as dropdown triggers, etc.). + * This means buttons aren't always direct descendants of the button group, thus we can't target them with the + * ::slotted selector. To work around this, the button group component does some magic to add these special classes to + * buttons and we style them here instead. + */ + + :host(.sl-button-group__button--first:not(.sl-button-group__button--last)) .button { + border-start-end-radius: 0; + border-end-end-radius: 0; + } + + :host(.sl-button-group__button--inner) .button { + border-radius: 0; + } + + :host(.sl-button-group__button--last:not(.sl-button-group__button--first)) .button { + border-start-start-radius: 0; + border-end-start-radius: 0; + } + + /* All except the first */ + :host(.sl-button-group__button:not(.sl-button-group__button--first)) { + margin-inline-start: calc(-1 * var(--sl-input-border-width)); + } + + /* Add a visual separator between solid buttons */ + :host(.sl-button-group__button:not(.sl-button-group__button--first, .sl-button-group__button--radio, [variant='default']):not(:hover)) + .button:after { + content: ''; + position: absolute; + top: 0; + inset-inline-start: 0; + bottom: 0; + border-left: solid 1px rgb(128 128 128 / 33%); + mix-blend-mode: multiply; + } + + /* Bump hovered, focused, and checked buttons up so their focus ring isn't clipped */ + :host(.sl-button-group__button--hover) { + z-index: 1; + } + + /* Focus and checked are always on top */ + :host(.sl-button-group__button--focus), + :host(.sl-button-group__button[checked]) { + z-index: 2; + } +`,ye=Symbol.for(""),vr=t=>{if((t==null?void 0:t.r)===ye)return t==null?void 0:t._$litStatic$},$e=(t,...e)=>({_$litStatic$:e.reduce((r,o,i)=>r+(s=>{if(s._$litStatic$!==void 0)return s._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${s}. Use 'unsafeStatic' to pass non-literal values, but + take care to ensure page security.`)})(o)+t[i+1],t[0]),r:ye}),we=new Map,br=t=>(e,...r)=>{const o=r.length;let i,s;const n=[],d=[];let l,u=0,b=!1;for(;u{const r=e.$code.toLowerCase();R.has(r)?R.set(r,Object.assign(Object.assign({},R.get(r)),e)):R.set(r,e),tt||(tt=e)}),Ee()}function Ee(){Ae=document.documentElement.dir||"ltr",xe=document.documentElement.lang||navigator.language,[...zt.keys()].map(t=>{typeof t.requestUpdate=="function"&&t.requestUpdate()})}var gr=class{constructor(t){this.host=t,this.host.addController(this)}hostConnected(){zt.add(this.host)}hostDisconnected(){zt.delete(this.host)}dir(){return`${this.host.dir||Ae}`.toLowerCase()}lang(){return`${this.host.lang||xe}`.toLowerCase()}term(t,...e){var r,o;const i=new Intl.Locale(this.lang()),s=i==null?void 0:i.language.toLowerCase(),n=(o=(r=i==null?void 0:i.region)===null||r===void 0?void 0:r.toLowerCase())!==null&&o!==void 0?o:"",d=R.get(`${s}-${n}`),l=R.get(s);let u;if(d&&d[t])u=d[t];else if(l&&l[t])u=l[t];else if(tt&&tt[t])u=tt[t];else return console.error(`No translation found for: ${String(t)}`),String(t);return typeof u=="function"?u(...e):u}date(t,e){return t=new Date(t),new Intl.DateTimeFormat(this.lang(),e).format(t)}number(t,e){return t=Number(t),isNaN(t)?"":new Intl.NumberFormat(this.lang(),e).format(t)}relativeTime(t,e,r){return new Intl.RelativeTimeFormat(this.lang(),r).format(t,e)}},Pt=class extends gr{},_r={$code:"en",$name:"English",$dir:"ltr",clearEntry:"Clear entry",close:"Close",copy:"Copy",numOptionsSelected:t=>t===0?"No options selected":t===1?"1 option selected":`${t} options selected`,currentValue:"Current value",hidePassword:"Hide password",loading:"Loading",progress:"Progress",remove:"Remove",resize:"Resize",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",selectAColorFromTheScreen:"Select a color from the screen",showPassword:"Show password",toggleColorFormat:"Toggle color format"};mr(_r);var Ut=class{constructor(t,...e){this.slotNames=[],(this.host=t).addController(this),this.slotNames=e,this.handleSlotChange=this.handleSlotChange.bind(this)}hasDefaultSlot(){return[...this.host.childNodes].some(t=>{if(t.nodeType===t.TEXT_NODE&&t.textContent.trim()!=="")return!0;if(t.nodeType===t.ELEMENT_NODE){const e=t;if(e.tagName.toLowerCase()==="sl-visually-hidden")return!1;if(!e.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(t){return this.host.querySelector(`:scope > [slot="${t}"]`)!==null}test(t){return t==="[default]"?this.hasDefaultSlot():this.hasNamedSlot(t)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}handleSlotChange(t){const e=t.target;(this.slotNames.includes("[default]")&&!e.name||e.name&&this.slotNames.includes(e.name))&&this.host.requestUpdate()}},g=t=>t!=null?t:m;/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var S={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Nt=t=>(...e)=>({_$litDirective$:t,values:e}),Ot=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,r){this._$Ct=t,this._$AM=e,this._$Ci=r}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var bt=Nt(class extends Ot{constructor(t){var e;if(super(t),t.type!==S.ATTRIBUTE||t.name!=="class"||((e=t.strings)===null||e===void 0?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){var r,o;if(this.nt===void 0){this.nt=new Set,t.strings!==void 0&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter(s=>s!=="")));for(const s in e)e[s]&&!((r=this.st)===null||r===void 0?void 0:r.has(s))&&this.nt.add(s);return this.render(e)}const i=t.element.classList;this.nt.forEach(s=>{s in e||(i.remove(s),this.nt.delete(s))});for(const s in e){const n=!!e[s];n===this.nt.has(s)||((o=this.st)===null||o===void 0?void 0:o.has(s))||(n?(i.add(s),this.nt.add(s)):(i.remove(s),this.nt.delete(s)))}return w}});/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function C(t,e){const r=N({waitUntilFirstUpdate:!1},e);return(o,i)=>{const{update:s}=o;if(t in o){const n=t;o.update=function(d){if(d.has(n)){const l=d.get(n),u=this[n];l!==u&&(!r.waitUntilFirstUpdate||this.hasUpdated)&&this[i](l,u)}s.call(this,d)}}}}var et=t=>e=>typeof e=="function"?((r,o)=>(customElements.define(r,o),o))(t,e):((r,o)=>{const{kind:i,elements:s}=o;return{kind:i,elements:s,finisher(n){customElements.define(r,n)}}})(t,e),yr=(t,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?$t(N({},e),{finisher(r){r.createProperty(e.key,t)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(r){r.createProperty(e.key,t)}};function h(t){return(e,r)=>r!==void 0?((o,i,s)=>{i.constructor.createProperty(s,o)})(t,e,r):yr(t,e)}function rt(t){return h($t(N({},t),{state:!0}))}var $r=({finisher:t,descriptor:e})=>(r,o)=>{var i;if(o===void 0){const s=(i=r.originalKey)!==null&&i!==void 0?i:r.key,n=e!=null?{kind:"method",placement:"prototype",key:s,descriptor:e(r.key)}:$t(N({},r),{key:s});return t!=null&&(n.finisher=function(d){t(d,s)}),n}{const s=r.constructor;e!==void 0&&Object.defineProperty(r,o,e(o)),t==null||t(s,o)}};function Se(t,e){return $r({descriptor:r=>{const o={get(){var i,s;return(s=(i=this.renderRoot)===null||i===void 0?void 0:i.querySelector(t))!==null&&s!==void 0?s:null},enumerable:!0,configurable:!0};if(e){const i=typeof r=="symbol"?Symbol():"__"+r;o.get=function(){var s,n;return this[i]===void 0&&(this[i]=(n=(s=this.renderRoot)===null||s===void 0?void 0:s.querySelector(t))!==null&&n!==void 0?n:null),this[i]}}return o}})}var Lt;((Lt=window.HTMLSlotElement)===null||Lt===void 0?void 0:Lt.prototype.assignedElements)!=null;var P=class extends X{emit(t,e){const r=new CustomEvent(t,N({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(r),r}};a([h()],P.prototype,"dir",2);a([h()],P.prototype,"lang",2);/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *//** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var f=class extends P{constructor(){super(...arguments);this.formSubmitController=new re(this,{form:t=>{if(t.hasAttribute("form")){const e=t.getRootNode(),r=t.getAttribute("form");return e.getElementById(r)}return t.closest("form")}}),this.hasSlotController=new Ut(this,"[default]","prefix","suffix"),this.localize=new Pt(this),this.hasFocus=!1,this.invalid=!1,this.title="",this.variant="default",this.size="medium",this.caret=!1,this.disabled=!1,this.loading=!1,this.outline=!1,this.pill=!1,this.circle=!1,this.type="button",this.name="",this.value="",this.href=""}firstUpdated(){this.isButton()&&(this.invalid=!this.button.checkValidity())}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleClick(t){if(this.disabled||this.loading){t.preventDefault(),t.stopPropagation();return}this.type==="submit"&&this.formSubmitController.submit(this),this.type==="reset"&&this.formSubmitController.reset(this)}isButton(){return!this.href}isLink(){return!!this.href}handleDisabledChange(){this.isButton()&&(this.button.disabled=this.disabled,this.invalid=!this.button.checkValidity())}click(){this.button.click()}focus(t){this.button.focus(t)}blur(){this.button.blur()}checkValidity(){return this.isButton()?this.button.checkValidity():!0}reportValidity(){return this.isButton()?this.button.reportValidity():!0}setCustomValidity(t){this.isButton()&&(this.button.setCustomValidity(t),this.invalid=!this.button.checkValidity())}render(){const t=this.isLink(),e=t?$e`a`:$e`button`;return Tt` + <${e} + part="base" + class=${bt({button:!0,"button--default":this.variant==="default","button--primary":this.variant==="primary","button--success":this.variant==="success","button--neutral":this.variant==="neutral","button--warning":this.variant==="warning","button--danger":this.variant==="danger","button--text":this.variant==="text","button--small":this.size==="small","button--medium":this.size==="medium","button--large":this.size==="large","button--caret":this.caret,"button--circle":this.circle,"button--disabled":this.disabled,"button--focused":this.hasFocus,"button--loading":this.loading,"button--standard":!this.outline,"button--outline":this.outline,"button--pill":this.pill,"button--rtl":this.localize.dir()==="rtl","button--has-label":this.hasSlotController.test("[default]"),"button--has-prefix":this.hasSlotController.test("prefix"),"button--has-suffix":this.hasSlotController.test("suffix")})} + ?disabled=${g(t?void 0:this.disabled)} + type=${g(t?void 0:this.type)} + title=${this.title} + name=${g(t?void 0:this.name)} + value=${g(t?void 0:this.value)} + href=${g(t?this.href:void 0)} + target=${g(t?this.target:void 0)} + download=${g(t?this.download:void 0)} + rel=${g(t&&this.target?"noreferrer noopener":void 0)} + role=${g(t?void 0:"button")} + aria-disabled=${this.disabled?"true":"false"} + tabindex=${this.disabled?"-1":"0"} + @blur=${this.handleBlur} + @focus=${this.handleFocus} + @click=${this.handleClick} + > + + + + ${this.caret?Tt` `:""} + ${this.loading?Tt``:""} + ${e}> + `}};f.styles=pr;a([Se(".button")],f.prototype,"button",2);a([rt()],f.prototype,"hasFocus",2);a([rt()],f.prototype,"invalid",2);a([h()],f.prototype,"title",2);a([h({reflect:!0})],f.prototype,"variant",2);a([h({reflect:!0})],f.prototype,"size",2);a([h({type:Boolean,reflect:!0})],f.prototype,"caret",2);a([h({type:Boolean,reflect:!0})],f.prototype,"disabled",2);a([h({type:Boolean,reflect:!0})],f.prototype,"loading",2);a([h({type:Boolean,reflect:!0})],f.prototype,"outline",2);a([h({type:Boolean,reflect:!0})],f.prototype,"pill",2);a([h({type:Boolean,reflect:!0})],f.prototype,"circle",2);a([h()],f.prototype,"type",2);a([h()],f.prototype,"name",2);a([h()],f.prototype,"value",2);a([h()],f.prototype,"href",2);a([h()],f.prototype,"target",2);a([h()],f.prototype,"download",2);a([h()],f.prototype,"form",2);a([h({attribute:"formaction"})],f.prototype,"formAction",2);a([h({attribute:"formenctype"})],f.prototype,"formEnctype",2);a([h({attribute:"formmethod"})],f.prototype,"formMethod",2);a([h({attribute:"formnovalidate",type:Boolean})],f.prototype,"formNoValidate",2);a([h({attribute:"formtarget"})],f.prototype,"formTarget",2);a([C("disabled",{waitUntilFirstUpdate:!0})],f.prototype,"handleDisabledChange",1);f=a([et("sl-button")],f);var wr=T` + ${Q} + + :host { + --track-width: 2px; + --track-color: rgb(128 128 128 / 25%); + --indicator-color: var(--sl-color-primary-600); + --speed: 2s; + + display: inline-flex; + width: 1em; + height: 1em; + } + + .spinner { + flex: 1 1 auto; + height: 100%; + width: 100%; + } + + .spinner__track, + .spinner__indicator { + fill: none; + stroke-width: var(--track-width); + r: calc(0.5em - var(--track-width) / 2); + cx: 0.5em; + cy: 0.5em; + transform-origin: 50% 50%; + } + + .spinner__track { + stroke: var(--track-color); + transform-origin: 0% 0%; + mix-blend-mode: multiply; + } + + .spinner__indicator { + stroke: var(--indicator-color); + stroke-linecap: round; + stroke-dasharray: 150% 75%; + animation: spin var(--speed) linear infinite; + } + + @keyframes spin { + 0% { + rotate: 0deg; + stroke-dasharray: 0.01em, 2.75em; + } + + 50% { + rotate: 450deg; + stroke-dasharray: 1.375em, 1.375em; + } + + 100% { + rotate: 1080deg; + stroke-dasharray: 0.01em, 2.75em; + } + } +`,Mt=class extends P{constructor(){super(...arguments);this.localize=new Pt(this)}render(){return x` + + + + + `}};Mt.styles=wr;Mt=a([et("sl-spinner")],Mt);var Bt="";function Ce(t){Bt=t}function Ar(){if(!Bt){const t=[...document.getElementsByTagName("script")],e=t.find(r=>r.hasAttribute("data-shoelace"));if(e)Ce(e.getAttribute("data-shoelace"));else{const r=t.find(i=>/shoelace(\.min)?\.js($|\?)/.test(i.src));let o="";r&&(o=r.getAttribute("src")),Ce(o.split("/").slice(0,-1).join("/"))}}return Bt.replace(/\/$/,"")}var xr={name:"default",resolver:t=>`${Ar()}/assets/icons/${t}.svg`},Er=xr,ke={caret:` + + + + `,check:` + + + + + + + + + + + `,"chevron-down":` + + + + `,"chevron-left":` + + + + `,"chevron-right":` + + + + `,eye:` + + + + + `,"eye-slash":` + + + + + + `,eyedropper:` + + + + `,"grip-vertical":` + + + + `,indeterminate:` + + + + + + + + + + `,"person-fill":` + + + + `,"play-fill":` + + + + `,"pause-fill":` + + + + `,radio:` + + + + + + + + `,"star-fill":` + + + + `,"x-lg":` + + + + `,"x-circle-fill":` + + + + `},Sr={name:"system",resolver:t=>t in ke?`data:image/svg+xml,${encodeURIComponent(ke[t])}`:""},Cr=Sr,kr=[Er,Cr],Ht=[];function Tr(t){Ht.push(t)}function zr(t){Ht=Ht.filter(e=>e!==t)}function Te(t){return kr.find(e=>e.name===t)}var Rt=new Map;function Pr(t,e="cors"){if(Rt.has(t))return Rt.get(t);const r=fetch(t,{mode:e}).then(async o=>({ok:o.ok,status:o.status,html:await o.text()}));return Rt.set(t,r),r}var Vt=new Map;async function Ur(t){if(Vt.has(t))return Vt.get(t);const e=await Pr(t),r={ok:e.ok,status:e.status,svg:null};if(e.ok){const o=document.createElement("div");o.innerHTML=e.html;const i=o.firstElementChild;r.svg=(i==null?void 0:i.tagName.toLowerCase())==="svg"?i.outerHTML:""}return Vt.set(t,r),r}var Nr=T` + ${Q} + + :host { + display: inline-block; + width: 1em; + height: 1em; + contain: strict; + box-sizing: content-box !important; + } + + svg { + display: block; + height: 100%; + width: 100%; + } +`,Dt=class extends Ot{constructor(t){if(super(t),this.it=m,t.type!==S.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===m||t==null)return this._t=void 0,this.it=t;if(t===w)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};Dt.directiveName="unsafeHTML",Dt.resultType=1;var It=class extends Dt{};It.directiveName="unsafeSVG",It.resultType=2;var Or=Nt(It),Ft,A=class extends P{constructor(){super(...arguments);this.svg="",this.label="",this.library="default"}connectedCallback(){super.connectedCallback(),Tr(this)}firstUpdated(){this.setIcon()}disconnectedCallback(){super.disconnectedCallback(),zr(this)}getUrl(){const t=Te(this.library);return this.name&&t?t.resolver(this.name):this.src}handleLabelChange(){typeof this.label=="string"&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var t;const e=Te(this.library),r=this.getUrl();if(Ft||(Ft=new DOMParser),r)try{const o=await Ur(r);if(r!==this.getUrl())return;if(o.ok){const s=Ft.parseFromString(o.svg,"text/html").body.querySelector("svg");s!==null?((t=e==null?void 0:e.mutator)==null||t.call(e,s),this.svg=s.outerHTML,this.emit("sl-load")):(this.svg="",this.emit("sl-error"))}else this.svg="",this.emit("sl-error")}catch(o){this.emit("sl-error")}else this.svg.length>0&&(this.svg="")}render(){return x` ${Or(this.svg)} `}};A.styles=Nr;a([rt()],A.prototype,"svg",2);a([h({reflect:!0})],A.prototype,"name",2);a([h()],A.prototype,"src",2);a([h()],A.prototype,"label",2);a([h({reflect:!0})],A.prototype,"library",2);a([C("label")],A.prototype,"handleLabelChange",1);a([C("name"),C("src"),C("library")],A.prototype,"setIcon",1);A=a([et("sl-icon")],A);/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var Lr=T` + .form-control .form-control__label { + display: none; + } + + .form-control .form-control__help-text { + display: none; + } + + /* Label */ + .form-control--has-label .form-control__label { + display: inline-block; + color: var(--sl-input-label-color); + margin-bottom: var(--sl-spacing-3x-small); + } + + .form-control--has-label.form-control--small .form-control__label { + font-size: var(--sl-input-label-font-size-small); + } + + .form-control--has-label.form-control--medium .form-control__label { + font-size: var(--sl-input-label-font-size-medium); + } + + .form-control--has-label.form-control--large .form-control_label { + font-size: var(--sl-input-label-font-size-large); + } + + :host([required]) .form-control--has-label .form-control__label::after { + content: var(--sl-input-required-content); + margin-inline-start: var(--sl-input-required-content-offset); + color: var(--sl-input-required-content-color); + } + + /* Help text */ + .form-control--has-help-text .form-control__help-text { + display: block; + color: var(--sl-input-help-text-color); + margin-top: var(--sl-spacing-3x-small); + } + + .form-control--has-help-text.form-control--small .form-control__help-text { + font-size: var(--sl-input-help-text-font-size-small); + } + + .form-control--has-help-text.form-control--medium .form-control__help-text { + font-size: var(--sl-input-help-text-font-size-medium); + } + + .form-control--has-help-text.form-control--large .form-control__help-text { + font-size: var(--sl-input-help-text-font-size-large); + } + + .form-control--has-help-text.form-control--radio-group .form-control__help-text { + margin-top: var(--sl-spacing-2x-small); + } +`,Mr=T` + ${Q} + ${Lr} + + :host { + display: block; + } + + .input { + flex: 1 1 auto; + display: inline-flex; + align-items: stretch; + justify-content: start; + position: relative; + width: 100%; + font-family: var(--sl-input-font-family); + font-weight: var(--sl-input-font-weight); + letter-spacing: var(--sl-input-letter-spacing); + vertical-align: middle; + overflow: hidden; + cursor: text; + transition: var(--sl-transition-fast) color, var(--sl-transition-fast) border, var(--sl-transition-fast) box-shadow, + var(--sl-transition-fast) background-color; + } + + /* Standard inputs */ + .input--standard { + background-color: var(--sl-input-background-color); + border: solid var(--sl-input-border-width) var(--sl-input-border-color); + } + + .input--standard:hover:not(.input--disabled) { + background-color: var(--sl-input-background-color-hover); + border-color: var(--sl-input-border-color-hover); + } + + .input--standard.input--focused:not(.input--disabled) { + background-color: var(--sl-input-background-color-focus); + border-color: var(--sl-input-border-color-focus); + box-shadow: 0 0 0 var(--sl-focus-ring-width) var(--sl-input-focus-ring-color); + } + + .input--standard.input--focused:not(.input--disabled) .input__control { + color: var(--sl-input-color-focus); + } + + .input--standard.input--disabled { + background-color: var(--sl-input-background-color-disabled); + border-color: var(--sl-input-border-color-disabled); + opacity: 0.5; + cursor: not-allowed; + } + + .input--standard.input--disabled .input__control { + color: var(--sl-input-color-disabled); + } + + .input--standard.input--disabled .input__control::placeholder { + color: var(--sl-input-placeholder-color-disabled); + } + + /* Filled inputs */ + .input--filled { + border: none; + background-color: var(--sl-input-filled-background-color); + color: var(--sl-input-color); + } + + .input--filled:hover:not(.input--disabled) { + background-color: var(--sl-input-filled-background-color-hover); + } + + .input--filled.input--focused:not(.input--disabled) { + background-color: var(--sl-input-filled-background-color-focus); + outline: var(--sl-focus-ring); + outline-offset: var(--sl-focus-ring-offset); + } + + .input--filled.input--disabled { + background-color: var(--sl-input-filled-background-color-disabled); + opacity: 0.5; + cursor: not-allowed; + } + + .input__control { + flex: 1 1 auto; + font-family: inherit; + font-size: inherit; + font-weight: inherit; + min-width: 0; + height: 100%; + color: var(--sl-input-color); + border: none; + background: none; + box-shadow: none; + padding: 0; + margin: 0; + cursor: inherit; + -webkit-appearance: none; + } + + .input__control::-webkit-search-decoration, + .input__control::-webkit-search-cancel-button, + .input__control::-webkit-search-results-button, + .input__control::-webkit-search-results-decoration { + -webkit-appearance: none; + } + + .input__control:-webkit-autofill, + .input__control:-webkit-autofill:hover, + .input__control:-webkit-autofill:focus, + .input__control:-webkit-autofill:active { + box-shadow: 0 0 0 var(--sl-input-height-large) var(--sl-input-background-color-hover) inset !important; + -webkit-text-fill-color: var(--sl-color-primary-500); + caret-color: var(--sl-input-color); + } + + .input--filled .input__control:-webkit-autofill, + .input--filled .input__control:-webkit-autofill:hover, + .input--filled .input__control:-webkit-autofill:focus, + .input--filled .input__control:-webkit-autofill:active { + box-shadow: 0 0 0 var(--sl-input-height-large) var(--sl-input-filled-background-color) inset !important; + } + + .input__control::placeholder { + color: var(--sl-input-placeholder-color); + user-select: none; + } + + .input:hover:not(.input--disabled) .input__control { + color: var(--sl-input-color-hover); + } + + .input__control:focus { + outline: none; + } + + .input__prefix, + .input__suffix { + display: inline-flex; + flex: 0 0 auto; + align-items: center; + cursor: default; + } + + .input__prefix::slotted(sl-icon), + .input__suffix::slotted(sl-icon) { + color: var(--sl-input-icon-color); + } + + /* + * Size modifiers + */ + + .input--small { + border-radius: var(--sl-input-border-radius-small); + font-size: var(--sl-input-font-size-small); + height: var(--sl-input-height-small); + } + + .input--small .input__control { + height: calc(var(--sl-input-height-small) - var(--sl-input-border-width) * 2); + padding: 0 var(--sl-input-spacing-small); + } + + .input--small .input__clear, + .input--small .input__password-toggle { + width: calc(1em + var(--sl-input-spacing-small) * 2); + } + + .input--small .input__prefix::slotted(*) { + margin-inline-start: var(--sl-input-spacing-small); + } + + .input--small .input__suffix::slotted(*) { + margin-inline-end: var(--sl-input-spacing-small); + } + + .input--medium { + border-radius: var(--sl-input-border-radius-medium); + font-size: var(--sl-input-font-size-medium); + height: var(--sl-input-height-medium); + } + + .input--medium .input__control { + height: calc(var(--sl-input-height-medium) - var(--sl-input-border-width) * 2); + padding: 0 var(--sl-input-spacing-medium); + } + + .input--medium .input__clear, + .input--medium .input__password-toggle { + width: calc(1em + var(--sl-input-spacing-medium) * 2); + } + + .input--medium .input__prefix::slotted(*) { + margin-inline-start: var(--sl-input-spacing-medium); + } + + .input--medium .input__suffix::slotted(*) { + margin-inline-end: var(--sl-input-spacing-medium); + } + + .input--large { + border-radius: var(--sl-input-border-radius-large); + font-size: var(--sl-input-font-size-large); + height: var(--sl-input-height-large); + } + + .input--large .input__control { + height: calc(var(--sl-input-height-large) - var(--sl-input-border-width) * 2); + padding: 0 var(--sl-input-spacing-large); + } + + .input--large .input__clear, + .input--large .input__password-toggle { + width: calc(1em + var(--sl-input-spacing-large) * 2); + } + + .input--large .input__prefix::slotted(*) { + margin-inline-start: var(--sl-input-spacing-large); + } + + .input--large .input__suffix::slotted(*) { + margin-inline-end: var(--sl-input-spacing-large); + } + + /* + * Pill modifier + */ + + .input--pill.input--small { + border-radius: var(--sl-input-height-small); + } + + .input--pill.input--medium { + border-radius: var(--sl-input-height-medium); + } + + .input--pill.input--large { + border-radius: var(--sl-input-height-large); + } + + /* + * Clearable + Password Toggle + */ + + .input__clear, + .input__password-toggle { + display: inline-flex; + align-items: center; + justify-content: center; + font-size: inherit; + color: var(--sl-input-icon-color); + border: none; + background: none; + padding: 0; + transition: var(--sl-transition-fast) color; + cursor: pointer; + } + + .input__clear:hover, + .input__password-toggle:hover { + color: var(--sl-input-icon-color-hover); + } + + .input__clear:focus, + .input__password-toggle:focus { + outline: none; + } + + .input--empty .input__clear { + visibility: hidden; + } + + /* Don't show the browser's password toggle in Edge */ + ::-ms-reveal { + display: none; + } + + /* Hide Firefox's clear button on date and time inputs */ + .input--is-firefox input[type='date'], + .input--is-firefox input[type='time'] { + clip-path: inset(0 2em 0 0); + } + + /* Hide the built-in number spinner */ + .input--no-spin-buttons input[type='number']::-webkit-outer-spin-button, + .input--no-spin-buttons input[type='number']::-webkit-inner-spin-button { + -webkit-appearance: none; + display: none; + } + + .input--no-spin-buttons input[type='number'] { + -moz-appearance: textfield; + } +`,Br=t=>t.strings===void 0,Hr={},Rr=(t,e=Hr)=>t._$AH=e,Vr=Nt(class extends Ot{constructor(t){if(super(t),t.type!==S.PROPERTY&&t.type!==S.ATTRIBUTE&&t.type!==S.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Br(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===w||e===m)return e;const r=t.element,o=t.name;if(t.type===S.PROPERTY){if(e===r[o])return w}else if(t.type===S.BOOLEAN_ATTRIBUTE){if(!!e===r.hasAttribute(o))return w}else if(t.type===S.ATTRIBUTE&&r.getAttribute(o)===e+"")return w;return Rr(t),e}});/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var Dr=(t="value")=>(e,r)=>{const o=e.constructor,i=o.prototype.attributeChangedCallback;o.prototype.attributeChangedCallback=function(s,n,d){var l;const u=o.getPropertyOptions(t),b=typeof u.attribute=="string"?u.attribute:t;if(s===b){const c=u.converter||Z,_=(typeof c=="function"?c:(l=c==null?void 0:c.fromAttribute)!=null?l:Z.fromAttribute)(d,u.type);this[t]!==_&&(this[r]=_)}i.call(this,s,n,d)}},ze,Ir=(ze=navigator.userAgentData)==null?void 0:ze.brands.some(t=>t.brand.includes("Chromium")),Fr=Ir?!1:navigator.userAgent.includes("Firefox"),p=class extends P{constructor(){super(...arguments);this.formSubmitController=new re(this),this.hasSlotController=new Ut(this,"help-text","label"),this.localize=new Pt(this),this.hasFocus=!1,this.invalid=!1,this.title="",this.type="text",this.name="",this.value="",this.defaultValue="",this.size="medium",this.filled=!1,this.pill=!1,this.label="",this.helpText="",this.clearable=!1,this.disabled=!1,this.placeholder="",this.readonly=!1,this.passwordToggle=!1,this.passwordVisible=!1,this.noSpinButtons=!1,this.required=!1,this.spellcheck=!0}get valueAsDate(){var t,e;return(e=(t=this.input)==null?void 0:t.valueAsDate)!=null?e:null}set valueAsDate(t){const e=document.createElement("input");e.type="date",e.valueAsDate=t,this.value=e.value}get valueAsNumber(){var t,e;return(e=(t=this.input)==null?void 0:t.valueAsNumber)!=null?e:parseFloat(this.value)}set valueAsNumber(t){const e=document.createElement("input");e.type="number",e.valueAsNumber=t,this.value=e.value}firstUpdated(){this.invalid=!this.checkValidity()}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleChange(){this.value=this.input.value,this.emit("sl-change")}handleClearClick(t){this.value="",this.emit("sl-clear"),this.emit("sl-input"),this.emit("sl-change"),this.input.focus(),t.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleInput(){this.value=this.input.value,this.invalid=!this.checkValidity(),this.emit("sl-input")}handleInvalid(){this.invalid=!0}handleKeyDown(t){const e=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;t.key==="Enter"&&!e&&setTimeout(()=>{!t.defaultPrevented&&!t.isComposing&&this.formSubmitController.submit()})}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}handleDisabledChange(){this.input.disabled=this.disabled,this.invalid=!this.checkValidity()}handleStepChange(){this.input.step=String(this.step),this.invalid=!this.checkValidity()}async handleValueChange(){await this.updateComplete,this.invalid=!this.checkValidity()}focus(t){this.input.focus(t)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(t,e,r="none"){this.input.setSelectionRange(t,e,r)}setRangeText(t,e,r,o){this.input.setRangeText(t,e,r,o),this.value!==this.input.value&&(this.value=this.input.value)}showPicker(){"showPicker"in HTMLInputElement.prototype&&this.input.showPicker()}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){return this.input.checkValidity()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.invalid=!this.checkValidity()}render(){const t=this.hasSlotController.test("label"),e=this.hasSlotController.test("help-text"),r=this.label?!0:!!t,o=this.helpText?!0:!!e,i=this.clearable&&!this.disabled&&!this.readonly&&(typeof this.value=="number"||this.value.length>0);return x` + + + ${this.label} + + + + + + + + ${i?x` + + + + + + `:""} + ${this.passwordToggle&&!this.disabled?x` + + ${this.passwordVisible?x` + + + + `:x` + + + + `} + + `:""} + + + + + + + ${this.helpText} + + + + `}};p.styles=Mr;a([Se(".input__control")],p.prototype,"input",2);a([rt()],p.prototype,"hasFocus",2);a([rt()],p.prototype,"invalid",2);a([h()],p.prototype,"title",2);a([h({reflect:!0})],p.prototype,"type",2);a([h()],p.prototype,"name",2);a([h()],p.prototype,"value",2);a([Dr()],p.prototype,"defaultValue",2);a([h({reflect:!0})],p.prototype,"size",2);a([h({type:Boolean,reflect:!0})],p.prototype,"filled",2);a([h({type:Boolean,reflect:!0})],p.prototype,"pill",2);a([h()],p.prototype,"label",2);a([h({attribute:"help-text"})],p.prototype,"helpText",2);a([h({type:Boolean})],p.prototype,"clearable",2);a([h({type:Boolean,reflect:!0})],p.prototype,"disabled",2);a([h()],p.prototype,"placeholder",2);a([h({type:Boolean,reflect:!0})],p.prototype,"readonly",2);a([h({attribute:"password-toggle",type:Boolean})],p.prototype,"passwordToggle",2);a([h({attribute:"password-visible",type:Boolean})],p.prototype,"passwordVisible",2);a([h({attribute:"no-spin-buttons",type:Boolean})],p.prototype,"noSpinButtons",2);a([h({type:Boolean,reflect:!0})],p.prototype,"required",2);a([h()],p.prototype,"pattern",2);a([h({type:Number})],p.prototype,"minlength",2);a([h({type:Number})],p.prototype,"maxlength",2);a([h({type:Number})],p.prototype,"min",2);a([h({type:Number})],p.prototype,"max",2);a([h()],p.prototype,"step",2);a([h()],p.prototype,"autocapitalize",2);a([h()],p.prototype,"autocorrect",2);a([h()],p.prototype,"autocomplete",2);a([h({type:Boolean})],p.prototype,"autofocus",2);a([h()],p.prototype,"enterkeyhint",2);a([h({type:Boolean,converter:{fromAttribute:t=>!(!t||t==="false"),toAttribute:t=>t?"true":"false"}})],p.prototype,"spellcheck",2);a([h()],p.prototype,"inputmode",2);a([C("disabled",{waitUntilFirstUpdate:!0})],p.prototype,"handleDisabledChange",1);a([C("step",{waitUntilFirstUpdate:!0})],p.prototype,"handleStepChange",1);a([C("value",{waitUntilFirstUpdate:!0})],p.prototype,"handleValueChange",1);p=a([et("sl-input")],p);var jr=T` + ${Q} + + :host { + --border-color: var(--sl-color-neutral-200); + --border-radius: var(--sl-border-radius-medium); + --border-width: 1px; + --padding: var(--sl-spacing-large); + + display: inline-block; + } + + .card { + display: flex; + flex-direction: column; + background-color: var(--sl-panel-background-color); + box-shadow: var(--sl-shadow-x-small); + border: solid var(--border-width) var(--border-color); + border-radius: var(--border-radius); + } + + .card__image { + display: flex; + border-top-left-radius: var(--border-radius); + border-top-right-radius: var(--border-radius); + margin: calc(-1 * var(--border-width)); + overflow: hidden; + } + + .card__image::slotted(img) { + display: block; + width: 100%; + } + + .card:not(.card--has-image) .card__image { + display: none; + } + + .card__header { + display: block; + border-bottom: solid var(--border-width) var(--border-color); + padding: calc(var(--padding) / 2) var(--padding); + } + + .card:not(.card--has-header) .card__header { + display: none; + } + + .card:not(.card--has-image) .card__header { + border-top-left-radius: var(--border-radius); + border-top-right-radius: var(--border-radius); + } + + .card__body { + display: block; + padding: var(--padding); + } + + .card--has-footer .card__footer { + display: block; + border-top: solid var(--border-width) var(--border-color); + padding: var(--padding); + } + + .card:not(.card--has-footer) .card__footer { + display: none; + } +`,jt=class extends P{constructor(){super(...arguments);this.hasSlotController=new Ut(this,"footer","header","image")}render(){return x` + + `}};jt.styles=jr;jt=a([et("sl-card")],jt);/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const ft=window,qt=ft.ShadowRoot&&(ft.ShadyCSS===void 0||ft.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Pe=Symbol(),Ue=new WeakMap;class qr{constructor(e,r,o){if(this._$cssResult$=!0,o!==Pe)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=r}get styleSheet(){let e=this.o;const r=this.t;if(qt&&e===void 0){const o=r!==void 0&&r.length===1;o&&(e=Ue.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),o&&Ue.set(r,e))}return e}toString(){return this.cssText}}const Wr=t=>new qr(typeof t=="string"?t:t+"",void 0,Pe),Kr=(t,e)=>{qt?t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):e.forEach(r=>{const o=document.createElement("style"),i=ft.litNonce;i!==void 0&&o.setAttribute("nonce",i),o.textContent=r.cssText,t.appendChild(o)})},Ne=qt?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(const o of e.cssRules)r+=o.cssText;return Wr(r)})(t):t;/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var Wt;const mt=window,Oe=mt.trustedTypes,Zr=Oe?Oe.emptyScript:"",Le=mt.reactiveElementPolyfillSupport,Kt={toAttribute(t,e){switch(e){case Boolean:t=t?Zr:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch(o){r=null}}return r}},Me=(t,e)=>e!==t&&(e==e||t==t),Zt={attribute:!0,type:String,converter:Kt,reflect:!1,hasChanged:Me};class V extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(e){var r;this.finalize(),((r=this.h)!==null&&r!==void 0?r:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((r,o)=>{const i=this._$Ep(o,r);i!==void 0&&(this._$Ev.set(i,o),e.push(i))}),e}static createProperty(e,r=Zt){if(r.state&&(r.attribute=!1),this.finalize(),this.elementProperties.set(e,r),!r.noAccessor&&!this.prototype.hasOwnProperty(e)){const o=typeof e=="symbol"?Symbol():"__"+e,i=this.getPropertyDescriptor(e,o,r);i!==void 0&&Object.defineProperty(this.prototype,e,i)}}static getPropertyDescriptor(e,r,o){return{get(){return this[r]},set(i){const s=this[e];this[r]=i,this.requestUpdate(e,s,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Zt}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const r=this.properties,o=[...Object.getOwnPropertyNames(r),...Object.getOwnPropertySymbols(r)];for(const i of o)this.createProperty(i,r[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const r=[];if(Array.isArray(e)){const o=new Set(e.flat(1/0).reverse());for(const i of o)r.unshift(Ne(i))}else e!==void 0&&r.push(Ne(e));return r}static _$Ep(e,r){const o=r.attribute;return o===!1?void 0:typeof o=="string"?o:typeof e=="string"?e.toLowerCase():void 0}u(){var e;this._$E_=new Promise(r=>this.enableUpdating=r),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(r=>r(this))}addController(e){var r,o;((r=this._$ES)!==null&&r!==void 0?r:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((o=e.hostConnected)===null||o===void 0||o.call(e))}removeController(e){var r;(r=this._$ES)===null||r===void 0||r.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,r)=>{this.hasOwnProperty(r)&&(this._$Ei.set(r,this[r]),delete this[r])})}createRenderRoot(){var e;const r=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return Kr(r,this.constructor.elementStyles),r}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(r=>{var o;return(o=r.hostConnected)===null||o===void 0?void 0:o.call(r)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(r=>{var o;return(o=r.hostDisconnected)===null||o===void 0?void 0:o.call(r)})}attributeChangedCallback(e,r,o){this._$AK(e,o)}_$EO(e,r,o=Zt){var i;const s=this.constructor._$Ep(e,o);if(s!==void 0&&o.reflect===!0){const n=(((i=o.converter)===null||i===void 0?void 0:i.toAttribute)!==void 0?o.converter:Kt).toAttribute(r,o.type);this._$El=e,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$El=null}}_$AK(e,r){var o;const i=this.constructor,s=i._$Ev.get(e);if(s!==void 0&&this._$El!==s){const n=i.getPropertyOptions(s),d=typeof n.converter=="function"?{fromAttribute:n.converter}:((o=n.converter)===null||o===void 0?void 0:o.fromAttribute)!==void 0?n.converter:Kt;this._$El=s,this[s]=d.fromAttribute(r,n.type),this._$El=null}}requestUpdate(e,r,o){let i=!0;e!==void 0&&(((o=o||this.constructor.getPropertyOptions(e)).hasChanged||Me)(this[e],r)?(this._$AL.has(e)||this._$AL.set(e,r),o.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,o))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(r){Promise.reject(r)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((i,s)=>this[s]=i),this._$Ei=void 0);let r=!1;const o=this._$AL;try{r=this.shouldUpdate(o),r?(this.willUpdate(o),(e=this._$ES)===null||e===void 0||e.forEach(i=>{var s;return(s=i.hostUpdate)===null||s===void 0?void 0:s.call(i)}),this.update(o)):this._$Ek()}catch(i){throw r=!1,this._$Ek(),i}r&&this._$AE(o)}willUpdate(e){}_$AE(e){var r;(r=this._$ES)===null||r===void 0||r.forEach(o=>{var i;return(i=o.hostUpdated)===null||i===void 0?void 0:i.call(o)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((r,o)=>this._$EO(o,this[o],r)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}}V.finalized=!0,V.elementProperties=new Map,V.elementStyles=[],V.shadowRootOptions={mode:"open"},Le==null||Le({ReactiveElement:V}),((Wt=mt.reactiveElementVersions)!==null&&Wt!==void 0?Wt:mt.reactiveElementVersions=[]).push("1.6.1");/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var Jt;const gt=window,D=gt.trustedTypes,Be=D?D.createPolicy("lit-html",{createHTML:t=>t}):void 0,k=`lit$${(Math.random()+"").slice(9)}$`,He="?"+k,Jr=`<${He}>`,I=document,ot=(t="")=>I.createComment(t),it=t=>t===null||typeof t!="object"&&typeof t!="function",Re=Array.isArray,Yr=t=>Re(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",st=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ve=/-->/g,De=/>/g,U=RegExp(`>|[ +\f\r](?:([^\\s"'>=/]+)([ +\f\r]*=[ +\f\r]*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),Ie=/'/g,Fe=/"/g,je=/^(?:script|style|textarea|title)$/i,Gr=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),no=Gr(1),F=Symbol.for("lit-noChange"),y=Symbol.for("lit-nothing"),qe=new WeakMap,j=I.createTreeWalker(I,129,null,!1),Xr=(t,e)=>{const r=t.length-1,o=[];let i,s=e===2?"":"",n=st;for(let l=0;l"?(n=i!=null?i:st,v=-1):c[1]===void 0?v=-2:(v=n.lastIndex-c[2].length,b=c[1],n=c[3]===void 0?U:c[3]==='"'?Fe:Ie):n===Fe||n===Ie?n=U:n===Ve||n===De?n=st:(n=U,i=void 0);const $=n===U&&t[l+1].startsWith("/>")?" ":"";s+=n===st?u+Jr:v>=0?(o.push(b),u.slice(0,v)+"$lit$"+u.slice(v)+k+$):u+k+(v===-2?(o.push(void 0),l):$)}const d=s+(t[r]||">")+(e===2?"":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[Be!==void 0?Be.createHTML(d):d,o]};class nt{constructor({strings:e,_$litType$:r},o){let i;this.parts=[];let s=0,n=0;const d=e.length-1,l=this.parts,[u,b]=Xr(e,r);if(this.el=nt.createElement(u,o),j.currentNode=this.el.content,r===2){const c=this.el.content,v=c.firstChild;v.remove(),c.append(...v.childNodes)}for(;(i=j.nextNode())!==null&&l.length0){i.textContent=D?D.emptyScript:"";for(let _=0;_2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=y}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,r=this,o,i){const s=this.strings;let n=!1;if(s===void 0)e=q(this,e,r,0),n=!it(e)||e!==this._$AH&&e!==F,n&&(this._$AH=e);else{const d=e;let l,u;for(e=s[0],l=0;l{var o,i;const s=(o=r==null?void 0:r.renderBefore)!==null&&o!==void 0?o:e;let n=s._$litPart$;if(n===void 0){const d=(i=r==null?void 0:r.renderBefore)!==null&&i!==void 0?i:null;s._$litPart$=n=new lt(e.insertBefore(ot(),d),d,void 0,r!=null?r:{})}return n._$AI(t),n};/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var Yt,Gt;class yt extends V{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,r;const o=super.createRenderRoot();return(e=(r=this.renderOptions).renderBefore)!==null&&e!==void 0||(r.renderBefore=o.firstChild),o}update(e){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=so(r,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return F}}yt.finalized=!0,yt._$litElement$=!0,(Yt=globalThis.litElementHydrateSupport)===null||Yt===void 0||Yt.call(globalThis,{LitElement:yt});const Ke=globalThis.litElementPolyfillSupport;Ke==null||Ke({LitElement:yt});((Gt=globalThis.litElementVersions)!==null&&Gt!==void 0?Gt:globalThis.litElementVersions=[]).push("3.2.2");export{yt as s,no as y}; diff --git a/values/dex/templates/dex/static/logout.html b/values/dex/templates/dex/static/logout.html new file mode 100644 index 00000000..568d0ab6 --- /dev/null +++ b/values/dex/templates/dex/static/logout.html @@ -0,0 +1,43 @@ + + + + + + {{ issuer }} + + + + + + + + + + + + + + + + + + + You have been logged out. + Yoy will be redirected in a moment. + + + + diff --git a/values/dex/templates/dex/static/main.css b/values/dex/templates/dex/static/main.css new file mode 100644 index 00000000..2c92859f --- /dev/null +++ b/values/dex/templates/dex/static/main.css @@ -0,0 +1,148 @@ +* { + box-sizing: border-box; +} + +body { + margin: 0; +} + +.dex-container { + color: #333; + margin: 45px auto; + max-width: 500px; + min-width: 320px; + /* text-align: center; */ +} + +.dex-btn { + border-radius: 4px; + border: 0; + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.25), 0 0 1px rgba(0, 0, 0, 0.25); + cursor: pointer; + font-size: 16px; + padding: 0; +} + +.dex-btn:focus { + outline: none; +} + +.dex-btn:active { + box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + outline: none; +} + +.dex-btn-icon { + background-position: center; + background-repeat: no-repeat; + background-size: 24px; + border-radius: 4px 0 0 4px; + float: left; + height: 36px; + margin-right: 5px; + width: 36px; +} + +.dex-btn-icon--google { + background-color: #FFFFFF; + background-image: url(../static/img/google-icon.svg);; +} + +.dex-btn-icon--local { + background-color: #84B6EF; + background-image: url(../static/img/email-icon.svg); +} + +.dex-btn-icon--gitea { + background-color: #F5F5F5; + background-image: url(../static/img/gitea-icon.svg); +} + +.dex-btn-icon--github { + background-color: #F5F5F5; + background-image: url(../static/img/github-icon.svg); +} + +.dex-btn-icon--gitlab { + background-color: #F5F5F5; + background-image: url(../static/img/gitlab-icon.svg); + background-size: contain; +} + +.dex-btn-icon--keystone { + background-color: #F5F5F5; + background-image: url(../static/img/keystone-icon.svg); + background-size: contain; +} + +.dex-btn-icon--oidc { + background-color: #EBEBEE; + background-image: url(../static/img/oidc-icon.svg); + background-size: contain; +} + +.dex-btn-icon--bitbucket-cloud { + background-color: #205081; + background-image: url(../static/img/bitbucket-icon.svg); +} + +.dex-btn-icon--atlassian-crowd { + background-color: #CFDCEA; + background-image: url(../static/img/atlassian-crowd-icon.svg); +} + +.dex-btn-icon--ldap { + background-color: #84B6EF; + background-image: url(../static/img/ldap-icon.svg); +} + +.dex-btn-icon--saml { + background-color: #84B6EF; + background-image: url(../static/img/saml-icon.svg); +} + +.dex-btn-icon--linkedin { + background-image: url(../static/img/linkedin-icon.svg); + background-size: contain; +} + +.dex-btn-icon--microsoft { + background-image: url(../static/img/microsoft-icon.svg); +} + +.dex-btn-text { + font-weight: 600; + line-height: 36px; + padding: 6px 12px; + text-align: center; +} + +.dex-subtle-text { + color: #999; + font-size: 12px; +} + +.dex-separator { + color: #999; +} + +.dex-list { + color: #999; + display: inline-block; + font-size: 12px; + list-style: circle; + text-align: left; +} + +.dex-error-box { + background-color: #DD1327; + color: #fff; + font-size: 14px; + font-weight: normal; + max-width: 320px; + padding: 4px 0; +} + +.dex-error-box { + margin: 20px auto; +} diff --git a/values/dex/templates/dex/templates/approval.html b/values/dex/templates/dex/templates/approval.html new file mode 100644 index 00000000..1c037d2d --- /dev/null +++ b/values/dex/templates/dex/templates/approval.html @@ -0,0 +1,44 @@ +{{ template "header.html" . }} + + + Grant Access + + + + {{ if .Scopes }} + {{ .Client }} would like to: + + {{ range $scope := .Scopes }} + {{ $scope }} + {{ end }} + + {{ else }} + {{ .Client }} has not requested any personal information + {{ end }} + + + + + + + + + + Grant Access + + + + + + + + + Cancel + + + + + + + +{{ template "footer.html" . }} diff --git a/values/dex/templates/dex/templates/device.html b/values/dex/templates/dex/templates/device.html new file mode 100644 index 00000000..674cbdc3 --- /dev/null +++ b/values/dex/templates/dex/templates/device.html @@ -0,0 +1,23 @@ +{{ template "header.html" . }} + + + Enter User Code + + + {{ if( .UserCode )}} + + {{ else }} + + {{ end }} + + + {{ if .Invalid }} + + Invalid or Expired User Code + + {{ end }} + Submit + + + +{{ template "footer.html" . }} diff --git a/values/dex/templates/dex/templates/device_success.html b/values/dex/templates/dex/templates/device_success.html new file mode 100644 index 00000000..53b09ce5 --- /dev/null +++ b/values/dex/templates/dex/templates/device_success.html @@ -0,0 +1,8 @@ +{{ template "header.html" . }} + + + Login Successful for {{ .ClientName }} + Return to your device to continue + + +{{ template "footer.html" . }} diff --git a/values/dex/templates/dex/templates/error.html b/values/dex/templates/dex/templates/error.html new file mode 100644 index 00000000..418f76fb --- /dev/null +++ b/values/dex/templates/dex/templates/error.html @@ -0,0 +1,8 @@ +{{ template "header.html" . }} + + + {{ .ErrType }} + {{ .ErrMsg }} + + +{{ template "footer.html" . }} diff --git a/values/dex/templates/dex/templates/footer.html b/values/dex/templates/dex/templates/footer.html new file mode 100644 index 00000000..5b6e2d65 --- /dev/null +++ b/values/dex/templates/dex/templates/footer.html @@ -0,0 +1,3 @@ + +
Return to your device to continue
{{ .ErrMsg }}