@molin.ai/shop-ai 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/molin-shop-ai.min.js +58 -28
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var $c=Object.defineProperty;var ea=e=>{throw TypeError(e)};var Sc=(e,t,r)=>t in e?$c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var g=(e,t,r)=>Sc(e,typeof t!="symbol"?t+"":t,r),as=(e,t,r)=>t.has(e)||ea("Cannot "+r);var a=(e,t,r)=>(as(e,t,"read from private field"),r?r.call(e):t.get(e)),f=(e,t,r)=>t.has(e)?ea("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),m=(e,t,r,n)=>(as(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),y=(e,t,r)=>(as(e,t,"access private method"),r);var ta=(e,t,r,n)=>({set _(i){m(e,t,i,r)},get _(){return a(e,t,n)}});var On=globalThis,jn=On.ShadowRoot&&(On.ShadyCSS===void 0||On.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ls=Symbol(),ra=new WeakMap,br=class{constructor(t,r,n){if(this._$cssResult$=!0,n!==ls)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=r}get styleSheet(){let t=this.o,r=this.t;if(jn&&t===void 0){let n=r!==void 0&&r.length===1;n&&(t=ra.get(r)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&ra.set(r,t))}return t}toString(){return this.cssText}},na=e=>new br(typeof e=="string"?e:e+"",void 0,ls),ie=(e,...t)=>{let r=e.length===1?e[0]:t.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)+e[s+1],e[0]);return new br(r,e,ls)},ia=(e,t)=>{if(jn)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),i=On.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,e.appendChild(n)}},us=jn?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let r="";for(let n of t.cssRules)r+=n.cssText;return na(r)})(e):e;var{is:Ec,defineProperty:_c,getOwnPropertyDescriptor:
|
|
1
|
+
var $c=Object.defineProperty;var ea=e=>{throw TypeError(e)};var Sc=(e,t,r)=>t in e?$c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var g=(e,t,r)=>Sc(e,typeof t!="symbol"?t+"":t,r),as=(e,t,r)=>t.has(e)||ea("Cannot "+r);var a=(e,t,r)=>(as(e,t,"read from private field"),r?r.call(e):t.get(e)),f=(e,t,r)=>t.has(e)?ea("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),m=(e,t,r,n)=>(as(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),y=(e,t,r)=>(as(e,t,"access private method"),r);var ta=(e,t,r,n)=>({set _(i){m(e,t,i,r)},get _(){return a(e,t,n)}});var On=globalThis,jn=On.ShadowRoot&&(On.ShadyCSS===void 0||On.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ls=Symbol(),ra=new WeakMap,br=class{constructor(t,r,n){if(this._$cssResult$=!0,n!==ls)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=r}get styleSheet(){let t=this.o,r=this.t;if(jn&&t===void 0){let n=r!==void 0&&r.length===1;n&&(t=ra.get(r)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&ra.set(r,t))}return t}toString(){return this.cssText}},na=e=>new br(typeof e=="string"?e:e+"",void 0,ls),ie=(e,...t)=>{let r=e.length===1?e[0]:t.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)+e[s+1],e[0]);return new br(r,e,ls)},ia=(e,t)=>{if(jn)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),i=On.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,e.appendChild(n)}},us=jn?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let r="";for(let n of t.cssRules)r+=n.cssText;return na(r)})(e):e;var{is:Ec,defineProperty:_c,getOwnPropertyDescriptor:Mc,getOwnPropertyNames:Ac,getOwnPropertySymbols:Ic,getPrototypeOf:Oc}=Object,Tn=globalThis,sa=Tn.trustedTypes,jc=sa?sa.emptyScript:"",Tc=Tn.reactiveElementPolyfillSupport,kr=(e,t)=>e,cs={toAttribute(e,t){switch(t){case Boolean:e=e?jc:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},aa=(e,t)=>!Ec(e,t),oa={attribute:!0,type:String,converter:cs,reflect:!1,useDefault:!1,hasChanged:aa};Symbol.metadata??=Symbol("metadata"),Tn.litPropertyMetadata??=new WeakMap;var je=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,r=oa){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(t,r),!r.noAccessor){let n=Symbol(),i=this.getPropertyDescriptor(t,n,r);i!==void 0&&_c(this.prototype,t,i)}}static getPropertyDescriptor(t,r,n){let{get:i,set:s}=Mc(this.prototype,t)??{get(){return this[r]},set(o){this[r]=o}};return{get:i,set(o){let u=i?.call(this);s?.call(this,o),this.requestUpdate(t,u,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??oa}static _$Ei(){if(this.hasOwnProperty(kr("elementProperties")))return;let t=Oc(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(kr("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(kr("properties"))){let r=this.properties,n=[...Ac(r),...Ic(r)];for(let i of n)this.createProperty(i,r[i])}let t=this[Symbol.metadata];if(t!==null){let r=litPropertyMetadata.get(t);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(t){let r=[];if(Array.isArray(t)){let n=new Set(t.flat(1/0).reverse());for(let i of n)r.unshift(us(i))}else t!==void 0&&r.push(us(t));return r}static _$Eu(t,r){let n=r.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,r=this.constructor.elementProperties;for(let n of r.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ia(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,r,n){this._$AK(t,n)}_$ET(t,r){let n=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,n);if(i!==void 0&&n.reflect===!0){let s=(n.converter?.toAttribute!==void 0?n.converter:cs).toAttribute(r,n.type);this._$Em=t,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(t,r){let n=this.constructor,i=n._$Eh.get(t);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:cs;this._$Em=i;let u=o.fromAttribute(r,s.type);this[i]=u??this._$Ej?.get(i)??u,this._$Em=null}}requestUpdate(t,r,n){if(t!==void 0){let i=this.constructor,s=this[t];if(n??=i.getPropertyOptions(t),!((n.hasChanged??aa)(s,r)||n.useDefault&&n.reflect&&s===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,n))))return;this.C(t,r,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,r,{useDefault:n,reflect:i,wrapped:s},o){n&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??r??this[t]),s!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||n||(r=void 0),this._$AL.set(t,r)),i===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}let t=this.scheduleUpdate();return t!=null&&await t,!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){let{wrapped:o}=s,u=this[i];o!==!0||this._$AL.has(i)||u===void 0||this.C(i,void 0,s,u)}}let t=!1,r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(r)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(r)}willUpdate(t){}_$AE(t){this._$EO?.forEach(r=>r.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(r=>this._$ET(r,this[r])),this._$EM()}updated(t){}firstUpdated(t){}};je.elementStyles=[],je.shadowRootOptions={mode:"open"},je[kr("elementProperties")]=new Map,je[kr("finalized")]=new Map,Tc?.({ReactiveElement:je}),(Tn.reactiveElementVersions??=[]).push("2.1.1");var hs=globalThis,Ln=hs.trustedTypes,la=Ln?Ln.createPolicy("lit-html",{createHTML:e=>e}):void 0,ds="$lit$",Te=`lit$${Math.random().toFixed(9).slice(2)}$`,fs="?"+Te,Lc=`<${fs}>`,nt=document,$r=()=>nt.createComment(""),Sr=e=>e===null||typeof e!="object"&&typeof e!="function",ms=Array.isArray,fa=e=>ms(e)||typeof e?.[Symbol.iterator]=="function",ps=`[
|
|
2
2
|
\f\r]`,Cr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ua=/-->/g,ca=/>/g,tt=RegExp(`>|${ps}(?:([^\\s"'>=/]+)(${ps}*=${ps}*(?:[^
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),pa=/'/g,ha=/"/g,ma=/^(?:script|style|textarea|title)$/i,gs=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),d=gs(1),
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),pa=/'/g,ha=/"/g,ma=/^(?:script|style|textarea|title)$/i,gs=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),d=gs(1),K1=gs(2),X1=gs(3),xe=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),da=new WeakMap,rt=nt.createTreeWalker(nt,129);function ga(e,t){if(!ms(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return la!==void 0?la.createHTML(t):t}var ya=(e,t)=>{let r=e.length-1,n=[],i,s=t===2?"<svg>":t===3?"<math>":"",o=Cr;for(let u=0;u<r;u++){let l=e[u],c,p,h=-1,v=0;for(;v<l.length&&(o.lastIndex=v,p=o.exec(l),p!==null);)v=o.lastIndex,o===Cr?p[1]==="!--"?o=ua:p[1]!==void 0?o=ca:p[2]!==void 0?(ma.test(p[2])&&(i=RegExp("</"+p[2],"g")),o=tt):p[3]!==void 0&&(o=tt):o===tt?p[0]===">"?(o=i??Cr,h=-1):p[1]===void 0?h=-2:(h=o.lastIndex-p[2].length,c=p[1],o=p[3]===void 0?tt:p[3]==='"'?ha:pa):o===ha||o===pa?o=tt:o===ua||o===ca?o=Cr:(o=tt,i=void 0);let b=o===tt&&e[u+1].startsWith("/>")?" ":"";s+=o===Cr?l+Lc:h>=0?(n.push(c),l.slice(0,h)+ds+l.slice(h)+Te+b):l+Te+(h===-2?u:b)}return[ga(e,s+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]},Er=class e{constructor({strings:t,_$litType$:r},n){let i;this.parts=[];let s=0,o=0,u=t.length-1,l=this.parts,[c,p]=ya(t,r);if(this.el=e.createElement(c,n),rt.currentNode=this.el.content,r===2||r===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=rt.nextNode())!==null&&l.length<u;){if(i.nodeType===1){if(i.hasAttributes())for(let h of i.getAttributeNames())if(h.endsWith(ds)){let v=p[o++],b=i.getAttribute(h).split(Te),$=/([.?@])?(.*)/.exec(v);l.push({type:1,index:s,name:$[2],strings:b,ctor:$[1]==="."?Pn:$[1]==="?"?Rn:$[1]==="@"?Un:st}),i.removeAttribute(h)}else h.startsWith(Te)&&(l.push({type:6,index:s}),i.removeAttribute(h));if(ma.test(i.tagName)){let h=i.textContent.split(Te),v=h.length-1;if(v>0){i.textContent=Ln?Ln.emptyScript:"";for(let b=0;b<v;b++)i.append(h[b],$r()),rt.nextNode(),l.push({type:2,index:++s});i.append(h[v],$r())}}}else if(i.nodeType===8)if(i.data===fs)l.push({type:2,index:s});else{let h=-1;for(;(h=i.data.indexOf(Te,h+1))!==-1;)l.push({type:7,index:s}),h+=Te.length-1}s++}}static createElement(t,r){let n=nt.createElement("template");return n.innerHTML=t,n}};function it(e,t,r=e,n){if(t===xe)return t;let i=n!==void 0?r._$Co?.[n]:r._$Cl,s=Sr(t)?void 0:t._$litDirective$;return i?.constructor!==s&&(i?._$AO?.(!1),s===void 0?i=void 0:(i=new s(e),i._$AT(e,r,n)),n!==void 0?(r._$Co??=[])[n]=i:r._$Cl=i),i!==void 0&&(t=it(e,i._$AS(e,t.values),i,n)),t}var Dn=class{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:r},parts:n}=this._$AD,i=(t?.creationScope??nt).importNode(r,!0);rt.currentNode=i;let s=rt.nextNode(),o=0,u=0,l=n[0];for(;l!==void 0;){if(o===l.index){let c;l.type===2?c=new It(s,s.nextSibling,this,t):l.type===1?c=new l.ctor(s,l.name,l.strings,this,t):l.type===6&&(c=new Vn(s,this,t)),this._$AV.push(c),l=n[++u]}o!==l?.index&&(s=rt.nextNode(),o++)}return rt.currentNode=nt,i}p(t){let r=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,r),r+=n.strings.length-2):n._$AI(t[r])),r++}},It=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,r,n,i){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,r=this._$AM;return r!==void 0&&t?.nodeType===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=it(this,t,r),Sr(t)?t===A||t==null||t===""?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==xe&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):fa(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==A&&Sr(this._$AH)?this._$AA.nextSibling.data=t:this.T(nt.createTextNode(t)),this._$AH=t}$(t){let{values:r,_$litType$:n}=t,i=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=Er.createElement(ga(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(r);else{let s=new Dn(i,this),o=s.u(this.options);s.p(r),this.T(o),this._$AH=s}}_$AC(t){let r=da.get(t.strings);return r===void 0&&da.set(t.strings,r=new Er(t)),r}k(t){ms(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,n,i=0;for(let s of t)i===r.length?r.push(n=new e(this.O($r()),this.O($r()),this,this.options)):n=r[i],n._$AI(s),i++;i<r.length&&(this._$AR(n&&n._$AB.nextSibling,i),r.length=i)}_$AR(t=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);t!==this._$AB;){let n=t.nextSibling;t.remove(),t=n}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},st=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,n,i,s){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,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=A}_$AI(t,r=this,n,i){let s=this.strings,o=!1;if(s===void 0)t=it(this,t,r,0),o=!Sr(t)||t!==this._$AH&&t!==xe,o&&(this._$AH=t);else{let u=t,l,c;for(t=s[0],l=0;l<s.length-1;l++)c=it(this,u[n+l],r,l),c===xe&&(c=this._$AH[l]),o||=!Sr(c)||c!==this._$AH[l],c===A?t=A:t!==A&&(t+=(c??"")+s[l+1]),this._$AH[l]=c}o&&!i&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Pn=class extends st{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}},Rn=class extends st{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A)}},Un=class extends st{constructor(t,r,n,i,s){super(t,r,n,i,s),this.type=5}_$AI(t,r=this){if((t=it(this,t,r,0)??A)===xe)return;let n=this._$AH,i=t===A&&n!==A||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,s=t!==A&&(n===A||i);i&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},Vn=class{constructor(t,r,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){it(this,t)}},wa={M:ds,P:Te,A:fs,C:1,L:ya,R:Dn,D:fa,V:it,I:It,H:st,N:Rn,U:Un,B:Pn,F:Vn},Dc=hs.litHtmlPolyfillSupport;Dc?.(Er,It),(hs.litHtmlVersions??=[]).push("3.3.1");var va=(e,t,r)=>{let n=r?.renderBefore??t,i=n._$litPart$;if(i===void 0){let s=r?.renderBefore??null;n._$litPart$=i=new It(t.insertBefore($r(),s),s,void 0,r??{})}return i._$AI(e),i};var ys=globalThis,_=class extends je{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=va(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return xe}};_._$litElement$=!0,_.finalized=!0,ys.litElementHydrateSupport?.({LitElement:_});var Pc=ys.litElementPolyfillSupport;Pc?.({LitElement:_});(ys.litElementVersions??=[]).push("4.2.1");var _r=class _r extends HTMLElement{constructor(){super();g(this,"name","");this.attachShadow({mode:"open"})}attributeChangedCallback(r,n,i){if(n!==i&&_r.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;
|
|
@@ -119,7 +119,9 @@ var $c=Object.defineProperty;var ea=e=>{throw TypeError(e)};var Sc=(e,t,r)=>t in
|
|
|
119
119
|
<path d="M19.5 13.5L12 21M12 21L4.5 13.5M12 21L12 3" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
120
120
|
</svg>`,"bars-3":`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
121
121
|
<path d="M3.75 6.75H20.25M3.75 12H20.25M3.75 17.25H20.25" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
122
|
-
</svg>`};var Rc=xa,ws=class extends Bn{resolveIcon(t){let r=Rc[t];if(!r)throw console.warn("hi-outline: icon not found",t),new Error(`Icon ${t} not found`);return r}render(){super.render();let t=this.shadowRoot?.querySelector("svg");if(!t)throw new Error("svgEl not found "+this.name);t.setAttribute("fill","none"),t.querySelectorAll("[stroke]").forEach(r=>{r.setAttribute("stroke","currentColor")})}};customElements.get("hi-outline")||customElements.define("hi-outline",ws);var Ar,ae,be,Mr,vs,Nn=class{constructor(t,r){f(this,Mr);f(this,Ar);f(this,ae);f(this,be);if(!t)throw new Error("host is required");if(!r)throw new Error("config is required");m(this,Ar,t),a(this,Ar).addController(this),m(this,ae,r)}connect(t){m(this,ae,t),m(this,be,y(this,Mr,vs).call(this))}hostConnected(){setTimeout(()=>{m(this,be,y(this,Mr,vs).call(this))},0)}hostDisconnected(){a(this,be)?.close(1e3,"lit_host_disconnected"),m(this,be,void 0)}send(t){a(this,be)?.send(t)}close(t,r){a(this,be)?.close(t,r)}get isConnected(){return a(this,be)?.readyState===WebSocket.OPEN}get isConnecting(){return a(this,be)?.readyState===WebSocket.CONNECTING}};Ar=new WeakMap,ae=new WeakMap,be=new WeakMap,Mr=new WeakSet,vs=function(){let t=new WebSocket(a(this,ae).url());return a(this,ae).onClose&&(t.onclose=a(this,ae).onClose),a(this,ae).onOpen&&(t.onopen=a(this,ae).onOpen),a(this,ae).onError&&(t.onerror=a(this,ae).onError),a(this,ae).onMessage&&(t.onmessage=a(this,ae).onMessage),t};var ba=Array.isArray;var xs=e=>!!(e&&e.constructor&&e.call&&e.apply);var ka=e=>!(!e||!e.then||!xs(e.then));function*Ca(e,t,r=i=>i,n=1){let i=xs(r)?r:()=>r,s=t?e:0,o=t??e;for(let u=s;u<=o&&(yield i(u),!(u+n>o));u+=n);}var ks=async(e,t)=>{let r=e?.times??3,n=e?.delay,i=e?.backoff??null;for(let s of Ca(1,r)){let[o,u]=await Cs(t)(l=>{throw{_exited:l}});if(!o)return u;if(o._exited)throw o._exited;if(s===r)throw o;n&&await bs(n),i&&await bs(i(s))}},bs=e=>new Promise(t=>setTimeout(t,e)),Cs=e=>(...t)=>{try{let r=e(...t);return ka(r)?r.then(n=>[void 0,n]).catch(n=>[n,void 0]):[void 0,r]}catch(r){return[r,void 0]}};var $a="664df22d-d461-42d6-801e-f70247e2cd7c",Z,X,z,Ot,jt,me,G,_e,Sa,Ea,_a,Aa,Hn=class{constructor(t,r){f(this,G);f(this,Z);f(this,X);f(this,z,null);g(this,"isStreaming",!1);g(this,"typingIndicator");g(this,"ranOutOfCredits",!1);g(this,"messages",[]);g(this,"conversationId","");f(this,Ot,0);f(this,jt);g(this,"isLiveMode",!1);f(this,me,[]);m(this,Z,t),m(this,X,r),a(this,X).autoConnect!==!1&&m(this,z,this.initWS()),t.addController(this)}get hasQueuedMessages(){return a(this,me).length>0}async enqueueMessage(t,{expectStreaming:r=!1}={}){if(a(this,me).length>0){let n=a(this,me)[a(this,me).length-1];if(t.type==="USER_INPUT"&&n.message.type==="USER_INPUT"&&t.value===n.message.value)return!0}return a(this,z)||this.connect(),a(this,z)?.isConnected?y(this,G,_e).call(this,t,{expectStreaming:r}):(a(this,me).push({message:t,options:{expectStreaming:r}}),a(this,Z).requestUpdate(),a(this,z)&&!a(this,z).isConnecting&&!a(this,z).isConnected&&this.retry(),await ks({times:5,delay:2e3},async()=>{if(a(this,z)?.isConnected){let n=[...a(this,me)];m(this,me,[]),a(this,Z).requestUpdate();let i=!1;for(let{message:s,options:o}of n){let u=y(this,G,_e).call(this,s,o);s===t&&(i=u)}return i}else throw new Error("WebSocket not connected yet")}).catch(()=>(console.warn("Failed to send message after retries",t),m(this,me,[]),a(this,Z).requestUpdate(),!1)))}sendUserInput(t,{xUserData:r,xCustomInstructions:n,role:i="user",expectStreaming:s=!1}={}){return y(this,G,_e).call(this,{type:"USER_INPUT",value:t,role:i,xUserData:r,xCustomInstructions:n},{expectStreaming:s})}async enqueueUserInput(t,{xUserData:r,xCustomInstructions:n,role:i="user",expectStreaming:s=!1}={}){return this.enqueueMessage({type:"USER_INPUT",value:t,role:i,xUserData:r,xCustomInstructions:n},{expectStreaming:s})}sendUserCancel(){return y(this,G,_e).call(this,{type:"USER_CANCEL"})}sendUserTypingStart(){return y(this,G,_e).call(this,{type:"USER_TYPING_START"})}sendUserTypingStop(){return y(this,G,_e).call(this,{type:"USER_TYPING_STOP"})}sendUserMeta(t){return y(this,G,_e).call(this,{type:"USER_META",metadata:t})}reloadConfig(){y(this,G,_e).call(this,{type:"RELOAD_CONFIG"})}close(){a(this,z)?.close(1e3,"closed by user")}retry(){clearTimeout(a(this,jt)),m(this,jt,setTimeout(()=>{a(this,X).onReconnect?.(),m(this,z,this.initWS())},1e3*a(this,Ot))),ta(this,Ot)._++}initWS(){return new Nn(a(this,Z),{url:()=>a(this,X).url(this.conversationId,{}),onOpen:t=>y(this,G,Sa).call(this,t),onMessage:t=>y(this,G,Ea).call(this,JSON.parse(t.data)),onError:t=>y(this,G,_a).call(this,t),onClose:t=>y(this,G,Aa).call(this,t)})}hostConnected(){this.conversationId=a(this,X).restoreConversationState?.()?.conversationId||"",this.messages=a(this,X).restoreConversationState?.()?.messages||[]}reset(){y(this,G,_e).call(this,{type:"NEW_CHAT"}),a(this,X).onReset?.(),this.isStreaming=!1,this.typingIndicator=void 0,this.ranOutOfCredits=!1,this.messages=[],this.conversationId="",this.isLiveMode=!1,m(this,me,[]),a(this,Z).requestUpdate()}hostDisconnected(){clearTimeout(a(this,jt))}connect(){a(this,z)||m(this,z,this.initWS())}reconnectSocket(){a(this,z)?.close(1e3,"destroy"),m(this,z,this.initWS())}get lastMsg(){if(this.messages.length>0)return this.messages[this.messages.length-1]}};Z=new WeakMap,X=new WeakMap,z=new WeakMap,Ot=new WeakMap,jt=new WeakMap,me=new WeakMap,G=new WeakSet,_e=function(t,{expectStreaming:r=!1}={}){return a(this,z)?a(this,z).isConnecting?(console.warn("WebSocket is connecting, message not sent",t),!1):a(this,z).isConnected?(r&&!this.isLiveMode&&(this.isStreaming=!0,a(this,Z).requestUpdate()),a(this,z).send(JSON.stringify(t)),!0):(console.warn("WebSocket is not connected, message not sent",t),this.retry(),!1):(console.warn("WebSocket not initialized, message not sent",t),this.connect(),!1)},Sa=function(t){m(this,Ot,0)},Ea=function(t){switch(t.type){case"NEW_MESSAGE":{this.messages=[...this.messages,{...t.message,streaming:!0}].filter((r,n,i)=>n===i.findIndex(s=>s.id===r.id)),this.typingIndicator=void 0,a(this,Z).requestUpdate(),a(this,X).onNewMessage?.(t.message);break}case"APPEND_MESSAGE":{let r=this.messages.find(n=>n.id===t.message.id);if(r){switch(t.message.content_type){case"text":{let{part:n,delta:i,position:s}=t.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}=t.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}=t.message;r.parts||=[],r.parts[n]={tag:t.message.tag,data:r.parts[n]&&"data"in r.parts[n]?Object.assign(r.parts[n].data||{},t.message.data):t.message.data};break}}t.metadata&&(r.metadata=t.metadata),a(this,X).onMessageAppend?.(t),a(this,Z).requestUpdate()}else throw new Error(`Message with id ${t.message.id} not found`);break}case"MESSAGE_DONE":{let r=this.messages.find(n=>n.id===t.message.id);if(r)Object.assign(r,t.message),r.streaming=!1;else throw new Error(`Message with id ${t.message.id} not found`);this.isStreaming=!1,a(this,Z).requestUpdate(),a(this,X).onMessageDone?.(t,r),a(this,X).persistConversationState?.(this.conversationId,this.messages);break}case"MESSAGE_CANCEL":{this.isStreaming=!1,this.typingIndicator=void 0,a(this,Z).requestUpdate();break}case"ERROR":{a(this,X).onMessageError?.(t);break}case"CONNECTED":{this.conversationId=t.conversationId,this.messages=t.messages,a(this,X).onConnect?.(t.conversationId),a(this,X).persistConversationState?.(t.conversationId,t.messages),this.isLiveMode=t.metadata?.isLiveMode,a(this,Z).requestUpdate();break}case"TYPING_START":{t.role==="assistant"&&(this.isStreaming=!0),this.typingIndicator={role:t.role,metadata:t.metadata},a(this,Z).requestUpdate();break}case"TYPING_STOP":{this.typingIndicator=void 0,a(this,Z).requestUpdate();break}case"RAN_OUT_OF_CREDITS":{this.messages.some(r=>r.id===$a)||this.messages.push({id:$a,role:"assistant",content:"Sorry, I've run out of credits. Please contact the shop directly.",timestamp:Date.now()}),this.ranOutOfCredits=!0,a(this,Z).requestUpdate();break}case"RECONNECT":{this.reconnectSocket(),a(this,Z).requestUpdate();break}default:console.warn(`Unknown message type: ${JSON.stringify(t)}`)}},_a=function(t){console.error("onError",t),a(this,X).onError?.(t)},Aa=function(t){a(this,Z).isConnected&&a(this,z)&&!a(this,z).isConnected&&t.reason==="reconnect"&&this.retry(),this.isStreaming=!1,this.typingIndicator=void 0,a(this,Z).requestUpdate(),a(this,X).onClose?.()};var Hh=Symbol(),Uc=Symbol();var Ma=Object.getPrototypeOf,$s=new WeakMap,Vc=e=>e&&($s.has(e)?$s.get(e):Ma(e)===Object.prototype||Ma(e)===Array.prototype);var Ia=e=>Vc(e)&&e[Uc]||null,Ss=(e,t=!0)=>{$s.set(e,t)};var Es=e=>typeof e=="object"&&e!==null,Bc=e=>Es(e)&&!_s.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)&&!(e instanceof Promise),Ta=(e,t)=>{let r=Oa.get(e);if(r?.[0]===t)return r[1];let n=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return Ss(n,!0),Oa.set(e,[t,n]),Reflect.ownKeys(e).forEach(i=>{if(Object.getOwnPropertyDescriptor(n,i))return;let s=Reflect.get(e,i),{enumerable:o}=Reflect.getOwnPropertyDescriptor(e,i),u={value:s,enumerable:o,configurable:!0};if(_s.has(s))Ss(s,!1);else if(ot.has(s)){let[l,c]=ot.get(s);u.value=Ta(l,c())}Object.defineProperty(n,i,u)}),Object.preventExtensions(n)},Nc=(e,t,r,n)=>({deleteProperty(i,s){let o=Reflect.get(i,s);r(s);let u=Reflect.deleteProperty(i,s);return u&&n(["delete",[s],o]),u},set(i,s,o,u){let l=!e()&&Reflect.has(i,s),c=Reflect.get(i,s,u);if(l&&(ja(c,o)||zn.has(o)&&ja(c,zn.get(o))))return!0;r(s),Es(o)&&(o=Ia(o)||o);let p=!ot.has(o)&&Fc(o)?As(o):o;return t(s,p),Reflect.set(i,s,p,u),n(["set",[s],o,c]),!0}}),ot=new WeakMap,_s=new WeakSet,Oa=new WeakMap,Fn=[1,1],zn=new WeakMap,ja=Object.is,Hc=(e,t)=>new Proxy(e,t),Fc=Bc,zc=Ta,qc=Nc;function As(e={}){if(!Es(e))throw new Error("object required");let t=zn.get(e);if(t)return t;let r=Fn[0],n=new Set,i=(C,A=++Fn[0])=>{r!==A&&(r=A,n.forEach(k=>k(C,A)))},s=Fn[1],o=(C=++Fn[1])=>(s!==C&&!n.size&&(s=C,l.forEach(([A])=>{let k=A[1](C);k>r&&(r=k)})),r),u=C=>(A,k)=>{let E=[...A];E[1]=[C,...E[1]],i(E,k)},l=new Map,c=(C,A)=>{let k=!_s.has(A)&&ot.get(A);if(k){if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&l.has(C))throw new Error("prop listener already exists");if(n.size){let E=k[2](u(C));l.set(C,[k,E])}else l.set(C,[k])}},p=C=>{var A;let k=l.get(C);k&&(l.delete(C),(A=k[1])==null||A.call(k))},h=C=>(n.add(C),n.size===1&&l.forEach(([k,E],T)=>{if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&E)throw new Error("remove already exists");let N=k[2](u(T));l.set(T,[k,N])}),()=>{n.delete(C),n.size===0&&l.forEach(([k,E],T)=>{E&&(E(),l.set(T,[k]))})}),v=!0,b=qc(()=>v,c,p,i),$=Hc(e,b);zn.set(e,$);let j=[e,o,h];return ot.set($,j),Reflect.ownKeys(e).forEach(C=>{let A=Object.getOwnPropertyDescriptor(e,C);"value"in A&&A.writable&&($[C]=e[C])}),v=!1,$}function qn(e,t,r){let n=ot.get(e);(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!n&&console.warn("Please use proxy object");let i,s=[],o=n[2],u=!1,c=o(p=>{if(s.push(p),r){t(s.splice(0));return}i||(i=Promise.resolve().then(()=>{i=void 0,u&&t(s.splice(0))}))});return u=!0,()=>{u=!1,c()}}function Tt(e){let t=ot.get(e);(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!t&&console.warn("Please use proxy object");let[r,n]=t;return zc(r,n())}var Ir,Lt,at,Dt,Pt=class{constructor(t,r){f(this,Ir);f(this,Lt);f(this,at);f(this,Dt,()=>{});m(this,Ir,t),m(this,Lt,r),m(this,at,Tt(r)),t.addController(this)}get state(){return a(this,at)}get value(){return a(this,at)}hostConnected(){a(this,Dt).call(this),m(this,Dt,qn(a(this,Lt),()=>{m(this,at,Tt(a(this,Lt))),a(this,Ir).requestUpdate()}))}hostDisconnected(){a(this,Dt).call(this)}};Ir=new WeakMap,Lt=new WeakMap,at=new WeakMap,Dt=new WeakMap;var Or,jr,lt,Rt,Ne=class{constructor(t,r,n){f(this,Or);f(this,jr);g(this,"proxyObject");f(this,lt);f(this,Rt,()=>{});m(this,Or,t),m(this,jr,n),this.proxyObject=As(r),m(this,lt,Tt(this.proxyObject)),t.addController(this)}get state(){return a(this,lt)}get value(){return a(this,lt)}hostConnected(){a(this,Rt).call(this),a(this,jr)?.subscribe&&m(this,Rt,qn(this.proxyObject,()=>{m(this,lt,Tt(this.proxyObject)),a(this,Or).requestUpdate()}))}hostDisconnected(){a(this,Rt).call(this)}};Or=new WeakMap,jr=new WeakMap,lt=new WeakMap,Rt=new WeakMap;var Ut,Tr,Vt,ut,ct,Wn=class{constructor(t,{provider:r,tag:n,key:i}){f(this,Ut);f(this,Tr);f(this,Vt);f(this,ut,null);f(this,ct,null);m(this,Ut,t),m(this,Tr,n),m(this,Vt,i),t.addController(this)}get value(){return a(this,ct)?a(this,ct).value:null}hostConnected(){if(a(this,ct)||(m(this,ut,Wc(a(this,Ut),a(this,Tr))),!a(this,ut)))return;let t=a(this,ut)[a(this,Vt)]instanceof Ne?a(this,ut)[a(this,Vt)]:null;t&&m(this,ct,new Pt(a(this,Ut),t.proxyObject))}hostDisconnected(){}};Ut=new WeakMap,Tr=new WeakMap,Vt=new WeakMap,ut=new WeakMap,ct=new WeakMap;function Wc(e,t){let r=e;for(;r;){let n=r.closest(t);if(n)return n;let i=r.getRootNode();if(i instanceof ShadowRoot)r=i.host;else break}return null}var La=()=>{if(window.Shopify)try{return{customerId:Zc()}}catch{return null}return null},Zc=()=>{try{let e=[()=>window.ShopifyAnalytics?.meta?.page?.customerId,()=>window.meta?.page?.customerId,()=>window._st?.cid,()=>window.ShopifyAnalytics?.lib?.user()?.traits()?.uniqToken];for(let t of e)try{let r=t();if(/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i.test(r))continue;if(r)return r}catch{}}catch{return null}return null},Da=async()=>{try{return(await(await fetch(window.Shopify.routes.root+"cart.js")).json()).items.map(n=>({id:n.id,name:n.title,quantity:n.quantity,price:n.price,variantId:n.variant_id,sku:n.sku,url:n.url,description:n.product_description,image:n.featured_image?.url}))}catch{return[]}};function Pa(e,t="http"){return e.startsWith("http://")||e.startsWith("https://")?e:`${t}://${e}`}function Ms(e){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(e)}function Ra(e,t){let r=e instanceof URL?e:new URL(e);if(t)for(let[n,i]of t)r.searchParams.set(n,i);return r}var Ua=()=>{if(window.ShopRenter)try{let e=Jc();return{customerEmail:e?.customerEmail,customerId:e?.customerId,customerName:e?.customerName}}catch{return null}return null},Jc=()=>{try{if(window.ShopRenter){let e=window.ShopRenter.customer;return{customerEmail:e?.email,customerId:e?.userId,customerName:[e?.name?.firstName,e?.name?.lastName].filter(Boolean).join(" ")}}return{customerEmail:null,customerId:null,customerName:null}}catch{return{customerEmail:null,customerId:null,customerName:null}}},Va=async()=>{try{let e=window.ShopRenter.shop?.domain;if(!e)return[];let t=Pa(e,"https")+"/cart.json";return(await(await fetch(t)).json()).items.map(s=>({id:s.id,name:s.name,quantity:s.quantity,price:s.price,sku:s.sku,image:s.image,url:s.href}))}catch{return[]}};var Ba=()=>{if(window.UNAS)try{let e=window.UNAS.customer;return{customerEmail:e?.email,customerId:e?.id}}catch(e){return console.error("Error fetching customer information:",e),null}return null},Na=async()=>new Promise((e,t)=>{try{window.UNAS.getCart(r=>{let i=r.items.map(s=>({id:s.id,name:s.name,quantity:s.quantity,price:s.price,sku:s.sku}));e(i)})}catch(r){console.error("Error fetching cart information:",r),t(r)}});var Is;function Os(e){return{lang:e?.lang??Is?.lang,message:e?.message,abortEarly:e?.abortEarly??Is?.abortEarly,abortPipeEarly:e?.abortPipeEarly??Is?.abortPipeEarly}}var Yc;function Qc(e){return Yc?.get(e)}var ep;function tp(e){return ep?.get(e)}var rp;function np(e,t){return rp?.get(e)?.get(t)}function Fa(e){let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&Object.getPrototypeOf(e)?.constructor?.name)??"null":t}function ue(e,t,r,n,i){let s=i&&"input"in i?i.input:r.value,o=i?.expected??e.expects??null,u=i?.received??Fa(s),l={kind:e.kind,type:e.type,input:s,expected:o,received:u,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${u}`,requirement:e.requirement,path:i?.path,issues:i?.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=e.kind==="schema",p=i?.message??e.message??np(e.reference,l.lang)??(c?tp(l.lang):null)??n.message??Qc(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function ce(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Os())}}}function ip(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function za(e,t){let r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}var sp=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}};function js(e,t){return{kind:"validation",type:"max_length",reference:js,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&ue(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Ts(e,t){return{kind:"validation",type:"min_length",reference:Ts,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&ue(this,"length",r,n,{received:`${r.value.length}`}),r}}}function op(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function qa(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function Ls(){return{kind:"schema",type:"any",reference:Ls,expects:"any",async:!1,get"~standard"(){return ce(this)},"~run"(e){return e.typed=!0,e}}}function Bt(e,t){return{kind:"schema",type:"array",reference:Bt,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return ce(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 l={type:"array",origin:"value",input:i,key:s,value:o};for(let c of u.issues)c.path?c.path.unshift(l):c.path=[l],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 ue(this,"type",r,n);return r}}}function Ds(e){return{kind:"schema",type:"boolean",reference:Ds,expects:"boolean",async:!1,message:e,get"~standard"(){return ce(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:ue(this,"type",t,r),t}}}function Ps(e){return{kind:"schema",type:"null",reference:Ps,expects:"null",async:!1,message:e,get"~standard"(){return ce(this)},"~run"(t,r){return t.value===null?t.typed=!0:ue(this,"type",t,r),t}}}function Zn(e){return{kind:"schema",type:"number",reference:Zn,expects:"number",async:!1,message:e,get"~standard"(){return ce(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:ue(this,"type",t,r),t}}}function Le(e,t){return{kind:"schema",type:"object",reference:Le,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return ce(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]:qa(o),l=o["~run"]({value:u},n);if(l.issues){let c={type:"object",origin:"value",input:i,key:s,value:u};for(let p of l.issues)p.path?p.path.unshift(c):p.path=[c],r.issues?.push(p);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value[s]=l.value}else if(o.fallback!==void 0)r.value[s]=op(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(ue(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 ue(this,"type",r,n);return r}}}function Nt(e,t){return{kind:"schema",type:"optional",reference:Nt,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return ce(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=qa(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Rs(e,t){return{kind:"schema",type:"picklist",reference:Rs,expects:za(e.map(Fa),"|"),async:!1,options:e,message:t,get"~standard"(){return ce(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:ue(this,"type",r,n),r}}}function Gn(e,t,r){return{kind:"schema",type:"record",reference:Gn,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return ce(this)},"~run"(n,i){let s=n.value;if(s&&typeof s=="object"){n.typed=!0,n.value={};for(let o in s)if(ip(s,o)){let u=s[o],l=this.key["~run"]({value:o},i);if(l.issues){let p={type:"object",origin:"key",input:s,key:o,value:u};for(let h of l.issues)h.path=[p],n.issues?.push(h);if(n.issues||(n.issues=l.issues),i.abortEarly){n.typed=!1;break}}let c=this.value["~run"]({value:u},i);if(c.issues){let p={type:"object",origin:"value",input:s,key:o,value:u};for(let h of c.issues)h.path?h.path.unshift(p):h.path=[p],n.issues?.push(h);if(n.issues||(n.issues=c.issues),i.abortEarly){n.typed=!1;break}}(!l.typed||!c.typed)&&(n.typed=!1),l.typed&&(n.value[l.value]=c.value)}}else ue(this,"type",n,i);return n}}}function J(e){return{kind:"schema",type:"string",reference:J,expects:"string",async:!1,message:e,get"~standard"(){return ce(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:ue(this,"type",t,r),t}}}function Ha(e){let t;if(e)for(let r of e)t?t.push(...r.issues):t=r.issues;return t}function Ht(e,t){return{kind:"schema",type:"union",reference:Ht,expects:za(e.map(r=>r.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return ce(this)},"~run"(r,n){let i,s,o;for(let u of this.options){let l=u["~run"]({value:r.value},n);if(l.typed)if(l.issues)s?s.push(l):s=[l];else{i=l;break}else o?o.push(l):o=[l]}if(i)return i;if(s){if(s.length===1)return s[0];ue(this,"type",r,n,{issues:Ha(s)}),r.typed=!0}else{if(o?.length===1)return o[0];ue(this,"type",r,n,{issues:Ha(o)})}return r}}}function Wa(e,t,r){let n=e["~run"]({value:t},Os(r));if(n.issues)throw new sp(n.issues);return n.value}function Za(e,t){let r={};for(let n in e.entries)r[n]=!t||t.includes(n)?Nt(e.entries[n]):e.entries[n];return{...e,entries:r,get"~standard"(){return ce(this)}}}function Ga(...e){return{...e[0],pipe:e,get"~standard"(){return ce(this)},"~run"(t,r){for(let n of e)if(n.kind!=="metadata"){if(t.issues&&(n.kind==="schema"||n.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=n["~run"](t,r))}return t}}}function Lr(e,t,r){let n=e["~run"]({value:t},Os(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var Ja=Gn(J(),Ht([J(),Zn(),Ds(),Ps()])),Ka=Ga(J(),Ts(1),js(5e3)),Xa=()=>{try{return window.UNAS?Ba():window.Shopify?La():window.ShopRenter?Ua():null}catch{return null}},Ya=async()=>{try{return window.UNAS?await Na():window.Shopify?await Da():window.ShopRenter?await Va():[]}catch{return[]}},Ft={schema:Le({conversationId:Nt(J()),messages:Nt(Bt(Le({id:J(),timestamp:Zn(),role:Rs(["user","assistant","support"]),content:J(),parts:Nt(Bt(Ht([Le({text:J()}),Le({html:J()}),Le({tag:J(),data:Gn(J(),Ls())})])))})))}),getStorageKey(e){if(!e)throw new Error("widgetId is not set");return`_molin_${e}`},persist(e,t,r){let n=this.getStorageKey(e);localStorage.setItem(n,JSON.stringify({conversationId:t,messages:r}))},restore(e){try{let t=this.getStorageKey(e),r=JSON.parse(localStorage.getItem(t)||"{}"),n=Wa(this.schema,r);return{conversationId:n.conversationId||"",messages:n.messages||[]}}catch(t){return console.error("Failed to restore conversation state:",t),{conversationId:"",messages:[]}}},reset(e){let t=this.getStorageKey(e);localStorage.removeItem(t)}};var Pr,Rr,zt,R,H,Qa,Dr=class extends _{constructor(){super();f(this,R);g(this,"contextCtrl");f(this,Pr);f(this,Rr);f(this,zt,null);this.widgetId="",this.config={},this.callbacks={},this.xUserData=void 0,this.xCustomInstructions=void 0,this.autoConnect=!0,this.contextCtrl=new Ne(this,{config:this.config,callbacks:this.callbacks,xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,widgetId:this.widgetId,conversationId:"",messages:[],isStreaming:!1,typingIndicator:void 0,ranOutOfCredits:!1,isLiveMode:!1,lastMsg:void 0,hasQueuedMessages:!1,sendUserInput:this.sendUserInput.bind(this),sendUserCancel:this.sendUserCancel.bind(this),sendUserTypingStart:this.sendUserTypingStart.bind(this),sendUserTypingStop:this.sendUserTypingStop.bind(this),reset:this.reset.bind(this),reloadConfig:this.reloadConfig.bind(this),enqueueUserInput:this.enqueueUserInput.bind(this),connect:this.connect.bind(this)})}connectedCallback(){super.connectedCallback(),this.updated()}updated(){this.autoConnect&&a(this,R,H).connect(),Object.assign(this.contextCtrl.proxyObject,{widgetId:this.widgetId,config:this.config,callbacks:this.callbacks,xUserData:a(this,Pr),xCustomInstructions:a(this,Rr),conversationId:a(this,R,H).conversationId,messages:a(this,R,H).messages,isStreaming:a(this,R,H).isStreaming,typingIndicator:a(this,R,H).typingIndicator,ranOutOfCredits:a(this,R,H).ranOutOfCredits,isLiveMode:a(this,R,H).isLiveMode,lastMsg:a(this,R,H).lastMsg,hasQueuedMessages:a(this,R,H).hasQueuedMessages,sendUserInput:this.sendUserInput.bind(this),sendUserCancel:this.sendUserCancel.bind(this),sendUserTypingStart:this.sendUserTypingStart.bind(this),sendUserTypingStop:this.sendUserTypingStop.bind(this),reset:this.reset.bind(this),reloadConfig:this.reloadConfig.bind(this),enqueueUserInput:this.enqueueUserInput.bind(this),connect:this.connect.bind(this)}),y(this,R,Qa).call(this)}sendUserInput(r,n={}){let i={xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,...n},s=a(this,R,H).sendUserInput(r,i);return s&&this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:r,example:!1,conversationId:a(this,R,H).conversationId}),s}async enqueueUserInput(r,n={}){let i={xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,role:"user",expectStreaming:!0,...n};return a(this,R,H).enqueueUserInput(r,i)}sendUserCancel(){a(this,R,H).sendUserCancel(),this.callbacks.onUserCanceledStreaming?.({widgetId:this.widgetId})}sendUserTypingStart(){a(this,R,H).sendUserTypingStart()}sendUserTypingStop(){a(this,R,H).sendUserTypingStop()}reset(){a(this,R,H).reset()}reloadConfig(){a(this,R,H).reloadConfig()}connect(){a(this,R,H).connect()}render(){return d`<slot></slot>`}};Pr=new WeakMap,Rr=new WeakMap,zt=new WeakMap,R=new WeakSet,H=function(){return a(this,zt)||m(this,zt,new Hn(this,{autoConnect:this.autoConnect,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=>{r.role==="assistant"&&this.callbacks.onNewMessageStartedStreaming?.({widgetId:this.widgetId,message:r,conversationId:a(this,R,H).conversationId})},onMessageAppend:r=>{},onMessageDone:(r,n)=>{n.role==="assistant"&&this.callbacks.onMessageEndedStreaming?.({widgetId:this.widgetId,text:n.content??"",message:n,usage_TOKENS_COMPLETION:r.message.usage.TOKENS_COMPLETION,conversationId:a(this,R,H).conversationId})},onMessageError:r=>{console.error("ws message error",r),r.message&&this.callbacks.onError?.({widgetId:this.widgetId,error:"WS: "+r.message})},onReset:()=>{Ft.reset(this.widgetId)},onConnect:r=>{let n=Xa();a(this,R,H).sendUserMeta({xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,customerInformation:n,language:window.navigator.language,cart:[]}),Ya().then(i=>{i?.length>0&&a(this,R,H).sendUserMeta({xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,customerInformation:n,cart:i,language:window.navigator.language})}).catch(i=>{console.error(i)})},persistConversationState:(r,n)=>{Ft.persist(this.widgetId,r,n)},restoreConversationState:()=>Ft.restore(this.widgetId)})),a(this,zt)},Qa=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=Lr(Ja,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=Lr(Ka,i);if(!s.success){console.error("Molin: custom-instructions does not pass schema validation",s.issues);return}return s.output}m(this,Pr,r(this.xUserData)),m(this,Rr,n(this.xCustomInstructions))},g(Dr,"properties",{widgetId:{type:String},config:{type:Object},callbacks:{type:Object},xUserData:{type:Object},xCustomInstructions:{type:Object},autoConnect:{type:Boolean}});function el(e){let t=new Wn(e,{provider:Dr,tag:"mw-context-widget",key:"contextCtrl"});return new Proxy({value:null},{get(r,n){if(n==="value")return t.value}})}customElements.get("mw-context-widget")||customElements.define("mw-context-widget",Dr);function Zs(e){return[...e.v,(e.i?"!":"")+e.n].join(":")}function ap(e,t=","){return e.map(Zs).join(t)}var al=typeof CSS<"u"&&CSS.escape||(e=>e.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function Kn(e){for(var t=9,r=e.length;r--;)t=Math.imul(t^e.charCodeAt(r),1597334677);return"#"+((t^t>>>9)>>>0).toString(36)}function Qn(e,t="@media "){return t+U(e).map(r=>(typeof r=="string"&&(r={min:r}),r.raw||Object.keys(r).map(n=>`(${n}-width:${r[n]})`).join(" and "))).join(",")}function U(e=[]){return Array.isArray(e)?e:e==null?[]:[e]}function tl(e){return e}function ei(){}var Y={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function ll(e){return e.match(/[-=:;]/g)?.length||0}function Hs(e){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(e)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(ll(e),15)<<18}var lp=["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 Gs({n:e,i:t,v:r=[]},n,i,s){e&&(e=Zs({n:e,i:t,v:r})),s=[...U(s)];for(let u of r){let l=n.theme("screens",u);for(let c of U(l&&Qn(l)||n.v(u))){var o;s.push(c),i|=l?67108864|Hs(c):u=="dark"?1073741824:c[0]=="@"?Hs(c):(o=c,1<<~(/:([a-z-]+)/.test(o)&&~lp.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:e,p:i,r:s,i:t}}var ul=new Map;function Fs(e){if(e.d){let t=[],r=Us(e.r.reduce((n,i)=>i[0]=="@"?(t.push(i),n):i?Us(n,s=>Us(i,o=>{let u=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(o);if(u){let l=s.indexOf(u[1]);return~l?s.slice(0,l)+u[0]+s.slice(l+u[1].length):Vs(s,o)}return Vs(o,s)})):n,"&"),n=>Vs(n,e.n?"."+al(e.n):""));return r&&t.push(r.replace(/:merge\((.+?)\)/g,"$1")),t.reduceRight((n,i)=>i+"{"+n+"}",e.d)}}function Us(e,t){return e.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(r,n,i)=>t(n)+i)}function Vs(e,t){return e.replace(/&/g,t)}var rl=new Intl.Collator("en",{numeric:!0});function cl(e,t){for(var r=0,n=e.length;r<n;){let i=n+r>>1;0>=pl(e[i],t)?r=i+1:n=i}return n}function pl(e,t){let r=e.p&Y.o;return r==(t.p&Y.o)&&(r==Y.b||r==Y.o)?0:e.p-t.p||e.o-t.o||rl.compare(nl(e.n),nl(t.n))||rl.compare(il(e.n),il(t.n))}function nl(e){return(e||"").split(/:/).pop().split("/").pop()||"\0"}function il(e){return(e||"").replace(/\W/g,t=>String.fromCharCode(127+t.charCodeAt(0)))+"\0"}function Bs(e,t){return Math.round(parseInt(e,16)*t)}function ge(e,t={}){if(typeof e=="function")return e(t);let{opacityValue:r="1",opacityVariable:n}=t,i=n?`var(${n})`:r;if(e.includes("<alpha-value>"))return e.replace("<alpha-value>",i);if(e[0]=="#"&&(e.length==4||e.length==7)){let s=(e.length-1)/3,o=[17,1,.062272][s-1];return`rgba(${[Bs(e.substr(1,s),o),Bs(e.substr(1+s,s),o),Bs(e.substr(1+2*s,s),o),i]})`}return i=="1"?e:i=="0"?"#0000":e.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${i})`)}function hl(e,t,r,n,i=[]){return function s(o,{n:u,p:l,r:c=[],i:p},h){let v=[],b="",$=0,j=0;for(let k in o||{}){var C,A;let E=o[k];if(k[0]=="@"){if(!E)continue;if(k[1]=="a"){v.push(...Ks(u,l,Yn(""+E),h,l,c,p,!0));continue}if(k[1]=="l"){for(let T of U(E))v.push(...s(T,{n:u,p:(C=Y[k[7]],l&~Y.o|C),r:k[7]=="d"?[]:c,i:p},h));continue}if(k[1]=="i"){v.push(...U(E).map(T=>({p:-1,o:0,r:[],d:k+" "+T})));continue}if(k[1]=="k"){v.push({p:Y.d,o:0,r:[k],d:s(E,{p:Y.d},h).map(Fs).join("")});continue}if(k[1]=="f"){v.push(...U(E).map(T=>({p:Y.d,o:0,r:[k],d:s(T,{p:Y.d},h).map(Fs).join("")})));continue}}if(typeof E!="object"||Array.isArray(E))k=="label"&&E?u=E+Kn(JSON.stringify([l,p,o])):(E||E===0)&&(k=k.replace(/[A-Z]/g,T=>"-"+T.toLowerCase()),j+=1,$=Math.max($,(A=k)[0]=="-"?0:ll(A)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(A)?+!!RegExp.$1||-!!RegExp.$2:0)+1),b+=(b?";":"")+U(E).map(T=>h.s(k,Js(""+T,h.theme)+(p?" !important":""))).join(";"));else if(k[0]=="@"||k.includes("&")){let T=l;k[0]=="@"&&(k=k.replace(/\bscreen\(([^)]+)\)/g,(N,K)=>{let te=h.theme("screens",K);return te?(T|=67108864,Qn(te,"")):N}),T|=Hs(k)),v.push(...s(E,{n:u,p:T,r:[...c,k],i:p},h))}else v.push(...s(E,{p:l,r:[...c,k]},h))}return v.unshift({n:u,p:l,o:Math.max(0,15-j)+1.5*Math.min($||15,15),r:c,d:b}),v.sort(pl)}(e,Gs(t,r,n,i),r)}function Js(e,t){return e.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(r,n,i,s,o="")=>{let u=t(i,o);return typeof u=="function"&&/color|fill|stroke/i.test(i)?ge(u):""+U(u).filter(l=>Object(l)!==l)})}function dl(e,t){let r,n=[];for(let i of e)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&&t}):n.push({...i,n:i.n&&t});return n}function Xn(e,t,r=Y.u,n,i){let s=[];for(let o of e)for(let u of function(l,c,p,h,v){l={...l,i:l.i||v};let b=function($,j){let C=ul.get($.n);return C?C($,j):j.r($.n,$.v[0]=="dark")}(l,c);return b?typeof b=="string"?({r:h,p}=Gs(l,c,p,h),dl(Xn(Yn(b),c,p,h,l.i),l.n)):Array.isArray(b)?b.map($=>{var j,C;return{o:0,...$,r:[...U(h),...U($.r)],p:(j=p,C=$.p??p,j&~Y.o|C)}}):hl(b,l,c,p,h):[{c:Zs(l),p:0,o:0,r:[]}]}(o,t,r,n,i))s.splice(cl(s,u),0,u);return s}function Ks(e,t,r,n,i,s,o,u){return dl((u?r.flatMap(l=>Xn([l],n,i,s,o)):Xn(r,n,i,s,o)).map(l=>l.p&Y.o&&(l.n||t==Y.b)?{...l,p:l.p&~Y.o|t,o:0}:l),e)}function up(e,t,r,n){var i;return i=(s,o)=>{let{n:u,p:l,r:c,i:p}=Gs(s,o,t);return r&&Ks(u,t,r,o,l,c,p,n)},ul.set(e,i),e}function Ns(e,t,r){if(e[e.length-1]!="("){let n=[],i=!1,s=!1,o="";for(let u of e)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),t[0].push({n:o,v:n.filter(cp),i}))}}function cp(e,t,r){return r.indexOf(e)==t}var sl=new Map;function Yn(e){let t=sl.get(e);if(!t){let r=[],n=[[]],i=0,s=0,o=null,u=0,l=(c,p=0)=>{i!=u&&(r.push(e.slice(i,u+p)),c&&Ns(r,n)),i=u+1};for(;u<e.length;u++){let c=e[u];if(s)e[u-1]!="\\"&&(s+=+(c=="[")||-(c=="]"));else if(c=="[")s+=1;else if(o)e[u-1]!="\\"&&o.test(e.slice(u))&&(o=null,i=u+RegExp.lastMatch.length);else if(c=="/"&&e[u-1]!="\\"&&(e[u+1]=="*"||e[u+1]=="/"))o=e[u+1]=="*"?/^\*\//:/^[\r\n]/;else if(c=="(")l(),r.push(c);else if(c==":")e[u+1]!=":"&&l(!1,1);else if(/[\s,)]/.test(c)){l(!0);let p=r.lastIndexOf("(");if(c==")"){let h=r[p-1];if(/[~@]$/.test(h)){let v=n.shift();r.length=p,Ns([...r,"#"],n);let{v:b}=n[0].pop();for(let $ of v)$.v.splice(+($.v[0]=="dark")-+(b[0]=="dark"),b.length);Ns([...r,up(h.length>1?h.slice(0,-1)+Kn(JSON.stringify([h,v])):h+"("+ap(v)+")",Y.a,v,/@$/.test(h))],n)}p=r.lastIndexOf("(",p-1)}r.length=p+1}else/[~@]/.test(c)&&e[u+1]=="("&&n.unshift([])}l(!0),sl.set(e,t=n[0])}return t}function w(e,t,r){return[e,zs(t,r)]}function zs(e,t){return typeof e=="function"?e:typeof e=="string"&&/^[\w-]+$/.test(e)?(r,n)=>({[e]:t?t(r,n):qs(r,1)}):r=>e||{[r[1]]:qs(r,2)}}function qs(e,t,r=e.slice(t).find(Boolean)||e.$$||e.input){return e.input[0]=="-"?`calc(${r} * -1)`:r}function x(e,t,r,n){return[e,Xs(t,r,n)]}function Xs(e,t,r){let n=typeof t=="string"?(i,s)=>({[t]:r?r(i,s):i._}):t||(({1:i,_:s},o,u)=>({[i||u]:s}));return(i,s)=>{let o=fl(e||i[1]),u=s.theme(o,i.$$)??Ae(i.$$,o,s);if(u!=null)return i._=qs(i,0,u),n(i,s,o)}}function Q(e,t={},r){return[e,pp(t,r)]}function pp(e={},t){return(r,n)=>{let{section:i=fl(r[0]).replace("-","")+"Color"}=e,[s,o]=hp(r.$$);if(!s)return;let u=n.theme(i,s)||Ae(s,i,n);if(!u||typeof u=="object")return;let{opacityVariable:l=`--tw-${r[0].replace(/-$/,"")}-opacity`,opacitySection:c=i.replace("Color","Opacity"),property:p=i,selector:h}=e,v=n.theme(c,o||"DEFAULT")||o&&Ae(o,c,n),b=t||(({_:j})=>{let C=Ur(p,j);return h?{[h]:C}:C});r._={value:ge(u,{opacityVariable:l||void 0,opacityValue:v||void 0}),color:j=>ge(u,j),opacityVariable:l||void 0,opacityValue:v||void 0};let $=b(r,n);if(!r.dark){let j=n.d(i,s,u);j&&j!==u&&(r._={value:ge(j,{opacityVariable:l||void 0,opacityValue:v||"1"}),color:C=>ge(j,C),opacityVariable:l||void 0,opacityValue:v||void 0},$={"&":$,[n.v("dark")]:b(r,n)})}return $}}function hp(e){return(e.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function Ur(e,t){let r={};return typeof t=="string"?r[e]=t:(t.opacityVariable&&t.value.includes(t.opacityVariable)&&(r[t.opacityVariable]=t.opacityValue||"1"),r[e]=t.value),r}function Ae(e,t,r){if(e[0]=="["&&e.slice(-1)=="]"){if(e=qt(Js(e.slice(1,-1),r.theme)),!t)return e;if(!(/color|fill|stroke/i.test(t)&&!(/^color:/.test(e)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(e))||/image/i.test(t)&&!(/^image:/.test(e)||/^[a-z-]+\(/.test(e))||/weight/i.test(t)&&!(/^(number|any):/.test(e)||/^\d+$/.test(e))||/position/i.test(t)&&/^(length|size):/.test(e)))return e.replace(/^[a-z-]+:/,"")}}function fl(e){return e.replace(/-./g,t=>t[1].toUpperCase())}function qt(e){return e.includes("url(")?e.replace(/(.*?)(url\(.*?\))(.*?)/g,(t,r="",n,i="")=>qt(r)+n+qt(i)):e.replace(/(^|[^\\])_+/g,(t,r)=>r+" ".repeat(t.length-r.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,t=>t.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}function Ys({presets:e=[],...t}){let r={darkMode:void 0,darkColor:void 0,preflight:t.preflight!==!1&&[],theme:{},variants:U(t.variants),rules:U(t.rules),ignorelist:U(t.ignorelist),hash:void 0,stringify:(n,i)=>n+":"+i,finalize:[]};for(let n of U([...e,{darkMode:t.darkMode,darkColor:t.darkColor,preflight:t.preflight!==!1&&U(t.preflight),theme:t.theme,hash:t.hash,stringify:t.stringify,finalize:t.finalize}])){let{preflight:i,darkMode:s=r.darkMode,darkColor:o=r.darkColor,theme:u,variants:l,rules:c,ignorelist:p,hash:h=r.hash,stringify:v=r.stringify,finalize:b}=typeof n=="function"?n(r):n;r={preflight:r.preflight!==!1&&i!==!1&&[...r.preflight,...U(i)],darkMode:s,darkColor:o,theme:{...r.theme,...u,extend:{...r.theme.extend,...u?.extend}},variants:[...r.variants,...U(l)],rules:[...r.rules,...U(c)],ignorelist:[...r.ignorelist,...U(p)],hash:h,stringify:v,finalize:[...r.finalize,...U(b)]}}return r}function ol(e,t,r,n,i,s){for(let o of t){let u=r.get(o);u||r.set(o,u=n(o));let l=u(e,i,s);if(l)return l}}function dp(e){var t;return Ws(e[0],typeof(t=e[1])=="function"?t:()=>t)}function fp(e){var t,r;return Array.isArray(e)?Ws(e[0],zs(e[1],e[2])):Ws(e,zs(t,r))}function Ws(e,t){return ml(e,(r,n,i,s)=>{let o=n.exec(r);if(o)return o.$$=r.slice(o[0].length),o.dark=s,t(o,i)})}function ml(e,t){let r=U(e).map(mp);return(n,i,s)=>{for(let o of r){let u=t(n,o,i,s);if(u)return u}}}function mp(e){return typeof e=="string"?RegExp("^"+e+(e.includes("$")||e.slice(-1)=="-"?"":"$")):e}function gl(e,t){let r=Ys(e),n=function({theme:l,darkMode:c,darkColor:p=ei,variants:h,rules:v,hash:b,stringify:$,ignorelist:j,finalize:C}){let A=new Map,k=new Map,E=new Map,T=new Map,N=ml(j,(P,re)=>re.test(P));h.push(["dark",Array.isArray(c)||c=="class"?`${U(c)[1]||".dark"} &`:typeof c=="string"&&c!="media"?c:"@media (prefers-color-scheme:dark)"]);let K=typeof b=="function"?P=>b(P,Kn):b?Kn:tl;K!==tl&&C.push(P=>({...P,n:P.n&&K(P.n),d:P.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(re,oe)=>"--"+K(oe).replace("#",""))}));let te={theme:function({extend:P={},...re}){let oe={},os={get colors(){return Ye("colors")},theme:Ye,negative(){return{}},breakpoints(W){let ne={};for(let le in W)typeof W[le]=="string"&&(ne["screen-"+le]=W[le]);return ne}};return Ye;function Ye(W,ne,le,wr){if(W){if({1:W,2:wr}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(W)||[,W],/[.[]/.test(W)){let Oe=[];W.replace(/\[([^\]]+)\]|([^.[]+)/g,(et,xr,Cc=xr)=>Oe.push(Cc)),W=Oe.shift(),le=ne,ne=Oe.join("-")}let Ee=oe[W]||Object.assign(Object.assign(oe[W]={},In(re,W)),In(P,W));if(ne==null)return Ee;ne||(ne="DEFAULT");let Qe=Ee[ne]??ne.split("-").reduce((Oe,et)=>Oe?.[et],Ee)??le;return wr?ge(Qe,{opacityValue:Js(wr,Ye)}):Qe}let vr={};for(let Ee of[...Object.keys(re),...Object.keys(P)])vr[Ee]=Ye(Ee);return vr}function In(W,ne){let le=W[ne];return typeof le=="function"&&(le=le(os)),le&&/color|fill|stroke/i.test(ne)?function wr(vr,Ee=[]){let Qe={};for(let Oe in vr){let et=vr[Oe],xr=[...Ee,Oe];Qe[xr.join("-")]=et,Oe=="DEFAULT"&&(xr=Ee,Qe[Ee.join("-")]=et),typeof et=="object"&&Object.assign(Qe,wr(et,xr))}return Qe}(le):le}}(l),e:al,h:K,s(P,re){return $(P,re,te)},d(P,re,oe){return p(P,re,te,oe)},v(P){return A.has(P)||A.set(P,ol(P,h,k,dp,te)||"&:"+P),A.get(P)},r(P,re){let oe=JSON.stringify([P,re]);return E.has(oe)||E.set(oe,!N(P,te)&&ol(P,v,T,fp,te,re)),E.get(oe)},f(P){return C.reduce((re,oe)=>oe(re,te),P)}};return te}(r),i=new Map,s=[],o=new Set;t.resume(l=>i.set(l,l),(l,c)=>{t.insert(l,s.length,c),s.push(c),o.add(l)});function u(l){let c=n.f(l),p=Fs(c);if(p&&!o.has(p)){o.add(p);let h=cl(s,l);t.insert(p,h,l),s.splice(h,0,l)}return c.n}return Object.defineProperties(function(c){if(!i.size)for(let h of U(r.preflight))typeof h=="function"&&(h=h(n)),h&&(typeof h=="string"?Ks("",Y.b,Yn(h),n,Y.b,[],!1,!0):hl(h,{},n,Y.b)).forEach(u);c=""+c;let p=i.get(c);if(!p){let h=new Set;for(let v of Xn(Yn(c),n))h.add(v.c).add(u(v));p=[...h].filter(Boolean).join(" "),i.set(c,p).set(p,p)}return p},Object.getOwnPropertyDescriptors({get target(){return t.target},theme:n.theme,config:r,snapshot(){let l=t.snapshot(),c=new Set(o),p=new Map(i),h=[...s];return()=>{l(),o=c,i=p,s=h}},clear(){t.clear(),o=new Set,i=new Map,s=[]},destroy(){this.clear(),t.destroy()}}))}function gp(e,t){return e!=t&&""+e.split(" ").sort()!=""+t.split(" ").sort()}function yl(e){let t=new MutationObserver(r);return{observe(i){t.observe(i,{attributeFilter:["class"],subtree:!0,childList:!0}),n(i),r([{target:i,type:""}])},disconnect(){t.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);t.takeRecords()}function n(i){let s,o=i.getAttribute?.("class");o&&gp(o,s=e(o))&&i.setAttribute("class",s)}}function yp(e){let t=document.querySelector(e||'style[data-twind=""]');return(!t||t.tagName!="STYLE")&&(t=document.createElement("style"),document.head.prepend(t)),t.dataset.twind="claimed",t}function ti(e){let t=e?.cssRules?e:(e&&typeof e!="string"?e:yp(e)).sheet;return{target:t,snapshot(){let r=Array.from(t.cssRules,n=>n.cssText);return()=>{this.clear(),r.forEach(this.insert)}},clear(){for(let r=t.cssRules.length;r--;)t.deleteRule(r)},destroy(){t.ownerNode?.remove()},insert(r,n){try{t.insertRule(r,n)}catch{t.insertRule(":root{}",n)}},resume:ei}}var wp=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 wl(e){return wp.get(e)}function vl(e){var t=/^(?:(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(e);return t?t[1]?1:t[2]?2:t[3]?3:5:0}function xl(e,t){var r=/^(?:(pos)|(cli)|(background-i)|(flex(?:$|-b)|(?:max-|min-)?(?:block-s|inl|he|widt))|dis)/i.exec(e);return r?r[1]?/^sti/i.test(t)?1:0:r[2]?/^pat/i.test(t)?1:0:r[3]?/^image-/i.test(t)?1:0:r[4]?t[3]==="-"?2:0:/^(?:inline-)?grid$/i.test(t)?4:0:0}var vp=[["-webkit-",1],["-moz-",2],["-ms-",4]];function bl(){return({stringify:e})=>({stringify(t,r,n){let i="",s=wl(t);s&&(i+=e(s,r,n)+";");let o=vl(t),u=xl(t,r);for(let l of vp)o&l[1]&&(i+=e(l[0]+t,r,n)+";"),u&l[1]&&(i+=e(t,l[0]+r,n)+";");return i+e(t,r,n)}})}function Cl(){return{rules:[["line-clamp-none",{"-webkit-line-clamp":"unset"}],["line-clamp-",Xs("lineClamp",({_:e})=>kl(e))],["line-clamp-(\\d+)",({1:e})=>kl(e)]]}}function kl(e){return{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":`${e}`}}var Br={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",...pe(4,"rem",4,.5,.5),...pe(12,"rem",4,5),14:"3.5rem",...pe(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:D("blur"),backdropBrightness:D("brightness"),backdropContrast:D("contrast"),backdropGrayscale:D("grayscale"),backdropHueRotate:D("hueRotate"),backdropInvert:D("invert"),backdropOpacity:D("opacity"),backdropSaturate:D("saturate"),backdropSepia:D("sepia"),backgroundColor:D("colors"),backgroundImage:{none:"none"},backgroundOpacity:D("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:{...pe(200,"",100,0,50),...pe(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:e})=>({DEFAULT:e("colors.gray.200","currentColor"),...e("colors")}),borderOpacity:D("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:D("spacing"),borderWidth:{DEFAULT:"1px",...ye(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:D("colors"),caretColor:D("colors"),accentColor:({theme:e})=>({auto:"auto",...e("colors")}),contrast:{...pe(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:D("borderColor"),divideOpacity:D("borderOpacity"),divideWidth:D("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:e})=>({...e("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:e})=>({...e("spacing"),...Vr(2,6),...Vr(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:D("spacing"),gradientColorStops:D("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:e})=>({...e("spacing"),...Vr(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:e})=>({...e("spacing"),...Vr(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:{...pe(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),maxHeight:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...e("spacing")}),maxWidth:({theme:e,breakpoints:t})=>({...t(e("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:{...pe(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:D("spacing"),placeholderColor:D("colors"),placeholderOpacity:D("opacity"),outlineColor:D("colors"),outlineOffset:ye(8,"px"),outlineWidth:ye(8,"px"),ringColor:({theme:e})=>({...e("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:D("colors"),ringOffsetWidth:ye(8,"px"),ringOpacity:({theme:e})=>({...e("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...ye(8,"px")},rotate:{...ye(2,"deg"),...ye(12,"deg",3),...ye(180,"deg",45)},saturate:pe(200,"",100,0,50),scale:{...pe(150,"",100,0,50),...pe(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:D("spacing"),scrollPadding:D("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...ye(2,"deg"),...ye(12,"deg",3)},space:D("spacing"),stroke:({theme:e})=>({...e("colors"),none:"none"}),strokeWidth:pe(2),textColor:D("colors"),textDecorationColor:D("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...ye(8,"px")},textUnderlineOffset:{auto:"auto",...ye(8,"px")},textIndent:D("spacing"),textOpacity:D("opacity"),transitionDuration:({theme:e})=>({...e("durations"),DEFAULT:"150ms"}),transitionDelay:D("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:e})=>({...e("spacing"),...Vr(2,4),full:"100%"}),width:({theme:e})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...e("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...pe(50,"",1,0,10),auto:"auto"}};function Vr(e,t){let r={};do for(var n=1;n<e;n++)r[`${n}/${e}`]=Number((n/e*100).toFixed(6))+"%";while(++e<=t);return r}function ye(e,t,r=0){let n={};for(;r<=e;r=2*r||1)n[r]=r+t;return n}function pe(e,t="",r=1,n=0,i=1,s={}){for(;n<=e;n+=i)s[n]=n/r+t;return s}function D(e){return({theme:t})=>t(e)}var $l={"*,::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, ${Br.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, ${Br.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 Il=[w("\\[([-\\w]+):(.+)]",({1:e,2:t},r)=>({"@layer overrides":{"&":{[e]:Ae(`[${t}]`,"",r)}}})),w("(group|peer)([~/][^-[]+)?",({input:e},{h:t})=>[{c:t(e)}]),x("aspect-","aspectRatio"),w("container",(e,{theme:t})=>{let{screens:r=t("screens"),center:n,padding:i}=t("container"),s={width:"100%",marginRight:n&&"auto",marginLeft:n&&"auto",...o("xs")};for(let u in r){let l=r[u];typeof l=="string"&&(s[Qn(l)]={"&":{maxWidth:l,...o(u)}})}return s;function o(u){let l=i&&(typeof i=="string"?i:i[u]||i.DEFAULT);if(l)return{paddingRight:l,paddingLeft:l}}}),x("content-","content",({_:e})=>({"--tw-content":e,content:"var(--tw-content)"})),w("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),w("box-(border|content)","boxSizing",({1:e})=>e+"-box"),w("hidden",{display:"none"}),w("table-(auto|fixed)","tableLayout"),w(["(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)",w("isolate","isolation"),w("object-(contain|cover|fill|none|scale-down)","objectFit"),x("object-","objectPosition"),w("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",ri),w("overscroll(-[xy])?-(auto|contain|none)",({1:e="",2:t})=>({["overscroll-behavior"+e]:t})),w("(static|fixed|absolute|relative|sticky)","position"),x("-?inset(-[xy])?(?:$|-)","inset",({1:e,_:t})=>({top:e!="-x"&&t,right:e!="-y"&&t,bottom:e!="-x"&&t,left:e!="-y"&&t})),x("-?(top|bottom|left|right)(?:$|-)","inset"),w("(visible|collapse)","visibility"),w("invisible",{visibility:"hidden"}),x("-?z-","zIndex"),w("flex-((row|col)(-reverse)?)","flexDirection",Sl),w("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),x("(flex-(?:grow|shrink))(?:$|-)"),x("(flex)-"),x("grow(?:$|-)","flexGrow"),x("shrink(?:$|-)","flexShrink"),x("basis-","flexBasis"),x("-?(order)-"),"-?(order)-(\\d+)",x("grid-cols-","gridTemplateColumns"),w("grid-cols-(\\d+)","gridTemplateColumns",Ml),x("col-","gridColumn"),w("col-(span)-(\\d+)","gridColumn",Al),x("col-start-","gridColumnStart"),w("col-start-(auto|\\d+)","gridColumnStart"),x("col-end-","gridColumnEnd"),w("col-end-(auto|\\d+)","gridColumnEnd"),x("grid-rows-","gridTemplateRows"),w("grid-rows-(\\d+)","gridTemplateRows",Ml),x("row-","gridRow"),w("row-(span)-(\\d+)","gridRow",Al),x("row-start-","gridRowStart"),w("row-start-(auto|\\d+)","gridRowStart"),x("row-end-","gridRowEnd"),w("row-end-(auto|\\d+)","gridRowEnd"),w("grid-flow-((row|col)(-dense)?)","gridAutoFlow",e=>ri(Sl(e))),w("grid-flow-(dense)","gridAutoFlow"),x("auto-cols-","gridAutoColumns"),x("auto-rows-","gridAutoRows"),x("gap-x(?:$|-)","gap","columnGap"),x("gap-y(?:$|-)","gap","rowGap"),x("gap(?:$|-)","gap"),"(justify-(?:items|self))-",w("justify-","justifyContent",El),w("(content|items|self)-",e=>({["align-"+e[1]]:El(e)})),w("(place-(content|items|self))-",({1:e,$$:t})=>({[e]:("wun".includes(t[3])?"space-":"")+t})),x("p([xytrbl])?(?:$|-)","padding",Wt("padding")),x("-?m([xytrbl])?(?:$|-)","margin",Wt("margin")),x("-?space-(x|y)(?:$|-)","space",({1:e,_:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[e]]:`calc(${t} * calc(1 - var(--tw-space-${e}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[e]]:`calc(${t} * var(--tw-space-${e}-reverse))`}})),w("space-(x|y)-reverse",({1:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"1"}})),x("w-","width"),x("min-w-","minWidth"),x("max-w-","maxWidth"),x("h-","height"),x("min-h-","minHeight"),x("max-h-","maxHeight"),x("font-","fontWeight"),x("font-","fontFamily",({_:e})=>typeof(e=U(e))[1]=="string"?{fontFamily:ke(e)}:{fontFamily:ke(e[0]),...e[1]}),w("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),w("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),w("italic","fontStyle"),w("not-italic",{fontStyle:"normal"}),w("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:e,2:t="",3:r})=>t=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(r?"numeric-fraction":"pt".includes(t[0])?"numeric-spacing":t?"numeric-figure":e)]:e,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...He({"--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,/*!*/ /*!*/)"})}),x("tracking-","letterSpacing"),x("leading-","lineHeight"),w("list-(inside|outside)","listStylePosition"),x("list-","listStyleType"),w("list-","listStyleType"),x("placeholder-opacity-","placeholderOpacity",({_:e})=>({"&::placeholder":{"--tw-placeholder-opacity":e}})),Q("placeholder-",{property:"color",selector:"&::placeholder"}),w("text-(left|center|right|justify|start|end)","textAlign"),w("text-(ellipsis|clip)","textOverflow"),x("text-opacity-","textOpacity","--tw-text-opacity"),Q("text-",{property:"color"}),x("text-","fontSize",({_:e})=>typeof e=="string"?{fontSize:e}:{fontSize:e[0],...typeof e[1]=="string"?{lineHeight:e[1]}:e[1]}),x("indent-","textIndent"),w("(overline|underline|line-through)","textDecorationLine"),w("no-underline",{textDecorationLine:"none"}),x("underline-offset-","textUnderlineOffset"),Q("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),x("decoration-","textDecorationThickness"),w("decoration-","textDecorationStyle"),w("(uppercase|lowercase|capitalize)","textTransform"),w("normal-case",{textTransform:"none"}),w("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),w("align-","verticalAlign"),w("whitespace-","whiteSpace"),w("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),w("break-words",{overflowWrap:"break-word"}),w("break-all",{wordBreak:"break-all"}),w("break-keep",{wordBreak:"keep-all"}),Q("caret-",{opacityVariable:!1,opacitySection:"opacity"}),Q("accent-",{opacityVariable:!1,opacitySection:"opacity"}),w("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:e})=>`linear-gradient(to ${pt(e," ")},var(--tw-gradient-stops))`),Q("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-from":e.value,"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),Q("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${e.value},var(--tw-gradient-to)`})),Q("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),w("bg-(fixed|local|scroll)","backgroundAttachment"),w("bg-origin-(border|padding|content)","backgroundOrigin",({1:e})=>e+"-box"),w(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),w("bg-blend-","backgroundBlendMode"),w("bg-clip-(border|padding|content|text)","backgroundClip",({1:e})=>e+(e=="text"?"":"-box")),x("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),Q("bg-",{section:"backgroundColor"}),x("bg-","backgroundImage"),x("bg-","backgroundPosition"),w("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",ri),x("bg-","backgroundSize"),x("rounded(?:$|-)","borderRadius"),x("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:e,_:t})=>{let r={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[e]||[e,e];return{[`border-${pt(r[0])}-radius`]:t,[`border-${pt(r[1])}-radius`]:t}}),w("border-(collapse|separate)","borderCollapse"),x("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),w("border-(solid|dashed|dotted|double|none)","borderStyle"),x("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:e,_:t})=>({...He({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(e||"-x")]:t,["--tw-border-spacing"+(e||"-y")]:t,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),Q("border-([xytrbl])-",{section:"borderColor"},Wt("border","Color")),Q("border-"),x("border-([xytrbl])(?:$|-)","borderWidth",Wt("border","Width")),x("border(?:$|-)","borderWidth"),x("divide-opacity(?:$|-)","divideOpacity",({_:e})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":e}})),w("divide-(solid|dashed|dotted|double|none)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:e}})),w("divide-([xy]-reverse)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+e]:"1"}})),x("divide-([xy])(?:$|-)","divideWidth",({1:e,_:t})=>{let r={x:"lr",y:"tb"}[e];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${e}-reverse`]:"0",[`border-${pt(r[0])}Width`]:`calc(${t} * calc(1 - var(--tw-divide-${e}-reverse)))`,[`border-${pt(r[1])}Width`]:`calc(${t} * var(--tw-divide-${e}-reverse))`}}}),Q("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),x("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),Q("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),x("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),w("ring-inset",{"--tw-ring-inset":"inset"}),Q("ring-",{property:"--tw-ring-color"}),x("ring(?:$|-)","ringWidth",({_:e},{theme:t})=>({...He({"--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":t("ringOffsetWidth","","0px"),"--tw-ring-offset-color":ge(t("ringOffsetColor","","#fff")),"--tw-ring-color":ge(t("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":t("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(${e} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),Q("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-shadow-color":e.value,"--tw-shadow":"var(--tw-shadow-colored)"})),x("shadow(?:$|-)","boxShadow",({_:e})=>({...He({"--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":ke(e),"--tw-shadow-colored":ke(e).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)"})),x("(opacity)-"),w("mix-blend-","mixBlendMode"),..._l(),..._l("backdrop-"),x("transition(?:$|-)","transitionProperty",(e,{theme:t})=>({transitionProperty:ke(e),transitionTimingFunction:e._=="none"?void 0:ke(t("transitionTimingFunction","")),transitionDuration:e._=="none"?void 0:ke(t("transitionDuration",""))})),x("duration(?:$|-)","transitionDuration","transitionDuration",ke),x("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",ke),x("delay(?:$|-)","transitionDelay","transitionDelay",ke),x("animate(?:$|-)","animation",(e,{theme:t,h:r,e:n})=>{let i=ke(e),s=i.split(" "),o=t("keyframes",s[0]);return o?{["@keyframes "+(s[0]=n(r(s[0])))]:o,animation:s.join(" ")}:{animation:i}}),"(transform)-(none)",w("transform",eo),w("transform-(cpu|gpu)",({1:e})=>({"--tw-transform":Ol(e=="gpu")})),x("scale(-[xy])?-","scale",({1:e,_:t})=>({["--tw-scale"+(e||"-x")]:t,["--tw-scale"+(e||"-y")]:t,...eo()})),x("-?(rotate)-","rotate",Qs),x("-?(translate-[xy])-","translate",Qs),x("-?(skew-[xy])-","skew",Qs),w("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",ri),"(appearance)-",x("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",x("(cursor)-"),"(cursor)-",w("snap-(none)","scroll-snap-type"),w("snap-(x|y|both)",({1:e})=>({...He({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":e+" var(--tw-scroll-snap-strictness)"})),w("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),w("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),w("snap-(normal|always)","scroll-snap-stop"),w("scroll-(auto|smooth)","scroll-behavior"),x("scroll-p([xytrbl])?(?:$|-)","padding",Wt("scroll-padding")),x("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",Wt("scroll-margin")),w("touch-(auto|none|manipulation)","touch-action"),w("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:e,2:t,3:r})=>({...He({"--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-${t?"pan-x":r?"pan-y":e}`]:e,"touch-action":"var(--tw-touch-action)"})),w("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),w("outline",{outlineStyle:"solid"}),w("outline-(dashed|dotted|double)","outlineStyle"),x("-?(outline-offset)-"),Q("outline-",{opacityVariable:!1,opacitySection:"opacity"}),x("outline-","outlineWidth"),"(pointer-events)-",x("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:e})=>({x:"horizontal",y:"vertical"})[e]||e||"both"],w("select-(none|text|all|auto)","userSelect"),Q("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),Q("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),x("stroke-","strokeWidth"),w("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),w("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function ri(e){return(typeof e=="string"?e:e[1]).replace(/-/g," ").trim()}function Sl(e){return(typeof e=="string"?e:e[1]).replace("col","column")}function pt(e,t="-"){let r=[];for(let n of e)r.push({t:"top",r:"right",b:"bottom",l:"left"}[n]);return r.join(t)}function ke(e){return e&&""+(e._||e)}function El({$$:e}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[e[3]||""]||"")+e}function Wt(e,t=""){return({1:r,_:n})=>{let i={x:"lr",y:"tb"}[r]||r+r;return i?{...Ur(e+"-"+pt(i[0])+t,n),...Ur(e+"-"+pt(i[1])+t,n)}:Ur(e+t,n)}}function _l(e=""){let t=["blur","brightness","contrast","grayscale","hue-rotate","invert",e&&"opacity","saturate","sepia",!e&&"drop-shadow"].filter(Boolean),r={};for(let n of t)r[`--tw-${e}${n}`]="var(--tw-empty,/*!*/ /*!*/)";return r={...He(r),[`${e}filter`]:t.map(n=>`var(--tw-${e}${n})`).join(" ")},[`(${e}filter)-(none)`,w(`${e}filter`,r),...t.map(n=>x(`${n[0]=="h"?"-?":""}(${e}${n})(?:$|-)`,n,({1:i,_:s})=>({[`--tw-${i}`]:U(s).map(o=>`${n}(${o})`).join(" "),...r})))]}function Qs({1:e,_:t}){return{["--tw-"+e]:t,...eo()}}function eo(){return{...He({"--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":Ol()}),transform:"var(--tw-transform)"}}function Ol(e){return[e?"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 Al({1:e,2:t}){return`${e} ${t} / ${e} ${t}`}function Ml({1:e}){return`repeat(${e},minmax(0,1fr))`}function He(e){return{"@layer defaults":{"*,::before,::after":e,"::backdrop":e}}}var jl=[["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:e})=>`@media (orientation:${e})`],["contrast-(more|less)",({1:e})=>`@media (prefers-contrast:${e})`],["(first-(letter|line)|placeholder|backdrop|before|after)",({1:e})=>`&::${e}`],["(marker|selection)",({1:e})=>`& *::${e},&::${e}`],["file","&::file-selector-button"],["(first|last|only)",({1:e})=>`&:${e}-child`],["even","&:nth-child(2n)"],["odd","&:nth-child(odd)"],["open","&[open]"],["(aria|data)-",({1:e,$$:t},r)=>t&&`&[${e}-${r.theme(e,t)||Ae(t,"",r)||`${t}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:e,3:t="",4:r,5:n="",6:i=t},{e:s,h:o,v:u})=>{let l=qt(n)||(r[0]=="["?r:u(r.slice(1)));return`${(l.includes("&")?l:"&"+l).replace(/&/g,`:merge(.${s(o(e+i))})`)}${e[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:e})=>`[dir="${e}"] &`],["supports-",({$$:e},t)=>{if(e&&(e=t.theme("supports",e)||Ae(e,"",t)),e)return e.includes(":")||(e+=":var(--tw)"),/^\w*\s*\(/.test(e)||(e=`(${e})`),`@supports ${e.replace(/\b(and|or|not)\b/g," $1 ").trim()}`}],["max-",({$$:e},t)=>{if(e&&(e=t.theme("screens",e)||Ae(e,"",t)),typeof e=="string")return`@media not all and (min-width:${e})`}],["min-",({$$:e},t)=>(e&&(e=Ae(e,"",t)),e&&`@media (min-width:${e})`)],[/^\[(.+)]$/,({1:e})=>/[&@]/.test(e)&&qt(e).replace(/[}]+$/,"").split("{")]];function Tl({colors:e,disablePreflight:t}={}){return{preflight:t?void 0:$l,theme:{...Br,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...e}},variants:jl,rules:Il,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 xp={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},bp={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},kp={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},Cp={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},$p={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},Sp={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},Ep={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},_p={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},Ap={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},Mp={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},Ip={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},Op={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},jp={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},Tp={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},Lp={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},Dp={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},Pp={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},Rp={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},Up={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},Vp={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},Bp={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},Np={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},Ll={__proto__:null,slate:xp,gray:bp,zinc:kp,neutral:Cp,stone:$p,red:Sp,orange:Ep,amber:_p,yellow:Ap,lime:Mp,green:Ip,emerald:Op,teal:jp,cyan:Tp,sky:Lp,blue:Dp,indigo:Pp,violet:Rp,purple:Up,fuchsia:Vp,pink:Bp,rose:Np};function Dl({disablePreflight:e}={}){return Tl({colors:Ll,disablePreflight:e})}function Ul({className:e="prose",defaultColor:t="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])=>[`${e}-${s}`,(u,l)=>Vl(e,o[0]=="."?"."+l.e(l.h(o.slice(1))):o,l,c=>`& :is(${c.trim()})`)]),rules:[[`(lead|not-${e})`,({1:s},{h:o})=>[{c:o(s)}]],[`${e}-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)"}}],[e+"-",({$$:s},o)=>{let u=Rl(o.theme("fontSize",s));return u&&{"@layer components":u}}],[e+"-",({$$:s},o)=>i(s,o)],[e,(s,o)=>({...i(t,o),"@layer base":[Pl(e,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:S(20,16),marginBottom:S(20,16),paddingLeft:S(26,16)},li:{marginTop:S(8,16),marginBottom:S(8,16)},"ol>li,ul>li":{paddingLeft:S(6,16)},">ul>li p":{marginTop:S(12,16),marginBottom:S(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:S(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:S(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:S(12,16),marginBottom:S(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:S(48,16),marginBottom:S(48,16)},blockquote:{marginTop:S(32,20),marginBottom:S(32,20),paddingLeft:S(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:S(20,16),marginBottom:S(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:S(36,16),marginTop:"0",marginBottom:S(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900",color:"inherit"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:S(24,16),marginTop:S(48,24),marginBottom:S(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800",color:"inherit"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:S(20,16),marginTop:S(32,20),marginBottom:S(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700",color:"inherit"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:S(24,16),marginBottom:S(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700",color:"inherit"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:S(32,16),marginBottom:S(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:S(14,16),lineHeight:"1.4",marginTop:S(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:S(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:S(21,24)},"h3 code":{fontSize:S(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:S(14,16),lineHeight:"1.7",marginTop:S(24,14),marginBottom:S(24,14),borderRadius:"0.375rem",paddingTop:S(12,14),paddingRight:S(16,14),paddingBottom:S(12,14),paddingLeft:S(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:S(32,16),marginBottom:S(32,16),fontSize:S(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:S(8,14),paddingBottom:S(8,14),paddingLeft:S(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:S(8,14),paddingRight:S(8,14),paddingBottom:S(8,14),paddingLeft:S(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:S(20,16),lineHeight:"1.6",marginTop:S(24,20),marginBottom:S(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),Pl(e,o,r)],"@layer components":{...Rl(o.theme("fontSize","base")),color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"}})]]};function i(s,o){let u={},l={},c=(p,h,v)=>{let b=o.theme(`colors.${s}.${h}`,h);v["--tw-prose-"+p]=ge(b);let $=v!=l&&o.d("colors",`${s}-${h}`,b);$&&(l["--tw-prose-"+p]=ge($))};for(let p in n){let h=n[p];p!="dark"&&h&&c(p,h,u)}for(let p in n.dark||{}){let h=n.dark[p];h&&(n.dark?c("invert-"+p,h,u):c(p,h,l))}return Object.keys(u).length?{"@layer defaults":{"&":u,[o.v("dark")]:l}}:void 0}}function Pl(e,t,r){let n={};for(let i in r)n[Vl(e,i,t,s=>`.${t.e(t.h(e))}${s}`)]=r[i];return n}function Vl(e,t,{e:r,h:n},i){return t.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(s,o=" ",u=s,l="")=>i(`${o}:where(${u}):not(:where(.${r(n("not-"+e))} *))${l}`))}function Rl(e){return e?typeof e=="string"?{fontSize:e}:{fontSize:e[0],...typeof e[1]=="string"?{lineHeight:e[1]}:e[1]}:void 0}function S(e,t){return`${(e/t).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}var to=Ys({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:[Dl(),bl(),Cl(),Ul()]});function Bl(e,t=!0){let r=function(){if(Hp)try{let l=ti(new CSSStyleSheet);return l.connect=c=>{let p=ro(c);p.adoptedStyleSheets=[...p.adoptedStyleSheets,l.target]},l.disconnect=ei,l}catch{}let s=document.createElement("style");s.media="not all",document.head.prepend(s);let o=[ti(s)],u=new WeakMap;return{get target(){return o[0].target},snapshot(){let l=o.map(c=>c.snapshot());return()=>l.forEach(c=>c())},clear(){o.forEach(l=>l.clear())},destroy(){o.forEach(l=>l.destroy())},insert(l,c,p){o[0].insert(l,c,p);let h=this.target.cssRules[c];o.forEach((v,b)=>b&&v.target.insertRule(h.cssText,c))},resume(l,c){return o[0].resume(l,c)},connect(l){let c=document.createElement("style");ro(l).appendChild(c);let p=ti(c),{cssRules:h}=this.target;for(let v=0;v<h.length;v++)p.target.insertRule(h[v].cssText,v);o.push(p),u.set(l,p)},disconnect(l){let c=o.indexOf(u.get(l));c>=0&&o.splice(c,1)}}}(),n=gl({...e,hash:e.hash??t},r),i=yl(n);return function(o){return class extends o{connectedCallback(){super.connectedCallback?.(),r.connect(this),i.observe(ro(this))}disconnectedCallback(){r.disconnect(this),super.disconnectedCallback?.()}constructor(...l){super(...l),this.tw=n}}}}var Hp=typeof ShadowRoot<"u"&&(typeof ShadyCSS>"u"||ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;function ro(e){return e.shadowRoot||e.attachShadow({mode:"open"})}var I=e=>Bl(to)(e);var Nr=class extends I(_){constructor(){super(),this.color="#601feb",this.radius="16.8576px",this.size="320px",this.border="#d1d5db"}render(){return d`
|
|
122
|
+
</svg>`,phone:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
123
|
+
<path d="M2.25 6.75C2.25 15.0343 8.96573 21.75 17.25 21.75H19.5C20.7426 21.75 21.75 20.7426 21.75 19.5V18.1284C21.75 17.6121 21.3987 17.1622 20.8979 17.037L16.4747 15.9312C16.0355 15.8214 15.5734 15.9855 15.3018 16.3476L14.3316 17.6412C14.05 18.0166 13.563 18.1827 13.1223 18.0212C9.81539 16.8098 7.19015 14.1846 5.97876 10.8777C5.81734 10.437 5.98336 9.94998 6.3588 9.6684L7.65242 8.69818C8.01453 8.4266 8.17861 7.96445 8.06883 7.52533L6.96304 3.10215C6.83783 2.60133 6.38785 2.25 5.87163 2.25H4.5C3.25736 2.25 2.25 3.25736 2.25 4.5V6.75Z" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
124
|
+
</svg>`};var Rc=xa,ws=class extends Bn{resolveIcon(t){let r=Rc[t];if(!r)throw console.warn("hi-outline: icon not found",t),new Error(`Icon ${t} not found`);return r}render(){super.render();let t=this.shadowRoot?.querySelector("svg");if(!t)throw new Error("svgEl not found "+this.name);t.setAttribute("fill","none"),t.querySelectorAll("[stroke]").forEach(r=>{r.setAttribute("stroke","currentColor")})}};customElements.get("hi-outline")||customElements.define("hi-outline",ws);var Mr,ae,be,Ar,vs,Nn=class{constructor(t,r){f(this,Ar);f(this,Mr);f(this,ae);f(this,be);if(!t)throw new Error("host is required");if(!r)throw new Error("config is required");m(this,Mr,t),a(this,Mr).addController(this),m(this,ae,r)}connect(t){m(this,ae,t),m(this,be,y(this,Ar,vs).call(this))}hostConnected(){setTimeout(()=>{m(this,be,y(this,Ar,vs).call(this))},0)}hostDisconnected(){a(this,be)?.close(1e3,"lit_host_disconnected"),m(this,be,void 0)}send(t){a(this,be)?.send(t)}close(t,r){a(this,be)?.close(t,r)}get isConnected(){return a(this,be)?.readyState===WebSocket.OPEN}get isConnecting(){return a(this,be)?.readyState===WebSocket.CONNECTING}};Mr=new WeakMap,ae=new WeakMap,be=new WeakMap,Ar=new WeakSet,vs=function(){let t=new WebSocket(a(this,ae).url());return a(this,ae).onClose&&(t.onclose=a(this,ae).onClose),a(this,ae).onOpen&&(t.onopen=a(this,ae).onOpen),a(this,ae).onError&&(t.onerror=a(this,ae).onError),a(this,ae).onMessage&&(t.onmessage=a(this,ae).onMessage),t};var ba=Array.isArray;var xs=e=>!!(e&&e.constructor&&e.call&&e.apply);var ka=e=>!(!e||!e.then||!xs(e.then));function*Ca(e,t,r=i=>i,n=1){let i=xs(r)?r:()=>r,s=t?e:0,o=t??e;for(let u=s;u<=o&&(yield i(u),!(u+n>o));u+=n);}var ks=async(e,t)=>{let r=e?.times??3,n=e?.delay,i=e?.backoff??null;for(let s of Ca(1,r)){let[o,u]=await Cs(t)(l=>{throw{_exited:l}});if(!o)return u;if(o._exited)throw o._exited;if(s===r)throw o;n&&await bs(n),i&&await bs(i(s))}},bs=e=>new Promise(t=>setTimeout(t,e)),Cs=e=>(...t)=>{try{let r=e(...t);return ka(r)?r.then(n=>[void 0,n]).catch(n=>[n,void 0]):[void 0,r]}catch(r){return[r,void 0]}};var $a="664df22d-d461-42d6-801e-f70247e2cd7c",Z,X,z,Ot,jt,me,G,_e,Sa,Ea,_a,Ma,Hn=class{constructor(t,r){f(this,G);f(this,Z);f(this,X);f(this,z,null);g(this,"isStreaming",!1);g(this,"typingIndicator");g(this,"ranOutOfCredits",!1);g(this,"messages",[]);g(this,"conversationId","");f(this,Ot,0);f(this,jt);g(this,"isLiveMode",!1);f(this,me,[]);m(this,Z,t),m(this,X,r),a(this,X).autoConnect!==!1&&m(this,z,this.initWS()),t.addController(this)}get hasQueuedMessages(){return a(this,me).length>0}async enqueueMessage(t,{expectStreaming:r=!1}={}){if(a(this,me).length>0){let n=a(this,me)[a(this,me).length-1];if(t.type==="USER_INPUT"&&n.message.type==="USER_INPUT"&&t.value===n.message.value)return!0}return a(this,z)||this.connect(),a(this,z)?.isConnected?y(this,G,_e).call(this,t,{expectStreaming:r}):(a(this,me).push({message:t,options:{expectStreaming:r}}),a(this,Z).requestUpdate(),a(this,z)&&!a(this,z).isConnecting&&!a(this,z).isConnected&&this.retry(),await ks({times:5,delay:2e3},async()=>{if(a(this,z)?.isConnected){let n=[...a(this,me)];m(this,me,[]),a(this,Z).requestUpdate();let i=!1;for(let{message:s,options:o}of n){let u=y(this,G,_e).call(this,s,o);s===t&&(i=u)}return i}else throw new Error("WebSocket not connected yet")}).catch(()=>(console.warn("Failed to send message after retries",t),m(this,me,[]),a(this,Z).requestUpdate(),!1)))}sendUserInput(t,{xUserData:r,xCustomInstructions:n,role:i="user",expectStreaming:s=!1}={}){return y(this,G,_e).call(this,{type:"USER_INPUT",value:t,role:i,xUserData:r,xCustomInstructions:n},{expectStreaming:s})}async enqueueUserInput(t,{xUserData:r,xCustomInstructions:n,role:i="user",expectStreaming:s=!1}={}){return this.enqueueMessage({type:"USER_INPUT",value:t,role:i,xUserData:r,xCustomInstructions:n},{expectStreaming:s})}sendUserCancel(){return y(this,G,_e).call(this,{type:"USER_CANCEL"})}sendUserTypingStart(){return y(this,G,_e).call(this,{type:"USER_TYPING_START"})}sendUserTypingStop(){return y(this,G,_e).call(this,{type:"USER_TYPING_STOP"})}sendUserMeta(t){return y(this,G,_e).call(this,{type:"USER_META",metadata:t})}reloadConfig(){y(this,G,_e).call(this,{type:"RELOAD_CONFIG"})}close(){a(this,z)?.close(1e3,"closed by user")}retry(){clearTimeout(a(this,jt)),m(this,jt,setTimeout(()=>{a(this,X).onReconnect?.(),m(this,z,this.initWS())},1e3*a(this,Ot))),ta(this,Ot)._++}initWS(){return new Nn(a(this,Z),{url:()=>a(this,X).url(this.conversationId,{}),onOpen:t=>y(this,G,Sa).call(this,t),onMessage:t=>y(this,G,Ea).call(this,JSON.parse(t.data)),onError:t=>y(this,G,_a).call(this,t),onClose:t=>y(this,G,Ma).call(this,t)})}hostConnected(){this.conversationId=a(this,X).restoreConversationState?.()?.conversationId||"",this.messages=a(this,X).restoreConversationState?.()?.messages||[]}reset(){y(this,G,_e).call(this,{type:"NEW_CHAT"}),a(this,X).onReset?.(),this.isStreaming=!1,this.typingIndicator=void 0,this.ranOutOfCredits=!1,this.messages=[],this.conversationId="",this.isLiveMode=!1,m(this,me,[]),a(this,Z).requestUpdate()}hostDisconnected(){clearTimeout(a(this,jt))}connect(){a(this,z)||m(this,z,this.initWS())}reconnectSocket(){a(this,z)?.close(1e3,"destroy"),m(this,z,this.initWS())}get lastMsg(){if(this.messages.length>0)return this.messages[this.messages.length-1]}};Z=new WeakMap,X=new WeakMap,z=new WeakMap,Ot=new WeakMap,jt=new WeakMap,me=new WeakMap,G=new WeakSet,_e=function(t,{expectStreaming:r=!1}={}){return a(this,z)?a(this,z).isConnecting?(console.warn("WebSocket is connecting, message not sent",t),!1):a(this,z).isConnected?(r&&!this.isLiveMode&&(this.isStreaming=!0,a(this,Z).requestUpdate()),a(this,z).send(JSON.stringify(t)),!0):(console.warn("WebSocket is not connected, message not sent",t),this.retry(),!1):(console.warn("WebSocket not initialized, message not sent",t),this.connect(),!1)},Sa=function(t){m(this,Ot,0)},Ea=function(t){switch(t.type){case"NEW_MESSAGE":{this.messages=[...this.messages,{...t.message,streaming:!0}].filter((r,n,i)=>n===i.findIndex(s=>s.id===r.id)),this.typingIndicator=void 0,a(this,Z).requestUpdate(),a(this,X).onNewMessage?.(t.message);break}case"APPEND_MESSAGE":{let r=this.messages.find(n=>n.id===t.message.id);if(r){switch(t.message.content_type){case"text":{let{part:n,delta:i,position:s}=t.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}=t.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}=t.message;r.parts||=[],r.parts[n]={tag:t.message.tag,data:r.parts[n]&&"data"in r.parts[n]?Object.assign(r.parts[n].data||{},t.message.data):t.message.data};break}}t.metadata&&(r.metadata=t.metadata),a(this,X).onMessageAppend?.(t),a(this,Z).requestUpdate()}else throw new Error(`Message with id ${t.message.id} not found`);break}case"MESSAGE_DONE":{let r=this.messages.find(n=>n.id===t.message.id);if(r)Object.assign(r,t.message),r.streaming=!1;else throw new Error(`Message with id ${t.message.id} not found`);this.isStreaming=!1,a(this,Z).requestUpdate(),a(this,X).onMessageDone?.(t,r),a(this,X).persistConversationState?.(this.conversationId,this.messages);break}case"MESSAGE_CANCEL":{this.isStreaming=!1,this.typingIndicator=void 0,a(this,Z).requestUpdate();break}case"ERROR":{a(this,X).onMessageError?.(t);break}case"CONNECTED":{this.conversationId=t.conversationId,this.messages=t.messages,a(this,X).onConnect?.(t.conversationId),a(this,X).persistConversationState?.(t.conversationId,t.messages),this.isLiveMode=t.metadata?.isLiveMode,a(this,Z).requestUpdate();break}case"TYPING_START":{t.role==="assistant"&&(this.isStreaming=!0),this.typingIndicator={role:t.role,metadata:t.metadata},a(this,Z).requestUpdate();break}case"TYPING_STOP":{this.typingIndicator=void 0,a(this,Z).requestUpdate();break}case"RAN_OUT_OF_CREDITS":{this.messages.some(r=>r.id===$a)||this.messages.push({id:$a,role:"assistant",content:"Sorry, I've run out of credits. Please contact the shop directly.",timestamp:Date.now()}),this.ranOutOfCredits=!0,a(this,Z).requestUpdate();break}case"RECONNECT":{this.reconnectSocket(),a(this,Z).requestUpdate();break}default:console.warn(`Unknown message type: ${JSON.stringify(t)}`)}},_a=function(t){console.error("onError",t),a(this,X).onError?.(t)},Ma=function(t){a(this,Z).isConnected&&a(this,z)&&!a(this,z).isConnected&&t.reason==="reconnect"&&this.retry(),this.isStreaming=!1,this.typingIndicator=void 0,a(this,Z).requestUpdate(),a(this,X).onClose?.()};var Fh=Symbol(),Uc=Symbol();var Aa=Object.getPrototypeOf,$s=new WeakMap,Vc=e=>e&&($s.has(e)?$s.get(e):Aa(e)===Object.prototype||Aa(e)===Array.prototype);var Ia=e=>Vc(e)&&e[Uc]||null,Ss=(e,t=!0)=>{$s.set(e,t)};var Es=e=>typeof e=="object"&&e!==null,Bc=e=>Es(e)&&!_s.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)&&!(e instanceof Promise),Ta=(e,t)=>{let r=Oa.get(e);if(r?.[0]===t)return r[1];let n=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return Ss(n,!0),Oa.set(e,[t,n]),Reflect.ownKeys(e).forEach(i=>{if(Object.getOwnPropertyDescriptor(n,i))return;let s=Reflect.get(e,i),{enumerable:o}=Reflect.getOwnPropertyDescriptor(e,i),u={value:s,enumerable:o,configurable:!0};if(_s.has(s))Ss(s,!1);else if(ot.has(s)){let[l,c]=ot.get(s);u.value=Ta(l,c())}Object.defineProperty(n,i,u)}),Object.preventExtensions(n)},Nc=(e,t,r,n)=>({deleteProperty(i,s){let o=Reflect.get(i,s);r(s);let u=Reflect.deleteProperty(i,s);return u&&n(["delete",[s],o]),u},set(i,s,o,u){let l=!e()&&Reflect.has(i,s),c=Reflect.get(i,s,u);if(l&&(ja(c,o)||zn.has(o)&&ja(c,zn.get(o))))return!0;r(s),Es(o)&&(o=Ia(o)||o);let p=!ot.has(o)&&Fc(o)?Ms(o):o;return t(s,p),Reflect.set(i,s,p,u),n(["set",[s],o,c]),!0}}),ot=new WeakMap,_s=new WeakSet,Oa=new WeakMap,Fn=[1,1],zn=new WeakMap,ja=Object.is,Hc=(e,t)=>new Proxy(e,t),Fc=Bc,zc=Ta,qc=Nc;function Ms(e={}){if(!Es(e))throw new Error("object required");let t=zn.get(e);if(t)return t;let r=Fn[0],n=new Set,i=(C,M=++Fn[0])=>{r!==M&&(r=M,n.forEach(k=>k(C,M)))},s=Fn[1],o=(C=++Fn[1])=>(s!==C&&!n.size&&(s=C,l.forEach(([M])=>{let k=M[1](C);k>r&&(r=k)})),r),u=C=>(M,k)=>{let E=[...M];E[1]=[C,...E[1]],i(E,k)},l=new Map,c=(C,M)=>{let k=!_s.has(M)&&ot.get(M);if(k){if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&l.has(C))throw new Error("prop listener already exists");if(n.size){let E=k[2](u(C));l.set(C,[k,E])}else l.set(C,[k])}},p=C=>{var M;let k=l.get(C);k&&(l.delete(C),(M=k[1])==null||M.call(k))},h=C=>(n.add(C),n.size===1&&l.forEach(([k,E],T)=>{if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&E)throw new Error("remove already exists");let N=k[2](u(T));l.set(T,[k,N])}),()=>{n.delete(C),n.size===0&&l.forEach(([k,E],T)=>{E&&(E(),l.set(T,[k]))})}),v=!0,b=qc(()=>v,c,p,i),$=Hc(e,b);zn.set(e,$);let j=[e,o,h];return ot.set($,j),Reflect.ownKeys(e).forEach(C=>{let M=Object.getOwnPropertyDescriptor(e,C);"value"in M&&M.writable&&($[C]=e[C])}),v=!1,$}function qn(e,t,r){let n=ot.get(e);(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!n&&console.warn("Please use proxy object");let i,s=[],o=n[2],u=!1,c=o(p=>{if(s.push(p),r){t(s.splice(0));return}i||(i=Promise.resolve().then(()=>{i=void 0,u&&t(s.splice(0))}))});return u=!0,()=>{u=!1,c()}}function Tt(e){let t=ot.get(e);(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!t&&console.warn("Please use proxy object");let[r,n]=t;return zc(r,n())}var Ir,Lt,at,Dt,Pt=class{constructor(t,r){f(this,Ir);f(this,Lt);f(this,at);f(this,Dt,()=>{});m(this,Ir,t),m(this,Lt,r),m(this,at,Tt(r)),t.addController(this)}get state(){return a(this,at)}get value(){return a(this,at)}hostConnected(){a(this,Dt).call(this),m(this,Dt,qn(a(this,Lt),()=>{m(this,at,Tt(a(this,Lt))),a(this,Ir).requestUpdate()}))}hostDisconnected(){a(this,Dt).call(this)}};Ir=new WeakMap,Lt=new WeakMap,at=new WeakMap,Dt=new WeakMap;var Or,jr,lt,Rt,Ne=class{constructor(t,r,n){f(this,Or);f(this,jr);g(this,"proxyObject");f(this,lt);f(this,Rt,()=>{});m(this,Or,t),m(this,jr,n),this.proxyObject=Ms(r),m(this,lt,Tt(this.proxyObject)),t.addController(this)}get state(){return a(this,lt)}get value(){return a(this,lt)}hostConnected(){a(this,Rt).call(this),a(this,jr)?.subscribe&&m(this,Rt,qn(this.proxyObject,()=>{m(this,lt,Tt(this.proxyObject)),a(this,Or).requestUpdate()}))}hostDisconnected(){a(this,Rt).call(this)}};Or=new WeakMap,jr=new WeakMap,lt=new WeakMap,Rt=new WeakMap;var Ut,Tr,Vt,ut,ct,Wn=class{constructor(t,{provider:r,tag:n,key:i}){f(this,Ut);f(this,Tr);f(this,Vt);f(this,ut,null);f(this,ct,null);m(this,Ut,t),m(this,Tr,n),m(this,Vt,i),t.addController(this)}get value(){return a(this,ct)?a(this,ct).value:null}hostConnected(){if(a(this,ct)||(m(this,ut,Wc(a(this,Ut),a(this,Tr))),!a(this,ut)))return;let t=a(this,ut)[a(this,Vt)]instanceof Ne?a(this,ut)[a(this,Vt)]:null;t&&m(this,ct,new Pt(a(this,Ut),t.proxyObject))}hostDisconnected(){}};Ut=new WeakMap,Tr=new WeakMap,Vt=new WeakMap,ut=new WeakMap,ct=new WeakMap;function Wc(e,t){let r=e;for(;r;){let n=r.closest(t);if(n)return n;let i=r.getRootNode();if(i instanceof ShadowRoot)r=i.host;else break}return null}var La=()=>{if(window.Shopify)try{return{customerId:Zc()}}catch{return null}return null},Zc=()=>{try{let e=[()=>window.ShopifyAnalytics?.meta?.page?.customerId,()=>window.meta?.page?.customerId,()=>window._st?.cid,()=>window.ShopifyAnalytics?.lib?.user()?.traits()?.uniqToken];for(let t of e)try{let r=t();if(/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i.test(r))continue;if(r)return r}catch{}}catch{return null}return null},Da=async()=>{try{return(await(await fetch(window.Shopify.routes.root+"cart.js")).json()).items.map(n=>({id:n.id,name:n.title,quantity:n.quantity,price:n.price,variantId:n.variant_id,sku:n.sku,url:n.url,description:n.product_description,image:n.featured_image?.url}))}catch{return[]}};function Pa(e,t="http"){return e.startsWith("http://")||e.startsWith("https://")?e:`${t}://${e}`}function As(e){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(e)}function Ra(e,t){let r=e instanceof URL?e:new URL(e);if(t)for(let[n,i]of t)r.searchParams.set(n,i);return r}var Ua=()=>{if(window.ShopRenter)try{let e=Jc();return{customerEmail:e?.customerEmail,customerId:e?.customerId,customerName:e?.customerName}}catch{return null}return null},Jc=()=>{try{if(window.ShopRenter){let e=window.ShopRenter.customer;return{customerEmail:e?.email,customerId:e?.userId,customerName:[e?.name?.firstName,e?.name?.lastName].filter(Boolean).join(" ")}}return{customerEmail:null,customerId:null,customerName:null}}catch{return{customerEmail:null,customerId:null,customerName:null}}},Va=async()=>{try{let e=window.ShopRenter.shop?.domain;if(!e)return[];let t=Pa(e,"https")+"/cart.json";return(await(await fetch(t)).json()).items.map(s=>({id:s.id,name:s.name,quantity:s.quantity,price:s.price,sku:s.sku,image:s.image,url:s.href}))}catch{return[]}};var Ba=()=>{if(window.UNAS)try{let e=window.UNAS.customer;return{customerEmail:e?.email,customerId:e?.id}}catch(e){return console.error("Error fetching customer information:",e),null}return null},Na=async()=>new Promise((e,t)=>{try{window.UNAS.getCart(r=>{let i=r.items.map(s=>({id:s.id,name:s.name,quantity:s.quantity,price:s.price,sku:s.sku}));e(i)})}catch(r){console.error("Error fetching cart information:",r),t(r)}});var Is;function Os(e){return{lang:e?.lang??Is?.lang,message:e?.message,abortEarly:e?.abortEarly??Is?.abortEarly,abortPipeEarly:e?.abortPipeEarly??Is?.abortPipeEarly}}var Yc;function Qc(e){return Yc?.get(e)}var ep;function tp(e){return ep?.get(e)}var rp;function np(e,t){return rp?.get(e)?.get(t)}function Fa(e){let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&Object.getPrototypeOf(e)?.constructor?.name)??"null":t}function ue(e,t,r,n,i){let s=i&&"input"in i?i.input:r.value,o=i?.expected??e.expects??null,u=i?.received??Fa(s),l={kind:e.kind,type:e.type,input:s,expected:o,received:u,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${u}`,requirement:e.requirement,path:i?.path,issues:i?.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=e.kind==="schema",p=i?.message??e.message??np(e.reference,l.lang)??(c?tp(l.lang):null)??n.message??Qc(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function ce(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Os())}}}function ip(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function za(e,t){let r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}var sp=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}};function js(e,t){return{kind:"validation",type:"max_length",reference:js,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&ue(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Ts(e,t){return{kind:"validation",type:"min_length",reference:Ts,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&ue(this,"length",r,n,{received:`${r.value.length}`}),r}}}function op(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function qa(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function Ls(){return{kind:"schema",type:"any",reference:Ls,expects:"any",async:!1,get"~standard"(){return ce(this)},"~run"(e){return e.typed=!0,e}}}function Bt(e,t){return{kind:"schema",type:"array",reference:Bt,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return ce(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 l={type:"array",origin:"value",input:i,key:s,value:o};for(let c of u.issues)c.path?c.path.unshift(l):c.path=[l],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 ue(this,"type",r,n);return r}}}function Ds(e){return{kind:"schema",type:"boolean",reference:Ds,expects:"boolean",async:!1,message:e,get"~standard"(){return ce(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:ue(this,"type",t,r),t}}}function Ps(e){return{kind:"schema",type:"null",reference:Ps,expects:"null",async:!1,message:e,get"~standard"(){return ce(this)},"~run"(t,r){return t.value===null?t.typed=!0:ue(this,"type",t,r),t}}}function Zn(e){return{kind:"schema",type:"number",reference:Zn,expects:"number",async:!1,message:e,get"~standard"(){return ce(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:ue(this,"type",t,r),t}}}function Le(e,t){return{kind:"schema",type:"object",reference:Le,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return ce(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]:qa(o),l=o["~run"]({value:u},n);if(l.issues){let c={type:"object",origin:"value",input:i,key:s,value:u};for(let p of l.issues)p.path?p.path.unshift(c):p.path=[c],r.issues?.push(p);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value[s]=l.value}else if(o.fallback!==void 0)r.value[s]=op(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(ue(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 ue(this,"type",r,n);return r}}}function Nt(e,t){return{kind:"schema",type:"optional",reference:Nt,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return ce(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=qa(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Rs(e,t){return{kind:"schema",type:"picklist",reference:Rs,expects:za(e.map(Fa),"|"),async:!1,options:e,message:t,get"~standard"(){return ce(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:ue(this,"type",r,n),r}}}function Gn(e,t,r){return{kind:"schema",type:"record",reference:Gn,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return ce(this)},"~run"(n,i){let s=n.value;if(s&&typeof s=="object"){n.typed=!0,n.value={};for(let o in s)if(ip(s,o)){let u=s[o],l=this.key["~run"]({value:o},i);if(l.issues){let p={type:"object",origin:"key",input:s,key:o,value:u};for(let h of l.issues)h.path=[p],n.issues?.push(h);if(n.issues||(n.issues=l.issues),i.abortEarly){n.typed=!1;break}}let c=this.value["~run"]({value:u},i);if(c.issues){let p={type:"object",origin:"value",input:s,key:o,value:u};for(let h of c.issues)h.path?h.path.unshift(p):h.path=[p],n.issues?.push(h);if(n.issues||(n.issues=c.issues),i.abortEarly){n.typed=!1;break}}(!l.typed||!c.typed)&&(n.typed=!1),l.typed&&(n.value[l.value]=c.value)}}else ue(this,"type",n,i);return n}}}function J(e){return{kind:"schema",type:"string",reference:J,expects:"string",async:!1,message:e,get"~standard"(){return ce(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:ue(this,"type",t,r),t}}}function Ha(e){let t;if(e)for(let r of e)t?t.push(...r.issues):t=r.issues;return t}function Ht(e,t){return{kind:"schema",type:"union",reference:Ht,expects:za(e.map(r=>r.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return ce(this)},"~run"(r,n){let i,s,o;for(let u of this.options){let l=u["~run"]({value:r.value},n);if(l.typed)if(l.issues)s?s.push(l):s=[l];else{i=l;break}else o?o.push(l):o=[l]}if(i)return i;if(s){if(s.length===1)return s[0];ue(this,"type",r,n,{issues:Ha(s)}),r.typed=!0}else{if(o?.length===1)return o[0];ue(this,"type",r,n,{issues:Ha(o)})}return r}}}function Wa(e,t,r){let n=e["~run"]({value:t},Os(r));if(n.issues)throw new sp(n.issues);return n.value}function Za(e,t){let r={};for(let n in e.entries)r[n]=!t||t.includes(n)?Nt(e.entries[n]):e.entries[n];return{...e,entries:r,get"~standard"(){return ce(this)}}}function Ga(...e){return{...e[0],pipe:e,get"~standard"(){return ce(this)},"~run"(t,r){for(let n of e)if(n.kind!=="metadata"){if(t.issues&&(n.kind==="schema"||n.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=n["~run"](t,r))}return t}}}function Lr(e,t,r){let n=e["~run"]({value:t},Os(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var Ja=Gn(J(),Ht([J(),Zn(),Ds(),Ps()])),Ka=Ga(J(),Ts(1),js(5e3)),Xa=()=>{try{return window.UNAS?Ba():window.Shopify?La():window.ShopRenter?Ua():null}catch{return null}},Ya=async()=>{try{return window.UNAS?await Na():window.Shopify?await Da():window.ShopRenter?await Va():[]}catch{return[]}},Ft={schema:Le({conversationId:Nt(J()),messages:Nt(Bt(Le({id:J(),timestamp:Zn(),role:Rs(["user","assistant","support"]),content:J(),parts:Nt(Bt(Ht([Le({text:J()}),Le({html:J()}),Le({tag:J(),data:Gn(J(),Ls())})])))})))}),getStorageKey(e){if(!e)throw new Error("widgetId is not set");return`_molin_${e}`},persist(e,t,r){let n=this.getStorageKey(e);localStorage.setItem(n,JSON.stringify({conversationId:t,messages:r}))},restore(e){try{let t=this.getStorageKey(e),r=JSON.parse(localStorage.getItem(t)||"{}"),n=Wa(this.schema,r);return{conversationId:n.conversationId||"",messages:n.messages||[]}}catch(t){return console.error("Failed to restore conversation state:",t),{conversationId:"",messages:[]}}},reset(e){let t=this.getStorageKey(e);localStorage.removeItem(t)}};var Pr,Rr,zt,R,H,Qa,Dr=class extends _{constructor(){super();f(this,R);g(this,"contextCtrl");f(this,Pr);f(this,Rr);f(this,zt,null);this.widgetId="",this.config={},this.callbacks={},this.xUserData=void 0,this.xCustomInstructions=void 0,this.autoConnect=!0,this.contextCtrl=new Ne(this,{config:this.config,callbacks:this.callbacks,xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,widgetId:this.widgetId,conversationId:"",messages:[],isStreaming:!1,typingIndicator:void 0,ranOutOfCredits:!1,isLiveMode:!1,lastMsg:void 0,hasQueuedMessages:!1,sendUserInput:this.sendUserInput.bind(this),sendUserCancel:this.sendUserCancel.bind(this),sendUserTypingStart:this.sendUserTypingStart.bind(this),sendUserTypingStop:this.sendUserTypingStop.bind(this),reset:this.reset.bind(this),reloadConfig:this.reloadConfig.bind(this),enqueueUserInput:this.enqueueUserInput.bind(this),connect:this.connect.bind(this)})}connectedCallback(){super.connectedCallback(),this.updated()}updated(){this.autoConnect&&a(this,R,H).connect(),Object.assign(this.contextCtrl.proxyObject,{widgetId:this.widgetId,config:this.config,callbacks:this.callbacks,xUserData:a(this,Pr),xCustomInstructions:a(this,Rr),conversationId:a(this,R,H).conversationId,messages:a(this,R,H).messages,isStreaming:a(this,R,H).isStreaming,typingIndicator:a(this,R,H).typingIndicator,ranOutOfCredits:a(this,R,H).ranOutOfCredits,isLiveMode:a(this,R,H).isLiveMode,lastMsg:a(this,R,H).lastMsg,hasQueuedMessages:a(this,R,H).hasQueuedMessages,sendUserInput:this.sendUserInput.bind(this),sendUserCancel:this.sendUserCancel.bind(this),sendUserTypingStart:this.sendUserTypingStart.bind(this),sendUserTypingStop:this.sendUserTypingStop.bind(this),reset:this.reset.bind(this),reloadConfig:this.reloadConfig.bind(this),enqueueUserInput:this.enqueueUserInput.bind(this),connect:this.connect.bind(this)}),y(this,R,Qa).call(this)}sendUserInput(r,n={}){let i={xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,...n},s=a(this,R,H).sendUserInput(r,i);return s&&this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:r,example:!1,conversationId:a(this,R,H).conversationId}),s}async enqueueUserInput(r,n={}){let i={xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,role:"user",expectStreaming:!0,...n};return a(this,R,H).enqueueUserInput(r,i)}sendUserCancel(){a(this,R,H).sendUserCancel(),this.callbacks.onUserCanceledStreaming?.({widgetId:this.widgetId})}sendUserTypingStart(){a(this,R,H).sendUserTypingStart()}sendUserTypingStop(){a(this,R,H).sendUserTypingStop()}reset(){a(this,R,H).reset()}reloadConfig(){a(this,R,H).reloadConfig()}connect(){a(this,R,H).connect()}render(){return d`<slot></slot>`}};Pr=new WeakMap,Rr=new WeakMap,zt=new WeakMap,R=new WeakSet,H=function(){return a(this,zt)||m(this,zt,new Hn(this,{autoConnect:this.autoConnect,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=>{r.role==="assistant"&&this.callbacks.onNewMessageStartedStreaming?.({widgetId:this.widgetId,message:r,conversationId:a(this,R,H).conversationId})},onMessageAppend:r=>{},onMessageDone:(r,n)=>{n.role==="assistant"&&this.callbacks.onMessageEndedStreaming?.({widgetId:this.widgetId,text:n.content??"",message:n,usage_TOKENS_COMPLETION:r.message.usage.TOKENS_COMPLETION,conversationId:a(this,R,H).conversationId})},onMessageError:r=>{console.error("ws message error",r),r.message&&this.callbacks.onError?.({widgetId:this.widgetId,error:"WS: "+r.message})},onReset:()=>{Ft.reset(this.widgetId)},onConnect:r=>{let n=Xa();a(this,R,H).sendUserMeta({xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,customerInformation:n,language:window.navigator.language,cart:[]}),Ya().then(i=>{i?.length>0&&a(this,R,H).sendUserMeta({xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,customerInformation:n,cart:i,language:window.navigator.language})}).catch(i=>{console.error(i)})},persistConversationState:(r,n)=>{Ft.persist(this.widgetId,r,n)},restoreConversationState:()=>Ft.restore(this.widgetId)})),a(this,zt)},Qa=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=Lr(Ja,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=Lr(Ka,i);if(!s.success){console.error("Molin: custom-instructions does not pass schema validation",s.issues);return}return s.output}m(this,Pr,r(this.xUserData)),m(this,Rr,n(this.xCustomInstructions))},g(Dr,"properties",{widgetId:{type:String},config:{type:Object},callbacks:{type:Object},xUserData:{type:Object},xCustomInstructions:{type:Object},autoConnect:{type:Boolean}});function el(e){let t=new Wn(e,{provider:Dr,tag:"mw-context-widget",key:"contextCtrl"});return new Proxy({value:null},{get(r,n){if(n==="value")return t.value}})}customElements.get("mw-context-widget")||customElements.define("mw-context-widget",Dr);function Zs(e){return[...e.v,(e.i?"!":"")+e.n].join(":")}function ap(e,t=","){return e.map(Zs).join(t)}var al=typeof CSS<"u"&&CSS.escape||(e=>e.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function Kn(e){for(var t=9,r=e.length;r--;)t=Math.imul(t^e.charCodeAt(r),1597334677);return"#"+((t^t>>>9)>>>0).toString(36)}function Qn(e,t="@media "){return t+U(e).map(r=>(typeof r=="string"&&(r={min:r}),r.raw||Object.keys(r).map(n=>`(${n}-width:${r[n]})`).join(" and "))).join(",")}function U(e=[]){return Array.isArray(e)?e:e==null?[]:[e]}function tl(e){return e}function ei(){}var Y={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function ll(e){return e.match(/[-=:;]/g)?.length||0}function Hs(e){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(e)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(ll(e),15)<<18}var lp=["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 Gs({n:e,i:t,v:r=[]},n,i,s){e&&(e=Zs({n:e,i:t,v:r})),s=[...U(s)];for(let u of r){let l=n.theme("screens",u);for(let c of U(l&&Qn(l)||n.v(u))){var o;s.push(c),i|=l?67108864|Hs(c):u=="dark"?1073741824:c[0]=="@"?Hs(c):(o=c,1<<~(/:([a-z-]+)/.test(o)&&~lp.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:e,p:i,r:s,i:t}}var ul=new Map;function Fs(e){if(e.d){let t=[],r=Us(e.r.reduce((n,i)=>i[0]=="@"?(t.push(i),n):i?Us(n,s=>Us(i,o=>{let u=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(o);if(u){let l=s.indexOf(u[1]);return~l?s.slice(0,l)+u[0]+s.slice(l+u[1].length):Vs(s,o)}return Vs(o,s)})):n,"&"),n=>Vs(n,e.n?"."+al(e.n):""));return r&&t.push(r.replace(/:merge\((.+?)\)/g,"$1")),t.reduceRight((n,i)=>i+"{"+n+"}",e.d)}}function Us(e,t){return e.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(r,n,i)=>t(n)+i)}function Vs(e,t){return e.replace(/&/g,t)}var rl=new Intl.Collator("en",{numeric:!0});function cl(e,t){for(var r=0,n=e.length;r<n;){let i=n+r>>1;0>=pl(e[i],t)?r=i+1:n=i}return n}function pl(e,t){let r=e.p&Y.o;return r==(t.p&Y.o)&&(r==Y.b||r==Y.o)?0:e.p-t.p||e.o-t.o||rl.compare(nl(e.n),nl(t.n))||rl.compare(il(e.n),il(t.n))}function nl(e){return(e||"").split(/:/).pop().split("/").pop()||"\0"}function il(e){return(e||"").replace(/\W/g,t=>String.fromCharCode(127+t.charCodeAt(0)))+"\0"}function Bs(e,t){return Math.round(parseInt(e,16)*t)}function ge(e,t={}){if(typeof e=="function")return e(t);let{opacityValue:r="1",opacityVariable:n}=t,i=n?`var(${n})`:r;if(e.includes("<alpha-value>"))return e.replace("<alpha-value>",i);if(e[0]=="#"&&(e.length==4||e.length==7)){let s=(e.length-1)/3,o=[17,1,.062272][s-1];return`rgba(${[Bs(e.substr(1,s),o),Bs(e.substr(1+s,s),o),Bs(e.substr(1+2*s,s),o),i]})`}return i=="1"?e:i=="0"?"#0000":e.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${i})`)}function hl(e,t,r,n,i=[]){return function s(o,{n:u,p:l,r:c=[],i:p},h){let v=[],b="",$=0,j=0;for(let k in o||{}){var C,M;let E=o[k];if(k[0]=="@"){if(!E)continue;if(k[1]=="a"){v.push(...Ks(u,l,Yn(""+E),h,l,c,p,!0));continue}if(k[1]=="l"){for(let T of U(E))v.push(...s(T,{n:u,p:(C=Y[k[7]],l&~Y.o|C),r:k[7]=="d"?[]:c,i:p},h));continue}if(k[1]=="i"){v.push(...U(E).map(T=>({p:-1,o:0,r:[],d:k+" "+T})));continue}if(k[1]=="k"){v.push({p:Y.d,o:0,r:[k],d:s(E,{p:Y.d},h).map(Fs).join("")});continue}if(k[1]=="f"){v.push(...U(E).map(T=>({p:Y.d,o:0,r:[k],d:s(T,{p:Y.d},h).map(Fs).join("")})));continue}}if(typeof E!="object"||Array.isArray(E))k=="label"&&E?u=E+Kn(JSON.stringify([l,p,o])):(E||E===0)&&(k=k.replace(/[A-Z]/g,T=>"-"+T.toLowerCase()),j+=1,$=Math.max($,(M=k)[0]=="-"?0:ll(M)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(M)?+!!RegExp.$1||-!!RegExp.$2:0)+1),b+=(b?";":"")+U(E).map(T=>h.s(k,Js(""+T,h.theme)+(p?" !important":""))).join(";"));else if(k[0]=="@"||k.includes("&")){let T=l;k[0]=="@"&&(k=k.replace(/\bscreen\(([^)]+)\)/g,(N,K)=>{let te=h.theme("screens",K);return te?(T|=67108864,Qn(te,"")):N}),T|=Hs(k)),v.push(...s(E,{n:u,p:T,r:[...c,k],i:p},h))}else v.push(...s(E,{p:l,r:[...c,k]},h))}return v.unshift({n:u,p:l,o:Math.max(0,15-j)+1.5*Math.min($||15,15),r:c,d:b}),v.sort(pl)}(e,Gs(t,r,n,i),r)}function Js(e,t){return e.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(r,n,i,s,o="")=>{let u=t(i,o);return typeof u=="function"&&/color|fill|stroke/i.test(i)?ge(u):""+U(u).filter(l=>Object(l)!==l)})}function dl(e,t){let r,n=[];for(let i of e)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&&t}):n.push({...i,n:i.n&&t});return n}function Xn(e,t,r=Y.u,n,i){let s=[];for(let o of e)for(let u of function(l,c,p,h,v){l={...l,i:l.i||v};let b=function($,j){let C=ul.get($.n);return C?C($,j):j.r($.n,$.v[0]=="dark")}(l,c);return b?typeof b=="string"?({r:h,p}=Gs(l,c,p,h),dl(Xn(Yn(b),c,p,h,l.i),l.n)):Array.isArray(b)?b.map($=>{var j,C;return{o:0,...$,r:[...U(h),...U($.r)],p:(j=p,C=$.p??p,j&~Y.o|C)}}):hl(b,l,c,p,h):[{c:Zs(l),p:0,o:0,r:[]}]}(o,t,r,n,i))s.splice(cl(s,u),0,u);return s}function Ks(e,t,r,n,i,s,o,u){return dl((u?r.flatMap(l=>Xn([l],n,i,s,o)):Xn(r,n,i,s,o)).map(l=>l.p&Y.o&&(l.n||t==Y.b)?{...l,p:l.p&~Y.o|t,o:0}:l),e)}function up(e,t,r,n){var i;return i=(s,o)=>{let{n:u,p:l,r:c,i:p}=Gs(s,o,t);return r&&Ks(u,t,r,o,l,c,p,n)},ul.set(e,i),e}function Ns(e,t,r){if(e[e.length-1]!="("){let n=[],i=!1,s=!1,o="";for(let u of e)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),t[0].push({n:o,v:n.filter(cp),i}))}}function cp(e,t,r){return r.indexOf(e)==t}var sl=new Map;function Yn(e){let t=sl.get(e);if(!t){let r=[],n=[[]],i=0,s=0,o=null,u=0,l=(c,p=0)=>{i!=u&&(r.push(e.slice(i,u+p)),c&&Ns(r,n)),i=u+1};for(;u<e.length;u++){let c=e[u];if(s)e[u-1]!="\\"&&(s+=+(c=="[")||-(c=="]"));else if(c=="[")s+=1;else if(o)e[u-1]!="\\"&&o.test(e.slice(u))&&(o=null,i=u+RegExp.lastMatch.length);else if(c=="/"&&e[u-1]!="\\"&&(e[u+1]=="*"||e[u+1]=="/"))o=e[u+1]=="*"?/^\*\//:/^[\r\n]/;else if(c=="(")l(),r.push(c);else if(c==":")e[u+1]!=":"&&l(!1,1);else if(/[\s,)]/.test(c)){l(!0);let p=r.lastIndexOf("(");if(c==")"){let h=r[p-1];if(/[~@]$/.test(h)){let v=n.shift();r.length=p,Ns([...r,"#"],n);let{v:b}=n[0].pop();for(let $ of v)$.v.splice(+($.v[0]=="dark")-+(b[0]=="dark"),b.length);Ns([...r,up(h.length>1?h.slice(0,-1)+Kn(JSON.stringify([h,v])):h+"("+ap(v)+")",Y.a,v,/@$/.test(h))],n)}p=r.lastIndexOf("(",p-1)}r.length=p+1}else/[~@]/.test(c)&&e[u+1]=="("&&n.unshift([])}l(!0),sl.set(e,t=n[0])}return t}function w(e,t,r){return[e,zs(t,r)]}function zs(e,t){return typeof e=="function"?e:typeof e=="string"&&/^[\w-]+$/.test(e)?(r,n)=>({[e]:t?t(r,n):qs(r,1)}):r=>e||{[r[1]]:qs(r,2)}}function qs(e,t,r=e.slice(t).find(Boolean)||e.$$||e.input){return e.input[0]=="-"?`calc(${r} * -1)`:r}function x(e,t,r,n){return[e,Xs(t,r,n)]}function Xs(e,t,r){let n=typeof t=="string"?(i,s)=>({[t]:r?r(i,s):i._}):t||(({1:i,_:s},o,u)=>({[i||u]:s}));return(i,s)=>{let o=fl(e||i[1]),u=s.theme(o,i.$$)??Me(i.$$,o,s);if(u!=null)return i._=qs(i,0,u),n(i,s,o)}}function Q(e,t={},r){return[e,pp(t,r)]}function pp(e={},t){return(r,n)=>{let{section:i=fl(r[0]).replace("-","")+"Color"}=e,[s,o]=hp(r.$$);if(!s)return;let u=n.theme(i,s)||Me(s,i,n);if(!u||typeof u=="object")return;let{opacityVariable:l=`--tw-${r[0].replace(/-$/,"")}-opacity`,opacitySection:c=i.replace("Color","Opacity"),property:p=i,selector:h}=e,v=n.theme(c,o||"DEFAULT")||o&&Me(o,c,n),b=t||(({_:j})=>{let C=Ur(p,j);return h?{[h]:C}:C});r._={value:ge(u,{opacityVariable:l||void 0,opacityValue:v||void 0}),color:j=>ge(u,j),opacityVariable:l||void 0,opacityValue:v||void 0};let $=b(r,n);if(!r.dark){let j=n.d(i,s,u);j&&j!==u&&(r._={value:ge(j,{opacityVariable:l||void 0,opacityValue:v||"1"}),color:C=>ge(j,C),opacityVariable:l||void 0,opacityValue:v||void 0},$={"&":$,[n.v("dark")]:b(r,n)})}return $}}function hp(e){return(e.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function Ur(e,t){let r={};return typeof t=="string"?r[e]=t:(t.opacityVariable&&t.value.includes(t.opacityVariable)&&(r[t.opacityVariable]=t.opacityValue||"1"),r[e]=t.value),r}function Me(e,t,r){if(e[0]=="["&&e.slice(-1)=="]"){if(e=qt(Js(e.slice(1,-1),r.theme)),!t)return e;if(!(/color|fill|stroke/i.test(t)&&!(/^color:/.test(e)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(e))||/image/i.test(t)&&!(/^image:/.test(e)||/^[a-z-]+\(/.test(e))||/weight/i.test(t)&&!(/^(number|any):/.test(e)||/^\d+$/.test(e))||/position/i.test(t)&&/^(length|size):/.test(e)))return e.replace(/^[a-z-]+:/,"")}}function fl(e){return e.replace(/-./g,t=>t[1].toUpperCase())}function qt(e){return e.includes("url(")?e.replace(/(.*?)(url\(.*?\))(.*?)/g,(t,r="",n,i="")=>qt(r)+n+qt(i)):e.replace(/(^|[^\\])_+/g,(t,r)=>r+" ".repeat(t.length-r.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,t=>t.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}function Ys({presets:e=[],...t}){let r={darkMode:void 0,darkColor:void 0,preflight:t.preflight!==!1&&[],theme:{},variants:U(t.variants),rules:U(t.rules),ignorelist:U(t.ignorelist),hash:void 0,stringify:(n,i)=>n+":"+i,finalize:[]};for(let n of U([...e,{darkMode:t.darkMode,darkColor:t.darkColor,preflight:t.preflight!==!1&&U(t.preflight),theme:t.theme,hash:t.hash,stringify:t.stringify,finalize:t.finalize}])){let{preflight:i,darkMode:s=r.darkMode,darkColor:o=r.darkColor,theme:u,variants:l,rules:c,ignorelist:p,hash:h=r.hash,stringify:v=r.stringify,finalize:b}=typeof n=="function"?n(r):n;r={preflight:r.preflight!==!1&&i!==!1&&[...r.preflight,...U(i)],darkMode:s,darkColor:o,theme:{...r.theme,...u,extend:{...r.theme.extend,...u?.extend}},variants:[...r.variants,...U(l)],rules:[...r.rules,...U(c)],ignorelist:[...r.ignorelist,...U(p)],hash:h,stringify:v,finalize:[...r.finalize,...U(b)]}}return r}function ol(e,t,r,n,i,s){for(let o of t){let u=r.get(o);u||r.set(o,u=n(o));let l=u(e,i,s);if(l)return l}}function dp(e){var t;return Ws(e[0],typeof(t=e[1])=="function"?t:()=>t)}function fp(e){var t,r;return Array.isArray(e)?Ws(e[0],zs(e[1],e[2])):Ws(e,zs(t,r))}function Ws(e,t){return ml(e,(r,n,i,s)=>{let o=n.exec(r);if(o)return o.$$=r.slice(o[0].length),o.dark=s,t(o,i)})}function ml(e,t){let r=U(e).map(mp);return(n,i,s)=>{for(let o of r){let u=t(n,o,i,s);if(u)return u}}}function mp(e){return typeof e=="string"?RegExp("^"+e+(e.includes("$")||e.slice(-1)=="-"?"":"$")):e}function gl(e,t){let r=Ys(e),n=function({theme:l,darkMode:c,darkColor:p=ei,variants:h,rules:v,hash:b,stringify:$,ignorelist:j,finalize:C}){let M=new Map,k=new Map,E=new Map,T=new Map,N=ml(j,(P,re)=>re.test(P));h.push(["dark",Array.isArray(c)||c=="class"?`${U(c)[1]||".dark"} &`:typeof c=="string"&&c!="media"?c:"@media (prefers-color-scheme:dark)"]);let K=typeof b=="function"?P=>b(P,Kn):b?Kn:tl;K!==tl&&C.push(P=>({...P,n:P.n&&K(P.n),d:P.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(re,oe)=>"--"+K(oe).replace("#",""))}));let te={theme:function({extend:P={},...re}){let oe={},os={get colors(){return Ye("colors")},theme:Ye,negative(){return{}},breakpoints(W){let ne={};for(let le in W)typeof W[le]=="string"&&(ne["screen-"+le]=W[le]);return ne}};return Ye;function Ye(W,ne,le,wr){if(W){if({1:W,2:wr}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(W)||[,W],/[.[]/.test(W)){let Oe=[];W.replace(/\[([^\]]+)\]|([^.[]+)/g,(et,xr,Cc=xr)=>Oe.push(Cc)),W=Oe.shift(),le=ne,ne=Oe.join("-")}let Ee=oe[W]||Object.assign(Object.assign(oe[W]={},In(re,W)),In(P,W));if(ne==null)return Ee;ne||(ne="DEFAULT");let Qe=Ee[ne]??ne.split("-").reduce((Oe,et)=>Oe?.[et],Ee)??le;return wr?ge(Qe,{opacityValue:Js(wr,Ye)}):Qe}let vr={};for(let Ee of[...Object.keys(re),...Object.keys(P)])vr[Ee]=Ye(Ee);return vr}function In(W,ne){let le=W[ne];return typeof le=="function"&&(le=le(os)),le&&/color|fill|stroke/i.test(ne)?function wr(vr,Ee=[]){let Qe={};for(let Oe in vr){let et=vr[Oe],xr=[...Ee,Oe];Qe[xr.join("-")]=et,Oe=="DEFAULT"&&(xr=Ee,Qe[Ee.join("-")]=et),typeof et=="object"&&Object.assign(Qe,wr(et,xr))}return Qe}(le):le}}(l),e:al,h:K,s(P,re){return $(P,re,te)},d(P,re,oe){return p(P,re,te,oe)},v(P){return M.has(P)||M.set(P,ol(P,h,k,dp,te)||"&:"+P),M.get(P)},r(P,re){let oe=JSON.stringify([P,re]);return E.has(oe)||E.set(oe,!N(P,te)&&ol(P,v,T,fp,te,re)),E.get(oe)},f(P){return C.reduce((re,oe)=>oe(re,te),P)}};return te}(r),i=new Map,s=[],o=new Set;t.resume(l=>i.set(l,l),(l,c)=>{t.insert(l,s.length,c),s.push(c),o.add(l)});function u(l){let c=n.f(l),p=Fs(c);if(p&&!o.has(p)){o.add(p);let h=cl(s,l);t.insert(p,h,l),s.splice(h,0,l)}return c.n}return Object.defineProperties(function(c){if(!i.size)for(let h of U(r.preflight))typeof h=="function"&&(h=h(n)),h&&(typeof h=="string"?Ks("",Y.b,Yn(h),n,Y.b,[],!1,!0):hl(h,{},n,Y.b)).forEach(u);c=""+c;let p=i.get(c);if(!p){let h=new Set;for(let v of Xn(Yn(c),n))h.add(v.c).add(u(v));p=[...h].filter(Boolean).join(" "),i.set(c,p).set(p,p)}return p},Object.getOwnPropertyDescriptors({get target(){return t.target},theme:n.theme,config:r,snapshot(){let l=t.snapshot(),c=new Set(o),p=new Map(i),h=[...s];return()=>{l(),o=c,i=p,s=h}},clear(){t.clear(),o=new Set,i=new Map,s=[]},destroy(){this.clear(),t.destroy()}}))}function gp(e,t){return e!=t&&""+e.split(" ").sort()!=""+t.split(" ").sort()}function yl(e){let t=new MutationObserver(r);return{observe(i){t.observe(i,{attributeFilter:["class"],subtree:!0,childList:!0}),n(i),r([{target:i,type:""}])},disconnect(){t.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);t.takeRecords()}function n(i){let s,o=i.getAttribute?.("class");o&&gp(o,s=e(o))&&i.setAttribute("class",s)}}function yp(e){let t=document.querySelector(e||'style[data-twind=""]');return(!t||t.tagName!="STYLE")&&(t=document.createElement("style"),document.head.prepend(t)),t.dataset.twind="claimed",t}function ti(e){let t=e?.cssRules?e:(e&&typeof e!="string"?e:yp(e)).sheet;return{target:t,snapshot(){let r=Array.from(t.cssRules,n=>n.cssText);return()=>{this.clear(),r.forEach(this.insert)}},clear(){for(let r=t.cssRules.length;r--;)t.deleteRule(r)},destroy(){t.ownerNode?.remove()},insert(r,n){try{t.insertRule(r,n)}catch{t.insertRule(":root{}",n)}},resume:ei}}var wp=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 wl(e){return wp.get(e)}function vl(e){var t=/^(?:(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(e);return t?t[1]?1:t[2]?2:t[3]?3:5:0}function xl(e,t){var r=/^(?:(pos)|(cli)|(background-i)|(flex(?:$|-b)|(?:max-|min-)?(?:block-s|inl|he|widt))|dis)/i.exec(e);return r?r[1]?/^sti/i.test(t)?1:0:r[2]?/^pat/i.test(t)?1:0:r[3]?/^image-/i.test(t)?1:0:r[4]?t[3]==="-"?2:0:/^(?:inline-)?grid$/i.test(t)?4:0:0}var vp=[["-webkit-",1],["-moz-",2],["-ms-",4]];function bl(){return({stringify:e})=>({stringify(t,r,n){let i="",s=wl(t);s&&(i+=e(s,r,n)+";");let o=vl(t),u=xl(t,r);for(let l of vp)o&l[1]&&(i+=e(l[0]+t,r,n)+";"),u&l[1]&&(i+=e(t,l[0]+r,n)+";");return i+e(t,r,n)}})}function Cl(){return{rules:[["line-clamp-none",{"-webkit-line-clamp":"unset"}],["line-clamp-",Xs("lineClamp",({_:e})=>kl(e))],["line-clamp-(\\d+)",({1:e})=>kl(e)]]}}function kl(e){return{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":`${e}`}}var Br={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",...pe(4,"rem",4,.5,.5),...pe(12,"rem",4,5),14:"3.5rem",...pe(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:D("blur"),backdropBrightness:D("brightness"),backdropContrast:D("contrast"),backdropGrayscale:D("grayscale"),backdropHueRotate:D("hueRotate"),backdropInvert:D("invert"),backdropOpacity:D("opacity"),backdropSaturate:D("saturate"),backdropSepia:D("sepia"),backgroundColor:D("colors"),backgroundImage:{none:"none"},backgroundOpacity:D("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:{...pe(200,"",100,0,50),...pe(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:e})=>({DEFAULT:e("colors.gray.200","currentColor"),...e("colors")}),borderOpacity:D("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:D("spacing"),borderWidth:{DEFAULT:"1px",...ye(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:D("colors"),caretColor:D("colors"),accentColor:({theme:e})=>({auto:"auto",...e("colors")}),contrast:{...pe(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:D("borderColor"),divideOpacity:D("borderOpacity"),divideWidth:D("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:e})=>({...e("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:e})=>({...e("spacing"),...Vr(2,6),...Vr(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:D("spacing"),gradientColorStops:D("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:e})=>({...e("spacing"),...Vr(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:e})=>({...e("spacing"),...Vr(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:{...pe(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),maxHeight:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...e("spacing")}),maxWidth:({theme:e,breakpoints:t})=>({...t(e("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:{...pe(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:D("spacing"),placeholderColor:D("colors"),placeholderOpacity:D("opacity"),outlineColor:D("colors"),outlineOffset:ye(8,"px"),outlineWidth:ye(8,"px"),ringColor:({theme:e})=>({...e("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:D("colors"),ringOffsetWidth:ye(8,"px"),ringOpacity:({theme:e})=>({...e("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...ye(8,"px")},rotate:{...ye(2,"deg"),...ye(12,"deg",3),...ye(180,"deg",45)},saturate:pe(200,"",100,0,50),scale:{...pe(150,"",100,0,50),...pe(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:D("spacing"),scrollPadding:D("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...ye(2,"deg"),...ye(12,"deg",3)},space:D("spacing"),stroke:({theme:e})=>({...e("colors"),none:"none"}),strokeWidth:pe(2),textColor:D("colors"),textDecorationColor:D("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...ye(8,"px")},textUnderlineOffset:{auto:"auto",...ye(8,"px")},textIndent:D("spacing"),textOpacity:D("opacity"),transitionDuration:({theme:e})=>({...e("durations"),DEFAULT:"150ms"}),transitionDelay:D("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:e})=>({...e("spacing"),...Vr(2,4),full:"100%"}),width:({theme:e})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...e("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...pe(50,"",1,0,10),auto:"auto"}};function Vr(e,t){let r={};do for(var n=1;n<e;n++)r[`${n}/${e}`]=Number((n/e*100).toFixed(6))+"%";while(++e<=t);return r}function ye(e,t,r=0){let n={};for(;r<=e;r=2*r||1)n[r]=r+t;return n}function pe(e,t="",r=1,n=0,i=1,s={}){for(;n<=e;n+=i)s[n]=n/r+t;return s}function D(e){return({theme:t})=>t(e)}var $l={"*,::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, ${Br.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, ${Br.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 Il=[w("\\[([-\\w]+):(.+)]",({1:e,2:t},r)=>({"@layer overrides":{"&":{[e]:Me(`[${t}]`,"",r)}}})),w("(group|peer)([~/][^-[]+)?",({input:e},{h:t})=>[{c:t(e)}]),x("aspect-","aspectRatio"),w("container",(e,{theme:t})=>{let{screens:r=t("screens"),center:n,padding:i}=t("container"),s={width:"100%",marginRight:n&&"auto",marginLeft:n&&"auto",...o("xs")};for(let u in r){let l=r[u];typeof l=="string"&&(s[Qn(l)]={"&":{maxWidth:l,...o(u)}})}return s;function o(u){let l=i&&(typeof i=="string"?i:i[u]||i.DEFAULT);if(l)return{paddingRight:l,paddingLeft:l}}}),x("content-","content",({_:e})=>({"--tw-content":e,content:"var(--tw-content)"})),w("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),w("box-(border|content)","boxSizing",({1:e})=>e+"-box"),w("hidden",{display:"none"}),w("table-(auto|fixed)","tableLayout"),w(["(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)",w("isolate","isolation"),w("object-(contain|cover|fill|none|scale-down)","objectFit"),x("object-","objectPosition"),w("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",ri),w("overscroll(-[xy])?-(auto|contain|none)",({1:e="",2:t})=>({["overscroll-behavior"+e]:t})),w("(static|fixed|absolute|relative|sticky)","position"),x("-?inset(-[xy])?(?:$|-)","inset",({1:e,_:t})=>({top:e!="-x"&&t,right:e!="-y"&&t,bottom:e!="-x"&&t,left:e!="-y"&&t})),x("-?(top|bottom|left|right)(?:$|-)","inset"),w("(visible|collapse)","visibility"),w("invisible",{visibility:"hidden"}),x("-?z-","zIndex"),w("flex-((row|col)(-reverse)?)","flexDirection",Sl),w("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),x("(flex-(?:grow|shrink))(?:$|-)"),x("(flex)-"),x("grow(?:$|-)","flexGrow"),x("shrink(?:$|-)","flexShrink"),x("basis-","flexBasis"),x("-?(order)-"),"-?(order)-(\\d+)",x("grid-cols-","gridTemplateColumns"),w("grid-cols-(\\d+)","gridTemplateColumns",Al),x("col-","gridColumn"),w("col-(span)-(\\d+)","gridColumn",Ml),x("col-start-","gridColumnStart"),w("col-start-(auto|\\d+)","gridColumnStart"),x("col-end-","gridColumnEnd"),w("col-end-(auto|\\d+)","gridColumnEnd"),x("grid-rows-","gridTemplateRows"),w("grid-rows-(\\d+)","gridTemplateRows",Al),x("row-","gridRow"),w("row-(span)-(\\d+)","gridRow",Ml),x("row-start-","gridRowStart"),w("row-start-(auto|\\d+)","gridRowStart"),x("row-end-","gridRowEnd"),w("row-end-(auto|\\d+)","gridRowEnd"),w("grid-flow-((row|col)(-dense)?)","gridAutoFlow",e=>ri(Sl(e))),w("grid-flow-(dense)","gridAutoFlow"),x("auto-cols-","gridAutoColumns"),x("auto-rows-","gridAutoRows"),x("gap-x(?:$|-)","gap","columnGap"),x("gap-y(?:$|-)","gap","rowGap"),x("gap(?:$|-)","gap"),"(justify-(?:items|self))-",w("justify-","justifyContent",El),w("(content|items|self)-",e=>({["align-"+e[1]]:El(e)})),w("(place-(content|items|self))-",({1:e,$$:t})=>({[e]:("wun".includes(t[3])?"space-":"")+t})),x("p([xytrbl])?(?:$|-)","padding",Wt("padding")),x("-?m([xytrbl])?(?:$|-)","margin",Wt("margin")),x("-?space-(x|y)(?:$|-)","space",({1:e,_:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[e]]:`calc(${t} * calc(1 - var(--tw-space-${e}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[e]]:`calc(${t} * var(--tw-space-${e}-reverse))`}})),w("space-(x|y)-reverse",({1:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"1"}})),x("w-","width"),x("min-w-","minWidth"),x("max-w-","maxWidth"),x("h-","height"),x("min-h-","minHeight"),x("max-h-","maxHeight"),x("font-","fontWeight"),x("font-","fontFamily",({_:e})=>typeof(e=U(e))[1]=="string"?{fontFamily:ke(e)}:{fontFamily:ke(e[0]),...e[1]}),w("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),w("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),w("italic","fontStyle"),w("not-italic",{fontStyle:"normal"}),w("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:e,2:t="",3:r})=>t=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(r?"numeric-fraction":"pt".includes(t[0])?"numeric-spacing":t?"numeric-figure":e)]:e,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...He({"--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,/*!*/ /*!*/)"})}),x("tracking-","letterSpacing"),x("leading-","lineHeight"),w("list-(inside|outside)","listStylePosition"),x("list-","listStyleType"),w("list-","listStyleType"),x("placeholder-opacity-","placeholderOpacity",({_:e})=>({"&::placeholder":{"--tw-placeholder-opacity":e}})),Q("placeholder-",{property:"color",selector:"&::placeholder"}),w("text-(left|center|right|justify|start|end)","textAlign"),w("text-(ellipsis|clip)","textOverflow"),x("text-opacity-","textOpacity","--tw-text-opacity"),Q("text-",{property:"color"}),x("text-","fontSize",({_:e})=>typeof e=="string"?{fontSize:e}:{fontSize:e[0],...typeof e[1]=="string"?{lineHeight:e[1]}:e[1]}),x("indent-","textIndent"),w("(overline|underline|line-through)","textDecorationLine"),w("no-underline",{textDecorationLine:"none"}),x("underline-offset-","textUnderlineOffset"),Q("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),x("decoration-","textDecorationThickness"),w("decoration-","textDecorationStyle"),w("(uppercase|lowercase|capitalize)","textTransform"),w("normal-case",{textTransform:"none"}),w("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),w("align-","verticalAlign"),w("whitespace-","whiteSpace"),w("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),w("break-words",{overflowWrap:"break-word"}),w("break-all",{wordBreak:"break-all"}),w("break-keep",{wordBreak:"keep-all"}),Q("caret-",{opacityVariable:!1,opacitySection:"opacity"}),Q("accent-",{opacityVariable:!1,opacitySection:"opacity"}),w("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:e})=>`linear-gradient(to ${pt(e," ")},var(--tw-gradient-stops))`),Q("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-from":e.value,"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),Q("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${e.value},var(--tw-gradient-to)`})),Q("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),w("bg-(fixed|local|scroll)","backgroundAttachment"),w("bg-origin-(border|padding|content)","backgroundOrigin",({1:e})=>e+"-box"),w(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),w("bg-blend-","backgroundBlendMode"),w("bg-clip-(border|padding|content|text)","backgroundClip",({1:e})=>e+(e=="text"?"":"-box")),x("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),Q("bg-",{section:"backgroundColor"}),x("bg-","backgroundImage"),x("bg-","backgroundPosition"),w("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",ri),x("bg-","backgroundSize"),x("rounded(?:$|-)","borderRadius"),x("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:e,_:t})=>{let r={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[e]||[e,e];return{[`border-${pt(r[0])}-radius`]:t,[`border-${pt(r[1])}-radius`]:t}}),w("border-(collapse|separate)","borderCollapse"),x("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),w("border-(solid|dashed|dotted|double|none)","borderStyle"),x("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:e,_:t})=>({...He({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(e||"-x")]:t,["--tw-border-spacing"+(e||"-y")]:t,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),Q("border-([xytrbl])-",{section:"borderColor"},Wt("border","Color")),Q("border-"),x("border-([xytrbl])(?:$|-)","borderWidth",Wt("border","Width")),x("border(?:$|-)","borderWidth"),x("divide-opacity(?:$|-)","divideOpacity",({_:e})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":e}})),w("divide-(solid|dashed|dotted|double|none)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:e}})),w("divide-([xy]-reverse)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+e]:"1"}})),x("divide-([xy])(?:$|-)","divideWidth",({1:e,_:t})=>{let r={x:"lr",y:"tb"}[e];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${e}-reverse`]:"0",[`border-${pt(r[0])}Width`]:`calc(${t} * calc(1 - var(--tw-divide-${e}-reverse)))`,[`border-${pt(r[1])}Width`]:`calc(${t} * var(--tw-divide-${e}-reverse))`}}}),Q("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),x("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),Q("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),x("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),w("ring-inset",{"--tw-ring-inset":"inset"}),Q("ring-",{property:"--tw-ring-color"}),x("ring(?:$|-)","ringWidth",({_:e},{theme:t})=>({...He({"--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":t("ringOffsetWidth","","0px"),"--tw-ring-offset-color":ge(t("ringOffsetColor","","#fff")),"--tw-ring-color":ge(t("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":t("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(${e} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),Q("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-shadow-color":e.value,"--tw-shadow":"var(--tw-shadow-colored)"})),x("shadow(?:$|-)","boxShadow",({_:e})=>({...He({"--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":ke(e),"--tw-shadow-colored":ke(e).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)"})),x("(opacity)-"),w("mix-blend-","mixBlendMode"),..._l(),..._l("backdrop-"),x("transition(?:$|-)","transitionProperty",(e,{theme:t})=>({transitionProperty:ke(e),transitionTimingFunction:e._=="none"?void 0:ke(t("transitionTimingFunction","")),transitionDuration:e._=="none"?void 0:ke(t("transitionDuration",""))})),x("duration(?:$|-)","transitionDuration","transitionDuration",ke),x("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",ke),x("delay(?:$|-)","transitionDelay","transitionDelay",ke),x("animate(?:$|-)","animation",(e,{theme:t,h:r,e:n})=>{let i=ke(e),s=i.split(" "),o=t("keyframes",s[0]);return o?{["@keyframes "+(s[0]=n(r(s[0])))]:o,animation:s.join(" ")}:{animation:i}}),"(transform)-(none)",w("transform",eo),w("transform-(cpu|gpu)",({1:e})=>({"--tw-transform":Ol(e=="gpu")})),x("scale(-[xy])?-","scale",({1:e,_:t})=>({["--tw-scale"+(e||"-x")]:t,["--tw-scale"+(e||"-y")]:t,...eo()})),x("-?(rotate)-","rotate",Qs),x("-?(translate-[xy])-","translate",Qs),x("-?(skew-[xy])-","skew",Qs),w("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",ri),"(appearance)-",x("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",x("(cursor)-"),"(cursor)-",w("snap-(none)","scroll-snap-type"),w("snap-(x|y|both)",({1:e})=>({...He({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":e+" var(--tw-scroll-snap-strictness)"})),w("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),w("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),w("snap-(normal|always)","scroll-snap-stop"),w("scroll-(auto|smooth)","scroll-behavior"),x("scroll-p([xytrbl])?(?:$|-)","padding",Wt("scroll-padding")),x("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",Wt("scroll-margin")),w("touch-(auto|none|manipulation)","touch-action"),w("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:e,2:t,3:r})=>({...He({"--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-${t?"pan-x":r?"pan-y":e}`]:e,"touch-action":"var(--tw-touch-action)"})),w("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),w("outline",{outlineStyle:"solid"}),w("outline-(dashed|dotted|double)","outlineStyle"),x("-?(outline-offset)-"),Q("outline-",{opacityVariable:!1,opacitySection:"opacity"}),x("outline-","outlineWidth"),"(pointer-events)-",x("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:e})=>({x:"horizontal",y:"vertical"})[e]||e||"both"],w("select-(none|text|all|auto)","userSelect"),Q("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),Q("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),x("stroke-","strokeWidth"),w("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),w("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function ri(e){return(typeof e=="string"?e:e[1]).replace(/-/g," ").trim()}function Sl(e){return(typeof e=="string"?e:e[1]).replace("col","column")}function pt(e,t="-"){let r=[];for(let n of e)r.push({t:"top",r:"right",b:"bottom",l:"left"}[n]);return r.join(t)}function ke(e){return e&&""+(e._||e)}function El({$$:e}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[e[3]||""]||"")+e}function Wt(e,t=""){return({1:r,_:n})=>{let i={x:"lr",y:"tb"}[r]||r+r;return i?{...Ur(e+"-"+pt(i[0])+t,n),...Ur(e+"-"+pt(i[1])+t,n)}:Ur(e+t,n)}}function _l(e=""){let t=["blur","brightness","contrast","grayscale","hue-rotate","invert",e&&"opacity","saturate","sepia",!e&&"drop-shadow"].filter(Boolean),r={};for(let n of t)r[`--tw-${e}${n}`]="var(--tw-empty,/*!*/ /*!*/)";return r={...He(r),[`${e}filter`]:t.map(n=>`var(--tw-${e}${n})`).join(" ")},[`(${e}filter)-(none)`,w(`${e}filter`,r),...t.map(n=>x(`${n[0]=="h"?"-?":""}(${e}${n})(?:$|-)`,n,({1:i,_:s})=>({[`--tw-${i}`]:U(s).map(o=>`${n}(${o})`).join(" "),...r})))]}function Qs({1:e,_:t}){return{["--tw-"+e]:t,...eo()}}function eo(){return{...He({"--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":Ol()}),transform:"var(--tw-transform)"}}function Ol(e){return[e?"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 Ml({1:e,2:t}){return`${e} ${t} / ${e} ${t}`}function Al({1:e}){return`repeat(${e},minmax(0,1fr))`}function He(e){return{"@layer defaults":{"*,::before,::after":e,"::backdrop":e}}}var jl=[["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:e})=>`@media (orientation:${e})`],["contrast-(more|less)",({1:e})=>`@media (prefers-contrast:${e})`],["(first-(letter|line)|placeholder|backdrop|before|after)",({1:e})=>`&::${e}`],["(marker|selection)",({1:e})=>`& *::${e},&::${e}`],["file","&::file-selector-button"],["(first|last|only)",({1:e})=>`&:${e}-child`],["even","&:nth-child(2n)"],["odd","&:nth-child(odd)"],["open","&[open]"],["(aria|data)-",({1:e,$$:t},r)=>t&&`&[${e}-${r.theme(e,t)||Me(t,"",r)||`${t}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:e,3:t="",4:r,5:n="",6:i=t},{e:s,h:o,v:u})=>{let l=qt(n)||(r[0]=="["?r:u(r.slice(1)));return`${(l.includes("&")?l:"&"+l).replace(/&/g,`:merge(.${s(o(e+i))})`)}${e[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:e})=>`[dir="${e}"] &`],["supports-",({$$:e},t)=>{if(e&&(e=t.theme("supports",e)||Me(e,"",t)),e)return e.includes(":")||(e+=":var(--tw)"),/^\w*\s*\(/.test(e)||(e=`(${e})`),`@supports ${e.replace(/\b(and|or|not)\b/g," $1 ").trim()}`}],["max-",({$$:e},t)=>{if(e&&(e=t.theme("screens",e)||Me(e,"",t)),typeof e=="string")return`@media not all and (min-width:${e})`}],["min-",({$$:e},t)=>(e&&(e=Me(e,"",t)),e&&`@media (min-width:${e})`)],[/^\[(.+)]$/,({1:e})=>/[&@]/.test(e)&&qt(e).replace(/[}]+$/,"").split("{")]];function Tl({colors:e,disablePreflight:t}={}){return{preflight:t?void 0:$l,theme:{...Br,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...e}},variants:jl,rules:Il,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 xp={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},bp={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},kp={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},Cp={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},$p={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},Sp={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},Ep={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},_p={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},Mp={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},Ap={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},Ip={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},Op={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},jp={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},Tp={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},Lp={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},Dp={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},Pp={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},Rp={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},Up={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},Vp={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},Bp={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},Np={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},Ll={__proto__:null,slate:xp,gray:bp,zinc:kp,neutral:Cp,stone:$p,red:Sp,orange:Ep,amber:_p,yellow:Mp,lime:Ap,green:Ip,emerald:Op,teal:jp,cyan:Tp,sky:Lp,blue:Dp,indigo:Pp,violet:Rp,purple:Up,fuchsia:Vp,pink:Bp,rose:Np};function Dl({disablePreflight:e}={}){return Tl({colors:Ll,disablePreflight:e})}function Ul({className:e="prose",defaultColor:t="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])=>[`${e}-${s}`,(u,l)=>Vl(e,o[0]=="."?"."+l.e(l.h(o.slice(1))):o,l,c=>`& :is(${c.trim()})`)]),rules:[[`(lead|not-${e})`,({1:s},{h:o})=>[{c:o(s)}]],[`${e}-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)"}}],[e+"-",({$$:s},o)=>{let u=Rl(o.theme("fontSize",s));return u&&{"@layer components":u}}],[e+"-",({$$:s},o)=>i(s,o)],[e,(s,o)=>({...i(t,o),"@layer base":[Pl(e,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:S(20,16),marginBottom:S(20,16),paddingLeft:S(26,16)},li:{marginTop:S(8,16),marginBottom:S(8,16)},"ol>li,ul>li":{paddingLeft:S(6,16)},">ul>li p":{marginTop:S(12,16),marginBottom:S(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:S(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:S(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:S(12,16),marginBottom:S(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:S(48,16),marginBottom:S(48,16)},blockquote:{marginTop:S(32,20),marginBottom:S(32,20),paddingLeft:S(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:S(20,16),marginBottom:S(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:S(36,16),marginTop:"0",marginBottom:S(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900",color:"inherit"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:S(24,16),marginTop:S(48,24),marginBottom:S(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800",color:"inherit"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:S(20,16),marginTop:S(32,20),marginBottom:S(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700",color:"inherit"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:S(24,16),marginBottom:S(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700",color:"inherit"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:S(32,16),marginBottom:S(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:S(14,16),lineHeight:"1.4",marginTop:S(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:S(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:S(21,24)},"h3 code":{fontSize:S(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:S(14,16),lineHeight:"1.7",marginTop:S(24,14),marginBottom:S(24,14),borderRadius:"0.375rem",paddingTop:S(12,14),paddingRight:S(16,14),paddingBottom:S(12,14),paddingLeft:S(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:S(32,16),marginBottom:S(32,16),fontSize:S(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:S(8,14),paddingBottom:S(8,14),paddingLeft:S(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:S(8,14),paddingRight:S(8,14),paddingBottom:S(8,14),paddingLeft:S(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:S(20,16),lineHeight:"1.6",marginTop:S(24,20),marginBottom:S(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),Pl(e,o,r)],"@layer components":{...Rl(o.theme("fontSize","base")),color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"}})]]};function i(s,o){let u={},l={},c=(p,h,v)=>{let b=o.theme(`colors.${s}.${h}`,h);v["--tw-prose-"+p]=ge(b);let $=v!=l&&o.d("colors",`${s}-${h}`,b);$&&(l["--tw-prose-"+p]=ge($))};for(let p in n){let h=n[p];p!="dark"&&h&&c(p,h,u)}for(let p in n.dark||{}){let h=n.dark[p];h&&(n.dark?c("invert-"+p,h,u):c(p,h,l))}return Object.keys(u).length?{"@layer defaults":{"&":u,[o.v("dark")]:l}}:void 0}}function Pl(e,t,r){let n={};for(let i in r)n[Vl(e,i,t,s=>`.${t.e(t.h(e))}${s}`)]=r[i];return n}function Vl(e,t,{e:r,h:n},i){return t.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(s,o=" ",u=s,l="")=>i(`${o}:where(${u}):not(:where(.${r(n("not-"+e))} *))${l}`))}function Rl(e){return e?typeof e=="string"?{fontSize:e}:{fontSize:e[0],...typeof e[1]=="string"?{lineHeight:e[1]}:e[1]}:void 0}function S(e,t){return`${(e/t).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}var to=Ys({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:[Dl(),bl(),Cl(),Ul()]});function Bl(e,t=!0){let r=function(){if(Hp)try{let l=ti(new CSSStyleSheet);return l.connect=c=>{let p=ro(c);p.adoptedStyleSheets=[...p.adoptedStyleSheets,l.target]},l.disconnect=ei,l}catch{}let s=document.createElement("style");s.media="not all",document.head.prepend(s);let o=[ti(s)],u=new WeakMap;return{get target(){return o[0].target},snapshot(){let l=o.map(c=>c.snapshot());return()=>l.forEach(c=>c())},clear(){o.forEach(l=>l.clear())},destroy(){o.forEach(l=>l.destroy())},insert(l,c,p){o[0].insert(l,c,p);let h=this.target.cssRules[c];o.forEach((v,b)=>b&&v.target.insertRule(h.cssText,c))},resume(l,c){return o[0].resume(l,c)},connect(l){let c=document.createElement("style");ro(l).appendChild(c);let p=ti(c),{cssRules:h}=this.target;for(let v=0;v<h.length;v++)p.target.insertRule(h[v].cssText,v);o.push(p),u.set(l,p)},disconnect(l){let c=o.indexOf(u.get(l));c>=0&&o.splice(c,1)}}}(),n=gl({...e,hash:e.hash??t},r),i=yl(n);return function(o){return class extends o{connectedCallback(){super.connectedCallback?.(),r.connect(this),i.observe(ro(this))}disconnectedCallback(){r.disconnect(this),super.disconnectedCallback?.()}constructor(...l){super(...l),this.tw=n}}}}var Hp=typeof ShadowRoot<"u"&&(typeof ShadyCSS>"u"||ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;function ro(e){return e.shadowRoot||e.attachShadow({mode:"open"})}var I=e=>Bl(to)(e);var Nr=class extends I(_){constructor(){super(),this.color="#601feb",this.radius="16.8576px",this.size="320px",this.border="#d1d5db"}render(){return d`
|
|
123
125
|
<div class="flex flex-row flex-wrap gap-0">
|
|
124
126
|
<div class="relative z-0 flex min-h-9 items-center justify-center overflow-hidden" style="border-radius: ${this.radius};">
|
|
125
127
|
<!-- Spinning gradient background -->
|
|
@@ -1081,6 +1083,34 @@ var $c=Object.defineProperty;var ea=e=>{throw TypeError(e)};var Sc=(e,t,r)=>t in
|
|
|
1081
1083
|
<path d="M2 8h20" />
|
|
1082
1084
|
<rect width="20" height="16" x="2" y="4" rx="2" />
|
|
1083
1085
|
<path d="M6 16h12" />
|
|
1086
|
+
</svg>`,"refresh-cw":`<svg
|
|
1087
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1088
|
+
width="24"
|
|
1089
|
+
height="24"
|
|
1090
|
+
viewBox="0 0 24 24"
|
|
1091
|
+
fill="none"
|
|
1092
|
+
stroke="currentColor"
|
|
1093
|
+
stroke-width="2"
|
|
1094
|
+
stroke-linecap="round"
|
|
1095
|
+
stroke-linejoin="round"
|
|
1096
|
+
>
|
|
1097
|
+
<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" />
|
|
1098
|
+
<path d="M21 3v5h-5" />
|
|
1099
|
+
<path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" />
|
|
1100
|
+
<path d="M8 16H3v5" />
|
|
1101
|
+
</svg>`,copy:`<svg
|
|
1102
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1103
|
+
width="24"
|
|
1104
|
+
height="24"
|
|
1105
|
+
viewBox="0 0 24 24"
|
|
1106
|
+
fill="none"
|
|
1107
|
+
stroke="currentColor"
|
|
1108
|
+
stroke-width="2"
|
|
1109
|
+
stroke-linecap="round"
|
|
1110
|
+
stroke-linejoin="round"
|
|
1111
|
+
>
|
|
1112
|
+
<rect width="14" height="14" x="8" y="8" rx="2" ry="2" />
|
|
1113
|
+
<path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />
|
|
1084
1114
|
</svg>`};var Fr=class Fr extends HTMLElement{constructor(){super();g(this,"name","");g(this,"fill","none");g(this,"stroke","currentColor");this.attachShadow({mode:"open"})}attributeChangedCallback(r,n,i){if(n!==i&&Fr.observedAttributes.includes(r)){switch(r){case"name":this.name=i||"";break;case"fill":this.fill=i||"none";break;case"stroke":this.stroke=i||"currentColor";break}this.render()}}resolveIcon(r){throw new Error("Not implemented")}render(){let r=document.createElement("style");if(r.textContent=`
|
|
1085
1115
|
:host {
|
|
1086
1116
|
display: inline-block;
|
|
@@ -1118,7 +1148,7 @@ var $c=Object.defineProperty;var ea=e=>{throw TypeError(e)};var Sc=(e,t,r)=>t in
|
|
|
1118
1148
|
</button>
|
|
1119
1149
|
</form>
|
|
1120
1150
|
</mw-spinning-border>
|
|
1121
|
-
`}};qr=new WeakMap,Ce=new WeakSet,Hl=function(r){let n=r.target;this._inputValue=n.value,this.dispatchEvent(new zr.ChangeEvent({value:this._inputValue}))},Fl=function(r){r.preventDefault();let n=new Date;if(n.getTime()-a(this,qr).getTime()<500)return;m(this,qr,n);let s=this._inputValue.trim();s&&this.dispatchEvent(new zr.SubmitInputEvent({text:s}))&&(this._inputValue="")},zp=function(){return this.renderRoot.querySelector('input[name="input"]')??null},zl=function(){return this.renderRoot.querySelector('button[type="submit"]')??null},ql=function(r){qp(r)&&(r.preventDefault(),this.disabled||a(this,Ce,zl)?.click())},g(zr,"properties",{color:{type:String},disabled:{type:Boolean},placeholder:{type:String},dark:{type:Boolean},_inputValue:{type:String,state:!0}});var ht=zr,io;ht.SubmitInputEvent=(io=class extends CustomEvent{constructor(t,r={}){super(ht.SubmitInputEvent.type,{detail:t,bubbles:!0,composed:!0,...r})}},g(io,"type","mw-floating-ask-ai:submit"),io);var so;ht.ChangeEvent=(so=class extends CustomEvent{constructor(t,r={}){super(ht.ChangeEvent.type,{detail:t,bubbles:!0,composed:!0,...r})}},g(so,"type","mw-floating-ask-ai:change"),so);function qp(e){return(e.code==="Enter"||e.code==="NumpadEnter")&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey}customElements.get("mw-floating-ask-ai")||customElements.define("mw-floating-ask-ai",ht);var ii={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},si=e=>(...t)=>({_$litDirective$:e,values:t}),Zt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,r,n){this._$Ct=t,this._$AM=r,this._$Ci=n}_$AS(t,r){return this.update(t,r)}update(t,r){return this.render(...r)}};var{I:Wp}=wa;var Wl=()=>document.createComment(""),Gt=(e,t,r)=>{let n=e._$AA.parentNode,i=t===void 0?e._$AB:t._$AA;if(r===void 0){let s=n.insertBefore(Wl(),i),o=n.insertBefore(Wl(),i);r=new Wp(s,o,e,e.options)}else{let s=r._$AB.nextSibling,o=r._$AM,u=o!==e;if(u){let l;r._$AQ?.(e),r._$AM=e,r._$AP!==void 0&&(l=e._$AU)!==o._$AU&&r._$AP(l)}if(s!==i||u){let l=r._$AA;for(;l!==s;){let c=l.nextSibling;n.insertBefore(l,i),l=c}}}return r},Fe=(e,t,r=e)=>(e._$AI(t,r),e),Zp={},Zl=(e,t=Zp)=>e._$AH=t,Gl=e=>e._$AH,oi=e=>{e._$AR(),e._$AA.remove()};var Jl=(e,t,r)=>{let n=new Map;for(let i=t;i<=r;i++)n.set(e[i],i);return n},$e=si(class extends Zt{constructor(e){if(super(e),e.type!==ii.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,t,r){let n;r===void 0?r=t:t!==void 0&&(n=t);let i=[],s=[],o=0;for(let u of e)i[o]=n?n(u,o):o,s[o]=r(u,o),o++;return{values:s,keys:i}}render(e,t,r){return this.dt(e,t,r).values}update(e,[t,r,n]){let i=Gl(e),{values:s,keys:o}=this.dt(t,r,n);if(!Array.isArray(i))return this.ut=o,s;let u=this.ut??=[],l=[],c,p,h=0,v=i.length-1,b=0,$=s.length-1;for(;h<=v&&b<=$;)if(i[h]===null)h++;else if(i[v]===null)v--;else if(u[h]===o[b])l[b]=Fe(i[h],s[b]),h++,b++;else if(u[v]===o[$])l[$]=Fe(i[v],s[$]),v--,$--;else if(u[h]===o[$])l[$]=Fe(i[h],s[$]),Gt(e,l[$+1],i[h]),h++,$--;else if(u[v]===o[b])l[b]=Fe(i[v],s[b]),Gt(e,i[h],i[v]),v--,b++;else if(c===void 0&&(c=Jl(o,b,$),p=Jl(u,h,v)),c.has(u[h]))if(c.has(u[v])){let j=p.get(o[b]),C=j!==void 0?i[j]:null;if(C===null){let
|
|
1151
|
+
`}};qr=new WeakMap,Ce=new WeakSet,Hl=function(r){let n=r.target;this._inputValue=n.value,this.dispatchEvent(new zr.ChangeEvent({value:this._inputValue}))},Fl=function(r){r.preventDefault();let n=new Date;if(n.getTime()-a(this,qr).getTime()<500)return;m(this,qr,n);let s=this._inputValue.trim();s&&this.dispatchEvent(new zr.SubmitInputEvent({text:s}))&&(this._inputValue="")},zp=function(){return this.renderRoot.querySelector('input[name="input"]')??null},zl=function(){return this.renderRoot.querySelector('button[type="submit"]')??null},ql=function(r){qp(r)&&(r.preventDefault(),this.disabled||a(this,Ce,zl)?.click())},g(zr,"properties",{color:{type:String},disabled:{type:Boolean},placeholder:{type:String},dark:{type:Boolean},_inputValue:{type:String,state:!0}});var ht=zr,io;ht.SubmitInputEvent=(io=class extends CustomEvent{constructor(t,r={}){super(ht.SubmitInputEvent.type,{detail:t,bubbles:!0,composed:!0,...r})}},g(io,"type","mw-floating-ask-ai:submit"),io);var so;ht.ChangeEvent=(so=class extends CustomEvent{constructor(t,r={}){super(ht.ChangeEvent.type,{detail:t,bubbles:!0,composed:!0,...r})}},g(so,"type","mw-floating-ask-ai:change"),so);function qp(e){return(e.code==="Enter"||e.code==="NumpadEnter")&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey}customElements.get("mw-floating-ask-ai")||customElements.define("mw-floating-ask-ai",ht);var ii={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},si=e=>(...t)=>({_$litDirective$:e,values:t}),Zt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,r,n){this._$Ct=t,this._$AM=r,this._$Ci=n}_$AS(t,r){return this.update(t,r)}update(t,r){return this.render(...r)}};var{I:Wp}=wa;var Wl=()=>document.createComment(""),Gt=(e,t,r)=>{let n=e._$AA.parentNode,i=t===void 0?e._$AB:t._$AA;if(r===void 0){let s=n.insertBefore(Wl(),i),o=n.insertBefore(Wl(),i);r=new Wp(s,o,e,e.options)}else{let s=r._$AB.nextSibling,o=r._$AM,u=o!==e;if(u){let l;r._$AQ?.(e),r._$AM=e,r._$AP!==void 0&&(l=e._$AU)!==o._$AU&&r._$AP(l)}if(s!==i||u){let l=r._$AA;for(;l!==s;){let c=l.nextSibling;n.insertBefore(l,i),l=c}}}return r},Fe=(e,t,r=e)=>(e._$AI(t,r),e),Zp={},Zl=(e,t=Zp)=>e._$AH=t,Gl=e=>e._$AH,oi=e=>{e._$AR(),e._$AA.remove()};var Jl=(e,t,r)=>{let n=new Map;for(let i=t;i<=r;i++)n.set(e[i],i);return n},$e=si(class extends Zt{constructor(e){if(super(e),e.type!==ii.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,t,r){let n;r===void 0?r=t:t!==void 0&&(n=t);let i=[],s=[],o=0;for(let u of e)i[o]=n?n(u,o):o,s[o]=r(u,o),o++;return{values:s,keys:i}}render(e,t,r){return this.dt(e,t,r).values}update(e,[t,r,n]){let i=Gl(e),{values:s,keys:o}=this.dt(t,r,n);if(!Array.isArray(i))return this.ut=o,s;let u=this.ut??=[],l=[],c,p,h=0,v=i.length-1,b=0,$=s.length-1;for(;h<=v&&b<=$;)if(i[h]===null)h++;else if(i[v]===null)v--;else if(u[h]===o[b])l[b]=Fe(i[h],s[b]),h++,b++;else if(u[v]===o[$])l[$]=Fe(i[v],s[$]),v--,$--;else if(u[h]===o[$])l[$]=Fe(i[h],s[$]),Gt(e,l[$+1],i[h]),h++,$--;else if(u[v]===o[b])l[b]=Fe(i[v],s[b]),Gt(e,i[h],i[v]),v--,b++;else if(c===void 0&&(c=Jl(o,b,$),p=Jl(u,h,v)),c.has(u[h]))if(c.has(u[v])){let j=p.get(o[b]),C=j!==void 0?i[j]:null;if(C===null){let M=Gt(e,i[h]);Fe(M,s[b]),l[b]=M}else l[b]=Fe(C,s[b]),Gt(e,i[h],C),i[j]=null;b++}else oi(i[v]),v--;else oi(i[h]),h++;for(;b<=$;){let j=Gt(e,l[$+1]);Fe(j,s[b]),l[b++]=j}for(;h<=v;){let j=i[h++];j!==null&&oi(j)}return this.ut=o,Zl(e,l),xe}});function Wr(e,t,r){return e?t(e):r?.(e)}var ai,Kl,li=class li extends I(_){constructor(){super();f(this,ai);this.examples={title:"",items:[]},this.color=""}render(){return!this.examples?.title&&!this.examples?.items?.length?A:d`
|
|
1122
1152
|
<div class="flex h-full w-full flex-1 flex-col overflow-y-auto px-4 pb-2 pt-6">
|
|
1123
1153
|
${Wr(this.examples.title,()=>d`
|
|
1124
1154
|
<h2 class="mt-14 px-2 pb-2 pt-9 text-left text-3xl font-bold leading-tight tracking-tight">
|
|
@@ -1140,7 +1170,7 @@ var $c=Object.defineProperty;var ea=e=>{throw TypeError(e)};var Sc=(e,t,r)=>t in
|
|
|
1140
1170
|
</li>
|
|
1141
1171
|
`)}
|
|
1142
1172
|
</ul>
|
|
1143
|
-
`:
|
|
1173
|
+
`:A}
|
|
1144
1174
|
</div>
|
|
1145
1175
|
`}};ai=new WeakSet,Kl=function(r){this.dispatchEvent(new li.ExampleClickEvent({example:r}))},g(li,"properties",{examples:{type:Object},color:{type:String}});var Zr=li,oo;Zr.ExampleClickEvent=(oo=class extends CustomEvent{constructor(t,r={}){super(Zr.ExampleClickEvent.type,{detail:t,...r})}},g(oo,"type","mw:example-click"),oo);customElements.get("mw-chat-background")||customElements.define("mw-chat-background",Zr);var Kt,Xl,Yl,Jt=class Jt extends I(_){constructor(){super();f(this,Kt);this.content={logoUrl:"",title:"",color:""},this.showNewChat=!1,this.showClose=!1}render(){return d`
|
|
1146
1176
|
<div class="relative z-10 h-12">
|
|
@@ -1257,7 +1287,7 @@ var $c=Object.defineProperty;var ea=e=>{throw TypeError(e)};var Sc=(e,t,r)=>t in
|
|
|
1257
1287
|
<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">
|
|
1258
1288
|
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 12.75 6 6 9-13.5" />
|
|
1259
1289
|
</svg>
|
|
1260
|
-
`:
|
|
1290
|
+
`:A}
|
|
1261
1291
|
</div>
|
|
1262
1292
|
</div>
|
|
1263
1293
|
`;case"assistant":case"support":return d`
|
|
@@ -1314,7 +1344,7 @@ var $c=Object.defineProperty;var ea=e=>{throw TypeError(e)};var Sc=(e,t,r)=>t in
|
|
|
1314
1344
|
<span>Molin AI</span>
|
|
1315
1345
|
</a>
|
|
1316
1346
|
</p>
|
|
1317
|
-
`)}};customElements.get("mw-powered-by")||customElements.define("mw-powered-by",mo);var he=e=>e??
|
|
1347
|
+
`)}};customElements.get("mw-powered-by")||customElements.define("mw-powered-by",mo);var he=e=>e??A;var mt,Jr,gt,hi=class extends I(_){constructor(){super();f(this,mt,!1);f(this,Jr,!1);f(this,gt,!1);this.src=""}render(){return(this.src?.startsWith("https://cdn.shopify.com")||!1)&&m(this,mt,!0),this.src?d`
|
|
1318
1348
|
<div class="relative h-full w-full overflow-hidden rounded-lg">
|
|
1319
1349
|
<!-- use the same icon as for missing image url as the background behind the image so there is no flicker while it's loading -->
|
|
1320
1350
|
<div class="absolute inset-0 flex items-center justify-center bg-gray-100">
|
|
@@ -1403,7 +1433,7 @@ var $c=Object.defineProperty;var ea=e=>{throw TypeError(e)};var Sc=(e,t,r)=>t in
|
|
|
1403
1433
|
${n||!this.streaming?d`<span class="text-xs text-gray-900">${n}</span>`:d`<div class="h-4 w-14 animate-pulse rounded bg-gray-200"></div>`}
|
|
1404
1434
|
</div>
|
|
1405
1435
|
</a>
|
|
1406
|
-
`}};g(di,"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",di);function fi(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}var mi=function(){},Xt=function(){};var Kr=(e,t,r)=>Math.min(Math.max(r,e),t);var go=.001,Kp=.01,nu=10,Xp=.05,Yp=1;function iu({duration:e=800,bounce:t=.25,velocity:r=0,mass:n=1}){let i,s;mi(e<=nu*1e3,"Spring duration must be 10 seconds or less");let o=1-t;o=Kr(Xp,Yp,o),e=Kr(Kp,nu,e/1e3),o<1?(i=c=>{let p=c*o,h=p*e,v=p-r,b=gi(c,o),$=Math.exp(-h);return go-v/b*$},s=c=>{let h=c*o*e,v=h*r+r,b=Math.pow(o,2)*Math.pow(c,2)*e,$=Math.exp(-h),j=gi(Math.pow(c,2),o);return(-i(c)+go>0?-1:1)*((v-b)*$)/j}):(i=c=>{let p=Math.exp(-c*e),h=(c-r)*e+1;return-go+p*h},s=c=>{let p=Math.exp(-c*e),h=(r-c)*(e*e);return p*h});let u=5/e,l=e1(i,s,u);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{let c=Math.pow(l,2)*n;return{stiffness:c,damping:o*2*Math.sqrt(n*c),duration:e}}}var Qp=12;function e1(e,t,r){let n=r;for(let i=1;i<Qp;i++)n=n-e(n)/t(n);return n}function gi(e,t){return e*Math.sqrt(1-t*t)}var t1=["duration","bounce"],r1=["stiffness","damping","mass"];function su(e,t){return t.some(r=>e[r]!==void 0)}function n1(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!su(e,r1)&&su(e,t1)){let r=iu(e);t=Object.assign(Object.assign(Object.assign({},t),r),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function yi(e){var{from:t=0,to:r=1,restSpeed:n=2,restDelta:i}=e,s=fi(e,["from","to","restSpeed","restDelta"]);let o={done:!1,value:t},{stiffness:u,damping:l,mass:c,velocity:p,duration:h,isResolvedFromDuration:v}=n1(s),b=ou,$=ou;function j(){let C=p?-(p/1e3):0,A=r-t,k=l/(2*Math.sqrt(u*c)),E=Math.sqrt(u/c)/1e3;if(i===void 0&&(i=Math.min(Math.abs(r-t)/100,.4)),k<1){let T=gi(E,k);b=N=>{let K=Math.exp(-k*E*N);return r-K*((C+k*E*A)/T*Math.sin(T*N)+A*Math.cos(T*N))},$=N=>{let K=Math.exp(-k*E*N);return k*E*K*(Math.sin(T*N)*(C+k*E*A)/T+A*Math.cos(T*N))-K*(Math.cos(T*N)*(C+k*E*A)-T*A*Math.sin(T*N))}}else if(k===1)b=T=>r-Math.exp(-E*T)*(A+(C+E*A)*T);else{let T=E*Math.sqrt(k*k-1);b=N=>{let K=Math.exp(-k*E*N),te=Math.min(T*N,300);return r-K*((C+k*E*A)*Math.sinh(te)+T*A*Math.cosh(te))/T}}}return j(),{next:C=>{let A=b(C);if(v)o.done=C>=h;else{let k=$(C)*1e3,E=Math.abs(k)<=n,T=Math.abs(r-A)<=i;o.done=E&&T}return o.value=o.done?r:A,o},flipTarget:()=>{p=-p,[t,r]=[r,t],j()}}}yi.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";var ou=e=>0;var yo=(e,t,r)=>{let n=t-e;return n===0?1:(r-e)/n};var Yt=(e,t,r)=>-r*e+r*t+e;var wi=(e,t)=>r=>Math.max(Math.min(r,t),e),ze=e=>e%1?Number(e.toFixed(5)):e,Qt=/(-)?([\d]*\.?[\d])+/g,vi=/(#[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,au=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Pe(e){return typeof e=="string"}var er={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},xi=Object.assign(Object.assign({},er),{transform:wi(0,1)}),n2=Object.assign(Object.assign({},er),{default:1});var Xr=e=>({test:t=>Pe(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),o2=Xr("deg"),tr=Xr("%"),a2=Xr("px"),l2=Xr("vh"),u2=Xr("vw"),c2=Object.assign(Object.assign({},tr),{parse:e=>tr.parse(e)/100,transform:e=>tr.transform(e*100)});var rr=(e,t)=>r=>!!(Pe(r)&&au.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t)),bi=(e,t,r)=>n=>{if(!Pe(n))return n;let[i,s,o,u]=n.match(Qt);return{[e]:parseFloat(i),[t]:parseFloat(s),[r]:parseFloat(o),alpha:u!==void 0?parseFloat(u):1}};var Me={test:rr("hsl","hue"),parse:bi("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+tr.transform(ze(t))+", "+tr.transform(ze(r))+", "+ze(xi.transform(n))+")"};var i1=wi(0,255),ki=Object.assign(Object.assign({},er),{transform:e=>Math.round(i1(e))}),we={test:rr("rgb","red"),parse:bi("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+ki.transform(e)+", "+ki.transform(t)+", "+ki.transform(r)+", "+ze(xi.transform(n))+")"};function s1(e){let t="",r="",n="",i="";return e.length>5?(t=e.substr(1,2),r=e.substr(3,2),n=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),r=e.substr(2,1),n=e.substr(3,1),i=e.substr(4,1),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}var nr={test:rr("#"),parse:s1,transform:we.transform};var qe={test:e=>we.test(e)||nr.test(e)||Me.test(e),parse:e=>we.test(e)?we.parse(e):Me.test(e)?Me.parse(e):nr.parse(e),transform:e=>Pe(e)?e:e.hasOwnProperty("red")?we.transform(e):Me.transform(e)};var lu="${c}",uu="${n}";function o1(e){var t,r,n,i;return isNaN(e)&&Pe(e)&&((r=(t=e.match(Qt))===null||t===void 0?void 0:t.length)!==null&&r!==void 0?r:0)+((i=(n=e.match(vi))===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0)>0}function cu(e){typeof e=="number"&&(e=`${e}`);let t=[],r=0,n=e.match(vi);n&&(r=n.length,e=e.replace(vi,lu),t.push(...n.map(qe.parse)));let i=e.match(Qt);return i&&(e=e.replace(Qt,uu),t.push(...i.map(er.parse))),{values:t,numColors:r,tokenised:e}}function pu(e){return cu(e).values}function hu(e){let{values:t,numColors:r,tokenised:n}=cu(e),i=t.length;return s=>{let o=n;for(let u=0;u<i;u++)o=o.replace(u<r?lu:uu,u<r?qe.transform(s[u]):ze(s[u]));return o}}var a1=e=>typeof e=="number"?0:e;function l1(e){let t=pu(e);return hu(e)(t.map(a1))}var Ci={test:o1,parse:pu,createTransformer:hu,getAnimatableNone:l1};function wo(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function vo({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let i=0,s=0,o=0;if(!t)i=s=o=r;else{let u=r<.5?r*(1+t):r+t-r*t,l=2*r-u;i=wo(l,u,e+1/3),s=wo(l,u,e),o=wo(l,u,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}var u1=(e,t,r)=>{let n=e*e,i=t*t;return Math.sqrt(Math.max(0,r*(i-n)+n))},c1=[nr,we,Me],du=e=>c1.find(t=>t.test(e)),fu=e=>`'${e}' is not an animatable color. Use the equivalent color code instead.`,$i=(e,t)=>{let r=du(e),n=du(t);Xt(!!r,fu(e)),Xt(!!n,fu(t));let i=r.parse(e),s=n.parse(t);r===Me&&(i=vo(i),r=we),n===Me&&(s=vo(s),n=we);let o=Object.assign({},i);return u=>{for(let l in o)l!=="alpha"&&(o[l]=u1(i[l],s[l],u));return o.alpha=Yt(i.alpha,s.alpha,u),r.transform(o)}};var mu=e=>typeof e=="number";var p1=(e,t)=>r=>t(e(r)),Si=(...e)=>e.reduce(p1);function yu(e,t){return mu(e)?r=>Yt(e,t,r):qe.test(e)?$i(e,t):bo(e,t)}var xo=(e,t)=>{let r=[...e],n=r.length,i=e.map((s,o)=>yu(s,t[o]));return s=>{for(let o=0;o<n;o++)r[o]=i[o](s);return r}},wu=(e,t)=>{let r=Object.assign(Object.assign({},e),t),n={};for(let i in r)e[i]!==void 0&&t[i]!==void 0&&(n[i]=yu(e[i],t[i]));return i=>{for(let s in n)r[s]=n[s](i);return r}};function gu(e){let t=Ci.parse(e),r=t.length,n=0,i=0,s=0;for(let o=0;o<r;o++)n||typeof t[o]=="number"?n++:t[o].hue!==void 0?s++:i++;return{parsed:t,numNumbers:n,numRGB:i,numHSL:s}}var bo=(e,t)=>{let r=Ci.createTransformer(t),n=gu(e),i=gu(t);return n.numHSL===i.numHSL&&n.numRGB===i.numRGB&&n.numNumbers>=i.numNumbers?Si(xo(n.parsed,i.parsed),r):(mi(!0,`Complex values '${e}' and '${t}' 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?t:e}`)};var h1=(e,t)=>r=>Yt(e,t,r);function d1(e){if(typeof e=="number")return h1;if(typeof e=="string")return qe.test(e)?$i:bo;if(Array.isArray(e))return xo;if(typeof e=="object")return wu}function f1(e,t,r){let n=[],i=r||d1(e[0]),s=e.length-1;for(let o=0;o<s;o++){let u=i(e[o],e[o+1]);if(t){let l=Array.isArray(t)?t[o]:t;u=Si(l,u)}n.push(u)}return n}function m1([e,t],[r]){return n=>r(yo(e,t,n))}function g1(e,t){let r=e.length,n=r-1;return i=>{let s=0,o=!1;if(i<=e[0]?o=!0:i>=e[n]&&(s=n-1,o=!0),!o){let l=1;for(;l<r&&!(e[l]>i||l===n);l++);s=l-1}let u=yo(e[s],e[s+1],i);return t[s](u)}}function Ei(e,t,{clamp:r=!0,ease:n,mixer:i}={}){let s=e.length;Xt(s===t.length,"Both input and output ranges must be the same length"),Xt(!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."),e[0]>e[s-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());let o=f1(t,n,i),u=s===2?m1(e,o):g1(e,o);return r?l=>u(Kr(e[0],e[s-1],l)):u}var Yr=e=>t=>1-e(1-t),_i=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,vu=e=>t=>Math.pow(t,e),ko=e=>t=>t*t*((e+1)*t-e),xu=e=>{let t=ko(e);return r=>(r*=2)<1?.5*t(r):.5*(2-Math.pow(2,-10*(r-1)))};var bu=1.525,y1=4/11,w1=8/11,v1=9/10;var ku=vu(2),dm=Yr(ku),Cu=_i(ku),x1=e=>1-Math.sin(Math.acos(e)),b1=Yr(x1),fm=_i(b1),$u=ko(bu),mm=Yr($u),gm=_i($u),ym=xu(bu),k1=4356/361,C1=35442/1805,$1=16061/1805,S1=e=>{if(e===1||e===0)return e;let t=e*e;return e<y1?7.5625*t:e<w1?9.075*t-9.9*e+3.4:e<v1?k1*t-C1*e+$1:10.8*e*e-20.52*e+10.72},wm=Yr(S1);function E1(e,t){return e.map(()=>t||Cu).splice(0,e.length-1)}function _1(e){let t=e.length;return e.map((r,n)=>n!==0?n/(t-1):0)}function A1(e,t){return e.map(r=>r*t)}function Qr({from:e=0,to:t=1,ease:r,offset:n,duration:i=300}){let s={done:!1,value:e},o=Array.isArray(t)?t:[e,t],u=A1(n&&n.length===o.length?n:_1(o),i);function l(){return Ei(u,o,{ease:Array.isArray(r)?r:E1(o,r)})}let c=l();return{next:p=>(s.value=c(p),s.done=p>=i,s),flipTarget:()=>{o.reverse(),c=l()}}}function Su({velocity:e=0,from:t=0,power:r=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:s}){let o={done:!1,value:t},u=r*e,l=t+u,c=s===void 0?l:s(l);return c!==l&&(u=c-t),{next:p=>{let h=-u*Math.exp(-p/n);return o.done=!(h>i||h<-i),o.value=o.done?c:c+h,o},flipTarget:()=>{}}}var Eu={keyframes:Qr,spring:yi,decay:Su};function _u(e){if(Array.isArray(e.to))return Qr;if(Eu[e.type])return Eu[e.type];let t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?Qr:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?yi:Qr}var Co=16.666666666666668,M1=typeof performance<"u"?()=>performance.now():()=>Date.now(),$o=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(M1()),Co);function Au(e){let t=[],r=[],n=0,i=!1,s=!1,o=new WeakSet,u={schedule:(l,c=!1,p=!1)=>{let h=p&&i,v=h?t:r;return c&&o.add(l),v.indexOf(l)===-1&&(v.push(l),h&&i&&(n=t.length)),l},cancel:l=>{let c=r.indexOf(l);c!==-1&&r.splice(c,1),o.delete(l)},process:l=>{if(i){s=!0;return}if(i=!0,[t,r]=[r,t],r.length=0,n=t.length,n)for(let c=0;c<n;c++){let p=t[c];p(l),o.has(p)&&(u.schedule(p),e())}i=!1,s&&(s=!1,u.process(l))}};return u}var I1=40,So=!0,tn=!1,Eo=!1,en={delta:0,timestamp:0},rn=["read","update","preRender","render","postRender"],Ai=rn.reduce((e,t)=>(e[t]=Au(()=>tn=!0),e),{}),O1=rn.reduce((e,t)=>{let r=Ai[t];return e[t]=(n,i=!1,s=!1)=>(tn||T1(),r.schedule(n,i,s)),e},{}),Mu=rn.reduce((e,t)=>(e[t]=Ai[t].cancel,e),{}),jm=rn.reduce((e,t)=>(e[t]=()=>Ai[t].process(en),e),{}),j1=e=>Ai[e].process(en),Iu=e=>{tn=!1,en.delta=So?Co:Math.max(Math.min(e-en.timestamp,I1),1),en.timestamp=e,Eo=!0,rn.forEach(j1),Eo=!1,tn&&(So=!1,$o(Iu))},T1=()=>{tn=!0,So=!0,Eo||$o(Iu)};var Ou=O1;function _o(e,t,r=0){return e-t-r}function ju(e,t,r=0,n=!0){return n?_o(t+-e,t,r):t-(e-t)+r}function Tu(e,t,r,n){return n?e>=t+r:e<=-r}var L1=e=>{let t=({delta:r})=>e(r);return{start:()=>Ou.update(t,!0),stop:()=>Mu.update(t)}};function Ao(e){var t,r,{from:n,autoplay:i=!0,driver:s=L1,elapsed:o=0,repeat:u=0,repeatType:l="loop",repeatDelay:c=0,onPlay:p,onStop:h,onComplete:v,onRepeat:b,onUpdate:$}=e,j=fi(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:C}=j,A,k=0,E=j.duration,T,N=!1,K=!0,te,P=_u(j);!((r=(t=P).needsInterpolation)===null||r===void 0)&&r.call(t,n,C)&&(te=Ei([0,100],[n,C],{clamp:!1}),n=0,C=100);let re=P(Object.assign(Object.assign({},j),{from:n,to:C}));function oe(){k++,l==="reverse"?(K=k%2===0,o=ju(o,E,c,K)):(o=_o(o,E,c),l==="mirror"&&re.flipTarget()),N=!1,b&&b()}function os(){A.stop(),v&&v()}function Ye(W){if(K||(W=-W),o+=W,!N){let ne=re.next(Math.max(0,o));T=ne.value,te&&(T=te(T)),N=K?ne.done:o<=0}$?.(T),N&&(k===0&&(E??(E=o)),k<u?Tu(o,E,c,K)&&oe():os())}function In(){p?.(),A=s(Ye),A.start()}return i&&In(),{stop:()=>{h?.(),A.stop()}}}var B,Lu,Mi,Du,Ii,Pu,Ru,Uu,Oi,ji=class ji extends I(_){constructor(){super();f(this,B);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")&&y(this,B,Lu).call(this)}get images(){return this.product?.images||[]}render(){if(!this.product)return d`
|
|
1436
|
+
`}};g(di,"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",di);function fi(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}var mi=function(){},Xt=function(){};var Kr=(e,t,r)=>Math.min(Math.max(r,e),t);var go=.001,Kp=.01,nu=10,Xp=.05,Yp=1;function iu({duration:e=800,bounce:t=.25,velocity:r=0,mass:n=1}){let i,s;mi(e<=nu*1e3,"Spring duration must be 10 seconds or less");let o=1-t;o=Kr(Xp,Yp,o),e=Kr(Kp,nu,e/1e3),o<1?(i=c=>{let p=c*o,h=p*e,v=p-r,b=gi(c,o),$=Math.exp(-h);return go-v/b*$},s=c=>{let h=c*o*e,v=h*r+r,b=Math.pow(o,2)*Math.pow(c,2)*e,$=Math.exp(-h),j=gi(Math.pow(c,2),o);return(-i(c)+go>0?-1:1)*((v-b)*$)/j}):(i=c=>{let p=Math.exp(-c*e),h=(c-r)*e+1;return-go+p*h},s=c=>{let p=Math.exp(-c*e),h=(r-c)*(e*e);return p*h});let u=5/e,l=e1(i,s,u);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{let c=Math.pow(l,2)*n;return{stiffness:c,damping:o*2*Math.sqrt(n*c),duration:e}}}var Qp=12;function e1(e,t,r){let n=r;for(let i=1;i<Qp;i++)n=n-e(n)/t(n);return n}function gi(e,t){return e*Math.sqrt(1-t*t)}var t1=["duration","bounce"],r1=["stiffness","damping","mass"];function su(e,t){return t.some(r=>e[r]!==void 0)}function n1(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!su(e,r1)&&su(e,t1)){let r=iu(e);t=Object.assign(Object.assign(Object.assign({},t),r),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function yi(e){var{from:t=0,to:r=1,restSpeed:n=2,restDelta:i}=e,s=fi(e,["from","to","restSpeed","restDelta"]);let o={done:!1,value:t},{stiffness:u,damping:l,mass:c,velocity:p,duration:h,isResolvedFromDuration:v}=n1(s),b=ou,$=ou;function j(){let C=p?-(p/1e3):0,M=r-t,k=l/(2*Math.sqrt(u*c)),E=Math.sqrt(u/c)/1e3;if(i===void 0&&(i=Math.min(Math.abs(r-t)/100,.4)),k<1){let T=gi(E,k);b=N=>{let K=Math.exp(-k*E*N);return r-K*((C+k*E*M)/T*Math.sin(T*N)+M*Math.cos(T*N))},$=N=>{let K=Math.exp(-k*E*N);return k*E*K*(Math.sin(T*N)*(C+k*E*M)/T+M*Math.cos(T*N))-K*(Math.cos(T*N)*(C+k*E*M)-T*M*Math.sin(T*N))}}else if(k===1)b=T=>r-Math.exp(-E*T)*(M+(C+E*M)*T);else{let T=E*Math.sqrt(k*k-1);b=N=>{let K=Math.exp(-k*E*N),te=Math.min(T*N,300);return r-K*((C+k*E*M)*Math.sinh(te)+T*M*Math.cosh(te))/T}}}return j(),{next:C=>{let M=b(C);if(v)o.done=C>=h;else{let k=$(C)*1e3,E=Math.abs(k)<=n,T=Math.abs(r-M)<=i;o.done=E&&T}return o.value=o.done?r:M,o},flipTarget:()=>{p=-p,[t,r]=[r,t],j()}}}yi.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";var ou=e=>0;var yo=(e,t,r)=>{let n=t-e;return n===0?1:(r-e)/n};var Yt=(e,t,r)=>-r*e+r*t+e;var wi=(e,t)=>r=>Math.max(Math.min(r,t),e),ze=e=>e%1?Number(e.toFixed(5)):e,Qt=/(-)?([\d]*\.?[\d])+/g,vi=/(#[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,au=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Pe(e){return typeof e=="string"}var er={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},xi=Object.assign(Object.assign({},er),{transform:wi(0,1)}),l2=Object.assign(Object.assign({},er),{default:1});var Xr=e=>({test:t=>Pe(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),p2=Xr("deg"),tr=Xr("%"),h2=Xr("px"),d2=Xr("vh"),f2=Xr("vw"),m2=Object.assign(Object.assign({},tr),{parse:e=>tr.parse(e)/100,transform:e=>tr.transform(e*100)});var rr=(e,t)=>r=>!!(Pe(r)&&au.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t)),bi=(e,t,r)=>n=>{if(!Pe(n))return n;let[i,s,o,u]=n.match(Qt);return{[e]:parseFloat(i),[t]:parseFloat(s),[r]:parseFloat(o),alpha:u!==void 0?parseFloat(u):1}};var Ae={test:rr("hsl","hue"),parse:bi("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+tr.transform(ze(t))+", "+tr.transform(ze(r))+", "+ze(xi.transform(n))+")"};var i1=wi(0,255),ki=Object.assign(Object.assign({},er),{transform:e=>Math.round(i1(e))}),we={test:rr("rgb","red"),parse:bi("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+ki.transform(e)+", "+ki.transform(t)+", "+ki.transform(r)+", "+ze(xi.transform(n))+")"};function s1(e){let t="",r="",n="",i="";return e.length>5?(t=e.substr(1,2),r=e.substr(3,2),n=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),r=e.substr(2,1),n=e.substr(3,1),i=e.substr(4,1),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}var nr={test:rr("#"),parse:s1,transform:we.transform};var qe={test:e=>we.test(e)||nr.test(e)||Ae.test(e),parse:e=>we.test(e)?we.parse(e):Ae.test(e)?Ae.parse(e):nr.parse(e),transform:e=>Pe(e)?e:e.hasOwnProperty("red")?we.transform(e):Ae.transform(e)};var lu="${c}",uu="${n}";function o1(e){var t,r,n,i;return isNaN(e)&&Pe(e)&&((r=(t=e.match(Qt))===null||t===void 0?void 0:t.length)!==null&&r!==void 0?r:0)+((i=(n=e.match(vi))===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0)>0}function cu(e){typeof e=="number"&&(e=`${e}`);let t=[],r=0,n=e.match(vi);n&&(r=n.length,e=e.replace(vi,lu),t.push(...n.map(qe.parse)));let i=e.match(Qt);return i&&(e=e.replace(Qt,uu),t.push(...i.map(er.parse))),{values:t,numColors:r,tokenised:e}}function pu(e){return cu(e).values}function hu(e){let{values:t,numColors:r,tokenised:n}=cu(e),i=t.length;return s=>{let o=n;for(let u=0;u<i;u++)o=o.replace(u<r?lu:uu,u<r?qe.transform(s[u]):ze(s[u]));return o}}var a1=e=>typeof e=="number"?0:e;function l1(e){let t=pu(e);return hu(e)(t.map(a1))}var Ci={test:o1,parse:pu,createTransformer:hu,getAnimatableNone:l1};function wo(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function vo({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let i=0,s=0,o=0;if(!t)i=s=o=r;else{let u=r<.5?r*(1+t):r+t-r*t,l=2*r-u;i=wo(l,u,e+1/3),s=wo(l,u,e),o=wo(l,u,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}var u1=(e,t,r)=>{let n=e*e,i=t*t;return Math.sqrt(Math.max(0,r*(i-n)+n))},c1=[nr,we,Ae],du=e=>c1.find(t=>t.test(e)),fu=e=>`'${e}' is not an animatable color. Use the equivalent color code instead.`,$i=(e,t)=>{let r=du(e),n=du(t);Xt(!!r,fu(e)),Xt(!!n,fu(t));let i=r.parse(e),s=n.parse(t);r===Ae&&(i=vo(i),r=we),n===Ae&&(s=vo(s),n=we);let o=Object.assign({},i);return u=>{for(let l in o)l!=="alpha"&&(o[l]=u1(i[l],s[l],u));return o.alpha=Yt(i.alpha,s.alpha,u),r.transform(o)}};var mu=e=>typeof e=="number";var p1=(e,t)=>r=>t(e(r)),Si=(...e)=>e.reduce(p1);function yu(e,t){return mu(e)?r=>Yt(e,t,r):qe.test(e)?$i(e,t):bo(e,t)}var xo=(e,t)=>{let r=[...e],n=r.length,i=e.map((s,o)=>yu(s,t[o]));return s=>{for(let o=0;o<n;o++)r[o]=i[o](s);return r}},wu=(e,t)=>{let r=Object.assign(Object.assign({},e),t),n={};for(let i in r)e[i]!==void 0&&t[i]!==void 0&&(n[i]=yu(e[i],t[i]));return i=>{for(let s in n)r[s]=n[s](i);return r}};function gu(e){let t=Ci.parse(e),r=t.length,n=0,i=0,s=0;for(let o=0;o<r;o++)n||typeof t[o]=="number"?n++:t[o].hue!==void 0?s++:i++;return{parsed:t,numNumbers:n,numRGB:i,numHSL:s}}var bo=(e,t)=>{let r=Ci.createTransformer(t),n=gu(e),i=gu(t);return n.numHSL===i.numHSL&&n.numRGB===i.numRGB&&n.numNumbers>=i.numNumbers?Si(xo(n.parsed,i.parsed),r):(mi(!0,`Complex values '${e}' and '${t}' 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?t:e}`)};var h1=(e,t)=>r=>Yt(e,t,r);function d1(e){if(typeof e=="number")return h1;if(typeof e=="string")return qe.test(e)?$i:bo;if(Array.isArray(e))return xo;if(typeof e=="object")return wu}function f1(e,t,r){let n=[],i=r||d1(e[0]),s=e.length-1;for(let o=0;o<s;o++){let u=i(e[o],e[o+1]);if(t){let l=Array.isArray(t)?t[o]:t;u=Si(l,u)}n.push(u)}return n}function m1([e,t],[r]){return n=>r(yo(e,t,n))}function g1(e,t){let r=e.length,n=r-1;return i=>{let s=0,o=!1;if(i<=e[0]?o=!0:i>=e[n]&&(s=n-1,o=!0),!o){let l=1;for(;l<r&&!(e[l]>i||l===n);l++);s=l-1}let u=yo(e[s],e[s+1],i);return t[s](u)}}function Ei(e,t,{clamp:r=!0,ease:n,mixer:i}={}){let s=e.length;Xt(s===t.length,"Both input and output ranges must be the same length"),Xt(!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."),e[0]>e[s-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());let o=f1(t,n,i),u=s===2?m1(e,o):g1(e,o);return r?l=>u(Kr(e[0],e[s-1],l)):u}var Yr=e=>t=>1-e(1-t),_i=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,vu=e=>t=>Math.pow(t,e),ko=e=>t=>t*t*((e+1)*t-e),xu=e=>{let t=ko(e);return r=>(r*=2)<1?.5*t(r):.5*(2-Math.pow(2,-10*(r-1)))};var bu=1.525,y1=4/11,w1=8/11,v1=9/10;var ku=vu(2),wm=Yr(ku),Cu=_i(ku),x1=e=>1-Math.sin(Math.acos(e)),b1=Yr(x1),vm=_i(b1),$u=ko(bu),xm=Yr($u),bm=_i($u),km=xu(bu),k1=4356/361,C1=35442/1805,$1=16061/1805,S1=e=>{if(e===1||e===0)return e;let t=e*e;return e<y1?7.5625*t:e<w1?9.075*t-9.9*e+3.4:e<v1?k1*t-C1*e+$1:10.8*e*e-20.52*e+10.72},Cm=Yr(S1);function E1(e,t){return e.map(()=>t||Cu).splice(0,e.length-1)}function _1(e){let t=e.length;return e.map((r,n)=>n!==0?n/(t-1):0)}function M1(e,t){return e.map(r=>r*t)}function Qr({from:e=0,to:t=1,ease:r,offset:n,duration:i=300}){let s={done:!1,value:e},o=Array.isArray(t)?t:[e,t],u=M1(n&&n.length===o.length?n:_1(o),i);function l(){return Ei(u,o,{ease:Array.isArray(r)?r:E1(o,r)})}let c=l();return{next:p=>(s.value=c(p),s.done=p>=i,s),flipTarget:()=>{o.reverse(),c=l()}}}function Su({velocity:e=0,from:t=0,power:r=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:s}){let o={done:!1,value:t},u=r*e,l=t+u,c=s===void 0?l:s(l);return c!==l&&(u=c-t),{next:p=>{let h=-u*Math.exp(-p/n);return o.done=!(h>i||h<-i),o.value=o.done?c:c+h,o},flipTarget:()=>{}}}var Eu={keyframes:Qr,spring:yi,decay:Su};function _u(e){if(Array.isArray(e.to))return Qr;if(Eu[e.type])return Eu[e.type];let t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?Qr:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?yi:Qr}var Co=16.666666666666668,A1=typeof performance<"u"?()=>performance.now():()=>Date.now(),$o=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(A1()),Co);function Mu(e){let t=[],r=[],n=0,i=!1,s=!1,o=new WeakSet,u={schedule:(l,c=!1,p=!1)=>{let h=p&&i,v=h?t:r;return c&&o.add(l),v.indexOf(l)===-1&&(v.push(l),h&&i&&(n=t.length)),l},cancel:l=>{let c=r.indexOf(l);c!==-1&&r.splice(c,1),o.delete(l)},process:l=>{if(i){s=!0;return}if(i=!0,[t,r]=[r,t],r.length=0,n=t.length,n)for(let c=0;c<n;c++){let p=t[c];p(l),o.has(p)&&(u.schedule(p),e())}i=!1,s&&(s=!1,u.process(l))}};return u}var I1=40,So=!0,tn=!1,Eo=!1,en={delta:0,timestamp:0},rn=["read","update","preRender","render","postRender"],Mi=rn.reduce((e,t)=>(e[t]=Mu(()=>tn=!0),e),{}),O1=rn.reduce((e,t)=>{let r=Mi[t];return e[t]=(n,i=!1,s=!1)=>(tn||T1(),r.schedule(n,i,s)),e},{}),Au=rn.reduce((e,t)=>(e[t]=Mi[t].cancel,e),{}),Rm=rn.reduce((e,t)=>(e[t]=()=>Mi[t].process(en),e),{}),j1=e=>Mi[e].process(en),Iu=e=>{tn=!1,en.delta=So?Co:Math.max(Math.min(e-en.timestamp,I1),1),en.timestamp=e,Eo=!0,rn.forEach(j1),Eo=!1,tn&&(So=!1,$o(Iu))},T1=()=>{tn=!0,So=!0,Eo||$o(Iu)};var Ou=O1;function _o(e,t,r=0){return e-t-r}function ju(e,t,r=0,n=!0){return n?_o(t+-e,t,r):t-(e-t)+r}function Tu(e,t,r,n){return n?e>=t+r:e<=-r}var L1=e=>{let t=({delta:r})=>e(r);return{start:()=>Ou.update(t,!0),stop:()=>Au.update(t)}};function Mo(e){var t,r,{from:n,autoplay:i=!0,driver:s=L1,elapsed:o=0,repeat:u=0,repeatType:l="loop",repeatDelay:c=0,onPlay:p,onStop:h,onComplete:v,onRepeat:b,onUpdate:$}=e,j=fi(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:C}=j,M,k=0,E=j.duration,T,N=!1,K=!0,te,P=_u(j);!((r=(t=P).needsInterpolation)===null||r===void 0)&&r.call(t,n,C)&&(te=Ei([0,100],[n,C],{clamp:!1}),n=0,C=100);let re=P(Object.assign(Object.assign({},j),{from:n,to:C}));function oe(){k++,l==="reverse"?(K=k%2===0,o=ju(o,E,c,K)):(o=_o(o,E,c),l==="mirror"&&re.flipTarget()),N=!1,b&&b()}function os(){M.stop(),v&&v()}function Ye(W){if(K||(W=-W),o+=W,!N){let ne=re.next(Math.max(0,o));T=ne.value,te&&(T=te(T)),N=K?ne.done:o<=0}$?.(T),N&&(k===0&&(E??(E=o)),k<u?Tu(o,E,c,K)&&oe():os())}function In(){p?.(),M=s(Ye),M.start()}return i&&In(),{stop:()=>{h?.(),M.stop()}}}var B,Lu,Ai,Du,Ii,Pu,Ru,Uu,Oi,ji=class ji extends I(_){constructor(){super();f(this,B);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")&&y(this,B,Lu).call(this)}get images(){return this.product?.images||[]}render(){if(!this.product)return d`
|
|
1407
1437
|
<div class="my-2 w-full rounded-3xl border bg-white p-4">
|
|
1408
1438
|
<div class="relative mx-auto mb-4 max-w-[240px]">
|
|
1409
1439
|
<div class="h-[180px] w-full animate-pulse rounded-2xl bg-gray-200"></div>
|
|
@@ -1475,11 +1505,11 @@ var $c=Object.defineProperty;var ea=e=>{throw TypeError(e)};var Sc=(e,t,r)=>t in
|
|
|
1475
1505
|
`)}
|
|
1476
1506
|
</div>
|
|
1477
1507
|
</div>
|
|
1478
|
-
<div @click="${y(this,B,
|
|
1479
|
-
${s?d`<a @click="${y(this,B,
|
|
1508
|
+
<div @click="${y(this,B,Ai)}" class="cursor-pointer">
|
|
1509
|
+
${s?d`<a @click="${y(this,B,Ai)}" class="${this._isValidUrl?"":"pointer-events-none"} line-clamp-1 text-xs text-gray-600 hover:underline"> ${s} </a>`:null}
|
|
1480
1510
|
|
|
1481
1511
|
<h3
|
|
1482
|
-
@click="${y(this,B,
|
|
1512
|
+
@click="${y(this,B,Ai)}"
|
|
1483
1513
|
class="${this._isValidUrl?"":"pointer-events-none cursor-default"} mb-1 line-clamp-2 cursor-pointer text-lg font-semibold transition-all hover:underline">
|
|
1484
1514
|
${r||d`<span class="inline-block h-6 w-32 animate-pulse rounded bg-gray-200"></span>`}
|
|
1485
1515
|
</h3>
|
|
@@ -1496,7 +1526,7 @@ var $c=Object.defineProperty;var ea=e=>{throw TypeError(e)};var Sc=(e,t,r)=>t in
|
|
|
1496
1526
|
</button> -->
|
|
1497
1527
|
</div>
|
|
1498
1528
|
</div>
|
|
1499
|
-
`}};B=new WeakSet,Lu=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}},
|
|
1529
|
+
`}};B=new WeakSet,Lu=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}},Ai=function(r){r.preventDefault(),!(!this.product?.url||!this._isValidUrl)&&window.open(this.product.url,"_blank")},Du=function(r){!this.product?.url||!this._isValidUrl||(window.open(this.product.url,"_blank"),this.dispatchEvent(new ji.AddToCartEvent(this.product)))},Ii=function(r,n){a(this,B,Oi)&&Mo({from:r,to:n,duration:300,onUpdate:i=>{a(this,B,Oi)&&(a(this,B,Oi).style.transform=`translateX(${i}%)`)}})},Pu=function(){if(!this.product?.images?.length)return;let r=this._currentImageIndex,n=(r+1)%this.product.images.length,i=-(r*100),s=-(n*100);y(this,B,Ii).call(this,i,s),this._currentImageIndex=n},Ru=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);y(this,B,Ii).call(this,i,s),this._currentImageIndex=n},Uu=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);y(this,B,Ii).call(this,s,o),this._currentImageIndex=i},Oi=function(){return this.renderRoot.querySelector(".image-slider")},g(ji,"properties",{product:{type:Object},labels:{type:Object},_currentImageIndex:{type:Number,state:!0},_isValidUrl:{type:Boolean,state:!0}});var nn=ji,Ao;nn.AddToCartEvent=(Ao=class extends CustomEvent{constructor(t,r={}){super(nn.AddToCartEvent.type,{detail:{product:t},...r})}},g(Ao,"type","mw-product-card:add-to-cart"),Ao);customElements.get("mw-product-card")||customElements.define("mw-product-card",nn);function ir(e){return Array.isArray(e)?e:e?[e]:[]}function Vu(e,t){let r=new Map;for(let n of e){let i=t(n);r.has(i)||r.set(i,[]),(r.get(i)||[]).push(n)}return r}var Bu=(e,t,r)=>{for(let n of t)if(n[0]===e)return(0,n[1])();return r?.()};var Ti=class extends I(_){constructor(){super(),this.orderDetails=null,this.streaming=!1,this.linksNewTab=!1}render(){let t=ir(this.orderDetails?.order_status?.step||[]),r=ir(this.orderDetails?.items?.item||[]),n=ir(this.orderDetails?.actions||[]);return d`
|
|
1500
1530
|
<div class="flex w-full max-w-md flex-col rounded-3xl border bg-white p-4">
|
|
1501
1531
|
<!-- Header with order ID -->
|
|
1502
1532
|
<div class="mb-2">
|
|
@@ -1668,11 +1698,11 @@ var $c=Object.defineProperty;var ea=e=>{throw TypeError(e)};var Sc=(e,t,r)=>t in
|
|
|
1668
1698
|
|
|
1669
1699
|
<!-- Action buttons section -->
|
|
1670
1700
|
<div class="flex w-full flex-col gap-2 overflow-hidden">
|
|
1671
|
-
${this.streaming&&!n[0]?.track_order?.label&&!
|
|
1701
|
+
${this.streaming&&!n[0]?.track_order?.label&&!As(n[0]?.track_order?.tracking_url||"")?d`
|
|
1672
1702
|
<!-- Loading shimmer for buttons -->
|
|
1673
1703
|
<div class="h-10 w-full min-w-[250px] animate-pulse overflow-hidden rounded-xl bg-gray-200"></div>
|
|
1674
1704
|
`:$e(n,(i,s)=>`action-${s}`,i=>{if(i?.track_order?.label)return d`
|
|
1675
|
-
${
|
|
1705
|
+
${As(i.track_order?.tracking_url||"")?d` <a
|
|
1676
1706
|
target="${this.linksNewTab?"_blank":"_self"}"
|
|
1677
1707
|
href="${i.track_order?.tracking_url}"
|
|
1678
1708
|
class="mt-1 w-full rounded-xl bg-[#601feb] px-4 py-2 text-center text-sm font-medium text-white hover:opacity-90"
|
|
@@ -1681,7 +1711,7 @@ var $c=Object.defineProperty;var ea=e=>{throw TypeError(e)};var Sc=(e,t,r)=>t in
|
|
|
1681
1711
|
`})}
|
|
1682
1712
|
</div>
|
|
1683
1713
|
</div>
|
|
1684
|
-
`}};g(Ti,"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",Ti);var sn=class extends Zt{constructor(t){if(super(t),this.it=
|
|
1714
|
+
`}};g(Ti,"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",Ti);var sn=class extends Zt{constructor(t){if(super(t),this.it=A,t.type!==ii.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===A||t==null)return this._t=void 0,this.it=t;if(t===xe)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;let r=[t];return r.raw=r,this._t={_$litType$:this.constructor.resultType,strings:r,values:[]}}};sn.directiveName="unsafeHTML",sn.resultType=1;var Nu=si(sn);var Hu=Za(Le({name:J(),description:J(),price:J(),image_url:Ht([J(),Bt(J())]),category:J(),url:J()}));function Fu(e,t,r,{imagesByProductUrl:n,linksNewTab:i=!0,searchParams:s,messageIsStreaming:o=!1}){if(!e)return d``;let u=t>0&&r[t-1]&&"data"in r[t-1],l=t<r.length-1||!o;if("text"in e)return d`<p>${e.text}</p>`;if("html"in e)return d`${Nu(e.html)}`;if("data"in e)switch(e.tag){case"product-card":case"product-card-v1":case"product-card-horizontal":{let c=Lr(Hu,e.data);if(c.success){let p={...c.output,images:[]};return p.images=ir(p.image_url),d`
|
|
1685
1715
|
${u?d`<div class="my-3 w-full border-t border-gray-200/50"></div>`:null}
|
|
1686
1716
|
<mw-product-card-horizontal
|
|
1687
1717
|
product="${JSON.stringify(p)}"
|
|
@@ -1760,7 +1790,7 @@ var $c=Object.defineProperty;var ea=e=>{throw TypeError(e)};var Sc=(e,t,r)=>t in
|
|
|
1760
1790
|
<mw-loading class="-mx-2 block h-8 max-h-[24px] w-8 fill-[${this.config.color}]"></mw-loading>
|
|
1761
1791
|
</div>
|
|
1762
1792
|
</mw-chat-message>
|
|
1763
|
-
`:
|
|
1793
|
+
`:A}
|
|
1764
1794
|
</div>
|
|
1765
1795
|
|
|
1766
1796
|
<mw-chat-background
|
|
@@ -1781,7 +1811,7 @@ var $c=Object.defineProperty;var ea=e=>{throw TypeError(e)};var Sc=(e,t,r)=>t in
|
|
|
1781
1811
|
?loading="${this.hasQueuedMessages}">
|
|
1782
1812
|
</mw-chat-input>
|
|
1783
1813
|
|
|
1784
|
-
${this.config.removePoweredBy?
|
|
1814
|
+
${this.config.removePoweredBy?A:d`
|
|
1785
1815
|
<!-- spacing between input box and powered-by or bottom -->
|
|
1786
1816
|
<div class="h-4">
|
|
1787
1817
|
<mw-powered-by></mw-powered-by>
|
|
@@ -1837,7 +1867,7 @@ var $c=Object.defineProperty;var ea=e=>{throw TypeError(e)};var Sc=(e,t,r)=>t in
|
|
|
1837
1867
|
${this.button&&this.color?d`
|
|
1838
1868
|
<!-- only visible if button text and color are given -->
|
|
1839
1869
|
<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>
|
|
1840
|
-
`:
|
|
1870
|
+
`:A}
|
|
1841
1871
|
</div>
|
|
1842
1872
|
|
|
1843
1873
|
<!-- can append any other content -->
|
|
@@ -1850,7 +1880,7 @@ var $c=Object.defineProperty;var ea=e=>{throw TypeError(e)};var Sc=(e,t,r)=>t in
|
|
|
1850
1880
|
<!-- mobile overlay -->
|
|
1851
1881
|
<div class="${r} fixed bottom-0 left-0 right-0 z-[2147483647] sm:hidden">
|
|
1852
1882
|
<mw-popup-mobile title="${n.mobile.title}" text="${n.mobile.text}" button="${n.mobile.button}" color="${n.mobile.color}" @mw:click="${y(this,Re,Ro)}" @mw:close="${y(this,Re,Bi)}">
|
|
1853
|
-
${n.mobile.poweredBy?d`<mw-powered-by class="block p-4" slot="footer"></mw-powered-by>`:
|
|
1883
|
+
${n.mobile.poweredBy?d`<mw-powered-by class="block p-4" slot="footer"></mw-powered-by>`:A}
|
|
1854
1884
|
</mw-popup-mobile>
|
|
1855
1885
|
</div>
|
|
1856
1886
|
|
|
@@ -1879,18 +1909,18 @@ var $c=Object.defineProperty;var ea=e=>{throw TypeError(e)};var Sc=(e,t,r)=>t in
|
|
|
1879
1909
|
stroke-linecap="round"></path>
|
|
1880
1910
|
</svg>
|
|
1881
1911
|
</div>
|
|
1882
|
-
`);this.positionClasses="",this.text="Try it out"}};g(zi,"properties",{positionClasses:{type:String,attribute:"position"},text:{type:String}});customElements.get("mw-try-it-out")||customElements.define("mw-try-it-out",zi);var Ge,Ie,Bo,gn,Vo=class{constructor(t=window.localStorage){f(this,Ie);f(this,Ge);m(this,Ge,t)}setex(t,r,n){return a(this,Ge).setItem(t,y(this,Ie,gn).call(this,{value:y(this,Ie,gn).call(this,r),expiresAt:Date.now()+n*1e3})||"")}set(t,r){return a(this,Ge).setItem(t,y(this,Ie,gn).call(this,{value:y(this,Ie,gn).call(this,r)})||"")}get(t){let r=a(this,Ge).getItem(t);if(!r)return;let n=y(this,Ie,Bo).call(this,r);if(n){if(n.expiresAt&&n.expiresAt<Date.now()){a(this,Ge).removeItem(t);return}return y(this,Ie,Bo).call(this,n.value)}}get molin_shop_assistant_distinct_id(){return localStorage.getItem("molin_shop_assistant_distinct_id")}set molin_shop_assistant_distinct_id(t){t===null?localStorage.removeItem("molin_shop_assistant_distinct_id"):localStorage.setItem("molin_shop_assistant_distinct_id",t)}get molin_widget_open_state(){return fe.get("molin-shop-ai-widget-open")??null}set molin_widget_open_state(t){fe.set("molin-shop-ai-widget-open",t)}resetWidgetData(){fe.molin_shop_assistant_distinct_id=null,fe.molin_widget_open_state=null}};Ge=new WeakMap,Ie=new WeakSet,Bo=function(t){if(!(typeof t!="string"||t===""))try{return JSON.parse(t)}catch{return}},gn=function(t){if(t!==void 0)try{return JSON.stringify(t)}catch{return}};var fe=new Vo;var se,Ue,qi,yn,pr,No=class{constructor(){f(this,se,[]);f(this,Ue);f(this,qi,10);f(this,yn,5e3);f(this,pr,!1)}async add(t,r){if(a(this,se).push(ac(t,r)),a(this,se).length>=a(this,qi))return this.flush();a(this,Ue)||m(this,Ue,setTimeout(()=>{this.flush().catch(console.error)},a(this,yn)))}async flush(){if(a(this,pr)||a(this,se).length===0)return;let t=[...a(this,se)];try{m(this,pr,!0),clearTimeout(a(this,Ue)),m(this,Ue,void 0),m(this,se,[]);let r=new AbortController,n=setTimeout(()=>r.abort(),5e3);await oc(t,{signal:r.signal}),clearTimeout(n)}catch(r){if(r.name==="AbortError")console.error("Request timed out, retrying events"),m(this,se,[...t,...a(this,se)]);else{console.error("Failed to send events to backend:",r);let n=t.filter(i=>i.event.includes("error"));m(this,se,[...n,...a(this,se)])}}finally{m(this,pr,!1),a(this,se).length>0&&!a(this,Ue)&&m(this,Ue,setTimeout(()=>{this.flush().catch(console.error)},a(this,yn)))}}async flushBeforeUnload(){if(a(this,se).length>0)try{let t=new FormData;t.set("events",JSON.stringify(a(this,se))),navigator.sendBeacon(new URL("/widgets/data/collect",lc()).href,t)}catch(t){console.error("Failed to send final events:",t)}}};se=new WeakMap,Ue=new WeakMap,qi=new WeakMap,yn=new WeakMap,pr=new WeakMap;var sc=new No;window.addEventListener("beforeunload",()=>{sc.flushBeforeUnload().catch(console.error)});async function F(e,t,r){if(typeof e!="string")throw new TypeError("Event name must be a string");if(typeof t!="object"||t===null)throw new TypeError("Properties must be an object");try{if(r?.immediate){await oc([ac(e,t)]);return}else return sc.add(e,t)}catch(n){console.error("Failed to send event:",n)}}async function oc(e,{signal:t}={}){let r=new FormData;r.set("events",JSON.stringify(e));let n=await fetch(new URL("/widgets/data/collect",lc()),{method:"POST",body:r,signal:t});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);n.body?.cancel().catch(console.warn)}function ac(e,t){return{event:e,widget_id:t.widgetId,properties:Object.assign({},t,B1()),distinct_id:V1(),timestamp:new Date().toISOString()}}function V1(){try{let e=fe.molin_shop_assistant_distinct_id;return e||(e=crypto.randomUUID(),fe.molin_shop_assistant_distinct_id=e),e}catch(e){console.error("Failed to deserialize distinct_id:",e);let t=crypto.randomUUID();try{fe.molin_shop_assistant_distinct_id=t}catch(r){console.error("Failed to store new distinct_id:",r)}return t}}function B1(){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??void 0}}function lc(){let e=new URL(import.meta.url).hostname;return{localhost:"http://localhost:8787","molin.localhost":"http://molin.localhost:8787","widget.molin.foo":"https://molin.foo","widget.molin.ai":"https://molin.ai","molin.ai":"https://molin.ai","molin.foo":"https://molin.foo"}[e]||"https://molin.ai"}var $t,wn,Je,St,Zi,cc,Wi=class{constructor(t,r,n){f(this,Zi);f(this,$t);f(this,wn);f(this,Je);f(this,St);g(this,"isLoading",!1);g(this,"data");m(this,$t,t),m(this,wn,r),m(this,Je,n),t.addController(this)}fetch(){if(this.isLoading)return;a(this,St)?.abort();let t=new AbortController;m(this,St,t),this.isLoading=!0,this.data=void 0,a(this,$t).requestUpdate(),(async()=>{let r=y(this,Zi,cc).call(this);return r.signal?.addEventListener("abort",()=>t.abort(),{signal:t.signal}),fetch(r,{signal:t.signal})})().then(async r=>{if(!r.ok)throw new Error(`${r.statusText}: ${await r.text()}`);this.isLoading=!1,this.data=typeof a(this,Je)?.transform=="function"?await a(this,Je).transform(r):r,a(this,$t).requestUpdate()}).catch(r=>{a(this,Je)?.onError?.(r),this.isLoading=!1,this.data=void 0,a(this,$t).requestUpdate()}).finally(()=>{t.abort()})}hostConnected(){this.isLoading||a(this,Je)?.fetchWhenConnected&&this.fetch()}hostDisconnected(){a(this,St)?.abort(),m(this,St,void 0)}};$t=new WeakMap,wn=new WeakMap,Je=new WeakMap,St=new WeakMap,Zi=new WeakSet,cc=function(){let t=a(this,wn);if(typeof t=="function"&&(t=t()),!t)throw new Error("missing request");return new Request(t)};var ve,vn,hr,dr,Ke=class{constructor(t,r){f(this,ve);f(this,vn);f(this,hr);f(this,dr);m(this,ve,t),m(this,vn,r),t.addController(this)}get data(){return a(this,dr)||a(this,hr)?.data}hostConnected(){if(a(this,hr)||a(this,dr))return;let t=pc();t&&t.widgetId===a(this,ve).widgetId?m(this,dr,t.config):m(this,hr,new Wi(a(this,ve),()=>{if(a(this,ve).cdn&&a(this,ve).widgetId)return`${a(this,ve).cdn}/config?w=${a(this,ve).widgetId}`;throw new Error("missing cdn or widgetId")},{fetchWhenConnected:!0,transform:async r=>{let n=await r.json();return n&&!t&&window.__INIT_MOLIN_SHOP_AI({cdn:a(this,ve).cdn,widgetId:a(this,ve).widgetId,config:n}),n},onError:a(this,vn)?.onError}))}};ve=new WeakMap,vn=new WeakMap,hr=new WeakMap,dr=new WeakMap;function Xe(){return window.molinSettings&&typeof window.molinSettings=="object"?window.molinSettings:null}var Gi,kn,Ji,Ve,hc,xn,bn=class bn extends I(_){constructor(){super();f(this,Ve);f(this,Gi,new Ke(this,{onError:console.error}));f(this,kn);f(this,Ji,{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=Xe()?.userData,this.xCustomInstructions=Xe()?.customInstructions}get config(){return a(this,kn)||a(this,Gi).data}render(){return this.config?d`
|
|
1912
|
+
`);this.positionClasses="",this.text="Try it out"}};g(zi,"properties",{positionClasses:{type:String,attribute:"position"},text:{type:String}});customElements.get("mw-try-it-out")||customElements.define("mw-try-it-out",zi);var Ge,Ie,Bo,gn,Vo=class{constructor(t=window.localStorage){f(this,Ie);f(this,Ge);m(this,Ge,t)}setex(t,r,n){return a(this,Ge).setItem(t,y(this,Ie,gn).call(this,{value:y(this,Ie,gn).call(this,r),expiresAt:Date.now()+n*1e3})||"")}set(t,r){return a(this,Ge).setItem(t,y(this,Ie,gn).call(this,{value:y(this,Ie,gn).call(this,r)})||"")}get(t){let r=a(this,Ge).getItem(t);if(!r)return;let n=y(this,Ie,Bo).call(this,r);if(n){if(n.expiresAt&&n.expiresAt<Date.now()){a(this,Ge).removeItem(t);return}return y(this,Ie,Bo).call(this,n.value)}}get molin_shop_assistant_distinct_id(){return localStorage.getItem("molin_shop_assistant_distinct_id")}set molin_shop_assistant_distinct_id(t){t===null?localStorage.removeItem("molin_shop_assistant_distinct_id"):localStorage.setItem("molin_shop_assistant_distinct_id",t)}get molin_widget_open_state(){return fe.get("molin-shop-ai-widget-open")??null}set molin_widget_open_state(t){fe.set("molin-shop-ai-widget-open",t)}resetWidgetData(){fe.molin_shop_assistant_distinct_id=null,fe.molin_widget_open_state=null}};Ge=new WeakMap,Ie=new WeakSet,Bo=function(t){if(!(typeof t!="string"||t===""))try{return JSON.parse(t)}catch{return}},gn=function(t){if(t!==void 0)try{return JSON.stringify(t)}catch{return}};var fe=new Vo;var se,Ue,qi,yn,pr,No=class{constructor(){f(this,se,[]);f(this,Ue);f(this,qi,10);f(this,yn,5e3);f(this,pr,!1)}async add(t,r){if(a(this,se).push(ac(t,r)),a(this,se).length>=a(this,qi))return this.flush();a(this,Ue)||m(this,Ue,setTimeout(()=>{this.flush().catch(console.error)},a(this,yn)))}async flush(){if(a(this,pr)||a(this,se).length===0)return;let t=[...a(this,se)];try{m(this,pr,!0),clearTimeout(a(this,Ue)),m(this,Ue,void 0),m(this,se,[]);let r=new AbortController,n=setTimeout(()=>r.abort(),5e3);await oc(t,{signal:r.signal}),clearTimeout(n)}catch(r){if(r.name==="AbortError")console.error("Request timed out, retrying events"),m(this,se,[...t,...a(this,se)]);else{console.error("Failed to send events to backend:",r);let n=t.filter(i=>i.event.includes("error"));m(this,se,[...n,...a(this,se)])}}finally{m(this,pr,!1),a(this,se).length>0&&!a(this,Ue)&&m(this,Ue,setTimeout(()=>{this.flush().catch(console.error)},a(this,yn)))}}async flushBeforeUnload(){if(a(this,se).length>0)try{let t=new FormData;t.set("events",JSON.stringify(a(this,se))),navigator.sendBeacon(new URL("/widgets/data/collect",lc()).href,t)}catch(t){console.error("Failed to send final events:",t)}}};se=new WeakMap,Ue=new WeakMap,qi=new WeakMap,yn=new WeakMap,pr=new WeakMap;var sc=new No;window.addEventListener("beforeunload",()=>{sc.flushBeforeUnload().catch(console.error)});async function F(e,t,r){if(typeof e!="string")throw new TypeError("Event name must be a string");if(typeof t!="object"||t===null)throw new TypeError("Properties must be an object");try{if(e==="ShopAssistant: user clicked link"&&N1("molin_link_click",t),r?.immediate){await oc([ac(e,t)]);return}else return sc.add(e,t)}catch(n){console.error("Failed to send event:",n)}}async function oc(e,{signal:t}={}){let r=new FormData;r.set("events",JSON.stringify(e));let n=await fetch(new URL("/widgets/data/collect",lc()),{method:"POST",body:r,signal:t});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);n.body?.cancel().catch(console.warn)}function ac(e,t){return{event:e,widget_id:t.widgetId,properties:Object.assign({},t,B1()),distinct_id:V1(),timestamp:new Date().toISOString()}}function V1(){try{let e=fe.molin_shop_assistant_distinct_id;return e||(e=crypto.randomUUID(),fe.molin_shop_assistant_distinct_id=e),e}catch(e){console.error("Failed to deserialize distinct_id:",e);let t=crypto.randomUUID();try{fe.molin_shop_assistant_distinct_id=t}catch(r){console.error("Failed to store new distinct_id:",r)}return t}}function B1(){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??void 0}}function lc(){let e=new URL(import.meta.url).hostname;return{localhost:"http://localhost:8787","molin.localhost":"http://molin.localhost:8787","widget.molin.foo":"https://molin.foo","widget.molin.ai":"https://molin.ai","molin.ai":"https://molin.ai","molin.foo":"https://molin.foo"}[e]||"https://molin.ai"}function N1(e,t){try{window.dataLayer=window.dataLayer||[];let r={event:e,link_url:t.url};window.dataLayer.push(r),console.debug("Sent event to dataLayer:",r)}catch(r){console.error("Failed to send event to dataLayer:",r)}}var $t,wn,Je,St,Zi,cc,Wi=class{constructor(t,r,n){f(this,Zi);f(this,$t);f(this,wn);f(this,Je);f(this,St);g(this,"isLoading",!1);g(this,"data");m(this,$t,t),m(this,wn,r),m(this,Je,n),t.addController(this)}fetch(){if(this.isLoading)return;a(this,St)?.abort();let t=new AbortController;m(this,St,t),this.isLoading=!0,this.data=void 0,a(this,$t).requestUpdate(),(async()=>{let r=y(this,Zi,cc).call(this);return r.signal?.addEventListener("abort",()=>t.abort(),{signal:t.signal}),fetch(r,{signal:t.signal})})().then(async r=>{if(!r.ok)throw new Error(`${r.statusText}: ${await r.text()}`);this.isLoading=!1,this.data=typeof a(this,Je)?.transform=="function"?await a(this,Je).transform(r):r,a(this,$t).requestUpdate()}).catch(r=>{a(this,Je)?.onError?.(r),this.isLoading=!1,this.data=void 0,a(this,$t).requestUpdate()}).finally(()=>{t.abort()})}hostConnected(){this.isLoading||a(this,Je)?.fetchWhenConnected&&this.fetch()}hostDisconnected(){a(this,St)?.abort(),m(this,St,void 0)}};$t=new WeakMap,wn=new WeakMap,Je=new WeakMap,St=new WeakMap,Zi=new WeakSet,cc=function(){let t=a(this,wn);if(typeof t=="function"&&(t=t()),!t)throw new Error("missing request");return new Request(t)};var ve,vn,hr,dr,Ke=class{constructor(t,r){f(this,ve);f(this,vn);f(this,hr);f(this,dr);m(this,ve,t),m(this,vn,r),t.addController(this)}get data(){return a(this,dr)||a(this,hr)?.data}hostConnected(){if(a(this,hr)||a(this,dr))return;let t=pc();t&&t.widgetId===a(this,ve).widgetId?m(this,dr,t.config):m(this,hr,new Wi(a(this,ve),()=>{if(a(this,ve).cdn&&a(this,ve).widgetId)return`${a(this,ve).cdn}/config?w=${a(this,ve).widgetId}`;throw new Error("missing cdn or widgetId")},{fetchWhenConnected:!0,transform:async r=>{let n=await r.json();return n&&!t&&window.__INIT_MOLIN_SHOP_AI({cdn:a(this,ve).cdn,widgetId:a(this,ve).widgetId,config:n}),n},onError:a(this,vn)?.onError}))}};ve=new WeakMap,vn=new WeakMap,hr=new WeakMap,dr=new WeakMap;function Xe(){return window.molinSettings&&typeof window.molinSettings=="object"?window.molinSettings:null}var Gi,kn,Ji,Ve,hc,xn,bn=class bn extends I(_){constructor(){super();f(this,Ve);f(this,Gi,new Ke(this,{onError:console.error}));f(this,kn);f(this,Ji,{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=Xe()?.userData,this.xCustomInstructions=Xe()?.customInstructions}get config(){return a(this,kn)||a(this,Gi).data}render(){return this.config?d`
|
|
1883
1913
|
<mw-context-widget .widgetId="${this.widgetId}" .config="${this.config}" .callbacks="${a(this,Ji)}" .xUserData="${this.xUserData}" .xCustomInstructions="${this.xCustomInstructions}">
|
|
1884
1914
|
<!-- embed our chat component forwarding props -->
|
|
1885
1915
|
<mw-chat ?show-close="${this.showClose}" @mw:close-click="${y(this,Ve,hc)}">
|
|
1886
1916
|
<slot name="banner" slot="banner"></slot>
|
|
1887
1917
|
</mw-chat>
|
|
1888
1918
|
</mw-context-widget>
|
|
1889
|
-
`:
|
|
1919
|
+
`:A}injectConfig(r){m(this,kn,r),this.requestUpdate()}reloadConfig(){a(this,Ve,xn)?.reloadConfig()}reset(){this.xUserData={},this.xCustomInstructions="",a(this,Ve,xn)?.reset(),this.requestUpdate()}get conversationId(){return a(this,Ve,xn)?.conversationId??""}get messages(){return a(this,Ve,xn)?.messages??[]}};Gi=new WeakMap,kn=new WeakMap,Ji=new WeakMap,Ve=new WeakSet,hc=function(){this.dispatchEvent(new bn.CloseClickEvent)},xn=function(){return this.renderRoot.querySelector("mw-chat")},g(bn,"styles",ie`
|
|
1890
1920
|
:host {
|
|
1891
1921
|
all: initial; /* reset all properties that can pierce the shadow DOM */
|
|
1892
1922
|
}
|
|
1893
|
-
`),g(bn,"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 Et=bn;customElements.get("molin-shop-ai-chat")||customElements.define("molin-shop-ai-chat",Et);var Ho;Et.CloseClickEvent=(Ho=class extends CustomEvent{constructor(t={}){super(Et.CloseClickEvent.type,{...t})}},g(Ho,"type","mw:close-click"),Ho);var Fo=class{constructor({hidden:t=!1}){g(this,"hidden");this.hidden=t}setUserData(t){for(let r of document.querySelectorAll("molin-shop-ai"))t?r.setAttribute("user-data",JSON.stringify(t)):r.removeAttribute("user-data");for(let r of document.querySelectorAll("molin-shop-ai-chat"))t?r.setAttribute("user-data",JSON.stringify(t)):r.removeAttribute("user-data")}setCustomInstructions(t){for(let r of document.querySelectorAll("molin-shop-ai"))t?r.setAttribute("custom-instructions",t):r.removeAttribute("custom-instructions");for(let r of document.querySelectorAll("molin-shop-ai-chat"))t?r.setAttribute("custom-instructions",t):r.removeAttribute("custom-instructions")}showLauncher(){for(let t of document.querySelectorAll("molin-shop-ai"))t instanceof Se&&t.showLauncher()}hideLauncher(){for(let t of document.querySelectorAll("molin-shop-ai"))t instanceof Se&&t.hideLauncher()}openChat({message:t,autoSend:r}={}){for(let n of document.querySelectorAll("molin-shop-ai"))n instanceof Se&&n.openChat({message:t,autoSend:r})}closeChat(){for(let t of document.querySelectorAll("molin-shop-ai"))t instanceof Se&&t.closeChat()}reset(){fe.resetWidgetData();for(let t of document.querySelectorAll("molin-shop-ai"))t instanceof Se&&t.reset();for(let t of document.querySelectorAll("molin-shop-ai-chat"))t instanceof Et&&t.reset()}};function dc({hidden:e}){let t=new Fo({hidden:e});return window.Molin=t,t}function Ki(){let e=window.Molin;if(!e)throw new Error("window.Molin global not initialized");return e}window.__INIT_MOLIN_SHOP_AI=function(t){
|
|
1923
|
+
`),g(bn,"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 Et=bn;customElements.get("molin-shop-ai-chat")||customElements.define("molin-shop-ai-chat",Et);var Ho;Et.CloseClickEvent=(Ho=class extends CustomEvent{constructor(t={}){super(Et.CloseClickEvent.type,{...t})}},g(Ho,"type","mw:close-click"),Ho);var Fo=class{constructor({hidden:t=!1}){g(this,"hidden");this.hidden=t}setUserData(t){for(let r of document.querySelectorAll("molin-shop-ai"))t?r.setAttribute("user-data",JSON.stringify(t)):r.removeAttribute("user-data");for(let r of document.querySelectorAll("molin-shop-ai-chat"))t?r.setAttribute("user-data",JSON.stringify(t)):r.removeAttribute("user-data")}setCustomInstructions(t){for(let r of document.querySelectorAll("molin-shop-ai"))t?r.setAttribute("custom-instructions",t):r.removeAttribute("custom-instructions");for(let r of document.querySelectorAll("molin-shop-ai-chat"))t?r.setAttribute("custom-instructions",t):r.removeAttribute("custom-instructions")}showLauncher(){for(let t of document.querySelectorAll("molin-shop-ai"))t instanceof Se&&t.showLauncher()}hideLauncher(){for(let t of document.querySelectorAll("molin-shop-ai"))t instanceof Se&&t.hideLauncher()}openChat({message:t,autoSend:r}={}){for(let n of document.querySelectorAll("molin-shop-ai"))n instanceof Se&&n.openChat({message:t,autoSend:r})}closeChat(){for(let t of document.querySelectorAll("molin-shop-ai"))t instanceof Se&&t.closeChat()}reset(){fe.resetWidgetData();for(let t of document.querySelectorAll("molin-shop-ai"))t instanceof Se&&t.reset();for(let t of document.querySelectorAll("molin-shop-ai-chat"))t instanceof Et&&t.reset()}};function dc({hidden:e}){let t=new Fo({hidden:e});return window.Molin=t,t}function Ki(){let e=window.Molin;if(!e)throw new Error("window.Molin global not initialized");return e}window.__INIT_MOLIN_SHOP_AI=function(t){H1(t);let r=Xe(),n=typeof r?.hidden=="boolean"?r.hidden:window.self!==window.top;if(dc({hidden:n}),t.auto){let i=document.createElement("molin-shop-ai");i.setAttribute("cdn",t.cdn),i.setAttribute("widget",t.widgetId),document.body.appendChild(i)}};function H1(e){window.__INIT_MOLIN_SHOP_AI_OPTIONS=e}function pc(){return window.__INIT_MOLIN_SHOP_AI_OPTIONS}var Xi,Cn=class extends I(_){constructor(){super();f(this,Xi,new Ke(this,{onError:console.error}));this.cdn="https://widget.molin.ai",this.widgetId="",this.state="open"}get config(){return a(this,Xi).data}render(){return this.config?d`
|
|
1894
1924
|
<!-- embed our bubble component forwarding props -->
|
|
1895
1925
|
<!-- these props are never internally updated by mw-bubble so we pass them down only one way -->
|
|
1896
1926
|
<mw-bubble
|
|
@@ -1900,11 +1930,11 @@ var $c=Object.defineProperty;var ea=e=>{throw TypeError(e)};var Sc=(e,t,r)=>t in
|
|
|
1900
1930
|
.src="${this.config?.bubble?.bubbleUrl}"
|
|
1901
1931
|
width="${he(this.config?.bubble?.size?.width)}"
|
|
1902
1932
|
height="${he(this.config?.bubble?.size?.height)}"></mw-bubble>
|
|
1903
|
-
`:
|
|
1933
|
+
`:A}};Xi=new WeakMap,g(Cn,"styles",ie`
|
|
1904
1934
|
:host {
|
|
1905
1935
|
all: initial; /* reset all properties that can pierce the shadow DOM */
|
|
1906
1936
|
}
|
|
1907
|
-
`),g(Cn,"properties",{cdn:{type:String},widgetId:{type:String,attribute:"widget"},state:{type:String}});customElements.define("molin-shop-ai-launcher",Cn);var
|
|
1937
|
+
`),g(Cn,"properties",{cdn:{type:String},widgetId:{type:String,attribute:"widget"},state:{type:String}});customElements.define("molin-shop-ai-launcher",Cn);var Z4="navigator"in globalThis&&/Mobi|Android|iPhone/i.test(navigator.userAgent),G4="navigator"in globalThis&&"share"in navigator,F1=Object.freeze({sm:640,md:768,lg:1024,xl:1280,"2xl":1536});function z1(e){if(typeof window>"u")return!1;let t=F1[e];return typeof t!="number"?(console.warn(`Invalid breakpoint: ${e}`),!1):window.matchMedia(`(min-width: ${t}px)`).matches}function zo(){return z1("sm")}var Qi,fr,mr,_t,$n,es,Yi=class{constructor(t,r,n,i=window.history){f(this,Qi);f(this,fr);f(this,mr);f(this,_t);f(this,$n,!1);f(this,es,()=>{a(this,fr).test(window.location.pathname)&&a(this,mr).navigated()});m(this,Qi,t),m(this,fr,r),m(this,mr,n),m(this,_t,i),t.addController(this)}hostConnected(){a(this,es).call(this);let t=a(this,_t).pushState;a(this,_t).pushState=(...r)=>{if(t.call(a(this,_t),...r),!a(this,$n))try{let n=new URL(r[2],window.location.origin);a(this,fr).test(n.pathname)&&a(this,mr).navigated()}catch{}}}hostDisconnected(){m(this,$n,!0)}};Qi=new WeakMap,fr=new WeakMap,mr=new WeakMap,_t=new WeakMap,$n=new WeakMap,es=new WeakMap;function fc({minMs:e,maxMs:t}){return Math.random()*(t-e)+e}function ts(e,t=""){return Object.entries(e).filter(([r,n])=>n).map(([r,n])=>`${t}${r}-[${n}]`).join(" ")}function mc(e,t={}){return[ts(e),ts(t,"max-sm:")].join(" ")}function gc(e){return ts(e)}function yc(e){return Object.entries(e).filter(([t,r])=>r).filter(([t])=>t==="left"||t==="right").map(([t,r])=>{let n=`sm:${t}-[${r}]`;return t==="left"&&(n+=" sm:right-auto"),t==="right"&&(n+=" sm:left-auto"),n}).join(" ")}function wc(e){let t=ts(e),n=`sm:bottom-[${e.bottom?`calc(${e.bottom}+72px)`:"72px"}]`;return[t,n].filter(Boolean).join(" ")}var gr,yr,Sn,En,_n,rs,qo=class{constructor(t,r,{threshold:n=5}={}){f(this,gr,0);f(this,yr,!1);f(this,Sn);f(this,En);f(this,_n,()=>{a(this,yr)||(requestAnimationFrame(a(this,rs)),m(this,yr,!0))});f(this,rs,()=>{let t=window.scrollY,r=t-a(this,gr);if(Math.abs(r)>=a(this,En)){let n=r>0?"down":"up";a(this,Sn).call(this,{scrollY:t,direction:n,deltaY:Math.abs(r)}),m(this,gr,t)}m(this,yr,!1)});m(this,Sn,r),m(this,En,n),t.addController(this)}hostConnected(){m(this,gr,window.scrollY),window.addEventListener("scroll",a(this,_n),{passive:!0})}hostDisconnected(){window.removeEventListener("scroll",a(this,_n))}};gr=new WeakMap,yr=new WeakMap,Sn=new WeakMap,En=new WeakMap,_n=new WeakMap,rs=new WeakMap;function vc(e,t,r){return new qo(e,t,r)}var ns,Yo,An,Qo,V,Be,is,O,Wo,Zo,Mn,Mt,Go,xc,bc,kc,ss,Jo,Ko,Xo,At,Se=class extends I(_){constructor(){super();f(this,O);f(this,ns,new Ke(this,{onError:console.error}));f(this,Yo,vc(this,r=>{a(this,O,Zo)&&!a(this,V)&&(r.direction==="down"?this._floatingInputVisible=!1:r.direction==="up"&&(this._floatingInputVisible=!0),this.requestUpdate())},{threshold:20}));f(this,An);f(this,Qo,new Yi(this,/.*/i,{navigated:()=>{if(!this.widgetId){console.warn("No widgetId set, cannot track page view");return}let r=a(this,O,Mt)?.conversationId,n=Ft.restore(this.widgetId)?.conversationId,i=r||n;i&&F("ShopAssistant: pageview",{widgetId:this.widgetId,conversationId:i,url:document.location.href,title:document.title,hidden:this.config?this.config.hidden||!1:void 0})}}));f(this,V,!1);f(this,Be,!1);f(this,is,{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)}});f(this,ss,r=>{let n=r.detail.text,i=a(this,O,Go);i&&typeof i.connect=="function"&&i.connect(),m(this,V,!0),m(this,Be,!0),this.requestUpdate(),y(this,O,At).call(this,!0),setTimeout(()=>{y(this,O,Xo).call(this,n),y(this,O,Ko).call(this,n).catch(console.warn)},100),F("ShopAssistant: user sent input",{widgetId:this.widgetId,text:n,example:!1,conversationId:a(this,O,Mt)?.conversationId||"",source:"ask-ai"})});this.cdn="https://widget.molin.ai",this.widgetId="",this._floatingInputVisible=!0,this.xUserData=Xe()?.userData,this.xCustomInstructions=Xe()?.customInstructions}get config(){return a(this,An)||a(this,ns).data}render(){if(!this.config)return A;let r=mc(this.config.bubble.position,this.config.bubble.mobilePosition),n=gc(this.config.bubble.position),i=yc(this.config.bubble.position),s=wc(this.config.bubble.position);return this.config.hidden?A:Ki().hidden?A:d`
|
|
1908
1938
|
<mw-context-widget
|
|
1909
1939
|
.widgetId="${this.widgetId}"
|
|
1910
1940
|
.config="${this.config}"
|
|
@@ -1930,13 +1960,13 @@ var $c=Object.defineProperty;var ea=e=>{throw TypeError(e)};var Sc=(e,t,r)=>t in
|
|
|
1930
1960
|
sound="${this.config.popup?.muteSounds?"":"https://assets.molinai.io/2024/widget-v20241209/popup.aac"}"
|
|
1931
1961
|
.content="${{desktop:{text:this.config.popup?.text||"Hello there. How can we help?",color:this.config?.bubble?.color||this.config.color},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}}}"
|
|
1932
1962
|
@mw:click="${y(this,O,xc)}"></mw-popup>
|
|
1933
|
-
`:
|
|
1963
|
+
`:A}
|
|
1934
1964
|
|
|
1935
1965
|
<!-- show "Try it out" if enabled (even if the chat window is showing) -->
|
|
1936
1966
|
${this.config?.tryItOut?.mobileEnabled||this.config?.tryItOut?.desktopEnabled?d`<mw-try-it-out
|
|
1937
1967
|
class="${this.config?.tryItOut?.mobileEnabled?"visible":"invisible"} ${this.config?.tryItOut?.desktopEnabled?"sm:visible":"sm:invisible"}"
|
|
1938
1968
|
position="${n}"
|
|
1939
|
-
text="${this.config.tryItOut?.text||""}"></mw-try-it-out>`:
|
|
1969
|
+
text="${this.config.tryItOut?.text||""}"></mw-try-it-out>`:A}
|
|
1940
1970
|
|
|
1941
1971
|
<!-- 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. -->
|
|
1942
1972
|
<div
|
|
@@ -1955,9 +1985,9 @@ var $c=Object.defineProperty;var ea=e=>{throw TypeError(e)};var Sc=(e,t,r)=>t in
|
|
|
1955
1985
|
class="${!a(this,V)&&this._floatingInputVisible?"opacity-100 translate-y-0":"opacity-0 translate-y-full"} fixed left-1/2 z-[${a(this,O,Wo)}] hidden -translate-x-1/2 transition-all duration-300 ease-in-out max-md:hidden sm:block"
|
|
1956
1986
|
style="bottom: ${this.config.bubble.position.bottom||"1.5rem"}"
|
|
1957
1987
|
@mw-floating-ask-ai:submit="${a(this,ss)}"></mw-floating-ask-ai>
|
|
1958
|
-
`:
|
|
1988
|
+
`:A}
|
|
1959
1989
|
</mw-context-widget>
|
|
1960
|
-
`}get isPopupEnabled(){return zo()?!!this.config?.popup?.desktopEnabled:!!this.config?.popup?.mobileEnabled}updated(){a(this,V)&&a(this,O,
|
|
1990
|
+
`}get isPopupEnabled(){return zo()?!!this.config?.popup?.desktopEnabled:!!this.config?.popup?.mobileEnabled}updated(){a(this,V)&&a(this,O,Mn)?.hide()}firstUpdated(){zo()&&fe.molin_widget_open_state?.isOpen&&!a(this,V)&&(m(this,V,!0),m(this,Be,!0),this.requestUpdate())}openChat({message:r,autoSend:n=!1}={}){if(a(this,V)){y(this,O,Jo).call(this,{message:r,autoSend:n});return}let i=a(this,O,Go);i&&typeof i.connect=="function"&&i.connect(),m(this,V,!0),m(this,Be,!0),this.requestUpdate(),y(this,O,At).call(this,!0),a(this,O,Mn)?.hide(),setTimeout(()=>{y(this,O,Jo).call(this,{message:r,autoSend:n})},200),F("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"programmatic-method",state:a(this,V)?"open":"close"})}closeChat(){a(this,V)&&(m(this,V,!1),this._floatingInputVisible=!0,this.requestUpdate(),y(this,O,At).call(this,!1),a(this,O,Mn)?.hide(),F("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"programmatic-method",state:a(this,V)?"open":"close"}))}showLauncher(){let r=Ki();r.hidden=!1,this.requestUpdate(),F("ShopAssistant: called show launcher",{widgetId:this.widgetId,source:"programmatic-method"})}hideLauncher(){let r=Ki();r.hidden=!0,this.requestUpdate(),F("ShopAssistant: called hide launcher",{widgetId:this.widgetId,source:"programmatic-method"})}injectConfig(r){m(this,An,r),this.requestUpdate()}reset(){this.xUserData={},this.xCustomInstructions="",a(this,O,Mt)?.reset(),this.requestUpdate()}};ns=new WeakMap,Yo=new WeakMap,An=new WeakMap,Qo=new WeakMap,V=new WeakMap,Be=new WeakMap,is=new WeakMap,O=new WeakSet,Wo=function(){return typeof this.config?.bubble?.zIndex=="number"?this.config.bubble.zIndex:2147483647},Zo=function(){return this.config?.floatingAskAI?.enabled||!0},Mn=function(){return this.renderRoot.querySelector("mw-popup")},Mt=function(){return this.renderRoot.querySelector("mw-chat")},Go=function(){return this.renderRoot.querySelector("mw-context-widget")},xc=function(){m(this,V,!0),m(this,Be,!0),this.requestUpdate(),y(this,O,At).call(this,!0),F("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"popup-click",state:a(this,V)?"open":"close"})},bc=function(){m(this,V,!a(this,V)),m(this,Be,!0),this.requestUpdate(),y(this,O,At).call(this,a(this,V)),a(this,O,Mn)?.hide(),F("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"bubble-toggle",state:a(this,V)?"open":"close"})},kc=function(){m(this,V,!1),this._floatingInputVisible=!0,this.requestUpdate(),y(this,O,At).call(this,!1),F("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"top-right-close-button",state:a(this,V)?"open":"close"})},ss=new WeakMap,Jo=function({message:r,autoSend:n=!1}={}){if(!r)return;y(this,O,Xo).call(this,r);let i=a(this,O,Mt)?.isLiveMode;i||this.reset(),n&&!i&&y(this,O,Ko).call(this,r).catch(console.warn)},Ko=async function(r){let n=a(this,O,Mt);if(!n){console.warn("Chat element not found, cannot send message");return}n.sendMessage?await n.sendMessage(r):console.warn("Chat element does not have sendMessage method")},Xo=function(r){let n=a(this,O,Mt);if(!n){console.warn("Chat element not found, cannot set input value");return}n.setInputValue?n.setInputValue(r):console.warn("Chat element does not have setInputValue method")},At=function(r){fe.molin_widget_open_state={isOpen:r}},g(Se,"styles",ie`
|
|
1961
1991
|
:host {
|
|
1962
1992
|
all: initial; /* reset all properties that can pierce the shadow DOM */
|
|
1963
1993
|
}
|