@descope/web-components-ui 1.106.0 → 1.108.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs.js +1535 -1385
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +2086 -1935
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/DescopeDev.js.map +1 -1
- package/dist/umd/descope-alert-index-js.js +1 -1
- package/dist/umd/descope-alert-index-js.js.map +1 -1
- package/dist/umd/descope-enriched-text.js +2 -0
- package/dist/umd/descope-enriched-text.js.map +1 -0
- package/dist/umd/descope-hcaptcha-index-js.js +2 -0
- package/dist/umd/descope-hcaptcha-index-js.js.map +1 -0
- package/dist/umd/descope-link.js +2 -0
- package/dist/umd/descope-link.js.map +1 -0
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +4 -3
- package/src/components/descope-alert/AlertClass.js +1 -1
- package/src/components/descope-alert/index.js +1 -1
- package/src/components/descope-hcaptcha/HcaptchaClass.js +137 -0
- package/src/components/descope-hcaptcha/index.js +5 -0
- package/src/index.cjs.js +1 -2
- package/src/index.js +1 -2
- package/src/theme/components/hcaptcha.js +14 -0
- package/src/theme/components/index.js +4 -2
- package/dist/umd/descope-enriched-text-index-js.js +0 -2
- package/dist/umd/descope-enriched-text-index-js.js.map +0 -1
- package/dist/umd/descope-link-index-js.js +0 -2
- package/dist/umd/descope-link-index-js.js.map +0 -1
- package/src/components/descope-enriched-text/EnrichedTextClass.js +0 -209
- package/src/components/descope-enriched-text/consts.js +0 -14
- package/src/components/descope-enriched-text/helpers.js +0 -5
- package/src/components/descope-enriched-text/index.js +0 -5
- package/src/components/descope-link/LinkClass.js +0 -76
- package/src/components/descope-link/index.js +0 -6
- package/src/theme/components/enrichedText.js +0 -40
- package/src/theme/components/link.js +0 -36
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1456,
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1456,2294,4159,9261],{11339:(t,e,n)=>{n.r(e),n.d(e,{AlertClass:()=>p,componentName:()=>a}),n(55838);var o=n(79365),r=n(9696),s=n(97810),i=n(81365),l=n(76231),h=n(25964);const a=(0,s.xE)("alert");class c extends((0,i.q)({componentName:a,baseSelector:":host > div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div>\n <div class="icon"></div>\n <div class="content">\n <descope-enriched-text>\n <slot></slot>\n </descope-enriched-text>\n </div>\n </div>\n ',(0,h.fz)('\n :host {\n display: inline-flex;\n }\n :host > div {\n display: flex;\n width: 100%;\n }\n :host([empty="true"]) {\n display: none;\n }\n .icon {\n flex-shrink: 0;\n }\n .content {\n display: flex;\n flex-wrap: wrap;\n white-space: normal;\n overflow-wrap: break-word;\n }\n ',this)}init(){super.init?.(),this.slotEle=this.shadowRoot.querySelector("slot"),this.textComp=this.shadowRoot.querySelector("descope-enriched-text"),this.slotEle.addEventListener("slotchange",this.handleSlotChange.bind(this)),(0,h.Gh)(this.textComp,this,{includeAttrs:["empty"]}),(0,h.Ge)(this,this.handleChildrenChange.bind(this)),(0,s.EA)(this,this.textComp,{includeAttrs:["variant","full-width","link-target-blank"]})}handleChildrenChange(){this.textComp.textContent=this.textContent}handleSlotChange(){const t=this.slotEle.assignedNodes({flatten:!0});t.length&&(this.textComp.textContent=t[0]?.textContent||"")}}const{icon:d}={icon:{selector:()=>".icon"}},p=(0,r.Zz)((0,o.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},textColor:{selector:l.m.componentName,property:l.m.cssVarList.textColor},backgroundColor:{},borderColor:{},borderWidth:{},borderStyle:{},borderRadius:{},fontSize:[{},{selector:l.m.componentName,property:l.m.cssVarList.fontSize}],gap:{},horizontalPadding:[{property:"padding-top"},{property:"padding-bottom"}],verticalPadding:[{property:"padding-right"},{property:"padding-left"}],alignItems:{},justifyContent:{},icon:[{...d,property:"content"},{...d,property:"display",fallback:"none"}],iconSize:[{...d,property:"width"},{...d,property:"height"}]}}),(0,o.RF)({componentNameOverride:(0,s.xE)("enriched-text")}),(0,o.RF)({componentNameOverride:(0,s.xE)("text")}),o.VO,o.tQ)(c);customElements.define(a,p)},36976:(t,e,n)=>{n.d(e,{M:()=>o});const o=["blockquote","list","image","table","code","hr","backticks","fence","reference","heading","lheading","html_block"]},54847:(t,e,n)=>{n.d(e,{G:()=>o});const o=t=>{const e=document.createElement("textarea");return e.innerHTML=t,e.value}},55838:(t,e,n)=>{n.r(e),n.d(e,{EnrichedTextClass:()=>o.m,componentName:()=>o.T}),n(74778);var o=n(76231);customElements.define(o.T,o.m)},63595:(t,e,n)=>{n.r(e),n.d(e,{TextClass:()=>o.s,componentName:()=>o.T});var o=n(66434);customElements.define(o.T,o.s)},66434:(t,e,n)=>{n.d(e,{T:()=>l,s:()=>c});var o=n(88961),r=n(63200),s=n(25964),i=n(72270);const l=(0,s.xE)("text");class h extends((0,i.qu)({componentName:l,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <slot part="text-wrapper"></slot>\n ',(0,s.fz)("\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n ",this)}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,s.Ge)(this,(()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""}))}}const{host:a}={host:{selector:()=>":host"}},c=(0,r.Zz)((0,o.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},textColor:[{property:"color"}],textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),o.VO,o.tQ)(h)},74778:(t,e,n)=>{n.r(e),n.d(e,{LinkClass:()=>y,componentName:()=>h});var o=n(88961),r=n(63200),s=n(25964),i=n(72270),l=n(66434);const h=(0,s.xE)("link");class a extends((0,i.qu)({componentName:h,baseSelector:":host a"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<div>\n\t\t\t<descope-text>\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t",(0,s.fz)("\n :host {\n\t\t\tdisplay: inline-block;\n line-height: 1em;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t}\n ",this),(0,s.EA)(this,this.shadowRoot.querySelector("a"),{includeAttrs:["href","target","tooltip"],mapAttrs:{tooltip:"title"}}),(0,s.EA)(this,this.shadowRoot.querySelector("descope-text"),{includeAttrs:["mode","variant"]})}}const c={host:{selector:()=>":host"},link:{selector:()=>":host a"},anchor:{},wrapper:{selector:()=>":host > div"},text:{selector:()=>l.s.componentName}},{anchor:d,text:p,host:m,wrapper:u,link:g}=c,y=(0,r.Zz)((0,o.RF)({mappings:{hostWidth:{...m,property:"width"},hostDirection:{...p,property:"direction"},textAlign:u,textDecoration:{...g,property:"text-decoration",fallback:"none"},textColor:[{...d,property:"color"},{...p,property:l.s.cssVarList.textColor}],cursor:d}}),o.VO,o.tQ)(a);n(63595),customElements.define(h,y)},76231:(t,e,n)=>{n.d(e,{T:()=>c,m:()=>p});var o=n(92540),r=n(88961),s=n(63200),i=n(36976),l=n(72270),h=n(54847),a=n(25964);const c=(0,a.xE)("enriched-text");class d extends((0,l.qu)({componentName:c,baseSelector:":host > div"})){#t;#e;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="content"></div>\n ',(0,a.fz)("\n :host {\n line-height: 1em;\n word-break: break-word;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n cursor: pointer;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n ",this),this.#n(),(0,a.Ge)(this,this.#o.bind(this))}static get observedAttributes(){return["readonly","link-target-blank"]}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),n!==e&&("readonly"===t&&this.onReadOnlyChange("true"===n),"link-target-blank"===t&&this.#n())}customUnderlineRenderer(){this.processor.renderer.rules.em_open=(t,e,n,o,r)=>("_"===t[e].markup&&(t[e].tag="u"),this.#e(t,e,n,o,r)),this.processor.renderer.rules.em_close=(t,e,n,o,r)=>("_"===t[e].markup&&(t[e].tag="u"),this.#e(t,e,n,o,r))}#r(){this.linkTargetBlank?this.processor.renderer.rules.link_open=(t,e,n,o,r)=>(t[e].attrSet("target","_blank"),this.#t(t,e,n,o,r)):this.processor.renderer.rules.link_open=this.#t}#s(){this.processor&&this.processor.disable(i.M)}#i(){this.#s()}#l(){this.#t=this.processor.renderer.rules.link_open||((t,e,n,o,r)=>r.renderToken(t,e,n)),this.#e=this.processor.renderer.rules.em_open||((t,e,n,o,r)=>r.renderToken(t,e,n))}#n(){this.processor=new o.A("commonmark",{html:!0}),this.#l(),this.#i(),this.#r(),this.customUnderlineRenderer()}get linkTargetBlank(){return"true"===this.getAttribute("link-target-blank")}get contentNode(){return this.shadowRoot.querySelector(".content")}#o(){if(!this.processor)return;let t=(0,h.G)(this.innerHTML);!t?.trim()&&this.isConnected?this.setAttribute("empty","true"):this.removeAttribute("empty");try{const e=this.processor.parse(t,{references:void 0});t=this.processor.renderer.render(e,{html:!0,breaks:!0})}catch(t){console.warn("Not parsing invalid markdown token")}this.contentNode.innerHTML=t}onReadOnlyChange(t){t?this.contentNode.setAttribute("inert",t):this.contentNode.removeAttribute("inert")}}const p=(0,s.Zz)((0,r.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDisplay:{selector:()=>":host",property:"display",fallback:"inline-block"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},fontWeightBold:[{selector:()=>":host strong",property:"font-weight"},{selector:()=>":host b",property:"font-weight"}],textColor:{property:"color"},textLineHeight:{property:"line-height"},textAlign:{},linkColor:{selector:"a",property:"color"},linkTextDecoration:{selector:"a",property:"text-decoration"},linkHoverTextDecoration:{selector:"a:hover",property:"text-decoration"},minHeight:{},minWidth:{}}}),(0,r.RF)({componentNameOverride:(0,a.xE)("link")}),(0,r.RF)({componentNameOverride:(0,a.xE)("text")}),r.VO,r.tQ)(d)}}]);
|
2
2
|
//# sourceMappingURL=descope-alert-index-js.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"descope-alert-index-js.js","mappings":"6JAAO,MAAMA,EAAe,CAC1B,aACA,OACA,QACA,QACA,OACA,KACA,YACA,QACA,YACA,UACA,WACA,a,qJCLK,MAAMC,GAAgB,QAAiB,SAE9C,MAAMC,WAAiB,EAAAC,EAAA,GAAgB,CAAEF,gBAAeG,aAAc,iBACpE,WAAAC,GACEC,QAEAC,KAAKC,aAAa,CAAEC,KAAM,SAAUC,UAAY,wMAWhD,QACE,8YAqBAH,KAEJ,CAEA,IAAAI,GACEL,MAAMK,SAENJ,KAAKK,QAAUL,KAAKM,WAAWC,cAAc,QAC7CP,KAAKQ,SAAWR,KAAKM,WAAWC,cAAc,yBAE9CP,KAAKK,QAAQI,iBAAiB,aAAcT,KAAKU,iBAAiBC,KAAKX,QAEvE,QAAUA,KAAKQ,SAAUR,KAAM,CAAEY,aAAc,CAAC,YAEhD,QAAgBZ,KAAMA,KAAKa,qBAAqBF,KAAKX,QAErD,QAAaA,KAAMA,KAAKQ,SAAU,CAChCI,aAAc,CAAC,UAAW,aAAc,sBAE5C,CAEA,oBAAAC,GACEb,KAAKQ,SAASM,YAAcd,KAAKc,WACnC,CAEA,gBAAAJ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AAEzE,SAAU,IAAKI,SAAU,SACtCsE,mBAAoB,CAAE1E,SAAU,IAAKI,SAAU,mBAC/CuE,wBAAyB,CAAE3E,SAAU,UAAWI,SAAU,mBAC1DwE,UAAW,CAAC,EACZC,SAAU,CAAC,MAGf,QAAiB,CAAEvD,uBAAuB,QAAiB,WAC3D,QAAiB,CAAEA,uBAAuB,QAAiB,UAC3D,KACA,KA1B+B,CA2B/BG,E,mCChNK,MAAMqD,EAAc3B,IACzB,MAAM4B,EAAWC,SAASC,cAAc,YAExC,OADAF,EAAS/F,UAAYmE,EACd4B,EAASG,KAAK,C,iGCDvB3D,eAAeC,OAAO,IAAe,I","sources":["webpack://@descope/web-components-ui/./src/components/descope-enriched-text/consts.js","webpack://@descope/web-components-ui/./src/components/descope-alert/AlertClass.js","webpack://@descope/web-components-ui/./src/components/descope-alert/index.js","webpack://@descope/web-components-ui/./src/components/descope-enriched-text/EnrichedTextClass.js","webpack://@descope/web-components-ui/./src/components/descope-enriched-text/helpers.js","webpack://@descope/web-components-ui/./src/components/descope-enriched-text/index.js"],"sourcesContent":["export const disableRules = [\n 'blockquote',\n 'list',\n 'image',\n 'table',\n 'code',\n 'hr',\n 'backticks',\n 'fence',\n 'reference',\n 'heading',\n 'lheading',\n 'html_block',\n];\n","import { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';\nimport { compose } from '../../helpers';\nimport { forwardAttrs, getComponentName } from '../../helpers/componentHelpers';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { EnrichedTextClass } from '../descope-enriched-text/EnrichedTextClass';\nimport { injectStyle, observeChildren, syncAttrs } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('alert');\n\nclass RawAlert extends createBaseClass({ componentName, baseSelector: ':host > div' }) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div>\n <div class=\"icon\"></div>\n <div class=\"content\">\n <descope-enriched-text>\n <slot></slot>\n </descope-enriched-text>\n </div>\n </div>\n `;\n\n injectStyle(\n `\n :host {\n display: inline-flex;\n }\n :host > div {\n display: flex;\n width: 100%;\n }\n :host([empty=\"true\"]) {\n display: none;\n }\n .icon {\n flex-shrink: 0;\n }\n .content {\n display: flex;\n flex-wrap: wrap;\n white-space: normal;\n overflow-wrap: break-word;\n }\n `,\n this\n );\n }\n\n init() {\n super.init?.();\n\n this.slotEle = this.shadowRoot.querySelector('slot');\n this.textComp = this.shadowRoot.querySelector('descope-enriched-text');\n\n this.slotEle.addEventListener('slotchange', this.handleSlotChange.bind(this));\n\n syncAttrs(this.textComp, this, { includeAttrs: ['empty'] });\n\n observeChildren(this, this.handleChildrenChange.bind(this));\n\n forwardAttrs(this, this.textComp, {\n includeAttrs: ['variant', 'full-width', 'link-target-blank'],\n });\n }\n\n handleChildrenChange() {\n this.textComp.textContent = this.textContent;\n }\n\n handleSlotChange() {\n const assignedNodes = this.slotEle.assignedNodes({ flatten: true });\n if (!assignedNodes.length) return;\n this.textComp.textContent = assignedNodes[0]?.textContent || '';\n }\n}\n\nconst { icon } = {\n icon: { selector: () => '.icon' },\n};\n\nexport const AlertClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostDirection: { selector: () => ':host', property: 'direction' },\n textColor: {\n selector: EnrichedTextClass.componentName,\n property: EnrichedTextClass.cssVarList.textColor,\n },\n backgroundColor: {},\n borderColor: {},\n borderWidth: {},\n borderStyle: {},\n borderRadius: {},\n fontSize: [\n {},\n {\n selector: EnrichedTextClass.componentName,\n property: EnrichedTextClass.cssVarList.fontSize,\n },\n ],\n gap: {},\n horizontalPadding: [{ property: 'padding-top' }, { property: 'padding-bottom' }],\n verticalPadding: [{ property: 'padding-right' }, { property: 'padding-left' }],\n alignItems: {},\n justifyContent: {},\n icon: [\n { ...icon, property: 'content' },\n { ...icon, property: 'display', fallback: 'none' },\n ],\n iconSize: [\n { ...icon, property: 'width' },\n { ...icon, property: 'height' },\n ],\n },\n }),\n createStyleMixin({ componentNameOverride: getComponentName('enriched-text') }),\n createStyleMixin({ componentNameOverride: getComponentName('text') }),\n draggableMixin,\n componentNameValidationMixin\n)(RawAlert);\n","import '../descope-enriched-text';\nimport { componentName, AlertClass } from './AlertClass';\n\ncustomElements.define(componentName, AlertClass);\n\nexport { AlertClass, componentName };\n","/* eslint-disable no-param-reassign */\n\nimport MarkdownIt from 'markdown-it';\nimport { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';\nimport { compose } from '../../helpers';\nimport { getComponentName, observeChildren } from '../../helpers/componentHelpers';\nimport { disableRules } from './consts';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { decodeHTML } from './helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('enriched-text');\n\nclass EnrichedText extends createBaseClass({ componentName, baseSelector: ':host > div' }) {\n #origLinkRenderer;\n\n #origEmRenderer;\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"content\"></div>\n `;\n\n injectStyle(\n `\n :host {\n line-height: 1em;\n word-break: break-word;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n cursor: pointer;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n `,\n this\n );\n\n this.#initProcessor();\n\n observeChildren(this, this.#parseChildren.bind(this));\n }\n\n static get observedAttributes() {\n return ['readonly', 'link-target-blank'];\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (newValue !== oldValue) {\n if (attrName === 'readonly') {\n this.onReadOnlyChange(newValue === 'true');\n }\n\n if (attrName === 'link-target-blank') {\n this.#initProcessor();\n }\n }\n }\n\n // We're overriding the rule for em with single underscore to perform as underline. (_underline_)\n customUnderlineRenderer() {\n this.processor.renderer.rules.em_open = (tokens, idx, options, env, self) => {\n if (tokens[idx].markup === '_') tokens[idx].tag = 'u';\n return this.#origEmRenderer(tokens, idx, options, env, self);\n };\n this.processor.renderer.rules.em_close = (tokens, idx, options, env, self) => {\n if (tokens[idx].markup === '_') tokens[idx].tag = 'u';\n return this.#origEmRenderer(tokens, idx, options, env, self);\n };\n }\n\n #customizeLinkRenderer() {\n if (this.linkTargetBlank) {\n this.processor.renderer.rules.link_open = (tokens, idx, options, env, self) => {\n // Add a new `target` attribute, or replace the value of the existing one.\n tokens[idx].attrSet('target', '_blank');\n // Pass the token to the default renderer.\n return this.#origLinkRenderer(tokens, idx, options, env, self);\n };\n } else {\n this.processor.renderer.rules.link_open = this.#origLinkRenderer;\n }\n }\n\n #disableCustomRules() {\n if (!this.processor) {\n return;\n }\n this.processor.disable(disableRules);\n }\n\n #updateProcessorRules() {\n this.#disableCustomRules();\n }\n\n #storeOrigRenderers() {\n const defaultLinkRenderer = (tokens, idx, options, _, self) =>\n self.renderToken(tokens, idx, options);\n this.#origLinkRenderer = this.processor.renderer.rules.link_open || defaultLinkRenderer;\n\n const defaultStrongRenderer = (tokens, idx, options, _, self) =>\n self.renderToken(tokens, idx, options);\n this.#origEmRenderer = this.processor.renderer.rules.em_open || defaultStrongRenderer;\n }\n\n #initProcessor() {\n this.processor = new MarkdownIt('commonmark', { html: true });\n this.#storeOrigRenderers();\n this.#updateProcessorRules();\n this.#customizeLinkRenderer();\n this.customUnderlineRenderer();\n }\n\n get linkTargetBlank() {\n return this.getAttribute('link-target-blank') === 'true';\n }\n\n get contentNode() {\n return this.shadowRoot.querySelector('.content');\n }\n\n #parseChildren() {\n if (!this.processor) {\n return;\n }\n\n let html = decodeHTML(this.innerHTML);\n\n if (!html?.trim() && this.isConnected) {\n this.setAttribute('empty', 'true');\n } else {\n this.removeAttribute('empty');\n }\n\n try {\n const tokens = this.processor.parse(html, { references: undefined });\n html = this.processor.renderer.render(tokens, { html: true, breaks: true });\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn('Not parsing invalid markdown token');\n }\n\n this.contentNode.innerHTML = html;\n }\n\n onReadOnlyChange(isReadOnly) {\n if (isReadOnly) {\n this.contentNode.setAttribute('inert', isReadOnly);\n } else {\n this.contentNode.removeAttribute('inert');\n }\n }\n}\n\nexport const EnrichedTextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostDisplay: { selector: () => ':host', property: 'display', fallback: 'inline-block' },\n hostDirection: { selector: () => ':host', property: 'direction' },\n fontSize: {},\n fontFamily: {},\n fontWeight: {},\n fontWeightBold: [\n { selector: () => ':host strong', property: 'font-weight' },\n { selector: () => ':host b', property: 'font-weight' },\n ],\n textColor: { property: 'color' },\n textLineHeight: { property: 'line-height' },\n textAlign: {},\n linkColor: { selector: 'a', property: 'color' },\n linkTextDecoration: { selector: 'a', property: 'text-decoration' },\n linkHoverTextDecoration: { selector: 'a:hover', property: 'text-decoration' },\n minHeight: {},\n minWidth: {},\n },\n }),\n createStyleMixin({ componentNameOverride: getComponentName('link') }),\n createStyleMixin({ componentNameOverride: getComponentName('text') }),\n draggableMixin,\n componentNameValidationMixin\n)(EnrichedText);\n","export const decodeHTML = (html) => {\n const textArea = document.createElement('textarea');\n textArea.innerHTML = html;\n return textArea.value;\n};\n","import { componentName, EnrichedTextClass } from './EnrichedTextClass';\n\ncustomElements.define(componentName, EnrichedTextClass);\n\nexport { EnrichedTextClass, componentName };\n"],"names":["disableRules","componentName","RawAlert","createBaseClass","baseSelector","constructor","super","this","attachShadow","mode","innerHTML","init","slotEle","shadowRoot","querySelector","textComp","addEventListener","handleSlotChange","bind","includeAttrs","handleChildrenChange","textContent","assignedNodes","flatten","length","icon","selector","AlertClass","mappings","hostWidth","property","hostDirection","textColor","EnrichedTextClass","cssVarList","backgroundColor","borderColor","borderWidth","borderStyle","borderRadius","fontSize","gap","horizontalPadding","verticalPadding","alignItems","justifyContent","fallback","iconSize","componentNameOverride","customElements","define","EnrichedText","observedAttributes","attributeChangedCallback","attrName","oldValue","newValue","onReadOnlyChange","customUnderlineRenderer","processor","renderer","rules","em_open","tokens","idx","options","env","self","markup","tag","em_close","linkTargetBlank","link_open","attrSet","disable","_","renderToken","html","getAttribute","contentNode","trim","isConnected","setAttribute","removeAttribute","parse","references","undefined","render","breaks","e","console","warn","isReadOnly","hostDisplay","fontFamily","fontWeight","fontWeightBold","textLineHeight","textAlign","linkColor","linkTextDecoration","linkHoverTextDecoration","minHeight","minWidth","decodeHTML","textArea","document","createElement","value"],"sourceRoot":""}
|
1
|
+
{"version":3,"file":"descope-alert-index-js.js","mappings":"2RAOO,MAAMA,GAAgB,QAAiB,SAE9C,MAAMC,WAAiB,EAAAC,EAAA,GAAgB,CAAEF,gBAAeG,aAAc,iBACpE,WAAAC,GACEC,QAEAC,KAAKC,aAAa,CAAEC,KAAM,SAAUC,UAAY,wMAWhD,QACE,8YAqBAH,KAEJ,CAEA,IAAAI,GACEL,MAAMK,SAENJ,KAAKK,QAAUL,KAAKM,WAAWC,cAAc,QAC7CP,KAAKQ,SAAWR,KAAKM,WAAWC,cAAc,yBAE9CP,KAAKK,QAAQI,iBAAiB,aAAcT,KAAKU,iBAAiBC,KAAKX,QAEvE,QAAUA,KAAKQ,SAAUR,KAAM,CAAEY,aAAc,CAAC,YAEhD,QAAgBZ,KAAMA,KAAKa,qBAAqBF,KAAKX,QAErD,QAAaA,KAAMA,KAAKQ,SAAU,CAChCI,aAAc,CAAC,UAAW,aAAc,sBAE5C,CAEA,oBAAAC,GACEb,KAAKQ,SAASM,YAAcd,KAAKc,WACnC,CAEA,gBAAAJ,GACE,MAAMK,EAAgBf,KAAKK,QAAQU,cAAc,CAAEC,SAAS,IACvDD,EAAcE,SACnBjB,KAAKQ,SAASM,YAAcC,EAAc,IAAID,aAAe,GAC/D,EAGF,MAAM,KAAEI,GAAS,CACfA,KAAM,CAAEC,SAAU,IAAM,UAGbC,GAAa,SACxB,QAAiB,CACfC,SAAU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E,QAAQ,GACtE,CAAE,MAAOC,GAEPC,QAAQC,KAAK,qCACf,CAEArH,KAAKyG,YAAYtG,UAAY2C,CAC/B,CAEA,gBAAAuC,CAAiBiC,GACXA,EACFtH,KAAKyG,YAAYG,aAAa,QAASU,GAEvCtH,KAAKyG,YAAYI,gBAAgB,QAErC,EAGK,MAAMnF,GAAoB,SAC/B,QAAiB,CACfL,SAAU,CACRC,UAAW,CAAEH,SAAU,IAAM,QAASI,SAAU,SAChDgG,YAAa,CAAEpG,SAAU,IAAM,QAASI,SAAU,UAAWgB,SAAU,gBACvEf,cAAe,CAAEL,SAAU,IAAM,QAASI,SAAU,aACpDU,SAAU,CAAC,EACXgC,WAAY,CAAC,EACbE,WAAY,CAAC,EACbqD,eAAgB,CACd,CAAErG,SAAU,IAAM,eAAgBI,SAAU,eAC5C,CAAEJ,SAAU,IAAM,UAAWI,SAAU,gBAEzCE,UAAW,CAAEF,SAAU,SACvBqC,eAAgB,CAAErC,SAAU,eAC5BwC,UAAW,CAAC,EACZ0D,UAAW,CAAEtG,SAAU,IAAKI,SAAU,SACtCmG,mBAAoB,CAAEvG,SAAU,IAAKI,SAAU,mBAC/CoG,wBAAyB,CAAExG,SAAU,UAAWI,SAAU,mBAC1DqG,UAAW,CAAC,EACZC,SAAU,CAAC,MAGf,QAAiB,CAAEpF,uBAAuB,QAAiB,WAC3D,QAAiB,CAAEA,uBAAuB,QAAiB,UAC3D,KACA,KA1B+B,CA2B/BsC,E","sources":["webpack://@descope/web-components-ui/./src/components/descope-alert/AlertClass.js","webpack://@descope/web-components-ui/./src/components/descope-alert/index.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/consts.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/TextClass.js","webpack://@descope/web-components-ui/../components/descope-link/src/component/LinkClass.js","webpack://@descope/web-components-ui/../components/descope-link/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/EnrichedTextClass.js"],"sourcesContent":["import { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';\nimport { compose } from '../../helpers';\nimport { forwardAttrs, getComponentName } from '../../helpers/componentHelpers';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { EnrichedTextClass } from '@descope-ui/descope-enriched-text/class';\nimport { injectStyle, observeChildren, syncAttrs } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('alert');\n\nclass RawAlert extends createBaseClass({ componentName, baseSelector: ':host > div' }) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div>\n <div class=\"icon\"></div>\n <div class=\"content\">\n <descope-enriched-text>\n <slot></slot>\n </descope-enriched-text>\n </div>\n </div>\n `;\n\n injectStyle(\n `\n :host {\n display: inline-flex;\n }\n :host > div {\n display: flex;\n width: 100%;\n }\n :host([empty=\"true\"]) {\n display: none;\n }\n .icon {\n flex-shrink: 0;\n }\n .content {\n display: flex;\n flex-wrap: wrap;\n white-space: normal;\n overflow-wrap: break-word;\n }\n `,\n this\n );\n }\n\n init() {\n super.init?.();\n\n this.slotEle = this.shadowRoot.querySelector('slot');\n this.textComp = this.shadowRoot.querySelector('descope-enriched-text');\n\n this.slotEle.addEventListener('slotchange', this.handleSlotChange.bind(this));\n\n syncAttrs(this.textComp, this, { includeAttrs: ['empty'] });\n\n observeChildren(this, this.handleChildrenChange.bind(this));\n\n forwardAttrs(this, this.textComp, {\n includeAttrs: ['variant', 'full-width', 'link-target-blank'],\n });\n }\n\n handleChildrenChange() {\n this.textComp.textContent = this.textContent;\n }\n\n handleSlotChange() {\n const assignedNodes = this.slotEle.assignedNodes({ flatten: true });\n if (!assignedNodes.length) return;\n this.textComp.textContent = assignedNodes[0]?.textContent || '';\n }\n}\n\nconst { icon } = {\n icon: { selector: () => '.icon' },\n};\n\nexport const AlertClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostDirection: { selector: () => ':host', property: 'direction' },\n textColor: {\n selector: EnrichedTextClass.componentName,\n property: EnrichedTextClass.cssVarList.textColor,\n },\n backgroundColor: {},\n borderColor: {},\n borderWidth: {},\n borderStyle: {},\n borderRadius: {},\n fontSize: [\n {},\n {\n selector: EnrichedTextClass.componentName,\n property: EnrichedTextClass.cssVarList.fontSize,\n },\n ],\n gap: {},\n horizontalPadding: [{ property: 'padding-top' }, { property: 'padding-bottom' }],\n verticalPadding: [{ property: 'padding-right' }, { property: 'padding-left' }],\n alignItems: {},\n justifyContent: {},\n icon: [\n { ...icon, property: 'content' },\n { ...icon, property: 'display', fallback: 'none' },\n ],\n iconSize: [\n { ...icon, property: 'width' },\n { ...icon, property: 'height' },\n ],\n },\n }),\n createStyleMixin({ componentNameOverride: getComponentName('enriched-text') }),\n createStyleMixin({ componentNameOverride: getComponentName('text') }),\n draggableMixin,\n componentNameValidationMixin\n)(RawAlert);\n","import '@descope-ui/descope-enriched-text';\nimport { componentName, AlertClass } from './AlertClass';\n\ncustomElements.define(componentName, AlertClass);\n\nexport { AlertClass, componentName };\n","export const disableRules = [\n 'blockquote',\n 'list',\n 'image',\n 'table',\n 'code',\n 'hr',\n 'backticks',\n 'fence',\n 'reference',\n 'heading',\n 'lheading',\n 'html_block',\n];\n","export const decodeHTML = (html) => {\n const textArea = document.createElement('textarea');\n textArea.innerHTML = html;\n return textArea.value;\n};\n","import '@descope-ui/descope-link';\n\nimport { componentName, EnrichedTextClass } from './EnrichedTextClass';\n\ncustomElements.define(componentName, EnrichedTextClass);\n\nexport { EnrichedTextClass, componentName };\n","import { componentName, TextClass } from './TextClass';\n\ncustomElements.define(componentName, TextClass);\n\nexport { TextClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n injectStyle,\n observeChildren,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\n\nexport const componentName = getComponentName('text');\n\nclass RawText extends createBaseClass({\n componentName,\n baseSelector: ':host > slot',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <slot part=\"text-wrapper\"></slot>\n `;\n\n injectStyle(`\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n `, this);\n }\n\n get hideWhenEmpty() {\n return this.getAttribute('hide-when-empty') === 'true';\n }\n\n init() {\n super.init();\n\n observeChildren(this, () => {\n const hasChildren = !!this.childNodes.length;\n this.style.display = !hasChildren && this.hideWhenEmpty ? 'none' : '';\n });\n }\n}\n\nconst { host } = {\n host: { selector: () => ':host' }\n}\n\nexport const TextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostDirection: { selector: () => ':host', property: 'direction' },\n fontSize: {},\n textColor: [\n { property: 'color' }\n ],\n textLineHeight: { property: 'line-height' },\n textLetterSpacing: { property: 'letter-spacing' },\n textShadow: {},\n textAlign: {},\n textTransform: {},\n fontFamily: {},\n fontStyle: {},\n fontWeight: {},\n borderWidth: {},\n borderStyle: {},\n borderColor: {},\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawText);\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n forwardAttrs,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { TextClass } from '@descope-ui/descope-text/class';\n\nexport const componentName = getComponentName('link');\n\nclass RawLink extends createBaseClass({ componentName, baseSelector: ':host a' }) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<div>\n\t\t\t<descope-text>\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n\t\t\tdisplay: inline-block;\n line-height: 1em;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t}\n `,\n this\n );\n\n forwardAttrs(this, this.shadowRoot.querySelector('a'), {\n includeAttrs: ['href', 'target', 'tooltip'],\n mapAttrs: {\n tooltip: 'title',\n },\n });\n\n forwardAttrs(this, this.shadowRoot.querySelector('descope-text'), {\n includeAttrs: ['mode', 'variant'],\n });\n }\n}\n\nconst selectors = {\n host: { selector: () => ':host' },\n link: { selector: () => ':host a' },\n anchor: {},\n wrapper: { selector: () => ':host > div' },\n text: { selector: () => TextClass.componentName },\n};\n\nconst { anchor, text, host, wrapper, link } = selectors;\n\nexport const LinkClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...text, property: 'direction' },\n textAlign: wrapper,\n textDecoration: { ...link, property: 'text-decoration', fallback: 'none' },\n textColor: [\n { ...anchor, property: 'color' },\n { ...text, property: TextClass.cssVarList.textColor },\n ],\n cursor: anchor,\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawLink);\n","import { componentName, LinkClass } from './LinkClass';\nimport '@descope-ui/descope-text';\n\ncustomElements.define(componentName, LinkClass);\n\nexport { LinkClass, componentName };\n","/* eslint-disable no-param-reassign */\n\nimport MarkdownIt from 'markdown-it';\nimport { createStyleMixin, draggableMixin, componentNameValidationMixin } from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport { disableRules } from './consts';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { decodeHTML } from './helpers';\nimport { getComponentName, injectStyle, observeChildren } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('enriched-text');\n\nclass EnrichedText extends createBaseClass({ componentName, baseSelector: ':host > div' }) {\n #origLinkRenderer;\n\n #origEmRenderer;\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"content\"></div>\n `;\n\n injectStyle(\n `\n :host {\n line-height: 1em;\n word-break: break-word;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n cursor: pointer;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n `,\n this\n );\n\n this.#initProcessor();\n\n observeChildren(this, this.#parseChildren.bind(this));\n }\n\n static get observedAttributes() {\n return ['readonly', 'link-target-blank'];\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (newValue !== oldValue) {\n if (attrName === 'readonly') {\n this.onReadOnlyChange(newValue === 'true');\n }\n\n if (attrName === 'link-target-blank') {\n this.#initProcessor();\n }\n }\n }\n\n // We're overriding the rule for em with single underscore to perform as underline. (_underline_)\n customUnderlineRenderer() {\n this.processor.renderer.rules.em_open = (tokens, idx, options, env, self) => {\n if (tokens[idx].markup === '_') tokens[idx].tag = 'u';\n return this.#origEmRenderer(tokens, idx, options, env, self);\n };\n this.processor.renderer.rules.em_close = (tokens, idx, options, env, self) => {\n if (tokens[idx].markup === '_') tokens[idx].tag = 'u';\n return this.#origEmRenderer(tokens, idx, options, env, self);\n };\n }\n\n #customizeLinkRenderer() {\n if (this.linkTargetBlank) {\n this.processor.renderer.rules.link_open = (tokens, idx, options, env, self) => {\n // Add a new `target` attribute, or replace the value of the existing one.\n tokens[idx].attrSet('target', '_blank');\n // Pass the token to the default renderer.\n return this.#origLinkRenderer(tokens, idx, options, env, self);\n };\n } else {\n this.processor.renderer.rules.link_open = this.#origLinkRenderer;\n }\n }\n\n #disableCustomRules() {\n if (!this.processor) {\n return;\n }\n this.processor.disable(disableRules);\n }\n\n #updateProcessorRules() {\n this.#disableCustomRules();\n }\n\n #storeOrigRenderers() {\n const defaultLinkRenderer = (tokens, idx, options, _, self) =>\n self.renderToken(tokens, idx, options);\n this.#origLinkRenderer = this.processor.renderer.rules.link_open || defaultLinkRenderer;\n\n const defaultStrongRenderer = (tokens, idx, options, _, self) =>\n self.renderToken(tokens, idx, options);\n this.#origEmRenderer = this.processor.renderer.rules.em_open || defaultStrongRenderer;\n }\n\n #initProcessor() {\n this.processor = new MarkdownIt('commonmark', { html: true });\n this.#storeOrigRenderers();\n this.#updateProcessorRules();\n this.#customizeLinkRenderer();\n this.customUnderlineRenderer();\n }\n\n get linkTargetBlank() {\n return this.getAttribute('link-target-blank') === 'true';\n }\n\n get contentNode() {\n return this.shadowRoot.querySelector('.content');\n }\n\n #parseChildren() {\n if (!this.processor) {\n return;\n }\n\n let html = decodeHTML(this.innerHTML);\n\n if (!html?.trim() && this.isConnected) {\n this.setAttribute('empty', 'true');\n } else {\n this.removeAttribute('empty');\n }\n\n try {\n const tokens = this.processor.parse(html, { references: undefined });\n html = this.processor.renderer.render(tokens, { html: true, breaks: true });\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn('Not parsing invalid markdown token');\n }\n\n this.contentNode.innerHTML = html;\n }\n\n onReadOnlyChange(isReadOnly) {\n if (isReadOnly) {\n this.contentNode.setAttribute('inert', isReadOnly);\n } else {\n this.contentNode.removeAttribute('inert');\n }\n }\n}\n\nexport const EnrichedTextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostDisplay: { selector: () => ':host', property: 'display', fallback: 'inline-block' },\n hostDirection: { selector: () => ':host', property: 'direction' },\n fontSize: {},\n fontFamily: {},\n fontWeight: {},\n fontWeightBold: [\n { selector: () => ':host strong', property: 'font-weight' },\n { selector: () => ':host b', property: 'font-weight' },\n ],\n textColor: { property: 'color' },\n textLineHeight: { property: 'line-height' },\n textAlign: {},\n linkColor: { selector: 'a', property: 'color' },\n linkTextDecoration: { selector: 'a', property: 'text-decoration' },\n linkHoverTextDecoration: { selector: 'a:hover', property: 'text-decoration' },\n minHeight: {},\n minWidth: {},\n },\n }),\n createStyleMixin({ componentNameOverride: getComponentName('link') }),\n createStyleMixin({ componentNameOverride: getComponentName('text') }),\n draggableMixin,\n componentNameValidationMixin\n)(EnrichedText);\n"],"names":["componentName","RawAlert","createBaseClass","baseSelector","constructor","super","this","attachShadow","mode","innerHTML","init","slotEle","shadowRoot","querySelector","textComp","addEventListener","handleSlotChange","bind","includeAttrs","handleChildrenChange","textContent","assignedNodes","flatten","length","icon","selector","AlertClass","mappings","hostWidth","property","hostDirection","textColor","EnrichedTextClass","cssVarList","backgroundColor","borderColor","borderWidth","borderStyle","borderRadius","fontSize","gap","horizontalPadding","verticalPadding","alignItems","justifyContent","fallback","iconSize","componentNameOverride","customElements","define","disableRules","decodeHTML","html","textArea","document","createElement","value","RawText","hideWhenEmpty","getAttribute","hasChildren","childNodes","style","display","host","TextClass","textLineHeight","textLetterSpacing","textShadow","textAlign","textTransform","fontFamily","fontStyle","fontWeight","RawLink","mapAttrs","tooltip","selectors","link","anchor","wrapper","text","LinkClass","textDecoration","cursor","EnrichedText","observedAttributes","attributeChangedCallback","attrName","oldValue","newValue","onReadOnlyChange","customUnderlineRenderer","processor","renderer","rules","em_open","tokens","idx","options","env","self","markup","tag","em_close","linkTargetBlank","link_open","attrSet","disable","_","renderToken","contentNode","trim","isConnected","setAttribute","removeAttribute","parse","references","undefined","render","breaks","e","console","warn","isReadOnly","hostDisplay","fontWeightBold","linkColor","linkTextDecoration","linkHoverTextDecoration","minHeight","minWidth"],"sourceRoot":""}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2294,4159,9261],{36976:(e,t,r)=>{r.d(t,{M:()=>o});const o=["blockquote","list","image","table","code","hr","backticks","fence","reference","heading","lheading","html_block"]},54847:(e,t,r)=>{r.d(t,{G:()=>o});const o=e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value}},55838:(e,t,r)=>{r.r(t),r.d(t,{EnrichedTextClass:()=>o.m,componentName:()=>o.T}),r(74778);var o=r(76231);customElements.define(o.T,o.m)},63595:(e,t,r)=>{r.r(t),r.d(t,{TextClass:()=>o.s,componentName:()=>o.T});var o=r(66434);customElements.define(o.T,o.s)},66434:(e,t,r)=>{r.d(t,{T:()=>l,s:()=>a});var o=r(88961),n=r(63200),s=r(25964),i=r(72270);const l=(0,s.xE)("text");class h extends((0,i.qu)({componentName:l,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <slot part="text-wrapper"></slot>\n ',(0,s.fz)("\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n ",this)}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,s.Ge)(this,(()=>{const e=!!this.childNodes.length;this.style.display=!e&&this.hideWhenEmpty?"none":""}))}}const{host:c}={host:{selector:()=>":host"}},a=(0,n.Zz)((0,o.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},textColor:[{property:"color"}],textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),o.VO,o.tQ)(h)},74778:(e,t,r)=>{r.r(t),r.d(t,{LinkClass:()=>k,componentName:()=>h});var o=r(88961),n=r(63200),s=r(25964),i=r(72270),l=r(66434);const h=(0,s.xE)("link");class c extends((0,i.qu)({componentName:h,baseSelector:":host a"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<div>\n\t\t\t<descope-text>\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t",(0,s.fz)("\n :host {\n\t\t\tdisplay: inline-block;\n line-height: 1em;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t}\n ",this),(0,s.EA)(this,this.shadowRoot.querySelector("a"),{includeAttrs:["href","target","tooltip"],mapAttrs:{tooltip:"title"}}),(0,s.EA)(this,this.shadowRoot.querySelector("descope-text"),{includeAttrs:["mode","variant"]})}}const a={host:{selector:()=>":host"},link:{selector:()=>":host a"},anchor:{},wrapper:{selector:()=>":host > div"},text:{selector:()=>l.s.componentName}},{anchor:d,text:p,host:m,wrapper:u,link:g}=a,k=(0,n.Zz)((0,o.RF)({mappings:{hostWidth:{...m,property:"width"},hostDirection:{...p,property:"direction"},textAlign:u,textDecoration:{...g,property:"text-decoration",fallback:"none"},textColor:[{...d,property:"color"},{...p,property:l.s.cssVarList.textColor}],cursor:d}}),o.VO,o.tQ)(c);r(63595),customElements.define(h,k)},76231:(e,t,r)=>{r.d(t,{T:()=>a,m:()=>p});var o=r(92540),n=r(88961),s=r(63200),i=r(36976),l=r(72270),h=r(54847),c=r(25964);const a=(0,c.xE)("enriched-text");class d extends((0,l.qu)({componentName:a,baseSelector:":host > div"})){#e;#t;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="content"></div>\n ',(0,c.fz)("\n :host {\n line-height: 1em;\n word-break: break-word;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n cursor: pointer;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n ",this),this.#r(),(0,c.Ge)(this,this.#o.bind(this))}static get observedAttributes(){return["readonly","link-target-blank"]}attributeChangedCallback(e,t,r){super.attributeChangedCallback?.(e,t,r),r!==t&&("readonly"===e&&this.onReadOnlyChange("true"===r),"link-target-blank"===e&&this.#r())}customUnderlineRenderer(){this.processor.renderer.rules.em_open=(e,t,r,o,n)=>("_"===e[t].markup&&(e[t].tag="u"),this.#t(e,t,r,o,n)),this.processor.renderer.rules.em_close=(e,t,r,o,n)=>("_"===e[t].markup&&(e[t].tag="u"),this.#t(e,t,r,o,n))}#n(){this.linkTargetBlank?this.processor.renderer.rules.link_open=(e,t,r,o,n)=>(e[t].attrSet("target","_blank"),this.#e(e,t,r,o,n)):this.processor.renderer.rules.link_open=this.#e}#s(){this.processor&&this.processor.disable(i.M)}#i(){this.#s()}#l(){this.#e=this.processor.renderer.rules.link_open||((e,t,r,o,n)=>n.renderToken(e,t,r)),this.#t=this.processor.renderer.rules.em_open||((e,t,r,o,n)=>n.renderToken(e,t,r))}#r(){this.processor=new o.A("commonmark",{html:!0}),this.#l(),this.#i(),this.#n(),this.customUnderlineRenderer()}get linkTargetBlank(){return"true"===this.getAttribute("link-target-blank")}get contentNode(){return this.shadowRoot.querySelector(".content")}#o(){if(!this.processor)return;let e=(0,h.G)(this.innerHTML);!e?.trim()&&this.isConnected?this.setAttribute("empty","true"):this.removeAttribute("empty");try{const t=this.processor.parse(e,{references:void 0});e=this.processor.renderer.render(t,{html:!0,breaks:!0})}catch(e){console.warn("Not parsing invalid markdown token")}this.contentNode.innerHTML=e}onReadOnlyChange(e){e?this.contentNode.setAttribute("inert",e):this.contentNode.removeAttribute("inert")}}const p=(0,s.Zz)((0,n.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDisplay:{selector:()=>":host",property:"display",fallback:"inline-block"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},fontWeightBold:[{selector:()=>":host strong",property:"font-weight"},{selector:()=>":host b",property:"font-weight"}],textColor:{property:"color"},textLineHeight:{property:"line-height"},textAlign:{},linkColor:{selector:"a",property:"color"},linkTextDecoration:{selector:"a",property:"text-decoration"},linkHoverTextDecoration:{selector:"a:hover",property:"text-decoration"},minHeight:{},minWidth:{}}}),(0,n.RF)({componentNameOverride:(0,c.xE)("link")}),(0,n.RF)({componentNameOverride:(0,c.xE)("text")}),n.VO,n.tQ)(d)}}]);
|
2
|
+
//# sourceMappingURL=descope-enriched-text.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"descope-enriched-text.js","mappings":"oKAAO,MAAMA,EAAe,CAC1B,aACA,OACA,QACA,QACA,OACA,KACA,YACA,QACA,YACA,UACA,WACA,a,mCCZK,MAAMC,EAAcC,IACzB,MAAMC,EAAWC,SAASC,cAAc,YAExC,OADAF,EAASG,UAAYJ,EACdC,EAASI,KAAK,C,0GCCvBC,eAAeC,OAAO,IAAe,I,yFCFrCD,eAAeC,OAAO,IAAe,I,2FCW9B,MAAMC,GAAgB,QAAiB,QAE9C,MAAMC,WAAgB,QAAgB,CACpCD,gBACAE,aAAc,kBAEd,WAAAC,GACEC,QAEAC,KAAKC,aAAa,CAAEC,KAAM,SAAUX,UAAY,iDAIhD,QAAY,iLASTS,KACL,CAEA,iBAAIG,GACF,MAAgD,SAAzCH,KAAKI,aAAa,kBAC3B,CAEA,IAAAC,GACEN,MAAMM,QAEN,QAAgBL,MAAM,KACpB,MAAMM,IAAgBN,KAAKO,WAAWC,OACtCR,KAAKS,MAAMC,SAAWJ,GAAeN,KAAKG,cAAgB,OAAS,EAAE,GAEzE,EAGF,MAAM,KAAEQ,GAAS,CACfA,KAAM,CAAEC,SAAU,IAAM,UAGbC,GAAY,SACvB,QAAiB,CACfC,SAAU,CACRC,UAAW,CAAEH,SAAU,IAAM,QAASI,SAAU,SAChDC,cAAe,CAAEL,SAAU,IAAM,QAASI,SAAU,aACpDE,SAAU,CAAC,EACXC,UAAW,CACT,CAAEH,SAAU,UAEdI,eAAgB,CAAEJ,SAAU,eAC5BK,kBAAmB,CAAEL,SAAU,kBAC/BM,WAAY,CAAC,EACbC,UAAW,CAAC,EACZC,cAAe,CAAC,EAChBC,WAAY,CAAC,EACbC,UAAW,CAAC,EACZC,WAAY,CAAC,EACbC,YAAa,CAAC,EACdC,YAAa,CAAC,EACdC,YAA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SAAU,mBAC/C6E,wBAAyB,CAAEjF,SAAU,UAAWI,SAAU,mBAC1D8E,UAAW,CAAC,EACZC,SAAU,CAAC,MAGf,QAAiB,CAAEC,uBAAuB,QAAiB,WAC3D,QAAiB,CAAEA,uBAAuB,QAAiB,UAC3D,KACA,KA1B+B,CA2B/BjD,E","sources":["webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/consts.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/TextClass.js","webpack://@descope/web-components-ui/../components/descope-link/src/component/LinkClass.js","webpack://@descope/web-components-ui/../components/descope-link/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/EnrichedTextClass.js"],"sourcesContent":["export const disableRules = [\n 'blockquote',\n 'list',\n 'image',\n 'table',\n 'code',\n 'hr',\n 'backticks',\n 'fence',\n 'reference',\n 'heading',\n 'lheading',\n 'html_block',\n];\n","export const decodeHTML = (html) => {\n const textArea = document.createElement('textarea');\n textArea.innerHTML = html;\n return textArea.value;\n};\n","import '@descope-ui/descope-link';\n\nimport { componentName, EnrichedTextClass } from './EnrichedTextClass';\n\ncustomElements.define(componentName, EnrichedTextClass);\n\nexport { EnrichedTextClass, componentName };\n","import { componentName, TextClass } from './TextClass';\n\ncustomElements.define(componentName, TextClass);\n\nexport { TextClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n injectStyle,\n observeChildren,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\n\nexport const componentName = getComponentName('text');\n\nclass RawText extends createBaseClass({\n componentName,\n baseSelector: ':host > slot',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <slot part=\"text-wrapper\"></slot>\n `;\n\n injectStyle(`\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n `, this);\n }\n\n get hideWhenEmpty() {\n return this.getAttribute('hide-when-empty') === 'true';\n }\n\n init() {\n super.init();\n\n observeChildren(this, () => {\n const hasChildren = !!this.childNodes.length;\n this.style.display = !hasChildren && this.hideWhenEmpty ? 'none' : '';\n });\n }\n}\n\nconst { host } = {\n host: { selector: () => ':host' }\n}\n\nexport const TextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostDirection: { selector: () => ':host', property: 'direction' },\n fontSize: {},\n textColor: [\n { property: 'color' }\n ],\n textLineHeight: { property: 'line-height' },\n textLetterSpacing: { property: 'letter-spacing' },\n textShadow: {},\n textAlign: {},\n textTransform: {},\n fontFamily: {},\n fontStyle: {},\n fontWeight: {},\n borderWidth: {},\n borderStyle: {},\n borderColor: {},\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawText);\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n forwardAttrs,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { TextClass } from '@descope-ui/descope-text/class';\n\nexport const componentName = getComponentName('link');\n\nclass RawLink extends createBaseClass({ componentName, baseSelector: ':host a' }) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<div>\n\t\t\t<descope-text>\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n\t\t\tdisplay: inline-block;\n line-height: 1em;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t}\n `,\n this\n );\n\n forwardAttrs(this, this.shadowRoot.querySelector('a'), {\n includeAttrs: ['href', 'target', 'tooltip'],\n mapAttrs: {\n tooltip: 'title',\n },\n });\n\n forwardAttrs(this, this.shadowRoot.querySelector('descope-text'), {\n includeAttrs: ['mode', 'variant'],\n });\n }\n}\n\nconst selectors = {\n host: { selector: () => ':host' },\n link: { selector: () => ':host a' },\n anchor: {},\n wrapper: { selector: () => ':host > div' },\n text: { selector: () => TextClass.componentName },\n};\n\nconst { anchor, text, host, wrapper, link } = selectors;\n\nexport const LinkClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...text, property: 'direction' },\n textAlign: wrapper,\n textDecoration: { ...link, property: 'text-decoration', fallback: 'none' },\n textColor: [\n { ...anchor, property: 'color' },\n { ...text, property: TextClass.cssVarList.textColor },\n ],\n cursor: anchor,\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawLink);\n","import { componentName, LinkClass } from './LinkClass';\nimport '@descope-ui/descope-text';\n\ncustomElements.define(componentName, LinkClass);\n\nexport { LinkClass, componentName };\n","/* eslint-disable no-param-reassign */\n\nimport MarkdownIt from 'markdown-it';\nimport { createStyleMixin, draggableMixin, componentNameValidationMixin } from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport { disableRules } from './consts';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { decodeHTML } from './helpers';\nimport { getComponentName, injectStyle, observeChildren } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('enriched-text');\n\nclass EnrichedText extends createBaseClass({ componentName, baseSelector: ':host > div' }) {\n #origLinkRenderer;\n\n #origEmRenderer;\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"content\"></div>\n `;\n\n injectStyle(\n `\n :host {\n line-height: 1em;\n word-break: break-word;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n cursor: pointer;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n `,\n this\n );\n\n this.#initProcessor();\n\n observeChildren(this, this.#parseChildren.bind(this));\n }\n\n static get observedAttributes() {\n return ['readonly', 'link-target-blank'];\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (newValue !== oldValue) {\n if (attrName === 'readonly') {\n this.onReadOnlyChange(newValue === 'true');\n }\n\n if (attrName === 'link-target-blank') {\n this.#initProcessor();\n }\n }\n }\n\n // We're overriding the rule for em with single underscore to perform as underline. (_underline_)\n customUnderlineRenderer() {\n this.processor.renderer.rules.em_open = (tokens, idx, options, env, self) => {\n if (tokens[idx].markup === '_') tokens[idx].tag = 'u';\n return this.#origEmRenderer(tokens, idx, options, env, self);\n };\n this.processor.renderer.rules.em_close = (tokens, idx, options, env, self) => {\n if (tokens[idx].markup === '_') tokens[idx].tag = 'u';\n return this.#origEmRenderer(tokens, idx, options, env, self);\n };\n }\n\n #customizeLinkRenderer() {\n if (this.linkTargetBlank) {\n this.processor.renderer.rules.link_open = (tokens, idx, options, env, self) => {\n // Add a new `target` attribute, or replace the value of the existing one.\n tokens[idx].attrSet('target', '_blank');\n // Pass the token to the default renderer.\n return this.#origLinkRenderer(tokens, idx, options, env, self);\n };\n } else {\n this.processor.renderer.rules.link_open = this.#origLinkRenderer;\n }\n }\n\n #disableCustomRules() {\n if (!this.processor) {\n return;\n }\n this.processor.disable(disableRules);\n }\n\n #updateProcessorRules() {\n this.#disableCustomRules();\n }\n\n #storeOrigRenderers() {\n const defaultLinkRenderer = (tokens, idx, options, _, self) =>\n self.renderToken(tokens, idx, options);\n this.#origLinkRenderer = this.processor.renderer.rules.link_open || defaultLinkRenderer;\n\n const defaultStrongRenderer = (tokens, idx, options, _, self) =>\n self.renderToken(tokens, idx, options);\n this.#origEmRenderer = this.processor.renderer.rules.em_open || defaultStrongRenderer;\n }\n\n #initProcessor() {\n this.processor = new MarkdownIt('commonmark', { html: true });\n this.#storeOrigRenderers();\n this.#updateProcessorRules();\n this.#customizeLinkRenderer();\n this.customUnderlineRenderer();\n }\n\n get linkTargetBlank() {\n return this.getAttribute('link-target-blank') === 'true';\n }\n\n get contentNode() {\n return this.shadowRoot.querySelector('.content');\n }\n\n #parseChildren() {\n if (!this.processor) {\n return;\n }\n\n let html = decodeHTML(this.innerHTML);\n\n if (!html?.trim() && this.isConnected) {\n this.setAttribute('empty', 'true');\n } else {\n this.removeAttribute('empty');\n }\n\n try {\n const tokens = this.processor.parse(html, { references: undefined });\n html = this.processor.renderer.render(tokens, { html: true, breaks: true });\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn('Not parsing invalid markdown token');\n }\n\n this.contentNode.innerHTML = html;\n }\n\n onReadOnlyChange(isReadOnly) {\n if (isReadOnly) {\n this.contentNode.setAttribute('inert', isReadOnly);\n } else {\n this.contentNode.removeAttribute('inert');\n }\n }\n}\n\nexport const EnrichedTextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostDisplay: { selector: () => ':host', property: 'display', fallback: 'inline-block' },\n hostDirection: { selector: () => ':host', property: 'direction' },\n fontSize: {},\n fontFamily: {},\n fontWeight: {},\n fontWeightBold: [\n { selector: () => ':host strong', property: 'font-weight' },\n { selector: () => ':host b', property: 'font-weight' },\n ],\n textColor: { property: 'color' },\n textLineHeight: { property: 'line-height' },\n textAlign: {},\n linkColor: { selector: 'a', property: 'color' },\n linkTextDecoration: { selector: 'a', property: 'text-decoration' },\n linkHoverTextDecoration: { selector: 'a:hover', property: 'text-decoration' },\n minHeight: {},\n minWidth: {},\n },\n }),\n createStyleMixin({ componentNameOverride: getComponentName('link') }),\n createStyleMixin({ componentNameOverride: getComponentName('text') }),\n draggableMixin,\n componentNameValidationMixin\n)(EnrichedText);\n"],"names":["disableRules","decodeHTML","html","textArea","document","createElement","innerHTML","value","customElements","define","componentName","RawText","baseSelector","constructor","super","this","attachShadow","mode","hideWhenEmpty","getAttribute","init","hasChildren","childNodes","length","style","display","host","selector","TextClass","mappings","hostWidth","property","hostDirection","fontSize","textColor","textLineHeight","textLetterSpacing","textShadow","textAlign","textTransform","fontFamily","fontStyle","fontWeight","borderWidth","borderStyle","borderColor","RawLink","shadowRoot","querySelector","includeAttrs","mapAttrs","tooltip","selectors","link","anchor","wrapper","text","LinkClass","textDecoration","fallback","cssVarList","cursor","EnrichedText","bind","observedAttributes","attributeChangedCallback","attrName","oldValue","newValue","onReadOnlyChange","customUnderlineRenderer","processor","renderer","rules","em_open","tokens","idx","options","env","self","markup","tag","em_close","linkTargetBlank","link_open","attrSet","disable","_","renderToken","contentNode","trim","isConnected","setAttribute","removeAttribute","parse","references","undefined","render","breaks","e","console","warn","isReadOnly","EnrichedTextClass","hostDisplay","fontWeightBold","linkColor","linkTextDecoration","linkHoverTextDecoration","minHeight","minWidth","componentNameOverride"],"sourceRoot":""}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[7470],{3393:(t,e,i)=>{i.d(e,{y:()=>s});var a=i(9696),n=i(79365),h=i(81365);const s=(...t)=>(0,a.Zz)(n.XX,n._$,n.yF,n.jd)((0,h.q)(...t))},24011:(t,e,i)=>{i.r(e),i.d(e,{HcaptchaClass:()=>l,componentName:()=>c});var a=i(25964),n=i(79365),h=i(3393),s=i(9696);const c=(0,i(97810).xE)("hcaptcha"),o=["enabled","site-key"],p=(0,h.y)({componentName:c,baseSelector:":host > div"}),l=(0,s.Zz)((0,n.RF)({mappings:{hostWidth:[{selector:()=>":host",property:"width"}],hostDirection:{property:"direction"},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-left"},{property:"padding-right"}],maxHeight:[{selector:">img",property:"height"},{selector:">#hcaptcha",property:"height"}],maxWidth:[{selector:">img",property:"max-width"},{selector:">hcaptcha",property:"max-width"}]}}),n.VO,n.tQ)(class extends p{static get observedAttributes(){return o.concat(p.observedAttributes||[])}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),e!==i&&"enabled"===t&&this.toggleCaptchaEles("true"===i)}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="badge">\n <span id="hcaptcha"></span>\n <input id="hcaptcha-input" type="hidden" name="hcaptcha" required />\n <img src="https://imgs.descope.com/connectors/templates/hcaptcha/hcaptcha-big.png" alt="hcaptcha"/>\n </div>\n <slot></slot>\n\t',(0,a.fz)("\n :host {\n display: inline-flex;\n }\n :host > div:not(.hidden) {\n display: flex;\n }\n :host #hcaptcha-input {\n display: none;\n }\n :host #hcaptcha .hcaptcha-logo {\n height: 100%;\n }\n :host #hcaptcha {\n\t\t\t\twidth: 100%;\n height: 100%;\n\t\t\t}\n :host img {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n }\n .hidden {\n display: none;\n }\n ",this),this.captchaEle=this.shadowRoot.querySelector("#hcaptcha"),this.mockCaptchaEle=this.shadowRoot.querySelector("img"),this.badge=this.shadowRoot.querySelector(".badge"),this.inputElement=this.shadowRoot.querySelector("input")}init(){super.init?.(),(0,a.Ge)(this,this.updatePreview.bind(this)),this.inputElement.getValidity=null,this.inputElement.checkValidity=null}toggleCaptchaEles(t){t?(this.captchaEle.style.display="",this.mockCaptchaEle.style.display="none"):(this.captchaEle.style.display="none",this.mockCaptchaEle.style.display="")}updatePreview(){this.toggleCaptchaEles(this.enabled)}getValidity(){return this.inputElement.value?{}:{valueMissing:!0}}checkValidity(){return!!this.inputElement.value}get siteKey(){return this.getAttribute("site-key")}get enabled(){return"true"===this.getAttribute("enabled")}});customElements.define(c,l)}}]);
|
2
|
+
//# sourceMappingURL=descope-hcaptcha-index-js.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"descope-hca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aAAaK,cAAgB,IACpC,CAEA,iBAAAf,CAAkBgB,GACZA,GACFjB,KAAKM,WAAWY,MAAMC,QAAU,GAChCnB,KAAKS,eAAeS,MAAMC,QAAU,SAEpCnB,KAAKM,WAAWY,MAAMC,QAAU,OAChCnB,KAAKS,eAAeS,MAAMC,QAAU,GAExC,CAEA,aAAAN,GACEb,KAAKC,kBAAkBD,KAAKiB,QAC9B,CAEA,WAAAF,GACE,OAAKf,KAAKW,aAAaS,MAIhB,CAAC,EAHC,CAAEC,cAAc,EAI3B,CAEA,aAAAL,GACE,QAAShB,KAAKW,aAAaS,KAC7B,CAEA,WAAIE,GACF,OAAOtB,KAAKuB,aAAa,WAC3B,CAEA,WAAIN,GACF,MAAwC,SAAjCjB,KAAKuB,aAAa,UAC3B,IChHFC,eAAeC,OAAO7C,EAAeI,E","sources":["webpack://@descope/web-components-ui/./src/baseClasses/createBaseInputClass.js","webpack://@descope/web-components-ui/./src/components/descope-hcaptcha/HcaptchaClass.js","webpack://@descope/web-components-ui/./src/components/descope-hcaptcha/index.js"],"sourcesContent":["import { compose } from '../helpers';\nimport {\n changeMixin,\n inputEventsDispatchingMixin,\n inputValidationMixin,\n normalizeBooleanAttributesMixin,\n} from '../mixins';\nimport { createBaseClass } from './createBaseClass';\n\nexport const createBaseInputClass = (...args) =>\n compose(\n inputValidationMixin,\n changeMixin,\n normalizeBooleanAttributesMixin,\n inputEventsDispatchingMixin\n )(createBaseClass(...args));\n","import { injectStyle, observeChildren } from '@descope-ui/common/components-helpers';\nimport { draggableMixin, createStyleMixin, componentNameValidationMixin } from '../../mixins';\nimport { createBaseInputClass } from '../../baseClasses/createBaseInputClass';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\n\nexport const componentName = getComponentName('hcaptcha');\n\nconst observedAttributes = ['enabled', 'site-key'];\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: ':host > div' });\nclass RawHcaptcha extends BaseInputClass {\n static get observedAttributes() {\n return observedAttributes.concat(BaseInputClass.observedAttributes || []);\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n if (oldValue !== newValue) {\n if (attrName === 'enabled') {\n this.toggleCaptchaEles(newValue === 'true');\n }\n }\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"badge\">\n <span id=\"hcaptcha\"></span>\n <input id=\"hcaptcha-input\" type=\"hidden\" name=\"hcaptcha\" required />\n <img src=\"https://imgs.descope.com/connectors/templates/hcaptcha/hcaptcha-big.png\" alt=\"hcaptcha\"/>\n </div>\n <slot></slot>\n\t`;\n\n injectStyle(\n `\n :host {\n display: inline-flex;\n }\n :host > div:not(.hidden) {\n display: flex;\n }\n :host #hcaptcha-input {\n display: none;\n }\n :host #hcaptcha .hcaptcha-logo {\n height: 100%;\n }\n :host #hcaptcha {\n\t\t\t\twidth: 100%;\n height: 100%;\n\t\t\t}\n :host img {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n }\n .hidden {\n display: none;\n }\n `,\n this\n );\n\n this.captchaEle = this.shadowRoot.querySelector('#hcaptcha');\n this.mockCaptchaEle = this.shadowRoot.querySelector('img');\n this.badge = this.shadowRoot.querySelector('.badge');\n this.inputElement = this.shadowRoot.querySelector('input');\n }\n\n init() {\n super.init?.();\n\n observeChildren(this, this.updatePreview.bind(this));\n // avoid any possible conflicts with the inner input elements\n this.inputElement.getValidity = null;\n this.inputElement.checkValidity = null;\n }\n\n toggleCaptchaEles(enabled) {\n if (enabled) {\n this.captchaEle.style.display = '';\n this.mockCaptchaEle.style.display = 'none';\n } else {\n this.captchaEle.style.display = 'none';\n this.mockCaptchaEle.style.display = '';\n }\n }\n\n updatePreview() {\n this.toggleCaptchaEles(this.enabled);\n }\n\n getValidity() {\n if (!this.inputElement.value) {\n return { valueMissing: true };\n }\n\n return {};\n }\n\n checkValidity() {\n return !!this.inputElement.value;\n }\n\n get siteKey() {\n return this.getAttribute('site-key');\n }\n\n get enabled() {\n return this.getAttribute('enabled') === 'true';\n }\n}\n\nexport const HcaptchaClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: [{ selector: () => ':host', property: 'width' }],\n hostDirection: { property: 'direction' },\n verticalPadding: [{ property: 'padding-top' }, { property: 'padding-bottom' }],\n horizontalPadding: [{ property: 'padding-left' }, { property: 'padding-right' }],\n maxHeight: [\n { selector: '>img', property: 'height' },\n { selector: '>#hcaptcha', property: 'height' },\n ],\n maxWidth: [\n { selector: '>img', property: 'max-width' },\n { selector: '>hcaptcha', property: 'max-width' },\n ],\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawHcaptcha);\n","import { componentName, HcaptchaClass } from './HcaptchaClass';\n\ncustomElements.define(componentName, HcaptchaClass);\n\nexport { HcaptchaClass, componentName };\n"],"names":["createBaseInputClass","args","componentName","observedAttributes","BaseInputClass","baseSelector","HcaptchaClass","mappings","hostWidth","selector","property","hostDirection","verticalPadding","horizontalPadding","maxHeight","maxWidth","concat","attributeChangedCallback","attrName","oldValue","newValue","super","this","toggleCaptchaEles","constructor","attachShadow","mode","innerHTML","captchaEle","shadowRoot","querySelector","mockCaptchaEle","badge","inputElement","init","updatePreview","bind","getValidity","checkValidity","enabled","style","display","value","valueMissing","siteKey","getAttribute","customElements","define"],"sourceRoot":""}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2294,4159],{63595:(t,e,o)=>{o.r(e),o.d(e,{TextClass:()=>n.s,componentName:()=>n.T});var n=o(66434);customElements.define(n.T,n.s)},66434:(t,e,o)=>{o.d(e,{T:()=>h,s:()=>c});var n=o(88961),s=o(63200),r=o(25964),i=o(72270);const h=(0,r.xE)("text");class l extends((0,i.qu)({componentName:h,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <slot part="text-wrapper"></slot>\n ',(0,r.fz)("\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n ",this)}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,r.Ge)(this,(()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""}))}}const{host:p}={host:{selector:()=>":host"}},c=(0,s.Zz)((0,n.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},textColor:[{property:"color"}],textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),n.VO,n.tQ)(l)},74778:(t,e,o)=>{o.r(e),o.d(e,{LinkClass:()=>x,componentName:()=>l});var n=o(88961),s=o(63200),r=o(25964),i=o(72270),h=o(66434);const l=(0,r.xE)("link");class p extends((0,i.qu)({componentName:l,baseSelector:":host a"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<div>\n\t\t\t<descope-text>\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t",(0,r.fz)("\n :host {\n\t\t\tdisplay: inline-block;\n line-height: 1em;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t}\n ",this),(0,r.EA)(this,this.shadowRoot.querySelector("a"),{includeAttrs:["href","target","tooltip"],mapAttrs:{tooltip:"title"}}),(0,r.EA)(this,this.shadowRoot.querySelector("descope-text"),{includeAttrs:["mode","variant"]})}}const c={host:{selector:()=>":host"},link:{selector:()=>":host a"},anchor:{},wrapper:{selector:()=>":host > div"},text:{selector:()=>h.s.componentName}},{anchor:a,text:d,host:m,wrapper:y,link:u}=c,x=(0,s.Zz)((0,n.RF)({mappings:{hostWidth:{...m,property:"width"},hostDirection:{...d,property:"direction"},textAlign:y,textDecoration:{...u,property:"text-decoration",fallback:"none"},textColor:[{...a,property:"color"},{...d,property:h.s.cssVarList.textColor}],cursor:a}}),n.VO,n.tQ)(p);o(63595),customElements.define(l,x)}}]);
|
2
|
+
//# sourceMappingURL=descope-link.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"descope-link.js","mappings":"qNAEAA,eAAeC,OAAO,IAAe,I,2FCW9B,MAAMC,GAAgB,QAAiB,QAE9C,MAAMC,WAAgB,QAAgB,CACpCD,gBACAE,aAAc,kBAEd,WAAAC,GACEC,QAEAC,KAAKC,aAAa,CAAEC,KAAM,SAAUC,UAAY,iDAIhD,QAAY,iLASTH,KACL,CAEA,iBAAII,GACF,MAAgD,SAAzCJ,KAAKK,aAAa,kBAC3B,CAEA,IAAAC,GACEP,MAAMO,QAEN,QAAgBN,MAAM,KACpB,MAAMO,IAAgBP,KAAKQ,WAAWC,OACtCT,KAAKU,MAAMC,SAAWJ,GAAeP,KAAKI,cAAgB,OAAS,EAAE,GAEzE,EAGF,MAAM,KAAEQ,GAAS,CACfA,KAAM,CAAEC,SAAU,IAAM,UAGbC,GAAY,SACvB,QAAiB,CACfC,SAAU,CACRC,UAAW,CAAEH,SAAU,IAAM,QAASI,SAAU,SAChDC,cAAe,CAAEL,SAAU,IAAM,QAASI,SAAU,aACpDE,SAAU,CAAC,EACXC,UAAW,CACT,CAAEH,SAAU,UAEdI,eAAgB,CAAEJ,SAAU,eAC5BK,kBAAmB,CAAEL,SAAU,kBAC/BM,WAAY,CAAC,EACbC,UAAW,CAAC,EACZC,cAAe,CAAC,EAChBC,WAAY,CAAC,EACbC,UAAW,CAAC,EACZC,WAAY,CAAC,EACbC,YAAa,CAAC,EACdC,YAAa,CAAC,EACdC,YAAa,CAAC,KAGlB,KACA,KAvBuB,CAwBvBnC,E,iIClEK,MAAMD,GAAgB,QAAiB,QAE9C,MAAMqC,WAAgB,QAAgB,CAAErC,gBAAeE,aAAc,aACnE,WAAAC,GACEC,QAEAC,KAAKC,aAAa,CAAEC,KAAM,SAAUC,UAAY,kIAUhD,QACE,oIASAH,OAGF,QAAaA,KAAMA,KAAKiC,WAAWC,cAAc,KAAM,CACrDC,aAAc,CAAC,OAAQ,SAAU,WACjCC,SAAU,CACRC,QAAS,YAIb,QAAarC,KAAMA,KAAKiC,WAAWC,cAAc,gBAAiB,CAChEC,aAAc,CAAC,OAAQ,YAE3B,EAGF,MAAMG,EAAY,CAChB1B,KAAM,CAAEC,SAAU,IAAM,SACxB0B,KAAM,CAAE1B,SAAU,IAAM,WACxB2B,OAAQ,CAAC,EACTC,QAAS,CAAE5B,SAAU,IAAM,eAC3B6B,KAAM,CAAE7B,SAAU,IAAMC,EAAA,EAAUnB,iBAG5B6C,OAAM,OAAM,wBAAqB,GAAKF,EAEjCK,GAAY,SACvB,QAAiB,CACf5B,SAAU,CACRC,UAAW,IAAKJ,EAAMK,SAAU,SAChCC,cAAe,IAAK,EAAMD,SAAU,aACpCO,UAAWiB,EACXG,eAAgB,IAAK,EAAM3B,SAAU,kBAAmB4B,SAAU,QAClEzB,UAAW,CACT,IAAK,EAAQH,SAAU,SACvB,IAAK,EAAMA,SAAUH,EAAA,EAAUgC,WAAW1B,YAE5C2B,OAAQ,KAGZ,KACA,KAfuB,CAgBvBf,G,SC/EFvC,eAAeC,OAAOC,EAAegD,E","sources":["webpack://@descope/web-components-ui/../components/descope-text/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/TextClass.js","webpack://@descope/web-components-ui/../components/descope-link/src/component/LinkClass.js","webpack://@descope/web-components-ui/../components/descope-link/src/component/index.js"],"sourcesContent":["import { componentName, TextClass } from './TextClass';\n\ncustomElements.define(componentName, TextClass);\n\nexport { TextClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n injectStyle,\n observeChildren,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\n\nexport const componentName = getComponentName('text');\n\nclass RawText extends createBaseClass({\n componentName,\n baseSelector: ':host > slot',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <slot part=\"text-wrapper\"></slot>\n `;\n\n injectStyle(`\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n `, this);\n }\n\n get hideWhenEmpty() {\n return this.getAttribute('hide-when-empty') === 'true';\n }\n\n init() {\n super.init();\n\n observeChildren(this, () => {\n const hasChildren = !!this.childNodes.length;\n this.style.display = !hasChildren && this.hideWhenEmpty ? 'none' : '';\n });\n }\n}\n\nconst { host } = {\n host: { selector: () => ':host' }\n}\n\nexport const TextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostDirection: { selector: () => ':host', property: 'direction' },\n fontSize: {},\n textColor: [\n { property: 'color' }\n ],\n textLineHeight: { property: 'line-height' },\n textLetterSpacing: { property: 'letter-spacing' },\n textShadow: {},\n textAlign: {},\n textTransform: {},\n fontFamily: {},\n fontStyle: {},\n fontWeight: {},\n borderWidth: {},\n borderStyle: {},\n borderColor: {},\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawText);\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n forwardAttrs,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { TextClass } from '@descope-ui/descope-text/class';\n\nexport const componentName = getComponentName('link');\n\nclass RawLink extends createBaseClass({ componentName, baseSelector: ':host a' }) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<div>\n\t\t\t<descope-text>\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n\t\t\tdisplay: inline-block;\n line-height: 1em;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t}\n `,\n this\n );\n\n forwardAttrs(this, this.shadowRoot.querySelector('a'), {\n includeAttrs: ['href', 'target', 'tooltip'],\n mapAttrs: {\n tooltip: 'title',\n },\n });\n\n forwardAttrs(this, this.shadowRoot.querySelector('descope-text'), {\n includeAttrs: ['mode', 'variant'],\n });\n }\n}\n\nconst selectors = {\n host: { selector: () => ':host' },\n link: { selector: () => ':host a' },\n anchor: {},\n wrapper: { selector: () => ':host > div' },\n text: { selector: () => TextClass.componentName },\n};\n\nconst { anchor, text, host, wrapper, link } = selectors;\n\nexport const LinkClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...text, property: 'direction' },\n textAlign: wrapper,\n textDecoration: { ...link, property: 'text-decoration', fallback: 'none' },\n textColor: [\n { ...anchor, property: 'color' },\n { ...text, property: TextClass.cssVarList.textColor },\n ],\n cursor: anchor,\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawLink);\n","import { componentName, LinkClass } from './LinkClass';\nimport '@descope-ui/descope-text';\n\ncustomElements.define(componentName, LinkClass);\n\nexport { LinkClass, componentName };\n"],"names":["customElements","define","componentName","RawText","baseSelector","constructor","super","this","attachShadow","mode","innerHTML","hideWhenEmpty","getAttribute","init","hasChildren","childNodes","length","style","display","host","selector","TextClass","mappings","hostWidth","property","hostDirection","fontSize","textColor","textLineHeight","textLetterSpacing","textShadow","textAlign","textTransform","fontFamily","fontStyle","fontWeight","borderWidth","borderStyle","borderColor","RawLink","shadowRoot","querySelector","includeAttrs","mapAttrs","tooltip","selectors","link","anchor","wrapper","text","LinkClass","textDecoration","fallback","cssVarList","cursor"],"sourceRoot":""}
|
package/dist/umd/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.DescopeUI=t():e.DescopeUI=t()}(self,(()=>(()=>{var e,t,n,r={3047:(e,t,n)=>{"use strict";n.d(t,{$m:()=>r,IM:()=>i,WJ:()=>s,aE:()=>o});const r="descope",o=3,i="host",s="@"},4097:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});const r=new class{static mountOnPropName="DescopeThemeManager";#e={};#t="light";#n=new Set;#r(){this.#n.forEach((e=>e?.()))}get currentThemeName(){return this.#t}set currentThemeName(e){this.#t=e,this.#r()}get currentTheme(){return this.#e[this.currentThemeName]}onCurrentThemeChange(e){return this.#n.add(e),()=>{this.#n.delete(e)}}set themes(e){this.#e=e,this.#r()}get hasThemes(){return!!Object.keys(this.#e).length}}},9696:(e,t,n)=>{"use strict";n.d(t,{AG:()=>d,GL:()=>o,Tn:()=>c,Zz:()=>s,dk:()=>i,gU:()=>a,kW:()=>r,wy:()=>p});const r=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),o=(...e)=>r(e.filter((e=>!!e)).join("-")),i=(...e)=>e.filter(Boolean).map(((e,t)=>{return 0===t?e:(n=e).charAt(0).toUpperCase()+n.slice(1);var n})).join(""),s=(...e)=>t=>e.reduceRight(((e,t)=>t(e)),t),c=e=>"function"==typeof e,a=e=>{try{return new URL(e),!0}catch(e){return!1}},d=(e,t)=>{if(!Array.isArray(e)||!Array.isArray(t))return!1;if(e.length!==t.length)return!1;const n=e.slice().sort(),r=t.slice().sort();for(let e=0;e<n.length;e++)if(n[e]!==r[e])return!1;return!0},p=e=>e.replace(/([A-Z])/g," $1").trim().split(" ").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" ")},21642:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",s="[object Function]",c="[object Object]",a=/^\[object .+?Constructor\]$/,d=/^(?:0|[1-9]\d*)$/,p={};p["[object Float32Array]"]=p["[object Float64Array]"]=p["[object Int8Array]"]=p["[object Int16Array]"]=p["[object Int32Array]"]=p["[object Uint8Array]"]=p["[object Uint8ClampedArray]"]=p["[object Uint16Array]"]=p["[object Uint32Array]"]=!0,p[i]=p["[object Array]"]=p["[object ArrayBuffer]"]=p["[object Boolean]"]=p["[object DataView]"]=p["[object Date]"]=p["[object Error]"]=p[s]=p["[object Map]"]=p["[object Number]"]=p[c]=p["[object RegExp]"]=p["[object Set]"]=p["[object String]"]=p["[object WeakMap]"]=!1;var l,u,f,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,b="object"==typeof self&&self&&self.Object===Object&&self,m=h||b||Function("return this")(),g=t&&!t.nodeType&&t,j=g&&e&&!e.nodeType&&e,v=j&&j.exports===g,y=v&&h.process,x=function(){try{return j&&j.require&&j.require("util").types||y&&y.binding&&y.binding("util")}catch(e){}}(),_=x&&x.isTypedArray,w=Array.prototype,O=Function.prototype,$=Object.prototype,A=m["__core-js_shared__"],E=O.toString,T=$.hasOwnProperty,S=(l=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+l:"",k=$.toString,P=E.call(Object),N=RegExp("^"+E.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),z=v?m.Buffer:void 0,C=m.Symbol,M=m.Uint8Array,I=(z&&z.allocUnsafe,u=Object.getPrototypeOf,f=Object,function(e){return u(f(e))}),L=Object.create,U=$.propertyIsEnumerable,W=w.splice,q=C?C.toStringTag:void 0,D=function(){try{var e=ce(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),F=z?z.isBuffer:void 0,R=Math.max,G=Date.now,B=ce(m,"Map"),V=ce(Object,"create"),J=function(){function e(){}return function(t){if(!ve(t))return{};if(L)return L(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Z(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function K(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function H(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Q(e){var t=this.__data__=new K(e);this.size=t.size}function X(e,t,n){(void 0!==n&&!ue(e[t],n)||void 0===n&&!(t in e))&&te(e,t,n)}function Y(e,t,n){var r=e[t];T.call(e,t)&&ue(r,n)&&(void 0!==n||t in e)||te(e,t,n)}function ee(e,t){for(var n=e.length;n--;)if(ue(e[n][0],t))return n;return-1}function te(e,t,n){"__proto__"==t&&D?D(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}Z.prototype.clear=function(){this.__data__=V?V(null):{},this.size=0},Z.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Z.prototype.get=function(e){var t=this.__data__;if(V){var n=t[e];return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},Z.prototype.has=function(e){var t=this.__data__;return V?void 0!==t[e]:T.call(t,e)},Z.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=V&&void 0===t?r:t,this},K.prototype.clear=function(){this.__data__=[],this.size=0},K.prototype.delete=function(e){var t=this.__data__,n=ee(t,e);return!(n<0||(n==t.length-1?t.pop():W.call(t,n,1),--this.size,0))},K.prototype.get=function(e){var t=this.__data__,n=ee(t,e);return n<0?void 0:t[n][1]},K.prototype.has=function(e){return ee(this.__data__,e)>-1},K.prototype.set=function(e,t){var n=this.__data__,r=ee(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},H.prototype.clear=function(){this.size=0,this.__data__={hash:new Z,map:new(B||K),string:new Z}},H.prototype.delete=function(e){var t=se(this,e).delete(e);return this.size-=t?1:0,t},H.prototype.get=function(e){return se(this,e).get(e)},H.prototype.has=function(e){return se(this,e).has(e)},H.prototype.set=function(e,t){var n=se(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Q.prototype.clear=function(){this.__data__=new K,this.size=0},Q.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Q.prototype.get=function(e){return this.__data__.get(e)},Q.prototype.has=function(e){return this.__data__.has(e)},Q.prototype.set=function(e,t){var n=this.__data__;if(n instanceof K){var r=n.__data__;if(!B||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new H(r)}return n.set(e,t),this.size=n.size,this};function ne(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":q&&q in Object(e)?function(e){var t=T.call(e,q),n=e[q];try{e[q]=void 0;var r=!0}catch(e){}var o=k.call(e);return r&&(t?e[q]=n:delete e[q]),o}(e):function(e){return k.call(e)}(e)}function re(e){return ye(e)&&ne(e)==i}function oe(e,t,n,r,o){e!==t&&function(e,t,n){for(var r=-1,o=Object(e),i=n(e),s=i.length;s--;){var c=i[++r];if(!1===t(o[c],c,o))break}}(t,(function(i,s){if(o||(o=new Q),ve(i))!function(e,t,n,r,o,i,s){var a=pe(e,n),d=pe(t,n),p=s.get(d);if(p)X(e,n,p);else{var l,u,f,h,b,m=i?i(a,d,n+"",e,t,s):void 0,g=void 0===m;if(g){var j=he(d),v=!j&&me(d),y=!j&&!v&&xe(d);m=d,j||v||y?he(a)?m=a:ye(b=a)&&be(b)?m=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(a):v?(g=!1,m=function(e){return e.slice()}(d)):y?(g=!1,h=new(f=(l=d).buffer).constructor(f.byteLength),new M(h).set(new M(f)),u=h,m=new l.constructor(u,l.byteOffset,l.length)):m=[]:function(e){if(!ye(e)||ne(e)!=c)return!1;var t=I(e);if(null===t)return!0;var n=T.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&E.call(n)==P}(d)||fe(d)?(m=a,fe(a)?m=function(e){return function(e,t,n){var r=!n;n||(n={});for(var o=-1,i=t.length;++o<i;){var s=t[o],c=void 0;void 0===c&&(c=e[s]),r?te(n,s,c):Y(n,s,c)}return n}(e,_e(e))}(a):ve(a)&&!ge(a)||(m=function(e){return"function"!=typeof e.constructor||de(e)?{}:J(I(e))}(d))):g=!1}g&&(s.set(d,m),o(m,d,r,i,s),s.delete(d)),X(e,n,m)}}(e,t,s,n,oe,r,o);else{var a=r?r(pe(e,s),i,s+"",e,t,o):void 0;void 0===a&&(a=i),X(e,s,a)}}),_e)}var ie=D?function(e,t){return D(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:$e;function se(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function ce(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!ve(e)||function(e){return!!S&&S in e}(e))&&(ge(e)?N:a).test(function(e){if(null!=e){try{return E.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function ae(e,t){var n=typeof e;return!!(t=null==t?o:t)&&("number"==n||"symbol"!=n&&d.test(e))&&e>-1&&e%1==0&&e<t}function de(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||$)}function pe(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var le=function(e){var t=0,n=0;return function(){var r=G(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ie);function ue(e,t){return e===t||e!=e&&t!=t}var fe=re(function(){return arguments}())?re:function(e){return ye(e)&&T.call(e,"callee")&&!U.call(e,"callee")},he=Array.isArray;function be(e){return null!=e&&je(e.length)&&!ge(e)}var me=F||function(){return!1};function ge(e){if(!ve(e))return!1;var t=ne(e);return t==s||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function je(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function ve(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ye(e){return null!=e&&"object"==typeof e}var xe=_?function(e){return function(t){return e(t)}}(_):function(e){return ye(e)&&je(e.length)&&!!p[ne(e)]};function _e(e){return be(e)?function(e,t){var n=he(e),r=!n&&fe(e),o=!n&&!r&&me(e),i=!n&&!r&&!o&&xe(e),s=n||r||o||i,c=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],a=c.length;for(var d in e)!t&&!T.call(e,d)||s&&("length"==d||o&&("offset"==d||"parent"==d)||i&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||ae(d,a))||c.push(d);return c}(e,!0):function(e){if(!ve(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=de(e),n=[];for(var r in e)("constructor"!=r||!t&&T.call(e,r))&&n.push(r);return n}(e)}var we,Oe=(we=function(e,t,n){oe(e,t,n)},function(e,t){return le(function(e,t,n){return t=R(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=R(r.length-t,0),s=Array(i);++o<i;)s[o]=r[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=r[o];return c[t]=n(s),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,c)}}(e,t,$e),e+"")}((function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=we.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!ve(n))return!1;var r=typeof t;return!!("number"==r?be(n)&&ae(t,n.length):"string"==r&&t in n)&&ue(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var s=t[n];s&&we(e,s,n)}return e})));function $e(e){return e}e.exports=Oe},25964:(e,t,n)=>{"use strict";n.d(t,{EA:()=>l,Ge:()=>s,Gh:()=>a,Ix:()=>p,fz:()=>f,mx:()=>i,q:()=>u,xE:()=>d});var r=n(63200),o=n(69591);const i=(e,t,{excludeAttrs:n=[],includeAttrs:r=[]})=>{const o=Array.from(e.attributes).filter((e=>!n.includes(e.name)&&(!r.length||r.includes(e.name)))).map((e=>e.name));t(o),new MutationObserver((e=>{e.forEach((e=>{"attributes"!==e.type||n.includes(e.attributeName)||r.length&&!r.includes(e.attributeName)||t([e.attributeName])}))})).observe(e,{attributes:!0})},s=(e,t)=>{t({addedNodes:Array.from(e.children),removedNodes:[]}),new MutationObserver((e=>{e.forEach((e=>{"childList"!==e.type&&"characterData"!==e.type||t(e)}))})).observe(e,{childList:!0,characterData:!0,subtree:!0})},c=(e,t,n={})=>r=>{r.forEach((r=>{const o=n[r]||r,i=e.getAttribute(r);null!==i?t.getAttribute(o)!==i&&t.setAttribute(o,i):t.removeAttribute(o)}))},a=(e,t,n)=>{i(e,c(e,t),n),i(t,c(t,e),n)},d=e=>(0,r.GL)(o.$m,e),p=(...e)=>`--${(0,r.GL)(...e)}`,l=(e,t,n={})=>{i(e,c(e,t,n.mapAttrs),n)},u=(e,t,n=[])=>{if(!n.length)return;const r=n.reduce(((t,n)=>Object.assign(t,{[n]:{get:()=>e[n],set(t){e[n]=t}}})),{});Object.defineProperties(t,r)},f=(e,t,{prepend:n=!1}={})=>{let r;try{r=new CSSStyleSheet}catch(r){return b(e,t,{prepend:n})}const o=t?.shadowRoot||t;if(e&&r.replaceSync(e),o){const e=[...o.adoptedStyleSheets||[]];e[n?"unshift":"push"](r),o.adoptedStyleSheets=e}return r};class h{constructor(e,t,{prepend:n=!1}={}){this.styleEle=document.createElement("style"),this.styleEle.textContent=e,this.styleEle.setAttribute("nonce",window.DESCOPE_NONCE),this.ref=t?.shadowRoot||t,this.ref&&(n?this.ref.prepend(this.styleEle):this.ref.append(this.styleEle))}replaceSync(e){this.styleEle.textContent=e}get cssRules(){return this.styleEle.sheet?.cssRules}}const b=(e,t,{prepend:n=!1}={})=>new h(e,t,{prepend:n})},25990:(e,t,n)=>{const{componentsThemeManager:r}=n(73227),o=n(97301);e.exports=o.keys().reduce(((e,t)=>{const n=t.replace(/.*?([^\/]+)\/index\.js$/,"$1");return n.endsWith("-internal")||(e[n]=()=>o(t)),e}),{}),e.exports.componentsThemeManager=r,e.exports["descope-address-field"]=()=>Promise.all([n.e(2672),n.e(6818),n.e(676),n.e(8968),n.e(9275),n.e(8248),n.e(7620),n.e(8618),n.e(4914),n.e(9871),n.e(7774),n.e(8961),n.e(7092),n.e(8822)]).then(n.bind(n,25278)),e.exports["descope-autocomplete-field"]=()=>Promise.all([n.e(2672),n.e(6818),n.e(676),n.e(8968),n.e(9275),n.e(8248),n.e(7620),n.e(8618),n.e(4914),n.e(9871),n.e(7774),n.e(8961),n.e(7092),n.e(8712)]).then(n.bind(n,93847)),e.exports["descope-avatar"]=()=>Promise.all([n.e(2672),n.e(6818),n.e(676),n.e(8968),n.e(5260),n.e(7182),n.e(8618),n.e(1995),n.e(8961),n.e(2272)]).then(n.bind(n,53557)),e.exports["descope-button"]=()=>Promise.all([n.e(2672),n.e(6818),n.e(676),n.e(8968),n.e(9275),n.e(4467),n.e(8961),n.e(5087)]).then(n.bind(n,30576)),e.exports["descope-collapsible-container"]=()=>Promise.all([n.e(2672),n.e(5414),n.e(8961),n.e(6367)]).then(n.bind(n,96945)),e.exports["descope-combo-box"]=()=>Promise.all([n.e(2672),n.e(6818),n.e(676),n.e(8968),n.e(9275),n.e(8248),n.e(7620),n.e(8618),n.e(4914),n.e(9871),n.e(8961),n.e(7092),n.e(5691)]).then(n.bind(n,27092)),e.exports["descope-icon"]=()=>Promise.all([n.e(2672),n.e(5414),n.e(8961),n.e(6724)]).then(n.bind(n,56737)),e.exports["descope-image"]=()=>Promise.all([n.e(2672),n.e(5414),n.e(8961),n.e(1202)]).then(n.bind(n,6301)),e.exports["descope-password-strength"]=()=>Promise.all([n.e(2672),n.e(8961),n.e(9458)]).then(n.bind(n,13241)),e.exports["descope-recovery-codes"]=()=>Promise.all([n.e(2672),n.e(6818),n.e(676),n.e(5260),n.e(7182),n.e(6063),n.e(8961),n.e(9175)]).then(n.bind(n,88568)),e.exports["descope-text"]=()=>Promise.all([n.e(2672),n.e(8961),n.e(2294)]).then(n.bind(n,63595)),e.exports["descope-timer"]=()=>Promise.all([n.e(2672),n.e(5414),n.e(8961),n.e(2250)]).then(n.bind(n,15887)),e.exports["descope-timer-button"]=()=>Promise.all([n.e(2672),n.e(6818),n.e(676),n.e(8968),n.e(9275),n.e(4467),n.e(5414),n.e(8961),n.e(743)]).then(n.bind(n,60096))},63200:(e,t,n)=>{"use strict";n.d(t,{GL:()=>i,Tn:()=>a,Zz:()=>c,dk:()=>s,g5:()=>r.g,kW:()=>o});var r=n(86507);const o=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),i=(...e)=>o(e.filter((e=>!!e)).join("-")),s=(...e)=>e.filter(Boolean).map(((e,t)=>{return 0===t?e:(n=e).charAt(0).toUpperCase()+n.slice(1);var n})).join(""),c=(...e)=>t=>e.reduceRight(((e,t)=>t(e)),t),a=e=>"function"==typeof e},68049:(e,t,n)=>{var r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,c=parseInt,a="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,p=a||d||Function("return this")(),l=Object.prototype.toString,u=Math.max,f=Math.min,h=function(){return p.Date.now()};function b(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==l.call(e)}(e))return NaN;if(b(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=b(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=i.test(e);return n||s.test(e)?c(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var r,o,i,s,c,a,d=0,p=!1,l=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function j(t){var n=r,i=o;return r=o=void 0,d=t,s=e.apply(i,n)}function v(e){var n=e-a;return void 0===a||n>=t||n<0||l&&e-d>=i}function y(){var e=h();if(v(e))return x(e);c=setTimeout(y,function(e){var n=t-(e-a);return l?f(n,i-(e-d)):n}(e))}function x(e){return c=void 0,g&&r?j(e):(r=o=void 0,s)}function _(){var e=h(),n=v(e);if(r=arguments,o=this,a=e,n){if(void 0===c)return function(e){return d=e,c=setTimeout(y,t),p?j(e):s}(a);if(l)return c=setTimeout(y,t),j(a)}return void 0===c&&(c=setTimeout(y,t)),s}return t=m(t)||0,b(n)&&(p=!!n.leading,i=(l="maxWait"in n)?u(m(n.maxWait)||0,t):i,g="trailing"in n?!!n.trailing:g),_.cancel=function(){void 0!==c&&clearTimeout(c),d=0,r=a=o=c=void 0},_.flush=function(){return void 0===c?s:x(h())},_}},69461:(e,t,n)=>{"use strict";n.d(t,{$J:()=>c,I4:()=>o,Kl:()=>a,cy:()=>r,fu:()=>s,lS:()=>i});const r=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,o=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,i=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,s=e=>`\n ${e}::part(input-field)::after {\n opacity: 0;\n }\n`,c=e=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${e} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,a=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '},69591:(e,t,n)=>{"use strict";n.d(t,{$m:()=>r,IM:()=>i,aE:()=>o});const r="descope",o=3,i="host"},73227:(e,t,n)=>{"use strict";n.r(t),n.d(t,{componentsThemeManager:()=>a.br,createComponentsTheme:()=>j,createHelperVars:()=>x,getThemeRefs:()=>h,getThemeVars:()=>b,globalsThemeToStyle:()=>m,themeToCSSVarsObj:()=>f,themeToStyle:()=>v,useVar:()=>y});var r=n(21642),o=n.n(r),i=n(3047),s=n(9696),c=n(97810),a=n(79673);const d=e=>(0,c.Ix)(i.$m,...e),p=(e,t,n)=>{const r=Array.isArray(t)?t:t.match(/([^[.\]])+/g);return r.reduce(((e,t,o)=>(void 0===e[t]&&(e[t]={}),o===r.length-1&&(e[t]=n),e[t])),e),e},l=(e,t,n)=>Object.entries(e).reduce(((e,[r,i])=>i?.constructor!==Object?o()(e,n(t.concat(r),i)):o()(e,l(i,[...t,r],n))),{}),u=e=>{switch(!0){case Array.isArray(e):return e.map((e=>e.includes(" ")?`"${e}"`:e)).join(", ");case(0,s.gU)(e):return`url(${e})`;default:return e}},f=e=>l(e,[],((e,t)=>({[d(e)]:u(t)}))),h=(e,t)=>l(e,[],(e=>p({},e,`var(${d(t?[t,...e]:e)})`))),b=(e,t)=>l(e,[],(e=>p({},e,d(t?[t,...e]:e)))),m=(e,t="")=>{const n=Object.entries(f(e)).reduce(((e,t)=>`${e}${t.join(":")};\n`),"");return t?`*[data-theme="${t}"] {${n}}`:n},g=e=>Object.entries(e).reduce(((e,[t,n])=>`${e}${t} { \n${Object.entries(n).map((([e,t])=>`${e}: ${t}`)).join(";\n")} \n}\n\n`),""),j=e=>{const t=(e=>l(e,[],((e,t)=>{const[n,...r]=e,o=r.pop(),a=(0,c.xE)(n);"undefined"===o&&console.warn(a,`theme value: "${t}" is mapped to an invalid property`);let d=i.IM;r[0]&&r[0].startsWith(i.WJ)&&(d=r.shift());const p=r.reduce(((e,t,n)=>{if(t.startsWith("_"))return`${e}[${(0,s.kW)(t.replace(/^_/,""))}="true"]`;const o=r[n+1];return"string"!=typeof o||o.startsWith("_")?(console.error("theme generator",`your theme structure is invalid, attribute "${t}" is followed by "${o}" which is not allowed`),e):`${e}[${(0,s.kW)(t)}="${r.splice(n+1,1).join("")}"]`}),""),l=":host"+(p?`(${p})`:"");return{[a]:{[d]:{[l]:{[o]:u(t)}}}}})))(e);return Object.keys(t).reduce(((e,n)=>{const r=t[n];return Object.assign(e,{[n]:Object.keys(r).reduce(((e,t)=>Object.assign(e,{[t]:g(r[t])})),{})})}),{})},v=({globals:e,components:t},n)=>({globals:m(e,n),components:j(t)}),y=(...e)=>e.reduceRight(((e,t)=>t.startsWith("--")?`var(${t}${e?`, ${e}`:e})`:`${t}${e?`, ${e}`:e}`),""),x=(e,t)=>{const n=l(e,[],((e,n)=>{const r=[...e],o=r.splice(-1),i=(0,c.Ix)(t,o),s={[o]:i},a={[o]:y(i)};return{theme:p({},[...r,i],n),useVars:a,vars:s}}));return[n.theme,n.useVars,n.vars]}},74556:(e,t,n)=>{},79673:(e,t,n)=>{"use strict";n.d(t,{$J:()=>o.$J,I4:()=>o.I4,Kl:()=>o.Kl,br:()=>r.b,cy:()=>o.cy,fu:()=>o.fu,lS:()=>o.lS}),n(21642),n(63200),n(25964);var r=n(4097),o=(n(74556),n(69461))},86507:(e,t,n)=>{"use strict";n.d(t,{g:()=>i});var r=n(68049),o=n.n(r);const i=(e,t)=>{let n=0;const r=new Set,i=new Set,s=o()(((t,o)=>{e(...t).then((e=>{o===n&&(r.forEach((t=>t(e))),r.clear())})).catch((e=>{i.forEach((t=>t(e))),i.clear()}))}),t);return(...e)=>(n++,new Promise(((t,o)=>{r.add(t),i.add(o),s(e,n)})))}},97301:(e,t,n)=>{var r={"./boolean-fields/descope-boolean-field-internal/index.js":[3274,2672,9365,7362],"./boolean-fields/descope-checkbox/index.js":[49582,2672,6818,676,8968,9275,8248,7620,4467,7291,9365,4838],"./boolean-fields/descope-switch-toggle/index.js":[21934,2672,6818,676,8968,9275,8248,7620,4467,7291,9365,1448],"./button-selection-group-fields/descope-button-multi-selection-group-internal/index.js":[91831,2672,9365,8399],"./button-selection-group-fields/descope-button-multi-selection-group/index.js":[55162,2672,6818,676,8968,9275,4467,9365,8961,1837,3829],"./button-selection-group-fields/descope-button-selection-group-internal/index.js":[72415,2672,9365,7079],"./button-selection-group-fields/descope-button-selection-group-item/index.js":[15450,2672,6818,676,8968,9275,4467,9365,8961,1837],"./button-selection-group-fields/descope-button-selection-group/index.js":[27926,2672,6818,676,8968,9275,4467,9365,8961,1837,2141],"./descope-alert/index.js":[11339,2672,2540,9365,1456],"./descope-apps-list/index.js":[45503,2672,6818,676,8968,5260,7182,8618,1995,9365,8961,3057],"./descope-badge/index.js":[91359,2672,9365,9553],"./descope-code-snippet/index.js":[80522,2672,5780,9365,3521],"./descope-container/index.js":[81297,2672,9365,8689],"./descope-date-field/descope-calendar/index.js":[88350,2672,6818,676,8968,9275,8248,7620,4467,8618,4914,9871,4518,9365,8961,7092,6028],"./descope-date-field/index.js":[79981,2672,6818,676,8968,9275,8248,7620,5260,4467,7182,8618,4914,9871,4518,1519,9365,8961,7092,6028,9257],"./descope-divider/index.js":[48995,2672,9365,8961,8819],"./descope-email-field/index.js":[54316,2672,6818,676,8968,9275,8248,7620,9365,5695],"./descope-enriched-text/index.js":[63196,2672,2540,9365,5710],"./descope-grid/descope-grid-custom-column/index.js":[12909,6818,7565,9176],"./descope-grid/descope-grid-item-details-column/index.js":[92107,6818,676,5260,7182,7565,2381],"./descope-grid/descope-grid-selection-column/index.js":[57641,2672,6818,676,8968,9275,8248,7620,4467,7565,7291,9365,3305],"./descope-grid/descope-grid-text-column/index.js":[57148,6818,7565,8108],"./descope-grid/index.js":[38976,2672,6818,676,8968,9275,8248,7620,5260,4467,7182,4914,7565,7291,5780,9970,9365,2200],"./descope-hybrid-field/index.js":[44966,2672,6818,676,8968,9275,8248,7620,5260,7182,8618,4914,9871,5348,3620,9365,8961,7092,2739,9894,7299],"./descope-link/index.js":[83002,2672,9365,8961,7792],"./descope-list/index.js":[18708,2672,9365,7640],"./descope-loader-linear/index.js":[63581,2672,9365,8009],"./descope-loader-radial/index.js":[54249,2672,9365,7163],"./descope-logo/index.js":[86947,2672,9365,1239],"./descope-modal/index.js":[52079,2672,6818,676,8968,8618,9117,9365,4139],"./descope-multi-select-combo-box/index.js":[12848,2672,6818,676,8968,9275,8248,7620,8618,4914,9871,1408,9365,1331],"./descope-new-password/descope-new-password-internal/index.js":[78844,2672,9365,8603],"./descope-new-password/index.js":[72788,2672,6818,676,8968,9275,8248,7620,5260,4467,7182,1899,9365,4364],"./descope-notification/descope-notification-card/index.js":[69182,2672,6818,676,8983,9365,7326],"./descope-notification/index.js":[8273,2672,6818,676,8983,9365,8019],"./descope-notp-image/index.js":[27201,2672,9365,2251],"./descope-number-field/index.js":[72598,2672,6818,676,8968,9275,8248,7620,5648,9365,7944],"./descope-passcode/descope-passcode-internal/index.js":[59053,2672,9365,3359],"./descope-passcode/index.js":[54690,2672,6818,676,8968,9275,8248,7620,5260,7182,9365,8884],"./descope-password/index.js":[19169,2672,6818,676,8968,9275,8248,7620,4467,1899,9365,6969],"./descope-policy-validation/index.js":[26782,2672,9365,2996],"./descope-radio-group/index.js":[40649,2672,6818,676,8968,9275,8248,4467,4623,9365,9399],"./descope-recaptcha/index.js":[85386,2672,9365,3847],"./descope-scopes-list/index.js":[33713,2672,6818,676,8968,9275,8248,7620,4467,7291,9365,1674],"./descope-security-questions-setup/index.js":[74460,2672,6818,676,8968,9275,8248,7620,5260,7182,8618,4914,9871,6477,9365,8961,7092,3594],"./descope-security-questions-verify/index.js":[38479,2672,6818,676,8968,9275,8248,7620,5260,7182,9365,8961,9446],"./descope-text-area/index.js":[5277,2672,6818,676,8968,9275,8248,7620,7939,9365,5686],"./descope-text-field/index.js":[21374,2672,6818,676,8968,9275,8248,7620,5260,7182,9365,5166],"./descope-third-party-app-logo/index.js":[6107,2672,5414,9365,8961,230],"./descope-totp-image/index.js":[7252,2672,9365,6213],"./descope-upload-file/index.js":[70139,2672,6818,676,8968,9275,4467,9365,8961,9636],"./descope-user-attribute/index.js":[45554,2672,6818,676,8968,9275,5260,4467,9365,8961,1578],"./descope-user-auth-method/index.js":[67760,2672,6818,676,8968,9275,5260,4467,9365,8961,9990],"./mapping-fields/descope-mappings-field/descope-mapping-item/index.js":[29172,2672,9365,2230],"./mapping-fields/descope-mappings-field/descope-mappings-field-internal/index.js":[34884,2672,9365,9522],"./mapping-fields/descope-mappings-field/index.js":[84719,2672,6818,676,8968,9275,8248,7620,5260,4467,7182,8618,4914,9871,7774,4550,9365,8961,7092,7095],"./mapping-fields/descope-saml-group-mappings/descope-saml-group-mappings-internal/index.js":[9894,2672,9365,9708],"./mapping-fields/descope-saml-group-mappings/index.js":[45103,2672,6818,676,8968,9275,8248,7620,5260,4467,7182,8618,4914,9871,7774,4550,9365,8961,7092,6832],"./phone-fields/descope-phone-field/descope-phone-field-internal/index.js":[92132,2672,6818,676,8968,9275,8248,7620,5260,7182,8618,4914,9871,5348,3620,9365,8961,7092,2739,2878],"./phone-fields/descope-phone-field/index.js":[98136,2672,6818,676,8968,9275,8248,7620,5260,7182,8618,4914,9871,5348,3620,9365,8961,7092,2739,9894],"./phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/index.js":[78343,2672,6818,676,8968,9275,8248,7620,5260,7182,5348,9365,2739,8657],"./phone-fields/descope-phone-input-box-field/index.js":[30057,2672,6818,676,8968,9275,8248,7620,5260,7182,5348,9365,2739,4043]};function o(e){if(!n.o(r,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],o=t[0];return Promise.all(t.slice(1).map(n.e)).then((()=>n(o)))}o.keys=()=>Object.keys(r),o.id=97301,e.exports=o},97810:(e,t,n)=>{"use strict";n.d(t,{EA:()=>l,Ge:()=>s,Gh:()=>a,Ix:()=>p,mx:()=>i,q:()=>u,xE:()=>d});var r=n(9696),o=n(3047);const i=(e,t,{excludeAttrs:n=[],includeAttrs:r=[]})=>{const o=Array.from(e.attributes).filter((e=>!n.includes(e.name)&&(!r.length||r.includes(e.name)))).map((e=>e.name));t(o),new MutationObserver((e=>{e.forEach((e=>{"attributes"!==e.type||n.includes(e.attributeName)||r.length&&!r.includes(e.attributeName)||t([e.attributeName])}))})).observe(e,{attributes:!0})},s=(e,t)=>{t({addedNodes:Array.from(e.children),removedNodes:[]}),new MutationObserver((e=>{e.forEach((e=>{"childList"!==e.type&&"characterData"!==e.type||t(e)}))})).observe(e,{childList:!0,characterData:!0,subtree:!0})},c=(e,t,n={})=>r=>{r.forEach((r=>{const o=n[r]||r,i=e.getAttribute(r);null!==i?t.getAttribute(o)!==i&&t.setAttribute(o,i):t.removeAttribute(o)}))},a=(e,t,n)=>{i(e,c(e,t),n),i(t,c(t,e),n)},d=e=>(0,r.GL)(o.$m,e),p=(...e)=>`--${(0,r.GL)(...e)}`,l=(e,t,n={})=>{i(e,c(e,t,n.mapAttrs),n)},u=(e,t,n=[])=>{if(!n.length)return;const r=n.reduce(((t,n)=>Object.assign(t,{[n]:{get:()=>e[n],set(t){e[n]=t}}})),{});Object.defineProperties(t,r)}}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={id:e,loaded:!1,exports:{}};return r[e](n,n.exports,i),n.loaded=!0,n.exports}i.m=r,e=[],i.O=(t,n,r,o)=>{if(!n){var s=1/0;for(p=0;p<e.length;p++){for(var[n,r,o]=e[p],c=!0,a=0;a<n.length;a++)(!1&o||s>=o)&&Object.keys(i.O).every((e=>i.O[e](n[a])))?n.splice(a--,1):(c=!1,o<s&&(s=o));if(c){e.splice(p--,1);var d=r();void 0!==d&&(t=d)}}return t}o=o||0;for(var p=e.length;p>0&&e[p-1][2]>o;p--)e[p]=e[p-1];e[p]=[n,r,o]},i.F={},i.E=e=>{Object.keys(i.F).map((t=>{i.F[t](e)}))},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,n)=>(i.f[n](e,t),t)),[])),i.u=e=>(({230:"descope-third-party-app-logo-index-js",743:"descope-timer-button",1202:"descope-image",1239:"descope-logo-index-js",1331:"descope-multi-select-combo-box-index-js",1448:"boolean-fields-descope-switch-toggle-index-js",1456:"descope-alert-index-js",1578:"descope-user-attribute-index-js",1674:"descope-scopes-list-index-js",1837:"button-selection-group-fields-descope-button-selection-group-item-index-js",2141:"button-selection-group-fields-descope-button-selection-group-index-js",2200:"descope-grid-index-js",2230:"mapping-fields-descope-mappings-field-descope-mapping-item-index-js",2250:"descope-timer",2251:"descope-notp-image-index-js",2272:"descope-avatar",2294:"descope-text",2381:"descope-grid-descope-grid-item-details-column-index-js",2878:"phone-fields-descope-phone-field-descope-phone-field-internal-index-js",2996:"descope-policy-validation-index-js",3057:"descope-apps-list-index-js",3305:"descope-grid-descope-grid-selection-column-index-js",3359:"descope-passcode-descope-passcode-internal-index-js",3521:"descope-code-snippet-index-js",3594:"descope-security-questions-setup-index-js",3829:"button-selection-group-fields-descope-button-multi-selection-group-index-js",3847:"descope-recaptcha-index-js",4043:"phone-fields-descope-phone-input-box-field-index-js",4139:"descope-modal-index-js",4364:"descope-new-password-index-js",4838:"boolean-fields-descope-checkbox-index-js",5087:"descope-button",5166:"descope-text-field-index-js",5686:"descope-text-area-index-js",5691:"descope-combo-box",5695:"descope-email-field-index-js",5710:"descope-enriched-text-index-js",6028:"descope-date-field-descope-calendar-index-js",6213:"descope-totp-image-index-js",6367:"descope-collapsible-container",6724:"descope-icon",6832:"mapping-fields-descope-saml-group-mappings-index-js",6969:"descope-password-index-js",7079:"button-selection-group-fields-descope-button-selection-group-internal-index-js",7095:"mapping-fields-descope-mappings-field-index-js",7163:"descope-loader-radial-index-js",7299:"descope-hybrid-field-index-js",7326:"descope-notification-descope-notification-card-index-js",7362:"boolean-fields-descope-boolean-field-internal-index-js",7640:"descope-list-index-js",7792:"descope-link-index-js",7944:"descope-number-field-index-js",8009:"descope-loader-linear-index-js",8019:"descope-notification-index-js",8108:"descope-grid-descope-grid-text-column-index-js",8399:"button-selection-group-fields-descope-button-multi-selection-group-internal-index-js",8603:"descope-new-password-descope-new-password-internal-index-js",8657:"phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js",8689:"descope-container-index-js",8712:"descope-autocomplete-field",8819:"descope-divider-index-js",8822:"descope-address-field",8884:"descope-passcode-index-js",9175:"descope-recovery-codes",9176:"descope-grid-descope-grid-custom-column-index-js",9257:"descope-date-field-index-js",9399:"descope-radio-group-index-js",9446:"descope-security-questions-verify-index-js",9458:"descope-password-strength",9522:"mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js",9553:"descope-badge-index-js",9636:"descope-upload-file-index-js",9708:"mapping-fields-descope-saml-group-mappings-descope-saml-group-mappings-internal-index-js",9894:"phone-fields-descope-phone-field-index-js",9990:"descope-user-auth-method-index-js"}[e]||e)+".js"),i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},n="@descope/web-components-ui:",i.l=(e,r,o,s)=>{if(t[e])t[e].push(r);else{var c,a;if(void 0!==o)for(var d=document.getElementsByTagName("script"),p=0;p<d.length;p++){var l=d[p];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==n+o){c=l;break}}c||(a=!0,(c=document.createElement("script")).charset="utf-8",c.timeout=120,i.nc&&c.setAttribute("nonce",i.nc),c.setAttribute("data-webpack",n+o),c.src=e),t[e]=[r];var u=(n,r)=>{c.onerror=c.onload=null,clearTimeout(f);var o=t[e];if(delete t[e],c.parentNode&&c.parentNode.removeChild(c),o&&o.forEach((e=>e(r))),n)return n(r)},f=setTimeout(u.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=u.bind(null,c.onerror),c.onload=u.bind(null,c.onload),a&&document.head.appendChild(c)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e={5536:0};i.f.j=(t,n)=>{var r=i.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var s=i.p+i.u(t),c=new Error;i.l(s,(n=>{if(i.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.src;c.message="Loading chunk "+t+" failed.\n("+o+": "+s+")",c.name="ChunkLoadError",c.type=o,c.request=s,r[1](c)}}),"chunk-"+t,t)}},i.F.j=t=>{if(!i.o(e,t)||void 0===e[t]){e[t]=null;var n=document.createElement("link");n.charset="utf-8",i.nc&&n.setAttribute("nonce",i.nc),n.rel="prefetch",n.as="script",n.href=i.p+i.u(t),document.head.appendChild(n)}},i.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,[s,c,a]=n,d=0;if(s.some((t=>0!==e[t]))){for(r in c)i.o(c,r)&&(i.m[r]=c[r]);if(a)var p=a(i)}for(t&&t(n);d<s.length;d++)o=s[d],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return i.O(p)},n=self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),i.O(0,[5536],(()=>{[2672,6818,676,8968,9275,8248,7620,8618,4914,9871,7774,8961,7092,8822,8712,5260,7182,1995,2272,4467,5087,5414,6367,5691,6724,1202,9458,6063,9175,2294,2250,743,9365,7362,7291,4838,1448,8399,1837,3829,7079,2141,2540,1456,3057,9553,5780,3521,8689,4518,6028,1519,9257,8819,5695,5710,7565,9176,2381,3305,8108,9970,2200,5348,3620,2739,9894,7299,7792,7640,8009,7163,1239,9117,4139,1408,1331,8603,1899,4364,8983,7326,8019,2251,5648,7944,3359,8884,6969,2996,4623,9399,3847,1674,6477,3594,9446,7939,5686,5166,230,6213,9636,1578,9990,2230,9522,4550,7095,9708,6832,2878,8657,4043].map(i.E)}),5);var s=i(25990);return i.O(s)})()));
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.DescopeUI=t():e.DescopeUI=t()}(self,(()=>(()=>{var e,t,n,r={3047:(e,t,n)=>{"use strict";n.d(t,{$m:()=>r,IM:()=>i,WJ:()=>s,aE:()=>o});const r="descope",o=3,i="host",s="@"},4097:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});const r=new class{static mountOnPropName="DescopeThemeManager";#e={};#t="light";#n=new Set;#r(){this.#n.forEach((e=>e?.()))}get currentThemeName(){return this.#t}set currentThemeName(e){this.#t=e,this.#r()}get currentTheme(){return this.#e[this.currentThemeName]}onCurrentThemeChange(e){return this.#n.add(e),()=>{this.#n.delete(e)}}set themes(e){this.#e=e,this.#r()}get hasThemes(){return!!Object.keys(this.#e).length}}},9696:(e,t,n)=>{"use strict";n.d(t,{AG:()=>d,GL:()=>o,Tn:()=>c,Zz:()=>s,dk:()=>i,gU:()=>a,kW:()=>r,wy:()=>p});const r=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),o=(...e)=>r(e.filter((e=>!!e)).join("-")),i=(...e)=>e.filter(Boolean).map(((e,t)=>{return 0===t?e:(n=e).charAt(0).toUpperCase()+n.slice(1);var n})).join(""),s=(...e)=>t=>e.reduceRight(((e,t)=>t(e)),t),c=e=>"function"==typeof e,a=e=>{try{return new URL(e),!0}catch(e){return!1}},d=(e,t)=>{if(!Array.isArray(e)||!Array.isArray(t))return!1;if(e.length!==t.length)return!1;const n=e.slice().sort(),r=t.slice().sort();for(let e=0;e<n.length;e++)if(n[e]!==r[e])return!1;return!0},p=e=>e.replace(/([A-Z])/g," $1").trim().split(" ").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" ")},21642:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",s="[object Function]",c="[object Object]",a=/^\[object .+?Constructor\]$/,d=/^(?:0|[1-9]\d*)$/,p={};p["[object Float32Array]"]=p["[object Float64Array]"]=p["[object Int8Array]"]=p["[object Int16Array]"]=p["[object Int32Array]"]=p["[object Uint8Array]"]=p["[object Uint8ClampedArray]"]=p["[object Uint16Array]"]=p["[object Uint32Array]"]=!0,p[i]=p["[object Array]"]=p["[object ArrayBuffer]"]=p["[object Boolean]"]=p["[object DataView]"]=p["[object Date]"]=p["[object Error]"]=p[s]=p["[object Map]"]=p["[object Number]"]=p[c]=p["[object RegExp]"]=p["[object Set]"]=p["[object String]"]=p["[object WeakMap]"]=!1;var l,u,f,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,b="object"==typeof self&&self&&self.Object===Object&&self,m=h||b||Function("return this")(),g=t&&!t.nodeType&&t,j=g&&e&&!e.nodeType&&e,v=j&&j.exports===g,y=v&&h.process,x=function(){try{return j&&j.require&&j.require("util").types||y&&y.binding&&y.binding("util")}catch(e){}}(),_=x&&x.isTypedArray,w=Array.prototype,O=Function.prototype,$=Object.prototype,A=m["__core-js_shared__"],E=O.toString,T=$.hasOwnProperty,S=(l=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+l:"",k=$.toString,P=E.call(Object),N=RegExp("^"+E.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),z=v?m.Buffer:void 0,C=m.Symbol,M=m.Uint8Array,I=(z&&z.allocUnsafe,u=Object.getPrototypeOf,f=Object,function(e){return u(f(e))}),L=Object.create,U=$.propertyIsEnumerable,W=w.splice,q=C?C.toStringTag:void 0,D=function(){try{var e=ce(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),F=z?z.isBuffer:void 0,R=Math.max,G=Date.now,B=ce(m,"Map"),V=ce(Object,"create"),J=function(){function e(){}return function(t){if(!ve(t))return{};if(L)return L(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Z(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function K(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function H(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Q(e){var t=this.__data__=new K(e);this.size=t.size}function X(e,t,n){(void 0!==n&&!ue(e[t],n)||void 0===n&&!(t in e))&&te(e,t,n)}function Y(e,t,n){var r=e[t];T.call(e,t)&&ue(r,n)&&(void 0!==n||t in e)||te(e,t,n)}function ee(e,t){for(var n=e.length;n--;)if(ue(e[n][0],t))return n;return-1}function te(e,t,n){"__proto__"==t&&D?D(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}Z.prototype.clear=function(){this.__data__=V?V(null):{},this.size=0},Z.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Z.prototype.get=function(e){var t=this.__data__;if(V){var n=t[e];return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},Z.prototype.has=function(e){var t=this.__data__;return V?void 0!==t[e]:T.call(t,e)},Z.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=V&&void 0===t?r:t,this},K.prototype.clear=function(){this.__data__=[],this.size=0},K.prototype.delete=function(e){var t=this.__data__,n=ee(t,e);return!(n<0||(n==t.length-1?t.pop():W.call(t,n,1),--this.size,0))},K.prototype.get=function(e){var t=this.__data__,n=ee(t,e);return n<0?void 0:t[n][1]},K.prototype.has=function(e){return ee(this.__data__,e)>-1},K.prototype.set=function(e,t){var n=this.__data__,r=ee(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},H.prototype.clear=function(){this.size=0,this.__data__={hash:new Z,map:new(B||K),string:new Z}},H.prototype.delete=function(e){var t=se(this,e).delete(e);return this.size-=t?1:0,t},H.prototype.get=function(e){return se(this,e).get(e)},H.prototype.has=function(e){return se(this,e).has(e)},H.prototype.set=function(e,t){var n=se(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Q.prototype.clear=function(){this.__data__=new K,this.size=0},Q.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Q.prototype.get=function(e){return this.__data__.get(e)},Q.prototype.has=function(e){return this.__data__.has(e)},Q.prototype.set=function(e,t){var n=this.__data__;if(n instanceof K){var r=n.__data__;if(!B||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new H(r)}return n.set(e,t),this.size=n.size,this};function ne(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":q&&q in Object(e)?function(e){var t=T.call(e,q),n=e[q];try{e[q]=void 0;var r=!0}catch(e){}var o=k.call(e);return r&&(t?e[q]=n:delete e[q]),o}(e):function(e){return k.call(e)}(e)}function re(e){return ye(e)&&ne(e)==i}function oe(e,t,n,r,o){e!==t&&function(e,t,n){for(var r=-1,o=Object(e),i=n(e),s=i.length;s--;){var c=i[++r];if(!1===t(o[c],c,o))break}}(t,(function(i,s){if(o||(o=new Q),ve(i))!function(e,t,n,r,o,i,s){var a=pe(e,n),d=pe(t,n),p=s.get(d);if(p)X(e,n,p);else{var l,u,f,h,b,m=i?i(a,d,n+"",e,t,s):void 0,g=void 0===m;if(g){var j=he(d),v=!j&&me(d),y=!j&&!v&&xe(d);m=d,j||v||y?he(a)?m=a:ye(b=a)&&be(b)?m=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(a):v?(g=!1,m=function(e){return e.slice()}(d)):y?(g=!1,h=new(f=(l=d).buffer).constructor(f.byteLength),new M(h).set(new M(f)),u=h,m=new l.constructor(u,l.byteOffset,l.length)):m=[]:function(e){if(!ye(e)||ne(e)!=c)return!1;var t=I(e);if(null===t)return!0;var n=T.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&E.call(n)==P}(d)||fe(d)?(m=a,fe(a)?m=function(e){return function(e,t,n){var r=!n;n||(n={});for(var o=-1,i=t.length;++o<i;){var s=t[o],c=void 0;void 0===c&&(c=e[s]),r?te(n,s,c):Y(n,s,c)}return n}(e,_e(e))}(a):ve(a)&&!ge(a)||(m=function(e){return"function"!=typeof e.constructor||de(e)?{}:J(I(e))}(d))):g=!1}g&&(s.set(d,m),o(m,d,r,i,s),s.delete(d)),X(e,n,m)}}(e,t,s,n,oe,r,o);else{var a=r?r(pe(e,s),i,s+"",e,t,o):void 0;void 0===a&&(a=i),X(e,s,a)}}),_e)}var ie=D?function(e,t){return D(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:$e;function se(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function ce(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!ve(e)||function(e){return!!S&&S in e}(e))&&(ge(e)?N:a).test(function(e){if(null!=e){try{return E.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function ae(e,t){var n=typeof e;return!!(t=null==t?o:t)&&("number"==n||"symbol"!=n&&d.test(e))&&e>-1&&e%1==0&&e<t}function de(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||$)}function pe(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var le=function(e){var t=0,n=0;return function(){var r=G(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ie);function ue(e,t){return e===t||e!=e&&t!=t}var fe=re(function(){return arguments}())?re:function(e){return ye(e)&&T.call(e,"callee")&&!U.call(e,"callee")},he=Array.isArray;function be(e){return null!=e&&je(e.length)&&!ge(e)}var me=F||function(){return!1};function ge(e){if(!ve(e))return!1;var t=ne(e);return t==s||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function je(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function ve(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ye(e){return null!=e&&"object"==typeof e}var xe=_?function(e){return function(t){return e(t)}}(_):function(e){return ye(e)&&je(e.length)&&!!p[ne(e)]};function _e(e){return be(e)?function(e,t){var n=he(e),r=!n&&fe(e),o=!n&&!r&&me(e),i=!n&&!r&&!o&&xe(e),s=n||r||o||i,c=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],a=c.length;for(var d in e)!t&&!T.call(e,d)||s&&("length"==d||o&&("offset"==d||"parent"==d)||i&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||ae(d,a))||c.push(d);return c}(e,!0):function(e){if(!ve(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=de(e),n=[];for(var r in e)("constructor"!=r||!t&&T.call(e,r))&&n.push(r);return n}(e)}var we,Oe=(we=function(e,t,n){oe(e,t,n)},function(e,t){return le(function(e,t,n){return t=R(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=R(r.length-t,0),s=Array(i);++o<i;)s[o]=r[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=r[o];return c[t]=n(s),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,c)}}(e,t,$e),e+"")}((function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=we.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!ve(n))return!1;var r=typeof t;return!!("number"==r?be(n)&&ae(t,n.length):"string"==r&&t in n)&&ue(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var s=t[n];s&&we(e,s,n)}return e})));function $e(e){return e}e.exports=Oe},25964:(e,t,n)=>{"use strict";n.d(t,{EA:()=>l,Ge:()=>s,Gh:()=>a,Ix:()=>p,fz:()=>f,mx:()=>i,q:()=>u,xE:()=>d});var r=n(63200),o=n(69591);const i=(e,t,{excludeAttrs:n=[],includeAttrs:r=[]})=>{const o=Array.from(e.attributes).filter((e=>!n.includes(e.name)&&(!r.length||r.includes(e.name)))).map((e=>e.name));t(o),new MutationObserver((e=>{e.forEach((e=>{"attributes"!==e.type||n.includes(e.attributeName)||r.length&&!r.includes(e.attributeName)||t([e.attributeName])}))})).observe(e,{attributes:!0})},s=(e,t)=>{t({addedNodes:Array.from(e.children),removedNodes:[]}),new MutationObserver((e=>{e.forEach((e=>{"childList"!==e.type&&"characterData"!==e.type||t(e)}))})).observe(e,{childList:!0,characterData:!0,subtree:!0})},c=(e,t,n={})=>r=>{r.forEach((r=>{const o=n[r]||r,i=e.getAttribute(r);null!==i?t.getAttribute(o)!==i&&t.setAttribute(o,i):t.removeAttribute(o)}))},a=(e,t,n)=>{i(e,c(e,t),n),i(t,c(t,e),n)},d=e=>(0,r.GL)(o.$m,e),p=(...e)=>`--${(0,r.GL)(...e)}`,l=(e,t,n={})=>{i(e,c(e,t,n.mapAttrs),n)},u=(e,t,n=[])=>{if(!n.length)return;const r=n.reduce(((t,n)=>Object.assign(t,{[n]:{get:()=>e[n],set(t){e[n]=t}}})),{});Object.defineProperties(t,r)},f=(e,t,{prepend:n=!1}={})=>{let r;try{r=new CSSStyleSheet}catch(r){return b(e,t,{prepend:n})}const o=t?.shadowRoot||t;if(e&&r.replaceSync(e),o){const e=[...o.adoptedStyleSheets||[]];e[n?"unshift":"push"](r),o.adoptedStyleSheets=e}return r};class h{constructor(e,t,{prepend:n=!1}={}){this.styleEle=document.createElement("style"),this.styleEle.textContent=e,this.styleEle.setAttribute("nonce",window.DESCOPE_NONCE),this.ref=t?.shadowRoot||t,this.ref&&(n?this.ref.prepend(this.styleEle):this.ref.append(this.styleEle))}replaceSync(e){this.styleEle.textContent=e}get cssRules(){return this.styleEle.sheet?.cssRules}}const b=(e,t,{prepend:n=!1}={})=>new h(e,t,{prepend:n})},25990:(e,t,n)=>{const{componentsThemeManager:r}=n(73227),o=n(97301);e.exports=o.keys().reduce(((e,t)=>{const n=t.replace(/.*?([^\/]+)\/index\.js$/,"$1");return n.endsWith("-internal")||(e[n]=()=>o(t)),e}),{}),e.exports.componentsThemeManager=r,e.exports["descope-address-field"]=()=>Promise.all([n.e(2672),n.e(6818),n.e(676),n.e(8968),n.e(9275),n.e(8248),n.e(7620),n.e(8618),n.e(4914),n.e(9871),n.e(7774),n.e(8961),n.e(7092),n.e(8822)]).then(n.bind(n,25278)),e.exports["descope-autocomplete-field"]=()=>Promise.all([n.e(2672),n.e(6818),n.e(676),n.e(8968),n.e(9275),n.e(8248),n.e(7620),n.e(8618),n.e(4914),n.e(9871),n.e(7774),n.e(8961),n.e(7092),n.e(8712)]).then(n.bind(n,93847)),e.exports["descope-avatar"]=()=>Promise.all([n.e(2672),n.e(6818),n.e(676),n.e(8968),n.e(5260),n.e(7182),n.e(8618),n.e(1995),n.e(8961),n.e(2272)]).then(n.bind(n,53557)),e.exports["descope-button"]=()=>Promise.all([n.e(2672),n.e(6818),n.e(676),n.e(8968),n.e(9275),n.e(4467),n.e(8961),n.e(5087)]).then(n.bind(n,30576)),e.exports["descope-collapsible-container"]=()=>Promise.all([n.e(2672),n.e(5414),n.e(8961),n.e(6367)]).then(n.bind(n,96945)),e.exports["descope-combo-box"]=()=>Promise.all([n.e(2672),n.e(6818),n.e(676),n.e(8968),n.e(9275),n.e(8248),n.e(7620),n.e(8618),n.e(4914),n.e(9871),n.e(8961),n.e(7092),n.e(5691)]).then(n.bind(n,27092)),e.exports["descope-enriched-text"]=()=>Promise.all([n.e(2672),n.e(2540),n.e(8961),n.e(9261)]).then(n.bind(n,55838)),e.exports["descope-icon"]=()=>Promise.all([n.e(2672),n.e(5414),n.e(8961),n.e(6724)]).then(n.bind(n,56737)),e.exports["descope-image"]=()=>Promise.all([n.e(2672),n.e(5414),n.e(8961),n.e(1202)]).then(n.bind(n,6301)),e.exports["descope-link"]=()=>Promise.all([n.e(2672),n.e(8961),n.e(4159)]).then(n.bind(n,74778)),e.exports["descope-password-strength"]=()=>Promise.all([n.e(2672),n.e(8961),n.e(9458)]).then(n.bind(n,13241)),e.exports["descope-recovery-codes"]=()=>Promise.all([n.e(2672),n.e(6818),n.e(676),n.e(5260),n.e(7182),n.e(6063),n.e(8961),n.e(9175)]).then(n.bind(n,88568)),e.exports["descope-text"]=()=>Promise.all([n.e(2672),n.e(8961),n.e(2294)]).then(n.bind(n,63595)),e.exports["descope-timer"]=()=>Promise.all([n.e(2672),n.e(5414),n.e(8961),n.e(2250)]).then(n.bind(n,15887)),e.exports["descope-timer-button"]=()=>Promise.all([n.e(2672),n.e(6818),n.e(676),n.e(8968),n.e(9275),n.e(4467),n.e(5414),n.e(8961),n.e(743)]).then(n.bind(n,60096))},63200:(e,t,n)=>{"use strict";n.d(t,{GL:()=>i,Tn:()=>a,Zz:()=>c,dk:()=>s,g5:()=>r.g,kW:()=>o});var r=n(86507);const o=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),i=(...e)=>o(e.filter((e=>!!e)).join("-")),s=(...e)=>e.filter(Boolean).map(((e,t)=>{return 0===t?e:(n=e).charAt(0).toUpperCase()+n.slice(1);var n})).join(""),c=(...e)=>t=>e.reduceRight(((e,t)=>t(e)),t),a=e=>"function"==typeof e},68049:(e,t,n)=>{var r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,c=parseInt,a="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,p=a||d||Function("return this")(),l=Object.prototype.toString,u=Math.max,f=Math.min,h=function(){return p.Date.now()};function b(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==l.call(e)}(e))return NaN;if(b(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=b(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=i.test(e);return n||s.test(e)?c(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var r,o,i,s,c,a,d=0,p=!1,l=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function j(t){var n=r,i=o;return r=o=void 0,d=t,s=e.apply(i,n)}function v(e){var n=e-a;return void 0===a||n>=t||n<0||l&&e-d>=i}function y(){var e=h();if(v(e))return x(e);c=setTimeout(y,function(e){var n=t-(e-a);return l?f(n,i-(e-d)):n}(e))}function x(e){return c=void 0,g&&r?j(e):(r=o=void 0,s)}function _(){var e=h(),n=v(e);if(r=arguments,o=this,a=e,n){if(void 0===c)return function(e){return d=e,c=setTimeout(y,t),p?j(e):s}(a);if(l)return c=setTimeout(y,t),j(a)}return void 0===c&&(c=setTimeout(y,t)),s}return t=m(t)||0,b(n)&&(p=!!n.leading,i=(l="maxWait"in n)?u(m(n.maxWait)||0,t):i,g="trailing"in n?!!n.trailing:g),_.cancel=function(){void 0!==c&&clearTimeout(c),d=0,r=a=o=c=void 0},_.flush=function(){return void 0===c?s:x(h())},_}},69461:(e,t,n)=>{"use strict";n.d(t,{$J:()=>c,I4:()=>o,Kl:()=>a,cy:()=>r,fu:()=>s,lS:()=>i});const r=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,o=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,i=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,s=e=>`\n ${e}::part(input-field)::after {\n opacity: 0;\n }\n`,c=e=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${e} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,a=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '},69591:(e,t,n)=>{"use strict";n.d(t,{$m:()=>r,IM:()=>i,aE:()=>o});const r="descope",o=3,i="host"},73227:(e,t,n)=>{"use strict";n.r(t),n.d(t,{componentsThemeManager:()=>a.br,createComponentsTheme:()=>j,createHelperVars:()=>x,getThemeRefs:()=>h,getThemeVars:()=>b,globalsThemeToStyle:()=>m,themeToCSSVarsObj:()=>f,themeToStyle:()=>v,useVar:()=>y});var r=n(21642),o=n.n(r),i=n(3047),s=n(9696),c=n(97810),a=n(79673);const d=e=>(0,c.Ix)(i.$m,...e),p=(e,t,n)=>{const r=Array.isArray(t)?t:t.match(/([^[.\]])+/g);return r.reduce(((e,t,o)=>(void 0===e[t]&&(e[t]={}),o===r.length-1&&(e[t]=n),e[t])),e),e},l=(e,t,n)=>Object.entries(e).reduce(((e,[r,i])=>i?.constructor!==Object?o()(e,n(t.concat(r),i)):o()(e,l(i,[...t,r],n))),{}),u=e=>{switch(!0){case Array.isArray(e):return e.map((e=>e.includes(" ")?`"${e}"`:e)).join(", ");case(0,s.gU)(e):return`url(${e})`;default:return e}},f=e=>l(e,[],((e,t)=>({[d(e)]:u(t)}))),h=(e,t)=>l(e,[],(e=>p({},e,`var(${d(t?[t,...e]:e)})`))),b=(e,t)=>l(e,[],(e=>p({},e,d(t?[t,...e]:e)))),m=(e,t="")=>{const n=Object.entries(f(e)).reduce(((e,t)=>`${e}${t.join(":")};\n`),"");return t?`*[data-theme="${t}"] {${n}}`:n},g=e=>Object.entries(e).reduce(((e,[t,n])=>`${e}${t} { \n${Object.entries(n).map((([e,t])=>`${e}: ${t}`)).join(";\n")} \n}\n\n`),""),j=e=>{const t=(e=>l(e,[],((e,t)=>{const[n,...r]=e,o=r.pop(),a=(0,c.xE)(n);"undefined"===o&&console.warn(a,`theme value: "${t}" is mapped to an invalid property`);let d=i.IM;r[0]&&r[0].startsWith(i.WJ)&&(d=r.shift());const p=r.reduce(((e,t,n)=>{if(t.startsWith("_"))return`${e}[${(0,s.kW)(t.replace(/^_/,""))}="true"]`;const o=r[n+1];return"string"!=typeof o||o.startsWith("_")?(console.error("theme generator",`your theme structure is invalid, attribute "${t}" is followed by "${o}" which is not allowed`),e):`${e}[${(0,s.kW)(t)}="${r.splice(n+1,1).join("")}"]`}),""),l=":host"+(p?`(${p})`:"");return{[a]:{[d]:{[l]:{[o]:u(t)}}}}})))(e);return Object.keys(t).reduce(((e,n)=>{const r=t[n];return Object.assign(e,{[n]:Object.keys(r).reduce(((e,t)=>Object.assign(e,{[t]:g(r[t])})),{})})}),{})},v=({globals:e,components:t},n)=>({globals:m(e,n),components:j(t)}),y=(...e)=>e.reduceRight(((e,t)=>t.startsWith("--")?`var(${t}${e?`, ${e}`:e})`:`${t}${e?`, ${e}`:e}`),""),x=(e,t)=>{const n=l(e,[],((e,n)=>{const r=[...e],o=r.splice(-1),i=(0,c.Ix)(t,o),s={[o]:i},a={[o]:y(i)};return{theme:p({},[...r,i],n),useVars:a,vars:s}}));return[n.theme,n.useVars,n.vars]}},74556:(e,t,n)=>{},79673:(e,t,n)=>{"use strict";n.d(t,{$J:()=>o.$J,I4:()=>o.I4,Kl:()=>o.Kl,br:()=>r.b,cy:()=>o.cy,fu:()=>o.fu,lS:()=>o.lS}),n(21642),n(63200),n(25964);var r=n(4097),o=(n(74556),n(69461))},86507:(e,t,n)=>{"use strict";n.d(t,{g:()=>i});var r=n(68049),o=n.n(r);const i=(e,t)=>{let n=0;const r=new Set,i=new Set,s=o()(((t,o)=>{e(...t).then((e=>{o===n&&(r.forEach((t=>t(e))),r.clear())})).catch((e=>{i.forEach((t=>t(e))),i.clear()}))}),t);return(...e)=>(n++,new Promise(((t,o)=>{r.add(t),i.add(o),s(e,n)})))}},97301:(e,t,n)=>{var r={"./boolean-fields/descope-boolean-field-internal/index.js":[3274,2672,9365,7362],"./boolean-fields/descope-checkbox/index.js":[49582,2672,6818,676,8968,9275,8248,7620,4467,7291,9365,4838],"./boolean-fields/descope-switch-toggle/index.js":[21934,2672,6818,676,8968,9275,8248,7620,4467,7291,9365,1448],"./button-selection-group-fields/descope-button-multi-selection-group-internal/index.js":[91831,2672,9365,8399],"./button-selection-group-fields/descope-button-multi-selection-group/index.js":[55162,2672,6818,676,8968,9275,4467,9365,8961,1837,3829],"./button-selection-group-fields/descope-button-selection-group-internal/index.js":[72415,2672,9365,7079],"./button-selection-group-fields/descope-button-selection-group-item/index.js":[15450,2672,6818,676,8968,9275,4467,9365,8961,1837],"./button-selection-group-fields/descope-button-selection-group/index.js":[27926,2672,6818,676,8968,9275,4467,9365,8961,1837,2141],"./descope-alert/index.js":[11339,2672,2540,9365,8961,1456],"./descope-apps-list/index.js":[45503,2672,6818,676,8968,5260,7182,8618,1995,9365,8961,3057],"./descope-badge/index.js":[91359,2672,9365,9553],"./descope-code-snippet/index.js":[80522,2672,5780,9365,3521],"./descope-container/index.js":[81297,2672,9365,8689],"./descope-date-field/descope-calendar/index.js":[88350,2672,6818,676,8968,9275,8248,7620,4467,8618,4914,9871,4518,9365,8961,7092,6028],"./descope-date-field/index.js":[79981,2672,6818,676,8968,9275,8248,7620,5260,4467,7182,8618,4914,9871,4518,1519,9365,8961,7092,6028,9257],"./descope-divider/index.js":[48995,2672,9365,8961,8819],"./descope-email-field/index.js":[54316,2672,6818,676,8968,9275,8248,7620,9365,5695],"./descope-grid/descope-grid-custom-column/index.js":[12909,6818,7565,9176],"./descope-grid/descope-grid-item-details-column/index.js":[92107,6818,676,5260,7182,7565,2381],"./descope-grid/descope-grid-selection-column/index.js":[57641,2672,6818,676,8968,9275,8248,7620,4467,7565,7291,9365,3305],"./descope-grid/descope-grid-text-column/index.js":[57148,6818,7565,8108],"./descope-grid/index.js":[38976,2672,6818,676,8968,9275,8248,7620,5260,4467,7182,4914,7565,7291,5780,9970,9365,2200],"./descope-hcaptcha/index.js":[24011,2672,9365,7470],"./descope-hybrid-field/index.js":[44966,2672,6818,676,8968,9275,8248,7620,5260,7182,8618,4914,9871,5348,3620,9365,8961,7092,2739,9894,7299],"./descope-list/index.js":[18708,2672,9365,7640],"./descope-loader-linear/index.js":[63581,2672,9365,8009],"./descope-loader-radial/index.js":[54249,2672,9365,7163],"./descope-logo/index.js":[86947,2672,9365,1239],"./descope-modal/index.js":[52079,2672,6818,676,8968,8618,9117,9365,4139],"./descope-multi-select-combo-box/index.js":[12848,2672,6818,676,8968,9275,8248,7620,8618,4914,9871,1408,9365,1331],"./descope-new-password/descope-new-password-internal/index.js":[78844,2672,9365,8603],"./descope-new-password/index.js":[72788,2672,6818,676,8968,9275,8248,7620,5260,4467,7182,1899,9365,4364],"./descope-notification/descope-notification-card/index.js":[69182,2672,6818,676,8983,9365,7326],"./descope-notification/index.js":[8273,2672,6818,676,8983,9365,8019],"./descope-notp-image/index.js":[27201,2672,9365,2251],"./descope-number-field/index.js":[72598,2672,6818,676,8968,9275,8248,7620,5648,9365,7944],"./descope-passcode/descope-passcode-internal/index.js":[59053,2672,9365,3359],"./descope-passcode/index.js":[54690,2672,6818,676,8968,9275,8248,7620,5260,7182,9365,8884],"./descope-password/index.js":[19169,2672,6818,676,8968,9275,8248,7620,4467,1899,9365,6969],"./descope-policy-validation/index.js":[26782,2672,9365,2996],"./descope-radio-group/index.js":[40649,2672,6818,676,8968,9275,8248,4467,4623,9365,9399],"./descope-recaptcha/index.js":[85386,2672,9365,3847],"./descope-scopes-list/index.js":[33713,2672,6818,676,8968,9275,8248,7620,4467,7291,9365,1674],"./descope-security-questions-setup/index.js":[74460,2672,6818,676,8968,9275,8248,7620,5260,7182,8618,4914,9871,6477,9365,8961,7092,3594],"./descope-security-questions-verify/index.js":[38479,2672,6818,676,8968,9275,8248,7620,5260,7182,9365,8961,9446],"./descope-text-area/index.js":[5277,2672,6818,676,8968,9275,8248,7620,7939,9365,5686],"./descope-text-field/index.js":[21374,2672,6818,676,8968,9275,8248,7620,5260,7182,9365,5166],"./descope-third-party-app-logo/index.js":[6107,2672,5414,9365,8961,230],"./descope-totp-image/index.js":[7252,2672,9365,6213],"./descope-upload-file/index.js":[70139,2672,6818,676,8968,9275,4467,9365,8961,9636],"./descope-user-attribute/index.js":[45554,2672,6818,676,8968,9275,5260,4467,9365,8961,1578],"./descope-user-auth-method/index.js":[67760,2672,6818,676,8968,9275,5260,4467,9365,8961,9990],"./mapping-fields/descope-mappings-field/descope-mapping-item/index.js":[29172,2672,9365,2230],"./mapping-fields/descope-mappings-field/descope-mappings-field-internal/index.js":[34884,2672,9365,9522],"./mapping-fields/descope-mappings-field/index.js":[84719,2672,6818,676,8968,9275,8248,7620,5260,4467,7182,8618,4914,9871,7774,4550,9365,8961,7092,7095],"./mapping-fields/descope-saml-group-mappings/descope-saml-group-mappings-internal/index.js":[9894,2672,9365,9708],"./mapping-fields/descope-saml-group-mappings/index.js":[45103,2672,6818,676,8968,9275,8248,7620,5260,4467,7182,8618,4914,9871,7774,4550,9365,8961,7092,6832],"./phone-fields/descope-phone-field/descope-phone-field-internal/index.js":[92132,2672,6818,676,8968,9275,8248,7620,5260,7182,8618,4914,9871,5348,3620,9365,8961,7092,2739,2878],"./phone-fields/descope-phone-field/index.js":[98136,2672,6818,676,8968,9275,8248,7620,5260,7182,8618,4914,9871,5348,3620,9365,8961,7092,2739,9894],"./phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/index.js":[78343,2672,6818,676,8968,9275,8248,7620,5260,7182,5348,9365,2739,8657],"./phone-fields/descope-phone-input-box-field/index.js":[30057,2672,6818,676,8968,9275,8248,7620,5260,7182,5348,9365,2739,4043]};function o(e){if(!n.o(r,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],o=t[0];return Promise.all(t.slice(1).map(n.e)).then((()=>n(o)))}o.keys=()=>Object.keys(r),o.id=97301,e.exports=o},97810:(e,t,n)=>{"use strict";n.d(t,{EA:()=>l,Ge:()=>s,Gh:()=>a,Ix:()=>p,mx:()=>i,q:()=>u,xE:()=>d});var r=n(9696),o=n(3047);const i=(e,t,{excludeAttrs:n=[],includeAttrs:r=[]})=>{const o=Array.from(e.attributes).filter((e=>!n.includes(e.name)&&(!r.length||r.includes(e.name)))).map((e=>e.name));t(o),new MutationObserver((e=>{e.forEach((e=>{"attributes"!==e.type||n.includes(e.attributeName)||r.length&&!r.includes(e.attributeName)||t([e.attributeName])}))})).observe(e,{attributes:!0})},s=(e,t)=>{t({addedNodes:Array.from(e.children),removedNodes:[]}),new MutationObserver((e=>{e.forEach((e=>{"childList"!==e.type&&"characterData"!==e.type||t(e)}))})).observe(e,{childList:!0,characterData:!0,subtree:!0})},c=(e,t,n={})=>r=>{r.forEach((r=>{const o=n[r]||r,i=e.getAttribute(r);null!==i?t.getAttribute(o)!==i&&t.setAttribute(o,i):t.removeAttribute(o)}))},a=(e,t,n)=>{i(e,c(e,t),n),i(t,c(t,e),n)},d=e=>(0,r.GL)(o.$m,e),p=(...e)=>`--${(0,r.GL)(...e)}`,l=(e,t,n={})=>{i(e,c(e,t,n.mapAttrs),n)},u=(e,t,n=[])=>{if(!n.length)return;const r=n.reduce(((t,n)=>Object.assign(t,{[n]:{get:()=>e[n],set(t){e[n]=t}}})),{});Object.defineProperties(t,r)}}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={id:e,loaded:!1,exports:{}};return r[e](n,n.exports,i),n.loaded=!0,n.exports}i.m=r,e=[],i.O=(t,n,r,o)=>{if(!n){var s=1/0;for(p=0;p<e.length;p++){for(var[n,r,o]=e[p],c=!0,a=0;a<n.length;a++)(!1&o||s>=o)&&Object.keys(i.O).every((e=>i.O[e](n[a])))?n.splice(a--,1):(c=!1,o<s&&(s=o));if(c){e.splice(p--,1);var d=r();void 0!==d&&(t=d)}}return t}o=o||0;for(var p=e.length;p>0&&e[p-1][2]>o;p--)e[p]=e[p-1];e[p]=[n,r,o]},i.F={},i.E=e=>{Object.keys(i.F).map((t=>{i.F[t](e)}))},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,n)=>(i.f[n](e,t),t)),[])),i.u=e=>(({230:"descope-third-party-app-logo-index-js",743:"descope-timer-button",1202:"descope-image",1239:"descope-logo-index-js",1331:"descope-multi-select-combo-box-index-js",1448:"boolean-fields-descope-switch-toggle-index-js",1456:"descope-alert-index-js",1578:"descope-user-attribute-index-js",1674:"descope-scopes-list-index-js",1837:"button-selection-group-fields-descope-button-selection-group-item-index-js",2141:"button-selection-group-fields-descope-button-selection-group-index-js",2200:"descope-grid-index-js",2230:"mapping-fields-descope-mappings-field-descope-mapping-item-index-js",2250:"descope-timer",2251:"descope-notp-image-index-js",2272:"descope-avatar",2294:"descope-text",2381:"descope-grid-descope-grid-item-details-column-index-js",2878:"phone-fields-descope-phone-field-descope-phone-field-internal-index-js",2996:"descope-policy-validation-index-js",3057:"descope-apps-list-index-js",3305:"descope-grid-descope-grid-selection-column-index-js",3359:"descope-passcode-descope-passcode-internal-index-js",3521:"descope-code-snippet-index-js",3594:"descope-security-questions-setup-index-js",3829:"button-selection-group-fields-descope-button-multi-selection-group-index-js",3847:"descope-recaptcha-index-js",4043:"phone-fields-descope-phone-input-box-field-index-js",4139:"descope-modal-index-js",4159:"descope-link",4364:"descope-new-password-index-js",4838:"boolean-fields-descope-checkbox-index-js",5087:"descope-button",5166:"descope-text-field-index-js",5686:"descope-text-area-index-js",5691:"descope-combo-box",5695:"descope-email-field-index-js",6028:"descope-date-field-descope-calendar-index-js",6213:"descope-totp-image-index-js",6367:"descope-collapsible-container",6724:"descope-icon",6832:"mapping-fields-descope-saml-group-mappings-index-js",6969:"descope-password-index-js",7079:"button-selection-group-fields-descope-button-selection-group-internal-index-js",7095:"mapping-fields-descope-mappings-field-index-js",7163:"descope-loader-radial-index-js",7299:"descope-hybrid-field-index-js",7326:"descope-notification-descope-notification-card-index-js",7362:"boolean-fields-descope-boolean-field-internal-index-js",7470:"descope-hcaptcha-index-js",7640:"descope-list-index-js",7944:"descope-number-field-index-js",8009:"descope-loader-linear-index-js",8019:"descope-notification-index-js",8108:"descope-grid-descope-grid-text-column-index-js",8399:"button-selection-group-fields-descope-button-multi-selection-group-internal-index-js",8603:"descope-new-password-descope-new-password-internal-index-js",8657:"phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js",8689:"descope-container-index-js",8712:"descope-autocomplete-field",8819:"descope-divider-index-js",8822:"descope-address-field",8884:"descope-passcode-index-js",9175:"descope-recovery-codes",9176:"descope-grid-descope-grid-custom-column-index-js",9257:"descope-date-field-index-js",9261:"descope-enriched-text",9399:"descope-radio-group-index-js",9446:"descope-security-questions-verify-index-js",9458:"descope-password-strength",9522:"mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js",9553:"descope-badge-index-js",9636:"descope-upload-file-index-js",9708:"mapping-fields-descope-saml-group-mappings-descope-saml-group-mappings-internal-index-js",9894:"phone-fields-descope-phone-field-index-js",9990:"descope-user-auth-method-index-js"}[e]||e)+".js"),i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},n="@descope/web-components-ui:",i.l=(e,r,o,s)=>{if(t[e])t[e].push(r);else{var c,a;if(void 0!==o)for(var d=document.getElementsByTagName("script"),p=0;p<d.length;p++){var l=d[p];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==n+o){c=l;break}}c||(a=!0,(c=document.createElement("script")).charset="utf-8",c.timeout=120,i.nc&&c.setAttribute("nonce",i.nc),c.setAttribute("data-webpack",n+o),c.src=e),t[e]=[r];var u=(n,r)=>{c.onerror=c.onload=null,clearTimeout(f);var o=t[e];if(delete t[e],c.parentNode&&c.parentNode.removeChild(c),o&&o.forEach((e=>e(r))),n)return n(r)},f=setTimeout(u.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=u.bind(null,c.onerror),c.onload=u.bind(null,c.onload),a&&document.head.appendChild(c)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e={5536:0};i.f.j=(t,n)=>{var r=i.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var s=i.p+i.u(t),c=new Error;i.l(s,(n=>{if(i.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.src;c.message="Loading chunk "+t+" failed.\n("+o+": "+s+")",c.name="ChunkLoadError",c.type=o,c.request=s,r[1](c)}}),"chunk-"+t,t)}},i.F.j=t=>{if(!i.o(e,t)||void 0===e[t]){e[t]=null;var n=document.createElement("link");n.charset="utf-8",i.nc&&n.setAttribute("nonce",i.nc),n.rel="prefetch",n.as="script",n.href=i.p+i.u(t),document.head.appendChild(n)}},i.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,[s,c,a]=n,d=0;if(s.some((t=>0!==e[t]))){for(r in c)i.o(c,r)&&(i.m[r]=c[r]);if(a)var p=a(i)}for(t&&t(n);d<s.length;d++)o=s[d],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return i.O(p)},n=self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),i.O(0,[5536],(()=>{[2672,6818,676,8968,9275,8248,7620,8618,4914,9871,7774,8961,7092,8822,8712,5260,7182,1995,2272,4467,5087,5414,6367,5691,2540,9261,6724,1202,4159,9458,6063,9175,2294,2250,743,9365,7362,7291,4838,1448,8399,1837,3829,7079,2141,1456,3057,9553,5780,3521,8689,4518,6028,1519,9257,8819,5695,7565,9176,2381,3305,8108,9970,2200,7470,5348,3620,2739,9894,7299,7640,8009,7163,1239,9117,4139,1408,1331,8603,1899,4364,8983,7326,8019,2251,5648,7944,3359,8884,6969,2996,4623,9399,3847,1674,6477,3594,9446,7939,5686,5166,230,6213,9636,1578,9990,2230,9522,4550,7095,9708,6832,2878,8657,4043].map(i.E)}),5);var s=i(25990);return i.O(s)})()));
|
2
2
|
//# sourceMappingURL=index.js.map
|