@molin.ai/shop-ai 0.9.53 → 0.9.54
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 +81 -76
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDescriptor;var Ya=Object.getOwnPropertyNames;var Qa=Object.getPrototypeOf,el=Object.prototype.hasOwnProperty;var ze=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var tl=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Ya(e))!el.call(t,n)&&n!==r&&ts(t,n,{get:()=>e[n],enumerable:!(i=Xa(e,n))||i.enumerable});return t};var ai=(t,e,r)=>(r=t!=null?Ka(Qa(t)):{},tl(e||!t||!t.__esModule?ts(r,"default",{value:t,enumerable:!0}):r,t));var Ti=ze(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.parseCookie=Ls;ae.parse=Ls;ae.stringifyCookie=Al;ae.stringifySetCookie=dr;ae.serialize=dr;ae.parseSetCookie=Dl;ae.stringifySetCookie=dr;ae.serialize=dr;var Ds=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,js=/^[\u0021-\u003A\u003C-\u007E]*$/,Sl=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,$l=/^[\u0020-\u003A\u003D-\u007E]*$/,El=/^-?\d+$/,Ml=Object.prototype.toString,Il=(()=>{let t=function(){};return t.prototype=Object.create(null),t})();function Ls(t,e){let r=new Il,i=t.length;if(i<2)return r;let n=e?.decode||Ts,s=0;do{let o=Li(t,s,i);if(o===-1)break;let a=ji(t,s,i);if(o>a){s=t.lastIndexOf(";",o-1)+1;continue}let l=be(t,s,o);r[l]===void 0&&(r[l]=n(be(t,o+1,a))),s=a+1}while(s<i);return r}function Al(t,e){let r=e?.encode||encodeURIComponent,i=[];for(let n of Object.keys(t)){let s=t[n];if(s===void 0)continue;if(!Ds.test(n))throw new TypeError(`cookie name is invalid: ${n}`);let o=r(s);if(!js.test(o))throw new TypeError(`cookie val is invalid: ${s}`);i.push(`${n}=${o}`)}return i.join("; ")}function dr(t,e,r){let i=typeof t=="object"?t:{...r,name:t,value:String(e)},s=(typeof e=="object"?e:r)?.encode||encodeURIComponent;if(!Ds.test(i.name))throw new TypeError(`argument name is invalid: ${i.name}`);let o=i.value?s(i.value):"";if(!js.test(o))throw new TypeError(`argument val is invalid: ${i.value}`);let a=i.name+"="+o;if(i.maxAge!==void 0){if(!Number.isInteger(i.maxAge))throw new TypeError(`option maxAge is invalid: ${i.maxAge}`);a+="; Max-Age="+i.maxAge}if(i.domain){if(!Sl.test(i.domain))throw new TypeError(`option domain is invalid: ${i.domain}`);a+="; Domain="+i.domain}if(i.path){if(!$l.test(i.path))throw new TypeError(`option path is invalid: ${i.path}`);a+="; Path="+i.path}if(i.expires){if(!jl(i.expires)||!Number.isFinite(i.expires.valueOf()))throw new TypeError(`option expires is invalid: ${i.expires}`);a+="; Expires="+i.expires.toUTCString()}if(i.httpOnly&&(a+="; HttpOnly"),i.secure&&(a+="; Secure"),i.partitioned&&(a+="; Partitioned"),i.priority)switch(typeof i.priority=="string"?i.priority.toLowerCase():void 0){case"low":a+="; Priority=Low";break;case"medium":a+="; Priority=Medium";break;case"high":a+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${i.priority}`)}if(i.sameSite)switch(typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite){case!0:case"strict":a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"none":a+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${i.sameSite}`)}return a}function Dl(t,e){let r=e?.decode||Ts,i=t.length,n=ji(t,0,i),s=Li(t,0,n),o=s===-1?{name:"",value:r(be(t,0,n))}:{name:be(t,0,s),value:r(be(t,s+1,n))},a=n+1;for(;a<i;){let l=ji(t,a,i),c=Li(t,a,l),d=c===-1?be(t,a,l):be(t,a,c),h=c===-1?void 0:be(t,c+1,l);switch(d.toLowerCase()){case"httponly":o.httpOnly=!0;break;case"secure":o.secure=!0;break;case"partitioned":o.partitioned=!0;break;case"domain":o.domain=h;break;case"path":o.path=h;break;case"max-age":h&&El.test(h)&&(o.maxAge=Number(h));break;case"expires":if(!h)break;let f=new Date(h);Number.isFinite(f.valueOf())&&(o.expires=f);break;case"priority":if(!h)break;let g=h.toLowerCase();(g==="low"||g==="medium"||g==="high")&&(o.priority=g);break;case"samesite":if(!h)break;let p=h.toLowerCase();(p==="lax"||p==="strict"||p==="none")&&(o.sameSite=p);break}a=l+1}return o}function ji(t,e,r){let i=t.indexOf(";",e);return i===-1?r:i}function Li(t,e,r){let i=t.indexOf("=",e);return i<r?i:-1}function be(t,e,r){let i=e,n=r;do{let s=t.charCodeAt(i);if(s!==32&&s!==9)break}while(++i<n);for(;n>i;){let s=t.charCodeAt(n-1);if(s!==32&&s!==9)break;n--}return t.slice(i,n)}function Ts(t){if(t.indexOf("%")===-1)return t;try{return decodeURIComponent(t)}catch{return t}}function jl(t){return Ml.call(t)==="[object Date]"}});var qo=ze(Re=>{"use strict";var Dc=Re&&Re.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(h){o(h)}}function l(d){try{c(i.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(t,e||[])).next())})},jc=Re&&Re.__generator||function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(d){return l([c,d])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(r=0)),r;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(d){c=[6,d],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(Re,"__esModule",{value:!0});Re.base64ToBlob=Lc;function Lc(t){return Dc(this,void 0,void 0,function(){var e,r,i;return jc(this,function(n){switch(n.label){case 0:return[4,fetch(t)];case 1:return e=n.sent(),[4,e.blob()];case 2:return r=n.sent(),i=Oc(t),i&&(r=r.slice(0,r.size,i)),[2,r]}})})}var Tc=/^data:(.+);base64,/;function Oc(t){var e;return(e=t.match(Tc))===null||e===void 0?void 0:e.slice(1,2).pop()}});var Vo=ze(Be=>{"use strict";var Uc=Be&&Be.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(h){o(h)}}function l(d){try{c(i.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(t,e||[])).next())})},Pc=Be&&Be.__generator||function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(d){return l([c,d])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(r=0)),r;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(d){c=[6,d],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(Be,"__esModule",{value:!0});Be.base64ToFile=Rc;function Rc(t,e,r){return Uc(this,void 0,void 0,function(){var i,n;return Pc(this,function(s){switch(s.label){case 0:return[4,fetch(t)];case 1:return i=s.sent(),[4,i.blob()];case 2:return n=s.sent(),[2,new File([n],e,r)]}})})}});var gn=ze(Fe=>{"use strict";var fn=Fe&&Fe.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(h){o(h)}}function l(d){try{c(i.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(t,e||[])).next())})},mn=Fe&&Fe.__generator||function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(d){return l([c,d])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(r=0)),r;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(d){c=[6,d],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(Fe,"__esModule",{value:!0});Fe.blobToBase64=Bc;function Bc(t){return fn(this,void 0,void 0,function(){return mn(this,function(e){return[2,typeof FileReader=="function"?Fc(t):Vc(t)]})})}var ot;(function(t){t.error="error",t.loadend="loadend"})(ot||(ot={}));function Fc(t){return fn(this,void 0,void 0,function(){return mn(this,function(e){return[2,new Promise(function(r,i){try{var n=new FileReader,s=function(){r(n.result),n.removeEventListener(ot.loadend,s)};n.addEventListener(ot.loadend,s);var o=function(){i(n.error),n.removeEventListener(ot.error,o)};n.addEventListener(ot.error,o),n.readAsDataURL(t)}catch(a){i(a)}})]})})}var qc="application/octet-stream";function Vc(t){return fn(this,void 0,void 0,function(){var e,r,i,n;return mn(this,function(s){switch(s.label){case 0:return i=(r=Buffer).from,[4,t.text()];case 1:return e=i.apply(r,[s.sent()]),n=t.type||qc,[2,"data:".concat(n,";base64,").concat(e.toString("base64"))]}})})}});var No=ze(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.fileToBase64=void 0;var Nc=gn();Object.defineProperty(Lr,"fileToBase64",{enumerable:!0,get:function(){return Nc.blobToBase64}})});var Ho=ze(ce=>{"use strict";var Hc=ce&&ce.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),Tr=ce&&ce.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Hc(e,t,r)};Object.defineProperty(ce,"__esModule",{value:!0});Tr(qo(),ce);Tr(Vo(),ce);Tr(gn(),ce);Tr(No(),ce)});var Jt=globalThis,Kt=Jt.ShadowRoot&&(Jt.ShadyCSS===void 0||Jt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,li=Symbol(),rs=new WeakMap,vt=class{constructor(e,r,i){if(this._$cssResult$=!0,i!==li)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=r}get styleSheet(){let e=this.o,r=this.t;if(Kt&&e===void 0){let i=r!==void 0&&r.length===1;i&&(e=rs.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&rs.set(r,e))}return e}toString(){return this.cssText}},is=t=>new vt(typeof t=="string"?t:t+"",void 0,li),O=(t,...e)=>{let r=t.length===1?t[0]:e.reduce(((i,n,s)=>i+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[s+1]),t[0]);return new vt(r,t,li)},ns=(t,e)=>{if(Kt)t.adoptedStyleSheets=e.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of e){let i=document.createElement("style"),n=Jt.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,t.appendChild(i)}},ci=Kt?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let i of e.cssRules)r+=i.cssText;return is(r)})(t):t;var{is:rl,defineProperty:il,getOwnPropertyDescriptor:nl,getOwnPropertyNames:sl,getOwnPropertySymbols:ol,getPrototypeOf:al}=Object,Xt=globalThis,ss=Xt.trustedTypes,ll=ss?ss.emptyScript:"",cl=Xt.reactiveElementPolyfillSupport,bt=(t,e)=>t,ui={toAttribute(t,e){switch(e){case Boolean:t=t?ll:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch{r=null}}return r}},as=(t,e)=>!rl(t,e),os={attribute:!0,type:String,converter:ui,reflect:!1,useDefault:!1,hasChanged:as};Symbol.metadata??=Symbol("metadata"),Xt.litPropertyMetadata??=new WeakMap;var pe=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,r=os){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(e,r),!r.noAccessor){let i=Symbol(),n=this.getPropertyDescriptor(e,i,r);n!==void 0&&il(this.prototype,e,n)}}static getPropertyDescriptor(e,r,i){let{get:n,set:s}=nl(this.prototype,e)??{get(){return this[r]},set(o){this[r]=o}};return{get:n,set(o){let a=n?.call(this);s?.call(this,o),this.requestUpdate(e,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??os}static _$Ei(){if(this.hasOwnProperty(bt("elementProperties")))return;let e=al(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(bt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(bt("properties"))){let r=this.properties,i=[...sl(r),...ol(r)];for(let n of i)this.createProperty(n,r[n])}let e=this[Symbol.metadata];if(e!==null){let r=litPropertyMetadata.get(e);if(r!==void 0)for(let[i,n]of r)this.elementProperties.set(i,n)}this._$Eh=new Map;for(let[r,i]of this.elementProperties){let n=this._$Eu(r,i);n!==void 0&&this._$Eh.set(n,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let r=[];if(Array.isArray(e)){let i=new Set(e.flat(1/0).reverse());for(let n of i)r.unshift(ci(n))}else e!==void 0&&r.push(ci(e));return r}static _$Eu(e,r){let i=r.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,r=this.constructor.elementProperties;for(let i of r.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ns(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,r,i){this._$AK(e,i)}_$ET(e,r){let i=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,i);if(n!==void 0&&i.reflect===!0){let s=(i.converter?.toAttribute!==void 0?i.converter:ui).toAttribute(r,i.type);this._$Em=e,s==null?this.removeAttribute(n):this.setAttribute(n,s),this._$Em=null}}_$AK(e,r){let i=this.constructor,n=i._$Eh.get(e);if(n!==void 0&&this._$Em!==n){let s=i.getPropertyOptions(n),o=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:ui;this._$Em=n;let a=o.fromAttribute(r,s.type);this[n]=a??this._$Ej?.get(n)??a,this._$Em=null}}requestUpdate(e,r,i){if(e!==void 0){let n=this.constructor,s=this[e];if(i??=n.getPropertyOptions(e),!((i.hasChanged??as)(s,r)||i.useDefault&&i.reflect&&s===this._$Ej?.get(e)&&!this.hasAttribute(n._$Eu(e,i))))return;this.C(e,r,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,r,{useDefault:i,reflect:n,wrapped:s},o){i&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??r??this[e]),s!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||i||(r=void 0),this._$AL.set(e,r)),n===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[n,s]of this._$Ep)this[n]=s;this._$Ep=void 0}let i=this.constructor.elementProperties;if(i.size>0)for(let[n,s]of i){let{wrapped:o}=s,a=this[n];o!==!0||this._$AL.has(n)||a===void 0||this.C(n,void 0,s,a)}}let e=!1,r=this._$AL;try{e=this.shouldUpdate(r),e?(this.willUpdate(r),this._$EO?.forEach((i=>i.hostUpdate?.())),this.update(r)):this._$EM()}catch(i){throw e=!1,this._$EM(),i}e&&this._$AE(r)}willUpdate(e){}_$AE(e){this._$EO?.forEach((r=>r.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((r=>this._$ET(r,this[r]))),this._$EM()}updated(e){}firstUpdated(e){}};pe.elementStyles=[],pe.shadowRootOptions={mode:"open"},pe[bt("elementProperties")]=new Map,pe[bt("finalized")]=new Map,cl?.({ReactiveElement:pe}),(Xt.reactiveElementVersions??=[]).push("2.1.1");var hi=globalThis,Yt=hi.trustedTypes,ls=Yt?Yt.createPolicy("lit-html",{createHTML:t=>t}):void 0,pi="$lit$",fe=`lit$${Math.random().toFixed(9).slice(2)}$`,fi="?"+fe,ul=`<${fi}>`,De=document,kt=()=>De.createComment(""),Ct=t=>t===null||typeof t!="object"&&typeof t!="function",mi=Array.isArray,fs=t=>mi(t)||typeof t?.[Symbol.iterator]=="function",di=`[
|
|
2
|
-
\f\r]`,xt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
1
|
+
var el=Object.create;var rs=Object.defineProperty;var tl=Object.getOwnPropertyDescriptor;var rl=Object.getOwnPropertyNames;var il=Object.getPrototypeOf,nl=Object.prototype.hasOwnProperty;var ze=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var sl=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of rl(e))!nl.call(t,n)&&n!==r&&rs(t,n,{get:()=>e[n],enumerable:!(i=tl(e,n))||i.enumerable});return t};var li=(t,e,r)=>(r=t!=null?el(il(t)):{},sl(e||!t||!t.__esModule?rs(r,"default",{value:t,enumerable:!0}):r,t));var Oi=ze(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.parseCookie=Os;ae.parse=Os;ae.stringifyCookie=Tl;ae.stringifySetCookie=dr;ae.serialize=dr;ae.parseSetCookie=Ol;ae.stringifySetCookie=dr;ae.serialize=dr;var js=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,Ts=/^[\u0021-\u003A\u003C-\u007E]*$/,Il=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,Al=/^[\u0020-\u003A\u003D-\u007E]*$/,Dl=/^-?\d+$/,Ll=Object.prototype.toString,jl=(()=>{let t=function(){};return t.prototype=Object.create(null),t})();function Os(t,e){let r=new jl,i=t.length;if(i<2)return r;let n=e?.decode||Us,s=0;do{let o=Ti(t,s,i);if(o===-1)break;let a=ji(t,s,i);if(o>a){s=t.lastIndexOf(";",o-1)+1;continue}let l=be(t,s,o);r[l]===void 0&&(r[l]=n(be(t,o+1,a))),s=a+1}while(s<i);return r}function Tl(t,e){let r=e?.encode||encodeURIComponent,i=[];for(let n of Object.keys(t)){let s=t[n];if(s===void 0)continue;if(!js.test(n))throw new TypeError(`cookie name is invalid: ${n}`);let o=r(s);if(!Ts.test(o))throw new TypeError(`cookie val is invalid: ${s}`);i.push(`${n}=${o}`)}return i.join("; ")}function dr(t,e,r){let i=typeof t=="object"?t:{...r,name:t,value:String(e)},s=(typeof e=="object"?e:r)?.encode||encodeURIComponent;if(!js.test(i.name))throw new TypeError(`argument name is invalid: ${i.name}`);let o=i.value?s(i.value):"";if(!Ts.test(o))throw new TypeError(`argument val is invalid: ${i.value}`);let a=i.name+"="+o;if(i.maxAge!==void 0){if(!Number.isInteger(i.maxAge))throw new TypeError(`option maxAge is invalid: ${i.maxAge}`);a+="; Max-Age="+i.maxAge}if(i.domain){if(!Il.test(i.domain))throw new TypeError(`option domain is invalid: ${i.domain}`);a+="; Domain="+i.domain}if(i.path){if(!Al.test(i.path))throw new TypeError(`option path is invalid: ${i.path}`);a+="; Path="+i.path}if(i.expires){if(!Ul(i.expires)||!Number.isFinite(i.expires.valueOf()))throw new TypeError(`option expires is invalid: ${i.expires}`);a+="; Expires="+i.expires.toUTCString()}if(i.httpOnly&&(a+="; HttpOnly"),i.secure&&(a+="; Secure"),i.partitioned&&(a+="; Partitioned"),i.priority)switch(typeof i.priority=="string"?i.priority.toLowerCase():void 0){case"low":a+="; Priority=Low";break;case"medium":a+="; Priority=Medium";break;case"high":a+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${i.priority}`)}if(i.sameSite)switch(typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite){case!0:case"strict":a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"none":a+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${i.sameSite}`)}return a}function Ol(t,e){let r=e?.decode||Us,i=t.length,n=ji(t,0,i),s=Ti(t,0,n),o=s===-1?{name:"",value:r(be(t,0,n))}:{name:be(t,0,s),value:r(be(t,s+1,n))},a=n+1;for(;a<i;){let l=ji(t,a,i),c=Ti(t,a,l),d=c===-1?be(t,a,l):be(t,a,c),h=c===-1?void 0:be(t,c+1,l);switch(d.toLowerCase()){case"httponly":o.httpOnly=!0;break;case"secure":o.secure=!0;break;case"partitioned":o.partitioned=!0;break;case"domain":o.domain=h;break;case"path":o.path=h;break;case"max-age":h&&Dl.test(h)&&(o.maxAge=Number(h));break;case"expires":if(!h)break;let f=new Date(h);Number.isFinite(f.valueOf())&&(o.expires=f);break;case"priority":if(!h)break;let g=h.toLowerCase();(g==="low"||g==="medium"||g==="high")&&(o.priority=g);break;case"samesite":if(!h)break;let p=h.toLowerCase();(p==="lax"||p==="strict"||p==="none")&&(o.sameSite=p);break}a=l+1}return o}function ji(t,e,r){let i=t.indexOf(";",e);return i===-1?r:i}function Ti(t,e,r){let i=t.indexOf("=",e);return i<r?i:-1}function be(t,e,r){let i=e,n=r;do{let s=t.charCodeAt(i);if(s!==32&&s!==9)break}while(++i<n);for(;n>i;){let s=t.charCodeAt(n-1);if(s!==32&&s!==9)break;n--}return t.slice(i,n)}function Us(t){if(t.indexOf("%")===-1)return t;try{return decodeURIComponent(t)}catch{return t}}function Ul(t){return Ll.call(t)==="[object Date]"}});var Ho=ze(Re=>{"use strict";var Oc=Re&&Re.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(h){o(h)}}function l(d){try{c(i.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(t,e||[])).next())})},Uc=Re&&Re.__generator||function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(d){return l([c,d])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(r=0)),r;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(d){c=[6,d],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(Re,"__esModule",{value:!0});Re.base64ToBlob=Pc;function Pc(t){return Oc(this,void 0,void 0,function(){var e,r,i;return Uc(this,function(n){switch(n.label){case 0:return[4,fetch(t)];case 1:return e=n.sent(),[4,e.blob()];case 2:return r=n.sent(),i=Bc(t),i&&(r=r.slice(0,r.size,i)),[2,r]}})})}var Rc=/^data:(.+);base64,/;function Bc(t){var e;return(e=t.match(Rc))===null||e===void 0?void 0:e.slice(1,2).pop()}});var zo=ze(Be=>{"use strict";var Fc=Be&&Be.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(h){o(h)}}function l(d){try{c(i.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(t,e||[])).next())})},qc=Be&&Be.__generator||function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(d){return l([c,d])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(r=0)),r;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(d){c=[6,d],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(Be,"__esModule",{value:!0});Be.base64ToFile=Vc;function Vc(t,e,r){return Fc(this,void 0,void 0,function(){var i,n;return qc(this,function(s){switch(s.label){case 0:return[4,fetch(t)];case 1:return i=s.sent(),[4,i.blob()];case 2:return n=s.sent(),[2,new File([n],e,r)]}})})}});var wn=ze(Fe=>{"use strict";var mn=Fe&&Fe.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(h){o(h)}}function l(d){try{c(i.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(t,e||[])).next())})},gn=Fe&&Fe.__generator||function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(d){return l([c,d])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(r=0)),r;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(d){c=[6,d],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(Fe,"__esModule",{value:!0});Fe.blobToBase64=Nc;function Nc(t){return mn(this,void 0,void 0,function(){return gn(this,function(e){return[2,typeof FileReader=="function"?Hc(t):Wc(t)]})})}var ot;(function(t){t.error="error",t.loadend="loadend"})(ot||(ot={}));function Hc(t){return mn(this,void 0,void 0,function(){return gn(this,function(e){return[2,new Promise(function(r,i){try{var n=new FileReader,s=function(){r(n.result),n.removeEventListener(ot.loadend,s)};n.addEventListener(ot.loadend,s);var o=function(){i(n.error),n.removeEventListener(ot.error,o)};n.addEventListener(ot.error,o),n.readAsDataURL(t)}catch(a){i(a)}})]})})}var zc="application/octet-stream";function Wc(t){return mn(this,void 0,void 0,function(){var e,r,i,n;return gn(this,function(s){switch(s.label){case 0:return i=(r=Buffer).from,[4,t.text()];case 1:return e=i.apply(r,[s.sent()]),n=t.type||zc,[2,"data:".concat(n,";base64,").concat(e.toString("base64"))]}})})}});var Wo=ze(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.fileToBase64=void 0;var Gc=wn();Object.defineProperty(jr,"fileToBase64",{enumerable:!0,get:function(){return Gc.blobToBase64}})});var Go=ze(ce=>{"use strict";var Zc=ce&&ce.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),Tr=ce&&ce.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Zc(e,t,r)};Object.defineProperty(ce,"__esModule",{value:!0});Tr(Ho(),ce);Tr(zo(),ce);Tr(wn(),ce);Tr(Wo(),ce)});var Kt=globalThis,Jt=Kt.ShadowRoot&&(Kt.ShadyCSS===void 0||Kt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ci=Symbol(),is=new WeakMap,vt=class{constructor(e,r,i){if(this._$cssResult$=!0,i!==ci)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=r}get styleSheet(){let e=this.o,r=this.t;if(Jt&&e===void 0){let i=r!==void 0&&r.length===1;i&&(e=is.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&is.set(r,e))}return e}toString(){return this.cssText}},ns=t=>new vt(typeof t=="string"?t:t+"",void 0,ci),O=(t,...e)=>{let r=t.length===1?t[0]:e.reduce((i,n,s)=>i+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[s+1],t[0]);return new vt(r,t,ci)},ss=(t,e)=>{if(Jt)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let i=document.createElement("style"),n=Kt.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,t.appendChild(i)}},ui=Jt?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let i of e.cssRules)r+=i.cssText;return ns(r)})(t):t;var{is:ol,defineProperty:al,getOwnPropertyDescriptor:ll,getOwnPropertyNames:cl,getOwnPropertySymbols:ul,getPrototypeOf:dl}=Object,Xt=globalThis,os=Xt.trustedTypes,hl=os?os.emptyScript:"",pl=Xt.reactiveElementPolyfillSupport,bt=(t,e)=>t,di={toAttribute(t,e){switch(e){case Boolean:t=t?hl:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch{r=null}}return r}},ls=(t,e)=>!ol(t,e),as={attribute:!0,type:String,converter:di,reflect:!1,useDefault:!1,hasChanged:ls};Symbol.metadata??=Symbol("metadata"),Xt.litPropertyMetadata??=new WeakMap;var pe=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,r=as){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(e,r),!r.noAccessor){let i=Symbol(),n=this.getPropertyDescriptor(e,i,r);n!==void 0&&al(this.prototype,e,n)}}static getPropertyDescriptor(e,r,i){let{get:n,set:s}=ll(this.prototype,e)??{get(){return this[r]},set(o){this[r]=o}};return{get:n,set(o){let a=n?.call(this);s?.call(this,o),this.requestUpdate(e,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??as}static _$Ei(){if(this.hasOwnProperty(bt("elementProperties")))return;let e=dl(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(bt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(bt("properties"))){let r=this.properties,i=[...cl(r),...ul(r)];for(let n of i)this.createProperty(n,r[n])}let e=this[Symbol.metadata];if(e!==null){let r=litPropertyMetadata.get(e);if(r!==void 0)for(let[i,n]of r)this.elementProperties.set(i,n)}this._$Eh=new Map;for(let[r,i]of this.elementProperties){let n=this._$Eu(r,i);n!==void 0&&this._$Eh.set(n,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let r=[];if(Array.isArray(e)){let i=new Set(e.flat(1/0).reverse());for(let n of i)r.unshift(ui(n))}else e!==void 0&&r.push(ui(e));return r}static _$Eu(e,r){let i=r.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,r=this.constructor.elementProperties;for(let i of r.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ss(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,r,i){this._$AK(e,i)}_$ET(e,r){let i=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,i);if(n!==void 0&&i.reflect===!0){let s=(i.converter?.toAttribute!==void 0?i.converter:di).toAttribute(r,i.type);this._$Em=e,s==null?this.removeAttribute(n):this.setAttribute(n,s),this._$Em=null}}_$AK(e,r){let i=this.constructor,n=i._$Eh.get(e);if(n!==void 0&&this._$Em!==n){let s=i.getPropertyOptions(n),o=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:di;this._$Em=n;let a=o.fromAttribute(r,s.type);this[n]=a??this._$Ej?.get(n)??a,this._$Em=null}}requestUpdate(e,r,i,n=!1,s){if(e!==void 0){let o=this.constructor;if(n===!1&&(s=this[e]),i??=o.getPropertyOptions(e),!((i.hasChanged??ls)(s,r)||i.useDefault&&i.reflect&&s===this._$Ej?.get(e)&&!this.hasAttribute(o._$Eu(e,i))))return;this.C(e,r,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,r,{useDefault:i,reflect:n,wrapped:s},o){i&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??r??this[e]),s!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||i||(r=void 0),this._$AL.set(e,r)),n===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[n,s]of this._$Ep)this[n]=s;this._$Ep=void 0}let i=this.constructor.elementProperties;if(i.size>0)for(let[n,s]of i){let{wrapped:o}=s,a=this[n];o!==!0||this._$AL.has(n)||a===void 0||this.C(n,void 0,s,a)}}let e=!1,r=this._$AL;try{e=this.shouldUpdate(r),e?(this.willUpdate(r),this._$EO?.forEach(i=>i.hostUpdate?.()),this.update(r)):this._$EM()}catch(i){throw e=!1,this._$EM(),i}e&&this._$AE(r)}willUpdate(e){}_$AE(e){this._$EO?.forEach(r=>r.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(r=>this._$ET(r,this[r])),this._$EM()}updated(e){}firstUpdated(e){}};pe.elementStyles=[],pe.shadowRootOptions={mode:"open"},pe[bt("elementProperties")]=new Map,pe[bt("finalized")]=new Map,pl?.({ReactiveElement:pe}),(Xt.reactiveElementVersions??=[]).push("2.1.2");var pi=globalThis,cs=t=>t,Yt=pi.trustedTypes,us=Yt?Yt.createPolicy("lit-html",{createHTML:t=>t}):void 0,fi="$lit$",fe=`lit$${Math.random().toFixed(9).slice(2)}$`,mi="?"+fe,fl=`<${mi}>`,De=document,kt=()=>De.createComment(""),Ct=t=>t===null||typeof t!="object"&&typeof t!="function",gi=Array.isArray,gs=t=>gi(t)||typeof t?.[Symbol.iterator]=="function",hi=`[
|
|
2
|
+
\f\r]`,xt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ds=/-->/g,hs=/>/g,Ie=RegExp(`>|${hi}(?:([^\\s"'>=/]+)(${hi}*=${hi}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),ps=/'/g,fs=/"/g,ws=/^(?:script|style|textarea|title)$/i,wi=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),u=wi(1),id=wi(2),nd=wi(3),ne=Symbol.for("lit-noChange"),U=Symbol.for("lit-nothing"),ms=new WeakMap,Ae=De.createTreeWalker(De,129);function ys(t,e){if(!gi(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return us!==void 0?us.createHTML(e):e}var vs=(t,e)=>{let r=t.length-1,i=[],n,s=e===2?"<svg>":e===3?"<math>":"",o=xt;for(let a=0;a<r;a++){let l=t[a],c,d,h=-1,f=0;for(;f<l.length&&(o.lastIndex=f,d=o.exec(l),d!==null);)f=o.lastIndex,o===xt?d[1]==="!--"?o=ds:d[1]!==void 0?o=hs:d[2]!==void 0?(ws.test(d[2])&&(n=RegExp("</"+d[2],"g")),o=Ie):d[3]!==void 0&&(o=Ie):o===Ie?d[0]===">"?(o=n??xt,h=-1):d[1]===void 0?h=-2:(h=o.lastIndex-d[2].length,c=d[1],o=d[3]===void 0?Ie:d[3]==='"'?fs:ps):o===fs||o===ps?o=Ie:o===ds||o===hs?o=xt:(o=Ie,n=void 0);let g=o===Ie&&t[a+1].startsWith("/>")?" ":"";s+=o===xt?l+fl:h>=0?(i.push(c),l.slice(0,h)+fi+l.slice(h)+fe+g):l+fe+(h===-2?a:g)}return[ys(t,s+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]},_t=class t{constructor({strings:e,_$litType$:r},i){let n;this.parts=[];let s=0,o=0,a=e.length-1,l=this.parts,[c,d]=vs(e,r);if(this.el=t.createElement(c,i),Ae.currentNode=this.el.content,r===2||r===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(n=Ae.nextNode())!==null&&l.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let h of n.getAttributeNames())if(h.endsWith(fi)){let f=d[o++],g=n.getAttribute(h).split(fe),p=/([.?@])?(.*)/.exec(f);l.push({type:1,index:s,name:p[2],strings:g,ctor:p[1]==="."?er:p[1]==="?"?tr:p[1]==="@"?rr:je}),n.removeAttribute(h)}else h.startsWith(fe)&&(l.push({type:6,index:s}),n.removeAttribute(h));if(ws.test(n.tagName)){let h=n.textContent.split(fe),f=h.length-1;if(f>0){n.textContent=Yt?Yt.emptyScript:"";for(let g=0;g<f;g++)n.append(h[g],kt()),Ae.nextNode(),l.push({type:2,index:++s});n.append(h[f],kt())}}}else if(n.nodeType===8)if(n.data===mi)l.push({type:2,index:s});else{let h=-1;for(;(h=n.data.indexOf(fe,h+1))!==-1;)l.push({type:7,index:s}),h+=fe.length-1}s++}}static createElement(e,r){let i=De.createElement("template");return i.innerHTML=e,i}};function Le(t,e,r=t,i){if(e===ne)return e;let n=i!==void 0?r._$Co?.[i]:r._$Cl,s=Ct(e)?void 0:e._$litDirective$;return n?.constructor!==s&&(n?._$AO?.(!1),s===void 0?n=void 0:(n=new s(t),n._$AT(t,r,i)),i!==void 0?(r._$Co??=[])[i]=n:r._$Cl=n),n!==void 0&&(e=Le(t,n._$AS(t,e.values),n,i)),e}var Qt=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:r},parts:i}=this._$AD,n=(e?.creationScope??De).importNode(r,!0);Ae.currentNode=n;let s=Ae.nextNode(),o=0,a=0,l=i[0];for(;l!==void 0;){if(o===l.index){let c;l.type===2?c=new We(s,s.nextSibling,this,e):l.type===1?c=new l.ctor(s,l.name,l.strings,this,e):l.type===6&&(c=new ir(s,this,e)),this._$AV.push(c),l=i[++a]}o!==l?.index&&(s=Ae.nextNode(),o++)}return Ae.currentNode=De,n}p(e){let r=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,r),r+=i.strings.length-2):i._$AI(e[r])),r++}},We=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,i,n){this.type=2,this._$AH=U,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=i,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=Le(this,e,r),Ct(e)?e===U||e==null||e===""?(this._$AH!==U&&this._$AR(),this._$AH=U):e!==this._$AH&&e!==ne&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):gs(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==U&&Ct(this._$AH)?this._$AA.nextSibling.data=e:this.T(De.createTextNode(e)),this._$AH=e}$(e){let{values:r,_$litType$:i}=e,n=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=_t.createElement(ys(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===n)this._$AH.p(r);else{let s=new Qt(n,this),o=s.u(this.options);s.p(r),this.T(o),this._$AH=s}}_$AC(e){let r=ms.get(e.strings);return r===void 0&&ms.set(e.strings,r=new _t(e)),r}k(e){gi(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,i,n=0;for(let s of e)n===r.length?r.push(i=new t(this.O(kt()),this.O(kt()),this,this.options)):i=r[n],i._$AI(s),n++;n<r.length&&(this._$AR(i&&i._$AB.nextSibling,n),r.length=n)}_$AR(e=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);e!==this._$AB;){let i=cs(e).nextSibling;cs(e).remove(),e=i}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},je=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,i,n,s){this.type=1,this._$AH=U,this._$AN=void 0,this.element=e,this.name=r,this._$AM=n,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=U}_$AI(e,r=this,i,n){let s=this.strings,o=!1;if(s===void 0)e=Le(this,e,r,0),o=!Ct(e)||e!==this._$AH&&e!==ne,o&&(this._$AH=e);else{let a=e,l,c;for(e=s[0],l=0;l<s.length-1;l++)c=Le(this,a[i+l],r,l),c===ne&&(c=this._$AH[l]),o||=!Ct(c)||c!==this._$AH[l],c===U?e=U:e!==U&&(e+=(c??"")+s[l+1]),this._$AH[l]=c}o&&!n&&this.j(e)}j(e){e===U?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},er=class extends je{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===U?void 0:e}},tr=class extends je{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==U)}},rr=class extends je{constructor(e,r,i,n,s){super(e,r,i,n,s),this.type=5}_$AI(e,r=this){if((e=Le(this,e,r,0)??U)===ne)return;let i=this._$AH,n=e===U&&i!==U||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,s=e!==U&&(i===U||n);n&&this.element.removeEventListener(this.name,this,i),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},ir=class{constructor(e,r,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){Le(this,e)}},bs={M:fi,P:fe,A:mi,C:1,L:vs,R:Qt,D:gs,V:Le,I:We,H:je,N:tr,U:rr,B:er,F:ir},ml=pi.litHtmlPolyfillSupport;ml?.(_t,We),(pi.litHtmlVersions??=[]).push("3.3.2");var xs=(t,e,r)=>{let i=r?.renderBefore??e,n=i._$litPart$;if(n===void 0){let s=r?.renderBefore??null;i._$litPart$=n=new We(e.insertBefore(kt(),s),s,void 0,r??{})}return n._$AI(t),n};var yi=globalThis,v=class extends pe{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=xs(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ne}};v._$litElement$=!0,v.finalized=!0,yi.litElementHydrateSupport?.({LitElement:v});var gl=yi.litElementPolyfillSupport;gl?.({LitElement:v});(yi.litElementVersions??=[]).push("4.2.2");var nr=class t extends HTMLElement{static observedAttributes=["name"];constructor(){super(),this.attachShadow({mode:"open"})}attributeChangedCallback(e,r,i){r!==i&&t.observedAttributes.includes(e)&&(e==="name"&&(this.name=i||""),this.render())}resolveIcon(e){throw new Error("Not implemented")}render(){let e=document.createElement("style");for(e.textContent=`
|
|
4
4
|
:host {
|
|
5
5
|
display: inline-block;
|
|
6
6
|
line-height: 0;
|
|
7
7
|
}
|
|
8
|
-
`;this.shadowRoot?.firstChild;)this.shadowRoot.removeChild(this.shadowRoot.firstChild),this.shadowRoot.appendChild(e);if(!this.name)return;let r=this.resolveIcon(this.name);if(!r){console.warn(`'${this.name}' not found, please add it to ${t.name}`);return}let s=new DOMParser().parseFromString(r,"image/svg+xml").documentElement;s.setAttribute("fill","currentColor"),s.style.width="100%",s.style.height="100%",this.shadowRoot?.appendChild(s)}name=""};var
|
|
8
|
+
`;this.shadowRoot?.firstChild;)this.shadowRoot.removeChild(this.shadowRoot.firstChild),this.shadowRoot.appendChild(e);if(!this.name)return;let r=this.resolveIcon(this.name);if(!r){console.warn(`'${this.name}' not found, please add it to ${t.name}`);return}let s=new DOMParser().parseFromString(r,"image/svg+xml").documentElement;s.setAttribute("fill","currentColor"),s.style.width="100%",s.style.height="100%",this.shadowRoot?.appendChild(s)}name=""};var ks={clock:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
9
9
|
<path d="M12 6V12H16.5M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
10
10
|
</svg>`,"arrow-path":`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
11
11
|
<path d="M16.0228 9.34841H21.0154V9.34663M2.98413 19.6444V14.6517M2.98413 14.6517L7.97677 14.6517M2.98413 14.6517L6.16502 17.8347C7.15555 18.8271 8.41261 19.58 9.86436 19.969C14.2654 21.1483 18.7892 18.5364 19.9685 14.1353M4.03073 9.86484C5.21 5.46374 9.73377 2.85194 14.1349 4.03121C15.5866 4.4202 16.8437 5.17312 17.8342 6.1655L21.0154 9.34663M21.0154 4.3558V9.34663" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -127,7 +127,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
127
127
|
<path d="M3.97993 8.22257C3.05683 9.31382 2.35242 10.596 1.93436 12.0015C3.22565 16.338 7.24311 19.5 11.9991 19.5C12.9917 19.5 13.9521 19.3623 14.8623 19.1049M6.22763 6.22763C7.88389 5.13558 9.86771 4.5 12 4.5C16.756 4.5 20.7734 7.66205 22.0647 11.9985C21.3528 14.3919 19.8106 16.4277 17.772 17.772M6.22763 6.22763L3 3M6.22763 6.22763L9.87868 9.87868M17.772 17.772L21 21M17.772 17.772L14.1213 14.1213M14.1213 14.1213C14.6642 13.5784 15 12.8284 15 12C15 10.3431 13.6569 9 12 9C11.1716 9 10.4216 9.33579 9.87868 9.87868M14.1213 14.1213L9.87868 9.87868" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
128
128
|
</svg>`,star:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
129
129
|
<path d="M11.4806 3.4987C11.6728 3.03673 12.3272 3.03673 12.5193 3.4987L14.6453 8.61016C14.7263 8.80492 14.9095 8.93799 15.1197 8.95485L20.638 9.39724C21.1367 9.43722 21.339 10.0596 20.959 10.3851L16.7546 13.9866C16.5945 14.1238 16.5245 14.3391 16.5734 14.5443L17.8579 19.9292C17.974 20.4159 17.4446 20.8005 17.0176 20.5397L12.2932 17.6541C12.1132 17.5441 11.8868 17.5441 11.7068 17.6541L6.98238 20.5397C6.55539 20.8005 6.02594 20.4159 6.14203 19.9292L7.42652 14.5443C7.47546 14.3391 7.4055 14.1238 7.24531 13.9866L3.04099 10.3851C2.661 10.0596 2.86323 9.43722 3.36197 9.39724L8.88022 8.95485C9.09048 8.93799 9.27363 8.80492 9.35464 8.61016L11.4806 3.4987Z" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
130
|
-
</svg>`};var pl=bs,yi=class extends nr{resolveIcon(e){let r=pl[e];if(!r)throw console.warn("hi-outline: icon not found",e),new Error(`Icon ${e} not found`);return r}render(){super.render();let e=this.shadowRoot?.querySelector("svg");if(!e)throw new Error("svgEl not found "+this.name);e.setAttribute("fill","none"),e.querySelectorAll("[stroke]").forEach(r=>{r.setAttribute("stroke","currentColor")})}};customElements.get("hi-outline")||customElements.define("hi-outline",yi);var sr=class{#e;#t;#r;constructor(e,r){if(!e)throw new Error("host is required");if(!r)throw new Error("config is required");this.#e=e,this.#e.addController(this),this.#t=r}connect(e){this.#t=e,this.#r=this.#i()}hostConnected(){this.#r||setTimeout(()=>{this.#r||(this.#r=this.#i())},0)}hostDisconnected(){this.#r?.close(1e3,"lit_host_disconnected"),this.#r=void 0}send(e){this.#r?.send(e)}close(e,r){this.#r?.close(e,r)}get isConnected(){return this.#r?.readyState===WebSocket.OPEN}get isConnecting(){return this.#r?.readyState===WebSocket.CONNECTING}#i(){let e=new WebSocket(this.#t.url());return this.#t.onClose&&(e.onclose=this.#t.onClose),this.#t.onOpen&&(e.onopen=this.#t.onOpen),this.#t.onError&&(e.onerror=this.#t.onError),this.#t.onMessage&&(e.onmessage=this.#t.onMessage),e}};var vi=t=>!!(t&&t.constructor&&t.call&&t.apply);var xs=t=>!(!t||!t.then||!vi(t.then));var ks=(t,e,r=!1)=>{if(!t)return[];let i=(s,o)=>e(s)-e(o),n=(s,o)=>e(o)-e(s);return t.slice().sort(r===!0?n:i)};function*bi(t,e,r=n=>n,i=1){let n=vi(r)?r:()=>r,s=e?t:0,o=e??t;for(let a=s;a<=o&&(yield n(a),!(a+i>o));a+=i);}var Cs=(t,e,r,i)=>Array.from(bi(t,e,r,i));var _s=(t,e)=>t?t.reduce((r,i)=>{let[n,s]=r;return e(i)?[[...n,i],s]:[n,[...s,i]]},[[],[]]):[[],[]];var xi=class extends Error{constructor(e=[]){super();let r=e.find(i=>i.name)?.name??"";this.name=`AggregateError(${r}...)`,this.message=`AggregateError with ${e.length} errors`,this.stack=e.find(i=>i.stack)?.stack??this.stack,this.errors=e}},ki=async(t,e,r)=>{let i=e.map((c,d)=>({index:d,item:c})),n=async c=>{let d=[];for(;;){let h=i.pop();if(!h)return c(d);let[f,g]=await or(r)(h.item);d.push({error:f,result:g,index:h.index})}},s=Cs(1,t).map(()=>new Promise(n)),o=await Promise.all(s),[a,l]=_s(ks(o.flat(),c=>c.index),c=>!!c.error);if(a.length>0)throw new xi(a.map(c=>c.error));return l.map(c=>c.result)};var Ci=async(t,e)=>{let r=t?.times??3,i=t?.delay,n=t?.backoff??null;for(let s of bi(1,r)){let[o,a]=await or(e)(l=>{throw{_exited:l}});if(!o)return a;if(o._exited)throw o._exited;if(s===r)throw o;i&&await Ge(i),n&&await Ge(n(s))}},Ge=t=>new Promise(e=>setTimeout(e,t)),or=t=>(...e)=>{try{let r=t(...e);return xs(r)?r.then(i=>[void 0,i]).catch(i=>[i,void 0]):[void 0,r]}catch(r){return[r,void 0]}};var Ze=({interval:t},e)=>{let r=!0,i,n=(...s)=>{r&&(e(...s),r=!1,i=setTimeout(()=>{r=!0,i=void 0},t))};return n.isThrottled=()=>i!==void 0,n};async function Ss(t,e){let r=t?.times??3,i=t?.delay,n=t?.backoff??null,s=o=>{throw{_bailed:o}};for(let o=0;o<r;o++)try{return await e(s,o)}catch(a){if(a&&typeof a=="object"&&"_bailed"in a)throw a._bailed;if(o===r-1)throw a;i&&await Ge(i),n&&await Ge(n(o+1))}throw new Error("unreachable")}var ml=!0,_i="Invariant failed";function D(t,e){if(!t){if(ml)throw new Error(_i);var r=typeof e=="function"?e():e,i=r?"".concat(_i,": ").concat(r):_i;throw new Error(i)}}var ar=class{#e;#t;#r=null;isStreaming=!1;typingIndicator;ranOutOfCredits=!1;messages=[];conversationId="";#i=0;#n;isLiveMode=!1;get hasQueuedMessages(){return this.#s.length>0}constructor(e,r){this.#e=e,this.#t=r,this.#t.autoConnect!==!1&&(this.#r=this.initWS()),e.addController(this)}#s=[];#o(e,{expectStreaming:r=!1}={}){return this.ranOutOfCredits?!1:this.#r?this.#r.isConnecting?(console.warn("WebSocket is connecting, message not sent",e),!1):this.#r.isConnected?(r&&!this.isLiveMode&&(this.isStreaming=!0,this.#e.requestUpdate()),this.#r.send(JSON.stringify(e)),!0):(console.warn("WebSocket is not connected, message not sent",e),this.retry(),!1):(console.warn("WebSocket not initialized, message not sent",e),this.connect(),!1)}async enqueueMessage(e,{expectStreaming:r=!1}={}){if(this.#s.length>0){let i=this.#s[this.#s.length-1];if(e.type==="USER_INPUT"&&i.message.type==="USER_INPUT"&&e.value===i.message.value)return!0}return this.#r||this.connect(),this.#r?.isConnected?this.#o(e,{expectStreaming:r}):(this.#s.push({message:e,options:{expectStreaming:r}}),this.#e.requestUpdate(),this.#r&&!this.#r.isConnecting&&!this.#r.isConnected&&this.retry(),await Ss({times:5,delay:2e3},async()=>{if(this.#r?.isConnected){let i=[...this.#s];this.#s=[],this.#e.requestUpdate();let n=!1;for(let{message:s,options:o}of i){let a=this.#o(s,o);s===e&&(n=a)}return n}else throw new Error("WebSocket not connected yet")}).catch(()=>(console.warn("Failed to send message after retries",e),this.#s=[],this.#e.requestUpdate(),!1)))}async sendUserInput(e,{xUserData:r,xCustomInstructions:i,role:n="user",expectStreaming:s=!1,requestInputResponse:o}={}){return this.enqueueMessage({type:"USER_INPUT",value:e,role:n,xUserData:r,xCustomInstructions:i,requestInputResponse:o},{expectStreaming:s})}async enqueueUserInput(e,{xUserData:r,xCustomInstructions:i,role:n="user",expectStreaming:s=!1,requestInputResponse:o}={}){return this.enqueueMessage({type:"USER_INPUT",value:e,role:n,xUserData:r,xCustomInstructions:i,requestInputResponse:o},{expectStreaming:s})}sendImageDelete(e){D(e,"imageId is required"),this.enqueueMessage({type:"USER_FILE_DELETE",imageId:e}).catch(console.warn)}sendUserCancel(){this.enqueueMessage({type:"USER_CANCEL"}).catch(console.warn)}sendUserTypingStart(){this.#o({type:"USER_TYPING_START"})}sendUserTypingStop(){this.enqueueMessage({type:"USER_TYPING_STOP"}).catch(console.warn)}sendNewChat(){this.enqueueMessage({type:"NEW_CHAT"})}sendUserMeta(e){this.enqueueMessage({type:"USER_META",metadata:e}).catch(console.warn)}reloadConfig(){this.enqueueMessage({type:"RELOAD_CONFIG"}).catch(console.warn)}close(){this.#r?.close(1e3,"closed by user")}retry(){clearTimeout(this.#n),this.#n=setTimeout(()=>{this.#t.onReconnect?.(),this.#r=this.initWS()},1e3*this.#i),this.#i++}initWS(){return new sr(this.#e,{url:()=>this.#t.url(this.conversationId,{}),onOpen:e=>this.#a(e),onMessage:e=>this.#d(JSON.parse(e.data)),onError:e=>this.#c(e),onClose:e=>this.#l(e)})}#a(e){this.#i=0}#d(e){switch(e.type){case"NEW_MESSAGE":{this.messages=[...this.messages,{...e.message,streaming:!0}].filter((r,i,n)=>i===n.findIndex(s=>s.id===r.id)),this.typingIndicator=void 0,this.#e.requestUpdate(),this.#t.onNewMessage?.(e.message),this.#t.persistConversationState?.(this.conversationId,this.messages);break}case"APPEND_MESSAGE":{let r=this.messages.find(i=>i.id===e.message.id);if(r){switch(e.message.content_type){case"text":{let{part:i,delta:n,position:s}=e.message;r.content=r.content.slice(0,s)+n,r.parts||=[],r.parts[i]={text:r.parts[i]&&"text"in r.parts[i]?(r.parts[i].text||"").slice(0,s)+n:n};break}case"html":{let{part:i,delta:n,position:s}=e.message;r.parts||=[],r.parts[i]={html:r.parts[i]&&"html"in r.parts[i]?(r.parts[i].html||"").slice(0,s)+n:n};break}case"data":{let{part:i}=e.message;r.parts||=[],r.parts[i]={tag:e.message.tag,data:r.parts[i]&&"data"in r.parts[i]?Object.assign(r.parts[i].data||{},e.message.data):e.message.data};break}}e.metadata&&(r.metadata=e.metadata),this.#t.onMessageAppend?.(e),this.#e.requestUpdate()}else throw new Error(`Message with id ${e.message.id} not found`);break}case"MESSAGE_DONE":{let r=this.messages.find(i=>i.id===e.message.id);if(r)Object.assign(r,e.message),r.streaming=!1;else throw new Error(`Message with id ${e.message.id} not found`);this.isStreaming=!1,this.#e.requestUpdate(),this.#t.onMessageDone?.(e,r),this.#t.persistConversationState?.(this.conversationId,this.messages);break}case"MESSAGE_CANCEL":{this.isStreaming=!1,this.typingIndicator=void 0,this.#e.requestUpdate();break}case"ERROR":{this.#t.onMessageError?.(e);break}case"CONNECTED":{this.conversationId=e.conversationId,this.messages=e.messages,this.#t.onConnect?.(e.conversationId,e.metadata),this.#t.persistConversationState?.(e.conversationId,e.messages),this.isLiveMode=e.metadata.isLiveMode,this.#e.requestUpdate();break}case"TYPING_START":{e.role==="assistant"&&(this.isStreaming=!0),this.typingIndicator={role:e.role,metadata:e.metadata},this.#e.requestUpdate();break}case"TYPING_STOP":{this.typingIndicator=void 0,this.#e.requestUpdate();break}case"RAN_OUT_OF_CREDITS":{this.ranOutOfCredits=!0,this.#e.requestUpdate();break}case"RECONNECT":{this.reconnectSocket(),this.#e.requestUpdate();break}default:console.warn(`Unknown message type: ${JSON.stringify(e)}`)}}#c(e){console.error("onError",e),this.#t.onError?.(e)}#l(e){this.#e.isConnected&&this.#r&&!this.#r.isConnected&&e.reason==="reconnect"&&this.retry(),this.isStreaming=!1,this.typingIndicator=void 0,this.#e.requestUpdate(),this.#t.onClose?.()}hostConnected(){this.conversationId=this.#t.restoreConversationState?.()?.conversationId||"",this.messages=this.#t.restoreConversationState?.()?.messages||[]}reset(){this.#t.onReset?.(),this.isStreaming=!1,this.typingIndicator=void 0,this.ranOutOfCredits=!1,this.messages=[],this.conversationId="",this.isLiveMode=!1,this.#s=[],this.#e.requestUpdate()}hostDisconnected(){clearTimeout(this.#n)}connect(){this.#r||(this.#r=this.initWS())}reconnectSocket(){this.#r?.close(1e3,"destroy"),this.#r=this.initWS()}get lastMsg(){if(this.messages.length>0)return this.messages[this.messages.length-1]}get isConnected(){return this.#r?.isConnected??!1}};var gl=Symbol();var $s=Object.getPrototypeOf,Si=new WeakMap,wl=t=>t&&(Si.has(t)?Si.get(t):$s(t)===Object.prototype||$s(t)===Array.prototype);var Es=t=>wl(t)&&t[gl]||null,$i=(t,e=!0)=>{Si.set(t,e)};var Mi=t=>typeof t=="object"&&t!==null,yl=t=>Mi(t)&&!Ii.has(t)&&(Array.isArray(t)||!(Symbol.iterator in t))&&!(t instanceof WeakMap)&&!(t instanceof WeakSet)&&!(t instanceof Error)&&!(t instanceof Number)&&!(t instanceof Date)&&!(t instanceof String)&&!(t instanceof RegExp)&&!(t instanceof ArrayBuffer)&&!(t instanceof Promise),As=(t,e)=>{let r=Ms.get(t);if(r?.[0]===e)return r[1];let i=Array.isArray(t)?[]:Object.create(Object.getPrototypeOf(t));return $i(i,!0),Ms.set(t,[e,i]),Reflect.ownKeys(t).forEach(n=>{if(Object.getOwnPropertyDescriptor(i,n))return;let s=Reflect.get(t,n),{enumerable:o}=Reflect.getOwnPropertyDescriptor(t,n),a={value:s,enumerable:o,configurable:!0};if(Ii.has(s))$i(s,!1);else if(Te.has(s)){let[l,c]=Te.get(s);a.value=As(l,c())}Object.defineProperty(i,n,a)}),Object.preventExtensions(i)},vl=(t,e,r,i)=>({deleteProperty(n,s){let o=Reflect.get(n,s);r(s);let a=Reflect.deleteProperty(n,s);return a&&i(["delete",[s],o]),a},set(n,s,o,a){let l=!t()&&Reflect.has(n,s),c=Reflect.get(n,s,a);if(l&&(Is(c,o)||lr.has(o)&&Is(c,lr.get(o))))return!0;r(s),Mi(o)&&(o=Es(o)||o);let d=!Te.has(o)&&xl(o)?Ai(o):o;return e(s,d),Reflect.set(n,s,d,a),i(["set",[s],o,c]),!0}}),Te=new WeakMap,Ii=new WeakSet,Ms=new WeakMap,Ei=[1],lr=new WeakMap,Is=Object.is,bl=(t,e)=>new Proxy(t,e),xl=yl,kl=As,Cl=vl;function Ai(t={}){if(!Mi(t))throw new Error("object required");let e=lr.get(t);if(e)return e;let r=Ei[0],i=new Set,n=(b,S=++Ei[0])=>{r!==S&&(s=r=S,i.forEach(y=>y(b,S)))},s=r,o=(b=Ei[0])=>(s!==b&&(s=b,l.forEach(([S])=>{let y=S[1](b);y>r&&(r=y)})),r),a=b=>(S,y)=>{let x=[...S];x[1]=[b,...x[1]],n(x,y)},l=new Map,c=(b,S)=>{let y=!Ii.has(S)&&Te.get(S);if(y){if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&l.has(b))throw new Error("prop listener already exists");if(i.size){let x=y[2](a(b));l.set(b,[y,x])}else l.set(b,[y])}},d=b=>{var S;let y=l.get(b);y&&(l.delete(b),(S=y[1])==null||S.call(y))},h=b=>(i.add(b),i.size===1&&l.forEach(([y,x],E)=>{if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&x)throw new Error("remove already exists");let T=y[2](a(E));l.set(E,[y,T])}),()=>{i.delete(b),i.size===0&&l.forEach(([y,x],E)=>{x&&(x(),l.set(E,[y]))})}),f=!0,g=Cl(()=>f,c,d,n),p=bl(t,g);lr.set(t,p);let $=[t,o,h];return Te.set(p,$),Reflect.ownKeys(t).forEach(b=>{let S=Object.getOwnPropertyDescriptor(t,b);"value"in S&&S.writable&&(p[b]=t[b])}),f=!1,p}function cr(t,e,r){let i=Te.get(t);(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!i&&console.warn("Please use proxy object");let n,s=[],o=i[2],a=!1,c=o(d=>{if(s.push(d),r){e(s.splice(0));return}n||(n=Promise.resolve().then(()=>{n=void 0,a&&e(s.splice(0))}))});return a=!0,()=>{a=!1,c()}}function Je(t){let e=Te.get(t);(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!e&&console.warn("Please use proxy object");let[r,i]=e;return kl(r,i())}var Ke=class{#e;#t;#r;#i=()=>{};constructor(e,r){this.#e=e,this.#t=r,this.#r=Je(r),e.addController(this)}get state(){return this.#r}get value(){return this.#r}hostConnected(){this.#i(),this.#i=cr(this.#t,()=>{this.#r=Je(this.#t),this.#e.requestUpdate()})}hostDisconnected(){this.#i()}};var ve=class{#e;#t;proxyObject;#r;#i=()=>{};constructor(e,r,i){this.#e=e,this.#t=i,this.proxyObject=Ai(r),this.#r=Je(this.proxyObject),e.addController(this)}get state(){return this.#r}get value(){return this.#r}hostConnected(){this.#i(),this.#t?.subscribe&&(this.#i=cr(this.proxyObject,()=>{this.#r=Je(this.proxyObject),this.#e.requestUpdate()}))}hostDisconnected(){this.#i()}};var ur=class{#e;#t;#r;#i=null;#n=null;constructor(e,{provider:r,tag:i,key:n}){this.#e=e,this.#t=i,this.#r=n,e.addController(this)}get value(){return this.#n?this.#n.value:null}hostConnected(){if(this.#n||(this.#i=_l(this.#e,this.#t),!this.#i))return;let e=this.#i[this.#r]instanceof ve?this.#i[this.#r]:null;e&&(this.#n=new Ke(this.#e,e.proxyObject))}hostDisconnected(){}};function _l(t,e){let r=t;for(;r;){let i=r.closest(e);if(i)return i;let n=r.getRootNode();if(n instanceof ShadowRoot)r=n.host;else break}return null}function Di(t,e){if(e<=0)return"";if(t=t??"",t.length>e){let r=e-1;return r>0&&t.charCodeAt(r-1)>=55296&&t.charCodeAt(r-1)<=56319&&r--,t.slice(0,r)+"\u2026"}return t}var St=ai(Ti(),1);var hr=class{#e;constructor({document:e}){this.#e=e}getCookies(){return(0,St.parseCookie)(this.#e.cookie)||{}}getCookie(e){return this.getCookies()[e]||null}setCookie(e,r,i){if(D(typeof e=="string",`cookie name must be a string, got: ${typeof e}`),D(e,"cookie name must not be empty"),r==null){this.#e.cookie=(0,St.stringifySetCookie)(e,"",{expires:new Date(0)});return}D(typeof r=="string",`value of cookie \`${e}\` must be a string, got: ${typeof r}`),this.#e.cookie=(0,St.stringifySetCookie)(e,r,i)}deleteCookie(e){this.setCookie(e,null)}deleteCookies(e){let r=this.getCookies();for(let i in r)e(i)&&this.deleteCookie(i)}};var pr=class{#e;constructor({localStorage:e}){this.#e=e}getItem(e){try{let r=this.#e.getItem(e);return r?JSON.parse(r):null}catch{return null}}setItem(e,r){if(r==null){this.#e.removeItem(e);return}try{let i=JSON.stringify(r);this.#e.setItem(e,i)}catch(i){console.error(`Failed to store ${e} in localStorage:`,i)}}removeItem(e){this.#e.removeItem(e)}removeItems(e){let r=[];for(let i=0;i<this.#e.length;i++){let n=this.#e.key(i);n&&e(n)&&r.push(n)}for(let i of r)this.#e.removeItem(i)}};var $t=ai(Ti(),1);function Oi({window:t}){let e=t.location.hostname,r=t.document;if(e==="localhost"||/^\d+\.\d+\.\d+\.\d+$/.test(e)||/^\[.*\]$/.test(e))return;let i=e.split(".");if(i.length<2)return;let n="__molin_domain_test__";for(let s=2;s<=i.length;s++){let o=`.${i.slice(-s).join(".")}`;try{if(r.cookie=(0,$t.stringifySetCookie)(n,"1",{domain:o,path:"/"}),(0,$t.parseCookie)(r.cookie)[n]==="1")return r.cookie=(0,$t.stringifySetCookie)(n,"",{domain:o,path:"/",expires:new Date(0)}),o}catch{continue}}return`.${i.slice(-2).join(".")}`}var Ui=class{#e;#t;#r;#i;constructor({window:e}){this.#e=e,this.#t=new hr({document:e.document}),this.#r=new pr({localStorage:e.localStorage}),this.#i=e.localStorage}get distinctID(){return this.#t.getCookie("molin_distinct_id")||this.#i.getItem("molin_distinct_id")||this.#r.getItem("molin_shop_assistant_distinct_id")}set distinctID(e){if(this.#r.removeItem("molin_shop_assistant_distinct_id"),this.#t.deleteCookie("molin_shop_assistant_distinct_id"),!e){this.#t.deleteCookie("molin_distinct_id"),this.#i.removeItem("molin_distinct_id");return}D(typeof e=="string","distinct_id must be a string");try{this.#t.setCookie("molin_distinct_id",e,{path:"/",sameSite:"lax",expires:new Date(Date.now()+1e3*60*60*24*365),domain:Oi({window:this.#e})})}catch(r){console.warn("Could not write distinct_id to cookie:",r)}try{this.#i.setItem("molin_distinct_id",e)}catch(r){console.warn("Could not write distinct_id to localStorage:",r)}}get widgetState(){return this.#r.getItem("molin_widget")||this.#r.getItem("_molin_widget_open_state")}set widgetState(e){this.#r.setItem("molin_widget",e),this.#r.removeItem("_molin_widget_open_state")}get popupState(){return this.#r.getItem("molin_popup")||this.#r.getItem("_molin_popup")}set popupState(e){this.#r.setItem("molin_popup",e),this.#r.removeItem("_molin_popup")}get disclaimerDismissed(){return this.#r.getItem("molin_disclaimer_dismissed")??!1}set disclaimerDismissed(e){this.#r.setItem("molin_disclaimer_dismissed",e)}getConversationId(e){D(typeof e=="string","widgetId must be a string"),D(e,"widgetId must not be empty");let r=`molin_${e}_conversation_id`;return this.#t.getCookie(r)||this.#i.getItem(r)||this.#r.getItem(`_molin_${e}`)?.conversationId}setConversationId(e,r){D(typeof e=="string","widgetId must be a string"),D(e,"widgetId must not be empty");let i=`molin_${e}_conversation_id`;if(!r){this.#t.deleteCookie(i),this.#i.removeItem(i);return}D(typeof r=="string",`conversation ID for widget ${e} must be a string`);try{this.#t.setCookie(i,r,{path:"/",sameSite:"lax",expires:new Date(Date.now()+1e3*60*60*24*365),domain:Oi({window:this.#e})})}catch(n){console.warn(`Could not write ${i} to cookie:`,n)}try{this.#i.setItem(i,r)}catch(n){console.warn(`Could not write ${i} to localStorage:`,n)}}getConversationState(e){D(typeof e=="string","widgetId must be a string"),D(e,"widgetId must not be empty");let r=`molin_${e}_conversation`;return this.#r.getItem(r)||this.#r.getItem(`_molin_${e}`)}setConversationState(e,r){this.#r.removeItem(`_molin_${e}`),D(typeof e=="string","widgetId must be a string"),D(e,"widgetId must not be empty");let i=`molin_${e}_conversation`;this.#r.setItem(i,r)}resetAll(){this.distinctID=null,this.widgetState=null,this.popupState=null,this.disclaimerDismissed=!1,this.#r.removeItems(e=>e.startsWith("_molin_")),this.#t.deleteCookies(e=>e.startsWith("_molin_"))}},R=new Ui({window});var Os=()=>{if(window.Shopify)try{return{customerId:Ll()}}catch{return null}return null},Ll=()=>{try{let t=[()=>window.ShopifyAnalytics?.meta?.page?.customerId,()=>window.meta?.page?.customerId,()=>window._st?.cid,()=>window.ShopifyAnalytics?.lib?.user()?.traits()?.uniqToken];for(let e of t)try{let r=e();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},Us=async()=>{try{return(await(await fetch(window.Shopify.routes.root+"cart.js")).json()).items.map(i=>({id:i.id,name:i.title,quantity:i.quantity,price:i.price,variantId:i.variant_id,sku:i.sku,url:i.url,description:i.product_description,image:i.featured_image?.url}))}catch{return[]}};function Ps(t,e="http"){return t.startsWith("http://")||t.startsWith("https://")?t:`${e}://${t}`}function Xe(t){return new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+!*'();@&=,$]*)*(\\?[-a-z\\d%_.~+!*'();@&=,$]*)?(\\#[-a-z\\d%_.~+!*'();@&=,$]*)?$","i").test(t)}function Rs(t,e){let r=t instanceof URL?t:new URL(t);if(e)for(let[i,n]of e)r.searchParams.set(i,n);return r}var Bs=()=>{if(window.ShopRenter)try{let t=Ol();return{customerEmail:t?.customerEmail,customerId:t?.customerId,customerName:t?.customerName}}catch{return null}return null},Ol=()=>{try{if(window.ShopRenter){let t=window.ShopRenter.customer;return{customerEmail:t?.email,customerId:t?.userId,customerName:[t?.name?.firstName,t?.name?.lastName].filter(Boolean).join(" ")}}return{customerEmail:null,customerId:null,customerName:null}}catch{return{customerEmail:null,customerId:null,customerName:null}}},Fs=async()=>{try{let t=window.ShopRenter.shop?.domain;if(!t)return[];let e=Ps(t,"https")+"/cart.json";return(await(await fetch(e)).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 qs=()=>{if(window.UNAS)try{let t=window.UNAS.customer;return{customerEmail:t?.email,customerId:t?.id}}catch(t){return console.error("Error fetching customer information:",t),null}return null},Vs=async()=>new Promise((t,e)=>{try{window.UNAS.getCart(r=>{let n=r.items.map(s=>({id:s.id,name:s.name,quantity:s.quantity,price:s.price,sku:s.sku}));t(n)})}catch(r){console.error("Error fetching cart information:",r),e(r)}});var Pi;function Hs(t){return{lang:t?.lang??Pi?.lang,message:t?.message,abortEarly:t?.abortEarly??Pi?.abortEarly,abortPipeEarly:t?.abortPipeEarly??Pi?.abortPipeEarly}}var Rl;function Bl(t){return Rl?.get(t)}var Fl;function ql(t){return Fl?.get(t)}var Vl;function Nl(t,e){return Vl?.get(t)?.get(e)}function zs(t){let e=typeof t;return e==="string"?`"${t}"`:e==="number"||e==="bigint"||e==="boolean"?`${t}`:e==="object"||e==="function"?(t&&Object.getPrototypeOf(t)?.constructor?.name)??"null":e}function W(t,e,r,i,n){let s=n&&"input"in n?n.input:r.value,o=n?.expected??t.expects??null,a=n?.received??zs(s),l={kind:t.kind,type:t.type,input:s,expected:o,received:a,message:`Invalid ${e}: ${o?`Expected ${o} but r`:"R"}eceived ${a}`,requirement:t.requirement,path:n?.path,issues:n?.issues,lang:i.lang,abortEarly:i.abortEarly,abortPipeEarly:i.abortPipeEarly},c=t.kind==="schema",d=n?.message??t.message??Nl(t.reference,l.lang)??(c?ql(l.lang):null)??i.message??Bl(l.lang);d!==void 0&&(l.message=typeof d=="function"?d(l):d),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function Z(t){return{version:1,vendor:"valibot",validate(e){return t["~run"]({value:e},Hs())}}}function Hl(t,e){return Object.hasOwn(t,e)&&e!=="__proto__"&&e!=="prototype"&&e!=="constructor"}function Ws(t,e){let r=[...new Set(t)];return r.length>1?`(${r.join(` ${e} `)})`:r[0]??"never"}var zl=/^\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\d|0[1-9]|3[01])[T ](?:0\d|1\d|2[0-3])(?::[0-5]\d){2}(?:\.\d{1,9})?(?:Z|[+-](?:0\d|1\d|2[0-3])(?::?[0-5]\d)?)$/u;function Ri(t){return{kind:"validation",type:"iso_timestamp",reference:Ri,async:!1,expects:null,requirement:zl,message:t,"~run"(e,r){return e.typed&&!this.requirement.test(e.value)&&W(this,"timestamp",e,r),e}}}function Bi(t,e){return{kind:"validation",type:"max_length",reference:Bi,async:!1,expects:`<=${t}`,requirement:t,message:e,"~run"(r,i){return r.typed&&r.value.length>this.requirement&&W(this,"length",r,i,{received:`${r.value.length}`}),r}}}function Fi(t,e){return{kind:"validation",type:"min_length",reference:Fi,async:!1,expects:`>=${t}`,requirement:t,message:e,"~run"(r,i){return r.typed&&r.value.length<this.requirement&&W(this,"length",r,i,{received:`${r.value.length}`}),r}}}function qi(t){return{kind:"transformation",type:"to_date",reference:qi,async:!1,message:t,"~run"(e,r){try{e.value=new Date(e.value),isNaN(e.value)&&(W(this,"date",e,r,{received:'"Invalid Date"'}),e.typed=!1)}catch{W(this,"date",e,r),e.typed=!1}return e}}}function Vi(t){return{kind:"transformation",type:"transform",reference:Vi,async:!1,operation:t,"~run"(e){return e.value=this.operation(e.value),e}}}function Gs(t,e,r){return typeof t.fallback=="function"?t.fallback(e,r):t.fallback}function Y(t,e){return{...t,fallback:e,get"~standard"(){return Z(this)},"~run"(r,i){let n=t["~run"](r,i);return n.issues?{typed:!0,value:Gs(this,n,i)}:n}}}function Ni(t,e,r){return typeof t.default=="function"?t.default(e,r):t.default}function Et(){return{kind:"schema",type:"any",reference:Et,expects:"any",async:!1,get"~standard"(){return Z(this)},"~run"(t){return t.typed=!0,t}}}function Ye(t,e){return{kind:"schema",type:"array",reference:Ye,expects:"Array",async:!1,item:t,message:e,get"~standard"(){return Z(this)},"~run"(r,i){let n=r.value;if(Array.isArray(n)){r.typed=!0,r.value=[];for(let s=0;s<n.length;s++){let o=n[s],a=this.item["~run"]({value:o},i);if(a.issues){let l={type:"array",origin:"value",input:n,key:s,value:o};for(let c of a.issues)c.path?c.path.unshift(l):c.path=[l],r.issues?.push(c);if(r.issues||(r.issues=a.issues),i.abortEarly){r.typed=!1;break}}a.typed||(r.typed=!1),r.value.push(a.value)}}else W(this,"type",r,i);return r}}}function Hi(t){return{kind:"schema",type:"boolean",reference:Hi,expects:"boolean",async:!1,message:t,get"~standard"(){return Z(this)},"~run"(e,r){return typeof e.value=="boolean"?e.typed=!0:W(this,"type",e,r),e}}}function zi(t){return{kind:"schema",type:"null",reference:zi,expects:"null",async:!1,message:t,get"~standard"(){return Z(this)},"~run"(e,r){return e.value===null?e.typed=!0:W(this,"type",e,r),e}}}function fr(t,e){return{kind:"schema",type:"nullish",reference:fr,expects:`(${t.expects} | null | undefined)`,async:!1,wrapped:t,default:e,get"~standard"(){return Z(this)},"~run"(r,i){return(r.value===null||r.value===void 0)&&(this.default!==void 0&&(r.value=Ni(this,r,i)),r.value===null||r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function mr(t){return{kind:"schema",type:"number",reference:mr,expects:"number",async:!1,message:t,get"~standard"(){return Z(this)},"~run"(e,r){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:W(this,"type",e,r),e}}}function V(t,e){return{kind:"schema",type:"object",reference:V,expects:"Object",async:!1,entries:t,message:e,get"~standard"(){return Z(this)},"~run"(r,i){let n=r.value;if(n&&typeof n=="object"){r.typed=!0,r.value={};for(let s in this.entries){let o=this.entries[s];if(s in n||(o.type==="exact_optional"||o.type==="optional"||o.type==="nullish")&&o.default!==void 0){let a=s in n?n[s]:Ni(o),l=o["~run"]({value:a},i);if(l.issues){let c={type:"object",origin:"value",input:n,key:s,value:a};for(let d of l.issues)d.path?d.path.unshift(c):d.path=[c],r.issues?.push(d);if(r.issues||(r.issues=l.issues),i.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value[s]=l.value}else if(o.fallback!==void 0)r.value[s]=Gs(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(W(this,"key",r,i,{input:void 0,expected:`"${s}"`,path:[{type:"object",origin:"key",input:n,key:s,value:n[s]}]}),i.abortEarly))break}}else W(this,"type",r,i);return r}}}function A(t,e){return{kind:"schema",type:"optional",reference:A,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,get"~standard"(){return Z(this)},"~run"(r,i){return r.value===void 0&&(this.default!==void 0&&(r.value=Ni(this,r,i)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function Mt(t,e){return{kind:"schema",type:"picklist",reference:Mt,expects:Ws(t.map(zs),"|"),async:!1,options:t,message:e,get"~standard"(){return Z(this)},"~run"(r,i){return this.options.includes(r.value)?r.typed=!0:W(this,"type",r,i),r}}}function It(t,e,r){return{kind:"schema",type:"record",reference:It,expects:"Object",async:!1,key:t,value:e,message:r,get"~standard"(){return Z(this)},"~run"(i,n){let s=i.value;if(s&&typeof s=="object"){i.typed=!0,i.value={};for(let o in s)if(Hl(s,o)){let a=s[o],l=this.key["~run"]({value:o},n);if(l.issues){let d={type:"object",origin:"key",input:s,key:o,value:a};for(let h of l.issues)h.path=[d],i.issues?.push(h);if(i.issues||(i.issues=l.issues),n.abortEarly){i.typed=!1;break}}let c=this.value["~run"]({value:a},n);if(c.issues){let d={type:"object",origin:"value",input:s,key:o,value:a};for(let h of c.issues)h.path?h.path.unshift(d):h.path=[d],i.issues?.push(h);if(i.issues||(i.issues=c.issues),n.abortEarly){i.typed=!1;break}}(!l.typed||!c.typed)&&(i.typed=!1),l.typed&&(i.value[l.value]=c.value)}}else W(this,"type",i,n);return i}}}function _(t){return{kind:"schema",type:"string",reference:_,expects:"string",async:!1,message:t,get"~standard"(){return Z(this)},"~run"(e,r){return typeof e.value=="string"?e.typed=!0:W(this,"type",e,r),e}}}function Ns(t){let e;if(t)for(let r of t)e?e.push(...r.issues):e=r.issues;return e}function gr(t,e){return{kind:"schema",type:"union",reference:gr,expects:Ws(t.map(r=>r.expects),"|"),async:!1,options:t,message:e,get"~standard"(){return Z(this)},"~run"(r,i){let n,s,o;for(let a of this.options){let l=a["~run"]({value:r.value},i);if(l.typed)if(l.issues)s?s.push(l):s=[l];else{n=l;break}else o?o.push(l):o=[l]}if(n)return n;if(s){if(s.length===1)return s[0];W(this,"type",r,i,{issues:Ns(s)}),r.typed=!0}else{if(o?.length===1)return o[0];W(this,"type",r,i,{issues:Ns(o)})}return r}}}function Zs(t,e){let r={};for(let i in t.entries)r[i]=!e||e.includes(i)?A(t.entries[i]):t.entries[i];return{...t,entries:r,get"~standard"(){return Z(this)}}}function Qe(...t){return{...t[0],pipe:t,get"~standard"(){return Z(this)},"~run"(e,r){for(let i of t)if(i.kind!=="metadata"){if(e.issues&&(i.kind==="schema"||i.kind==="transformation")){e.typed=!1;break}(!e.issues||!r.abortEarly&&!r.abortPipeEarly)&&(e=i["~run"](e,r))}return e}}}function me(t,e,r){let i=t["~run"]({value:e},Hs(r));return{typed:i.typed,success:!i.issues,output:i.value,issues:i.issues}}var Js=It(_(),gr([_(),mr(),Hi(),zi()])),Ks=Qe(_(),Fi(1),Bi(5e3)),Xs=()=>{try{return window.UNAS?qs():window.Shopify?Os():window.ShopRenter?Bs():null}catch{return null}},Ys=async()=>{try{return window.UNAS?await Vs():window.Shopify?await Us():window.ShopRenter?await Fs():[]}catch{return[]}},et={schema:V({conversationId:A(_()),messages:A(Ye(V({id:_(),timestamp:mr(),role:Mt(["user","assistant","support"]),content:_(),parts:A(Ye(gr([V({text:_()}),V({html:_()}),V({tag:_(),data:It(_(),Et())})])))})))}),persist(t,e,r){R.setConversationState(t,{conversationId:e,messages:r}),R.setConversationId(t,e)},restore(t){try{let e=R.getConversationState(t),r=e?me(this.schema,e):void 0;return r?.success&&r.output.conversationId?{conversationId:r.output.conversationId,messages:r.output.messages||[]}:{conversationId:R.getConversationId(t)||"",messages:[]}}catch(e){return console.error("Failed to restore conversation state:",e),{conversationId:"",messages:[]}}},reset(t){R.setConversationState(t,null),R.setConversationId(t,null)}};var tt=class t extends v{static properties={widgetId:{type:String},config:{type:Object},callbacks:{type:Object},xUserData:{type:Object},xCustomInstructions:{type:Object},autoConnect:{type:Boolean}};contextCtrl;constructor(){super(),this.widgetId="",this.config={},this.callbacks={},this.xUserData=void 0,this.xCustomInstructions=void 0,this.autoConnect=!1,this.contextCtrl=new ve(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,isConnected:()=>this.#n.isConnected,sendUserInput:this.sendUserInput.bind(this),sendUserCancel:this.sendUserCancel.bind(this),sendUserTypingStart:this.sendUserTypingStart.bind(this),sendUserTypingStop:this.sendUserTypingStop.bind(this),sendNewChat:this.sendNewChat.bind(this),reset:this.reset.bind(this),reloadConfig:this.reloadConfig.bind(this),enqueueUserInput:this.enqueueUserInput.bind(this),connect:this.connect.bind(this),sendImageDelete:this.#n.sendImageDelete.bind(this.#n)})}connectedCallback(){super.connectedCallback(),this.updated()}updated(){this.autoConnect&&this.#n.connect(),Object.assign(this.contextCtrl.proxyObject,{widgetId:this.widgetId,config:this.config,callbacks:this.callbacks,xUserData:this.#t,xCustomInstructions:this.#r,conversationId:this.#n.conversationId,messages:this.#e,isStreaming:this.#n.isStreaming,typingIndicator:this.#n.typingIndicator,ranOutOfCredits:this.#n.ranOutOfCredits,isLiveMode:this.#n.isLiveMode,lastMsg:this.#n.lastMsg,hasQueuedMessages:this.#n.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),sendImageDelete:this.#n.sendImageDelete.bind(this.#n)}),this.#s()}get#e(){return this.#n?.ranOutOfCredits?[{id:crypto.randomUUID(),role:"assistant",content:"Sorry, I've run out of credits. Please contact the shop directly.",timestamp:Date.now()}]:this.#n?.messages||[]}#t;#r;#i=null;get#n(){return this.#i||(this.#i=new ar(this,{autoConnect:this.autoConnect,url:e=>{let r=new URL(this.config.wsApiUrl);return r.searchParams.set("widgetId",this.widgetId),r.searchParams.set("conversationId",e),r.searchParams.set("pageUrl",window.location.href),r},onReconnect:()=>{},onError:e=>{console.error("ws error",e)},onClose:()=>{},onNewMessage:e=>{e.role==="assistant"&&this.callbacks.onNewMessageStartedStreaming?.({widgetId:this.widgetId,message:e,conversationId:this.#n.conversationId})},onMessageAppend:e=>{},onMessageDone:(e,r)=>{r.role==="assistant"&&this.callbacks.onMessageEndedStreaming?.({widgetId:this.widgetId,text:r.content??"",message:r,usage_TOKENS_COMPLETION:e.message.usage.TOKENS_COMPLETION,conversationId:this.#n.conversationId})},onMessageError:e=>{console.error("ws message error",e),e.message&&this.callbacks.onError?.({widgetId:this.widgetId,error:"WS: "+e.message})},onReset:()=>{et.reset(this.widgetId)},onConnect:(e,r)=>{let i=Xs();this.#n.sendUserMeta({xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,customerInformation:i,language:window.navigator.language,cart:[]}),Ys().then(n=>{n?.length>0&&this.#n.sendUserMeta({xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,customerInformation:i,cart:n,language:window.navigator.language})}).catch(n=>{console.error(n)}),this.dispatchEvent(new t.ConnectedEvent({conversationId:e,metadata:r,widgetId:this.widgetId,pendingImages:r?.pendingImages||[]}))},persistConversationState:(e,r)=>{et.persist(this.widgetId,e,r)},restoreConversationState:()=>et.restore(this.widgetId)})),this.#i}#s(){function e(i){if(!i)return;let n;try{n=typeof i=="object"?i:JSON.parse(i)}catch(o){console.error("Molin: user-data is not valid JSON",o);return}if(!n||typeof n!="object"||Object.keys(n).length===0)return;let s=me(Js,n);if(!s.success){console.error("Molin: user-data does not pass schema validation",s.issues);return}return s.output}function r(i){if(!i)return;let n=me(Ks,i);if(!n.success){console.error("Molin: custom-instructions does not pass schema validation",n.issues);return}return n.output}this.#t=e(this.xUserData),this.#r=r(this.xCustomInstructions)}async sendUserInput(e,r={}){let i={xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,...r},n=await this.#n.sendUserInput(e,i);return n&&this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:e,example:!1,conversationId:this.#n.conversationId}),n}async enqueueUserInput(e,r={}){e.length>1e3&&(console.error("Message exceeds max length of 1000 characters, trimming"),e=Di(e,1e3)),this.#e.some(o=>o.role==="assistant"&&o.parts?.some(a=>"tag"in a&&a.tag==="request-input-v1"&&"data"in a&&a.data.type==="new-conversation-button"))&&(this.sendNewChat(),this.reset());let s={xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,role:"user",expectStreaming:!0,...r};return this.#n.enqueueUserInput(e,s)}sendUserCancel(){this.#n.sendUserCancel(),this.callbacks.onUserCanceledStreaming?.({widgetId:this.widgetId})}sendUserTypingStart(){this.#n.sendUserTypingStart()}sendUserTypingStop(){this.#n.sendUserTypingStop()}sendNewChat(){this.#n.sendNewChat()}reset(){this.#n.reset()}reloadConfig(){this.#n.reloadConfig()}connect(){this.#n.connect()}render(){return u`<slot></slot>`}};function Qs(t){let e=new ur(t,{provider:tt,tag:"mw-context-widget",key:"contextCtrl"});return new Proxy({value:null},{get(r,i){if(i==="value")return e.value}})}tt.ConnectedEvent=class extends CustomEvent{static type="mw-context-widget:connected";constructor(e,r={}){super(tt.ConnectedEvent.type,{detail:e,bubbles:!0,composed:!0,...r})}};customElements.get("mw-context-widget")||customElements.define("mw-context-widget",tt);function tn(t){return[...t.v,(t.i?"!":"")+t.n].join(":")}function Wl(t,e=","){return t.map(tn).join(e)}var oo=typeof CSS<"u"&&CSS.escape||(t=>t.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function wr(t){for(var e=9,r=t.length;r--;)e=Math.imul(e^t.charCodeAt(r),1597334677);return"#"+((e^e>>>9)>>>0).toString(36)}function br(t,e="@media "){return e+j(t).map(r=>(typeof r=="string"&&(r={min:r}),r.raw||Object.keys(r).map(i=>`(${i}-width:${r[i]})`).join(" and "))).join(",")}function j(t=[]){return Array.isArray(t)?t:t==null?[]:[t]}function eo(t){return t}function xr(){}var F={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function ao(t){return t.match(/[-=:;]/g)?.length||0}function Ki(t){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(t)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(ao(t),15)<<18}var Gl=["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 rn({n:t,i:e,v:r=[]},i,n,s){t&&(t=tn({n:t,i:e,v:r})),s=[...j(s)];for(let a of r){let l=i.theme("screens",a);for(let c of j(l&&br(l)||i.v(a))){var o;s.push(c),n|=l?67108864|Ki(c):a=="dark"?1073741824:c[0]=="@"?Ki(c):(o=c,1<<~(/:([a-z-]+)/.test(o)&&~Gl.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:t,p:n,r:s,i:e}}var lo=new Map;function Xi(t){if(t.d){let e=[],r=Wi(t.r.reduce((i,n)=>n[0]=="@"?(e.push(n),i):n?Wi(i,s=>Wi(n,o=>{let a=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(o);if(a){let l=s.indexOf(a[1]);return~l?s.slice(0,l)+a[0]+s.slice(l+a[1].length):Gi(s,o)}return Gi(o,s)})):i,"&"),i=>Gi(i,t.n?"."+oo(t.n):""));return r&&e.push(r.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((i,n)=>n+"{"+i+"}",t.d)}}function Wi(t,e){return t.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(r,i,n)=>e(i)+n)}function Gi(t,e){return t.replace(/&/g,e)}var to=new Intl.Collator("en",{numeric:!0});function co(t,e){for(var r=0,i=t.length;r<i;){let n=i+r>>1;0>=uo(t[n],e)?r=n+1:i=n}return i}function uo(t,e){let r=t.p&F.o;return r==(e.p&F.o)&&(r==F.b||r==F.o)?0:t.p-e.p||t.o-e.o||to.compare(ro(t.n),ro(e.n))||to.compare(io(t.n),io(e.n))}function ro(t){return(t||"").split(/:/).pop().split("/").pop()||"\0"}function io(t){return(t||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function Zi(t,e){return Math.round(parseInt(t,16)*e)}function te(t,e={}){if(typeof t=="function")return t(e);let{opacityValue:r="1",opacityVariable:i}=e,n=i?`var(${i})`:r;if(t.includes("<alpha-value>"))return t.replace("<alpha-value>",n);if(t[0]=="#"&&(t.length==4||t.length==7)){let s=(t.length-1)/3,o=[17,1,.062272][s-1];return`rgba(${[Zi(t.substr(1,s),o),Zi(t.substr(1+s,s),o),Zi(t.substr(1+2*s,s),o),n]})`}return n=="1"?t:n=="0"?"#0000":t.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${n})`)}function ho(t,e,r,i,n=[]){return(function s(o,{n:a,p:l,r:c=[],i:d},h){let f=[],g="",p=0,$=0;for(let y in o||{}){var b,S;let x=o[y];if(y[0]=="@"){if(!x)continue;if(y[1]=="a"){f.push(...sn(a,l,vr(""+x),h,l,c,d,!0));continue}if(y[1]=="l"){for(let E of j(x))f.push(...s(E,{n:a,p:(b=F[y[7]],l&~F.o|b),r:y[7]=="d"?[]:c,i:d},h));continue}if(y[1]=="i"){f.push(...j(x).map(E=>({p:-1,o:0,r:[],d:y+" "+E})));continue}if(y[1]=="k"){f.push({p:F.d,o:0,r:[y],d:s(x,{p:F.d},h).map(Xi).join("")});continue}if(y[1]=="f"){f.push(...j(x).map(E=>({p:F.d,o:0,r:[y],d:s(E,{p:F.d},h).map(Xi).join("")})));continue}}if(typeof x!="object"||Array.isArray(x))y=="label"&&x?a=x+wr(JSON.stringify([l,d,o])):(x||x===0)&&(y=y.replace(/[A-Z]/g,E=>"-"+E.toLowerCase()),$+=1,p=Math.max(p,(S=y)[0]=="-"?0:ao(S)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(S)?+!!RegExp.$1||-!!RegExp.$2:0)+1),g+=(g?";":"")+j(x).map(E=>h.s(y,nn(""+E,h.theme)+(d?" !important":""))).join(";"));else if(y[0]=="@"||y.includes("&")){let E=l;y[0]=="@"&&(y=y.replace(/\bscreen\(([^)]+)\)/g,(T,B)=>{let N=h.theme("screens",B);return N?(E|=67108864,br(N,"")):T}),E|=Ki(y)),f.push(...s(x,{n:a,p:E,r:[...c,y],i:d},h))}else f.push(...s(x,{p:l,r:[...c,y]},h))}return f.unshift({n:a,p:l,o:Math.max(0,15-$)+1.5*Math.min(p||15,15),r:c,d:g}),f.sort(uo)})(t,rn(e,r,i,n),r)}function nn(t,e){return t.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(r,i,n,s,o="")=>{let a=e(n,o);return typeof a=="function"&&/color|fill|stroke/i.test(n)?te(a):""+j(a).filter(l=>Object(l)!==l)})}function po(t,e){let r,i=[];for(let n of t)n.d&&n.n?r?.p==n.p&&""+r.r==""+n.r?(r.c=[r.c,n.c].filter(Boolean).join(" "),r.d=r.d+";"+n.d):i.push(r={...n,n:n.n&&e}):i.push({...n,n:n.n&&e});return i}function yr(t,e,r=F.u,i,n){let s=[];for(let o of t)for(let a of(function(l,c,d,h,f){l={...l,i:l.i||f};let g=(function(p,$){let b=lo.get(p.n);return b?b(p,$):$.r(p.n,p.v[0]=="dark")})(l,c);return g?typeof g=="string"?({r:h,p:d}=rn(l,c,d,h),po(yr(vr(g),c,d,h,l.i),l.n)):Array.isArray(g)?g.map(p=>{var $,b;return{o:0,...p,r:[...j(h),...j(p.r)],p:($=d,b=p.p??d,$&~F.o|b)}}):ho(g,l,c,d,h):[{c:tn(l),p:0,o:0,r:[]}]})(o,e,r,i,n))s.splice(co(s,a),0,a);return s}function sn(t,e,r,i,n,s,o,a){return po((a?r.flatMap(l=>yr([l],i,n,s,o)):yr(r,i,n,s,o)).map(l=>l.p&F.o&&(l.n||e==F.b)?{...l,p:l.p&~F.o|e,o:0}:l),t)}function Zl(t,e,r,i){var n;return n=(s,o)=>{let{n:a,p:l,r:c,i:d}=rn(s,o,e);return r&&sn(a,e,r,o,l,c,d,i)},lo.set(t,n),t}function Ji(t,e,r){if(t[t.length-1]!="("){let i=[],n=!1,s=!1,o="";for(let a of t)if(!(a=="("||/[~@]$/.test(a))){if(a[0]=="!"&&(a=a.slice(1),n=!n),a.endsWith(":")){i[a=="dark:"?"unshift":"push"](a.slice(0,-1));continue}a[0]=="-"&&(a=a.slice(1),s=!s),a.endsWith("-")&&(a=a.slice(0,-1)),a&&a!="&"&&(o+=(o&&"-")+a)}o&&(s&&(o="-"+o),e[0].push({n:o,v:i.filter(Jl),i:n}))}}function Jl(t,e,r){return r.indexOf(t)==e}var no=new Map;function vr(t){let e=no.get(t);if(!e){let r=[],i=[[]],n=0,s=0,o=null,a=0,l=(c,d=0)=>{n!=a&&(r.push(t.slice(n,a+d)),c&&Ji(r,i)),n=a+1};for(;a<t.length;a++){let c=t[a];if(s)t[a-1]!="\\"&&(s+=+(c=="[")||-(c=="]"));else if(c=="[")s+=1;else if(o)t[a-1]!="\\"&&o.test(t.slice(a))&&(o=null,n=a+RegExp.lastMatch.length);else if(c=="/"&&t[a-1]!="\\"&&(t[a+1]=="*"||t[a+1]=="/"))o=t[a+1]=="*"?/^\*\//:/^[\r\n]/;else if(c=="(")l(),r.push(c);else if(c==":")t[a+1]!=":"&&l(!1,1);else if(/[\s,)]/.test(c)){l(!0);let d=r.lastIndexOf("(");if(c==")"){let h=r[d-1];if(/[~@]$/.test(h)){let f=i.shift();r.length=d,Ji([...r,"#"],i);let{v:g}=i[0].pop();for(let p of f)p.v.splice(+(p.v[0]=="dark")-+(g[0]=="dark"),g.length);Ji([...r,Zl(h.length>1?h.slice(0,-1)+wr(JSON.stringify([h,f])):h+"("+Wl(f)+")",F.a,f,/@$/.test(h))],i)}d=r.lastIndexOf("(",d-1)}r.length=d+1}else/[~@]/.test(c)&&t[a+1]=="("&&i.unshift([])}l(!0),no.set(t,e=i[0])}return e}function m(t,e,r){return[t,Yi(e,r)]}function Yi(t,e){return typeof t=="function"?t:typeof t=="string"&&/^[\w-]+$/.test(t)?(r,i)=>({[t]:e?e(r,i):Qi(r,1)}):r=>t||{[r[1]]:Qi(r,2)}}function Qi(t,e,r=t.slice(e).find(Boolean)||t.$$||t.input){return t.input[0]=="-"?`calc(${r} * -1)`:r}function w(t,e,r,i){return[t,on(e,r,i)]}function on(t,e,r){let i=typeof e=="string"?(n,s)=>({[e]:r?r(n,s):n._}):e||(({1:n,_:s},o,a)=>({[n||a]:s}));return(n,s)=>{let o=fo(t||n[1]),a=s.theme(o,n.$$)??le(n.$$,o,s);if(a!=null)return n._=Qi(n,0,a),i(n,s,o)}}function q(t,e={},r){return[t,Kl(e,r)]}function Kl(t={},e){return(r,i)=>{let{section:n=fo(r[0]).replace("-","")+"Color"}=t,[s,o]=Xl(r.$$);if(!s)return;let a=i.theme(n,s)||le(s,n,i);if(!a||typeof a=="object")return;let{opacityVariable:l=`--tw-${r[0].replace(/-$/,"")}-opacity`,opacitySection:c=n.replace("Color","Opacity"),property:d=n,selector:h}=t,f=i.theme(c,o||"DEFAULT")||o&&le(o,c,i),g=e||(({_:$})=>{let b=At(d,$);return h?{[h]:b}:b});r._={value:te(a,{opacityVariable:l||void 0,opacityValue:f||void 0}),color:$=>te(a,$),opacityVariable:l||void 0,opacityValue:f||void 0};let p=g(r,i);if(!r.dark){let $=i.d(n,s,a);$&&$!==a&&(r._={value:te($,{opacityVariable:l||void 0,opacityValue:f||"1"}),color:b=>te($,b),opacityVariable:l||void 0,opacityValue:f||void 0},p={"&":p,[i.v("dark")]:g(r,i)})}return p}}function Xl(t){return(t.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function At(t,e){let r={};return typeof e=="string"?r[t]=e:(e.opacityVariable&&e.value.includes(e.opacityVariable)&&(r[e.opacityVariable]=e.opacityValue||"1"),r[t]=e.value),r}function le(t,e,r){if(t[0]=="["&&t.slice(-1)=="]"){if(t=rt(nn(t.slice(1,-1),r.theme)),!e)return t;if(!(/color|fill|stroke/i.test(e)&&!(/^color:/.test(t)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(t))||/image/i.test(e)&&!(/^image:/.test(t)||/^[a-z-]+\(/.test(t))||/weight/i.test(e)&&!(/^(number|any):/.test(t)||/^\d+$/.test(t))||/position/i.test(e)&&/^(length|size):/.test(t)))return t.replace(/^[a-z-]+:/,"")}}function fo(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function rt(t){return t.includes("url(")?t.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,r="",i,n="")=>rt(r)+i+rt(n)):t.replace(/(^|[^\\])_+/g,(e,r)=>r+" ".repeat(e.length-r.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,e=>e.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}function Dt({presets:t=[],...e}){let r={darkMode:void 0,darkColor:void 0,preflight:e.preflight!==!1&&[],theme:{},variants:j(e.variants),rules:j(e.rules),ignorelist:j(e.ignorelist),hash:void 0,stringify:(i,n)=>i+":"+n,finalize:[]};for(let i of j([...t,{darkMode:e.darkMode,darkColor:e.darkColor,preflight:e.preflight!==!1&&j(e.preflight),theme:e.theme,hash:e.hash,stringify:e.stringify,finalize:e.finalize}])){let{preflight:n,darkMode:s=r.darkMode,darkColor:o=r.darkColor,theme:a,variants:l,rules:c,ignorelist:d,hash:h=r.hash,stringify:f=r.stringify,finalize:g}=typeof i=="function"?i(r):i;r={preflight:r.preflight!==!1&&n!==!1&&[...r.preflight,...j(n)],darkMode:s,darkColor:o,theme:{...r.theme,...a,extend:{...r.theme.extend,...a?.extend}},variants:[...r.variants,...j(l)],rules:[...r.rules,...j(c)],ignorelist:[...r.ignorelist,...j(d)],hash:h,stringify:f,finalize:[...r.finalize,...j(g)]}}return r}function so(t,e,r,i,n,s){for(let o of e){let a=r.get(o);a||r.set(o,a=i(o));let l=a(t,n,s);if(l)return l}}function Yl(t){var e;return en(t[0],typeof(e=t[1])=="function"?e:()=>e)}function Ql(t){var e,r;return Array.isArray(t)?en(t[0],Yi(t[1],t[2])):en(t,Yi(e,r))}function en(t,e){return mo(t,(r,i,n,s)=>{let o=i.exec(r);if(o)return o.$$=r.slice(o[0].length),o.dark=s,e(o,n)})}function mo(t,e){let r=j(t).map(ec);return(i,n,s)=>{for(let o of r){let a=e(i,o,n,s);if(a)return a}}}function ec(t){return typeof t=="string"?RegExp("^"+t+(t.includes("$")||t.slice(-1)=="-"?"":"$")):t}function go(t,e){let r=Dt(t),i=(function({theme:l,darkMode:c,darkColor:d=xr,variants:h,rules:f,hash:g,stringify:p,ignorelist:$,finalize:b}){let S=new Map,y=new Map,x=new Map,E=new Map,T=mo($,(I,H)=>H.test(I));h.push(["dark",Array.isArray(c)||c=="class"?`${j(c)[1]||".dark"} &`:typeof c=="string"&&c!="media"?c:"@media (prefers-color-scheme:dark)"]);let B=typeof g=="function"?I=>g(I,wr):g?wr:eo;B!==eo&&b.push(I=>({...I,n:I.n&&B(I.n),d:I.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(H,K)=>"--"+B(K).replace("#",""))}));let N={theme:(function({extend:I={},...H}){let K={},oi={get colors(){return $e("colors")},theme:$e,negative(){return{}},breakpoints(P){let z={};for(let X in P)typeof P[X]=="string"&&(z["screen-"+X]=P[X]);return z}};return $e;function $e(P,z,X,gt){if(P){if({1:P,2:gt}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(P)||[,P],/[.[]/.test(P)){let he=[];P.replace(/\[([^\]]+)\]|([^.[]+)/g,(Me,yt,Ja=yt)=>he.push(Ja)),P=he.shift(),X=z,z=he.join("-")}let oe=K[P]||Object.assign(Object.assign(K[P]={},Zt(H,P)),Zt(I,P));if(z==null)return oe;z||(z="DEFAULT");let Ee=oe[z]??z.split("-").reduce((he,Me)=>he?.[Me],oe)??X;return gt?te(Ee,{opacityValue:nn(gt,$e)}):Ee}let wt={};for(let oe of[...Object.keys(H),...Object.keys(I)])wt[oe]=$e(oe);return wt}function Zt(P,z){let X=P[z];return typeof X=="function"&&(X=X(oi)),X&&/color|fill|stroke/i.test(z)?(function gt(wt,oe=[]){let Ee={};for(let he in wt){let Me=wt[he],yt=[...oe,he];Ee[yt.join("-")]=Me,he=="DEFAULT"&&(yt=oe,Ee[oe.join("-")]=Me),typeof Me=="object"&&Object.assign(Ee,gt(Me,yt))}return Ee})(X):X}})(l),e:oo,h:B,s(I,H){return p(I,H,N)},d(I,H,K){return d(I,H,N,K)},v(I){return S.has(I)||S.set(I,so(I,h,y,Yl,N)||"&:"+I),S.get(I)},r(I,H){let K=JSON.stringify([I,H]);return x.has(K)||x.set(K,!T(I,N)&&so(I,f,E,Ql,N,H)),x.get(K)},f(I){return b.reduce((H,K)=>K(H,N),I)}};return N})(r),n=new Map,s=[],o=new Set;e.resume(l=>n.set(l,l),(l,c)=>{e.insert(l,s.length,c),s.push(c),o.add(l)});function a(l){let c=i.f(l),d=Xi(c);if(d&&!o.has(d)){o.add(d);let h=co(s,l);e.insert(d,h,l),s.splice(h,0,l)}return c.n}return Object.defineProperties(function(c){if(!n.size)for(let h of j(r.preflight))typeof h=="function"&&(h=h(i)),h&&(typeof h=="string"?sn("",F.b,vr(h),i,F.b,[],!1,!0):ho(h,{},i,F.b)).forEach(a);c=""+c;let d=n.get(c);if(!d){let h=new Set;for(let f of yr(vr(c),i))h.add(f.c).add(a(f));d=[...h].filter(Boolean).join(" "),n.set(c,d).set(d,d)}return d},Object.getOwnPropertyDescriptors({get target(){return e.target},theme:i.theme,config:r,snapshot(){let l=e.snapshot(),c=new Set(o),d=new Map(n),h=[...s];return()=>{l(),o=c,n=d,s=h}},clear(){e.clear(),o=new Set,n=new Map,s=[]},destroy(){this.clear(),e.destroy()}}))}function tc(t,e){return t!=e&&""+t.split(" ").sort()!=""+e.split(" ").sort()}function wo(t){let e=new MutationObserver(r);return{observe(n){e.observe(n,{attributeFilter:["class"],subtree:!0,childList:!0}),i(n),r([{target:n,type:""}])},disconnect(){e.disconnect()}};function r(n){for(let{type:s,target:o}of n)if(s[0]=="a")i(o);else for(let a of o.querySelectorAll("[class]"))i(a);e.takeRecords()}function i(n){let s,o=n.getAttribute?.("class");o&&tc(o,s=t(o))&&n.setAttribute("class",s)}}function rc(t){let e=document.querySelector(t||'style[data-twind=""]');return(!e||e.tagName!="STYLE")&&(e=document.createElement("style"),document.head.prepend(e)),e.dataset.twind="claimed",e}function kr(t){let e=t?.cssRules?t:(t&&typeof t!="string"?t:rc(t)).sheet;return{target:e,snapshot(){let r=Array.from(e.cssRules,i=>i.cssText);return()=>{this.clear(),r.forEach(this.insert)}},clear(){for(let r=e.cssRules.length;r--;)e.deleteRule(r)},destroy(){e.ownerNode?.remove()},insert(r,i){try{e.insertRule(r,i)}catch{e.insertRule(":root{}",i)}},resume:xr}}var ic=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 yo(t){return ic.get(t)}function vo(t){var e=/^(?:(text-(?:decoration$|e|or|si)|back(?:ground-cl|d|f)|box-d|mask(?:$|-[ispro]|-cl)|pr|hyphena|flex-d)|(tab-|column(?!-s)|text-align-l)|(ap)|u|hy)/i.exec(t);return e?e[1]?1:e[2]?2:e[3]?3:5:0}function bo(t,e){var r=/^(?:(pos)|(cli)|(background-i)|(flex(?:$|-b)|(?:max-|min-)?(?:block-s|inl|he|widt))|dis)/i.exec(t);return r?r[1]?/^sti/i.test(e)?1:0:r[2]?/^pat/i.test(e)?1:0:r[3]?/^image-/i.test(e)?1:0:r[4]?e[3]==="-"?2:0:/^(?:inline-)?grid$/i.test(e)?4:0:0}var nc=[["-webkit-",1],["-moz-",2],["-ms-",4]];function Cr(){return({stringify:t})=>({stringify(e,r,i){let n="",s=yo(e);s&&(n+=t(s,r,i)+";");let o=vo(e),a=bo(e,r);for(let l of nc)o&l[1]&&(n+=t(l[0]+e,r,i)+";"),a&l[1]&&(n+=t(e,l[0]+r,i)+";");return n+t(e,r,i)}})}function _r(){return{rules:[["line-clamp-none",{"-webkit-line-clamp":"unset"}],["line-clamp-",on("lineClamp",({_:t})=>xo(t))],["line-clamp-(\\d+)",({1:t})=>xo(t)]]}}function xo(t){return{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":`${t}`}}var Lt={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",...Q(4,"rem",4,.5,.5),...Q(12,"rem",4,5),14:"3.5rem",...Q(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:M("blur"),backdropBrightness:M("brightness"),backdropContrast:M("contrast"),backdropGrayscale:M("grayscale"),backdropHueRotate:M("hueRotate"),backdropInvert:M("invert"),backdropOpacity:M("opacity"),backdropSaturate:M("saturate"),backdropSepia:M("sepia"),backgroundColor:M("colors"),backgroundImage:{none:"none"},backgroundOpacity:M("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:{...Q(200,"",100,0,50),...Q(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:t})=>({DEFAULT:t("colors.gray.200","currentColor"),...t("colors")}),borderOpacity:M("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:M("spacing"),borderWidth:{DEFAULT:"1px",...re(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:M("colors"),caretColor:M("colors"),accentColor:({theme:t})=>({auto:"auto",...t("colors")}),contrast:{...Q(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:M("borderColor"),divideOpacity:M("borderOpacity"),divideWidth:M("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:t})=>({...t("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:t})=>({...t("spacing"),...jt(2,6),...jt(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:M("spacing"),gradientColorStops:M("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:t})=>({...t("spacing"),...jt(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:t})=>({...t("spacing"),...jt(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:{...Q(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:t})=>({auto:"auto",...t("spacing")}),maxHeight:({theme:t})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...t("spacing")}),maxWidth:({theme:t,breakpoints:e})=>({...e(t("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{...Q(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:M("spacing"),placeholderColor:M("colors"),placeholderOpacity:M("opacity"),outlineColor:M("colors"),outlineOffset:re(8,"px"),outlineWidth:re(8,"px"),ringColor:({theme:t})=>({...t("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:M("colors"),ringOffsetWidth:re(8,"px"),ringOpacity:({theme:t})=>({...t("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...re(8,"px")},rotate:{...re(2,"deg"),...re(12,"deg",3),...re(180,"deg",45)},saturate:Q(200,"",100,0,50),scale:{...Q(150,"",100,0,50),...Q(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:M("spacing"),scrollPadding:M("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...re(2,"deg"),...re(12,"deg",3)},space:M("spacing"),stroke:({theme:t})=>({...t("colors"),none:"none"}),strokeWidth:Q(2),textColor:M("colors"),textDecorationColor:M("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...re(8,"px")},textUnderlineOffset:{auto:"auto",...re(8,"px")},textIndent:M("spacing"),textOpacity:M("opacity"),transitionDuration:({theme:t})=>({...t("durations"),DEFAULT:"150ms"}),transitionDelay:M("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:t})=>({...t("spacing"),...jt(2,4),full:"100%"}),width:({theme:t})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...t("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...Q(50,"",1,0,10),auto:"auto"}};function jt(t,e){let r={};do for(var i=1;i<t;i++)r[`${i}/${t}`]=Number((i/t*100).toFixed(6))+"%";while(++t<=e);return r}function re(t,e,r=0){let i={};for(;r<=t;r=2*r||1)i[r]=r+e;return i}function Q(t,e="",r=1,i=0,n=1,s={}){for(;i<=t;i+=n)s[i]=i/r+e;return s}function M(t){return({theme:e})=>e(t)}var ko={"*,::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, ${Lt.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, ${Lt.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 Mo=[m("\\[([-\\w]+):(.+)]",({1:t,2:e},r)=>({"@layer overrides":{"&":{[t]:le(`[${e}]`,"",r)}}})),m("(group|peer)([~/][^-[]+)?",({input:t},{h:e})=>[{c:e(t)}]),w("aspect-","aspectRatio"),m("container",(t,{theme:e})=>{let{screens:r=e("screens"),center:i,padding:n}=e("container"),s={width:"100%",marginRight:i&&"auto",marginLeft:i&&"auto",...o("xs")};for(let a in r){let l=r[a];typeof l=="string"&&(s[br(l)]={"&":{maxWidth:l,...o(a)}})}return s;function o(a){let l=n&&(typeof n=="string"?n:n[a]||n.DEFAULT);if(l)return{paddingRight:l,paddingLeft:l}}}),w("content-","content",({_:t})=>({"--tw-content":t,content:"var(--tw-content)"})),m("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),m("box-(border|content)","boxSizing",({1:t})=>t+"-box"),m("hidden",{display:"none"}),m("table-(auto|fixed)","tableLayout"),m(["(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)",m("isolate","isolation"),m("object-(contain|cover|fill|none|scale-down)","objectFit"),w("object-","objectPosition"),m("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",Sr),m("overscroll(-[xy])?-(auto|contain|none)",({1:t="",2:e})=>({["overscroll-behavior"+t]:e})),m("(static|fixed|absolute|relative|sticky)","position"),w("-?inset(-[xy])?(?:$|-)","inset",({1:t,_:e})=>({top:t!="-x"&&e,right:t!="-y"&&e,bottom:t!="-x"&&e,left:t!="-y"&&e})),w("-?(top|bottom|left|right)(?:$|-)","inset"),m("(visible|collapse)","visibility"),m("invisible",{visibility:"hidden"}),w("-?z-","zIndex"),m("flex-((row|col)(-reverse)?)","flexDirection",Co),m("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),w("(flex-(?:grow|shrink))(?:$|-)"),w("(flex)-"),w("grow(?:$|-)","flexGrow"),w("shrink(?:$|-)","flexShrink"),w("basis-","flexBasis"),w("-?(order)-"),"-?(order)-(\\d+)",w("grid-cols-","gridTemplateColumns"),m("grid-cols-(\\d+)","gridTemplateColumns",Eo),w("col-","gridColumn"),m("col-(span)-(\\d+)","gridColumn",$o),w("col-start-","gridColumnStart"),m("col-start-(auto|\\d+)","gridColumnStart"),w("col-end-","gridColumnEnd"),m("col-end-(auto|\\d+)","gridColumnEnd"),w("grid-rows-","gridTemplateRows"),m("grid-rows-(\\d+)","gridTemplateRows",Eo),w("row-","gridRow"),m("row-(span)-(\\d+)","gridRow",$o),w("row-start-","gridRowStart"),m("row-start-(auto|\\d+)","gridRowStart"),w("row-end-","gridRowEnd"),m("row-end-(auto|\\d+)","gridRowEnd"),m("grid-flow-((row|col)(-dense)?)","gridAutoFlow",t=>Sr(Co(t))),m("grid-flow-(dense)","gridAutoFlow"),w("auto-cols-","gridAutoColumns"),w("auto-rows-","gridAutoRows"),w("gap-x(?:$|-)","gap","columnGap"),w("gap-y(?:$|-)","gap","rowGap"),w("gap(?:$|-)","gap"),"(justify-(?:items|self))-",m("justify-","justifyContent",_o),m("(content|items|self)-",t=>({["align-"+t[1]]:_o(t)})),m("(place-(content|items|self))-",({1:t,$$:e})=>({[t]:("wun".includes(e[3])?"space-":"")+e})),w("p([xytrbl])?(?:$|-)","padding",it("padding")),w("-?m([xytrbl])?(?:$|-)","margin",it("margin")),w("-?space-(x|y)(?:$|-)","space",({1:t,_:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[t]]:`calc(${e} * calc(1 - var(--tw-space-${t}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[t]]:`calc(${e} * var(--tw-space-${t}-reverse))`}})),m("space-(x|y)-reverse",({1:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"1"}})),w("w-","width"),w("min-w-","minWidth"),w("max-w-","maxWidth"),w("h-","height"),w("min-h-","minHeight"),w("max-h-","maxHeight"),w("font-","fontWeight"),w("font-","fontFamily",({_:t})=>typeof(t=j(t))[1]=="string"?{fontFamily:se(t)}:{fontFamily:se(t[0]),...t[1]}),m("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),m("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),m("italic","fontStyle"),m("not-italic",{fontStyle:"normal"}),m("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:t,2:e="",3:r})=>e=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(r?"numeric-fraction":"pt".includes(e[0])?"numeric-spacing":e?"numeric-figure":t)]:t,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...xe({"--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,/*!*/ /*!*/)"})}),w("tracking-","letterSpacing"),w("leading-","lineHeight"),m("list-(inside|outside)","listStylePosition"),w("list-","listStyleType"),m("list-","listStyleType"),w("placeholder-opacity-","placeholderOpacity",({_:t})=>({"&::placeholder":{"--tw-placeholder-opacity":t}})),q("placeholder-",{property:"color",selector:"&::placeholder"}),m("text-(left|center|right|justify|start|end)","textAlign"),m("text-(ellipsis|clip)","textOverflow"),w("text-opacity-","textOpacity","--tw-text-opacity"),q("text-",{property:"color"}),w("text-","fontSize",({_:t})=>typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}),w("indent-","textIndent"),m("(overline|underline|line-through)","textDecorationLine"),m("no-underline",{textDecorationLine:"none"}),w("underline-offset-","textUnderlineOffset"),q("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),w("decoration-","textDecorationThickness"),m("decoration-","textDecorationStyle"),m("(uppercase|lowercase|capitalize)","textTransform"),m("normal-case",{textTransform:"none"}),m("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),m("align-","verticalAlign"),m("whitespace-","whiteSpace"),m("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),m("break-words",{overflowWrap:"break-word"}),m("break-all",{wordBreak:"break-all"}),m("break-keep",{wordBreak:"keep-all"}),q("caret-",{opacityVariable:!1,opacitySection:"opacity"}),q("accent-",{opacityVariable:!1,opacitySection:"opacity"}),m("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:t})=>`linear-gradient(to ${Ue(t," ")},var(--tw-gradient-stops))`),q("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-from":t.value,"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),q("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${t.value},var(--tw-gradient-to)`})),q("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),m("bg-(fixed|local|scroll)","backgroundAttachment"),m("bg-origin-(border|padding|content)","backgroundOrigin",({1:t})=>t+"-box"),m(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),m("bg-blend-","backgroundBlendMode"),m("bg-clip-(border|padding|content|text)","backgroundClip",({1:t})=>t+(t=="text"?"":"-box")),w("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),q("bg-",{section:"backgroundColor"}),w("bg-","backgroundImage"),w("bg-","backgroundPosition"),m("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",Sr),w("bg-","backgroundSize"),w("rounded(?:$|-)","borderRadius"),w("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:t,_:e})=>{let r={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[t]||[t,t];return{[`border-${Ue(r[0])}-radius`]:e,[`border-${Ue(r[1])}-radius`]:e}}),m("border-(collapse|separate)","borderCollapse"),w("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),m("border-(solid|dashed|dotted|double|none)","borderStyle"),w("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:t,_:e})=>({...xe({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(t||"-x")]:e,["--tw-border-spacing"+(t||"-y")]:e,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),q("border-([xytrbl])-",{section:"borderColor"},it("border","Color")),q("border-"),w("border-([xytrbl])(?:$|-)","borderWidth",it("border","Width")),w("border(?:$|-)","borderWidth"),w("divide-opacity(?:$|-)","divideOpacity",({_:t})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":t}})),m("divide-(solid|dashed|dotted|double|none)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:t}})),m("divide-([xy]-reverse)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+t]:"1"}})),w("divide-([xy])(?:$|-)","divideWidth",({1:t,_:e})=>{let r={x:"lr",y:"tb"}[t];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${t}-reverse`]:"0",[`border-${Ue(r[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${t}-reverse)))`,[`border-${Ue(r[1])}Width`]:`calc(${e} * var(--tw-divide-${t}-reverse))`}}}),q("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),w("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),q("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),w("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),m("ring-inset",{"--tw-ring-inset":"inset"}),q("ring-",{property:"--tw-ring-color"}),w("ring(?:$|-)","ringWidth",({_:t},{theme:e})=>({...xe({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":e("ringOffsetWidth","","0px"),"--tw-ring-offset-color":te(e("ringOffsetColor","","#fff")),"--tw-ring-color":te(e("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":e("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${t} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),q("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-shadow-color":t.value,"--tw-shadow":"var(--tw-shadow-colored)"})),w("shadow(?:$|-)","boxShadow",({_:t})=>({...xe({"--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":se(t),"--tw-shadow-colored":se(t).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),w("(opacity)-"),m("mix-blend-","mixBlendMode"),...So(),...So("backdrop-"),w("transition(?:$|-)","transitionProperty",(t,{theme:e})=>({transitionProperty:se(t),transitionTimingFunction:t._=="none"?void 0:se(e("transitionTimingFunction","")),transitionDuration:t._=="none"?void 0:se(e("transitionDuration",""))})),w("duration(?:$|-)","transitionDuration","transitionDuration",se),w("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",se),w("delay(?:$|-)","transitionDelay","transitionDelay",se),w("animate(?:$|-)","animation",(t,{theme:e,h:r,e:i})=>{let n=se(t),s=n.split(" "),o=e("keyframes",s[0]);return o?{["@keyframes "+(s[0]=i(r(s[0])))]:o,animation:s.join(" ")}:{animation:n}}),"(transform)-(none)",m("transform",ln),m("transform-(cpu|gpu)",({1:t})=>({"--tw-transform":Io(t=="gpu")})),w("scale(-[xy])?-","scale",({1:t,_:e})=>({["--tw-scale"+(t||"-x")]:e,["--tw-scale"+(t||"-y")]:e,...ln()})),w("-?(rotate)-","rotate",an),w("-?(translate-[xy])-","translate",an),w("-?(skew-[xy])-","skew",an),m("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",Sr),"(appearance)-",w("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",w("(cursor)-"),"(cursor)-",m("snap-(none)","scroll-snap-type"),m("snap-(x|y|both)",({1:t})=>({...xe({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":t+" var(--tw-scroll-snap-strictness)"})),m("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),m("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),m("snap-(normal|always)","scroll-snap-stop"),m("scroll-(auto|smooth)","scroll-behavior"),w("scroll-p([xytrbl])?(?:$|-)","padding",it("scroll-padding")),w("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",it("scroll-margin")),m("touch-(auto|none|manipulation)","touch-action"),m("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:t,2:e,3:r})=>({...xe({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${e?"pan-x":r?"pan-y":t}`]:t,"touch-action":"var(--tw-touch-action)"})),m("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),m("outline",{outlineStyle:"solid"}),m("outline-(dashed|dotted|double)","outlineStyle"),w("-?(outline-offset)-"),q("outline-",{opacityVariable:!1,opacitySection:"opacity"}),w("outline-","outlineWidth"),"(pointer-events)-",w("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:t})=>({x:"horizontal",y:"vertical"})[t]||t||"both"],m("select-(none|text|all|auto)","userSelect"),q("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),q("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),w("stroke-","strokeWidth"),m("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),m("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function Sr(t){return(typeof t=="string"?t:t[1]).replace(/-/g," ").trim()}function Co(t){return(typeof t=="string"?t:t[1]).replace("col","column")}function Ue(t,e="-"){let r=[];for(let i of t)r.push({t:"top",r:"right",b:"bottom",l:"left"}[i]);return r.join(e)}function se(t){return t&&""+(t._||t)}function _o({$$:t}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[t[3]||""]||"")+t}function it(t,e=""){return({1:r,_:i})=>{let n={x:"lr",y:"tb"}[r]||r+r;return n?{...At(t+"-"+Ue(n[0])+e,i),...At(t+"-"+Ue(n[1])+e,i)}:At(t+e,i)}}function So(t=""){let e=["blur","brightness","contrast","grayscale","hue-rotate","invert",t&&"opacity","saturate","sepia",!t&&"drop-shadow"].filter(Boolean),r={};for(let i of e)r[`--tw-${t}${i}`]="var(--tw-empty,/*!*/ /*!*/)";return r={...xe(r),[`${t}filter`]:e.map(i=>`var(--tw-${t}${i})`).join(" ")},[`(${t}filter)-(none)`,m(`${t}filter`,r),...e.map(i=>w(`${i[0]=="h"?"-?":""}(${t}${i})(?:$|-)`,i,({1:n,_:s})=>({[`--tw-${n}`]:j(s).map(o=>`${i}(${o})`).join(" "),...r})))]}function an({1:t,_:e}){return{["--tw-"+t]:e,...ln()}}function ln(){return{...xe({"--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":Io()}),transform:"var(--tw-transform)"}}function Io(t){return[t?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function $o({1:t,2:e}){return`${t} ${e} / ${t} ${e}`}function Eo({1:t}){return`repeat(${t},minmax(0,1fr))`}function xe(t){return{"@layer defaults":{"*,::before,::after":t,"::backdrop":t}}}var Ao=[["sticky","@supports ((position: -webkit-sticky) or (position:sticky))"],["motion-reduce","@media (prefers-reduced-motion:reduce)"],["motion-safe","@media (prefers-reduced-motion:no-preference)"],["print","@media print"],["(portrait|landscape)",({1:t})=>`@media (orientation:${t})`],["contrast-(more|less)",({1:t})=>`@media (prefers-contrast:${t})`],["(first-(letter|line)|placeholder|backdrop|before|after)",({1:t})=>`&::${t}`],["(marker|selection)",({1:t})=>`& *::${t},&::${t}`],["file","&::file-selector-button"],["(first|last|only)",({1:t})=>`&:${t}-child`],["even","&:nth-child(2n)"],["odd","&:nth-child(odd)"],["open","&[open]"],["(aria|data)-",({1:t,$$:e},r)=>e&&`&[${t}-${r.theme(t,e)||le(e,"",r)||`${e}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:t,3:e="",4:r,5:i="",6:n=e},{e:s,h:o,v:a})=>{let l=rt(i)||(r[0]=="["?r:a(r.slice(1)));return`${(l.includes("&")?l:"&"+l).replace(/&/g,`:merge(.${s(o(t+n))})`)}${t[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:t})=>`[dir="${t}"] &`],["supports-",({$$:t},e)=>{if(t&&(t=e.theme("supports",t)||le(t,"",e)),t)return t.includes(":")||(t+=":var(--tw)"),/^\w*\s*\(/.test(t)||(t=`(${t})`),`@supports ${t.replace(/\b(and|or|not)\b/g," $1 ").trim()}`}],["max-",({$$:t},e)=>{if(t&&(t=e.theme("screens",t)||le(t,"",e)),typeof t=="string")return`@media not all and (min-width:${t})`}],["min-",({$$:t},e)=>(t&&(t=le(t,"",e)),t&&`@media (min-width:${t})`)],[/^\[(.+)]$/,({1:t})=>/[&@]/.test(t)&&rt(t).replace(/[}]+$/,"").split("{")]];function Do({colors:t,disablePreflight:e}={}){return{preflight:e?void 0:ko,theme:{...Lt,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...t}},variants:Ao,rules:Mo,finalize(r){return r.n&&r.d&&r.r.some(i=>/^&::(before|after)$/.test(i))&&!/(^|;)content:/.test(r.d)?{...r,d:"content:var(--tw-content);"+r.d}:r}}}var sc={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},oc={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},ac={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},lc={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},cc={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},uc={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},dc={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},hc={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},pc={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},fc={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},mc={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},gc={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},wc={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},yc={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},vc={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},bc={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},xc={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},kc={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},Cc={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},_c={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},Sc={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},$c={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},jo={__proto__:null,slate:sc,gray:oc,zinc:ac,neutral:lc,stone:cc,red:uc,orange:dc,amber:hc,yellow:pc,lime:fc,green:mc,emerald:gc,teal:wc,cyan:yc,sky:vc,blue:bc,indigo:xc,violet:kc,purple:Cc,fuchsia:_c,pink:Sc,rose:$c};function $r({disablePreflight:t}={}){return Do({colors:jo,disablePreflight:t})}function Er({className:t="prose",defaultColor:e="gray",extend:r={},colors:i={}}={}){return i={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",...i,dark:i.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",...i.dark}},{variants:[["headings","h1,h2,h3,h4,h5,h6,th"],["h1"],["h2"],["h3"],["h4"],["h5"],["h6"],["p"],["a"],["blockquote"],["figure"],["figcaption"],["strong"],["em"],["code"],["pre"],["ol"],["ul"],["li"],["table"],["thead"],["tr"],["th"],["td"],["img"],["video"],["hr"],["lead",".lead"]].map(([s,o=s])=>[`${t}-${s}`,(a,l)=>Oo(t,o[0]=="."?"."+l.e(l.h(o.slice(1))):o,l,c=>`& :is(${c.trim()})`)]),rules:[[`(lead|not-${t})`,({1:s},{h:o})=>[{c:o(s)}]],[`${t}-invert`,{"@layer base":{"--tw-prose-body":"var(--tw-prose-invert-body)","--tw-prose-headings":"var(--tw-prose-invert-headings)","--tw-prose-lead":"var(--tw-prose-invert-lead)","--tw-prose-links":"var(--tw-prose-invert-links)","--tw-prose-bold":"var(--tw-prose-invert-bold)","--tw-prose-counters":"var(--tw-prose-invert-counters)","--tw-prose-bullets":"var(--tw-prose-invert-bullets)","--tw-prose-hr":"var(--tw-prose-invert-hr)","--tw-prose-quotes":"var(--tw-prose-invert-quotes)","--tw-prose-quote-borders":"var(--tw-prose-invert-quote-borders)","--tw-prose-captions":"var(--tw-prose-invert-captions)","--tw-prose-code":"var(--tw-prose-invert-code)","--tw-prose-pre-code":"var(--tw-prose-invert-pre-code)","--tw-prose-pre-bg":"var(--tw-prose-invert-pre-bg)","--tw-prose-th-borders":"var(--tw-prose-invert-th-borders)","--tw-prose-td-borders":"var(--tw-prose-invert-td-borders)"}}],[t+"-",({$$:s},o)=>{let a=To(o.theme("fontSize",s));return a&&{"@layer components":a}}],[t+"-",({$$:s},o)=>n(s,o)],[t,(s,o)=>({...n(e,o),"@layer base":[Lo(t,o,{a:{color:"var(--tw-prose-links)",textDecorationLine:"underline",fontWeight:"500"},strong:{color:"var(--tw-prose-bold)",fontWeight:"600"},"a strong,blockquote strong,thead th strong":{color:"inherit"},ul:{listStyleType:"disc"},ol:{listStyleType:"decimal"},'ol[type="A"]':{listStyleType:"upper-alpha"},'ol[type="a"]':{listStyleType:"lower-alpha"},'ol[type="A" s]':{listStyleType:"upper-alpha"},'ol[type="a" s]':{listStyleType:"lower-alpha"},'ol[type="I"]':{listStyleType:"upper-roman"},'ol[type="i"]':{listStyleType:"lower-roman"},'ol[type="I" s]':{listStyleType:"upper-roman"},'ol[type="i" s]':{listStyleType:"lower-roman"},'ol[type="1"]':{listStyleType:"decimal"},"ol,ul":{marginTop:C(20,16),marginBottom:C(20,16),paddingLeft:C(26,16)},li:{marginTop:C(8,16),marginBottom:C(8,16)},"ol>li,ul>li":{paddingLeft:C(6,16)},">ul>li p":{marginTop:C(12,16),marginBottom:C(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:C(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:C(20,16)},"ol>li::marker":{fontWeight:"400",color:"var(--tw-prose-counters)"},"ul>li::marker":{color:"var(--tw-prose-bullets)"},"ul ul,ul ol,ol ul,ol ol":{marginTop:C(12,16),marginBottom:C(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:C(48,16),marginBottom:C(48,16)},blockquote:{marginTop:C(32,20),marginBottom:C(32,20),paddingLeft:C(20,20),fontWeight:"500",fontStyle:"italic",color:"var(--tw-prose-quotes)",borderLeftWidth:"0.25rem",borderLeftColor:"var(--tw-prose-quote-borders)",quotes:'"\\201C""\\201D""\\2018""\\2019"'},"blockquote p:first-of-type::before":{content:"open-quote"},"blockquote p:last-of-type::after":{content:"close-quote"},p:{marginTop:C(20,16),marginBottom:C(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:C(36,16),marginTop:"0",marginBottom:C(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900",color:"inherit"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:C(24,16),marginTop:C(48,24),marginBottom:C(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800",color:"inherit"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:C(20,16),marginTop:C(32,20),marginBottom:C(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700",color:"inherit"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:C(24,16),marginBottom:C(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700",color:"inherit"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:C(32,16),marginBottom:C(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:C(14,16),lineHeight:"1.4",marginTop:C(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:C(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:C(21,24)},"h3 code":{fontSize:C(18,20)},"a code,h1 code,h2 code,h3 code,h4 code,blockquote code,thead th code":{color:"inherit"},pre:{color:"var(--tw-prose-pre-code)",backgroundColor:"var(--tw-prose-pre-bg)",overflowX:"auto",fontWeight:"400",fontSize:C(14,16),lineHeight:"1.7",marginTop:C(24,14),marginBottom:C(24,14),borderRadius:"0.375rem",paddingTop:C(12,14),paddingRight:C(16,14),paddingBottom:C(12,14),paddingLeft:C(16,14)},"pre code":{backgroundColor:"transparent",borderWidth:"0",borderRadius:"0",padding:"0",fontWeight:"inherit",color:"inherit",fontSize:"inherit",fontFamily:"inherit",lineHeight:"inherit"},"pre code::before":{content:"none"},"pre code::after":{content:"none"},table:{width:"100%",tableLayout:"auto",textAlign:"left",marginTop:C(32,16),marginBottom:C(32,16),fontSize:C(14,16),lineHeight:"1.7"},thead:{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-th-borders)"},"thead th":{color:"var(--tw-prose-headings)",fontWeight:"600",verticalAlign:"bottom",paddingRight:C(8,14),paddingBottom:C(8,14),paddingLeft:C(8,14)},"thead th:first-child":{paddingLeft:"0"},"thead th:last-child":{paddingRight:"0"},"tbody tr":{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-td-borders)"},"tbody tr:last-child":{borderBottomWidth:"0"},"tbody td,tfoot td":{verticalAlign:"baseline",paddingTop:C(8,14),paddingRight:C(8,14),paddingBottom:C(8,14),paddingLeft:C(8,14)},"tbody td:first-child,tfoot td:first-child":{paddingLeft:"0"},"tbody td:last-child,tfoot td:last-child":{paddingRight:"0"},[`.${o.e(o.h("lead"))}`]:{color:"var(--tw-prose-lead)",fontSize:C(20,16),lineHeight:"1.6",marginTop:C(24,20),marginBottom:C(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),Lo(t,o,r)],"@layer components":{...To(o.theme("fontSize","base")),color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"}})]]};function n(s,o){let a={},l={},c=(d,h,f)=>{let g=o.theme(`colors.${s}.${h}`,h);f["--tw-prose-"+d]=te(g);let p=f!=l&&o.d("colors",`${s}-${h}`,g);p&&(l["--tw-prose-"+d]=te(p))};for(let d in i){let h=i[d];d!="dark"&&h&&c(d,h,a)}for(let d in i.dark||{}){let h=i.dark[d];h&&(i.dark?c("invert-"+d,h,a):c(d,h,l))}return Object.keys(a).length?{"@layer defaults":{"&":a,[o.v("dark")]:l}}:void 0}}function Lo(t,e,r){let i={};for(let n in r)i[Oo(t,n,e,s=>`.${e.e(e.h(t))}${s}`)]=r[n];return i}function Oo(t,e,{e:r,h:i},n){return e.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(s,o=" ",a=s,l="")=>n(`${o}:where(${a}):not(:where(.${r(i("not-"+t))} *))${l}`))}function To(t){return t?typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}:void 0}function C(t,e){return`${(t/e).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}var cn=Dt({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:[$r(),Cr(),_r(),Er()]});function Mr(t,e=!0){let r=(function(){if(Ec)try{let l=kr(new CSSStyleSheet);return l.connect=c=>{let d=un(c);d.adoptedStyleSheets=[...d.adoptedStyleSheets,l.target]},l.disconnect=xr,l}catch{}let s=document.createElement("style");s.media="not all",document.head.prepend(s);let o=[kr(s)],a=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,d){o[0].insert(l,c,d);let h=this.target.cssRules[c];o.forEach((f,g)=>g&&f.target.insertRule(h.cssText,c))},resume(l,c){return o[0].resume(l,c)},connect(l){let c=document.createElement("style");un(l).appendChild(c);let d=kr(c),{cssRules:h}=this.target;for(let f=0;f<h.length;f++)d.target.insertRule(h[f].cssText,f);o.push(d),a.set(l,d)},disconnect(l){let c=o.indexOf(a.get(l));c>=0&&o.splice(c,1)}}})(),i=go({...t,hash:t.hash??e},r),n=wo(i);return function(o){return class extends o{connectedCallback(){super.connectedCallback?.(),r.connect(this),n.observe(un(this))}disconnectedCallback(){r.disconnect(this),super.disconnectedCallback?.()}constructor(...l){super(...l),this.tw=i}}}}var Ec=typeof ShadowRoot<"u"&&(typeof ShadyCSS>"u"||ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;function un(t){return t.shadowRoot||t.attachShadow({mode:"open"})}var k=t=>Mr(cn)(t);var dn=class extends k(v){static properties={color:{type:String},radius:{type:String},size:{type:String},border:{type:String},darkMode:{type:Boolean,attribute:"dark-mode"}};static styles=O`
|
|
130
|
+
</svg>`};var wl=ks,vi=class extends nr{resolveIcon(e){let r=wl[e];if(!r)throw console.warn("hi-outline: icon not found",e),new Error(`Icon ${e} not found`);return r}render(){super.render();let e=this.shadowRoot?.querySelector("svg");if(!e)throw new Error("svgEl not found "+this.name);e.setAttribute("fill","none"),e.querySelectorAll("[stroke]").forEach(r=>{r.setAttribute("stroke","currentColor")})}};customElements.get("hi-outline")||customElements.define("hi-outline",vi);var sr=class{#e;#t;#r;constructor(e,r){if(!e)throw new Error("host is required");if(!r)throw new Error("config is required");this.#e=e,this.#e.addController(this),this.#t=r}connect(e){this.#t=e,this.#r=this.#i()}hostConnected(){this.#r||setTimeout(()=>{this.#r||(this.#r=this.#i())},0)}hostDisconnected(){this.#r?.close(1e3,"lit_host_disconnected"),this.#r=void 0}send(e){this.#r?.send(e)}close(e,r){this.#r?.close(e,r)}get isConnected(){return this.#r?.readyState===WebSocket.OPEN}get isConnecting(){return this.#r?.readyState===WebSocket.CONNECTING}#i(){let e=new WebSocket(this.#t.url());return this.#t.onClose&&(e.onclose=this.#t.onClose),this.#t.onOpen&&(e.onopen=this.#t.onOpen),this.#t.onError&&(e.onerror=this.#t.onError),this.#t.onMessage&&(e.onmessage=this.#t.onMessage),e}};var bi=t=>!!(t&&t.constructor&&t.call&&t.apply);var Cs=t=>!(!t||!t.then||!bi(t.then));var _s=(t,e,r=!1)=>{if(!t)return[];let i=(s,o)=>e(s)-e(o),n=(s,o)=>e(o)-e(s);return t.slice().sort(r===!0?n:i)};function*xi(t,e,r=n=>n,i=1){let n=bi(r)?r:()=>r,s=e?t:0,o=e??t;for(let a=s;a<=o&&(yield n(a),!(a+i>o));a+=i);}var $s=(t,e,r,i)=>Array.from(xi(t,e,r,i));var Ss=(t,e)=>t?t.reduce((r,i)=>{let[n,s]=r;return e(i)?[[...n,i],s]:[n,[...s,i]]},[[],[]]):[[],[]];var ki=class extends Error{constructor(e=[]){super();let r=e.find(i=>i.name)?.name??"";this.name=`AggregateError(${r}...)`,this.message=`AggregateError with ${e.length} errors`,this.stack=e.find(i=>i.stack)?.stack??this.stack,this.errors=e}},Ci=async(t,e,r)=>{let i=e.map((c,d)=>({index:d,item:c})),n=async c=>{let d=[];for(;;){let h=i.pop();if(!h)return c(d);let[f,g]=await or(r)(h.item);d.push({error:f,result:g,index:h.index})}},s=$s(1,t).map(()=>new Promise(n)),o=await Promise.all(s),[a,l]=Ss(_s(o.flat(),c=>c.index),c=>!!c.error);if(a.length>0)throw new ki(a.map(c=>c.error));return l.map(c=>c.result)};var _i=async(t,e)=>{let r=t?.times??3,i=t?.delay,n=t?.backoff??null;for(let s of xi(1,r)){let[o,a]=await or(e)(l=>{throw{_exited:l}});if(!o)return a;if(o._exited)throw o._exited;if(s===r)throw o;i&&await Ge(i),n&&await Ge(n(s))}},Ge=t=>new Promise(e=>setTimeout(e,t)),or=t=>(...e)=>{try{let r=t(...e);return Cs(r)?r.then(i=>[void 0,i]).catch(i=>[i,void 0]):[void 0,r]}catch(r){return[r,void 0]}};var Ze=({interval:t},e)=>{let r=!0,i,n=(...s)=>{r&&(e(...s),r=!1,i=setTimeout(()=>{r=!0,i=void 0},t))};return n.isThrottled=()=>i!==void 0,n};async function Es(t,e){let r=t?.times??3,i=t?.delay,n=t?.backoff??null,s=o=>{throw{_bailed:o}};for(let o=0;o<r;o++)try{return await e(s,o)}catch(a){if(a&&typeof a=="object"&&"_bailed"in a)throw a._bailed;if(o===r-1)throw a;i&&await Ge(i),n&&await Ge(n(o+1))}throw new Error("unreachable")}var vl=!0,$i="Invariant failed";function D(t,e){if(!t){if(vl)throw new Error($i);var r=typeof e=="function"?e():e,i=r?"".concat($i,": ").concat(r):$i;throw new Error(i)}}var ar=class{#e;#t;#r=null;isStreaming=!1;typingIndicator;ranOutOfCredits=!1;messages=[];conversationId="";#i=0;#n;isLiveMode=!1;get hasQueuedMessages(){return this.#s.length>0}constructor(e,r){this.#e=e,this.#t=r,this.#t.autoConnect!==!1&&(this.#r=this.initWS()),e.addController(this)}#s=[];#o(e,{expectStreaming:r=!1}={}){return this.ranOutOfCredits?!1:this.#r?this.#r.isConnecting?(console.warn("WebSocket is connecting, message not sent",e),!1):this.#r.isConnected?(r&&!this.isLiveMode&&(this.isStreaming=!0,this.#e.requestUpdate()),this.#r.send(JSON.stringify(e)),!0):(console.warn("WebSocket is not connected, message not sent",e),this.retry(),!1):(console.warn("WebSocket not initialized, message not sent",e),this.connect(),!1)}async enqueueMessage(e,{expectStreaming:r=!1}={}){if(this.#s.length>0){let i=this.#s[this.#s.length-1];if(e.type==="USER_INPUT"&&i.message.type==="USER_INPUT"&&e.value===i.message.value)return!0}return this.#r||this.connect(),this.#r?.isConnected?this.#o(e,{expectStreaming:r}):(this.#s.push({message:e,options:{expectStreaming:r}}),this.#e.requestUpdate(),this.#r&&!this.#r.isConnecting&&!this.#r.isConnected&&this.retry(),await Es({times:5,delay:2e3},async()=>{if(this.#r?.isConnected){let i=[...this.#s];this.#s=[],this.#e.requestUpdate();let n=!1;for(let{message:s,options:o}of i){let a=this.#o(s,o);s===e&&(n=a)}return n}else throw new Error("WebSocket not connected yet")}).catch(()=>(console.warn("Failed to send message after retries",e),this.#s=[],this.#e.requestUpdate(),!1)))}async sendUserInput(e,{xUserData:r,xCustomInstructions:i,role:n="user",expectStreaming:s=!1,requestInputResponse:o}={}){return this.enqueueMessage({type:"USER_INPUT",value:e,role:n,xUserData:r,xCustomInstructions:i,requestInputResponse:o},{expectStreaming:s})}async enqueueUserInput(e,{xUserData:r,xCustomInstructions:i,role:n="user",expectStreaming:s=!1,requestInputResponse:o}={}){return this.enqueueMessage({type:"USER_INPUT",value:e,role:n,xUserData:r,xCustomInstructions:i,requestInputResponse:o},{expectStreaming:s})}sendImageDelete(e){D(e,"imageId is required"),this.enqueueMessage({type:"USER_FILE_DELETE",imageId:e}).catch(console.warn)}sendUserCancel(){this.enqueueMessage({type:"USER_CANCEL"}).catch(console.warn)}sendUserTypingStart(){this.#o({type:"USER_TYPING_START"})}sendUserTypingStop(){this.enqueueMessage({type:"USER_TYPING_STOP"}).catch(console.warn)}sendNewChat(){this.enqueueMessage({type:"NEW_CHAT"})}sendUserMeta(e){this.enqueueMessage({type:"USER_META",metadata:e}).catch(console.warn)}reloadConfig(){this.enqueueMessage({type:"RELOAD_CONFIG"}).catch(console.warn)}close(){this.#r?.close(1e3,"closed by user")}retry(){clearTimeout(this.#n),this.#n=setTimeout(()=>{this.#t.onReconnect?.(),this.#r=this.initWS()},1e3*this.#i),this.#i++}initWS(){return new sr(this.#e,{url:()=>this.#t.url(this.conversationId,{}),onOpen:e=>this.#a(e),onMessage:e=>this.#d(JSON.parse(e.data)),onError:e=>this.#c(e),onClose:e=>this.#l(e)})}#a(e){this.#i=0}#d(e){switch(e.type){case"NEW_MESSAGE":{this.messages=[...this.messages,{...e.message,streaming:!0}].filter((r,i,n)=>i===n.findIndex(s=>s.id===r.id)),this.typingIndicator=void 0,this.#e.requestUpdate(),this.#t.onNewMessage?.(e.message),this.#t.persistConversationState?.(this.conversationId,this.messages);break}case"APPEND_MESSAGE":{let r=this.messages.find(i=>i.id===e.message.id);if(r){switch(e.message.content_type){case"text":{let{part:i,delta:n,position:s}=e.message;r.content=r.content.slice(0,s)+n,r.parts||=[],r.parts[i]={text:r.parts[i]&&"text"in r.parts[i]?(r.parts[i].text||"").slice(0,s)+n:n};break}case"html":{let{part:i,delta:n,position:s}=e.message;r.parts||=[],r.parts[i]={html:r.parts[i]&&"html"in r.parts[i]?(r.parts[i].html||"").slice(0,s)+n:n};break}case"data":{let{part:i}=e.message;r.parts||=[],r.parts[i]={tag:e.message.tag,data:r.parts[i]&&"data"in r.parts[i]?Object.assign(r.parts[i].data||{},e.message.data):e.message.data};break}}e.metadata&&(r.metadata=e.metadata),this.#t.onMessageAppend?.(e),this.#e.requestUpdate()}else throw new Error(`Message with id ${e.message.id} not found`);break}case"MESSAGE_DONE":{let r=this.messages.find(i=>i.id===e.message.id);if(r)Object.assign(r,e.message),r.streaming=!1;else throw new Error(`Message with id ${e.message.id} not found`);this.isStreaming=!1,this.#e.requestUpdate(),this.#t.onMessageDone?.(e,r),this.#t.persistConversationState?.(this.conversationId,this.messages);break}case"MESSAGE_CANCEL":{this.isStreaming=!1,this.typingIndicator=void 0,this.#e.requestUpdate();break}case"ERROR":{this.#t.onMessageError?.(e);break}case"CONNECTED":{this.conversationId=e.conversationId,this.messages=e.messages,this.#t.onConnect?.(e.conversationId,e.metadata),this.#t.persistConversationState?.(e.conversationId,e.messages),this.isLiveMode=e.metadata.isLiveMode,this.#e.requestUpdate();break}case"TYPING_START":{e.role==="assistant"&&(this.isStreaming=!0),this.typingIndicator={role:e.role,metadata:e.metadata},this.#e.requestUpdate();break}case"TYPING_STOP":{this.typingIndicator=void 0,this.#e.requestUpdate();break}case"RAN_OUT_OF_CREDITS":{this.ranOutOfCredits=!0,this.#e.requestUpdate();break}case"RECONNECT":{this.reconnectSocket(),this.#e.requestUpdate();break}default:console.warn(`Unknown message type: ${JSON.stringify(e)}`)}}#c(e){console.error("onError",e),this.#t.onError?.(e)}#l(e){this.#e.isConnected&&this.#r&&!this.#r.isConnected&&e.reason==="reconnect"&&this.retry(),this.isStreaming=!1,this.typingIndicator=void 0,this.#e.requestUpdate(),this.#t.onClose?.()}hostConnected(){this.conversationId=this.#t.restoreConversationState?.()?.conversationId||"",this.messages=this.#t.restoreConversationState?.()?.messages||[]}reset(){this.#t.onReset?.(),this.isStreaming=!1,this.typingIndicator=void 0,this.ranOutOfCredits=!1,this.messages=[],this.conversationId="",this.isLiveMode=!1,this.#s=[],this.#e.requestUpdate()}hostDisconnected(){clearTimeout(this.#n)}connect(){this.#r||(this.#r=this.initWS())}reconnectSocket(){this.#r?.close(1e3,"destroy"),this.#r=this.initWS()}get lastMsg(){if(this.messages.length>0)return this.messages[this.messages.length-1]}get isConnected(){return this.#r?.isConnected??!1}};var bl=Symbol();var Ms=Object.getPrototypeOf,Si=new WeakMap,xl=t=>t&&(Si.has(t)?Si.get(t):Ms(t)===Object.prototype||Ms(t)===Array.prototype);var Is=t=>xl(t)&&t[bl]||null,Ei=(t,e=!0)=>{Si.set(t,e)};var Ii=t=>typeof t=="object"&&t!==null,kl=t=>Ii(t)&&!Ai.has(t)&&(Array.isArray(t)||!(Symbol.iterator in t))&&!(t instanceof WeakMap)&&!(t instanceof WeakSet)&&!(t instanceof Error)&&!(t instanceof Number)&&!(t instanceof Date)&&!(t instanceof String)&&!(t instanceof RegExp)&&!(t instanceof ArrayBuffer)&&!(t instanceof Promise),Ls=(t,e)=>{let r=As.get(t);if(r?.[0]===e)return r[1];let i=Array.isArray(t)?[]:Object.create(Object.getPrototypeOf(t));return Ei(i,!0),As.set(t,[e,i]),Reflect.ownKeys(t).forEach(n=>{if(Object.getOwnPropertyDescriptor(i,n))return;let s=Reflect.get(t,n),{enumerable:o}=Reflect.getOwnPropertyDescriptor(t,n),a={value:s,enumerable:o,configurable:!0};if(Ai.has(s))Ei(s,!1);else if(Te.has(s)){let[l,c]=Te.get(s);a.value=Ls(l,c())}Object.defineProperty(i,n,a)}),Object.preventExtensions(i)},Cl=(t,e,r,i)=>({deleteProperty(n,s){let o=Reflect.get(n,s);r(s);let a=Reflect.deleteProperty(n,s);return a&&i(["delete",[s],o]),a},set(n,s,o,a){let l=!t()&&Reflect.has(n,s),c=Reflect.get(n,s,a);if(l&&(Ds(c,o)||lr.has(o)&&Ds(c,lr.get(o))))return!0;r(s),Ii(o)&&(o=Is(o)||o);let d=!Te.has(o)&&$l(o)?Di(o):o;return e(s,d),Reflect.set(n,s,d,a),i(["set",[s],o,c]),!0}}),Te=new WeakMap,Ai=new WeakSet,As=new WeakMap,Mi=[1],lr=new WeakMap,Ds=Object.is,_l=(t,e)=>new Proxy(t,e),$l=kl,Sl=Ls,El=Cl;function Di(t={}){if(!Ii(t))throw new Error("object required");let e=lr.get(t);if(e)return e;let r=Mi[0],i=new Set,n=(b,$=++Mi[0])=>{r!==$&&(s=r=$,i.forEach(y=>y(b,$)))},s=r,o=(b=Mi[0])=>(s!==b&&(s=b,l.forEach(([$])=>{let y=$[1](b);y>r&&(r=y)})),r),a=b=>($,y)=>{let x=[...$];x[1]=[b,...x[1]],n(x,y)},l=new Map,c=(b,$)=>{let y=!Ai.has($)&&Te.get($);if(y){if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&l.has(b))throw new Error("prop listener already exists");if(i.size){let x=y[2](a(b));l.set(b,[y,x])}else l.set(b,[y])}},d=b=>{var $;let y=l.get(b);y&&(l.delete(b),($=y[1])==null||$.call(y))},h=b=>(i.add(b),i.size===1&&l.forEach(([y,x],E)=>{if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&x)throw new Error("remove already exists");let T=y[2](a(E));l.set(E,[y,T])}),()=>{i.delete(b),i.size===0&&l.forEach(([y,x],E)=>{x&&(x(),l.set(E,[y]))})}),f=!0,g=El(()=>f,c,d,n),p=_l(t,g);lr.set(t,p);let S=[t,o,h];return Te.set(p,S),Reflect.ownKeys(t).forEach(b=>{let $=Object.getOwnPropertyDescriptor(t,b);"value"in $&&$.writable&&(p[b]=t[b])}),f=!1,p}function cr(t,e,r){let i=Te.get(t);(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!i&&console.warn("Please use proxy object");let n,s=[],o=i[2],a=!1,c=o(d=>{if(s.push(d),r){e(s.splice(0));return}n||(n=Promise.resolve().then(()=>{n=void 0,a&&e(s.splice(0))}))});return a=!0,()=>{a=!1,c()}}function Ke(t){let e=Te.get(t);(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!e&&console.warn("Please use proxy object");let[r,i]=e;return Sl(r,i())}var Je=class{#e;#t;#r;#i=()=>{};constructor(e,r){this.#e=e,this.#t=r,this.#r=Ke(r),e.addController(this)}get state(){return this.#r}get value(){return this.#r}hostConnected(){this.#i(),this.#i=cr(this.#t,()=>{this.#r=Ke(this.#t),this.#e.requestUpdate()})}hostDisconnected(){this.#i()}};var ve=class{#e;#t;proxyObject;#r;#i=()=>{};constructor(e,r,i){this.#e=e,this.#t=i,this.proxyObject=Di(r),this.#r=Ke(this.proxyObject),e.addController(this)}get state(){return this.#r}get value(){return this.#r}hostConnected(){this.#i(),this.#t?.subscribe&&(this.#i=cr(this.proxyObject,()=>{this.#r=Ke(this.proxyObject),this.#e.requestUpdate()}))}hostDisconnected(){this.#i()}};var ur=class{#e;#t;#r;#i=null;#n=null;constructor(e,{provider:r,tag:i,key:n}){this.#e=e,this.#t=i,this.#r=n,e.addController(this)}get value(){return this.#n?this.#n.value:null}hostConnected(){if(this.#n||(this.#i=Ml(this.#e,this.#t),!this.#i))return;let e=this.#i[this.#r]instanceof ve?this.#i[this.#r]:null;e&&(this.#n=new Je(this.#e,e.proxyObject))}hostDisconnected(){}};function Ml(t,e){let r=t;for(;r;){let i=r.closest(e);if(i)return i;let n=r.getRootNode();if(n instanceof ShadowRoot)r=n.host;else break}return null}function Li(t,e){if(e<=0)return"";if(t=t??"",t.length>e){let r=e-1;return r>0&&t.charCodeAt(r-1)>=55296&&t.charCodeAt(r-1)<=56319&&r--,t.slice(0,r)+"\u2026"}return t}var $t=li(Oi(),1);var hr=class{#e;constructor({document:e}){this.#e=e}getCookies(){return(0,$t.parseCookie)(this.#e.cookie)||{}}getCookie(e){return this.getCookies()[e]||null}setCookie(e,r,i){if(D(typeof e=="string",`cookie name must be a string, got: ${typeof e}`),D(e,"cookie name must not be empty"),r==null){this.#e.cookie=(0,$t.stringifySetCookie)(e,"",{expires:new Date(0)});return}D(typeof r=="string",`value of cookie \`${e}\` must be a string, got: ${typeof r}`),this.#e.cookie=(0,$t.stringifySetCookie)(e,r,i)}deleteCookie(e){this.setCookie(e,null)}deleteCookies(e){let r=this.getCookies();for(let i in r)e(i)&&this.deleteCookie(i)}};var pr=class{#e;constructor({localStorage:e}){this.#e=e}getItem(e){try{let r=this.#e.getItem(e);return r?JSON.parse(r):null}catch{return null}}setItem(e,r){if(r==null){this.#e.removeItem(e);return}try{let i=JSON.stringify(r);this.#e.setItem(e,i)}catch(i){console.error(`Failed to store ${e} in localStorage:`,i)}}removeItem(e){this.#e.removeItem(e)}removeItems(e){let r=[];for(let i=0;i<this.#e.length;i++){let n=this.#e.key(i);n&&e(n)&&r.push(n)}for(let i of r)this.#e.removeItem(i)}};var St=li(Oi(),1);function Ui({window:t}){let e=t.location.hostname,r=t.document;if(e==="localhost"||/^\d+\.\d+\.\d+\.\d+$/.test(e)||/^\[.*\]$/.test(e))return;let i=e.split(".");if(i.length<2)return;let n="__molin_domain_test__";for(let s=2;s<=i.length;s++){let o=`.${i.slice(-s).join(".")}`;try{if(r.cookie=(0,St.stringifySetCookie)(n,"1",{domain:o,path:"/"}),(0,St.parseCookie)(r.cookie)[n]==="1")return r.cookie=(0,St.stringifySetCookie)(n,"",{domain:o,path:"/",expires:new Date(0)}),o}catch{continue}}return`.${i.slice(-2).join(".")}`}var Pi=class{#e;#t;#r;#i;constructor({window:e}){this.#e=e,this.#t=new hr({document:e.document}),this.#r=new pr({localStorage:e.localStorage}),this.#i=e.localStorage}get distinctID(){return this.#t.getCookie("molin_distinct_id")||this.#i.getItem("molin_distinct_id")||this.#r.getItem("molin_shop_assistant_distinct_id")}set distinctID(e){if(this.#r.removeItem("molin_shop_assistant_distinct_id"),this.#t.deleteCookie("molin_shop_assistant_distinct_id"),!e){this.#t.deleteCookie("molin_distinct_id"),this.#i.removeItem("molin_distinct_id");return}D(typeof e=="string","distinct_id must be a string");try{this.#t.setCookie("molin_distinct_id",e,{path:"/",sameSite:"lax",expires:new Date(Date.now()+1e3*60*60*24*365),domain:Ui({window:this.#e})})}catch(r){console.warn("Could not write distinct_id to cookie:",r)}try{this.#i.setItem("molin_distinct_id",e)}catch(r){console.warn("Could not write distinct_id to localStorage:",r)}}get widgetState(){return this.#r.getItem("molin_widget")||this.#r.getItem("_molin_widget_open_state")}set widgetState(e){this.#r.setItem("molin_widget",e),this.#r.removeItem("_molin_widget_open_state")}get popupState(){return this.#r.getItem("molin_popup")||this.#r.getItem("_molin_popup")}set popupState(e){this.#r.setItem("molin_popup",e),this.#r.removeItem("_molin_popup")}get disclaimerDismissed(){return this.#r.getItem("molin_disclaimer_dismissed")??!1}set disclaimerDismissed(e){this.#r.setItem("molin_disclaimer_dismissed",e)}getConversationId(e){D(typeof e=="string","widgetId must be a string"),D(e,"widgetId must not be empty");let r=`molin_${e}_conversation_id`;return this.#t.getCookie(r)||this.#i.getItem(r)||this.#r.getItem(`_molin_${e}`)?.conversationId}setConversationId(e,r){D(typeof e=="string","widgetId must be a string"),D(e,"widgetId must not be empty");let i=`molin_${e}_conversation_id`;if(!r){this.#t.deleteCookie(i),this.#i.removeItem(i);return}D(typeof r=="string",`conversation ID for widget ${e} must be a string`);try{this.#t.setCookie(i,r,{path:"/",sameSite:"lax",expires:new Date(Date.now()+1e3*60*60*24*365),domain:Ui({window:this.#e})})}catch(n){console.warn(`Could not write ${i} to cookie:`,n)}try{this.#i.setItem(i,r)}catch(n){console.warn(`Could not write ${i} to localStorage:`,n)}}getConversationState(e){D(typeof e=="string","widgetId must be a string"),D(e,"widgetId must not be empty");let r=`molin_${e}_conversation`;return this.#r.getItem(r)||this.#r.getItem(`_molin_${e}`)}setConversationState(e,r){this.#r.removeItem(`_molin_${e}`),D(typeof e=="string","widgetId must be a string"),D(e,"widgetId must not be empty");let i=`molin_${e}_conversation`;this.#r.setItem(i,r)}resetAll(){this.distinctID=null,this.widgetState=null,this.popupState=null,this.disclaimerDismissed=!1,this.#r.removeItems(e=>e.startsWith("_molin_")),this.#t.deleteCookies(e=>e.startsWith("_molin_"))}},R=new Pi({window});var Ps=()=>{if(window.Shopify)try{return{customerId:Pl()}}catch{return null}return null},Pl=()=>{try{let t=[()=>window.ShopifyAnalytics?.meta?.page?.customerId,()=>window.meta?.page?.customerId,()=>window._st?.cid,()=>window.ShopifyAnalytics?.lib?.user()?.traits()?.uniqToken];for(let e of t)try{let r=e();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},Rs=async()=>{try{return(await(await fetch(window.Shopify.routes.root+"cart.js")).json()).items.map(i=>({id:i.id,name:i.title,quantity:i.quantity,price:i.price,variantId:i.variant_id,sku:i.sku,url:i.url,description:i.product_description,image:i.featured_image?.url}))}catch{return[]}};function Bs(t,e="http"){return t.startsWith("http://")||t.startsWith("https://")?t:`${e}://${t}`}function Xe(t){return new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+!*'();@&=,$]*)*(\\?[-a-z\\d%_.~+!*'();@&=,$]*)?(\\#[-a-z\\d%_.~+!*'();@&=,$]*)?$","i").test(t)}function Fs(t,e){let r=t instanceof URL?t:new URL(t);if(e)for(let[i,n]of e)r.searchParams.set(i,n);return r}var qs=()=>{if(window.ShopRenter)try{let t=Bl();return{customerEmail:t?.customerEmail,customerId:t?.customerId,customerName:t?.customerName}}catch{return null}return null},Bl=()=>{try{if(window.ShopRenter){let t=window.ShopRenter.customer;return{customerEmail:t?.email,customerId:t?.userId,customerName:[t?.name?.firstName,t?.name?.lastName].filter(Boolean).join(" ")}}return{customerEmail:null,customerId:null,customerName:null}}catch{return{customerEmail:null,customerId:null,customerName:null}}},Vs=async()=>{try{let t=window.ShopRenter.shop?.domain;if(!t)return[];let e=Bs(t,"https")+"/cart.json";return(await(await fetch(e)).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 Ns=()=>{if(window.UNAS)try{let t=window.UNAS.customer;return{customerEmail:t?.email,customerId:t?.id}}catch(t){return console.error("Error fetching customer information:",t),null}return null},Hs=async()=>new Promise((t,e)=>{try{window.UNAS.getCart(r=>{let n=r.items.map(s=>({id:s.id,name:s.name,quantity:s.quantity,price:s.price,sku:s.sku}));t(n)})}catch(r){console.error("Error fetching cart information:",r),e(r)}});var Ri;function Ws(t){return{lang:t?.lang??Ri?.lang,message:t?.message,abortEarly:t?.abortEarly??Ri?.abortEarly,abortPipeEarly:t?.abortPipeEarly??Ri?.abortPipeEarly}}var Vl;function Nl(t){return Vl?.get(t)}var Hl;function zl(t){return Hl?.get(t)}var Wl;function Gl(t,e){return Wl?.get(t)?.get(e)}function Gs(t){let e=typeof t;return e==="string"?`"${t}"`:e==="number"||e==="bigint"||e==="boolean"?`${t}`:e==="object"||e==="function"?(t&&Object.getPrototypeOf(t)?.constructor?.name)??"null":e}function W(t,e,r,i,n){let s=n&&"input"in n?n.input:r.value,o=n?.expected??t.expects??null,a=n?.received??Gs(s),l={kind:t.kind,type:t.type,input:s,expected:o,received:a,message:`Invalid ${e}: ${o?`Expected ${o} but r`:"R"}eceived ${a}`,requirement:t.requirement,path:n?.path,issues:n?.issues,lang:i.lang,abortEarly:i.abortEarly,abortPipeEarly:i.abortPipeEarly},c=t.kind==="schema",d=n?.message??t.message??Gl(t.reference,l.lang)??(c?zl(l.lang):null)??i.message??Nl(l.lang);d!==void 0&&(l.message=typeof d=="function"?d(l):d),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function Z(t){return{version:1,vendor:"valibot",validate(e){return t["~run"]({value:e},Ws())}}}function Zl(t,e){return Object.hasOwn(t,e)&&e!=="__proto__"&&e!=="prototype"&&e!=="constructor"}function Zs(t,e){let r=[...new Set(t)];return r.length>1?`(${r.join(` ${e} `)})`:r[0]??"never"}var Kl=/^\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\d|0[1-9]|3[01])[T ](?:0\d|1\d|2[0-3])(?::[0-5]\d){2}(?:\.\d{1,9})?(?:Z|[+-](?:0\d|1\d|2[0-3])(?::?[0-5]\d)?)$/u;function Bi(t){return{kind:"validation",type:"iso_timestamp",reference:Bi,async:!1,expects:null,requirement:Kl,message:t,"~run"(e,r){return e.typed&&!this.requirement.test(e.value)&&W(this,"timestamp",e,r),e}}}function Fi(t,e){return{kind:"validation",type:"max_length",reference:Fi,async:!1,expects:`<=${t}`,requirement:t,message:e,"~run"(r,i){return r.typed&&r.value.length>this.requirement&&W(this,"length",r,i,{received:`${r.value.length}`}),r}}}function qi(t,e){return{kind:"validation",type:"min_length",reference:qi,async:!1,expects:`>=${t}`,requirement:t,message:e,"~run"(r,i){return r.typed&&r.value.length<this.requirement&&W(this,"length",r,i,{received:`${r.value.length}`}),r}}}function Vi(t){return{kind:"transformation",type:"to_date",reference:Vi,async:!1,message:t,"~run"(e,r){try{e.value=new Date(e.value),isNaN(e.value)&&(W(this,"date",e,r,{received:'"Invalid Date"'}),e.typed=!1)}catch{W(this,"date",e,r),e.typed=!1}return e}}}function Ni(t){return{kind:"transformation",type:"transform",reference:Ni,async:!1,operation:t,"~run"(e){return e.value=this.operation(e.value),e}}}function Ks(t,e,r){return typeof t.fallback=="function"?t.fallback(e,r):t.fallback}function Y(t,e){return{...t,fallback:e,get"~standard"(){return Z(this)},"~run"(r,i){let n=t["~run"](r,i);return n.issues?{typed:!0,value:Ks(this,n,i)}:n}}}function Hi(t,e,r){return typeof t.default=="function"?t.default(e,r):t.default}function Et(){return{kind:"schema",type:"any",reference:Et,expects:"any",async:!1,get"~standard"(){return Z(this)},"~run"(t){return t.typed=!0,t}}}function Ye(t,e){return{kind:"schema",type:"array",reference:Ye,expects:"Array",async:!1,item:t,message:e,get"~standard"(){return Z(this)},"~run"(r,i){let n=r.value;if(Array.isArray(n)){r.typed=!0,r.value=[];for(let s=0;s<n.length;s++){let o=n[s],a=this.item["~run"]({value:o},i);if(a.issues){let l={type:"array",origin:"value",input:n,key:s,value:o};for(let c of a.issues)c.path?c.path.unshift(l):c.path=[l],r.issues?.push(c);if(r.issues||(r.issues=a.issues),i.abortEarly){r.typed=!1;break}}a.typed||(r.typed=!1),r.value.push(a.value)}}else W(this,"type",r,i);return r}}}function zi(t){return{kind:"schema",type:"boolean",reference:zi,expects:"boolean",async:!1,message:t,get"~standard"(){return Z(this)},"~run"(e,r){return typeof e.value=="boolean"?e.typed=!0:W(this,"type",e,r),e}}}function Wi(t){return{kind:"schema",type:"null",reference:Wi,expects:"null",async:!1,message:t,get"~standard"(){return Z(this)},"~run"(e,r){return e.value===null?e.typed=!0:W(this,"type",e,r),e}}}function fr(t,e){return{kind:"schema",type:"nullish",reference:fr,expects:`(${t.expects} | null | undefined)`,async:!1,wrapped:t,default:e,get"~standard"(){return Z(this)},"~run"(r,i){return(r.value===null||r.value===void 0)&&(this.default!==void 0&&(r.value=Hi(this,r,i)),r.value===null||r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function mr(t){return{kind:"schema",type:"number",reference:mr,expects:"number",async:!1,message:t,get"~standard"(){return Z(this)},"~run"(e,r){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:W(this,"type",e,r),e}}}function V(t,e){return{kind:"schema",type:"object",reference:V,expects:"Object",async:!1,entries:t,message:e,get"~standard"(){return Z(this)},"~run"(r,i){let n=r.value;if(n&&typeof n=="object"){r.typed=!0,r.value={};for(let s in this.entries){let o=this.entries[s];if(s in n||(o.type==="exact_optional"||o.type==="optional"||o.type==="nullish")&&o.default!==void 0){let a=s in n?n[s]:Hi(o),l=o["~run"]({value:a},i);if(l.issues){let c={type:"object",origin:"value",input:n,key:s,value:a};for(let d of l.issues)d.path?d.path.unshift(c):d.path=[c],r.issues?.push(d);if(r.issues||(r.issues=l.issues),i.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value[s]=l.value}else if(o.fallback!==void 0)r.value[s]=Ks(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(W(this,"key",r,i,{input:void 0,expected:`"${s}"`,path:[{type:"object",origin:"key",input:n,key:s,value:n[s]}]}),i.abortEarly))break}}else W(this,"type",r,i);return r}}}function A(t,e){return{kind:"schema",type:"optional",reference:A,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,get"~standard"(){return Z(this)},"~run"(r,i){return r.value===void 0&&(this.default!==void 0&&(r.value=Hi(this,r,i)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function Mt(t,e){return{kind:"schema",type:"picklist",reference:Mt,expects:Zs(t.map(Gs),"|"),async:!1,options:t,message:e,get"~standard"(){return Z(this)},"~run"(r,i){return this.options.includes(r.value)?r.typed=!0:W(this,"type",r,i),r}}}function It(t,e,r){return{kind:"schema",type:"record",reference:It,expects:"Object",async:!1,key:t,value:e,message:r,get"~standard"(){return Z(this)},"~run"(i,n){let s=i.value;if(s&&typeof s=="object"){i.typed=!0,i.value={};for(let o in s)if(Zl(s,o)){let a=s[o],l=this.key["~run"]({value:o},n);if(l.issues){let d={type:"object",origin:"key",input:s,key:o,value:a};for(let h of l.issues)h.path=[d],i.issues?.push(h);if(i.issues||(i.issues=l.issues),n.abortEarly){i.typed=!1;break}}let c=this.value["~run"]({value:a},n);if(c.issues){let d={type:"object",origin:"value",input:s,key:o,value:a};for(let h of c.issues)h.path?h.path.unshift(d):h.path=[d],i.issues?.push(h);if(i.issues||(i.issues=c.issues),n.abortEarly){i.typed=!1;break}}(!l.typed||!c.typed)&&(i.typed=!1),l.typed&&(i.value[l.value]=c.value)}}else W(this,"type",i,n);return i}}}function _(t){return{kind:"schema",type:"string",reference:_,expects:"string",async:!1,message:t,get"~standard"(){return Z(this)},"~run"(e,r){return typeof e.value=="string"?e.typed=!0:W(this,"type",e,r),e}}}function zs(t){let e;if(t)for(let r of t)e?e.push(...r.issues):e=r.issues;return e}function gr(t,e){return{kind:"schema",type:"union",reference:gr,expects:Zs(t.map(r=>r.expects),"|"),async:!1,options:t,message:e,get"~standard"(){return Z(this)},"~run"(r,i){let n,s,o;for(let a of this.options){let l=a["~run"]({value:r.value},i);if(l.typed)if(l.issues)s?s.push(l):s=[l];else{n=l;break}else o?o.push(l):o=[l]}if(n)return n;if(s){if(s.length===1)return s[0];W(this,"type",r,i,{issues:zs(s)}),r.typed=!0}else{if(o?.length===1)return o[0];W(this,"type",r,i,{issues:zs(o)})}return r}}}function Js(t,e){let r={};for(let i in t.entries)r[i]=!e||e.includes(i)?A(t.entries[i]):t.entries[i];return{...t,entries:r,get"~standard"(){return Z(this)}}}function Qe(...t){return{...t[0],pipe:t,get"~standard"(){return Z(this)},"~run"(e,r){for(let i of t)if(i.kind!=="metadata"){if(e.issues&&(i.kind==="schema"||i.kind==="transformation")){e.typed=!1;break}(!e.issues||!r.abortEarly&&!r.abortPipeEarly)&&(e=i["~run"](e,r))}return e}}}function me(t,e,r){let i=t["~run"]({value:e},Ws(r));return{typed:i.typed,success:!i.issues,output:i.value,issues:i.issues}}var Xs=It(_(),gr([_(),mr(),zi(),Wi()])),Ys=Qe(_(),qi(1),Fi(5e3)),Qs=()=>{try{return window.UNAS?Ns():window.Shopify?Ps():window.ShopRenter?qs():null}catch{return null}},eo=async()=>{try{return window.UNAS?await Hs():window.Shopify?await Rs():window.ShopRenter?await Vs():[]}catch{return[]}},et={schema:V({conversationId:A(_()),messages:A(Ye(V({id:_(),timestamp:mr(),role:Mt(["user","assistant","support"]),content:_(),parts:A(Ye(gr([V({text:_()}),V({html:_()}),V({tag:_(),data:It(_(),Et())})])))})))}),persist(t,e,r){R.setConversationState(t,{conversationId:e,messages:r}),R.setConversationId(t,e)},restore(t){try{let e=R.getConversationState(t),r=e?me(this.schema,e):void 0;return r?.success&&r.output.conversationId?{conversationId:r.output.conversationId,messages:r.output.messages||[]}:{conversationId:R.getConversationId(t)||"",messages:[]}}catch(e){return console.error("Failed to restore conversation state:",e),{conversationId:"",messages:[]}}},reset(t){R.setConversationState(t,null),R.setConversationId(t,null)}};var tt=class t extends v{static properties={widgetId:{type:String},config:{type:Object},callbacks:{type:Object},xUserData:{type:Object},xCustomInstructions:{type:Object},autoConnect:{type:Boolean}};contextCtrl;constructor(){super(),this.widgetId="",this.config={},this.callbacks={},this.xUserData=void 0,this.xCustomInstructions=void 0,this.autoConnect=!1,this.contextCtrl=new ve(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,isConnected:()=>this.#n.isConnected,sendUserInput:this.sendUserInput.bind(this),sendUserCancel:this.sendUserCancel.bind(this),sendUserTypingStart:this.sendUserTypingStart.bind(this),sendUserTypingStop:this.sendUserTypingStop.bind(this),sendNewChat:this.sendNewChat.bind(this),reset:this.reset.bind(this),reloadConfig:this.reloadConfig.bind(this),enqueueUserInput:this.enqueueUserInput.bind(this),connect:this.connect.bind(this),sendImageDelete:this.#n.sendImageDelete.bind(this.#n)})}connectedCallback(){super.connectedCallback(),this.updated()}updated(){this.autoConnect&&this.#n.connect(),Object.assign(this.contextCtrl.proxyObject,{widgetId:this.widgetId,config:this.config,callbacks:this.callbacks,xUserData:this.#t,xCustomInstructions:this.#r,conversationId:this.#n.conversationId,messages:this.#e,isStreaming:this.#n.isStreaming,typingIndicator:this.#n.typingIndicator,ranOutOfCredits:this.#n.ranOutOfCredits,isLiveMode:this.#n.isLiveMode,lastMsg:this.#n.lastMsg,hasQueuedMessages:this.#n.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),sendImageDelete:this.#n.sendImageDelete.bind(this.#n)}),this.#s()}get#e(){return this.#n?.ranOutOfCredits?[{id:crypto.randomUUID(),role:"assistant",content:"Sorry, I've run out of credits. Please contact the shop directly.",timestamp:Date.now()}]:this.#n?.messages||[]}#t;#r;#i=null;get#n(){return this.#i||(this.#i=new ar(this,{autoConnect:this.autoConnect,url:e=>{let r=new URL(this.config.wsApiUrl);return r.searchParams.set("widgetId",this.widgetId),r.searchParams.set("conversationId",e),r.searchParams.set("pageUrl",window.location.href),r},onReconnect:()=>{},onError:e=>{console.error("ws error",e)},onClose:()=>{},onNewMessage:e=>{e.role==="assistant"&&this.callbacks.onNewMessageStartedStreaming?.({widgetId:this.widgetId,message:e,conversationId:this.#n.conversationId})},onMessageAppend:e=>{},onMessageDone:(e,r)=>{r.role==="assistant"&&this.callbacks.onMessageEndedStreaming?.({widgetId:this.widgetId,text:r.content??"",message:r,usage_TOKENS_COMPLETION:e.message.usage.TOKENS_COMPLETION,conversationId:this.#n.conversationId})},onMessageError:e=>{console.error("ws message error",e),e.message&&this.callbacks.onError?.({widgetId:this.widgetId,error:"WS: "+e.message})},onReset:()=>{et.reset(this.widgetId)},onConnect:(e,r)=>{let i=Qs();this.#n.sendUserMeta({xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,customerInformation:i,language:window.navigator.language,cart:[]}),eo().then(n=>{n?.length>0&&this.#n.sendUserMeta({xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,customerInformation:i,cart:n,language:window.navigator.language})}).catch(n=>{console.error(n)}),this.dispatchEvent(new t.ConnectedEvent({conversationId:e,metadata:r,widgetId:this.widgetId,pendingImages:r?.pendingImages||[]}))},persistConversationState:(e,r)=>{et.persist(this.widgetId,e,r)},restoreConversationState:()=>et.restore(this.widgetId)})),this.#i}#s(){function e(i){if(!i)return;let n;try{n=typeof i=="object"?i:JSON.parse(i)}catch(o){console.error("Molin: user-data is not valid JSON",o);return}if(!n||typeof n!="object"||Object.keys(n).length===0)return;let s=me(Xs,n);if(!s.success){console.error("Molin: user-data does not pass schema validation",s.issues);return}return s.output}function r(i){if(!i)return;let n=me(Ys,i);if(!n.success){console.error("Molin: custom-instructions does not pass schema validation",n.issues);return}return n.output}this.#t=e(this.xUserData),this.#r=r(this.xCustomInstructions)}async sendUserInput(e,r={}){let i={xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,...r},n=await this.#n.sendUserInput(e,i);return n&&this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:e,example:!1,conversationId:this.#n.conversationId}),n}async enqueueUserInput(e,r={}){e.length>1e3&&(console.error("Message exceeds max length of 1000 characters, trimming"),e=Li(e,1e3)),this.#e.some(o=>o.role==="assistant"&&o.parts?.some(a=>"tag"in a&&a.tag==="request-input-v1"&&"data"in a&&a.data.type==="new-conversation-button"))&&(this.sendNewChat(),this.reset());let s={xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,role:"user",expectStreaming:!0,...r};return this.#n.enqueueUserInput(e,s)}sendUserCancel(){this.#n.sendUserCancel(),this.callbacks.onUserCanceledStreaming?.({widgetId:this.widgetId})}sendUserTypingStart(){this.#n.sendUserTypingStart()}sendUserTypingStop(){this.#n.sendUserTypingStop()}sendNewChat(){this.#n.sendNewChat()}reset(){this.#n.reset()}reloadConfig(){this.#n.reloadConfig()}connect(){this.#n.connect()}render(){return u`<slot></slot>`}};function to(t){let e=new ur(t,{provider:tt,tag:"mw-context-widget",key:"contextCtrl"});return new Proxy({value:null},{get(r,i){if(i==="value")return e.value}})}tt.ConnectedEvent=class extends CustomEvent{static type="mw-context-widget:connected";constructor(e,r={}){super(tt.ConnectedEvent.type,{detail:e,bubbles:!0,composed:!0,...r})}};customElements.get("mw-context-widget")||customElements.define("mw-context-widget",tt);function rn(t){return[...t.v,(t.i?"!":"")+t.n].join(":")}function Jl(t,e=","){return t.map(rn).join(e)}var lo=typeof CSS<"u"&&CSS.escape||(t=>t.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function wr(t){for(var e=9,r=t.length;r--;)e=Math.imul(e^t.charCodeAt(r),1597334677);return"#"+((e^e>>>9)>>>0).toString(36)}function br(t,e="@media "){return e+L(t).map(r=>(typeof r=="string"&&(r={min:r}),r.raw||Object.keys(r).map(i=>`(${i}-width:${r[i]})`).join(" and "))).join(",")}function L(t=[]){return Array.isArray(t)?t:t==null?[]:[t]}function ro(t){return t}function xr(){}var F={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function co(t){return t.match(/[-=:;]/g)?.length||0}function Xi(t){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(t)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(co(t),15)<<18}var Xl=["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 nn({n:t,i:e,v:r=[]},i,n,s){t&&(t=rn({n:t,i:e,v:r})),s=[...L(s)];for(let a of r){let l=i.theme("screens",a);for(let c of L(l&&br(l)||i.v(a))){var o;s.push(c),n|=l?67108864|Xi(c):a=="dark"?1073741824:c[0]=="@"?Xi(c):(o=c,1<<~(/:([a-z-]+)/.test(o)&&~Xl.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:t,p:n,r:s,i:e}}var uo=new Map;function Yi(t){if(t.d){let e=[],r=Gi(t.r.reduce((i,n)=>n[0]=="@"?(e.push(n),i):n?Gi(i,s=>Gi(n,o=>{let a=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(o);if(a){let l=s.indexOf(a[1]);return~l?s.slice(0,l)+a[0]+s.slice(l+a[1].length):Zi(s,o)}return Zi(o,s)})):i,"&"),i=>Zi(i,t.n?"."+lo(t.n):""));return r&&e.push(r.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((i,n)=>n+"{"+i+"}",t.d)}}function Gi(t,e){return t.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(r,i,n)=>e(i)+n)}function Zi(t,e){return t.replace(/&/g,e)}var io=new Intl.Collator("en",{numeric:!0});function ho(t,e){for(var r=0,i=t.length;r<i;){let n=i+r>>1;0>=po(t[n],e)?r=n+1:i=n}return i}function po(t,e){let r=t.p&F.o;return r==(e.p&F.o)&&(r==F.b||r==F.o)?0:t.p-e.p||t.o-e.o||io.compare(no(t.n),no(e.n))||io.compare(so(t.n),so(e.n))}function no(t){return(t||"").split(/:/).pop().split("/").pop()||"\0"}function so(t){return(t||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function Ki(t,e){return Math.round(parseInt(t,16)*e)}function te(t,e={}){if(typeof t=="function")return t(e);let{opacityValue:r="1",opacityVariable:i}=e,n=i?`var(${i})`:r;if(t.includes("<alpha-value>"))return t.replace("<alpha-value>",n);if(t[0]=="#"&&(t.length==4||t.length==7)){let s=(t.length-1)/3,o=[17,1,.062272][s-1];return`rgba(${[Ki(t.substr(1,s),o),Ki(t.substr(1+s,s),o),Ki(t.substr(1+2*s,s),o),n]})`}return n=="1"?t:n=="0"?"#0000":t.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${n})`)}function fo(t,e,r,i,n=[]){return(function s(o,{n:a,p:l,r:c=[],i:d},h){let f=[],g="",p=0,S=0;for(let y in o||{}){var b,$;let x=o[y];if(y[0]=="@"){if(!x)continue;if(y[1]=="a"){f.push(...on(a,l,vr(""+x),h,l,c,d,!0));continue}if(y[1]=="l"){for(let E of L(x))f.push(...s(E,{n:a,p:(b=F[y[7]],l&~F.o|b),r:y[7]=="d"?[]:c,i:d},h));continue}if(y[1]=="i"){f.push(...L(x).map(E=>({p:-1,o:0,r:[],d:y+" "+E})));continue}if(y[1]=="k"){f.push({p:F.d,o:0,r:[y],d:s(x,{p:F.d},h).map(Yi).join("")});continue}if(y[1]=="f"){f.push(...L(x).map(E=>({p:F.d,o:0,r:[y],d:s(E,{p:F.d},h).map(Yi).join("")})));continue}}if(typeof x!="object"||Array.isArray(x))y=="label"&&x?a=x+wr(JSON.stringify([l,d,o])):(x||x===0)&&(y=y.replace(/[A-Z]/g,E=>"-"+E.toLowerCase()),S+=1,p=Math.max(p,($=y)[0]=="-"?0:co($)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test($)?+!!RegExp.$1||-!!RegExp.$2:0)+1),g+=(g?";":"")+L(x).map(E=>h.s(y,sn(""+E,h.theme)+(d?" !important":""))).join(";"));else if(y[0]=="@"||y.includes("&")){let E=l;y[0]=="@"&&(y=y.replace(/\bscreen\(([^)]+)\)/g,(T,B)=>{let N=h.theme("screens",B);return N?(E|=67108864,br(N,"")):T}),E|=Xi(y)),f.push(...s(x,{n:a,p:E,r:[...c,y],i:d},h))}else f.push(...s(x,{p:l,r:[...c,y]},h))}return f.unshift({n:a,p:l,o:Math.max(0,15-S)+1.5*Math.min(p||15,15),r:c,d:g}),f.sort(po)})(t,nn(e,r,i,n),r)}function sn(t,e){return t.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(r,i,n,s,o="")=>{let a=e(n,o);return typeof a=="function"&&/color|fill|stroke/i.test(n)?te(a):""+L(a).filter(l=>Object(l)!==l)})}function mo(t,e){let r,i=[];for(let n of t)n.d&&n.n?r?.p==n.p&&""+r.r==""+n.r?(r.c=[r.c,n.c].filter(Boolean).join(" "),r.d=r.d+";"+n.d):i.push(r={...n,n:n.n&&e}):i.push({...n,n:n.n&&e});return i}function yr(t,e,r=F.u,i,n){let s=[];for(let o of t)for(let a of(function(l,c,d,h,f){l={...l,i:l.i||f};let g=(function(p,S){let b=uo.get(p.n);return b?b(p,S):S.r(p.n,p.v[0]=="dark")})(l,c);return g?typeof g=="string"?({r:h,p:d}=nn(l,c,d,h),mo(yr(vr(g),c,d,h,l.i),l.n)):Array.isArray(g)?g.map(p=>{var S,b;return{o:0,...p,r:[...L(h),...L(p.r)],p:(S=d,b=p.p??d,S&~F.o|b)}}):fo(g,l,c,d,h):[{c:rn(l),p:0,o:0,r:[]}]})(o,e,r,i,n))s.splice(ho(s,a),0,a);return s}function on(t,e,r,i,n,s,o,a){return mo((a?r.flatMap(l=>yr([l],i,n,s,o)):yr(r,i,n,s,o)).map(l=>l.p&F.o&&(l.n||e==F.b)?{...l,p:l.p&~F.o|e,o:0}:l),t)}function Yl(t,e,r,i){var n;return n=(s,o)=>{let{n:a,p:l,r:c,i:d}=nn(s,o,e);return r&&on(a,e,r,o,l,c,d,i)},uo.set(t,n),t}function Ji(t,e,r){if(t[t.length-1]!="("){let i=[],n=!1,s=!1,o="";for(let a of t)if(!(a=="("||/[~@]$/.test(a))){if(a[0]=="!"&&(a=a.slice(1),n=!n),a.endsWith(":")){i[a=="dark:"?"unshift":"push"](a.slice(0,-1));continue}a[0]=="-"&&(a=a.slice(1),s=!s),a.endsWith("-")&&(a=a.slice(0,-1)),a&&a!="&"&&(o+=(o&&"-")+a)}o&&(s&&(o="-"+o),e[0].push({n:o,v:i.filter(Ql),i:n}))}}function Ql(t,e,r){return r.indexOf(t)==e}var oo=new Map;function vr(t){let e=oo.get(t);if(!e){let r=[],i=[[]],n=0,s=0,o=null,a=0,l=(c,d=0)=>{n!=a&&(r.push(t.slice(n,a+d)),c&&Ji(r,i)),n=a+1};for(;a<t.length;a++){let c=t[a];if(s)t[a-1]!="\\"&&(s+=+(c=="[")||-(c=="]"));else if(c=="[")s+=1;else if(o)t[a-1]!="\\"&&o.test(t.slice(a))&&(o=null,n=a+RegExp.lastMatch.length);else if(c=="/"&&t[a-1]!="\\"&&(t[a+1]=="*"||t[a+1]=="/"))o=t[a+1]=="*"?/^\*\//:/^[\r\n]/;else if(c=="(")l(),r.push(c);else if(c==":")t[a+1]!=":"&&l(!1,1);else if(/[\s,)]/.test(c)){l(!0);let d=r.lastIndexOf("(");if(c==")"){let h=r[d-1];if(/[~@]$/.test(h)){let f=i.shift();r.length=d,Ji([...r,"#"],i);let{v:g}=i[0].pop();for(let p of f)p.v.splice(+(p.v[0]=="dark")-+(g[0]=="dark"),g.length);Ji([...r,Yl(h.length>1?h.slice(0,-1)+wr(JSON.stringify([h,f])):h+"("+Jl(f)+")",F.a,f,/@$/.test(h))],i)}d=r.lastIndexOf("(",d-1)}r.length=d+1}else/[~@]/.test(c)&&t[a+1]=="("&&i.unshift([])}l(!0),oo.set(t,e=i[0])}return e}function m(t,e,r){return[t,Qi(e,r)]}function Qi(t,e){return typeof t=="function"?t:typeof t=="string"&&/^[\w-]+$/.test(t)?(r,i)=>({[t]:e?e(r,i):en(r,1)}):r=>t||{[r[1]]:en(r,2)}}function en(t,e,r=t.slice(e).find(Boolean)||t.$$||t.input){return t.input[0]=="-"?`calc(${r} * -1)`:r}function w(t,e,r,i){return[t,an(e,r,i)]}function an(t,e,r){let i=typeof e=="string"?(n,s)=>({[e]:r?r(n,s):n._}):e||(({1:n,_:s},o,a)=>({[n||a]:s}));return(n,s)=>{let o=go(t||n[1]),a=s.theme(o,n.$$)??le(n.$$,o,s);if(a!=null)return n._=en(n,0,a),i(n,s,o)}}function q(t,e={},r){return[t,ec(e,r)]}function ec(t={},e){return(r,i)=>{let{section:n=go(r[0]).replace("-","")+"Color"}=t,[s,o]=tc(r.$$);if(!s)return;let a=i.theme(n,s)||le(s,n,i);if(!a||typeof a=="object")return;let{opacityVariable:l=`--tw-${r[0].replace(/-$/,"")}-opacity`,opacitySection:c=n.replace("Color","Opacity"),property:d=n,selector:h}=t,f=i.theme(c,o||"DEFAULT")||o&&le(o,c,i),g=e||(({_:S})=>{let b=At(d,S);return h?{[h]:b}:b});r._={value:te(a,{opacityVariable:l||void 0,opacityValue:f||void 0}),color:S=>te(a,S),opacityVariable:l||void 0,opacityValue:f||void 0};let p=g(r,i);if(!r.dark){let S=i.d(n,s,a);S&&S!==a&&(r._={value:te(S,{opacityVariable:l||void 0,opacityValue:f||"1"}),color:b=>te(S,b),opacityVariable:l||void 0,opacityValue:f||void 0},p={"&":p,[i.v("dark")]:g(r,i)})}return p}}function tc(t){return(t.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function At(t,e){let r={};return typeof e=="string"?r[t]=e:(e.opacityVariable&&e.value.includes(e.opacityVariable)&&(r[e.opacityVariable]=e.opacityValue||"1"),r[t]=e.value),r}function le(t,e,r){if(t[0]=="["&&t.slice(-1)=="]"){if(t=rt(sn(t.slice(1,-1),r.theme)),!e)return t;if(!(/color|fill|stroke/i.test(e)&&!(/^color:/.test(t)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(t))||/image/i.test(e)&&!(/^image:/.test(t)||/^[a-z-]+\(/.test(t))||/weight/i.test(e)&&!(/^(number|any):/.test(t)||/^\d+$/.test(t))||/position/i.test(e)&&/^(length|size):/.test(t)))return t.replace(/^[a-z-]+:/,"")}}function go(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function rt(t){return t.includes("url(")?t.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,r="",i,n="")=>rt(r)+i+rt(n)):t.replace(/(^|[^\\])_+/g,(e,r)=>r+" ".repeat(e.length-r.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,e=>e.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}function Dt({presets:t=[],...e}){let r={darkMode:void 0,darkColor:void 0,preflight:e.preflight!==!1&&[],theme:{},variants:L(e.variants),rules:L(e.rules),ignorelist:L(e.ignorelist),hash:void 0,stringify:(i,n)=>i+":"+n,finalize:[]};for(let i of L([...t,{darkMode:e.darkMode,darkColor:e.darkColor,preflight:e.preflight!==!1&&L(e.preflight),theme:e.theme,hash:e.hash,stringify:e.stringify,finalize:e.finalize}])){let{preflight:n,darkMode:s=r.darkMode,darkColor:o=r.darkColor,theme:a,variants:l,rules:c,ignorelist:d,hash:h=r.hash,stringify:f=r.stringify,finalize:g}=typeof i=="function"?i(r):i;r={preflight:r.preflight!==!1&&n!==!1&&[...r.preflight,...L(n)],darkMode:s,darkColor:o,theme:{...r.theme,...a,extend:{...r.theme.extend,...a?.extend}},variants:[...r.variants,...L(l)],rules:[...r.rules,...L(c)],ignorelist:[...r.ignorelist,...L(d)],hash:h,stringify:f,finalize:[...r.finalize,...L(g)]}}return r}function ao(t,e,r,i,n,s){for(let o of e){let a=r.get(o);a||r.set(o,a=i(o));let l=a(t,n,s);if(l)return l}}function rc(t){var e;return tn(t[0],typeof(e=t[1])=="function"?e:()=>e)}function ic(t){var e,r;return Array.isArray(t)?tn(t[0],Qi(t[1],t[2])):tn(t,Qi(e,r))}function tn(t,e){return wo(t,(r,i,n,s)=>{let o=i.exec(r);if(o)return o.$$=r.slice(o[0].length),o.dark=s,e(o,n)})}function wo(t,e){let r=L(t).map(nc);return(i,n,s)=>{for(let o of r){let a=e(i,o,n,s);if(a)return a}}}function nc(t){return typeof t=="string"?RegExp("^"+t+(t.includes("$")||t.slice(-1)=="-"?"":"$")):t}function yo(t,e){let r=Dt(t),i=(function({theme:l,darkMode:c,darkColor:d=xr,variants:h,rules:f,hash:g,stringify:p,ignorelist:S,finalize:b}){let $=new Map,y=new Map,x=new Map,E=new Map,T=wo(S,(I,H)=>H.test(I));h.push(["dark",Array.isArray(c)||c=="class"?`${L(c)[1]||".dark"} &`:typeof c=="string"&&c!="media"?c:"@media (prefers-color-scheme:dark)"]);let B=typeof g=="function"?I=>g(I,wr):g?wr:ro;B!==ro&&b.push(I=>({...I,n:I.n&&B(I.n),d:I.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(H,J)=>"--"+B(J).replace("#",""))}));let N={theme:(function({extend:I={},...H}){let J={},ai={get colors(){return Se("colors")},theme:Se,negative(){return{}},breakpoints(P){let z={};for(let X in P)typeof P[X]=="string"&&(z["screen-"+X]=P[X]);return z}};return Se;function Se(P,z,X,gt){if(P){if({1:P,2:gt}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(P)||[,P],/[.[]/.test(P)){let he=[];P.replace(/\[([^\]]+)\]|([^.[]+)/g,(Me,yt,Qa=yt)=>he.push(Qa)),P=he.shift(),X=z,z=he.join("-")}let oe=J[P]||Object.assign(Object.assign(J[P]={},Zt(H,P)),Zt(I,P));if(z==null)return oe;z||(z="DEFAULT");let Ee=oe[z]??z.split("-").reduce((he,Me)=>he?.[Me],oe)??X;return gt?te(Ee,{opacityValue:sn(gt,Se)}):Ee}let wt={};for(let oe of[...Object.keys(H),...Object.keys(I)])wt[oe]=Se(oe);return wt}function Zt(P,z){let X=P[z];return typeof X=="function"&&(X=X(ai)),X&&/color|fill|stroke/i.test(z)?(function gt(wt,oe=[]){let Ee={};for(let he in wt){let Me=wt[he],yt=[...oe,he];Ee[yt.join("-")]=Me,he=="DEFAULT"&&(yt=oe,Ee[oe.join("-")]=Me),typeof Me=="object"&&Object.assign(Ee,gt(Me,yt))}return Ee})(X):X}})(l),e:lo,h:B,s(I,H){return p(I,H,N)},d(I,H,J){return d(I,H,N,J)},v(I){return $.has(I)||$.set(I,ao(I,h,y,rc,N)||"&:"+I),$.get(I)},r(I,H){let J=JSON.stringify([I,H]);return x.has(J)||x.set(J,!T(I,N)&&ao(I,f,E,ic,N,H)),x.get(J)},f(I){return b.reduce((H,J)=>J(H,N),I)}};return N})(r),n=new Map,s=[],o=new Set;e.resume(l=>n.set(l,l),(l,c)=>{e.insert(l,s.length,c),s.push(c),o.add(l)});function a(l){let c=i.f(l),d=Yi(c);if(d&&!o.has(d)){o.add(d);let h=ho(s,l);e.insert(d,h,l),s.splice(h,0,l)}return c.n}return Object.defineProperties(function(c){if(!n.size)for(let h of L(r.preflight))typeof h=="function"&&(h=h(i)),h&&(typeof h=="string"?on("",F.b,vr(h),i,F.b,[],!1,!0):fo(h,{},i,F.b)).forEach(a);c=""+c;let d=n.get(c);if(!d){let h=new Set;for(let f of yr(vr(c),i))h.add(f.c).add(a(f));d=[...h].filter(Boolean).join(" "),n.set(c,d).set(d,d)}return d},Object.getOwnPropertyDescriptors({get target(){return e.target},theme:i.theme,config:r,snapshot(){let l=e.snapshot(),c=new Set(o),d=new Map(n),h=[...s];return()=>{l(),o=c,n=d,s=h}},clear(){e.clear(),o=new Set,n=new Map,s=[]},destroy(){this.clear(),e.destroy()}}))}function sc(t,e){return t!=e&&""+t.split(" ").sort()!=""+e.split(" ").sort()}function vo(t){let e=new MutationObserver(r);return{observe(n){e.observe(n,{attributeFilter:["class"],subtree:!0,childList:!0}),i(n),r([{target:n,type:""}])},disconnect(){e.disconnect()}};function r(n){for(let{type:s,target:o}of n)if(s[0]=="a")i(o);else for(let a of o.querySelectorAll("[class]"))i(a);e.takeRecords()}function i(n){let s,o=n.getAttribute?.("class");o&&sc(o,s=t(o))&&n.setAttribute("class",s)}}function oc(t){let e=document.querySelector(t||'style[data-twind=""]');return(!e||e.tagName!="STYLE")&&(e=document.createElement("style"),document.head.prepend(e)),e.dataset.twind="claimed",e}function kr(t){let e=t?.cssRules?t:(t&&typeof t!="string"?t:oc(t)).sheet;return{target:e,snapshot(){let r=Array.from(e.cssRules,i=>i.cssText);return()=>{this.clear(),r.forEach(this.insert)}},clear(){for(let r=e.cssRules.length;r--;)e.deleteRule(r)},destroy(){e.ownerNode?.remove()},insert(r,i){try{e.insertRule(r,i)}catch{e.insertRule(":root{}",i)}},resume:xr}}var ac=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 bo(t){return ac.get(t)}function xo(t){var e=/^(?:(text-(?:decoration$|e|or|si)|back(?:ground-cl|d|f)|box-d|mask(?:$|-[ispro]|-cl)|pr|hyphena|flex-d)|(tab-|column(?!-s)|text-align-l)|(ap)|u|hy)/i.exec(t);return e?e[1]?1:e[2]?2:e[3]?3:5:0}function ko(t,e){var r=/^(?:(pos)|(cli)|(background-i)|(flex(?:$|-b)|(?:max-|min-)?(?:block-s|inl|he|widt))|dis)/i.exec(t);return r?r[1]?/^sti/i.test(e)?1:0:r[2]?/^pat/i.test(e)?1:0:r[3]?/^image-/i.test(e)?1:0:r[4]?e[3]==="-"?2:0:/^(?:inline-)?grid$/i.test(e)?4:0:0}var lc=[["-webkit-",1],["-moz-",2],["-ms-",4]];function Cr(){return({stringify:t})=>({stringify(e,r,i){let n="",s=bo(e);s&&(n+=t(s,r,i)+";");let o=xo(e),a=ko(e,r);for(let l of lc)o&l[1]&&(n+=t(l[0]+e,r,i)+";"),a&l[1]&&(n+=t(e,l[0]+r,i)+";");return n+t(e,r,i)}})}function _r(){return{rules:[["line-clamp-none",{"-webkit-line-clamp":"unset"}],["line-clamp-",an("lineClamp",({_:t})=>Co(t))],["line-clamp-(\\d+)",({1:t})=>Co(t)]]}}function Co(t){return{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":`${t}`}}var jt={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",...Q(4,"rem",4,.5,.5),...Q(12,"rem",4,5),14:"3.5rem",...Q(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:M("blur"),backdropBrightness:M("brightness"),backdropContrast:M("contrast"),backdropGrayscale:M("grayscale"),backdropHueRotate:M("hueRotate"),backdropInvert:M("invert"),backdropOpacity:M("opacity"),backdropSaturate:M("saturate"),backdropSepia:M("sepia"),backgroundColor:M("colors"),backgroundImage:{none:"none"},backgroundOpacity:M("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:{...Q(200,"",100,0,50),...Q(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:t})=>({DEFAULT:t("colors.gray.200","currentColor"),...t("colors")}),borderOpacity:M("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:M("spacing"),borderWidth:{DEFAULT:"1px",...re(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:M("colors"),caretColor:M("colors"),accentColor:({theme:t})=>({auto:"auto",...t("colors")}),contrast:{...Q(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:M("borderColor"),divideOpacity:M("borderOpacity"),divideWidth:M("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:t})=>({...t("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:t})=>({...t("spacing"),...Lt(2,6),...Lt(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:M("spacing"),gradientColorStops:M("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:t})=>({...t("spacing"),...Lt(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:t})=>({...t("spacing"),...Lt(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:{...Q(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:t})=>({auto:"auto",...t("spacing")}),maxHeight:({theme:t})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...t("spacing")}),maxWidth:({theme:t,breakpoints:e})=>({...e(t("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{...Q(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:M("spacing"),placeholderColor:M("colors"),placeholderOpacity:M("opacity"),outlineColor:M("colors"),outlineOffset:re(8,"px"),outlineWidth:re(8,"px"),ringColor:({theme:t})=>({...t("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:M("colors"),ringOffsetWidth:re(8,"px"),ringOpacity:({theme:t})=>({...t("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...re(8,"px")},rotate:{...re(2,"deg"),...re(12,"deg",3),...re(180,"deg",45)},saturate:Q(200,"",100,0,50),scale:{...Q(150,"",100,0,50),...Q(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:M("spacing"),scrollPadding:M("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...re(2,"deg"),...re(12,"deg",3)},space:M("spacing"),stroke:({theme:t})=>({...t("colors"),none:"none"}),strokeWidth:Q(2),textColor:M("colors"),textDecorationColor:M("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...re(8,"px")},textUnderlineOffset:{auto:"auto",...re(8,"px")},textIndent:M("spacing"),textOpacity:M("opacity"),transitionDuration:({theme:t})=>({...t("durations"),DEFAULT:"150ms"}),transitionDelay:M("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:t})=>({...t("spacing"),...Lt(2,4),full:"100%"}),width:({theme:t})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...t("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...Q(50,"",1,0,10),auto:"auto"}};function Lt(t,e){let r={};do for(var i=1;i<t;i++)r[`${i}/${t}`]=Number((i/t*100).toFixed(6))+"%";while(++t<=e);return r}function re(t,e,r=0){let i={};for(;r<=t;r=2*r||1)i[r]=r+e;return i}function Q(t,e="",r=1,i=0,n=1,s={}){for(;i<=t;i+=n)s[i]=i/r+e;return s}function M(t){return({theme:e})=>e(t)}var _o={"*,::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, ${jt.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, ${jt.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 Ao=[m("\\[([-\\w]+):(.+)]",({1:t,2:e},r)=>({"@layer overrides":{"&":{[t]:le(`[${e}]`,"",r)}}})),m("(group|peer)([~/][^-[]+)?",({input:t},{h:e})=>[{c:e(t)}]),w("aspect-","aspectRatio"),m("container",(t,{theme:e})=>{let{screens:r=e("screens"),center:i,padding:n}=e("container"),s={width:"100%",marginRight:i&&"auto",marginLeft:i&&"auto",...o("xs")};for(let a in r){let l=r[a];typeof l=="string"&&(s[br(l)]={"&":{maxWidth:l,...o(a)}})}return s;function o(a){let l=n&&(typeof n=="string"?n:n[a]||n.DEFAULT);if(l)return{paddingRight:l,paddingLeft:l}}}),w("content-","content",({_:t})=>({"--tw-content":t,content:"var(--tw-content)"})),m("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),m("box-(border|content)","boxSizing",({1:t})=>t+"-box"),m("hidden",{display:"none"}),m("table-(auto|fixed)","tableLayout"),m(["(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)",m("isolate","isolation"),m("object-(contain|cover|fill|none|scale-down)","objectFit"),w("object-","objectPosition"),m("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",$r),m("overscroll(-[xy])?-(auto|contain|none)",({1:t="",2:e})=>({["overscroll-behavior"+t]:e})),m("(static|fixed|absolute|relative|sticky)","position"),w("-?inset(-[xy])?(?:$|-)","inset",({1:t,_:e})=>({top:t!="-x"&&e,right:t!="-y"&&e,bottom:t!="-x"&&e,left:t!="-y"&&e})),w("-?(top|bottom|left|right)(?:$|-)","inset"),m("(visible|collapse)","visibility"),m("invisible",{visibility:"hidden"}),w("-?z-","zIndex"),m("flex-((row|col)(-reverse)?)","flexDirection",$o),m("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),w("(flex-(?:grow|shrink))(?:$|-)"),w("(flex)-"),w("grow(?:$|-)","flexGrow"),w("shrink(?:$|-)","flexShrink"),w("basis-","flexBasis"),w("-?(order)-"),"-?(order)-(\\d+)",w("grid-cols-","gridTemplateColumns"),m("grid-cols-(\\d+)","gridTemplateColumns",Io),w("col-","gridColumn"),m("col-(span)-(\\d+)","gridColumn",Mo),w("col-start-","gridColumnStart"),m("col-start-(auto|\\d+)","gridColumnStart"),w("col-end-","gridColumnEnd"),m("col-end-(auto|\\d+)","gridColumnEnd"),w("grid-rows-","gridTemplateRows"),m("grid-rows-(\\d+)","gridTemplateRows",Io),w("row-","gridRow"),m("row-(span)-(\\d+)","gridRow",Mo),w("row-start-","gridRowStart"),m("row-start-(auto|\\d+)","gridRowStart"),w("row-end-","gridRowEnd"),m("row-end-(auto|\\d+)","gridRowEnd"),m("grid-flow-((row|col)(-dense)?)","gridAutoFlow",t=>$r($o(t))),m("grid-flow-(dense)","gridAutoFlow"),w("auto-cols-","gridAutoColumns"),w("auto-rows-","gridAutoRows"),w("gap-x(?:$|-)","gap","columnGap"),w("gap-y(?:$|-)","gap","rowGap"),w("gap(?:$|-)","gap"),"(justify-(?:items|self))-",m("justify-","justifyContent",So),m("(content|items|self)-",t=>({["align-"+t[1]]:So(t)})),m("(place-(content|items|self))-",({1:t,$$:e})=>({[t]:("wun".includes(e[3])?"space-":"")+e})),w("p([xytrbl])?(?:$|-)","padding",it("padding")),w("-?m([xytrbl])?(?:$|-)","margin",it("margin")),w("-?space-(x|y)(?:$|-)","space",({1:t,_:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[t]]:`calc(${e} * calc(1 - var(--tw-space-${t}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[t]]:`calc(${e} * var(--tw-space-${t}-reverse))`}})),m("space-(x|y)-reverse",({1:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"1"}})),w("w-","width"),w("min-w-","minWidth"),w("max-w-","maxWidth"),w("h-","height"),w("min-h-","minHeight"),w("max-h-","maxHeight"),w("font-","fontWeight"),w("font-","fontFamily",({_:t})=>typeof(t=L(t))[1]=="string"?{fontFamily:se(t)}:{fontFamily:se(t[0]),...t[1]}),m("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),m("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),m("italic","fontStyle"),m("not-italic",{fontStyle:"normal"}),m("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:t,2:e="",3:r})=>e=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(r?"numeric-fraction":"pt".includes(e[0])?"numeric-spacing":e?"numeric-figure":t)]:t,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...xe({"--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,/*!*/ /*!*/)"})}),w("tracking-","letterSpacing"),w("leading-","lineHeight"),m("list-(inside|outside)","listStylePosition"),w("list-","listStyleType"),m("list-","listStyleType"),w("placeholder-opacity-","placeholderOpacity",({_:t})=>({"&::placeholder":{"--tw-placeholder-opacity":t}})),q("placeholder-",{property:"color",selector:"&::placeholder"}),m("text-(left|center|right|justify|start|end)","textAlign"),m("text-(ellipsis|clip)","textOverflow"),w("text-opacity-","textOpacity","--tw-text-opacity"),q("text-",{property:"color"}),w("text-","fontSize",({_:t})=>typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}),w("indent-","textIndent"),m("(overline|underline|line-through)","textDecorationLine"),m("no-underline",{textDecorationLine:"none"}),w("underline-offset-","textUnderlineOffset"),q("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),w("decoration-","textDecorationThickness"),m("decoration-","textDecorationStyle"),m("(uppercase|lowercase|capitalize)","textTransform"),m("normal-case",{textTransform:"none"}),m("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),m("align-","verticalAlign"),m("whitespace-","whiteSpace"),m("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),m("break-words",{overflowWrap:"break-word"}),m("break-all",{wordBreak:"break-all"}),m("break-keep",{wordBreak:"keep-all"}),q("caret-",{opacityVariable:!1,opacitySection:"opacity"}),q("accent-",{opacityVariable:!1,opacitySection:"opacity"}),m("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:t})=>`linear-gradient(to ${Ue(t," ")},var(--tw-gradient-stops))`),q("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-from":t.value,"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),q("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${t.value},var(--tw-gradient-to)`})),q("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),m("bg-(fixed|local|scroll)","backgroundAttachment"),m("bg-origin-(border|padding|content)","backgroundOrigin",({1:t})=>t+"-box"),m(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),m("bg-blend-","backgroundBlendMode"),m("bg-clip-(border|padding|content|text)","backgroundClip",({1:t})=>t+(t=="text"?"":"-box")),w("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),q("bg-",{section:"backgroundColor"}),w("bg-","backgroundImage"),w("bg-","backgroundPosition"),m("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",$r),w("bg-","backgroundSize"),w("rounded(?:$|-)","borderRadius"),w("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:t,_:e})=>{let r={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[t]||[t,t];return{[`border-${Ue(r[0])}-radius`]:e,[`border-${Ue(r[1])}-radius`]:e}}),m("border-(collapse|separate)","borderCollapse"),w("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),m("border-(solid|dashed|dotted|double|none)","borderStyle"),w("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:t,_:e})=>({...xe({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(t||"-x")]:e,["--tw-border-spacing"+(t||"-y")]:e,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),q("border-([xytrbl])-",{section:"borderColor"},it("border","Color")),q("border-"),w("border-([xytrbl])(?:$|-)","borderWidth",it("border","Width")),w("border(?:$|-)","borderWidth"),w("divide-opacity(?:$|-)","divideOpacity",({_:t})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":t}})),m("divide-(solid|dashed|dotted|double|none)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:t}})),m("divide-([xy]-reverse)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+t]:"1"}})),w("divide-([xy])(?:$|-)","divideWidth",({1:t,_:e})=>{let r={x:"lr",y:"tb"}[t];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${t}-reverse`]:"0",[`border-${Ue(r[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${t}-reverse)))`,[`border-${Ue(r[1])}Width`]:`calc(${e} * var(--tw-divide-${t}-reverse))`}}}),q("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),w("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),q("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),w("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),m("ring-inset",{"--tw-ring-inset":"inset"}),q("ring-",{property:"--tw-ring-color"}),w("ring(?:$|-)","ringWidth",({_:t},{theme:e})=>({...xe({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":e("ringOffsetWidth","","0px"),"--tw-ring-offset-color":te(e("ringOffsetColor","","#fff")),"--tw-ring-color":te(e("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":e("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${t} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),q("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-shadow-color":t.value,"--tw-shadow":"var(--tw-shadow-colored)"})),w("shadow(?:$|-)","boxShadow",({_:t})=>({...xe({"--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":se(t),"--tw-shadow-colored":se(t).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),w("(opacity)-"),m("mix-blend-","mixBlendMode"),...Eo(),...Eo("backdrop-"),w("transition(?:$|-)","transitionProperty",(t,{theme:e})=>({transitionProperty:se(t),transitionTimingFunction:t._=="none"?void 0:se(e("transitionTimingFunction","")),transitionDuration:t._=="none"?void 0:se(e("transitionDuration",""))})),w("duration(?:$|-)","transitionDuration","transitionDuration",se),w("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",se),w("delay(?:$|-)","transitionDelay","transitionDelay",se),w("animate(?:$|-)","animation",(t,{theme:e,h:r,e:i})=>{let n=se(t),s=n.split(" "),o=e("keyframes",s[0]);return o?{["@keyframes "+(s[0]=i(r(s[0])))]:o,animation:s.join(" ")}:{animation:n}}),"(transform)-(none)",m("transform",cn),m("transform-(cpu|gpu)",({1:t})=>({"--tw-transform":Do(t=="gpu")})),w("scale(-[xy])?-","scale",({1:t,_:e})=>({["--tw-scale"+(t||"-x")]:e,["--tw-scale"+(t||"-y")]:e,...cn()})),w("-?(rotate)-","rotate",ln),w("-?(translate-[xy])-","translate",ln),w("-?(skew-[xy])-","skew",ln),m("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",$r),"(appearance)-",w("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",w("(cursor)-"),"(cursor)-",m("snap-(none)","scroll-snap-type"),m("snap-(x|y|both)",({1:t})=>({...xe({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":t+" var(--tw-scroll-snap-strictness)"})),m("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),m("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),m("snap-(normal|always)","scroll-snap-stop"),m("scroll-(auto|smooth)","scroll-behavior"),w("scroll-p([xytrbl])?(?:$|-)","padding",it("scroll-padding")),w("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",it("scroll-margin")),m("touch-(auto|none|manipulation)","touch-action"),m("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:t,2:e,3:r})=>({...xe({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${e?"pan-x":r?"pan-y":t}`]:t,"touch-action":"var(--tw-touch-action)"})),m("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),m("outline",{outlineStyle:"solid"}),m("outline-(dashed|dotted|double)","outlineStyle"),w("-?(outline-offset)-"),q("outline-",{opacityVariable:!1,opacitySection:"opacity"}),w("outline-","outlineWidth"),"(pointer-events)-",w("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:t})=>({x:"horizontal",y:"vertical"})[t]||t||"both"],m("select-(none|text|all|auto)","userSelect"),q("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),q("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),w("stroke-","strokeWidth"),m("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),m("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function $r(t){return(typeof t=="string"?t:t[1]).replace(/-/g," ").trim()}function $o(t){return(typeof t=="string"?t:t[1]).replace("col","column")}function Ue(t,e="-"){let r=[];for(let i of t)r.push({t:"top",r:"right",b:"bottom",l:"left"}[i]);return r.join(e)}function se(t){return t&&""+(t._||t)}function So({$$:t}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[t[3]||""]||"")+t}function it(t,e=""){return({1:r,_:i})=>{let n={x:"lr",y:"tb"}[r]||r+r;return n?{...At(t+"-"+Ue(n[0])+e,i),...At(t+"-"+Ue(n[1])+e,i)}:At(t+e,i)}}function Eo(t=""){let e=["blur","brightness","contrast","grayscale","hue-rotate","invert",t&&"opacity","saturate","sepia",!t&&"drop-shadow"].filter(Boolean),r={};for(let i of e)r[`--tw-${t}${i}`]="var(--tw-empty,/*!*/ /*!*/)";return r={...xe(r),[`${t}filter`]:e.map(i=>`var(--tw-${t}${i})`).join(" ")},[`(${t}filter)-(none)`,m(`${t}filter`,r),...e.map(i=>w(`${i[0]=="h"?"-?":""}(${t}${i})(?:$|-)`,i,({1:n,_:s})=>({[`--tw-${n}`]:L(s).map(o=>`${i}(${o})`).join(" "),...r})))]}function ln({1:t,_:e}){return{["--tw-"+t]:e,...cn()}}function cn(){return{...xe({"--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":Do()}),transform:"var(--tw-transform)"}}function Do(t){return[t?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function Mo({1:t,2:e}){return`${t} ${e} / ${t} ${e}`}function Io({1:t}){return`repeat(${t},minmax(0,1fr))`}function xe(t){return{"@layer defaults":{"*,::before,::after":t,"::backdrop":t}}}var Lo=[["sticky","@supports ((position: -webkit-sticky) or (position:sticky))"],["motion-reduce","@media (prefers-reduced-motion:reduce)"],["motion-safe","@media (prefers-reduced-motion:no-preference)"],["print","@media print"],["(portrait|landscape)",({1:t})=>`@media (orientation:${t})`],["contrast-(more|less)",({1:t})=>`@media (prefers-contrast:${t})`],["(first-(letter|line)|placeholder|backdrop|before|after)",({1:t})=>`&::${t}`],["(marker|selection)",({1:t})=>`& *::${t},&::${t}`],["file","&::file-selector-button"],["(first|last|only)",({1:t})=>`&:${t}-child`],["even","&:nth-child(2n)"],["odd","&:nth-child(odd)"],["open","&[open]"],["(aria|data)-",({1:t,$$:e},r)=>e&&`&[${t}-${r.theme(t,e)||le(e,"",r)||`${e}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:t,3:e="",4:r,5:i="",6:n=e},{e:s,h:o,v:a})=>{let l=rt(i)||(r[0]=="["?r:a(r.slice(1)));return`${(l.includes("&")?l:"&"+l).replace(/&/g,`:merge(.${s(o(t+n))})`)}${t[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:t})=>`[dir="${t}"] &`],["supports-",({$$:t},e)=>{if(t&&(t=e.theme("supports",t)||le(t,"",e)),t)return t.includes(":")||(t+=":var(--tw)"),/^\w*\s*\(/.test(t)||(t=`(${t})`),`@supports ${t.replace(/\b(and|or|not)\b/g," $1 ").trim()}`}],["max-",({$$:t},e)=>{if(t&&(t=e.theme("screens",t)||le(t,"",e)),typeof t=="string")return`@media not all and (min-width:${t})`}],["min-",({$$:t},e)=>(t&&(t=le(t,"",e)),t&&`@media (min-width:${t})`)],[/^\[(.+)]$/,({1:t})=>/[&@]/.test(t)&&rt(t).replace(/[}]+$/,"").split("{")]];function jo({colors:t,disablePreflight:e}={}){return{preflight:e?void 0:_o,theme:{...jt,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...t}},variants:Lo,rules:Ao,finalize(r){return r.n&&r.d&&r.r.some(i=>/^&::(before|after)$/.test(i))&&!/(^|;)content:/.test(r.d)?{...r,d:"content:var(--tw-content);"+r.d}:r}}}var cc={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},uc={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},dc={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},hc={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},pc={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},fc={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},mc={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},gc={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},wc={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},yc={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},vc={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},bc={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},xc={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},kc={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},Cc={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},_c={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},$c={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},Sc={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},Ec={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},Mc={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},Ic={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},Ac={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},To={__proto__:null,slate:cc,gray:uc,zinc:dc,neutral:hc,stone:pc,red:fc,orange:mc,amber:gc,yellow:wc,lime:yc,green:vc,emerald:bc,teal:xc,cyan:kc,sky:Cc,blue:_c,indigo:$c,violet:Sc,purple:Ec,fuchsia:Mc,pink:Ic,rose:Ac};function Sr({disablePreflight:t}={}){return jo({colors:To,disablePreflight:t})}function Er({className:t="prose",defaultColor:e="gray",extend:r={},colors:i={}}={}){return i={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",...i,dark:i.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",...i.dark}},{variants:[["headings","h1,h2,h3,h4,h5,h6,th"],["h1"],["h2"],["h3"],["h4"],["h5"],["h6"],["p"],["a"],["blockquote"],["figure"],["figcaption"],["strong"],["em"],["code"],["pre"],["ol"],["ul"],["li"],["table"],["thead"],["tr"],["th"],["td"],["img"],["video"],["hr"],["lead",".lead"]].map(([s,o=s])=>[`${t}-${s}`,(a,l)=>Po(t,o[0]=="."?"."+l.e(l.h(o.slice(1))):o,l,c=>`& :is(${c.trim()})`)]),rules:[[`(lead|not-${t})`,({1:s},{h:o})=>[{c:o(s)}]],[`${t}-invert`,{"@layer base":{"--tw-prose-body":"var(--tw-prose-invert-body)","--tw-prose-headings":"var(--tw-prose-invert-headings)","--tw-prose-lead":"var(--tw-prose-invert-lead)","--tw-prose-links":"var(--tw-prose-invert-links)","--tw-prose-bold":"var(--tw-prose-invert-bold)","--tw-prose-counters":"var(--tw-prose-invert-counters)","--tw-prose-bullets":"var(--tw-prose-invert-bullets)","--tw-prose-hr":"var(--tw-prose-invert-hr)","--tw-prose-quotes":"var(--tw-prose-invert-quotes)","--tw-prose-quote-borders":"var(--tw-prose-invert-quote-borders)","--tw-prose-captions":"var(--tw-prose-invert-captions)","--tw-prose-code":"var(--tw-prose-invert-code)","--tw-prose-pre-code":"var(--tw-prose-invert-pre-code)","--tw-prose-pre-bg":"var(--tw-prose-invert-pre-bg)","--tw-prose-th-borders":"var(--tw-prose-invert-th-borders)","--tw-prose-td-borders":"var(--tw-prose-invert-td-borders)"}}],[t+"-",({$$:s},o)=>{let a=Uo(o.theme("fontSize",s));return a&&{"@layer components":a}}],[t+"-",({$$:s},o)=>n(s,o)],[t,(s,o)=>({...n(e,o),"@layer base":[Oo(t,o,{a:{color:"var(--tw-prose-links)",textDecorationLine:"underline",fontWeight:"500"},strong:{color:"var(--tw-prose-bold)",fontWeight:"600"},"a strong,blockquote strong,thead th strong":{color:"inherit"},ul:{listStyleType:"disc"},ol:{listStyleType:"decimal"},'ol[type="A"]':{listStyleType:"upper-alpha"},'ol[type="a"]':{listStyleType:"lower-alpha"},'ol[type="A" s]':{listStyleType:"upper-alpha"},'ol[type="a" s]':{listStyleType:"lower-alpha"},'ol[type="I"]':{listStyleType:"upper-roman"},'ol[type="i"]':{listStyleType:"lower-roman"},'ol[type="I" s]':{listStyleType:"upper-roman"},'ol[type="i" s]':{listStyleType:"lower-roman"},'ol[type="1"]':{listStyleType:"decimal"},"ol,ul":{marginTop:C(20,16),marginBottom:C(20,16),paddingLeft:C(26,16)},li:{marginTop:C(8,16),marginBottom:C(8,16)},"ol>li,ul>li":{paddingLeft:C(6,16)},">ul>li p":{marginTop:C(12,16),marginBottom:C(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:C(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:C(20,16)},"ol>li::marker":{fontWeight:"400",color:"var(--tw-prose-counters)"},"ul>li::marker":{color:"var(--tw-prose-bullets)"},"ul ul,ul ol,ol ul,ol ol":{marginTop:C(12,16),marginBottom:C(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:C(48,16),marginBottom:C(48,16)},blockquote:{marginTop:C(32,20),marginBottom:C(32,20),paddingLeft:C(20,20),fontWeight:"500",fontStyle:"italic",color:"var(--tw-prose-quotes)",borderLeftWidth:"0.25rem",borderLeftColor:"var(--tw-prose-quote-borders)",quotes:'"\\201C""\\201D""\\2018""\\2019"'},"blockquote p:first-of-type::before":{content:"open-quote"},"blockquote p:last-of-type::after":{content:"close-quote"},p:{marginTop:C(20,16),marginBottom:C(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:C(36,16),marginTop:"0",marginBottom:C(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900",color:"inherit"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:C(24,16),marginTop:C(48,24),marginBottom:C(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800",color:"inherit"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:C(20,16),marginTop:C(32,20),marginBottom:C(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700",color:"inherit"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:C(24,16),marginBottom:C(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700",color:"inherit"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:C(32,16),marginBottom:C(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:C(14,16),lineHeight:"1.4",marginTop:C(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:C(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:C(21,24)},"h3 code":{fontSize:C(18,20)},"a code,h1 code,h2 code,h3 code,h4 code,blockquote code,thead th code":{color:"inherit"},pre:{color:"var(--tw-prose-pre-code)",backgroundColor:"var(--tw-prose-pre-bg)",overflowX:"auto",fontWeight:"400",fontSize:C(14,16),lineHeight:"1.7",marginTop:C(24,14),marginBottom:C(24,14),borderRadius:"0.375rem",paddingTop:C(12,14),paddingRight:C(16,14),paddingBottom:C(12,14),paddingLeft:C(16,14)},"pre code":{backgroundColor:"transparent",borderWidth:"0",borderRadius:"0",padding:"0",fontWeight:"inherit",color:"inherit",fontSize:"inherit",fontFamily:"inherit",lineHeight:"inherit"},"pre code::before":{content:"none"},"pre code::after":{content:"none"},table:{width:"100%",tableLayout:"auto",textAlign:"left",marginTop:C(32,16),marginBottom:C(32,16),fontSize:C(14,16),lineHeight:"1.7"},thead:{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-th-borders)"},"thead th":{color:"var(--tw-prose-headings)",fontWeight:"600",verticalAlign:"bottom",paddingRight:C(8,14),paddingBottom:C(8,14),paddingLeft:C(8,14)},"thead th:first-child":{paddingLeft:"0"},"thead th:last-child":{paddingRight:"0"},"tbody tr":{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-td-borders)"},"tbody tr:last-child":{borderBottomWidth:"0"},"tbody td,tfoot td":{verticalAlign:"baseline",paddingTop:C(8,14),paddingRight:C(8,14),paddingBottom:C(8,14),paddingLeft:C(8,14)},"tbody td:first-child,tfoot td:first-child":{paddingLeft:"0"},"tbody td:last-child,tfoot td:last-child":{paddingRight:"0"},[`.${o.e(o.h("lead"))}`]:{color:"var(--tw-prose-lead)",fontSize:C(20,16),lineHeight:"1.6",marginTop:C(24,20),marginBottom:C(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),Oo(t,o,r)],"@layer components":{...Uo(o.theme("fontSize","base")),color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"}})]]};function n(s,o){let a={},l={},c=(d,h,f)=>{let g=o.theme(`colors.${s}.${h}`,h);f["--tw-prose-"+d]=te(g);let p=f!=l&&o.d("colors",`${s}-${h}`,g);p&&(l["--tw-prose-"+d]=te(p))};for(let d in i){let h=i[d];d!="dark"&&h&&c(d,h,a)}for(let d in i.dark||{}){let h=i.dark[d];h&&(i.dark?c("invert-"+d,h,a):c(d,h,l))}return Object.keys(a).length?{"@layer defaults":{"&":a,[o.v("dark")]:l}}:void 0}}function Oo(t,e,r){let i={};for(let n in r)i[Po(t,n,e,s=>`.${e.e(e.h(t))}${s}`)]=r[n];return i}function Po(t,e,{e:r,h:i},n){return e.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(s,o=" ",a=s,l="")=>n(`${o}:where(${a}):not(:where(.${r(i("not-"+t))} *))${l}`))}function Uo(t){return t?typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}:void 0}function C(t,e){return`${(t/e).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}var un=Dt({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:[Sr(),Cr(),_r(),Er()]});function Mr(t,e=!0){let r=(function(){if(Dc)try{let l=kr(new CSSStyleSheet);return l.connect=c=>{let d=dn(c);d.adoptedStyleSheets=[...d.adoptedStyleSheets,l.target]},l.disconnect=xr,l}catch{}let s=document.createElement("style");s.media="not all",document.head.prepend(s);let o=[kr(s)],a=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,d){o[0].insert(l,c,d);let h=this.target.cssRules[c];o.forEach((f,g)=>g&&f.target.insertRule(h.cssText,c))},resume(l,c){return o[0].resume(l,c)},connect(l){let c=document.createElement("style");dn(l).appendChild(c);let d=kr(c),{cssRules:h}=this.target;for(let f=0;f<h.length;f++)d.target.insertRule(h[f].cssText,f);o.push(d),a.set(l,d)},disconnect(l){let c=o.indexOf(a.get(l));c>=0&&o.splice(c,1)}}})(),i=yo({...t,hash:t.hash??e},r),n=vo(i);return function(o){return class extends o{connectedCallback(){super.connectedCallback?.(),r.connect(this),n.observe(dn(this))}disconnectedCallback(){r.disconnect(this),super.disconnectedCallback?.()}constructor(...l){super(...l),this.tw=i}}}}var Dc=typeof ShadowRoot<"u"&&(typeof ShadyCSS>"u"||ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;function dn(t){return t.shadowRoot||t.attachShadow({mode:"open"})}var k=t=>Mr(un)(t);var hn=class extends k(v){static properties={color:{type:String},radius:{type:String},size:{type:String},border:{type:String},darkMode:{type:Boolean,attribute:"dark-mode"}};static styles=O`
|
|
131
131
|
:host {
|
|
132
132
|
display: block;
|
|
133
133
|
}
|
|
@@ -154,7 +154,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
154
154
|
<slot></slot>
|
|
155
155
|
</div>
|
|
156
156
|
</div>
|
|
157
|
-
`}};customElements.get("mw-spinning-border")||customElements.define("mw-spinning-border",
|
|
157
|
+
`}};customElements.get("mw-spinning-border")||customElements.define("mw-spinning-border",hn);var pn=class extends k(v){static properties={state:{type:String},color:{type:String},bubbleStyle:{type:String},src:{type:String},width:{type:String},height:{type:String}};static styles=O`
|
|
158
158
|
.shadow-button {
|
|
159
159
|
box-shadow:
|
|
160
160
|
-58.9194px 74.8436px 38.218px rgba(0, 0, 0, 0.01),
|
|
@@ -219,7 +219,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
219
219
|
</button>
|
|
220
220
|
</mw-spinning-border>
|
|
221
221
|
</div>
|
|
222
|
-
`};customElements.get("mw-bubble")||customElements.define("mw-bubble",
|
|
222
|
+
`};customElements.get("mw-bubble")||customElements.define("mw-bubble",pn);var Ir={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Ar=t=>(...e)=>({_$litDirective$:t,values:e}),nt=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,r,i){this._$Ct=e,this._$AM=r,this._$Ci=i}_$AS(e,r){return this.update(e,r)}update(e,r){return this.render(...r)}};var{I:Lc}=bs,Ro=t=>t;var Bo=()=>document.createComment(""),st=(t,e,r)=>{let i=t._$AA.parentNode,n=e===void 0?t._$AB:e._$AA;if(r===void 0){let s=i.insertBefore(Bo(),n),o=i.insertBefore(Bo(),n);r=new Lc(s,o,t,t.options)}else{let s=r._$AB.nextSibling,o=r._$AM,a=o!==t;if(a){let l;r._$AQ?.(t),r._$AM=t,r._$AP!==void 0&&(l=t._$AU)!==o._$AU&&r._$AP(l)}if(s!==n||a){let l=r._$AA;for(;l!==s;){let c=Ro(l).nextSibling;Ro(i).insertBefore(l,n),l=c}}}return r},ke=(t,e,r=t)=>(t._$AI(e,r),t),jc={},Fo=(t,e=jc)=>t._$AH=e,qo=t=>t._$AH,Dr=t=>{t._$AR(),t._$AA.remove()};var Vo=(t,e,r)=>{let i=new Map;for(let n=e;n<=r;n++)i.set(t[n],n);return i},K=Ar(class extends nt{constructor(t){if(super(t),t.type!==Ir.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,r){let i;r===void 0?r=e:e!==void 0&&(i=e);let n=[],s=[],o=0;for(let a of t)n[o]=i?i(a,o):o,s[o]=r(a,o),o++;return{values:s,keys:n}}render(t,e,r){return this.dt(t,e,r).values}update(t,[e,r,i]){let n=qo(t),{values:s,keys:o}=this.dt(e,r,i);if(!Array.isArray(n))return this.ut=o,s;let a=this.ut??=[],l=[],c,d,h=0,f=n.length-1,g=0,p=s.length-1;for(;h<=f&&g<=p;)if(n[h]===null)h++;else if(n[f]===null)f--;else if(a[h]===o[g])l[g]=ke(n[h],s[g]),h++,g++;else if(a[f]===o[p])l[p]=ke(n[f],s[p]),f--,p--;else if(a[h]===o[p])l[p]=ke(n[h],s[p]),st(t,l[p+1],n[h]),h++,p--;else if(a[f]===o[g])l[g]=ke(n[f],s[g]),st(t,n[h],n[f]),f--,g++;else if(c===void 0&&(c=Vo(o,g,p),d=Vo(a,h,f)),c.has(a[h]))if(c.has(a[f])){let S=d.get(o[g]),b=S!==void 0?n[S]:null;if(b===null){let $=st(t,n[h]);ke($,s[g]),l[g]=$}else l[g]=ke(b,s[g]),st(t,n[h],b),n[S]=null;g++}else Dr(n[f]),f--;else Dr(n[h]),h++;for(;g<=p;){let S=st(t,l[p+1]);ke(S,s[g]),l[g++]=S}for(;h<=f;){let S=n[h++];S!==null&&Dr(S)}return this.ut=o,Fo(t,l),ne}});var Tt=class t extends k(v){static properties={examples:{type:Object},color:{type:String},darkMode:{type:Boolean,attribute:"dark-mode"}};constructor(){super(),this.examples={title:"",items:[]},this.color="",this.darkMode=!1}render(){return!this.examples?.title&&!this.examples?.items?.length?null:u`
|
|
223
223
|
<div class="${this.darkMode?"dark":""} flex h-full w-full flex-1 flex-col overflow-y-auto px-4 pt-6 pb-2">
|
|
224
224
|
${this.examples.title?u`
|
|
225
225
|
<h2 class="mt-14 px-2 pt-9 pb-2 text-left text-3xl leading-tight font-bold tracking-tight text-black dark:text-white">
|
|
@@ -228,7 +228,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
228
228
|
`:null}
|
|
229
229
|
${this.examples?.items?.length?u`
|
|
230
230
|
<ul class="mt-auto flex flex-wrap justify-end gap-2.5 text-sm leading-6 text-black select-none dark:text-white">
|
|
231
|
-
${
|
|
231
|
+
${K(this.examples.items,e=>e,e=>u`
|
|
232
232
|
<li
|
|
233
233
|
class="my-auto inline-block cursor-pointer rounded-2xl border-1 border-gray-300 px-4 py-2 text-left transition-all duration-200 hover:-translate-y-0.5 hover:bg-[${this.color}]/[0.08] hover:opacity-80 hover:shadow dark:border-gray-600"
|
|
234
234
|
@click="${()=>this.#e(e)}">
|
|
@@ -304,7 +304,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
304
304
|
</div>
|
|
305
305
|
</div>
|
|
306
306
|
</div>
|
|
307
|
-
`}#e(){this.dispatchEvent(new t.NewChatClickEvent)}#t(){this.dispatchEvent(new t.CloseClickEvent)}};Pe.NewChatClickEvent=class extends CustomEvent{static type="mw:new-chat-click";constructor(e={}){super(Pe.NewChatClickEvent.type,{...e})}};Pe.CloseClickEvent=class extends CustomEvent{static type="mw:close-click";constructor(e={}){super(Pe.CloseClickEvent.type,{...e})}};customElements.get("mw-chat-header")||customElements.define("mw-chat-header",Pe);var
|
|
307
|
+
`}#e(){this.dispatchEvent(new t.NewChatClickEvent)}#t(){this.dispatchEvent(new t.CloseClickEvent)}};Pe.NewChatClickEvent=class extends CustomEvent{static type="mw:new-chat-click";constructor(e={}){super(Pe.NewChatClickEvent.type,{...e})}};Pe.CloseClickEvent=class extends CustomEvent{static type="mw:close-click";constructor(e={}){super(Pe.CloseClickEvent.type,{...e})}};customElements.get("mw-chat-header")||customElements.define("mw-chat-header",Pe);var No={airplay:`<svg
|
|
308
308
|
xmlns="http://www.w3.org/2000/svg"
|
|
309
309
|
width="24"
|
|
310
310
|
height="24"
|
|
@@ -1589,12 +1589,12 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
1589
1589
|
stroke-linejoin="round"
|
|
1590
1590
|
>
|
|
1591
1591
|
<path d="M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z" />
|
|
1592
|
-
</svg>`};var
|
|
1592
|
+
</svg>`};var Lr=class t extends HTMLElement{static observedAttributes=["name","fill","stroke"];constructor(){super(),this.attachShadow({mode:"open"})}attributeChangedCallback(e,r,i){if(r!==i&&t.observedAttributes.includes(e)){switch(e){case"name":this.name=i||"";break;case"fill":this.fill=i||"none";break;case"stroke":this.stroke=i||"currentColor";break}this.render()}}resolveIcon(e){throw new Error("Not implemented")}render(){let e=document.createElement("style");if(e.textContent=`
|
|
1593
1593
|
:host {
|
|
1594
1594
|
display: inline-block;
|
|
1595
1595
|
line-height: 0;
|
|
1596
1596
|
}
|
|
1597
|
-
`,this.shadowRoot){for(;this.shadowRoot.firstChild;)this.shadowRoot.removeChild(this.shadowRoot.firstChild);this.shadowRoot.appendChild(e)}if(!this.name)return;let r=this.resolveIcon(this.name);if(!r){console.warn(`'${this.name}' not found, please add it to ${t.name}`);return}let s=new DOMParser().parseFromString(r,"image/svg+xml").documentElement;s.setAttribute("fill",this.fill),s.setAttribute("stroke",this.stroke),s.style.width="100%",s.style.height="100%",this.shadowRoot?.appendChild(s)}name="";fill="none";stroke="currentColor"};var
|
|
1597
|
+
`,this.shadowRoot){for(;this.shadowRoot.firstChild;)this.shadowRoot.removeChild(this.shadowRoot.firstChild);this.shadowRoot.appendChild(e)}if(!this.name)return;let r=this.resolveIcon(this.name);if(!r){console.warn(`'${this.name}' not found, please add it to ${t.name}`);return}let s=new DOMParser().parseFromString(r,"image/svg+xml").documentElement;s.setAttribute("fill",this.fill),s.setAttribute("stroke",this.stroke),s.style.width="100%",s.style.height="100%",this.shadowRoot?.appendChild(s)}name="";fill="none";stroke="currentColor"};var Tc=No,fn=class extends Lr{resolveIcon(e){return Tc[e]}};customElements.get("lucide-icon")||customElements.define("lucide-icon",fn);var Zo=li(Go(),1);var ue=Object.freeze({PENDING:"pending",READY:"ready",ERROR:"error"}),Or=class{#e;#t;#r=null;#i=!1;#n=null;#s=[];constructor(e,r){this.#e=e,this.#t={acceptedTypes:["image/jpeg","image/png","image/gif","image/webp","image/svg+xml","image/heic"],maxFileSize:10*1024*1024,maxFiles:3,onError:()=>{},enabled:!0,isConnected:()=>!1,onConnect:()=>{},...r},e.addController(this),this.#l()}hostDisconnected(){this.#a(),this.#c(),this.#r&&this.#r.parentNode&&this.#r.parentNode.removeChild(this.#r)}#o(){this.#t.enabled&&(this.#e.addEventListener("dragover",this.#p),this.#e.addEventListener("dragenter",this.#f),this.#e.addEventListener("dragleave",this.#w),this.#e.addEventListener("drop",this.#x))}#a(){this.#e.removeEventListener("dragover",this.#p),this.#e.removeEventListener("dragenter",this.#f),this.#e.removeEventListener("dragleave",this.#w),this.#e.removeEventListener("drop",this.#x)}#d(){this.#t.enabled&&this.#e.addEventListener("paste",this.#v)}#c(){this.#e.removeEventListener("paste",this.#v)}#l(){this.#r=document.createElement("input"),this.#r.type="file",this.#r.accept=this.#t.acceptedTypes.join(","),this.#r.multiple=this.#t.maxFiles>1,this.#r.style.display="none",this.#r.addEventListener("change",this.#h),document.body.appendChild(this.#r)}#h=e=>{let r=e.target,i=Array.from(r.files||[]);this.#t.isConnected()||this.#t.onConnect?.(),this.#m(i),r.value=""};#p=e=>{e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="copy")};#f=e=>{e.preventDefault(),e.dataTransfer&&this.#b(e.dataTransfer)&&this.#y(!0)};#w=e=>{e.preventDefault();let r=e.relatedTarget;this.#e.contains(r)||this.#y(!1)};#x=e=>{if(e.preventDefault(),this.#y(!1),e.dataTransfer){let r=Array.from(e.dataTransfer.files||[]);this.#m(r)}};#v=e=>{if(!e.clipboardData)return;let i=Array.from(e.clipboardData.items||[]).filter(s=>s.type.startsWith("image/"));if(i.length===0)return;e.preventDefault();let n=i.map(s=>s.getAsFile()).flatMap(s=>s?[s]:[]);this.#m(n)};#b(e){return e.types&&e.types.includes("Files")}#y(e){this.#i!==e&&(this.#i=e,this.#e.requestUpdate())}#u(e){this.#n=e,this.#t.onError(e),this.#e.requestUpdate(),setTimeout(()=>{this.#k()},6e3)}#k(){this.#n=null,this.#e.requestUpdate()}async#m(e){if(e.length===0)return;this.#k();let r=e.filter(o=>this.#C(o));if(r.length===0)return;let i=this.#s.length,n=this.#t.maxFiles??1/0,s=r.length;if(i+s>n){this.#u(`You can upload a maximum of ${n} files`);return}try{let a=(await Promise.all(r.map(l=>this.#_(l)))).filter(l=>!this.#s.some(c=>c.dataUrl===l.dataUrl));this.#s=[...this.#s,...a],this.#e.requestUpdate(),await _i({times:5,delay:2e3},async()=>{if(this.#t.isConnected())await Ci(3,a,async l=>{await this.#g(l)});else throw new Error("Not connected yet")}),this.#e.requestUpdate()}catch(o){console.error("Failed to process and upload images:",o),this.#u("Upload failed")}}#C(e){return this.#t.acceptedTypes.includes(e.type)?e.size>this.#t.maxFileSize?(this.#u(`Max file size: ${this.#t.maxFileSize/(1024*1024)}MB`),!1):!0:(this.#u("Invalid file type"),!1)}async#_(e){try{let r=await(0,Zo.fileToBase64)(e);return{id:crypto.randomUUID(),name:e.name,type:e.type,size:e.size,dataUrl:r,file:e,processingState:ue.PENDING}}catch(r){let i=r instanceof Error?r:new Error(String(r));throw new Error(`Failed to read file: ${e.name} - ${i.message}`)}}async#g(e){if(!e){console.error("No image provided to upload"),this.#u("No image provided");return}if(!this.#t?.uploadUrl){console.error("Missing uploadUrl in options"),this.#u("Upload URL not configured");return}e.processingState=ue.PENDING,this.#e.requestUpdate();let r=new FormData;r.append("file",e.file),r.append("imageId",e.id),r.append("role",this.#t.role||"user"),this.#t.conversationId&&r.append("conversationId",this.#t.conversationId),this.#t.widgetId&&r.append("widgetId",this.#t.widgetId);try{let i=await fetch(this.#t.uploadUrl,{method:"POST",body:r});if(!i.ok)throw new Error(`Upload failed with status: ${i.status}`);let n=await i.json();if(!!!n?.success){let o=n?.error||"Upload failed";throw new Error(o)}n.imageUrl&&n.imageId?(e.imageUrl=n.imageUrl,e.id=n.imageId,e.processingState=ue.READY):e.processingState=ue.PENDING,this.#e.requestUpdate()}catch(i){let n=i instanceof Error?i:new Error(String(i));console.error("Upload error:",n.message),this.#u(n.message),e.processingState=ue.ERROR,this.#e.requestUpdate()}}get isDragging(){return this.#i}get error(){return this.#n}get selectedImages(){return this.#s}get hasPendingImages(){return this.#s.some(e=>e.processingState===ue.PENDING)}openImagePicker=()=>{if(!this.#t.enabled||!this.#t.widgetId){console.warn("Image uploads are disabled");return}this.#r&&this.#r.click()};clearError(){this.#k()}updateUploadOptions(e){e.conversationId!==void 0&&(this.#t.conversationId=e.conversationId),e.widgetId!==void 0&&(this.#t.widgetId=e.widgetId),e.enabled!==void 0&&(this.#t.enabled=!!e.enabled),e.isConnected!==void 0&&(this.#t.isConnected=e.isConnected),e.onConnect!==void 0&&(this.#t.onConnect=e.onConnect),this.#t.enabled?(this.#o(),this.#d()):(this.#a(),this.#c())}restoreImages(e){if(!Array.isArray(e)||e.length===0){this.#s=[],this.#e.requestUpdate();return}let r=e.map(i=>{let n=new File([],i.name,{type:i.type});return{id:i.id,name:i.name,type:i.type,size:i.size,dataUrl:i.url,file:n,processingState:ue.READY,imageUrl:i.url}});this.#s=r,this.#e.requestUpdate()}clearImages(){this.#s=[],this.clearError(),this.#e.requestUpdate()}onImageDelete=e=>{this.#t.onImageDelete&&this.#t.onImageDelete(e),this.#s=this.#s.filter(r=>r.id!==e),this.#k(),this.#e.requestUpdate()}};var Ur={maxHeight:120,initialHeight:32,paddingY:12},ee=class t extends k(v){static properties={disabled:{type:Boolean},streaming:{type:Boolean},loading:{type:Boolean},placeholder:{type:String},color:{type:String},enableImageUpload:{type:Boolean},darkMode:{type:Boolean,attribute:"dark-mode"},images:{type:Array}};#e=new Date;constructor(){super(),this.disabled=!1,this.streaming=!1,this.loading=!1,this.placeholder="Type a message...",this.enableImageUpload=!1,this.darkMode=!1,this.images=[],this.color="#8B5CF6"}get value(){return this.#t?.value?.trim()??""}render(){let e=this.streaming||this.loading||!this.value&&(!this.enableImageUpload||this.images.length===0);return u`
|
|
1598
1598
|
<div
|
|
1599
1599
|
class="${this.darkMode?"dark bg-[#1E1F23]":"bg-white"} ${this.enableImageUpload&&this.images.length>0?`ring-2 ring-[${this.color}] ring-opacity-50`:""} focus-within:ring-opacity-50 w-full overflow-hidden rounded-[18px] shadow-[0px_3px_20px_0px_rgba(0,0,0,0.2)] transition-all duration-200 focus-within:ring-2 focus-within:ring-[${this.color}]">
|
|
1600
1600
|
<!-- Image preview area -->
|
|
@@ -1650,7 +1650,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
1650
1650
|
?disabled="${this.disabled}"
|
|
1651
1651
|
maxlength="1000"
|
|
1652
1652
|
placeholder="${this.placeholder}"
|
|
1653
|
-
class="${this.enableImageUpload?"px-1":"pl-3 pr-1"} box-content h-[${
|
|
1653
|
+
class="${this.enableImageUpload?"px-1":"pl-3 pr-1"} box-content h-[${Ur.initialHeight}px] w-full resize-none place-content-center rounded bg-transparent py-[${Ur.paddingY}px] text-base text-gray-800 outline-none placeholder:text-[14px] placeholder:font-light disabled:content-baseline disabled:leading-[${Ur.initialHeight}px] dark:text-gray-200"></textarea>
|
|
1654
1654
|
|
|
1655
1655
|
<button
|
|
1656
1656
|
type="submit"
|
|
@@ -1668,7 +1668,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
1668
1668
|
<div class="h-5 w-full"></div>
|
|
1669
1669
|
</slot>
|
|
1670
1670
|
</div>
|
|
1671
|
-
`}get#t(){return this.renderRoot.querySelector('textarea[name="input"]')??null}get#r(){return this.renderRoot.querySelector('button[type="submit"]')??null}#i(e){
|
|
1671
|
+
`}get#t(){return this.renderRoot.querySelector('textarea[name="input"]')??null}get#r(){return this.renderRoot.querySelector('button[type="submit"]')??null}#i(e){Kc(e)&&(e.preventDefault(),!this.streaming&&!this.disabled&&!this.loading&&this.#r?.click())}#n(e){e.preventDefault();let r=new Date;if(r.getTime()-this.#e.getTime()<500)return;if(this.#e=r,this.streaming){this.dispatchEvent(new t.CancelEvent);return}let n=this.#t;if(!n)throw new Error("Expected input element to be present");let s=n.value.trim();(s||this.enableImageUpload&&this.images.length>0)&&this.dispatchEvent(new t.SubmitEvent(s))&&(n.value=""),this.#o(),window.requestAnimationFrame(()=>{this.focus()})}#s(e){this.dispatchEvent(new t.ChangeEvent({delta:e.data,full:e.target instanceof HTMLTextAreaElement?e.target.value:""})),this.#o()}#o(){let e=this.#t;if(!e)return;let{maxHeight:r,initialHeight:i,paddingY:n}=Ur;e.style.height=`${i}px`;let s=e.scrollHeight,o=n*2,a=Math.min(s-o,r);e.style.height=`${a}px`,this.requestUpdate()}#a(){this.dispatchEvent(new t.ImageUploadClickEvent)}#d(e){this.dispatchEvent(new t.ImageDeleteEvent(e))}setValue(e){let r=this.#t;if(!r){console.warn("input element not found, cannot set value");return}r.value=e,this.#o(),this.dispatchEvent(new t.ChangeEvent({delta:null,full:e}))}focus(){this.#t?.focus()}};ee.ChangeEvent=class extends CustomEvent{static type="mw:change";constructor(e,r={}){super(ee.ChangeEvent.type,{detail:e,...r})}};ee.SubmitEvent=class extends CustomEvent{static type="mw:submit";constructor(e,r={}){super(ee.SubmitEvent.type,{detail:e,...r,cancelable:!0})}};ee.CancelEvent=class extends CustomEvent{static type="mw:cancel";constructor(e={}){super(ee.CancelEvent.type,{...e})}};ee.ImageUploadClickEvent=class extends CustomEvent{static type="mw:image-upload-click";constructor(e={}){super(ee.ImageUploadClickEvent.type,{...e})}};ee.ImageDeleteEvent=class extends CustomEvent{static type="mw:image-delete";constructor(e,r={}){super(ee.ImageDeleteEvent.type,{detail:e,...r})}};function Kc(t){return(t.code==="Enter"||t.code==="NumpadEnter")&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey}customElements.get("mw-chat-input")||customElements.define("mw-chat-input",ee);var yn=class extends k(v){static properties={side:{type:String},status:{type:String},color:{type:String},logoUrl:{type:String,attribute:"logo"},position:{type:String},darkMode:{type:Boolean,attribute:"dark-mode"}};constructor(){super(),this.side="assistant",this.status="",this.color="",this.logoUrl="",this.position="single",this.darkMode=!1}render(){return this.#e()}#e(){let r=this.side==="user"&&this.position==="single"?"rounded-2xl":this.side==="user"&&["single-current","first"].includes(this.position)?"rounded-2xl rounded-br-[4px]":this.side==="user"&&["middle","last-current"].includes(this.position)?"rounded-2xl rounded-r-[4px]":this.side==="user"&&this.position==="last"?"rounded-2xl rounded-tr-[4px]":["support","assistant"].includes(this.side)&&["single","single-current"].includes(this.position)?"rounded-2xl":["support","assistant"].includes(this.side)&&this.position==="first"?"rounded-2xl rounded-bl-[4px]":["support","assistant"].includes(this.side)&&this.position==="middle"?"rounded-2xl rounded-l-[4px]":["support","assistant"].includes(this.side)&&["last","last-current"].includes(this.position)?"rounded-2xl rounded-tl-[4px]":"rounded-2xl";switch(this.side){case"user":return u`
|
|
1672
1672
|
<div class="${this.darkMode?"dark":""} ml-20 flex justify-end font-sans text-base">
|
|
1673
1673
|
<div class="max-w-full">
|
|
1674
1674
|
<!-- include an invisible border (same color as background) so that this message is the same height as the bot message -->
|
|
@@ -1704,9 +1704,9 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
1704
1704
|
</div>
|
|
1705
1705
|
</div>
|
|
1706
1706
|
</div>
|
|
1707
|
-
`;default:throw new Error(`Unknown side: ${this.side}`)}}};customElements.get("mw-chat-message")||customElements.define("mw-chat-message",yn);var ge=class extends k(v){static properties={src:{type:String},alt:{type:String},side:{type:String},position:{type:String},width:{type:String},height:{type:String},clickable:{type:Boolean}};constructor(){super(),this.src="",this.alt="",this.side="right",this.position="single",this.width="300px",this.height="auto",this.clickable=!1}#e=!1;#t=!1;#r=!1;#i=!1;updated(e){e.has("src")&&(this.#e=!1,this.#t=!1)}
|
|
1708
|
-
<div class="${this.#
|
|
1709
|
-
<div class="${this.#
|
|
1707
|
+
`;default:throw new Error(`Unknown side: ${this.side}`)}}};customElements.get("mw-chat-message")||customElements.define("mw-chat-message",yn);var ge=class extends k(v){static properties={src:{type:String},alt:{type:String},side:{type:String},position:{type:String},width:{type:String},height:{type:String},clickable:{type:Boolean}};constructor(){super(),this.src="",this.alt="",this.side="right",this.position="single",this.width="300px",this.height="auto",this.clickable=!1}#e=!1;#t=!1;#r=!1;#i=!1;updated(e){e.has("src")&&(this.#e=!1,this.#t=!1)}#n(){document.addEventListener("keydown",this.#o)}#s(){document.removeEventListener("keydown",this.#o)}#o=e=>{e.key==="Escape"&&this.#f(e)};get#a(){return this.side==="left"||this.side==="assistant"?"flex justify-start ml-[25px]":"flex justify-end"}get#d(){let e="inline-block overflow-hidden shadow-sm";if(this.side==="right"||this.side==="user")switch(this.position){case"first":e+=" rounded-2xl rounded-br-[4px]";break;case"middle":e+=" rounded-2xl rounded-r-[4px]";break;case"last":case"last-current":e+=" rounded-2xl rounded-tr-[4px]";break;default:e+=" rounded-2xl";break}else switch(this.position){case"first":e+=" rounded-2xl rounded-bl-[4px]";break;case"middle":e+=" rounded-2xl rounded-l-[4px]";break;case"last":case"last-current":e+=" rounded-2xl rounded-tl-[4px]";break;default:e+=" rounded-2xl";break}return e}#c(){if(!this.src)return"";try{let e=new URL(this.src);return e.searchParams.set("for","full"),e.href}catch{return this.src}}render(){return this.src?u`
|
|
1708
|
+
<div class="${this.#a} mb-2 min-h-[100px]">
|
|
1709
|
+
<div class="${this.#d} relative">
|
|
1710
1710
|
<!-- Placeholder background that's only shown when loading or error -->
|
|
1711
1711
|
${this.#e?null:u`
|
|
1712
1712
|
<div class="flex items-center justify-center bg-gray-100" style="width: ${this.width}; height: 200px;">
|
|
@@ -1731,9 +1731,9 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
1731
1731
|
alt="${this.alt}"
|
|
1732
1732
|
style="width: ${this.width}; height: ${this.height}; display: block;"
|
|
1733
1733
|
class="${this.#e?"opacity-100":"opacity-0 hidden"} ${this.clickable?"cursor-pointer hover:scale-[105%]":""} h-full w-full max-w-full transition-all duration-200"
|
|
1734
|
-
@error="${this.#
|
|
1735
|
-
@load="${this.#
|
|
1736
|
-
@click="${this.clickable?this.#
|
|
1734
|
+
@error="${this.#l}"
|
|
1735
|
+
@load="${this.#h}"
|
|
1736
|
+
@click="${this.clickable?this.#p:void 0}"
|
|
1737
1737
|
loading="lazy" />
|
|
1738
1738
|
</div>
|
|
1739
1739
|
</div>
|
|
@@ -1742,12 +1742,12 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
1742
1742
|
${this.#r?u`
|
|
1743
1743
|
<div
|
|
1744
1744
|
class="${this.#i?"bg-opacity-0":"bg-opacity-75"} fixed inset-0 z-50 flex items-center justify-center bg-black p-4 transition-opacity duration-300"
|
|
1745
|
-
@click="${this.#
|
|
1745
|
+
@click="${this.#f}">
|
|
1746
1746
|
<!-- Close button -->
|
|
1747
1747
|
<button
|
|
1748
1748
|
type="button"
|
|
1749
1749
|
class="bg-opacity-50 ${this.#i?"opacity-0":"opacity-75"} hover:bg-opacity-75 absolute top-8 right-8 z-10 rounded-full bg-black p-2 text-white transition-[colors,opacity] delay-300 focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-transparent focus:outline-none"
|
|
1750
|
-
@click="${this.#
|
|
1750
|
+
@click="${this.#f}"
|
|
1751
1751
|
aria-label="Close full image">
|
|
1752
1752
|
<!-- X mark icon -->
|
|
1753
1753
|
<svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
@@ -1756,14 +1756,14 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
1756
1756
|
</button>
|
|
1757
1757
|
<div class="relative flex max-h-full max-w-full">
|
|
1758
1758
|
<img
|
|
1759
|
-
src="${this.#
|
|
1759
|
+
src="${this.#c()}"
|
|
1760
1760
|
alt="${this.alt}"
|
|
1761
1761
|
class="${this.#i?"scale-75 opacity-0":"scale-100 opacity-100"} max-h-full max-w-full transform rounded-lg shadow-2xl transition-all duration-100 ease-out"
|
|
1762
|
-
@click="${this.#
|
|
1762
|
+
@click="${this.#w}" />
|
|
1763
1763
|
</div>
|
|
1764
1764
|
</div>
|
|
1765
1765
|
`:null}
|
|
1766
|
-
`:(console.warn("MwChatImage: No src provided"),null)}#
|
|
1766
|
+
`:(console.warn("MwChatImage: No src provided"),null)}#l=e=>{console.error("Failed to load chat image:",this.src),this.#t=!0,this.requestUpdate(),this.dispatchEvent(new CustomEvent("mw-chat-image:error",{detail:{src:this.src,event:e},bubbles:!0}))};#h=e=>{this.#e=!0,this.requestUpdate(),this.dispatchEvent(new CustomEvent("mw-chat-image:load",{detail:{src:this.src,event:e},bubbles:!0}))};#p=e=>{this.clickable&&(e.preventDefault(),e.stopPropagation(),this.#r=!0,this.#n(),this.requestUpdate(),this.#i=!0,this.requestUpdate(),setTimeout(()=>{this.#i=!1,this.requestUpdate()},500),this.dispatchEvent(new CustomEvent("mw-chat-image:click",{detail:{src:this.src,event:e},bubbles:!0})))};#f=e=>{e.preventDefault(),e.stopPropagation(),this.#s(),this.#r=!1,this.requestUpdate()};#w=e=>{e.preventDefault(),e.stopPropagation()}};ge.ErrorEvent=class extends CustomEvent{static type="mw-chat-image:error";constructor(e,r={}){super(ge.ErrorEvent.type,{detail:e,...r})}};ge.LoadEvent=class extends CustomEvent{static type="mw-chat-image:load";constructor(e,r={}){super(ge.LoadEvent.type,{detail:e,...r})}};ge.ClickEvent=class extends CustomEvent{static type="mw-chat-image:click";constructor(e,r={}){super(ge.ClickEvent.type,{detail:e,...r})}};customElements.get("mw-chat-image")||customElements.define("mw-chat-image",ge);var G=t=>t??U;var Jc=["javascript:","data:text/html","vbscript:","data:text/javascript","data:text/vbscript","data:text/css","data:text/plain","data:text/xml"],Ot=class t extends k(v){static properties={text:{type:String},color:{type:String},dismissible:{type:Boolean},ephemeral:{type:Boolean},darkMode:{type:Boolean,attribute:"dark-mode"},_dismissed:{type:Boolean,state:!0}};constructor(){super(),this.text="By chatting with us, you agree to the monitoring and recording of this chat to deliver our services and processing of your personal data in accordance with our [Privacy Policy](https://docs.molin.ai/legal/privacy-policy).",this.color="#3b82f6",this.dismissible=!1,this.ephemeral=!1,this.darkMode=!1,this._dismissed=!1}connectedCallback(){super.connectedCallback(),this.dismissible&&(this._dismissed=this.#e())}#e(){return this.ephemeral?!1:R.disclaimerDismissed}#t(){this.ephemeral||(R.disclaimerDismissed=!0)}#r=e=>{e.preventDefault(),this._dismissed=!0,this.#t(),this.dispatchEvent(new t.DismissEvent)};#i(e){let i=/\[([^\]]+)\]\(([^)]+)\)/g.exec(e);if(i){let n=i[0],s=i[1],o=i[2],a=i.index;return Jc.some(l=>o.toLowerCase().startsWith(l))||!o||!s?e:u`${e.slice(0,a)}<a href="${G(o)}" target="_blank" rel="noopener noreferrer" @click="${this.#n}" class="underline" style="color: ${this.color}"
|
|
1767
1767
|
>${s}</a
|
|
1768
1768
|
>${e.slice(a+n.length)}`}return e}#n=e=>{e.stopPropagation()};render(){if(this._dismissed)return null;let e=this.#i(this.text);return u`
|
|
1769
1769
|
<div class="${this.darkMode?"dark":""} flex items-center justify-between">
|
|
@@ -1832,11 +1832,11 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
1832
1832
|
<animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.3" />
|
|
1833
1833
|
</circle>
|
|
1834
1834
|
</svg>
|
|
1835
|
-
`};customElements.get("mw-loading")||customElements.define("mw-loading",bn);var
|
|
1835
|
+
`};customElements.get("mw-loading")||customElements.define("mw-loading",bn);var Xc="https://molin.ai/?utm_source=molin-shop-ai&utm_medium=widget&utm_campaign=poweredby",xn=class extends k(v){static properties={darkMode:{type:Boolean,attribute:"dark-mode"}};constructor(){super(),this.darkMode=!1}render(){return u`
|
|
1836
1836
|
<p class="${this.darkMode?"dark text-gray-300":"text-gray-600"} flex items-center justify-center text-xs whitespace-nowrap">
|
|
1837
1837
|
<span>Powered by</span>
|
|
1838
1838
|
|
|
1839
|
-
<a href="${
|
|
1839
|
+
<a href="${Xc}" target="_blank" class="${this.darkMode?"text-gray-200":""} inline-flex items-center underline">
|
|
1840
1840
|
<svg class="mx-1 inline-block h-4 w-4" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1841
1841
|
<circle cx="10.0361" cy="10.0361" r="10.0361" fill="#242038" />
|
|
1842
1842
|
<path
|
|
@@ -1855,7 +1855,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
1855
1855
|
<span>Molin AI</span>
|
|
1856
1856
|
</a>
|
|
1857
1857
|
</p>
|
|
1858
|
-
`}};customElements.get("mw-powered-by")||customElements.define("mw-powered-by",xn);var
|
|
1858
|
+
`}};customElements.get("mw-powered-by")||customElements.define("mw-powered-by",xn);var Yc=Math.pow(10,8)*24*60*60*1e3,d1=-Yc;var Qc=3600;var Ko=Qc*24,h1=Ko*7,eu=Ko*365.2425,tu=eu/12,p1=tu*3,kn=Symbol.for("constructDateFrom");function Jo(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&kn in t?t[kn](e):t instanceof Date?new t.constructor(e):new Date(e)}function Cn(t,e){return Jo(e||t,t)}function Xo(t){return e=>{let i=(t?Math[t]:Math.trunc)(e);return i===0?0:i}}function Yo(t,e){return+Cn(t)-+Cn(e)}function _n(t,e,r){let i=Yo(t,e)/1e3;return Xo(r?.roundingMethod)(i)}var $n=class extends k(v){static properties={question:{type:String},options:{type:Array},heading:{type:String},gameTitle:{type:String},resultPrefix:{type:String},correctButtonText:{type:String},wrongButtonText:{type:String},color:{type:String},apiBaseUrl:{type:String},cdnBaseUrl:{type:String},minutes:{type:String},seconds:{type:String},darkMode:{type:Boolean,attribute:"dark-mode"},_currentQuestion:{type:String,state:!0},_questionHistory:{type:Array,state:!0},_guessedJob:{type:String,state:!0},_isLoadingNextQuestion:{type:Boolean,state:!0},_loadingAnswer:{type:String,state:!0},_guessValidated:{type:Boolean,state:!0},_validatingButton:{type:String,state:!0},_currentAttemptQuestionCount:{type:Number,state:!0}};static styles=O`
|
|
1859
1859
|
:host {
|
|
1860
1860
|
display: block;
|
|
1861
1861
|
}
|
|
@@ -1940,11 +1940,11 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
1940
1940
|
|
|
1941
1941
|
${this.#s()}
|
|
1942
1942
|
</div>
|
|
1943
|
-
`:u`<p class="text-sm text-black italic dark:text-white">There was a problem loading the game, please refresh the page.</p>`}};customElements.get("mw-chat-wait-game")||customElements.define("mw-chat-wait-game"
|
|
1943
|
+
`:u`<p class="text-sm text-black italic dark:text-white">There was a problem loading the game, please refresh the page.</p>`}};customElements.get("mw-chat-wait-game")||customElements.define("mw-chat-wait-game",$n);var Sn=class extends k(v){static styles=O`
|
|
1944
1944
|
:host {
|
|
1945
1945
|
display: block;
|
|
1946
1946
|
}
|
|
1947
|
-
`;static properties={data:{type:Object},color:{type:String},apiBaseUrl:{type:String},cdnBaseUrl:{type:String},soundUrl:{type:String,attribute:"sound"},darkMode:{type:Boolean,attribute:"dark-mode"},_remainingSeconds:{type:Number,state:!0},_isComplete:{type:Boolean,state:!0},_showGame:{type:Boolean,state:!0}};#e=null;#t=null;#r=0;constructor(){super(),this.data,this.color="#601feb",this.apiBaseUrl="",this.cdnBaseUrl="",this.soundUrl="",this.darkMode=!1,this._remainingSeconds=480,this._isComplete=!1,this._showGame=!1}connectedCallback(){super.connectedCallback(),this.#i(),this.#s()}disconnectedCallback(){super.disconnectedCallback(),this.#o()}#i(){this.data?.expected_join_time?this.#t=new Date(this.data.expected_join_time):this.#t=new Date(Date.now()+this._remainingSeconds*1e3),this.#r=Math.max(_n(this.#t,new Date),0),this.#n()}#n(){if(this.#t===null)return;let e=new Date,r=_n(this.#t,e);r>=0?(this._remainingSeconds=r,this._isComplete=!1):(this._remainingSeconds=Math.abs(r),this._isComplete=!0)}#s(){this.#o(),this.#e=setInterval(()=>{this.#n()},1e3)}#o(){this.#e!==null&&(clearInterval(this.#e),this.#e=null)}#a=()=>{this.#l(),this._showGame=!0,this.dispatchEvent(new CustomEvent("mw-chat-wait-timer:game-click",{bubbles:!0,composed:!0}))};#d(){if(!this.data?.game_first_question)return!1;try{return localStorage.getItem("_molin_timer_sound_question")===this.data.game_first_question}catch{return!1}}#c(){if(this.data?.game_first_question)try{localStorage.setItem("_molin_timer_sound_question",this.data.game_first_question)}catch(e){console.error("Error saving sound state to localStorage:",e,{})}}#l(){if(!this.soundUrl||!this.data?.game_first_question||this.#d())return;let e=new Audio(this.soundUrl);e.volume=.5,e.play().then(()=>{this.#c()}).catch(r=>{console.error("Error playing audio:",r,{})})}#h(){let e=Math.floor(this._remainingSeconds/60),r=this._remainingSeconds%60,i=n=>String(n).padStart(2,"0");return{minutes:i(e),seconds:i(r)}}#
|
|
1947
|
+
`;static properties={data:{type:Object},color:{type:String},apiBaseUrl:{type:String},cdnBaseUrl:{type:String},soundUrl:{type:String,attribute:"sound"},darkMode:{type:Boolean,attribute:"dark-mode"},_remainingSeconds:{type:Number,state:!0},_isComplete:{type:Boolean,state:!0},_showGame:{type:Boolean,state:!0}};#e=null;#t=null;#r=0;constructor(){super(),this.data,this.color="#601feb",this.apiBaseUrl="",this.cdnBaseUrl="",this.soundUrl="",this.darkMode=!1,this._remainingSeconds=480,this._isComplete=!1,this._showGame=!1}connectedCallback(){super.connectedCallback(),this.#i(),this.#s()}disconnectedCallback(){super.disconnectedCallback(),this.#o()}#i(){this.data?.expected_join_time?this.#t=new Date(this.data.expected_join_time):this.#t=new Date(Date.now()+this._remainingSeconds*1e3),this.#r=Math.max(_n(this.#t,new Date),0),this.#n()}#n(){if(this.#t===null)return;let e=new Date,r=_n(this.#t,e);r>=0?(this._remainingSeconds=r,this._isComplete=!1):(this._remainingSeconds=Math.abs(r),this._isComplete=!0)}#s(){this.#o(),this.#e=setInterval(()=>{this.#n()},1e3)}#o(){this.#e!==null&&(clearInterval(this.#e),this.#e=null)}#a=()=>{this.#l(),this._showGame=!0,this.dispatchEvent(new CustomEvent("mw-chat-wait-timer:game-click",{bubbles:!0,composed:!0}))};#d(){if(!this.data?.game_first_question)return!1;try{return localStorage.getItem("_molin_timer_sound_question")===this.data.game_first_question}catch{return!1}}#c(){if(this.data?.game_first_question)try{localStorage.setItem("_molin_timer_sound_question",this.data.game_first_question)}catch(e){console.error("Error saving sound state to localStorage:",e,{})}}#l(){if(!this.soundUrl||!this.data?.game_first_question||this.#d())return;let e=new Audio(this.soundUrl);e.volume=.5,e.play().then(()=>{this.#c()}).catch(r=>{console.error("Error playing audio:",r,{})})}#h(){let e=Math.floor(this._remainingSeconds/60),r=this._remainingSeconds%60,i=n=>String(n).padStart(2,"0");return{minutes:i(e),seconds:i(r)}}#p(){return this._isComplete?0:this.#t===null||this.#r===0?100:Math.round(this._remainingSeconds/this.#r*100)}render(){let{minutes:e,seconds:r}=this.#h();if(this._showGame)return u`
|
|
1948
1948
|
<mw-chat-wait-game
|
|
1949
1949
|
.question="${this.data?.game_first_question}"
|
|
1950
1950
|
.options="${[this.data?.game_button_answer_negative||"No",this.data?.game_button_answer_affirmative||"Yes"]}"
|
|
@@ -1959,7 +1959,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
1959
1959
|
.minutes="${e}"
|
|
1960
1960
|
.seconds="${r}"
|
|
1961
1961
|
?dark-mode="${this.darkMode}"></mw-chat-wait-game>
|
|
1962
|
-
`;let i=this.#
|
|
1962
|
+
`;let i=this.#p();return u`
|
|
1963
1963
|
<div class="${this.darkMode?"dark bg-[#1E1F23] ring-white/10":"bg-white/70 ring-black/10"} mx-auto w-full max-w-xs rounded-2xl p-4 shadow-sm ring-1 backdrop-blur">
|
|
1964
1964
|
<!-- Time -->
|
|
1965
1965
|
<div class="font-[ui-monospace,Menlo,Monaco,Consolas] text-4xl tracking-tight text-black tabular-nums dark:text-white" aria-live="polite">
|
|
@@ -1981,7 +1981,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
1981
1981
|
</button>
|
|
1982
1982
|
</div>
|
|
1983
1983
|
</div>
|
|
1984
|
-
`}};customElements.get("mw-chat-wait-timer")||customElements.define("mw-chat-wait-timer"
|
|
1984
|
+
`}};customElements.get("mw-chat-wait-timer")||customElements.define("mw-chat-wait-timer",Sn);var at=(t,e,r)=>{for(let i of e)if(i[0]===t)return(0,i[1])();return r?.()};var En=class extends k(v){static properties={orderDetails:{type:Object},streaming:{type:Boolean},linksNewTab:{type:Boolean,attribute:"links-new-tab"},color:{type:String},darkMode:{type:Boolean,attribute:"dark-mode"}};constructor(){super(),this.orderDetails=null,this.streaming=!1,this.linksNewTab=!1,this.color="#601feb",this.darkMode=!1}render(){if(!this.orderDetails)return u`
|
|
1985
1985
|
<div class="${this.darkMode?"dark border-white/10 bg-[#1E1F23]":"border-gray-200 bg-white"} flex w-full max-w-md flex-col rounded-3xl border p-4">
|
|
1986
1986
|
<div class="mb-2">
|
|
1987
1987
|
<div class="h-7 w-full animate-pulse rounded bg-gray-200 dark:bg-gray-600"></div>
|
|
@@ -1997,7 +1997,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
1997
1997
|
<!-- Progress timeline -->
|
|
1998
1998
|
<div>
|
|
1999
1999
|
<ol role="list" class="w-full overflow-hidden">
|
|
2000
|
-
${
|
|
2000
|
+
${K(e,i=>i.label,(i,n)=>{let s=i.status==="completed",o=i.status==="in_progress",a=n===e.length-1;return u`
|
|
2001
2001
|
<li class="relative pb-4">
|
|
2002
2002
|
${a?"":u`<div class="${`absolute left-2 top-2 -ml-px mt-0.5 h-full w-0.5 ${s?`bg-[${this.color}]`:"bg-gray-300 dark:bg-gray-600"}`}" aria-hidden="true"></div>`}
|
|
2003
2003
|
|
|
@@ -2069,7 +2069,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2069
2069
|
<div class="h-4 w-24 animate-pulse rounded bg-gray-200 dark:bg-gray-600"></div>
|
|
2070
2070
|
</div>
|
|
2071
2071
|
`)}
|
|
2072
|
-
`:
|
|
2072
|
+
`:K(r,i=>i.name,i=>u`
|
|
2073
2073
|
<div class="flex items-center gap-2 py-1.5">
|
|
2074
2074
|
<img src="${G(i.image)}" class="block h-12 w-12 rounded-lg bg-gray-100 object-contain dark:bg-gray-700" loading="lazy" />
|
|
2075
2075
|
|
|
@@ -2169,7 +2169,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2169
2169
|
`:null}
|
|
2170
2170
|
</div>
|
|
2171
2171
|
</div>
|
|
2172
|
-
`}};customElements.get("mw-order-card")||customElements.define("mw-order-card",En);var Mn=class extends k(v){static properties={product:{type:Object},streaming:{type:Boolean},linksNewTab:{type:Boolean,attribute:"links-new-tab"},searchParams:{type:Object},imagesByProductUrl:{type:Object},darkMode:{type:Boolean,attribute:"dark-mode"}};constructor(){super(),this.product=void 0,this.streaming=!1,this.linksNewTab=!1,this.searchParams=void 0,this.imagesByProductUrl={},this.darkMode=!1}get trackedProductUrl(){let e=this.product?.url,r=this.searchParams;try{if(e&&r)return
|
|
2172
|
+
`}};customElements.get("mw-order-card")||customElements.define("mw-order-card",En);var Mn=class{#e;isLoading=!0;hasError=!1;isLoaded=!1;constructor(e){this.#e=e,e.addController(this)}hostConnected(){}hostDisconnected(){}handleLoad=()=>{this.isLoading=!1,this.isLoaded=!0,this.hasError=!1,this.#e.requestUpdate()};handleError=()=>{this.isLoading=!1,this.hasError=!0,this.isLoaded=!1,this.#e.requestUpdate()}};function Qo(t){return new Mn(t)}var In=class extends k(v){static properties={product:{type:Object},streaming:{type:Boolean},linksNewTab:{type:Boolean,attribute:"links-new-tab"},searchParams:{type:Object},imagesByProductUrl:{type:Object},darkMode:{type:Boolean,attribute:"dark-mode"}};#e=Qo(this);constructor(){super(),this.product=void 0,this.streaming=!1,this.linksNewTab=!1,this.searchParams=void 0,this.imagesByProductUrl={},this.darkMode=!1}get trackedProductUrl(){let e=this.product?.url,r=this.searchParams;try{if(e&&r)return Fs(e,r).href}catch{}return e}render(){let{name:e,description:r,price:i,url:n}=this.product||{},s=n?this.imagesByProductUrl?.[n]:void 0;return u`
|
|
2173
2173
|
<a
|
|
2174
2174
|
href="${G(this.trackedProductUrl)}"
|
|
2175
2175
|
title="${G(e)}"
|
|
@@ -2179,7 +2179,12 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2179
2179
|
${this.streaming?u`
|
|
2180
2180
|
<!-- shimmer -->
|
|
2181
2181
|
<div class="h-[70px] w-[70px] animate-pulse overflow-hidden rounded-lg bg-gray-200 dark:bg-gray-700"></div>
|
|
2182
|
-
`:s?u`<img
|
|
2182
|
+
`:s&&!this.#e.hasError?u`<img
|
|
2183
|
+
src="${s}"
|
|
2184
|
+
@load="${this.#e.handleLoad}"
|
|
2185
|
+
@error="${this.#e.handleError}"
|
|
2186
|
+
class="block h-[70px] w-[70px] rounded-lg bg-gray-100 object-contain dark:bg-gray-700"
|
|
2187
|
+
loading="lazy" />`:u`
|
|
2183
2188
|
<div class="flex h-[70px] w-[70px] items-center justify-center overflow-hidden rounded-lg bg-gray-100 object-cover dark:bg-gray-700">
|
|
2184
2189
|
<svg class="block" viewBox="0 0 100 133" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2185
2190
|
<rect width="100" height="133" rx="2" class="fill-gray-200 dark:fill-gray-600" transform="matrix(0.9999999999999999, 0, 0, 0.9999999999999999, 0, -7.105427357601002e-15)" />
|
|
@@ -2210,7 +2215,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2210
2215
|
${i||!this.streaming?u`<span class="text-xs text-gray-900 dark:text-white">${i}</span>`:u`<div class="h-4 w-14 animate-pulse rounded bg-gray-200 dark:bg-gray-700"></div>`}
|
|
2211
2216
|
</div>
|
|
2212
2217
|
</a>
|
|
2213
|
-
`}};customElements.get("mw-product-card-horizontal")||customElements.define("mw-product-card-horizontal",Mn);function Ur(t,e){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(t);n<i.length;n++)e.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(t,i[n])&&(r[i[n]]=t[i[n]]);return r}var Pr=function(){},lt=function(){};var Ut=(t,e,r)=>Math.min(Math.max(r,t),e);var In=.001,Yc=.01,Ko=10,Qc=.05,eu=1;function Xo({duration:t=800,bounce:e=.25,velocity:r=0,mass:i=1}){let n,s;Pr(t<=Ko*1e3,"Spring duration must be 10 seconds or less");let o=1-e;o=Ut(Qc,eu,o),t=Ut(Yc,Ko,t/1e3),o<1?(n=c=>{let d=c*o,h=d*t,f=d-r,g=Rr(c,o),p=Math.exp(-h);return In-f/g*p},s=c=>{let h=c*o*t,f=h*r+r,g=Math.pow(o,2)*Math.pow(c,2)*t,p=Math.exp(-h),$=Rr(Math.pow(c,2),o);return(-n(c)+In>0?-1:1)*((f-g)*p)/$}):(n=c=>{let d=Math.exp(-c*t),h=(c-r)*t+1;return-In+d*h},s=c=>{let d=Math.exp(-c*t),h=(r-c)*(t*t);return d*h});let a=5/t,l=ru(n,s,a);if(t=t*1e3,isNaN(l))return{stiffness:100,damping:10,duration:t};{let c=Math.pow(l,2)*i;return{stiffness:c,damping:o*2*Math.sqrt(i*c),duration:t}}}var tu=12;function ru(t,e,r){let i=r;for(let n=1;n<tu;n++)i=i-t(i)/e(i);return i}function Rr(t,e){return t*Math.sqrt(1-e*e)}var iu=["duration","bounce"],nu=["stiffness","damping","mass"];function Yo(t,e){return e.some(r=>t[r]!==void 0)}function su(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!Yo(t,nu)&&Yo(t,iu)){let r=Xo(t);e=Object.assign(Object.assign(Object.assign({},e),r),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function Br(t){var{from:e=0,to:r=1,restSpeed:i=2,restDelta:n}=t,s=Ur(t,["from","to","restSpeed","restDelta"]);let o={done:!1,value:e},{stiffness:a,damping:l,mass:c,velocity:d,duration:h,isResolvedFromDuration:f}=su(s),g=Qo,p=Qo;function $(){let b=d?-(d/1e3):0,S=r-e,y=l/(2*Math.sqrt(a*c)),x=Math.sqrt(a/c)/1e3;if(n===void 0&&(n=Math.min(Math.abs(r-e)/100,.4)),y<1){let E=Rr(x,y);g=T=>{let B=Math.exp(-y*x*T);return r-B*((b+y*x*S)/E*Math.sin(E*T)+S*Math.cos(E*T))},p=T=>{let B=Math.exp(-y*x*T);return y*x*B*(Math.sin(E*T)*(b+y*x*S)/E+S*Math.cos(E*T))-B*(Math.cos(E*T)*(b+y*x*S)-E*S*Math.sin(E*T))}}else if(y===1)g=E=>r-Math.exp(-x*E)*(S+(b+x*S)*E);else{let E=x*Math.sqrt(y*y-1);g=T=>{let B=Math.exp(-y*x*T),N=Math.min(E*T,300);return r-B*((b+y*x*S)*Math.sinh(N)+E*S*Math.cosh(N))/E}}}return $(),{next:b=>{let S=g(b);if(f)o.done=b>=h;else{let y=p(b)*1e3,x=Math.abs(y)<=i,E=Math.abs(r-S)<=n;o.done=x&&E}return o.value=o.done?r:S,o},flipTarget:()=>{d=-d,[e,r]=[r,e],$()}}}Br.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";var Qo=t=>0;var An=(t,e,r)=>{let i=e-t;return i===0?1:(r-t)/i};var ct=(t,e,r)=>-r*t+r*e+t;var Fr=(t,e)=>r=>Math.max(Math.min(r,e),t),Ce=t=>t%1?Number(t.toFixed(5)):t,ut=/(-)?([\d]*\.?[\d])+/g,qr=/(#[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,ea=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function we(t){return typeof t=="string"}var dt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Vr=Object.assign(Object.assign({},dt),{transform:Fr(0,1)}),sf=Object.assign(Object.assign({},dt),{default:1});var Pt=t=>({test:e=>we(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),lf=Pt("deg"),ht=Pt("%"),cf=Pt("px"),uf=Pt("vh"),df=Pt("vw"),hf=Object.assign(Object.assign({},ht),{parse:t=>ht.parse(t)/100,transform:t=>ht.transform(t*100)});var pt=(t,e)=>r=>!!(we(r)&&ea.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),Nr=(t,e,r)=>i=>{if(!we(i))return i;let[n,s,o,a]=i.match(ut);return{[t]:parseFloat(n),[e]:parseFloat(s),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}};var de={test:pt("hsl","hue"),parse:Nr("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:i=1})=>"hsla("+Math.round(t)+", "+ht.transform(Ce(e))+", "+ht.transform(Ce(r))+", "+Ce(Vr.transform(i))+")"};var ou=Fr(0,255),Hr=Object.assign(Object.assign({},dt),{transform:t=>Math.round(ou(t))}),ie={test:pt("rgb","red"),parse:Nr("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:i=1})=>"rgba("+Hr.transform(t)+", "+Hr.transform(e)+", "+Hr.transform(r)+", "+Ce(Vr.transform(i))+")"};function au(t){let e="",r="",i="",n="";return t.length>5?(e=t.substr(1,2),r=t.substr(3,2),i=t.substr(5,2),n=t.substr(7,2)):(e=t.substr(1,1),r=t.substr(2,1),i=t.substr(3,1),n=t.substr(4,1),e+=e,r+=r,i+=i,n+=n),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(i,16),alpha:n?parseInt(n,16)/255:1}}var ft={test:pt("#"),parse:au,transform:ie.transform};var _e={test:t=>ie.test(t)||ft.test(t)||de.test(t),parse:t=>ie.test(t)?ie.parse(t):de.test(t)?de.parse(t):ft.parse(t),transform:t=>we(t)?t:t.hasOwnProperty("red")?ie.transform(t):de.transform(t)};var ta="${c}",ra="${n}";function lu(t){var e,r,i,n;return isNaN(t)&&we(t)&&((r=(e=t.match(ut))===null||e===void 0?void 0:e.length)!==null&&r!==void 0?r:0)+((n=(i=t.match(qr))===null||i===void 0?void 0:i.length)!==null&&n!==void 0?n:0)>0}function ia(t){typeof t=="number"&&(t=`${t}`);let e=[],r=0,i=t.match(qr);i&&(r=i.length,t=t.replace(qr,ta),e.push(...i.map(_e.parse)));let n=t.match(ut);return n&&(t=t.replace(ut,ra),e.push(...n.map(dt.parse))),{values:e,numColors:r,tokenised:t}}function na(t){return ia(t).values}function sa(t){let{values:e,numColors:r,tokenised:i}=ia(t),n=e.length;return s=>{let o=i;for(let a=0;a<n;a++)o=o.replace(a<r?ta:ra,a<r?_e.transform(s[a]):Ce(s[a]));return o}}var cu=t=>typeof t=="number"?0:t;function uu(t){let e=na(t);return sa(t)(e.map(cu))}var zr={test:lu,parse:na,createTransformer:sa,getAnimatableNone:uu};function Dn(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function jn({hue:t,saturation:e,lightness:r,alpha:i}){t/=360,e/=100,r/=100;let n=0,s=0,o=0;if(!e)n=s=o=r;else{let a=r<.5?r*(1+e):r+e-r*e,l=2*r-a;n=Dn(l,a,t+1/3),s=Dn(l,a,t),o=Dn(l,a,t-1/3)}return{red:Math.round(n*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:i}}var du=(t,e,r)=>{let i=t*t,n=e*e;return Math.sqrt(Math.max(0,r*(n-i)+i))},hu=[ft,ie,de],oa=t=>hu.find(e=>e.test(t)),aa=t=>`'${t}' is not an animatable color. Use the equivalent color code instead.`,Wr=(t,e)=>{let r=oa(t),i=oa(e);lt(!!r,aa(t)),lt(!!i,aa(e));let n=r.parse(t),s=i.parse(e);r===de&&(n=jn(n),r=ie),i===de&&(s=jn(s),i=ie);let o=Object.assign({},n);return a=>{for(let l in o)l!=="alpha"&&(o[l]=du(n[l],s[l],a));return o.alpha=ct(n.alpha,s.alpha,a),r.transform(o)}};var la=t=>typeof t=="number";var pu=(t,e)=>r=>e(t(r)),Gr=(...t)=>t.reduce(pu);function ua(t,e){return la(t)?r=>ct(t,e,r):_e.test(t)?Wr(t,e):Tn(t,e)}var Ln=(t,e)=>{let r=[...t],i=r.length,n=t.map((s,o)=>ua(s,e[o]));return s=>{for(let o=0;o<i;o++)r[o]=n[o](s);return r}},da=(t,e)=>{let r=Object.assign(Object.assign({},t),e),i={};for(let n in r)t[n]!==void 0&&e[n]!==void 0&&(i[n]=ua(t[n],e[n]));return n=>{for(let s in i)r[s]=i[s](n);return r}};function ca(t){let e=zr.parse(t),r=e.length,i=0,n=0,s=0;for(let o=0;o<r;o++)i||typeof e[o]=="number"?i++:e[o].hue!==void 0?s++:n++;return{parsed:e,numNumbers:i,numRGB:n,numHSL:s}}var Tn=(t,e)=>{let r=zr.createTransformer(e),i=ca(t),n=ca(e);return i.numHSL===n.numHSL&&i.numRGB===n.numRGB&&i.numNumbers>=n.numNumbers?Gr(Ln(i.parsed,n.parsed),r):(Pr(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),o=>`${o>0?e:t}`)};var fu=(t,e)=>r=>ct(t,e,r);function mu(t){if(typeof t=="number")return fu;if(typeof t=="string")return _e.test(t)?Wr:Tn;if(Array.isArray(t))return Ln;if(typeof t=="object")return da}function gu(t,e,r){let i=[],n=r||mu(t[0]),s=t.length-1;for(let o=0;o<s;o++){let a=n(t[o],t[o+1]);if(e){let l=Array.isArray(e)?e[o]:e;a=Gr(l,a)}i.push(a)}return i}function wu([t,e],[r]){return i=>r(An(t,e,i))}function yu(t,e){let r=t.length,i=r-1;return n=>{let s=0,o=!1;if(n<=t[0]?o=!0:n>=t[i]&&(s=i-1,o=!0),!o){let l=1;for(;l<r&&!(t[l]>n||l===i);l++);s=l-1}let a=An(t[s],t[s+1],n);return e[s](a)}}function Zr(t,e,{clamp:r=!0,ease:i,mixer:n}={}){let s=t.length;lt(s===e.length,"Both input and output ranges must be the same length"),lt(!i||!Array.isArray(i)||i.length===s-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),t[0]>t[s-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());let o=gu(e,i,n),a=s===2?wu(t,o):yu(t,o);return r?l=>a(Ut(t[0],t[s-1],l)):a}var Rt=t=>e=>1-t(1-e),Jr=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ha=t=>e=>Math.pow(e,t),On=t=>e=>e*e*((t+1)*e-t),pa=t=>{let e=On(t);return r=>(r*=2)<1?.5*e(r):.5*(2-Math.pow(2,-10*(r-1)))};var fa=1.525,vu=4/11,bu=8/11,xu=9/10;var ma=ha(2),m2=Rt(ma),ga=Jr(ma),ku=t=>1-Math.sin(Math.acos(t)),Cu=Rt(ku),g2=Jr(Cu),wa=On(fa),w2=Rt(wa),y2=Jr(wa),v2=pa(fa),_u=4356/361,Su=35442/1805,$u=16061/1805,Eu=t=>{if(t===1||t===0)return t;let e=t*t;return t<vu?7.5625*e:t<bu?9.075*e-9.9*t+3.4:t<xu?_u*e-Su*t+$u:10.8*t*t-20.52*t+10.72},b2=Rt(Eu);function Mu(t,e){return t.map(()=>e||ga).splice(0,t.length-1)}function Iu(t){let e=t.length;return t.map((r,i)=>i!==0?i/(e-1):0)}function Au(t,e){return t.map(r=>r*e)}function Bt({from:t=0,to:e=1,ease:r,offset:i,duration:n=300}){let s={done:!1,value:t},o=Array.isArray(e)?e:[t,e],a=Au(i&&i.length===o.length?i:Iu(o),n);function l(){return Zr(a,o,{ease:Array.isArray(r)?r:Mu(o,r)})}let c=l();return{next:d=>(s.value=c(d),s.done=d>=n,s),flipTarget:()=>{o.reverse(),c=l()}}}function ya({velocity:t=0,from:e=0,power:r=.8,timeConstant:i=350,restDelta:n=.5,modifyTarget:s}){let o={done:!1,value:e},a=r*t,l=e+a,c=s===void 0?l:s(l);return c!==l&&(a=c-e),{next:d=>{let h=-a*Math.exp(-d/i);return o.done=!(h>n||h<-n),o.value=o.done?c:c+h,o},flipTarget:()=>{}}}var va={keyframes:Bt,spring:Br,decay:ya};function ba(t){if(Array.isArray(t.to))return Bt;if(va[t.type])return va[t.type];let e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Bt:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?Br:Bt}var Un=16.666666666666668,Du=typeof performance<"u"?()=>performance.now():()=>Date.now(),Pn=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Du()),Un);function xa(t){let e=[],r=[],i=0,n=!1,s=!1,o=new WeakSet,a={schedule:(l,c=!1,d=!1)=>{let h=d&&n,f=h?e:r;return c&&o.add(l),f.indexOf(l)===-1&&(f.push(l),h&&n&&(i=e.length)),l},cancel:l=>{let c=r.indexOf(l);c!==-1&&r.splice(c,1),o.delete(l)},process:l=>{if(n){s=!0;return}if(n=!0,[e,r]=[r,e],r.length=0,i=e.length,i)for(let c=0;c<i;c++){let d=e[c];d(l),o.has(d)&&(a.schedule(d),t())}n=!1,s&&(s=!1,a.process(l))}};return a}var ju=40,Rn=!0,qt=!1,Bn=!1,Ft={delta:0,timestamp:0},Vt=["read","update","preRender","render","postRender"],Kr=Vt.reduce((t,e)=>(t[e]=xa(()=>qt=!0),t),{}),Lu=Vt.reduce((t,e)=>{let r=Kr[e];return t[e]=(i,n=!1,s=!1)=>(qt||Ou(),r.schedule(i,n,s)),t},{}),ka=Vt.reduce((t,e)=>(t[e]=Kr[e].cancel,t),{}),T2=Vt.reduce((t,e)=>(t[e]=()=>Kr[e].process(Ft),t),{}),Tu=t=>Kr[t].process(Ft),Ca=t=>{qt=!1,Ft.delta=Rn?Un:Math.max(Math.min(t-Ft.timestamp,ju),1),Ft.timestamp=t,Bn=!0,Vt.forEach(Tu),Bn=!1,qt&&(Rn=!1,Pn(Ca))},Ou=()=>{qt=!0,Rn=!0,Bn||Pn(Ca)};var _a=Lu;function Fn(t,e,r=0){return t-e-r}function Sa(t,e,r=0,i=!0){return i?Fn(e+-t,e,r):e-(t-e)+r}function $a(t,e,r,i){return i?t>=e+r:t<=-r}var Uu=t=>{let e=({delta:r})=>t(r);return{start:()=>_a.update(e,!0),stop:()=>ka.update(e)}};function qn(t){var e,r,{from:i,autoplay:n=!0,driver:s=Uu,elapsed:o=0,repeat:a=0,repeatType:l="loop",repeatDelay:c=0,onPlay:d,onStop:h,onComplete:f,onRepeat:g,onUpdate:p}=t,$=Ur(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:b}=$,S,y=0,x=$.duration,E,T=!1,B=!0,N,I=ba($);!((r=(e=I).needsInterpolation)===null||r===void 0)&&r.call(e,i,b)&&(N=Zr([0,100],[i,b],{clamp:!1}),i=0,b=100);let H=I(Object.assign(Object.assign({},$),{from:i,to:b}));function K(){y++,l==="reverse"?(B=y%2===0,o=Sa(o,x,c,B)):(o=Fn(o,x,c),l==="mirror"&&H.flipTarget()),T=!1,g&&g()}function oi(){S.stop(),f&&f()}function $e(P){if(B||(P=-P),o+=P,!T){let z=H.next(Math.max(0,o));E=z.value,N&&(E=N(E)),T=B?z.done:o<=0}p?.(E),T&&(y===0&&(x??(x=o)),y<a?$a(o,x,c,B)&&K():oi())}function Zt(){d?.(),S=s($e),S.start()}return n&&Zt(),{stop:()=>{h?.(),S.stop()}}}var Nt=class t extends k(v){static properties={product:{type:Object},labels:{type:Object},darkMode:{type:Boolean,attribute:"dark-mode"},_currentImageIndex:{type:Number,state:!0},_isValidUrl:{type:Boolean,state:!0}};constructor(){super(),this.product=void 0,this.labels={addToCart:"Add to cart",color:"Color",size:"Size"},this.darkMode=!1,this._currentImageIndex=0,this._isValidUrl=!1}willUpdate(e){e.has("product")&&this.#e()}#e(){if(!this.product?.url){this._isValidUrl=!1;return}try{let e=new URL(this.product.url);this._isValidUrl=e.protocol==="http:"||e.protocol==="https:"}catch{this._isValidUrl=!1}}get images(){return this.product?.images||[]}render(){if(!this.product)return u`
|
|
2218
|
+
`}};customElements.get("mw-product-card-horizontal")||customElements.define("mw-product-card-horizontal",In);function Pr(t,e){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(t);n<i.length;n++)e.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(t,i[n])&&(r[i[n]]=t[i[n]]);return r}var Rr=function(){},lt=function(){};var Ut=(t,e,r)=>Math.min(Math.max(r,t),e);var An=.001,ru=.01,ea=10,iu=.05,nu=1;function ta({duration:t=800,bounce:e=.25,velocity:r=0,mass:i=1}){let n,s;Rr(t<=ea*1e3,"Spring duration must be 10 seconds or less");let o=1-e;o=Ut(iu,nu,o),t=Ut(ru,ea,t/1e3),o<1?(n=c=>{let d=c*o,h=d*t,f=d-r,g=Br(c,o),p=Math.exp(-h);return An-f/g*p},s=c=>{let h=c*o*t,f=h*r+r,g=Math.pow(o,2)*Math.pow(c,2)*t,p=Math.exp(-h),S=Br(Math.pow(c,2),o);return(-n(c)+An>0?-1:1)*((f-g)*p)/S}):(n=c=>{let d=Math.exp(-c*t),h=(c-r)*t+1;return-An+d*h},s=c=>{let d=Math.exp(-c*t),h=(r-c)*(t*t);return d*h});let a=5/t,l=ou(n,s,a);if(t=t*1e3,isNaN(l))return{stiffness:100,damping:10,duration:t};{let c=Math.pow(l,2)*i;return{stiffness:c,damping:o*2*Math.sqrt(i*c),duration:t}}}var su=12;function ou(t,e,r){let i=r;for(let n=1;n<su;n++)i=i-t(i)/e(i);return i}function Br(t,e){return t*Math.sqrt(1-e*e)}var au=["duration","bounce"],lu=["stiffness","damping","mass"];function ra(t,e){return e.some(r=>t[r]!==void 0)}function cu(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!ra(t,lu)&&ra(t,au)){let r=ta(t);e=Object.assign(Object.assign(Object.assign({},e),r),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function Fr(t){var{from:e=0,to:r=1,restSpeed:i=2,restDelta:n}=t,s=Pr(t,["from","to","restSpeed","restDelta"]);let o={done:!1,value:e},{stiffness:a,damping:l,mass:c,velocity:d,duration:h,isResolvedFromDuration:f}=cu(s),g=ia,p=ia;function S(){let b=d?-(d/1e3):0,$=r-e,y=l/(2*Math.sqrt(a*c)),x=Math.sqrt(a/c)/1e3;if(n===void 0&&(n=Math.min(Math.abs(r-e)/100,.4)),y<1){let E=Br(x,y);g=T=>{let B=Math.exp(-y*x*T);return r-B*((b+y*x*$)/E*Math.sin(E*T)+$*Math.cos(E*T))},p=T=>{let B=Math.exp(-y*x*T);return y*x*B*(Math.sin(E*T)*(b+y*x*$)/E+$*Math.cos(E*T))-B*(Math.cos(E*T)*(b+y*x*$)-E*$*Math.sin(E*T))}}else if(y===1)g=E=>r-Math.exp(-x*E)*($+(b+x*$)*E);else{let E=x*Math.sqrt(y*y-1);g=T=>{let B=Math.exp(-y*x*T),N=Math.min(E*T,300);return r-B*((b+y*x*$)*Math.sinh(N)+E*$*Math.cosh(N))/E}}}return S(),{next:b=>{let $=g(b);if(f)o.done=b>=h;else{let y=p(b)*1e3,x=Math.abs(y)<=i,E=Math.abs(r-$)<=n;o.done=x&&E}return o.value=o.done?r:$,o},flipTarget:()=>{d=-d,[e,r]=[r,e],S()}}}Fr.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";var ia=t=>0;var Dn=(t,e,r)=>{let i=e-t;return i===0?1:(r-t)/i};var ct=(t,e,r)=>-r*t+r*e+t;var qr=(t,e)=>r=>Math.max(Math.min(r,e),t),Ce=t=>t%1?Number(t.toFixed(5)):t,ut=/(-)?([\d]*\.?[\d])+/g,Vr=/(#[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,na=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function we(t){return typeof t=="string"}var dt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Nr=Object.assign(Object.assign({},dt),{transform:qr(0,1)}),hf=Object.assign(Object.assign({},dt),{default:1});var Pt=t=>({test:e=>we(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),mf=Pt("deg"),ht=Pt("%"),gf=Pt("px"),wf=Pt("vh"),yf=Pt("vw"),vf=Object.assign(Object.assign({},ht),{parse:t=>ht.parse(t)/100,transform:t=>ht.transform(t*100)});var pt=(t,e)=>r=>!!(we(r)&&na.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),Hr=(t,e,r)=>i=>{if(!we(i))return i;let[n,s,o,a]=i.match(ut);return{[t]:parseFloat(n),[e]:parseFloat(s),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}};var de={test:pt("hsl","hue"),parse:Hr("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:i=1})=>"hsla("+Math.round(t)+", "+ht.transform(Ce(e))+", "+ht.transform(Ce(r))+", "+Ce(Nr.transform(i))+")"};var uu=qr(0,255),zr=Object.assign(Object.assign({},dt),{transform:t=>Math.round(uu(t))}),ie={test:pt("rgb","red"),parse:Hr("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:i=1})=>"rgba("+zr.transform(t)+", "+zr.transform(e)+", "+zr.transform(r)+", "+Ce(Nr.transform(i))+")"};function du(t){let e="",r="",i="",n="";return t.length>5?(e=t.substr(1,2),r=t.substr(3,2),i=t.substr(5,2),n=t.substr(7,2)):(e=t.substr(1,1),r=t.substr(2,1),i=t.substr(3,1),n=t.substr(4,1),e+=e,r+=r,i+=i,n+=n),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(i,16),alpha:n?parseInt(n,16)/255:1}}var ft={test:pt("#"),parse:du,transform:ie.transform};var _e={test:t=>ie.test(t)||ft.test(t)||de.test(t),parse:t=>ie.test(t)?ie.parse(t):de.test(t)?de.parse(t):ft.parse(t),transform:t=>we(t)?t:t.hasOwnProperty("red")?ie.transform(t):de.transform(t)};var sa="${c}",oa="${n}";function hu(t){var e,r,i,n;return isNaN(t)&&we(t)&&((r=(e=t.match(ut))===null||e===void 0?void 0:e.length)!==null&&r!==void 0?r:0)+((n=(i=t.match(Vr))===null||i===void 0?void 0:i.length)!==null&&n!==void 0?n:0)>0}function aa(t){typeof t=="number"&&(t=`${t}`);let e=[],r=0,i=t.match(Vr);i&&(r=i.length,t=t.replace(Vr,sa),e.push(...i.map(_e.parse)));let n=t.match(ut);return n&&(t=t.replace(ut,oa),e.push(...n.map(dt.parse))),{values:e,numColors:r,tokenised:t}}function la(t){return aa(t).values}function ca(t){let{values:e,numColors:r,tokenised:i}=aa(t),n=e.length;return s=>{let o=i;for(let a=0;a<n;a++)o=o.replace(a<r?sa:oa,a<r?_e.transform(s[a]):Ce(s[a]));return o}}var pu=t=>typeof t=="number"?0:t;function fu(t){let e=la(t);return ca(t)(e.map(pu))}var Wr={test:hu,parse:la,createTransformer:ca,getAnimatableNone:fu};function Ln(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function jn({hue:t,saturation:e,lightness:r,alpha:i}){t/=360,e/=100,r/=100;let n=0,s=0,o=0;if(!e)n=s=o=r;else{let a=r<.5?r*(1+e):r+e-r*e,l=2*r-a;n=Ln(l,a,t+1/3),s=Ln(l,a,t),o=Ln(l,a,t-1/3)}return{red:Math.round(n*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:i}}var mu=(t,e,r)=>{let i=t*t,n=e*e;return Math.sqrt(Math.max(0,r*(n-i)+i))},gu=[ft,ie,de],ua=t=>gu.find(e=>e.test(t)),da=t=>`'${t}' is not an animatable color. Use the equivalent color code instead.`,Gr=(t,e)=>{let r=ua(t),i=ua(e);lt(!!r,da(t)),lt(!!i,da(e));let n=r.parse(t),s=i.parse(e);r===de&&(n=jn(n),r=ie),i===de&&(s=jn(s),i=ie);let o=Object.assign({},n);return a=>{for(let l in o)l!=="alpha"&&(o[l]=mu(n[l],s[l],a));return o.alpha=ct(n.alpha,s.alpha,a),r.transform(o)}};var ha=t=>typeof t=="number";var wu=(t,e)=>r=>e(t(r)),Zr=(...t)=>t.reduce(wu);function fa(t,e){return ha(t)?r=>ct(t,e,r):_e.test(t)?Gr(t,e):On(t,e)}var Tn=(t,e)=>{let r=[...t],i=r.length,n=t.map((s,o)=>fa(s,e[o]));return s=>{for(let o=0;o<i;o++)r[o]=n[o](s);return r}},ma=(t,e)=>{let r=Object.assign(Object.assign({},t),e),i={};for(let n in r)t[n]!==void 0&&e[n]!==void 0&&(i[n]=fa(t[n],e[n]));return n=>{for(let s in i)r[s]=i[s](n);return r}};function pa(t){let e=Wr.parse(t),r=e.length,i=0,n=0,s=0;for(let o=0;o<r;o++)i||typeof e[o]=="number"?i++:e[o].hue!==void 0?s++:n++;return{parsed:e,numNumbers:i,numRGB:n,numHSL:s}}var On=(t,e)=>{let r=Wr.createTransformer(e),i=pa(t),n=pa(e);return i.numHSL===n.numHSL&&i.numRGB===n.numRGB&&i.numNumbers>=n.numNumbers?Zr(Tn(i.parsed,n.parsed),r):(Rr(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),o=>`${o>0?e:t}`)};var yu=(t,e)=>r=>ct(t,e,r);function vu(t){if(typeof t=="number")return yu;if(typeof t=="string")return _e.test(t)?Gr:On;if(Array.isArray(t))return Tn;if(typeof t=="object")return ma}function bu(t,e,r){let i=[],n=r||vu(t[0]),s=t.length-1;for(let o=0;o<s;o++){let a=n(t[o],t[o+1]);if(e){let l=Array.isArray(e)?e[o]:e;a=Zr(l,a)}i.push(a)}return i}function xu([t,e],[r]){return i=>r(Dn(t,e,i))}function ku(t,e){let r=t.length,i=r-1;return n=>{let s=0,o=!1;if(n<=t[0]?o=!0:n>=t[i]&&(s=i-1,o=!0),!o){let l=1;for(;l<r&&!(t[l]>n||l===i);l++);s=l-1}let a=Dn(t[s],t[s+1],n);return e[s](a)}}function Kr(t,e,{clamp:r=!0,ease:i,mixer:n}={}){let s=t.length;lt(s===e.length,"Both input and output ranges must be the same length"),lt(!i||!Array.isArray(i)||i.length===s-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),t[0]>t[s-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());let o=bu(e,i,n),a=s===2?xu(t,o):ku(t,o);return r?l=>a(Ut(t[0],t[s-1],l)):a}var Rt=t=>e=>1-t(1-e),Jr=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ga=t=>e=>Math.pow(e,t),Un=t=>e=>e*e*((t+1)*e-t),wa=t=>{let e=Un(t);return r=>(r*=2)<1?.5*e(r):.5*(2-Math.pow(2,-10*(r-1)))};var ya=1.525,Cu=4/11,_u=8/11,$u=9/10;var va=ga(2),k2=Rt(va),ba=Jr(va),Su=t=>1-Math.sin(Math.acos(t)),Eu=Rt(Su),C2=Jr(Eu),xa=Un(ya),_2=Rt(xa),$2=Jr(xa),S2=wa(ya),Mu=4356/361,Iu=35442/1805,Au=16061/1805,Du=t=>{if(t===1||t===0)return t;let e=t*t;return t<Cu?7.5625*e:t<_u?9.075*e-9.9*t+3.4:t<$u?Mu*e-Iu*t+Au:10.8*t*t-20.52*t+10.72},E2=Rt(Du);function Lu(t,e){return t.map(()=>e||ba).splice(0,t.length-1)}function ju(t){let e=t.length;return t.map((r,i)=>i!==0?i/(e-1):0)}function Tu(t,e){return t.map(r=>r*e)}function Bt({from:t=0,to:e=1,ease:r,offset:i,duration:n=300}){let s={done:!1,value:t},o=Array.isArray(e)?e:[t,e],a=Tu(i&&i.length===o.length?i:ju(o),n);function l(){return Kr(a,o,{ease:Array.isArray(r)?r:Lu(o,r)})}let c=l();return{next:d=>(s.value=c(d),s.done=d>=n,s),flipTarget:()=>{o.reverse(),c=l()}}}function ka({velocity:t=0,from:e=0,power:r=.8,timeConstant:i=350,restDelta:n=.5,modifyTarget:s}){let o={done:!1,value:e},a=r*t,l=e+a,c=s===void 0?l:s(l);return c!==l&&(a=c-e),{next:d=>{let h=-a*Math.exp(-d/i);return o.done=!(h>n||h<-n),o.value=o.done?c:c+h,o},flipTarget:()=>{}}}var Ca={keyframes:Bt,spring:Fr,decay:ka};function _a(t){if(Array.isArray(t.to))return Bt;if(Ca[t.type])return Ca[t.type];let e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Bt:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?Fr:Bt}var Pn=16.666666666666668,Ou=typeof performance<"u"?()=>performance.now():()=>Date.now(),Rn=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Ou()),Pn);function $a(t){let e=[],r=[],i=0,n=!1,s=!1,o=new WeakSet,a={schedule:(l,c=!1,d=!1)=>{let h=d&&n,f=h?e:r;return c&&o.add(l),f.indexOf(l)===-1&&(f.push(l),h&&n&&(i=e.length)),l},cancel:l=>{let c=r.indexOf(l);c!==-1&&r.splice(c,1),o.delete(l)},process:l=>{if(n){s=!0;return}if(n=!0,[e,r]=[r,e],r.length=0,i=e.length,i)for(let c=0;c<i;c++){let d=e[c];d(l),o.has(d)&&(a.schedule(d),t())}n=!1,s&&(s=!1,a.process(l))}};return a}var Uu=40,Bn=!0,qt=!1,Fn=!1,Ft={delta:0,timestamp:0},Vt=["read","update","preRender","render","postRender"],Xr=Vt.reduce((t,e)=>(t[e]=$a(()=>qt=!0),t),{}),Pu=Vt.reduce((t,e)=>{let r=Xr[e];return t[e]=(i,n=!1,s=!1)=>(qt||Bu(),r.schedule(i,n,s)),t},{}),Sa=Vt.reduce((t,e)=>(t[e]=Xr[e].cancel,t),{}),q2=Vt.reduce((t,e)=>(t[e]=()=>Xr[e].process(Ft),t),{}),Ru=t=>Xr[t].process(Ft),Ea=t=>{qt=!1,Ft.delta=Bn?Pn:Math.max(Math.min(t-Ft.timestamp,Uu),1),Ft.timestamp=t,Fn=!0,Vt.forEach(Ru),Fn=!1,qt&&(Bn=!1,Rn(Ea))},Bu=()=>{qt=!0,Bn=!0,Fn||Rn(Ea)};var Ma=Pu;function qn(t,e,r=0){return t-e-r}function Ia(t,e,r=0,i=!0){return i?qn(e+-t,e,r):e-(t-e)+r}function Aa(t,e,r,i){return i?t>=e+r:t<=-r}var Fu=t=>{let e=({delta:r})=>t(r);return{start:()=>Ma.update(e,!0),stop:()=>Sa.update(e)}};function Vn(t){var e,r,{from:i,autoplay:n=!0,driver:s=Fu,elapsed:o=0,repeat:a=0,repeatType:l="loop",repeatDelay:c=0,onPlay:d,onStop:h,onComplete:f,onRepeat:g,onUpdate:p}=t,S=Pr(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:b}=S,$,y=0,x=S.duration,E,T=!1,B=!0,N,I=_a(S);!((r=(e=I).needsInterpolation)===null||r===void 0)&&r.call(e,i,b)&&(N=Kr([0,100],[i,b],{clamp:!1}),i=0,b=100);let H=I(Object.assign(Object.assign({},S),{from:i,to:b}));function J(){y++,l==="reverse"?(B=y%2===0,o=Ia(o,x,c,B)):(o=qn(o,x,c),l==="mirror"&&H.flipTarget()),T=!1,g&&g()}function ai(){$.stop(),f&&f()}function Se(P){if(B||(P=-P),o+=P,!T){let z=H.next(Math.max(0,o));E=z.value,N&&(E=N(E)),T=B?z.done:o<=0}p?.(E),T&&(y===0&&(x??(x=o)),y<a?Aa(o,x,c,B)&&J():ai())}function Zt(){d?.(),$=s(Se),$.start()}return n&&Zt(),{stop:()=>{h?.(),$.stop()}}}var Nt=class t extends k(v){static properties={product:{type:Object},labels:{type:Object},darkMode:{type:Boolean,attribute:"dark-mode"},_currentImageIndex:{type:Number,state:!0},_isValidUrl:{type:Boolean,state:!0}};constructor(){super(),this.product=void 0,this.labels={addToCart:"Add to cart",color:"Color",size:"Size"},this.darkMode=!1,this._currentImageIndex=0,this._isValidUrl=!1}willUpdate(e){e.has("product")&&this.#e()}#e(){if(!this.product?.url){this._isValidUrl=!1;return}try{let e=new URL(this.product.url);this._isValidUrl=e.protocol==="http:"||e.protocol==="https:"}catch{this._isValidUrl=!1}}get images(){return this.product?.images||[]}render(){if(!this.product)return u`
|
|
2214
2219
|
<div class="${this.darkMode?"dark border-gray-600 bg-[#1E1F23]":"border-[#5e5d59]/25 bg-white"} my-2 w-full rounded-3xl border p-4">
|
|
2215
2220
|
<div class="relative mx-auto mb-4 max-w-[240px]">
|
|
2216
2221
|
<div class="h-[180px] w-full animate-pulse rounded-2xl bg-gray-200 dark:bg-gray-700"></div>
|
|
@@ -2234,7 +2239,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2234
2239
|
<div class="pointer-events-auto mx-auto mb-4">
|
|
2235
2240
|
<div class="group relative overflow-hidden rounded-2xl">
|
|
2236
2241
|
<div class="image-slider z-0 flex transition-transform duration-300 ease-in-out" style="transform: translateX(-${this._currentImageIndex*100}%)">
|
|
2237
|
-
${this.images.length>0?
|
|
2242
|
+
${this.images.length>0?K(this.images,s=>s,(s,o)=>u`
|
|
2238
2243
|
<!-- TODO: add srcset with 1x/2x variants for high DPI displays -->
|
|
2239
2244
|
<img src="${s}" alt="image ${o+1}: ${e}" class="h-auto w-full flex-shrink-0 object-scale-down" loading="lazy" />
|
|
2240
2245
|
`):u`
|
|
@@ -2299,7 +2304,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2299
2304
|
</button> -->
|
|
2300
2305
|
</div>
|
|
2301
2306
|
</div>
|
|
2302
|
-
`}#t(e){e.preventDefault(),!(!this.product?.url||!this._isValidUrl)&&window.open(this.product.url,"_blank")}#r(e){!this.product?.url||!this._isValidUrl||(window.open(this.product.url,"_blank"),this.dispatchEvent(new t.AddToCartEvent(this.product)))}#i(e,r){this.#a&&
|
|
2307
|
+
`}#t(e){e.preventDefault(),!(!this.product?.url||!this._isValidUrl)&&window.open(this.product.url,"_blank")}#r(e){!this.product?.url||!this._isValidUrl||(window.open(this.product.url,"_blank"),this.dispatchEvent(new t.AddToCartEvent(this.product)))}#i(e,r){this.#a&&Vn({from:e,to:r,duration:300,onUpdate:i=>{this.#a&&(this.#a.style.transform=`translateX(${i}%)`)}})}#n(){if(!this.product?.images?.length)return;let e=this._currentImageIndex,r=(e+1)%this.product.images.length,i=-(e*100),n=-(r*100);this.#i(i,n),this._currentImageIndex=r}#s(){if(!this.product?.images?.length)return;let e=this._currentImageIndex,r=(e-1+this.product.images.length)%this.product.images.length,i=-(e*100),n=-(r*100);this.#i(i,n),this._currentImageIndex=r}#o(e){if(!this.product?.images?.length)return;let r=this._currentImageIndex,i=Math.max(0,Math.min(e,this.product.images.length-1)),n=-(r*100),s=-(i*100);this.#i(n,s),this._currentImageIndex=i}get#a(){return this.renderRoot.querySelector(".image-slider")}};Nt.AddToCartEvent=class extends CustomEvent{static type="mw-product-card:add-to-cart";constructor(e,r={}){super(Nt.AddToCartEvent.type,{detail:{product:e},...r})}};customElements.get("mw-product-card")||customElements.define("mw-product-card",Nt);function Yr(t){return Array.isArray(t)?t:t?[t]:[]}function Da(t,e){let r=new Map;for(let i of t){let n=e(i);r.has(n)||r.set(n,[]),(r.get(n)||[]).push(i)}return r}var Nn=class extends k(v){static properties={orderDetails:{type:Object},streaming:{type:Boolean},linksNewTab:{type:Boolean,attribute:"links-new-tab"},color:{type:String},darkMode:{type:Boolean,attribute:"dark-mode"}};constructor(){super(),this.orderDetails=null,this.streaming=!1,this.linksNewTab=!1,this.color="#601feb",this.darkMode=!1}render(){let e=Yr(this.orderDetails?.order_status?.step||[]),r=Yr(this.orderDetails?.items?.item||[]),i=Yr(this.orderDetails?.actions||[]);return u`
|
|
2303
2308
|
<div class="${this.darkMode?"dark border-white/10 bg-[#1E1F23]":"border-gray-200 bg-white"} flex w-full max-w-md flex-col rounded-3xl border p-4">
|
|
2304
2309
|
<!-- Header with order ID -->
|
|
2305
2310
|
<div class="mb-2">
|
|
@@ -2324,7 +2329,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2324
2329
|
</div>
|
|
2325
2330
|
</li>
|
|
2326
2331
|
`)}
|
|
2327
|
-
`:
|
|
2332
|
+
`:K(e,n=>n.label,(n,s)=>{let o=n.status==="completed",a=n.status==="in_progress",l=s===e.length-1;return u`
|
|
2328
2333
|
<li class="relative pb-4">
|
|
2329
2334
|
${l?"":u`<div class="${`absolute left-2 top-2 -ml-px mt-0.5 h-full w-0.5 ${o?`bg-[${this.color}]`:"bg-gray-300 dark:bg-gray-600"}`}" aria-hidden="true"></div>`}
|
|
2330
2335
|
|
|
@@ -2484,7 +2489,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2484
2489
|
${this.streaming&&!i[0]?.track_order?.label&&!Xe(i[0]?.track_order?.tracking_url||"")?u`
|
|
2485
2490
|
<!-- Loading shimmer for buttons -->
|
|
2486
2491
|
<div class="h-10 w-full min-w-[250px] animate-pulse overflow-hidden rounded-xl bg-gray-200 dark:bg-gray-600"></div>
|
|
2487
|
-
`:
|
|
2492
|
+
`:K(i,(n,s)=>`action-${s}`,n=>{if(n?.track_order?.label)return u`
|
|
2488
2493
|
${Xe(n.track_order?.tracking_url||"")?u` <a
|
|
2489
2494
|
target="${this.linksNewTab?"_blank":"_self"}"
|
|
2490
2495
|
href="${n.track_order?.tracking_url}"
|
|
@@ -2494,7 +2499,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2494
2499
|
`})}
|
|
2495
2500
|
</div>
|
|
2496
2501
|
</div>
|
|
2497
|
-
`}};customElements.get("mw-product-order-status-card")||customElements.define("mw-product-order-status-card",
|
|
2502
|
+
`}};customElements.get("mw-product-order-status-card")||customElements.define("mw-product-order-status-card",Nn);var qu={".section-spacing":{"@apply":"relative flex justify-center px-[25px] py-16 sm:px-9 sm:py-[45px] lg:px-24 lg:py-[104px]"}},Hn=Dt({preflight:{...qu},hash:!1,darkMode:"class",theme:{extend:{fontFamily:{display:["Work Sans","sans-serif"],sans:["Inter","sans-serif"]},colors:{violet:{DEFAULT:"#601feb",50:"#f3f2ff",100:"#eae7ff",200:"#d7d2ff",300:"#baaeff",400:"#9980ff",500:"#784dff",600:"#6829fe",700:"#601feb",800:"#4b12c5",900:"#3f11a1",950:"#25086d"},pink:{DEFAULT:"#ff0bbb",50:"#fff0fc",100:"#ffe3fc",200:"#ffc6f9",300:"#ff98f2",400:"#ff58e5",500:"#ff27d5",600:"#ff0bbb",700:"#df0095",800:"#b8007b",900:"#980368",950:"#5f003b"},lime:{DEFAULT:"#b9e901",50:"#fdffe4",100:"#f9ffc5",200:"#f1ff92",300:"#e2ff54",400:"#d1fa21",500:"#b9e901",600:"#8ab400",700:"#688902",800:"#526b09",900:"#465a0d",950:"#243300"}}}},presets:[Sr(),Cr(),_r(),Er()],ignorelist:/^(sb-|css-|sbdocs|docblock|innerZoomElementWrapper|docs-|rejt-)/});var zn=t=>Mr(Hn)(t);var Wn=class extends zn(v){static styles=O`
|
|
2498
2503
|
:host {
|
|
2499
2504
|
--w-hover-arrow--hovered: 0;
|
|
2500
2505
|
}
|
|
@@ -2515,7 +2520,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2515
2520
|
<path part="tip" stroke="currentColor" fill="transparent" d="M1 1l4 4-4 4"></path>
|
|
2516
2521
|
</g>
|
|
2517
2522
|
</svg>
|
|
2518
|
-
`}};customElements.get("w-hover-arrow")||customElements.define("w-hover-arrow",
|
|
2523
|
+
`}};customElements.get("w-hover-arrow")||customElements.define("w-hover-arrow",Wn);var Ht=class t extends k(v){static properties={title:{type:String},type:{type:String},color:{type:String},darkMode:{type:Boolean,attribute:"dark-mode"},_hoverRating:{type:Number,state:!0},_selectedRating:{type:Number,state:!0},_selectedVote:{type:String,state:!0}};constructor(){super(),this.title="",this.type="star-rating",this.color="#8B5CF6",this.darkMode=!1,this._hoverRating=0,this._selectedRating=0,this._selectedVote=""}updated(e){(e.has("type")||e.has("title"))&&(this._selectedRating=0,this._selectedVote="",this._hoverRating=0)}render(){return u`
|
|
2519
2524
|
<div
|
|
2520
2525
|
class="${this.darkMode?"dark bg-[#1E1F23]":"bg-white"} focus-within:ring-opacity-50 w-full overflow-hidden rounded-[18px] shadow-[0px_3px_20px_0px_rgba(0,0,0,0.2)] transition-all duration-200 focus-within:ring-2 focus-within:ring-[${this.color}]">
|
|
2521
2526
|
<div class="flex flex-col gap-2 p-4">
|
|
@@ -2585,7 +2590,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2585
2590
|
stroke-width="2"
|
|
2586
2591
|
d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z" />
|
|
2587
2592
|
</svg>
|
|
2588
|
-
`}#n(e){this._selectedRating>0||(this._selectedRating=e,this._hoverRating=0,this.dispatchEvent(new t.SubmitEvent({type:"star-rating",rating:e})))}#s(e){this._selectedRating>0||(this._hoverRating=e)}#o(){this._selectedRating>0||(this._hoverRating=0)}#a(e){this._selectedVote||(this._selectedVote=e,this.dispatchEvent(new t.SubmitEvent({type:"binary-vote",vote:e})))}};Ht.SubmitEvent=class extends CustomEvent{static type="mw-request-input:submit";constructor(e,r={}){super(Ht.SubmitEvent.type,{detail:e,bubbles:!0,composed:!0,...r})}};customElements.get("mw-request-input")||customElements.define("mw-request-input",Ht);var zt=class extends nt{constructor(e){if(super(e),this.it=U,e.type!==Ir.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===U||e==null)return this._t=void 0,this.it=e;if(e===ne)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let r=[e];return r.raw=r,this._t={_$litType$:this.constructor.resultType,strings:r,values:[]}}};zt.directiveName="unsafeHTML",zt.resultType=1;var
|
|
2593
|
+
`}#n(e){this._selectedRating>0||(this._selectedRating=e,this._hoverRating=0,this.dispatchEvent(new t.SubmitEvent({type:"star-rating",rating:e})))}#s(e){this._selectedRating>0||(this._hoverRating=e)}#o(){this._selectedRating>0||(this._hoverRating=0)}#a(e){this._selectedVote||(this._selectedVote=e,this.dispatchEvent(new t.SubmitEvent({type:"binary-vote",vote:e})))}};Ht.SubmitEvent=class extends CustomEvent{static type="mw-request-input:submit";constructor(e,r={}){super(Ht.SubmitEvent.type,{detail:e,bubbles:!0,composed:!0,...r})}};customElements.get("mw-request-input")||customElements.define("mw-request-input",Ht);var zt=class extends nt{constructor(e){if(super(e),this.it=U,e.type!==Ir.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===U||e==null)return this._t=void 0,this.it=e;if(e===ne)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let r=[e];return r.raw=r,this._t={_$litType$:this.constructor.resultType,strings:r,values:[]}}};zt.directiveName="unsafeHTML",zt.resultType=1;var La=Ar(zt);var ja=V({title:Y(_(),"Agent joining in"),subtitle:Y(_(),"We are finding a human agent to help you."),subtitle_past_join_time:Y(_(),"It is taking a bit longer. A human agent will join any moment now."),expected_join_time:fr(Qe(_(),Bi(),Vi())),game_title:Y(_(),"\u{1F9E0} I will guess your job"),game_first_question:Y(_(),"Does your job involve computers?"),game_result_prefix:Y(_(),"My guess:"),game_button_start:Y(_(),"\u{1F3AE} Play a game"),game_button_answer_affirmative:Y(_(),"Yes"),game_button_answer_negative:Y(_(),"No"),game_button_result_correct:Y(_(),"Correct"),game_button_result_wrong:Y(_(),"Wrong")});var Gn=t=>Qe(Et(),Ni(e=>Array.isArray(e)?e:[e]),Ye(t));var Ta=V({order_id_label:A(_()),order_id_value:A(_()),timeline:A(V({step:Gn(V({label:A(_()),status:A(Mt(["completed","in_progress","pending"]))}))})),items:A(V({item:Gn(V({name:A(_()),quantity:A(_()),price:A(_()),image:A(_())}))})),total_label:A(_()),total_amount:A(_()),customer_name:A(_()),shipping_label:A(_()),shipping_method:A(_()),payment_label:A(_()),payment_method_label:A(_()),payment_method_value:A(_()),payment_status_label:A(_()),payment_status_value:A(_()),order_tracking_label:A(_()),order_tracking_url:A(_())});var Oa=Js(V({url:_(),name:_(),description:_(),price:_()}));function Ua(t,e,r,{imagesByProductUrl:i,linksNewTab:n=!0,searchParams:s,messageIsStreaming:o=!1,isSupportAgent:a,color:l="#601feb",darkMode:c=!1,apiBaseUrl:d="",cdnBaseUrl:h=""}){if(!t)return u``;let f=e>0&&r[e-1]&&"data"in r[e-1],g=e<r.length-1||!o;if("text"in t)return u`<p>${t.text}</p>`;if("html"in t)return u`${La(t.html)}`;if("data"in t)switch(t.tag){case"product-card":case"product-card-v1":case"product-card-horizontal":{let p=me(Oa,t.data);if(p.success)return u`
|
|
2589
2594
|
${f?u`<div class="my-3 w-full border-t border-gray-200/50"></div>`:null}
|
|
2590
2595
|
<mw-product-card-horizontal
|
|
2591
2596
|
.product="${p.output}"
|
|
@@ -2601,9 +2606,9 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2601
2606
|
?links-new-tab="${n}"
|
|
2602
2607
|
?dark-mode="${c}"
|
|
2603
2608
|
color="${l}"></mw-product-order-status-card>
|
|
2604
|
-
`;case"order-card-v2":{let p=me(
|
|
2609
|
+
`;case"order-card-v2":{let p=me(Ta,t.data);p.success||console.warn("cannot parse order-card-v2",p.issues);let S=p.success?p.output:t.data;return u`
|
|
2605
2610
|
<!-- -->
|
|
2606
|
-
<mw-order-card .orderDetails="${
|
|
2611
|
+
<mw-order-card .orderDetails="${S}" ?streaming="${!g}" ?links-new-tab="${n}" ?dark-mode="${c}" color="${l}"></mw-order-card>
|
|
2607
2612
|
`}case"live-chat-wait-card-v1":{let p=t.data||{};return a?u`<p><i>${p.message}</i></p>`:u`
|
|
2608
2613
|
<mw-chat-wait-timer
|
|
2609
2614
|
heading="${p.title||""}"
|
|
@@ -2622,20 +2627,20 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2622
2627
|
cdnBaseUrl="${h}"
|
|
2623
2628
|
sound="${h?`${h}/assets/game-intro.aac`:""}"
|
|
2624
2629
|
?dark-mode="${c}"></mw-chat-wait-timer>
|
|
2625
|
-
`}case"live-chat-wait-card-v2":{let p=me(
|
|
2630
|
+
`}case"live-chat-wait-card-v2":{let p=me(ja,t.data||{});p.success||console.warn("cannot parse live-chat-wait-card-v2",p.issues);let S=p.success?p.output:t.data||{};return a?u`<p><i>${S.subtitle}</i></p>`:u`
|
|
2626
2631
|
<mw-chat-wait-timer
|
|
2627
|
-
.data="${
|
|
2632
|
+
.data="${S}"
|
|
2628
2633
|
color="${l}"
|
|
2629
2634
|
apiBaseUrl="${d}"
|
|
2630
2635
|
cdnBaseUrl="${h}"
|
|
2631
2636
|
sound="${h?`${h}/assets/game-intro.aac`:""}"
|
|
2632
2637
|
?dark-mode="${c}"></mw-chat-wait-timer>
|
|
2633
|
-
`}case"request-input-v1":return u``}return console.warn("could not render part:",t),u`<p><i>data type not supported</i></p>`}var
|
|
2638
|
+
`}case"request-input-v1":return u``}return console.warn("could not render part:",t),u`<p><i>data type not supported</i></p>`}var Qr=class{#e;#t;#r;#i=!1;timeoutMs;get isTyping(){return this.#i}constructor(e,r,{timeoutMs:i=2e3}={}){this.#e=e,this.#t=r,this.timeoutMs=i,e.addController(this)}hostDisconnected(){clearTimeout(this.#r),this.#r=void 0}onInput(e){if(this.#e.isConnected){if(!e.trim()){this.typingStopped();return}clearTimeout(this.#r),this.#r=setTimeout(()=>this.typingStopped(),this.timeoutMs),this.#i||this.#n()}}#n(){this.#i=!0,this.#t.typingStarted()}typingStopped(){clearTimeout(this.#r),this.#i=!1,this.#t.typingStopped()}};function Pa(t,e="en-US"){let r=new Intl.DateTimeFormat(e,{hour:"numeric",minute:"numeric"}).format(t);return`${t.toLocaleDateString(e,{year:"numeric",month:"short",day:"numeric"})}, ${r}`}function Ra(t){t?.body?.cancel().catch(console.warn)}var Zn=class{#e=[];#t;#r=10;#i=5e3;#n=!1;async add(e,r){if(this.#e.push(qa(e,r)),this.#e.length>=this.#r)return this.flush();this.#t||(this.#t=setTimeout(()=>{this.flush().catch(console.error)},this.#i))}async flush(){if(this.#n||this.#e.length===0)return;let e=[...this.#e];try{this.#n=!0,clearTimeout(this.#t),this.#t=void 0,this.#e=[];let r=new AbortController,i=setTimeout(()=>r.abort(),5e3);await Fa(e,{signal:r.signal}),clearTimeout(i)}catch(r){if(r.name==="AbortError")console.error("Request timed out, retrying events"),this.#e=[...e,...this.#e];else{console.error("Failed to send events to backend:",r);let i=e.filter(n=>n.event.includes("error"));this.#e=[...i,...this.#e]}}finally{this.#n=!1,this.#e.length>0&&!this.#t&&(this.#t=setTimeout(()=>{this.flush().catch(console.error)},this.#i))}}async flushBeforeUnload(){if(this.#e.length>0)try{let e=new FormData;e.set("events",JSON.stringify(this.#e)),navigator.sendBeacon(new URL("/widgets/data/collect",ei()).href,e)}catch(e){console.error("Failed to send final events:",e)}}},Ba=new Zn;window.addEventListener("beforeunload",()=>{Ba.flushBeforeUnload().catch(console.error)});async function j(t,e,r){if(typeof t!="string")throw new TypeError("Event name must be a string");if(typeof e!="object"||e===null)throw new TypeError("Properties must be an object");try{if(t==="ShopAssistant: user clicked link"&&Hu("molin_link_click",e),r?.immediate){await Fa([qa(t,e)]);return}else return Ba.add(t,e)}catch(i){console.error("Failed to send event:",i)}}async function Fa(t,{signal:e}={}){let r=new FormData;r.set("events",JSON.stringify(t));let i=await fetch(new URL("/widgets/data/collect",ei()),{method:"POST",body:r,signal:e});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);Ra(i)}function qa(t,e){return{event:t,widget_id:e.widgetId,properties:Object.assign({},e,Nu()),distinct_id:Vu(),timestamp:new Date().toISOString()}}function Vu(){let t=R.distinctID;if(t&&typeof t=="string")return t;let e=crypto.randomUUID();try{R.distinctID=e}catch(r){console.error("Failed to store distinct_id:",r)}return e}function Nu(){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 ei(){let t=new URL(import.meta.url).hostname;return{localhost:"http://localhost:8787","molin.localhost":"http://molin.localhost:8787","widget.molin.foo":"https://widget.molin.foo","widget.molin.ai":"https://widget.molin.ai","molin.ai":"https://molin.ai","molin.foo":"https://molin.foo"}[t]||"https://molin.ai"}function Hu(t,e){try{window.dataLayer=window.dataLayer||[];let r={event:t,link_url:e.url};window.dataLayer.push(r)}catch(r){console.error("Failed to send event to dataLayer:",r)}}function Na(){let t=new URL(import.meta.url).hostname;return{localhost:"http://uploads.molin.localhost:8787","molin.localhost":"http://uploads.molin.localhost:8787","widget.molin.foo":"https://widget.molin.foo","widget.molin.ai":"https://widget.molin.ai","molin.ai":"https://widget.molin.ai","molin.foo":"https://widget.molin.foo"}[t]||"https://widget.molin.ai"}function Ha(){let t=new URL(import.meta.url).hostname;return{localhost:"http://localhost:8702","molin.localhost":"http://localhost:8702","widget.molin.foo":"https://widget.molin.foo","widget.molin.ai":"https://widget.molin.ai","molin.ai":"https://widget.molin.ai","molin.foo":"https://widget.molin.foo"}[t]||"https://widget.molin.ai"}var zu="\xB7 \xB7 \xB7",Wu=["star-rating","binary-vote","new-conversation-button"],Wt=class t extends k(v){static styles=O`
|
|
2634
2639
|
div.dark::before {
|
|
2635
2640
|
opacity: 0.8;
|
|
2636
2641
|
background-color: rgba(20, 22, 26, var(--tw-bg-opacity));
|
|
2637
2642
|
}
|
|
2638
|
-
`;static properties={showClose:{type:Boolean,attribute:"show-close"},_currentRequestInputIndex:{type:Number,state:!0}};#e=
|
|
2643
|
+
`;static properties={showClose:{type:Boolean,attribute:"show-close"},_currentRequestInputIndex:{type:Number,state:!0}};#e=to(this);#t=new Map;constructor(){super(),this.showClose=!1,this._currentRequestInputIndex=0}#r=new Qr(this,{typingStarted:()=>this.#e.value?.sendUserTypingStart(),typingStopped:()=>this.#e.value?.sendUserTypingStop()});#i=new Or(this,{onImageDelete:e=>{if(!this.#e.value){console.warn("widget context not available, cannot delete image");return}this.#e.value.sendImageDelete(e),this.#g?.focus()},uploadUrl:new URL("/v1/uploads",Na()).href,onConnect:()=>{this.#e.value?.connect()}});get conversationId(){return this.#e.value?.conversationId||""}get messages(){return this.#e.value?.messages||[]}get config(){return this.#e.value?.config}get callbacks(){return this.#e.value?.callbacks||{}}get widgetId(){return this.#e.value?.widgetId||""}get typingIndicator(){return this.#e.value?.typingIndicator}get isStreaming(){return this.#e.value?.isStreaming}get ranOutOfCredits(){return this.#e.value?.ranOutOfCredits}get isLiveMode(){return this.#e.value?.isLiveMode}get lastMsg(){return this.#e.value?.lastMsg}get hasQueuedMessages(){return this.#e.value?.hasQueuedMessages}#n="single";#s=null;firstUpdated(){document.addEventListener("mw-context-widget:connected",this.#o,{once:!0}),this.addEventListener("mw-chat-wait-game:question-answered",this.#a),this.addEventListener("mw-chat-wait-game:game-completed",this.#d),this.addEventListener("mw-chat-wait-game:guess-validated",this.#c)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("mw-chat-wait-game:question-answered",this.#a),this.removeEventListener("mw-chat-wait-game:game-completed",this.#d),this.removeEventListener("mw-chat-wait-game:guess-validated",this.#c)}#o=e=>{let r=e,{pendingImages:i}=r.detail;Array.isArray(i)&&this.#i.restoreImages(i)};#a=e=>{let r=e,{questionIndex:i,question:n,answer:s,totalQuestions:o}=r.detail;this.callbacks.onWaitGameQuestionAnswered?.({widgetId:this.widgetId,conversationId:this.conversationId,questionIndex:i,question:n,answer:s,totalQuestions:o})};#d=e=>{let r=e,{guessedProfession:i,questionCount:n}=r.detail;this.callbacks.onWaitGameCompleted?.({widgetId:this.widgetId,conversationId:this.conversationId,guessedProfession:i,questionCount:n})};#c=e=>{let r=e,{guessedProfession:i,isCorrect:n,questionCount:s}=r.detail;this.callbacks.onWaitGameGuessValidated?.({widgetId:this.widgetId,conversationId:this.conversationId,guessedProfession:i,isCorrect:n,questionCount:s})};updated(){let e=this.lastMsg?.id;e&&e!==this.#s&&(this.#s=e,this._currentRequestInputIndex=0),this.#e.value?.widgetId&&this.config?.enableImageUpload&&this.#i.updateUploadOptions({conversationId:this.conversationId,widgetId:this.#e.value?.widgetId,enabled:this.config?.enableImageUpload,isConnected:()=>this.#e.value?.isConnected()??!1,onConnect:()=>{this.#e.value?.connect()}})}render(){D(this.config,"config is required");let e=Da(this.messages,s=>{try{let o=new Date(s.timestamp),a=Math.floor(o.getUTCMinutes()/5)*5;return o.setUTCMinutes(a,0,0),o.valueOf().toString()}catch(o){console.error(o)}}),r=Math.max(0,Math.min(this._currentRequestInputIndex,this.#m.length-1)),i=this.#m[r],n=this.config.darkMode;return u`
|
|
2639
2644
|
<div
|
|
2640
2645
|
class="${n?"dark":""} relative mx-auto h-full bg-[#FDFDFD] font-sans text-base before:absolute before:inset-0 before:bg-[#8d8d8d] before:opacity-10 sm:rounded-[36px] sm:p-1.5 sm:before:rounded-[36px] dark:bg-[#14161A]">
|
|
2641
2646
|
<div
|
|
@@ -2646,8 +2651,8 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2646
2651
|
?show-new-chat="${!this.isLiveMode&&this.messages.length>0&&!this.#C}"
|
|
2647
2652
|
?show-close="${this.showClose}"
|
|
2648
2653
|
?dark-mode="${n}"
|
|
2649
|
-
@mw:new-chat-click="${this.#
|
|
2650
|
-
@mw:close-click="${this.#
|
|
2654
|
+
@mw:new-chat-click="${this.#b}"
|
|
2655
|
+
@mw:close-click="${this.#y}">
|
|
2651
2656
|
</mw-chat-header>
|
|
2652
2657
|
|
|
2653
2658
|
<!-- used by the dashboard to inject content -->
|
|
@@ -2677,10 +2682,10 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2677
2682
|
<!-- the padding at the top makes empty room at the top when scrolling and content is hidden behind header -->
|
|
2678
2683
|
<!-- this is the 2nd (inner) div that will natively stick/scroll to bottom -->
|
|
2679
2684
|
<div class="${this.messages.length>0?"pt-20":""}">
|
|
2680
|
-
${
|
|
2681
|
-
<div class="my-2 text-center text-xs text-gray-500 dark:text-gray-400">${
|
|
2682
|
-
${
|
|
2683
|
-
${a.images?
|
|
2685
|
+
${K(Array.from(e),([s])=>s,([s,o])=>u`
|
|
2686
|
+
<div class="my-2 text-center text-xs text-gray-500 dark:text-gray-400">${Pa(new Date(Number(s)),window.navigator.language)}</div>
|
|
2687
|
+
${K(o??[],a=>a.id,(a,l)=>{let d=o[l+1]?.role===a.role,f=(l>0?o[l-1]:void 0)?.role===a.role,p=(o.length>0?o[o.length-1]:void 0)?.id===a.id,S=()=>p&&!f&&!d?"single-current":!f&&!d?"single":!f&&d?"first":p&&f&&!d?"last-current":f&&!d?"last":f&&d?"middle":"single";this.#n=S();let b=this.isLiveMode&&a.role==="user"&&a.id===this.lastMsg?.id?"sent":"",$=(a.content.includes("<request-input-v1>")||!a.content)&&a.parts?.every(y=>"data"in y&&y.tag==="request-input-v1");return u`
|
|
2688
|
+
${a.images?K(a.images,y=>y,y=>u`
|
|
2684
2689
|
<div data-id="${a.id}" class="${d?"mb-[1px]":"mb-3"} mr-2 ml-[15px] flex-row">
|
|
2685
2690
|
<mw-chat-image
|
|
2686
2691
|
src="${y}"
|
|
@@ -2690,7 +2695,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2690
2695
|
width="300px"></mw-chat-image>
|
|
2691
2696
|
</div>
|
|
2692
2697
|
`):null}
|
|
2693
|
-
${(a.content||a.parts)
|
|
2698
|
+
${(a.content||a.parts)&&!$?u`
|
|
2694
2699
|
<div data-id="${a.id}" class="${d?"mb-[1px]":"mb-3"} mx-2 flex-row">
|
|
2695
2700
|
<mw-chat-message
|
|
2696
2701
|
.color="${this.config?.color}"
|
|
@@ -2702,7 +2707,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2702
2707
|
@click="${this.#l}">
|
|
2703
2708
|
<div
|
|
2704
2709
|
class="prose prose-h1:first:mt-0 prose-h2:first:mt-0 prose-h3:first:mt-0 prose-h4:first:mt-0 prose-h1:last:mb-0 prose-h2:last:mb-0 prose-h3:last:mb-0 prose-h4:last:mb-0 prose-h1:mt-5 prose-h2:mt-5 prose-h3:mt-5 prose-h4:mt-5 prose-h1:mb-2 prose-h2:mb-2 prose-h3:mb-2 prose-h4:mb-2 prose-h1:text-xl prose-h1:font-bold prose-h2:text-lg prose-h2:font-bold prose-h3:text-base prose-h3:font-bold prose-h4:text-sm prose-h4:font-bold prose-p:whitespace-pre-wrap dark:prose-headings:text-white dark:prose-strong:text-white dark:prose-p:text-inherit dark:prose-a:text-white break-words text-inherit">
|
|
2705
|
-
${a.content===
|
|
2710
|
+
${a.content===zu?u`<mw-loading class="-mx-2 block h-8 max-h-[24px] w-8 fill-[${this.config?.color}]"></mw-loading>`:a.parts?K(a.parts,(y,x)=>x,(y,x)=>Ua(y,x,a.parts??[],{imagesByProductUrl:a.metadata?.imagesByProductUrl,linksNewTab:this.config?.linksNewTab??!0,searchParams:this.config?.disableUtmInjection?void 0:new URLSearchParams({utm_source:"molin.ai",utm_medium:"chat",utm_campaign:"general"}),messageIsStreaming:a.streaming,color:this.config?.color,darkMode:n,apiBaseUrl:ei(),cdnBaseUrl:Ha()})):u`<p>${a.content}</p>`}
|
|
2706
2711
|
</div>
|
|
2707
2712
|
</mw-chat-message>
|
|
2708
2713
|
</div>
|
|
@@ -2747,13 +2752,13 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2747
2752
|
<mw-disclaimer .text="${this.config.disclaimer}" .color="${this.config.color}" ?dark-mode="${n}"></mw-disclaimer>
|
|
2748
2753
|
</div>
|
|
2749
2754
|
`:null}
|
|
2750
|
-
${this.#
|
|
2755
|
+
${this.#m.length===0?u`
|
|
2751
2756
|
<mw-chat-input
|
|
2752
|
-
@mw:change="${this.#
|
|
2753
|
-
@mw:submit="${this.#
|
|
2757
|
+
@mw:change="${this.#w}"
|
|
2758
|
+
@mw:submit="${this.#f}"
|
|
2754
2759
|
@mw:cancel="${this.#x}"
|
|
2755
2760
|
@mw:image-upload-click="${this.config?.enableImageUpload?this.#i.openImagePicker:void 0}"
|
|
2756
|
-
@mw:image-delete="${this.config?.enableImageUpload?this.#
|
|
2761
|
+
@mw:image-delete="${this.config?.enableImageUpload?this.#v:void 0}"
|
|
2757
2762
|
placeholder="${this.config?.input?.placeholder??""}"
|
|
2758
2763
|
?disabled="${this.ranOutOfCredits||this.hasQueuedMessages||this.#i.hasPendingImages}"
|
|
2759
2764
|
?streaming="${this.isStreaming??!0}"
|
|
@@ -2786,7 +2791,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2786
2791
|
</div>
|
|
2787
2792
|
</div>
|
|
2788
2793
|
</div>
|
|
2789
|
-
`}#l(e){let i=e.composedPath().find(n=>n instanceof HTMLAnchorElement);if(i){if(e.preventDefault(),this.callbacks.onUserClickedLink?.({widgetId:this.widgetId,url:i.href,conversationId:this.conversationId}),window.self!==window.top){window.open(i.href,"_blank");return}let s=this.config?.linksNewTab?"_blank":"_self";window.open(i.href,i.target||s)}}#h(e){if(this.isStreaming)return;e.preventDefault();let r=e.detail.example;this.#
|
|
2794
|
+
`}#l(e){let i=e.composedPath().find(n=>n instanceof HTMLAnchorElement);if(i){if(e.preventDefault(),this.callbacks.onUserClickedLink?.({widgetId:this.widgetId,url:i.href,conversationId:this.conversationId}),window.self!==window.top){window.open(i.href,"_blank");return}let s=this.config?.linksNewTab?"_blank":"_self";window.open(i.href,i.target||s)}}#h(e){if(this.isStreaming)return;e.preventDefault();let r=e.detail.example;this.#p(r)}#p=Ze({interval:200},async e=>{D(this.#e.value,"widget context is required"),await this.#e.value.enqueueUserInput(e,{xUserData:this.#e.value?.xUserData,xCustomInstructions:this.#e.value?.xCustomInstructions})&&(this.#g?.setValue(""),this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:e,example:!0,conversationId:this.conversationId}))});#f(e){if(D(this.#e.value,"widget context is required"),e.preventDefault(),this.config?.enableImageUpload&&this.#i.hasPendingImages)return;let r=e.detail;this.#e.value.enqueueUserInput(r,{xUserData:this.#e.value?.xUserData,xCustomInstructions:this.#e.value?.xCustomInstructions}).then(i=>{i&&(this.#g?.setValue(""),this.#i.clearImages(),this.#r.typingStopped(),this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:r,example:!1,conversationId:this.conversationId}),window.requestAnimationFrame(()=>{this.#g?.focus()}))}).catch(console.warn)}#w(e){this.#r.onInput(e.detail.full)}#x(){D(this.#e.value,"widget context is required"),this.#e.value.sendUserCancel(),this.callbacks.onUserCanceledStreaming?.({widgetId:this.widgetId})}#v(e){this.#i.onImageDelete(e.detail)}#b(){D(this.#e.value,"widget context is required"),this.#e.value.sendNewChat(),this.reset()}#y(){this.dispatchEvent(new t.CloseClickEvent)}#u(e){D(this.#e.value,"widget context is required");let r=this.#m,i=r[this._currentRequestInputIndex];if(!i){console.warn("no current state found for request input");return}switch(e.detail.type){case"star-rating":{let{rating:s,type:o}=e.detail;this.#t.set(i.key||i.title,{type:o,rating:s,key:i.key,title:i.title});break}case"binary-vote":{let{vote:s,type:o}=e.detail;this.#t.set(i.key||i.title,{type:o,vote:s,key:i.key,title:i.title});break}case"new-conversation-button":{this.#b(),this.requestUpdate();return}default:console.warn("unknown request input type",e.detail);return}this._currentRequestInputIndex+=1;let n=r.filter(s=>s.type==="star-rating"||s.type==="binary-vote").length;this.#t.size>=n&&this.#k(),this.requestUpdate()}async#k(){if(D(this.#e.value,"widget context is required"),this.#t.size===0)return;if(!this.#e.value.lastMsg?.id){console.warn("cannot submit request inputs without message ID");return}await this.#e.value.enqueueUserInput("",{role:"user",expectStreaming:!1,requestInputResponse:Array.from(this.#t.values())})&&this.#t.clear(),this.requestUpdate()}get#m(){D(this.#e.value,"widget context is required");let e=this.messages.findLast(n=>n.role==="assistant"&&n.parts?.some(s=>"tag"in s&&s.tag==="request-input-v1"&&"data"in s&&s.data.type==="new-conversation-button")),r=this.#e.value.lastMsg;if(e&&r?.id!==e.id){let n=e?.parts?.find(s=>"tag"in s&&s.tag==="request-input-v1"&&"data"in s&&s.data.type==="new-conversation-button");if(n&&"data"in n)return[{title:n.data.title,type:n.data.type,key:n.data.key}]}if(r?.role!=="assistant")return[];let i=r.parts?.filter(n=>"tag"in n&&n.tag==="request-input-v1");return!i||i.length===0?[]:i.map(n=>!("data"in n)||!Wu.includes(n.data.type)?null:{title:n.data.title,type:n.data.type,key:n.data.key}).filter(n=>n!==null)}get#C(){if(this.#m.length===0)return!1;let r=this.#m.filter(i=>i.type==="star-rating"||i.type==="binary-vote").length;return this.#t.size<r}get#_(){return this.renderRoot.querySelector("#scrollable-content")}get#g(){return this.renderRoot.querySelector("mw-chat-input")}reloadConfig(){this.#e.value?.reloadConfig(),this.requestUpdate()}sendMessage=Ze({interval:200},async e=>{if(!e?.trim())return console.warn("sendMessage: Message must be a non-empty string"),!1;D(this.#e.value,"Widget context is required");let{value:r}=this.#e,i=await r.enqueueUserInput(e,{xUserData:r.xUserData,xCustomInstructions:r.xCustomInstructions,role:"user",expectStreaming:!0});return i&&this.#g?.setValue(""),i??!1});setInputValue(e){if(!e||typeof e!="string"){console.warn("setInputValue requires a valid string value");return}let r=this.#g;if(!r){console.warn("input element not found, cannot set value");return}r.setValue?r.setValue(e):console.warn("input element does not have setValue method")}focusInput(){window.requestAnimationFrame(()=>{this.#g?.focus()})}reset(){this.#i.clearImages(),this._currentRequestInputIndex=0,this.#t.clear(),this.#e.value?.reset()}};Wt.CloseClickEvent=class extends CustomEvent{static type="mw:close-click";constructor(e={}){super(Wt.CloseClickEvent.type,{...e})}};customElements.get("mw-chat")||customElements.define("mw-chat",Wt);var qe=class t extends k(v){static properties={color:{type:String},disabled:{type:Boolean},placeholder:{type:String},dark:{type:Boolean},_inputValue:{type:String,state:!0}};constructor(){super(),this.color="#8B5CF6",this.disabled=!1,this.placeholder="Ask AI...",this.dark=!1,this._inputValue=""}#e=new Date;#t(e){let r=e.target;this._inputValue=r.value,this.dispatchEvent(new t.ChangeEvent({value:this._inputValue}))}render(){return u`
|
|
2790
2795
|
<mw-spinning-border
|
|
2791
2796
|
.size=${"420px"}
|
|
2792
2797
|
.color=${this.color||"#8B5CF6"}
|
|
@@ -2819,7 +2824,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2819
2824
|
</button>
|
|
2820
2825
|
</form>
|
|
2821
2826
|
</mw-spinning-border>
|
|
2822
|
-
`}#r(e){e.preventDefault();let r=new Date;if(r.getTime()-this.#e.getTime()<500)return;this.#e=r;let n=this._inputValue.trim();n&&this.dispatchEvent(new t.SubmitInputEvent({text:n}))&&(this._inputValue="")}get#i(){return this.renderRoot.querySelector('input[name="input"]')??null}get#n(){return this.renderRoot.querySelector('button[type="submit"]')??null}#s(e){
|
|
2827
|
+
`}#r(e){e.preventDefault();let r=new Date;if(r.getTime()-this.#e.getTime()<500)return;this.#e=r;let n=this._inputValue.trim();n&&this.dispatchEvent(new t.SubmitInputEvent({text:n}))&&(this._inputValue="")}get#i(){return this.renderRoot.querySelector('input[name="input"]')??null}get#n(){return this.renderRoot.querySelector('button[type="submit"]')??null}#s(e){Gu(e)&&(e.preventDefault(),this.disabled||this.#n?.click())}};qe.SubmitInputEvent=class extends CustomEvent{static type="mw-floating-ask-ai:submit";constructor(e,r={}){super(qe.SubmitInputEvent.type,{detail:e,bubbles:!0,composed:!0,...r})}};qe.ChangeEvent=class extends CustomEvent{static type="mw-floating-ask-ai:change";constructor(e,r={}){super(qe.ChangeEvent.type,{detail:e,bubbles:!0,composed:!0,...r})}};function Gu(t){return(t.code==="Enter"||t.code==="NumpadEnter")&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey}customElements.get("mw-floating-ask-ai")||customElements.define("mw-floating-ask-ai",qe);var Ve=class t extends k(v){static properties={text:{type:String},color:{type:String},darkMode:{type:Boolean,attribute:"dark-mode"}};static styles=O`
|
|
2823
2828
|
.popup-desktop:hover button {
|
|
2824
2829
|
transition-delay: 0s !important;
|
|
2825
2830
|
}
|
|
@@ -2872,7 +2877,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2872
2877
|
<!-- can append any other content -->
|
|
2873
2878
|
<slot name="footer"></slot>
|
|
2874
2879
|
</div>
|
|
2875
|
-
`}#e(){this.dispatchEvent(new t.CloseEvent)}#t(){this.dispatchEvent(new t.ClickEvent)}};Ne.CloseEvent=class extends CustomEvent{static type="mw:close";constructor(e={}){super(Ne.CloseEvent.type,{...e})}};Ne.ClickEvent=class extends CustomEvent{static type="mw:click";constructor(e={}){super(Ne.ClickEvent.type,{...e})}};customElements.get("mw-popup-mobile")||customElements.define("mw-popup-mobile",Ne);var
|
|
2880
|
+
`}#e(){this.dispatchEvent(new t.CloseEvent)}#t(){this.dispatchEvent(new t.ClickEvent)}};Ne.CloseEvent=class extends CustomEvent{static type="mw:close";constructor(e={}){super(Ne.CloseEvent.type,{...e})}};Ne.ClickEvent=class extends CustomEvent{static type="mw:click";constructor(e={}){super(Ne.ClickEvent.type,{...e})}};customElements.get("mw-popup-mobile")||customElements.define("mw-popup-mobile",Ne);var ti=class{#e;#t=!1;constructor(e,r){this.#e=r,e.addController(this)}hostConnected(){this.startListening()}hostDisconnected(){this.stopListening()}startListening(){window.addEventListener("click",this.#r),window.addEventListener("keydown",this.#r)}stopListening(){window.removeEventListener("click",this.#r),window.removeEventListener("keydown",this.#r)}#r=()=>{this.#t||(this.#e.userFirstInteracted?.(),this.#t=!0),this.#e.userInteracted?.()}};var Zu=1440*60*1e3,ri=class{#e;#t;#r;#i;#n=!1;#s=!1;get showing(){return this.#n}constructor(e,r,i=Date){this.#e=e,this.#t=r,this.#r=i,e.addController(this)}hostDisconnected(){this.abortAutoShowTimer()}show({sound:e}={}){if(this.abortAutoShowTimer(),!this.#n&&(this.#n=!0,this.#e.requestUpdate(),e)){this.#t.playPopupSound();let r=this.#t.getPersistedState();this.#t.setPersistedState({...r,playedSoundOnce:!0})}}#o(){let e=this.#t.getPersistedState(),r=!!e?.playedSoundOnce;e?.userDismissedAt&&this.#r.now()-e.userDismissedAt<Zu||this.show({sound:!r})}hide(){this.#s=!0,this.abortAutoShowTimer(),this.#n=!1,this.#e.requestUpdate()}abortAutoShowTimer(){clearTimeout(this.#i)}onCloseClick(){let e=this.#t.getPersistedState();this.#t.setPersistedState({...e,userDismissedAt:this.#r.now()}),this.hide()}onContentClick(){let e=this.#t.getPersistedState();this.#t.setPersistedState({...e,userDismissedAt:this.#r.now()}),this.hide()}userFirstInteracted(){this.abortAutoShowTimer(),this.#s||(this.#i=setTimeout(()=>this.#o(),this.#t.getDelayMs()))}};var Gt=class t extends k(v){static properties={positionClasses:{type:String,attribute:"position"},delayMs:{type:Number,attribute:"delay"},soundUrl:{type:String,attribute:"sound"},content:{type:Object},darkMode:{type:Boolean,attribute:"dark-mode"}};#e=new ri(this,{getDelayMs:()=>this.delayMs,playPopupSound:()=>{this.soundUrl&&new Audio(this.soundUrl).play().then(()=>{}).catch(e=>{console.error("Error playing audio:",e,{})})},setPersistedState:e=>{R.popupState=e},getPersistedState:()=>R.popupState});#t=new ti(this,this.#e);constructor(){super(),this.positionClasses="",this.delayMs=0,this.soundUrl="",this.darkMode=!1,this.content={desktop:{text:"",color:""},mobile:{text:"",button:"",color:"",poweredBy:!0}}}render(){let e=this.#e.showing?"visible opacity-100 translate-y-0":"invisible opacity-0 translate-y-3",r=this.content;return u`
|
|
2876
2881
|
<!-- mobile shadow backdrop -->
|
|
2877
2882
|
<div @click="${this.#r}" class="${e} fixed inset-0 z-[2147483647] bg-black/50 transition-[opacity,visibility] sm:hidden"></div>
|
|
2878
2883
|
|
|
@@ -2893,7 +2898,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2893
2898
|
<div class="${e} ${this.positionClasses} fixed z-[2147483647] transition-[opacity,translate,visibility] max-sm:hidden">
|
|
2894
2899
|
<mw-popup-desktop color="${r.desktop.color}" text="${r.desktop.text}" ?dark-mode="${this.darkMode}" @mw:click="${this.#i}" @mw:close="${this.#r}"></mw-popup-desktop>
|
|
2895
2900
|
</div>
|
|
2896
|
-
`}#r(){this.#e.onCloseClick()}#i(){this.dispatchEvent(new t.ClickEvent),this.#e.onContentClick()}hide(){this.#e.hide()}};Gt.ClickEvent=class extends CustomEvent{static type="mw:click";constructor(e={}){super(Gt.ClickEvent.type,{...e})}};customElements.get("mw-popup")||customElements.define("mw-popup",Gt);var
|
|
2901
|
+
`}#r(){this.#e.onCloseClick()}#i(){this.dispatchEvent(new t.ClickEvent),this.#e.onContentClick()}hide(){this.#e.hide()}};Gt.ClickEvent=class extends CustomEvent{static type="mw:click";constructor(e={}){super(Gt.ClickEvent.type,{...e})}};customElements.get("mw-popup")||customElements.define("mw-popup",Gt);var Kn=class extends k(v){static properties={color:{type:String,attribute:"color"},position:{type:String,attribute:"position"}};constructor(){super(),this.color="sky-500",this.position="top-right"}render=()=>u`
|
|
2897
2902
|
<span class="relative inline-flex">
|
|
2898
2903
|
<slot></slot>
|
|
2899
2904
|
<span class="${this.#e} pointer-events-none absolute z-10 flex h-3 w-3">
|
|
@@ -2901,7 +2906,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2901
2906
|
<span class="bg-${this.color} relative inline-flex h-3 w-3 rounded-full"></span>
|
|
2902
2907
|
</span>
|
|
2903
2908
|
</span>
|
|
2904
|
-
`;get#e(){switch(this.position){case"top-left":return"top-0 left-0 -mt-1 -ml-1";case"top-right":return"top-0 right-0 -mt-1 -mr-1";case"bottom-left":return"bottom-0 left-0 -mb-1 -ml-1";case"bottom-right":return"bottom-0 right-0 -mb-1 -mr-1";default:throw new Error(`Invalid position: ${this.position}`)}}};customElements.get("mw-pulse-dot")||customElements.define("mw-pulse-dot",
|
|
2909
|
+
`;get#e(){switch(this.position){case"top-left":return"top-0 left-0 -mt-1 -ml-1";case"top-right":return"top-0 right-0 -mt-1 -mr-1";case"bottom-left":return"bottom-0 left-0 -mb-1 -ml-1";case"bottom-right":return"bottom-0 right-0 -mb-1 -mr-1";default:throw new Error(`Invalid position: ${this.position}`)}}};customElements.get("mw-pulse-dot")||customElements.define("mw-pulse-dot",Kn);var Jn=class extends k(v){static properties={positionClasses:{type:String,attribute:"position"},text:{type:String}};constructor(){super(),this.positionClasses="",this.text="Try it out"}render=()=>u`
|
|
2905
2910
|
<div class="${this.positionClasses} fixed right-6 bottom-24 z-10 flex animate-bounce flex-col items-center justify-center font-sans text-base">
|
|
2906
2911
|
<p class="mb-2 -translate-x-4 -rotate-12 transform text-lg leading-normal font-bold text-gray-800">${this.text}</p>
|
|
2907
2912
|
|
|
@@ -2914,11 +2919,11 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2914
2919
|
stroke-linecap="round"></path>
|
|
2915
2920
|
</svg>
|
|
2916
2921
|
</div>
|
|
2917
|
-
`};customElements.get("mw-try-it-out")||customElements.define("mw-try-it-out",Jn);function
|
|
2922
|
+
`};customElements.get("mw-try-it-out")||customElements.define("mw-try-it-out",Jn);function $e(){return window.molinSettings&&typeof window.molinSettings=="object"?window.molinSettings:null}var ii=class{#e;#t;#r;#i;isLoading=!1;data=void 0;constructor(e,r,i){this.#e=e,this.#t=r,this.#r=i,e.addController(this)}fetch(){if(this.isLoading)return;this.#i?.abort();let e=new AbortController;this.#i=e,this.isLoading=!0,this.data=void 0,this.#e.requestUpdate(),(async()=>{let r=this.#n();return r.signal?.addEventListener("abort",()=>e.abort(),{signal:e.signal}),fetch(r,{signal:e.signal})})().then(async r=>{if(!r.ok)throw new Error(`${r.statusText}: ${await r.text()}`);this.isLoading=!1,this.data=typeof this.#r?.transform=="function"?await this.#r.transform(r):r,this.#e.requestUpdate()}).catch(r=>{this.#r?.onError?.(r),this.isLoading=!1,this.data=void 0,this.#e.requestUpdate()}).finally(()=>{e.abort()})}#n(){let e=this.#t;if(typeof e=="function"&&(e=e()),!e)throw new Error("missing request");return new Request(e)}hostConnected(){this.isLoading||this.#r?.fetchWhenConnected&&this.fetch()}hostDisconnected(){this.#i?.abort(),this.#i=void 0}};var Xn=class{#e;#t;#r;#i;get data(){return this.#i||this.#r?.data}constructor(e,r){this.#e=e,this.#t=r,e.addController(this)}hostConnected(){if(this.#r||this.#i)return;let e=za();e&&e.widgetId===this.#e.widgetId?this.#i=e.config:this.#r=new ii(this.#e,()=>{if(this.#e.cdn&&this.#e.widgetId)return`${this.#e.cdn}/config?w=${this.#e.widgetId}`;throw new Error("missing cdn or widgetId")},{fetchWhenConnected:!0,transform:async r=>{let i=await r.json();return i&&!e&&window.__INIT_MOLIN_SHOP_AI({cdn:this.#e.cdn,widgetId:this.#e.widgetId,config:i}),i},onError:this.#t?.onError})}},mt=(t,e)=>new Xn(t,{onError:e?.onError||console.error,...e});var He=class t extends k(v){static styles=O`
|
|
2918
2923
|
:host {
|
|
2919
2924
|
all: initial; /* reset all properties that can pierce the shadow DOM */
|
|
2920
2925
|
}
|
|
2921
|
-
`;static 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}};#e;get config(){return this.#t||this.#e.data}#t;#r={onError:e=>{alert(e.error),console.error(e.widgetId,e.error),
|
|
2926
|
+
`;static 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}};#e;get config(){return this.#t||this.#e.data}#t;#r={onError:e=>{alert(e.error),console.error(e.widgetId,e.error),j("ShopAssistant: error",{...e},{immediate:!0})},onNewMessageStartedStreaming:e=>{j("ShopAssistant: user received bot message (streaming started)",e)},onMessageEndedStreaming:e=>{j("ShopAssistant: user received bot message (streaming ended)",e)},onUserCanceledStreaming:e=>{j("ShopAssistant: user canceled streaming",e)},onUserClickedLink:e=>{j("ShopAssistant: user clicked link",e)},onUserSentInput:e=>{j("ShopAssistant: user sent input",e)}};constructor(){super(),this.cdn="https://widget.molin.ai",this.widgetId="",this.showClose=!1,this.xUserData=$e()?.userData,this.xCustomInstructions=$e()?.customInstructions,this.#e=mt(this)}render(){return this.config?u`
|
|
2922
2927
|
<mw-context-widget
|
|
2923
2928
|
.widgetId="${this.widgetId}"
|
|
2924
2929
|
.config="${this.config}"
|
|
@@ -2931,7 +2936,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2931
2936
|
<slot name="banner" slot="banner"></slot>
|
|
2932
2937
|
</mw-chat>
|
|
2933
2938
|
</mw-context-widget>
|
|
2934
|
-
`:null}#i(){this.dispatchEvent(new t.CloseClickEvent)}injectConfig(e){this.#t=e,this.requestUpdate()}reloadConfig(){this.#n?.reloadConfig()}reset(){this.xUserData={},this.xCustomInstructions="",this.#n?.reset(),this.requestUpdate()}get#n(){return this.renderRoot.querySelector("mw-chat")}get conversationId(){return this.#n?.conversationId??""}get messages(){return this.#n?.messages??[]}};customElements.get("molin-shop-ai-chat")||customElements.define("molin-shop-ai-chat",He);He.CloseClickEvent=class extends CustomEvent{static type="mw:close-click";constructor(e={}){super(He.CloseClickEvent.type,{...e})}};var
|
|
2939
|
+
`:null}#i(){this.dispatchEvent(new t.CloseClickEvent)}injectConfig(e){this.#t=e,this.requestUpdate()}reloadConfig(){this.#n?.reloadConfig()}reset(){this.xUserData={},this.xCustomInstructions="",this.#n?.reset(),this.requestUpdate()}get#n(){return this.renderRoot.querySelector("mw-chat")}get conversationId(){return this.#n?.conversationId??""}get messages(){return this.#n?.messages??[]}};customElements.get("molin-shop-ai-chat")||customElements.define("molin-shop-ai-chat",He);He.CloseClickEvent=class extends CustomEvent{static type="mw:close-click";constructor(e={}){super(He.CloseClickEvent.type,{...e})}};var Yn=class{hidden;constructor({hidden:e=!1}){this.hidden=e}setUserData(e){for(let r of document.querySelectorAll("molin-shop-ai"))e?r.setAttribute("user-data",JSON.stringify(e)):r.removeAttribute("user-data");for(let r of document.querySelectorAll("molin-shop-ai-chat"))e?r.setAttribute("user-data",JSON.stringify(e)):r.removeAttribute("user-data")}setCustomInstructions(e){for(let r of document.querySelectorAll("molin-shop-ai"))e?r.setAttribute("custom-instructions",e):r.removeAttribute("custom-instructions");for(let r of document.querySelectorAll("molin-shop-ai-chat"))e?r.setAttribute("custom-instructions",e):r.removeAttribute("custom-instructions")}showLauncher(){for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof ye&&e.showLauncher()}hideLauncher(){for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof ye&&e.hideLauncher()}openChat(e){let{message:r,autoSend:i}=e||{};for(let n of document.querySelectorAll("molin-shop-ai"))n instanceof ye&&n.openChat({message:r,autoSend:i})}closeChat(){for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof ye&&e.closeChat()}reset(){R.resetAll();for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof ye&&e.reset();for(let e of document.querySelectorAll("molin-shop-ai-chat"))e instanceof He&&e.reset()}};function Wa({hidden:t}){let e=new Yn({hidden:t});return window.Molin=e,e}function ni(){let t=window.Molin;if(!t)throw new Error("window.Molin global not initialized");return t}window.__INIT_MOLIN_SHOP_AI=function(e){Ku(e);let r=$e(),i=typeof r?.hidden=="boolean"?r.hidden:window.self!==window.top;if(Wa({hidden:i}),e.auto){let n=document.createElement("molin-shop-ai");n.setAttribute("cdn",e.cdn),n.setAttribute("widget",e.widgetId),document.body.appendChild(n)}};function Ku(t){window.__INIT_MOLIN_SHOP_AI_OPTIONS=t}function za(){return window.__INIT_MOLIN_SHOP_AI_OPTIONS}var Qn=class extends k(v){static styles=O`
|
|
2935
2940
|
:host {
|
|
2936
2941
|
all: initial; /* reset all properties that can pierce the shadow DOM */
|
|
2937
2942
|
}
|
|
@@ -2945,11 +2950,11 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2945
2950
|
.src="${this.config?.bubble?.bubbleUrl}"
|
|
2946
2951
|
width="${G(this.config?.bubble?.size?.width)}"
|
|
2947
2952
|
height="${G(this.config?.bubble?.size?.height)}"></mw-bubble>
|
|
2948
|
-
`:null}};customElements.get("molin-shop-ai-launcher")||customElements.define("molin-shop-ai-launcher",
|
|
2953
|
+
`:null}};customElements.get("molin-shop-ai-launcher")||customElements.define("molin-shop-ai-launcher",Qn);var Vw="navigator"in globalThis&&/Mobi|Android|iPhone/i.test(navigator.userAgent),Nw="navigator"in globalThis&&"share"in navigator,Ju=Object.freeze({sm:640,md:768,lg:1024,xl:1280,"2xl":1536});function Xu(t){if(typeof window>"u")return!1;let e=Ju[t];return typeof e!="number"?(console.warn(`Invalid breakpoint: ${t}`),!1):window.matchMedia(`(min-width: ${e}px)`).matches}function es(){return Xu("sm")}var si=class{#e;#t;#r;#i;#n=!1;constructor(e,r,i,n=window.history){this.#e=e,this.#t=r,this.#r=i,this.#i=n,e.addController(this)}hostConnected(){this.#s();let e=this.#i.pushState;this.#i.pushState=(...r)=>{if(e.call(this.#i,...r),!this.#n)try{let i=new URL(r[2],window.location.origin);this.#t.test(i.pathname)&&this.#r.navigated()}catch{}}}hostDisconnected(){this.#n=!0}#s=()=>{this.#t.test(window.location.pathname)&&this.#r.navigated()}};function Ga({minMs:t,maxMs:e}){return Math.random()*(e-t)+t}function oi(t,e=""){return Object.entries(t).filter(([r,i])=>i).map(([r,i])=>`${e}${r}-[${i}]`).join(" ")}function Za(t,e={}){return[oi(t),oi(e,"max-sm:")].join(" ")}function Ka(t){return oi(t)}function Ja(t){return Object.entries(t).filter(([e,r])=>r).filter(([e])=>e==="left"||e==="right").map(([e,r])=>{let i=`sm:${e}-[${r}]`;return e==="left"&&(i+=" sm:right-auto"),e==="right"&&(i+=" sm:left-auto"),i}).join(" ")}function Xa(t){let e=oi(t),i=`sm:bottom-[${t.bottom?`calc(${t.bottom}+72px)`:"72px"}]`;return[e,i].filter(Boolean).join(" ")}var ts=class{#e=0;#t=!1;#r;#i;constructor(e,r,{threshold:i=5}={}){this.#r=r,this.#i=i,e.addController(this)}hostConnected(){this.#e=window.scrollY,window.addEventListener("scroll",this.#n,{passive:!0})}hostDisconnected(){window.removeEventListener("scroll",this.#n)}#n=()=>{this.#t||(requestAnimationFrame(this.#s),this.#t=!0)};#s=()=>{let e=window.scrollY,r=e-this.#e;if(Math.abs(r)>=this.#i){let i=r>0?"down":"up";this.#r({scrollY:e,direction:i,deltaY:Math.abs(r)}),this.#e=e}this.#t=!1}};function Ya(t,e,r){return new ts(t,e,r)}var ye=class extends k(v){static styles=O`
|
|
2949
2954
|
:host {
|
|
2950
2955
|
all: initial; /* reset all properties that can pierce the shadow DOM */
|
|
2951
2956
|
}
|
|
2952
|
-
`;static properties={cdn:{type:String},widgetId:{type:String,attribute:"widget"},xUserData:{type:Object,attribute:!1},xCustomInstructions:{type:String,attribute:!1},_floatingInputVisible:{type:Boolean,state:!0},_dialogShown:{type:Boolean,state:!0}};constructor(){super(),this.cdn="https://widget.molin.ai",this.widgetId="",this._floatingInputVisible=!0,this._dialogShown=!1,this.xUserData
|
|
2957
|
+
`;static properties={cdn:{type:String},widgetId:{type:String,attribute:"widget"},xUserData:{type:Object,attribute:!1},xCustomInstructions:{type:String,attribute:!1},_floatingInputVisible:{type:Boolean,state:!0},_dialogShown:{type:Boolean,state:!0}};constructor(){super(),this.cdn="https://widget.molin.ai",this.widgetId="",this._floatingInputVisible=!0,this._dialogShown=!1,this.xUserData=$e()?.userData,this.xCustomInstructions=$e()?.customInstructions}#e=mt(this);#t=Ya(this,e=>{this.#a&&!this._dialogShown&&(e.direction==="down"?this._floatingInputVisible=!1:e.direction==="up"&&(this._floatingInputVisible=!0),this.requestUpdate())},{threshold:20});get config(){return this.#r||this.#e.data}#r;#i=new si(this,/.*/i,{navigated:()=>{if(this.requestUpdate(),!this.widgetId){console.warn("No widgetId set, cannot track page view");return}let e=this.#l?.conversationId,r=et.restore(this.widgetId)?.conversationId,i=e||r;i&&j("ShopAssistant: pageview",{widgetId:this.widgetId,conversationId:i,url:document.location.href,title:document.title,hidden:this.config?this.config.hidden||!1:void 0,shouldHideForCurrentUrl:this.#d})}});#n=!1;#s={onError:e=>{alert(e.error),console.error(e.widgetId,e.error),j("ShopAssistant: error",{...e},{immediate:!0})},onNewMessageStartedStreaming:e=>{j("ShopAssistant: user received bot message (streaming started)",e)},onMessageEndedStreaming:e=>{j("ShopAssistant: user received bot message (streaming ended)",e)},onUserCanceledStreaming:e=>{j("ShopAssistant: user canceled streaming",e)},onUserClickedLink:e=>{j("ShopAssistant: user clicked link",e)},onUserSentInput:e=>{j("ShopAssistant: user sent input",e)},onWaitGameQuestionAnswered:e=>{j("ShopAssistant: wait game question answered",e)},onWaitGameCompleted:e=>{j("ShopAssistant: wait game completed",e)},onWaitGameGuessValidated:e=>{j("ShopAssistant: wait game guess validated",e)}};get#o(){return typeof this.config?.bubble?.zIndex=="number"?this.config.bubble.zIndex:2147483647}get#a(){return this.config?.floatingAskAI?.enabled||!0}get#d(){if(!this.config?.hideUrls||!Array.isArray(this.config.hideUrls))return!1;let e=window.location.href,r=window.location.pathname;return this.config.hideUrls.some(i=>{if(!i||typeof i!="string")return!1;let n=i.endsWith("*"),s=n?i.slice(0,-1):i;return i.startsWith("http")?n?e.startsWith(s):e===s:n?r.startsWith(s):r===s})}render(){if(!this.config)return null;let e=Za(this.config.bubble.position,this.config.bubble.mobilePosition),r=Ka(this.config.bubble.position),i=Ja(this.config.bubble.position),n=Xa(this.config.bubble.position);return this.config.hidden||ni().hidden||this.#d?null:u`
|
|
2953
2958
|
<mw-context-widget
|
|
2954
2959
|
.widgetId="${this.widgetId}"
|
|
2955
2960
|
.config="${this.config}"
|
|
@@ -2959,7 +2964,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2959
2964
|
.autoConnect="${this.#n}">
|
|
2960
2965
|
<mw-bubble
|
|
2961
2966
|
class="${e} ${this._dialogShown?"opacity-0":"opacity-100"} fixed z-[${this.#o}] transition-opacity"
|
|
2962
|
-
@click="${this.#
|
|
2967
|
+
@click="${this.#f}"
|
|
2963
2968
|
state="${this._dialogShown?"close":"open"}"
|
|
2964
2969
|
.color="${this.config?.bubble?.color||this.config?.color}"
|
|
2965
2970
|
.bubbleStyle="${this.config?.bubble?.style}"
|
|
@@ -2971,11 +2976,11 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2971
2976
|
${this.isPopupEnabled?u`
|
|
2972
2977
|
<mw-popup
|
|
2973
2978
|
position="${n}"
|
|
2974
|
-
delay="${this.config.popup?.delayMs||
|
|
2979
|
+
delay="${this.config.popup?.delayMs||Ga({minMs:2e3,maxMs:5e3})}"
|
|
2975
2980
|
sound="${this.config.popup?.muteSounds?"":this.config.popup?.soundUrl||""}"
|
|
2976
2981
|
?dark-mode="${this.config?.darkMode}"
|
|
2977
2982
|
.content="${{desktop:{text:this.config.popup?.text||"Hello there. How can we help?",color:this.config?.bubble?.color||this.config.color},mobile:{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}}}"
|
|
2978
|
-
@mw:click="${this.#
|
|
2983
|
+
@mw:click="${this.#p}"></mw-popup>
|
|
2979
2984
|
`:null}
|
|
2980
2985
|
|
|
2981
2986
|
<!-- show "Try it out" if enabled (even if the chat window is showing) -->
|
|
@@ -2989,7 +2994,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
2989
2994
|
<!-- 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. -->
|
|
2990
2995
|
<div
|
|
2991
2996
|
class="${this._dialogShown?"visible opacity-100 translate-y-0":"invisible opacity-0 translate-y-3"} ${i} ${this.config?.darkMode?"bg-[#14161A]":"bg-white"} fixed inset-0 z-[2147483647] font-sans text-[16px] leading-normal text-gray-800 shadow-2xl transition-all sm:top-auto sm:bottom-6 sm:h-[92%] sm:max-h-[800px] sm:w-[calc(100dvh*0.50)] sm:max-w-[400px] sm:min-w-[300px] sm:rounded-[36px] 2xl:max-w-[420px]">
|
|
2992
|
-
<mw-chat ?show-close="${!0}" @mw:close-click="${this.#
|
|
2997
|
+
<mw-chat ?show-close="${!0}" @mw:close-click="${this.#w}">
|
|
2993
2998
|
<slot name="banner" slot="banner"></slot>
|
|
2994
2999
|
</mw-chat>
|
|
2995
3000
|
</div>
|
|
@@ -3005,7 +3010,7 @@ var Ka=Object.create;var ts=Object.defineProperty;var Xa=Object.getOwnPropertyDe
|
|
|
3005
3010
|
@mw-floating-ask-ai:submit="${this.#x}"></mw-floating-ask-ai>
|
|
3006
3011
|
`:null}
|
|
3007
3012
|
</mw-context-widget>
|
|
3008
|
-
`}get isPopupEnabled(){return
|
|
3013
|
+
`}get isPopupEnabled(){return es()?!!this.config?.popup?.desktopEnabled:!!this.config?.popup?.mobileEnabled}updated(){this._dialogShown&&this.#c?.hide(),this._dialogShown&&setTimeout(()=>{this.#l?.focusInput()},0)}firstUpdated(){es()&&R.widgetState?.isOpen&&!this._dialogShown&&(this._dialogShown=!0,this.#n=!0,this.requestUpdate())}get#c(){return this.renderRoot.querySelector("mw-popup")}get#l(){return this.renderRoot.querySelector("mw-chat")}get#h(){return this.renderRoot.querySelector("mw-context-widget")}#p(){this._dialogShown=!0,this.#n=!0,this.requestUpdate(),this.#u(!0),j("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"popup-click",state:this._dialogShown?"open":"close"})}#f(){this._dialogShown=!this._dialogShown,this.#n=!0,this.requestUpdate(),this.#u(this._dialogShown),this.#c?.hide(),j("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"bubble-toggle",state:this._dialogShown?"open":"close"})}#w(){this._dialogShown=!1,this._floatingInputVisible=!0,this.requestUpdate(),this.#u(!1),j("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"top-right-close-button",state:this._dialogShown?"open":"close"})}#x=e=>{let r=e.detail.text,i=this.#h;i&&typeof i.connect=="function"&&i.connect(),this._dialogShown=!0,this.#n=!0,this.requestUpdate(),this.#u(!0),setTimeout(()=>{this.#y(r),this.#b(r).catch(console.warn)},100),j("ShopAssistant: user sent input",{widgetId:this.widgetId,text:r,example:!1,conversationId:this.#l?.conversationId||"",source:"ask-ai"})};#v=Ze({interval:200},({message:e,autoSend:r=!1}={})=>{if(!e)return;this.#y(e);let i=this.#l?.isLiveMode;i||this.reset(),r&&!i&&this.#b(e).catch(console.warn)});openChat(e){let{message:r,autoSend:i}=e||{};if(this._dialogShown){this.#v({message:r,autoSend:i});return}let n=this.#h;n&&typeof n.connect=="function"&&n.connect(),this._dialogShown=!0,this.#n=!0,this.requestUpdate(),this.#u(!0),this.#c?.hide(),setTimeout(()=>{this.#v({message:r,autoSend:i})},100),j("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"programmatic-method",state:this._dialogShown?"open":"close"})}closeChat(){this._dialogShown&&(this._dialogShown=!1,this._floatingInputVisible=!0,this.requestUpdate(),this.#u(!1),this.#c?.hide(),j("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"programmatic-method",state:this._dialogShown?"open":"close"}))}showLauncher(){let e=ni();e.hidden=!1,this.requestUpdate(),j("ShopAssistant: called show launcher",{widgetId:this.widgetId,source:"programmatic-method"})}hideLauncher(){let e=ni();e.hidden=!0,this.requestUpdate(),j("ShopAssistant: called hide launcher",{widgetId:this.widgetId,source:"programmatic-method"})}injectConfig(e){this.#r=e,this.requestUpdate()}reset(){this.xUserData={},this.xCustomInstructions="",this.#l?.reset(),this.requestUpdate()}async#b(e){let r=this.#l;if(!r){console.warn("Chat element not found, cannot send message");return}r.sendMessage?await r.sendMessage(e):console.warn("Chat element does not have sendMessage method")}#y(e){let r=this.#l;if(!r){console.warn("Chat element not found, cannot set input value");return}r.setInputValue?r.setInputValue(e):console.warn("Chat element does not have setInputValue method")}#u(e){R.widgetState={isOpen:e}}};customElements.get("molin-shop-ai")||customElements.define("molin-shop-ai",ye);export{ye as MolinShopAI};
|
|
3009
3014
|
/*! Bundled license information:
|
|
3010
3015
|
|
|
3011
3016
|
@lit/reactive-element/css-tag.js:
|