@pontive/pontkit-core 1.31.0 → 1.32.1
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/catalog.json +1 -1
- package/custom-elements.json +1 -1
- package/dist/components/widgets/pont-member-management/components/members-panel.d.ts +6 -1
- package/dist/components/widgets/pont-member-management/components/role-options.d.ts +11 -0
- package/dist/components/widgets/pont-member-management/errors.d.ts +10 -2
- package/dist/i18n/messages.d.ts +1 -1
- package/dist/index.js +244 -243
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1144 -1116
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -38,17 +38,17 @@
|
|
|
38
38
|
* @license
|
|
39
39
|
* Copyright 2017 Google LLC
|
|
40
40
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
41
|
-
*/const{is:hm,defineProperty:um,getOwnPropertyDescriptor:mm,getOwnPropertyNames:fm,getOwnPropertySymbols:gm,getPrototypeOf:vm}=Object,$r=globalThis,md=$r.trustedTypes,bm=md?md.emptyScript:"",Rs=$r.reactiveElementPolyfillSupport,
|
|
41
|
+
*/const{is:hm,defineProperty:um,getOwnPropertyDescriptor:mm,getOwnPropertyNames:fm,getOwnPropertySymbols:gm,getPrototypeOf:vm}=Object,$r=globalThis,md=$r.trustedTypes,bm=md?md.emptyScript:"",Rs=$r.reactiveElementPolyfillSupport,Oo=(e,t)=>e,Si={toAttribute(e,t){switch(t){case Boolean:e=e?bm:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},fl=(e,t)=>!hm(e,t),fd={attribute:!0,type:String,converter:Si,reflect:!1,useDefault:!1,hasChanged:fl};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),$r.litPropertyMetadata??($r.litPropertyMetadata=new WeakMap);let Fn=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,r=fd){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(t,r),!r.noAccessor){const o=Symbol(),n=this.getPropertyDescriptor(t,o,r);n!==void 0&&um(this.prototype,t,n)}}static getPropertyDescriptor(t,r,o){const{get:n,set:i}=mm(this.prototype,t)??{get(){return this[r]},set(s){this[r]=s}};return{get:n,set(s){const d=n==null?void 0:n.call(this);i==null||i.call(this,s),this.requestUpdate(t,d,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??fd}static _$Ei(){if(this.hasOwnProperty(Oo("elementProperties")))return;const t=vm(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Oo("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Oo("properties"))){const r=this.properties,o=[...fm(r),...gm(r)];for(const n of o)this.createProperty(n,r[n])}const t=this[Symbol.metadata];if(t!==null){const r=litPropertyMetadata.get(t);if(r!==void 0)for(const[o,n]of r)this.elementProperties.set(o,n)}this._$Eh=new Map;for(const[r,o]of this.elementProperties){const n=this._$Eu(r,o);n!==void 0&&this._$Eh.set(n,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const r=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const n of o)r.unshift(ud(n))}else t!==void 0&&r.push(ud(t));return r}static _$Eu(t,r){const o=r.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(r=>this.enableUpdating=r),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(r=>r(this))}addController(t){var r;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((r=t.hostConnected)==null||r.call(t))}removeController(t){var r;(r=this._$EO)==null||r.delete(t)}_$E_(){const t=new Map,r=this.constructor.elementProperties;for(const o of r.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return pm(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(r=>{var o;return(o=r.hostConnected)==null?void 0:o.call(r)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(r=>{var o;return(o=r.hostDisconnected)==null?void 0:o.call(r)})}attributeChangedCallback(t,r,o){this._$AK(t,o)}_$ET(t,r){var i;const o=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,o);if(n!==void 0&&o.reflect===!0){const s=(((i=o.converter)==null?void 0:i.toAttribute)!==void 0?o.converter:Si).toAttribute(r,o.type);this._$Em=t,s==null?this.removeAttribute(n):this.setAttribute(n,s),this._$Em=null}}_$AK(t,r){var i,s;const o=this.constructor,n=o._$Eh.get(t);if(n!==void 0&&this._$Em!==n){const d=o.getPropertyOptions(n),c=typeof d.converter=="function"?{fromAttribute:d.converter}:((i=d.converter)==null?void 0:i.fromAttribute)!==void 0?d.converter:Si;this._$Em=n;const u=c.fromAttribute(r,d.type);this[n]=u??((s=this._$Ej)==null?void 0:s.get(n))??u,this._$Em=null}}requestUpdate(t,r,o,n=!1,i){var s;if(t!==void 0){const d=this.constructor;if(n===!1&&(i=this[t]),o??(o=d.getPropertyOptions(t)),!((o.hasChanged??fl)(i,r)||o.useDefault&&o.reflect&&i===((s=this._$Ej)==null?void 0:s.get(t))&&!this.hasAttribute(d._$Eu(t,o))))return;this.C(t,r,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,r,{useDefault:o,reflect:n,wrapped:i},s){o&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,s??r??this[t]),i!==!0||s!==void 0)||(this._$AL.has(t)||(this.hasUpdated||o||(r=void 0),this._$AL.set(t,r)),n===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var o;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[i,s]of this._$Ep)this[i]=s;this._$Ep=void 0}const n=this.constructor.elementProperties;if(n.size>0)for(const[i,s]of n){const{wrapped:d}=s,c=this[i];d!==!0||this._$AL.has(i)||c===void 0||this.C(i,void 0,s,c)}}let t=!1;const r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),(o=this._$EO)==null||o.forEach(n=>{var i;return(i=n.hostUpdate)==null?void 0:i.call(n)}),this.update(r)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(r)}willUpdate(t){}_$AE(t){var r;(r=this._$EO)==null||r.forEach(o=>{var n;return(n=o.hostUpdated)==null?void 0:n.call(o)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(r=>this._$ET(r,this[r]))),this._$EM()}updated(t){}firstUpdated(t){}};Fn.elementStyles=[],Fn.shadowRootOptions={mode:"open"},Fn[Oo("elementProperties")]=new Map,Fn[Oo("finalized")]=new Map,Rs==null||Rs({ReactiveElement:Fn}),($r.reactiveElementVersions??($r.reactiveElementVersions=[])).push("2.1.2");/**
|
|
42
42
|
* @license
|
|
43
43
|
* Copyright 2017 Google LLC
|
|
44
44
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
45
|
-
*/const
|
|
46
|
-
\f\r]
|
|
47
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),yd=/'/g,wd=/"/g,ch=/^(?:script|style|textarea|title)$/i,ph=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),l=ph(1),
|
|
45
|
+
*/const Ro=globalThis,gd=e=>e,xi=Ro.trustedTypes,vd=xi?xi.createPolicy("lit-html",{createHTML:e=>e}):void 0,lh="$lit$",_r=`lit$${Math.random().toFixed(9).slice(2)}$`,dh="?"+_r,_m=`<${dh}>`,Yr=document,To=()=>Yr.createComment(""),Ao=e=>e===null||typeof e!="object"&&typeof e!="function",gl=Array.isArray,ym=e=>gl(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",Is=`[
|
|
46
|
+
\f\r]`,$o=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,bd=/-->/g,_d=/>/g,Mr=RegExp(`>|${Is}(?:([^\\s"'>=/]+)(${Is}*=${Is}*(?:[^
|
|
47
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),yd=/'/g,wd=/"/g,ch=/^(?:script|style|textarea|title)$/i,ph=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),l=ph(1),G=ph(2),Vt=Symbol.for("lit-noChange"),h=Symbol.for("lit-nothing"),$d=new WeakMap,Gr=Yr.createTreeWalker(Yr,129);function hh(e,t){if(!gl(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return vd!==void 0?vd.createHTML(t):t}const wm=(e,t)=>{const r=e.length-1,o=[];let n,i=t===2?"<svg>":t===3?"<math>":"",s=$o;for(let d=0;d<r;d++){const c=e[d];let u,b,_=-1,w=0;for(;w<c.length&&(s.lastIndex=w,b=s.exec(c),b!==null);)w=s.lastIndex,s===$o?b[1]==="!--"?s=bd:b[1]!==void 0?s=_d:b[2]!==void 0?(ch.test(b[2])&&(n=RegExp("</"+b[2],"g")),s=Mr):b[3]!==void 0&&(s=Mr):s===Mr?b[0]===">"?(s=n??$o,_=-1):b[1]===void 0?_=-2:(_=s.lastIndex-b[2].length,u=b[1],s=b[3]===void 0?Mr:b[3]==='"'?wd:yd):s===wd||s===yd?s=Mr:s===bd||s===_d?s=$o:(s=Mr,n=void 0);const y=s===Mr&&e[d+1].startsWith("/>")?" ":"";i+=s===$o?c+_m:_>=0?(o.push(u),c.slice(0,_)+lh+c.slice(_)+_r+y):c+_r+(_===-2?d:y)}return[hh(e,i+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]};class Do{constructor({strings:t,_$litType$:r},o){let n;this.parts=[];let i=0,s=0;const d=t.length-1,c=this.parts,[u,b]=wm(t,r);if(this.el=Do.createElement(u,o),Gr.currentNode=this.el.content,r===2||r===3){const _=this.el.content.firstChild;_.replaceWith(..._.childNodes)}for(;(n=Gr.nextNode())!==null&&c.length<d;){if(n.nodeType===1){if(n.hasAttributes())for(const _ of n.getAttributeNames())if(_.endsWith(lh)){const w=b[s++],y=n.getAttribute(_).split(_r),P=/([.?@])?(.*)/.exec(w);c.push({type:1,index:i,name:P[2],strings:y,ctor:P[1]==="."?Pm:P[1]==="?"?Cm:P[1]==="@"?Em:es}),n.removeAttribute(_)}else _.startsWith(_r)&&(c.push({type:6,index:i}),n.removeAttribute(_));if(ch.test(n.tagName)){const _=n.textContent.split(_r),w=_.length-1;if(w>0){n.textContent=xi?xi.emptyScript:"";for(let y=0;y<w;y++)n.append(_[y],To()),Gr.nextNode(),c.push({type:2,index:++i});n.append(_[w],To())}}}else if(n.nodeType===8)if(n.data===dh)c.push({type:2,index:i});else{let _=-1;for(;(_=n.data.indexOf(_r,_+1))!==-1;)c.push({type:7,index:i}),_+=_r.length-1}i++}}static createElement(t,r){const o=Yr.createElement("template");return o.innerHTML=t,o}}function qn(e,t,r=e,o){var s,d;if(t===Vt)return t;let n=o!==void 0?(s=r._$Co)==null?void 0:s[o]:r._$Cl;const i=Ao(t)?void 0:t._$litDirective$;return(n==null?void 0:n.constructor)!==i&&((d=n==null?void 0:n._$AO)==null||d.call(n,!1),i===void 0?n=void 0:(n=new i(e),n._$AT(e,r,o)),o!==void 0?(r._$Co??(r._$Co=[]))[o]=n:r._$Cl=n),n!==void 0&&(t=qn(e,n._$AS(e,t.values),n,o)),t}class $m{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:r},parts:o}=this._$AD,n=((t==null?void 0:t.creationScope)??Yr).importNode(r,!0);Gr.currentNode=n;let i=Gr.nextNode(),s=0,d=0,c=o[0];for(;c!==void 0;){if(s===c.index){let u;c.type===2?u=new to(i,i.nextSibling,this,t):c.type===1?u=new c.ctor(i,c.name,c.strings,this,t):c.type===6&&(u=new Sm(i,this,t)),this._$AV.push(u),c=o[++d]}s!==(c==null?void 0:c.index)&&(i=Gr.nextNode(),s++)}return Gr.currentNode=Yr,n}p(t){let r=0;for(const o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,r),r+=o.strings.length-2):o._$AI(t[r])),r++}}class to{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,r,o,n){this.type=2,this._$AH=h,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=o,this.options=n,this._$Cv=(n==null?void 0:n.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const r=this._$AM;return r!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=qn(this,t,r),Ao(t)?t===h||t==null||t===""?(this._$AH!==h&&this._$AR(),this._$AH=h):t!==this._$AH&&t!==Vt&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ym(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==h&&Ao(this._$AH)?this._$AA.nextSibling.data=t:this.T(Yr.createTextNode(t)),this._$AH=t}$(t){var i;const{values:r,_$litType$:o}=t,n=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=Do.createElement(hh(o.h,o.h[0]),this.options)),o);if(((i=this._$AH)==null?void 0:i._$AD)===n)this._$AH.p(r);else{const s=new $m(n,this),d=s.u(this.options);s.p(r),this.T(d),this._$AH=s}}_$AC(t){let r=$d.get(t.strings);return r===void 0&&$d.set(t.strings,r=new Do(t)),r}k(t){gl(this._$AH)||(this._$AH=[],this._$AR());const r=this._$AH;let o,n=0;for(const i of t)n===r.length?r.push(o=new to(this.O(To()),this.O(To()),this,this.options)):o=r[n],o._$AI(i),n++;n<r.length&&(this._$AR(o&&o._$AB.nextSibling,n),r.length=n)}_$AR(t=this._$AA.nextSibling,r){var o;for((o=this._$AP)==null?void 0:o.call(this,!1,!0,r);t!==this._$AB;){const n=gd(t).nextSibling;gd(t).remove(),t=n}}setConnected(t){var r;this._$AM===void 0&&(this._$Cv=t,(r=this._$AP)==null||r.call(this,t))}}class es{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,o,n,i){this.type=1,this._$AH=h,this._$AN=void 0,this.element=t,this.name=r,this._$AM=n,this.options=i,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=h}_$AI(t,r=this,o,n){const i=this.strings;let s=!1;if(i===void 0)t=qn(this,t,r,0),s=!Ao(t)||t!==this._$AH&&t!==Vt,s&&(this._$AH=t);else{const d=t;let c,u;for(t=i[0],c=0;c<i.length-1;c++)u=qn(this,d[o+c],r,c),u===Vt&&(u=this._$AH[c]),s||(s=!Ao(u)||u!==this._$AH[c]),u===h?t=h:t!==h&&(t+=(u??"")+i[c+1]),this._$AH[c]=u}s&&!n&&this.j(t)}j(t){t===h?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Pm extends es{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===h?void 0:t}}class Cm extends es{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==h)}}class Em extends es{constructor(t,r,o,n,i){super(t,r,o,n,i),this.type=5}_$AI(t,r=this){if((t=qn(this,t,r,0)??h)===Vt)return;const o=this._$AH,n=t===h&&o!==h||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,i=t!==h&&(o===h||n);n&&this.element.removeEventListener(this.name,this,o),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var r;typeof this._$AH=="function"?this._$AH.call(((r=this.options)==null?void 0:r.host)??this.element,t):this._$AH.handleEvent(t)}}class Sm{constructor(t,r,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){qn(this,t)}}const xm={I:to},Ts=Ro.litHtmlPolyfillSupport;Ts==null||Ts(Do,to),(Ro.litHtmlVersions??(Ro.litHtmlVersions=[])).push("3.3.3");const Om=(e,t,r)=>{const o=(r==null?void 0:r.renderBefore)??t;let n=o._$litPart$;if(n===void 0){const i=(r==null?void 0:r.renderBefore)??null;o._$litPart$=n=new to(t.insertBefore(To(),i),i,void 0,r??{})}return n._$AI(e),n};/**
|
|
48
48
|
* @license
|
|
49
49
|
* Copyright 2017 Google LLC
|
|
50
50
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
|
-
*/const Hr=globalThis;let v=class extends
|
|
51
|
+
*/const Hr=globalThis;let v=class extends Fn{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var r;const t=super.createRenderRoot();return(r=this.renderOptions).renderBefore??(r.renderBefore=t.firstChild),t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Om(r,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return Vt}};var ih;v._$litElement$=!0,v.finalized=!0,(ih=Hr.litElementHydrateSupport)==null||ih.call(Hr,{LitElement:v});const As=Hr.litElementPolyfillSupport;As==null||As({LitElement:v});(Hr.litElementVersions??(Hr.litElementVersions=[])).push("4.2.2");/**
|
|
52
52
|
* @license
|
|
53
53
|
* Copyright 2017 Google LLC
|
|
54
54
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -77,23 +77,23 @@
|
|
|
77
77
|
.wrapper {
|
|
78
78
|
display: block;
|
|
79
79
|
}
|
|
80
|
-
`;let fa=ad;customElements.define("pont-shadow-wrapper",fa);function mh(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=mh(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function bl(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=mh(e))&&(o&&(o+=" "),o+=t);return o}const _l="-",Lm=e=>{const t=Fm(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:s=>{const d=s.split(_l);return d[0]===""&&d.length!==1&&d.shift(),fh(d,t)||km(s)},getConflictingClassGroupIds:(s,d)=>{const c=r[s]||[];return d&&o[s]?[...c,...o[s]]:c}}},fh=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),n=o?fh(e.slice(1),o):void 0;if(n)return n;if(t.validators.length===0)return;const i=e.join(_l);return(s=t.validators.find(({validator:d})=>d(i)))==null?void 0:s.classGroupId},Pd=/^\[(.+)\]$/,km=e=>{if(Pd.test(e)){const t=Pd.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Fm=e=>{const{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Mm(Object.entries(e.classGroups),r).forEach(([i,s])=>{ga(s,o,i,t)}),o},ga=(e,t,r,o)=>{e.forEach(n=>{if(typeof n=="string"){const i=n===""?t:Cd(t,n);i.classGroupId=r;return}if(typeof n=="function"){if(Nm(n)){ga(n(o),t,r,o);return}t.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([i,s])=>{ga(s,Cd(t,i),r,o)})})},Cd=(e,t)=>{let r=e;return t.split(_l).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Nm=e=>e.isThemeGetter,Mm=(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,Um=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)}}},gh="!",Bm=e=>{const{separator:t,experimentalParseClassName:r}=e,o=t.length===1,n=t[0],i=t.length,s=d=>{const c=[];let u=0,b=0,_;for(let O=0;O<d.length;O++){let x=d[O];if(u===0){if(x===n&&(o||d.slice(O,O+i)===t)){c.push(d.slice(b,O)),b=O+i;continue}if(x==="/"){_=O;continue}}x==="["?u++:x==="]"&&u--}const w=c.length===0?d:d.substring(b),y=w.startsWith(gh),P=y?w.substring(1):w,C=_&&_>b?_-b:void 0;return{modifiers:c,hasImportantModifier:y,baseClassName:P,maybePostfixModifierPosition:C}};return r?d=>r({className:d,parseClassName:s}):s},qm=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},jm=e=>({cache:Um(e.cacheSize),parseClassName:Bm(e),...Lm(e)}),zm=/\s+/,Vm=(e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,i=[],s=e.trim().split(zm);let d="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{modifiers:b,hasImportantModifier:_,baseClassName:w,maybePostfixModifierPosition:y}=r(u);let P=!!y,C=o(P?w.substring(0,y):w);if(!C){if(!P){d=u+(d.length>0?" "+d:d);continue}if(C=o(w),!C){d=u+(d.length>0?" "+d:d);continue}P=!1}const O=qm(b).join(":"),x=_?O+gh:O,L=x+C;if(i.includes(L))continue;i.push(L);const k=n(C,P);for(let T=0;T<k.length;++T){const Z=k[T];i.push(x+Z)}d=u+(d.length>0?" "+d:d)}return d};function Gm(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=vh(t))&&(o&&(o+=" "),o+=r);return o}const vh=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=vh(e[o]))&&(r&&(r+=" "),r+=t);return r};function Hm(e,...t){let r,o,n,i=s;function s(c){const u=t.reduce((b,_)=>_(b),e());return r=jm(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 b=Vm(c,r);return n(c,b),b}return function(){return i(Gm.apply(null,arguments))}}const tt=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},bh=/^\[(?:([a-z-]+):)?(.+)\]$/i,Km=/^\d+\/\d+$/,Wm=new Set(["px","full","screen"]),Ym=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Qm=/\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$/,Jm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Xm=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Zm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ze=e=>Mn(e)||Wm.has(e)||Km.test(e),fr=e=>to(e,"length",lf),Mn=e=>!!e&&!Number.isNaN(Number(e)),Ds=e=>to(e,"number",Mn),$o=e=>!!e&&Number.isInteger(Number(e)),tf=e=>e.endsWith("%")&&Mn(e.slice(0,-1)),q=e=>bh.test(e),gr=e=>Ym.test(e),ef=new Set(["length","size","percentage"]),rf=e=>to(e,ef,_h),nf=e=>to(e,"position",_h),of=new Set(["image","url"]),sf=e=>to(e,of,cf),af=e=>to(e,"",df),Po=()=>!0,to=(e,t,r)=>{const o=bh.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},lf=e=>Qm.test(e)&&!Jm.test(e),_h=()=>!1,df=e=>Xm.test(e),cf=e=>Zm.test(e),pf=()=>{const e=tt("colors"),t=tt("spacing"),r=tt("blur"),o=tt("brightness"),n=tt("borderColor"),i=tt("borderRadius"),s=tt("borderSpacing"),d=tt("borderWidth"),c=tt("contrast"),u=tt("grayscale"),b=tt("hueRotate"),_=tt("invert"),w=tt("gap"),y=tt("gradientColorStops"),P=tt("gradientColorStopPositions"),C=tt("inset"),O=tt("margin"),x=tt("opacity"),L=tt("padding"),k=tt("saturate"),T=tt("scale"),Z=tt("sepia"),I=tt("skew"),A=tt("space"),D=tt("translate"),R=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",q,t],E=()=>[q,t],N=()=>["",Ze,fr],B=()=>["auto",Mn,q],ie=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ye=()=>["solid","dashed","dotted","double","none"],di=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Pn=()=>["start","end","center","between","around","evenly","stretch"],Nr=()=>["","0",q],Cn=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Dt=()=>[Mn,q];return{cacheSize:500,separator:":",theme:{colors:[Po],spacing:[Ze,fr],blur:["none","",gr,q],brightness:Dt(),borderColor:[e],borderRadius:["none","","full",gr,q],borderSpacing:E(),borderWidth:N(),contrast:Dt(),grayscale:Nr(),hueRotate:Dt(),invert:Nr(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[tf,fr],inset:F(),margin:F(),opacity:Dt(),padding:E(),saturate:Dt(),scale:Dt(),sepia:Nr(),skew:Dt(),space:E(),translate:E()},classGroups:{aspect:[{aspect:["auto","square","video",q]}],container:["container"],columns:[{columns:[gr]}],"break-after":[{"break-after":Cn()}],"break-before":[{"break-before":Cn()}],"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:[...ie(),q]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[C]}],"inset-x":[{"inset-x":[C]}],"inset-y":[{"inset-y":[C]}],start:[{start:[C]}],end:[{end:[C]}],top:[{top:[C]}],right:[{right:[C]}],bottom:[{bottom:[C]}],left:[{left:[C]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",$o,q]}],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",q]}],grow:[{grow:Nr()}],shrink:[{shrink:Nr()}],order:[{order:["first","last","none",$o,q]}],"grid-cols":[{"grid-cols":[Po]}],"col-start-end":[{col:["auto",{span:["full",$o,q]},q]}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":[Po]}],"row-start-end":[{row:["auto",{span:[$o,q]},q]}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",q]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",q]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:["normal",...Pn()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Pn(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Pn(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[L]}],px:[{px:[L]}],py:[{py:[L]}],ps:[{ps:[L]}],pe:[{pe:[L]}],pt:[{pt:[L]}],pr:[{pr:[L]}],pb:[{pb:[L]}],pl:[{pl:[L]}],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",q,t]}],"min-w":[{"min-w":[q,t,"min","max","fit"]}],"max-w":[{"max-w":[q,t,"none","full","min","max","fit","prose",{screen:[gr]},gr]}],h:[{h:[q,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[q,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[q,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[q,t,"auto","min","max","fit"]}],"font-size":[{text:["base",gr,fr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ds]}],"font-family":[{font:[Po]}],"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",q]}],"line-clamp":[{"line-clamp":["none",Mn,Ds]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ze,q]}],"list-image":[{"list-image":["none",q]}],"list-style-type":[{list:["none","disc","decimal",q]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ye(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ze,fr]}],"underline-offset":[{"underline-offset":["auto",Ze,q]}],"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:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",q]}],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",q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ie(),nf]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",rf]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},sf]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[P]}],"gradient-via-pos":[{via:[P]}],"gradient-to-pos":[{to:[P]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],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":[x]}],"border-style":[{border:[...ye(),"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":[x]}],"divide-style":[{divide:ye()}],"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:["",...ye()]}],"outline-offset":[{"outline-offset":[Ze,q]}],"outline-w":[{outline:[Ze,fr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:N()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[Ze,fr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",gr,af]}],"shadow-color":[{shadow:[Po]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...di(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":di()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",gr,q]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[b]}],invert:[{invert:[_]}],saturate:[{saturate:[k]}],sepia:[{sepia:[Z]}],"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":[b]}],"backdrop-invert":[{"backdrop-invert":[_]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[k]}],"backdrop-sepia":[{"backdrop-sepia":[Z]}],"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",q]}],duration:[{duration:Dt()}],ease:[{ease:["linear","in","out","in-out",q]}],delay:[{delay:Dt()}],animate:[{animate:["none","spin","ping","pulse","bounce",q]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[$o,q]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[I]}],"skew-y":[{"skew-y":[I]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",q]}],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",q]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",q]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ze,fr,Ds]}],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"]}}},yh=Hm(pf);function m(...e){return yh(bl(e))}/**
|
|
80
|
+
`;let fa=ad;customElements.define("pont-shadow-wrapper",fa);function mh(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=mh(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function bl(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=mh(e))&&(o&&(o+=" "),o+=t);return o}const _l="-",Lm=e=>{const t=Fm(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:s=>{const d=s.split(_l);return d[0]===""&&d.length!==1&&d.shift(),fh(d,t)||km(s)},getConflictingClassGroupIds:(s,d)=>{const c=r[s]||[];return d&&o[s]?[...c,...o[s]]:c}}},fh=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),n=o?fh(e.slice(1),o):void 0;if(n)return n;if(t.validators.length===0)return;const i=e.join(_l);return(s=t.validators.find(({validator:d})=>d(i)))==null?void 0:s.classGroupId},Pd=/^\[(.+)\]$/,km=e=>{if(Pd.test(e)){const t=Pd.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Fm=e=>{const{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Mm(Object.entries(e.classGroups),r).forEach(([i,s])=>{ga(s,o,i,t)}),o},ga=(e,t,r,o)=>{e.forEach(n=>{if(typeof n=="string"){const i=n===""?t:Cd(t,n);i.classGroupId=r;return}if(typeof n=="function"){if(Nm(n)){ga(n(o),t,r,o);return}t.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([i,s])=>{ga(s,Cd(t,i),r,o)})})},Cd=(e,t)=>{let r=e;return t.split(_l).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Nm=e=>e.isThemeGetter,Mm=(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,Um=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)}}},gh="!",Bm=e=>{const{separator:t,experimentalParseClassName:r}=e,o=t.length===1,n=t[0],i=t.length,s=d=>{const c=[];let u=0,b=0,_;for(let O=0;O<d.length;O++){let x=d[O];if(u===0){if(x===n&&(o||d.slice(O,O+i)===t)){c.push(d.slice(b,O)),b=O+i;continue}if(x==="/"){_=O;continue}}x==="["?u++:x==="]"&&u--}const w=c.length===0?d:d.substring(b),y=w.startsWith(gh),P=y?w.substring(1):w,C=_&&_>b?_-b:void 0;return{modifiers:c,hasImportantModifier:y,baseClassName:P,maybePostfixModifierPosition:C}};return r?d=>r({className:d,parseClassName:s}):s},qm=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},jm=e=>({cache:Um(e.cacheSize),parseClassName:Bm(e),...Lm(e)}),zm=/\s+/,Vm=(e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,i=[],s=e.trim().split(zm);let d="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{modifiers:b,hasImportantModifier:_,baseClassName:w,maybePostfixModifierPosition:y}=r(u);let P=!!y,C=o(P?w.substring(0,y):w);if(!C){if(!P){d=u+(d.length>0?" "+d:d);continue}if(C=o(w),!C){d=u+(d.length>0?" "+d:d);continue}P=!1}const O=qm(b).join(":"),x=_?O+gh:O,L=x+C;if(i.includes(L))continue;i.push(L);const k=n(C,P);for(let T=0;T<k.length;++T){const Z=k[T];i.push(x+Z)}d=u+(d.length>0?" "+d:d)}return d};function Gm(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=vh(t))&&(o&&(o+=" "),o+=r);return o}const vh=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=vh(e[o]))&&(r&&(r+=" "),r+=t);return r};function Hm(e,...t){let r,o,n,i=s;function s(c){const u=t.reduce((b,_)=>_(b),e());return r=jm(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 b=Vm(c,r);return n(c,b),b}return function(){return i(Gm.apply(null,arguments))}}const tt=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},bh=/^\[(?:([a-z-]+):)?(.+)\]$/i,Km=/^\d+\/\d+$/,Wm=new Set(["px","full","screen"]),Ym=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Qm=/\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$/,Jm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Xm=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Zm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ze=e=>Un(e)||Wm.has(e)||Km.test(e),fr=e=>eo(e,"length",lf),Un=e=>!!e&&!Number.isNaN(Number(e)),Ds=e=>eo(e,"number",Un),Po=e=>!!e&&Number.isInteger(Number(e)),tf=e=>e.endsWith("%")&&Un(e.slice(0,-1)),q=e=>bh.test(e),gr=e=>Ym.test(e),ef=new Set(["length","size","percentage"]),rf=e=>eo(e,ef,_h),nf=e=>eo(e,"position",_h),of=new Set(["image","url"]),sf=e=>eo(e,of,cf),af=e=>eo(e,"",df),Co=()=>!0,eo=(e,t,r)=>{const o=bh.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},lf=e=>Qm.test(e)&&!Jm.test(e),_h=()=>!1,df=e=>Xm.test(e),cf=e=>Zm.test(e),pf=()=>{const e=tt("colors"),t=tt("spacing"),r=tt("blur"),o=tt("brightness"),n=tt("borderColor"),i=tt("borderRadius"),s=tt("borderSpacing"),d=tt("borderWidth"),c=tt("contrast"),u=tt("grayscale"),b=tt("hueRotate"),_=tt("invert"),w=tt("gap"),y=tt("gradientColorStops"),P=tt("gradientColorStopPositions"),C=tt("inset"),O=tt("margin"),x=tt("opacity"),L=tt("padding"),k=tt("saturate"),T=tt("scale"),Z=tt("sepia"),I=tt("skew"),A=tt("space"),D=tt("translate"),R=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",q,t],E=()=>[q,t],N=()=>["",Ze,fr],B=()=>["auto",Un,q],ie=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ye=()=>["solid","dashed","dotted","double","none"],di=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Cn=()=>["start","end","center","between","around","evenly","stretch"],Nr=()=>["","0",q],En=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Lt=()=>[Un,q];return{cacheSize:500,separator:":",theme:{colors:[Co],spacing:[Ze,fr],blur:["none","",gr,q],brightness:Lt(),borderColor:[e],borderRadius:["none","","full",gr,q],borderSpacing:E(),borderWidth:N(),contrast:Lt(),grayscale:Nr(),hueRotate:Lt(),invert:Nr(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[tf,fr],inset:F(),margin:F(),opacity:Lt(),padding:E(),saturate:Lt(),scale:Lt(),sepia:Nr(),skew:Lt(),space:E(),translate:E()},classGroups:{aspect:[{aspect:["auto","square","video",q]}],container:["container"],columns:[{columns:[gr]}],"break-after":[{"break-after":En()}],"break-before":[{"break-before":En()}],"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:[...ie(),q]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[C]}],"inset-x":[{"inset-x":[C]}],"inset-y":[{"inset-y":[C]}],start:[{start:[C]}],end:[{end:[C]}],top:[{top:[C]}],right:[{right:[C]}],bottom:[{bottom:[C]}],left:[{left:[C]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Po,q]}],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",q]}],grow:[{grow:Nr()}],shrink:[{shrink:Nr()}],order:[{order:["first","last","none",Po,q]}],"grid-cols":[{"grid-cols":[Co]}],"col-start-end":[{col:["auto",{span:["full",Po,q]},q]}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":[Co]}],"row-start-end":[{row:["auto",{span:[Po,q]},q]}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",q]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",q]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:["normal",...Cn()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Cn(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Cn(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[L]}],px:[{px:[L]}],py:[{py:[L]}],ps:[{ps:[L]}],pe:[{pe:[L]}],pt:[{pt:[L]}],pr:[{pr:[L]}],pb:[{pb:[L]}],pl:[{pl:[L]}],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",q,t]}],"min-w":[{"min-w":[q,t,"min","max","fit"]}],"max-w":[{"max-w":[q,t,"none","full","min","max","fit","prose",{screen:[gr]},gr]}],h:[{h:[q,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[q,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[q,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[q,t,"auto","min","max","fit"]}],"font-size":[{text:["base",gr,fr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ds]}],"font-family":[{font:[Co]}],"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",q]}],"line-clamp":[{"line-clamp":["none",Un,Ds]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ze,q]}],"list-image":[{"list-image":["none",q]}],"list-style-type":[{list:["none","disc","decimal",q]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ye(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ze,fr]}],"underline-offset":[{"underline-offset":["auto",Ze,q]}],"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:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",q]}],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",q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ie(),nf]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",rf]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},sf]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[P]}],"gradient-via-pos":[{via:[P]}],"gradient-to-pos":[{to:[P]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],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":[x]}],"border-style":[{border:[...ye(),"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":[x]}],"divide-style":[{divide:ye()}],"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:["",...ye()]}],"outline-offset":[{"outline-offset":[Ze,q]}],"outline-w":[{outline:[Ze,fr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:N()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[Ze,fr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",gr,af]}],"shadow-color":[{shadow:[Co]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...di(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":di()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",gr,q]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[b]}],invert:[{invert:[_]}],saturate:[{saturate:[k]}],sepia:[{sepia:[Z]}],"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":[b]}],"backdrop-invert":[{"backdrop-invert":[_]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[k]}],"backdrop-sepia":[{"backdrop-sepia":[Z]}],"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",q]}],duration:[{duration:Lt()}],ease:[{ease:["linear","in","out","in-out",q]}],delay:[{delay:Lt()}],animate:[{animate:["none","spin","ping","pulse","bounce",q]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[Po,q]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[I]}],"skew-y":[{"skew-y":[I]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",q]}],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",q]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",q]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ze,fr,Ds]}],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"]}}},yh=Hm(pf);function m(...e){return yh(bl(e))}/**
|
|
81
81
|
* @license
|
|
82
82
|
* Copyright 2017 Google LLC
|
|
83
83
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
84
|
-
*/const $e={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},Ar=e=>(...t)=>({_$litDirective$:e,values:t});let
|
|
84
|
+
*/const $e={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},Ar=e=>(...t)=>({_$litDirective$:e,values:t});let ro=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,r,o){this._$Ct=t,this._$AM=r,this._$Ci=o}_$AS(t,r){return this.update(t,r)}update(t,r){return this.render(...r)}};/**
|
|
85
85
|
* @license
|
|
86
86
|
* Copyright 2020 Google LLC
|
|
87
87
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
88
|
-
*/const{I:hf}=xm,Ed=e=>e,wh=e=>e.strings===void 0,Sd=()=>document.createComment(""),
|
|
88
|
+
*/const{I:hf}=xm,Ed=e=>e,wh=e=>e.strings===void 0,Sd=()=>document.createComment(""),Eo=(e,t,r)=>{var i;const o=e._$AA.parentNode,n=t===void 0?e._$AB:t._$AA;if(r===void 0){const s=o.insertBefore(Sd(),n),d=o.insertBefore(Sd(),n);r=new hf(s,d,e,e.options)}else{const s=r._$AB.nextSibling,d=r._$AM,c=d!==e;if(c){let u;(i=r._$AQ)==null||i.call(r,e),r._$AM=e,r._$AP!==void 0&&(u=e._$AU)!==d._$AU&&r._$AP(u)}if(s!==n||c){let u=r._$AA;for(;u!==s;){const b=Ed(u).nextSibling;Ed(o).insertBefore(u,n),u=b}}}return r},Ur=(e,t,r=e)=>(e._$AI(t,r),e),uf={},yl=(e,t=uf)=>e._$AH=t,mf=e=>e._$AH,Ls=e=>{e._$AR(),e._$AA.remove()};/**
|
|
89
89
|
* @license
|
|
90
90
|
* Copyright 2017 Google LLC
|
|
91
91
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
92
|
-
*/const
|
|
92
|
+
*/const Io=(e,t)=>{var o;const r=e._$AN;if(r===void 0)return!1;for(const n of r)(o=n._$AO)==null||o.call(n,t,!1),Io(n,t);return!0},Oi=e=>{let t,r;do{if((t=e._$AM)===void 0)break;r=t._$AN,r.delete(e),e=t}while((r==null?void 0:r.size)===0)},$h=e=>{for(let t;t=e._$AM;e=t){let r=t._$AN;if(r===void 0)t._$AN=r=new Set;else if(r.has(e))break;r.add(e),vf(t)}};function ff(e){this._$AN!==void 0?(Oi(this),this._$AM=e,$h(this)):this._$AM=e}function gf(e,t=!1,r=0){const o=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(t)if(Array.isArray(o))for(let i=r;i<o.length;i++)Io(o[i],!1),Oi(o[i]);else o!=null&&(Io(o,!1),Oi(o));else Io(this,e)}const vf=e=>{e.type==$e.CHILD&&(e._$AP??(e._$AP=gf),e._$AQ??(e._$AQ=ff))};class Ph extends ro{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,r,o){super._$AT(t,r,o),$h(this),this.isConnected=t._$AU}_$AO(t,r=!0){var o,n;t!==this.isConnected&&(this.isConnected=t,t?(o=this.reconnected)==null||o.call(this):(n=this.disconnected)==null||n.call(this)),r&&(Io(this,t),Oi(this))}setValue(t){if(wh(this._$Ct))this._$Ct._$AI(t,this);else{const r=[...this._$Ct._$AH];r[this._$Ci]=t,this._$Ct._$AI(r,this,0)}}disconnected(){}reconnected(){}}class bf extends Ph{constructor(){super(...arguments),this.prevData={}}render(t){return h}update(t,[r]){var o;this.element!==t.element&&(this.element=t.element),this.host=((o=t.options)===null||o===void 0?void 0:o.host)||this.element,this.apply(r),this.groom(r),this.prevData={...r}}apply(t){if(!t)return;const{prevData:r,element:o}=this;for(const n in t){const i=t[n];i!==r[n]&&(o[n]=i)}}groom(t){const{prevData:r,element:o}=this;if(r)for(const n in r)(!t||!(n in t)&&o[n]===r[n])&&(o[n]=void 0)}}class _f extends bf{constructor(){super(...arguments),this.eventData={}}apply(t){if(t)for(const r in t){const o=t[r];o!==this.eventData[r]&&this.applyEvent(r,o)}}applyEvent(t,r){const{prevData:o,element:n}=this;this.eventData[t]=r,o[t]&&n.removeEventListener(t,this,r),n.addEventListener(t,this,r)}groom(t){const{prevData:r,element:o}=this;if(r)for(const n in r)(!t||!(n in t)&&o[n]===r[n])&&this.groomEvent(n,r[n])}groomEvent(t,r){const{element:o}=this;delete this.eventData[t],o.removeEventListener(t,this,r)}handleEvent(t){const r=this.eventData[t.type];typeof r=="function"?r.call(this.host,t):r.handleEvent(t)}disconnected(){const{eventData:t,element:r}=this;for(const o in t){const n=o.slice(1),i=t[o];r.removeEventListener(n,this,i)}}reconnected(){const{eventData:t,element:r}=this;for(const o in t){const n=o.slice(1),i=t[o];r.addEventListener(n,this,i)}}}class yf extends _f{apply(t){if(!t)return;const{prevData:r,element:o}=this;for(const n in t){const i=t[n];if(i===r[n])continue;const s=n.slice(1);switch(n[0]){case"@":this.eventData[s]=i,this.applyEvent(s,i);break;case".":o[s]=i;break;case"?":i?o.setAttribute(s,""):o.removeAttribute(s);break;default:i!=null?o.setAttribute(n,String(i)):o.removeAttribute(n);break}}}groom(t){const{prevData:r,element:o}=this;if(r)for(const n in r){const i=n.slice(1);if(!t||!(n in t)&&o[i]===r[n])switch(n[0]){case"@":this.groomEvent(i,r[n]);break;case".":o[i]=void 0;break;case"?":o.removeAttribute(i);break;default:o.removeAttribute(n);break}}}}const Rt=Ar(yf);/**
|
|
93
93
|
* @license
|
|
94
94
|
* Copyright 2017 Google LLC
|
|
95
95
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
96
|
-
*/class Ri extends
|
|
96
|
+
*/class Ri extends ro{constructor(t){if(super(t),this.it=h,t.type!==$e.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===h||t==null)return this._t=void 0,this.it=t;if(t===Vt)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const r=[t];return r.raw=r,this._t={_$litType$:this.constructor.resultType,strings:r,values:[]}}}Ri.directiveName="unsafeHTML",Ri.resultType=1;const Ch=Ar(Ri),Lo={base:[""],item:["pont-border-b-accordion-item-width-border pont-border-b-accordion-item-color-border"],trigger:["pont-flex pont-flex-1 pont-gap-accordion-trigger-space-gap pont-justify-between pont-items-start","pont-py-accordion-trigger-space-py","pont-w-accordion-trigger-space-w","pont-rounded-accordion-trigger-radius pont-outline-none","pont-text-accordion-trigger-font pont-font-accordion-trigger-font-weight pont-text-left","pont-transition-all","hover:pont-underline","focus-visible:pont-border-accordion-trigger-width-border-focus focus-visible:pont-border-accordion-trigger-color-border-focus","focus-visible:pont-ring-accordion-trigger-width-ring-focus focus-visible:pont-ring-accordion-trigger-color-ring-focus","disabled:pont-pointer-events-none disabled:pont-opacity-50","[&[data-state=open]>svg]:pont-rotate-180"],chevron:["pont-shrink-0","pont-size-accordion-trigger-icon-space-size","pont-text-accordion-trigger-icon-color-text","pont-translate-y-0.5 pont-transition-transform pont-duration-200","pont-pointer-events-none"],content:["pont-overflow-hidden","pont-text-accordion-content-font pont-font-accordion-content-font-weight","data-[state=closed]:pont-h-accordion-content-space-h-closed","data-[state=closed]:pont-animate-accordion-content-animate-closed","data-[state=open]:pont-animate-accordion-content-animate-open","data-[state=open]:pont-h-fit","[&>div]:pont-pt-accordion-content-div-space-pt [&>div]:pont-pb-accordion-content-div-space-pb"]};var wf=Object.getOwnPropertyDescriptor,$f=(e,t,r,o)=>{for(var n=o>1?void 0:o?wf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let va=class extends ${constructor(){super(...arguments),this._onAccordionClick=()=>{this.requestUpdate()}}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof jn);)e=e.parentElement;return e}get _item(){let e=this.parentElement;for(;e&&!(e instanceof Ce);)e=e.parentElement;return e}getAttributesToExclude(){return[]}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),(e=this._accordion)==null||e.addEventListener("clicked-accordion",this._onAccordionClick)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._accordion)==null||e.removeEventListener("clicked-accordion",this._onAccordionClick)}firstUpdated(e){this.removeDuplicateContent()}hasActiveState(){var e,t;return!!((e=this._item)!=null&&e.value)&&!!((t=this._accordion)!=null&&t.selectedItems.includes(this._item.value))}render(){var t;const e=this.hasActiveState();return l`
|
|
97
97
|
<div
|
|
98
98
|
part="accordion-content"
|
|
99
99
|
role="region"
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
>
|
|
105
105
|
<div>${Ch(((t=this.textContent)==null?void 0:t.trim())||"")}</div>
|
|
106
106
|
</div>
|
|
107
|
-
`}};va=$f([p("pont-accordion-content")],va);var Pf=Object.defineProperty,Cf=Object.getOwnPropertyDescriptor,wl=(e,t,r,o)=>{for(var n=o>1?void 0:o?Cf(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&&Pf(t,r,n),n};let Ce=class extends ${constructor(){super(...arguments),this.value="",this.tabindex=0,this._initialChildren=[],this._onClick=e=>{const t=e.target.closest("pont-accordion-trigger");!t||!this._accordion||(e.preventDefault(),e.stopPropagation(),this._accordion.raiseEvent(this.value),t.requestUpdate(),setTimeout(()=>this.requestUpdate(),0))},this._onAccordionClick=()=>{this.requestUpdate()}}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof
|
|
107
|
+
`}};va=$f([p("pont-accordion-content")],va);var Pf=Object.defineProperty,Cf=Object.getOwnPropertyDescriptor,wl=(e,t,r,o)=>{for(var n=o>1?void 0:o?Cf(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&&Pf(t,r,n),n};let Ce=class extends ${constructor(){super(...arguments),this.value="",this.tabindex=0,this._initialChildren=[],this._onClick=e=>{const t=e.target.closest("pont-accordion-trigger");!t||!this._accordion||(e.preventDefault(),e.stopPropagation(),this._accordion.raiseEvent(this.value),t.requestUpdate(),setTimeout(()=>this.requestUpdate(),0))},this._onAccordionClick=()=>{this.requestUpdate()}}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof jn);)e=e.parentElement;return e}getAttributesToExclude(){return["aria-orientation","role","data-orientation","data-testid"]}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),this._initialChildren=this.filterChildren(),this.addEventListener("click",this._onClick),(e=this._accordion)==null||e.addEventListener("clicked-accordion",this._onAccordionClick)}disconnectedCallback(){var e;super.disconnectedCallback(),this.removeEventListener("click",this._onClick),(e=this._accordion)==null||e.removeEventListener("clicked-accordion",this._onAccordionClick)}filterChildren(){return Array.from(this.children).filter(e=>e instanceof ba||e instanceof va)}render(){var r;const e=(r=this._accordion)==null?void 0:r.selectedItems.includes(this.value),t=this._initialChildren.length?this._initialChildren:this.filterChildren();return l`
|
|
108
108
|
<div
|
|
109
109
|
data-state=${e?"open":"closed"}
|
|
110
110
|
class="${m(Lo.item,this.className)}"
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
>
|
|
116
116
|
${t}
|
|
117
117
|
</div>
|
|
118
|
-
`}};wl([a({type:String})],Ce.prototype,"value",2);wl([a({type:Number})],Ce.prototype,"tabindex",2);Ce=wl([p("pont-accordion-item")],Ce);var Ef=Object.getOwnPropertyDescriptor,Sf=(e,t,r,o)=>{for(var n=o>1?void 0:o?Ef(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let ba=class extends ${get _item(){let e=this.parentElement;for(;e&&!(e instanceof Ce);)e=e.parentElement;return e}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof
|
|
118
|
+
`}};wl([a({type:String})],Ce.prototype,"value",2);wl([a({type:Number})],Ce.prototype,"tabindex",2);Ce=wl([p("pont-accordion-item")],Ce);var Ef=Object.getOwnPropertyDescriptor,Sf=(e,t,r,o)=>{for(var n=o>1?void 0:o?Ef(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let ba=class extends ${get _item(){let e=this.parentElement;for(;e&&!(e instanceof Ce);)e=e.parentElement;return e}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof jn);)e=e.parentElement;return e}getAttributesToExclude(){return["value","defaultValue"]}createRenderRoot(){return this}firstUpdated(e){this.removeDuplicateContent()}hasActiveState(){var e,t;return!!((e=this._item)!=null&&e.value)&&!!((t=this._accordion)!=null&&t.selectedItems.includes(this._item.value))}render(){var t;const e=this.hasActiveState();return l`
|
|
119
119
|
<button
|
|
120
120
|
type="button"
|
|
121
121
|
part="accordion-trigger"
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
<path d="m6 9 6 6 6-6" />
|
|
145
145
|
</svg>
|
|
146
146
|
</button>
|
|
147
|
-
`}};ba=Sf([p("pont-accordion-trigger")],ba);var zr=(e=>(e.MULTIPLE="multiple",e.SINGLE="single",e))(zr||{}),xf=Object.defineProperty,Of=Object.getOwnPropertyDescriptor,Eh=(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&&xf(t,r,n),n};let
|
|
147
|
+
`}};ba=Sf([p("pont-accordion-trigger")],ba);var zr=(e=>(e.MULTIPLE="multiple",e.SINGLE="single",e))(zr||{}),xf=Object.defineProperty,Of=Object.getOwnPropertyDescriptor,Eh=(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&&xf(t,r,n),n};let jn=class extends ${constructor(){super(...arguments),this.type=zr.MULTIPLE,this.selectedItems=[],this._initialChildren=[]}getAttributesToExclude(){return["variant","data-testid"]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._initialChildren=Array.from(this.children).filter(e=>e instanceof Ce)}willUpdate(e){e.has("type")&&(this.type===zr.SINGLE&&this.selectedItems.length>1&&(this.selectedItems=this.selectedItems.slice(0,1)),this._initialChildren.forEach(t=>{t instanceof Ce&&t.requestUpdate()}))}updated(e){e.has("type")&&this._initialChildren.forEach(t=>{t instanceof Ce&&t.requestUpdate()})}setSelectedItems(e){const t=this.selectedItems.indexOf(e);if(t>-1)if(this.type===zr.SINGLE)this.selectedItems=[];else if(this.type===zr.MULTIPLE)this.selectedItems.splice(t,1);else throw new Error("Invalid accordion type");else if(this.type===zr.SINGLE)this.selectedItems=[e];else if(this.type===zr.MULTIPLE)this.selectedItems.push(e);else throw new Error("Invalid accordion type")}raiseEvent(e){this.setSelectedItems(e),this.dispatchEvent(new CustomEvent("clicked-accordion",{bubbles:!0,composed:!0,detail:{selectedItems:this.selectedItems}}))}render(){const e=this._initialChildren.length?this._initialChildren:Array.from(this.children).filter(t=>t instanceof Ce);return l`
|
|
148
148
|
<div
|
|
149
149
|
data-orientation="vertical"
|
|
150
150
|
${Rt(this.getFilteredAttributes())}
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
>
|
|
154
154
|
${e}
|
|
155
155
|
</div>
|
|
156
|
-
`}};Eh([a({type:String})],
|
|
156
|
+
`}};Eh([a({type:String})],jn.prototype,"type",2);jn=Eh([p("pont-accordion")],jn);var Rf=Object.defineProperty,If=Object.getOwnPropertyDescriptor,Sh=(e,t,r,o)=>{for(var n=o>1?void 0:o?If(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&&Rf(t,r,n),n};let _a=class extends v{constructor(){super(...arguments),this.variant="default"}get _rootSlot(){return this.querySelector('[data-slot="alert"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._rootSlot&&((r=this._rootSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return l`
|
|
157
157
|
<div
|
|
158
158
|
data-pont-callout
|
|
159
159
|
data-slot="alert"
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
<span data-pont-avatar-fallback data-slot="avatar-fallback"></span>
|
|
179
179
|
`}};Td=Vf([p("pont-avatar-fallback")],Td);var Gf=Object.getOwnPropertyDescriptor,Hf=(e,t,r,o)=>{for(var n=o>1?void 0:o?Gf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Ad=class extends v{get _badgeSlot(){return this.querySelector('[data-slot="avatar-badge"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._badgeSlot&&((r=this._badgeSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return l`<span data-pont-avatar-badge data-slot="avatar-badge"></span>`}};Ad=Hf([p("pont-avatar-badge")],Ad);var Kf=Object.getOwnPropertyDescriptor,Wf=(e,t,r,o)=>{for(var n=o>1?void 0:o?Kf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Dd=class extends v{get _groupSlot(){return this.querySelector('[data-slot="avatar-group"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._groupSlot&&((r=this._groupSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return l`<div data-pont-avatar-group data-slot="avatar-group"></div>`}};Dd=Wf([p("pont-avatar-group")],Dd);var Yf=Object.getOwnPropertyDescriptor,Qf=(e,t,r,o)=>{for(var n=o>1?void 0:o?Yf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Ld=class extends v{get _groupCountSlot(){return this.querySelector('[data-slot="avatar-group-count"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._groupCountSlot&&((r=this._groupCountSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return l`
|
|
180
180
|
<div data-pont-avatar-group-count data-slot="avatar-group-count"></div>
|
|
181
|
-
`}};Ld=Qf([p("pont-avatar-group-count")],Ld);var Jf=Object.defineProperty,Xf=Object.getOwnPropertyDescriptor,Go=(e,t,r,o)=>{for(var n=o>1?void 0:o?Xf(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&&Jf(t,r,n),n};let
|
|
181
|
+
`}};Ld=Qf([p("pont-avatar-group-count")],Ld);var Jf=Object.defineProperty,Xf=Object.getOwnPropertyDescriptor,Go=(e,t,r,o)=>{for(var n=o>1?void 0:o?Xf(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&&Jf(t,r,n),n};let zn=class extends v{constructor(){super(...arguments),this.variant="default"}createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="badge"]')}firstUpdated(){const e=this._rootSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return this.href?l`
|
|
182
182
|
<a
|
|
183
183
|
data-pont-badge
|
|
184
184
|
data-slot="badge"
|
|
@@ -196,13 +196,13 @@
|
|
|
196
196
|
aria-label=${this.ariaLabel??h}
|
|
197
197
|
aria-invalid=${this.invalid||this.ariaInvalid==="true"?"true":h}
|
|
198
198
|
></span>
|
|
199
|
-
`}};Go([a({type:String})],
|
|
199
|
+
`}};Go([a({type:String})],zn.prototype,"variant",2);Go([a({type:Boolean})],zn.prototype,"invalid",2);Go([a({type:String})],zn.prototype,"href",2);Go([a({type:String})],zn.prototype,"target",2);zn=Go([p("pont-badge")],zn);const no={list:["pont-flex pont-flex-wrap pont-gap-breadcrumb-list-space-gap-sm sm:pont-gap-breadcrumb-list-space-gap pont-items-center","pont-text-breadcrumb-list-font pont-font-breadcrumb-list-font-weight pont-text-breadcrumb-list-color-text pont-break-words"],item:["pont-inline-flex pont-gap-breadcrumb-item-space-gap pont-items-center"],link:["pont-transition-colors","hover:pont-text-breadcrumb-link-color-text-hover"],page:["pont-font-breadcrumb-page-font-weight pont-text-breadcrumb-page-color-text"],separator:["[&>svg]:pont-size-breadcrumb-separator-icon-space-size"],ellipsis:["pont-flex pont-justify-center pont-items-center","pont-size-breadcrumb-ellipsis-space-size","[&>svg]:pont-size-breadcrumb-ellipsis-icon-space-size"]};var Zf=Object.getOwnPropertyDescriptor,tg=(e,t,r,o)=>{for(var n=o>1?void 0:o?Zf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let kd=class extends ${getAttributesToExclude(){return[""]}createRenderRoot(){return this}render(){const e=this.getFilteredAttributes();return l`
|
|
200
200
|
<span
|
|
201
201
|
${Rt(e)}
|
|
202
202
|
id="pont-bread-crumb-ellipsis"
|
|
203
203
|
role="presentation"
|
|
204
204
|
aria-hidden="true"
|
|
205
|
-
class="${m(
|
|
205
|
+
class="${m(no.ellipsis,this.className)}"
|
|
206
206
|
part="breadcrumb-ellipsis"
|
|
207
207
|
>
|
|
208
208
|
<svg
|
|
@@ -224,14 +224,14 @@
|
|
|
224
224
|
<li
|
|
225
225
|
${Rt(e)}
|
|
226
226
|
id="pont-bread-crumb-item"
|
|
227
|
-
class="${m(
|
|
227
|
+
class="${m(no.item,this.className)}"
|
|
228
228
|
part="breadcrumb-item"
|
|
229
229
|
></li>
|
|
230
230
|
`}};Fd=rg([p("pont-bread-crumb-item")],Fd);var ng=Object.defineProperty,og=Object.getOwnPropertyDescriptor,Oh=(e,t,r,o)=>{for(var n=o>1?void 0:o?og(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&&ng(t,r,n),n};let wa=class extends ${constructor(){super(...arguments),this.href="/"}get _containerElement(){return this.querySelector("a[part=breadcrumb-link]")}getAttributesToExclude(){return[""]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){const e=this.getFilteredAttributes();return l`
|
|
231
231
|
<a
|
|
232
232
|
${Rt(e)}
|
|
233
233
|
id="pont-bread-crumb-link"
|
|
234
|
-
class="${m(
|
|
234
|
+
class="${m(no.link,this.className)}"
|
|
235
235
|
href="${this.href}"
|
|
236
236
|
part="breadcrumb-link"
|
|
237
237
|
>
|
|
@@ -240,7 +240,7 @@
|
|
|
240
240
|
<ol
|
|
241
241
|
${Rt(e)}
|
|
242
242
|
id="pont-bread-crumb-list"
|
|
243
|
-
class="${m(
|
|
243
|
+
class="${m(no.list,this.className)}"
|
|
244
244
|
part="breadcrumb-list"
|
|
245
245
|
></ol>
|
|
246
246
|
`}};Nd=sg([p("pont-bread-crumb-list")],Nd);var ag=Object.getOwnPropertyDescriptor,lg=(e,t,r,o)=>{for(var n=o>1?void 0:o?ag(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Md=class extends ${getAttributesToExclude(){return[""]}createRenderRoot(){return this}render(){const e=this.getFilteredAttributes();return l`
|
|
@@ -249,7 +249,7 @@
|
|
|
249
249
|
id="pont-bread-crumb-separator"
|
|
250
250
|
role="presentation"
|
|
251
251
|
aria-hidden="true"
|
|
252
|
-
class="${m(
|
|
252
|
+
class="${m(no.separator,this.className)}"
|
|
253
253
|
part="breadcrumb-separator"
|
|
254
254
|
>
|
|
255
255
|
<svg
|
|
@@ -271,7 +271,7 @@
|
|
|
271
271
|
id="pont-bread-crumb-text"
|
|
272
272
|
aria-disabled="true"
|
|
273
273
|
aria-current="page"
|
|
274
|
-
class="${m(
|
|
274
|
+
class="${m(no.page,this.className)}"
|
|
275
275
|
part="breadcrumb-text"
|
|
276
276
|
>
|
|
277
277
|
</span>
|
|
@@ -307,7 +307,7 @@
|
|
|
307
307
|
aria-invalid=${this.invalid||this.ariaInvalid==="true"?"true":h}
|
|
308
308
|
@click=${this._handleClick}
|
|
309
309
|
></button>
|
|
310
|
-
`}};ar([a({type:String})],Te.prototype,"variant",2);ar([a({type:String})],Te.prototype,"size",2);ar([a({type:String})],Te.prototype,"type",2);ar([a({type:Boolean})],Te.prototype,"disabled",2);ar([a({type:Boolean})],Te.prototype,"invalid",2);ar([a({type:String})],Te.prototype,"href",2);ar([a({type:String})],Te.prototype,"target",2);ar([a({attribute:!1,type:Function})],Te.prototype,"onClick",2);Te=ar([p("pont-button")],Te);const fg=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function gg(e){const t=e%100;if(t>=11&&t<=13)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}function vg(e){const t=new Intl.DateTimeFormat("en-US",{weekday:"long"}).format(e),r=new Intl.DateTimeFormat("en-US",{month:"long"}).format(e),o=e.getDate(),n=e.getFullYear();return`${t}, ${r} ${o}${gg(o)}, ${n}`}const Y={host:["pont-contents"],root:["group/calendar","pont-relative","pont-p-calendar-space-p","pont-w-fit","pont-bg-calendar-color-bg"],months:["pont-flex pont-relative","pont-flex-col md:pont-flex-row pont-gap-calendar-months-space-gap"],nav:["pont-flex pont-absolute pont-top-0 pont-inset-x-0","pont-gap-calendar-nav-space-gap pont-justify-between pont-items-center","pont-w-full"],month:["pont-flex","pont-flex-col pont-gap-calendar-month-space-gap","pont-w-full"],chevron:["pont-size-calendar-chevron-space-size"],monthCaption:["pont-flex pont-justify-center pont-items-center","pont-px-calendar-month-caption-space-px","pont-w-full pont-h-calendar-month-caption-space-h"],captionLabel:["pont-text-calendar-caption-label-font pont-font-calendar-caption-label-font-weight","pont-select-none"],monthGrid:["pont-w-full","pont-border-collapse"],weekdays:["pont-flex"],weekday:["pont-flex-1","pont-text-calendar-weekday-font pont-font-calendar-weekday-font-weight pont-text-calendar-weekday-color-text","pont-rounded-calendar-weekday-radius","pont-select-none"],weeks:[""],week:["pont-flex","pont-mt-calendar-week-space-mt","pont-w-full"],day:{base:["group/day","pont-aspect-square pont-relative","pont-w-full pont-h-full","pont-p-calendar-day-space-p","pont-text-center","pont-select-none"],today:["pont-bg-calendar-day-today-color-bg","pont-rounded-calendar-day-radius"],selected:{common:["pont-bg-calendar-day-color-bg-selected"],single:["pont-rounded-calendar-day-radius"],range:{start:["pont-rounded-l-calendar-day-radius"],middle:["pont-rounded-none"],end:["pont-rounded-r-calendar-day-radius"]}},index:{first:["pont-rounded-l-calendar-day-radius"],last:["pont-rounded-r-calendar-day-radius"]}},dayButton:{base:["pont-aspect-square pont-flex","pont-flex-col pont-gap-calendar-day-button-space-gap","pont-size-auto pont-w-full pont-min-w-calendar-day-button-space-min-w","pont-text-calendar-day-button-font pont-font-calendar-day-button-font-weight","disabled:pont-text-calendar-day-button-color-text-disabled disabled:pont-opacity-calendar-day-button-opacity-disabled","data-[selected-single=true]:pont-text-calendar-day-button-color-text-single-selected data-[selected-single=true]:pont-bg-calendar-day-button-color-bg-single-selected","data-[range-start=true]:pont-text-calendar-day-button-color-text-range-start data-[range-start=true]:pont-bg-calendar-day-button-color-bg-range-start","data-[range-middle=true]:pont-text-calendar-day-button-color-text-range-middle data-[range-middle=true]:pont-bg-calendar-day-button-color-bg-range-middle","data-[range-end=true]:pont-text-calendar-day-button-color-text-range-end data-[range-end=true]:pont-bg-calendar-day-button-color-bg-range-end","[&>span]:pont-text-calendar-day-button-span-font [&>span]:pont-opacity-calendar-day-button-span-opacity","group-data-[focused=true]/day:pont-relative group-data-[focused=true]/day:pont-z-10","group-data-[focused=true]/day:pont-border-calendar-day-width-border-focus group-data-[focused=true]/day:pont-border-calendar-day-color-border-focus","group-data-[focused=true]/day:pont-ring-calendar-day-width-ring-focus group-data-[focused=true]/day:pont-ring-calendar-day-color-ring-focus"],outside:["pont-text-calendar-day-button-outside-color-text"],today:["pont-text-calendar-day-button-today-color-text","pont-bg-calendar-day-button-today-color-bg"]}};var bg=Object.defineProperty,_g=Object.getOwnPropertyDescriptor,Ho=(e,t,r,o)=>{for(var n=o>1?void 0:o?_g(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&&bg(t,r,n),n};let
|
|
310
|
+
`}};ar([a({type:String})],Te.prototype,"variant",2);ar([a({type:String})],Te.prototype,"size",2);ar([a({type:String})],Te.prototype,"type",2);ar([a({type:Boolean})],Te.prototype,"disabled",2);ar([a({type:Boolean})],Te.prototype,"invalid",2);ar([a({type:String})],Te.prototype,"href",2);ar([a({type:String})],Te.prototype,"target",2);ar([a({attribute:!1,type:Function})],Te.prototype,"onClick",2);Te=ar([p("pont-button")],Te);const fg=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function gg(e){const t=e%100;if(t>=11&&t<=13)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}function vg(e){const t=new Intl.DateTimeFormat("en-US",{weekday:"long"}).format(e),r=new Intl.DateTimeFormat("en-US",{month:"long"}).format(e),o=e.getDate(),n=e.getFullYear();return`${t}, ${r} ${o}${gg(o)}, ${n}`}const Y={host:["pont-contents"],root:["group/calendar","pont-relative","pont-p-calendar-space-p","pont-w-fit","pont-bg-calendar-color-bg"],months:["pont-flex pont-relative","pont-flex-col md:pont-flex-row pont-gap-calendar-months-space-gap"],nav:["pont-flex pont-absolute pont-top-0 pont-inset-x-0","pont-gap-calendar-nav-space-gap pont-justify-between pont-items-center","pont-w-full"],month:["pont-flex","pont-flex-col pont-gap-calendar-month-space-gap","pont-w-full"],chevron:["pont-size-calendar-chevron-space-size"],monthCaption:["pont-flex pont-justify-center pont-items-center","pont-px-calendar-month-caption-space-px","pont-w-full pont-h-calendar-month-caption-space-h"],captionLabel:["pont-text-calendar-caption-label-font pont-font-calendar-caption-label-font-weight","pont-select-none"],monthGrid:["pont-w-full","pont-border-collapse"],weekdays:["pont-flex"],weekday:["pont-flex-1","pont-text-calendar-weekday-font pont-font-calendar-weekday-font-weight pont-text-calendar-weekday-color-text","pont-rounded-calendar-weekday-radius","pont-select-none"],weeks:[""],week:["pont-flex","pont-mt-calendar-week-space-mt","pont-w-full"],day:{base:["group/day","pont-aspect-square pont-relative","pont-w-full pont-h-full","pont-p-calendar-day-space-p","pont-text-center","pont-select-none"],today:["pont-bg-calendar-day-today-color-bg","pont-rounded-calendar-day-radius"],selected:{common:["pont-bg-calendar-day-color-bg-selected"],single:["pont-rounded-calendar-day-radius"],range:{start:["pont-rounded-l-calendar-day-radius"],middle:["pont-rounded-none"],end:["pont-rounded-r-calendar-day-radius"]}},index:{first:["pont-rounded-l-calendar-day-radius"],last:["pont-rounded-r-calendar-day-radius"]}},dayButton:{base:["pont-aspect-square pont-flex","pont-flex-col pont-gap-calendar-day-button-space-gap","pont-size-auto pont-w-full pont-min-w-calendar-day-button-space-min-w","pont-text-calendar-day-button-font pont-font-calendar-day-button-font-weight","disabled:pont-text-calendar-day-button-color-text-disabled disabled:pont-opacity-calendar-day-button-opacity-disabled","data-[selected-single=true]:pont-text-calendar-day-button-color-text-single-selected data-[selected-single=true]:pont-bg-calendar-day-button-color-bg-single-selected","data-[range-start=true]:pont-text-calendar-day-button-color-text-range-start data-[range-start=true]:pont-bg-calendar-day-button-color-bg-range-start","data-[range-middle=true]:pont-text-calendar-day-button-color-text-range-middle data-[range-middle=true]:pont-bg-calendar-day-button-color-bg-range-middle","data-[range-end=true]:pont-text-calendar-day-button-color-text-range-end data-[range-end=true]:pont-bg-calendar-day-button-color-bg-range-end","[&>span]:pont-text-calendar-day-button-span-font [&>span]:pont-opacity-calendar-day-button-span-opacity","group-data-[focused=true]/day:pont-relative group-data-[focused=true]/day:pont-z-10","group-data-[focused=true]/day:pont-border-calendar-day-width-border-focus group-data-[focused=true]/day:pont-border-calendar-day-color-border-focus","group-data-[focused=true]/day:pont-ring-calendar-day-width-ring-focus group-data-[focused=true]/day:pont-ring-calendar-day-color-ring-focus"],outside:["pont-text-calendar-day-button-outside-color-text"],today:["pont-text-calendar-day-button-today-color-text","pont-bg-calendar-day-button-today-color-bg"]}};var bg=Object.defineProperty,_g=Object.getOwnPropertyDescriptor,Ho=(e,t,r,o)=>{for(var n=o>1?void 0:o?_g(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&&bg(t,r,n),n};let Vn=class extends v{constructor(){super(...arguments),this.currentDate=new Date,this.selectedStartDate=null,this.selectedEndDate=null,this.mode="single",this._userClass="",this._userStyle=""}getDaysInMonth(e,t){return new Date(e,t+1,0).getDate()}previousMonth(){this.currentDate=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth()-1)}nextMonth(){this.currentDate=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth()+1)}selectDate(e,t){if(!t){const r=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth(),e);r.getMonth()===this.currentDate.getMonth()&&(this.mode==="single"?(this.selectedStartDate=r,this.selectedEndDate=null):this.mode==="range"&&(!this.selectedStartDate||this.selectedEndDate?(this.selectedStartDate=r,this.selectedEndDate=null):r>=this.selectedStartDate?this.selectedEndDate=r:(this.selectedEndDate=this.selectedStartDate,this.selectedStartDate=r)),this.dispatchEvent(new CustomEvent("date-selected",{detail:{startDate:this.selectedStartDate,endDate:this.selectedEndDate},bubbles:!0,composed:!0})))}}isDayInRange(e,t){return!this.selectedStartDate||!this.selectedEndDate||e.getMonth()!==this.currentDate.getMonth()?!1:t?e>this.selectedStartDate&&e<this.selectedEndDate:e>=this.selectedStartDate&&e<=this.selectedEndDate}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),this._userClass=((e=this.getAttribute("class"))==null?void 0:e.replace(m(Y.host),""))??"",this._userStyle=this.getAttribute("style")??"",this._userClass&&this.removeAttribute("class"),this._userStyle&&this.removeAttribute("style"),this.className=m(Y.host)}firstUpdated(e){var r;const t=this.querySelector(".calendar");if(t&&(this._userClass&&(t.className=m("calendar",Y.root,this._userClass)),this._userStyle)){const o=(r=t.getAttribute("style"))==null?void 0:r.trim(),n=this._userStyle.trim();t.setAttribute("style",[o,n].filter(Boolean).join("; "))}}render(){const e=this.currentDate.getFullYear(),t=this.currentDate.getMonth(),r=this.getDaysInMonth(e,t),o=new Date(e,t,1).getDay(),n=new Date(e,t,0).getDate(),i=[];for(let u=o-1;u>=0;u--)i.push({day:String(n-u),month:t-1,isOutside:!0});for(let u=1;u<=r;u++)i.push({day:String(u),month:t,isOutside:!1});const s=i.length%7;if(s!==0){const u=7-s;for(let b=1;b<=u;b++)i.push({day:String(b),month:t+1,isOutside:!0})}const d=this.currentDate.toLocaleString("default",{month:"long",year:"numeric"}),c=this.currentDate.toLocaleString("default",{month:"long",year:"numeric"});return l`
|
|
311
311
|
<div
|
|
312
312
|
class=${m("calendar",Y.root,this._userClass)}
|
|
313
313
|
data-slot="calendar"
|
|
@@ -441,7 +441,7 @@
|
|
|
441
441
|
</div>
|
|
442
442
|
</div>
|
|
443
443
|
</div>
|
|
444
|
-
`}};Ho([a({type:Object})],
|
|
444
|
+
`}};Ho([a({type:Object})],Vn.prototype,"currentDate",2);Ho([a({type:Object})],Vn.prototype,"selectedStartDate",2);Ho([a({type:Object})],Vn.prototype,"selectedEndDate",2);Ho([a({type:String})],Vn.prototype,"mode",2);Vn=Ho([p("pont-calendar")],Vn);var yg=Object.defineProperty,wg=Object.getOwnPropertyDescriptor,Rh=(e,t,r,o)=>{for(var n=o>1?void 0:o?wg(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&&yg(t,r,n),n};let $a=class extends v{constructor(){super(...arguments),this.size="default"}get _rootSlot(){return this.querySelector('[data-slot="card"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._rootSlot&&((r=this._rootSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return l`
|
|
445
445
|
<div data-pont-card data-slot="card" data-size=${this.size}></div>
|
|
446
446
|
`}};Rh([a({type:String})],$a.prototype,"size",2);$a=Rh([p("pont-card")],$a);var $g=Object.defineProperty,Pg=Object.getOwnPropertyDescriptor,Ih=(e,t,r,o)=>{for(var n=o>1?void 0:o?Pg(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 Pa=class extends v{get _headerSlot(){return this.querySelector('[data-slot="card-header"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._headerSlot&&((r=this._headerSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return l`
|
|
447
447
|
<div
|
|
@@ -457,7 +457,7 @@
|
|
|
457
457
|
data-slot="card-footer"
|
|
458
458
|
?data-border=${this.border}
|
|
459
459
|
></div>
|
|
460
|
-
`}};Th([a({type:Boolean})],Ca.prototype,"border",2);Ca=Th([p("pont-card-footer")],Ca);function Lg(){return
|
|
460
|
+
`}};Th([a({type:Boolean})],Ca.prototype,"border",2);Ca=Th([p("pont-card-footer")],Ca);function Lg(){return G` <svg
|
|
461
461
|
class="shrink-0 size-3.5 text-gray-500 dark:text-neutral-500"
|
|
462
462
|
xmlns="http://www.w3.org/2000/svg"
|
|
463
463
|
width="24"
|
|
@@ -472,7 +472,7 @@
|
|
|
472
472
|
<path d="m7 15 5 5 5-5"></path>
|
|
473
473
|
<path d="m7 9 5-5 5 5"></path>
|
|
474
474
|
</svg>
|
|
475
|
-
`}function kg(){return
|
|
475
|
+
`}function kg(){return G`
|
|
476
476
|
<svg
|
|
477
477
|
xmlns="http://www.w3.org/2000/svg"
|
|
478
478
|
width="24"
|
|
@@ -488,7 +488,7 @@
|
|
|
488
488
|
<path d="m12 19-7-7 7-7"></path>
|
|
489
489
|
<path d="M19 12H5"></path>
|
|
490
490
|
</svg>
|
|
491
|
-
`}function Fg(){return
|
|
491
|
+
`}function Fg(){return G`
|
|
492
492
|
<svg
|
|
493
493
|
xmlns="http://www.w3.org/2000/svg"
|
|
494
494
|
width="24"
|
|
@@ -539,7 +539,7 @@
|
|
|
539
539
|
<path d="M12 8v4" />
|
|
540
540
|
<path d="M12 16h.01" />
|
|
541
541
|
</svg>
|
|
542
|
-
`}function Ug(){return
|
|
542
|
+
`}function Ug(){return G`
|
|
543
543
|
<svg
|
|
544
544
|
class="pont-shrink-0 pont-size-3.5 pont-text-primary"
|
|
545
545
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -554,23 +554,23 @@
|
|
|
554
554
|
>
|
|
555
555
|
<path d="M20 6 9 17l-5-5"></path>
|
|
556
556
|
</svg>
|
|
557
|
-
`}function Gd(){return
|
|
557
|
+
`}function Gd(){return G`
|
|
558
558
|
<svg width="7" height="4" viewBox="0 0 7 4" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
559
559
|
<path d="M0.565616 3.3941L3.39404 0.565674L6.22247 3.3941" stroke="currentColor" stroke-width="0.8" stroke-linecap="square"/>
|
|
560
560
|
</svg>
|
|
561
561
|
|
|
562
|
-
`}function Bg(){return
|
|
562
|
+
`}function Bg(){return G`
|
|
563
563
|
<svg width="7" height="4" viewBox="0 0 7 4" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
564
564
|
<path d="M0.565616 0.565674L3.39404 3.3941L6.22247 0.565674" stroke="currentColor" stroke-width="0.8" stroke-linecap="square"/>
|
|
565
565
|
</svg>
|
|
566
|
-
`}const
|
|
566
|
+
`}const zt={root:["pont-relative pont-mx-carousel-space-mx pont-h-carousel-space-h pont-w-carousel-space-w"],viewport:["pont-w-carousel-viewport-space-w pont-h-carousel-viewport-space-h pont-overflow-hidden"],slidesWrapper:{base:["pont-flex pont-transition-transform pont-duration-carousel-motion-duration pont-ease-carousel-motion-fn"],orientation:{horizontal:["pont-flex-row"],vertical:["pont-flex-col"]}},slide:{base:["pont-min-w-0 pont-basis-full pont-h-carousel-slide-space-h pont-flex-shrink-0 pont-flex-grow-0 pont-transition-transform pont-duration-carousel-motion-duration pont-px-carousel-slide-space-px pont-py-carousel-slide-space-py"],size:{true:["lg:pont-basis-1/3 lg:pont-h-1/2 md:pont-basis-1/2 md:pont-h-1/2"],false:[""]}},controls:{base:["pont-absolute pont-z-10 pont-flex"],orientation:{horizontal:["pont-top-1/2 pont-left-carousel-control-horizontal-space-left pont-right-carousel-control-horizontal-space-right pont-justify-between"],vertical:["pont-w-carousel-control-vertical-space-w pont-h-carousel-control-vertical-space-h pont-top-0 pont-flex-col pont-justify-between pont-items-center"]}},controlButton:{base:["pont-bg-carousel-button-color-bg pont-text-carousel-button-color-text pont-border-none pont-px-carousel-button-space-px pont-py-carousel-button-space-py pont-cursor-pointer pont-z-10 pont-rounded-carousel-button-radius pont-w-carousel-button-space-w pont-h-carousel-button-space-h pont-flex pont-items-center pont-justify-center hover:pont-bg-carousel-button-color-bg-hover disabled:pont-opacity-carousel-button-opacity-disabled"],orientation:{verticalPrev:["pont-relative pont-top-carousel-button-vertical-prev-space-top pont-rotate-90"],verticalNext:["pont-relative pont-top-carousel-button-vertical-next-space-top pont-rotate-90"]}}};var qg=Object.defineProperty,jg=Object.getOwnPropertyDescriptor,oo=(e,t,r,o)=>{for(var n=o>1?void 0:o?jg(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&&qg(t,r,n),n};let Qr=class extends v{constructor(){super(...arguments),this.currentIndex=0,this.items=[],this.orientation="horizontal",this.size=!1,this.handleResize=()=>{this.updateSlides(),this.currentIndex=0,this.querySelectorAll(".slide").forEach(t=>{t.className=this.getSlideClasses()})}}createRenderRoot(){return this}firstUpdated(){this.restructureSlides()}restructureSlides(){const e=this.querySelector(".slides");if(e)for(let t=0;t<this.items.length;t++){const r=`slide-${t}`,o=this.querySelector(`[slot="${r}"]`);if(o&&o.parentElement!==e){const n=document.createElement("div");n.className=this.getSlideClasses(),e.appendChild(n),n.appendChild(o)}}}getSlideClasses(){return m(zt.slide.base,this.size?zt.slide.size.true:zt.slide.size.false)}nextSlide(){this.currentIndex<this.items.length-1&&(this.currentIndex+=1,this.updateSlides())}prevSlide(){this.currentIndex>0&&(this.currentIndex-=1,this.updateSlides())}updateSlides(){let e;this.size?window.innerWidth>=1024?e=33.3333:window.innerWidth>=768?e=50:e=100:e=100;const t=this.orientation==="vertical"?100/this.items.length:100;this.slides&&(this.slides.style.transform=this.orientation==="horizontal"?`translateX(-${this.currentIndex*e}%)`:`translateY(-${this.currentIndex*t}%)`)}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.handleResize)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.handleResize)}render(){const e=this.currentIndex===0,t=this.size?window.innerWidth>=1024?3:window.innerWidth>=768?2:1:1,r=this.currentIndex>=this.items.length-t,o=m(zt.slidesWrapper.base,zt.slidesWrapper.orientation[this.orientation]),n=m(zt.controls.base,zt.controls.orientation[this.orientation]),i=m(zt.controlButton.base,this.orientation==="vertical"&&zt.controlButton.orientation.verticalPrev),s=m(zt.controlButton.base,this.orientation==="vertical"&&zt.controlButton.orientation.verticalNext);return l`
|
|
567
567
|
<div
|
|
568
568
|
part="pont-carousel"
|
|
569
|
-
class="${m(
|
|
569
|
+
class="${m(zt.root,this.className)}"
|
|
570
570
|
size="${this.size}"
|
|
571
571
|
orientation="${this.orientation}"
|
|
572
572
|
>
|
|
573
|
-
<div class="${m(
|
|
573
|
+
<div class="${m(zt.viewport,this.className)}">
|
|
574
574
|
<div class="slides ${o}"></div>
|
|
575
575
|
|
|
576
576
|
<div class="${n}">
|
|
@@ -592,7 +592,7 @@
|
|
|
592
592
|
</div>
|
|
593
593
|
</div>
|
|
594
594
|
</div>
|
|
595
|
-
`}};
|
|
595
|
+
`}};oo([a({type:Number})],Qr.prototype,"currentIndex",2);oo([a({type:Array})],Qr.prototype,"items",2);oo([a({type:String})],Qr.prototype,"orientation",2);oo([a({type:Boolean})],Qr.prototype,"size",2);oo([Vo(".slides")],Qr.prototype,"slides",2);Qr=oo([p("pont-carousel")],Qr);var zg=Object.defineProperty,Vg=Object.getOwnPropertyDescriptor,Me=(e,t,r,o)=>{for(var n=o>1?void 0:o?Vg(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&&zg(t,r,n),n};let le=class extends v{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`
|
|
596
596
|
<span
|
|
597
597
|
data-pont-checkbox-indicator
|
|
598
598
|
data-slot="checkbox-indicator"
|
|
@@ -664,12 +664,12 @@
|
|
|
664
664
|
class="${m("",this.className)}"
|
|
665
665
|
part="collapsible"
|
|
666
666
|
></div>
|
|
667
|
-
`}};Ah([a({type:Boolean})],Ti.prototype,"open",2);Ti=Ah([p("pont-collapsible")],Ti);const
|
|
667
|
+
`}};Ah([a({type:Boolean})],Ti.prototype,"open",2);Ti=Ah([p("pont-collapsible")],Ti);const io={empty:["pont-py-combo-box-empty-space-py","pont-text-center","pont-text-combo-box-empty-font"],group:{base:["pont-pointer-events-none","pont-invisible","pont-absolute","pont-z-50","pont-mt-combo-box-group-space-mt","pont-max-h-combo-box-group-space-max-h","pont-w-combo-box-group-space-w","pont-origin-top","pont-scale-y-0","pont-transform","pont-overflow-hidden","pont-overflow-y-auto","pont-rounded-combo-box-group-radius","pont-border-combo-box-group-width-border","pont-border-combo-box-group-color-border","pont-bg-combo-box-group-color-bg","pont-px-combo-box-group-space-px","pont-py-combo-box-group-space-py","pont-opacity-0","pont-shadow-combo-box-group-shadow","pont-transition-opacity","pont-duration-combo-box-group-motion-duration","pont-ease-combo-box-group-motion-fn","[&::-webkit-scrollbar]:pont-w-0"]},input:["pont-flex","pont-h-combo-box-input-space-h","pont-w-combo-box-input-space-w","pont-rounded-combo-box-input-radius","pont-border-0","pont-bg-combo-box-input-color-bg","pont-px-combo-box-input-space-px","pont-py-combo-box-input-space-py","pont-text-combo-box-input-font","pont-text-combo-box-input-color-text","pont-shadow-none","placeholder:pont-text-combo-box-input-color-text-placeholder","focus:pont-outline-none","focus-visible:pont-ring-0"],trigger:{base:["pont-z-20","pont-flex","pont-h-combo-box-trigger-space-h","pont-flex-row-reverse","pont-items-center","pont-justify-between","pont-rounded-combo-box-trigger-radius","pont-border-combo-box-trigger-width-border","pont-border-combo-box-trigger-color-border","pont-bg-combo-box-trigger-color-bg","pont-px-combo-box-trigger-space-px","pont-py-combo-box-trigger-space-py","pont-text-combo-box-trigger-font","focus:pont-outline-none","focus:pont-ring-combo-box-trigger-width-ring-focus","focus:pont-ring-combo-box-trigger-color-ring-focus","focus:pont-ring-offset-combo-box-trigger-width-ring-offset-focus","disabled:pont-cursor-not-allowed","disabled:pont-opacity-combo-box-trigger-opacity-disabled"]},value:["pont-line-clamp-1","pont-flex","pont-w-combo-box-value-space-w"],item:{base:["pont-flex","pont-w-combo-box-item-space-w","pont-cursor-pointer","pont-flex-row-reverse","pont-items-center","pont-justify-between","pont-rounded-combo-box-item-radius","pont-px-combo-box-item-space-px","pont-py-combo-box-item-space-py","hover:pont-bg-accent","focus:pont-bg-combo-box-item-color-bg-hover","focus:pont-outline-none"]}};var Jg=Object.defineProperty,Xg=Object.getOwnPropertyDescriptor,Dh=(e,t,r,o)=>{for(var n=o>1?void 0:o?Xg(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 Ea=class extends ${constructor(){super(...arguments),this.handleClick=()=>{this._comboBox&&([...document.getElementsByTagName("pont-combo-box")].forEach(t=>{var r;t.uuid!==((r=this._comboBox)==null?void 0:r.uuid)&&(t.isOpen=!1)}),this._comboBox.isOpen=!this._comboBox.isOpen)}}get _comboBox(){let e=this.parentElement;for(;e&&!(e instanceof Nt);)e=e.parentElement;return e}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this.buttonElement),this.addEventListener("click",t=>{t.stopPropagation()})}render(){return l`
|
|
668
668
|
<button
|
|
669
669
|
type="button"
|
|
670
670
|
part="combo-box-trigger-button"
|
|
671
671
|
role="tab"
|
|
672
|
-
class="${m(
|
|
672
|
+
class="${m(io.trigger.base,this.className)}"
|
|
673
673
|
tabindex="-1"
|
|
674
674
|
data-orientation="horizontal"
|
|
675
675
|
data-radix-collection-item=""
|
|
@@ -677,10 +677,10 @@
|
|
|
677
677
|
>
|
|
678
678
|
${Lg()}
|
|
679
679
|
</button>
|
|
680
|
-
`}};Dh([Vo("button")],Ea.prototype,"buttonElement",2);Ea=Dh([p("pont-combo-box-trigger")],Ea);var Zg=Object.defineProperty,tv=Object.getOwnPropertyDescriptor,Lh=(e,t,r,o)=>{for(var n=o>1?void 0:o?tv(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&&Zg(t,r,n),n};let Sa=class extends v{constructor(){super(...arguments),this.placeholder="select a value",this.handleClick=()=>{this._comboBox&&([...document.getElementsByTagName("pont-combo-box")].forEach(t=>{var r;t.uuid!==((r=this._comboBox)==null?void 0:r.uuid)&&(t.isOpen=!1)}),this._comboBox.isOpen=!this._comboBox.isOpen)},this.renderLabel=()=>this._comboBox&&this._comboBox.selectedValue.length>0?this._comboBox.selectedValue:this.placeholder}get _comboBox(){let e=this.parentElement;for(;e&&!(e instanceof
|
|
680
|
+
`}};Dh([Vo("button")],Ea.prototype,"buttonElement",2);Ea=Dh([p("pont-combo-box-trigger")],Ea);var Zg=Object.defineProperty,tv=Object.getOwnPropertyDescriptor,Lh=(e,t,r,o)=>{for(var n=o>1?void 0:o?tv(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&&Zg(t,r,n),n};let Sa=class extends v{constructor(){super(...arguments),this.placeholder="select a value",this.handleClick=()=>{this._comboBox&&([...document.getElementsByTagName("pont-combo-box")].forEach(t=>{var r;t.uuid!==((r=this._comboBox)==null?void 0:r.uuid)&&(t.isOpen=!1)}),this._comboBox.isOpen=!this._comboBox.isOpen)},this.renderLabel=()=>this._comboBox&&this._comboBox.selectedValue.length>0?this._comboBox.selectedValue:this.placeholder}get _comboBox(){let e=this.parentElement;for(;e&&!(e instanceof Nt);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),document.addEventListener("clicked-combo-box-item",()=>{this.requestUpdate()})}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",t=>{t.stopPropagation()})}createRenderRoot(){return this}render(){return l`
|
|
681
681
|
<span
|
|
682
682
|
part="combo-box-value"
|
|
683
|
-
class="${m(
|
|
683
|
+
class="${m(io.value,this.className)}"
|
|
684
684
|
@click=${this.handleClick}
|
|
685
685
|
>${this.renderLabel()}</span
|
|
686
686
|
>
|
|
@@ -692,7 +692,7 @@
|
|
|
692
692
|
role=${this.decorative?"none":"separator"}
|
|
693
693
|
aria-orientation=${this.decorative?h:this.orientation}
|
|
694
694
|
></div>
|
|
695
|
-
`}};Pl([a({type:String})],Ai.prototype,"orientation",2);Pl([a({type:Boolean})],Ai.prototype,"decorative",2);Ai=Pl([p("pont-separator")],Ai);var nv=Object.defineProperty,ov=Object.getOwnPropertyDescriptor,Ko=(e,t,r,o)=>{for(var n=o>1?void 0:o?ov(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&&nv(t,r,n),n};let
|
|
695
|
+
`}};Pl([a({type:String})],Ai.prototype,"orientation",2);Pl([a({type:Boolean})],Ai.prototype,"decorative",2);Ai=Pl([p("pont-separator")],Ai);var nv=Object.defineProperty,ov=Object.getOwnPropertyDescriptor,Ko=(e,t,r,o)=>{for(var n=o>1?void 0:o?ov(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&&nv(t,r,n),n};let Jr=class extends ${constructor(){super(...arguments),this.searchKey="",this.focusedIndex=0,this.selectedValue="",this.isOpen=!1,this.handleItemClicked=()=>{this.requestUpdate()},this.handleTriggerComboBox=e=>{var t,r;e.detail.isOpen!==((t=this._comboBox)==null?void 0:t.isOpen)&&this.requestUpdate(),e.detail.isOpen&&((r=this._comboBox)!=null&&r.selectedValue)&&(this.focusedIndex=this.comboBoxItems.findIndex(o=>{var n;return o.getAttribute("value")===((n=this._comboBox)==null?void 0:n.selectedValue)}),this.requestUpdate())},this.handleKeyDown=e=>{var r;if(!((r=this._comboBox)!=null&&r.isOpen))return;e.preventDefault();const t=this.filteredItems;switch(e.key){case"ArrowDown":if(t.length===0)return;this.focusedIndex=(this.focusedIndex+1)%t.length;break;case"ArrowUp":if(t.length===0)return;this.focusedIndex=(this.focusedIndex-1+t.length)%t.length;break;case"Enter":if(this.focusedIndex>=0&&this.focusedIndex<t.length){const o=t[this.focusedIndex].getAttribute("value");this.dispatchEvent(new CustomEvent("clicked-combo-box-item",{bubbles:!0,composed:!0,detail:{selectedItem:o}}))}break}},this.handleMouseOver=(e,t)=>{e.preventDefault(),this.focusedIndex=t},this.onSelectedValue=(e,t)=>{this.focusedIndex=t,this.selectedValue=e},this.boundHandleComboBoxStateChanged=this.handleComboBoxStateChanged.bind(this),this.boundHandleKeyDown=this.handleKeyDown.bind(this)}get comboBoxItems(){return Array.from(this.querySelectorAll('[data-managed="true"][tag="pont-combo-box-item"], pont-combo-box-item')).filter(e=>e.hasAttribute("value"))}get comboBoxInput(){return this.querySelector("pont-combo-box-input")}get comboBoxEmpty(){return this.querySelector("pont-combo-box-empty")}get hasResults(){return!this.filteredItems.length}get filteredItems(){var t;const e=(t=this.searchKey)==null?void 0:t.toLowerCase();return this.comboBoxItems.filter(r=>{var o;return(o=r.getAttribute("value"))==null?void 0:o.toLowerCase().includes(e)})}get _comboBox(){let e=this.parentElement;for(;e&&!(e instanceof Nt);)e=e.parentElement;return e}handleComboBoxStateChanged(e){var n;const{isOpen:t,targetComboBoxId:r}=e.detail;if(this.isOpen=t,r!==((n=this._comboBox)==null?void 0:n.uuid))return;const o=this.renderRoot.querySelector('[part="select-group"]');o&&(t?(clearTimeout(o._hideTimeout),o.classList.remove("pont-scale-y-0","pont-opacity-0"),o.classList.add("pont-scale-y-100","pont-opacity-100"),o.classList.remove("pont-invisible","pont-pointer-events-none"),o.classList.add("pont-visible","pont-pointer-events-auto")):(o.classList.remove("pont-opacity-100"),o.classList.add("pont-opacity-0"),o._hideTimeout=setTimeout(()=>{o.classList.remove("pont-visible","pont-pointer-events-auto","pont-scale-y-100"),o.classList.add("pont-invisible","pont-pointer-events-none","pont-scale-y-0")},300)))}moveChildren(){const e=this.renderRoot.querySelector('[part="select-group"]');if(!e)return;const t={top:e.querySelector("#topSlot"),empty:e.querySelector("#emptySlot"),list:e.querySelector("#listSlot")},r={"pont-combo-box-input":"top","pont-combo-box-empty":"empty","pont-combo-box-item":"list"};Array.from(this.children).forEach(o=>{var s;const n=o.tagName.toLowerCase(),i=r[n];i&&(o.setAttribute("data-managed","true"),(s=t[i])==null||s.appendChild(o))})}renderFilteredItems(){return this.comboBoxItems.forEach(e=>e.setAttribute("hidden","true")),this.filteredItems.map((e,t)=>{var i;const r=e.getAttribute("value")??"",o=t===this.focusedIndex,n=r.toLowerCase()===((i=this._comboBox)==null?void 0:i.selectedValue.toLowerCase());return l`
|
|
696
696
|
<pont-combo-box-item
|
|
697
697
|
@mouseover="${s=>this.handleMouseOver(s,t)}"
|
|
698
698
|
.value=${r}
|
|
@@ -706,7 +706,7 @@
|
|
|
706
706
|
`})}getAttributesToExclude(){return[]}connectedCallback(){super.connectedCallback(),document.addEventListener("pont-combo-box-state-changed",this.boundHandleComboBoxStateChanged),document.addEventListener("clicked-combo-box-item",this.handleItemClicked),document.addEventListener("trigger-combo-box",this.handleTriggerComboBox)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("clicked-combo-box-item",this.handleItemClicked),document.removeEventListener("trigger-combo-box",this.handleTriggerComboBox),document.removeEventListener("pont-combo-box-state-changed",this.boundHandleComboBoxStateChanged),document.removeEventListener("keydown",this.boundHandleKeyDown)}firstUpdated(e){this.moveChildren(),document.addEventListener("keydown",this.boundHandleKeyDown)}createRenderRoot(){return this}render(){return l`
|
|
707
707
|
<div
|
|
708
708
|
part="select-group"
|
|
709
|
-
class="${m(
|
|
709
|
+
class="${m(io.group.base,this.className)}"
|
|
710
710
|
data-hs-combo-box-output=""
|
|
711
711
|
data-testId="select-group"
|
|
712
712
|
>
|
|
@@ -719,11 +719,11 @@
|
|
|
719
719
|
${this.renderFilteredItems()}
|
|
720
720
|
</div>
|
|
721
721
|
</div>
|
|
722
|
-
`}};Ko([g()],
|
|
722
|
+
`}};Ko([g()],Jr.prototype,"searchKey",2);Ko([g()],Jr.prototype,"focusedIndex",2);Ko([g()],Jr.prototype,"selectedValue",2);Ko([g()],Jr.prototype,"isOpen",2);Jr=Ko([p("pont-combo-box-group")],Jr);var iv=Object.defineProperty,sv=Object.getOwnPropertyDescriptor,me=(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 Xt=class extends ${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`
|
|
723
723
|
<div
|
|
724
724
|
${Rt(e)}
|
|
725
725
|
@click=${this.handleClick}
|
|
726
|
-
class="${m(
|
|
726
|
+
class="${m(io.item.base,this.className)}"
|
|
727
727
|
data-hs-combo-box-value=${this.value}
|
|
728
728
|
aria-selected="${this.isSelected}"
|
|
729
729
|
data-selected="${this.isSelected}"
|
|
@@ -735,13 +735,13 @@
|
|
|
735
735
|
${Ug()}
|
|
736
736
|
</span>
|
|
737
737
|
</div>
|
|
738
|
-
`}};me([a({type:String})],Xt.prototype,"value",2);me([a({type:String})],Xt.prototype,"key",2);me([a({type:Number})],Xt.prototype,"tabindex",2);me([a({type:Boolean})],Xt.prototype,"isSelected",2);me([a({type:Boolean})],Xt.prototype,"isFocus",2);me([a({type:String})],Xt.prototype,"class",2);me([a({type:Number})],Xt.prototype,"selectItemIndex",2);me([a({type:Function})],Xt.prototype,"onSelect",2);me([a({type:Function})],Xt.prototype,"onMouseOver",2);me([Vo("#pont-combo-box-item")],Xt.prototype,"itemDivContainer",2);Xt=me([p("pont-combo-box-item")],Xt);var av=Object.defineProperty,lv=Object.getOwnPropertyDescriptor,Cl=(e,t,r,o)=>{for(var n=o>1?void 0:o?lv(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&&av(t,r,n),n};let Di=class extends v{constructor(){super(...arguments),this.placeholder="Search Item ...",this.searchValue=""}get _comboBoxGroup(){let e=this.parentElement;for(;e&&!(e instanceof
|
|
738
|
+
`}};me([a({type:String})],Xt.prototype,"value",2);me([a({type:String})],Xt.prototype,"key",2);me([a({type:Number})],Xt.prototype,"tabindex",2);me([a({type:Boolean})],Xt.prototype,"isSelected",2);me([a({type:Boolean})],Xt.prototype,"isFocus",2);me([a({type:String})],Xt.prototype,"class",2);me([a({type:Number})],Xt.prototype,"selectItemIndex",2);me([a({type:Function})],Xt.prototype,"onSelect",2);me([a({type:Function})],Xt.prototype,"onMouseOver",2);me([Vo("#pont-combo-box-item")],Xt.prototype,"itemDivContainer",2);Xt=me([p("pont-combo-box-item")],Xt);var av=Object.defineProperty,lv=Object.getOwnPropertyDescriptor,Cl=(e,t,r,o)=>{for(var n=o>1?void 0:o?lv(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&&av(t,r,n),n};let Di=class extends v{constructor(){super(...arguments),this.placeholder="Search Item ...",this.searchValue=""}get _comboBoxGroup(){let e=this.parentElement;for(;e&&!(e instanceof Jr);)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`
|
|
739
739
|
<div class="pont-flex pont-items-center pont-px-2">
|
|
740
740
|
${Ng()}
|
|
741
741
|
<input
|
|
742
742
|
part="combo-box-input"
|
|
743
743
|
type="text"
|
|
744
|
-
class="${m(
|
|
744
|
+
class="${m(io.input,this.className)}"
|
|
745
745
|
placeholder=${this.placeholder}
|
|
746
746
|
autocomplete="off"
|
|
747
747
|
autocorrect="off"
|
|
@@ -755,19 +755,19 @@
|
|
|
755
755
|
</div>
|
|
756
756
|
`}};Cl([a({type:String})],Di.prototype,"placeholder",2);Cl([g()],Di.prototype,"searchValue",2);Di=Cl([p("pont-combo-box-input")],Di);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};let Wd=class extends ${createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(e){this.removeDuplicateContent()}render(){return l`
|
|
757
757
|
<div
|
|
758
|
-
class="${m(
|
|
758
|
+
class="${m(io.empty,this.className)}"
|
|
759
759
|
role="presentation"
|
|
760
760
|
>
|
|
761
761
|
${Array.from(this.childNodes)[0].textContent}
|
|
762
762
|
</div>
|
|
763
|
-
`}};Wd=cv([p("pont-combo-box-empty")],Wd);var pv=Object.defineProperty,hv=Object.getOwnPropertyDescriptor,Ue=(e,t,r,o)=>{for(var n=o>1?void 0:o?hv(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&&pv(t,r,n),n};let
|
|
763
|
+
`}};Wd=cv([p("pont-combo-box-empty")],Wd);var pv=Object.defineProperty,hv=Object.getOwnPropertyDescriptor,Ue=(e,t,r,o)=>{for(var n=o>1?void 0:o?hv(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&&pv(t,r,n),n};let Nt=class extends ${constructor(){super(),this.isOpen=!1,this.selectedValue="",this.searchTerm="",this.focusedIndex=-1,this.filteredItems=[],this.uuid=vl(),this.label="Select an item",this.items=[],this.handleClickOutside=e=>{var o;const t=(o=this.renderRoot)==null?void 0:o.querySelector("[data-combo-box-uuid]"),r=e.target;if(!r.tagName.includes("RTG-COMBO")&&!(r.shadowRoot&&r.shadowRoot.innerHTML.includes(t==null?void 0:t.innerHTML))){if(this.isOpen&&!t||!(t!=null&&t.contains(r)))this.isOpen=!1;else if(!(r==null?void 0:r.firstElementChild))return}}}connectedCallback(){super.connectedCallback(),document.addEventListener("clicked-combo-box-item",e=>{this.isOpen&&(this.selectedValue=e.detail.selectedItem,this.isOpen=!1,this.requestUpdate())})}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this.parentDiveElement),this.items&&this.items.length>0&&(this.filteredItems=this.items.filter(t=>t.toLowerCase().includes(this.searchTerm)))}updated(e){super.updated(e),e.has("isOpen")&&(this.dispatchEvent(new CustomEvent("pont-combo-box-state-changed",{detail:{isOpen:this.isOpen,targetComboBoxId:this.uuid},bubbles:!0,composed:!0})),this.isOpen?document.addEventListener("mousedown",this.handleClickOutside):document.removeEventListener("mousedown",this.handleClickOutside))}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}selectItem(e){const t=e.target;if(t instanceof HTMLElement){const r=t.closest("pont-combo-box-item");r?(this.selectedValue=r.getAttribute("data-hs-combo-box-value")||"",this.isOpen=!1):console.log("No valid pont-combo-box-item found")}else console.log("Event target is not an HTMLElement")}render(){return l`
|
|
764
764
|
<div
|
|
765
765
|
class="${m("pont-relative",this.className)}"
|
|
766
766
|
data-hs-combo-box=""
|
|
767
767
|
data-combo-box-uuid=${this.uuid}
|
|
768
768
|
part="combo-box"
|
|
769
769
|
></div>
|
|
770
|
-
`}};Ue([a({type:Boolean})],
|
|
770
|
+
`}};Ue([a({type:Boolean})],Nt.prototype,"isOpen",2);Ue([g()],Nt.prototype,"selectedValue",2);Ue([g()],Nt.prototype,"searchTerm",2);Ue([g()],Nt.prototype,"focusedIndex",2);Ue([g()],Nt.prototype,"filteredItems",2);Ue([g()],Nt.prototype,"uuid",2);Ue([a({type:String})],Nt.prototype,"label",2);Ue([a({type:Array})],Nt.prototype,"items",2);Ue([Vo('[part="combo-box"]')],Nt.prototype,"parentDiveElement",2);Nt=Ue([p("pont-combo-box")],Nt);const Oe={root:["pont-flex pont-overflow-hidden","pont-flex-col","pont-w-command-space-w pont-h-command-space-h","pont-text-command-color-text","pont-bg-command-color-bg","pont-rounded-command-radius"],input:{wrapper:["pont-flex","pont-gap-command-input-wrapper-space-gap pont-items-center","pont-px-command-input-wrapper-space-px","pont-h-command-input-wrapper-space-h","pont-border-b-command-input-wrapper-width-border pont-border-b-command-input-wrapper-color-border"],icon:["pont-shrink-0","pont-size-command-input-icon-space-size","pont-opacity-command-input-icon-opacity"],input:["pont-flex","pont-py-command-input-space-py","pont-w-command-input-space-w pont-h-command-input-space-h","pont-text-command-input-font","pont-bg-command-input-color-bg","pont-rounded-command-input-radius pont-outline-hidden","focus:pont-outline-none","disabled:pont-opacity-command-input-opacity-disabled disabled:pont-cursor-not-allowed","placeholder:pont-text-command-input-placeholder-color-text"]},list:["pont-overflow-x-hidden pont-overflow-y-auto","pont-max-h-command-list-space-max-h","pont-scroll-py-1"],empty:["pont-py-command-empty-space-py","pont-text-command-empty-font pont-text-center"],group:["pont-overflow-hidden","pont-p-command-group-space-p","pont-text-command-group-color-text"],heading:["pont-px-command-heading-space-px pont-py-command-heading-space-py","pont-text-command-heading-font pont-font-command-heading-font-weight pont-text-command-heading-color-text"],separator:["pont-command-separator-space-mx","pont-h-command-separator-space-h","pont-bg-command-separator-color-bg"],item:["pont-flex pont-relative","pont-gap-command-item-space-gap pont-items-center","pont-px-command-item-space-px pont-py-command-item-space-py","pont-text-command-item-font","pont-rounded-command-item-radius pont-outline-hidden","pont-cursor-default pont-select-none","hover:pont-text-command-item-color-text-hover hover:pont-bg-command-item-color-bg-hover","aria-selected:pont-text-command-item-color-text-selected aria-selected:pont-bg-command-item-color-bg-selected",'data-[disabled="true"]:pont-opacity-command-item-opacity-disabled data-[disabled="true"]:pont-pointer-events-none','[&_svg]:pont-shrink-0 [&_svg:not([class*="pont-size-"])]:pont-size-command-item-icon-space-size [&_svg:not([class*="pont-text-"])]:pont-text-command-item-icon-color-text [&_svg]:pont-pointer-events-none']};var uv=Object.defineProperty,mv=Object.getOwnPropertyDescriptor,El=(e,t,r,o)=>{for(var n=o>1?void 0:o?mv(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&&uv(t,r,n),n};let Xr=class extends ${constructor(){super(...arguments),this._id="",this._hidden="true"}get containerElement(){return this.querySelector(`#${this.identifier}`)}get identifier(){if(this._id!=="")return this._id;const e=this.parentElement;return e?this._id=`${e.getAttribute("id")}e${Xr._counter++}`:this._id=`rtgcmdrxlxe${Xr._counter++}`,this._id}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this.containerElement)}render(){return l`
|
|
771
771
|
<div
|
|
772
772
|
rtgcmd-empty
|
|
773
773
|
id="${this.identifier}"
|
|
@@ -775,7 +775,7 @@
|
|
|
775
775
|
role="presentation"
|
|
776
776
|
class=${m(Oe.empty,this._hidden==="true"&&"pont-hidden",this.className)}
|
|
777
777
|
></div>
|
|
778
|
-
`}};
|
|
778
|
+
`}};Xr._counter=0;El([a({type:String})],Xr.prototype,"_id",2);El([a({attribute:"aria-hidden",type:String})],Xr.prototype,"_hidden",2);Xr=El([p("pont-command-empty")],Xr);var fv=Object.defineProperty,gv=Object.getOwnPropertyDescriptor,ns=(e,t,r,o)=>{for(var n=o>1?void 0:o?gv(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&&fv(t,r,n),n};let Cr=class extends ${constructor(){super(...arguments),this.heading="",this._id="",this._hidden=""}get itemsContainerElement(){return this.querySelector(`#${this.identifier}g`)}get identifier(){if(this._id!=="")return this._id;const e=this.parentElement;return e?this._id=`${e.getAttribute("id")}g${Cr._counter++}`:this._id=`rtgcmdrxlxg${Cr._counter++}`,this._id}createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(e){const t=this.itemsContainerElement;if(t){for(;t.firstChild;)t.removeChild(t.firstChild);this.moveLightDomChildrenInto(t)}}render(){return l`
|
|
779
779
|
<div
|
|
780
780
|
rtgcmd-group
|
|
781
781
|
id="${this.identifier}"
|
|
@@ -839,7 +839,7 @@
|
|
|
839
839
|
class=${m(Oe.input.input)}
|
|
840
840
|
/>
|
|
841
841
|
</div>
|
|
842
|
-
`}};Sl([a({type:String})],Li.prototype,"placeholder",2);Sl([a({attribute:"value",type:String})],Li.prototype,"_value",2);Li=Sl([p("pont-command-input")],Li);var _v=Object.defineProperty,yv=Object.getOwnPropertyDescriptor,
|
|
842
|
+
`}};Sl([a({type:String})],Li.prototype,"placeholder",2);Sl([a({attribute:"value",type:String})],Li.prototype,"_value",2);Li=Sl([p("pont-command-input")],Li);var _v=Object.defineProperty,yv=Object.getOwnPropertyDescriptor,so=(e,t,r,o)=>{for(var n=o>1?void 0:o?yv(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&&_v(t,r,n),n};let Ae=class extends ${constructor(){super(...arguments),this.selected=!1,this._id="",this._hidden="false",this.onSelect=()=>{},this.disabled="false"}get containerElement(){return this.querySelector(`#${this.identifier}`)}get identifier(){if(this._id!=="")return this._id;const e=this.parentElement;return e?this._id=`${e.getAttribute("id")}li${Ae._counter++}`:this._id=`rtgcmdrxgxli${Ae._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)}createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(e){this.moveLightDomChildrenInto(this.containerElement)}updated(e){}render(){return l`
|
|
843
843
|
<div
|
|
844
844
|
rtgcmd-item
|
|
845
845
|
id="${this.identifier}"
|
|
@@ -856,7 +856,7 @@
|
|
|
856
856
|
@click="${this.onSelect}"
|
|
857
857
|
class=${m(Oe.item,this._hidden==="true"&&"pont-hidden",this.className)}
|
|
858
858
|
></div>
|
|
859
|
-
`}};Ae._counter=0;
|
|
859
|
+
`}};Ae._counter=0;so([a({type:String})],Ae.prototype,"_id",2);so([a({attribute:"aria-hidden",type:String})],Ae.prototype,"_hidden",2);so([a({type:Function})],Ae.prototype,"onSelect",2);so([a({attribute:"data-value",type:String}),a({type:Boolean})],Ae.prototype,"containerElement",1);so([a({attribute:"data-disabled",type:String})],Ae.prototype,"disabled",2);Ae=so([p("pont-command-item")],Ae);var wv=Object.getOwnPropertyDescriptor,$v=(e,t,r,o)=>{for(var n=o>1?void 0:o?wv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Yd=class extends ${get identifier(){const e=this.parentElement;return e?`${e.getAttribute("id")}l`:"rtgcmdrxl"}get containerElement(){return this.querySelector("div[rtgcmd-list]")}createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(e){this.moveLightDomChildrenInto(this.containerElement)}render(){return l`
|
|
860
860
|
<div
|
|
861
861
|
rtgcmd-list
|
|
862
862
|
id="${this.identifier}"
|
|
@@ -866,7 +866,7 @@
|
|
|
866
866
|
>
|
|
867
867
|
<div></div>
|
|
868
868
|
</div>
|
|
869
|
-
`}};Yd=$v([p("pont-command-list")],Yd);var Pv=Object.defineProperty,Cv=Object.getOwnPropertyDescriptor,xl=(e,t,r,o)=>{for(var n=o>1?void 0:o?Cv(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&&Pv(t,r,n),n};let
|
|
869
|
+
`}};Yd=$v([p("pont-command-list")],Yd);var Pv=Object.defineProperty,Cv=Object.getOwnPropertyDescriptor,xl=(e,t,r,o)=>{for(var n=o>1?void 0:o?Cv(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&&Pv(t,r,n),n};let Zr=class extends v{constructor(){super(...arguments),this._id="",this._hidden=""}get identifier(){if(this._id!=="")return this._id;const e=this.parentElement;return e?this._id=`${e.getAttribute("id")}s${Zr._counter++}`:this._id=`rtgcmdrxlxs${Zr._counter++}`,this._id}createRenderRoot(){return this}render(){return l`${this._hidden==="true"?h:l`
|
|
870
870
|
<div
|
|
871
871
|
rtgcmd-separator
|
|
872
872
|
id="${this.identifier}"
|
|
@@ -874,7 +874,7 @@
|
|
|
874
874
|
role="separator"
|
|
875
875
|
class=${m(Oe.separator,this.className)}
|
|
876
876
|
></div>
|
|
877
|
-
`}`}};
|
|
877
|
+
`}`}};Zr._counter=0;xl([a({type:String})],Zr.prototype,"_id",2);xl([a({attribute:"aria-hidden",type:String})],Zr.prototype,"_hidden",2);Zr=xl([p("pont-command-separator")],Zr);var Ev=Object.getOwnPropertyDescriptor,Sv=(e,t,r,o)=>{for(var n=o>1?void 0:o?Ev(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Qd=class extends ${get containerElement(){return this.querySelector("div[rtgcmd-root]")}getAttributesToExclude(){return[]}getAttributesToRemoveFromParent(){return["class","style"]}createRenderRoot(){return this}firstUpdated(e){this.removeParentAttributes(),this.moveLightDomChildrenInto(this.containerElement),this.containerElement&&this.observeStyleAndClassSync(this.containerElement)}render(){const e=this.customClass||"",t=this.customStyle||"";return l`
|
|
878
878
|
<div
|
|
879
879
|
part="command"
|
|
880
880
|
class="${m(Oe.root,e)}"
|
|
@@ -882,7 +882,7 @@
|
|
|
882
882
|
id="rtgcmdr1"
|
|
883
883
|
rtgcmd-root
|
|
884
884
|
></div>
|
|
885
|
-
`}};Qd=Sv([p("pont-command")],Qd);const
|
|
885
|
+
`}};Qd=Sv([p("pont-command")],Qd);const kt={root:[""],content:["pont-overflow-x-hidden pont-overflow-y-auto pont-z-50","pont-p-context-menu-content-space-p","pont-min-w-context-menu-content-space-min-w","pont-text-context-menu-content-color-text","pont-bg-context-menu-content-color-bg","pont-rounded-context-menu-content-radius pont-border-context-menu-content-width-border pont-border-context-menu-content-color-border","pont-shadow-context-menu-content-shadow","pont-translate-y-0.5","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"],group:[""],item:["pont-flex pont-relative","pont-gap-context-menu-item-space-gap pont-items-center","pont-px-context-menu-item-space-px pont-py-context-menu-item-space-py","pont-text-context-menu-item-font","pont-rounded-context-menu-item-radius pont-outline-hidden","pont-cursor-default","pont-select-none","hover:pont-bg-context-menu-item-color-bg-hover hover:pont-text-context-menu-item-color-text-hover","focus:pont-bg-context-menu-item-color-bg-focus focus:pont-text-context-menu-item-color-text-focus","data-[disabled]:pont-opacity-context-menu-item-opacity-disabled data-[disabled]:pont-pointer-events-none",'[&_svg]:pont-shrink-0 [&_svg:not([class*="pont-size-"])]:pont-size-context-menu-item-icon-space-size [&_svg:not([class*="pont-text-"])]:pont-text-context-menu-item-icon-color-text [&_svg]:pont-pointer-events-none'],checkboxItem:{base:["pont-flex pont-relative","pont-gap-context-menu-checkbox-item-space-gap pont-items-center","pont-pl-context-menu-checkbox-item-space-pl pont-pr-context-menu-checkbox-item-space-pr pont-py-context-menu-checkbox-item-space-py","pont-text-context-menu-checkbox-item-font","pont-rounded-context-menu-checkbox-item-radius pont-outline-hidden","pont-cursor-default","pont-select-none","aria-selected:pont-bg-context-menu-checkbox-item-color-bg-focus aria-selected:pont-text-context-menu-checkbox-item-color-text-focus","data-[disabled]:pont-opacity-context-menu-checkbox-item-opacity-disabled data-[disabled]:pont-pointer-events-none"],span:["pont-flex pont-absolute pont-left-2","pont-justify-center pont-items-center","pont-size-context-menu-checkbox-item-icon-container-space-size","pont-pointer-events-none"],icon:["pont-shrink-0","pont-size-context-menu-checkbox-item-icon-space-size","pont-pointer-events-none"]},radioItem:{base:["pont-flex pont-relative","pont-gap-context-menu-radio-item-space-gap pont-items-center","pont-pl-context-menu-radio-item-space-pl pont-pr-context-menu-radio-item-space-pr pont-py-context-menu-radio-item-space-py","pont-text-context-menu-radio-item-font","pont-rounded-context-menu-radio-item-radius pont-outline-hidden","pont-cursor-default","pont-select-none","aria-selected:pont-bg-context-menu-radio-item-color-bg-focus aria-selected:pont-text-context-menu-radio-item-color-text-focus","data-[disabled]:pont-opacity-context-menu-radio-item-opacity-disabled data-[disabled]:pont-pointer-events-none"],span:["pont-flex pont-absolute pont-left-2","pont-justify-center pont-items-center","pont-size-context-menu-radio-item-icon-container-space-size","pont-pointer-events-none"],icon:["pont-shrink-0","pont-size-context-menu-radio-item-icon-space-size","pont-pointer-events-none","pont-fill-current"]},label:["pont-px-context-menu-label-space-px pont-py-context-menu-label-space-py","pont-text-context-menu-label-font pont-font-context-menu-label-font-weight"],separator:["pont-mx-context-menu-separator-space-mx pont-my-context-menu-separator-space-my","pont-h-context-menu-separator-space-h","pont-bg-context-menu-separator-color-bg"],shortcut:["pont-ml-auto","pont-text-context-menu-shortcut-font pont-text-context-menu-shortcut-color-text"]};var xv=Object.defineProperty,Ov=Object.getOwnPropertyDescriptor,ao=(e,t,r,o)=>{for(var n=o>1?void 0:o?Ov(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&&xv(t,r,n),n};let tn=class extends ${constructor(){super(...arguments),this._id="",this.selected=!1,this.checked=!1,this.disabled=!1}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}get _containerElement(){return this.querySelector("div[part=context-menu-checkbox-item-container]")}getAttributesToExclude(){return["data-testid"]}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this.checked=!this.checked}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
886
886
|
<div
|
|
887
887
|
rtgcmd-item
|
|
888
888
|
part="context-menu-checkbox"
|
|
@@ -895,9 +895,9 @@
|
|
|
895
895
|
@mouseover="${this.handleMouseEvent}"
|
|
896
896
|
@mouseleave="${this.handleMouseEvent}"
|
|
897
897
|
@focus="${this.handleMouseEvent}"
|
|
898
|
-
class=${m(
|
|
898
|
+
class=${m(kt.checkboxItem.base,this.className)}
|
|
899
899
|
>
|
|
900
|
-
<span class=${m(
|
|
900
|
+
<span class=${m(kt.checkboxItem.span)}>
|
|
901
901
|
${this.checked?l`
|
|
902
902
|
<svg
|
|
903
903
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -909,7 +909,7 @@
|
|
|
909
909
|
stroke-width="2"
|
|
910
910
|
stroke-linecap="round"
|
|
911
911
|
stroke-linejoin="round"
|
|
912
|
-
class=${m(
|
|
912
|
+
class=${m(kt.checkboxItem.icon,"lucide lucide-check-icon lucide-check")}
|
|
913
913
|
>
|
|
914
914
|
<path d="M20 6 9 17l-5-5" />
|
|
915
915
|
</svg>
|
|
@@ -917,19 +917,19 @@
|
|
|
917
917
|
</span>
|
|
918
918
|
<div part="context-menu-checkbox-item-container"></div>
|
|
919
919
|
</div>
|
|
920
|
-
`}};
|
|
920
|
+
`}};ao([a({type:String})],tn.prototype,"_id",2);ao([a({attribute:"data-value",type:String})],tn.prototype,"value",1);ao([a({type:Boolean})],tn.prototype,"selected",2);ao([a({type:Boolean})],tn.prototype,"checked",2);ao([a({attribute:"data-disabled",type:Boolean})],tn.prototype,"disabled",2);tn=ao([p("pont-context-menu-checkbox-item")],tn);var Rv=Object.defineProperty,Iv=Object.getOwnPropertyDescriptor,kh=(e,t,r,o)=>{for(var n=o>1?void 0:o?Iv(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&&Rv(t,r,n),n};let xa=class extends ${constructor(){super(),this.isOpen=!1,this.handleClickOutside=this.handleClickOutside.bind(this)}get _containerElement(){return this.querySelector("div[part=context-menu-content")}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),super.disconnectedCallback()}handleClickOutside(e){const t=this==null?void 0:this.querySelector("button");!this.contains(e.target)&&!(t!=null&&t.contains(e.target))&&requestAnimationFrame(()=>{this._containerElement.style.display="none",this._containerElement.style.position="absolute",this._containerElement.dataset.state="closed",this.isOpen=!1})}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
921
921
|
<div
|
|
922
922
|
part="context-menu-content"
|
|
923
|
-
class=${m(
|
|
923
|
+
class=${m(kt.content,this.className)}
|
|
924
924
|
></div>
|
|
925
925
|
`}};kh([g()],xa.prototype,"isOpen",2);xa=kh([p("pont-context-menu-content")],xa);var Tv=Object.defineProperty,Av=Object.getOwnPropertyDescriptor,Fh=(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=(o?s(t,r,n):s(n))||n);return o&&n&&Tv(t,r,n),n};let Oa=class extends ${constructor(){super(...arguments),this.heading=""}get _containerElement(){return this.querySelector("div[ rtgcontext-group-items]")}createRenderRoot(){return this}getAttributesToExclude(){return["data-testid"]}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
926
926
|
<div
|
|
927
927
|
rtgcmd-group
|
|
928
928
|
part="context-menu-group"
|
|
929
929
|
role="presentation"
|
|
930
|
-
class=${m(
|
|
930
|
+
class=${m(kt.group,this.className)}
|
|
931
931
|
>
|
|
932
|
-
<div rtgcmd-group-heading class=${m(
|
|
932
|
+
<div rtgcmd-group-heading class=${m(kt.label)}>
|
|
933
933
|
${this.heading}
|
|
934
934
|
</div>
|
|
935
935
|
|
|
@@ -941,9 +941,9 @@
|
|
|
941
941
|
role="option"
|
|
942
942
|
data-value="${this.value}"
|
|
943
943
|
?data-disabled=${this.disabled}
|
|
944
|
-
class=${m(
|
|
944
|
+
class=${m(kt.item,this.className)}
|
|
945
945
|
></div>
|
|
946
|
-
`}};Ol([a({attribute:"data-value",type:String})],ki.prototype,"value",1);Ol([a({attribute:"data-disabled",type:Boolean})],ki.prototype,"disabled",2);ki=Ol([p("pont-context-menu-item")],ki);var kv=Object.defineProperty,Fv=Object.getOwnPropertyDescriptor,
|
|
946
|
+
`}};Ol([a({attribute:"data-value",type:String})],ki.prototype,"value",1);Ol([a({attribute:"data-disabled",type:Boolean})],ki.prototype,"disabled",2);ki=Ol([p("pont-context-menu-item")],ki);var kv=Object.defineProperty,Fv=Object.getOwnPropertyDescriptor,lo=(e,t,r,o)=>{for(var n=o>1?void 0:o?Fv(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&&kv(t,r,n),n};let en=class extends ${constructor(){super(...arguments),this._id="",this.selected=!1,this.checked=!1,this.disabled=!1}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}get _containerElement(){return this.querySelector("div[part=context-menu-radio-item-container]")}getAttributesToExclude(){return["data-testid"]}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})))}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
947
947
|
<div
|
|
948
948
|
rtgcmd-item
|
|
949
949
|
part="context-menu-radio"
|
|
@@ -956,9 +956,9 @@
|
|
|
956
956
|
@mouseover="${this.handleMouseEvent}"
|
|
957
957
|
@mouseleave="${this.handleMouseEvent}"
|
|
958
958
|
@focus="${this.handleMouseEvent}"
|
|
959
|
-
class=${m(
|
|
959
|
+
class=${m(kt.radioItem.base,this.className)}
|
|
960
960
|
>
|
|
961
|
-
<span class=${m(
|
|
961
|
+
<span class=${m(kt.radioItem.span)}>
|
|
962
962
|
${this.checked?l`<svg
|
|
963
963
|
xmlns="http://www.w3.org/2000/svg"
|
|
964
964
|
width="24"
|
|
@@ -969,39 +969,39 @@
|
|
|
969
969
|
stroke-width="2"
|
|
970
970
|
stroke-linecap="round"
|
|
971
971
|
stroke-linejoin="round"
|
|
972
|
-
class=${m(
|
|
972
|
+
class=${m(kt.radioItem.icon,"lucide lucide-circle-icon lucide-circle")}
|
|
973
973
|
>
|
|
974
974
|
<circle cx="12" cy="12" r="10" />
|
|
975
975
|
</svg>`:h}
|
|
976
976
|
</span>
|
|
977
977
|
<div part="context-menu-radio-item-container"></div>
|
|
978
978
|
</div>
|
|
979
|
-
`}};
|
|
979
|
+
`}};lo([a({type:String})],en.prototype,"_id",2);lo([a({attribute:"data-value",type:String})],en.prototype,"value",1);lo([a({type:Boolean})],en.prototype,"selected",2);lo([a({type:Boolean})],en.prototype,"checked",2);lo([a({attribute:"data-disabled",type:Boolean})],en.prototype,"disabled",2);en=lo([p("pont-context-menu-radio-item")],en);var Nv=Object.defineProperty,Mv=Object.getOwnPropertyDescriptor,Nh=(e,t,r,o)=>{for(var n=o>1?void 0:o?Mv(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&&Nv(t,r,n),n};let Ra=class extends v{constructor(){super(...arguments),this._id=""}createRenderRoot(){return this}render(){return l`
|
|
980
980
|
<div
|
|
981
981
|
rtgcmd-separator
|
|
982
982
|
part="context-menu-separator"
|
|
983
983
|
role="separator"
|
|
984
|
-
class=${m(
|
|
984
|
+
class=${m(kt.separator,this.className)}
|
|
985
985
|
></div>
|
|
986
|
-
`}};Nh([a({type:String})],Ra.prototype,"_id",2);Ra=Nh([p("pont-context-menu-separator")],Ra);var Uv=Object.getOwnPropertyDescriptor,Bv=(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=s(n)||n);return n};let Jd=class extends ${get _containerElement(){return this.querySelector("span[part=context-menu-shortcut]")}getAttributesToExclude(){return[]}createRenderRoot(){return this.classList=m(
|
|
986
|
+
`}};Nh([a({type:String})],Ra.prototype,"_id",2);Ra=Nh([p("pont-context-menu-separator")],Ra);var Uv=Object.getOwnPropertyDescriptor,Bv=(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=s(n)||n);return n};let Jd=class extends ${get _containerElement(){return this.querySelector("span[part=context-menu-shortcut]")}getAttributesToExclude(){return[]}createRenderRoot(){return this.classList=m(kt.shortcut),this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
987
987
|
<span
|
|
988
988
|
part="context-menu-shortcut"
|
|
989
|
-
class=${m(
|
|
989
|
+
class=${m(kt.shortcut,this.className)}
|
|
990
990
|
>
|
|
991
991
|
</span>
|
|
992
992
|
`}};Jd=Bv([p("pont-context-menu-shortcut")],Jd);var qv=Object.getOwnPropertyDescriptor,jv=(e,t,r,o)=>{for(var n=o>1?void 0:o?qv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Xd=class extends v{createRenderRoot(){return this}render(){return l``}};Xd=jv([p("pont-context-menu-trigger")],Xd);var zv=Object.defineProperty,Vv=Object.getOwnPropertyDescriptor,Mh=(e,t,r,o)=>{for(var n=o>1?void 0:o?Vv(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&&zv(t,r,n),n};let Ia=class extends ${constructor(){super(...arguments),this.isOpen=!1,this.handleClickOutside=e=>{const t=e.target;this!=null&&this.contains(t)||(this.isOpen=!1)}}get _containerElement(){return this.querySelector("div[part=context-menu]")}get _triggerElement(){return this.querySelector("pont-context-menu-trigger")}get _content(){return this==null?void 0:this.querySelector("div[part=context-menu-content]")}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside),this.addEventListener("radio-selected",this._handleRadioSelected),this.addEventListener("close-context-menu",()=>{this.isOpen=!1,requestAnimationFrame(()=>{const e=this._content;e&&(e.style.display="none")})})}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),super.disconnectedCallback()}toggleDropdown(e){e.preventDefault(),e.stopPropagation();const{clientX:t,clientY:r}=e,o=e.target.getBoundingClientRect();requestAnimationFrame(()=>{const n=this._content;n&&(n.style.display="",n.style.position="absolute",n.style.left=`${t-o.left}px`,n.style.top=`${r-o.top}px`,n.dataset.state="open",this.isOpen=!0)})}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.isOpen?"open":"closed")}_handleRadioSelected(e){this.querySelectorAll("pont-context-menu-radio-item").forEach(t=>{t!==e.target&&(t.checked=!1)})}getAttributesToExclude(){return[]}firstUpdated(e){var t;this.moveLightDomChildrenInto(this._containerElement),(t=this._triggerElement)==null||t.addEventListener("contextmenu",r=>{this.toggleDropdown(r)}),this.style.position="relative"}createRenderRoot(){return this}render(){return l`
|
|
993
993
|
<div
|
|
994
994
|
part="context-menu"
|
|
995
|
-
class=${m(
|
|
995
|
+
class=${m(kt.root,this.className)}
|
|
996
996
|
></div>
|
|
997
|
-
`}};Mh([g()],Ia.prototype,"isOpen",2);Ia=Mh([p("pont-context-menu")],Ia);const Rl={root:["pont-relative"],trigger:[""],content:["pont-fixed pont-z-50","pont-p-popover-content-space-p","pont-w-popover-content-space-w","pont-text-popover-content-color-text","pont-bg-popover-content-color-bg","pont-rounded-popover-content-radius pont-border-popover-content-width-border pont-border-popover-content-color-border pont-outline-hidden","pont-shadow-popover-content-shadow",'data-[state="open"]:pont-block data-[state="closed"]:pont-hidden','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',"pont-translate-y-0.5"]};var Gv=Object.defineProperty,Hv=Object.getOwnPropertyDescriptor,Wo=(e,t,r,o)=>{for(var n=o>1?void 0:o?Hv(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&&Gv(t,r,n),n};let
|
|
997
|
+
`}};Mh([g()],Ia.prototype,"isOpen",2);Ia=Mh([p("pont-context-menu")],Ia);const Rl={root:["pont-relative"],trigger:[""],content:["pont-fixed pont-z-50","pont-p-popover-content-space-p","pont-w-popover-content-space-w","pont-text-popover-content-color-text","pont-bg-popover-content-color-bg","pont-rounded-popover-content-radius pont-border-popover-content-width-border pont-border-popover-content-color-border pont-outline-hidden","pont-shadow-popover-content-shadow",'data-[state="open"]:pont-block data-[state="closed"]:pont-hidden','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',"pont-translate-y-0.5"]};var Gv=Object.defineProperty,Hv=Object.getOwnPropertyDescriptor,Wo=(e,t,r,o)=>{for(var n=o>1?void 0:o?Hv(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&&Gv(t,r,n),n};let Gn=class extends ${constructor(){super(...arguments),this.enableDefaultStyle=!0,this.styleContent=!0,this.side="bottom",this.state="closed"}get _popover(){let e=this.parentElement;for(;e&&!(e instanceof Fo);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=popover-content]")}handleClickOutside(e){const t=this._popover;t&&!t.contains(e.target)&&(t.isOpen=!1)}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement),window.addEventListener("click",this.handleClickOutside.bind(this))}updated(e){var t;(t=this._popover)!=null&&t.isOpen||window.removeEventListener("click",this.handleClickOutside.bind(this))}preventClickPropagation(e){e.stopPropagation()}getAttributesToExclude(){return["data-testid"]}createRenderRoot(){return this}render(){return l`
|
|
998
998
|
<div
|
|
999
999
|
part="popover-content"
|
|
1000
1000
|
data-state=${this.state}
|
|
1001
1001
|
class=${m(Rl.content,this.className)}
|
|
1002
1002
|
@click="${this.preventClickPropagation}"
|
|
1003
1003
|
></div>
|
|
1004
|
-
`}};Wo([a({type:Boolean})],
|
|
1004
|
+
`}};Wo([a({type:Boolean})],Gn.prototype,"enableDefaultStyle",2);Wo([a({type:Boolean})],Gn.prototype,"styleContent",2);Wo([a({type:String})],Gn.prototype,"side",2);Wo([a({attribute:"data-state",type:String})],Gn.prototype,"state",2);Gn=Wo([p("pont-popover-content")],Gn);var Kv=Object.getOwnPropertyDescriptor,Wv=(e,t,r,o)=>{for(var n=o>1?void 0:o?Kv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Zd=class extends ${constructor(){super(...arguments),this.handleClick=()=>{const e=this._popover;e&&(e.isOpen=!e.isOpen)}}get _popover(){let e=this.parentElement;for(;e&&!(e instanceof Fo);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=popover-trigger]")}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement),this.addEventListener("click",t=>{this.handleClick(),t.stopPropagation()})}createRenderRoot(){return this}getAttributesToExclude(){return["data-testid"]}render(){return l`
|
|
1005
1005
|
<div
|
|
1006
1006
|
part="popover-trigger"
|
|
1007
1007
|
class=${m(Rl.trigger,this.className)}
|
|
@@ -1050,12 +1050,12 @@
|
|
|
1050
1050
|
<pont-calendar mode="single"></pont-calendar>
|
|
1051
1051
|
</pont-popover-content>
|
|
1052
1052
|
</pont-popover>
|
|
1053
|
-
`}};Bh([a({type:Object})],Ta.prototype,"selectedDate",2);Ta=Bh([p("pont-date-picker")],Ta);const se={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 Zv=Object.getOwnPropertyDescriptor,tb=(e,t,r,o)=>{for(var n=o>1?void 0:o?Zv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};const eb="closed";let tc=class extends ${get _dialog(){let e=this.parentElement;for(;e;){if(e instanceof
|
|
1053
|
+
`}};Bh([a({type:Object})],Ta.prototype,"selectedDate",2);Ta=Bh([p("pont-date-picker")],Ta);const se={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 Zv=Object.getOwnPropertyDescriptor,tb=(e,t,r,o)=>{for(var n=o>1?void 0:o?Zv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};const eb="closed";let tc=class extends ${get _dialog(){let e=this.parentElement;for(;e;){if(e instanceof Hn)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=eb)})}getAttributesToExclude(){return["data-testid"]}createRenderRoot(){return this}render(){return l`
|
|
1054
1054
|
<div
|
|
1055
1055
|
part="dialog-close"
|
|
1056
1056
|
class=${m(se.close,this.className)}
|
|
1057
1057
|
></div>
|
|
1058
|
-
`}};tc=tb([p("pont-dialog-close")],tc);var rb=Object.defineProperty,nb=Object.getOwnPropertyDescriptor,Il=(e,t,r,o)=>{for(var n=o>1?void 0:o?nb(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&&rb(t,r,n),n};const Fs="closed";let Fi=class extends ${constructor(){super(...arguments),this.state=Fs,this.showCloseButton=!1,this.handleCloseButtonClick=()=>{const e=this._dialog;e&&(e.dataset.state=Fs)}}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
|
|
1058
|
+
`}};tc=tb([p("pont-dialog-close")],tc);var rb=Object.defineProperty,nb=Object.getOwnPropertyDescriptor,Il=(e,t,r,o)=>{for(var n=o>1?void 0:o?nb(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&&rb(t,r,n),n};const Fs="closed";let Fi=class extends ${constructor(){super(...arguments),this.state=Fs,this.showCloseButton=!1,this.handleCloseButtonClick=()=>{const e=this._dialog;e&&(e.dataset.state=Fs)}}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 Hn)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")===Fs?this.ـcomponentElement.style.display="grid":this.ـcomponentElement.style.display="none"})}render(){return l`
|
|
1059
1059
|
<div
|
|
1060
1060
|
rtgdlg-content
|
|
1061
1061
|
part="dialog-content"
|
|
@@ -1111,12 +1111,12 @@
|
|
|
1111
1111
|
part="dialog-overly"
|
|
1112
1112
|
class=${m(se.overlay,this.className)}
|
|
1113
1113
|
></div>
|
|
1114
|
-
`}};rc=db([p("pont-dialog-overlay")],rc);var cb=Object.getOwnPropertyDescriptor,pb=(e,t,r,o)=>{for(var n=o>1?void 0:o?cb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};const hb="open";let nc=class extends ${constructor(){super(...arguments),this.handleClick=()=>{const e=this._dialog;e&&(e.dataset.state=hb)}}get _dialog(){let e=this.parentElement;for(;e;){if(e instanceof
|
|
1114
|
+
`}};rc=db([p("pont-dialog-overlay")],rc);var cb=Object.getOwnPropertyDescriptor,pb=(e,t,r,o)=>{for(var n=o>1?void 0:o?cb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};const hb="open";let nc=class extends ${constructor(){super(...arguments),this.handleClick=()=>{const e=this._dialog;e&&(e.dataset.state=hb)}}get _dialog(){let e=this.parentElement;for(;e;){if(e instanceof Hn)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`
|
|
1115
1115
|
<div
|
|
1116
1116
|
part="dialog-trigger"
|
|
1117
1117
|
class=${m(se.trigger,this.className)}
|
|
1118
1118
|
></div>
|
|
1119
|
-
`}};nc=pb([p("pont-dialog-trigger")],nc);var ub=Object.defineProperty,mb=Object.getOwnPropertyDescriptor,qh=(e,t,r,o)=>{for(var n=o>1?void 0:o?mb(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&&ub(t,r,n),n};const fb="open",gb="closed";let
|
|
1119
|
+
`}};nc=pb([p("pont-dialog-trigger")],nc);var ub=Object.defineProperty,mb=Object.getOwnPropertyDescriptor,qh=(e,t,r,o)=>{for(var n=o>1?void 0:o?mb(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&&ub(t,r,n),n};const fb="open",gb="closed";let Hn=class extends ${constructor(){super(...arguments),this.state=gb}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`
|
|
1120
1120
|
<div
|
|
1121
1121
|
rtgdlg-root
|
|
1122
1122
|
part="dialog"
|
|
@@ -1124,7 +1124,7 @@
|
|
|
1124
1124
|
>
|
|
1125
1125
|
${this.state===fb?l` <pont-dialog-overlay></pont-dialog-overlay>`:h}
|
|
1126
1126
|
</div>
|
|
1127
|
-
`}};qh([a({attribute:"data-state",type:String})],
|
|
1127
|
+
`}};qh([a({attribute:"data-state",type:String})],Hn.prototype,"state",2);Hn=qh([p("pont-dialog")],Hn);const Pe={open:"open",closed:"closed"},De={root:[""],trigger:[""],close:[""],overlay:["pont-fixed pont-inset-0 pont-z-50","pont-bg-drawer-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-inset-x-0 pont-bottom-0 pont-z-50","pont-flex pont-flex-col","pont-mt-drawer-content-space-mt","pont-h-auto pont-max-h-[80vh]","pont-bg-drawer-content-color-bg","pont-rounded-t-drawer-content-radius pont-border-t-drawer-content-width-border pont-border-t-drawer-content-color-border"],thumb:["pont-shrink-0","pont-mx-auto pont-mt-drawer-thumb-space-mt","pont-w-drawer-thumb-space-w pont-h-drawer-thumb-space-h","pont-bg-drawer-thumb-color-bg","pont-rounded-drawer-thumb-radius"]},header:["pont-flex pont-flex-col pont-gap-drawer-header-space-gap-sm md:pont-gap-drawer-header-space-gap","pont-p-drawer-header-space-p","pont-text-center"],footer:["pont-flex pont-flex-col pont-gap-drawer-footer-space-gap","pont-p-drawer-footer-space-p pont-mt-auto"],title:["pont-text-drawer-title-font pont-font-drawer-title-font-weight pont-text-drawer-title-color-text"],description:["pont-text-drawer-description-font pont-font-drawer-description-font-weight pont-text-drawer-description-color-text"]};var vb=Object.getOwnPropertyDescriptor,bb=(e,t,r,o)=>{for(var n=o>1?void 0:o?vb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let oc=class extends ${get _drawer(){let e=this.parentElement;for(;e;){if(e instanceof No)return e;e=e.parentElement}return e}get _containerElement(){return this.querySelector("div[part=drawer-close]")}async firstUpdated(e){super.firstUpdated(e),await this.updateComplete;const t=this._containerElement;if(t){this.moveLightDomChildrenInto(t);const r=t.querySelector("button, [data-close], [role=button]");r&&r.addEventListener("click",o=>{o.stopPropagation();const n=this._drawer;n&&(n.dataset.state=Pe.closed)})}}getAttributesToExclude(){return["data-testid"]}createRenderRoot(){return this}render(){return l`
|
|
1128
1128
|
<div
|
|
1129
1129
|
part="drawer-close"
|
|
1130
1130
|
class=${m(De.close,this.className)}
|
|
@@ -1196,7 +1196,7 @@
|
|
|
1196
1196
|
>
|
|
1197
1197
|
${this.state===Pe.open?l` <pont-drawer-overlay></pont-drawer-overlay>`:h}
|
|
1198
1198
|
</div>
|
|
1199
|
-
`}};zh([a({attribute:"data-state",type:String})],No.prototype,"state",2);No=zh([p("pont-drawer")],No);const
|
|
1199
|
+
`}};zh([a({attribute:"data-state",type:String})],No.prototype,"state",2);No=zh([p("pont-drawer")],No);const Ft={root:["pont-relative"],content:["pont-overflow-x-hidden pont-overflow-y-auto pont-z-50 pont-absolute","pont-p-dropdown-menu-content-space-p","pont-min-w-dropdown-menu-content-space-min-w","pont-text-dropdown-menu-content-color-text","pont-bg-dropdown-menu-content-color-bg","pont-rounded-dropdown-menu-content-radius pont-border-dropdown-menu-content-width-border pont-border-dropdown-menu-content-color-border","pont-shadow-dropdown-menu-content-shadow","pont-translate-y-0.5","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"],group:[""],item:["pont-flex pont-relative","pont-gap-dropdown-menu-item-space-gap pont-items-center","pont-px-dropdown-menu-item-space-px pont-py-dropdown-menu-item-space-py","pont-text-dropdown-menu-item-font","pont-rounded-dropdown-menu-item-radius pont-outline-hidden","pont-cursor-default","pont-select-none","hover:pont-bg-dropdown-menu-item-color-bg-hover hover:pont-text-dropdown-menu-item-color-text-hover","focus:pont-bg-dropdown-menu-item-color-bg-focus focus:pont-text-dropdown-menu-item-color-text-focus","data-[disabled]:pont-opacity-dropdown-menu-item-opacity-disabled data-[disabled]:pont-pointer-events-none",'[&_svg]:pont-shrink-0 [&_svg:not([class*="pont-size-"])]:pont-size-dropdown-menu-item-icon-space-size [&_svg:not([class*="pont-text-"])]:pont-text-dropdown-menu-item-icon-color-text [&_svg]:pont-pointer-events-none'],checkboxItem:{base:["pont-flex pont-relative","pont-gap-dropdown-menu-checkbox-item-space-gap pont-items-center","pont-pl-dropdown-menu-checkbox-item-space-pl pont-pr-dropdown-menu-checkbox-item-space-pr pont-py-dropdown-menu-checkbox-item-space-py","pont-text-dropdown-menu-checkbox-item-font","pont-rounded-dropdown-menu-checkbox-item-radius pont-outline-hidden","pont-cursor-default","pont-select-none","aria-selected:pont-bg-dropdown-menu-checkbox-item-color-bg-focus aria-selected:pont-text-dropdown-menu-checkbox-item-color-text-focus","data-[disabled]:pont-opacity-dropdown-menu-checkbox-item-opacity-disabled data-[disabled]:pont-pointer-events-none"],span:["pont-flex pont-absolute pont-left-2","pont-justify-center pont-items-center","pont-size-dropdown-menu-checkbox-item-icon-container-space-size","pont-pointer-events-none"],icon:["pont-shrink-0","pont-size-dropdown-menu-checkbox-item-icon-space-size","pont-pointer-events-none"]},radioItem:{base:["pont-flex pont-relative","pont-gap-dropdown-menu-radio-item-space-gap pont-items-center","pont-pl-dropdown-menu-radio-item-space-pl pont-pr-dropdown-menu-radio-item-space-pr pont-py-dropdown-menu-radio-item-space-py","pont-text-dropdown-menu-radio-item-font","pont-rounded-dropdown-menu-radio-item-radius pont-outline-hidden","pont-cursor-default","pont-select-none","aria-selected:pont-bg-dropdown-menu-radio-item-color-bg-focus aria-selected:pont-text-dropdown-menu-radio-item-color-text-focus","data-[disabled]:pont-opacity-dropdown-menu-radio-item-opacity-disabled data-[disabled]:pont-pointer-events-none"],span:["pont-flex pont-absolute pont-left-2","pont-justify-center pont-items-center","pont-size-dropdown-menu-radio-item-icon-container-space-size","pont-pointer-events-none"],icon:["pont-shrink-0","pont-size-dropdown-menu-radio-item-icon-space-size","pont-pointer-events-none","pont-fill-current"]},label:["pont-px-dropdown-menu-label-space-px pont-py-dropdown-menu-label-space-py","pont-text-dropdown-menu-label-font pont-font-dropdown-menu-label-font-weight"],separator:["pont-mx-dropdown-menu-separator-space-mx pont-my-dropdown-menu-separator-space-my","pont-h-dropdown-menu-separator-space-h","pont-bg-dropdown-menu-separator-color-bg"],shortcut:["pont-ml-auto","pont-text-dropdown-menu-shortcut-font pont-text-dropdown-menu-shortcut-color-text"]};var kb=Object.defineProperty,Fb=Object.getOwnPropertyDescriptor,co=(e,t,r,o)=>{for(var n=o>1?void 0:o?Fb(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&&kb(t,r,n),n};let rn=class extends ${constructor(){super(...arguments),this._id="",this.selected=!1,this.checked=!1,this.disabled=!1}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}get _containerElement(){return this.querySelector("div[part=dropdown-menu-checkbox-item-container]")}get _dropdownMenu(){let e=this.parentElement;for(;e&&!(e instanceof St);)e=e.parentElement;return e}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this._dropdownMenu.isOpen=!1,this.checked=!this.checked}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1200
1200
|
<div
|
|
1201
1201
|
rtgcmd-item
|
|
1202
1202
|
part="dropdown-menu-item"
|
|
@@ -1211,9 +1211,9 @@
|
|
|
1211
1211
|
@mouseover="${this.handleMouseEvent}"
|
|
1212
1212
|
@mouseleave="${this.handleMouseEvent}"
|
|
1213
1213
|
@focus="${this.handleMouseEvent}"
|
|
1214
|
-
class=${m(
|
|
1214
|
+
class=${m(Ft.checkboxItem.base,this.className)}
|
|
1215
1215
|
>
|
|
1216
|
-
<span class=${m(
|
|
1216
|
+
<span class=${m(Ft.checkboxItem.span)}>
|
|
1217
1217
|
${this.checked?l`
|
|
1218
1218
|
<svg
|
|
1219
1219
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1225,7 +1225,7 @@
|
|
|
1225
1225
|
stroke-width="2"
|
|
1226
1226
|
stroke-linecap="round"
|
|
1227
1227
|
stroke-linejoin="round"
|
|
1228
|
-
class=${m(
|
|
1228
|
+
class=${m(Ft.checkboxItem.icon,"lucide lucide-check-icon lucide-check")}
|
|
1229
1229
|
>
|
|
1230
1230
|
<path d="M20 6 9 17l-5-5" />
|
|
1231
1231
|
</svg>
|
|
@@ -1233,27 +1233,27 @@
|
|
|
1233
1233
|
</span>
|
|
1234
1234
|
<div part="dropdown-menu-checkbox-item-container"></div>
|
|
1235
1235
|
</div>
|
|
1236
|
-
`}};
|
|
1236
|
+
`}};co([a({type:String})],rn.prototype,"_id",2);co([a({attribute:"data-value",type:String})],rn.prototype,"value",1);co([a({type:Boolean})],rn.prototype,"selected",2);co([a({type:Boolean})],rn.prototype,"checked",2);co([a({attribute:"data-disabled",type:Boolean})],rn.prototype,"disabled",2);rn=co([p("pont-dropdown-menu-checkbox-item")],rn);const Al="closed";var Nb=Object.defineProperty,Mb=Object.getOwnPropertyDescriptor,Dl=(e,t,r,o)=>{for(var n=o>1?void 0:o?Mb(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&&Nb(t,r,n),n};let Mi=class extends ${constructor(){super(),this.state=Al,this.isOpen=!1,this.handleWindowChange=this.handleWindowChange.bind(this)}get _dropdownMenu(){let e=this.parentElement;for(;e&&!(e instanceof St);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=dropdown-menu-content]")}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.handleWindowChange),window.addEventListener("scroll",this.handleWindowChange,!0)}disconnectedCallback(){window.removeEventListener("resize",this.handleWindowChange),window.removeEventListener("scroll",this.handleWindowChange,!0),super.disconnectedCallback()}handleWindowChange(){this.isOpen&&requestAnimationFrame(()=>this.positionContent())}updated(e){super.updated(e),this.state==="open"?(this.isOpen=!0,requestAnimationFrame(()=>this.positionContent())):this.isOpen=!1}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}positionContent(){const e=this._dropdownMenu,t=this._containerElement,r=e==null?void 0:e._triggerElement;if(!e||!t||!r||!this.isOpen)return;const o=document.documentElement.clientWidth,n=document.documentElement.clientHeight,i=8,s=r.getBoundingClientRect();t.style.position="fixed",t.style.minWidth=`${Math.max(s.width,t.offsetWidth)}px`,t.style.maxWidth=`${Math.min(t.offsetWidth,o-i*2)}px`;let d=s.left,c=s.bottom;const u=t.getBoundingClientRect(),b=o-d>=u.width+i,_=s.right>=u.width+i,w=n-c>=u.height+i,y=s.top>=u.height+i;b||!_&&w?(t.style.left=`${d}px`,t.style.right="auto"):(t.style.left="auto",t.style.right=`${o-s.right}px`),w||!y&&b?(t.style.top=`${c}px`,t.style.bottom="auto"):(t.style.top="auto",t.style.bottom=`${n-s.top}px`),requestAnimationFrame(()=>{const P=t.getBoundingClientRect();if(P.right>o-i){const C=P.right-(o-i),O=parseFloat(t.style.left||"0");Number.isNaN(O)||(t.style.left=`${Math.max(0,O-C)}px`)}if(P.left<i){const C=i-P.left,O=parseFloat(t.style.left||"0");Number.isNaN(O)||(t.style.left=`${Math.max(0,O+C)}px`)}if(P.bottom>n-i){const C=P.bottom-(n-i),O=parseFloat(t.style.bottom||"0");Number.isNaN(O)||(t.style.bottom=`${Math.max(0,O+C)}px`)}if(P.top<i){const C=i-P.top,O=parseFloat(t.style.top||"0");Number.isNaN(O)||(t.style.top=`${Math.max(0,O+C)}px`)}})}render(){return l`
|
|
1237
1237
|
<div
|
|
1238
1238
|
data-slot="dropdown-menu-content"
|
|
1239
1239
|
part="dropdown-menu-content"
|
|
1240
1240
|
style="display: ${this.isOpen?"block":"none"};"
|
|
1241
|
-
class=${m(
|
|
1241
|
+
class=${m(Ft.content,this.className)}
|
|
1242
1242
|
></div>
|
|
1243
1243
|
`}};Dl([a({attribute:"data-state",type:String})],Mi.prototype,"state",2);Dl([g()],Mi.prototype,"isOpen",2);Mi=Dl([p("pont-dropdown-menu-content")],Mi);var Ub=Object.defineProperty,Bb=Object.getOwnPropertyDescriptor,os=(e,t,r,o)=>{for(var n=o>1?void 0:o?Bb(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&&Ub(t,r,n),n};let Mo=class extends ${constructor(){super(...arguments),this.heading="",this._id="",this._hidden=""}get _containerElement(){return this.querySelector("div[rtgcmd-group-items]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`${this._hidden==="true"?h:l`
|
|
1244
1244
|
<div
|
|
1245
1245
|
rtgcmd-group
|
|
1246
1246
|
part="dropdown-menu-group"
|
|
1247
1247
|
role="presentation"
|
|
1248
|
-
class=${m(
|
|
1248
|
+
class=${m(Ft.group,this.className)}
|
|
1249
1249
|
>
|
|
1250
|
-
<div rtgcmd-group-heading class=${m(
|
|
1250
|
+
<div rtgcmd-group-heading class=${m(Ft.label)}>
|
|
1251
1251
|
${this.heading}
|
|
1252
1252
|
</div>
|
|
1253
1253
|
|
|
1254
1254
|
<div rtgcmd-group-items role="group"></div>
|
|
1255
1255
|
</div>
|
|
1256
|
-
`}`}};os([a({type:String})],Mo.prototype,"heading",2);os([a({attribute:"id",type:String})],Mo.prototype,"_id",2);os([a({attribute:"aria-hidden",type:String})],Mo.prototype,"_hidden",2);Mo=os([p("pont-dropdown-menu-group")],Mo);var qb=Object.defineProperty,jb=Object.getOwnPropertyDescriptor,
|
|
1256
|
+
`}`}};os([a({type:String})],Mo.prototype,"heading",2);os([a({attribute:"id",type:String})],Mo.prototype,"_id",2);os([a({attribute:"aria-hidden",type:String})],Mo.prototype,"_hidden",2);Mo=os([p("pont-dropdown-menu-group")],Mo);var qb=Object.defineProperty,jb=Object.getOwnPropertyDescriptor,po=(e,t,r,o)=>{for(var n=o>1?void 0:o?jb(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&&qb(t,r,n),n};let nn=class extends ${constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1,this.disabled=!1}get _containerElement(){return this.querySelector("div[part=dropdown-menu-item]")}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}get _dropdownMenu(){let e=this.parentElement;for(;e&&!(e instanceof St);)e=e.parentElement;return e}handleMouseEvent(e){console.log(e,this.value),(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}handleClickDefault(){this._dropdownMenu.isOpen=!1}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l` ${this._hidden==="true"?h:l`
|
|
1257
1257
|
<div
|
|
1258
1258
|
rtgcmd-item
|
|
1259
1259
|
part="dropdown-menu-item"
|
|
@@ -1267,9 +1267,9 @@
|
|
|
1267
1267
|
@mouseleave="${this.handleMouseEvent}"
|
|
1268
1268
|
@focus="${this.handleMouseEvent}"
|
|
1269
1269
|
@click="${this.handleClickDefault}"
|
|
1270
|
-
class=${m(
|
|
1270
|
+
class=${m(Ft.item,this.className)}
|
|
1271
1271
|
></div>
|
|
1272
|
-
`}`}};
|
|
1272
|
+
`}`}};po([a({type:String})],nn.prototype,"_id",2);po([a({attribute:"aria-hidden",type:String})],nn.prototype,"_hidden",2);po([a({attribute:"data-value",type:String})],nn.prototype,"value",1);po([a({type:Boolean})],nn.prototype,"selected",2);po([a({attribute:"data-disabled",type:Boolean})],nn.prototype,"disabled",2);nn=po([p("pont-dropdown-menu-item")],nn);var zb=Object.defineProperty,Vb=Object.getOwnPropertyDescriptor,pn=(e,t,r,o)=>{for(var n=o>1?void 0:o?Vb(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&&zb(t,r,n),n};let Er=class extends ${constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1,this.checked=!1,this.disabled=!1}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}get _containerElement(){return this.querySelector("div[part=dropdown-menu-radio-item-container]")}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})))}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1273
1273
|
<div
|
|
1274
1274
|
rtgcmd-item
|
|
1275
1275
|
part="dropdown-menu-radio"
|
|
@@ -1284,9 +1284,9 @@
|
|
|
1284
1284
|
@mouseover="${this.handleMouseEvent}"
|
|
1285
1285
|
@mouseleave="${this.handleMouseEvent}"
|
|
1286
1286
|
@focus="${this.handleMouseEvent}"
|
|
1287
|
-
class=${m(
|
|
1287
|
+
class=${m(Ft.radioItem.base,this.className)}
|
|
1288
1288
|
>
|
|
1289
|
-
<span class=${m(
|
|
1289
|
+
<span class=${m(Ft.radioItem.span)}>
|
|
1290
1290
|
${this.checked?l`<svg
|
|
1291
1291
|
xmlns="http://www.w3.org/2000/svg"
|
|
1292
1292
|
width="24"
|
|
@@ -1297,28 +1297,28 @@
|
|
|
1297
1297
|
stroke-width="2"
|
|
1298
1298
|
stroke-linecap="round"
|
|
1299
1299
|
stroke-linejoin="round"
|
|
1300
|
-
class=${m(
|
|
1300
|
+
class=${m(Ft.radioItem.icon,"lucide lucide-circle-icon lucide-circle")}
|
|
1301
1301
|
>
|
|
1302
1302
|
<circle cx="12" cy="12" r="10" />
|
|
1303
1303
|
</svg>`:h}
|
|
1304
1304
|
</span>
|
|
1305
1305
|
<div part="dropdown-menu-radio-item-container"></div>
|
|
1306
1306
|
</div>
|
|
1307
|
-
`}};
|
|
1307
|
+
`}};pn([a({type:String})],Er.prototype,"_id",2);pn([a({attribute:"aria-hidden",type:String})],Er.prototype,"_hidden",2);pn([a({attribute:"data-value",type:String})],Er.prototype,"value",1);pn([a({type:Boolean})],Er.prototype,"selected",2);pn([a({type:Boolean})],Er.prototype,"checked",2);pn([a({attribute:"data-disabled",type:Boolean})],Er.prototype,"disabled",2);Er=pn([p("pont-dropdown-menu-radio-item")],Er);var Gb=Object.getOwnPropertyDescriptor,Hb=(e,t,r,o)=>{for(var n=o>1?void 0:o?Gb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let pc=class extends ${get _containerElement(){return this.querySelector("div[part=dropdown-menu-seperator]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`<div
|
|
1308
1308
|
rtgcmd-separator
|
|
1309
1309
|
part="dropdown-menu-seperator"
|
|
1310
1310
|
role="separator"
|
|
1311
|
-
class=${m(
|
|
1312
|
-
></div>`}};pc=Hb([p("pont-dropdown-menu-separator")],pc);var Kb=Object.getOwnPropertyDescriptor,Wb=(e,t,r,o)=>{for(var n=o>1?void 0:o?Kb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let hc=class extends ${get _containerElement(){return this.querySelector("span[part=dropdown-menu-shortcut]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this.classList=m(
|
|
1311
|
+
class=${m(Ft.separator,this.className)}
|
|
1312
|
+
></div>`}};pc=Hb([p("pont-dropdown-menu-separator")],pc);var Kb=Object.getOwnPropertyDescriptor,Wb=(e,t,r,o)=>{for(var n=o>1?void 0:o?Kb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let hc=class extends ${get _containerElement(){return this.querySelector("span[part=dropdown-menu-shortcut]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this.classList=m(Ft.shortcut),this}render(){return l`
|
|
1313
1313
|
<span
|
|
1314
1314
|
part="dropdown-menu-shortcut"
|
|
1315
|
-
class=${m(
|
|
1315
|
+
class=${m(Ft.shortcut,this.className)}
|
|
1316
1316
|
>
|
|
1317
1317
|
</span>
|
|
1318
1318
|
`}};hc=Wb([p("pont-dropdown-menu-shortcut")],hc);var Yb=Object.getOwnPropertyDescriptor,Qb=(e,t,r,o)=>{for(var n=o>1?void 0:o?Yb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let uc=class extends v{createRenderRoot(){return this}render(){return l``}};uc=Qb([p("pont-dropdown-menu-trigger")],uc);var Jb=Object.defineProperty,Xb=Object.getOwnPropertyDescriptor,Vh=(e,t,r,o)=>{for(var n=o>1?void 0:o?Xb(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&&Jb(t,r,n),n};let St=class extends ${constructor(){super(...arguments),this.isOpen=!1,this.handleClickOutside=e=>{var r,o;const t=e.target;!((r=this._containerElement)!=null&&r.contains(t))&&!((o=this._triggerElement)!=null&&o.contains(t))&&(this.isOpen=!1,St._openInstance===this&&(St._openInstance=null))}}get _triggerElement(){return this.querySelector("pont-dropdown-menu-trigger")}get _containerElement(){return this.querySelector("div[part=dropdown-menu]")}get _content(){return this.querySelector("pont-dropdown-menu-content")}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside),this.addEventListener("radio-selected",this._handleRadioSelected)}toggleDropdown(e){e.stopPropagation();const t=this.isOpen;this.isOpen=!this.isOpen,this.isOpen?(St._openInstance&&St._openInstance!==this&&(St._openInstance.isOpen=!1),St._openInstance=this):t&&St._openInstance===this&&(St._openInstance=null)}disconnectedCallback(){St._openInstance===this&&(St._openInstance=null),document.removeEventListener("click",this.handleClickOutside),super.disconnectedCallback()}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.isOpen?"open":"close")}firstUpdated(e){var t;this.moveLightDomChildrenInto(this._containerElement),(t=this._triggerElement)==null||t.addEventListener("click",r=>this.toggleDropdown(r))}_handleRadioSelected(e){this.isOpen=!1,this.querySelectorAll("pont-dropdown-menu-radio-item").forEach(t=>{t!==e.target&&(t.checked=!1)})}createRenderRoot(){return this}render(){return l`
|
|
1319
1319
|
<div
|
|
1320
1320
|
part="dropdown-menu"
|
|
1321
|
-
class=${m(
|
|
1321
|
+
class=${m(Ft.root,this.className)}
|
|
1322
1322
|
></div>
|
|
1323
1323
|
`}};St._openInstance=null;Vh([g()],St.prototype,"isOpen",2);St=Vh([p("pont-dropdown-menu")],St);var Zb=Object.defineProperty,t_=Object.getOwnPropertyDescriptor,Gh=(e,t,r,o)=>{for(var n=o>1?void 0:o?t_(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&&Zb(t,r,n),n};let Da=class extends v{createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="empty"]')}firstUpdated(){const e=this._rootSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="empty" ?data-border="${this.border}"></div>`}};Gh([a({type:Boolean})],Da.prototype,"border",2);Da=Gh([p("pont-empty")],Da);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 mc=class extends v{createRenderRoot(){return this}get _contentSlot(){return this.querySelector('[data-slot="empty-content"]')}firstUpdated(){const e=this._contentSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="empty-content"></div>`}};mc=r_([p("pont-empty-content")],mc);var n_=Object.getOwnPropertyDescriptor,o_=(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 fc=class extends v{createRenderRoot(){return this}get _descriptionSlot(){return this.querySelector('[data-slot="empty-description"]')}firstUpdated(){const e=this._descriptionSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="empty-description"></div>`}};fc=o_([p("pont-empty-description")],fc);var i_=Object.getOwnPropertyDescriptor,s_=(e,t,r,o)=>{for(var n=o>1?void 0:o?i_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let gc=class extends v{createRenderRoot(){return this}get _headerSlot(){return this.querySelector('[data-slot="empty-header"]')}firstUpdated(){const e=this._headerSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="empty-header"></div>`}};gc=s_([p("pont-empty-header")],gc);var a_=Object.defineProperty,l_=Object.getOwnPropertyDescriptor,Hh=(e,t,r,o)=>{for(var n=o>1?void 0:o?l_(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&&a_(t,r,n),n};let La=class extends v{constructor(){super(...arguments),this.variant="default"}createRenderRoot(){return this}get _mediaSlot(){return this.querySelector('[data-slot="empty-media"]')}firstUpdated(){const e=this._mediaSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`
|
|
1324
1324
|
<div data-slot="empty-media" data-variant="${this.variant}"></div>
|
|
@@ -1396,10 +1396,10 @@
|
|
|
1396
1396
|
part="form-description"
|
|
1397
1397
|
class="${m(N_,this.className)}"
|
|
1398
1398
|
></p>
|
|
1399
|
-
`}};eu([at({context:tu})],qa.prototype,"itemContext",2);qa=eu([p("pont-form-description")],qa);const G_="pont-form-field-context";var H_=Object.defineProperty,K_=Object.getOwnPropertyDescriptor,
|
|
1399
|
+
`}};eu([at({context:tu})],qa.prototype,"itemContext",2);qa=eu([p("pont-form-description")],qa);const G_="pont-form-field-context";var H_=Object.defineProperty,K_=Object.getOwnPropertyDescriptor,ho=(e,t,r,o)=>{for(var n=o>1?void 0:o?K_(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&&H_(t,r,n),n};let nr=class extends ${constructor(){super(...arguments),this.name="",this.validators=[],this.defaultValue="",this.fieldName="",this.registered=!1}createRenderRoot(){return this}get _container(){return this.querySelector("div[part=form-field]")}updated(){var t;if(this.registered||!this.form||!this.name)return;this.form.registerField({name:this.name,validator:r=>{for(const o of this.validators??[]){const n=o(r);if(n)return n}return null},defaultValue:this.defaultValue}),this.registered=!0,this.moveLightDomChildrenInto(this._container);const e=(t=this._container)==null?void 0:t.querySelector("pont-input, input, textarea, select");e&&(e.value=this.defaultValue??"",this.form.setValue(this.name,this.defaultValue??""),e.addEventListener("input",()=>{this.form.setValue(this.name,e.value)}))}disconnectedCallback(){var e;super.disconnectedCallback(),this.isConnected||(e=this.form)==null||e.unregisterField(this.name)}render(){return l`<div
|
|
1400
1400
|
part="form-field"
|
|
1401
1401
|
class="${m(M_,this.className)}"
|
|
1402
|
-
></div>`}};
|
|
1402
|
+
></div>`}};ho([at({context:Yo})],nr.prototype,"form",2);ho([a({type:String})],nr.prototype,"name",2);ho([a({type:Array})],nr.prototype,"validators",2);ho([a({type:String})],nr.prototype,"defaultValue",2);ho([Zt({context:G_})],nr.prototype,"fieldName",2);nr=ho([p("pont-form-field")],nr);var W_=Object.defineProperty,Y_=Object.getOwnPropertyDescriptor,ru=(e,t,r,o)=>{for(var n=o>1?void 0:o?Y_(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 ja=class extends ${constructor(){super(...arguments),this._generatedId=crypto.randomUUID(),this.itemContext={id:this._generatedId}}createRenderRoot(){return this}get _container(){return this.querySelector("div[part=form-item]")}firstUpdated(){this.moveLightDomChildrenInto(this._container)}render(){return l`<div
|
|
1403
1403
|
part="form-item"
|
|
1404
1404
|
class="${m(U_,this.className)}"
|
|
1405
1405
|
></div>`}};ru([Zt({context:tu})],ja.prototype,"itemContext",2);ja=ru([p("pont-form-item")],ja);var Q_=Object.defineProperty,J_=Object.getOwnPropertyDescriptor,Ll=(e,t,r,o)=>{for(var n=o>1?void 0:o?J_(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&&Q_(t,r,n),n};let Ui=class extends ${constructor(){super(...arguments),this.hasError=!1,this.unsubscribe=null}get _field(){let e=this.parentElement;for(;e&&!(e instanceof nr);)e=e.parentElement;return e}createRenderRoot(){return this}get _label(){return this.querySelector("label[part=form-label]")}firstUpdated(){this.moveLightDomChildrenInto(this._label)}connectedCallback(){super.connectedCallback();const e=this._field.name;this.hasError=!!this.form.getError(e),this.unsubscribe=this.form.subscribe(()=>{const t=this.form.getError(e);this.hasError=!!t,this.requestUpdate()})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe&&this.unsubscribe()}render(){return l`
|
|
@@ -1599,7 +1599,7 @@
|
|
|
1599
1599
|
/>
|
|
1600
1600
|
</div>
|
|
1601
1601
|
</div>
|
|
1602
|
-
`}};U.ROOT="input-otp";U.CONTAINER=`${U.ROOT}-container`;U.WRAPPER=`${U.ROOT}-wrapper`;U.INPUT=`${U.ROOT}-input`;U.CARET=`${U.ROOT}-caret`;U.CARET_WRAPPER=`${U.CARET}-wrapper`;U.TAG=`${j}-${U.ROOT}`;ut([a({type:String})],U.prototype,"autocomplete",2);ut([a({attribute:"default-value",type:String})],U.prototype,"defaultValue",2);ut([a({type:Boolean})],U.prototype,"disabled",2);ut([a({type:String})],U.prototype,"form",2);ut([a({type:String})],U.prototype,"id",2);ut([a({type:String})],U.prototype,"inputmode",2);ut([a({type:Number})],U.prototype,"maxlength",2);ut([a({type:String})],U.prototype,"name",2);ut([a({type:String})],U.prototype,"pattern",2);ut([a({type:Boolean})],U.prototype,"required",2);ut([a({type:String})],U.prototype,"value",2);ut([a({attribute:!1})],U.prototype,"onChange",2);ut([a({attribute:!1})],U.prototype,"onComplete",2);ut([a({attribute:!1})],U.prototype,"onBlur",2);ut([a({attribute:!1})],U.prototype,"onFocus",2);ut([a({attribute:!1})],U.prototype,"onPaste",2);ut([a({attribute:!1})],U.prototype,"pasteTransformer",2);ut([g()],U.prototype,"_activeSlot",2);ut([g()],U.prototype,"_hasFocus",2);ut([g()],U.prototype,"_value",2);U=ut([p("pont-input-otp")],U);var Ty=Object.getOwnPropertyDescriptor,Ay=(e,t,r,o)=>{for(var n=o>1?void 0:o?Ty(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let
|
|
1602
|
+
`}};U.ROOT="input-otp";U.CONTAINER=`${U.ROOT}-container`;U.WRAPPER=`${U.ROOT}-wrapper`;U.INPUT=`${U.ROOT}-input`;U.CARET=`${U.ROOT}-caret`;U.CARET_WRAPPER=`${U.CARET}-wrapper`;U.TAG=`${j}-${U.ROOT}`;ut([a({type:String})],U.prototype,"autocomplete",2);ut([a({attribute:"default-value",type:String})],U.prototype,"defaultValue",2);ut([a({type:Boolean})],U.prototype,"disabled",2);ut([a({type:String})],U.prototype,"form",2);ut([a({type:String})],U.prototype,"id",2);ut([a({type:String})],U.prototype,"inputmode",2);ut([a({type:Number})],U.prototype,"maxlength",2);ut([a({type:String})],U.prototype,"name",2);ut([a({type:String})],U.prototype,"pattern",2);ut([a({type:Boolean})],U.prototype,"required",2);ut([a({type:String})],U.prototype,"value",2);ut([a({attribute:!1})],U.prototype,"onChange",2);ut([a({attribute:!1})],U.prototype,"onComplete",2);ut([a({attribute:!1})],U.prototype,"onBlur",2);ut([a({attribute:!1})],U.prototype,"onFocus",2);ut([a({attribute:!1})],U.prototype,"onPaste",2);ut([a({attribute:!1})],U.prototype,"pasteTransformer",2);ut([g()],U.prototype,"_activeSlot",2);ut([g()],U.prototype,"_hasFocus",2);ut([g()],U.prototype,"_value",2);U=ut([p("pont-input-otp")],U);var Ty=Object.getOwnPropertyDescriptor,Ay=(e,t,r,o)=>{for(var n=o>1?void 0:o?Ty(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Kn=class extends v{createRenderRoot(){return this}get _slot(){return this.querySelector(`[data-${Kn.TAG}]`)}firstUpdated(){const e=this._slot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-pont-input-otp-group></div>`}};Kn.ROOT=`${U.ROOT}-group`;Kn.TAG=`${j}-${Kn.ROOT}`;Kn=Ay([p("pont-input-otp-group")],Kn);var Dy=Object.getOwnPropertyDescriptor,Ly=(e,t,r,o)=>{for(var n=o>1?void 0:o?Dy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let on=class extends v{createRenderRoot(){return this}render(){return l`
|
|
1603
1603
|
<div data-pont-input-otp-separator role="separator">
|
|
1604
1604
|
<svg
|
|
1605
1605
|
data-pont-input-otp-separator-icon
|
|
@@ -1615,13 +1615,13 @@
|
|
|
1615
1615
|
<path d="M5 12h14" />
|
|
1616
1616
|
</svg>
|
|
1617
1617
|
</div>
|
|
1618
|
-
`}};
|
|
1618
|
+
`}};on.ROOT=`${U.ROOT}-separator`;on.ICON=`${on.ROOT}-icon`;on.TAG=`${j}-${on.ROOT}`;on=Ly([p("pont-input-otp-separator")],on);var ky=Object.defineProperty,Fy=Object.getOwnPropertyDescriptor,Bl=(e,t,r,o)=>{for(var n=o>1?void 0:o?Fy(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&&ky(t,r,n),n};let de=class extends v{constructor(){super(...arguments),this._handleClick=()=>{this.dispatchEvent(new CustomEvent(de.FOCUS_EVENT,{detail:{index:this.index},bubbles:!0}))}}createRenderRoot(){return this}get _slot(){return this.querySelector(`[data-${de.TAG}]`)}render(){const e=this.invalid||this.ariaInvalid==="true";return l`
|
|
1619
1619
|
<div
|
|
1620
1620
|
data-pont-input-otp-slot
|
|
1621
1621
|
aria-invalid=${e?"true":h}
|
|
1622
1622
|
@click=${this._handleClick}
|
|
1623
1623
|
></div>
|
|
1624
|
-
`}};de.ROOT=`${U.ROOT}-slot`;de.TAG=`${j}-${de.ROOT}`;de.FOCUS_EVENT=`${de.TAG}:focus`;Bl([a({type:Number})],de.prototype,"index",2);Bl([a({type:Boolean})],de.prototype,"invalid",2);de=Bl([p("pont-input-otp-slot")],de);var Ny=Object.defineProperty,My=Object.getOwnPropertyDescriptor,Qo=(e,t,r,o)=>{for(var n=o>1?void 0:o?My(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&&Ny(t,r,n),n};let
|
|
1624
|
+
`}};de.ROOT=`${U.ROOT}-slot`;de.TAG=`${j}-${de.ROOT}`;de.FOCUS_EVENT=`${de.TAG}:focus`;Bl([a({type:Number})],de.prototype,"index",2);Bl([a({type:Boolean})],de.prototype,"invalid",2);de=Bl([p("pont-input-otp-slot")],de);var Ny=Object.defineProperty,My=Object.getOwnPropertyDescriptor,Qo=(e,t,r,o)=>{for(var n=o>1?void 0:o?My(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&&Ny(t,r,n),n};let Wn=class extends v{constructor(){super(...arguments),this.variant="default",this.size="default"}createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="item"]')}firstUpdated(){const e=this._rootSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return this.href?l`
|
|
1625
1625
|
<a
|
|
1626
1626
|
data-pont-item
|
|
1627
1627
|
data-slot="item"
|
|
@@ -1637,7 +1637,7 @@
|
|
|
1637
1637
|
data-variant="${this.variant}"
|
|
1638
1638
|
data-size="${this.size}"
|
|
1639
1639
|
></div>
|
|
1640
|
-
`}};Qo([a({type:String})],
|
|
1640
|
+
`}};Qo([a({type:String})],Wn.prototype,"variant",2);Qo([a({type:String})],Wn.prototype,"size",2);Qo([a({type:String})],Wn.prototype,"href",2);Qo([a({type:String})],Wn.prototype,"target",2);Wn=Qo([p("pont-item")],Wn);var Uy=Object.getOwnPropertyDescriptor,By=(e,t,r,o)=>{for(var n=o>1?void 0:o?Uy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let xc=class extends v{createRenderRoot(){return this}get _actionsSlot(){return this.querySelector('[data-slot="item-actions"]')}firstUpdated(){const e=this._actionsSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-pont-item-actions data-slot="item-actions"></div>`}};xc=By([p("pont-item-actions")],xc);var qy=Object.getOwnPropertyDescriptor,jy=(e,t,r,o)=>{for(var n=o>1?void 0:o?qy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Oc=class extends v{createRenderRoot(){return this}get _contentSlot(){return this.querySelector('[data-slot="item-content"]')}firstUpdated(){const e=this._contentSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-pont-item-content data-slot="item-content"></div>`}};Oc=jy([p("pont-item-content")],Oc);var zy=Object.getOwnPropertyDescriptor,Vy=(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 Rc=class extends v{createRenderRoot(){return this}get _descriptionSlot(){return this.querySelector('[data-slot="item-description"]')}firstUpdated(){const e=this._descriptionSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`
|
|
1641
1641
|
<p data-pont-item-description data-slot="item-description"></p>
|
|
1642
1642
|
`}};Rc=Vy([p("pont-item-description")],Rc);var Gy=Object.getOwnPropertyDescriptor,Hy=(e,t,r,o)=>{for(var n=o>1?void 0:o?Gy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Ic=class extends v{createRenderRoot(){return this}get _footerSlot(){return this.querySelector('[data-slot="item-footer"]')}firstUpdated(){const e=this._footerSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-pont-item-footer data-slot="item-footer"></div>`}};Ic=Hy([p("pont-item-footer")],Ic);var Ky=Object.getOwnPropertyDescriptor,Wy=(e,t,r,o)=>{for(var n=o>1?void 0:o?Ky(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Tc=class extends v{createRenderRoot(){return this}get _groupSlot(){return this.querySelector('[data-slot="item-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`
|
|
1643
1643
|
<div data-pont-item-group data-slot="item-group" role="list"></div>
|
|
@@ -1653,7 +1653,7 @@
|
|
|
1653
1653
|
data-slot="item-separator"
|
|
1654
1654
|
orientation="horizontal"
|
|
1655
1655
|
></pont-separator>
|
|
1656
|
-
`}};Dc=tw([p("pont-item-separator")],Dc);var ew=Object.getOwnPropertyDescriptor,rw=(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=s(n)||n);return n};let Lc=class extends v{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-pont-item-title data-slot="item-title"></div>`}};Lc=rw([p("pont-item-title")],Lc);var nw=Object.getOwnPropertyDescriptor,ow=(e,t,r,o)=>{for(var n=o>1?void 0:o?nw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let kc=class extends v{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>`}};kc=ow([p("pont-kbd")],kc);var iw=Object.getOwnPropertyDescriptor,sw=(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=s(n)||n);return n};let Fc=class extends v{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>`}};Fc=sw([p("pont-kbd-group")],Fc);const Ot={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 aw=Object.defineProperty,lw=Object.getOwnPropertyDescriptor,
|
|
1656
|
+
`}};Dc=tw([p("pont-item-separator")],Dc);var ew=Object.getOwnPropertyDescriptor,rw=(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=s(n)||n);return n};let Lc=class extends v{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-pont-item-title data-slot="item-title"></div>`}};Lc=rw([p("pont-item-title")],Lc);var nw=Object.getOwnPropertyDescriptor,ow=(e,t,r,o)=>{for(var n=o>1?void 0:o?nw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let kc=class extends v{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>`}};kc=ow([p("pont-kbd")],kc);var iw=Object.getOwnPropertyDescriptor,sw=(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=s(n)||n);return n};let Fc=class extends v{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>`}};Fc=sw([p("pont-kbd-group")],Fc);const Ot={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 aw=Object.defineProperty,lw=Object.getOwnPropertyDescriptor,hn=(e,t,r,o)=>{for(var n=o>1?void 0:o?lw(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&&aw(t,r,n),n};let ce=class extends ${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${ce._counter++}`:this._id=`rtgcmdrxgxli${ce._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`
|
|
1657
1657
|
<div
|
|
1658
1658
|
part="menubar-checkbox-item"
|
|
1659
1659
|
class=${m(Ot.checkboxItem.base,this.disabled&&"pont-opacity-menubar-item-opacity-disabled pont-pointer-events-none",this.className)}
|
|
@@ -1688,7 +1688,7 @@
|
|
|
1688
1688
|
`:h}
|
|
1689
1689
|
</span>
|
|
1690
1690
|
</div>
|
|
1691
|
-
`}};ce._counter=0;
|
|
1691
|
+
`}};ce._counter=0;hn([a({type:String})],ce.prototype,"_id",2);hn([a({attribute:"aria-hidden",type:String})],ce.prototype,"_hidden",2);hn([a({attribute:"data-value",type:String})],ce.prototype,"value",1);hn([a({type:Boolean})],ce.prototype,"selected",2);hn([a({type:Boolean})],ce.prototype,"checked",2);hn([a({type:Boolean})],ce.prototype,"disabled",2);ce=hn([p("pont-menubar-checkbox-item")],ce);var dw=Object.defineProperty,cw=Object.getOwnPropertyDescriptor,uo=(e,t,r,o)=>{for(var n=o>1?void 0:o?cw(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&&dw(t,r,n),n};let Sr=class extends ${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`
|
|
1692
1692
|
<div class=${m(Ot.menu,this.className)}>
|
|
1693
1693
|
<div
|
|
1694
1694
|
id="${this.id}"
|
|
@@ -1707,7 +1707,7 @@
|
|
|
1707
1707
|
|
|
1708
1708
|
<div part="menubar-menu-slot"></div>
|
|
1709
1709
|
</div>
|
|
1710
|
-
`}};
|
|
1710
|
+
`}};uo([g()],Sr.prototype,"isOpen",2);uo([g()],Sr.prototype,"uniqueIds",2);uo([g()],Sr.prototype,"selectedMenu",2);uo([g()],Sr.prototype,"isHovering",2);uo([a({type:String})],Sr.prototype,"id",2);Sr=uo([p("pont-menubar-menu")],Sr);var pw=Object.defineProperty,hw=Object.getOwnPropertyDescriptor,Jo=(e,t,r,o)=>{for(var n=o>1?void 0:o?hw(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&&pw(t,r,n),n};let Yn=class extends ${constructor(){super(...arguments),this.state=Al,this.id="",this.side="bottom",this.isOpen=!1}get _menubarMenu(){let e=this.parentElement;for(;e&&!(e instanceof Sr);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=menubar-content]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){requestAnimationFrame(()=>{this.moveLightDomChildrenInto(this._containerElement)})}connectedCallback(){super.connectedCallback(),this.isOpen&&document.addEventListener("mousedown",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}updated(e){super.updated(e),this.state==="open"?this.isOpen=!0:this.isOpen=!1,e.has("isOpen")&&(this.isOpen?document.addEventListener("mousedown",this.handleClickOutside):document.removeEventListener("mousedown",this.handleClickOutside))}handleClickOutside(e){const t=this.querySelector("button");this&&!this.contains(e.target)&&!(t!=null&&t.contains(e.target))&&(this.isOpen=!1)}render(){return l`
|
|
1711
1711
|
<div
|
|
1712
1712
|
class=${m(Ot.content,this.className)}
|
|
1713
1713
|
id="${this.id}"
|
|
@@ -1721,7 +1721,7 @@
|
|
|
1721
1721
|
dir="ltr"
|
|
1722
1722
|
style="display: ${this.isOpen?"block":"none"};"
|
|
1723
1723
|
></div>
|
|
1724
|
-
`}};Jo([a({attribute:"data-state",type:String})],
|
|
1724
|
+
`}};Jo([a({attribute:"data-state",type:String})],Yn.prototype,"state",2);Jo([a({type:String})],Yn.prototype,"id",2);Jo([a({type:String})],Yn.prototype,"side",2);Jo([g()],Yn.prototype,"isOpen",2);Yn=Jo([p("pont-menubar-content")],Yn);var uw=Object.defineProperty,mw=Object.getOwnPropertyDescriptor,ss=(e,t,r,o)=>{for(var n=o>1?void 0:o?mw(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&&uw(t,r,n),n};let xr=class extends ${constructor(){super(...arguments),this.heading="",this._id="",this._hidden=""}get _containerElement(){return this.querySelector("div[part=menubar-group-slot]")}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-list]");return e?this._id=`${e.getAttribute("id")}g${xr._counter++}`:this._id=`rtgcmdrxlxg${xr._counter++}`,this._id}render(){return l`${this._hidden==="true"?h:l`
|
|
1725
1725
|
<div
|
|
1726
1726
|
class=${m(Ot.group,this.className)}
|
|
1727
1727
|
id="${this.identifier}"
|
|
@@ -1742,7 +1742,7 @@
|
|
|
1742
1742
|
aria-labelledby="${this.identifier}h"
|
|
1743
1743
|
></div>
|
|
1744
1744
|
</div>
|
|
1745
|
-
`}`}};xr._counter=0;ss([a({type:String})],xr.prototype,"heading",2);ss([a({attribute:"id",type:String})],xr.prototype,"_id",2);ss([a({attribute:"aria-hidden",type:String})],xr.prototype,"_hidden",2);xr=ss([p("pont-menubar-group")],xr);var fw=Object.defineProperty,gw=Object.getOwnPropertyDescriptor,
|
|
1745
|
+
`}`}};xr._counter=0;ss([a({type:String})],xr.prototype,"heading",2);ss([a({attribute:"id",type:String})],xr.prototype,"_id",2);ss([a({attribute:"aria-hidden",type:String})],xr.prototype,"_hidden",2);xr=ss([p("pont-menubar-group")],xr);var fw=Object.defineProperty,gw=Object.getOwnPropertyDescriptor,mo=(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&&fw(t,r,n),n};let ke=class extends ${constructor(){super(...arguments),this._id="",this._hidden="",this.disabled=!1,this.selected=!1}get _containerElement(){return this.querySelector("div[part=menubar-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${ke._counter++}`:this._id=`rtgcmdrxgxli${ke._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)}render(){return l` ${this._hidden==="true"?h:l`
|
|
1746
1746
|
<div
|
|
1747
1747
|
part="menubar-item"
|
|
1748
1748
|
class=${m(Ot.item,this.disabled&&"pont-opacity-menubar-item-opacity-disabled pont-pointer-events-none",this.className)}
|
|
@@ -1756,7 +1756,7 @@
|
|
|
1756
1756
|
id="${this.identifier}"
|
|
1757
1757
|
aria-hidden="${this.hidden}"
|
|
1758
1758
|
></div>
|
|
1759
|
-
`}`}};ke._counter=0;
|
|
1759
|
+
`}`}};ke._counter=0;mo([a({type:String})],ke.prototype,"_id",2);mo([a({attribute:"aria-hidden",type:String})],ke.prototype,"_hidden",2);mo([a({type:Boolean})],ke.prototype,"disabled",2);mo([a({attribute:"data-value",type:String})],ke.prototype,"value",1);mo([a({type:Boolean})],ke.prototype,"selected",2);ke=mo([p("pont-menubar-item")],ke);var vw=Object.defineProperty,bw=Object.getOwnPropertyDescriptor,un=(e,t,r,o)=>{for(var n=o>1?void 0:o?bw(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&&vw(t,r,n),n};let pe=class extends ${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${pe._counter++}`:this._id=`rtgcmdrxgxli${pe._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`
|
|
1760
1760
|
<div
|
|
1761
1761
|
part="menubar-radio-item"
|
|
1762
1762
|
class=${m(Ot.radioItem.base,this.disabled&&"pont-opacity-menubar-item-opacity-disabled pont-pointer-events-none",this.className)}
|
|
@@ -1789,7 +1789,7 @@
|
|
|
1789
1789
|
</svg>`:h}
|
|
1790
1790
|
</span>
|
|
1791
1791
|
</div>
|
|
1792
|
-
`}};pe._counter=0;
|
|
1792
|
+
`}};pe._counter=0;un([a({type:String})],pe.prototype,"_id",2);un([a({attribute:"aria-hidden",type:String})],pe.prototype,"_hidden",2);un([a({attribute:"data-value",type:String})],pe.prototype,"value",1);un([a({type:Boolean})],pe.prototype,"selected",2);un([a({type:Boolean})],pe.prototype,"checked",2);un([a({type:Boolean})],pe.prototype,"disabled",2);pe=un([p("pont-menubar-radio-item")],pe);var _w=Object.defineProperty,yw=Object.getOwnPropertyDescriptor,ql=(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&&_w(t,r,n),n};let sn=class extends ${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${sn._counter++}`:this._id=`rtgcmdrxlxs${sn._counter++}`,this._id}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`${this._hidden==="true"?h:l`
|
|
1793
1793
|
<div
|
|
1794
1794
|
class=${m(Ot.separator,this.className)}
|
|
1795
1795
|
id="${this.identifier}"
|
|
@@ -1797,7 +1797,7 @@
|
|
|
1797
1797
|
part="menubar-separator"
|
|
1798
1798
|
rtgcmd-separator
|
|
1799
1799
|
></div>
|
|
1800
|
-
`}`}};
|
|
1800
|
+
`}`}};sn._counter=0;ql([a({type:String})],sn.prototype,"_id",2);ql([a({attribute:"aria-hidden",type:String})],sn.prototype,"_hidden",2);sn=ql([p("pont-menubar-separator")],sn);var ww=Object.getOwnPropertyDescriptor,$w=(e,t,r,o)=>{for(var n=o>1?void 0:o?ww(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Nc=class extends ${get _containerElement(){return this.querySelector("span[part=menubar-shortcut]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this.classList=m(Ot.shortcut),this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1801
1801
|
<span
|
|
1802
1802
|
class=${m(Ot.shortcut,this.className)}
|
|
1803
1803
|
part="menubar-shortcut"
|
|
@@ -1818,17 +1818,17 @@
|
|
|
1818
1818
|
tabindex="0"
|
|
1819
1819
|
data-orientation="horizontal"
|
|
1820
1820
|
></div>
|
|
1821
|
-
`}};Uc=Sw([p("pont-menubar")],Uc);const
|
|
1821
|
+
`}};Uc=Sw([p("pont-menubar")],Uc);const an={content:["pont-absolute","pont-top-navigation-menu-content-space-top","pont-flex","pont-justify-center"],menu:["pont-relative","pont-z-10","pont-flex","pont-max-w-navigation-menu-space-max-w","pont-flex-1","pont-items-center","pont-justify-center"],menuList:["pont-flex","pont-flex-1","pont-list-none","pont-items-center","pont-justify-center","pont-space-x-navigation-menu-list-space-x","group"],menuItem:["pont-flex","pont-cursor-pointer","pont-items-center","pont-rounded-navigation-menu-item-radius","pont-bg-navigation-menu-item-color-bg","pont-py-navigation-menu-list-space-py","pont-px-navigation-menu-list-space-px","hover:pont-bg-navigation-menu-item-color-bg-hover"],menuItemIcon:["lucide","lucide-chevron-down","pont-relative","pont-ml-navigation-menu-item-icon-space-ml","pont-h-navigation-menu-item-icon-space-h","pont-w-navigation-menu-item-icon-space-w","pont-transition-transform","pont-duration-navigation-menu-item-icon-motion-duration"],link:["pont-flex","pont-h-navigation-menu-link-space-h","pont-bg-navigation-menu-link-color-bg","hover:pont-bg-navigation-menu-link-color-bg-hover","pont-rounded-navigation-menu-link-radius","pont-px-navigation-menu-link-space-px","pont-py-navigation-menu-link-space-py","pont-w-navigation-menu-link-space-w","pont-select-none","pont-flex-col","pont-justify-end","pont-no-underline","pont-outline-none"],contentContainer:["pont-bg-navigation-menu-content-container-color-bg","origin-top-center","pont-relative","pont-mt-navigation-menu-content-container-space-mt","pont-w-navigation-menu-content-container-space-w","pont-overflow-hidden","pont-rounded-navigation-menu-content-container-radius","pont-border-navigation-menu-content-container-width-border","pont-border-navigation-menu-content-container-color-border","pont-navigation-menu-content-container-shadow"]};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 Bc=class extends ${get _containerElement(){return this.querySelector("ul[part=navigation-menu-list]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1822
1822
|
<div class="${m("relative",this.className)}">
|
|
1823
1823
|
<ul
|
|
1824
1824
|
part="navigation-menu-list"
|
|
1825
1825
|
data-orientation="horizontal"
|
|
1826
|
-
class=${m(
|
|
1826
|
+
class=${m(an.menuList)}
|
|
1827
1827
|
dir="ltr"
|
|
1828
1828
|
></ul>
|
|
1829
1829
|
<div></div>
|
|
1830
1830
|
</div>
|
|
1831
|
-
`}};Bc=Ow([p("pont-navigation-menu-list")],Bc);var Rw=Object.defineProperty,Iw=Object.getOwnPropertyDescriptor,
|
|
1831
|
+
`}};Bc=Ow([p("pont-navigation-menu-list")],Bc);var Rw=Object.defineProperty,Iw=Object.getOwnPropertyDescriptor,fo=(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 Or=class extends ${constructor(){super(...arguments),this.value="",this.navigationLink=!0,this.isOpen=!1,this.uniqueIds=[],this.isHovering=!1,this.handleClickOutside=e=>{const t=e.target;this.contains(t)||(this.isOpen=!1)}}raiseEvent(){const e=new CustomEvent("unique-ids-generated",{detail:{ids:this.uniqueIds},bubbles:!0,composed:!0});this.dispatchEvent(e)}firstUpdated(){this.moveLightDomChildrenInto(this.querySelector("div[part=content-slot]"),[this._content]),this.moveLightDomChildrenInto(this.querySelector("div[part=button-slot]"),[this._button])}closeAllMenus(){document.querySelectorAll("pont-navigation-menu-item").forEach(t=>{t.isOpen=!1,t.isHovering=!1})}toggleMenubar(e){e.stopPropagation(),document.querySelectorAll("pont-navigation-menu-item").forEach(r=>{r!==this&&(r.isOpen=!1)}),this.isOpen=!this.isOpen}get _content(){return this.querySelector("pont-navigation-menu-content")}get _button(){return this.querySelector("pont-navigation-menu-trigger")}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.isOpen?"open":"close")}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),super.disconnectedCallback()}handleHover(){this.closeAllMenus(),this.isHovering||(this.isHovering=!0,this.isOpen=!0)}handleMouseLeave(){this.isHovering=!1,this.isOpen=!1}createRenderRoot(){return this}render(){return l`
|
|
1832
1832
|
<li
|
|
1833
1833
|
@mouseenter="${this.handleHover}"
|
|
1834
1834
|
@mouseleave="${this.handleMouseLeave}"
|
|
@@ -1836,7 +1836,7 @@
|
|
|
1836
1836
|
class="${m("pont-relative",this.className)}"
|
|
1837
1837
|
>
|
|
1838
1838
|
${this.navigationLink?l`<div
|
|
1839
|
-
class=${m(
|
|
1839
|
+
class=${m(an.menuItem)}
|
|
1840
1840
|
@click="${this.toggleMenubar}"
|
|
1841
1841
|
>
|
|
1842
1842
|
<div part="button-slot"></div>
|
|
@@ -1850,7 +1850,7 @@
|
|
|
1850
1850
|
stroke-width="2"
|
|
1851
1851
|
stroke-linecap="round"
|
|
1852
1852
|
stroke-linejoin="round"
|
|
1853
|
-
class=${m(
|
|
1853
|
+
class=${m(an.menuItemIcon,this.isOpen?"pont-rotate-180":"")}
|
|
1854
1854
|
aria-hidden="true"
|
|
1855
1855
|
>
|
|
1856
1856
|
<path d="m6 9 6 6 6-6"></path>
|
|
@@ -1858,16 +1858,16 @@
|
|
|
1858
1858
|
</div>
|
|
1859
1859
|
<div part="content-slot" style="position:absolute"></div>`:""}
|
|
1860
1860
|
</li>
|
|
1861
|
-
`}};
|
|
1861
|
+
`}};fo([a({type:String})],Or.prototype,"value",2);fo([a({type:Boolean})],Or.prototype,"navigationLink",2);fo([g()],Or.prototype,"isOpen",2);fo([g()],Or.prototype,"uniqueIds",2);fo([g()],Or.prototype,"isHovering",2);Or=fo([p("pont-navigation-menu-item")],Or);var Tw=Object.defineProperty,Aw=Object.getOwnPropertyDescriptor,Xo=(e,t,r,o)=>{for(var n=o>1?void 0:o?Aw(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&&Tw(t,r,n),n};let Qn=class extends ${constructor(){super(...arguments),this.state="close",this.id="",this.side="bottom",this.isOpen=!0}get _menubarMenu(){let e=this.parentElement;for(;e&&!(e instanceof Or);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=navigation-menu-content-container]")}getAttributesToExclude(){return["data-testid"]}connectedCallback(){super.connectedCallback(),this.isOpen&&document.addEventListener("mousedown",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}updated(e){super.updated(e),this.state==="open"?this.isOpen=!0:this.isOpen=!1,e.has("isOpen")&&(this.isOpen?document.addEventListener("mousedown",this.handleClickOutside):document.removeEventListener("mousedown",this.handleClickOutside))}handleClickOutside(e){const t=this.querySelector("button");this&&!this.contains(e.target)&&!(t!=null&&t.contains(e.target))&&(this.isOpen=!1)}createRenderRoot(){return this}firstUpdated(e){requestAnimationFrame(()=>{this.moveLightDomChildrenInto(this._containerElement)})}render(){return l`
|
|
1862
1862
|
<div
|
|
1863
|
-
class="${m(
|
|
1863
|
+
class="${m(an.content,this.className)}"
|
|
1864
1864
|
style="display: ${this.isOpen?"block":"none"};top:0px;left:0px;"
|
|
1865
1865
|
part="navigation-menu-content"
|
|
1866
1866
|
>
|
|
1867
1867
|
<div
|
|
1868
1868
|
data-state="${this.isOpen}"
|
|
1869
1869
|
data-orientation="horizontal"
|
|
1870
|
-
class="${m(
|
|
1870
|
+
class="${m(an.contentContainer,this.className)}"
|
|
1871
1871
|
>
|
|
1872
1872
|
<div
|
|
1873
1873
|
id="${this.id}"
|
|
@@ -1878,10 +1878,10 @@
|
|
|
1878
1878
|
></div>
|
|
1879
1879
|
</div>
|
|
1880
1880
|
</div>
|
|
1881
|
-
`}};Xo([a({attribute:"data-state",type:String})],
|
|
1881
|
+
`}};Xo([a({attribute:"data-state",type:String})],Qn.prototype,"state",2);Xo([a({type:String})],Qn.prototype,"id",2);Xo([a({type:String})],Qn.prototype,"side",2);Xo([g()],Qn.prototype,"isOpen",2);Qn=Xo([p("pont-navigation-menu-content")],Qn);var Dw=Object.defineProperty,Lw=Object.getOwnPropertyDescriptor,iu=(e,t,r,o)=>{for(var n=o>1?void 0:o?Lw(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&&Dw(t,r,n),n};let Ga=class extends ${constructor(){super(...arguments),this.href="/"}get _containerElement(){return this.querySelector("a[part=navigation-menu-link]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1882
1882
|
<a
|
|
1883
1883
|
part="navigation-menu-link"
|
|
1884
|
-
class="${m(
|
|
1884
|
+
class="${m(an.link,this.className)}"
|
|
1885
1885
|
href="${this.href}"
|
|
1886
1886
|
data-radix-collection-item=""
|
|
1887
1887
|
data-tabindex=""
|
|
@@ -1896,7 +1896,7 @@
|
|
|
1896
1896
|
aria-label="Main"
|
|
1897
1897
|
data-orientation="horizontal"
|
|
1898
1898
|
dir="ltr"
|
|
1899
|
-
class="${m(
|
|
1899
|
+
class="${m(an.menu,this.className)}"
|
|
1900
1900
|
></nav>
|
|
1901
1901
|
`}};jc=Mw([p("pont-navigation-menu")],jc);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:[""],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 Uw=Object.getOwnPropertyDescriptor,Bw=(e,t,r,o)=>{for(var n=o>1?void 0:o?Uw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let zc=class extends ${get _containerElement(){return this.querySelector("ul[part=pagination-content]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1902
1902
|
<ul
|
|
@@ -1930,7 +1930,7 @@
|
|
|
1930
1930
|
|
|
1931
1931
|
<span class=${m(Re.ellipsis.span)}>More pages</span>
|
|
1932
1932
|
</span>
|
|
1933
|
-
`}};Vc=jw([p("pont-pagination-ellipsis")],Vc);var zw=Object.defineProperty,Vw=Object.getOwnPropertyDescriptor,Zo=(e,t,r,o)=>{for(var n=o>1?void 0:o?Vw(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&&zw(t,r,n),n};let
|
|
1933
|
+
`}};Vc=jw([p("pont-pagination-ellipsis")],Vc);var zw=Object.defineProperty,Vw=Object.getOwnPropertyDescriptor,Zo=(e,t,r,o)=>{for(var n=o>1?void 0:o?Vw(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&&zw(t,r,n),n};let ln=class extends ${constructor(){super(...arguments),this.state="close",this.isActive=!1,this.size="icon",this.href="javascript:void(0)"}get _containerElement(){return this.querySelector("[data-pont-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`
|
|
1934
1934
|
<pont-button
|
|
1935
1935
|
data-pont-pagination-link
|
|
1936
1936
|
id="${this.id}"
|
|
@@ -1942,7 +1942,7 @@
|
|
|
1942
1942
|
size=${this.size??h}
|
|
1943
1943
|
href="${this.href}"
|
|
1944
1944
|
></pont-button>
|
|
1945
|
-
`}};Zo([a({attribute:"data-state",type:String})],
|
|
1945
|
+
`}};Zo([a({attribute:"data-state",type:String})],ln.prototype,"state",2);Zo([a({type:Boolean})],ln.prototype,"isActive",2);Zo([a({type:String})],ln.prototype,"size",2);Zo([a({type:String})],ln.prototype,"href",2);ln=Zo([p("pont-pagination-link")],ln);var Gw=Object.defineProperty,Hw=Object.getOwnPropertyDescriptor,jl=(e,t,r,o)=>{for(var n=o>1?void 0:o?Hw(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&&Gw(t,r,n),n};let Vi=class extends ${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 ln)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`
|
|
1946
1946
|
<li
|
|
1947
1947
|
data-slot="pagination-item"
|
|
1948
1948
|
part="pagination-item"
|
|
@@ -2009,7 +2009,7 @@
|
|
|
2009
2009
|
part="pagination"
|
|
2010
2010
|
class=${m(Re.root,this.className)}
|
|
2011
2011
|
></nav>
|
|
2012
|
-
`}};Gc=Xw([p("pont-pagination")],Gc);const Zw={connection_failed:"We couldn't reach the server. Check your connection and try again.",too_many_attempts:"Too many attempts. Try again later.",server_error:"Something went wrong on our side. Please try again.",generic_error:"Something went wrong. Please try again.",flow_ended:"This sign-in could not be completed.",passkey_cancelled:"The passkey request was cancelled or timed out. Please try again.",start_again:"Start again",continued_elsewhere_title:"You continued in another tab",continued_elsewhere_subtitle:"You can close this one.",continue_here:"Continue here instead",show_password:"Show password",hide_password:"Hide password",loading:"Loading",account_settings:"Account settings",log_out:"Log out",tab_profile:"Profile",tab_security:"Security",not_added:"Not added",field_email:"Email",field_phone:"Phone number",field_photo:"Photo",field_photo_url:"Photo URL",avatar_alt:"Avatar",change_photo:"Change photo",login_info:"Login info",personal_info:"Personal info",location_section:"Location",links_section:"Links",field_username:"Username",field_first_name:"First name",field_middle_name:"Middle name",field_last_name:"Last name",field_nickname:"Nickname",field_gender:"Gender",field_bio:"Bio",field_location:"Location",field_timezone:"Time zone",field_website:"Website",select_gender:"Select gender",gender_male:"Male",gender_female:"Female",gender_other:"Other",select_timezone:"Select a time zone",timezone_hint:"Choose a time zone from the list.",username_hint:"Use 3 to 30 characters: letters, numbers, dots, underscores or hyphens.",url_hint:"Enter a full URL, including https://",url_scheme_invalid:"Only http:// and https:// addresses are allowed.",action_save:"Save",action_saving:"Saving",action_cancel:"Cancel",action_edit:"Edit",action_submit:"Submit",action_submitting:"Submitting",photo_update_failed:"We couldn't update your photo. Please try again.",personal_update_failed:"We couldn't update your personal information. Please try again.",location_update_failed:"We couldn't update your location. Please try again.",website_update_failed:"We couldn't update your website. Please try again.",security_title:"Security settings",security_coming_soon:"Advanced security features are coming soon. Manage your passwords, two-factor authentication, active sessions and more in future updates.",security_loading:"Loading security settings…",select_organization:"Select organization",organization_switch_failed:"You can't switch to that organization.",member_management_title:"Member management",member_management_subtitle:"Manage who belongs to this organization, their roles and invitations.",tab_members:"Members",tab_invitations:"Invitations",members_unavailable:"This app can't manage organization members.",members_forbidden:"You don't have permission to manage this organization's members.",members_load_failed:"We couldn't load this organization's members. Please try again.",members_no_organization:"Choose an organization to manage its members.",action_retry:"Try again",action_refresh:"Refresh",search_members:"Search members",search_invitations:"Search invitations",search_roles:"Search roles",field_roles:"Roles",all_roles:"All roles",clear_filters:"Clear filters",column_name:"Name",column_joined:"Joined",column_invited_by:"Invited by",column_sent:"Sent",column_expires:"Expires",members_empty:"No members found.",invitations_empty:"No pending invitations.",rows_per_page:"Rows per page",actions_menu:"Actions",unknown_user:"Unknown user",manage_roles:"Manage roles",manage_roles_subtitle:"Choose the roles this member has in the organization.",roles_locked_hint:"Roles you can't assign or remove are locked.",roles_required:"Choose at least one role.",update_roles_failed:"We couldn't update this member's roles. Please try again.",self_role_change:"You can't change your own roles.",role_ceiling:"You can only assign or remove roles whose permissions you have yourself.",member_roles_changed:"This member's roles changed while you were editing. Review them and try again.",remove_member:"Remove member",remove_member_confirm:"Remove this member from the organization?",remove_member_warning:"They lose access to the organization immediately and need a new invitation to rejoin.",remove_member_failed:"We couldn't remove this member. Please try again.",resend_invitation:"Resend invitation",resend_invitation_confirm:"Send this invitation again?",resend_invitation_failed:"We couldn't resend this invitation. Please try again.",revoke_invitation:"Revoke invitation",revoke_invitation_confirm:"Revoke this invitation?",revoke_invitation_warning:"The invitation link stops working and can no longer be used to join.",revoke_invitation_failed:"We couldn't revoke this invitation. Please try again.",invite_members:"Invite members",invite_members_subtitle:"Invite people to this organization by email.",invite_emails_label:"Email addresses",invite_emails_placeholder:"Type or paste email addresses",invite_emails_required:"Enter at least one email address.",invite_roles_hint:"The roles people will have when they join.",invite_message_label:"Personal message (optional)",invite_message_placeholder:"Add a note to the invitation email",send_invitations:"Send invitations",sending_invitations:"Sending",invite_failed:"We couldn't send the invitations. Please try again."};let Wa={},lu;const Ya=new Set;function du(e,t){!e||Object.keys(e).length===0||(Wa={...Wa,...e},t&&(lu=t),Ya.forEach(r=>r()))}function Gi(){return lu}function t$(e){return Ya.add(e),()=>Ya.delete(e)}function f(e){var r;return((r=Wa[e])==null?void 0:r.trim())||Zw[e]}class Mt{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=t$(()=>this.host.requestUpdate())}hostDisconnected(){var t;(t=this.unsubscribe)==null||t.call(this)}}async function e$(e,t){const r=t?`?locales=${encodeURIComponent(t)}`:"",o=`${e}/auth/v1/widget-messages${r}`;if(o!==ci){ci=o;try{const n=await fetch(o,{credentials:"omit"});if(!n.ok){ci=void 0;return}const i=await n.json();du(i.messages,i.locale)}catch{ci=void 0}}}let ci;var r$=Object.defineProperty,n$=Object.getOwnPropertyDescriptor,bt=(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=(o?s(t,r,n):s(n))||n);return o&&n&&r$(t,r,n),n};let ht=class extends v{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`
|
|
2012
|
+
`}};Gc=Xw([p("pont-pagination")],Gc);const Zw={connection_failed:"We couldn't reach the server. Check your connection and try again.",too_many_attempts:"Too many attempts. Try again later.",server_error:"Something went wrong on our side. Please try again.",generic_error:"Something went wrong. Please try again.",flow_ended:"This sign-in could not be completed.",passkey_cancelled:"The passkey request was cancelled or timed out. Please try again.",start_again:"Start again",continued_elsewhere_title:"You continued in another tab",continued_elsewhere_subtitle:"You can close this one.",continue_here:"Continue here instead",show_password:"Show password",hide_password:"Hide password",loading:"Loading",account_settings:"Account settings",log_out:"Log out",tab_profile:"Profile",tab_security:"Security",not_added:"Not added",field_email:"Email",field_phone:"Phone number",field_photo:"Photo",field_photo_url:"Photo URL",avatar_alt:"Avatar",change_photo:"Change photo",login_info:"Login info",personal_info:"Personal info",location_section:"Location",links_section:"Links",field_username:"Username",field_first_name:"First name",field_middle_name:"Middle name",field_last_name:"Last name",field_nickname:"Nickname",field_gender:"Gender",field_bio:"Bio",field_location:"Location",field_timezone:"Time zone",field_website:"Website",select_gender:"Select gender",gender_male:"Male",gender_female:"Female",gender_other:"Other",select_timezone:"Select a time zone",timezone_hint:"Choose a time zone from the list.",username_hint:"Use 3 to 30 characters: letters, numbers, dots, underscores or hyphens.",url_hint:"Enter a full URL, including https://",url_scheme_invalid:"Only http:// and https:// addresses are allowed.",action_save:"Save",action_saving:"Saving",action_cancel:"Cancel",action_edit:"Edit",action_submit:"Submit",action_submitting:"Submitting",photo_update_failed:"We couldn't update your photo. Please try again.",personal_update_failed:"We couldn't update your personal information. Please try again.",location_update_failed:"We couldn't update your location. Please try again.",website_update_failed:"We couldn't update your website. Please try again.",security_title:"Security settings",security_coming_soon:"Advanced security features are coming soon. Manage your passwords, two-factor authentication, active sessions and more in future updates.",security_loading:"Loading security settings…",select_organization:"Select organization",organization_switch_failed:"You can't switch to that organization.",member_management_title:"Member management",member_management_subtitle:"Manage who belongs to this organization, their roles and invitations.",tab_members:"Members",tab_invitations:"Invitations",members_unavailable:"This app can't manage organization members.",members_forbidden:"You don't have permission to manage this organization's members.",members_load_failed:"We couldn't load this organization's members. Please try again.",members_no_organization:"Choose an organization to manage its members.",action_retry:"Try again",action_refresh:"Refresh",search_members:"Search members",search_invitations:"Search invitations",search_roles:"Search roles",field_roles:"Roles",all_roles:"All roles",clear_filters:"Clear filters",column_name:"Name",column_joined:"Joined",column_invited_by:"Invited by",column_sent:"Sent",column_expires:"Expires",members_empty:"No members found.",invitations_empty:"No pending invitations.",rows_per_page:"Rows per page",actions_menu:"Actions",unknown_user:"Unknown user",manage_roles:"Manage roles",manage_roles_subtitle:"Choose the roles this member has in the organization.",roles_locked_hint:"Roles you can't assign or remove are locked.",roles_required:"Choose at least one role.",update_roles_failed:"We couldn't update this member's roles. Please try again.",self_role_change:"You can't change your own roles.",role_ceiling:"You can only assign or remove roles whose permissions you have yourself.",member_roles_changed:"This member's roles changed while you were editing. Review them and try again.",owner_transfer_required:"Only someone who can transfer ownership can give, change or remove the owner role.",leave_disabled:"This organization doesn't let members leave. Ask an administrator to remove you.",member_change_refused:"You can't make this change.",remove_member:"Remove member",remove_member_confirm:"Remove this member from the organization?",remove_member_warning:"They lose access to the organization immediately and need a new invitation to rejoin.",remove_member_failed:"We couldn't remove this member. Please try again.",resend_invitation:"Resend invitation",resend_invitation_confirm:"Send this invitation again?",resend_invitation_failed:"We couldn't resend this invitation. Please try again.",revoke_invitation:"Revoke invitation",revoke_invitation_confirm:"Revoke this invitation?",revoke_invitation_warning:"The invitation link stops working and can no longer be used to join.",revoke_invitation_failed:"We couldn't revoke this invitation. Please try again.",invite_members:"Invite members",invite_members_subtitle:"Invite people to this organization by email.",invite_emails_label:"Email addresses",invite_emails_placeholder:"Type or paste email addresses",invite_emails_required:"Enter at least one email address.",invite_roles_hint:"The roles people will have when they join.",invite_message_label:"Personal message (optional)",invite_message_placeholder:"Add a note to the invitation email",send_invitations:"Send invitations",sending_invitations:"Sending",invite_failed:"We couldn't send the invitations. Please try again."};let Wa={},lu;const Ya=new Set;function du(e,t){!e||Object.keys(e).length===0||(Wa={...Wa,...e},t&&(lu=t),Ya.forEach(r=>r()))}function Gi(){return lu}function t$(e){return Ya.add(e),()=>Ya.delete(e)}function f(e){var r;return((r=Wa[e])==null?void 0:r.trim())||Zw[e]}class Mt{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=t$(()=>this.host.requestUpdate())}hostDisconnected(){var t;(t=this.unsubscribe)==null||t.call(this)}}async function e$(e,t){const r=t?`?locales=${encodeURIComponent(t)}`:"",o=`${e}/auth/v1/widget-messages${r}`;if(o!==ci){ci=o;try{const n=await fetch(o,{credentials:"omit"});if(!n.ok){ci=void 0;return}const i=await n.json();du(i.messages,i.locale)}catch{ci=void 0}}}let ci;var r$=Object.defineProperty,n$=Object.getOwnPropertyDescriptor,bt=(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=(o?s(t,r,n):s(n))||n);return o&&n&&r$(t,r,n),n};let ht=class extends v{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`
|
|
2013
2013
|
<svg
|
|
2014
2014
|
data-slot="password-input-icon"
|
|
2015
2015
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -2127,7 +2127,7 @@
|
|
|
2127
2127
|
* @license
|
|
2128
2128
|
* Copyright 2020 Google LLC
|
|
2129
2129
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2130
|
-
*/const l$=Ar(class extends
|
|
2130
|
+
*/const l$=Ar(class extends ro{constructor(e){if(super(e),e.type!==$e.PROPERTY&&e.type!==$e.ATTRIBUTE&&e.type!==$e.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!wh(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===Vt||t===h)return t;const r=e.element,o=e.name;if(e.type===$e.PROPERTY){if(t===r[o])return Vt}else if(e.type===$e.BOOLEAN_ATTRIBUTE){if(!!t===r.hasAttribute(o))return Vt}else if(e.type===$e.ATTRIBUTE&&r.getAttribute(o)===t+"")return Vt;return yl(e),t}});var d$=Object.defineProperty,c$=Object.getOwnPropertyDescriptor,mn=(e,t,r,o)=>{for(var n=o>1?void 0:o?c$(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&&d$(t,r,n),n};let he=class extends v{constructor(){super(...arguments),this.value="",this._formDisabled=!1,this._group=null,this._internals=this.attachInternals(),this._handleClick=()=>{this.isDisabled||this.isReadonly||!this._group||this._group.select(this.value)},this._handleKeydown=e=>{e.target===this&&e.key===" "&&e.preventDefault()},this._handleKeyup=e=>{e.target===this&&e.key===" "&&(e.preventDefault(),this.click())}}createRenderRoot(){return this}get group(){return this._group}get checked(){return!!this._group&&this._group.currentValue===this.value}get isDisabled(){var e;return!!this.disabled||this._formDisabled||!!((e=this._group)!=null&&e.isDisabled)}get isReadonly(){var e;return!!this.readonly||!!((e=this._group)!=null&&e.readonly)}get isRequired(){var e;return!!this.required||!!((e=this._group)!=null&&e.required)}get isInvalid(){var e;return!!this.invalid||!!((e=this._group)!=null&&e.isInvalid)}get state(){return this.checked?"checked":"unchecked"}connectedCallback(){var e;super.connectedCallback(),this._internals.role="radio",this._group=this.closest(he.GROUP_TAG),(e=this._group)==null||e.requestUpdate(),this.addEventListener("click",this._handleClick),this.addEventListener("keydown",this._handleKeydown),this.addEventListener("keyup",this._handleKeyup)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._group)==null||e.requestUpdate(),this._group=null,this.removeEventListener("click",this._handleClick),this.removeEventListener("keydown",this._handleKeydown),this.removeEventListener("keyup",this._handleKeyup)}updated(e){var t;this._syncHostState(),(e.has("value")||e.has("disabled"))&&((t=this._group)==null||t.requestUpdate())}formDisabledCallback(e){var t;this._formDisabled=e,(t=this._group)==null||t.requestUpdate()}_syncHostState(){const e=this._internals;e.ariaChecked=this.checked?"true":"false",e.ariaDisabled=this.isDisabled?"true":null,e.ariaInvalid=this.isInvalid?"true":null,this.isDisabled?this.removeAttribute("tabindex"):this.tabIndex=!this._group||this._group.tabStop===this?0:-1}_renderIndicator(){if(!this.checked)return h;const e=this.state,t=this._group,r=this.isReadonly,o=this.isRequired,n=this.isInvalid;return l`
|
|
2131
2131
|
<span
|
|
2132
2132
|
data-pont-radio-group-indicator
|
|
2133
2133
|
data-state=${e}
|
|
@@ -2175,7 +2175,7 @@
|
|
|
2175
2175
|
</span>
|
|
2176
2176
|
|
|
2177
2177
|
${this._renderInput()}
|
|
2178
|
-
`}};he.formAssociated=!0;he.GROUP_TAG="pont-radio-group";
|
|
2178
|
+
`}};he.formAssociated=!0;he.GROUP_TAG="pont-radio-group";mn([a({type:String})],he.prototype,"value",2);mn([a({type:Boolean})],he.prototype,"disabled",2);mn([a({type:Boolean})],he.prototype,"readonly",2);mn([a({type:Boolean})],he.prototype,"required",2);mn([a({type:Boolean})],he.prototype,"invalid",2);mn([g()],he.prototype,"_formDisabled",2);he=mn([p("pont-radio-group-item")],he);const p$=["pont-relative","pont-border pont-border-scrollarea-color-border","pont-bg-scrollarea-color-bg"];var h$=Object.defineProperty,u$=Object.getOwnPropertyDescriptor,pu=(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&&h$(t,r,n),n};let Ja=class extends ${createRenderRoot(){return this}firstUpdated(){this.moveLightDomChildrenInto(this.viewportEl)}render(){return l`
|
|
2179
2179
|
<div
|
|
2180
2180
|
dir="ltr"
|
|
2181
2181
|
data-slot="scroll-area"
|
|
@@ -2222,7 +2222,7 @@
|
|
|
2222
2222
|
* @license
|
|
2223
2223
|
* Copyright 2018 Google LLC
|
|
2224
2224
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2225
|
-
*/const hu="important",v$=" !"+hu,b$=Ar(class extends
|
|
2225
|
+
*/const hu="important",v$=" !"+hu,b$=Ar(class extends ro{constructor(e){var t;if(super(e),e.type!==$e.ATTRIBUTE||e.name!=="style"||((t=e.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,r)=>{const o=e[r];return o==null?t:t+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}update(e,[t]){const{style:r}=e.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const o of this.ft)t[o]==null&&(this.ft.delete(o),o.includes("-")?r.removeProperty(o):r[o]=null);for(const o in t){const n=t[o];if(n!=null){this.ft.add(o);const i=typeof n=="string"&&n.endsWith(v$);o.includes("-")||i?r.setProperty(o,i?n.slice(0,-11):n,i?hu:""):r[o]=n}}return Vt}});var _$=Object.defineProperty,y$=Object.getOwnPropertyDescriptor,Vl=(e,t,r,o)=>{for(var n=o>1?void 0:o?y$(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&&_$(t,r,n),n};let Hi=class extends ${constructor(){super(...arguments),this.focusedIndex=0,this._dropdownStyle={display:"none",top:"0px",left:"0px",minWidth:"128px"},this.childrenArray=[],this._handleScrollResize=()=>{this._select.selectStore.isOpen&&this._updateDropdownPosition()},this.onStoreChange=()=>{const e=this._containerElement;e&&(e.style.display=this._select.selectStore.isOpen?"block":"none"),this._select.selectStore.isOpen?(requestAnimationFrame(()=>{this._updateDropdownPosition()}),window.addEventListener("scroll",this._handleScrollResize,!0),window.addEventListener("resize",this._handleScrollResize)):(window.removeEventListener("scroll",this._handleScrollResize,!0),window.removeEventListener("resize",this._handleScrollResize),this._dropdownStyle={...this._dropdownStyle,display:"none"}),this._select.selectStore.isOpen&&this._select.selectStore.selectedValue&&(this.focusedIndex=this.childrenArray.findIndex(t=>t.value===this._select.selectStore.selectedValue)),this.updateFocusedItem(),this.requestUpdate()},this.handleKeyDown=e=>{var t;if(this._select.selectStore.isOpen)switch(e.preventDefault(),e.key){case"ArrowDown":this.focusedIndex=(this.focusedIndex+1)%this.childrenArray.length,this.updateFocusedItem();break;case"ArrowUp":this.focusedIndex=(this.focusedIndex-1+this.childrenArray.length)%this.childrenArray.length,this.updateFocusedItem();break;case"Enter":const r=this.childrenArray[this.focusedIndex],o=r.value,n=((t=r.textContent)==null?void 0:t.trim())||"";this._select.selectStore.select(o,n);break}}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof Rr);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this.onStoreChange),document.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){this._select.selectStore.unsubscribe(this.onStoreChange),document.removeEventListener("keydown",this.handleKeyDown),window.removeEventListener("scroll",this._handleScrollResize,!0),window.removeEventListener("resize",this._handleScrollResize),super.disconnectedCallback()}getTriggerButton(){const e=this._select;return e?e.querySelector("button[part=select-trigger]"):null}_updateDropdownPosition(){const e=this.getTriggerButton();if(!e)return;const t=e.getBoundingClientRect(),r=Math.max(128,t.width);this._dropdownStyle={display:this._select.selectStore.isOpen?"block":"none",top:`${t.bottom}px`,left:`${t.left}px`,minWidth:`${r}px`}}get _containerElement(){return this.querySelector("div[part=select-viewport]")}firstUpdated(){const e=Array.from(this.children).filter(t=>t.tagName.toLowerCase()==="pont-select-item");this.childrenArray=e,e.forEach((t,r)=>{t.tabIndex=r,t.selectItemIndex=r,t.isFocus=r===this.focusedIndex||t.value===this._select.selectStore.selectedValue,t.addEventListener("mouseover",o=>this.handleMouseOver(o,r))}),this.moveLightDomChildrenInto(this._containerElement),this._select.selectStore.isOpen&&requestAnimationFrame(()=>{this._updateDropdownPosition()})}updateFocusedItem(){this.childrenArray.forEach((e,t)=>{var r;e.isFocus=t===this.focusedIndex,(r=e.requestUpdate)==null||r.call(e)})}handleMouseOver(e,t){e.preventDefault(),this.focusedIndex=t}createRenderRoot(){return this}render(){return l`
|
|
2226
2226
|
<div
|
|
2227
2227
|
part="select-group"
|
|
2228
2228
|
data-slot="select-content"
|
|
@@ -2234,7 +2234,7 @@
|
|
|
2234
2234
|
class="${m(ae.content.viewport)}"
|
|
2235
2235
|
></div>
|
|
2236
2236
|
</div>
|
|
2237
|
-
`}};Vl([g()],Hi.prototype,"focusedIndex",2);Vl([g()],Hi.prototype,"_dropdownStyle",2);Hi=Vl([p("pont-select-group")],Hi);var w$=Object.defineProperty,$$=Object.getOwnPropertyDescriptor,
|
|
2237
|
+
`}};Vl([g()],Hi.prototype,"focusedIndex",2);Vl([g()],Hi.prototype,"_dropdownStyle",2);Hi=Vl([p("pont-select-group")],Hi);var w$=Object.defineProperty,$$=Object.getOwnPropertyDescriptor,fn=(e,t,r,o)=>{for(var n=o>1?void 0: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&&w$(t,r,n),n};let Ir=class extends ${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 Rr);)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`
|
|
2238
2238
|
<div
|
|
2239
2239
|
${Rt(e)}
|
|
2240
2240
|
part="select-item"
|
|
@@ -2268,7 +2268,7 @@
|
|
|
2268
2268
|
|
|
2269
2269
|
<div part="select-item-container"></div>
|
|
2270
2270
|
</div>
|
|
2271
|
-
`}};
|
|
2271
|
+
`}};fn([a()],Ir.prototype,"value",2);fn([a()],Ir.prototype,"isSelected",2);fn([a()],Ir.prototype,"isFocus",2);fn([a()],Ir.prototype,"selectItemIndex",2);fn([a({type:Function})],Ir.prototype,"onSelect",2);fn([a()],Ir.prototype,"class",2);Ir=fn([p("pont-select-item")],Ir);var P$=Object.getOwnPropertyDescriptor,C$=(e,t,r,o)=>{for(var n=o>1?void 0:o?P$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Kc=class extends ${get _containerElement(){return this.querySelector("div[part=select-label]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}render(){return l`
|
|
2272
2272
|
<div
|
|
2273
2273
|
part="select-label"
|
|
2274
2274
|
class=${m(ae.label,this.className)}
|
|
@@ -2323,7 +2323,7 @@
|
|
|
2323
2323
|
<span part="select-value" class=${m(ae.value,this.className)}>
|
|
2324
2324
|
${this.renderLabel()}
|
|
2325
2325
|
</span>
|
|
2326
|
-
`}};mu([a({type:String})],Za.prototype,"placeholder",2);Za=mu([p("pont-select-value")],Za);const D$="pont-bg-skeleton-color-bg pont-animate-skeleton-animate pont-rounded-skeleton-radius";var L$=Object.getOwnPropertyDescriptor,k$=(e,t,r,o)=>{for(var n=o>1?void 0:o?L$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Wc=class extends ${createRenderRoot(){return this}render(){return l` <div class=${m(D$,this.className)}></div> `}};Wc=k$([p("pont-skeleton")],Wc);const F$={circle:"circle"},Yc={variant:F$.circle},Qc={basic:{lucide:"loader",fragments:
|
|
2326
|
+
`}};mu([a({type:String})],Za.prototype,"placeholder",2);Za=mu([p("pont-select-value")],Za);const D$="pont-bg-skeleton-color-bg pont-animate-skeleton-animate pont-rounded-skeleton-radius";var L$=Object.getOwnPropertyDescriptor,k$=(e,t,r,o)=>{for(var n=o>1?void 0:o?L$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Wc=class extends ${createRenderRoot(){return this}render(){return l` <div class=${m(D$,this.className)}></div> `}};Wc=k$([p("pont-skeleton")],Wc);const F$={circle:"circle"},Yc={variant:F$.circle},Qc={basic:{lucide:"loader",fragments:G`
|
|
2327
2327
|
<path d="M12 2v4" />
|
|
2328
2328
|
<path d="m16.2 7.8 2.9-2.9" />
|
|
2329
2329
|
<path d="M18 12h4" />
|
|
@@ -2332,12 +2332,12 @@
|
|
|
2332
2332
|
<path d="m4.9 19.1 2.9-2.9" />
|
|
2333
2333
|
<path d="M2 12h4" />
|
|
2334
2334
|
<path d="m4.9 4.9 2.9 2.9" />
|
|
2335
|
-
`},pinwheel:{lucide:"loader-pinwheel",fragments:
|
|
2335
|
+
`},pinwheel:{lucide:"loader-pinwheel",fragments:G`
|
|
2336
2336
|
<path d="M22 12a1 1 0 0 1-10 0 1 1 0 0 0-10 0" />
|
|
2337
2337
|
<path d="M7 20.7a1 1 0 1 1 5-8.7 1 1 0 1 0 5-8.6" />
|
|
2338
2338
|
<path d="M7 3.3a1 1 0 1 1 5 8.6 1 1 0 1 0 5 8.6" />
|
|
2339
2339
|
<circle cx="12" cy="12" r="10" />
|
|
2340
|
-
`},circle:{lucide:"loader-circle",fragments:
|
|
2340
|
+
`},circle:{lucide:"loader-circle",fragments:G`<path d="M21 12a9 9 0 1 1-6.219-8.56" />`}};var N$=Object.defineProperty,M$=Object.getOwnPropertyDescriptor,fu=(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&&N$(t,r,n),n};let Jn=class extends v{constructor(){super(...arguments),this.variant=Yc.variant}createRenderRoot(){return this}render(){const e=Object.hasOwn(Qc,this.variant)?this.variant:Yc.variant,{lucide:t,fragments:r}=Qc[e];return l`
|
|
2341
2341
|
<svg
|
|
2342
2342
|
data-pont-spinner
|
|
2343
2343
|
data-variant=${e}
|
|
@@ -2354,7 +2354,7 @@
|
|
|
2354
2354
|
>
|
|
2355
2355
|
${r}
|
|
2356
2356
|
</svg>
|
|
2357
|
-
`}};
|
|
2357
|
+
`}};Jn.ROOT="spinner";Jn.TAG=`${j}-${Jn.ROOT}`;fu([a({type:String})],Jn.prototype,"variant",2);Jn=fu([p("pont-spinner")],Jn);var U$=Object.defineProperty,B$=Object.getOwnPropertyDescriptor,Wt=(e,t,r,o)=>{for(var n=o>1?void 0:o?B$(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 xt=class extends v{constructor(){super(...arguments),this.value="on",this._checked=!1,this._formDisabled=!1,this._dirty=!1,this._internals=this.attachInternals(),this._handleClick=()=>{if(this.isDisabled||this.readonly)return;const e=!this.isChecked;this.isControlled||(this._dirty=!0,this._checked=e),this.dispatchEvent(new CustomEvent(xt.CHECKED_CHANGE_EVENT,{detail:{checked:e},bubbles:!0,composed:!0})),this.onCheckedChange&&this.onCheckedChange(e)},this._handleKeydown=e=>{e.target===this&&(e.key===" "?e.preventDefault():e.key==="Enter"&&(e.preventDefault(),this.click()))},this._handleKeyup=e=>{e.target===this&&e.key===" "&&(e.preventDefault(),this.click())}}createRenderRoot(){return this}get isControlled(){return this.checked!==void 0}get isChecked(){return this.isControlled?!!this.checked:this._checked}get isDisabled(){return!!this.disabled||this._formDisabled}get isInvalid(){return!!this.invalid||this.ariaInvalid==="true"}get state(){return this.isChecked?"checked":"unchecked"}get form(){return this._internals.form}get validity(){return this._internals.validity}connectedCallback(){super.connectedCallback(),this._internals.role="switch",this.addEventListener("click",this._handleClick),this.addEventListener("keydown",this._handleKeydown),this.addEventListener("keyup",this._handleKeyup)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick),this.removeEventListener("keydown",this._handleKeydown),this.removeEventListener("keyup",this._handleKeyup)}willUpdate(e){e.has("defaultChecked")&&!this._dirty&&(this._checked=!!this.defaultChecked)}updated(){this._syncHostState(),this._syncFormState()}formResetCallback(){this._dirty=!1,this._checked=!!this.defaultChecked}formDisabledCallback(e){this._formDisabled=e}formStateRestoreCallback(e){this.isControlled||(this._dirty=!0,this._checked=e==="checked")}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}_syncHostState(){const e=this._internals;e.ariaChecked=this.isChecked?"true":"false",e.ariaDisabled=this.isDisabled?"true":null,e.ariaReadOnly=this.readonly?"true":null,e.ariaRequired=this.required?"true":null,e.ariaInvalid=this.isInvalid?"true":null,this.isDisabled?this.removeAttribute("tabindex"):this.hasAttribute("tabindex")||(this.tabIndex=0)}_syncFormState(){const e=this.isChecked,t=e?this.value:this.uncheckedValue??null;this._internals.setFormValue(t,this.state),this.required&&!e?this._internals.setValidity({valueMissing:!0},"Please turn on this switch if you want to proceed."):this._internals.setValidity({})}render(){const e=this.state;return l`
|
|
2358
2358
|
<span
|
|
2359
2359
|
data-pont-switch
|
|
2360
2360
|
data-state=${e}
|
|
@@ -2382,7 +2382,7 @@
|
|
|
2382
2382
|
?data-dirty=${this._dirty}
|
|
2383
2383
|
></span>
|
|
2384
2384
|
</span>
|
|
2385
|
-
`}};xt.formAssociated=!0;xt.CHECKED_CHANGE_EVENT="pont-switch:checked-change";
|
|
2385
|
+
`}};xt.formAssociated=!0;xt.CHECKED_CHANGE_EVENT="pont-switch:checked-change";Wt([a({attribute:"default-checked",type:Boolean})],xt.prototype,"defaultChecked",2);Wt([a({type:Boolean})],xt.prototype,"checked",2);Wt([a({attribute:!1})],xt.prototype,"onCheckedChange",2);Wt([a({type:Boolean})],xt.prototype,"disabled",2);Wt([a({type:Boolean})],xt.prototype,"readonly",2);Wt([a({type:Boolean})],xt.prototype,"required",2);Wt([a({type:Boolean})],xt.prototype,"invalid",2);Wt([a({type:String,reflect:!0})],xt.prototype,"name",2);Wt([a({type:String})],xt.prototype,"value",2);Wt([a({type:String,attribute:"unchecked-value"})],xt.prototype,"uncheckedValue",2);Wt([g()],xt.prototype,"_checked",2);Wt([g()],xt.prototype,"_formDisabled",2);xt=Wt([p("pont-switch")],xt);const Ct={preview:["pont-flex pont-bg-table-preview-color-bg pont-w-table-preview-space-w pont-items-center pont-justify-center pont-px-table-preview-space-px pont-py-table-preview-space-py"],container:["pont-relative pont-w-table-container-space-w pont-overflow-auto"],table:["pont-w-table-space-w pont-caption-bottom pont-text-table-font"],caption:["pont-mt-table-caption-space-mt pont-text-table-caption-font pont-text-table-caption-color-text"],head:{root:["[&_tr]:pont-border-table-head-color-border [&_tr]:pont-border-b-table-head-width-border"],row:["pont-border-b-table-head-width-border pont-border-table-head-color-border pont-transition-colors hover:pont-bg-table-head-row-color-bg-hover"],cell:{base:["pont-h-table-head-cell-space-h pont-px-table-head-cell-space-px pont-align-middle pont-font-table-head-cell-font-weight pont-text-table-head-cell-color-text"],align:{left:"pont-text-left",right:"pont-text-right"}}},body:{root:["[&_tr:last-child]:pont-border-0"],row:["pont-border-b-table-body-width-border pont-border-table-body-color-border pont-transition-colors hover:pont-bg-table-body-row-color-bg-hover"],cell:{base:["pont-px-table-body-cell-space-px pont-py-table-body-cell-space-py pont-align-middle"],align:{right:"pont-text-right"}}},footer:{root:["pont-border-t-table-footer-width-border pont-border-table-footer-color-border pont-bg-table-footer-color-bg pont-font-table-footer-font-weight [&>tr]:pont-last:border-b-0"],row:["pont-border-b-table-footer-width-border pont-border-table-footer-color-border pont-transition-colors hover:pont-bg-table-footer-row-color-bg-hover"],cell:{base:["pont-px-table-footer-cell-space-px pont-py-table-footer-cell-space-py pont-align-middle"],align:{right:"pont-text-right"}}}};var q$=Object.defineProperty,j$=Object.getOwnPropertyDescriptor,as=(e,t,r,o)=>{for(var n=o>1?void 0:o?j$(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&&q$(t,r,n),n};let Bo=class extends ${constructor(){super(...arguments),this.dataTable=[],this.footerData=[],this.captionText=""}get _containerElement(){return this.querySelector("table[part=table]")}getAttributesToExclude(){return["data-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}get columnKeys(){var t;const e=(t=this.dataTable)==null?void 0:t[0];return e?Object.keys(e).filter(r=>r!=="id"):[]}capitalizeLabel(e){return e.charAt(0).toUpperCase()+e.slice(1)}render(){const e=this.columnKeys;return l`
|
|
2386
2386
|
<div class=${m(Ct.preview)}>
|
|
2387
2387
|
<div class=${m(Ct.container)}>
|
|
2388
2388
|
<table part="table" class=${m(Ct.table)}>
|
|
@@ -2467,7 +2467,7 @@
|
|
|
2467
2467
|
tabindex="0"
|
|
2468
2468
|
hidden
|
|
2469
2469
|
></div>
|
|
2470
|
-
`}};vu([a({type:String})],el.prototype,"value",2);el=vu([p("pont-tabs-content")],el);const ti={viewportRoot:["pont-fixed pont-top-0 pont-z-[100] pont-flex pont-max-h-screen pont-w-toast-viewport-root-space-w pont-flex-col-reverse pont-px-toast-viewport-root-space-px pont-py-toast-viewport-root-space-py sm:pont-bottom-0 sm:pont-right-0 sm:pont-top-auto sm:pont-flex-col md:pont-max-w-toast-viewport-root-space-w-md"],viewportItem:{base:["group pont-pointer-events-auto pont-relative pont-flex pont-w-toast-viewport-item-space-w pont-items-center pont-justify-between pont-gap-toast-viewport-item-space-gap pont-overflow-hidden pont-rounded-toast-viewport-item-radius pont-px-toast-viewport-item-space-px pont-py-toast-viewport-item-space-py pont-shadow-toast-viewport-item-shadow pont-transition-all","data-[swipe=cancel]:pont-translate-x-0","data-[swipe=end]:pont-translate-x-[var(--radix-toast-swipe-end-x)]","data-[swipe=move]:pont-translate-x-[var(--radix-toast-swipe-move-x)]","data-[swipe=move]:pont-transition-none","data-[state=open]:pont-animate-toast-animate-in","data-[state=closed]:pont-animate-toast-animate-out","data-[swipe=end]:pont-animate-toast-animate-out","data-[state=closed]:pont-opacity-80","data-[state=open]:pont-translate-y-toast-viewport-item-translate-y-enter-desktop","data-[state=open]:sm:pont-translate-y-toast-viewport-item-translate-y-enter-mobile","data-[state=closed]:pont-translate-x-toast-viewport-item-translate-x-exit"],variants:{default:["pont-border pont-border-toast-viewport-default-color-border pont-bg-toast-viewport-default-color-bg pont-text-toast-viewport-default-color-text"],destructive:["pont-bg-toast-viewport-destructive-color-bg pont-text-toast-viewport-destructive-color-text"]}},action:{base:["pont-text-toast-action-font pont-font-toast-action-font-weight pont-text-toast-action-color-text","pont-h-toast-action-space-h pont-px-toast-action-space-px pont-py-toast-action-space-py","pont-inline-flex pont-border pont-border-toast-action-color-border pont-shrink-0 pont-items-center pont-justify-center pont-rounded-toast-action-radius pont-transition-colors","focus:pont-outline-none focus:pont-ring-toast-action-width-ring-focus focus:pont-ring-toast-action-color-ring-focus","disabled:pont-pointer-events-none disabled:pont-opacity-toast-action-opacity-disabled"],variants:{default:["pont-bg-toast-action-default-color-bg hover:pont-bg-toast-action-default-color-bg-hover"],destructive:["pont-bg-toast-action-destructive-color-bg hover:pont-bg-toast-action-destructive-color-bg-hover pont-text-toast-action-destructive-color-text focus:pont-ring-toast-action-destructive-color-ring-focus"]}},title:["pont-text-toast-title-font pont-font-toast-title-font-weight [&+div]:pont-text-toast-title-font"],description:["pont-text-toast-description-font pont-opacity-toast-description-opacity"]};var tP=Object.defineProperty,eP=Object.getOwnPropertyDescriptor,Wl=(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&&tP(t,r,n),n};const Jc="closed";let
|
|
2470
|
+
`}};vu([a({type:String})],el.prototype,"value",2);el=vu([p("pont-tabs-content")],el);const ti={viewportRoot:["pont-fixed pont-top-0 pont-z-[100] pont-flex pont-max-h-screen pont-w-toast-viewport-root-space-w pont-flex-col-reverse pont-px-toast-viewport-root-space-px pont-py-toast-viewport-root-space-py sm:pont-bottom-0 sm:pont-right-0 sm:pont-top-auto sm:pont-flex-col md:pont-max-w-toast-viewport-root-space-w-md"],viewportItem:{base:["group pont-pointer-events-auto pont-relative pont-flex pont-w-toast-viewport-item-space-w pont-items-center pont-justify-between pont-gap-toast-viewport-item-space-gap pont-overflow-hidden pont-rounded-toast-viewport-item-radius pont-px-toast-viewport-item-space-px pont-py-toast-viewport-item-space-py pont-shadow-toast-viewport-item-shadow pont-transition-all","data-[swipe=cancel]:pont-translate-x-0","data-[swipe=end]:pont-translate-x-[var(--radix-toast-swipe-end-x)]","data-[swipe=move]:pont-translate-x-[var(--radix-toast-swipe-move-x)]","data-[swipe=move]:pont-transition-none","data-[state=open]:pont-animate-toast-animate-in","data-[state=closed]:pont-animate-toast-animate-out","data-[swipe=end]:pont-animate-toast-animate-out","data-[state=closed]:pont-opacity-80","data-[state=open]:pont-translate-y-toast-viewport-item-translate-y-enter-desktop","data-[state=open]:sm:pont-translate-y-toast-viewport-item-translate-y-enter-mobile","data-[state=closed]:pont-translate-x-toast-viewport-item-translate-x-exit"],variants:{default:["pont-border pont-border-toast-viewport-default-color-border pont-bg-toast-viewport-default-color-bg pont-text-toast-viewport-default-color-text"],destructive:["pont-bg-toast-viewport-destructive-color-bg pont-text-toast-viewport-destructive-color-text"]}},action:{base:["pont-text-toast-action-font pont-font-toast-action-font-weight pont-text-toast-action-color-text","pont-h-toast-action-space-h pont-px-toast-action-space-px pont-py-toast-action-space-py","pont-inline-flex pont-border pont-border-toast-action-color-border pont-shrink-0 pont-items-center pont-justify-center pont-rounded-toast-action-radius pont-transition-colors","focus:pont-outline-none focus:pont-ring-toast-action-width-ring-focus focus:pont-ring-toast-action-color-ring-focus","disabled:pont-pointer-events-none disabled:pont-opacity-toast-action-opacity-disabled"],variants:{default:["pont-bg-toast-action-default-color-bg hover:pont-bg-toast-action-default-color-bg-hover"],destructive:["pont-bg-toast-action-destructive-color-bg hover:pont-bg-toast-action-destructive-color-bg-hover pont-text-toast-action-destructive-color-text focus:pont-ring-toast-action-destructive-color-ring-focus"]}},title:["pont-text-toast-title-font pont-font-toast-title-font-weight [&+div]:pont-text-toast-title-font"],description:["pont-text-toast-description-font pont-opacity-toast-description-opacity"]};var tP=Object.defineProperty,eP=Object.getOwnPropertyDescriptor,Wl=(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&&tP(t,r,n),n};const Jc="closed";let dn=class extends ${constructor(){super(...arguments),this.variant="default",this.state=Jc}get _containerElement(){return this.querySelector("li[part=toast-view-port-li]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l` <ol
|
|
2471
2471
|
part="toast-view-port"
|
|
2472
2472
|
tabindex="-1"
|
|
2473
2473
|
@click="${e=>e.stopPropagation()}"
|
|
@@ -2481,18 +2481,18 @@
|
|
|
2481
2481
|
tabindex="0"
|
|
2482
2482
|
data-state="${this.state}"
|
|
2483
2483
|
data-swipe-direction="right"
|
|
2484
|
-
class="${m(
|
|
2484
|
+
class="${m(dn.toastVariants.base,dn.toastVariants.variants[this.variant],this.className)}"
|
|
2485
2485
|
data-radix-collection-item=""
|
|
2486
2486
|
style="user-select: none; touch-action: none;"
|
|
2487
2487
|
></li>
|
|
2488
|
-
</ol>`}};
|
|
2488
|
+
</ol>`}};dn.toastVariants=ti.viewportItem;Wl([a({type:String})],dn.prototype,"variant",2);Wl([a({attribute:"data-state",type:String})],dn.prototype,"state",2);dn=Wl([p("pont-toast-view-port")],dn);var rP=Object.defineProperty,nP=Object.getOwnPropertyDescriptor,bu=(e,t,r,o)=>{for(var n=o>1?void 0:o?nP(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&&rP(t,r,n),n};let Xn=class extends ${constructor(){super(...arguments),this.variant="default"}get _containerElement(){return this.querySelector("button[part=toast-action]")}getAttributesToExclude(){return["click","type","variant"]}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}getFilteredAttributes(){const e=this.getAttributesToExclude(),t={};for(const r of this.attributes)e.includes(r.name)||(t[r.name]=r.value);return t}createRenderRoot(){return this}render(){const e=this.getFilteredAttributes();return l`
|
|
2489
2489
|
<button
|
|
2490
2490
|
${Rt(e)}
|
|
2491
2491
|
part="toast-action"
|
|
2492
2492
|
type="button"
|
|
2493
|
-
class="${m(
|
|
2493
|
+
class="${m(Xn.toastVariants.base,Xn.toastVariants.variants[this.variant],this.className,"pont-w-max")}"
|
|
2494
2494
|
></button>
|
|
2495
|
-
`}};
|
|
2495
|
+
`}};Xn.toastVariants=ti.action;bu([a({type:String})],Xn.prototype,"variant",2);Xn=bu([p("pont-toast-action")],Xn);var oP=Object.getOwnPropertyDescriptor,iP=(e,t,r,o)=>{for(var n=o>1?void 0:o?oP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Xc=class extends ${get _containerElement(){return this.querySelector("div[part=toast-description]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
2496
2496
|
<div
|
|
2497
2497
|
class="${m(ti.description,this.className)}"
|
|
2498
2498
|
part="toast-description"
|
|
@@ -2510,7 +2510,7 @@
|
|
|
2510
2510
|
part="toast-trigger"
|
|
2511
2511
|
class="${m(this.className)}"
|
|
2512
2512
|
></div>
|
|
2513
|
-
`}};tp=dP([p("pont-toast-trigger")],tp);var cP=Object.defineProperty,pP=Object.getOwnPropertyDescriptor,_u=(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&&cP(t,r,n),n};let Qi=class extends ${constructor(){super(...arguments),this.isOpen=!1}get _containerElement(){return this.querySelector("div[part=toast]")}onClick(){this.isOpen=!this.isOpen}connectedCallback(){super.connectedCallback(),this.addEventListener("close-toast",()=>{this.isOpen=!1}),this.addEventListener("open-toast",()=>{this.isOpen=!0})}get _content(){return this.querySelector("pont-toast-view-port")}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.isOpen?"open":"closed")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}render(){return l` <div class="${m("",this.className)}" part="toast"></div> `}};_u([g()],Qi.prototype,"isOpen",2);Qi=_u([p("pont-toast")],Qi);var Ji=(e=>(e.MULTIPLE="multiple",e.SINGLE="single",e))(Ji||{}),Xi=(e=>(e.DEFAULT="default",e.OUTLINE="outline",e))(Xi||{}),Zi=(e=>(e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e))(Zi||{});const ep=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,rp=bl,yu=(e,t)=>r=>{var o;if((t==null?void 0:t.variants)==null)return rp(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:n,defaultVariants:i}=t,s=Object.keys(n).map(u=>{const b=r==null?void 0:r[u],_=i==null?void 0:i[u];if(b===null)return null;const w=ep(b)||ep(_);return n[u][w]}),d=r&&Object.entries(r).reduce((u,b)=>{let[_,w]=b;return w===void 0||(u[_]=w),u},{}),c=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((u,b)=>{let{class:_,className:w,...y}=b;return Object.entries(y).every(P=>{let[C,O]=P;return Array.isArray(O)?O.includes({...i,...d}[C]):{...i,...d}[C]===O})?[...u,_,w]:u},[]);return rp(e,s,c,r==null?void 0:r.class,r==null?void 0:r.className)},hP=yu("pont-inline-flex pont-items-center pont-justify-center pont-rounded-toggle-group-item-radius pont-text-toggle-group-item-font pont-font-toggle-group-item-font-weight pont-transition-colors focus-visible:pont-outline-none focus-visible:pont-ring-toggle-group-item-width-ring-focus focus-visible:pont-ring-toggle-group-item-color-ring-focus focus-visible:pont-ring-offset-toggle-group-item-width-ring-offset-focus disabled:pont-pointer-events-none disabled:pont-opacity-toggle-group-item-opacity-disabled data-[state=on]:pont-bg-toggle-group-item-color-bg-on data-[state=on]:pont-text-toggle-group-item-color-text-on pont-bg-transparent",{variants:{variant:{default:"hover:pont-bg-toggle-group-item-default-color-bg-hover hover:pont-text-toggle-group-item-default-color-text-hover",outline:"pont-border pont-border-toggle-group-item-outline-color-border hover:pont-bg-toggle-group-item-outline-color-bg-hover hover:pont-text-toggle-group-item-outline-color-text-hover"},size:{sm:"pont-h-toggle-group-item-space-h-sm pont-px-toggle-group-item-space-px-sm",md:"pont-h-toggle-group-item-space-h-md pont-px-toggle-group-item-space-px-md",lg:"pont-h-toggle-group-item-space-h-lg pont-px-toggle-group-item-space-px-lg"}}}),uP="pont-flex pont-items-center pont-justify-center pont-gap-toggle-group-space-gap";var mP=Object.defineProperty,fP=Object.getOwnPropertyDescriptor,
|
|
2513
|
+
`}};tp=dP([p("pont-toast-trigger")],tp);var cP=Object.defineProperty,pP=Object.getOwnPropertyDescriptor,_u=(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&&cP(t,r,n),n};let Qi=class extends ${constructor(){super(...arguments),this.isOpen=!1}get _containerElement(){return this.querySelector("div[part=toast]")}onClick(){this.isOpen=!this.isOpen}connectedCallback(){super.connectedCallback(),this.addEventListener("close-toast",()=>{this.isOpen=!1}),this.addEventListener("open-toast",()=>{this.isOpen=!0})}get _content(){return this.querySelector("pont-toast-view-port")}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.isOpen?"open":"closed")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}render(){return l` <div class="${m("",this.className)}" part="toast"></div> `}};_u([g()],Qi.prototype,"isOpen",2);Qi=_u([p("pont-toast")],Qi);var Ji=(e=>(e.MULTIPLE="multiple",e.SINGLE="single",e))(Ji||{}),Xi=(e=>(e.DEFAULT="default",e.OUTLINE="outline",e))(Xi||{}),Zi=(e=>(e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e))(Zi||{});const ep=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,rp=bl,yu=(e,t)=>r=>{var o;if((t==null?void 0:t.variants)==null)return rp(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:n,defaultVariants:i}=t,s=Object.keys(n).map(u=>{const b=r==null?void 0:r[u],_=i==null?void 0:i[u];if(b===null)return null;const w=ep(b)||ep(_);return n[u][w]}),d=r&&Object.entries(r).reduce((u,b)=>{let[_,w]=b;return w===void 0||(u[_]=w),u},{}),c=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((u,b)=>{let{class:_,className:w,...y}=b;return Object.entries(y).every(P=>{let[C,O]=P;return Array.isArray(O)?O.includes({...i,...d}[C]):{...i,...d}[C]===O})?[...u,_,w]:u},[]);return rp(e,s,c,r==null?void 0:r.class,r==null?void 0:r.className)},hP=yu("pont-inline-flex pont-items-center pont-justify-center pont-rounded-toggle-group-item-radius pont-text-toggle-group-item-font pont-font-toggle-group-item-font-weight pont-transition-colors focus-visible:pont-outline-none focus-visible:pont-ring-toggle-group-item-width-ring-focus focus-visible:pont-ring-toggle-group-item-color-ring-focus focus-visible:pont-ring-offset-toggle-group-item-width-ring-offset-focus disabled:pont-pointer-events-none disabled:pont-opacity-toggle-group-item-opacity-disabled data-[state=on]:pont-bg-toggle-group-item-color-bg-on data-[state=on]:pont-text-toggle-group-item-color-text-on pont-bg-transparent",{variants:{variant:{default:"hover:pont-bg-toggle-group-item-default-color-bg-hover hover:pont-text-toggle-group-item-default-color-text-hover",outline:"pont-border pont-border-toggle-group-item-outline-color-border hover:pont-bg-toggle-group-item-outline-color-bg-hover hover:pont-text-toggle-group-item-outline-color-text-hover"},size:{sm:"pont-h-toggle-group-item-space-h-sm pont-px-toggle-group-item-space-px-sm",md:"pont-h-toggle-group-item-space-h-md pont-px-toggle-group-item-space-px-md",lg:"pont-h-toggle-group-item-space-h-lg pont-px-toggle-group-item-space-px-lg"}}}),uP="pont-flex pont-items-center pont-justify-center pont-gap-toggle-group-space-gap";var mP=Object.defineProperty,fP=Object.getOwnPropertyDescriptor,gn=(e,t,r,o)=>{for(var n=o>1?void 0:o?fP(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&&mP(t,r,n),n};let Fe=class extends ${constructor(){super(),this.checked=!1,this.id=vl(),this.variant=Xi.DEFAULT,this.size=Zi.SMALL,this.disabled=!1,this.type=Ji.SINGLE,this.variant=Xi.DEFAULT,this.size=Zi.SMALL}get _parent(){let e=this.parentElement;for(;e&&!(e instanceof ir);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("button[part=toggle-group-item]")}get _siblings(){var e;return Array.from(((e=this.parentElement)==null?void 0:e.children)||[]).filter(t=>t!==this)}getAttributesToExclude(){return["disabled","type"]}createRenderRoot(){return this}firstUpdated(e){this.syncFromParent(),this.moveLightDomChildrenInto(this._containerElement)}syncFromParent(){const e=this._parent;if(!e)return;this.variant!==e.variant&&(this.variant=e.variant),this.size!==e.size&&(this.size=e.size);const t=e.selectedItems.includes(this.id);this.checked!==t&&(this.checked=t),this.type!==e.type&&(this.type=e.type)}syncSelection(){const e=this._parent;if(!e)return;const t=e.selectedItems.includes(this.id);this.checked!==t&&(this.checked=t)}toggleSelection(e){if(this.disabled||!this._parent)return;const t=this._parent,r=t.selectedItems.indexOf(e);this.type===Ji.SINGLE?(r!==-1?t.selectedItems.splice(r,1):t.selectedItems[0]=e,this._siblings.forEach(o=>o.syncSelection())):r!==-1?t.selectedItems.splice(r,1):t.selectedItems.push(e),this.syncSelection()}render(){return console.log({variant:this.variant,size:this.size,className:this.className}),l`
|
|
2514
2514
|
<button
|
|
2515
2515
|
part="toggle-group-item"
|
|
2516
2516
|
id=${this.id}
|
|
@@ -2521,7 +2521,7 @@
|
|
|
2521
2521
|
?disabled=${this.disabled}
|
|
2522
2522
|
@click=${()=>this.toggleSelection(this.id)}
|
|
2523
2523
|
></button>
|
|
2524
|
-
`}};Fe.toggleGroupVariants=hP;
|
|
2524
|
+
`}};Fe.toggleGroupVariants=hP;gn([a({attribute:!0,type:Boolean,reflect:!0})],Fe.prototype,"checked",2);gn([a({attribute:!0,type:String,reflect:!0})],Fe.prototype,"id",2);gn([a()],Fe.prototype,"variant",2);gn([a()],Fe.prototype,"size",2);gn([a({type:Boolean})],Fe.prototype,"disabled",2);gn([a({type:String})],Fe.prototype,"type",2);Fe=gn([p("pont-toggle-group-item")],Fe);var gP=Object.defineProperty,vP=Object.getOwnPropertyDescriptor,vn=(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&&gP(t,r,n),n};let ir=class extends ${constructor(){super(...arguments),this.disabled=!1,this.type=Ji.SINGLE,this.required=!1,this.variant=Xi.DEFAULT,this.size=Zi.SMALL,this.selectedItems=[]}get _containerElement(){return this.querySelector("div[part=toggle-group]")}getAttributesToExclude(){return["disabled","type","data-testid"]}connectedCallback(){super.connectedCallback()}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement)}updated(e){(e.has("variant")||e.has("size")||e.has("disabled")||e.has("type"))&&this.querySelectorAll("pont-toggle-group-item").forEach(t=>{t.variant=this.variant,t.size=this.size,t.disabled=this.disabled,t.type=this.type})}createRenderRoot(){return this}render(){const e=this.getFilteredAttributes();return console.log({variant:this.variant,size:this.size,className:this.className}),l`
|
|
2525
2525
|
<div
|
|
2526
2526
|
part="toggle-group"
|
|
2527
2527
|
role="group"
|
|
@@ -2529,7 +2529,7 @@
|
|
|
2529
2529
|
class="${m(uP,this.className)}"
|
|
2530
2530
|
?disable="${this.disabled}"
|
|
2531
2531
|
></div>
|
|
2532
|
-
`}};
|
|
2532
|
+
`}};vn([a({type:Boolean})],ir.prototype,"disabled",2);vn([a({type:String})],ir.prototype,"type",2);vn([a({attribute:!0,type:Boolean,reflect:!0})],ir.prototype,"required",2);vn([a()],ir.prototype,"variant",2);vn([a()],ir.prototype,"size",2);vn([a({type:Array})],ir.prototype,"selectedItems",2);ir=vn([p("pont-toggle-group")],ir);var yi=(e=>(e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e))(yi||{}),wi=(e=>(e.DEFAULT="default",e.OUTLINE="outline",e))(wi||{});const bP=yu("pont-inline-flex pont-items-center pont-justify-center pont-rounded-toggle-radius pont-text-toggle-font pont-font-toggle-font-weight pont-transition-colors focus-visible:pont-outline-none focus-visible:pont-ring-toggle-width-ring-focus focus-visible:pont-ring-toggle-color-ring-focus focus-visible:pont-ring-offset-toggle-width-ring-offset-focus disabled:pont-pointer-events-none disabled:pont-opacity-toggle-opacity-disabled data-[state=on]:pont-bg-toggle-color-bg-on data-[state=on]:pont-text-toggle-color-text-on pont-bg-transparent",{variants:{variant:{default:"hover:pont-bg-toggle-default-color-bg-hover hover:pont-text-toggle-default-color-text-hover",outline:"pont-border pont-border-toggle-outline-color-border hover:pont-bg-toggle-outline-color-bg-hover hover:pont-text-toggle-outline-color-text-hover"},size:{sm:"pont-h-toggle-space-h-sm pont-px-toggle-space-px-sm",md:"pont-h-toggle-space-h-md pont-px-toggle-space-px-md",lg:"pont-h-toggle-space-h-lg pont-px-toggle-space-px-lg"}}});var _P=Object.defineProperty,yP=Object.getOwnPropertyDescriptor,go=(e,t,r,o)=>{for(var n=o>1?void 0:o?yP(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};let sr=class extends ${constructor(){super(...arguments),this.disabled=!1,this.checked=!1,this.required=!1,this.variant=wi.DEFAULT,this.size=yi.SMALL}willUpdate(e){e.has("variant")&&(this.variant=this.normalizeEnum(this.variant,wi,wi.DEFAULT)),e.has("size")&&(this.size=this.normalizeEnum(this.size,yi,yi.SMALL))}get _containerElement(){return this.querySelector("button[part=toggle]")}getAttributesToExclude(){return["disabled","checked","variant","size","required","data-testid"]}toggle(){this.disabled||(this.checked=!this.checked)}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){const e=this.getFilteredAttributes();return l`
|
|
2533
2533
|
<button
|
|
2534
2534
|
type="button"
|
|
2535
2535
|
part="toggle"
|
|
@@ -2542,7 +2542,7 @@
|
|
|
2542
2542
|
?disabled=${this.disabled}
|
|
2543
2543
|
${Rt(e)}
|
|
2544
2544
|
></button>
|
|
2545
|
-
`}};sr.toggleVariants=bP;
|
|
2545
|
+
`}};sr.toggleVariants=bP;go([a({type:Boolean})],sr.prototype,"disabled",2);go([a({attribute:!0,type:Boolean,reflect:!0})],sr.prototype,"checked",2);go([a({attribute:!0,type:Boolean,reflect:!0})],sr.prototype,"required",2);go([a({attribute:!0,type:String})],sr.prototype,"variant",2);go([a({attribute:!0,type:String})],sr.prototype,"size",2);sr=go([p("pont-toggle")],sr);var wP=Object.getOwnPropertyDescriptor,$P=(e,t,r,o)=>{for(var n=o>1?void 0:o?wP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let np=class extends v{createRenderRoot(){return this}get _blockquoteSlot(){return this.querySelector('[data-slot="typography-blockquote"]')}firstUpdated(){const e=this._blockquoteSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<blockquote data-slot="typography-blockquote"></blockquote>`}};np=$P([p("pont-typography-blockquote")],np);var PP=Object.getOwnPropertyDescriptor,CP=(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=s(n)||n);return n};let op=class extends v{createRenderRoot(){return this}get _codeSlot(){return this.querySelector('[data-slot="typography-code"]')}firstUpdated(){const e=this._codeSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<code data-slot="typography-code"></code>`}};op=CP([p("pont-typography-code")],op);var EP=Object.defineProperty,SP=Object.getOwnPropertyDescriptor,wu=(e,t,r,o)=>{for(var n=o>1?void 0:o?SP(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&&EP(t,r,n),n};let rl=class extends v{constructor(){super(...arguments),this.level="h1"}createRenderRoot(){return this}get _hSlot(){return this.querySelector('[data-slot="typography-h"]')}firstUpdated(){const e=this._hSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return this.level==="h2"?l`
|
|
2546
2546
|
<h2 data-slot="typography-h" data-level="${this.level}"></h2>
|
|
2547
2547
|
`:this.level==="h3"?l`
|
|
2548
2548
|
<h3 data-slot="typography-h" data-level="${this.level}"></h3>
|
|
@@ -2734,8 +2734,8 @@
|
|
|
2734
2734
|
</div>
|
|
2735
2735
|
${this.hasDefaultPagination&&this.hasDefaultSelect?this._renderPagination():h}
|
|
2736
2736
|
</div>
|
|
2737
|
-
`}};lt([a({type:String})],it.prototype,"placeholder",2);lt([a({type:Array})],it.prototype,"dataTable",2);lt([a({type:Boolean})],it.prototype,"hasDefaultSelect",2);lt([a({type:Boolean})],it.prototype,"hasDefaultPagination",2);lt([a({type:Boolean})],it.prototype,"hasDefaultSearch",2);lt([a({type:Object})],it.prototype,"checkedRows",2);lt([a({type:String})],it.prototype,"searchTerm",2);lt([a({type:Object})],it.prototype,"columnVisibility",2);lt([a({type:String})],it.prototype,"sortColumn",2);lt([a({type:String})],it.prototype,"sortDirection",2);lt([a({type:Object})],it.prototype,"cellRenderers",2);lt([a({type:Object})],it.prototype,"headerRenderers",2);lt([a({type:Array})],it.prototype,"rowActions",2);lt([a({type:Array})],it.prototype,"paginationLabels",2);lt([a({type:Number})],it.prototype,"pageSize",2);lt([a({type:Number})],it.prototype,"currentPage",2);lt([a({type:Array})],it.prototype,"sortableColumns",2);lt([a({type:Array})],it.prototype,"columnOrder",2);lt([a({type:Function})],it.prototype,"isRowDisabled",2);lt([a({type:String,attribute:"empty-label"})],it.prototype,"emptyLabel",2);lt([a({type:String,attribute:"actions-label"})],it.prototype,"actionsLabel",2);it=lt([p("pont-data-table")],it);var K=class extends Error{constructor(t,r,o,n){super(r);S(this,"code");S(this,"details");S(this,"status");this.name="LoginflowError",this.code=t,this.details=o,this.status=n}};function nl(e){const t=e==null?void 0:e.messages;if(!t||typeof t!="object")return;const r={};for(const[o,n]of Object.entries(t))typeof n=="string"&&(r[o]=n);return r}function ol(e){const t=(e??"").trim();if(!t)throw new K("CONFIG_ERROR","domain is required");if(t.startsWith("/")){if(typeof location>"u")throw new K("CONFIG_ERROR",`domain "${t}" is relative to the page origin, and there is no page here`);return hp(new URL(t,location.origin))}const r=/^https?:\/\//i.test(t)?"":`${VP(zP(t))?"http":"https"}://`;try{return hp(new URL(`${r}${t}`))}catch{throw new K("CONFIG_ERROR",`domain "${t}" is not a hostname, an origin, or a path`)}}function hp(e){return`${e.origin}${e.pathname}`.replace(/\/+$/,"")}function zP(e){return e.split("/")[0]}function VP(e){return/^(localhost|127\.0\.0\.1|\[::1\])(:\d+)?$/i.test(e)}var Ee,GP=(Ee=class{constructor(){S(this,"data",new Map)}static get Instance(){return Ee.instance||(Ee.instance=new Ee),Ee.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 ol(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()}},S(Ee,"instance"),Ee),Q=GP.Instance;function HP(e,t){const r=up(e)?e:{},o=up(r.error)?r.error:void 0,n=typeof r.error=="string"?r.error:void 0,i=typeof r.error_description=="string"?r.error_description:void 0;return{code:pi(o==null?void 0:o.code)??pi(r.code)??n??"API_ERROR",message:pi(o==null?void 0:o.message)??pi(r.message)??i??t,details:(o==null?void 0:o.details)??r.details}}function up(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function pi(e){return typeof e=="string"&&e!==""?e:void 0}var Se,Nn=(Se=class{constructor(){}static get Instance(){return Se.instance||(Se.instance=new Se),Se.instance}async request(t,r={}){const o=Q.getConfig(),n=`${Q.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(()=>{}),{code:b,message:_,details:w}=HP(u,`HTTP ${c.status}: ${c.statusText}`);throw new K(b,_,w,c.status)}return await c.json()}catch(c){throw clearTimeout(d),c instanceof K?c:c instanceof Error?c.name==="AbortError"?new K("TIMEOUT","Request timeout"):new K("NETWORK_ERROR",c.message):new K("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=Q.getConfig(),o=await fetch(`${Q.getApiBaseUrl()}${t}`,{credentials:"include",method:"GET",headers:{...r.headers}});if(o.status===204)return null;if(!o.ok)throw new K("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()})}},S(Se,"instance"),Se),$u="__Secure-pontive_session_state",Ms="__Secure-pontive_session_probe";function KP(){return Pu($u)?"present":WP()?"absent":"unknown"}function $i(){if(!(typeof document>"u"||typeof location>"u"))for(const e of["",...JP(location.hostname)])il($u,"",e,0)}function WP(){if(typeof document>"u"||typeof location>"u")return!1;const e=QP();try{il(Ms,"1",e,60);const t=Pu(Ms)==="1";return il(Ms,"",e,0),t&&YP(e)}catch{return!1}}function YP(e){return e!==""||Q.apiIsSameOrigin()}function QP(){let e;try{e=new URL(Q.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 JP(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 il(e,t,r,o){const n=XP()?"; Secure":"",i=r?`; Domain=${r}`:"";document.cookie=`${e}=${t}; Path=/; Max-Age=${o}; SameSite=Lax${i}${n}`}function XP(){return typeof globalThis.isSecureContext=="boolean"?globalThis.isSecureContext:location.protocol==="https:"}function Pu(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 Io={read:"pontive:org:member:read",manage:"pontive:org:member:manage",invite:"pontive:org:member:invite"},Vr=class Pi extends K{constructor(t,r,o,n){super(t,r,o,n),this.name="ManagementTokenError"}static from(t){return t instanceof Pi?t:t instanceof K?new Pi(t.code,t.message,t.details,t.status):new Pi("UNKNOWN_ERROR",String(t))}};function ZP(e){const t=Ci(e);return t.length>0?t.join(" "):void 0}function Ci(e){const t=typeof e=="string"?e.split(/\s+/):Array.isArray(e)?e.flatMap(r=>typeof r=="string"?r.split(/\s+/):[]):[];return[...new Set(t.filter(r=>r!==""))]}function t1(e){let t;try{t=new URL(e)}catch{throw new Vr("INVALID_REQUEST",`apiBaseUrl must be an absolute URL, got "${e}"`)}if(t.protocol!=="https:"&&t.protocol!=="http:")throw new Vr("INVALID_REQUEST",`apiBaseUrl must be an http(s) URL, got "${e}"`);const r=t.pathname.replace(/\/+$/,"").replace(/\/mgmt(\/v1)?$/,"");return`${t.origin}${r}/mgmt`}var $t,Et=($t=class{constructor(){S(this,"AUTH_SESSION_STORAGE_KEY","pontive_auth_session");S(this,"memorySession",null);S(this,"refreshTimeoutId",null);S(this,"refreshPromise",null);S(this,"refreshRetryCount",0);S(this,"refreshBlockedUntil",0);S(this,"sessionGeneration",0);S(this,"channel",null);S(this,"channelName","");S(this,"applyingBroadcast",!1);S(this,"restorePromise",null);S(this,"refreshQueue",Promise.resolve());S(this,"managementTokens",new Map);S(this,"managementRequests",new Map)}static get Instance(){return $t.instance||($t.instance=new $t),$t.instance}setCurrentSession(t){this.sessionGeneration+=1,this.write(JSON.stringify(t)),this.publish({type:"session",session:t})}withRefreshLock(t){const r=typeof navigator<"u"?navigator.locks:void 0,o=()=>r?r.request(this.channelKey("refresh"),t):t(),n=this.refreshQueue.then(o,o);return this.refreshQueue=n.catch(()=>{}),n}channelKey(t){const r=Q.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,this.forgetManagementTokens(),(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.forgetManagementTokens(),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(async()=>{const r=this.getStoredSession();if(r&&!this.shouldRefreshToken(r))return this.scheduleTokenRefresh(),null;const o=await this.refreshTokens(r??t);return o&&(this.setCurrentSession(o),this.refreshRetryCount=0,this.refreshBlockedUntil=0,this.scheduleTokenRefresh()),o}).catch(r=>(console.error("Background token refresh failed:",r),null)).finally(()=>{this.refreshPromise=null}))}async switchOrganization(t){if(!t)throw new K("INVALID_REQUEST","organizationId is required");return this.managementRequests.clear(),this.withRefreshLock(async()=>{const r=this.sessionGeneration,o=this.getCurrentSession(),n=await this.requestTokens(o,{organization_id:t});if(!this.isCurrentGeneration(r))throw new K("SESSION_CHANGED","the session changed while switching organization");return this.setCurrentSession(n),this.scheduleTokenRefresh(),this.forgetManagementTokens(),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 getManagementToken(t){const r=t1(t),o=this.getCurrentSession();if(!o)throw new Vr("NOT_AUTHENTICATED","there is no session to get a management token for");const n=this.usableManagementToken(r,o);if(n)return n;const i=this.managementRequests.get(r);if(i)return i;const s=this.withRefreshLock(()=>this.requestManagementToken(r)).finally(()=>{this.managementRequests.get(r)===s&&this.managementRequests.delete(r)});return this.managementRequests.set(r,s),s}hasScope(t){const r=t.trim(),o=this.getCurrentSession();if(!r||!o)return!1;if(this.accessTokenScopes(o).includes(r))return!0;const n=this.sessionOwner(o);for(const i of this.managementTokens.values())if(i.owner===n&&i.token.scopes.includes(r))return!0;return!1}async requestManagementToken(t){var u;const r=this.sessionGeneration,o=this.getStoredSession();if(!o||this.isSessionExpired(o))throw new Vr("NOT_AUTHENTICATED","there is no session to get a management token for");const n=this.usableManagementToken(t,o);if(n)return n;const i=this.sessionOwner(o),s={grant_type:"refresh_token",client_id:(u=Q.getConfig())==null?void 0:u.appId,resource:t};o.refresh_token&&(s.refresh_token=o.refresh_token);let d;try{d=await Nn.Instance.postForm("/oauth2/token",s)}catch(b){throw this.isCurrentGeneration(r)?(mp(b)?(console.error("Management token refresh rejected, signing out:",Sn(b)),$i(),this.clearSession()):b instanceof K&&r1.has(b.code)&&this.managementTokens.delete(t),Vr.from(b)):new Vr("SESSION_CHANGED","the session changed while getting a management token")}if(!this.isCurrentGeneration(r))throw new Vr("SESSION_CHANGED","the session changed while getting a management token");d.refresh_token&&d.refresh_token!==o.refresh_token&&this.setCurrentSession({...o,refresh_token:d.refresh_token});const c={access_token:d.access_token,token_type:d.token_type??"Bearer",expires_at:Date.now()+d.expires_in*1e3,scopes:Ci(d.scope),audience:t};return this.managementTokens.set(t,{token:c,owner:i}),c}usableManagementToken(t,r){const o=this.managementTokens.get(t);return!o||o.owner!==this.sessionOwner(r)?null:Date.now()<o.token.expires_at-$t.MANAGEMENT_TOKEN_EXPIRY_MARGIN_MS?o.token:null}forgetManagementTokens(){this.managementTokens.clear(),this.managementRequests.clear()}sessionOwner(t){const r=t.access_token?this.decodeJWT(t.access_token):null,o=n=>typeof n=="string"?n:"";return[o(r==null?void 0:r.sid),o(r==null?void 0:r.sub),o(r==null?void 0:r.org_id)].join("|")}accessTokenScopes(t){if(t.scope!==void 0)return Ci(t.scope);const r=t.access_token?this.decodeJWT(t.access_token):null;return Ci((r==null?void 0:r.scope)??(r==null?void 0:r.scp))}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)?mp(o)?(console.error("Token refresh rejected, signing out:",Sn(o)),$i(),this.clearSession(),null):(console.warn("Token refresh failed, keeping session and retrying:",Sn(o)),this.scheduleRefreshRetry(t),null):(console.warn("Token refresh failed after the session changed; ignoring:",Sn(o)),null)}}async fetchUserInfo(t){try{return await Nn.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:",Sn(r)),null}}async requestTokens(t,r={}){var i;const o={...r,grant_type:"refresh_token",client_id:(i=Q.getConfig())==null?void 0:i.appId};t!=null&&t.refresh_token&&(o.refresh_token=t.refresh_token);const n=await Nn.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,...n.scope??(t==null?void 0:t.scope)?{scope:n.scope??(t==null?void 0:t.scope)}:{}}}async readCurrentToken(){var r;const t=(r=Q.getConfig())==null?void 0:r.appId;if(!t)return null;try{const o=await Nn.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:KP()==="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 n1(o)&&$i(),console.debug("No session to restore:",Sn(o)),null}}).finally(()=>{this.restorePromise=null}),this.restorePromise)}scheduleRefreshRetry(t){if(this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshRetryCount>=$t.MAX_REFRESH_RETRIES){console.warn("Token refresh gave up after",this.refreshRetryCount,"attempts"),this.refreshRetryCount=0,this.refreshBlockedUntil=0;return}const r=Math.min($t.REFRESH_RETRY_BASE_MS*2**this.refreshRetryCount,$t.MAX_REFRESH_RETRY_DELAY_MS);this.refreshRetryCount+=1,this.refreshBlockedUntil=Date.now()+r,this.refreshTimeoutId=setTimeout(()=>{this.refreshBlockedUntil=0,this.triggerBackgroundRefresh(t)},r)}},S($t,"MAX_REFRESH_RETRIES",5),S($t,"REFRESH_RETRY_BASE_MS",5e3),S($t,"MAX_REFRESH_RETRY_DELAY_MS",6e4),S($t,"MANAGEMENT_TOKEN_EXPIRY_MARGIN_MS",6e4),S($t,"instance"),$t);function mp(e){return!(e instanceof K)||e.status===void 0?!1:e.status===401?!0:e.status===400&&e1.has(e.code)}var e1=new Set(["invalid_grant","invalid_client"]),r1=new Set(["invalid_scope","invalid_target"]);function n1(e){return e instanceof K&&e.status!==void 0&&e.status>=400&&e.status<500}function Sn(e){return e instanceof K?`${e.code} (status ${e.status??"none"}): ${e.message}`:String(e)}var Cu=class{constructor(e=sessionStorage){S(this,"storage");S(this,"FLOW_STATE_KEY","pontive_loginflow_state");S(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}},wr,ts=(wr=class{static detect(t,r=window.location){if(wr.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(wr.INVITE_TOKEN_PARAM)}catch{return!1}}},S(wr,"INVITE_TOKEN_PARAM","invite_token"),wr),Eu=class{constructor(){S(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)}},o1=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,i1=(Qt=class{constructor(t,r,o=window.location,n,i){S(this,"httpClient",Nn.Instance);S(this,"flowId");S(this,"redirectTimeoutId",null);S(this,"flowStateManager");S(this,"flowEventBus");S(this,"location");S(this,"navigationTypeDetector");S(this,"eventHandlers",new Map([["switch_to_signin",this.handleSwitchToSignin.bind(this)],["switch_to_signup",this.handleSwitchToSignup.bind(this)],["continue_here",this.handleContinueHere.bind(this)]]));S(this,"linkWatchTimer",null);S(this,"linkWatchGeneration",0);S(this,"waitingForLink",!1);const s=Q.getConfig();if(!s.domain)throw new K("CONFIG_ERROR","Domain is required");if(!s.appId)throw new K("CONFIG_ERROR","App ID is required");this.flowId=t,this.location=o,this.flowStateManager=n||new Cu,this.flowEventBus=r||new Eu,this.navigationTypeDetector=i||new o1,Et.Instance.cleanExpiredSession(),Et.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,messages:d.messages,auth_result:d.auth_result}}async startFlow(t,r){if(!r.app_id)throw new K("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 K("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 K?i:new K(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 K("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,...t.scope?{scope:t.scope}:{}};Et.Instance.setCurrentSession(r),Et.Instance.scheduleTokenRefresh(),this.flowStateManager.clearFlowState();const{onAuthenticated:o}=Q.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=Q.getConfig(),r=ts.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 K("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,messages:nl(o.data)}}catch(o){return this.flowStateManager.clearFlowState(),console.warn("Failed to resume flow, starting fresh:",o),await this.startNewFlow(r)}}async startNewFlow(t){const r=Q.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,scope:ZP(r.scope),flow_id:this.determineFlowId(t),metadata:n,auth_base_url:Q.getApiBaseUrl()},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,messages:nl(d.data)}}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 K("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=Q.getConfig()).onFlowStateChange)==null||n.call(o,{eventType:"flow_continued_elsewhere",flowType:t,state:r})}static flowIsGone(t){return t instanceof K&&t.status===401}stopWatchingForLink(){this.waitingForLink=!1,this.linkWatchGeneration++,this.linkWatchTimer!==null&&(clearTimeout(this.linkWatchTimer),this.linkWatchTimer=null)}async handleContinueHere(){const{continueHereUrl:t}=Q.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=Q.getConfig();return this.redirect({url:this.withCurrentQuery(t.signinUrl),redirect_delay:0}),{state:"End"}}async handleSwitchToSignup(){const t=Q.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()}},S(Qt,"LINK_POLL_INTERVAL_MS",3e3),S(Qt,"LINK_POLL_LIMIT_MS",900*1e3),Qt),s1=class{constructor(e){S(this,"delayMs");S(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}},a1=class{pushState(e,t,r){history.pushState(e,t,r)}replaceState(e,t,r){history.replaceState(e,t,r)}get state(){return history.state}},l1=class{constructor(e,t,r=!1,o=window.location,n,i){S(this,"popstateListener",null);S(this,"pageshowListener",null);S(this,"debouncer");S(this,"isProcessing",!1);S(this,"isHandlingNavigationEvent",!1);S(this,"onFlowRestartNeeded",null);S(this,"skipHistoryTracking");S(this,"flowStateManager");S(this,"historyAdapter");S(this,"location");this.onFlowRestartNeeded=t,this.skipHistoryTracking=r,this.debouncer=new s1(200),this.location=o,this.flowStateManager=n||new Cu,this.historyAdapter=i||new a1,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=Q.getConfig(),n=ts.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=Q.getConfig(),o=ts.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}},Br=new AbortController,d1=class{constructor(){S(this,"httpClient",Nn.Instance);S(this,"capabilities",{webauthn:!1});S(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;Br.abort(),Br=new AbortController;const r=this.toPublicKeyCredentialCreationOptions(e),o={signal:Br.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 b;if(typeof d.getPublicKeyAlgorithm=="function")try{b=d.getPublicKeyAlgorithm()}catch(y){Us("getPublicKeyAlgorithm()",y)}let _;if(typeof d.getPublicKey=="function")try{const y=d.getPublicKey();y!==null&&(_=this.bufferToBase64URLString(y))}catch(y){Us("getPublicKey()",y)}let w;if(typeof d.getAuthenticatorData=="function")try{w=this.bufferToBase64URLString(d.getAuthenticatorData())}catch(y){Us("getAuthenticatorData()",y)}return{id:i,rawId:this.bufferToBase64URLString(s),response:{attestationObject:this.bufferToBase64URLString(d.attestationObject),clientDataJSON:this.bufferToBase64URLString(d.clientDataJSON),transports:u,publicKeyAlgorithm:b,publicKey:_,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 qr?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;Br.abort(),Br=new AbortController;const r=this.toPublicKeyCredentialRequestOptions(e),o={signal:Br.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 qr?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 qr({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new qr({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(c1(o)){if(r.rpId!==o)return new qr({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new qr({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new qr({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(){Br.abort()}};function Us(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
|
|
2738
|
-
`,t)}var qr=class extends Error{constructor({message:t,code:r,cause:o,name:n}){super(t);S(this,"code");this.name=n??o.name,this.code=r}};function c1(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}var xe,p1=(xe=class{constructor(){S(this,"configured",!1);S(this,"configuredResolve");S(this,"configuredPromise",new Promise(t=>{this.configuredResolve=t}));S(this,"loginflow",null);S(this,"navigationManager",null);S(this,"flowEventBus",null);S(this,"webauthnService",null)}static get Instance(){return xe.instance||(xe.instance=new xe),xe.instance}ensureConfigured(){if(!this.configured)throw new K("NOT_CONFIGURED","Auth.configure() must be called before using Auth methods")}ensureLoginflowInitialized(){if(!this.loginflow)throw new K("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 d1,this.webauthnService.detectCapabilities(),this.flowEventBus=new Eu,this.navigationManager=new l1(this.flowEventBus,async()=>{console.log("[AuthService] Navigation restart triggered, restarting loginflow"),await this.startLoginflowInternal(void 0,!1)},r);const o=await i1.init(t,this.flowEventBus),n=Q.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,messages:o.messages};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,messages:o.messages}),i}configure(t){if(!t.domain||!t.appId)throw new K("CONFIG_ERROR","domain and appId are required");Q.setConfig(t),this.configured=!0,this.configuredResolve()}whenConfigured(){return this.configuredPromise}isAuthenticated(){return this.ensureConfigured(),Et.Instance.isAuthenticated()}getCurrentSession(){return this.ensureConfigured(),Et.Instance.getCurrentSession()}async restoreSession(){return this.ensureConfigured(),Et.Instance.restoreSession()}getAuthenticatedUser(){return this.ensureConfigured(),Et.Instance.getAuthenticatedUser()}getOrganization(){return this.ensureConfigured(),Et.Instance.getOrganization()}async switchOrganization(t){return this.ensureConfigured(),Et.Instance.switchOrganization(t)}async getManagementToken(t){return this.ensureConfigured(),Et.Instance.getManagementToken(t)}hasScope(t){return this.ensureConfigured(),Et.Instance.hasScope(t)}async startLoginflow(t){return this.startLoginflowInternal(t,!1)}async processLoginflowEvent(t){var i,s;this.ensureConfigured(),this.ensureLoginflowInitialized();const r=Q.getConfig(),o=ts.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,messages:nl(n.data)})}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(){Et.Instance.clearSession()}async signOut(t){var n;this.ensureConfigured();const r=h1(Et.Instance.peekSession()),o=((n=Q.getConfig())==null?void 0:n.appId)??"";if($i(),Et.Instance.clearSession(),Et.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),!Q.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(`${Q.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),`${Q.getApiBaseUrl()}/oauth2/logout?${n.toString()}`}},S(xe,"instance"),xe);function h1(e){for(const t of[e==null?void 0:e.id_token,e==null?void 0:e.access_token]){if(!t)continue;const r=Et.Instance.decodeJWT(t);if(typeof(r==null?void 0:r.sid)=="string"&&r.sid)return r.sid}}var H=p1.Instance,u1=Object.defineProperty,m1=(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&&u1(t,r,n),n};class ge extends v{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))}}m1([a({type:Boolean})],ge.prototype,"shadow");const dr="pont:auth",go={showWatermark:!0},ei="pont:branding";class f1{constructor(t){this.consumer=new Ei(t,{context:ei,subscribe:!0})}get showWatermark(){var t;return((t=this.consumer.value)==null?void 0:t.showWatermark)??go.showWatermark}}const Su="pont:design-mode";class ri{constructor(t){this.host=t,this.consumer=new Ei(t,{context:Su,subscribe:!0})}get active(){return this.host.hasAttribute("design-mode")?this.host.getAttribute("design-mode")!=="false":this.consumer.value??!1}}const xu="pont:env",Ou=Symbol("renderSpecContext"),ni="pont-user-context",Yl="";function Jt(...e){return yh(bl(e))}function g1(e){return Object.entries(e).filter(([t,r])=>typeof r!="object"&&r!=null).map(([t,r])=>`${t}: ${r};`).join(" ")}function v1(e){document.documentElement.setAttribute("data-theme",e)}function b1(){const e=document.documentElement.getAttribute("data-theme");(!e||e!=="light"&&e!=="dark")&&v1("light")}function _1(e,t){return e?e.includes("{{theme}}")?e.replace("{{theme}}",t):e:""}function sl(){return new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))})}const fp="abcdefghijklmnopqrstuvwxyz0123456789",y1=6;function w1(e){let t="";for(let r=0;r<y1;r++)t+=fp.charAt(Math.floor(Math.random()*fp.length));return t}const _t=()=>w1();function ls(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 $1(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 P1(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 C1(e){return/^https?:\/\//.test(e)||e!=null&&e.startsWith("data:image/svg+xml;base64,")?e:`data:image/svg+xml;base64,${e}`}function Ql(){var e;return(e=H.getCurrentSession())==null?void 0:e.access_token}function al(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(Gi(),{weekday:"long"}):r.toLocaleDateString(Gi(),{year:"numeric",month:"short",day:"numeric"})}function ll(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(Gi(),{hour:"2-digit",minute:"2-digit",hour12:!1})}function ds(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 E1(e){return e instanceof Error&&"status"in e}function cs(e,t){var r,o;return E1(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 xn={variant:"secondary",size:"default",content:"label",iconAlign:"start",label:"Continue with Passkey"},On={variant:"outline",size:"default",content:"icon-label",iconAlign:"start",prompt:"Continue with"},Rn={variant:"default",size:"default",content:"label",iconAlign:"end",label:"Submit"},S1={apple:"Apple",discord:"Discord",facebook:"Facebook",github:"GitHub",google:"Google",linkedin:"LinkedIn",meta:"Meta",microsoft:"Microsoft",x:"X"},x1={apple:V`<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:V`<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:V`<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:V`<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:V`<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:V`<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:V`<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:V`<path d="M11.4 24H0V12.6h11.4V24zM24 24H12.6V12.6H24V24zM11.4 11.4H0V0h11.4v11.4zM24 11.4H12.6V0H24v11.4z" />`,x:V`<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 O1=Object.defineProperty,R1=Object.getOwnPropertyDescriptor,te=(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.PontPasskeyButton=class extends v{constructor(){super(...arguments),this.seed=_t(),this.variant=xn.variant,this.size=xn.size,this.content=xn.content,this.iconAlign=xn.iconAlign,this._label=xn.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 H.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:xn.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`
|
|
2737
|
+
`}};lt([a({type:String})],it.prototype,"placeholder",2);lt([a({type:Array})],it.prototype,"dataTable",2);lt([a({type:Boolean})],it.prototype,"hasDefaultSelect",2);lt([a({type:Boolean})],it.prototype,"hasDefaultPagination",2);lt([a({type:Boolean})],it.prototype,"hasDefaultSearch",2);lt([a({type:Object})],it.prototype,"checkedRows",2);lt([a({type:String})],it.prototype,"searchTerm",2);lt([a({type:Object})],it.prototype,"columnVisibility",2);lt([a({type:String})],it.prototype,"sortColumn",2);lt([a({type:String})],it.prototype,"sortDirection",2);lt([a({type:Object})],it.prototype,"cellRenderers",2);lt([a({type:Object})],it.prototype,"headerRenderers",2);lt([a({type:Array})],it.prototype,"rowActions",2);lt([a({type:Array})],it.prototype,"paginationLabels",2);lt([a({type:Number})],it.prototype,"pageSize",2);lt([a({type:Number})],it.prototype,"currentPage",2);lt([a({type:Array})],it.prototype,"sortableColumns",2);lt([a({type:Array})],it.prototype,"columnOrder",2);lt([a({type:Function})],it.prototype,"isRowDisabled",2);lt([a({type:String,attribute:"empty-label"})],it.prototype,"emptyLabel",2);lt([a({type:String,attribute:"actions-label"})],it.prototype,"actionsLabel",2);it=lt([p("pont-data-table")],it);var K=class extends Error{constructor(t,r,o,n){super(r);S(this,"code");S(this,"details");S(this,"status");this.name="LoginflowError",this.code=t,this.details=o,this.status=n}};function nl(e){const t=e==null?void 0:e.messages;if(!t||typeof t!="object")return;const r={};for(const[o,n]of Object.entries(t))typeof n=="string"&&(r[o]=n);return r}function ol(e){const t=(e??"").trim();if(!t)throw new K("CONFIG_ERROR","domain is required");if(t.startsWith("/")){if(typeof location>"u")throw new K("CONFIG_ERROR",`domain "${t}" is relative to the page origin, and there is no page here`);return hp(new URL(t,location.origin))}const r=/^https?:\/\//i.test(t)?"":`${VP(zP(t))?"http":"https"}://`;try{return hp(new URL(`${r}${t}`))}catch{throw new K("CONFIG_ERROR",`domain "${t}" is not a hostname, an origin, or a path`)}}function hp(e){return`${e.origin}${e.pathname}`.replace(/\/+$/,"")}function zP(e){return e.split("/")[0]}function VP(e){return/^(localhost|127\.0\.0\.1|\[::1\])(:\d+)?$/i.test(e)}var Ee,GP=(Ee=class{constructor(){S(this,"data",new Map)}static get Instance(){return Ee.instance||(Ee.instance=new Ee),Ee.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 ol(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()}},S(Ee,"instance"),Ee),Q=GP.Instance;function HP(e,t){const r=up(e)?e:{},o=up(r.error)?r.error:void 0,n=typeof r.error=="string"?r.error:void 0,i=typeof r.error_description=="string"?r.error_description:void 0;return{code:pi(o==null?void 0:o.code)??pi(r.code)??n??"API_ERROR",message:pi(o==null?void 0:o.message)??pi(r.message)??i??t,details:(o==null?void 0:o.details)??r.details}}function up(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function pi(e){return typeof e=="string"&&e!==""?e:void 0}var Se,Mn=(Se=class{constructor(){}static get Instance(){return Se.instance||(Se.instance=new Se),Se.instance}async request(t,r={}){const o=Q.getConfig(),n=`${Q.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(()=>{}),{code:b,message:_,details:w}=HP(u,`HTTP ${c.status}: ${c.statusText}`);throw new K(b,_,w,c.status)}return await c.json()}catch(c){throw clearTimeout(d),c instanceof K?c:c instanceof Error?c.name==="AbortError"?new K("TIMEOUT","Request timeout"):new K("NETWORK_ERROR",c.message):new K("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=Q.getConfig(),o=await fetch(`${Q.getApiBaseUrl()}${t}`,{credentials:"include",method:"GET",headers:{...r.headers}});if(o.status===204)return null;if(!o.ok)throw new K("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()})}},S(Se,"instance"),Se),$u="__Secure-pontive_session_state",Ms="__Secure-pontive_session_probe";function KP(){return Pu($u)?"present":WP()?"absent":"unknown"}function $i(){if(!(typeof document>"u"||typeof location>"u"))for(const e of["",...JP(location.hostname)])il($u,"",e,0)}function WP(){if(typeof document>"u"||typeof location>"u")return!1;const e=QP();try{il(Ms,"1",e,60);const t=Pu(Ms)==="1";return il(Ms,"",e,0),t&&YP(e)}catch{return!1}}function YP(e){return e!==""||Q.apiIsSameOrigin()}function QP(){let e;try{e=new URL(Q.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 JP(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 il(e,t,r,o){const n=XP()?"; Secure":"",i=r?`; Domain=${r}`:"";document.cookie=`${e}=${t}; Path=/; Max-Age=${o}; SameSite=Lax${i}${n}`}function XP(){return typeof globalThis.isSecureContext=="boolean"?globalThis.isSecureContext:location.protocol==="https:"}function Pu(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 Kr={read:"pontive:org:member:read",manage:"pontive:org:member:manage",invite:"pontive:org:member:invite"},Vr=class Pi extends K{constructor(t,r,o,n){super(t,r,o,n),this.name="ManagementTokenError"}static from(t){return t instanceof Pi?t:t instanceof K?new Pi(t.code,t.message,t.details,t.status):new Pi("UNKNOWN_ERROR",String(t))}};function ZP(e){const t=Ci(e);return t.length>0?t.join(" "):void 0}function Ci(e){const t=typeof e=="string"?e.split(/\s+/):Array.isArray(e)?e.flatMap(r=>typeof r=="string"?r.split(/\s+/):[]):[];return[...new Set(t.filter(r=>r!==""))]}function t1(e){let t;try{t=new URL(e)}catch{throw new Vr("INVALID_REQUEST",`apiBaseUrl must be an absolute URL, got "${e}"`)}if(t.protocol!=="https:"&&t.protocol!=="http:")throw new Vr("INVALID_REQUEST",`apiBaseUrl must be an http(s) URL, got "${e}"`);const r=t.pathname.replace(/\/+$/,"").replace(/\/mgmt(\/v1)?$/,"");return`${t.origin}${r}/mgmt`}var $t,Et=($t=class{constructor(){S(this,"AUTH_SESSION_STORAGE_KEY","pontive_auth_session");S(this,"memorySession",null);S(this,"refreshTimeoutId",null);S(this,"refreshPromise",null);S(this,"refreshRetryCount",0);S(this,"refreshBlockedUntil",0);S(this,"sessionGeneration",0);S(this,"channel",null);S(this,"channelName","");S(this,"applyingBroadcast",!1);S(this,"restorePromise",null);S(this,"refreshQueue",Promise.resolve());S(this,"managementTokens",new Map);S(this,"managementRequests",new Map)}static get Instance(){return $t.instance||($t.instance=new $t),$t.instance}setCurrentSession(t){this.sessionGeneration+=1,this.write(JSON.stringify(t)),this.publish({type:"session",session:t})}withRefreshLock(t){const r=typeof navigator<"u"?navigator.locks:void 0,o=()=>r?r.request(this.channelKey("refresh"),t):t(),n=this.refreshQueue.then(o,o);return this.refreshQueue=n.catch(()=>{}),n}channelKey(t){const r=Q.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,this.forgetManagementTokens(),(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.forgetManagementTokens(),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(async()=>{const r=this.getStoredSession();if(r&&!this.shouldRefreshToken(r))return this.scheduleTokenRefresh(),null;const o=await this.refreshTokens(r??t);return o&&(this.setCurrentSession(o),this.refreshRetryCount=0,this.refreshBlockedUntil=0,this.scheduleTokenRefresh()),o}).catch(r=>(console.error("Background token refresh failed:",r),null)).finally(()=>{this.refreshPromise=null}))}async switchOrganization(t){if(!t)throw new K("INVALID_REQUEST","organizationId is required");return this.managementRequests.clear(),this.withRefreshLock(async()=>{const r=this.sessionGeneration,o=this.getCurrentSession(),n=await this.requestTokens(o,{organization_id:t});if(!this.isCurrentGeneration(r))throw new K("SESSION_CHANGED","the session changed while switching organization");return this.setCurrentSession(n),this.scheduleTokenRefresh(),this.forgetManagementTokens(),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 getManagementToken(t){const r=t1(t),o=this.getCurrentSession();if(!o)throw new Vr("NOT_AUTHENTICATED","there is no session to get a management token for");const n=this.usableManagementToken(r,o);if(n)return n;const i=this.managementRequests.get(r);if(i)return i;const s=this.withRefreshLock(()=>this.requestManagementToken(r)).finally(()=>{this.managementRequests.get(r)===s&&this.managementRequests.delete(r)});return this.managementRequests.set(r,s),s}hasScope(t){const r=t.trim(),o=this.getCurrentSession();if(!r||!o)return!1;if(this.accessTokenScopes(o).includes(r))return!0;const n=this.sessionOwner(o);for(const i of this.managementTokens.values())if(i.owner===n&&i.token.scopes.includes(r))return!0;return!1}async requestManagementToken(t){var u;const r=this.sessionGeneration,o=this.getStoredSession();if(!o||this.isSessionExpired(o))throw new Vr("NOT_AUTHENTICATED","there is no session to get a management token for");const n=this.usableManagementToken(t,o);if(n)return n;const i=this.sessionOwner(o),s={grant_type:"refresh_token",client_id:(u=Q.getConfig())==null?void 0:u.appId,resource:t};o.refresh_token&&(s.refresh_token=o.refresh_token);let d;try{d=await Mn.Instance.postForm("/oauth2/token",s)}catch(b){throw this.isCurrentGeneration(r)?(mp(b)?(console.error("Management token refresh rejected, signing out:",xn(b)),$i(),this.clearSession()):b instanceof K&&r1.has(b.code)&&this.managementTokens.delete(t),Vr.from(b)):new Vr("SESSION_CHANGED","the session changed while getting a management token")}if(!this.isCurrentGeneration(r))throw new Vr("SESSION_CHANGED","the session changed while getting a management token");d.refresh_token&&d.refresh_token!==o.refresh_token&&this.setCurrentSession({...o,refresh_token:d.refresh_token});const c={access_token:d.access_token,token_type:d.token_type??"Bearer",expires_at:Date.now()+d.expires_in*1e3,scopes:Ci(d.scope),audience:t};return this.managementTokens.set(t,{token:c,owner:i}),c}usableManagementToken(t,r){const o=this.managementTokens.get(t);return!o||o.owner!==this.sessionOwner(r)?null:Date.now()<o.token.expires_at-$t.MANAGEMENT_TOKEN_EXPIRY_MARGIN_MS?o.token:null}forgetManagementTokens(){this.managementTokens.clear(),this.managementRequests.clear()}sessionOwner(t){const r=t.access_token?this.decodeJWT(t.access_token):null,o=n=>typeof n=="string"?n:"";return[o(r==null?void 0:r.sid),o(r==null?void 0:r.sub),o(r==null?void 0:r.org_id)].join("|")}accessTokenScopes(t){if(t.scope!==void 0)return Ci(t.scope);const r=t.access_token?this.decodeJWT(t.access_token):null;return Ci((r==null?void 0:r.scope)??(r==null?void 0:r.scp))}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)?mp(o)?(console.error("Token refresh rejected, signing out:",xn(o)),$i(),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 Mn.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=Q.getConfig())==null?void 0:i.appId};t!=null&&t.refresh_token&&(o.refresh_token=t.refresh_token);const n=await Mn.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,...n.scope??(t==null?void 0:t.scope)?{scope:n.scope??(t==null?void 0:t.scope)}:{}}}async readCurrentToken(){var r;const t=(r=Q.getConfig())==null?void 0:r.appId;if(!t)return null;try{const o=await Mn.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:KP()==="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 n1(o)&&$i(),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>=$t.MAX_REFRESH_RETRIES){console.warn("Token refresh gave up after",this.refreshRetryCount,"attempts"),this.refreshRetryCount=0,this.refreshBlockedUntil=0;return}const r=Math.min($t.REFRESH_RETRY_BASE_MS*2**this.refreshRetryCount,$t.MAX_REFRESH_RETRY_DELAY_MS);this.refreshRetryCount+=1,this.refreshBlockedUntil=Date.now()+r,this.refreshTimeoutId=setTimeout(()=>{this.refreshBlockedUntil=0,this.triggerBackgroundRefresh(t)},r)}},S($t,"MAX_REFRESH_RETRIES",5),S($t,"REFRESH_RETRY_BASE_MS",5e3),S($t,"MAX_REFRESH_RETRY_DELAY_MS",6e4),S($t,"MANAGEMENT_TOKEN_EXPIRY_MARGIN_MS",6e4),S($t,"instance"),$t);function mp(e){return!(e instanceof K)||e.status===void 0?!1:e.status===401?!0:e.status===400&&e1.has(e.code)}var e1=new Set(["invalid_grant","invalid_client"]),r1=new Set(["invalid_scope","invalid_target"]);function n1(e){return e instanceof K&&e.status!==void 0&&e.status>=400&&e.status<500}function xn(e){return e instanceof K?`${e.code} (status ${e.status??"none"}): ${e.message}`:String(e)}var Cu=class{constructor(e=sessionStorage){S(this,"storage");S(this,"FLOW_STATE_KEY","pontive_loginflow_state");S(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}},wr,ts=(wr=class{static detect(t,r=window.location){if(wr.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(wr.INVITE_TOKEN_PARAM)}catch{return!1}}},S(wr,"INVITE_TOKEN_PARAM","invite_token"),wr),Eu=class{constructor(){S(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)}},o1=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,i1=(Qt=class{constructor(t,r,o=window.location,n,i){S(this,"httpClient",Mn.Instance);S(this,"flowId");S(this,"redirectTimeoutId",null);S(this,"flowStateManager");S(this,"flowEventBus");S(this,"location");S(this,"navigationTypeDetector");S(this,"eventHandlers",new Map([["switch_to_signin",this.handleSwitchToSignin.bind(this)],["switch_to_signup",this.handleSwitchToSignup.bind(this)],["continue_here",this.handleContinueHere.bind(this)]]));S(this,"linkWatchTimer",null);S(this,"linkWatchGeneration",0);S(this,"waitingForLink",!1);const s=Q.getConfig();if(!s.domain)throw new K("CONFIG_ERROR","Domain is required");if(!s.appId)throw new K("CONFIG_ERROR","App ID is required");this.flowId=t,this.location=o,this.flowStateManager=n||new Cu,this.flowEventBus=r||new Eu,this.navigationTypeDetector=i||new o1,Et.Instance.cleanExpiredSession(),Et.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,messages:d.messages,auth_result:d.auth_result}}async startFlow(t,r){if(!r.app_id)throw new K("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 K("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 K?i:new K(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 K("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,...t.scope?{scope:t.scope}:{}};Et.Instance.setCurrentSession(r),Et.Instance.scheduleTokenRefresh(),this.flowStateManager.clearFlowState();const{onAuthenticated:o}=Q.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=Q.getConfig(),r=ts.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 K("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,messages:nl(o.data)}}catch(o){return this.flowStateManager.clearFlowState(),console.warn("Failed to resume flow, starting fresh:",o),await this.startNewFlow(r)}}async startNewFlow(t){const r=Q.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,scope:ZP(r.scope),flow_id:this.determineFlowId(t),metadata:n,auth_base_url:Q.getApiBaseUrl()},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,messages:nl(d.data)}}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 K("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=Q.getConfig()).onFlowStateChange)==null||n.call(o,{eventType:"flow_continued_elsewhere",flowType:t,state:r})}static flowIsGone(t){return t instanceof K&&t.status===401}stopWatchingForLink(){this.waitingForLink=!1,this.linkWatchGeneration++,this.linkWatchTimer!==null&&(clearTimeout(this.linkWatchTimer),this.linkWatchTimer=null)}async handleContinueHere(){const{continueHereUrl:t}=Q.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=Q.getConfig();return this.redirect({url:this.withCurrentQuery(t.signinUrl),redirect_delay:0}),{state:"End"}}async handleSwitchToSignup(){const t=Q.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()}},S(Qt,"LINK_POLL_INTERVAL_MS",3e3),S(Qt,"LINK_POLL_LIMIT_MS",900*1e3),Qt),s1=class{constructor(e){S(this,"delayMs");S(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}},a1=class{pushState(e,t,r){history.pushState(e,t,r)}replaceState(e,t,r){history.replaceState(e,t,r)}get state(){return history.state}},l1=class{constructor(e,t,r=!1,o=window.location,n,i){S(this,"popstateListener",null);S(this,"pageshowListener",null);S(this,"debouncer");S(this,"isProcessing",!1);S(this,"isHandlingNavigationEvent",!1);S(this,"onFlowRestartNeeded",null);S(this,"skipHistoryTracking");S(this,"flowStateManager");S(this,"historyAdapter");S(this,"location");this.onFlowRestartNeeded=t,this.skipHistoryTracking=r,this.debouncer=new s1(200),this.location=o,this.flowStateManager=n||new Cu,this.historyAdapter=i||new a1,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=Q.getConfig(),n=ts.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=Q.getConfig(),o=ts.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}},Br=new AbortController,d1=class{constructor(){S(this,"httpClient",Mn.Instance);S(this,"capabilities",{webauthn:!1});S(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;Br.abort(),Br=new AbortController;const r=this.toPublicKeyCredentialCreationOptions(e),o={signal:Br.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 b;if(typeof d.getPublicKeyAlgorithm=="function")try{b=d.getPublicKeyAlgorithm()}catch(y){Us("getPublicKeyAlgorithm()",y)}let _;if(typeof d.getPublicKey=="function")try{const y=d.getPublicKey();y!==null&&(_=this.bufferToBase64URLString(y))}catch(y){Us("getPublicKey()",y)}let w;if(typeof d.getAuthenticatorData=="function")try{w=this.bufferToBase64URLString(d.getAuthenticatorData())}catch(y){Us("getAuthenticatorData()",y)}return{id:i,rawId:this.bufferToBase64URLString(s),response:{attestationObject:this.bufferToBase64URLString(d.attestationObject),clientDataJSON:this.bufferToBase64URLString(d.clientDataJSON),transports:u,publicKeyAlgorithm:b,publicKey:_,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 qr?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;Br.abort(),Br=new AbortController;const r=this.toPublicKeyCredentialRequestOptions(e),o={signal:Br.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 qr?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 qr({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new qr({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(c1(o)){if(r.rpId!==o)return new qr({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new qr({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new qr({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(){Br.abort()}};function Us(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
|
|
2738
|
+
`,t)}var qr=class extends Error{constructor({message:t,code:r,cause:o,name:n}){super(t);S(this,"code");this.name=n??o.name,this.code=r}};function c1(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}var xe,p1=(xe=class{constructor(){S(this,"configured",!1);S(this,"configuredResolve");S(this,"configuredPromise",new Promise(t=>{this.configuredResolve=t}));S(this,"loginflow",null);S(this,"navigationManager",null);S(this,"flowEventBus",null);S(this,"webauthnService",null)}static get Instance(){return xe.instance||(xe.instance=new xe),xe.instance}ensureConfigured(){if(!this.configured)throw new K("NOT_CONFIGURED","Auth.configure() must be called before using Auth methods")}ensureLoginflowInitialized(){if(!this.loginflow)throw new K("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 d1,this.webauthnService.detectCapabilities(),this.flowEventBus=new Eu,this.navigationManager=new l1(this.flowEventBus,async()=>{console.log("[AuthService] Navigation restart triggered, restarting loginflow"),await this.startLoginflowInternal(void 0,!1)},r);const o=await i1.init(t,this.flowEventBus),n=Q.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,messages:o.messages};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,messages:o.messages}),i}configure(t){if(!t.domain||!t.appId)throw new K("CONFIG_ERROR","domain and appId are required");Q.setConfig(t),this.configured=!0,this.configuredResolve()}whenConfigured(){return this.configuredPromise}isAuthenticated(){return this.ensureConfigured(),Et.Instance.isAuthenticated()}getCurrentSession(){return this.ensureConfigured(),Et.Instance.getCurrentSession()}async restoreSession(){return this.ensureConfigured(),Et.Instance.restoreSession()}getAuthenticatedUser(){return this.ensureConfigured(),Et.Instance.getAuthenticatedUser()}getOrganization(){return this.ensureConfigured(),Et.Instance.getOrganization()}async switchOrganization(t){return this.ensureConfigured(),Et.Instance.switchOrganization(t)}async getManagementToken(t){return this.ensureConfigured(),Et.Instance.getManagementToken(t)}hasScope(t){return this.ensureConfigured(),Et.Instance.hasScope(t)}async startLoginflow(t){return this.startLoginflowInternal(t,!1)}async processLoginflowEvent(t){var i,s;this.ensureConfigured(),this.ensureLoginflowInitialized();const r=Q.getConfig(),o=ts.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,messages:nl(n.data)})}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(){Et.Instance.clearSession()}async signOut(t){var n;this.ensureConfigured();const r=h1(Et.Instance.peekSession()),o=((n=Q.getConfig())==null?void 0:n.appId)??"";if($i(),Et.Instance.clearSession(),Et.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),!Q.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(`${Q.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),`${Q.getApiBaseUrl()}/oauth2/logout?${n.toString()}`}},S(xe,"instance"),xe);function h1(e){for(const t of[e==null?void 0:e.id_token,e==null?void 0:e.access_token]){if(!t)continue;const r=Et.Instance.decodeJWT(t);if(typeof(r==null?void 0:r.sid)=="string"&&r.sid)return r.sid}}var V=p1.Instance,u1=Object.defineProperty,m1=(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&&u1(t,r,n),n};class ge extends v{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))}}m1([a({type:Boolean})],ge.prototype,"shadow");const dr="pont:auth",vo={showWatermark:!0},ei="pont:branding";class f1{constructor(t){this.consumer=new Ei(t,{context:ei,subscribe:!0})}get showWatermark(){var t;return((t=this.consumer.value)==null?void 0:t.showWatermark)??vo.showWatermark}}const Su="pont:design-mode";class ri{constructor(t){this.host=t,this.consumer=new Ei(t,{context:Su,subscribe:!0})}get active(){return this.host.hasAttribute("design-mode")?this.host.getAttribute("design-mode")!=="false":this.consumer.value??!1}}const xu="pont:env",Ou=Symbol("renderSpecContext"),ni="pont-user-context",Yl="";function Jt(...e){return yh(bl(e))}function g1(e){return Object.entries(e).filter(([t,r])=>typeof r!="object"&&r!=null).map(([t,r])=>`${t}: ${r};`).join(" ")}function v1(e){document.documentElement.setAttribute("data-theme",e)}function b1(){const e=document.documentElement.getAttribute("data-theme");(!e||e!=="light"&&e!=="dark")&&v1("light")}function _1(e,t){return e?e.includes("{{theme}}")?e.replace("{{theme}}",t):e:""}function sl(){return new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))})}const fp="abcdefghijklmnopqrstuvwxyz0123456789",y1=6;function w1(e){let t="";for(let r=0;r<y1;r++)t+=fp.charAt(Math.floor(Math.random()*fp.length));return t}const _t=()=>w1();function ls(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 $1(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 P1(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 C1(e){return/^https?:\/\//.test(e)||e!=null&&e.startsWith("data:image/svg+xml;base64,")?e:`data:image/svg+xml;base64,${e}`}function Ql(){var e;return(e=V.getCurrentSession())==null?void 0:e.access_token}function al(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(Gi(),{weekday:"long"}):r.toLocaleDateString(Gi(),{year:"numeric",month:"short",day:"numeric"})}function ll(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(Gi(),{hour:"2-digit",minute:"2-digit",hour12:!1})}function ds(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 E1(e){return e instanceof Error&&"status"in e}function cs(e,t){var r,o;return E1(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 On={variant:"secondary",size:"default",content:"label",iconAlign:"start",label:"Continue with Passkey"},Rn={variant:"outline",size:"default",content:"icon-label",iconAlign:"start",prompt:"Continue with"},In={variant:"default",size:"default",content:"label",iconAlign:"end",label:"Submit"},S1={apple:"Apple",discord:"Discord",facebook:"Facebook",github:"GitHub",google:"Google",linkedin:"LinkedIn",meta:"Meta",microsoft:"Microsoft",x:"X"},x1={apple:G`<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:G`<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:G`<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:G`<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:G`<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:G`<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:G`<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:G`<path d="M11.4 24H0V12.6h11.4V24zM24 24H12.6V12.6H24V24zM11.4 11.4H0V0h11.4v11.4zM24 11.4H12.6V0H24v11.4z" />`,x:G`<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 O1=Object.defineProperty,R1=Object.getOwnPropertyDescriptor,te=(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.PontPasskeyButton=class extends v{constructor(){super(...arguments),this.seed=_t(),this.variant=On.variant,this.size=On.size,this.content=On.content,this.iconAlign=On.iconAlign,this._label=On.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 V.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:On.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`
|
|
2739
2739
|
<pont-spinner
|
|
2740
2740
|
id="${this.iconId}"
|
|
2741
2741
|
part="${exports.PontPasskeyButton.PARTS.icon}"
|
|
@@ -2776,7 +2776,7 @@
|
|
|
2776
2776
|
${this.content.includes("label")?this.label:h}
|
|
2777
2777
|
${this.iconAlign==="end"?this._renderIcon():h}
|
|
2778
2778
|
</pont-button>
|
|
2779
|
-
`}};exports.PontPasskeyButton.ROOT="passkey-button";exports.PontPasskeyButton.ICON="icon";exports.PontPasskeyButton.TAG=`${j}-${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}`};te([a({type:String})],exports.PontPasskeyButton.prototype,"seed",2);te([a({type:String,attribute:"custom-id"})],exports.PontPasskeyButton.prototype,"customId",2);te([a({type:String})],exports.PontPasskeyButton.prototype,"variant",2);te([a({type:String})],exports.PontPasskeyButton.prototype,"size",2);te([a({type:String})],exports.PontPasskeyButton.prototype,"content",2);te([a({type:String,attribute:"icon-align"})],exports.PontPasskeyButton.prototype,"iconAlign",2);te([a({type:String})],exports.PontPasskeyButton.prototype,"label",1);te([a({type:String})],exports.PontPasskeyButton.prototype,"event",2);te([a({type:Boolean})],exports.PontPasskeyButton.prototype,"disabled",2);te([a({type:Boolean})],exports.PontPasskeyButton.prototype,"loading",2);te([g()],exports.PontPasskeyButton.prototype,"_loading",2);exports.PontPasskeyButton=te([p("pont-passkey-button")],exports.PontPasskeyButton);var I1=Object.defineProperty,T1=Object.getOwnPropertyDescriptor,Ut=(e,t,r,o)=>{for(var n=o>1?void 0:o?T1(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.PontProviderButton=class extends v{constructor(){super(...arguments),this.seed=_t(),this.design=new ri(this),this.variant=
|
|
2779
|
+
`}};exports.PontPasskeyButton.ROOT="passkey-button";exports.PontPasskeyButton.ICON="icon";exports.PontPasskeyButton.TAG=`${j}-${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}`};te([a({type:String})],exports.PontPasskeyButton.prototype,"seed",2);te([a({type:String,attribute:"custom-id"})],exports.PontPasskeyButton.prototype,"customId",2);te([a({type:String})],exports.PontPasskeyButton.prototype,"variant",2);te([a({type:String})],exports.PontPasskeyButton.prototype,"size",2);te([a({type:String})],exports.PontPasskeyButton.prototype,"content",2);te([a({type:String,attribute:"icon-align"})],exports.PontPasskeyButton.prototype,"iconAlign",2);te([a({type:String})],exports.PontPasskeyButton.prototype,"label",1);te([a({type:String})],exports.PontPasskeyButton.prototype,"event",2);te([a({type:Boolean})],exports.PontPasskeyButton.prototype,"disabled",2);te([a({type:Boolean})],exports.PontPasskeyButton.prototype,"loading",2);te([g()],exports.PontPasskeyButton.prototype,"_loading",2);exports.PontPasskeyButton=te([p("pont-passkey-button")],exports.PontPasskeyButton);var I1=Object.defineProperty,T1=Object.getOwnPropertyDescriptor,Ut=(e,t,r,o)=>{for(var n=o>1?void 0:o?T1(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.PontProviderButton=class extends v{constructor(){super(...arguments),this.seed=_t(),this.design=new ri(this),this.variant=Rn.variant,this.size=Rn.size,this.content=Rn.content,this.iconAlign=Rn.iconAlign,this._prompt=Rn.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 V.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:Rn.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`
|
|
2780
2780
|
<pont-spinner
|
|
2781
2781
|
id="${this.iconId}"
|
|
2782
2782
|
part="${exports.PontProviderButton.PARTS.icon}"
|
|
@@ -2808,7 +2808,7 @@
|
|
|
2808
2808
|
${this.content.includes("label")?r:h}
|
|
2809
2809
|
${this.iconAlign==="end"?this._renderIcon():h}
|
|
2810
2810
|
</pont-button>
|
|
2811
|
-
`}};exports.PontProviderButton.ROOT="provider-button";exports.PontProviderButton.ICON="icon";exports.PontProviderButton.TAG=`${j}-${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}`};Ut([a({type:String})],exports.PontProviderButton.prototype,"seed",2);Ut([a({type:String,attribute:"custom-id"})],exports.PontProviderButton.prototype,"customId",2);Ut([a({type:String})],exports.PontProviderButton.prototype,"provider",2);Ut([a({type:String})],exports.PontProviderButton.prototype,"variant",2);Ut([a({type:String})],exports.PontProviderButton.prototype,"size",2);Ut([a({type:String})],exports.PontProviderButton.prototype,"content",2);Ut([a({type:String,attribute:"icon-align"})],exports.PontProviderButton.prototype,"iconAlign",2);Ut([a({type:String})],exports.PontProviderButton.prototype,"prompt",1);Ut([a({type:String})],exports.PontProviderButton.prototype,"label",2);Ut([a({type:String})],exports.PontProviderButton.prototype,"event",2);Ut([a({type:Boolean})],exports.PontProviderButton.prototype,"disabled",2);Ut([a({type:Boolean})],exports.PontProviderButton.prototype,"loading",2);Ut([g()],exports.PontProviderButton.prototype,"_loading",2);exports.PontProviderButton=Ut([p("pont-provider-button")],exports.PontProviderButton);var A1=Object.defineProperty,D1=Object.getOwnPropertyDescriptor,ve=(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&&A1(t,r,n),n};exports.PontSubmitButton=class extends v{constructor(){super(...arguments),this.seed=_t(),this.variant=
|
|
2811
|
+
`}};exports.PontProviderButton.ROOT="provider-button";exports.PontProviderButton.ICON="icon";exports.PontProviderButton.TAG=`${j}-${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}`};Ut([a({type:String})],exports.PontProviderButton.prototype,"seed",2);Ut([a({type:String,attribute:"custom-id"})],exports.PontProviderButton.prototype,"customId",2);Ut([a({type:String})],exports.PontProviderButton.prototype,"provider",2);Ut([a({type:String})],exports.PontProviderButton.prototype,"variant",2);Ut([a({type:String})],exports.PontProviderButton.prototype,"size",2);Ut([a({type:String})],exports.PontProviderButton.prototype,"content",2);Ut([a({type:String,attribute:"icon-align"})],exports.PontProviderButton.prototype,"iconAlign",2);Ut([a({type:String})],exports.PontProviderButton.prototype,"prompt",1);Ut([a({type:String})],exports.PontProviderButton.prototype,"label",2);Ut([a({type:String})],exports.PontProviderButton.prototype,"event",2);Ut([a({type:Boolean})],exports.PontProviderButton.prototype,"disabled",2);Ut([a({type:Boolean})],exports.PontProviderButton.prototype,"loading",2);Ut([g()],exports.PontProviderButton.prototype,"_loading",2);exports.PontProviderButton=Ut([p("pont-provider-button")],exports.PontProviderButton);var A1=Object.defineProperty,D1=Object.getOwnPropertyDescriptor,ve=(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&&A1(t,r,n),n};exports.PontSubmitButton=class extends v{constructor(){super(...arguments),this.seed=_t(),this.variant=In.variant,this.size=In.size,this.content=In.content,this.iconAlign=In.iconAlign,this._label=In.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:In.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`
|
|
2812
2812
|
<pont-spinner
|
|
2813
2813
|
id="${this.iconId}"
|
|
2814
2814
|
part="${exports.PontSubmitButton.PARTS.icon}"
|
|
@@ -2847,7 +2847,7 @@
|
|
|
2847
2847
|
${this.content.includes("label")?this.label:h}
|
|
2848
2848
|
${this.iconAlign==="end"?this._renderIcon():h}
|
|
2849
2849
|
</pont-button>
|
|
2850
|
-
`}};exports.PontSubmitButton.ROOT="submit-button";exports.PontSubmitButton.ICON="icon";exports.PontSubmitButton.TAG=`${j}-${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}`};ve([a({type:String})],exports.PontSubmitButton.prototype,"seed",2);ve([a({type:String,attribute:"custom-id"})],exports.PontSubmitButton.prototype,"customId",2);ve([a({type:String})],exports.PontSubmitButton.prototype,"variant",2);ve([a({type:String})],exports.PontSubmitButton.prototype,"size",2);ve([a({type:String})],exports.PontSubmitButton.prototype,"content",2);ve([a({type:String,attribute:"icon-align"})],exports.PontSubmitButton.prototype,"iconAlign",2);ve([a({type:String})],exports.PontSubmitButton.prototype,"label",1);ve([a({type:String})],exports.PontSubmitButton.prototype,"event",2);ve([a({type:Boolean})],exports.PontSubmitButton.prototype,"disabled",2);ve([a({type:Boolean})],exports.PontSubmitButton.prototype,"loading",2);exports.PontSubmitButton=ve([p("pont-submit-button")],exports.PontSubmitButton);var L1=Object.defineProperty,k1=Object.getOwnPropertyDescriptor,W=(e,t,r,o)=>{for(var n=o>1?void 0:o?k1(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&&L1(t,r,n),n};exports.PontPasswordField=class extends v{constructor(){super(...arguments),this.seed=_t(),this._name=tr.name,this._label=tr.label,this.variant=tr.variant,this.rules=tr.rules,this.validation=tr.validation,this._forgotLabel=tr.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
|
|
2850
|
+
`}};exports.PontSubmitButton.ROOT="submit-button";exports.PontSubmitButton.ICON="icon";exports.PontSubmitButton.TAG=`${j}-${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}`};ve([a({type:String})],exports.PontSubmitButton.prototype,"seed",2);ve([a({type:String,attribute:"custom-id"})],exports.PontSubmitButton.prototype,"customId",2);ve([a({type:String})],exports.PontSubmitButton.prototype,"variant",2);ve([a({type:String})],exports.PontSubmitButton.prototype,"size",2);ve([a({type:String})],exports.PontSubmitButton.prototype,"content",2);ve([a({type:String,attribute:"icon-align"})],exports.PontSubmitButton.prototype,"iconAlign",2);ve([a({type:String})],exports.PontSubmitButton.prototype,"label",1);ve([a({type:String})],exports.PontSubmitButton.prototype,"event",2);ve([a({type:Boolean})],exports.PontSubmitButton.prototype,"disabled",2);ve([a({type:Boolean})],exports.PontSubmitButton.prototype,"loading",2);exports.PontSubmitButton=ve([p("pont-submit-button")],exports.PontSubmitButton);var L1=Object.defineProperty,k1=Object.getOwnPropertyDescriptor,W=(e,t,r,o)=>{for(var n=o>1?void 0:o?k1(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&&L1(t,r,n),n};exports.PontPasswordField=class extends v{constructor(){super(...arguments),this.seed=_t(),this._name=tr.name,this._label=tr.label,this.variant=tr.variant,this.rules=tr.rules,this.validation=tr.validation,this._forgotLabel=tr.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 V.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:tr.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:tr.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 Bt(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 bo(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 _o(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 Be(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:tr.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`
|
|
2851
2851
|
<span
|
|
2852
2852
|
id="${this.markId}"
|
|
2853
2853
|
part="${exports.PontPasswordField.PARTS.mark}"
|
|
@@ -2921,7 +2921,7 @@
|
|
|
2921
2921
|
</pont-field-description>
|
|
2922
2922
|
`:h}
|
|
2923
2923
|
</pont-field>
|
|
2924
|
-
`}};exports.PontPasswordField.ROOT="password-field";exports.PontPasswordField.LABEL="label";exports.PontPasswordField.MARK="mark";exports.PontPasswordField.FORGOT="forgot";exports.PontPasswordField.DESCRIPTION="description";exports.PontPasswordField.INPUT="input";exports.PontPasswordField.ERROR="error";exports.PontPasswordField.TAG=`${j}-${exports.PontPasswordField.ROOT}`;exports.PontPasswordField.VALIDATE_EVENT=`${exports.PontPasswordField.TAG}:validate`;exports.PontPasswordField.FORGOT_CLICK_EVENT=`${exports.PontPasswordField.TAG}:forgot-click`;exports.PontPasswordField.FORGOT_SUCCESS_EVENT=`${exports.PontPasswordField.TAG}:forgot-success`;exports.PontPasswordField.FORGOT_ERROR_EVENT=`${exports.PontPasswordField.TAG}:forgot-error`;exports.PontPasswordField.PARTS={root:exports.PontPasswordField.ROOT,label:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.LABEL}`,mark:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.MARK}`,forgot:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.FORGOT}`,description:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.DESCRIPTION}`,input:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.INPUT}`,error:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.ERROR}`};exports.PontPasswordField.INPUT_SELECTORS=`pont-input[part="${exports.PontPasswordField.PARTS.input}"], pont-password-input[part="${exports.PontPasswordField.PARTS.input}"]`;exports.PontPasswordField.RULE_PATTERNS={uppercase:/[A-Z]/,lowercase:/[a-z]/,number:/[0-9]/,special:/[!@#$%^&*()_=+{}[\]|\\;:"<>,./?-]/};W([a({type:String})],exports.PontPasswordField.prototype,"seed",2);W([a({type:String,attribute:"custom-id"})],exports.PontPasswordField.prototype,"customId",2);W([a({type:String,attribute:"input-id"})],exports.PontPasswordField.prototype,"inputId",1);W([a({type:String})],exports.PontPasswordField.prototype,"name",1);W([a({type:String,attribute:"default-value"})],exports.PontPasswordField.prototype,"defaultValue",2);W([a({type:String})],exports.PontPasswordField.prototype,"label",1);W([a({type:String})],exports.PontPasswordField.prototype,"placeholder",2);W([a({type:String})],exports.PontPasswordField.prototype,"description",2);W([a({type:String})],exports.PontPasswordField.prototype,"variant",2);W([a({type:String})],exports.PontPasswordField.prototype,"mark",2);W([a({type:Boolean})],exports.PontPasswordField.prototype,"caret",2);W([a({type:String})],exports.PontPasswordField.prototype,"autocomplete",2);W([a({type:Boolean})],exports.PontPasswordField.prototype,"disabled",2);W([a({type:Boolean})],exports.PontPasswordField.prototype,"required",2);W([a({type:Number})],exports.PontPasswordField.prototype,"minlength",1);W([a({type:Number})],exports.PontPasswordField.prototype,"maxlength",1);W([a({type:Array})],exports.PontPasswordField.prototype,"rules",2);W([a({type:String})],exports.PontPasswordField.prototype,"validation",2);W([a({type:String,attribute:"required-error"})],exports.PontPasswordField.prototype,"requiredError",1);W([a({type:String,attribute:"minlength-error"})],exports.PontPasswordField.prototype,"minlengthError",1);W([a({type:String,attribute:"maxlength-error"})],exports.PontPasswordField.prototype,"maxlengthError",1);W([a({type:String,attribute:"format-error"})],exports.PontPasswordField.prototype,"formatError",1);W([a({type:Boolean})],exports.PontPasswordField.prototype,"forgot",2);W([a({type:String,attribute:"forgot-label"})],exports.PontPasswordField.prototype,"forgotLabel",1);W([a({type:String,attribute:"forgot-event"})],exports.PontPasswordField.prototype,"forgotEvent",2);W([g()],exports.PontPasswordField.prototype,"_invalid",2);W([g()],exports.PontPasswordField.prototype,"_errors",2);W([g()],exports.PontPasswordField.prototype,"_value",2);W([g()],exports.PontPasswordField.prototype,"_loading",2);exports.PontPasswordField=W([p("pont-password-field")],exports.PontPasswordField);const Bt=e=>`${e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()} is a required field.`,Be=e=>`Please enter a valid ${e.toLowerCase()}.`,
|
|
2924
|
+
`}};exports.PontPasswordField.ROOT="password-field";exports.PontPasswordField.LABEL="label";exports.PontPasswordField.MARK="mark";exports.PontPasswordField.FORGOT="forgot";exports.PontPasswordField.DESCRIPTION="description";exports.PontPasswordField.INPUT="input";exports.PontPasswordField.ERROR="error";exports.PontPasswordField.TAG=`${j}-${exports.PontPasswordField.ROOT}`;exports.PontPasswordField.VALIDATE_EVENT=`${exports.PontPasswordField.TAG}:validate`;exports.PontPasswordField.FORGOT_CLICK_EVENT=`${exports.PontPasswordField.TAG}:forgot-click`;exports.PontPasswordField.FORGOT_SUCCESS_EVENT=`${exports.PontPasswordField.TAG}:forgot-success`;exports.PontPasswordField.FORGOT_ERROR_EVENT=`${exports.PontPasswordField.TAG}:forgot-error`;exports.PontPasswordField.PARTS={root:exports.PontPasswordField.ROOT,label:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.LABEL}`,mark:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.MARK}`,forgot:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.FORGOT}`,description:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.DESCRIPTION}`,input:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.INPUT}`,error:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.ERROR}`};exports.PontPasswordField.INPUT_SELECTORS=`pont-input[part="${exports.PontPasswordField.PARTS.input}"], pont-password-input[part="${exports.PontPasswordField.PARTS.input}"]`;exports.PontPasswordField.RULE_PATTERNS={uppercase:/[A-Z]/,lowercase:/[a-z]/,number:/[0-9]/,special:/[!@#$%^&*()_=+{}[\]|\\;:"<>,./?-]/};W([a({type:String})],exports.PontPasswordField.prototype,"seed",2);W([a({type:String,attribute:"custom-id"})],exports.PontPasswordField.prototype,"customId",2);W([a({type:String,attribute:"input-id"})],exports.PontPasswordField.prototype,"inputId",1);W([a({type:String})],exports.PontPasswordField.prototype,"name",1);W([a({type:String,attribute:"default-value"})],exports.PontPasswordField.prototype,"defaultValue",2);W([a({type:String})],exports.PontPasswordField.prototype,"label",1);W([a({type:String})],exports.PontPasswordField.prototype,"placeholder",2);W([a({type:String})],exports.PontPasswordField.prototype,"description",2);W([a({type:String})],exports.PontPasswordField.prototype,"variant",2);W([a({type:String})],exports.PontPasswordField.prototype,"mark",2);W([a({type:Boolean})],exports.PontPasswordField.prototype,"caret",2);W([a({type:String})],exports.PontPasswordField.prototype,"autocomplete",2);W([a({type:Boolean})],exports.PontPasswordField.prototype,"disabled",2);W([a({type:Boolean})],exports.PontPasswordField.prototype,"required",2);W([a({type:Number})],exports.PontPasswordField.prototype,"minlength",1);W([a({type:Number})],exports.PontPasswordField.prototype,"maxlength",1);W([a({type:Array})],exports.PontPasswordField.prototype,"rules",2);W([a({type:String})],exports.PontPasswordField.prototype,"validation",2);W([a({type:String,attribute:"required-error"})],exports.PontPasswordField.prototype,"requiredError",1);W([a({type:String,attribute:"minlength-error"})],exports.PontPasswordField.prototype,"minlengthError",1);W([a({type:String,attribute:"maxlength-error"})],exports.PontPasswordField.prototype,"maxlengthError",1);W([a({type:String,attribute:"format-error"})],exports.PontPasswordField.prototype,"formatError",1);W([a({type:Boolean})],exports.PontPasswordField.prototype,"forgot",2);W([a({type:String,attribute:"forgot-label"})],exports.PontPasswordField.prototype,"forgotLabel",1);W([a({type:String,attribute:"forgot-event"})],exports.PontPasswordField.prototype,"forgotEvent",2);W([g()],exports.PontPasswordField.prototype,"_invalid",2);W([g()],exports.PontPasswordField.prototype,"_errors",2);W([g()],exports.PontPasswordField.prototype,"_value",2);W([g()],exports.PontPasswordField.prototype,"_loading",2);exports.PontPasswordField=W([p("pont-password-field")],exports.PontPasswordField);const Bt=e=>`${e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()} is a required field.`,Be=e=>`Please enter a valid ${e.toLowerCase()}.`,bo=(e,t)=>t?`${e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()} must be at least ${t} characters.`:`Please enter a longer ${e.toLowerCase()}.`,_o=(e,t)=>t?`${e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()} can have at most ${t} characters.`:`Please enter a shorter ${e.toLowerCase()}.`,Tn={name:"email",label:"Email",pattern:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.source,validation:"default",requiredError:Bt("Email"),formatError:Be("Email")},An={name:"phone",label:"Phone",pattern:/^\+?(\d[\d-.() ]+)?(\([\d-.() ]+\))?[\d-.() ]+\d$/.source,validation:"default",requiredError:Bt("Phone"),formatError:Be("Phone")},Dn={name:"username",label:"Username",pattern:/^[a-z0-9_]*$/.source,validation:"default",requiredError:Bt("Username"),minlengthError:bo("Username"),maxlengthError:_o("Username"),formatError:Be("Username")},Ln={name:"name",label:"Name",pattern:/^[\p{L} .'-]*$/u.source,validation:"default",requiredError:Bt("Name"),minlengthError:bo("Name"),maxlengthError:_o("Name"),formatError:Be("Name")},So={name:"login_id",identifiers:[],label:"Identifier",validation:"default",requiredError:Bt("Identifier")},tr={name:"password",label:"Password",variant:"toggle",rules:[{name:"uppercase",error:"Must contain an uppercase letter."},{name:"lowercase",error:"Must contain a lowercase letter."},{name:"number",error:"Must contain a number."},{name:"special",error:"Must contain a special character."}],validation:"default",requiredError:Bt("Password"),minlengthError:bo("Password"),maxlengthError:_o("Password"),formatError:Be("Password"),forgotLabel:"Forgot your password?"},er={name:"confirm",label:"Confirm Password",variant:"toggle",pair:exports.PontPasswordField.TAG,validation:"default",requiredError:Bt("Confirm Password"),matchError:"Passwords do not match."};var F1=Object.defineProperty,N1=Object.getOwnPropertyDescriptor,dt=(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&&F1(t,r,n),n};exports.PontConfirmField=class extends v{constructor(){super(...arguments),this.seed=_t(),this._name=er.name,this._label=er.label,this.variant=er.variant,this.pair=er.pair,this.validation=er.validation,this._matchError=er.matchError,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,o=`${exports.PontConfirmField.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.PontConfirmField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontConfirmField.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:er.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:er.label,this.requestUpdate("label",r)}get _defaultRequiredError(){return Bt(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 matchError(){return this._matchError}set matchError(t){const r=this._matchError;this._matchError=t.length?t:er.matchError,this.requestUpdate("matchError",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontConfirmField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontConfirmField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontConfirmField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontConfirmField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontConfirmField.ERROR}`}get value(){const t=this.defaultValue??"";return this._dirty?this._value:t}get pairValue(){const r=(this._form??document).querySelector(this.pair);return r?r.value:""}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontConfirmField.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,c={selector:this.pair,value:this.pairValue};this.dispatchEvent(new CustomEvent(exports.PontConfirmField.VALIDATE_EVENT,{detail:{id:n,inputId:i,name:s,value:d,valid:t,type:r,pair:c,message:o},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success","Valid confirm.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;return this.required&&!t?(this._onValidateError("required",this.requiredError),!1):!t||this.validation==="simple"?(this._onValidateSuccess(),!0):t!==this.pairValue?(this._onValidateError("match",this.matchError),!1):(this._onValidateSuccess(),!0)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
|
|
2925
2925
|
<span
|
|
2926
2926
|
id="${this.markId}"
|
|
2927
2927
|
part="${exports.PontConfirmField.PARTS.mark}"
|
|
@@ -2983,7 +2983,7 @@
|
|
|
2983
2983
|
</pont-field-description>
|
|
2984
2984
|
`:h}
|
|
2985
2985
|
</pont-field>
|
|
2986
|
-
`}};exports.PontConfirmField.ROOT="confirm-field";exports.PontConfirmField.LABEL="label";exports.PontConfirmField.MARK="mark";exports.PontConfirmField.DESCRIPTION="description";exports.PontConfirmField.INPUT="input";exports.PontConfirmField.ERROR="error";exports.PontConfirmField.TAG=`${j}-${exports.PontConfirmField.ROOT}`;exports.PontConfirmField.VALIDATE_EVENT=`${exports.PontConfirmField.TAG}:validate`;exports.PontConfirmField.PARTS={root:exports.PontConfirmField.ROOT,label:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.LABEL}`,mark:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.MARK}`,description:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.DESCRIPTION}`,input:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.INPUT}`,error:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.ERROR}`};exports.PontConfirmField.INPUT_SELECTORS=`pont-input[part="${exports.PontConfirmField.PARTS.input}"], pont-password-input[part="${exports.PontConfirmField.PARTS.input}"]`;dt([a({type:String})],exports.PontConfirmField.prototype,"seed",2);dt([a({type:String,attribute:"custom-id"})],exports.PontConfirmField.prototype,"customId",2);dt([a({type:String,attribute:"input-id"})],exports.PontConfirmField.prototype,"inputId",1);dt([a({type:String})],exports.PontConfirmField.prototype,"name",1);dt([a({type:String,attribute:"default-value"})],exports.PontConfirmField.prototype,"defaultValue",2);dt([a({type:String})],exports.PontConfirmField.prototype,"label",1);dt([a({type:String})],exports.PontConfirmField.prototype,"placeholder",2);dt([a({type:String})],exports.PontConfirmField.prototype,"description",2);dt([a({type:String})],exports.PontConfirmField.prototype,"variant",2);dt([a({type:String})],exports.PontConfirmField.prototype,"mark",2);dt([a({type:Boolean})],exports.PontConfirmField.prototype,"caret",2);dt([a({type:String})],exports.PontConfirmField.prototype,"autocomplete",2);dt([a({type:Boolean})],exports.PontConfirmField.prototype,"disabled",2);dt([a({type:Boolean})],exports.PontConfirmField.prototype,"required",2);dt([a({type:String})],exports.PontConfirmField.prototype,"pair",2);dt([a({type:String})],exports.PontConfirmField.prototype,"validation",2);dt([a({type:String,attribute:"required-error"})],exports.PontConfirmField.prototype,"requiredError",1);dt([a({type:String,attribute:"match-error"})],exports.PontConfirmField.prototype,"matchError",1);dt([g()],exports.PontConfirmField.prototype,"_invalid",2);dt([g()],exports.PontConfirmField.prototype,"_error",2);dt([g()],exports.PontConfirmField.prototype,"_value",2);exports.PontConfirmField=dt([p("pont-confirm-field")],exports.PontConfirmField);function Ru(e=M1()){var r;if(!e)return;const t=(r=new URLSearchParams(e).get("login_hint"))==null?void 0:r.trim();return t||void 0}function M1(){return typeof window>"u"?void 0:window.location.search}var U1=Object.defineProperty,B1=Object.getOwnPropertyDescriptor,mt=(e,t,r,o)=>{for(var n=o>1?void 0:o?B1(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&&U1(t,r,n),n};exports.PontEmailField=class extends v{constructor(){super(...arguments),this.seed=_t(),this._name=
|
|
2986
|
+
`}};exports.PontConfirmField.ROOT="confirm-field";exports.PontConfirmField.LABEL="label";exports.PontConfirmField.MARK="mark";exports.PontConfirmField.DESCRIPTION="description";exports.PontConfirmField.INPUT="input";exports.PontConfirmField.ERROR="error";exports.PontConfirmField.TAG=`${j}-${exports.PontConfirmField.ROOT}`;exports.PontConfirmField.VALIDATE_EVENT=`${exports.PontConfirmField.TAG}:validate`;exports.PontConfirmField.PARTS={root:exports.PontConfirmField.ROOT,label:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.LABEL}`,mark:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.MARK}`,description:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.DESCRIPTION}`,input:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.INPUT}`,error:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.ERROR}`};exports.PontConfirmField.INPUT_SELECTORS=`pont-input[part="${exports.PontConfirmField.PARTS.input}"], pont-password-input[part="${exports.PontConfirmField.PARTS.input}"]`;dt([a({type:String})],exports.PontConfirmField.prototype,"seed",2);dt([a({type:String,attribute:"custom-id"})],exports.PontConfirmField.prototype,"customId",2);dt([a({type:String,attribute:"input-id"})],exports.PontConfirmField.prototype,"inputId",1);dt([a({type:String})],exports.PontConfirmField.prototype,"name",1);dt([a({type:String,attribute:"default-value"})],exports.PontConfirmField.prototype,"defaultValue",2);dt([a({type:String})],exports.PontConfirmField.prototype,"label",1);dt([a({type:String})],exports.PontConfirmField.prototype,"placeholder",2);dt([a({type:String})],exports.PontConfirmField.prototype,"description",2);dt([a({type:String})],exports.PontConfirmField.prototype,"variant",2);dt([a({type:String})],exports.PontConfirmField.prototype,"mark",2);dt([a({type:Boolean})],exports.PontConfirmField.prototype,"caret",2);dt([a({type:String})],exports.PontConfirmField.prototype,"autocomplete",2);dt([a({type:Boolean})],exports.PontConfirmField.prototype,"disabled",2);dt([a({type:Boolean})],exports.PontConfirmField.prototype,"required",2);dt([a({type:String})],exports.PontConfirmField.prototype,"pair",2);dt([a({type:String})],exports.PontConfirmField.prototype,"validation",2);dt([a({type:String,attribute:"required-error"})],exports.PontConfirmField.prototype,"requiredError",1);dt([a({type:String,attribute:"match-error"})],exports.PontConfirmField.prototype,"matchError",1);dt([g()],exports.PontConfirmField.prototype,"_invalid",2);dt([g()],exports.PontConfirmField.prototype,"_error",2);dt([g()],exports.PontConfirmField.prototype,"_value",2);exports.PontConfirmField=dt([p("pont-confirm-field")],exports.PontConfirmField);function Ru(e=M1()){var r;if(!e)return;const t=(r=new URLSearchParams(e).get("login_hint"))==null?void 0:r.trim();return t||void 0}function M1(){return typeof window>"u"?void 0:window.location.search}var U1=Object.defineProperty,B1=Object.getOwnPropertyDescriptor,mt=(e,t,r,o)=>{for(var n=o>1?void 0:o?B1(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&&U1(t,r,n),n};exports.PontEmailField=class extends v{constructor(){super(...arguments),this.seed=_t(),this._name=Tn.name,this._label=Tn.label,this.pattern=Tn.pattern,this.validation=Tn.validation,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,o=`${exports.PontEmailField.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.PontEmailField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontEmailField.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:Tn.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:Tn.label,this.requestUpdate("label",r)}get _defaultRequiredError(){return Bt(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 _defaultFormatError(){return Be(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)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontEmailField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontEmailField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontEmailField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontEmailField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontEmailField.ERROR}`}get value(){const t=this.defaultValue??"";return(this._dirty?this._value:t).trim().toLowerCase()}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontEmailField.INPUT_SELECTORS,o=this.querySelector(r);o&&(o.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.defaultValue===void 0&&(this.defaultValue=Ru()),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.PontEmailField.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._error="",this._dispatchValidate(!0,"success","Valid email.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;return this.required&&!t?(this._onValidateError("required",this.requiredError),!1):!t||this.validation==="simple"?(this._onValidateSuccess(),!0):new RegExp(this.pattern).test(t)?(this._onValidateSuccess(),!0):(this._onValidateError("format",this.formatError),!1)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
|
|
2987
2987
|
<span
|
|
2988
2988
|
id="${this.markId}"
|
|
2989
2989
|
part="${exports.PontEmailField.PARTS.mark}"
|
|
@@ -3033,7 +3033,7 @@
|
|
|
3033
3033
|
</pont-field-description>
|
|
3034
3034
|
`:h}
|
|
3035
3035
|
</pont-field>
|
|
3036
|
-
`}};exports.PontEmailField.ROOT="email-field";exports.PontEmailField.LABEL="label";exports.PontEmailField.MARK="mark";exports.PontEmailField.DESCRIPTION="description";exports.PontEmailField.INPUT="input";exports.PontEmailField.ERROR="error";exports.PontEmailField.TAG=`${j}-${exports.PontEmailField.ROOT}`;exports.PontEmailField.VALIDATE_EVENT=`${exports.PontEmailField.TAG}:validate`;exports.PontEmailField.PARTS={root:exports.PontEmailField.ROOT,label:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.LABEL}`,mark:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.MARK}`,description:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.DESCRIPTION}`,input:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.INPUT}`,error:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.ERROR}`};exports.PontEmailField.INPUT_SELECTORS=`pont-input[part="${exports.PontEmailField.PARTS.input}"]`;mt([a({type:String})],exports.PontEmailField.prototype,"seed",2);mt([a({type:String,attribute:"custom-id"})],exports.PontEmailField.prototype,"customId",2);mt([a({type:String,attribute:"input-id"})],exports.PontEmailField.prototype,"inputId",1);mt([a({type:String})],exports.PontEmailField.prototype,"name",1);mt([a({type:String,attribute:"default-value"})],exports.PontEmailField.prototype,"defaultValue",2);mt([a({type:String})],exports.PontEmailField.prototype,"label",1);mt([a({type:String})],exports.PontEmailField.prototype,"placeholder",2);mt([a({type:String})],exports.PontEmailField.prototype,"description",2);mt([a({type:String})],exports.PontEmailField.prototype,"mark",2);mt([a({type:Boolean})],exports.PontEmailField.prototype,"caret",2);mt([a({type:String})],exports.PontEmailField.prototype,"autocomplete",2);mt([a({type:Boolean})],exports.PontEmailField.prototype,"disabled",2);mt([a({type:Boolean})],exports.PontEmailField.prototype,"required",2);mt([a({type:String})],exports.PontEmailField.prototype,"pattern",2);mt([a({type:String})],exports.PontEmailField.prototype,"validation",2);mt([a({type:String,attribute:"required-error"})],exports.PontEmailField.prototype,"requiredError",1);mt([a({type:String,attribute:"format-error"})],exports.PontEmailField.prototype,"formatError",1);mt([g()],exports.PontEmailField.prototype,"_invalid",2);mt([g()],exports.PontEmailField.prototype,"_error",2);mt([g()],exports.PontEmailField.prototype,"_value",2);exports.PontEmailField=mt([p("pont-email-field")],exports.PontEmailField);var q1=Object.defineProperty,j1=Object.getOwnPropertyDescriptor,yt=(e,t,r,o)=>{for(var n=o>1?void 0:o?j1(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};exports.PontIdentifierField=class extends v{constructor(){super(...arguments),this.seed=_t(),this._name=
|
|
3036
|
+
`}};exports.PontEmailField.ROOT="email-field";exports.PontEmailField.LABEL="label";exports.PontEmailField.MARK="mark";exports.PontEmailField.DESCRIPTION="description";exports.PontEmailField.INPUT="input";exports.PontEmailField.ERROR="error";exports.PontEmailField.TAG=`${j}-${exports.PontEmailField.ROOT}`;exports.PontEmailField.VALIDATE_EVENT=`${exports.PontEmailField.TAG}:validate`;exports.PontEmailField.PARTS={root:exports.PontEmailField.ROOT,label:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.LABEL}`,mark:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.MARK}`,description:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.DESCRIPTION}`,input:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.INPUT}`,error:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.ERROR}`};exports.PontEmailField.INPUT_SELECTORS=`pont-input[part="${exports.PontEmailField.PARTS.input}"]`;mt([a({type:String})],exports.PontEmailField.prototype,"seed",2);mt([a({type:String,attribute:"custom-id"})],exports.PontEmailField.prototype,"customId",2);mt([a({type:String,attribute:"input-id"})],exports.PontEmailField.prototype,"inputId",1);mt([a({type:String})],exports.PontEmailField.prototype,"name",1);mt([a({type:String,attribute:"default-value"})],exports.PontEmailField.prototype,"defaultValue",2);mt([a({type:String})],exports.PontEmailField.prototype,"label",1);mt([a({type:String})],exports.PontEmailField.prototype,"placeholder",2);mt([a({type:String})],exports.PontEmailField.prototype,"description",2);mt([a({type:String})],exports.PontEmailField.prototype,"mark",2);mt([a({type:Boolean})],exports.PontEmailField.prototype,"caret",2);mt([a({type:String})],exports.PontEmailField.prototype,"autocomplete",2);mt([a({type:Boolean})],exports.PontEmailField.prototype,"disabled",2);mt([a({type:Boolean})],exports.PontEmailField.prototype,"required",2);mt([a({type:String})],exports.PontEmailField.prototype,"pattern",2);mt([a({type:String})],exports.PontEmailField.prototype,"validation",2);mt([a({type:String,attribute:"required-error"})],exports.PontEmailField.prototype,"requiredError",1);mt([a({type:String,attribute:"format-error"})],exports.PontEmailField.prototype,"formatError",1);mt([g()],exports.PontEmailField.prototype,"_invalid",2);mt([g()],exports.PontEmailField.prototype,"_error",2);mt([g()],exports.PontEmailField.prototype,"_value",2);exports.PontEmailField=mt([p("pont-email-field")],exports.PontEmailField);var q1=Object.defineProperty,j1=Object.getOwnPropertyDescriptor,yt=(e,t,r,o)=>{for(var n=o>1?void 0:o?j1(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};exports.PontIdentifierField=class extends v{constructor(){super(...arguments),this.seed=_t(),this._name=So.name,this.identifiers=So.identifiers,this.design=new ri(this),this.validation=So.validation,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,o=`${exports.PontIdentifierField.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.PontIdentifierField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontIdentifierField.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:So.name,this.requestUpdate("name",r)}get _identifiers(){return this.identifiers.length===0&&this.design.active?["email","username","phone"]:this.identifiers}get _defaultLabel(){const t=this._identifiers;if(t.length===0)return So.label;let r=t[0];if(t.length>1){const o=t.slice(0,-1).join(", "),n=t.length>2?", or ":" or ",i=t.slice(-1)[0];r=o+n+i}return r.charAt(0).toUpperCase()+r.slice(1)}get label(){return this._label??this._defaultLabel}set label(t){const r=this.label;this._label=t||void 0,this.requestUpdate("label",r)}get _defaultRequiredError(){return Bt(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)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontIdentifierField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontIdentifierField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontIdentifierField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontIdentifierField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontIdentifierField.ERROR}`}get value(){const t=this.defaultValue??"";return(this._dirty?this._value:t).trim().toLowerCase()}get _type(){const t=this._identifiers.join();return t==="email"?"email":t==="phone"?"tel":"text"}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontIdentifierField.INPUT_SELECTORS,o=this.querySelector(r);o&&(o.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.defaultValue===void 0&&(this.defaultValue=Ru()),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,identifiers:d,value:c}=this;this.dispatchEvent(new CustomEvent(exports.PontIdentifierField.VALIDATE_EVENT,{detail:{id:n,inputId:i,name:s,identifiers:d,value:c,valid:t,type:r,message:o},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success","Valid identifier.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;return this.required&&!t?(this._onValidateError("required",this.requiredError),!1):(this._onValidateSuccess(),!0)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
|
|
3037
3037
|
<span
|
|
3038
3038
|
id="${this.markId}"
|
|
3039
3039
|
part="${exports.PontIdentifierField.PARTS.mark}"
|
|
@@ -3083,7 +3083,7 @@
|
|
|
3083
3083
|
</pont-field-description>
|
|
3084
3084
|
`:h}
|
|
3085
3085
|
</pont-field>
|
|
3086
|
-
`}};exports.PontIdentifierField.ROOT="identifier-field";exports.PontIdentifierField.LABEL="label";exports.PontIdentifierField.MARK="mark";exports.PontIdentifierField.DESCRIPTION="description";exports.PontIdentifierField.INPUT="input";exports.PontIdentifierField.ERROR="error";exports.PontIdentifierField.TAG=`${j}-${exports.PontIdentifierField.ROOT}`;exports.PontIdentifierField.VALIDATE_EVENT=`${exports.PontIdentifierField.TAG}:validate`;exports.PontIdentifierField.PARTS={root:exports.PontIdentifierField.ROOT,label:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.LABEL}`,mark:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.MARK}`,description:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.DESCRIPTION}`,input:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.INPUT}`,error:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.ERROR}`};exports.PontIdentifierField.INPUT_SELECTORS=`pont-input[part="${exports.PontIdentifierField.PARTS.input}"]`;yt([a({type:String})],exports.PontIdentifierField.prototype,"seed",2);yt([a({type:String,attribute:"custom-id"})],exports.PontIdentifierField.prototype,"customId",2);yt([a({type:String,attribute:"input-id"})],exports.PontIdentifierField.prototype,"inputId",1);yt([a({type:String})],exports.PontIdentifierField.prototype,"name",1);yt([a({type:String,attribute:"default-value"})],exports.PontIdentifierField.prototype,"defaultValue",2);yt([a({type:Array})],exports.PontIdentifierField.prototype,"identifiers",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"label",1);yt([a({type:String})],exports.PontIdentifierField.prototype,"placeholder",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"description",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"mark",2);yt([a({type:Boolean})],exports.PontIdentifierField.prototype,"caret",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"autocomplete",2);yt([a({type:Boolean})],exports.PontIdentifierField.prototype,"disabled",2);yt([a({type:Boolean})],exports.PontIdentifierField.prototype,"required",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"validation",2);yt([a({type:String,attribute:"required-error"})],exports.PontIdentifierField.prototype,"requiredError",1);yt([g()],exports.PontIdentifierField.prototype,"_invalid",2);yt([g()],exports.PontIdentifierField.prototype,"_error",2);yt([g()],exports.PontIdentifierField.prototype,"_value",2);exports.PontIdentifierField=yt([p("pont-identifier-field")],exports.PontIdentifierField);var z1=Object.defineProperty,V1=Object.getOwnPropertyDescriptor,nt=(e,t,r,o)=>{for(var n=o>1?void 0:o?V1(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&&z1(t,r,n),n};exports.PontNameField=class extends v{constructor(){super(...arguments),this.seed=_t(),this._name=
|
|
3086
|
+
`}};exports.PontIdentifierField.ROOT="identifier-field";exports.PontIdentifierField.LABEL="label";exports.PontIdentifierField.MARK="mark";exports.PontIdentifierField.DESCRIPTION="description";exports.PontIdentifierField.INPUT="input";exports.PontIdentifierField.ERROR="error";exports.PontIdentifierField.TAG=`${j}-${exports.PontIdentifierField.ROOT}`;exports.PontIdentifierField.VALIDATE_EVENT=`${exports.PontIdentifierField.TAG}:validate`;exports.PontIdentifierField.PARTS={root:exports.PontIdentifierField.ROOT,label:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.LABEL}`,mark:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.MARK}`,description:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.DESCRIPTION}`,input:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.INPUT}`,error:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.ERROR}`};exports.PontIdentifierField.INPUT_SELECTORS=`pont-input[part="${exports.PontIdentifierField.PARTS.input}"]`;yt([a({type:String})],exports.PontIdentifierField.prototype,"seed",2);yt([a({type:String,attribute:"custom-id"})],exports.PontIdentifierField.prototype,"customId",2);yt([a({type:String,attribute:"input-id"})],exports.PontIdentifierField.prototype,"inputId",1);yt([a({type:String})],exports.PontIdentifierField.prototype,"name",1);yt([a({type:String,attribute:"default-value"})],exports.PontIdentifierField.prototype,"defaultValue",2);yt([a({type:Array})],exports.PontIdentifierField.prototype,"identifiers",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"label",1);yt([a({type:String})],exports.PontIdentifierField.prototype,"placeholder",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"description",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"mark",2);yt([a({type:Boolean})],exports.PontIdentifierField.prototype,"caret",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"autocomplete",2);yt([a({type:Boolean})],exports.PontIdentifierField.prototype,"disabled",2);yt([a({type:Boolean})],exports.PontIdentifierField.prototype,"required",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"validation",2);yt([a({type:String,attribute:"required-error"})],exports.PontIdentifierField.prototype,"requiredError",1);yt([g()],exports.PontIdentifierField.prototype,"_invalid",2);yt([g()],exports.PontIdentifierField.prototype,"_error",2);yt([g()],exports.PontIdentifierField.prototype,"_value",2);exports.PontIdentifierField=yt([p("pont-identifier-field")],exports.PontIdentifierField);var z1=Object.defineProperty,V1=Object.getOwnPropertyDescriptor,nt=(e,t,r,o)=>{for(var n=o>1?void 0:o?V1(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&&z1(t,r,n),n};exports.PontNameField=class extends v{constructor(){super(...arguments),this.seed=_t(),this._name=Ln.name,this._label=Ln.label,this.pattern=Ln.pattern,this.validation=Ln.validation,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,o=`${exports.PontNameField.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.PontNameField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontNameField.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:Ln.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:Ln.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 Bt(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 bo(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 _o(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 Be(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)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontNameField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontNameField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontNameField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontNameField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontNameField.ERROR}`}get value(){const t=this.defaultValue??"";return(this._dirty?this._value:t).trim().replace(/\s+/g," ")}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontNameField.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.PontNameField.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._error="",this._dispatchValidate(!0,"success","Valid name.")}_onValidateError(t,r){this._invalid=!0,this._error=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;return o&&t.length>o?(this._onValidateError("maxlength",this.maxlengthError),!1):new RegExp(this.pattern,"u").test(t)?(this._onValidateSuccess(),!0):(this._onValidateError("format",this.formatError),!1)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
|
|
3087
3087
|
<span
|
|
3088
3088
|
id="${this.markId}"
|
|
3089
3089
|
part="${exports.PontNameField.PARTS.mark}"
|
|
@@ -3133,7 +3133,7 @@
|
|
|
3133
3133
|
</pont-field-description>
|
|
3134
3134
|
`:h}
|
|
3135
3135
|
</pont-field>
|
|
3136
|
-
`}};exports.PontNameField.ROOT="name-field";exports.PontNameField.LABEL="label";exports.PontNameField.MARK="mark";exports.PontNameField.DESCRIPTION="description";exports.PontNameField.INPUT="input";exports.PontNameField.ERROR="error";exports.PontNameField.TAG=`${j}-${exports.PontNameField.ROOT}`;exports.PontNameField.VALIDATE_EVENT=`${exports.PontNameField.TAG}:validate`;exports.PontNameField.PARTS={root:exports.PontNameField.ROOT,label:`${exports.PontNameField.ROOT}-${exports.PontNameField.LABEL}`,mark:`${exports.PontNameField.ROOT}-${exports.PontNameField.MARK}`,description:`${exports.PontNameField.ROOT}-${exports.PontNameField.DESCRIPTION}`,input:`${exports.PontNameField.ROOT}-${exports.PontNameField.INPUT}`,error:`${exports.PontNameField.ROOT}-${exports.PontNameField.ERROR}`};exports.PontNameField.INPUT_SELECTORS=`pont-input[part="${exports.PontNameField.PARTS.input}"]`;nt([a({type:String})],exports.PontNameField.prototype,"seed",2);nt([a({type:String,attribute:"custom-id"})],exports.PontNameField.prototype,"customId",2);nt([a({type:String,attribute:"input-id"})],exports.PontNameField.prototype,"inputId",1);nt([a({type:String})],exports.PontNameField.prototype,"name",1);nt([a({type:String,attribute:"default-value"})],exports.PontNameField.prototype,"defaultValue",2);nt([a({type:String})],exports.PontNameField.prototype,"label",1);nt([a({type:String})],exports.PontNameField.prototype,"placeholder",2);nt([a({type:String})],exports.PontNameField.prototype,"description",2);nt([a({type:String})],exports.PontNameField.prototype,"mark",2);nt([a({type:Boolean})],exports.PontNameField.prototype,"caret",2);nt([a({type:String})],exports.PontNameField.prototype,"autocomplete",2);nt([a({type:Boolean})],exports.PontNameField.prototype,"disabled",2);nt([a({type:Boolean})],exports.PontNameField.prototype,"required",2);nt([a({type:Number})],exports.PontNameField.prototype,"minlength",1);nt([a({type:Number})],exports.PontNameField.prototype,"maxlength",1);nt([a({type:String})],exports.PontNameField.prototype,"pattern",2);nt([a({type:String})],exports.PontNameField.prototype,"validation",2);nt([a({type:String,attribute:"required-error"})],exports.PontNameField.prototype,"requiredError",1);nt([a({type:String,attribute:"minlength-error"})],exports.PontNameField.prototype,"minlengthError",1);nt([a({type:String,attribute:"maxlength-error"})],exports.PontNameField.prototype,"maxlengthError",1);nt([a({type:String,attribute:"format-error"})],exports.PontNameField.prototype,"formatError",1);nt([g()],exports.PontNameField.prototype,"_invalid",2);nt([g()],exports.PontNameField.prototype,"_error",2);nt([g()],exports.PontNameField.prototype,"_value",2);exports.PontNameField=nt([p("pont-name-field")],exports.PontNameField);var G1=Object.defineProperty,H1=Object.getOwnPropertyDescriptor,ft=(e,t,r,o)=>{for(var n=o>1?void 0:o?H1(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&&G1(t,r,n),n};exports.PontPhoneField=class extends v{constructor(){super(...arguments),this.seed=_t(),this._name=
|
|
3136
|
+
`}};exports.PontNameField.ROOT="name-field";exports.PontNameField.LABEL="label";exports.PontNameField.MARK="mark";exports.PontNameField.DESCRIPTION="description";exports.PontNameField.INPUT="input";exports.PontNameField.ERROR="error";exports.PontNameField.TAG=`${j}-${exports.PontNameField.ROOT}`;exports.PontNameField.VALIDATE_EVENT=`${exports.PontNameField.TAG}:validate`;exports.PontNameField.PARTS={root:exports.PontNameField.ROOT,label:`${exports.PontNameField.ROOT}-${exports.PontNameField.LABEL}`,mark:`${exports.PontNameField.ROOT}-${exports.PontNameField.MARK}`,description:`${exports.PontNameField.ROOT}-${exports.PontNameField.DESCRIPTION}`,input:`${exports.PontNameField.ROOT}-${exports.PontNameField.INPUT}`,error:`${exports.PontNameField.ROOT}-${exports.PontNameField.ERROR}`};exports.PontNameField.INPUT_SELECTORS=`pont-input[part="${exports.PontNameField.PARTS.input}"]`;nt([a({type:String})],exports.PontNameField.prototype,"seed",2);nt([a({type:String,attribute:"custom-id"})],exports.PontNameField.prototype,"customId",2);nt([a({type:String,attribute:"input-id"})],exports.PontNameField.prototype,"inputId",1);nt([a({type:String})],exports.PontNameField.prototype,"name",1);nt([a({type:String,attribute:"default-value"})],exports.PontNameField.prototype,"defaultValue",2);nt([a({type:String})],exports.PontNameField.prototype,"label",1);nt([a({type:String})],exports.PontNameField.prototype,"placeholder",2);nt([a({type:String})],exports.PontNameField.prototype,"description",2);nt([a({type:String})],exports.PontNameField.prototype,"mark",2);nt([a({type:Boolean})],exports.PontNameField.prototype,"caret",2);nt([a({type:String})],exports.PontNameField.prototype,"autocomplete",2);nt([a({type:Boolean})],exports.PontNameField.prototype,"disabled",2);nt([a({type:Boolean})],exports.PontNameField.prototype,"required",2);nt([a({type:Number})],exports.PontNameField.prototype,"minlength",1);nt([a({type:Number})],exports.PontNameField.prototype,"maxlength",1);nt([a({type:String})],exports.PontNameField.prototype,"pattern",2);nt([a({type:String})],exports.PontNameField.prototype,"validation",2);nt([a({type:String,attribute:"required-error"})],exports.PontNameField.prototype,"requiredError",1);nt([a({type:String,attribute:"minlength-error"})],exports.PontNameField.prototype,"minlengthError",1);nt([a({type:String,attribute:"maxlength-error"})],exports.PontNameField.prototype,"maxlengthError",1);nt([a({type:String,attribute:"format-error"})],exports.PontNameField.prototype,"formatError",1);nt([g()],exports.PontNameField.prototype,"_invalid",2);nt([g()],exports.PontNameField.prototype,"_error",2);nt([g()],exports.PontNameField.prototype,"_value",2);exports.PontNameField=nt([p("pont-name-field")],exports.PontNameField);var G1=Object.defineProperty,H1=Object.getOwnPropertyDescriptor,ft=(e,t,r,o)=>{for(var n=o>1?void 0:o?H1(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&&G1(t,r,n),n};exports.PontPhoneField=class extends v{constructor(){super(...arguments),this.seed=_t(),this._name=An.name,this._label=An.label,this.pattern=An.pattern,this.validation=An.validation,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,o=`${exports.PontPhoneField.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.PontPhoneField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontPhoneField.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:An.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:An.label,this.requestUpdate("label",r)}get _defaultRequiredError(){return Bt(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 _defaultFormatError(){return Be(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)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontPhoneField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontPhoneField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontPhoneField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontPhoneField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontPhoneField.ERROR}`}get value(){const t=this.defaultValue??"";return(this._dirty?this._value:t).replace(/\s/g,"")}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontPhoneField.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.PontPhoneField.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._error="",this._dispatchValidate(!0,"success","Valid phone.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;return this.required&&!t?(this._onValidateError("required",this.requiredError),!1):!t||this.validation==="simple"?(this._onValidateSuccess(),!0):new RegExp(this.pattern).test(t)?(this._onValidateSuccess(),!0):(this._onValidateError("format",this.formatError),!1)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
|
|
3137
3137
|
<span
|
|
3138
3138
|
id="${this.markId}"
|
|
3139
3139
|
part="${exports.PontPhoneField.PARTS.mark}"
|
|
@@ -3183,7 +3183,7 @@
|
|
|
3183
3183
|
</pont-field-description>
|
|
3184
3184
|
`:h}
|
|
3185
3185
|
</pont-field>
|
|
3186
|
-
`}};exports.PontPhoneField.ROOT="phone-field";exports.PontPhoneField.LABEL="label";exports.PontPhoneField.MARK="mark";exports.PontPhoneField.DESCRIPTION="description";exports.PontPhoneField.INPUT="input";exports.PontPhoneField.ERROR="error";exports.PontPhoneField.TAG=`${j}-${exports.PontPhoneField.ROOT}`;exports.PontPhoneField.VALIDATE_EVENT=`${exports.PontPhoneField.TAG}:validate`;exports.PontPhoneField.PARTS={root:exports.PontPhoneField.ROOT,label:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.LABEL}`,mark:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.MARK}`,description:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.DESCRIPTION}`,input:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.INPUT}`,error:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.ERROR}`};exports.PontPhoneField.INPUT_SELECTORS=`pont-input[part="${exports.PontPhoneField.PARTS.input}"]`;ft([a({type:String})],exports.PontPhoneField.prototype,"seed",2);ft([a({type:String,attribute:"custom-id"})],exports.PontPhoneField.prototype,"customId",2);ft([a({type:String,attribute:"input-id"})],exports.PontPhoneField.prototype,"inputId",1);ft([a({type:String})],exports.PontPhoneField.prototype,"name",1);ft([a({type:String,attribute:"default-value"})],exports.PontPhoneField.prototype,"defaultValue",2);ft([a({type:String})],exports.PontPhoneField.prototype,"label",1);ft([a({type:String})],exports.PontPhoneField.prototype,"placeholder",2);ft([a({type:String})],exports.PontPhoneField.prototype,"description",2);ft([a({type:String})],exports.PontPhoneField.prototype,"mark",2);ft([a({type:Boolean})],exports.PontPhoneField.prototype,"caret",2);ft([a({type:String})],exports.PontPhoneField.prototype,"autocomplete",2);ft([a({type:Boolean})],exports.PontPhoneField.prototype,"disabled",2);ft([a({type:Boolean})],exports.PontPhoneField.prototype,"required",2);ft([a({type:String})],exports.PontPhoneField.prototype,"pattern",2);ft([a({type:String})],exports.PontPhoneField.prototype,"validation",2);ft([a({type:String,attribute:"required-error"})],exports.PontPhoneField.prototype,"requiredError",1);ft([a({type:String,attribute:"format-error"})],exports.PontPhoneField.prototype,"formatError",1);ft([g()],exports.PontPhoneField.prototype,"_invalid",2);ft([g()],exports.PontPhoneField.prototype,"_error",2);ft([g()],exports.PontPhoneField.prototype,"_value",2);exports.PontPhoneField=ft([p("pont-phone-field")],exports.PontPhoneField);var K1=Object.defineProperty,W1=Object.getOwnPropertyDescriptor,ot=(e,t,r,o)=>{for(var n=o>1?void 0:o?W1(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&&K1(t,r,n),n};exports.PontUsernameField=class extends v{constructor(){super(...arguments),this.seed=_t(),this._name=
|
|
3186
|
+
`}};exports.PontPhoneField.ROOT="phone-field";exports.PontPhoneField.LABEL="label";exports.PontPhoneField.MARK="mark";exports.PontPhoneField.DESCRIPTION="description";exports.PontPhoneField.INPUT="input";exports.PontPhoneField.ERROR="error";exports.PontPhoneField.TAG=`${j}-${exports.PontPhoneField.ROOT}`;exports.PontPhoneField.VALIDATE_EVENT=`${exports.PontPhoneField.TAG}:validate`;exports.PontPhoneField.PARTS={root:exports.PontPhoneField.ROOT,label:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.LABEL}`,mark:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.MARK}`,description:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.DESCRIPTION}`,input:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.INPUT}`,error:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.ERROR}`};exports.PontPhoneField.INPUT_SELECTORS=`pont-input[part="${exports.PontPhoneField.PARTS.input}"]`;ft([a({type:String})],exports.PontPhoneField.prototype,"seed",2);ft([a({type:String,attribute:"custom-id"})],exports.PontPhoneField.prototype,"customId",2);ft([a({type:String,attribute:"input-id"})],exports.PontPhoneField.prototype,"inputId",1);ft([a({type:String})],exports.PontPhoneField.prototype,"name",1);ft([a({type:String,attribute:"default-value"})],exports.PontPhoneField.prototype,"defaultValue",2);ft([a({type:String})],exports.PontPhoneField.prototype,"label",1);ft([a({type:String})],exports.PontPhoneField.prototype,"placeholder",2);ft([a({type:String})],exports.PontPhoneField.prototype,"description",2);ft([a({type:String})],exports.PontPhoneField.prototype,"mark",2);ft([a({type:Boolean})],exports.PontPhoneField.prototype,"caret",2);ft([a({type:String})],exports.PontPhoneField.prototype,"autocomplete",2);ft([a({type:Boolean})],exports.PontPhoneField.prototype,"disabled",2);ft([a({type:Boolean})],exports.PontPhoneField.prototype,"required",2);ft([a({type:String})],exports.PontPhoneField.prototype,"pattern",2);ft([a({type:String})],exports.PontPhoneField.prototype,"validation",2);ft([a({type:String,attribute:"required-error"})],exports.PontPhoneField.prototype,"requiredError",1);ft([a({type:String,attribute:"format-error"})],exports.PontPhoneField.prototype,"formatError",1);ft([g()],exports.PontPhoneField.prototype,"_invalid",2);ft([g()],exports.PontPhoneField.prototype,"_error",2);ft([g()],exports.PontPhoneField.prototype,"_value",2);exports.PontPhoneField=ft([p("pont-phone-field")],exports.PontPhoneField);var K1=Object.defineProperty,W1=Object.getOwnPropertyDescriptor,ot=(e,t,r,o)=>{for(var n=o>1?void 0:o?W1(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&&K1(t,r,n),n};exports.PontUsernameField=class extends v{constructor(){super(...arguments),this.seed=_t(),this._name=Dn.name,this._label=Dn.label,this.pattern=Dn.pattern,this.validation=Dn.validation,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,o=`${exports.PontUsernameField.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.PontUsernameField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontUsernameField.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:Dn.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:Dn.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 Bt(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 bo(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 _o(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 Be(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)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontUsernameField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontUsernameField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontUsernameField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontUsernameField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontUsernameField.ERROR}`}get value(){const t=this.defaultValue??"";return(this._dirty?this._value:t).trim().toLowerCase()}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontUsernameField.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.PontUsernameField.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._error="",this._dispatchValidate(!0,"success","Valid username.")}_onValidateError(t,r){this._invalid=!0,this._error=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;return o&&t.length>o?(this._onValidateError("maxlength",this.maxlengthError),!1):new RegExp(this.pattern).test(t)?(this._onValidateSuccess(),!0):(this._onValidateError("format",this.formatError),!1)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
|
|
3187
3187
|
<span
|
|
3188
3188
|
id="${this.markId}"
|
|
3189
3189
|
part="${exports.PontUsernameField.PARTS.mark}"
|
|
@@ -3233,7 +3233,7 @@
|
|
|
3233
3233
|
</pont-field-description>
|
|
3234
3234
|
`:h}
|
|
3235
3235
|
</pont-field>
|
|
3236
|
-
`}};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=`${j}-${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}"]`;ot([a({type:String})],exports.PontUsernameField.prototype,"seed",2);ot([a({type:String,attribute:"custom-id"})],exports.PontUsernameField.prototype,"customId",2);ot([a({type:String,attribute:"input-id"})],exports.PontUsernameField.prototype,"inputId",1);ot([a({type:String})],exports.PontUsernameField.prototype,"name",1);ot([a({type:String,attribute:"default-value"})],exports.PontUsernameField.prototype,"defaultValue",2);ot([a({type:String})],exports.PontUsernameField.prototype,"label",1);ot([a({type:String})],exports.PontUsernameField.prototype,"placeholder",2);ot([a({type:String})],exports.PontUsernameField.prototype,"description",2);ot([a({type:String})],exports.PontUsernameField.prototype,"mark",2);ot([a({type:Boolean})],exports.PontUsernameField.prototype,"caret",2);ot([a({type:String})],exports.PontUsernameField.prototype,"autocomplete",2);ot([a({type:Boolean})],exports.PontUsernameField.prototype,"disabled",2);ot([a({type:Boolean})],exports.PontUsernameField.prototype,"required",2);ot([a({type:Number})],exports.PontUsernameField.prototype,"minlength",1);ot([a({type:Number})],exports.PontUsernameField.prototype,"maxlength",1);ot([a({type:String})],exports.PontUsernameField.prototype,"pattern",2);ot([a({type:String})],exports.PontUsernameField.prototype,"validation",2);ot([a({type:String,attribute:"required-error"})],exports.PontUsernameField.prototype,"requiredError",1);ot([a({type:String,attribute:"minlength-error"})],exports.PontUsernameField.prototype,"minlengthError",1);ot([a({type:String,attribute:"maxlength-error"})],exports.PontUsernameField.prototype,"maxlengthError",1);ot([a({type:String,attribute:"format-error"})],exports.PontUsernameField.prototype,"formatError",1);ot([g()],exports.PontUsernameField.prototype,"_invalid",2);ot([g()],exports.PontUsernameField.prototype,"_error",2);ot([g()],exports.PontUsernameField.prototype,"_value",2);exports.PontUsernameField=ot([p("pont-username-field")],exports.PontUsernameField);const Bs={label:"Link",service:"auth"};var Y1=Object.defineProperty,Q1=Object.getOwnPropertyDescriptor,qe=(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&&Y1(t,r,n),n};exports.PontLink=class extends v{constructor(){super(...arguments),this.seed=_t(),this._label=Bs.label,this.service=Bs.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
|
|
3236
|
+
`}};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=`${j}-${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}"]`;ot([a({type:String})],exports.PontUsernameField.prototype,"seed",2);ot([a({type:String,attribute:"custom-id"})],exports.PontUsernameField.prototype,"customId",2);ot([a({type:String,attribute:"input-id"})],exports.PontUsernameField.prototype,"inputId",1);ot([a({type:String})],exports.PontUsernameField.prototype,"name",1);ot([a({type:String,attribute:"default-value"})],exports.PontUsernameField.prototype,"defaultValue",2);ot([a({type:String})],exports.PontUsernameField.prototype,"label",1);ot([a({type:String})],exports.PontUsernameField.prototype,"placeholder",2);ot([a({type:String})],exports.PontUsernameField.prototype,"description",2);ot([a({type:String})],exports.PontUsernameField.prototype,"mark",2);ot([a({type:Boolean})],exports.PontUsernameField.prototype,"caret",2);ot([a({type:String})],exports.PontUsernameField.prototype,"autocomplete",2);ot([a({type:Boolean})],exports.PontUsernameField.prototype,"disabled",2);ot([a({type:Boolean})],exports.PontUsernameField.prototype,"required",2);ot([a({type:Number})],exports.PontUsernameField.prototype,"minlength",1);ot([a({type:Number})],exports.PontUsernameField.prototype,"maxlength",1);ot([a({type:String})],exports.PontUsernameField.prototype,"pattern",2);ot([a({type:String})],exports.PontUsernameField.prototype,"validation",2);ot([a({type:String,attribute:"required-error"})],exports.PontUsernameField.prototype,"requiredError",1);ot([a({type:String,attribute:"minlength-error"})],exports.PontUsernameField.prototype,"minlengthError",1);ot([a({type:String,attribute:"maxlength-error"})],exports.PontUsernameField.prototype,"maxlengthError",1);ot([a({type:String,attribute:"format-error"})],exports.PontUsernameField.prototype,"formatError",1);ot([g()],exports.PontUsernameField.prototype,"_invalid",2);ot([g()],exports.PontUsernameField.prototype,"_error",2);ot([g()],exports.PontUsernameField.prototype,"_value",2);exports.PontUsernameField=ot([p("pont-username-field")],exports.PontUsernameField);const Bs={label:"Link",service:"auth"};var Y1=Object.defineProperty,Q1=Object.getOwnPropertyDescriptor,qe=(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&&Y1(t,r,n),n};exports.PontLink=class extends v{constructor(){super(...arguments),this.seed=_t(),this._label=Bs.label,this.service=Bs.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 V.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:Bs.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`
|
|
3237
3237
|
<div id="${this.rootId}" part="${exports.PontLink.PARTS.root}">
|
|
3238
3238
|
${(t=this.prompt)!=null&&t.length?l`
|
|
3239
3239
|
<p id="${this.promptId}" part="${exports.PontLink.PARTS.prompt}">
|
|
@@ -3278,36 +3278,36 @@
|
|
|
3278
3278
|
>
|
|
3279
3279
|
${this._providers.map(r=>this._renderButton(t.find(o=>o.provider===r)??{provider:r}))}
|
|
3280
3280
|
</pont-field>
|
|
3281
|
-
`}};exports.PontProviderField._ROOT="provider-field";exports.PontProviderField._BUTTON="button";exports.PontProviderField.DESIGN_PROVIDERS=["google","apple","github"];qt([a({type:String})],exports.PontProviderField.prototype,"seed",2);qt([a({attribute:"custom-id",type:String})],exports.PontProviderField.prototype,"customId",2);qt([a({type:Array})],exports.PontProviderField.prototype,"providers",2);qt([a({type:String})],exports.PontProviderField.prototype,"content",2);qt([a({type:String})],exports.PontProviderField.prototype,"variant",2);qt([a({type:String})],exports.PontProviderField.prototype,"size",2);qt([a({type:String})],exports.PontProviderField.prototype,"prompt",2);qt([a({attribute:"icon-align",type:String})],exports.PontProviderField.prototype,"iconAlign",2);qt([a({type:String})],exports.PontProviderField.prototype,"label",2);qt([a({type:Boolean})],exports.PontProviderField.prototype,"disabled",2);qt([a({type:Boolean})],exports.PontProviderField.prototype,"loading",2);qt([a({type:String})],exports.PontProviderField.prototype,"event",2);qt([a({type:Array})],exports.PontProviderField.prototype,"overrides",2);exports.PontProviderField=qt([p("pont-provider-field")],exports.PontProviderField);const Z1={identifier:""};function ps(){return
|
|
3281
|
+
`}};exports.PontProviderField._ROOT="provider-field";exports.PontProviderField._BUTTON="button";exports.PontProviderField.DESIGN_PROVIDERS=["google","apple","github"];qt([a({type:String})],exports.PontProviderField.prototype,"seed",2);qt([a({attribute:"custom-id",type:String})],exports.PontProviderField.prototype,"customId",2);qt([a({type:Array})],exports.PontProviderField.prototype,"providers",2);qt([a({type:String})],exports.PontProviderField.prototype,"content",2);qt([a({type:String})],exports.PontProviderField.prototype,"variant",2);qt([a({type:String})],exports.PontProviderField.prototype,"size",2);qt([a({type:String})],exports.PontProviderField.prototype,"prompt",2);qt([a({attribute:"icon-align",type:String})],exports.PontProviderField.prototype,"iconAlign",2);qt([a({type:String})],exports.PontProviderField.prototype,"label",2);qt([a({type:Boolean})],exports.PontProviderField.prototype,"disabled",2);qt([a({type:Boolean})],exports.PontProviderField.prototype,"loading",2);qt([a({type:String})],exports.PontProviderField.prototype,"event",2);qt([a({type:Array})],exports.PontProviderField.prototype,"overrides",2);exports.PontProviderField=qt([p("pont-provider-field")],exports.PontProviderField);const Z1={identifier:""};function ps(){return G`<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3282
3282
|
<path d="M6.66501 1.32926H1.99834C1.64472 1.32926 1.30558 1.46974 1.05553 1.71979C0.805484 1.96984 0.665009 2.30898 0.665009 2.6626V11.9959C0.665009 12.3496 0.805484 12.6887 1.05553 12.9387C1.30558 13.1888 1.64472 13.3293 1.99834 13.3293H11.3317C11.6853 13.3293 12.0244 13.1888 12.2745 12.9387C12.5245 12.6887 12.665 12.3496 12.665 11.9959V7.32926M10.9151 1.07925C11.1803 0.814036 11.54 0.665039 11.9151 0.665039C12.2901 0.665039 12.6499 0.814036 12.9151 1.07925C13.1803 1.34447 13.3293 1.70418 13.3293 2.07925C13.3293 2.45433 13.1803 2.81404 12.9151 3.07925L6.90641 9.08859C6.7481 9.24675 6.55254 9.36253 6.33774 9.42525L4.4224 9.98525C4.36504 10.002 4.30423 10.003 4.24634 9.98816C4.18846 9.97333 4.13562 9.94321 4.09337 9.90096C4.05112 9.8587 4.021 9.80587 4.00617 9.74798C3.99134 9.69009 3.99234 9.62929 4.00907 9.57192L4.56907 7.65659C4.63209 7.44195 4.74809 7.24662 4.9064 7.08859L10.9151 1.07925Z" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3283
3283
|
</svg>
|
|
3284
|
-
`}function
|
|
3284
|
+
`}function Gt(){return G`
|
|
3285
3285
|
<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3286
3286
|
<path d="M8.66504 0.665039L0.665039 8.66504M0.665039 0.665039L8.66504 8.66504" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3287
3287
|
</svg>
|
|
3288
3288
|
|
|
3289
|
-
`}function tC(){return
|
|
3289
|
+
`}function tC(){return G`
|
|
3290
3290
|
<svg width="12" height="10" viewBox="0 0 12 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3291
3291
|
<path d="M0.665039 4.66504H11.3317M0.665039 0.665039H11.3317M0.665039 8.66504H11.3317" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3292
3292
|
</svg>
|
|
3293
3293
|
|
|
3294
|
-
`}function eC(){return
|
|
3294
|
+
`}function eC(){return G`<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3295
3295
|
<path d="M12.665 4.66406V0.664062H8.66504M12.665 0.664062L5.33171 7.9974M10.665 7.33073V11.3307C10.665 11.6844 10.5246 12.0235 10.2745 12.2735C10.0245 12.5236 9.68533 12.6641 9.33171 12.6641H1.99837C1.64475 12.6641 1.30561 12.5236 1.05556 12.2735C0.805515 12.0235 0.665039 11.6844 0.665039 11.3307V3.9974C0.665039 3.64377 0.805515 3.30464 1.05556 3.05459C1.30561 2.80454 1.64475 2.66406 1.99837 2.66406H5.99837" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3296
3296
|
</svg>
|
|
3297
|
-
`}function gp(){return
|
|
3297
|
+
`}function gp(){return G`<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3298
3298
|
<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"/>
|
|
3299
3299
|
</svg>
|
|
3300
|
-
`}function rC(){return
|
|
3300
|
+
`}function rC(){return G`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3301
3301
|
<path d="M3.33337 8.00004H12.6667M8.00004 3.33337V12.6667" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3302
3302
|
</svg>
|
|
3303
|
-
`}function dl(){return
|
|
3303
|
+
`}function dl(){return G`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3304
3304
|
<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"/>
|
|
3305
|
-
</svg>`}function Iu(){return
|
|
3305
|
+
</svg>`}function Iu(){return G`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3306
3306
|
<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"/>
|
|
3307
|
-
</svg>`}function nC(){return
|
|
3307
|
+
</svg>`}function nC(){return G`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3308
3308
|
<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"/>
|
|
3309
|
-
</svg>`}function oC(){return
|
|
3310
|
-
`}var iC=Object.defineProperty,sC=Object.getOwnPropertyDescriptor,oi=(e,t,r,o)=>{for(var n=o>1?void 0:o?sC(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&&iC(t,r,n),n};exports.PontEditIdentifier=class extends v{constructor(){super(...arguments),this.seed=_t(),this.identifier=Z1.identifier,this.event="",this._handleClick=()=>{
|
|
3309
|
+
</svg>`}function oC(){return G`<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>
|
|
3310
|
+
`}var iC=Object.defineProperty,sC=Object.getOwnPropertyDescriptor,oi=(e,t,r,o)=>{for(var n=o>1?void 0:o?sC(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&&iC(t,r,n),n};exports.PontEditIdentifier=class extends v{constructor(){super(...arguments),this.seed=_t(),this.identifier=Z1.identifier,this.event="",this._handleClick=()=>{V.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`
|
|
3311
3311
|
<div>
|
|
3312
3312
|
<pont-typography-p>${this.identifier}</pont-typography-p>
|
|
3313
3313
|
<div class="pont-flex pont-items-center">
|
|
@@ -3316,14 +3316,14 @@
|
|
|
3316
3316
|
>
|
|
3317
3317
|
</div>
|
|
3318
3318
|
</div>
|
|
3319
|
-
`}};exports.PontEditIdentifier.ROOT="edit-identifier";exports.PontEditIdentifier.ICON="icon";exports.PontEditIdentifier.TAG=`${j}-${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}`};oi([a({type:String})],exports.PontEditIdentifier.prototype,"seed",2);oi([a({type:String,attribute:"custom-id"})],exports.PontEditIdentifier.prototype,"customId",2);oi([a({type:String})],exports.PontEditIdentifier.prototype,"identifier",2);oi([a({type:String})],exports.PontEditIdentifier.prototype,"event",2);exports.PontEditIdentifier=oi([p("pont-edit-identifier")],exports.PontEditIdentifier);function aC(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var
|
|
3320
|
-
]))+`;we.KANJI=new RegExp(r,"g"),we.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),we.BYTE=new RegExp(o,"g"),we.NUMERIC=new RegExp(e,"g"),we.ALPHANUMERIC=new RegExp(t,"g");const n=new RegExp("^"+r+"$"),i=new RegExp("^"+e+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return we.testKanji=function(c){return n.test(c)},we.testNumeric=function(c){return i.test(c)},we.testAlphanumeric=function(c){return s.test(c)},we}var Tp;function
|
|
3321
|
-
Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),o.put(i,13)}},ia=r,ia}var sa={exports:{}},Mp;function PC(){return Mp||(Mp=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,b,_,w,y,P,C,O;!d.empty();){c=d.pop(),u=c.value,_=c.cost,w=r[u]||{};for(b in w)w.hasOwnProperty(b)&&(y=w[b],P=_+y,C=s[b],O=typeof s[b]>"u",(O||C>P)&&(s[b]=P,d.push(b,P),i[b]=u))}if(typeof n<"u"&&typeof s[n]>"u"){var x=["Could not find a path from ",o," to ",n,"."].join("");throw new Error(x)}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})(sa)),sa.exports}var Up;function CC(){return Up||(Up=1,(function(e){const t=
|
|
3322
|
-
Suggested mode is: `+t.toString(T));switch(k===t.KANJI&&!d.isKanjiModeEnabled()&&(k=t.BYTE),k){case t.NUMERIC:return new r(x);case t.ALPHANUMERIC:return new o(x);case t.KANJI:return new i(x);case t.BYTE:return new n(x)}}e.fromArray=function(L){return L.reduce(function(k,T){return typeof T=="string"?k.push(O(T,null)):T.data&&k.push(O(T.data,T.mode)),k},[])},e.fromString=function(L,k){const T=_(L,d.isKanjiModeEnabled()),Z=P(T),I=C(Z,k),A=c.find_path(I.map,"start","end"),D=[];for(let R=1;R<A.length-1;R++)D.push(I.table[A[R]].node);return e.fromArray(y(D))},e.rawSplit=function(L){return e.fromArray(_(L,d.isKanjiModeEnabled()))}})(ea)),ea}var Bp;function EC(){if(Bp)return js;Bp=1;const e=
|
|
3319
|
+
`}};exports.PontEditIdentifier.ROOT="edit-identifier";exports.PontEditIdentifier.ICON="icon";exports.PontEditIdentifier.TAG=`${j}-${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}`};oi([a({type:String})],exports.PontEditIdentifier.prototype,"seed",2);oi([a({type:String,attribute:"custom-id"})],exports.PontEditIdentifier.prototype,"customId",2);oi([a({type:String})],exports.PontEditIdentifier.prototype,"identifier",2);oi([a({type:String})],exports.PontEditIdentifier.prototype,"event",2);exports.PontEditIdentifier=oi([p("pont-edit-identifier")],exports.PontEditIdentifier);function aC(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kn={},qs,vp;function lC(){return vp||(vp=1,qs=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),qs}var js={},vr={},bp;function bn(){if(bp)return vr;bp=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 vr.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},vr.getSymbolTotalCodewords=function(o){return t[o]},vr.getBCHDigit=function(r){let o=0;for(;r!==0;)o++,r>>>=1;return o},vr.setToSJISFunction=function(o){if(typeof o!="function")throw new Error('"toSJISFunc" is not a valid function.');e=o},vr.isKanjiModeEnabled=function(){return typeof e<"u"},vr.toSJIS=function(o){return e(o)},vr}var zs={},_p;function Jl(){return _p||(_p=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}}})(zs)),zs}var Vs,yp;function dC(){if(yp)return Vs;yp=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 Gs,wp;function cC(){if(wp)return Gs;wp=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]},Gs=e,Gs}var Hs={},$p;function pC(){return $p||($p=1,(function(e){const t=bn().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}})(Hs)),Hs}var Ks={},Pp;function hC(){if(Pp)return Ks;Pp=1;const e=bn().getSymbolSize,t=7;return Ks.getPositions=function(o){const n=e(o);return[[0,0],[n-t,0],[0,n-t]]},Ks}var Ws={},Cp;function uC(){return Cp||(Cp=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,b=null;for(let _=0;_<i;_++){d=c=0,u=b=null;for(let w=0;w<i;w++){let y=n.get(_,w);y===u?d++:(d>=5&&(s+=t.N1+(d-5)),u=y,d=1),y=n.get(w,_),y===b?c++:(c>=5&&(s+=t.N1+(c-5)),b=y,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 b=0;b<i;b++)d=d<<1&2047|n.get(u,b),b>=10&&(d===1488||d===93)&&s++,c=c<<1&2047|n.get(b,u),b>=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 b=e.getPenaltyN1(n)+e.getPenaltyN2(n)+e.getPenaltyN3(n)+e.getPenaltyN4(n);e.applyMask(u,n),b<c&&(c=b,d=u)}return d}})(Ws)),Ws}var hi={},Ep;function Tu(){if(Ep)return hi;Ep=1;const e=Jl(),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 hi.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}},hi.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}},hi}var Ys={},xo={},Sp;function mC(){if(Sp)return xo;Sp=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]})(),xo.log=function(o){if(o<1)throw new Error("log("+o+")");return t[o]},xo.exp=function(o){return e[o]},xo.mul=function(o,n){return o===0||n===0?0:e[t[o]+t[n]]},xo}var xp;function fC(){return xp||(xp=1,(function(e){const t=mC();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}})(Ys)),Ys}var Qs,Op;function gC(){if(Op)return Qs;Op=1;const e=fC();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},Qs=t,Qs}var Js={},Xs={},Zs={},Rp;function Au(){return Rp||(Rp=1,Zs.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Zs}var we={},Ip;function Du(){if(Ip)return we;Ip=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
|
|
3320
|
+
]))+`;we.KANJI=new RegExp(r,"g"),we.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),we.BYTE=new RegExp(o,"g"),we.NUMERIC=new RegExp(e,"g"),we.ALPHANUMERIC=new RegExp(t,"g");const n=new RegExp("^"+r+"$"),i=new RegExp("^"+e+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return we.testKanji=function(c){return n.test(c)},we.testNumeric=function(c){return i.test(c)},we.testAlphanumeric=function(c){return s.test(c)},we}var Tp;function _n(){return Tp||(Tp=1,(function(e){const t=Au(),r=Du();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}}})(Xs)),Xs}var Ap;function vC(){return Ap||(Ap=1,(function(e){const t=bn(),r=Tu(),o=Jl(),n=_n(),i=Au(),s=7973,d=t.getBCHDigit(s);function c(w,y,P){for(let C=1;C<=40;C++)if(y<=e.getCapacity(C,P,w))return C}function u(w,y){return n.getCharCountIndicator(w,y)+4}function b(w,y){let P=0;return w.forEach(function(C){const O=u(C.mode,y);P+=O+C.getBitsLength()}),P}function _(w,y){for(let P=1;P<=40;P++)if(b(w,P)<=e.getCapacity(P,y,n.MIXED))return P}e.from=function(y,P){return i.isValid(y)?parseInt(y,10):P},e.getCapacity=function(y,P,C){if(!i.isValid(y))throw new Error("Invalid QR Code version");typeof C>"u"&&(C=n.BYTE);const O=t.getSymbolTotalCodewords(y),x=r.getTotalCodewordsCount(y,P),L=(O-x)*8;if(C===n.MIXED)return L;const k=L-u(C,y);switch(C){case n.NUMERIC:return Math.floor(k/10*3);case n.ALPHANUMERIC:return Math.floor(k/11*2);case n.KANJI:return Math.floor(k/13);case n.BYTE:default:return Math.floor(k/8)}},e.getBestVersionForData=function(y,P){let C;const O=o.from(P,o.M);if(Array.isArray(y)){if(y.length>1)return _(y,O);if(y.length===0)return 1;C=y[0]}else C=y;return c(C.mode,C.getLength(),O)},e.getEncodedBits=function(y){if(!i.isValid(y)||y<7)throw new Error("Invalid QR Code version");let P=y<<12;for(;t.getBCHDigit(P)-d>=0;)P^=s<<t.getBCHDigit(P)-d;return y<<12|P}})(Js)),Js}var ta={},Dp;function bC(){if(Dp)return ta;Dp=1;const e=bn(),t=1335,r=21522,o=e.getBCHDigit(t);return ta.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},ta}var ea={},ra,Lp;function _C(){if(Lp)return ra;Lp=1;const e=_n();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))},ra=t,ra}var na,kp;function yC(){if(kp)return na;kp=1;const e=_n(),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)},na=r,na}var oa,Fp;function wC(){if(Fp)return oa;Fp=1;const e=_n();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)},oa=t,oa}var ia,Np;function $C(){if(Np)return ia;Np=1;const e=_n(),t=bn();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]+`
|
|
3321
|
+
Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),o.put(i,13)}},ia=r,ia}var sa={exports:{}},Mp;function PC(){return Mp||(Mp=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,b,_,w,y,P,C,O;!d.empty();){c=d.pop(),u=c.value,_=c.cost,w=r[u]||{};for(b in w)w.hasOwnProperty(b)&&(y=w[b],P=_+y,C=s[b],O=typeof s[b]>"u",(O||C>P)&&(s[b]=P,d.push(b,P),i[b]=u))}if(typeof n<"u"&&typeof s[n]>"u"){var x=["Could not find a path from ",o," to ",n,"."].join("");throw new Error(x)}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})(sa)),sa.exports}var Up;function CC(){return Up||(Up=1,(function(e){const t=_n(),r=_C(),o=yC(),n=wC(),i=$C(),s=Du(),d=bn(),c=PC();function u(x){return unescape(encodeURIComponent(x)).length}function b(x,L,k){const T=[];let Z;for(;(Z=x.exec(k))!==null;)T.push({data:Z[0],index:Z.index,mode:L,length:Z[0].length});return T}function _(x){const L=b(s.NUMERIC,t.NUMERIC,x),k=b(s.ALPHANUMERIC,t.ALPHANUMERIC,x);let T,Z;return d.isKanjiModeEnabled()?(T=b(s.BYTE,t.BYTE,x),Z=b(s.KANJI,t.KANJI,x)):(T=b(s.BYTE_KANJI,t.BYTE,x),Z=[]),L.concat(k,T,Z).sort(function(A,D){return A.index-D.index}).map(function(A){return{data:A.data,mode:A.mode,length:A.length}})}function w(x,L){switch(L){case t.NUMERIC:return r.getBitsLength(x);case t.ALPHANUMERIC:return o.getBitsLength(x);case t.KANJI:return i.getBitsLength(x);case t.BYTE:return n.getBitsLength(x)}}function y(x){return x.reduce(function(L,k){const T=L.length-1>=0?L[L.length-1]:null;return T&&T.mode===k.mode?(L[L.length-1].data+=k.data,L):(L.push(k),L)},[])}function P(x){const L=[];for(let k=0;k<x.length;k++){const T=x[k];switch(T.mode){case t.NUMERIC:L.push([T,{data:T.data,mode:t.ALPHANUMERIC,length:T.length},{data:T.data,mode:t.BYTE,length:T.length}]);break;case t.ALPHANUMERIC:L.push([T,{data:T.data,mode:t.BYTE,length:T.length}]);break;case t.KANJI:L.push([T,{data:T.data,mode:t.BYTE,length:u(T.data)}]);break;case t.BYTE:L.push([{data:T.data,mode:t.BYTE,length:u(T.data)}])}}return L}function C(x,L){const k={},T={start:{}};let Z=["start"];for(let I=0;I<x.length;I++){const A=x[I],D=[];for(let R=0;R<A.length;R++){const M=A[R],F=""+I+R;D.push(F),k[F]={node:M,lastCount:0},T[F]={};for(let E=0;E<Z.length;E++){const N=Z[E];k[N]&&k[N].node.mode===M.mode?(T[N][F]=w(k[N].lastCount+M.length,M.mode)-w(k[N].lastCount,M.mode),k[N].lastCount+=M.length):(k[N]&&(k[N].lastCount=M.length),T[N][F]=w(M.length,M.mode)+4+t.getCharCountIndicator(M.mode,L))}}Z=D}for(let I=0;I<Z.length;I++)T[Z[I]].end=0;return{map:T,table:k}}function O(x,L){let k;const T=t.getBestModeForData(x);if(k=t.from(L,T),k!==t.BYTE&&k.bit<T.bit)throw new Error('"'+x+'" cannot be encoded with mode '+t.toString(k)+`.
|
|
3322
|
+
Suggested mode is: `+t.toString(T));switch(k===t.KANJI&&!d.isKanjiModeEnabled()&&(k=t.BYTE),k){case t.NUMERIC:return new r(x);case t.ALPHANUMERIC:return new o(x);case t.KANJI:return new i(x);case t.BYTE:return new n(x)}}e.fromArray=function(L){return L.reduce(function(k,T){return typeof T=="string"?k.push(O(T,null)):T.data&&k.push(O(T.data,T.mode)),k},[])},e.fromString=function(L,k){const T=_(L,d.isKanjiModeEnabled()),Z=P(T),I=C(Z,k),A=c.find_path(I.map,"start","end"),D=[];for(let R=1;R<A.length-1;R++)D.push(I.table[A[R]].node);return e.fromArray(y(D))},e.rawSplit=function(L){return e.fromArray(_(L,d.isKanjiModeEnabled()))}})(ea)),ea}var Bp;function EC(){if(Bp)return js;Bp=1;const e=bn(),t=Jl(),r=dC(),o=cC(),n=pC(),i=hC(),s=uC(),d=Tu(),c=gC(),u=vC(),b=bC(),_=_n(),w=CC();function y(I,A){const D=I.size,R=i.getPositions(A);for(let M=0;M<R.length;M++){const F=R[M][0],E=R[M][1];for(let N=-1;N<=7;N++)if(!(F+N<=-1||D<=F+N))for(let B=-1;B<=7;B++)E+B<=-1||D<=E+B||(N>=0&&N<=6&&(B===0||B===6)||B>=0&&B<=6&&(N===0||N===6)||N>=2&&N<=4&&B>=2&&B<=4?I.set(F+N,E+B,!0,!0):I.set(F+N,E+B,!1,!0))}}function P(I){const A=I.size;for(let D=8;D<A-8;D++){const R=D%2===0;I.set(D,6,R,!0),I.set(6,D,R,!0)}}function C(I,A){const D=n.getPositions(A);for(let R=0;R<D.length;R++){const M=D[R][0],F=D[R][1];for(let E=-2;E<=2;E++)for(let N=-2;N<=2;N++)E===-2||E===2||N===-2||N===2||E===0&&N===0?I.set(M+E,F+N,!0,!0):I.set(M+E,F+N,!1,!0)}}function O(I,A){const D=I.size,R=u.getEncodedBits(A);let M,F,E;for(let N=0;N<18;N++)M=Math.floor(N/3),F=N%3+D-8-3,E=(R>>N&1)===1,I.set(M,F,E,!0),I.set(F,M,E,!0)}function x(I,A,D){const R=I.size,M=b.getEncodedBits(A,D);let F,E;for(F=0;F<15;F++)E=(M>>F&1)===1,F<6?I.set(F,8,E,!0):F<8?I.set(F+1,8,E,!0):I.set(R-15+F,8,E,!0),F<8?I.set(8,R-F-1,E,!0):F<9?I.set(8,15-F-1+1,E,!0):I.set(8,15-F-1,E,!0);I.set(R-8,8,1,!0)}function L(I,A){const D=I.size;let R=-1,M=D-1,F=7,E=0;for(let N=D-1;N>0;N-=2)for(N===6&&N--;;){for(let B=0;B<2;B++)if(!I.isReserved(M,N-B)){let ie=!1;E<A.length&&(ie=(A[E]>>>F&1)===1),I.set(M,N-B,ie),F--,F===-1&&(E++,F=7)}if(M+=R,M<0||D<=M){M-=R,R=-R;break}}}function k(I,A,D){const R=new r;D.forEach(function(B){R.put(B.mode.bit,4),R.put(B.getLength(),_.getCharCountIndicator(B.mode,I)),B.write(R)});const M=e.getSymbolTotalCodewords(I),F=d.getTotalCodewordsCount(I,A),E=(M-F)*8;for(R.getLengthInBits()+4<=E&&R.put(0,4);R.getLengthInBits()%8!==0;)R.putBit(0);const N=(E-R.getLengthInBits())/8;for(let B=0;B<N;B++)R.put(B%2?17:236,8);return T(R,I,A)}function T(I,A,D){const R=e.getSymbolTotalCodewords(A),M=d.getTotalCodewordsCount(A,D),F=R-M,E=d.getBlocksCount(A,D),N=R%E,B=E-N,ie=Math.floor(R/E),ye=Math.floor(F/E),di=ye+1,Cn=ie-ye,Nr=new c(Cn);let En=0;const Lt=new Array(E),dd=new Array(E);let Ss=0;const om=new Uint8Array(I.buffer);for(let Sn=0;Sn<E;Sn++){const Os=Sn<B?ye:di;Lt[Sn]=om.slice(En,En+Os),dd[Sn]=Nr.encode(Lt[Sn]),En+=Os,Ss=Math.max(Ss,Os)}const xs=new Uint8Array(R);let cd=0,Je,Xe;for(Je=0;Je<Ss;Je++)for(Xe=0;Xe<E;Xe++)Je<Lt[Xe].length&&(xs[cd++]=Lt[Xe][Je]);for(Je=0;Je<Cn;Je++)for(Xe=0;Xe<E;Xe++)xs[cd++]=dd[Xe][Je];return xs}function Z(I,A,D,R){let M;if(Array.isArray(I))M=w.fromArray(I);else if(typeof I=="string"){let ie=A;if(!ie){const ye=w.rawSplit(I);ie=u.getBestVersionForData(ye,D)}M=w.fromString(I,ie||40)}else throw new Error("Invalid data");const F=u.getBestVersionForData(M,D);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(`
|
|
3323
3323
|
The chosen QR Code version cannot contain this amount of data.
|
|
3324
3324
|
Minimum version required to store current data is: `+F+`.
|
|
3325
3325
|
`);const E=k(A,D,M),N=e.getSymbolSize(A),B=new o(N);return y(B,A),P(B),C(B,A),x(B,D,0),A>=7&&O(B,A),L(B,E),isNaN(R)&&(R=s.getBestMask(B,x.bind(null,B,D))),s.applyMask(R,B),x(B,D,R),{modules:B,version:A,errorCorrectionLevel:D,maskPattern:R,segments:M}}return js.create=function(A,D){if(typeof A>"u"||A==="")throw new Error("No input text");let R=t.M,M,F;return typeof D<"u"&&(R=t.from(D.errorCorrectionLevel,t.M),M=u.from(D.version),F=s.from(D.maskPattern),D.toSJISFunc&&e.setToSJISFunction(D.toSJISFunc)),Z(A,M,R,F)},js}var aa={},la={},qp;function Lu(){return qp||(qp=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),b=i.margin*c,_=[i.color.light,i.color.dark];for(let w=0;w<u;w++)for(let y=0;y<u;y++){let P=(w*u+y)*4,C=i.color.light;if(w>=b&&y>=b&&w<u-b&&y<u-b){const O=Math.floor((w-b)/c),x=Math.floor((y-b)/c);C=_[d[O*s+x]?1:0]}o[P++]=C.r,o[P++]=C.g,o[P++]=C.b,o[P]=C.a}}})(la)),la}var jp;function SC(){return jp||(jp=1,(function(e){const t=Lu();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 b=t.getImageWidth(i.modules.size,c),_=u.getContext("2d"),w=_.createImageData(b,b);return t.qrToImageData(w.data,i,c),r(_,u,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),b=c.type||"image/png",_=c.rendererOpts||{};return u.toDataURL(b,_.quality)}})(aa)),aa}var da={},zp;function xC(){if(zp)return da;zp=1;const e=Lu();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,b=0;for(let _=0;_<n.length;_++){const w=Math.floor(_%i),y=Math.floor(_/i);!w&&!u&&(u=!0),n[_]?(b++,_>0&&w>0&&n[_-1]||(d+=u?r("M",w+s,.5+y+s):r("m",c,0),c=0,u=!1),w+1<i&&n[_+1]||(d+=r("h",b),b=0)):c++}return d}return da.render=function(i,s,d){const c=e.getOptions(s),u=i.modules.size,b=i.modules.data,_=u+c.margin*2,w=c.color.light.a?"<path "+t(c.color.light,"fill")+' d="M0 0h'+_+"v"+_+'H0z"/>':"",y="<path "+t(c.color.dark,"stroke")+' d="'+o(b,u,c.margin)+'"/>',P='viewBox="0 0 '+_+" "+_+'"',O='<svg xmlns="http://www.w3.org/2000/svg" '+(c.width?'width="'+c.width+'" height="'+c.width+'" ':"")+P+' shape-rendering="crispEdges">'+w+y+`</svg>
|
|
3326
|
-
`;return typeof d=="function"&&d(null,O),O},da}var Vp;function OC(){if(Vp)return
|
|
3326
|
+
`;return typeof d=="function"&&d(null,O),O},da}var Vp;function OC(){if(Vp)return kn;Vp=1;const e=lC(),t=EC(),r=SC(),o=xC();function n(i,s,d,c,u){const b=[].slice.call(arguments,1),_=b.length,w=typeof b[_-1]=="function";if(!w&&!e())throw new Error("Callback required as last argument");if(w){if(_<2)throw new Error("Too few arguments provided");_===2?(u=d,d=s,s=c=void 0):_===3&&(s.getContext&&typeof u>"u"?(u=c,c=void 0):(u=c,c=d,d=s,s=void 0))}else{if(_<1)throw new Error("Too few arguments provided");return _===1?(d=s,s=c=void 0):_===2&&!s.getContext&&(c=d,d=s,s=void 0),new Promise(function(y,P){try{const C=t.create(d,c);y(i(C,s,c))}catch(C){P(C)}})}try{const y=t.create(d,c);u(null,i(y,s,c))}catch(y){u(y)}}return kn.create=t.create,kn.toCanvas=n.bind(null,r.render),kn.toDataURL=n.bind(null,r.renderToDataURL),kn.toString=n.bind(null,function(i,s,d){return o.render(i,d)}),kn}var RC=OC();const IC=aC(RC),ui={url:"",timeout:10,reappearButtonText:"Show QR Code",errorCorrection:"M"};var TC=Object.defineProperty,AC=Object.getOwnPropertyDescriptor,cr=(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&&TC(t,r,n),n};exports.PontQrCode=class extends v{constructor(){super(...arguments),this.seed=_t(),this.url=ui.url,this.timeout=ui.timeout,this.reappearButtonText=ui.reappearButtonText,this.disabled=!1,this.errorCorrection=ui.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};IC.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`
|
|
3327
3327
|
<div
|
|
3328
3328
|
part=${exports.PontQrCode.PARTS.root}
|
|
3329
3329
|
id=${this.rootId}
|
|
@@ -3487,7 +3487,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3487
3487
|
* @license
|
|
3488
3488
|
* Copyright 2017 Google LLC
|
|
3489
3489
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3490
|
-
*/const Gp=(e,t,r)=>{const o=new Map;for(let n=t;n<=r;n++)o.set(e[n],n);return o},NC=Ar(class extends
|
|
3490
|
+
*/const Gp=(e,t,r)=>{const o=new Map;for(let n=t;n<=r;n++)o.set(e[n],n);return o},NC=Ar(class extends ro{constructor(e){if(super(e),e.type!==$e.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,t,r){let o;r===void 0?r=t:t!==void 0&&(o=t);const n=[],i=[];let s=0;for(const d of e)n[s]=o?o(d,s):s,i[s]=r(d,s),s++;return{values:i,keys:n}}render(e,t,r){return this.dt(e,t,r).values}update(e,[t,r,o]){const n=mf(e),{values:i,keys:s}=this.dt(t,r,o);if(!Array.isArray(n))return this.ut=s,i;const d=this.ut??(this.ut=[]),c=[];let u,b,_=0,w=n.length-1,y=0,P=i.length-1;for(;_<=w&&y<=P;)if(n[_]===null)_++;else if(n[w]===null)w--;else if(d[_]===s[y])c[y]=Ur(n[_],i[y]),_++,y++;else if(d[w]===s[P])c[P]=Ur(n[w],i[P]),w--,P--;else if(d[_]===s[P])c[P]=Ur(n[_],i[P]),Eo(e,c[P+1],n[_]),_++,P--;else if(d[w]===s[y])c[y]=Ur(n[w],i[y]),Eo(e,n[_],n[w]),w--,y++;else if(u===void 0&&(u=Gp(s,y,P),b=Gp(d,_,w)),u.has(d[_]))if(u.has(d[w])){const C=b.get(s[y]),O=C!==void 0?n[C]:null;if(O===null){const x=Eo(e,n[_]);Ur(x,i[y]),c[y]=x}else c[y]=Ur(O,i[y]),Eo(e,n[_],O),n[C]=null;y++}else Ls(n[w]),w--;else Ls(n[_]),_++;for(;y<=P;){const C=Eo(e,c[P+1]);Ur(C,i[y]),c[y++]=C}for(;_<=w;){const C=n[_++];C!==null&&Ls(C)}return this.ut=s,yl(e,c),Vt}}),Hp={name:"scope",scopes:[]};function Kp(e){if(!Array.isArray(e))return[];const t=new Set;return e.flatMap(r=>{if(!r||typeof r!="object")return[];const{scope:o,label:n,granted:i,required:s}=r;return typeof o!="string"||!o.trim()?[]:t.has(o.trim())?[]:(t.add(o.trim()),[{scope:o.trim(),label:typeof n=="string"&&n?n:o.trim(),granted:i===!0,required:s===!0}])})}function ku(e,t){return!!e.required||!t.has(e.scope)}function MC(e,t){const r=e.filter(o=>ku(o,t)).map(o=>o.scope);return Array.from(new Set(r)).join(" ")}var UC=Object.defineProperty,BC=Object.getOwnPropertyDescriptor,ii=(e,t,r,o)=>{for(var n=o>1?void 0:o?BC(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.PontScopeList=class extends ge{constructor(){super(...arguments),this.name=Hp.name,this.scopes=Hp.scopes,this.disabled=!1,this._unticked=new Set}createRenderRoot(){return this}get value(){return MC(Kp(this.scopes),this._unticked)}validate(){return!0}_toggle(t,r){const o=new Set(this._unticked);r?o.delete(t):o.add(t),this._unticked=o,this.dispatchEvent(new CustomEvent(`${exports.PontScopeList.TAG}:change`,{detail:{name:this.name,value:this.value},bubbles:!0,composed:!0}))}render(){const t=Kp(this.scopes),r=exports.PontScopeList.PARTS;return l`
|
|
3491
3491
|
<ul
|
|
3492
3492
|
part=${r.root}
|
|
3493
3493
|
class="pont-scope-list-root"
|
|
@@ -3517,22 +3517,22 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3517
3517
|
</li>
|
|
3518
3518
|
`)}
|
|
3519
3519
|
</ul>
|
|
3520
|
-
`}};exports.PontScopeList.ROOT="scope-list";exports.PontScopeList.ITEM="item";exports.PontScopeList.LABEL="label";exports.PontScopeList.CHECKBOX="checkbox";exports.PontScopeList.TEXT="text";exports.PontScopeList.TAG=`${j}-${exports.PontScopeList.ROOT}`;exports.PontScopeList.PARTS={root:exports.PontScopeList.ROOT,item:`${exports.PontScopeList.ROOT}-${exports.PontScopeList.ITEM}`,label:`${exports.PontScopeList.ROOT}-${exports.PontScopeList.LABEL}`,checkbox:`${exports.PontScopeList.ROOT}-${exports.PontScopeList.CHECKBOX}`,text:`${exports.PontScopeList.ROOT}-${exports.PontScopeList.TEXT}`};ii([a({type:String})],exports.PontScopeList.prototype,"name",2);ii([a({type:Array})],exports.PontScopeList.prototype,"scopes",2);ii([a({type:Boolean})],exports.PontScopeList.prototype,"disabled",2);ii([g()],exports.PontScopeList.prototype,"_unticked",2);exports.PontScopeList=ii([p("pont-scope-list")],exports.PontScopeList);const qC={default:
|
|
3520
|
+
`}};exports.PontScopeList.ROOT="scope-list";exports.PontScopeList.ITEM="item";exports.PontScopeList.LABEL="label";exports.PontScopeList.CHECKBOX="checkbox";exports.PontScopeList.TEXT="text";exports.PontScopeList.TAG=`${j}-${exports.PontScopeList.ROOT}`;exports.PontScopeList.PARTS={root:exports.PontScopeList.ROOT,item:`${exports.PontScopeList.ROOT}-${exports.PontScopeList.ITEM}`,label:`${exports.PontScopeList.ROOT}-${exports.PontScopeList.LABEL}`,checkbox:`${exports.PontScopeList.ROOT}-${exports.PontScopeList.CHECKBOX}`,text:`${exports.PontScopeList.ROOT}-${exports.PontScopeList.TEXT}`};ii([a({type:String})],exports.PontScopeList.prototype,"name",2);ii([a({type:Array})],exports.PontScopeList.prototype,"scopes",2);ii([a({type:Boolean})],exports.PontScopeList.prototype,"disabled",2);ii([g()],exports.PontScopeList.prototype,"_unticked",2);exports.PontScopeList=ii([p("pont-scope-list")],exports.PontScopeList);const qC={default:G`
|
|
3521
3521
|
<circle cx="12" cy="12" r="10"/>
|
|
3522
3522
|
<line x1="12" x2="12" y1="8" y2="12"/>
|
|
3523
3523
|
<line x1="12" x2="12.01" y1="16" y2="16"/>
|
|
3524
|
-
`,error:
|
|
3524
|
+
`,error:G`
|
|
3525
3525
|
<circle cx="12" cy="12" r="10"/>
|
|
3526
3526
|
<path d="m15 9-6 6"/>
|
|
3527
3527
|
<path d="m9 9 6 6"/>
|
|
3528
|
-
`,warning:
|
|
3528
|
+
`,warning:G`
|
|
3529
3529
|
<circle cx="12" cy="12" r="10"/>
|
|
3530
3530
|
<line x1="12" x2="12" y1="8" y2="12"/>
|
|
3531
3531
|
<line x1="12" x2="12.01" y1="16" y2="16"/>
|
|
3532
|
-
`,success:
|
|
3532
|
+
`,success:G`
|
|
3533
3533
|
<circle cx="12" cy="12" r="10" />
|
|
3534
3534
|
<path d="m9 12 2 2 4-4" />
|
|
3535
|
-
`,info:
|
|
3535
|
+
`,info:G`
|
|
3536
3536
|
<circle cx="12" cy="12" r="10"/>
|
|
3537
3537
|
<path d="M12 16v-4"/>
|
|
3538
3538
|
<path d="M12 8h.01"/>
|
|
@@ -3577,11 +3577,11 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3577
3577
|
</pont-callout-description>
|
|
3578
3578
|
`:h}
|
|
3579
3579
|
</pont-callout>
|
|
3580
|
-
`}};exports.PontAlert.ROOT="alert";exports.PontAlert.ICON="icon";exports.PontAlert.TITLE="title";exports.PontAlert.DESCRIPTION="description";exports.PontAlert.TAG=`${j}-${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}`};pr([a({type:String})],exports.PontAlert.prototype,"seed",2);pr([a({type:String,attribute:"custom-id"})],exports.PontAlert.prototype,"customId",2);pr([a({type:String})],exports.PontAlert.prototype,"status",2);pr([a({type:String})],exports.PontAlert.prototype,"palette",2);pr([a({type:String})],exports.PontAlert.prototype,"variant",2);pr([a({type:String})],exports.PontAlert.prototype,"title",1);pr([a({type:String})],exports.PontAlert.prototype,"description",2);pr([a({type:Boolean})],exports.PontAlert.prototype,"icon",2);exports.PontAlert=pr([p("pont-alert")],exports.PontAlert);const pa={duration:5,redirectUrl:"/",content:""};var VC=Object.defineProperty,GC=Object.getOwnPropertyDescriptor,
|
|
3580
|
+
`}};exports.PontAlert.ROOT="alert";exports.PontAlert.ICON="icon";exports.PontAlert.TITLE="title";exports.PontAlert.DESCRIPTION="description";exports.PontAlert.TAG=`${j}-${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}`};pr([a({type:String})],exports.PontAlert.prototype,"seed",2);pr([a({type:String,attribute:"custom-id"})],exports.PontAlert.prototype,"customId",2);pr([a({type:String})],exports.PontAlert.prototype,"status",2);pr([a({type:String})],exports.PontAlert.prototype,"palette",2);pr([a({type:String})],exports.PontAlert.prototype,"variant",2);pr([a({type:String})],exports.PontAlert.prototype,"title",1);pr([a({type:String})],exports.PontAlert.prototype,"description",2);pr([a({type:Boolean})],exports.PontAlert.prototype,"icon",2);exports.PontAlert=pr([p("pont-alert")],exports.PontAlert);const pa={duration:5,redirectUrl:"/",content:""};var VC=Object.defineProperty,GC=Object.getOwnPropertyDescriptor,yn=(e,t,r,o)=>{for(var n=o>1?void 0:o?GC(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&&VC(t,r,n),n};exports.PontCountdown=class extends v{constructor(){super(...arguments),this.seed=_t(),this.duration=pa.duration,this.redirectUrl=pa.redirectUrl,this.content=pa.content,this._seconds=0,this._timerId=null}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontCountdown.TAG}-${this.seed}`}get rootEl(){return this.querySelector(`[data-${j}-${exports.PontCountdown.ROOT}]`)}connectedCallback(){super.connectedCallback(),this._initCountdown()}disconnectedCallback(){this._clearTimer(),super.disconnectedCallback()}_initCountdown(){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)}render(){return l`
|
|
3581
3581
|
<div data-pont-countdown id=${this.rootId}>
|
|
3582
3582
|
${this.content} ${this._seconds}s...
|
|
3583
3583
|
</div>
|
|
3584
|
-
`}};exports.PontCountdown.ROOT="countdown";exports.PontCountdown.TAG=`${j}-${exports.PontCountdown.ROOT}`;exports.PontCountdown.PARTS={root:exports.PontCountdown.ROOT};
|
|
3584
|
+
`}};exports.PontCountdown.ROOT="countdown";exports.PontCountdown.TAG=`${j}-${exports.PontCountdown.ROOT}`;exports.PontCountdown.PARTS={root:exports.PontCountdown.ROOT};yn([a({type:String})],exports.PontCountdown.prototype,"seed",2);yn([a({type:String,attribute:"custom-id"})],exports.PontCountdown.prototype,"customId",2);yn([a({type:Number})],exports.PontCountdown.prototype,"duration",2);yn([a({type:String,attribute:"redirect-url"})],exports.PontCountdown.prototype,"redirectUrl",2);yn([a({type:String})],exports.PontCountdown.prototype,"content",2);yn([g()],exports.PontCountdown.prototype,"_seconds",2);exports.PontCountdown=yn([p("pont-countdown")],exports.PontCountdown);var HC=Object.defineProperty,KC=Object.getOwnPropertyDescriptor,hs=(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&&HC(t,r,n),n};exports.PontBlock=class extends ge{constructor(){super(...arguments),this.id="",this.align="center",this.justify="start",this.branding=new f1(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 sl()}async updated(){await this.updateComplete,await sl()}_renderWatermark(){return this.branding.showWatermark?l`
|
|
3585
3585
|
<pont-card-footer border>
|
|
3586
3586
|
<pont-watermark variant="muted"></pont-watermark>
|
|
3587
3587
|
</pont-card-footer>
|
|
@@ -3668,7 +3668,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3668
3668
|
/>
|
|
3669
3669
|
`}
|
|
3670
3670
|
</div>
|
|
3671
|
-
`}};hr([a({type:String})],exports.PontLogo.prototype,"id",2);hr([a({type:String,attribute:"image-url"})],exports.PontLogo.prototype,"imageUrl",2);hr([a({type:String,attribute:"image-url-dark"})],exports.PontLogo.prototype,"imageUrlDark",2);hr([a({type:String,reflect:!0})],exports.PontLogo.prototype,"align",2);hr([a({type:String,reflect:!0})],exports.PontLogo.prototype,"width",2);hr([a({type:String,reflect:!0})],exports.PontLogo.prototype,"height",2);hr([g()],exports.PontLogo.prototype,"theme",2);hr([g()],exports.PontLogo.prototype,"isSvg",2);exports.PontLogo=hr([p("pont-logo")],exports.PontLogo);const mi={variant:"brand",logoAlign:"end",label:"Powered by"};var bE=Object.defineProperty,_E=Object.getOwnPropertyDescriptor,
|
|
3671
|
+
`}};hr([a({type:String})],exports.PontLogo.prototype,"id",2);hr([a({type:String,attribute:"image-url"})],exports.PontLogo.prototype,"imageUrl",2);hr([a({type:String,attribute:"image-url-dark"})],exports.PontLogo.prototype,"imageUrlDark",2);hr([a({type:String,reflect:!0})],exports.PontLogo.prototype,"align",2);hr([a({type:String,reflect:!0})],exports.PontLogo.prototype,"width",2);hr([a({type:String,reflect:!0})],exports.PontLogo.prototype,"height",2);hr([g()],exports.PontLogo.prototype,"theme",2);hr([g()],exports.PontLogo.prototype,"isSvg",2);exports.PontLogo=hr([p("pont-logo")],exports.PontLogo);const mi={variant:"brand",logoAlign:"end",label:"Powered by"};var bE=Object.defineProperty,_E=Object.getOwnPropertyDescriptor,yo=(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=(o?s(t,r,n):s(n))||n);return o&&n&&bE(t,r,n),n};exports.PontWatermark=class extends v{constructor(){super(...arguments),this.seed=_t(),this.variant=mi.variant,this.logoAlign=mi.logoAlign,this._label=mi.label}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:mi.label,this.requestUpdate("label",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontWatermark.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontWatermark.LABEL}`}get logoId(){return`${this.rootId}-${exports.PontWatermark.LOGO}`}_renderLabel(){return l`
|
|
3672
3672
|
<span id="${this.labelId}" part="${exports.PontWatermark.PARTS.label}">
|
|
3673
3673
|
${this.label}
|
|
3674
3674
|
</span>
|
|
@@ -3723,7 +3723,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3723
3723
|
>
|
|
3724
3724
|
${this.logoAlign==="start"?l`${this._renderLogo()} ${this._renderLabel()}`:l`${this._renderLabel()} ${this._renderLogo()}`}
|
|
3725
3725
|
</span>
|
|
3726
|
-
`}};exports.PontWatermark.ROOT="watermark";exports.PontWatermark.LABEL="label";exports.PontWatermark.LOGO="logo";exports.PontWatermark.TAG=`${j}-${exports.PontWatermark.ROOT}`;exports.PontWatermark.PARTS={root:exports.PontWatermark.ROOT,label:`${exports.PontWatermark.ROOT}-${exports.PontWatermark.LABEL}`,logo:`${exports.PontWatermark.ROOT}-${exports.PontWatermark.LOGO}`};
|
|
3726
|
+
`}};exports.PontWatermark.ROOT="watermark";exports.PontWatermark.LABEL="label";exports.PontWatermark.LOGO="logo";exports.PontWatermark.TAG=`${j}-${exports.PontWatermark.ROOT}`;exports.PontWatermark.PARTS={root:exports.PontWatermark.ROOT,label:`${exports.PontWatermark.ROOT}-${exports.PontWatermark.LABEL}`,logo:`${exports.PontWatermark.ROOT}-${exports.PontWatermark.LOGO}`};yo([a({type:String})],exports.PontWatermark.prototype,"seed",2);yo([a({type:String,attribute:"custom-id"})],exports.PontWatermark.prototype,"customId",2);yo([a({type:String})],exports.PontWatermark.prototype,"variant",2);yo([a({type:String,attribute:"logo-align"})],exports.PontWatermark.prototype,"logoAlign",2);yo([a({type:String})],exports.PontWatermark.prototype,"label",1);exports.PontWatermark=yo([p("pont-watermark")],exports.PontWatermark);var yE=Object.defineProperty,wE=Object.getOwnPropertyDescriptor,Fu=(e,t,r,o)=>{for(var n=o>1?void 0:o?wE(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&&yE(t,r,n),n};exports.PontHint=class extends v{constructor(){super(...arguments),this.content=""}createRenderRoot(){return this}render(){return l`<p class="pont-mt-2">${this.content}</p>`}};Fu([a({type:String})],exports.PontHint.prototype,"content",2);exports.PontHint=Fu([p("pont-hint")],exports.PontHint);var $E=Object.defineProperty,PE=Object.getOwnPropertyDescriptor,gs=(e,t,r,o)=>{for(var n=o>1?void 0:o?PE(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&&$E(t,r,n),n};exports.PontModal=class extends v{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`
|
|
3727
3727
|
<div class="pont-modal-overlay"></div>
|
|
3728
3728
|
<div class="pont-modal-container" @click=${this._handleOutsideClick}>
|
|
3729
3729
|
<div part="modal-content" class="pont-modal-layout">
|
|
@@ -3735,7 +3735,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3735
3735
|
part="modal-close-button"
|
|
3736
3736
|
@click=${this._handleClose}
|
|
3737
3737
|
>
|
|
3738
|
-
${
|
|
3738
|
+
${Gt()}
|
|
3739
3739
|
</pont-button>
|
|
3740
3740
|
</div>
|
|
3741
3741
|
`:h}
|
|
@@ -3834,7 +3834,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3834
3834
|
:host {
|
|
3835
3835
|
display: block;
|
|
3836
3836
|
}
|
|
3837
|
-
`;let
|
|
3837
|
+
`;let cn=ld;rd([a({type:Number})],cn.prototype,"totalPages");rd([a({type:Number})],cn.prototype,"currentPage");rd([a({type:Boolean})],cn.prototype,"hideGoTo");customElements.define("pont-paginator",cn);var EE=Object.defineProperty,SE=Object.getOwnPropertyDescriptor,ze=(e,t,r,o)=>{for(var n=o>1?void 0:o?SE(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&&EE(t,r,n),n};const xE=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;exports.MultiEmailInput=class extends v{constructor(){super(...arguments),this.label="",this.value=[],this.placeholder="Enter email addresses",this.disabled=!1,this.maxEmails=50,this.className="",this.inputValue="",this.error=null}createRenderRoot(){return this}validateEmail(t){return xE.test(t.trim())}addEmails(t){const r=[],o=[];for(const n of t){const i=n.trim();i&&(this.validateEmail(i)?!this.value.includes(i)&&!r.includes(i)&&r.push(i):o.push(i))}if(r.length>0){const n=[...this.value,...r].slice(0,this.maxEmails);this.value=n,this.inputValue="",this.error=null,n.length>=this.maxEmails&&(this.error=`Maximum ${this.maxEmails} emails allowed`),this.notifyChange(n)}o.length>0&&(this.error=`Invalid email${o.length>1?"s":""}: ${o.join(", ")}`)}notifyChange(t){var r;(r=this.onChange)==null||r.call(this,t),this.dispatchEvent(new CustomEvent("emails-changed",{detail:{emails:t},bubbles:!0,composed:!0}))}handleKeyDown(t){if(this.error&&this.inputValue!==""&&(this.error=null),["Enter",",",";"," "].includes(t.key)){t.preventDefault(),this.inputValue.trim()&&this.addEmails([this.inputValue]);return}if(t.key==="Backspace"&&!this.inputValue&&this.value.length>0){const r=this.value.slice(0,-1);this.value=r,this.error=null,this.notifyChange(r)}}handlePaste(t){var n;t.preventDefault();const o=(((n=t.clipboardData)==null?void 0:n.getData("text"))??"").split(/[;,\n\s]+/).map(i=>i.trim()).filter(Boolean);this.addEmails(o)}handleBlur(){this.inputValue.trim()&&this.addEmails([this.inputValue])}removeEmail(t){const r=this.value.filter(o=>o!==t);this.value=r,this.error=null,this.notifyChange(r)}render(){const t=this.disabled||this.value.length>=this.maxEmails;return l`
|
|
3838
3838
|
<div class="pont-space-y-2 ${this.className}">
|
|
3839
3839
|
${this.label?l`<pont-label part="label">${this.label}</pont-label>`:h}
|
|
3840
3840
|
|
|
@@ -3852,7 +3852,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3852
3852
|
class="pont-cursor-pointer pont-ml-1"
|
|
3853
3853
|
@click=${()=>this.removeEmail(r)}
|
|
3854
3854
|
>
|
|
3855
|
-
${
|
|
3855
|
+
${Gt()}
|
|
3856
3856
|
</span>
|
|
3857
3857
|
`}
|
|
3858
3858
|
</pont-badge>
|
|
@@ -3905,7 +3905,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3905
3905
|
class="pont-cursor-pointer pont-ml-1"
|
|
3906
3906
|
@click=${()=>this.removeBadge(r)}
|
|
3907
3907
|
>
|
|
3908
|
-
${
|
|
3908
|
+
${Gt()}
|
|
3909
3909
|
</span>
|
|
3910
3910
|
`:h}
|
|
3911
3911
|
</pont-badge>
|
|
@@ -3957,7 +3957,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3957
3957
|
</div>
|
|
3958
3958
|
`:h}
|
|
3959
3959
|
</div>
|
|
3960
|
-
`}};ee([a({type:Array})],exports.BadgeSelector.prototype,"options",2);ee([a({type:Array})],exports.BadgeSelector.prototype,"value",2);ee([a({attribute:!1})],exports.BadgeSelector.prototype,"onChange",2);ee([a({type:String})],exports.BadgeSelector.prototype,"placeholder",2);ee([a({type:String})],exports.BadgeSelector.prototype,"label",2);ee([a({type:Boolean})],exports.BadgeSelector.prototype,"disabled",2);ee([a({type:Number})],exports.BadgeSelector.prototype,"maxSelections",2);ee([a({type:String})],exports.BadgeSelector.prototype,"className",2);ee([g()],exports.BadgeSelector.prototype,"inputValue",2);ee([g()],exports.BadgeSelector.prototype,"isOpen",2);ee([g()],exports.BadgeSelector.prototype,"highlightedIndex",2);exports.BadgeSelector=ee([p("pont-badge-selector")],exports.BadgeSelector);var IE=Object.defineProperty,TE=Object.getOwnPropertyDescriptor,
|
|
3960
|
+
`}};ee([a({type:Array})],exports.BadgeSelector.prototype,"options",2);ee([a({type:Array})],exports.BadgeSelector.prototype,"value",2);ee([a({attribute:!1})],exports.BadgeSelector.prototype,"onChange",2);ee([a({type:String})],exports.BadgeSelector.prototype,"placeholder",2);ee([a({type:String})],exports.BadgeSelector.prototype,"label",2);ee([a({type:Boolean})],exports.BadgeSelector.prototype,"disabled",2);ee([a({type:Number})],exports.BadgeSelector.prototype,"maxSelections",2);ee([a({type:String})],exports.BadgeSelector.prototype,"className",2);ee([g()],exports.BadgeSelector.prototype,"inputValue",2);ee([g()],exports.BadgeSelector.prototype,"isOpen",2);ee([g()],exports.BadgeSelector.prototype,"highlightedIndex",2);exports.BadgeSelector=ee([p("pont-badge-selector")],exports.BadgeSelector);var IE=Object.defineProperty,TE=Object.getOwnPropertyDescriptor,wn=(e,t,r,o)=>{for(var n=o>1?void 0:o?TE(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&&IE(t,r,n),n};exports.PontSideDrawer=class extends v{constructor(){super(),this.inplace=!1,this.side="left",this.open=!1,this.closeOnOverlay=!0,this._cachedChildren=[],this._mounted=!1,this._handleOpen=this._handleOpen.bind(this),this._handleClose=this._handleClose.bind(this)}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t))),window.addEventListener("open-sidedrawer",this._handleOpen),window.addEventListener("close-sidedrawer",this._handleClose),document.addEventListener("open-sidedrawer",this._handleOpen),document.addEventListener("close-sidedrawer",this._handleClose),this._mounted=!0}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("open-sidedrawer",this._handleOpen),window.removeEventListener("close-sidedrawer",this._handleClose),document.removeEventListener("open-sidedrawer",this._handleOpen),document.removeEventListener("close-sidedrawer",this._handleClose),this._mounted=!1}_handleOpen(t){const r=(t==null?void 0:t.detail)||{},o=r.drawer_id??r.id,n=this.drawer_id??this.id;n&&(o&&o!==n||(r.side&&(r.side==="left"||r.side==="right")&&(this.side=r.side),this.open=!0,this.dispatchEvent(new CustomEvent("sidedrawer-opened",{bubbles:!0,detail:{id:n}}))))}_handleClose(t){const r=(t==null?void 0:t.detail)||{},o=r.drawer_id??r.id,n=this.drawer_id??this.id;n&&(o&&o!==n||(this.open=!1,this.dispatchEvent(new CustomEvent("sidedrawer-closed",{bubbles:!0,detail:{id:n}}))))}_onOverlayClick(){this.closeOnOverlay&&this._handleClose()}render(){const t=this.side==="right"?"pont-sidedrawer-right":"pont-sidedrawer-left";return l`
|
|
3961
3961
|
<div
|
|
3962
3962
|
part="overlay"
|
|
3963
3963
|
class="pont-sidedrawer-overlay ${this.inplace?"inplace":""} ${this.open?"open":"closed"}"
|
|
@@ -3973,7 +3973,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3973
3973
|
${this._cachedChildren}
|
|
3974
3974
|
</div>
|
|
3975
3975
|
</aside>
|
|
3976
|
-
`}};
|
|
3976
|
+
`}};wn([a({type:String})],exports.PontSideDrawer.prototype,"drawer_id",2);wn([a({type:Boolean})],exports.PontSideDrawer.prototype,"inplace",2);wn([a({type:String})],exports.PontSideDrawer.prototype,"side",2);wn([a({type:Boolean,reflect:!0})],exports.PontSideDrawer.prototype,"open",2);wn([a({type:Boolean})],exports.PontSideDrawer.prototype,"closeOnOverlay",2);wn([g()],exports.PontSideDrawer.prototype,"_mounted",2);exports.PontSideDrawer=wn([p("pont-sidedrawer")],exports.PontSideDrawer);var AE=Object.defineProperty,DE=Object.getOwnPropertyDescriptor,si=(e,t,r,o)=>{for(var n=o>1?void 0:o?DE(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&&AE(t,r,n),n};exports.PontMultiSelectFilter=class extends v{constructor(){super(...arguments),this.options=[],this.selected=[],this.placeholder="Filter…",this.label="Filter"}_handleToggle(t){const r=this.selected.includes(t)?this.selected.filter(o=>o!==t):[...this.selected,t];this.dispatchEvent(new CustomEvent("change",{detail:{selected:r},bubbles:!0,composed:!0}))}render(){return this.options.filter(r=>this.selected.includes(r.value)).map(r=>r.label).join(", ")||this.placeholder,l`
|
|
3977
3977
|
<pont-dropdown-menu>
|
|
3978
3978
|
<pont-dropdown-menu-trigger as-child>
|
|
3979
3979
|
<pont-button variant="outline" size="default">
|
|
@@ -4005,7 +4005,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4005
4005
|
</pont-dropdown-menu-group>
|
|
4006
4006
|
</pont-dropdown-menu-content>
|
|
4007
4007
|
</pont-dropdown-menu>
|
|
4008
|
-
`}createRenderRoot(){return this}};si([a({type:Array})],exports.PontMultiSelectFilter.prototype,"options",2);si([a({type:Array})],exports.PontMultiSelectFilter.prototype,"selected",2);si([a({type:String})],exports.PontMultiSelectFilter.prototype,"placeholder",2);si([a({type:String})],exports.PontMultiSelectFilter.prototype,"label",2);exports.PontMultiSelectFilter=si([p("pont-multi-select-filter")],exports.PontMultiSelectFilter);var yr=(e=>(e.PROFILE="Profile",e.SECURITY="Security",e.APPEARANCE="Appearance",e.NOTIFICATION="Notification",e))(yr||{}),Pr=(e=>(e.MODAL="MODAL",e.PAGE="PAGE",e))(Pr||{}),rr=(e=>(e.BURGER="BURGER",e.REGULAR="REGULAR",e))(rr||{}),
|
|
4008
|
+
`}createRenderRoot(){return this}};si([a({type:Array})],exports.PontMultiSelectFilter.prototype,"options",2);si([a({type:Array})],exports.PontMultiSelectFilter.prototype,"selected",2);si([a({type:String})],exports.PontMultiSelectFilter.prototype,"placeholder",2);si([a({type:String})],exports.PontMultiSelectFilter.prototype,"label",2);exports.PontMultiSelectFilter=si([p("pont-multi-select-filter")],exports.PontMultiSelectFilter);var yr=(e=>(e.PROFILE="Profile",e.SECURITY="Security",e.APPEARANCE="Appearance",e.NOTIFICATION="Notification",e))(yr||{}),Pr=(e=>(e.MODAL="MODAL",e.PAGE="PAGE",e))(Pr||{}),rr=(e=>(e.BURGER="BURGER",e.REGULAR="REGULAR",e))(rr||{}),Wr=(e=>(e.VERTICAL="VERTICAL",e.HORIZONTAL="HORIZONTAL",e))(Wr||{}),st=(e=>(e.COLUMN="COLUMN",e.ROW="ROW",e))(st||{});const vs="pont-account-settings-card-header-container",qo="pont-account-settings-card-title",Ie="pont-account-settings-input-label pont-shrink-0 md:pont-block",bs="pont-account-settings-card-container",jo=()=>l`<pont-typography-muted>${f("not_added")}</pont-typography-muted>`;let pl=null;function LE(e){pl=e}function ai(){return pl||console.warn("SDK environment not initialized. Call initSdk({...}) before using <pont-provider>."),pl}class _s extends Error{constructor(t,r,o,n){super(t),this.name="ApiError",this.status=r,this.data=o,this.code=n}}const kE="/mgmt/v1";async function _e(e,t={}){var b;const{token:r,headers:o,...n}=t,i=ai(),s=((b=i==null?void 0:i.apiBaseUrl)==null?void 0:b.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}${kE}${e}`,{...n,headers:d});let u=null;try{u=await c.json()}catch{}if(!c.ok){const _=u==null?void 0:u.error;throw new _s((_==null?void 0:_.message)||c.statusText||"Something went wrong",c.status,u,(_==null?void 0:_.code)||void 0)}return u}const FE=100,NE=5;async function ME(){var t,r;const e=[];for(let o=1;o<=NE;o++){const n=await _e(`/me/organizations?page=${o}&limit=${FE}`,{method:"GET",token:Ql()});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 UE(){return _e("/me",{method:"GET",token:Ql()})}async function ys(e){return _e("/me",{method:"PATCH",body:JSON.stringify(e),token:Ql()})}async function ur(){var t;return(await V.getManagementToken(((t=ai())==null?void 0:t.apiBaseUrl)??"")).access_token}async function Nu(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 _e(n,{method:"GET",token:await ur()})}async function BE(e,t,r){const o=`/organizations/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}/roles`;await _e(o,{method:"PUT",token:await ur(),headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})}async function qE(e,t){const r=`/organizations/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}`;await _e(r,{method:"DELETE",token:await ur(),headers:{"Content-Type":"application/json"}})}async function jE(e,t){const r=`/organizations/${encodeURIComponent(e)}/invitations`;return _e(r,{method:"POST",token:await ur(),headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async function zE(e,t){const r=`/organizations/${encodeURIComponent(e)}/invitations/${encodeURIComponent(t)}/resend`;return _e(r,{method:"POST",token:await ur(),headers:{"Content-Type":"application/json"}})}async function VE(e,t,r){const o=`/organizations/${encodeURIComponent(e)}/invitations/${encodeURIComponent(t)}`;await _e(o,{method:"DELETE",token:await ur()})}async function GE(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 _e(n,{method:"GET",token:await ur()})}async function HE(e){return(await _e(`/organizations/${encodeURIComponent(e)}/assignable-roles`,{method:"GET",token:await ur()})).data??[]}var KE=Object.defineProperty,WE=Object.getOwnPropertyDescriptor,Tt=(e,t,r,o)=>{for(var n=o>1?void 0:o?WE(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&&KE(t,r,n),n};exports.PontAccountInfo=class extends v{constructor(){super(...arguments),this._messages=new Mt(this),this.showAvatarMenu=!1,this.showIcons=!0,this.content=null,this.layout=st.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 ys({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,ls(cs(t,f("photo_update_failed"))),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===st.COLUMN;return l`
|
|
4009
4009
|
<div
|
|
4010
4010
|
class=${Jt("pont-account-settings-display-row",o?"":"pont-account-settings-account-grid")}
|
|
4011
4011
|
>
|
|
@@ -4136,7 +4136,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4136
4136
|
<pont-card-content> ${this.renderAccountDetails()} </pont-card-content>
|
|
4137
4137
|
</div>
|
|
4138
4138
|
</pont-card>
|
|
4139
|
-
`}createRenderRoot(){return this}};
|
|
4139
|
+
`}createRenderRoot(){return this}};Tt([a({type:Object})],exports.PontAccountInfo.prototype,"account",2);Tt([a({type:Boolean})],exports.PontAccountInfo.prototype,"showAvatarMenu",2);Tt([a({attribute:!1})],exports.PontAccountInfo.prototype,"toggleAvatarMenu",2);Tt([a({attribute:!1})],exports.PontAccountInfo.prototype,"onAvatarChange",2);Tt([a({attribute:!1})],exports.PontAccountInfo.prototype,"onAvatarRemove",2);Tt([a({type:Boolean})],exports.PontAccountInfo.prototype,"showIcons",2);Tt([a({type:Object})],exports.PontAccountInfo.prototype,"content",2);Tt([a({type:String})],exports.PontAccountInfo.prototype,"layout",2);Tt([g()],exports.PontAccountInfo.prototype,"isUploadingImage",2);Tt([g()],exports.PontAccountInfo.prototype,"isEditingAvatarMobile",2);Tt([g()],exports.PontAccountInfo.prototype,"isMobile",2);Tt([g()],exports.PontAccountInfo.prototype,"_isAvatarEditorOpen",2);Tt([g()],exports.PontAccountInfo.prototype,"avatarDraft",2);Tt([at({context:ni,subscribe:!0})],exports.PontAccountInfo.prototype,"userContextValue",2);exports.PontAccountInfo=Tt([p("pont-account-info")],exports.PontAccountInfo);var YE=Object.defineProperty,QE=Object.getOwnPropertyDescriptor,Ve=(e,t,r,o)=>{for(var n=o>1?void 0:o?QE(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&&YE(t,r,n),n};const Xp=100;exports.PontLocationInfo=class extends v{constructor(){super(...arguments),this._messages=new Mt(this),this.showIcons=!0,this.layout=st.ROW,this.content=null,this.isEditing=!1,this.isSaving=!1,this.formData={location:"",zoneInfo:""},this.errors={},this.handleSave=async()=>{var t,r;if(!this.isSaving&&this.validate()){this.isSaving=!0;try{const o=await ys({address:{...(t=this.userContextValue.user)==null?void 0:t.address,locality:this.formData.location},zoneinfo:this.formData.zoneInfo});this.locationInfo={location:((r=o.address)==null?void 0:r.locality)??"",zoneInfo:o.zoneinfo??""},this.isEditing=!1}catch(o){console.error("Failed to update location info",o),ls(cs(o,f("location_update_failed")))}finally{this.isSaving=!1}}}}createRenderRoot(){return this}handleEdit(){this.isSaving||(this.formData={...this.locationInfo},this.errors={},this.isEditing=!0)}handleCancel(){this.isSaving||(this.isEditing=!1,this.errors={})}updateField(t,r){this.formData={...this.formData,[t]:r}}validate(){const t={},{location:r,zoneInfo:o}=this.formData;return r.length>Xp&&(t.location=`Location cannot be longer than ${Xp} characters.`),o&&!this.timeZones.includes(o)&&(t.zoneInfo=f("timezone_hint")),this.errors=t,Object.keys(t).length===0}fieldId(t){return`pont-location-${t}`}get timeZones(){var r;try{const o=(r=Intl.supportedValuesOf)==null?void 0:r.call(Intl,"timeZone");if(o!=null&&o.length)return o}catch{}const t=Intl.DateTimeFormat().resolvedOptions().timeZone;return[...new Set([t,"UTC"].filter(Boolean))]}renderControl(t){const r=!!this.errors[t];return t==="zoneInfo"?l`
|
|
4140
4140
|
<pont-select
|
|
4141
4141
|
.value=${this.formData.zoneInfo}
|
|
4142
4142
|
?disabled=${this.isSaving}
|
|
@@ -4575,7 +4575,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4575
4575
|
${this.isEditing?this.renderFooter():null}
|
|
4576
4576
|
</div>
|
|
4577
4577
|
</pont-card>
|
|
4578
|
-
`}};He([a({type:Object})],exports.PontUrlsInfo.prototype,"URLsInfo",2);He([a({type:Boolean})],exports.PontUrlsInfo.prototype,"showIcons",2);He([a({type:String})],exports.PontUrlsInfo.prototype,"layout",2);He([a({type:Object})],exports.PontUrlsInfo.prototype,"content",2);He([at({context:ni,subscribe:!0})],exports.PontUrlsInfo.prototype,"userContextValue",2);He([g()],exports.PontUrlsInfo.prototype,"isEditing",2);He([g()],exports.PontUrlsInfo.prototype,"isSaving",2);He([g()],exports.PontUrlsInfo.prototype,"formData",2);He([g()],exports.PontUrlsInfo.prototype,"errors",2);exports.PontUrlsInfo=He([p("pont-urls-info")],exports.PontUrlsInfo);var r0=Object.defineProperty,n0=Object.getOwnPropertyDescriptor,
|
|
4578
|
+
`}};He([a({type:Object})],exports.PontUrlsInfo.prototype,"URLsInfo",2);He([a({type:Boolean})],exports.PontUrlsInfo.prototype,"showIcons",2);He([a({type:String})],exports.PontUrlsInfo.prototype,"layout",2);He([a({type:Object})],exports.PontUrlsInfo.prototype,"content",2);He([at({context:ni,subscribe:!0})],exports.PontUrlsInfo.prototype,"userContextValue",2);He([g()],exports.PontUrlsInfo.prototype,"isEditing",2);He([g()],exports.PontUrlsInfo.prototype,"isSaving",2);He([g()],exports.PontUrlsInfo.prototype,"formData",2);He([g()],exports.PontUrlsInfo.prototype,"errors",2);exports.PontUrlsInfo=He([p("pont-urls-info")],exports.PontUrlsInfo);var r0=Object.defineProperty,n0=Object.getOwnPropertyDescriptor,At=(e,t,r,o)=>{for(var n=o>1?void 0:o?n0(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&&r0(t,r,n),n};exports.Profile=class extends v{constructor(){super(...arguments),this.showAvatarMenu=!1,this.orientation=Wr.HORIZONTAL,this.sidebarDisplayType=rr.REGULAR,this.mode=Pr==null?void 0:Pr.PAGE,this.widgetsLayout=st.ROW,this.content=null}createRenderRoot(){return this}render(){var t,r,o,n;return l`
|
|
4579
4579
|
<div class="pont-account-settings-section-stack">
|
|
4580
4580
|
<pont-account-info
|
|
4581
4581
|
.content=${(t=this.content)==null?void 0:t.account}
|
|
@@ -4601,11 +4601,11 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4601
4601
|
.layout=${this.widgetsLayout}
|
|
4602
4602
|
></pont-urls-info>
|
|
4603
4603
|
</div>
|
|
4604
|
-
`}};
|
|
4604
|
+
`}};At([a({type:Object})],exports.Profile.prototype,"account",2);At([a({type:Object})],exports.Profile.prototype,"personal",2);At([a({type:Object})],exports.Profile.prototype,"location",2);At([a({type:Object})],exports.Profile.prototype,"urls",2);At([a({type:Boolean})],exports.Profile.prototype,"showAvatarMenu",2);At([a({type:Object}),a({attribute:!1})],exports.Profile.prototype,"modalIcon",2);At([a({type:String})],exports.Profile.prototype,"orientation",2);At([a({type:String})],exports.Profile.prototype,"sidebarDisplayType",2);At([a({type:String})],exports.Profile.prototype,"mode",2);At([a({type:String})],exports.Profile.prototype,"widgetsLayout",2);At([a({type:Function})],exports.Profile.prototype,"toggleAvatarMenu",2);At([a({type:Function})],exports.Profile.prototype,"onAvatarChange",2);At([a({type:Function})],exports.Profile.prototype,"onAvatarRemove",2);At([a({type:Object})],exports.Profile.prototype,"content",2);exports.Profile=At([p("pont-profile")],exports.Profile);const fi={vertical:"pont-account-settings-sidebar-vertical",horizontal:"pont-account-settings-sidebar-horizontal",horizontalBurger:"pont-account-settings-sidebar-horizontal-burger"},o0="pont-account-settings-sidebar-burger-button pont-rounded-lg pont-cursor-pointer",i0="mobile-sidebar-drawer pont-account-settings-sidebar-mobile-drawer pont-transform pont-transition-all pont-duration-300 pont-ease-in-out",s0="mobile-sidebar-overlay pont-account-settings-sidebar-mobile-overlay pont-transition-opacity pont-duration-300 pont-ease-in-out";/**
|
|
4605
4605
|
* @license
|
|
4606
4606
|
* Copyright 2021 Google LLC
|
|
4607
4607
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
4608
|
-
*/const Mu=Ar(class extends
|
|
4608
|
+
*/const Mu=Ar(class extends ro{constructor(){super(...arguments),this.key=h}render(e,t){return this.key=e,t}update(e,[t,r]){return t!==this.key&&(yl(e),this.key=t),r}});var a0=Object.defineProperty,l0=Object.getOwnPropertyDescriptor,$n=(e,t,r,o)=>{for(var n=o>1?void 0:o?l0(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&&a0(t,r,n),n};let Tr=class extends v{constructor(){super(...arguments),this._messages=new Mt(this),this.orientation=Wr.HORIZONTAL,this.displayType=rr.REGULAR,this.mode=Pr.PAGE,this.config={showIcons:!0},this.activeTab=yr.PROFILE,this.isMenuOpen=!1}get isBurger(){return this.displayType===rr.BURGER}get isVertical(){return this.orientation===Wr.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 Mu(this.sidebarKey,l`
|
|
4609
4609
|
<pont-tabs-list
|
|
4610
4610
|
data-burger=${this.isBurger}
|
|
4611
4611
|
data-orientation=${e?"vertical":"horizontal"}
|
|
@@ -4634,7 +4634,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4634
4634
|
part="modal-close-button"
|
|
4635
4635
|
@click=${()=>this.dispatchEvent(new CustomEvent("close-user-profile",{bubbles:!0,composed:!0}))}
|
|
4636
4636
|
>
|
|
4637
|
-
${
|
|
4637
|
+
${Gt()}
|
|
4638
4638
|
</pont-button>
|
|
4639
4639
|
</div>
|
|
4640
4640
|
</div>
|
|
@@ -4655,7 +4655,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4655
4655
|
part="burger-close-button"
|
|
4656
4656
|
@click=${()=>this.toggleMenu()}
|
|
4657
4657
|
>
|
|
4658
|
-
${
|
|
4658
|
+
${Gt()}
|
|
4659
4659
|
</pont-button>
|
|
4660
4660
|
</div>
|
|
4661
4661
|
${this.renderTabs(!1)}
|
|
@@ -4682,7 +4682,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4682
4682
|
</div>
|
|
4683
4683
|
|
|
4684
4684
|
${this.isBurger?this.renderMobileDrawer():null}
|
|
4685
|
-
`}}
|
|
4685
|
+
`}};$n([a({type:String})],Tr.prototype,"orientation",2);$n([a({type:String})],Tr.prototype,"displayType",2);$n([a({type:String})],Tr.prototype,"mode",2);$n([a({type:Object})],Tr.prototype,"config",2);$n([a({type:String})],Tr.prototype,"activeTab",2);$n([g()],Tr.prototype,"isMenuOpen",2);Tr=$n([p("pont-profile-sidebar")],Tr);function nd(){document.dispatchEvent(new CustomEvent("open-user-profile",{bubbles:!0,composed:!0}))}function od(){document.dispatchEvent(new CustomEvent("close-user-profile",{bubbles:!0,composed:!0}))}function Uu(){document.dispatchEvent(new CustomEvent("open-member-management",{bubbles:!0,composed:!0}))}function Bu(){document.dispatchEvent(new CustomEvent("close-member-management",{bubbles:!0,composed:!0}))}function qu(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=nd,window.__pontCoreSdk.closeAccountSettingsModal=od,window.__pontCoreSdk.openMemberManagementModal=Uu,window.__pontCoreSdk.closeMemberManagementModal=Bu,window.__pontCoreSdk.setLocales=qu);var d0=Object.defineProperty,Yt=(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&&d0(t,r,n),n};class Dt extends v{constructor(){super(),this._messages=new Mt(this),this.showAvatarMenu=!1,this.orientation=Wr.HORIZONTAL,this.mobileDisplay=rr.REGULAR,this.mode=Pr.PAGE,this.widgetsLayout=st.ROW,this.content=null,this.isOpen=!1,this.currentBreakpoint="md",this.activeTab=yr.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===Wr.VERTICAL}get isHorizontalOrientation(){return this.orientation===Wr.HORIZONTAL}get isBurger(){return this.sidebarDisplayType===rr.BURGER}get sidebarDisplayType(){return this.isVerticalOrientation||this.currentBreakpoint==="md"?rr.REGULAR:rr.BURGER}get layoutKey(){return`${this.orientation}|${this.mode}|${this.widgetsLayout}|${this.mobileDisplay}`}get containerClasses(){const t=this.isBurger||this.isVerticalOrientation;return Jt(Sy,this.isModal?Oy:xy,this.isModal?Ey:Cy,t?"!pont-flex-col":"!pont-flex-row")}get contentClasses(){return Jt("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=V.getAuthenticatedUser())==null?void 0:r.email)??"",!!this.userContextValue.identifier)){this._userLoading=!0;try{this.userContextValue.user=await UE(),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<Sc.xs?"xs":t<Sc.sm?"sm":"md"}renderWatermark(){return this.isVerticalOrientation?l`
|
|
4686
4686
|
<div class="pont-account-settings-watermark-container">
|
|
4687
4687
|
<pont-watermark custom-id="pont-watermark"></pont-watermark>
|
|
4688
4688
|
</div>
|
|
@@ -4763,7 +4763,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4763
4763
|
${this.renderMainContent()}
|
|
4764
4764
|
</div>
|
|
4765
4765
|
</pont-modal>
|
|
4766
|
-
`:this.renderMainContent():h:this.isModal?h:this.renderLoadingSkeleton()}createRenderRoot(){return this}}
|
|
4766
|
+
`:this.renderMainContent():h:this.isModal?h:this.renderLoadingSkeleton()}createRenderRoot(){return this}}Yt([a({type:Boolean})],Dt.prototype,"showAvatarMenu");Yt([a({type:String})],Dt.prototype,"orientation");Yt([a({type:String})],Dt.prototype,"mobileDisplay");Yt([a({type:String,reflect:!0})],Dt.prototype,"mode");Yt([a({type:String})],Dt.prototype,"widgetsLayout");Yt([a({type:Object})],Dt.prototype,"content");Yt([g()],Dt.prototype,"isOpen");Yt([g()],Dt.prototype,"currentBreakpoint");Yt([g()],Dt.prototype,"activeTab");Yt([at({context:dr,subscribe:!0}),a({attribute:!1})],Dt.prototype,"auth");Yt([g()],Dt.prototype,"_userLoaded");Yt([g()],Dt.prototype,"_userLoading");Yt([Zt({context:ni}),g()],Dt.prototype,"userContextValue");customElements.define("pont-account-settings",Dt);var c0=Object.defineProperty,p0=Object.getOwnPropertyDescriptor,ju=(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.PontSecuritySettings=class extends v{constructor(){super(...arguments),this._messages=new Mt(this),this.loading=!1}render(){return this.loading?l`<div class="pont-account-settings-security-loading">
|
|
4767
4767
|
${f("security_loading")}
|
|
4768
4768
|
</div>`:l`
|
|
4769
4769
|
<div class="pont-account-settings-security-panel">
|
|
@@ -4796,7 +4796,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4796
4796
|
-->
|
|
4797
4797
|
</pont-empty>
|
|
4798
4798
|
</div>
|
|
4799
|
-
`}createRenderRoot(){return this}};ju([a({type:Boolean})],exports.PontSecuritySettings.prototype,"loading",2);exports.PontSecuritySettings=ju([p("pont-security-settings")],exports.PontSecuritySettings);const gi="[pont-member-management]",zu=Object.values(
|
|
4799
|
+
`}createRenderRoot(){return this}};ju([a({type:Boolean})],exports.PontSecuritySettings.prototype,"loading",2);exports.PontSecuritySettings=ju([p("pont-security-settings")],exports.PontSecuritySettings);const gi="[pont-member-management]",zu=Object.values(Kr);function ws(e){if(!(e instanceof Error)||e.name!=="ManagementTokenError")return;const t=e.code;return typeof t=="string"?t:void 0}function Vu(e){if(e instanceof TypeError)return!0;const t=ws(e);return t==="NETWORK_ERROR"||t==="TIMEOUT"}function h0(){var r;const e=(r=ai())==null?void 0:r.scope,t=typeof e=="string"?e.split(/\s+/):Array.isArray(e)?e:[];return zu.some(o=>t.includes(o))}const eh=[`allow ${zu.join(", ")} in the app's Allowed scopes (Pontive dashboard),`,"turn refresh tokens on for the app,","and request the scopes at sign-in through <pont-provider>'s env.scope, e.g.",'scope: ["openid", "email", "profile", "offline_access", ...Object.values(ORGANIZATION_MEMBER_SCOPES)].',"A session signed in before that holds none of them: sign in again."].join(" ");function u0(e){var r;const t=ws(e);return t==="invalid_scope"?h0()?(console.warn(`${gi} The session holds no organization-member scope in this organization. Usually the user's roles here allow no member management. Otherwise: the app does not allow the scopes, the app requires OAuth consent (embedded sign-in grants none of them), or the session was signed in before the scopes were requested. To enable the widget, ${eh}`),{message:f("members_forbidden"),retry:!1}):(console.warn(`${gi} This app can't manage organization members: it does not request the organization-member scopes. To enable the widget, ${eh}`),{message:f("members_unavailable"),retry:!1}):t==="invalid_target"||t==="INVALID_REQUEST"?(console.warn(`${gi} This app can't manage organization members: no management-API token can be issued for apiBaseUrl "${((r=ai())==null?void 0:r.apiBaseUrl)??""}" (${t}). Set <pont-provider>'s env.apiBaseUrl to the regional management gateway, e.g. "https://api.us.pontive.com".`),{message:f("members_unavailable"),retry:!1}):Vu(e)?{message:f("connection_failed"),retry:!0}:e instanceof _s&&e.status===403?(/scope/i.test(e.message)&&console.warn(`${gi} The management API refused the token's scope: ${e.message}`),{message:f("members_forbidden"),retry:!1}):{message:f("members_load_failed"),retry:!0}}const m0={self_role_change:"self_role_change",role_ceiling:"role_ceiling",member_roles_changed:"member_roles_changed",owner_transfer_required:"owner_transfer_required",leave_disabled:"leave_disabled"};function f0(){try{return V.hasScope(Kr.manage)||V.hasScope(Kr.invite)}catch{return!1}}function id(e,t,r){if(e instanceof _s){const o=e.code?m0[e.code]:void 0;if(o)return f(o);if(e.status===403)return f(f0()?"member_change_refused":"members_forbidden")}return ws(e)==="invalid_scope"?f("members_forbidden"):Vu(e)?f("connection_failed"):f(t)}function g0(e){return e instanceof _s&&e.code==="member_roles_changed"}function Gu(e){return e.map(t=>({value:t.key,label:t.name||t.key,description:t.description||void 0,disabled:!t.assignable_by_caller}))}function v0(e){return e.some(t=>t.assignable_by_caller)}function b0(e,t){const r=new Set(t.filter(o=>!o.assignable_by_caller).map(o=>o.key));return!e.some(o=>r.has(o))}var _0=Object.defineProperty,y0=Object.getOwnPropertyDescriptor,Ke=(e,t,r,o)=>{for(var n=o>1?void 0:o?y0(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&&_0(t,r,n),n};let ue=class extends v{constructor(){super(...arguments),this._messages=new Mt(this),this.drawerId="pont-member-invite",this.organizationId="",this.roles=[],this.emails=[],this.selectedRoles=[],this.customMessage="",this.errors={},this.open=!1,this.isLoading=!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.errors={},this.open=!0)},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)}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,form:void 0}}onRolesChange(e){this.selectedRoles=e,this.errors={...this.errors,roles:void 0,form:void 0}}handleMessageInput(e){this.customMessage=e.target.value}async handleSend(){var r;const e={};if(this.emails.length===0&&(e.emails=f("invite_emails_required")),this.selectedRoles.length===0&&(e.roles=f("roles_required")),Object.keys(e).length>0){this.errors=e;return}if(!this.organizationId)return;const t={emails:this.emails,roles:this.selectedRoles,message:this.customMessage.trim()||void 0,app_id:((r=ai())==null?void 0:r.appId)||void 0};this.isLoading=!0;try{const o=await jE(this.organizationId,t);this.emails=[],this.selectedRoles=[],this.customMessage="",this.errors={},window.dispatchEvent(new CustomEvent("invite-members-success",{detail:{organizationId:this.organizationId,response:o}})),this.close()}catch(o){console.error("[pont-member-management] Failed to send invitations:",o),this.errors={form:id(o,"invite_failed")}}finally{this.isLoading=!1}}render(){const e=Gu(this.roles),t=e.some(r=>r.disabled);return l`
|
|
4800
4800
|
<pont-sidedrawer
|
|
4801
4801
|
id=${this.drawerId}
|
|
4802
4802
|
side="right"
|
|
@@ -4817,7 +4817,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4817
4817
|
@click=${this.close}
|
|
4818
4818
|
?disabled=${this.isLoading}
|
|
4819
4819
|
>
|
|
4820
|
-
${
|
|
4820
|
+
${Gt()}
|
|
4821
4821
|
</pont-button>
|
|
4822
4822
|
</div>
|
|
4823
4823
|
<pont-typography-muted>
|
|
@@ -4905,7 +4905,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4905
4905
|
</div>
|
|
4906
4906
|
</div>
|
|
4907
4907
|
</pont-sidedrawer>
|
|
4908
|
-
`}};Ke([a({type:String})],ue.prototype,"drawerId",2);Ke([a({type:String})],ue.prototype,"organizationId",2);Ke([a({attribute:!1})],ue.prototype,"roles",2);Ke([g()],ue.prototype,"emails",2);Ke([g()],ue.prototype,"selectedRoles",2);Ke([g()],ue.prototype,"customMessage",2);Ke([g()],ue.prototype,"errors",2);Ke([g()],ue.prototype,"open",2);Ke([g()],ue.prototype,"isLoading",2);ue=Ke([p("pont-invite-members-form")],ue);var
|
|
4908
|
+
`}};Ke([a({type:String})],ue.prototype,"drawerId",2);Ke([a({type:String})],ue.prototype,"organizationId",2);Ke([a({attribute:!1})],ue.prototype,"roles",2);Ke([g()],ue.prototype,"emails",2);Ke([g()],ue.prototype,"selectedRoles",2);Ke([g()],ue.prototype,"customMessage",2);Ke([g()],ue.prototype,"errors",2);Ke([g()],ue.prototype,"open",2);Ke([g()],ue.prototype,"isLoading",2);ue=Ke([p("pont-invite-members-form")],ue);var w0=Object.defineProperty,$0=Object.getOwnPropertyDescriptor,mr=(e,t,r,o)=>{for(var n=o>1?void 0:o?$0(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&&w0(t,r,n),n};let Ne=class extends v{constructor(){super(...arguments),this._messages=new Mt(this),this.drawerId="pont-manage-roles",this.organizationId="",this.member=null,this.roles=[],this.selectedRoles=[],this.errors={},this.open=!1,this.isLoading=!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.errors={},this.open=!0,this.member&&(this.selectedRoles=(this.member.roles||[]).map(o=>o.key)))},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&&(this.selectedRoles=(this.member.roles||[]).map(t=>t.key))}close(){this.open=!1,window.dispatchEvent(new CustomEvent("close-sidedrawer",{detail:{id:this.drawerId}}))}onRolesChange(e){this.selectedRoles=e,this.errors={}}announceChanged(e,t){var r;window.dispatchEvent(new CustomEvent("update-members-role",{detail:{organizationId:this.organizationId,userId:(r=this.member)==null?void 0:r.user.id,roles:e,response:t},bubbles:!0,composed:!0}))}async reread(e){var t;try{const o=(t=(await Nu(this.organizationId,{user_ids:[e],limit:1})).data)==null?void 0:t[0];o&&(this.member=o,this.selectedRoles=(o.roles||[]).map(n=>n.key),this.announceChanged(this.selectedRoles))}catch(r){console.error("[pont-member-management] Failed to re-read member:",r)}}async handleSave(){var t;if(this.selectedRoles.length===0){this.errors={roles:f("roles_required")};return}const e=(t=this.member)==null?void 0:t.user.id;if(!(!this.organizationId||!e)){this.isLoading=!0;try{const r=await BE(this.organizationId,e,{roles:this.selectedRoles});this.errors={},this.announceChanged(this.selectedRoles,r),this.close()}catch(r){console.error("[pont-member-management] Failed to update member roles:",r),this.errors={form:id(r,"update_roles_failed")},g0(r)&&await this.reread(e)}finally{this.isLoading=!1}}}render(){var r;const e=Gu(this.roles),t=e.some(o=>o.disabled);return l`
|
|
4909
4909
|
<pont-sidedrawer
|
|
4910
4910
|
id=${this.drawerId}
|
|
4911
4911
|
side="right"
|
|
@@ -4926,7 +4926,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4926
4926
|
@click=${this.close}
|
|
4927
4927
|
?disabled=${this.isLoading}
|
|
4928
4928
|
>
|
|
4929
|
-
${
|
|
4929
|
+
${Gt()}
|
|
4930
4930
|
</pont-button>
|
|
4931
4931
|
</div>
|
|
4932
4932
|
<pont-typography-muted>
|
|
@@ -4996,7 +4996,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4996
4996
|
</div>
|
|
4997
4997
|
</div>
|
|
4998
4998
|
</pont-sidedrawer>
|
|
4999
|
-
`}};mr([a({type:String})],Ne.prototype,"drawerId",2);mr([a({type:String})],Ne.prototype,"organizationId",2);mr([a({type:Object})],Ne.prototype,"member",2);mr([a({attribute:!1})],Ne.prototype,"roles",2);mr([g()],Ne.prototype,"selectedRoles",2);mr([g()],Ne.prototype,"errors",2);mr([g()],Ne.prototype,"open",2);mr([g()],Ne.prototype,"isLoading",2);Ne=mr([p("pont-manage-roles-form")],Ne);var
|
|
4999
|
+
`}};mr([a({type:String})],Ne.prototype,"drawerId",2);mr([a({type:String})],Ne.prototype,"organizationId",2);mr([a({type:Object})],Ne.prototype,"member",2);mr([a({attribute:!1})],Ne.prototype,"roles",2);mr([g()],Ne.prototype,"selectedRoles",2);mr([g()],Ne.prototype,"errors",2);mr([g()],Ne.prototype,"open",2);mr([g()],Ne.prototype,"isLoading",2);Ne=mr([p("pont-manage-roles-form")],Ne);var P0=Object.defineProperty,C0=Object.getOwnPropertyDescriptor,re=(e,t,r,o)=>{for(var n=o>1?void 0:o?C0(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&&P0(t,r,n),n};let Ht=class extends v{constructor(){super(...arguments),this.open=!1,this.title="",this.warningText="",this.errorText="",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){this.dispatchEvent(new CustomEvent("modal-error",{bubbles:!0,detail:{error:t}}))}finally{this.isLoading=!1}}render(){return l`
|
|
5000
5000
|
<pont-modal
|
|
5001
5001
|
part="no_min_width"
|
|
5002
5002
|
.isOpen=${this.open}
|
|
@@ -5018,7 +5018,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5018
5018
|
part="modal-close-button"
|
|
5019
5019
|
@click=${this.handleClose}
|
|
5020
5020
|
>
|
|
5021
|
-
${
|
|
5021
|
+
${Gt()}
|
|
5022
5022
|
</pont-button>
|
|
5023
5023
|
</div>
|
|
5024
5024
|
<!-- Custom content via slot -->
|
|
@@ -5047,7 +5047,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5047
5047
|
</div>
|
|
5048
5048
|
</div>
|
|
5049
5049
|
</pont-modal>
|
|
5050
|
-
`}};re([a({type:Boolean})],
|
|
5050
|
+
`}};re([a({type:Boolean})],Ht.prototype,"open",2);re([a({type:String})],Ht.prototype,"title",2);re([a({attribute:!1})],Ht.prototype,"description",2);re([a({type:String})],Ht.prototype,"warningText",2);re([a({type:String})],Ht.prototype,"errorText",2);re([a({type:String})],Ht.prototype,"confirmLabel",2);re([a({type:String})],Ht.prototype,"cancelLabel",2);re([a({type:String})],Ht.prototype,"variant",2);re([g()],Ht.prototype,"isLoading",2);re([a({attribute:!1})],Ht.prototype,"onConfirm",2);re([a({attribute:!1})],Ht.prototype,"onCancel",2);Ht=re([p("pont-members-action-modal")],Ht);const rh=3,E0=e=>e.charAt(0).toUpperCase()+e.slice(1);function Hu(e){const t=o=>E0(o.name||o.key),r=e.slice(rh);return l`
|
|
5051
5051
|
<div class="pont-flex pont-gap-1 pont-flex-wrap">
|
|
5052
5052
|
${e.slice(0,rh).map(o=>l`<pont-badge variant="outline">${t(o)}</pont-badge>`)}
|
|
5053
5053
|
${r.length?l`<pont-hover-card part="more-roles">
|
|
@@ -5063,7 +5063,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5063
5063
|
<pont-typography-muted part="page-range">
|
|
5064
5064
|
${o.format(n)}–${o.format(i)} / ${o.format(r)}
|
|
5065
5065
|
</pont-typography-muted>
|
|
5066
|
-
`}var
|
|
5066
|
+
`}var S0=Object.defineProperty,x0=Object.getOwnPropertyDescriptor,jt=(e,t,r,o)=>{for(var n=o>1?void 0:o?x0(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&&S0(t,r,n),n};let It=class extends v{constructor(){super(...arguments),this._messages=new Mt(this),this.members=[],this.membersLoading=!1,this.searchTerm="",this.memberFilters={roles:[]},this.availableRoles=[],this.membersPage=1,this.membersTotalPages=0,this.membersTotal=0,this.rowsPerPage=5,this.canManage=!1,this.assignableRoles=[],this.currentUserId=""}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}))}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)||f("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:(i,s)=>{var c,u,b,_;if(e)return l`
|
|
5067
5067
|
<div class="pont-flex pont-items-center pont-gap-2">
|
|
5068
5068
|
<pont-skeleton
|
|
5069
5069
|
class="pont-h-10 pont-w-10 pont-rounded-full"
|
|
@@ -5073,52 +5073,52 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5073
5073
|
<pont-skeleton class="pont-h-3 pont-w-32"></pont-skeleton>
|
|
5074
5074
|
</div>
|
|
5075
5075
|
</div>
|
|
5076
|
-
`;const
|
|
5076
|
+
`;const d=((c=s.user)==null?void 0:c.name)||((u=s.user)==null?void 0:u.email)||f("unknown_user");return l`
|
|
5077
5077
|
<div class="pont-flex pont-items-center pont-gap-2">
|
|
5078
5078
|
<div>
|
|
5079
5079
|
<pont-avatar size="default">
|
|
5080
5080
|
<pont-avatar-image
|
|
5081
|
-
src=${((
|
|
5081
|
+
src=${((b=s.user)==null?void 0:b.picture)||""}
|
|
5082
5082
|
alt="avatar"
|
|
5083
5083
|
></pont-avatar-image>
|
|
5084
5084
|
<pont-avatar-fallback
|
|
5085
|
-
>${ds(
|
|
5085
|
+
>${ds(d)}</pont-avatar-fallback
|
|
5086
5086
|
>
|
|
5087
5087
|
</pont-avatar>
|
|
5088
5088
|
</div>
|
|
5089
5089
|
<div class="pont-flex pont-flex-col">
|
|
5090
5090
|
<pont-typography-table part="name"
|
|
5091
|
-
>${
|
|
5091
|
+
>${d}</pont-typography-table
|
|
5092
5092
|
>
|
|
5093
5093
|
<pont-typography-muted part="email"
|
|
5094
|
-
>${((
|
|
5094
|
+
>${((_=s.user)==null?void 0:_.email)||""}</pont-typography-muted
|
|
5095
5095
|
>
|
|
5096
5096
|
</div>
|
|
5097
5097
|
</div>
|
|
5098
|
-
`},joined_at:
|
|
5098
|
+
`},joined_at:i=>{if(e)return l`
|
|
5099
5099
|
<div class="pont-flex pont-flex-col pont-gap-1">
|
|
5100
5100
|
<pont-skeleton class="pont-h-4 pont-w-16"></pont-skeleton>
|
|
5101
5101
|
<pont-skeleton class="pont-h-3 pont-w-12"></pont-skeleton>
|
|
5102
5102
|
</div>
|
|
5103
|
-
`;const
|
|
5103
|
+
`;const s=al(i),d=ll(i);return l`
|
|
5104
5104
|
<div class="pont-flex pont-flex-col">
|
|
5105
5105
|
<pont-typography-table part="joined_at"
|
|
5106
|
-
>${
|
|
5106
|
+
>${s}</pont-typography-table
|
|
5107
5107
|
>
|
|
5108
5108
|
<pont-typography-muted part="joined_time"
|
|
5109
|
-
>${
|
|
5109
|
+
>${d}</pont-typography-muted
|
|
5110
5110
|
>
|
|
5111
5111
|
</div>
|
|
5112
|
-
`},roles:
|
|
5112
|
+
`},roles:i=>e?l`
|
|
5113
5113
|
<div class="pont-flex pont-gap-1">
|
|
5114
5114
|
<pont-skeleton class="pont-h-5 pont-w-12 pont-rounded"></pont-skeleton>
|
|
5115
5115
|
<pont-skeleton class="pont-h-5 pont-w-16 pont-rounded"></pont-skeleton>
|
|
5116
5116
|
</div>
|
|
5117
|
-
`:Hu(
|
|
5117
|
+
`:Hu(i??[]),organization:(i,s)=>e?l` <pont-skeleton class="pont-h-4 pont-w-20"></pont-skeleton> `:l`
|
|
5118
5118
|
<pont-typography-table part="organization"
|
|
5119
|
-
>${
|
|
5119
|
+
>${s.organization_name||s.organization_slug}</pont-typography-table
|
|
5120
5120
|
>
|
|
5121
|
-
`},r=Object.fromEntries(["name","roles","joined_at"].map(
|
|
5121
|
+
`},r=Object.fromEntries(["name","roles","joined_at"].map(i=>[i,()=>{const s={name:f("column_name"),roles:f("field_roles"),joined_at:f("column_joined")};return l` <span>${s[i]||i}</span> `}])),o=v0(this.assignableRoles),n=e||!this.canManage?[]:[{label:f("manage_roles"),condition:i=>{var s;return o&&((s=i.user)==null?void 0:s.id)!==this.currentUserId},action:i=>this.dispatchMemberAction("manage-member-roles",i)},{render:()=>l`<span part="danger-action">${f("remove_member")}</span>`,condition:i=>b0((i.roles??[]).map(s=>s.key),this.assignableRoles),action:i=>this.dispatchMemberAction("remove-member",i)}];return{cellRenderers:t,headerRenderers:r,rowActions:n,sortableColumns:e?[]:["name","joined_at"]}}renderPageLengthSelection(){return l`
|
|
5122
5122
|
<div
|
|
5123
5123
|
part="page-length-selection"
|
|
5124
5124
|
class="pont-flex pont-items-center pont-gap-1 pont-flex-wrap pont-justify-center"
|
|
@@ -5167,7 +5167,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5167
5167
|
variant="ghost"
|
|
5168
5168
|
size="sm"
|
|
5169
5169
|
>
|
|
5170
|
-
${
|
|
5170
|
+
${Gt()} ${f("clear_filters")}
|
|
5171
5171
|
</pont-button>
|
|
5172
5172
|
`:h}
|
|
5173
5173
|
</div>
|
|
@@ -5192,7 +5192,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5192
5192
|
class="pont-cursor-pointer pont-ml-1"
|
|
5193
5193
|
@click=${()=>this.removeFilter(n.value)}
|
|
5194
5194
|
>
|
|
5195
|
-
${
|
|
5195
|
+
${Gt()}
|
|
5196
5196
|
</span>
|
|
5197
5197
|
</pont-badge>
|
|
5198
5198
|
`)}
|
|
@@ -5239,7 +5239,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5239
5239
|
</div>
|
|
5240
5240
|
</div>
|
|
5241
5241
|
`}
|
|
5242
|
-
`}};
|
|
5242
|
+
`}};jt([a({attribute:!1})],It.prototype,"members",2);jt([a({type:Boolean,attribute:!1})],It.prototype,"membersLoading",2);jt([a({type:String})],It.prototype,"searchTerm",2);jt([a({type:Object,attribute:!1})],It.prototype,"memberFilters",2);jt([a({type:Array,attribute:!1})],It.prototype,"availableRoles",2);jt([a({type:Number})],It.prototype,"membersPage",2);jt([a({type:Number})],It.prototype,"membersTotalPages",2);jt([a({type:Number})],It.prototype,"membersTotal",2);jt([a({type:Number})],It.prototype,"rowsPerPage",2);jt([a({type:Boolean,attribute:!1})],It.prototype,"canManage",2);jt([a({type:Array,attribute:!1})],It.prototype,"assignableRoles",2);jt([a({type:String,attribute:!1})],It.prototype,"currentUserId",2);jt([g()],It.prototype,"_searchDebounceTimer",2);It=jt([p("pont-member-management-members-panel")],It);var O0=Object.defineProperty,R0=Object.getOwnPropertyDescriptor,ne=(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&&O0(t,r,n),n};let Kt=class extends v{constructor(){super(...arguments),this._messages=new Mt(this),this.invitations=[],this.invitationsLoading=!1,this.searchTerm="",this.invitationFilters={roles:[]},this.availableRoles=[],this.invitationsPage=1,this.invitationsTotalPages=0,this.invitationsTotal=0,this.rowsPerPage=5,this.canInvite=!1}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`
|
|
5243
5243
|
<div class="pont-flex pont-items-center pont-gap-2">
|
|
5244
5244
|
<pont-skeleton
|
|
5245
5245
|
class="pont-h-10 pont-w-10 pont-rounded-full"
|
|
@@ -5341,7 +5341,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5341
5341
|
variant="ghost"
|
|
5342
5342
|
size="sm"
|
|
5343
5343
|
>
|
|
5344
|
-
${
|
|
5344
|
+
${Gt()} ${f("clear_filters")}
|
|
5345
5345
|
</pont-button>
|
|
5346
5346
|
`:h}
|
|
5347
5347
|
</div>
|
|
@@ -5366,7 +5366,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5366
5366
|
class="pont-cursor-pointer pont-ml-1"
|
|
5367
5367
|
@click=${()=>this.removeFilter(n.value)}
|
|
5368
5368
|
>
|
|
5369
|
-
${
|
|
5369
|
+
${Gt()}
|
|
5370
5370
|
</span>
|
|
5371
5371
|
</pont-badge>
|
|
5372
5372
|
`)}
|
|
@@ -5413,7 +5413,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5413
5413
|
</div>
|
|
5414
5414
|
</div>
|
|
5415
5415
|
`}
|
|
5416
|
-
`}};ne([a({attribute:!1})],
|
|
5416
|
+
`}};ne([a({attribute:!1})],Kt.prototype,"invitations",2);ne([a({type:Boolean,attribute:!1})],Kt.prototype,"invitationsLoading",2);ne([a({type:String})],Kt.prototype,"searchTerm",2);ne([a({type:Object,attribute:!1})],Kt.prototype,"invitationFilters",2);ne([a({type:Array,attribute:!1})],Kt.prototype,"availableRoles",2);ne([a({type:Number})],Kt.prototype,"invitationsPage",2);ne([a({type:Number})],Kt.prototype,"invitationsTotalPages",2);ne([a({type:Number})],Kt.prototype,"invitationsTotal",2);ne([a({type:Number})],Kt.prototype,"rowsPerPage",2);ne([a({type:Boolean,attribute:!1})],Kt.prototype,"canInvite",2);ne([g()],Kt.prototype,"_searchDebounceTimer",2);Kt=ne([p("pont-member-management-invitations-panel")],Kt);var Nn=(e=>(e.MEMBERS="members",e.INVITATIONS="invitations",e))(Nn||{}),I0=Object.defineProperty,We=(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&&I0(t,r,n),n};const Bn="pont-organization-changed",Wu="pont-organization-switch-failed";class oe extends v{constructor(){super(...arguments),this._messages=new Mt(this),this.reloadOnSwitch=!1,this.emptyLabel="",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(Bn,this.onChangedElsewhere)}disconnectedCallback(){window.removeEventListener("focus",this.onFocus),document.removeEventListener(Bn,this.onChangedElsewhere),super.disconnectedCallback()}updated(t){t.has("auth")&&this.load()}readCurrent(){var t;this.currentId=((t=V.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 ME()}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 V.switchOrganization(t),this.readCurrent();const n=V.getOrganization(),i={organizationId:t,roles:(n==null?void 0:n.roles)??[],permissions:(n==null?void 0:n.permissions)??[]};this.dispatchEvent(new CustomEvent(Bn,{detail:i,bubbles:!0,composed:!0})),(r=this.onOrganizationChanged)==null||r.call(this,i),this.reloadOnSwitch&&window.location.reload()}catch(n){this.error=f("organization_switch_failed"),this.dispatchEvent(new CustomEvent(Wu,{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||f("select_organization")}render(){if(!this.loaded||this.organizations.length===0)return l``;const t=this.nameOf(this.currentId);return l`
|
|
5417
5417
|
<pont-dropdown-menu>
|
|
5418
5418
|
<pont-dropdown-menu-trigger as-child>
|
|
5419
5419
|
<pont-button part="trigger-button" variant="secondary" ?disabled=${!!this.switching}>
|
|
@@ -5445,7 +5445,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5445
5445
|
</div>`:""}
|
|
5446
5446
|
</pont-dropdown-menu-content>
|
|
5447
5447
|
</pont-dropdown-menu>
|
|
5448
|
-
`}}We([a({type:Boolean,attribute:"reload-on-switch"})],oe.prototype,"reloadOnSwitch");We([a({type:String,attribute:"empty-label"})],oe.prototype,"emptyLabel");We([a({attribute:!1})],oe.prototype,"onOrganizationChanged");We([a({attribute:!1})],oe.prototype,"onSwitchFailed");We([at({context:dr,subscribe:!0}),a({attribute:!1})],oe.prototype,"auth");We([g()],oe.prototype,"organizations");We([g()],oe.prototype,"currentId");We([g()],oe.prototype,"loaded");We([g()],oe.prototype,"switching");We([g()],oe.prototype,"error");customElements.define("pont-organization-switcher",oe);var
|
|
5448
|
+
`}}We([a({type:Boolean,attribute:"reload-on-switch"})],oe.prototype,"reloadOnSwitch");We([a({type:String,attribute:"empty-label"})],oe.prototype,"emptyLabel");We([a({attribute:!1})],oe.prototype,"onOrganizationChanged");We([a({attribute:!1})],oe.prototype,"onSwitchFailed");We([at({context:dr,subscribe:!0}),a({attribute:!1})],oe.prototype,"auth");We([g()],oe.prototype,"organizations");We([g()],oe.prototype,"currentId");We([g()],oe.prototype,"loaded");We([g()],oe.prototype,"switching");We([g()],oe.prototype,"error");customElements.define("pont-organization-switcher",oe);var T0=Object.defineProperty,H=(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&&T0(t,r,n),n};class z extends v{constructor(){super(...arguments),this._messages=new Mt(this),this.mode="PAGE",this.title="",this.description="",this.organizationId="",this.inviteDrawerId="pont-member-invite",this.manageRolesDrawerId="pont-manage-roles",this.isOpen=!1,this.loading=!0,this.problem=null,this.canRead=!1,this.canManage=!1,this.canInvite=!1,this.membersSearchTerm="",this.invitationsSearchTerm="",this.members=[],this.invitations=[],this.membersLoading=!1,this.invitationsLoading=!1,this.membersPage=1,this.membersTotalPages=0,this.invitationsPage=1,this.invitationsTotalPages=0,this.membersTotal=0,this.invitationsTotal=0,this.rowsPerPage=5,this.roles=[],this.memberFilters={roles:[]},this.invitationFilters={roles:[]},this.selectedMember=null,this.actionModalOpen=!1,this.actionError="",this.actionModalConfig={title:"",description:"",onConfirm:()=>{}},this.loadGeneration=0,this.loadedFor="",this._handleOpen=()=>{this.mode==="MODAL"&&(this.isOpen=!0)},this._handleClose=()=>{this.mode==="MODAL"&&(this.isOpen=!1)},this._handleOrganizationChanged=()=>{this.organizationId||this.load()},this._handleChanged=()=>{this.reloadLists()}}get effectiveOrganizationId(){var t;return this.organizationId||((t=V.getOrganization())==null?void 0:t.id)||""}get roleOptions(){return this.roles.map(t=>({value:t.key,label:t.name}))}tryRemoveFallback(){requestAnimationFrame(()=>{var t;(t=this.querySelector('[part="fallback"]'))==null||t.remove()})}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._handleChanged),window.addEventListener("update-members-role",this._handleChanged),document.addEventListener(Bn,this._handleOrganizationChanged)}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._handleChanged),window.removeEventListener("update-members-role",this._handleChanged),document.removeEventListener(Bn,this._handleOrganizationChanged)}firstUpdated(){this.isOpen=this.mode==="PAGE"}updated(t){var r;t.has("mode")&&(this.isOpen=this.mode==="PAGE"),(t.has("auth")||t.has("organizationId"))&&((r=this.auth)!=null&&r.resolved)&&this.auth.isAuthenticated&&this.effectiveOrganizationId!==this.loadedFor&&this.load()}async load(t=!1){const r=++this.loadGeneration,o=this.effectiveOrganizationId;if(this.loadedFor=o,this.problem=null,this.selectedMember=null,!o){this.loading=!1,this.problem={message:f("members_no_organization"),retry:!1},this.tryRemoveFallback();return}this.loading=!0;try{await ur()}catch(n){if(r!==this.loadGeneration)return;if(ws(n)==="SESSION_CHANGED"&&!t)return this.load(!0);this.fail(n);return}if(r===this.loadGeneration){if(this.canRead=V.hasScope(Kr.read),this.canManage=V.hasScope(Kr.manage),this.canInvite=V.hasScope(Kr.invite),!this.canRead){this.loading=!1,this.problem={message:f("members_forbidden"),retry:!1},this.tryRemoveFallback();return}try{const[n]=await Promise.all([HE(o),this.fetchMembers(o,this.memberParams(1)),this.fetchInvitations(o,this.invitationParams(1))]);if(r!==this.loadGeneration)return;this.roles=n,this.loading=!1}catch(n){if(r!==this.loadGeneration)return;this.fail(n);return}this.tryRemoveFallback()}}fail(t){console.error("[pont-member-management] Loading failed:",t),this.problem=u0(t),this.loading=!1,this.tryRemoveFallback()}memberParams(t){return this.listParams(t,this.membersSearchTerm,this.memberFilters.roles)}invitationParams(t){return this.listParams(t,this.invitationsSearchTerm,this.invitationFilters.roles)}listParams(t,r,o){const n={page:t,limit:this.rowsPerPage};return r.trim()&&(n.search=r.trim()),o.length&&(n.roles=o.join(",")),n}async fetchMembers(t,r){this.membersLoading=!0;try{const o=await Nu(t,r);this.members=o.data??[],this.membersPage=o.pagination.page,this.membersTotalPages=o.pagination.total_pages,this.membersTotal=o.pagination.total}finally{this.membersLoading=!1}}async fetchInvitations(t,r){this.invitationsLoading=!0;try{const o=await GE(t,r);this.invitations=o.data??[],this.invitationsPage=o.pagination.page,this.invitationsTotalPages=o.pagination.total_pages,this.invitationsTotal=o.pagination.total}finally{this.invitationsLoading=!1}}async loadMembers(t=this.membersPage){const r=this.loadGeneration;try{await this.fetchMembers(this.loadedFor,this.memberParams(t))}catch(o){r===this.loadGeneration&&this.fail(o)}}async loadInvitations(t=this.invitationsPage){const r=this.loadGeneration;try{await this.fetchInvitations(this.loadedFor,this.invitationParams(t))}catch(o){r===this.loadGeneration&&this.fail(o)}}async reloadLists(){this.problem||this.loading||await Promise.all([this.loadMembers(),this.loadInvitations()])}handleMembersPageChange(t){this.loadMembers(t.detail.page)}handleInvitationsPageChange(t){this.loadInvitations(t.detail.page)}handleMembersSearchChange(t){this.membersSearchTerm=t.detail.searchTerm||"",this.loadMembers(1)}handleInvitationsSearchChange(t){this.invitationsSearchTerm=t.detail.searchTerm||"",this.loadInvitations(1)}handleMembersFilterChange(t){this.memberFilters={roles:t.detail.roles||[]},this.loadMembers(1)}handleInvitationsFilterChange(t){var r;this.invitationFilters={roles:((r=t.detail)==null?void 0:r.roles)||[]},this.loadInvitations(1)}handleMembersClearFilters(){this.memberFilters={roles:[]},this.loadMembers(1)}handleInvitationsClearFilters(){this.invitationFilters={roles:[]},this.loadInvitations(1)}handleMembersRemoveFilter(t){const r=t.detail.filterValue;this.memberFilters={roles:this.memberFilters.roles.filter(o=>o!==r)},this.loadMembers(1)}handleInvitationsRemoveFilter(t){const r=t.detail.filterValue;this.invitationFilters={roles:this.invitationFilters.roles.filter(o=>o!==r)},this.loadInvitations(1)}handleMembersRowsPerPageChange(t){this.rowsPerPage=t.detail.rowsPerPage,this.loadMembers(1)}handleInvitationsRowsPerPageChange(t){this.rowsPerPage=t.detail.rowsPerPage,this.loadInvitations(1)}openDrawer(t){setTimeout(()=>{document.dispatchEvent(new CustomEvent("open-sidedrawer",{detail:{id:t,side:"right"},bubbles:!0,composed:!0}))},50)}openManageRoles(t){this.selectedMember=t.detail,this.openDrawer(this.manageRolesDrawerId)}async openActionModal(t){this.actionModalConfig=t,this.actionError="",this.actionModalOpen=!1,await this.updateComplete,this.actionModalOpen=!0}confirmed(t,r){return async()=>{this.actionError="";try{await t()}catch(o){throw console.error("[pont-member-management] Action failed:",o),this.actionError=id(o,r),o}}}highlighted(t,r){return l`
|
|
5449
5449
|
<p part="description">${t}</p>
|
|
5450
5450
|
<p part="description"><span part="highlight-name">${r}</span></p>
|
|
5451
5451
|
`}handleRemoveMember(t){var o,n;const r=t.detail;this.openActionModal({title:f("remove_member"),description:this.highlighted(f("remove_member_confirm"),((o=r.user)==null?void 0:o.name)||((n=r.user)==null?void 0:n.email)||f("unknown_user")),confirmLabel:f("remove_member"),variant:"danger",warningText:f("remove_member_warning"),onConfirm:this.confirmed(async()=>{await qE(this.loadedFor,r.user.id),this.loadMembers()},"remove_member_failed")})}handleResendInvitation(t){const r=t.detail;this.openActionModal({title:f("resend_invitation"),description:this.highlighted(f("resend_invitation_confirm"),r.invitee_email),confirmLabel:f("resend_invitation"),variant:"default",onConfirm:this.confirmed(async()=>{await zE(this.loadedFor,r.id),this.loadInvitations()},"resend_invitation_failed")})}handleRevokeInvitation(t){const r=t.detail;this.openActionModal({title:f("revoke_invitation"),description:this.highlighted(f("revoke_invitation_confirm"),r.invitee_email),confirmLabel:f("revoke_invitation"),variant:"danger",warningText:f("revoke_invitation_warning"),onConfirm:this.confirmed(async()=>{await VE(this.loadedFor,r.id),this.loadInvitations()},"revoke_invitation_failed")})}renderHeader(){return l`
|
|
@@ -5465,7 +5465,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5465
5465
|
part="modal-close-button"
|
|
5466
5466
|
@click=${this._handleClose}
|
|
5467
5467
|
>
|
|
5468
|
-
${
|
|
5468
|
+
${Gt()}
|
|
5469
5469
|
</pont-button>
|
|
5470
5470
|
`:h}
|
|
5471
5471
|
</div>
|
|
@@ -5491,16 +5491,16 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5491
5491
|
<div part="loading" class="pont-flex pont-justify-center pont-py-10">
|
|
5492
5492
|
<pont-spinner aria-label=${f("loading")}></pont-spinner>
|
|
5493
5493
|
</div>
|
|
5494
|
-
`}renderTabs(){var o;const t=this.roleOptions,r=((o=
|
|
5495
|
-
<pont-tabs defaultValue=${
|
|
5494
|
+
`}renderTabs(){var o;const t=this.roleOptions,r=((o=V.getAuthenticatedUser())==null?void 0:o.sub)??"";return l`
|
|
5495
|
+
<pont-tabs defaultValue=${Nn.MEMBERS}>
|
|
5496
5496
|
<div
|
|
5497
5497
|
class="pont-flex pont-flex-col-reverse pont-items-start pont-gap-2 md:pont-flex-row md:pont-items-center md:pont-justify-between"
|
|
5498
5498
|
>
|
|
5499
5499
|
<pont-tabs-list variant="line">
|
|
5500
|
-
<pont-tabs-trigger value=${
|
|
5500
|
+
<pont-tabs-trigger value=${Nn.MEMBERS}
|
|
5501
5501
|
>${f("tab_members")}</pont-tabs-trigger
|
|
5502
5502
|
>
|
|
5503
|
-
<pont-tabs-trigger value=${
|
|
5503
|
+
<pont-tabs-trigger value=${Nn.INVITATIONS}
|
|
5504
5504
|
>${f("tab_invitations")}</pont-tabs-trigger
|
|
5505
5505
|
>
|
|
5506
5506
|
</pont-tabs-list>
|
|
@@ -5517,7 +5517,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5517
5517
|
`:h}
|
|
5518
5518
|
</div>
|
|
5519
5519
|
<div class="pont-mt-6">
|
|
5520
|
-
<pont-tabs-content value=${
|
|
5520
|
+
<pont-tabs-content value=${Nn.MEMBERS}>
|
|
5521
5521
|
<pont-member-management-members-panel
|
|
5522
5522
|
.members=${this.members}
|
|
5523
5523
|
.membersLoading=${this.membersLoading}
|
|
@@ -5529,6 +5529,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5529
5529
|
.membersTotal=${this.membersTotal}
|
|
5530
5530
|
.rowsPerPage=${this.rowsPerPage}
|
|
5531
5531
|
.canManage=${this.canManage}
|
|
5532
|
+
.assignableRoles=${this.roles}
|
|
5532
5533
|
.currentUserId=${r}
|
|
5533
5534
|
@members-search-change=${this.handleMembersSearchChange}
|
|
5534
5535
|
@members-page-change=${this.handleMembersPageChange}
|
|
@@ -5542,7 +5543,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5542
5543
|
></pont-member-management-members-panel>
|
|
5543
5544
|
</pont-tabs-content>
|
|
5544
5545
|
|
|
5545
|
-
<pont-tabs-content value=${
|
|
5546
|
+
<pont-tabs-content value=${Nn.INVITATIONS}>
|
|
5546
5547
|
<pont-member-management-invitations-panel
|
|
5547
5548
|
.invitations=${this.invitations}
|
|
5548
5549
|
.invitationsLoading=${this.invitationsLoading}
|
|
@@ -5616,7 +5617,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5616
5617
|
>
|
|
5617
5618
|
${this.renderContent()}
|
|
5618
5619
|
</pont-modal>
|
|
5619
|
-
`:h:this.renderContent()}createRenderRoot(){return this}}
|
|
5620
|
+
`:h:this.renderContent()}createRenderRoot(){return this}}H([a({type:String})],z.prototype,"mode");H([a({type:String})],z.prototype,"title");H([a({type:String})],z.prototype,"description");H([a({type:String})],z.prototype,"organizationId");H([a({type:String})],z.prototype,"inviteDrawerId");H([a({type:String})],z.prototype,"manageRolesDrawerId");H([at({context:dr,subscribe:!0}),a({attribute:!1})],z.prototype,"auth");H([g()],z.prototype,"isOpen");H([g()],z.prototype,"loading");H([g()],z.prototype,"problem");H([g()],z.prototype,"canRead");H([g()],z.prototype,"canManage");H([g()],z.prototype,"canInvite");H([g()],z.prototype,"membersSearchTerm");H([g()],z.prototype,"invitationsSearchTerm");H([g()],z.prototype,"members");H([g()],z.prototype,"invitations");H([g()],z.prototype,"membersLoading");H([g()],z.prototype,"invitationsLoading");H([g()],z.prototype,"membersPage");H([g()],z.prototype,"membersTotalPages");H([g()],z.prototype,"invitationsPage");H([g()],z.prototype,"invitationsTotalPages");H([g()],z.prototype,"membersTotal");H([g()],z.prototype,"invitationsTotal");H([g()],z.prototype,"rowsPerPage");H([g()],z.prototype,"roles");H([g()],z.prototype,"memberFilters");H([g()],z.prototype,"invitationFilters");H([g()],z.prototype,"selectedMember");H([g()],z.prototype,"actionModalOpen");H([g()],z.prototype,"actionError");H([g()],z.prototype,"actionModalConfig");customElements.define("pont-member-management",z);var A0=Object.defineProperty,D0=Object.getOwnPropertyDescriptor,$s=(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&&A0(t,r,n),n};exports.PreviewComponent=class extends v{constructor(){super(...arguments),this.loading=!1,this.renderSpec=null,this.branding=vo}createRenderRoot(){return this}render(){return l`
|
|
5620
5621
|
${this.loading?l`<div class="pont-p-8 pont-text-center">Loading...</div>`:l`
|
|
5621
5622
|
<pont-provider>
|
|
5622
5623
|
<signed-out>
|
|
@@ -5628,7 +5629,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5628
5629
|
</signed-out>
|
|
5629
5630
|
</pont-provider>
|
|
5630
5631
|
`}
|
|
5631
|
-
`}};$s([a({type:Boolean})],exports.PreviewComponent.prototype,"loading",2);$s([a({type:Object})],exports.PreviewComponent.prototype,"renderSpec",2);$s([a({attribute:!1})],exports.PreviewComponent.prototype,"branding",2);exports.PreviewComponent=$s([p("pont-preview")],exports.PreviewComponent);const
|
|
5632
|
+
`}};$s([a({type:Boolean})],exports.PreviewComponent.prototype,"loading",2);$s([a({type:Object})],exports.PreviewComponent.prototype,"renderSpec",2);$s([a({attribute:!1})],exports.PreviewComponent.prototype,"branding",2);exports.PreviewComponent=$s([p("pont-preview")],exports.PreviewComponent);const L0=409;function sd(e){if(e instanceof DOMException&&(e.name==="NotAllowedError"||e.name==="AbortError"))return{message:f("passkey_cancelled"),restartable:!1};const{status:t,code:r,message:o}=k0(e);return t===L0?{message:nh(o)??f("flow_ended"),restartable:!0}:t===void 0&&(r==="NETWORK_ERROR"||r==="TIMEOUT")?{message:f("connection_failed"),restartable:!1}:t===429?{message:f("too_many_attempts"),restartable:!1}:t!==void 0&&t>=500?{message:f("server_error"),restartable:!1}:{message:nh(o)??f("generic_error"),restartable:!1}}function k0(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 nh(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/[.!?。!?]$/u.test(r)?r:`${r}.`}var F0=Object.defineProperty,Ps=(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&&F0(t,r,n),n};class Pn extends v{constructor(){super(...arguments),this.renderSpec=null,this.branding=vo,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 $1(V);try{await this.startFlow()}catch(t){console.error(`[${this.localName}] Starting the flow failed:`,t),this.startError=sd(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">
|
|
5632
5633
|
<pont-alert status="error" description=${this.startError}></pont-alert>
|
|
5633
5634
|
<pont-button variant="outline" @click=${this.restart}>
|
|
5634
5635
|
Try again
|
|
@@ -5636,7 +5637,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5636
5637
|
</div>`:this.renderSpec?l`<pont-layout
|
|
5637
5638
|
.renderSpec=${this.renderSpec}
|
|
5638
5639
|
.branding=${this.branding}
|
|
5639
|
-
></pont-layout>`:l``}}Ps([at({context:Ou,subscribe:!0})]
|
|
5640
|
+
></pont-layout>`:l``}}Ps([at({context:Ou,subscribe:!0})],Pn.prototype,"renderSpec");Ps([at({context:ei,subscribe:!0})],Pn.prototype,"branding");Ps([at({context:Yl,subscribe:!0})],Pn.prototype,"locales");Ps([g()],Pn.prototype,"startError");var N0=Object.getOwnPropertyDescriptor,M0=(e,t,r,o)=>{for(var n=o>1?void 0:o?N0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};exports.PontInvitation=class extends Pn{startFlow(){return V.startLoginflow()}};exports.PontInvitation=M0([p("pont-invitation")],exports.PontInvitation);class Zn extends Error{constructor(t,r,o){super(t),this.code=r,this.status=o,this.name="ConsentError"}}function Yu(e,t){return`${e.replace(/\/+$/,"")}/auth/v1/consent/${encodeURIComponent(t)}`}async function U0(e,t,r={}){const o=r.locales?`?${new URLSearchParams({locales:r.locales})}`:"",n=await Ju(`${Yu(e,t)}${o}`,{method:"GET"});if(Xu(n))return n;throw new Zn("Unexpected consent response.","UNEXPECTED_RESPONSE")}async function B0(e,t,r,o){const n=await Ju(Yu(e,t),{method:"POST",body:JSON.stringify({event:r,data:o})});if(zo(n)&&typeof n.redirect_to=="string"&&n.redirect_to)return{redirect_to:n.redirect_to};if(Xu(n))return n;throw new Zn("Unexpected consent response.","UNEXPECTED_RESPONSE")}async function q0(e,t,r,o,n){if(!r)return;let i;try{i=await B0(e,t,r,o)}catch(s){throw s instanceof Zn&&s.status===404?new Zn(Qu,s.code,s.status):s}"redirect_to"in i?n.navigate(i.redirect_to):n.render(i)}const Qu="This request has expired. Go back to the app and try again.";function j0(e){return(zo(e)?e.status:void 0)===404?{message:Qu,restartable:!1}:sd(e)}async function Ju(e,t){let r;try{r=await fetch(e,{...t,credentials:"same-origin",headers:{Accept:"application/json",...t.body?{"Content-Type":"application/json"}:{}}})}catch(n){throw new Zn(n instanceof Error?n.message:String(n),"NETWORK_ERROR")}const o=await r.json().catch(()=>{});if(!r.ok){const n=zo(o)?o:{},i=zo(n.error)?n.error:{},s=vi(i.code)??vi(n.code)??"API_ERROR",d=vi(i.message)??vi(n.message)??`HTTP ${r.status}: ${r.statusText}`;throw new Zn(d,s,r.status)}return o}function Xu(e){return zo(e)&&typeof e.render_spec=="string"}function zo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function vi(e){return typeof e=="string"&&e!==""?e:void 0}var z0=Object.defineProperty,V0=Object.getOwnPropertyDescriptor,Lr=(e,t,r,o)=>{for(var n=o>1?void 0:o?V0(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&&z0(t,r,n),n};exports.PontConsent=class extends v{constructor(){super(...arguments),this.consentRequest="",this.baseUrl="",this.branding=vo,this.locales="",this.renderSpec=null,this.retryable=!1,this.__started=!1,this.__loadSeq=0,this.reload=()=>{this.load()},this.submit=(t,r)=>q0(this.baseUrl,this.consentRequest,r,t,{navigate:o=>window.location.assign(o),render:o=>this.show(o)})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.addEventListener(exports.PontKitLayout.RESTART_EVENT,this.reload)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(exports.PontKitLayout.RESTART_EVENT,this.reload)}updated(t){this.__started?exports.PontConsent.RELOAD_ON.some(r=>t.has(r))&&this.load():(this.__started=!0,this.load()),t.has("renderSpec")&&this.renderSpec&&this.tryRemoveFallback()}async load(){const t=++this.__loadSeq;this.loadError=void 0;try{if(!this.consentRequest)throw new Error("No consent request was given.");const r=await U0(this.baseUrl,this.consentRequest,{locales:this.locales||void 0});t===this.__loadSeq&&this.show(r)}catch(r){if(t!==this.__loadSeq)return;console.error(`[${this.localName}] Loading the consent request failed:`,r),this.loadError=j0(r).message,this.retryable=(r==null?void 0:r.status)!==404,this.renderSpec=null}finally{this.tryRemoveFallback()}}show(t){t.locale&&(this.lang=t.locale),(t.dir==="rtl"||t.dir==="ltr")&&(this.dir=t.dir),this.renderSpec=t.render_spec}tryRemoveFallback(){requestAnimationFrame(()=>{var t;(t=this.querySelector('[part="fallback"]'))==null||t.remove()})}render(){return this.loadError?l`<div part="flow-error" class="pont-flex pont-flex-col pont-gap-3">
|
|
5640
5641
|
<pont-alert status="error" description=${this.loadError}></pont-alert>
|
|
5641
5642
|
${this.retryable?l`<pont-button variant="outline" @click=${this.reload}>
|
|
5642
5643
|
Try again
|
|
@@ -5645,7 +5646,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5645
5646
|
.renderSpec=${this.renderSpec}
|
|
5646
5647
|
.branding=${this.branding}
|
|
5647
5648
|
.submitHandler=${this.submit}
|
|
5648
|
-
></pont-layout>`:l``}};exports.PontConsent.RELOAD_ON=["consentRequest","baseUrl","locales"];Lr([a({attribute:"consent-request"})],exports.PontConsent.prototype,"consentRequest",2);Lr([a({attribute:"base-url"})],exports.PontConsent.prototype,"baseUrl",2);Lr([at({context:ei,subscribe:!0})],exports.PontConsent.prototype,"branding",2);Lr([at({context:Yl,subscribe:!0})],exports.PontConsent.prototype,"locales",2);Lr([g()],exports.PontConsent.prototype,"renderSpec",2);Lr([g()],exports.PontConsent.prototype,"loadError",2);Lr([g()],exports.PontConsent.prototype,"retryable",2);exports.PontConsent=Lr([p("pont-consent")],exports.PontConsent);var
|
|
5649
|
+
></pont-layout>`:l``}};exports.PontConsent.RELOAD_ON=["consentRequest","baseUrl","locales"];Lr([a({attribute:"consent-request"})],exports.PontConsent.prototype,"consentRequest",2);Lr([a({attribute:"base-url"})],exports.PontConsent.prototype,"baseUrl",2);Lr([at({context:ei,subscribe:!0})],exports.PontConsent.prototype,"branding",2);Lr([at({context:Yl,subscribe:!0})],exports.PontConsent.prototype,"locales",2);Lr([g()],exports.PontConsent.prototype,"renderSpec",2);Lr([g()],exports.PontConsent.prototype,"loadError",2);Lr([g()],exports.PontConsent.prototype,"retryable",2);exports.PontConsent=Lr([p("pont-consent")],exports.PontConsent);var G0=Object.getOwnPropertyDescriptor,H0=(e,t,r,o)=>{for(var n=o>1?void 0:o?G0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};exports.PontSignIn=class extends Pn{startFlow(){return V.startLoginflow("sys_signin-flow-passkey")}};exports.PontSignIn=H0([p("pont-signin")],exports.PontSignIn);var K0=Object.getOwnPropertyDescriptor,W0=(e,t,r,o)=>{for(var n=o>1?void 0:o?K0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};exports.PontSignUp=class extends Pn{startFlow(){return V.startLoginflow("sys_signup-flow")}};exports.PontSignUp=W0([p("pont-signup")],exports.PontSignUp);var Y0=Object.defineProperty,Ye=(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&&Y0(t,r,n),n};class Cs extends v{constructor(){super(...arguments),this.isTrigger=!1,this.user={}}createRenderRoot(){return this}render(){const{name:t,email:r,avatar_url:o}=this.user||{};return l`
|
|
5649
5650
|
<div
|
|
5650
5651
|
class=${Jt("pont-flex pont-items-center pont-gap-2 pont-w-full",this.isTrigger?"pont-py-2":"")}
|
|
5651
5652
|
>
|
|
@@ -5665,7 +5666,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5665
5666
|
>`:""}
|
|
5666
5667
|
</div>
|
|
5667
5668
|
</div>
|
|
5668
|
-
`}}Ye([a({type:Boolean})],Cs.prototype,"isTrigger");Ye([a({type:Object})],Cs.prototype,"user");customElements.define("pont-user-snippet",Cs);class Qe extends v{constructor(){super(...arguments),this._messages=new Mt(this),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}nd(),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})),
|
|
5669
|
+
`}}Ye([a({type:Boolean})],Cs.prototype,"isTrigger");Ye([a({type:Object})],Cs.prototype,"user");customElements.define("pont-user-snippet",Cs);class Qe extends v{constructor(){super(...arguments),this._messages=new Mt(this),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}nd(),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})),V.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=V.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`
|
|
5669
5670
|
<pont-dropdown-menu-item
|
|
5670
5671
|
@click=${r=>this._handleMenuItemClick(r,t)}
|
|
5671
5672
|
data-id=${t.id||""}
|
|
@@ -5763,7 +5764,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5763
5764
|
* @license
|
|
5764
5765
|
* Copyright 2020 Google LLC
|
|
5765
5766
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5766
|
-
*/const Zu=Symbol.for(""),
|
|
5767
|
+
*/const Zu=Symbol.for(""),Q0=e=>{if((e==null?void 0:e.r)===Zu)return e==null?void 0:e._$litStatic$},J0=e=>({_$litStatic$:e,r:Zu}),oh=new Map,X0=e=>(t,...r)=>{const o=r.length;let n,i;const s=[],d=[];let c,u=0,b=!1;for(;u<o;){for(c=t[u];u<o&&(i=r[u],(n=Q0(i))!==void 0);)c+=n+t[++u],b=!0;u!==o&&d.push(i),s.push(c),u++}if(u===o&&s.push(t[o]),b){const _=s.join("$$lit$$");(t=oh.get(_))===void 0&&(s.raw=s,oh.set(_,t=s)),r=d}return e(t,...r)},ua=X0(l);var Z0=Object.defineProperty,tS=Object.getOwnPropertyDescriptor,wt=(e,t,r,o)=>{for(var n=o>1?void 0:o?tS(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&&Z0(t,r,n),n};exports.PontOtp=class extends ge{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 V.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 V.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 ua`
|
|
5767
5768
|
<pont-field ?disabled=${this.disabled} ?invalid=${this._invalid}>
|
|
5768
5769
|
<pont-input-otp
|
|
5769
5770
|
part=${this.id?this.id:"otp"}
|
|
@@ -5778,7 +5779,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5778
5779
|
.onBlur=${this.handleBlur}
|
|
5779
5780
|
.onChange=${r=>this._value=r}
|
|
5780
5781
|
>
|
|
5781
|
-
${
|
|
5782
|
+
${J0(this.buildOTPContentHTML())}
|
|
5782
5783
|
</pont-input-otp>
|
|
5783
5784
|
${this._invalid?ua`
|
|
5784
5785
|
<pont-field-error
|
|
@@ -5799,7 +5800,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5799
5800
|
</pont-button>
|
|
5800
5801
|
</div>
|
|
5801
5802
|
`:h}
|
|
5802
|
-
`}};exports.PontOtp.ROOT="otp";exports.PontOtp.TAG=`${j}-${exports.PontOtp.ROOT}`;wt([a({type:Boolean,attribute:"exclude-from-form",converter:{fromAttribute:e=>e!==null&&e!=="false",toAttribute:e=>e?"":null}})],exports.PontOtp.prototype,"excludeFromForm",2);wt([a({type:Boolean})],exports.PontOtp.prototype,"required",2);wt([a({attribute:"required-error"})],exports.PontOtp.prototype,"requiredError",2);wt([a({attribute:"incomplete-error"})],exports.PontOtp.prototype,"incompleteError",2);wt([a()],exports.PontOtp.prototype,"variant",2);wt([a({type:Number})],exports.PontOtp.prototype,"length",2);wt([a({type:Number})],exports.PontOtp.prototype,"timeout",2);wt([a({attribute:"data-key"})],exports.PontOtp.prototype,"dataKey",2);wt([a()],exports.PontOtp.prototype,"name",2);wt([a({type:Boolean})],exports.PontOtp.prototype,"disabled",2);wt([a({type:Boolean,attribute:"auto-submit",converter:{fromAttribute:e=>e!==null&&e!=="false",toAttribute:e=>e?"":null}})],exports.PontOtp.prototype,"autoSubmit",2);wt([a()],exports.PontOtp.prototype,"event",2);wt([a({attribute:"resend-text"})],exports.PontOtp.prototype,"resendText",2);wt([a({attribute:"resend-button-text"})],exports.PontOtp.prototype,"resendButtonText",2);wt([a({attribute:"resend-event"})],exports.PontOtp.prototype,"resendEvent",2);wt([a()],exports.PontOtp.prototype,"id",2);wt([g()],exports.PontOtp.prototype,"_invalid",2);wt([g()],exports.PontOtp.prototype,"_error",2);wt([g()],exports.PontOtp.prototype,"_value",2);exports.PontOtp=wt([p("pont-otp")],exports.PontOtp);const bi={duration:60,resend_event:"",resend_button_label:"Resend code",count_down_text:"Resend code in "};var
|
|
5803
|
+
`}};exports.PontOtp.ROOT="otp";exports.PontOtp.TAG=`${j}-${exports.PontOtp.ROOT}`;wt([a({type:Boolean,attribute:"exclude-from-form",converter:{fromAttribute:e=>e!==null&&e!=="false",toAttribute:e=>e?"":null}})],exports.PontOtp.prototype,"excludeFromForm",2);wt([a({type:Boolean})],exports.PontOtp.prototype,"required",2);wt([a({attribute:"required-error"})],exports.PontOtp.prototype,"requiredError",2);wt([a({attribute:"incomplete-error"})],exports.PontOtp.prototype,"incompleteError",2);wt([a()],exports.PontOtp.prototype,"variant",2);wt([a({type:Number})],exports.PontOtp.prototype,"length",2);wt([a({type:Number})],exports.PontOtp.prototype,"timeout",2);wt([a({attribute:"data-key"})],exports.PontOtp.prototype,"dataKey",2);wt([a()],exports.PontOtp.prototype,"name",2);wt([a({type:Boolean})],exports.PontOtp.prototype,"disabled",2);wt([a({type:Boolean,attribute:"auto-submit",converter:{fromAttribute:e=>e!==null&&e!=="false",toAttribute:e=>e?"":null}})],exports.PontOtp.prototype,"autoSubmit",2);wt([a()],exports.PontOtp.prototype,"event",2);wt([a({attribute:"resend-text"})],exports.PontOtp.prototype,"resendText",2);wt([a({attribute:"resend-button-text"})],exports.PontOtp.prototype,"resendButtonText",2);wt([a({attribute:"resend-event"})],exports.PontOtp.prototype,"resendEvent",2);wt([a()],exports.PontOtp.prototype,"id",2);wt([g()],exports.PontOtp.prototype,"_invalid",2);wt([g()],exports.PontOtp.prototype,"_error",2);wt([g()],exports.PontOtp.prototype,"_value",2);exports.PontOtp=wt([p("pont-otp")],exports.PontOtp);const bi={duration:60,resend_event:"",resend_button_label:"Resend code",count_down_text:"Resend code in "};var eS=Object.defineProperty,rS=Object.getOwnPropertyDescriptor,kr=(e,t,r,o)=>{for(var n=o>1?void 0:o?rS(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&&eS(t,r,n),n};exports.PontOtpResend=class extends v{constructor(){super(...arguments),this.seed=_t(),this.duration=bi.duration,this.resend_event=bi.resend_event,this.resend_button_label=bi.resend_button_label,this.count_down_text=bi.count_down_text,this._remaining=0,this._handleResendClick=()=>{V.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`
|
|
5803
5804
|
<div part=${exports.PontOtpResend.PARTS.root} id=${this.rootId}>
|
|
5804
5805
|
${t?l`
|
|
5805
5806
|
<pont-typography-muted
|
|
@@ -5819,24 +5820,24 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5819
5820
|
</pont-button>
|
|
5820
5821
|
`}
|
|
5821
5822
|
</div>
|
|
5822
|
-
`}};exports.PontOtpResend.ROOT="otp-resend";exports.PontOtpResend.COUNTDOWN="countdown";exports.PontOtpResend.RESEND_BUTTON="resend-button";exports.PontOtpResend.TAG=`${j}-${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}`};kr([a({type:String})],exports.PontOtpResend.prototype,"seed",2);kr([a({type:String,attribute:"custom-id"})],exports.PontOtpResend.prototype,"customId",2);kr([a({type:Number})],exports.PontOtpResend.prototype,"duration",2);kr([a({type:String,attribute:"resend-event"})],exports.PontOtpResend.prototype,"resend_event",2);kr([a({type:String,attribute:"resend-button-label"})],exports.PontOtpResend.prototype,"resend_button_label",2);kr([a({type:String,attribute:"count-down-text"})],exports.PontOtpResend.prototype,"count_down_text",2);kr([g()],exports.PontOtpResend.prototype,"_remaining",2);exports.PontOtpResend=kr([p("pont-otp-resend")],exports.PontOtpResend);const
|
|
5823
|
+
`}};exports.PontOtpResend.ROOT="otp-resend";exports.PontOtpResend.COUNTDOWN="countdown";exports.PontOtpResend.RESEND_BUTTON="resend-button";exports.PontOtpResend.TAG=`${j}-${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}`};kr([a({type:String})],exports.PontOtpResend.prototype,"seed",2);kr([a({type:String,attribute:"custom-id"})],exports.PontOtpResend.prototype,"customId",2);kr([a({type:Number})],exports.PontOtpResend.prototype,"duration",2);kr([a({type:String,attribute:"resend-event"})],exports.PontOtpResend.prototype,"resend_event",2);kr([a({type:String,attribute:"resend-button-label"})],exports.PontOtpResend.prototype,"resend_button_label",2);kr([a({type:String,attribute:"count-down-text"})],exports.PontOtpResend.prototype,"count_down_text",2);kr([g()],exports.PontOtpResend.prototype,"_remaining",2);exports.PontOtpResend=kr([p("pont-otp-resend")],exports.PontOtpResend);const nS=[exports.PontEmailField,exports.PontPhoneField,exports.PontUsernameField,exports.PontIdentifierField,exports.PontNameField,exports.PontPasswordField,exports.PontConfirmField,exports.PontOtp,exports.PontScopeList],oS=[exports.PontPasskeyButton,exports.PontProviderButton,exports.PontLink];var iS=Object.defineProperty,sS=Object.getOwnPropertyDescriptor,li=(e,t,r,o)=>{for(var n=o>1?void 0:o?sS(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&&iS(t,r,n),n};exports.PontForm=class extends v{constructor(){super(...arguments),this.seed=_t(),this._loading=!1,this._handleSubmitClick=t=>{var o;this._pendingEvent=(o=t.detail)==null?void 0:o.event;const r=t.composedPath()[0];this._pendingSubmit=r instanceof exports.PontSubmitButton?r:void 0},this._handleSubmit=async t=>{if(t.preventDefault(),this._loading)return;const r=this._fields;if(!r.map(y=>y.validate()).every(Boolean))return;const i={};r.forEach(y=>{i[y.name]=y.value});const s=this._pendingEvent,d=this.onSubmit;if(!d){if(!s)return;const y=new CustomEvent(exports.PontForm.SUBMIT_EVENT,{detail:{id:this.rootId,data:i,event:s},bubbles:!0,composed:!0,cancelable:!0});if(this.dispatchEvent(y),y.defaultPrevented)return}const c=this._interactives,u=this._submits,b=r.map(y=>!!y.disabled),_=c.map(y=>!!y.disabled),w=u.map(y=>!!y.disabled);this._setLoading(!0,r,b,c,_,u,w);try{if(d){await d(i,s);return}const y=await V.processLoginflowEvent({event:s,...Object.keys(i).length?{data:i}:{}});this._dispatch(exports.PontForm.SUCCESS_EVENT,{id:this.rootId,data:i,event:s,result:y})}catch(y){const P=y instanceof Error?y.message:String(y);this._dispatch(exports.PontForm.ERROR_EVENT,{id:this.rootId,data:i,event:s,message:P,error:y})}finally{this._setLoading(!1,r,b,c,_,u,w),this._pendingEvent=void 0,this._pendingSubmit=void 0}},this._handleReset=t=>{this._pendingEvent=void 0,this._pendingSubmit=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(nS.map(o=>o.TAG).join(", "))).filter(o=>typeof o.isFormField>"u"?!0:o.isFormField):[]}get _submits(){const t=this._form;if(!t)return[];const r=exports.PontSubmitButton.TAG;return Array.from(t.querySelectorAll(r))}get _interactives(){const t=this._form;if(!t)return[];const r=oS.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,s,d){r.forEach((u,b)=>{u.disabled=t?!0:o[b]}),n.forEach((u,b)=>{u.disabled=t?!0:i[b]});const c=this._pendingSubmit??s[0];s.forEach((u,b)=>{if(u===c){u.loading=t;return}u.disabled=t?!0:d[b]}),this._loading=t}render(){return l`
|
|
5823
5824
|
<form
|
|
5824
5825
|
id="${this.rootId}"
|
|
5825
5826
|
part="${exports.PontForm.PARTS.root}"
|
|
5826
5827
|
@submit=${this._handleSubmit}
|
|
5827
5828
|
@reset=${this._handleReset}
|
|
5828
5829
|
></form>
|
|
5829
|
-
`}};exports.PontForm.ROOT="form";exports.PontForm.TAG=`${j}-${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};li([a({type:String})],exports.PontForm.prototype,"seed",2);li([a({type:String,attribute:"custom-id"})],exports.PontForm.prototype,"customId",2);li([a({attribute:!1})],exports.PontForm.prototype,"onSubmit",2);li([a({attribute:!1})],exports.PontForm.prototype,"onReset",2);exports.PontForm=li([p("pont-form")],exports.PontForm);var
|
|
5830
|
+
`}};exports.PontForm.ROOT="form";exports.PontForm.TAG=`${j}-${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};li([a({type:String})],exports.PontForm.prototype,"seed",2);li([a({type:String,attribute:"custom-id"})],exports.PontForm.prototype,"customId",2);li([a({attribute:!1})],exports.PontForm.prototype,"onSubmit",2);li([a({attribute:!1})],exports.PontForm.prototype,"onReset",2);exports.PontForm=li([p("pont-form")],exports.PontForm);var aS=Object.defineProperty,lS=Object.getOwnPropertyDescriptor,wo=(e,t,r,o)=>{for(var n=o>1?void 0:o?lS(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&&aS(t,r,n),n};exports.PontKitLayout=class extends v{constructor(){super(...arguments),this.spec="",this.designMode=!1,this.branding=vo,this.handleError=t=>{const r=t.detail??{};console.error(`${t.type}:`,r.message),this.showError(sd(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`
|
|
5830
5831
|
<pont-form custom-id="pont-layout-form" .onSubmit=${this.submitHandler}>
|
|
5831
5832
|
<div class="pont-relative pont-flex">
|
|
5832
5833
|
<div id="dynamic-content"></div>
|
|
5833
5834
|
</div>
|
|
5834
5835
|
</pont-form>
|
|
5835
|
-
`}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=f("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";
|
|
5836
|
+
`}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=f("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";wo([g()],exports.PontKitLayout.prototype,"spec",2);wo([a({attribute:!1})],exports.PontKitLayout.prototype,"renderSpec",1);wo([a({type:Boolean,attribute:"design-mode"}),Zt({context:Su})],exports.PontKitLayout.prototype,"designMode",2);wo([a({attribute:!1}),Zt({context:ei})],exports.PontKitLayout.prototype,"branding",2);wo([a({attribute:!1})],exports.PontKitLayout.prototype,"submitHandler",2);exports.PontKitLayout=wo([p("pont-layout")],exports.PontKitLayout);function dS({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||"/":tm(t)&&n?n:null}function tm(e){return new URLSearchParams(e).has("invite_token")}var cS=Object.defineProperty,pS=Object.getOwnPropertyDescriptor,Fr=(e,t,r,o)=>{for(var n=o>1?void 0:o?pS(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&&cS(t,r,n),n};function hS(){return`<pont-block>
|
|
5836
5837
|
<pont-header>
|
|
5837
5838
|
<pont-title content="${ma(f("continued_elsewhere_title"))}"></pont-title>
|
|
5838
5839
|
<pont-subtitle content="${ma(f("continued_elsewhere_subtitle"))}"></pont-subtitle>
|
|
5839
5840
|
</pont-header>
|
|
5840
5841
|
<pont-link label="${ma(f("continue_here"))}" event="continue_here"></pont-link>
|
|
5841
|
-
</pont-block>`}function ma(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}exports.PontProvider=class extends v{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=
|
|
5842
|
+
</pont-block>`}function ma(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}exports.PontProvider=class extends v{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=vo,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(),b1(),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=ol(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){V.configure({domain:t.domain,appId:t.appId,locales:this.effectiveLocales||this.locales||t.locales,signinUrl:t.signinUrl,signupUrl:t.signupUrl,invitationUrl:t.invitationUrl,scope:t.scope,onFlowStateChange:r=>{if(r.eventType==="flow_continued_elsewhere"){this.renderSpec=hS();return}du(r.messages),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),LE(this.env),this.restoreThenRefreshAuthState(),this.loadBrandingCss(this.getBrandingCssUrl()),this.loadWidgetText()}loadWidgetText(){if(!this.env)return;let t;try{t=ol(this.env.domain)}catch{return}e$(t,this.effectiveLocales||void 0)}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=dS({pathname:window.location.pathname,search:window.location.search,env:this.env});if(t){if(this.wasBouncedBackFrom(t)){this.clearRedirectAttempt(),V.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:V.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(tm(window.location.search)){V.invalidateSession(),this.refreshAuthState();return}try{await V.restoreSession()}catch{}this.refreshAuthState()}};Fr([a({type:Object}),Zt({context:xu})],exports.PontProvider.prototype,"env",2);Fr([a({type:String})],exports.PontProvider.prototype,"locales",2);Fr([g(),Zt({context:Yl})],exports.PontProvider.prototype,"effectiveLocales",2);Fr([g(),Zt({context:dr})],exports.PontProvider.prototype,"auth",2);Fr([g(),Zt({context:Ou})],exports.PontProvider.prototype,"renderSpec",2);Fr([g(),Zt({context:ei})],exports.PontProvider.prototype,"branding",2);Fr([a({type:Boolean})],exports.PontProvider.prototype,"autoRedirect",2);exports.PontProvider=Fr([p("pont-provider")],exports.PontProvider);var uS=Object.defineProperty,mS=Object.getOwnPropertyDescriptor,em=(e,t,r,o)=>{for(var n=o>1?void 0:o?mS(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&&uS(t,r,n),n};exports.SignedOut=class extends v{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> `}};em([at({context:dr,subscribe:!0}),a({attribute:!1})],exports.SignedOut.prototype,"auth",2);exports.SignedOut=em([p("pont-signed-out")],exports.SignedOut);var fS=Object.defineProperty,gS=Object.getOwnPropertyDescriptor,rm=(e,t,r,o)=>{for(var n=o>1?void 0:o?gS(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&&fS(t,r,n),n};exports.SignedIn=class extends v{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> `}};rm([at({context:dr,subscribe:!0}),a({attribute:!1})],exports.SignedIn.prototype,"auth",2);exports.SignedIn=rm([p("pont-signed-in")],exports.SignedIn);var vS=Object.defineProperty,bS=Object.getOwnPropertyDescriptor,Es=(e,t,r,o)=>{for(var n=o>1?void 0:o?bS(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&&vS(t,r,n),n};exports.PontAuthenticated=class extends v{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}};Es([a({type:String})],exports.PontAuthenticated.prototype,"redirectUrl",2);Es([at({context:xu,subscribe:!0}),a({attribute:!1})],exports.PontAuthenticated.prototype,"env",2);Es([at({context:dr,subscribe:!0}),a({attribute:!1})],exports.PontAuthenticated.prototype,"auth",2);exports.PontAuthenticated=Es([p("pont-authenticated")],exports.PontAuthenticated);var _S=Object.defineProperty,yS=Object.getOwnPropertyDescriptor,nm=(e,t,r,o)=>{for(var n=o>1?void 0:o?yS(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&&_S(t,r,n),n};exports.AuthStateElement=class extends v{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``}};nm([at({context:dr,subscribe:!0}),a({attribute:!1})],exports.AuthStateElement.prototype,"auth",2);exports.AuthStateElement=nm([p("pont-auth-state")],exports.AuthStateElement);function wS(){return V}exports.BaseElement=ge;exports.ORGANIZATION_CHANGED_EVENT=Bn;exports.ORGANIZATION_MEMBER_SCOPES=Kr;exports.ORGANIZATION_SWITCH_FAILED_EVENT=Wu;exports.PontAccountMenu=Qe;exports.PontAccountSettings=Dt;exports.PontMemberManagement=z;exports.PontOrganizationSwitcher=oe;exports.PontPaginator=cn;exports.PontUserSnippet=Cs;exports.closeAccountSettingsModal=od;exports.closeMemberManagementModal=Bu;exports.openAccountSettingsModal=nd;exports.openMemberManagementModal=Uu;exports.setLocales=qu;exports.useAuthProvider=wS;
|
|
5842
5843
|
//# sourceMappingURL=index.js.map
|