@molin.ai/shop-ai 0.8.8 → 0.8.10

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.
@@ -1,11 +1,11 @@
1
- var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in i?a0(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var M=(i,e,t)=>l0(i,typeof e!="symbol"?e+"":e,t),Yo=(i,e,t)=>e.has(i)||oc("Cannot "+t);var f=(i,e,t)=>(Yo(i,e,"read from private field"),t?t.call(i):e.get(i)),w=(i,e,t)=>e.has(i)?oc("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),E=(i,e,t,r)=>(Yo(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t),$=(i,e,t)=>(Yo(i,e,"access private method"),t);var ac=(i,e,t,r)=>({set _(n){E(i,e,n,t)},get _(){return f(i,e,r)}});var qn=globalThis,Bn=qn.ShadowRoot&&(qn.ShadyCSS===void 0||qn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Qo=Symbol(),lc=new WeakMap,kr=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==Qo)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(Bn&&e===void 0){let r=t!==void 0&&t.length===1;r&&(e=lc.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&lc.set(t,e))}return e}toString(){return this.cssText}},uc=i=>new kr(typeof i=="string"?i:i+"",void 0,Qo),mt=(i,...e)=>{let t=i.length===1?i[0]:e.reduce((r,n,s)=>r+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+i[s+1],i[0]);return new kr(t,i,Qo)},ea=(i,e)=>{if(Bn)i.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let r=document.createElement("style"),n=qn.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=t.cssText,i.appendChild(r)}},Hn=Bn?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(let r of e.cssRules)t+=r.cssText;return uc(t)})(i):i;var{is:u0,defineProperty:c0,getOwnPropertyDescriptor:d0,getOwnPropertyNames:p0,getOwnPropertySymbols:h0,getPrototypeOf:f0}=Object,zn=globalThis,cc=zn.trustedTypes,g0=cc?cc.emptyScript:"",m0=zn.reactiveElementPolyfillSupport,Cr=(i,e)=>i,ta={toAttribute(i,e){switch(e){case Boolean:i=i?g0:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},pc=(i,e)=>!u0(i,e),dc={attribute:!0,type:String,converter:ta,reflect:!1,hasChanged:pc};Symbol.metadata??=Symbol("metadata"),zn.litPropertyMetadata??=new WeakMap;var vt=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=dc){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){let r=Symbol(),n=this.getPropertyDescriptor(e,r,t);n!==void 0&&c0(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){let{get:n,set:s}=d0(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get(){return n?.call(this)},set(o){let l=n?.call(this);s.call(this,o),this.requestUpdate(e,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??dc}static _$Ei(){if(this.hasOwnProperty(Cr("elementProperties")))return;let e=f0(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Cr("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Cr("properties"))){let t=this.properties,r=[...p0(t),...h0(t)];for(let n of r)this.createProperty(n,t[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[r,n]of t)this.elementProperties.set(r,n)}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let n=this._$Eu(t,r);n!==void 0&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let n of r)t.unshift(Hn(n))}else e!==void 0&&t.push(Hn(e));return t}static _$Eu(e,t){let r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ea(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EC(e,t){let r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(n!==void 0&&r.reflect===!0){let s=(r.converter?.toAttribute!==void 0?r.converter:ta).toAttribute(t,r.type);this._$Em=e,s==null?this.removeAttribute(n):this.setAttribute(n,s),this._$Em=null}}_$AK(e,t){let r=this.constructor,n=r._$Eh.get(e);if(n!==void 0&&this._$Em!==n){let s=r.getPropertyOptions(n),o=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:ta;this._$Em=n,this[n]=o.fromAttribute(t,s.type),this._$Em=null}}requestUpdate(e,t,r){if(e!==void 0){if(r??=this.constructor.getPropertyOptions(e),!(r.hasChanged??pc)(this[e],t))return;this.P(e,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,t,r){this._$AL.has(e)||this._$AL.set(e,t),r.reflect===!0&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[n,s]of this._$Ep)this[n]=s;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[n,s]of r)s.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.P(n,this[n],s)}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(t)):this._$EU()}catch(r){throw e=!1,this._$EU(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach(t=>this._$EC(t,this[t])),this._$EU()}updated(e){}firstUpdated(e){}};vt.elementStyles=[],vt.shadowRootOptions={mode:"open"},vt[Cr("elementProperties")]=new Map,vt[Cr("finalized")]=new Map,m0?.({ReactiveElement:vt}),(zn.reactiveElementVersions??=[]).push("2.0.4");var ra=globalThis,Vn=ra.trustedTypes,hc=Vn?Vn.createPolicy("lit-html",{createHTML:i=>i}):void 0,na="$lit$",yt=`lit$${Math.random().toFixed(9).slice(2)}$`,sa="?"+yt,v0=`<${sa}>`,Qt=document,Er=()=>Qt.createComment(""),$r=i=>i===null||typeof i!="object"&&typeof i!="function",oa=Array.isArray,_c=i=>oa(i)||typeof i?.[Symbol.iterator]=="function",ia=`[
2
- \f\r]`,Sr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,fc=/-->/g,gc=/>/g,Kt=RegExp(`>|${ia}(?:([^\\s"'>=/]+)(${ia}*=${ia}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),mc=/'/g,vc=/"/g,bc=/^(?:script|style|textarea|title)$/i,aa=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),y=aa(1),Tm=aa(2),Mm=aa(3),tt=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),yc=new WeakMap,Yt=Qt.createTreeWalker(Qt,129);function wc(i,e){if(!oa(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return hc!==void 0?hc.createHTML(e):e}var xc=(i,e)=>{let t=i.length-1,r=[],n,s=e===2?"<svg>":e===3?"<math>":"",o=Sr;for(let l=0;l<t;l++){let a=i[l],u,d,c=-1,p=0;for(;p<a.length&&(o.lastIndex=p,d=o.exec(a),d!==null);)p=o.lastIndex,o===Sr?d[1]==="!--"?o=fc:d[1]!==void 0?o=gc:d[2]!==void 0?(bc.test(d[2])&&(n=RegExp("</"+d[2],"g")),o=Kt):d[3]!==void 0&&(o=Kt):o===Kt?d[0]===">"?(o=n??Sr,c=-1):d[1]===void 0?c=-2:(c=o.lastIndex-d[2].length,u=d[1],o=d[3]===void 0?Kt:d[3]==='"'?vc:mc):o===vc||o===mc?o=Kt:o===fc||o===gc?o=Sr:(o=Kt,n=void 0);let h=o===Kt&&i[l+1].startsWith("/>")?" ":"";s+=o===Sr?a+v0:c>=0?(r.push(u),a.slice(0,c)+na+a.slice(c)+yt+h):a+yt+(c===-2?l:h)}return[wc(i,s+(i[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},Ir=class i{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let s=0,o=0,l=e.length-1,a=this.parts,[u,d]=xc(e,t);if(this.el=i.createElement(u,r),Yt.currentNode=this.el.content,t===2||t===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(n=Yt.nextNode())!==null&&a.length<l;){if(n.nodeType===1){if(n.hasAttributes())for(let c of n.getAttributeNames())if(c.endsWith(na)){let p=d[o++],h=n.getAttribute(c).split(yt),g=/([.?@])?(.*)/.exec(p);a.push({type:1,index:s,name:g[2],strings:h,ctor:g[1]==="."?Gn:g[1]==="?"?Zn:g[1]==="@"?Jn:ti}),n.removeAttribute(c)}else c.startsWith(yt)&&(a.push({type:6,index:s}),n.removeAttribute(c));if(bc.test(n.tagName)){let c=n.textContent.split(yt),p=c.length-1;if(p>0){n.textContent=Vn?Vn.emptyScript:"";for(let h=0;h<p;h++)n.append(c[h],Er()),Yt.nextNode(),a.push({type:2,index:++s});n.append(c[p],Er())}}}else if(n.nodeType===8)if(n.data===sa)a.push({type:2,index:s});else{let c=-1;for(;(c=n.data.indexOf(yt,c+1))!==-1;)a.push({type:7,index:s}),c+=yt.length-1}s++}}static createElement(e,t){let r=Qt.createElement("template");return r.innerHTML=e,r}};function ei(i,e,t=i,r){if(e===tt)return e;let n=r!==void 0?t._$Co?.[r]:t._$Cl,s=$r(e)?void 0:e._$litDirective$;return n?.constructor!==s&&(n?._$AO?.(!1),s===void 0?n=void 0:(n=new s(i),n._$AT(i,t,r)),r!==void 0?(t._$Co??=[])[r]=n:t._$Cl=n),n!==void 0&&(e=ei(i,n._$AS(i,e.values),n,r)),e}var Wn=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:r}=this._$AD,n=(e?.creationScope??Qt).importNode(t,!0);Yt.currentNode=n;let s=Yt.nextNode(),o=0,l=0,a=r[0];for(;a!==void 0;){if(o===a.index){let u;a.type===2?u=new Mi(s,s.nextSibling,this,e):a.type===1?u=new a.ctor(s,a.name,a.strings,this,e):a.type===6&&(u=new Xn(s,this,e)),this._$AV.push(u),a=r[++l]}o!==a?.index&&(s=Yt.nextNode(),o++)}return Yt.currentNode=Qt,n}p(e){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}},Mi=class i{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,n){this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=ei(this,e,t),$r(e)?e===j||e==null||e===""?(this._$AH!==j&&this._$AR(),this._$AH=j):e!==this._$AH&&e!==tt&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):_c(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==j&&$r(this._$AH)?this._$AA.nextSibling.data=e:this.T(Qt.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:r}=e,n=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=Ir.createElement(wc(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{let s=new Wn(n,this),o=s.u(this.options);s.p(t),this.T(o),this._$AH=s}}_$AC(e){let t=yc.get(e.strings);return t===void 0&&yc.set(e.strings,t=new Ir(e)),t}k(e){oa(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,n=0;for(let s of e)n===t.length?t.push(r=new i(this.O(Er()),this.O(Er()),this,this.options)):r=t[n],r._$AI(s),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e&&e!==this._$AB;){let r=e.nextSibling;e.remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},ti=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,n,s){this.type=1,this._$AH=j,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=j}_$AI(e,t=this,r,n){let s=this.strings,o=!1;if(s===void 0)e=ei(this,e,t,0),o=!$r(e)||e!==this._$AH&&e!==tt,o&&(this._$AH=e);else{let l=e,a,u;for(e=s[0],a=0;a<s.length-1;a++)u=ei(this,l[r+a],t,a),u===tt&&(u=this._$AH[a]),o||=!$r(u)||u!==this._$AH[a],u===j?e=j:e!==j&&(e+=(u??"")+s[a+1]),this._$AH[a]=u}o&&!n&&this.j(e)}j(e){e===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Gn=class extends ti{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===j?void 0:e}},Zn=class extends ti{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==j)}},Jn=class extends ti{constructor(e,t,r,n,s){super(e,t,r,n,s),this.type=5}_$AI(e,t=this){if((e=ei(this,e,t,0)??j)===tt)return;let r=this._$AH,n=e===j&&r!==j||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,s=e!==j&&(r===j||n);n&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Xn=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){ei(this,e)}},kc={M:na,P:yt,A:sa,C:1,L:xc,R:Wn,D:_c,V:ei,I:Mi,H:ti,N:Zn,U:Jn,B:Gn,F:Xn},y0=ra.litHtmlPolyfillSupport;y0?.(Ir,Mi),(ra.litHtmlVersions??=[]).push("3.2.1");var Cc=(i,e,t)=>{let r=t?.renderBefore??e,n=r._$litPart$;if(n===void 0){let s=t?.renderBefore??null;r._$litPart$=n=new Mi(e.insertBefore(Er(),s),s,void 0,t??{})}return n._$AI(i),n};var N=class extends vt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Cc(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return tt}};N._$litElement$=!0,N.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:N});var _0=globalThis.litElementPolyfillSupport;_0?.({LitElement:N});(globalThis.litElementVersions??=[]).push("4.1.1");var Ar=class Ar extends HTMLElement{constructor(){super();M(this,"name","");this.attachShadow({mode:"open"})}attributeChangedCallback(t,r,n){if(r!==n&&Ar.observedAttributes.includes(t)){switch(t){case"name":this.name=n||"";break}this.render()}}resolveIcon(t){throw new Error("Not implemented")}render(){let t=document.createElement("style");for(t.textContent=`
1
+ var Ql=Object.defineProperty;var io=t=>{throw TypeError(t)};var eu=(t,e,r)=>e in t?Ql(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var w=(t,e,r)=>eu(t,typeof e!="symbol"?e+"":e,r),_i=(t,e,r)=>e.has(t)||io("Cannot "+r);var l=(t,e,r)=>(_i(t,e,"read from private field"),r?r.call(t):e.get(t)),d=(t,e,r)=>e.has(t)?io("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),g=(t,e,r,n)=>(_i(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),m=(t,e,r)=>(_i(t,e,"access private method"),r);var so=(t,e,r,n)=>({set _(i){g(t,e,i,r)},get _(){return l(t,e,n)}});var Yr=globalThis,Qr=Yr.ShadowRoot&&(Yr.ShadyCSS===void 0||Yr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ai=Symbol(),oo=new WeakMap,er=class{constructor(e,r,n){if(this._$cssResult$=!0,n!==Ai)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=r}get styleSheet(){let e=this.o,r=this.t;if(Qr&&e===void 0){let n=r!==void 0&&r.length===1;n&&(e=oo.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&oo.set(r,e))}return e}toString(){return this.cssText}},ao=t=>new er(typeof t=="string"?t:t+"",void 0,Ai),Ee=(t,...e)=>{let r=t.length===1?t[0]:e.reduce((n,i,s)=>n+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1],t[0]);return new er(r,t,Ai)},Mi=(t,e)=>{if(Qr)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let n=document.createElement("style"),i=Yr.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)}},en=Qr?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let n of e.cssRules)r+=n.cssText;return ao(r)})(t):t;var{is:tu,defineProperty:ru,getOwnPropertyDescriptor:nu,getOwnPropertyNames:iu,getOwnPropertySymbols:su,getPrototypeOf:ou}=Object,tn=globalThis,lo=tn.trustedTypes,au=lo?lo.emptyScript:"",lu=tn.reactiveElementPolyfillSupport,tr=(t,e)=>t,Ii={toAttribute(t,e){switch(e){case Boolean:t=t?au:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch{r=null}}return r}},co=(t,e)=>!tu(t,e),uo={attribute:!0,type:String,converter:Ii,reflect:!1,hasChanged:co};Symbol.metadata??=Symbol("metadata"),tn.litPropertyMetadata??=new WeakMap;var Se=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,r=uo){if(r.state&&(r.attribute=!1),this._$Ei(),this.elementProperties.set(e,r),!r.noAccessor){let n=Symbol(),i=this.getPropertyDescriptor(e,n,r);i!==void 0&&ru(this.prototype,e,i)}}static getPropertyDescriptor(e,r,n){let{get:i,set:s}=nu(this.prototype,e)??{get(){return this[r]},set(o){this[r]=o}};return{get(){return i?.call(this)},set(o){let u=i?.call(this);s.call(this,o),this.requestUpdate(e,u,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??uo}static _$Ei(){if(this.hasOwnProperty(tr("elementProperties")))return;let e=ou(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(tr("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(tr("properties"))){let r=this.properties,n=[...iu(r),...su(r)];for(let i of n)this.createProperty(i,r[i])}let e=this[Symbol.metadata];if(e!==null){let r=litPropertyMetadata.get(e);if(r!==void 0)for(let[n,i]of r)this.elementProperties.set(n,i)}this._$Eh=new Map;for(let[r,n]of this.elementProperties){let i=this._$Eu(r,n);i!==void 0&&this._$Eh.set(i,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let r=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let i of n)r.unshift(en(i))}else e!==void 0&&r.push(en(e));return r}static _$Eu(e,r){let n=r.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,r=this.constructor.elementProperties;for(let n of r.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Mi(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,r,n){this._$AK(e,n)}_$EC(e,r){let n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(i!==void 0&&n.reflect===!0){let s=(n.converter?.toAttribute!==void 0?n.converter:Ii).toAttribute(r,n.type);this._$Em=e,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(e,r){let n=this.constructor,i=n._$Eh.get(e);if(i!==void 0&&this._$Em!==i){let s=n.getPropertyOptions(i),o=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:Ii;this._$Em=i,this[i]=o.fromAttribute(r,s.type),this._$Em=null}}requestUpdate(e,r,n){if(e!==void 0){if(n??=this.constructor.getPropertyOptions(e),!(n.hasChanged??co)(this[e],r))return;this.P(e,r,n)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,r,n){this._$AL.has(e)||this._$AL.set(e,r),n.reflect===!0&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[i,s]of this._$Ep)this[i]=s;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[i,s]of n)s.wrapped!==!0||this._$AL.has(i)||this[i]===void 0||this.P(i,this[i],s)}let e=!1,r=this._$AL;try{e=this.shouldUpdate(r),e?(this.willUpdate(r),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(r)):this._$EU()}catch(n){throw e=!1,this._$EU(),n}e&&this._$AE(r)}willUpdate(e){}_$AE(e){this._$EO?.forEach(r=>r.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach(r=>this._$EC(r,this[r])),this._$EU()}updated(e){}firstUpdated(e){}};Se.elementStyles=[],Se.shadowRootOptions={mode:"open"},Se[tr("elementProperties")]=new Map,Se[tr("finalized")]=new Map,lu?.({ReactiveElement:Se}),(tn.reactiveElementVersions??=[]).push("2.0.4");var Oi=globalThis,rn=Oi.trustedTypes,po=rn?rn.createPolicy("lit-html",{createHTML:t=>t}):void 0,Li="$lit$",_e=`lit$${Math.random().toFixed(9).slice(2)}$`,ji="?"+_e,uu=`<${ji}>`,Je=document,nr=()=>Je.createComment(""),ir=t=>t===null||typeof t!="object"&&typeof t!="function",Di=Array.isArray,vo=t=>Di(t)||typeof t?.[Symbol.iterator]=="function",Ti=`[
2
+ \f\r]`,rr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,fo=/-->/g,ho=/>/g,Ge=RegExp(`>|${Ti}(?:([^\\s"'>=/]+)(${Ti}*=${Ti}*(?:[^
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),mo=/'/g,go=/"/g,wo=/^(?:script|style|textarea|title)$/i,Ri=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),h=Ri(1),ip=Ri(2),sp=Ri(3),he=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),yo=new WeakMap,Xe=Je.createTreeWalker(Je,129);function bo(t,e){if(!Di(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return po!==void 0?po.createHTML(e):e}var xo=(t,e)=>{let r=t.length-1,n=[],i,s=e===2?"<svg>":e===3?"<math>":"",o=rr;for(let u=0;u<r;u++){let a=t[u],c,f,p=-1,b=0;for(;b<a.length&&(o.lastIndex=b,f=o.exec(a),f!==null);)b=o.lastIndex,o===rr?f[1]==="!--"?o=fo:f[1]!==void 0?o=ho:f[2]!==void 0?(wo.test(f[2])&&(i=RegExp("</"+f[2],"g")),o=Ge):f[3]!==void 0&&(o=Ge):o===Ge?f[0]===">"?(o=i??rr,p=-1):f[1]===void 0?p=-2:(p=o.lastIndex-f[2].length,c=f[1],o=f[3]===void 0?Ge:f[3]==='"'?go:mo):o===go||o===mo?o=Ge:o===fo||o===ho?o=rr:(o=Ge,i=void 0);let x=o===Ge&&t[u+1].startsWith("/>")?" ":"";s+=o===rr?a+uu:p>=0?(n.push(c),a.slice(0,p)+Li+a.slice(p)+_e+x):a+_e+(p===-2?u:x)}return[bo(t,s+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},sr=class t{constructor({strings:e,_$litType$:r},n){let i;this.parts=[];let s=0,o=0,u=e.length-1,a=this.parts,[c,f]=xo(e,r);if(this.el=t.createElement(c,n),Xe.currentNode=this.el.content,r===2||r===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(i=Xe.nextNode())!==null&&a.length<u;){if(i.nodeType===1){if(i.hasAttributes())for(let p of i.getAttributeNames())if(p.endsWith(Li)){let b=f[o++],x=i.getAttribute(p).split(_e),k=/([.?@])?(.*)/.exec(b);a.push({type:1,index:s,name:k[2],strings:x,ctor:k[1]==="."?sn:k[1]==="?"?on:k[1]==="@"?an:Ye}),i.removeAttribute(p)}else p.startsWith(_e)&&(a.push({type:6,index:s}),i.removeAttribute(p));if(wo.test(i.tagName)){let p=i.textContent.split(_e),b=p.length-1;if(b>0){i.textContent=rn?rn.emptyScript:"";for(let x=0;x<b;x++)i.append(p[x],nr()),Xe.nextNode(),a.push({type:2,index:++s});i.append(p[b],nr())}}}else if(i.nodeType===8)if(i.data===ji)a.push({type:2,index:s});else{let p=-1;for(;(p=i.data.indexOf(_e,p+1))!==-1;)a.push({type:7,index:s}),p+=_e.length-1}s++}}static createElement(e,r){let n=Je.createElement("template");return n.innerHTML=e,n}};function Ke(t,e,r=t,n){if(e===he)return e;let i=n!==void 0?r._$Co?.[n]:r._$Cl,s=ir(e)?void 0:e._$litDirective$;return i?.constructor!==s&&(i?._$AO?.(!1),s===void 0?i=void 0:(i=new s(t),i._$AT(t,r,n)),n!==void 0?(r._$Co??=[])[n]=i:r._$Cl=i),i!==void 0&&(e=Ke(t,i._$AS(t,e.values),i,n)),e}var nn=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:r},parts:n}=this._$AD,i=(e?.creationScope??Je).importNode(r,!0);Xe.currentNode=i;let s=Xe.nextNode(),o=0,u=0,a=n[0];for(;a!==void 0;){if(o===a.index){let c;a.type===2?c=new gt(s,s.nextSibling,this,e):a.type===1?c=new a.ctor(s,a.name,a.strings,this,e):a.type===6&&(c=new ln(s,this,e)),this._$AV.push(c),a=n[++u]}o!==a?.index&&(s=Xe.nextNode(),o++)}return Xe.currentNode=Je,i}p(e){let r=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,r),r+=n.strings.length-2):n._$AI(e[r])),r++}},gt=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,n,i){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=Ke(this,e,r),ir(e)?e===E||e==null||e===""?(this._$AH!==E&&this._$AR(),this._$AH=E):e!==this._$AH&&e!==he&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):vo(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==E&&ir(this._$AH)?this._$AA.nextSibling.data=e:this.T(Je.createTextNode(e)),this._$AH=e}$(e){let{values:r,_$litType$:n}=e,i=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=sr.createElement(bo(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(r);else{let s=new nn(i,this),o=s.u(this.options);s.p(r),this.T(o),this._$AH=s}}_$AC(e){let r=yo.get(e.strings);return r===void 0&&yo.set(e.strings,r=new sr(e)),r}k(e){Di(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,n,i=0;for(let s of e)i===r.length?r.push(n=new t(this.O(nr()),this.O(nr()),this,this.options)):n=r[i],n._$AI(s),i++;i<r.length&&(this._$AR(n&&n._$AB.nextSibling,i),r.length=i)}_$AR(e=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);e&&e!==this._$AB;){let n=e.nextSibling;e.remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},Ye=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,n,i,s){this.type=1,this._$AH=E,this._$AN=void 0,this.element=e,this.name=r,this._$AM=i,this.options=s,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=E}_$AI(e,r=this,n,i){let s=this.strings,o=!1;if(s===void 0)e=Ke(this,e,r,0),o=!ir(e)||e!==this._$AH&&e!==he,o&&(this._$AH=e);else{let u=e,a,c;for(e=s[0],a=0;a<s.length-1;a++)c=Ke(this,u[n+a],r,a),c===he&&(c=this._$AH[a]),o||=!ir(c)||c!==this._$AH[a],c===E?e=E:e!==E&&(e+=(c??"")+s[a+1]),this._$AH[a]=c}o&&!i&&this.j(e)}j(e){e===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},sn=class extends Ye{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===E?void 0:e}},on=class extends Ye{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==E)}},an=class extends Ye{constructor(e,r,n,i,s){super(e,r,n,i,s),this.type=5}_$AI(e,r=this){if((e=Ke(this,e,r,0)??E)===he)return;let n=this._$AH,i=e===E&&n!==E||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,s=e!==E&&(n===E||i);i&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},ln=class{constructor(e,r,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){Ke(this,e)}},ko={M:Li,P:_e,A:ji,C:1,L:xo,R:nn,D:vo,V:Ke,I:gt,H:Ye,N:on,U:an,B:sn,F:ln},cu=Oi.litHtmlPolyfillSupport;cu?.(sr,gt),(Oi.litHtmlVersions??=[]).push("3.2.1");var Co=(t,e,r)=>{let n=r?.renderBefore??e,i=n._$litPart$;if(i===void 0){let s=r?.renderBefore??null;n._$litPart$=i=new gt(e.insertBefore(nr(),s),s,void 0,r??{})}return i._$AI(t),i};var S=class extends Se{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Co(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return he}};S._$litElement$=!0,S.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:S});var pu=globalThis.litElementPolyfillSupport;pu?.({LitElement:S});(globalThis.litElementVersions??=[]).push("4.1.1");var or=class or extends HTMLElement{constructor(){super();w(this,"name","");this.attachShadow({mode:"open"})}attributeChangedCallback(r,n,i){if(n!==i&&or.observedAttributes.includes(r)){switch(r){case"name":this.name=i||"";break}this.render()}}resolveIcon(r){throw new Error("Not implemented")}render(){let r=document.createElement("style");for(r.textContent=`
4
4
  :host {
5
5
  display: inline-block;
6
6
  line-height: 0;
7
7
  }
8
- `;this.shadowRoot?.firstChild;)this.shadowRoot.removeChild(this.shadowRoot.firstChild),this.shadowRoot.appendChild(t);if(!this.name)return;let r=this.resolveIcon(this.name);if(!r){console.warn(`'${this.name}' not found, please add it to ${Ar.name}`);return}let o=new DOMParser().parseFromString(r,"image/svg+xml").documentElement;o.setAttribute("fill","currentColor"),o.style.width="100%",o.style.height="100%",this.shadowRoot?.appendChild(o)}};M(Ar,"observedAttributes",["name"]);var Kn=Ar;var Sc={clock:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
8
+ `;this.shadowRoot?.firstChild;)this.shadowRoot.removeChild(this.shadowRoot.firstChild),this.shadowRoot.appendChild(r);if(!this.name)return;let n=this.resolveIcon(this.name);if(!n){console.warn(`'${this.name}' not found, please add it to ${or.name}`);return}let o=new DOMParser().parseFromString(n,"image/svg+xml").documentElement;o.setAttribute("fill","currentColor"),o.style.width="100%",o.style.height="100%",this.shadowRoot?.appendChild(o)}};w(or,"observedAttributes",["name"]);var un=or;var $o={clock:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
9
9
  <path d="M12 6V12H16.5M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
10
10
  </svg>`,"arrow-path":`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
11
11
  <path d="M16.0228 9.34841H21.0154V9.34663M2.98413 19.6444V14.6517M2.98413 14.6517L7.97677 14.6517M2.98413 14.6517L6.16502 17.8347C7.15555 18.8271 8.41261 19.58 9.86436 19.969C14.2654 21.1483 18.7892 18.5364 19.9685 14.1353M4.03073 9.86484C5.21 5.46374 9.73377 2.85194 14.1349 4.03121C15.5866 4.4202 16.8437 5.17312 17.8342 6.1655L21.0154 9.34663M21.0154 4.3558V9.34663" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
@@ -99,19 +99,29 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
99
99
  <path d="M3.75 13.5L14.25 2.25L12 10.5H20.25L9.75 21.75L12 13.5H3.75Z" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
100
100
  </svg>`,"book-open":`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
101
101
  <path d="M12 6.04168C10.4077 4.61656 8.30506 3.75 6 3.75C4.94809 3.75 3.93834 3.93046 3 4.26212V18.5121C3.93834 18.1805 4.94809 18 6 18C8.30506 18 10.4077 18.8666 12 20.2917M12 6.04168C13.5923 4.61656 15.6949 3.75 18 3.75C19.0519 3.75 20.0617 3.93046 21 4.26212V18.5121C20.0617 18.1805 19.0519 18 18 18C15.6949 18 13.5923 18.8666 12 20.2917M12 6.04168V20.2917" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
102
+ </svg>`,"paper-clip":`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
103
+ <path d="M18.375 12.739L10.682 20.432C8.92462 22.1893 6.07538 22.1893 4.31802 20.432C2.56066 18.6746 2.56066 15.8254 4.31802 14.068L15.2573 3.12868C16.4289 1.95711 18.3283 1.95711 19.4999 3.12868C20.6715 4.30025 20.6715 6.19975 19.4999 7.37132L8.55158 18.3197M8.56066 18.3107C8.55764 18.3137 8.55462 18.3167 8.55158 18.3197M14.2498 8.37865L6.43934 16.1893C5.85355 16.7751 5.85355 17.7249 6.43934 18.3107C7.02211 18.8934 7.9651 18.8964 8.55158 18.3197" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
102
104
  </svg>`,share:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
103
105
  <path d="M7.21721 10.9071C6.83295 10.2169 6.096 9.75 5.25 9.75C4.00736 9.75 3 10.7574 3 12C3 13.2426 4.00736 14.25 5.25 14.25C6.096 14.25 6.83295 13.7831 7.21721 13.0929M7.21721 10.9071C7.39737 11.2307 7.5 11.6034 7.5 12C7.5 12.3966 7.39737 12.7693 7.21721 13.0929M7.21721 10.9071L16.7828 5.5929M7.21721 13.0929L16.7828 18.4071M16.7828 18.4071C16.6026 18.7307 16.5 19.1034 16.5 19.5C16.5 20.7426 17.5074 21.75 18.75 21.75C19.9926 21.75 21 20.7426 21 19.5C21 18.2574 19.9926 17.25 18.75 17.25C17.904 17.25 17.1671 17.7169 16.7828 18.4071ZM16.7828 5.5929C17.1671 6.28309 17.904 6.75 18.75 6.75C19.9926 6.75 21 5.74264 21 4.5C21 3.25736 19.9926 2.25 18.75 2.25C17.5074 2.25 16.5 3.25736 16.5 4.5C16.5 4.89664 16.6026 5.26931 16.7828 5.5929Z" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
104
- </svg>`};var b0=Sc,la=class extends Kn{resolveIcon(e){return b0[e]}render(){super.render();let e=this.shadowRoot?.querySelector("svg");if(!e)throw new Error("svgEl not found");e.setAttribute("fill","none"),e.querySelectorAll("[stroke]").forEach(t=>{t.setAttribute("stroke","currentColor")})}};customElements.get("hi-outline")||customElements.define("hi-outline",la);function ya(i){return[...i.v,(i.i?"!":"")+i.n].join(":")}function w0(i,e=","){return i.map(ya).join(e)}var Pc=typeof CSS<"u"&&CSS.escape||(i=>i.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function Yn(i){for(var e=9,t=i.length;t--;)e=Math.imul(e^i.charCodeAt(t),1597334677);return"#"+((e^e>>>9)>>>0).toString(36)}function ts(i,e="@media "){return e+Q(i).map(t=>(typeof t=="string"&&(t={min:t}),t.raw||Object.keys(t).map(r=>`(${r}-width:${t[r]})`).join(" and "))).join(",")}function Q(i=[]){return Array.isArray(i)?i:i==null?[]:[i]}function Ec(i){return i}function is(){}var ge={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function Rc(i){return i.match(/[-=:;]/g)?.length||0}function ha(i){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(i)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(Rc(i),15)<<18}var x0=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire"];function _a({n:i,i:e,v:t=[]},r,n,s){i&&(i=ya({n:i,i:e,v:t})),s=[...Q(s)];for(let l of t){let a=r.theme("screens",l);for(let u of Q(a&&ts(a)||r.v(l))){var o;s.push(u),n|=a?67108864|ha(u):l=="dark"?1073741824:u[0]=="@"?ha(u):(o=u,1<<~(/:([a-z-]+)/.test(o)&&~x0.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:i,p:n,r:s,i:e}}var Oc=new Map;function fa(i){if(i.d){let e=[],t=ua(i.r.reduce((r,n)=>n[0]=="@"?(e.push(n),r):n?ua(r,s=>ua(n,o=>{let l=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(o);if(l){let a=s.indexOf(l[1]);return~a?s.slice(0,a)+l[0]+s.slice(a+l[1].length):ca(s,o)}return ca(o,s)})):r,"&"),r=>ca(r,i.n?"."+Pc(i.n):""));return t&&e.push(t.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((r,n)=>n+"{"+r+"}",i.d)}}function ua(i,e){return i.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(t,r,n)=>e(r)+n)}function ca(i,e){return i.replace(/&/g,e)}var $c=new Intl.Collator("en",{numeric:!0});function Lc(i,e){for(var t=0,r=i.length;t<r;){let n=r+t>>1;0>=Fc(i[n],e)?t=n+1:r=n}return r}function Fc(i,e){let t=i.p&ge.o;return t==(e.p&ge.o)&&(t==ge.b||t==ge.o)?0:i.p-e.p||i.o-e.o||$c.compare(Ic(i.n),Ic(e.n))||$c.compare(Ac(i.n),Ac(e.n))}function Ic(i){return(i||"").split(/:/).pop().split("/").pop()||"\0"}function Ac(i){return(i||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function da(i,e){return Math.round(parseInt(i,16)*e)}function Je(i,e={}){if(typeof i=="function")return i(e);let{opacityValue:t="1",opacityVariable:r}=e,n=r?`var(${r})`:t;if(i.includes("<alpha-value>"))return i.replace("<alpha-value>",n);if(i[0]=="#"&&(i.length==4||i.length==7)){let s=(i.length-1)/3,o=[17,1,.062272][s-1];return`rgba(${[da(i.substr(1,s),o),da(i.substr(1+s,s),o),da(i.substr(1+2*s,s),o),n]})`}return n=="1"?i:n=="0"?"#0000":i.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${n})`)}function Dc(i,e,t,r,n=[]){return function s(o,{n:l,p:a,r:u=[],i:d},c){let p=[],h="",g=0,m=0;for(let _ in o||{}){var b,x;let k=o[_];if(_[0]=="@"){if(!k)continue;if(_[1]=="a"){p.push(...wa(l,a,es(""+k),c,a,u,d,!0));continue}if(_[1]=="l"){for(let S of Q(k))p.push(...s(S,{n:l,p:(b=ge[_[7]],a&~ge.o|b),r:_[7]=="d"?[]:u,i:d},c));continue}if(_[1]=="i"){p.push(...Q(k).map(S=>({p:-1,o:0,r:[],d:_+" "+S})));continue}if(_[1]=="k"){p.push({p:ge.d,o:0,r:[_],d:s(k,{p:ge.d},c).map(fa).join("")});continue}if(_[1]=="f"){p.push(...Q(k).map(S=>({p:ge.d,o:0,r:[_],d:s(S,{p:ge.d},c).map(fa).join("")})));continue}}if(typeof k!="object"||Array.isArray(k))_=="label"&&k?l=k+Yn(JSON.stringify([a,d,o])):(k||k===0)&&(_=_.replace(/[A-Z]/g,S=>"-"+S.toLowerCase()),m+=1,g=Math.max(g,(x=_)[0]=="-"?0:Rc(x)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(x)?+!!RegExp.$1||-!!RegExp.$2:0)+1),h+=(h?";":"")+Q(k).map(S=>c.s(_,ba(""+S,c.theme)+(d?" !important":""))).join(";"));else if(_[0]=="@"||_.includes("&")){let S=a;_[0]=="@"&&(_=_.replace(/\bscreen\(([^)]+)\)/g,(R,B)=>{let U=c.theme("screens",B);return U?(S|=67108864,ts(U,"")):R}),S|=ha(_)),p.push(...s(k,{n:l,p:S,r:[...u,_],i:d},c))}else p.push(...s(k,{p:a,r:[...u,_]},c))}return p.unshift({n:l,p:a,o:Math.max(0,15-m)+1.5*Math.min(g||15,15),r:u,d:h}),p.sort(Fc)}(i,_a(e,t,r,n),t)}function ba(i,e){return i.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(t,r,n,s,o="")=>{let l=e(n,o);return typeof l=="function"&&/color|fill|stroke/i.test(n)?Je(l):""+Q(l).filter(a=>Object(a)!==a)})}function jc(i,e){let t,r=[];for(let n of i)n.d&&n.n?t?.p==n.p&&""+t.r==""+n.r?(t.c=[t.c,n.c].filter(Boolean).join(" "),t.d=t.d+";"+n.d):r.push(t={...n,n:n.n&&e}):r.push({...n,n:n.n&&e});return r}function Qn(i,e,t=ge.u,r,n){let s=[];for(let o of i)for(let l of function(a,u,d,c,p){a={...a,i:a.i||p};let h=function(g,m){let b=Oc.get(g.n);return b?b(g,m):m.r(g.n,g.v[0]=="dark")}(a,u);return h?typeof h=="string"?({r:c,p:d}=_a(a,u,d,c),jc(Qn(es(h),u,d,c,a.i),a.n)):Array.isArray(h)?h.map(g=>{var m,b;return{o:0,...g,r:[...Q(c),...Q(g.r)],p:(m=d,b=g.p??d,m&~ge.o|b)}}):Dc(h,a,u,d,c):[{c:ya(a),p:0,o:0,r:[]}]}(o,e,t,r,n))s.splice(Lc(s,l),0,l);return s}function wa(i,e,t,r,n,s,o,l){return jc((l?t.flatMap(a=>Qn([a],r,n,s,o)):Qn(t,r,n,s,o)).map(a=>a.p&ge.o&&(a.n||e==ge.b)?{...a,p:a.p&~ge.o|e,o:0}:a),i)}function k0(i,e,t,r){var n;return n=(s,o)=>{let{n:l,p:a,r:u,i:d}=_a(s,o,e);return t&&wa(l,e,t,o,a,u,d,r)},Oc.set(i,n),i}function pa(i,e,t){if(i[i.length-1]!="("){let r=[],n=!1,s=!1,o="";for(let l of i)if(!(l=="("||/[~@]$/.test(l))){if(l[0]=="!"&&(l=l.slice(1),n=!n),l.endsWith(":")){r[l=="dark:"?"unshift":"push"](l.slice(0,-1));continue}l[0]=="-"&&(l=l.slice(1),s=!s),l.endsWith("-")&&(l=l.slice(0,-1)),l&&l!="&"&&(o+=(o&&"-")+l)}o&&(s&&(o="-"+o),e[0].push({n:o,v:r.filter(C0),i:n}))}}function C0(i,e,t){return t.indexOf(i)==e}var Tc=new Map;function es(i){let e=Tc.get(i);if(!e){let t=[],r=[[]],n=0,s=0,o=null,l=0,a=(u,d=0)=>{n!=l&&(t.push(i.slice(n,l+d)),u&&pa(t,r)),n=l+1};for(;l<i.length;l++){let u=i[l];if(s)i[l-1]!="\\"&&(s+=+(u=="[")||-(u=="]"));else if(u=="[")s+=1;else if(o)i[l-1]!="\\"&&o.test(i.slice(l))&&(o=null,n=l+RegExp.lastMatch.length);else if(u=="/"&&i[l-1]!="\\"&&(i[l+1]=="*"||i[l+1]=="/"))o=i[l+1]=="*"?/^\*\//:/^[\r\n]/;else if(u=="(")a(),t.push(u);else if(u==":")i[l+1]!=":"&&a(!1,1);else if(/[\s,)]/.test(u)){a(!0);let d=t.lastIndexOf("(");if(u==")"){let c=t[d-1];if(/[~@]$/.test(c)){let p=r.shift();t.length=d,pa([...t,"#"],r);let{v:h}=r[0].pop();for(let g of p)g.v.splice(+(g.v[0]=="dark")-+(h[0]=="dark"),h.length);pa([...t,k0(c.length>1?c.slice(0,-1)+Yn(JSON.stringify([c,p])):c+"("+w0(p)+")",ge.a,p,/@$/.test(c))],r)}d=t.lastIndexOf("(",d-1)}t.length=d+1}else/[~@]/.test(u)&&i[l+1]=="("&&r.unshift([])}a(!0),Tc.set(i,e=r[0])}return e}function I(i,e,t){return[i,ga(e,t)]}function ga(i,e){return typeof i=="function"?i:typeof i=="string"&&/^[\w-]+$/.test(i)?(t,r)=>({[i]:e?e(t,r):ma(t,1)}):t=>i||{[t[1]]:ma(t,2)}}function ma(i,e,t=i.slice(e).find(Boolean)||i.$$||i.input){return i.input[0]=="-"?`calc(${t} * -1)`:t}function T(i,e,t,r){return[i,xa(e,t,r)]}function xa(i,e,t){let r=typeof e=="string"?(n,s)=>({[e]:t?t(n,s):n._}):e||(({1:n,_:s},o,l)=>({[n||l]:s}));return(n,s)=>{let o=Nc(i||n[1]),l=s.theme(o,n.$$)??lt(n.$$,o,s);if(l!=null)return n._=ma(n,0,l),r(n,s,o)}}function me(i,e={},t){return[i,S0(e,t)]}function S0(i={},e){return(t,r)=>{let{section:n=Nc(t[0]).replace("-","")+"Color"}=i,[s,o]=E0(t.$$);if(!s)return;let l=r.theme(n,s)||lt(s,n,r);if(!l||typeof l=="object")return;let{opacityVariable:a=`--tw-${t[0].replace(/-$/,"")}-opacity`,opacitySection:u=n.replace("Color","Opacity"),property:d=n,selector:c}=i,p=r.theme(u,o||"DEFAULT")||o&&lt(o,u,r),h=e||(({_:m})=>{let b=Tr(d,m);return c?{[c]:b}:b});t._={value:Je(l,{opacityVariable:a||void 0,opacityValue:p||void 0}),color:m=>Je(l,m),opacityVariable:a||void 0,opacityValue:p||void 0};let g=h(t,r);if(!t.dark){let m=r.d(n,s,l);m&&m!==l&&(t._={value:Je(m,{opacityVariable:a||void 0,opacityValue:p||"1"}),color:b=>Je(m,b),opacityVariable:a||void 0,opacityValue:p||void 0},g={"&":g,[r.v("dark")]:h(t,r)})}return g}}function E0(i){return(i.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function Tr(i,e){let t={};return typeof e=="string"?t[i]=e:(e.opacityVariable&&e.value.includes(e.opacityVariable)&&(t[e.opacityVariable]=e.opacityValue||"1"),t[i]=e.value),t}function lt(i,e,t){if(i[0]=="["&&i.slice(-1)=="]"){if(i=Pi(ba(i.slice(1,-1),t.theme)),!e)return i;if(!(/color|fill|stroke/i.test(e)&&!(/^color:/.test(i)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(i))||/image/i.test(e)&&!(/^image:/.test(i)||/^[a-z-]+\(/.test(i))||/weight/i.test(e)&&!(/^(number|any):/.test(i)||/^\d+$/.test(i))||/position/i.test(e)&&/^(length|size):/.test(i)))return i.replace(/^[a-z-]+:/,"")}}function Nc(i){return i.replace(/-./g,e=>e[1].toUpperCase())}function Pi(i){return i.includes("url(")?i.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,t="",r,n="")=>Pi(t)+r+Pi(n)):i.replace(/(^|[^\\])_+/g,(e,t)=>t+" ".repeat(e.length-t.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,e=>e.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}function Mr({presets:i=[],...e}){let t={darkMode:void 0,darkColor:void 0,preflight:e.preflight!==!1&&[],theme:{},variants:Q(e.variants),rules:Q(e.rules),ignorelist:Q(e.ignorelist),hash:void 0,stringify:(r,n)=>r+":"+n,finalize:[]};for(let r of Q([...i,{darkMode:e.darkMode,darkColor:e.darkColor,preflight:e.preflight!==!1&&Q(e.preflight),theme:e.theme,hash:e.hash,stringify:e.stringify,finalize:e.finalize}])){let{preflight:n,darkMode:s=t.darkMode,darkColor:o=t.darkColor,theme:l,variants:a,rules:u,ignorelist:d,hash:c=t.hash,stringify:p=t.stringify,finalize:h}=typeof r=="function"?r(t):r;t={preflight:t.preflight!==!1&&n!==!1&&[...t.preflight,...Q(n)],darkMode:s,darkColor:o,theme:{...t.theme,...l,extend:{...t.theme.extend,...l?.extend}},variants:[...t.variants,...Q(a)],rules:[...t.rules,...Q(u)],ignorelist:[...t.ignorelist,...Q(d)],hash:c,stringify:p,finalize:[...t.finalize,...Q(h)]}}return t}function Mc(i,e,t,r,n,s){for(let o of e){let l=t.get(o);l||t.set(o,l=r(o));let a=l(i,n,s);if(a)return a}}function $0(i){var e;return va(i[0],typeof(e=i[1])=="function"?e:()=>e)}function I0(i){var e,t;return Array.isArray(i)?va(i[0],ga(i[1],i[2])):va(i,ga(e,t))}function va(i,e){return Uc(i,(t,r,n,s)=>{let o=r.exec(t);if(o)return o.$$=t.slice(o[0].length),o.dark=s,e(o,n)})}function Uc(i,e){let t=Q(i).map(A0);return(r,n,s)=>{for(let o of t){let l=e(r,o,n,s);if(l)return l}}}function A0(i){return typeof i=="string"?RegExp("^"+i+(i.includes("$")||i.slice(-1)=="-"?"":"$")):i}function qc(i,e){let t=Mr(i),r=function({theme:a,darkMode:u,darkColor:d=is,variants:c,rules:p,hash:h,stringify:g,ignorelist:m,finalize:b}){let x=new Map,_=new Map,k=new Map,S=new Map,R=Uc(m,(P,q)=>q.test(P));c.push(["dark",Array.isArray(u)||u=="class"?`${Q(u)[1]||".dark"} &`:typeof u=="string"&&u!="media"?u:"@media (prefers-color-scheme:dark)"]);let B=typeof h=="function"?P=>h(P,Yn):h?Yn:Ec;B!==Ec&&b.push(P=>({...P,n:P.n&&B(P.n),d:P.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(q,W)=>"--"+B(W).replace("#",""))}));let U={theme:function({extend:P={},...q}){let W={},xe={get colors(){return pe("colors")},theme:pe,negative(){return{}},breakpoints(Z){let X={};for(let he in Z)typeof Z[he]=="string"&&(X["screen-"+he]=Z[he]);return X}};return pe;function pe(Z,X,he,Ne){if(Z){if({1:Z,2:Ne}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(Z)||[,Z],/[.[]/.test(Z)){let $e=[];Z.replace(/\[([^\]]+)\]|([^.[]+)/g,(re,ye,Me=ye)=>$e.push(Me)),Z=$e.shift(),he=X,X=$e.join("-")}let le=W[Z]||Object.assign(Object.assign(W[Z]={},je(q,Z)),je(P,Z));if(X==null)return le;X||(X="DEFAULT");let Ee=le[X]??X.split("-").reduce(($e,re)=>$e?.[re],le)??he;return Ne?Je(Ee,{opacityValue:ba(Ne,pe)}):Ee}let He={};for(let le of[...Object.keys(q),...Object.keys(P)])He[le]=pe(le);return He}function je(Z,X){let he=Z[X];return typeof he=="function"&&(he=he(xe)),he&&/color|fill|stroke/i.test(X)?function Ne(He,le=[]){let Ee={};for(let $e in He){let re=He[$e],ye=[...le,$e];Ee[ye.join("-")]=re,$e=="DEFAULT"&&(ye=le,Ee[le.join("-")]=re),typeof re=="object"&&Object.assign(Ee,Ne(re,ye))}return Ee}(he):he}}(a),e:Pc,h:B,s(P,q){return g(P,q,U)},d(P,q,W){return d(P,q,U,W)},v(P){return x.has(P)||x.set(P,Mc(P,c,_,$0,U)||"&:"+P),x.get(P)},r(P,q){let W=JSON.stringify([P,q]);return k.has(W)||k.set(W,!R(P,U)&&Mc(P,p,S,I0,U,q)),k.get(W)},f(P){return b.reduce((q,W)=>W(q,U),P)}};return U}(t),n=new Map,s=[],o=new Set;e.resume(a=>n.set(a,a),(a,u)=>{e.insert(a,s.length,u),s.push(u),o.add(a)});function l(a){let u=r.f(a),d=fa(u);if(d&&!o.has(d)){o.add(d);let c=Lc(s,a);e.insert(d,c,a),s.splice(c,0,a)}return u.n}return Object.defineProperties(function(u){if(!n.size)for(let c of Q(t.preflight))typeof c=="function"&&(c=c(r)),c&&(typeof c=="string"?wa("",ge.b,es(c),r,ge.b,[],!1,!0):Dc(c,{},r,ge.b)).forEach(l);u=""+u;let d=n.get(u);if(!d){let c=new Set;for(let p of Qn(es(u),r))c.add(p.c).add(l(p));d=[...c].filter(Boolean).join(" "),n.set(u,d).set(d,d)}return d},Object.getOwnPropertyDescriptors({get target(){return e.target},theme:r.theme,config:t,snapshot(){let a=e.snapshot(),u=new Set(o),d=new Map(n),c=[...s];return()=>{a(),o=u,n=d,s=c}},clear(){e.clear(),o=new Set,n=new Map,s=[]},destroy(){this.clear(),e.destroy()}}))}function T0(i,e){return i!=e&&""+i.split(" ").sort()!=""+e.split(" ").sort()}function Bc(i){let e=new MutationObserver(t);return{observe(n){e.observe(n,{attributeFilter:["class"],subtree:!0,childList:!0}),r(n),t([{target:n,type:""}])},disconnect(){e.disconnect()}};function t(n){for(let{type:s,target:o}of n)if(s[0]=="a")r(o);else for(let l of o.querySelectorAll("[class]"))r(l);e.takeRecords()}function r(n){let s,o=n.getAttribute?.("class");o&&T0(o,s=i(o))&&n.setAttribute("class",s)}}function M0(i){let e=document.querySelector(i||'style[data-twind=""]');return(!e||e.tagName!="STYLE")&&(e=document.createElement("style"),document.head.prepend(e)),e.dataset.twind="claimed",e}function rs(i){let e=i?.cssRules?i:(i&&typeof i!="string"?i:M0(i)).sheet;return{target:e,snapshot(){let t=Array.from(e.cssRules,r=>r.cssText);return()=>{this.clear(),t.forEach(this.insert)}},clear(){for(let t=e.cssRules.length;t--;)e.deleteRule(t)},destroy(){e.ownerNode?.remove()},insert(t,r){try{e.insertRule(t,r)}catch{e.insertRule(":root{}",r)}},resume:is}}var P0=new Map([["align-self","-ms-grid-row-align"],["color-adjust","-webkit-print-color-adjust"],["column-gap","grid-column-gap"],["forced-color-adjust","-ms-high-contrast-adjust"],["gap","grid-gap"],["grid-template-columns","-ms-grid-columns"],["grid-template-rows","-ms-grid-rows"],["justify-self","-ms-grid-column-align"],["margin-inline-end","-webkit-margin-end"],["margin-inline-start","-webkit-margin-start"],["mask-border","-webkit-mask-box-image"],["mask-border-outset","-webkit-mask-box-image-outset"],["mask-border-slice","-webkit-mask-box-image-slice"],["mask-border-source","-webkit-mask-box-image-source"],["mask-border-repeat","-webkit-mask-box-image-repeat"],["mask-border-width","-webkit-mask-box-image-width"],["overflow-wrap","word-wrap"],["padding-inline-end","-webkit-padding-end"],["padding-inline-start","-webkit-padding-start"],["print-color-adjust","color-adjust"],["row-gap","grid-row-gap"],["scroll-margin-bottom","scroll-snap-margin-bottom"],["scroll-margin-left","scroll-snap-margin-left"],["scroll-margin-right","scroll-snap-margin-right"],["scroll-margin-top","scroll-snap-margin-top"],["scroll-margin","scroll-snap-margin"],["text-combine-upright","-ms-text-combine-horizontal"]]);function Hc(i){return P0.get(i)}function zc(i){var e=/^(?:(text-(?:decoration$|e|or|si)|back(?:ground-cl|d|f)|box-d|mask(?:$|-[ispro]|-cl)|pr|hyphena|flex-d)|(tab-|column(?!-s)|text-align-l)|(ap)|u|hy)/i.exec(i);return e?e[1]?1:e[2]?2:e[3]?3:5:0}function Vc(i,e){var t=/^(?:(pos)|(cli)|(background-i)|(flex(?:$|-b)|(?:max-|min-)?(?:block-s|inl|he|widt))|dis)/i.exec(i);return t?t[1]?/^sti/i.test(e)?1:0:t[2]?/^pat/i.test(e)?1:0:t[3]?/^image-/i.test(e)?1:0:t[4]?e[3]==="-"?2:0:/^(?:inline-)?grid$/i.test(e)?4:0:0}var R0=[["-webkit-",1],["-moz-",2],["-ms-",4]];function ns(){return({stringify:i})=>({stringify(e,t,r){let n="",s=Hc(e);s&&(n+=i(s,t,r)+";");let o=zc(e),l=Vc(e,t);for(let a of R0)o&a[1]&&(n+=i(a[0]+e,t,r)+";"),l&a[1]&&(n+=i(e,a[0]+t,r)+";");return n+i(e,t,r)}})}function ss(){return{rules:[["line-clamp-none",{"-webkit-line-clamp":"unset"}],["line-clamp-",xa("lineClamp",({_:i})=>Wc(i))],["line-clamp-(\\d+)",({1:i})=>Wc(i)]]}}function Wc(i){return{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":`${i}`}}var Rr={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",...ze(4,"rem",4,.5,.5),...ze(12,"rem",4,5),14:"3.5rem",...ze(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:G("blur"),backdropBrightness:G("brightness"),backdropContrast:G("contrast"),backdropGrayscale:G("grayscale"),backdropHueRotate:G("hueRotate"),backdropInvert:G("invert"),backdropOpacity:G("opacity"),backdropSaturate:G("saturate"),backdropSepia:G("sepia"),backgroundColor:G("colors"),backgroundImage:{none:"none"},backgroundOpacity:G("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{...ze(200,"",100,0,50),...ze(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:i})=>({DEFAULT:i("colors.gray.200","currentColor"),...i("colors")}),borderOpacity:G("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:G("spacing"),borderWidth:{DEFAULT:"1px",...Xe(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:G("colors"),caretColor:G("colors"),accentColor:({theme:i})=>({auto:"auto",...i("colors")}),contrast:{...ze(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:G("borderColor"),divideOpacity:G("borderOpacity"),divideWidth:G("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:i})=>({...i("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:i})=>({...i("spacing"),...Pr(2,6),...Pr(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:G("spacing"),gradientColorStops:G("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:i})=>({...i("spacing"),...Pr(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:i})=>({...i("spacing"),...Pr(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{...ze(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:i})=>({auto:"auto",...i("spacing")}),maxHeight:({theme:i})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...i("spacing")}),maxWidth:({theme:i,breakpoints:e})=>({...e(i("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{...ze(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:G("spacing"),placeholderColor:G("colors"),placeholderOpacity:G("opacity"),outlineColor:G("colors"),outlineOffset:Xe(8,"px"),outlineWidth:Xe(8,"px"),ringColor:({theme:i})=>({...i("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:G("colors"),ringOffsetWidth:Xe(8,"px"),ringOpacity:({theme:i})=>({...i("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...Xe(8,"px")},rotate:{...Xe(2,"deg"),...Xe(12,"deg",3),...Xe(180,"deg",45)},saturate:ze(200,"",100,0,50),scale:{...ze(150,"",100,0,50),...ze(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:G("spacing"),scrollPadding:G("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...Xe(2,"deg"),...Xe(12,"deg",3)},space:G("spacing"),stroke:({theme:i})=>({...i("colors"),none:"none"}),strokeWidth:ze(2),textColor:G("colors"),textDecorationColor:G("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...Xe(8,"px")},textUnderlineOffset:{auto:"auto",...Xe(8,"px")},textIndent:G("spacing"),textOpacity:G("opacity"),transitionDuration:({theme:i})=>({...i("durations"),DEFAULT:"150ms"}),transitionDelay:G("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:i})=>({...i("spacing"),...Pr(2,4),full:"100%"}),width:({theme:i})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...i("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...ze(50,"",1,0,10),auto:"auto"}};function Pr(i,e){let t={};do for(var r=1;r<i;r++)t[`${r}/${i}`]=Number((r/i*100).toFixed(6))+"%";while(++i<=e);return t}function Xe(i,e,t=0){let r={};for(;t<=i;t=2*t||1)r[t]=t+e;return r}function ze(i,e="",t=1,r=0,n=1,s={}){for(;r<=i;r+=n)s[r]=r/t+e;return s}function G(i){return({theme:e})=>e(i)}var Gc={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${Rr.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${Rr.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}};var Qc=[I("\\[([-\\w]+):(.+)]",({1:i,2:e},t)=>({"@layer overrides":{"&":{[i]:lt(`[${e}]`,"",t)}}})),I("(group|peer)([~/][^-[]+)?",({input:i},{h:e})=>[{c:e(i)}]),T("aspect-","aspectRatio"),I("container",(i,{theme:e})=>{let{screens:t=e("screens"),center:r,padding:n}=e("container"),s={width:"100%",marginRight:r&&"auto",marginLeft:r&&"auto",...o("xs")};for(let l in t){let a=t[l];typeof a=="string"&&(s[ts(a)]={"&":{maxWidth:a,...o(l)}})}return s;function o(l){let a=n&&(typeof n=="string"?n:n[l]||n.DEFAULT);if(a)return{paddingRight:a,paddingLeft:a}}}),T("content-","content",({_:i})=>({"--tw-content":i,content:"var(--tw-content)"})),I("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),I("box-(border|content)","boxSizing",({1:i})=>i+"-box"),I("hidden",{display:"none"}),I("table-(auto|fixed)","tableLayout"),I(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",I("isolate","isolation"),I("object-(contain|cover|fill|none|scale-down)","objectFit"),T("object-","objectPosition"),I("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",os),I("overscroll(-[xy])?-(auto|contain|none)",({1:i="",2:e})=>({["overscroll-behavior"+i]:e})),I("(static|fixed|absolute|relative|sticky)","position"),T("-?inset(-[xy])?(?:$|-)","inset",({1:i,_:e})=>({top:i!="-x"&&e,right:i!="-y"&&e,bottom:i!="-x"&&e,left:i!="-y"&&e})),T("-?(top|bottom|left|right)(?:$|-)","inset"),I("(visible|collapse)","visibility"),I("invisible",{visibility:"hidden"}),T("-?z-","zIndex"),I("flex-((row|col)(-reverse)?)","flexDirection",Zc),I("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),T("(flex-(?:grow|shrink))(?:$|-)"),T("(flex)-"),T("grow(?:$|-)","flexGrow"),T("shrink(?:$|-)","flexShrink"),T("basis-","flexBasis"),T("-?(order)-"),"-?(order)-(\\d+)",T("grid-cols-","gridTemplateColumns"),I("grid-cols-(\\d+)","gridTemplateColumns",Yc),T("col-","gridColumn"),I("col-(span)-(\\d+)","gridColumn",Kc),T("col-start-","gridColumnStart"),I("col-start-(auto|\\d+)","gridColumnStart"),T("col-end-","gridColumnEnd"),I("col-end-(auto|\\d+)","gridColumnEnd"),T("grid-rows-","gridTemplateRows"),I("grid-rows-(\\d+)","gridTemplateRows",Yc),T("row-","gridRow"),I("row-(span)-(\\d+)","gridRow",Kc),T("row-start-","gridRowStart"),I("row-start-(auto|\\d+)","gridRowStart"),T("row-end-","gridRowEnd"),I("row-end-(auto|\\d+)","gridRowEnd"),I("grid-flow-((row|col)(-dense)?)","gridAutoFlow",i=>os(Zc(i))),I("grid-flow-(dense)","gridAutoFlow"),T("auto-cols-","gridAutoColumns"),T("auto-rows-","gridAutoRows"),T("gap-x(?:$|-)","gap","columnGap"),T("gap-y(?:$|-)","gap","rowGap"),T("gap(?:$|-)","gap"),"(justify-(?:items|self))-",I("justify-","justifyContent",Jc),I("(content|items|self)-",i=>({["align-"+i[1]]:Jc(i)})),I("(place-(content|items|self))-",({1:i,$$:e})=>({[i]:("wun".includes(e[3])?"space-":"")+e})),T("p([xytrbl])?(?:$|-)","padding",Ri("padding")),T("-?m([xytrbl])?(?:$|-)","margin",Ri("margin")),T("-?space-(x|y)(?:$|-)","space",({1:i,_:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${i}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[i]]:`calc(${e} * calc(1 - var(--tw-space-${i}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[i]]:`calc(${e} * var(--tw-space-${i}-reverse))`}})),I("space-(x|y)-reverse",({1:i})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${i}-reverse`]:"1"}})),T("w-","width"),T("min-w-","minWidth"),T("max-w-","maxWidth"),T("h-","height"),T("min-h-","minHeight"),T("max-h-","maxHeight"),T("font-","fontWeight"),T("font-","fontFamily",({_:i})=>typeof(i=Q(i))[1]=="string"?{fontFamily:it(i)}:{fontFamily:it(i[0]),...i[1]}),I("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),I("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),I("italic","fontStyle"),I("not-italic",{fontStyle:"normal"}),I("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:i,2:e="",3:t})=>e=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(t?"numeric-fraction":"pt".includes(e[0])?"numeric-spacing":e?"numeric-figure":i)]:i,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...Ot({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),T("tracking-","letterSpacing"),T("leading-","lineHeight"),I("list-(inside|outside)","listStylePosition"),T("list-","listStyleType"),I("list-","listStyleType"),T("placeholder-opacity-","placeholderOpacity",({_:i})=>({"&::placeholder":{"--tw-placeholder-opacity":i}})),me("placeholder-",{property:"color",selector:"&::placeholder"}),I("text-(left|center|right|justify|start|end)","textAlign"),I("text-(ellipsis|clip)","textOverflow"),T("text-opacity-","textOpacity","--tw-text-opacity"),me("text-",{property:"color"}),T("text-","fontSize",({_:i})=>typeof i=="string"?{fontSize:i}:{fontSize:i[0],...typeof i[1]=="string"?{lineHeight:i[1]}:i[1]}),T("indent-","textIndent"),I("(overline|underline|line-through)","textDecorationLine"),I("no-underline",{textDecorationLine:"none"}),T("underline-offset-","textUnderlineOffset"),me("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),T("decoration-","textDecorationThickness"),I("decoration-","textDecorationStyle"),I("(uppercase|lowercase|capitalize)","textTransform"),I("normal-case",{textTransform:"none"}),I("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),I("align-","verticalAlign"),I("whitespace-","whiteSpace"),I("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),I("break-words",{overflowWrap:"break-word"}),I("break-all",{wordBreak:"break-all"}),I("break-keep",{wordBreak:"keep-all"}),me("caret-",{opacityVariable:!1,opacitySection:"opacity"}),me("accent-",{opacityVariable:!1,opacitySection:"opacity"}),I("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:i})=>`linear-gradient(to ${ii(i," ")},var(--tw-gradient-stops))`),me("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:i})=>({"--tw-gradient-from":i.value,"--tw-gradient-to":i.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),me("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:i})=>({"--tw-gradient-to":i.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${i.value},var(--tw-gradient-to)`})),me("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),I("bg-(fixed|local|scroll)","backgroundAttachment"),I("bg-origin-(border|padding|content)","backgroundOrigin",({1:i})=>i+"-box"),I(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),I("bg-blend-","backgroundBlendMode"),I("bg-clip-(border|padding|content|text)","backgroundClip",({1:i})=>i+(i=="text"?"":"-box")),T("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),me("bg-",{section:"backgroundColor"}),T("bg-","backgroundImage"),T("bg-","backgroundPosition"),I("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",os),T("bg-","backgroundSize"),T("rounded(?:$|-)","borderRadius"),T("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:i,_:e})=>{let t={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[i]||[i,i];return{[`border-${ii(t[0])}-radius`]:e,[`border-${ii(t[1])}-radius`]:e}}),I("border-(collapse|separate)","borderCollapse"),T("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),I("border-(solid|dashed|dotted|double|none)","borderStyle"),T("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:i,_:e})=>({...Ot({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(i||"-x")]:e,["--tw-border-spacing"+(i||"-y")]:e,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),me("border-([xytrbl])-",{section:"borderColor"},Ri("border","Color")),me("border-"),T("border-([xytrbl])(?:$|-)","borderWidth",Ri("border","Width")),T("border(?:$|-)","borderWidth"),T("divide-opacity(?:$|-)","divideOpacity",({_:i})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":i}})),I("divide-(solid|dashed|dotted|double|none)",({1:i})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:i}})),I("divide-([xy]-reverse)",({1:i})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+i]:"1"}})),T("divide-([xy])(?:$|-)","divideWidth",({1:i,_:e})=>{let t={x:"lr",y:"tb"}[i];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${i}-reverse`]:"0",[`border-${ii(t[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${i}-reverse)))`,[`border-${ii(t[1])}Width`]:`calc(${e} * var(--tw-divide-${i}-reverse))`}}}),me("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),T("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),me("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),T("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),I("ring-inset",{"--tw-ring-inset":"inset"}),me("ring-",{property:"--tw-ring-color"}),T("ring(?:$|-)","ringWidth",({_:i},{theme:e})=>({...Ot({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":e("ringOffsetWidth","","0px"),"--tw-ring-offset-color":Je(e("ringOffsetColor","","#fff")),"--tw-ring-color":Je(e("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":e("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${i} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),me("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:i})=>({"--tw-shadow-color":i.value,"--tw-shadow":"var(--tw-shadow-colored)"})),T("shadow(?:$|-)","boxShadow",({_:i})=>({...Ot({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":it(i),"--tw-shadow-colored":it(i).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),T("(opacity)-"),I("mix-blend-","mixBlendMode"),...Xc(),...Xc("backdrop-"),T("transition(?:$|-)","transitionProperty",(i,{theme:e})=>({transitionProperty:it(i),transitionTimingFunction:i._=="none"?void 0:it(e("transitionTimingFunction","")),transitionDuration:i._=="none"?void 0:it(e("transitionDuration",""))})),T("duration(?:$|-)","transitionDuration","transitionDuration",it),T("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",it),T("delay(?:$|-)","transitionDelay","transitionDelay",it),T("animate(?:$|-)","animation",(i,{theme:e,h:t,e:r})=>{let n=it(i),s=n.split(" "),o=e("keyframes",s[0]);return o?{["@keyframes "+(s[0]=r(t(s[0])))]:o,animation:s.join(" ")}:{animation:n}}),"(transform)-(none)",I("transform",Ca),I("transform-(cpu|gpu)",({1:i})=>({"--tw-transform":ed(i=="gpu")})),T("scale(-[xy])?-","scale",({1:i,_:e})=>({["--tw-scale"+(i||"-x")]:e,["--tw-scale"+(i||"-y")]:e,...Ca()})),T("-?(rotate)-","rotate",ka),T("-?(translate-[xy])-","translate",ka),T("-?(skew-[xy])-","skew",ka),I("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",os),"(appearance)-",T("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",T("(cursor)-"),"(cursor)-",I("snap-(none)","scroll-snap-type"),I("snap-(x|y|both)",({1:i})=>({...Ot({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":i+" var(--tw-scroll-snap-strictness)"})),I("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),I("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),I("snap-(normal|always)","scroll-snap-stop"),I("scroll-(auto|smooth)","scroll-behavior"),T("scroll-p([xytrbl])?(?:$|-)","padding",Ri("scroll-padding")),T("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",Ri("scroll-margin")),I("touch-(auto|none|manipulation)","touch-action"),I("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:i,2:e,3:t})=>({...Ot({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${e?"pan-x":t?"pan-y":i}`]:i,"touch-action":"var(--tw-touch-action)"})),I("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),I("outline",{outlineStyle:"solid"}),I("outline-(dashed|dotted|double)","outlineStyle"),T("-?(outline-offset)-"),me("outline-",{opacityVariable:!1,opacitySection:"opacity"}),T("outline-","outlineWidth"),"(pointer-events)-",T("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:i})=>({x:"horizontal",y:"vertical"})[i]||i||"both"],I("select-(none|text|all|auto)","userSelect"),me("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),me("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),T("stroke-","strokeWidth"),I("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),I("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function os(i){return(typeof i=="string"?i:i[1]).replace(/-/g," ").trim()}function Zc(i){return(typeof i=="string"?i:i[1]).replace("col","column")}function ii(i,e="-"){let t=[];for(let r of i)t.push({t:"top",r:"right",b:"bottom",l:"left"}[r]);return t.join(e)}function it(i){return i&&""+(i._||i)}function Jc({$$:i}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[i[3]||""]||"")+i}function Ri(i,e=""){return({1:t,_:r})=>{let n={x:"lr",y:"tb"}[t]||t+t;return n?{...Tr(i+"-"+ii(n[0])+e,r),...Tr(i+"-"+ii(n[1])+e,r)}:Tr(i+e,r)}}function Xc(i=""){let e=["blur","brightness","contrast","grayscale","hue-rotate","invert",i&&"opacity","saturate","sepia",!i&&"drop-shadow"].filter(Boolean),t={};for(let r of e)t[`--tw-${i}${r}`]="var(--tw-empty,/*!*/ /*!*/)";return t={...Ot(t),[`${i}filter`]:e.map(r=>`var(--tw-${i}${r})`).join(" ")},[`(${i}filter)-(none)`,I(`${i}filter`,t),...e.map(r=>T(`${r[0]=="h"?"-?":""}(${i}${r})(?:$|-)`,r,({1:n,_:s})=>({[`--tw-${n}`]:Q(s).map(o=>`${r}(${o})`).join(" "),...t})))]}function ka({1:i,_:e}){return{["--tw-"+i]:e,...Ca()}}function Ca(){return{...Ot({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":ed()}),transform:"var(--tw-transform)"}}function ed(i){return[i?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function Kc({1:i,2:e}){return`${i} ${e} / ${i} ${e}`}function Yc({1:i}){return`repeat(${i},minmax(0,1fr))`}function Ot(i){return{"@layer defaults":{"*,::before,::after":i,"::backdrop":i}}}var td=[["sticky","@supports ((position: -webkit-sticky) or (position:sticky))"],["motion-reduce","@media (prefers-reduced-motion:reduce)"],["motion-safe","@media (prefers-reduced-motion:no-preference)"],["print","@media print"],["(portrait|landscape)",({1:i})=>`@media (orientation:${i})`],["contrast-(more|less)",({1:i})=>`@media (prefers-contrast:${i})`],["(first-(letter|line)|placeholder|backdrop|before|after)",({1:i})=>`&::${i}`],["(marker|selection)",({1:i})=>`& *::${i},&::${i}`],["file","&::file-selector-button"],["(first|last|only)",({1:i})=>`&:${i}-child`],["even","&:nth-child(2n)"],["odd","&:nth-child(odd)"],["open","&[open]"],["(aria|data)-",({1:i,$$:e},t)=>e&&`&[${i}-${t.theme(i,e)||lt(e,"",t)||`${e}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:i,3:e="",4:t,5:r="",6:n=e},{e:s,h:o,v:l})=>{let a=Pi(r)||(t[0]=="["?t:l(t.slice(1)));return`${(a.includes("&")?a:"&"+a).replace(/&/g,`:merge(.${s(o(i+n))})`)}${i[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:i})=>`[dir="${i}"] &`],["supports-",({$$:i},e)=>{if(i&&(i=e.theme("supports",i)||lt(i,"",e)),i)return i.includes(":")||(i+=":var(--tw)"),/^\w*\s*\(/.test(i)||(i=`(${i})`),`@supports ${i.replace(/\b(and|or|not)\b/g," $1 ").trim()}`}],["max-",({$$:i},e)=>{if(i&&(i=e.theme("screens",i)||lt(i,"",e)),typeof i=="string")return`@media not all and (min-width:${i})`}],["min-",({$$:i},e)=>(i&&(i=lt(i,"",e)),i&&`@media (min-width:${i})`)],[/^\[(.+)]$/,({1:i})=>/[&@]/.test(i)&&Pi(i).replace(/[}]+$/,"").split("{")]];function id({colors:i,disablePreflight:e}={}){return{preflight:e?void 0:Gc,theme:{...Rr,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...i}},variants:td,rules:Qc,finalize(t){return t.n&&t.d&&t.r.some(r=>/^&::(before|after)$/.test(r))&&!/(^|;)content:/.test(t.d)?{...t,d:"content:var(--tw-content);"+t.d}:t}}}var O0={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},L0={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},F0={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},D0={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},j0={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},N0={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},U0={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},q0={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},B0={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},H0={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},z0={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},V0={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},W0={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},G0={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},Z0={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},J0={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},X0={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},K0={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},Y0={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},Q0={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},eg={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},tg={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},rd={__proto__:null,slate:O0,gray:L0,zinc:F0,neutral:D0,stone:j0,red:N0,orange:U0,amber:q0,yellow:B0,lime:H0,green:z0,emerald:V0,teal:W0,cyan:G0,sky:Z0,blue:J0,indigo:X0,violet:K0,purple:Y0,fuchsia:Q0,pink:eg,rose:tg};function as({disablePreflight:i}={}){return id({colors:rd,disablePreflight:i})}function ls({className:i="prose",defaultColor:e="gray",extend:t={},colors:r={}}={}){return r={body:"700",headings:"900",lead:"600",links:"900",bold:"900",counters:"500",bullets:"300",hr:"200",quotes:"900","quote-borders":"200",captions:"500",code:"900","pre-code":"200","pre-bg":"800","th-borders":"300","td-borders":"200",...r,dark:r.dark===null?null:{body:"300",headings:"#fff",lead:"400",links:"#fff",bold:"#fff",counters:"400",bullets:"600",hr:"700",quotes:"100","quote-borders":"700",captions:"400",code:"#fff","pre-code":"300","pre-bg":"rgb(0 0 0 / 50%)","th-borders":"600","td-borders":"700",...r.dark}},{variants:[["headings","h1,h2,h3,h4,h5,h6,th"],["h1"],["h2"],["h3"],["h4"],["h5"],["h6"],["p"],["a"],["blockquote"],["figure"],["figcaption"],["strong"],["em"],["code"],["pre"],["ol"],["ul"],["li"],["table"],["thead"],["tr"],["th"],["td"],["img"],["video"],["hr"],["lead",".lead"]].map(([s,o=s])=>[`${i}-${s}`,(l,a)=>od(i,o[0]=="."?"."+a.e(a.h(o.slice(1))):o,a,u=>`& :is(${u.trim()})`)]),rules:[[`(lead|not-${i})`,({1:s},{h:o})=>[{c:o(s)}]],[`${i}-invert`,{"@layer base":{"--tw-prose-body":"var(--tw-prose-invert-body)","--tw-prose-headings":"var(--tw-prose-invert-headings)","--tw-prose-lead":"var(--tw-prose-invert-lead)","--tw-prose-links":"var(--tw-prose-invert-links)","--tw-prose-bold":"var(--tw-prose-invert-bold)","--tw-prose-counters":"var(--tw-prose-invert-counters)","--tw-prose-bullets":"var(--tw-prose-invert-bullets)","--tw-prose-hr":"var(--tw-prose-invert-hr)","--tw-prose-quotes":"var(--tw-prose-invert-quotes)","--tw-prose-quote-borders":"var(--tw-prose-invert-quote-borders)","--tw-prose-captions":"var(--tw-prose-invert-captions)","--tw-prose-code":"var(--tw-prose-invert-code)","--tw-prose-pre-code":"var(--tw-prose-invert-pre-code)","--tw-prose-pre-bg":"var(--tw-prose-invert-pre-bg)","--tw-prose-th-borders":"var(--tw-prose-invert-th-borders)","--tw-prose-td-borders":"var(--tw-prose-invert-td-borders)"}}],[i+"-",({$$:s},o)=>{let l=sd(o.theme("fontSize",s));return l&&{"@layer components":l}}],[i+"-",({$$:s},o)=>n(s,o)],[i,(s,o)=>({...n(e,o),"@layer base":[nd(i,o,{a:{color:"var(--tw-prose-links)",textDecorationLine:"underline",fontWeight:"500"},strong:{color:"var(--tw-prose-bold)",fontWeight:"600"},"a strong,blockquote strong,thead th strong":{color:"inherit"},ul:{listStyleType:"disc"},ol:{listStyleType:"decimal"},'ol[type="A"]':{listStyleType:"upper-alpha"},'ol[type="a"]':{listStyleType:"lower-alpha"},'ol[type="A" s]':{listStyleType:"upper-alpha"},'ol[type="a" s]':{listStyleType:"lower-alpha"},'ol[type="I"]':{listStyleType:"upper-roman"},'ol[type="i"]':{listStyleType:"lower-roman"},'ol[type="I" s]':{listStyleType:"upper-roman"},'ol[type="i" s]':{listStyleType:"lower-roman"},'ol[type="1"]':{listStyleType:"decimal"},"ol,ul":{marginTop:D(20,16),marginBottom:D(20,16),paddingLeft:D(26,16)},li:{marginTop:D(8,16),marginBottom:D(8,16)},"ol>li,ul>li":{paddingLeft:D(6,16)},">ul>li p":{marginTop:D(12,16),marginBottom:D(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:D(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:D(20,16)},"ol>li::marker":{fontWeight:"400",color:"var(--tw-prose-counters)"},"ul>li::marker":{color:"var(--tw-prose-bullets)"},"ul ul,ul ol,ol ul,ol ol":{marginTop:D(12,16),marginBottom:D(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:D(48,16),marginBottom:D(48,16)},blockquote:{marginTop:D(32,20),marginBottom:D(32,20),paddingLeft:D(20,20),fontWeight:"500",fontStyle:"italic",color:"var(--tw-prose-quotes)",borderLeftWidth:"0.25rem",borderLeftColor:"var(--tw-prose-quote-borders)",quotes:'"\\201C""\\201D""\\2018""\\2019"'},"blockquote p:first-of-type::before":{content:"open-quote"},"blockquote p:last-of-type::after":{content:"close-quote"},p:{marginTop:D(20,16),marginBottom:D(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:D(36,16),marginTop:"0",marginBottom:D(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900",color:"inherit"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:D(24,16),marginTop:D(48,24),marginBottom:D(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800",color:"inherit"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:D(20,16),marginTop:D(32,20),marginBottom:D(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700",color:"inherit"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:D(24,16),marginBottom:D(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700",color:"inherit"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:D(32,16),marginBottom:D(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:D(14,16),lineHeight:"1.4",marginTop:D(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:D(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:D(21,24)},"h3 code":{fontSize:D(18,20)},"a code,h1 code,h2 code,h3 code,h4 code,blockquote code,thead th code":{color:"inherit"},pre:{color:"var(--tw-prose-pre-code)",backgroundColor:"var(--tw-prose-pre-bg)",overflowX:"auto",fontWeight:"400",fontSize:D(14,16),lineHeight:"1.7",marginTop:D(24,14),marginBottom:D(24,14),borderRadius:"0.375rem",paddingTop:D(12,14),paddingRight:D(16,14),paddingBottom:D(12,14),paddingLeft:D(16,14)},"pre code":{backgroundColor:"transparent",borderWidth:"0",borderRadius:"0",padding:"0",fontWeight:"inherit",color:"inherit",fontSize:"inherit",fontFamily:"inherit",lineHeight:"inherit"},"pre code::before":{content:"none"},"pre code::after":{content:"none"},table:{width:"100%",tableLayout:"auto",textAlign:"left",marginTop:D(32,16),marginBottom:D(32,16),fontSize:D(14,16),lineHeight:"1.7"},thead:{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-th-borders)"},"thead th":{color:"var(--tw-prose-headings)",fontWeight:"600",verticalAlign:"bottom",paddingRight:D(8,14),paddingBottom:D(8,14),paddingLeft:D(8,14)},"thead th:first-child":{paddingLeft:"0"},"thead th:last-child":{paddingRight:"0"},"tbody tr":{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-td-borders)"},"tbody tr:last-child":{borderBottomWidth:"0"},"tbody td,tfoot td":{verticalAlign:"baseline",paddingTop:D(8,14),paddingRight:D(8,14),paddingBottom:D(8,14),paddingLeft:D(8,14)},"tbody td:first-child,tfoot td:first-child":{paddingLeft:"0"},"tbody td:last-child,tfoot td:last-child":{paddingRight:"0"},[`.${o.e(o.h("lead"))}`]:{color:"var(--tw-prose-lead)",fontSize:D(20,16),lineHeight:"1.6",marginTop:D(24,20),marginBottom:D(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),nd(i,o,t)],"@layer components":{...sd(o.theme("fontSize","base")),color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"}})]]};function n(s,o){let l={},a={},u=(d,c,p)=>{let h=o.theme(`colors.${s}.${c}`,c);p["--tw-prose-"+d]=Je(h);let g=p!=a&&o.d("colors",`${s}-${c}`,h);g&&(a["--tw-prose-"+d]=Je(g))};for(let d in r){let c=r[d];d!="dark"&&c&&u(d,c,l)}for(let d in r.dark||{}){let c=r.dark[d];c&&(r.dark?u("invert-"+d,c,l):u(d,c,a))}return Object.keys(l).length?{"@layer defaults":{"&":l,[o.v("dark")]:a}}:void 0}}function nd(i,e,t){let r={};for(let n in t)r[od(i,n,e,s=>`.${e.e(e.h(i))}${s}`)]=t[n];return r}function od(i,e,{e:t,h:r},n){return e.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(s,o=" ",l=s,a="")=>n(`${o}:where(${l}):not(:where(.${t(r("not-"+i))} *))${a}`))}function sd(i){return i?typeof i=="string"?{fontSize:i}:{fontSize:i[0],...typeof i[1]=="string"?{lineHeight:i[1]}:i[1]}:void 0}function D(i,e){return`${(i/e).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}var Sa=Mr({hash:!1,darkMode:"class",theme:{extend:{colors:{violet:{DEFAULT:"#601feb",50:"#f3f2ff",100:"#eae7ff",200:"#d7d2ff",300:"#baaeff",400:"#9980ff",500:"#784dff",600:"#6829fe",700:"#601feb",800:"#4b12c5",900:"#3f11a1",950:"#25086d"},pink:{DEFAULT:"#ff0bbb",50:"#fff0fc",100:"#ffe3fc",200:"#ffc6f9",300:"#ff98f2",400:"#ff58e5",500:"#ff27d5",600:"#ff0bbb",700:"#df0095",800:"#b8007b",900:"#980368",950:"#5f003b"},lime:{DEFAULT:"#b9e901",50:"#fdffe4",100:"#f9ffc5",200:"#f1ff92",300:"#e2ff54",400:"#d1fa21",500:"#b9e901",600:"#8ab400",700:"#688902",800:"#526b09",900:"#465a0d",950:"#243300"}},spacing:{px:"1px",0:"0",.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px"},padding:{px:"1px",0:"0",.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px"},lineHeight:{3:"12px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px"},maxWidth:{xs:"320px",sm:"384px",md:"448px",lg:"512px",xl:"576px","2xl":"672px","3xl":"768px","4xl":"896px","5xl":"1024px","6xl":"1152px","7xl":"1280px"},maxHeight:{.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px"},borderRadius:{sm:"2px",DEFAULT:"4px",md:"6px",lg:"8px",xl:"12px","2xl":"16px","3xl":"24px"},fontSize:{xs:["12px","16px"],sm:["14px","20px"],base:["16px","24px"],lg:["18px","28px"],xl:["20px","28px"],"2xl":["24px","32px"],"3xl":["30px","36px"],"4xl":["36px","40px"],"5xl":["48px","1"],"6xl":["60px","1"],"7xl":["72px","1"],"8xl":["96px","1"],"9xl":["128px","1"]}}},presets:[as(),ns(),ss(),ls()]});function us(i,e=!0){let t=function(){if(ig)try{let a=rs(new CSSStyleSheet);return a.connect=u=>{let d=Ea(u);d.adoptedStyleSheets=[...d.adoptedStyleSheets,a.target]},a.disconnect=is,a}catch{}let s=document.createElement("style");s.media="not all",document.head.prepend(s);let o=[rs(s)],l=new WeakMap;return{get target(){return o[0].target},snapshot(){let a=o.map(u=>u.snapshot());return()=>a.forEach(u=>u())},clear(){o.forEach(a=>a.clear())},destroy(){o.forEach(a=>a.destroy())},insert(a,u,d){o[0].insert(a,u,d);let c=this.target.cssRules[u];o.forEach((p,h)=>h&&p.target.insertRule(c.cssText,u))},resume(a,u){return o[0].resume(a,u)},connect(a){let u=document.createElement("style");Ea(a).appendChild(u);let d=rs(u),{cssRules:c}=this.target;for(let p=0;p<c.length;p++)d.target.insertRule(c[p].cssText,p);o.push(d),l.set(a,d)},disconnect(a){let u=o.indexOf(l.get(a));u>=0&&o.splice(u,1)}}}(),r=qc({...i,hash:i.hash??e},t),n=Bc(r);return function(o){return class extends o{connectedCallback(){super.connectedCallback?.(),t.connect(this),n.observe(Ea(this))}disconnectedCallback(){t.disconnect(this),super.disconnectedCallback?.()}constructor(...a){super(...a),this.tw=r}}}}var ig=typeof ShadowRoot<"u"&&(typeof ShadyCSS>"u"||ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;function Ea(i){return i.shadowRoot||i.attachShadow({mode:"open"})}var z=i=>us(Sa)(i);var cs=class extends z(N){constructor(){super();M(this,"render",()=>y`
106
+ </svg>`,"calendar-days":`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
107
+ <path d="M6.75 3V5.25M17.25 3V5.25M3 18.75V7.5C3 6.25736 4.00736 5.25 5.25 5.25H18.75C19.9926 5.25 21 6.25736 21 7.5V18.75M3 18.75C3 19.9926 4.00736 21 5.25 21H18.75C19.9926 21 21 19.9926 21 18.75M3 18.75V11.25C3 10.0074 4.00736 9 5.25 9H18.75C19.9926 9 21 10.0074 21 11.25V18.75M12 12.75H12.0075V12.7575H12V12.75ZM12 15H12.0075V15.0075H12V15ZM12 17.25H12.0075V17.2575H12V17.25ZM9.75 15H9.7575V15.0075H9.75V15ZM9.75 17.25H9.7575V17.2575H9.75V17.25ZM7.5 15H7.5075V15.0075H7.5V15ZM7.5 17.25H7.5075V17.2575H7.5V17.25ZM14.25 12.75H14.2575V12.7575H14.25V12.75ZM14.25 15H14.2575V15.0075H14.25V15ZM14.25 17.25H14.2575V17.2575H14.25V17.25ZM16.5 12.75H16.5075V12.7575H16.5V12.75ZM16.5 15H16.5075V15.0075H16.5V15Z" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
108
+ </svg>`,map:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
109
+ <path d="M9 6.75002V15M15 9.00002V17.25M15.5031 20.7485L20.3781 18.311C20.7592 18.1204 21 17.7309 21 17.3047V4.82031C21 3.98401 20.1199 3.44007 19.3719 3.81408L15.5031 5.74847C15.1864 5.90683 14.8136 5.90683 14.4969 5.74847L9.50312 3.25158C9.1864 3.09322 8.8136 3.09322 8.49688 3.25158L3.62188 5.68908C3.24075 5.87965 3 6.26919 3 6.69531V19.1797C3 20.016 3.8801 20.56 4.62811 20.186L8.49688 18.2516C8.8136 18.0932 9.1864 18.0932 9.50312 18.2516L14.4969 20.7485C14.8136 20.9068 15.1864 20.9068 15.5031 20.7485Z" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
110
+ </svg>`,"document-text":`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
111
+ <path d="M19.5 14.25V11.625C19.5 9.76104 17.989 8.25 16.125 8.25H14.625C14.0037 8.25 13.5 7.74632 13.5 7.125V5.625C13.5 3.76104 11.989 2.25 10.125 2.25H8.25M8.25 15H15.75M8.25 18H12M10.5 2.25H5.625C5.00368 2.25 4.5 2.75368 4.5 3.375V20.625C4.5 21.2463 5.00368 21.75 5.625 21.75H18.375C18.9963 21.75 19.5 21.2463 19.5 20.625V11.25C19.5 6.27944 15.4706 2.25 10.5 2.25Z" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
112
+ </svg>`,link:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
113
+ <path d="M13.1903 8.68842C13.6393 8.90291 14.0601 9.19611 14.432 9.56802C16.1893 11.3254 16.1893 14.1746 14.432 15.932L9.93198 20.432C8.17462 22.1893 5.32538 22.1893 3.56802 20.432C1.81066 18.6746 1.81066 15.8254 3.56802 14.068L5.32499 12.311M18.675 11.689L20.432 9.93198C22.1893 8.17462 22.1893 5.32538 20.432 3.56802C18.6746 1.81066 15.8254 1.81066 14.068 3.56802L9.56802 8.06802C7.81066 9.82538 7.81066 12.6746 9.56802 14.432C9.93992 14.8039 10.3607 15.0971 10.8097 15.3116" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
114
+ </svg>`};var fu=$o,Pi=class extends un{resolveIcon(e){return fu[e]}render(){super.render();let e=this.shadowRoot?.querySelector("svg");if(!e)throw new Error("svgEl not found");e.setAttribute("fill","none"),e.querySelectorAll("[stroke]").forEach(r=>{r.setAttribute("stroke","currentColor")})}};customElements.get("hi-outline")||customElements.define("hi-outline",Pi);function Zi(t){return[...t.v,(t.i?"!":"")+t.n].join(":")}function hu(t,e=","){return t.map(Zi).join(e)}var To=typeof CSS<"u"&&CSS.escape||(t=>t.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function cn(t){for(var e=9,r=t.length;r--;)e=Math.imul(e^t.charCodeAt(r),1597334677);return"#"+((e^e>>>9)>>>0).toString(36)}function hn(t,e="@media "){return e+R(t).map(r=>(typeof r=="string"&&(r={min:r}),r.raw||Object.keys(r).map(n=>`(${n}-width:${r[n]})`).join(" and "))).join(",")}function R(t=[]){return Array.isArray(t)?t:t==null?[]:[t]}function Eo(t){return t}function dn(){}var W={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function Oo(t){return t.match(/[-=:;]/g)?.length||0}function Ni(t){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(t)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(Oo(t),15)<<18}var du=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire"];function Gi({n:t,i:e,v:r=[]},n,i,s){t&&(t=Zi({n:t,i:e,v:r})),s=[...R(s)];for(let u of r){let a=n.theme("screens",u);for(let c of R(a&&hn(a)||n.v(u))){var o;s.push(c),i|=a?67108864|Ni(c):u=="dark"?1073741824:c[0]=="@"?Ni(c):(o=c,1<<~(/:([a-z-]+)/.test(o)&&~du.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:t,p:i,r:s,i:e}}var Lo=new Map;function Bi(t){if(t.d){let e=[],r=Ui(t.r.reduce((n,i)=>i[0]=="@"?(e.push(i),n):i?Ui(n,s=>Ui(i,o=>{let u=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(o);if(u){let a=s.indexOf(u[1]);return~a?s.slice(0,a)+u[0]+s.slice(a+u[1].length):Vi(s,o)}return Vi(o,s)})):n,"&"),n=>Vi(n,t.n?"."+To(t.n):""));return r&&e.push(r.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((n,i)=>i+"{"+n+"}",t.d)}}function Ui(t,e){return t.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(r,n,i)=>e(n)+i)}function Vi(t,e){return t.replace(/&/g,e)}var So=new Intl.Collator("en",{numeric:!0});function jo(t,e){for(var r=0,n=t.length;r<n;){let i=n+r>>1;0>=Do(t[i],e)?r=i+1:n=i}return n}function Do(t,e){let r=t.p&W.o;return r==(e.p&W.o)&&(r==W.b||r==W.o)?0:t.p-e.p||t.o-e.o||So.compare(_o(t.n),_o(e.n))||So.compare(Ao(t.n),Ao(e.n))}function _o(t){return(t||"").split(/:/).pop().split("/").pop()||"\0"}function Ao(t){return(t||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function Fi(t,e){return Math.round(parseInt(t,16)*e)}function ce(t,e={}){if(typeof t=="function")return t(e);let{opacityValue:r="1",opacityVariable:n}=e,i=n?`var(${n})`:r;if(t.includes("<alpha-value>"))return t.replace("<alpha-value>",i);if(t[0]=="#"&&(t.length==4||t.length==7)){let s=(t.length-1)/3,o=[17,1,.062272][s-1];return`rgba(${[Fi(t.substr(1,s),o),Fi(t.substr(1+s,s),o),Fi(t.substr(1+2*s,s),o),i]})`}return i=="1"?t:i=="0"?"#0000":t.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${i})`)}function Ro(t,e,r,n,i=[]){return function s(o,{n:u,p:a,r:c=[],i:f},p){let b=[],x="",k=0,_=0;for(let $ in o||{}){var M,j;let A=o[$];if($[0]=="@"){if(!A)continue;if($[1]=="a"){b.push(...Ji(u,a,fn(""+A),p,a,c,f,!0));continue}if($[1]=="l"){for(let I of R(A))b.push(...s(I,{n:u,p:(M=W[$[7]],a&~W.o|M),r:$[7]=="d"?[]:c,i:f},p));continue}if($[1]=="i"){b.push(...R(A).map(I=>({p:-1,o:0,r:[],d:$+" "+I})));continue}if($[1]=="k"){b.push({p:W.d,o:0,r:[$],d:s(A,{p:W.d},p).map(Bi).join("")});continue}if($[1]=="f"){b.push(...R(A).map(I=>({p:W.d,o:0,r:[$],d:s(I,{p:W.d},p).map(Bi).join("")})));continue}}if(typeof A!="object"||Array.isArray(A))$=="label"&&A?u=A+cn(JSON.stringify([a,f,o])):(A||A===0)&&($=$.replace(/[A-Z]/g,I=>"-"+I.toLowerCase()),_+=1,k=Math.max(k,(j=$)[0]=="-"?0:Oo(j)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(j)?+!!RegExp.$1||-!!RegExp.$2:0)+1),x+=(x?";":"")+R(A).map(I=>p.s($,Xi(""+I,p.theme)+(f?" !important":""))).join(";"));else if($[0]=="@"||$.includes("&")){let I=a;$[0]=="@"&&($=$.replace(/\bscreen\(([^)]+)\)/g,(H,z)=>{let J=p.theme("screens",z);return J?(I|=67108864,hn(J,"")):H}),I|=Ni($)),b.push(...s(A,{n:u,p:I,r:[...c,$],i:f},p))}else b.push(...s(A,{p:a,r:[...c,$]},p))}return b.unshift({n:u,p:a,o:Math.max(0,15-_)+1.5*Math.min(k||15,15),r:c,d:x}),b.sort(Do)}(t,Gi(e,r,n,i),r)}function Xi(t,e){return t.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(r,n,i,s,o="")=>{let u=e(i,o);return typeof u=="function"&&/color|fill|stroke/i.test(i)?ce(u):""+R(u).filter(a=>Object(a)!==a)})}function Po(t,e){let r,n=[];for(let i of t)i.d&&i.n?r?.p==i.p&&""+r.r==""+i.r?(r.c=[r.c,i.c].filter(Boolean).join(" "),r.d=r.d+";"+i.d):n.push(r={...i,n:i.n&&e}):n.push({...i,n:i.n&&e});return n}function pn(t,e,r=W.u,n,i){let s=[];for(let o of t)for(let u of function(a,c,f,p,b){a={...a,i:a.i||b};let x=function(k,_){let M=Lo.get(k.n);return M?M(k,_):_.r(k.n,k.v[0]=="dark")}(a,c);return x?typeof x=="string"?({r:p,p:f}=Gi(a,c,f,p),Po(pn(fn(x),c,f,p,a.i),a.n)):Array.isArray(x)?x.map(k=>{var _,M;return{o:0,...k,r:[...R(p),...R(k.r)],p:(_=f,M=k.p??f,_&~W.o|M)}}):Ro(x,a,c,f,p):[{c:Zi(a),p:0,o:0,r:[]}]}(o,e,r,n,i))s.splice(jo(s,u),0,u);return s}function Ji(t,e,r,n,i,s,o,u){return Po((u?r.flatMap(a=>pn([a],n,i,s,o)):pn(r,n,i,s,o)).map(a=>a.p&W.o&&(a.n||e==W.b)?{...a,p:a.p&~W.o|e,o:0}:a),t)}function mu(t,e,r,n){var i;return i=(s,o)=>{let{n:u,p:a,r:c,i:f}=Gi(s,o,e);return r&&Ji(u,e,r,o,a,c,f,n)},Lo.set(t,i),t}function Hi(t,e,r){if(t[t.length-1]!="("){let n=[],i=!1,s=!1,o="";for(let u of t)if(!(u=="("||/[~@]$/.test(u))){if(u[0]=="!"&&(u=u.slice(1),i=!i),u.endsWith(":")){n[u=="dark:"?"unshift":"push"](u.slice(0,-1));continue}u[0]=="-"&&(u=u.slice(1),s=!s),u.endsWith("-")&&(u=u.slice(0,-1)),u&&u!="&"&&(o+=(o&&"-")+u)}o&&(s&&(o="-"+o),e[0].push({n:o,v:n.filter(gu),i}))}}function gu(t,e,r){return r.indexOf(t)==e}var Mo=new Map;function fn(t){let e=Mo.get(t);if(!e){let r=[],n=[[]],i=0,s=0,o=null,u=0,a=(c,f=0)=>{i!=u&&(r.push(t.slice(i,u+f)),c&&Hi(r,n)),i=u+1};for(;u<t.length;u++){let c=t[u];if(s)t[u-1]!="\\"&&(s+=+(c=="[")||-(c=="]"));else if(c=="[")s+=1;else if(o)t[u-1]!="\\"&&o.test(t.slice(u))&&(o=null,i=u+RegExp.lastMatch.length);else if(c=="/"&&t[u-1]!="\\"&&(t[u+1]=="*"||t[u+1]=="/"))o=t[u+1]=="*"?/^\*\//:/^[\r\n]/;else if(c=="(")a(),r.push(c);else if(c==":")t[u+1]!=":"&&a(!1,1);else if(/[\s,)]/.test(c)){a(!0);let f=r.lastIndexOf("(");if(c==")"){let p=r[f-1];if(/[~@]$/.test(p)){let b=n.shift();r.length=f,Hi([...r,"#"],n);let{v:x}=n[0].pop();for(let k of b)k.v.splice(+(k.v[0]=="dark")-+(x[0]=="dark"),x.length);Hi([...r,mu(p.length>1?p.slice(0,-1)+cn(JSON.stringify([p,b])):p+"("+hu(b)+")",W.a,b,/@$/.test(p))],n)}f=r.lastIndexOf("(",f-1)}r.length=f+1}else/[~@]/.test(c)&&t[u+1]=="("&&n.unshift([])}a(!0),Mo.set(t,e=n[0])}return e}function y(t,e,r){return[t,qi(e,r)]}function qi(t,e){return typeof t=="function"?t:typeof t=="string"&&/^[\w-]+$/.test(t)?(r,n)=>({[t]:e?e(r,n):zi(r,1)}):r=>t||{[r[1]]:zi(r,2)}}function zi(t,e,r=t.slice(e).find(Boolean)||t.$$||t.input){return t.input[0]=="-"?`calc(${r} * -1)`:r}function v(t,e,r,n){return[t,Ki(e,r,n)]}function Ki(t,e,r){let n=typeof e=="string"?(i,s)=>({[e]:r?r(i,s):i._}):e||(({1:i,_:s},o,u)=>({[i||u]:s}));return(i,s)=>{let o=Uo(t||i[1]),u=s.theme(o,i.$$)??we(i.$$,o,s);if(u!=null)return i._=zi(i,0,u),n(i,s,o)}}function Z(t,e={},r){return[t,yu(e,r)]}function yu(t={},e){return(r,n)=>{let{section:i=Uo(r[0]).replace("-","")+"Color"}=t,[s,o]=vu(r.$$);if(!s)return;let u=n.theme(i,s)||we(s,i,n);if(!u||typeof u=="object")return;let{opacityVariable:a=`--tw-${r[0].replace(/-$/,"")}-opacity`,opacitySection:c=i.replace("Color","Opacity"),property:f=i,selector:p}=t,b=n.theme(c,o||"DEFAULT")||o&&we(o,c,n),x=e||(({_})=>{let M=ar(f,_);return p?{[p]:M}:M});r._={value:ce(u,{opacityVariable:a||void 0,opacityValue:b||void 0}),color:_=>ce(u,_),opacityVariable:a||void 0,opacityValue:b||void 0};let k=x(r,n);if(!r.dark){let _=n.d(i,s,u);_&&_!==u&&(r._={value:ce(_,{opacityVariable:a||void 0,opacityValue:b||"1"}),color:M=>ce(_,M),opacityVariable:a||void 0,opacityValue:b||void 0},k={"&":k,[n.v("dark")]:x(r,n)})}return k}}function vu(t){return(t.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function ar(t,e){let r={};return typeof e=="string"?r[t]=e:(e.opacityVariable&&e.value.includes(e.opacityVariable)&&(r[e.opacityVariable]=e.opacityValue||"1"),r[t]=e.value),r}function we(t,e,r){if(t[0]=="["&&t.slice(-1)=="]"){if(t=yt(Xi(t.slice(1,-1),r.theme)),!e)return t;if(!(/color|fill|stroke/i.test(e)&&!(/^color:/.test(t)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(t))||/image/i.test(e)&&!(/^image:/.test(t)||/^[a-z-]+\(/.test(t))||/weight/i.test(e)&&!(/^(number|any):/.test(t)||/^\d+$/.test(t))||/position/i.test(e)&&/^(length|size):/.test(t)))return t.replace(/^[a-z-]+:/,"")}}function Uo(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function yt(t){return t.includes("url(")?t.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,r="",n,i="")=>yt(r)+n+yt(i)):t.replace(/(^|[^\\])_+/g,(e,r)=>r+" ".repeat(e.length-r.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,e=>e.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}function lr({presets:t=[],...e}){let r={darkMode:void 0,darkColor:void 0,preflight:e.preflight!==!1&&[],theme:{},variants:R(e.variants),rules:R(e.rules),ignorelist:R(e.ignorelist),hash:void 0,stringify:(n,i)=>n+":"+i,finalize:[]};for(let n of R([...t,{darkMode:e.darkMode,darkColor:e.darkColor,preflight:e.preflight!==!1&&R(e.preflight),theme:e.theme,hash:e.hash,stringify:e.stringify,finalize:e.finalize}])){let{preflight:i,darkMode:s=r.darkMode,darkColor:o=r.darkColor,theme:u,variants:a,rules:c,ignorelist:f,hash:p=r.hash,stringify:b=r.stringify,finalize:x}=typeof n=="function"?n(r):n;r={preflight:r.preflight!==!1&&i!==!1&&[...r.preflight,...R(i)],darkMode:s,darkColor:o,theme:{...r.theme,...u,extend:{...r.theme.extend,...u?.extend}},variants:[...r.variants,...R(a)],rules:[...r.rules,...R(c)],ignorelist:[...r.ignorelist,...R(f)],hash:p,stringify:b,finalize:[...r.finalize,...R(x)]}}return r}function Io(t,e,r,n,i,s){for(let o of e){let u=r.get(o);u||r.set(o,u=n(o));let a=u(t,i,s);if(a)return a}}function wu(t){var e;return Wi(t[0],typeof(e=t[1])=="function"?e:()=>e)}function bu(t){var e,r;return Array.isArray(t)?Wi(t[0],qi(t[1],t[2])):Wi(t,qi(e,r))}function Wi(t,e){return Vo(t,(r,n,i,s)=>{let o=n.exec(r);if(o)return o.$$=r.slice(o[0].length),o.dark=s,e(o,i)})}function Vo(t,e){let r=R(t).map(xu);return(n,i,s)=>{for(let o of r){let u=e(n,o,i,s);if(u)return u}}}function xu(t){return typeof t=="string"?RegExp("^"+t+(t.includes("$")||t.slice(-1)=="-"?"":"$")):t}function Fo(t,e){let r=lr(t),n=function({theme:a,darkMode:c,darkColor:f=dn,variants:p,rules:b,hash:x,stringify:k,ignorelist:_,finalize:M}){let j=new Map,$=new Map,A=new Map,I=new Map,H=Vo(_,(L,K)=>K.test(L));p.push(["dark",Array.isArray(c)||c=="class"?`${R(c)[1]||".dark"} &`:typeof c=="string"&&c!="media"?c:"@media (prefers-color-scheme:dark)"]);let z=typeof x=="function"?L=>x(L,cn):x?cn:Eo;z!==Eo&&M.push(L=>({...L,n:L.n&&z(L.n),d:L.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(K,re)=>"--"+z(re).replace("#",""))}));let J={theme:function({extend:L={},...K}){let re={},Si={get colors(){return ze("colors")},theme:ze,negative(){return{}},breakpoints(N){let Q={};for(let ie in N)typeof N[ie]=="string"&&(Q["screen-"+ie]=N[ie]);return Q}};return ze;function ze(N,Q,ie,Kt){if(N){if({1:N,2:Kt}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(N)||[,N],/[.[]/.test(N)){let $e=[];N.replace(/\[([^\]]+)\]|([^.[]+)/g,(Ze,Qt,Yl=Qt)=>$e.push(Yl)),N=$e.shift(),ie=Q,Q=$e.join("-")}let ve=re[N]||Object.assign(Object.assign(re[N]={},Kr(K,N)),Kr(L,N));if(Q==null)return ve;Q||(Q="DEFAULT");let We=ve[Q]??Q.split("-").reduce(($e,Ze)=>$e?.[Ze],ve)??ie;return Kt?ce(We,{opacityValue:Xi(Kt,ze)}):We}let Yt={};for(let ve of[...Object.keys(K),...Object.keys(L)])Yt[ve]=ze(ve);return Yt}function Kr(N,Q){let ie=N[Q];return typeof ie=="function"&&(ie=ie(Si)),ie&&/color|fill|stroke/i.test(Q)?function Kt(Yt,ve=[]){let We={};for(let $e in Yt){let Ze=Yt[$e],Qt=[...ve,$e];We[Qt.join("-")]=Ze,$e=="DEFAULT"&&(Qt=ve,We[ve.join("-")]=Ze),typeof Ze=="object"&&Object.assign(We,Kt(Ze,Qt))}return We}(ie):ie}}(a),e:To,h:z,s(L,K){return k(L,K,J)},d(L,K,re){return f(L,K,J,re)},v(L){return j.has(L)||j.set(L,Io(L,p,$,wu,J)||"&:"+L),j.get(L)},r(L,K){let re=JSON.stringify([L,K]);return A.has(re)||A.set(re,!H(L,J)&&Io(L,b,I,bu,J,K)),A.get(re)},f(L){return M.reduce((K,re)=>re(K,J),L)}};return J}(r),i=new Map,s=[],o=new Set;e.resume(a=>i.set(a,a),(a,c)=>{e.insert(a,s.length,c),s.push(c),o.add(a)});function u(a){let c=n.f(a),f=Bi(c);if(f&&!o.has(f)){o.add(f);let p=jo(s,a);e.insert(f,p,a),s.splice(p,0,a)}return c.n}return Object.defineProperties(function(c){if(!i.size)for(let p of R(r.preflight))typeof p=="function"&&(p=p(n)),p&&(typeof p=="string"?Ji("",W.b,fn(p),n,W.b,[],!1,!0):Ro(p,{},n,W.b)).forEach(u);c=""+c;let f=i.get(c);if(!f){let p=new Set;for(let b of pn(fn(c),n))p.add(b.c).add(u(b));f=[...p].filter(Boolean).join(" "),i.set(c,f).set(f,f)}return f},Object.getOwnPropertyDescriptors({get target(){return e.target},theme:n.theme,config:r,snapshot(){let a=e.snapshot(),c=new Set(o),f=new Map(i),p=[...s];return()=>{a(),o=c,i=f,s=p}},clear(){e.clear(),o=new Set,i=new Map,s=[]},destroy(){this.clear(),e.destroy()}}))}function ku(t,e){return t!=e&&""+t.split(" ").sort()!=""+e.split(" ").sort()}function Ho(t){let e=new MutationObserver(r);return{observe(i){e.observe(i,{attributeFilter:["class"],subtree:!0,childList:!0}),n(i),r([{target:i,type:""}])},disconnect(){e.disconnect()}};function r(i){for(let{type:s,target:o}of i)if(s[0]=="a")n(o);else for(let u of o.querySelectorAll("[class]"))n(u);e.takeRecords()}function n(i){let s,o=i.getAttribute?.("class");o&&ku(o,s=t(o))&&i.setAttribute("class",s)}}function Cu(t){let e=document.querySelector(t||'style[data-twind=""]');return(!e||e.tagName!="STYLE")&&(e=document.createElement("style"),document.head.prepend(e)),e.dataset.twind="claimed",e}function mn(t){let e=t?.cssRules?t:(t&&typeof t!="string"?t:Cu(t)).sheet;return{target:e,snapshot(){let r=Array.from(e.cssRules,n=>n.cssText);return()=>{this.clear(),r.forEach(this.insert)}},clear(){for(let r=e.cssRules.length;r--;)e.deleteRule(r)},destroy(){e.ownerNode?.remove()},insert(r,n){try{e.insertRule(r,n)}catch{e.insertRule(":root{}",n)}},resume:dn}}var $u=new Map([["align-self","-ms-grid-row-align"],["color-adjust","-webkit-print-color-adjust"],["column-gap","grid-column-gap"],["forced-color-adjust","-ms-high-contrast-adjust"],["gap","grid-gap"],["grid-template-columns","-ms-grid-columns"],["grid-template-rows","-ms-grid-rows"],["justify-self","-ms-grid-column-align"],["margin-inline-end","-webkit-margin-end"],["margin-inline-start","-webkit-margin-start"],["mask-border","-webkit-mask-box-image"],["mask-border-outset","-webkit-mask-box-image-outset"],["mask-border-slice","-webkit-mask-box-image-slice"],["mask-border-source","-webkit-mask-box-image-source"],["mask-border-repeat","-webkit-mask-box-image-repeat"],["mask-border-width","-webkit-mask-box-image-width"],["overflow-wrap","word-wrap"],["padding-inline-end","-webkit-padding-end"],["padding-inline-start","-webkit-padding-start"],["print-color-adjust","color-adjust"],["row-gap","grid-row-gap"],["scroll-margin-bottom","scroll-snap-margin-bottom"],["scroll-margin-left","scroll-snap-margin-left"],["scroll-margin-right","scroll-snap-margin-right"],["scroll-margin-top","scroll-snap-margin-top"],["scroll-margin","scroll-snap-margin"],["text-combine-upright","-ms-text-combine-horizontal"]]);function No(t){return $u.get(t)}function Bo(t){var e=/^(?:(text-(?:decoration$|e|or|si)|back(?:ground-cl|d|f)|box-d|mask(?:$|-[ispro]|-cl)|pr|hyphena|flex-d)|(tab-|column(?!-s)|text-align-l)|(ap)|u|hy)/i.exec(t);return e?e[1]?1:e[2]?2:e[3]?3:5:0}function qo(t,e){var r=/^(?:(pos)|(cli)|(background-i)|(flex(?:$|-b)|(?:max-|min-)?(?:block-s|inl|he|widt))|dis)/i.exec(t);return r?r[1]?/^sti/i.test(e)?1:0:r[2]?/^pat/i.test(e)?1:0:r[3]?/^image-/i.test(e)?1:0:r[4]?e[3]==="-"?2:0:/^(?:inline-)?grid$/i.test(e)?4:0:0}var Eu=[["-webkit-",1],["-moz-",2],["-ms-",4]];function gn(){return({stringify:t})=>({stringify(e,r,n){let i="",s=No(e);s&&(i+=t(s,r,n)+";");let o=Bo(e),u=qo(e,r);for(let a of Eu)o&a[1]&&(i+=t(a[0]+e,r,n)+";"),u&a[1]&&(i+=t(e,a[0]+r,n)+";");return i+t(e,r,n)}})}function yn(){return{rules:[["line-clamp-none",{"-webkit-line-clamp":"unset"}],["line-clamp-",Ki("lineClamp",({_:t})=>zo(t))],["line-clamp-(\\d+)",({1:t})=>zo(t)]]}}function zo(t){return{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":`${t}`}}var cr={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",...se(4,"rem",4,.5,.5),...se(12,"rem",4,5),14:"3.5rem",...se(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:O("blur"),backdropBrightness:O("brightness"),backdropContrast:O("contrast"),backdropGrayscale:O("grayscale"),backdropHueRotate:O("hueRotate"),backdropInvert:O("invert"),backdropOpacity:O("opacity"),backdropSaturate:O("saturate"),backdropSepia:O("sepia"),backgroundColor:O("colors"),backgroundImage:{none:"none"},backgroundOpacity:O("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{...se(200,"",100,0,50),...se(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:t})=>({DEFAULT:t("colors.gray.200","currentColor"),...t("colors")}),borderOpacity:O("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:O("spacing"),borderWidth:{DEFAULT:"1px",...pe(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:O("colors"),caretColor:O("colors"),accentColor:({theme:t})=>({auto:"auto",...t("colors")}),contrast:{...se(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:O("borderColor"),divideOpacity:O("borderOpacity"),divideWidth:O("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:t})=>({...t("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:t})=>({...t("spacing"),...ur(2,6),...ur(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:O("spacing"),gradientColorStops:O("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:t})=>({...t("spacing"),...ur(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:t})=>({...t("spacing"),...ur(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{...se(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:t})=>({auto:"auto",...t("spacing")}),maxHeight:({theme:t})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...t("spacing")}),maxWidth:({theme:t,breakpoints:e})=>({...e(t("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{...se(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:O("spacing"),placeholderColor:O("colors"),placeholderOpacity:O("opacity"),outlineColor:O("colors"),outlineOffset:pe(8,"px"),outlineWidth:pe(8,"px"),ringColor:({theme:t})=>({...t("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:O("colors"),ringOffsetWidth:pe(8,"px"),ringOpacity:({theme:t})=>({...t("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...pe(8,"px")},rotate:{...pe(2,"deg"),...pe(12,"deg",3),...pe(180,"deg",45)},saturate:se(200,"",100,0,50),scale:{...se(150,"",100,0,50),...se(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:O("spacing"),scrollPadding:O("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...pe(2,"deg"),...pe(12,"deg",3)},space:O("spacing"),stroke:({theme:t})=>({...t("colors"),none:"none"}),strokeWidth:se(2),textColor:O("colors"),textDecorationColor:O("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...pe(8,"px")},textUnderlineOffset:{auto:"auto",...pe(8,"px")},textIndent:O("spacing"),textOpacity:O("opacity"),transitionDuration:({theme:t})=>({...t("durations"),DEFAULT:"150ms"}),transitionDelay:O("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:t})=>({...t("spacing"),...ur(2,4),full:"100%"}),width:({theme:t})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...t("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...se(50,"",1,0,10),auto:"auto"}};function ur(t,e){let r={};do for(var n=1;n<t;n++)r[`${n}/${t}`]=Number((n/t*100).toFixed(6))+"%";while(++t<=e);return r}function pe(t,e,r=0){let n={};for(;r<=t;r=2*r||1)n[r]=r+e;return n}function se(t,e="",r=1,n=0,i=1,s={}){for(;n<=t;n+=i)s[n]=n/r+e;return s}function O(t){return({theme:e})=>e(t)}var Wo={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${cr.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${cr.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}};var Yo=[y("\\[([-\\w]+):(.+)]",({1:t,2:e},r)=>({"@layer overrides":{"&":{[t]:we(`[${e}]`,"",r)}}})),y("(group|peer)([~/][^-[]+)?",({input:t},{h:e})=>[{c:e(t)}]),v("aspect-","aspectRatio"),y("container",(t,{theme:e})=>{let{screens:r=e("screens"),center:n,padding:i}=e("container"),s={width:"100%",marginRight:n&&"auto",marginLeft:n&&"auto",...o("xs")};for(let u in r){let a=r[u];typeof a=="string"&&(s[hn(a)]={"&":{maxWidth:a,...o(u)}})}return s;function o(u){let a=i&&(typeof i=="string"?i:i[u]||i.DEFAULT);if(a)return{paddingRight:a,paddingLeft:a}}}),v("content-","content",({_:t})=>({"--tw-content":t,content:"var(--tw-content)"})),y("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),y("box-(border|content)","boxSizing",({1:t})=>t+"-box"),y("hidden",{display:"none"}),y("table-(auto|fixed)","tableLayout"),y(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",y("isolate","isolation"),y("object-(contain|cover|fill|none|scale-down)","objectFit"),v("object-","objectPosition"),y("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",vn),y("overscroll(-[xy])?-(auto|contain|none)",({1:t="",2:e})=>({["overscroll-behavior"+t]:e})),y("(static|fixed|absolute|relative|sticky)","position"),v("-?inset(-[xy])?(?:$|-)","inset",({1:t,_:e})=>({top:t!="-x"&&e,right:t!="-y"&&e,bottom:t!="-x"&&e,left:t!="-y"&&e})),v("-?(top|bottom|left|right)(?:$|-)","inset"),y("(visible|collapse)","visibility"),y("invisible",{visibility:"hidden"}),v("-?z-","zIndex"),y("flex-((row|col)(-reverse)?)","flexDirection",Zo),y("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),v("(flex-(?:grow|shrink))(?:$|-)"),v("(flex)-"),v("grow(?:$|-)","flexGrow"),v("shrink(?:$|-)","flexShrink"),v("basis-","flexBasis"),v("-?(order)-"),"-?(order)-(\\d+)",v("grid-cols-","gridTemplateColumns"),y("grid-cols-(\\d+)","gridTemplateColumns",Ko),v("col-","gridColumn"),y("col-(span)-(\\d+)","gridColumn",Jo),v("col-start-","gridColumnStart"),y("col-start-(auto|\\d+)","gridColumnStart"),v("col-end-","gridColumnEnd"),y("col-end-(auto|\\d+)","gridColumnEnd"),v("grid-rows-","gridTemplateRows"),y("grid-rows-(\\d+)","gridTemplateRows",Ko),v("row-","gridRow"),y("row-(span)-(\\d+)","gridRow",Jo),v("row-start-","gridRowStart"),y("row-start-(auto|\\d+)","gridRowStart"),v("row-end-","gridRowEnd"),y("row-end-(auto|\\d+)","gridRowEnd"),y("grid-flow-((row|col)(-dense)?)","gridAutoFlow",t=>vn(Zo(t))),y("grid-flow-(dense)","gridAutoFlow"),v("auto-cols-","gridAutoColumns"),v("auto-rows-","gridAutoRows"),v("gap-x(?:$|-)","gap","columnGap"),v("gap-y(?:$|-)","gap","rowGap"),v("gap(?:$|-)","gap"),"(justify-(?:items|self))-",y("justify-","justifyContent",Go),y("(content|items|self)-",t=>({["align-"+t[1]]:Go(t)})),y("(place-(content|items|self))-",({1:t,$$:e})=>({[t]:("wun".includes(e[3])?"space-":"")+e})),v("p([xytrbl])?(?:$|-)","padding",vt("padding")),v("-?m([xytrbl])?(?:$|-)","margin",vt("margin")),v("-?space-(x|y)(?:$|-)","space",({1:t,_:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[t]]:`calc(${e} * calc(1 - var(--tw-space-${t}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[t]]:`calc(${e} * var(--tw-space-${t}-reverse))`}})),y("space-(x|y)-reverse",({1:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"1"}})),v("w-","width"),v("min-w-","minWidth"),v("max-w-","maxWidth"),v("h-","height"),v("min-h-","minHeight"),v("max-h-","maxHeight"),v("font-","fontWeight"),v("font-","fontFamily",({_:t})=>typeof(t=R(t))[1]=="string"?{fontFamily:de(t)}:{fontFamily:de(t[0]),...t[1]}),y("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),y("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),y("italic","fontStyle"),y("not-italic",{fontStyle:"normal"}),y("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:t,2:e="",3:r})=>e=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(r?"numeric-fraction":"pt".includes(e[0])?"numeric-spacing":e?"numeric-figure":t)]:t,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...je({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),v("tracking-","letterSpacing"),v("leading-","lineHeight"),y("list-(inside|outside)","listStylePosition"),v("list-","listStyleType"),y("list-","listStyleType"),v("placeholder-opacity-","placeholderOpacity",({_:t})=>({"&::placeholder":{"--tw-placeholder-opacity":t}})),Z("placeholder-",{property:"color",selector:"&::placeholder"}),y("text-(left|center|right|justify|start|end)","textAlign"),y("text-(ellipsis|clip)","textOverflow"),v("text-opacity-","textOpacity","--tw-text-opacity"),Z("text-",{property:"color"}),v("text-","fontSize",({_:t})=>typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}),v("indent-","textIndent"),y("(overline|underline|line-through)","textDecorationLine"),y("no-underline",{textDecorationLine:"none"}),v("underline-offset-","textUnderlineOffset"),Z("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),v("decoration-","textDecorationThickness"),y("decoration-","textDecorationStyle"),y("(uppercase|lowercase|capitalize)","textTransform"),y("normal-case",{textTransform:"none"}),y("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),y("align-","verticalAlign"),y("whitespace-","whiteSpace"),y("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),y("break-words",{overflowWrap:"break-word"}),y("break-all",{wordBreak:"break-all"}),y("break-keep",{wordBreak:"keep-all"}),Z("caret-",{opacityVariable:!1,opacitySection:"opacity"}),Z("accent-",{opacityVariable:!1,opacitySection:"opacity"}),y("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:t})=>`linear-gradient(to ${Qe(t," ")},var(--tw-gradient-stops))`),Z("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-from":t.value,"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),Z("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${t.value},var(--tw-gradient-to)`})),Z("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),y("bg-(fixed|local|scroll)","backgroundAttachment"),y("bg-origin-(border|padding|content)","backgroundOrigin",({1:t})=>t+"-box"),y(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),y("bg-blend-","backgroundBlendMode"),y("bg-clip-(border|padding|content|text)","backgroundClip",({1:t})=>t+(t=="text"?"":"-box")),v("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),Z("bg-",{section:"backgroundColor"}),v("bg-","backgroundImage"),v("bg-","backgroundPosition"),y("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",vn),v("bg-","backgroundSize"),v("rounded(?:$|-)","borderRadius"),v("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:t,_:e})=>{let r={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[t]||[t,t];return{[`border-${Qe(r[0])}-radius`]:e,[`border-${Qe(r[1])}-radius`]:e}}),y("border-(collapse|separate)","borderCollapse"),v("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),y("border-(solid|dashed|dotted|double|none)","borderStyle"),v("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:t,_:e})=>({...je({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(t||"-x")]:e,["--tw-border-spacing"+(t||"-y")]:e,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),Z("border-([xytrbl])-",{section:"borderColor"},vt("border","Color")),Z("border-"),v("border-([xytrbl])(?:$|-)","borderWidth",vt("border","Width")),v("border(?:$|-)","borderWidth"),v("divide-opacity(?:$|-)","divideOpacity",({_:t})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":t}})),y("divide-(solid|dashed|dotted|double|none)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:t}})),y("divide-([xy]-reverse)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+t]:"1"}})),v("divide-([xy])(?:$|-)","divideWidth",({1:t,_:e})=>{let r={x:"lr",y:"tb"}[t];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${t}-reverse`]:"0",[`border-${Qe(r[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${t}-reverse)))`,[`border-${Qe(r[1])}Width`]:`calc(${e} * var(--tw-divide-${t}-reverse))`}}}),Z("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),v("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),Z("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),v("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),y("ring-inset",{"--tw-ring-inset":"inset"}),Z("ring-",{property:"--tw-ring-color"}),v("ring(?:$|-)","ringWidth",({_:t},{theme:e})=>({...je({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":e("ringOffsetWidth","","0px"),"--tw-ring-offset-color":ce(e("ringOffsetColor","","#fff")),"--tw-ring-color":ce(e("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":e("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${t} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),Z("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-shadow-color":t.value,"--tw-shadow":"var(--tw-shadow-colored)"})),v("shadow(?:$|-)","boxShadow",({_:t})=>({...je({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":de(t),"--tw-shadow-colored":de(t).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),v("(opacity)-"),y("mix-blend-","mixBlendMode"),...Xo(),...Xo("backdrop-"),v("transition(?:$|-)","transitionProperty",(t,{theme:e})=>({transitionProperty:de(t),transitionTimingFunction:t._=="none"?void 0:de(e("transitionTimingFunction","")),transitionDuration:t._=="none"?void 0:de(e("transitionDuration",""))})),v("duration(?:$|-)","transitionDuration","transitionDuration",de),v("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",de),v("delay(?:$|-)","transitionDelay","transitionDelay",de),v("animate(?:$|-)","animation",(t,{theme:e,h:r,e:n})=>{let i=de(t),s=i.split(" "),o=e("keyframes",s[0]);return o?{["@keyframes "+(s[0]=n(r(s[0])))]:o,animation:s.join(" ")}:{animation:i}}),"(transform)-(none)",y("transform",Qi),y("transform-(cpu|gpu)",({1:t})=>({"--tw-transform":Qo(t=="gpu")})),v("scale(-[xy])?-","scale",({1:t,_:e})=>({["--tw-scale"+(t||"-x")]:e,["--tw-scale"+(t||"-y")]:e,...Qi()})),v("-?(rotate)-","rotate",Yi),v("-?(translate-[xy])-","translate",Yi),v("-?(skew-[xy])-","skew",Yi),y("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",vn),"(appearance)-",v("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",v("(cursor)-"),"(cursor)-",y("snap-(none)","scroll-snap-type"),y("snap-(x|y|both)",({1:t})=>({...je({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":t+" var(--tw-scroll-snap-strictness)"})),y("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),y("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),y("snap-(normal|always)","scroll-snap-stop"),y("scroll-(auto|smooth)","scroll-behavior"),v("scroll-p([xytrbl])?(?:$|-)","padding",vt("scroll-padding")),v("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",vt("scroll-margin")),y("touch-(auto|none|manipulation)","touch-action"),y("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:t,2:e,3:r})=>({...je({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${e?"pan-x":r?"pan-y":t}`]:t,"touch-action":"var(--tw-touch-action)"})),y("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),y("outline",{outlineStyle:"solid"}),y("outline-(dashed|dotted|double)","outlineStyle"),v("-?(outline-offset)-"),Z("outline-",{opacityVariable:!1,opacitySection:"opacity"}),v("outline-","outlineWidth"),"(pointer-events)-",v("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:t})=>({x:"horizontal",y:"vertical"})[t]||t||"both"],y("select-(none|text|all|auto)","userSelect"),Z("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),Z("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),v("stroke-","strokeWidth"),y("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),y("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function vn(t){return(typeof t=="string"?t:t[1]).replace(/-/g," ").trim()}function Zo(t){return(typeof t=="string"?t:t[1]).replace("col","column")}function Qe(t,e="-"){let r=[];for(let n of t)r.push({t:"top",r:"right",b:"bottom",l:"left"}[n]);return r.join(e)}function de(t){return t&&""+(t._||t)}function Go({$$:t}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[t[3]||""]||"")+t}function vt(t,e=""){return({1:r,_:n})=>{let i={x:"lr",y:"tb"}[r]||r+r;return i?{...ar(t+"-"+Qe(i[0])+e,n),...ar(t+"-"+Qe(i[1])+e,n)}:ar(t+e,n)}}function Xo(t=""){let e=["blur","brightness","contrast","grayscale","hue-rotate","invert",t&&"opacity","saturate","sepia",!t&&"drop-shadow"].filter(Boolean),r={};for(let n of e)r[`--tw-${t}${n}`]="var(--tw-empty,/*!*/ /*!*/)";return r={...je(r),[`${t}filter`]:e.map(n=>`var(--tw-${t}${n})`).join(" ")},[`(${t}filter)-(none)`,y(`${t}filter`,r),...e.map(n=>v(`${n[0]=="h"?"-?":""}(${t}${n})(?:$|-)`,n,({1:i,_:s})=>({[`--tw-${i}`]:R(s).map(o=>`${n}(${o})`).join(" "),...r})))]}function Yi({1:t,_:e}){return{["--tw-"+t]:e,...Qi()}}function Qi(){return{...je({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":Qo()}),transform:"var(--tw-transform)"}}function Qo(t){return[t?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function Jo({1:t,2:e}){return`${t} ${e} / ${t} ${e}`}function Ko({1:t}){return`repeat(${t},minmax(0,1fr))`}function je(t){return{"@layer defaults":{"*,::before,::after":t,"::backdrop":t}}}var ea=[["sticky","@supports ((position: -webkit-sticky) or (position:sticky))"],["motion-reduce","@media (prefers-reduced-motion:reduce)"],["motion-safe","@media (prefers-reduced-motion:no-preference)"],["print","@media print"],["(portrait|landscape)",({1:t})=>`@media (orientation:${t})`],["contrast-(more|less)",({1:t})=>`@media (prefers-contrast:${t})`],["(first-(letter|line)|placeholder|backdrop|before|after)",({1:t})=>`&::${t}`],["(marker|selection)",({1:t})=>`& *::${t},&::${t}`],["file","&::file-selector-button"],["(first|last|only)",({1:t})=>`&:${t}-child`],["even","&:nth-child(2n)"],["odd","&:nth-child(odd)"],["open","&[open]"],["(aria|data)-",({1:t,$$:e},r)=>e&&`&[${t}-${r.theme(t,e)||we(e,"",r)||`${e}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:t,3:e="",4:r,5:n="",6:i=e},{e:s,h:o,v:u})=>{let a=yt(n)||(r[0]=="["?r:u(r.slice(1)));return`${(a.includes("&")?a:"&"+a).replace(/&/g,`:merge(.${s(o(t+i))})`)}${t[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:t})=>`[dir="${t}"] &`],["supports-",({$$:t},e)=>{if(t&&(t=e.theme("supports",t)||we(t,"",e)),t)return t.includes(":")||(t+=":var(--tw)"),/^\w*\s*\(/.test(t)||(t=`(${t})`),`@supports ${t.replace(/\b(and|or|not)\b/g," $1 ").trim()}`}],["max-",({$$:t},e)=>{if(t&&(t=e.theme("screens",t)||we(t,"",e)),typeof t=="string")return`@media not all and (min-width:${t})`}],["min-",({$$:t},e)=>(t&&(t=we(t,"",e)),t&&`@media (min-width:${t})`)],[/^\[(.+)]$/,({1:t})=>/[&@]/.test(t)&&yt(t).replace(/[}]+$/,"").split("{")]];function ta({colors:t,disablePreflight:e}={}){return{preflight:e?void 0:Wo,theme:{...cr,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...t}},variants:ea,rules:Yo,finalize(r){return r.n&&r.d&&r.r.some(n=>/^&::(before|after)$/.test(n))&&!/(^|;)content:/.test(r.d)?{...r,d:"content:var(--tw-content);"+r.d}:r}}}var Su={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},_u={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},Au={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},Mu={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},Iu={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},Tu={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},Ou={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},Lu={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},ju={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},Du={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},Ru={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},Pu={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},Uu={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},Vu={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},Fu={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},Hu={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},Nu={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},Bu={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},qu={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},zu={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},Wu={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},Zu={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},ra={__proto__:null,slate:Su,gray:_u,zinc:Au,neutral:Mu,stone:Iu,red:Tu,orange:Ou,amber:Lu,yellow:ju,lime:Du,green:Ru,emerald:Pu,teal:Uu,cyan:Vu,sky:Fu,blue:Hu,indigo:Nu,violet:Bu,purple:qu,fuchsia:zu,pink:Wu,rose:Zu};function wn({disablePreflight:t}={}){return ta({colors:ra,disablePreflight:t})}function bn({className:t="prose",defaultColor:e="gray",extend:r={},colors:n={}}={}){return n={body:"700",headings:"900",lead:"600",links:"900",bold:"900",counters:"500",bullets:"300",hr:"200",quotes:"900","quote-borders":"200",captions:"500",code:"900","pre-code":"200","pre-bg":"800","th-borders":"300","td-borders":"200",...n,dark:n.dark===null?null:{body:"300",headings:"#fff",lead:"400",links:"#fff",bold:"#fff",counters:"400",bullets:"600",hr:"700",quotes:"100","quote-borders":"700",captions:"400",code:"#fff","pre-code":"300","pre-bg":"rgb(0 0 0 / 50%)","th-borders":"600","td-borders":"700",...n.dark}},{variants:[["headings","h1,h2,h3,h4,h5,h6,th"],["h1"],["h2"],["h3"],["h4"],["h5"],["h6"],["p"],["a"],["blockquote"],["figure"],["figcaption"],["strong"],["em"],["code"],["pre"],["ol"],["ul"],["li"],["table"],["thead"],["tr"],["th"],["td"],["img"],["video"],["hr"],["lead",".lead"]].map(([s,o=s])=>[`${t}-${s}`,(u,a)=>sa(t,o[0]=="."?"."+a.e(a.h(o.slice(1))):o,a,c=>`& :is(${c.trim()})`)]),rules:[[`(lead|not-${t})`,({1:s},{h:o})=>[{c:o(s)}]],[`${t}-invert`,{"@layer base":{"--tw-prose-body":"var(--tw-prose-invert-body)","--tw-prose-headings":"var(--tw-prose-invert-headings)","--tw-prose-lead":"var(--tw-prose-invert-lead)","--tw-prose-links":"var(--tw-prose-invert-links)","--tw-prose-bold":"var(--tw-prose-invert-bold)","--tw-prose-counters":"var(--tw-prose-invert-counters)","--tw-prose-bullets":"var(--tw-prose-invert-bullets)","--tw-prose-hr":"var(--tw-prose-invert-hr)","--tw-prose-quotes":"var(--tw-prose-invert-quotes)","--tw-prose-quote-borders":"var(--tw-prose-invert-quote-borders)","--tw-prose-captions":"var(--tw-prose-invert-captions)","--tw-prose-code":"var(--tw-prose-invert-code)","--tw-prose-pre-code":"var(--tw-prose-invert-pre-code)","--tw-prose-pre-bg":"var(--tw-prose-invert-pre-bg)","--tw-prose-th-borders":"var(--tw-prose-invert-th-borders)","--tw-prose-td-borders":"var(--tw-prose-invert-td-borders)"}}],[t+"-",({$$:s},o)=>{let u=ia(o.theme("fontSize",s));return u&&{"@layer components":u}}],[t+"-",({$$:s},o)=>i(s,o)],[t,(s,o)=>({...i(e,o),"@layer base":[na(t,o,{a:{color:"var(--tw-prose-links)",textDecorationLine:"underline",fontWeight:"500"},strong:{color:"var(--tw-prose-bold)",fontWeight:"600"},"a strong,blockquote strong,thead th strong":{color:"inherit"},ul:{listStyleType:"disc"},ol:{listStyleType:"decimal"},'ol[type="A"]':{listStyleType:"upper-alpha"},'ol[type="a"]':{listStyleType:"lower-alpha"},'ol[type="A" s]':{listStyleType:"upper-alpha"},'ol[type="a" s]':{listStyleType:"lower-alpha"},'ol[type="I"]':{listStyleType:"upper-roman"},'ol[type="i"]':{listStyleType:"lower-roman"},'ol[type="I" s]':{listStyleType:"upper-roman"},'ol[type="i" s]':{listStyleType:"lower-roman"},'ol[type="1"]':{listStyleType:"decimal"},"ol,ul":{marginTop:C(20,16),marginBottom:C(20,16),paddingLeft:C(26,16)},li:{marginTop:C(8,16),marginBottom:C(8,16)},"ol>li,ul>li":{paddingLeft:C(6,16)},">ul>li p":{marginTop:C(12,16),marginBottom:C(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:C(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:C(20,16)},"ol>li::marker":{fontWeight:"400",color:"var(--tw-prose-counters)"},"ul>li::marker":{color:"var(--tw-prose-bullets)"},"ul ul,ul ol,ol ul,ol ol":{marginTop:C(12,16),marginBottom:C(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:C(48,16),marginBottom:C(48,16)},blockquote:{marginTop:C(32,20),marginBottom:C(32,20),paddingLeft:C(20,20),fontWeight:"500",fontStyle:"italic",color:"var(--tw-prose-quotes)",borderLeftWidth:"0.25rem",borderLeftColor:"var(--tw-prose-quote-borders)",quotes:'"\\201C""\\201D""\\2018""\\2019"'},"blockquote p:first-of-type::before":{content:"open-quote"},"blockquote p:last-of-type::after":{content:"close-quote"},p:{marginTop:C(20,16),marginBottom:C(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:C(36,16),marginTop:"0",marginBottom:C(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900",color:"inherit"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:C(24,16),marginTop:C(48,24),marginBottom:C(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800",color:"inherit"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:C(20,16),marginTop:C(32,20),marginBottom:C(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700",color:"inherit"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:C(24,16),marginBottom:C(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700",color:"inherit"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:C(32,16),marginBottom:C(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:C(14,16),lineHeight:"1.4",marginTop:C(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:C(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:C(21,24)},"h3 code":{fontSize:C(18,20)},"a code,h1 code,h2 code,h3 code,h4 code,blockquote code,thead th code":{color:"inherit"},pre:{color:"var(--tw-prose-pre-code)",backgroundColor:"var(--tw-prose-pre-bg)",overflowX:"auto",fontWeight:"400",fontSize:C(14,16),lineHeight:"1.7",marginTop:C(24,14),marginBottom:C(24,14),borderRadius:"0.375rem",paddingTop:C(12,14),paddingRight:C(16,14),paddingBottom:C(12,14),paddingLeft:C(16,14)},"pre code":{backgroundColor:"transparent",borderWidth:"0",borderRadius:"0",padding:"0",fontWeight:"inherit",color:"inherit",fontSize:"inherit",fontFamily:"inherit",lineHeight:"inherit"},"pre code::before":{content:"none"},"pre code::after":{content:"none"},table:{width:"100%",tableLayout:"auto",textAlign:"left",marginTop:C(32,16),marginBottom:C(32,16),fontSize:C(14,16),lineHeight:"1.7"},thead:{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-th-borders)"},"thead th":{color:"var(--tw-prose-headings)",fontWeight:"600",verticalAlign:"bottom",paddingRight:C(8,14),paddingBottom:C(8,14),paddingLeft:C(8,14)},"thead th:first-child":{paddingLeft:"0"},"thead th:last-child":{paddingRight:"0"},"tbody tr":{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-td-borders)"},"tbody tr:last-child":{borderBottomWidth:"0"},"tbody td,tfoot td":{verticalAlign:"baseline",paddingTop:C(8,14),paddingRight:C(8,14),paddingBottom:C(8,14),paddingLeft:C(8,14)},"tbody td:first-child,tfoot td:first-child":{paddingLeft:"0"},"tbody td:last-child,tfoot td:last-child":{paddingRight:"0"},[`.${o.e(o.h("lead"))}`]:{color:"var(--tw-prose-lead)",fontSize:C(20,16),lineHeight:"1.6",marginTop:C(24,20),marginBottom:C(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),na(t,o,r)],"@layer components":{...ia(o.theme("fontSize","base")),color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"}})]]};function i(s,o){let u={},a={},c=(f,p,b)=>{let x=o.theme(`colors.${s}.${p}`,p);b["--tw-prose-"+f]=ce(x);let k=b!=a&&o.d("colors",`${s}-${p}`,x);k&&(a["--tw-prose-"+f]=ce(k))};for(let f in n){let p=n[f];f!="dark"&&p&&c(f,p,u)}for(let f in n.dark||{}){let p=n.dark[f];p&&(n.dark?c("invert-"+f,p,u):c(f,p,a))}return Object.keys(u).length?{"@layer defaults":{"&":u,[o.v("dark")]:a}}:void 0}}function na(t,e,r){let n={};for(let i in r)n[sa(t,i,e,s=>`.${e.e(e.h(t))}${s}`)]=r[i];return n}function sa(t,e,{e:r,h:n},i){return e.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(s,o=" ",u=s,a="")=>i(`${o}:where(${u}):not(:where(.${r(n("not-"+t))} *))${a}`))}function ia(t){return t?typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}:void 0}function C(t,e){return`${(t/e).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}var es=lr({hash:!1,darkMode:"class",theme:{extend:{colors:{violet:{DEFAULT:"#601feb",50:"#f3f2ff",100:"#eae7ff",200:"#d7d2ff",300:"#baaeff",400:"#9980ff",500:"#784dff",600:"#6829fe",700:"#601feb",800:"#4b12c5",900:"#3f11a1",950:"#25086d"},pink:{DEFAULT:"#ff0bbb",50:"#fff0fc",100:"#ffe3fc",200:"#ffc6f9",300:"#ff98f2",400:"#ff58e5",500:"#ff27d5",600:"#ff0bbb",700:"#df0095",800:"#b8007b",900:"#980368",950:"#5f003b"},lime:{DEFAULT:"#b9e901",50:"#fdffe4",100:"#f9ffc5",200:"#f1ff92",300:"#e2ff54",400:"#d1fa21",500:"#b9e901",600:"#8ab400",700:"#688902",800:"#526b09",900:"#465a0d",950:"#243300"}},spacing:{px:"1px",0:"0",.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px"},padding:{px:"1px",0:"0",.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px"},lineHeight:{3:"12px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px"},maxWidth:{xs:"320px",sm:"384px",md:"448px",lg:"512px",xl:"576px","2xl":"672px","3xl":"768px","4xl":"896px","5xl":"1024px","6xl":"1152px","7xl":"1280px"},maxHeight:{.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px"},borderRadius:{sm:"2px",DEFAULT:"4px",md:"6px",lg:"8px",xl:"12px","2xl":"16px","3xl":"24px"},fontSize:{xs:["12px","16px"],sm:["14px","20px"],base:["16px","24px"],lg:["18px","28px"],xl:["20px","28px"],"2xl":["24px","32px"],"3xl":["30px","36px"],"4xl":["36px","40px"],"5xl":["48px","1"],"6xl":["60px","1"],"7xl":["72px","1"],"8xl":["96px","1"],"9xl":["128px","1"]}}},presets:[wn(),gn(),yn(),bn()]});function xn(t,e=!0){let r=function(){if(Gu)try{let a=mn(new CSSStyleSheet);return a.connect=c=>{let f=ts(c);f.adoptedStyleSheets=[...f.adoptedStyleSheets,a.target]},a.disconnect=dn,a}catch{}let s=document.createElement("style");s.media="not all",document.head.prepend(s);let o=[mn(s)],u=new WeakMap;return{get target(){return o[0].target},snapshot(){let a=o.map(c=>c.snapshot());return()=>a.forEach(c=>c())},clear(){o.forEach(a=>a.clear())},destroy(){o.forEach(a=>a.destroy())},insert(a,c,f){o[0].insert(a,c,f);let p=this.target.cssRules[c];o.forEach((b,x)=>x&&b.target.insertRule(p.cssText,c))},resume(a,c){return o[0].resume(a,c)},connect(a){let c=document.createElement("style");ts(a).appendChild(c);let f=mn(c),{cssRules:p}=this.target;for(let b=0;b<p.length;b++)f.target.insertRule(p[b].cssText,b);o.push(f),u.set(a,f)},disconnect(a){let c=o.indexOf(u.get(a));c>=0&&o.splice(c,1)}}}(),n=Fo({...t,hash:t.hash??e},r),i=Ho(n);return function(o){return class extends o{connectedCallback(){super.connectedCallback?.(),r.connect(this),i.observe(ts(this))}disconnectedCallback(){r.disconnect(this),super.disconnectedCallback?.()}constructor(...a){super(...a),this.tw=n}}}}var Gu=typeof ShadowRoot<"u"&&(typeof ShadyCSS>"u"||ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;function ts(t){return t.shadowRoot||t.attachShadow({mode:"open"})}var T=t=>xn(es)(t);var kn=class extends T(S){constructor(){super();w(this,"render",()=>h`
105
115
  <!-- we want the transform transition on the root element so that both the transform transition and state switch transition are continuous and fluid -->
106
116
  <!-- the background color is set on the root button so that when we cross fade between the open/close states there's no white flicker -->
107
117
  <button class="leading-0 relative inline-block h-14 w-14 overflow-hidden rounded-full bg-slate-800 text-sm text-white shadow-xl transition-transform hover:scale-105 active:scale-90">
108
118
  <!-- the 'open' state invites the user to open (e.g. the chat window) -->
109
119
  <div class="${this.state==="open"?"visible opacity-100":"invisible opacity-0"} absolute bottom-0 left-0 right-0 top-0 transition-[opacity,visibility]">
110
- ${this.src?y`
120
+ ${this.src?h`
111
121
  <!-- load given source -->
112
122
  <!-- scale-[1.01] fixes aliasing (white outline) -->
113
123
  <img class="block h-full w-full scale-[1.01] bg-white" src="${this.src}" alt="Molin AI chat" />
114
- `:y`
124
+ `:h`
115
125
  <!-- if no image URL is specified, we default to our animation -->
116
126
  <!-- scale-[1.01] fixes aliasing (white outline) -->
117
127
  <img src="https://assets.molinai.io/2024/widget-v20241209/bubble.webp" class="block h-full w-full scale-[1.01]" alt="Molin AI chat" />
@@ -127,9 +137,9 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
127
137
  </svg>
128
138
  </div>
129
139
  </button>
130
- `);this.state="open",this.src=""}};M(cs,"properties",{state:{type:String},src:{type:String}});customElements.get("mw-bubble")||customElements.define("mw-bubble",cs);var ds={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ps=i=>(...e)=>({_$litDirective$:i,values:e}),Oi=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};var{I:rg}=kc;var ad=()=>document.createComment(""),Li=(i,e,t)=>{let r=i._$AA.parentNode,n=e===void 0?i._$AB:e._$AA;if(t===void 0){let s=r.insertBefore(ad(),n),o=r.insertBefore(ad(),n);t=new rg(s,o,i,i.options)}else{let s=t._$AB.nextSibling,o=t._$AM,l=o!==i;if(l){let a;t._$AQ?.(i),t._$AM=i,t._$AP!==void 0&&(a=i._$AU)!==o._$AU&&t._$AP(a)}if(s!==n||l){let a=t._$AA;for(;a!==s;){let u=a.nextSibling;r.insertBefore(a,n),a=u}}}return t},Lt=(i,e,t=i)=>(i._$AI(e,t),i),ng={},ld=(i,e=ng)=>i._$AH=e,ud=i=>i._$AH,hs=i=>{i._$AP?.(!1,!0);let e=i._$AA,t=i._$AB.nextSibling;for(;e!==t;){let r=e.nextSibling;e.remove(),e=r}};var cd=(i,e,t)=>{let r=new Map;for(let n=e;n<=t;n++)r.set(i[n],n);return r},rt=ps(class extends Oi{constructor(i){if(super(i),i.type!==ds.CHILD)throw Error("repeat() can only be used in text expressions")}dt(i,e,t){let r;t===void 0?t=e:e!==void 0&&(r=e);let n=[],s=[],o=0;for(let l of i)n[o]=r?r(l,o):o,s[o]=t(l,o),o++;return{values:s,keys:n}}render(i,e,t){return this.dt(i,e,t).values}update(i,[e,t,r]){let n=ud(i),{values:s,keys:o}=this.dt(e,t,r);if(!Array.isArray(n))return this.ut=o,s;let l=this.ut??=[],a=[],u,d,c=0,p=n.length-1,h=0,g=s.length-1;for(;c<=p&&h<=g;)if(n[c]===null)c++;else if(n[p]===null)p--;else if(l[c]===o[h])a[h]=Lt(n[c],s[h]),c++,h++;else if(l[p]===o[g])a[g]=Lt(n[p],s[g]),p--,g--;else if(l[c]===o[g])a[g]=Lt(n[c],s[g]),Li(i,a[g+1],n[c]),c++,g--;else if(l[p]===o[h])a[h]=Lt(n[p],s[h]),Li(i,n[c],n[p]),p--,h++;else if(u===void 0&&(u=cd(o,h,g),d=cd(l,c,p)),u.has(l[c]))if(u.has(l[p])){let m=d.get(o[h]),b=m!==void 0?n[m]:null;if(b===null){let x=Li(i,n[c]);Lt(x,s[h]),a[h]=x}else a[h]=Lt(b,s[h]),Li(i,n[c],b),n[m]=null;h++}else hs(n[p]),p--;else hs(n[c]),c++;for(;h<=g;){let m=Li(i,a[g+1]);Lt(m,s[h]),a[h++]=m}for(;c<=p;){let m=n[c++];m!==null&&hs(m)}return this.ut=o,ld(i,a),tt}});function Or(i,e,t){return i?e(i):t?.(i)}var fs,dd,gs=class gs extends z(N){constructor(){super();w(this,fs);this.examples={title:"",items:[]},this.color=""}render(){return!this.examples?.title&&!this.examples?.items?.length?j:y`
140
+ `);this.state="open",this.src=""}};w(kn,"properties",{state:{type:String},src:{type:String}});customElements.get("mw-bubble")||customElements.define("mw-bubble",kn);var Cn={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},$n=t=>(...e)=>({_$litDirective$:t,values:e}),wt=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,r,n){this._$Ct=e,this._$AM=r,this._$Ci=n}_$AS(e,r){return this.update(e,r)}update(e,r){return this.render(...r)}};var{I:Xu}=ko;var oa=()=>document.createComment(""),bt=(t,e,r)=>{let n=t._$AA.parentNode,i=e===void 0?t._$AB:e._$AA;if(r===void 0){let s=n.insertBefore(oa(),i),o=n.insertBefore(oa(),i);r=new Xu(s,o,t,t.options)}else{let s=r._$AB.nextSibling,o=r._$AM,u=o!==t;if(u){let a;r._$AQ?.(t),r._$AM=t,r._$AP!==void 0&&(a=t._$AU)!==o._$AU&&r._$AP(a)}if(s!==i||u){let a=r._$AA;for(;a!==s;){let c=a.nextSibling;n.insertBefore(a,i),a=c}}}return r},De=(t,e,r=t)=>(t._$AI(e,r),t),Ju={},aa=(t,e=Ju)=>t._$AH=e,la=t=>t._$AH,En=t=>{t._$AP?.(!1,!0);let e=t._$AA,r=t._$AB.nextSibling;for(;e!==r;){let n=e.nextSibling;e.remove(),e=n}};var ua=(t,e,r)=>{let n=new Map;for(let i=e;i<=r;i++)n.set(t[i],i);return n},me=$n(class extends wt{constructor(t){if(super(t),t.type!==Cn.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,r){let n;r===void 0?r=e:e!==void 0&&(n=e);let i=[],s=[],o=0;for(let u of t)i[o]=n?n(u,o):o,s[o]=r(u,o),o++;return{values:s,keys:i}}render(t,e,r){return this.dt(t,e,r).values}update(t,[e,r,n]){let i=la(t),{values:s,keys:o}=this.dt(e,r,n);if(!Array.isArray(i))return this.ut=o,s;let u=this.ut??=[],a=[],c,f,p=0,b=i.length-1,x=0,k=s.length-1;for(;p<=b&&x<=k;)if(i[p]===null)p++;else if(i[b]===null)b--;else if(u[p]===o[x])a[x]=De(i[p],s[x]),p++,x++;else if(u[b]===o[k])a[k]=De(i[b],s[k]),b--,k--;else if(u[p]===o[k])a[k]=De(i[p],s[k]),bt(t,a[k+1],i[p]),p++,k--;else if(u[b]===o[x])a[x]=De(i[b],s[x]),bt(t,i[p],i[b]),b--,x++;else if(c===void 0&&(c=ua(o,x,k),f=ua(u,p,b)),c.has(u[p]))if(c.has(u[b])){let _=f.get(o[x]),M=_!==void 0?i[_]:null;if(M===null){let j=bt(t,i[p]);De(j,s[x]),a[x]=j}else a[x]=De(M,s[x]),bt(t,i[p],M),i[_]=null;x++}else En(i[b]),b--;else En(i[p]),p++;for(;x<=k;){let _=bt(t,a[k+1]);De(_,s[x]),a[x++]=_}for(;p<=b;){let _=i[p++];_!==null&&En(_)}return this.ut=o,aa(t,a),he}});function pr(t,e,r){return t?e(t):r?.(t)}var Sn,ca,_n=class _n extends T(S){constructor(){super();d(this,Sn);this.examples={title:"",items:[]},this.color=""}render(){return!this.examples?.title&&!this.examples?.items?.length?E:h`
131
141
  <div class="flex h-full w-full flex-1 flex-col overflow-y-auto px-4 pb-2 pt-6">
132
- ${Or(this.examples.title,()=>y`
142
+ ${pr(this.examples.title,()=>h`
133
143
  <h2 class="mt-14 px-2 pb-2 pt-9 text-left text-3xl font-bold leading-tight tracking-tight">
134
144
  <span>${this.examples.title}</span>
135
145
  <svg class="inline-block h-9 w-9 align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 58 61">
@@ -139,19 +149,19 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
139
149
  </svg>
140
150
  </h2>
141
151
  `)}
142
- ${this.examples?.items?.length?y`
152
+ ${this.examples?.items?.length?h`
143
153
  <ul class="mt-auto flex select-none flex-wrap justify-end gap-2.5 text-sm/6 text-black">
144
- ${rt(this.examples.items,t=>t,t=>y`
154
+ ${me(this.examples.items,r=>r,r=>h`
145
155
  <li
146
156
  class="border-1 hover:bg-[${this.color}]/[0.08] border-gray my-auto inline-block cursor-pointer rounded-2xl px-4 py-2 text-left transition-all duration-200 hover:-translate-y-0.5 hover:opacity-80 hover:shadow"
147
- @click="${()=>$(this,fs,dd).call(this,t)}">
148
- <span>${t.trim()}</span>
157
+ @click="${()=>m(this,Sn,ca).call(this,r)}">
158
+ <span>${r.trim()}</span>
149
159
  </li>
150
160
  `)}
151
161
  </ul>
152
- `:j}
162
+ `:E}
153
163
  </div>
154
- `}};fs=new WeakSet,dd=function(t){this.dispatchEvent(new gs.ExampleClickEvent({example:t}))},M(gs,"properties",{examples:{type:Object},color:{type:String}});var Lr=gs,$a;Lr.ExampleClickEvent=($a=class extends CustomEvent{constructor(e,t={}){super(Lr.ExampleClickEvent.type,{detail:e,...t})}},M($a,"type","mw:example-click"),$a);customElements.get("mw-chat-background")||customElements.define("mw-chat-background",Lr);var Di,pd,hd,Fi=class Fi extends z(N){constructor(){super();w(this,Di);this.content={logoUrl:"",title:"",color:""},this.showNewChat=!1,this.showClose=!1}render(){return y`
164
+ `}};Sn=new WeakSet,ca=function(r){this.dispatchEvent(new _n.ExampleClickEvent({example:r}))},w(_n,"properties",{examples:{type:Object},color:{type:String}});var fr=_n,rs;fr.ExampleClickEvent=(rs=class extends CustomEvent{constructor(e,r={}){super(fr.ExampleClickEvent.type,{detail:e,...r})}},w(rs,"type","mw:example-click"),rs);customElements.get("mw-chat-background")||customElements.define("mw-chat-background",fr);var kt,pa,fa,xt=class xt extends T(S){constructor(){super();d(this,kt);this.content={logoUrl:"",title:"",color:""},this.showNewChat=!1,this.showClose=!1}render(){return h`
155
165
  <div class="relative z-10 h-12">
156
166
  <div class="gradient-blur absolute inset-x-0.5 mt-2 h-12"></div>
157
167
 
@@ -174,7 +184,7 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
174
184
  <div class="flex-grow"></div>
175
185
 
176
186
  <!-- new chat btn -->
177
- <button @click=${$(this,Di,pd)} type="button" class="${this.showNewChat?"inline-flex":"hidden"} shrink-0">
187
+ <button @click=${m(this,kt,pa)} type="button" class="${this.showNewChat?"inline-flex":"hidden"} shrink-0">
178
188
  <!-- svg icon of a bubble with a plus -->
179
189
  <svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 37 36">
180
190
  <path
@@ -186,7 +196,7 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
186
196
  </button>
187
197
 
188
198
  <!-- close chat btn -->
189
- <button @click=${$(this,Di,hd)} class="${this.showClose?"inline-flex":"hidden"} shrink-0">
199
+ <button @click=${m(this,kt,fa)} class="${this.showClose?"inline-flex":"hidden"} shrink-0">
190
200
  <!-- svg icon of an X -->
191
201
  <svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="white">
192
202
  <path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" />
@@ -201,7 +211,7 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
201
211
  </div>
202
212
  </div>
203
213
  </div>
204
- `}};Di=new WeakSet,pd=function(){this.dispatchEvent(new Fi.NewChatClickEvent)},hd=function(){this.dispatchEvent(new Fi.CloseClickEvent)},M(Fi,"properties",{content:{type:Object},showNewChat:{type:Boolean,attribute:"show-new-chat"},showClose:{type:Boolean,attribute:"show-close"}}),M(Fi,"styles",mt`
214
+ `}};kt=new WeakSet,pa=function(){this.dispatchEvent(new xt.NewChatClickEvent)},fa=function(){this.dispatchEvent(new xt.CloseClickEvent)},w(xt,"properties",{content:{type:Object},showNewChat:{type:Boolean,attribute:"show-new-chat"},showClose:{type:Boolean,attribute:"show-close"}}),w(xt,"styles",Ee`
205
215
  /* blurred background */
206
216
 
207
217
  .gradient-blur {
@@ -213,24 +223,24 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
213
223
  /* bg-color gradient */
214
224
  background-image: linear-gradient(to bottom, white 20%, transparent);
215
225
  }
216
- `);var ri=Fi,Ia;ri.NewChatClickEvent=(Ia=class extends CustomEvent{constructor(e={}){super(ri.NewChatClickEvent.type,{...e})}},M(Ia,"type","mw:new-chat-click"),Ia);var Aa;ri.CloseClickEvent=(Aa=class extends CustomEvent{constructor(e={}){super(ri.CloseClickEvent.type,{...e})}},M(Aa,"type","mw:close-click"),Aa);customElements.get("mw-chat-header")||customElements.define("mw-chat-header",ri);var Ta={maxHeight:120,initialHeight:32,paddingY:12},Ie,Oa,fd,gd,md,vd,La,ji=class ji extends z(N){constructor(){super();w(this,Ie);this.disabled=!1,this.streaming=!1,this.placeholder="Type a message..."}render(){return y`
217
- <form @submit="${$(this,Ie,md)}" class="flex w-full items-center overflow-hidden rounded-[18px] bg-white shadow-[0px_3px_20px_0px_rgba(0,0,0,0.2)]">
226
+ `);var et=xt,ns;et.NewChatClickEvent=(ns=class extends CustomEvent{constructor(e={}){super(et.NewChatClickEvent.type,{...e})}},w(ns,"type","mw:new-chat-click"),ns);var is;et.CloseClickEvent=(is=class extends CustomEvent{constructor(e={}){super(et.CloseClickEvent.type,{...e})}},w(is,"type","mw:close-click"),is);customElements.get("mw-chat-header")||customElements.define("mw-chat-header",et);var ss={maxHeight:120,initialHeight:32,paddingY:12},ee,us,ha,da,ma,ga,cs,Ct=class Ct extends T(S){constructor(){super();d(this,ee);this.disabled=!1,this.streaming=!1,this.placeholder="Type a message..."}render(){return h`
227
+ <form @submit="${m(this,ee,ma)}" class="flex w-full items-center overflow-hidden rounded-[18px] bg-white shadow-[0px_3px_20px_0px_rgba(0,0,0,0.2)]">
218
228
  <textarea
219
229
  name="input"
220
- @input="${$(this,Ie,vd)}"
221
- @keydown="${$(this,Ie,gd)}"
230
+ @input="${m(this,ee,ga)}"
231
+ @keydown="${m(this,ee,da)}"
222
232
  autofocus
223
233
  ?disabled="${this.disabled}"
224
234
  placeholder="${this.placeholder}"
225
- class="box-content h-[${Ta.initialHeight}px] w-full resize-none place-content-center rounded bg-white px-3 py-[${Ta.paddingY}px] text-base text-gray-800 outline-none"></textarea>
235
+ class="box-content h-[${ss.initialHeight}px] w-full resize-none place-content-center rounded bg-white px-3 py-[${ss.paddingY}px] text-base text-gray-800 outline-none"></textarea>
226
236
 
227
237
  <button type="submit" ?disabled="${this.disabled}" class="mx-1 px-2 transition-opacity duration-200 hover:opacity-80">
228
- ${this.streaming?y`
238
+ ${this.streaming?h`
229
239
  <!-- x -->
230
240
  <svg class="h-6 w-6 fill-current" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="#312E30">
231
241
  <path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" />
232
242
  </svg>
233
- `:y`
243
+ `:h`
234
244
  <!-- airplane -->
235
245
  <svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 35 34">
236
246
  <path
@@ -246,24 +256,24 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
246
256
  <slot>
247
257
  <div class="h-5 w-full"></div>
248
258
  </slot>
249
- `}};Ie=new WeakSet,Oa=function(){return this.renderRoot.querySelector('textarea[name="input"]')??null},fd=function(){return this.renderRoot.querySelector('button[type="submit"]')??null},gd=function(t){sg(t)&&(t.preventDefault(),this.streaming||f(this,Ie,fd)?.click())},md=function(t){if(t.preventDefault(),this.streaming){this.dispatchEvent(new ji.CancelEvent);return}let r=f(this,Ie,Oa);if(!r)throw new Error("Expected input element to be present");let n=r.value.trim();n&&this.dispatchEvent(new ji.SubmitEvent(n))&&(r.value=""),$(this,Ie,La).call(this)},vd=function(t){this.dispatchEvent(new ji.ChangeEvent({delta:t.data,full:t.target instanceof HTMLTextAreaElement?t.target.value:""})),$(this,Ie,La).call(this)},La=function(){let t=f(this,Ie,Oa);if(!t)return;let{maxHeight:r,initialHeight:n,paddingY:s}=Ta;t.style.height=`${n}px`;let o=t.scrollHeight,l=s*2,a=Math.min(o-l,r);t.style.height=`${a}px`},M(ji,"properties",{disabled:{type:Boolean},streaming:{type:Boolean},placeholder:{type:String}});var _t=ji,Ma;_t.ChangeEvent=(Ma=class extends CustomEvent{constructor(e,t={}){super(_t.ChangeEvent.type,{detail:e,...t})}},M(Ma,"type","mw:change"),Ma);var Pa;_t.SubmitEvent=(Pa=class extends CustomEvent{constructor(e,t={}){super(_t.SubmitEvent.type,{detail:e,...t,cancelable:!0})}},M(Pa,"type","mw:submit"),Pa);var Ra;_t.CancelEvent=(Ra=class extends CustomEvent{constructor(e={}){super(_t.CancelEvent.type,{...e})}},M(Ra,"type","mw:cancel"),Ra);function sg(i){return(i.code==="Enter"||i.code==="NumpadEnter")&&!i.ctrlKey&&!i.metaKey&&!i.shiftKey}customElements.get("mw-chat-input")||customElements.define("mw-chat-input",_t);var ms=class extends z(N){constructor(){super(),this.side="assistant",this.status="",this.color="",this.logoUrl="",this.position="single"}render(){let t=this.side==="user"&&this.position==="single"?"rounded-2xl":this.side==="user"&&["single-current","first"].includes(this.position)?"rounded-2xl rounded-br-[4px]":this.side==="user"&&["middle","last-current"].includes(this.position)?"rounded-2xl rounded-r-[4px]":this.side==="user"&&this.position==="last"?"rounded-2xl rounded-tr-[4px]":["support","assistant"].includes(this.side)&&["single","single-current"].includes(this.position)?"rounded-2xl":["support","assistant"].includes(this.side)&&this.position==="first"?"rounded-2xl rounded-bl-[4px]":["support","assistant"].includes(this.side)&&this.position==="middle"?"rounded-2xl rounded-l-[4px]":["support","assistant"].includes(this.side)&&["last","last-current"].includes(this.position)?"rounded-2xl rounded-tl-[4px]":"rounded-2xl";switch(this.side){case"user":return y`
259
+ `}};ee=new WeakSet,us=function(){return this.renderRoot.querySelector('textarea[name="input"]')??null},ha=function(){return this.renderRoot.querySelector('button[type="submit"]')??null},da=function(r){Ku(r)&&(r.preventDefault(),this.streaming||l(this,ee,ha)?.click())},ma=function(r){if(r.preventDefault(),this.streaming){this.dispatchEvent(new Ct.CancelEvent);return}let n=l(this,ee,us);if(!n)throw new Error("Expected input element to be present");let i=n.value.trim();i&&this.dispatchEvent(new Ct.SubmitEvent(i))&&(n.value=""),m(this,ee,cs).call(this)},ga=function(r){this.dispatchEvent(new Ct.ChangeEvent({delta:r.data,full:r.target instanceof HTMLTextAreaElement?r.target.value:""})),m(this,ee,cs).call(this)},cs=function(){let r=l(this,ee,us);if(!r)return;let{maxHeight:n,initialHeight:i,paddingY:s}=ss;r.style.height=`${i}px`;let o=r.scrollHeight,u=s*2,a=Math.min(o-u,n);r.style.height=`${a}px`},w(Ct,"properties",{disabled:{type:Boolean},streaming:{type:Boolean},placeholder:{type:String}});var Ae=Ct,os;Ae.ChangeEvent=(os=class extends CustomEvent{constructor(e,r={}){super(Ae.ChangeEvent.type,{detail:e,...r})}},w(os,"type","mw:change"),os);var as;Ae.SubmitEvent=(as=class extends CustomEvent{constructor(e,r={}){super(Ae.SubmitEvent.type,{detail:e,...r,cancelable:!0})}},w(as,"type","mw:submit"),as);var ls;Ae.CancelEvent=(ls=class extends CustomEvent{constructor(e={}){super(Ae.CancelEvent.type,{...e})}},w(ls,"type","mw:cancel"),ls);function Ku(t){return(t.code==="Enter"||t.code==="NumpadEnter")&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey}customElements.get("mw-chat-input")||customElements.define("mw-chat-input",Ae);var An=class extends T(S){constructor(){super(),this.side="assistant",this.status="",this.color="",this.logoUrl="",this.position="single"}render(){let r=this.side==="user"&&this.position==="single"?"rounded-2xl":this.side==="user"&&["single-current","first"].includes(this.position)?"rounded-2xl rounded-br-[4px]":this.side==="user"&&["middle","last-current"].includes(this.position)?"rounded-2xl rounded-r-[4px]":this.side==="user"&&this.position==="last"?"rounded-2xl rounded-tr-[4px]":["support","assistant"].includes(this.side)&&["single","single-current"].includes(this.position)?"rounded-2xl":["support","assistant"].includes(this.side)&&this.position==="first"?"rounded-2xl rounded-bl-[4px]":["support","assistant"].includes(this.side)&&this.position==="middle"?"rounded-2xl rounded-l-[4px]":["support","assistant"].includes(this.side)&&["last","last-current"].includes(this.position)?"rounded-2xl rounded-tl-[4px]":"rounded-2xl";switch(this.side){case"user":return h`
250
260
  <div class="ml-20 flex justify-end font-sans text-base">
251
261
  <div class="max-w-full">
252
262
  <!-- include an invisible border (same color as background) so that this message is the same height as the bot message -->
253
- <div class="${t} border border-[${this.color}] bg-[${this.color}] px-4 py-3 text-left text-white">
263
+ <div class="${r} border border-[${this.color}] bg-[${this.color}] px-4 py-3 text-left text-white">
254
264
  <slot></slot>
255
265
  </div>
256
266
 
257
267
  <!-- render status (if any) -->
258
- ${this.status==="sent"?y`
268
+ ${this.status==="sent"?h`
259
269
  <!-- tick mark -->
260
270
  <svg class="ml-auto h-3 w-3 text-gray-400" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor">
261
271
  <path stroke-linecap="round" stroke-linejoin="round" d="m4.5 12.75 6 6 9-13.5" />
262
272
  </svg>
263
- `:j}
273
+ `:E}
264
274
  </div>
265
275
  </div>
266
- `;case"assistant":case"support":return y`
276
+ `;case"assistant":case"support":return h`
267
277
  <div class="mr-8 flex justify-start font-sans text-base">
268
278
  <div class="flex max-w-full space-x-2">
269
279
  <!--
@@ -277,12 +287,12 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
277
287
  min-h-[50px] because when we start streaming we sometimes start with an empty paragraph
278
288
  -->
279
289
  <!-- TODO: maybe add back border? border border-gray-100 -->
280
- <div class="${t} min-h-[50px] max-w-full overflow-hidden bg-gray-50 px-4 py-3 text-left text-gray-800">
290
+ <div class="${r} min-h-[50px] max-w-full overflow-hidden bg-gray-50 px-4 py-3 text-left text-gray-800">
281
291
  <slot></slot>
282
292
  </div>
283
293
  </div>
284
294
  </div>
285
- `;default:throw new Error(`Unknown side: ${this.side}`)}}};M(ms,"properties",{side:{type:String},status:{type:String},color:{type:String},logoUrl:{type:String,attribute:"logo"},position:{type:String}});customElements.get("mw-chat-message")||customElements.define("mw-chat-message",ms);var Fa=class extends z(N){constructor(){super(...arguments);M(this,"render",()=>y`
295
+ `;default:throw new Error(`Unknown side: ${this.side}`)}}};w(An,"properties",{side:{type:String},status:{type:String},color:{type:String},logoUrl:{type:String,attribute:"logo"},position:{type:String}});customElements.get("mw-chat-message")||customElements.define("mw-chat-message",An);var ps=class extends T(S){constructor(){super(...arguments);w(this,"render",()=>h`
286
296
  <svg class="leading-0 inline-block h-full w-full" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" xml:space="preserve">
287
297
  <circle fill="currentFill" stroke="none" cx="27" cy="50" r="6">
288
298
  <animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.1" />
@@ -294,11 +304,11 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
294
304
  <animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.3" />
295
305
  </circle>
296
306
  </svg>
297
- `)}};customElements.get("mw-loading")||customElements.define("mw-loading",Fa);var og="https://molin.ai/?utm_source=molin-shop-ai&utm_medium=widget&utm_campaign=poweredby",Da=class extends z(N){constructor(){super(...arguments);M(this,"render",()=>y`
307
+ `)}};customElements.get("mw-loading")||customElements.define("mw-loading",ps);var Yu="https://molin.ai/?utm_source=molin-shop-ai&utm_medium=widget&utm_campaign=poweredby",fs=class extends T(S){constructor(){super(...arguments);w(this,"render",()=>h`
298
308
  <p class="flex items-center justify-center whitespace-nowrap text-xs">
299
309
  <span>Powered by</span>
300
310
 
301
- <a href="${og}" target="_blank" class="inline-flex items-center underline">
311
+ <a href="${Yu}" target="_blank" class="inline-flex items-center underline">
302
312
  <svg class="mx-1 inline-block h-4 w-4" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
303
313
  <circle cx="10.0361" cy="10.0361" r="10.0361" fill="#242038" />
304
314
  <path
@@ -317,7 +327,7 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
317
327
  <span>Molin AI</span>
318
328
  </a>
319
329
  </p>
320
- `)}};customElements.get("mw-powered-by")||customElements.define("mw-powered-by",Da);function ja(i){return new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(i)}function yd(i,e){let t=i instanceof URL?i:new URL(i);if(e)for(let[r,n]of e)t.searchParams.set(r,n);return t}var Ft=i=>i??j;var ag={".section-spacing":{"@apply":"relative flex justify-center px-[25px] py-16 sm:px-9 sm:py-[45px] lg:px-24 lg:py-[104px]"}},Na=Mr({preflight:{...ag},hash:!1,darkMode:"class",theme:{extend:{fontFamily:{display:["Work Sans","sans-serif"],sans:["Inter","sans-serif"]},colors:{violet:{DEFAULT:"#601feb",50:"#f3f2ff",100:"#eae7ff",200:"#d7d2ff",300:"#baaeff",400:"#9980ff",500:"#784dff",600:"#6829fe",700:"#601feb",800:"#4b12c5",900:"#3f11a1",950:"#25086d"},pink:{DEFAULT:"#ff0bbb",50:"#fff0fc",100:"#ffe3fc",200:"#ffc6f9",300:"#ff98f2",400:"#ff58e5",500:"#ff27d5",600:"#ff0bbb",700:"#df0095",800:"#b8007b",900:"#980368",950:"#5f003b"},lime:{DEFAULT:"#b9e901",50:"#fdffe4",100:"#f9ffc5",200:"#f1ff92",300:"#e2ff54",400:"#d1fa21",500:"#b9e901",600:"#8ab400",700:"#688902",800:"#526b09",900:"#465a0d",950:"#243300"}}}},presets:[as(),ns(),ss(),ls()],ignorelist:/^(sb-|css-|sbdocs|docblock|innerZoomElementWrapper|docs-|rejt-)/});var Fr=i=>us(Na)(i);var Ni,Dr,ni,vs=class extends Fr(N){constructor(){super();w(this,Ni,!1);w(this,Dr,!1);w(this,ni,!1);this.src=""}render(){return this.src?y`
330
+ `)}};customElements.get("mw-powered-by")||customElements.define("mw-powered-by",fs);function hs(t){return new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(t)}function ya(t,e){let r=t instanceof URL?t:new URL(t);if(e)for(let[n,i]of e)r.searchParams.set(n,i);return r}var Re=t=>t??E;var Qu={".section-spacing":{"@apply":"relative flex justify-center px-[25px] py-16 sm:px-9 sm:py-[45px] lg:px-24 lg:py-[104px]"}},ds=lr({preflight:{...Qu},hash:!1,darkMode:"class",theme:{extend:{fontFamily:{display:["Work Sans","sans-serif"],sans:["Inter","sans-serif"]},colors:{violet:{DEFAULT:"#601feb",50:"#f3f2ff",100:"#eae7ff",200:"#d7d2ff",300:"#baaeff",400:"#9980ff",500:"#784dff",600:"#6829fe",700:"#601feb",800:"#4b12c5",900:"#3f11a1",950:"#25086d"},pink:{DEFAULT:"#ff0bbb",50:"#fff0fc",100:"#ffe3fc",200:"#ffc6f9",300:"#ff98f2",400:"#ff58e5",500:"#ff27d5",600:"#ff0bbb",700:"#df0095",800:"#b8007b",900:"#980368",950:"#5f003b"},lime:{DEFAULT:"#b9e901",50:"#fdffe4",100:"#f9ffc5",200:"#f1ff92",300:"#e2ff54",400:"#d1fa21",500:"#b9e901",600:"#8ab400",700:"#688902",800:"#526b09",900:"#465a0d",950:"#243300"}}}},presets:[wn(),gn(),yn(),bn()],ignorelist:/^(sb-|css-|sbdocs|docblock|innerZoomElementWrapper|docs-|rejt-)/});var hr=t=>xn(ds)(t);var $t,dr,tt,Et,In,Mn=class extends hr(S){constructor(){super();d(this,Et);d(this,$t,!1);d(this,dr,!1);d(this,tt,!1);this.src=""}render(){return this.src?h`
321
331
  <div class="relative h-full w-full overflow-hidden rounded-lg">
322
332
  <!-- use the same icon as for missing image url as the background behind the image so there is no flicker while it's loading -->
323
333
  <div class="absolute inset-0 flex items-center justify-center bg-gray-100">
@@ -332,7 +342,7 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
332
342
 
333
343
  <!-- absolute position to take the height of the parent and to appear on top of the shopping bag background -->
334
344
  <div class="absolute inset-0 flex h-full w-full bg-gray-100">
335
- ${f(this,Ni)&&f(this,Dr)?y`
345
+ ${l(this,$t)&&l(this,dr)?h`
336
346
  <!-- missing image url -->
337
347
  <div class="flex h-full w-full items-center justify-center">
338
348
  <!-- shopping bag icon -->
@@ -343,30 +353,30 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
343
353
  d="M15.75 10.5V6a3.75 3.75 0 1 0-7.5 0v4.5m11.356-1.993 1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 0 1-1.12-1.243l1.264-12A1.125 1.125 0 0 1 5.513 7.5h12.974c.576 0 1.059.435 1.119 1.007ZM8.625 10.5a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm7.5 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z" />
344
354
  </svg>
345
355
  </div>
346
- `:f(this,Ni)?y`
356
+ `:l(this,$t)?h`
357
+ <!-- we do not need an alt attribute because this does not matter for SEO and we do not have a non-generic image description anyway -->
347
358
  <img
348
- @error="${()=>{E(this,Dr,!0),this.requestUpdate()}}"
349
- @load="${()=>{E(this,ni,!0),this.requestUpdate()}}"
350
- src="${this.src}"
351
- alt="preview image"
352
- class="${f(this,ni)?"bg-white":""} h-full w-full object-cover"
359
+ @error="${()=>{g(this,dr,!0),this.requestUpdate()}}"
360
+ @load="${()=>{g(this,tt,!0),this.requestUpdate()}}"
361
+ src="${m(this,Et,In).call(this,this.src)}"
362
+ class="${l(this,tt)?"bg-white":""} h-full w-full object-cover"
353
363
  loading="lazy" />
354
- `:y`
364
+ `:h`
355
365
  <!-- Cloudflare Images: resize the source image -->
366
+ <!-- we do not need an alt attribute because this does not matter for SEO and we do not have a non-generic image description anyway -->
356
367
  <img
357
- @error="${()=>{E(this,Ni,!0),this.requestUpdate()}}"
358
- @load="${()=>{E(this,ni,!0),this.requestUpdate()}}"
368
+ @error="${()=>{g(this,$t,!0),this.requestUpdate()}}"
369
+ @load="${()=>{g(this,tt,!0),this.requestUpdate()}}"
359
370
  srcset="
360
- https://molin.foo/cdn-cgi/image/w=70,fit=crop,format=auto,quality=75,dpr=1/${this.src} 1x,
361
- https://molin.foo/cdn-cgi/image/w=70,fit=crop,format=auto,quality=75,dpr=2/${this.src} 2x
371
+ https://molin.foo/cdn-cgi/image/w=70,fit=crop,format=auto,quality=75,dpr=1/${m(this,Et,In).call(this,this.src)} 1x,
372
+ https://molin.foo/cdn-cgi/image/w=70,fit=crop,format=auto,quality=75,dpr=2/${m(this,Et,In).call(this,this.src)} 2x
362
373
  "
363
- alt="preview image"
364
- class="${f(this,ni)?"bg-white":""} h-full w-full object-cover"
374
+ class="${l(this,tt)?"bg-white":""} h-full w-full object-cover"
365
375
  loading="lazy" />
366
376
  `}
367
377
  </div>
368
378
  </div>
369
- `:y`
379
+ `:h`
370
380
  <!-- missing image url -->
371
381
  <div class="flex h-full w-full overflow-hidden rounded-lg bg-gray-100">
372
382
  <div class="flex h-full w-full items-center justify-center">
@@ -379,33 +389,33 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
379
389
  </svg>
380
390
  </div>
381
391
  </div>
382
- `}};Ni=new WeakMap,Dr=new WeakMap,ni=new WeakMap,M(vs,"properties",{src:{type:String}});customElements.get("mw-product-thumbnail")||customElements.define("mw-product-thumbnail",vs);var ys=class extends z(N){constructor(){super(),this.product=void 0,this.streaming=!1,this.linksNewTab=!1,this.searchParams=void 0,this.imagesByProductUrl={}}get trackedProductUrl(){let e=this.product?.url,t=this.searchParams;try{if(e&&t)return yd(e,t).href}catch{}return e}render(){let{name:e,description:t,price:r,url:n}=this.product||{},s=n?this.imagesByProductUrl?.[n]:void 0;return y`
392
+ `}};$t=new WeakMap,dr=new WeakMap,tt=new WeakMap,Et=new WeakSet,In=function(r){try{return encodeURI(r)}catch{return r}},w(Mn,"properties",{src:{type:String}});customElements.get("mw-product-thumbnail")||customElements.define("mw-product-thumbnail",Mn);var Tn=class extends T(S){constructor(){super(),this.product=void 0,this.streaming=!1,this.linksNewTab=!1,this.searchParams=void 0,this.imagesByProductUrl={}}get trackedProductUrl(){let e=this.product?.url,r=this.searchParams;try{if(e&&r)return ya(e,r).href}catch{}return e}render(){let{name:e,description:r,price:n,url:i}=this.product||{},s=i?this.imagesByProductUrl?.[i]:void 0;return h`
383
393
  <a
384
- href="${Ft(this.trackedProductUrl)}"
385
- title="${Ft(e)}"
394
+ href="${Re(this.trackedProductUrl)}"
395
+ title="${Re(e)}"
386
396
  class="group flex w-full max-w-md cursor-pointer gap-[10px] overflow-hidden rounded-lg"
387
397
  target="${this.linksNewTab?"_blank":"_self"}"
388
398
  ?disabled="${this.streaming}">
389
- ${this.streaming?y`
399
+ ${this.streaming?h`
390
400
  <!-- shimmer -->
391
401
  <div class="h-[70px] w-[70px] animate-pulse overflow-hidden rounded-lg bg-gray-200"></div>
392
- `:y`<mw-product-thumbnail class="block h-[70px] w-[70px]" src="${Ft(s)}"></mw-product-thumbnail>`}
402
+ `:h`<mw-product-thumbnail class="block h-[70px] w-[70px]" src="${Re(s)}"></mw-product-thumbnail>`}
393
403
 
394
404
  <div class="flex flex-1 flex-col justify-between">
395
405
  <div>
396
- ${e||!this.streaming?y`<h3 class="line-clamp-1 text-sm font-medium group-hover:underline">${e}</h3>`:y`<div class="h-5 w-32 animate-pulse rounded bg-gray-200"></div>`}
406
+ ${e||!this.streaming?h`<h3 class="line-clamp-1 text-sm font-medium group-hover:underline">${e}</h3>`:h`<div class="h-5 w-32 animate-pulse rounded bg-gray-200"></div>`}
397
407
 
398
408
  <!-- no margin here -->
399
409
 
400
- ${t||!this.streaming?y`<p class="line-clamp-2 text-xs text-gray-500">${t}</p>`:y`<div class="my-1 h-6 w-3/4 animate-pulse rounded bg-gray-200"></div>`}
410
+ ${r||!this.streaming?h`<p class="line-clamp-2 text-xs text-gray-500">${r}</p>`:h`<div class="my-1 h-6 w-3/4 animate-pulse rounded bg-gray-200"></div>`}
401
411
  </div>
402
412
 
403
413
  <!-- flexbox filled space -->
404
414
 
405
- ${r||!this.streaming?y`<span class="text-xs text-gray-900">${r}</span>`:y`<div class="h-4 w-14 animate-pulse rounded bg-gray-200"></div>`}
415
+ ${n||!this.streaming?h`<span class="text-xs text-gray-900">${n}</span>`:h`<div class="h-4 w-14 animate-pulse rounded bg-gray-200"></div>`}
406
416
  </div>
407
417
  </a>
408
- `}};M(ys,"properties",{product:{type:Object},streaming:{type:Boolean},linksNewTab:{type:Boolean,attribute:"links-new-tab"},searchParams:{type:Object},imagesByProductUrl:{type:Object}});customElements.get("mw-product-card-horizontal")||customElements.define("mw-product-card-horizontal",ys);function _s(i,e){var t={};for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&e.indexOf(r)<0&&(t[r]=i[r]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(i);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(i,r[n])&&(t[r[n]]=i[r[n]]);return t}var bs=function(){},Ui=function(){};var jr=(i,e,t)=>Math.min(Math.max(t,i),e);var Ua=.001,lg=.01,_d=10,ug=.05,cg=1;function bd({duration:i=800,bounce:e=.25,velocity:t=0,mass:r=1}){let n,s;bs(i<=_d*1e3,"Spring duration must be 10 seconds or less");let o=1-e;o=jr(ug,cg,o),i=jr(lg,_d,i/1e3),o<1?(n=u=>{let d=u*o,c=d*i,p=d-t,h=ws(u,o),g=Math.exp(-c);return Ua-p/h*g},s=u=>{let c=u*o*i,p=c*t+t,h=Math.pow(o,2)*Math.pow(u,2)*i,g=Math.exp(-c),m=ws(Math.pow(u,2),o);return(-n(u)+Ua>0?-1:1)*((p-h)*g)/m}):(n=u=>{let d=Math.exp(-u*i),c=(u-t)*i+1;return-Ua+d*c},s=u=>{let d=Math.exp(-u*i),c=(t-u)*(i*i);return d*c});let l=5/i,a=pg(n,s,l);if(i=i*1e3,isNaN(a))return{stiffness:100,damping:10,duration:i};{let u=Math.pow(a,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:i}}}var dg=12;function pg(i,e,t){let r=t;for(let n=1;n<dg;n++)r=r-i(r)/e(r);return r}function ws(i,e){return i*Math.sqrt(1-e*e)}var hg=["duration","bounce"],fg=["stiffness","damping","mass"];function wd(i,e){return e.some(t=>i[t]!==void 0)}function gg(i){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},i);if(!wd(i,fg)&&wd(i,hg)){let t=bd(i);e=Object.assign(Object.assign(Object.assign({},e),t),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function xs(i){var{from:e=0,to:t=1,restSpeed:r=2,restDelta:n}=i,s=_s(i,["from","to","restSpeed","restDelta"]);let o={done:!1,value:e},{stiffness:l,damping:a,mass:u,velocity:d,duration:c,isResolvedFromDuration:p}=gg(s),h=xd,g=xd;function m(){let b=d?-(d/1e3):0,x=t-e,_=a/(2*Math.sqrt(l*u)),k=Math.sqrt(l/u)/1e3;if(n===void 0&&(n=Math.min(Math.abs(t-e)/100,.4)),_<1){let S=ws(k,_);h=R=>{let B=Math.exp(-_*k*R);return t-B*((b+_*k*x)/S*Math.sin(S*R)+x*Math.cos(S*R))},g=R=>{let B=Math.exp(-_*k*R);return _*k*B*(Math.sin(S*R)*(b+_*k*x)/S+x*Math.cos(S*R))-B*(Math.cos(S*R)*(b+_*k*x)-S*x*Math.sin(S*R))}}else if(_===1)h=S=>t-Math.exp(-k*S)*(x+(b+k*x)*S);else{let S=k*Math.sqrt(_*_-1);h=R=>{let B=Math.exp(-_*k*R),U=Math.min(S*R,300);return t-B*((b+_*k*x)*Math.sinh(U)+S*x*Math.cosh(U))/S}}}return m(),{next:b=>{let x=h(b);if(p)o.done=b>=c;else{let _=g(b)*1e3,k=Math.abs(_)<=r,S=Math.abs(t-x)<=n;o.done=k&&S}return o.value=o.done?t:x,o},flipTarget:()=>{d=-d,[e,t]=[t,e],m()}}}xs.needsInterpolation=(i,e)=>typeof i=="string"||typeof e=="string";var xd=i=>0;var qa=(i,e,t)=>{let r=e-i;return r===0?1:(t-i)/r};var qi=(i,e,t)=>-t*i+t*e+i;var ks=(i,e)=>t=>Math.max(Math.min(t,e),i),Dt=i=>i%1?Number(i.toFixed(5)):i,Bi=/(-)?([\d]*\.?[\d])+/g,Cs=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,kd=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function bt(i){return typeof i=="string"}var Hi={test:i=>typeof i=="number",parse:parseFloat,transform:i=>i},Ss=Object.assign(Object.assign({},Hi),{transform:ks(0,1)}),wy=Object.assign(Object.assign({},Hi),{default:1});var Nr=i=>({test:e=>bt(e)&&e.endsWith(i)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${i}`}),Cy=Nr("deg"),zi=Nr("%"),Sy=Nr("px"),Ey=Nr("vh"),$y=Nr("vw"),Iy=Object.assign(Object.assign({},zi),{parse:i=>zi.parse(i)/100,transform:i=>zi.transform(i*100)});var Vi=(i,e)=>t=>!!(bt(t)&&kd.test(t)&&t.startsWith(i)||e&&Object.prototype.hasOwnProperty.call(t,e)),Es=(i,e,t)=>r=>{if(!bt(r))return r;let[n,s,o,l]=r.match(Bi);return{[i]:parseFloat(n),[e]:parseFloat(s),[t]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}};var ut={test:Vi("hsl","hue"),parse:Es("hue","saturation","lightness"),transform:({hue:i,saturation:e,lightness:t,alpha:r=1})=>"hsla("+Math.round(i)+", "+zi.transform(Dt(e))+", "+zi.transform(Dt(t))+", "+Dt(Ss.transform(r))+")"};var mg=ks(0,255),$s=Object.assign(Object.assign({},Hi),{transform:i=>Math.round(mg(i))}),Ke={test:Vi("rgb","red"),parse:Es("red","green","blue"),transform:({red:i,green:e,blue:t,alpha:r=1})=>"rgba("+$s.transform(i)+", "+$s.transform(e)+", "+$s.transform(t)+", "+Dt(Ss.transform(r))+")"};function vg(i){let e="",t="",r="",n="";return i.length>5?(e=i.substr(1,2),t=i.substr(3,2),r=i.substr(5,2),n=i.substr(7,2)):(e=i.substr(1,1),t=i.substr(2,1),r=i.substr(3,1),n=i.substr(4,1),e+=e,t+=t,r+=r,n+=n),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(r,16),alpha:n?parseInt(n,16)/255:1}}var Wi={test:Vi("#"),parse:vg,transform:Ke.transform};var jt={test:i=>Ke.test(i)||Wi.test(i)||ut.test(i),parse:i=>Ke.test(i)?Ke.parse(i):ut.test(i)?ut.parse(i):Wi.parse(i),transform:i=>bt(i)?i:i.hasOwnProperty("red")?Ke.transform(i):ut.transform(i)};var Cd="${c}",Sd="${n}";function yg(i){var e,t,r,n;return isNaN(i)&&bt(i)&&((t=(e=i.match(Bi))===null||e===void 0?void 0:e.length)!==null&&t!==void 0?t:0)+((n=(r=i.match(Cs))===null||r===void 0?void 0:r.length)!==null&&n!==void 0?n:0)>0}function Ed(i){typeof i=="number"&&(i=`${i}`);let e=[],t=0,r=i.match(Cs);r&&(t=r.length,i=i.replace(Cs,Cd),e.push(...r.map(jt.parse)));let n=i.match(Bi);return n&&(i=i.replace(Bi,Sd),e.push(...n.map(Hi.parse))),{values:e,numColors:t,tokenised:i}}function $d(i){return Ed(i).values}function Id(i){let{values:e,numColors:t,tokenised:r}=Ed(i),n=e.length;return s=>{let o=r;for(let l=0;l<n;l++)o=o.replace(l<t?Cd:Sd,l<t?jt.transform(s[l]):Dt(s[l]));return o}}var _g=i=>typeof i=="number"?0:i;function bg(i){let e=$d(i);return Id(i)(e.map(_g))}var Is={test:yg,parse:$d,createTransformer:Id,getAnimatableNone:bg};function Ba(i,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+(e-i)*6*t:t<1/2?e:t<2/3?i+(e-i)*(2/3-t)*6:i}function Ha({hue:i,saturation:e,lightness:t,alpha:r}){i/=360,e/=100,t/=100;let n=0,s=0,o=0;if(!e)n=s=o=t;else{let l=t<.5?t*(1+e):t+e-t*e,a=2*t-l;n=Ba(a,l,i+1/3),s=Ba(a,l,i),o=Ba(a,l,i-1/3)}return{red:Math.round(n*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}var wg=(i,e,t)=>{let r=i*i,n=e*e;return Math.sqrt(Math.max(0,t*(n-r)+r))},xg=[Wi,Ke,ut],Ad=i=>xg.find(e=>e.test(i)),Td=i=>`'${i}' is not an animatable color. Use the equivalent color code instead.`,As=(i,e)=>{let t=Ad(i),r=Ad(e);Ui(!!t,Td(i)),Ui(!!r,Td(e));let n=t.parse(i),s=r.parse(e);t===ut&&(n=Ha(n),t=Ke),r===ut&&(s=Ha(s),r=Ke);let o=Object.assign({},n);return l=>{for(let a in o)a!=="alpha"&&(o[a]=wg(n[a],s[a],l));return o.alpha=qi(n.alpha,s.alpha,l),t.transform(o)}};var Md=i=>typeof i=="number";var kg=(i,e)=>t=>e(i(t)),Ts=(...i)=>i.reduce(kg);function Rd(i,e){return Md(i)?t=>qi(i,e,t):jt.test(i)?As(i,e):Va(i,e)}var za=(i,e)=>{let t=[...i],r=t.length,n=i.map((s,o)=>Rd(s,e[o]));return s=>{for(let o=0;o<r;o++)t[o]=n[o](s);return t}},Od=(i,e)=>{let t=Object.assign(Object.assign({},i),e),r={};for(let n in t)i[n]!==void 0&&e[n]!==void 0&&(r[n]=Rd(i[n],e[n]));return n=>{for(let s in r)t[s]=r[s](n);return t}};function Pd(i){let e=Is.parse(i),t=e.length,r=0,n=0,s=0;for(let o=0;o<t;o++)r||typeof e[o]=="number"?r++:e[o].hue!==void 0?s++:n++;return{parsed:e,numNumbers:r,numRGB:n,numHSL:s}}var Va=(i,e)=>{let t=Is.createTransformer(e),r=Pd(i),n=Pd(e);return r.numHSL===n.numHSL&&r.numRGB===n.numRGB&&r.numNumbers>=n.numNumbers?Ts(za(r.parsed,n.parsed),t):(bs(!0,`Complex values '${i}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),o=>`${o>0?e:i}`)};var Cg=(i,e)=>t=>qi(i,e,t);function Sg(i){if(typeof i=="number")return Cg;if(typeof i=="string")return jt.test(i)?As:Va;if(Array.isArray(i))return za;if(typeof i=="object")return Od}function Eg(i,e,t){let r=[],n=t||Sg(i[0]),s=i.length-1;for(let o=0;o<s;o++){let l=n(i[o],i[o+1]);if(e){let a=Array.isArray(e)?e[o]:e;l=Ts(a,l)}r.push(l)}return r}function $g([i,e],[t]){return r=>t(qa(i,e,r))}function Ig(i,e){let t=i.length,r=t-1;return n=>{let s=0,o=!1;if(n<=i[0]?o=!0:n>=i[r]&&(s=r-1,o=!0),!o){let a=1;for(;a<t&&!(i[a]>n||a===r);a++);s=a-1}let l=qa(i[s],i[s+1],n);return e[s](l)}}function Ms(i,e,{clamp:t=!0,ease:r,mixer:n}={}){let s=i.length;Ui(s===e.length,"Both input and output ranges must be the same length"),Ui(!r||!Array.isArray(r)||r.length===s-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),i[0]>i[s-1]&&(i=[].concat(i),e=[].concat(e),i.reverse(),e.reverse());let o=Eg(e,r,n),l=s===2?$g(i,o):Ig(i,o);return t?a=>l(jr(i[0],i[s-1],a)):l}var Ur=i=>e=>1-i(1-e),Ps=i=>e=>e<=.5?i(2*e)/2:(2-i(2*(1-e)))/2,Ld=i=>e=>Math.pow(e,i),Wa=i=>e=>e*e*((i+1)*e-i),Fd=i=>{let e=Wa(i);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))};var Dd=1.525,Ag=4/11,Tg=8/11,Mg=9/10;var jd=Ld(2),M_=Ur(jd),Nd=Ps(jd),Pg=i=>1-Math.sin(Math.acos(i)),Rg=Ur(Pg),P_=Ps(Rg),Ud=Wa(Dd),R_=Ur(Ud),O_=Ps(Ud),L_=Fd(Dd),Og=4356/361,Lg=35442/1805,Fg=16061/1805,Dg=i=>{if(i===1||i===0)return i;let e=i*i;return i<Ag?7.5625*e:i<Tg?9.075*e-9.9*i+3.4:i<Mg?Og*e-Lg*i+Fg:10.8*i*i-20.52*i+10.72},F_=Ur(Dg);function jg(i,e){return i.map(()=>e||Nd).splice(0,i.length-1)}function Ng(i){let e=i.length;return i.map((t,r)=>r!==0?r/(e-1):0)}function Ug(i,e){return i.map(t=>t*e)}function qr({from:i=0,to:e=1,ease:t,offset:r,duration:n=300}){let s={done:!1,value:i},o=Array.isArray(e)?e:[i,e],l=Ug(r&&r.length===o.length?r:Ng(o),n);function a(){return Ms(l,o,{ease:Array.isArray(t)?t:jg(o,t)})}let u=a();return{next:d=>(s.value=u(d),s.done=d>=n,s),flipTarget:()=>{o.reverse(),u=a()}}}function qd({velocity:i=0,from:e=0,power:t=.8,timeConstant:r=350,restDelta:n=.5,modifyTarget:s}){let o={done:!1,value:e},l=t*i,a=e+l,u=s===void 0?a:s(a);return u!==a&&(l=u-e),{next:d=>{let c=-l*Math.exp(-d/r);return o.done=!(c>n||c<-n),o.value=o.done?u:u+c,o},flipTarget:()=>{}}}var Bd={keyframes:qr,spring:xs,decay:qd};function Hd(i){if(Array.isArray(i.to))return qr;if(Bd[i.type])return Bd[i.type];let e=new Set(Object.keys(i));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?qr:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?xs:qr}var Ga=16.666666666666668,qg=typeof performance<"u"?()=>performance.now():()=>Date.now(),Za=typeof window<"u"?i=>window.requestAnimationFrame(i):i=>setTimeout(()=>i(qg()),Ga);function zd(i){let e=[],t=[],r=0,n=!1,s=!1,o=new WeakSet,l={schedule:(a,u=!1,d=!1)=>{let c=d&&n,p=c?e:t;return u&&o.add(a),p.indexOf(a)===-1&&(p.push(a),c&&n&&(r=e.length)),a},cancel:a=>{let u=t.indexOf(a);u!==-1&&t.splice(u,1),o.delete(a)},process:a=>{if(n){s=!0;return}if(n=!0,[e,t]=[t,e],t.length=0,r=e.length,r)for(let u=0;u<r;u++){let d=e[u];d(a),o.has(d)&&(l.schedule(d),i())}n=!1,s&&(s=!1,l.process(a))}};return l}var Bg=40,Ja=!0,Hr=!1,Xa=!1,Br={delta:0,timestamp:0},zr=["read","update","preRender","render","postRender"],Rs=zr.reduce((i,e)=>(i[e]=zd(()=>Hr=!0),i),{}),Hg=zr.reduce((i,e)=>{let t=Rs[e];return i[e]=(r,n=!1,s=!1)=>(Hr||Vg(),t.schedule(r,n,s)),i},{}),Vd=zr.reduce((i,e)=>(i[e]=Rs[e].cancel,i),{}),X_=zr.reduce((i,e)=>(i[e]=()=>Rs[e].process(Br),i),{}),zg=i=>Rs[i].process(Br),Wd=i=>{Hr=!1,Br.delta=Ja?Ga:Math.max(Math.min(i-Br.timestamp,Bg),1),Br.timestamp=i,Xa=!0,zr.forEach(zg),Xa=!1,Hr&&(Ja=!1,Za(Wd))},Vg=()=>{Hr=!0,Ja=!0,Xa||Za(Wd)};var Gd=Hg;function Ka(i,e,t=0){return i-e-t}function Zd(i,e,t=0,r=!0){return r?Ka(e+-i,e,t):e-(i-e)+t}function Jd(i,e,t,r){return r?i>=e+t:i<=-t}var Wg=i=>{let e=({delta:t})=>i(t);return{start:()=>Gd.update(e,!0),stop:()=>Vd.update(e)}};function Ya(i){var e,t,{from:r,autoplay:n=!0,driver:s=Wg,elapsed:o=0,repeat:l=0,repeatType:a="loop",repeatDelay:u=0,onPlay:d,onStop:c,onComplete:p,onRepeat:h,onUpdate:g}=i,m=_s(i,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:b}=m,x,_=0,k=m.duration,S,R=!1,B=!0,U,P=Hd(m);!((t=(e=P).needsInterpolation)===null||t===void 0)&&t.call(e,r,b)&&(U=Ms([0,100],[r,b],{clamp:!1}),r=0,b=100);let q=P(Object.assign(Object.assign({},m),{from:r,to:b}));function W(){_++,a==="reverse"?(B=_%2===0,o=Zd(o,k,u,B)):(o=Ka(o,k,u),a==="mirror"&&q.flipTarget()),R=!1,h&&h()}function xe(){x.stop(),p&&p()}function pe(Z){if(B||(Z=-Z),o+=Z,!R){let X=q.next(Math.max(0,o));S=X.value,U&&(S=U(S)),R=B?X.done:o<=0}g?.(S),R&&(_===0&&(k??(k=o)),_<l?Jd(o,k,u,B)&&W():xe())}function je(){d?.(),x=s(pe),x.start()}return n&&je(),{stop:()=>{c?.(),x.stop()}}}var ie,Xd,Os,Kd,Ls,Yd,Qd,ep,Fs,Ds=class Ds extends z(N){constructor(){super();w(this,ie);this.product=void 0,this.labels={addToCart:"Add to cart",color:"Color",size:"Size"},this._currentImageIndex=0,this._isValidUrl=!1}willUpdate(t){t.has("product")&&$(this,ie,Xd).call(this)}get images(){return this.product?.images||[]}render(){if(!this.product)return y`
418
+ `}};w(Tn,"properties",{product:{type:Object},streaming:{type:Boolean},linksNewTab:{type:Boolean,attribute:"links-new-tab"},searchParams:{type:Object},imagesByProductUrl:{type:Object}});customElements.get("mw-product-card-horizontal")||customElements.define("mw-product-card-horizontal",Tn);function On(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}var Ln=function(){},St=function(){};var mr=(t,e,r)=>Math.min(Math.max(r,t),e);var ms=.001,ec=.01,va=10,tc=.05,rc=1;function wa({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let i,s;Ln(t<=va*1e3,"Spring duration must be 10 seconds or less");let o=1-e;o=mr(tc,rc,o),t=mr(ec,va,t/1e3),o<1?(i=c=>{let f=c*o,p=f*t,b=f-r,x=jn(c,o),k=Math.exp(-p);return ms-b/x*k},s=c=>{let p=c*o*t,b=p*r+r,x=Math.pow(o,2)*Math.pow(c,2)*t,k=Math.exp(-p),_=jn(Math.pow(c,2),o);return(-i(c)+ms>0?-1:1)*((b-x)*k)/_}):(i=c=>{let f=Math.exp(-c*t),p=(c-r)*t+1;return-ms+f*p},s=c=>{let f=Math.exp(-c*t),p=(r-c)*(t*t);return f*p});let u=5/t,a=ic(i,s,u);if(t=t*1e3,isNaN(a))return{stiffness:100,damping:10,duration:t};{let c=Math.pow(a,2)*n;return{stiffness:c,damping:o*2*Math.sqrt(n*c),duration:t}}}var nc=12;function ic(t,e,r){let n=r;for(let i=1;i<nc;i++)n=n-t(n)/e(n);return n}function jn(t,e){return t*Math.sqrt(1-e*e)}var sc=["duration","bounce"],oc=["stiffness","damping","mass"];function ba(t,e){return e.some(r=>t[r]!==void 0)}function ac(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!ba(t,oc)&&ba(t,sc)){let r=wa(t);e=Object.assign(Object.assign(Object.assign({},e),r),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function Dn(t){var{from:e=0,to:r=1,restSpeed:n=2,restDelta:i}=t,s=On(t,["from","to","restSpeed","restDelta"]);let o={done:!1,value:e},{stiffness:u,damping:a,mass:c,velocity:f,duration:p,isResolvedFromDuration:b}=ac(s),x=xa,k=xa;function _(){let M=f?-(f/1e3):0,j=r-e,$=a/(2*Math.sqrt(u*c)),A=Math.sqrt(u/c)/1e3;if(i===void 0&&(i=Math.min(Math.abs(r-e)/100,.4)),$<1){let I=jn(A,$);x=H=>{let z=Math.exp(-$*A*H);return r-z*((M+$*A*j)/I*Math.sin(I*H)+j*Math.cos(I*H))},k=H=>{let z=Math.exp(-$*A*H);return $*A*z*(Math.sin(I*H)*(M+$*A*j)/I+j*Math.cos(I*H))-z*(Math.cos(I*H)*(M+$*A*j)-I*j*Math.sin(I*H))}}else if($===1)x=I=>r-Math.exp(-A*I)*(j+(M+A*j)*I);else{let I=A*Math.sqrt($*$-1);x=H=>{let z=Math.exp(-$*A*H),J=Math.min(I*H,300);return r-z*((M+$*A*j)*Math.sinh(J)+I*j*Math.cosh(J))/I}}}return _(),{next:M=>{let j=x(M);if(b)o.done=M>=p;else{let $=k(M)*1e3,A=Math.abs($)<=n,I=Math.abs(r-j)<=i;o.done=A&&I}return o.value=o.done?r:j,o},flipTarget:()=>{f=-f,[e,r]=[r,e],_()}}}Dn.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";var xa=t=>0;var gs=(t,e,r)=>{let n=e-t;return n===0?1:(r-t)/n};var _t=(t,e,r)=>-r*t+r*e+t;var Rn=(t,e)=>r=>Math.max(Math.min(r,e),t),Pe=t=>t%1?Number(t.toFixed(5)):t,At=/(-)?([\d]*\.?[\d])+/g,Pn=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,ka=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Me(t){return typeof t=="string"}var Mt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Un=Object.assign(Object.assign({},Mt),{transform:Rn(0,1)}),Jf=Object.assign(Object.assign({},Mt),{default:1});var gr=t=>({test:e=>Me(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Qf=gr("deg"),It=gr("%"),eh=gr("px"),th=gr("vh"),rh=gr("vw"),nh=Object.assign(Object.assign({},It),{parse:t=>It.parse(t)/100,transform:t=>It.transform(t*100)});var Tt=(t,e)=>r=>!!(Me(r)&&ka.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),Vn=(t,e,r)=>n=>{if(!Me(n))return n;let[i,s,o,u]=n.match(At);return{[t]:parseFloat(i),[e]:parseFloat(s),[r]:parseFloat(o),alpha:u!==void 0?parseFloat(u):1}};var be={test:Tt("hsl","hue"),parse:Vn("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+It.transform(Pe(e))+", "+It.transform(Pe(r))+", "+Pe(Un.transform(n))+")"};var lc=Rn(0,255),Fn=Object.assign(Object.assign({},Mt),{transform:t=>Math.round(lc(t))}),fe={test:Tt("rgb","red"),parse:Vn("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+Fn.transform(t)+", "+Fn.transform(e)+", "+Fn.transform(r)+", "+Pe(Un.transform(n))+")"};function uc(t){let e="",r="",n="",i="";return t.length>5?(e=t.substr(1,2),r=t.substr(3,2),n=t.substr(5,2),i=t.substr(7,2)):(e=t.substr(1,1),r=t.substr(2,1),n=t.substr(3,1),i=t.substr(4,1),e+=e,r+=r,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}var Ot={test:Tt("#"),parse:uc,transform:fe.transform};var Ue={test:t=>fe.test(t)||Ot.test(t)||be.test(t),parse:t=>fe.test(t)?fe.parse(t):be.test(t)?be.parse(t):Ot.parse(t),transform:t=>Me(t)?t:t.hasOwnProperty("red")?fe.transform(t):be.transform(t)};var Ca="${c}",$a="${n}";function cc(t){var e,r,n,i;return isNaN(t)&&Me(t)&&((r=(e=t.match(At))===null||e===void 0?void 0:e.length)!==null&&r!==void 0?r:0)+((i=(n=t.match(Pn))===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0)>0}function Ea(t){typeof t=="number"&&(t=`${t}`);let e=[],r=0,n=t.match(Pn);n&&(r=n.length,t=t.replace(Pn,Ca),e.push(...n.map(Ue.parse)));let i=t.match(At);return i&&(t=t.replace(At,$a),e.push(...i.map(Mt.parse))),{values:e,numColors:r,tokenised:t}}function Sa(t){return Ea(t).values}function _a(t){let{values:e,numColors:r,tokenised:n}=Ea(t),i=e.length;return s=>{let o=n;for(let u=0;u<i;u++)o=o.replace(u<r?Ca:$a,u<r?Ue.transform(s[u]):Pe(s[u]));return o}}var pc=t=>typeof t=="number"?0:t;function fc(t){let e=Sa(t);return _a(t)(e.map(pc))}var Hn={test:cc,parse:Sa,createTransformer:_a,getAnimatableNone:fc};function ys(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function vs({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let i=0,s=0,o=0;if(!e)i=s=o=r;else{let u=r<.5?r*(1+e):r+e-r*e,a=2*r-u;i=ys(a,u,t+1/3),s=ys(a,u,t),o=ys(a,u,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}var hc=(t,e,r)=>{let n=t*t,i=e*e;return Math.sqrt(Math.max(0,r*(i-n)+n))},dc=[Ot,fe,be],Aa=t=>dc.find(e=>e.test(t)),Ma=t=>`'${t}' is not an animatable color. Use the equivalent color code instead.`,Nn=(t,e)=>{let r=Aa(t),n=Aa(e);St(!!r,Ma(t)),St(!!n,Ma(e));let i=r.parse(t),s=n.parse(e);r===be&&(i=vs(i),r=fe),n===be&&(s=vs(s),n=fe);let o=Object.assign({},i);return u=>{for(let a in o)a!=="alpha"&&(o[a]=hc(i[a],s[a],u));return o.alpha=_t(i.alpha,s.alpha,u),r.transform(o)}};var Ia=t=>typeof t=="number";var mc=(t,e)=>r=>e(t(r)),Bn=(...t)=>t.reduce(mc);function Oa(t,e){return Ia(t)?r=>_t(t,e,r):Ue.test(t)?Nn(t,e):bs(t,e)}var ws=(t,e)=>{let r=[...t],n=r.length,i=t.map((s,o)=>Oa(s,e[o]));return s=>{for(let o=0;o<n;o++)r[o]=i[o](s);return r}},La=(t,e)=>{let r=Object.assign(Object.assign({},t),e),n={};for(let i in r)t[i]!==void 0&&e[i]!==void 0&&(n[i]=Oa(t[i],e[i]));return i=>{for(let s in n)r[s]=n[s](i);return r}};function Ta(t){let e=Hn.parse(t),r=e.length,n=0,i=0,s=0;for(let o=0;o<r;o++)n||typeof e[o]=="number"?n++:e[o].hue!==void 0?s++:i++;return{parsed:e,numNumbers:n,numRGB:i,numHSL:s}}var bs=(t,e)=>{let r=Hn.createTransformer(e),n=Ta(t),i=Ta(e);return n.numHSL===i.numHSL&&n.numRGB===i.numRGB&&n.numNumbers>=i.numNumbers?Bn(ws(n.parsed,i.parsed),r):(Ln(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),o=>`${o>0?e:t}`)};var gc=(t,e)=>r=>_t(t,e,r);function yc(t){if(typeof t=="number")return gc;if(typeof t=="string")return Ue.test(t)?Nn:bs;if(Array.isArray(t))return ws;if(typeof t=="object")return La}function vc(t,e,r){let n=[],i=r||yc(t[0]),s=t.length-1;for(let o=0;o<s;o++){let u=i(t[o],t[o+1]);if(e){let a=Array.isArray(e)?e[o]:e;u=Bn(a,u)}n.push(u)}return n}function wc([t,e],[r]){return n=>r(gs(t,e,n))}function bc(t,e){let r=t.length,n=r-1;return i=>{let s=0,o=!1;if(i<=t[0]?o=!0:i>=t[n]&&(s=n-1,o=!0),!o){let a=1;for(;a<r&&!(t[a]>i||a===n);a++);s=a-1}let u=gs(t[s],t[s+1],i);return e[s](u)}}function qn(t,e,{clamp:r=!0,ease:n,mixer:i}={}){let s=t.length;St(s===e.length,"Both input and output ranges must be the same length"),St(!n||!Array.isArray(n)||n.length===s-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),t[0]>t[s-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());let o=vc(e,n,i),u=s===2?wc(t,o):bc(t,o);return r?a=>u(mr(t[0],t[s-1],a)):u}var yr=t=>e=>1-t(1-e),zn=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ja=t=>e=>Math.pow(e,t),xs=t=>e=>e*e*((t+1)*e-t),Da=t=>{let e=xs(t);return r=>(r*=2)<1?.5*e(r):.5*(2-Math.pow(2,-10*(r-1)))};var Ra=1.525,xc=4/11,kc=8/11,Cc=9/10;var Pa=ja(2),od=yr(Pa),Ua=zn(Pa),$c=t=>1-Math.sin(Math.acos(t)),Ec=yr($c),ad=zn(Ec),Va=xs(Ra),ld=yr(Va),ud=zn(Va),cd=Da(Ra),Sc=4356/361,_c=35442/1805,Ac=16061/1805,Mc=t=>{if(t===1||t===0)return t;let e=t*t;return t<xc?7.5625*e:t<kc?9.075*e-9.9*t+3.4:t<Cc?Sc*e-_c*t+Ac:10.8*t*t-20.52*t+10.72},pd=yr(Mc);function Ic(t,e){return t.map(()=>e||Ua).splice(0,t.length-1)}function Tc(t){let e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function Oc(t,e){return t.map(r=>r*e)}function vr({from:t=0,to:e=1,ease:r,offset:n,duration:i=300}){let s={done:!1,value:t},o=Array.isArray(e)?e:[t,e],u=Oc(n&&n.length===o.length?n:Tc(o),i);function a(){return qn(u,o,{ease:Array.isArray(r)?r:Ic(o,r)})}let c=a();return{next:f=>(s.value=c(f),s.done=f>=i,s),flipTarget:()=>{o.reverse(),c=a()}}}function Fa({velocity:t=0,from:e=0,power:r=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:s}){let o={done:!1,value:e},u=r*t,a=e+u,c=s===void 0?a:s(a);return c!==a&&(u=c-e),{next:f=>{let p=-u*Math.exp(-f/n);return o.done=!(p>i||p<-i),o.value=o.done?c:c+p,o},flipTarget:()=>{}}}var Ha={keyframes:vr,spring:Dn,decay:Fa};function Na(t){if(Array.isArray(t.to))return vr;if(Ha[t.type])return Ha[t.type];let e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?vr:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?Dn:vr}var ks=16.666666666666668,Lc=typeof performance<"u"?()=>performance.now():()=>Date.now(),Cs=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Lc()),ks);function Ba(t){let e=[],r=[],n=0,i=!1,s=!1,o=new WeakSet,u={schedule:(a,c=!1,f=!1)=>{let p=f&&i,b=p?e:r;return c&&o.add(a),b.indexOf(a)===-1&&(b.push(a),p&&i&&(n=e.length)),a},cancel:a=>{let c=r.indexOf(a);c!==-1&&r.splice(c,1),o.delete(a)},process:a=>{if(i){s=!0;return}if(i=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let c=0;c<n;c++){let f=e[c];f(a),o.has(f)&&(u.schedule(f),t())}i=!1,s&&(s=!1,u.process(a))}};return u}var jc=40,$s=!0,br=!1,Es=!1,wr={delta:0,timestamp:0},xr=["read","update","preRender","render","postRender"],Wn=xr.reduce((t,e)=>(t[e]=Ba(()=>br=!0),t),{}),Dc=xr.reduce((t,e)=>{let r=Wn[e];return t[e]=(n,i=!1,s=!1)=>(br||Pc(),r.schedule(n,i,s)),t},{}),qa=xr.reduce((t,e)=>(t[e]=Wn[e].cancel,t),{}),Ed=xr.reduce((t,e)=>(t[e]=()=>Wn[e].process(wr),t),{}),Rc=t=>Wn[t].process(wr),za=t=>{br=!1,wr.delta=$s?ks:Math.max(Math.min(t-wr.timestamp,jc),1),wr.timestamp=t,Es=!0,xr.forEach(Rc),Es=!1,br&&($s=!1,Cs(za))},Pc=()=>{br=!0,$s=!0,Es||Cs(za)};var Wa=Dc;function Ss(t,e,r=0){return t-e-r}function Za(t,e,r=0,n=!0){return n?Ss(e+-t,e,r):e-(t-e)+r}function Ga(t,e,r,n){return n?t>=e+r:t<=-r}var Uc=t=>{let e=({delta:r})=>t(r);return{start:()=>Wa.update(e,!0),stop:()=>qa.update(e)}};function _s(t){var e,r,{from:n,autoplay:i=!0,driver:s=Uc,elapsed:o=0,repeat:u=0,repeatType:a="loop",repeatDelay:c=0,onPlay:f,onStop:p,onComplete:b,onRepeat:x,onUpdate:k}=t,_=On(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:M}=_,j,$=0,A=_.duration,I,H=!1,z=!0,J,L=Na(_);!((r=(e=L).needsInterpolation)===null||r===void 0)&&r.call(e,n,M)&&(J=qn([0,100],[n,M],{clamp:!1}),n=0,M=100);let K=L(Object.assign(Object.assign({},_),{from:n,to:M}));function re(){$++,a==="reverse"?(z=$%2===0,o=Za(o,A,c,z)):(o=Ss(o,A,c),a==="mirror"&&K.flipTarget()),H=!1,x&&x()}function Si(){j.stop(),b&&b()}function ze(N){if(z||(N=-N),o+=N,!H){let Q=K.next(Math.max(0,o));I=Q.value,J&&(I=J(I)),H=z?Q.done:o<=0}k?.(I),H&&($===0&&(A??(A=o)),$<u?Ga(o,A,c,z)&&re():Si())}function Kr(){f?.(),j=s(ze),j.start()}return i&&Kr(),{stop:()=>{p?.(),j.stop()}}}var P,Xa,Zn,Ja,Gn,Ka,Ya,Qa,Xn,Jn=class Jn extends T(S){constructor(){super();d(this,P);this.product=void 0,this.labels={addToCart:"Add to cart",color:"Color",size:"Size"},this._currentImageIndex=0,this._isValidUrl=!1}willUpdate(r){r.has("product")&&m(this,P,Xa).call(this)}get images(){return this.product?.images||[]}render(){if(!this.product)return h`
409
419
  <div class="my-2 w-full rounded-3xl border bg-white p-4">
410
420
  <div class="relative mx-auto mb-4 max-w-[240px]">
411
421
  <div class="h-[180px] w-full animate-pulse rounded-2xl bg-gray-200"></div>
@@ -424,12 +434,12 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
424
434
  <div class="h-8 flex-auto animate-pulse rounded-xl bg-gray-200"></div>
425
435
  </div>
426
436
  </div>
427
- `;if(this.product.layout==="horizontal")return y` <mw-product-card-horizontal product="${JSON.stringify(this.product)}"></mw-product-card-horizontal> `;let{name:t,description:r,price:n,category:s}=this.product;return y`
437
+ `;if(this.product.layout==="horizontal")return h` <mw-product-card-horizontal product="${JSON.stringify(this.product)}"></mw-product-card-horizontal> `;let{name:r,description:n,price:i,category:s}=this.product;return h`
428
438
  <div class="my-2 w-full rounded-3xl border-[0.5px] border-[#5e5d59]/25 bg-white p-4 hover:shadow-sm">
429
439
  <div class="pointer-events-auto mx-auto mb-4">
430
440
  <div class="group relative overflow-hidden rounded-2xl">
431
441
  <div class="image-slider z-0 flex transition-transform duration-300 ease-in-out" style="transform: translateX(-${this._currentImageIndex*100}%)">
432
- ${this.images.length>0?rt(this.images,o=>o,(o,l)=>y`
442
+ ${this.images.length>0?me(this.images,o=>o,(o,u)=>h`
433
443
  <!-- Cloudflare Images: resize the source image -->
434
444
  <img
435
445
  src="https://molin.foo/cdn-cgi/image/w=100,fit=scale-down,format=auto,quality=75,dpr=1/${o}"
@@ -437,10 +447,10 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
437
447
  https://molin.foo/cdn-cgi/image/w=100,fit=scale-down,format=auto,quality=75,dpr=1/${o} 1x,
438
448
  https://molin.foo/cdn-cgi/image/w=100,fit=scale-down,format=auto,quality=75,dpr=2/${o} 2x
439
449
  "
440
- alt="image ${l+1}: ${t}"
450
+ alt="image ${u+1}: ${r}"
441
451
  class="h-auto w-full flex-shrink-0 object-scale-down"
442
452
  loading="lazy" />
443
- `):y`
453
+ `):h`
444
454
  <div class="h-full w-full flex-shrink-0 object-scale-down"></div>
445
455
  <svg class="rounded-lg" height="144" viewBox="0 0 100 133" fill="none" xmlns="http://www.w3.org/2000/svg">
446
456
  <rect width="100" height="133" rx="2" fill="#EEEEEE" style="" transform="matrix(0.9999999999999999, 0, 0, 0.9999999999999999, 0, -7.105427357601002e-15)" />
@@ -452,71 +462,71 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
452
462
  </svg>
453
463
  `}
454
464
  </div>
455
- ${Or(this.images.length>1,()=>y`
465
+ ${pr(this.images.length>1,()=>h`
456
466
  <div class="absolute inset-0 flex items-center justify-between px-4">
457
467
  <button
458
- @click="${$(this,ie,Qd)}"
468
+ @click="${m(this,P,Ya)}"
459
469
  class="absolute left-2 top-1/2 flex h-5 w-5 -translate-y-1/2 items-center justify-center rounded-full bg-white bg-opacity-80 shadow transition-all hover:bg-opacity-100">
460
470
  <hi-outline class="block h-6 w-3" name="chevron-left"></hi-outline>
461
471
  </button>
462
472
  <button
463
- @click="${$(this,ie,Yd)}"
473
+ @click="${m(this,P,Ka)}"
464
474
  class="absolute right-2 top-1/2 flex h-5 w-5 -translate-y-1/2 items-center justify-center rounded-full bg-white bg-opacity-80 shadow transition-all hover:bg-opacity-100">
465
475
  <hi-outline class="block h-6 w-3" name="chevron-right"></hi-outline>
466
476
  </button>
467
477
  </div>
468
478
  `)}
469
- ${Or(this.images?.length>1,()=>y`
479
+ ${pr(this.images?.length>1,()=>h`
470
480
  <div class="slider-dots absolute bottom-3 left-1/2 flex -translate-x-1/2 gap-2">
471
- ${this.images.map((o,l)=>y`
481
+ ${this.images.map((o,u)=>h`
472
482
  <button
473
- @click="${()=>$(this,ie,ep).call(this,l)}"
474
- class="${l===this._currentImageIndex?"bg-opacity-100":"bg-opacity-60"} h-1.5 w-1.5 rounded-full bg-white transition-all hover:bg-opacity-80"></button>
483
+ @click="${()=>m(this,P,Qa).call(this,u)}"
484
+ class="${u===this._currentImageIndex?"bg-opacity-100":"bg-opacity-60"} h-1.5 w-1.5 rounded-full bg-white transition-all hover:bg-opacity-80"></button>
475
485
  `)}
476
486
  </div>
477
487
  `)}
478
488
  </div>
479
489
  </div>
480
- <div @click="${$(this,ie,Os)}" class="cursor-pointer">
481
- ${s?y`<a @click="${$(this,ie,Os)}" class="${this._isValidUrl?"":"pointer-events-none"} line-clamp-1 text-xs text-gray-600 hover:underline"> ${s} </a>`:null}
490
+ <div @click="${m(this,P,Zn)}" class="cursor-pointer">
491
+ ${s?h`<a @click="${m(this,P,Zn)}" class="${this._isValidUrl?"":"pointer-events-none"} line-clamp-1 text-xs text-gray-600 hover:underline"> ${s} </a>`:null}
482
492
 
483
493
  <h3
484
- @click="${$(this,ie,Os)}"
494
+ @click="${m(this,P,Zn)}"
485
495
  class="${this._isValidUrl?"":"pointer-events-none cursor-default"} mb-1 line-clamp-2 cursor-pointer text-lg font-semibold transition-all hover:underline">
486
- ${t||y`<span class="inline-block h-6 w-32 animate-pulse rounded bg-gray-200"></span>`}
496
+ ${r||h`<span class="inline-block h-6 w-32 animate-pulse rounded bg-gray-200"></span>`}
487
497
  </h3>
488
- ${r?y`<p class="mb-2 line-clamp-2 text-sm text-gray-600">${r}</p>`:y`<div class="mb-2 h-4 w-3/4 animate-pulse rounded bg-gray-200"></div>`}
489
- <span class="text-lg font-bold"> ${n||y`<span class="inline-block h-6 w-16 animate-pulse rounded bg-gray-200"></span>`} </span>
498
+ ${n?h`<p class="mb-2 line-clamp-2 text-sm text-gray-600">${n}</p>`:h`<div class="mb-2 h-4 w-3/4 animate-pulse rounded bg-gray-200"></div>`}
499
+ <span class="text-lg font-bold"> ${i||h`<span class="inline-block h-6 w-16 animate-pulse rounded bg-gray-200"></span>`} </span>
490
500
 
491
501
  <!-- <div class="my-4 border-t border-gray-200"></div> -->
492
502
 
493
503
  <!-- <button
494
- @click="${$(this,ie,Kd)}"
504
+ @click="${m(this,P,Ja)}"
495
505
  ?disabled="${!this._isValidUrl}"
496
506
  class="${this._isValidUrl?"bg-gray-900 hover:bg-gray-800":"bg-gray-900/80 cursor-default"} w-full rounded-xl px-4 py-1.5 text-sm text-white">
497
507
  ${this.labels.addToCart}
498
508
  </button> -->
499
509
  </div>
500
510
  </div>
501
- `}};ie=new WeakSet,Xd=function(){if(!this.product?.url){this._isValidUrl=!1;return}try{let t=new URL(this.product.url);this._isValidUrl=t.protocol==="http:"||t.protocol==="https:"}catch{this._isValidUrl=!1}},Os=function(t){t.preventDefault(),!(!this.product?.url||!this._isValidUrl)&&window.open(this.product.url,"_blank")},Kd=function(t){!this.product?.url||!this._isValidUrl||(window.open(this.product.url,"_blank"),this.dispatchEvent(new Ds.AddToCartEvent(this.product)))},Ls=function(t,r){f(this,ie,Fs)&&Ya({from:t,to:r,duration:300,onUpdate:n=>{f(this,ie,Fs)&&(f(this,ie,Fs).style.transform=`translateX(${n}%)`)}})},Yd=function(){if(!this.product?.images?.length)return;let t=this._currentImageIndex,r=(t+1)%this.product.images.length,n=-(t*100),s=-(r*100);$(this,ie,Ls).call(this,n,s),this._currentImageIndex=r},Qd=function(){if(!this.product?.images?.length)return;let t=this._currentImageIndex,r=(t-1+this.product.images.length)%this.product.images.length,n=-(t*100),s=-(r*100);$(this,ie,Ls).call(this,n,s),this._currentImageIndex=r},ep=function(t){if(!this.product?.images?.length)return;let r=this._currentImageIndex,n=Math.max(0,Math.min(t,this.product.images.length-1)),s=-(r*100),o=-(n*100);$(this,ie,Ls).call(this,s,o),this._currentImageIndex=n},Fs=function(){return this.renderRoot.querySelector(".image-slider")},M(Ds,"properties",{product:{type:Object},labels:{type:Object},_currentImageIndex:{type:Number,state:!0},_isValidUrl:{type:Boolean,state:!0}});var Vr=Ds,Qa;Vr.AddToCartEvent=(Qa=class extends CustomEvent{constructor(e,t={}){super(Vr.AddToCartEvent.type,{detail:{product:e},...t})}},M(Qa,"type","mw-product-card:add-to-cart"),Qa);customElements.get("mw-product-card")||customElements.define("mw-product-card",Vr);var Wr,Ue,ct,Gr,el,js=class{constructor(e,t){w(this,Gr);w(this,Wr);w(this,Ue);w(this,ct);if(!e)throw new Error("host is required");if(!t)throw new Error("config is required");E(this,Wr,e),f(this,Wr).addController(this),E(this,Ue,t)}connect(e){E(this,Ue,e),E(this,ct,$(this,Gr,el).call(this))}hostConnected(){setTimeout(()=>{E(this,ct,$(this,Gr,el).call(this))},0)}hostDisconnected(){f(this,ct)?.close(1e3,"lit_host_disconnected"),E(this,ct,void 0)}send(e){f(this,ct)?.send(e)}close(e,t){f(this,ct)?.close(e,t)}get isConnected(){return f(this,ct)?.readyState===WebSocket.OPEN}};Wr=new WeakMap,Ue=new WeakMap,ct=new WeakMap,Gr=new WeakSet,el=function(){let e=new WebSocket(f(this,Ue).url());return f(this,Ue).onClose&&(e.onclose=f(this,Ue).onClose),f(this,Ue).onOpen&&(e.onopen=f(this,Ue).onOpen),f(this,Ue).onError&&(e.onerror=f(this,Ue).onError),f(this,Ue).onMessage&&(e.onmessage=f(this,Ue).onMessage),e};var tp="664df22d-d461-42d6-801e-f70247e2cd7c",_e,be,nt,Gi,Zi,ke,si,ip,rp,np,sp,Ns=class{constructor(e,t){w(this,ke);w(this,_e);w(this,be);w(this,nt);M(this,"isStreaming",!1);M(this,"typingIndicator");M(this,"ranOutOfCredits",!1);M(this,"messages",[]);M(this,"conversationId","");w(this,Gi,0);w(this,Zi);M(this,"isLiveMode",!1);E(this,_e,e),E(this,be,t),E(this,nt,this.initWS()),e.addController(this)}sendUserInput(e,{xUserData:t,xCustomInstructions:r,role:n="user",expectStreaming:s=!1}={}){return $(this,ke,si).call(this,{type:"USER_INPUT",value:e,role:n,xUserData:t,xCustomInstructions:r},{expectStreaming:s})}sendUserCancel(){return $(this,ke,si).call(this,{type:"USER_CANCEL"})}sendUserTypingStart(){return $(this,ke,si).call(this,{type:"USER_TYPING_START"})}sendUserTypingStop(){return $(this,ke,si).call(this,{type:"USER_TYPING_STOP"})}reloadConfig(){$(this,ke,si).call(this,{type:"RELOAD_CONFIG"})}close(){f(this,nt).close(1e3,"closed by user")}retry(){clearTimeout(f(this,Zi)),E(this,Zi,setTimeout(()=>{f(this,be).onReconnect?.(),E(this,nt,this.initWS())},1e3*f(this,Gi))),ac(this,Gi)._++}initWS(){return new js(f(this,_e),{url:()=>f(this,be).url(this.conversationId,{}),onOpen:e=>$(this,ke,ip).call(this,e),onMessage:e=>$(this,ke,rp).call(this,JSON.parse(e.data)),onError:e=>$(this,ke,np).call(this,e),onClose:e=>$(this,ke,sp).call(this,e)})}hostConnected(){this.conversationId=f(this,be).restoreConversationState?.()?.conversationId||"",this.messages=f(this,be).restoreConversationState?.()?.messages||[]}reset(){$(this,ke,si).call(this,{type:"NEW_CHAT"}),f(this,be).onReset?.(),this.isStreaming=!1,this.typingIndicator=void 0,this.ranOutOfCredits=!1,this.messages=[],this.conversationId="",this.isLiveMode=!1,f(this,_e).requestUpdate()}hostDisconnected(){clearTimeout(f(this,Zi))}reconnectSocket(){f(this,nt).close(1e3,"destroy"),E(this,nt,this.initWS())}get lastMsg(){if(this.messages.length>0)return this.messages[this.messages.length-1]}};_e=new WeakMap,be=new WeakMap,nt=new WeakMap,Gi=new WeakMap,Zi=new WeakMap,ke=new WeakSet,si=function(e,{expectStreaming:t=!1}={}){return f(this,nt).isConnected?(t&&!this.isLiveMode&&(this.isStreaming=!0,f(this,_e).requestUpdate()),f(this,nt).send(JSON.stringify(e)),!0):(console.warn("WebSocket is not connected, message not sent - reconnecting now",e),this.retry(),!1)},ip=function(e){E(this,Gi,0)},rp=function(e){switch(e.type){case"NEW_MESSAGE":{this.messages=[...this.messages,{...e.message,streaming:!0}].filter((t,r,n)=>r===n.findIndex(s=>s.id===t.id)),this.typingIndicator=void 0,f(this,_e).requestUpdate(),f(this,be).onNewMessage?.(e.message);break}case"APPEND_MESSAGE":{let t=this.messages.find(r=>r.id===e.message.id);if(t){switch(e.message.content_type){case"text":{let{part:r,delta:n,position:s}=e.message;t.content=t.content.slice(0,s)+n,t.parts||=[],t.parts[r]={text:t.parts[r]&&"text"in t.parts[r]?(t.parts[r].text||"").slice(0,s)+n:n};break}case"html":{let{part:r,delta:n,position:s}=e.message;t.parts||=[],t.parts[r]={html:t.parts[r]&&"html"in t.parts[r]?(t.parts[r].html||"").slice(0,s)+n:n};break}case"data":{let{part:r}=e.message;t.parts||=[],t.parts[r]={tag:e.message.tag,data:t.parts[r]&&"data"in t.parts[r]?Object.assign(t.parts[r].data||{},e.message.data):e.message.data};break}}e.metadata&&(t.metadata=e.metadata),f(this,be).onMessageAppend?.(e),f(this,_e).requestUpdate()}else throw new Error(`Message with id ${e.message.id} not found`);break}case"MESSAGE_DONE":{let t=this.messages.find(r=>r.id===e.message.id);if(t)Object.assign(t,e.message),t.streaming=!1;else throw new Error(`Message with id ${e.message.id} not found`);this.isStreaming=!1,f(this,_e).requestUpdate(),f(this,be).onMessageDone?.(e,t),f(this,be).persistConversationState?.(this.conversationId,this.messages);break}case"MESSAGE_CANCEL":{this.isStreaming=!1,this.typingIndicator=void 0,f(this,_e).requestUpdate();break}case"ERROR":{f(this,be).onMessageError?.(e);break}case"CONNECTED":{this.conversationId=e.conversationId,this.messages=e.messages,f(this,be).onConnect?.(e.conversationId),f(this,be).persistConversationState?.(this.conversationId,this.messages),this.isLiveMode=e.metadata?.isLiveMode,f(this,_e).requestUpdate();break}case"TYPING_START":{e.role==="assistant"&&(this.isStreaming=!0),this.typingIndicator={role:e.role,metadata:e.metadata},f(this,_e).requestUpdate();break}case"TYPING_STOP":{this.typingIndicator=void 0,f(this,_e).requestUpdate();break}case"RAN_OUT_OF_CREDITS":{this.messages.some(t=>t.id===tp)||this.messages.push({id:tp,role:"assistant",content:"Sorry, I've run out of credits. Please contact the shop directly.",timestamp:Date.now()}),this.ranOutOfCredits=!0,f(this,_e).requestUpdate();break}case"RECONNECT":{this.reconnectSocket(),f(this,_e).requestUpdate();break}default:console.warn(`Unknown message type: ${JSON.stringify(e)}`)}},np=function(e){console.error("onError",e),f(this,be).onError?.(e)},sp=function(e){f(this,_e).isConnected&&!f(this,nt).isConnected&&e.reason==="reconnect"&&this.retry(),this.isStreaming=!1,this.typingIndicator=void 0,f(this,_e).requestUpdate(),f(this,be).onClose?.()};function Ji(i){return Array.isArray(i)?i:i?[i]:[]}function op(i,e){let t=new Map;for(let r of i){let n=e(r);t.has(n)||t.set(n,[]),(t.get(n)||[]).push(r)}return t}var Zr=class extends Oi{constructor(e){if(super(e),this.it=j,e.type!==ds.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===j||e==null)return this._t=void 0,this.it=e;if(e===tt)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};Zr.directiveName="unsafeHTML",Zr.resultType=1;var ap=ps(Zr);var tl;function il(i){return{lang:i?.lang??tl?.lang,message:i?.message,abortEarly:i?.abortEarly??tl?.abortEarly,abortPipeEarly:i?.abortPipeEarly??tl?.abortPipeEarly}}var Gg;function Zg(i){return Gg?.get(i)}var Jg;function Xg(i){return Jg?.get(i)}var Kg;function Yg(i,e){return Kg?.get(i)?.get(e)}function up(i){let e=typeof i;return e==="string"?`"${i}"`:e==="number"||e==="bigint"||e==="boolean"?`${i}`:e==="object"||e==="function"?(i&&Object.getPrototypeOf(i)?.constructor?.name)??"null":e}function Ye(i,e,t,r,n){let s=n&&"input"in n?n.input:t.value,o=n?.expected??i.expects??null,l=n?.received??up(s),a={kind:i.kind,type:i.type,input:s,expected:o,received:l,message:`Invalid ${e}: ${o?`Expected ${o} but r`:"R"}eceived ${l}`,requirement:i.requirement,path:n?.path,issues:n?.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},u=i.kind==="schema",d=n?.message??i.message??Yg(i.reference,a.lang)??(u?Xg(a.lang):null)??r.message??Zg(a.lang);d&&(a.message=typeof d=="function"?d(a):d),u&&(t.typed=!1),t.issues?t.issues.push(a):t.issues=[a]}function Ve(i){return{version:1,vendor:"valibot",validate(e){return i["~run"]({value:e},il())}}}function Qg(i,e){return Object.hasOwn(i,e)&&e!=="__proto__"&&e!=="prototype"&&e!=="constructor"}function cp(i,e){let t=[...new Set(i)];return t.length>1?`(${t.join(` ${e} `)})`:t[0]??"never"}var e1=class extends Error{constructor(i){super(i[0].message),this.name="ValiError",this.issues=i}};function rl(i,e){return{kind:"validation",type:"max_length",reference:rl,async:!1,expects:`<=${i}`,requirement:i,message:e,"~run"(t,r){return t.typed&&t.value.length>this.requirement&&Ye(this,"length",t,r,{received:`${t.value.length}`}),t}}}function nl(i,e){return{kind:"validation",type:"min_length",reference:nl,async:!1,expects:`>=${i}`,requirement:i,message:e,"~run"(t,r){return t.typed&&t.value.length<this.requirement&&Ye(this,"length",t,r,{received:`${t.value.length}`}),t}}}function t1(i,e,t){return typeof i.default=="function"?i.default(e,t):i.default}function sl(){return{kind:"schema",type:"any",reference:sl,expects:"any",async:!1,get"~standard"(){return Ve(this)},"~run"(i){return i.typed=!0,i}}}function Xi(i,e){return{kind:"schema",type:"array",reference:Xi,expects:"Array",async:!1,item:i,message:e,get"~standard"(){return Ve(this)},"~run"(t,r){let n=t.value;if(Array.isArray(n)){t.typed=!0,t.value=[];for(let s=0;s<n.length;s++){let o=n[s],l=this.item["~run"]({value:o},r);if(l.issues){let a={type:"array",origin:"value",input:n,key:s,value:o};for(let u of l.issues)u.path?u.path.unshift(a):u.path=[a],t.issues?.push(u);if(t.issues||(t.issues=l.issues),r.abortEarly){t.typed=!1;break}}l.typed||(t.typed=!1),t.value.push(l.value)}}else Ye(this,"type",t,r);return t}}}function ol(i){return{kind:"schema",type:"boolean",reference:ol,expects:"boolean",async:!1,message:i,get"~standard"(){return Ve(this)},"~run"(e,t){return typeof e.value=="boolean"?e.typed=!0:Ye(this,"type",e,t),e}}}function al(i){return{kind:"schema",type:"null",reference:al,expects:"null",async:!1,message:i,get"~standard"(){return Ve(this)},"~run"(e,t){return e.value===null?e.typed=!0:Ye(this,"type",e,t),e}}}function Jr(i){return{kind:"schema",type:"number",reference:Jr,expects:"number",async:!1,message:i,get"~standard"(){return Ve(this)},"~run"(e,t){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:Ye(this,"type",e,t),e}}}function wt(i,e){return{kind:"schema",type:"object",reference:wt,expects:"Object",async:!1,entries:i,message:e,get"~standard"(){return Ve(this)},"~run"(t,r){let n=t.value;if(n&&typeof n=="object"){t.typed=!0,t.value={};for(let s in this.entries){let o=n[s],l=this.entries[s]["~run"]({value:o},r);if(l.issues){let a={type:"object",origin:"value",input:n,key:s,value:o};for(let u of l.issues)u.path?u.path.unshift(a):u.path=[a],t.issues?.push(u);if(t.issues||(t.issues=l.issues),r.abortEarly){t.typed=!1;break}}l.typed||(t.typed=!1),(l.value!==void 0||s in n)&&(t.value[s]=l.value)}}else Ye(this,"type",t,r);return t}}}function Ki(i,e){return{kind:"schema",type:"optional",reference:Ki,expects:`(${i.expects} | undefined)`,async:!1,wrapped:i,default:e,get"~standard"(){return Ve(this)},"~run"(t,r){return t.value===void 0&&(this.default!==void 0&&(t.value=t1(this,t,r)),t.value===void 0)?(t.typed=!0,t):this.wrapped["~run"](t,r)}}}function ll(i,e){return{kind:"schema",type:"picklist",reference:ll,expects:cp(i.map(up),"|"),async:!1,options:i,message:e,get"~standard"(){return Ve(this)},"~run"(t,r){return this.options.includes(t.value)?t.typed=!0:Ye(this,"type",t,r),t}}}function Xr(i,e,t){return{kind:"schema",type:"record",reference:Xr,expects:"Object",async:!1,key:i,value:e,message:t,get"~standard"(){return Ve(this)},"~run"(r,n){let s=r.value;if(s&&typeof s=="object"){r.typed=!0,r.value={};for(let o in s)if(Qg(s,o)){let l=s[o],a=this.key["~run"]({value:o},n);if(a.issues){let d={type:"object",origin:"key",input:s,key:o,value:l};for(let c of a.issues)c.path=[d],r.issues?.push(c);if(r.issues||(r.issues=a.issues),n.abortEarly){r.typed=!1;break}}let u=this.value["~run"]({value:l},n);if(u.issues){let d={type:"object",origin:"value",input:s,key:o,value:l};for(let c of u.issues)c.path?c.path.unshift(d):c.path=[d],r.issues?.push(c);if(r.issues||(r.issues=u.issues),n.abortEarly){r.typed=!1;break}}(!a.typed||!u.typed)&&(r.typed=!1),a.typed&&(r.value[a.value]=u.value)}}else Ye(this,"type",r,n);return r}}}function ue(i){return{kind:"schema",type:"string",reference:ue,expects:"string",async:!1,message:i,get"~standard"(){return Ve(this)},"~run"(e,t){return typeof e.value=="string"?e.typed=!0:Ye(this,"type",e,t),e}}}function lp(i){let e;if(i)for(let t of i)e?e.push(...t.issues):e=t.issues;return e}function oi(i,e){return{kind:"schema",type:"union",reference:oi,expects:cp(i.map(t=>t.expects),"|"),async:!1,options:i,message:e,get"~standard"(){return Ve(this)},"~run"(t,r){let n,s,o;for(let l of this.options){let a=l["~run"]({value:t.value},r);if(a.typed)if(a.issues)s?s.push(a):s=[a];else{n=a;break}else o?o.push(a):o=[a]}if(n)return n;if(s){if(s.length===1)return s[0];Ye(this,"type",t,r,{issues:lp(s)}),t.typed=!0}else{if(o?.length===1)return o[0];Ye(this,"type",t,r,{issues:lp(o)})}return t}}}function dp(i,e,t){let r=i["~run"]({value:e},il(t));if(r.issues)throw new e1(r.issues);return r.value}function pp(i,e){let t={};for(let r in i.entries)t[r]=!e||e.includes(r)?Ki(i.entries[r]):i.entries[r];return{...i,entries:t,get"~standard"(){return Ve(this)}}}function hp(...i){return{...i[0],pipe:i,get"~standard"(){return Ve(this)},"~run"(e,t){for(let r of i)if(r.kind!=="metadata"){if(e.issues&&(r.kind==="schema"||r.kind==="transformation")){e.typed=!1;break}(!e.issues||!t.abortEarly&&!t.abortPipeEarly)&&(e=r["~run"](e,t))}return e}}}function Kr(i,e,t){let r=i["~run"]({value:e},il(t));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}var i1=pp(wt({name:ue(),description:ue(),price:ue(),image_url:oi([ue(),Xi(ue())]),category:ue(),url:ue()}));function fp(i,e,t,{imagesByProductUrl:r,linksNewTab:n=!0,searchParams:s,messageIsStreaming:o=!1}){if(!i)return y``;let l=e>0&&t[e-1]&&"data"in t[e-1],a=e<t.length-1||!o;if("text"in i)return y`<p>${i.text}</p>`;if("html"in i)return y`${ap(i.html)}`;if("data"in i)switch(i.tag){case"product-card":case"product-card-v1":case"product-card-horizontal":{let u=Kr(i1,i.data);if(u.success){let d={...u.output,images:[]};return d.images=Ji(d.image_url),y`
502
- ${l?y`<div class="my-3 w-full border-t border-gray-200/50"></div>`:null}
511
+ `}};P=new WeakSet,Xa=function(){if(!this.product?.url){this._isValidUrl=!1;return}try{let r=new URL(this.product.url);this._isValidUrl=r.protocol==="http:"||r.protocol==="https:"}catch{this._isValidUrl=!1}},Zn=function(r){r.preventDefault(),!(!this.product?.url||!this._isValidUrl)&&window.open(this.product.url,"_blank")},Ja=function(r){!this.product?.url||!this._isValidUrl||(window.open(this.product.url,"_blank"),this.dispatchEvent(new Jn.AddToCartEvent(this.product)))},Gn=function(r,n){l(this,P,Xn)&&_s({from:r,to:n,duration:300,onUpdate:i=>{l(this,P,Xn)&&(l(this,P,Xn).style.transform=`translateX(${i}%)`)}})},Ka=function(){if(!this.product?.images?.length)return;let r=this._currentImageIndex,n=(r+1)%this.product.images.length,i=-(r*100),s=-(n*100);m(this,P,Gn).call(this,i,s),this._currentImageIndex=n},Ya=function(){if(!this.product?.images?.length)return;let r=this._currentImageIndex,n=(r-1+this.product.images.length)%this.product.images.length,i=-(r*100),s=-(n*100);m(this,P,Gn).call(this,i,s),this._currentImageIndex=n},Qa=function(r){if(!this.product?.images?.length)return;let n=this._currentImageIndex,i=Math.max(0,Math.min(r,this.product.images.length-1)),s=-(n*100),o=-(i*100);m(this,P,Gn).call(this,s,o),this._currentImageIndex=i},Xn=function(){return this.renderRoot.querySelector(".image-slider")},w(Jn,"properties",{product:{type:Object},labels:{type:Object},_currentImageIndex:{type:Number,state:!0},_isValidUrl:{type:Boolean,state:!0}});var kr=Jn,As;kr.AddToCartEvent=(As=class extends CustomEvent{constructor(e,r={}){super(kr.AddToCartEvent.type,{detail:{product:e},...r})}},w(As,"type","mw-product-card:add-to-cart"),As);customElements.get("mw-product-card")||customElements.define("mw-product-card",kr);var Cr,ne,xe,$r,Ms,Kn=class{constructor(e,r){d(this,$r);d(this,Cr);d(this,ne);d(this,xe);if(!e)throw new Error("host is required");if(!r)throw new Error("config is required");g(this,Cr,e),l(this,Cr).addController(this),g(this,ne,r)}connect(e){g(this,ne,e),g(this,xe,m(this,$r,Ms).call(this))}hostConnected(){setTimeout(()=>{g(this,xe,m(this,$r,Ms).call(this))},0)}hostDisconnected(){l(this,xe)?.close(1e3,"lit_host_disconnected"),g(this,xe,void 0)}send(e){l(this,xe)?.send(e)}close(e,r){l(this,xe)?.close(e,r)}get isConnected(){return l(this,xe)?.readyState===WebSocket.OPEN}};Cr=new WeakMap,ne=new WeakMap,xe=new WeakMap,$r=new WeakSet,Ms=function(){let e=new WebSocket(l(this,ne).url());return l(this,ne).onClose&&(e.onclose=l(this,ne).onClose),l(this,ne).onOpen&&(e.onopen=l(this,ne).onOpen),l(this,ne).onError&&(e.onerror=l(this,ne).onError),l(this,ne).onMessage&&(e.onmessage=l(this,ne).onMessage),e};var el="664df22d-d461-42d6-801e-f70247e2cd7c",G,X,ge,Lt,jt,Y,rt,tl,rl,nl,il,Yn=class{constructor(e,r){d(this,Y);d(this,G);d(this,X);d(this,ge);w(this,"isStreaming",!1);w(this,"typingIndicator");w(this,"ranOutOfCredits",!1);w(this,"messages",[]);w(this,"conversationId","");d(this,Lt,0);d(this,jt);w(this,"isLiveMode",!1);g(this,G,e),g(this,X,r),g(this,ge,this.initWS()),e.addController(this)}sendUserInput(e,{xUserData:r,xCustomInstructions:n,role:i="user",expectStreaming:s=!1}={}){return m(this,Y,rt).call(this,{type:"USER_INPUT",value:e,role:i,xUserData:r,xCustomInstructions:n},{expectStreaming:s})}sendUserCancel(){return m(this,Y,rt).call(this,{type:"USER_CANCEL"})}sendUserTypingStart(){return m(this,Y,rt).call(this,{type:"USER_TYPING_START"})}sendUserTypingStop(){return m(this,Y,rt).call(this,{type:"USER_TYPING_STOP"})}reloadConfig(){m(this,Y,rt).call(this,{type:"RELOAD_CONFIG"})}close(){l(this,ge).close(1e3,"closed by user")}retry(){clearTimeout(l(this,jt)),g(this,jt,setTimeout(()=>{l(this,X).onReconnect?.(),g(this,ge,this.initWS())},1e3*l(this,Lt))),so(this,Lt)._++}initWS(){return new Kn(l(this,G),{url:()=>l(this,X).url(this.conversationId,{}),onOpen:e=>m(this,Y,tl).call(this,e),onMessage:e=>m(this,Y,rl).call(this,JSON.parse(e.data)),onError:e=>m(this,Y,nl).call(this,e),onClose:e=>m(this,Y,il).call(this,e)})}hostConnected(){this.conversationId=l(this,X).restoreConversationState?.()?.conversationId||"",this.messages=l(this,X).restoreConversationState?.()?.messages||[]}reset(){m(this,Y,rt).call(this,{type:"NEW_CHAT"}),l(this,X).onReset?.(),this.isStreaming=!1,this.typingIndicator=void 0,this.ranOutOfCredits=!1,this.messages=[],this.conversationId="",this.isLiveMode=!1,l(this,G).requestUpdate()}hostDisconnected(){clearTimeout(l(this,jt))}reconnectSocket(){l(this,ge).close(1e3,"destroy"),g(this,ge,this.initWS())}get lastMsg(){if(this.messages.length>0)return this.messages[this.messages.length-1]}};G=new WeakMap,X=new WeakMap,ge=new WeakMap,Lt=new WeakMap,jt=new WeakMap,Y=new WeakSet,rt=function(e,{expectStreaming:r=!1}={}){return l(this,ge).isConnected?(r&&!this.isLiveMode&&(this.isStreaming=!0,l(this,G).requestUpdate()),l(this,ge).send(JSON.stringify(e)),!0):(console.warn("WebSocket is not connected, message not sent - reconnecting now",e),this.retry(),!1)},tl=function(e){g(this,Lt,0)},rl=function(e){switch(e.type){case"NEW_MESSAGE":{this.messages=[...this.messages,{...e.message,streaming:!0}].filter((r,n,i)=>n===i.findIndex(s=>s.id===r.id)),this.typingIndicator=void 0,l(this,G).requestUpdate(),l(this,X).onNewMessage?.(e.message);break}case"APPEND_MESSAGE":{let r=this.messages.find(n=>n.id===e.message.id);if(r){switch(e.message.content_type){case"text":{let{part:n,delta:i,position:s}=e.message;r.content=r.content.slice(0,s)+i,r.parts||=[],r.parts[n]={text:r.parts[n]&&"text"in r.parts[n]?(r.parts[n].text||"").slice(0,s)+i:i};break}case"html":{let{part:n,delta:i,position:s}=e.message;r.parts||=[],r.parts[n]={html:r.parts[n]&&"html"in r.parts[n]?(r.parts[n].html||"").slice(0,s)+i:i};break}case"data":{let{part:n}=e.message;r.parts||=[],r.parts[n]={tag:e.message.tag,data:r.parts[n]&&"data"in r.parts[n]?Object.assign(r.parts[n].data||{},e.message.data):e.message.data};break}}e.metadata&&(r.metadata=e.metadata),l(this,X).onMessageAppend?.(e),l(this,G).requestUpdate()}else throw new Error(`Message with id ${e.message.id} not found`);break}case"MESSAGE_DONE":{let r=this.messages.find(n=>n.id===e.message.id);if(r)Object.assign(r,e.message),r.streaming=!1;else throw new Error(`Message with id ${e.message.id} not found`);this.isStreaming=!1,l(this,G).requestUpdate(),l(this,X).onMessageDone?.(e,r),l(this,X).persistConversationState?.(this.conversationId,this.messages);break}case"MESSAGE_CANCEL":{this.isStreaming=!1,this.typingIndicator=void 0,l(this,G).requestUpdate();break}case"ERROR":{l(this,X).onMessageError?.(e);break}case"CONNECTED":{this.conversationId=e.conversationId,this.messages=e.messages,l(this,X).onConnect?.(e.conversationId),l(this,X).persistConversationState?.(this.conversationId,this.messages),this.isLiveMode=e.metadata?.isLiveMode,l(this,G).requestUpdate();break}case"TYPING_START":{e.role==="assistant"&&(this.isStreaming=!0),this.typingIndicator={role:e.role,metadata:e.metadata},l(this,G).requestUpdate();break}case"TYPING_STOP":{this.typingIndicator=void 0,l(this,G).requestUpdate();break}case"RAN_OUT_OF_CREDITS":{this.messages.some(r=>r.id===el)||this.messages.push({id:el,role:"assistant",content:"Sorry, I've run out of credits. Please contact the shop directly.",timestamp:Date.now()}),this.ranOutOfCredits=!0,l(this,G).requestUpdate();break}case"RECONNECT":{this.reconnectSocket(),l(this,G).requestUpdate();break}default:console.warn(`Unknown message type: ${JSON.stringify(e)}`)}},nl=function(e){console.error("onError",e),l(this,X).onError?.(e)},il=function(e){l(this,G).isConnected&&!l(this,ge).isConnected&&e.reason==="reconnect"&&this.retry(),this.isStreaming=!1,this.typingIndicator=void 0,l(this,G).requestUpdate(),l(this,X).onClose?.()};function Dt(t){return Array.isArray(t)?t:t?[t]:[]}function sl(t,e){let r=new Map;for(let n of t){let i=e(n);r.has(i)||r.set(i,[]),(r.get(i)||[]).push(n)}return r}var Er=class extends wt{constructor(e){if(super(e),this.it=E,e.type!==Cn.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===E||e==null)return this._t=void 0,this.it=e;if(e===he)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let r=[e];return r.raw=r,this._t={_$litType$:this.constructor.resultType,strings:r,values:[]}}};Er.directiveName="unsafeHTML",Er.resultType=1;var ol=$n(Er);var Is;function Ts(t){return{lang:t?.lang??Is?.lang,message:t?.message,abortEarly:t?.abortEarly??Is?.abortEarly,abortPipeEarly:t?.abortPipeEarly??Is?.abortPipeEarly}}var Vc;function Fc(t){return Vc?.get(t)}var Hc;function Nc(t){return Hc?.get(t)}var Bc;function qc(t,e){return Bc?.get(t)?.get(e)}function ll(t){let e=typeof t;return e==="string"?`"${t}"`:e==="number"||e==="bigint"||e==="boolean"?`${t}`:e==="object"||e==="function"?(t&&Object.getPrototypeOf(t)?.constructor?.name)??"null":e}function oe(t,e,r,n,i){let s=i&&"input"in i?i.input:r.value,o=i?.expected??t.expects??null,u=i?.received??ll(s),a={kind:t.kind,type:t.type,input:s,expected:o,received:u,message:`Invalid ${e}: ${o?`Expected ${o} but r`:"R"}eceived ${u}`,requirement:t.requirement,path:i?.path,issues:i?.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=t.kind==="schema",f=i?.message??t.message??qc(t.reference,a.lang)??(c?Nc(a.lang):null)??n.message??Fc(a.lang);f&&(a.message=typeof f=="function"?f(a):f),c&&(r.typed=!1),r.issues?r.issues.push(a):r.issues=[a]}function ae(t){return{version:1,vendor:"valibot",validate(e){return t["~run"]({value:e},Ts())}}}function zc(t,e){return Object.hasOwn(t,e)&&e!=="__proto__"&&e!=="prototype"&&e!=="constructor"}function ul(t,e){let r=[...new Set(t)];return r.length>1?`(${r.join(` ${e} `)})`:r[0]??"never"}var Wc=class extends Error{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}};function Os(t,e){return{kind:"validation",type:"max_length",reference:Os,async:!1,expects:`<=${t}`,requirement:t,message:e,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&oe(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Ls(t,e){return{kind:"validation",type:"min_length",reference:Ls,async:!1,expects:`>=${t}`,requirement:t,message:e,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&oe(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Zc(t,e,r){return typeof t.fallback=="function"?t.fallback(e,r):t.fallback}function cl(t,e,r){return typeof t.default=="function"?t.default(e,r):t.default}function js(){return{kind:"schema",type:"any",reference:js,expects:"any",async:!1,get"~standard"(){return ae(this)},"~run"(t){return t.typed=!0,t}}}function Rt(t,e){return{kind:"schema",type:"array",reference:Rt,expects:"Array",async:!1,item:t,message:e,get"~standard"(){return ae(this)},"~run"(r,n){let i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let s=0;s<i.length;s++){let o=i[s],u=this.item["~run"]({value:o},n);if(u.issues){let a={type:"array",origin:"value",input:i,key:s,value:o};for(let c of u.issues)c.path?c.path.unshift(a):c.path=[a],r.issues?.push(c);if(r.issues||(r.issues=u.issues),n.abortEarly){r.typed=!1;break}}u.typed||(r.typed=!1),r.value.push(u.value)}}else oe(this,"type",r,n);return r}}}function Ds(t){return{kind:"schema",type:"boolean",reference:Ds,expects:"boolean",async:!1,message:t,get"~standard"(){return ae(this)},"~run"(e,r){return typeof e.value=="boolean"?e.typed=!0:oe(this,"type",e,r),e}}}function Rs(t){return{kind:"schema",type:"null",reference:Rs,expects:"null",async:!1,message:t,get"~standard"(){return ae(this)},"~run"(e,r){return e.value===null?e.typed=!0:oe(this,"type",e,r),e}}}function Sr(t){return{kind:"schema",type:"number",reference:Sr,expects:"number",async:!1,message:t,get"~standard"(){return ae(this)},"~run"(e,r){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:oe(this,"type",e,r),e}}}function Ie(t,e){return{kind:"schema",type:"object",reference:Ie,expects:"Object",async:!1,entries:t,message:e,get"~standard"(){return ae(this)},"~run"(r,n){let i=r.value;if(i&&typeof i=="object"){r.typed=!0,r.value={};for(let s in this.entries){let o=this.entries[s];if(s in i||(o.type==="exact_optional"||o.type==="optional"||o.type==="nullish")&&o.default!==void 0){let u=s in i?i[s]:cl(o),a=o["~run"]({value:u},n);if(a.issues){let c={type:"object",origin:"value",input:i,key:s,value:u};for(let f of a.issues)f.path?f.path.unshift(c):f.path=[c],r.issues?.push(f);if(r.issues||(r.issues=a.issues),n.abortEarly){r.typed=!1;break}}a.typed||(r.typed=!1),r.value[s]=a.value}else if(o.fallback!==void 0)r.value[s]=Zc(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(oe(this,"key",r,n,{input:void 0,expected:`"${s}"`,path:[{type:"object",origin:"key",input:i,key:s,value:i[s]}]}),n.abortEarly))break}}else oe(this,"type",r,n);return r}}}function Pt(t,e){return{kind:"schema",type:"optional",reference:Pt,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,get"~standard"(){return ae(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=cl(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Ps(t,e){return{kind:"schema",type:"picklist",reference:Ps,expects:ul(t.map(ll),"|"),async:!1,options:t,message:e,get"~standard"(){return ae(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:oe(this,"type",r,n),r}}}function _r(t,e,r){return{kind:"schema",type:"record",reference:_r,expects:"Object",async:!1,key:t,value:e,message:r,get"~standard"(){return ae(this)},"~run"(n,i){let s=n.value;if(s&&typeof s=="object"){n.typed=!0,n.value={};for(let o in s)if(zc(s,o)){let u=s[o],a=this.key["~run"]({value:o},i);if(a.issues){let f={type:"object",origin:"key",input:s,key:o,value:u};for(let p of a.issues)p.path=[f],n.issues?.push(p);if(n.issues||(n.issues=a.issues),i.abortEarly){n.typed=!1;break}}let c=this.value["~run"]({value:u},i);if(c.issues){let f={type:"object",origin:"value",input:s,key:o,value:u};for(let p of c.issues)p.path?p.path.unshift(f):p.path=[f],n.issues?.push(p);if(n.issues||(n.issues=c.issues),i.abortEarly){n.typed=!1;break}}(!a.typed||!c.typed)&&(n.typed=!1),a.typed&&(n.value[a.value]=c.value)}}else oe(this,"type",n,i);return n}}}function B(t){return{kind:"schema",type:"string",reference:B,expects:"string",async:!1,message:t,get"~standard"(){return ae(this)},"~run"(e,r){return typeof e.value=="string"?e.typed=!0:oe(this,"type",e,r),e}}}function al(t){let e;if(t)for(let r of t)e?e.push(...r.issues):e=r.issues;return e}function nt(t,e){return{kind:"schema",type:"union",reference:nt,expects:ul(t.map(r=>r.expects),"|"),async:!1,options:t,message:e,get"~standard"(){return ae(this)},"~run"(r,n){let i,s,o;for(let u of this.options){let a=u["~run"]({value:r.value},n);if(a.typed)if(a.issues)s?s.push(a):s=[a];else{i=a;break}else o?o.push(a):o=[a]}if(i)return i;if(s){if(s.length===1)return s[0];oe(this,"type",r,n,{issues:al(s)}),r.typed=!0}else{if(o?.length===1)return o[0];oe(this,"type",r,n,{issues:al(o)})}return r}}}function pl(t,e,r){let n=t["~run"]({value:e},Ts(r));if(n.issues)throw new Wc(n.issues);return n.value}function fl(t,e){let r={};for(let n in t.entries)r[n]=!e||e.includes(n)?Pt(t.entries[n]):t.entries[n];return{...t,entries:r,get"~standard"(){return ae(this)}}}function hl(...t){return{...t[0],pipe:t,get"~standard"(){return ae(this)},"~run"(e,r){for(let n of t)if(n.kind!=="metadata"){if(e.issues&&(n.kind==="schema"||n.kind==="transformation")){e.typed=!1;break}(!e.issues||!r.abortEarly&&!r.abortPipeEarly)&&(e=n["~run"](e,r))}return e}}}function Ar(t,e,r){let n=t["~run"]({value:e},Ts(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var dl=fl(Ie({name:B(),description:B(),price:B(),image_url:nt([B(),Rt(B())]),category:B(),url:B()}));function ml(t,e,r,{imagesByProductUrl:n,linksNewTab:i=!0,searchParams:s,messageIsStreaming:o=!1}){if(!t)return h``;let u=e>0&&r[e-1]&&"data"in r[e-1],a=e<r.length-1||!o;if("text"in t)return h`<p>${t.text}</p>`;if("html"in t)return h`${ol(t.html)}`;if("data"in t)switch(t.tag){case"product-card":case"product-card-v1":case"product-card-horizontal":{let c=Ar(dl,t.data);if(c.success){let f={...c.output,images:[]};return f.images=Dt(f.image_url),h`
512
+ ${u?h`<div class="my-3 w-full border-t border-gray-200/50"></div>`:null}
503
513
  <mw-product-card-horizontal
504
- product="${JSON.stringify(d)}"
514
+ product="${JSON.stringify(f)}"
505
515
  ?streaming="${!a}"
506
- ?links-new-tab="${n}"
516
+ ?links-new-tab="${i}"
507
517
  .searchParams="${s}"
508
- .imagesByProductUrl="${r}"></mw-product-card-horizontal>
509
- `}console.warn(u.issues);break}case"order-status-card-v1":return y`<mw-product-order-status-card order-details="${JSON.stringify(i.data)}" ?streaming="${!a}" ?links-new-tab="${n}"></mw-product-order-status-card> `}return console.warn("could not render part:",i),y`<p><i>data type not supported</i></p>`}var Yr,Yi,Nt,ai,qs,gp,Us=class{constructor(e,t,{timeoutMs:r=2e3}={}){w(this,qs);w(this,Yr);w(this,Yi);w(this,Nt);w(this,ai,!1);M(this,"timeoutMs");E(this,Yr,e),E(this,Yi,t),this.timeoutMs=r,e.addController(this)}get isTyping(){return f(this,ai)}hostDisconnected(){clearTimeout(f(this,Nt)),E(this,Nt,void 0)}onInput(e){if(f(this,Yr).isConnected){if(!e.trim()){this.typingStopped();return}clearTimeout(f(this,Nt)),E(this,Nt,setTimeout(()=>this.typingStopped(),this.timeoutMs)),f(this,ai)||$(this,qs,gp).call(this)}}typingStopped(){clearTimeout(f(this,Nt)),E(this,ai,!1),f(this,Yi).typingStopped()}};Yr=new WeakMap,Yi=new WeakMap,Nt=new WeakMap,ai=new WeakMap,qs=new WeakSet,gp=function(){E(this,ai,!0),f(this,Yi).typingStarted()};function mp(i,e="en-US"){let t=new Intl.DateTimeFormat(e,{hour:"numeric",minute:"numeric"}).format(i);return`${i.toLocaleDateString(e,{year:"numeric",month:"short",day:"numeric"})}, ${t}`}var vp=Xr(ue(),oi([ue(),Jr(),ol(),al()])),yp=hp(ue(),nl(1),rl(1e3));var r1=!0,cl="Invariant failed";function _p(i,e){if(!i){if(r1)throw new Error(cl);var t=typeof e=="function"?e():e,r=t?"".concat(cl,": ").concat(t):cl;throw new Error(r)}}var n1="\xB7 \xB7 \xB7",s1=wt({conversationId:Ki(ue()),messages:Ki(Xi(wt({id:ue(),timestamp:Jr(),role:ll(["user","assistant","support"]),content:ue(),parts:Ki(Xi(oi([wt({text:ue()}),wt({html:ue()}),wt({tag:ue(),data:Xr(ue(),sl())})])))})))}),Qi,er,J,pl,Bs,en,li,ne,tn,bp,wp,xp,kp,Cp,Sp,Ep,$p,Hs,zs=class zs extends z(N){constructor(){super();w(this,J);w(this,Qi);w(this,er);w(this,en,new Us(this,{typingStarted:()=>f(this,ne).sendUserTypingStart(),typingStopped:()=>f(this,ne).sendUserTypingStop()}));w(this,li,!1);w(this,ne,new Ns(this,{url:t=>{let r=new URL(this.config.wsApiUrl);return r.searchParams.set("widgetId",this.widgetId),r.searchParams.set("conversationId",t),r.searchParams.set("pageUrl",window.location.href),r},onReconnect:()=>{},onError:t=>{console.error("ws error",t)},onClose:()=>{},onNewMessage:t=>{E(this,li,!1),t.role==="user"&&f(this,J,Hs)?.scrollTo(0,f(this,J,Hs).scrollHeight),t.role==="assistant"&&this.callbacks.onNewMessageStartedStreaming?.({widgetId:this.widgetId,message:t,conversationId:this.conversationId})},onMessageAppend:t=>{let r=f(this,J,Hs);if(!r)return;let n=f(this,ne).lastMsg;!n||n.role!=="assistant"||requestAnimationFrame(()=>{let s=r.querySelector(`[data-id="${n.id}"]`);if(!s)return;let o=s.offsetHeight,l=r.getClientRects()[0].height-70;o>l&&!f(this,li)&&(r.scrollTop=s.offsetTop-80)})},onMessageDone:(t,r)=>{E(this,li,!1),r.role==="assistant"&&this.callbacks.onMessageEndedStreaming?.({widgetId:this.widgetId,text:r.content??"",message:r,usage_TOKENS_COMPLETION:t.message.usage.TOKENS_COMPLETION,conversationId:this.conversationId})},onMessageError:t=>{console.error("ws message error",t),t.message&&this.callbacks.onError?.({widgetId:this.widgetId,error:"WS: "+t.message})},onReset:()=>{localStorage.removeItem(f(this,J,Bs))},onConnect:t=>{},persistConversationState:(t,r)=>{localStorage.setItem(f(this,J,Bs),JSON.stringify({conversationId:t,messages:r}))},restoreConversationState:()=>{try{let t=JSON.parse(localStorage.getItem(f(this,J,Bs))||"{}"),r=dp(s1,t);return{conversationId:r.conversationId||"",messages:r.messages||[]}}catch(t){return console.error(t),{conversationId:"",messages:[]}}}}));w(this,tn,"single");this.widgetId="",this.config={},this.callbacks={},this.showClose=!1,this.xUserData={},this.xCustomInstructions=""}get conversationId(){return f(this,ne).conversationId}get messages(){return f(this,ne).messages}firstUpdated(){$(this,J,pl).call(this)}updated(){$(this,J,pl).call(this)}render(){_p(this.config,"config is required");let t=op(this.messages,r=>{try{let n=new Date(r.timestamp),s=Math.floor(n.getUTCMinutes()/5)*5;return n.setUTCMinutes(s,0,0),n.valueOf().toString()}catch(n){console.error(n)}});return y`
518
+ .imagesByProductUrl="${n}"></mw-product-card-horizontal>
519
+ `}console.warn(c.issues);break}case"order-status-card-v1":return h`<mw-product-order-status-card order-details="${JSON.stringify(t.data)}" ?streaming="${!a}" ?links-new-tab="${i}"></mw-product-order-status-card> `}return console.warn("could not render part:",t),h`<p><i>data type not supported</i></p>`}var Mr,Ut,Ve,it,ti,gl,ei=class{constructor(e,r,{timeoutMs:n=2e3}={}){d(this,ti);d(this,Mr);d(this,Ut);d(this,Ve);d(this,it,!1);w(this,"timeoutMs");g(this,Mr,e),g(this,Ut,r),this.timeoutMs=n,e.addController(this)}get isTyping(){return l(this,it)}hostDisconnected(){clearTimeout(l(this,Ve)),g(this,Ve,void 0)}onInput(e){if(l(this,Mr).isConnected){if(!e.trim()){this.typingStopped();return}clearTimeout(l(this,Ve)),g(this,Ve,setTimeout(()=>this.typingStopped(),this.timeoutMs)),l(this,it)||m(this,ti,gl).call(this)}}typingStopped(){clearTimeout(l(this,Ve)),g(this,it,!1),l(this,Ut).typingStopped()}};Mr=new WeakMap,Ut=new WeakMap,Ve=new WeakMap,it=new WeakMap,ti=new WeakSet,gl=function(){g(this,it,!0),l(this,Ut).typingStarted()};function yl(t,e="en-US"){let r=new Intl.DateTimeFormat(e,{hour:"numeric",minute:"numeric"}).format(t);return`${t.toLocaleDateString(e,{year:"numeric",month:"short",day:"numeric"})}, ${r}`}var vl=_r(B(),nt([B(),Sr(),Ds(),Rs()])),wl=hl(B(),Ls(1),Os(5e3));var Gc=!0,Us="Invariant failed";function bl(t,e){if(!t){if(Gc)throw new Error(Us);var r=typeof e=="function"?e():e,n=r?"".concat(Us,": ").concat(r):Us;throw new Error(n)}}var Xc="\xB7 \xB7 \xB7",Jc=Ie({conversationId:Pt(B()),messages:Pt(Rt(Ie({id:B(),timestamp:Sr(),role:Ps(["user","assistant","support"]),content:B(),parts:Pt(Rt(nt([Ie({text:B()}),Ie({html:B()}),Ie({tag:B(),data:_r(B(),js())})])))})))}),Vt,Ft,D,Fs,ri,Tr,st,V,Or,xl,kl,Cl,$l,El,Sl,_l,Al,ni,ii=class ii extends T(S){constructor(){super();d(this,D);d(this,Vt);d(this,Ft);d(this,Tr,new ei(this,{typingStarted:()=>l(this,V).sendUserTypingStart(),typingStopped:()=>l(this,V).sendUserTypingStop()}));d(this,st,!1);d(this,V,new Yn(this,{url:r=>{let n=new URL(this.config.wsApiUrl);return n.searchParams.set("widgetId",this.widgetId),n.searchParams.set("conversationId",r),n.searchParams.set("pageUrl",window.location.href),n},onReconnect:()=>{},onError:r=>{console.error("ws error",r)},onClose:()=>{},onNewMessage:r=>{g(this,st,!1),r.role==="user"&&l(this,D,ni)?.scrollTo(0,l(this,D,ni).scrollHeight),r.role==="assistant"&&this.callbacks.onNewMessageStartedStreaming?.({widgetId:this.widgetId,message:r,conversationId:this.conversationId})},onMessageAppend:r=>{let n=l(this,D,ni);if(!n)return;let i=l(this,V).lastMsg;!i||i.role!=="assistant"||requestAnimationFrame(()=>{let s=n.querySelector(`[data-id="${i.id}"]`);if(!s)return;let o=s.offsetHeight,u=n.getClientRects()[0].height-70;o>u&&!l(this,st)&&(n.scrollTop=s.offsetTop-80)})},onMessageDone:(r,n)=>{g(this,st,!1),n.role==="assistant"&&this.callbacks.onMessageEndedStreaming?.({widgetId:this.widgetId,text:n.content??"",message:n,usage_TOKENS_COMPLETION:r.message.usage.TOKENS_COMPLETION,conversationId:this.conversationId})},onMessageError:r=>{console.error("ws message error",r),r.message&&this.callbacks.onError?.({widgetId:this.widgetId,error:"WS: "+r.message})},onReset:()=>{localStorage.removeItem(l(this,D,ri))},onConnect:r=>{},persistConversationState:(r,n)=>{localStorage.setItem(l(this,D,ri),JSON.stringify({conversationId:r,messages:n}))},restoreConversationState:()=>{try{let r=JSON.parse(localStorage.getItem(l(this,D,ri))||"{}"),n=pl(Jc,r);return{conversationId:n.conversationId||"",messages:n.messages||[]}}catch(r){return console.error(r),{conversationId:"",messages:[]}}}}));d(this,Or,"single");this.widgetId="",this.config={},this.callbacks={},this.showClose=!1,this.xUserData={},this.xCustomInstructions=""}get conversationId(){return l(this,V).conversationId}get messages(){return l(this,V).messages}firstUpdated(){m(this,D,Fs).call(this)}updated(){m(this,D,Fs).call(this)}render(){bl(this.config,"config is required");let r=sl(this.messages,n=>{try{let i=new Date(n.timestamp),s=Math.floor(i.getUTCMinutes()/5)*5;return i.setUTCMinutes(s,0,0),i.valueOf().toString()}catch(i){console.error(i)}});return h`
510
520
  <div class="relative mx-auto h-full bg-[#FDFDFD] font-sans text-base before:absolute before:inset-0 before:bg-[#8d8d8d] before:opacity-10 sm:rounded-[36px] sm:p-1.5 sm:before:rounded-[36px]">
511
521
  <div
512
522
  class="relative flex h-full flex-col bg-white shadow-[0px_4px_4px_0px_rgba(0,0,0,0.25),-116px_177px_59px_0px_rgba(0,0,0,0.00),-74px_113px_54px_0px_rgba(0,0,0,0.01),-42px_64px_46px_0px_rgba(0,0,0,0.03),-19px_28px_34px_0px_rgba(0,0,0,0.06)] sm:rounded-[30px]">
513
523
  <mw-chat-header
514
524
  class="absolute left-1.5 right-1.5 top-1.5"
515
525
  .content="${{logoUrl:this.config.logoUrl,title:this.config.title,color:this.config.color}}"
516
- ?show-new-chat="${!f(this,ne).isLiveMode&&this.messages.length>0}"
526
+ ?show-new-chat="${!l(this,V).isLiveMode&&this.messages.length>0}"
517
527
  ?show-close="${this.showClose}"
518
- @mw:new-chat-click="${$(this,J,Ep)}"
519
- @mw:close-click="${$(this,J,$p)}">
528
+ @mw:new-chat-click="${m(this,D,_l)}"
529
+ @mw:close-click="${m(this,D,Al)}">
520
530
  </mw-chat-header>
521
531
 
522
532
  <!-- used by the dashboard to inject content -->
@@ -525,8 +535,8 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
525
535
  </div>
526
536
 
527
537
  <!-- this structure of 2 divs is required for the browser native stick/scroll to bottom -->
528
- <div id="scrollable-content" class="mt-6 flex h-full flex-shrink flex-grow flex-col-reverse overflow-auto" @scroll="${$(this,J,bp)}">
529
- ${this.config?.showStillLearningBanner?y`
538
+ <div id="scrollable-content" class="mt-6 flex h-full flex-shrink flex-grow flex-col-reverse overflow-auto" @scroll="${m(this,D,xl)}">
539
+ ${this.config?.showStillLearningBanner?h`
530
540
  <div class="flex justify-center">
531
541
  <div class="mb-2 flex max-w-[70%] select-none items-center justify-center rounded-full bg-black px-3 py-2">
532
542
  <!-- (i) symbol -->
@@ -541,7 +551,7 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
541
551
  <span class="ml-1 text-xs text-white">I'm still learning!</span>
542
552
  </div>
543
553
  </div>
544
- `:y`
554
+ `:h`
545
555
  <!-- this makes the chat stick to bottom when the banner is hidden -->
546
556
  <div class="flex p-1"></div>
547
557
  `}
@@ -549,19 +559,20 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
549
559
  <!-- the padding at the top makes empty room at the top when scrolling and content is hidden behind header -->
550
560
  <!-- this is the 2nd (inner) div that will natively stick/scroll to bottom -->
551
561
  <div class="${this.messages.length>0?"pt-20":""}">
552
- ${rt(Array.from(t),([r])=>r,([r,n])=>y`
553
- <div class="my-2 text-center text-xs text-gray-500">${mp(new Date(Number(r)),window.navigator.language)}</div>
554
- ${rt(n??[],s=>s.id,(s,o)=>{let a=n[o+1]?.role===s.role,d=(o>0?n[o-1]:void 0)?.role===s.role,p=(n.length>0?n[n.length-1]:void 0)?.id===s.id;E(this,tn,p&&!d&&!a?"single-current":!d&&!a?"single":!d&&a?"first":p&&d&&!a?"last-current":d&&!a?"last":d&&a?"middle":"single");let g=f(this,ne).isLiveMode&&s.role==="user"&&s.id===f(this,ne).lastMsg?.id?"sent":"";return y`
562
+ ${me(Array.from(r),([n])=>n,([n,i])=>h`
563
+ <div class="my-2 text-center text-xs text-gray-500">${yl(new Date(Number(n)),window.navigator.language)}</div>
564
+ ${me(i??[],s=>s.id,(s,o)=>{let a=i[o+1]?.role===s.role,f=(o>0?i[o-1]:void 0)?.role===s.role,b=(i.length>0?i[i.length-1]:void 0)?.id===s.id;g(this,Or,b&&!f&&!a?"single-current":!f&&!a?"single":!f&&a?"first":b&&f&&!a?"last-current":f&&!a?"last":f&&a?"middle":"single");let k=l(this,V).isLiveMode&&s.role==="user"&&s.id===l(this,V).lastMsg?.id?"sent":"";return h`
555
565
  <div data-id="${s.id}" class="${a?"mb-[2px]":"mb-3"} mx-2 flex-row">
556
566
  <mw-chat-message
557
567
  color="${this.config.color}"
558
- status="${g}"
568
+ status="${k}"
559
569
  logo="${s.metadata?.avatar||this.config.logoUrl}"
560
570
  side="${s.role}"
561
- position=${f(this,tn)}
562
- @click="${$(this,J,wp)}">
563
- <div class="prose break-words text-inherit">
564
- ${s.content===n1?y`<mw-loading class="-mx-2 block h-8 max-h-[24px] w-8 fill-[${this.config.color}]"></mw-loading>`:s.parts?rt(s.parts,(m,b)=>b,(m,b)=>fp(m,b,s.parts??[],{imagesByProductUrl:s.metadata?.imagesByProductUrl,linksNewTab:this.config.linksNewTab??!0,searchParams:new URLSearchParams({utm_source:"molin.ai",utm_medium:"chat",utm_campaign:"general"}),messageIsStreaming:s.streaming})):y`<p>${s.content}</p>`}
571
+ position=${l(this,Or)}
572
+ @click="${m(this,D,kl)}">
573
+ <div
574
+ class="prose prose-h1:first:mt-0 prose-h2:first:mt-0 prose-h3:first:mt-0 prose-h4:first:mt-0 prose-h1:last:mb-0 prose-h2:last:mb-0 prose-h3:last:mb-0 prose-h4:last:mb-0 prose-h1:mt-5 prose-h2:mt-5 prose-h3:mt-5 prose-h4:mt-5 prose-h1:mb-2 prose-h2:mb-2 prose-h3:mb-2 prose-h4:mb-2 prose-h1:text-xl prose-h1:text-bold prose-h2:text-lg prose-h2:text-bold prose-h3:text-base prose-h3:text-bold prose-h4:text-sm prose-h4:text-bold break-words text-inherit">
575
+ ${s.content===Xc?h`<mw-loading class="-mx-2 block h-8 max-h-[24px] w-8 fill-[${this.config.color}]"></mw-loading>`:s.parts?me(s.parts,(_,M)=>M,(_,M)=>ml(_,M,s.parts??[],{imagesByProductUrl:s.metadata?.imagesByProductUrl,linksNewTab:this.config.linksNewTab??!0,searchParams:new URLSearchParams({utm_source:"molin.ai",utm_medium:"chat",utm_campaign:"general"}),messageIsStreaming:s.streaming})):h`<p>${s.content}</p>`}
565
576
  </div>
566
577
  </mw-chat-message>
567
578
  </div>
@@ -569,37 +580,38 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
569
580
  `)}
570
581
 
571
582
  <!-- show typing indicator if the non-user side is typing -->
572
- ${["assistant","support"].includes(f(this,ne)?.typingIndicator?.role??"")&&f(this,ne)?.typingIndicator?.role?y`
583
+ ${["assistant","support"].includes(l(this,V)?.typingIndicator?.role??"")&&l(this,V)?.typingIndicator?.role?h`
573
584
  <mw-chat-message
574
585
  class="mx-2 mb-3 block"
575
586
  color="${this.config.color}"
576
- logo="${f(this,ne)?.typingIndicator?.metadata?.avatar||this.config.logoUrl}"
577
- side="${f(this,ne).typingIndicator.role}">
578
- <div class="prose break-words text-inherit">
587
+ logo="${l(this,V)?.typingIndicator?.metadata?.avatar||this.config.logoUrl}"
588
+ side="${l(this,V).typingIndicator.role}">
589
+ <div
590
+ class="prose prose-h1:first:mt-0 prose-h2:first:mt-0 prose-h3:first:mt-0 prose-h4:first:mt-0 prose-h1:last:mb-0 prose-h2:last:mb-0 prose-h3:last:mb-0 prose-h4:last:mb-0 prose-h1:mt-5 prose-h2:mt-5 prose-h3:mt-5 prose-h4:mt-5 prose-h1:mb-2 prose-h2:mb-2 prose-h3:mb-2 prose-h4:mb-2 prose-h1:text-xl prose-h1:text-bold prose-h2:text-lg prose-h2:text-bold prose-h3:text-base prose-h3:text-bold prose-h4:text-sm prose-h4:text-bold break-words text-inherit">
579
591
  <mw-loading class="-mx-2 block h-8 max-h-[24px] w-8 fill-[${this.config.color}]"></mw-loading>
580
592
  </div>
581
593
  </mw-chat-message>
582
- `:j}
594
+ `:E}
583
595
  </div>
584
596
 
585
597
  <mw-chat-background
586
598
  class="flex-grow"
587
599
  .examples="${this.messages.length>0?[]:this.config.examples}"
588
600
  color="${this.config.color}"
589
- @mw:example-click="${$(this,J,xp)}"></mw-chat-background>
601
+ @mw:example-click="${m(this,D,Cl)}"></mw-chat-background>
590
602
  </div>
591
603
 
592
604
  <div class="m-1.5 flex-shrink-0 flex-grow-0 space-y-2 rounded-3xl bg-[#eeedf1] p-1.5">
593
605
  <mw-chat-input
594
- @mw:change="${$(this,J,Cp)}"
595
- @mw:submit="${$(this,J,kp)}"
596
- @mw:cancel="${$(this,J,Sp)}"
606
+ @mw:change="${m(this,D,El)}"
607
+ @mw:submit="${m(this,D,$l)}"
608
+ @mw:cancel="${m(this,D,Sl)}"
597
609
  placeholder="${this.config.input?.placeholder}"
598
- ?disabled="${f(this,ne).ranOutOfCredits}"
599
- ?streaming="${f(this,ne)?.isStreaming??!0}">
610
+ ?disabled="${l(this,V).ranOutOfCredits}"
611
+ ?streaming="${l(this,V)?.isStreaming??!0}">
600
612
  </mw-chat-input>
601
613
 
602
- ${this.config.removePoweredBy?j:y`
614
+ ${this.config.removePoweredBy?E:h`
603
615
  <!-- spacing between input box and powered-by or bottom -->
604
616
  <div class="h-4">
605
617
  <mw-powered-by></mw-powered-by>
@@ -608,71 +620,71 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
608
620
  </div>
609
621
  </div>
610
622
  </div>
611
- `}reloadConfig(){f(this,ne).reloadConfig(),this.requestUpdate()}reset(){f(this,ne).reset()}};Qi=new WeakMap,er=new WeakMap,J=new WeakSet,pl=function(){function t(n){if(!n)return;let s;try{s=typeof n=="object"?n:JSON.parse(n)}catch(l){console.error("Molin: user-data is not valid JSON",l);return}if(!s||typeof s!="object"||Object.keys(s).length===0)return;let o=Kr(vp,s);if(!o.success){console.error("Molin: user-data does not pass schema validation",o.issues);return}return o.output}function r(n){if(!n)return;let s=Kr(yp,n);if(!s.success){console.error("Molin: custom-instructions does not pass schema validation",s.issues);return}return s.output}E(this,Qi,t(this.xUserData)),E(this,er,r(this.xCustomInstructions))},Bs=function(){if(!this.widgetId)throw new Error("widgetId is not set");return`_molin_${this.widgetId}`},en=new WeakMap,li=new WeakMap,ne=new WeakMap,tn=new WeakMap,bp=function(){E(this,li,!0)},wp=function(t){let r=t.target;if(r instanceof HTMLAnchorElement){if(t.preventDefault(),this.callbacks.onUserClickedLink?.({widgetId:this.widgetId,url:r.href,conversationId:this.conversationId}),window.self!==window.top){window.open(r.href,"_blank");return}let s=this.config.linksNewTab?"_blank":"_self";window.open(r.href,r.target||s)}},xp=function(t){let r=t.detail.example;if(!f(this,ne)?.sendUserInput(r,{xUserData:f(this,Qi),xCustomInstructions:f(this,er)})){t.preventDefault();return}this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:r,example:!0,conversationId:this.conversationId})},kp=function(t){let r=t.detail;if(!f(this,ne)?.sendUserInput(r,{xUserData:f(this,Qi),xCustomInstructions:f(this,er)})){t.preventDefault();return}f(this,en).typingStopped(),this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:r,example:!1,conversationId:this.conversationId})},Cp=function(t){f(this,en).onInput(t.detail.full)},Sp=function(){f(this,ne)?.sendUserCancel(),this.callbacks.onUserCanceledStreaming?.({widgetId:this.widgetId})},Ep=function(){f(this,ne).reset()},$p=function(){this.dispatchEvent(new zs.CloseClickEvent)},Hs=function(){return this.renderRoot.querySelector("#scrollable-content")},M(zs,"properties",{widgetId:{type:String,attribute:"widget"},config:{type:Object,attribute:!1},callbacks:{type:Object,attribute:!1},showClose:{type:Boolean,attribute:"show-close"},xUserData:{type:Object,attribute:!1},xCustomInstructions:{type:String,attribute:!1}});var Qr=zs,dl;Qr.CloseClickEvent=(dl=class extends CustomEvent{constructor(e={}){super(Qr.CloseClickEvent.type,{...e})}},M(dl,"type","mw:close-click"),dl);customElements.get("mw-chat")||customElements.define("mw-chat",Qr);var tr,Ip,Ap,rn=class rn extends z(N){constructor(){super();w(this,tr);M(this,"render",()=>y`
623
+ `}reloadConfig(){l(this,V).reloadConfig(),this.requestUpdate()}reset(){l(this,V).reset()}};Vt=new WeakMap,Ft=new WeakMap,D=new WeakSet,Fs=function(){function r(i){if(!i)return;let s;try{s=typeof i=="object"?i:JSON.parse(i)}catch(u){console.error("Molin: user-data is not valid JSON",u);return}if(!s||typeof s!="object"||Object.keys(s).length===0)return;let o=Ar(vl,s);if(!o.success){console.error("Molin: user-data does not pass schema validation",o.issues);return}return o.output}function n(i){if(!i)return;let s=Ar(wl,i);if(!s.success){console.error("Molin: custom-instructions does not pass schema validation",s.issues);return}return s.output}g(this,Vt,r(this.xUserData)),g(this,Ft,n(this.xCustomInstructions))},ri=function(){if(!this.widgetId)throw new Error("widgetId is not set");return`_molin_${this.widgetId}`},Tr=new WeakMap,st=new WeakMap,V=new WeakMap,Or=new WeakMap,xl=function(){g(this,st,!0)},kl=function(r){let n=r.target;if(n instanceof HTMLAnchorElement){if(r.preventDefault(),this.callbacks.onUserClickedLink?.({widgetId:this.widgetId,url:n.href,conversationId:this.conversationId}),window.self!==window.top){window.open(n.href,"_blank");return}let s=this.config.linksNewTab?"_blank":"_self";window.open(n.href,n.target||s)}},Cl=function(r){let n=r.detail.example;if(!l(this,V)?.sendUserInput(n,{xUserData:l(this,Vt),xCustomInstructions:l(this,Ft)})){r.preventDefault();return}this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:n,example:!0,conversationId:this.conversationId})},$l=function(r){let n=r.detail;if(!l(this,V)?.sendUserInput(n,{xUserData:l(this,Vt),xCustomInstructions:l(this,Ft)})){r.preventDefault();return}l(this,Tr).typingStopped(),this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:n,example:!1,conversationId:this.conversationId})},El=function(r){l(this,Tr).onInput(r.detail.full)},Sl=function(){l(this,V)?.sendUserCancel(),this.callbacks.onUserCanceledStreaming?.({widgetId:this.widgetId})},_l=function(){l(this,V).reset()},Al=function(){this.dispatchEvent(new ii.CloseClickEvent)},ni=function(){return this.renderRoot.querySelector("#scrollable-content")},w(ii,"properties",{widgetId:{type:String,attribute:"widget"},config:{type:Object,attribute:!1},callbacks:{type:Object,attribute:!1},showClose:{type:Boolean,attribute:"show-close"},xUserData:{type:Object,attribute:!1},xCustomInstructions:{type:String,attribute:!1}});var Ir=ii,Vs;Ir.CloseClickEvent=(Vs=class extends CustomEvent{constructor(e={}){super(Ir.CloseClickEvent.type,{...e})}},w(Vs,"type","mw:close-click"),Vs);customElements.get("mw-chat")||customElements.define("mw-chat",Ir);var Ht,Ml,Il,Lr=class Lr extends T(S){constructor(){super();d(this,Ht);w(this,"render",()=>h`
612
624
  <!-- wrapper -->
613
625
  <div class="group relative z-[2147483647] w-[300px] cursor-pointer select-none rounded-2xl rounded-t-2xl bg-white font-sans text-base leading-normal shadow-2xl">
614
626
  <!-- close button -->
615
627
  <button
616
628
  class="absolute -top-2 right-3 inline-flex h-6 w-6 items-center justify-center rounded-full bg-gray-300 bg-opacity-50 pb-[2px] text-center text-gray-700 opacity-0 shadow transition-opacity duration-300 ease-in-out group-hover:opacity-100"
617
- @click="${$(this,tr,Ip)}"
629
+ @click="${m(this,Ht,Ml)}"
618
630
  aria-label="Close">
619
631
  ×
620
632
  </button>
621
633
 
622
634
  <!-- content -->
623
- <div class="p-4 text-left text-gray-800" @click="${$(this,tr,Ap)}">
635
+ <div class="p-4 text-left text-gray-800" @click="${m(this,Ht,Il)}">
624
636
  <p>${this.text}</p>
625
637
  </div>
626
638
  </div>
627
- `);this.text="Hello there. How can we help?"}};tr=new WeakSet,Ip=function(){this.dispatchEvent(new rn.CloseEvent)},Ap=function(){this.dispatchEvent(new rn.ClickEvent)},M(rn,"properties",{text:{type:String}});var ui=rn,hl;ui.CloseEvent=(hl=class extends CustomEvent{constructor(e={}){super(ui.CloseEvent.type,{...e})}},M(hl,"type","mw:close"),hl);var fl;ui.ClickEvent=(fl=class extends CustomEvent{constructor(e={}){super(ui.ClickEvent.type,{...e})}},M(fl,"type","mw:click"),fl);customElements.get("mw-popup-desktop")||customElements.define("mw-popup-desktop",ui);var ir,Tp,Mp,nn=class nn extends z(N){constructor(){super();w(this,ir);M(this,"render",()=>y`
639
+ `);this.text="Hello there. How can we help?"}};Ht=new WeakSet,Ml=function(){this.dispatchEvent(new Lr.CloseEvent)},Il=function(){this.dispatchEvent(new Lr.ClickEvent)},w(Lr,"properties",{text:{type:String}});var ot=Lr,Hs;ot.CloseEvent=(Hs=class extends CustomEvent{constructor(e={}){super(ot.CloseEvent.type,{...e})}},w(Hs,"type","mw:close"),Hs);var Ns;ot.ClickEvent=(Ns=class extends CustomEvent{constructor(e={}){super(ot.ClickEvent.type,{...e})}},w(Ns,"type","mw:click"),Ns);customElements.get("mw-popup-desktop")||customElements.define("mw-popup-desktop",ot);var Nt,Tl,Ol,jr=class jr extends T(S){constructor(){super();d(this,Nt);w(this,"render",()=>h`
628
640
  <!-- wrapper -->
629
641
  <div class="group relative z-[2147483647] select-none rounded-t-2xl bg-white text-left font-sans text-[16px] text-base leading-normal text-gray-800 shadow-2xl transition-all">
630
642
  <!-- close button -->
631
643
  <button
632
644
  class="absolute right-4 top-[28px] inline-flex h-7 w-7 items-center justify-center rounded-full bg-gray-300 bg-opacity-50 pb-[2px] text-center text-xl shadow-none duration-300 ease-in-out focus:outline-none"
633
- @click="${$(this,ir,Tp)}"
645
+ @click="${m(this,Nt,Tl)}"
634
646
  aria-label="Close">
635
647
  ×
636
648
  </button>
637
649
 
638
650
  <!-- content -->
639
- <div class="p-4 text-gray-800" @click="${$(this,ir,Mp)}">
651
+ <div class="p-4 text-gray-800" @click="${m(this,Nt,Ol)}">
640
652
  <h1 class="mr-8 py-2.5 text-left font-display text-lg font-bold">${this.title}</h1>
641
653
  <p class="py-2.5 text-left">${this.text}</p>
642
654
  <div class="h-4"></div>
643
- ${this.button&&this.color?y`
655
+ ${this.button&&this.color?h`
644
656
  <!-- only visible if button text and color are given -->
645
657
  <button class="w-full rounded-full bg-[${this.color}] px-5 py-2.5 text-center text-sm font-medium text-white" type="button">${this.button}</button>
646
- `:j}
658
+ `:E}
647
659
  </div>
648
660
 
649
661
  <!-- can append any other content -->
650
662
  <slot name="footer"></slot>
651
663
  </div>
652
- `);this.title="Chat with Molin AI",this.text="Hello there. How can we help?",this.button="Chat now",this.color="#601feb"}};ir=new WeakSet,Tp=function(){this.dispatchEvent(new nn.CloseEvent)},Mp=function(){this.dispatchEvent(new nn.ClickEvent)},M(nn,"properties",{title:{type:String},text:{type:String},button:{type:String},color:{type:String}});var ci=nn,gl;ci.CloseEvent=(gl=class extends CustomEvent{constructor(e={}){super(ci.CloseEvent.type,{...e})}},M(gl,"type","mw:close"),gl);var ml;ci.ClickEvent=(ml=class extends CustomEvent{constructor(e={}){super(ci.ClickEvent.type,{...e})}},M(ml,"type","mw:click"),ml);customElements.get("mw-popup-mobile")||customElements.define("mw-popup-mobile",ci);var rr,sn,di,Vs=class{constructor(e,t){w(this,rr);w(this,sn,!1);w(this,di,()=>{f(this,sn)||(f(this,rr).userFirstInteracted?.(),E(this,sn,!0)),f(this,rr).userInteracted?.()});E(this,rr,t),e.addController(this)}hostConnected(){this.startListening()}hostDisconnected(){this.stopListening()}startListening(){window.addEventListener("click",f(this,di)),window.addEventListener("keydown",f(this,di))}stopListening(){window.removeEventListener("click",f(this,di)),window.removeEventListener("keydown",f(this,di))}};rr=new WeakMap,sn=new WeakMap,di=new WeakMap;var o1=24*60*60*1e3,nr,We,pi,on,hi,an,Gs,Pp,Ws=class{constructor(e,t,r=Date){w(this,Gs);w(this,nr);w(this,We);w(this,pi);w(this,on);w(this,hi,!1);w(this,an,!1);E(this,nr,e),E(this,We,t),E(this,pi,r),e.addController(this)}get showing(){return f(this,hi)}hostDisconnected(){this.abortAutoShowTimer()}show({sound:e}={}){if(this.abortAutoShowTimer(),!f(this,hi)&&(E(this,hi,!0),f(this,nr).requestUpdate(),e)){f(this,We).playPopupSound();let t=f(this,We).getPersistedState();f(this,We).setPersistedState({...t,playedSoundOnce:!0})}}hide(){E(this,an,!0),this.abortAutoShowTimer(),E(this,hi,!1),f(this,nr).requestUpdate()}abortAutoShowTimer(){clearTimeout(f(this,on))}onCloseClick(){let e=f(this,We).getPersistedState();f(this,We).setPersistedState({...e,userDismissedAt:f(this,pi).now()}),this.hide()}onContentClick(){let e=f(this,We).getPersistedState();f(this,We).setPersistedState({...e,userDismissedAt:f(this,pi).now()}),this.hide()}userFirstInteracted(){this.abortAutoShowTimer(),f(this,an)||E(this,on,setTimeout(()=>$(this,Gs,Pp).call(this),f(this,We).getDelayMs()))}};nr=new WeakMap,We=new WeakMap,pi=new WeakMap,on=new WeakMap,hi=new WeakMap,an=new WeakMap,Gs=new WeakSet,Pp=function(){let e=f(this,We).getPersistedState(),t=!!e?.playedSoundOnce;e?.userDismissedAt&&f(this,pi).now()-e.userDismissedAt<o1||this.show({sound:!t})};var Ut,_l,xt,Zs,yl,Js=class Js extends z(N){constructor(){super();w(this,xt);w(this,Ut,new Ws(this,{getDelayMs:()=>this.delayMs,playPopupSound:()=>{this.soundUrl&&new Audio(this.soundUrl).play().then(()=>{}).catch(t=>{console.error("Error playing audio:",t,{})})},setPersistedState:t=>{t?localStorage.setItem("_molin_popup",JSON.stringify(t)):localStorage.removeItem("_molin_popup")},getPersistedState:()=>{let t=localStorage.getItem("_molin_popup");try{return t?JSON.parse(t):null}catch{return null}}}));w(this,_l,new Vs(this,f(this,Ut)));this.positionClasses="",this.delayMs=0,this.soundUrl="",this.content={desktop:{text:""},mobile:{title:"",text:"",button:"",color:"",poweredBy:!0}}}render(){let t=f(this,Ut).showing?"visible opacity-100 translate-y-0":"invisible opacity-0 translate-y-3",r=this.content;return y`
664
+ `);this.title="Chat with Molin AI",this.text="Hello there. How can we help?",this.button="Chat now",this.color="#601feb"}};Nt=new WeakSet,Tl=function(){this.dispatchEvent(new jr.CloseEvent)},Ol=function(){this.dispatchEvent(new jr.ClickEvent)},w(jr,"properties",{title:{type:String},text:{type:String},button:{type:String},color:{type:String}});var at=jr,Bs;at.CloseEvent=(Bs=class extends CustomEvent{constructor(e={}){super(at.CloseEvent.type,{...e})}},w(Bs,"type","mw:close"),Bs);var qs;at.ClickEvent=(qs=class extends CustomEvent{constructor(e={}){super(at.ClickEvent.type,{...e})}},w(qs,"type","mw:click"),qs);customElements.get("mw-popup-mobile")||customElements.define("mw-popup-mobile",at);var Bt,Dr,lt,si=class{constructor(e,r){d(this,Bt);d(this,Dr,!1);d(this,lt,()=>{l(this,Dr)||(l(this,Bt).userFirstInteracted?.(),g(this,Dr,!0)),l(this,Bt).userInteracted?.()});g(this,Bt,r),e.addController(this)}hostConnected(){this.startListening()}hostDisconnected(){this.stopListening()}startListening(){window.addEventListener("click",l(this,lt)),window.addEventListener("keydown",l(this,lt))}stopListening(){window.removeEventListener("click",l(this,lt)),window.removeEventListener("keydown",l(this,lt))}};Bt=new WeakMap,Dr=new WeakMap,lt=new WeakMap;var Kc=24*60*60*1e3,qt,le,ut,Rr,ct,Pr,ai,Ll,oi=class{constructor(e,r,n=Date){d(this,ai);d(this,qt);d(this,le);d(this,ut);d(this,Rr);d(this,ct,!1);d(this,Pr,!1);g(this,qt,e),g(this,le,r),g(this,ut,n),e.addController(this)}get showing(){return l(this,ct)}hostDisconnected(){this.abortAutoShowTimer()}show({sound:e}={}){if(this.abortAutoShowTimer(),!l(this,ct)&&(g(this,ct,!0),l(this,qt).requestUpdate(),e)){l(this,le).playPopupSound();let r=l(this,le).getPersistedState();l(this,le).setPersistedState({...r,playedSoundOnce:!0})}}hide(){g(this,Pr,!0),this.abortAutoShowTimer(),g(this,ct,!1),l(this,qt).requestUpdate()}abortAutoShowTimer(){clearTimeout(l(this,Rr))}onCloseClick(){let e=l(this,le).getPersistedState();l(this,le).setPersistedState({...e,userDismissedAt:l(this,ut).now()}),this.hide()}onContentClick(){let e=l(this,le).getPersistedState();l(this,le).setPersistedState({...e,userDismissedAt:l(this,ut).now()}),this.hide()}userFirstInteracted(){this.abortAutoShowTimer(),l(this,Pr)||g(this,Rr,setTimeout(()=>m(this,ai,Ll).call(this),l(this,le).getDelayMs()))}};qt=new WeakMap,le=new WeakMap,ut=new WeakMap,Rr=new WeakMap,ct=new WeakMap,Pr=new WeakMap,ai=new WeakSet,Ll=function(){let e=l(this,le).getPersistedState(),r=!!e?.playedSoundOnce;e?.userDismissedAt&&l(this,ut).now()-e.userDismissedAt<Kc||this.show({sound:!r})};var Fe,Zs,Te,li,Ws,ui=class ui extends T(S){constructor(){super();d(this,Te);d(this,Fe,new oi(this,{getDelayMs:()=>this.delayMs,playPopupSound:()=>{this.soundUrl&&new Audio(this.soundUrl).play().then(()=>{}).catch(r=>{console.error("Error playing audio:",r,{})})},setPersistedState:r=>{r?localStorage.setItem("_molin_popup",JSON.stringify(r)):localStorage.removeItem("_molin_popup")},getPersistedState:()=>{let r=localStorage.getItem("_molin_popup");try{return r?JSON.parse(r):null}catch{return null}}}));d(this,Zs,new si(this,l(this,Fe)));this.positionClasses="",this.delayMs=0,this.soundUrl="",this.content={desktop:{text:""},mobile:{title:"",text:"",button:"",color:"",poweredBy:!0}}}render(){let r=l(this,Fe).showing?"visible opacity-100 translate-y-0":"invisible opacity-0 translate-y-3",n=this.content;return h`
653
665
  <!-- mobile shadow backdrop -->
654
- <div @click="${$(this,xt,Zs)}" class="${t} fixed inset-0 z-[2147483647] bg-black/50 transition-[opacity,visibility] sm:hidden"></div>
666
+ <div @click="${m(this,Te,li)}" class="${r} fixed inset-0 z-[2147483647] bg-black/50 transition-[opacity,visibility] sm:hidden"></div>
655
667
 
656
668
  <!-- mobile overlay -->
657
- <div class="${t} fixed bottom-0 left-0 right-0 z-[2147483647] sm:hidden">
658
- <mw-popup-mobile title="${r.mobile.title}" text="${r.mobile.text}" button="${r.mobile.button}" color="${r.mobile.color}" @mw:click="${$(this,xt,yl)}" @mw:close="${$(this,xt,Zs)}">
659
- ${r.mobile.poweredBy?y`<mw-powered-by class="block p-4" slot="footer"></mw-powered-by>`:j}
669
+ <div class="${r} fixed bottom-0 left-0 right-0 z-[2147483647] sm:hidden">
670
+ <mw-popup-mobile title="${n.mobile.title}" text="${n.mobile.text}" button="${n.mobile.button}" color="${n.mobile.color}" @mw:click="${m(this,Te,Ws)}" @mw:close="${m(this,Te,li)}">
671
+ ${n.mobile.poweredBy?h`<mw-powered-by class="block p-4" slot="footer"></mw-powered-by>`:E}
660
672
  </mw-popup-mobile>
661
673
  </div>
662
674
 
663
675
  <!-- desktop -->
664
- <div class="${t} ${this.positionClasses} fixed z-[2147483647] transition-[opacity,translate,visibility] max-sm:hidden">
665
- <mw-popup-desktop text="${r.desktop.text}" @mw:click="${$(this,xt,yl)}" @mw:close="${$(this,xt,Zs)}"></mw-popup-desktop>
676
+ <div class="${r} ${this.positionClasses} fixed z-[2147483647] transition-[opacity,translate,visibility] max-sm:hidden">
677
+ <mw-popup-desktop text="${n.desktop.text}" @mw:click="${m(this,Te,Ws)}" @mw:close="${m(this,Te,li)}"></mw-popup-desktop>
666
678
  </div>
667
- `}hide(){f(this,Ut).hide()}};Ut=new WeakMap,_l=new WeakMap,xt=new WeakSet,Zs=function(){f(this,Ut).onCloseClick()},yl=function(){this.dispatchEvent(new Js.ClickEvent),f(this,Ut).onContentClick()},M(Js,"properties",{positionClasses:{type:String,attribute:"position"},delayMs:{type:Number,attribute:"delay"},soundUrl:{type:String,attribute:"sound"},content:{type:Object}});var ln=Js,vl;ln.ClickEvent=(vl=class extends CustomEvent{constructor(e={}){super(ln.ClickEvent.type,{...e})}},M(vl,"type","mw:click"),vl);customElements.get("mw-popup")||customElements.define("mw-popup",ln);var Ks,Rp,Xs=class extends z(N){constructor(){super();w(this,Ks);M(this,"render",()=>y`
679
+ `}hide(){l(this,Fe).hide()}};Fe=new WeakMap,Zs=new WeakMap,Te=new WeakSet,li=function(){l(this,Fe).onCloseClick()},Ws=function(){this.dispatchEvent(new ui.ClickEvent),l(this,Fe).onContentClick()},w(ui,"properties",{positionClasses:{type:String,attribute:"position"},delayMs:{type:Number,attribute:"delay"},soundUrl:{type:String,attribute:"sound"},content:{type:Object}});var Ur=ui,zs;Ur.ClickEvent=(zs=class extends CustomEvent{constructor(e={}){super(Ur.ClickEvent.type,{...e})}},w(zs,"type","mw:click"),zs);customElements.get("mw-popup")||customElements.define("mw-popup",Ur);var pi,jl,ci=class extends T(S){constructor(){super();d(this,pi);w(this,"render",()=>h`
668
680
  <span class="relative inline-flex">
669
681
  <slot></slot>
670
- <span class="${f(this,Ks,Rp)} pointer-events-none absolute z-10 flex h-3 w-3">
682
+ <span class="${l(this,pi,jl)} pointer-events-none absolute z-10 flex h-3 w-3">
671
683
  <span class="bg-${this.color} absolute inline-flex h-3 w-3 animate-ping rounded-full opacity-75"></span>
672
684
  <span class="bg-${this.color} relative inline-flex h-3 w-3 rounded-full"></span>
673
685
  </span>
674
686
  </span>
675
- `);this.color="sky-500",this.position="top-right"}};Ks=new WeakSet,Rp=function(){switch(this.position){case"top-left":return"top-0 left-0 -mt-1 -ml-1";case"top-right":return"top-0 right-0 -mt-1 -mr-1";case"bottom-left":return"bottom-0 left-0 -mb-1 -ml-1";case"bottom-right":return"bottom-0 right-0 -mb-1 -mr-1";default:throw new Error(`Invalid position: ${this.position}`)}},M(Xs,"properties",{color:{type:String,attribute:"color"},position:{type:String,attribute:"position"}});customElements.get("mw-pulse-dot")||customElements.define("mw-pulse-dot",Xs);var Ys=class extends z(N){constructor(){super();M(this,"render",()=>y`
687
+ `);this.color="sky-500",this.position="top-right"}};pi=new WeakSet,jl=function(){switch(this.position){case"top-left":return"top-0 left-0 -mt-1 -ml-1";case"top-right":return"top-0 right-0 -mt-1 -mr-1";case"bottom-left":return"bottom-0 left-0 -mb-1 -ml-1";case"bottom-right":return"bottom-0 right-0 -mb-1 -mr-1";default:throw new Error(`Invalid position: ${this.position}`)}},w(ci,"properties",{color:{type:String,attribute:"color"},position:{type:String,attribute:"position"}});customElements.get("mw-pulse-dot")||customElements.define("mw-pulse-dot",ci);var fi=class extends T(S){constructor(){super();w(this,"render",()=>h`
676
688
  <div class="${this.positionClasses} fixed bottom-24 right-6 flex animate-bounce flex-col items-center justify-center font-sans text-base">
677
689
  <p class="mb-2 -translate-x-4 -rotate-12 transform text-lg font-bold leading-normal text-gray-800">${this.text}</p>
678
690
 
@@ -685,21 +697,21 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
685
697
  stroke-linecap="round"></path>
686
698
  </svg>
687
699
  </div>
688
- `);this.positionClasses="",this.text="Try it out"}};M(Ys,"properties",{positionClasses:{type:String,attribute:"position"},text:{type:String}});customElements.get("mw-try-it-out")||customElements.define("mw-try-it-out",Ys);var Op=(i,e,t)=>{for(let r of e)if(r[0]===i)return(0,r[1])();return t?.()};var Qs=class extends Fr(N){constructor(){super(),this.orderDetails=null,this.streaming=!1,this.linksNewTab=!1}render(){let e=Ji(this.orderDetails?.order_status?.step||[]),t=Ji(this.orderDetails?.items?.item||[]),r=Ji(this.orderDetails?.actions||[]);return y`
700
+ `);this.positionClasses="",this.text="Try it out"}};w(fi,"properties",{positionClasses:{type:String,attribute:"position"},text:{type:String}});customElements.get("mw-try-it-out")||customElements.define("mw-try-it-out",fi);var Dl=(t,e,r)=>{for(let n of e)if(n[0]===t)return(0,n[1])();return r?.()};var hi=class extends hr(S){constructor(){super(),this.orderDetails=null,this.streaming=!1,this.linksNewTab=!1}render(){let e=Dt(this.orderDetails?.order_status?.step||[]),r=Dt(this.orderDetails?.items?.item||[]),n=Dt(this.orderDetails?.actions||[]);return h`
689
701
  <div class="flex w-full max-w-md flex-col rounded-3xl border bg-white p-4">
690
702
  <!-- Header with order ID -->
691
703
  <div class="mb-2">
692
- ${this.orderDetails?.order_id?.label||!this.streaming?y`<h2 class="text-lg font-semibold">${this.orderDetails?.order_id?.label} ${this.orderDetails?.order_id?.value}</h2>`:y`<div class="h-7 w-full animate-pulse rounded bg-gray-200"></div>`}
704
+ ${this.orderDetails?.order_id?.label||!this.streaming?h`<h2 class="text-lg font-semibold">${this.orderDetails?.order_id?.label} ${this.orderDetails?.order_id?.value}</h2>`:h`<div class="h-7 w-full animate-pulse rounded bg-gray-200"></div>`}
693
705
  </div>
694
706
 
695
707
  <!-- Progress Timeline -->
696
708
  <div>
697
709
  <ol role="list" class="w-full overflow-hidden">
698
- ${this.streaming&&!this.orderDetails?y`
710
+ ${this.streaming&&!this.orderDetails?h`
699
711
  <!-- Loading for status timeline -->
700
- ${[1,2,3].map((n,s)=>y`
712
+ ${[1,2,3].map((i,s)=>h`
701
713
  <li class="w-full pb-8">
702
- ${s<2?y`<div class="absolute left-2 top-2 -ml-px mt-0.5 h-full w-0.5 animate-pulse bg-gray-200" aria-hidden="true"></div>`:""}
714
+ ${s<2?h`<div class="absolute left-2 top-2 -ml-px mt-0.5 h-full w-0.5 animate-pulse bg-gray-200" aria-hidden="true"></div>`:""}
703
715
  <div class="group relative flex items-start">
704
716
  <span class="flex h-6 items-center">
705
717
  <span class="h-4 w-4 animate-pulse rounded-full bg-gray-200"></span>
@@ -710,32 +722,32 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
710
722
  </div>
711
723
  </li>
712
724
  `)}
713
- `:rt(e,n=>n.label,(n,s)=>{let o=n.status==="completed",l=n.status==="in_progress",a=s===e.length-1;return y`<li class="relative pb-4">
714
- ${a?"":y`<div class="${`absolute left-2 top-2 -ml-px mt-0.5 h-full w-0.5 ${o?"bg-[#601feb]":"bg-gray-300"}`}" aria-hidden="true"></div>`}
725
+ `:me(e,i=>i.label,(i,s)=>{let o=i.status==="completed",u=i.status==="in_progress",a=s===e.length-1;return h`<li class="relative pb-4">
726
+ ${a?"":h`<div class="${`absolute left-2 top-2 -ml-px mt-0.5 h-full w-0.5 ${o?"bg-[#601feb]":"bg-gray-300"}`}" aria-hidden="true"></div>`}
715
727
 
716
728
  <div class="group relative flex items-start">
717
- ${Op(n.status,[["pending",()=>y` <span class="flex h-6 items-center">
729
+ ${Dl(i.status,[["pending",()=>h` <span class="flex h-6 items-center">
718
730
  <span class="flex h-4 w-4 items-center justify-center rounded-full border-2 border-gray-300 bg-white">
719
731
  <span class="h-1.5 w-1.5 rounded-full bg-transparent"></span>
720
732
  </span>
721
- </span>`],["in_progress",()=>y`<span class="flex h-6 items-center">
733
+ </span>`],["in_progress",()=>h`<span class="flex h-6 items-center">
722
734
  <span class="flex h-4 w-4 items-center justify-center rounded-full border-2 border-[#601feb] bg-white">
723
735
  <span class="h-1.5 w-1.5 rounded-full bg-[#601feb]"></span>
724
736
  </span>
725
- </span>`],["completed",()=>y`
737
+ </span>`],["completed",()=>h`
726
738
  <span class="flex h-6 items-center">
727
739
  <span class="flex h-4 w-4 items-center justify-center rounded-full bg-[#601feb]">
728
740
  <hi-outline class="mb-3 block h-3 w-3 text-white" name="check"></hi-outline>
729
741
  </span>
730
742
  </span>
731
- `]],()=>y`<span class="flex h-6 items-center">
743
+ `]],()=>h`<span class="flex h-6 items-center">
732
744
  <span class="flex h-4 w-4 items-center justify-center rounded-full border-2 border-[#601feb] bg-white">
733
745
  <span class="h-1.5 w-1.5 rounded-full bg-[#601feb]"></span>
734
746
  </span>
735
747
  </span>`)}
736
748
 
737
749
  <span class="ml-3 flex min-w-0 flex-col">
738
- <span class="${`text-sm font-medium ${l?"text-[#601feb]":o?"text-gray-900":"text-gray-500"}`}"> ${n.label} </span>
750
+ <span class="${`text-sm font-medium ${u?"text-[#601feb]":o?"text-gray-900":"text-gray-500"}`}"> ${i.label} </span>
739
751
  </span>
740
752
  </div>
741
753
  </li>`})}
@@ -744,7 +756,7 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
744
756
 
745
757
  <!-- Products list with order items -->
746
758
  <div class="mb-2 w-full">
747
- ${t.length===0&&!this.orderDetails?.total?.amount&&this.streaming?y`
759
+ ${r.length===0&&!this.orderDetails?.total?.amount&&this.streaming?h`
748
760
  <!-- Loading shimmer for products -->
749
761
  <div class="w-full space-y-4">
750
762
  <div class="flex items-center gap-2">
@@ -759,11 +771,11 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
759
771
  <div class="h-4 w-10 animate-pulse rounded bg-gray-200"></div>
760
772
  </div>
761
773
  </div>
762
- `:y`
774
+ `:h`
763
775
  <div class="divide-y divide-gray-100">
764
- ${this.streaming&&!t.length?y`
776
+ ${this.streaming&&!r.length?h`
765
777
  <!-- Loading shimmer for individual products -->
766
- ${[1,2].map(()=>y`
778
+ ${[1,2].map(()=>h`
767
779
  <div class="flex items-center gap-2 py-1.5">
768
780
  <div class="h-12 w-12 animate-pulse rounded-lg bg-gray-200"></div>
769
781
  <div class="min-w-0 flex-1">
@@ -772,14 +784,14 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
772
784
  <div class="h-4 w-24 animate-pulse rounded bg-gray-200"></div>
773
785
  </div>
774
786
  `)}
775
- `:t?.map(n=>{let s=n?.image_url;return y`
787
+ `:r?.map(i=>{let s=i?.image_url;return h`
776
788
  <div class="flex items-center gap-2 py-1.5">
777
- <mw-product-thumbnail class="block h-12 w-12" src="${Ft(s)}"></mw-product-thumbnail>
789
+ <mw-product-thumbnail class="block h-12 w-12" src="${Re(s)}"></mw-product-thumbnail>
778
790
 
779
791
  <div class="min-w-0 flex-1">
780
- ${!n?.name&&this.streaming?y`<div class="h-4 w-32 animate-pulse rounded bg-gray-200"></div>`:y`<h3 class="truncate text-sm font-medium">${n?.name}</h3>`}
792
+ ${!i?.name&&this.streaming?h`<div class="h-4 w-32 animate-pulse rounded bg-gray-200"></div>`:h`<h3 class="truncate text-sm font-medium">${i?.name}</h3>`}
781
793
  </div>
782
- ${!n?.price&&this.streaming?y`<div class="h-4 w-24 animate-pulse rounded bg-gray-200"></div>`:y`<span class="text-sm text-gray-500">${n?.quantity&&Number(n.quantity)>1?"x":""} ${n?.price}</span>`}
794
+ ${!i?.price&&this.streaming?h`<div class="h-4 w-24 animate-pulse rounded bg-gray-200"></div>`:h`<span class="text-sm text-gray-500">${i?.quantity&&Number(i.quantity)>1?"x":""} ${i?.price}</span>`}
783
795
  </div>
784
796
  `})}
785
797
  </div>
@@ -795,9 +807,9 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
795
807
 
796
808
  <!-- Shipping and payment information -->
797
809
  <div class="mb-2 flex w-full flex-col gap-2 overflow-hidden">
798
- ${this.streaming&&!this.orderDetails?y`
810
+ ${this.streaming&&!this.orderDetails?h`
799
811
  <!-- Loading shimmer template -->
800
- ${[1,2].map(()=>y`
812
+ ${[1,2].map(()=>h`
801
813
  <div>
802
814
  <div class="mb-2 h-5 w-32 animate-pulse rounded bg-gray-200"></div>
803
815
  <div class="space-y-2 overflow-hidden">
@@ -806,10 +818,10 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
806
818
  </div>
807
819
  </div>
808
820
  `)}
809
- `:y`
821
+ `:h`
810
822
  <!-- Shipping Section -->
811
823
  <div>
812
- ${this.streaming&&!this.orderDetails?.shipping?y`
824
+ ${this.streaming&&!this.orderDetails?.shipping?h`
813
825
  <div>
814
826
  <div class="mb-2 h-5 w-32 animate-pulse rounded bg-gray-200"></div>
815
827
  <div class="space-y-2 overflow-hidden">
@@ -817,18 +829,18 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
817
829
  <div class="h-4 w-36 animate-pulse rounded bg-gray-200"></div>
818
830
  </div>
819
831
  </div>
820
- `:this.orderDetails?.shipping?.method||this.orderDetails?.customer?.name?y`
832
+ `:this.orderDetails?.shipping?.method||this.orderDetails?.customer?.name?h`
821
833
  <h3 class="mb-1 text-sm font-medium">${this.orderDetails?.shipping?.label}</h3>
822
834
  <div class="space-y-1">
823
- ${this.orderDetails.customer?.name?y`<p class="text-xs text-gray-600">${this.orderDetails.customer.name}</p>`:""}
824
- ${this.orderDetails.shipping?.method?y`<p class="text-xs text-gray-600">${this.orderDetails.shipping.method}</p>`:""}
835
+ ${this.orderDetails.customer?.name?h`<p class="text-xs text-gray-600">${this.orderDetails.customer.name}</p>`:""}
836
+ ${this.orderDetails.shipping?.method?h`<p class="text-xs text-gray-600">${this.orderDetails.shipping.method}</p>`:""}
825
837
  </div>
826
838
  `:""}
827
839
  </div>
828
840
 
829
841
  <!-- Payment Section -->
830
842
  <div>
831
- ${this.streaming&&!this.orderDetails?.payment?y`
843
+ ${this.streaming&&!this.orderDetails?.payment?h`
832
844
  <div>
833
845
  <div class="mb-2 h-5 w-32 animate-pulse rounded bg-gray-200"></div>
834
846
  <div class="space-y-2 overflow-hidden">
@@ -836,15 +848,15 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
836
848
  <div class="h-4 w-36 animate-pulse rounded bg-gray-200"></div>
837
849
  </div>
838
850
  </div>
839
- `:this.orderDetails?.payment?y`
851
+ `:this.orderDetails?.payment?h`
840
852
  <h3 class="mb-1 text-sm font-medium">${this.orderDetails.payment.label}</h3>
841
- ${this.orderDetails.payment?.method?.value?y`
853
+ ${this.orderDetails.payment?.method?.value?h`
842
854
  <p class="text-xs text-gray-600">
843
855
  <span class="font-medium">${this.orderDetails.payment.method.label}:</span>
844
856
  ${this.orderDetails.payment.method.value}
845
857
  </p>
846
858
  `:""}
847
- ${this.orderDetails.payment.status?.value?y`
859
+ ${this.orderDetails.payment.status?.value?h`
848
860
  <p class="text-xs text-gray-600">
849
861
  <span class="font-medium">${this.orderDetails.payment.status.label}:</span>
850
862
  <span>${this.orderDetails.payment.status.value}</span>
@@ -857,89 +869,87 @@ var a0=Object.defineProperty;var oc=i=>{throw TypeError(i)};var l0=(i,e,t)=>e in
857
869
 
858
870
  <!-- Action buttons section -->
859
871
  <div class="flex w-full flex-col gap-2 overflow-hidden">
860
- ${this.streaming&&!r[0]?.track_order?.label&&!ja(r[0]?.track_order?.tracking_url||"")?y`
872
+ ${this.streaming&&!n[0]?.track_order?.label&&!hs(n[0]?.track_order?.tracking_url||"")?h`
861
873
  <!-- Loading shimmer for buttons -->
862
874
  <div class="h-10 w-full min-w-[250px] animate-pulse overflow-hidden rounded-xl bg-gray-200"></div>
863
- `:rt(r,(n,s)=>`action-${s}`,n=>{if(n?.track_order?.label)return y`
864
- ${ja(n.track_order?.tracking_url||"")?y` <a
875
+ `:me(n,(i,s)=>`action-${s}`,i=>{if(i?.track_order?.label)return h`
876
+ ${hs(i.track_order?.tracking_url||"")?h` <a
865
877
  target="${this.linksNewTab?"_blank":"_self"}"
866
- href="${n.track_order?.tracking_url}"
878
+ href="${i.track_order?.tracking_url}"
867
879
  class="mt-1 w-full rounded-xl bg-[#601feb] px-4 py-2 text-center text-sm font-medium text-white hover:opacity-90"
868
- >${n.track_order.label}</a
880
+ >${i.track_order.label}</a
869
881
  >`:null}
870
882
  `})}
871
883
  </div>
872
884
  </div>
873
- `}};M(Qs,"properties",{orderDetails:{type:Object,attribute:"order-details"},streaming:{type:Boolean},linksNewTab:{type:Boolean,attribute:"links-new-tab"}});customElements.get("mw-product-order-status-card")||customElements.define("mw-product-order-status-card",Qs);var Pe,kt,to,un,sr,bl=class{constructor(){w(this,Pe,[]);w(this,kt);w(this,to,10);w(this,un,5e3);w(this,sr,!1)}async add(e,t){if(f(this,Pe).push({event:e,properties:Object.assign({},t,Dp()),distinct_id:Fp(t.distinct_id),timestamp:new Date().toISOString()}),f(this,Pe).length>=f(this,to))return this.flush();f(this,kt)||E(this,kt,setTimeout(()=>{this.flush().catch(console.error)},f(this,un)))}async flush(){if(f(this,sr)||f(this,Pe).length===0)return;let e=[...f(this,Pe)];try{E(this,sr,!0),clearTimeout(f(this,kt)),E(this,kt,void 0),E(this,Pe,[]);let t=new AbortController,r=setTimeout(()=>t.abort(),5e3),n=new FormData;n.append("events",JSON.stringify(e));let s=await fetch(new URL("/widgets/data/collect",wl()).href,{method:"POST",body:n,signal:t.signal});if(clearTimeout(r),!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return s}catch(t){if(t.name==="AbortError")console.error("Request timed out, retrying events"),E(this,Pe,[...e,...f(this,Pe)]);else{console.error("Failed to send events to backend:",t);let r=e.filter(n=>n.event.includes("error"));E(this,Pe,[...r,...f(this,Pe)])}}finally{E(this,sr,!1),f(this,Pe).length>0&&!f(this,kt)&&E(this,kt,setTimeout(()=>{this.flush().catch(console.error)},f(this,un)))}}async flushBeforeUnload(){if(f(this,Pe).length>0)try{let e=new FormData;e.append("events",JSON.stringify(f(this,Pe))),navigator.sendBeacon(new URL("/widgets/data/collect",wl()).href,e)}catch(e){console.error("Failed to send final events:",e)}}};Pe=new WeakMap,kt=new WeakMap,to=new WeakMap,un=new WeakMap,sr=new WeakMap;var Lp=new bl;window.addEventListener("beforeunload",()=>{Lp.flushBeforeUnload().catch(console.error)});async function se(i,e){try{if(e.immediate){let t=new FormData;t.append("events",JSON.stringify([{event:i,properties:Object.assign({},e,Dp()),distinct_id:Fp(e.distinct_id),timestamp:new Date().toISOString()}]));let r=await fetch(new URL("/widgets/data/collect",wl()).href,{method:"POST",body:t});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return await r.json()}return Lp.add(i,e)}catch(t){console.error("Failed to send event:",t)}}function Fp(i=crypto.randomUUID()){let e="molin_shop_assistant_distinct_id";try{let t=localStorage.getItem(e);return t||(t=i,localStorage.setItem(e,t)),t}catch(t){console.error("Failed to handle distinct ID:",t);try{localStorage.setItem(e,i)}catch(r){console.error("Failed to store new distinct ID:",r)}return i}}function Dp(){return{referrer:document.referrer,userAgent:navigator.userAgent,language:navigator.language,screenWidth:window.innerWidth,screenHeight:window.innerHeight,timestamp:new Date().toISOString(),timezoneOffset:new Date().getTimezoneOffset(),doNotTrack:navigator.doNotTrack}}var eo;function wl(){if(eo)return eo;let i=new URL(import.meta.url).hostname;return eo=new Map([["localhost","http://localhost:8787"],["widget.molin.foo","https://molin.foo"],["widget.molin.ai","https://molin.ai"],["molin.foo","https://molin.foo"]]).get(i)||"https://molin.ai",eo}var fi,cn,qt,gi,ro,Np,io=class{constructor(e,t,r){w(this,ro);w(this,fi);w(this,cn);w(this,qt);w(this,gi);M(this,"isLoading",!1);M(this,"data");E(this,fi,e),E(this,cn,t),E(this,qt,r),e.addController(this)}fetch(){if(this.isLoading)return;f(this,gi)?.abort();let e=new AbortController;E(this,gi,e),this.isLoading=!0,this.data=void 0,f(this,fi).requestUpdate(),(async()=>{let t=$(this,ro,Np).call(this);return t.signal?.addEventListener("abort",()=>e.abort(),{signal:e.signal}),fetch(t,{signal:e.signal})})().then(async t=>{if(!t.ok)throw new Error(`${t.statusText}: ${await t.text()}`);this.isLoading=!1,this.data=typeof f(this,qt)?.transform=="function"?await f(this,qt).transform(t):t,f(this,fi).requestUpdate()}).catch(t=>{f(this,qt)?.onError?.(t),this.isLoading=!1,this.data=void 0,f(this,fi).requestUpdate()}).finally(()=>{e.abort()})}hostConnected(){this.isLoading||f(this,qt)?.fetchWhenConnected&&this.fetch()}hostDisconnected(){f(this,gi)?.abort(),E(this,gi,void 0)}};fi=new WeakMap,cn=new WeakMap,qt=new WeakMap,gi=new WeakMap,ro=new WeakSet,Np=function(){let e=f(this,cn);if(typeof e=="function"&&(e=e()),!e)throw new Error("missing request");return new Request(e)};var dt,dn,or,ar,Bt=class{constructor(e,t){w(this,dt);w(this,dn);w(this,or);w(this,ar);E(this,dt,e),E(this,dn,t),e.addController(this)}get data(){return f(this,ar)||f(this,or)?.data}hostConnected(){if(f(this,or)||f(this,ar))return;let e=Up();e&&e.widgetId===f(this,dt).widgetId?E(this,ar,e.config):E(this,or,new io(f(this,dt),()=>{if(f(this,dt).cdn&&f(this,dt).widgetId)return`${f(this,dt).cdn}/config?w=${f(this,dt).widgetId}`;throw new Error("missing cdn or widgetId")},{fetchWhenConnected:!0,transform:t=>t.json(),onError:f(this,dn)?.onError}))}};dt=new WeakMap,dn=new WeakMap,or=new WeakMap,ar=new WeakMap;function Ht(){return window.molinSettings&&typeof window.molinSettings=="object"?window.molinSettings:null}function qp(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(i,n).enumerable})),t.push.apply(t,r)}return t}function C(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?qp(Object(t),!0).forEach(function(r){A(i,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):qp(Object(t)).forEach(function(r){Object.defineProperty(i,r,Object.getOwnPropertyDescriptor(t,r))})}return i}function A(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function qh(i,e){if(i==null)return{};var t,r,n=function(o,l){if(o==null)return{};var a,u,d={},c=Object.keys(o);for(u=0;u<c.length;u++)a=c[u],l.indexOf(a)>=0||(d[a]=o[a]);return d}(i,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);for(r=0;r<s.length;r++)t=s[r],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(i,t)&&(n[t]=i[t])}return n}var pt,It={DEBUG:!1,LIB_VERSION:"1.205.0"},v=typeof window<"u"?window:void 0,Be=typeof globalThis<"u"?globalThis:v,Bh=Array.prototype,Bp=Bh.forEach,Hp=Bh.indexOf,Ge=Be?.navigator,L=Be?.document,qe=Be?.location,Rl=Be?.fetch,Ol=Be!=null&&Be.XMLHttpRequest&&"withCredentials"in new Be.XMLHttpRequest?Be.XMLHttpRequest:void 0,zp=Be?.AbortController,we=Ge?.userAgent,H=v??{},xl="$copy_autocapture",a1=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"];(function(i){i.GZipJS="gzip-js",i.Base64="base64"})(pt||(pt={}));function V(i,e){return i.indexOf(e)!==-1}var jo=function(i){return i.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},Ll=function(i){return i.replace(/^\$/,"")},l1=Array.isArray,Hh=Object.prototype,zh=Hh.hasOwnProperty,No=Hh.toString,fe=l1||function(i){return No.call(i)==="[object Array]"},Ze=i=>typeof i=="function",ce=i=>i===Object(i)&&!fe(i),ur=i=>{if(ce(i)){for(var e in i)if(zh.call(i,e))return!1;return!0}return!1},F=i=>i===void 0,Se=i=>No.call(i)=="[object String]",Vp=i=>Se(i)&&i.trim().length===0,Jt=i=>i===null,Y=i=>F(i)||Jt(i),Oe=i=>No.call(i)=="[object Number]",ki=i=>No.call(i)==="[object Boolean]",u1=i=>i instanceof FormData,c1=i=>V(a1,i),Vh=i=>{var e={_log:function(t){if(v&&(It.DEBUG||H.POSTHOG_DEBUG)&&!F(v.console)&&v.console){for(var r=("__rrweb_original__"in v.console[t])?v.console[t].__rrweb_original__:v.console[t],n=arguments.length,s=new Array(n>1?n-1:0),o=1;o<n;o++)s[o-1]=arguments[o];r(i,...s)}},info:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];e._log("log",...r)},warn:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];e._log("warn",...r)},error:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];e._log("error",...r)},critical:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];console.error(i,...r)},uninitializedWarning:t=>{e.error("You must initialize PostHog before calling ".concat(t))},createLogger:t=>Vh("".concat(i," ").concat(t))};return e},O=Vh("[PostHog.js]"),Fe=O.createLogger,_o={};function dr(i,e,t){if(fe(i)){if(Bp&&i.forEach===Bp)i.forEach(e,t);else if("length"in i&&i.length===+i.length){for(var r=0,n=i.length;r<n;r++)if(r in i&&e.call(t,i[r],r)===_o)return}}}function K(i,e,t){if(!Y(i)){if(fe(i))return dr(i,e,t);if(u1(i)){for(var r of i.entries())if(e.call(t,r[1],r[0])===_o)return}else for(var n in i)if(zh.call(i,n)&&e.call(t,i[n],n)===_o)return}}var Te=function(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return dr(t,function(n){for(var s in n)n[s]!==void 0&&(i[s]=n[s])}),i};function mo(i){for(var e=Object.keys(i),t=e.length,r=new Array(t);t--;)r[t]=[e[t],i[e[t]]];return r}var Wp=function(i){try{return i()}catch{return}},d1=function(i){return function(){try{for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return i.apply(this,t)}catch(n){O.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),O.critical(n)}}},bo=function(i){var e={};return K(i,function(t,r){Se(t)&&t.length>0&&(e[r]=t)}),e};function p1(i,e){return t=i,r=s=>Se(s)&&!Jt(e)?s.slice(0,e):s,n=new Set,function s(o,l){return o!==Object(o)?r?r(o,l):o:n.has(o)?void 0:(n.add(o),fe(o)?(a=[],dr(o,u=>{a.push(s(u))})):(a={},K(o,(u,d)=>{n.has(u)||(a[d]=s(u,d))})),a);var a}(t);var t,r,n}var At=function(){function i(e){return e&&(e.preventDefault=i.preventDefault,e.stopPropagation=i.stopPropagation),e}return i.preventDefault=function(){this.returnValue=!1},i.stopPropagation=function(){this.cancelBubble=!0},function(e,t,r,n,s){if(e)if(e.addEventListener&&!n)e.addEventListener(t,r,!!s);else{var o="on"+t,l=e[o];e[o]=function(a,u,d){return function(c){if(c=c||i(v?.event)){var p,h=!0;Ze(d)&&(p=d(c));var g=u.call(a,c);return p!==!1&&g!==!1||(h=!1),h}}}(e,r,l)}else O.error("No valid element provided to register_event")}}();function Wh(i,e){for(var t=0;t<i.length;t++)if(e(i[t]))return i[t]}var Gh="$people_distinct_id",mn="__alias",vn="__timers",Gp="$autocapture_disabled_server_side",Fl="$heatmaps_enabled_server_side",Zp="$exception_capture_enabled_server_side",Jp="$web_vitals_enabled_server_side",Zh="$dead_clicks_enabled_server_side",Xp="$web_vitals_allowed_metrics",Dl="$session_recording_enabled_server_side",Kp="$console_log_recording_enabled_server_side",Yp="$session_recording_network_payload_capture",Qp="$session_recording_canvas_recording",eh="$replay_sample_rate",th="$replay_minimum_duration",ih="$replay_script_config",wo="$sesid",yn="$session_is_sampled",kl="$session_recording_url_trigger_activated_session",Cl="$session_recording_event_trigger_activated_session",cr="$enabled_feature_flags",vo="$early_access_features",_n="$stored_person_properties",wi="$stored_group_properties",jl="$surveys",no="$surveys_activated",xo="$flag_call_reported",St="$user_state",Nl="$client_session_props",Ul="$capture_rate_limit",ql="$initial_campaign_params",Bl="$initial_referrer_info",Hl="$initial_person_info",ko="$epp",Jh="__POSTHOG_TOOLBAR__",rh="$posthog_cklsh",h1=[Gh,mn,"__cmpns",vn,Dl,Fl,wo,cr,St,vo,wi,_n,jl,xo,Nl,Ul,ql,Bl,ko],so=Fe("[FeatureFlags]"),Sl="$active_feature_flags",oo="$override_feature_flags",nh="$feature_flag_payloads",sh=i=>{var e={};for(var[t,r]of mo(i||{}))r&&(e[t]=r);return e},zl=class{constructor(e){A(this,"_override_warning",!1),A(this,"_hasLoadedFlags",!1),A(this,"_requestInFlight",!1),A(this,"_reloadingDisabled",!1),A(this,"_additionalReloadRequested",!1),A(this,"_decideCalled",!1),A(this,"_flagsLoadedFromRemote",!1),this.instance=e,this.featureFlagEventHandlers=[]}decide(){if(this.instance.config.__preview_remote_config)this._decideCalled=!0;else{var e=!this._reloadDebouncer&&(this.instance.config.advanced_disable_feature_flags||this.instance.config.advanced_disable_feature_flags_on_first_load);this._callDecideEndpoint({disableFlags:e})}}get hasLoadedFlags(){return this._hasLoadedFlags}getFlags(){return Object.keys(this.getFlagVariants())}getFlagVariants(){var e=this.instance.get_property(cr),t=this.instance.get_property(oo);if(!t)return e||{};for(var r=Te({},e),n=Object.keys(t),s=0;s<n.length;s++)r[n[s]]=t[n[s]];return this._override_warning||(so.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:r}),this._override_warning=!0),r}getFlagPayloads(){return this.instance.get_property(nh)||{}}reloadFeatureFlags(){this._reloadingDisabled||this.instance.config.advanced_disable_feature_flags||this._reloadDebouncer||(this._reloadDebouncer=setTimeout(()=>{this._callDecideEndpoint()},5))}clearDebouncer(){clearTimeout(this._reloadDebouncer),this._reloadDebouncer=void 0}ensureFlagsLoaded(){this._hasLoadedFlags||this._requestInFlight||this._reloadDebouncer||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this._reloadingDisabled=e}_callDecideEndpoint(e){if(this.clearDebouncer(),!this.instance.config.advanced_disable_decide)if(this._requestInFlight)this._additionalReloadRequested=!0;else{var t={token:this.instance.config.token,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:this.instance.get_property(_n),group_properties:this.instance.get_property(wi)};(e!=null&&e.disableFlags||this.instance.config.advanced_disable_feature_flags)&&(t.disable_flags=!0),this._requestInFlight=!0,this.instance._send_request({method:"POST",url:this.instance.requestRouter.endpointFor("api","/decide/?v=3"),data:t,compression:this.instance.config.disable_compression?void 0:pt.Base64,timeout:this.instance.config.feature_flag_request_timeout_ms,callback:r=>{var n,s,o=!0;r.statusCode===200&&(this.$anon_distinct_id=void 0,o=!1),this._requestInFlight=!1,this._decideCalled||(this._decideCalled=!0,this.instance._onRemoteConfig((s=r.json)!==null&&s!==void 0?s:{})),t.disable_flags||(this._flagsLoadedFromRemote=!o,this.receivedFeatureFlags((n=r.json)!==null&&n!==void 0?n:{},o),this._additionalReloadRequested&&(this._additionalReloadRequested=!1,this._callDecideEndpoint()))}})}}getFeatureFlag(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this._hasLoadedFlags||this.getFlags()&&this.getFlags().length>0){var r,n,s,o,l,a=this.getFlagVariants()[e],u="".concat(a),d=this.instance.get_property(xo)||{};return(t.send_event||!("send_event"in t))&&(!(e in d)||!d[e].includes(u))&&(fe(d[e])?d[e].push(u):d[e]=[u],(r=this.instance.persistence)===null||r===void 0||r.register({[xo]:d}),this.instance.capture("$feature_flag_called",{$feature_flag:e,$feature_flag_response:a,$feature_flag_payload:this.getFeatureFlagPayload(e)||null,$feature_flag_bootstrapped_response:((n=this.instance.config.bootstrap)===null||n===void 0||(s=n.featureFlags)===null||s===void 0?void 0:s[e])||null,$feature_flag_bootstrapped_payload:((o=this.instance.config.bootstrap)===null||o===void 0||(l=o.featureFlagPayloads)===null||l===void 0?void 0:l[e])||null,$used_bootstrap_value:!this._flagsLoadedFromRemote})),a}so.warn('getFeatureFlag for key "'+e+`" failed. Feature flags didn't load in time.`)}getFeatureFlagPayload(e){return this.getFlagPayloads()[e]}isFeatureEnabled(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this._hasLoadedFlags||this.getFlags()&&this.getFlags().length>0)return!!this.getFeatureFlag(e,t);so.warn('isFeatureEnabled for key "'+e+`" failed. Feature flags didn't load in time.`)}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(t=>t!==e)}receivedFeatureFlags(e,t){if(this.instance.persistence){this._hasLoadedFlags=!0;var r=this.getFlagVariants(),n=this.getFlagPayloads();(function(s,o){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},u=s.featureFlags,d=s.featureFlagPayloads;if(u)if(fe(u)){var c={};if(u)for(var p=0;p<u.length;p++)c[u[p]]=!0;o&&o.register({[Sl]:u,[cr]:c})}else{var h=u,g=d;s.errorsWhileComputingFlags&&(h=C(C({},l),h),g=C(C({},a),g)),o&&o.register({[Sl]:Object.keys(sh(h)),[cr]:h||{},[nh]:g||{}})}})(e,this.instance.persistence,r,n),this._fireFeatureFlagsCallbacks(t)}}override(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!this.instance.__loaded||!this.instance.persistence)return so.uninitializedWarning("posthog.feature_flags.override");if(this._override_warning=t,e===!1)this.instance.persistence.unregister(oo);else if(fe(e)){for(var r={},n=0;n<e.length;n++)r[e[n]]=!0;this.instance.persistence.register({[oo]:r})}else this.instance.persistence.register({[oo]:e})}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this._hasLoadedFlags){var{flags:t,flagVariants:r}=this._prepareFeatureFlagsForCallbacks();e(t,r)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t){var r,n=(this.instance.get_property(vo)||[]).find(a=>a.flagKey===e),s={["$feature_enrollment/".concat(e)]:t},o={$feature_flag:e,$feature_enrollment:t,$set:s};n&&(o.$early_access_feature_name=n.name),this.instance.capture("$feature_enrollment_update",o),this.setPersonPropertiesForFlags(s,!1);var l=C(C({},this.getFlagVariants()),{},{[e]:t});(r=this.instance.persistence)===null||r===void 0||r.register({[Sl]:Object.keys(sh(l)),[cr]:l}),this._fireFeatureFlagsCallbacks()}getEarlyAccessFeatures(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],r=this.instance.get_property(vo);if(r&&!t)return e(r);this.instance._send_request({url:this.instance.requestRouter.endpointFor("api","/api/early_access_features/?token=".concat(this.instance.config.token)),method:"GET",callback:n=>{var s;if(n.json){var o=n.json.earlyAccessFeatures;return(s=this.instance.persistence)===null||s===void 0||s.register({[vo]:o}),e(o)}}})}_prepareFeatureFlagsForCallbacks(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter(r=>t[r]),flagVariants:Object.keys(t).filter(r=>t[r]).reduce((r,n)=>(r[n]=t[n],r),{})}}_fireFeatureFlagsCallbacks(e){var{flags:t,flagVariants:r}=this._prepareFeatureFlagsForCallbacks();this.featureFlagEventHandlers.forEach(n=>n(t,r,{errorsLoading:e}))}setPersonPropertiesForFlags(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],r=this.instance.get_property(_n)||{};this.instance.register({[_n]:C(C({},r),e)}),t&&this.instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this.instance.unregister(_n)}setGroupPropertiesForFlags(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],r=this.instance.get_property(wi)||{};Object.keys(r).length!==0&&Object.keys(r).forEach(n=>{r[n]=C(C({},r[n]),e[n]),delete e[n]}),this.instance.register({[wi]:C(C({},r),e)}),t&&this.instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this.instance.get_property(wi)||{};this.instance.register({[wi]:C(C({},t),{},{[e]:{}})})}else this.instance.unregister(wi)}};Math.trunc||(Math.trunc=function(i){return i<0?Math.ceil(i):Math.floor(i)}),Number.isInteger||(Number.isInteger=function(i){return Oe(i)&&isFinite(i)&&Math.floor(i)===i});var oh="0123456789abcdef",Vl=class i{constructor(e){if(this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,t,r,n){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(r)||!Number.isInteger(n)||e<0||t<0||r<0||n<0||e>0xffffffffffff||t>4095||r>1073741823||n>4294967295)throw new RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=e/Math.pow(2,40),s[1]=e/Math.pow(2,32),s[2]=e/Math.pow(2,24),s[3]=e/Math.pow(2,16),s[4]=e/Math.pow(2,8),s[5]=e,s[6]=112|t>>>8,s[7]=t,s[8]=128|r>>>24,s[9]=r>>>16,s[10]=r>>>8,s[11]=r,s[12]=n>>>24,s[13]=n>>>16,s[14]=n>>>8,s[15]=n,new i(s)}toString(){for(var e="",t=0;t<this.bytes.length;t++)e=e+oh.charAt(this.bytes[t]>>>4)+oh.charAt(15&this.bytes[t]),t!==3&&t!==5&&t!==7&&t!==9||(e+="-");if(e.length!==36)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new i(this.bytes.slice(0))}equals(e){return this.compareTo(e)===0}compareTo(e){for(var t=0;t<16;t++){var r=this.bytes[t]-e.bytes[t];if(r!==0)return Math.sign(r)}return 0}},Wl=class{constructor(){A(this,"timestamp",0),A(this,"counter",0),A(this,"random",new Gl)}generate(){var e=this.generateOrAbort();if(F(e)){this.timestamp=0;var t=this.generateOrAbort();if(F(t))throw new Error("Could not generate UUID after timestamp reset");return t}return e}generateOrAbort(){var e=Date.now();if(e>this.timestamp)this.timestamp=e,this.resetCounter();else{if(!(e+1e4>this.timestamp))return;this.counter++,this.counter>4398046511103&&(this.timestamp++,this.resetCounter())}return Vl.fromFieldsV7(this.timestamp,Math.trunc(this.counter/Math.pow(2,30)),this.counter&Math.pow(2,30)-1,this.random.nextUint32())}resetCounter(){this.counter=1024*this.random.nextUint32()+(1023&this.random.nextUint32())}},ah,Xh=i=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var e=0;e<i.length;e++)i[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return i};v&&!F(v.crypto)&&crypto.getRandomValues&&(Xh=i=>crypto.getRandomValues(i));var Gl=class{constructor(){A(this,"buffer",new Uint32Array(8)),A(this,"cursor",1/0)}nextUint32(){return this.cursor>=this.buffer.length&&(Xh(this.buffer),this.cursor=0),this.buffer[this.cursor++]}},Wt=()=>f1().toString(),f1=()=>(ah||(ah=new Wl)).generate(),g1="Thu, 01 Jan 1970 00:00:00 GMT",pn="",m1=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function v1(i,e){if(e){var t=function(n){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:L;if(pn)return pn;if(!s||["localhost","127.0.0.1"].includes(n))return"";for(var o=n.split("."),l=Math.min(o.length,8),a="dmn_chk_"+Wt(),u=new RegExp("(^|;)\\s*"+a+"=1");!pn&&l--;){var d=o.slice(l).join("."),c=a+"=1;domain=."+d;s.cookie=c,u.test(s.cookie)&&(s.cookie=c+";expires="+g1,pn=d)}return pn}(i);if(!t){var r=(n=>{var s=n.match(m1);return s?s[0]:""})(i);r!==t&&O.info("Warning: cookie subdomain discovery mismatch",r,t),t=r}return t?"; domain=."+t:""}return""}var Tt={is_supported:()=>!!L,error:function(i){O.error("cookieStore error: "+i)},get:function(i){if(L){try{for(var e=i+"=",t=L.cookie.split(";").filter(s=>s.length),r=0;r<t.length;r++){for(var n=t[r];n.charAt(0)==" ";)n=n.substring(1,n.length);if(n.indexOf(e)===0)return decodeURIComponent(n.substring(e.length,n.length))}}catch{}return null}},parse:function(i){var e;try{e=JSON.parse(Tt.get(i))||{}}catch{}return e},set:function(i,e,t,r,n){if(L)try{var s="",o="",l=v1(L.location.hostname,r);if(t){var a=new Date;a.setTime(a.getTime()+24*t*60*60*1e3),s="; expires="+a.toUTCString()}n&&(o="; secure");var u=i+"="+encodeURIComponent(JSON.stringify(e))+s+"; SameSite=Lax; path=/"+l+o;return u.length>3686.4&&O.warn("cookieStore warning: large cookie, len="+u.length),L.cookie=u,u}catch{return}},remove:function(i,e){try{Tt.set(i,"",-1,e)}catch{return}}},El=null,ve={is_supported:function(){if(!Jt(El))return El;var i=!0;if(F(v))i=!1;else try{var e="__mplssupport__";ve.set(e,"xyz"),ve.get(e)!=='"xyz"'&&(i=!1),ve.remove(e)}catch{i=!1}return i||O.error("localStorage unsupported; falling back to cookie store"),El=i,i},error:function(i){O.error("localStorage error: "+i)},get:function(i){try{return v?.localStorage.getItem(i)}catch(e){ve.error(e)}return null},parse:function(i){try{return JSON.parse(ve.get(i))||{}}catch{}return null},set:function(i,e){try{v?.localStorage.setItem(i,JSON.stringify(e))}catch(t){ve.error(t)}},remove:function(i){try{v?.localStorage.removeItem(i)}catch(e){ve.error(e)}}},y1=["distinct_id",wo,yn,ko,Hl],ao=C(C({},ve),{},{parse:function(i){try{var e={};try{e=Tt.parse(i)||{}}catch{}var t=Te(e,JSON.parse(ve.get(i)||"{}"));return ve.set(i,t),t}catch{}return null},set:function(i,e,t,r,n,s){try{ve.set(i,e,void 0,void 0,s);var o={};y1.forEach(l=>{e[l]&&(o[l]=e[l])}),Object.keys(o).length&&Tt.set(i,o,t,r,n,s)}catch(l){ve.error(l)}},remove:function(i,e){try{v?.localStorage.removeItem(i),Tt.remove(i,e)}catch(t){ve.error(t)}}}),lo={},_1={is_supported:function(){return!0},error:function(i){O.error("memoryStorage error: "+i)},get:function(i){return lo[i]||null},parse:function(i){return lo[i]||null},set:function(i,e){lo[i]=e},remove:function(i){delete lo[i]}},mi=null,Ce={is_supported:function(){if(!Jt(mi))return mi;if(mi=!0,F(v))mi=!1;else try{var i="__support__";Ce.set(i,"xyz"),Ce.get(i)!=='"xyz"'&&(mi=!1),Ce.remove(i)}catch{mi=!1}return mi},error:function(i){O.error("sessionStorage error: ",i)},get:function(i){try{return v?.sessionStorage.getItem(i)}catch(e){Ce.error(e)}return null},parse:function(i){try{return JSON.parse(Ce.get(i))||null}catch{}return null},set:function(i,e){try{v?.sessionStorage.setItem(i,JSON.stringify(e))}catch(t){Ce.error(t)}},remove:function(i){try{v?.sessionStorage.removeItem(i)}catch(e){Ce.error(e)}}},b1=["localhost","127.0.0.1"],pr=i=>{var e=L?.createElement("a");return F(e)?null:(e.href=i,e)},gr=function(i,e){return!!function(t){try{new RegExp(t)}catch{return!1}return!0}(e)&&new RegExp(e).test(i)},w1=function(i){var e,t,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"&",n=[];return K(i,function(s,o){F(s)||F(o)||o==="undefined"||(e=encodeURIComponent((l=>l instanceof File)(s)?s.name:s.toString()),t=encodeURIComponent(o),n[n.length]=t+"="+e)}),n.join(r)},Co=function(i,e){for(var t,r=((i.split("#")[0]||"").split("?")[1]||"").split("&"),n=0;n<r.length;n++){var s=r[n].split("=");if(s[0]===e){t=s;break}}if(!fe(t)||t.length<2)return"";var o=t[1];try{o=decodeURIComponent(o)}catch{O.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},So=function(i,e){var t=i.match(new RegExp(e+"=([^&]*)"));return t?t[1]:null},Qe="Mobile",Eo="iOS",ht="Android",En="Tablet",Kh=ht+" "+En,Yh="iPad",Qh="Apple",ef=Qh+" Watch",$n="Safari",mr="BlackBerry",tf="Samsung",rf=tf+"Browser",nf=tf+" Internet",Si="Chrome",x1=Si+" OS",sf=Si+" "+Eo,Du="Internet Explorer",of=Du+" "+Qe,ju="Opera",k1=ju+" Mini",Nu="Edge",af="Microsoft "+Nu,hr="Firefox",lf=hr+" "+Eo,In="Nintendo",An="PlayStation",fr="Xbox",uf=ht+" "+Qe,cf=Qe+" "+$n,bn="Windows",Zl=bn+" Phone",lh="Nokia",Jl="Ouya",df="Generic",C1=df+" "+Qe.toLowerCase(),pf=df+" "+En.toLowerCase(),Xl="Konqueror",Re="(\\d+(\\.\\d+)?)",$l=new RegExp("Version/"+Re),S1=new RegExp(fr,"i"),E1=new RegExp(An+" \\w+","i"),$1=new RegExp(In+" \\w+","i"),Uu=new RegExp(mr+"|PlayBook|BB10","i"),I1={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},A1=(i,e)=>e&&V(e,Qh)||function(t){return V(t,$n)&&!V(t,Si)&&!V(t,ht)}(i),uh=function(i,e){return e=e||"",V(i," OPR/")&&V(i,"Mini")?k1:V(i," OPR/")?ju:Uu.test(i)?mr:V(i,"IE"+Qe)||V(i,"WPDesktop")?of:V(i,rf)?nf:V(i,Nu)||V(i,"Edg/")?af:V(i,"FBIOS")?"Facebook "+Qe:V(i,"UCWEB")||V(i,"UCBrowser")?"UC Browser":V(i,"CriOS")?sf:V(i,"CrMo")||V(i,Si)?Si:V(i,ht)&&V(i,$n)?uf:V(i,"FxiOS")?lf:V(i.toLowerCase(),Xl.toLowerCase())?Xl:A1(i,e)?V(i,Qe)?cf:$n:V(i,hr)?hr:V(i,"MSIE")||V(i,"Trident/")?Du:V(i,"Gecko")?hr:""},T1={[of]:[new RegExp("rv:"+Re)],[af]:[new RegExp(Nu+"?\\/"+Re)],[Si]:[new RegExp("("+Si+"|CrMo)\\/"+Re)],[sf]:[new RegExp("CriOS\\/"+Re)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Re)],[$n]:[$l],[cf]:[$l],[ju]:[new RegExp("(Opera|OPR)\\/"+Re)],[hr]:[new RegExp(hr+"\\/"+Re)],[lf]:[new RegExp("FxiOS\\/"+Re)],[Xl]:[new RegExp("Konqueror[:/]?"+Re,"i")],[mr]:[new RegExp(mr+" "+Re),$l],[uf]:[new RegExp("android\\s"+Re,"i")],[nf]:[new RegExp(rf+"\\/"+Re)],[Du]:[new RegExp("(rv:|MSIE )"+Re)],Mozilla:[new RegExp("rv:"+Re)]},ch=[[new RegExp(fr+"; "+fr+" (.*?)[);]","i"),i=>[fr,i&&i[1]||""]],[new RegExp(In,"i"),[In,""]],[new RegExp(An,"i"),[An,""]],[Uu,[mr,""]],[new RegExp(bn,"i"),(i,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[Zl,""];if(new RegExp(Qe).test(e)&&!/IEMobile\b/.test(e))return[bn+" "+Qe,""];var t=/Windows NT ([0-9.]+)/i.exec(e);if(t&&t[1]){var r=t[1],n=I1[r]||"";return/arm/i.test(e)&&(n="RT"),[bn,n]}return[bn,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,i=>{if(i&&i[3]){var e=[i[3],i[4],i[5]||"0"];return[Eo,e.join(".")]}return[Eo,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,i=>{var e="";return i&&i.length>=3&&(e=F(i[2])?i[3]:i[2]),["watchOS",e]}],[new RegExp("("+ht+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+ht+")","i"),i=>{if(i&&i[2]){var e=[i[2],i[3],i[4]||"0"];return[ht,e.join(".")]}return[ht,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,i=>{var e=["Mac OS X",""];if(i&&i[1]){var t=[i[1],i[2],i[3]||"0"];e[1]=t.join(".")}return e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[x1,""]],[/Linux|debian/i,["Linux",""]]],dh=function(i){return $1.test(i)?In:E1.test(i)?An:S1.test(i)?fr:new RegExp(Jl,"i").test(i)?Jl:new RegExp("("+Zl+"|WPDesktop)","i").test(i)?Zl:/iPad/.test(i)?Yh:/iPod/.test(i)?"iPod Touch":/iPhone/.test(i)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(i)?ef:Uu.test(i)?mr:/(kobo)\s(ereader|touch)/i.test(i)?"Kobo":new RegExp(lh,"i").test(i)?lh:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(i)||/(kf[a-z]+)( bui|\)).+silk\//i.test(i)?"Kindle Fire":/(Android|ZTE)/i.test(i)?!new RegExp(Qe).test(i)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(i)?/pixel[\daxl ]{1,6}/i.test(i)&&!/pixel c/i.test(i)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(i)||/lmy47v/i.test(i)&&!/QTAQZ3/i.test(i)?ht:Kh:ht:new RegExp("(pda|"+Qe+")","i").test(i)?C1:new RegExp(En,"i").test(i)&&!new RegExp(En+" pc","i").test(i)?pf:""},uo="https?://(.*)",M1=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","gad_source","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","mc_cid","igshid","ttclid","rdt_cid"],oe={campaignParams:function(i){return L?this._campaignParamsFromUrl(L.URL,i):{}},_campaignParamsFromUrl:function(i,e){var t=M1.concat(e||[]),r={};return K(t,function(n){var s=Co(i,n);r[n]=s||null}),r},_searchEngine:function(i){return i?i.search(uo+"google.([^/?]*)")===0?"google":i.search(uo+"bing.com")===0?"bing":i.search(uo+"yahoo.com")===0?"yahoo":i.search(uo+"duckduckgo.com")===0?"duckduckgo":null:null},_searchInfoFromReferrer:function(i){var e=oe._searchEngine(i),t=e!="yahoo"?"q":"p",r={};if(!Jt(e)){r.$search_engine=e;var n=L?Co(L.referrer,t):"";n.length&&(r.ph_keyword=n)}return r},searchInfo:function(){var i=L?.referrer;return i?this._searchInfoFromReferrer(i):{}},browser:uh,browserVersion:function(i,e){var t=uh(i,e),r=T1[t];if(F(r))return null;for(var n=0;n<r.length;n++){var s=r[n],o=i.match(s);if(o)return parseFloat(o[o.length-2])}return null},browserLanguage:function(){return navigator.language||navigator.userLanguage},browserLanguagePrefix:function(){var i=this.browserLanguage();return typeof i=="string"?i.split("-")[0]:void 0},os:function(i){for(var e=0;e<ch.length;e++){var[t,r]=ch[e],n=t.exec(i),s=n&&(Ze(r)?r(n,i):r);if(s)return s}return["",""]},device:dh,deviceType:function(i){var e=dh(i);return e===Yh||e===Kh||e==="Kobo"||e==="Kindle Fire"||e===pf?En:e===In||e===fr||e===An||e===Jl?"Console":e===ef?"Wearable":e?Qe:"Desktop"},referrer:function(){return L?.referrer||"$direct"},referringDomain:function(){var i;return L!=null&&L.referrer&&((i=pr(L.referrer))===null||i===void 0?void 0:i.host)||"$direct"},referrerInfo:function(){return{$referrer:this.referrer(),$referring_domain:this.referringDomain()}},initialPersonInfo:function(){return{r:this.referrer().substring(0,1e3),u:qe?.href.substring(0,1e3)}},initialPersonPropsFromInfo:function(i){var e,{r:t,u:r}=i,n={$initial_referrer:t,$initial_referring_domain:t==null?void 0:t=="$direct"?"$direct":(e=pr(t))===null||e===void 0?void 0:e.host};if(r){n.$initial_current_url=r;var s=pr(r);n.$initial_host=s?.host,n.$initial_pathname=s?.pathname,K(this._campaignParamsFromUrl(r),function(o,l){n["$initial_"+Ll(l)]=o})}return t&&K(this._searchInfoFromReferrer(t),function(o,l){n["$initial_"+Ll(l)]=o}),n},timezone:function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}},timezoneOffset:function(){try{return new Date().getTimezoneOffset()}catch{return}},properties:function(){if(!we)return{};var[i,e]=oe.os(we);return Te(bo({$os:i,$os_version:e,$browser:oe.browser(we,navigator.vendor),$device:oe.device(we),$device_type:oe.deviceType(we),$timezone:oe.timezone(),$timezone_offset:oe.timezoneOffset()}),{$current_url:qe?.href,$host:qe?.host,$pathname:qe?.pathname,$raw_user_agent:we.length>1e3?we.substring(0,997)+"...":we,$browser_version:oe.browserVersion(we,navigator.vendor),$browser_language:oe.browserLanguage(),$browser_language_prefix:oe.browserLanguagePrefix(),$screen_height:v?.screen.height,$screen_width:v?.screen.width,$viewport_height:v?.innerHeight,$viewport_width:v?.innerWidth,$lib:"web",$lib_version:It.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})},people_properties:function(){if(!we)return{};var[i,e]=oe.os(we);return Te(bo({$os:i,$os_version:e,$browser:oe.browser(we,navigator.vendor)}),{$browser_version:oe.browserVersion(we,navigator.vendor)})}},P1=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],xn=class{constructor(e){this.config=e,this.props={},this.campaign_params_saved=!1,this.name=(t=>{var r="";return t.token&&(r=t.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),t.persistence_name?"ph_"+t.persistence_name:"ph_"+r+"_posthog"})(e),this.storage=this.buildStorage(e),this.load(),e.debug&&O.info("Persistence loaded",e.persistence,C({},this.props)),this.update_config(e,e),this.save()}buildStorage(e){P1.indexOf(e.persistence.toLowerCase())===-1&&(O.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t=e.persistence.toLowerCase();return t==="localstorage"&&ve.is_supported()?ve:t==="localstorage+cookie"&&ao.is_supported()?ao:t==="sessionstorage"&&Ce.is_supported()?Ce:t==="memory"?_1:t==="cookie"?Tt:ao.is_supported()?ao:Tt}properties(){var e={};return K(this.props,function(t,r){if(r===cr&&ce(t))for(var n=Object.keys(t),s=0;s<n.length;s++)e["$feature/".concat(n[s])]=t[n[s]];else l=r,a=!1,(Jt(o=h1)?a:Hp&&o.indexOf===Hp?o.indexOf(l)!=-1:(K(o,function(u){if(a||(a=u===l))return _o}),a))||(e[r]=t);var o,l,a}),e}load(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=Te({},e))}}save(){this.disabled||this.storage.set(this.name,this.props,this.expire_days,this.cross_subdomain,this.secure,this.config.debug)}remove(){this.storage.remove(this.name,!1),this.storage.remove(this.name,!0)}clear(){this.remove(),this.props={}}register_once(e,t,r){if(ce(e)){F(t)&&(t="None"),this.expire_days=F(r)?this.default_expiry:r;var n=!1;if(K(e,(s,o)=>{this.props.hasOwnProperty(o)&&this.props[o]!==t||(this.props[o]=s,n=!0)}),n)return this.save(),!0}return!1}register(e,t){if(ce(e)){this.expire_days=F(t)?this.default_expiry:t;var r=!1;if(K(e,(n,s)=>{e.hasOwnProperty(s)&&this.props[s]!==n&&(this.props[s]=n,r=!0)}),r)return this.save(),!0}return!1}unregister(e){e in this.props&&(delete this.props[e],this.save())}update_campaign_params(){if(!this.campaign_params_saved){var e=oe.campaignParams(this.config.custom_campaign_params);ur(bo(e))||this.register(e),this.campaign_params_saved=!0}}update_search_keyword(){this.register(oe.searchInfo())}update_referrer_info(){this.register_once(oe.referrerInfo(),void 0)}set_initial_person_info(){this.props[ql]||this.props[Bl]||this.register_once({[Hl]:oe.initialPersonInfo()},void 0)}get_referrer_info(){return bo({$referrer:this.props.$referrer,$referring_domain:this.props.$referring_domain})}get_initial_props(){var e={};K([Bl,ql],n=>{var s=this.props[n];s&&K(s,function(o,l){e["$initial_"+Ll(l)]=o})});var t=this.props[Hl];if(t){var r=oe.initialPersonPropsFromInfo(t);Te(e,r)}return e}safe_merge(e){return K(this.props,function(t,r){r in e||(e[r]=t)}),e}update_config(e,t){if(this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==t.persistence){var r=this.buildStorage(e),n=this.props;this.clear(),this.storage=r,this.props=n,this.save()}}set_disabled(e){this.disabled=e,this.disabled?this.remove():this.save()}set_cross_subdomain(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())}get_cross_subdomain(){return!!this.cross_subdomain}set_secure(e){e!==this.secure&&(this.secure=e,this.remove(),this.save())}set_event_timer(e,t){var r=this.props[vn]||{};r[e]=t,this.props[vn]=r,this.save()}remove_event_timer(e){var t=(this.props[vn]||{})[e];return F(t)||(delete this.props[vn][e],this.save()),t}get_property(e){return this.props[e]}set_property(e,t){this.props[e]=t,this.save()}};function $o(i){var e,t;return((e=JSON.stringify(i,(t=[],function(r,n){if(ce(n)){for(;t.length>0&&t[t.length-1]!==this;)t.pop();return t.includes(n)?"[Circular]":(t.push(n),n)}return n})))===null||e===void 0?void 0:e.length)||0}function Kl(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:66060288e-1;if(i.size>=e&&i.data.length>1){var t=Math.floor(i.data.length/2),r=i.data.slice(0,t),n=i.data.slice(t);return[Kl({size:$o(r),data:r,sessionId:i.sessionId,windowId:i.windowId}),Kl({size:$o(n),data:n,sessionId:i.sessionId,windowId:i.windowId})].flatMap(s=>s)}return[i]}var Et=(i=>(i[i.DomContentLoaded=0]="DomContentLoaded",i[i.Load=1]="Load",i[i.FullSnapshot=2]="FullSnapshot",i[i.IncrementalSnapshot=3]="IncrementalSnapshot",i[i.Meta=4]="Meta",i[i.Custom=5]="Custom",i[i.Plugin=6]="Plugin",i))(Et||{}),ot=(i=>(i[i.Mutation=0]="Mutation",i[i.MouseMove=1]="MouseMove",i[i.MouseInteraction=2]="MouseInteraction",i[i.Scroll=3]="Scroll",i[i.ViewportResize=4]="ViewportResize",i[i.Input=5]="Input",i[i.TouchMove=6]="TouchMove",i[i.MediaInteraction=7]="MediaInteraction",i[i.StyleSheetRule=8]="StyleSheetRule",i[i.CanvasMutation=9]="CanvasMutation",i[i.Font=10]="Font",i[i.Log=11]="Log",i[i.Drag=12]="Drag",i[i.StyleDeclaration=13]="StyleDeclaration",i[i.Selection=14]="Selection",i[i.AdoptedStyleSheet=15]="AdoptedStyleSheet",i[i.CustomElement=16]="CustomElement",i))(ot||{});function ph(i){var e;return i instanceof Element&&(i.id===Jh||!((e=i.closest)===null||e===void 0||!e.call(i,".toolbar-global-fade-container")))}function Uo(i){return!!i&&i.nodeType===1}function Zt(i,e){return!!i&&!!i.tagName&&i.tagName.toLowerCase()===e.toLowerCase()}function hf(i){return!!i&&i.nodeType===3}function ff(i){return!!i&&i.nodeType===11}function qu(i){return i?jo(i).split(/\s+/):[]}function hh(i){var e=v?.location.href;return!!(e&&i&&i.some(t=>e.match(t)))}function Io(i){var e="";switch(typeof i.className){case"string":e=i.className;break;case"object":e=(i.className&&"baseVal"in i.className?i.className.baseVal:null)||i.getAttribute("class")||"";break;default:e=""}return qu(e)}function gf(i){return Y(i)?null:jo(i).split(/(\s+)/).filter(e=>vr(e)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function qo(i){var e="";return Ql(i)&&!yf(i)&&i.childNodes&&i.childNodes.length&&K(i.childNodes,function(t){var r;hf(t)&&t.textContent&&(e+=(r=gf(t.textContent))!==null&&r!==void 0?r:"")}),jo(e)}function mf(i){return F(i.target)?i.srcElement||null:(e=i.target)!==null&&e!==void 0&&e.shadowRoot?i.composedPath()[0]||null:i.target||null;var e}var Yl=["a","button","form","input","select","textarea","label"];function vf(i){var e=i.parentNode;return!(!e||!Uo(e))&&e}function R1(i,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,n=arguments.length>4?arguments[4]:void 0;if(!v||!i||Zt(i,"html")||!Uo(i)||t!=null&&t.url_allowlist&&!hh(t.url_allowlist)||t!=null&&t.url_ignorelist&&hh(t.url_ignorelist))return!1;if(t!=null&&t.dom_event_allowlist){var s=t.dom_event_allowlist;if(s&&!s.some(h=>e.type===h))return!1}for(var o=!1,l=[i],a=!0,u=i;u.parentNode&&!Zt(u,"body");)if(ff(u.parentNode))l.push(u.parentNode.host),u=u.parentNode.host;else{if(!(a=vf(u)))break;if(r||Yl.indexOf(a.tagName.toLowerCase())>-1)o=!0;else{var d=v.getComputedStyle(a);d&&d.getPropertyValue("cursor")==="pointer"&&(o=!0)}l.push(a),u=a}if(!function(h,g){var m=g?.element_allowlist;if(F(m))return!0;var b=function(k){if(m.some(S=>k.tagName.toLowerCase()===S))return{v:!0}};for(var x of h){var _=b(x);if(typeof _=="object")return _.v}return!1}(l,t)||!function(h,g){var m=g?.css_selector_allowlist;if(F(m))return!0;var b=function(k){if(m.some(S=>k.matches(S)))return{v:!0}};for(var x of h){var _=b(x);if(typeof _=="object")return _.v}return!1}(l,t))return!1;var c=v.getComputedStyle(i);if(c&&c.getPropertyValue("cursor")==="pointer"&&e.type==="click")return!0;var p=i.tagName.toLowerCase();switch(p){case"html":return!1;case"form":return(n||["submit"]).indexOf(e.type)>=0;case"input":case"select":case"textarea":return(n||["change","click"]).indexOf(e.type)>=0;default:return o?(n||["click"]).indexOf(e.type)>=0:(n||["click"]).indexOf(e.type)>=0&&(Yl.indexOf(p)>-1||i.getAttribute("contenteditable")==="true")}}function Ql(i){for(var e=i;e.parentNode&&!Zt(e,"body");e=e.parentNode){var t=Io(e);if(V(t,"ph-sensitive")||V(t,"ph-no-capture"))return!1}if(V(Io(i),"ph-include"))return!0;var r=i.type||"";if(Se(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var n=i.name||i.id||"";return!(Se(n)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(n.replace(/[^a-zA-Z0-9]/g,"")))}function yf(i){return!!(Zt(i,"input")&&!["button","checkbox","submit","reset"].includes(i.type)||Zt(i,"select")||Zt(i,"textarea")||i.getAttribute("contenteditable")==="true")}var _f="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",O1=new RegExp("^(?:".concat(_f,")$")),L1=new RegExp(_f),bf="\\d{3}-?\\d{2}-?\\d{4}",F1=new RegExp("^(".concat(bf,")$")),D1=new RegExp("(".concat(bf,")"));function vr(i){var e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return!(Y(i)||Se(i)&&(i=jo(i),(e?O1:L1).test((i||"").replace(/[- ]/g,""))||(e?F1:D1).test(i)))}function wf(i){var e=qo(i);return vr(e="".concat(e," ").concat(xf(i)).trim())?e:""}function xf(i){var e="";return i&&i.childNodes&&i.childNodes.length&&K(i.childNodes,function(t){var r;if(t&&((r=t.tagName)===null||r===void 0?void 0:r.toLowerCase())==="span")try{var n=qo(t);e="".concat(e," ").concat(n).trim(),t.childNodes&&t.childNodes.length&&(e="".concat(e," ").concat(xf(t)).trim())}catch(s){O.error("[AutoCapture]",s)}}),e}function j1(i){return function(e){var t=e.map(r=>{var n,s,o="";if(r.tag_name&&(o+=r.tag_name),r.attr_class)for(var l of(r.attr_class.sort(),r.attr_class))o+=".".concat(l.replace(/"/g,""));var a=C(C(C(C({},r.text?{text:r.text}:{}),{},{"nth-child":(n=r.nth_child)!==null&&n!==void 0?n:0,"nth-of-type":(s=r.nth_of_type)!==null&&s!==void 0?s:0},r.href?{href:r.href}:{}),r.attr_id?{attr_id:r.attr_id}:{}),r.attributes),u={};return mo(a).sort((d,c)=>{var[p]=d,[h]=c;return p.localeCompare(h)}).forEach(d=>{var[c,p]=d;return u[fh(c.toString())]=fh(p.toString())}),o+=":",o+=mo(a).map(d=>{var[c,p]=d;return"".concat(c,'="').concat(p,'"')}).join("")});return t.join(";")}(function(e){return e.map(t=>{var r,n,s={text:(r=t.$el_text)===null||r===void 0?void 0:r.slice(0,400),tag_name:t.tag_name,href:(n=t.attr__href)===null||n===void 0?void 0:n.slice(0,2048),attr_class:N1(t),attr_id:t.attr__id,nth_child:t.nth_child,nth_of_type:t.nth_of_type,attributes:{}};return mo(t).filter(o=>{var[l]=o;return l.indexOf("attr__")===0}).forEach(o=>{var[l,a]=o;return s.attributes[l]=a}),s})}(i))}function fh(i){return i.replace(/"|\\"/g,'\\"')}function N1(i){var e=i.attr__class;return e?fe(e)?e:qu(e):void 0}var eu="[SessionRecording]",tu="redacted",co={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:i=>i,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io",".clarity.ms","analytics.google.com"]},U1=["authorization","x-forwarded-for","authorization","cookie","set-cookie","x-api-key","x-real-ip","remote-addr","forwarded","proxy-authorization","x-csrf-token","x-csrftoken","x-xsrf-token"],q1=["password","secret","passwd","api_key","apikey","auth","credentials","mysql_pwd","privatekey","private_key","token"],B1=["/s/","/e/","/i/"];function gh(i,e,t,r){if(Y(i))return i;var n=e?.["content-length"]||function(s){return new Blob([s]).size}(i);return Se(n)&&(n=parseInt(n)),n>t?eu+" ".concat(r," body too large to record (").concat(n," bytes)"):i}function mh(i,e){if(Y(i))return i;var t=i;return vr(t,!1)||(t=eu+" "+e+" body "+tu),K(q1,r=>{var n,s;(n=t)!==null&&n!==void 0&&n.length&&((s=t)===null||s===void 0?void 0:s.indexOf(r))!==-1&&(t=eu+" "+e+" body "+tu+" as might contain: "+r)}),t}var H1=(i,e)=>{var t,r,n,s={payloadSizeLimitBytes:co.payloadSizeLimitBytes,performanceEntryTypeToObserve:[...co.performanceEntryTypeToObserve],payloadHostDenyList:[...e.payloadHostDenyList||[],...co.payloadHostDenyList]},o=i.session_recording.recordHeaders!==!1&&e.recordHeaders,l=i.session_recording.recordBody!==!1&&e.recordBody,a=i.capture_performance!==!1&&e.recordPerformance,u=(t=s,n=Math.min(1e6,(r=t.payloadSizeLimitBytes)!==null&&r!==void 0?r:1e6),p=>(p!=null&&p.requestBody&&(p.requestBody=gh(p.requestBody,p.requestHeaders,n,"Request")),p!=null&&p.responseBody&&(p.responseBody=gh(p.responseBody,p.responseHeaders,n,"Response")),p)),d=p=>{return u(((m,b)=>{var x,_=pr(m.name),k=b.indexOf("http")===0?(x=pr(b))===null||x===void 0?void 0:x.pathname:b;k==="/"&&(k="");var S=_?.pathname.replace(k||"","");if(!(_&&S&&B1.some(R=>S.indexOf(R)===0)))return m})((g=(h=p).requestHeaders,Y(g)||K(Object.keys(g??{}),m=>{U1.includes(m.toLowerCase())&&(g[m]=tu)}),h),i.api_host));var h,g},c=Ze(i.session_recording.maskNetworkRequestFn);return c&&Ze(i.session_recording.maskCapturedNetworkRequestFn)&&O.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),c&&(i.session_recording.maskCapturedNetworkRequestFn=p=>{var h=i.session_recording.maskNetworkRequestFn({url:p.name});return C(C({},p),{},{name:h?.url})}),s.maskRequestFn=Ze(i.session_recording.maskCapturedNetworkRequestFn)?p=>{var h,g,m,b=d(p);return b&&(h=(g=(m=i.session_recording).maskCapturedNetworkRequestFn)===null||g===void 0?void 0:g.call(m,b))!==null&&h!==void 0?h:void 0}:p=>function(h){if(!F(h))return h.requestBody=mh(h.requestBody,"Request"),h.responseBody=mh(h.responseBody,"Response"),h}(d(p)),C(C(C({},co),s),{},{recordHeaders:o,recordBody:l,recordPerformance:a,recordInitialRequests:a})};function ft(i,e,t,r,n){return e>t&&(O.warn("min cannot be greater than max."),e=t),Oe(i)?i>t?(r&&O.warn(r+" cannot be greater than max: "+t+". Using max value instead."),t):i<e?(r&&O.warn(r+" cannot be less than min: "+e+". Using min value instead."),e):i:(r&&O.warn(r+" must be a number. using max or fallback. max: "+t+", fallback: "+n),ft(n||t,e,t,r))}var iu=class{constructor(e){var t,r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};A(this,"bucketSize",100),A(this,"refillRate",10),A(this,"mutationBuckets",{}),A(this,"loggedTracker",{}),A(this,"refillBuckets",()=>{Object.keys(this.mutationBuckets).forEach(s=>{this.mutationBuckets[s]=this.mutationBuckets[s]+this.refillRate,this.mutationBuckets[s]>=this.bucketSize&&delete this.mutationBuckets[s]})}),A(this,"getNodeOrRelevantParent",s=>{var o=this.rrweb.mirror.getNode(s);if(o?.nodeName!=="svg"&&o instanceof Element){var l=o.closest("svg");if(l)return[this.rrweb.mirror.getId(l),l]}return[s,o]}),A(this,"numberOfChanges",s=>{var o,l,a,u,d,c,p,h;return((o=(l=s.removes)===null||l===void 0?void 0:l.length)!==null&&o!==void 0?o:0)+((a=(u=s.attributes)===null||u===void 0?void 0:u.length)!==null&&a!==void 0?a:0)+((d=(c=s.texts)===null||c===void 0?void 0:c.length)!==null&&d!==void 0?d:0)+((p=(h=s.adds)===null||h===void 0?void 0:h.length)!==null&&p!==void 0?p:0)}),A(this,"throttleMutations",s=>{if(s.type!==3||s.data.source!==0)return s;var o=s.data,l=this.numberOfChanges(o);o.attributes&&(o.attributes=o.attributes.filter(u=>{var d,c,p,[h,g]=this.getNodeOrRelevantParent(u.id);return this.mutationBuckets[h]===0?!1:(this.mutationBuckets[h]=(d=this.mutationBuckets[h])!==null&&d!==void 0?d:this.bucketSize,this.mutationBuckets[h]=Math.max(this.mutationBuckets[h]-1,0),this.mutationBuckets[h]===0&&(this.loggedTracker[h]||(this.loggedTracker[h]=!0,(c=(p=this.options).onBlockedNode)===null||c===void 0||c.call(p,h,g))),u)}));var a=this.numberOfChanges(o);return a!==0||l===a?s:void 0}),this.rrweb=e,this.options=n,this.refillRate=ft((t=this.options.refillRate)!==null&&t!==void 0?t:this.refillRate,0,100,"mutation throttling refill rate"),this.bucketSize=ft((r=this.options.bucketSize)!==null&&r!==void 0?r:this.bucketSize,0,100,"mutation throttling bucket size"),setInterval(()=>{this.refillBuckets()},1e3)}},et=Uint8Array,Le=Uint16Array,yr=Uint32Array,Bu=new et([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Hu=new et([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),vh=new et([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),kf=function(i,e){for(var t=new Le(31),r=0;r<31;++r)t[r]=e+=1<<i[r-1];var n=new yr(t[30]);for(r=1;r<30;++r)for(var s=t[r];s<t[r+1];++s)n[s]=s-t[r]<<5|r;return[t,n]},Cf=kf(Bu,2),z1=Cf[0],ru=Cf[1];z1[28]=258,ru[258]=28;for(nu=kf(Hu,0)[1],Ao=new Le(32768),ee=0;ee<32768;++ee)zt=(43690&ee)>>>1|(21845&ee)<<1,zt=(61680&(zt=(52428&zt)>>>2|(13107&zt)<<2))>>>4|(3855&zt)<<4,Ao[ee]=((65280&zt)>>>8|(255&zt)<<8)>>>1;var zt,nu,Ao,ee,kn=function(i,e,t){for(var r=i.length,n=0,s=new Le(e);n<r;++n)++s[i[n]-1];var o,l=new Le(e);for(n=0;n<e;++n)l[n]=l[n-1]+s[n-1]<<1;if(t){o=new Le(1<<e);var a=15-e;for(n=0;n<r;++n)if(i[n])for(var u=n<<4|i[n],d=e-i[n],c=l[i[n]-1]++<<d,p=c|(1<<d)-1;c<=p;++c)o[Ao[c]>>>a]=u}else for(o=new Le(r),n=0;n<r;++n)o[n]=Ao[l[i[n]-1]++]>>>15-i[n];return o},Ei=new et(288);for(ee=0;ee<144;++ee)Ei[ee]=8;for(ee=144;ee<256;++ee)Ei[ee]=9;for(ee=256;ee<280;++ee)Ei[ee]=7;for(ee=280;ee<288;++ee)Ei[ee]=8;var To=new et(32);for(ee=0;ee<32;++ee)To[ee]=5;var V1=kn(Ei,9,0),W1=kn(To,5,0),Sf=function(i){return(i/8>>0)+(7&i&&1)},Ef=function(i,e,t){(t==null||t>i.length)&&(t=i.length);var r=new(i instanceof Le?Le:i instanceof yr?yr:et)(t-e);return r.set(i.subarray(e,t)),r},Ct=function(i,e,t){t<<=7&e;var r=e/8>>0;i[r]|=t,i[r+1]|=t>>>8},hn=function(i,e,t){t<<=7&e;var r=e/8>>0;i[r]|=t,i[r+1]|=t>>>8,i[r+2]|=t>>>16},Il=function(i,e){for(var t=[],r=0;r<i.length;++r)i[r]&&t.push({s:r,f:i[r]});var n=t.length,s=t.slice();if(!n)return[new et(0),0];if(n==1){var o=new et(t[0].s+1);return o[t[0].s]=1,[o,1]}t.sort(function(R,B){return R.f-B.f}),t.push({s:-1,f:25001});var l=t[0],a=t[1],u=0,d=1,c=2;for(t[0]={s:-1,f:l.f+a.f,l,r:a};d!=n-1;)l=t[t[u].f<t[c].f?u++:c++],a=t[u!=d&&t[u].f<t[c].f?u++:c++],t[d++]={s:-1,f:l.f+a.f,l,r:a};var p=s[0].s;for(r=1;r<n;++r)s[r].s>p&&(p=s[r].s);var h=new Le(p+1),g=su(t[d-1],h,0);if(g>e){r=0;var m=0,b=g-e,x=1<<b;for(s.sort(function(R,B){return h[B.s]-h[R.s]||R.f-B.f});r<n;++r){var _=s[r].s;if(!(h[_]>e))break;m+=x-(1<<g-h[_]),h[_]=e}for(m>>>=b;m>0;){var k=s[r].s;h[k]<e?m-=1<<e-h[k]++-1:++r}for(;r>=0&&m;--r){var S=s[r].s;h[S]==e&&(--h[S],++m)}g=e}return[new et(h),g]},su=function(i,e,t){return i.s==-1?Math.max(su(i.l,e,t+1),su(i.r,e,t+1)):e[i.s]=t},yh=function(i){for(var e=i.length;e&&!i[--e];);for(var t=new Le(++e),r=0,n=i[0],s=1,o=function(a){t[r++]=a},l=1;l<=e;++l)if(i[l]==n&&l!=e)++s;else{if(!n&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(n),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(n);s=1,n=i[l]}return[t.subarray(0,r),e]},fn=function(i,e){for(var t=0,r=0;r<e.length;++r)t+=i[r]*e[r];return t},ou=function(i,e,t){var r=t.length,n=Sf(e+2);i[n]=255&r,i[n+1]=r>>>8,i[n+2]=255^i[n],i[n+3]=255^i[n+1];for(var s=0;s<r;++s)i[n+s+4]=t[s];return 8*(n+4+r)},_h=function(i,e,t,r,n,s,o,l,a,u,d){Ct(e,d++,t),++n[256];for(var c=Il(n,15),p=c[0],h=c[1],g=Il(s,15),m=g[0],b=g[1],x=yh(p),_=x[0],k=x[1],S=yh(m),R=S[0],B=S[1],U=new Le(19),P=0;P<_.length;++P)U[31&_[P]]++;for(P=0;P<R.length;++P)U[31&R[P]]++;for(var q=Il(U,7),W=q[0],xe=q[1],pe=19;pe>4&&!W[vh[pe-1]];--pe);var je,Z,X,he,Ne=u+5<<3,He=fn(n,Ei)+fn(s,To)+o,le=fn(n,p)+fn(s,m)+o+14+3*pe+fn(U,W)+(2*U[16]+3*U[17]+7*U[18]);if(Ne<=He&&Ne<=le)return ou(e,d,i.subarray(a,a+u));if(Ct(e,d,1+(le<He)),d+=2,le<He){je=kn(p,h,0),Z=p,X=kn(m,b,0),he=m;var Ee=kn(W,xe,0);for(Ct(e,d,k-257),Ct(e,d+5,B-1),Ct(e,d+10,pe-4),d+=14,P=0;P<pe;++P)Ct(e,d+3*P,W[vh[P]]);d+=3*pe;for(var $e=[_,R],re=0;re<2;++re){var ye=$e[re];for(P=0;P<ye.length;++P){var Me=31&ye[P];Ct(e,d,Ee[Me]),d+=W[Me],Me>15&&(Ct(e,d,ye[P]>>>5&127),d+=ye[P]>>>12)}}}else je=V1,Z=Ei,X=W1,he=To;for(P=0;P<l;++P)if(r[P]>255){Me=r[P]>>>18&31,hn(e,d,je[Me+257]),d+=Z[Me+257],Me>7&&(Ct(e,d,r[P]>>>23&31),d+=Bu[Me]);var Ti=31&r[P];hn(e,d,X[Ti]),d+=he[Ti],Ti>3&&(hn(e,d,r[P]>>>5&8191),d+=Hu[Ti])}else hn(e,d,je[r[P]]),d+=Z[r[P]];return hn(e,d,je[256]),d+Z[256]},G1=new yr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Z1=function(){for(var i=new yr(256),e=0;e<256;++e){for(var t=e,r=9;--r;)t=(1&t&&3988292384)^t>>>1;i[e]=t}return i}(),J1=function(){var i=4294967295;return{p:function(e){for(var t=i,r=0;r<e.length;++r)t=Z1[255&t^e[r]]^t>>>8;i=t},d:function(){return 4294967295^i}}},X1=function(i,e,t,r,n){return function(s,o,l,a,u,d){var c=s.length,p=new et(a+c+5*(1+Math.floor(c/7e3))+u),h=p.subarray(a,p.length-u),g=0;if(!o||c<8)for(var m=0;m<=c;m+=65535){var b=m+65535;b<c?g=ou(h,g,s.subarray(m,b)):(h[m]=d,g=ou(h,g,s.subarray(m,c)))}else{for(var x=G1[o-1],_=x>>>13,k=8191&x,S=(1<<l)-1,R=new Le(32768),B=new Le(S+1),U=Math.ceil(l/3),P=2*U,q=function(Ko){return(s[Ko]^s[Ko+1]<<U^s[Ko+2]<<P)&S},W=new yr(25e3),xe=new Le(288),pe=new Le(32),je=0,Z=0,X=(m=0,0),he=0,Ne=0;m<c;++m){var He=q(m),le=32767&m,Ee=B[He];if(R[le]=Ee,B[He]=le,he<=m){var $e=c-m;if((je>7e3||X>24576)&&$e>423){g=_h(s,h,0,W,xe,pe,Z,X,Ne,m-Ne,g),X=je=Z=0,Ne=m;for(var re=0;re<286;++re)xe[re]=0;for(re=0;re<30;++re)pe[re]=0}var ye=2,Me=0,Ti=k,Pt=le-Ee&32767;if($e>2&&He==q(m-Pt))for(var r0=Math.min(_,$e)-1,n0=Math.min(32767,m),s0=Math.min(258,$e);Pt<=n0&&--Ti&&le!=Ee;){if(s[m+ye]==s[m+ye-Pt]){for(var Rt=0;Rt<s0&&s[m+Rt]==s[m+Rt-Pt];++Rt);if(Rt>ye){if(ye=Rt,Me=Pt,Rt>r0)break;var o0=Math.min(Pt,Rt-2),ic=0;for(re=0;re<o0;++re){var Xo=m-Pt+re+32768&32767,rc=Xo-R[Xo]+32768&32767;rc>ic&&(ic=rc,Ee=Xo)}}}Pt+=(le=Ee)-(Ee=R[le])+32768&32767}if(Me){W[X++]=268435456|ru[ye]<<18|nu[Me];var nc=31&ru[ye],sc=31&nu[Me];Z+=Bu[nc]+Hu[sc],++xe[257+nc],++pe[sc],he=m+ye,++je}else W[X++]=s[m],++xe[s[m]]}}g=_h(s,h,d,W,xe,pe,Z,X,Ne,m-Ne,g)}return Ef(p,0,a+Sf(g)+u)}(i,e.level==null?6:e.level,e.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(i.length)))):12+e.mem,t,r,!n)},au=function(i,e,t){for(;t;++e)i[e]=t,t>>>=8},K1=function(i,e){var t=e.filename;if(i[0]=31,i[1]=139,i[2]=8,i[8]=e.level<2?4:e.level==9?2:0,i[9]=3,e.mtime!=0&&au(i,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),t){i[3]=8;for(var r=0;r<=t.length;++r)i[r+10]=t.charCodeAt(r)}},Y1=function(i){return 10+(i.filename&&i.filename.length+1||0)};function $f(i,e){e===void 0&&(e={});var t=J1(),r=i.length;t.p(i);var n=X1(i,e,Y1(e),8),s=n.length;return K1(n,e),au(n,s-8,t.d()),au(n,s-4,r),n}function If(i,e){var t=i.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(i);for(var r=new et(i.length+(i.length>>>1)),n=0,s=function(u){r[n++]=u},o=0;o<t;++o){if(n+5>r.length){var l=new et(n+8+(t-o<<1));l.set(r),r=l}var a=i.charCodeAt(o);a<128||e?s(a):a<2048?(s(192|a>>>6),s(128|63&a)):a>55295&&a<57344?(s(240|(a=65536+(1047552&a)|1023&i.charCodeAt(++o))>>>18),s(128|a>>>12&63),s(128|a>>>6&63),s(128|63&a)):(s(224|a>>>12),s(128|a>>>6&63),s(128|63&a))}return Ef(r,0,n)}var wn="[SessionRecording]",Ae=Fe(wn),Q1=3e5,em=[ot.MouseMove,ot.MouseInteraction,ot.Scroll,ot.ViewportResize,ot.Input,ot.TouchMove,ot.MediaInteraction,ot.Drag],bh=i=>({rrwebMethod:i,enqueuedAt:Date.now(),attempt:1});function vi(i){return function(e,t){for(var r="",n=0;n<e.length;){var s=e[n++];s<128||t?r+=String.fromCharCode(s):s<224?r+=String.fromCharCode((31&s)<<6|63&e[n++]):s<240?r+=String.fromCharCode((15&s)<<12|(63&e[n++])<<6|63&e[n++]):(s=((15&s)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,r+=String.fromCharCode(55296|s>>10,56320|1023&s))}return r}($f(If(JSON.stringify(i))),!0)}function wh(i){return i.type===Et.Custom&&i.data.tag==="sessionIdle"}function xh(i,e){return e.some(t=>t.matching==="regex"&&new RegExp(t.url).test(i))}var lu=class{get sessionIdleThresholdMilliseconds(){return this.instance.config.session_recording.session_idle_threshold_ms||3e5}get rrwebRecord(){var e,t;return H==null||(e=H.__PosthogExtensions__)===null||e===void 0||(t=e.rrweb)===null||t===void 0?void 0:t.record}get started(){return this._captureStarted}get sessionManager(){if(!this.instance.sessionManager)throw new Error(wn+" must be started with a valid sessionManager.");return this.instance.sessionManager}get fullSnapshotIntervalMillis(){var e,t;return this.triggerStatus==="trigger_pending"?6e4:(e=(t=this.instance.config.session_recording)===null||t===void 0?void 0:t.full_snapshot_interval_millis)!==null&&e!==void 0?e:Q1}get isSampled(){var e=this.instance.get_property(yn);return ki(e)?e:null}get sessionDuration(){var e,t,r=(e=this.buffer)===null||e===void 0?void 0:e.data[((t=this.buffer)===null||t===void 0?void 0:t.data.length)-1],{sessionStartTimestamp:n}=this.sessionManager.checkAndGetSessionAndWindowId(!0);return r?r.timestamp-n:null}get isRecordingEnabled(){var e=!!this.instance.get_property(Dl),t=!this.instance.config.disable_session_recording;return v&&e&&t}get isConsoleLogCaptureEnabled(){var e=!!this.instance.get_property(Kp),t=this.instance.config.enable_recording_console_log;return t??e}get canvasRecording(){var e,t,r,n,s,o,l=this.instance.config.session_recording.captureCanvas,a=this.instance.get_property(Qp),u=(e=(t=l?.recordCanvas)!==null&&t!==void 0?t:a?.enabled)!==null&&e!==void 0&&e,d=(r=(n=l?.canvasFps)!==null&&n!==void 0?n:a?.fps)!==null&&r!==void 0?r:0,c=(s=(o=l?.canvasQuality)!==null&&o!==void 0?o:a?.quality)!==null&&s!==void 0?s:0;return{enabled:u,fps:ft(d,0,12,"canvas recording fps"),quality:ft(c,0,1,"canvas recording quality")}}get networkPayloadCapture(){var e,t,r=this.instance.get_property(Yp),n={recordHeaders:(e=this.instance.config.session_recording)===null||e===void 0?void 0:e.recordHeaders,recordBody:(t=this.instance.config.session_recording)===null||t===void 0?void 0:t.recordBody},s=n?.recordHeaders||r?.recordHeaders,o=n?.recordBody||r?.recordBody,l=ce(this.instance.config.capture_performance)?this.instance.config.capture_performance.network_timing:this.instance.config.capture_performance,a=!!(ki(l)?l:r?.capturePerformance);return s||o||a?{recordHeaders:s,recordBody:o,recordPerformance:a}:void 0}get sampleRate(){var e=this.instance.get_property(eh);return Oe(e)?e:null}get minimumDuration(){var e=this.instance.get_property(th);return Oe(e)?e:null}get status(){return this.receivedDecide?this.isRecordingEnabled?this._urlBlocked?"paused":Y(this._linkedFlag)||this._linkedFlagSeen?this.triggerStatus==="trigger_pending"?"buffering":ki(this.isSampled)?this.isSampled?"sampled":"disabled":"active":"buffering":"disabled":"buffering"}get urlTriggerStatus(){var e;return this._urlTriggers.length===0?"trigger_disabled":((e=this.instance)===null||e===void 0?void 0:e.get_property(kl))===this.sessionId?"trigger_activated":"trigger_pending"}get eventTriggerStatus(){var e;return this._eventTriggers.length===0?"trigger_disabled":((e=this.instance)===null||e===void 0?void 0:e.get_property(Cl))===this.sessionId?"trigger_activated":"trigger_pending"}get triggerStatus(){var e=this.eventTriggerStatus==="trigger_activated"||this.urlTriggerStatus==="trigger_activated",t=this.eventTriggerStatus==="trigger_pending"||this.urlTriggerStatus==="trigger_pending";return e?"trigger_activated":t?"trigger_pending":"trigger_disabled"}constructor(e){if(A(this,"queuedRRWebEvents",[]),A(this,"isIdle",!1),A(this,"_linkedFlagSeen",!1),A(this,"_lastActivityTimestamp",Date.now()),A(this,"_linkedFlag",null),A(this,"_removePageViewCaptureHook",void 0),A(this,"_onSessionIdListener",void 0),A(this,"_persistDecideOnSessionListener",void 0),A(this,"_samplingSessionListener",void 0),A(this,"_urlTriggers",[]),A(this,"_urlBlocklist",[]),A(this,"_urlBlocked",!1),A(this,"_eventTriggers",[]),A(this,"_removeEventTriggerCaptureHook",void 0),A(this,"_forceAllowLocalhostNetworkCapture",!1),A(this,"_onBeforeUnload",()=>{this._flushBuffer()}),A(this,"_onOffline",()=>{this._tryAddCustomEvent("browser offline",{})}),A(this,"_onOnline",()=>{this._tryAddCustomEvent("browser online",{})}),A(this,"_onVisibilityChange",()=>{if(L!=null&&L.visibilityState){var n="window "+L.visibilityState;this._tryAddCustomEvent(n,{})}}),this.instance=e,this._captureStarted=!1,this._endpoint="/s/",this.stopRrweb=void 0,this.receivedDecide=!1,!this.instance.sessionManager)throw Ae.error("started without valid sessionManager"),new Error(wn+" started without valid sessionManager. This is a bug.");if(this.instance.config.__preview_experimental_cookieless_mode)throw new Error(wn+" cannot be used with __preview_experimental_cookieless_mode.");var{sessionId:t,windowId:r}=this.sessionManager.checkAndGetSessionAndWindowId();this.sessionId=t,this.windowId=r,this.buffer=this.clearBuffer(),this.sessionIdleThresholdMilliseconds>=this.sessionManager.sessionTimeoutMs&&Ae.warn("session_idle_threshold_ms (".concat(this.sessionIdleThresholdMilliseconds,") is greater than the session timeout (").concat(this.sessionManager.sessionTimeoutMs,"). Session will never be detected as idle"))}startIfEnabledOrStop(e){this.isRecordingEnabled?(this._startCapture(e),v?.addEventListener("beforeunload",this._onBeforeUnload),v?.addEventListener("offline",this._onOffline),v?.addEventListener("online",this._onOnline),v?.addEventListener("visibilitychange",this._onVisibilityChange),this._setupSampling(),this._addEventTriggerListener(),Y(this._removePageViewCaptureHook)&&(this._removePageViewCaptureHook=this.instance.on("eventCaptured",t=>{try{if(t.event==="$pageview"){var r=t!=null&&t.properties.$current_url?this._maskUrl(t?.properties.$current_url):"";if(!r)return;this._tryAddCustomEvent("$pageview",{href:r})}}catch(n){Ae.error("Could not add $pageview to rrweb session",n)}})),this._onSessionIdListener||(this._onSessionIdListener=this.sessionManager.onSessionId((t,r,n)=>{var s,o,l,a;n&&(this._tryAddCustomEvent("$session_id_change",{sessionId:t,windowId:r,changeReason:n}),(s=this.instance)===null||s===void 0||(o=s.persistence)===null||o===void 0||o.unregister(Cl),(l=this.instance)===null||l===void 0||(a=l.persistence)===null||a===void 0||a.unregister(kl))}))):this.stopRecording()}stopRecording(){var e,t,r,n;this._captureStarted&&this.stopRrweb&&(this.stopRrweb(),this.stopRrweb=void 0,this._captureStarted=!1,v?.removeEventListener("beforeunload",this._onBeforeUnload),v?.removeEventListener("offline",this._onOffline),v?.removeEventListener("online",this._onOnline),v?.removeEventListener("visibilitychange",this._onVisibilityChange),this.clearBuffer(),clearInterval(this._fullSnapshotTimer),(e=this._removePageViewCaptureHook)===null||e===void 0||e.call(this),this._removePageViewCaptureHook=void 0,(t=this._removeEventTriggerCaptureHook)===null||t===void 0||t.call(this),this._removeEventTriggerCaptureHook=void 0,(r=this._onSessionIdListener)===null||r===void 0||r.call(this),this._onSessionIdListener=void 0,(n=this._samplingSessionListener)===null||n===void 0||n.call(this),this._samplingSessionListener=void 0,Ae.info("stopped"))}makeSamplingDecision(e){var t,r=this.sessionId!==e,n=this.sampleRate;if(Oe(n)){var s,o=this.isSampled,l=r||!ki(o);l?s=Math.random()<n:s=o,l&&(s?this._reportStarted("sampled"):Ae.warn("Sample rate (".concat(n,") has determined that this sessionId (").concat(e,") will not be sent to the server.")),this._tryAddCustomEvent("samplingDecisionMade",{sampleRate:n,isSampled:s})),(t=this.instance.persistence)===null||t===void 0||t.register({[yn]:s})}else{var a;(a=this.instance.persistence)===null||a===void 0||a.register({[yn]:null})}}onRemoteConfig(e){var t,r,n,s,o,l;if(this._tryAddCustomEvent("$remote_config_received",e),this._persistRemoteConfig(e),this._linkedFlag=((t=e.sessionRecording)===null||t===void 0?void 0:t.linkedFlag)||null,(r=e.sessionRecording)!==null&&r!==void 0&&r.endpoint&&(this._endpoint=(l=e.sessionRecording)===null||l===void 0?void 0:l.endpoint),this._setupSampling(),!Y(this._linkedFlag)&&!this._linkedFlagSeen){var a=Se(this._linkedFlag)?this._linkedFlag:this._linkedFlag.flag,u=Se(this._linkedFlag)?null:this._linkedFlag.variant;this.instance.onFeatureFlags((d,c)=>{var p=ce(c)&&a in c,h=u?c[a]===u:p;h&&this._reportStarted("linked_flag_matched",{linkedFlag:a,linkedVariant:u}),this._linkedFlagSeen=h})}(n=e.sessionRecording)!==null&&n!==void 0&&n.urlTriggers&&(this._urlTriggers=e.sessionRecording.urlTriggers),(s=e.sessionRecording)!==null&&s!==void 0&&s.urlBlocklist&&(this._urlBlocklist=e.sessionRecording.urlBlocklist),(o=e.sessionRecording)!==null&&o!==void 0&&o.eventTriggers&&(this._eventTriggers=e.sessionRecording.eventTriggers),this.receivedDecide=!0,this.startIfEnabledOrStop()}_setupSampling(){Oe(this.sampleRate)&&Y(this._samplingSessionListener)&&(this._samplingSessionListener=this.sessionManager.onSessionId(e=>{this.makeSamplingDecision(e)}))}_persistRemoteConfig(e){if(this.instance.persistence){var t,r=this.instance.persistence,n=()=>{var s,o,l,a,u,d,c,p,h=(s=e.sessionRecording)===null||s===void 0?void 0:s.sampleRate,g=Y(h)?null:parseFloat(h),m=(o=e.sessionRecording)===null||o===void 0?void 0:o.minimumDurationMilliseconds;r.register({[Dl]:!!e.sessionRecording,[Kp]:(l=e.sessionRecording)===null||l===void 0?void 0:l.consoleLogRecordingEnabled,[Yp]:C({capturePerformance:e.capturePerformance},(a=e.sessionRecording)===null||a===void 0?void 0:a.networkPayloadCapture),[Qp]:{enabled:(u=e.sessionRecording)===null||u===void 0?void 0:u.recordCanvas,fps:(d=e.sessionRecording)===null||d===void 0?void 0:d.canvasFps,quality:(c=e.sessionRecording)===null||c===void 0?void 0:c.canvasQuality},[eh]:g,[th]:F(m)?null:m,[ih]:(p=e.sessionRecording)===null||p===void 0?void 0:p.scriptConfig})};n(),(t=this._persistDecideOnSessionListener)===null||t===void 0||t.call(this),this._persistDecideOnSessionListener=this.sessionManager.onSessionId(n)}}log(e){var t,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"log";(t=this.instance.sessionRecording)===null||t===void 0||t.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:r,trace:[],payload:[JSON.stringify(e)]}},timestamp:Date.now()})}_startCapture(e){if(!F(Object.assign)&&!F(Array.from)&&!(this._captureStarted||this.instance.config.disable_session_recording||this.instance.consent.isOptedOut())){var t,r;this._captureStarted=!0,this.sessionManager.checkAndGetSessionAndWindowId(),this.rrwebRecord?this._onScriptLoaded():(t=H.__PosthogExtensions__)===null||t===void 0||(r=t.loadExternalDependency)===null||r===void 0||r.call(t,this.instance,this.scriptName,n=>{if(n)return Ae.error("could not load recorder",n);this._onScriptLoaded()}),Ae.info("starting"),this.status==="active"&&this._reportStarted(e||"recording_initialized")}}get scriptName(){var e,t,r;return((e=this.instance)===null||e===void 0||(t=e.persistence)===null||t===void 0||(r=t.get_property(ih))===null||r===void 0?void 0:r.script)||"recorder"}isInteractiveEvent(e){var t;return e.type===3&&em.indexOf((t=e.data)===null||t===void 0?void 0:t.source)!==-1}_updateWindowAndSessionIds(e){var t=this.isInteractiveEvent(e);t||this.isIdle||e.timestamp-this._lastActivityTimestamp>this.sessionIdleThresholdMilliseconds&&(this.isIdle=!0,clearInterval(this._fullSnapshotTimer),this._tryAddCustomEvent("sessionIdle",{eventTimestamp:e.timestamp,lastActivityTimestamp:this._lastActivityTimestamp,threshold:this.sessionIdleThresholdMilliseconds,bufferLength:this.buffer.data.length,bufferSize:this.buffer.size}),this._flushBuffer());var r=!1;if(t&&(this._lastActivityTimestamp=e.timestamp,this.isIdle&&(this.isIdle=!1,this._tryAddCustomEvent("sessionNoLongerIdle",{reason:"user activity",type:e.type}),r=!0)),!this.isIdle){var{windowId:n,sessionId:s}=this.sessionManager.checkAndGetSessionAndWindowId(!t,e.timestamp),o=this.sessionId!==s,l=this.windowId!==n;this.windowId=n,this.sessionId=s,o||l?(this.stopRecording(),this.startIfEnabledOrStop("session_id_changed")):r&&this._scheduleFullSnapshot()}}_tryRRWebMethod(e){try{return e.rrwebMethod(),!0}catch(t){return this.queuedRRWebEvents.length<10?this.queuedRRWebEvents.push({enqueuedAt:e.enqueuedAt||Date.now(),attempt:e.attempt++,rrwebMethod:e.rrwebMethod}):Ae.warn("could not emit queued rrweb event.",t,e),!1}}_tryAddCustomEvent(e,t){return this._tryRRWebMethod(bh(()=>this.rrwebRecord.addCustomEvent(e,t)))}_tryTakeFullSnapshot(){return this._tryRRWebMethod(bh(()=>this.rrwebRecord.takeFullSnapshot()))}_onScriptLoaded(){var e,t={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1},r=this.instance.config.session_recording;for(var[n,s]of Object.entries(r||{}))n in t&&(n==="maskInputOptions"?t.maskInputOptions=C({password:!0},s):t[n]=s);if(this.canvasRecording&&this.canvasRecording.enabled&&(t.recordCanvas=!0,t.sampling={canvas:this.canvasRecording.fps},t.dataURLOptions={type:"image/webp",quality:this.canvasRecording.quality}),this.rrwebRecord){this.mutationRateLimiter=(e=this.mutationRateLimiter)!==null&&e!==void 0?e:new iu(this.rrwebRecord,{refillRate:this.instance.config.session_recording.__mutationRateLimiterRefillRate,bucketSize:this.instance.config.session_recording.__mutationRateLimiterBucketSize,onBlockedNode:(l,a)=>{var u="Too many mutations on node '".concat(l,"'. Rate limiting. This could be due to SVG animations or something similar");Ae.info(u,{node:a}),this.log(wn+" "+u,"warn")}});var o=this._gatherRRWebPlugins();this.stopRrweb=this.rrwebRecord(C({emit:l=>{this.onRRwebEmit(l)},plugins:o},t)),this._lastActivityTimestamp=Date.now(),this.isIdle=!1,this._tryAddCustomEvent("$session_options",{sessionRecordingOptions:t,activePlugins:o.map(l=>l?.name)}),this._tryAddCustomEvent("$posthog_config",{config:this.instance.config})}else Ae.error("onScriptLoaded was called but rrwebRecord is not available. This indicates something has gone wrong.")}_scheduleFullSnapshot(){if(this._fullSnapshotTimer&&clearInterval(this._fullSnapshotTimer),!this.isIdle){var e=this.fullSnapshotIntervalMillis;e&&(this._fullSnapshotTimer=setInterval(()=>{this._tryTakeFullSnapshot()},e))}}_gatherRRWebPlugins(){var e,t,r,n,s=[],o=(e=H.__PosthogExtensions__)===null||e===void 0||(t=e.rrwebPlugins)===null||t===void 0?void 0:t.getRecordConsolePlugin;o&&this.isConsoleLogCaptureEnabled&&s.push(o());var l=(r=H.__PosthogExtensions__)===null||r===void 0||(n=r.rrwebPlugins)===null||n===void 0?void 0:n.getRecordNetworkPlugin;return this.networkPayloadCapture&&Ze(l)&&(!b1.includes(location.hostname)||this._forceAllowLocalhostNetworkCapture?s.push(l(H1(this.instance.config,this.networkPayloadCapture))):Ae.info("NetworkCapture not started because we are on localhost.")),s}onRRwebEmit(e){var t;if(this._processQueuedEvents(),e&&ce(e)){if(e.type===Et.Meta){var r=this._maskUrl(e.data.href);if(this._lastHref=r,!r)return;e.data.href=r}else this._pageViewFallBack();if(this._checkUrlTriggerConditions(),this.status!=="paused"||function(c){return c.type===Et.Custom&&c.data.tag==="recording paused"}(e)){e.type===Et.FullSnapshot&&this._scheduleFullSnapshot(),e.type===Et.FullSnapshot&&this.triggerStatus==="trigger_pending"&&this.clearBuffer();var n=this.mutationRateLimiter?this.mutationRateLimiter.throttleMutations(e):e;if(n){var s=function(c){var p=c;if(p&&ce(p)&&p.type===6&&ce(p.data)&&p.data.plugin==="rrweb/console@1"){p.data.payload.payload.length>10&&(p.data.payload.payload=p.data.payload.payload.slice(0,10),p.data.payload.payload.push("...[truncated]"));for(var h=[],g=0;g<p.data.payload.payload.length;g++)p.data.payload.payload[g]&&p.data.payload.payload[g].length>2e3?h.push(p.data.payload.payload[g].slice(0,2e3)+"...[truncated]"):h.push(p.data.payload.payload[g]);return p.data.payload.payload=h,c}return c}(n);if(this._updateWindowAndSessionIds(s),!this.isIdle||wh(s)){if(wh(s)){var o=s.data.payload;if(o){var l=o.lastActivityTimestamp,a=o.threshold;s.timestamp=l+a}}var u=(t=this.instance.config.session_recording.compress_events)===null||t===void 0||t?function(c){if($o(c)<1024)return c;try{if(c.type===Et.FullSnapshot)return C(C({},c),{},{data:vi(c.data),cv:"2024-10"});if(c.type===Et.IncrementalSnapshot&&c.data.source===ot.Mutation)return C(C({},c),{},{cv:"2024-10",data:C(C({},c.data),{},{texts:vi(c.data.texts),attributes:vi(c.data.attributes),removes:vi(c.data.removes),adds:vi(c.data.adds)})});if(c.type===Et.IncrementalSnapshot&&c.data.source===ot.StyleSheetRule)return C(C({},c),{},{cv:"2024-10",data:C(C({},c.data),{},{adds:vi(c.data.adds),removes:vi(c.data.removes)})})}catch(p){Ae.error("could not compress event - will use uncompressed event",p)}return c}(s):s,d={$snapshot_bytes:$o(u),$snapshot_data:u,$session_id:this.sessionId,$window_id:this.windowId};this.status!=="disabled"?this._captureSnapshotBuffered(d):this.clearBuffer()}}}}}_pageViewFallBack(){if(!this.instance.config.capture_pageview&&v){var e=this._maskUrl(v.location.href);this._lastHref!==e&&(this._tryAddCustomEvent("$url_changed",{href:e}),this._lastHref=e)}}_processQueuedEvents(){if(this.queuedRRWebEvents.length){var e=[...this.queuedRRWebEvents];this.queuedRRWebEvents=[],e.forEach(t=>{Date.now()-t.enqueuedAt<=2e3&&this._tryRRWebMethod(t)})}}_maskUrl(e){var t=this.instance.config.session_recording;if(t.maskNetworkRequestFn){var r,n={url:e};return(r=n=t.maskNetworkRequestFn(n))===null||r===void 0?void 0:r.url}return e}clearBuffer(){return this.buffer={size:0,data:[],sessionId:this.sessionId,windowId:this.windowId},this.buffer}_flushBuffer(){this.flushBufferTimer&&(clearTimeout(this.flushBufferTimer),this.flushBufferTimer=void 0);var e=this.minimumDuration,t=this.sessionDuration,r=Oe(t)&&t>=0,n=Oe(e)&&r&&t<e;return this.status==="buffering"||this.status==="paused"||n?(this.flushBufferTimer=setTimeout(()=>{this._flushBuffer()},2e3),this.buffer):(this.buffer.data.length>0&&Kl(this.buffer).forEach(s=>{this._captureSnapshot({$snapshot_bytes:s.size,$snapshot_data:s.data,$session_id:s.sessionId,$window_id:s.windowId,$lib:"web",$lib_version:It.LIB_VERSION})}),this.clearBuffer())}_captureSnapshotBuffered(e){var t,r=2+(((t=this.buffer)===null||t===void 0?void 0:t.data.length)||0);!this.isIdle&&(this.buffer.size+e.$snapshot_bytes+r>943718.4||this.buffer.sessionId!==this.sessionId)&&(this.buffer=this._flushBuffer()),this.buffer.size+=e.$snapshot_bytes,this.buffer.data.push(e.$snapshot_data),this.flushBufferTimer||this.isIdle||(this.flushBufferTimer=setTimeout(()=>{this._flushBuffer()},2e3))}_captureSnapshot(e){this.instance.capture("$snapshot",e,{_url:this.instance.requestRouter.endpointFor("api",this._endpoint),_noTruncate:!0,_batchKey:"recordings",skip_client_rate_limiting:!0})}_checkUrlTriggerConditions(){if(v!==void 0&&v.location.href){var e=v.location.href,t=this.status==="paused",r=xh(e,this._urlBlocklist);r&&!t?this._pauseRecording():!r&&t&&this._resumeRecording(),xh(e,this._urlTriggers)&&this._activateTrigger("url")}}_activateTrigger(e){var t,r;this.triggerStatus==="trigger_pending"&&((t=this.instance)===null||t===void 0||(r=t.persistence)===null||r===void 0||r.register({[e==="url"?kl:Cl]:this.sessionId}),this._flushBuffer(),this._reportStarted(e+"_trigger_matched"))}_pauseRecording(){this.status!=="paused"&&(this._urlBlocked=!0,clearInterval(this._fullSnapshotTimer),Ae.info("recording paused due to URL blocker"),this._tryAddCustomEvent("recording paused",{reason:"url blocker"}))}_resumeRecording(){this.status==="paused"&&(this._urlBlocked=!1,this._tryTakeFullSnapshot(),this._scheduleFullSnapshot(),this._tryAddCustomEvent("recording resumed",{reason:"left blocked url"}),Ae.info("recording resumed"))}_addEventTriggerListener(){this._eventTriggers.length!==0&&Y(this._removeEventTriggerCaptureHook)&&(this._removeEventTriggerCaptureHook=this.instance.on("eventCaptured",e=>{try{this._eventTriggers.includes(e.event)&&this._activateTrigger("event")}catch(t){Ae.error("Could not activate event trigger",t)}}))}overrideLinkedFlag(){this._linkedFlagSeen=!0,this._tryTakeFullSnapshot(),this._reportStarted("linked_flag_overridden")}overrideSampling(){var e;(e=this.instance.persistence)===null||e===void 0||e.register({[yn]:!0}),this._tryTakeFullSnapshot(),this._reportStarted("sampling_overridden")}overrideTrigger(e){this._activateTrigger(e)}_reportStarted(e,t){this.instance.register_for_session({$session_recording_start_reason:e}),Ae.info(e.replace("_"," "),t),V(["recording_initialized","session_id_changed"],e)||this._tryAddCustomEvent(e,t)}},yi=Fe("[RemoteConfig]"),uu=class{constructor(e){this.instance=e}get remoteConfig(){var e,t;return(e=H._POSTHOG_REMOTE_CONFIG)===null||e===void 0||(t=e[this.instance.config.token])===null||t===void 0?void 0:t.config}_loadRemoteConfigJs(e){var t,r,n;(t=H.__PosthogExtensions__)!==null&&t!==void 0&&t.loadExternalDependency?(r=H.__PosthogExtensions__)===null||r===void 0||(n=r.loadExternalDependency)===null||n===void 0||n.call(r,this.instance,"remote-config",()=>e(this.remoteConfig)):(yi.error("PostHog Extensions not found. Cannot load remote config."),e())}_loadRemoteConfigJSON(e){this.instance._send_request({method:"GET",url:this.instance.requestRouter.endpointFor("assets","/array/".concat(this.instance.config.token,"/config")),callback:t=>{e(t.json)}})}load(){try{if(this.remoteConfig)return yi.info("Using preloaded remote config",this.remoteConfig),void this.onRemoteConfig(this.remoteConfig);if(this.instance.config.advanced_disable_decide)return void yi.warn("Remote config is disabled. Falling back to local config.");this._loadRemoteConfigJs(e=>{if(!e)return yi.info("No config found after loading remote JS config. Falling back to JSON."),void this._loadRemoteConfigJSON(t=>{this.onRemoteConfig(t)});this.onRemoteConfig(e)})}catch(e){yi.error("Error loading remote config",e)}}onRemoteConfig(e){e?this.instance.config.__preview_remote_config?(this.instance._onRemoteConfig(e),e.hasFeatureFlags!==!1&&this.instance.featureFlags.ensureFlagsLoaded()):yi.info("__preview_remote_config is disabled. Logging config instead",e):yi.error("Failed to fetch remote config from PostHog.")}},$t,tm=v!=null&&v.location?So(v.location.hash,"__posthog")||So(location.hash,"state"):null,kh="_postHogToolbarParams",Ch=Fe("[Toolbar]");(function(i){i[i.UNINITIALIZED=0]="UNINITIALIZED",i[i.LOADING=1]="LOADING",i[i.LOADED=2]="LOADED"})($t||($t={}));var cu=class{constructor(e){this.instance=e}setToolbarState(e){H.ph_toolbar_state=e}getToolbarState(){var e;return(e=H.ph_toolbar_state)!==null&&e!==void 0?e:$t.UNINITIALIZED}maybeLoadToolbar(){var e,t,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;if(!v||!L)return!1;r=(e=r)!==null&&e!==void 0?e:v.location,s=(t=s)!==null&&t!==void 0?t:v.history;try{if(!n){try{v.localStorage.setItem("test","test"),v.localStorage.removeItem("test")}catch{return!1}n=v?.localStorage}var o,l=tm||So(r.hash,"__posthog")||So(r.hash,"state"),a=l?Wp(()=>JSON.parse(atob(decodeURIComponent(l))))||Wp(()=>JSON.parse(decodeURIComponent(l))):null;return a&&a.action==="ph_authorize"?((o=a).source="url",o&&Object.keys(o).length>0&&(a.desiredHash?r.hash=a.desiredHash:s?s.replaceState(s.state,"",r.pathname+r.search):r.hash="")):((o=JSON.parse(n.getItem(kh)||"{}")).source="localstorage",delete o.userIntent),!(!o.token||this.instance.config.token!==o.token)&&(this.loadToolbar(o),!0)}catch{return!1}}_callLoadToolbar(e){var t=H.ph_load_toolbar||H.ph_load_editor;!Y(t)&&Ze(t)?t(e,this.instance):Ch.warn("No toolbar load function found")}loadToolbar(e){var t=!(L==null||!L.getElementById(Jh));if(!v||t)return!1;var r=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,n=C(C({token:this.instance.config.token},e),{},{apiURL:this.instance.requestRouter.endpointFor("ui")},r?{instrument:!1}:{});if(v.localStorage.setItem(kh,JSON.stringify(C(C({},n),{},{source:void 0}))),this.getToolbarState()===$t.LOADED)this._callLoadToolbar(n);else if(this.getToolbarState()===$t.UNINITIALIZED){var s,o;this.setToolbarState($t.LOADING),(s=H.__PosthogExtensions__)===null||s===void 0||(o=s.loadExternalDependency)===null||o===void 0||o.call(s,this.instance,"toolbar",l=>{if(l)return Ch.error("[Toolbar] Failed to load",l),void this.setToolbarState($t.UNINITIALIZED);this.setToolbarState($t.LOADED),this._callLoadToolbar(n)}),At(v,"turbolinks:load",()=>{this.setToolbarState($t.UNINITIALIZED),this.loadToolbar(n)})}return!0}_loadEditor(e){return this.loadToolbar(e)}maybeLoadEditor(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;return this.maybeLoadToolbar(e,t,r)}},du=class{constructor(e){A(this,"isPaused",!0),A(this,"queue",[]),A(this,"flushTimeoutMs",3e3),this.sendRequest=e}enqueue(e){this.queue.push(e),this.flushTimeout||this.setFlushTimeout()}unload(){this.clearFlushTimeout();var e=this.queue.length>0?this.formatQueue():{},t=Object.values(e),r=[...t.filter(n=>n.url.indexOf("/e")===0),...t.filter(n=>n.url.indexOf("/e")!==0)];r.map(n=>{this.sendRequest(C(C({},n),{},{transport:"sendBeacon"}))})}enable(){this.isPaused=!1,this.setFlushTimeout()}setFlushTimeout(){var e=this;this.isPaused||(this.flushTimeout=setTimeout(()=>{if(this.clearFlushTimeout(),this.queue.length>0){var t=this.formatQueue(),r=function(s){var o=t[s],l=new Date().getTime();o.data&&fe(o.data)&&K(o.data,a=>{a.offset=Math.abs(a.timestamp-l),delete a.timestamp}),e.sendRequest(o)};for(var n in t)r(n)}},this.flushTimeoutMs))}clearFlushTimeout(){clearTimeout(this.flushTimeout),this.flushTimeout=void 0}formatQueue(){var e={};return K(this.queue,t=>{var r,n=t,s=(n?n.batchKey:null)||n.url;F(e[s])&&(e[s]=C(C({},n),{},{data:[]})),(r=e[s].data)===null||r===void 0||r.push(n.data)}),this.queue=[],e}},im=function(i){var e,t,r,n,s="";for(e=t=0,r=(i=(i+"").replace(/\r\n/g,`
874
- `).replace(/\r/g,`
875
- `)).length,n=0;n<r;n++){var o=i.charCodeAt(n),l=null;o<128?t++:l=o>127&&o<2048?String.fromCharCode(o>>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),Jt(l)||(t>e&&(s+=i.substring(e,t)),s+=l,e=t=n+1)}return t>e&&(s+=i.substring(e,i.length)),s},rm=!!Ol||!!Rl,Sh="text/plain",Mo=(i,e)=>{var[t,r]=i.split("?"),n=C({},e);r?.split("&").forEach(o=>{var[l]=o.split("=");delete n[l]});var s=w1(n);return s=s?(r?r+"&":"")+s:r,"".concat(t,"?").concat(s)},po=(i,e)=>JSON.stringify(i,(t,r)=>typeof r=="bigint"?r.toString():r,e),Al=i=>{var{data:e,compression:t}=i;if(e){if(t===pt.GZipJS){var r=$f(If(po(e)),{mtime:0}),n=new Blob([r],{type:Sh});return{contentType:Sh,body:n,estimatedSize:n.size}}if(t===pt.Base64){var s=function(a){var u,d,c,p,h,g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",m=0,b=0,x="",_=[];if(!a)return a;a=im(a);do u=(h=a.charCodeAt(m++)<<16|a.charCodeAt(m++)<<8|a.charCodeAt(m++))>>18&63,d=h>>12&63,c=h>>6&63,p=63&h,_[b++]=g.charAt(u)+g.charAt(d)+g.charAt(c)+g.charAt(p);while(m<a.length);switch(x=_.join(""),a.length%3){case 1:x=x.slice(0,-2)+"==";break;case 2:x=x.slice(0,-1)+"="}return x}(po(e)),o=(a=>"data="+encodeURIComponent(typeof a=="string"?a:po(a)))(s);return{contentType:"application/x-www-form-urlencoded",body:o,estimatedSize:new Blob([o]).size}}var l=po(e);return{contentType:"application/json",body:l,estimatedSize:new Blob([l]).size}}},Cn=[];Rl&&Cn.push({transport:"fetch",method:i=>{var e,t,{contentType:r,body:n,estimatedSize:s}=(e=Al(i))!==null&&e!==void 0?e:{},o=new Headers;K(i.headers,function(d,c){o.append(c,d)}),r&&o.append("Content-Type",r);var l=i.url,a=null;if(zp){var u=new zp;a={signal:u.signal,timeout:setTimeout(()=>u.abort(),i.timeout)}}Rl(l,C({method:i?.method||"GET",headers:o,keepalive:i.method==="POST"&&(s||0)<52428.8,body:n,signal:(t=a)===null||t===void 0?void 0:t.signal},i.fetchOptions)).then(d=>d.text().then(c=>{var p,h={statusCode:d.status,text:c};if(d.status===200)try{h.json=JSON.parse(c)}catch(g){O.error(g)}(p=i.callback)===null||p===void 0||p.call(i,h)})).catch(d=>{var c;O.error(d),(c=i.callback)===null||c===void 0||c.call(i,{statusCode:0,text:d})}).finally(()=>a?clearTimeout(a.timeout):null)}}),Ol&&Cn.push({transport:"XHR",method:i=>{var e,t=new Ol;t.open(i.method||"GET",i.url,!0);var{contentType:r,body:n}=(e=Al(i))!==null&&e!==void 0?e:{};K(i.headers,function(s,o){t.setRequestHeader(o,s)}),r&&t.setRequestHeader("Content-Type",r),i.timeout&&(t.timeout=i.timeout),t.withCredentials=!0,t.onreadystatechange=()=>{if(t.readyState===4){var s,o={statusCode:t.status,text:t.responseText};if(t.status===200)try{o.json=JSON.parse(t.responseText)}catch{}(s=i.callback)===null||s===void 0||s.call(i,o)}},t.send(n)}}),Ge!=null&&Ge.sendBeacon&&Cn.push({transport:"sendBeacon",method:i=>{var e=Mo(i.url,{beacon:"1"});try{var t,{contentType:r,body:n}=(t=Al(i))!==null&&t!==void 0?t:{},s=typeof n=="string"?new Blob([n],{type:r}):n;Ge.sendBeacon(e,s)}catch{}}});var nm=["retriesPerformedSoFar"],pu=class{constructor(e){A(this,"isPolling",!1),A(this,"pollIntervalMs",3e3),A(this,"queue",[]),this.instance=e,this.queue=[],this.areWeOnline=!0,!F(v)&&"onLine"in v.navigator&&(this.areWeOnline=v.navigator.onLine,v.addEventListener("online",()=>{this.areWeOnline=!0,this.flush()}),v.addEventListener("offline",()=>{this.areWeOnline=!1}))}retriableRequest(e){var{retriesPerformedSoFar:t}=e,r=qh(e,nm);Oe(t)&&t>0&&(r.url=Mo(r.url,{retry_count:t})),this.instance._send_request(C(C({},r),{},{callback:n=>{var s;n.statusCode!==200&&(n.statusCode<400||n.statusCode>=500)&&(t??0)<10?this.enqueue(C({retriesPerformedSoFar:t},r)):(s=r.callback)===null||s===void 0||s.call(r,n)}}))}enqueue(e){var t=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=t+1;var r=function(o){var l=3e3*Math.pow(2,o),a=l/2,u=Math.min(18e5,l),d=(Math.random()-.5)*(u-a);return Math.ceil(u+d)}(t),n=Date.now()+r;this.queue.push({retryAt:n,requestOptions:e});var s="Enqueued failed request for retry in ".concat(r);navigator.onLine||(s+=" (Browser is offline)"),O.warn(s),this.isPolling||(this.isPolling=!0,this.poll())}poll(){this.poller&&clearTimeout(this.poller),this.poller=setTimeout(()=>{this.areWeOnline&&this.queue.length>0&&this.flush(),this.poll()},this.pollIntervalMs)}flush(){var e=Date.now(),t=[],r=this.queue.filter(s=>s.retryAt<e||(t.push(s),!1));if(this.queue=t,r.length>0)for(var{requestOptions:n}of r)this.retriableRequest(n)}unload(){for(var{requestOptions:e}of(this.poller&&(clearTimeout(this.poller),this.poller=void 0),this.queue))try{this.instance._send_request(C(C({},e),{},{transport:"sendBeacon"}))}catch(t){O.error(t)}this.queue=[]}},Ci,Eh=Fe("[SessionId]"),hu=class{constructor(e,t,r){var n;if(A(this,"_sessionIdChangedHandlers",[]),!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.__preview_experimental_cookieless_mode)throw new Error("SessionIdManager cannot be used with __preview_experimental_cookieless_mode");this.config=e.config,this.persistence=e.persistence,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this._sessionIdGenerator=t||Wt,this._windowIdGenerator=r||Wt;var s=this.config.persistence_name||this.config.token,o=this.config.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*ft(o,60,36e3,"session_idle_timeout_seconds",1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.resetIdleTimer(),this._window_id_storage_key="ph_"+s+"_window_id",this._primary_window_exists_storage_key="ph_"+s+"_primary_window_exists",this._canUseSessionStorage()){var l=Ce.parse(this._window_id_storage_key),a=Ce.parse(this._primary_window_exists_storage_key);l&&!a?this._windowId=l:Ce.remove(this._window_id_storage_key),Ce.set(this._primary_window_exists_storage_key,!0)}if((n=this.config.bootstrap)!==null&&n!==void 0&&n.sessionID)try{var u=(d=>{var c=d.replace(/-/g,"");if(c.length!==32)throw new Error("Not a valid UUID");if(c[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(c.substring(0,12),16)})(this.config.bootstrap.sessionID);this._setSessionId(this.config.bootstrap.sessionID,new Date().getTime(),u)}catch(d){Eh.error("Invalid sessionID in bootstrap",d)}this._listenToReloadWindow()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return F(this._sessionIdChangedHandlers)&&(this._sessionIdChangedHandlers=[]),this._sessionIdChangedHandlers.push(e),this._sessionId&&e(this._sessionId,this._windowId),()=>{this._sessionIdChangedHandlers=this._sessionIdChangedHandlers.filter(t=>t!==e)}}_canUseSessionStorage(){return this.config.persistence!=="memory"&&!this.persistence.disabled&&Ce.is_supported()}_setWindowId(e){e!==this._windowId&&(this._windowId=e,this._canUseSessionStorage()&&Ce.set(this._window_id_storage_key,e))}_getWindowId(){return this._windowId?this._windowId:this._canUseSessionStorage()?Ce.parse(this._window_id_storage_key):null}_setSessionId(e,t,r){e===this._sessionId&&t===this._sessionActivityTimestamp&&r===this._sessionStartTimestamp||(this._sessionStartTimestamp=r,this._sessionActivityTimestamp=t,this._sessionId=e,this.persistence.register({[wo]:[t,e,r]}))}_getSessionId(){if(this._sessionId&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this._sessionId,this._sessionStartTimestamp];var e=this.persistence.props[wo];return fe(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this._setSessionId(null,null,null)}_listenToReloadWindow(){v?.addEventListener("beforeunload",()=>{this._canUseSessionStorage()&&Ce.remove(this._primary_window_exists_storage_key)})}checkAndGetSessionAndWindowId(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.config.__preview_experimental_cookieless_mode)throw new Error("checkAndGetSessionAndWindowId should not be called in __preview_experimental_cookieless_mode");var r=t||new Date().getTime(),[n,s,o]=this._getSessionId(),l=this._getWindowId(),a=Oe(o)&&o>0&&Math.abs(r-o)>864e5,u=!1,d=!s,c=!e&&Math.abs(r-n)>this.sessionTimeoutMs;d||c||a?(s=this._sessionIdGenerator(),l=this._windowIdGenerator(),Eh.info("new session ID generated",{sessionId:s,windowId:l,changeReason:{noSessionId:d,activityTimeout:c,sessionPastMaximumLength:a}}),o=r,u=!0):l||(l=this._windowIdGenerator(),u=!0);var p=n===0||!e||a?r:n,h=o===0?new Date().getTime():o;return this._setWindowId(l),this._setSessionId(s,p,h),e||this.resetIdleTimer(),u&&this._sessionIdChangedHandlers.forEach(g=>g(s,l,u?{noSessionId:d,activityTimeout:c,sessionPastMaximumLength:a}:void 0)),{sessionId:s,windowId:l,sessionStartTimestamp:h,changeReason:u?{noSessionId:d,activityTimeout:c,sessionPastMaximumLength:a}:void 0,lastActivityTimestamp:n}}resetIdleTimer(){clearTimeout(this._enforceIdleTimeout),this._enforceIdleTimeout=setTimeout(()=>{this.resetSessionId()},1.1*this.sessionTimeoutMs)}};(function(i){i.US="us",i.EU="eu",i.CUSTOM="custom"})(Ci||(Ci={}));var $h="i.posthog.com",fu=class{constructor(e){A(this,"_regionCache",{}),this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return e==="https://app.posthog.com"?"https://us.i.posthog.com":e}get uiHost(){var e,t=(e=this.instance.config.ui_host)===null||e===void 0?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace(".".concat($h),".posthog.com")),t==="https://app.posthog.com"?"https://us.posthog.com":t}get region(){return this._regionCache[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this._regionCache[this.apiHost]=Ci.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this._regionCache[this.apiHost]=Ci.EU:this._regionCache[this.apiHost]=Ci.CUSTOM),this._regionCache[this.apiHost]}endpointFor(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(t&&(t=t[0]==="/"?t:"/".concat(t)),e==="ui")return this.uiHost+t;if(this.region===Ci.CUSTOM)return this.apiHost+t;var r=$h+t;switch(e){case"assets":return"https://".concat(this.region,"-assets.").concat(r);case"api":return"https://".concat(this.region,".").concat(r)}}},Af="posthog-js";function Tf(i){var{organization:e,projectId:t,prefix:r,severityAllowList:n=["error"]}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return s=>{var o,l,a,u,d;if(!(n==="*"||n.includes(s.level))||!i.__loaded)return s;s.tags||(s.tags={});var c=i.requestRouter.endpointFor("ui","/project/".concat(i.config.token,"/person/").concat(i.get_distinct_id()));s.tags["PostHog Person URL"]=c,i.sessionRecordingStarted()&&(s.tags["PostHog Recording URL"]=i.get_session_replay_url({withTimestamp:!0}));var p=((o=s.exception)===null||o===void 0?void 0:o.values)||[];p.map(g=>{g.stacktrace&&(g.stacktrace.type="raw")});var h={$exception_message:((l=p[0])===null||l===void 0?void 0:l.value)||s.message,$exception_type:(a=p[0])===null||a===void 0?void 0:a.type,$exception_personURL:c,$exception_level:s.level,$exception_list:p,$sentry_event_id:s.event_id,$sentry_exception:s.exception,$sentry_exception_message:((u=p[0])===null||u===void 0?void 0:u.value)||s.message,$sentry_exception_type:(d=p[0])===null||d===void 0?void 0:d.type,$sentry_tags:s.tags};return e&&t&&(h.$sentry_url=(r||"https://sentry.io/organizations/")+e+"/issues/?project="+t+"&query="+s.event_id),i.exceptions.sendExceptionEvent(h),s}}var gu=class{constructor(e,t,r,n,s){this.name=Af,this.setupOnce=function(o){o(Tf(e,{organization:t,projectId:r,prefix:n,severityAllowList:s}))}}},Ih,Po,st,Tl=Fe("[SegmentIntegration]");function sm(i,e){var t=i.config.segment;if(!t)return e();(function(r,n){var s=r.config.segment;if(!s)return n();var o=a=>{var u=()=>a.anonymousId()||Wt();r.config.get_device_id=u,a.id()&&(r.register({distinct_id:a.id(),$device_id:u()}),r.persistence.set_property(St,"identified")),n()},l=s.user();"then"in l&&Ze(l.then)?l.then(a=>o(a)):o(l)})(i,()=>{t.register((r=>{Promise&&Promise.resolve||Tl.warn("This browser does not have Promise support, and can not use the segment integration");var n=(s,o)=>{var l;if(!o)return s;s.event.userId||s.event.anonymousId===r.get_distinct_id()||(Tl.info("No userId set, resetting PostHog"),r.reset()),s.event.userId&&s.event.userId!==r.get_distinct_id()&&(Tl.info("UserId set, identifying with PostHog"),r.identify(s.event.userId));var a=r._calculate_event_properties(o,(l=s.event.properties)!==null&&l!==void 0?l:{},new Date);return s.event.properties=Object.assign({},a,s.event.properties),s};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:s=>n(s,s.event.event),page:s=>n(s,"$pageview"),identify:s=>n(s,"$identify"),screen:s=>n(s,"$screen")}})(i)).then(()=>{e()})})}var mu=class{constructor(e){this._instance=e}doPageView(e,t){var r,n=this._previousPageViewProperties(e,t);return this._currentPageview={pathname:(r=v?.location.pathname)!==null&&r!==void 0?r:"",pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),n}doPageLeave(e){var t;return this._previousPageViewProperties(e,(t=this._currentPageview)===null||t===void 0?void 0:t.pageViewId)}doEvent(){var e;return{$pageview_id:(e=this._currentPageview)===null||e===void 0?void 0:e.pageViewId}}_previousPageViewProperties(e,t){var r=this._currentPageview;if(!r)return{$pageview_id:t};var n={$pageview_id:t,$prev_pageview_id:r.pageViewId},s=this._instance.scrollManager.getContext();if(s&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:o,lastScrollY:l,maxScrollY:a,maxContentHeight:u,lastContentY:d,maxContentY:c}=s;if(!(F(o)||F(l)||F(a)||F(u)||F(d)||F(c))){o=Math.ceil(o),l=Math.ceil(l),a=Math.ceil(a),u=Math.ceil(u),d=Math.ceil(d),c=Math.ceil(c);var p=o<=1?1:ft(l/o,0,1),h=o<=1?1:ft(a/o,0,1),g=u<=1?1:ft(d/u,0,1),m=u<=1?1:ft(c/u,0,1);n=Te(n,{$prev_pageview_last_scroll:l,$prev_pageview_last_scroll_percentage:p,$prev_pageview_max_scroll:a,$prev_pageview_max_scroll_percentage:h,$prev_pageview_last_content:d,$prev_pageview_last_content_percentage:g,$prev_pageview_max_content:c,$prev_pageview_max_content_percentage:m})}}return r.pathname&&(n.$prev_pageview_pathname=r.pathname),r.timestamp&&(n.$prev_pageview_duration=(e.getTime()-r.timestamp.getTime())/1e3),n}};(function(i){i.Popover="popover",i.API="api",i.Widget="widget"})(Ih||(Ih={})),function(i){i.Open="open",i.MultipleChoice="multiple_choice",i.SingleChoice="single_choice",i.Rating="rating",i.Link="link"}(Po||(Po={})),function(i){i.NextQuestion="next_question",i.End="end",i.ResponseBased="response_based",i.SpecificQuestion="specific_question"}(st||(st={}));var Ro=class{constructor(){A(this,"events",{}),this.events={}}on(e,t){return this.events[e]||(this.events[e]=[]),this.events[e].push(t),()=>{this.events[e]=this.events[e].filter(r=>r!==t)}}emit(e,t){for(var r of this.events[e]||[])r(t);for(var n of this.events["*"]||[])n(e,t)}},vu=class i{constructor(e){A(this,"_debugEventEmitter",new Ro),A(this,"checkStep",(t,r)=>this.checkStepEvent(t,r)&&this.checkStepUrl(t,r)&&this.checkStepElement(t,r)),A(this,"checkStepEvent",(t,r)=>r==null||!r.event||t?.event===r?.event),this.instance=e,this.actionEvents=new Set,this.actionRegistry=new Set}init(){var e;if(!F((e=this.instance)===null||e===void 0?void 0:e._addCaptureHook)){var t;(t=this.instance)===null||t===void 0||t._addCaptureHook((r,n)=>{this.on(r,n)})}}register(e){var t,r;if(!F((t=this.instance)===null||t===void 0?void 0:t._addCaptureHook)&&(e.forEach(o=>{var l,a;(l=this.actionRegistry)===null||l===void 0||l.add(o),(a=o.steps)===null||a===void 0||a.forEach(u=>{var d;(d=this.actionEvents)===null||d===void 0||d.add(u?.event||"")})}),(r=this.instance)!==null&&r!==void 0&&r.autocapture)){var n,s=new Set;e.forEach(o=>{var l;(l=o.steps)===null||l===void 0||l.forEach(a=>{a!=null&&a.selector&&s.add(a?.selector)})}),(n=this.instance)===null||n===void 0||n.autocapture.setElementSelectors(s)}}on(e,t){var r;t!=null&&e.length!=0&&(this.actionEvents.has(e)||this.actionEvents.has(t?.event))&&this.actionRegistry&&((r=this.actionRegistry)===null||r===void 0?void 0:r.size)>0&&this.actionRegistry.forEach(n=>{this.checkAction(t,n)&&this._debugEventEmitter.emit("actionCaptured",n.name)})}_addActionHook(e){this.onAction("actionCaptured",t=>e(t))}checkAction(e,t){if(t?.steps==null)return!1;for(var r of t.steps)if(this.checkStep(e,r))return!0;return!1}onAction(e,t){return this._debugEventEmitter.on(e,t)}checkStepUrl(e,t){if(t!=null&&t.url){var r,n=e==null||(r=e.properties)===null||r===void 0?void 0:r.$current_url;if(!n||typeof n!="string"||!i.matchString(n,t?.url,t?.url_matching||"contains"))return!1}return!0}static matchString(e,t,r){switch(r){case"regex":return!!v&&gr(e,t);case"exact":return t===e;case"contains":var n=i.escapeStringRegexp(t).replace(/_/g,".").replace(/%/g,".*");return gr(e,n);default:return!1}}static escapeStringRegexp(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}checkStepElement(e,t){if((t!=null&&t.href||t!=null&&t.tag_name||t!=null&&t.text)&&!this.getElementsList(e).some(s=>!(t!=null&&t.href&&!i.matchString(s.href||"",t?.href,t?.href_matching||"exact"))&&(t==null||!t.tag_name||s.tag_name===t?.tag_name)&&!(t!=null&&t.text&&!i.matchString(s.text||"",t?.text,t?.text_matching||"exact")&&!i.matchString(s.$el_text||"",t?.text,t?.text_matching||"exact"))))return!1;if(t!=null&&t.selector){var r,n=e==null||(r=e.properties)===null||r===void 0?void 0:r.$element_selectors;if(!n||!n.includes(t?.selector))return!1}return!0}getElementsList(e){return e?.properties.$elements==null?[]:e?.properties.$elements}},Tn=class i{constructor(e){this.instance=e,this.eventToSurveys=new Map,this.actionToSurveys=new Map}register(e){var t;F((t=this.instance)===null||t===void 0?void 0:t._addCaptureHook)||(this.setupEventBasedSurveys(e),this.setupActionBasedSurveys(e))}setupActionBasedSurveys(e){var t=e.filter(r=>{var n,s,o,l;return((n=r.conditions)===null||n===void 0?void 0:n.actions)&&((s=r.conditions)===null||s===void 0||(o=s.actions)===null||o===void 0||(l=o.values)===null||l===void 0?void 0:l.length)>0});t.length!==0&&(this.actionMatcher==null&&(this.actionMatcher=new vu(this.instance),this.actionMatcher.init(),this.actionMatcher._addActionHook(r=>{this.onAction(r)})),t.forEach(r=>{var n,s,o,l,a,u,d,c,p,h;r.conditions&&(n=r.conditions)!==null&&n!==void 0&&n.actions&&(s=r.conditions)!==null&&s!==void 0&&(o=s.actions)!==null&&o!==void 0&&o.values&&((l=r.conditions)===null||l===void 0||(a=l.actions)===null||a===void 0||(u=a.values)===null||u===void 0?void 0:u.length)>0&&((d=this.actionMatcher)===null||d===void 0||d.register(r.conditions.actions.values),(c=r.conditions)===null||c===void 0||(p=c.actions)===null||p===void 0||(h=p.values)===null||h===void 0||h.forEach(g=>{if(g&&g.name){var m=this.actionToSurveys.get(g.name);m&&m.push(r.id),this.actionToSurveys.set(g.name,m||[r.id])}}))}))}setupEventBasedSurveys(e){var t;e.filter(r=>{var n,s,o,l;return((n=r.conditions)===null||n===void 0?void 0:n.events)&&((s=r.conditions)===null||s===void 0||(o=s.events)===null||o===void 0||(l=o.values)===null||l===void 0?void 0:l.length)>0}).length!==0&&((t=this.instance)===null||t===void 0||t._addCaptureHook((r,n)=>{this.onEvent(r,n)}),e.forEach(r=>{var n,s,o;(n=r.conditions)===null||n===void 0||(s=n.events)===null||s===void 0||(o=s.values)===null||o===void 0||o.forEach(l=>{if(l&&l.name){var a=this.eventToSurveys.get(l.name);a&&a.push(r.id),this.eventToSurveys.set(l.name,a||[r.id])}})}))}onEvent(e,t){var r,n,s=((r=this.instance)===null||r===void 0||(n=r.persistence)===null||n===void 0?void 0:n.props[no])||[];if(i.SURVEY_SHOWN_EVENT_NAME==e&&t&&s.length>0){var o,l=t==null||(o=t.properties)===null||o===void 0?void 0:o.$survey_id;if(l){var a=s.indexOf(l);a>=0&&(s.splice(a,1),this._updateActivatedSurveys(s))}}else this.eventToSurveys.has(e)&&this._updateActivatedSurveys(s.concat(this.eventToSurveys.get(e)||[]))}onAction(e){var t,r,n=((t=this.instance)===null||t===void 0||(r=t.persistence)===null||r===void 0?void 0:r.props[no])||[];this.actionToSurveys.has(e)&&this._updateActivatedSurveys(n.concat(this.actionToSurveys.get(e)||[]))}_updateActivatedSurveys(e){var t,r;(t=this.instance)===null||t===void 0||(r=t.persistence)===null||r===void 0||r.register({[no]:[...new Set(e)]})}getSurveys(){var e,t,r=(e=this.instance)===null||e===void 0||(t=e.persistence)===null||t===void 0?void 0:t.props[no];return r||[]}getEventToSurveys(){return this.eventToSurveys}_getActionMatcher(){return this.actionMatcher}};A(Tn,"SURVEY_SHOWN_EVENT_NAME","survey shown");var Mf,ae,Pf,xi,Ah,Rf,yu,Of,_u={},Lf=[],om=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,zu=Array.isArray;function Gt(i,e){for(var t in e)i[t]=e[t];return i}function Ff(i){var e=i.parentNode;e&&e.removeChild(i)}function Ml(i,e,t,r,n){var s={type:i,props:e,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:n??++Pf,__i:-1,__u:0};return n==null&&ae.vnode!=null&&ae.vnode(s),s}function Vu(i){return i.children}function yo(i,e){this.props=i,this.context=e}function _r(i,e){if(e==null)return i.__?_r(i.__,i.__i+1):null;for(var t;e<i.__k.length;e++)if((t=i.__k[e])!=null&&t.__e!=null)return t.__e;return typeof i.type=="function"?_r(i):null}function Df(i){var e,t;if((i=i.__)!=null&&i.__c!=null){for(i.__e=i.__c.base=null,e=0;e<i.__k.length;e++)if((t=i.__k[e])!=null&&t.__e!=null){i.__e=i.__c.base=t.__e;break}return Df(i)}}function bu(i){(!i.__d&&(i.__d=!0)&&xi.push(i)&&!Oo.__r++||Ah!==ae.debounceRendering)&&((Ah=ae.debounceRendering)||Rf)(Oo)}function Oo(){var i,e,t,r,n,s,o,l,a;for(xi.sort(yu);i=xi.shift();)i.__d&&(e=xi.length,r=void 0,s=(n=(t=i).__v).__e,l=[],a=[],(o=t.__P)&&((r=Gt({},n)).__v=n.__v+1,ae.vnode&&ae.vnode(r),Uf(o,r,n,t.__n,o.ownerSVGElement!==void 0,32&n.__u?[s]:null,l,s??_r(n),!!(32&n.__u),a),r.__.__k[r.__i]=r,um(l,r,a),r.__e!=s&&Df(r)),xi.length>e&&xi.sort(yu));Oo.__r=0}function jf(i,e,t,r,n,s,o,l,a,u,d){var c,p,h,g,m,b=r&&r.__k||Lf,x=e.length;for(t.__d=a,am(t,e,b),a=t.__d,c=0;c<x;c++)(h=t.__k[c])!=null&&typeof h!="boolean"&&typeof h!="function"&&(p=h.__i===-1?_u:b[h.__i]||_u,h.__i=c,Uf(i,h,p,n,s,o,l,a,u,d),g=h.__e,h.ref&&p.ref!=h.ref&&(p.ref&&Wu(p.ref,null,h),d.push(h.ref,h.__c||g,h)),m==null&&g!=null&&(m=g),65536&h.__u||p.__k===h.__k?a=Nf(h,a,i):typeof h.type=="function"&&h.__d!==void 0?a=h.__d:g&&(a=g.nextSibling),h.__d=void 0,h.__u&=-196609);t.__d=a,t.__e=m}function am(i,e,t){var r,n,s,o,l,a=e.length,u=t.length,d=u,c=0;for(i.__k=[],r=0;r<a;r++)(n=i.__k[r]=(n=e[r])==null||typeof n=="boolean"||typeof n=="function"?null:typeof n=="string"||typeof n=="number"||typeof n=="bigint"||n.constructor==String?Ml(null,n,null,null,n):zu(n)?Ml(Vu,{children:n},null,null,null):n.constructor===void 0&&n.__b>0?Ml(n.type,n.props,n.key,n.ref?n.ref:null,n.__v):n)!=null?(n.__=i,n.__b=i.__b+1,l=lm(n,t,o=r+c,d),n.__i=l,s=null,l!==-1&&(d--,(s=t[l])&&(s.__u|=131072)),s==null||s.__v===null?(l==-1&&c--,typeof n.type!="function"&&(n.__u|=65536)):l!==o&&(l===o+1?c++:l>o?d>a-o?c+=l-o:c--:c=l<o&&l==o-1?l-o:0,l!==r+c&&(n.__u|=65536))):(s=t[r])&&s.key==null&&s.__e&&(s.__e==i.__d&&(i.__d=_r(s)),wu(s,s,!1),t[r]=null,d--);if(d)for(r=0;r<u;r++)(s=t[r])!=null&&!(131072&s.__u)&&(s.__e==i.__d&&(i.__d=_r(s)),wu(s,s))}function Nf(i,e,t){var r,n;if(typeof i.type=="function"){for(r=i.__k,n=0;r&&n<r.length;n++)r[n]&&(r[n].__=i,e=Nf(r[n],e,t));return e}return i.__e!=e&&(t.insertBefore(i.__e,e||null),e=i.__e),e&&e.nextSibling}function lm(i,e,t,r){var n=i.key,s=i.type,o=t-1,l=t+1,a=e[t];if(a===null||a&&n==a.key&&s===a.type)return t;if(r>(a!=null&&!(131072&a.__u)?1:0))for(;o>=0||l<e.length;){if(o>=0){if((a=e[o])&&!(131072&a.__u)&&n==a.key&&s===a.type)return o;o--}if(l<e.length){if((a=e[l])&&!(131072&a.__u)&&n==a.key&&s===a.type)return l;l++}}return-1}function Th(i,e,t){e[0]==="-"?i.setProperty(e,t??""):i[e]=t==null?"":typeof t!="number"||om.test(e)?t:t+"px"}function ho(i,e,t,r,n){var s;e:if(e==="style")if(typeof t=="string")i.style.cssText=t;else{if(typeof r=="string"&&(i.style.cssText=r=""),r)for(e in r)t&&e in t||Th(i.style,e,"");if(t)for(e in t)r&&t[e]===r[e]||Th(i.style,e,t[e])}else if(e[0]==="o"&&e[1]==="n")s=e!==(e=e.replace(/(PointerCapture)$|Capture$/,"$1")),e=e.toLowerCase()in i?e.toLowerCase().slice(2):e.slice(2),i.l||(i.l={}),i.l[e+s]=t,t?r?t.u=r.u:(t.u=Date.now(),i.addEventListener(e,s?Ph:Mh,s)):i.removeEventListener(e,s?Ph:Mh,s);else{if(n)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e!=="rowSpan"&&e!=="colSpan"&&e!=="role"&&e in i)try{i[e]=t??"";break e}catch{}typeof t=="function"||(t==null||t===!1&&e[4]!=="-"?i.removeAttribute(e):i.setAttribute(e,t))}}function Mh(i){var e=this.l[i.type+!1];if(i.t){if(i.t<=e.u)return}else i.t=Date.now();return e(ae.event?ae.event(i):i)}function Ph(i){return this.l[i.type+!0](ae.event?ae.event(i):i)}function Uf(i,e,t,r,n,s,o,l,a,u){var d,c,p,h,g,m,b,x,_,k,S,R,B,U,P,q=e.type;if(e.constructor!==void 0)return null;128&t.__u&&(a=!!(32&t.__u),s=[l=e.__e=t.__e]),(d=ae.__b)&&d(e);e:if(typeof q=="function")try{if(x=e.props,_=(d=q.contextType)&&r[d.__c],k=d?_?_.props.value:d.__:r,t.__c?b=(c=e.__c=t.__c).__=c.__E:("prototype"in q&&q.prototype.render?e.__c=c=new q(x,k):(e.__c=c=new yo(x,k),c.constructor=q,c.render=dm),_&&_.sub(c),c.props=x,c.state||(c.state={}),c.context=k,c.__n=r,p=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),q.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=Gt({},c.__s)),Gt(c.__s,q.getDerivedStateFromProps(x,c.__s))),h=c.props,g=c.state,c.__v=e,p)q.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(q.getDerivedStateFromProps==null&&x!==h&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(x,k),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(x,c.__s,k)===!1||e.__v===t.__v)){for(e.__v!==t.__v&&(c.props=x,c.state=c.__s,c.__d=!1),e.__e=t.__e,e.__k=t.__k,e.__k.forEach(function(W){W&&(W.__=e)}),S=0;S<c._sb.length;S++)c.__h.push(c._sb[S]);c._sb=[],c.__h.length&&o.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(x,c.__s,k),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(h,g,m)})}if(c.context=k,c.props=x,c.__P=i,c.__e=!1,R=ae.__r,B=0,"prototype"in q&&q.prototype.render){for(c.state=c.__s,c.__d=!1,R&&R(e),d=c.render(c.props,c.state,c.context),U=0;U<c._sb.length;U++)c.__h.push(c._sb[U]);c._sb=[]}else do c.__d=!1,R&&R(e),d=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++B<25);c.state=c.__s,c.getChildContext!=null&&(r=Gt(Gt({},r),c.getChildContext())),p||c.getSnapshotBeforeUpdate==null||(m=c.getSnapshotBeforeUpdate(h,g)),jf(i,zu(P=d!=null&&d.type===Vu&&d.key==null?d.props.children:d)?P:[P],e,t,r,n,s,o,l,a,u),c.base=e.__e,e.__u&=-161,c.__h.length&&o.push(c),b&&(c.__E=c.__=null)}catch(W){e.__v=null,a||s!=null?(e.__e=l,e.__u|=a?160:32,s[s.indexOf(l)]=null):(e.__e=t.__e,e.__k=t.__k),ae.__e(W,e,t)}else s==null&&e.__v===t.__v?(e.__k=t.__k,e.__e=t.__e):e.__e=cm(t.__e,e,t,r,n,s,o,a,u);(d=ae.diffed)&&d(e)}function um(i,e,t){e.__d=void 0;for(var r=0;r<t.length;r++)Wu(t[r],t[++r],t[++r]);ae.__c&&ae.__c(e,i),i.some(function(n){try{i=n.__h,n.__h=[],i.some(function(s){s.call(n)})}catch(s){ae.__e(s,n.__v)}})}function cm(i,e,t,r,n,s,o,l,a){var u,d,c,p,h,g,m,b=t.props,x=e.props,_=e.type;if(_==="svg"&&(n=!0),s!=null){for(u=0;u<s.length;u++)if((h=s[u])&&"setAttribute"in h==!!_&&(_?h.localName===_:h.nodeType===3)){i=h,s[u]=null;break}}if(i==null){if(_===null)return document.createTextNode(x);i=n?document.createElementNS("http://www.w3.org/2000/svg",_):document.createElement(_,x.is&&x),s=null,l=!1}if(_===null)b===x||l&&i.data===x||(i.data=x);else{if(s=s&&Mf.call(i.childNodes),b=t.props||_u,!l&&s!=null)for(b={},u=0;u<i.attributes.length;u++)b[(h=i.attributes[u]).name]=h.value;for(u in b)h=b[u],u=="children"||(u=="dangerouslySetInnerHTML"?c=h:u==="key"||u in x||ho(i,u,null,h,n));for(u in x)h=x[u],u=="children"?p=h:u=="dangerouslySetInnerHTML"?d=h:u=="value"?g=h:u=="checked"?m=h:u==="key"||l&&typeof h!="function"||b[u]===h||ho(i,u,h,b[u],n);if(d)l||c&&(d.__html===c.__html||d.__html===i.innerHTML)||(i.innerHTML=d.__html),e.__k=[];else if(c&&(i.innerHTML=""),jf(i,zu(p)?p:[p],e,t,r,n&&_!=="foreignObject",s,o,s?s[0]:t.__k&&_r(t,0),l,a),s!=null)for(u=s.length;u--;)s[u]!=null&&Ff(s[u]);l||(u="value",g!==void 0&&(g!==i[u]||_==="progress"&&!g||_==="option"&&g!==b[u])&&ho(i,u,g,b[u],!1),u="checked",m!==void 0&&m!==i[u]&&ho(i,u,m,b[u],!1))}return i}function Wu(i,e,t){try{typeof i=="function"?i(e):i.current=e}catch(r){ae.__e(r,t)}}function wu(i,e,t){var r,n;if(ae.unmount&&ae.unmount(i),(r=i.ref)&&(r.current&&r.current!==i.__e||Wu(r,null,e)),(r=i.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){ae.__e(s,e)}r.base=r.__P=null,i.__c=void 0}if(r=i.__k)for(n=0;n<r.length;n++)r[n]&&wu(r[n],e,t||typeof i.type!="function");t||i.__e==null||Ff(i.__e),i.__=i.__e=i.__d=void 0}function dm(i,e,t){return this.constructor(i,t)}Mf=Lf.slice,ae={__e:function(i,e,t,r){for(var n,s,o;e=e.__;)if((n=e.__c)&&!n.__)try{if((s=n.constructor)&&s.getDerivedStateFromError!=null&&(n.setState(s.getDerivedStateFromError(i)),o=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(i,r||{}),o=n.__d),o)return n.__E=n}catch(l){i=l}throw i}},Pf=0,yo.prototype.setState=function(i,e){var t;t=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Gt({},this.state),typeof i=="function"&&(i=i(Gt({},t),this.props)),i&&Gt(t,i),i!=null&&this.__v&&(e&&this._sb.push(e),bu(this))},yo.prototype.forceUpdate=function(i){this.__v&&(this.__e=!0,i&&this.__h.push(i),bu(this))},yo.prototype.render=Vu,xi=[],Rf=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,yu=function(i,e){return i.__v.__b-e.__v.__b},Oo.__r=0,Of=0;(function(i,e){var t={__c:e="__cC"+Of++,__:i,Consumer:function(r,n){return r.children(n)},Provider:function(r){var n,s;return this.getChildContext||(n=[],(s={})[e]=this,this.getChildContext=function(){return s},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&n.some(function(l){l.__e=!0,bu(l)})},this.sub=function(o){n.push(o);var l=o.componentWillUnmount;o.componentWillUnmount=function(){n.splice(n.indexOf(o),1),l&&l.call(o)}}),r.children}};t.Provider.__=t.Consumer.contextType=t})({isPreviewMode:!1,previewPageIndex:0,handleCloseSurveyPopup:()=>{},isPopup:!0,onPreviewSubmit:()=>{}});var gn=Fe("[Surveys]"),pm={icontains:i=>!!v&&v.location.href.toLowerCase().indexOf(i.toLowerCase())>-1,not_icontains:i=>!!v&&v.location.href.toLowerCase().indexOf(i.toLowerCase())===-1,regex:i=>!!v&&gr(v.location.href,i),not_regex:i=>!!v&&!gr(v.location.href,i),exact:i=>v?.location.href===i,is_not:i=>v?.location.href!==i},xu=class{constructor(e){this.instance=e,this._surveyEventReceiver=null}onRemoteConfig(e){this._decideServerResponse=!!e.surveys,this.loadIfEnabled()}reset(){localStorage.removeItem("lastSeenSurveyDate");var e=(()=>{for(var t=[],r=0;r<localStorage.length;r++){var n=localStorage.key(r);n!=null&&n.startsWith("seenSurvey_")&&t.push(n)}return t})();e.forEach(t=>localStorage.removeItem(t))}loadIfEnabled(){var e,t,r,n=H==null||(e=H.__PosthogExtensions__)===null||e===void 0?void 0:e.generateSurveys;this.instance.config.disable_surveys||!this._decideServerResponse||n||(this._surveyEventReceiver==null&&(this._surveyEventReceiver=new Tn(this.instance)),(t=H.__PosthogExtensions__)===null||t===void 0||(r=t.loadExternalDependency)===null||r===void 0||r.call(t,this.instance,"surveys",s=>{var o,l;if(s)return gn.error("Could not load surveys script",s);this._surveyManager=(o=H.__PosthogExtensions__)===null||o===void 0||(l=o.generateSurveys)===null||l===void 0?void 0:l.call(o,this.instance)}))}getSurveys(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(this.instance.config.disable_surveys)return e([]);this._surveyEventReceiver==null&&(this._surveyEventReceiver=new Tn(this.instance));var r=this.instance.get_property(jl);if(r&&!t)return e(r);this.instance._send_request({url:this.instance.requestRouter.endpointFor("api","/api/surveys/?token=".concat(this.instance.config.token)),method:"GET",callback:n=>{var s;if(n.statusCode!==200||!n.json)return e([]);var o,l=n.json.surveys||[],a=l.filter(u=>{var d,c,p,h,g,m,b,x,_,k,S,R;return((d=u.conditions)===null||d===void 0?void 0:d.events)&&((c=u.conditions)===null||c===void 0||(p=c.events)===null||p===void 0?void 0:p.values)&&((h=u.conditions)===null||h===void 0||(g=h.events)===null||g===void 0||(m=g.values)===null||m===void 0?void 0:m.length)>0||((b=u.conditions)===null||b===void 0?void 0:b.actions)&&((x=u.conditions)===null||x===void 0||(_=x.actions)===null||_===void 0?void 0:_.values)&&((k=u.conditions)===null||k===void 0||(S=k.actions)===null||S===void 0||(R=S.values)===null||R===void 0?void 0:R.length)>0});return a.length>0&&((o=this._surveyEventReceiver)===null||o===void 0||o.register(a)),(s=this.instance.persistence)===null||s===void 0||s.register({[jl]:l}),e(l)}})}getActiveMatchingSurveys(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.getSurveys(r=>{var n,s=r.filter(a=>!(!a.start_date||a.end_date)).filter(a=>{var u,d,c,p;if(!a.conditions)return!0;var h=(u=a.conditions)===null||u===void 0||!u.url||pm[(d=(c=a.conditions)===null||c===void 0?void 0:c.urlMatchType)!==null&&d!==void 0?d:"icontains"](a.conditions.url),g=(p=a.conditions)===null||p===void 0||!p.selector||L?.querySelector(a.conditions.selector);return h&&g}),o=(n=this._surveyEventReceiver)===null||n===void 0?void 0:n.getSurveys(),l=s.filter(a=>{var u,d,c,p,h,g,m,b,x,_,k;if(!(a.linked_flag_key||a.targeting_flag_key||a.internal_targeting_flag_key||(u=a.feature_flag_keys)!==null&&u!==void 0&&u.length))return!0;var S=!a.linked_flag_key||this.instance.featureFlags.isFeatureEnabled(a.linked_flag_key),R=!a.targeting_flag_key||this.instance.featureFlags.isFeatureEnabled(a.targeting_flag_key),B=((d=a.conditions)===null||d===void 0?void 0:d.events)&&((c=a.conditions)===null||c===void 0||(p=c.events)===null||p===void 0?void 0:p.values)&&((h=a.conditions)===null||h===void 0||(g=h.events)===null||g===void 0?void 0:g.values.length)>0,U=((m=a.conditions)===null||m===void 0?void 0:m.actions)&&((b=a.conditions)===null||b===void 0||(x=b.actions)===null||x===void 0?void 0:x.values)&&((_=a.conditions)===null||_===void 0||(k=_.actions)===null||k===void 0?void 0:k.values.length)>0,P=!B&&!U||o?.includes(a.id),q=this._canActivateRepeatedly(a),W=!(a.internal_targeting_flag_key&&!q)||this.instance.featureFlags.isFeatureEnabled(a.internal_targeting_flag_key),xe=this.checkFlags(a);return S&&R&&W&&P&&xe});return e(l)},t)}checkFlags(e){var t;return(t=e.feature_flag_keys)===null||t===void 0||!t.length||e.feature_flag_keys.every(r=>{var{key:n,value:s}=r;return!n||!s||this.instance.featureFlags.isFeatureEnabled(s)})}getNextSurveyStep(e,t,r){var n,s=e.questions[t],o=t+1;if((n=s.branching)===null||n===void 0||!n.type)return t===e.questions.length-1?st.End:o;if(s.branching.type===st.End)return st.End;if(s.branching.type===st.SpecificQuestion){if(Number.isInteger(s.branching.index))return s.branching.index}else if(s.branching.type===st.ResponseBased){if(s.type===Po.SingleChoice){var l,a,u=s.choices.indexOf("".concat(r));if((l=s.branching)!==null&&l!==void 0&&(a=l.responseValues)!==null&&a!==void 0&&a.hasOwnProperty(u)){var d=s.branching.responseValues[u];return Number.isInteger(d)?d:d===st.End?st.End:o}}else if(s.type===Po.Rating){var c,p;if(typeof r!="number"||!Number.isInteger(r))throw new Error("The response type must be an integer");var h=function(m,b){if(b===3){if(m<1||m>3)throw new Error("The response must be in range 1-3");return m===1?"negative":m===2?"neutral":"positive"}if(b===5){if(m<1||m>5)throw new Error("The response must be in range 1-5");return m<=2?"negative":m===3?"neutral":"positive"}if(b===7){if(m<1||m>7)throw new Error("The response must be in range 1-7");return m<=3?"negative":m===4?"neutral":"positive"}if(b===10){if(m<0||m>10)throw new Error("The response must be in range 0-10");return m<=6?"detractors":m<=8?"passives":"promoters"}throw new Error("The scale must be one of: 3, 5, 7, 10")}(r,s.scale);if((c=s.branching)!==null&&c!==void 0&&(p=c.responseValues)!==null&&p!==void 0&&p.hasOwnProperty(h)){var g=s.branching.responseValues[h];return Number.isInteger(g)?g:g===st.End?st.End:o}}return o}return gn.warn("Falling back to next question index due to unexpected branching type"),o}_canActivateRepeatedly(e){var t;return Y((t=H.__PosthogExtensions__)===null||t===void 0?void 0:t.canActivateRepeatedly)?(gn.warn("init was not called"),!1):H.__PosthogExtensions__.canActivateRepeatedly(e)}canRenderSurvey(e){Y(this._surveyManager)?gn.warn("init was not called"):this.getSurveys(t=>{var r=t.filter(n=>n.id===e)[0];this._surveyManager.canRenderSurvey(r)})}renderSurvey(e,t){Y(this._surveyManager)?gn.warn("init was not called"):this.getSurveys(r=>{var n=r.filter(s=>s.id===e)[0];this._surveyManager.renderSurvey(n,L?.querySelector(t))})}},Rh=Fe("[RateLimiter]"),ku=class{constructor(e){var t,r;A(this,"serverLimits",{}),A(this,"lastEventRateLimited",!1),A(this,"checkForLimiting",n=>{var s=n.text;if(s&&s.length)try{(JSON.parse(s).quota_limited||[]).forEach(o=>{Rh.info("".concat(o||"events"," is quota limited.")),this.serverLimits[o]=new Date().getTime()+6e4})}catch(o){return void Rh.warn('could not rate limit - continuing. Error: "'.concat(o?.message,'"'),{text:s})}}),this.instance=e,this.captureEventsPerSecond=((t=e.config.rate_limiting)===null||t===void 0?void 0:t.events_per_second)||10,this.captureEventsBurstLimit=Math.max(((r=e.config.rate_limiting)===null||r===void 0?void 0:r.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond),this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}clientRateLimitContext(){var e,t,r,n=arguments.length>0&&arguments[0]!==void 0&&arguments[0],s=new Date().getTime(),o=(e=(t=this.instance.persistence)===null||t===void 0?void 0:t.get_property(Ul))!==null&&e!==void 0?e:{tokens:this.captureEventsBurstLimit,last:s};o.tokens+=(s-o.last)/1e3*this.captureEventsPerSecond,o.last=s,o.tokens>this.captureEventsBurstLimit&&(o.tokens=this.captureEventsBurstLimit);var l=o.tokens<1;return l||n||(o.tokens=Math.max(0,o.tokens-1)),!l||this.lastEventRateLimited||n||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to ".concat(this.captureEventsPerSecond," events per second and ").concat(this.captureEventsBurstLimit," events burst limit.")},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=l,(r=this.instance.persistence)===null||r===void 0||r.set_property(Ul,o),{isRateLimited:l,remainingTokens:o.tokens}}isServerRateLimited(e){var t=this.serverLimits[e||"events"]||!1;return t!==!1&&new Date().getTime()<t}},hm=()=>C({initialPathName:qe?.pathname||"",referringDomain:oe.referringDomain()},oe.campaignParams()),Cu=class{constructor(e,t,r){A(this,"_onSessionIdCallback",n=>{var s=this._getStoredProps();if(!s||s.sessionId!==n){var o={sessionId:n,props:this._sessionSourceParamGenerator()};this._persistence.register({[Nl]:o})}}),this._sessionIdManager=e,this._persistence=t,this._sessionSourceParamGenerator=r||hm,this._sessionIdManager.onSessionId(this._onSessionIdCallback)}_getStoredProps(){return this._persistence.props[Nl]}getSessionProps(){var e,t=(e=this._getStoredProps())===null||e===void 0?void 0:e.props;return t?{$client_session_initial_referring_host:t.referringDomain,$client_session_initial_pathname:t.initialPathName,$client_session_initial_utm_source:t.utm_source,$client_session_initial_utm_campaign:t.utm_campaign,$client_session_initial_utm_medium:t.utm_medium,$client_session_initial_utm_content:t.utm_content,$client_session_initial_utm_term:t.utm_term}:{}}},fm=["ahrefsbot","ahrefssiteaudit","applebot","baiduspider","bingbot","bingpreview","bot.htm","bot.php","crawler","deepscan","duckduckbot","facebookexternal","facebookcatalog","gptbot","http://yandex.com/bots","hubspot","ia_archiver","linkedinbot","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","semrushbot","sitebulb","slurp","turnitin","twitterbot","vercelbot","yahoo! slurp","yandexbot","headlesschrome","cypress","Google-HotelAdsVerifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google","Bytespider;"],Oh=function(i,e){if(!i)return!1;var t=i.toLowerCase();return fm.concat(e||[]).some(r=>{var n=r.toLowerCase();return t.indexOf(n)!==-1})},qf=function(i,e){if(!i)return!1;var t=i.userAgent;if(t&&Oh(t,e))return!0;try{var r=i?.userAgentData;if(r!=null&&r.brands&&r.brands.some(n=>Oh(n?.brand,e)))return!0}catch{}return!!i.webdriver},Lo=class{constructor(){this.clicks=[]}isRageClick(e,t,r){var n=this.clicks[this.clicks.length-1];if(n&&Math.abs(e-n.x)+Math.abs(t-n.y)<30&&r-n.timestamp<1e3){if(this.clicks.push({x:e,y:t,timestamp:r}),this.clicks.length===3)return!0}else this.clicks=[{x:e,y:t,timestamp:r}];return!1}},fo=Fe("[Dead Clicks]"),gm=()=>!0,mm=i=>{var e,t=!((e=i.instance.persistence)===null||e===void 0||!e.get_property(Zh)),r=i.instance.config.capture_dead_clicks;return ki(r)?r:t},Fo=class{get lazyLoadedDeadClicksAutocapture(){return this._lazyLoadedDeadClicksAutocapture}constructor(e,t,r){this.instance=e,this.isEnabled=t,this.onCapture=r,this.startIfEnabled()}onRemoteConfig(e){this.instance.persistence&&this.instance.persistence.register({[Zh]:e?.captureDeadClicks}),this.startIfEnabled()}startIfEnabled(){this.isEnabled(this)&&this.loadScript(()=>{this.start()})}loadScript(e){var t,r,n;(t=H.__PosthogExtensions__)!==null&&t!==void 0&&t.initDeadClicksAutocapture&&e(),(r=H.__PosthogExtensions__)===null||r===void 0||(n=r.loadExternalDependency)===null||n===void 0||n.call(r,this.instance,"dead-clicks-autocapture",s=>{s?fo.error("failed to load script",s):e()})}start(){var e;if(L){if(!this._lazyLoadedDeadClicksAutocapture&&(e=H.__PosthogExtensions__)!==null&&e!==void 0&&e.initDeadClicksAutocapture){var t=ce(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};t.__onCapture=this.onCapture,this._lazyLoadedDeadClicksAutocapture=H.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this._lazyLoadedDeadClicksAutocapture.start(L),fo.info("starting...")}}else fo.error("`document` not found. Cannot start.")}stop(){this._lazyLoadedDeadClicksAutocapture&&(this._lazyLoadedDeadClicksAutocapture.stop(),this._lazyLoadedDeadClicksAutocapture=void 0,fo.info("stopping..."))}},vm=Fe("[Heatmaps]");function Lh(i){return ce(i)&&"clientX"in i&&"clientY"in i&&Oe(i.clientX)&&Oe(i.clientY)}var Su=class{constructor(e){var t;A(this,"rageclicks",new Lo),A(this,"_enabledServerSide",!1),A(this,"_initialized",!1),A(this,"_flushInterval",null),this.instance=e,this._enabledServerSide=!((t=this.instance.persistence)===null||t===void 0||!t.props[Fl]),v?.addEventListener("beforeunload",()=>{this.flush()})}get flushIntervalMilliseconds(){var e=5e3;return ce(this.instance.config.capture_heatmaps)&&this.instance.config.capture_heatmaps.flush_interval_milliseconds&&(e=this.instance.config.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return F(this.instance.config.capture_heatmaps)?F(this.instance.config.enable_heatmaps)?this._enabledServerSide:this.instance.config.enable_heatmaps:this.instance.config.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this._initialized)return;vm.info("starting..."),this._setupListeners(),this._flushInterval=setInterval(this.flush.bind(this),this.flushIntervalMilliseconds)}else{var e,t;clearInterval((e=this._flushInterval)!==null&&e!==void 0?e:void 0),(t=this.deadClicksCapture)===null||t===void 0||t.stop(),this.getAndClearBuffer()}}onRemoteConfig(e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[Fl]:t}),this._enabledServerSide=t,this.startIfEnabled()}getAndClearBuffer(){var e=this.buffer;return this.buffer=void 0,e}_onDeadClick(e){this._onClick(e.originalEvent,"deadclick")}_setupListeners(){v&&L&&(At(L,"click",e=>this._onClick(e||v?.event),!1,!0),At(L,"mousemove",e=>this._onMouseMove(e||v?.event),!1,!0),this.deadClicksCapture=new Fo(this.instance,gm,this._onDeadClick.bind(this)),this.deadClicksCapture.startIfEnabled(),this._initialized=!0)}_getProperties(e,t){var r=this.instance.scrollManager.scrollY(),n=this.instance.scrollManager.scrollX(),s=this.instance.scrollManager.scrollElement(),o=function(l,a,u){for(var d=l;d&&Uo(d)&&!Zt(d,"body");){if(d===u)return!1;if(V(a,v?.getComputedStyle(d).position))return!0;d=vf(d)}return!1}(mf(e),["fixed","sticky"],s);return{x:e.clientX+(o?0:n),y:e.clientY+(o?0:r),target_fixed:o,type:t}}_onClick(e){var t,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"click";if(!ph(e.target)&&Lh(e)){var n=this._getProperties(e,r);(t=this.rageclicks)!==null&&t!==void 0&&t.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this._capture(C(C({},n),{},{type:"rageclick"})),this._capture(n)}}_onMouseMove(e){!ph(e.target)&&Lh(e)&&(clearTimeout(this._mouseMoveTimeout),this._mouseMoveTimeout=setTimeout(()=>{this._capture(this._getProperties(e,"mousemove"))},500))}_capture(e){if(v){var t=v.location.href;this.buffer=this.buffer||{},this.buffer[t]||(this.buffer[t]=[]),this.buffer[t].push(e)}}flush(){this.buffer&&!ur(this.buffer)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},Eu=class{constructor(e){A(this,"_updateScrollData",()=>{var t,r,n,s;this.context||(this.context={});var o=this.scrollElement(),l=this.scrollY(),a=o?Math.max(0,o.scrollHeight-o.clientHeight):0,u=l+(o?.clientHeight||0),d=o?.scrollHeight||0;this.context.lastScrollY=Math.ceil(l),this.context.maxScrollY=Math.max(l,(t=this.context.maxScrollY)!==null&&t!==void 0?t:0),this.context.maxScrollHeight=Math.max(a,(r=this.context.maxScrollHeight)!==null&&r!==void 0?r:0),this.context.lastContentY=u,this.context.maxContentY=Math.max(u,(n=this.context.maxContentY)!==null&&n!==void 0?n:0),this.context.maxContentHeight=Math.max(d,(s=this.context.maxContentHeight)!==null&&s!==void 0?s:0)}),this.instance=e}getContext(){return this.context}resetContext(){var e=this.context;return setTimeout(this._updateScrollData,0),e}startMeasuringScrollPosition(){v?.addEventListener("scroll",this._updateScrollData,!0),v?.addEventListener("scrollend",this._updateScrollData,!0),v?.addEventListener("resize",this._updateScrollData)}scrollElement(){if(!this.instance.config.scroll_root_selector)return v?.document.documentElement;var e=fe(this.instance.config.scroll_root_selector)?this.instance.config.scroll_root_selector:[this.instance.config.scroll_root_selector];for(var t of e){var r=v?.document.querySelector(t);if(r)return r}}scrollY(){if(this.instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollTop||0}return v&&(v.scrollY||v.pageYOffset||v.document.documentElement.scrollTop)||0}scrollX(){if(this.instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollLeft||0}return v&&(v.scrollX||v.pageXOffset||v.document.documentElement.scrollLeft)||0}},Fh=Fe("[AutoCapture]");function Pl(i,e){return e.length>i?e.slice(0,i)+"...":e}function ym(i){if(i.previousElementSibling)return i.previousElementSibling;var e=i;do e=e.previousSibling;while(e&&!Uo(e));return e}function _m(i,e,t,r){var n=i.tagName.toLowerCase(),s={tag_name:n};Yl.indexOf(n)>-1&&!t&&(n.toLowerCase()==="a"||n.toLowerCase()==="button"?s.$el_text=Pl(1024,wf(i)):s.$el_text=Pl(1024,qo(i)));var o=Io(i);o.length>0&&(s.classes=o.filter(function(d){return d!==""})),K(i.attributes,function(d){var c;if((!yf(i)||["name","id","class","aria-label"].indexOf(d.name)!==-1)&&(r==null||!r.includes(d.name))&&!e&&vr(d.value)&&(c=d.name,!Se(c)||c.substring(0,10)!=="_ngcontent"&&c.substring(0,7)!=="_nghost")){var p=d.value;d.name==="class"&&(p=qu(p).join(" ")),s["attr__"+d.name]=Pl(1024,p)}});for(var l=1,a=1,u=i;u=ym(u);)l++,u.tagName===i.tagName&&a++;return s.nth_child=l,s.nth_of_type=a,s}function bm(i,e){for(var t,r,{e:n,maskAllElementAttributes:s,maskAllText:o,elementAttributeIgnoreList:l,elementsChainAsString:a}=e,u=[i],d=i;d.parentNode&&!Zt(d,"body");)ff(d.parentNode)?(u.push(d.parentNode.host),d=d.parentNode.host):(u.push(d.parentNode),d=d.parentNode);var c,p=[],h={},g=!1,m=!1;if(K(u,S=>{var R=Ql(S);S.tagName.toLowerCase()==="a"&&(g=S.getAttribute("href"),g=R&&g&&vr(g)&&g),V(Io(S),"ph-no-capture")&&(m=!0),p.push(_m(S,s,o,l));var B=function(U){if(!Ql(U))return{};var P={};return K(U.attributes,function(q){if(q.name&&q.name.indexOf("data-ph-capture-attribute")===0){var W=q.name.replace("data-ph-capture-attribute-",""),xe=q.value;W&&xe&&vr(xe)&&(P[W]=xe)}}),P}(S);Te(h,B)}),m)return{props:{},explicitNoCapture:m};if(o||(i.tagName.toLowerCase()==="a"||i.tagName.toLowerCase()==="button"?p[0].$el_text=wf(i):p[0].$el_text=qo(i)),g){var b,x;p[0].attr__href=g;var _=(b=pr(g))===null||b===void 0?void 0:b.host,k=v==null||(x=v.location)===null||x===void 0?void 0:x.host;_&&k&&_!==k&&(c=g)}return{props:Te({$event_type:n.type,$ce_version:1},a?{}:{$elements:p},{$elements_chain:j1(p)},(t=p[0])!==null&&t!==void 0&&t.$el_text?{$el_text:(r=p[0])===null||r===void 0?void 0:r.$el_text}:{},c&&n.type==="click"?{$external_click_url:c}:{},h)}}var $u=class{constructor(e){A(this,"_initialized",!1),A(this,"_isDisabledServerSide",null),A(this,"rageclicks",new Lo),A(this,"_elementsChainAsString",!1),this.instance=e,this._elementSelectors=null}get config(){var e,t,r=ce(this.instance.config.autocapture)?this.instance.config.autocapture:{};return r.url_allowlist=(e=r.url_allowlist)===null||e===void 0?void 0:e.map(n=>new RegExp(n)),r.url_ignorelist=(t=r.url_ignorelist)===null||t===void 0?void 0:t.map(n=>new RegExp(n)),r}_addDomEventHandlers(){if(this.isBrowserSupported()){if(v&&L){var e=r=>{r=r||v?.event;try{this._captureEvent(r)}catch(n){Fh.error("Failed to capture event",n)}},t=r=>{r=r||v?.event,this._captureEvent(r,xl)};At(L,"submit",e,!1,!0),At(L,"change",e,!1,!0),At(L,"click",e,!1,!0),this.config.capture_copied_text&&(At(L,"copy",t,!1,!0),At(L,"cut",t,!1,!0))}}else Fh.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this._initialized&&(this._addDomEventHandlers(),this._initialized=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this._elementsChainAsString=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[Gp]:!!e.autocapture_opt_out}),this._isDisabledServerSide=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this._elementSelectors=e}getElementSelectors(e){var t,r=[];return(t=this._elementSelectors)===null||t===void 0||t.forEach(n=>{var s=L?.querySelectorAll(n);s?.forEach(o=>{e===o&&r.push(n)})}),r}get isEnabled(){var e,t,r=(e=this.instance.persistence)===null||e===void 0?void 0:e.props[Gp],n=this._isDisabledServerSide;if(Jt(n)&&!ki(r)&&!this.instance.config.advanced_disable_decide)return!1;var s=(t=this._isDisabledServerSide)!==null&&t!==void 0?t:!!r;return!!this.instance.config.autocapture&&!s}_captureEvent(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"$autocapture";if(this.isEnabled){var r,n=mf(e);hf(n)&&(n=n.parentNode||null),t==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&this.instance.config.rageclick&&(r=this.rageclicks)!==null&&r!==void 0&&r.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this._captureEvent(e,"$rageclick");var s=t===xl;if(n&&R1(n,e,this.config,s,s?["copy","cut"]:void 0)){var{props:o,explicitNoCapture:l}=bm(n,{e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.config.element_attribute_ignorelist,elementsChainAsString:this._elementsChainAsString});if(l)return!1;var a=this.getElementSelectors(n);if(a&&a.length>0&&(o.$element_selectors=a),t===xl){var u,d=gf(v==null||(u=v.getSelection())===null||u===void 0?void 0:u.toString()),c=e.type||"clipboard";if(!d)return!1;o.$selected_content=d,o.$copy_type=c}return this.instance.capture(t,o),!0}}}isBrowserSupported(){return Ze(L?.querySelectorAll)}},wm=Fe("[TracingHeaders]"),Iu=class{constructor(e){A(this,"_restoreXHRPatch",void 0),A(this,"_restoreFetchPatch",void 0),A(this,"_startCapturing",()=>{var t,r,n,s;F(this._restoreXHRPatch)&&((t=H.__PosthogExtensions__)===null||t===void 0||(r=t.tracingHeadersPatchFns)===null||r===void 0||r._patchXHR(this.instance.sessionManager)),F(this._restoreFetchPatch)&&((n=H.__PosthogExtensions__)===null||n===void 0||(s=n.tracingHeadersPatchFns)===null||s===void 0||s._patchFetch(this.instance.sessionManager))}),this.instance=e}_loadScript(e){var t,r,n;(t=H.__PosthogExtensions__)!==null&&t!==void 0&&t.tracingHeadersPatchFns&&e(),(r=H.__PosthogExtensions__)===null||r===void 0||(n=r.loadExternalDependency)===null||n===void 0||n.call(r,this.instance,"tracing-headers",s=>{if(s)return wm.error("failed to load script",s);e()})}startIfEnabledOrStop(){var e,t;this.instance.config.__add_tracing_headers?this._loadScript(this._startCapturing):((e=this._restoreXHRPatch)===null||e===void 0||e.call(this),(t=this._restoreFetchPatch)===null||t===void 0||t.call(this),this._restoreXHRPatch=void 0,this._restoreFetchPatch=void 0)}},Vt;(function(i){i[i.PENDING=-1]="PENDING",i[i.DENIED=0]="DENIED",i[i.GRANTED=1]="GRANTED"})(Vt||(Vt={}));var Au=class{constructor(e){this.instance=e}get config(){return this.instance.config}get consent(){return this.getDnt()?Vt.DENIED:this.storedConsent}isOptedOut(){return this.consent===Vt.DENIED||this.consent===Vt.PENDING&&this.config.opt_out_capturing_by_default}isOptedIn(){return!this.isOptedOut()}optInOut(e){this.storage.set(this.storageKey,e?1:0,this.config.cookie_expiration,this.config.cross_subdomain_cookie,this.config.secure_cookie)}reset(){this.storage.remove(this.storageKey,this.config.cross_subdomain_cookie)}get storageKey(){var{token:e,opt_out_capturing_cookie_prefix:t}=this.instance.config;return(t||"__ph_opt_in_out_")+e}get storedConsent(){var e=this.storage.get(this.storageKey);return e==="1"?Vt.GRANTED:e==="0"?Vt.DENIED:Vt.PENDING}get storage(){if(!this._storage){var e=this.config.opt_out_capturing_persistence_type;this._storage=e==="localStorage"?ve:Tt;var t=e==="localStorage"?Tt:ve;t.get(this.storageKey)&&(this._storage.get(this.storageKey)||this.optInOut(t.get(this.storageKey)==="1"),t.remove(this.storageKey,this.config.cross_subdomain_cookie))}return this._storage}getDnt(){return!!this.config.respect_dnt&&!!Wh([Ge?.doNotTrack,Ge?.msDoNotTrack,H.doNotTrack],e=>V([!0,1,"1","yes"],e))}},go=Fe("[ExceptionAutocapture]"),Tu=class{constructor(e){var t;A(this,"originalOnUnhandledRejectionHandler",void 0),A(this,"startCapturing",()=>{var r,n,s,o;if(v&&this.isEnabled&&!this.hasHandlers&&!this.isCapturing){var l=(r=H.__PosthogExtensions__)===null||r===void 0||(n=r.errorWrappingFunctions)===null||n===void 0?void 0:n.wrapOnError,a=(s=H.__PosthogExtensions__)===null||s===void 0||(o=s.errorWrappingFunctions)===null||o===void 0?void 0:o.wrapUnhandledRejection;if(l&&a)try{this.unwrapOnError=l(this.captureException.bind(this)),this.unwrapUnhandledRejection=a(this.captureException.bind(this))}catch(u){go.error("failed to start",u),this.stopCapturing()}else go.error("failed to load error wrapping functions - cannot start")}}),this.instance=e,this.remoteEnabled=!((t=this.instance.persistence)===null||t===void 0||!t.props[Zp]),this.startIfEnabled()}get isEnabled(){var e;return(e=this.remoteEnabled)!==null&&e!==void 0&&e}get isCapturing(){var e;return!(v==null||(e=v.onerror)===null||e===void 0||!e.__POSTHOG_INSTRUMENTED__)}get hasHandlers(){return this.originalOnUnhandledRejectionHandler||this.unwrapOnError}startIfEnabled(){this.isEnabled&&!this.isCapturing&&(go.info("enabled, starting..."),this.loadScript(this.startCapturing))}loadScript(e){var t,r;this.hasHandlers&&e(),(t=H.__PosthogExtensions__)===null||t===void 0||(r=t.loadExternalDependency)===null||r===void 0||r.call(t,this.instance,"exception-autocapture",n=>{if(n)return go.error("failed to load script",n);e()})}stopCapturing(){var e,t;(e=this.unwrapOnError)===null||e===void 0||e.call(this),(t=this.unwrapUnhandledRejection)===null||t===void 0||t.call(this)}onRemoteConfig(e){var t=e.autocaptureExceptions;this.remoteEnabled=!!t||!1,this.instance.persistence&&this.instance.persistence.register({[Zp]:this.remoteEnabled}),this.startIfEnabled()}captureException(e){var t=this.instance.requestRouter.endpointFor("ui");e.$exception_personURL="".concat(t,"/project/").concat(this.instance.config.token,"/person/").concat(this.instance.get_distinct_id()),this.instance.exceptions.sendExceptionEvent(e)}},_i=Fe("[Web Vitals]"),Dh=9e5,Mu=class{constructor(e){var t;A(this,"_enabledServerSide",!1),A(this,"_initialized",!1),A(this,"buffer",{url:void 0,metrics:[],firstMetricTimestamp:void 0}),A(this,"_flushToCapture",()=>{clearTimeout(this._delayedFlushTimer),this.buffer.metrics.length!==0&&(this.instance.capture("$web_vitals",this.buffer.metrics.reduce((r,n)=>C(C({},r),{},{["$web_vitals_".concat(n.name,"_event")]:C({},n),["$web_vitals_".concat(n.name,"_value")]:n.value}),{})),this.buffer={url:void 0,metrics:[],firstMetricTimestamp:void 0})}),A(this,"_addToBuffer",r=>{var n,s=(n=this.instance.sessionManager)===null||n===void 0?void 0:n.checkAndGetSessionAndWindowId(!0);if(F(s))_i.error("Could not read session ID. Dropping metrics!");else{this.buffer=this.buffer||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var o=this._currentURL();F(o)||(Y(r?.name)||Y(r?.value)?_i.error("Invalid metric received",r):this._maxAllowedValue&&r.value>=this._maxAllowedValue?_i.error("Ignoring metric with value >= "+this._maxAllowedValue,r):(this.buffer.url!==o&&(this._flushToCapture(),this._delayedFlushTimer=setTimeout(this._flushToCapture,this.flushToCaptureTimeoutMs)),F(this.buffer.url)&&(this.buffer.url=o),this.buffer.firstMetricTimestamp=F(this.buffer.firstMetricTimestamp)?Date.now():this.buffer.firstMetricTimestamp,r.attribution&&r.attribution.interactionTargetElement&&(r.attribution.interactionTargetElement=void 0),this.buffer.metrics.push(C(C({},r),{},{$current_url:o,$session_id:s.sessionId,$window_id:s.windowId,timestamp:Date.now()})),this.buffer.metrics.length===this.allowedMetrics.length&&this._flushToCapture()))}}),A(this,"_startCapturing",()=>{var r,n,s,o,l=H.__PosthogExtensions__;F(l)||F(l.postHogWebVitalsCallbacks)||({onLCP:r,onCLS:n,onFCP:s,onINP:o}=l.postHogWebVitalsCallbacks),r&&n&&s&&o?(this.allowedMetrics.indexOf("LCP")>-1&&r(this._addToBuffer.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&n(this._addToBuffer.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&s(this._addToBuffer.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&o(this._addToBuffer.bind(this)),this._initialized=!0):_i.error("web vitals callbacks not loaded - not starting")}),this.instance=e,this._enabledServerSide=!((t=this.instance.persistence)===null||t===void 0||!t.props[Jp]),this.startIfEnabled()}get allowedMetrics(){var e,t,r=ce(this.instance.config.capture_performance)?(e=this.instance.config.capture_performance)===null||e===void 0?void 0:e.web_vitals_allowed_metrics:void 0;return F(r)?((t=this.instance.persistence)===null||t===void 0?void 0:t.props[Xp])||["CLS","FCP","INP","LCP"]:r}get flushToCaptureTimeoutMs(){return(ce(this.instance.config.capture_performance)?this.instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}get _maxAllowedValue(){var e=ce(this.instance.config.capture_performance)&&Oe(this.instance.config.capture_performance.__web_vitals_max_value)?this.instance.config.capture_performance.__web_vitals_max_value:Dh;return 0<e&&e<=6e4?Dh:e}get isEnabled(){var e=ce(this.instance.config.capture_performance)?this.instance.config.capture_performance.web_vitals:void 0;return ki(e)?e:this._enabledServerSide}startIfEnabled(){this.isEnabled&&!this._initialized&&(_i.info("enabled, starting..."),this.loadScript(this._startCapturing))}onRemoteConfig(e){var t=ce(e.capturePerformance)&&!!e.capturePerformance.web_vitals,r=ce(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this.instance.persistence&&(this.instance.persistence.register({[Jp]:t}),this.instance.persistence.register({[Xp]:r})),this._enabledServerSide=t,this.startIfEnabled()}loadScript(e){var t,r,n;(t=H.__PosthogExtensions__)!==null&&t!==void 0&&t.postHogWebVitalsCallbacks&&e(),(r=H.__PosthogExtensions__)===null||r===void 0||(n=r.loadExternalDependency)===null||n===void 0||n.call(r,this.instance,"web-vitals",s=>{s?_i.error("failed to load script",s):e()})}_currentURL(){var e=v?v.location.href:void 0;return e||_i.error("Could not determine current URL"),e}},xm={icontains:(i,e)=>!!v&&e.href.toLowerCase().indexOf(i.toLowerCase())>-1,not_icontains:(i,e)=>!!v&&e.href.toLowerCase().indexOf(i.toLowerCase())===-1,regex:(i,e)=>!!v&&gr(e.href,i),not_regex:(i,e)=>!!v&&!gr(e.href,i),exact:(i,e)=>e.href===i,is_not:(i,e)=>e.href!==i},Pu=class i{constructor(e){var t=this;A(this,"getWebExperimentsAndEvaluateDisplayLogic",function(){var r=arguments.length>0&&arguments[0]!==void 0&&arguments[0];t.getWebExperiments(n=>{i.logInfo("retrieved web experiments from the server"),t._flagToExperiments=new Map,n.forEach(s=>{if(s.feature_flag_key){var o;t._flagToExperiments&&(i.logInfo("setting flag key ",s.feature_flag_key," to web experiment ",s),(o=t._flagToExperiments)===null||o===void 0||o.set(s.feature_flag_key,s));var l=t.instance.getFeatureFlag(s.feature_flag_key);Se(l)&&s.variants[l]&&t.applyTransforms(s.name,l,s.variants[l].transforms)}else if(s.variants)for(var a in s.variants){var u=s.variants[a];i.matchesTestVariant(u)&&t.applyTransforms(s.name,a,u.transforms)}})},r)}),this.instance=e,this.instance.onFeatureFlags(r=>{this.onFeatureFlags(r)})}onFeatureFlags(e){if(this._is_bot())i.logInfo("Refusing to render web experiment since the viewer is a likely bot");else if(!this.instance.config.disable_web_experiments){if(Y(this._flagToExperiments))return this._flagToExperiments=new Map,this.loadIfEnabled(),void this.previewWebExperiment();i.logInfo("applying feature flags",e),e.forEach(t=>{var r;if(this._flagToExperiments&&(r=this._flagToExperiments)!==null&&r!==void 0&&r.has(t)){var n,s=this.instance.getFeatureFlag(t),o=(n=this._flagToExperiments)===null||n===void 0?void 0:n.get(t);s&&o!=null&&o.variants[s]&&this.applyTransforms(o.name,s,o.variants[s].transforms)}})}}previewWebExperiment(){var e=i.getWindowLocation();if(e!=null&&e.search){var t=Co(e?.search,"__experiment_id"),r=Co(e?.search,"__experiment_variant");t&&r&&(i.logInfo("previewing web experiments ".concat(t," && ").concat(r)),this.getWebExperiments(n=>{this.showPreviewWebExperiment(parseInt(t),r,n)},!1,!0))}}loadIfEnabled(){this.instance.config.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,t,r){if(this.instance.config.disable_web_experiments&&!r)return e([]);var n=this.instance.get_property("$web_experiments");if(n&&!t)return e(n);this.instance._send_request({url:this.instance.requestRouter.endpointFor("api","/api/web_experiments/?token=".concat(this.instance.config.token)),method:"GET",callback:s=>{if(s.statusCode!==200||!s.json)return e([]);var o=s.json.experiments||[];return e(o)}})}showPreviewWebExperiment(e,t,r){var n=r.filter(s=>s.id===e);n&&n.length>0&&(i.logInfo("Previewing web experiment [".concat(n[0].name,"] with variant [").concat(t,"]")),this.applyTransforms(n[0].name,t,n[0].variants[t].transforms,!0))}static matchesTestVariant(e){return!Y(e.conditions)&&i.matchUrlConditions(e)&&i.matchUTMConditions(e)}static matchUrlConditions(e){var t;if(Y(e.conditions)||Y((t=e.conditions)===null||t===void 0?void 0:t.url))return!0;var r,n,s,o=i.getWindowLocation();return!!o&&((r=e.conditions)===null||r===void 0||!r.url||xm[(n=(s=e.conditions)===null||s===void 0?void 0:s.urlMatchType)!==null&&n!==void 0?n:"icontains"](e.conditions.url,o))}static getWindowLocation(){return v?.location}static matchUTMConditions(e){var t;if(Y(e.conditions)||Y((t=e.conditions)===null||t===void 0?void 0:t.utm))return!0;var r=oe.campaignParams();if(r.utm_source){var n,s,o,l,a,u,d,c,p,h,g,m,b,x,_,k,S=(n=e.conditions)===null||n===void 0||(s=n.utm)===null||s===void 0||!s.utm_campaign||((o=e.conditions)===null||o===void 0||(l=o.utm)===null||l===void 0?void 0:l.utm_campaign)==r.utm_campaign,R=(a=e.conditions)===null||a===void 0||(u=a.utm)===null||u===void 0||!u.utm_source||((d=e.conditions)===null||d===void 0||(c=d.utm)===null||c===void 0?void 0:c.utm_source)==r.utm_source,B=(p=e.conditions)===null||p===void 0||(h=p.utm)===null||h===void 0||!h.utm_medium||((g=e.conditions)===null||g===void 0||(m=g.utm)===null||m===void 0?void 0:m.utm_medium)==r.utm_medium,U=(b=e.conditions)===null||b===void 0||(x=b.utm)===null||x===void 0||!x.utm_term||((_=e.conditions)===null||_===void 0||(k=_.utm)===null||k===void 0?void 0:k.utm_term)==r.utm_term;return S&&B&&U&&R}return!1}static logInfo(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];O.info("[WebExperiments] ".concat(e),r)}applyTransforms(e,t,r,n){var s;this._is_bot()?i.logInfo("Refusing to render web experiment since the viewer is a likely bot"):t!=="control"?r.forEach(o=>{if(o.selector){var l;i.logInfo("applying transform of variant ".concat(t," for experiment ").concat(e," "),o);var a,u=0,d=(l=document)===null||l===void 0?void 0:l.querySelectorAll(o.selector);d?.forEach(c=>{var p=c;u+=1,o.attributes&&o.attributes.forEach(h=>{switch(h.name){case"text":p.innerText=h.value;break;case"html":p.innerHTML=h.value;break;case"cssClass":p.className=h.value;break;default:p.setAttribute(h.name,h.value)}}),o.text&&(p.innerText=o.text),o.html&&(p.parentElement?p.parentElement.innerHTML=o.html:p.innerHTML=o.html),o.css&&p.setAttribute("style",o.css)}),this.instance&&this.instance.capture&&this.instance.capture("$web_experiment_applied",{$web_experiment_name:e,$web_experiment_variant:t,$web_experiment_preview:n,$web_experiment_document_url:(a=i.getWindowLocation())===null||a===void 0?void 0:a.href,$web_experiment_elements_modified:u})}}):(i.logInfo("Control variants leave the page unmodified."),this.instance&&this.instance.capture&&this.instance.capture("$web_experiment_applied",{$web_experiment_name:e,$web_experiment_preview:n,$web_experiment_variant:t,$web_experiment_document_url:(s=i.getWindowLocation())===null||s===void 0?void 0:s.href,$web_experiment_elements_modified:0}))}_is_bot(){return Ge&&this.instance?qf(Ge,this.instance.config.custom_blocked_useragents):void 0}},Ru=class{constructor(e){this.instance=e}sendExceptionEvent(e){this.instance.capture("$exception",e,{_noTruncate:!0,_batchKey:"exceptionEvent"})}},km=["$set_once","$set"],bi=Fe("[SiteApps]"),Ou=class{constructor(e){this.instance=e,this.bufferedInvocations=[],this.apps={}}get isEnabled(){return!!this.instance.config.opt_in_site_apps}eventCollector(e,t){if(t){var r=this.globalsForEvent(t);this.bufferedInvocations.push(r),this.bufferedInvocations.length>1e3&&(this.bufferedInvocations=this.bufferedInvocations.slice(10))}}get siteAppLoaders(){var e,t;return(e=H._POSTHOG_REMOTE_CONFIG)===null||e===void 0||(t=e[this.instance.config.token])===null||t===void 0?void 0:t.siteApps}init(){if(this.isEnabled){var e=this.instance._addCaptureHook(this.eventCollector.bind(this));this.stopBuffering=()=>{e(),this.bufferedInvocations=[],this.stopBuffering=void 0}}}globalsForEvent(e){var t,r,n,s,o,l,a;if(!e)throw new Error("Event payload is required");var u={},d=this.instance.get_property("$groups")||[],c=this.instance.get_property("$stored_group_properties")||{};for(var[p,h]of Object.entries(c))u[p]={id:d[p],type:p,properties:h};var{$set_once:g,$set:m}=e;return{event:C(C({},qh(e,km)),{},{properties:C(C(C({},e.properties),m?{$set:C(C({},(t=(r=e.properties)===null||r===void 0?void 0:r.$set)!==null&&t!==void 0?t:{}),m)}:{}),g?{$set_once:C(C({},(n=(s=e.properties)===null||s===void 0?void 0:s.$set_once)!==null&&n!==void 0?n:{}),g)}:{}),elements_chain:(o=(l=e.properties)===null||l===void 0?void 0:l.$elements_chain)!==null&&o!==void 0?o:"",distinct_id:(a=e.properties)===null||a===void 0?void 0:a.distinct_id}),person:{properties:this.instance.get_property("$stored_person_properties")},groups:u}}setupSiteApp(e){var t={id:e.id,loaded:!1,errored:!1};this.apps[e.id]=t;var r=s=>{var o;for(var l of(this.apps[e.id].errored=!s,this.apps[e.id].loaded=!0,bi.info("Site app with id ".concat(e.id," ").concat(s?"loaded":"errored")),s&&this.bufferedInvocations.length&&(bi.info("Processing ".concat(this.bufferedInvocations.length," events for site app with id ").concat(e.id)),this.bufferedInvocations.forEach(a=>{var u;return(u=t.processEvent)===null||u===void 0?void 0:u.call(t,a)})),Object.values(this.apps)))if(!l.loaded)return;(o=this.stopBuffering)===null||o===void 0||o.call(this)};try{var{processEvent:n}=e.init({posthog:this.instance,callback:s=>{r(s)}});n&&(t.processEvent=n)}catch(s){bi.error("Error while initializing PostHog app with config id ".concat(e.id),s),r(!1)}}onCapturedEvent(e){if(Object.keys(this.apps).length!==0){var t=this.globalsForEvent(e);for(var r of Object.values(this.apps))try{var n;(n=r.processEvent)===null||n===void 0||n.call(r,t)}catch(s){bi.error("Error while processing event ".concat(e.event," for site app ").concat(r.id),s)}}}onRemoteConfig(e){var t,r,n,s=this;if((t=this.siteAppLoaders)!==null&&t!==void 0&&t.length){if(!this.isEnabled)return void bi.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');for(var o of this.siteAppLoaders)this.setupSiteApp(o);this.instance.on("eventCaptured",d=>this.onCapturedEvent(d))}else if((r=this.stopBuffering)===null||r===void 0||r.call(this),(n=e.siteApps)!==null&&n!==void 0&&n.length)if(this.isEnabled){var l=function(d,c){var p,h;H["__$$ph_site_app_".concat(d)]=s.instance,(p=H.__PosthogExtensions__)===null||p===void 0||(h=p.loadSiteApp)===null||h===void 0||h.call(p,s.instance,c,g=>{if(g)return bi.error("Error while initializing PostHog app with config id ".concat(d),g)})};for(var{id:a,url:u}of e.siteApps)l(a,u)}else bi.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}},Sn={},Lu=()=>{},lr="posthog",Bf=!rm&&we?.indexOf("MSIE")===-1&&we?.indexOf("Mozilla")===-1,jh=()=>{var i,e,t;return{api_host:"https://us.i.posthog.com",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:(e=L?.location,t=e?.hostname,!!Se(t)&&t.split(".").slice(-2).join(".")!=="herokuapp.com"),persistence:"localStorage+cookie",persistence_name:"",loaded:Lu,store_google:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageview:!0,capture_pageleave:"if_capture_pageview",debug:qe&&Se(qe?.search)&&qe.search.indexOf("__posthog_debug=true")!==-1||!1,verbose:!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,enable_recording_console_log:void 0,secure_cookie:(v==null||(i=v.location)===null||i===void 0?void 0:i.protocol)==="https:",ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0,properties_string_max_length:65535,session_recording:{},mask_all_element_attributes:!1,mask_all_text:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,on_request_error:r=>{var n="Bad HTTP status: "+r.statusCode+" "+r.text;O.error(n)},get_device_id:r=>r,_onCapture:Lu,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"identified_only",__add_tracing_headers:!1,before_send:void 0}},Nh=i=>{var e={};F(i.process_person)||(e.person_profiles=i.process_person),F(i.xhr_headers)||(e.request_headers=i.xhr_headers),F(i.cookie_name)||(e.persistence_name=i.cookie_name),F(i.disable_cookie)||(e.disable_persistence=i.disable_cookie);var t=Te({},e,i);return fe(i.property_blacklist)&&(F(i.property_denylist)?t.property_denylist=i.property_blacklist:fe(i.property_denylist)?t.property_denylist=[...i.property_blacklist,...i.property_denylist]:O.error("Invalid value for property_denylist config: "+i.property_denylist)),t},Fu=class{constructor(){A(this,"__forceAllowLocalhost",!1)}get _forceAllowLocalhost(){return this.__forceAllowLocalhost}set _forceAllowLocalhost(e){O.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}},Do=class i{get decideEndpointWasHit(){var e,t;return(e=(t=this.featureFlags)===null||t===void 0?void 0:t.hasLoadedFlags)!==null&&e!==void 0&&e}constructor(){A(this,"webPerformance",new Fu),A(this,"version",It.LIB_VERSION),A(this,"_internalEventEmitter",new Ro),this.config=jh(),this.SentryIntegration=gu,this.sentryIntegration=e=>function(t,r){var n=Tf(t,r);return{name:Af,processEvent:s=>n(s)}}(this,e),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this._initialPageviewCaptured=!1,this._initialPersonProfilesConfig=null,this.featureFlags=new zl(this),this.toolbar=new cu(this),this.scrollManager=new Eu(this),this.pageViewManager=new mu(this),this.surveys=new xu(this),this.experiments=new Pu(this),this.exceptions=new Ru(this),this.rateLimiter=new ku(this),this.requestRouter=new fu(this),this.consent=new Au(this),this.people={set:(e,t,r)=>{var n=Se(e)?{[e]:t}:e;this.setPersonProperties(n),r?.({})},set_once:(e,t,r)=>{var n=Se(e)?{[e]:t}:e;this.setPersonProperties(void 0,n),r?.({})}},this.on("eventCaptured",e=>O.info('send "'.concat(e?.event,'"'),e))}init(e,t,r){if(r&&r!==lr){var n,s=(n=Sn[r])!==null&&n!==void 0?n:new i;return s._init(e,t,r),Sn[r]=s,Sn[lr][r]=s,s}return this._init(e,t,r)}_init(e){var t,r,n,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0;if(F(e)||Vp(e))return O.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return O.warn("You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},this._triggered_notifs=[],s.person_profiles&&(this._initialPersonProfilesConfig=s.person_profiles),this.set_config(Te({},jh(),Nh(s),{name:o,token:e})),this.config.on_xhr_error&&O.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=s.disable_compression?void 0:pt.GZipJS,this.persistence=new xn(this.config),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new xn(C(C({},this.config),{},{persistence:"sessionStorage"}));var l=C({},this.persistence.props),a=C({},this.sessionPersistence.props);if(this._requestQueue=new du(_=>this._send_retriable_request(_)),this._retryQueue=new pu(this),this.__request_queue=[],this.config.__preview_experimental_cookieless_mode||(this.sessionManager=new hu(this),this.sessionPropsManager=new Cu(this.sessionManager,this.persistence)),new Iu(this).startIfEnabledOrStop(),this.siteApps=new Ou(this),(t=this.siteApps)===null||t===void 0||t.init(),this.config.__preview_experimental_cookieless_mode||(this.sessionRecording=new lu(this),this.sessionRecording.startIfEnabledOrStop()),this.config.disable_scroll_properties||this.scrollManager.startMeasuringScrollPosition(),this.autocapture=new $u(this),this.autocapture.startIfEnabled(),this.surveys.loadIfEnabled(),this.heatmaps=new Su(this),this.heatmaps.startIfEnabled(),this.webVitalsAutocapture=new Mu(this),this.exceptionObserver=new Tu(this),this.exceptionObserver.startIfEnabled(),this.deadClicksAutocapture=new Fo(this,mm),this.deadClicksAutocapture.startIfEnabled(),It.DEBUG=It.DEBUG||this.config.debug,It.DEBUG&&O.info("Starting in debug mode",{this:this,config:s,thisC:C({},this.config),p:l,s:a}),this._sync_opt_out_with_persistence(),((r=s.bootstrap)===null||r===void 0?void 0:r.distinctID)!==void 0){var u,d,c=this.config.get_device_id(Wt()),p=(u=s.bootstrap)!==null&&u!==void 0&&u.isIdentifiedID?c:s.bootstrap.distinctID;this.persistence.set_property(St,(d=s.bootstrap)!==null&&d!==void 0&&d.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:s.bootstrap.distinctID,$device_id:p})}if(this._hasBootstrappedFeatureFlags()){var h,g,m=Object.keys(((h=s.bootstrap)===null||h===void 0?void 0:h.featureFlags)||{}).filter(_=>{var k,S;return!((k=s.bootstrap)===null||k===void 0||(S=k.featureFlags)===null||S===void 0||!S[_])}).reduce((_,k)=>{var S,R;return _[k]=((S=s.bootstrap)===null||S===void 0||(R=S.featureFlags)===null||R===void 0?void 0:R[k])||!1,_},{}),b=Object.keys(((g=s.bootstrap)===null||g===void 0?void 0:g.featureFlagPayloads)||{}).filter(_=>m[_]).reduce((_,k)=>{var S,R,B,U;return(S=s.bootstrap)!==null&&S!==void 0&&(R=S.featureFlagPayloads)!==null&&R!==void 0&&R[k]&&(_[k]=(B=s.bootstrap)===null||B===void 0||(U=B.featureFlagPayloads)===null||U===void 0?void 0:U[k]),_},{});this.featureFlags.receivedFeatureFlags({featureFlags:m,featureFlagPayloads:b})}if(this.config.__preview_experimental_cookieless_mode)this.register_once({distinct_id:rh,$device_id:null},"");else if(!this.get_distinct_id()){var x=this.config.get_device_id(Wt());this.register_once({distinct_id:x,$device_id:x},""),this.persistence.set_property(St,"anonymous")}return v==null||(n=v.addEventListener)===null||n===void 0||n.call(v,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this)),this.toolbar.maybeLoadToolbar(),s.segment?sm(this,()=>this._loaded()):this._loaded(),Ze(this.config._onCapture)&&this.config._onCapture!==Lu&&(O.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",_=>this.config._onCapture(_.event,_))),this}_onRemoteConfig(e){var t,r,n,s,o,l,a,u,d;if(!L||!L.body)return O.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(()=>{this._onRemoteConfig(e)},500);this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=V(e.supportedCompression,pt.GZipJS)?pt.GZipJS:V(e.supportedCompression,pt.Base64)?pt.Base64:void 0),(t=e.analytics)!==null&&t!==void 0&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this._initialPersonProfilesConfig?this._initialPersonProfilesConfig:e.defaultIdentifiedOnly?"identified_only":"always"}),(r=this.siteApps)===null||r===void 0||r.onRemoteConfig(e),(n=this.sessionRecording)===null||n===void 0||n.onRemoteConfig(e),(s=this.autocapture)===null||s===void 0||s.onRemoteConfig(e),(o=this.heatmaps)===null||o===void 0||o.onRemoteConfig(e),(l=this.surveys)===null||l===void 0||l.onRemoteConfig(e),(a=this.webVitalsAutocapture)===null||a===void 0||a.onRemoteConfig(e),(u=this.exceptionObserver)===null||u===void 0||u.onRemoteConfig(e),(d=this.deadClicksAutocapture)===null||d===void 0||d.onRemoteConfig(e)}_loaded(){try{this.config.loaded(this)}catch(e){O.critical("`loaded` function failed",e)}this._start_queue_if_opted_in(),this.config.capture_pageview&&setTimeout(()=>{this.consent.isOptedIn()&&this._captureInitialPageview()},1),new uu(this).load(),this.featureFlags.decide()}_start_queue_if_opted_in(){var e;this.has_opted_out_capturing()||this.config.request_batching&&((e=this._requestQueue)===null||e===void 0||e.enable())}_dom_loaded(){this.has_opted_out_capturing()||dr(this.__request_queue,e=>this._send_retriable_request(e)),this.__request_queue=[],this._start_queue_if_opted_in()}_handle_unload(){var e,t;this.config.request_batching?(this._shouldCapturePageleave()&&this.capture("$pageleave"),(e=this._requestQueue)===null||e===void 0||e.unload(),(t=this._retryQueue)===null||t===void 0||t.unload()):this._shouldCapturePageleave()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}_send_request(e){this.__loaded&&(Bf?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=Mo(e.url,{ip:this.config.ip?1:0}),e.headers=C({},this.config.request_headers),e.compression=e.compression==="best-available"?this.compression:e.compression,e.fetchOptions=e.fetchOptions||this.config.fetch_options,(t=>{var r,n,s,o=C({},t);o.timeout=o.timeout||6e4,o.url=Mo(o.url,{_:new Date().getTime().toString(),ver:It.LIB_VERSION,compression:o.compression});var l=(r=o.transport)!==null&&r!==void 0?r:"fetch",a=(n=(s=Wh(Cn,u=>u.transport===l))===null||s===void 0?void 0:s.method)!==null&&n!==void 0?n:Cn[0].method;if(!a)throw new Error("No available transport method");a(o)})(C(C({},e),{},{callback:t=>{var r,n,s;this.rateLimiter.checkForLimiting(t),t.statusCode>=400&&((n=(s=this.config).on_request_error)===null||n===void 0||n.call(s,t)),(r=e.callback)===null||r===void 0||r.call(e,t)}}))))}_send_retriable_request(e){this._retryQueue?this._retryQueue.retriableRequest(e):this._send_request(e)}_execute_array(e){var t,r=[],n=[],s=[];dr(e,l=>{l&&(t=l[0],fe(t)?s.push(l):Ze(l)?l.call(this):fe(l)&&t==="alias"?r.push(l):fe(l)&&t.indexOf("capture")!==-1&&Ze(this[t])?s.push(l):n.push(l))});var o=function(l,a){dr(l,function(u){if(fe(u[0])){var d=a;K(u,function(c){d=d[c[0]].apply(d,c.slice(1))})}else this[u[0]].apply(this,u.slice(1))},a)};o(r,this),o(n,this),o(s,this)}_hasBootstrappedFeatureFlags(){var e,t;return((e=this.config.bootstrap)===null||e===void 0?void 0:e.featureFlags)&&Object.keys((t=this.config.bootstrap)===null||t===void 0?void 0:t.featureFlags).length>0||!1}push(e){this._execute_array([e])}capture(e,t,r){var n;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this._requestQueue){if(!this.consent.isOptedOut())if(!F(e)&&Se(e)){if(this.config.opt_out_useragent_filter||!this._is_bot()){var s=r!=null&&r.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(s==null||!s.isRateLimited){this.sessionPersistence.update_search_keyword(),this.config.store_google&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.store_google||this.config.save_referrer)&&this.persistence.set_initial_person_info();var o=new Date,l=r?.timestamp||o,a=Wt(),u={uuid:a,event:e,properties:this._calculate_event_properties(e,t||{},l,a)};s&&(u.properties.$lib_rate_limit_remaining_tokens=s.remainingTokens),r?.$set&&(u.$set=r?.$set);var d=this._calculate_set_once_properties(r?.$set_once);d&&(u.$set_once=d),(u=p1(u,r!=null&&r._noTruncate?null:this.config.properties_string_max_length)).timestamp=l,F(r?.timestamp)||(u.properties.$event_time_override_provided=!0,u.properties.$event_time_override_system_time=o);var c=C(C({},u.properties.$set),u.$set);if(ur(c)||this.setPersonPropertiesForFlags(c),!Y(this.config.before_send)){var p=this._runBeforeSend(u);if(!p)return;u=p}this._internalEventEmitter.emit("eventCaptured",u);var h={method:"POST",url:(n=r?._url)!==null&&n!==void 0?n:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:u,compression:"best-available",batchKey:r?._batchKey};return!this.config.request_batching||r&&(r==null||!r._batchKey)||r!=null&&r.send_instantly?this._send_retriable_request(h):this._requestQueue.enqueue(h),u}O.critical("This capture call is ignored due to client rate limiting.")}}else O.error("No event name provided to posthog.capture")}else O.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",t=>e(t.event,t))}_calculate_event_properties(e,t,r,n){if(r=r||new Date,!this.persistence||!this.sessionPersistence)return t;var s=this.persistence.remove_event_timer(e),o=C({},t);if(o.token=this.config.token,this.config.__preview_experimental_cookieless_mode&&(o.$cklsh_mode=!0),e==="$snapshot"){var l=C(C({},this.persistence.properties()),this.sessionPersistence.properties());return o.distinct_id=l.distinct_id,(!Se(o.distinct_id)&&!Oe(o.distinct_id)||Vp(o.distinct_id))&&O.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),o}var a,u=oe.properties();if(this.sessionManager){var{sessionId:d,windowId:c}=this.sessionManager.checkAndGetSessionAndWindowId();o.$session_id=d,o.$window_id=c}if(this.sessionRecording&&(o.$recording_status=this.sessionRecording.status),this.requestRouter.region===Ci.CUSTOM&&(o.$lib_custom_api_host=this.config.api_host),this.sessionPropsManager&&this.config.__preview_send_client_session_params&&(e==="$pageview"||e==="$pageleave"||e==="$autocapture")){var p=this.sessionPropsManager.getSessionProps();o=Te(o,p)}if(a=e==="$pageview"?this.pageViewManager.doPageView(r,n):e==="$pageleave"?this.pageViewManager.doPageLeave(r):this.pageViewManager.doEvent(),o=Te(o,a),e==="$pageview"&&L&&(o.title=L.title),!F(s)){var h=r.getTime()-s;o.$duration=parseFloat((h/1e3).toFixed(3))}we&&this.config.opt_out_useragent_filter&&(o.$browser_type=this._is_bot()?"bot":"browser"),(o=Te({},u,this.persistence.properties(),this.sessionPersistence.properties(),o)).$is_identified=this._isIdentified(),fe(this.config.property_denylist)?K(this.config.property_denylist,function(b){delete o[b]}):O.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var g=this.config.sanitize_properties;g&&(O.error("sanitize_properties is deprecated. Use before_send instead"),o=g(o,e));var m=this._hasPersonProcessing();return o.$process_person_profile=m,m&&this._requirePersonProcessing("_calculate_event_properties"),o}_calculate_set_once_properties(e){if(!this.persistence||!this._hasPersonProcessing())return e;var t=Te({},this.persistence.get_initial_props(),e||{}),r=this.config.sanitize_properties;return r&&(O.error("sanitize_properties is deprecated. Use before_send instead"),t=r(t,"$set_once")),ur(t)?void 0:t}register(e,t){var r;(r=this.persistence)===null||r===void 0||r.register(e,t)}register_once(e,t,r){var n;(n=this.persistence)===null||n===void 0||n.register_once(e,t,r)}register_for_session(e){var t;(t=this.sessionPersistence)===null||t===void 0||t.register(e)}unregister(e){var t;(t=this.persistence)===null||t===void 0||t.unregister(e)}unregister_for_session(e){var t;(t=this.sessionPersistence)===null||t===void 0||t.unregister(e)}_register_single(e,t){this.register({[e]:t})}getFeatureFlag(e,t){return this.featureFlags.getFeatureFlag(e,t)}getFeatureFlagPayload(e){var t=this.featureFlags.getFeatureFlagPayload(e);try{return JSON.parse(t)}catch{return t}}isFeatureEnabled(e,t){return this.featureFlags.isFeatureEnabled(e,t)}reloadFeatureFlags(){this.featureFlags.reloadFeatureFlags()}updateEarlyAccessFeatureEnrollment(e,t){this.featureFlags.updateEarlyAccessFeatureEnrollment(e,t)}getEarlyAccessFeatures(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.featureFlags.getEarlyAccessFeatures(e,t)}on(e,t){return this._internalEventEmitter.on(e,t)}onFeatureFlags(e){return this.featureFlags.onFeatureFlags(e)}onSessionId(e){var t,r;return(t=(r=this.sessionManager)===null||r===void 0?void 0:r.onSessionId(e))!==null&&t!==void 0?t:()=>{}}getSurveys(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.surveys.getSurveys(e,t)}getActiveMatchingSurveys(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.surveys.getActiveMatchingSurveys(e,t)}renderSurvey(e,t){this.surveys.renderSurvey(e,t)}canRenderSurvey(e){this.surveys.canRenderSurvey(e)}getNextSurveyStep(e,t,r){return this.surveys.getNextSurveyStep(e,t,r)}identify(e,t,r){if(!this.__loaded||!this.persistence)return O.uninitializedWarning("posthog.identify");if(Oe(e)&&(e=e.toString(),O.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),e){if(["distinct_id","distinctid"].includes(e.toLowerCase()))O.critical('The string "'.concat(e,'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'));else if(this._requirePersonProcessing("posthog.identify")){var n=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var s=n;this.register_once({$had_persisted_distinct_id:!0,$device_id:s},"")}e!==n&&e!==this.get_property(mn)&&(this.unregister(mn),this.register({distinct_id:e}));var o=(this.persistence.get_property(St)||"anonymous")==="anonymous";e!==n&&o?(this.persistence.set_property(St,"identified"),this.setPersonPropertiesForFlags(t||{},!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:n},{$set:t||{},$set_once:r||{}}),this.featureFlags.setAnonymousDistinctId(n)):(t||r)&&this.setPersonProperties(t,r),e!==n&&(this.reloadFeatureFlags(),this.unregister(xo))}}else O.error("Unique user id has not been set in posthog.identify")}setPersonProperties(e,t){(e||t)&&this._requirePersonProcessing("posthog.setPersonProperties")&&(this.setPersonPropertiesForFlags(e||{}),this.capture("$set",{$set:e||{},$set_once:t||{}}))}group(e,t,r){if(e&&t){if(this._requirePersonProcessing("posthog.group")){var n=this.getGroups();n[e]!==t&&this.resetGroupPropertiesForFlags(e),this.register({$groups:C(C({},n),{},{[e]:t})}),r&&(this.capture("$groupidentify",{$group_type:e,$group_key:t,$group_set:r}),this.setGroupPropertiesForFlags({[e]:r})),n[e]===t||r||this.reloadFeatureFlags()}}else O.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setPersonPropertiesForFlags(e,t)}resetPersonPropertiesForFlags(){this.featureFlags.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this._requirePersonProcessing("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(e,t)}resetGroupPropertiesForFlags(e){this.featureFlags.resetGroupPropertiesForFlags(e)}reset(e){var t,r,n,s,o;if(O.info("reset"),!this.__loaded)return O.uninitializedWarning("posthog.reset");var l=this.get_property("$device_id");if(this.consent.reset(),(t=this.persistence)===null||t===void 0||t.clear(),(r=this.sessionPersistence)===null||r===void 0||r.clear(),(n=this.surveys)===null||n===void 0||n.reset(),(s=this.persistence)===null||s===void 0||s.set_property(St,"anonymous"),(o=this.sessionManager)===null||o===void 0||o.resetSessionId(),this.config.__preview_experimental_cookieless_mode)this.register_once({distinct_id:rh,$device_id:null},"");else{var a=this.config.get_device_id(Wt());this.register_once({distinct_id:a,$device_id:e?a:l},"")}}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,t;return(e=(t=this.sessionManager)===null||t===void 0?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&e!==void 0?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:t,sessionStartTimestamp:r}=this.sessionManager.checkAndGetSessionAndWindowId(!0),n=this.requestRouter.endpointFor("ui","/project/".concat(this.config.token,"/replay/").concat(t));if(e!=null&&e.withTimestamp&&r){var s,o=(s=e.timestampLookBack)!==null&&s!==void 0?s:10;if(!r)return n;var l=Math.max(Math.floor((new Date().getTime()-r)/1e3)-o,0);n+="?t=".concat(l)}return n}alias(e,t){return e===this.get_property(Gh)?(O.critical("Attempting to create alias for existing People user - aborting."),-2):this._requirePersonProcessing("posthog.alias")?(F(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(mn,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(O.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var t,r,n,s,o=C({},this.config);ce(e)&&(Te(this.config,Nh(e)),(t=this.persistence)===null||t===void 0||t.update_config(this.config,o),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new xn(C(C({},this.config),{},{persistence:"sessionStorage"})),ve.is_supported()&&ve.get("ph_debug")==="true"&&(this.config.debug=!0),this.config.debug&&(It.DEBUG=!0,O.info("set_config",{config:e,oldConfig:o,newConfig:C({},this.config)})),(r=this.sessionRecording)===null||r===void 0||r.startIfEnabledOrStop(),(n=this.autocapture)===null||n===void 0||n.startIfEnabled(),(s=this.heatmaps)===null||s===void 0||s.startIfEnabled(),this.surveys.loadIfEnabled(),this._sync_opt_out_with_persistence())}startSessionRecording(e){var t=e===!0,r={sampling:t||!(e==null||!e.sampling),linked_flag:t||!(e==null||!e.linked_flag),url_trigger:t||!(e==null||!e.url_trigger),event_trigger:t||!(e==null||!e.event_trigger)};if(Object.values(r).some(Boolean)){var n,s,o,l,a;(n=this.sessionManager)===null||n===void 0||n.checkAndGetSessionAndWindowId(),r.sampling&&((s=this.sessionRecording)===null||s===void 0||s.overrideSampling()),r.linked_flag&&((o=this.sessionRecording)===null||o===void 0||o.overrideLinkedFlag()),r.url_trigger&&((l=this.sessionRecording)===null||l===void 0||l.overrideTrigger("url")),r.event_trigger&&((a=this.sessionRecording)===null||a===void 0||a.overrideTrigger("event"))}this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!((e=this.sessionRecording)===null||e===void 0||!e.started)}captureException(e,t){var r,n=new Error("PostHog syntheticException"),s=Ze((r=H.__PosthogExtensions__)===null||r===void 0?void 0:r.parseErrorAsProperties)?H.__PosthogExtensions__.parseErrorAsProperties([e.message,void 0,void 0,void 0,e],{syntheticException:n}):C({$exception_level:"error",$exception_list:[{type:e.name,value:e.message,mechanism:{handled:!0,synthetic:!1}}]},t);this.exceptions.sendExceptionEvent(s)}loadToolbar(e){return this.toolbar.loadToolbar(e)}get_property(e){var t;return(t=this.persistence)===null||t===void 0?void 0:t.props[e]}getSessionProperty(e){var t;return(t=this.sessionPersistence)===null||t===void 0?void 0:t.props[e]}toString(){var e,t=(e=this.config.name)!==null&&e!==void 0?e:lr;return t!==lr&&(t=lr+"."+t),t}_isIdentified(){var e,t;return((e=this.persistence)===null||e===void 0?void 0:e.get_property(St))==="identified"||((t=this.sessionPersistence)===null||t===void 0?void 0:t.get_property(St))==="identified"}_hasPersonProcessing(){var e,t,r,n;return!(this.config.person_profiles==="never"||this.config.person_profiles==="identified_only"&&!this._isIdentified()&&ur(this.getGroups())&&((e=this.persistence)===null||e===void 0||(t=e.props)===null||t===void 0||!t[mn])&&((r=this.persistence)===null||r===void 0||(n=r.props)===null||n===void 0||!n[ko]))}_shouldCapturePageleave(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&this.config.capture_pageview}createPersonProfile(){this._hasPersonProcessing()||this._requirePersonProcessing("posthog.createPersonProfile")&&this.setPersonProperties({},{})}_requirePersonProcessing(e){return this.config.person_profiles==="never"?(O.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this._register_single(ko,!0),!0)}_sync_opt_out_with_persistence(){var e,t,r,n,s=this.consent.isOptedOut(),o=this.config.opt_out_persistence_by_default,l=this.config.disable_persistence||s&&!!o;((e=this.persistence)===null||e===void 0?void 0:e.disabled)!==l&&((r=this.persistence)===null||r===void 0||r.set_disabled(l)),((t=this.sessionPersistence)===null||t===void 0?void 0:t.disabled)!==l&&((n=this.sessionPersistence)===null||n===void 0||n.set_disabled(l))}opt_in_capturing(e){var t;this.consent.optInOut(!0),this._sync_opt_out_with_persistence(),(F(e?.captureEventName)||e!=null&&e.captureEventName)&&this.capture((t=e?.captureEventName)!==null&&t!==void 0?t:"$opt_in",e?.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this._captureInitialPageview()}opt_out_capturing(){this.consent.optInOut(!1),this._sync_opt_out_with_persistence()}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}clear_opt_in_out_capturing(){this.consent.reset(),this._sync_opt_out_with_persistence()}_is_bot(){return Ge?qf(Ge,this.config.custom_blocked_useragents):void 0}_captureInitialPageview(){L&&!this._initialPageviewCaptured&&(this._initialPageviewCaptured=!0,this.capture("$pageview",{title:L.title},{send_instantly:!0}))}debug(e){e===!1?(v?.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(v?.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}_runBeforeSend(e){if(Y(this.config.before_send))return e;var t=fe(this.config.before_send)?this.config.before_send:[this.config.before_send],r=e;for(var n of t){if(r=n(r),Y(r)){var s="Event '".concat(e.event,"' was rejected in beforeSend function");return c1(e.event)?O.warn("".concat(s,". This can cause unexpected behavior.")):O.info(s),null}r.properties&&!ur(r.properties)||O.warn("Event '".concat(e.event,"' has no properties after beforeSend function, this is likely an error."))}return r}getPageViewId(){var e;return(e=this.pageViewManager._currentPageview)===null||e===void 0?void 0:e.pageViewId}};(function(i,e){for(var t=0;t<e.length;t++)i.prototype[e[t]]=d1(i.prototype[e[t]])})(Do,["identify"]);var Uh,Hf=(Uh=Sn[lr]=new Do,function(){function i(){i.done||(i.done=!0,Bf=!1,K(Sn,function(e){e._dom_loaded()}))}L!=null&&L.addEventListener&&(L.readyState==="complete"?i():L.addEventListener("DOMContentLoaded",i,!1)),v&&At(v,"load",i,!0)}(),Uh);var zf=Hf.init("phc_OTZ3wJ6VemgVupCRKS5Sbqb9Ks0JYe0hMYZPtLwl0nu",{api_host:"https://pheu.molin.ai",ui_host:"https://eu.posthog.com",secure_cookie:document.location.protocol==="https:",persistence:"cookie",autocapture:!1,rageclick:!1,capture_pageview:!1,capture_pageleave:!1,disable_session_recording:!0,advanced_disable_decide:!0},"MolinShopAI");function De(i,e){if(!zf)throw new Error("Failed to initialize PostHog");zf.capture(i,e)}var Bo,Rn,Ho,Mt,Wf,Mn,Pn=class Pn extends z(N){constructor(){super();w(this,Mt);w(this,Bo,new Bt(this,{onError:console.error}));w(this,Rn);w(this,Ho,{onError:t=>{alert(t.error),console.error(t.widgetId,t.error),De("ShopAssistant: error",t),se("ShopAssistant: error",{...t,immediate:!0})},onNewMessageStartedStreaming:t=>{De("ShopAssistant: user received bot message (streaming started)",t),se("ShopAssistant: user received bot message (streaming started)",t)},onMessageEndedStreaming:t=>{De("ShopAssistant: user received bot message (streaming ended)",t),se("ShopAssistant: user received bot message (streaming ended)",t)},onUserCanceledStreaming:t=>{De("ShopAssistant: user canceled streaming",t),se("ShopAssistant: user canceled streaming",t)},onUserClickedLink:t=>{De("ShopAssistant: user clicked link",t),se("ShopAssistant: user clicked link",t)},onUserSentInput:t=>{De("ShopAssistant: user sent input",t),se("ShopAssistant: user sent input",t)}});this.cdn="https://widget.molin.ai",this.widgetId="",this.showClose=!1,this.xUserData=Ht()?.userData,this.xCustomInstructions=Ht()?.customInstructions}get config(){return f(this,Rn)||f(this,Bo).data}render(){return this.config?y`
885
+ `}};w(hi,"properties",{orderDetails:{type:Object,attribute:"order-details"},streaming:{type:Boolean},linksNewTab:{type:Boolean,attribute:"links-new-tab"}});customElements.get("mw-product-order-status-card")||customElements.define("mw-product-order-status-card",hi);var He,ke,Xs,Vr,Gs=class{constructor(e=window.localStorage){d(this,ke);d(this,He);g(this,He,e)}setex(e,r,n){return l(this,He).setItem(e,m(this,ke,Vr).call(this,{value:m(this,ke,Vr).call(this,r),expiresAt:Date.now()+n*1e3})||"")}set(e,r){return l(this,He).setItem(e,m(this,ke,Vr).call(this,{value:m(this,ke,Vr).call(this,r)})||"")}get(e){let r=l(this,He).getItem(e);if(!r)return;let n=m(this,ke,Xs).call(this,r);if(n){if(n.expiresAt&&n.expiresAt<Date.now()){l(this,He).removeItem(e);return}return m(this,ke,Xs).call(this,n.value)}}get molin_shop_assistant_distinct_id(){return localStorage.getItem("molin_shop_assistant_distinct_id")}set molin_shop_assistant_distinct_id(e){e===null?localStorage.removeItem("molin_shop_assistant_distinct_id"):localStorage.setItem("molin_shop_assistant_distinct_id",e)}get molin_widget_open_state(){return ue.get("molin-shop-ai-widget-open")??null}set molin_widget_open_state(e){ue.set("molin-shop-ai-widget-open",e)}resetWidgetData(){ue.molin_shop_assistant_distinct_id=null,ue.molin_widget_open_state=null}};He=new WeakMap,ke=new WeakSet,Xs=function(e){if(!(typeof e!="string"||e===""))try{return JSON.parse(e)}catch{return}},Vr=function(e){if(e!==void 0)try{return JSON.stringify(e)}catch{return}};var ue=new Gs;var te,Oe,mi,Fr,zt,Js=class{constructor(){d(this,te,[]);d(this,Oe);d(this,mi,10);d(this,Fr,5e3);d(this,zt,!1)}async add(e,r){if(l(this,te).push({event:e,properties:Object.assign({},r,Ul()),distinct_id:Pl(r.distinct_id),timestamp:new Date().toISOString()}),l(this,te).length>=l(this,mi))return this.flush();l(this,Oe)||g(this,Oe,setTimeout(()=>{this.flush().catch(console.error)},l(this,Fr)))}async flush(){if(l(this,zt)||l(this,te).length===0)return;let e=[...l(this,te)];try{g(this,zt,!0),clearTimeout(l(this,Oe)),g(this,Oe,void 0),g(this,te,[]);let r=new AbortController,n=setTimeout(()=>r.abort(),5e3),i=new FormData;i.append("events",JSON.stringify(e));let s=await fetch(new URL("/widgets/data/collect",Ks()).href,{method:"POST",body:i,signal:r.signal});if(clearTimeout(n),!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return s}catch(r){if(r.name==="AbortError")console.error("Request timed out, retrying events"),g(this,te,[...e,...l(this,te)]);else{console.error("Failed to send events to backend:",r);let n=e.filter(i=>i.event.includes("error"));g(this,te,[...n,...l(this,te)])}}finally{g(this,zt,!1),l(this,te).length>0&&!l(this,Oe)&&g(this,Oe,setTimeout(()=>{this.flush().catch(console.error)},l(this,Fr)))}}async flushBeforeUnload(){if(l(this,te).length>0)try{let e=new FormData;e.append("events",JSON.stringify(l(this,te))),navigator.sendBeacon(new URL("/widgets/data/collect",Ks()).href,e)}catch(e){console.error("Failed to send final events:",e)}}};te=new WeakMap,Oe=new WeakMap,mi=new WeakMap,Fr=new WeakMap,zt=new WeakMap;var Rl=new Js;window.addEventListener("beforeunload",()=>{Rl.flushBeforeUnload().catch(console.error)});async function F(t,e){try{if(e.immediate){let r=new FormData;r.append("events",JSON.stringify([{event:t,properties:Object.assign({},e,Ul()),distinct_id:Pl(e.distinct_id),timestamp:new Date().toISOString()}]));let n=await fetch(new URL("/widgets/data/collect",Ks()).href,{method:"POST",body:r});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);return await n.json()}return Rl.add(t,e)}catch(r){console.error("Failed to send event:",r)}}function Pl(t=crypto.randomUUID()){try{let e=ue.molin_shop_assistant_distinct_id;return e||(e=t,ue.molin_shop_assistant_distinct_id=e),e}catch(e){console.error("Failed to handle distinct ID:",e);try{ue.molin_shop_assistant_distinct_id=t}catch(r){console.error("Failed to store new distinct ID:",r)}return t}}function Ul(){return{referrer:document.referrer,userAgent:navigator.userAgent,language:navigator.language,screenWidth:window.innerWidth,screenHeight:window.innerHeight,timestamp:new Date().toISOString(),timezoneOffset:new Date().getTimezoneOffset(),doNotTrack:navigator.doNotTrack}}var di;function Ks(){if(di)return di;let t=new URL(import.meta.url).hostname;return di=new Map([["localhost","http://localhost:8787"],["widget.molin.foo","https://molin.foo"],["widget.molin.ai","https://molin.ai"],["molin.foo","https://molin.foo"]]).get(t)||"https://molin.ai",di}var pt,Hr,Ne,ft,yi,Fl,gi=class{constructor(e,r,n){d(this,yi);d(this,pt);d(this,Hr);d(this,Ne);d(this,ft);w(this,"isLoading",!1);w(this,"data");g(this,pt,e),g(this,Hr,r),g(this,Ne,n),e.addController(this)}fetch(){if(this.isLoading)return;l(this,ft)?.abort();let e=new AbortController;g(this,ft,e),this.isLoading=!0,this.data=void 0,l(this,pt).requestUpdate(),(async()=>{let r=m(this,yi,Fl).call(this);return r.signal?.addEventListener("abort",()=>e.abort(),{signal:e.signal}),fetch(r,{signal:e.signal})})().then(async r=>{if(!r.ok)throw new Error(`${r.statusText}: ${await r.text()}`);this.isLoading=!1,this.data=typeof l(this,Ne)?.transform=="function"?await l(this,Ne).transform(r):r,l(this,pt).requestUpdate()}).catch(r=>{l(this,Ne)?.onError?.(r),this.isLoading=!1,this.data=void 0,l(this,pt).requestUpdate()}).finally(()=>{e.abort()})}hostConnected(){this.isLoading||l(this,Ne)?.fetchWhenConnected&&this.fetch()}hostDisconnected(){l(this,ft)?.abort(),g(this,ft,void 0)}};pt=new WeakMap,Hr=new WeakMap,Ne=new WeakMap,ft=new WeakMap,yi=new WeakSet,Fl=function(){let e=l(this,Hr);if(typeof e=="function"&&(e=e()),!e)throw new Error("missing request");return new Request(e)};var Ce,Nr,Wt,Zt,Be=class{constructor(e,r){d(this,Ce);d(this,Nr);d(this,Wt);d(this,Zt);g(this,Ce,e),g(this,Nr,r),e.addController(this)}get data(){return l(this,Zt)||l(this,Wt)?.data}hostConnected(){if(l(this,Wt)||l(this,Zt))return;let e=Hl();e&&e.widgetId===l(this,Ce).widgetId?g(this,Zt,e.config):g(this,Wt,new gi(l(this,Ce),()=>{if(l(this,Ce).cdn&&l(this,Ce).widgetId)return`${l(this,Ce).cdn}/config?w=${l(this,Ce).widgetId}`;throw new Error("missing cdn or widgetId")},{fetchWhenConnected:!0,transform:r=>r.json(),onError:l(this,Nr)?.onError}))}};Ce=new WeakMap,Nr=new WeakMap,Wt=new WeakMap,Zt=new WeakMap;function qe(){return window.molinSettings&&typeof window.molinSettings=="object"?window.molinSettings:null}var vi,zr,wi,Le,Nl,Br,qr=class qr extends T(S){constructor(){super();d(this,Le);d(this,vi,new Be(this,{onError:console.error}));d(this,zr);d(this,wi,{onError:r=>{alert(r.error),console.error(r.widgetId,r.error),F("ShopAssistant: error",{...r,immediate:!0})},onNewMessageStartedStreaming:r=>{F("ShopAssistant: user received bot message (streaming started)",r)},onMessageEndedStreaming:r=>{F("ShopAssistant: user received bot message (streaming ended)",r)},onUserCanceledStreaming:r=>{F("ShopAssistant: user canceled streaming",r)},onUserClickedLink:r=>{F("ShopAssistant: user clicked link",r)},onUserSentInput:r=>{F("ShopAssistant: user sent input",r)}});this.cdn="https://widget.molin.ai",this.widgetId="",this.showClose=!1,this.xUserData=qe()?.userData,this.xCustomInstructions=qe()?.customInstructions}get config(){return l(this,zr)||l(this,vi).data}render(){return this.config?h`
876
886
  <!-- embed our chat component forwarding props -->
877
887
  <mw-chat
878
888
  widget="${this.widgetId}"
879
889
  .config="${this.config}"
880
- .callbacks="${f(this,Ho)}"
890
+ .callbacks="${l(this,wi)}"
881
891
  .xUserData="${this.xUserData}"
882
892
  .xCustomInstructions="${this.xCustomInstructions}"
883
893
  ?show-close="${this.showClose}"
884
- @mw:close-click="${$(this,Mt,Wf)}">
894
+ @mw:close-click="${m(this,Le,Nl)}">
885
895
  <slot name="banner" slot="banner"></slot>
886
896
  </mw-chat>
887
- `:j}injectConfig(t){E(this,Rn,t),this.requestUpdate()}reloadConfig(){f(this,Mt,Mn)?.reloadConfig()}reset(){this.xUserData={},this.xCustomInstructions="",f(this,Mt,Mn)?.reset(),this.requestUpdate()}get conversationId(){return f(this,Mt,Mn)?.conversationId??""}get messages(){return f(this,Mt,Mn)?.messages??[]}};Bo=new WeakMap,Rn=new WeakMap,Ho=new WeakMap,Mt=new WeakSet,Wf=function(){this.dispatchEvent(new Pn.CloseClickEvent)},Mn=function(){return this.renderRoot.querySelector("mw-chat")},M(Pn,"styles",mt`
897
+ `:E}injectConfig(r){g(this,zr,r),this.requestUpdate()}reloadConfig(){l(this,Le,Br)?.reloadConfig()}reset(){this.xUserData={},this.xCustomInstructions="",l(this,Le,Br)?.reset(),this.requestUpdate()}get conversationId(){return l(this,Le,Br)?.conversationId??""}get messages(){return l(this,Le,Br)?.messages??[]}};vi=new WeakMap,zr=new WeakMap,wi=new WeakMap,Le=new WeakSet,Nl=function(){this.dispatchEvent(new qr.CloseClickEvent)},Br=function(){return this.renderRoot.querySelector("mw-chat")},w(qr,"styles",Ee`
888
898
  :host {
889
899
  all: initial; /* reset all properties that can pierce the shadow DOM */
890
900
  }
891
- `),M(Pn,"properties",{cdn:{type:String},widgetId:{type:String,attribute:"widget"},showClose:{type:Boolean,attribute:"show-close"},xUserData:{type:Object,attribute:!1},xCustomInstructions:{type:String,attribute:!1}});var $i=Pn;customElements.define("molin-shop-ai-chat",$i);var Gu;$i.CloseClickEvent=(Gu=class extends CustomEvent{constructor(e={}){super($i.CloseClickEvent.type,{...e})}},M(Gu,"type","mw:close-click"),Gu);var Zu=class{constructor({hidden:e=!1}){M(this,"hidden");this.hidden=e}setUserData(e){for(let t of document.querySelectorAll("molin-shop-ai"))e?t.setAttribute("user-data",JSON.stringify(e)):t.removeAttribute("user-data");for(let t of document.querySelectorAll("molin-shop-ai-chat"))e?t.setAttribute("user-data",JSON.stringify(e)):t.removeAttribute("user-data")}setCustomInstructions(e){for(let t of document.querySelectorAll("molin-shop-ai"))e?t.setAttribute("custom-instructions",e):t.removeAttribute("custom-instructions");for(let t of document.querySelectorAll("molin-shop-ai-chat"))e?t.setAttribute("custom-instructions",e):t.removeAttribute("custom-instructions")}showLauncher(){for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof at&&e.showLauncher()}hideLauncher(){for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof at&&e.hideLauncher()}openChat(){for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof at&&e.openChat()}closeChat(){for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof at&&e.closeChat()}reset(){for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof at&&e.reset();for(let e of document.querySelectorAll("molin-shop-ai-chat"))e instanceof $i&&e.reset()}};function Gf({hidden:i}){let e=new Zu({hidden:i});return window.Molin=e,e}function zo(){let i=window.Molin;if(!i)throw new Error("window.Molin global not initialized");return i}window.__INIT_MOLIN_SHOP_AI=function(e){Cm(e);let t=Ht(),r=typeof t?.hidden=="boolean"?t.hidden:window.self!==window.top;if(Gf({hidden:r}),e.auto){let n=document.createElement("molin-shop-ai");n.setAttribute("cdn",e.cdn),n.setAttribute("widget",e.widgetId),document.body.appendChild(n)}};function Cm(i){window.__INIT_MOLIN_SHOP_AI_OPTIONS=i}function Up(){return window.__INIT_MOLIN_SHOP_AI_OPTIONS}var Vo,On=class extends z(N){constructor(){super();w(this,Vo,new Bt(this,{onError:console.error}));this.cdn="https://widget.molin.ai",this.widgetId="",this.state="open"}get config(){return f(this,Vo).data}render(){return this.config?y`
901
+ `),w(qr,"properties",{cdn:{type:String},widgetId:{type:String,attribute:"widget"},showClose:{type:Boolean,attribute:"show-close"},xUserData:{type:Object,attribute:!1},xCustomInstructions:{type:String,attribute:!1}});var ht=qr;customElements.define("molin-shop-ai-chat",ht);var Ys;ht.CloseClickEvent=(Ys=class extends CustomEvent{constructor(e={}){super(ht.CloseClickEvent.type,{...e})}},w(Ys,"type","mw:close-click"),Ys);var Qs=class{constructor({hidden:e=!1}){w(this,"hidden");this.hidden=e}setUserData(e){for(let r of document.querySelectorAll("molin-shop-ai"))e?r.setAttribute("user-data",JSON.stringify(e)):r.removeAttribute("user-data");for(let r of document.querySelectorAll("molin-shop-ai-chat"))e?r.setAttribute("user-data",JSON.stringify(e)):r.removeAttribute("user-data")}setCustomInstructions(e){for(let r of document.querySelectorAll("molin-shop-ai"))e?r.setAttribute("custom-instructions",e):r.removeAttribute("custom-instructions");for(let r of document.querySelectorAll("molin-shop-ai-chat"))e?r.setAttribute("custom-instructions",e):r.removeAttribute("custom-instructions")}showLauncher(){for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof ye&&e.showLauncher()}hideLauncher(){for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof ye&&e.hideLauncher()}openChat(){for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof ye&&e.openChat()}closeChat(){for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof ye&&e.closeChat()}reset(){ue.resetWidgetData();for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof ye&&e.reset();for(let e of document.querySelectorAll("molin-shop-ai-chat"))e instanceof ht&&e.reset()}};function Bl({hidden:t}){let e=new Qs({hidden:t});return window.Molin=e,e}function bi(){let t=window.Molin;if(!t)throw new Error("window.Molin global not initialized");return t}window.__INIT_MOLIN_SHOP_AI=function(e){Yc(e);let r=qe(),n=typeof r?.hidden=="boolean"?r.hidden:window.self!==window.top;if(Bl({hidden:n}),e.auto){let i=document.createElement("molin-shop-ai");i.setAttribute("cdn",e.cdn),i.setAttribute("widget",e.widgetId),document.body.appendChild(i)}};function Yc(t){window.__INIT_MOLIN_SHOP_AI_OPTIONS=t}function Hl(){return window.__INIT_MOLIN_SHOP_AI_OPTIONS}var xi,Wr=class extends T(S){constructor(){super();d(this,xi,new Be(this,{onError:console.error}));this.cdn="https://widget.molin.ai",this.widgetId="",this.state="open"}get config(){return l(this,xi).data}render(){return this.config?h`
892
902
  <!-- embed our bubble component forwarding props -->
893
903
  <!-- these props are never internally updated by mw-bubble so we pass them down only one way -->
894
- <mw-bubble state="${this.state}" src="${Ft(this.config?.bubble?.imageUrl)}"></mw-bubble>
895
- `:j}};Vo=new WeakMap,M(On,"styles",mt`
904
+ <mw-bubble state="${this.state}" src="${Re(this.config?.bubble?.imageUrl)}"></mw-bubble>
905
+ `:E}};xi=new WeakMap,w(Wr,"styles",Ee`
896
906
  :host {
897
907
  all: initial; /* reset all properties that can pierce the shadow DOM */
898
908
  }
899
- `),M(On,"properties",{cdn:{type:String},widgetId:{type:String,attribute:"widget"},state:{type:String}});customElements.define("molin-shop-ai-launcher",On);var Wo,br,wr,Ii,Fn,Dn,Ln=class{constructor(e,t,r,n=window.history){w(this,Wo);w(this,br);w(this,wr);w(this,Ii);w(this,Fn,!1);w(this,Dn,()=>{f(this,br).test(window.location.pathname)&&f(this,wr).navigated()});E(this,Wo,e),E(this,br,t),E(this,wr,r),E(this,Ii,n),e.addController(this)}hostConnected(){window.addEventListener("pageshow",f(this,Dn));let e=f(this,Ii).pushState;f(this,Ii).pushState=(...t)=>{if(e.call(f(this,Ii),...t),!f(this,Fn))try{let r=new URL(t[2],window.location.origin);f(this,br).test(r.pathname)&&f(this,wr).navigated()}catch{}}}hostDisconnected(){window.removeEventListener("pageshow",f(this,Dn)),E(this,Fn,!0)}};Wo=new WeakMap,br=new WeakMap,wr=new WeakMap,Ii=new WeakMap,Fn=new WeakMap,Dn=new WeakMap;function Zf({minMs:i,maxMs:e}){return Math.random()*(e-i)+i}function Ju(i,e=""){return Object.entries(i).filter(([t,r])=>r).map(([t,r])=>`${e}${t}-[${r}]`).join(" ")}function Jf(i,e={}){return[Ju(i),Ju(e,"max-sm:")].join(" ")}function Xf(i){return Ju(i)}function Xu(i){return Object.entries(i).filter(([e,t])=>t).filter(([e])=>e==="left"||e==="right").map(([e,t])=>{let r=`sm:${e}-[${t}]`;return e==="left"&&(r+=" sm:right-auto"),e==="right"&&(r+=" sm:left-auto"),r}).join(" ")}function Kf(i){let e=Xu(i),r=`sm:bottom-[${i.bottom?`calc(${i.bottom}+72px)`:"72px"}]`;return[e,r].filter(Boolean).join(" ")}var Xt,gt,Yu,jn,Ku=class{constructor(e=window.localStorage){w(this,gt);w(this,Xt);E(this,Xt,e)}setex(e,t,r){return f(this,Xt).setItem(e,$(this,gt,jn).call(this,{value:$(this,gt,jn).call(this,t),expiresAt:Date.now()+r*1e3})||"")}set(e,t){return f(this,Xt).setItem(e,$(this,gt,jn).call(this,{value:$(this,gt,jn).call(this,t)})||"")}get(e){let t=f(this,Xt).getItem(e);if(!t)return;let r=$(this,gt,Yu).call(this,t);if(r){if(r.expiresAt&&r.expiresAt<Date.now()){f(this,Xt).removeItem(e);return}return $(this,gt,Yu).call(this,r.value)}}};Xt=new WeakMap,gt=new WeakSet,Yu=function(e){if(!(typeof e!="string"||e===""))try{return JSON.parse(e)}catch{return}},jn=function(e){if(e!==void 0)try{return JSON.stringify(e)}catch{return}};var Qu=new Ku;var Yf="molin-shop-ai-widget-open",Zo,Un,ec,tc,de,Ai,Jo,te,Qf,Nn,Go,e0,t0,i0,xr,at=class extends z(N){constructor(){super();w(this,te);w(this,Zo,new Bt(this,{onError:console.error}));w(this,Un);w(this,ec,new Ln(this,/checkout|order|thank-you|thank_you/i,{navigated:()=>{let t=f(this,te,Go);t&&De("ShopAssistant: user visited checkout page",{widgetId:this.widgetId,conversationId:t.conversationId,hasSentMessage:t.messages.length>0})}}));w(this,tc,new Ln(this,/.*/i,{navigated:()=>{let t=f(this,te,Go);se("ShopAssistant: pageview",{widgetId:this.widgetId,conversationId:t?.conversationId||"",url:document.location.href,title:document.title,hidden:this.config?this.config.hidden||!1:void 0})}}));w(this,de,!1);w(this,Ai,!1);w(this,Jo,{onError:t=>{alert(t.error),console.error(t.widgetId,t.error),De("ShopAssistant: error",t),se("ShopAssistant: error",{...t,immediate:!0})},onNewMessageStartedStreaming:t=>{De("ShopAssistant: user received bot message (streaming started)",t),se("ShopAssistant: user received bot message (streaming started)",t)},onMessageEndedStreaming:t=>{De("ShopAssistant: user received bot message (streaming ended)",t),se("ShopAssistant: user received bot message (streaming ended)",t)},onUserCanceledStreaming:t=>{De("ShopAssistant: user canceled streaming",t),se("ShopAssistant: user canceled streaming",t)},onUserClickedLink:t=>{De("ShopAssistant: user clicked link",t),se("ShopAssistant: user clicked link",t)},onUserSentInput:t=>{De("ShopAssistant: user sent input",t),se("ShopAssistant: user sent input",t)}});this.cdn="https://widget.molin.ai",this.widgetId="",this.xUserData=Ht()?.userData,this.xCustomInstructions=Ht()?.customInstructions}get config(){return f(this,Un)||f(this,Zo).data}render(){if(!this.config)return j;let t=Jf(this.config.bubble.position,this.config.bubble.mobilePosition),r=Xf(this.config.bubble.position),n=Xu(this.config.bubble.position),s=Kf(this.config.bubble.position);return this.config.hidden?j:zo().hidden?j:y`
909
+ `),w(Wr,"properties",{cdn:{type:String},widgetId:{type:String,attribute:"widget"},state:{type:String}});customElements.define("molin-shop-ai-launcher",Wr);var Ci,Gt,Xt,dt,Zr,Gr,ki=class{constructor(e,r,n,i=window.history){d(this,Ci);d(this,Gt);d(this,Xt);d(this,dt);d(this,Zr,!1);d(this,Gr,()=>{l(this,Gt).test(window.location.pathname)&&l(this,Xt).navigated()});g(this,Ci,e),g(this,Gt,r),g(this,Xt,n),g(this,dt,i),e.addController(this)}hostConnected(){window.addEventListener("pageshow",l(this,Gr));let e=l(this,dt).pushState;l(this,dt).pushState=(...r)=>{if(e.call(l(this,dt),...r),!l(this,Zr))try{let n=new URL(r[2],window.location.origin);l(this,Gt).test(n.pathname)&&l(this,Xt).navigated()}catch{}}}hostDisconnected(){window.removeEventListener("pageshow",l(this,Gr)),g(this,Zr,!0)}};Ci=new WeakMap,Gt=new WeakMap,Xt=new WeakMap,dt=new WeakMap,Zr=new WeakMap,Gr=new WeakMap;function ql({minMs:t,maxMs:e}){return Math.random()*(e-t)+t}function eo(t,e=""){return Object.entries(t).filter(([r,n])=>n).map(([r,n])=>`${e}${r}-[${n}]`).join(" ")}function zl(t,e={}){return[eo(t),eo(e,"max-sm:")].join(" ")}function Wl(t){return eo(t)}function to(t){return Object.entries(t).filter(([e,r])=>r).filter(([e])=>e==="left"||e==="right").map(([e,r])=>{let n=`sm:${e}-[${r}]`;return e==="left"&&(n+=" sm:right-auto"),e==="right"&&(n+=" sm:left-auto"),n}).join(" ")}function Zl(t){let e=to(t),n=`sm:bottom-[${t.bottom?`calc(${t.bottom}+72px)`:"72px"}]`;return[e,n].filter(Boolean).join(" ")}var $i,Jr,no,q,mt,Ei,U,Gl,Xr,ro,Xl,Jl,Kl,Jt,ye=class extends T(S){constructor(){super();d(this,U);d(this,$i,new Be(this,{onError:console.error}));d(this,Jr);d(this,no,new ki(this,/.*/i,{navigated:()=>{let r=l(this,U,ro);F("ShopAssistant: pageview",{widgetId:this.widgetId,conversationId:r?.conversationId||"",url:document.location.href,title:document.title,hidden:this.config?this.config.hidden||!1:void 0})}}));d(this,q,!1);d(this,mt,!1);d(this,Ei,{onError:r=>{alert(r.error),console.error(r.widgetId,r.error),F("ShopAssistant: error",{...r,immediate:!0})},onNewMessageStartedStreaming:r=>{F("ShopAssistant: user received bot message (streaming started)",r)},onMessageEndedStreaming:r=>{F("ShopAssistant: user received bot message (streaming ended)",r)},onUserCanceledStreaming:r=>{F("ShopAssistant: user canceled streaming",r)},onUserClickedLink:r=>{F("ShopAssistant: user clicked link",r)},onUserSentInput:r=>{F("ShopAssistant: user sent input",r)}});this.cdn="https://widget.molin.ai",this.widgetId="",this.xUserData=qe()?.userData,this.xCustomInstructions=qe()?.customInstructions}get config(){return l(this,Jr)||l(this,$i).data}render(){if(!this.config)return E;let r=zl(this.config.bubble.position,this.config.bubble.mobilePosition),n=Wl(this.config.bubble.position),i=to(this.config.bubble.position),s=Zl(this.config.bubble.position);return this.config.hidden?E:bi().hidden?E:h`
900
910
  <mw-bubble
901
- class="${t} ${f(this,de)?"opacity-0":"opacity-100"} fixed z-[${f(this,te,Qf)}] transition-opacity"
902
- @click="${$(this,te,t0)}"
903
- state="${f(this,de)?"close":"open"}"
911
+ class="${r} ${l(this,q)?"opacity-0":"opacity-100"} fixed z-[${l(this,U,Gl)}] transition-opacity"
912
+ @click="${m(this,U,Jl)}"
913
+ state="${l(this,q)?"close":"open"}"
904
914
  src="${this.config.bubble?.imageUrl||""}"></mw-bubble>
905
915
 
906
916
  <!-- only load the component if enabled on any platform -->
907
- ${this.isPopupEnabled?y`
917
+ ${this.isPopupEnabled?h`
908
918
  <mw-popup
909
919
  position="${s}"
910
- delay="${this.config.popup?.delayMs||Zf({minMs:2e3,maxMs:5e3})}"
920
+ delay="${this.config.popup?.delayMs||ql({minMs:2e3,maxMs:5e3})}"
911
921
  sound="https://assets.molinai.io/2024/widget-v20241209/popup.aac"
912
922
  .content="${{desktop:{text:this.config.popup?.text||"Hello there. How can we help?"},mobile:{title:this.config.popup?.mobileTitleText||`Chat with ${this.config.title}`,text:this.config.popup?.text||"Hello there. How can we help?",button:this.config.popup?.mobileButtonText||`Chat with ${this.config.title}`,color:this.config.color,poweredBy:!this.config.removePoweredBy}}}"
913
- @mw:click="${$(this,te,e0)}"></mw-popup>
914
- `:j}
923
+ @mw:click="${m(this,U,Xl)}"></mw-popup>
924
+ `:E}
915
925
 
916
926
  <!-- show "Try it out" if enabled (even if the chat window is showing) -->
917
- ${this.config?.tryItOut?.mobileEnabled||this.config?.tryItOut?.desktopEnabled?y`<mw-try-it-out
927
+ ${this.config?.tryItOut?.mobileEnabled||this.config?.tryItOut?.desktopEnabled?h`<mw-try-it-out
918
928
  class="${this.config?.tryItOut?.mobileEnabled?"visible":"invisible"} ${this.config?.tryItOut?.desktopEnabled?"sm:visible":"sm:invisible"}"
919
- position="${r}"
920
- text="${this.config.tryItOut?.text||""}"></mw-try-it-out>`:j}
929
+ position="${n}"
930
+ text="${this.config.tryItOut?.text||""}"></mw-try-it-out>`:E}
921
931
 
922
932
  <!-- On first render, do not render the dialog, so it does not connect to backend. Once it's rendered once, it's never removed from the DOM. -->
923
- ${f(this,Ai)?y`
933
+ ${l(this,mt)?h`
924
934
  <div
925
- class="${f(this,de)?"visible opacity-100 translate-y-0":"invisible opacity-0 translate-y-3"} ${n} fixed inset-0 z-[2147483647] bg-white font-sans text-[16px] leading-normal text-gray-800 shadow-2xl transition-all sm:bottom-[1.5rem] sm:top-auto sm:h-[92%] sm:max-h-[800px] sm:w-[calc(100dvh*0.50)] sm:min-w-[300px] sm:max-w-[400px] sm:rounded-[36px] 2xl:max-w-[420px]">
935
+ class="${l(this,q)?"visible opacity-100 translate-y-0":"invisible opacity-0 translate-y-3"} ${i} fixed inset-0 z-[2147483647] bg-white font-sans text-[16px] leading-normal text-gray-800 shadow-2xl transition-all sm:bottom-[1.5rem] sm:top-auto sm:h-[92%] sm:max-h-[800px] sm:w-[calc(100dvh*0.50)] sm:min-w-[300px] sm:max-w-[400px] sm:rounded-[36px] 2xl:max-w-[420px]">
926
936
  <mw-chat
927
937
  widget="${this.widgetId}"
928
938
  .config="${this.config}"
929
- .callbacks="${f(this,Jo)}"
939
+ .callbacks="${l(this,Ei)}"
930
940
  .xUserData="${this.xUserData}"
931
941
  .xCustomInstructions="${this.xCustomInstructions}"
932
942
  ?show-close="${!0}"
933
- @mw:close-click="${$(this,te,i0)}">
943
+ @mw:close-click="${m(this,U,Kl)}">
934
944
  <slot name="banner" slot="banner"></slot>
935
945
  </mw-chat>
936
946
  </div>
937
- `:j}
938
- `}get isPopupEnabled(){return window.matchMedia("(min-width: 640px)").matches?!!this.config?.popup?.desktopEnabled:!!this.config?.popup?.mobileEnabled}updated(){f(this,de)&&f(this,te,Nn)?.hide()}firstUpdated(){window.matchMedia("(min-width: 640px)").matches&&Qu.get(Yf)?.isOpen&&this.openChat()}openChat(){f(this,de)||(E(this,de,!0),E(this,Ai,!0),this.requestUpdate(),$(this,te,xr).call(this,!0),f(this,te,Nn)?.hide(),se("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"programmatic-method",state:f(this,de)?"open":"close"}))}closeChat(){f(this,de)&&(E(this,de,!1),this.requestUpdate(),$(this,te,xr).call(this,!1),f(this,te,Nn)?.hide(),se("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"programmatic-method",state:f(this,de)?"open":"close"}))}showLauncher(){let t=zo();t.hidden=!1,this.requestUpdate(),se("ShopAssistant: called show launcher",{widgetId:this.widgetId,source:"programmatic-method"})}hideLauncher(){let t=zo();t.hidden=!0,this.requestUpdate(),se("ShopAssistant: called hide launcher",{widgetId:this.widgetId,source:"programmatic-method"})}injectConfig(t){E(this,Un,t),this.requestUpdate()}reset(){this.xUserData={},this.xCustomInstructions="",f(this,te,Go)?.reset(),this.requestUpdate()}};Zo=new WeakMap,Un=new WeakMap,ec=new WeakMap,tc=new WeakMap,de=new WeakMap,Ai=new WeakMap,Jo=new WeakMap,te=new WeakSet,Qf=function(){return typeof this.config?.bubble?.zIndex=="number"?this.config.bubble.zIndex:2147483647},Nn=function(){return this.renderRoot.querySelector("mw-popup")},Go=function(){return this.renderRoot.querySelector("mw-chat")},e0=function(){E(this,de,!0),E(this,Ai,!0),this.requestUpdate(),$(this,te,xr).call(this,!0),se("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"popup-click",state:f(this,de)?"open":"close"})},t0=function(){E(this,de,!f(this,de)),E(this,Ai,!0),this.requestUpdate(),$(this,te,xr).call(this,f(this,de)),f(this,te,Nn)?.hide(),se("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"bubble-toggle",state:f(this,de)?"open":"close"})},i0=function(){E(this,de,!1),this.requestUpdate(),$(this,te,xr).call(this,!1),se("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"top-right-close-button",state:f(this,de)?"open":"close"})},xr=function(t){Qu.set(Yf,{isOpen:t})},M(at,"styles",mt`
947
+ `:E}
948
+ `}get isPopupEnabled(){return window.matchMedia("(min-width: 640px)").matches?!!this.config?.popup?.desktopEnabled:!!this.config?.popup?.mobileEnabled}updated(){l(this,q)&&l(this,U,Xr)?.hide()}firstUpdated(){window.matchMedia("(min-width: 640px)").matches&&ue.molin_widget_open_state?.isOpen&&this.openChat()}openChat(){l(this,q)||(g(this,q,!0),g(this,mt,!0),this.requestUpdate(),m(this,U,Jt).call(this,!0),l(this,U,Xr)?.hide(),F("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"programmatic-method",state:l(this,q)?"open":"close"}))}closeChat(){l(this,q)&&(g(this,q,!1),this.requestUpdate(),m(this,U,Jt).call(this,!1),l(this,U,Xr)?.hide(),F("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"programmatic-method",state:l(this,q)?"open":"close"}))}showLauncher(){let r=bi();r.hidden=!1,this.requestUpdate(),F("ShopAssistant: called show launcher",{widgetId:this.widgetId,source:"programmatic-method"})}hideLauncher(){let r=bi();r.hidden=!0,this.requestUpdate(),F("ShopAssistant: called hide launcher",{widgetId:this.widgetId,source:"programmatic-method"})}injectConfig(r){g(this,Jr,r),this.requestUpdate()}reset(){this.xUserData={},this.xCustomInstructions="",l(this,U,ro)?.reset(),this.requestUpdate()}};$i=new WeakMap,Jr=new WeakMap,no=new WeakMap,q=new WeakMap,mt=new WeakMap,Ei=new WeakMap,U=new WeakSet,Gl=function(){return typeof this.config?.bubble?.zIndex=="number"?this.config.bubble.zIndex:2147483647},Xr=function(){return this.renderRoot.querySelector("mw-popup")},ro=function(){return this.renderRoot.querySelector("mw-chat")},Xl=function(){g(this,q,!0),g(this,mt,!0),this.requestUpdate(),m(this,U,Jt).call(this,!0),F("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"popup-click",state:l(this,q)?"open":"close"})},Jl=function(){g(this,q,!l(this,q)),g(this,mt,!0),this.requestUpdate(),m(this,U,Jt).call(this,l(this,q)),l(this,U,Xr)?.hide(),F("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"bubble-toggle",state:l(this,q)?"open":"close"})},Kl=function(){g(this,q,!1),this.requestUpdate(),m(this,U,Jt).call(this,!1),F("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"top-right-close-button",state:l(this,q)?"open":"close"})},Jt=function(r){ue.molin_widget_open_state={isOpen:r}},w(ye,"styles",Ee`
939
949
  :host {
940
950
  all: initial; /* reset all properties that can pierce the shadow DOM */
941
951
  }
942
- `),M(at,"properties",{cdn:{type:String},widgetId:{type:String,attribute:"widget"},xUserData:{type:Object,attribute:!1},xCustomInstructions:{type:String,attribute:!1}});customElements.define("molin-shop-ai",at);export{at as MolinShopAI};
952
+ `),w(ye,"properties",{cdn:{type:String},widgetId:{type:String,attribute:"widget"},xUserData:{type:Object,attribute:!1},xCustomInstructions:{type:String,attribute:!1}});customElements.define("molin-shop-ai",ye);export{ye as MolinShopAI};
943
953
  /*! Bundled license information:
944
954
 
945
955
  @lit/reactive-element/css-tag.js: