@pontive/pontkit-core 1.7.4 → 1.7.6

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/index.js CHANGED
@@ -45,7 +45,7 @@
45
45
  .wrapper {
46
46
  display: block;
47
47
  }
48
- `;let Us=Rl;customElements.define("pont-shadow-wrapper",Us);function Ep(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=Ep(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function ja(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=Ep(e))&&(o&&(o+=" "),o+=t);return o}const qa="-",Au=e=>{const t=Du(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:s=>{const d=s.split(qa);return d[0]===""&&d.length!==1&&d.shift(),Sp(d,t)||Tu(s)},getConflictingClassGroupIds:(s,d)=>{const c=r[s]||[];return d&&o[s]?[...c,...o[s]]:c}}},Sp=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),n=o?Sp(e.slice(1),o):void 0;if(n)return n;if(t.validators.length===0)return;const i=e.join(qa);return(s=t.validators.find(({validator:d})=>d(i)))==null?void 0:s.classGroupId},Vl=/^\[(.+)\]$/,Tu=e=>{if(Vl.test(e)){const t=Vl.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Du=e=>{const{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Fu(Object.entries(e.classGroups),r).forEach(([i,s])=>{js(s,o,i,t)}),o},js=(e,t,r,o)=>{e.forEach(n=>{if(typeof n=="string"){const i=n===""?t:Hl(t,n);i.classGroupId=r;return}if(typeof n=="function"){if(Lu(n)){js(n(o),t,r,o);return}t.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([i,s])=>{js(s,Hl(t,i),r,o)})})},Hl=(e,t)=>{let r=e;return t.split(qa).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Lu=e=>e.isThemeGetter,Fu=(e,t)=>t?e.map(([r,o])=>{const n=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,d])=>[t+s,d])):i);return[r,n]}):e,ku=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map;const n=(i,s)=>{r.set(i,s),t++,t>e&&(t=0,o=r,r=new Map)};return{get(i){let s=r.get(i);if(s!==void 0)return s;if((s=o.get(i))!==void 0)return n(i,s),s},set(i,s){r.has(i)?r.set(i,s):n(i,s)}}},xp="!",Nu=e=>{const{separator:t,experimentalParseClassName:r}=e,o=t.length===1,n=t[0],i=t.length,s=d=>{const c=[];let u=0,v=0,b;for(let O=0;O<d.length;O++){let S=d[O];if(u===0){if(S===n&&(o||d.slice(O,O+i)===t)){c.push(d.slice(v,O)),v=O+i;continue}if(S==="/"){b=O;continue}}S==="["?u++:S==="]"&&u--}const w=c.length===0?d:d.substring(v),_=w.startsWith(xp),C=_?w.substring(1):w,P=b&&b>v?b-v:void 0;return{modifiers:c,hasImportantModifier:_,baseClassName:C,maybePostfixModifierPosition:P}};return r?d=>r({className:d,parseClassName:s}):s},Mu=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},Bu=e=>({cache:ku(e.cacheSize),parseClassName:Nu(e),...Au(e)}),Uu=/\s+/,ju=(e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,i=[],s=e.trim().split(Uu);let d="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{modifiers:v,hasImportantModifier:b,baseClassName:w,maybePostfixModifierPosition:_}=r(u);let C=!!_,P=o(C?w.substring(0,_):w);if(!P){if(!C){d=u+(d.length>0?" "+d:d);continue}if(P=o(w),!P){d=u+(d.length>0?" "+d:d);continue}C=!1}const O=Mu(v).join(":"),S=b?O+xp:O,D=S+P;if(i.includes(D))continue;i.push(D);const L=n(P,C);for(let I=0;I<L.length;++I){const Q=L[I];i.push(S+Q)}d=u+(d.length>0?" "+d:d)}return d};function qu(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Op(t))&&(o&&(o+=" "),o+=r);return o}const Op=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Op(e[o]))&&(r&&(r+=" "),r+=t);return r};function zu(e,...t){let r,o,n,i=s;function s(c){const u=t.reduce((v,b)=>b(v),e());return r=Bu(u),o=r.cache.get,n=r.cache.set,i=d,d(c)}function d(c){const u=o(c);if(u)return u;const v=ju(c,r);return n(c,v),v}return function(){return i(qu.apply(null,arguments))}}const Z=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Rp=/^\[(?:([a-z-]+):)?(.+)\]$/i,Vu=/^\d+\/\d+$/,Hu=new Set(["px","full","screen"]),Gu=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ku=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Wu=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Yu=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Qu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ve=e=>yn(e)||Hu.has(e)||Vu.test(e),or=e=>In(e,"length",om),yn=e=>!!e&&!Number.isNaN(Number(e)),ls=e=>In(e,"number",yn),Zn=e=>!!e&&Number.isInteger(Number(e)),Zu=e=>e.endsWith("%")&&yn(e.slice(0,-1)),B=e=>Rp.test(e),ir=e=>Gu.test(e),Ju=new Set(["length","size","percentage"]),Xu=e=>In(e,Ju,Ip),tm=e=>In(e,"position",Ip),em=new Set(["image","url"]),rm=e=>In(e,em,sm),nm=e=>In(e,"",im),Jn=()=>!0,In=(e,t,r)=>{const o=Rp.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},om=e=>Ku.test(e)&&!Wu.test(e),Ip=()=>!1,im=e=>Yu.test(e),sm=e=>Qu.test(e),am=()=>{const e=Z("colors"),t=Z("spacing"),r=Z("blur"),o=Z("brightness"),n=Z("borderColor"),i=Z("borderRadius"),s=Z("borderSpacing"),d=Z("borderWidth"),c=Z("contrast"),u=Z("grayscale"),v=Z("hueRotate"),b=Z("invert"),w=Z("gap"),_=Z("gradientColorStops"),C=Z("gradientColorStopPositions"),P=Z("inset"),O=Z("margin"),S=Z("opacity"),D=Z("padding"),L=Z("saturate"),I=Z("scale"),Q=Z("sepia"),R=Z("skew"),A=Z("space"),T=Z("translate"),x=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",B,t],$=()=>[B,t],k=()=>["",Ve,or],M=()=>["auto",yn,B],te=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],me=()=>["solid","dashed","dotted","double","none"],jo=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],an=()=>["start","end","center","between","around","evenly","stretch"],xr=()=>["","0",B],ln=()=>["auto","avoid","all","avoid-page","page","left","right","column"],It=()=>[yn,B];return{cacheSize:500,separator:":",theme:{colors:[Jn],spacing:[Ve,or],blur:["none","",ir,B],brightness:It(),borderColor:[e],borderRadius:["none","","full",ir,B],borderSpacing:$(),borderWidth:k(),contrast:It(),grayscale:xr(),hueRotate:It(),invert:xr(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[Zu,or],inset:F(),margin:F(),opacity:It(),padding:$(),saturate:It(),scale:It(),sepia:xr(),skew:It(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",B]}],container:["container"],columns:[{columns:[ir]}],"break-after":[{"break-after":ln()}],"break-before":[{"break-before":ln()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...te(),B]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:x()}],"overscroll-x":[{"overscroll-x":x()}],"overscroll-y":[{"overscroll-y":x()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[P]}],"inset-x":[{"inset-x":[P]}],"inset-y":[{"inset-y":[P]}],start:[{start:[P]}],end:[{end:[P]}],top:[{top:[P]}],right:[{right:[P]}],bottom:[{bottom:[P]}],left:[{left:[P]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Zn,B]}],basis:[{basis:F()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",B]}],grow:[{grow:xr()}],shrink:[{shrink:xr()}],order:[{order:["first","last","none",Zn,B]}],"grid-cols":[{"grid-cols":[Jn]}],"col-start-end":[{col:["auto",{span:["full",Zn,B]},B]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[Jn]}],"row-start-end":[{row:["auto",{span:[Zn,B]},B]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",B]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",B]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:["normal",...an()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...an(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...an(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[D]}],px:[{px:[D]}],py:[{py:[D]}],ps:[{ps:[D]}],pe:[{pe:[D]}],pt:[{pt:[D]}],pr:[{pr:[D]}],pb:[{pb:[D]}],pl:[{pl:[D]}],m:[{m:[O]}],mx:[{mx:[O]}],my:[{my:[O]}],ms:[{ms:[O]}],me:[{me:[O]}],mt:[{mt:[O]}],mr:[{mr:[O]}],mb:[{mb:[O]}],ml:[{ml:[O]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",B,t]}],"min-w":[{"min-w":[B,t,"min","max","fit"]}],"max-w":[{"max-w":[B,t,"none","full","min","max","fit","prose",{screen:[ir]},ir]}],h:[{h:[B,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[B,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[B,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[B,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ir,or]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ls]}],"font-family":[{font:[Jn]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",B]}],"line-clamp":[{"line-clamp":["none",yn,ls]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ve,B]}],"list-image":[{"list-image":["none",B]}],"list-style-type":[{list:["none","disc","decimal",B]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ve,or]}],"underline-offset":[{"underline-offset":["auto",Ve,B]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",B]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",B]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...te(),tm]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Xu]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},rm]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[C]}],"gradient-via-pos":[{via:[C]}],"gradient-to-pos":[{to:[C]}],"gradient-from":[{from:[_]}],"gradient-via":[{via:[_]}],"gradient-to":[{to:[_]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...me(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:me()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...me()]}],"outline-offset":[{"outline-offset":[Ve,B]}],"outline-w":[{outline:[Ve,or]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:k()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[Ve,or]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ir,nm]}],"shadow-color":[{shadow:[Jn]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...jo(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":jo()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",ir,B]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[b]}],saturate:[{saturate:[L]}],sepia:[{sepia:[Q]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v]}],"backdrop-invert":[{"backdrop-invert":[b]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[L]}],"backdrop-sepia":[{"backdrop-sepia":[Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",B]}],duration:[{duration:It()}],ease:[{ease:["linear","in","out","in-out",B]}],delay:[{delay:It()}],animate:[{animate:["none","spin","ping","pulse","bounce",B]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[I]}],"scale-x":[{"scale-x":[I]}],"scale-y":[{"scale-y":[I]}],rotate:[{rotate:[Zn,B]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[R]}],"skew-y":[{"skew-y":[R]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",B]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",B]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",B]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ve,or,ls]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Ap=zu(am);function m(...e){return Ap(ja(e))}/**
48
+ `;let Us=Rl;customElements.define("pont-shadow-wrapper",Us);function Ep(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=Ep(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function ja(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=Ep(e))&&(o&&(o+=" "),o+=t);return o}const qa="-",Au=e=>{const t=Du(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:s=>{const d=s.split(qa);return d[0]===""&&d.length!==1&&d.shift(),Sp(d,t)||Tu(s)},getConflictingClassGroupIds:(s,d)=>{const c=r[s]||[];return d&&o[s]?[...c,...o[s]]:c}}},Sp=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),n=o?Sp(e.slice(1),o):void 0;if(n)return n;if(t.validators.length===0)return;const i=e.join(qa);return(s=t.validators.find(({validator:d})=>d(i)))==null?void 0:s.classGroupId},Vl=/^\[(.+)\]$/,Tu=e=>{if(Vl.test(e)){const t=Vl.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Du=e=>{const{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Fu(Object.entries(e.classGroups),r).forEach(([i,s])=>{js(s,o,i,t)}),o},js=(e,t,r,o)=>{e.forEach(n=>{if(typeof n=="string"){const i=n===""?t:Hl(t,n);i.classGroupId=r;return}if(typeof n=="function"){if(Lu(n)){js(n(o),t,r,o);return}t.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([i,s])=>{js(s,Hl(t,i),r,o)})})},Hl=(e,t)=>{let r=e;return t.split(qa).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Lu=e=>e.isThemeGetter,Fu=(e,t)=>t?e.map(([r,o])=>{const n=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,d])=>[t+s,d])):i);return[r,n]}):e,ku=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map;const n=(i,s)=>{r.set(i,s),t++,t>e&&(t=0,o=r,r=new Map)};return{get(i){let s=r.get(i);if(s!==void 0)return s;if((s=o.get(i))!==void 0)return n(i,s),s},set(i,s){r.has(i)?r.set(i,s):n(i,s)}}},xp="!",Nu=e=>{const{separator:t,experimentalParseClassName:r}=e,o=t.length===1,n=t[0],i=t.length,s=d=>{const c=[];let u=0,v=0,b;for(let O=0;O<d.length;O++){let S=d[O];if(u===0){if(S===n&&(o||d.slice(O,O+i)===t)){c.push(d.slice(v,O)),v=O+i;continue}if(S==="/"){b=O;continue}}S==="["?u++:S==="]"&&u--}const w=c.length===0?d:d.substring(v),_=w.startsWith(xp),C=_?w.substring(1):w,P=b&&b>v?b-v:void 0;return{modifiers:c,hasImportantModifier:_,baseClassName:C,maybePostfixModifierPosition:P}};return r?d=>r({className:d,parseClassName:s}):s},Mu=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},Bu=e=>({cache:ku(e.cacheSize),parseClassName:Nu(e),...Au(e)}),Uu=/\s+/,ju=(e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,i=[],s=e.trim().split(Uu);let d="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{modifiers:v,hasImportantModifier:b,baseClassName:w,maybePostfixModifierPosition:_}=r(u);let C=!!_,P=o(C?w.substring(0,_):w);if(!P){if(!C){d=u+(d.length>0?" "+d:d);continue}if(P=o(w),!P){d=u+(d.length>0?" "+d:d);continue}C=!1}const O=Mu(v).join(":"),S=b?O+xp:O,D=S+P;if(i.includes(D))continue;i.push(D);const L=n(P,C);for(let I=0;I<L.length;++I){const Q=L[I];i.push(S+Q)}d=u+(d.length>0?" "+d:d)}return d};function qu(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Op(t))&&(o&&(o+=" "),o+=r);return o}const Op=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Op(e[o]))&&(r&&(r+=" "),r+=t);return r};function zu(e,...t){let r,o,n,i=s;function s(c){const u=t.reduce((v,b)=>b(v),e());return r=Bu(u),o=r.cache.get,n=r.cache.set,i=d,d(c)}function d(c){const u=o(c);if(u)return u;const v=ju(c,r);return n(c,v),v}return function(){return i(qu.apply(null,arguments))}}const Z=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Rp=/^\[(?:([a-z-]+):)?(.+)\]$/i,Vu=/^\d+\/\d+$/,Hu=new Set(["px","full","screen"]),Gu=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ku=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Wu=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Yu=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Qu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ve=e=>yn(e)||Hu.has(e)||Vu.test(e),or=e=>In(e,"length",om),yn=e=>!!e&&!Number.isNaN(Number(e)),ls=e=>In(e,"number",yn),Zn=e=>!!e&&Number.isInteger(Number(e)),Zu=e=>e.endsWith("%")&&yn(e.slice(0,-1)),B=e=>Rp.test(e),ir=e=>Gu.test(e),Ju=new Set(["length","size","percentage"]),Xu=e=>In(e,Ju,Ip),tm=e=>In(e,"position",Ip),em=new Set(["image","url"]),rm=e=>In(e,em,sm),nm=e=>In(e,"",im),Jn=()=>!0,In=(e,t,r)=>{const o=Rp.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},om=e=>Ku.test(e)&&!Wu.test(e),Ip=()=>!1,im=e=>Yu.test(e),sm=e=>Qu.test(e),am=()=>{const e=Z("colors"),t=Z("spacing"),r=Z("blur"),o=Z("brightness"),n=Z("borderColor"),i=Z("borderRadius"),s=Z("borderSpacing"),d=Z("borderWidth"),c=Z("contrast"),u=Z("grayscale"),v=Z("hueRotate"),b=Z("invert"),w=Z("gap"),_=Z("gradientColorStops"),C=Z("gradientColorStopPositions"),P=Z("inset"),O=Z("margin"),S=Z("opacity"),D=Z("padding"),L=Z("saturate"),I=Z("scale"),Q=Z("sepia"),R=Z("skew"),A=Z("space"),T=Z("translate"),x=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",B,t],$=()=>[B,t],k=()=>["",Ve,or],M=()=>["auto",yn,B],Xt=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],me=()=>["solid","dashed","dotted","double","none"],jo=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],an=()=>["start","end","center","between","around","evenly","stretch"],xr=()=>["","0",B],ln=()=>["auto","avoid","all","avoid-page","page","left","right","column"],It=()=>[yn,B];return{cacheSize:500,separator:":",theme:{colors:[Jn],spacing:[Ve,or],blur:["none","",ir,B],brightness:It(),borderColor:[e],borderRadius:["none","","full",ir,B],borderSpacing:$(),borderWidth:k(),contrast:It(),grayscale:xr(),hueRotate:It(),invert:xr(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[Zu,or],inset:F(),margin:F(),opacity:It(),padding:$(),saturate:It(),scale:It(),sepia:xr(),skew:It(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",B]}],container:["container"],columns:[{columns:[ir]}],"break-after":[{"break-after":ln()}],"break-before":[{"break-before":ln()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Xt(),B]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:x()}],"overscroll-x":[{"overscroll-x":x()}],"overscroll-y":[{"overscroll-y":x()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[P]}],"inset-x":[{"inset-x":[P]}],"inset-y":[{"inset-y":[P]}],start:[{start:[P]}],end:[{end:[P]}],top:[{top:[P]}],right:[{right:[P]}],bottom:[{bottom:[P]}],left:[{left:[P]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Zn,B]}],basis:[{basis:F()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",B]}],grow:[{grow:xr()}],shrink:[{shrink:xr()}],order:[{order:["first","last","none",Zn,B]}],"grid-cols":[{"grid-cols":[Jn]}],"col-start-end":[{col:["auto",{span:["full",Zn,B]},B]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[Jn]}],"row-start-end":[{row:["auto",{span:[Zn,B]},B]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",B]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",B]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:["normal",...an()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...an(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...an(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[D]}],px:[{px:[D]}],py:[{py:[D]}],ps:[{ps:[D]}],pe:[{pe:[D]}],pt:[{pt:[D]}],pr:[{pr:[D]}],pb:[{pb:[D]}],pl:[{pl:[D]}],m:[{m:[O]}],mx:[{mx:[O]}],my:[{my:[O]}],ms:[{ms:[O]}],me:[{me:[O]}],mt:[{mt:[O]}],mr:[{mr:[O]}],mb:[{mb:[O]}],ml:[{ml:[O]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",B,t]}],"min-w":[{"min-w":[B,t,"min","max","fit"]}],"max-w":[{"max-w":[B,t,"none","full","min","max","fit","prose",{screen:[ir]},ir]}],h:[{h:[B,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[B,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[B,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[B,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ir,or]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ls]}],"font-family":[{font:[Jn]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",B]}],"line-clamp":[{"line-clamp":["none",yn,ls]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ve,B]}],"list-image":[{"list-image":["none",B]}],"list-style-type":[{list:["none","disc","decimal",B]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ve,or]}],"underline-offset":[{"underline-offset":["auto",Ve,B]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",B]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",B]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Xt(),tm]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Xu]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},rm]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[C]}],"gradient-via-pos":[{via:[C]}],"gradient-to-pos":[{to:[C]}],"gradient-from":[{from:[_]}],"gradient-via":[{via:[_]}],"gradient-to":[{to:[_]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...me(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:me()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...me()]}],"outline-offset":[{"outline-offset":[Ve,B]}],"outline-w":[{outline:[Ve,or]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:k()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[Ve,or]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ir,nm]}],"shadow-color":[{shadow:[Jn]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...jo(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":jo()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",ir,B]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[b]}],saturate:[{saturate:[L]}],sepia:[{sepia:[Q]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v]}],"backdrop-invert":[{"backdrop-invert":[b]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[L]}],"backdrop-sepia":[{"backdrop-sepia":[Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",B]}],duration:[{duration:It()}],ease:[{ease:["linear","in","out","in-out",B]}],delay:[{delay:It()}],animate:[{animate:["none","spin","ping","pulse","bounce",B]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[I]}],"scale-x":[{"scale-x":[I]}],"scale-y":[{"scale-y":[I]}],rotate:[{rotate:[Zn,B]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[R]}],"skew-y":[{"skew-y":[R]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",B]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",B]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",B]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ve,or,ls]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Ap=zu(am);function m(...e){return Ap(ja(e))}/**
49
49
  * @license
50
50
  * Copyright 2017 Google LLC
51
51
  * SPDX-License-Identifier: BSD-3-Clause
@@ -554,7 +554,7 @@
554
554
  </div>
555
555
  </div>
556
556
  </div>
557
- `}};Dn([a({type:Number})],kr.prototype,"currentIndex",2);Dn([a({type:Array})],kr.prototype,"items",2);Dn([a({type:String})],kr.prototype,"orientation",2);Dn([a({type:Boolean})],kr.prototype,"size",2);Dn([Po(".slides")],kr.prototype,"slides",2);kr=Dn([p("pont-carousel")],kr);var jg=Object.defineProperty,qg=Object.getOwnPropertyDescriptor,Ie=(e,t,r,o)=>{for(var n=o>1?void 0:o?qg(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&jg(t,r,n),n};let oe=class extends f{constructor(){super(...arguments),this.value="on"}createRenderRoot(){return this}_isControlled(){return this.checked!==void 0}_getState(){return this._checked?"checked":"unchecked"}updated(e){e.has("checked")&&this._isControlled()&&(this._checked=this.checked)}firstUpdated(e){this._checked=this.defaultChecked||this.checked}_handleClick(){if(this.disabled)return;const e=!this._checked;this._isControlled()||(this._checked=e),this.dispatchEvent(new CustomEvent("pont-checkbox:checked-change",{detail:{checked:e},bubbles:!0,composed:!0})),this.onCheckedChange!==void 0&&this.onCheckedChange(e)}_renderIndicator(){return this._checked?l`
557
+ `}};Dn([a({type:Number})],kr.prototype,"currentIndex",2);Dn([a({type:Array})],kr.prototype,"items",2);Dn([a({type:String})],kr.prototype,"orientation",2);Dn([a({type:Boolean})],kr.prototype,"size",2);Dn([Po(".slides")],kr.prototype,"slides",2);kr=Dn([p("pont-carousel")],kr);var jg=Object.defineProperty,qg=Object.getOwnPropertyDescriptor,Ie=(e,t,r,o)=>{for(var n=o>1?void 0:o?qg(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&jg(t,r,n),n};let ne=class extends f{constructor(){super(...arguments),this.value="on"}createRenderRoot(){return this}_isControlled(){return this.checked!==void 0}_getState(){return this._checked?"checked":"unchecked"}updated(e){e.has("checked")&&this._isControlled()&&(this._checked=this.checked)}firstUpdated(e){this._checked=this.defaultChecked||this.checked}_handleClick(){if(this.disabled)return;const e=!this._checked;this._isControlled()||(this._checked=e),this.dispatchEvent(new CustomEvent("pont-checkbox:checked-change",{detail:{checked:e},bubbles:!0,composed:!0})),this.onCheckedChange!==void 0&&this.onCheckedChange(e)}_renderIndicator(){return this._checked?l`
558
558
  <span
559
559
  data-slot="checkbox-indicator"
560
560
  data-state=${this._getState()}
@@ -592,7 +592,7 @@
592
592
  </button>
593
593
 
594
594
  ${this._renderInput()}
595
- `}};Ie([a({attribute:"default-checked",type:Boolean})],oe.prototype,"defaultChecked",2);Ie([a({attribute:!0,type:Boolean})],oe.prototype,"checked",2);Ie([a({attribute:!1,type:Function})],oe.prototype,"onCheckedChange",2);Ie([a({type:Boolean})],oe.prototype,"disabled",2);Ie([a({type:Boolean})],oe.prototype,"required",2);Ie([a({type:Boolean})],oe.prototype,"invalid",2);Ie([a({type:String})],oe.prototype,"name",2);Ie([a({type:String})],oe.prototype,"value",2);Ie([g()],oe.prototype,"_checked",2);oe=Ie([p("pont-checkbox")],oe);var zg=Object.getOwnPropertyDescriptor,Vg=(e,t,r,o)=>{for(var n=o>1?void 0:o?zg(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let ud=class extends y{getAttributesToExclude(){return[""]}get _containerElement(){return this.querySelector("div[part=collapsible-trigger]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}get _collapsible(){let e=this.parentElement;for(;e&&!(e instanceof ii);)e=e.parentElement;return e}onTrigger(){const e=this._collapsible;e&&(e.open=!e.open,this.dispatchEvent(new CustomEvent("click-collapsible-event",{bubbles:!0,composed:!0})))}render(){const e=this.getFilteredAttributes();return l`
595
+ `}};Ie([a({attribute:"default-checked",type:Boolean})],ne.prototype,"defaultChecked",2);Ie([a({attribute:!0,type:Boolean})],ne.prototype,"checked",2);Ie([a({attribute:!1,type:Function})],ne.prototype,"onCheckedChange",2);Ie([a({type:Boolean})],ne.prototype,"disabled",2);Ie([a({type:Boolean})],ne.prototype,"required",2);Ie([a({type:Boolean})],ne.prototype,"invalid",2);Ie([a({type:String})],ne.prototype,"name",2);Ie([a({type:String})],ne.prototype,"value",2);Ie([g()],ne.prototype,"_checked",2);ne=Ie([p("pont-checkbox")],ne);var zg=Object.getOwnPropertyDescriptor,Vg=(e,t,r,o)=>{for(var n=o>1?void 0:o?zg(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let ud=class extends y{getAttributesToExclude(){return[""]}get _containerElement(){return this.querySelector("div[part=collapsible-trigger]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}get _collapsible(){let e=this.parentElement;for(;e&&!(e instanceof ii);)e=e.parentElement;return e}onTrigger(){const e=this._collapsible;e&&(e.open=!e.open,this.dispatchEvent(new CustomEvent("click-collapsible-event",{bubbles:!0,composed:!0})))}render(){const e=this.getFilteredAttributes();return l`
596
596
  <div
597
597
  @click=${this.onTrigger}
598
598
  ${Et(e)}
@@ -665,7 +665,7 @@
665
665
  ${this.renderFilteredItems()}
666
666
  </div>
667
667
  </div>
668
- `}};So([g()],Nr.prototype,"searchKey",2);So([g()],Nr.prototype,"focusedIndex",2);So([g()],Nr.prototype,"selectedValue",2);So([g()],Nr.prototype,"isOpen",2);Nr=So([p("pont-combo-box-group")],Nr);var nf=Object.defineProperty,of=Object.getOwnPropertyDescriptor,le=(e,t,r,o)=>{for(var n=o>1?void 0:o?of(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&nf(t,r,n),n};let Ht=class extends y{constructor(){super(...arguments),this.value="",this.key="",this.tabindex=0,this.isSelected=!1,this.isFocus=!1,this.class="",this.selectItemIndex=-1,this.onSelect=(e,t)=>{},this.onMouseOver=(e,t)=>{},this.handleClick=e=>{this.onSelect(this.value,this.selectItemIndex),e.stopPropagation();const t=new CustomEvent("clicked-combo-box-item",{bubbles:!0,composed:!0,detail:{selectedItem:this.value}});this.dispatchEvent(t)}}getAttributesToExclude(){return["aria-orientation","role","data-orientation","data-testid"]}connectedCallback(){super.connectedCallback()}firstUpdated(e){this.moveLightDomChildrenInto(this.itemDivContainer)}createRenderRoot(){return this}render(){const e=this.getFilteredAttributes();return l`
668
+ `}};So([g()],Nr.prototype,"searchKey",2);So([g()],Nr.prototype,"focusedIndex",2);So([g()],Nr.prototype,"selectedValue",2);So([g()],Nr.prototype,"isOpen",2);Nr=So([p("pont-combo-box-group")],Nr);var nf=Object.defineProperty,of=Object.getOwnPropertyDescriptor,ae=(e,t,r,o)=>{for(var n=o>1?void 0:o?of(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&nf(t,r,n),n};let Vt=class extends y{constructor(){super(...arguments),this.value="",this.key="",this.tabindex=0,this.isSelected=!1,this.isFocus=!1,this.class="",this.selectItemIndex=-1,this.onSelect=(e,t)=>{},this.onMouseOver=(e,t)=>{},this.handleClick=e=>{this.onSelect(this.value,this.selectItemIndex),e.stopPropagation();const t=new CustomEvent("clicked-combo-box-item",{bubbles:!0,composed:!0,detail:{selectedItem:this.value}});this.dispatchEvent(t)}}getAttributesToExclude(){return["aria-orientation","role","data-orientation","data-testid"]}connectedCallback(){super.connectedCallback()}firstUpdated(e){this.moveLightDomChildrenInto(this.itemDivContainer)}createRenderRoot(){return this}render(){const e=this.getFilteredAttributes();return l`
669
669
  <div
670
670
  ${Et(e)}
671
671
  @click=${this.handleClick}
@@ -681,7 +681,7 @@
681
681
  ${Ng()}
682
682
  </span>
683
683
  </div>
684
- `}};le([a({type:String})],Ht.prototype,"value",2);le([a({type:String})],Ht.prototype,"key",2);le([a({type:Number})],Ht.prototype,"tabindex",2);le([a({type:Boolean})],Ht.prototype,"isSelected",2);le([a({type:Boolean})],Ht.prototype,"isFocus",2);le([a({type:String})],Ht.prototype,"class",2);le([a({type:Number})],Ht.prototype,"selectItemIndex",2);le([a({type:Function})],Ht.prototype,"onSelect",2);le([a({type:Function})],Ht.prototype,"onMouseOver",2);le([Po("#pont-combo-box-item")],Ht.prototype,"itemDivContainer",2);Ht=le([p("pont-combo-box-item")],Ht);var sf=Object.defineProperty,af=Object.getOwnPropertyDescriptor,Wa=(e,t,r,o)=>{for(var n=o>1?void 0:o?af(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&sf(t,r,n),n};let ai=class extends f{constructor(){super(...arguments),this.placeholder="Search Item ...",this.searchValue=""}get _comboBoxGroup(){let e=this.parentElement;for(;e&&!(e instanceof Nr);)e=e.parentElement;return e}handleSearch(e){e.stopPropagation();const t=e.target;this.searchValue=t.value,this._comboBoxGroup&&(this._comboBoxGroup.searchKey=this.searchValue)}handleKeyDown(e){e.stopPropagation()}createRenderRoot(){return this}render(){return l`
684
+ `}};ae([a({type:String})],Vt.prototype,"value",2);ae([a({type:String})],Vt.prototype,"key",2);ae([a({type:Number})],Vt.prototype,"tabindex",2);ae([a({type:Boolean})],Vt.prototype,"isSelected",2);ae([a({type:Boolean})],Vt.prototype,"isFocus",2);ae([a({type:String})],Vt.prototype,"class",2);ae([a({type:Number})],Vt.prototype,"selectItemIndex",2);ae([a({type:Function})],Vt.prototype,"onSelect",2);ae([a({type:Function})],Vt.prototype,"onMouseOver",2);ae([Po("#pont-combo-box-item")],Vt.prototype,"itemDivContainer",2);Vt=ae([p("pont-combo-box-item")],Vt);var sf=Object.defineProperty,af=Object.getOwnPropertyDescriptor,Wa=(e,t,r,o)=>{for(var n=o>1?void 0:o?af(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&sf(t,r,n),n};let ai=class extends f{constructor(){super(...arguments),this.placeholder="Search Item ...",this.searchValue=""}get _comboBoxGroup(){let e=this.parentElement;for(;e&&!(e instanceof Nr);)e=e.parentElement;return e}handleSearch(e){e.stopPropagation();const t=e.target;this.searchValue=t.value,this._comboBoxGroup&&(this._comboBoxGroup.searchKey=this.searchValue)}handleKeyDown(e){e.stopPropagation()}createRenderRoot(){return this}render(){return l`
685
685
  <div class="pont-flex pont-items-center pont-px-2">
686
686
  ${Fg()}
687
687
  <input
@@ -997,16 +997,16 @@
997
997
  <pont-calendar mode="single"></pont-calendar>
998
998
  </pont-popover-content>
999
999
  </pont-popover>
1000
- `}};Qp([a({type:Object})],ra.prototype,"selectedDate",2);ra=Qp([p("pont-date-picker")],ra);const ee={root:[""],trigger:[""],close:[""],overlay:["pont-fixed pont-inset-0 pont-z-50","pont-bg-dialog-overlay-color-bg","data-[state=open]:pont-animate-in data-[state=open]:pont-fade-in-0","data-[state=closed]:pont-animate-out data-[state=closed]:pont-fade-out-0"],content:{base:["pont-fixed pont-top-[50%] pont-left-[50%] pont-z-50","pont-grid pont-gap-dialog-content-space-gap","pont-p-dialog-content-space-p","pont-w-dialog-content-space-w pont-max-w-dialog-content-space-max-w-sm sm:pont-max-w-dialog-content-space-max-w","pont-bg-dialog-content-color-bg","pont-rounded-dialog-content-radius pont-border-dialog-content-width-border pont-border-dialog-content-color-border pont-outline-none","pont-shadow-dialog-content-shadow","pont-duration-200","pont-translate-x-[-50%] pont-translate-y-[-50%]","data-[state=open]:pont-animate-in data-[state=open]:pont-fade-in-0 data-[state=open]:pont-zoom-in-95","data-[state=closed]:pont-animate-out data-[state=closed]:pont-fade-out-0 data-[state=closed]:pont-zoom-out-95"],close:{base:["pont-absolute pont-top-4 pont-right-4","pont-rounded-dialog-close-radius","pont-ring-offset-dialog-close-color-ring-offset","pont-transition-opacity","focus:pont-ring-dialog-close-width-ring-focus focus:pont-ring-dialog-close-color-ring-focus focus:pont-ring-offset-dialog-close-width-ring-offset focus:pont-outline-hidden","disabled:pont-pointer-events-none","data-[state=open]:pont-bg-dialog-close-color-bg data-[state=open]:pont-text-dialog-close-color-text"],icon:["pont-shrink-0","pont-size-dialog-close-icon-space-size","pont-pointer-events-none"]}},header:["pont-flex pont-flex-col pont-gap-dialog-header-space-gap","pont-text-center","sm:pont-text-left"],footer:["pont-flex pont-flex-col-reverse pont-gap-dialog-footer-space-gap","sm:pont-flex-row sm:pont-justify-end"],title:["pont-text-dialog-title-font pont-font-dialog-title-font-weight"],description:["pont-text-dialog-description-font pont-font-dialog-description-font-weight pont-text-dialog-description-color-text"]};var Jf=Object.getOwnPropertyDescriptor,Xf=(e,t,r,o)=>{for(var n=o>1?void 0:o?Jf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};const tv="closed";let wd=class extends y{get _dialog(){let e=this.parentElement;for(;e;){if(e instanceof En)return e;e=e.parentElement}return e}get _containerElement(){return this.querySelector("div[part=dialog-close]")}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement),this.addEventListener("click",()=>{const t=this._dialog;t&&(t.dataset.state=tv)})}getAttributesToExclude(){return["data-testid"]}createRenderRoot(){return this}render(){return l`
1000
+ `}};Qp([a({type:Object})],ra.prototype,"selectedDate",2);ra=Qp([p("pont-date-picker")],ra);const te={root:[""],trigger:[""],close:[""],overlay:["pont-fixed pont-inset-0 pont-z-50","pont-bg-dialog-overlay-color-bg","data-[state=open]:pont-animate-in data-[state=open]:pont-fade-in-0","data-[state=closed]:pont-animate-out data-[state=closed]:pont-fade-out-0"],content:{base:["pont-fixed pont-top-[50%] pont-left-[50%] pont-z-50","pont-grid pont-gap-dialog-content-space-gap","pont-p-dialog-content-space-p","pont-w-dialog-content-space-w pont-max-w-dialog-content-space-max-w-sm sm:pont-max-w-dialog-content-space-max-w","pont-bg-dialog-content-color-bg","pont-rounded-dialog-content-radius pont-border-dialog-content-width-border pont-border-dialog-content-color-border pont-outline-none","pont-shadow-dialog-content-shadow","pont-duration-200","pont-translate-x-[-50%] pont-translate-y-[-50%]","data-[state=open]:pont-animate-in data-[state=open]:pont-fade-in-0 data-[state=open]:pont-zoom-in-95","data-[state=closed]:pont-animate-out data-[state=closed]:pont-fade-out-0 data-[state=closed]:pont-zoom-out-95"],close:{base:["pont-absolute pont-top-4 pont-right-4","pont-rounded-dialog-close-radius","pont-ring-offset-dialog-close-color-ring-offset","pont-transition-opacity","focus:pont-ring-dialog-close-width-ring-focus focus:pont-ring-dialog-close-color-ring-focus focus:pont-ring-offset-dialog-close-width-ring-offset focus:pont-outline-hidden","disabled:pont-pointer-events-none","data-[state=open]:pont-bg-dialog-close-color-bg data-[state=open]:pont-text-dialog-close-color-text"],icon:["pont-shrink-0","pont-size-dialog-close-icon-space-size","pont-pointer-events-none"]}},header:["pont-flex pont-flex-col pont-gap-dialog-header-space-gap","pont-text-center","sm:pont-text-left"],footer:["pont-flex pont-flex-col-reverse pont-gap-dialog-footer-space-gap","sm:pont-flex-row sm:pont-justify-end"],title:["pont-text-dialog-title-font pont-font-dialog-title-font-weight"],description:["pont-text-dialog-description-font pont-font-dialog-description-font-weight pont-text-dialog-description-color-text"]};var Jf=Object.getOwnPropertyDescriptor,Xf=(e,t,r,o)=>{for(var n=o>1?void 0:o?Jf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};const tv="closed";let wd=class extends y{get _dialog(){let e=this.parentElement;for(;e;){if(e instanceof En)return e;e=e.parentElement}return e}get _containerElement(){return this.querySelector("div[part=dialog-close]")}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement),this.addEventListener("click",()=>{const t=this._dialog;t&&(t.dataset.state=tv)})}getAttributesToExclude(){return["data-testid"]}createRenderRoot(){return this}render(){return l`
1001
1001
  <div
1002
1002
  part="dialog-close"
1003
- class=${m(ee.close,this.className)}
1003
+ class=${m(te.close,this.className)}
1004
1004
  ></div>
1005
1005
  `}};wd=Xf([p("pont-dialog-close")],wd);var ev=Object.defineProperty,rv=Object.getOwnPropertyDescriptor,tl=(e,t,r,o)=>{for(var n=o>1?void 0:o?rv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&ev(t,r,n),n};const ds="closed";let ci=class extends y{constructor(){super(...arguments),this.state=ds,this.showCloseButton=!1,this.handleCloseButtonClick=()=>{const e=this._dialog;e&&(e.dataset.state=ds)}}get _containerElement(){return this.querySelector("div[part=dialog-content-slot]")}get ـcomponentElement(){return this.querySelector("div[part=dialog-content]")}get _dialog(){let e=this.parentElement;for(;e;){if(e instanceof En)return e;e=e.parentElement}return e}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}updated(e){requestAnimationFrame(()=>{e.get("state")===ds?this.ـcomponentElement.style.display="grid":this.ـcomponentElement.style.display="none"})}render(){return l`
1006
1006
  <div
1007
1007
  rtgdlg-content
1008
1008
  part="dialog-content"
1009
- class=${m(ee.content.base,this.className)}
1009
+ class=${m(te.content.base,this.className)}
1010
1010
  >
1011
1011
  <div part="dialog-content-slot"></div>
1012
1012
 
@@ -1015,7 +1015,7 @@
1015
1015
  data-slot="dialog-content-close"
1016
1016
  type="button"
1017
1017
  @click=${this.handleCloseButtonClick}
1018
- class=${m(ee.content.close.base)}
1018
+ class=${m(te.content.close.base)}
1019
1019
  >
1020
1020
  <svg
1021
1021
  xmlns="http://www.w3.org/2000/svg"
@@ -1027,7 +1027,7 @@
1027
1027
  stroke-width="2"
1028
1028
  stroke-linecap="round"
1029
1029
  stroke-linejoin="round"
1030
- class=${m(ee.content.close.icon,"lucide lucide-x-icon lucide-x")}
1030
+ class=${m(te.content.close.icon,"lucide lucide-x-icon lucide-x")}
1031
1031
  >
1032
1032
  <path d="M18 6 6 18" />
1033
1033
  <path d="m6 6 12 12" />
@@ -1040,34 +1040,34 @@
1040
1040
  `}};tl([a({attribute:"data-state",type:String})],ci.prototype,"state",2);tl([a({attribute:"show-close-button",type:Boolean})],ci.prototype,"showCloseButton",2);ci=tl([p("pont-dialog-content")],ci);var nv=Object.getOwnPropertyDescriptor,ov=(e,t,r,o)=>{for(var n=o>1?void 0:o?nv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let $d=class extends y{get _containerElement(){return this.querySelector("div[part=dialog-footer]")}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
1041
1041
  <div
1042
1042
  part="dialog-footer"
1043
- class=${m(ee.footer,this.className)}
1043
+ class=${m(te.footer,this.className)}
1044
1044
  ></div>
1045
1045
  `}};$d=ov([p("pont-dialog-footer")],$d);var iv=Object.defineProperty,sv=Object.getOwnPropertyDescriptor,el=(e,t,r,o)=>{for(var n=o>1?void 0:o?sv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&iv(t,r,n),n};let pi=class extends f{constructor(){super(...arguments),this._title="",this.description=""}createRenderRoot(){return this}render(){return l`
1046
1046
  <div
1047
1047
  part="dialog-header"
1048
- class=${m(ee.header,this.className)}
1048
+ class=${m(te.header,this.className)}
1049
1049
  >
1050
- <h2 class=${m(ee.title,this.className)}>${this._title}</h2>
1050
+ <h2 class=${m(te.title,this.className)}>${this._title}</h2>
1051
1051
 
1052
- <p class=${m(ee.description,this.className)}>
1052
+ <p class=${m(te.description,this.className)}>
1053
1053
  ${this.description}
1054
1054
  </p>
1055
1055
  </div>
1056
1056
  `}};el([a({attribute:"title",type:String})],pi.prototype,"_title",2);el([a({type:String})],pi.prototype,"description",2);pi=el([p("pont-dialog-header")],pi);var av=Object.getOwnPropertyDescriptor,lv=(e,t,r,o)=>{for(var n=o>1?void 0:o?av(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Pd=class extends f{createRenderRoot(){return this}render(){return l`
1057
1057
  <div
1058
1058
  part="dialog-overly"
1059
- class=${m(ee.overlay,this.className)}
1059
+ class=${m(te.overlay,this.className)}
1060
1060
  ></div>
1061
1061
  `}};Pd=lv([p("pont-dialog-overlay")],Pd);var dv=Object.getOwnPropertyDescriptor,cv=(e,t,r,o)=>{for(var n=o>1?void 0:o?dv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};const pv="open";let Cd=class extends y{constructor(){super(...arguments),this.handleClick=()=>{const e=this._dialog;e&&(e.dataset.state=pv)}}get _dialog(){let e=this.parentElement;for(;e;){if(e instanceof En)return e;e=e.parentElement}return e}get _containerElement(){return this.querySelector("div[part=dialog-trigger]")}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement),this.addEventListener("click",t=>{t.stopPropagation(),this.handleClick()})}getAttributesToExclude(){return[]}createRenderRoot(){return this}render(){return l`
1062
1062
  <div
1063
1063
  part="dialog-trigger"
1064
- class=${m(ee.trigger,this.className)}
1064
+ class=${m(te.trigger,this.className)}
1065
1065
  ></div>
1066
1066
  `}};Cd=cv([p("pont-dialog-trigger")],Cd);var hv=Object.defineProperty,uv=Object.getOwnPropertyDescriptor,Zp=(e,t,r,o)=>{for(var n=o>1?void 0:o?uv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&hv(t,r,n),n};const mv="open",gv="closed";let En=class extends y{constructor(){super(...arguments),this.state=gv}get _containerElement(){return this.querySelector("div[rtgdlg-root]")}get _content(){const e=this.querySelector("pont-dialog-content");return e||null}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.state)}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}getAttributesToExclude(){return[]}render(){return l`
1067
1067
  <div
1068
1068
  rtgdlg-root
1069
1069
  part="dialog"
1070
- class=${m(ee.root,this.className)}
1070
+ class=${m(te.root,this.className)}
1071
1071
  >
1072
1072
  ${this.state===mv?l` <pont-dialog-overlay></pont-dialog-overlay>`:h}
1073
1073
  </div>
@@ -1563,7 +1563,7 @@
1563
1563
  data-slot="item-separator"
1564
1564
  orientation="horizontal"
1565
1565
  ></pont-separator>
1566
- `}};rc=Qy([p("pont-item-separator")],rc);var Zy=Object.getOwnPropertyDescriptor,Jy=(e,t,r,o)=>{for(var n=o>1?void 0:o?Zy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let nc=class extends f{createRenderRoot(){return this}get _titleSlot(){return this.querySelector('[data-slot="item-title"]')}firstUpdated(){const e=this._titleSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="item-title"></div>`}};nc=Jy([p("pont-item-title")],nc);var Xy=Object.getOwnPropertyDescriptor,t_=(e,t,r,o)=>{for(var n=o>1?void 0:o?Xy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let oc=class extends f{createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="kbd"]')}firstUpdated(){const e=this._rootSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<kbd data-slot="kbd"></kbd>`}};oc=t_([p("pont-kbd")],oc);var e_=Object.getOwnPropertyDescriptor,r_=(e,t,r,o)=>{for(var n=o>1?void 0:o?e_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let ic=class extends f{createRenderRoot(){return this}get _groupSlot(){return this.querySelector('[data-slot="kbd-group"]')}firstUpdated(){const e=this._groupSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<kbd data-slot="kbd-group"></kbd>`}};ic=r_([p("pont-kbd-group")],ic);const Ct={root:["pont-flex","pont-gap-menubar-space-gap pont-items-center","pont-p-menubar-space-p","pont-h-menubar-space-h","pont-bg-menubar-color-bg","pont-rounded-menubar-radius pont-border-menubar-width-border pont-border-menubar-color-border"],menu:[""],group:[""],trigger:["pont-flex","pont-items-center","pont-px-menubar-trigger-space-px pont-py-menubar-trigger-space-py","pont-text-menubar-trigger-font pont-font-menubar-trigger-font-weight","pont-rounded-menubar-trigger-radius pont-outline-hidden","pont-select-none","focus:pont-text-menubar-trigger-color-text-focus focus:pont-bg-menubar-trigger-color-bg-focus","hover:pont-text-menubar-trigger-color-text-active hover:pont-bg-menubar-trigger-color-bg-active"],content:["pont-absolute pont-overflow-hidden pont-z-50","pont-p-menubar-content-space-p","pont-min-w-menubar-content-space-min-w","pont-text-menubar-content-color-text","pont-bg-menubar-content-color-bg","pont-rounded-menubar-content-radius pont-border-menubar-content-width-border pont-border-menubar-content-color-border","pont-shadow-menubar-content-shadow","pont-translate-y-2","pont-slide-in-from-top-2","data-[state=open]:pont-animate-in data-[state=open]:pont-fade-in-0 data-[state=open]:pont-zoom-in-95","data-[state=closed]:pont-animate-out data-[state=closed]:pont-fade-out-0 data-[state=closed]:pont-zoom-out-95"],item:["pont-flex pont-relative","pont-gap-menubar-item-space-gap pont-items-center","pont-px-menubar-item-space-px pont-py-menubar-item-space-py","pont-text-menubar-item-font","pont-rounded-menubar-item-radius pont-outline-hidden","pont-cursor-default pont-select-none","aria-selected:pont-text-menubar-item-color-text-active aria-selected:pont-bg-menubar-item-color-bg-active","data-[disabled]:pont-opacity-menubar-item-opacity-disabled data-[disabled]:pont-pointer-events-none",'[&_svg]:pont-shrink-0 [&_svg:not([class*="pont-size-"])]:pont-size-menubar-item-icon-space-size [&_svg:not([class*="pont-text-"])]:pont-text-menubar-item-icon-color-text [&_svg]:pont-pointer-events-none'],checkboxItem:{base:["pont-flex pont-relative","pont-gap-menubar-checkbox-item-space-gap pont-items-center","pont-pl-menubar-checkbox-item-space-pl pont-pr-menubar-checkbox-item-space-pr pont-py-menubar-checkbox-item-space-py","pont-text-menubar-checkbox-item-font","pont-rounded-menubar-checkbox-item-radius pont-outline-hidden","pont-cursor-default pont-select-none","aria-selected:pont-text-menubar-checkbox-item-color-text-active aria-selected:pont-bg-menubar-checkbox-item-color-bg-active","data-[disabled]:pont-opacity-menubar-checkbox-item-opacity-disabled data-[disabled]:pont-pointer-events-none"],indicator:["pont-flex pont-absolute pont-left-2","pont-justify-center pont-items-center","pont-size-menubar-checkbox-item-indicator-space-size","pont-pointer-events-none"],icon:["pont-shrink-0","pont-size-menubar-checkbox-item-icon-space-size","pont-pointer-events-none"]},radioItem:{base:["pont-flex pont-relative","pont-gap-menubar-radio-item-space-gap pont-items-center","pont-pl-menubar-radio-item-space-pl pont-pr-menubar-radio-item-space-pr pont-py-menubar-radio-item-space-py","pont-text-menubar-radio-item-font","pont-rounded-menubar-radio-item-radius pont-outline-hidden","pont-cursor-default pont-select-none","aria-selected:pont-text-menubar-radio-item-color-text-active aria-selected:pont-bg-menubar-radio-item-color-bg-active","data-[disabled]:pont-opacity-menubar-radio-item-opacity-disabled data-[disabled]:pont-pointer-events-none"],indicator:["pont-flex pont-absolute pont-left-2","pont-justify-center pont-items-center","pont-size-menubar-radio-item-indicator-space-size","pont-pointer-events-none"],icon:["pont-shrink-0","pont-size-menubar-radio-item-icon-space-size","pont-pointer-events-none","pont-fill-current"]},label:["pont-px-menubar-label-space-px pont-py-menubar-label-space-py","pont-text-menubar-label-font pont-font-menubar-label-font-weight"],separator:["pont-mx-menubar-separator-space-mx pont-my-menubar-separator-space-my","pont-h-menubar-separator-space-h","pont-bg-menubar-separator-color-bg"],shortcut:["pont-ml-auto","pont-text-menubar-shortcut-font pont-text-menubar-shortcut-color-text"]};var n_=Object.defineProperty,o_=Object.getOwnPropertyDescriptor,Qr=(e,t,r,o)=>{for(var n=o>1?void 0:o?o_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&n_(t,r,n),n};let ie=class extends y{constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1,this.checked=!1,this.disabled=!1}get _containerElement(){return this.querySelector("div[part=menubar-checkbox-item]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}get identifier(){var t,r;if(this._id!=="")return this._id;const e=(r=(t=this.parentElement)==null?void 0:t.shadowRoot)==null?void 0:r.querySelector("div[rtgcmd-group]");return e?this._id=`${e.getAttribute("id")}li${ie._counter++}`:this._id=`rtgcmdrxgxli${ie._counter++}`,this._id}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this.checked=!this.checked}render(){return l`
1566
+ `}};rc=Qy([p("pont-item-separator")],rc);var Zy=Object.getOwnPropertyDescriptor,Jy=(e,t,r,o)=>{for(var n=o>1?void 0:o?Zy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let nc=class extends f{createRenderRoot(){return this}get _titleSlot(){return this.querySelector('[data-slot="item-title"]')}firstUpdated(){const e=this._titleSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="item-title"></div>`}};nc=Jy([p("pont-item-title")],nc);var Xy=Object.getOwnPropertyDescriptor,t_=(e,t,r,o)=>{for(var n=o>1?void 0:o?Xy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let oc=class extends f{createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="kbd"]')}firstUpdated(){const e=this._rootSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<kbd data-slot="kbd"></kbd>`}};oc=t_([p("pont-kbd")],oc);var e_=Object.getOwnPropertyDescriptor,r_=(e,t,r,o)=>{for(var n=o>1?void 0:o?e_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let ic=class extends f{createRenderRoot(){return this}get _groupSlot(){return this.querySelector('[data-slot="kbd-group"]')}firstUpdated(){const e=this._groupSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<kbd data-slot="kbd-group"></kbd>`}};ic=r_([p("pont-kbd-group")],ic);const Ct={root:["pont-flex","pont-gap-menubar-space-gap pont-items-center","pont-p-menubar-space-p","pont-h-menubar-space-h","pont-bg-menubar-color-bg","pont-rounded-menubar-radius pont-border-menubar-width-border pont-border-menubar-color-border"],menu:[""],group:[""],trigger:["pont-flex","pont-items-center","pont-px-menubar-trigger-space-px pont-py-menubar-trigger-space-py","pont-text-menubar-trigger-font pont-font-menubar-trigger-font-weight","pont-rounded-menubar-trigger-radius pont-outline-hidden","pont-select-none","focus:pont-text-menubar-trigger-color-text-focus focus:pont-bg-menubar-trigger-color-bg-focus","hover:pont-text-menubar-trigger-color-text-active hover:pont-bg-menubar-trigger-color-bg-active"],content:["pont-absolute pont-overflow-hidden pont-z-50","pont-p-menubar-content-space-p","pont-min-w-menubar-content-space-min-w","pont-text-menubar-content-color-text","pont-bg-menubar-content-color-bg","pont-rounded-menubar-content-radius pont-border-menubar-content-width-border pont-border-menubar-content-color-border","pont-shadow-menubar-content-shadow","pont-translate-y-2","pont-slide-in-from-top-2","data-[state=open]:pont-animate-in data-[state=open]:pont-fade-in-0 data-[state=open]:pont-zoom-in-95","data-[state=closed]:pont-animate-out data-[state=closed]:pont-fade-out-0 data-[state=closed]:pont-zoom-out-95"],item:["pont-flex pont-relative","pont-gap-menubar-item-space-gap pont-items-center","pont-px-menubar-item-space-px pont-py-menubar-item-space-py","pont-text-menubar-item-font","pont-rounded-menubar-item-radius pont-outline-hidden","pont-cursor-default pont-select-none","aria-selected:pont-text-menubar-item-color-text-active aria-selected:pont-bg-menubar-item-color-bg-active","data-[disabled]:pont-opacity-menubar-item-opacity-disabled data-[disabled]:pont-pointer-events-none",'[&_svg]:pont-shrink-0 [&_svg:not([class*="pont-size-"])]:pont-size-menubar-item-icon-space-size [&_svg:not([class*="pont-text-"])]:pont-text-menubar-item-icon-color-text [&_svg]:pont-pointer-events-none'],checkboxItem:{base:["pont-flex pont-relative","pont-gap-menubar-checkbox-item-space-gap pont-items-center","pont-pl-menubar-checkbox-item-space-pl pont-pr-menubar-checkbox-item-space-pr pont-py-menubar-checkbox-item-space-py","pont-text-menubar-checkbox-item-font","pont-rounded-menubar-checkbox-item-radius pont-outline-hidden","pont-cursor-default pont-select-none","aria-selected:pont-text-menubar-checkbox-item-color-text-active aria-selected:pont-bg-menubar-checkbox-item-color-bg-active","data-[disabled]:pont-opacity-menubar-checkbox-item-opacity-disabled data-[disabled]:pont-pointer-events-none"],indicator:["pont-flex pont-absolute pont-left-2","pont-justify-center pont-items-center","pont-size-menubar-checkbox-item-indicator-space-size","pont-pointer-events-none"],icon:["pont-shrink-0","pont-size-menubar-checkbox-item-icon-space-size","pont-pointer-events-none"]},radioItem:{base:["pont-flex pont-relative","pont-gap-menubar-radio-item-space-gap pont-items-center","pont-pl-menubar-radio-item-space-pl pont-pr-menubar-radio-item-space-pr pont-py-menubar-radio-item-space-py","pont-text-menubar-radio-item-font","pont-rounded-menubar-radio-item-radius pont-outline-hidden","pont-cursor-default pont-select-none","aria-selected:pont-text-menubar-radio-item-color-text-active aria-selected:pont-bg-menubar-radio-item-color-bg-active","data-[disabled]:pont-opacity-menubar-radio-item-opacity-disabled data-[disabled]:pont-pointer-events-none"],indicator:["pont-flex pont-absolute pont-left-2","pont-justify-center pont-items-center","pont-size-menubar-radio-item-indicator-space-size","pont-pointer-events-none"],icon:["pont-shrink-0","pont-size-menubar-radio-item-icon-space-size","pont-pointer-events-none","pont-fill-current"]},label:["pont-px-menubar-label-space-px pont-py-menubar-label-space-py","pont-text-menubar-label-font pont-font-menubar-label-font-weight"],separator:["pont-mx-menubar-separator-space-mx pont-my-menubar-separator-space-my","pont-h-menubar-separator-space-h","pont-bg-menubar-separator-color-bg"],shortcut:["pont-ml-auto","pont-text-menubar-shortcut-font pont-text-menubar-shortcut-color-text"]};var n_=Object.defineProperty,o_=Object.getOwnPropertyDescriptor,Qr=(e,t,r,o)=>{for(var n=o>1?void 0:o?o_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&n_(t,r,n),n};let oe=class extends y{constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1,this.checked=!1,this.disabled=!1}get _containerElement(){return this.querySelector("div[part=menubar-checkbox-item]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}get identifier(){var t,r;if(this._id!=="")return this._id;const e=(r=(t=this.parentElement)==null?void 0:t.shadowRoot)==null?void 0:r.querySelector("div[rtgcmd-group]");return e?this._id=`${e.getAttribute("id")}li${oe._counter++}`:this._id=`rtgcmdrxgxli${oe._counter++}`,this._id}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this.checked=!this.checked}render(){return l`
1567
1567
  <div
1568
1568
  part="menubar-checkbox-item"
1569
1569
  class=${m(Ct.checkboxItem.base,this.disabled&&"pont-opacity-menubar-item-opacity-disabled pont-pointer-events-none",this.className)}
@@ -1598,7 +1598,7 @@
1598
1598
  `:h}
1599
1599
  </span>
1600
1600
  </div>
1601
- `}};ie._counter=0;Qr([a({type:String})],ie.prototype,"_id",2);Qr([a({attribute:"aria-hidden",type:String})],ie.prototype,"_hidden",2);Qr([a({attribute:"data-value",type:String})],ie.prototype,"value",1);Qr([a({type:Boolean})],ie.prototype,"selected",2);Qr([a({type:Boolean})],ie.prototype,"checked",2);Qr([a({type:Boolean})],ie.prototype,"disabled",2);ie=Qr([p("pont-menubar-checkbox-item")],ie);var i_=Object.defineProperty,s_=Object.getOwnPropertyDescriptor,jn=(e,t,r,o)=>{for(var n=o>1?void 0:o?s_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&i_(t,r,n),n};let gr=class extends y{constructor(){super(...arguments),this.isOpen=!1,this.uniqueIds=[],this.selectedMenu="",this.isHovering=!1,this.id="",this.closeTimeout=null,this.toggleMenubar=e=>{e.stopPropagation(),document.querySelectorAll("pont-menubar-menu").forEach(r=>{r!==this&&(r.isOpen=!1)}),this.isOpen=!this.isOpen},this.handleClickOutside=e=>{const t=e.target;this.contains(t)||(this.isOpen=!1)},this.handleMenuMouseEnter=()=>{this.clearCloseTimeout(),this.closeAllMenus(),this.isOpen=!0,this.isHovering=!0},this.handleMenuMouseLeave=e=>{const t=e.relatedTarget;if(this.isDescendant(t,"pont-menubar-content")){this.clearCloseTimeout();return}this.scheduleClose()}}get _content(){return this.querySelector("pont-menubar-content")}get _button(){return this.querySelector("pont-menubar-trigger")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside),this.addEventListener("radio-selected",this._handleRadioSelected)}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),this.clearCloseTimeout(),super.disconnectedCallback()}clearCloseTimeout(){this.closeTimeout!==null&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.isOpen?"open":"close")}_handleRadioSelected(e){this.querySelectorAll("pont-menubar-radio-item").forEach(t=>{const r=t;t!==e.target&&(r.checked=!1)})}firstUpdated(){this.setupContentListeners();const e=this.querySelector("div[part=menubar-menu-slot]"),t=this.querySelector("div[part=button-slot]");e&&this._content&&e.appendChild(this._content),t&&this._button&&t.appendChild(this._button)}raiseEvent(){const e=new CustomEvent("unique-ids-generated",{detail:{ids:this.uniqueIds},bubbles:!0,composed:!0});this.dispatchEvent(e)}closeAllMenus(){document.querySelectorAll("pont-menubar-menu").forEach(t=>{t.isOpen=!1,t.isHovering=!1})}scheduleClose(){this.clearCloseTimeout(),this.closeTimeout=window.setTimeout(()=>{this.isOpen=!1,this.isHovering=!1,this.closeTimeout=null},150)}isDescendant(e,t){let r=e.parentElement;for(;r;){if(r.tagName.toLowerCase()===t.toLowerCase())return!0;r=r.parentElement}return!1}setupContentListeners(){const e=this._content;e&&(e.addEventListener("mouseenter",()=>{this.clearCloseTimeout(),this.isOpen=!0}),e.addEventListener("mouseleave",()=>{this.scheduleClose()}))}render(){return l`
1601
+ `}};oe._counter=0;Qr([a({type:String})],oe.prototype,"_id",2);Qr([a({attribute:"aria-hidden",type:String})],oe.prototype,"_hidden",2);Qr([a({attribute:"data-value",type:String})],oe.prototype,"value",1);Qr([a({type:Boolean})],oe.prototype,"selected",2);Qr([a({type:Boolean})],oe.prototype,"checked",2);Qr([a({type:Boolean})],oe.prototype,"disabled",2);oe=Qr([p("pont-menubar-checkbox-item")],oe);var i_=Object.defineProperty,s_=Object.getOwnPropertyDescriptor,jn=(e,t,r,o)=>{for(var n=o>1?void 0:o?s_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&i_(t,r,n),n};let gr=class extends y{constructor(){super(...arguments),this.isOpen=!1,this.uniqueIds=[],this.selectedMenu="",this.isHovering=!1,this.id="",this.closeTimeout=null,this.toggleMenubar=e=>{e.stopPropagation(),document.querySelectorAll("pont-menubar-menu").forEach(r=>{r!==this&&(r.isOpen=!1)}),this.isOpen=!this.isOpen},this.handleClickOutside=e=>{const t=e.target;this.contains(t)||(this.isOpen=!1)},this.handleMenuMouseEnter=()=>{this.clearCloseTimeout(),this.closeAllMenus(),this.isOpen=!0,this.isHovering=!0},this.handleMenuMouseLeave=e=>{const t=e.relatedTarget;if(this.isDescendant(t,"pont-menubar-content")){this.clearCloseTimeout();return}this.scheduleClose()}}get _content(){return this.querySelector("pont-menubar-content")}get _button(){return this.querySelector("pont-menubar-trigger")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside),this.addEventListener("radio-selected",this._handleRadioSelected)}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),this.clearCloseTimeout(),super.disconnectedCallback()}clearCloseTimeout(){this.closeTimeout!==null&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.isOpen?"open":"close")}_handleRadioSelected(e){this.querySelectorAll("pont-menubar-radio-item").forEach(t=>{const r=t;t!==e.target&&(r.checked=!1)})}firstUpdated(){this.setupContentListeners();const e=this.querySelector("div[part=menubar-menu-slot]"),t=this.querySelector("div[part=button-slot]");e&&this._content&&e.appendChild(this._content),t&&this._button&&t.appendChild(this._button)}raiseEvent(){const e=new CustomEvent("unique-ids-generated",{detail:{ids:this.uniqueIds},bubbles:!0,composed:!0});this.dispatchEvent(e)}closeAllMenus(){document.querySelectorAll("pont-menubar-menu").forEach(t=>{t.isOpen=!1,t.isHovering=!1})}scheduleClose(){this.clearCloseTimeout(),this.closeTimeout=window.setTimeout(()=>{this.isOpen=!1,this.isHovering=!1,this.closeTimeout=null},150)}isDescendant(e,t){let r=e.parentElement;for(;r;){if(r.tagName.toLowerCase()===t.toLowerCase())return!0;r=r.parentElement}return!1}setupContentListeners(){const e=this._content;e&&(e.addEventListener("mouseenter",()=>{this.clearCloseTimeout(),this.isOpen=!0}),e.addEventListener("mouseleave",()=>{this.scheduleClose()}))}render(){return l`
1602
1602
  <div class=${m(Ct.menu,this.className)}>
1603
1603
  <div
1604
1604
  id="${this.id}"
@@ -1666,7 +1666,7 @@
1666
1666
  id="${this.identifier}"
1667
1667
  aria-hidden="${this.hidden}"
1668
1668
  ></div>
1669
- `}`}};Oe._counter=0;qn([a({type:String})],Oe.prototype,"_id",2);qn([a({attribute:"aria-hidden",type:String})],Oe.prototype,"_hidden",2);qn([a({type:Boolean})],Oe.prototype,"disabled",2);qn([a({attribute:"data-value",type:String})],Oe.prototype,"value",1);qn([a({type:Boolean})],Oe.prototype,"selected",2);Oe=qn([p("pont-menubar-item")],Oe);var u_=Object.defineProperty,m_=Object.getOwnPropertyDescriptor,Zr=(e,t,r,o)=>{for(var n=o>1?void 0:o?m_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&u_(t,r,n),n};let se=class extends y{constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1,this.checked=!1,this.disabled=!1}get _containerElement(){return this.querySelector("div[part=menubar-radio-item]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}get identifier(){var t,r;if(this._id!=="")return this._id;const e=(r=(t=this.parentElement)==null?void 0:t.shadowRoot)==null?void 0:r.querySelector("div[rtgcmd-group]");return e?this._id=`${e.getAttribute("id")}li${se._counter++}`:this._id=`rtgcmdrxgxli${se._counter++}`,this._id}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this.checked||(this.checked=!0,this.dispatchEvent(new CustomEvent("radio-selected",{bubbles:!0,composed:!0})))}render(){return l`
1669
+ `}`}};Oe._counter=0;qn([a({type:String})],Oe.prototype,"_id",2);qn([a({attribute:"aria-hidden",type:String})],Oe.prototype,"_hidden",2);qn([a({type:Boolean})],Oe.prototype,"disabled",2);qn([a({attribute:"data-value",type:String})],Oe.prototype,"value",1);qn([a({type:Boolean})],Oe.prototype,"selected",2);Oe=qn([p("pont-menubar-item")],Oe);var u_=Object.defineProperty,m_=Object.getOwnPropertyDescriptor,Zr=(e,t,r,o)=>{for(var n=o>1?void 0:o?m_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&u_(t,r,n),n};let ie=class extends y{constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1,this.checked=!1,this.disabled=!1}get _containerElement(){return this.querySelector("div[part=menubar-radio-item]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}get identifier(){var t,r;if(this._id!=="")return this._id;const e=(r=(t=this.parentElement)==null?void 0:t.shadowRoot)==null?void 0:r.querySelector("div[rtgcmd-group]");return e?this._id=`${e.getAttribute("id")}li${ie._counter++}`:this._id=`rtgcmdrxgxli${ie._counter++}`,this._id}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this.checked||(this.checked=!0,this.dispatchEvent(new CustomEvent("radio-selected",{bubbles:!0,composed:!0})))}render(){return l`
1670
1670
  <div
1671
1671
  part="menubar-radio-item"
1672
1672
  class=${m(Ct.radioItem.base,this.disabled&&"pont-opacity-menubar-item-opacity-disabled pont-pointer-events-none",this.className)}
@@ -1699,7 +1699,7 @@
1699
1699
  </svg>`:h}
1700
1700
  </span>
1701
1701
  </div>
1702
- `}};se._counter=0;Zr([a({type:String})],se.prototype,"_id",2);Zr([a({attribute:"aria-hidden",type:String})],se.prototype,"_hidden",2);Zr([a({attribute:"data-value",type:String})],se.prototype,"value",1);Zr([a({type:Boolean})],se.prototype,"selected",2);Zr([a({type:Boolean})],se.prototype,"checked",2);Zr([a({type:Boolean})],se.prototype,"disabled",2);se=Zr([p("pont-menubar-radio-item")],se);var g_=Object.defineProperty,f_=Object.getOwnPropertyDescriptor,pl=(e,t,r,o)=>{for(var n=o>1?void 0:o?f_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&g_(t,r,n),n};let Vr=class extends y{constructor(){super(...arguments),this._id="",this._hidden=""}get _containerElement(){return this.querySelector("div[part=menubar-separator]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}get identifier(){var t;if(this._id!=="")return this._id;const e=(t=this.parentElement)==null?void 0:t.querySelector("div[rtgcmd-list]");return e?this._id=`${e.getAttribute("id")}s${Vr._counter++}`:this._id=`rtgcmdrxlxs${Vr._counter++}`,this._id}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`${this._hidden==="true"?h:l`
1702
+ `}};ie._counter=0;Zr([a({type:String})],ie.prototype,"_id",2);Zr([a({attribute:"aria-hidden",type:String})],ie.prototype,"_hidden",2);Zr([a({attribute:"data-value",type:String})],ie.prototype,"value",1);Zr([a({type:Boolean})],ie.prototype,"selected",2);Zr([a({type:Boolean})],ie.prototype,"checked",2);Zr([a({type:Boolean})],ie.prototype,"disabled",2);ie=Zr([p("pont-menubar-radio-item")],ie);var g_=Object.defineProperty,f_=Object.getOwnPropertyDescriptor,pl=(e,t,r,o)=>{for(var n=o>1?void 0:o?f_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&g_(t,r,n),n};let Vr=class extends y{constructor(){super(...arguments),this._id="",this._hidden=""}get _containerElement(){return this.querySelector("div[part=menubar-separator]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}get identifier(){var t;if(this._id!=="")return this._id;const e=(t=this.parentElement)==null?void 0:t.querySelector("div[rtgcmd-list]");return e?this._id=`${e.getAttribute("id")}s${Vr._counter++}`:this._id=`rtgcmdrxlxs${Vr._counter++}`,this._id}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`${this._hidden==="true"?h:l`
1703
1703
  <div
1704
1704
  class=${m(Ct.separator,this.className)}
1705
1705
  id="${this.identifier}"
@@ -1808,18 +1808,18 @@
1808
1808
  dir="ltr"
1809
1809
  class="${m(Hr.menu,this.className)}"
1810
1810
  ></nav>
1811
- `}};pc=L_([p("pont-navigation-menu")],pc);const re={root:["pont-flex","pont-justify-center","pont-mx-auto","pont-w-full"],content:["pont-flex","pont-flex-row pont-gap-pagination-content-space-gap pont-items-center"],item:[""],link:ao,previous:{base:["pont-gap-pagination-previous-space-gap","pont-px-pagination-previous-space-px sm:pont-pl-pagination-previous-space-px"],span:["pont-hidden sm:pont-block"]},next:{base:["pont-gap-pagination-next-space-gap","pont-px-pagination-next-space-px sm:pont-pr-pagination-next-space-px"],span:["pont-hidden sm:pont-block"]},ellipsis:{base:["pont-flex pont-justify-center pont-items-center","pont-size-pagination-ellipsis-space-size"],icon:["pont-size-pagination-ellipsis-icon-space-size"],span:["pont-sr-only"]}};var F_=Object.getOwnPropertyDescriptor,k_=(e,t,r,o)=>{for(var n=o>1?void 0:o?F_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let hc=class extends y{get _containerElement(){return this.querySelector("ul[part=pagination-content]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
1811
+ `}};pc=L_([p("pont-navigation-menu")],pc);const ee={root:["pont-flex","pont-justify-center","pont-mx-auto","pont-w-full"],content:["pont-flex","pont-flex-row pont-gap-pagination-content-space-gap pont-items-center"],item:[""],link:ao,previous:{base:["pont-gap-pagination-previous-space-gap","pont-px-pagination-previous-space-px sm:pont-pl-pagination-previous-space-px"],span:["pont-hidden sm:pont-block"]},next:{base:["pont-gap-pagination-next-space-gap","pont-px-pagination-next-space-px sm:pont-pr-pagination-next-space-px"],span:["pont-hidden sm:pont-block"]},ellipsis:{base:["pont-flex pont-justify-center pont-items-center","pont-size-pagination-ellipsis-space-size"],icon:["pont-size-pagination-ellipsis-icon-space-size"],span:["pont-sr-only"]}};var F_=Object.getOwnPropertyDescriptor,k_=(e,t,r,o)=>{for(var n=o>1?void 0:o?F_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let hc=class extends y{get _containerElement(){return this.querySelector("ul[part=pagination-content]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
1812
1812
  <ul
1813
1813
  data-slot="pagination-content"
1814
1814
  part="pagination-content"
1815
- class=${m(re.content,this.className)}
1815
+ class=${m(ee.content,this.className)}
1816
1816
  ></ul>
1817
1817
  `}};hc=k_([p("pont-pagination-content")],hc);var N_=Object.getOwnPropertyDescriptor,M_=(e,t,r,o)=>{for(var n=o>1?void 0:o?N_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let uc=class extends y{get _containerElement(){return this.querySelector("span[part=pagination-ellipsis]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
1818
1818
  <span
1819
1819
  aria-hidden
1820
1820
  data-slot="pagination-ellipsis"
1821
1821
  part="pagination-ellipsis"
1822
- class=${m(re.ellipsis.base,this.className)}
1822
+ class=${m(ee.ellipsis.base,this.className)}
1823
1823
  >
1824
1824
  <svg
1825
1825
  xmlns="http://www.w3.org/2000/svg"
@@ -1831,14 +1831,14 @@
1831
1831
  stroke-width="2"
1832
1832
  stroke-linecap="round"
1833
1833
  stroke-linejoin="round"
1834
- class=${m(re.ellipsis.icon,"lucide lucide-ellipsis-icon lucide-ellipsis")}
1834
+ class=${m(ee.ellipsis.icon,"lucide lucide-ellipsis-icon lucide-ellipsis")}
1835
1835
  >
1836
1836
  <circle cx="12" cy="12" r="1" />
1837
1837
  <circle cx="19" cy="12" r="1" />
1838
1838
  <circle cx="5" cy="12" r="1" />
1839
1839
  </svg>
1840
1840
 
1841
- <span class=${m(re.ellipsis.span)}>More pages</span>
1841
+ <span class=${m(ee.ellipsis.span)}>More pages</span>
1842
1842
  </span>
1843
1843
  `}};uc=M_([p("pont-pagination-ellipsis")],uc);var B_=Object.defineProperty,U_=Object.getOwnPropertyDescriptor,To=(e,t,r,o)=>{for(var n=o>1?void 0:o?U_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&B_(t,r,n),n};let Gr=class extends y{constructor(){super(...arguments),this.state="close",this.isActive=!1,this.size="icon",this.href="javascript:void(0)"}get _containerElement(){return this.querySelector("a[part=pagination-link]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}updated(e){super.updated(e),this.state==="open"?this.isActive=!0:this.isActive=!1}render(){return l`
1844
1844
  <a
@@ -1848,14 +1848,14 @@
1848
1848
  part="pagination-link"
1849
1849
  id="${this.id}"
1850
1850
  href="${this.href}"
1851
- class=${m(re.link({variant:this.isActive?"outline":"ghost",size:this.size}),this.className)}
1851
+ class=${m(ee.link({variant:this.isActive?"outline":"ghost",size:this.size}),this.className)}
1852
1852
  >
1853
1853
  </a>
1854
1854
  `}};To([a({attribute:"data-state",type:String})],Gr.prototype,"state",2);To([a({type:Boolean})],Gr.prototype,"isActive",2);To([a({type:String})],Gr.prototype,"size",2);To([a({type:String})],Gr.prototype,"href",2);Gr=To([p("pont-pagination-link")],Gr);var j_=Object.defineProperty,q_=Object.getOwnPropertyDescriptor,hl=(e,t,r,o)=>{for(var n=o>1?void 0:o?q_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&j_(t,r,n),n};let _i=class extends y{constructor(){super(...arguments),this.uniqueIds=[],this.isActive=!1}get _containerElement(){return this.querySelector("li[part=pagination-item]")}get _content(){var t;const e=(t=this._containerElement)==null?void 0:t.children;if(e){for(let r=0;r<e.length;r++)if(e[r]instanceof Gr)return e[r]}return null}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.isActive?"open":"close")}handleClick(e){e.stopPropagation(),document.querySelectorAll("pont-pagination-item").forEach(r=>{r!==this&&(r.isActive=!1)}),this.isActive=!this.isActive}firstUpdated(){var r;this.moveLightDomChildrenInto(this._containerElement);const e=(r=this._containerElement)==null?void 0:r.children,t=[];for(let o=0;o<e.length-1;o+=1){const n=e[o],i=crypto.randomUUID();t.push(i),n.dataset.pairId=i}this.uniqueIds=t,this._content&&this._content.removeEventListener("unique-ids-generated",()=>{this.requestUpdate()})}raiseEvent(){const e=new CustomEvent("unique-ids-generated",{detail:{ids:this.uniqueIds},bubbles:!0,composed:!0});this.dispatchEvent(e)}createRenderRoot(){return this}render(){return l`
1855
1855
  <li
1856
1856
  data-slot="pagination-item"
1857
1857
  part="pagination-item"
1858
- class=${m(re.item,this.className)}
1858
+ class=${m(ee.item,this.className)}
1859
1859
  @click="${this.handleClick}"
1860
1860
  ></li>
1861
1861
  `}};hl([g()],_i.prototype,"uniqueIds",2);hl([a({type:Boolean})],_i.prototype,"isActive",2);_i=hl([p("pont-pagination-item")],_i);var z_=Object.defineProperty,V_=Object.getOwnPropertyDescriptor,vh=(e,t,r,o)=>{for(var n=o>1?void 0:o?V_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&z_(t,r,n),n};let va=class extends y{constructor(){super(...arguments),this.href="javascript:void(0)"}get _containerElement(){return this.querySelector("div[part=pagination-next]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
@@ -1863,9 +1863,9 @@
1863
1863
  aria-label="Go to next page"
1864
1864
  size="default"
1865
1865
  href=${this.href}
1866
- class=${m(re.next.base,this.className)}
1866
+ class=${m(ee.next.base,this.className)}
1867
1867
  >
1868
- <span class=${m(re.next.span)}>Next</span>
1868
+ <span class=${m(ee.next.span)}>Next</span>
1869
1869
 
1870
1870
  <svg
1871
1871
  xmlns="http://www.w3.org/2000/svg"
@@ -1889,7 +1889,7 @@
1889
1889
  aria-label="Go to previous page"
1890
1890
  size="default"
1891
1891
  href=${this.href}
1892
- class=${m(re.previous.base,this.className)}
1892
+ class=${m(ee.previous.base,this.className)}
1893
1893
  >
1894
1894
  <svg
1895
1895
  xmlns="http://www.w3.org/2000/svg"
@@ -1906,7 +1906,7 @@
1906
1906
  <path d="m15 18-6-6 6-6" />
1907
1907
  </svg>
1908
1908
 
1909
- <span class=${m(re.previous.span)}>Previous</span>
1909
+ <span class=${m(ee.previous.span)}>Previous</span>
1910
1910
 
1911
1911
  <div part="pagination-previous"></div>
1912
1912
  </pont-pagination-link>
@@ -1916,7 +1916,7 @@
1916
1916
  aria-label="pagination"
1917
1917
  data-slot="pagination"
1918
1918
  part="pagination"
1919
- class=${m(re.root,this.className)}
1919
+ class=${m(ee.root,this.className)}
1920
1920
  ></nav>
1921
1921
  `}};mc=W_([p("pont-pagination")],mc);var Y_=Object.defineProperty,Q_=Object.getOwnPropertyDescriptor,gt=(e,t,r,o)=>{for(var n=o>1?void 0:o?Q_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&Y_(t,r,n),n};let lt=class extends f{constructor(){super(...arguments),this.id="",this._showPassword=!1,this._handleToggle=()=>{this._showPassword=!this._showPassword}}createRenderRoot(){return this}updated(e){e.has("id")&&(this.id&&(this._inputId=this.id),this.removeAttribute("id"))}firstUpdated(){this._inputId=this.id,this.removeAttribute("id")}_renderIcon(){return this._showPassword?l`
1922
1922
  <svg
@@ -2100,11 +2100,11 @@
2100
2100
  style="overflow: hidden scroll;"
2101
2101
  ></div>
2102
2102
  </div>
2103
- `}};wh([Po("[data-radix-scroll-area-viewport]")],wa.prototype,"viewportEl",2);wa=wh([p("pont-scroll-area")],wa);class aw{constructor(){this.state={isOpen:!1,selectedValue:"",selectedText:""},this.listeners=new Set}subscribe(t){this.listeners.add(t)}unsubscribe(t){this.listeners.delete(t)}notify(){this.listeners.forEach(t=>t())}get isOpen(){return this.state.isOpen}get selectedValue(){return this.state.selectedValue}get selectedText(){return this.state.selectedText}open(){this.state.isOpen||(this.state.isOpen=!0,this.notify())}close(){this.state.isOpen&&(this.state.isOpen=!1,this.notify())}toggle(){this.state.isOpen=!this.state.isOpen,this.notify()}select(t,r,o){this.state.selectedValue=t,this.state.selectedText=r,this.state.isOpen=!1,this.notify()}}const ne={root:["pont-font-select-font-family"],value:["pont-flex","pont-gap-select-value-space-gap pont-items-center","pont-line-clamp-1"],trigger:{trigger:["pont-flex","pont-gap-select-trigger-space-gap pont-justify-between pont-items-center","pont-px-select-trigger-space-px pont-py-select-trigger-space-py","pont-w-full pont-h-select-trigger-space-h","pont-text-select-trigger-font pont-whitespace-nowrap","pont-bg-select-trigger-color-bg","pont-rounded-select-trigger-radius pont-border-select-trigger-width-border pont-border-select-trigger-color-border pont-outline-none","pont-transition-[color,box-shadow]","hover:pont-bg-select-trigger-color-bg-hover","focus-visible:pont-border-select-trigger-color-border-focus focus-visible:pont-ring-select-trigger-width-ring-focus focus-visible:pont-ring-select-trigger-color-ring-focus","pont-select-disabled:pont-opacity-select-trigger-opacity-disabled pont-select-disabled:pont-cursor-not-allowed","aria-invalid:pont-border-select-trigger-color-border-invalid aria-invalid:pont-ring-select-trigger-width-ring-invalid aria-invalid:pont-ring-select-trigger-color-ring-invalid","data-[placeholder]:pont-text-select-trigger-placeholder-color-text"],icon:["pont-shrink-0","pont-size-select-trigger-icon-space-size","pont-text-select-trigger-icon-color-text","pont-opacity-select-trigger-icon-opacity","pont-pointer-events-none"]},content:{content:["pont-fixed pont-overflow-x-hidden pont-overflow-y-auto pont-z-50","pont-w-fit","pont-text-select-content-color-text","pont-bg-select-content-color-bg","pont-rounded-select-content-radius pont-border-select-content-width-border pont-border-select-content-color-border","pont-shadow-select-content-shadow","pont-slide-in-from-top-2","pont-translate-y-1","data-[state=open]:pont-animate-in data-[state=open]:pont-fade-in-0 data-[state=open]:pont-zoom-in-95","data-[state=closed]:pont-animate-out data-[state=closed]:pont-fade-out-0 data-[state=closed]:pont-zoom-out-95"],viewport:["pont-p-select-content-viewport-space-p","pont-w-full","pont-scroll-my-1"]},label:["pont-px-select-label-space-px pont-py-select-label-space-py","pont-text-select-label-font pont-text-select-label-color-text"],item:{item:["pont-flex pont-relative","pont-gap-select-item-space-gap pont-items-center","pont-pl-select-item-space-pl pont-pr-select-item-space-pr pont-py-select-item-space-py","pont-w-full","pont-text-select-item-font","pont-rounded-select-item-radius pont-outline-hidden","pont-cursor-default pont-select-none","hover:pont-text-select-item-color-text-hover hover:pont-bg-select-item-color-bg-hover","focus:pont-text-select-item-color-text-focus focus:pont-bg-select-item-color-bg-focus","data-[disabled]:pont-opacity-select-item-opacity-disabled data-[disabled]:pont-pointer-events-none"],indicator:["pont-flex pont-absolute pont-right-2","pont-justify-center pont-items-center","pont-size-select-item-indicator-space-size"],icon:["pont-shrink-0","pont-size-select-item-icon-space-size","pont-text-select-item-icon-color-text","pont-pointer-events-none"]},separator:["pont-mx-select-separator-space-mx pont-my-select-separator-space-my","pont-h-select-separator-space-h","pont-bg-select-separator-color-bg","pont-pointer-events-none"]};var lw=Object.defineProperty,dw=Object.getOwnPropertyDescriptor,ul=(e,t,r,o)=>{for(var n=o>1?void 0:o?dw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&lw(t,r,n),n};let br=class extends y{constructor(){super(...arguments),this.uuid=Ua(),this.selectStore=new aw,this.value="",this.disabled=!1,this.handleClickOutside=e=>{const t=this.querySelector("[data-select-uuid]"),r=e.target;t!=null&&t.contains(r)||this.selectStore.close()}}updated(e){super.updated(e),e.has("value")&&this.value!==this.selectStore.selectedValue&&this.syncValueToStore()}connectedCallback(){super.connectedCallback(),document.addEventListener("mousedown",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}firstUpdated(){const e=this.querySelector("div[part=select]");this.moveLightDomChildrenInto(e),this.syncValueToStore()}syncValueToStore(){var e;if(this.value){const t=this.querySelector(`pont-select-item[value="${this.value}"]`),r=((e=t==null?void 0:t.textContent)==null?void 0:e.trim())||this.value;this.selectStore.select(this.value,r)}else this.selectStore.select("","")}createRenderRoot(){return this}render(){return l`
2103
+ `}};wh([Po("[data-radix-scroll-area-viewport]")],wa.prototype,"viewportEl",2);wa=wh([p("pont-scroll-area")],wa);class aw{constructor(){this.state={isOpen:!1,selectedValue:"",selectedText:""},this.listeners=new Set}subscribe(t){this.listeners.add(t)}unsubscribe(t){this.listeners.delete(t)}notify(){this.listeners.forEach(t=>t())}get isOpen(){return this.state.isOpen}get selectedValue(){return this.state.selectedValue}get selectedText(){return this.state.selectedText}open(){this.state.isOpen||(this.state.isOpen=!0,this.notify())}close(){this.state.isOpen&&(this.state.isOpen=!1,this.notify())}toggle(){this.state.isOpen=!this.state.isOpen,this.notify()}select(t,r,o){this.state.selectedValue=t,this.state.selectedText=r,this.state.isOpen=!1,this.notify()}}const re={root:["pont-font-select-font-family"],value:["pont-flex","pont-gap-select-value-space-gap pont-items-center","pont-line-clamp-1"],trigger:{trigger:["pont-flex","pont-gap-select-trigger-space-gap pont-justify-between pont-items-center","pont-px-select-trigger-space-px pont-py-select-trigger-space-py","pont-w-full pont-h-select-trigger-space-h","pont-text-select-trigger-font pont-whitespace-nowrap","pont-bg-select-trigger-color-bg","pont-rounded-select-trigger-radius pont-border-select-trigger-width-border pont-border-select-trigger-color-border pont-outline-none","pont-transition-[color,box-shadow]","hover:pont-bg-select-trigger-color-bg-hover","focus-visible:pont-border-select-trigger-color-border-focus focus-visible:pont-ring-select-trigger-width-ring-focus focus-visible:pont-ring-select-trigger-color-ring-focus","pont-select-disabled:pont-opacity-select-trigger-opacity-disabled pont-select-disabled:pont-cursor-not-allowed","aria-invalid:pont-border-select-trigger-color-border-invalid aria-invalid:pont-ring-select-trigger-width-ring-invalid aria-invalid:pont-ring-select-trigger-color-ring-invalid","data-[placeholder]:pont-text-select-trigger-placeholder-color-text"],icon:["pont-shrink-0","pont-size-select-trigger-icon-space-size","pont-text-select-trigger-icon-color-text","pont-opacity-select-trigger-icon-opacity","pont-pointer-events-none"]},content:{content:["pont-fixed pont-overflow-x-hidden pont-overflow-y-auto pont-z-50","pont-w-fit","pont-text-select-content-color-text","pont-bg-select-content-color-bg","pont-rounded-select-content-radius pont-border-select-content-width-border pont-border-select-content-color-border","pont-shadow-select-content-shadow","pont-slide-in-from-top-2","pont-translate-y-1","data-[state=open]:pont-animate-in data-[state=open]:pont-fade-in-0 data-[state=open]:pont-zoom-in-95","data-[state=closed]:pont-animate-out data-[state=closed]:pont-fade-out-0 data-[state=closed]:pont-zoom-out-95"],viewport:["pont-p-select-content-viewport-space-p","pont-w-full","pont-scroll-my-1"]},label:["pont-px-select-label-space-px pont-py-select-label-space-py","pont-text-select-label-font pont-text-select-label-color-text"],item:{item:["pont-flex pont-relative","pont-gap-select-item-space-gap pont-items-center","pont-pl-select-item-space-pl pont-pr-select-item-space-pr pont-py-select-item-space-py","pont-w-full","pont-text-select-item-font","pont-rounded-select-item-radius pont-outline-hidden","pont-cursor-default pont-select-none","hover:pont-text-select-item-color-text-hover hover:pont-bg-select-item-color-bg-hover","focus:pont-text-select-item-color-text-focus focus:pont-bg-select-item-color-bg-focus","data-[disabled]:pont-opacity-select-item-opacity-disabled data-[disabled]:pont-pointer-events-none"],indicator:["pont-flex pont-absolute pont-right-2","pont-justify-center pont-items-center","pont-size-select-item-indicator-space-size"],icon:["pont-shrink-0","pont-size-select-item-icon-space-size","pont-text-select-item-icon-color-text","pont-pointer-events-none"]},separator:["pont-mx-select-separator-space-mx pont-my-select-separator-space-my","pont-h-select-separator-space-h","pont-bg-select-separator-color-bg","pont-pointer-events-none"]};var lw=Object.defineProperty,dw=Object.getOwnPropertyDescriptor,ul=(e,t,r,o)=>{for(var n=o>1?void 0:o?dw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&lw(t,r,n),n};let br=class extends y{constructor(){super(...arguments),this.uuid=Ua(),this.selectStore=new aw,this.value="",this.disabled=!1,this.handleClickOutside=e=>{const t=this.querySelector("[data-select-uuid]"),r=e.target;t!=null&&t.contains(r)||this.selectStore.close()}}updated(e){super.updated(e),e.has("value")&&this.value!==this.selectStore.selectedValue&&this.syncValueToStore()}connectedCallback(){super.connectedCallback(),document.addEventListener("mousedown",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}firstUpdated(){const e=this.querySelector("div[part=select]");this.moveLightDomChildrenInto(e),this.syncValueToStore()}syncValueToStore(){var e;if(this.value){const t=this.querySelector(`pont-select-item[value="${this.value}"]`),r=((e=t==null?void 0:t.textContent)==null?void 0:e.trim())||this.value;this.selectStore.select(this.value,r)}else this.selectStore.select("","")}createRenderRoot(){return this}render(){return l`
2104
2104
  <div
2105
2105
  part="select"
2106
2106
  data-select-uuid=${this.uuid}
2107
- class=${m(ne.root,this.className)}
2107
+ class=${m(re.root,this.className)}
2108
2108
  ></div>
2109
2109
  `}};ul([a({type:String})],br.prototype,"value",2);ul([a({type:Boolean,reflect:!0})],br.prototype,"disabled",2);br=ul([p("pont-select")],br);/**
2110
2110
  * @license
@@ -2114,12 +2114,12 @@
2114
2114
  <div
2115
2115
  part="select-group"
2116
2116
  data-slot="select-content"
2117
- class="${m(ne.content.content,this.className)}"
2117
+ class="${m(re.content.content,this.className)}"
2118
2118
  style="${pw(this._dropdownStyle)}"
2119
2119
  >
2120
2120
  <div
2121
2121
  part="select-viewport"
2122
- class="${m(ne.content.viewport)}"
2122
+ class="${m(re.content.viewport)}"
2123
2123
  ></div>
2124
2124
  </div>
2125
2125
  `}};ml([g()],wi.prototype,"focusedIndex",2);ml([g()],wi.prototype,"_dropdownStyle",2);wi=ml([p("pont-select-group")],wi);var mw=Object.defineProperty,gw=Object.getOwnPropertyDescriptor,Jr=(e,t,r,o)=>{for(var n=o>1?void 0:o?gw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&mw(t,r,n),n};let yr=class extends y{constructor(){super(...arguments),this.value="",this.isSelected=!1,this.isFocus=!1,this.selectItemIndex=-1,this.onSelect=(e,t)=>{},this.class="",this._onStoreChange=()=>{var e,t;this.isSelected=this.value.toLowerCase()===((t=(e=this._select.selectStore.selectedValue)==null?void 0:e.toLowerCase)==null?void 0:t.call(e)),this.requestUpdate()},this.handleClick=e=>{e.stopPropagation();const t=this.getTextContent();this._select.selectStore.select(this.value,t),this.onSelect(this.value,this.selectItemIndex),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof br);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this._onStoreChange)}disconnectedCallback(){this._select.selectStore.unsubscribe(this._onStoreChange),super.disconnectedCallback()}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}get _containerElement(){return this.querySelector("div[part=select-item-container]")}createRenderRoot(){return this}getTextContent(){var o;const e=this._containerElement;if(e&&e.textContent)return e.textContent.trim();const t=this.querySelector("[part=select-item-indicator]"),r=this.cloneNode(!0);if(t){const n=r.querySelector("[part=select-item-indicator]");n==null||n.remove()}return((o=r.textContent)==null?void 0:o.trim())||""}render(){const e=this.getFilteredAttributes();return l`
@@ -2127,7 +2127,7 @@
2127
2127
  ${Et(e)}
2128
2128
  part="select-item"
2129
2129
  @click=${this.handleClick}
2130
- class=${m(ne.item.item,this.className)}
2130
+ class=${m(re.item.item,this.className)}
2131
2131
  data-hs-select-value=${this.value}
2132
2132
  aria-selected="${this.isSelected}"
2133
2133
  data-selected="${this.isSelected}"
@@ -2135,7 +2135,7 @@
2135
2135
  ${this.isSelected?l`
2136
2136
  <span
2137
2137
  part="select-item-indicator"
2138
- class=${m(ne.item.indicator)}
2138
+ class=${m(re.item.indicator)}
2139
2139
  >
2140
2140
  <svg
2141
2141
  xmlns="http://www.w3.org/2000/svg"
@@ -2147,7 +2147,7 @@
2147
2147
  stroke-width="2"
2148
2148
  stroke-linecap="round"
2149
2149
  stroke-linejoin="round"
2150
- class=${m(ne.item.icon,"lucide lucide-check-icon lucide-check")}
2150
+ class=${m(re.item.icon,"lucide lucide-check-icon lucide-check")}
2151
2151
  >
2152
2152
  <path d="M20 6 9 17l-5-5" />
2153
2153
  </svg>
@@ -2159,7 +2159,7 @@
2159
2159
  `}};Jr([a()],yr.prototype,"value",2);Jr([a()],yr.prototype,"isSelected",2);Jr([a()],yr.prototype,"isFocus",2);Jr([a()],yr.prototype,"selectItemIndex",2);Jr([a({type:Function})],yr.prototype,"onSelect",2);Jr([a()],yr.prototype,"class",2);yr=Jr([p("pont-select-item")],yr);var fw=Object.getOwnPropertyDescriptor,vw=(e,t,r,o)=>{for(var n=o>1?void 0:o?fw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let fc=class extends y{get _containerElement(){return this.querySelector("div[part=select-label]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}render(){return l`
2160
2160
  <div
2161
2161
  part="select-label"
2162
- class=${m(ne.label,this.className)}
2162
+ class=${m(re.label,this.className)}
2163
2163
  ></div>
2164
2164
  `}};fc=vw([p("pont-select-label")],fc);var bw=Object.defineProperty,yw=Object.getOwnPropertyDescriptor,gl=(e,t,r,o)=>{for(var n=o>1?void 0:o?yw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&bw(t,r,n),n};let $i=class extends y{constructor(){super(...arguments),this.state=rl,this.isOpen=!1}get _containerElement(){return this.querySelector("div[part=select-list]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}render(){return l`
2165
2165
  <div
@@ -2174,9 +2174,9 @@
2174
2174
  rtgcmd-separator
2175
2175
  part="select-separator"
2176
2176
  role="separator"
2177
- class=${m(ne.separator,this.className)}
2177
+ class=${m(re.separator,this.className)}
2178
2178
  ></div>
2179
- `}};fl([a({type:String})],Pi.prototype,"_id",2);fl([a({attribute:"aria-hidden",type:String})],Pi.prototype,"_hidden",2);Pi=fl([p("pont-select-separator")],Pi);var $w=Object.defineProperty,Pw=Object.getOwnPropertyDescriptor,Ph=(e,t,r,o)=>{for(var n=o>1?void 0:o?Pw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&$w(t,r,n),n};let $a=class extends y{constructor(){super(...arguments),this.id="",this._triggerId="",this.onStoreChange=()=>{this.requestUpdate()},this.handleClick=e=>{e.stopPropagation(),!(this._select&&this._select.disabled)&&this._select&&this._select.selectStore.toggle()}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof br);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this.onStoreChange),this.classObserver=new MutationObserver(()=>{this.requestUpdate()}),this.classObserver.observe(this,{attributes:!0,attributeFilter:["class"]}),this._select&&(this.parentObserver=new MutationObserver(()=>{this.requestUpdate()}),this.parentObserver.observe(this._select,{attributes:!0,attributeFilter:["disabled"]}))}disconnectedCallback(){var e,t;this._select.selectStore.unsubscribe(this.onStoreChange),(e=this.classObserver)==null||e.disconnect(),(t=this.parentObserver)==null||t.disconnect()}get _containerElement(){return this.querySelector("span[part=select-trigger-container]")}firstUpdated(e){var t;super.firstUpdated(e),this._adoptId(),this.moveLightDomChildrenInto(this._containerElement),(t=this._containerElement)==null||t.addEventListener("click",this.handleClick)}updated(e){var t;(t=super.updated)==null||t.call(this,e),e.has("id")&&this._adoptId()}_adoptId(){this.id&&(this._triggerId=this.id),this.removeAttribute("id")}createRenderRoot(){return this}getAttributesToExclude(){return["data-testid"]}getClassAttribute(){const e=this.getAttribute("class")||"",t=this.customClass||"",r=this.className||"";return e||t||r||""}filterConflictingWidthClasses(e,t){const r=/pont-w-[\w-[\]]+/;return r.test(t)?e.map(n=>n.split(/\s+/).filter(i=>!r.test(i)).join(" ")):e}render(){var o;const e=this.getClassAttribute(),t=this.filterConflictingWidthClasses(ne.trigger.trigger,e),r=((o=this._select)==null?void 0:o.disabled)||!1;return l`
2179
+ `}};fl([a({type:String})],Pi.prototype,"_id",2);fl([a({attribute:"aria-hidden",type:String})],Pi.prototype,"_hidden",2);Pi=fl([p("pont-select-separator")],Pi);var $w=Object.defineProperty,Pw=Object.getOwnPropertyDescriptor,Ph=(e,t,r,o)=>{for(var n=o>1?void 0:o?Pw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&$w(t,r,n),n};let $a=class extends y{constructor(){super(...arguments),this.id="",this._triggerId="",this.onStoreChange=()=>{this.requestUpdate()},this.handleClick=e=>{e.stopPropagation(),!(this._select&&this._select.disabled)&&this._select&&this._select.selectStore.toggle()}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof br);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this.onStoreChange),this.classObserver=new MutationObserver(()=>{this.requestUpdate()}),this.classObserver.observe(this,{attributes:!0,attributeFilter:["class"]}),this._select&&(this.parentObserver=new MutationObserver(()=>{this.requestUpdate()}),this.parentObserver.observe(this._select,{attributes:!0,attributeFilter:["disabled"]}))}disconnectedCallback(){var e,t;this._select.selectStore.unsubscribe(this.onStoreChange),(e=this.classObserver)==null||e.disconnect(),(t=this.parentObserver)==null||t.disconnect()}get _containerElement(){return this.querySelector("span[part=select-trigger-container]")}firstUpdated(e){var t;super.firstUpdated(e),this._adoptId(),this.moveLightDomChildrenInto(this._containerElement),(t=this._containerElement)==null||t.addEventListener("click",this.handleClick)}updated(e){var t;(t=super.updated)==null||t.call(this,e),e.has("id")&&this._adoptId()}_adoptId(){this.id&&(this._triggerId=this.id),this.removeAttribute("id")}createRenderRoot(){return this}getAttributesToExclude(){return["data-testid"]}getClassAttribute(){const e=this.getAttribute("class")||"",t=this.customClass||"",r=this.className||"";return e||t||r||""}filterConflictingWidthClasses(e,t){const r=/pont-w-[\w-[\]]+/;return r.test(t)?e.map(n=>n.split(/\s+/).filter(i=>!r.test(i)).join(" ")):e}render(){var o;const e=this.getClassAttribute(),t=this.filterConflictingWidthClasses(re.trigger.trigger,e),r=((o=this._select)==null?void 0:o.disabled)||!1;return l`
2180
2180
  <button
2181
2181
  type="button"
2182
2182
  id=${this._triggerId!==""?this._triggerId:h}
@@ -2202,13 +2202,13 @@
2202
2202
  stroke-width="2"
2203
2203
  stroke-linecap="round"
2204
2204
  stroke-linejoin="round"
2205
- class=${m(ne.trigger.icon,"lucide lucide-chevron-down-icon lucide-chevron-down")}
2205
+ class=${m(re.trigger.icon,"lucide lucide-chevron-down-icon lucide-chevron-down")}
2206
2206
  >
2207
2207
  <path d="m6 9 6 6 6-6" />
2208
2208
  </svg>
2209
2209
  </button>
2210
2210
  `}};Ph([a({type:String})],$a.prototype,"id",2);$a=Ph([p("pont-select-trigger")],$a);var Cw=Object.defineProperty,Ew=Object.getOwnPropertyDescriptor,Ch=(e,t,r,o)=>{for(var n=o>1?void 0:o?Ew(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&Cw(t,r,n),n};let Pa=class extends y{constructor(){super(...arguments),this.placeholder="select a value",this.onStoreChange=()=>{this.requestUpdate()},this.renderLabel=()=>{var t;const e=(t=this._select)==null?void 0:t.selectStore;return e&&e.selectedValue!==void 0&&e.selectedValue!==""?e.selectedText||e.selectedValue:this.placeholder}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof br);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this.onStoreChange),document.addEventListener("clicked-select-item",()=>{this.requestUpdate()})}disconnectedCallback(){this._select.selectStore.unsubscribe(this.onStoreChange)}createRenderRoot(){return this}render(){return l`
2211
- <span part="select-value" class=${m(ne.value,this.className)}>
2211
+ <span part="select-value" class=${m(re.value,this.className)}>
2212
2212
  ${this.renderLabel()}
2213
2213
  </span>
2214
2214
  `}};Ch([a({type:String})],Pa.prototype,"placeholder",2);Pa=Ch([p("pont-select-value")],Pa);const Sw="pont-bg-skeleton-color-bg pont-animate-skeleton-animate pont-rounded-skeleton-radius";var xw=Object.getOwnPropertyDescriptor,Ow=(e,t,r,o)=>{for(var n=o>1?void 0:o?xw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let vc=class extends y{createRenderRoot(){return this}render(){return l` <div class=${m(Sw,this.className)}></div> `}};vc=Ow([p("pont-skeleton")],vc);var Rw=Object.defineProperty,Iw=Object.getOwnPropertyDescriptor,Eh=(e,t,r,o)=>{for(var n=o>1?void 0:o?Iw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&Rw(t,r,n),n};let Ca=class extends f{constructor(){super(...arguments),this.variant="circle"}createRenderRoot(){return this}render(){return this.variant==="basic"?l`
@@ -2645,8 +2645,8 @@
2645
2645
  </div>
2646
2646
  ${this.hasDefaultPagination&&this.hasDefaultSelect?this._renderPagination():h}
2647
2647
  </div>
2648
- `}};ft([a({type:String})],dt.prototype,"placeholder",2);ft([a({type:Array})],dt.prototype,"dataTable",2);ft([a({type:Boolean})],dt.prototype,"hasDefaultSelect",2);ft([a({type:Boolean})],dt.prototype,"hasDefaultPagination",2);ft([a({type:Boolean})],dt.prototype,"hasDefaultSearch",2);ft([a({type:Object})],dt.prototype,"checkedRows",2);ft([a({type:String})],dt.prototype,"searchTerm",2);ft([a({type:Object})],dt.prototype,"columnVisibility",2);ft([a({type:String})],dt.prototype,"sortColumn",2);ft([a({type:String})],dt.prototype,"sortDirection",2);ft([a({type:Object})],dt.prototype,"cellRenderers",2);ft([a({type:Object})],dt.prototype,"headerRenderers",2);ft([a({type:Array})],dt.prototype,"rowActions",2);ft([a({type:Array})],dt.prototype,"paginationLabels",2);ft([a({type:Number})],dt.prototype,"pageSize",2);ft([a({type:Number})],dt.prototype,"currentPage",2);ft([a({type:Array})],dt.prototype,"sortableColumns",2);ft([a({type:Array})],dt.prototype,"columnOrder",2);ft([a({type:Function})],dt.prototype,"isRowDisabled",2);dt=ft([p("pont-data-table")],dt);var H=class extends Error{constructor(t,r,o,n){super(r);E(this,"code");E(this,"details");E(this,"status");this.name="LoginflowError",this.code=t,this.details=o,this.status=n}};function Ah(e){const t=(e??"").trim();if(!t)throw new H("CONFIG_ERROR","domain is required");if(t.startsWith("/")){if(typeof location>"u")throw new H("CONFIG_ERROR",`domain "${t}" is relative to the page origin, and there is no page here`);return Dc(new URL(t,location.origin))}const r=/^https?:\/\//i.test(t)?"":`${j$(U$(t))?"http":"https"}://`;try{return Dc(new URL(`${r}${t}`))}catch{throw new H("CONFIG_ERROR",`domain "${t}" is not a hostname, an origin, or a path`)}}function Dc(e){return`${e.origin}${e.pathname}`.replace(/\/+$/,"")}function U$(e){return e.split("/")[0]}function j$(e){return/^(localhost|127\.0\.0\.1|\[::1\])(:\d+)?$/i.test(e)}var ye,q$=(ye=class{constructor(){E(this,"data",new Map)}static get Instance(){return ye.instance||(ye.instance=new ye),ye.instance}get(t){return this.data.get(t)}set(t,r){this.data.set(t,r)}setConfig(t){this.data.set("config",t)}getConfig(){return this.data.get("config")}getApiBaseUrl(){return Ah(this.getConfig().domain)}apiIsSameOrigin(){if(typeof location>"u")return!1;try{return new URL(this.getApiBaseUrl()).host===location.host}catch{return!1}}remove(t){this.data.delete(t)}clear(){this.data.clear()}},E(ye,"instance"),ye),G=q$.Instance,_e,lo=(_e=class{constructor(){}static get Instance(){return _e.instance||(_e.instance=new _e),_e.instance}async request(t,r={}){const o=G.getConfig(),n=`${G.getApiBaseUrl()}${t}`,i=5e4,s=new AbortController,d=setTimeout(()=>s.abort(),i);try{const c=await fetch(n,{...r,signal:s.signal,headers:{"Content-Type":"application/json",...o.headers,...r.headers}});if(clearTimeout(d),!c.ok){const u=await c.json().catch(()=>({}));throw new H(u.code||u.error||"API_ERROR",u.message||u.error_description||`HTTP ${c.status}: ${c.statusText}`,u.details,c.status)}return await c.json()}catch(c){throw clearTimeout(d),c instanceof H?c:c instanceof Error?c.name==="AbortError"?new H("TIMEOUT","Request timeout"):new H("NETWORK_ERROR",c.message):new H("UNKNOWN_ERROR","An unknown error occurred")}}async post(t,r){return this.request(t,{credentials:"include",method:"POST",body:r?JSON.stringify(r):void 0})}async get(t){return this.request(t,{credentials:"include",method:"GET"})}async getOptional(t){const r=G.getConfig(),o=await fetch(`${G.getApiBaseUrl()}${t}`,{credentials:"include",method:"GET",headers:{...r.headers}});if(o.status===204)return null;if(!o.ok)throw new H("API_ERROR",`HTTP ${o.status}: ${o.statusText}`,void 0,o.status);return await o.json()}async postForm(t,r){return this.request(t,{credentials:"include",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(r).toString()})}},E(_e,"instance"),_e),Th="__Secure-pontive_session_state",ps="__Secure-pontive_session_probe";function z$(){return Dh(Th)?"present":V$()?"absent":"unknown"}function Oa(){if(!(typeof document>"u"||typeof location>"u"))for(const e of["",...K$(location.hostname)])Ra(Th,"",e,0)}function V$(){if(typeof document>"u"||typeof location>"u")return!1;const e=G$();try{Ra(ps,"1",e,60);const t=Dh(ps)==="1";return Ra(ps,"",e,0),t&&H$(e)}catch{return!1}}function H$(e){return e!==""||G.apiIsSameOrigin()}function G$(){let e;try{e=new URL(G.getApiBaseUrl()).hostname}catch{return""}const t=location.hostname;if(!e||!t||e.toLowerCase()===t.toLowerCase())return"";const r=t.split("."),o=e.split(".");let n=0;for(;n<r.length&&n<o.length&&r[r.length-1-n].toLowerCase()===o[o.length-1-n].toLowerCase();)n+=1;return n<2?"":o.slice(o.length-n).join(".")}function K$(e){const t=e.split("."),r=[];for(let o=1;o+2<=t.length;o+=1)r.push(t.slice(o).join("."));return r}function Ra(e,t,r,o){const n=W$()?"; Secure":"",i=r?`; Domain=${r}`:"";document.cookie=`${e}=${t}; Path=/; Max-Age=${o}; SameSite=Lax${i}${n}`}function W$(){return typeof globalThis.isSecureContext=="boolean"?globalThis.isSecureContext:location.protocol==="https:"}function Dh(e){if(typeof document>"u"||!document.cookie)return null;for(const t of document.cookie.split(";")){const r=t.indexOf("=");if(!(r<0)&&t.slice(0,r).trim()===e)return t.slice(r+1).trim()||null}return null}var Pt,St=(Pt=class{constructor(){E(this,"AUTH_SESSION_STORAGE_KEY","pontive_auth_session");E(this,"memorySession",null);E(this,"refreshTimeoutId",null);E(this,"refreshPromise",null);E(this,"refreshRetryCount",0);E(this,"refreshBlockedUntil",0);E(this,"sessionGeneration",0);E(this,"channel",null);E(this,"channelName","");E(this,"applyingBroadcast",!1);E(this,"restorePromise",null)}static get Instance(){return Pt.instance||(Pt.instance=new Pt),Pt.instance}setCurrentSession(t){this.sessionGeneration+=1,this.write(JSON.stringify(t)),this.publish({type:"session",session:t})}async withRefreshLock(t){const r=typeof navigator<"u"?navigator.locks:void 0;return r?r.request(this.channelKey("refresh"),t):t()}channelKey(t){const r=G.getConfig();return`pontive-${t}:${(r==null?void 0:r.domain)??""}:${(r==null?void 0:r.appId)??""}`}ensureChannel(){var r;if(typeof BroadcastChannel>"u")return null;const t=this.channelKey("session");return this.channel&&this.channelName===t?this.channel:((r=this.channel)==null||r.close(),this.channelName=t,this.channel=new BroadcastChannel(t),this.channel.onmessage=o=>this.receive(o.data),this.channel)}publish(t){var r;this.applyingBroadcast||(r=this.ensureChannel())==null||r.postMessage(t)}receive(t){this.applyingBroadcast=!0;try{if(t.type==="cleared"){this.clearSession();return}this.setCurrentSession(t.session),this.scheduleTokenRefresh()}finally{this.applyingBroadcast=!1}}isCurrentGeneration(t){return this.sessionGeneration===t}getCurrentSession(){const t=this.getStoredSession();return t?this.isSessionExpired(t)?(this.clearSession(),null):(this.shouldRefreshToken(t)&&this.triggerBackgroundRefresh(t),t):null}peekSession(){return this.getStoredSession()}isAuthenticated(){return this.getCurrentSession()!==null}getAuthenticatedUser(){const t=this.getCurrentSession();if(!t)return null;const r=t.id_token?this.decodeJWT(t.id_token):null;return r||(t.user??null)}cleanup(){var t;this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshPromise=null,(t=this.channel)==null||t.close(),this.channel=null,this.channelName=""}clearSession(){this.sessionGeneration+=1,this.memorySession=null,localStorage.removeItem(this.AUTH_SESSION_STORAGE_KEY),this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshRetryCount=0,this.refreshBlockedUntil=0,this.publish({type:"cleared"})}isSessionExpired(t){return!t||!t.expires_at?!0:Date.now()>=t.expires_at}cleanExpiredSession(){const t=this.getStoredSession();t&&this.isSessionExpired(t)&&this.clearSession()}getStoredSession(){const t=this.read();if(!t)return null;try{return JSON.parse(t)}catch{return this.clearSession(),null}}write(t){this.memorySession=t,localStorage.removeItem(this.AUTH_SESSION_STORAGE_KEY)}read(){return this.memorySession}decodeJWT(t){try{const o=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=decodeURIComponent(atob(o).split("").map(i=>"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)).join(""));return JSON.parse(n)}catch{return null}}shouldRefreshToken(t){if(!t||!t.expires_at)return!1;const r=Date.now(),o=t.expires_at,n=t.expires_in||3600,i=r+n*1e3*.2;return o<=i}scheduleTokenRefresh(){this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null);const t=this.getCurrentSession();if(!t||!t.expires_at)return;const r=Date.now(),o=t.expires_at,n=t.expires_in||3600,i=o-r-n*1e3*.2;i>0&&(this.refreshTimeoutId=setTimeout(()=>{this.triggerBackgroundRefresh(t)},i))}triggerBackgroundRefresh(t){this.refreshPromise||Date.now()<this.refreshBlockedUntil||(this.refreshPromise=this.withRefreshLock(()=>{const r=this.getStoredSession();return r&&!this.shouldRefreshToken(r)?(this.scheduleTokenRefresh(),Promise.resolve(null)):this.refreshTokens(r??t)}).then(r=>(r&&(this.setCurrentSession(r),this.refreshRetryCount=0,this.refreshBlockedUntil=0,this.scheduleTokenRefresh()),r)).catch(r=>(console.error("Background token refresh failed:",r),null)).finally(()=>{this.refreshPromise=null}))}async switchOrganization(t){if(!t)throw new H("INVALID_REQUEST","organizationId is required");return this.withRefreshLock(async()=>{const r=this.sessionGeneration,o=this.getCurrentSession(),n=await this.requestTokens(o,{organization_id:t});if(!this.isCurrentGeneration(r))throw new H("SESSION_CHANGED","the session changed while switching organization");return this.setCurrentSession(n),this.scheduleTokenRefresh(),n})}getOrganization(){const t=this.getCurrentSession(),r=t!=null&&t.access_token?this.decodeJWT(t.access_token):null,o=r==null?void 0:r.org_id;if(typeof o!="string"||o==="")return null;const n=i=>Array.isArray(i)?i.filter(s=>typeof s=="string"):[];return{id:o,roles:n(r==null?void 0:r.roles),permissions:n(r==null?void 0:r.permissions)}}async refreshTokens(t){const r=this.sessionGeneration;try{const o=await this.requestTokens(t);return this.isCurrentGeneration(r)?o:(console.warn("Token refresh returned after the session changed; discarding it"),null)}catch(o){return this.isCurrentGeneration(r)?Y$(o)?(console.error("Token refresh rejected, signing out:",Xn(o)),Oa(),this.clearSession(),null):(console.warn("Token refresh failed, keeping session and retrying:",Xn(o)),this.scheduleRefreshRetry(t),null):(console.warn("Token refresh failed after the session changed; ignoring:",Xn(o)),null)}}async fetchUserInfo(t){try{return await lo.Instance.request("/oauth2/userinfo",{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${t}`}})}catch(r){return console.debug("Could not read user info for the restored session:",Xn(r)),null}}async requestTokens(t,r={}){var i;const o={...r,grant_type:"refresh_token",client_id:(i=G.getConfig())==null?void 0:i.appId};t!=null&&t.refresh_token&&(o.refresh_token=t.refresh_token);const n=await lo.Instance.postForm("/oauth2/token",o);return{id_token:n.id_token??(t==null?void 0:t.id_token)??"",access_token:n.access_token,refresh_token:n.refresh_token??(t==null?void 0:t.refresh_token),expires_in:n.expires_in,expires_at:Date.now()+n.expires_in*1e3}}async readCurrentToken(){var r;const t=(r=G.getConfig())==null?void 0:r.appId;if(!t)return null;try{const o=await lo.Instance.getOptional(`/oauth2/session/token?client_id=${encodeURIComponent(t)}`);return!(o!=null&&o.access_token)||!(o.expires_in>0)?null:{id_token:"",access_token:o.access_token,expires_in:o.expires_in,expires_at:Date.now()+o.expires_in*1e3}}catch{return null}}async restoreSession(){const t=this.getStoredSession();return t&&!this.isSessionExpired(t)?t:z$()==="absent"?null:this.restorePromise?this.restorePromise:(this.restorePromise=this.withRefreshLock(async()=>{const r=this.getStoredSession();if(r&&!this.isSessionExpired(r))return r;try{const o=await this.readCurrentToken()??await this.requestTokens(null);return o.id_token||(o.user=await this.fetchUserInfo(o.access_token)??void 0),this.setCurrentSession(o),this.scheduleTokenRefresh(),o}catch(o){return Z$(o)&&Oa(),console.debug("No session to restore:",Xn(o)),null}}).finally(()=>{this.restorePromise=null}),this.restorePromise)}scheduleRefreshRetry(t){if(this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshRetryCount>=Pt.MAX_REFRESH_RETRIES){console.warn("Token refresh gave up after",this.refreshRetryCount,"attempts"),this.refreshRetryCount=0,this.refreshBlockedUntil=0;return}const r=Math.min(Pt.REFRESH_RETRY_BASE_MS*2**this.refreshRetryCount,Pt.MAX_REFRESH_RETRY_DELAY_MS);this.refreshRetryCount+=1,this.refreshBlockedUntil=Date.now()+r,this.refreshTimeoutId=setTimeout(()=>{this.refreshBlockedUntil=0,this.triggerBackgroundRefresh(t)},r)}},E(Pt,"MAX_REFRESH_RETRIES",5),E(Pt,"REFRESH_RETRY_BASE_MS",5e3),E(Pt,"MAX_REFRESH_RETRY_DELAY_MS",6e4),E(Pt,"instance"),Pt);function Y$(e){return!(e instanceof H)||e.status===void 0?!1:e.status===401?!0:e.status===400&&Q$.has(e.code)}var Q$=new Set(["invalid_grant","invalid_client"]);function Z$(e){return e instanceof H&&e.status!==void 0&&e.status>=400&&e.status<500}function Xn(e){return e instanceof H?`${e.code} (status ${e.status??"none"}): ${e.message}`:String(e)}var Lh=class{constructor(e=sessionStorage){E(this,"storage");E(this,"FLOW_STATE_KEY","pontive_loginflow_state");E(this,"FLOW_EXPIRY_MS",540*1e3);this.storage=e}getFlowState(){const e=this.storage.getItem(this.FLOW_STATE_KEY);if(!e)return null;try{const t=JSON.parse(e);return this.isExpired(t)?(this.clearFlowState(),null):t}catch{return this.clearFlowState(),null}}saveFlowState(e,t,r){const o=Date.now(),n=this.getFlowState(),i={flowType:e,flow_id:t,state:r.state,startedAt:(n==null?void 0:n.startedAt)||o,lastUpdatedAt:o,render_spec:r.render_spec};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(i))}restoreFromHistory(e){const t={flowType:e.flowType,flow_id:e.flow_id,state:e.state,startedAt:e.timestamp,lastUpdatedAt:e.timestamp,render_spec:void 0};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(t))}clearFlowState(){this.storage.removeItem(this.FLOW_STATE_KEY)}isExpired(e){return Date.now()-e.lastUpdatedAt>this.FLOW_EXPIRY_MS}get expiryMs(){return this.FLOW_EXPIRY_MS}},dr,Ii=(dr=class{static detect(t,r=window.location){if(dr.hasInviteToken(r))return"invitation";const o=r.pathname.toLowerCase();return t.invitationUrl&&o.includes(t.invitationUrl)?"invitation":o.includes(t.signinUrl)?"signin":o.includes(t.signupUrl)?"signup":"custom"}static hasInviteToken(t){try{return new URLSearchParams(t.search).has(dr.INVITE_TOKEN_PARAM)}catch{return!1}}},E(dr,"INVITE_TOKEN_PARAM","invite_token"),dr),Fh=class{constructor(){E(this,"listeners",new Map)}on(e,t){this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t)}off(e,t){var r;(r=this.listeners.get(e))==null||r.delete(t)}emit(e,t){const r=this.listeners.get(e);r&&r.forEach(o=>{try{o(t)}catch(n){console.error(`[FlowEventBus] Error in event handler for ${e}:`,n)}})}clear(){this.listeners.clear()}clearEvent(e){this.listeners.delete(e)}},J$=class{getNavigationType(){const e=performance.getEntriesByType("navigation");if(e.length>0)return e[0].type;const t=performance.navigation;if(t)switch(t.type){case 1:return"reload";case 2:return"back_forward";default:return"navigate"}return"navigate"}},zt,X$=(zt=class{constructor(t,r,o=window.location,n,i){E(this,"httpClient",lo.Instance);E(this,"flowId");E(this,"redirectTimeoutId",null);E(this,"flowStateManager");E(this,"flowEventBus");E(this,"location");E(this,"navigationTypeDetector");E(this,"eventHandlers",new Map([["switch_to_signin",this.handleSwitchToSignin.bind(this)],["switch_to_signup",this.handleSwitchToSignup.bind(this)],["continue_here",this.handleContinueHere.bind(this)]]));E(this,"linkWatchTimer",null);E(this,"linkWatchGeneration",0);E(this,"waitingForLink",!1);const s=G.getConfig();if(!s.domain)throw new H("CONFIG_ERROR","Domain is required");if(!s.appId)throw new H("CONFIG_ERROR","App ID is required");this.flowId=t,this.location=o,this.flowStateManager=n||new Lh,this.flowEventBus=r||new Fh,this.navigationTypeDetector=i||new J$,St.Instance.cleanExpiredSession(),St.Instance.scheduleTokenRefresh()}static async init(t,r,o,n,i){const s=new zt(t,r,o,n,i),d=await s.initializeFlowInternal();return{sdk:s,flowType:d.flowType,isResumed:d.isResumed,state:d.state,render_spec:d.render_spec,auth_result:d.auth_result}}async startFlow(t,r){if(!r.app_id)throw new H("VALIDATION_ERROR","Client ID is required");const o=`/auth/v1/authflows/${t}/start`;return this.executeFlowRequest(()=>this.httpClient.post(o,r),"START_FLOW_ERROR","Failed to start flow")}async resumeFlow(t,r){const o=r?`?continue=${encodeURIComponent(r)}`:"",n=`/auth/v1/authflows/${t}/resume${o}`;return this.executeFlowRequest(()=>this.httpClient.post(n),"RESUME_FLOW_ERROR","Failed to resume flow")}async processEvent(t,r){if(!t.event)throw new H("VALIDATION_ERROR","Event type is required");const o=this.eventHandlers.get(t.event);return o?await o():await this.processServerEvent(t,r)}async executeFlowRequest(t,r,o,n){try{const i=await t();return n&&await n(i),this.processAuthResult(i.auth_result),i.redirection&&this.redirect(i.redirection),i}catch(i){throw i instanceof H?i:new H(r,o,i instanceof Error?{originalError:i.message,stack:i.stack}:i)}}async processServerEvent(t,r){let o=this.flowStateManager.getFlowState();if(!o&&(console.warn("Flow state expired, restarting flow before processing event"),await this.initializeFlowInternal(),o=this.flowStateManager.getFlowState(),!o))throw new H("FLOW_RESTART_ERROR","Failed to restart flow - no flow state after initialization");const n=o.state,i=`/auth/v1/authflows/${o.flowType}/events`,s=this.waitingForLink;this.stopWatchingForLink();let d;try{d=await this.executeFlowRequest(()=>this.httpClient.post(i,t),"PROCESS_EVENT_ERROR","Failed to process event",r)}catch(c){if(s&&zt.flowIsGone(c))return this.announceContinuedElsewhere(o.flowType,""),{state:""};throw c}if(this.watchForLink(o.flowType,d),!d.auth_result){this.flowStateManager.saveFlowState(o.flowType,o.flow_id,d);const c=this.flowStateManager.getFlowState();if(c){const u=n!==d.state;this.flowEventBus.emit("flow:updated",{flowState:c,isNewStep:u})}}return d}processAuthResult(t){if(t){const r={id_token:t.id_token,access_token:t.access_token,refresh_token:t.refresh_token,expires_in:t.expires_in,expires_at:Date.now()+t.expires_in*1e3};St.Instance.setCurrentSession(r),St.Instance.scheduleTokenRefresh(),this.flowStateManager.clearFlowState();const{onAuthenticated:o}=G.getConfig();if(o){o(r);return}console.warn("pontive: signed in, but no onAuthenticated was supplied, so the SDK cannot route the user. Supply onAuthenticated to handle the handoff.")}}async initializeFlowInternal(){const t=G.getConfig(),r=Ii.detect(t,this.location);this.validateFlowType(r);const o=this.flowStateManager.getFlowState();return this.shouldResumeFlow(o,r)?await this.resumeExistingFlow(o,r):await this.startNewFlow(r)}validateFlowType(t){if(t==="custom"&&!this.flowId)throw new H("FLOW_ID_ERROR","Flow ID is required for custom flows")}shouldResumeFlow(t,r){const n=new URLSearchParams(this.location.search).get("resume")==="true";if(!t)return n;const i=this.navigationTypeDetector.getNavigationType();if(i==="navigate"&&!n)return this.flowStateManager.clearFlowState(),console.log(`Fresh navigation detected (type: ${i}), starting new flow`),!1;if(t.flowType!==r)return this.flowStateManager.clearFlowState(),console.log(`Flow type changed from ${t.flowType} to ${r}, starting new flow, flow_id: ${this.flowId}`),!1;if(r==="custom"&&t.flow_id!==this.flowId)return this.flowStateManager.clearFlowState(),console.log(`Custom flow ID changed, starting new flow, flow_id: ${this.flowId}`),!1;const s=n?"explicit resume=true":`navigation type: ${i}`;return console.log(`Resuming existing flow (${s})`),!0}async resumeExistingFlow(t,r){try{const o=await this.resumeFlow(r,this.continueParam());if(this.watchForLink(r,o),!o.auth_result){this.flowStateManager.saveFlowState(r,(t==null?void 0:t.flow_id)??this.determineFlowId(r),o);const n=this.flowStateManager.getFlowState();n&&this.flowEventBus.emit("flow:resumed",{flowState:n})}return{flowType:r,isResumed:!0,state:o.state,render_spec:o.render_spec,auth_result:o.auth_result}}catch(o){return this.flowStateManager.clearFlowState(),console.warn("Failed to resume flow, starting fresh:",o),await this.startNewFlow(r)}}async startNewFlow(t){const r=G.getConfig(),o=new URLSearchParams(this.location.search),n={};o.forEach((c,u)=>{n[u]=c}),r.organizationId&&!n.organization_id&&(n.organization_id=r.organizationId),console.log("metadata",n);const i=o.get("locales")||r.locales||void 0,s={app_id:r.appId,origin_url:this.location.href,signin_url:r.signinUrl,signup_url:r.signupUrl,locales:i,flow_id:this.determineFlowId(t),metadata:n},d=await this.startFlow(t,s);if(this.watchForLink(t,d),!d.auth_result){this.flowStateManager.saveFlowState(t,s.flow_id,d);const c=this.flowStateManager.getFlowState();c&&this.flowEventBus.emit("flow:started",{flowState:c})}return{flowType:t,isResumed:!1,state:d.state,render_spec:d.render_spec,auth_result:d.auth_result}}determineFlowId(t){switch(t){case"signin":return this.flowId||"signin-flow";case"signup":return this.flowId||"signup-flow";case"invitation":return this.flowId||"invitation-flow";case"custom":if(!this.flowId)throw new H("FLOW_ID_ERROR","Flow ID is required for custom flows");return this.flowId}}continueParam(){const t=new URLSearchParams(this.location.search);if(t.get("resume")==="true")return t.get("continue")??void 0}watchForLink(t,r){if(this.stopWatchingForLink(),this.waitingForLink=r.waiting_for_link===!0,!this.waitingForLink)return;const o=this.linkWatchGeneration,n=Date.now()+zt.LINK_POLL_LIMIT_MS,i=()=>{this.linkWatchTimer=setTimeout(s,zt.LINK_POLL_INTERVAL_MS)},s=async()=>{if(o!==this.linkWatchGeneration||Date.now()>n)return;if(typeof document<"u"&&document.hidden){i();return}let d;try{d=await this.httpClient.post(`/auth/v1/authflows/${t}/resume`)}catch(c){o===this.linkWatchGeneration&&zt.flowIsGone(c)&&this.announceContinuedElsewhere(t,"");return}if(o===this.linkWatchGeneration){if(d.waiting_for_link){i();return}this.announceContinuedElsewhere(t,d.state)}};i()}announceContinuedElsewhere(t,r){var o,n;this.stopWatchingForLink(),this.flowStateManager.clearFlowState(),(n=(o=G.getConfig()).onFlowStateChange)==null||n.call(o,{eventType:"flow_continued_elsewhere",flowType:t,state:r})}static flowIsGone(t){return t instanceof H&&t.status===401}stopWatchingForLink(){this.waitingForLink=!1,this.linkWatchGeneration++,this.linkWatchTimer!==null&&(clearTimeout(this.linkWatchTimer),this.linkWatchTimer=null)}async handleContinueHere(){const{continueHereUrl:t}=G.getConfig();this.flowStateManager.clearFlowState();let r=t;if(!r){const o=new URL(this.location.href);o.searchParams.delete("resume"),o.searchParams.delete("continue"),r=o.toString()}return this.redirect({url:r,redirect_delay:0}),{state:"End"}}async handleSwitchToSignin(){const t=G.getConfig();return this.redirect({url:this.withCurrentQuery(t.signinUrl),redirect_delay:0}),{state:"End"}}async handleSwitchToSignup(){const t=G.getConfig();return this.redirect({url:this.withCurrentQuery(t.signupUrl),redirect_delay:0}),{state:"End"}}withCurrentQuery(t){const r=this.location.search;return!r||r==="?"?t:t.includes("?")?`${t}&${r.slice(1)}`:`${t}${r}`}redirect(t){t.url&&(this.redirectTimeoutId!==null&&(console.log("Clearing existing redirect timeout before scheduling new redirect to:",t.url),clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.redirectTimeoutId=setTimeout(()=>{this.location.href=t.url},t.redirect_delay*1e3))}reloadPage(){setTimeout(()=>{this.location.reload()},0)}getEventBus(){return this.flowEventBus}cleanup(){this.stopWatchingForLink(),this.redirectTimeoutId&&(clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.flowEventBus.clear()}},E(zt,"LINK_POLL_INTERVAL_MS",3e3),E(zt,"LINK_POLL_LIMIT_MS",900*1e3),zt),tP=class{constructor(e){E(this,"delayMs");E(this,"timerId",null);this.delayMs=e}debounce(e){this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(()=>{e(),this.timerId=null},this.delayMs)}cancel(){this.timerId&&(clearTimeout(this.timerId),this.timerId=null)}isPending(){return this.timerId!==null}},eP=class{pushState(e,t,r){history.pushState(e,t,r)}replaceState(e,t,r){history.replaceState(e,t,r)}get state(){return history.state}},rP=class{constructor(e,t,r=!1,o=window.location,n,i){E(this,"popstateListener",null);E(this,"pageshowListener",null);E(this,"debouncer");E(this,"isProcessing",!1);E(this,"isHandlingNavigationEvent",!1);E(this,"onFlowRestartNeeded",null);E(this,"skipHistoryTracking");E(this,"flowStateManager");E(this,"historyAdapter");E(this,"location");this.onFlowRestartNeeded=t,this.skipHistoryTracking=r,this.debouncer=new tP(200),this.location=o,this.flowStateManager=n||new Lh,this.historyAdapter=i||new eP,this.subscribeToFlowEvents(e),this.initializeListener()}subscribeToFlowEvents(e){e.on("flow:started",this.handleFlowStart.bind(this)),e.on("flow:updated",this.handleFlowUpdate.bind(this)),e.on("flow:resumed",this.handleFlowResume.bind(this))}initializeListener(){this.popstateListener=e=>{console.log("[NavigationManager] popstate event received"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Debounce timeout fired, handling popstate"),this.handlePopState(e)})},this.pageshowListener=e=>{e.persisted&&(console.log("[NavigationManager] Page restored from bfcache"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Handling bfcache restoration"),this.handleBfcacheRestoration()}))},window.addEventListener("popstate",this.popstateListener),window.addEventListener("pageshow",this.pageshowListener)}async handlePopState(e){if(this.isProcessing){console.log("[NavigationManager] Already processing popstate, skipping");return}console.log("[NavigationManager] Starting popstate processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const t=e.state,r=this.flowStateManager.getFlowState(),o=G.getConfig(),n=Ii.detect(o,this.location);if(t&&this.restoreHistoryStateToSession(t),this.shouldRestartFlow(t,r,n)){await this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from history")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}}async handleBfcacheRestoration(){if(this.isProcessing){console.log("[NavigationManager] Already processing bfcache restoration, skipping");return}console.log("[NavigationManager] Starting bfcache restoration processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const e=this.historyAdapter.state,t=this.flowStateManager.getFlowState(),r=G.getConfig(),o=Ii.detect(r,this.location);if(e&&this.restoreHistoryStateToSession(e),this.shouldRestartFlow(e,t,o)){await this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from bfcache")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}}restoreHistoryStateToSession(e){console.log("[NavigationManager] Restoring history state to session storage:",e),this.flowStateManager.restoreFromHistory(e)}shouldRestartFlow(e,t,r){return e&&e.flowType!==r?(console.log("[NavigationManager] Flow type changed via navigation:",e.flowType,"→",r),this.flowStateManager.clearFlowState(),!0):e?Date.now()-e.timestamp>this.flowStateManager.expiryMs?(console.log("[NavigationManager] History state expired, clearing and restarting flow"),this.flowStateManager.clearFlowState(),!0):(console.log("[NavigationManager] Valid history state restored, triggering restart to resume flow"),!0):(console.log("[NavigationManager] No history state, skipping"),!1)}async triggerFlowRestart(){this.onFlowRestartNeeded&&await this.onFlowRestartNeeded()}createHistoryState(e){return{flowType:e.flowType,flow_id:e.flow_id,state:e.state,timestamp:Date.now()}}updateBrowserHistory(e,t){if(this.skipHistoryTracking){console.log("[NavigationManager] Skipping history tracking (created from navigation)");return}const r=this.createHistoryState(e);try{t==="push"?(this.historyAdapter.pushState(r,"",this.location.href),console.log("[NavigationManager] Pushed state to history")):(this.historyAdapter.replaceState(r,"",this.location.href),console.log("[NavigationManager] Replaced state in history"))}catch(o){console.error("[NavigationManager] Failed to update history:",o)}}handleFlowStart(e){this.updateBrowserHistory(e.flowState,"replace")}handleFlowUpdate(e){const t=this.isHandlingNavigationEvent||!e.isNewStep?"replace":"push";this.updateBrowserHistory(e.flowState,t)}handleFlowResume(e){this.updateBrowserHistory(e.flowState,"replace")}destroy(){this.debouncer.cancel(),this.popstateListener&&(window.removeEventListener("popstate",this.popstateListener),this.popstateListener=null),this.pageshowListener&&(window.removeEventListener("pageshow",this.pageshowListener),this.pageshowListener=null),this.onFlowRestartNeeded=null}},Rr=new AbortController,nP=class{constructor(){E(this,"httpClient",lo.Instance);E(this,"capabilities",{webauthn:!1});E(this,"capabilitiesDetected",!1)}async detectCapabilities(){if(!this.capabilitiesDetected)try{if(typeof window.PublicKeyCredential=="function"?this.capabilities.webauthn=!0:this.capabilities.webauthn=!1,typeof PublicKeyCredential.getClientCapabilities=="function"){const e=await PublicKeyCredential.getClientCapabilities();this.capabilities={...this.capabilities,...e};return}typeof PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable=="function"&&(this.capabilities.userVerifyingPlatformAuthenticator=await PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()),(PublicKeyCredential==null?void 0:PublicKeyCredential.isConditionalMediationAvailable)!==void 0&&typeof PublicKeyCredential.isConditionalMediationAvailable=="function"?this.capabilities.conditionalGet=await PublicKeyCredential.isConditionalMediationAvailable():this.capabilities.conditionalGet=!1}finally{this.capabilitiesDetected=!0}}async fetchPublicKeyCredentialRequestOptions(e,t){try{return this.httpClient.post("/auth/v1/webauthn/login/options",{conditional:t,flow_type:e})}catch(r){return console.error("error",r),null}}async fetchPublicKeyCredentialCreationOptions(e,t){try{return this.httpClient.post("/auth/v1/webauthn/register/options",{conditional:t,flow_type:e})}catch(r){return console.error("error",r),null}}async startRegistration(e,t){if(await this.detectCapabilities(),!e)return console.error("No PublicKeyCredentialCreationOptionsJSON provided"),null;Rr.abort(),Rr=new AbortController;const r=this.toPublicKeyCredentialCreationOptions(e),o={signal:Rr.signal,publicKey:r};if(t){if(!this.isConditionalCreateAvailable())return console.error("Conditional create mediation not supported in this browser"),null;o.mediation="conditional"}try{const n=await navigator.credentials.create(o);if(!n){console.error("no credential returned by authenticator");return}const{id:i,rawId:s,response:d,type:c}=n;let u;typeof d.getTransports=="function"&&(u=d.getTransports());let v;if(typeof d.getPublicKeyAlgorithm=="function")try{v=d.getPublicKeyAlgorithm()}catch(_){hs("getPublicKeyAlgorithm()",_)}let b;if(typeof d.getPublicKey=="function")try{const _=d.getPublicKey();_!==null&&(b=this.bufferToBase64URLString(_))}catch(_){hs("getPublicKey()",_)}let w;if(typeof d.getAuthenticatorData=="function")try{w=this.bufferToBase64URLString(d.getAuthenticatorData())}catch(_){hs("getAuthenticatorData()",_)}return{id:i,rawId:this.bufferToBase64URLString(s),response:{attestationObject:this.bufferToBase64URLString(d.attestationObject),clientDataJSON:this.bufferToBase64URLString(d.clientDataJSON),transports:u,publicKeyAlgorithm:v,publicKey:b,authenticatorData:w},type:c,clientExtensionResults:n.getClientExtensionResults(),authenticatorAttachment:this.toAuthenticatorAttachment(n.authenticatorAttachment)}}catch(n){const i=this.identifyAuthenticationError({error:n,options:o});return i instanceof Ir?console.error(`WebAuthn authentication failed with code: ${i.code}, message: ${i.message}`):console.error("WebAuthn authentication failed with error:",n),null}}async startAuthentication(e,t){if(await this.detectCapabilities(),!e)return console.error("No PublicKeyCredentialRequestOptionsJSON provided"),null;if(!this.isWebAuthnAvailable())return console.error("WebAuthn not supported in this browser"),null;Rr.abort(),Rr=new AbortController;const r=this.toPublicKeyCredentialRequestOptions(e),o={signal:Rr.signal,publicKey:r};if(t){if(!this.isConditionalGetAvailable())return console.error("Conditional mediation not supported in this browser"),null;o.mediation="conditional",o.publicKey&&(o.publicKey.allowCredentials=[])}try{const n=await navigator.credentials.get(o);return this.toPublicKeyCredentialJSON(n)}catch(n){const i=this.identifyAuthenticationError({error:n,options:o});return i instanceof Ir?console.error(`WebAuthn authentication failed with code: ${i.code}, message: ${i.message}`):console.error("WebAuthn authentication failed with error:",n),null}}async signalUnknownCredential(e,t){if(await this.detectCapabilities(),this.isSignalUnknownCredentialAvailable())try{await PublicKeyCredential.signalUnknownCredential({rpId:e,credentialId:t})}catch(r){console.error("Failed to signal unknown credential:",r)}else console.warn("signalUnknownCredential not supported in this browser")}async signalCurrentUserDetails(e){if(await this.detectCapabilities(),this.isSignalCurrentUserDetailsAvailable())try{await PublicKeyCredential.signalCurrentUserDetails(e)}catch(t){console.error("Failed to signal current user details:",t)}else console.warn("signalCurrentUserDetails not supported. Ask user to update manually.")}toPublicKeyCredentialDescriptor(e){const{id:t}=e;return{...e,id:this.base64URLStringToBuffer(t),type:e.type,transports:e.transports}}toAuthenticatorAttachment(e){const t=["cross-platform","platform"];if(e&&!(t.indexOf(e)<0))return e}bufferToBase64URLString(e){const t=new Uint8Array(e);let r="";for(const n of t)r+=String.fromCharCode(n);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}base64URLStringToBuffer(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-t.length%4)%4,o=t.padEnd(t.length+r,"="),n=atob(o),i=new ArrayBuffer(n.length),s=new Uint8Array(i);for(let d=0;d<n.length;d++)s[d]=n.charCodeAt(d);return i}toPublicKeyCredentialJSON(e){if(typeof e.toJSON=="function")return e.toJSON();const t=e.response;return{id:e.id,type:e.type,rawId:this.bufferToBase64URLString(e.rawId),authenticatorAttachment:this.toAuthenticatorAttachment(e.authenticatorAttachment),clientExtensionResults:e==null?void 0:e.getClientExtensionResults(),response:{clientDataJSON:this.bufferToBase64URLString(t.clientDataJSON),authenticatorData:this.bufferToBase64URLString(t.authenticatorData),signature:this.bufferToBase64URLString(t.signature),userHandle:t.userHandle?this.bufferToBase64URLString(t.userHandle):void 0}}}toPublicKeyCredentialCreationOptions(e){var r;if(typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const t={challenge:this.base64URLStringToBuffer(e.challenge),rp:{id:e.rp.id,name:e.rp.name},user:{displayName:e.user.displayName,id:this.base64URLStringToBuffer(e.user.id),name:e.user.name},pubKeyCredParams:e.pubKeyCredParams.map(o=>({alg:o.alg,type:o.type})),timeout:e.timeout};if(e.attestation&&(t.attestation=e.attestation),e.extensions!==void 0&&(t.extensions=e.extensions),e.authenticatorSelection){const o={};e.authenticatorSelection.authenticatorAttachment&&(o.authenticatorAttachment=e.authenticatorSelection.authenticatorAttachment),e.authenticatorSelection.requireResidentKey&&(o.requireResidentKey=e.authenticatorSelection.requireResidentKey),e.authenticatorSelection.residentKey&&(o.residentKey=e.authenticatorSelection.residentKey),e.authenticatorSelection.userVerification&&(o.userVerification=e.authenticatorSelection.userVerification),t.authenticatorSelection=o}return(r=e.excludeCredentials)!=null&&r.length&&(t.excludeCredentials=e.excludeCredentials.map(o=>this.toPublicKeyCredentialDescriptor(o))),t}toPublicKeyCredentialRequestOptions(e){var r;if(typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const t={challenge:this.base64URLStringToBuffer(e.challenge)};return e.rpId!==void 0&&(t.rpId=e.rpId),e.timeout!==void 0&&(t.timeout=e.timeout),e.userVerification!==void 0&&(t.userVerification=e.userVerification),e.extensions!==void 0&&(t.extensions=e.extensions),(r=e.allowCredentials)!=null&&r.length&&(t.allowCredentials=e.allowCredentials.map(o=>this.toPublicKeyCredentialDescriptor(o))),t}identifyAuthenticationError({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Ir({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Ir({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(oP(o)){if(r.rpId!==o)return new Ir({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Ir({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Ir({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return e}isPublicKeyCredentialRequestOptionsJSON(e){return typeof e=="object"&&e!==null&&"challenge"in e}isWebAuthnAvailable(){return this.capabilities.webauthn}isSignalAllAcceptedCredentialsAvailable(){return!!this.capabilities.signalAllAcceptedCredentials}isSignalCurrentUserDetailsAvailable(){return!!this.capabilities.signalCurrentUserDetails}isSignalUnknownCredentialAvailable(){return!!this.capabilities.signalUnknownCredential}isConditionalGetAvailable(){return!!this.capabilities.conditionalGet}isConditionalCreateAvailable(){return!!this.capabilities.conditionalCreate}isHybridTransportAvailable(){return!!this.capabilities.hybridTransport}destroy(){Rr.abort()}};function hs(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
2649
- `,t)}var Ir=class extends Error{constructor({message:t,code:r,cause:o,name:n}){super(t);E(this,"code");this.name=n??o.name,this.code=r}};function oP(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}var we,iP=(we=class{constructor(){E(this,"configured",!1);E(this,"configuredResolve");E(this,"configuredPromise",new Promise(t=>{this.configuredResolve=t}));E(this,"loginflow",null);E(this,"navigationManager",null);E(this,"flowEventBus",null);E(this,"webauthnService",null)}static get Instance(){return we.instance||(we.instance=new we),we.instance}ensureConfigured(){if(!this.configured)throw new H("NOT_CONFIGURED","Auth.configure() must be called before using Auth methods")}ensureLoginflowInitialized(){if(!this.loginflow)throw new H("LOGINFLOW_NOT_INITIALIZED","Call Auth.startLoginflow() first")}async startLoginflowInternal(t,r=!1){this.ensureConfigured(),this.webauthnService&&(console.log("[AuthService] Cleaning up and aborting ongoing webauthn flows"),this.webauthnService.destroy(),this.webauthnService=null),this.loginflow&&(console.log("[AuthService] Cleaning up old loginflow instance"),this.loginflow.cleanup(),this.loginflow=null),this.navigationManager&&(console.log("[AuthService] Cleaning up old navigation manager instance"),this.navigationManager.destroy(),this.navigationManager=null),this.webauthnService=new nP,this.webauthnService.detectCapabilities(),this.flowEventBus=new Fh,this.navigationManager=new rP(this.flowEventBus,async()=>{console.log("[AuthService] Navigation restart triggered, restarting loginflow"),await this.startLoginflowInternal(void 0,!1)},r);const o=await X$.init(t,this.flowEventBus),n=G.getConfig();this.startPasskeyAuthentication(o.flowType,!0),this.loginflow=o.sdk;const i={flowType:o.flowType,isResumed:o.isResumed,state:o.state,render_spec:o.render_spec,auth_result:o.auth_result};return n.onFlowStateChange&&n.onFlowStateChange({eventType:o.isResumed?"flow_resumed":"flow_started",flowType:o.flowType,state:o.state,render_spec:o.render_spec,auth_result:o.auth_result,isResumed:o.isResumed}),i}configure(t){if(!t.domain||!t.appId)throw new H("CONFIG_ERROR","domain and appId are required");G.setConfig(t),this.configured=!0,this.configuredResolve()}whenConfigured(){return this.configuredPromise}isAuthenticated(){return this.ensureConfigured(),St.Instance.isAuthenticated()}getCurrentSession(){return this.ensureConfigured(),St.Instance.getCurrentSession()}async restoreSession(){return this.ensureConfigured(),St.Instance.restoreSession()}getAuthenticatedUser(){return this.ensureConfigured(),St.Instance.getAuthenticatedUser()}getOrganization(){return this.ensureConfigured(),St.Instance.getOrganization()}async switchOrganization(t){return this.ensureConfigured(),St.Instance.switchOrganization(t)}async startLoginflow(t){return this.startLoginflowInternal(t,!1)}async processLoginflowEvent(t){var i,s;this.ensureConfigured(),this.ensureLoginflowInitialized();const r=G.getConfig(),o=Ii.detect(r,location);if(t.event==="signin_with_passkey"&&!((i=t.data)!=null&&i.credential_request)){const d=await this.getPasskeyCredential(o,!1);if(!d||!d.cred)return console.error("no credential returned by browser"),{state:""};t.data={credential_request:d.cred}}if(t.event==="register_passkey"&&!((s=t.data)!=null&&s.conditional)){console.log("attempt to register a passkey");const d=await this.createPasskeyCredential(o,!1);if(!d)return console.error("no credential created by browser"),{state:""};t.data={credential_creation_response:d,conditional:!1}}const n=await this.loginflow.processEvent(t,async d=>{var c;if((c=d.data)!=null&&c.conditional_create_enabled){console.log("attempt to register a passkey conditionally");const u=await this.registerPasskey(o,!0);u&&(u.render_spec=void 0,d.render_spec=void 0)}});if(console.log("render spec",n.render_spec),r.onFlowStateChange){const d=sessionStorage.getItem("pontive_loginflow_state");let c="custom";if(d)try{c=JSON.parse(d).flowType}catch(u){console.error("Failed to parse flow state:",u)}r.onFlowStateChange({eventType:"flow_updated",flowType:c,state:n.state,render_spec:n.render_spec,auth_result:n.auth_result})}return n}async getPasskeyCredential(t,r){var n,i;const o=await((n=this.webauthnService)==null?void 0:n.fetchPublicKeyCredentialRequestOptions(t,r));if(!o)return console.error("failed to fetch public key request options"),null;try{return{cred:await((i=this.webauthnService)==null?void 0:i.startAuthentication(o,r)),options:o}}catch(s){return console.error("error starting authentication",s),null}}async startPasskeyAuthentication(t,r=!1){var s,d;const o=await this.getPasskeyCredential(t,r);if(!o||!o.cred){console.error("no credential found");return}const{cred:n,options:i}=o;try{((s=(await this.processLoginflowEvent({event:"signin_with_passkey",data:{credential_request:n}})).data)==null?void 0:s.error)==="CredentialNotFound"&&(i.rpId&&n.id?(d=this.webauthnService)==null||d.signalUnknownCredential(i.rpId,n.id):console.log("missing rpId or credential id for signalUnknownCredential"))}catch(c){console.error("failed to signin with passkey",c)}}async createPasskeyCredential(t,r){var o,n;try{const i=await((o=this.webauthnService)==null?void 0:o.fetchPublicKeyCredentialCreationOptions(t,r));if(!i){console.warn("no credential creation option returned by webauthn service"),console.log("skipping conditional passkey registration...");return}return(n=this.webauthnService)==null?void 0:n.startRegistration(i,r)}catch(i){console.log("error",i)}}async registerPasskey(t,r=!1){try{const o=await this.createPasskeyCredential(t,r),n=await this.processLoginflowEvent({event:"register_passkey",data:{credential_creation_response:o,conditional:r}});return console.log("passkey creation res",n),n}catch(o){console.log("error",o)}}invalidateSession(){St.Instance.clearSession()}async signOut(t){var n;this.ensureConfigured();const r=sP(St.Instance.peekSession()),o=((n=G.getConfig())==null?void 0:n.appId)??"";if(Oa(),St.Instance.clearSession(),St.Instance.cleanup(),this.loginflow&&(this.loginflow.cleanup(),this.loginflow=null),this.navigationManager&&(this.navigationManager.destroy(),this.navigationManager=null),this.flowEventBus&&(this.flowEventBus.clear(),this.flowEventBus=null),!G.apiIsSameOrigin()){window.location.assign(this.logoutUrl(r,o,t==null?void 0:t.returnTo));return}await this.endServerSession(r,o),window.location.reload()}async endServerSession(t,r){try{await fetch(`${G.getApiBaseUrl()}/oauth2/logout`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:r,...t?{logout_hint:t}:{}}).toString()})}catch(o){console.warn("Could not end the session at the authorization server:",o)}}logoutUrl(t,r,o){const n=new URLSearchParams({post_logout_redirect_uri:o??`${window.location.origin}${window.location.pathname}`,client_id:r});return t&&n.set("logout_hint",t),`${G.getApiBaseUrl()}/oauth2/logout?${n.toString()}`}},E(we,"instance"),we);function sP(e){for(const t of[e==null?void 0:e.id_token,e==null?void 0:e.access_token]){if(!t)continue;const r=St.Instance.decodeJWT(t);if(typeof(r==null?void 0:r.sid)=="string"&&r.sid)return r.sid}}var K=iP.Instance,aP=Object.defineProperty,lP=(e,t,r,o)=>{for(var n=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(t,r,n)||n);return n&&aP(t,r,n),n};class jt extends f{constructor(){super(),this.shadow=!1,this.__initialAttributesCache=null}parseJsonAttribute(t){try{const r=this.getAttribute(t);return r?JSON.parse(r):{}}catch{return{}}}get sbStyle(){return this.parseJsonAttribute("pont-style")}getAttributesToExclude(){return[]}getFilteredAttributes(){const t={};return Array.from(this.attributes).forEach(r=>{this.getAttributesToExclude().includes(r.name)||(t[r.name]=r.value??"")}),t}isCustomPropertySet(t){const r=getComputedStyle(this).getPropertyValue(t).trim();return r!=="inherit"&&r.length>0}applyCustomClass(t,r,o=""){var n,i;t.some(s=>this.isCustomPropertySet(s))&&((i=(n=this.shadowRoot)==null?void 0:n.querySelector(r))==null||i.classList.add(o))}moveAttributesToElement(t,r=["id","class"]){t&&r.forEach(o=>{const n=this.getAttribute(o);n!==null&&(t.setAttribute(o,n),this.removeAttribute(o))})}removeAttributesFromHost(t=["id","class"]){t.forEach(r=>{this.hasAttribute(r)&&this.removeAttribute(r)})}captureHostAttributes(){if(this.__initialAttributesCache)return this.__initialAttributesCache;const t={};return Array.from(this.attributes).forEach(r=>{t[r.name]=r.value}),this.__initialAttributesCache=t,t}getHostClass(){return this.captureHostAttributes().class??""}removeDuplicateContent(){var i;const t=document.createTreeWalker(this,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{var d;return s.nodeType===Node.COMMENT_NODE||s.nodeType===Node.TEXT_NODE&&!((d=s.textContent)!=null&&d.trim())?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),r=new Map,o=[];let n;for(;n=t.nextNode();){let s;if(n.nodeType===Node.TEXT_NODE){const d=(i=n.textContent)==null?void 0:i.trim();if(!d)continue;s=`text:${d}`}else if(n instanceof HTMLElement){const d=Array.from(n.attributes).map(c=>`${c.name}=${c.value}`).sort().join(":");s=`element:${n.tagName}:${d}`}else continue;if(r.has(s)){const d=r.get(s);d!=null&&d.parentNode&&o.push(d),r.set(s,n)}else r.set(s,n)}o.forEach(s=>{var d;return(d=s.parentNode)==null?void 0:d.removeChild(s)})}moveLightDomChildrenInto(t,r){let o;r!=null&&r.length?(o=r.filter(n=>this.contains(n)&&n!==t&&!n.contains(t)),o.forEach(n=>{const i=Array.from(t.childNodes).find(s=>{var d;return(d=s.isEqualNode)==null?void 0:d.call(s,n)});i&&t.removeChild(i)})):o=Array.from(this.childNodes).filter(n=>n!==t&&!t.contains(n)&&!n.contains(t)),o.forEach(n=>t.appendChild(n))}}lP([a({type:Boolean})],jt.prototype,"shadow");const Pr="pont:auth",Lo={showWatermark:!0},Bi="pont:branding";class dP{constructor(t){this.consumer=new ui(t,{context:Bi,subscribe:!0})}get showWatermark(){var t;return((t=this.consumer.value)==null?void 0:t.showWatermark)??Lo.showWatermark}}const kh="pont:design-mode";class Fo{constructor(t){this.host=t,this.consumer=new ui(t,{context:kh,subscribe:!0})}get active(){return this.host.hasAttribute("design-mode")?this.host.getAttribute("design-mode")!=="false":this.consumer.value??!1}}const Nh="pont:env",Mh=Symbol("renderSpecContext"),ko="pont-user-context",Bh="";function Vt(...e){return Ap(ja(e))}function cP(e){return Object.entries(e).filter(([t,r])=>typeof r!="object"&&r!=null).map(([t,r])=>`${t}: ${r};`).join(" ")}function pP(e){document.documentElement.setAttribute("data-theme",e)}function hP(){const e=document.documentElement.getAttribute("data-theme");(!e||e!=="light"&&e!=="dark")&&pP("light")}function uP(e,t){return e?e.includes("{{theme}}")?e.replace("{{theme}}",t):e:""}function Ia(){return new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))})}const Lc="abcdefghijklmnopqrstuvwxyz0123456789",mP=6;function gP(e){let t="";for(let r=0;r<mP;r++)t+=Lc.charAt(Math.floor(Math.random()*Lc.length));return t}const _t=()=>gP();function Ui(e){const t=document.createElement("pont-toast"),r=document.createElement("pont-toast-view-port");r.part="user-profile-toast",r.setAttribute("variant","destructive"),t.dataset.state="open";const o=document.createElement("div");o.className="pont-grid pont-gap-1";const n=document.createElement("pont-toast-title");n.textContent="Uh oh! Something went wrong.";const i=document.createElement("pont-toast-description");i.textContent=e,o.appendChild(n),o.appendChild(i),r.appendChild(o),t.appendChild(r),document.body.appendChild(t),setTimeout(()=>{t.dataset.state="open",r.dataset.state="open"},10),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t)},3.5*1e3)}async function fP(e,t=5e3){if(!e)return;let r;const o=new Promise(n=>{r=setTimeout(()=>n("timeout"),t)});try{await Promise.race([e.whenConfigured(),o])==="timeout"&&console.warn(`pontive: Auth.configure() has not been called after ${t}ms. Is this widget mounted inside <pont-provider>?`)}finally{clearTimeout(r)}}function vP(e){if(!(e!=null&&e.startsWith("data:image/svg+xml;base64,")))return null;try{const t=e.replace("data:image/svg+xml;base64,","");return atob(t)}catch(t){return console.error("Invalid base64 SVG:",t),null}}function bP(e){return/^https?:\/\//.test(e)||e!=null&&e.startsWith("data:image/svg+xml;base64,")?e:`data:image/svg+xml;base64,${e}`}function de(){var e;return(e=K.getCurrentSession())==null?void 0:e.access_token}function Aa(e,t=!1){if(!e&&e!==0)return"N/A";const r=typeof e=="string"?new Date(e):new Date(t?e:e*1e3);if(isNaN(r.getTime()))return"Invalid Date";const o=new Date,n=new Date(o.getFullYear(),o.getMonth(),o.getDate()),i=new Date(r.getFullYear(),r.getMonth(),r.getDate()),s=Math.floor((n.getTime()-i.getTime())/(1e3*60*60*24));return s===0?"Today":s===1?"Yesterday":s>1&&s<=6?r.toLocaleDateString("en-US",{weekday:"long"}):r.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function Ta(e,t=!1){if(!e&&e!==0)return"N/A";const r=typeof e=="string"?new Date(e):new Date(t?e:e*1e3);return isNaN(r.getTime())?"Invalid Time":r.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1})}function ji(e){if(!e)return"";const r=(e.includes("@")?e.split("@")[0]:e).split(/[\s._-]+/).filter(Boolean);return r.length===0?"":r.length===1?r[0].slice(0,2).toUpperCase():`${r[0][0]}${r[r.length-1][0]}`.toUpperCase()}function yP(e){return e instanceof Error&&"status"in e}function qi(e,t){var r,o;return yP(e)?((o=(r=e.data)==null?void 0:r.error)==null?void 0:o.message)??e.message??t:e instanceof Error&&e.message||t}const cn={variant:"secondary",size:"default",content:"label",iconAlign:"start",label:"Continue with Passkey"},pn={variant:"outline",size:"default",content:"icon-label",iconAlign:"start",prompt:"Continue with"},hn={variant:"default",size:"default",content:"label",iconAlign:"end",label:"Submit"},_P={apple:"Apple",discord:"Discord",facebook:"Facebook",github:"GitHub",google:"Google",linkedin:"LinkedIn",meta:"Meta",microsoft:"Microsoft",x:"X"},wP={apple:U`<path d="M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701" />`,discord:U`<path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z" />`,facebook:U`<path d="M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z" />`,github:U`<path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" />`,google:U`<path d="M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z" />`,linkedin:U`<path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" />`,meta:U`<path d="M6.915 4.03c-1.968 0-3.683 1.28-4.871 3.113C.704 9.208 0 11.883 0 14.449c0 .706.07 1.369.21 1.973a6.624 6.624 0 0 0 .265.86 5.297 5.297 0 0 0 .371.761c.696 1.159 1.818 1.927 3.593 1.927 1.497 0 2.633-.671 3.965-2.444.76-1.012 1.144-1.626 2.663-4.32l.756-1.339.186-.325c.061.1.121.196.183.3l2.152 3.595c.724 1.21 1.665 2.556 2.47 3.314 1.046.987 1.992 1.22 3.06 1.22 1.075 0 1.876-.355 2.455-.843a3.743 3.743 0 0 0 .81-.973c.542-.939.861-2.127.861-3.745 0-2.72-.681-5.357-2.084-7.45-1.282-1.912-2.957-2.93-4.716-2.93-1.047 0-2.088.467-3.053 1.308-.652.57-1.257 1.29-1.82 2.05-.69-.875-1.335-1.547-1.958-2.056-1.182-.966-2.315-1.303-3.454-1.303zm10.16 2.053c1.147 0 2.188.758 2.992 1.999 1.132 1.748 1.647 4.195 1.647 6.4 0 1.548-.368 2.9-1.839 2.9-.58 0-1.027-.23-1.664-1.004-.496-.601-1.343-1.878-2.832-4.358l-.617-1.028a44.908 44.908 0 0 0-1.255-1.98c.07-.109.141-.224.211-.327 1.12-1.667 2.118-2.602 3.358-2.602zm-10.201.553c1.265 0 2.058.791 2.675 1.446.307.327.737.871 1.234 1.579l-1.02 1.566c-.757 1.163-1.882 3.017-2.837 4.338-1.191 1.649-1.81 1.817-2.486 1.817-.524 0-1.038-.237-1.383-.794-.263-.426-.464-1.13-.464-2.046 0-2.221.63-4.535 1.66-6.088.454-.687.964-1.226 1.533-1.533a2.264 2.264 0 0 1 1.088-.285z" />`,microsoft:U`<path d="M11.4 24H0V12.6h11.4V24zM24 24H12.6V12.6H24V24zM11.4 11.4H0V0h11.4v11.4zM24 11.4H12.6V0H24v11.4z" />`,x:U`<path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.763l7.726-8.835L1.254 2.25H8.08l4.713 6.231 5.45-6.231zm-1.161 17.52h1.833L7.084 4.126H5.117L17.083 19.77z" />`};var $P=Object.defineProperty,PP=Object.getOwnPropertyDescriptor,Yt=(e,t,r,o)=>{for(var n=o>1?void 0:o?PP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&$P(t,r,n),n};exports.PontPasskeyButton=class extends f{constructor(){super(...arguments),this.seed=_t(),this.variant=cn.variant,this.size=cn.size,this.content=cn.content,this.iconAlign=cn.iconAlign,this._label=cn.label,this._loading=!1,this._handleClick=async()=>{if(!this.isDisabled){this._loading=!0,this.dispatchEvent(new CustomEvent(exports.PontPasskeyButton.CLICK_EVENT,{detail:{id:this.rootId,event:this.event},bubbles:!0,composed:!0}));try{if(this.event){const t=await K.processLoginflowEvent({event:this.event});this.dispatchEvent(new CustomEvent(exports.PontPasskeyButton.SUCCESS_EVENT,{detail:{id:this.rootId,event:this.event,result:t},bubbles:!0,composed:!0}))}}catch(t){const r=t instanceof Error?t.message:String(t);this.dispatchEvent(new CustomEvent(exports.PontPasskeyButton.ERROR_EVENT,{detail:{id:this.rootId,event:this.event,message:r,error:t},bubbles:!0,composed:!0}))}finally{this._loading=!1}}}}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:cn.label,this.requestUpdate("label",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontPasskeyButton.TAG}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.PontPasskeyButton.ICON}`}get isLoading(){return this.loading||this._loading}get isDisabled(){return this.disabled||this.isLoading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderIcon(){const t=this.content==="icon"?"":`pont-icon-align-${this.iconAlign}`;return this.isLoading?l`
2648
+ `}};ft([a({type:String})],dt.prototype,"placeholder",2);ft([a({type:Array})],dt.prototype,"dataTable",2);ft([a({type:Boolean})],dt.prototype,"hasDefaultSelect",2);ft([a({type:Boolean})],dt.prototype,"hasDefaultPagination",2);ft([a({type:Boolean})],dt.prototype,"hasDefaultSearch",2);ft([a({type:Object})],dt.prototype,"checkedRows",2);ft([a({type:String})],dt.prototype,"searchTerm",2);ft([a({type:Object})],dt.prototype,"columnVisibility",2);ft([a({type:String})],dt.prototype,"sortColumn",2);ft([a({type:String})],dt.prototype,"sortDirection",2);ft([a({type:Object})],dt.prototype,"cellRenderers",2);ft([a({type:Object})],dt.prototype,"headerRenderers",2);ft([a({type:Array})],dt.prototype,"rowActions",2);ft([a({type:Array})],dt.prototype,"paginationLabels",2);ft([a({type:Number})],dt.prototype,"pageSize",2);ft([a({type:Number})],dt.prototype,"currentPage",2);ft([a({type:Array})],dt.prototype,"sortableColumns",2);ft([a({type:Array})],dt.prototype,"columnOrder",2);ft([a({type:Function})],dt.prototype,"isRowDisabled",2);dt=ft([p("pont-data-table")],dt);var H=class extends Error{constructor(t,r,o,n){super(r);E(this,"code");E(this,"details");E(this,"status");this.name="LoginflowError",this.code=t,this.details=o,this.status=n}};function Ah(e){const t=(e??"").trim();if(!t)throw new H("CONFIG_ERROR","domain is required");if(t.startsWith("/")){if(typeof location>"u")throw new H("CONFIG_ERROR",`domain "${t}" is relative to the page origin, and there is no page here`);return Dc(new URL(t,location.origin))}const r=/^https?:\/\//i.test(t)?"":`${j$(U$(t))?"http":"https"}://`;try{return Dc(new URL(`${r}${t}`))}catch{throw new H("CONFIG_ERROR",`domain "${t}" is not a hostname, an origin, or a path`)}}function Dc(e){return`${e.origin}${e.pathname}`.replace(/\/+$/,"")}function U$(e){return e.split("/")[0]}function j$(e){return/^(localhost|127\.0\.0\.1|\[::1\])(:\d+)?$/i.test(e)}var ye,q$=(ye=class{constructor(){E(this,"data",new Map)}static get Instance(){return ye.instance||(ye.instance=new ye),ye.instance}get(t){return this.data.get(t)}set(t,r){this.data.set(t,r)}setConfig(t){this.data.set("config",t)}getConfig(){return this.data.get("config")}getApiBaseUrl(){return Ah(this.getConfig().domain)}apiIsSameOrigin(){if(typeof location>"u")return!1;try{return new URL(this.getApiBaseUrl()).host===location.host}catch{return!1}}remove(t){this.data.delete(t)}clear(){this.data.clear()}},E(ye,"instance"),ye),K=q$.Instance,_e,lo=(_e=class{constructor(){}static get Instance(){return _e.instance||(_e.instance=new _e),_e.instance}async request(t,r={}){const o=K.getConfig(),n=`${K.getApiBaseUrl()}${t}`,i=5e4,s=new AbortController,d=setTimeout(()=>s.abort(),i);try{const c=await fetch(n,{...r,signal:s.signal,headers:{"Content-Type":"application/json",...o.headers,...r.headers}});if(clearTimeout(d),!c.ok){const u=await c.json().catch(()=>({}));throw new H(u.code||u.error||"API_ERROR",u.message||u.error_description||`HTTP ${c.status}: ${c.statusText}`,u.details,c.status)}return await c.json()}catch(c){throw clearTimeout(d),c instanceof H?c:c instanceof Error?c.name==="AbortError"?new H("TIMEOUT","Request timeout"):new H("NETWORK_ERROR",c.message):new H("UNKNOWN_ERROR","An unknown error occurred")}}async post(t,r){return this.request(t,{credentials:"include",method:"POST",body:r?JSON.stringify(r):void 0})}async get(t){return this.request(t,{credentials:"include",method:"GET"})}async getOptional(t){const r=K.getConfig(),o=await fetch(`${K.getApiBaseUrl()}${t}`,{credentials:"include",method:"GET",headers:{...r.headers}});if(o.status===204)return null;if(!o.ok)throw new H("API_ERROR",`HTTP ${o.status}: ${o.statusText}`,void 0,o.status);return await o.json()}async postForm(t,r){return this.request(t,{credentials:"include",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(r).toString()})}},E(_e,"instance"),_e),Th="__Secure-pontive_session_state",ps="__Secure-pontive_session_probe";function z$(){return Dh(Th)?"present":V$()?"absent":"unknown"}function Oa(){if(!(typeof document>"u"||typeof location>"u"))for(const e of["",...K$(location.hostname)])Ra(Th,"",e,0)}function V$(){if(typeof document>"u"||typeof location>"u")return!1;const e=G$();try{Ra(ps,"1",e,60);const t=Dh(ps)==="1";return Ra(ps,"",e,0),t&&H$(e)}catch{return!1}}function H$(e){return e!==""||K.apiIsSameOrigin()}function G$(){let e;try{e=new URL(K.getApiBaseUrl()).hostname}catch{return""}const t=location.hostname;if(!e||!t||e.toLowerCase()===t.toLowerCase())return"";const r=t.split("."),o=e.split(".");let n=0;for(;n<r.length&&n<o.length&&r[r.length-1-n].toLowerCase()===o[o.length-1-n].toLowerCase();)n+=1;return n<2?"":o.slice(o.length-n).join(".")}function K$(e){const t=e.split("."),r=[];for(let o=1;o+2<=t.length;o+=1)r.push(t.slice(o).join("."));return r}function Ra(e,t,r,o){const n=W$()?"; Secure":"",i=r?`; Domain=${r}`:"";document.cookie=`${e}=${t}; Path=/; Max-Age=${o}; SameSite=Lax${i}${n}`}function W$(){return typeof globalThis.isSecureContext=="boolean"?globalThis.isSecureContext:location.protocol==="https:"}function Dh(e){if(typeof document>"u"||!document.cookie)return null;for(const t of document.cookie.split(";")){const r=t.indexOf("=");if(!(r<0)&&t.slice(0,r).trim()===e)return t.slice(r+1).trim()||null}return null}var Pt,St=(Pt=class{constructor(){E(this,"AUTH_SESSION_STORAGE_KEY","pontive_auth_session");E(this,"memorySession",null);E(this,"refreshTimeoutId",null);E(this,"refreshPromise",null);E(this,"refreshRetryCount",0);E(this,"refreshBlockedUntil",0);E(this,"sessionGeneration",0);E(this,"channel",null);E(this,"channelName","");E(this,"applyingBroadcast",!1);E(this,"restorePromise",null)}static get Instance(){return Pt.instance||(Pt.instance=new Pt),Pt.instance}setCurrentSession(t){this.sessionGeneration+=1,this.write(JSON.stringify(t)),this.publish({type:"session",session:t})}async withRefreshLock(t){const r=typeof navigator<"u"?navigator.locks:void 0;return r?r.request(this.channelKey("refresh"),t):t()}channelKey(t){const r=K.getConfig();return`pontive-${t}:${(r==null?void 0:r.domain)??""}:${(r==null?void 0:r.appId)??""}`}ensureChannel(){var r;if(typeof BroadcastChannel>"u")return null;const t=this.channelKey("session");return this.channel&&this.channelName===t?this.channel:((r=this.channel)==null||r.close(),this.channelName=t,this.channel=new BroadcastChannel(t),this.channel.onmessage=o=>this.receive(o.data),this.channel)}publish(t){var r;this.applyingBroadcast||(r=this.ensureChannel())==null||r.postMessage(t)}receive(t){this.applyingBroadcast=!0;try{if(t.type==="cleared"){this.clearSession();return}this.setCurrentSession(t.session),this.scheduleTokenRefresh()}finally{this.applyingBroadcast=!1}}isCurrentGeneration(t){return this.sessionGeneration===t}getCurrentSession(){const t=this.getStoredSession();return t?this.isSessionExpired(t)?(this.clearSession(),null):(this.shouldRefreshToken(t)&&this.triggerBackgroundRefresh(t),t):null}peekSession(){return this.getStoredSession()}isAuthenticated(){return this.getCurrentSession()!==null}getAuthenticatedUser(){const t=this.getCurrentSession();if(!t)return null;const r=t.id_token?this.decodeJWT(t.id_token):null;return r||(t.user??null)}cleanup(){var t;this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshPromise=null,(t=this.channel)==null||t.close(),this.channel=null,this.channelName=""}clearSession(){this.sessionGeneration+=1,this.memorySession=null,localStorage.removeItem(this.AUTH_SESSION_STORAGE_KEY),this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshRetryCount=0,this.refreshBlockedUntil=0,this.publish({type:"cleared"})}isSessionExpired(t){return!t||!t.expires_at?!0:Date.now()>=t.expires_at}cleanExpiredSession(){const t=this.getStoredSession();t&&this.isSessionExpired(t)&&this.clearSession()}getStoredSession(){const t=this.read();if(!t)return null;try{return JSON.parse(t)}catch{return this.clearSession(),null}}write(t){this.memorySession=t,localStorage.removeItem(this.AUTH_SESSION_STORAGE_KEY)}read(){return this.memorySession}decodeJWT(t){try{const o=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=decodeURIComponent(atob(o).split("").map(i=>"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)).join(""));return JSON.parse(n)}catch{return null}}shouldRefreshToken(t){if(!t||!t.expires_at)return!1;const r=Date.now(),o=t.expires_at,n=t.expires_in||3600,i=r+n*1e3*.2;return o<=i}scheduleTokenRefresh(){this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null);const t=this.getCurrentSession();if(!t||!t.expires_at)return;const r=Date.now(),o=t.expires_at,n=t.expires_in||3600,i=o-r-n*1e3*.2;i>0&&(this.refreshTimeoutId=setTimeout(()=>{this.triggerBackgroundRefresh(t)},i))}triggerBackgroundRefresh(t){this.refreshPromise||Date.now()<this.refreshBlockedUntil||(this.refreshPromise=this.withRefreshLock(()=>{const r=this.getStoredSession();return r&&!this.shouldRefreshToken(r)?(this.scheduleTokenRefresh(),Promise.resolve(null)):this.refreshTokens(r??t)}).then(r=>(r&&(this.setCurrentSession(r),this.refreshRetryCount=0,this.refreshBlockedUntil=0,this.scheduleTokenRefresh()),r)).catch(r=>(console.error("Background token refresh failed:",r),null)).finally(()=>{this.refreshPromise=null}))}async switchOrganization(t){if(!t)throw new H("INVALID_REQUEST","organizationId is required");return this.withRefreshLock(async()=>{const r=this.sessionGeneration,o=this.getCurrentSession(),n=await this.requestTokens(o,{organization_id:t});if(!this.isCurrentGeneration(r))throw new H("SESSION_CHANGED","the session changed while switching organization");return this.setCurrentSession(n),this.scheduleTokenRefresh(),n})}getOrganization(){const t=this.getCurrentSession(),r=t!=null&&t.access_token?this.decodeJWT(t.access_token):null,o=r==null?void 0:r.org_id;if(typeof o!="string"||o==="")return null;const n=i=>Array.isArray(i)?i.filter(s=>typeof s=="string"):[];return{id:o,roles:n(r==null?void 0:r.roles),permissions:n(r==null?void 0:r.permissions)}}async refreshTokens(t){const r=this.sessionGeneration;try{const o=await this.requestTokens(t);return this.isCurrentGeneration(r)?o:(console.warn("Token refresh returned after the session changed; discarding it"),null)}catch(o){return this.isCurrentGeneration(r)?Y$(o)?(console.error("Token refresh rejected, signing out:",Xn(o)),Oa(),this.clearSession(),null):(console.warn("Token refresh failed, keeping session and retrying:",Xn(o)),this.scheduleRefreshRetry(t),null):(console.warn("Token refresh failed after the session changed; ignoring:",Xn(o)),null)}}async fetchUserInfo(t){try{return await lo.Instance.request("/oauth2/userinfo",{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${t}`}})}catch(r){return console.debug("Could not read user info for the restored session:",Xn(r)),null}}async requestTokens(t,r={}){var i;const o={...r,grant_type:"refresh_token",client_id:(i=K.getConfig())==null?void 0:i.appId};t!=null&&t.refresh_token&&(o.refresh_token=t.refresh_token);const n=await lo.Instance.postForm("/oauth2/token",o);return{id_token:n.id_token??(t==null?void 0:t.id_token)??"",access_token:n.access_token,refresh_token:n.refresh_token??(t==null?void 0:t.refresh_token),expires_in:n.expires_in,expires_at:Date.now()+n.expires_in*1e3}}async readCurrentToken(){var r;const t=(r=K.getConfig())==null?void 0:r.appId;if(!t)return null;try{const o=await lo.Instance.getOptional(`/oauth2/session/token?client_id=${encodeURIComponent(t)}`);return!(o!=null&&o.access_token)||!(o.expires_in>0)?null:{id_token:"",access_token:o.access_token,expires_in:o.expires_in,expires_at:Date.now()+o.expires_in*1e3}}catch{return null}}async restoreSession(){const t=this.getStoredSession();return t&&!this.isSessionExpired(t)?t:z$()==="absent"?null:this.restorePromise?this.restorePromise:(this.restorePromise=this.withRefreshLock(async()=>{const r=this.getStoredSession();if(r&&!this.isSessionExpired(r))return r;try{const o=await this.readCurrentToken()??await this.requestTokens(null);return o.id_token||(o.user=await this.fetchUserInfo(o.access_token)??void 0),this.setCurrentSession(o),this.scheduleTokenRefresh(),o}catch(o){return Z$(o)&&Oa(),console.debug("No session to restore:",Xn(o)),null}}).finally(()=>{this.restorePromise=null}),this.restorePromise)}scheduleRefreshRetry(t){if(this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshRetryCount>=Pt.MAX_REFRESH_RETRIES){console.warn("Token refresh gave up after",this.refreshRetryCount,"attempts"),this.refreshRetryCount=0,this.refreshBlockedUntil=0;return}const r=Math.min(Pt.REFRESH_RETRY_BASE_MS*2**this.refreshRetryCount,Pt.MAX_REFRESH_RETRY_DELAY_MS);this.refreshRetryCount+=1,this.refreshBlockedUntil=Date.now()+r,this.refreshTimeoutId=setTimeout(()=>{this.refreshBlockedUntil=0,this.triggerBackgroundRefresh(t)},r)}},E(Pt,"MAX_REFRESH_RETRIES",5),E(Pt,"REFRESH_RETRY_BASE_MS",5e3),E(Pt,"MAX_REFRESH_RETRY_DELAY_MS",6e4),E(Pt,"instance"),Pt);function Y$(e){return!(e instanceof H)||e.status===void 0?!1:e.status===401?!0:e.status===400&&Q$.has(e.code)}var Q$=new Set(["invalid_grant","invalid_client"]);function Z$(e){return e instanceof H&&e.status!==void 0&&e.status>=400&&e.status<500}function Xn(e){return e instanceof H?`${e.code} (status ${e.status??"none"}): ${e.message}`:String(e)}var Lh=class{constructor(e=sessionStorage){E(this,"storage");E(this,"FLOW_STATE_KEY","pontive_loginflow_state");E(this,"FLOW_EXPIRY_MS",540*1e3);this.storage=e}getFlowState(){const e=this.storage.getItem(this.FLOW_STATE_KEY);if(!e)return null;try{const t=JSON.parse(e);return this.isExpired(t)?(this.clearFlowState(),null):t}catch{return this.clearFlowState(),null}}saveFlowState(e,t,r){const o=Date.now(),n=this.getFlowState(),i={flowType:e,flow_id:t,state:r.state,startedAt:(n==null?void 0:n.startedAt)||o,lastUpdatedAt:o,render_spec:r.render_spec};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(i))}restoreFromHistory(e){const t={flowType:e.flowType,flow_id:e.flow_id,state:e.state,startedAt:e.timestamp,lastUpdatedAt:e.timestamp,render_spec:void 0};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(t))}clearFlowState(){this.storage.removeItem(this.FLOW_STATE_KEY)}isExpired(e){return Date.now()-e.lastUpdatedAt>this.FLOW_EXPIRY_MS}get expiryMs(){return this.FLOW_EXPIRY_MS}},dr,Ii=(dr=class{static detect(t,r=window.location){if(dr.hasInviteToken(r))return"invitation";const o=r.pathname.toLowerCase();return t.invitationUrl&&o.includes(t.invitationUrl)?"invitation":o.includes(t.signinUrl)?"signin":o.includes(t.signupUrl)?"signup":"custom"}static hasInviteToken(t){try{return new URLSearchParams(t.search).has(dr.INVITE_TOKEN_PARAM)}catch{return!1}}},E(dr,"INVITE_TOKEN_PARAM","invite_token"),dr),Fh=class{constructor(){E(this,"listeners",new Map)}on(e,t){this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t)}off(e,t){var r;(r=this.listeners.get(e))==null||r.delete(t)}emit(e,t){const r=this.listeners.get(e);r&&r.forEach(o=>{try{o(t)}catch(n){console.error(`[FlowEventBus] Error in event handler for ${e}:`,n)}})}clear(){this.listeners.clear()}clearEvent(e){this.listeners.delete(e)}},J$=class{getNavigationType(){const e=performance.getEntriesByType("navigation");if(e.length>0)return e[0].type;const t=performance.navigation;if(t)switch(t.type){case 1:return"reload";case 2:return"back_forward";default:return"navigate"}return"navigate"}},qt,X$=(qt=class{constructor(t,r,o=window.location,n,i){E(this,"httpClient",lo.Instance);E(this,"flowId");E(this,"redirectTimeoutId",null);E(this,"flowStateManager");E(this,"flowEventBus");E(this,"location");E(this,"navigationTypeDetector");E(this,"eventHandlers",new Map([["switch_to_signin",this.handleSwitchToSignin.bind(this)],["switch_to_signup",this.handleSwitchToSignup.bind(this)],["continue_here",this.handleContinueHere.bind(this)]]));E(this,"linkWatchTimer",null);E(this,"linkWatchGeneration",0);E(this,"waitingForLink",!1);const s=K.getConfig();if(!s.domain)throw new H("CONFIG_ERROR","Domain is required");if(!s.appId)throw new H("CONFIG_ERROR","App ID is required");this.flowId=t,this.location=o,this.flowStateManager=n||new Lh,this.flowEventBus=r||new Fh,this.navigationTypeDetector=i||new J$,St.Instance.cleanExpiredSession(),St.Instance.scheduleTokenRefresh()}static async init(t,r,o,n,i){const s=new qt(t,r,o,n,i),d=await s.initializeFlowInternal();return{sdk:s,flowType:d.flowType,isResumed:d.isResumed,state:d.state,render_spec:d.render_spec,auth_result:d.auth_result}}async startFlow(t,r){if(!r.app_id)throw new H("VALIDATION_ERROR","Client ID is required");const o=`/auth/v1/authflows/${t}/start`;return this.executeFlowRequest(()=>this.httpClient.post(o,r),"START_FLOW_ERROR","Failed to start flow")}async resumeFlow(t,r){const o=r?`?continue=${encodeURIComponent(r)}`:"",n=`/auth/v1/authflows/${t}/resume${o}`;return this.executeFlowRequest(()=>this.httpClient.post(n),"RESUME_FLOW_ERROR","Failed to resume flow")}async processEvent(t,r){if(!t.event)throw new H("VALIDATION_ERROR","Event type is required");const o=this.eventHandlers.get(t.event);return o?await o():await this.processServerEvent(t,r)}async executeFlowRequest(t,r,o,n){try{const i=await t();return n&&await n(i),this.processAuthResult(i.auth_result),i.redirection&&this.redirect(i.redirection),i}catch(i){throw i instanceof H?i:new H(r,o,i instanceof Error?{originalError:i.message,stack:i.stack}:i)}}async processServerEvent(t,r){let o=this.flowStateManager.getFlowState();if(!o&&(console.warn("Flow state expired, restarting flow before processing event"),await this.initializeFlowInternal(),o=this.flowStateManager.getFlowState(),!o))throw new H("FLOW_RESTART_ERROR","Failed to restart flow - no flow state after initialization");const n=o.state,i=`/auth/v1/authflows/${o.flowType}/events`,s=this.waitingForLink;this.stopWatchingForLink();let d;try{d=await this.executeFlowRequest(()=>this.httpClient.post(i,t),"PROCESS_EVENT_ERROR","Failed to process event",r)}catch(c){if(s&&qt.flowIsGone(c))return this.announceContinuedElsewhere(o.flowType,""),{state:""};throw c}if(this.watchForLink(o.flowType,d),!d.auth_result){this.flowStateManager.saveFlowState(o.flowType,o.flow_id,d);const c=this.flowStateManager.getFlowState();if(c){const u=n!==d.state;this.flowEventBus.emit("flow:updated",{flowState:c,isNewStep:u})}}return d}processAuthResult(t){if(t){const r={id_token:t.id_token,access_token:t.access_token,refresh_token:t.refresh_token,expires_in:t.expires_in,expires_at:Date.now()+t.expires_in*1e3};St.Instance.setCurrentSession(r),St.Instance.scheduleTokenRefresh(),this.flowStateManager.clearFlowState();const{onAuthenticated:o}=K.getConfig();if(o){o(r);return}console.warn("pontive: signed in, but no onAuthenticated was supplied, so the SDK cannot route the user. Supply onAuthenticated to handle the handoff.")}}async initializeFlowInternal(){const t=K.getConfig(),r=Ii.detect(t,this.location);this.validateFlowType(r);const o=this.flowStateManager.getFlowState();return this.shouldResumeFlow(o,r)?await this.resumeExistingFlow(o,r):await this.startNewFlow(r)}validateFlowType(t){if(t==="custom"&&!this.flowId)throw new H("FLOW_ID_ERROR","Flow ID is required for custom flows")}shouldResumeFlow(t,r){const n=new URLSearchParams(this.location.search).get("resume")==="true";if(!t)return n;const i=this.navigationTypeDetector.getNavigationType();if(i==="navigate"&&!n)return this.flowStateManager.clearFlowState(),console.log(`Fresh navigation detected (type: ${i}), starting new flow`),!1;if(t.flowType!==r)return this.flowStateManager.clearFlowState(),console.log(`Flow type changed from ${t.flowType} to ${r}, starting new flow, flow_id: ${this.flowId}`),!1;if(r==="custom"&&t.flow_id!==this.flowId)return this.flowStateManager.clearFlowState(),console.log(`Custom flow ID changed, starting new flow, flow_id: ${this.flowId}`),!1;const s=n?"explicit resume=true":`navigation type: ${i}`;return console.log(`Resuming existing flow (${s})`),!0}async resumeExistingFlow(t,r){try{const o=await this.resumeFlow(r,this.continueParam());if(this.watchForLink(r,o),!o.auth_result){this.flowStateManager.saveFlowState(r,(t==null?void 0:t.flow_id)??this.determineFlowId(r),o);const n=this.flowStateManager.getFlowState();n&&this.flowEventBus.emit("flow:resumed",{flowState:n})}return{flowType:r,isResumed:!0,state:o.state,render_spec:o.render_spec,auth_result:o.auth_result}}catch(o){return this.flowStateManager.clearFlowState(),console.warn("Failed to resume flow, starting fresh:",o),await this.startNewFlow(r)}}async startNewFlow(t){const r=K.getConfig(),o=new URLSearchParams(this.location.search),n={};o.forEach((c,u)=>{n[u]=c}),r.organizationId&&!n.organization_id&&(n.organization_id=r.organizationId),console.log("metadata",n);const i=o.get("locales")||r.locales||void 0,s={app_id:r.appId,origin_url:this.location.href,signin_url:r.signinUrl,signup_url:r.signupUrl,locales:i,flow_id:this.determineFlowId(t),metadata:n},d=await this.startFlow(t,s);if(this.watchForLink(t,d),!d.auth_result){this.flowStateManager.saveFlowState(t,s.flow_id,d);const c=this.flowStateManager.getFlowState();c&&this.flowEventBus.emit("flow:started",{flowState:c})}return{flowType:t,isResumed:!1,state:d.state,render_spec:d.render_spec,auth_result:d.auth_result}}determineFlowId(t){switch(t){case"signin":return this.flowId||"signin-flow";case"signup":return this.flowId||"signup-flow";case"invitation":return this.flowId||"invitation-flow";case"custom":if(!this.flowId)throw new H("FLOW_ID_ERROR","Flow ID is required for custom flows");return this.flowId}}continueParam(){const t=new URLSearchParams(this.location.search);if(t.get("resume")==="true")return t.get("continue")??void 0}watchForLink(t,r){if(this.stopWatchingForLink(),this.waitingForLink=r.waiting_for_link===!0,!this.waitingForLink)return;const o=this.linkWatchGeneration,n=Date.now()+qt.LINK_POLL_LIMIT_MS,i=()=>{this.linkWatchTimer=setTimeout(s,qt.LINK_POLL_INTERVAL_MS)},s=async()=>{if(o!==this.linkWatchGeneration||Date.now()>n)return;if(typeof document<"u"&&document.hidden){i();return}let d;try{d=await this.httpClient.post(`/auth/v1/authflows/${t}/resume`)}catch(c){o===this.linkWatchGeneration&&qt.flowIsGone(c)&&this.announceContinuedElsewhere(t,"");return}if(o===this.linkWatchGeneration){if(d.waiting_for_link){i();return}this.announceContinuedElsewhere(t,d.state)}};i()}announceContinuedElsewhere(t,r){var o,n;this.stopWatchingForLink(),this.flowStateManager.clearFlowState(),(n=(o=K.getConfig()).onFlowStateChange)==null||n.call(o,{eventType:"flow_continued_elsewhere",flowType:t,state:r})}static flowIsGone(t){return t instanceof H&&t.status===401}stopWatchingForLink(){this.waitingForLink=!1,this.linkWatchGeneration++,this.linkWatchTimer!==null&&(clearTimeout(this.linkWatchTimer),this.linkWatchTimer=null)}async handleContinueHere(){const{continueHereUrl:t}=K.getConfig();this.flowStateManager.clearFlowState();let r=t;if(!r){const o=new URL(this.location.href);o.searchParams.delete("resume"),o.searchParams.delete("continue"),r=o.toString()}return this.redirect({url:r,redirect_delay:0}),{state:"End"}}async handleSwitchToSignin(){const t=K.getConfig();return this.redirect({url:this.withCurrentQuery(t.signinUrl),redirect_delay:0}),{state:"End"}}async handleSwitchToSignup(){const t=K.getConfig();return this.redirect({url:this.withCurrentQuery(t.signupUrl),redirect_delay:0}),{state:"End"}}withCurrentQuery(t){const r=this.location.search;return!r||r==="?"?t:t.includes("?")?`${t}&${r.slice(1)}`:`${t}${r}`}redirect(t){t.url&&(this.redirectTimeoutId!==null&&(console.log("Clearing existing redirect timeout before scheduling new redirect to:",t.url),clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.redirectTimeoutId=setTimeout(()=>{this.location.href=t.url},t.redirect_delay*1e3))}reloadPage(){setTimeout(()=>{this.location.reload()},0)}getEventBus(){return this.flowEventBus}cleanup(){this.stopWatchingForLink(),this.redirectTimeoutId&&(clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.flowEventBus.clear()}},E(qt,"LINK_POLL_INTERVAL_MS",3e3),E(qt,"LINK_POLL_LIMIT_MS",900*1e3),qt),tP=class{constructor(e){E(this,"delayMs");E(this,"timerId",null);this.delayMs=e}debounce(e){this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(()=>{e(),this.timerId=null},this.delayMs)}cancel(){this.timerId&&(clearTimeout(this.timerId),this.timerId=null)}isPending(){return this.timerId!==null}},eP=class{pushState(e,t,r){history.pushState(e,t,r)}replaceState(e,t,r){history.replaceState(e,t,r)}get state(){return history.state}},rP=class{constructor(e,t,r=!1,o=window.location,n,i){E(this,"popstateListener",null);E(this,"pageshowListener",null);E(this,"debouncer");E(this,"isProcessing",!1);E(this,"isHandlingNavigationEvent",!1);E(this,"onFlowRestartNeeded",null);E(this,"skipHistoryTracking");E(this,"flowStateManager");E(this,"historyAdapter");E(this,"location");this.onFlowRestartNeeded=t,this.skipHistoryTracking=r,this.debouncer=new tP(200),this.location=o,this.flowStateManager=n||new Lh,this.historyAdapter=i||new eP,this.subscribeToFlowEvents(e),this.initializeListener()}subscribeToFlowEvents(e){e.on("flow:started",this.handleFlowStart.bind(this)),e.on("flow:updated",this.handleFlowUpdate.bind(this)),e.on("flow:resumed",this.handleFlowResume.bind(this))}initializeListener(){this.popstateListener=e=>{console.log("[NavigationManager] popstate event received"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Debounce timeout fired, handling popstate"),this.handlePopState(e)})},this.pageshowListener=e=>{e.persisted&&(console.log("[NavigationManager] Page restored from bfcache"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Handling bfcache restoration"),this.handleBfcacheRestoration()}))},window.addEventListener("popstate",this.popstateListener),window.addEventListener("pageshow",this.pageshowListener)}async handlePopState(e){if(this.isProcessing){console.log("[NavigationManager] Already processing popstate, skipping");return}console.log("[NavigationManager] Starting popstate processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const t=e.state,r=this.flowStateManager.getFlowState(),o=K.getConfig(),n=Ii.detect(o,this.location);if(t&&this.restoreHistoryStateToSession(t),this.shouldRestartFlow(t,r,n)){await this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from history")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}}async handleBfcacheRestoration(){if(this.isProcessing){console.log("[NavigationManager] Already processing bfcache restoration, skipping");return}console.log("[NavigationManager] Starting bfcache restoration processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const e=this.historyAdapter.state,t=this.flowStateManager.getFlowState(),r=K.getConfig(),o=Ii.detect(r,this.location);if(e&&this.restoreHistoryStateToSession(e),this.shouldRestartFlow(e,t,o)){await this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from bfcache")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}}restoreHistoryStateToSession(e){console.log("[NavigationManager] Restoring history state to session storage:",e),this.flowStateManager.restoreFromHistory(e)}shouldRestartFlow(e,t,r){return e&&e.flowType!==r?(console.log("[NavigationManager] Flow type changed via navigation:",e.flowType,"→",r),this.flowStateManager.clearFlowState(),!0):e?Date.now()-e.timestamp>this.flowStateManager.expiryMs?(console.log("[NavigationManager] History state expired, clearing and restarting flow"),this.flowStateManager.clearFlowState(),!0):(console.log("[NavigationManager] Valid history state restored, triggering restart to resume flow"),!0):(console.log("[NavigationManager] No history state, skipping"),!1)}async triggerFlowRestart(){this.onFlowRestartNeeded&&await this.onFlowRestartNeeded()}createHistoryState(e){return{flowType:e.flowType,flow_id:e.flow_id,state:e.state,timestamp:Date.now()}}updateBrowserHistory(e,t){if(this.skipHistoryTracking){console.log("[NavigationManager] Skipping history tracking (created from navigation)");return}const r=this.createHistoryState(e);try{t==="push"?(this.historyAdapter.pushState(r,"",this.location.href),console.log("[NavigationManager] Pushed state to history")):(this.historyAdapter.replaceState(r,"",this.location.href),console.log("[NavigationManager] Replaced state in history"))}catch(o){console.error("[NavigationManager] Failed to update history:",o)}}handleFlowStart(e){this.updateBrowserHistory(e.flowState,"replace")}handleFlowUpdate(e){const t=this.isHandlingNavigationEvent||!e.isNewStep?"replace":"push";this.updateBrowserHistory(e.flowState,t)}handleFlowResume(e){this.updateBrowserHistory(e.flowState,"replace")}destroy(){this.debouncer.cancel(),this.popstateListener&&(window.removeEventListener("popstate",this.popstateListener),this.popstateListener=null),this.pageshowListener&&(window.removeEventListener("pageshow",this.pageshowListener),this.pageshowListener=null),this.onFlowRestartNeeded=null}},Rr=new AbortController,nP=class{constructor(){E(this,"httpClient",lo.Instance);E(this,"capabilities",{webauthn:!1});E(this,"capabilitiesDetected",!1)}async detectCapabilities(){if(!this.capabilitiesDetected)try{if(typeof window.PublicKeyCredential=="function"?this.capabilities.webauthn=!0:this.capabilities.webauthn=!1,typeof PublicKeyCredential.getClientCapabilities=="function"){const e=await PublicKeyCredential.getClientCapabilities();this.capabilities={...this.capabilities,...e};return}typeof PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable=="function"&&(this.capabilities.userVerifyingPlatformAuthenticator=await PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()),(PublicKeyCredential==null?void 0:PublicKeyCredential.isConditionalMediationAvailable)!==void 0&&typeof PublicKeyCredential.isConditionalMediationAvailable=="function"?this.capabilities.conditionalGet=await PublicKeyCredential.isConditionalMediationAvailable():this.capabilities.conditionalGet=!1}finally{this.capabilitiesDetected=!0}}async fetchPublicKeyCredentialRequestOptions(e,t){try{return this.httpClient.post("/auth/v1/webauthn/login/options",{conditional:t,flow_type:e})}catch(r){return console.error("error",r),null}}async fetchPublicKeyCredentialCreationOptions(e,t){try{return this.httpClient.post("/auth/v1/webauthn/register/options",{conditional:t,flow_type:e})}catch(r){return console.error("error",r),null}}async startRegistration(e,t){if(await this.detectCapabilities(),!e)return console.error("No PublicKeyCredentialCreationOptionsJSON provided"),null;Rr.abort(),Rr=new AbortController;const r=this.toPublicKeyCredentialCreationOptions(e),o={signal:Rr.signal,publicKey:r};if(t){if(!this.isConditionalCreateAvailable())return console.error("Conditional create mediation not supported in this browser"),null;o.mediation="conditional"}try{const n=await navigator.credentials.create(o);if(!n){console.error("no credential returned by authenticator");return}const{id:i,rawId:s,response:d,type:c}=n;let u;typeof d.getTransports=="function"&&(u=d.getTransports());let v;if(typeof d.getPublicKeyAlgorithm=="function")try{v=d.getPublicKeyAlgorithm()}catch(_){hs("getPublicKeyAlgorithm()",_)}let b;if(typeof d.getPublicKey=="function")try{const _=d.getPublicKey();_!==null&&(b=this.bufferToBase64URLString(_))}catch(_){hs("getPublicKey()",_)}let w;if(typeof d.getAuthenticatorData=="function")try{w=this.bufferToBase64URLString(d.getAuthenticatorData())}catch(_){hs("getAuthenticatorData()",_)}return{id:i,rawId:this.bufferToBase64URLString(s),response:{attestationObject:this.bufferToBase64URLString(d.attestationObject),clientDataJSON:this.bufferToBase64URLString(d.clientDataJSON),transports:u,publicKeyAlgorithm:v,publicKey:b,authenticatorData:w},type:c,clientExtensionResults:n.getClientExtensionResults(),authenticatorAttachment:this.toAuthenticatorAttachment(n.authenticatorAttachment)}}catch(n){const i=this.identifyAuthenticationError({error:n,options:o});return i instanceof Ir?console.error(`WebAuthn authentication failed with code: ${i.code}, message: ${i.message}`):console.error("WebAuthn authentication failed with error:",n),null}}async startAuthentication(e,t){if(await this.detectCapabilities(),!e)return console.error("No PublicKeyCredentialRequestOptionsJSON provided"),null;if(!this.isWebAuthnAvailable())return console.error("WebAuthn not supported in this browser"),null;Rr.abort(),Rr=new AbortController;const r=this.toPublicKeyCredentialRequestOptions(e),o={signal:Rr.signal,publicKey:r};if(t){if(!this.isConditionalGetAvailable())return console.error("Conditional mediation not supported in this browser"),null;o.mediation="conditional",o.publicKey&&(o.publicKey.allowCredentials=[])}try{const n=await navigator.credentials.get(o);return this.toPublicKeyCredentialJSON(n)}catch(n){const i=this.identifyAuthenticationError({error:n,options:o});return i instanceof Ir?console.error(`WebAuthn authentication failed with code: ${i.code}, message: ${i.message}`):console.error("WebAuthn authentication failed with error:",n),null}}async signalUnknownCredential(e,t){if(await this.detectCapabilities(),this.isSignalUnknownCredentialAvailable())try{await PublicKeyCredential.signalUnknownCredential({rpId:e,credentialId:t})}catch(r){console.error("Failed to signal unknown credential:",r)}else console.warn("signalUnknownCredential not supported in this browser")}async signalCurrentUserDetails(e){if(await this.detectCapabilities(),this.isSignalCurrentUserDetailsAvailable())try{await PublicKeyCredential.signalCurrentUserDetails(e)}catch(t){console.error("Failed to signal current user details:",t)}else console.warn("signalCurrentUserDetails not supported. Ask user to update manually.")}toPublicKeyCredentialDescriptor(e){const{id:t}=e;return{...e,id:this.base64URLStringToBuffer(t),type:e.type,transports:e.transports}}toAuthenticatorAttachment(e){const t=["cross-platform","platform"];if(e&&!(t.indexOf(e)<0))return e}bufferToBase64URLString(e){const t=new Uint8Array(e);let r="";for(const n of t)r+=String.fromCharCode(n);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}base64URLStringToBuffer(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-t.length%4)%4,o=t.padEnd(t.length+r,"="),n=atob(o),i=new ArrayBuffer(n.length),s=new Uint8Array(i);for(let d=0;d<n.length;d++)s[d]=n.charCodeAt(d);return i}toPublicKeyCredentialJSON(e){if(typeof e.toJSON=="function")return e.toJSON();const t=e.response;return{id:e.id,type:e.type,rawId:this.bufferToBase64URLString(e.rawId),authenticatorAttachment:this.toAuthenticatorAttachment(e.authenticatorAttachment),clientExtensionResults:e==null?void 0:e.getClientExtensionResults(),response:{clientDataJSON:this.bufferToBase64URLString(t.clientDataJSON),authenticatorData:this.bufferToBase64URLString(t.authenticatorData),signature:this.bufferToBase64URLString(t.signature),userHandle:t.userHandle?this.bufferToBase64URLString(t.userHandle):void 0}}}toPublicKeyCredentialCreationOptions(e){var r;if(typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const t={challenge:this.base64URLStringToBuffer(e.challenge),rp:{id:e.rp.id,name:e.rp.name},user:{displayName:e.user.displayName,id:this.base64URLStringToBuffer(e.user.id),name:e.user.name},pubKeyCredParams:e.pubKeyCredParams.map(o=>({alg:o.alg,type:o.type})),timeout:e.timeout};if(e.attestation&&(t.attestation=e.attestation),e.extensions!==void 0&&(t.extensions=e.extensions),e.authenticatorSelection){const o={};e.authenticatorSelection.authenticatorAttachment&&(o.authenticatorAttachment=e.authenticatorSelection.authenticatorAttachment),e.authenticatorSelection.requireResidentKey&&(o.requireResidentKey=e.authenticatorSelection.requireResidentKey),e.authenticatorSelection.residentKey&&(o.residentKey=e.authenticatorSelection.residentKey),e.authenticatorSelection.userVerification&&(o.userVerification=e.authenticatorSelection.userVerification),t.authenticatorSelection=o}return(r=e.excludeCredentials)!=null&&r.length&&(t.excludeCredentials=e.excludeCredentials.map(o=>this.toPublicKeyCredentialDescriptor(o))),t}toPublicKeyCredentialRequestOptions(e){var r;if(typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const t={challenge:this.base64URLStringToBuffer(e.challenge)};return e.rpId!==void 0&&(t.rpId=e.rpId),e.timeout!==void 0&&(t.timeout=e.timeout),e.userVerification!==void 0&&(t.userVerification=e.userVerification),e.extensions!==void 0&&(t.extensions=e.extensions),(r=e.allowCredentials)!=null&&r.length&&(t.allowCredentials=e.allowCredentials.map(o=>this.toPublicKeyCredentialDescriptor(o))),t}identifyAuthenticationError({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Ir({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Ir({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(oP(o)){if(r.rpId!==o)return new Ir({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Ir({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Ir({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return e}isPublicKeyCredentialRequestOptionsJSON(e){return typeof e=="object"&&e!==null&&"challenge"in e}isWebAuthnAvailable(){return this.capabilities.webauthn}isSignalAllAcceptedCredentialsAvailable(){return!!this.capabilities.signalAllAcceptedCredentials}isSignalCurrentUserDetailsAvailable(){return!!this.capabilities.signalCurrentUserDetails}isSignalUnknownCredentialAvailable(){return!!this.capabilities.signalUnknownCredential}isConditionalGetAvailable(){return!!this.capabilities.conditionalGet}isConditionalCreateAvailable(){return!!this.capabilities.conditionalCreate}isHybridTransportAvailable(){return!!this.capabilities.hybridTransport}destroy(){Rr.abort()}};function hs(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
2649
+ `,t)}var Ir=class extends Error{constructor({message:t,code:r,cause:o,name:n}){super(t);E(this,"code");this.name=n??o.name,this.code=r}};function oP(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}var we,iP=(we=class{constructor(){E(this,"configured",!1);E(this,"configuredResolve");E(this,"configuredPromise",new Promise(t=>{this.configuredResolve=t}));E(this,"loginflow",null);E(this,"navigationManager",null);E(this,"flowEventBus",null);E(this,"webauthnService",null)}static get Instance(){return we.instance||(we.instance=new we),we.instance}ensureConfigured(){if(!this.configured)throw new H("NOT_CONFIGURED","Auth.configure() must be called before using Auth methods")}ensureLoginflowInitialized(){if(!this.loginflow)throw new H("LOGINFLOW_NOT_INITIALIZED","Call Auth.startLoginflow() first")}async startLoginflowInternal(t,r=!1){this.ensureConfigured(),this.webauthnService&&(console.log("[AuthService] Cleaning up and aborting ongoing webauthn flows"),this.webauthnService.destroy(),this.webauthnService=null),this.loginflow&&(console.log("[AuthService] Cleaning up old loginflow instance"),this.loginflow.cleanup(),this.loginflow=null),this.navigationManager&&(console.log("[AuthService] Cleaning up old navigation manager instance"),this.navigationManager.destroy(),this.navigationManager=null),this.webauthnService=new nP,this.webauthnService.detectCapabilities(),this.flowEventBus=new Fh,this.navigationManager=new rP(this.flowEventBus,async()=>{console.log("[AuthService] Navigation restart triggered, restarting loginflow"),await this.startLoginflowInternal(void 0,!1)},r);const o=await X$.init(t,this.flowEventBus),n=K.getConfig();this.startPasskeyAuthentication(o.flowType,!0),this.loginflow=o.sdk;const i={flowType:o.flowType,isResumed:o.isResumed,state:o.state,render_spec:o.render_spec,auth_result:o.auth_result};return n.onFlowStateChange&&n.onFlowStateChange({eventType:o.isResumed?"flow_resumed":"flow_started",flowType:o.flowType,state:o.state,render_spec:o.render_spec,auth_result:o.auth_result,isResumed:o.isResumed}),i}configure(t){if(!t.domain||!t.appId)throw new H("CONFIG_ERROR","domain and appId are required");K.setConfig(t),this.configured=!0,this.configuredResolve()}whenConfigured(){return this.configuredPromise}isAuthenticated(){return this.ensureConfigured(),St.Instance.isAuthenticated()}getCurrentSession(){return this.ensureConfigured(),St.Instance.getCurrentSession()}async restoreSession(){return this.ensureConfigured(),St.Instance.restoreSession()}getAuthenticatedUser(){return this.ensureConfigured(),St.Instance.getAuthenticatedUser()}getOrganization(){return this.ensureConfigured(),St.Instance.getOrganization()}async switchOrganization(t){return this.ensureConfigured(),St.Instance.switchOrganization(t)}async startLoginflow(t){return this.startLoginflowInternal(t,!1)}async processLoginflowEvent(t){var i,s;this.ensureConfigured(),this.ensureLoginflowInitialized();const r=K.getConfig(),o=Ii.detect(r,location);if(t.event==="signin_with_passkey"&&!((i=t.data)!=null&&i.credential_request)){const d=await this.getPasskeyCredential(o,!1);if(!d||!d.cred)return console.error("no credential returned by browser"),{state:""};t.data={credential_request:d.cred}}if(t.event==="register_passkey"&&!((s=t.data)!=null&&s.conditional)){console.log("attempt to register a passkey");const d=await this.createPasskeyCredential(o,!1);if(!d)return console.error("no credential created by browser"),{state:""};t.data={credential_creation_response:d,conditional:!1}}const n=await this.loginflow.processEvent(t,async d=>{var c;if((c=d.data)!=null&&c.conditional_create_enabled){console.log("attempt to register a passkey conditionally");const u=await this.registerPasskey(o,!0);u&&(u.render_spec=void 0,d.render_spec=void 0)}});if(console.log("render spec",n.render_spec),r.onFlowStateChange){const d=sessionStorage.getItem("pontive_loginflow_state");let c="custom";if(d)try{c=JSON.parse(d).flowType}catch(u){console.error("Failed to parse flow state:",u)}r.onFlowStateChange({eventType:"flow_updated",flowType:c,state:n.state,render_spec:n.render_spec,auth_result:n.auth_result})}return n}async getPasskeyCredential(t,r){var n,i;const o=await((n=this.webauthnService)==null?void 0:n.fetchPublicKeyCredentialRequestOptions(t,r));if(!o)return console.error("failed to fetch public key request options"),null;try{return{cred:await((i=this.webauthnService)==null?void 0:i.startAuthentication(o,r)),options:o}}catch(s){return console.error("error starting authentication",s),null}}async startPasskeyAuthentication(t,r=!1){var s,d;const o=await this.getPasskeyCredential(t,r);if(!o||!o.cred){console.error("no credential found");return}const{cred:n,options:i}=o;try{((s=(await this.processLoginflowEvent({event:"signin_with_passkey",data:{credential_request:n}})).data)==null?void 0:s.error)==="CredentialNotFound"&&(i.rpId&&n.id?(d=this.webauthnService)==null||d.signalUnknownCredential(i.rpId,n.id):console.log("missing rpId or credential id for signalUnknownCredential"))}catch(c){console.error("failed to signin with passkey",c)}}async createPasskeyCredential(t,r){var o,n;try{const i=await((o=this.webauthnService)==null?void 0:o.fetchPublicKeyCredentialCreationOptions(t,r));if(!i){console.warn("no credential creation option returned by webauthn service"),console.log("skipping conditional passkey registration...");return}return(n=this.webauthnService)==null?void 0:n.startRegistration(i,r)}catch(i){console.log("error",i)}}async registerPasskey(t,r=!1){try{const o=await this.createPasskeyCredential(t,r),n=await this.processLoginflowEvent({event:"register_passkey",data:{credential_creation_response:o,conditional:r}});return console.log("passkey creation res",n),n}catch(o){console.log("error",o)}}invalidateSession(){St.Instance.clearSession()}async signOut(t){var n;this.ensureConfigured();const r=sP(St.Instance.peekSession()),o=((n=K.getConfig())==null?void 0:n.appId)??"";if(Oa(),St.Instance.clearSession(),St.Instance.cleanup(),this.loginflow&&(this.loginflow.cleanup(),this.loginflow=null),this.navigationManager&&(this.navigationManager.destroy(),this.navigationManager=null),this.flowEventBus&&(this.flowEventBus.clear(),this.flowEventBus=null),!K.apiIsSameOrigin()){window.location.assign(this.logoutUrl(r,o,t==null?void 0:t.returnTo));return}await this.endServerSession(r,o),window.location.reload()}async endServerSession(t,r){try{await fetch(`${K.getApiBaseUrl()}/oauth2/logout`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:r,...t?{logout_hint:t}:{}}).toString()})}catch(o){console.warn("Could not end the session at the authorization server:",o)}}logoutUrl(t,r,o){const n=new URLSearchParams({post_logout_redirect_uri:o??`${window.location.origin}${window.location.pathname}`,client_id:r});return t&&n.set("logout_hint",t),`${K.getApiBaseUrl()}/oauth2/logout?${n.toString()}`}},E(we,"instance"),we);function sP(e){for(const t of[e==null?void 0:e.id_token,e==null?void 0:e.access_token]){if(!t)continue;const r=St.Instance.decodeJWT(t);if(typeof(r==null?void 0:r.sid)=="string"&&r.sid)return r.sid}}var G=iP.Instance,aP=Object.defineProperty,lP=(e,t,r,o)=>{for(var n=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(t,r,n)||n);return n&&aP(t,r,n),n};class Ut extends f{constructor(){super(),this.shadow=!1,this.__initialAttributesCache=null}parseJsonAttribute(t){try{const r=this.getAttribute(t);return r?JSON.parse(r):{}}catch{return{}}}get sbStyle(){return this.parseJsonAttribute("pont-style")}getAttributesToExclude(){return[]}getFilteredAttributes(){const t={};return Array.from(this.attributes).forEach(r=>{this.getAttributesToExclude().includes(r.name)||(t[r.name]=r.value??"")}),t}isCustomPropertySet(t){const r=getComputedStyle(this).getPropertyValue(t).trim();return r!=="inherit"&&r.length>0}applyCustomClass(t,r,o=""){var n,i;t.some(s=>this.isCustomPropertySet(s))&&((i=(n=this.shadowRoot)==null?void 0:n.querySelector(r))==null||i.classList.add(o))}moveAttributesToElement(t,r=["id","class"]){t&&r.forEach(o=>{const n=this.getAttribute(o);n!==null&&(t.setAttribute(o,n),this.removeAttribute(o))})}removeAttributesFromHost(t=["id","class"]){t.forEach(r=>{this.hasAttribute(r)&&this.removeAttribute(r)})}captureHostAttributes(){if(this.__initialAttributesCache)return this.__initialAttributesCache;const t={};return Array.from(this.attributes).forEach(r=>{t[r.name]=r.value}),this.__initialAttributesCache=t,t}getHostClass(){return this.captureHostAttributes().class??""}removeDuplicateContent(){var i;const t=document.createTreeWalker(this,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{var d;return s.nodeType===Node.COMMENT_NODE||s.nodeType===Node.TEXT_NODE&&!((d=s.textContent)!=null&&d.trim())?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),r=new Map,o=[];let n;for(;n=t.nextNode();){let s;if(n.nodeType===Node.TEXT_NODE){const d=(i=n.textContent)==null?void 0:i.trim();if(!d)continue;s=`text:${d}`}else if(n instanceof HTMLElement){const d=Array.from(n.attributes).map(c=>`${c.name}=${c.value}`).sort().join(":");s=`element:${n.tagName}:${d}`}else continue;if(r.has(s)){const d=r.get(s);d!=null&&d.parentNode&&o.push(d),r.set(s,n)}else r.set(s,n)}o.forEach(s=>{var d;return(d=s.parentNode)==null?void 0:d.removeChild(s)})}moveLightDomChildrenInto(t,r){let o;r!=null&&r.length?(o=r.filter(n=>this.contains(n)&&n!==t&&!n.contains(t)),o.forEach(n=>{const i=Array.from(t.childNodes).find(s=>{var d;return(d=s.isEqualNode)==null?void 0:d.call(s,n)});i&&t.removeChild(i)})):o=Array.from(this.childNodes).filter(n=>n!==t&&!t.contains(n)&&!n.contains(t)),o.forEach(n=>t.appendChild(n))}}lP([a({type:Boolean})],Ut.prototype,"shadow");const Pr="pont:auth",Lo={showWatermark:!0},Bi="pont:branding";class dP{constructor(t){this.consumer=new ui(t,{context:Bi,subscribe:!0})}get showWatermark(){var t;return((t=this.consumer.value)==null?void 0:t.showWatermark)??Lo.showWatermark}}const kh="pont:design-mode";class Fo{constructor(t){this.host=t,this.consumer=new ui(t,{context:kh,subscribe:!0})}get active(){return this.host.hasAttribute("design-mode")?this.host.getAttribute("design-mode")!=="false":this.consumer.value??!1}}const Nh="pont:env",Mh=Symbol("renderSpecContext"),ko="pont-user-context",Bh="";function zt(...e){return Ap(ja(e))}function cP(e){return Object.entries(e).filter(([t,r])=>typeof r!="object"&&r!=null).map(([t,r])=>`${t}: ${r};`).join(" ")}function pP(e){document.documentElement.setAttribute("data-theme",e)}function hP(){const e=document.documentElement.getAttribute("data-theme");(!e||e!=="light"&&e!=="dark")&&pP("light")}function uP(e,t){return e?e.includes("{{theme}}")?e.replace("{{theme}}",t):e:""}function Ia(){return new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))})}const Lc="abcdefghijklmnopqrstuvwxyz0123456789",mP=6;function gP(e){let t="";for(let r=0;r<mP;r++)t+=Lc.charAt(Math.floor(Math.random()*Lc.length));return t}const _t=()=>gP();function Ui(e){const t=document.createElement("pont-toast"),r=document.createElement("pont-toast-view-port");r.part="user-profile-toast",r.setAttribute("variant","destructive"),t.dataset.state="open";const o=document.createElement("div");o.className="pont-grid pont-gap-1";const n=document.createElement("pont-toast-title");n.textContent="Uh oh! Something went wrong.";const i=document.createElement("pont-toast-description");i.textContent=e,o.appendChild(n),o.appendChild(i),r.appendChild(o),t.appendChild(r),document.body.appendChild(t),setTimeout(()=>{t.dataset.state="open",r.dataset.state="open"},10),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t)},3.5*1e3)}async function fP(e,t=5e3){if(!e)return;let r;const o=new Promise(n=>{r=setTimeout(()=>n("timeout"),t)});try{await Promise.race([e.whenConfigured(),o])==="timeout"&&console.warn(`pontive: Auth.configure() has not been called after ${t}ms. Is this widget mounted inside <pont-provider>?`)}finally{clearTimeout(r)}}function vP(e){if(!(e!=null&&e.startsWith("data:image/svg+xml;base64,")))return null;try{const t=e.replace("data:image/svg+xml;base64,","");return atob(t)}catch(t){return console.error("Invalid base64 SVG:",t),null}}function bP(e){return/^https?:\/\//.test(e)||e!=null&&e.startsWith("data:image/svg+xml;base64,")?e:`data:image/svg+xml;base64,${e}`}function le(){var e;return(e=G.getCurrentSession())==null?void 0:e.access_token}function Aa(e,t=!1){if(!e&&e!==0)return"N/A";const r=typeof e=="string"?new Date(e):new Date(t?e:e*1e3);if(isNaN(r.getTime()))return"Invalid Date";const o=new Date,n=new Date(o.getFullYear(),o.getMonth(),o.getDate()),i=new Date(r.getFullYear(),r.getMonth(),r.getDate()),s=Math.floor((n.getTime()-i.getTime())/(1e3*60*60*24));return s===0?"Today":s===1?"Yesterday":s>1&&s<=6?r.toLocaleDateString("en-US",{weekday:"long"}):r.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function Ta(e,t=!1){if(!e&&e!==0)return"N/A";const r=typeof e=="string"?new Date(e):new Date(t?e:e*1e3);return isNaN(r.getTime())?"Invalid Time":r.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1})}function ji(e){if(!e)return"";const r=(e.includes("@")?e.split("@")[0]:e).split(/[\s._-]+/).filter(Boolean);return r.length===0?"":r.length===1?r[0].slice(0,2).toUpperCase():`${r[0][0]}${r[r.length-1][0]}`.toUpperCase()}function yP(e){return e instanceof Error&&"status"in e}function qi(e,t){var r,o;return yP(e)?((o=(r=e.data)==null?void 0:r.error)==null?void 0:o.message)??e.message??t:e instanceof Error&&e.message||t}const cn={variant:"secondary",size:"default",content:"label",iconAlign:"start",label:"Continue with Passkey"},pn={variant:"outline",size:"default",content:"icon-label",iconAlign:"start",prompt:"Continue with"},hn={variant:"default",size:"default",content:"label",iconAlign:"end",label:"Submit"},_P={apple:"Apple",discord:"Discord",facebook:"Facebook",github:"GitHub",google:"Google",linkedin:"LinkedIn",meta:"Meta",microsoft:"Microsoft",x:"X"},wP={apple:U`<path d="M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701" />`,discord:U`<path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z" />`,facebook:U`<path d="M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z" />`,github:U`<path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" />`,google:U`<path d="M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z" />`,linkedin:U`<path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" />`,meta:U`<path d="M6.915 4.03c-1.968 0-3.683 1.28-4.871 3.113C.704 9.208 0 11.883 0 14.449c0 .706.07 1.369.21 1.973a6.624 6.624 0 0 0 .265.86 5.297 5.297 0 0 0 .371.761c.696 1.159 1.818 1.927 3.593 1.927 1.497 0 2.633-.671 3.965-2.444.76-1.012 1.144-1.626 2.663-4.32l.756-1.339.186-.325c.061.1.121.196.183.3l2.152 3.595c.724 1.21 1.665 2.556 2.47 3.314 1.046.987 1.992 1.22 3.06 1.22 1.075 0 1.876-.355 2.455-.843a3.743 3.743 0 0 0 .81-.973c.542-.939.861-2.127.861-3.745 0-2.72-.681-5.357-2.084-7.45-1.282-1.912-2.957-2.93-4.716-2.93-1.047 0-2.088.467-3.053 1.308-.652.57-1.257 1.29-1.82 2.05-.69-.875-1.335-1.547-1.958-2.056-1.182-.966-2.315-1.303-3.454-1.303zm10.16 2.053c1.147 0 2.188.758 2.992 1.999 1.132 1.748 1.647 4.195 1.647 6.4 0 1.548-.368 2.9-1.839 2.9-.58 0-1.027-.23-1.664-1.004-.496-.601-1.343-1.878-2.832-4.358l-.617-1.028a44.908 44.908 0 0 0-1.255-1.98c.07-.109.141-.224.211-.327 1.12-1.667 2.118-2.602 3.358-2.602zm-10.201.553c1.265 0 2.058.791 2.675 1.446.307.327.737.871 1.234 1.579l-1.02 1.566c-.757 1.163-1.882 3.017-2.837 4.338-1.191 1.649-1.81 1.817-2.486 1.817-.524 0-1.038-.237-1.383-.794-.263-.426-.464-1.13-.464-2.046 0-2.221.63-4.535 1.66-6.088.454-.687.964-1.226 1.533-1.533a2.264 2.264 0 0 1 1.088-.285z" />`,microsoft:U`<path d="M11.4 24H0V12.6h11.4V24zM24 24H12.6V12.6H24V24zM11.4 11.4H0V0h11.4v11.4zM24 11.4H12.6V0H24v11.4z" />`,x:U`<path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.763l7.726-8.835L1.254 2.25H8.08l4.713 6.231 5.45-6.231zm-1.161 17.52h1.833L7.084 4.126H5.117L17.083 19.77z" />`};var $P=Object.defineProperty,PP=Object.getOwnPropertyDescriptor,Yt=(e,t,r,o)=>{for(var n=o>1?void 0:o?PP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&$P(t,r,n),n};exports.PontPasskeyButton=class extends f{constructor(){super(...arguments),this.seed=_t(),this.variant=cn.variant,this.size=cn.size,this.content=cn.content,this.iconAlign=cn.iconAlign,this._label=cn.label,this._loading=!1,this._handleClick=async()=>{if(!this.isDisabled){this._loading=!0,this.dispatchEvent(new CustomEvent(exports.PontPasskeyButton.CLICK_EVENT,{detail:{id:this.rootId,event:this.event},bubbles:!0,composed:!0}));try{if(this.event){const t=await G.processLoginflowEvent({event:this.event});this.dispatchEvent(new CustomEvent(exports.PontPasskeyButton.SUCCESS_EVENT,{detail:{id:this.rootId,event:this.event,result:t},bubbles:!0,composed:!0}))}}catch(t){const r=t instanceof Error?t.message:String(t);this.dispatchEvent(new CustomEvent(exports.PontPasskeyButton.ERROR_EVENT,{detail:{id:this.rootId,event:this.event,message:r,error:t},bubbles:!0,composed:!0}))}finally{this._loading=!1}}}}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:cn.label,this.requestUpdate("label",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontPasskeyButton.TAG}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.PontPasskeyButton.ICON}`}get isLoading(){return this.loading||this._loading}get isDisabled(){return this.disabled||this.isLoading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderIcon(){const t=this.content==="icon"?"":`pont-icon-align-${this.iconAlign}`;return this.isLoading?l`
2650
2650
  <pont-spinner
2651
2651
  id="${this.iconId}"
2652
2652
  part="${exports.PontPasskeyButton.PARTS.icon}"
@@ -2687,7 +2687,7 @@
2687
2687
  ${this.content.includes("label")?this.label:h}
2688
2688
  ${this.iconAlign==="end"?this._renderIcon():h}
2689
2689
  </pont-button>
2690
- `}};exports.PontPasskeyButton.ROOT="passkey-button";exports.PontPasskeyButton.ICON="icon";exports.PontPasskeyButton.TAG=`${rt}-${exports.PontPasskeyButton.ROOT}`;exports.PontPasskeyButton.CLICK_EVENT=`${exports.PontPasskeyButton.TAG}:click`;exports.PontPasskeyButton.SUCCESS_EVENT=`${exports.PontPasskeyButton.TAG}:success`;exports.PontPasskeyButton.ERROR_EVENT=`${exports.PontPasskeyButton.TAG}:error`;exports.PontPasskeyButton.PARTS={root:exports.PontPasskeyButton.ROOT,icon:`${exports.PontPasskeyButton.ROOT}-${exports.PontPasskeyButton.ICON}`};Yt([a({type:String})],exports.PontPasskeyButton.prototype,"seed",2);Yt([a({type:String,attribute:"custom-id"})],exports.PontPasskeyButton.prototype,"customId",2);Yt([a({type:String})],exports.PontPasskeyButton.prototype,"variant",2);Yt([a({type:String})],exports.PontPasskeyButton.prototype,"size",2);Yt([a({type:String})],exports.PontPasskeyButton.prototype,"content",2);Yt([a({type:String,attribute:"icon-align"})],exports.PontPasskeyButton.prototype,"iconAlign",2);Yt([a({type:String})],exports.PontPasskeyButton.prototype,"label",1);Yt([a({type:String})],exports.PontPasskeyButton.prototype,"event",2);Yt([a({type:Boolean})],exports.PontPasskeyButton.prototype,"disabled",2);Yt([a({type:Boolean})],exports.PontPasskeyButton.prototype,"loading",2);Yt([g()],exports.PontPasskeyButton.prototype,"_loading",2);exports.PontPasskeyButton=Yt([p("pont-passkey-button")],exports.PontPasskeyButton);var CP=Object.defineProperty,EP=Object.getOwnPropertyDescriptor,Lt=(e,t,r,o)=>{for(var n=o>1?void 0:o?EP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&CP(t,r,n),n};exports.PontProviderButton=class extends f{constructor(){super(...arguments),this.seed=_t(),this.design=new Fo(this),this.variant=pn.variant,this.size=pn.size,this.content=pn.content,this.iconAlign=pn.iconAlign,this._prompt=pn.prompt,this._loading=!1,this._handleClick=async()=>{if(!this.isDisabled){this._loading=!0,this.dispatchEvent(new CustomEvent(exports.PontProviderButton.CLICK_EVENT,{detail:{id:this.rootId,provider:this.provider,event:this.event},bubbles:!0,composed:!0}));try{if(this.event){const t=await K.processLoginflowEvent({event:this.event});this.dispatchEvent(new CustomEvent(exports.PontProviderButton.SUCCESS_EVENT,{detail:{id:this.rootId,provider:this.provider,event:this.event,result:t},bubbles:!0,composed:!0}))}}catch(t){const r=t instanceof Error?t.message:String(t);this.dispatchEvent(new CustomEvent(exports.PontProviderButton.ERROR_EVENT,{detail:{id:this.rootId,provider:this.provider,event:this.event,message:r,error:t},bubbles:!0,composed:!0}))}finally{this._loading=!1}}}}get _provider(){return!this.provider&&this.design.active?"google":this.provider}get prompt(){return this._prompt}set prompt(t){const r=this._prompt;this._prompt=t.length?t:pn.prompt,this.requestUpdate("prompt",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontProviderButton.TAG}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.PontProviderButton.ICON}`}get isLoading(){return this.loading||this._loading}get isDisabled(){return this.disabled||this.isLoading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderIcon(){const t=this.content==="icon"?"":`pont-icon-align-${this.iconAlign}`;return this.isLoading?l`
2690
+ `}};exports.PontPasskeyButton.ROOT="passkey-button";exports.PontPasskeyButton.ICON="icon";exports.PontPasskeyButton.TAG=`${rt}-${exports.PontPasskeyButton.ROOT}`;exports.PontPasskeyButton.CLICK_EVENT=`${exports.PontPasskeyButton.TAG}:click`;exports.PontPasskeyButton.SUCCESS_EVENT=`${exports.PontPasskeyButton.TAG}:success`;exports.PontPasskeyButton.ERROR_EVENT=`${exports.PontPasskeyButton.TAG}:error`;exports.PontPasskeyButton.PARTS={root:exports.PontPasskeyButton.ROOT,icon:`${exports.PontPasskeyButton.ROOT}-${exports.PontPasskeyButton.ICON}`};Yt([a({type:String})],exports.PontPasskeyButton.prototype,"seed",2);Yt([a({type:String,attribute:"custom-id"})],exports.PontPasskeyButton.prototype,"customId",2);Yt([a({type:String})],exports.PontPasskeyButton.prototype,"variant",2);Yt([a({type:String})],exports.PontPasskeyButton.prototype,"size",2);Yt([a({type:String})],exports.PontPasskeyButton.prototype,"content",2);Yt([a({type:String,attribute:"icon-align"})],exports.PontPasskeyButton.prototype,"iconAlign",2);Yt([a({type:String})],exports.PontPasskeyButton.prototype,"label",1);Yt([a({type:String})],exports.PontPasskeyButton.prototype,"event",2);Yt([a({type:Boolean})],exports.PontPasskeyButton.prototype,"disabled",2);Yt([a({type:Boolean})],exports.PontPasskeyButton.prototype,"loading",2);Yt([g()],exports.PontPasskeyButton.prototype,"_loading",2);exports.PontPasskeyButton=Yt([p("pont-passkey-button")],exports.PontPasskeyButton);var CP=Object.defineProperty,EP=Object.getOwnPropertyDescriptor,Lt=(e,t,r,o)=>{for(var n=o>1?void 0:o?EP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&CP(t,r,n),n};exports.PontProviderButton=class extends f{constructor(){super(...arguments),this.seed=_t(),this.design=new Fo(this),this.variant=pn.variant,this.size=pn.size,this.content=pn.content,this.iconAlign=pn.iconAlign,this._prompt=pn.prompt,this._loading=!1,this._handleClick=async()=>{if(!this.isDisabled){this._loading=!0,this.dispatchEvent(new CustomEvent(exports.PontProviderButton.CLICK_EVENT,{detail:{id:this.rootId,provider:this.provider,event:this.event},bubbles:!0,composed:!0}));try{if(this.event){const t=await G.processLoginflowEvent({event:this.event});this.dispatchEvent(new CustomEvent(exports.PontProviderButton.SUCCESS_EVENT,{detail:{id:this.rootId,provider:this.provider,event:this.event,result:t},bubbles:!0,composed:!0}))}}catch(t){const r=t instanceof Error?t.message:String(t);this.dispatchEvent(new CustomEvent(exports.PontProviderButton.ERROR_EVENT,{detail:{id:this.rootId,provider:this.provider,event:this.event,message:r,error:t},bubbles:!0,composed:!0}))}finally{this._loading=!1}}}}get _provider(){return!this.provider&&this.design.active?"google":this.provider}get prompt(){return this._prompt}set prompt(t){const r=this._prompt;this._prompt=t.length?t:pn.prompt,this.requestUpdate("prompt",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontProviderButton.TAG}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.PontProviderButton.ICON}`}get isLoading(){return this.loading||this._loading}get isDisabled(){return this.disabled||this.isLoading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderIcon(){const t=this.content==="icon"?"":`pont-icon-align-${this.iconAlign}`;return this.isLoading?l`
2691
2691
  <pont-spinner
2692
2692
  id="${this.iconId}"
2693
2693
  part="${exports.PontProviderButton.PARTS.icon}"
@@ -2719,7 +2719,7 @@
2719
2719
  ${this.content.includes("label")?r:h}
2720
2720
  ${this.iconAlign==="end"?this._renderIcon():h}
2721
2721
  </pont-button>
2722
- `}};exports.PontProviderButton.ROOT="provider-button";exports.PontProviderButton.ICON="icon";exports.PontProviderButton.TAG=`${rt}-${exports.PontProviderButton.ROOT}`;exports.PontProviderButton.CLICK_EVENT=`${exports.PontProviderButton.TAG}:click`;exports.PontProviderButton.SUCCESS_EVENT=`${exports.PontProviderButton.TAG}:success`;exports.PontProviderButton.ERROR_EVENT=`${exports.PontProviderButton.TAG}:error`;exports.PontProviderButton.PARTS={root:exports.PontProviderButton.ROOT,icon:`${exports.PontProviderButton.ROOT}-${exports.PontProviderButton.ICON}`};Lt([a({type:String})],exports.PontProviderButton.prototype,"seed",2);Lt([a({type:String,attribute:"custom-id"})],exports.PontProviderButton.prototype,"customId",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"provider",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"variant",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"size",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"content",2);Lt([a({type:String,attribute:"icon-align"})],exports.PontProviderButton.prototype,"iconAlign",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"prompt",1);Lt([a({type:String})],exports.PontProviderButton.prototype,"label",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"event",2);Lt([a({type:Boolean})],exports.PontProviderButton.prototype,"disabled",2);Lt([a({type:Boolean})],exports.PontProviderButton.prototype,"loading",2);Lt([g()],exports.PontProviderButton.prototype,"_loading",2);exports.PontProviderButton=Lt([p("pont-provider-button")],exports.PontProviderButton);var SP=Object.defineProperty,xP=Object.getOwnPropertyDescriptor,ce=(e,t,r,o)=>{for(var n=o>1?void 0:o?xP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&SP(t,r,n),n};exports.PontSubmitButton=class extends f{constructor(){super(...arguments),this.seed=_t(),this.variant=hn.variant,this.size=hn.size,this.content=hn.content,this.iconAlign=hn.iconAlign,this._label=hn.label,this._handleClick=()=>{this.isDisabled||this.dispatchEvent(new CustomEvent(exports.PontSubmitButton.CLICK_EVENT,{detail:{id:this.rootId,event:this.event},bubbles:!0,composed:!0}))}}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:hn.label,this.requestUpdate("label",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontSubmitButton.TAG}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.PontSubmitButton.ICON}`}get isDisabled(){return this.disabled||this.loading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderIcon(){const t=this.content==="icon"?"":`pont-icon-align-${this.iconAlign}`;return this.loading?l`
2722
+ `}};exports.PontProviderButton.ROOT="provider-button";exports.PontProviderButton.ICON="icon";exports.PontProviderButton.TAG=`${rt}-${exports.PontProviderButton.ROOT}`;exports.PontProviderButton.CLICK_EVENT=`${exports.PontProviderButton.TAG}:click`;exports.PontProviderButton.SUCCESS_EVENT=`${exports.PontProviderButton.TAG}:success`;exports.PontProviderButton.ERROR_EVENT=`${exports.PontProviderButton.TAG}:error`;exports.PontProviderButton.PARTS={root:exports.PontProviderButton.ROOT,icon:`${exports.PontProviderButton.ROOT}-${exports.PontProviderButton.ICON}`};Lt([a({type:String})],exports.PontProviderButton.prototype,"seed",2);Lt([a({type:String,attribute:"custom-id"})],exports.PontProviderButton.prototype,"customId",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"provider",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"variant",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"size",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"content",2);Lt([a({type:String,attribute:"icon-align"})],exports.PontProviderButton.prototype,"iconAlign",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"prompt",1);Lt([a({type:String})],exports.PontProviderButton.prototype,"label",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"event",2);Lt([a({type:Boolean})],exports.PontProviderButton.prototype,"disabled",2);Lt([a({type:Boolean})],exports.PontProviderButton.prototype,"loading",2);Lt([g()],exports.PontProviderButton.prototype,"_loading",2);exports.PontProviderButton=Lt([p("pont-provider-button")],exports.PontProviderButton);var SP=Object.defineProperty,xP=Object.getOwnPropertyDescriptor,de=(e,t,r,o)=>{for(var n=o>1?void 0:o?xP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&SP(t,r,n),n};exports.PontSubmitButton=class extends f{constructor(){super(...arguments),this.seed=_t(),this.variant=hn.variant,this.size=hn.size,this.content=hn.content,this.iconAlign=hn.iconAlign,this._label=hn.label,this._handleClick=()=>{this.isDisabled||this.dispatchEvent(new CustomEvent(exports.PontSubmitButton.CLICK_EVENT,{detail:{id:this.rootId,event:this.event},bubbles:!0,composed:!0}))}}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:hn.label,this.requestUpdate("label",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontSubmitButton.TAG}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.PontSubmitButton.ICON}`}get isDisabled(){return this.disabled||this.loading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderIcon(){const t=this.content==="icon"?"":`pont-icon-align-${this.iconAlign}`;return this.loading?l`
2723
2723
  <pont-spinner
2724
2724
  id="${this.iconId}"
2725
2725
  part="${exports.PontSubmitButton.PARTS.icon}"
@@ -2758,7 +2758,7 @@
2758
2758
  ${this.content.includes("label")?this.label:h}
2759
2759
  ${this.iconAlign==="end"?this._renderIcon():h}
2760
2760
  </pont-button>
2761
- `}};exports.PontSubmitButton.ROOT="submit-button";exports.PontSubmitButton.ICON="icon";exports.PontSubmitButton.TAG=`${rt}-${exports.PontSubmitButton.ROOT}`;exports.PontSubmitButton.CLICK_EVENT=`${exports.PontSubmitButton.TAG}:click`;exports.PontSubmitButton.PARTS={root:exports.PontSubmitButton.ROOT,icon:`${exports.PontSubmitButton.ROOT}-${exports.PontSubmitButton.ICON}`};ce([a({type:String})],exports.PontSubmitButton.prototype,"seed",2);ce([a({type:String,attribute:"custom-id"})],exports.PontSubmitButton.prototype,"customId",2);ce([a({type:String})],exports.PontSubmitButton.prototype,"variant",2);ce([a({type:String})],exports.PontSubmitButton.prototype,"size",2);ce([a({type:String})],exports.PontSubmitButton.prototype,"content",2);ce([a({type:String,attribute:"icon-align"})],exports.PontSubmitButton.prototype,"iconAlign",2);ce([a({type:String})],exports.PontSubmitButton.prototype,"label",1);ce([a({type:String})],exports.PontSubmitButton.prototype,"event",2);ce([a({type:Boolean})],exports.PontSubmitButton.prototype,"disabled",2);ce([a({type:Boolean})],exports.PontSubmitButton.prototype,"loading",2);exports.PontSubmitButton=ce([p("pont-submit-button")],exports.PontSubmitButton);var OP=Object.defineProperty,RP=Object.getOwnPropertyDescriptor,z=(e,t,r,o)=>{for(var n=o>1?void 0:o?RP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&OP(t,r,n),n};exports.PontPasswordField=class extends f{constructor(){super(...arguments),this.seed=_t(),this._name=He.name,this._label=He.label,this.variant=He.variant,this.rules=He.rules,this.validation=He.validation,this._forgotLabel=He.forgotLabel,this._invalid=!1,this._errors=[],this._value="",this._loading=!1,this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,o=`${exports.PontPasswordField.INPUT_SELECTORS} input`;r.matches(o)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontPasswordField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._errors=[],this._value="",this._dirty=!1},this._handleForgotClick=async()=>{if(this.isDisabled)return;this._loading=!0;const{rootId:t,forgotId:r,forgotEvent:o}=this;this.dispatchEvent(new CustomEvent(exports.PontPasswordField.FORGOT_CLICK_EVENT,{detail:{id:t,forgotId:r,event:o},bubbles:!0,composed:!0}));try{if(o){const n=await K.processLoginflowEvent({event:o});this.dispatchEvent(new CustomEvent(exports.PontPasswordField.FORGOT_SUCCESS_EVENT,{detail:{id:t,forgotId:r,event:o,result:n},bubbles:!0,composed:!0}))}}catch(n){const i=n instanceof Error?n.message:String(n);this.dispatchEvent(new CustomEvent(exports.PontPasswordField.FORGOT_ERROR_EVENT,{detail:{id:t,forgotId:r,event:o,message:i,error:n},bubbles:!0,composed:!0}))}finally{this._loading=!1}}}get _defaultInputId(){return`${this.rootId}-${exports.PontPasswordField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:He.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:He.label,this.requestUpdate("label",r)}get minlength(){return this._minlength}set minlength(t){const r=this._minlength;this._minlength=t===void 0||t>0?t:void 0,this.requestUpdate("minlength",r)}get maxlength(){return this._maxlength}set maxlength(t){const r=this._maxlength;if(t===void 0||t<=0)this._maxlength=void 0;else{const{minlength:o}=this;this._maxlength=o?Math.max(t,o):t}this.requestUpdate("maxlength",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}get _defaultMinlengthError(){return Hn(this.label,this.minlength)}get minlengthError(){return this._minlengthError??this._defaultMinlengthError}set minlengthError(t){const r=this.minlengthError;this._minlengthError=t||void 0,this.requestUpdate("minlengthError",r)}get _defaultMaxlengthError(){return Gn(this.label,this.maxlength)}get maxlengthError(){return this._maxlengthError??this._defaultMaxlengthError}set maxlengthError(t){const r=this.maxlengthError;this._maxlengthError=t||void 0,this.requestUpdate("maxlengthError",r)}get _defaultFormatError(){return Te(this.label)}get formatError(){return this._formatError??this._defaultFormatError}set formatError(t){const r=this.formatError;this._formatError=t||void 0,this.requestUpdate("formatError",r)}get forgotLabel(){return this._forgotLabel}set forgotLabel(t){const r=this._forgotLabel;this._forgotLabel=t.length?t:He.forgotLabel,this.requestUpdate("forgotLabel",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontPasswordField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontPasswordField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontPasswordField.MARK}`}get forgotId(){return`${this.rootId}-${exports.PontPasswordField.FORGOT}`}get descriptionId(){return`${this.rootId}-${exports.PontPasswordField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontPasswordField.ERROR}`}get value(){const t=this.defaultValue??"";return this._dirty?this._value:t}get isDisabled(){return this.disabled||this._loading}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontPasswordField.INPUT_SELECTORS,o=this.querySelector(r);o&&(o.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,o){const{rootId:n,inputId:i,name:s,value:d}=this;this.dispatchEvent(new CustomEvent(exports.PontPasswordField.VALIDATE_EVENT,{detail:{id:n,inputId:i,name:s,value:d,valid:t,type:r,message:o},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._errors=[],this._dispatchValidate(!0,"success","Valid password.")}_onValidateError(t,r,o){this._invalid=!0,this._errors=o!=null&&o.length?o:[r],this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;if(this.required&&!t)return this._onValidateError("required",this.requiredError),!1;if(!t||this.validation==="simple")return this._onValidateSuccess(),!0;const{minlength:r}=this;if(r&&t.length<r)return this._onValidateError("minlength",this.minlengthError),!1;const{maxlength:o}=this;if(o&&t.length>o)return this._onValidateError("maxlength",this.maxlengthError),!1;let n=!0;const i=[];for(const s of this.rules)(s.name?exports.PontPasswordField.RULE_PATTERNS[s.name]:new RegExp(s.pattern)).test(t)||(n=!1,s.error&&i.push(s.error));if(!n){const s=i.length?i.join(" "):this.formatError;return this._onValidateError("format",s,i),!1}return this._onValidateSuccess(),!0}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
2761
+ `}};exports.PontSubmitButton.ROOT="submit-button";exports.PontSubmitButton.ICON="icon";exports.PontSubmitButton.TAG=`${rt}-${exports.PontSubmitButton.ROOT}`;exports.PontSubmitButton.CLICK_EVENT=`${exports.PontSubmitButton.TAG}:click`;exports.PontSubmitButton.PARTS={root:exports.PontSubmitButton.ROOT,icon:`${exports.PontSubmitButton.ROOT}-${exports.PontSubmitButton.ICON}`};de([a({type:String})],exports.PontSubmitButton.prototype,"seed",2);de([a({type:String,attribute:"custom-id"})],exports.PontSubmitButton.prototype,"customId",2);de([a({type:String})],exports.PontSubmitButton.prototype,"variant",2);de([a({type:String})],exports.PontSubmitButton.prototype,"size",2);de([a({type:String})],exports.PontSubmitButton.prototype,"content",2);de([a({type:String,attribute:"icon-align"})],exports.PontSubmitButton.prototype,"iconAlign",2);de([a({type:String})],exports.PontSubmitButton.prototype,"label",1);de([a({type:String})],exports.PontSubmitButton.prototype,"event",2);de([a({type:Boolean})],exports.PontSubmitButton.prototype,"disabled",2);de([a({type:Boolean})],exports.PontSubmitButton.prototype,"loading",2);exports.PontSubmitButton=de([p("pont-submit-button")],exports.PontSubmitButton);var OP=Object.defineProperty,RP=Object.getOwnPropertyDescriptor,z=(e,t,r,o)=>{for(var n=o>1?void 0:o?RP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&OP(t,r,n),n};exports.PontPasswordField=class extends f{constructor(){super(...arguments),this.seed=_t(),this._name=He.name,this._label=He.label,this.variant=He.variant,this.rules=He.rules,this.validation=He.validation,this._forgotLabel=He.forgotLabel,this._invalid=!1,this._errors=[],this._value="",this._loading=!1,this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,o=`${exports.PontPasswordField.INPUT_SELECTORS} input`;r.matches(o)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontPasswordField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._errors=[],this._value="",this._dirty=!1},this._handleForgotClick=async()=>{if(this.isDisabled)return;this._loading=!0;const{rootId:t,forgotId:r,forgotEvent:o}=this;this.dispatchEvent(new CustomEvent(exports.PontPasswordField.FORGOT_CLICK_EVENT,{detail:{id:t,forgotId:r,event:o},bubbles:!0,composed:!0}));try{if(o){const n=await G.processLoginflowEvent({event:o});this.dispatchEvent(new CustomEvent(exports.PontPasswordField.FORGOT_SUCCESS_EVENT,{detail:{id:t,forgotId:r,event:o,result:n},bubbles:!0,composed:!0}))}}catch(n){const i=n instanceof Error?n.message:String(n);this.dispatchEvent(new CustomEvent(exports.PontPasswordField.FORGOT_ERROR_EVENT,{detail:{id:t,forgotId:r,event:o,message:i,error:n},bubbles:!0,composed:!0}))}finally{this._loading=!1}}}get _defaultInputId(){return`${this.rootId}-${exports.PontPasswordField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:He.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:He.label,this.requestUpdate("label",r)}get minlength(){return this._minlength}set minlength(t){const r=this._minlength;this._minlength=t===void 0||t>0?t:void 0,this.requestUpdate("minlength",r)}get maxlength(){return this._maxlength}set maxlength(t){const r=this._maxlength;if(t===void 0||t<=0)this._maxlength=void 0;else{const{minlength:o}=this;this._maxlength=o?Math.max(t,o):t}this.requestUpdate("maxlength",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}get _defaultMinlengthError(){return Hn(this.label,this.minlength)}get minlengthError(){return this._minlengthError??this._defaultMinlengthError}set minlengthError(t){const r=this.minlengthError;this._minlengthError=t||void 0,this.requestUpdate("minlengthError",r)}get _defaultMaxlengthError(){return Gn(this.label,this.maxlength)}get maxlengthError(){return this._maxlengthError??this._defaultMaxlengthError}set maxlengthError(t){const r=this.maxlengthError;this._maxlengthError=t||void 0,this.requestUpdate("maxlengthError",r)}get _defaultFormatError(){return Te(this.label)}get formatError(){return this._formatError??this._defaultFormatError}set formatError(t){const r=this.formatError;this._formatError=t||void 0,this.requestUpdate("formatError",r)}get forgotLabel(){return this._forgotLabel}set forgotLabel(t){const r=this._forgotLabel;this._forgotLabel=t.length?t:He.forgotLabel,this.requestUpdate("forgotLabel",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontPasswordField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontPasswordField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontPasswordField.MARK}`}get forgotId(){return`${this.rootId}-${exports.PontPasswordField.FORGOT}`}get descriptionId(){return`${this.rootId}-${exports.PontPasswordField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontPasswordField.ERROR}`}get value(){const t=this.defaultValue??"";return this._dirty?this._value:t}get isDisabled(){return this.disabled||this._loading}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontPasswordField.INPUT_SELECTORS,o=this.querySelector(r);o&&(o.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,o){const{rootId:n,inputId:i,name:s,value:d}=this;this.dispatchEvent(new CustomEvent(exports.PontPasswordField.VALIDATE_EVENT,{detail:{id:n,inputId:i,name:s,value:d,valid:t,type:r,message:o},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._errors=[],this._dispatchValidate(!0,"success","Valid password.")}_onValidateError(t,r,o){this._invalid=!0,this._errors=o!=null&&o.length?o:[r],this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;if(this.required&&!t)return this._onValidateError("required",this.requiredError),!1;if(!t||this.validation==="simple")return this._onValidateSuccess(),!0;const{minlength:r}=this;if(r&&t.length<r)return this._onValidateError("minlength",this.minlengthError),!1;const{maxlength:o}=this;if(o&&t.length>o)return this._onValidateError("maxlength",this.maxlengthError),!1;let n=!0;const i=[];for(const s of this.rules)(s.name?exports.PontPasswordField.RULE_PATTERNS[s.name]:new RegExp(s.pattern)).test(t)||(n=!1,s.error&&i.push(s.error));if(!n){const s=i.length?i.join(" "):this.formatError;return this._onValidateError("format",s,i),!1}return this._onValidateSuccess(),!0}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
2762
2762
  <span
2763
2763
  id="${this.markId}"
2764
2764
  part="${exports.PontPasswordField.PARTS.mark}"
@@ -3144,7 +3144,7 @@
3144
3144
  </pont-field-description>
3145
3145
  `:h}
3146
3146
  </pont-field>
3147
- `}};exports.PontUsernameField.ROOT="username-field";exports.PontUsernameField.LABEL="label";exports.PontUsernameField.MARK="mark";exports.PontUsernameField.DESCRIPTION="description";exports.PontUsernameField.INPUT="input";exports.PontUsernameField.ERROR="error";exports.PontUsernameField.TAG=`${rt}-${exports.PontUsernameField.ROOT}`;exports.PontUsernameField.VALIDATE_EVENT=`${exports.PontUsernameField.TAG}:validate`;exports.PontUsernameField.PARTS={root:exports.PontUsernameField.ROOT,label:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.LABEL}`,mark:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.MARK}`,description:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.DESCRIPTION}`,input:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.INPUT}`,error:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.ERROR}`};exports.PontUsernameField.INPUT_SELECTORS=`pont-input[part="${exports.PontUsernameField.PARTS.input}"]`;et([a({type:String})],exports.PontUsernameField.prototype,"seed",2);et([a({type:String,attribute:"custom-id"})],exports.PontUsernameField.prototype,"customId",2);et([a({type:String,attribute:"input-id"})],exports.PontUsernameField.prototype,"inputId",1);et([a({type:String})],exports.PontUsernameField.prototype,"name",1);et([a({type:String,attribute:"default-value"})],exports.PontUsernameField.prototype,"defaultValue",2);et([a({type:String})],exports.PontUsernameField.prototype,"label",1);et([a({type:String})],exports.PontUsernameField.prototype,"placeholder",2);et([a({type:String})],exports.PontUsernameField.prototype,"description",2);et([a({type:String})],exports.PontUsernameField.prototype,"mark",2);et([a({type:Boolean})],exports.PontUsernameField.prototype,"caret",2);et([a({type:String})],exports.PontUsernameField.prototype,"autocomplete",2);et([a({type:Boolean})],exports.PontUsernameField.prototype,"disabled",2);et([a({type:Boolean})],exports.PontUsernameField.prototype,"required",2);et([a({type:Number})],exports.PontUsernameField.prototype,"minlength",1);et([a({type:Number})],exports.PontUsernameField.prototype,"maxlength",1);et([a({type:String})],exports.PontUsernameField.prototype,"pattern",2);et([a({type:String})],exports.PontUsernameField.prototype,"validation",2);et([a({type:String,attribute:"required-error"})],exports.PontUsernameField.prototype,"requiredError",1);et([a({type:String,attribute:"minlength-error"})],exports.PontUsernameField.prototype,"minlengthError",1);et([a({type:String,attribute:"maxlength-error"})],exports.PontUsernameField.prototype,"maxlengthError",1);et([a({type:String,attribute:"format-error"})],exports.PontUsernameField.prototype,"formatError",1);et([g()],exports.PontUsernameField.prototype,"_invalid",2);et([g()],exports.PontUsernameField.prototype,"_error",2);et([g()],exports.PontUsernameField.prototype,"_value",2);exports.PontUsernameField=et([p("pont-username-field")],exports.PontUsernameField);const us={label:"Link",service:"auth"};var zP=Object.defineProperty,VP=Object.getOwnPropertyDescriptor,De=(e,t,r,o)=>{for(var n=o>1?void 0:o?VP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&zP(t,r,n),n};exports.PontLink=class extends f{constructor(){super(...arguments),this.seed=_t(),this._label=us.label,this.service=us.service,this._loading=!1,this._handleClick=async()=>{if(this.isDisabled)return;this._loading=!0;const{rootId:t,buttonId:r,service:o,event:n}=this;this.dispatchEvent(new CustomEvent(exports.PontLink.CLICK_EVENT,{detail:{id:t,buttonId:r,service:o,event:n},bubbles:!0,composed:!0}));try{if(n&&o==="auth"){const i=await K.processLoginflowEvent({event:n});this.dispatchEvent(new CustomEvent(exports.PontLink.SUCCESS_EVENT,{detail:{id:t,buttonId:r,event:n,result:i},bubbles:!0,composed:!0}))}}catch(i){const s=i instanceof Error?i.message:String(i);this.dispatchEvent(new CustomEvent(exports.PontLink.ERROR_EVENT,{detail:{id:t,buttonId:r,event:n,message:s,error:i},bubbles:!0,composed:!0}))}finally{this._loading=!1}}}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:us.label,this.requestUpdate("label",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontLink.TAG}-${this.seed}`}get buttonId(){return`${this.rootId}-${exports.PontLink.BUTTON}`}get promptId(){return`${this.rootId}-${exports.PontLink.PROMPT}`}get isLoading(){return this.loading||this._loading}get isDisabled(){return this.disabled||this.isLoading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}render(){var t;return l`
3147
+ `}};exports.PontUsernameField.ROOT="username-field";exports.PontUsernameField.LABEL="label";exports.PontUsernameField.MARK="mark";exports.PontUsernameField.DESCRIPTION="description";exports.PontUsernameField.INPUT="input";exports.PontUsernameField.ERROR="error";exports.PontUsernameField.TAG=`${rt}-${exports.PontUsernameField.ROOT}`;exports.PontUsernameField.VALIDATE_EVENT=`${exports.PontUsernameField.TAG}:validate`;exports.PontUsernameField.PARTS={root:exports.PontUsernameField.ROOT,label:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.LABEL}`,mark:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.MARK}`,description:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.DESCRIPTION}`,input:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.INPUT}`,error:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.ERROR}`};exports.PontUsernameField.INPUT_SELECTORS=`pont-input[part="${exports.PontUsernameField.PARTS.input}"]`;et([a({type:String})],exports.PontUsernameField.prototype,"seed",2);et([a({type:String,attribute:"custom-id"})],exports.PontUsernameField.prototype,"customId",2);et([a({type:String,attribute:"input-id"})],exports.PontUsernameField.prototype,"inputId",1);et([a({type:String})],exports.PontUsernameField.prototype,"name",1);et([a({type:String,attribute:"default-value"})],exports.PontUsernameField.prototype,"defaultValue",2);et([a({type:String})],exports.PontUsernameField.prototype,"label",1);et([a({type:String})],exports.PontUsernameField.prototype,"placeholder",2);et([a({type:String})],exports.PontUsernameField.prototype,"description",2);et([a({type:String})],exports.PontUsernameField.prototype,"mark",2);et([a({type:Boolean})],exports.PontUsernameField.prototype,"caret",2);et([a({type:String})],exports.PontUsernameField.prototype,"autocomplete",2);et([a({type:Boolean})],exports.PontUsernameField.prototype,"disabled",2);et([a({type:Boolean})],exports.PontUsernameField.prototype,"required",2);et([a({type:Number})],exports.PontUsernameField.prototype,"minlength",1);et([a({type:Number})],exports.PontUsernameField.prototype,"maxlength",1);et([a({type:String})],exports.PontUsernameField.prototype,"pattern",2);et([a({type:String})],exports.PontUsernameField.prototype,"validation",2);et([a({type:String,attribute:"required-error"})],exports.PontUsernameField.prototype,"requiredError",1);et([a({type:String,attribute:"minlength-error"})],exports.PontUsernameField.prototype,"minlengthError",1);et([a({type:String,attribute:"maxlength-error"})],exports.PontUsernameField.prototype,"maxlengthError",1);et([a({type:String,attribute:"format-error"})],exports.PontUsernameField.prototype,"formatError",1);et([g()],exports.PontUsernameField.prototype,"_invalid",2);et([g()],exports.PontUsernameField.prototype,"_error",2);et([g()],exports.PontUsernameField.prototype,"_value",2);exports.PontUsernameField=et([p("pont-username-field")],exports.PontUsernameField);const us={label:"Link",service:"auth"};var zP=Object.defineProperty,VP=Object.getOwnPropertyDescriptor,De=(e,t,r,o)=>{for(var n=o>1?void 0:o?VP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&zP(t,r,n),n};exports.PontLink=class extends f{constructor(){super(...arguments),this.seed=_t(),this._label=us.label,this.service=us.service,this._loading=!1,this._handleClick=async()=>{if(this.isDisabled)return;this._loading=!0;const{rootId:t,buttonId:r,service:o,event:n}=this;this.dispatchEvent(new CustomEvent(exports.PontLink.CLICK_EVENT,{detail:{id:t,buttonId:r,service:o,event:n},bubbles:!0,composed:!0}));try{if(n&&o==="auth"){const i=await G.processLoginflowEvent({event:n});this.dispatchEvent(new CustomEvent(exports.PontLink.SUCCESS_EVENT,{detail:{id:t,buttonId:r,event:n,result:i},bubbles:!0,composed:!0}))}}catch(i){const s=i instanceof Error?i.message:String(i);this.dispatchEvent(new CustomEvent(exports.PontLink.ERROR_EVENT,{detail:{id:t,buttonId:r,event:n,message:s,error:i},bubbles:!0,composed:!0}))}finally{this._loading=!1}}}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:us.label,this.requestUpdate("label",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontLink.TAG}-${this.seed}`}get buttonId(){return`${this.rootId}-${exports.PontLink.BUTTON}`}get promptId(){return`${this.rootId}-${exports.PontLink.PROMPT}`}get isLoading(){return this.loading||this._loading}get isDisabled(){return this.disabled||this.isLoading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}render(){var t;return l`
3148
3148
  <div id="${this.rootId}" part="${exports.PontLink.PARTS.root}">
3149
3149
  ${(t=this.prompt)!=null&&t.length?l`
3150
3150
  <p id="${this.promptId}" part="${exports.PontLink.PARTS.prompt}">
@@ -3208,7 +3208,7 @@
3208
3208
  `}function Fc(){return U`<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
3209
3209
  <path d="M12.665 8.665L10.6077 6.60767C10.3577 6.35771 10.0186 6.21729 9.66504 6.21729C9.31149 6.21729 8.97241 6.35771 8.72237 6.60767L2.66504 12.665M1.99837 0.665039H11.3317C12.0681 0.665039 12.665 1.26199 12.665 1.99837V11.3317C12.665 12.0681 12.0681 12.665 11.3317 12.665H1.99837C1.26199 12.665 0.665039 12.0681 0.665039 11.3317V1.99837C0.665039 1.26199 1.26199 0.665039 1.99837 0.665039ZM5.99837 4.66504C5.99837 5.40142 5.40142 5.99837 4.66504 5.99837C3.92866 5.99837 3.33171 5.40142 3.33171 4.66504C3.33171 3.92866 3.92866 3.33171 4.66504 3.33171C5.40142 3.33171 5.99837 3.92866 5.99837 4.66504Z" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
3210
3210
  </svg>
3211
- `}function jh(){return U`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
3211
+ `}function QP(){return U`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
3212
3212
  <g clip-path="url(#clip0_549_23445)">
3213
3213
  <path d="M7.99992 4.00004V8.00004L10.6666 9.33337M14.6666 8.00004C14.6666 11.6819 11.6818 14.6667 7.99992 14.6667C4.31802 14.6667 1.33325 11.6819 1.33325 8.00004C1.33325 4.31814 4.31802 1.33337 7.99992 1.33337C11.6818 1.33337 14.6666 4.31814 14.6666 8.00004Z" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
3214
3214
  </g>
@@ -3218,10 +3218,10 @@
3218
3218
  </clipPath>
3219
3219
  </defs>
3220
3220
  </svg>
3221
- `}function QP(){return U`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
3221
+ `}function ZP(){return U`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
3222
3222
  <path d="M1.33325 14C1.3332 12.9735 1.62934 11.9689 2.18615 11.1066C2.74296 10.2443 3.53677 9.56095 4.47232 9.13865C5.40787 8.71634 6.44541 8.57297 7.46042 8.72575C8.47544 8.87854 9.4248 9.32097 10.1946 9.99997M10.6666 12.6667L11.9999 14L14.6666 11.3333M9.99992 5.33333C9.99992 7.17428 8.50753 8.66667 6.66658 8.66667C4.82564 8.66667 3.33325 7.17428 3.33325 5.33333C3.33325 3.49238 4.82564 2 6.66658 2C8.50753 2 9.99992 3.49238 9.99992 5.33333Z" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
3223
3223
  </svg>
3224
- `}function ZP(){return U`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
3224
+ `}function JP(){return U`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
3225
3225
  <g clip-path="url(#clip0_549_23453)">
3226
3226
  <path d="M5.99992 7.99996L7.33325 9.33329L9.99992 6.66663M2.56655 5.74669C2.46925 5.30838 2.48419 4.85259 2.60999 4.42158C2.73579 3.99058 2.96838 3.59832 3.2862 3.28117C3.60401 2.96402 3.99676 2.73225 4.42802 2.60735C4.85929 2.48245 5.31511 2.46847 5.75322 2.56669C5.99436 2.18956 6.32655 1.8792 6.71919 1.66421C7.11182 1.44923 7.55225 1.33655 7.99988 1.33655C8.44752 1.33655 8.88795 1.44923 9.28058 1.66421C9.67322 1.8792 10.0054 2.18956 10.2466 2.56669C10.6853 2.46804 11.1419 2.48196 11.5739 2.60717C12.0058 2.73237 12.3991 2.96478 12.7171 3.28279C13.0351 3.6008 13.2675 3.99407 13.3927 4.42603C13.5179 4.85798 13.5319 5.31458 13.4332 5.75336C13.8104 5.9945 14.1207 6.32669 14.3357 6.71932C14.5507 7.11196 14.6634 7.55239 14.6634 8.00002C14.6634 8.44766 14.5507 8.88809 14.3357 9.28072C14.1207 9.67336 13.8104 10.0056 13.4332 10.2467C13.5314 10.6848 13.5175 11.1406 13.3926 11.5719C13.2677 12.0032 13.0359 12.3959 12.7187 12.7137C12.4016 13.0315 12.0093 13.2641 11.5783 13.3899C11.1473 13.5157 10.6915 13.5307 10.2532 13.4334C10.0124 13.8119 9.67994 14.1236 9.28663 14.3396C8.89333 14.5555 8.4519 14.6687 8.00322 14.6687C7.55453 14.6687 7.1131 14.5555 6.7198 14.3396C6.3265 14.1236 5.99404 13.8119 5.75322 13.4334C5.31511 13.5316 4.85929 13.5176 4.42802 13.3927C3.99676 13.2678 3.60401 13.036 3.2862 12.7189C2.96838 12.4017 2.73579 12.0095 2.60999 11.5785C2.48419 11.1475 2.46925 10.6917 2.56655 10.2534C2.18652 10.0129 1.87349 9.68014 1.65658 9.28617C1.43967 8.8922 1.32593 8.44976 1.32593 8.00002C1.32593 7.55029 1.43967 7.10785 1.65658 6.71388C1.87349 6.31991 2.18652 5.9872 2.56655 5.74669Z" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
3227
3227
  </g>
@@ -3231,27 +3231,17 @@
3231
3231
  </clipPath>
3232
3232
  </defs>
3233
3233
  </svg>
3234
- `}function JP(){return U`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
3234
+ `}function XP(){return U`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
3235
3235
  <path d="M3.33337 8.00004H12.6667M8.00004 3.33337V12.6667" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
3236
3236
  </svg>
3237
3237
  `}function Da(){return U`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
3238
3238
  <path d="M14.0001 14L11.1335 11.1333M12.6667 7.33333C12.6667 10.2789 10.2789 12.6667 7.33333 12.6667C4.38781 12.6667 2 10.2789 2 7.33333C2 4.38781 4.38781 2 7.33333 2C10.2789 2 12.6667 4.38781 12.6667 7.33333Z" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
3239
- </svg>`}function qh(){return U`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
3239
+ </svg>`}function jh(){return U`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
3240
3240
  <path d="M2 8C2 6.4087 2.63214 4.88258 3.75736 3.75736C4.88258 2.63214 6.4087 2 8 2C9.67737 2.00631 11.2874 2.66082 12.4933 3.82667L14 5.33333M10.6667 5.33333H14V2M14 8C14 9.5913 13.3679 11.1174 12.2426 12.2426C11.1174 13.3679 9.5913 14 8 14C6.32263 13.9937 4.71265 13.3392 3.50667 12.1733L2 10.6667M2 14V10.6667H5.33333" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
3241
- </svg>`}function XP(){return U`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
3242
- <g clip-path="url(#clip0_758_15757)">
3243
- <path d="M11 5.53993V5.99993C10.9994 7.07814 10.6503 8.12727 10.0047 8.99084C9.35908 9.85442 8.45164 10.4862 7.41768 10.7919C6.38372 11.0976 5.27863 11.0609 4.26724 10.6872C3.25584 10.3136 2.39233 9.62298 1.80548 8.71847C1.21863 7.81395 0.939896 6.74396 1.01084 5.66809C1.08178 4.59221 1.4986 3.5681 2.19914 2.74847C2.89968 1.92884 3.84639 1.35762 4.89809 1.12001C5.9498 0.882387 7.05013 0.991101 8.035 1.42993M4.5 5.49988L6 6.99988L11 1.99988" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
3244
- </g>
3245
- <defs>
3246
- <clipPath id="clip0_758_15757">
3247
- <rect width="12" height="12" fill="white"/>
3248
- </clipPath>
3249
- </defs>
3250
- </svg>
3251
- `}function t1(){return U`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
3241
+ </svg>`}function t1(){return U`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
3252
3242
  <path d="M9.99976 7.49988V10.8332M9.99976 14.1665H10.0081M18.108 14.9999L11.4414 3.33319C11.296 3.0767 11.0852 2.86335 10.8305 2.71492C10.5757 2.56649 10.2862 2.48828 9.99136 2.48828C9.69654 2.48828 9.40699 2.56649 9.15226 2.71492C8.89753 2.86335 8.68673 3.0767 8.54136 3.33319L1.8747 14.9999C1.72777 15.2543 1.65072 15.5431 1.65137 15.837C1.65202 16.1308 1.73035 16.4192 1.8784 16.673C2.02646 16.9269 2.23899 17.137 2.49444 17.2822C2.7499 17.4274 3.0392 17.5025 3.33303 17.4999H16.6664C16.9588 17.4996 17.246 17.4223 17.4991 17.2759C17.7522 17.1295 17.9624 16.9191 18.1085 16.6658C18.2545 16.4125 18.3314 16.1252 18.3313 15.8328C18.3312 15.5404 18.2542 15.2531 18.108 14.9999Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
3253
3243
  </svg>`}function e1(){return U`<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy-icon lucide-copy"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>
3254
- `}var r1=Object.defineProperty,n1=Object.getOwnPropertyDescriptor,No=(e,t,r,o)=>{for(var n=o>1?void 0:o?n1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&r1(t,r,n),n};exports.PontEditIdentifier=class extends f{constructor(){super(...arguments),this.seed=_t(),this.identifier=KP.identifier,this.event="",this._handleClick=()=>{K.processLoginflowEvent({event:this.event})}}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontEditIdentifier.TAG}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.PontEditIdentifier.ICON}`}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}render(){return l`
3244
+ `}var r1=Object.defineProperty,n1=Object.getOwnPropertyDescriptor,No=(e,t,r,o)=>{for(var n=o>1?void 0:o?n1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&r1(t,r,n),n};exports.PontEditIdentifier=class extends f{constructor(){super(...arguments),this.seed=_t(),this.identifier=KP.identifier,this.event="",this._handleClick=()=>{G.processLoginflowEvent({event:this.event})}}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontEditIdentifier.TAG}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.PontEditIdentifier.ICON}`}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}render(){return l`
3255
3245
  <div>
3256
3246
  <pont-typography-p>${this.identifier}</pont-typography-p>
3257
3247
  <div class="pont-flex pont-items-center">
@@ -3260,13 +3250,13 @@
3260
3250
  >
3261
3251
  </div>
3262
3252
  </div>
3263
- `}};exports.PontEditIdentifier.ROOT="edit-identifier";exports.PontEditIdentifier.ICON="icon";exports.PontEditIdentifier.TAG=`${rt}-${exports.PontEditIdentifier.ROOT}`;exports.PontEditIdentifier.CLICK_EVENT=`${exports.PontEditIdentifier.TAG}:click`;exports.PontEditIdentifier.PARTS={root:exports.PontEditIdentifier.ROOT,icon:`${exports.PontEditIdentifier.ROOT}-${exports.PontEditIdentifier.ICON}`};No([a({type:String})],exports.PontEditIdentifier.prototype,"seed",2);No([a({type:String,attribute:"custom-id"})],exports.PontEditIdentifier.prototype,"customId",2);No([a({type:String})],exports.PontEditIdentifier.prototype,"identifier",2);No([a({type:String})],exports.PontEditIdentifier.prototype,"event",2);exports.PontEditIdentifier=No([p("pont-edit-identifier")],exports.PontEditIdentifier);function o1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vn={},ms,kc;function i1(){return kc||(kc=1,ms=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),ms}var gs={},sr={},Nc;function en(){if(Nc)return sr;Nc=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return sr.getSymbolSize=function(o){if(!o)throw new Error('"version" cannot be null or undefined');if(o<1||o>40)throw new Error('"version" should be in range from 1 to 40');return o*4+17},sr.getSymbolTotalCodewords=function(o){return t[o]},sr.getBCHDigit=function(r){let o=0;for(;r!==0;)o++,r>>>=1;return o},sr.setToSJISFunction=function(o){if(typeof o!="function")throw new Error('"toSJISFunc" is not a valid function.');e=o},sr.isKanjiModeEnabled=function(){return typeof e<"u"},sr.toSJIS=function(o){return e(o)},sr}var fs={},Mc;function _l(){return Mc||(Mc=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+r)}}e.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4},e.from=function(o,n){if(e.isValid(o))return o;try{return t(o)}catch{return n}}})(fs)),fs}var vs,Bc;function s1(){if(Bc)return vs;Bc=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const r=Math.floor(t/8);return(this.buffer[r]>>>7-t%8&1)===1},put:function(t,r){for(let o=0;o<r;o++)this.putBit((t>>>r-o-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const r=Math.floor(this.length/8);this.buffer.length<=r&&this.buffer.push(0),t&&(this.buffer[r]|=128>>>this.length%8),this.length++}},vs=e,vs}var bs,Uc;function a1(){if(Uc)return bs;Uc=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,r,o,n){const i=t*this.size+r;this.data[i]=o,n&&(this.reservedBit[i]=!0)},e.prototype.get=function(t,r){return this.data[t*this.size+r]},e.prototype.xor=function(t,r,o){this.data[t*this.size+r]^=o},e.prototype.isReserved=function(t,r){return this.reservedBit[t*this.size+r]},bs=e,bs}var ys={},jc;function l1(){return jc||(jc=1,(function(e){const t=en().getSymbolSize;e.getRowColCoords=function(o){if(o===1)return[];const n=Math.floor(o/7)+2,i=t(o),s=i===145?26:Math.ceil((i-13)/(2*n-2))*2,d=[i-7];for(let c=1;c<n-1;c++)d[c]=d[c-1]-s;return d.push(6),d.reverse()},e.getPositions=function(o){const n=[],i=e.getRowColCoords(o),s=i.length;for(let d=0;d<s;d++)for(let c=0;c<s;c++)d===0&&c===0||d===0&&c===s-1||d===s-1&&c===0||n.push([i[d],i[c]]);return n}})(ys)),ys}var _s={},qc;function d1(){if(qc)return _s;qc=1;const e=en().getSymbolSize,t=7;return _s.getPositions=function(o){const n=e(o);return[[0,0],[n-t,0],[0,n-t]]},_s}var ws={},zc;function c1(){return zc||(zc=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},e.from=function(n){return e.isValid(n)?parseInt(n,10):void 0},e.getPenaltyN1=function(n){const i=n.size;let s=0,d=0,c=0,u=null,v=null;for(let b=0;b<i;b++){d=c=0,u=v=null;for(let w=0;w<i;w++){let _=n.get(b,w);_===u?d++:(d>=5&&(s+=t.N1+(d-5)),u=_,d=1),_=n.get(w,b),_===v?c++:(c>=5&&(s+=t.N1+(c-5)),v=_,c=1)}d>=5&&(s+=t.N1+(d-5)),c>=5&&(s+=t.N1+(c-5))}return s},e.getPenaltyN2=function(n){const i=n.size;let s=0;for(let d=0;d<i-1;d++)for(let c=0;c<i-1;c++){const u=n.get(d,c)+n.get(d,c+1)+n.get(d+1,c)+n.get(d+1,c+1);(u===4||u===0)&&s++}return s*t.N2},e.getPenaltyN3=function(n){const i=n.size;let s=0,d=0,c=0;for(let u=0;u<i;u++){d=c=0;for(let v=0;v<i;v++)d=d<<1&2047|n.get(u,v),v>=10&&(d===1488||d===93)&&s++,c=c<<1&2047|n.get(v,u),v>=10&&(c===1488||c===93)&&s++}return s*t.N3},e.getPenaltyN4=function(n){let i=0;const s=n.data.length;for(let c=0;c<s;c++)i+=n.data[c];return Math.abs(Math.ceil(i*100/s/5)-10)*t.N4};function r(o,n,i){switch(o){case e.Patterns.PATTERN000:return(n+i)%2===0;case e.Patterns.PATTERN001:return n%2===0;case e.Patterns.PATTERN010:return i%3===0;case e.Patterns.PATTERN011:return(n+i)%3===0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(i/3))%2===0;case e.Patterns.PATTERN101:return n*i%2+n*i%3===0;case e.Patterns.PATTERN110:return(n*i%2+n*i%3)%2===0;case e.Patterns.PATTERN111:return(n*i%3+(n+i)%2)%2===0;default:throw new Error("bad maskPattern:"+o)}}e.applyMask=function(n,i){const s=i.size;for(let d=0;d<s;d++)for(let c=0;c<s;c++)i.isReserved(c,d)||i.xor(c,d,r(n,c,d))},e.getBestMask=function(n,i){const s=Object.keys(e.Patterns).length;let d=0,c=1/0;for(let u=0;u<s;u++){i(u),e.applyMask(u,n);const v=e.getPenaltyN1(n)+e.getPenaltyN2(n)+e.getPenaltyN3(n)+e.getPenaltyN4(n);e.applyMask(u,n),v<c&&(c=v,d=u)}return d}})(ws)),ws}var zo={},Vc;function zh(){if(Vc)return zo;Vc=1;const e=_l(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return zo.getBlocksCount=function(n,i){switch(i){case e.L:return t[(n-1)*4+0];case e.M:return t[(n-1)*4+1];case e.Q:return t[(n-1)*4+2];case e.H:return t[(n-1)*4+3];default:return}},zo.getTotalCodewordsCount=function(n,i){switch(i){case e.L:return r[(n-1)*4+0];case e.M:return r[(n-1)*4+1];case e.Q:return r[(n-1)*4+2];case e.H:return r[(n-1)*4+3];default:return}},zo}var $s={},eo={},Hc;function p1(){if(Hc)return eo;Hc=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let o=1;for(let n=0;n<255;n++)e[n]=o,t[o]=n,o<<=1,o&256&&(o^=285);for(let n=255;n<512;n++)e[n]=e[n-255]})(),eo.log=function(o){if(o<1)throw new Error("log("+o+")");return t[o]},eo.exp=function(o){return e[o]},eo.mul=function(o,n){return o===0||n===0?0:e[t[o]+t[n]]},eo}var Gc;function h1(){return Gc||(Gc=1,(function(e){const t=p1();e.mul=function(o,n){const i=new Uint8Array(o.length+n.length-1);for(let s=0;s<o.length;s++)for(let d=0;d<n.length;d++)i[s+d]^=t.mul(o[s],n[d]);return i},e.mod=function(o,n){let i=new Uint8Array(o);for(;i.length-n.length>=0;){const s=i[0];for(let c=0;c<n.length;c++)i[c]^=t.mul(n[c],s);let d=0;for(;d<i.length&&i[d]===0;)d++;i=i.slice(d)}return i},e.generateECPolynomial=function(o){let n=new Uint8Array([1]);for(let i=0;i<o;i++)n=e.mul(n,new Uint8Array([1,t.exp(i)]));return n}})($s)),$s}var Ps,Kc;function u1(){if(Kc)return Ps;Kc=1;const e=h1();function t(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(o){this.degree=o,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(o){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(o.length+this.degree);n.set(o);const i=e.mod(n,this.genPoly),s=this.degree-i.length;if(s>0){const d=new Uint8Array(this.degree);return d.set(i,s),d}return i},Ps=t,Ps}var Cs={},Es={},Ss={},Wc;function Vh(){return Wc||(Wc=1,Ss.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Ss}var ge={},Yc;function Hh(){if(Yc)return ge;Yc=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+`)(?:.|[\r
3264
- ]))+`;ge.KANJI=new RegExp(r,"g"),ge.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),ge.BYTE=new RegExp(o,"g"),ge.NUMERIC=new RegExp(e,"g"),ge.ALPHANUMERIC=new RegExp(t,"g");const n=new RegExp("^"+r+"$"),i=new RegExp("^"+e+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return ge.testKanji=function(c){return n.test(c)},ge.testNumeric=function(c){return i.test(c)},ge.testAlphanumeric=function(c){return s.test(c)},ge}var Qc;function rn(){return Qc||(Qc=1,(function(e){const t=Vh(),r=Hh();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(i,s){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!t.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?i.ccBits[0]:s<27?i.ccBits[1]:i.ccBits[2]},e.getBestModeForData=function(i){return r.testNumeric(i)?e.NUMERIC:r.testAlphanumeric(i)?e.ALPHANUMERIC:r.testKanji(i)?e.KANJI:e.BYTE},e.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},e.isValid=function(i){return i&&i.bit&&i.ccBits};function o(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+n)}}e.from=function(i,s){if(e.isValid(i))return i;try{return o(i)}catch{return s}}})(Es)),Es}var Zc;function m1(){return Zc||(Zc=1,(function(e){const t=en(),r=zh(),o=_l(),n=rn(),i=Vh(),s=7973,d=t.getBCHDigit(s);function c(w,_,C){for(let P=1;P<=40;P++)if(_<=e.getCapacity(P,C,w))return P}function u(w,_){return n.getCharCountIndicator(w,_)+4}function v(w,_){let C=0;return w.forEach(function(P){const O=u(P.mode,_);C+=O+P.getBitsLength()}),C}function b(w,_){for(let C=1;C<=40;C++)if(v(w,C)<=e.getCapacity(C,_,n.MIXED))return C}e.from=function(_,C){return i.isValid(_)?parseInt(_,10):C},e.getCapacity=function(_,C,P){if(!i.isValid(_))throw new Error("Invalid QR Code version");typeof P>"u"&&(P=n.BYTE);const O=t.getSymbolTotalCodewords(_),S=r.getTotalCodewordsCount(_,C),D=(O-S)*8;if(P===n.MIXED)return D;const L=D-u(P,_);switch(P){case n.NUMERIC:return Math.floor(L/10*3);case n.ALPHANUMERIC:return Math.floor(L/11*2);case n.KANJI:return Math.floor(L/13);case n.BYTE:default:return Math.floor(L/8)}},e.getBestVersionForData=function(_,C){let P;const O=o.from(C,o.M);if(Array.isArray(_)){if(_.length>1)return b(_,O);if(_.length===0)return 1;P=_[0]}else P=_;return c(P.mode,P.getLength(),O)},e.getEncodedBits=function(_){if(!i.isValid(_)||_<7)throw new Error("Invalid QR Code version");let C=_<<12;for(;t.getBCHDigit(C)-d>=0;)C^=s<<t.getBCHDigit(C)-d;return _<<12|C}})(Cs)),Cs}var xs={},Jc;function g1(){if(Jc)return xs;Jc=1;const e=en(),t=1335,r=21522,o=e.getBCHDigit(t);return xs.getEncodedBits=function(i,s){const d=i.bit<<3|s;let c=d<<10;for(;e.getBCHDigit(c)-o>=0;)c^=t<<e.getBCHDigit(c)-o;return(d<<10|c)^r},xs}var Os={},Rs,Xc;function f1(){if(Xc)return Rs;Xc=1;const e=rn();function t(r){this.mode=e.NUMERIC,this.data=r.toString()}return t.getBitsLength=function(o){return 10*Math.floor(o/3)+(o%3?o%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(o){let n,i,s;for(n=0;n+3<=this.data.length;n+=3)i=this.data.substr(n,3),s=parseInt(i,10),o.put(s,10);const d=this.data.length-n;d>0&&(i=this.data.substr(n),s=parseInt(i,10),o.put(s,d*3+1))},Rs=t,Rs}var Is,tp;function v1(){if(tp)return Is;tp=1;const e=rn(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function r(o){this.mode=e.ALPHANUMERIC,this.data=o}return r.getBitsLength=function(n){return 11*Math.floor(n/2)+6*(n%2)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(n){let i;for(i=0;i+2<=this.data.length;i+=2){let s=t.indexOf(this.data[i])*45;s+=t.indexOf(this.data[i+1]),n.put(s,11)}this.data.length%2&&n.put(t.indexOf(this.data[i]),6)},Is=r,Is}var As,ep;function b1(){if(ep)return As;ep=1;const e=rn();function t(r){this.mode=e.BYTE,typeof r=="string"?this.data=new TextEncoder().encode(r):this.data=new Uint8Array(r)}return t.getBitsLength=function(o){return o*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(r){for(let o=0,n=this.data.length;o<n;o++)r.put(this.data[o],8)},As=t,As}var Ts,rp;function y1(){if(rp)return Ts;rp=1;const e=rn(),t=en();function r(o){this.mode=e.KANJI,this.data=o}return r.getBitsLength=function(n){return n*13},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(o){let n;for(n=0;n<this.data.length;n++){let i=t.toSJIS(this.data[n]);if(i>=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw new Error("Invalid SJIS character: "+this.data[n]+`
3265
- Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),o.put(i,13)}},Ts=r,Ts}var Ds={exports:{}},np;function _1(){return np||(np=1,(function(e){var t={single_source_shortest_paths:function(r,o,n){var i={},s={};s[o]=0;var d=t.PriorityQueue.make();d.push(o,0);for(var c,u,v,b,w,_,C,P,O;!d.empty();){c=d.pop(),u=c.value,b=c.cost,w=r[u]||{};for(v in w)w.hasOwnProperty(v)&&(_=w[v],C=b+_,P=s[v],O=typeof s[v]>"u",(O||P>C)&&(s[v]=C,d.push(v,C),i[v]=u))}if(typeof n<"u"&&typeof s[n]>"u"){var S=["Could not find a path from ",o," to ",n,"."].join("");throw new Error(S)}return i},extract_shortest_path_from_predecessor_list:function(r,o){for(var n=[],i=o;i;)n.push(i),r[i],i=r[i];return n.reverse(),n},find_path:function(r,o,n){var i=t.single_source_shortest_paths(r,o,n);return t.extract_shortest_path_from_predecessor_list(i,n)},PriorityQueue:{make:function(r){var o=t.PriorityQueue,n={},i;r=r||{};for(i in o)o.hasOwnProperty(i)&&(n[i]=o[i]);return n.queue=[],n.sorter=r.sorter||o.default_sorter,n},default_sorter:function(r,o){return r.cost-o.cost},push:function(r,o){var n={value:r,cost:o};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Ds)),Ds.exports}var op;function w1(){return op||(op=1,(function(e){const t=rn(),r=f1(),o=v1(),n=b1(),i=y1(),s=Hh(),d=en(),c=_1();function u(S){return unescape(encodeURIComponent(S)).length}function v(S,D,L){const I=[];let Q;for(;(Q=S.exec(L))!==null;)I.push({data:Q[0],index:Q.index,mode:D,length:Q[0].length});return I}function b(S){const D=v(s.NUMERIC,t.NUMERIC,S),L=v(s.ALPHANUMERIC,t.ALPHANUMERIC,S);let I,Q;return d.isKanjiModeEnabled()?(I=v(s.BYTE,t.BYTE,S),Q=v(s.KANJI,t.KANJI,S)):(I=v(s.BYTE_KANJI,t.BYTE,S),Q=[]),D.concat(L,I,Q).sort(function(A,T){return A.index-T.index}).map(function(A){return{data:A.data,mode:A.mode,length:A.length}})}function w(S,D){switch(D){case t.NUMERIC:return r.getBitsLength(S);case t.ALPHANUMERIC:return o.getBitsLength(S);case t.KANJI:return i.getBitsLength(S);case t.BYTE:return n.getBitsLength(S)}}function _(S){return S.reduce(function(D,L){const I=D.length-1>=0?D[D.length-1]:null;return I&&I.mode===L.mode?(D[D.length-1].data+=L.data,D):(D.push(L),D)},[])}function C(S){const D=[];for(let L=0;L<S.length;L++){const I=S[L];switch(I.mode){case t.NUMERIC:D.push([I,{data:I.data,mode:t.ALPHANUMERIC,length:I.length},{data:I.data,mode:t.BYTE,length:I.length}]);break;case t.ALPHANUMERIC:D.push([I,{data:I.data,mode:t.BYTE,length:I.length}]);break;case t.KANJI:D.push([I,{data:I.data,mode:t.BYTE,length:u(I.data)}]);break;case t.BYTE:D.push([{data:I.data,mode:t.BYTE,length:u(I.data)}])}}return D}function P(S,D){const L={},I={start:{}};let Q=["start"];for(let R=0;R<S.length;R++){const A=S[R],T=[];for(let x=0;x<A.length;x++){const N=A[x],F=""+R+x;T.push(F),L[F]={node:N,lastCount:0},I[F]={};for(let $=0;$<Q.length;$++){const k=Q[$];L[k]&&L[k].node.mode===N.mode?(I[k][F]=w(L[k].lastCount+N.length,N.mode)-w(L[k].lastCount,N.mode),L[k].lastCount+=N.length):(L[k]&&(L[k].lastCount=N.length),I[k][F]=w(N.length,N.mode)+4+t.getCharCountIndicator(N.mode,D))}}Q=T}for(let R=0;R<Q.length;R++)I[Q[R]].end=0;return{map:I,table:L}}function O(S,D){let L;const I=t.getBestModeForData(S);if(L=t.from(D,I),L!==t.BYTE&&L.bit<I.bit)throw new Error('"'+S+'" cannot be encoded with mode '+t.toString(L)+`.
3266
- Suggested mode is: `+t.toString(I));switch(L===t.KANJI&&!d.isKanjiModeEnabled()&&(L=t.BYTE),L){case t.NUMERIC:return new r(S);case t.ALPHANUMERIC:return new o(S);case t.KANJI:return new i(S);case t.BYTE:return new n(S)}}e.fromArray=function(D){return D.reduce(function(L,I){return typeof I=="string"?L.push(O(I,null)):I.data&&L.push(O(I.data,I.mode)),L},[])},e.fromString=function(D,L){const I=b(D,d.isKanjiModeEnabled()),Q=C(I),R=P(Q,L),A=c.find_path(R.map,"start","end"),T=[];for(let x=1;x<A.length-1;x++)T.push(R.table[A[x]].node);return e.fromArray(_(T))},e.rawSplit=function(D){return e.fromArray(b(D,d.isKanjiModeEnabled()))}})(Os)),Os}var ip;function $1(){if(ip)return gs;ip=1;const e=en(),t=_l(),r=s1(),o=a1(),n=l1(),i=d1(),s=c1(),d=zh(),c=u1(),u=m1(),v=g1(),b=rn(),w=w1();function _(R,A){const T=R.size,x=i.getPositions(A);for(let N=0;N<x.length;N++){const F=x[N][0],$=x[N][1];for(let k=-1;k<=7;k++)if(!(F+k<=-1||T<=F+k))for(let M=-1;M<=7;M++)$+M<=-1||T<=$+M||(k>=0&&k<=6&&(M===0||M===6)||M>=0&&M<=6&&(k===0||k===6)||k>=2&&k<=4&&M>=2&&M<=4?R.set(F+k,$+M,!0,!0):R.set(F+k,$+M,!1,!0))}}function C(R){const A=R.size;for(let T=8;T<A-8;T++){const x=T%2===0;R.set(T,6,x,!0),R.set(6,T,x,!0)}}function P(R,A){const T=n.getPositions(A);for(let x=0;x<T.length;x++){const N=T[x][0],F=T[x][1];for(let $=-2;$<=2;$++)for(let k=-2;k<=2;k++)$===-2||$===2||k===-2||k===2||$===0&&k===0?R.set(N+$,F+k,!0,!0):R.set(N+$,F+k,!1,!0)}}function O(R,A){const T=R.size,x=u.getEncodedBits(A);let N,F,$;for(let k=0;k<18;k++)N=Math.floor(k/3),F=k%3+T-8-3,$=(x>>k&1)===1,R.set(N,F,$,!0),R.set(F,N,$,!0)}function S(R,A,T){const x=R.size,N=v.getEncodedBits(A,T);let F,$;for(F=0;F<15;F++)$=(N>>F&1)===1,F<6?R.set(F,8,$,!0):F<8?R.set(F+1,8,$,!0):R.set(x-15+F,8,$,!0),F<8?R.set(8,x-F-1,$,!0):F<9?R.set(8,15-F-1+1,$,!0):R.set(8,15-F-1,$,!0);R.set(x-8,8,1,!0)}function D(R,A){const T=R.size;let x=-1,N=T-1,F=7,$=0;for(let k=T-1;k>0;k-=2)for(k===6&&k--;;){for(let M=0;M<2;M++)if(!R.isReserved(N,k-M)){let te=!1;$<A.length&&(te=(A[$]>>>F&1)===1),R.set(N,k-M,te),F--,F===-1&&($++,F=7)}if(N+=x,N<0||T<=N){N-=x,x=-x;break}}}function L(R,A,T){const x=new r;T.forEach(function(M){x.put(M.mode.bit,4),x.put(M.getLength(),b.getCharCountIndicator(M.mode,R)),M.write(x)});const N=e.getSymbolTotalCodewords(R),F=d.getTotalCodewordsCount(R,A),$=(N-F)*8;for(x.getLengthInBits()+4<=$&&x.put(0,4);x.getLengthInBits()%8!==0;)x.putBit(0);const k=($-x.getLengthInBits())/8;for(let M=0;M<k;M++)x.put(M%2?17:236,8);return I(x,R,A)}function I(R,A,T){const x=e.getSymbolTotalCodewords(A),N=d.getTotalCodewordsCount(A,T),F=x-N,$=d.getBlocksCount(A,T),k=x%$,M=$-k,te=Math.floor(x/$),me=Math.floor(F/$),jo=me+1,an=te-me,xr=new c(an);let ln=0;const It=new Array($),Al=new Array($);let es=0;const iu=new Uint8Array(R.buffer);for(let dn=0;dn<$;dn++){const ns=dn<M?me:jo;It[dn]=iu.slice(ln,ln+ns),Al[dn]=xr.encode(It[dn]),ln+=ns,es=Math.max(es,ns)}const rs=new Uint8Array(x);let Tl=0,qe,ze;for(qe=0;qe<es;qe++)for(ze=0;ze<$;ze++)qe<It[ze].length&&(rs[Tl++]=It[ze][qe]);for(qe=0;qe<an;qe++)for(ze=0;ze<$;ze++)rs[Tl++]=Al[ze][qe];return rs}function Q(R,A,T,x){let N;if(Array.isArray(R))N=w.fromArray(R);else if(typeof R=="string"){let te=A;if(!te){const me=w.rawSplit(R);te=u.getBestVersionForData(me,T)}N=w.fromString(R,te||40)}else throw new Error("Invalid data");const F=u.getBestVersionForData(N,T);if(!F)throw new Error("The amount of data is too big to be stored in a QR Code");if(!A)A=F;else if(A<F)throw new Error(`
3253
+ `}};exports.PontEditIdentifier.ROOT="edit-identifier";exports.PontEditIdentifier.ICON="icon";exports.PontEditIdentifier.TAG=`${rt}-${exports.PontEditIdentifier.ROOT}`;exports.PontEditIdentifier.CLICK_EVENT=`${exports.PontEditIdentifier.TAG}:click`;exports.PontEditIdentifier.PARTS={root:exports.PontEditIdentifier.ROOT,icon:`${exports.PontEditIdentifier.ROOT}-${exports.PontEditIdentifier.ICON}`};No([a({type:String})],exports.PontEditIdentifier.prototype,"seed",2);No([a({type:String,attribute:"custom-id"})],exports.PontEditIdentifier.prototype,"customId",2);No([a({type:String})],exports.PontEditIdentifier.prototype,"identifier",2);No([a({type:String})],exports.PontEditIdentifier.prototype,"event",2);exports.PontEditIdentifier=No([p("pont-edit-identifier")],exports.PontEditIdentifier);function o1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vn={},ms,kc;function i1(){return kc||(kc=1,ms=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),ms}var gs={},sr={},Nc;function en(){if(Nc)return sr;Nc=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return sr.getSymbolSize=function(o){if(!o)throw new Error('"version" cannot be null or undefined');if(o<1||o>40)throw new Error('"version" should be in range from 1 to 40');return o*4+17},sr.getSymbolTotalCodewords=function(o){return t[o]},sr.getBCHDigit=function(r){let o=0;for(;r!==0;)o++,r>>>=1;return o},sr.setToSJISFunction=function(o){if(typeof o!="function")throw new Error('"toSJISFunc" is not a valid function.');e=o},sr.isKanjiModeEnabled=function(){return typeof e<"u"},sr.toSJIS=function(o){return e(o)},sr}var fs={},Mc;function _l(){return Mc||(Mc=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+r)}}e.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4},e.from=function(o,n){if(e.isValid(o))return o;try{return t(o)}catch{return n}}})(fs)),fs}var vs,Bc;function s1(){if(Bc)return vs;Bc=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const r=Math.floor(t/8);return(this.buffer[r]>>>7-t%8&1)===1},put:function(t,r){for(let o=0;o<r;o++)this.putBit((t>>>r-o-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const r=Math.floor(this.length/8);this.buffer.length<=r&&this.buffer.push(0),t&&(this.buffer[r]|=128>>>this.length%8),this.length++}},vs=e,vs}var bs,Uc;function a1(){if(Uc)return bs;Uc=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,r,o,n){const i=t*this.size+r;this.data[i]=o,n&&(this.reservedBit[i]=!0)},e.prototype.get=function(t,r){return this.data[t*this.size+r]},e.prototype.xor=function(t,r,o){this.data[t*this.size+r]^=o},e.prototype.isReserved=function(t,r){return this.reservedBit[t*this.size+r]},bs=e,bs}var ys={},jc;function l1(){return jc||(jc=1,(function(e){const t=en().getSymbolSize;e.getRowColCoords=function(o){if(o===1)return[];const n=Math.floor(o/7)+2,i=t(o),s=i===145?26:Math.ceil((i-13)/(2*n-2))*2,d=[i-7];for(let c=1;c<n-1;c++)d[c]=d[c-1]-s;return d.push(6),d.reverse()},e.getPositions=function(o){const n=[],i=e.getRowColCoords(o),s=i.length;for(let d=0;d<s;d++)for(let c=0;c<s;c++)d===0&&c===0||d===0&&c===s-1||d===s-1&&c===0||n.push([i[d],i[c]]);return n}})(ys)),ys}var _s={},qc;function d1(){if(qc)return _s;qc=1;const e=en().getSymbolSize,t=7;return _s.getPositions=function(o){const n=e(o);return[[0,0],[n-t,0],[0,n-t]]},_s}var ws={},zc;function c1(){return zc||(zc=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},e.from=function(n){return e.isValid(n)?parseInt(n,10):void 0},e.getPenaltyN1=function(n){const i=n.size;let s=0,d=0,c=0,u=null,v=null;for(let b=0;b<i;b++){d=c=0,u=v=null;for(let w=0;w<i;w++){let _=n.get(b,w);_===u?d++:(d>=5&&(s+=t.N1+(d-5)),u=_,d=1),_=n.get(w,b),_===v?c++:(c>=5&&(s+=t.N1+(c-5)),v=_,c=1)}d>=5&&(s+=t.N1+(d-5)),c>=5&&(s+=t.N1+(c-5))}return s},e.getPenaltyN2=function(n){const i=n.size;let s=0;for(let d=0;d<i-1;d++)for(let c=0;c<i-1;c++){const u=n.get(d,c)+n.get(d,c+1)+n.get(d+1,c)+n.get(d+1,c+1);(u===4||u===0)&&s++}return s*t.N2},e.getPenaltyN3=function(n){const i=n.size;let s=0,d=0,c=0;for(let u=0;u<i;u++){d=c=0;for(let v=0;v<i;v++)d=d<<1&2047|n.get(u,v),v>=10&&(d===1488||d===93)&&s++,c=c<<1&2047|n.get(v,u),v>=10&&(c===1488||c===93)&&s++}return s*t.N3},e.getPenaltyN4=function(n){let i=0;const s=n.data.length;for(let c=0;c<s;c++)i+=n.data[c];return Math.abs(Math.ceil(i*100/s/5)-10)*t.N4};function r(o,n,i){switch(o){case e.Patterns.PATTERN000:return(n+i)%2===0;case e.Patterns.PATTERN001:return n%2===0;case e.Patterns.PATTERN010:return i%3===0;case e.Patterns.PATTERN011:return(n+i)%3===0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(i/3))%2===0;case e.Patterns.PATTERN101:return n*i%2+n*i%3===0;case e.Patterns.PATTERN110:return(n*i%2+n*i%3)%2===0;case e.Patterns.PATTERN111:return(n*i%3+(n+i)%2)%2===0;default:throw new Error("bad maskPattern:"+o)}}e.applyMask=function(n,i){const s=i.size;for(let d=0;d<s;d++)for(let c=0;c<s;c++)i.isReserved(c,d)||i.xor(c,d,r(n,c,d))},e.getBestMask=function(n,i){const s=Object.keys(e.Patterns).length;let d=0,c=1/0;for(let u=0;u<s;u++){i(u),e.applyMask(u,n);const v=e.getPenaltyN1(n)+e.getPenaltyN2(n)+e.getPenaltyN3(n)+e.getPenaltyN4(n);e.applyMask(u,n),v<c&&(c=v,d=u)}return d}})(ws)),ws}var zo={},Vc;function qh(){if(Vc)return zo;Vc=1;const e=_l(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return zo.getBlocksCount=function(n,i){switch(i){case e.L:return t[(n-1)*4+0];case e.M:return t[(n-1)*4+1];case e.Q:return t[(n-1)*4+2];case e.H:return t[(n-1)*4+3];default:return}},zo.getTotalCodewordsCount=function(n,i){switch(i){case e.L:return r[(n-1)*4+0];case e.M:return r[(n-1)*4+1];case e.Q:return r[(n-1)*4+2];case e.H:return r[(n-1)*4+3];default:return}},zo}var $s={},eo={},Hc;function p1(){if(Hc)return eo;Hc=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let o=1;for(let n=0;n<255;n++)e[n]=o,t[o]=n,o<<=1,o&256&&(o^=285);for(let n=255;n<512;n++)e[n]=e[n-255]})(),eo.log=function(o){if(o<1)throw new Error("log("+o+")");return t[o]},eo.exp=function(o){return e[o]},eo.mul=function(o,n){return o===0||n===0?0:e[t[o]+t[n]]},eo}var Gc;function h1(){return Gc||(Gc=1,(function(e){const t=p1();e.mul=function(o,n){const i=new Uint8Array(o.length+n.length-1);for(let s=0;s<o.length;s++)for(let d=0;d<n.length;d++)i[s+d]^=t.mul(o[s],n[d]);return i},e.mod=function(o,n){let i=new Uint8Array(o);for(;i.length-n.length>=0;){const s=i[0];for(let c=0;c<n.length;c++)i[c]^=t.mul(n[c],s);let d=0;for(;d<i.length&&i[d]===0;)d++;i=i.slice(d)}return i},e.generateECPolynomial=function(o){let n=new Uint8Array([1]);for(let i=0;i<o;i++)n=e.mul(n,new Uint8Array([1,t.exp(i)]));return n}})($s)),$s}var Ps,Kc;function u1(){if(Kc)return Ps;Kc=1;const e=h1();function t(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(o){this.degree=o,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(o){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(o.length+this.degree);n.set(o);const i=e.mod(n,this.genPoly),s=this.degree-i.length;if(s>0){const d=new Uint8Array(this.degree);return d.set(i,s),d}return i},Ps=t,Ps}var Cs={},Es={},Ss={},Wc;function zh(){return Wc||(Wc=1,Ss.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Ss}var ge={},Yc;function Vh(){if(Yc)return ge;Yc=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+`)(?:.|[\r
3254
+ ]))+`;ge.KANJI=new RegExp(r,"g"),ge.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),ge.BYTE=new RegExp(o,"g"),ge.NUMERIC=new RegExp(e,"g"),ge.ALPHANUMERIC=new RegExp(t,"g");const n=new RegExp("^"+r+"$"),i=new RegExp("^"+e+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return ge.testKanji=function(c){return n.test(c)},ge.testNumeric=function(c){return i.test(c)},ge.testAlphanumeric=function(c){return s.test(c)},ge}var Qc;function rn(){return Qc||(Qc=1,(function(e){const t=zh(),r=Vh();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(i,s){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!t.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?i.ccBits[0]:s<27?i.ccBits[1]:i.ccBits[2]},e.getBestModeForData=function(i){return r.testNumeric(i)?e.NUMERIC:r.testAlphanumeric(i)?e.ALPHANUMERIC:r.testKanji(i)?e.KANJI:e.BYTE},e.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},e.isValid=function(i){return i&&i.bit&&i.ccBits};function o(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+n)}}e.from=function(i,s){if(e.isValid(i))return i;try{return o(i)}catch{return s}}})(Es)),Es}var Zc;function m1(){return Zc||(Zc=1,(function(e){const t=en(),r=qh(),o=_l(),n=rn(),i=zh(),s=7973,d=t.getBCHDigit(s);function c(w,_,C){for(let P=1;P<=40;P++)if(_<=e.getCapacity(P,C,w))return P}function u(w,_){return n.getCharCountIndicator(w,_)+4}function v(w,_){let C=0;return w.forEach(function(P){const O=u(P.mode,_);C+=O+P.getBitsLength()}),C}function b(w,_){for(let C=1;C<=40;C++)if(v(w,C)<=e.getCapacity(C,_,n.MIXED))return C}e.from=function(_,C){return i.isValid(_)?parseInt(_,10):C},e.getCapacity=function(_,C,P){if(!i.isValid(_))throw new Error("Invalid QR Code version");typeof P>"u"&&(P=n.BYTE);const O=t.getSymbolTotalCodewords(_),S=r.getTotalCodewordsCount(_,C),D=(O-S)*8;if(P===n.MIXED)return D;const L=D-u(P,_);switch(P){case n.NUMERIC:return Math.floor(L/10*3);case n.ALPHANUMERIC:return Math.floor(L/11*2);case n.KANJI:return Math.floor(L/13);case n.BYTE:default:return Math.floor(L/8)}},e.getBestVersionForData=function(_,C){let P;const O=o.from(C,o.M);if(Array.isArray(_)){if(_.length>1)return b(_,O);if(_.length===0)return 1;P=_[0]}else P=_;return c(P.mode,P.getLength(),O)},e.getEncodedBits=function(_){if(!i.isValid(_)||_<7)throw new Error("Invalid QR Code version");let C=_<<12;for(;t.getBCHDigit(C)-d>=0;)C^=s<<t.getBCHDigit(C)-d;return _<<12|C}})(Cs)),Cs}var xs={},Jc;function g1(){if(Jc)return xs;Jc=1;const e=en(),t=1335,r=21522,o=e.getBCHDigit(t);return xs.getEncodedBits=function(i,s){const d=i.bit<<3|s;let c=d<<10;for(;e.getBCHDigit(c)-o>=0;)c^=t<<e.getBCHDigit(c)-o;return(d<<10|c)^r},xs}var Os={},Rs,Xc;function f1(){if(Xc)return Rs;Xc=1;const e=rn();function t(r){this.mode=e.NUMERIC,this.data=r.toString()}return t.getBitsLength=function(o){return 10*Math.floor(o/3)+(o%3?o%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(o){let n,i,s;for(n=0;n+3<=this.data.length;n+=3)i=this.data.substr(n,3),s=parseInt(i,10),o.put(s,10);const d=this.data.length-n;d>0&&(i=this.data.substr(n),s=parseInt(i,10),o.put(s,d*3+1))},Rs=t,Rs}var Is,tp;function v1(){if(tp)return Is;tp=1;const e=rn(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function r(o){this.mode=e.ALPHANUMERIC,this.data=o}return r.getBitsLength=function(n){return 11*Math.floor(n/2)+6*(n%2)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(n){let i;for(i=0;i+2<=this.data.length;i+=2){let s=t.indexOf(this.data[i])*45;s+=t.indexOf(this.data[i+1]),n.put(s,11)}this.data.length%2&&n.put(t.indexOf(this.data[i]),6)},Is=r,Is}var As,ep;function b1(){if(ep)return As;ep=1;const e=rn();function t(r){this.mode=e.BYTE,typeof r=="string"?this.data=new TextEncoder().encode(r):this.data=new Uint8Array(r)}return t.getBitsLength=function(o){return o*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(r){for(let o=0,n=this.data.length;o<n;o++)r.put(this.data[o],8)},As=t,As}var Ts,rp;function y1(){if(rp)return Ts;rp=1;const e=rn(),t=en();function r(o){this.mode=e.KANJI,this.data=o}return r.getBitsLength=function(n){return n*13},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(o){let n;for(n=0;n<this.data.length;n++){let i=t.toSJIS(this.data[n]);if(i>=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw new Error("Invalid SJIS character: "+this.data[n]+`
3255
+ Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),o.put(i,13)}},Ts=r,Ts}var Ds={exports:{}},np;function _1(){return np||(np=1,(function(e){var t={single_source_shortest_paths:function(r,o,n){var i={},s={};s[o]=0;var d=t.PriorityQueue.make();d.push(o,0);for(var c,u,v,b,w,_,C,P,O;!d.empty();){c=d.pop(),u=c.value,b=c.cost,w=r[u]||{};for(v in w)w.hasOwnProperty(v)&&(_=w[v],C=b+_,P=s[v],O=typeof s[v]>"u",(O||P>C)&&(s[v]=C,d.push(v,C),i[v]=u))}if(typeof n<"u"&&typeof s[n]>"u"){var S=["Could not find a path from ",o," to ",n,"."].join("");throw new Error(S)}return i},extract_shortest_path_from_predecessor_list:function(r,o){for(var n=[],i=o;i;)n.push(i),r[i],i=r[i];return n.reverse(),n},find_path:function(r,o,n){var i=t.single_source_shortest_paths(r,o,n);return t.extract_shortest_path_from_predecessor_list(i,n)},PriorityQueue:{make:function(r){var o=t.PriorityQueue,n={},i;r=r||{};for(i in o)o.hasOwnProperty(i)&&(n[i]=o[i]);return n.queue=[],n.sorter=r.sorter||o.default_sorter,n},default_sorter:function(r,o){return r.cost-o.cost},push:function(r,o){var n={value:r,cost:o};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Ds)),Ds.exports}var op;function w1(){return op||(op=1,(function(e){const t=rn(),r=f1(),o=v1(),n=b1(),i=y1(),s=Vh(),d=en(),c=_1();function u(S){return unescape(encodeURIComponent(S)).length}function v(S,D,L){const I=[];let Q;for(;(Q=S.exec(L))!==null;)I.push({data:Q[0],index:Q.index,mode:D,length:Q[0].length});return I}function b(S){const D=v(s.NUMERIC,t.NUMERIC,S),L=v(s.ALPHANUMERIC,t.ALPHANUMERIC,S);let I,Q;return d.isKanjiModeEnabled()?(I=v(s.BYTE,t.BYTE,S),Q=v(s.KANJI,t.KANJI,S)):(I=v(s.BYTE_KANJI,t.BYTE,S),Q=[]),D.concat(L,I,Q).sort(function(A,T){return A.index-T.index}).map(function(A){return{data:A.data,mode:A.mode,length:A.length}})}function w(S,D){switch(D){case t.NUMERIC:return r.getBitsLength(S);case t.ALPHANUMERIC:return o.getBitsLength(S);case t.KANJI:return i.getBitsLength(S);case t.BYTE:return n.getBitsLength(S)}}function _(S){return S.reduce(function(D,L){const I=D.length-1>=0?D[D.length-1]:null;return I&&I.mode===L.mode?(D[D.length-1].data+=L.data,D):(D.push(L),D)},[])}function C(S){const D=[];for(let L=0;L<S.length;L++){const I=S[L];switch(I.mode){case t.NUMERIC:D.push([I,{data:I.data,mode:t.ALPHANUMERIC,length:I.length},{data:I.data,mode:t.BYTE,length:I.length}]);break;case t.ALPHANUMERIC:D.push([I,{data:I.data,mode:t.BYTE,length:I.length}]);break;case t.KANJI:D.push([I,{data:I.data,mode:t.BYTE,length:u(I.data)}]);break;case t.BYTE:D.push([{data:I.data,mode:t.BYTE,length:u(I.data)}])}}return D}function P(S,D){const L={},I={start:{}};let Q=["start"];for(let R=0;R<S.length;R++){const A=S[R],T=[];for(let x=0;x<A.length;x++){const N=A[x],F=""+R+x;T.push(F),L[F]={node:N,lastCount:0},I[F]={};for(let $=0;$<Q.length;$++){const k=Q[$];L[k]&&L[k].node.mode===N.mode?(I[k][F]=w(L[k].lastCount+N.length,N.mode)-w(L[k].lastCount,N.mode),L[k].lastCount+=N.length):(L[k]&&(L[k].lastCount=N.length),I[k][F]=w(N.length,N.mode)+4+t.getCharCountIndicator(N.mode,D))}}Q=T}for(let R=0;R<Q.length;R++)I[Q[R]].end=0;return{map:I,table:L}}function O(S,D){let L;const I=t.getBestModeForData(S);if(L=t.from(D,I),L!==t.BYTE&&L.bit<I.bit)throw new Error('"'+S+'" cannot be encoded with mode '+t.toString(L)+`.
3256
+ Suggested mode is: `+t.toString(I));switch(L===t.KANJI&&!d.isKanjiModeEnabled()&&(L=t.BYTE),L){case t.NUMERIC:return new r(S);case t.ALPHANUMERIC:return new o(S);case t.KANJI:return new i(S);case t.BYTE:return new n(S)}}e.fromArray=function(D){return D.reduce(function(L,I){return typeof I=="string"?L.push(O(I,null)):I.data&&L.push(O(I.data,I.mode)),L},[])},e.fromString=function(D,L){const I=b(D,d.isKanjiModeEnabled()),Q=C(I),R=P(Q,L),A=c.find_path(R.map,"start","end"),T=[];for(let x=1;x<A.length-1;x++)T.push(R.table[A[x]].node);return e.fromArray(_(T))},e.rawSplit=function(D){return e.fromArray(b(D,d.isKanjiModeEnabled()))}})(Os)),Os}var ip;function $1(){if(ip)return gs;ip=1;const e=en(),t=_l(),r=s1(),o=a1(),n=l1(),i=d1(),s=c1(),d=qh(),c=u1(),u=m1(),v=g1(),b=rn(),w=w1();function _(R,A){const T=R.size,x=i.getPositions(A);for(let N=0;N<x.length;N++){const F=x[N][0],$=x[N][1];for(let k=-1;k<=7;k++)if(!(F+k<=-1||T<=F+k))for(let M=-1;M<=7;M++)$+M<=-1||T<=$+M||(k>=0&&k<=6&&(M===0||M===6)||M>=0&&M<=6&&(k===0||k===6)||k>=2&&k<=4&&M>=2&&M<=4?R.set(F+k,$+M,!0,!0):R.set(F+k,$+M,!1,!0))}}function C(R){const A=R.size;for(let T=8;T<A-8;T++){const x=T%2===0;R.set(T,6,x,!0),R.set(6,T,x,!0)}}function P(R,A){const T=n.getPositions(A);for(let x=0;x<T.length;x++){const N=T[x][0],F=T[x][1];for(let $=-2;$<=2;$++)for(let k=-2;k<=2;k++)$===-2||$===2||k===-2||k===2||$===0&&k===0?R.set(N+$,F+k,!0,!0):R.set(N+$,F+k,!1,!0)}}function O(R,A){const T=R.size,x=u.getEncodedBits(A);let N,F,$;for(let k=0;k<18;k++)N=Math.floor(k/3),F=k%3+T-8-3,$=(x>>k&1)===1,R.set(N,F,$,!0),R.set(F,N,$,!0)}function S(R,A,T){const x=R.size,N=v.getEncodedBits(A,T);let F,$;for(F=0;F<15;F++)$=(N>>F&1)===1,F<6?R.set(F,8,$,!0):F<8?R.set(F+1,8,$,!0):R.set(x-15+F,8,$,!0),F<8?R.set(8,x-F-1,$,!0):F<9?R.set(8,15-F-1+1,$,!0):R.set(8,15-F-1,$,!0);R.set(x-8,8,1,!0)}function D(R,A){const T=R.size;let x=-1,N=T-1,F=7,$=0;for(let k=T-1;k>0;k-=2)for(k===6&&k--;;){for(let M=0;M<2;M++)if(!R.isReserved(N,k-M)){let Xt=!1;$<A.length&&(Xt=(A[$]>>>F&1)===1),R.set(N,k-M,Xt),F--,F===-1&&($++,F=7)}if(N+=x,N<0||T<=N){N-=x,x=-x;break}}}function L(R,A,T){const x=new r;T.forEach(function(M){x.put(M.mode.bit,4),x.put(M.getLength(),b.getCharCountIndicator(M.mode,R)),M.write(x)});const N=e.getSymbolTotalCodewords(R),F=d.getTotalCodewordsCount(R,A),$=(N-F)*8;for(x.getLengthInBits()+4<=$&&x.put(0,4);x.getLengthInBits()%8!==0;)x.putBit(0);const k=($-x.getLengthInBits())/8;for(let M=0;M<k;M++)x.put(M%2?17:236,8);return I(x,R,A)}function I(R,A,T){const x=e.getSymbolTotalCodewords(A),N=d.getTotalCodewordsCount(A,T),F=x-N,$=d.getBlocksCount(A,T),k=x%$,M=$-k,Xt=Math.floor(x/$),me=Math.floor(F/$),jo=me+1,an=Xt-me,xr=new c(an);let ln=0;const It=new Array($),Al=new Array($);let es=0;const iu=new Uint8Array(R.buffer);for(let dn=0;dn<$;dn++){const ns=dn<M?me:jo;It[dn]=iu.slice(ln,ln+ns),Al[dn]=xr.encode(It[dn]),ln+=ns,es=Math.max(es,ns)}const rs=new Uint8Array(x);let Tl=0,qe,ze;for(qe=0;qe<es;qe++)for(ze=0;ze<$;ze++)qe<It[ze].length&&(rs[Tl++]=It[ze][qe]);for(qe=0;qe<an;qe++)for(ze=0;ze<$;ze++)rs[Tl++]=Al[ze][qe];return rs}function Q(R,A,T,x){let N;if(Array.isArray(R))N=w.fromArray(R);else if(typeof R=="string"){let Xt=A;if(!Xt){const me=w.rawSplit(R);Xt=u.getBestVersionForData(me,T)}N=w.fromString(R,Xt||40)}else throw new Error("Invalid data");const F=u.getBestVersionForData(N,T);if(!F)throw new Error("The amount of data is too big to be stored in a QR Code");if(!A)A=F;else if(A<F)throw new Error(`
3267
3257
  The chosen QR Code version cannot contain this amount of data.
3268
3258
  Minimum version required to store current data is: `+F+`.
3269
- `);const $=L(A,T,N),k=e.getSymbolSize(A),M=new o(k);return _(M,A),C(M),P(M,A),S(M,T,0),A>=7&&O(M,A),D(M,$),isNaN(x)&&(x=s.getBestMask(M,S.bind(null,M,T))),s.applyMask(x,M),S(M,T,x),{modules:M,version:A,errorCorrectionLevel:T,maskPattern:x,segments:N}}return gs.create=function(A,T){if(typeof A>"u"||A==="")throw new Error("No input text");let x=t.M,N,F;return typeof T<"u"&&(x=t.from(T.errorCorrectionLevel,t.M),N=u.from(T.version),F=s.from(T.maskPattern),T.toSJISFunc&&e.setToSJISFunction(T.toSJISFunc)),Q(A,N,x,F)},gs}var Ls={},Fs={},sp;function Gh(){return sp||(sp=1,(function(e){function t(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");let o=r.slice().replace("#","").split("");if(o.length<3||o.length===5||o.length>8)throw new Error("Invalid hex color: "+r);(o.length===3||o.length===4)&&(o=Array.prototype.concat.apply([],o.map(function(i){return[i,i]}))),o.length===6&&o.push("F","F");const n=parseInt(o.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+o.slice(0,6).join("")}}e.getOptions=function(o){o||(o={}),o.color||(o.color={});const n=typeof o.margin>"u"||o.margin===null||o.margin<0?4:o.margin,i=o.width&&o.width>=21?o.width:void 0,s=o.scale||4;return{width:i,scale:i?4:s,margin:n,color:{dark:t(o.color.dark||"#000000ff"),light:t(o.color.light||"#ffffffff")},type:o.type,rendererOpts:o.rendererOpts||{}}},e.getScale=function(o,n){return n.width&&n.width>=o+n.margin*2?n.width/(o+n.margin*2):n.scale},e.getImageWidth=function(o,n){const i=e.getScale(o,n);return Math.floor((o+n.margin*2)*i)},e.qrToImageData=function(o,n,i){const s=n.modules.size,d=n.modules.data,c=e.getScale(s,i),u=Math.floor((s+i.margin*2)*c),v=i.margin*c,b=[i.color.light,i.color.dark];for(let w=0;w<u;w++)for(let _=0;_<u;_++){let C=(w*u+_)*4,P=i.color.light;if(w>=v&&_>=v&&w<u-v&&_<u-v){const O=Math.floor((w-v)/c),S=Math.floor((_-v)/c);P=b[d[O*s+S]?1:0]}o[C++]=P.r,o[C++]=P.g,o[C++]=P.b,o[C]=P.a}}})(Fs)),Fs}var ap;function P1(){return ap||(ap=1,(function(e){const t=Gh();function r(n,i,s){n.clearRect(0,0,i.width,i.height),i.style||(i.style={}),i.height=s,i.width=s,i.style.height=s+"px",i.style.width=s+"px"}function o(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(i,s,d){let c=d,u=s;typeof c>"u"&&(!s||!s.getContext)&&(c=s,s=void 0),s||(u=o()),c=t.getOptions(c);const v=t.getImageWidth(i.modules.size,c),b=u.getContext("2d"),w=b.createImageData(v,v);return t.qrToImageData(w.data,i,c),r(b,u,v),b.putImageData(w,0,0),u},e.renderToDataURL=function(i,s,d){let c=d;typeof c>"u"&&(!s||!s.getContext)&&(c=s,s=void 0),c||(c={});const u=e.render(i,s,c),v=c.type||"image/png",b=c.rendererOpts||{};return u.toDataURL(v,b.quality)}})(Ls)),Ls}var ks={},lp;function C1(){if(lp)return ks;lp=1;const e=Gh();function t(n,i){const s=n.a/255,d=i+'="'+n.hex+'"';return s<1?d+" "+i+'-opacity="'+s.toFixed(2).slice(1)+'"':d}function r(n,i,s){let d=n+i;return typeof s<"u"&&(d+=" "+s),d}function o(n,i,s){let d="",c=0,u=!1,v=0;for(let b=0;b<n.length;b++){const w=Math.floor(b%i),_=Math.floor(b/i);!w&&!u&&(u=!0),n[b]?(v++,b>0&&w>0&&n[b-1]||(d+=u?r("M",w+s,.5+_+s):r("m",c,0),c=0,u=!1),w+1<i&&n[b+1]||(d+=r("h",v),v=0)):c++}return d}return ks.render=function(i,s,d){const c=e.getOptions(s),u=i.modules.size,v=i.modules.data,b=u+c.margin*2,w=c.color.light.a?"<path "+t(c.color.light,"fill")+' d="M0 0h'+b+"v"+b+'H0z"/>':"",_="<path "+t(c.color.dark,"stroke")+' d="'+o(v,u,c.margin)+'"/>',C='viewBox="0 0 '+b+" "+b+'"',O='<svg xmlns="http://www.w3.org/2000/svg" '+(c.width?'width="'+c.width+'" height="'+c.width+'" ':"")+C+' shape-rendering="crispEdges">'+w+_+`</svg>
3259
+ `);const $=L(A,T,N),k=e.getSymbolSize(A),M=new o(k);return _(M,A),C(M),P(M,A),S(M,T,0),A>=7&&O(M,A),D(M,$),isNaN(x)&&(x=s.getBestMask(M,S.bind(null,M,T))),s.applyMask(x,M),S(M,T,x),{modules:M,version:A,errorCorrectionLevel:T,maskPattern:x,segments:N}}return gs.create=function(A,T){if(typeof A>"u"||A==="")throw new Error("No input text");let x=t.M,N,F;return typeof T<"u"&&(x=t.from(T.errorCorrectionLevel,t.M),N=u.from(T.version),F=s.from(T.maskPattern),T.toSJISFunc&&e.setToSJISFunction(T.toSJISFunc)),Q(A,N,x,F)},gs}var Ls={},Fs={},sp;function Hh(){return sp||(sp=1,(function(e){function t(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");let o=r.slice().replace("#","").split("");if(o.length<3||o.length===5||o.length>8)throw new Error("Invalid hex color: "+r);(o.length===3||o.length===4)&&(o=Array.prototype.concat.apply([],o.map(function(i){return[i,i]}))),o.length===6&&o.push("F","F");const n=parseInt(o.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+o.slice(0,6).join("")}}e.getOptions=function(o){o||(o={}),o.color||(o.color={});const n=typeof o.margin>"u"||o.margin===null||o.margin<0?4:o.margin,i=o.width&&o.width>=21?o.width:void 0,s=o.scale||4;return{width:i,scale:i?4:s,margin:n,color:{dark:t(o.color.dark||"#000000ff"),light:t(o.color.light||"#ffffffff")},type:o.type,rendererOpts:o.rendererOpts||{}}},e.getScale=function(o,n){return n.width&&n.width>=o+n.margin*2?n.width/(o+n.margin*2):n.scale},e.getImageWidth=function(o,n){const i=e.getScale(o,n);return Math.floor((o+n.margin*2)*i)},e.qrToImageData=function(o,n,i){const s=n.modules.size,d=n.modules.data,c=e.getScale(s,i),u=Math.floor((s+i.margin*2)*c),v=i.margin*c,b=[i.color.light,i.color.dark];for(let w=0;w<u;w++)for(let _=0;_<u;_++){let C=(w*u+_)*4,P=i.color.light;if(w>=v&&_>=v&&w<u-v&&_<u-v){const O=Math.floor((w-v)/c),S=Math.floor((_-v)/c);P=b[d[O*s+S]?1:0]}o[C++]=P.r,o[C++]=P.g,o[C++]=P.b,o[C]=P.a}}})(Fs)),Fs}var ap;function P1(){return ap||(ap=1,(function(e){const t=Hh();function r(n,i,s){n.clearRect(0,0,i.width,i.height),i.style||(i.style={}),i.height=s,i.width=s,i.style.height=s+"px",i.style.width=s+"px"}function o(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(i,s,d){let c=d,u=s;typeof c>"u"&&(!s||!s.getContext)&&(c=s,s=void 0),s||(u=o()),c=t.getOptions(c);const v=t.getImageWidth(i.modules.size,c),b=u.getContext("2d"),w=b.createImageData(v,v);return t.qrToImageData(w.data,i,c),r(b,u,v),b.putImageData(w,0,0),u},e.renderToDataURL=function(i,s,d){let c=d;typeof c>"u"&&(!s||!s.getContext)&&(c=s,s=void 0),c||(c={});const u=e.render(i,s,c),v=c.type||"image/png",b=c.rendererOpts||{};return u.toDataURL(v,b.quality)}})(Ls)),Ls}var ks={},lp;function C1(){if(lp)return ks;lp=1;const e=Hh();function t(n,i){const s=n.a/255,d=i+'="'+n.hex+'"';return s<1?d+" "+i+'-opacity="'+s.toFixed(2).slice(1)+'"':d}function r(n,i,s){let d=n+i;return typeof s<"u"&&(d+=" "+s),d}function o(n,i,s){let d="",c=0,u=!1,v=0;for(let b=0;b<n.length;b++){const w=Math.floor(b%i),_=Math.floor(b/i);!w&&!u&&(u=!0),n[b]?(v++,b>0&&w>0&&n[b-1]||(d+=u?r("M",w+s,.5+_+s):r("m",c,0),c=0,u=!1),w+1<i&&n[b+1]||(d+=r("h",v),v=0)):c++}return d}return ks.render=function(i,s,d){const c=e.getOptions(s),u=i.modules.size,v=i.modules.data,b=u+c.margin*2,w=c.color.light.a?"<path "+t(c.color.light,"fill")+' d="M0 0h'+b+"v"+b+'H0z"/>':"",_="<path "+t(c.color.dark,"stroke")+' d="'+o(v,u,c.margin)+'"/>',C='viewBox="0 0 '+b+" "+b+'"',O='<svg xmlns="http://www.w3.org/2000/svg" '+(c.width?'width="'+c.width+'" height="'+c.width+'" ':"")+C+' shape-rendering="crispEdges">'+w+_+`</svg>
3270
3260
  `;return typeof d=="function"&&d(null,O),O},ks}var dp;function E1(){if(dp)return vn;dp=1;const e=i1(),t=$1(),r=P1(),o=C1();function n(i,s,d,c,u){const v=[].slice.call(arguments,1),b=v.length,w=typeof v[b-1]=="function";if(!w&&!e())throw new Error("Callback required as last argument");if(w){if(b<2)throw new Error("Too few arguments provided");b===2?(u=d,d=s,s=c=void 0):b===3&&(s.getContext&&typeof u>"u"?(u=c,c=void 0):(u=c,c=d,d=s,s=void 0))}else{if(b<1)throw new Error("Too few arguments provided");return b===1?(d=s,s=c=void 0):b===2&&!s.getContext&&(c=d,d=s,s=void 0),new Promise(function(_,C){try{const P=t.create(d,c);_(i(P,s,c))}catch(P){C(P)}})}try{const _=t.create(d,c);u(null,i(_,s,c))}catch(_){u(_)}}return vn.create=t.create,vn.toCanvas=n.bind(null,r.render),vn.toDataURL=n.bind(null,r.renderToDataURL),vn.toString=n.bind(null,function(i,s,d){return o.render(i,d)}),vn}var S1=E1();const x1=o1(S1),Vo={url:"",timeout:10,reappearButtonText:"Show QR Code",errorCorrection:"M"};var O1=Object.defineProperty,R1=Object.getOwnPropertyDescriptor,er=(e,t,r,o)=>{for(var n=o>1?void 0:o?R1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&O1(t,r,n),n};exports.PontQrCode=class extends f{constructor(){super(...arguments),this.seed=_t(),this.url=Vo.url,this.timeout=Vo.timeout,this.reappearButtonText=Vo.reappearButtonText,this.disabled=!1,this.errorCorrection=Vo.errorCorrection,this._obscured=!1,this._canvasElement=null,this._handleReappear=()=>{this.disabled||(this._obscured=!1,this._clearTimer(),this._startTimer(),this.emit("pont-qr:reappear",{id:this.rootId,url:this.url}))}}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontQrCode.TAG}-${this.seed}`}get canvasId(){return`${this.rootId}-${exports.PontQrCode.QR_CANVAS}`}get overlayId(){return`${this.rootId}-${exports.PontQrCode.OVERLAY}`}get reappearButtonId(){return`${this.rootId}-${exports.PontQrCode.REAPPEAR_BUTTON}`}connectedCallback(){super.connectedCallback(),this._startTimer()}disconnectedCallback(){super.disconnectedCallback(),this._clearTimer()}firstUpdated(){const t=this.querySelector(`#${this.canvasId}`);t&&(this._canvasElement=t,this._renderQR())}updated(t){(t.has("url")||t.has("errorCorrection"))&&(this._renderQR(),this._obscured=!1,this._clearTimer(),this._startTimer()),t.has("timeout")&&(this._clearTimer(),this._startTimer())}_startTimer(){this.timeout<=0||(this._clearTimer(),this._timer=window.setTimeout(()=>{this._obscured=!0,this._timer=void 0,this.emit("pont-qr:obscured",{id:this.rootId,url:this.url})},this.timeout*1e3))}_clearTimer(){this._timer&&(clearTimeout(this._timer),this._timer=void 0)}_renderQR(){if(!this._canvasElement||!this.url)return;const t=getComputedStyle(this),r=parseInt(t.getPropertyValue("--pont-qr-code-canvas-render-width"))||200,o=parseInt(t.getPropertyValue("--pont-qr-code-canvas-render-height"))||200;this._canvasElement.width=r,this._canvasElement.height=o;const n={errorCorrectionLevel:this.errorCorrection};x1.toCanvas(this._canvasElement,this.url,n,i=>{i&&(console.warn("QR generation failed:",i),this.emit("pont-qr:error",{error:i,url:this.url}))})}emit(t,r){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}render(){const t=this._obscured&&!this.disabled;return l`
3271
3261
  <div
3272
3262
  part=${exports.PontQrCode.PARTS.root}
@@ -3300,7 +3290,7 @@ Minimum version required to store current data is: `+F+`.
3300
3290
  `:h}
3301
3291
  </div>
3302
3292
  </div>
3303
- `}_getReappearButtonVariant(){return getComputedStyle(this).getPropertyValue("--pont-qr-code-reappear-button-variant").trim()||"primary"}};exports.PontQrCode.ROOT="qr-code";exports.PontQrCode.QR_CANVAS="canvas";exports.PontQrCode.OVERLAY="overlay";exports.PontQrCode.REAPPEAR_BUTTON="reappear-button";exports.PontQrCode.TAG=`${rt}-${exports.PontQrCode.ROOT}`;exports.PontQrCode.PARTS={root:exports.PontQrCode.ROOT,canvas:`${exports.PontQrCode.ROOT}-${exports.PontQrCode.QR_CANVAS}`,overlay:`${exports.PontQrCode.ROOT}-${exports.PontQrCode.OVERLAY}`,reappearButton:`${exports.PontQrCode.ROOT}-${exports.PontQrCode.REAPPEAR_BUTTON}`};er([a({type:String})],exports.PontQrCode.prototype,"seed",2);er([a({type:String,attribute:"custom-id"})],exports.PontQrCode.prototype,"customId",2);er([a({type:String})],exports.PontQrCode.prototype,"url",2);er([a({type:Number})],exports.PontQrCode.prototype,"timeout",2);er([a({type:String,attribute:"reappear-button-text"})],exports.PontQrCode.prototype,"reappearButtonText",2);er([a({type:Boolean})],exports.PontQrCode.prototype,"disabled",2);er([a({type:String,attribute:"error-correction"})],exports.PontQrCode.prototype,"errorCorrection",2);er([g()],exports.PontQrCode.prototype,"_obscured",2);exports.PontQrCode=er([p("pont-qr-code")],exports.PontQrCode);const ro={title:"Can't scan?",secret:"",issuer:"",account:"",secretLabel:"Manual secret"};var I1=Object.defineProperty,A1=Object.getOwnPropertyDescriptor,Cr=(e,t,r,o)=>{for(var n=o>1?void 0:o?A1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&I1(t,r,n),n};exports.PontSecret=class extends jt{constructor(){super(...arguments),this.title=ro.title,this.secret=ro.secret,this.issuer=ro.issuer,this.account=ro.account,this.secretLabel=ro.secretLabel,this.disabled=!1,this._copied=!1,this._handleCopy=async()=>{if(!(!this.secret||this.disabled))try{await navigator.clipboard.writeText(this.secret),this.emit("pont-secret:copied",{secret:this.secret}),this._copied=!0,this._copyTimeout&&clearTimeout(this._copyTimeout),this._copyTimeout=window.setTimeout(()=>{this._copied=!1,this._copyTimeout=void 0},2e3)}catch(t){console.warn("Failed to copy secret:",t),this.emit("pont-secret:copy-error",{error:t})}}}createRenderRoot(){return this}emit(t,r){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}render(){return l`
3293
+ `}_getReappearButtonVariant(){return getComputedStyle(this).getPropertyValue("--pont-qr-code-reappear-button-variant").trim()||"primary"}};exports.PontQrCode.ROOT="qr-code";exports.PontQrCode.QR_CANVAS="canvas";exports.PontQrCode.OVERLAY="overlay";exports.PontQrCode.REAPPEAR_BUTTON="reappear-button";exports.PontQrCode.TAG=`${rt}-${exports.PontQrCode.ROOT}`;exports.PontQrCode.PARTS={root:exports.PontQrCode.ROOT,canvas:`${exports.PontQrCode.ROOT}-${exports.PontQrCode.QR_CANVAS}`,overlay:`${exports.PontQrCode.ROOT}-${exports.PontQrCode.OVERLAY}`,reappearButton:`${exports.PontQrCode.ROOT}-${exports.PontQrCode.REAPPEAR_BUTTON}`};er([a({type:String})],exports.PontQrCode.prototype,"seed",2);er([a({type:String,attribute:"custom-id"})],exports.PontQrCode.prototype,"customId",2);er([a({type:String})],exports.PontQrCode.prototype,"url",2);er([a({type:Number})],exports.PontQrCode.prototype,"timeout",2);er([a({type:String,attribute:"reappear-button-text"})],exports.PontQrCode.prototype,"reappearButtonText",2);er([a({type:Boolean})],exports.PontQrCode.prototype,"disabled",2);er([a({type:String,attribute:"error-correction"})],exports.PontQrCode.prototype,"errorCorrection",2);er([g()],exports.PontQrCode.prototype,"_obscured",2);exports.PontQrCode=er([p("pont-qr-code")],exports.PontQrCode);const ro={title:"Can't scan?",secret:"",issuer:"",account:"",secretLabel:"Manual secret"};var I1=Object.defineProperty,A1=Object.getOwnPropertyDescriptor,Cr=(e,t,r,o)=>{for(var n=o>1?void 0:o?A1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&I1(t,r,n),n};exports.PontSecret=class extends Ut{constructor(){super(...arguments),this.title=ro.title,this.secret=ro.secret,this.issuer=ro.issuer,this.account=ro.account,this.secretLabel=ro.secretLabel,this.disabled=!1,this._copied=!1,this._handleCopy=async()=>{if(!(!this.secret||this.disabled))try{await navigator.clipboard.writeText(this.secret),this.emit("pont-secret:copied",{secret:this.secret}),this._copied=!0,this._copyTimeout&&clearTimeout(this._copyTimeout),this._copyTimeout=window.setTimeout(()=>{this._copied=!1,this._copyTimeout=void 0},2e3)}catch(t){console.warn("Failed to copy secret:",t),this.emit("pont-secret:copy-error",{error:t})}}}createRenderRoot(){return this}emit(t,r){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}render(){return l`
3304
3294
  <div part=${exports.PontSecret.PARTS.root} class="pont-secret-root">
3305
3295
  <div part=${exports.PontSecret.PARTS.card} class="pont-secret-card">
3306
3296
  <div part=${exports.PontSecret.PARTS.title} class="pont-secret-title">
@@ -3356,7 +3346,7 @@ Minimum version required to store current data is: `+F+`.
3356
3346
  </div>
3357
3347
  </div>
3358
3348
  </div>
3359
- `}};exports.PontSecret.ROOT="secret";exports.PontSecret.CARD="card";exports.PontSecret.TITLE="title";exports.PontSecret.INPUT_GROUP="input-group";exports.PontSecret.COPY_BUTTON="copy-button";exports.PontSecret.METADATA="metadata";exports.PontSecret.ISSUER="issuer";exports.PontSecret.ACCOUNT="account";exports.PontSecret.TOOLTIP="tooltip";exports.PontSecret.TAG=`${rt}-${exports.PontSecret.ROOT}`;exports.PontSecret.PARTS={root:exports.PontSecret.ROOT,card:`${exports.PontSecret.ROOT}-${exports.PontSecret.CARD}`,title:`${exports.PontSecret.ROOT}-${exports.PontSecret.TITLE}`,inputGroup:`${exports.PontSecret.ROOT}-${exports.PontSecret.INPUT_GROUP}`,copyButton:`${exports.PontSecret.ROOT}-${exports.PontSecret.COPY_BUTTON}`,metadata:`${exports.PontSecret.ROOT}-${exports.PontSecret.METADATA}`,issuer:`${exports.PontSecret.ROOT}-${exports.PontSecret.ISSUER}`,account:`${exports.PontSecret.ROOT}-${exports.PontSecret.ACCOUNT}`,tooltip:`${exports.PontSecret.ROOT}-${exports.PontSecret.TOOLTIP}`};Cr([a({type:String})],exports.PontSecret.prototype,"title",2);Cr([a({type:String})],exports.PontSecret.prototype,"secret",2);Cr([a({type:String})],exports.PontSecret.prototype,"issuer",2);Cr([a({type:String})],exports.PontSecret.prototype,"account",2);Cr([a({type:String,attribute:"secret-label"})],exports.PontSecret.prototype,"secretLabel",2);Cr([a({type:Boolean})],exports.PontSecret.prototype,"disabled",2);Cr([g()],exports.PontSecret.prototype,"_copied",2);exports.PontSecret=Cr([p("pont-secret")],exports.PontSecret);const Ns={title:"Recovery codes",subtitle:"Use these codes if you lose access to your authenticator app.",codes:[]};var T1=Object.defineProperty,D1=Object.getOwnPropertyDescriptor,Kn=(e,t,r,o)=>{for(var n=o>1?void 0:o?D1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&T1(t,r,n),n};exports.PontRecoveryCodes=class extends jt{constructor(){super(...arguments),this.title=Ns.title,this.subtitle=Ns.subtitle,this.codes=Ns.codes,this.disabled=!1,this._copied=!1,this._handleCopyAll=async()=>{if(!this.codes.length||this.disabled)return;const t=this.codes.join(`
3349
+ `}};exports.PontSecret.ROOT="secret";exports.PontSecret.CARD="card";exports.PontSecret.TITLE="title";exports.PontSecret.INPUT_GROUP="input-group";exports.PontSecret.COPY_BUTTON="copy-button";exports.PontSecret.METADATA="metadata";exports.PontSecret.ISSUER="issuer";exports.PontSecret.ACCOUNT="account";exports.PontSecret.TOOLTIP="tooltip";exports.PontSecret.TAG=`${rt}-${exports.PontSecret.ROOT}`;exports.PontSecret.PARTS={root:exports.PontSecret.ROOT,card:`${exports.PontSecret.ROOT}-${exports.PontSecret.CARD}`,title:`${exports.PontSecret.ROOT}-${exports.PontSecret.TITLE}`,inputGroup:`${exports.PontSecret.ROOT}-${exports.PontSecret.INPUT_GROUP}`,copyButton:`${exports.PontSecret.ROOT}-${exports.PontSecret.COPY_BUTTON}`,metadata:`${exports.PontSecret.ROOT}-${exports.PontSecret.METADATA}`,issuer:`${exports.PontSecret.ROOT}-${exports.PontSecret.ISSUER}`,account:`${exports.PontSecret.ROOT}-${exports.PontSecret.ACCOUNT}`,tooltip:`${exports.PontSecret.ROOT}-${exports.PontSecret.TOOLTIP}`};Cr([a({type:String})],exports.PontSecret.prototype,"title",2);Cr([a({type:String})],exports.PontSecret.prototype,"secret",2);Cr([a({type:String})],exports.PontSecret.prototype,"issuer",2);Cr([a({type:String})],exports.PontSecret.prototype,"account",2);Cr([a({type:String,attribute:"secret-label"})],exports.PontSecret.prototype,"secretLabel",2);Cr([a({type:Boolean})],exports.PontSecret.prototype,"disabled",2);Cr([g()],exports.PontSecret.prototype,"_copied",2);exports.PontSecret=Cr([p("pont-secret")],exports.PontSecret);const Ns={title:"Recovery codes",subtitle:"Use these codes if you lose access to your authenticator app.",codes:[]};var T1=Object.defineProperty,D1=Object.getOwnPropertyDescriptor,Kn=(e,t,r,o)=>{for(var n=o>1?void 0:o?D1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&T1(t,r,n),n};exports.PontRecoveryCodes=class extends Ut{constructor(){super(...arguments),this.title=Ns.title,this.subtitle=Ns.subtitle,this.codes=Ns.codes,this.disabled=!1,this._copied=!1,this._handleCopyAll=async()=>{if(!this.codes.length||this.disabled)return;const t=this.codes.join(`
3360
3350
  `);try{await navigator.clipboard.writeText(t),this.emit("pont-recovery-codes:copied",{codes:this.codes}),this._copied=!0,this._copyTimeout&&clearTimeout(this._copyTimeout),this._copyTimeout=window.setTimeout(()=>{this._copied=!1,this._copyTimeout=void 0},2e3)}catch(r){console.warn("Failed to copy codes:",r),this.emit("pont-recovery-codes:copy-error",{error:r})}},this._handleDownload=()=>{if(!this.codes.length||this.disabled)return;const t=this.codes.join(`
3361
3351
  `),r=new Blob([t],{type:"text/plain"}),o=URL.createObjectURL(r),n=document.createElement("a");n.href=o,n.download="recovery-codes.txt",document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(o),this.emit("pont-recovery-codes:downloaded",{codes:this.codes})}}createRenderRoot(){return this}emit(t,r){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}render(){const t=this.codes&&this.codes.length>0;return l`
3362
3352
  <div part=${exports.PontRecoveryCodes.PARTS.root} class="pont-recovery-codes-root">
@@ -3489,11 +3479,11 @@ Minimum version required to store current data is: `+F+`.
3489
3479
  </pont-callout-description>
3490
3480
  `:h}
3491
3481
  </pont-callout>
3492
- `}};exports.PontAlert.ROOT="alert";exports.PontAlert.ICON="icon";exports.PontAlert.TITLE="title";exports.PontAlert.DESCRIPTION="description";exports.PontAlert.TAG=`${rt}-${exports.PontAlert.ROOT}`;exports.PontAlert.PARTS={root:exports.PontAlert.ROOT,icon:`${exports.PontAlert.ROOT}-${exports.PontAlert.ICON}`,title:`${exports.PontAlert.ROOT}-${exports.PontAlert.TITLE}`,description:`${exports.PontAlert.ROOT}-${exports.PontAlert.DESCRIPTION}`};rr([a({type:String})],exports.PontAlert.prototype,"seed",2);rr([a({type:String,attribute:"custom-id"})],exports.PontAlert.prototype,"customId",2);rr([a({type:String})],exports.PontAlert.prototype,"status",2);rr([a({type:String})],exports.PontAlert.prototype,"palette",2);rr([a({type:String})],exports.PontAlert.prototype,"variant",2);rr([a({type:String})],exports.PontAlert.prototype,"title",1);rr([a({type:String})],exports.PontAlert.prototype,"description",2);rr([a({type:Boolean})],exports.PontAlert.prototype,"icon",2);exports.PontAlert=rr([p("pont-alert")],exports.PontAlert);var N1=Object.defineProperty,M1=Object.getOwnPropertyDescriptor,Wn=(e,t,r,o)=>{for(var n=o>1?void 0:o?M1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&N1(t,r,n),n};exports.PontCountdown=class extends jt{constructor(){super(...arguments),this.content="",this.duration=5,this.redirectUrl="/",this.id="",this.seconds=0,this.timerId=null}get _containerElement(){return this.querySelector(`div[part=${this.id?this.id:"countdown"}]`)}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.initializeCountdown()}disconnectedCallback(){this.clearTimer(),super.disconnectedCallback()}initializeCountdown(){this.seconds=Math.max(0,this.duration||0),this.startTimer()}startTimer(){this.clearTimer(),this.timerId=window.setInterval(()=>{this.seconds<=1?this.completeCountdown():this.seconds--},1e3)}completeCountdown(){this.clearTimer(),window.location.href=this.redirectUrl||"/"}clearTimer(){this.timerId!==null&&(clearInterval(this.timerId),this.timerId=null)}renderContent(){return`${this.content} ${this.seconds}s...`}render(){return l`
3482
+ `}};exports.PontAlert.ROOT="alert";exports.PontAlert.ICON="icon";exports.PontAlert.TITLE="title";exports.PontAlert.DESCRIPTION="description";exports.PontAlert.TAG=`${rt}-${exports.PontAlert.ROOT}`;exports.PontAlert.PARTS={root:exports.PontAlert.ROOT,icon:`${exports.PontAlert.ROOT}-${exports.PontAlert.ICON}`,title:`${exports.PontAlert.ROOT}-${exports.PontAlert.TITLE}`,description:`${exports.PontAlert.ROOT}-${exports.PontAlert.DESCRIPTION}`};rr([a({type:String})],exports.PontAlert.prototype,"seed",2);rr([a({type:String,attribute:"custom-id"})],exports.PontAlert.prototype,"customId",2);rr([a({type:String})],exports.PontAlert.prototype,"status",2);rr([a({type:String})],exports.PontAlert.prototype,"palette",2);rr([a({type:String})],exports.PontAlert.prototype,"variant",2);rr([a({type:String})],exports.PontAlert.prototype,"title",1);rr([a({type:String})],exports.PontAlert.prototype,"description",2);rr([a({type:Boolean})],exports.PontAlert.prototype,"icon",2);exports.PontAlert=rr([p("pont-alert")],exports.PontAlert);var N1=Object.defineProperty,M1=Object.getOwnPropertyDescriptor,Wn=(e,t,r,o)=>{for(var n=o>1?void 0:o?M1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&N1(t,r,n),n};exports.PontCountdown=class extends Ut{constructor(){super(...arguments),this.content="",this.duration=5,this.redirectUrl="/",this.id="",this.seconds=0,this.timerId=null}get _containerElement(){return this.querySelector(`div[part=${this.id?this.id:"countdown"}]`)}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.initializeCountdown()}disconnectedCallback(){this.clearTimer(),super.disconnectedCallback()}initializeCountdown(){this.seconds=Math.max(0,this.duration||0),this.startTimer()}startTimer(){this.clearTimer(),this.timerId=window.setInterval(()=>{this.seconds<=1?this.completeCountdown():this.seconds--},1e3)}completeCountdown(){this.clearTimer(),window.location.href=this.redirectUrl||"/"}clearTimer(){this.timerId!==null&&(clearInterval(this.timerId),this.timerId=null)}renderContent(){return`${this.content} ${this.seconds}s...`}render(){return l`
3493
3483
  <div part=${this.id?this.id:"countdown"}>
3494
3484
  <pont-typography-p>${this.renderContent()}</pont-typography-p>
3495
3485
  </div>
3496
- `}};Wn([a()],exports.PontCountdown.prototype,"content",2);Wn([a({type:Number})],exports.PontCountdown.prototype,"duration",2);Wn([a({attribute:"redirect-url"})],exports.PontCountdown.prototype,"redirectUrl",2);Wn([a()],exports.PontCountdown.prototype,"id",2);Wn([g()],exports.PontCountdown.prototype,"seconds",2);exports.PontCountdown=Wn([p("pont-countdown")],exports.PontCountdown);var B1=Object.defineProperty,U1=Object.getOwnPropertyDescriptor,Vi=(e,t,r,o)=>{for(var n=o>1?void 0:o?U1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&B1(t,r,n),n};exports.PontBlock=class extends jt{constructor(){super(...arguments),this.id="",this.align="center",this.justify="start",this.branding=new dP(this)}createRenderRoot(){return this}async firstUpdated(){await this.updateComplete;const t=this.querySelector("pont-card-content");t!=null&&t.updateComplete&&await t.updateComplete;const r=t==null?void 0:t.querySelector('div[data-slot="card-content"]');r&&this.moveLightDomChildrenInto(r),await Ia()}async updated(){await this.updateComplete,await Ia()}_renderWatermark(){return l`
3486
+ `}};Wn([a()],exports.PontCountdown.prototype,"content",2);Wn([a({type:Number})],exports.PontCountdown.prototype,"duration",2);Wn([a({attribute:"redirect-url"})],exports.PontCountdown.prototype,"redirectUrl",2);Wn([a()],exports.PontCountdown.prototype,"id",2);Wn([g()],exports.PontCountdown.prototype,"seconds",2);exports.PontCountdown=Wn([p("pont-countdown")],exports.PontCountdown);var B1=Object.defineProperty,U1=Object.getOwnPropertyDescriptor,Vi=(e,t,r,o)=>{for(var n=o>1?void 0:o?U1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&B1(t,r,n),n};exports.PontBlock=class extends Ut{constructor(){super(...arguments),this.id="",this.align="center",this.justify="start",this.branding=new dP(this)}createRenderRoot(){return this}async firstUpdated(){await this.updateComplete;const t=this.querySelector("pont-card-content");t!=null&&t.updateComplete&&await t.updateComplete;const r=t==null?void 0:t.querySelector('div[data-slot="card-content"]');r&&this.moveLightDomChildrenInto(r),await Ia()}async updated(){await this.updateComplete,await Ia()}_renderWatermark(){return l`
3497
3487
  <pont-card-footer border>
3498
3488
  <pont-watermark variant="muted"></pont-watermark>
3499
3489
  </pont-card-footer>
@@ -3506,7 +3496,7 @@ Minimum version required to store current data is: `+F+`.
3506
3496
  <pont-card-content></pont-card-content>
3507
3497
  ${this.branding.showWatermark?this._renderWatermark():h}
3508
3498
  </pont-card>
3509
- `}};Vi([a()],exports.PontBlock.prototype,"id",2);Vi([a()],exports.PontBlock.prototype,"align",2);Vi([a()],exports.PontBlock.prototype,"justify",2);exports.PontBlock=Vi([p("pont-block")],exports.PontBlock);var j1=Object.defineProperty,q1=Object.getOwnPropertyDescriptor,wl=(e,t,r,o)=>{for(var n=o>1?void 0:o?q1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&j1(t,r,n),n};const z1="data-pont-design",V1="data-pont-design-empty",H1="data-pont-container";exports.PontContainer=class extends jt{constructor(){super(...arguments),this.id="",this.type="flex_column",this.design=new Fo(this)}createRenderRoot(){return this}get innerElement(){return this.querySelector(`:scope > [${H1}]`)}async firstUpdated(){await this.updateComplete;const t=this.innerElement;t&&this.moveLightDomChildrenInto(t),this.syncDesignState()}async updated(){await this.updateComplete,await Ia(),this.syncDesignState()}syncDesignState(){var r;const t=this.design.active;this.toggleAttribute(z1,t),this.toggleAttribute(V1,t&&(((r=this.innerElement)==null?void 0:r.childElementCount)??0)===0)}render(){return l`<div
3499
+ `}};Vi([a()],exports.PontBlock.prototype,"id",2);Vi([a()],exports.PontBlock.prototype,"align",2);Vi([a()],exports.PontBlock.prototype,"justify",2);exports.PontBlock=Vi([p("pont-block")],exports.PontBlock);var j1=Object.defineProperty,q1=Object.getOwnPropertyDescriptor,wl=(e,t,r,o)=>{for(var n=o>1?void 0:o?q1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&j1(t,r,n),n};const z1="data-pont-design",V1="data-pont-design-empty",H1="data-pont-container";exports.PontContainer=class extends Ut{constructor(){super(...arguments),this.id="",this.type="flex_column",this.design=new Fo(this)}createRenderRoot(){return this}get innerElement(){return this.querySelector(`:scope > [${H1}]`)}async firstUpdated(){await this.updateComplete;const t=this.innerElement;t&&this.moveLightDomChildrenInto(t),this.syncDesignState()}async updated(){await this.updateComplete,await Ia(),this.syncDesignState()}syncDesignState(){var r;const t=this.design.active;this.toggleAttribute(z1,t),this.toggleAttribute(V1,t&&(((r=this.innerElement)==null?void 0:r.childElementCount)??0)===0)}render(){return l`<div
3510
3500
  data-pont-container
3511
3501
  part=${this.id?this.id:"container"}
3512
3502
  data-type="${this.type}"
@@ -3514,22 +3504,22 @@ Minimum version required to store current data is: `+F+`.
3514
3504
  <pont-field-separator id="${this.rootId}" part="${exports.PontDivider.PARTS.root}">
3515
3505
  ${this.label??h}
3516
3506
  </pont-field-separator>
3517
- `}};exports.PontDivider.ROOT="divider";exports.PontDivider.TAG=`${rt}-${exports.PontDivider.ROOT}`;exports.PontDivider.PARTS={root:exports.PontDivider.ROOT};Hi([a({type:String})],exports.PontDivider.prototype,"seed",2);Hi([a({type:String,attribute:"custom-id"})],exports.PontDivider.prototype,"customId",2);Hi([a({type:String})],exports.PontDivider.prototype,"label",2);exports.PontDivider=Hi([p("pont-divider")],exports.PontDivider);var W1=Object.defineProperty,Y1=Object.getOwnPropertyDescriptor,Gi=(e,t,r,o)=>{for(var n=o>1?void 0:o?Y1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&W1(t,r,n),n};exports.PontGap=class extends jt{constructor(){super(...arguments),this.size="8px",this.type="vertical",this.id=""}createRenderRoot(){return this}render(){let t={width:"0px",height:"0px"};return this.type==="vertical"?t={width:"1px",height:this.size}:t={height:"1px",width:this.size},l`
3507
+ `}};exports.PontDivider.ROOT="divider";exports.PontDivider.TAG=`${rt}-${exports.PontDivider.ROOT}`;exports.PontDivider.PARTS={root:exports.PontDivider.ROOT};Hi([a({type:String})],exports.PontDivider.prototype,"seed",2);Hi([a({type:String,attribute:"custom-id"})],exports.PontDivider.prototype,"customId",2);Hi([a({type:String})],exports.PontDivider.prototype,"label",2);exports.PontDivider=Hi([p("pont-divider")],exports.PontDivider);var W1=Object.defineProperty,Y1=Object.getOwnPropertyDescriptor,Gi=(e,t,r,o)=>{for(var n=o>1?void 0:o?Y1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&W1(t,r,n),n};exports.PontGap=class extends Ut{constructor(){super(...arguments),this.size="8px",this.type="vertical",this.id=""}createRenderRoot(){return this}render(){let t={width:"0px",height:"0px"};return this.type==="vertical"?t={width:"1px",height:this.size}:t={height:"1px",width:this.size},l`
3518
3508
  <div
3519
3509
  part=${this.id?this.id:"gap"}
3520
3510
  style=${cP({...t})}
3521
3511
  ></div>
3522
- `}};Gi([a()],exports.PontGap.prototype,"size",2);Gi([a()],exports.PontGap.prototype,"type",2);Gi([a()],exports.PontGap.prototype,"id",2);exports.PontGap=Gi([p("pont-gap")],exports.PontGap);var Q1=Object.defineProperty,Z1=Object.getOwnPropertyDescriptor,$l=(e,t,r,o)=>{for(var n=o>1?void 0:o?Z1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&Q1(t,r,n),n};const J1="data-pont-header";exports.PontHeader=class extends jt{constructor(){super(...arguments),this.id="",this.align="center"}get innerElement(){return this.querySelector(`:scope > [${J1}]`)}createRenderRoot(){return this}firstUpdated(){const t=this.innerElement;t&&this.moveLightDomChildrenInto(t)}render(){return l`
3512
+ `}};Gi([a()],exports.PontGap.prototype,"size",2);Gi([a()],exports.PontGap.prototype,"type",2);Gi([a()],exports.PontGap.prototype,"id",2);exports.PontGap=Gi([p("pont-gap")],exports.PontGap);var Q1=Object.defineProperty,Z1=Object.getOwnPropertyDescriptor,$l=(e,t,r,o)=>{for(var n=o>1?void 0:o?Z1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&Q1(t,r,n),n};const J1="data-pont-header";exports.PontHeader=class extends Ut{constructor(){super(...arguments),this.id="",this.align="center"}get innerElement(){return this.querySelector(`:scope > [${J1}]`)}createRenderRoot(){return this}firstUpdated(){const t=this.innerElement;t&&this.moveLightDomChildrenInto(t)}render(){return l`
3523
3513
  <div
3524
3514
  data-pont-header
3525
3515
  part=${this.id?this.id:"header"}
3526
3516
  data-align=${this.align}
3527
3517
  ></div>
3528
- `}};$l([a()],exports.PontHeader.prototype,"id",2);$l([a()],exports.PontHeader.prototype,"align",2);exports.PontHeader=$l([p("pont-header")],exports.PontHeader);var X1=Object.defineProperty,t0=Object.getOwnPropertyDescriptor,Pl=(e,t,r,o)=>{for(var n=o>1?void 0:o?t0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&X1(t,r,n),n};exports.PontSubtitle=class extends jt{get _containerElement(){return this.querySelector(`pont-typography-p[part=${this.id?this.id:"subtitle"}]`)}createRenderRoot(){return this}render(){return l`
3518
+ `}};$l([a()],exports.PontHeader.prototype,"id",2);$l([a()],exports.PontHeader.prototype,"align",2);exports.PontHeader=$l([p("pont-header")],exports.PontHeader);var X1=Object.defineProperty,t0=Object.getOwnPropertyDescriptor,Pl=(e,t,r,o)=>{for(var n=o>1?void 0:o?t0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&X1(t,r,n),n};exports.PontSubtitle=class extends Ut{get _containerElement(){return this.querySelector(`pont-typography-p[part=${this.id?this.id:"subtitle"}]`)}createRenderRoot(){return this}render(){return l`
3529
3519
  <pont-typography-p part=${this.id?this.id:"subtitle"} id=${this.id}>
3530
3520
  ${this.content}
3531
3521
  </pont-typography-p>
3532
- `}};Pl([a({type:String})],exports.PontSubtitle.prototype,"id",2);Pl([a({type:String})],exports.PontSubtitle.prototype,"content",2);exports.PontSubtitle=Pl([p("pont-subtitle")],exports.PontSubtitle);var e0=Object.defineProperty,r0=Object.getOwnPropertyDescriptor,Cl=(e,t,r,o)=>{for(var n=o>1?void 0:o?r0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&e0(t,r,n),n};exports.PontTitle=class extends jt{get _containerElement(){return this.querySelector(`pont-typography-h[part=${this.id?this.id:"title"}]`)}createRenderRoot(){return this}render(){return l`
3522
+ `}};Pl([a({type:String})],exports.PontSubtitle.prototype,"id",2);Pl([a({type:String})],exports.PontSubtitle.prototype,"content",2);exports.PontSubtitle=Pl([p("pont-subtitle")],exports.PontSubtitle);var e0=Object.defineProperty,r0=Object.getOwnPropertyDescriptor,Cl=(e,t,r,o)=>{for(var n=o>1?void 0:o?r0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&e0(t,r,n),n};exports.PontTitle=class extends Ut{get _containerElement(){return this.querySelector(`pont-typography-h[part=${this.id?this.id:"title"}]`)}createRenderRoot(){return this}render(){return l`
3533
3523
  <pont-typography-h
3534
3524
  part=${this.id?this.id:"title"}
3535
3525
  level="h4"
@@ -3552,7 +3542,7 @@ Minimum version required to store current data is: `+F+`.
3552
3542
  fill="currentColor" fill-opacity="0.3"/>
3553
3543
  <rect x="32" y="19" width="34" height="4" rx="2"
3554
3544
  fill="currentColor" fill-opacity="0.18"/>
3555
- </svg>`;exports.PontLogo=class extends jt{constructor(){super(...arguments),this.align="center",this.width="",this.height="",this.theme=this.getTheme(),this.isSvg=!1,this.design=new Fo(this)}get _containerElement(){return this.querySelector(".pont-logo-wrapper")}connectedCallback(){super.connectedCallback(),this.style.display="grid",this.updateLayoutFromProps(),this.observer=new MutationObserver(()=>{this.theme=this.getTheme()}),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}updated(t){super.updated(t),(t.has("align")||t.has("width")||t.has("height"))&&this.updateLayoutFromProps()}updateLayoutFromProps(){const t=this._containerElement;t&&(this.align&&(t.style.justifySelf=this.align),this.width&&(t.style.width=this.width),this.height&&(t.style.height=this.height))}disconnectedCallback(){var t;(t=this.observer)==null||t.disconnect(),super.disconnectedCallback()}getTheme(){return document.documentElement.getAttribute("data-theme")??"light"}createRenderRoot(){return this}render(){const t=this.theme==="dark"&&this.imageUrlDark?this.imageUrlDark:this.imageUrl,r=uP(t,this.theme);if(!r&&this.design.active)return this.isSvg=!0,l`
3545
+ </svg>`;exports.PontLogo=class extends Ut{constructor(){super(...arguments),this.align="center",this.width="",this.height="",this.theme=this.getTheme(),this.isSvg=!1,this.design=new Fo(this)}get _containerElement(){return this.querySelector(".pont-logo-wrapper")}connectedCallback(){super.connectedCallback(),this.style.display="grid",this.updateLayoutFromProps(),this.observer=new MutationObserver(()=>{this.theme=this.getTheme()}),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}updated(t){super.updated(t),(t.has("align")||t.has("width")||t.has("height"))&&this.updateLayoutFromProps()}updateLayoutFromProps(){const t=this._containerElement;t&&(this.align&&(t.style.justifySelf=this.align),this.width&&(t.style.width=this.width),this.height&&(t.style.height=this.height))}disconnectedCallback(){var t;(t=this.observer)==null||t.disconnect(),super.disconnectedCallback()}getTheme(){return document.documentElement.getAttribute("data-theme")??"light"}createRenderRoot(){return this}render(){const t=this.theme==="dark"&&this.imageUrlDark?this.imageUrlDark:this.imageUrl,r=uP(t,this.theme);if(!r&&this.design.active)return this.isSvg=!0,l`
3556
3546
  <div class="pont-logo-wrapper" part=${this.id?this.id:"logo"}>
3557
3547
  ${cp(i0)}
3558
3548
  </div>
@@ -3621,7 +3611,7 @@ Minimum version required to store current data is: `+F+`.
3621
3611
  >
3622
3612
  ${this.logoAlign==="start"?l`${this._renderLogo()} ${this._renderLabel()}`:l`${this._renderLabel()} ${this._renderLogo()}`}
3623
3613
  </span>
3624
- `}};exports.PontWatermark.ROOT="watermark";exports.PontWatermark.LABEL="label";exports.PontWatermark.LOGO="logo";exports.PontWatermark.TAG=`${rt}-${exports.PontWatermark.ROOT}`;exports.PontWatermark.PARTS={root:exports.PontWatermark.ROOT,label:`${exports.PontWatermark.ROOT}-${exports.PontWatermark.LABEL}`,logo:`${exports.PontWatermark.ROOT}-${exports.PontWatermark.LOGO}`};Yn([a({type:String})],exports.PontWatermark.prototype,"seed",2);Yn([a({type:String,attribute:"custom-id"})],exports.PontWatermark.prototype,"customId",2);Yn([a({type:String})],exports.PontWatermark.prototype,"variant",2);Yn([a({type:String,attribute:"logo-align"})],exports.PontWatermark.prototype,"logoAlign",2);Yn([a({type:String})],exports.PontWatermark.prototype,"label",1);exports.PontWatermark=Yn([p("pont-watermark")],exports.PontWatermark);var l0=Object.defineProperty,d0=Object.getOwnPropertyDescriptor,Kh=(e,t,r,o)=>{for(var n=o>1?void 0:o?d0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&l0(t,r,n),n};exports.PontHint=class extends f{constructor(){super(...arguments),this.content=""}createRenderRoot(){return this}render(){return l`<p class="pont-mt-2">${this.content}</p>`}};Kh([a({type:String})],exports.PontHint.prototype,"content",2);exports.PontHint=Kh([p("pont-hint")],exports.PontHint);var c0=Object.defineProperty,p0=Object.getOwnPropertyDescriptor,Ki=(e,t,r,o)=>{for(var n=o>1?void 0:o?p0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&c0(t,r,n),n};exports.PontModal=class extends f{constructor(){super(...arguments),this._cachedChildren=[],this.isOpen=!1,this.showClose=!0,this.layoutClass="",this._handleClose=t=>{t&&t.stopPropagation(),this.dispatchEvent(new CustomEvent("close",{bubbles:!1,composed:!0}))},this._handleOutsideClick=t=>{t.target===t.currentTarget&&this._handleClose(t)}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}render(){return this.isOpen?l`
3614
+ `}};exports.PontWatermark.ROOT="watermark";exports.PontWatermark.LABEL="label";exports.PontWatermark.LOGO="logo";exports.PontWatermark.TAG=`${rt}-${exports.PontWatermark.ROOT}`;exports.PontWatermark.PARTS={root:exports.PontWatermark.ROOT,label:`${exports.PontWatermark.ROOT}-${exports.PontWatermark.LABEL}`,logo:`${exports.PontWatermark.ROOT}-${exports.PontWatermark.LOGO}`};Yn([a({type:String})],exports.PontWatermark.prototype,"seed",2);Yn([a({type:String,attribute:"custom-id"})],exports.PontWatermark.prototype,"customId",2);Yn([a({type:String})],exports.PontWatermark.prototype,"variant",2);Yn([a({type:String,attribute:"logo-align"})],exports.PontWatermark.prototype,"logoAlign",2);Yn([a({type:String})],exports.PontWatermark.prototype,"label",1);exports.PontWatermark=Yn([p("pont-watermark")],exports.PontWatermark);var l0=Object.defineProperty,d0=Object.getOwnPropertyDescriptor,Gh=(e,t,r,o)=>{for(var n=o>1?void 0:o?d0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&l0(t,r,n),n};exports.PontHint=class extends f{constructor(){super(...arguments),this.content=""}createRenderRoot(){return this}render(){return l`<p class="pont-mt-2">${this.content}</p>`}};Gh([a({type:String})],exports.PontHint.prototype,"content",2);exports.PontHint=Gh([p("pont-hint")],exports.PontHint);var c0=Object.defineProperty,p0=Object.getOwnPropertyDescriptor,Ki=(e,t,r,o)=>{for(var n=o>1?void 0:o?p0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&c0(t,r,n),n};exports.PontModal=class extends f{constructor(){super(...arguments),this._cachedChildren=[],this.isOpen=!1,this.showClose=!0,this.layoutClass="",this._handleClose=t=>{t&&t.stopPropagation(),this.dispatchEvent(new CustomEvent("close",{bubbles:!1,composed:!0}))},this._handleOutsideClick=t=>{t.target===t.currentTarget&&this._handleClose(t)}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}render(){return this.isOpen?l`
3625
3615
  <div class="pont-modal-overlay"></div>
3626
3616
  <div class="pont-modal-container" @click=${this._handleOutsideClick}>
3627
3617
  <div part="modal-content" class="pont-modal-layout">
@@ -3903,9 +3893,9 @@ Minimum version required to store current data is: `+F+`.
3903
3893
  </pont-dropdown-menu-group>
3904
3894
  </pont-dropdown-menu-content>
3905
3895
  </pont-dropdown-menu>
3906
- `}createRenderRoot(){return this}};Mo([a({type:Array})],exports.PontMultiSelectFilter.prototype,"options",2);Mo([a({type:Array})],exports.PontMultiSelectFilter.prototype,"selected",2);Mo([a({type:String})],exports.PontMultiSelectFilter.prototype,"placeholder",2);Mo([a({type:String})],exports.PontMultiSelectFilter.prototype,"label",2);exports.PontMultiSelectFilter=Mo([p("pont-multi-select-filter")],exports.PontMultiSelectFilter);var ve=(e=>(e.PROFILE="Profile",e.SECURITY="Security",e.APPEARANCE="Appearance",e.NOTIFICATION="Notification",e))(ve||{}),pr=(e=>(e.MODAL="MODAL",e.PAGE="PAGE",e))(pr||{}),Ke=(e=>(e.BURGER="BURGER",e.REGULAR="REGULAR",e))(Ke||{}),Lr=(e=>(e.VERTICAL="VERTICAL",e.HORIZONTAL="HORIZONTAL",e))(Lr||{}),nt=(e=>(e.COLUMN="COLUMN",e.ROW="ROW",e))(nt||{});const Wi="pont-account-settings-card-header-container",_o="pont-account-settings-card-title",Pe="pont-account-settings-input-label pont-shrink-0 md:pont-block",Yi="pont-account-settings-card-container",wo=()=>l`<pont-typography-muted>Not Added</pont-typography-muted>`;let Fa=null;function $0(e){Fa=e}function P0(){return Fa||console.warn("SDK environment not initialized. Call initSdk({...}) before using <pont-provider>."),Fa}class C0 extends Error{constructor(t,r,o){super(t),this.name="ApiError",this.status=r,this.data=o}}const E0="/mgmt/v1";async function pe(e,t={}){var v,b;const{token:r,headers:o,...n}=t,i=P0(),s=((v=i==null?void 0:i.apiBaseUrl)==null?void 0:v.replace(/\/+$/,""))??"",d={"Content-Type":"application/json",...i==null?void 0:i.headers,...r?{Authorization:`Bearer ${r}`}:{}};o&&(o instanceof Headers?o.forEach((w,_)=>{d[_]=w}):Array.isArray(o)?o.forEach(([w,_])=>{d[w]=_}):Object.assign(d,o));const c=await fetch(`${s}${E0}${e}`,{...n,headers:d});let u=null;try{u=await c.json()}catch{}if(!c.ok){const w=(b=u==null?void 0:u.error)==null?void 0:b.message;throw new C0(w||c.statusText||"Something went wrong",c.status,u)}return u}const S0=100,x0=5;async function O0(){var t,r;const e=[];for(let o=1;o<=x0;o++){const n=await pe(`/me/organizations?page=${o}&limit=${S0}`,{method:"GET",token:de()});if(e.push(...n.data??[]),!((t=n.data)!=null&&t.length)||o>=(((r=n.pagination)==null?void 0:r.total_pages)??1))break}return e}async function R0(){return pe("/me",{method:"GET",token:de()})}async function Qi(e){return pe("/me",{method:"PATCH",body:JSON.stringify(e),token:de()})}async function I0(e,t){var i,s;const r=new URLSearchParams;t&&(t.search&&r.append("search",t.search),t.page!==void 0&&r.append("page",t.page.toString()),t.limit!==void 0&&r.append("limit",t.limit.toString()),t.order&&r.append("order",t.order),(i=t.user_ids)!=null&&i.length&&t.user_ids.forEach(d=>r.append("user_ids",d)),(s=t.emails)!=null&&s.length&&t.emails.forEach(d=>r.append("emails",d)),t.roles&&r.append("roles",t.roles));const o=r.toString(),n=`/organizations/${encodeURIComponent(e)}/members${o?`?${o}`:""}`;return pe(n,{method:"GET",token:de()})}async function A0(e,t,r){const o=`/organizations/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}/roles`;await pe(o,{method:"PUT",token:de(),headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})}async function T0(e,t){const r=`/organizations/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}`;await pe(r,{method:"DELETE",token:de(),headers:{"Content-Type":"application/json"}})}async function D0(e,t){const r=`/organizations/${encodeURIComponent(e)}/invitations`;return pe(r,{method:"POST",token:de(),headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async function L0(e,t){const r=`/organizations/${encodeURIComponent(e)}/invitations/${encodeURIComponent(t)}/resend`;return pe(r,{method:"POST",token:de(),headers:{"Content-Type":"application/json"}})}async function F0(e,t){const r=`/organizations/${encodeURIComponent(e)}/invitations/${encodeURIComponent(t)}/cancel`;return pe(r,{method:"POST",token:de(),headers:{"Content-Type":"application/json"}})}async function k0(e,t){var i;const r=new URLSearchParams;t&&(t.search&&r.append("search",t.search),t.status&&r.append("status",t.status),t.expired!==void 0&&r.append("expired",t.expired.toString()),t.invited_by&&r.append("invited_by",t.invited_by),t.page!==void 0&&r.append("page",t.page.toString()),t.limit!==void 0&&r.append("limit",t.limit.toString()),t.order&&r.append("order",t.order),(i=t.invitee_emails)!=null&&i.length&&t.invitee_emails.forEach(s=>r.append("invitee_emails",s)),t.roles&&r.append("roles",t.roles));const o=r.toString(),n=`/organizations/${encodeURIComponent(e)}/invitations${o?`?${o}`:""}`;return pe(n,{method:"GET",token:de()})}async function Sl(e){const t=new URLSearchParams;e&&(e.type&&t.append("type",e.type),e.name&&t.append("name",e.name),e.resource_type&&t.append("resource_type",e.resource_type),e.resource_id&&t.append("resource_id",e.resource_id),e.include_instance_scoped!==void 0&&t.append("include_instance_scoped",e.include_instance_scoped.toString()),e.permission&&t.append("permission",e.permission),e.page!==void 0&&t.append("page",e.page.toString()),e.limit!==void 0&&t.append("limit",e.limit.toString()),e.order&&t.append("order",e.order));const r=t.toString(),o=`/roles${r?`?${r}`:""}`;return pe(o,{method:"GET",token:de()})}var N0=Object.defineProperty,M0=Object.getOwnPropertyDescriptor,xt=(e,t,r,o)=>{for(var n=o>1?void 0:o?M0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&N0(t,r,n),n};exports.PontAccountInfo=class extends f{constructor(){super(...arguments),this.showAvatarMenu=!1,this.showIcons=!0,this.content=null,this.layout=nt.ROW,this.isUploadingImage=!1,this.isEditingAvatarMobile=!1,this.isMobile=!1,this._isAvatarEditorOpen=!1,this._popoverObserver=null,this._intentionalClose=!1,this.avatarDraft="",this._committedAvatar="",this._onMobileChange=t=>{this.isMobile=t.matches,t.matches||(this.isEditingAvatarMobile=!1)},this.handleAvatarInput=t=>{this.avatarDraft=t.target.value,this.account={...this.account,avatar:this.avatarDraft}},this.handleSaveAvatar=async()=>{if(!this.isUploadingImage){this.isUploadingImage=!0;try{const t=await Qi({picture:this.avatarDraft});this.account={...this.account,avatar:t.picture??""},this._committedAvatar=this.account.avatar,this.avatarDraft=this.account.avatar,this._isAvatarEditorOpen=!1,this.isMobile?this.isEditingAvatarMobile=!1:(this._intentionalClose=!0,this.querySelector("pont-popover-content").state="closed")}catch(t){this.account={...this.account,avatar:this._committedAvatar},this.avatarDraft=this._committedAvatar,this._isAvatarEditorOpen=!1,Ui(qi(t,"Failed to update your photo.")),this.isMobile?this.isEditingAvatarMobile=!1:(this._intentionalClose=!0,this.querySelector("pont-popover-content").state="closed")}finally{this.isUploadingImage=!1}}}}firstUpdated(){this._setupPopoverObserver()}_setupPopoverObserver(){const t=this.querySelector("pont-popover-content");if(!t)return;const r=new MutationObserver(n=>{for(const i of n)if(i.type==="childList"){const s=t.firstElementChild;if(s&&s.hasAttribute("data-state")){this._attachAttributeObserver(s),r.disconnect();break}}});r.observe(t,{childList:!0,subtree:!1});const o=t.firstElementChild;o&&o.hasAttribute("data-state")&&(this._attachAttributeObserver(o),r.disconnect())}_attachAttributeObserver(t){this._popoverObserver&&this._popoverObserver.disconnect(),this._popoverObserver=new MutationObserver(r=>{for(const o of r)if(o.type==="attributes"&&o.attributeName==="data-state"){const n=t.getAttribute("data-state");n==="open"?this.openAvatarEditor():n==="closed"&&(this._intentionalClose?this._intentionalClose=!1:(this.account={...this.account,avatar:this._committedAvatar},this.avatarDraft=this._committedAvatar,this._isAvatarEditorOpen=!1))}}),this._popoverObserver.observe(t,{attributes:!0})}updated(t){t.has("account")&&this.account.avatar&&!this._isAvatarEditorOpen&&(this.avatarDraft=this.account.avatar,this._committedAvatar=this.account.avatar)}connectedCallback(){super.connectedCallback(),this._mobileQuery=window.matchMedia("(max-width: 767px)"),this.isMobile=this._mobileQuery.matches,this._mobileQuery.addEventListener("change",this._onMobileChange)}disconnectedCallback(){super.disconnectedCallback(),this._mobileQuery.removeEventListener("change",this._onMobileChange),this._popoverObserver&&(this._popoverObserver.disconnect(),this._popoverObserver=null)}openAvatarEditor(){this._isAvatarEditorOpen=!0,this._committedAvatar=this.account.avatar,this.avatarDraft=this.account.avatar}resetAvatarDraft(){this.avatarDraft=this.account.avatar}handleCancelAvatar(){this.isUploadingImage||(this.account={...this.account,avatar:this._committedAvatar},this.avatarDraft=this._committedAvatar,this._isAvatarEditorOpen=!1,this.isMobile?this.isEditingAvatarMobile=!1:(this._intentionalClose=!0,this.querySelector("pont-popover-content").state="closed"))}renderRow(t,r){const o=this.layout===nt.COLUMN;return l`
3896
+ `}createRenderRoot(){return this}};Mo([a({type:Array})],exports.PontMultiSelectFilter.prototype,"options",2);Mo([a({type:Array})],exports.PontMultiSelectFilter.prototype,"selected",2);Mo([a({type:String})],exports.PontMultiSelectFilter.prototype,"placeholder",2);Mo([a({type:String})],exports.PontMultiSelectFilter.prototype,"label",2);exports.PontMultiSelectFilter=Mo([p("pont-multi-select-filter")],exports.PontMultiSelectFilter);var ve=(e=>(e.PROFILE="Profile",e.SECURITY="Security",e.APPEARANCE="Appearance",e.NOTIFICATION="Notification",e))(ve||{}),pr=(e=>(e.MODAL="MODAL",e.PAGE="PAGE",e))(pr||{}),Ke=(e=>(e.BURGER="BURGER",e.REGULAR="REGULAR",e))(Ke||{}),Lr=(e=>(e.VERTICAL="VERTICAL",e.HORIZONTAL="HORIZONTAL",e))(Lr||{}),nt=(e=>(e.COLUMN="COLUMN",e.ROW="ROW",e))(nt||{});const Wi="pont-account-settings-card-header-container",_o="pont-account-settings-card-title",Pe="pont-account-settings-input-label pont-shrink-0 md:pont-block",Yi="pont-account-settings-card-container",wo=()=>l`<pont-typography-muted>Not Added</pont-typography-muted>`;let Fa=null;function $0(e){Fa=e}function P0(){return Fa||console.warn("SDK environment not initialized. Call initSdk({...}) before using <pont-provider>."),Fa}class C0 extends Error{constructor(t,r,o){super(t),this.name="ApiError",this.status=r,this.data=o}}const E0="/mgmt/v1";async function ce(e,t={}){var v,b;const{token:r,headers:o,...n}=t,i=P0(),s=((v=i==null?void 0:i.apiBaseUrl)==null?void 0:v.replace(/\/+$/,""))??"",d={"Content-Type":"application/json",...i==null?void 0:i.headers,...r?{Authorization:`Bearer ${r}`}:{}};o&&(o instanceof Headers?o.forEach((w,_)=>{d[_]=w}):Array.isArray(o)?o.forEach(([w,_])=>{d[w]=_}):Object.assign(d,o));const c=await fetch(`${s}${E0}${e}`,{...n,headers:d});let u=null;try{u=await c.json()}catch{}if(!c.ok){const w=(b=u==null?void 0:u.error)==null?void 0:b.message;throw new C0(w||c.statusText||"Something went wrong",c.status,u)}return u}const S0=100,x0=5;async function O0(){var t,r;const e=[];for(let o=1;o<=x0;o++){const n=await ce(`/me/organizations?page=${o}&limit=${S0}`,{method:"GET",token:le()});if(e.push(...n.data??[]),!((t=n.data)!=null&&t.length)||o>=(((r=n.pagination)==null?void 0:r.total_pages)??1))break}return e}async function R0(){return ce("/me",{method:"GET",token:le()})}async function Qi(e){return ce("/me",{method:"PATCH",body:JSON.stringify(e),token:le()})}async function I0(e,t){var i,s;const r=new URLSearchParams;t&&(t.search&&r.append("search",t.search),t.page!==void 0&&r.append("page",t.page.toString()),t.limit!==void 0&&r.append("limit",t.limit.toString()),t.order&&r.append("order",t.order),(i=t.user_ids)!=null&&i.length&&t.user_ids.forEach(d=>r.append("user_ids",d)),(s=t.emails)!=null&&s.length&&t.emails.forEach(d=>r.append("emails",d)),t.roles&&r.append("roles",t.roles));const o=r.toString(),n=`/organizations/${encodeURIComponent(e)}/members${o?`?${o}`:""}`;return ce(n,{method:"GET",token:le()})}async function A0(e,t,r){const o=`/organizations/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}/roles`;await ce(o,{method:"PUT",token:le(),headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})}async function T0(e,t){const r=`/organizations/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}`;await ce(r,{method:"DELETE",token:le(),headers:{"Content-Type":"application/json"}})}async function D0(e,t){const r=`/organizations/${encodeURIComponent(e)}/invitations`;return ce(r,{method:"POST",token:le(),headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async function L0(e,t){const r=`/organizations/${encodeURIComponent(e)}/invitations/${encodeURIComponent(t)}/resend`;return ce(r,{method:"POST",token:le(),headers:{"Content-Type":"application/json"}})}async function F0(e,t,r){const o=`/organizations/${encodeURIComponent(e)}/invitations/${encodeURIComponent(t)}`;await ce(o,{method:"DELETE",token:le()})}async function k0(e,t){var i;const r=new URLSearchParams;t&&(t.search&&r.append("search",t.search),t.invited_by&&r.append("invited_by",t.invited_by),t.page!==void 0&&r.append("page",t.page.toString()),t.limit!==void 0&&r.append("limit",t.limit.toString()),t.order&&r.append("order",t.order),(i=t.invitee_emails)!=null&&i.length&&t.invitee_emails.forEach(s=>r.append("invitee_emails",s)),t.roles&&r.append("roles",t.roles));const o=r.toString(),n=`/organizations/${encodeURIComponent(e)}/invitations${o?`?${o}`:""}`;return ce(n,{method:"GET",token:le()})}async function Sl(e){const t=new URLSearchParams;e&&(e.type&&t.append("type",e.type),e.name&&t.append("name",e.name),e.resource_type&&t.append("resource_type",e.resource_type),e.resource_id&&t.append("resource_id",e.resource_id),e.include_instance_scoped!==void 0&&t.append("include_instance_scoped",e.include_instance_scoped.toString()),e.permission&&t.append("permission",e.permission),e.page!==void 0&&t.append("page",e.page.toString()),e.limit!==void 0&&t.append("limit",e.limit.toString()),e.order&&t.append("order",e.order));const r=t.toString(),o=`/roles${r?`?${r}`:""}`;return ce(o,{method:"GET",token:le()})}var N0=Object.defineProperty,M0=Object.getOwnPropertyDescriptor,xt=(e,t,r,o)=>{for(var n=o>1?void 0:o?M0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&N0(t,r,n),n};exports.PontAccountInfo=class extends f{constructor(){super(...arguments),this.showAvatarMenu=!1,this.showIcons=!0,this.content=null,this.layout=nt.ROW,this.isUploadingImage=!1,this.isEditingAvatarMobile=!1,this.isMobile=!1,this._isAvatarEditorOpen=!1,this._popoverObserver=null,this._intentionalClose=!1,this.avatarDraft="",this._committedAvatar="",this._onMobileChange=t=>{this.isMobile=t.matches,t.matches||(this.isEditingAvatarMobile=!1)},this.handleAvatarInput=t=>{this.avatarDraft=t.target.value,this.account={...this.account,avatar:this.avatarDraft}},this.handleSaveAvatar=async()=>{if(!this.isUploadingImage){this.isUploadingImage=!0;try{const t=await Qi({picture:this.avatarDraft});this.account={...this.account,avatar:t.picture??""},this._committedAvatar=this.account.avatar,this.avatarDraft=this.account.avatar,this._isAvatarEditorOpen=!1,this.isMobile?this.isEditingAvatarMobile=!1:(this._intentionalClose=!0,this.querySelector("pont-popover-content").state="closed")}catch(t){this.account={...this.account,avatar:this._committedAvatar},this.avatarDraft=this._committedAvatar,this._isAvatarEditorOpen=!1,Ui(qi(t,"Failed to update your photo.")),this.isMobile?this.isEditingAvatarMobile=!1:(this._intentionalClose=!0,this.querySelector("pont-popover-content").state="closed")}finally{this.isUploadingImage=!1}}}}firstUpdated(){this._setupPopoverObserver()}_setupPopoverObserver(){const t=this.querySelector("pont-popover-content");if(!t)return;const r=new MutationObserver(n=>{for(const i of n)if(i.type==="childList"){const s=t.firstElementChild;if(s&&s.hasAttribute("data-state")){this._attachAttributeObserver(s),r.disconnect();break}}});r.observe(t,{childList:!0,subtree:!1});const o=t.firstElementChild;o&&o.hasAttribute("data-state")&&(this._attachAttributeObserver(o),r.disconnect())}_attachAttributeObserver(t){this._popoverObserver&&this._popoverObserver.disconnect(),this._popoverObserver=new MutationObserver(r=>{for(const o of r)if(o.type==="attributes"&&o.attributeName==="data-state"){const n=t.getAttribute("data-state");n==="open"?this.openAvatarEditor():n==="closed"&&(this._intentionalClose?this._intentionalClose=!1:(this.account={...this.account,avatar:this._committedAvatar},this.avatarDraft=this._committedAvatar,this._isAvatarEditorOpen=!1))}}),this._popoverObserver.observe(t,{attributes:!0})}updated(t){t.has("account")&&this.account.avatar&&!this._isAvatarEditorOpen&&(this.avatarDraft=this.account.avatar,this._committedAvatar=this.account.avatar)}connectedCallback(){super.connectedCallback(),this._mobileQuery=window.matchMedia("(max-width: 767px)"),this.isMobile=this._mobileQuery.matches,this._mobileQuery.addEventListener("change",this._onMobileChange)}disconnectedCallback(){super.disconnectedCallback(),this._mobileQuery.removeEventListener("change",this._onMobileChange),this._popoverObserver&&(this._popoverObserver.disconnect(),this._popoverObserver=null)}openAvatarEditor(){this._isAvatarEditorOpen=!0,this._committedAvatar=this.account.avatar,this.avatarDraft=this.account.avatar}resetAvatarDraft(){this.avatarDraft=this.account.avatar}handleCancelAvatar(){this.isUploadingImage||(this.account={...this.account,avatar:this._committedAvatar},this.avatarDraft=this._committedAvatar,this._isAvatarEditorOpen=!1,this.isMobile?this.isEditingAvatarMobile=!1:(this._intentionalClose=!0,this.querySelector("pont-popover-content").state="closed"))}renderRow(t,r){const o=this.layout===nt.COLUMN;return l`
3907
3897
  <div
3908
- class=${Vt("pont-account-settings-display-row",o?"":"pont-account-settings-account-grid")}
3898
+ class=${zt("pont-account-settings-display-row",o?"":"pont-account-settings-account-grid")}
3909
3899
  >
3910
3900
  ${o?l`
3911
3901
  <div class="pont-account-settings-display-row-labels">
@@ -3918,7 +3908,7 @@ Minimum version required to store current data is: `+F+`.
3918
3908
  >
3919
3909
  <div
3920
3910
  part="label"
3921
- class=${Vt(Pe,"pont-account-settings-field-label")}
3911
+ class=${zt(Pe,"pont-account-settings-field-label")}
3922
3912
  >
3923
3913
  ${t}
3924
3914
  </div>
@@ -4151,7 +4141,7 @@ Minimum version required to store current data is: `+F+`.
4151
4141
  <pont-typography-p
4152
4142
  ><div
4153
4143
  part="label"
4154
- class=${Vt(Pe,"pont-account-settings-field-label")}
4144
+ class=${zt(Pe,"pont-account-settings-field-label")}
4155
4145
  >
4156
4146
  Location
4157
4147
  </div></pont-typography-p
@@ -4167,7 +4157,7 @@ Minimum version required to store current data is: `+F+`.
4167
4157
  <pont-typography-p
4168
4158
  ><div
4169
4159
  part="label"
4170
- class=${Vt(Pe,"pont-account-settings-field-label")}
4160
+ class=${zt(Pe,"pont-account-settings-field-label")}
4171
4161
  >
4172
4162
  Zone Info
4173
4163
  </div></pont-typography-p
@@ -4325,7 +4315,7 @@ Minimum version required to store current data is: `+F+`.
4325
4315
  <pont-typography-p>
4326
4316
  <div
4327
4317
  part="label"
4328
- class=${Vt(Pe,"pont-account-settings-field-label")}
4318
+ class=${zt(Pe,"pont-account-settings-field-label")}
4329
4319
  >
4330
4320
  ${n.label}
4331
4321
  </div>
@@ -4445,7 +4435,7 @@ Minimum version required to store current data is: `+F+`.
4445
4435
  <pont-typography-p
4446
4436
  ><div
4447
4437
  part="label"
4448
- class=${Vt(Pe,"pont-account-settings-field-label")}
4438
+ class=${zt(Pe,"pont-account-settings-field-label")}
4449
4439
  >
4450
4440
  Website
4451
4441
  </div></pont-typography-p
@@ -4503,7 +4493,7 @@ Minimum version required to store current data is: `+F+`.
4503
4493
  * @license
4504
4494
  * Copyright 2021 Google LLC
4505
4495
  * SPDX-License-Identifier: BSD-3-Clause
4506
- */const Wh=An(class extends Ti{constructor(){super(...arguments),this.key=h}render(e,t){return this.key=e,t}update(e,[t,r]){return t!==this.key&&(cm(e),this.key=t),r}});var Q0=Object.defineProperty,Z0=Object.getOwnPropertyDescriptor,on=(e,t,r,o)=>{for(var n=o>1?void 0:o?Z0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&Q0(t,r,n),n};let _r=class extends f{constructor(){super(...arguments),this.orientation=Lr.HORIZONTAL,this.displayType=Ke.REGULAR,this.mode=pr.PAGE,this.config={showIcons:!0},this.activeTab=ve.PROFILE,this.isMenuOpen=!1}get isBurger(){return this.displayType===Ke.BURGER}get isVertical(){return this.orientation===Lr.VERTICAL}get isModal(){return this.mode===pr.MODAL}get sidebarKey(){return`${this.orientation}|${this.displayType}`}createRenderRoot(){return this}toggleMenu(){const e=this.closest('div[role="tab"]');e&&e.classList.toggle("pont-rotate-0"),this.isMenuOpen=!this.isMenuOpen,this.requestUpdate()}renderTabs(e){return Wh(this.sidebarKey,l`
4496
+ */const Kh=An(class extends Ti{constructor(){super(...arguments),this.key=h}render(e,t){return this.key=e,t}update(e,[t,r]){return t!==this.key&&(cm(e),this.key=t),r}});var Q0=Object.defineProperty,Z0=Object.getOwnPropertyDescriptor,on=(e,t,r,o)=>{for(var n=o>1?void 0:o?Z0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&Q0(t,r,n),n};let _r=class extends f{constructor(){super(...arguments),this.orientation=Lr.HORIZONTAL,this.displayType=Ke.REGULAR,this.mode=pr.PAGE,this.config={showIcons:!0},this.activeTab=ve.PROFILE,this.isMenuOpen=!1}get isBurger(){return this.displayType===Ke.BURGER}get isVertical(){return this.orientation===Lr.VERTICAL}get isModal(){return this.mode===pr.MODAL}get sidebarKey(){return`${this.orientation}|${this.displayType}`}createRenderRoot(){return this}toggleMenu(){const e=this.closest('div[role="tab"]');e&&e.classList.toggle("pont-rotate-0"),this.isMenuOpen=!this.isMenuOpen,this.requestUpdate()}renderTabs(e){return Kh(this.sidebarKey,l`
4507
4497
  <pont-tabs-list
4508
4498
  data-burger=${this.isBurger}
4509
4499
  data-orientation=${e?"vertical":"horizontal"}
@@ -4539,7 +4529,7 @@ Minimum version required to store current data is: `+F+`.
4539
4529
  `}renderMobileDrawer(){return l`
4540
4530
  <div
4541
4531
  part="mobile-drawer"
4542
- class="${Vt(W0,this.isMenuOpen?"pont-translate-x-0 pont-opacity-100":"pont-translate-x-[-100%] pont-opacity-0")}"
4532
+ class="${zt(W0,this.isMenuOpen?"pont-translate-x-0 pont-opacity-100":"pont-translate-x-[-100%] pont-opacity-0")}"
4543
4533
  >
4544
4534
  <div class="pont-account-settings-sidebar-mobile-body">
4545
4535
  <div class="pont-account-settings-sidebar-tab-list">
@@ -4568,7 +4558,7 @@ Minimum version required to store current data is: `+F+`.
4568
4558
  `}getSidebarContainerClass(){return this.isBurger&&this.isModal?Go.horizontalBurger:this.isModal&&this.isVertical?`${Go.vertical} pont-account-settings-sidebar-modal-margin`:this.isVertical?Go.vertical:Go.horizontal}render(){const e=!this.isVertical&&!this.isBurger;return l`
4569
4559
  <div
4570
4560
  burger=${this.isBurger}
4571
- class="${Vt("pont-overflow-x-auto pont-flex pont-items-center",this.getSidebarContainerClass())}"
4561
+ class="${zt("pont-overflow-x-auto pont-flex pont-items-center",this.getSidebarContainerClass())}"
4572
4562
  >
4573
4563
  ${this.isBurger?this.renderBurger():h}
4574
4564
  ${this.isVertical?this.renderTabs(!0):null}
@@ -4580,14 +4570,14 @@ Minimum version required to store current data is: `+F+`.
4580
4570
  </div>
4581
4571
 
4582
4572
  ${this.isBurger?this.renderMobileDrawer():null}
4583
- `}};on([a({type:String})],_r.prototype,"orientation",2);on([a({type:String})],_r.prototype,"displayType",2);on([a({type:String})],_r.prototype,"mode",2);on([a({type:Object})],_r.prototype,"config",2);on([a({type:String})],_r.prototype,"activeTab",2);on([g()],_r.prototype,"isMenuOpen",2);_r=on([p("pont-profile-sidebar")],_r);function xl(){document.dispatchEvent(new CustomEvent("open-user-profile",{bubbles:!0,composed:!0}))}function Ol(){document.dispatchEvent(new CustomEvent("close-user-profile",{bubbles:!0,composed:!0}))}function Yh(){document.dispatchEvent(new CustomEvent("open-member-management",{bubbles:!0,composed:!0}))}function Qh(){document.dispatchEvent(new CustomEvent("close-member-management",{bubbles:!0,composed:!0}))}function Zh(e){document.dispatchEvent(new CustomEvent("pont:set-locales",{detail:{locales:e},bubbles:!0,composed:!0}))}typeof window<"u"&&(window.__pontCoreSdk||(window.__pontCoreSdk={}),window.__pontCoreSdk.openAccountSettingsModal=xl,window.__pontCoreSdk.closeAccountSettingsModal=Ol,window.__pontCoreSdk.openMemberManagementModal=Yh,window.__pontCoreSdk.closeMemberManagementModal=Qh,window.__pontCoreSdk.setLocales=Zh);var J0=Object.defineProperty,qt=(e,t,r,o)=>{for(var n=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(t,r,n)||n);return n&&J0(t,r,n),n};class Rt extends f{constructor(){super(),this.showAvatarMenu=!1,this.orientation=Lr.HORIZONTAL,this.mobileDisplay=Ke.REGULAR,this.mode=pr.PAGE,this.widgetsLayout=nt.ROW,this.content=null,this.isOpen=!1,this.currentBreakpoint="md",this.activeTab=ve.PROFILE,this._userLoaded=!1,this._userLoading=!1,this.userContextValue={user:null,identifier:null},this.__initialized=!1,this.account={email:"",phone:"",avatar:""},this.personal={username:"",first:"",middle:"",last:"",nickname:"",gender:"",bio:""},this.location={location:"",zoneInfo:""},this.urls={website:""},this._handleResize=()=>{this._updateBreakpoint()},this._handleCloseProfile=()=>{this.isModal&&(this.isOpen=!1)},this._handleOpenProfile=()=>{this.isModal&&(this.isOpen=!0)},this._toggleAvatarMenu=t=>{t.stopPropagation(),this.showAvatarMenu=!this.showAvatarMenu},this._handleAvatarChange=()=>{const t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=r=>{var i;const o=(i=r.target.files)==null?void 0:i[0];if(!o)return;const n=new FileReader;n.onload=()=>{this.account.avatar=n.result,this.requestUpdate()},n.readAsDataURL(o)},t.click()},this._handleAvatarRemove=()=>{this.account.avatar="https://via.placeholder.com/80",this.showAvatarMenu=!1},this._handleClickOutside=t=>{if(!this.showAvatarMenu)return;const r=t.target,o=this.querySelector("pont-account-info"),n=this.querySelector("pont-card");o!=null&&o.contains(r)||n!=null&&n.contains(r)||(this.showAvatarMenu=!1)},this._handleOpenProfile=this._handleOpenProfile.bind(this),this._handleCloseProfile=this._handleCloseProfile.bind(this),window.addEventListener("open-user-profile",this._handleOpenProfile),window.addEventListener("close-user-profile",this._handleCloseProfile)}get isModal(){return this.mode===pr.MODAL}get isVerticalOrientation(){return this.orientation===Lr.VERTICAL}get isHorizontalOrientation(){return this.orientation===Lr.HORIZONTAL}get isBurger(){return this.sidebarDisplayType===Ke.BURGER}get sidebarDisplayType(){return this.isVerticalOrientation||this.currentBreakpoint==="md"?Ke.REGULAR:Ke.BURGER}get layoutKey(){return`${this.orientation}|${this.mode}|${this.widgetsLayout}|${this.mobileDisplay}`}get containerClasses(){const t=this.isBurger||this.isVerticalOrientation;return Vt(Nw,this.isModal?Bw:Mw,this.isModal?kw:Fw,t?"!pont-flex-col":"!pont-flex-row")}get contentClasses(){return Vt("pont-flex-grow",this.isModal?`pont-account-settings-modal-content ${this.isHorizontalOrientation?"pont-account-settings-modal-content-horizontal":""}`:"pont-account-settings-content-md-max-height-full",this.isVerticalOrientation?"pont-account-settings-vertical-margin":"")}connectedCallback(){super.connectedCallback(),this._updateBreakpoint(),window.addEventListener("resize",this._handleResize),document.addEventListener("remove-avatar",this._handleAvatarRemove),document.addEventListener("click",this._handleClickOutside),document.addEventListener("close-user-profile",this._handleCloseProfile),document.addEventListener("open-user-profile",this._handleOpenProfile),document.addEventListener("change-avatar",this._handleAvatarChange)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._handleResize),document.removeEventListener("remove-avatar",this._handleAvatarRemove),document.removeEventListener("click",this._handleClickOutside),document.removeEventListener("close-user-profile",this._handleCloseProfile),document.removeEventListener("open-user-profile",this._handleOpenProfile),document.removeEventListener("change-avatar",this._handleAvatarChange)}updated(t){t.has("mode")&&(this.isModal?this.isOpen=!1:this.isOpen=!0),t.has("userContextValue")&&this.userContextValue.user&&this.tryRemoveFallback(),t.has("auth")&&this.loadUser()}firstUpdated(){this.__initialized||(this.__initialized=!0,this.style.width="100%",this.style.display="flex",this.style.justifyContent="center",this.style.flexDirection="column")}fillProfileData(t){var r;this.account={...this.account,avatar:t.picture||"",email:t.email||"",phone:t.phone||""},this.personal={...this.personal,bio:t.profile||"",first:t.given_name||"",last:t.family_name||"",username:t.username||"",gender:t.gender||"",middle:t.middle_name||"",nickname:t.nickname||""},this.location={...this.location,location:((r=t.address)==null?void 0:r.locality)||"",zoneInfo:t.zoneinfo||""},this.urls={...this.urls,website:t.website||""}}async loadUser(){var t,r;if(!(!((t=this.auth)!=null&&t.resolved)||!this.auth.isAuthenticated)&&!(this._userLoaded||this._userLoading)&&(this.userContextValue.identifier=((r=K.getAuthenticatedUser())==null?void 0:r.email)??"",!!this.userContextValue.identifier)){this._userLoading=!0;try{this.userContextValue.user=await R0(),this.tryRemoveFallback(),this.fillProfileData(this.userContextValue.user),this._userLoaded=!0}catch(o){console.error("[pont-account-settings] Failed loading user:",o)}finally{this._userLoading=!1}}}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}_updateBreakpoint(){const t=window.innerWidth;this.currentBreakpoint=t<yc.xs?"xs":t<yc.sm?"sm":"md"}renderWatermark(){return this.isVerticalOrientation?l`
4573
+ `}};on([a({type:String})],_r.prototype,"orientation",2);on([a({type:String})],_r.prototype,"displayType",2);on([a({type:String})],_r.prototype,"mode",2);on([a({type:Object})],_r.prototype,"config",2);on([a({type:String})],_r.prototype,"activeTab",2);on([g()],_r.prototype,"isMenuOpen",2);_r=on([p("pont-profile-sidebar")],_r);function xl(){document.dispatchEvent(new CustomEvent("open-user-profile",{bubbles:!0,composed:!0}))}function Ol(){document.dispatchEvent(new CustomEvent("close-user-profile",{bubbles:!0,composed:!0}))}function Wh(){document.dispatchEvent(new CustomEvent("open-member-management",{bubbles:!0,composed:!0}))}function Yh(){document.dispatchEvent(new CustomEvent("close-member-management",{bubbles:!0,composed:!0}))}function Qh(e){document.dispatchEvent(new CustomEvent("pont:set-locales",{detail:{locales:e},bubbles:!0,composed:!0}))}typeof window<"u"&&(window.__pontCoreSdk||(window.__pontCoreSdk={}),window.__pontCoreSdk.openAccountSettingsModal=xl,window.__pontCoreSdk.closeAccountSettingsModal=Ol,window.__pontCoreSdk.openMemberManagementModal=Wh,window.__pontCoreSdk.closeMemberManagementModal=Yh,window.__pontCoreSdk.setLocales=Qh);var J0=Object.defineProperty,jt=(e,t,r,o)=>{for(var n=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(t,r,n)||n);return n&&J0(t,r,n),n};class Rt extends f{constructor(){super(),this.showAvatarMenu=!1,this.orientation=Lr.HORIZONTAL,this.mobileDisplay=Ke.REGULAR,this.mode=pr.PAGE,this.widgetsLayout=nt.ROW,this.content=null,this.isOpen=!1,this.currentBreakpoint="md",this.activeTab=ve.PROFILE,this._userLoaded=!1,this._userLoading=!1,this.userContextValue={user:null,identifier:null},this.__initialized=!1,this.account={email:"",phone:"",avatar:""},this.personal={username:"",first:"",middle:"",last:"",nickname:"",gender:"",bio:""},this.location={location:"",zoneInfo:""},this.urls={website:""},this._handleResize=()=>{this._updateBreakpoint()},this._handleCloseProfile=()=>{this.isModal&&(this.isOpen=!1)},this._handleOpenProfile=()=>{this.isModal&&(this.isOpen=!0)},this._toggleAvatarMenu=t=>{t.stopPropagation(),this.showAvatarMenu=!this.showAvatarMenu},this._handleAvatarChange=()=>{const t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=r=>{var i;const o=(i=r.target.files)==null?void 0:i[0];if(!o)return;const n=new FileReader;n.onload=()=>{this.account.avatar=n.result,this.requestUpdate()},n.readAsDataURL(o)},t.click()},this._handleAvatarRemove=()=>{this.account.avatar="https://via.placeholder.com/80",this.showAvatarMenu=!1},this._handleClickOutside=t=>{if(!this.showAvatarMenu)return;const r=t.target,o=this.querySelector("pont-account-info"),n=this.querySelector("pont-card");o!=null&&o.contains(r)||n!=null&&n.contains(r)||(this.showAvatarMenu=!1)},this._handleOpenProfile=this._handleOpenProfile.bind(this),this._handleCloseProfile=this._handleCloseProfile.bind(this),window.addEventListener("open-user-profile",this._handleOpenProfile),window.addEventListener("close-user-profile",this._handleCloseProfile)}get isModal(){return this.mode===pr.MODAL}get isVerticalOrientation(){return this.orientation===Lr.VERTICAL}get isHorizontalOrientation(){return this.orientation===Lr.HORIZONTAL}get isBurger(){return this.sidebarDisplayType===Ke.BURGER}get sidebarDisplayType(){return this.isVerticalOrientation||this.currentBreakpoint==="md"?Ke.REGULAR:Ke.BURGER}get layoutKey(){return`${this.orientation}|${this.mode}|${this.widgetsLayout}|${this.mobileDisplay}`}get containerClasses(){const t=this.isBurger||this.isVerticalOrientation;return zt(Nw,this.isModal?Bw:Mw,this.isModal?kw:Fw,t?"!pont-flex-col":"!pont-flex-row")}get contentClasses(){return zt("pont-flex-grow",this.isModal?`pont-account-settings-modal-content ${this.isHorizontalOrientation?"pont-account-settings-modal-content-horizontal":""}`:"pont-account-settings-content-md-max-height-full",this.isVerticalOrientation?"pont-account-settings-vertical-margin":"")}connectedCallback(){super.connectedCallback(),this._updateBreakpoint(),window.addEventListener("resize",this._handleResize),document.addEventListener("remove-avatar",this._handleAvatarRemove),document.addEventListener("click",this._handleClickOutside),document.addEventListener("close-user-profile",this._handleCloseProfile),document.addEventListener("open-user-profile",this._handleOpenProfile),document.addEventListener("change-avatar",this._handleAvatarChange)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._handleResize),document.removeEventListener("remove-avatar",this._handleAvatarRemove),document.removeEventListener("click",this._handleClickOutside),document.removeEventListener("close-user-profile",this._handleCloseProfile),document.removeEventListener("open-user-profile",this._handleOpenProfile),document.removeEventListener("change-avatar",this._handleAvatarChange)}updated(t){t.has("mode")&&(this.isModal?this.isOpen=!1:this.isOpen=!0),t.has("userContextValue")&&this.userContextValue.user&&this.tryRemoveFallback(),t.has("auth")&&this.loadUser()}firstUpdated(){this.__initialized||(this.__initialized=!0,this.style.width="100%",this.style.display="flex",this.style.justifyContent="center",this.style.flexDirection="column")}fillProfileData(t){var r;this.account={...this.account,avatar:t.picture||"",email:t.email||"",phone:t.phone||""},this.personal={...this.personal,bio:t.profile||"",first:t.given_name||"",last:t.family_name||"",username:t.username||"",gender:t.gender||"",middle:t.middle_name||"",nickname:t.nickname||""},this.location={...this.location,location:((r=t.address)==null?void 0:r.locality)||"",zoneInfo:t.zoneinfo||""},this.urls={...this.urls,website:t.website||""}}async loadUser(){var t,r;if(!(!((t=this.auth)!=null&&t.resolved)||!this.auth.isAuthenticated)&&!(this._userLoaded||this._userLoading)&&(this.userContextValue.identifier=((r=G.getAuthenticatedUser())==null?void 0:r.email)??"",!!this.userContextValue.identifier)){this._userLoading=!0;try{this.userContextValue.user=await R0(),this.tryRemoveFallback(),this.fillProfileData(this.userContextValue.user),this._userLoaded=!0}catch(o){console.error("[pont-account-settings] Failed loading user:",o)}finally{this._userLoading=!1}}}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}_updateBreakpoint(){const t=window.innerWidth;this.currentBreakpoint=t<yc.xs?"xs":t<yc.sm?"sm":"md"}renderWatermark(){return this.isVerticalOrientation?l`
4584
4574
  <div class="pont-account-settings-watermark-container">
4585
4575
  <pont-watermark custom-id="pont-watermark"></pont-watermark>
4586
4576
  </div>
4587
- `:h}renderMainContent(){const t=this.isHorizontalOrientation?"vertical":"horizontal";return Wh(this.layoutKey,l`
4577
+ `:h}renderMainContent(){const t=this.isHorizontalOrientation?"vertical":"horizontal";return Kh(this.layoutKey,l`
4588
4578
  <div
4589
4579
  ?hidden=${this.isBurger}
4590
- class=${Vt("pont-account-settings-header",this.isVerticalOrientation?"pont-account-settings-header-vertical":"",this.isBurger?"!pont-hidden":"")}
4580
+ class=${zt("pont-account-settings-header",this.isVerticalOrientation?"pont-account-settings-header-vertical":"",this.isBurger?"!pont-hidden":"")}
4591
4581
  >
4592
4582
  <pont-typography-h level="h3">Account Settings</pont-typography-h>
4593
4583
  </div>
@@ -4661,7 +4651,7 @@ Minimum version required to store current data is: `+F+`.
4661
4651
  ${this.renderMainContent()}
4662
4652
  </div>
4663
4653
  </pont-modal>
4664
- `:this.renderMainContent():h:this.isModal?h:this.renderLoadingSkeleton()}createRenderRoot(){return this}}qt([a({type:Boolean})],Rt.prototype,"showAvatarMenu");qt([a({type:String})],Rt.prototype,"orientation");qt([a({type:String})],Rt.prototype,"mobileDisplay");qt([a({type:String,reflect:!0})],Rt.prototype,"mode");qt([a({type:String})],Rt.prototype,"widgetsLayout");qt([a({type:Object})],Rt.prototype,"content");qt([g()],Rt.prototype,"isOpen");qt([g()],Rt.prototype,"currentBreakpoint");qt([g()],Rt.prototype,"activeTab");qt([yt({context:Pr,subscribe:!0}),a({attribute:!1})],Rt.prototype,"auth");qt([g()],Rt.prototype,"_userLoaded");qt([g()],Rt.prototype,"_userLoading");qt([Wt({context:ko}),g()],Rt.prototype,"userContextValue");customElements.define("pont-account-settings",Rt);var X0=Object.defineProperty,tC=Object.getOwnPropertyDescriptor,Jh=(e,t,r,o)=>{for(var n=o>1?void 0:o?tC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&X0(t,r,n),n};exports.PontSecuritySettings=class extends f{constructor(){super(...arguments),this.loading=!1}render(){return this.loading?l`<div class="pont-account-settings-security-loading">
4654
+ `:this.renderMainContent():h:this.isModal?h:this.renderLoadingSkeleton()}createRenderRoot(){return this}}jt([a({type:Boolean})],Rt.prototype,"showAvatarMenu");jt([a({type:String})],Rt.prototype,"orientation");jt([a({type:String})],Rt.prototype,"mobileDisplay");jt([a({type:String,reflect:!0})],Rt.prototype,"mode");jt([a({type:String})],Rt.prototype,"widgetsLayout");jt([a({type:Object})],Rt.prototype,"content");jt([g()],Rt.prototype,"isOpen");jt([g()],Rt.prototype,"currentBreakpoint");jt([g()],Rt.prototype,"activeTab");jt([yt({context:Pr,subscribe:!0}),a({attribute:!1})],Rt.prototype,"auth");jt([g()],Rt.prototype,"_userLoaded");jt([g()],Rt.prototype,"_userLoading");jt([Wt({context:ko}),g()],Rt.prototype,"userContextValue");customElements.define("pont-account-settings",Rt);var X0=Object.defineProperty,tC=Object.getOwnPropertyDescriptor,Zh=(e,t,r,o)=>{for(var n=o>1?void 0:o?tC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&X0(t,r,n),n};exports.PontSecuritySettings=class extends f{constructor(){super(...arguments),this.loading=!1}render(){return this.loading?l`<div class="pont-account-settings-security-loading">
4665
4655
  Loading security settings...
4666
4656
  </div>`:l`
4667
4657
  <div class="pont-account-settings-security-panel">
@@ -4695,7 +4685,7 @@ Minimum version required to store current data is: `+F+`.
4695
4685
  -->
4696
4686
  </pont-empty>
4697
4687
  </div>
4698
- `}createRenderRoot(){return this}};Jh([a({type:Boolean})],exports.PontSecuritySettings.prototype,"loading",2);exports.PontSecuritySettings=Jh([p("pont-security-settings")],exports.PontSecuritySettings);class eC extends f{createRenderRoot(){return this}generateBlockProps(t){switch(t){case"total-members":case"active-members":return{title:"Active Members",content:"100",icon:QP};case"pending-invites":return{title:"Pending Invites",content:"8",icon:jh};case"inactive-members":return{title:"Inactive Members",content:"1",icon:ZP}}}statisticBlock({title:t,content:r,icon:o}){return l` <pont-card>
4688
+ `}createRenderRoot(){return this}};Zh([a({type:Boolean})],exports.PontSecuritySettings.prototype,"loading",2);exports.PontSecuritySettings=Zh([p("pont-security-settings")],exports.PontSecuritySettings);class eC extends f{createRenderRoot(){return this}generateBlockProps(t){switch(t){case"total-members":case"active-members":return{title:"Active Members",content:"100",icon:ZP};case"pending-invites":return{title:"Pending Invites",content:"8",icon:QP};case"inactive-members":return{title:"Inactive Members",content:"1",icon:JP}}}statisticBlock({title:t,content:r,icon:o}){return l` <pont-card>
4699
4689
  <pont-card-header>
4700
4690
  <div class="pont-statistic-block-header">
4701
4691
  <pont-typography-muted>${t}</pont-typography-muted>
@@ -4712,7 +4702,7 @@ Minimum version required to store current data is: `+F+`.
4712
4702
  ${this.statisticBlock(this.generateBlockProps("pending-invites"))}
4713
4703
  ${this.statisticBlock(this.generateBlockProps("inactive-members"))}
4714
4704
  </div>
4715
- `}}customElements.define("pont-monitoring-cards",eC);var rC=Object.defineProperty,nC=Object.getOwnPropertyDescriptor,Zt=(e,t,r,o)=>{for(var n=o>1?void 0:o?nC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&rC(t,r,n),n};let Bt=class extends f{constructor(){super(...arguments),this.drawerId="pont-member-invite",this.organizationId="",this.emails=[],this.roles=[],this.availableRoles=[],this.expiryDays="7",this.customMessage="",this.errors={},this.open=!1,this.isLoading=!1,this.isLoadingRoles=!1,this._handleOpenDrawer=e=>{const t=e.detail,r=(t==null?void 0:t.id)||(t==null?void 0:t.drawer_id);r&&r!==this.drawerId||(this.open=!0,this.organizationId&&this.loadRoles())},this._handleCloseDrawer=e=>{const t=e.detail,r=(t==null?void 0:t.id)||(t==null?void 0:t.drawer_id);r&&r!==this.drawerId||(this.open=!1)},this._handleDrawerClosed=()=>{this.open=!1}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),document.addEventListener("open-sidedrawer",this._handleOpenDrawer),document.addEventListener("close-sidedrawer",this._handleCloseDrawer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("open-sidedrawer",this._handleOpenDrawer),document.removeEventListener("close-sidedrawer",this._handleCloseDrawer)}async loadRoles(){try{this.isLoadingRoles=!0;const e={resource_id:this.organizationId,resource_type:"organization"},t=await Sl(e);this.availableRoles=t.data.map(r=>({value:r.key||r.name,label:r.name,description:r.description||void 0,disabled:!1}))}catch(e){console.error("Failed to load roles:",e)}finally{this.isLoadingRoles=!1}}close(){this.open=!1,window.dispatchEvent(new CustomEvent("close-sidedrawer",{detail:{id:this.drawerId}}))}onEmailsChange(e){this.emails=e,this.errors={...this.errors,emails:void 0}}onRolesChange(e){this.roles=e,this.errors={...this.errors,roles:void 0}}handleExpiryInput(e){this.expiryDays=e.target.value}handleMessageInput(e){this.customMessage=e.target.value}async handleSend(){var r;const e={};if(this.emails.length===0&&(e.emails="Please enter at least one email address."),this.roles.length===0&&(e.roles="Please select at least one role."),Object.keys(e).length>0){this.errors=e;return}if(!this.organizationId){console.error("Organization ID is required");return}const t={emails:this.emails,roles:this.roles,invited_by:(r=K.getAuthenticatedUser())==null?void 0:r.sub,message:this.customMessage||void 0};this.isLoading=!0;try{const o=await D0(this.organizationId,t);this.emails=[],this.roles=[],this.expiryDays="7",this.customMessage="",this.errors={},window.dispatchEvent(new CustomEvent("invite-members-success",{detail:{organizationId:this.organizationId,response:o}})),this.close()}catch(o){console.error("Failed to send invites:",o),this.errors={...this.errors,emails:"Failed to send invites. Please try again."}}finally{this.isLoading=!1}}render(){return l`
4705
+ `}}customElements.define("pont-monitoring-cards",eC);var rC=Object.defineProperty,nC=Object.getOwnPropertyDescriptor,Zt=(e,t,r,o)=>{for(var n=o>1?void 0:o?nC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&rC(t,r,n),n};let Bt=class extends f{constructor(){super(...arguments),this.drawerId="pont-member-invite",this.organizationId="",this.emails=[],this.roles=[],this.availableRoles=[],this.expiryDays="7",this.customMessage="",this.errors={},this.open=!1,this.isLoading=!1,this.isLoadingRoles=!1,this._handleOpenDrawer=e=>{const t=e.detail,r=(t==null?void 0:t.id)||(t==null?void 0:t.drawer_id);r&&r!==this.drawerId||(this.open=!0,this.organizationId&&this.loadRoles())},this._handleCloseDrawer=e=>{const t=e.detail,r=(t==null?void 0:t.id)||(t==null?void 0:t.drawer_id);r&&r!==this.drawerId||(this.open=!1)},this._handleDrawerClosed=()=>{this.open=!1}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),document.addEventListener("open-sidedrawer",this._handleOpenDrawer),document.addEventListener("close-sidedrawer",this._handleCloseDrawer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("open-sidedrawer",this._handleOpenDrawer),document.removeEventListener("close-sidedrawer",this._handleCloseDrawer)}async loadRoles(){try{this.isLoadingRoles=!0;const e={resource_id:this.organizationId,resource_type:"organization"},t=await Sl(e);this.availableRoles=t.data.map(r=>({value:r.key||r.name,label:r.name,description:r.description||void 0,disabled:!1}))}catch(e){console.error("Failed to load roles:",e)}finally{this.isLoadingRoles=!1}}close(){this.open=!1,window.dispatchEvent(new CustomEvent("close-sidedrawer",{detail:{id:this.drawerId}}))}onEmailsChange(e){this.emails=e,this.errors={...this.errors,emails:void 0}}onRolesChange(e){this.roles=e,this.errors={...this.errors,roles:void 0}}handleExpiryInput(e){this.expiryDays=e.target.value}handleMessageInput(e){this.customMessage=e.target.value}async handleSend(){var r;const e={};if(this.emails.length===0&&(e.emails="Please enter at least one email address."),this.roles.length===0&&(e.roles="Please select at least one role."),Object.keys(e).length>0){this.errors=e;return}if(!this.organizationId){console.error("Organization ID is required");return}const t={emails:this.emails,roles:this.roles,invited_by:(r=G.getAuthenticatedUser())==null?void 0:r.sub,message:this.customMessage||void 0};this.isLoading=!0;try{const o=await D0(this.organizationId,t);this.emails=[],this.roles=[],this.expiryDays="7",this.customMessage="",this.errors={},window.dispatchEvent(new CustomEvent("invite-members-success",{detail:{organizationId:this.organizationId,response:o}})),this.close()}catch(o){console.error("Failed to send invites:",o),this.errors={...this.errors,emails:"Failed to send invites. Please try again."}}finally{this.isLoading=!1}}render(){return l`
4716
4706
  <pont-sidedrawer
4717
4707
  id=${this.drawerId}
4718
4708
  side="right"
@@ -4851,7 +4841,7 @@ Minimum version required to store current data is: `+F+`.
4851
4841
  </div>
4852
4842
  </div>
4853
4843
  </pont-sidedrawer>
4854
- `}};Zt([a({type:String})],Bt.prototype,"drawerId",2);Zt([a({type:String})],Bt.prototype,"organizationId",2);Zt([g()],Bt.prototype,"emails",2);Zt([g()],Bt.prototype,"roles",2);Zt([g()],Bt.prototype,"availableRoles",2);Zt([g()],Bt.prototype,"expiryDays",2);Zt([g()],Bt.prototype,"customMessage",2);Zt([g()],Bt.prototype,"errors",2);Zt([g()],Bt.prototype,"open",2);Zt([g()],Bt.prototype,"isLoading",2);Zt([g()],Bt.prototype,"isLoadingRoles",2);Bt=Zt([p("pont-invite-members-form")],Bt);var oC=Object.defineProperty,iC=Object.getOwnPropertyDescriptor,Me=(e,t,r,o)=>{for(var n=o>1?void 0:o?iC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&oC(t,r,n),n};let ae=class extends f{constructor(){super(...arguments),this.drawerId="pont-manage-roles",this.organizationId="",this.member=null,this.selectedRoles=[],this.availableRoles=[],this.errors={},this.open=!1,this.isLoading=!1,this.isLoadingRoles=!1,this._handleOpenDrawer=e=>{const t=e.detail,r=(t==null?void 0:t.id)||(t==null?void 0:t.drawer_id);r&&r!==this.drawerId||(this.open=!0,this.member&&(this.selectedRoles=(this.member.roles||[]).map(o=>o.key)),this.organizationId&&this.loadRoles())},this._handleCloseDrawer=e=>{const t=e.detail,r=(t==null?void 0:t.id)||(t==null?void 0:t.drawer_id);r&&r!==this.drawerId||(this.open=!1)},this._handleDrawerClosed=()=>{this.open=!1}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),document.addEventListener("open-sidedrawer",this._handleOpenDrawer),document.addEventListener("close-sidedrawer",this._handleCloseDrawer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("open-sidedrawer",this._handleOpenDrawer),document.removeEventListener("close-sidedrawer",this._handleCloseDrawer)}updated(e){e.has("member")&&this.member&&(console.log(this.member),this.selectedRoles=(this.member.roles||[]).map(t=>t.key))}async loadRoles(){try{this.isLoadingRoles=!0;const e={resource_id:this.organizationId,resource_type:"organization"},t=await Sl(e);this.availableRoles=t.data.map(r=>({value:r.key||r.name,label:r.name,description:r.description||void 0,disabled:!1}))}catch(e){console.error("Failed to load roles:",e)}finally{this.isLoadingRoles=!1}}close(){this.open=!1,window.dispatchEvent(new CustomEvent("close-sidedrawer",{detail:{id:this.drawerId}}))}onRolesChange(e){this.selectedRoles=e,this.errors={...this.errors,roles:void 0}}async handleSave(){var r;const e={};if(this.selectedRoles.length===0&&(e.roles="Please select at least one role."),Object.keys(e).length>0){this.errors=e;return}if(!this.organizationId){console.error("Organization ID is required");return}if(!((r=this.member)!=null&&r.user.id)){console.error("User ID is required");return}const t={roles:this.selectedRoles};this.isLoading=!0;try{const o=await A0(this.organizationId,this.member.user.id,t);console.log("Member roles updated successfully:",o),this.errors={},window.dispatchEvent(new CustomEvent("update-members-role",{detail:{organizationId:this.organizationId,userId:this.member.user.id,roles:this.selectedRoles,response:o},bubbles:!0,composed:!0})),this.close()}catch(o){console.error("Failed to update member roles:",o),this.errors={...this.errors,roles:"Failed to update member roles. Please try again."}}finally{this.isLoading=!1}}render(){var e;return l`
4844
+ `}};Zt([a({type:String})],Bt.prototype,"drawerId",2);Zt([a({type:String})],Bt.prototype,"organizationId",2);Zt([g()],Bt.prototype,"emails",2);Zt([g()],Bt.prototype,"roles",2);Zt([g()],Bt.prototype,"availableRoles",2);Zt([g()],Bt.prototype,"expiryDays",2);Zt([g()],Bt.prototype,"customMessage",2);Zt([g()],Bt.prototype,"errors",2);Zt([g()],Bt.prototype,"open",2);Zt([g()],Bt.prototype,"isLoading",2);Zt([g()],Bt.prototype,"isLoadingRoles",2);Bt=Zt([p("pont-invite-members-form")],Bt);var oC=Object.defineProperty,iC=Object.getOwnPropertyDescriptor,Me=(e,t,r,o)=>{for(var n=o>1?void 0:o?iC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&oC(t,r,n),n};let se=class extends f{constructor(){super(...arguments),this.drawerId="pont-manage-roles",this.organizationId="",this.member=null,this.selectedRoles=[],this.availableRoles=[],this.errors={},this.open=!1,this.isLoading=!1,this.isLoadingRoles=!1,this._handleOpenDrawer=e=>{const t=e.detail,r=(t==null?void 0:t.id)||(t==null?void 0:t.drawer_id);r&&r!==this.drawerId||(this.open=!0,this.member&&(this.selectedRoles=(this.member.roles||[]).map(o=>o.key)),this.organizationId&&this.loadRoles())},this._handleCloseDrawer=e=>{const t=e.detail,r=(t==null?void 0:t.id)||(t==null?void 0:t.drawer_id);r&&r!==this.drawerId||(this.open=!1)},this._handleDrawerClosed=()=>{this.open=!1}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),document.addEventListener("open-sidedrawer",this._handleOpenDrawer),document.addEventListener("close-sidedrawer",this._handleCloseDrawer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("open-sidedrawer",this._handleOpenDrawer),document.removeEventListener("close-sidedrawer",this._handleCloseDrawer)}updated(e){e.has("member")&&this.member&&(console.log(this.member),this.selectedRoles=(this.member.roles||[]).map(t=>t.key))}async loadRoles(){try{this.isLoadingRoles=!0;const e={resource_id:this.organizationId,resource_type:"organization"},t=await Sl(e);this.availableRoles=t.data.map(r=>({value:r.key||r.name,label:r.name,description:r.description||void 0,disabled:!1}))}catch(e){console.error("Failed to load roles:",e)}finally{this.isLoadingRoles=!1}}close(){this.open=!1,window.dispatchEvent(new CustomEvent("close-sidedrawer",{detail:{id:this.drawerId}}))}onRolesChange(e){this.selectedRoles=e,this.errors={...this.errors,roles:void 0}}async handleSave(){var r;const e={};if(this.selectedRoles.length===0&&(e.roles="Please select at least one role."),Object.keys(e).length>0){this.errors=e;return}if(!this.organizationId){console.error("Organization ID is required");return}if(!((r=this.member)!=null&&r.user.id)){console.error("User ID is required");return}const t={roles:this.selectedRoles};this.isLoading=!0;try{const o=await A0(this.organizationId,this.member.user.id,t);console.log("Member roles updated successfully:",o),this.errors={},window.dispatchEvent(new CustomEvent("update-members-role",{detail:{organizationId:this.organizationId,userId:this.member.user.id,roles:this.selectedRoles,response:o},bubbles:!0,composed:!0})),this.close()}catch(o){console.error("Failed to update member roles:",o),this.errors={...this.errors,roles:"Failed to update member roles. Please try again."}}finally{this.isLoading=!1}}render(){var e;return l`
4855
4845
  <pont-sidedrawer
4856
4846
  id=${this.drawerId}
4857
4847
  side="right"
@@ -4947,7 +4937,7 @@ Minimum version required to store current data is: `+F+`.
4947
4937
  </div>
4948
4938
  </div>
4949
4939
  </pont-sidedrawer>
4950
- `}};Me([a({type:String})],ae.prototype,"drawerId",2);Me([a({type:String})],ae.prototype,"organizationId",2);Me([a({type:Object})],ae.prototype,"member",2);Me([g()],ae.prototype,"selectedRoles",2);Me([g()],ae.prototype,"availableRoles",2);Me([g()],ae.prototype,"errors",2);Me([g()],ae.prototype,"open",2);Me([g()],ae.prototype,"isLoading",2);Me([g()],ae.prototype,"isLoadingRoles",2);ae=Me([p("pont-manage-roles-form")],ae);var sC=Object.defineProperty,aC=Object.getOwnPropertyDescriptor,he=(e,t,r,o)=>{for(var n=o>1?void 0:o?aC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&sC(t,r,n),n};let Gt=class extends f{constructor(){super(...arguments),this.open=!1,this.title="",this.warningText="",this.confirmLabel="Confirm",this.cancelLabel="Cancel",this.variant="default",this.isLoading=!1}createRenderRoot(){return this}handleClose(){var e;this.isLoading||(this.open=!1,(e=this.onCancel)==null||e.call(this),this.dispatchEvent(new CustomEvent("modal-closed",{bubbles:!0})))}handleCancel(){var e;this.isLoading||(this.open=!1,(e=this.onCancel)==null||e.call(this),this.dispatchEvent(new CustomEvent("modal-cancelled",{bubbles:!0})))}async handleConfirm(){var e;if(!this.isLoading)try{this.isLoading=!0;const t=(e=this.onConfirm)==null?void 0:e.call(this);t instanceof Promise&&await t,this.open=!1,this.dispatchEvent(new CustomEvent("modal-confirmed",{bubbles:!0}))}catch(t){console.error("Action failed:",t),this.dispatchEvent(new CustomEvent("modal-error",{bubbles:!0,detail:{error:t}}))}finally{this.isLoading=!1}}render(){return l`
4940
+ `}};Me([a({type:String})],se.prototype,"drawerId",2);Me([a({type:String})],se.prototype,"organizationId",2);Me([a({type:Object})],se.prototype,"member",2);Me([g()],se.prototype,"selectedRoles",2);Me([g()],se.prototype,"availableRoles",2);Me([g()],se.prototype,"errors",2);Me([g()],se.prototype,"open",2);Me([g()],se.prototype,"isLoading",2);Me([g()],se.prototype,"isLoadingRoles",2);se=Me([p("pont-manage-roles-form")],se);var sC=Object.defineProperty,aC=Object.getOwnPropertyDescriptor,pe=(e,t,r,o)=>{for(var n=o>1?void 0:o?aC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&sC(t,r,n),n};let Ht=class extends f{constructor(){super(...arguments),this.open=!1,this.title="",this.warningText="",this.confirmLabel="Confirm",this.cancelLabel="Cancel",this.variant="default",this.isLoading=!1}createRenderRoot(){return this}handleClose(){var e;this.isLoading||(this.open=!1,(e=this.onCancel)==null||e.call(this),this.dispatchEvent(new CustomEvent("modal-closed",{bubbles:!0})))}handleCancel(){var e;this.isLoading||(this.open=!1,(e=this.onCancel)==null||e.call(this),this.dispatchEvent(new CustomEvent("modal-cancelled",{bubbles:!0})))}async handleConfirm(){var e;if(!this.isLoading)try{this.isLoading=!0;const t=(e=this.onConfirm)==null?void 0:e.call(this);t instanceof Promise&&await t,this.open=!1,this.dispatchEvent(new CustomEvent("modal-confirmed",{bubbles:!0}))}catch(t){console.error("Action failed:",t),this.dispatchEvent(new CustomEvent("modal-error",{bubbles:!0,detail:{error:t}}))}finally{this.isLoading=!1}}render(){return l`
4951
4941
  <pont-modal
4952
4942
  part="no_min_width"
4953
4943
  .isOpen=${this.open}
@@ -4995,7 +4985,7 @@ Minimum version required to store current data is: `+F+`.
4995
4985
  </div>
4996
4986
  </div>
4997
4987
  </pont-modal>
4998
- `}};he([a({type:Boolean})],Gt.prototype,"open",2);he([a({type:String})],Gt.prototype,"title",2);he([a({attribute:!1})],Gt.prototype,"description",2);he([a({type:String})],Gt.prototype,"warningText",2);he([a({type:String})],Gt.prototype,"confirmLabel",2);he([a({type:String})],Gt.prototype,"cancelLabel",2);he([a({type:String})],Gt.prototype,"variant",2);he([g()],Gt.prototype,"isLoading",2);he([a({attribute:!1})],Gt.prototype,"onConfirm",2);he([a({attribute:!1})],Gt.prototype,"onCancel",2);Gt=he([p("pont-members-action-modal")],Gt);var lC=Object.defineProperty,dC=Object.getOwnPropertyDescriptor,ue=(e,t,r,o)=>{for(var n=o>1?void 0:o?dC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&lC(t,r,n),n};let Kt=class extends f{constructor(){super(...arguments),this.members=[],this.membersLoading=!1,this.searchTerm="",this.memberFilters={roles:[]},this.availableRoles=[],this.membersPage=1,this.membersTotalPages=0,this.membersTotal=0,this.rowsPerPage=5}createRenderRoot(){return this}dispatchMembersSearchChange(e){this.dispatchEvent(new CustomEvent("members-search-change",{detail:{searchTerm:e},bubbles:!0,composed:!0}))}handleMembersSearchChange(e){const t=e.target;this.searchTerm=t.value,this._searchDebounceTimer&&window.clearTimeout(this._searchDebounceTimer),this._searchDebounceTimer=window.setTimeout(()=>{this._searchDebounceTimer=void 0,this.dispatchMembersSearchChange(this.searchTerm)},300)}handleMembersPageChange(e){this.dispatchEvent(new CustomEvent("members-page-change",{detail:{page:e.detail.page},bubbles:!0,composed:!0}))}handleRowsPerPageChange(e){const t=parseInt(e.target.value,10);this.dispatchEvent(new CustomEvent("members-rows-per-page-change",{detail:{rowsPerPage:t},bubbles:!0,composed:!0}))}handleRefresh(){this.dispatchEvent(new CustomEvent("members-refresh",{bubbles:!0,composed:!0}))}handleRolesChange(e){this.dispatchEvent(new CustomEvent("members-filter-change",{detail:{roles:e.detail.selected},bubbles:!0,composed:!0}))}clearFilters(){this.dispatchEvent(new CustomEvent("members-clear-filters",{bubbles:!0,composed:!0}))}removeFilter(e){this.dispatchEvent(new CustomEvent("members-remove-filter",{detail:{filterValue:e},bubbles:!0,composed:!0}))}dispatchMemberAction(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}filterData(e,t){return t.trim()?e.filter(r=>Object.values(r).some(o=>typeof o=="string"?o.toLowerCase().includes(t.toLowerCase()):!1)):e}transformMemberWithName(e){var t,r,o,n;return{...e,name:((t=e.user)==null?void 0:t.name)||((r=e.user)==null?void 0:r.email)||"Unknown User",email:((o=e.user)==null?void 0:o.email)||"",avatar_url:((n=e.user)==null?void 0:n.picture)||""}}getSelectedFiltersDisplay(){var t;const e=[];return(t=this.memberFilters.roles)!=null&&t.length&&this.memberFilters.roles.forEach(r=>{var n;const o=((n=this.availableRoles.find(i=>i.value===r))==null?void 0:n.label)||r;e.push({name:"roles",value:r,label:o})}),e}getMemberTableConfig(e){const t={name:(n,i)=>{var d,c,u,v;if(e)return l`
4988
+ `}};pe([a({type:Boolean})],Ht.prototype,"open",2);pe([a({type:String})],Ht.prototype,"title",2);pe([a({attribute:!1})],Ht.prototype,"description",2);pe([a({type:String})],Ht.prototype,"warningText",2);pe([a({type:String})],Ht.prototype,"confirmLabel",2);pe([a({type:String})],Ht.prototype,"cancelLabel",2);pe([a({type:String})],Ht.prototype,"variant",2);pe([g()],Ht.prototype,"isLoading",2);pe([a({attribute:!1})],Ht.prototype,"onConfirm",2);pe([a({attribute:!1})],Ht.prototype,"onCancel",2);Ht=pe([p("pont-members-action-modal")],Ht);var lC=Object.defineProperty,dC=Object.getOwnPropertyDescriptor,he=(e,t,r,o)=>{for(var n=o>1?void 0:o?dC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&lC(t,r,n),n};let Gt=class extends f{constructor(){super(...arguments),this.members=[],this.membersLoading=!1,this.searchTerm="",this.memberFilters={roles:[]},this.availableRoles=[],this.membersPage=1,this.membersTotalPages=0,this.membersTotal=0,this.rowsPerPage=5}createRenderRoot(){return this}dispatchMembersSearchChange(e){this.dispatchEvent(new CustomEvent("members-search-change",{detail:{searchTerm:e},bubbles:!0,composed:!0}))}handleMembersSearchChange(e){const t=e.target;this.searchTerm=t.value,this._searchDebounceTimer&&window.clearTimeout(this._searchDebounceTimer),this._searchDebounceTimer=window.setTimeout(()=>{this._searchDebounceTimer=void 0,this.dispatchMembersSearchChange(this.searchTerm)},300)}handleMembersPageChange(e){this.dispatchEvent(new CustomEvent("members-page-change",{detail:{page:e.detail.page},bubbles:!0,composed:!0}))}handleRowsPerPageChange(e){const t=parseInt(e.target.value,10);this.dispatchEvent(new CustomEvent("members-rows-per-page-change",{detail:{rowsPerPage:t},bubbles:!0,composed:!0}))}handleRefresh(){this.dispatchEvent(new CustomEvent("members-refresh",{bubbles:!0,composed:!0}))}handleRolesChange(e){this.dispatchEvent(new CustomEvent("members-filter-change",{detail:{roles:e.detail.selected},bubbles:!0,composed:!0}))}clearFilters(){this.dispatchEvent(new CustomEvent("members-clear-filters",{bubbles:!0,composed:!0}))}removeFilter(e){this.dispatchEvent(new CustomEvent("members-remove-filter",{detail:{filterValue:e},bubbles:!0,composed:!0}))}dispatchMemberAction(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}filterData(e,t){return t.trim()?e.filter(r=>Object.values(r).some(o=>typeof o=="string"?o.toLowerCase().includes(t.toLowerCase()):!1)):e}transformMemberWithName(e){var t,r,o,n;return{...e,name:((t=e.user)==null?void 0:t.name)||((r=e.user)==null?void 0:r.email)||"Unknown User",email:((o=e.user)==null?void 0:o.email)||"",avatar_url:((n=e.user)==null?void 0:n.picture)||""}}getSelectedFiltersDisplay(){var t;const e=[];return(t=this.memberFilters.roles)!=null&&t.length&&this.memberFilters.roles.forEach(r=>{var n;const o=((n=this.availableRoles.find(i=>i.value===r))==null?void 0:n.label)||r;e.push({name:"roles",value:r,label:o})}),e}getMemberTableConfig(e){const t={name:(n,i)=>{var d,c,u,v;if(e)return l`
4999
4989
  <div class="pont-flex pont-items-center pont-gap-2">
5000
4990
  <pont-skeleton
5001
4991
  class="pont-h-10 pont-w-10 pont-rounded-full"
@@ -5132,7 +5122,7 @@ Minimum version required to store current data is: `+F+`.
5132
5122
  </div>
5133
5123
  </div>
5134
5124
  <pont-button @click=${this.handleRefresh} variant="outline" size="icon">
5135
- ${qh()}
5125
+ ${jh()}
5136
5126
  </pont-button>
5137
5127
  </div>
5138
5128
 
@@ -5190,7 +5180,7 @@ Minimum version required to store current data is: `+F+`.
5190
5180
  </div>
5191
5181
  </div>
5192
5182
  `}
5193
- `}};ue([a({attribute:!1})],Kt.prototype,"members",2);ue([a({type:Boolean,attribute:!1})],Kt.prototype,"membersLoading",2);ue([a({type:String})],Kt.prototype,"searchTerm",2);ue([a({type:Object,attribute:!1})],Kt.prototype,"memberFilters",2);ue([a({type:Array,attribute:!1})],Kt.prototype,"availableRoles",2);ue([a({type:Number})],Kt.prototype,"membersPage",2);ue([a({type:Number})],Kt.prototype,"membersTotalPages",2);ue([a({type:Number})],Kt.prototype,"membersTotal",2);ue([a({type:Number})],Kt.prototype,"rowsPerPage",2);ue([g()],Kt.prototype,"_searchDebounceTimer",2);Kt=ue([p("pont-member-management-members-panel")],Kt);var cC=Object.defineProperty,pC=Object.getOwnPropertyDescriptor,Jt=(e,t,r,o)=>{for(var n=o>1?void 0:o?pC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&cC(t,r,n),n};let Ut=class extends f{constructor(){super(...arguments),this.invitations=[],this.invitationsLoading=!1,this.searchTerm="",this.invitationFilters={roles:[],status:[]},this.availableRoles=[],this.statusOptions=[],this.invitationsPage=1,this.invitationsTotalPages=0,this.invitationsTotal=0,this.rowsPerPage=5}createRenderRoot(){return this}dispatchInvitationsSearchChange(e){this.dispatchEvent(new CustomEvent("invitations-search-change",{detail:{searchTerm:e},bubbles:!0,composed:!0}))}handleInvitationsSearchChange(e){const t=e.target;this.searchTerm=t.value,this._searchDebounceTimer&&window.clearTimeout(this._searchDebounceTimer),this._searchDebounceTimer=window.setTimeout(()=>{this._searchDebounceTimer=void 0,this.dispatchInvitationsSearchChange(this.searchTerm)},300)}handleInvitationsPageChange(e){this.dispatchEvent(new CustomEvent("invitations-page-change",{detail:{page:e.detail.page},bubbles:!0,composed:!0}))}handleRowsPerPageChange(e){const t=parseInt(e.target.value,10);this.dispatchEvent(new CustomEvent("invitations-rows-per-page-change",{detail:{rowsPerPage:t},bubbles:!0,composed:!0}))}handleRefresh(){this.dispatchEvent(new CustomEvent("invitations-refresh",{bubbles:!0,composed:!0}))}handleRolesChange(e){this.dispatchEvent(new CustomEvent("invitations-filter-change",{detail:{roles:e.detail.selected,status:this.invitationFilters.status},bubbles:!0,composed:!0}))}handleStatusChange(e){this.dispatchEvent(new CustomEvent("invitations-filter-change",{detail:{...this.invitationFilters,status:e.detail.selected},bubbles:!0,composed:!0}))}clearFilters(){this.dispatchEvent(new CustomEvent("invitations-clear-filters",{bubbles:!0,composed:!0}))}removeFilter(e){this.dispatchEvent(new CustomEvent("invitations-remove-filter",{detail:{filterValue:e},bubbles:!0,composed:!0}))}dispatchInvitationAction(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}getSelectedFiltersDisplay(){var t,r;const e=[];return(t=this.invitationFilters.roles)!=null&&t.length&&this.invitationFilters.roles.forEach(o=>{var i;const n=((i=this.availableRoles.find(s=>s.value===o))==null?void 0:i.label)||o;e.push({name:"roles",value:o,label:n})}),(r=this.invitationFilters.status)!=null&&r.length&&this.invitationFilters.status.forEach(o=>{var i;const n=((i=this.statusOptions.find(s=>s.value===o))==null?void 0:i.label)||o;e.push({name:"status",value:o,label:n})}),e}getInvitationTableConfig(e){const t={invitee_email:n=>e?l`
5183
+ `}};he([a({attribute:!1})],Gt.prototype,"members",2);he([a({type:Boolean,attribute:!1})],Gt.prototype,"membersLoading",2);he([a({type:String})],Gt.prototype,"searchTerm",2);he([a({type:Object,attribute:!1})],Gt.prototype,"memberFilters",2);he([a({type:Array,attribute:!1})],Gt.prototype,"availableRoles",2);he([a({type:Number})],Gt.prototype,"membersPage",2);he([a({type:Number})],Gt.prototype,"membersTotalPages",2);he([a({type:Number})],Gt.prototype,"membersTotal",2);he([a({type:Number})],Gt.prototype,"rowsPerPage",2);he([g()],Gt.prototype,"_searchDebounceTimer",2);Gt=he([p("pont-member-management-members-panel")],Gt);var cC=Object.defineProperty,pC=Object.getOwnPropertyDescriptor,ue=(e,t,r,o)=>{for(var n=o>1?void 0:o?pC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&cC(t,r,n),n};let Kt=class extends f{constructor(){super(...arguments),this.invitations=[],this.invitationsLoading=!1,this.searchTerm="",this.invitationFilters={roles:[]},this.availableRoles=[],this.invitationsPage=1,this.invitationsTotalPages=0,this.invitationsTotal=0,this.rowsPerPage=5}createRenderRoot(){return this}dispatchInvitationsSearchChange(e){this.dispatchEvent(new CustomEvent("invitations-search-change",{detail:{searchTerm:e},bubbles:!0,composed:!0}))}handleInvitationsSearchChange(e){const t=e.target;this.searchTerm=t.value,this._searchDebounceTimer&&window.clearTimeout(this._searchDebounceTimer),this._searchDebounceTimer=window.setTimeout(()=>{this._searchDebounceTimer=void 0,this.dispatchInvitationsSearchChange(this.searchTerm)},300)}handleInvitationsPageChange(e){this.dispatchEvent(new CustomEvent("invitations-page-change",{detail:{page:e.detail.page},bubbles:!0,composed:!0}))}handleRowsPerPageChange(e){const t=parseInt(e.target.value,10);this.dispatchEvent(new CustomEvent("invitations-rows-per-page-change",{detail:{rowsPerPage:t},bubbles:!0,composed:!0}))}handleRefresh(){this.dispatchEvent(new CustomEvent("invitations-refresh",{bubbles:!0,composed:!0}))}handleRolesChange(e){this.dispatchEvent(new CustomEvent("invitations-filter-change",{detail:{roles:e.detail.selected},bubbles:!0,composed:!0}))}clearFilters(){this.dispatchEvent(new CustomEvent("invitations-clear-filters",{bubbles:!0,composed:!0}))}removeFilter(e){this.dispatchEvent(new CustomEvent("invitations-remove-filter",{detail:{filterValue:e},bubbles:!0,composed:!0}))}dispatchInvitationAction(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}getSelectedFiltersDisplay(){var t;const e=[];return(t=this.invitationFilters.roles)!=null&&t.length&&this.invitationFilters.roles.forEach(r=>{var n;const o=((n=this.availableRoles.find(i=>i.value===r))==null?void 0:n.label)||r;e.push({name:"roles",value:r,label:o})}),e}getInvitationTableConfig(e){const t={invitee_email:n=>e?l`
5194
5184
  <div class="pont-flex pont-items-center pont-gap-2">
5195
5185
  <pont-skeleton
5196
5186
  class="pont-h-10 pont-w-10 pont-rounded-full"
@@ -5260,16 +5250,7 @@ Minimum version required to store current data is: `+F+`.
5260
5250
  >${s}</pont-typography-muted
5261
5251
  >
5262
5252
  </div>
5263
- `},status:n=>{if(e)return l`
5264
- <pont-skeleton class="pont-h-5 pont-w-14 pont-rounded-full"></pont-skeleton>
5265
- `;const i=n==="pending"?jh():n==="accepted"?XP():h;return l`
5266
- <div part=${"invitation-status"}>
5267
- <pont-badge variant="outline">
5268
- <div part=${n+"-icon"}>${i}</div>
5269
- ${n}
5270
- </pont-badge>
5271
- </div>
5272
- `}},r=Object.fromEntries(["invitee_email","roles","invited_by","created_at","expires_at","status"].map(n=>[n,()=>l` <span>${{invitee_email:"Email",roles:"Roles",invited_by:"Invited By",created_at:"Created At",expires_at:"Expires At",status:"Status"}[n]||n}</span> `]));return{cellRenderers:t,headerRenderers:r,rowActions:e?[]:[{condition:n=>{var i,s;return((i=n.status)==null?void 0:i.toLowerCase())==="pending"||((s=n.status)==null?void 0:s.toLowerCase())==="cancelled"},render:()=>l`<span>Resend invitation link</span>`,action:n=>this.dispatchInvitationAction("resend-invitation",n)},{condition:n=>{var i;return((i=n.status)==null?void 0:i.toLowerCase())==="pending"},render:()=>l`<span part="danger-action">Cancel invitation link</span>`,action:n=>this.dispatchInvitationAction("cancel-invitation",n)}],sortableColumns:e?[]:["invitee_email","created_at","expires_at","status"]}}renderPageLengthSelection(){const e=this.invitationsTotal===0?0:(this.invitationsPage-1)*this.rowsPerPage+1,t=Math.min(this.invitationsPage*this.rowsPerPage,this.invitationsTotal);return l`
5253
+ `}},r=Object.fromEntries(["invitee_email","roles","invited_by","created_at","expires_at"].map(n=>[n,()=>l` <span>${{invitee_email:"Email",roles:"Roles",invited_by:"Invited By",created_at:"Created At",expires_at:"Expires At"}[n]||n}</span> `]));return{cellRenderers:t,headerRenderers:r,rowActions:e?[]:[{render:()=>l`<span>Resend invitation link</span>`,action:n=>this.dispatchInvitationAction("resend-invitation",n)},{render:()=>l`<span part="danger-action">Cancel invitation</span>`,action:n=>this.dispatchInvitationAction("cancel-invitation",n)}],sortableColumns:e?[]:["invitee_email","created_at","expires_at"]}}renderPageLengthSelection(){const e=this.invitationsTotal===0?0:(this.invitationsPage-1)*this.rowsPerPage+1,t=Math.min(this.invitationsPage*this.rowsPerPage,this.invitationsTotal);return l`
5273
5254
  <div
5274
5255
  part="page-length-selection"
5275
5256
  class="pont-flex pont-items-center pont-gap-1 pont-flex-wrap pont-justify-center"
@@ -5302,7 +5283,7 @@ Minimum version required to store current data is: `+F+`.
5302
5283
  ${this.invitationsTotal===0?"0 items":`${e}-${t} of ${this.invitationsTotal}`}
5303
5284
  </pont-typography-muted>
5304
5285
  </div>
5305
- `}render(){var o,n;const e=this.getInvitationTableConfig(this.invitationsLoading),t=Array.from({length:this.rowsPerPage},(i,s)=>({id:`stub-invitation-${s}`,invitee_email:"",roles:[],invited_by:{id:"",name:""},created_at:0,expires_at:0,status:""})),r=this.invitationsLoading?t:this.invitations;return l`
5286
+ `}render(){var o;const e=this.getInvitationTableConfig(this.invitationsLoading),t=Array.from({length:this.rowsPerPage},(n,i)=>({id:`stub-invitation-${i}`,invitee_email:"",roles:[],invited_by:{id:"",name:""},created_at:0,expires_at:0})),r=this.invitationsLoading?t:this.invitations;return l`
5306
5287
  <div class="pont-flex pont-justify-between pont-gap-2 md:pont-gap-0">
5307
5288
  <div class="pont-mb-4 pont-flex pont-flex-wrap pont-items-center pont-gap-2">
5308
5289
  <pont-input-group class="md:pont-flex-shrink-0 !pont-w-auto">
@@ -5321,14 +5302,7 @@ Minimum version required to store current data is: `+F+`.
5321
5302
  .selected=${this.invitationFilters.roles}
5322
5303
  @change=${this.handleRolesChange}
5323
5304
  ></pont-multi-select-filter>
5324
- <pont-multi-select-filter
5325
- label="Status"
5326
- placeholder="All statuses"
5327
- .options=${this.statusOptions}
5328
- .selected=${this.invitationFilters.status}
5329
- @change=${this.handleStatusChange}
5330
- ></pont-multi-select-filter>
5331
- ${(o=this.invitationFilters.roles)!=null&&o.length||(n=this.invitationFilters.status)!=null&&n.length?l`
5305
+ ${(o=this.invitationFilters.roles)!=null&&o.length?l`
5332
5306
  <pont-button
5333
5307
  @click=${this.clearFilters}
5334
5308
  variant="ghost"
@@ -5340,18 +5314,18 @@ Minimum version required to store current data is: `+F+`.
5340
5314
  </div>
5341
5315
  </div>
5342
5316
  <pont-button @click=${this.handleRefresh} variant="outline" size="icon">
5343
- ${qh()}
5317
+ ${jh()}
5344
5318
  </pont-button>
5345
5319
  </div>
5346
5320
 
5347
5321
  ${this.getSelectedFiltersDisplay().length?l`
5348
5322
  <div class="pont-flex pont-flex-wrap pont-gap-2 pont-mb-4">
5349
- ${this.getSelectedFiltersDisplay().map(i=>l`
5323
+ ${this.getSelectedFiltersDisplay().map(n=>l`
5350
5324
  <pont-badge variant="secondary">
5351
- ${i.label}
5325
+ ${n.label}
5352
5326
  <span
5353
5327
  class="pont-cursor-pointer pont-ml-1"
5354
- @click=${()=>this.removeFilter(i.value)}
5328
+ @click=${()=>this.removeFilter(n.value)}
5355
5329
  >
5356
5330
  ${Mt()}
5357
5331
  </span>
@@ -5371,7 +5345,7 @@ Minimum version required to store current data is: `+F+`.
5371
5345
  .hasDefaultSearch=${!1}
5372
5346
  .hasDefaultSelect=${!1}
5373
5347
  .sortableColumns=${e.sortableColumns}
5374
- .columnOrder=${["invitee_email","roles","invited_by","created_at","expires_at","status"]}
5348
+ .columnOrder=${["invitee_email","roles","invited_by","created_at","expires_at"]}
5375
5349
  ></pont-data-table>
5376
5350
 
5377
5351
  ${this.invitationsLoading?h:l`
@@ -5398,7 +5372,7 @@ Minimum version required to store current data is: `+F+`.
5398
5372
  </div>
5399
5373
  </div>
5400
5374
  `}
5401
- `}};Jt([a({attribute:!1})],Ut.prototype,"invitations",2);Jt([a({type:Boolean,attribute:!1})],Ut.prototype,"invitationsLoading",2);Jt([a({type:String})],Ut.prototype,"searchTerm",2);Jt([a({type:Object,attribute:!1})],Ut.prototype,"invitationFilters",2);Jt([a({type:Array,attribute:!1})],Ut.prototype,"availableRoles",2);Jt([a({type:Array,attribute:!1})],Ut.prototype,"statusOptions",2);Jt([a({type:Number})],Ut.prototype,"invitationsPage",2);Jt([a({type:Number})],Ut.prototype,"invitationsTotalPages",2);Jt([a({type:Number})],Ut.prototype,"invitationsTotal",2);Jt([a({type:Number})],Ut.prototype,"rowsPerPage",2);Jt([g()],Ut.prototype,"_searchDebounceTimer",2);Ut=Jt([p("pont-member-management-invitations-panel")],Ut);var ar=(e=>(e.MEMBERS="Members",e.INVITATIONS="Invitations",e))(ar||{});function hC(e){const t=[{key:"admin",name:"Admin",description:"Full access",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["*"],permission_count:10,assignment_count:2,inheritance:{parent_role_keys:[],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3},{key:"manager",name:"Manager",description:"Can manage projects and members",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["read:projects","write:projects","read:members"],permission_count:3,assignment_count:4,inheritance:{parent_role_keys:["admin"],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3},{key:"developer",name:"Developer",description:"Can read and write code",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["read:repos","write:repos"],permission_count:2,assignment_count:6,inheritance:{parent_role_keys:[],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3},{key:"viewer",name:"Viewer",description:"Read-only access",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["read:projects"],permission_count:1,assignment_count:8,inheritance:{parent_role_keys:[],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3}];return{data:t,object:"list",pagination:{page:1,limit:20,total:t.length,total_pages:1}}}const Ko="2026-08-05T10:00:00Z",Wo="2026-08-04T10:00:00Z",uC=[{id:"mem_1",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"admin",name:"Admin"}],joined_at:"2026-08-04T10:00:00Z",last_active_at:"2024-12-01T08:30:00Z",created_at:"2024-01-15T10:00:00Z",updated_at:"2024-12-01T08:30:00Z",object:"member",user:{id:"user_1",email:"alice@example.com",email_verified:!0,family_name:"Smith",given_name:"Alice",name:"Alice Smith",picture:"",status:"active",username:"alice"}},{id:"mem_2",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"manager",name:"Manager"}],joined_at:"2024-02-10T11:00:00Z",last_active_at:"2024-11-28T14:20:00Z",created_at:"2024-02-10T11:00:00Z",updated_at:"2024-11-28T14:20:00Z",object:"member",user:{id:"user_2",email:"bob@example.com",email_verified:!0,family_name:"Johnson",given_name:"Bob",name:"Bob Johnson",picture:"",status:"active",username:"bob"}},{id:"mem_3",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"developer",name:"Developer"}],joined_at:"2024-03-20T09:00:00Z",last_active_at:"2024-12-02T16:45:00Z",created_at:"2024-03-20T09:00:00Z",updated_at:"2024-12-02T16:45:00Z",object:"member",user:{id:"user_3",email:"charlie@example.com",email_verified:!0,family_name:"Davis",given_name:"Charlie",name:"Charlie Davis",picture:"",status:"active",username:"charlie"}},{id:"mem_4",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"viewer",name:"Viewer"}],joined_at:"2024-04-05T13:30:00Z",last_active_at:"2024-11-20T10:00:00Z",created_at:"2024-04-05T13:30:00Z",updated_at:"2024-11-20T10:00:00Z",object:"member",user:{id:"user_4",email:"diana@example.com",email_verified:!0,family_name:"Evans",given_name:"Diana",name:"Diana Evans",picture:"https://ui-avatars.com/api/?name=Diana+Evans&background=random",status:"active",username:"diana"}},{id:"mem_5",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"developer",name:"Developer"}],joined_at:"2024-05-12T08:00:00Z",last_active_at:"2024-12-03T09:15:00Z",created_at:"2024-05-12T08:00:00Z",updated_at:"2024-12-03T09:15:00Z",object:"member",user:{id:"user_5",email:"eve@example.com",email_verified:!0,family_name:"Foster",given_name:"Eve",name:"Eve Foster",picture:"https://ui-avatars.com/api/?name=Eve+Foster&background=random",status:"active",username:"eve"}},{id:"mem_6",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"manager",name:"Manager"}],joined_at:Ko,last_active_at:Ko,created_at:Ko,updated_at:Ko,object:"member",user:{id:"user_6",email:"fiona@example.com",email_verified:!0,family_name:"Green",given_name:"Fiona",name:"Fiona Green",picture:"https://ui-avatars.com/api/?name=Fiona+Green&background=random",status:"active",username:"fiona"}},{id:"mem_7",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"viewer",name:"Viewer"}],joined_at:Wo,last_active_at:Wo,created_at:Wo,updated_at:Wo,object:"member",user:{id:"user_7",email:"george@example.com",email_verified:!0,family_name:"Hughes",given_name:"George",name:"George Hughes",picture:"https://ui-avatars.com/api/?name=George+Hughes&background=random",status:"active",username:"george"}}];function mC(e){let t=[...uC];if(e!=null&&e.search){const d=e.search.toLowerCase();t=t.filter(c=>c.user.name.toLowerCase().includes(d)||c.user.email.toLowerCase().includes(d))}if(e!=null&&e.roles){const d=e.roles.split(",");t=t.filter(c=>c.roles.some(u=>d.includes(u.key)))}const r=(e==null?void 0:e.page)||1,o=(e==null?void 0:e.limit)||5,n=(r-1)*o,i=n+o;return{data:t.slice(n,i),object:"list",pagination:{page:r,limit:o,total:t.length,total_pages:Math.ceil(t.length/o)}}}const gC=[{id:"inv_1",organization_id:"org_123",invitee_email:"frank@example.com",roles:[{key:"viewer",name:"Viewer"}],status:"pending",invited_by:{id:"user_1",name:"Alice Smith"},created_at:Date.now()/1e3-86400*2,updated_at:Date.now()/1e3-86400*2,expires_at:Date.now()/1e3+86400*5,last_sent_at:Date.now()/1e3-86400*2,resend_count:0,object:"invitation"},{id:"inv_2",organization_id:"org_123",invitee_email:"grace@example.com",roles:[{key:"manager",name:"Manager"}],status:"pending",invited_by:{id:"user_2",name:"Bob Johnson"},created_at:Date.now()/1e3-86400*10,updated_at:Date.now()/1e3-86400*10,expires_at:Date.now()/1e3+86400*1,last_sent_at:Date.now()/1e3-86400*3,resend_count:2,object:"invitation"},{id:"inv_3",organization_id:"org_123",invitee_email:"henry@example.com",roles:[{key:"developer",name:"Developer"}],status:"accepted",invited_by:{id:"user_3",name:"Charlie Davis"},created_at:Date.now()/1e3-86400*30,updated_at:Date.now()/1e3-86400*28,expires_at:Date.now()/1e3-86400*10,last_sent_at:Date.now()/1e3-86400*30,resend_count:0,accepted_at:Date.now()/1e3-86400*28,object:"invitation"},{id:"inv_4",organization_id:"org_123",invitee_email:"irene@example.com",roles:[{key:"viewer",name:"Viewer"}],status:"expired",invited_by:{id:"user_4",name:"Diana Evans"},created_at:Date.now()/1e3-86400*15,updated_at:Date.now()/1e3-86400*15,expires_at:Date.now()/1e3-86400*5,last_sent_at:Date.now()/1e3-86400*15,resend_count:1,object:"invitation"},{id:"inv_5",organization_id:"org_123",invitee_email:"jack@example.com",roles:[{key:"admin",name:"Admin"}],status:"pending",invited_by:{id:"user_1",name:"Alice Smith"},created_at:Date.now()/1e3-86400*1,updated_at:Date.now()/1e3-86400*1,expires_at:Date.now()/1e3+86400*7,last_sent_at:Date.now()/1e3-86400*1,resend_count:0,object:"invitation"}];function fC(e){let t=[...gC];if(e!=null&&e.search){const c=e.search.toLowerCase();t=t.filter(u=>u.invitee_email.toLowerCase().includes(c))}if(e!=null&&e.roles){const c=e.roles.split(",");t=t.filter(u=>u.roles.some(v=>c.includes(v.key)))}let r=e!=null&&e.status?e.status.split(","):["pending"];r.length>0&&r[0]!==""&&(t=t.filter(c=>r.includes(c.status)));const o=(e==null?void 0:e.page)||1,n=(e==null?void 0:e.limit)||5,i=(o-1)*n,s=i+n;return{data:t.slice(i,s),object:"list",pagination:{page:o,limit:n,total:t.length,total_pages:Math.ceil(t.length/n)}}}var vC=Object.defineProperty,V=(e,t,r,o)=>{for(var n=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(t,r,n)||n);return n&&vC(t,r,n),n};class j extends f{constructor(){super(...arguments),this.mode="PAGE",this.title="Member Management",this.description="Manage member access, roles, and invitations",this.organizationId="",this.isOpen=!1,this.monitoringFlag=!1,this.membersSearchTerm="",this.invitationsSearchTerm="",this.members=[],this.invitations=[],this.membersLoading=!1,this.invitationsLoading=!1,this.useMockData=!1,this.membersPage=1,this.membersTotalPages=0,this.invitationsPage=1,this.invitationsTotalPages=0,this.membersTotal=0,this.invitationsTotal=0,this.rowsPerPage=5,this.inviteDrawerId="pont-member-invite",this.availableRoles=[],this.isLoadingRoles=!1,this._rolesLoaded=!1,this.memberFilters={roles:[]},this.invitationFilters={roles:[],status:[]},this.invitationStatusOptions=[{value:"pending",label:"Pending"},{value:"accepted",label:"Accepted"},{value:"expired",label:"Expired"}],this.selectedMember=null,this.actionModalOpen=!1,this.actionModalConfig={title:"",description:"",confirmLabel:"Confirm",cancelLabel:"Cancel",variant:"default",onConfirm:()=>{},onCancel:()=>{},warningText:""},this.manageRolesDrawerId="pont-manage-roles",this._handleOpen=()=>{this.mode==="MODAL"&&(this.isOpen=!0)},this._handleClose=()=>{this.mode==="MODAL"&&(this.isOpen=!1)},this.loadData=async()=>{this.organizationId&&(await this.loadMembers(),await this.loadInvitations(),this.tryRemoveFallback())}}async openActionModal(t){this.actionModalConfig={...this.actionModalConfig,...t},this.actionModalOpen=!1,this.requestUpdate(),await this.updateComplete,this.actionModalOpen=!0}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r?r.remove():console.warn("fallback not found")})}connectedCallback(){super.connectedCallback(),window.addEventListener("open-member-management",this._handleOpen),window.addEventListener("close-member-management",this._handleClose),document.addEventListener("open-member-management",this._handleOpen),document.addEventListener("close-member-management",this._handleClose),window.addEventListener("invite-members-success",this.loadData),window.addEventListener("update-members-role",this.loadData)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("open-member-management",this._handleOpen),window.removeEventListener("close-member-management",this._handleClose),document.removeEventListener("open-member-management",this._handleOpen),document.removeEventListener("close-member-management",this._handleClose),window.removeEventListener("invite-members-success",this.loadData),window.removeEventListener("update-members-role",this.loadData),this._membersSearchDebounceTimer&&window.clearTimeout(this._membersSearchDebounceTimer),this._invitationsSearchDebounceTimer&&window.clearTimeout(this._invitationsSearchDebounceTimer)}firstUpdated(){this.isOpen=this.mode==="PAGE",this.loadData(),this.organizationId&&!this._rolesLoaded&&this.loadRoles()}updated(t){t.has("mode")&&(this.isOpen=this.mode==="PAGE"),t.has("organizationId")&&this.organizationId&&!this._rolesLoaded&&this.loadRoles()}async loadRoles(){if(!(!this.organizationId||this._rolesLoaded))try{this.isLoadingRoles=!0;let t;if(this.useMockData)t=hC({resource_id:this.organizationId,resource_type:"organization"});else{const r={resource_id:this.organizationId,resource_type:"organization"};t=await Sl(r)}this.availableRoles=t.data.map(r=>({value:r.key||r.name,label:r.name})),this._rolesLoaded=!0}catch(t){console.error("Failed to load roles:",t)}finally{this.isLoadingRoles=!1}}async loadMembers(t=1,r=this.rowsPerPage,o,n){try{this.membersLoading=!0;const i={page:t,limit:r};o&&(i.search=o);const s=n||this.memberFilters;s.roles&&s.roles.length&&(i.roles=s.roles.join(","));let d;this.useMockData?d=mC(i):d=await I0(this.organizationId,i),this.members=d.data,this.membersPage=d.pagination.page,this.membersTotalPages=d.pagination.total_pages,this.membersTotal=d.pagination.total,this.useMockData=!1}catch(i){console.error("[pont-member-management] Failed loading members:",i)}finally{this.membersLoading=!1}}async loadInvitations(t=1,r=this.rowsPerPage,o,n){try{this.invitationsLoading=!0;const i={page:t,limit:r};o&&(i.search=o);const s=n||this.invitationFilters;let d="pending";s.status&&s.status.length>0&&(d=s.status.join(",")),i.status=d,s.roles&&s.roles.length&&(i.roles=s.roles.join(","));let c;this.useMockData?c=fC(i):c=await k0(this.organizationId,i),this.invitations=c.data,this.invitationsPage=c.pagination.page,this.invitationsTotalPages=c.pagination.total_pages,this.invitationsTotal=c.pagination.total}catch(i){console.error("[pont-member-management] Failed loading invitations:",i)}finally{this.invitationsLoading=!1}}handleMembersPageChange(t){const r=t.detail.page;this.loadMembers(r,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsPageChange(t){const r=t.detail.page;this.loadInvitations(r,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersSearchChange(t){this.membersSearchTerm=t.detail.searchTerm||"",this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm.trim()?this.membersSearchTerm:void 0,this.memberFilters)}handleInvitationsSearchChange(t){this.invitationsSearchTerm=t.detail.searchTerm||"",this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm.trim()?this.invitationsSearchTerm:void 0,this.invitationFilters)}handleMembersFilterChange(t){const r=t.detail.roles||[];this.memberFilters={roles:r},this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsFilterChange(t){const r=t.detail||{};this.invitationFilters={roles:r.roles||[],status:r.status||[]},this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersClearFilters(){this.memberFilters={roles:[]},this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsClearFilters(){this.invitationFilters={roles:[],status:[]},this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersRemoveFilter(t){const r=t.detail.filterValue;this.memberFilters={...this.memberFilters,roles:this.memberFilters.roles.filter(o=>o!==r)},this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsRemoveFilter(t){const r=t.detail.filterValue;this.invitationFilters={...this.invitationFilters,roles:this.invitationFilters.roles.filter(o=>o!==r),status:this.invitationFilters.status.filter(o=>o!==r)},this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersRowsPerPageChange(t){const r=t.detail.rowsPerPage;this.rowsPerPage=r,this.loadMembers(1,r,this.membersSearchTerm,this.memberFilters)}handleInvitationsRowsPerPageChange(t){const r=t.detail.rowsPerPage;this.rowsPerPage=r,this.loadInvitations(1,r,this.invitationsSearchTerm,this.invitationFilters)}handleRefresh(t){t==="members"?this.loadMembers(this.membersPage,this.rowsPerPage,this.membersSearchTerm,this.memberFilters):this.loadInvitations(this.invitationsPage,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}openManageRoles(t){const r=t.detail;this.selectedMember=r,setTimeout(()=>{document.dispatchEvent(new CustomEvent("open-sidedrawer",{detail:{id:this.manageRolesDrawerId,side:"right"},bubbles:!0,composed:!0}))},50)}handleSuspendMember(t){var o,n;const r=t.detail;this.openActionModal({title:"Suspend User",description:l`
5375
+ `}};ue([a({attribute:!1})],Kt.prototype,"invitations",2);ue([a({type:Boolean,attribute:!1})],Kt.prototype,"invitationsLoading",2);ue([a({type:String})],Kt.prototype,"searchTerm",2);ue([a({type:Object,attribute:!1})],Kt.prototype,"invitationFilters",2);ue([a({type:Array,attribute:!1})],Kt.prototype,"availableRoles",2);ue([a({type:Number})],Kt.prototype,"invitationsPage",2);ue([a({type:Number})],Kt.prototype,"invitationsTotalPages",2);ue([a({type:Number})],Kt.prototype,"invitationsTotal",2);ue([a({type:Number})],Kt.prototype,"rowsPerPage",2);ue([g()],Kt.prototype,"_searchDebounceTimer",2);Kt=ue([p("pont-member-management-invitations-panel")],Kt);var ar=(e=>(e.MEMBERS="Members",e.INVITATIONS="Invitations",e))(ar||{});function hC(e){const t=[{key:"admin",name:"Admin",description:"Full access",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["*"],permission_count:10,assignment_count:2,inheritance:{parent_role_keys:[],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3},{key:"manager",name:"Manager",description:"Can manage projects and members",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["read:projects","write:projects","read:members"],permission_count:3,assignment_count:4,inheritance:{parent_role_keys:["admin"],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3},{key:"developer",name:"Developer",description:"Can read and write code",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["read:repos","write:repos"],permission_count:2,assignment_count:6,inheritance:{parent_role_keys:[],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3},{key:"viewer",name:"Viewer",description:"Read-only access",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["read:projects"],permission_count:1,assignment_count:8,inheritance:{parent_role_keys:[],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3}];return{data:t,object:"list",pagination:{page:1,limit:20,total:t.length,total_pages:1}}}const Ko="2026-08-05T10:00:00Z",Wo="2026-08-04T10:00:00Z",uC=[{id:"mem_1",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"admin",name:"Admin"}],joined_at:"2026-08-04T10:00:00Z",last_active_at:"2024-12-01T08:30:00Z",created_at:"2024-01-15T10:00:00Z",updated_at:"2024-12-01T08:30:00Z",object:"member",user:{id:"user_1",email:"alice@example.com",email_verified:!0,family_name:"Smith",given_name:"Alice",name:"Alice Smith",picture:"",status:"active",username:"alice"}},{id:"mem_2",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"manager",name:"Manager"}],joined_at:"2024-02-10T11:00:00Z",last_active_at:"2024-11-28T14:20:00Z",created_at:"2024-02-10T11:00:00Z",updated_at:"2024-11-28T14:20:00Z",object:"member",user:{id:"user_2",email:"bob@example.com",email_verified:!0,family_name:"Johnson",given_name:"Bob",name:"Bob Johnson",picture:"",status:"active",username:"bob"}},{id:"mem_3",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"developer",name:"Developer"}],joined_at:"2024-03-20T09:00:00Z",last_active_at:"2024-12-02T16:45:00Z",created_at:"2024-03-20T09:00:00Z",updated_at:"2024-12-02T16:45:00Z",object:"member",user:{id:"user_3",email:"charlie@example.com",email_verified:!0,family_name:"Davis",given_name:"Charlie",name:"Charlie Davis",picture:"",status:"active",username:"charlie"}},{id:"mem_4",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"viewer",name:"Viewer"}],joined_at:"2024-04-05T13:30:00Z",last_active_at:"2024-11-20T10:00:00Z",created_at:"2024-04-05T13:30:00Z",updated_at:"2024-11-20T10:00:00Z",object:"member",user:{id:"user_4",email:"diana@example.com",email_verified:!0,family_name:"Evans",given_name:"Diana",name:"Diana Evans",picture:"https://ui-avatars.com/api/?name=Diana+Evans&background=random",status:"active",username:"diana"}},{id:"mem_5",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"developer",name:"Developer"}],joined_at:"2024-05-12T08:00:00Z",last_active_at:"2024-12-03T09:15:00Z",created_at:"2024-05-12T08:00:00Z",updated_at:"2024-12-03T09:15:00Z",object:"member",user:{id:"user_5",email:"eve@example.com",email_verified:!0,family_name:"Foster",given_name:"Eve",name:"Eve Foster",picture:"https://ui-avatars.com/api/?name=Eve+Foster&background=random",status:"active",username:"eve"}},{id:"mem_6",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"manager",name:"Manager"}],joined_at:Ko,last_active_at:Ko,created_at:Ko,updated_at:Ko,object:"member",user:{id:"user_6",email:"fiona@example.com",email_verified:!0,family_name:"Green",given_name:"Fiona",name:"Fiona Green",picture:"https://ui-avatars.com/api/?name=Fiona+Green&background=random",status:"active",username:"fiona"}},{id:"mem_7",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"viewer",name:"Viewer"}],joined_at:Wo,last_active_at:Wo,created_at:Wo,updated_at:Wo,object:"member",user:{id:"user_7",email:"george@example.com",email_verified:!0,family_name:"Hughes",given_name:"George",name:"George Hughes",picture:"https://ui-avatars.com/api/?name=George+Hughes&background=random",status:"active",username:"george"}}];function mC(e){let t=[...uC];if(e!=null&&e.search){const d=e.search.toLowerCase();t=t.filter(c=>c.user.name.toLowerCase().includes(d)||c.user.email.toLowerCase().includes(d))}if(e!=null&&e.roles){const d=e.roles.split(",");t=t.filter(c=>c.roles.some(u=>d.includes(u.key)))}const r=(e==null?void 0:e.page)||1,o=(e==null?void 0:e.limit)||5,n=(r-1)*o,i=n+o;return{data:t.slice(n,i),object:"list",pagination:{page:r,limit:o,total:t.length,total_pages:Math.ceil(t.length/o)}}}const gC=[{id:"inv_1",organization_id:"org_123",invitee_email:"frank@example.com",roles:[{key:"viewer",name:"Viewer"}],invited_by:{id:"user_1",name:"Alice Smith"},created_at:Date.now()/1e3-86400*2,updated_at:Date.now()/1e3-86400*2,expires_at:Date.now()/1e3+86400*5,last_sent_at:Date.now()/1e3-86400*2,resend_count:0,object:"invitation"},{id:"inv_2",organization_id:"org_123",invitee_email:"grace@example.com",roles:[{key:"manager",name:"Manager"}],invited_by:{id:"user_2",name:"Bob Johnson"},created_at:Date.now()/1e3-86400*10,updated_at:Date.now()/1e3-86400*10,expires_at:Date.now()/1e3+86400*1,last_sent_at:Date.now()/1e3-86400*3,resend_count:2,object:"invitation"},{id:"inv_3",organization_id:"org_123",invitee_email:"jack@example.com",roles:[{key:"admin",name:"Admin"}],invited_by:{id:"user_1",name:"Alice Smith"},created_at:Date.now()/1e3-86400*1,updated_at:Date.now()/1e3-86400*1,expires_at:Date.now()/1e3+86400*7,last_sent_at:Date.now()/1e3-86400*1,resend_count:0,object:"invitation"}];function fC(e){let t=[...gC];if(e!=null&&e.search){const d=e.search.toLowerCase();t=t.filter(c=>c.invitee_email.toLowerCase().includes(d))}if(e!=null&&e.roles){const d=e.roles.split(",");t=t.filter(c=>c.roles.some(u=>d.includes(u.key)))}const r=(e==null?void 0:e.page)||1,o=(e==null?void 0:e.limit)||5,n=(r-1)*o,i=n+o;return{data:t.slice(n,i),object:"list",pagination:{page:r,limit:o,total:t.length,total_pages:Math.ceil(t.length/o)}}}var vC=Object.defineProperty,V=(e,t,r,o)=>{for(var n=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(t,r,n)||n);return n&&vC(t,r,n),n};class j extends f{constructor(){super(...arguments),this.mode="PAGE",this.title="Member Management",this.description="Manage member access, roles, and invitations",this.organizationId="",this.isOpen=!1,this.monitoringFlag=!1,this.membersSearchTerm="",this.invitationsSearchTerm="",this.members=[],this.invitations=[],this.membersLoading=!1,this.invitationsLoading=!1,this.useMockData=!1,this.membersPage=1,this.membersTotalPages=0,this.invitationsPage=1,this.invitationsTotalPages=0,this.membersTotal=0,this.invitationsTotal=0,this.rowsPerPage=5,this.inviteDrawerId="pont-member-invite",this.availableRoles=[],this.isLoadingRoles=!1,this._rolesLoaded=!1,this.memberFilters={roles:[]},this.invitationFilters={roles:[]},this.selectedMember=null,this.actionModalOpen=!1,this.actionModalConfig={title:"",description:"",confirmLabel:"Confirm",cancelLabel:"Cancel",variant:"default",onConfirm:()=>{},onCancel:()=>{},warningText:""},this.manageRolesDrawerId="pont-manage-roles",this._handleOpen=()=>{this.mode==="MODAL"&&(this.isOpen=!0)},this._handleClose=()=>{this.mode==="MODAL"&&(this.isOpen=!1)},this.loadData=async()=>{this.organizationId&&(await this.loadMembers(),await this.loadInvitations(),this.tryRemoveFallback())}}async openActionModal(t){this.actionModalConfig={...this.actionModalConfig,...t},this.actionModalOpen=!1,this.requestUpdate(),await this.updateComplete,this.actionModalOpen=!0}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r?r.remove():console.warn("fallback not found")})}connectedCallback(){super.connectedCallback(),window.addEventListener("open-member-management",this._handleOpen),window.addEventListener("close-member-management",this._handleClose),document.addEventListener("open-member-management",this._handleOpen),document.addEventListener("close-member-management",this._handleClose),window.addEventListener("invite-members-success",this.loadData),window.addEventListener("update-members-role",this.loadData)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("open-member-management",this._handleOpen),window.removeEventListener("close-member-management",this._handleClose),document.removeEventListener("open-member-management",this._handleOpen),document.removeEventListener("close-member-management",this._handleClose),window.removeEventListener("invite-members-success",this.loadData),window.removeEventListener("update-members-role",this.loadData),this._membersSearchDebounceTimer&&window.clearTimeout(this._membersSearchDebounceTimer),this._invitationsSearchDebounceTimer&&window.clearTimeout(this._invitationsSearchDebounceTimer)}firstUpdated(){this.isOpen=this.mode==="PAGE",this.loadData(),this.organizationId&&!this._rolesLoaded&&this.loadRoles()}updated(t){t.has("mode")&&(this.isOpen=this.mode==="PAGE"),t.has("organizationId")&&this.organizationId&&!this._rolesLoaded&&this.loadRoles()}async loadRoles(){if(!(!this.organizationId||this._rolesLoaded))try{this.isLoadingRoles=!0;let t;if(this.useMockData)t=hC({resource_id:this.organizationId,resource_type:"organization"});else{const r={resource_id:this.organizationId,resource_type:"organization"};t=await Sl(r)}this.availableRoles=t.data.map(r=>({value:r.key||r.name,label:r.name})),this._rolesLoaded=!0}catch(t){console.error("Failed to load roles:",t)}finally{this.isLoadingRoles=!1}}async loadMembers(t=1,r=this.rowsPerPage,o,n){try{this.membersLoading=!0;const i={page:t,limit:r};o&&(i.search=o);const s=n||this.memberFilters;s.roles&&s.roles.length&&(i.roles=s.roles.join(","));let d;this.useMockData?d=mC(i):d=await I0(this.organizationId,i),this.members=d.data,this.membersPage=d.pagination.page,this.membersTotalPages=d.pagination.total_pages,this.membersTotal=d.pagination.total,this.useMockData=!1}catch(i){console.error("[pont-member-management] Failed loading members:",i)}finally{this.membersLoading=!1}}async loadInvitations(t=1,r=this.rowsPerPage,o,n){try{this.invitationsLoading=!0;const i={page:t,limit:r};o&&(i.search=o);const s=n||this.invitationFilters;s.roles&&s.roles.length&&(i.roles=s.roles.join(","));let d;this.useMockData?d=fC(i):d=await k0(this.organizationId,i),this.invitations=d.data,this.invitationsPage=d.pagination.page,this.invitationsTotalPages=d.pagination.total_pages,this.invitationsTotal=d.pagination.total}catch(i){console.error("[pont-member-management] Failed loading invitations:",i)}finally{this.invitationsLoading=!1}}handleMembersPageChange(t){const r=t.detail.page;this.loadMembers(r,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsPageChange(t){const r=t.detail.page;this.loadInvitations(r,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersSearchChange(t){this.membersSearchTerm=t.detail.searchTerm||"",this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm.trim()?this.membersSearchTerm:void 0,this.memberFilters)}handleInvitationsSearchChange(t){this.invitationsSearchTerm=t.detail.searchTerm||"",this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm.trim()?this.invitationsSearchTerm:void 0,this.invitationFilters)}handleMembersFilterChange(t){const r=t.detail.roles||[];this.memberFilters={roles:r},this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsFilterChange(t){const r=t.detail||{};this.invitationFilters={roles:r.roles||[]},this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersClearFilters(){this.memberFilters={roles:[]},this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsClearFilters(){this.invitationFilters={roles:[]},this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersRemoveFilter(t){const r=t.detail.filterValue;this.memberFilters={...this.memberFilters,roles:this.memberFilters.roles.filter(o=>o!==r)},this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsRemoveFilter(t){const r=t.detail.filterValue;this.invitationFilters={...this.invitationFilters,roles:this.invitationFilters.roles.filter(o=>o!==r)},this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersRowsPerPageChange(t){const r=t.detail.rowsPerPage;this.rowsPerPage=r,this.loadMembers(1,r,this.membersSearchTerm,this.memberFilters)}handleInvitationsRowsPerPageChange(t){const r=t.detail.rowsPerPage;this.rowsPerPage=r,this.loadInvitations(1,r,this.invitationsSearchTerm,this.invitationFilters)}handleRefresh(t){t==="members"?this.loadMembers(this.membersPage,this.rowsPerPage,this.membersSearchTerm,this.memberFilters):this.loadInvitations(this.invitationsPage,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}openManageRoles(t){const r=t.detail;this.selectedMember=r,setTimeout(()=>{document.dispatchEvent(new CustomEvent("open-sidedrawer",{detail:{id:this.manageRolesDrawerId,side:"right"},bubbles:!0,composed:!0}))},50)}handleSuspendMember(t){var o,n;const r=t.detail;this.openActionModal({title:"Suspend User",description:l`
5402
5376
  <p part="description">
5403
5377
  Are you sure you want to suspend
5404
5378
  <span part="highlight-name"
@@ -5426,7 +5400,7 @@ Minimum version required to store current data is: `+F+`.
5426
5400
  <span part="highlight-name">${r.invitee_email}</span>
5427
5401
  ?
5428
5402
  </p>
5429
- `,confirmLabel:"Cancel Invitation",variant:"danger",warningText:"This invitation will be permanently revoked and the recipient will lose access to join the organization.",onConfirm:async()=>{await F0(this.organizationId,r.id),this.loadInvitations(this.invitationsPage,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}})}renderContent(){return l`
5403
+ `,confirmLabel:"Cancel Invitation",variant:"danger",warningText:"This invitation will be permanently deleted and the recipient will lose access to join the organization.",onConfirm:async()=>{await F0(this.organizationId,r.id),this.loadInvitations(this.invitationsPage,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}})}renderContent(){return l`
5430
5404
  <div class="pont-member-management-shell">
5431
5405
  <div>
5432
5406
  <div class="pont-flex pont-flex-col pont-gap-8 pont-w-full">
@@ -5469,7 +5443,7 @@ Minimum version required to store current data is: `+F+`.
5469
5443
  size="default"
5470
5444
  @click=${()=>setTimeout(()=>{document.dispatchEvent(new CustomEvent("open-sidedrawer",{detail:{id:this.inviteDrawerId,side:"right"},bubbles:!0,composed:!0}))},50)}
5471
5445
  >
5472
- ${JP()}Invite Members
5446
+ ${XP()}Invite Members
5473
5447
  </pont-button>
5474
5448
  </div>
5475
5449
  <div class="pont-mt-6">
@@ -5505,7 +5479,6 @@ Minimum version required to store current data is: `+F+`.
5505
5479
  .searchTerm=${this.invitationsSearchTerm}
5506
5480
  .invitationFilters=${this.invitationFilters}
5507
5481
  .availableRoles=${this.availableRoles}
5508
- .statusOptions=${this.invitationStatusOptions}
5509
5482
  .invitationsPage=${this.invitationsPage}
5510
5483
  .invitationsTotalPages=${this.invitationsTotalPages}
5511
5484
  .invitationsTotal=${this.invitationsTotal}
@@ -5573,7 +5546,7 @@ Minimum version required to store current data is: `+F+`.
5573
5546
  </signed-out>
5574
5547
  </pont-provider>
5575
5548
  `}
5576
- `}};Zi([a({type:Boolean})],exports.PreviewComponent.prototype,"loading",2);Zi([a({type:Object})],exports.PreviewComponent.prototype,"renderSpec",2);Zi([a({attribute:!1})],exports.PreviewComponent.prototype,"branding",2);exports.PreviewComponent=Zi([p("pont-preview")],exports.PreviewComponent);const _C="We couldn't reach the server. Check your connection and try again.",wC="Too many attempts. Wait a moment and try again.",$C="Something went wrong on our side. Please try again.",PC="Something went wrong. Please try again.",CC="This sign-in could not be completed.",EC="The passkey request was cancelled or timed out. Please try again.",SC=409;function Xh(e){if(e instanceof DOMException&&(e.name==="NotAllowedError"||e.name==="AbortError"))return{message:EC,restartable:!1};const{status:t,code:r,message:o}=xC(e);return t===SC?{message:mp(o)??CC,restartable:!0}:t===void 0&&(r==="NETWORK_ERROR"||r==="TIMEOUT")?{message:_C,restartable:!1}:t===429?{message:wC,restartable:!1}:t!==void 0&&t>=500?{message:$C,restartable:!1}:{message:mp(o)??PC,restartable:!1}}function xC(e){if(typeof e=="string")return{message:e};if(!e||typeof e!="object")return{};const t=e;return{status:typeof t.status=="number"?t.status:void 0,code:typeof t.code=="string"?t.code:void 0,message:typeof t.message=="string"?t.message:void 0}}function mp(e){const t=e==null?void 0:e.trim();if(!t||/^HTTP \d{3}\b/.test(t)||t.includes("`"))return;const r=t.charAt(0).toUpperCase()+t.slice(1);return/[.!?]$/.test(r)?r:`${r}.`}var OC=Object.defineProperty,Ji=(e,t,r,o)=>{for(var n=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(t,r,n)||n);return n&&OC(t,r,n),n};class sn extends f{constructor(){super(...arguments),this.renderSpec=null,this.branding=Lo,this.locales="",this.__flowStarted=!1,this.__initialized=!1,this.__previousLocale=null,this.restart=()=>{this.__flowStarted=!1,this.startAuthFlow()}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.addEventListener(exports.PontKitLayout.RESTART_EVENT,this.restart)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(exports.PontKitLayout.RESTART_EVENT,this.restart)}firstUpdated(){this.__initialized||(this.__initialized=!0,this.__previousLocale=this.locales,this.startAuthFlow())}updated(t){if(t.has("locales")){const r=this.locales;this.__previousLocale!==r&&(this.__previousLocale=r,this.restart())}t.has("renderSpec")&&this.renderSpec&&this.tryRemoveFallback()}async startAuthFlow(){if(!this.__flowStarted){this.__flowStarted=!0,this.startError=void 0,await fP(K);try{await this.startFlow()}catch(t){console.error(`[${this.localName}] Starting the flow failed:`,t),this.startError=Xh(t).message,this.__flowStarted=!1}this.tryRemoveFallback()}}tryRemoveFallback(){requestAnimationFrame(()=>{var t;(t=this.querySelector('[part="fallback"]'))==null||t.remove()})}render(){return this.startError?l`<div part="flow-error" class="pont-flex pont-flex-col pont-gap-3">
5549
+ `}};Zi([a({type:Boolean})],exports.PreviewComponent.prototype,"loading",2);Zi([a({type:Object})],exports.PreviewComponent.prototype,"renderSpec",2);Zi([a({attribute:!1})],exports.PreviewComponent.prototype,"branding",2);exports.PreviewComponent=Zi([p("pont-preview")],exports.PreviewComponent);const _C="We couldn't reach the server. Check your connection and try again.",wC="Too many attempts. Wait a moment and try again.",$C="Something went wrong on our side. Please try again.",PC="Something went wrong. Please try again.",CC="This sign-in could not be completed.",EC="The passkey request was cancelled or timed out. Please try again.",SC=409;function Jh(e){if(e instanceof DOMException&&(e.name==="NotAllowedError"||e.name==="AbortError"))return{message:EC,restartable:!1};const{status:t,code:r,message:o}=xC(e);return t===SC?{message:mp(o)??CC,restartable:!0}:t===void 0&&(r==="NETWORK_ERROR"||r==="TIMEOUT")?{message:_C,restartable:!1}:t===429?{message:wC,restartable:!1}:t!==void 0&&t>=500?{message:$C,restartable:!1}:{message:mp(o)??PC,restartable:!1}}function xC(e){if(typeof e=="string")return{message:e};if(!e||typeof e!="object")return{};const t=e;return{status:typeof t.status=="number"?t.status:void 0,code:typeof t.code=="string"?t.code:void 0,message:typeof t.message=="string"?t.message:void 0}}function mp(e){const t=e==null?void 0:e.trim();if(!t||/^HTTP \d{3}\b/.test(t)||t.includes("`"))return;const r=t.charAt(0).toUpperCase()+t.slice(1);return/[.!?]$/.test(r)?r:`${r}.`}var OC=Object.defineProperty,Ji=(e,t,r,o)=>{for(var n=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(t,r,n)||n);return n&&OC(t,r,n),n};class sn extends f{constructor(){super(...arguments),this.renderSpec=null,this.branding=Lo,this.locales="",this.__flowStarted=!1,this.__initialized=!1,this.__previousLocale=null,this.restart=()=>{this.__flowStarted=!1,this.startAuthFlow()}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.addEventListener(exports.PontKitLayout.RESTART_EVENT,this.restart)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(exports.PontKitLayout.RESTART_EVENT,this.restart)}firstUpdated(){this.__initialized||(this.__initialized=!0,this.__previousLocale=this.locales,this.startAuthFlow())}updated(t){if(t.has("locales")){const r=this.locales;this.__previousLocale!==r&&(this.__previousLocale=r,this.restart())}t.has("renderSpec")&&this.renderSpec&&this.tryRemoveFallback()}async startAuthFlow(){if(!this.__flowStarted){this.__flowStarted=!0,this.startError=void 0,await fP(G);try{await this.startFlow()}catch(t){console.error(`[${this.localName}] Starting the flow failed:`,t),this.startError=Jh(t).message,this.__flowStarted=!1}this.tryRemoveFallback()}}tryRemoveFallback(){requestAnimationFrame(()=>{var t;(t=this.querySelector('[part="fallback"]'))==null||t.remove()})}render(){return this.startError?l`<div part="flow-error" class="pont-flex pont-flex-col pont-gap-3">
5577
5550
  <pont-alert status="error" description=${this.startError}></pont-alert>
5578
5551
  <pont-button variant="outline" @click=${this.restart}>
5579
5552
  Try again
@@ -5581,9 +5554,9 @@ Minimum version required to store current data is: `+F+`.
5581
5554
  </div>`:this.renderSpec?l`<pont-layout
5582
5555
  .renderSpec=${this.renderSpec}
5583
5556
  .branding=${this.branding}
5584
- ></pont-layout>`:l``}}Ji([yt({context:Mh,subscribe:!0})],sn.prototype,"renderSpec");Ji([yt({context:Bi,subscribe:!0})],sn.prototype,"branding");Ji([yt({context:Bh,subscribe:!0})],sn.prototype,"locales");Ji([g()],sn.prototype,"startError");var RC=Object.getOwnPropertyDescriptor,IC=(e,t,r,o)=>{for(var n=o>1?void 0:o?RC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};exports.PontInvitation=class extends sn{startFlow(){return K.startLoginflow()}};exports.PontInvitation=IC([p("pont-invitation")],exports.PontInvitation);var AC=Object.getOwnPropertyDescriptor,TC=(e,t,r,o)=>{for(var n=o>1?void 0:o?AC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};exports.PontSignIn=class extends sn{startFlow(){return K.startLoginflow("sys_signin-flow-passkey")}};exports.PontSignIn=TC([p("pont-signin")],exports.PontSignIn);var DC=Object.getOwnPropertyDescriptor,LC=(e,t,r,o)=>{for(var n=o>1?void 0:o?DC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};exports.PontSignUp=class extends sn{startFlow(){return K.startLoginflow("sys_signup-flow")}};exports.PontSignUp=LC([p("pont-signup")],exports.PontSignUp);var FC=Object.defineProperty,Be=(e,t,r,o)=>{for(var n=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(t,r,n)||n);return n&&FC(t,r,n),n};class Xi extends f{constructor(){super(...arguments),this.isTrigger=!1,this.user={}}createRenderRoot(){return this}render(){const{name:t,email:r,avatar_url:o}=this.user||{};return l`
5557
+ ></pont-layout>`:l``}}Ji([yt({context:Mh,subscribe:!0})],sn.prototype,"renderSpec");Ji([yt({context:Bi,subscribe:!0})],sn.prototype,"branding");Ji([yt({context:Bh,subscribe:!0})],sn.prototype,"locales");Ji([g()],sn.prototype,"startError");var RC=Object.getOwnPropertyDescriptor,IC=(e,t,r,o)=>{for(var n=o>1?void 0:o?RC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};exports.PontInvitation=class extends sn{startFlow(){return G.startLoginflow()}};exports.PontInvitation=IC([p("pont-invitation")],exports.PontInvitation);var AC=Object.getOwnPropertyDescriptor,TC=(e,t,r,o)=>{for(var n=o>1?void 0:o?AC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};exports.PontSignIn=class extends sn{startFlow(){return G.startLoginflow("sys_signin-flow-passkey")}};exports.PontSignIn=TC([p("pont-signin")],exports.PontSignIn);var DC=Object.getOwnPropertyDescriptor,LC=(e,t,r,o)=>{for(var n=o>1?void 0:o?DC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};exports.PontSignUp=class extends sn{startFlow(){return G.startLoginflow("sys_signup-flow")}};exports.PontSignUp=LC([p("pont-signup")],exports.PontSignUp);var FC=Object.defineProperty,Be=(e,t,r,o)=>{for(var n=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(t,r,n)||n);return n&&FC(t,r,n),n};class Xi extends f{constructor(){super(...arguments),this.isTrigger=!1,this.user={}}createRenderRoot(){return this}render(){const{name:t,email:r,avatar_url:o}=this.user||{};return l`
5585
5558
  <div
5586
- class=${Vt("pont-flex pont-items-center pont-gap-2 pont-w-full",this.isTrigger?"pont-py-2":"")}
5559
+ class=${zt("pont-flex pont-items-center pont-gap-2 pont-w-full",this.isTrigger?"pont-py-2":"")}
5587
5560
  >
5588
5561
  <pont-avatar size="lg">
5589
5562
  <pont-avatar-image src=${o}></pont-avatar-image>
@@ -5601,7 +5574,7 @@ Minimum version required to store current data is: `+F+`.
5601
5574
  >`:""}
5602
5575
  </div>
5603
5576
  </div>
5604
- `}}Be([a({type:Boolean})],Xi.prototype,"isTrigger");Be([a({type:Object})],Xi.prototype,"user");customElements.define("pont-user-snippet",Xi);class Ue extends f{constructor(){super(...arguments),this.accountSettingsPath="",this.menuItems=[],this.user={},this.signedIn=!1,this.isLoading=!0,this._itemStates=new Map,this._subMenuOpen=new Map,this._handleAccountSettings=()=>{if(this.dispatchEvent(new CustomEvent("account-settings",{bubbles:!0,composed:!0,cancelable:!0}))){if(this.accountSettingsPath){this._navigate(this.accountSettingsPath);return}xl(),document.querySelector('pont-account-settings[mode="MODAL"]')||console.warn(`[pont-account-menu] 'Account settings' had nowhere to go: no accountSettingsPath is set, nothing cancelled the account-settings event, and no <pont-account-settings mode="MODAL"> is mounted.`)}},this._handleLogout=()=>{this.dispatchEvent(new CustomEvent("logout",{bubbles:!0,composed:!0})),K.signOut()}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._syncItemStates()}updated(t){t.has("auth")&&this.loadUser()}_syncItemStates(){for(const t of this.menuItems){const r=t.id??t.label;t.type==="toggle"?this._itemStates.set(r,{checked:t.checked??!1}):t.type==="select"&&(this._itemStates.set(r,{value:t.value??""}),this._subMenuOpen.set(r,!1))}}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}async loadUser(){var t;if(!((t=this.auth)!=null&&t.resolved)){this.isLoading=!0;return}this.isLoading=!0;try{const r=this.auth.isAuthenticated;if(this.signedIn=r,r){const o=K.getAuthenticatedUser();this.user={email:o==null?void 0:o.email,name:(o==null?void 0:o.name)||`${(o==null?void 0:o.given_name)||""} ${(o==null?void 0:o.family_name)||""}`.trim(),avatar_url:o==null?void 0:o.picture}}}catch(r){console.error("[pont-account-menu] Failed to load user:",r),this.signedIn=!1}finally{this.isLoading=!1,this.tryRemoveFallback()}}_handleToggle(t,r){const o=t.id??t.label;this._itemStates.set(o,{checked:r}),this.requestUpdate(),t.onToggle&&t.onToggle(r)}_handleSelect(t,r){const o=t.id??t.label;this._itemStates.set(o,{value:r}),this.requestUpdate(),this._subMenuOpen.set(o,!1),this.requestUpdate(),t.onSelect&&t.onSelect(r)}_toggleSubMenu(t,r){for(const o of this._subMenuOpen.keys())o!==t&&this._subMenuOpen.set(o,!1);this._subMenuOpen.set(t,r),this.requestUpdate()}_renderActionItem(t){return l`
5577
+ `}}Be([a({type:Boolean})],Xi.prototype,"isTrigger");Be([a({type:Object})],Xi.prototype,"user");customElements.define("pont-user-snippet",Xi);class Ue extends f{constructor(){super(...arguments),this.accountSettingsPath="",this.menuItems=[],this.user={},this.signedIn=!1,this.isLoading=!0,this._itemStates=new Map,this._subMenuOpen=new Map,this._handleAccountSettings=()=>{if(this.dispatchEvent(new CustomEvent("account-settings",{bubbles:!0,composed:!0,cancelable:!0}))){if(this.accountSettingsPath){this._navigate(this.accountSettingsPath);return}xl(),document.querySelector('pont-account-settings[mode="MODAL"]')||console.warn(`[pont-account-menu] 'Account settings' had nowhere to go: no accountSettingsPath is set, nothing cancelled the account-settings event, and no <pont-account-settings mode="MODAL"> is mounted.`)}},this._handleLogout=()=>{this.dispatchEvent(new CustomEvent("logout",{bubbles:!0,composed:!0})),G.signOut()}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._syncItemStates()}updated(t){t.has("auth")&&this.loadUser()}_syncItemStates(){for(const t of this.menuItems){const r=t.id??t.label;t.type==="toggle"?this._itemStates.set(r,{checked:t.checked??!1}):t.type==="select"&&(this._itemStates.set(r,{value:t.value??""}),this._subMenuOpen.set(r,!1))}}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}async loadUser(){var t;if(!((t=this.auth)!=null&&t.resolved)){this.isLoading=!0;return}this.isLoading=!0;try{const r=this.auth.isAuthenticated;if(this.signedIn=r,r){const o=G.getAuthenticatedUser();this.user={email:o==null?void 0:o.email,name:(o==null?void 0:o.name)||`${(o==null?void 0:o.given_name)||""} ${(o==null?void 0:o.family_name)||""}`.trim(),avatar_url:o==null?void 0:o.picture}}}catch(r){console.error("[pont-account-menu] Failed to load user:",r),this.signedIn=!1}finally{this.isLoading=!1,this.tryRemoveFallback()}}_handleToggle(t,r){const o=t.id??t.label;this._itemStates.set(o,{checked:r}),this.requestUpdate(),t.onToggle&&t.onToggle(r)}_handleSelect(t,r){const o=t.id??t.label;this._itemStates.set(o,{value:r}),this.requestUpdate(),this._subMenuOpen.set(o,!1),this.requestUpdate(),t.onSelect&&t.onSelect(r)}_toggleSubMenu(t,r){for(const o of this._subMenuOpen.keys())o!==t&&this._subMenuOpen.set(o,!1);this._subMenuOpen.set(t,r),this.requestUpdate()}_renderActionItem(t){return l`
5605
5578
  <pont-dropdown-menu-item
5606
5579
  @click=${r=>this._handleMenuItemClick(r,t)}
5607
5580
  data-id=${t.id||""}
@@ -5694,7 +5667,7 @@ Minimum version required to store current data is: `+F+`.
5694
5667
  </pont-dropdown-menu-group>
5695
5668
  </pont-dropdown-menu-content>
5696
5669
  </pont-dropdown-menu>
5697
- `}_navigate(t){const r=new URL(t,window.location.href);r.pathname===window.location.pathname&&r.search===window.location.search||(window.location.href=t)}_handleMenuItemClick(t,r){t.stopPropagation();try{if(r&&typeof r.onClick=="function"){r.onClick(t,r),this.dispatchEvent(new CustomEvent("menu-item-click",{detail:{item:r},bubbles:!0,composed:!0}));return}if(r&&r.href){this._navigate(r.href),this.dispatchEvent(new CustomEvent("menu-item-click",{detail:{item:r},bubbles:!0,composed:!0}));return}}catch(o){console.error("[pont-account-menu] menu item click handler failed",o)}}}Be([a({type:String})],Ue.prototype,"accountSettingsPath");Be([a({attribute:!1})],Ue.prototype,"menuItems");Be([yt({context:Pr,subscribe:!0}),a({attribute:!1})],Ue.prototype,"auth");Be([g()],Ue.prototype,"user");Be([g()],Ue.prototype,"signedIn");Be([g()],Ue.prototype,"isLoading");Be([g()],Ue.prototype,"_itemStates");Be([g()],Ue.prototype,"_subMenuOpen");customElements.define("pont-account-menu",Ue);var kC=Object.defineProperty,je=(e,t,r,o)=>{for(var n=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(t,r,n)||n);return n&&kC(t,r,n),n};const Xo="pont-organization-changed",tu="pont-organization-switch-failed";class Xt extends f{constructor(){super(...arguments),this.reloadOnSwitch=!1,this.emptyLabel="Select organization",this.organizations=[],this.currentId=null,this.loaded=!1,this.switching=null,this.error=null,this.onFocus=()=>this.readCurrent(),this.onChangedElsewhere=t=>{t.target!==this&&this.readCurrent()}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),window.addEventListener("focus",this.onFocus),document.addEventListener(Xo,this.onChangedElsewhere)}disconnectedCallback(){window.removeEventListener("focus",this.onFocus),document.removeEventListener(Xo,this.onChangedElsewhere),super.disconnectedCallback()}updated(t){t.has("auth")&&this.load()}readCurrent(){var t;this.currentId=((t=K.getOrganization())==null?void 0:t.id)??null}async load(){var t;if(!((t=this.auth)!=null&&t.resolved)||!this.auth.isAuthenticated){this.organizations=[],this.loaded=!1;return}this.readCurrent();try{this.organizations=await O0()}catch(r){console.error("[pont-organization-switcher] Failed to list organizations:",r),this.organizations=[]}finally{this.loaded=!0}}async select(t){var r,o;if(!(t===this.currentId||this.switching)){this.switching=t,this.error=null;try{await K.switchOrganization(t),this.readCurrent();const n=K.getOrganization(),i={organizationId:t,roles:(n==null?void 0:n.roles)??[],permissions:(n==null?void 0:n.permissions)??[]};this.dispatchEvent(new CustomEvent(Xo,{detail:i,bubbles:!0,composed:!0})),(r=this.onOrganizationChanged)==null||r.call(this,i),this.reloadOnSwitch&&window.location.reload()}catch(n){this.error="You can't switch to that organization.",this.dispatchEvent(new CustomEvent(tu,{detail:{organizationId:t,error:n},bubbles:!0,composed:!0})),(o=this.onSwitchFailed)==null||o.call(this,{organizationId:t,error:n})}finally{this.switching=null}}}nameOf(t){var r;return t?((r=this.organizations.find(o=>o.resource_id===t))==null?void 0:r.resource_name)||t:this.emptyLabel}render(){if(!this.loaded||this.organizations.length===0)return l``;const t=this.nameOf(this.currentId);return l`
5670
+ `}_navigate(t){const r=new URL(t,window.location.href);r.pathname===window.location.pathname&&r.search===window.location.search||(window.location.href=t)}_handleMenuItemClick(t,r){t.stopPropagation();try{if(r&&typeof r.onClick=="function"){r.onClick(t,r),this.dispatchEvent(new CustomEvent("menu-item-click",{detail:{item:r},bubbles:!0,composed:!0}));return}if(r&&r.href){this._navigate(r.href),this.dispatchEvent(new CustomEvent("menu-item-click",{detail:{item:r},bubbles:!0,composed:!0}));return}}catch(o){console.error("[pont-account-menu] menu item click handler failed",o)}}}Be([a({type:String})],Ue.prototype,"accountSettingsPath");Be([a({attribute:!1})],Ue.prototype,"menuItems");Be([yt({context:Pr,subscribe:!0}),a({attribute:!1})],Ue.prototype,"auth");Be([g()],Ue.prototype,"user");Be([g()],Ue.prototype,"signedIn");Be([g()],Ue.prototype,"isLoading");Be([g()],Ue.prototype,"_itemStates");Be([g()],Ue.prototype,"_subMenuOpen");customElements.define("pont-account-menu",Ue);var kC=Object.defineProperty,je=(e,t,r,o)=>{for(var n=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(t,r,n)||n);return n&&kC(t,r,n),n};const Xo="pont-organization-changed",Xh="pont-organization-switch-failed";class Jt extends f{constructor(){super(...arguments),this.reloadOnSwitch=!1,this.emptyLabel="Select organization",this.organizations=[],this.currentId=null,this.loaded=!1,this.switching=null,this.error=null,this.onFocus=()=>this.readCurrent(),this.onChangedElsewhere=t=>{t.target!==this&&this.readCurrent()}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),window.addEventListener("focus",this.onFocus),document.addEventListener(Xo,this.onChangedElsewhere)}disconnectedCallback(){window.removeEventListener("focus",this.onFocus),document.removeEventListener(Xo,this.onChangedElsewhere),super.disconnectedCallback()}updated(t){t.has("auth")&&this.load()}readCurrent(){var t;this.currentId=((t=G.getOrganization())==null?void 0:t.id)??null}async load(){var t;if(!((t=this.auth)!=null&&t.resolved)||!this.auth.isAuthenticated){this.organizations=[],this.loaded=!1;return}this.readCurrent();try{this.organizations=await O0()}catch(r){console.error("[pont-organization-switcher] Failed to list organizations:",r),this.organizations=[]}finally{this.loaded=!0}}async select(t){var r,o;if(!(t===this.currentId||this.switching)){this.switching=t,this.error=null;try{await G.switchOrganization(t),this.readCurrent();const n=G.getOrganization(),i={organizationId:t,roles:(n==null?void 0:n.roles)??[],permissions:(n==null?void 0:n.permissions)??[]};this.dispatchEvent(new CustomEvent(Xo,{detail:i,bubbles:!0,composed:!0})),(r=this.onOrganizationChanged)==null||r.call(this,i),this.reloadOnSwitch&&window.location.reload()}catch(n){this.error="You can't switch to that organization.",this.dispatchEvent(new CustomEvent(Xh,{detail:{organizationId:t,error:n},bubbles:!0,composed:!0})),(o=this.onSwitchFailed)==null||o.call(this,{organizationId:t,error:n})}finally{this.switching=null}}}nameOf(t){var r;return t?((r=this.organizations.find(o=>o.resource_id===t))==null?void 0:r.resource_name)||t:this.emptyLabel}render(){if(!this.loaded||this.organizations.length===0)return l``;const t=this.nameOf(this.currentId);return l`
5698
5671
  <pont-dropdown-menu>
5699
5672
  <pont-dropdown-menu-trigger as-child>
5700
5673
  <pont-button part="trigger-button" variant="secondary" ?disabled=${!!this.switching}>
@@ -5726,11 +5699,11 @@ Minimum version required to store current data is: `+F+`.
5726
5699
  </div>`:""}
5727
5700
  </pont-dropdown-menu-content>
5728
5701
  </pont-dropdown-menu>
5729
- `}}je([a({type:Boolean,attribute:"reload-on-switch"})],Xt.prototype,"reloadOnSwitch");je([a({type:String,attribute:"empty-label"})],Xt.prototype,"emptyLabel");je([a({attribute:!1})],Xt.prototype,"onOrganizationChanged");je([a({attribute:!1})],Xt.prototype,"onSwitchFailed");je([yt({context:Pr,subscribe:!0}),a({attribute:!1})],Xt.prototype,"auth");je([g()],Xt.prototype,"organizations");je([g()],Xt.prototype,"currentId");je([g()],Xt.prototype,"loaded");je([g()],Xt.prototype,"switching");je([g()],Xt.prototype,"error");customElements.define("pont-organization-switcher",Xt);/**
5702
+ `}}je([a({type:Boolean,attribute:"reload-on-switch"})],Jt.prototype,"reloadOnSwitch");je([a({type:String,attribute:"empty-label"})],Jt.prototype,"emptyLabel");je([a({attribute:!1})],Jt.prototype,"onOrganizationChanged");je([a({attribute:!1})],Jt.prototype,"onSwitchFailed");je([yt({context:Pr,subscribe:!0}),a({attribute:!1})],Jt.prototype,"auth");je([g()],Jt.prototype,"organizations");je([g()],Jt.prototype,"currentId");je([g()],Jt.prototype,"loaded");je([g()],Jt.prototype,"switching");je([g()],Jt.prototype,"error");customElements.define("pont-organization-switcher",Jt);/**
5730
5703
  * @license
5731
5704
  * Copyright 2020 Google LLC
5732
5705
  * SPDX-License-Identifier: BSD-3-Clause
5733
- */const eu=Symbol.for(""),NC=e=>{if((e==null?void 0:e.r)===eu)return e==null?void 0:e._$litStatic$},MC=e=>({_$litStatic$:e,r:eu}),gp=new Map,BC=e=>(t,...r)=>{const o=r.length;let n,i;const s=[],d=[];let c,u=0,v=!1;for(;u<o;){for(c=t[u];u<o&&(i=r[u],(n=NC(i))!==void 0);)c+=n+t[++u],v=!0;u!==o&&d.push(i),s.push(c),u++}if(u===o&&s.push(t[o]),v){const b=s.join("$$lit$$");(t=gp.get(b))===void 0&&(s.raw=s,gp.set(b,t=s)),r=d}return e(t,...r)},Bs=BC(l);var UC=Object.defineProperty,jC=Object.getOwnPropertyDescriptor,bt=(e,t,r,o)=>{for(var n=o>1?void 0:o?jC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&UC(t,r,n),n};exports.PontOtp=class extends jt{constructor(){super(...arguments),this.excludeFromForm=!1,this.required=!1,this.requiredError="Code is required.",this.incompleteError="Please enter the complete verification code.",this.variant="with_separator",this.length=6,this.timeout=300,this.dataKey="code",this.name="",this.disabled=!1,this.autoSubmit=!1,this.event="",this.resendText="",this.resendButtonText="",this.resendEvent="",this.id="otp",this._invalid=!1,this._error="",this._value="",this.handleComplete=async t=>{if(this._value=t,this.autoSubmit&&this.event){const r={};r[this.dataKey]=t;try{await K.processLoginflowEvent({event:this.event,data:r})}finally{this.emit("pont-otp:complete",{id:this.id,dataKey:this.dataKey,value:t,event:this.event})}return}this.emit("pont-otp:complete",{id:this.id,dataKey:this.dataKey,value:t,event:null})},this.handleFocus=()=>{this.emit("pont-otp:focus",{id:this.id,dataKey:this.dataKey})},this.handleBlur=()=>{this.emit("pont-otp:blur",{id:this.id,dataKey:this.dataKey})},this.handleResend=async()=>{if(this.resendEvent)try{await K.processLoginflowEvent({event:this.resendEvent})}finally{this.emit("pont-otp:resend",{id:this.id,event:this.resendEvent})}}}get _containerElement(){return this.querySelector(`pont-input-otp[part=${this.id?this.id:"otp"}]`)}get isFormField(){return!this.excludeFromForm}createRenderRoot(){return this}get value(){return this._value}validate(){const t=this._value.trim();return this.required&&!t?(this._invalid=!0,this._error=this.requiredError,!1):t.length!==this.length?(this._invalid=!0,this._error=this.incompleteError,!1):(this._invalid=!1,this._error="",!0)}emit(t,r){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}buildOTPContentHTML(){const t=this.variant,r=this.length,o=(s,d)=>Array.from({length:d-s},(c,u)=>`<pont-input-otp-slot index="${s+u}"></pont-input-otp-slot>`).join(""),n=s=>`<pont-input-otp-group>${s}</pont-input-otp-group>`,i="<pont-input-otp-separator></pont-input-otp-separator>";if(t==="simple"){const s=Math.ceil(r/2);return n(o(0,s))+i+n(o(s,r))}if(t==="with_separator"){const s=Math.ceil(r/3);return n(o(0,s))+i+n(o(s,s*2))+i+n(o(s*2,r))}return t==="with_spacing"?Array.from({length:r},(s,d)=>n(`<pont-input-otp-slot index="${d}"></pont-input-otp-slot>`)).join(""):n(o(0,r))}render(){const t=this.variant||"digits_only";return Bs`
5706
+ */const tu=Symbol.for(""),NC=e=>{if((e==null?void 0:e.r)===tu)return e==null?void 0:e._$litStatic$},MC=e=>({_$litStatic$:e,r:tu}),gp=new Map,BC=e=>(t,...r)=>{const o=r.length;let n,i;const s=[],d=[];let c,u=0,v=!1;for(;u<o;){for(c=t[u];u<o&&(i=r[u],(n=NC(i))!==void 0);)c+=n+t[++u],v=!0;u!==o&&d.push(i),s.push(c),u++}if(u===o&&s.push(t[o]),v){const b=s.join("$$lit$$");(t=gp.get(b))===void 0&&(s.raw=s,gp.set(b,t=s)),r=d}return e(t,...r)},Bs=BC(l);var UC=Object.defineProperty,jC=Object.getOwnPropertyDescriptor,bt=(e,t,r,o)=>{for(var n=o>1?void 0:o?jC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&UC(t,r,n),n};exports.PontOtp=class extends Ut{constructor(){super(...arguments),this.excludeFromForm=!1,this.required=!1,this.requiredError="Code is required.",this.incompleteError="Please enter the complete verification code.",this.variant="with_separator",this.length=6,this.timeout=300,this.dataKey="code",this.name="",this.disabled=!1,this.autoSubmit=!1,this.event="",this.resendText="",this.resendButtonText="",this.resendEvent="",this.id="otp",this._invalid=!1,this._error="",this._value="",this.handleComplete=async t=>{if(this._value=t,this.autoSubmit&&this.event){const r={};r[this.dataKey]=t;try{await G.processLoginflowEvent({event:this.event,data:r})}finally{this.emit("pont-otp:complete",{id:this.id,dataKey:this.dataKey,value:t,event:this.event})}return}this.emit("pont-otp:complete",{id:this.id,dataKey:this.dataKey,value:t,event:null})},this.handleFocus=()=>{this.emit("pont-otp:focus",{id:this.id,dataKey:this.dataKey})},this.handleBlur=()=>{this.emit("pont-otp:blur",{id:this.id,dataKey:this.dataKey})},this.handleResend=async()=>{if(this.resendEvent)try{await G.processLoginflowEvent({event:this.resendEvent})}finally{this.emit("pont-otp:resend",{id:this.id,event:this.resendEvent})}}}get _containerElement(){return this.querySelector(`pont-input-otp[part=${this.id?this.id:"otp"}]`)}get isFormField(){return!this.excludeFromForm}createRenderRoot(){return this}get value(){return this._value}validate(){const t=this._value.trim();return this.required&&!t?(this._invalid=!0,this._error=this.requiredError,!1):t.length!==this.length?(this._invalid=!0,this._error=this.incompleteError,!1):(this._invalid=!1,this._error="",!0)}emit(t,r){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}buildOTPContentHTML(){const t=this.variant,r=this.length,o=(s,d)=>Array.from({length:d-s},(c,u)=>`<pont-input-otp-slot index="${s+u}"></pont-input-otp-slot>`).join(""),n=s=>`<pont-input-otp-group>${s}</pont-input-otp-group>`,i="<pont-input-otp-separator></pont-input-otp-separator>";if(t==="simple"){const s=Math.ceil(r/2);return n(o(0,s))+i+n(o(s,r))}if(t==="with_separator"){const s=Math.ceil(r/3);return n(o(0,s))+i+n(o(s,s*2))+i+n(o(s*2,r))}return t==="with_spacing"?Array.from({length:r},(s,d)=>n(`<pont-input-otp-slot index="${d}"></pont-input-otp-slot>`)).join(""):n(o(0,r))}render(){const t=this.variant||"digits_only";return Bs`
5734
5707
  <pont-field ?disabled=${this.disabled} ?invalid=${this._invalid}>
5735
5708
  <pont-input-otp
5736
5709
  part=${this.id?this.id:"otp"}
@@ -5766,7 +5739,7 @@ Minimum version required to store current data is: `+F+`.
5766
5739
  </pont-button>
5767
5740
  </div>
5768
5741
  `:h}
5769
- `}};exports.PontOtp.ROOT="otp";exports.PontOtp.TAG=`${rt}-${exports.PontOtp.ROOT}`;bt([a({type:Boolean,attribute:"exclude-from-form",converter:{fromAttribute:e=>e!==null&&e!=="false",toAttribute:e=>e?"":null}})],exports.PontOtp.prototype,"excludeFromForm",2);bt([a({type:Boolean})],exports.PontOtp.prototype,"required",2);bt([a({attribute:"required-error"})],exports.PontOtp.prototype,"requiredError",2);bt([a({attribute:"incomplete-error"})],exports.PontOtp.prototype,"incompleteError",2);bt([a()],exports.PontOtp.prototype,"variant",2);bt([a({type:Number})],exports.PontOtp.prototype,"length",2);bt([a({type:Number})],exports.PontOtp.prototype,"timeout",2);bt([a({attribute:"data-key"})],exports.PontOtp.prototype,"dataKey",2);bt([a()],exports.PontOtp.prototype,"name",2);bt([a({type:Boolean})],exports.PontOtp.prototype,"disabled",2);bt([a({type:Boolean,attribute:"auto-submit",converter:{fromAttribute:e=>e!==null&&e!=="false",toAttribute:e=>e?"":null}})],exports.PontOtp.prototype,"autoSubmit",2);bt([a()],exports.PontOtp.prototype,"event",2);bt([a({attribute:"resend-text"})],exports.PontOtp.prototype,"resendText",2);bt([a({attribute:"resend-button-text"})],exports.PontOtp.prototype,"resendButtonText",2);bt([a({attribute:"resend-event"})],exports.PontOtp.prototype,"resendEvent",2);bt([a()],exports.PontOtp.prototype,"id",2);bt([g()],exports.PontOtp.prototype,"_invalid",2);bt([g()],exports.PontOtp.prototype,"_error",2);bt([g()],exports.PontOtp.prototype,"_value",2);exports.PontOtp=bt([p("pont-otp")],exports.PontOtp);const Yo={duration:60,resend_event:"",resend_button_label:"Resend code",count_down_text:"Resend code in "};var qC=Object.defineProperty,zC=Object.getOwnPropertyDescriptor,Er=(e,t,r,o)=>{for(var n=o>1?void 0:o?zC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&qC(t,r,n),n};exports.PontOtpResend=class extends f{constructor(){super(...arguments),this.seed=_t(),this.duration=Yo.duration,this.resend_event=Yo.resend_event,this.resend_button_label=Yo.resend_button_label,this.count_down_text=Yo.count_down_text,this._remaining=0,this._handleResendClick=()=>{K.processLoginflowEvent({event:this.resend_event}),this._startCountdown()}}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontOtpResend.TAG}-${this.seed}`}get countdownId(){return`${this.rootId}-${exports.PontOtpResend.COUNTDOWN}`}get resendButtonId(){return`${this.rootId}-${exports.PontOtpResend.RESEND_BUTTON}`}connectedCallback(){super.connectedCallback(),this._startCountdown()}disconnectedCallback(){super.disconnectedCallback(),this._clearTimer()}updated(t){t.has("duration")&&this._startCountdown()}_startCountdown(){this._clearTimer();const t=this.duration;if(t<=0){this._remaining=0;return}this._remaining=t,this._timer=window.setInterval(()=>{this._remaining=Math.max(0,this._remaining-1),this._remaining<=0&&this._clearTimer()},1e3)}_clearTimer(){this._timer&&(clearInterval(this._timer),this._timer=void 0)}render(){const t=this._remaining>0;return l`
5742
+ `}};exports.PontOtp.ROOT="otp";exports.PontOtp.TAG=`${rt}-${exports.PontOtp.ROOT}`;bt([a({type:Boolean,attribute:"exclude-from-form",converter:{fromAttribute:e=>e!==null&&e!=="false",toAttribute:e=>e?"":null}})],exports.PontOtp.prototype,"excludeFromForm",2);bt([a({type:Boolean})],exports.PontOtp.prototype,"required",2);bt([a({attribute:"required-error"})],exports.PontOtp.prototype,"requiredError",2);bt([a({attribute:"incomplete-error"})],exports.PontOtp.prototype,"incompleteError",2);bt([a()],exports.PontOtp.prototype,"variant",2);bt([a({type:Number})],exports.PontOtp.prototype,"length",2);bt([a({type:Number})],exports.PontOtp.prototype,"timeout",2);bt([a({attribute:"data-key"})],exports.PontOtp.prototype,"dataKey",2);bt([a()],exports.PontOtp.prototype,"name",2);bt([a({type:Boolean})],exports.PontOtp.prototype,"disabled",2);bt([a({type:Boolean,attribute:"auto-submit",converter:{fromAttribute:e=>e!==null&&e!=="false",toAttribute:e=>e?"":null}})],exports.PontOtp.prototype,"autoSubmit",2);bt([a()],exports.PontOtp.prototype,"event",2);bt([a({attribute:"resend-text"})],exports.PontOtp.prototype,"resendText",2);bt([a({attribute:"resend-button-text"})],exports.PontOtp.prototype,"resendButtonText",2);bt([a({attribute:"resend-event"})],exports.PontOtp.prototype,"resendEvent",2);bt([a()],exports.PontOtp.prototype,"id",2);bt([g()],exports.PontOtp.prototype,"_invalid",2);bt([g()],exports.PontOtp.prototype,"_error",2);bt([g()],exports.PontOtp.prototype,"_value",2);exports.PontOtp=bt([p("pont-otp")],exports.PontOtp);const Yo={duration:60,resend_event:"",resend_button_label:"Resend code",count_down_text:"Resend code in "};var qC=Object.defineProperty,zC=Object.getOwnPropertyDescriptor,Er=(e,t,r,o)=>{for(var n=o>1?void 0:o?zC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&qC(t,r,n),n};exports.PontOtpResend=class extends f{constructor(){super(...arguments),this.seed=_t(),this.duration=Yo.duration,this.resend_event=Yo.resend_event,this.resend_button_label=Yo.resend_button_label,this.count_down_text=Yo.count_down_text,this._remaining=0,this._handleResendClick=()=>{G.processLoginflowEvent({event:this.resend_event}),this._startCountdown()}}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontOtpResend.TAG}-${this.seed}`}get countdownId(){return`${this.rootId}-${exports.PontOtpResend.COUNTDOWN}`}get resendButtonId(){return`${this.rootId}-${exports.PontOtpResend.RESEND_BUTTON}`}connectedCallback(){super.connectedCallback(),this._startCountdown()}disconnectedCallback(){super.disconnectedCallback(),this._clearTimer()}updated(t){t.has("duration")&&this._startCountdown()}_startCountdown(){this._clearTimer();const t=this.duration;if(t<=0){this._remaining=0;return}this._remaining=t,this._timer=window.setInterval(()=>{this._remaining=Math.max(0,this._remaining-1),this._remaining<=0&&this._clearTimer()},1e3)}_clearTimer(){this._timer&&(clearInterval(this._timer),this._timer=void 0)}render(){const t=this._remaining>0;return l`
5770
5743
  <div part=${exports.PontOtpResend.PARTS.root} id=${this.rootId}>
5771
5744
  ${t?l`
5772
5745
  <pont-typography-muted
@@ -5786,24 +5759,24 @@ Minimum version required to store current data is: `+F+`.
5786
5759
  </pont-button>
5787
5760
  `}
5788
5761
  </div>
5789
- `}};exports.PontOtpResend.ROOT="otp-resend";exports.PontOtpResend.COUNTDOWN="countdown";exports.PontOtpResend.RESEND_BUTTON="resend-button";exports.PontOtpResend.TAG=`${rt}-${exports.PontOtpResend.ROOT}`;exports.PontOtpResend.PARTS={root:exports.PontOtpResend.ROOT,countdown:`${exports.PontOtpResend.ROOT}-${exports.PontOtpResend.COUNTDOWN}`,resendButton:`${exports.PontOtpResend.ROOT}-${exports.PontOtpResend.RESEND_BUTTON}`};Er([a({type:String})],exports.PontOtpResend.prototype,"seed",2);Er([a({type:String,attribute:"custom-id"})],exports.PontOtpResend.prototype,"customId",2);Er([a({type:Number})],exports.PontOtpResend.prototype,"duration",2);Er([a({type:String,attribute:"resend-event"})],exports.PontOtpResend.prototype,"resend_event",2);Er([a({type:String,attribute:"resend-button-label"})],exports.PontOtpResend.prototype,"resend_button_label",2);Er([a({type:String,attribute:"count-down-text"})],exports.PontOtpResend.prototype,"count_down_text",2);Er([g()],exports.PontOtpResend.prototype,"_remaining",2);exports.PontOtpResend=Er([p("pont-otp-resend")],exports.PontOtpResend);const VC=[exports.PontEmailField,exports.PontPhoneField,exports.PontUsernameField,exports.PontIdentifierField,exports.PontNameField,exports.PontPasswordField,exports.PontConfirmField,exports.PontOtp],HC=[exports.PontPasskeyButton,exports.PontProviderButton,exports.PontLink];var GC=Object.defineProperty,KC=Object.getOwnPropertyDescriptor,Bo=(e,t,r,o)=>{for(var n=o>1?void 0:o?KC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&GC(t,r,n),n};exports.PontForm=class extends f{constructor(){super(...arguments),this.seed=_t(),this._loading=!1,this._handleSubmitClick=t=>{var r;this._pendingEvent=(r=t.detail)==null?void 0:r.event},this._handleSubmit=async t=>{if(t.preventDefault(),this._loading)return;const r=this._fields;if(!r.map(b=>b.validate()).every(Boolean))return;const i={};r.forEach(b=>{i[b.name]=b.value});const s=this._pendingEvent;if(this.onSubmit){this.onSubmit(i,s);return}if(!s)return;const d=new CustomEvent(exports.PontForm.SUBMIT_EVENT,{detail:{id:this.rootId,data:i,event:s},bubbles:!0,composed:!0,cancelable:!0});if(this.dispatchEvent(d),d.defaultPrevented)return;const c=this._interactives,u=r.map(b=>!!b.disabled),v=c.map(b=>!!b.disabled);this._setLoading(!0,r,u,c,v);try{const b=await K.processLoginflowEvent({event:s,...Object.keys(i).length?{data:i}:{}});this._dispatch(exports.PontForm.SUCCESS_EVENT,{id:this.rootId,data:i,event:s,result:b})}catch(b){const w=b instanceof Error?b.message:String(b);this._dispatch(exports.PontForm.ERROR_EVENT,{id:this.rootId,data:i,event:s,message:w,error:b})}finally{this._setLoading(!1,r,u,c,v),this._pendingEvent=void 0}},this._handleReset=t=>{this._pendingEvent=void 0,this.onReset&&this.onReset(t),this._dispatch(exports.PontForm.RESET_EVENT,{id:this.rootId})}}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontForm.TAG}-${this.seed}`}get _form(){const t=`form[part="${exports.PontForm.PARTS.root}"]`;return this.querySelector(t)}get _fields(){const t=this._form;return t?Array.from(t.querySelectorAll(VC.map(o=>o.TAG).join(", "))).filter(o=>typeof o.isFormField>"u"?!0:o.isFormField):[]}get _submit(){const t=this._form;if(!t)return null;const r=exports.PontSubmitButton.TAG;return t.querySelector(r)}get _interactives(){const t=this._form;if(!t)return[];const r=HC.map(o=>o.TAG).join(", ");return Array.from(t.querySelectorAll(r))}connectedCallback(){super.connectedCallback();const t=exports.PontSubmitButton.CLICK_EVENT;this.addEventListener(t,this._handleSubmitClick)}disconnectedCallback(){super.disconnectedCallback();const t=exports.PontSubmitButton.CLICK_EVENT;this.removeEventListener(t,this._handleSubmitClick)}firstUpdated(){const t=this._form;if(!t)return;Array.from(this.childNodes).filter(o=>o!==t).forEach(o=>t.appendChild(o))}_dispatch(t,r={}){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}_setLoading(t,r,o,n,i){r.forEach((d,c)=>{d.disabled=t?!0:o[c]}),n.forEach((d,c)=>{d.disabled=t?!0:i[c]});const s=this._submit;s&&(s.loading=t),this._loading=t}render(){return l`
5762
+ `}};exports.PontOtpResend.ROOT="otp-resend";exports.PontOtpResend.COUNTDOWN="countdown";exports.PontOtpResend.RESEND_BUTTON="resend-button";exports.PontOtpResend.TAG=`${rt}-${exports.PontOtpResend.ROOT}`;exports.PontOtpResend.PARTS={root:exports.PontOtpResend.ROOT,countdown:`${exports.PontOtpResend.ROOT}-${exports.PontOtpResend.COUNTDOWN}`,resendButton:`${exports.PontOtpResend.ROOT}-${exports.PontOtpResend.RESEND_BUTTON}`};Er([a({type:String})],exports.PontOtpResend.prototype,"seed",2);Er([a({type:String,attribute:"custom-id"})],exports.PontOtpResend.prototype,"customId",2);Er([a({type:Number})],exports.PontOtpResend.prototype,"duration",2);Er([a({type:String,attribute:"resend-event"})],exports.PontOtpResend.prototype,"resend_event",2);Er([a({type:String,attribute:"resend-button-label"})],exports.PontOtpResend.prototype,"resend_button_label",2);Er([a({type:String,attribute:"count-down-text"})],exports.PontOtpResend.prototype,"count_down_text",2);Er([g()],exports.PontOtpResend.prototype,"_remaining",2);exports.PontOtpResend=Er([p("pont-otp-resend")],exports.PontOtpResend);const VC=[exports.PontEmailField,exports.PontPhoneField,exports.PontUsernameField,exports.PontIdentifierField,exports.PontNameField,exports.PontPasswordField,exports.PontConfirmField,exports.PontOtp],HC=[exports.PontPasskeyButton,exports.PontProviderButton,exports.PontLink];var GC=Object.defineProperty,KC=Object.getOwnPropertyDescriptor,Bo=(e,t,r,o)=>{for(var n=o>1?void 0:o?KC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&GC(t,r,n),n};exports.PontForm=class extends f{constructor(){super(...arguments),this.seed=_t(),this._loading=!1,this._handleSubmitClick=t=>{var r;this._pendingEvent=(r=t.detail)==null?void 0:r.event},this._handleSubmit=async t=>{if(t.preventDefault(),this._loading)return;const r=this._fields;if(!r.map(b=>b.validate()).every(Boolean))return;const i={};r.forEach(b=>{i[b.name]=b.value});const s=this._pendingEvent;if(this.onSubmit){this.onSubmit(i,s);return}if(!s)return;const d=new CustomEvent(exports.PontForm.SUBMIT_EVENT,{detail:{id:this.rootId,data:i,event:s},bubbles:!0,composed:!0,cancelable:!0});if(this.dispatchEvent(d),d.defaultPrevented)return;const c=this._interactives,u=r.map(b=>!!b.disabled),v=c.map(b=>!!b.disabled);this._setLoading(!0,r,u,c,v);try{const b=await G.processLoginflowEvent({event:s,...Object.keys(i).length?{data:i}:{}});this._dispatch(exports.PontForm.SUCCESS_EVENT,{id:this.rootId,data:i,event:s,result:b})}catch(b){const w=b instanceof Error?b.message:String(b);this._dispatch(exports.PontForm.ERROR_EVENT,{id:this.rootId,data:i,event:s,message:w,error:b})}finally{this._setLoading(!1,r,u,c,v),this._pendingEvent=void 0}},this._handleReset=t=>{this._pendingEvent=void 0,this.onReset&&this.onReset(t),this._dispatch(exports.PontForm.RESET_EVENT,{id:this.rootId})}}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontForm.TAG}-${this.seed}`}get _form(){const t=`form[part="${exports.PontForm.PARTS.root}"]`;return this.querySelector(t)}get _fields(){const t=this._form;return t?Array.from(t.querySelectorAll(VC.map(o=>o.TAG).join(", "))).filter(o=>typeof o.isFormField>"u"?!0:o.isFormField):[]}get _submit(){const t=this._form;if(!t)return null;const r=exports.PontSubmitButton.TAG;return t.querySelector(r)}get _interactives(){const t=this._form;if(!t)return[];const r=HC.map(o=>o.TAG).join(", ");return Array.from(t.querySelectorAll(r))}connectedCallback(){super.connectedCallback();const t=exports.PontSubmitButton.CLICK_EVENT;this.addEventListener(t,this._handleSubmitClick)}disconnectedCallback(){super.disconnectedCallback();const t=exports.PontSubmitButton.CLICK_EVENT;this.removeEventListener(t,this._handleSubmitClick)}firstUpdated(){const t=this._form;if(!t)return;Array.from(this.childNodes).filter(o=>o!==t).forEach(o=>t.appendChild(o))}_dispatch(t,r={}){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}_setLoading(t,r,o,n,i){r.forEach((d,c)=>{d.disabled=t?!0:o[c]}),n.forEach((d,c)=>{d.disabled=t?!0:i[c]});const s=this._submit;s&&(s.loading=t),this._loading=t}render(){return l`
5790
5763
  <form
5791
5764
  id="${this.rootId}"
5792
5765
  part="${exports.PontForm.PARTS.root}"
5793
5766
  @submit=${this._handleSubmit}
5794
5767
  @reset=${this._handleReset}
5795
5768
  ></form>
5796
- `}};exports.PontForm.ROOT="form";exports.PontForm.TAG=`${rt}-${exports.PontForm.ROOT}`;exports.PontForm.SUBMIT_EVENT=`${exports.PontForm.TAG}:submit`;exports.PontForm.SUCCESS_EVENT=`${exports.PontForm.TAG}:success`;exports.PontForm.ERROR_EVENT=`${exports.PontForm.TAG}:error`;exports.PontForm.RESET_EVENT=`${exports.PontForm.TAG}:reset`;exports.PontForm.PARTS={root:exports.PontForm.ROOT};Bo([a({type:String})],exports.PontForm.prototype,"seed",2);Bo([a({type:String,attribute:"custom-id"})],exports.PontForm.prototype,"customId",2);Bo([a({attribute:!1})],exports.PontForm.prototype,"onSubmit",2);Bo([a({attribute:!1})],exports.PontForm.prototype,"onReset",2);exports.PontForm=Bo([p("pont-form")],exports.PontForm);var WC=Object.defineProperty,YC=Object.getOwnPropertyDescriptor,Uo=(e,t,r,o)=>{for(var n=o>1?void 0:o?YC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&WC(t,r,n),n};exports.PontKitLayout=class extends f{constructor(){super(...arguments),this.spec="",this.designMode=!1,this.branding=Lo,this.handleError=t=>{const r=t.detail??{};console.error(`${t.type}:`,r.message),this.showError(Xh(r.error??r.message))}}set renderSpec(t){this.spec=t,this.requestUpdate()}createRenderRoot(){return this}connectedCallback(){super.connectedCallback();for(const t of exports.PontKitLayout.ERROR_EVENTS)this.addEventListener(t,this.handleError)}disconnectedCallback(){super.disconnectedCallback();for(const t of exports.PontKitLayout.ERROR_EVENTS)this.removeEventListener(t,this.handleError)}updated(){this.renderDynamicContent()}renderDynamicContent(){if(!this.spec)return;const r=(this.shadowRoot||this).querySelector("#dynamic-content");r&&(r.innerHTML=this.spec,r.querySelectorAll("*").forEach(o=>{o.localName.includes("-")&&!customElements.get(o.localName)?exports.PontKitLayout.reportUnregistered(o.localName):customElements.upgrade(o)}))}static reportUnregistered(t){exports.PontKitLayout.reportedUnregistered.has(t)||(exports.PontKitLayout.reportedUnregistered.add(t),console.warn(`pontive: <${t}> is in the rendered spec but this core-elements bundle does not define it`),document.dispatchEvent(new CustomEvent(exports.PontKitLayout.UNREGISTERED_ELEMENT_EVENT,{detail:{tag:t}})))}render(){return l`
5769
+ `}};exports.PontForm.ROOT="form";exports.PontForm.TAG=`${rt}-${exports.PontForm.ROOT}`;exports.PontForm.SUBMIT_EVENT=`${exports.PontForm.TAG}:submit`;exports.PontForm.SUCCESS_EVENT=`${exports.PontForm.TAG}:success`;exports.PontForm.ERROR_EVENT=`${exports.PontForm.TAG}:error`;exports.PontForm.RESET_EVENT=`${exports.PontForm.TAG}:reset`;exports.PontForm.PARTS={root:exports.PontForm.ROOT};Bo([a({type:String})],exports.PontForm.prototype,"seed",2);Bo([a({type:String,attribute:"custom-id"})],exports.PontForm.prototype,"customId",2);Bo([a({attribute:!1})],exports.PontForm.prototype,"onSubmit",2);Bo([a({attribute:!1})],exports.PontForm.prototype,"onReset",2);exports.PontForm=Bo([p("pont-form")],exports.PontForm);var WC=Object.defineProperty,YC=Object.getOwnPropertyDescriptor,Uo=(e,t,r,o)=>{for(var n=o>1?void 0:o?YC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&WC(t,r,n),n};exports.PontKitLayout=class extends f{constructor(){super(...arguments),this.spec="",this.designMode=!1,this.branding=Lo,this.handleError=t=>{const r=t.detail??{};console.error(`${t.type}:`,r.message),this.showError(Jh(r.error??r.message))}}set renderSpec(t){this.spec=t,this.requestUpdate()}createRenderRoot(){return this}connectedCallback(){super.connectedCallback();for(const t of exports.PontKitLayout.ERROR_EVENTS)this.addEventListener(t,this.handleError)}disconnectedCallback(){super.disconnectedCallback();for(const t of exports.PontKitLayout.ERROR_EVENTS)this.removeEventListener(t,this.handleError)}updated(){this.renderDynamicContent()}renderDynamicContent(){if(!this.spec)return;const r=(this.shadowRoot||this).querySelector("#dynamic-content");r&&(r.innerHTML=this.spec,r.querySelectorAll("*").forEach(o=>{o.localName.includes("-")&&!customElements.get(o.localName)?exports.PontKitLayout.reportUnregistered(o.localName):customElements.upgrade(o)}))}static reportUnregistered(t){exports.PontKitLayout.reportedUnregistered.has(t)||(exports.PontKitLayout.reportedUnregistered.add(t),console.warn(`pontive: <${t}> is in the rendered spec but this core-elements bundle does not define it`),document.dispatchEvent(new CustomEvent(exports.PontKitLayout.UNREGISTERED_ELEMENT_EVENT,{detail:{tag:t}})))}render(){return l`
5797
5770
  <pont-form custom-id="pont-layout-form">
5798
5771
  <div class="pont-relative pont-flex">
5799
5772
  <div id="dynamic-content"></div>
5800
5773
  </div>
5801
5774
  </pont-form>
5802
- `}showError({message:t,restartable:r}){const o=this.querySelector("#dynamic-content");if(!o)return;o.querySelectorAll(`[${exports.PontKitLayout.BANNER_ATTR}], pont-alert[status="error"]`).forEach(u=>u.remove());const n=document.createElement("pont-alert");n.setAttribute("status","error"),n.setAttribute("description",t),n.setAttribute(exports.PontKitLayout.BANNER_ATTR,"");const i=[n];if(r){const u=document.createElement("pont-button");u.setAttribute("variant","outline"),u.setAttribute(exports.PontKitLayout.BANNER_ATTR,""),u.textContent="Start again",u.addEventListener("click",()=>this.dispatchEvent(new CustomEvent(exports.PontKitLayout.RESTART_EVENT,{bubbles:!0,composed:!0}))),i.push(u)}const s=o.querySelector(":scope > pont-block"),d=(s==null?void 0:s.querySelector('div[data-slot="card-content"]'))??s;if(!d){o.prepend(...i);return}let c=d.firstElementChild;for(;c&&["PONT-LOGO","PONT-HEADER"].includes(c.tagName);)c=c.nextElementSibling;for(const u of i)d.insertBefore(u,c)}};exports.PontKitLayout.RESTART_EVENT="pont-layout:restart";exports.PontKitLayout.ERROR_EVENTS=[exports.PontForm.ERROR_EVENT,exports.PontProviderButton.ERROR_EVENT,exports.PontPasskeyButton.ERROR_EVENT,exports.PontLink.ERROR_EVENT,exports.PontPasswordField.FORGOT_ERROR_EVENT];exports.PontKitLayout.BANNER_ATTR="data-flow-error";exports.PontKitLayout.reportedUnregistered=new Set;exports.PontKitLayout.UNREGISTERED_ELEMENT_EVENT="pont:unregistered-element";Uo([g()],exports.PontKitLayout.prototype,"spec",2);Uo([a({attribute:!1})],exports.PontKitLayout.prototype,"renderSpec",1);Uo([a({type:Boolean,attribute:"design-mode"}),Wt({context:kh})],exports.PontKitLayout.prototype,"designMode",2);Uo([a({attribute:!1}),Wt({context:Bi})],exports.PontKitLayout.prototype,"branding",2);exports.PontKitLayout=Uo([p("pont-layout")],exports.PontKitLayout);function QC({pathname:e,search:t,env:r}){const o=new URLSearchParams(t),n=o.get("redirect_url")||r.signinRedirectUrl;return[r.signinUrl,r.signupUrl,r.invitationUrl].filter(s=>!!s).some(s=>e.includes(s))?n||"/":o.has("invite_token")&&n?n:null}var ZC=Object.defineProperty,JC=Object.getOwnPropertyDescriptor,Sr=(e,t,r,o)=>{for(var n=o>1?void 0:o?JC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&ZC(t,r,n),n};const XC=`<pont-block>
5775
+ `}showError({message:t,restartable:r}){const o=this.querySelector("#dynamic-content");if(!o)return;o.querySelectorAll(`[${exports.PontKitLayout.BANNER_ATTR}], pont-alert[status="error"]`).forEach(u=>u.remove());const n=document.createElement("pont-alert");n.setAttribute("status","error"),n.setAttribute("description",t),n.setAttribute(exports.PontKitLayout.BANNER_ATTR,"");const i=[n];if(r){const u=document.createElement("pont-button");u.setAttribute("variant","outline"),u.setAttribute(exports.PontKitLayout.BANNER_ATTR,""),u.textContent="Start again",u.addEventListener("click",()=>this.dispatchEvent(new CustomEvent(exports.PontKitLayout.RESTART_EVENT,{bubbles:!0,composed:!0}))),i.push(u)}const s=o.querySelector(":scope > pont-block"),d=(s==null?void 0:s.querySelector('div[data-slot="card-content"]'))??s;if(!d){o.prepend(...i);return}let c=d.firstElementChild;for(;c&&["PONT-LOGO","PONT-HEADER"].includes(c.tagName);)c=c.nextElementSibling;for(const u of i)d.insertBefore(u,c)}};exports.PontKitLayout.RESTART_EVENT="pont-layout:restart";exports.PontKitLayout.ERROR_EVENTS=[exports.PontForm.ERROR_EVENT,exports.PontProviderButton.ERROR_EVENT,exports.PontPasskeyButton.ERROR_EVENT,exports.PontLink.ERROR_EVENT,exports.PontPasswordField.FORGOT_ERROR_EVENT];exports.PontKitLayout.BANNER_ATTR="data-flow-error";exports.PontKitLayout.reportedUnregistered=new Set;exports.PontKitLayout.UNREGISTERED_ELEMENT_EVENT="pont:unregistered-element";Uo([g()],exports.PontKitLayout.prototype,"spec",2);Uo([a({attribute:!1})],exports.PontKitLayout.prototype,"renderSpec",1);Uo([a({type:Boolean,attribute:"design-mode"}),Wt({context:kh})],exports.PontKitLayout.prototype,"designMode",2);Uo([a({attribute:!1}),Wt({context:Bi})],exports.PontKitLayout.prototype,"branding",2);exports.PontKitLayout=Uo([p("pont-layout")],exports.PontKitLayout);function QC({pathname:e,search:t,env:r}){const n=new URLSearchParams(t).get("redirect_url")||r.signinRedirectUrl;return[r.signinUrl,r.signupUrl,r.invitationUrl].filter(s=>!!s).some(s=>e.includes(s))?n||"/":eu(t)&&n?n:null}function eu(e){return new URLSearchParams(e).has("invite_token")}var ZC=Object.defineProperty,JC=Object.getOwnPropertyDescriptor,Sr=(e,t,r,o)=>{for(var n=o>1?void 0:o?JC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&ZC(t,r,n),n};const XC=`<pont-block>
5803
5776
  <pont-header>
5804
5777
  <pont-title content="You continued in another tab"></pont-title>
5805
5778
  <pont-subtitle content="You can close this one."></pont-subtitle>
5806
5779
  </pont-header>
5807
5780
  <pont-link label="Continue here instead" event="continue_here"></pont-link>
5808
- </pont-block>`;exports.PontProvider=class extends f{constructor(){var t,r;super(...arguments),this.env=null,this.locales=(t=this.env)==null?void 0:t.locales,this.effectiveLocales=(r=this.env)==null?void 0:r.locales,this.auth={isAuthenticated:!1,resolved:!1},this.renderSpec=null,this.branding=Lo,this.autoRedirect=!0,this._handleLocaleEvent=o=>{var s;const i=(s=o.detail)==null?void 0:s.locales;i&&this.setLocale(i)},this.BRANDING_LINK_ID="pont-branding-css",this.REDIRECT_ATTEMPT_KEY="sb_auth_redirect_attempt",this.REDIRECT_BOUNCE_WINDOW_MS=1e4}createRenderRoot(){return this}setLocale(t){this.locales!==t&&(this.locales=t,this.dispatchLocaleChangedEvent(t))}dispatchLocaleChangedEvent(t){this.dispatchEvent(new CustomEvent("pont:locale-changed",{detail:{locales:t},bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback(),hP(),document.addEventListener("pont:set-locales",this._handleLocaleEvent),(async()=>{for(;!this.env||!this.env.domain;)await new Promise(r=>setTimeout(r,20));this.updateLocaleAndAuth()})().catch(r=>console.error("Error initializing PontProvider:",r))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pont:set-locales",this._handleLocaleEvent)}getBrandingCssUrl(){if(!this.env)return null;let t;try{t=Ah(this.env.domain)}catch(r){return console.warn("Could not resolve the auth base URL for branding:",r),null}return`${t}/auth/v1/apps/${this.env.appId}/branding.css`}loadBrandingCss(t){const r=document.head.querySelector(`link#${this.BRANDING_LINK_ID}`);if(r&&r.remove(),!t)return;const o=document.createElement("link");o.id=this.BRANDING_LINK_ID,o.rel="stylesheet";const n=Date.now(),i=t.includes("?")?"&":"?";o.href=`${t}${i}v=${n}`,o.onerror=s=>{console.warn("Failed to load branding CSS:",t,s)},document.head.appendChild(o)}configureAuth(t){K.configure({domain:t.domain,appId:t.appId,locales:this.effectiveLocales||this.locales||t.locales,signinUrl:t.signinUrl,signupUrl:t.signupUrl,invitationUrl:t.invitationUrl,onFlowStateChange:r=>{if(r.eventType==="flow_continued_elsewhere"){this.renderSpec=XC;return}r.render_spec&&(this.renderSpec=r.render_spec)},continueHereUrl:t.signinRedirectUrl,onAuthenticated:()=>{this.refreshAuthState()}})}updateLocaleAndAuth(){if(!this.env)return;const t=this.locales||this.env.locales||"";this.effectiveLocales!==t&&(this.effectiveLocales=t,this.dispatchLocaleChangedEvent(t)),this.configureAuth(this.env),$0(this.env),this.restoreThenRefreshAuthState(),this.loadBrandingCss(this.getBrandingCssUrl())}updated(t){var r;super.updated(t),(t.has("env")||t.has("locales"))&&(r=this.env)!=null&&r.domain&&this.updateLocaleAndAuth(),t.has("auth")&&this.handleAuthStateChange()}handleAuthStateChange(){if(!this.autoRedirect||!this.auth.isAuthenticated||!this.env)return;const t=QC({pathname:window.location.pathname,search:window.location.search,env:this.env});if(t){if(this.wasBouncedBackFrom(t)){this.clearRedirectAttempt(),K.invalidateSession(),this.refreshAuthState();return}this.recordRedirectAttempt(t),window.location.href=t}}recordRedirectAttempt(t){try{sessionStorage.setItem(this.REDIRECT_ATTEMPT_KEY,JSON.stringify({target:t,at:Date.now()}))}catch{}}clearRedirectAttempt(){try{sessionStorage.removeItem(this.REDIRECT_ATTEMPT_KEY)}catch{}}wasBouncedBackFrom(t){let r=null;try{r=sessionStorage.getItem(this.REDIRECT_ATTEMPT_KEY)}catch{return!1}if(!r||(this.clearRedirectAttempt(),this.getNavigationType()!=="navigate"))return!1;try{const o=JSON.parse(r);return o.target!==t||typeof o.at!="number"?!1:Date.now()-o.at<this.REDIRECT_BOUNCE_WINDOW_MS}catch{return!1}}getNavigationType(){try{const[t]=performance.getEntriesByType("navigation");return(t==null?void 0:t.type)??"navigate"}catch{return"navigate"}}refreshAuthState(){this.auth={isAuthenticated:K.isAuthenticated(),resolved:!0},this.dispatchAuthChangedEvent(this.auth)}dispatchAuthChangedEvent(t){this.dispatchEvent(new CustomEvent("pont:auth-changed",{detail:{...t},bubbles:!0,composed:!0}))}async restoreThenRefreshAuthState(){try{await K.restoreSession()}catch{}this.refreshAuthState()}};Sr([a({type:Object}),Wt({context:Nh})],exports.PontProvider.prototype,"env",2);Sr([a({type:String})],exports.PontProvider.prototype,"locales",2);Sr([g(),Wt({context:Bh})],exports.PontProvider.prototype,"effectiveLocales",2);Sr([g(),Wt({context:Pr})],exports.PontProvider.prototype,"auth",2);Sr([g(),Wt({context:Mh})],exports.PontProvider.prototype,"renderSpec",2);Sr([g(),Wt({context:Bi})],exports.PontProvider.prototype,"branding",2);Sr([a({type:Boolean})],exports.PontProvider.prototype,"autoRedirect",2);exports.PontProvider=Sr([p("pont-provider")],exports.PontProvider);var t2=Object.defineProperty,e2=Object.getOwnPropertyDescriptor,ru=(e,t,r,o)=>{for(var n=o>1?void 0:o?e2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&t2(t,r,n),n};exports.SignedOut=class extends f{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}updated(t){t.has("auth")&&this.tryRemoveFallback()}render(){var t;return!((t=this.auth)!=null&&t.resolved)||this.auth.isAuthenticated?l``:l` <div>${this._cachedChildren}</div> `}};ru([yt({context:Pr,subscribe:!0}),a({attribute:!1})],exports.SignedOut.prototype,"auth",2);exports.SignedOut=ru([p("pont-signed-out")],exports.SignedOut);var r2=Object.defineProperty,n2=Object.getOwnPropertyDescriptor,nu=(e,t,r,o)=>{for(var n=o>1?void 0:o?n2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&r2(t,r,n),n};exports.SignedIn=class extends f{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}updated(t){t.has("auth")&&this.tryRemoveFallback()}render(){var t;return!((t=this.auth)!=null&&t.resolved)||!this.auth.isAuthenticated?l``:l` <div>${this._cachedChildren}</div> `}};nu([yt({context:Pr,subscribe:!0}),a({attribute:!1})],exports.SignedIn.prototype,"auth",2);exports.SignedIn=nu([p("pont-signed-in")],exports.SignedIn);var o2=Object.defineProperty,i2=Object.getOwnPropertyDescriptor,ts=(e,t,r,o)=>{for(var n=o>1?void 0:o?i2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&o2(t,r,n),n};exports.PontAuthenticated=class extends f{constructor(){super(...arguments),this._cachedChildren=[],this._loadingChildren=[],this._captured=!1,this.redirectUrl="",this.env=null}createRenderRoot(){return this}connectedCallback(){if(super.connectedCallback(),this._captured)return;this._captured=!0;const t=Array.from(this.childNodes);t.forEach(r=>this.removeChild(r));for(const r of t)r instanceof Element&&r.getAttribute("slot")==="loading"?this._loadingChildren.push(r):this._cachedChildren.push(r)}render(){var t;return this.auth?this.auth.resolved?this.auth.isAuthenticated?l`${this._cachedChildren}`:(window.location.href=this.redirectUrl||((t=this.env)==null?void 0:t.signinUrl),h):l`${this._loadingChildren}`:h}};ts([a({type:String})],exports.PontAuthenticated.prototype,"redirectUrl",2);ts([yt({context:Nh}),a({attribute:!1})],exports.PontAuthenticated.prototype,"env",2);ts([yt({context:Pr,subscribe:!0}),a({attribute:!1})],exports.PontAuthenticated.prototype,"auth",2);exports.PontAuthenticated=ts([p("pont-authenticated")],exports.PontAuthenticated);var s2=Object.defineProperty,a2=Object.getOwnPropertyDescriptor,ou=(e,t,r,o)=>{for(var n=o>1?void 0:o?a2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&s2(t,r,n),n};exports.AuthStateElement=class extends f{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}syncAuthChildren(){this.auth&&(this.auth.isAuthenticated?this.querySelectorAll("pont-signed-out").forEach(t=>t.remove()):this.querySelectorAll("pont-signed-in").forEach(t=>t.remove()))}updated(t){var r;t.has("auth")&&(r=this.auth)!=null&&r.resolved&&(this.syncAuthChildren(),this.tryRemoveFallback())}render(){var t;return(t=this.auth)!=null&&t.resolved?l` <div>${this._cachedChildren}</div> `:l``}};ou([yt({context:Pr,subscribe:!0}),a({attribute:!1})],exports.AuthStateElement.prototype,"auth",2);exports.AuthStateElement=ou([p("pont-auth-state")],exports.AuthStateElement);function l2(){return K}exports.BaseElement=jt;exports.ORGANIZATION_CHANGED_EVENT=Xo;exports.ORGANIZATION_SWITCH_FAILED_EVENT=tu;exports.PontAccountMenu=Ue;exports.PontAccountSettings=Rt;exports.PontMemberManagement=j;exports.PontOrganizationSwitcher=Xt;exports.PontPaginator=Wr;exports.PontUserSnippet=Xi;exports.closeAccountSettingsModal=Ol;exports.closeMemberManagementModal=Qh;exports.openAccountSettingsModal=xl;exports.openMemberManagementModal=Yh;exports.setLocales=Zh;exports.useAuthProvider=l2;
5781
+ </pont-block>`;exports.PontProvider=class extends f{constructor(){var t,r;super(...arguments),this.env=null,this.locales=(t=this.env)==null?void 0:t.locales,this.effectiveLocales=(r=this.env)==null?void 0:r.locales,this.auth={isAuthenticated:!1,resolved:!1},this.renderSpec=null,this.branding=Lo,this.autoRedirect=!0,this._handleLocaleEvent=o=>{var s;const i=(s=o.detail)==null?void 0:s.locales;i&&this.setLocale(i)},this.BRANDING_LINK_ID="pont-branding-css",this.REDIRECT_ATTEMPT_KEY="sb_auth_redirect_attempt",this.REDIRECT_BOUNCE_WINDOW_MS=1e4}createRenderRoot(){return this}setLocale(t){this.locales!==t&&(this.locales=t,this.dispatchLocaleChangedEvent(t))}dispatchLocaleChangedEvent(t){this.dispatchEvent(new CustomEvent("pont:locale-changed",{detail:{locales:t},bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback(),hP(),document.addEventListener("pont:set-locales",this._handleLocaleEvent),(async()=>{for(;!this.env||!this.env.domain;)await new Promise(r=>setTimeout(r,20));this.updateLocaleAndAuth()})().catch(r=>console.error("Error initializing PontProvider:",r))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pont:set-locales",this._handleLocaleEvent)}getBrandingCssUrl(){if(!this.env)return null;let t;try{t=Ah(this.env.domain)}catch(r){return console.warn("Could not resolve the auth base URL for branding:",r),null}return`${t}/auth/v1/apps/${this.env.appId}/branding.css`}loadBrandingCss(t){const r=document.head.querySelector(`link#${this.BRANDING_LINK_ID}`);if(r&&r.remove(),!t)return;const o=document.createElement("link");o.id=this.BRANDING_LINK_ID,o.rel="stylesheet";const n=Date.now(),i=t.includes("?")?"&":"?";o.href=`${t}${i}v=${n}`,o.onerror=s=>{console.warn("Failed to load branding CSS:",t,s)},document.head.appendChild(o)}configureAuth(t){G.configure({domain:t.domain,appId:t.appId,locales:this.effectiveLocales||this.locales||t.locales,signinUrl:t.signinUrl,signupUrl:t.signupUrl,invitationUrl:t.invitationUrl,onFlowStateChange:r=>{if(r.eventType==="flow_continued_elsewhere"){this.renderSpec=XC;return}r.render_spec&&(this.renderSpec=r.render_spec)},continueHereUrl:t.signinRedirectUrl,onAuthenticated:()=>{this.refreshAuthState()}})}updateLocaleAndAuth(){if(!this.env)return;const t=this.locales||this.env.locales||"";this.effectiveLocales!==t&&(this.effectiveLocales=t,this.dispatchLocaleChangedEvent(t)),this.configureAuth(this.env),$0(this.env),this.restoreThenRefreshAuthState(),this.loadBrandingCss(this.getBrandingCssUrl())}updated(t){var r;super.updated(t),(t.has("env")||t.has("locales"))&&(r=this.env)!=null&&r.domain&&this.updateLocaleAndAuth(),t.has("auth")&&this.handleAuthStateChange()}handleAuthStateChange(){if(!this.autoRedirect||!this.auth.isAuthenticated||!this.env)return;const t=QC({pathname:window.location.pathname,search:window.location.search,env:this.env});if(t){if(this.wasBouncedBackFrom(t)){this.clearRedirectAttempt(),G.invalidateSession(),this.refreshAuthState();return}this.recordRedirectAttempt(t),window.location.href=t}}recordRedirectAttempt(t){try{sessionStorage.setItem(this.REDIRECT_ATTEMPT_KEY,JSON.stringify({target:t,at:Date.now()}))}catch{}}clearRedirectAttempt(){try{sessionStorage.removeItem(this.REDIRECT_ATTEMPT_KEY)}catch{}}wasBouncedBackFrom(t){let r=null;try{r=sessionStorage.getItem(this.REDIRECT_ATTEMPT_KEY)}catch{return!1}if(!r||(this.clearRedirectAttempt(),this.getNavigationType()!=="navigate"))return!1;try{const o=JSON.parse(r);return o.target!==t||typeof o.at!="number"?!1:Date.now()-o.at<this.REDIRECT_BOUNCE_WINDOW_MS}catch{return!1}}getNavigationType(){try{const[t]=performance.getEntriesByType("navigation");return(t==null?void 0:t.type)??"navigate"}catch{return"navigate"}}refreshAuthState(){this.auth={isAuthenticated:G.isAuthenticated(),resolved:!0},this.dispatchAuthChangedEvent(this.auth)}dispatchAuthChangedEvent(t){this.dispatchEvent(new CustomEvent("pont:auth-changed",{detail:{...t},bubbles:!0,composed:!0}))}async restoreThenRefreshAuthState(){if(eu(window.location.search)){G.invalidateSession(),this.refreshAuthState();return}try{await G.restoreSession()}catch{}this.refreshAuthState()}};Sr([a({type:Object}),Wt({context:Nh})],exports.PontProvider.prototype,"env",2);Sr([a({type:String})],exports.PontProvider.prototype,"locales",2);Sr([g(),Wt({context:Bh})],exports.PontProvider.prototype,"effectiveLocales",2);Sr([g(),Wt({context:Pr})],exports.PontProvider.prototype,"auth",2);Sr([g(),Wt({context:Mh})],exports.PontProvider.prototype,"renderSpec",2);Sr([g(),Wt({context:Bi})],exports.PontProvider.prototype,"branding",2);Sr([a({type:Boolean})],exports.PontProvider.prototype,"autoRedirect",2);exports.PontProvider=Sr([p("pont-provider")],exports.PontProvider);var t2=Object.defineProperty,e2=Object.getOwnPropertyDescriptor,ru=(e,t,r,o)=>{for(var n=o>1?void 0:o?e2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&t2(t,r,n),n};exports.SignedOut=class extends f{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}updated(t){t.has("auth")&&this.tryRemoveFallback()}render(){var t;return!((t=this.auth)!=null&&t.resolved)||this.auth.isAuthenticated?l``:l` <div>${this._cachedChildren}</div> `}};ru([yt({context:Pr,subscribe:!0}),a({attribute:!1})],exports.SignedOut.prototype,"auth",2);exports.SignedOut=ru([p("pont-signed-out")],exports.SignedOut);var r2=Object.defineProperty,n2=Object.getOwnPropertyDescriptor,nu=(e,t,r,o)=>{for(var n=o>1?void 0:o?n2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&r2(t,r,n),n};exports.SignedIn=class extends f{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}updated(t){t.has("auth")&&this.tryRemoveFallback()}render(){var t;return!((t=this.auth)!=null&&t.resolved)||!this.auth.isAuthenticated?l``:l` <div>${this._cachedChildren}</div> `}};nu([yt({context:Pr,subscribe:!0}),a({attribute:!1})],exports.SignedIn.prototype,"auth",2);exports.SignedIn=nu([p("pont-signed-in")],exports.SignedIn);var o2=Object.defineProperty,i2=Object.getOwnPropertyDescriptor,ts=(e,t,r,o)=>{for(var n=o>1?void 0:o?i2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&o2(t,r,n),n};exports.PontAuthenticated=class extends f{constructor(){super(...arguments),this._cachedChildren=[],this._loadingChildren=[],this._captured=!1,this.redirectUrl="",this.env=null}createRenderRoot(){return this}connectedCallback(){if(super.connectedCallback(),this._captured)return;this._captured=!0;const t=Array.from(this.childNodes);t.forEach(r=>this.removeChild(r));for(const r of t)r instanceof Element&&r.getAttribute("slot")==="loading"?this._loadingChildren.push(r):this._cachedChildren.push(r)}render(){var t;return this.auth?this.auth.resolved?this.auth.isAuthenticated?l`${this._cachedChildren}`:(window.location.href=this.redirectUrl||((t=this.env)==null?void 0:t.signinUrl),h):l`${this._loadingChildren}`:h}};ts([a({type:String})],exports.PontAuthenticated.prototype,"redirectUrl",2);ts([yt({context:Nh}),a({attribute:!1})],exports.PontAuthenticated.prototype,"env",2);ts([yt({context:Pr,subscribe:!0}),a({attribute:!1})],exports.PontAuthenticated.prototype,"auth",2);exports.PontAuthenticated=ts([p("pont-authenticated")],exports.PontAuthenticated);var s2=Object.defineProperty,a2=Object.getOwnPropertyDescriptor,ou=(e,t,r,o)=>{for(var n=o>1?void 0:o?a2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&s2(t,r,n),n};exports.AuthStateElement=class extends f{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}syncAuthChildren(){this.auth&&(this.auth.isAuthenticated?this.querySelectorAll("pont-signed-out").forEach(t=>t.remove()):this.querySelectorAll("pont-signed-in").forEach(t=>t.remove()))}updated(t){var r;t.has("auth")&&(r=this.auth)!=null&&r.resolved&&(this.syncAuthChildren(),this.tryRemoveFallback())}render(){var t;return(t=this.auth)!=null&&t.resolved?l` <div>${this._cachedChildren}</div> `:l``}};ou([yt({context:Pr,subscribe:!0}),a({attribute:!1})],exports.AuthStateElement.prototype,"auth",2);exports.AuthStateElement=ou([p("pont-auth-state")],exports.AuthStateElement);function l2(){return G}exports.BaseElement=Ut;exports.ORGANIZATION_CHANGED_EVENT=Xo;exports.ORGANIZATION_SWITCH_FAILED_EVENT=Xh;exports.PontAccountMenu=Ue;exports.PontAccountSettings=Rt;exports.PontMemberManagement=j;exports.PontOrganizationSwitcher=Jt;exports.PontPaginator=Wr;exports.PontUserSnippet=Xi;exports.closeAccountSettingsModal=Ol;exports.closeMemberManagementModal=Yh;exports.openAccountSettingsModal=xl;exports.openMemberManagementModal=Wh;exports.setLocales=Qh;exports.useAuthProvider=l2;
5809
5782
  //# sourceMappingURL=index.js.map