@molin.ai/shop-ai 0.9.38 → 0.9.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
- var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDescriptor;var Ea=Object.getOwnPropertyNames;var _a=Object.getPrototypeOf,Ma=Object.prototype.hasOwnProperty;var ft=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ia=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ea(e))!Ma.call(t,i)&&i!==r&&Pi(t,i,{get:()=>e[i],enumerable:!(n=Sa(e,i))||n.enumerable});return t};var Aa=(t,e,r)=>(r=t!=null?$a(_a(t)):{},Ia(e||!t||!t.__esModule?Pi(r,"default",{value:t,enumerable:!0}):r,t));var wo=ft(je=>{"use strict";var ec=je&&je.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function c(h){try{a(n.next(h))}catch(d){o(d)}}function l(h){try{a(n.throw(h))}catch(d){o(d)}}function a(h){h.done?s(h.value):i(h.value).then(c,l)}a((n=n.apply(t,e||[])).next())})},tc=je&&je.__generator||function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=c(0),o.throw=c(1),o.return=c(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(a){return function(h){return l([a,h])}}function l(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(r=0)),r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(je,"__esModule",{value:!0});je.base64ToBlob=rc;function rc(t){return ec(this,void 0,void 0,function(){var e,r,n;return tc(this,function(i){switch(i.label){case 0:return[4,fetch(t)];case 1:return e=i.sent(),[4,e.blob()];case 2:return r=i.sent(),n=ic(t),n&&(r=r.slice(0,r.size,n)),[2,r]}})})}var nc=/^data:(.+);base64,/;function ic(t){var e;return(e=t.match(nc))===null||e===void 0?void 0:e.slice(1,2).pop()}});var yo=ft(De=>{"use strict";var sc=De&&De.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function c(h){try{a(n.next(h))}catch(d){o(d)}}function l(h){try{a(n.throw(h))}catch(d){o(d)}}function a(h){h.done?s(h.value):i(h.value).then(c,l)}a((n=n.apply(t,e||[])).next())})},oc=De&&De.__generator||function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=c(0),o.throw=c(1),o.return=c(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(a){return function(h){return l([a,h])}}function l(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(r=0)),r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(De,"__esModule",{value:!0});De.base64ToFile=ac;function ac(t,e,r){return sc(this,void 0,void 0,function(){var n,i;return oc(this,function(s){switch(s.label){case 0:return[4,fetch(t)];case 1:return n=s.sent(),[4,n.blob()];case 2:return i=s.sent(),[2,new File([i],e,r)]}})})}});var Xn=ft(Oe=>{"use strict";var Yn=Oe&&Oe.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function c(h){try{a(n.next(h))}catch(d){o(d)}}function l(h){try{a(n.throw(h))}catch(d){o(d)}}function a(h){h.done?s(h.value):i(h.value).then(c,l)}a((n=n.apply(t,e||[])).next())})},Qn=Oe&&Oe.__generator||function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=c(0),o.throw=c(1),o.return=c(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(a){return function(h){return l([a,h])}}function l(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(r=0)),r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.blobToBase64=lc;function lc(t){return Yn(this,void 0,void 0,function(){return Qn(this,function(e){return[2,typeof FileReader=="function"?cc(t):hc(t)]})})}var tt;(function(t){t.error="error",t.loadend="loadend"})(tt||(tt={}));function cc(t){return Yn(this,void 0,void 0,function(){return Qn(this,function(e){return[2,new Promise(function(r,n){try{var i=new FileReader,s=function(){r(i.result),i.removeEventListener(tt.loadend,s)};i.addEventListener(tt.loadend,s);var o=function(){n(i.error),i.removeEventListener(tt.error,o)};i.addEventListener(tt.error,o),i.readAsDataURL(t)}catch(c){n(c)}})]})})}var uc="application/octet-stream";function hc(t){return Yn(this,void 0,void 0,function(){var e,r,n,i;return Qn(this,function(s){switch(s.label){case 0:return n=(r=Buffer).from,[4,t.text()];case 1:return e=n.apply(r,[s.sent()]),i=t.type||uc,[2,"data:".concat(i,";base64,").concat(e.toString("base64"))]}})})}});var vo=ft(xr=>{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.fileToBase64=void 0;var dc=Xn();Object.defineProperty(xr,"fileToBase64",{enumerable:!0,get:function(){return dc.blobToBase64}})});var bo=ft(ie=>{"use strict";var pc=ie&&ie.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),kr=ie&&ie.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&pc(e,t,r)};Object.defineProperty(ie,"__esModule",{value:!0});kr(wo(),ie);kr(yo(),ie);kr(Xn(),ie);kr(vo(),ie)});var Vt=globalThis,Ft=Vt.ShadowRoot&&(Vt.ShadyCSS===void 0||Vt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Jr=Symbol(),Ri=new WeakMap,mt=class{constructor(e,r,n){if(this._$cssResult$=!0,n!==Jr)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(Ft&&e===void 0){let n=r!==void 0&&r.length===1;n&&(e=Ri.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Ri.set(r,e))}return e}toString(){return this.cssText}},Bi=t=>new mt(typeof t=="string"?t:t+"",void 0,Jr),D=(t,...e)=>{let r=t.length===1?t[0]:e.reduce(((n,i,s)=>n+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new mt(r,t,Jr)},qi=(t,e)=>{if(Ft)t.adoptedStyleSheets=e.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of e){let n=document.createElement("style"),i=Vt.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)}},Kr=Ft?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let n of e.cssRules)r+=n.cssText;return Bi(r)})(t):t;var{is:Ta,defineProperty:La,getOwnPropertyDescriptor:ja,getOwnPropertyNames:Da,getOwnPropertySymbols:Oa,getPrototypeOf:Ua}=Object,Nt=globalThis,Vi=Nt.trustedTypes,Pa=Vi?Vi.emptyScript:"",Ra=Nt.reactiveElementPolyfillSupport,gt=(t,e)=>t,Yr={toAttribute(t,e){switch(e){case Boolean:t=t?Pa: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}},Ni=(t,e)=>!Ta(t,e),Fi={attribute:!0,type:String,converter:Yr,reflect:!1,useDefault:!1,hasChanged:Ni};Symbol.metadata??=Symbol("metadata"),Nt.litPropertyMetadata??=new WeakMap;var le=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=Fi){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 n=Symbol(),i=this.getPropertyDescriptor(e,n,r);i!==void 0&&La(this.prototype,e,i)}}static getPropertyDescriptor(e,r,n){let{get:i,set:s}=ja(this.prototype,e)??{get(){return this[r]},set(o){this[r]=o}};return{get:i,set(o){let c=i?.call(this);s?.call(this,o),this.requestUpdate(e,c,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Fi}static _$Ei(){if(this.hasOwnProperty(gt("elementProperties")))return;let e=Ua(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(gt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(gt("properties"))){let r=this.properties,n=[...Da(r),...Oa(r)];for(let i of n)this.createProperty(i,r[i])}let e=this[Symbol.metadata];if(e!==null){let r=litPropertyMetadata.get(e);if(r!==void 0)for(let[n,i]of r)this.elementProperties.set(n,i)}this._$Eh=new Map;for(let[r,n]of this.elementProperties){let i=this._$Eu(r,n);i!==void 0&&this._$Eh.set(i,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let r=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let i of n)r.unshift(Kr(i))}else e!==void 0&&r.push(Kr(e));return r}static _$Eu(e,r){let n=r.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,r=this.constructor.elementProperties;for(let n of r.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return qi(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,r,n){this._$AK(e,n)}_$ET(e,r){let n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(i!==void 0&&n.reflect===!0){let s=(n.converter?.toAttribute!==void 0?n.converter:Yr).toAttribute(r,n.type);this._$Em=e,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(e,r){let n=this.constructor,i=n._$Eh.get(e);if(i!==void 0&&this._$Em!==i){let s=n.getPropertyOptions(i),o=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:Yr;this._$Em=i;let c=o.fromAttribute(r,s.type);this[i]=c??this._$Ej?.get(i)??c,this._$Em=null}}requestUpdate(e,r,n){if(e!==void 0){let i=this.constructor,s=this[e];if(n??=i.getPropertyOptions(e),!((n.hasChanged??Ni)(s,r)||n.useDefault&&n.reflect&&s===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,n))))return;this.C(e,r,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,r,{useDefault:n,reflect:i,wrapped:s},o){n&&!(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||n||(r=void 0),this._$AL.set(e,r)),i===!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[i,s]of this._$Ep)this[i]=s;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[i,s]of n){let{wrapped:o}=s,c=this[i];o!==!0||this._$AL.has(i)||c===void 0||this.C(i,void 0,s,c)}}let e=!1,r=this._$AL;try{e=this.shouldUpdate(r),e?(this.willUpdate(r),this._$EO?.forEach((n=>n.hostUpdate?.())),this.update(r)):this._$EM()}catch(n){throw e=!1,this._$EM(),n}e&&this._$AE(r)}willUpdate(e){}_$AE(e){this._$EO?.forEach((r=>r.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$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){}};le.elementStyles=[],le.shadowRootOptions={mode:"open"},le[gt("elementProperties")]=new Map,le[gt("finalized")]=new Map,Ra?.({ReactiveElement:le}),(Nt.reactiveElementVersions??=[]).push("2.1.1");var Xr=globalThis,Ht=Xr.trustedTypes,Hi=Ht?Ht.createPolicy("lit-html",{createHTML:t=>t}):void 0,en="$lit$",ce=`lit$${Math.random().toFixed(9).slice(2)}$`,tn="?"+ce,Ba=`<${tn}>`,Ee=document,yt=()=>Ee.createComment(""),vt=t=>t===null||typeof t!="object"&&typeof t!="function",rn=Array.isArray,Ki=t=>rn(t)||typeof t?.[Symbol.iterator]=="function",Qr=`[
2
- \f\r]`,wt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,zi=/-->/g,Wi=/>/g,$e=RegExp(`>|${Qr}(?:([^\\s"'>=/]+)(${Qr}*=${Qr}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Gi=/'/g,Zi=/"/g,Yi=/^(?:script|style|textarea|title)$/i,nn=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),u=nn(1),xu=nn(2),ku=nn(3),ee=Symbol.for("lit-noChange"),L=Symbol.for("lit-nothing"),Ji=new WeakMap,Se=Ee.createTreeWalker(Ee,129);function Qi(t,e){if(!rn(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Hi!==void 0?Hi.createHTML(e):e}var Xi=(t,e)=>{let r=t.length-1,n=[],i,s=e===2?"<svg>":e===3?"<math>":"",o=wt;for(let c=0;c<r;c++){let l=t[c],a,h,d=-1,f=0;for(;f<l.length&&(o.lastIndex=f,h=o.exec(l),h!==null);)f=o.lastIndex,o===wt?h[1]==="!--"?o=zi:h[1]!==void 0?o=Wi:h[2]!==void 0?(Yi.test(h[2])&&(i=RegExp("</"+h[2],"g")),o=$e):h[3]!==void 0&&(o=$e):o===$e?h[0]===">"?(o=i??wt,d=-1):h[1]===void 0?d=-2:(d=o.lastIndex-h[2].length,a=h[1],o=h[3]===void 0?$e:h[3]==='"'?Zi:Gi):o===Zi||o===Gi?o=$e:o===zi||o===Wi?o=wt:(o=$e,i=void 0);let p=o===$e&&t[c+1].startsWith("/>")?" ":"";s+=o===wt?l+Ba:d>=0?(n.push(a),l.slice(0,d)+en+l.slice(d)+ce+p):l+ce+(d===-2?c:p)}return[Qi(t,s+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},bt=class t{constructor({strings:e,_$litType$:r},n){let i;this.parts=[];let s=0,o=0,c=e.length-1,l=this.parts,[a,h]=Xi(e,r);if(this.el=t.createElement(a,n),Se.currentNode=this.el.content,r===2||r===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(i=Se.nextNode())!==null&&l.length<c;){if(i.nodeType===1){if(i.hasAttributes())for(let d of i.getAttributeNames())if(d.endsWith(en)){let f=h[o++],p=i.getAttribute(d).split(ce),y=/([.?@])?(.*)/.exec(f);l.push({type:1,index:s,name:y[2],strings:p,ctor:y[1]==="."?Wt:y[1]==="?"?Gt:y[1]==="@"?Zt:Me}),i.removeAttribute(d)}else d.startsWith(ce)&&(l.push({type:6,index:s}),i.removeAttribute(d));if(Yi.test(i.tagName)){let d=i.textContent.split(ce),f=d.length-1;if(f>0){i.textContent=Ht?Ht.emptyScript:"";for(let p=0;p<f;p++)i.append(d[p],yt()),Se.nextNode(),l.push({type:2,index:++s});i.append(d[f],yt())}}}else if(i.nodeType===8)if(i.data===tn)l.push({type:2,index:s});else{let d=-1;for(;(d=i.data.indexOf(ce,d+1))!==-1;)l.push({type:7,index:s}),d+=ce.length-1}s++}}static createElement(e,r){let n=Ee.createElement("template");return n.innerHTML=e,n}};function _e(t,e,r=t,n){if(e===ee)return e;let i=n!==void 0?r._$Co?.[n]:r._$Cl,s=vt(e)?void 0:e._$litDirective$;return i?.constructor!==s&&(i?._$AO?.(!1),s===void 0?i=void 0:(i=new s(t),i._$AT(t,r,n)),n!==void 0?(r._$Co??=[])[n]=i:r._$Cl=i),i!==void 0&&(e=_e(t,i._$AS(t,e.values),i,n)),e}var zt=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:r},parts:n}=this._$AD,i=(e?.creationScope??Ee).importNode(r,!0);Se.currentNode=i;let s=Se.nextNode(),o=0,c=0,l=n[0];for(;l!==void 0;){if(o===l.index){let a;l.type===2?a=new Be(s,s.nextSibling,this,e):l.type===1?a=new l.ctor(s,l.name,l.strings,this,e):l.type===6&&(a=new Jt(s,this,e)),this._$AV.push(a),l=n[++c]}o!==l?.index&&(s=Se.nextNode(),o++)}return Se.currentNode=Ee,i}p(e){let r=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,r),r+=n.strings.length-2):n._$AI(e[r])),r++}},Be=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,n,i){this.type=2,this._$AH=L,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=_e(this,e,r),vt(e)?e===L||e==null||e===""?(this._$AH!==L&&this._$AR(),this._$AH=L):e!==this._$AH&&e!==ee&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ki(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!==L&&vt(this._$AH)?this._$AA.nextSibling.data=e:this.T(Ee.createTextNode(e)),this._$AH=e}$(e){let{values:r,_$litType$:n}=e,i=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=bt.createElement(Qi(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(r);else{let s=new zt(i,this),o=s.u(this.options);s.p(r),this.T(o),this._$AH=s}}_$AC(e){let r=Ji.get(e.strings);return r===void 0&&Ji.set(e.strings,r=new bt(e)),r}k(e){rn(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,n,i=0;for(let s of e)i===r.length?r.push(n=new t(this.O(yt()),this.O(yt()),this,this.options)):n=r[i],n._$AI(s),i++;i<r.length&&(this._$AR(n&&n._$AB.nextSibling,i),r.length=i)}_$AR(e=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);e!==this._$AB;){let n=e.nextSibling;e.remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},Me=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,n,i,s){this.type=1,this._$AH=L,this._$AN=void 0,this.element=e,this.name=r,this._$AM=i,this.options=s,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=L}_$AI(e,r=this,n,i){let s=this.strings,o=!1;if(s===void 0)e=_e(this,e,r,0),o=!vt(e)||e!==this._$AH&&e!==ee,o&&(this._$AH=e);else{let c=e,l,a;for(e=s[0],l=0;l<s.length-1;l++)a=_e(this,c[n+l],r,l),a===ee&&(a=this._$AH[l]),o||=!vt(a)||a!==this._$AH[l],a===L?e=L:e!==L&&(e+=(a??"")+s[l+1]),this._$AH[l]=a}o&&!i&&this.j(e)}j(e){e===L?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Wt=class extends Me{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===L?void 0:e}},Gt=class extends Me{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==L)}},Zt=class extends Me{constructor(e,r,n,i,s){super(e,r,n,i,s),this.type=5}_$AI(e,r=this){if((e=_e(this,e,r,0)??L)===ee)return;let n=this._$AH,i=e===L&&n!==L||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,s=e!==L&&(n===L||i);i&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Jt=class{constructor(e,r,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){_e(this,e)}},es={M:en,P:ce,A:tn,C:1,L:Xi,R:zt,D:Ki,V:_e,I:Be,H:Me,N:Gt,U:Zt,B:Wt,F:Jt},qa=Xr.litHtmlPolyfillSupport;qa?.(bt,Be),(Xr.litHtmlVersions??=[]).push("3.3.1");var ts=(t,e,r)=>{let n=r?.renderBefore??e,i=n._$litPart$;if(i===void 0){let s=r?.renderBefore??null;n._$litPart$=i=new Be(e.insertBefore(yt(),s),s,void 0,r??{})}return i._$AI(t),i};var sn=globalThis,v=class extends le{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=ts(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ee}};v._$litElement$=!0,v.finalized=!0,sn.litElementHydrateSupport?.({LitElement:v});var Va=sn.litElementPolyfillSupport;Va?.({LitElement:v});(sn.litElementVersions??=[]).push("4.2.1");var Kt=class t extends HTMLElement{static observedAttributes=["name"];constructor(){super(),this.attachShadow({mode:"open"})}attributeChangedCallback(e,r,n){if(r!==n&&t.observedAttributes.includes(e)){switch(e){case"name":this.name=n||"";break}this.render()}}resolveIcon(e){throw new Error("Not implemented")}render(){let e=document.createElement("style");for(e.textContent=`
1
+ var Ta=Object.create;var Ri=Object.defineProperty;var La=Object.getOwnPropertyDescriptor;var ja=Object.getOwnPropertyNames;var Da=Object.getPrototypeOf,Oa=Object.prototype.hasOwnProperty;var ht=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ua=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ja(e))!Oa.call(t,i)&&i!==r&&Ri(t,i,{get:()=>e[i],enumerable:!(n=La(e,i))||n.enumerable});return t};var Pa=(t,e,r)=>(r=t!=null?Ta(Da(t)):{},Ua(e||!t||!t.__esModule?Ri(r,"default",{value:t,enumerable:!0}):r,t));var xo=ht(je=>{"use strict";var sc=je&&je.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(h){o(h)}}function l(u){try{c(n.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):i(u.value).then(a,l)}c((n=n.apply(t,e||[])).next())})},oc=je&&je.__generator||function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,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(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(r=0)),r;)try{if(n=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=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++,i=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(u){c=[6,u],i=0}finally{n=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(je,"__esModule",{value:!0});je.base64ToBlob=ac;function ac(t){return sc(this,void 0,void 0,function(){var e,r,n;return oc(this,function(i){switch(i.label){case 0:return[4,fetch(t)];case 1:return e=i.sent(),[4,e.blob()];case 2:return r=i.sent(),n=cc(t),n&&(r=r.slice(0,r.size,n)),[2,r]}})})}var lc=/^data:(.+);base64,/;function cc(t){var e;return(e=t.match(lc))===null||e===void 0?void 0:e.slice(1,2).pop()}});var ko=ht(De=>{"use strict";var uc=De&&De.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(h){o(h)}}function l(u){try{c(n.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):i(u.value).then(a,l)}c((n=n.apply(t,e||[])).next())})},dc=De&&De.__generator||function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,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(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(r=0)),r;)try{if(n=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=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++,i=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(u){c=[6,u],i=0}finally{n=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(De,"__esModule",{value:!0});De.base64ToFile=hc;function hc(t,e,r){return uc(this,void 0,void 0,function(){var n,i;return dc(this,function(s){switch(s.label){case 0:return[4,fetch(t)];case 1:return n=s.sent(),[4,n.blob()];case 2:return i=s.sent(),[2,new File([i],e,r)]}})})}});var ei=ht(Oe=>{"use strict";var Xn=Oe&&Oe.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(h){o(h)}}function l(u){try{c(n.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):i(u.value).then(a,l)}c((n=n.apply(t,e||[])).next())})},Qn=Oe&&Oe.__generator||function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,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(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(r=0)),r;)try{if(n=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=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++,i=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(u){c=[6,u],i=0}finally{n=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.blobToBase64=pc;function pc(t){return Xn(this,void 0,void 0,function(){return Qn(this,function(e){return[2,typeof FileReader=="function"?fc(t):gc(t)]})})}var Qe;(function(t){t.error="error",t.loadend="loadend"})(Qe||(Qe={}));function fc(t){return Xn(this,void 0,void 0,function(){return Qn(this,function(e){return[2,new Promise(function(r,n){try{var i=new FileReader,s=function(){r(i.result),i.removeEventListener(Qe.loadend,s)};i.addEventListener(Qe.loadend,s);var o=function(){n(i.error),i.removeEventListener(Qe.error,o)};i.addEventListener(Qe.error,o),i.readAsDataURL(t)}catch(a){n(a)}})]})})}var mc="application/octet-stream";function gc(t){return Xn(this,void 0,void 0,function(){var e,r,n,i;return Qn(this,function(s){switch(s.label){case 0:return n=(r=Buffer).from,[4,t.text()];case 1:return e=n.apply(r,[s.sent()]),i=t.type||mc,[2,"data:".concat(i,";base64,").concat(e.toString("base64"))]}})})}});var Co=ht(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.fileToBase64=void 0;var wc=ei();Object.defineProperty(Cr,"fileToBase64",{enumerable:!0,get:function(){return wc.blobToBase64}})});var $o=ht(oe=>{"use strict";var yc=oe&&oe.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),$r=oe&&oe.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&yc(e,t,r)};Object.defineProperty(oe,"__esModule",{value:!0});$r(xo(),oe);$r(ko(),oe);$r(ei(),oe);$r(Co(),oe)});var Vt=globalThis,Nt=Vt.ShadowRoot&&(Vt.ShadyCSS===void 0||Vt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Yr=Symbol(),Bi=new WeakMap,pt=class{constructor(e,r,n){if(this._$cssResult$=!0,n!==Yr)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(Nt&&e===void 0){let n=r!==void 0&&r.length===1;n&&(e=Bi.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Bi.set(r,e))}return e}toString(){return this.cssText}},qi=t=>new pt(typeof t=="string"?t:t+"",void 0,Yr),L=(t,...e)=>{let r=t.length===1?t[0]:e.reduce(((n,i,s)=>n+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new pt(r,t,Yr)},Fi=(t,e)=>{if(Nt)t.adoptedStyleSheets=e.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of e){let n=document.createElement("style"),i=Vt.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)}},Xr=Nt?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let n of e.cssRules)r+=n.cssText;return qi(r)})(t):t;var{is:Ra,defineProperty:Ba,getOwnPropertyDescriptor:qa,getOwnPropertyNames:Fa,getOwnPropertySymbols:Va,getPrototypeOf:Na}=Object,Ht=globalThis,Vi=Ht.trustedTypes,Ha=Vi?Vi.emptyScript:"",za=Ht.reactiveElementPolyfillSupport,ft=(t,e)=>t,Qr={toAttribute(t,e){switch(e){case Boolean:t=t?Ha: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}},Hi=(t,e)=>!Ra(t,e),Ni={attribute:!0,type:String,converter:Qr,reflect:!1,useDefault:!1,hasChanged:Hi};Symbol.metadata??=Symbol("metadata"),Ht.litPropertyMetadata??=new WeakMap;var ue=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=Ni){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 n=Symbol(),i=this.getPropertyDescriptor(e,n,r);i!==void 0&&Ba(this.prototype,e,i)}}static getPropertyDescriptor(e,r,n){let{get:i,set:s}=qa(this.prototype,e)??{get(){return this[r]},set(o){this[r]=o}};return{get:i,set(o){let a=i?.call(this);s?.call(this,o),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Ni}static _$Ei(){if(this.hasOwnProperty(ft("elementProperties")))return;let e=Na(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(ft("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ft("properties"))){let r=this.properties,n=[...Fa(r),...Va(r)];for(let i of n)this.createProperty(i,r[i])}let e=this[Symbol.metadata];if(e!==null){let r=litPropertyMetadata.get(e);if(r!==void 0)for(let[n,i]of r)this.elementProperties.set(n,i)}this._$Eh=new Map;for(let[r,n]of this.elementProperties){let i=this._$Eu(r,n);i!==void 0&&this._$Eh.set(i,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let r=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let i of n)r.unshift(Xr(i))}else e!==void 0&&r.push(Xr(e));return r}static _$Eu(e,r){let n=r.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,r=this.constructor.elementProperties;for(let n of r.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Fi(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,r,n){this._$AK(e,n)}_$ET(e,r){let n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(i!==void 0&&n.reflect===!0){let s=(n.converter?.toAttribute!==void 0?n.converter:Qr).toAttribute(r,n.type);this._$Em=e,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(e,r){let n=this.constructor,i=n._$Eh.get(e);if(i!==void 0&&this._$Em!==i){let s=n.getPropertyOptions(i),o=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:Qr;this._$Em=i;let a=o.fromAttribute(r,s.type);this[i]=a??this._$Ej?.get(i)??a,this._$Em=null}}requestUpdate(e,r,n){if(e!==void 0){let i=this.constructor,s=this[e];if(n??=i.getPropertyOptions(e),!((n.hasChanged??Hi)(s,r)||n.useDefault&&n.reflect&&s===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,n))))return;this.C(e,r,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,r,{useDefault:n,reflect:i,wrapped:s},o){n&&!(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||n||(r=void 0),this._$AL.set(e,r)),i===!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[i,s]of this._$Ep)this[i]=s;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[i,s]of n){let{wrapped:o}=s,a=this[i];o!==!0||this._$AL.has(i)||a===void 0||this.C(i,void 0,s,a)}}let e=!1,r=this._$AL;try{e=this.shouldUpdate(r),e?(this.willUpdate(r),this._$EO?.forEach((n=>n.hostUpdate?.())),this.update(r)):this._$EM()}catch(n){throw e=!1,this._$EM(),n}e&&this._$AE(r)}willUpdate(e){}_$AE(e){this._$EO?.forEach((r=>r.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$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){}};ue.elementStyles=[],ue.shadowRootOptions={mode:"open"},ue[ft("elementProperties")]=new Map,ue[ft("finalized")]=new Map,za?.({ReactiveElement:ue}),(Ht.reactiveElementVersions??=[]).push("2.1.1");var tn=globalThis,zt=tn.trustedTypes,zi=zt?zt.createPolicy("lit-html",{createHTML:t=>t}):void 0,rn="$lit$",de=`lit$${Math.random().toFixed(9).slice(2)}$`,nn="?"+de,Wa=`<${nn}>`,Ee=document,gt=()=>Ee.createComment(""),wt=t=>t===null||typeof t!="object"&&typeof t!="function",sn=Array.isArray,Yi=t=>sn(t)||typeof t?.[Symbol.iterator]=="function",en=`[
2
+ \f\r]`,mt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Wi=/-->/g,Gi=/>/g,$e=RegExp(`>|${en}(?:([^\\s"'>=/]+)(${en}*=${en}*(?:[^
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Zi=/'/g,Ki=/"/g,Xi=/^(?:script|style|textarea|title)$/i,on=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),d=on(1),Iu=on(2),Au=on(3),te=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),Ji=new WeakMap,Se=Ee.createTreeWalker(Ee,129);function Qi(t,e){if(!sn(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return zi!==void 0?zi.createHTML(e):e}var es=(t,e)=>{let r=t.length-1,n=[],i,s=e===2?"<svg>":e===3?"<math>":"",o=mt;for(let a=0;a<r;a++){let l=t[a],c,u,h=-1,p=0;for(;p<l.length&&(o.lastIndex=p,u=o.exec(l),u!==null);)p=o.lastIndex,o===mt?u[1]==="!--"?o=Wi:u[1]!==void 0?o=Gi:u[2]!==void 0?(Xi.test(u[2])&&(i=RegExp("</"+u[2],"g")),o=$e):u[3]!==void 0&&(o=$e):o===$e?u[0]===">"?(o=i??mt,h=-1):u[1]===void 0?h=-2:(h=o.lastIndex-u[2].length,c=u[1],o=u[3]===void 0?$e:u[3]==='"'?Ki:Zi):o===Ki||o===Zi?o=$e:o===Wi||o===Gi?o=mt:(o=$e,i=void 0);let y=o===$e&&t[a+1].startsWith("/>")?" ":"";s+=o===mt?l+Wa:h>=0?(n.push(c),l.slice(0,h)+rn+l.slice(h)+de+y):l+de+(h===-2?a:y)}return[Qi(t,s+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},yt=class t{constructor({strings:e,_$litType$:r},n){let i;this.parts=[];let s=0,o=0,a=e.length-1,l=this.parts,[c,u]=es(e,r);if(this.el=t.createElement(c,n),Se.currentNode=this.el.content,r===2||r===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=Se.nextNode())!==null&&l.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(let h of i.getAttributeNames())if(h.endsWith(rn)){let p=u[o++],y=i.getAttribute(h).split(de),g=/([.?@])?(.*)/.exec(p);l.push({type:1,index:s,name:g[2],strings:y,ctor:g[1]==="."?Gt:g[1]==="?"?Zt:g[1]==="@"?Kt:Me}),i.removeAttribute(h)}else h.startsWith(de)&&(l.push({type:6,index:s}),i.removeAttribute(h));if(Xi.test(i.tagName)){let h=i.textContent.split(de),p=h.length-1;if(p>0){i.textContent=zt?zt.emptyScript:"";for(let y=0;y<p;y++)i.append(h[y],gt()),Se.nextNode(),l.push({type:2,index:++s});i.append(h[p],gt())}}}else if(i.nodeType===8)if(i.data===nn)l.push({type:2,index:s});else{let h=-1;for(;(h=i.data.indexOf(de,h+1))!==-1;)l.push({type:7,index:s}),h+=de.length-1}s++}}static createElement(e,r){let n=Ee.createElement("template");return n.innerHTML=e,n}};function _e(t,e,r=t,n){if(e===te)return e;let i=n!==void 0?r._$Co?.[n]:r._$Cl,s=wt(e)?void 0:e._$litDirective$;return i?.constructor!==s&&(i?._$AO?.(!1),s===void 0?i=void 0:(i=new s(t),i._$AT(t,r,n)),n!==void 0?(r._$Co??=[])[n]=i:r._$Cl=i),i!==void 0&&(e=_e(t,i._$AS(t,e.values),i,n)),e}var Wt=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:r},parts:n}=this._$AD,i=(e?.creationScope??Ee).importNode(r,!0);Se.currentNode=i;let s=Se.nextNode(),o=0,a=0,l=n[0];for(;l!==void 0;){if(o===l.index){let c;l.type===2?c=new Be(s,s.nextSibling,this,e):l.type===1?c=new l.ctor(s,l.name,l.strings,this,e):l.type===6&&(c=new Jt(s,this,e)),this._$AV.push(c),l=n[++a]}o!==l?.index&&(s=Se.nextNode(),o++)}return Se.currentNode=Ee,i}p(e){let r=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,r),r+=n.strings.length-2):n._$AI(e[r])),r++}},Be=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,n,i){this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=_e(this,e,r),wt(e)?e===j||e==null||e===""?(this._$AH!==j&&this._$AR(),this._$AH=j):e!==this._$AH&&e!==te&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Yi(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==j&&wt(this._$AH)?this._$AA.nextSibling.data=e:this.T(Ee.createTextNode(e)),this._$AH=e}$(e){let{values:r,_$litType$:n}=e,i=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=yt.createElement(Qi(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(r);else{let s=new Wt(i,this),o=s.u(this.options);s.p(r),this.T(o),this._$AH=s}}_$AC(e){let r=Ji.get(e.strings);return r===void 0&&Ji.set(e.strings,r=new yt(e)),r}k(e){sn(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,n,i=0;for(let s of e)i===r.length?r.push(n=new t(this.O(gt()),this.O(gt()),this,this.options)):n=r[i],n._$AI(s),i++;i<r.length&&(this._$AR(n&&n._$AB.nextSibling,i),r.length=i)}_$AR(e=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);e!==this._$AB;){let n=e.nextSibling;e.remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},Me=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,n,i,s){this.type=1,this._$AH=j,this._$AN=void 0,this.element=e,this.name=r,this._$AM=i,this.options=s,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=j}_$AI(e,r=this,n,i){let s=this.strings,o=!1;if(s===void 0)e=_e(this,e,r,0),o=!wt(e)||e!==this._$AH&&e!==te,o&&(this._$AH=e);else{let a=e,l,c;for(e=s[0],l=0;l<s.length-1;l++)c=_e(this,a[n+l],r,l),c===te&&(c=this._$AH[l]),o||=!wt(c)||c!==this._$AH[l],c===j?e=j:e!==j&&(e+=(c??"")+s[l+1]),this._$AH[l]=c}o&&!i&&this.j(e)}j(e){e===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Gt=class extends Me{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===j?void 0:e}},Zt=class extends Me{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==j)}},Kt=class extends Me{constructor(e,r,n,i,s){super(e,r,n,i,s),this.type=5}_$AI(e,r=this){if((e=_e(this,e,r,0)??j)===te)return;let n=this._$AH,i=e===j&&n!==j||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,s=e!==j&&(n===j||i);i&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Jt=class{constructor(e,r,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){_e(this,e)}},ts={M:rn,P:de,A:nn,C:1,L:es,R:Wt,D:Yi,V:_e,I:Be,H:Me,N:Zt,U:Kt,B:Gt,F:Jt},Ga=tn.litHtmlPolyfillSupport;Ga?.(yt,Be),(tn.litHtmlVersions??=[]).push("3.3.1");var rs=(t,e,r)=>{let n=r?.renderBefore??e,i=n._$litPart$;if(i===void 0){let s=r?.renderBefore??null;n._$litPart$=i=new Be(e.insertBefore(gt(),s),s,void 0,r??{})}return i._$AI(t),i};var an=globalThis,v=class extends ue{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=rs(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return te}};v._$litElement$=!0,v.finalized=!0,an.litElementHydrateSupport?.({LitElement:v});var Za=an.litElementPolyfillSupport;Za?.({LitElement:v});(an.litElementVersions??=[]).push("4.2.1");var Yt=class t extends HTMLElement{static observedAttributes=["name"];constructor(){super(),this.attachShadow({mode:"open"})}attributeChangedCallback(e,r,n){if(r!==n&&t.observedAttributes.includes(e)){switch(e){case"name":this.name=n||"";break}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 rs={clock:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
8
+ `;this.shadowRoot?.firstChild;)this.shadowRoot.removeChild(this.shadowRoot.firstChild),this.shadowRoot.appendChild(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 ns={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 $a=Object.create;var Pi=Object.defineProperty;var Sa=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 Fa=rs,on=class extends Kt{resolveIcon(e){let r=Fa[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",on);var Yt=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.#n()}hostConnected(){this.#r||setTimeout(()=>{this.#r||(this.#r=this.#n())},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}#n(){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 an=t=>!!(t&&t.constructor&&t.call&&t.apply);var ns=t=>!(!t||!t.then||!an(t.then));var ln=(t,e,r=!1)=>{if(!t)return[];let n=(s,o)=>e(s)-e(o),i=(s,o)=>e(o)-e(s);return t.slice().sort(r===!0?i:n)};function*qe(t,e,r=i=>i,n=1){let i=an(r)?r:()=>r,s=e?t:0,o=e??t;for(let c=s;c<=o&&(yield i(c),!(c+n>o));c+=n);}var cn=(t,e,r,n)=>Array.from(qe(t,e,r,n));var un=(t,e)=>t?t.reduce((r,n)=>{let[i,s]=r;return e(n)?[[...i,n],s]:[i,[...s,n]]},[[],[]]):[[],[]];var hn=class extends Error{constructor(e=[]){super();let r=e.find(n=>n.name)?.name??"";this.name=`AggregateError(${r}...)`,this.message=`AggregateError with ${e.length} errors`,this.stack=e.find(n=>n.stack)?.stack??this.stack,this.errors=e}},dn=async(t,e,r)=>{let n=e.map((a,h)=>({index:h,item:a})),i=async a=>{let h=[];for(;;){let d=n.pop();if(!d)return a(h);let[f,p]=await Fe(r)(d.item);h.push({error:f,result:p,index:d.index})}},s=cn(1,t).map(()=>new Promise(i)),o=await Promise.all(s),[c,l]=un(ln(o.flat(),a=>a.index),a=>!!a.error);if(c.length>0)throw new hn(c.map(a=>a.error));return l.map(a=>a.result)};var pn=async(t,e)=>{let r=t?.times??3,n=t?.delay,i=t?.backoff??null;for(let s of qe(1,r)){let[o,c]=await Fe(e)(l=>{throw{_exited:l}});if(!o)return c;if(o._exited)throw o._exited;if(s===r)throw o;n&&await Ve(n),i&&await Ve(i(s))}},Ve=t=>new Promise(e=>setTimeout(e,t)),Fe=t=>(...e)=>{try{let r=t(...e);return ns(r)?r.then(n=>[void 0,n]).catch(n=>[n,void 0]):[void 0,r]}catch(r){return[r,void 0]}};var Ne=({interval:t},e)=>{let r=!0,n,i=(...s)=>{r&&(e(...s),r=!1,n=setTimeout(()=>{r=!0,n=void 0},t))};return i.isThrottled=()=>n!==void 0,i};async function is(t,e){let r=t?.times??3,n=t?.delay,i=t?.backoff??null;for(let s of qe(1,r)){let[o,c]=await Fe(e)(l=>{throw{_exited:l}});if(!o)return c;if(o._exited)throw o._exited;if(s===r)throw o;n&&await Ve(n),i&&await Ve(i(s))}throw new Error("unreachable")}var Ha=!0,fn="Invariant failed";function J(t,e){if(!t){if(Ha)throw new Error(fn);var r=typeof e=="function"?e():e,n=r?"".concat(fn,": ").concat(r):fn;throw new Error(n)}}var Qt=class{#e;#t;#r=null;isStreaming=!1;typingIndicator;ranOutOfCredits=!1;messages=[];conversationId="";#n=0;#i;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 n=this.#s[this.#s.length-1];if(e.type==="USER_INPUT"&&n.message.type==="USER_INPUT"&&e.value===n.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 is({times:5,delay:2e3},async()=>{if(this.#r?.isConnected){let n=[...this.#s];this.#s=[],this.#e.requestUpdate();let i=!1;for(let{message:s,options:o}of n){let c=this.#o(s,o);s===e&&(i=c)}return i}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:n,role:i="user",expectStreaming:s=!1,requestInputResponse:o}={}){return this.enqueueMessage({type:"USER_INPUT",value:e,role:i,xUserData:r,xCustomInstructions:n,requestInputResponse:o},{expectStreaming:s})}async enqueueUserInput(e,{xUserData:r,xCustomInstructions:n,role:i="user",expectStreaming:s=!1,requestInputResponse:o}={}){return this.enqueueMessage({type:"USER_INPUT",value:e,role:i,xUserData:r,xCustomInstructions:n,requestInputResponse:o},{expectStreaming:s})}sendImageDelete(e){J(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.#i),this.#i=setTimeout(()=>{this.#t.onReconnect?.(),this.#r=this.initWS()},1e3*this.#n),this.#n++}initWS(){return new Yt(this.#e,{url:()=>this.#t.url(this.conversationId,{}),onOpen:e=>this.#a(e),onMessage:e=>this.#h(JSON.parse(e.data)),onError:e=>this.#c(e),onClose:e=>this.#l(e)})}#a(e){this.#n=0}#h(e){switch(e.type){case"NEW_MESSAGE":{this.messages=[...this.messages,{...e.message,streaming:!0}].filter((r,n,i)=>n===i.findIndex(s=>s.id===r.id)),this.typingIndicator=void 0,this.#e.requestUpdate(),this.#t.onNewMessage?.(e.message),this.#t.persistConversationState?.(this.conversationId,this.messages);break}case"APPEND_MESSAGE":{let r=this.messages.find(n=>n.id===e.message.id);if(r){switch(e.message.content_type){case"text":{let{part:n,delta:i,position:s}=e.message;r.content=r.content.slice(0,s)+i,r.parts||=[],r.parts[n]={text:r.parts[n]&&"text"in r.parts[n]?(r.parts[n].text||"").slice(0,s)+i:i};break}case"html":{let{part:n,delta:i,position:s}=e.message;r.parts||=[],r.parts[n]={html:r.parts[n]&&"html"in r.parts[n]?(r.parts[n].html||"").slice(0,s)+i:i};break}case"data":{let{part:n}=e.message;r.parts||=[],r.parts[n]={tag:e.message.tag,data:r.parts[n]&&"data"in r.parts[n]?Object.assign(r.parts[n].data||{},e.message.data):e.message.data};break}}e.metadata&&(r.metadata=e.metadata),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(n=>n.id===e.message.id);if(r)Object.assign(r,e.message),r.streaming=!1;else throw new Error(`Message with id ${e.message.id} not found`);this.isStreaming=!1,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.#i)}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 Gh=Symbol(),za=Symbol();var ss=Object.getPrototypeOf,mn=new WeakMap,Wa=t=>t&&(mn.has(t)?mn.get(t):ss(t)===Object.prototype||ss(t)===Array.prototype);var os=t=>Wa(t)&&t[za]||null,gn=(t,e=!0)=>{mn.set(t,e)};var yn=t=>typeof t=="object"&&t!==null,Ga=t=>yn(t)&&!vn.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),cs=(t,e)=>{let r=as.get(t);if(r?.[0]===e)return r[1];let n=Array.isArray(t)?[]:Object.create(Object.getPrototypeOf(t));return gn(n,!0),as.set(t,[e,n]),Reflect.ownKeys(t).forEach(i=>{if(Object.getOwnPropertyDescriptor(n,i))return;let s=Reflect.get(t,i),{enumerable:o}=Reflect.getOwnPropertyDescriptor(t,i),c={value:s,enumerable:o,configurable:!0};if(vn.has(s))gn(s,!1);else if(Ie.has(s)){let[l,a]=Ie.get(s);c.value=cs(l,a())}Object.defineProperty(n,i,c)}),Object.preventExtensions(n)},Za=(t,e,r,n)=>({deleteProperty(i,s){let o=Reflect.get(i,s);r(s);let c=Reflect.deleteProperty(i,s);return c&&n(["delete",[s],o]),c},set(i,s,o,c){let l=!t()&&Reflect.has(i,s),a=Reflect.get(i,s,c);if(l&&(ls(a,o)||Xt.has(o)&&ls(a,Xt.get(o))))return!0;r(s),yn(o)&&(o=os(o)||o);let h=!Ie.has(o)&&Ka(o)?bn(o):o;return e(s,h),Reflect.set(i,s,h,c),n(["set",[s],o,a]),!0}}),Ie=new WeakMap,vn=new WeakSet,as=new WeakMap,wn=[1],Xt=new WeakMap,ls=Object.is,Ja=(t,e)=>new Proxy(t,e),Ka=Ga,Ya=cs,Qa=Za;function bn(t={}){if(!yn(t))throw new Error("object required");let e=Xt.get(t);if(e)return e;let r=wn[0],n=new Set,i=(b,x=++wn[0])=>{r!==x&&(s=r=x,n.forEach(w=>w(b,x)))},s=r,o=(b=wn[0])=>(s!==b&&(s=b,l.forEach(([x])=>{let w=x[1](b);w>r&&(r=w)})),r),c=b=>(x,w)=>{let $=[...x];$[1]=[b,...$[1]],i($,w)},l=new Map,a=(b,x)=>{let w=!vn.has(x)&&Ie.get(x);if(w){if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&l.has(b))throw new Error("prop listener already exists");if(n.size){let $=w[2](c(b));l.set(b,[w,$])}else l.set(b,[w])}},h=b=>{var x;let w=l.get(b);w&&(l.delete(b),(x=w[1])==null||x.call(w))},d=b=>(n.add(b),n.size===1&&l.forEach(([w,$],S)=>{if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&$)throw new Error("remove already exists");let T=w[2](c(S));l.set(S,[w,T])}),()=>{n.delete(b),n.size===0&&l.forEach(([w,$],S)=>{$&&($(),l.set(S,[w]))})}),f=!0,p=Qa(()=>f,a,h,i),y=Ja(t,p);Xt.set(t,y);let E=[t,o,d];return Ie.set(y,E),Reflect.ownKeys(t).forEach(b=>{let x=Object.getOwnPropertyDescriptor(t,b);"value"in x&&x.writable&&(y[b]=t[b])}),f=!1,y}function er(t,e,r){let n=Ie.get(t);(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!n&&console.warn("Please use proxy object");let i,s=[],o=n[2],c=!1,a=o(h=>{if(s.push(h),r){e(s.splice(0));return}i||(i=Promise.resolve().then(()=>{i=void 0,c&&e(s.splice(0))}))});return c=!0,()=>{c=!1,a()}}function He(t){let e=Ie.get(t);(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!e&&console.warn("Please use proxy object");let[r,n]=e;return Ya(r,n())}var ze=class{#e;#t;#r;#n=()=>{};constructor(e,r){this.#e=e,this.#t=r,this.#r=He(r),e.addController(this)}get state(){return this.#r}get value(){return this.#r}hostConnected(){this.#n(),this.#n=er(this.#t,()=>{this.#r=He(this.#t),this.#e.requestUpdate()})}hostDisconnected(){this.#n()}};var me=class{#e;#t;proxyObject;#r;#n=()=>{};constructor(e,r,n){this.#e=e,this.#t=n,this.proxyObject=bn(r),this.#r=He(this.proxyObject),e.addController(this)}get state(){return this.#r}get value(){return this.#r}hostConnected(){this.#n(),this.#t?.subscribe&&(this.#n=er(this.proxyObject,()=>{this.#r=He(this.proxyObject),this.#e.requestUpdate()}))}hostDisconnected(){this.#n()}};var tr=class{#e;#t;#r;#n=null;#i=null;constructor(e,{provider:r,tag:n,key:i}){this.#e=e,this.#t=n,this.#r=i,e.addController(this)}get value(){return this.#i?this.#i.value:null}hostConnected(){if(this.#i||(this.#n=Xa(this.#e,this.#t),!this.#n))return;let e=this.#n[this.#r]instanceof me?this.#n[this.#r]:null;e&&(this.#i=new ze(this.#e,e.proxyObject))}hostDisconnected(){}};function Xa(t,e){let r=t;for(;r;){let n=r.closest(e);if(n)return n;let i=r.getRootNode();if(i instanceof ShadowRoot)r=i.host;else break}return null}var us=()=>{if(window.Shopify)try{return{customerId:el()}}catch{return null}return null},el=()=>{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},hs=async()=>{try{return(await(await fetch(window.Shopify.routes.root+"cart.js")).json()).items.map(n=>({id:n.id,name:n.title,quantity:n.quantity,price:n.price,variantId:n.variant_id,sku:n.sku,url:n.url,description:n.product_description,image:n.featured_image?.url}))}catch{return[]}};function ds(t,e="http"){return t.startsWith("http://")||t.startsWith("https://")?t:`${e}://${t}`}function xn(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 ps(t,e){let r=t instanceof URL?t:new URL(t);if(e)for(let[n,i]of e)r.searchParams.set(n,i);return r}var fs=()=>{if(window.ShopRenter)try{let t=rl();return{customerEmail:t?.customerEmail,customerId:t?.customerId,customerName:t?.customerName}}catch{return null}return null},rl=()=>{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}}},ms=async()=>{try{let t=window.ShopRenter.shop?.domain;if(!t)return[];let e=ds(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 gs=()=>{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},ws=async()=>new Promise((t,e)=>{try{window.UNAS.getCart(r=>{let i=r.items.map(s=>({id:s.id,name:s.name,quantity:s.quantity,price:s.price,sku:s.sku}));t(i)})}catch(r){console.error("Error fetching cart information:",r),e(r)}});var kn;function Cn(t){return{lang:t?.lang??kn?.lang,message:t?.message,abortEarly:t?.abortEarly??kn?.abortEarly,abortPipeEarly:t?.abortPipeEarly??kn?.abortPipeEarly}}var sl;function ol(t){return sl?.get(t)}var al;function ll(t){return al?.get(t)}var cl;function ul(t,e){return cl?.get(t)?.get(e)}function vs(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 z(t,e,r,n,i){let s=i&&"input"in i?i.input:r.value,o=i?.expected??t.expects??null,c=i?.received??vs(s),l={kind:t.kind,type:t.type,input:s,expected:o,received:c,message:`Invalid ${e}: ${o?`Expected ${o} but r`:"R"}eceived ${c}`,requirement:t.requirement,path:i?.path,issues:i?.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},a=t.kind==="schema",h=i?.message??t.message??ul(t.reference,l.lang)??(a?ll(l.lang):null)??n.message??ol(l.lang);h!==void 0&&(l.message=typeof h=="function"?h(l):h),a&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function W(t){return{version:1,vendor:"valibot",validate(e){return t["~run"]({value:e},Cn())}}}function hl(t,e){return Object.hasOwn(t,e)&&e!=="__proto__"&&e!=="prototype"&&e!=="constructor"}function bs(t,e){let r=[...new Set(t)];return r.length>1?`(${r.join(` ${e} `)})`:r[0]??"never"}var dl=class extends Error{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}};function $n(t,e){return{kind:"validation",type:"max_length",reference:$n,async:!1,expects:`<=${t}`,requirement:t,message:e,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&z(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Sn(t,e){return{kind:"validation",type:"min_length",reference:Sn,async:!1,expects:`>=${t}`,requirement:t,message:e,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&z(this,"length",r,n,{received:`${r.value.length}`}),r}}}function pl(t,e,r){return typeof t.fallback=="function"?t.fallback(e,r):t.fallback}function xs(t,e,r){return typeof t.default=="function"?t.default(e,r):t.default}function En(){return{kind:"schema",type:"any",reference:En,expects:"any",async:!1,get"~standard"(){return W(this)},"~run"(t){return t.typed=!0,t}}}function We(t,e){return{kind:"schema",type:"array",reference:We,expects:"Array",async:!1,item:t,message:e,get"~standard"(){return W(this)},"~run"(r,n){let i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let s=0;s<i.length;s++){let o=i[s],c=this.item["~run"]({value:o},n);if(c.issues){let l={type:"array",origin:"value",input:i,key:s,value:o};for(let a of c.issues)a.path?a.path.unshift(l):a.path=[l],r.issues?.push(a);if(r.issues||(r.issues=c.issues),n.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value.push(c.value)}}else z(this,"type",r,n);return r}}}function _n(t){return{kind:"schema",type:"boolean",reference:_n,expects:"boolean",async:!1,message:t,get"~standard"(){return W(this)},"~run"(e,r){return typeof e.value=="boolean"?e.typed=!0:z(this,"type",e,r),e}}}function Mn(t){return{kind:"schema",type:"null",reference:Mn,expects:"null",async:!1,message:t,get"~standard"(){return W(this)},"~run"(e,r){return e.value===null?e.typed=!0:z(this,"type",e,r),e}}}function rr(t){return{kind:"schema",type:"number",reference:rr,expects:"number",async:!1,message:t,get"~standard"(){return W(this)},"~run"(e,r){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:z(this,"type",e,r),e}}}function ue(t,e){return{kind:"schema",type:"object",reference:ue,expects:"Object",async:!1,entries:t,message:e,get"~standard"(){return W(this)},"~run"(r,n){let i=r.value;if(i&&typeof i=="object"){r.typed=!0,r.value={};for(let s in this.entries){let o=this.entries[s];if(s in i||(o.type==="exact_optional"||o.type==="optional"||o.type==="nullish")&&o.default!==void 0){let c=s in i?i[s]:xs(o),l=o["~run"]({value:c},n);if(l.issues){let a={type:"object",origin:"value",input:i,key:s,value:c};for(let h of l.issues)h.path?h.path.unshift(a):h.path=[a],r.issues?.push(h);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value[s]=l.value}else if(o.fallback!==void 0)r.value[s]=pl(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(z(this,"key",r,n,{input:void 0,expected:`"${s}"`,path:[{type:"object",origin:"key",input:i,key:s,value:i[s]}]}),n.abortEarly))break}}else z(this,"type",r,n);return r}}}function Ge(t,e){return{kind:"schema",type:"optional",reference:Ge,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,get"~standard"(){return W(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=xs(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function In(t,e){return{kind:"schema",type:"picklist",reference:In,expects:bs(t.map(vs),"|"),async:!1,options:t,message:e,get"~standard"(){return W(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:z(this,"type",r,n),r}}}function nr(t,e,r){return{kind:"schema",type:"record",reference:nr,expects:"Object",async:!1,key:t,value:e,message:r,get"~standard"(){return W(this)},"~run"(n,i){let s=n.value;if(s&&typeof s=="object"){n.typed=!0,n.value={};for(let o in s)if(hl(s,o)){let c=s[o],l=this.key["~run"]({value:o},i);if(l.issues){let h={type:"object",origin:"key",input:s,key:o,value:c};for(let d of l.issues)d.path=[h],n.issues?.push(d);if(n.issues||(n.issues=l.issues),i.abortEarly){n.typed=!1;break}}let a=this.value["~run"]({value:c},i);if(a.issues){let h={type:"object",origin:"value",input:s,key:o,value:c};for(let d of a.issues)d.path?d.path.unshift(h):d.path=[h],n.issues?.push(d);if(n.issues||(n.issues=a.issues),i.abortEarly){n.typed=!1;break}}(!l.typed||!a.typed)&&(n.typed=!1),l.typed&&(n.value[l.value]=a.value)}}else z(this,"type",n,i);return n}}}function O(t){return{kind:"schema",type:"string",reference:O,expects:"string",async:!1,message:t,get"~standard"(){return W(this)},"~run"(e,r){return typeof e.value=="string"?e.typed=!0:z(this,"type",e,r),e}}}function ys(t){let e;if(t)for(let r of t)e?e.push(...r.issues):e=r.issues;return e}function Ze(t,e){return{kind:"schema",type:"union",reference:Ze,expects:bs(t.map(r=>r.expects),"|"),async:!1,options:t,message:e,get"~standard"(){return W(this)},"~run"(r,n){let i,s,o;for(let c of this.options){let l=c["~run"]({value:r.value},n);if(l.typed)if(l.issues)s?s.push(l):s=[l];else{i=l;break}else o?o.push(l):o=[l]}if(i)return i;if(s){if(s.length===1)return s[0];z(this,"type",r,n,{issues:ys(s)}),r.typed=!0}else{if(o?.length===1)return o[0];z(this,"type",r,n,{issues:ys(o)})}return r}}}function ks(t,e,r){let n=t["~run"]({value:e},Cn(r));if(n.issues)throw new dl(n.issues);return n.value}function Cs(t,e){let r={};for(let n in t.entries)r[n]=!e||e.includes(n)?Ge(t.entries[n]):t.entries[n];return{...t,entries:r,get"~standard"(){return W(this)}}}function $s(...t){return{...t[0],pipe:t,get"~standard"(){return W(this)},"~run"(e,r){for(let n of t)if(n.kind!=="metadata"){if(e.issues&&(n.kind==="schema"||n.kind==="transformation")){e.typed=!1;break}(!e.issues||!r.abortEarly&&!r.abortPipeEarly)&&(e=n["~run"](e,r))}return e}}}function xt(t,e,r){let n=t["~run"]({value:e},Cn(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var Ss=nr(O(),Ze([O(),rr(),_n(),Mn()])),Es=$s(O(),Sn(1),$n(5e3)),_s=()=>{try{return window.UNAS?gs():window.Shopify?us():window.ShopRenter?fs():null}catch{return null}},Ms=async()=>{try{return window.UNAS?await ws():window.Shopify?await hs():window.ShopRenter?await ms():[]}catch{return[]}},Je={schema:ue({conversationId:Ge(O()),messages:Ge(We(ue({id:O(),timestamp:rr(),role:In(["user","assistant","support"]),content:O(),parts:Ge(We(Ze([ue({text:O()}),ue({html:O()}),ue({tag:O(),data:nr(O(),En())})])))})))}),getStorageKey(t){if(!t)throw new Error("widgetId is not set");return`_molin_${t}`},persist(t,e,r){let n=this.getStorageKey(t);localStorage.setItem(n,JSON.stringify({conversationId:e,messages:r}))},restore(t){try{let e=this.getStorageKey(t),r=JSON.parse(localStorage.getItem(e)||"{}"),n=ks(this.schema,r);return{conversationId:n.conversationId||"",messages:n.messages||[]}}catch(e){return console.error("Failed to restore conversation state:",e),{conversationId:"",messages:[]}}},reset(t){let e=this.getStorageKey(t);localStorage.removeItem(e)}};var Ke=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 me(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.#i.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.#i.sendImageDelete.bind(this.#i)})}connectedCallback(){super.connectedCallback(),this.updated()}updated(){this.autoConnect&&this.#i.connect(),Object.assign(this.contextCtrl.proxyObject,{widgetId:this.widgetId,config:this.config,callbacks:this.callbacks,xUserData:this.#t,xCustomInstructions:this.#r,conversationId:this.#i.conversationId,messages:this.#e,isStreaming:this.#i.isStreaming,typingIndicator:this.#i.typingIndicator,ranOutOfCredits:this.#i.ranOutOfCredits,isLiveMode:this.#i.isLiveMode,lastMsg:this.#i.lastMsg,hasQueuedMessages:this.#i.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.#i.sendImageDelete.bind(this.#i)}),this.#s()}get#e(){return this.#i?.ranOutOfCredits?[{id:crypto.randomUUID(),role:"assistant",content:"Sorry, I've run out of credits. Please contact the shop directly.",timestamp:Date.now()}]:this.#i?.messages||[]}#t;#r;#n=null;get#i(){return this.#n||(this.#n=new Qt(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.#i.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.#i.conversationId})},onMessageError:e=>{console.error("ws message error",e),e.message&&this.callbacks.onError?.({widgetId:this.widgetId,error:"WS: "+e.message})},onReset:()=>{Je.reset(this.widgetId)},onConnect:(e,r)=>{let n=_s();this.#i.sendUserMeta({xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,customerInformation:n,language:window.navigator.language,cart:[]}),Ms().then(i=>{i?.length>0&&this.#i.sendUserMeta({xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,customerInformation:n,cart:i,language:window.navigator.language})}).catch(i=>{console.error(i)}),this.dispatchEvent(new t.ConnectedEvent({conversationId:e,metadata:r,widgetId:this.widgetId,pendingImages:r?.pendingImages||[]}))},persistConversationState:(e,r)=>{Je.persist(this.widgetId,e,r)},restoreConversationState:()=>Je.restore(this.widgetId)})),this.#n}#s(){function e(n){if(!n)return;let i;try{i=typeof n=="object"?n:JSON.parse(n)}catch(o){console.error("Molin: user-data is not valid JSON",o);return}if(!i||typeof i!="object"||Object.keys(i).length===0)return;let s=xt(Ss,i);if(!s.success){console.error("Molin: user-data does not pass schema validation",s.issues);return}return s.output}function r(n){if(!n)return;let i=xt(Es,n);if(!i.success){console.error("Molin: custom-instructions does not pass schema validation",i.issues);return}return i.output}this.#t=e(this.xUserData),this.#r=r(this.xCustomInstructions)}async sendUserInput(e,r={}){let n={xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,...r},i=await this.#i.sendUserInput(e,n);return i&&this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:e,example:!1,conversationId:this.#i.conversationId}),i}async enqueueUserInput(e,r={}){this.#e.some(s=>s.role==="assistant"&&s.parts?.some(o=>"tag"in o&&o.tag==="request-input-v1"&&"data"in o&&o.data.type==="new-conversation-button"))&&(this.sendNewChat(),this.reset());let i={xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,role:"user",expectStreaming:!0,...r};return this.#i.enqueueUserInput(e,i)}sendUserCancel(){this.#i.sendUserCancel(),this.callbacks.onUserCanceledStreaming?.({widgetId:this.widgetId})}sendUserTypingStart(){this.#i.sendUserTypingStart()}sendUserTypingStop(){this.#i.sendUserTypingStop()}sendNewChat(){this.#i.sendNewChat()}reset(){this.#i.reset()}reloadConfig(){this.#i.reloadConfig()}connect(){this.#i.connect()}render(){return u`<slot></slot>`}};function Is(t){let e=new tr(t,{provider:Ke,tag:"mw-context-widget",key:"contextCtrl"});return new Proxy({value:null},{get(r,n){if(n==="value")return e.value}})}Ke.ConnectedEvent=class extends CustomEvent{static type="mw-context-widget:connected";constructor(e,r={}){super(Ke.ConnectedEvent.type,{detail:e,bubbles:!0,composed:!0,...r})}};customElements.get("mw-context-widget")||customElements.define("mw-context-widget",Ke);function Bn(t){return[...t.v,(t.i?"!":"")+t.n].join(":")}function fl(t,e=","){return t.map(Bn).join(e)}var Us=typeof CSS<"u"&&CSS.escape||(t=>t.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function sr(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 lr(t,e="@media "){return e+I(t).map(r=>(typeof r=="string"&&(r={min:r}),r.raw||Object.keys(r).map(n=>`(${n}-width:${r[n]})`).join(" and "))).join(",")}function I(t=[]){return Array.isArray(t)?t:t==null?[]:[t]}function As(t){return t}function cr(){}var P={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function Ps(t){return t.match(/[-=:;]/g)?.length||0}function Dn(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(Ps(t),15)<<18}var ml=["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 qn({n:t,i:e,v:r=[]},n,i,s){t&&(t=Bn({n:t,i:e,v:r})),s=[...I(s)];for(let c of r){let l=n.theme("screens",c);for(let a of I(l&&lr(l)||n.v(c))){var o;s.push(a),i|=l?67108864|Dn(a):c=="dark"?1073741824:a[0]=="@"?Dn(a):(o=a,1<<~(/:([a-z-]+)/.test(o)&&~ml.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:t,p:i,r:s,i:e}}var Rs=new Map;function On(t){if(t.d){let e=[],r=An(t.r.reduce((n,i)=>i[0]=="@"?(e.push(i),n):i?An(n,s=>An(i,o=>{let c=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(o);if(c){let l=s.indexOf(c[1]);return~l?s.slice(0,l)+c[0]+s.slice(l+c[1].length):Tn(s,o)}return Tn(o,s)})):n,"&"),n=>Tn(n,t.n?"."+Us(t.n):""));return r&&e.push(r.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((n,i)=>i+"{"+n+"}",t.d)}}function An(t,e){return t.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(r,n,i)=>e(n)+i)}function Tn(t,e){return t.replace(/&/g,e)}var Ts=new Intl.Collator("en",{numeric:!0});function Bs(t,e){for(var r=0,n=t.length;r<n;){let i=n+r>>1;0>=qs(t[i],e)?r=i+1:n=i}return n}function qs(t,e){let r=t.p&P.o;return r==(e.p&P.o)&&(r==P.b||r==P.o)?0:t.p-e.p||t.o-e.o||Ts.compare(Ls(t.n),Ls(e.n))||Ts.compare(js(t.n),js(e.n))}function Ls(t){return(t||"").split(/:/).pop().split("/").pop()||"\0"}function js(t){return(t||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function Ln(t,e){return Math.round(parseInt(t,16)*e)}function K(t,e={}){if(typeof t=="function")return t(e);let{opacityValue:r="1",opacityVariable:n}=e,i=n?`var(${n})`:r;if(t.includes("<alpha-value>"))return t.replace("<alpha-value>",i);if(t[0]=="#"&&(t.length==4||t.length==7)){let s=(t.length-1)/3,o=[17,1,.062272][s-1];return`rgba(${[Ln(t.substr(1,s),o),Ln(t.substr(1+s,s),o),Ln(t.substr(1+2*s,s),o),i]})`}return i=="1"?t:i=="0"?"#0000":t.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${i})`)}function Vs(t,e,r,n,i=[]){return(function s(o,{n:c,p:l,r:a=[],i:h},d){let f=[],p="",y=0,E=0;for(let w in o||{}){var b,x;let $=o[w];if(w[0]=="@"){if(!$)continue;if(w[1]=="a"){f.push(...Fn(c,l,ar(""+$),d,l,a,h,!0));continue}if(w[1]=="l"){for(let S of I($))f.push(...s(S,{n:c,p:(b=P[w[7]],l&~P.o|b),r:w[7]=="d"?[]:a,i:h},d));continue}if(w[1]=="i"){f.push(...I($).map(S=>({p:-1,o:0,r:[],d:w+" "+S})));continue}if(w[1]=="k"){f.push({p:P.d,o:0,r:[w],d:s($,{p:P.d},d).map(On).join("")});continue}if(w[1]=="f"){f.push(...I($).map(S=>({p:P.d,o:0,r:[w],d:s(S,{p:P.d},d).map(On).join("")})));continue}}if(typeof $!="object"||Array.isArray($))w=="label"&&$?c=$+sr(JSON.stringify([l,h,o])):($||$===0)&&(w=w.replace(/[A-Z]/g,S=>"-"+S.toLowerCase()),E+=1,y=Math.max(y,(x=w)[0]=="-"?0:Ps(x)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(x)?+!!RegExp.$1||-!!RegExp.$2:0)+1),p+=(p?";":"")+I($).map(S=>d.s(w,Vn(""+S,d.theme)+(h?" !important":""))).join(";"));else if(w[0]=="@"||w.includes("&")){let S=l;w[0]=="@"&&(w=w.replace(/\bscreen\(([^)]+)\)/g,(T,U)=>{let B=d.theme("screens",U);return B?(S|=67108864,lr(B,"")):T}),S|=Dn(w)),f.push(...s($,{n:c,p:S,r:[...a,w],i:h},d))}else f.push(...s($,{p:l,r:[...a,w]},d))}return f.unshift({n:c,p:l,o:Math.max(0,15-E)+1.5*Math.min(y||15,15),r:a,d:p}),f.sort(qs)})(t,qn(e,r,n,i),r)}function Vn(t,e){return t.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(r,n,i,s,o="")=>{let c=e(i,o);return typeof c=="function"&&/color|fill|stroke/i.test(i)?K(c):""+I(c).filter(l=>Object(l)!==l)})}function Fs(t,e){let r,n=[];for(let i of t)i.d&&i.n?r?.p==i.p&&""+r.r==""+i.r?(r.c=[r.c,i.c].filter(Boolean).join(" "),r.d=r.d+";"+i.d):n.push(r={...i,n:i.n&&e}):n.push({...i,n:i.n&&e});return n}function or(t,e,r=P.u,n,i){let s=[];for(let o of t)for(let c of(function(l,a,h,d,f){l={...l,i:l.i||f};let p=(function(y,E){let b=Rs.get(y.n);return b?b(y,E):E.r(y.n,y.v[0]=="dark")})(l,a);return p?typeof p=="string"?({r:d,p:h}=qn(l,a,h,d),Fs(or(ar(p),a,h,d,l.i),l.n)):Array.isArray(p)?p.map(y=>{var E,b;return{o:0,...y,r:[...I(d),...I(y.r)],p:(E=h,b=y.p??h,E&~P.o|b)}}):Vs(p,l,a,h,d):[{c:Bn(l),p:0,o:0,r:[]}]})(o,e,r,n,i))s.splice(Bs(s,c),0,c);return s}function Fn(t,e,r,n,i,s,o,c){return Fs((c?r.flatMap(l=>or([l],n,i,s,o)):or(r,n,i,s,o)).map(l=>l.p&P.o&&(l.n||e==P.b)?{...l,p:l.p&~P.o|e,o:0}:l),t)}function gl(t,e,r,n){var i;return i=(s,o)=>{let{n:c,p:l,r:a,i:h}=qn(s,o,e);return r&&Fn(c,e,r,o,l,a,h,n)},Rs.set(t,i),t}function jn(t,e,r){if(t[t.length-1]!="("){let n=[],i=!1,s=!1,o="";for(let c of t)if(!(c=="("||/[~@]$/.test(c))){if(c[0]=="!"&&(c=c.slice(1),i=!i),c.endsWith(":")){n[c=="dark:"?"unshift":"push"](c.slice(0,-1));continue}c[0]=="-"&&(c=c.slice(1),s=!s),c.endsWith("-")&&(c=c.slice(0,-1)),c&&c!="&"&&(o+=(o&&"-")+c)}o&&(s&&(o="-"+o),e[0].push({n:o,v:n.filter(wl),i}))}}function wl(t,e,r){return r.indexOf(t)==e}var Ds=new Map;function ar(t){let e=Ds.get(t);if(!e){let r=[],n=[[]],i=0,s=0,o=null,c=0,l=(a,h=0)=>{i!=c&&(r.push(t.slice(i,c+h)),a&&jn(r,n)),i=c+1};for(;c<t.length;c++){let a=t[c];if(s)t[c-1]!="\\"&&(s+=+(a=="[")||-(a=="]"));else if(a=="[")s+=1;else if(o)t[c-1]!="\\"&&o.test(t.slice(c))&&(o=null,i=c+RegExp.lastMatch.length);else if(a=="/"&&t[c-1]!="\\"&&(t[c+1]=="*"||t[c+1]=="/"))o=t[c+1]=="*"?/^\*\//:/^[\r\n]/;else if(a=="(")l(),r.push(a);else if(a==":")t[c+1]!=":"&&l(!1,1);else if(/[\s,)]/.test(a)){l(!0);let h=r.lastIndexOf("(");if(a==")"){let d=r[h-1];if(/[~@]$/.test(d)){let f=n.shift();r.length=h,jn([...r,"#"],n);let{v:p}=n[0].pop();for(let y of f)y.v.splice(+(y.v[0]=="dark")-+(p[0]=="dark"),p.length);jn([...r,gl(d.length>1?d.slice(0,-1)+sr(JSON.stringify([d,f])):d+"("+fl(f)+")",P.a,f,/@$/.test(d))],n)}h=r.lastIndexOf("(",h-1)}r.length=h+1}else/[~@]/.test(a)&&t[c+1]=="("&&n.unshift([])}l(!0),Ds.set(t,e=n[0])}return e}function m(t,e,r){return[t,Un(e,r)]}function Un(t,e){return typeof t=="function"?t:typeof t=="string"&&/^[\w-]+$/.test(t)?(r,n)=>({[t]:e?e(r,n):Pn(r,1)}):r=>t||{[r[1]]:Pn(r,2)}}function Pn(t,e,r=t.slice(e).find(Boolean)||t.$$||t.input){return t.input[0]=="-"?`calc(${r} * -1)`:r}function g(t,e,r,n){return[t,Nn(e,r,n)]}function Nn(t,e,r){let n=typeof e=="string"?(i,s)=>({[e]:r?r(i,s):i._}):e||(({1:i,_:s},o,c)=>({[i||c]:s}));return(i,s)=>{let o=Ns(t||i[1]),c=s.theme(o,i.$$)??ne(i.$$,o,s);if(c!=null)return i._=Pn(i,0,c),n(i,s,o)}}function R(t,e={},r){return[t,yl(e,r)]}function yl(t={},e){return(r,n)=>{let{section:i=Ns(r[0]).replace("-","")+"Color"}=t,[s,o]=vl(r.$$);if(!s)return;let c=n.theme(i,s)||ne(s,i,n);if(!c||typeof c=="object")return;let{opacityVariable:l=`--tw-${r[0].replace(/-$/,"")}-opacity`,opacitySection:a=i.replace("Color","Opacity"),property:h=i,selector:d}=t,f=n.theme(a,o||"DEFAULT")||o&&ne(o,a,n),p=e||(({_:E})=>{let b=kt(h,E);return d?{[d]:b}:b});r._={value:K(c,{opacityVariable:l||void 0,opacityValue:f||void 0}),color:E=>K(c,E),opacityVariable:l||void 0,opacityValue:f||void 0};let y=p(r,n);if(!r.dark){let E=n.d(i,s,c);E&&E!==c&&(r._={value:K(E,{opacityVariable:l||void 0,opacityValue:f||"1"}),color:b=>K(E,b),opacityVariable:l||void 0,opacityValue:f||void 0},y={"&":y,[n.v("dark")]:p(r,n)})}return y}}function vl(t){return(t.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function kt(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 ne(t,e,r){if(t[0]=="["&&t.slice(-1)=="]"){if(t=Ye(Vn(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 Ns(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function Ye(t){return t.includes("url(")?t.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,r="",n,i="")=>Ye(r)+n+Ye(i)):t.replace(/(^|[^\\])_+/g,(e,r)=>r+" ".repeat(e.length-r.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,e=>e.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}function Ct({presets:t=[],...e}){let r={darkMode:void 0,darkColor:void 0,preflight:e.preflight!==!1&&[],theme:{},variants:I(e.variants),rules:I(e.rules),ignorelist:I(e.ignorelist),hash:void 0,stringify:(n,i)=>n+":"+i,finalize:[]};for(let n of I([...t,{darkMode:e.darkMode,darkColor:e.darkColor,preflight:e.preflight!==!1&&I(e.preflight),theme:e.theme,hash:e.hash,stringify:e.stringify,finalize:e.finalize}])){let{preflight:i,darkMode:s=r.darkMode,darkColor:o=r.darkColor,theme:c,variants:l,rules:a,ignorelist:h,hash:d=r.hash,stringify:f=r.stringify,finalize:p}=typeof n=="function"?n(r):n;r={preflight:r.preflight!==!1&&i!==!1&&[...r.preflight,...I(i)],darkMode:s,darkColor:o,theme:{...r.theme,...c,extend:{...r.theme.extend,...c?.extend}},variants:[...r.variants,...I(l)],rules:[...r.rules,...I(a)],ignorelist:[...r.ignorelist,...I(h)],hash:d,stringify:f,finalize:[...r.finalize,...I(p)]}}return r}function Os(t,e,r,n,i,s){for(let o of e){let c=r.get(o);c||r.set(o,c=n(o));let l=c(t,i,s);if(l)return l}}function bl(t){var e;return Rn(t[0],typeof(e=t[1])=="function"?e:()=>e)}function xl(t){var e,r;return Array.isArray(t)?Rn(t[0],Un(t[1],t[2])):Rn(t,Un(e,r))}function Rn(t,e){return Hs(t,(r,n,i,s)=>{let o=n.exec(r);if(o)return o.$$=r.slice(o[0].length),o.dark=s,e(o,i)})}function Hs(t,e){let r=I(t).map(kl);return(n,i,s)=>{for(let o of r){let c=e(n,o,i,s);if(c)return c}}}function kl(t){return typeof t=="string"?RegExp("^"+t+(t.includes("$")||t.slice(-1)=="-"?"":"$")):t}function zs(t,e){let r=Ct(t),n=(function({theme:l,darkMode:a,darkColor:h=cr,variants:d,rules:f,hash:p,stringify:y,ignorelist:E,finalize:b}){let x=new Map,w=new Map,$=new Map,S=new Map,T=Hs(E,(M,q)=>q.test(M));d.push(["dark",Array.isArray(a)||a=="class"?`${I(a)[1]||".dark"} &`:typeof a=="string"&&a!="media"?a:"@media (prefers-color-scheme:dark)"]);let U=typeof p=="function"?M=>p(M,sr):p?sr:As;U!==As&&b.push(M=>({...M,n:M.n&&U(M.n),d:M.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(q,N)=>"--"+U(N).replace("#",""))}));let B={theme:(function({extend:M={},...q}){let N={},Zr={get colors(){return xe("colors")},theme:xe,negative(){return{}},breakpoints(j){let V={};for(let H in j)typeof j[H]=="string"&&(V["screen-"+H]=j[H]);return V}};return xe;function xe(j,V,H,ht){if(j){if({1:j,2:ht}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(j)||[,j],/[.[]/.test(j)){let ae=[];j.replace(/\[([^\]]+)\]|([^.[]+)/g,(Ce,pt,Ca=pt)=>ae.push(Ca)),j=ae.shift(),H=V,V=ae.join("-")}let re=N[j]||Object.assign(Object.assign(N[j]={},qt(q,j)),qt(M,j));if(V==null)return re;V||(V="DEFAULT");let ke=re[V]??V.split("-").reduce((ae,Ce)=>ae?.[Ce],re)??H;return ht?K(ke,{opacityValue:Vn(ht,xe)}):ke}let dt={};for(let re of[...Object.keys(q),...Object.keys(M)])dt[re]=xe(re);return dt}function qt(j,V){let H=j[V];return typeof H=="function"&&(H=H(Zr)),H&&/color|fill|stroke/i.test(V)?(function ht(dt,re=[]){let ke={};for(let ae in dt){let Ce=dt[ae],pt=[...re,ae];ke[pt.join("-")]=Ce,ae=="DEFAULT"&&(pt=re,ke[re.join("-")]=Ce),typeof Ce=="object"&&Object.assign(ke,ht(Ce,pt))}return ke})(H):H}})(l),e:Us,h:U,s(M,q){return y(M,q,B)},d(M,q,N){return h(M,q,B,N)},v(M){return x.has(M)||x.set(M,Os(M,d,w,bl,B)||"&:"+M),x.get(M)},r(M,q){let N=JSON.stringify([M,q]);return $.has(N)||$.set(N,!T(M,B)&&Os(M,f,S,xl,B,q)),$.get(N)},f(M){return b.reduce((q,N)=>N(q,B),M)}};return B})(r),i=new Map,s=[],o=new Set;e.resume(l=>i.set(l,l),(l,a)=>{e.insert(l,s.length,a),s.push(a),o.add(l)});function c(l){let a=n.f(l),h=On(a);if(h&&!o.has(h)){o.add(h);let d=Bs(s,l);e.insert(h,d,l),s.splice(d,0,l)}return a.n}return Object.defineProperties(function(a){if(!i.size)for(let d of I(r.preflight))typeof d=="function"&&(d=d(n)),d&&(typeof d=="string"?Fn("",P.b,ar(d),n,P.b,[],!1,!0):Vs(d,{},n,P.b)).forEach(c);a=""+a;let h=i.get(a);if(!h){let d=new Set;for(let f of or(ar(a),n))d.add(f.c).add(c(f));h=[...d].filter(Boolean).join(" "),i.set(a,h).set(h,h)}return h},Object.getOwnPropertyDescriptors({get target(){return e.target},theme:n.theme,config:r,snapshot(){let l=e.snapshot(),a=new Set(o),h=new Map(i),d=[...s];return()=>{l(),o=a,i=h,s=d}},clear(){e.clear(),o=new Set,i=new Map,s=[]},destroy(){this.clear(),e.destroy()}}))}function Cl(t,e){return t!=e&&""+t.split(" ").sort()!=""+e.split(" ").sort()}function Ws(t){let e=new MutationObserver(r);return{observe(i){e.observe(i,{attributeFilter:["class"],subtree:!0,childList:!0}),n(i),r([{target:i,type:""}])},disconnect(){e.disconnect()}};function r(i){for(let{type:s,target:o}of i)if(s[0]=="a")n(o);else for(let c of o.querySelectorAll("[class]"))n(c);e.takeRecords()}function n(i){let s,o=i.getAttribute?.("class");o&&Cl(o,s=t(o))&&i.setAttribute("class",s)}}function $l(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 ur(t){let e=t?.cssRules?t:(t&&typeof t!="string"?t:$l(t)).sheet;return{target:e,snapshot(){let r=Array.from(e.cssRules,n=>n.cssText);return()=>{this.clear(),r.forEach(this.insert)}},clear(){for(let r=e.cssRules.length;r--;)e.deleteRule(r)},destroy(){e.ownerNode?.remove()},insert(r,n){try{e.insertRule(r,n)}catch{e.insertRule(":root{}",n)}},resume:cr}}var Sl=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 Gs(t){return Sl.get(t)}function Zs(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 Js(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 El=[["-webkit-",1],["-moz-",2],["-ms-",4]];function hr(){return({stringify:t})=>({stringify(e,r,n){let i="",s=Gs(e);s&&(i+=t(s,r,n)+";");let o=Zs(e),c=Js(e,r);for(let l of El)o&l[1]&&(i+=t(l[0]+e,r,n)+";"),c&l[1]&&(i+=t(e,l[0]+r,n)+";");return i+t(e,r,n)}})}function dr(){return{rules:[["line-clamp-none",{"-webkit-line-clamp":"unset"}],["line-clamp-",Nn("lineClamp",({_:t})=>Ks(t))],["line-clamp-(\\d+)",({1:t})=>Ks(t)]]}}function Ks(t){return{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":`${t}`}}var St={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",...G(4,"rem",4,.5,.5),...G(12,"rem",4,5),14:"3.5rem",...G(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:_("blur"),backdropBrightness:_("brightness"),backdropContrast:_("contrast"),backdropGrayscale:_("grayscale"),backdropHueRotate:_("hueRotate"),backdropInvert:_("invert"),backdropOpacity:_("opacity"),backdropSaturate:_("saturate"),backdropSepia:_("sepia"),backgroundColor:_("colors"),backgroundImage:{none:"none"},backgroundOpacity:_("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:{...G(200,"",100,0,50),...G(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:t})=>({DEFAULT:t("colors.gray.200","currentColor"),...t("colors")}),borderOpacity:_("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:_("spacing"),borderWidth:{DEFAULT:"1px",...Y(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:_("colors"),caretColor:_("colors"),accentColor:({theme:t})=>({auto:"auto",...t("colors")}),contrast:{...G(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:_("borderColor"),divideOpacity:_("borderOpacity"),divideWidth:_("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"),...$t(2,6),...$t(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:_("spacing"),gradientColorStops:_("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"),...$t(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:t})=>({...t("spacing"),...$t(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:{...G(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:{...G(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:_("spacing"),placeholderColor:_("colors"),placeholderOpacity:_("opacity"),outlineColor:_("colors"),outlineOffset:Y(8,"px"),outlineWidth:Y(8,"px"),ringColor:({theme:t})=>({...t("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:_("colors"),ringOffsetWidth:Y(8,"px"),ringOpacity:({theme:t})=>({...t("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...Y(8,"px")},rotate:{...Y(2,"deg"),...Y(12,"deg",3),...Y(180,"deg",45)},saturate:G(200,"",100,0,50),scale:{...G(150,"",100,0,50),...G(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:_("spacing"),scrollPadding:_("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...Y(2,"deg"),...Y(12,"deg",3)},space:_("spacing"),stroke:({theme:t})=>({...t("colors"),none:"none"}),strokeWidth:G(2),textColor:_("colors"),textDecorationColor:_("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...Y(8,"px")},textUnderlineOffset:{auto:"auto",...Y(8,"px")},textIndent:_("spacing"),textOpacity:_("opacity"),transitionDuration:({theme:t})=>({...t("durations"),DEFAULT:"150ms"}),transitionDelay:_("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"),...$t(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:{...G(50,"",1,0,10),auto:"auto"}};function $t(t,e){let r={};do for(var n=1;n<t;n++)r[`${n}/${t}`]=Number((n/t*100).toFixed(6))+"%";while(++t<=e);return r}function Y(t,e,r=0){let n={};for(;r<=t;r=2*r||1)n[r]=r+e;return n}function G(t,e="",r=1,n=0,i=1,s={}){for(;n<=t;n+=i)s[n]=n/r+e;return s}function _(t){return({theme:e})=>e(t)}var Ys={"*,::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, ${St.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, ${St.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 no=[m("\\[([-\\w]+):(.+)]",({1:t,2:e},r)=>({"@layer overrides":{"&":{[t]:ne(`[${e}]`,"",r)}}})),m("(group|peer)([~/][^-[]+)?",({input:t},{h:e})=>[{c:e(t)}]),g("aspect-","aspectRatio"),m("container",(t,{theme:e})=>{let{screens:r=e("screens"),center:n,padding:i}=e("container"),s={width:"100%",marginRight:n&&"auto",marginLeft:n&&"auto",...o("xs")};for(let c in r){let l=r[c];typeof l=="string"&&(s[lr(l)]={"&":{maxWidth:l,...o(c)}})}return s;function o(c){let l=i&&(typeof i=="string"?i:i[c]||i.DEFAULT);if(l)return{paddingRight:l,paddingLeft:l}}}),g("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"),g("object-","objectPosition"),m("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",pr),m("overscroll(-[xy])?-(auto|contain|none)",({1:t="",2:e})=>({["overscroll-behavior"+t]:e})),m("(static|fixed|absolute|relative|sticky)","position"),g("-?inset(-[xy])?(?:$|-)","inset",({1:t,_:e})=>({top:t!="-x"&&e,right:t!="-y"&&e,bottom:t!="-x"&&e,left:t!="-y"&&e})),g("-?(top|bottom|left|right)(?:$|-)","inset"),m("(visible|collapse)","visibility"),m("invisible",{visibility:"hidden"}),g("-?z-","zIndex"),m("flex-((row|col)(-reverse)?)","flexDirection",Qs),m("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),g("(flex-(?:grow|shrink))(?:$|-)"),g("(flex)-"),g("grow(?:$|-)","flexGrow"),g("shrink(?:$|-)","flexShrink"),g("basis-","flexBasis"),g("-?(order)-"),"-?(order)-(\\d+)",g("grid-cols-","gridTemplateColumns"),m("grid-cols-(\\d+)","gridTemplateColumns",ro),g("col-","gridColumn"),m("col-(span)-(\\d+)","gridColumn",to),g("col-start-","gridColumnStart"),m("col-start-(auto|\\d+)","gridColumnStart"),g("col-end-","gridColumnEnd"),m("col-end-(auto|\\d+)","gridColumnEnd"),g("grid-rows-","gridTemplateRows"),m("grid-rows-(\\d+)","gridTemplateRows",ro),g("row-","gridRow"),m("row-(span)-(\\d+)","gridRow",to),g("row-start-","gridRowStart"),m("row-start-(auto|\\d+)","gridRowStart"),g("row-end-","gridRowEnd"),m("row-end-(auto|\\d+)","gridRowEnd"),m("grid-flow-((row|col)(-dense)?)","gridAutoFlow",t=>pr(Qs(t))),m("grid-flow-(dense)","gridAutoFlow"),g("auto-cols-","gridAutoColumns"),g("auto-rows-","gridAutoRows"),g("gap-x(?:$|-)","gap","columnGap"),g("gap-y(?:$|-)","gap","rowGap"),g("gap(?:$|-)","gap"),"(justify-(?:items|self))-",m("justify-","justifyContent",Xs),m("(content|items|self)-",t=>({["align-"+t[1]]:Xs(t)})),m("(place-(content|items|self))-",({1:t,$$:e})=>({[t]:("wun".includes(e[3])?"space-":"")+e})),g("p([xytrbl])?(?:$|-)","padding",Qe("padding")),g("-?m([xytrbl])?(?:$|-)","margin",Qe("margin")),g("-?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"}})),g("w-","width"),g("min-w-","minWidth"),g("max-w-","maxWidth"),g("h-","height"),g("min-h-","minHeight"),g("max-h-","maxHeight"),g("font-","fontWeight"),g("font-","fontFamily",({_:t})=>typeof(t=I(t))[1]=="string"?{fontFamily:te(t)}:{fontFamily:te(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)",...ge({"--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,/*!*/ /*!*/)"})}),g("tracking-","letterSpacing"),g("leading-","lineHeight"),m("list-(inside|outside)","listStylePosition"),g("list-","listStyleType"),m("list-","listStyleType"),g("placeholder-opacity-","placeholderOpacity",({_:t})=>({"&::placeholder":{"--tw-placeholder-opacity":t}})),R("placeholder-",{property:"color",selector:"&::placeholder"}),m("text-(left|center|right|justify|start|end)","textAlign"),m("text-(ellipsis|clip)","textOverflow"),g("text-opacity-","textOpacity","--tw-text-opacity"),R("text-",{property:"color"}),g("text-","fontSize",({_:t})=>typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}),g("indent-","textIndent"),m("(overline|underline|line-through)","textDecorationLine"),m("no-underline",{textDecorationLine:"none"}),g("underline-offset-","textUnderlineOffset"),R("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),g("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"}),R("caret-",{opacityVariable:!1,opacitySection:"opacity"}),R("accent-",{opacityVariable:!1,opacitySection:"opacity"}),m("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:t})=>`linear-gradient(to ${Ae(t," ")},var(--tw-gradient-stops))`),R("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)"})),R("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)`})),R("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")),g("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),R("bg-",{section:"backgroundColor"}),g("bg-","backgroundImage"),g("bg-","backgroundPosition"),m("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",pr),g("bg-","backgroundSize"),g("rounded(?:$|-)","borderRadius"),g("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-${Ae(r[0])}-radius`]:e,[`border-${Ae(r[1])}-radius`]:e}}),m("border-(collapse|separate)","borderCollapse"),g("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),m("border-(solid|dashed|dotted|double|none)","borderStyle"),g("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:t,_:e})=>({...ge({"--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)"})),R("border-([xytrbl])-",{section:"borderColor"},Qe("border","Color")),R("border-"),g("border-([xytrbl])(?:$|-)","borderWidth",Qe("border","Width")),g("border(?:$|-)","borderWidth"),g("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"}})),g("divide-([xy])(?:$|-)","divideWidth",({1:t,_:e})=>{let r={x:"lr",y:"tb"}[t];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${t}-reverse`]:"0",[`border-${Ae(r[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${t}-reverse)))`,[`border-${Ae(r[1])}Width`]:`calc(${e} * var(--tw-divide-${t}-reverse))`}}}),R("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),g("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),R("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),g("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),m("ring-inset",{"--tw-ring-inset":"inset"}),R("ring-",{property:"--tw-ring-color"}),g("ring(?:$|-)","ringWidth",({_:t},{theme:e})=>({...ge({"--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":K(e("ringOffsetColor","","#fff")),"--tw-ring-color":K(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)"})),R("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-shadow-color":t.value,"--tw-shadow":"var(--tw-shadow-colored)"})),g("shadow(?:$|-)","boxShadow",({_:t})=>({...ge({"--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":te(t),"--tw-shadow-colored":te(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)"})),g("(opacity)-"),m("mix-blend-","mixBlendMode"),...eo(),...eo("backdrop-"),g("transition(?:$|-)","transitionProperty",(t,{theme:e})=>({transitionProperty:te(t),transitionTimingFunction:t._=="none"?void 0:te(e("transitionTimingFunction","")),transitionDuration:t._=="none"?void 0:te(e("transitionDuration",""))})),g("duration(?:$|-)","transitionDuration","transitionDuration",te),g("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",te),g("delay(?:$|-)","transitionDelay","transitionDelay",te),g("animate(?:$|-)","animation",(t,{theme:e,h:r,e:n})=>{let i=te(t),s=i.split(" "),o=e("keyframes",s[0]);return o?{["@keyframes "+(s[0]=n(r(s[0])))]:o,animation:s.join(" ")}:{animation:i}}),"(transform)-(none)",m("transform",zn),m("transform-(cpu|gpu)",({1:t})=>({"--tw-transform":io(t=="gpu")})),g("scale(-[xy])?-","scale",({1:t,_:e})=>({["--tw-scale"+(t||"-x")]:e,["--tw-scale"+(t||"-y")]:e,...zn()})),g("-?(rotate)-","rotate",Hn),g("-?(translate-[xy])-","translate",Hn),g("-?(skew-[xy])-","skew",Hn),m("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",pr),"(appearance)-",g("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",g("(cursor)-"),"(cursor)-",m("snap-(none)","scroll-snap-type"),m("snap-(x|y|both)",({1:t})=>({...ge({"--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"),g("scroll-p([xytrbl])?(?:$|-)","padding",Qe("scroll-padding")),g("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",Qe("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})=>({...ge({"--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"),g("-?(outline-offset)-"),R("outline-",{opacityVariable:!1,opacitySection:"opacity"}),g("outline-","outlineWidth"),"(pointer-events)-",g("(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"),R("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),R("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),g("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 pr(t){return(typeof t=="string"?t:t[1]).replace(/-/g," ").trim()}function Qs(t){return(typeof t=="string"?t:t[1]).replace("col","column")}function Ae(t,e="-"){let r=[];for(let n of t)r.push({t:"top",r:"right",b:"bottom",l:"left"}[n]);return r.join(e)}function te(t){return t&&""+(t._||t)}function Xs({$$:t}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[t[3]||""]||"")+t}function Qe(t,e=""){return({1:r,_:n})=>{let i={x:"lr",y:"tb"}[r]||r+r;return i?{...kt(t+"-"+Ae(i[0])+e,n),...kt(t+"-"+Ae(i[1])+e,n)}:kt(t+e,n)}}function eo(t=""){let e=["blur","brightness","contrast","grayscale","hue-rotate","invert",t&&"opacity","saturate","sepia",!t&&"drop-shadow"].filter(Boolean),r={};for(let n of e)r[`--tw-${t}${n}`]="var(--tw-empty,/*!*/ /*!*/)";return r={...ge(r),[`${t}filter`]:e.map(n=>`var(--tw-${t}${n})`).join(" ")},[`(${t}filter)-(none)`,m(`${t}filter`,r),...e.map(n=>g(`${n[0]=="h"?"-?":""}(${t}${n})(?:$|-)`,n,({1:i,_:s})=>({[`--tw-${i}`]:I(s).map(o=>`${n}(${o})`).join(" "),...r})))]}function Hn({1:t,_:e}){return{["--tw-"+t]:e,...zn()}}function zn(){return{...ge({"--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 to({1:t,2:e}){return`${t} ${e} / ${t} ${e}`}function ro({1:t}){return`repeat(${t},minmax(0,1fr))`}function ge(t){return{"@layer defaults":{"*,::before,::after":t,"::backdrop":t}}}var so=[["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)||ne(e,"",r)||`${e}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:t,3:e="",4:r,5:n="",6:i=e},{e:s,h:o,v:c})=>{let l=Ye(n)||(r[0]=="["?r:c(r.slice(1)));return`${(l.includes("&")?l:"&"+l).replace(/&/g,`:merge(.${s(o(t+i))})`)}${t[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:t})=>`[dir="${t}"] &`],["supports-",({$$:t},e)=>{if(t&&(t=e.theme("supports",t)||ne(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)||ne(t,"",e)),typeof t=="string")return`@media not all and (min-width:${t})`}],["min-",({$$:t},e)=>(t&&(t=ne(t,"",e)),t&&`@media (min-width:${t})`)],[/^\[(.+)]$/,({1:t})=>/[&@]/.test(t)&&Ye(t).replace(/[}]+$/,"").split("{")]];function oo({colors:t,disablePreflight:e}={}){return{preflight:e?void 0:Ys,theme:{...St,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...t}},variants:so,rules:no,finalize(r){return r.n&&r.d&&r.r.some(n=>/^&::(before|after)$/.test(n))&&!/(^|;)content:/.test(r.d)?{...r,d:"content:var(--tw-content);"+r.d}:r}}}var _l={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},Ml={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},Il={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},Al={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},Tl={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},Ll={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},jl={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},Dl={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},Ol={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},Ul={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},Pl={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},Rl={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},Bl={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},ql={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},Vl={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},Fl={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},Nl={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},Hl={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},zl={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},Wl={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},Gl={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},Zl={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},ao={__proto__:null,slate:_l,gray:Ml,zinc:Il,neutral:Al,stone:Tl,red:Ll,orange:jl,amber:Dl,yellow:Ol,lime:Ul,green:Pl,emerald:Rl,teal:Bl,cyan:ql,sky:Vl,blue:Fl,indigo:Nl,violet:Hl,purple:zl,fuchsia:Wl,pink:Gl,rose:Zl};function fr({disablePreflight:t}={}){return oo({colors:ao,disablePreflight:t})}function mr({className:t="prose",defaultColor:e="gray",extend:r={},colors:n={}}={}){return n={body:"700",headings:"900",lead:"600",links:"900",bold:"900",counters:"500",bullets:"300",hr:"200",quotes:"900","quote-borders":"200",captions:"500",code:"900","pre-code":"200","pre-bg":"800","th-borders":"300","td-borders":"200",...n,dark:n.dark===null?null:{body:"300",headings:"#fff",lead:"400",links:"#fff",bold:"#fff",counters:"400",bullets:"600",hr:"700",quotes:"100","quote-borders":"700",captions:"400",code:"#fff","pre-code":"300","pre-bg":"rgb(0 0 0 / 50%)","th-borders":"600","td-borders":"700",...n.dark}},{variants:[["headings","h1,h2,h3,h4,h5,h6,th"],["h1"],["h2"],["h3"],["h4"],["h5"],["h6"],["p"],["a"],["blockquote"],["figure"],["figcaption"],["strong"],["em"],["code"],["pre"],["ol"],["ul"],["li"],["table"],["thead"],["tr"],["th"],["td"],["img"],["video"],["hr"],["lead",".lead"]].map(([s,o=s])=>[`${t}-${s}`,(c,l)=>uo(t,o[0]=="."?"."+l.e(l.h(o.slice(1))):o,l,a=>`& :is(${a.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 c=co(o.theme("fontSize",s));return c&&{"@layer components":c}}],[t+"-",({$$:s},o)=>i(s,o)],[t,(s,o)=>({...i(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:k(20,16),marginBottom:k(20,16),paddingLeft:k(26,16)},li:{marginTop:k(8,16),marginBottom:k(8,16)},"ol>li,ul>li":{paddingLeft:k(6,16)},">ul>li p":{marginTop:k(12,16),marginBottom:k(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:k(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:k(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:k(12,16),marginBottom:k(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:k(48,16),marginBottom:k(48,16)},blockquote:{marginTop:k(32,20),marginBottom:k(32,20),paddingLeft:k(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:k(20,16),marginBottom:k(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:k(36,16),marginTop:"0",marginBottom:k(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900",color:"inherit"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:k(24,16),marginTop:k(48,24),marginBottom:k(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800",color:"inherit"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:k(20,16),marginTop:k(32,20),marginBottom:k(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700",color:"inherit"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:k(24,16),marginBottom:k(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700",color:"inherit"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:k(32,16),marginBottom:k(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:k(14,16),lineHeight:"1.4",marginTop:k(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:k(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:k(21,24)},"h3 code":{fontSize:k(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:k(14,16),lineHeight:"1.7",marginTop:k(24,14),marginBottom:k(24,14),borderRadius:"0.375rem",paddingTop:k(12,14),paddingRight:k(16,14),paddingBottom:k(12,14),paddingLeft:k(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:k(32,16),marginBottom:k(32,16),fontSize:k(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:k(8,14),paddingBottom:k(8,14),paddingLeft:k(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:k(8,14),paddingRight:k(8,14),paddingBottom:k(8,14),paddingLeft:k(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:k(20,16),lineHeight:"1.6",marginTop:k(24,20),marginBottom:k(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),lo(t,o,r)],"@layer components":{...co(o.theme("fontSize","base")),color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"}})]]};function i(s,o){let c={},l={},a=(h,d,f)=>{let p=o.theme(`colors.${s}.${d}`,d);f["--tw-prose-"+h]=K(p);let y=f!=l&&o.d("colors",`${s}-${d}`,p);y&&(l["--tw-prose-"+h]=K(y))};for(let h in n){let d=n[h];h!="dark"&&d&&a(h,d,c)}for(let h in n.dark||{}){let d=n.dark[h];d&&(n.dark?a("invert-"+h,d,c):a(h,d,l))}return Object.keys(c).length?{"@layer defaults":{"&":c,[o.v("dark")]:l}}:void 0}}function lo(t,e,r){let n={};for(let i in r)n[uo(t,i,e,s=>`.${e.e(e.h(t))}${s}`)]=r[i];return n}function uo(t,e,{e:r,h:n},i){return e.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(s,o=" ",c=s,l="")=>i(`${o}:where(${c}):not(:where(.${r(n("not-"+t))} *))${l}`))}function co(t){return t?typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}:void 0}function k(t,e){return`${(t/e).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}var Wn=Ct({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:[fr(),hr(),dr(),mr()]});function gr(t,e=!0){let r=(function(){if(Jl)try{let l=ur(new CSSStyleSheet);return l.connect=a=>{let h=Gn(a);h.adoptedStyleSheets=[...h.adoptedStyleSheets,l.target]},l.disconnect=cr,l}catch{}let s=document.createElement("style");s.media="not all",document.head.prepend(s);let o=[ur(s)],c=new WeakMap;return{get target(){return o[0].target},snapshot(){let l=o.map(a=>a.snapshot());return()=>l.forEach(a=>a())},clear(){o.forEach(l=>l.clear())},destroy(){o.forEach(l=>l.destroy())},insert(l,a,h){o[0].insert(l,a,h);let d=this.target.cssRules[a];o.forEach((f,p)=>p&&f.target.insertRule(d.cssText,a))},resume(l,a){return o[0].resume(l,a)},connect(l){let a=document.createElement("style");Gn(l).appendChild(a);let h=ur(a),{cssRules:d}=this.target;for(let f=0;f<d.length;f++)h.target.insertRule(d[f].cssText,f);o.push(h),c.set(l,h)},disconnect(l){let a=o.indexOf(c.get(l));a>=0&&o.splice(a,1)}}})(),n=zs({...t,hash:t.hash??e},r),i=Ws(n);return function(o){return class extends o{connectedCallback(){super.connectedCallback?.(),r.connect(this),i.observe(Gn(this))}disconnectedCallback(){r.disconnect(this),super.disconnectedCallback?.()}constructor(...l){super(...l),this.tw=n}}}}var Jl=typeof ShadowRoot<"u"&&(typeof ShadyCSS>"u"||ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;function Gn(t){return t.shadowRoot||t.attachShadow({mode:"open"})}var C=t=>gr(Wn)(t);var Zn=class extends C(v){static properties={color:{type:String},radius:{type:String},size:{type:String},border:{type:String}};static styles=D`
130
+ </svg>`};var Ka=ns,ln=class extends Yt{resolveIcon(e){let r=Ka[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",ln);var Xt=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.#n()}hostConnected(){this.#r||setTimeout(()=>{this.#r||(this.#r=this.#n())},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}#n(){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 cn=t=>!!(t&&t.constructor&&t.call&&t.apply);var is=t=>!(!t||!t.then||!cn(t.then));var ss=(t,e,r=!1)=>{if(!t)return[];let n=(s,o)=>e(s)-e(o),i=(s,o)=>e(o)-e(s);return t.slice().sort(r===!0?i:n)};function*un(t,e,r=i=>i,n=1){let i=cn(r)?r:()=>r,s=e?t:0,o=e??t;for(let a=s;a<=o&&(yield i(a),!(a+n>o));a+=n);}var os=(t,e,r,n)=>Array.from(un(t,e,r,n));var as=(t,e)=>t?t.reduce((r,n)=>{let[i,s]=r;return e(n)?[[...i,n],s]:[i,[...s,n]]},[[],[]]):[[],[]];var dn=class extends Error{constructor(e=[]){super();let r=e.find(n=>n.name)?.name??"";this.name=`AggregateError(${r}...)`,this.message=`AggregateError with ${e.length} errors`,this.stack=e.find(n=>n.stack)?.stack??this.stack,this.errors=e}},hn=async(t,e,r)=>{let n=e.map((c,u)=>({index:u,item:c})),i=async c=>{let u=[];for(;;){let h=n.pop();if(!h)return c(u);let[p,y]=await Qt(r)(h.item);u.push({error:p,result:y,index:h.index})}},s=os(1,t).map(()=>new Promise(i)),o=await Promise.all(s),[a,l]=as(ss(o.flat(),c=>c.index),c=>!!c.error);if(a.length>0)throw new dn(a.map(c=>c.error));return l.map(c=>c.result)};var pn=async(t,e)=>{let r=t?.times??3,n=t?.delay,i=t?.backoff??null;for(let s of un(1,r)){let[o,a]=await Qt(e)(l=>{throw{_exited:l}});if(!o)return a;if(o._exited)throw o._exited;if(s===r)throw o;n&&await qe(n),i&&await qe(i(s))}},qe=t=>new Promise(e=>setTimeout(e,t)),Qt=t=>(...e)=>{try{let r=t(...e);return is(r)?r.then(n=>[void 0,n]).catch(n=>[n,void 0]):[void 0,r]}catch(r){return[r,void 0]}};var Fe=({interval:t},e)=>{let r=!0,n,i=(...s)=>{r&&(e(...s),r=!1,n=setTimeout(()=>{r=!0,n=void 0},t))};return i.isThrottled=()=>n!==void 0,i};async function ls(t,e){let r=t?.times??3,n=t?.delay,i=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;n&&await qe(n),i&&await qe(i(o+1))}throw new Error("unreachable")}var Ya=!0,fn="Invariant failed";function J(t,e){if(!t){if(Ya)throw new Error(fn);var r=typeof e=="function"?e():e,n=r?"".concat(fn,": ").concat(r):fn;throw new Error(n)}}var er=class{#e;#t;#r=null;isStreaming=!1;typingIndicator;ranOutOfCredits=!1;messages=[];conversationId="";#n=0;#i;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 n=this.#s[this.#s.length-1];if(e.type==="USER_INPUT"&&n.message.type==="USER_INPUT"&&e.value===n.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 ls({times:5,delay:2e3},async()=>{if(this.#r?.isConnected){let n=[...this.#s];this.#s=[],this.#e.requestUpdate();let i=!1;for(let{message:s,options:o}of n){let a=this.#o(s,o);s===e&&(i=a)}return i}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:n,role:i="user",expectStreaming:s=!1,requestInputResponse:o}={}){return this.enqueueMessage({type:"USER_INPUT",value:e,role:i,xUserData:r,xCustomInstructions:n,requestInputResponse:o},{expectStreaming:s})}async enqueueUserInput(e,{xUserData:r,xCustomInstructions:n,role:i="user",expectStreaming:s=!1,requestInputResponse:o}={}){return this.enqueueMessage({type:"USER_INPUT",value:e,role:i,xUserData:r,xCustomInstructions:n,requestInputResponse:o},{expectStreaming:s})}sendImageDelete(e){J(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.#i),this.#i=setTimeout(()=>{this.#t.onReconnect?.(),this.#r=this.initWS()},1e3*this.#n),this.#n++}initWS(){return new Xt(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.#n=0}#d(e){switch(e.type){case"NEW_MESSAGE":{this.messages=[...this.messages,{...e.message,streaming:!0}].filter((r,n,i)=>n===i.findIndex(s=>s.id===r.id)),this.typingIndicator=void 0,this.#e.requestUpdate(),this.#t.onNewMessage?.(e.message),this.#t.persistConversationState?.(this.conversationId,this.messages);break}case"APPEND_MESSAGE":{let r=this.messages.find(n=>n.id===e.message.id);if(r){switch(e.message.content_type){case"text":{let{part:n,delta:i,position:s}=e.message;r.content=r.content.slice(0,s)+i,r.parts||=[],r.parts[n]={text:r.parts[n]&&"text"in r.parts[n]?(r.parts[n].text||"").slice(0,s)+i:i};break}case"html":{let{part:n,delta:i,position:s}=e.message;r.parts||=[],r.parts[n]={html:r.parts[n]&&"html"in r.parts[n]?(r.parts[n].html||"").slice(0,s)+i:i};break}case"data":{let{part:n}=e.message;r.parts||=[],r.parts[n]={tag:e.message.tag,data:r.parts[n]&&"data"in r.parts[n]?Object.assign(r.parts[n].data||{},e.message.data):e.message.data};break}}e.metadata&&(r.metadata=e.metadata),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(n=>n.id===e.message.id);if(r)Object.assign(r,e.message),r.streaming=!1;else throw new Error(`Message with id ${e.message.id} not found`);this.isStreaming=!1,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.#i)}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 Id=Symbol(),Xa=Symbol();var cs=Object.getPrototypeOf,mn=new WeakMap,Qa=t=>t&&(mn.has(t)?mn.get(t):cs(t)===Object.prototype||cs(t)===Array.prototype);var us=t=>Qa(t)&&t[Xa]||null,gn=(t,e=!0)=>{mn.set(t,e)};var yn=t=>typeof t=="object"&&t!==null,el=t=>yn(t)&&!vn.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),ps=(t,e)=>{let r=ds.get(t);if(r?.[0]===e)return r[1];let n=Array.isArray(t)?[]:Object.create(Object.getPrototypeOf(t));return gn(n,!0),ds.set(t,[e,n]),Reflect.ownKeys(t).forEach(i=>{if(Object.getOwnPropertyDescriptor(n,i))return;let s=Reflect.get(t,i),{enumerable:o}=Reflect.getOwnPropertyDescriptor(t,i),a={value:s,enumerable:o,configurable:!0};if(vn.has(s))gn(s,!1);else if(Ie.has(s)){let[l,c]=Ie.get(s);a.value=ps(l,c())}Object.defineProperty(n,i,a)}),Object.preventExtensions(n)},tl=(t,e,r,n)=>({deleteProperty(i,s){let o=Reflect.get(i,s);r(s);let a=Reflect.deleteProperty(i,s);return a&&n(["delete",[s],o]),a},set(i,s,o,a){let l=!t()&&Reflect.has(i,s),c=Reflect.get(i,s,a);if(l&&(hs(c,o)||tr.has(o)&&hs(c,tr.get(o))))return!0;r(s),yn(o)&&(o=us(o)||o);let u=!Ie.has(o)&&nl(o)?bn(o):o;return e(s,u),Reflect.set(i,s,u,a),n(["set",[s],o,c]),!0}}),Ie=new WeakMap,vn=new WeakSet,ds=new WeakMap,wn=[1],tr=new WeakMap,hs=Object.is,rl=(t,e)=>new Proxy(t,e),nl=el,il=ps,sl=tl;function bn(t={}){if(!yn(t))throw new Error("object required");let e=tr.get(t);if(e)return e;let r=wn[0],n=new Set,i=(b,S=++wn[0])=>{r!==S&&(s=r=S,n.forEach(w=>w(b,S)))},s=r,o=(b=wn[0])=>(s!==b&&(s=b,l.forEach(([S])=>{let w=S[1](b);w>r&&(r=w)})),r),a=b=>(S,w)=>{let x=[...S];x[1]=[b,...x[1]],i(x,w)},l=new Map,c=(b,S)=>{let w=!vn.has(S)&&Ie.get(S);if(w){if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&l.has(b))throw new Error("prop listener already exists");if(n.size){let x=w[2](a(b));l.set(b,[w,x])}else l.set(b,[w])}},u=b=>{var S;let w=l.get(b);w&&(l.delete(b),(S=w[1])==null||S.call(w))},h=b=>(n.add(b),n.size===1&&l.forEach(([w,x],E)=>{if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&x)throw new Error("remove already exists");let T=w[2](a(E));l.set(E,[w,T])}),()=>{n.delete(b),n.size===0&&l.forEach(([w,x],E)=>{x&&(x(),l.set(E,[w]))})}),p=!0,y=sl(()=>p,c,u,i),g=rl(t,y);tr.set(t,g);let $=[t,o,h];return Ie.set(g,$),Reflect.ownKeys(t).forEach(b=>{let S=Object.getOwnPropertyDescriptor(t,b);"value"in S&&S.writable&&(g[b]=t[b])}),p=!1,g}function rr(t,e,r){let n=Ie.get(t);(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!n&&console.warn("Please use proxy object");let i,s=[],o=n[2],a=!1,c=o(u=>{if(s.push(u),r){e(s.splice(0));return}i||(i=Promise.resolve().then(()=>{i=void 0,a&&e(s.splice(0))}))});return a=!0,()=>{a=!1,c()}}function Ve(t){let e=Ie.get(t);(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!e&&console.warn("Please use proxy object");let[r,n]=e;return il(r,n())}var Ne=class{#e;#t;#r;#n=()=>{};constructor(e,r){this.#e=e,this.#t=r,this.#r=Ve(r),e.addController(this)}get state(){return this.#r}get value(){return this.#r}hostConnected(){this.#n(),this.#n=rr(this.#t,()=>{this.#r=Ve(this.#t),this.#e.requestUpdate()})}hostDisconnected(){this.#n()}};var me=class{#e;#t;proxyObject;#r;#n=()=>{};constructor(e,r,n){this.#e=e,this.#t=n,this.proxyObject=bn(r),this.#r=Ve(this.proxyObject),e.addController(this)}get state(){return this.#r}get value(){return this.#r}hostConnected(){this.#n(),this.#t?.subscribe&&(this.#n=rr(this.proxyObject,()=>{this.#r=Ve(this.proxyObject),this.#e.requestUpdate()}))}hostDisconnected(){this.#n()}};var nr=class{#e;#t;#r;#n=null;#i=null;constructor(e,{provider:r,tag:n,key:i}){this.#e=e,this.#t=n,this.#r=i,e.addController(this)}get value(){return this.#i?this.#i.value:null}hostConnected(){if(this.#i||(this.#n=ol(this.#e,this.#t),!this.#n))return;let e=this.#n[this.#r]instanceof me?this.#n[this.#r]:null;e&&(this.#i=new Ne(this.#e,e.proxyObject))}hostDisconnected(){}};function ol(t,e){let r=t;for(;r;){let n=r.closest(e);if(n)return n;let i=r.getRootNode();if(i instanceof ShadowRoot)r=i.host;else break}return null}var fs=()=>{if(window.Shopify)try{return{customerId:al()}}catch{return null}return null},al=()=>{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},ms=async()=>{try{return(await(await fetch(window.Shopify.routes.root+"cart.js")).json()).items.map(n=>({id:n.id,name:n.title,quantity:n.quantity,price:n.price,variantId:n.variant_id,sku:n.sku,url:n.url,description:n.product_description,image:n.featured_image?.url}))}catch{return[]}};function gs(t,e="http"){return t.startsWith("http://")||t.startsWith("https://")?t:`${e}://${t}`}function xn(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 ws(t,e){let r=t instanceof URL?t:new URL(t);if(e)for(let[n,i]of e)r.searchParams.set(n,i);return r}var ys=()=>{if(window.ShopRenter)try{let t=cl();return{customerEmail:t?.customerEmail,customerId:t?.customerId,customerName:t?.customerName}}catch{return null}return null},cl=()=>{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=gs(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 bs=()=>{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},xs=async()=>new Promise((t,e)=>{try{window.UNAS.getCart(r=>{let i=r.items.map(s=>({id:s.id,name:s.name,quantity:s.quantity,price:s.price,sku:s.sku}));t(i)})}catch(r){console.error("Error fetching cart information:",r),e(r)}});var kn;function Cn(t){return{lang:t?.lang??kn?.lang,message:t?.message,abortEarly:t?.abortEarly??kn?.abortEarly,abortPipeEarly:t?.abortPipeEarly??kn?.abortPipeEarly}}var hl;function pl(t){return hl?.get(t)}var fl;function ml(t){return fl?.get(t)}var gl;function wl(t,e){return gl?.get(t)?.get(e)}function Cs(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 V(t,e,r,n,i){let s=i&&"input"in i?i.input:r.value,o=i?.expected??t.expects??null,a=i?.received??Cs(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:i?.path,issues:i?.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=t.kind==="schema",u=i?.message??t.message??wl(t.reference,l.lang)??(c?ml(l.lang):null)??n.message??pl(l.lang);u!==void 0&&(l.message=typeof u=="function"?u(l):u),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},Cn())}}}function $s(t,e){return Object.hasOwn(t,e)&&e!=="__proto__"&&e!=="prototype"&&e!=="constructor"}function Ss(t,e){let r=[...new Set(t)];return r.length>1?`(${r.join(` ${e} `)})`:r[0]??"never"}var yl=class extends Error{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}};function $n(t,e){return{kind:"validation",type:"max_length",reference:$n,async:!1,expects:`<=${t}`,requirement:t,message:e,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&V(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Sn(t,e){return{kind:"validation",type:"min_length",reference:Sn,async:!1,expects:`>=${t}`,requirement:t,message:e,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&V(this,"length",r,n,{received:`${r.value.length}`}),r}}}function vt(t){return{kind:"transformation",type:"transform",reference:vt,async:!1,operation:t,"~run"(e){return e.value=this.operation(e.value),e}}}function Es(t,e,r){return typeof t.fallback=="function"?t.fallback(e,r):t.fallback}function En(t,e,r){return typeof t.default=="function"?t.default(e,r):t.default}function bt(){return{kind:"schema",type:"any",reference:bt,expects:"any",async:!1,get"~standard"(){return z(this)},"~run"(t){return t.typed=!0,t}}}function He(t,e){return{kind:"schema",type:"array",reference:He,expects:"Array",async:!1,item:t,message:e,get"~standard"(){return z(this)},"~run"(r,n){let i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let s=0;s<i.length;s++){let o=i[s],a=this.item["~run"]({value:o},n);if(a.issues){let l={type:"array",origin:"value",input:i,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),n.abortEarly){r.typed=!1;break}}a.typed||(r.typed=!1),r.value.push(a.value)}}else V(this,"type",r,n);return r}}}function _n(t){return{kind:"schema",type:"boolean",reference:_n,expects:"boolean",async:!1,message:t,get"~standard"(){return z(this)},"~run"(e,r){return typeof e.value=="boolean"?e.typed=!0:V(this,"type",e,r),e}}}function Mn(t,e){return{kind:"schema",type:"loose_object",reference:Mn,expects:"Object",async:!1,entries:t,message:e,get"~standard"(){return z(this)},"~run"(r,n){let i=r.value;if(i&&typeof i=="object"){r.typed=!0,r.value={};for(let s in this.entries){let o=this.entries[s];if(s in i||(o.type==="exact_optional"||o.type==="optional"||o.type==="nullish")&&o.default!==void 0){let a=s in i?i[s]:En(o),l=o["~run"]({value:a},n);if(l.issues){let c={type:"object",origin:"value",input:i,key:s,value:a};for(let u of l.issues)u.path?u.path.unshift(c):u.path=[c],r.issues?.push(u);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value[s]=l.value}else if(o.fallback!==void 0)r.value[s]=Es(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(V(this,"key",r,n,{input:void 0,expected:`"${s}"`,path:[{type:"object",origin:"key",input:i,key:s,value:i[s]}]}),n.abortEarly))break}if(!r.issues||!n.abortEarly)for(let s in i)$s(i,s)&&!(s in this.entries)&&(r.value[s]=i[s])}else V(this,"type",r,n);return r}}}function In(t){return{kind:"schema",type:"null",reference:In,expects:"null",async:!1,message:t,get"~standard"(){return z(this)},"~run"(e,r){return e.value===null?e.typed=!0:V(this,"type",e,r),e}}}function ir(t){return{kind:"schema",type:"number",reference:ir,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:V(this,"type",e,r),e}}}function ie(t,e){return{kind:"schema",type:"object",reference:ie,expects:"Object",async:!1,entries:t,message:e,get"~standard"(){return z(this)},"~run"(r,n){let i=r.value;if(i&&typeof i=="object"){r.typed=!0,r.value={};for(let s in this.entries){let o=this.entries[s];if(s in i||(o.type==="exact_optional"||o.type==="optional"||o.type==="nullish")&&o.default!==void 0){let a=s in i?i[s]:En(o),l=o["~run"]({value:a},n);if(l.issues){let c={type:"object",origin:"value",input:i,key:s,value:a};for(let u of l.issues)u.path?u.path.unshift(c):u.path=[c],r.issues?.push(u);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value[s]=l.value}else if(o.fallback!==void 0)r.value[s]=Es(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(V(this,"key",r,n,{input:void 0,expected:`"${s}"`,path:[{type:"object",origin:"key",input:i,key:s,value:i[s]}]}),n.abortEarly))break}}else V(this,"type",r,n);return r}}}function ze(t,e){return{kind:"schema",type:"optional",reference:ze,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,get"~standard"(){return z(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=En(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function An(t,e){return{kind:"schema",type:"picklist",reference:An,expects:Ss(t.map(Cs),"|"),async:!1,options:t,message:e,get"~standard"(){return z(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:V(this,"type",r,n),r}}}function sr(t,e,r){return{kind:"schema",type:"record",reference:sr,expects:"Object",async:!1,key:t,value:e,message:r,get"~standard"(){return z(this)},"~run"(n,i){let s=n.value;if(s&&typeof s=="object"){n.typed=!0,n.value={};for(let o in s)if($s(s,o)){let a=s[o],l=this.key["~run"]({value:o},i);if(l.issues){let u={type:"object",origin:"key",input:s,key:o,value:a};for(let h of l.issues)h.path=[u],n.issues?.push(h);if(n.issues||(n.issues=l.issues),i.abortEarly){n.typed=!1;break}}let c=this.value["~run"]({value:a},i);if(c.issues){let u={type:"object",origin:"value",input:s,key:o,value:a};for(let h of c.issues)h.path?h.path.unshift(u):h.path=[u],n.issues?.push(h);if(n.issues||(n.issues=c.issues),i.abortEarly){n.typed=!1;break}}(!l.typed||!c.typed)&&(n.typed=!1),l.typed&&(n.value[l.value]=c.value)}}else V(this,"type",n,i);return n}}}function O(t){return{kind:"schema",type:"string",reference:O,expects:"string",async:!1,message:t,get"~standard"(){return z(this)},"~run"(e,r){return typeof e.value=="string"?e.typed=!0:V(this,"type",e,r),e}}}function ks(t){let e;if(t)for(let r of t)e?e.push(...r.issues):e=r.issues;return e}function or(t,e){return{kind:"schema",type:"union",reference:or,expects:Ss(t.map(r=>r.expects),"|"),async:!1,options:t,message:e,get"~standard"(){return z(this)},"~run"(r,n){let i,s,o;for(let a of this.options){let l=a["~run"]({value:r.value},n);if(l.typed)if(l.issues)s?s.push(l):s=[l];else{i=l;break}else o?o.push(l):o=[l]}if(i)return i;if(s){if(s.length===1)return s[0];V(this,"type",r,n,{issues:ks(s)}),r.typed=!0}else{if(o?.length===1)return o[0];V(this,"type",r,n,{issues:ks(o)})}return r}}}function _s(t,e,r){let n=t["~run"]({value:e},Cn(r));if(n.issues)throw new yl(n.issues);return n.value}function Ms(t,e){let r={};for(let n in t.entries)r[n]=!e||e.includes(n)?ze(t.entries[n]):t.entries[n];return{...t,entries:r,get"~standard"(){return z(this)}}}function We(...t){return{...t[0],pipe:t,get"~standard"(){return z(this)},"~run"(e,r){for(let n of t)if(n.kind!=="metadata"){if(e.issues&&(n.kind==="schema"||n.kind==="transformation")){e.typed=!1;break}(!e.issues||!r.abortEarly&&!r.abortPipeEarly)&&(e=n["~run"](e,r))}return e}}}function xt(t,e,r){let n=t["~run"]({value:e},Cn(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var Is=sr(O(),or([O(),ir(),_n(),In()])),As=We(O(),Sn(1),$n(5e3)),Ts=()=>{try{return window.UNAS?bs():window.Shopify?fs():window.ShopRenter?ys():null}catch{return null}},Ls=async()=>{try{return window.UNAS?await xs():window.Shopify?await ms():window.ShopRenter?await vs():[]}catch{return[]}},Ge={schema:ie({conversationId:ze(O()),messages:ze(He(ie({id:O(),timestamp:ir(),role:An(["user","assistant","support"]),content:O(),parts:ze(He(or([ie({text:O()}),ie({html:O()}),ie({tag:O(),data:sr(O(),bt())})])))})))}),getStorageKey(t){if(!t)throw new Error("widgetId is not set");return`_molin_${t}`},persist(t,e,r){let n=this.getStorageKey(t);localStorage.setItem(n,JSON.stringify({conversationId:e,messages:r}))},restore(t){try{let e=this.getStorageKey(t),r=JSON.parse(localStorage.getItem(e)||"{}"),n=_s(this.schema,r);return{conversationId:n.conversationId||"",messages:n.messages||[]}}catch(e){return console.error("Failed to restore conversation state:",e),{conversationId:"",messages:[]}}},reset(t){let e=this.getStorageKey(t);localStorage.removeItem(e)}};var Ze=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 me(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.#i.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.#i.sendImageDelete.bind(this.#i)})}connectedCallback(){super.connectedCallback(),this.updated()}updated(){this.autoConnect&&this.#i.connect(),Object.assign(this.contextCtrl.proxyObject,{widgetId:this.widgetId,config:this.config,callbacks:this.callbacks,xUserData:this.#t,xCustomInstructions:this.#r,conversationId:this.#i.conversationId,messages:this.#e,isStreaming:this.#i.isStreaming,typingIndicator:this.#i.typingIndicator,ranOutOfCredits:this.#i.ranOutOfCredits,isLiveMode:this.#i.isLiveMode,lastMsg:this.#i.lastMsg,hasQueuedMessages:this.#i.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.#i.sendImageDelete.bind(this.#i)}),this.#s()}get#e(){return this.#i?.ranOutOfCredits?[{id:crypto.randomUUID(),role:"assistant",content:"Sorry, I've run out of credits. Please contact the shop directly.",timestamp:Date.now()}]:this.#i?.messages||[]}#t;#r;#n=null;get#i(){return this.#n||(this.#n=new er(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.#i.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.#i.conversationId})},onMessageError:e=>{console.error("ws message error",e),e.message&&this.callbacks.onError?.({widgetId:this.widgetId,error:"WS: "+e.message})},onReset:()=>{Ge.reset(this.widgetId)},onConnect:(e,r)=>{let n=Ts();this.#i.sendUserMeta({xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,customerInformation:n,language:window.navigator.language,cart:[]}),Ls().then(i=>{i?.length>0&&this.#i.sendUserMeta({xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,customerInformation:n,cart:i,language:window.navigator.language})}).catch(i=>{console.error(i)}),this.dispatchEvent(new t.ConnectedEvent({conversationId:e,metadata:r,widgetId:this.widgetId,pendingImages:r?.pendingImages||[]}))},persistConversationState:(e,r)=>{Ge.persist(this.widgetId,e,r)},restoreConversationState:()=>Ge.restore(this.widgetId)})),this.#n}#s(){function e(n){if(!n)return;let i;try{i=typeof n=="object"?n:JSON.parse(n)}catch(o){console.error("Molin: user-data is not valid JSON",o);return}if(!i||typeof i!="object"||Object.keys(i).length===0)return;let s=xt(Is,i);if(!s.success){console.error("Molin: user-data does not pass schema validation",s.issues);return}return s.output}function r(n){if(!n)return;let i=xt(As,n);if(!i.success){console.error("Molin: custom-instructions does not pass schema validation",i.issues);return}return i.output}this.#t=e(this.xUserData),this.#r=r(this.xCustomInstructions)}async sendUserInput(e,r={}){let n={xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,...r},i=await this.#i.sendUserInput(e,n);return i&&this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:e,example:!1,conversationId:this.#i.conversationId}),i}async enqueueUserInput(e,r={}){this.#e.some(s=>s.role==="assistant"&&s.parts?.some(o=>"tag"in o&&o.tag==="request-input-v1"&&"data"in o&&o.data.type==="new-conversation-button"))&&(this.sendNewChat(),this.reset());let i={xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,role:"user",expectStreaming:!0,...r};return this.#i.enqueueUserInput(e,i)}sendUserCancel(){this.#i.sendUserCancel(),this.callbacks.onUserCanceledStreaming?.({widgetId:this.widgetId})}sendUserTypingStart(){this.#i.sendUserTypingStart()}sendUserTypingStop(){this.#i.sendUserTypingStop()}sendNewChat(){this.#i.sendNewChat()}reset(){this.#i.reset()}reloadConfig(){this.#i.reloadConfig()}connect(){this.#i.connect()}render(){return d`<slot></slot>`}};function js(t){let e=new nr(t,{provider:Ze,tag:"mw-context-widget",key:"contextCtrl"});return new Proxy({value:null},{get(r,n){if(n==="value")return e.value}})}Ze.ConnectedEvent=class extends CustomEvent{static type="mw-context-widget:connected";constructor(e,r={}){super(Ze.ConnectedEvent.type,{detail:e,bubbles:!0,composed:!0,...r})}};customElements.get("mw-context-widget")||customElements.define("mw-context-widget",Ze);function qn(t){return[...t.v,(t.i?"!":"")+t.n].join(":")}function vl(t,e=","){return t.map(qn).join(e)}var qs=typeof CSS<"u"&&CSS.escape||(t=>t.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function ar(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 ur(t,e="@media "){return e+I(t).map(r=>(typeof r=="string"&&(r={min:r}),r.raw||Object.keys(r).map(n=>`(${n}-width:${r[n]})`).join(" and "))).join(",")}function I(t=[]){return Array.isArray(t)?t:t==null?[]:[t]}function Ds(t){return t}function dr(){}var P={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function Fs(t){return t.match(/[-=:;]/g)?.length||0}function On(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(Fs(t),15)<<18}var bl=["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 Fn({n:t,i:e,v:r=[]},n,i,s){t&&(t=qn({n:t,i:e,v:r})),s=[...I(s)];for(let a of r){let l=n.theme("screens",a);for(let c of I(l&&ur(l)||n.v(a))){var o;s.push(c),i|=l?67108864|On(c):a=="dark"?1073741824:c[0]=="@"?On(c):(o=c,1<<~(/:([a-z-]+)/.test(o)&&~bl.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:t,p:i,r:s,i:e}}var Vs=new Map;function Un(t){if(t.d){let e=[],r=Tn(t.r.reduce((n,i)=>i[0]=="@"?(e.push(i),n):i?Tn(n,s=>Tn(i,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):Ln(s,o)}return Ln(o,s)})):n,"&"),n=>Ln(n,t.n?"."+qs(t.n):""));return r&&e.push(r.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((n,i)=>i+"{"+n+"}",t.d)}}function Tn(t,e){return t.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(r,n,i)=>e(n)+i)}function Ln(t,e){return t.replace(/&/g,e)}var Os=new Intl.Collator("en",{numeric:!0});function Ns(t,e){for(var r=0,n=t.length;r<n;){let i=n+r>>1;0>=Hs(t[i],e)?r=i+1:n=i}return n}function Hs(t,e){let r=t.p&P.o;return r==(e.p&P.o)&&(r==P.b||r==P.o)?0:t.p-e.p||t.o-e.o||Os.compare(Us(t.n),Us(e.n))||Os.compare(Ps(t.n),Ps(e.n))}function Us(t){return(t||"").split(/:/).pop().split("/").pop()||"\0"}function Ps(t){return(t||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function jn(t,e){return Math.round(parseInt(t,16)*e)}function Y(t,e={}){if(typeof t=="function")return t(e);let{opacityValue:r="1",opacityVariable:n}=e,i=n?`var(${n})`:r;if(t.includes("<alpha-value>"))return t.replace("<alpha-value>",i);if(t[0]=="#"&&(t.length==4||t.length==7)){let s=(t.length-1)/3,o=[17,1,.062272][s-1];return`rgba(${[jn(t.substr(1,s),o),jn(t.substr(1+s,s),o),jn(t.substr(1+2*s,s),o),i]})`}return i=="1"?t:i=="0"?"#0000":t.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${i})`)}function zs(t,e,r,n,i=[]){return(function s(o,{n:a,p:l,r:c=[],i:u},h){let p=[],y="",g=0,$=0;for(let w in o||{}){var b,S;let x=o[w];if(w[0]=="@"){if(!x)continue;if(w[1]=="a"){p.push(...Nn(a,l,cr(""+x),h,l,c,u,!0));continue}if(w[1]=="l"){for(let E of I(x))p.push(...s(E,{n:a,p:(b=P[w[7]],l&~P.o|b),r:w[7]=="d"?[]:c,i:u},h));continue}if(w[1]=="i"){p.push(...I(x).map(E=>({p:-1,o:0,r:[],d:w+" "+E})));continue}if(w[1]=="k"){p.push({p:P.d,o:0,r:[w],d:s(x,{p:P.d},h).map(Un).join("")});continue}if(w[1]=="f"){p.push(...I(x).map(E=>({p:P.d,o:0,r:[w],d:s(E,{p:P.d},h).map(Un).join("")})));continue}}if(typeof x!="object"||Array.isArray(x))w=="label"&&x?a=x+ar(JSON.stringify([l,u,o])):(x||x===0)&&(w=w.replace(/[A-Z]/g,E=>"-"+E.toLowerCase()),$+=1,g=Math.max(g,(S=w)[0]=="-"?0:Fs(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),y+=(y?";":"")+I(x).map(E=>h.s(w,Vn(""+E,h.theme)+(u?" !important":""))).join(";"));else if(w[0]=="@"||w.includes("&")){let E=l;w[0]=="@"&&(w=w.replace(/\bscreen\(([^)]+)\)/g,(T,U)=>{let B=h.theme("screens",U);return B?(E|=67108864,ur(B,"")):T}),E|=On(w)),p.push(...s(x,{n:a,p:E,r:[...c,w],i:u},h))}else p.push(...s(x,{p:l,r:[...c,w]},h))}return p.unshift({n:a,p:l,o:Math.max(0,15-$)+1.5*Math.min(g||15,15),r:c,d:y}),p.sort(Hs)})(t,Fn(e,r,n,i),r)}function Vn(t,e){return t.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(r,n,i,s,o="")=>{let a=e(i,o);return typeof a=="function"&&/color|fill|stroke/i.test(i)?Y(a):""+I(a).filter(l=>Object(l)!==l)})}function Ws(t,e){let r,n=[];for(let i of t)i.d&&i.n?r?.p==i.p&&""+r.r==""+i.r?(r.c=[r.c,i.c].filter(Boolean).join(" "),r.d=r.d+";"+i.d):n.push(r={...i,n:i.n&&e}):n.push({...i,n:i.n&&e});return n}function lr(t,e,r=P.u,n,i){let s=[];for(let o of t)for(let a of(function(l,c,u,h,p){l={...l,i:l.i||p};let y=(function(g,$){let b=Vs.get(g.n);return b?b(g,$):$.r(g.n,g.v[0]=="dark")})(l,c);return y?typeof y=="string"?({r:h,p:u}=Fn(l,c,u,h),Ws(lr(cr(y),c,u,h,l.i),l.n)):Array.isArray(y)?y.map(g=>{var $,b;return{o:0,...g,r:[...I(h),...I(g.r)],p:($=u,b=g.p??u,$&~P.o|b)}}):zs(y,l,c,u,h):[{c:qn(l),p:0,o:0,r:[]}]})(o,e,r,n,i))s.splice(Ns(s,a),0,a);return s}function Nn(t,e,r,n,i,s,o,a){return Ws((a?r.flatMap(l=>lr([l],n,i,s,o)):lr(r,n,i,s,o)).map(l=>l.p&P.o&&(l.n||e==P.b)?{...l,p:l.p&~P.o|e,o:0}:l),t)}function xl(t,e,r,n){var i;return i=(s,o)=>{let{n:a,p:l,r:c,i:u}=Fn(s,o,e);return r&&Nn(a,e,r,o,l,c,u,n)},Vs.set(t,i),t}function Dn(t,e,r){if(t[t.length-1]!="("){let n=[],i=!1,s=!1,o="";for(let a of t)if(!(a=="("||/[~@]$/.test(a))){if(a[0]=="!"&&(a=a.slice(1),i=!i),a.endsWith(":")){n[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:n.filter(kl),i}))}}function kl(t,e,r){return r.indexOf(t)==e}var Rs=new Map;function cr(t){let e=Rs.get(t);if(!e){let r=[],n=[[]],i=0,s=0,o=null,a=0,l=(c,u=0)=>{i!=a&&(r.push(t.slice(i,a+u)),c&&Dn(r,n)),i=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,i=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 u=r.lastIndexOf("(");if(c==")"){let h=r[u-1];if(/[~@]$/.test(h)){let p=n.shift();r.length=u,Dn([...r,"#"],n);let{v:y}=n[0].pop();for(let g of p)g.v.splice(+(g.v[0]=="dark")-+(y[0]=="dark"),y.length);Dn([...r,xl(h.length>1?h.slice(0,-1)+ar(JSON.stringify([h,p])):h+"("+vl(p)+")",P.a,p,/@$/.test(h))],n)}u=r.lastIndexOf("(",u-1)}r.length=u+1}else/[~@]/.test(c)&&t[a+1]=="("&&n.unshift([])}l(!0),Rs.set(t,e=n[0])}return e}function f(t,e,r){return[t,Pn(e,r)]}function Pn(t,e){return typeof t=="function"?t:typeof t=="string"&&/^[\w-]+$/.test(t)?(r,n)=>({[t]:e?e(r,n):Rn(r,1)}):r=>t||{[r[1]]:Rn(r,2)}}function Rn(t,e,r=t.slice(e).find(Boolean)||t.$$||t.input){return t.input[0]=="-"?`calc(${r} * -1)`:r}function m(t,e,r,n){return[t,Hn(e,r,n)]}function Hn(t,e,r){let n=typeof e=="string"?(i,s)=>({[e]:r?r(i,s):i._}):e||(({1:i,_:s},o,a)=>({[i||a]:s}));return(i,s)=>{let o=Gs(t||i[1]),a=s.theme(o,i.$$)??se(i.$$,o,s);if(a!=null)return i._=Rn(i,0,a),n(i,s,o)}}function R(t,e={},r){return[t,Cl(e,r)]}function Cl(t={},e){return(r,n)=>{let{section:i=Gs(r[0]).replace("-","")+"Color"}=t,[s,o]=$l(r.$$);if(!s)return;let a=n.theme(i,s)||se(s,i,n);if(!a||typeof a=="object")return;let{opacityVariable:l=`--tw-${r[0].replace(/-$/,"")}-opacity`,opacitySection:c=i.replace("Color","Opacity"),property:u=i,selector:h}=t,p=n.theme(c,o||"DEFAULT")||o&&se(o,c,n),y=e||(({_:$})=>{let b=Ct(u,$);return h?{[h]:b}:b});r._={value:Y(a,{opacityVariable:l||void 0,opacityValue:p||void 0}),color:$=>Y(a,$),opacityVariable:l||void 0,opacityValue:p||void 0};let g=y(r,n);if(!r.dark){let $=n.d(i,s,a);$&&$!==a&&(r._={value:Y($,{opacityVariable:l||void 0,opacityValue:p||"1"}),color:b=>Y($,b),opacityVariable:l||void 0,opacityValue:p||void 0},g={"&":g,[n.v("dark")]:y(r,n)})}return g}}function $l(t){return(t.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function Ct(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 se(t,e,r){if(t[0]=="["&&t.slice(-1)=="]"){if(t=Ke(Vn(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 Gs(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function Ke(t){return t.includes("url(")?t.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,r="",n,i="")=>Ke(r)+n+Ke(i)):t.replace(/(^|[^\\])_+/g,(e,r)=>r+" ".repeat(e.length-r.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,e=>e.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}function $t({presets:t=[],...e}){let r={darkMode:void 0,darkColor:void 0,preflight:e.preflight!==!1&&[],theme:{},variants:I(e.variants),rules:I(e.rules),ignorelist:I(e.ignorelist),hash:void 0,stringify:(n,i)=>n+":"+i,finalize:[]};for(let n of I([...t,{darkMode:e.darkMode,darkColor:e.darkColor,preflight:e.preflight!==!1&&I(e.preflight),theme:e.theme,hash:e.hash,stringify:e.stringify,finalize:e.finalize}])){let{preflight:i,darkMode:s=r.darkMode,darkColor:o=r.darkColor,theme:a,variants:l,rules:c,ignorelist:u,hash:h=r.hash,stringify:p=r.stringify,finalize:y}=typeof n=="function"?n(r):n;r={preflight:r.preflight!==!1&&i!==!1&&[...r.preflight,...I(i)],darkMode:s,darkColor:o,theme:{...r.theme,...a,extend:{...r.theme.extend,...a?.extend}},variants:[...r.variants,...I(l)],rules:[...r.rules,...I(c)],ignorelist:[...r.ignorelist,...I(u)],hash:h,stringify:p,finalize:[...r.finalize,...I(y)]}}return r}function Bs(t,e,r,n,i,s){for(let o of e){let a=r.get(o);a||r.set(o,a=n(o));let l=a(t,i,s);if(l)return l}}function Sl(t){var e;return Bn(t[0],typeof(e=t[1])=="function"?e:()=>e)}function El(t){var e,r;return Array.isArray(t)?Bn(t[0],Pn(t[1],t[2])):Bn(t,Pn(e,r))}function Bn(t,e){return Zs(t,(r,n,i,s)=>{let o=n.exec(r);if(o)return o.$$=r.slice(o[0].length),o.dark=s,e(o,i)})}function Zs(t,e){let r=I(t).map(_l);return(n,i,s)=>{for(let o of r){let a=e(n,o,i,s);if(a)return a}}}function _l(t){return typeof t=="string"?RegExp("^"+t+(t.includes("$")||t.slice(-1)=="-"?"":"$")):t}function Ks(t,e){let r=$t(t),n=(function({theme:l,darkMode:c,darkColor:u=dr,variants:h,rules:p,hash:y,stringify:g,ignorelist:$,finalize:b}){let S=new Map,w=new Map,x=new Map,E=new Map,T=Zs($,(M,q)=>q.test(M));h.push(["dark",Array.isArray(c)||c=="class"?`${I(c)[1]||".dark"} &`:typeof c=="string"&&c!="media"?c:"@media (prefers-color-scheme:dark)"]);let U=typeof y=="function"?M=>y(M,ar):y?ar:Ds;U!==Ds&&b.push(M=>({...M,n:M.n&&U(M.n),d:M.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(q,H)=>"--"+U(H).replace("#",""))}));let B={theme:(function({extend:M={},...q}){let H={},Jr={get colors(){return xe("colors")},theme:xe,negative(){return{}},breakpoints(D){let F={};for(let W in D)typeof D[W]=="string"&&(F["screen-"+W]=D[W]);return F}};return xe;function xe(D,F,W,ct){if(D){if({1:D,2:ct}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(D)||[,D],/[.[]/.test(D)){let ce=[];D.replace(/\[([^\]]+)\]|([^.[]+)/g,(Ce,dt,Aa=dt)=>ce.push(Aa)),D=ce.shift(),W=F,F=ce.join("-")}let ne=H[D]||Object.assign(Object.assign(H[D]={},Ft(q,D)),Ft(M,D));if(F==null)return ne;F||(F="DEFAULT");let ke=ne[F]??F.split("-").reduce((ce,Ce)=>ce?.[Ce],ne)??W;return ct?Y(ke,{opacityValue:Vn(ct,xe)}):ke}let ut={};for(let ne of[...Object.keys(q),...Object.keys(M)])ut[ne]=xe(ne);return ut}function Ft(D,F){let W=D[F];return typeof W=="function"&&(W=W(Jr)),W&&/color|fill|stroke/i.test(F)?(function ct(ut,ne=[]){let ke={};for(let ce in ut){let Ce=ut[ce],dt=[...ne,ce];ke[dt.join("-")]=Ce,ce=="DEFAULT"&&(dt=ne,ke[ne.join("-")]=Ce),typeof Ce=="object"&&Object.assign(ke,ct(Ce,dt))}return ke})(W):W}})(l),e:qs,h:U,s(M,q){return g(M,q,B)},d(M,q,H){return u(M,q,B,H)},v(M){return S.has(M)||S.set(M,Bs(M,h,w,Sl,B)||"&:"+M),S.get(M)},r(M,q){let H=JSON.stringify([M,q]);return x.has(H)||x.set(H,!T(M,B)&&Bs(M,p,E,El,B,q)),x.get(H)},f(M){return b.reduce((q,H)=>H(q,B),M)}};return B})(r),i=new Map,s=[],o=new Set;e.resume(l=>i.set(l,l),(l,c)=>{e.insert(l,s.length,c),s.push(c),o.add(l)});function a(l){let c=n.f(l),u=Un(c);if(u&&!o.has(u)){o.add(u);let h=Ns(s,l);e.insert(u,h,l),s.splice(h,0,l)}return c.n}return Object.defineProperties(function(c){if(!i.size)for(let h of I(r.preflight))typeof h=="function"&&(h=h(n)),h&&(typeof h=="string"?Nn("",P.b,cr(h),n,P.b,[],!1,!0):zs(h,{},n,P.b)).forEach(a);c=""+c;let u=i.get(c);if(!u){let h=new Set;for(let p of lr(cr(c),n))h.add(p.c).add(a(p));u=[...h].filter(Boolean).join(" "),i.set(c,u).set(u,u)}return u},Object.getOwnPropertyDescriptors({get target(){return e.target},theme:n.theme,config:r,snapshot(){let l=e.snapshot(),c=new Set(o),u=new Map(i),h=[...s];return()=>{l(),o=c,i=u,s=h}},clear(){e.clear(),o=new Set,i=new Map,s=[]},destroy(){this.clear(),e.destroy()}}))}function Ml(t,e){return t!=e&&""+t.split(" ").sort()!=""+e.split(" ").sort()}function Js(t){let e=new MutationObserver(r);return{observe(i){e.observe(i,{attributeFilter:["class"],subtree:!0,childList:!0}),n(i),r([{target:i,type:""}])},disconnect(){e.disconnect()}};function r(i){for(let{type:s,target:o}of i)if(s[0]=="a")n(o);else for(let a of o.querySelectorAll("[class]"))n(a);e.takeRecords()}function n(i){let s,o=i.getAttribute?.("class");o&&Ml(o,s=t(o))&&i.setAttribute("class",s)}}function Il(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 hr(t){let e=t?.cssRules?t:(t&&typeof t!="string"?t:Il(t)).sheet;return{target:e,snapshot(){let r=Array.from(e.cssRules,n=>n.cssText);return()=>{this.clear(),r.forEach(this.insert)}},clear(){for(let r=e.cssRules.length;r--;)e.deleteRule(r)},destroy(){e.ownerNode?.remove()},insert(r,n){try{e.insertRule(r,n)}catch{e.insertRule(":root{}",n)}},resume:dr}}var Al=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 Ys(t){return Al.get(t)}function Xs(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 Qs(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 Tl=[["-webkit-",1],["-moz-",2],["-ms-",4]];function pr(){return({stringify:t})=>({stringify(e,r,n){let i="",s=Ys(e);s&&(i+=t(s,r,n)+";");let o=Xs(e),a=Qs(e,r);for(let l of Tl)o&l[1]&&(i+=t(l[0]+e,r,n)+";"),a&l[1]&&(i+=t(e,l[0]+r,n)+";");return i+t(e,r,n)}})}function fr(){return{rules:[["line-clamp-none",{"-webkit-line-clamp":"unset"}],["line-clamp-",Hn("lineClamp",({_:t})=>eo(t))],["line-clamp-(\\d+)",({1:t})=>eo(t)]]}}function eo(t){return{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":`${t}`}}var Et={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",...G(4,"rem",4,.5,.5),...G(12,"rem",4,5),14:"3.5rem",...G(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:_("blur"),backdropBrightness:_("brightness"),backdropContrast:_("contrast"),backdropGrayscale:_("grayscale"),backdropHueRotate:_("hueRotate"),backdropInvert:_("invert"),backdropOpacity:_("opacity"),backdropSaturate:_("saturate"),backdropSepia:_("sepia"),backgroundColor:_("colors"),backgroundImage:{none:"none"},backgroundOpacity:_("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:{...G(200,"",100,0,50),...G(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:t})=>({DEFAULT:t("colors.gray.200","currentColor"),...t("colors")}),borderOpacity:_("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:_("spacing"),borderWidth:{DEFAULT:"1px",...X(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:_("colors"),caretColor:_("colors"),accentColor:({theme:t})=>({auto:"auto",...t("colors")}),contrast:{...G(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:_("borderColor"),divideOpacity:_("borderOpacity"),divideWidth:_("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"),...St(2,6),...St(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:_("spacing"),gradientColorStops:_("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"),...St(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:t})=>({...t("spacing"),...St(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:{...G(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:{...G(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:_("spacing"),placeholderColor:_("colors"),placeholderOpacity:_("opacity"),outlineColor:_("colors"),outlineOffset:X(8,"px"),outlineWidth:X(8,"px"),ringColor:({theme:t})=>({...t("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:_("colors"),ringOffsetWidth:X(8,"px"),ringOpacity:({theme:t})=>({...t("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...X(8,"px")},rotate:{...X(2,"deg"),...X(12,"deg",3),...X(180,"deg",45)},saturate:G(200,"",100,0,50),scale:{...G(150,"",100,0,50),...G(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:_("spacing"),scrollPadding:_("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...X(2,"deg"),...X(12,"deg",3)},space:_("spacing"),stroke:({theme:t})=>({...t("colors"),none:"none"}),strokeWidth:G(2),textColor:_("colors"),textDecorationColor:_("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...X(8,"px")},textUnderlineOffset:{auto:"auto",...X(8,"px")},textIndent:_("spacing"),textOpacity:_("opacity"),transitionDuration:({theme:t})=>({...t("durations"),DEFAULT:"150ms"}),transitionDelay:_("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"),...St(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:{...G(50,"",1,0,10),auto:"auto"}};function St(t,e){let r={};do for(var n=1;n<t;n++)r[`${n}/${t}`]=Number((n/t*100).toFixed(6))+"%";while(++t<=e);return r}function X(t,e,r=0){let n={};for(;r<=t;r=2*r||1)n[r]=r+e;return n}function G(t,e="",r=1,n=0,i=1,s={}){for(;n<=t;n+=i)s[n]=n/r+e;return s}function _(t){return({theme:e})=>e(t)}var to={"*,::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, ${Et.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, ${Et.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=[f("\\[([-\\w]+):(.+)]",({1:t,2:e},r)=>({"@layer overrides":{"&":{[t]:se(`[${e}]`,"",r)}}})),f("(group|peer)([~/][^-[]+)?",({input:t},{h:e})=>[{c:e(t)}]),m("aspect-","aspectRatio"),f("container",(t,{theme:e})=>{let{screens:r=e("screens"),center:n,padding:i}=e("container"),s={width:"100%",marginRight:n&&"auto",marginLeft:n&&"auto",...o("xs")};for(let a in r){let l=r[a];typeof l=="string"&&(s[ur(l)]={"&":{maxWidth:l,...o(a)}})}return s;function o(a){let l=i&&(typeof i=="string"?i:i[a]||i.DEFAULT);if(l)return{paddingRight:l,paddingLeft:l}}}),m("content-","content",({_:t})=>({"--tw-content":t,content:"var(--tw-content)"})),f("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),f("box-(border|content)","boxSizing",({1:t})=>t+"-box"),f("hidden",{display:"none"}),f("table-(auto|fixed)","tableLayout"),f(["(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)",f("isolate","isolation"),f("object-(contain|cover|fill|none|scale-down)","objectFit"),m("object-","objectPosition"),f("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",mr),f("overscroll(-[xy])?-(auto|contain|none)",({1:t="",2:e})=>({["overscroll-behavior"+t]:e})),f("(static|fixed|absolute|relative|sticky)","position"),m("-?inset(-[xy])?(?:$|-)","inset",({1:t,_:e})=>({top:t!="-x"&&e,right:t!="-y"&&e,bottom:t!="-x"&&e,left:t!="-y"&&e})),m("-?(top|bottom|left|right)(?:$|-)","inset"),f("(visible|collapse)","visibility"),f("invisible",{visibility:"hidden"}),m("-?z-","zIndex"),f("flex-((row|col)(-reverse)?)","flexDirection",ro),f("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),m("(flex-(?:grow|shrink))(?:$|-)"),m("(flex)-"),m("grow(?:$|-)","flexGrow"),m("shrink(?:$|-)","flexShrink"),m("basis-","flexBasis"),m("-?(order)-"),"-?(order)-(\\d+)",m("grid-cols-","gridTemplateColumns"),f("grid-cols-(\\d+)","gridTemplateColumns",oo),m("col-","gridColumn"),f("col-(span)-(\\d+)","gridColumn",so),m("col-start-","gridColumnStart"),f("col-start-(auto|\\d+)","gridColumnStart"),m("col-end-","gridColumnEnd"),f("col-end-(auto|\\d+)","gridColumnEnd"),m("grid-rows-","gridTemplateRows"),f("grid-rows-(\\d+)","gridTemplateRows",oo),m("row-","gridRow"),f("row-(span)-(\\d+)","gridRow",so),m("row-start-","gridRowStart"),f("row-start-(auto|\\d+)","gridRowStart"),m("row-end-","gridRowEnd"),f("row-end-(auto|\\d+)","gridRowEnd"),f("grid-flow-((row|col)(-dense)?)","gridAutoFlow",t=>mr(ro(t))),f("grid-flow-(dense)","gridAutoFlow"),m("auto-cols-","gridAutoColumns"),m("auto-rows-","gridAutoRows"),m("gap-x(?:$|-)","gap","columnGap"),m("gap-y(?:$|-)","gap","rowGap"),m("gap(?:$|-)","gap"),"(justify-(?:items|self))-",f("justify-","justifyContent",no),f("(content|items|self)-",t=>({["align-"+t[1]]:no(t)})),f("(place-(content|items|self))-",({1:t,$$:e})=>({[t]:("wun".includes(e[3])?"space-":"")+e})),m("p([xytrbl])?(?:$|-)","padding",Je("padding")),m("-?m([xytrbl])?(?:$|-)","margin",Je("margin")),m("-?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))`}})),f("space-(x|y)-reverse",({1:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"1"}})),m("w-","width"),m("min-w-","minWidth"),m("max-w-","maxWidth"),m("h-","height"),m("min-h-","minHeight"),m("max-h-","maxHeight"),m("font-","fontWeight"),m("font-","fontFamily",({_:t})=>typeof(t=I(t))[1]=="string"?{fontFamily:re(t)}:{fontFamily:re(t[0]),...t[1]}),f("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),f("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),f("italic","fontStyle"),f("not-italic",{fontStyle:"normal"}),f("(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)",...ge({"--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,/*!*/ /*!*/)"})}),m("tracking-","letterSpacing"),m("leading-","lineHeight"),f("list-(inside|outside)","listStylePosition"),m("list-","listStyleType"),f("list-","listStyleType"),m("placeholder-opacity-","placeholderOpacity",({_:t})=>({"&::placeholder":{"--tw-placeholder-opacity":t}})),R("placeholder-",{property:"color",selector:"&::placeholder"}),f("text-(left|center|right|justify|start|end)","textAlign"),f("text-(ellipsis|clip)","textOverflow"),m("text-opacity-","textOpacity","--tw-text-opacity"),R("text-",{property:"color"}),m("text-","fontSize",({_:t})=>typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}),m("indent-","textIndent"),f("(overline|underline|line-through)","textDecorationLine"),f("no-underline",{textDecorationLine:"none"}),m("underline-offset-","textUnderlineOffset"),R("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),m("decoration-","textDecorationThickness"),f("decoration-","textDecorationStyle"),f("(uppercase|lowercase|capitalize)","textTransform"),f("normal-case",{textTransform:"none"}),f("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),f("align-","verticalAlign"),f("whitespace-","whiteSpace"),f("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),f("break-words",{overflowWrap:"break-word"}),f("break-all",{wordBreak:"break-all"}),f("break-keep",{wordBreak:"keep-all"}),R("caret-",{opacityVariable:!1,opacitySection:"opacity"}),R("accent-",{opacityVariable:!1,opacitySection:"opacity"}),f("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:t})=>`linear-gradient(to ${Ae(t," ")},var(--tw-gradient-stops))`),R("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)"})),R("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)`})),R("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),f("bg-(fixed|local|scroll)","backgroundAttachment"),f("bg-origin-(border|padding|content)","backgroundOrigin",({1:t})=>t+"-box"),f(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),f("bg-blend-","backgroundBlendMode"),f("bg-clip-(border|padding|content|text)","backgroundClip",({1:t})=>t+(t=="text"?"":"-box")),m("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),R("bg-",{section:"backgroundColor"}),m("bg-","backgroundImage"),m("bg-","backgroundPosition"),f("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",mr),m("bg-","backgroundSize"),m("rounded(?:$|-)","borderRadius"),m("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-${Ae(r[0])}-radius`]:e,[`border-${Ae(r[1])}-radius`]:e}}),f("border-(collapse|separate)","borderCollapse"),m("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),f("border-(solid|dashed|dotted|double|none)","borderStyle"),m("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:t,_:e})=>({...ge({"--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)"})),R("border-([xytrbl])-",{section:"borderColor"},Je("border","Color")),R("border-"),m("border-([xytrbl])(?:$|-)","borderWidth",Je("border","Width")),m("border(?:$|-)","borderWidth"),m("divide-opacity(?:$|-)","divideOpacity",({_:t})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":t}})),f("divide-(solid|dashed|dotted|double|none)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:t}})),f("divide-([xy]-reverse)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+t]:"1"}})),m("divide-([xy])(?:$|-)","divideWidth",({1:t,_:e})=>{let r={x:"lr",y:"tb"}[t];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${t}-reverse`]:"0",[`border-${Ae(r[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${t}-reverse)))`,[`border-${Ae(r[1])}Width`]:`calc(${e} * var(--tw-divide-${t}-reverse))`}}}),R("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),m("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),R("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),m("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),f("ring-inset",{"--tw-ring-inset":"inset"}),R("ring-",{property:"--tw-ring-color"}),m("ring(?:$|-)","ringWidth",({_:t},{theme:e})=>({...ge({"--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":Y(e("ringOffsetColor","","#fff")),"--tw-ring-color":Y(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)"})),R("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-shadow-color":t.value,"--tw-shadow":"var(--tw-shadow-colored)"})),m("shadow(?:$|-)","boxShadow",({_:t})=>({...ge({"--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":re(t),"--tw-shadow-colored":re(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)"})),m("(opacity)-"),f("mix-blend-","mixBlendMode"),...io(),...io("backdrop-"),m("transition(?:$|-)","transitionProperty",(t,{theme:e})=>({transitionProperty:re(t),transitionTimingFunction:t._=="none"?void 0:re(e("transitionTimingFunction","")),transitionDuration:t._=="none"?void 0:re(e("transitionDuration",""))})),m("duration(?:$|-)","transitionDuration","transitionDuration",re),m("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",re),m("delay(?:$|-)","transitionDelay","transitionDelay",re),m("animate(?:$|-)","animation",(t,{theme:e,h:r,e:n})=>{let i=re(t),s=i.split(" "),o=e("keyframes",s[0]);return o?{["@keyframes "+(s[0]=n(r(s[0])))]:o,animation:s.join(" ")}:{animation:i}}),"(transform)-(none)",f("transform",Wn),f("transform-(cpu|gpu)",({1:t})=>({"--tw-transform":lo(t=="gpu")})),m("scale(-[xy])?-","scale",({1:t,_:e})=>({["--tw-scale"+(t||"-x")]:e,["--tw-scale"+(t||"-y")]:e,...Wn()})),m("-?(rotate)-","rotate",zn),m("-?(translate-[xy])-","translate",zn),m("-?(skew-[xy])-","skew",zn),f("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",mr),"(appearance)-",m("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",m("(cursor)-"),"(cursor)-",f("snap-(none)","scroll-snap-type"),f("snap-(x|y|both)",({1:t})=>({...ge({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":t+" var(--tw-scroll-snap-strictness)"})),f("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),f("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),f("snap-(normal|always)","scroll-snap-stop"),f("scroll-(auto|smooth)","scroll-behavior"),m("scroll-p([xytrbl])?(?:$|-)","padding",Je("scroll-padding")),m("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",Je("scroll-margin")),f("touch-(auto|none|manipulation)","touch-action"),f("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:t,2:e,3:r})=>({...ge({"--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)"})),f("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),f("outline",{outlineStyle:"solid"}),f("outline-(dashed|dotted|double)","outlineStyle"),m("-?(outline-offset)-"),R("outline-",{opacityVariable:!1,opacitySection:"opacity"}),m("outline-","outlineWidth"),"(pointer-events)-",m("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:t})=>({x:"horizontal",y:"vertical"})[t]||t||"both"],f("select-(none|text|all|auto)","userSelect"),R("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),R("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),m("stroke-","strokeWidth"),f("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),f("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function mr(t){return(typeof t=="string"?t:t[1]).replace(/-/g," ").trim()}function ro(t){return(typeof t=="string"?t:t[1]).replace("col","column")}function Ae(t,e="-"){let r=[];for(let n of t)r.push({t:"top",r:"right",b:"bottom",l:"left"}[n]);return r.join(e)}function re(t){return t&&""+(t._||t)}function no({$$:t}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[t[3]||""]||"")+t}function Je(t,e=""){return({1:r,_:n})=>{let i={x:"lr",y:"tb"}[r]||r+r;return i?{...Ct(t+"-"+Ae(i[0])+e,n),...Ct(t+"-"+Ae(i[1])+e,n)}:Ct(t+e,n)}}function io(t=""){let e=["blur","brightness","contrast","grayscale","hue-rotate","invert",t&&"opacity","saturate","sepia",!t&&"drop-shadow"].filter(Boolean),r={};for(let n of e)r[`--tw-${t}${n}`]="var(--tw-empty,/*!*/ /*!*/)";return r={...ge(r),[`${t}filter`]:e.map(n=>`var(--tw-${t}${n})`).join(" ")},[`(${t}filter)-(none)`,f(`${t}filter`,r),...e.map(n=>m(`${n[0]=="h"?"-?":""}(${t}${n})(?:$|-)`,n,({1:i,_:s})=>({[`--tw-${i}`]:I(s).map(o=>`${n}(${o})`).join(" "),...r})))]}function zn({1:t,_:e}){return{["--tw-"+t]:e,...Wn()}}function Wn(){return{...ge({"--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":lo()}),transform:"var(--tw-transform)"}}function lo(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 so({1:t,2:e}){return`${t} ${e} / ${t} ${e}`}function oo({1:t}){return`repeat(${t},minmax(0,1fr))`}function ge(t){return{"@layer defaults":{"*,::before,::after":t,"::backdrop":t}}}var co=[["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)||se(e,"",r)||`${e}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:t,3:e="",4:r,5:n="",6:i=e},{e:s,h:o,v:a})=>{let l=Ke(n)||(r[0]=="["?r:a(r.slice(1)));return`${(l.includes("&")?l:"&"+l).replace(/&/g,`:merge(.${s(o(t+i))})`)}${t[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:t})=>`[dir="${t}"] &`],["supports-",({$$:t},e)=>{if(t&&(t=e.theme("supports",t)||se(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)||se(t,"",e)),typeof t=="string")return`@media not all and (min-width:${t})`}],["min-",({$$:t},e)=>(t&&(t=se(t,"",e)),t&&`@media (min-width:${t})`)],[/^\[(.+)]$/,({1:t})=>/[&@]/.test(t)&&Ke(t).replace(/[}]+$/,"").split("{")]];function uo({colors:t,disablePreflight:e}={}){return{preflight:e?void 0:to,theme:{...Et,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...t}},variants:co,rules:ao,finalize(r){return r.n&&r.d&&r.r.some(n=>/^&::(before|after)$/.test(n))&&!/(^|;)content:/.test(r.d)?{...r,d:"content:var(--tw-content);"+r.d}:r}}}var Ll={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},jl={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},Dl={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},Ol={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},Ul={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},Pl={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},Rl={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},Bl={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},ql={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},Fl={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},Vl={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},Nl={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},Hl={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},zl={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},Wl={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},Gl={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},Zl={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},Kl={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},Jl={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},Yl={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},Xl={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},Ql={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},ho={__proto__:null,slate:Ll,gray:jl,zinc:Dl,neutral:Ol,stone:Ul,red:Pl,orange:Rl,amber:Bl,yellow:ql,lime:Fl,green:Vl,emerald:Nl,teal:Hl,cyan:zl,sky:Wl,blue:Gl,indigo:Zl,violet:Kl,purple:Jl,fuchsia:Yl,pink:Xl,rose:Ql};function gr({disablePreflight:t}={}){return uo({colors:ho,disablePreflight:t})}function wr({className:t="prose",defaultColor:e="gray",extend:r={},colors:n={}}={}){return n={body:"700",headings:"900",lead:"600",links:"900",bold:"900",counters:"500",bullets:"300",hr:"200",quotes:"900","quote-borders":"200",captions:"500",code:"900","pre-code":"200","pre-bg":"800","th-borders":"300","td-borders":"200",...n,dark:n.dark===null?null:{body:"300",headings:"#fff",lead:"400",links:"#fff",bold:"#fff",counters:"400",bullets:"600",hr:"700",quotes:"100","quote-borders":"700",captions:"400",code:"#fff","pre-code":"300","pre-bg":"rgb(0 0 0 / 50%)","th-borders":"600","td-borders":"700",...n.dark}},{variants:[["headings","h1,h2,h3,h4,h5,h6,th"],["h1"],["h2"],["h3"],["h4"],["h5"],["h6"],["p"],["a"],["blockquote"],["figure"],["figcaption"],["strong"],["em"],["code"],["pre"],["ol"],["ul"],["li"],["table"],["thead"],["tr"],["th"],["td"],["img"],["video"],["hr"],["lead",".lead"]].map(([s,o=s])=>[`${t}-${s}`,(a,l)=>mo(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=fo(o.theme("fontSize",s));return a&&{"@layer components":a}}],[t+"-",({$$:s},o)=>i(s,o)],[t,(s,o)=>({...i(e,o),"@layer base":[po(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:k(20,16),marginBottom:k(20,16),paddingLeft:k(26,16)},li:{marginTop:k(8,16),marginBottom:k(8,16)},"ol>li,ul>li":{paddingLeft:k(6,16)},">ul>li p":{marginTop:k(12,16),marginBottom:k(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:k(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:k(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:k(12,16),marginBottom:k(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:k(48,16),marginBottom:k(48,16)},blockquote:{marginTop:k(32,20),marginBottom:k(32,20),paddingLeft:k(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:k(20,16),marginBottom:k(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:k(36,16),marginTop:"0",marginBottom:k(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900",color:"inherit"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:k(24,16),marginTop:k(48,24),marginBottom:k(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800",color:"inherit"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:k(20,16),marginTop:k(32,20),marginBottom:k(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700",color:"inherit"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:k(24,16),marginBottom:k(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700",color:"inherit"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:k(32,16),marginBottom:k(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:k(14,16),lineHeight:"1.4",marginTop:k(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:k(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:k(21,24)},"h3 code":{fontSize:k(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:k(14,16),lineHeight:"1.7",marginTop:k(24,14),marginBottom:k(24,14),borderRadius:"0.375rem",paddingTop:k(12,14),paddingRight:k(16,14),paddingBottom:k(12,14),paddingLeft:k(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:k(32,16),marginBottom:k(32,16),fontSize:k(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:k(8,14),paddingBottom:k(8,14),paddingLeft:k(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:k(8,14),paddingRight:k(8,14),paddingBottom:k(8,14),paddingLeft:k(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:k(20,16),lineHeight:"1.6",marginTop:k(24,20),marginBottom:k(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),po(t,o,r)],"@layer components":{...fo(o.theme("fontSize","base")),color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"}})]]};function i(s,o){let a={},l={},c=(u,h,p)=>{let y=o.theme(`colors.${s}.${h}`,h);p["--tw-prose-"+u]=Y(y);let g=p!=l&&o.d("colors",`${s}-${h}`,y);g&&(l["--tw-prose-"+u]=Y(g))};for(let u in n){let h=n[u];u!="dark"&&h&&c(u,h,a)}for(let u in n.dark||{}){let h=n.dark[u];h&&(n.dark?c("invert-"+u,h,a):c(u,h,l))}return Object.keys(a).length?{"@layer defaults":{"&":a,[o.v("dark")]:l}}:void 0}}function po(t,e,r){let n={};for(let i in r)n[mo(t,i,e,s=>`.${e.e(e.h(t))}${s}`)]=r[i];return n}function mo(t,e,{e:r,h:n},i){return e.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(s,o=" ",a=s,l="")=>i(`${o}:where(${a}):not(:where(.${r(n("not-"+t))} *))${l}`))}function fo(t){return t?typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}:void 0}function k(t,e){return`${(t/e).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}var Gn=$t({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:[gr(),pr(),fr(),wr()]});function yr(t,e=!0){let r=(function(){if(ec)try{let l=hr(new CSSStyleSheet);return l.connect=c=>{let u=Zn(c);u.adoptedStyleSheets=[...u.adoptedStyleSheets,l.target]},l.disconnect=dr,l}catch{}let s=document.createElement("style");s.media="not all",document.head.prepend(s);let o=[hr(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,u){o[0].insert(l,c,u);let h=this.target.cssRules[c];o.forEach((p,y)=>y&&p.target.insertRule(h.cssText,c))},resume(l,c){return o[0].resume(l,c)},connect(l){let c=document.createElement("style");Zn(l).appendChild(c);let u=hr(c),{cssRules:h}=this.target;for(let p=0;p<h.length;p++)u.target.insertRule(h[p].cssText,p);o.push(u),a.set(l,u)},disconnect(l){let c=o.indexOf(a.get(l));c>=0&&o.splice(c,1)}}})(),n=Ks({...t,hash:t.hash??e},r),i=Js(n);return function(o){return class extends o{connectedCallback(){super.connectedCallback?.(),r.connect(this),i.observe(Zn(this))}disconnectedCallback(){r.disconnect(this),super.disconnectedCallback?.()}constructor(...l){super(...l),this.tw=n}}}}var ec=typeof ShadowRoot<"u"&&(typeof ShadyCSS>"u"||ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;function Zn(t){return t.shadowRoot||t.attachShadow({mode:"open"})}var C=t=>yr(Gn)(t);var Kn=class extends C(v){static properties={color:{type:String},radius:{type:String},size:{type:String},border:{type:String},darkMode:{type:Boolean,attribute:"dark-mode"}};static styles=L`
131
131
  :host {
132
132
  display: block;
133
133
  }
@@ -142,19 +142,19 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
142
142
  transform: rotate(360deg);
143
143
  }
144
144
  }
145
- `;constructor(){super(),this.color="#601feb",this.radius="16.8576px",this.size="320px",this.border="#d1d5db"}render(){return u`
146
- <div class="flex flex-row flex-wrap gap-0">
145
+ `;constructor(){super(),this.color="#601feb",this.radius="16.8576px",this.size="320px",this.border="#d1d5db",this.darkMode=!1}render(){return d`
146
+ <div class="${this.darkMode?"dark":""} flex flex-row flex-wrap gap-0">
147
147
  <div class="relative z-0 flex min-h-9 items-center justify-center overflow-hidden" style="border-radius: ${this.radius};">
148
148
  <!-- Spinning gradient background -->
149
149
  <div
150
150
  class="absolute z-[-2] m-auto animate-[spin-slow_4s_linear_infinite] bg-[0_0] bg-cover bg-no-repeat"
151
151
  style="background-image: conic-gradient(transparent, ${this.color}, transparent 30%); height: ${this.size}; width: ${this.size}; background-color: ${this.border};"></div>
152
152
  <!-- White background with 1px border space for gradient -->
153
- <div class="absolute top-[1px] left-[1px] z-[-1] h-[calc(100%_-_2px)] w-[calc(100%_-_2px)] bg-white" style="border-radius: ${this.radius};"></div>
153
+ <div class="absolute top-[1px] left-[1px] z-[-1] h-[calc(100%_-_2px)] w-[calc(100%_-_2px)] bg-white dark:bg-[#2B2D31]" style="border-radius: ${this.radius};"></div>
154
154
  <slot></slot>
155
155
  </div>
156
156
  </div>
157
- `}};customElements.get("mw-spinning-border")||customElements.define("mw-spinning-border",Zn);var Jn=class extends C(v){static properties={state:{type:String},color:{type:String},bubbleStyle:{type:String},src:{type:String},width:{type:String},height:{type:String}};static styles=D`
157
+ `}};customElements.get("mw-spinning-border")||customElements.define("mw-spinning-border",Kn);var Jn=class extends C(v){static properties={state:{type:String},color:{type:String},bubbleStyle:{type:String},src:{type:String},width:{type:String},height:{type:String}};static styles=L`
158
158
  .shadow-button {
159
159
  box-shadow:
160
160
  -58.9194px 74.8436px 38.218px rgba(0, 0, 0, 0.01),
@@ -162,7 +162,7 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
162
162
  -14.3318px 19.109px 23.8863px rgba(0, 0, 0, 0.09),
163
163
  -3.18483px 4.77725px 12.7393px rgba(0, 0, 0, 0.1);
164
164
  }
165
- `;constructor(){super(),this.state="open",this.color="#601feb",this.bubbleStyle="solid",this.src="",this.width="64px",this.height="64px"}get iconColor(){return this.bubbleStyle==="solid"?"#ffffff":this.color}get backgroundColor(){return this.bubbleStyle==="solid"?this.color:"#ffffff"}get svgSize(){let e=parseFloat(this.width),r=parseFloat(this.height),i=Math.min(e,r)*.55,s=i,o=i/1.65;return{width:s,height:o}}get dynamicRadius(){let e=parseFloat(this.width),r=parseFloat(this.height);return`${Math.min(e,r)*.265}px`}render=()=>u`
165
+ `;constructor(){super(),this.state="open",this.color="#601feb",this.bubbleStyle="solid",this.src="",this.width="64px",this.height="64px"}get iconColor(){return this.bubbleStyle==="solid"?"#ffffff":this.color}get backgroundColor(){return this.bubbleStyle==="solid"?this.color:"#ffffff"}get svgSize(){let e=parseFloat(this.width),r=parseFloat(this.height),i=Math.min(e,r)*.55,s=i,o=i/1.65;return{width:s,height:o}}get dynamicRadius(){let e=parseFloat(this.width),r=parseFloat(this.height);return`${Math.min(e,r)*.265}px`}render=()=>d`
166
166
  <div class="shadow-button inline-block transition-transform hover:scale-105 active:scale-90" style="border-radius: ${this.dynamicRadius};">
167
167
  <mw-spinning-border .color="${this.color}" .border="${"#f9fafb"}" .radius="${this.dynamicRadius}">
168
168
  <!-- we want the transform transition on the root element so that both the transform transition and state switch transition are continuous and fluid -->
@@ -173,14 +173,14 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
173
173
  aria-label="Open Molin AI chat window">
174
174
  <!-- the 'open' state invites the user to open (e.g. the chat window) -->
175
175
  <div class="${this.state==="open"?"visible opacity-100":"invisible opacity-0"} absolute top-[1px] right-0 bottom-0 left-[1px] transition-[opacity,visibility]">
176
- ${this.src?u`
176
+ ${this.src?d`
177
177
  <!-- load given source -->
178
178
  <img
179
179
  class="flex items-center justify-center bg-white"
180
180
  style="width: calc(${this.width} - 2px); height: calc(${this.height} - 2px); border-radius: ${this.dynamicRadius};"
181
181
  src="${this.src}"
182
182
  alt="Molin AI chat" />
183
- `:u`
183
+ `:d`
184
184
  <!-- the solid background with AI text -->
185
185
  <div
186
186
  class="flex items-center justify-center bg-[${this.backgroundColor}]"
@@ -219,7 +219,7 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
219
219
  </button>
220
220
  </mw-spinning-border>
221
221
  </div>
222
- `};customElements.get("mw-bubble")||customElements.define("mw-bubble",Jn);var ho={airplay:`<svg
222
+ `};customElements.get("mw-bubble")||customElements.define("mw-bubble",Jn);var go={airplay:`<svg
223
223
  xmlns="http://www.w3.org/2000/svg"
224
224
  width="24"
225
225
  height="24"
@@ -232,7 +232,7 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
232
232
  >
233
233
  <path d="M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1" />
234
234
  <path d="m12 15 5 6H7Z" />
235
- </svg>`,"badge-alert":`<svg
235
+ </svg>`,"arrow-down-up":`<svg
236
236
  xmlns="http://www.w3.org/2000/svg"
237
237
  width="24"
238
238
  height="24"
@@ -243,10 +243,11 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
243
243
  stroke-linecap="round"
244
244
  stroke-linejoin="round"
245
245
  >
246
- <path d="M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" />
247
- <line x1="12" x2="12" y1="8" y2="12" />
248
- <line x1="12" x2="12.01" y1="16" y2="16" />
249
- </svg>`,phone:`<svg
246
+ <path d="m3 16 4 4 4-4" />
247
+ <path d="M7 20V4" />
248
+ <path d="m21 8-4-4-4 4" />
249
+ <path d="M17 4v16" />
250
+ </svg>`,"arrow-down":`<svg
250
251
  xmlns="http://www.w3.org/2000/svg"
251
252
  width="24"
252
253
  height="24"
@@ -257,8 +258,9 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
257
258
  stroke-linecap="round"
258
259
  stroke-linejoin="round"
259
260
  >
260
- <path d="M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384" />
261
- </svg>`,package:`<svg
261
+ <path d="M12 5v14" />
262
+ <path d="m19 12-7 7-7-7" />
263
+ </svg>`,"arrow-left-to-line":`<svg
262
264
  xmlns="http://www.w3.org/2000/svg"
263
265
  width="24"
264
266
  height="24"
@@ -269,11 +271,10 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
269
271
  stroke-linecap="round"
270
272
  stroke-linejoin="round"
271
273
  >
272
- <path d="M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z" />
273
- <path d="M12 22V12" />
274
- <polyline points="3.29 7 12 12 20.71 7" />
275
- <path d="m7.5 4.27 9 5.15" />
276
- </svg>`,"message-square":`<svg
274
+ <path d="M3 19V5" />
275
+ <path d="m13 6-6 6 6 6" />
276
+ <path d="M7 12h14" />
277
+ </svg>`,"arrow-left":`<svg
277
278
  xmlns="http://www.w3.org/2000/svg"
278
279
  width="24"
279
280
  height="24"
@@ -284,8 +285,9 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
284
285
  stroke-linecap="round"
285
286
  stroke-linejoin="round"
286
287
  >
287
- <path d="M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" />
288
- </svg>`,info:`<svg
288
+ <path d="m12 19-7-7 7-7" />
289
+ <path d="M19 12H5" />
290
+ </svg>`,"arrow-right-to-line":`<svg
289
291
  xmlns="http://www.w3.org/2000/svg"
290
292
  width="24"
291
293
  height="24"
@@ -296,10 +298,10 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
296
298
  stroke-linecap="round"
297
299
  stroke-linejoin="round"
298
300
  >
299
- <circle cx="12" cy="12" r="10" />
300
- <path d="M12 16v-4" />
301
- <path d="M12 8h.01" />
302
- </svg>`,user:`<svg
301
+ <path d="M17 12H3" />
302
+ <path d="m11 18 6-6-6-6" />
303
+ <path d="M21 5v14" />
304
+ </svg>`,"arrow-right":`<svg
303
305
  xmlns="http://www.w3.org/2000/svg"
304
306
  width="24"
305
307
  height="24"
@@ -310,9 +312,9 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
310
312
  stroke-linecap="round"
311
313
  stroke-linejoin="round"
312
314
  >
313
- <path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" />
314
- <circle cx="12" cy="7" r="4" />
315
- </svg>`,mail:`<svg
315
+ <path d="M5 12h14" />
316
+ <path d="m12 5 7 7-7 7" />
317
+ </svg>`,"arrow-up":`<svg
316
318
  xmlns="http://www.w3.org/2000/svg"
317
319
  width="24"
318
320
  height="24"
@@ -323,9 +325,9 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
323
325
  stroke-linecap="round"
324
326
  stroke-linejoin="round"
325
327
  >
326
- <path d="m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7" />
327
- <rect x="2" y="4" width="20" height="16" rx="2" />
328
- </svg>`,hash:`<svg
328
+ <path d="m5 12 7-7 7 7" />
329
+ <path d="M12 19V5" />
330
+ </svg>`,"badge-alert":`<svg
329
331
  xmlns="http://www.w3.org/2000/svg"
330
332
  width="24"
331
333
  height="24"
@@ -336,11 +338,10 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
336
338
  stroke-linecap="round"
337
339
  stroke-linejoin="round"
338
340
  >
339
- <line x1="4" x2="20" y1="9" y2="9" />
340
- <line x1="4" x2="20" y1="15" y2="15" />
341
- <line x1="10" x2="8" y1="3" y2="21" />
342
- <line x1="16" x2="14" y1="3" y2="21" />
343
- </svg>`,search:`<svg
341
+ <path d="M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" />
342
+ <line x1="12" x2="12" y1="8" y2="12" />
343
+ <line x1="12" x2="12.01" y1="16" y2="16" />
344
+ </svg>`,"bed-double":`<svg
344
345
  xmlns="http://www.w3.org/2000/svg"
345
346
  width="24"
346
347
  height="24"
@@ -351,9 +352,11 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
351
352
  stroke-linecap="round"
352
353
  stroke-linejoin="round"
353
354
  >
354
- <path d="m21 21-4.34-4.34" />
355
- <circle cx="11" cy="11" r="8" />
356
- </svg>`,"chart-line":`<svg
355
+ <path d="M2 20v-8a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v8" />
356
+ <path d="M4 10V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4" />
357
+ <path d="M12 4v6" />
358
+ <path d="M2 18h20" />
359
+ </svg>`,bell:`<svg
357
360
  xmlns="http://www.w3.org/2000/svg"
358
361
  width="24"
359
362
  height="24"
@@ -364,9 +367,9 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
364
367
  stroke-linecap="round"
365
368
  stroke-linejoin="round"
366
369
  >
367
- <path d="M3 3v16a2 2 0 0 0 2 2h16" />
368
- <path d="m19 9-5 5-4-4-3 3" />
369
- </svg>`,"credit-card":`<svg
370
+ <path d="M10.268 21a2 2 0 0 0 3.464 0" />
371
+ <path d="M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" />
372
+ </svg>`,"book-open":`<svg
370
373
  xmlns="http://www.w3.org/2000/svg"
371
374
  width="24"
372
375
  height="24"
@@ -377,9 +380,9 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
377
380
  stroke-linecap="round"
378
381
  stroke-linejoin="round"
379
382
  >
380
- <rect width="20" height="14" x="2" y="5" rx="2" />
381
- <line x1="2" x2="22" y1="10" y2="10" />
382
- </svg>`,clock:`<svg
383
+ <path d="M12 7v14" />
384
+ <path d="M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z" />
385
+ </svg>`,"chart-line":`<svg
383
386
  xmlns="http://www.w3.org/2000/svg"
384
387
  width="24"
385
388
  height="24"
@@ -390,9 +393,9 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
390
393
  stroke-linecap="round"
391
394
  stroke-linejoin="round"
392
395
  >
393
- <path d="M12 6v6l4 2" />
394
- <circle cx="12" cy="12" r="10" />
395
- </svg>`,circle:`<svg
396
+ <path d="M3 3v16a2 2 0 0 0 2 2h16" />
397
+ <path d="m19 9-5 5-4-4-3 3" />
398
+ </svg>`,check:`<svg
396
399
  xmlns="http://www.w3.org/2000/svg"
397
400
  width="24"
398
401
  height="24"
@@ -403,7 +406,7 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
403
406
  stroke-linecap="round"
404
407
  stroke-linejoin="round"
405
408
  >
406
- <circle cx="12" cy="12" r="10" />
409
+ <path d="M20 6 9 17l-5-5" />
407
410
  </svg>`,"chevron-down":`<svg
408
411
  xmlns="http://www.w3.org/2000/svg"
409
412
  width="24"
@@ -428,6 +431,19 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
428
431
  stroke-linejoin="round"
429
432
  >
430
433
  <path d="m9 18 6-6-6-6" />
434
+ </svg>`,"circle-check-big":`<svg
435
+ xmlns="http://www.w3.org/2000/svg"
436
+ width="24"
437
+ height="24"
438
+ viewBox="0 0 24 24"
439
+ fill="none"
440
+ stroke="currentColor"
441
+ stroke-width="2"
442
+ stroke-linecap="round"
443
+ stroke-linejoin="round"
444
+ >
445
+ <path d="M21.801 10A10 10 0 1 1 17 3.335" />
446
+ <path d="m9 11 3 3L22 4" />
431
447
  </svg>`,"circle-check":`<svg
432
448
  xmlns="http://www.w3.org/2000/svg"
433
449
  width="24"
@@ -455,6 +471,153 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
455
471
  <circle cx="12" cy="12" r="10" />
456
472
  <path d="m15 9-6 6" />
457
473
  <path d="m9 9 6 6" />
474
+ </svg>`,circle:`<svg
475
+ xmlns="http://www.w3.org/2000/svg"
476
+ width="24"
477
+ height="24"
478
+ viewBox="0 0 24 24"
479
+ fill="none"
480
+ stroke="currentColor"
481
+ stroke-width="2"
482
+ stroke-linecap="round"
483
+ stroke-linejoin="round"
484
+ >
485
+ <circle cx="12" cy="12" r="10" />
486
+ </svg>`,clock:`<svg
487
+ xmlns="http://www.w3.org/2000/svg"
488
+ width="24"
489
+ height="24"
490
+ viewBox="0 0 24 24"
491
+ fill="none"
492
+ stroke="currentColor"
493
+ stroke-width="2"
494
+ stroke-linecap="round"
495
+ stroke-linejoin="round"
496
+ >
497
+ <path d="M12 6v6l4 2" />
498
+ <circle cx="12" cy="12" r="10" />
499
+ </svg>`,code:`<svg
500
+ xmlns="http://www.w3.org/2000/svg"
501
+ width="24"
502
+ height="24"
503
+ viewBox="0 0 24 24"
504
+ fill="none"
505
+ stroke="currentColor"
506
+ stroke-width="2"
507
+ stroke-linecap="round"
508
+ stroke-linejoin="round"
509
+ >
510
+ <path d="m16 18 6-6-6-6" />
511
+ <path d="m8 6-6 6 6 6" />
512
+ </svg>`,compass:`<svg
513
+ xmlns="http://www.w3.org/2000/svg"
514
+ width="24"
515
+ height="24"
516
+ viewBox="0 0 24 24"
517
+ fill="none"
518
+ stroke="currentColor"
519
+ stroke-width="2"
520
+ stroke-linecap="round"
521
+ stroke-linejoin="round"
522
+ >
523
+ <path d="m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z" />
524
+ <circle cx="12" cy="12" r="10" />
525
+ </svg>`,copy:`<svg
526
+ xmlns="http://www.w3.org/2000/svg"
527
+ width="24"
528
+ height="24"
529
+ viewBox="0 0 24 24"
530
+ fill="none"
531
+ stroke="currentColor"
532
+ stroke-width="2"
533
+ stroke-linecap="round"
534
+ stroke-linejoin="round"
535
+ >
536
+ <rect width="14" height="14" x="8" y="8" rx="2" ry="2" />
537
+ <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />
538
+ </svg>`,"credit-card":`<svg
539
+ xmlns="http://www.w3.org/2000/svg"
540
+ width="24"
541
+ height="24"
542
+ viewBox="0 0 24 24"
543
+ fill="none"
544
+ stroke="currentColor"
545
+ stroke-width="2"
546
+ stroke-linecap="round"
547
+ stroke-linejoin="round"
548
+ >
549
+ <rect width="20" height="14" x="2" y="5" rx="2" />
550
+ <line x1="2" x2="22" y1="10" y2="10" />
551
+ </svg>`,dock:`<svg
552
+ xmlns="http://www.w3.org/2000/svg"
553
+ width="24"
554
+ height="24"
555
+ viewBox="0 0 24 24"
556
+ fill="none"
557
+ stroke="currentColor"
558
+ stroke-width="2"
559
+ stroke-linecap="round"
560
+ stroke-linejoin="round"
561
+ >
562
+ <path d="M2 8h20" />
563
+ <rect width="20" height="16" x="2" y="4" rx="2" />
564
+ <path d="M6 16h12" />
565
+ </svg>`,"dollar-sign":`<svg
566
+ xmlns="http://www.w3.org/2000/svg"
567
+ width="24"
568
+ height="24"
569
+ viewBox="0 0 24 24"
570
+ fill="none"
571
+ stroke="currentColor"
572
+ stroke-width="2"
573
+ stroke-linecap="round"
574
+ stroke-linejoin="round"
575
+ >
576
+ <line x1="12" x2="12" y1="2" y2="22" />
577
+ <path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6" />
578
+ </svg>`,download:`<svg
579
+ xmlns="http://www.w3.org/2000/svg"
580
+ width="24"
581
+ height="24"
582
+ viewBox="0 0 24 24"
583
+ fill="none"
584
+ stroke="currentColor"
585
+ stroke-width="2"
586
+ stroke-linecap="round"
587
+ stroke-linejoin="round"
588
+ >
589
+ <path d="M12 15V3" />
590
+ <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />
591
+ <path d="m7 10 5 5 5-5" />
592
+ </svg>`,edit:"404: Not Found","external-link":`<svg
593
+ xmlns="http://www.w3.org/2000/svg"
594
+ width="24"
595
+ height="24"
596
+ viewBox="0 0 24 24"
597
+ fill="none"
598
+ stroke="currentColor"
599
+ stroke-width="2"
600
+ stroke-linecap="round"
601
+ stroke-linejoin="round"
602
+ >
603
+ <path d="M15 3h6v6" />
604
+ <path d="M10 14 21 3" />
605
+ <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />
606
+ </svg>`,"eye-off":`<svg
607
+ xmlns="http://www.w3.org/2000/svg"
608
+ width="24"
609
+ height="24"
610
+ viewBox="0 0 24 24"
611
+ fill="none"
612
+ stroke="currentColor"
613
+ stroke-width="2"
614
+ stroke-linecap="round"
615
+ stroke-linejoin="round"
616
+ >
617
+ <path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" />
618
+ <path d="M14.084 14.158a3 3 0 0 1-4.242-4.242" />
619
+ <path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" />
620
+ <path d="m2 2 20 20" />
458
621
  </svg>`,facebook:`<svg
459
622
  xmlns="http://www.w3.org/2000/svg"
460
623
  width="24"
@@ -467,7 +630,7 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
467
630
  stroke-linejoin="round"
468
631
  >
469
632
  <path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z" />
470
- </svg>`,youtube:`<svg
633
+ </svg>`,"file-text":`<svg
471
634
  xmlns="http://www.w3.org/2000/svg"
472
635
  width="24"
473
636
  height="24"
@@ -478,9 +641,12 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
478
641
  stroke-linecap="round"
479
642
  stroke-linejoin="round"
480
643
  >
481
- <path d="M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17" />
482
- <path d="m10 15 5-3-5-3z" />
483
- </svg>`,linkedin:`<svg
644
+ <path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" />
645
+ <path d="M14 2v5a1 1 0 0 0 1 1h5" />
646
+ <path d="M10 9H8" />
647
+ <path d="M16 13H8" />
648
+ <path d="M16 17H8" />
649
+ </svg>`,"file-x":`<svg
484
650
  xmlns="http://www.w3.org/2000/svg"
485
651
  width="24"
486
652
  height="24"
@@ -491,10 +657,11 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
491
657
  stroke-linecap="round"
492
658
  stroke-linejoin="round"
493
659
  >
494
- <path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z" />
495
- <rect width="4" height="12" x="2" y="9" />
496
- <circle cx="4" cy="4" r="2" />
497
- </svg>`,telegram:"404: Not Found",whatsapp:"404: Not Found",twitter:`<svg
660
+ <path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" />
661
+ <path d="M14 2v5a1 1 0 0 0 1 1h5" />
662
+ <path d="m14.5 12.5-5 5" />
663
+ <path d="m9.5 12.5 5 5" />
664
+ </svg>`,filter:"404: Not Found",folder:`<svg
498
665
  xmlns="http://www.w3.org/2000/svg"
499
666
  width="24"
500
667
  height="24"
@@ -505,8 +672,8 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
505
672
  stroke-linecap="round"
506
673
  stroke-linejoin="round"
507
674
  >
508
- <path d="M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z" />
509
- </svg>`,"arrow-right":`<svg
675
+ <path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" />
676
+ </svg>`,globe:`<svg
510
677
  xmlns="http://www.w3.org/2000/svg"
511
678
  width="24"
512
679
  height="24"
@@ -517,9 +684,10 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
517
684
  stroke-linecap="round"
518
685
  stroke-linejoin="round"
519
686
  >
520
- <path d="M5 12h14" />
521
- <path d="m12 5 7 7-7 7" />
522
- </svg>`,"arrow-left":`<svg
687
+ <circle cx="12" cy="12" r="10" />
688
+ <path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" />
689
+ <path d="M2 12h20" />
690
+ </svg>`,hash:`<svg
523
691
  xmlns="http://www.w3.org/2000/svg"
524
692
  width="24"
525
693
  height="24"
@@ -530,9 +698,11 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
530
698
  stroke-linecap="round"
531
699
  stroke-linejoin="round"
532
700
  >
533
- <path d="m12 19-7-7 7-7" />
534
- <path d="M19 12H5" />
535
- </svg>`,"arrow-up":`<svg
701
+ <line x1="4" x2="20" y1="9" y2="9" />
702
+ <line x1="4" x2="20" y1="15" y2="15" />
703
+ <line x1="10" x2="8" y1="3" y2="21" />
704
+ <line x1="16" x2="14" y1="3" y2="21" />
705
+ </svg>`,"help-circle":"404: Not Found","image-plus":`<svg
536
706
  xmlns="http://www.w3.org/2000/svg"
537
707
  width="24"
538
708
  height="24"
@@ -543,9 +713,12 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
543
713
  stroke-linecap="round"
544
714
  stroke-linejoin="round"
545
715
  >
546
- <path d="m5 12 7-7 7 7" />
547
- <path d="M12 19V5" />
548
- </svg>`,"arrow-down":`<svg
716
+ <path d="M16 5h6" />
717
+ <path d="M19 2v6" />
718
+ <path d="M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5" />
719
+ <path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" />
720
+ <circle cx="9" cy="9" r="2" />
721
+ </svg>`,image:`<svg
549
722
  xmlns="http://www.w3.org/2000/svg"
550
723
  width="24"
551
724
  height="24"
@@ -556,9 +729,10 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
556
729
  stroke-linecap="round"
557
730
  stroke-linejoin="round"
558
731
  >
559
- <path d="M12 5v14" />
560
- <path d="m19 12-7 7-7-7" />
561
- </svg>`,"arrow-right-to-line":`<svg
732
+ <rect width="18" height="18" x="3" y="3" rx="2" ry="2" />
733
+ <circle cx="9" cy="9" r="2" />
734
+ <path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" />
735
+ </svg>`,info:`<svg
562
736
  xmlns="http://www.w3.org/2000/svg"
563
737
  width="24"
564
738
  height="24"
@@ -569,10 +743,10 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
569
743
  stroke-linecap="round"
570
744
  stroke-linejoin="round"
571
745
  >
572
- <path d="M17 12H3" />
573
- <path d="m11 18 6-6-6-6" />
574
- <path d="M21 5v14" />
575
- </svg>`,"arrow-left-to-line":`<svg
746
+ <circle cx="12" cy="12" r="10" />
747
+ <path d="M12 16v-4" />
748
+ <path d="M12 8h.01" />
749
+ </svg>`,keyboard:`<svg
576
750
  xmlns="http://www.w3.org/2000/svg"
577
751
  width="24"
578
752
  height="24"
@@ -583,9 +757,82 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
583
757
  stroke-linecap="round"
584
758
  stroke-linejoin="round"
585
759
  >
586
- <path d="M3 19V5" />
587
- <path d="m13 6-6 6 6 6" />
588
- <path d="M7 12h14" />
760
+ <path d="M10 8h.01" />
761
+ <path d="M12 12h.01" />
762
+ <path d="M14 8h.01" />
763
+ <path d="M16 12h.01" />
764
+ <path d="M18 8h.01" />
765
+ <path d="M6 8h.01" />
766
+ <path d="M7 16h10" />
767
+ <path d="M8 12h.01" />
768
+ <rect width="20" height="16" x="2" y="4" rx="2" />
769
+ </svg>`,"layout-panel-left":`<svg
770
+ xmlns="http://www.w3.org/2000/svg"
771
+ width="24"
772
+ height="24"
773
+ viewBox="0 0 24 24"
774
+ fill="none"
775
+ stroke="currentColor"
776
+ stroke-width="2"
777
+ stroke-linecap="round"
778
+ stroke-linejoin="round"
779
+ >
780
+ <rect width="7" height="18" x="3" y="3" rx="1" />
781
+ <rect width="7" height="7" x="14" y="3" rx="1" />
782
+ <rect width="7" height="7" x="14" y="14" rx="1" />
783
+ </svg>`,linkedin:`<svg
784
+ xmlns="http://www.w3.org/2000/svg"
785
+ width="24"
786
+ height="24"
787
+ viewBox="0 0 24 24"
788
+ fill="none"
789
+ stroke="currentColor"
790
+ stroke-width="2"
791
+ stroke-linecap="round"
792
+ stroke-linejoin="round"
793
+ >
794
+ <path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z" />
795
+ <rect width="4" height="12" x="2" y="9" />
796
+ <circle cx="4" cy="4" r="2" />
797
+ </svg>`,"loader-circle":`<svg
798
+ xmlns="http://www.w3.org/2000/svg"
799
+ width="24"
800
+ height="24"
801
+ viewBox="0 0 24 24"
802
+ fill="none"
803
+ stroke="currentColor"
804
+ stroke-width="2"
805
+ stroke-linecap="round"
806
+ stroke-linejoin="round"
807
+ >
808
+ <path d="M21 12a9 9 0 1 1-6.219-8.56" />
809
+ </svg>`,"log-out":`<svg
810
+ xmlns="http://www.w3.org/2000/svg"
811
+ width="24"
812
+ height="24"
813
+ viewBox="0 0 24 24"
814
+ fill="none"
815
+ stroke="currentColor"
816
+ stroke-width="2"
817
+ stroke-linecap="round"
818
+ stroke-linejoin="round"
819
+ >
820
+ <path d="m16 17 5-5-5-5" />
821
+ <path d="M21 12H9" />
822
+ <path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
823
+ </svg>`,mail:`<svg
824
+ xmlns="http://www.w3.org/2000/svg"
825
+ width="24"
826
+ height="24"
827
+ viewBox="0 0 24 24"
828
+ fill="none"
829
+ stroke="currentColor"
830
+ stroke-width="2"
831
+ stroke-linecap="round"
832
+ stroke-linejoin="round"
833
+ >
834
+ <path d="m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7" />
835
+ <rect x="2" y="4" width="20" height="16" rx="2" />
589
836
  </svg>`,"maximize-2":`<svg
590
837
  xmlns="http://www.w3.org/2000/svg"
591
838
  width="24"
@@ -601,7 +848,7 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
601
848
  <path d="m21 3-7 7" />
602
849
  <path d="m3 21 7-7" />
603
850
  <path d="M9 21H3v-6" />
604
- </svg>`,"minimize-2":`<svg
851
+ </svg>`,menu:`<svg
605
852
  xmlns="http://www.w3.org/2000/svg"
606
853
  width="24"
607
854
  height="24"
@@ -612,11 +859,10 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
612
859
  stroke-linecap="round"
613
860
  stroke-linejoin="round"
614
861
  >
615
- <path d="m14 10 7-7" />
616
- <path d="M20 10h-6V4" />
617
- <path d="m3 21 7-7" />
618
- <path d="M4 14h6v6" />
619
- </svg>`,"skip-forward":`<svg
862
+ <path d="M4 5h16" />
863
+ <path d="M4 12h16" />
864
+ <path d="M4 19h16" />
865
+ </svg>`,"message-square":`<svg
620
866
  xmlns="http://www.w3.org/2000/svg"
621
867
  width="24"
622
868
  height="24"
@@ -627,9 +873,8 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
627
873
  stroke-linecap="round"
628
874
  stroke-linejoin="round"
629
875
  >
630
- <path d="M21 4v16" />
631
- <path d="M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z" />
632
- </svg>`,"skip-back":`<svg
876
+ <path d="M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" />
877
+ </svg>`,"minimize-2":`<svg
633
878
  xmlns="http://www.w3.org/2000/svg"
634
879
  width="24"
635
880
  height="24"
@@ -640,9 +885,11 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
640
885
  stroke-linecap="round"
641
886
  stroke-linejoin="round"
642
887
  >
643
- <path d="M17.971 4.285A2 2 0 0 1 21 6v12a2 2 0 0 1-3.029 1.715l-9.997-5.998a2 2 0 0 1-.003-3.432z" />
644
- <path d="M3 20V4" />
645
- </svg>`,"mouse-pointer-click":`<svg
888
+ <path d="m14 10 7-7" />
889
+ <path d="M20 10h-6V4" />
890
+ <path d="m3 21 7-7" />
891
+ <path d="M4 14h6v6" />
892
+ </svg>`,monitor:`<svg
646
893
  xmlns="http://www.w3.org/2000/svg"
647
894
  width="24"
648
895
  height="24"
@@ -653,12 +900,10 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
653
900
  stroke-linecap="round"
654
901
  stroke-linejoin="round"
655
902
  >
656
- <path d="M14 4.1 12 6" />
657
- <path d="m5.1 8-2.9-.8" />
658
- <path d="m6 12-1.9 2" />
659
- <path d="M7.2 2.2 8 5.1" />
660
- <path d="M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z" />
661
- </svg>`,globe:`<svg
903
+ <rect width="20" height="14" x="2" y="3" rx="2" />
904
+ <line x1="8" x2="16" y1="21" y2="21" />
905
+ <line x1="12" x2="12" y1="17" y2="21" />
906
+ </svg>`,moon:`<svg
662
907
  xmlns="http://www.w3.org/2000/svg"
663
908
  width="24"
664
909
  height="24"
@@ -669,10 +914,8 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
669
914
  stroke-linecap="round"
670
915
  stroke-linejoin="round"
671
916
  >
672
- <circle cx="12" cy="12" r="10" />
673
- <path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" />
674
- <path d="M2 12h20" />
675
- </svg>`,play:`<svg
917
+ <path d="M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401" />
918
+ </svg>`,"mouse-pointer-click":`<svg
676
919
  xmlns="http://www.w3.org/2000/svg"
677
920
  width="24"
678
921
  height="24"
@@ -683,8 +926,12 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
683
926
  stroke-linecap="round"
684
927
  stroke-linejoin="round"
685
928
  >
686
- <path d="M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z" />
687
- </svg>`,pause:`<svg
929
+ <path d="M14 4.1 12 6" />
930
+ <path d="m5.1 8-2.9-.8" />
931
+ <path d="m6 12-1.9 2" />
932
+ <path d="M7.2 2.2 8 5.1" />
933
+ <path d="M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z" />
934
+ </svg>`,package:`<svg
688
935
  xmlns="http://www.w3.org/2000/svg"
689
936
  width="24"
690
937
  height="24"
@@ -695,9 +942,11 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
695
942
  stroke-linecap="round"
696
943
  stroke-linejoin="round"
697
944
  >
698
- <rect x="14" y="3" width="5" height="18" rx="1" />
699
- <rect x="5" y="3" width="5" height="18" rx="1" />
700
- </svg>`,"volume-off":`<svg
945
+ <path d="M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z" />
946
+ <path d="M12 22V12" />
947
+ <polyline points="3.29 7 12 12 20.71 7" />
948
+ <path d="m7.5 4.27 9 5.15" />
949
+ </svg>`,palette:`<svg
701
950
  xmlns="http://www.w3.org/2000/svg"
702
951
  width="24"
703
952
  height="24"
@@ -708,12 +957,12 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
708
957
  stroke-linecap="round"
709
958
  stroke-linejoin="round"
710
959
  >
711
- <path d="M16 9a5 5 0 0 1 .95 2.293" />
712
- <path d="M19.364 5.636a9 9 0 0 1 1.889 9.96" />
713
- <path d="m2 2 20 20" />
714
- <path d="m7 7-.587.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298V11" />
715
- <path d="M9.828 4.172A.686.686 0 0 1 11 4.657v.686" />
716
- </svg>`,"volume-2":`<svg
960
+ <path d="M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z" />
961
+ <circle cx="13.5" cy="6.5" r=".5" fill="currentColor" />
962
+ <circle cx="17.5" cy="10.5" r=".5" fill="currentColor" />
963
+ <circle cx="6.5" cy="12.5" r=".5" fill="currentColor" />
964
+ <circle cx="8.5" cy="7.5" r=".5" fill="currentColor" />
965
+ </svg>`,"panel-left-close":`<svg
717
966
  xmlns="http://www.w3.org/2000/svg"
718
967
  width="24"
719
968
  height="24"
@@ -724,9 +973,9 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
724
973
  stroke-linecap="round"
725
974
  stroke-linejoin="round"
726
975
  >
727
- <path d="M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z" />
728
- <path d="M16 9a5 5 0 0 1 0 6" />
729
- <path d="M19.364 18.364a9 9 0 0 0 0-12.728" />
976
+ <rect width="18" height="18" x="3" y="3" rx="2" />
977
+ <path d="M9 3v18" />
978
+ <path d="m16 15-3-3 3-3" />
730
979
  </svg>`,"panel-left-open":`<svg
731
980
  xmlns="http://www.w3.org/2000/svg"
732
981
  width="24"
@@ -741,7 +990,7 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
741
990
  <rect width="18" height="18" x="3" y="3" rx="2" />
742
991
  <path d="M9 3v18" />
743
992
  <path d="m14 9 3 3-3 3" />
744
- </svg>`,"panel-left-close":`<svg
993
+ </svg>`,pause:`<svg
745
994
  xmlns="http://www.w3.org/2000/svg"
746
995
  width="24"
747
996
  height="24"
@@ -752,10 +1001,9 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
752
1001
  stroke-linecap="round"
753
1002
  stroke-linejoin="round"
754
1003
  >
755
- <rect width="18" height="18" x="3" y="3" rx="2" />
756
- <path d="M9 3v18" />
757
- <path d="m16 15-3-3 3-3" />
758
- </svg>`,"square-pen":`<svg
1004
+ <rect x="14" y="3" width="5" height="18" rx="1" />
1005
+ <rect x="5" y="3" width="5" height="18" rx="1" />
1006
+ </svg>`,phone:`<svg
759
1007
  xmlns="http://www.w3.org/2000/svg"
760
1008
  width="24"
761
1009
  height="24"
@@ -766,9 +1014,8 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
766
1014
  stroke-linecap="round"
767
1015
  stroke-linejoin="round"
768
1016
  >
769
- <path d="M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" />
770
- <path d="M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z" />
771
- </svg>`,share:`<svg
1017
+ <path d="M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384" />
1018
+ </svg>`,play:`<svg
772
1019
  xmlns="http://www.w3.org/2000/svg"
773
1020
  width="24"
774
1021
  height="24"
@@ -779,10 +1026,21 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
779
1026
  stroke-linecap="round"
780
1027
  stroke-linejoin="round"
781
1028
  >
782
- <path d="M12 2v13" />
783
- <path d="m16 6-4-4-4 4" />
784
- <path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8" />
785
- </svg>`,settings:`<svg
1029
+ <path d="M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z" />
1030
+ </svg>`,plus:`<svg
1031
+ xmlns="http://www.w3.org/2000/svg"
1032
+ width="24"
1033
+ height="24"
1034
+ viewBox="0 0 24 24"
1035
+ fill="none"
1036
+ stroke="currentColor"
1037
+ stroke-width="2"
1038
+ stroke-linecap="round"
1039
+ stroke-linejoin="round"
1040
+ >
1041
+ <path d="M5 12h14" />
1042
+ <path d="M12 5v14" />
1043
+ </svg>`,"refresh-cw":`<svg
786
1044
  xmlns="http://www.w3.org/2000/svg"
787
1045
  width="24"
788
1046
  height="24"
@@ -793,9 +1051,11 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
793
1051
  stroke-linecap="round"
794
1052
  stroke-linejoin="round"
795
1053
  >
796
- <path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" />
797
- <circle cx="12" cy="12" r="3" />
798
- </svg>`,"dollar-sign":`<svg
1054
+ <path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" />
1055
+ <path d="M21 3v5h-5" />
1056
+ <path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" />
1057
+ <path d="M8 16H3v5" />
1058
+ </svg>`,rocket:`<svg
799
1059
  xmlns="http://www.w3.org/2000/svg"
800
1060
  width="24"
801
1061
  height="24"
@@ -806,9 +1066,11 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
806
1066
  stroke-linecap="round"
807
1067
  stroke-linejoin="round"
808
1068
  >
809
- <line x1="12" x2="12" y1="2" y2="22" />
810
- <path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6" />
811
- </svg>`,"book-open":`<svg
1069
+ <path d="M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z" />
1070
+ <path d="m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z" />
1071
+ <path d="M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0" />
1072
+ <path d="M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5" />
1073
+ </svg>`,save:`<svg
812
1074
  xmlns="http://www.w3.org/2000/svg"
813
1075
  width="24"
814
1076
  height="24"
@@ -819,9 +1081,10 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
819
1081
  stroke-linecap="round"
820
1082
  stroke-linejoin="round"
821
1083
  >
822
- <path d="M12 7v14" />
823
- <path d="M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z" />
824
- </svg>`,users:`<svg
1084
+ <path d="M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z" />
1085
+ <path d="M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7" />
1086
+ <path d="M7 3v4a1 1 0 0 0 1 1h7" />
1087
+ </svg>`,search:`<svg
825
1088
  xmlns="http://www.w3.org/2000/svg"
826
1089
  width="24"
827
1090
  height="24"
@@ -832,11 +1095,9 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
832
1095
  stroke-linecap="round"
833
1096
  stroke-linejoin="round"
834
1097
  >
835
- <path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" />
836
- <path d="M16 3.128a4 4 0 0 1 0 7.744" />
837
- <path d="M22 21v-2a4 4 0 0 0-3-3.87" />
838
- <circle cx="9" cy="7" r="4" />
839
- </svg>`,"help-circle":"404: Not Found",monitor:`<svg
1098
+ <path d="m21 21-4.34-4.34" />
1099
+ <circle cx="11" cy="11" r="8" />
1100
+ </svg>`,send:`<svg
840
1101
  xmlns="http://www.w3.org/2000/svg"
841
1102
  width="24"
842
1103
  height="24"
@@ -847,10 +1108,9 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
847
1108
  stroke-linecap="round"
848
1109
  stroke-linejoin="round"
849
1110
  >
850
- <rect width="20" height="14" x="2" y="3" rx="2" />
851
- <line x1="8" x2="16" y1="21" y2="21" />
852
- <line x1="12" x2="12" y1="17" y2="21" />
853
- </svg>`,sun:`<svg
1111
+ <path d="M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z" />
1112
+ <path d="m21.854 2.147-10.94 10.939" />
1113
+ </svg>`,settings:`<svg
854
1114
  xmlns="http://www.w3.org/2000/svg"
855
1115
  width="24"
856
1116
  height="24"
@@ -861,16 +1121,9 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
861
1121
  stroke-linecap="round"
862
1122
  stroke-linejoin="round"
863
1123
  >
864
- <circle cx="12" cy="12" r="4" />
865
- <path d="M12 2v2" />
866
- <path d="M12 20v2" />
867
- <path d="m4.93 4.93 1.41 1.41" />
868
- <path d="m17.66 17.66 1.41 1.41" />
869
- <path d="M2 12h2" />
870
- <path d="M20 12h2" />
871
- <path d="m6.34 17.66-1.41 1.41" />
872
- <path d="m19.07 4.93-1.41 1.41" />
873
- </svg>`,moon:`<svg
1124
+ <path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" />
1125
+ <circle cx="12" cy="12" r="3" />
1126
+ </svg>`,share:`<svg
874
1127
  xmlns="http://www.w3.org/2000/svg"
875
1128
  width="24"
876
1129
  height="24"
@@ -881,8 +1134,10 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
881
1134
  stroke-linecap="round"
882
1135
  stroke-linejoin="round"
883
1136
  >
884
- <path d="M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401" />
885
- </svg>`,"log-out":`<svg
1137
+ <path d="M12 2v13" />
1138
+ <path d="m16 6-4-4-4 4" />
1139
+ <path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8" />
1140
+ </svg>`,"skip-back":`<svg
886
1141
  xmlns="http://www.w3.org/2000/svg"
887
1142
  width="24"
888
1143
  height="24"
@@ -893,10 +1148,9 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
893
1148
  stroke-linecap="round"
894
1149
  stroke-linejoin="round"
895
1150
  >
896
- <path d="m16 17 5-5-5-5" />
897
- <path d="M21 12H9" />
898
- <path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
899
- </svg>`,send:`<svg
1151
+ <path d="M17.971 4.285A2 2 0 0 1 21 6v12a2 2 0 0 1-3.029 1.715l-9.997-5.998a2 2 0 0 1-.003-3.432z" />
1152
+ <path d="M3 20V4" />
1153
+ </svg>`,"skip-forward":`<svg
900
1154
  xmlns="http://www.w3.org/2000/svg"
901
1155
  width="24"
902
1156
  height="24"
@@ -907,9 +1161,9 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
907
1161
  stroke-linecap="round"
908
1162
  stroke-linejoin="round"
909
1163
  >
910
- <path d="M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z" />
911
- <path d="m21.854 2.147-10.94 10.939" />
912
- </svg>`,x:`<svg
1164
+ <path d="M21 4v16" />
1165
+ <path d="M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z" />
1166
+ </svg>`,"sliders-horizontal":`<svg
913
1167
  xmlns="http://www.w3.org/2000/svg"
914
1168
  width="24"
915
1169
  height="24"
@@ -920,9 +1174,16 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
920
1174
  stroke-linecap="round"
921
1175
  stroke-linejoin="round"
922
1176
  >
923
- <path d="M18 6 6 18" />
924
- <path d="m6 6 12 12" />
925
- </svg>`,"circle-check-big":`<svg
1177
+ <path d="M10 5H3" />
1178
+ <path d="M12 19H3" />
1179
+ <path d="M14 3v4" />
1180
+ <path d="M16 17v4" />
1181
+ <path d="M21 12h-9" />
1182
+ <path d="M21 19h-5" />
1183
+ <path d="M21 5h-7" />
1184
+ <path d="M8 10v4" />
1185
+ <path d="M8 12H3" />
1186
+ </svg>`,smartphone:`<svg
926
1187
  xmlns="http://www.w3.org/2000/svg"
927
1188
  width="24"
928
1189
  height="24"
@@ -933,9 +1194,9 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
933
1194
  stroke-linecap="round"
934
1195
  stroke-linejoin="round"
935
1196
  >
936
- <path d="M21.801 10A10 10 0 1 1 17 3.335" />
937
- <path d="m9 11 3 3L22 4" />
938
- </svg>`,"square-mouse-pointer":`<svg
1197
+ <rect width="14" height="20" x="5" y="2" rx="2" ry="2" />
1198
+ <path d="M12 18h.01" />
1199
+ </svg>`,sparkles:`<svg
939
1200
  xmlns="http://www.w3.org/2000/svg"
940
1201
  width="24"
941
1202
  height="24"
@@ -946,9 +1207,11 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
946
1207
  stroke-linecap="round"
947
1208
  stroke-linejoin="round"
948
1209
  >
949
- <path d="M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z" />
950
- <path d="M21 11V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6" />
951
- </svg>`,"loader-circle":`<svg
1210
+ <path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z" />
1211
+ <path d="M20 2v4" />
1212
+ <path d="M22 4h-4" />
1213
+ <circle cx="4" cy="20" r="2" />
1214
+ </svg>`,"square-library":`<svg
952
1215
  xmlns="http://www.w3.org/2000/svg"
953
1216
  width="24"
954
1217
  height="24"
@@ -959,8 +1222,11 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
959
1222
  stroke-linecap="round"
960
1223
  stroke-linejoin="round"
961
1224
  >
962
- <path d="M21 12a9 9 0 1 1-6.219-8.56" />
963
- </svg>`,"triangle-alert":`<svg
1225
+ <rect width="18" height="18" x="3" y="3" rx="2" />
1226
+ <path d="M7 7v10" />
1227
+ <path d="M11 7v10" />
1228
+ <path d="m15 7 2 10" />
1229
+ </svg>`,"square-mouse-pointer":`<svg
964
1230
  xmlns="http://www.w3.org/2000/svg"
965
1231
  width="24"
966
1232
  height="24"
@@ -971,10 +1237,9 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
971
1237
  stroke-linecap="round"
972
1238
  stroke-linejoin="round"
973
1239
  >
974
- <path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" />
975
- <path d="M12 9v4" />
976
- <path d="M12 17h.01" />
977
- </svg>`,compass:`<svg
1240
+ <path d="M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z" />
1241
+ <path d="M21 11V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6" />
1242
+ </svg>`,"square-pen":`<svg
978
1243
  xmlns="http://www.w3.org/2000/svg"
979
1244
  width="24"
980
1245
  height="24"
@@ -985,9 +1250,9 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
985
1250
  stroke-linecap="round"
986
1251
  stroke-linejoin="round"
987
1252
  >
988
- <path d="m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z" />
989
- <circle cx="12" cy="12" r="10" />
990
- </svg>`,"bed-double":`<svg
1253
+ <path d="M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" />
1254
+ <path d="M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z" />
1255
+ </svg>`,sun:`<svg
991
1256
  xmlns="http://www.w3.org/2000/svg"
992
1257
  width="24"
993
1258
  height="24"
@@ -998,11 +1263,16 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
998
1263
  stroke-linecap="round"
999
1264
  stroke-linejoin="round"
1000
1265
  >
1001
- <path d="M2 20v-8a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v8" />
1002
- <path d="M4 10V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4" />
1003
- <path d="M12 4v6" />
1004
- <path d="M2 18h20" />
1005
- </svg>`,"square-library":`<svg
1266
+ <circle cx="12" cy="12" r="4" />
1267
+ <path d="M12 2v2" />
1268
+ <path d="M12 20v2" />
1269
+ <path d="m4.93 4.93 1.41 1.41" />
1270
+ <path d="m17.66 17.66 1.41 1.41" />
1271
+ <path d="M2 12h2" />
1272
+ <path d="M20 12h2" />
1273
+ <path d="m6.34 17.66-1.41 1.41" />
1274
+ <path d="m19.07 4.93-1.41 1.41" />
1275
+ </svg>`,telegram:"404: Not Found","thumbs-down":`<svg
1006
1276
  xmlns="http://www.w3.org/2000/svg"
1007
1277
  width="24"
1008
1278
  height="24"
@@ -1013,11 +1283,9 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1013
1283
  stroke-linecap="round"
1014
1284
  stroke-linejoin="round"
1015
1285
  >
1016
- <rect width="18" height="18" x="3" y="3" rx="2" />
1017
- <path d="M7 7v10" />
1018
- <path d="M11 7v10" />
1019
- <path d="m15 7 2 10" />
1020
- </svg>`,"trending-up":`<svg
1286
+ <path d="M17 14V2" />
1287
+ <path d="M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z" />
1288
+ </svg>`,"thumbs-up":`<svg
1021
1289
  xmlns="http://www.w3.org/2000/svg"
1022
1290
  width="24"
1023
1291
  height="24"
@@ -1028,9 +1296,9 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1028
1296
  stroke-linecap="round"
1029
1297
  stroke-linejoin="round"
1030
1298
  >
1031
- <path d="M16 7h6v6" />
1032
- <path d="m22 7-8.5 8.5-5-5L2 17" />
1033
- </svg>`,plus:`<svg
1299
+ <path d="M7 10v12" />
1300
+ <path d="M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z" />
1301
+ </svg>`,"trash-2":`<svg
1034
1302
  xmlns="http://www.w3.org/2000/svg"
1035
1303
  width="24"
1036
1304
  height="24"
@@ -1041,9 +1309,12 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1041
1309
  stroke-linecap="round"
1042
1310
  stroke-linejoin="round"
1043
1311
  >
1044
- <path d="M5 12h14" />
1045
- <path d="M12 5v14" />
1046
- </svg>`,sparkles:`<svg
1312
+ <path d="M10 11v6" />
1313
+ <path d="M14 11v6" />
1314
+ <path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" />
1315
+ <path d="M3 6h18" />
1316
+ <path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />
1317
+ </svg>`,"trending-up":`<svg
1047
1318
  xmlns="http://www.w3.org/2000/svg"
1048
1319
  width="24"
1049
1320
  height="24"
@@ -1054,11 +1325,9 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1054
1325
  stroke-linecap="round"
1055
1326
  stroke-linejoin="round"
1056
1327
  >
1057
- <path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z" />
1058
- <path d="M20 2v4" />
1059
- <path d="M22 4h-4" />
1060
- <circle cx="4" cy="20" r="2" />
1061
- </svg>`,zap:`<svg
1328
+ <path d="M16 7h6v6" />
1329
+ <path d="m22 7-8.5 8.5-5-5L2 17" />
1330
+ </svg>`,"triangle-alert":`<svg
1062
1331
  xmlns="http://www.w3.org/2000/svg"
1063
1332
  width="24"
1064
1333
  height="24"
@@ -1069,8 +1338,10 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1069
1338
  stroke-linecap="round"
1070
1339
  stroke-linejoin="round"
1071
1340
  >
1072
- <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" />
1073
- </svg>`,"image-plus":`<svg
1341
+ <path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" />
1342
+ <path d="M12 9v4" />
1343
+ <path d="M12 17h.01" />
1344
+ </svg>`,twitter:`<svg
1074
1345
  xmlns="http://www.w3.org/2000/svg"
1075
1346
  width="24"
1076
1347
  height="24"
@@ -1081,12 +1352,8 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1081
1352
  stroke-linecap="round"
1082
1353
  stroke-linejoin="round"
1083
1354
  >
1084
- <path d="M16 5h6" />
1085
- <path d="M19 2v6" />
1086
- <path d="M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5" />
1087
- <path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" />
1088
- <circle cx="9" cy="9" r="2" />
1089
- </svg>`,"external-link":`<svg
1355
+ <path d="M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z" />
1356
+ </svg>`,upload:`<svg
1090
1357
  xmlns="http://www.w3.org/2000/svg"
1091
1358
  width="24"
1092
1359
  height="24"
@@ -1097,10 +1364,10 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1097
1364
  stroke-linecap="round"
1098
1365
  stroke-linejoin="round"
1099
1366
  >
1100
- <path d="M15 3h6v6" />
1101
- <path d="M10 14 21 3" />
1102
- <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />
1103
- </svg>`,"trash-2":`<svg
1367
+ <path d="M12 3v12" />
1368
+ <path d="m17 8-5-5-5 5" />
1369
+ <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />
1370
+ </svg>`,user:`<svg
1104
1371
  xmlns="http://www.w3.org/2000/svg"
1105
1372
  width="24"
1106
1373
  height="24"
@@ -1111,12 +1378,9 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1111
1378
  stroke-linecap="round"
1112
1379
  stroke-linejoin="round"
1113
1380
  >
1114
- <path d="M10 11v6" />
1115
- <path d="M14 11v6" />
1116
- <path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" />
1117
- <path d="M3 6h18" />
1118
- <path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />
1119
- </svg>`,dock:`<svg
1381
+ <path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" />
1382
+ <circle cx="12" cy="7" r="4" />
1383
+ </svg>`,users:`<svg
1120
1384
  xmlns="http://www.w3.org/2000/svg"
1121
1385
  width="24"
1122
1386
  height="24"
@@ -1127,10 +1391,11 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1127
1391
  stroke-linecap="round"
1128
1392
  stroke-linejoin="round"
1129
1393
  >
1130
- <path d="M2 8h20" />
1131
- <rect width="20" height="16" x="2" y="4" rx="2" />
1132
- <path d="M6 16h12" />
1133
- </svg>`,"refresh-cw":`<svg
1394
+ <path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" />
1395
+ <path d="M16 3.128a4 4 0 0 1 0 7.744" />
1396
+ <path d="M22 21v-2a4 4 0 0 0-3-3.87" />
1397
+ <circle cx="9" cy="7" r="4" />
1398
+ </svg>`,"volume-2":`<svg
1134
1399
  xmlns="http://www.w3.org/2000/svg"
1135
1400
  width="24"
1136
1401
  height="24"
@@ -1141,11 +1406,10 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1141
1406
  stroke-linecap="round"
1142
1407
  stroke-linejoin="round"
1143
1408
  >
1144
- <path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" />
1145
- <path d="M21 3v5h-5" />
1146
- <path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" />
1147
- <path d="M8 16H3v5" />
1148
- </svg>`,copy:`<svg
1409
+ <path d="M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z" />
1410
+ <path d="M16 9a5 5 0 0 1 0 6" />
1411
+ <path d="M19.364 18.364a9 9 0 0 0 0-12.728" />
1412
+ </svg>`,"volume-off":`<svg
1149
1413
  xmlns="http://www.w3.org/2000/svg"
1150
1414
  width="24"
1151
1415
  height="24"
@@ -1156,9 +1420,12 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1156
1420
  stroke-linecap="round"
1157
1421
  stroke-linejoin="round"
1158
1422
  >
1159
- <rect width="14" height="14" x="8" y="8" rx="2" ry="2" />
1160
- <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />
1161
- </svg>`,check:`<svg
1423
+ <path d="M16 9a5 5 0 0 1 .95 2.293" />
1424
+ <path d="M19.364 5.636a9 9 0 0 1 1.889 9.96" />
1425
+ <path d="m2 2 20 20" />
1426
+ <path d="m7 7-.587.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298V11" />
1427
+ <path d="M9.828 4.172A.686.686 0 0 1 11 4.657v.686" />
1428
+ </svg>`,whatsapp:"404: Not Found",x:`<svg
1162
1429
  xmlns="http://www.w3.org/2000/svg"
1163
1430
  width="24"
1164
1431
  height="24"
@@ -1169,8 +1436,9 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1169
1436
  stroke-linecap="round"
1170
1437
  stroke-linejoin="round"
1171
1438
  >
1172
- <path d="M20 6 9 17l-5-5" />
1173
- </svg>`,"arrow-down-up":`<svg
1439
+ <path d="M18 6 6 18" />
1440
+ <path d="m6 6 12 12" />
1441
+ </svg>`,youtube:`<svg
1174
1442
  xmlns="http://www.w3.org/2000/svg"
1175
1443
  width="24"
1176
1444
  height="24"
@@ -1181,11 +1449,9 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1181
1449
  stroke-linecap="round"
1182
1450
  stroke-linejoin="round"
1183
1451
  >
1184
- <path d="m3 16 4 4 4-4" />
1185
- <path d="M7 20V4" />
1186
- <path d="m21 8-4-4-4 4" />
1187
- <path d="M17 4v16" />
1188
- </svg>`,"sliders-horizontal":`<svg
1452
+ <path d="M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17" />
1453
+ <path d="m10 15 5-3-5-3z" />
1454
+ </svg>`,zap:`<svg
1189
1455
  xmlns="http://www.w3.org/2000/svg"
1190
1456
  width="24"
1191
1457
  height="24"
@@ -1196,25 +1462,18 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1196
1462
  stroke-linecap="round"
1197
1463
  stroke-linejoin="round"
1198
1464
  >
1199
- <path d="M10 5H3" />
1200
- <path d="M12 19H3" />
1201
- <path d="M14 3v4" />
1202
- <path d="M16 17v4" />
1203
- <path d="M21 12h-9" />
1204
- <path d="M21 19h-5" />
1205
- <path d="M21 5h-7" />
1206
- <path d="M8 10v4" />
1207
- <path d="M8 12H3" />
1208
- </svg>`};var wr=class t extends HTMLElement{static observedAttributes=["name","fill","stroke"];constructor(){super(),this.attachShadow({mode:"open"})}attributeChangedCallback(e,r,n){if(r!==n&&t.observedAttributes.includes(e)){switch(e){case"name":this.name=n||"";break;case"fill":this.fill=n||"none";break;case"stroke":this.stroke=n||"currentColor";break}this.render()}}resolveIcon(e){throw new Error("Not implemented")}render(){let e=document.createElement("style");if(e.textContent=`
1465
+ <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" />
1466
+ </svg>`};var vr=class t extends HTMLElement{static observedAttributes=["name","fill","stroke"];constructor(){super(),this.attachShadow({mode:"open"})}attributeChangedCallback(e,r,n){if(r!==n&&t.observedAttributes.includes(e)){switch(e){case"name":this.name=n||"";break;case"fill":this.fill=n||"none";break;case"stroke":this.stroke=n||"currentColor";break}this.render()}}resolveIcon(e){throw new Error("Not implemented")}render(){let e=document.createElement("style");if(e.textContent=`
1209
1467
  :host {
1210
1468
  display: inline-block;
1211
1469
  line-height: 0;
1212
1470
  }
1213
- `,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 Kl=ho,Kn=class extends wr{resolveIcon(e){return Kl[e]}};customElements.get("lucide-icon")||customElements.define("lucide-icon",Kn);var Te=class t extends C(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`
1471
+ `,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=go,Yn=class extends vr{resolveIcon(e){return tc[e]}};customElements.get("lucide-icon")||customElements.define("lucide-icon",Yn);var Te=class t extends C(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 d`
1214
1472
  <mw-spinning-border
1215
1473
  .size=${"420px"}
1216
1474
  .color=${this.color||"#8B5CF6"}
1217
1475
  .radius=${"24px"}
1476
+ ?dark-mode="${this.dark}"
1218
1477
  class="${this.dark?"dark":""} rounded-[24px] font-sans text-sm shadow-lg transition-transform duration-500 hover:scale-105">
1219
1478
  <form
1220
1479
  @submit="${this.#r}"
@@ -1234,31 +1493,31 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1234
1493
  <!-- submit button -->
1235
1494
  <button
1236
1495
  ?disabled="${this.disabled||!this._inputValue.trim()}"
1237
- class="relative ml-2 h-8 w-8 flex-none rounded-full bg-[${this.color||"#8B5CF6"}] p-0 text-white hover:opacity-70 disabled:bg-gray-400 disabled:text-gray-300 disabled:hover:opacity-100"
1496
+ class="${this.dark?"text-gray-800":"text-white"} relative ml-2 h-8 w-8 flex-none rounded-full bg-[${this.color||"#8B5CF6"}] p-0 hover:opacity-70 disabled:bg-gray-400 disabled:text-gray-300 disabled:hover:opacity-100"
1238
1497
  type="submit">
1239
1498
  <div class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2">
1240
- <lucide-icon class="block h-5 w-5 text-white" name="${"arrow-up"}"></lucide-icon>
1499
+ <lucide-icon class="${this.dark?"text-gray-800":"text-white"} block h-5 w-5" name="${"arrow-up"}"></lucide-icon>
1241
1500
  </div>
1242
1501
  </button>
1243
1502
  </form>
1244
1503
  </mw-spinning-border>
1245
- `}#r(e){e.preventDefault();let r=new Date;if(r.getTime()-this.#e.getTime()<500)return;this.#e=r;let i=this._inputValue.trim();i&&this.dispatchEvent(new t.SubmitInputEvent({text:i}))&&(this._inputValue="")}get#n(){return this.renderRoot.querySelector('input[name="input"]')??null}get#i(){return this.renderRoot.querySelector('button[type="submit"]')??null}#s(e){Yl(e)&&(e.preventDefault(),this.disabled||this.#i?.click())}};Te.SubmitInputEvent=class extends CustomEvent{static type="mw-floating-ask-ai:submit";constructor(e,r={}){super(Te.SubmitInputEvent.type,{detail:e,bubbles:!0,composed:!0,...r})}};Te.ChangeEvent=class extends CustomEvent{static type="mw-floating-ask-ai:change";constructor(e,r={}){super(Te.ChangeEvent.type,{detail:e,bubbles:!0,composed:!0,...r})}};function Yl(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",Te);var yr={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},vr=t=>(...e)=>({_$litDirective$:t,values:e}),Xe=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,r,n){this._$Ct=e,this._$AM=r,this._$Ci=n}_$AS(e,r){return this.update(e,r)}update(e,r){return this.render(...r)}};var{I:Ql}=es;var po=()=>document.createComment(""),et=(t,e,r)=>{let n=t._$AA.parentNode,i=e===void 0?t._$AB:e._$AA;if(r===void 0){let s=n.insertBefore(po(),i),o=n.insertBefore(po(),i);r=new Ql(s,o,t,t.options)}else{let s=r._$AB.nextSibling,o=r._$AM,c=o!==t;if(c){let l;r._$AQ?.(t),r._$AM=t,r._$AP!==void 0&&(l=t._$AU)!==o._$AU&&r._$AP(l)}if(s!==i||c){let l=r._$AA;for(;l!==s;){let a=l.nextSibling;n.insertBefore(l,i),l=a}}}return r},we=(t,e,r=t)=>(t._$AI(e,r),t),Xl={},fo=(t,e=Xl)=>t._$AH=e,mo=t=>t._$AH,br=t=>{t._$AR(),t._$AA.remove()};var go=(t,e,r)=>{let n=new Map;for(let i=e;i<=r;i++)n.set(t[i],i);return n},Q=vr(class extends Xe{constructor(t){if(super(t),t.type!==yr.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,r){let n;r===void 0?r=e:e!==void 0&&(n=e);let i=[],s=[],o=0;for(let c of t)i[o]=n?n(c,o):o,s[o]=r(c,o),o++;return{values:s,keys:i}}render(t,e,r){return this.dt(t,e,r).values}update(t,[e,r,n]){let i=mo(t),{values:s,keys:o}=this.dt(e,r,n);if(!Array.isArray(i))return this.ut=o,s;let c=this.ut??=[],l=[],a,h,d=0,f=i.length-1,p=0,y=s.length-1;for(;d<=f&&p<=y;)if(i[d]===null)d++;else if(i[f]===null)f--;else if(c[d]===o[p])l[p]=we(i[d],s[p]),d++,p++;else if(c[f]===o[y])l[y]=we(i[f],s[y]),f--,y--;else if(c[d]===o[y])l[y]=we(i[d],s[y]),et(t,l[y+1],i[d]),d++,y--;else if(c[f]===o[p])l[p]=we(i[f],s[p]),et(t,i[d],i[f]),f--,p++;else if(a===void 0&&(a=go(o,p,y),h=go(c,d,f)),a.has(c[d]))if(a.has(c[f])){let E=h.get(o[p]),b=E!==void 0?i[E]:null;if(b===null){let x=et(t,i[d]);we(x,s[p]),l[p]=x}else l[p]=we(b,s[p]),et(t,i[d],b),i[E]=null;p++}else br(i[f]),f--;else br(i[d]),d++;for(;p<=y;){let E=et(t,l[y+1]);we(E,s[p]),l[p++]=E}for(;d<=f;){let E=i[d++];E!==null&&br(E)}return this.ut=o,fo(t,l),ee}});var Et=class t extends C(v){static properties={examples:{type:Object},color:{type:String}};constructor(){super(),this.examples={title:"",items:[]},this.color=""}render(){return!this.examples?.title&&!this.examples?.items?.length?null:u`
1246
- <div class="flex h-full w-full flex-1 flex-col overflow-y-auto px-4 pt-6 pb-2">
1247
- ${this.examples.title?u`
1248
- <h2 class="mt-14 px-2 pt-9 pb-2 text-left text-3xl leading-tight font-bold tracking-tight">
1504
+ `}#r(e){e.preventDefault();let r=new Date;if(r.getTime()-this.#e.getTime()<500)return;this.#e=r;let i=this._inputValue.trim();i&&this.dispatchEvent(new t.SubmitInputEvent({text:i}))&&(this._inputValue="")}get#n(){return this.renderRoot.querySelector('input[name="input"]')??null}get#i(){return this.renderRoot.querySelector('button[type="submit"]')??null}#s(e){rc(e)&&(e.preventDefault(),this.disabled||this.#i?.click())}};Te.SubmitInputEvent=class extends CustomEvent{static type="mw-floating-ask-ai:submit";constructor(e,r={}){super(Te.SubmitInputEvent.type,{detail:e,bubbles:!0,composed:!0,...r})}};Te.ChangeEvent=class extends CustomEvent{static type="mw-floating-ask-ai:change";constructor(e,r={}){super(Te.ChangeEvent.type,{detail:e,bubbles:!0,composed:!0,...r})}};function rc(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",Te);var br={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},xr=t=>(...e)=>({_$litDirective$:t,values:e}),Ye=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,r,n){this._$Ct=e,this._$AM=r,this._$Ci=n}_$AS(e,r){return this.update(e,r)}update(e,r){return this.render(...r)}};var{I:nc}=ts;var wo=()=>document.createComment(""),Xe=(t,e,r)=>{let n=t._$AA.parentNode,i=e===void 0?t._$AB:e._$AA;if(r===void 0){let s=n.insertBefore(wo(),i),o=n.insertBefore(wo(),i);r=new nc(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!==i||a){let l=r._$AA;for(;l!==s;){let c=l.nextSibling;n.insertBefore(l,i),l=c}}}return r},we=(t,e,r=t)=>(t._$AI(e,r),t),ic={},yo=(t,e=ic)=>t._$AH=e,vo=t=>t._$AH,kr=t=>{t._$AR(),t._$AA.remove()};var bo=(t,e,r)=>{let n=new Map;for(let i=e;i<=r;i++)n.set(t[i],i);return n},Q=xr(class extends Ye{constructor(t){if(super(t),t.type!==br.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,r){let n;r===void 0?r=e:e!==void 0&&(n=e);let i=[],s=[],o=0;for(let a of t)i[o]=n?n(a,o):o,s[o]=r(a,o),o++;return{values:s,keys:i}}render(t,e,r){return this.dt(t,e,r).values}update(t,[e,r,n]){let i=vo(t),{values:s,keys:o}=this.dt(e,r,n);if(!Array.isArray(i))return this.ut=o,s;let a=this.ut??=[],l=[],c,u,h=0,p=i.length-1,y=0,g=s.length-1;for(;h<=p&&y<=g;)if(i[h]===null)h++;else if(i[p]===null)p--;else if(a[h]===o[y])l[y]=we(i[h],s[y]),h++,y++;else if(a[p]===o[g])l[g]=we(i[p],s[g]),p--,g--;else if(a[h]===o[g])l[g]=we(i[h],s[g]),Xe(t,l[g+1],i[h]),h++,g--;else if(a[p]===o[y])l[y]=we(i[p],s[y]),Xe(t,i[h],i[p]),p--,y++;else if(c===void 0&&(c=bo(o,y,g),u=bo(a,h,p)),c.has(a[h]))if(c.has(a[p])){let $=u.get(o[y]),b=$!==void 0?i[$]:null;if(b===null){let S=Xe(t,i[h]);we(S,s[y]),l[y]=S}else l[y]=we(b,s[y]),Xe(t,i[h],b),i[$]=null;y++}else kr(i[p]),p--;else kr(i[h]),h++;for(;y<=g;){let $=Xe(t,l[g+1]);we($,s[y]),l[y++]=$}for(;h<=p;){let $=i[h++];$!==null&&kr($)}return this.ut=o,yo(t,l),te}});var _t=class t extends C(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:d`
1505
+ <div class="${this.darkMode?"dark":""} flex h-full w-full flex-1 flex-col overflow-y-auto px-4 pt-6 pb-2">
1506
+ ${this.examples.title?d`
1507
+ <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">
1249
1508
  <span>${this.examples.title}</span>
1250
1509
  <svg class="inline-block h-9 w-9 align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 58 61">
1251
1510
  <path
1252
- fill="#D2D2D2"
1511
+ fill="${this.darkMode?"#6B7280":"#D2D2D2"}"
1253
1512
  d="M23.503 12.319c.298-.925 1.605-.925 1.903 0L29.751 25.8a1 1 0 0 0 .695.66l14.515 3.852c.99.263.99 1.67 0 1.933l-14.515 3.852a1 1 0 0 0-.695.66l-4.345 13.483c-.297.924-1.605.924-1.903 0l-4.345-13.483a1 1 0 0 0-.695-.66L3.949 32.246c-.992-.263-.992-1.67 0-1.933l14.514-3.852a1 1 0 0 0 .695-.66l4.345-13.482ZM45.279 2.115c.134-.492.831-.492.965 0l1.688 6.206a.5.5 0 0 0 .373.357l6.642 1.488c.521.117.521.86 0 .976l-6.642 1.488a.5.5 0 0 0-.373.357l-1.688 6.206c-.134.492-.831.492-.965 0l-1.688-6.206a.5.5 0 0 0-.373-.357l-6.642-1.488c-.521-.117-.521-.86 0-.976l6.642-1.488a.5.5 0 0 0 .373-.357l1.688-6.206ZM45.279 42.077c.134-.492.831-.492.965 0l1.688 6.206a.5.5 0 0 0 .373.357l6.642 1.488c.521.117.521.86 0 .976l-6.642 1.488a.5.5 0 0 0-.373.357l-1.688 6.206c-.134.492-.831.492-.965 0l-1.688-6.206a.5.5 0 0 0-.373-.357l-6.642-1.488c-.521-.117-.521-.86 0-.976l6.642-1.488a.5.5 0 0 0 .373-.357l1.688-6.206Z" />
1254
1513
  </svg>
1255
1514
  </h2>
1256
1515
  `:null}
1257
- ${this.examples?.items?.length?u`
1258
- <ul class="mt-auto flex flex-wrap justify-end gap-2.5 text-sm leading-6 text-black select-none">
1259
- ${Q(this.examples.items,e=>e,e=>u`
1516
+ ${this.examples?.items?.length?d`
1517
+ <ul class="mt-auto flex flex-wrap justify-end gap-2.5 text-sm leading-6 text-black select-none dark:text-white">
1518
+ ${Q(this.examples.items,e=>e,e=>d`
1260
1519
  <li
1261
- 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"
1520
+ 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"
1262
1521
  @click="${()=>this.#e(e)}">
1263
1522
  <span>${e.trim()}</span>
1264
1523
  </li>
@@ -1266,10 +1525,10 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1266
1525
  </ul>
1267
1526
  `:null}
1268
1527
  </div>
1269
- `}#e(e){this.dispatchEvent(new t.ExampleClickEvent({example:e}))}};Et.ExampleClickEvent=class extends CustomEvent{static type="mw:example-click";constructor(e,r={}){super(Et.ExampleClickEvent.type,{detail:e,...r})}};customElements.get("mw-chat-background")||customElements.define("mw-chat-background",Et);var Le=class t extends C(v){static properties={content:{type:Object},showNewChat:{type:Boolean,attribute:"show-new-chat"},showClose:{type:Boolean,attribute:"show-close"}};constructor(){super(),this.content={logoUrl:"",title:"",color:""},this.showNewChat=!1,this.showClose=!1}static styles=D`
1528
+ `}#e(e){this.dispatchEvent(new t.ExampleClickEvent({example:e}))}};_t.ExampleClickEvent=class extends CustomEvent{static type="mw:example-click";constructor(e,r={}){super(_t.ExampleClickEvent.type,{detail:e,...r})}};customElements.get("mw-chat-background")||customElements.define("mw-chat-background",_t);var Le=class t extends C(v){static properties={content:{type:Object},showNewChat:{type:Boolean,attribute:"show-new-chat"},showClose:{type:Boolean,attribute:"show-close"},darkMode:{type:Boolean,attribute:"dark-mode"}};constructor(){super(),this.content={logoUrl:"",title:"",color:""},this.showNewChat=!1,this.showClose=!1,this.darkMode=!1}static styles=L`
1270
1529
  /* blurred background */
1271
1530
 
1272
- .gradient-blur {
1531
+ [part='gradient-blur'] {
1273
1532
  /* blur gradient */
1274
1533
  mask-image: linear-gradient(to bottom, white 70%, transparent);
1275
1534
  -webkit-mask-image: linear-gradient(to bottom, white 70%, transparent);
@@ -1278,9 +1537,14 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1278
1537
  /* bg-color gradient */
1279
1538
  background-image: linear-gradient(to bottom, white 20%, transparent);
1280
1539
  }
1281
- `;render(){return u`
1282
- <div class="relative z-10 h-12">
1283
- <div class="gradient-blur absolute inset-x-0.5 mt-2 h-12"></div>
1540
+
1541
+ .dark [part='gradient-blur'] {
1542
+ /* bg-color gradient for dark mode */
1543
+ background-image: linear-gradient(to bottom, #2b2d31 20%, transparent);
1544
+ }
1545
+ `;render(){return d`
1546
+ <div class="${this.darkMode?"dark":""} relative z-10 h-12">
1547
+ <div part="gradient-blur" class="absolute inset-x-0.5 mt-2 h-12"></div>
1284
1548
 
1285
1549
  <div class="absolute inset-0 h-12 overflow-hidden rounded-full">
1286
1550
  <svg class="absolute left-1/2 -translate-x-1/2 text-[${this.content.color}]/80" width="1000" height="48" viewBox="0 0 1000 48" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -1295,7 +1559,7 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1295
1559
  <!-- h-6 keeps the same height as the right buttons to stop the text jitter when they become visible -->
1296
1560
  <div class="z-10 flex h-6 items-center gap-3">
1297
1561
  <!-- TODO: line-clamp-2 -->
1298
- <h1 class="line-clamp-2 max-w-[40%] leading-tight font-semibold tracking-tight text-white">${this.content.title}</h1>
1562
+ <h1 class="line-clamp-2 max-w-[40%] leading-tight font-semibold tracking-tight text-white dark:text-white">${this.content.title}</h1>
1299
1563
 
1300
1564
  <!-- spacer to push other elements to the sides -->
1301
1565
  <div class="flex-grow"></div>
@@ -1303,9 +1567,8 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1303
1567
  <!-- new chat btn -->
1304
1568
  <button @click=${this.#e} type="button" class="${this.showNewChat?"inline-flex":"hidden"} shrink-0">
1305
1569
  <!-- svg icon of a bubble with a plus -->
1306
- <svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 37 36">
1570
+ <svg class="h-6 w-6 fill-white dark:fill-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 37 36">
1307
1571
  <path
1308
- fill="#fff"
1309
1572
  fill-rule="evenodd"
1310
1573
  d="M36.201 17.62c0 10.996-6.18 17.181-17.17 17.181-3.236 0-6.055-.536-8.422-1.574l-8.084 2.697c-1.136.379-2.206-.722-1.797-1.848l2.823-7.77c-1.113-2.42-1.69-5.33-1.69-8.687C1.862 6.623 8.044.438 19.032.438c10.99 0 17.17 6.185 17.17 17.181Zm-15.88-8.653a1.355 1.355 0 0 0-2.71 0v7.897H9.716a1.355 1.355 0 1 0 0 2.71h7.897v7.896a1.355 1.355 0 1 0 2.71 0v-7.896h7.896a1.355 1.355 0 1 0 0-2.71h-7.896V8.967Z"
1311
1574
  clip-rule="evenodd" />
@@ -1315,7 +1578,7 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1315
1578
  <!-- close chat btn -->
1316
1579
  <button @click=${this.#t} class="${this.showClose?"inline-flex":"hidden"} shrink-0">
1317
1580
  <!-- svg icon of an X -->
1318
- <svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="white">
1581
+ <svg class="h-6 w-6 stroke-white dark:stroke-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2">
1319
1582
  <path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" />
1320
1583
  </svg>
1321
1584
  </button>
@@ -1324,26 +1587,26 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1324
1587
  <!-- logo -->
1325
1588
  <div class="absolute top-1/2 left-1/2 z-10 -mt-0.5 -translate-x-1/2">
1326
1589
  <!-- when injected from the dashboard, it's a base64 string data:image format -->
1327
- <img class="inline-block h-[52px] w-[52px] rounded-full bg-white object-cover" src="${this.content.logoUrl}" alt="Logo" />
1590
+ <img class="inline-block h-[52px] w-[52px] rounded-full bg-white object-cover dark:bg-gray-700" src="${this.content.logoUrl}" alt="Logo" />
1328
1591
  </div>
1329
1592
  </div>
1330
1593
  </div>
1331
- `}#e(){this.dispatchEvent(new t.NewChatClickEvent)}#t(){this.dispatchEvent(new t.CloseClickEvent)}};Le.NewChatClickEvent=class extends CustomEvent{static type="mw:new-chat-click";constructor(e={}){super(Le.NewChatClickEvent.type,{...e})}};Le.CloseClickEvent=class extends CustomEvent{static type="mw:close-click";constructor(e={}){super(Le.CloseClickEvent.type,{...e})}};customElements.get("mw-chat-header")||customElements.define("mw-chat-header",Le);var xo=Aa(bo(),1);var se=Object.freeze({PENDING:"pending",READY:"ready",ERROR:"error"}),Cr=class{#e;#t;#r=null;#n=!1;#i=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.#m),this.#e.addEventListener("dragenter",this.#y),this.#e.addEventListener("dragleave",this.#v),this.#e.addEventListener("drop",this.#b))}#a(){this.#e.removeEventListener("dragover",this.#m),this.#e.removeEventListener("dragenter",this.#y),this.#e.removeEventListener("dragleave",this.#v),this.#e.removeEventListener("drop",this.#b)}#h(){this.#t.enabled&&this.#e.addEventListener("paste",this.#g)}#c(){this.#e.removeEventListener("paste",this.#g)}#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.#p),document.body.appendChild(this.#r)}#p=e=>{let r=e.target,n=Array.from(r.files||[]);this.#t.isConnected()||this.#t.onConnect?.(),this.#k(n),r.value=""};#m=e=>{e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="copy")};#y=e=>{e.preventDefault(),e.dataTransfer&&this.#x(e.dataTransfer)&&this.#w(!0)};#v=e=>{e.preventDefault();let r=e.relatedTarget;this.#e.contains(r)||this.#w(!1)};#b=e=>{if(e.preventDefault(),this.#w(!1),e.dataTransfer){let r=Array.from(e.dataTransfer.files||[]);this.#k(r)}};#g=e=>{if(!e.clipboardData)return;let n=Array.from(e.clipboardData.items||[]).filter(s=>s.type.startsWith("image/"));if(n.length===0)return;e.preventDefault();let i=n.map(s=>s.getAsFile()).flatMap(s=>s?[s]:[]);this.#k(i)};#x(e){return e.types&&e.types.includes("Files")}#w(e){this.#n!==e&&(this.#n=e,this.#e.requestUpdate())}#u(e){this.#i=e,this.#t.onError(e),this.#e.requestUpdate(),setTimeout(()=>{this.#d()},6e3)}#d(){this.#i=null,this.#e.requestUpdate()}async#k(e){if(e.length===0)return;this.#d();let r=e.filter(o=>this.#C(o));if(r.length===0)return;let n=this.#s.length,i=this.#t.maxFiles??1/0,s=r.length;if(n+s>i){this.#u(`You can upload a maximum of ${i} files`);return}try{let c=(await Promise.all(r.map(l=>this.#f(l)))).filter(l=>!this.#s.some(a=>a.dataUrl===l.dataUrl));this.#s=[...this.#s,...c],this.#e.requestUpdate(),await pn({times:5,delay:2e3},async()=>{if(this.#t.isConnected())await dn(3,c,async l=>{await this.#$(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#f(e){try{let r=await(0,xo.fileToBase64)(e);return{id:crypto.randomUUID(),name:e.name,type:e.type,size:e.size,dataUrl:r,file:e,processingState:se.PENDING}}catch(r){let n=r instanceof Error?r:new Error(String(r));throw new Error(`Failed to read file: ${e.name} - ${n.message}`)}}async#$(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=se.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 n=await fetch(this.#t.uploadUrl,{method:"POST",body:r});if(!n.ok)throw new Error(`Upload failed with status: ${n.status}`);let i=await n.json();if(!!!i?.success){let o=i?.error||"Upload failed";throw new Error(o)}i.imageUrl&&i.imageId?(e.imageUrl=i.imageUrl,e.id=i.imageId,e.processingState=se.READY):e.processingState=se.PENDING,this.#e.requestUpdate()}catch(n){let i=n instanceof Error?n:new Error(String(n));console.error("Upload error:",i.message),this.#u(i.message),e.processingState=se.ERROR,this.#e.requestUpdate()}}get isDragging(){return this.#n}get error(){return this.#i}get selectedImages(){return this.#s}get hasPendingImages(){return this.#s.some(e=>e.processingState===se.PENDING)}openImagePicker=()=>{if(!this.#t.enabled||!this.#t.widgetId){console.warn("Image uploads are disabled");return}this.#r&&this.#r.click()};clearError(){this.#d()}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.#h()):(this.#a(),this.#c())}restoreImages(e){if(!Array.isArray(e)||e.length===0){this.#s=[],this.#e.requestUpdate();return}let r=e.map(n=>{let i=new File([],n.name,{type:n.type});return{id:n.id,name:n.name,type:n.type,size:n.size,dataUrl:n.url,file:i,processingState:se.READY,imageUrl:n.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.#d(),this.#e.requestUpdate()}};var ei={maxHeight:120,initialHeight:32,paddingY:12},he=class t extends C(v){static properties={disabled:{type:Boolean},streaming:{type:Boolean},loading:{type:Boolean},placeholder:{type:String},color:{type:String},enableImageUpload:{type:Boolean},onImageUploadClick:{type:Function},images:{type:Array},onImageDelete:{type:Function}};#e=new Date;constructor(){super(),this.disabled=!1,this.streaming=!1,this.loading=!1,this.placeholder="Type a message...",this.enableImageUpload=!1,this.onImageUploadClick=void 0,this.images=[],this.onImageDelete=void 0,this.color="#8B5CF6"}get value(){return this.#t?.value?.trim()??""}render(){return u`
1594
+ `}#e(){this.dispatchEvent(new t.NewChatClickEvent)}#t(){this.dispatchEvent(new t.CloseClickEvent)}};Le.NewChatClickEvent=class extends CustomEvent{static type="mw:new-chat-click";constructor(e={}){super(Le.NewChatClickEvent.type,{...e})}};Le.CloseClickEvent=class extends CustomEvent{static type="mw:close-click";constructor(e={}){super(Le.CloseClickEvent.type,{...e})}};customElements.get("mw-chat-header")||customElements.define("mw-chat-header",Le);var So=Pa($o(),1);var ae=Object.freeze({PENDING:"pending",READY:"ready",ERROR:"error"}),Sr=class{#e;#t;#r=null;#n=!1;#i=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.#m),this.#e.addEventListener("dragenter",this.#v),this.#e.addEventListener("dragleave",this.#b),this.#e.addEventListener("drop",this.#x))}#a(){this.#e.removeEventListener("dragover",this.#m),this.#e.removeEventListener("dragenter",this.#v),this.#e.removeEventListener("dragleave",this.#b),this.#e.removeEventListener("drop",this.#x)}#d(){this.#t.enabled&&this.#e.addEventListener("paste",this.#w)}#c(){this.#e.removeEventListener("paste",this.#w)}#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,n=Array.from(r.files||[]);this.#t.isConnected()||this.#t.onConnect?.(),this.#p(n),r.value=""};#m=e=>{e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="copy")};#v=e=>{e.preventDefault(),e.dataTransfer&&this.#y(e.dataTransfer)&&this.#g(!0)};#b=e=>{e.preventDefault();let r=e.relatedTarget;this.#e.contains(r)||this.#g(!1)};#x=e=>{if(e.preventDefault(),this.#g(!1),e.dataTransfer){let r=Array.from(e.dataTransfer.files||[]);this.#p(r)}};#w=e=>{if(!e.clipboardData)return;let n=Array.from(e.clipboardData.items||[]).filter(s=>s.type.startsWith("image/"));if(n.length===0)return;e.preventDefault();let i=n.map(s=>s.getAsFile()).flatMap(s=>s?[s]:[]);this.#p(i)};#y(e){return e.types&&e.types.includes("Files")}#g(e){this.#n!==e&&(this.#n=e,this.#e.requestUpdate())}#u(e){this.#i=e,this.#t.onError(e),this.#e.requestUpdate(),setTimeout(()=>{this.#k()},6e3)}#k(){this.#i=null,this.#e.requestUpdate()}async#p(e){if(e.length===0)return;this.#k();let r=e.filter(o=>this.#C(o));if(r.length===0)return;let n=this.#s.length,i=this.#t.maxFiles??1/0,s=r.length;if(n+s>i){this.#u(`You can upload a maximum of ${i} 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 pn({times:5,delay:2e3},async()=>{if(this.#t.isConnected())await hn(3,a,async l=>{await this.#f(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,So.fileToBase64)(e);return{id:crypto.randomUUID(),name:e.name,type:e.type,size:e.size,dataUrl:r,file:e,processingState:ae.PENDING}}catch(r){let n=r instanceof Error?r:new Error(String(r));throw new Error(`Failed to read file: ${e.name} - ${n.message}`)}}async#f(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=ae.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 n=await fetch(this.#t.uploadUrl,{method:"POST",body:r});if(!n.ok)throw new Error(`Upload failed with status: ${n.status}`);let i=await n.json();if(!!!i?.success){let o=i?.error||"Upload failed";throw new Error(o)}i.imageUrl&&i.imageId?(e.imageUrl=i.imageUrl,e.id=i.imageId,e.processingState=ae.READY):e.processingState=ae.PENDING,this.#e.requestUpdate()}catch(n){let i=n instanceof Error?n:new Error(String(n));console.error("Upload error:",i.message),this.#u(i.message),e.processingState=ae.ERROR,this.#e.requestUpdate()}}get isDragging(){return this.#n}get error(){return this.#i}get selectedImages(){return this.#s}get hasPendingImages(){return this.#s.some(e=>e.processingState===ae.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(n=>{let i=new File([],n.name,{type:n.type});return{id:n.id,name:n.name,type:n.type,size:n.size,dataUrl:n.url,file:i,processingState:ae.READY,imageUrl:n.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 ti={maxHeight:120,initialHeight:32,paddingY:12},Z=class t extends C(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 d`
1332
1595
  <div
1333
- class="focus-within:ring-opacity-50 ${this.enableImageUpload&&this.images.length>0?`ring-2 ring-[${this.color}] ring-opacity-50`:""} w-full overflow-hidden rounded-[18px] bg-white shadow-[0px_3px_20px_0px_rgba(0,0,0,0.2)] transition-all duration-200 focus-within:ring-2 focus-within:ring-[${this.color}]">
1596
+ 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}]">
1334
1597
  <!-- Image preview area -->
1335
- ${this.enableImageUpload&&this.images&&this.images.length>0?u`
1336
- <div class="mb-2 flex flex-wrap gap-2 rounded-t-[18px] bg-white p-2">
1337
- ${this.images.map(e=>u`
1598
+ ${this.enableImageUpload&&this.images&&this.images.length>0?d`
1599
+ <div class="mb-2 flex flex-wrap gap-2 rounded-t-[18px] p-2">
1600
+ ${this.images.map(r=>d`
1338
1601
  <div class="relative inline-block">
1339
- <img src="${e.dataUrl}" alt="${e.name}" class="h-[60px] w-[60px] rounded-xl object-cover" />
1602
+ <img src="${r.dataUrl}" alt="${r.name}" class="h-[60px] w-[60px] rounded-xl object-cover" />
1340
1603
 
1341
1604
  <!-- Progress/Status overlay -->
1342
- ${e.processingState===se.PENDING?u`
1605
+ ${r.processingState===ae.PENDING?d`
1343
1606
  <div class="absolute inset-0 flex items-center justify-center rounded-xl bg-black/40">
1344
- <lucide-icon name="loader-circle" class="inline-flex animate-spin text-white transition-all duration-1000"></lucide-icon>
1607
+ <lucide-icon name="loader-circle" class="inline-flex h-6 w-6 animate-spin text-white transition-all duration-1000"></lucide-icon>
1345
1608
  </div>
1346
- `:e.processingState===se.ERROR?u`
1609
+ `:r.processingState===ae.ERROR?d`
1347
1610
  <div class="absolute inset-0 flex items-center justify-center rounded-xl bg-red-500/60">
1348
1611
  <lucide-icon name="badge-alert" class="h-6 w-6 text-white"></lucide-icon>
1349
1612
  </div>
@@ -1353,9 +1616,9 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1353
1616
  <button
1354
1617
  data-testid="image-delete-btn"
1355
1618
  type="button"
1356
- @click="${()=>this.onImageDelete?.(e.id)}"
1357
- class="absolute -top-1 -right-1 flex h-5 w-5 items-center justify-center rounded-full bg-[#eeedf1] text-white hover:bg-[#eeedf195]">
1358
- <lucide-icon name="x" class="h-3 w-3 text-[#14161a]"></lucide-icon>
1619
+ @click="${()=>this.#d(r.id)}"
1620
+ class="absolute -top-1 -right-1 flex h-5 w-5 items-center justify-center rounded-full bg-[#eeedf1] text-white hover:bg-[#eeedf195] dark:bg-gray-700 dark:hover:bg-gray-600">
1621
+ <lucide-icon name="x" class="h-3 w-3 text-[#14161a] dark:text-gray-200"></lucide-icon>
1359
1622
  </button>
1360
1623
  </div>
1361
1624
  `)}
@@ -1364,14 +1627,14 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1364
1627
 
1365
1628
  <!-- Input form -->
1366
1629
  <form @submit="${this.#i}" class="flex w-full items-center">
1367
- ${this.enableImageUpload?u`
1630
+ ${this.enableImageUpload?d`
1368
1631
  <button
1369
1632
  data-testid="image-upload-btn"
1370
1633
  type="button"
1371
- @click="${this.onImageUploadClick}"
1634
+ @click="${this.#a}"
1372
1635
  ?disabled="${this.disabled||this.loading}"
1373
1636
  class="mx-1 px-2 transition-opacity duration-200 hover:opacity-80">
1374
- <lucide-icon name="image-plus" class="block h-6 w-6 text-[#312E30]"></lucide-icon>
1637
+ <lucide-icon name="image-plus" class="block h-6 w-6 text-[#312E30] dark:text-gray-300"></lucide-icon>
1375
1638
  </button>
1376
1639
  `:null}
1377
1640
 
@@ -1383,7 +1646,7 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1383
1646
  autofocus
1384
1647
  ?disabled="${this.disabled}"
1385
1648
  placeholder="${this.placeholder}"
1386
- class="${this.enableImageUpload?"px-1":"pl-3 pr-1"} box-content h-[${ei.initialHeight}px] w-full resize-none place-content-center rounded bg-white py-[${ei.paddingY}px] text-base text-gray-800 outline-none placeholder:text-[14px] placeholder:font-light disabled:place-content-baseline"></textarea>
1649
+ class="${this.enableImageUpload?"px-1":"pl-3 pr-1"} box-content h-[${ti.initialHeight}px] w-full resize-none place-content-center rounded bg-transparent py-[${ti.paddingY}px] text-base text-gray-800 outline-none placeholder:text-[14px] placeholder:font-light disabled:place-content-baseline dark:text-gray-200"></textarea>
1387
1650
 
1388
1651
  <button
1389
1652
  type="submit"
@@ -1391,26 +1654,26 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1391
1654
  ?disabled="${this.disabled||this.loading}"
1392
1655
  class="mx-1 rounded-full px-2 transition-all duration-150 ease-out disabled:cursor-not-allowed disabled:opacity-50">
1393
1656
  <div
1394
- class="${this.streaming||this.loading||!this.value&&(!this.enableImageUpload||this.images.length===0)?"bg-gray-400":""} ${this.streaming||this.loading?"scale-100":"scale-95"} flex h-8 w-8 flex-row items-center justify-center rounded-full bg-[${this.color}] p-1.5 transition-all transition-colors duration-200">
1395
- ${this.loading?u`<lucide-icon name="loader-circle" class="inline-flex animate-spin text-white transition-all"></lucide-icon>`:this.streaming?u`<lucide-icon name="x" class="inline-flex h-4 w-4 text-white transition-colors"></lucide-icon>`:u`<lucide-icon name="arrow-up" class="inline-flex h-4 w-4 text-white transition-colors"></lucide-icon>`}
1657
+ class="${this.streaming||this.loading||!this.value&&(!this.enableImageUpload||this.images.length===0)?"bg-gray-400 dark:bg-gray-600":""} ${this.streaming||this.loading?"scale-100":"scale-95"} flex h-8 w-8 flex-row items-center justify-center rounded-full bg-[${this.color}] p-1.5 transition-all transition-colors duration-200">
1658
+ ${this.loading?d`<lucide-icon name="loader-circle" class="${e?"text-white":"text-white dark:text-gray-800"} inline-flex h-5 w-5 animate-spin transition-all"></lucide-icon>`:this.streaming?d`<lucide-icon name="x" class="${e?"text-white":"text-white dark:text-gray-800"} inline-flex h-4 w-4 transition-colors"></lucide-icon>`:d`<lucide-icon name="arrow-up" class="${e?"text-white":"text-white dark:text-gray-800"} inline-flex h-4 w-4 transition-colors"></lucide-icon>`}
1396
1659
  </div>
1397
1660
  </button>
1398
1661
  </form>
1399
- </div>
1400
1662
 
1401
- <slot>
1402
- <div class="h-5 w-full"></div>
1403
- </slot>
1404
- `}get#t(){return this.renderRoot.querySelector('textarea[name="input"]')??null}get#r(){return this.renderRoot.querySelector('button[type="submit"]')??null}#n(e){fc(e)&&(e.preventDefault(),!this.streaming&&!this.disabled&&!this.loading&&this.#r?.click())}#i(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 i=this.#t;if(!i)throw new Error("Expected input element to be present");let s=i.value.trim();(s||this.enableImageUpload&&this.images.length>0)&&this.dispatchEvent(new t.SubmitEvent(s))&&(i.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:n,paddingY:i}=ei;e.style.height=`${n}px`;let s=e.scrollHeight,o=i*2,c=Math.min(s-o,r);e.style.height=`${c}px`,this.requestUpdate()}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()}};he.ChangeEvent=class extends CustomEvent{static type="mw:change";constructor(e,r={}){super(he.ChangeEvent.type,{detail:e,...r})}};he.SubmitEvent=class extends CustomEvent{static type="mw:submit";constructor(e,r={}){super(he.SubmitEvent.type,{detail:e,...r,cancelable:!0})}};he.CancelEvent=class extends CustomEvent{static type="mw:cancel";constructor(e={}){super(he.CancelEvent.type,{...e})}};function fc(t){return(t.code==="Enter"||t.code==="NumpadEnter")&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey}customElements.get("mw-chat-input")||customElements.define("mw-chat-input",he);var ti=class extends C(v){static properties={side:{type:String},status:{type:String},color:{type:String},logoUrl:{type:String,attribute:"logo"},position:{type:String}};constructor(){super(),this.side="assistant",this.status="",this.color="",this.logoUrl="",this.position="single"}render(){let r=this.side==="user"&&this.position==="single"?"rounded-2xl":this.side==="user"&&["single-current","first"].includes(this.position)?"rounded-2xl rounded-br-[4px]":this.side==="user"&&["middle","last-current"].includes(this.position)?"rounded-2xl rounded-r-[4px]":this.side==="user"&&this.position==="last"?"rounded-2xl rounded-tr-[4px]":["support","assistant"].includes(this.side)&&["single","single-current"].includes(this.position)?"rounded-2xl":["support","assistant"].includes(this.side)&&this.position==="first"?"rounded-2xl rounded-bl-[4px]":["support","assistant"].includes(this.side)&&this.position==="middle"?"rounded-2xl rounded-l-[4px]":["support","assistant"].includes(this.side)&&["last","last-current"].includes(this.position)?"rounded-2xl rounded-tl-[4px]":"rounded-2xl";switch(this.side){case"user":return u`
1405
- <div class="ml-20 flex justify-end font-sans text-base">
1663
+ <slot>
1664
+ <div class="h-5 w-full"></div>
1665
+ </slot>
1666
+ </div>
1667
+ `}get#t(){return this.renderRoot.querySelector('textarea[name="input"]')??null}get#r(){return this.renderRoot.querySelector('button[type="submit"]')??null}#n(e){vc(e)&&(e.preventDefault(),!this.streaming&&!this.disabled&&!this.loading&&this.#r?.click())}#i(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 i=this.#t;if(!i)throw new Error("Expected input element to be present");let s=i.value.trim();(s||this.enableImageUpload&&this.images.length>0)&&this.dispatchEvent(new t.SubmitEvent(s))&&(i.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:n,paddingY:i}=ti;e.style.height=`${n}px`;let s=e.scrollHeight,o=i*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()}};Z.ChangeEvent=class extends CustomEvent{static type="mw:change";constructor(e,r={}){super(Z.ChangeEvent.type,{detail:e,...r})}};Z.SubmitEvent=class extends CustomEvent{static type="mw:submit";constructor(e,r={}){super(Z.SubmitEvent.type,{detail:e,...r,cancelable:!0})}};Z.CancelEvent=class extends CustomEvent{static type="mw:cancel";constructor(e={}){super(Z.CancelEvent.type,{...e})}};Z.ImageUploadClickEvent=class extends CustomEvent{static type="mw:image-upload-click";constructor(e={}){super(Z.ImageUploadClickEvent.type,{...e})}};Z.ImageDeleteEvent=class extends CustomEvent{static type="mw:image-delete";constructor(e,r={}){super(Z.ImageDeleteEvent.type,{detail:e,...r})}};function vc(t){return(t.code==="Enter"||t.code==="NumpadEnter")&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey}customElements.get("mw-chat-input")||customElements.define("mw-chat-input",Z);var ri=class extends C(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 d`
1668
+ <div class="${this.darkMode?"dark":""} ml-20 flex justify-end font-sans text-base">
1406
1669
  <div class="max-w-full">
1407
1670
  <!-- include an invisible border (same color as background) so that this message is the same height as the bot message -->
1408
- <div class="${r} border border-[${this.color}] bg-[${this.color}] px-4 py-3 text-left text-white">
1671
+ <div class="${r} border border-[${this.color}] bg-[${this.color}] px-4 py-3 text-left text-white dark:text-gray-900">
1409
1672
  <slot></slot>
1410
1673
  </div>
1411
1674
 
1412
1675
  <!-- render status (if any) -->
1413
- ${this.status==="sent"?u`
1676
+ ${this.status==="sent"?d`
1414
1677
  <!-- tick mark -->
1415
1678
  <svg class="ml-auto h-3 w-3 text-gray-400" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor">
1416
1679
  <path stroke-linecap="round" stroke-linejoin="round" d="m4.5 12.75 6 6 9-13.5" />
@@ -1418,32 +1681,32 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1418
1681
  `:null}
1419
1682
  </div>
1420
1683
  </div>
1421
- `;case"assistant":case"support":return u`
1422
- <div class="mr-8 flex justify-start font-sans text-base">
1684
+ `;case"assistant":case"support":return d`
1685
+ <div class="${this.darkMode?"dark":""} mr-8 flex justify-start font-sans text-base">
1423
1686
  <div class="flex max-w-full space-x-2">
1424
1687
  <!--
1425
1688
  mt-[9px] because the message is 50px tall, the icon is 32px tall, we want to center it
1426
1689
  -->
1427
1690
  <div class="mt-[9px] h-6 w-6 flex-shrink-0 flex-grow-0 overflow-hidden rounded-full">
1428
- <img class="h-full w-full bg-white object-cover" src="${this.logoUrl}" alt="Logo" />
1691
+ <img class="h-full w-full bg-white object-cover dark:bg-gray-700" src="${this.logoUrl}" alt="Logo" />
1429
1692
  </div>
1430
1693
 
1431
1694
  <!--
1432
1695
  min-h-[50px] because when we start streaming we sometimes start with an empty paragraph
1433
1696
  -->
1434
1697
  <!-- TODO: maybe add back border? border border-gray-100 -->
1435
- <div class="${r} min-h-[50px] max-w-full overflow-hidden bg-gray-50 px-4 py-3 text-left text-gray-800">
1698
+ <div class="${r} min-h-[50px] max-w-full overflow-hidden bg-gray-50 px-4 py-3 text-left text-gray-800 dark:bg-[#1E1F23] dark:text-gray-200">
1436
1699
  <slot></slot>
1437
1700
  </div>
1438
1701
  </div>
1439
1702
  </div>
1440
- `;default:throw new Error(`Unknown side: ${this.side}`)}}};customElements.get("mw-chat-message")||customElements.define("mw-chat-message",ti);var de=class extends C(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;#n=!1;updated(e){e.has("src")&&(this.#e=!1,this.#t=!1)}get#i(){return this.side==="left"||this.side==="assistant"?"flex justify-start ml-[25px]":"flex justify-end"}get#s(){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}#o(){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`
1703
+ `;default:throw new Error(`Unknown side: ${this.side}`)}}};customElements.get("mw-chat-message")||customElements.define("mw-chat-message",ri);var he=class extends C(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;#n=!1;updated(e){e.has("src")&&(this.#e=!1,this.#t=!1)}get#i(){return this.side==="left"||this.side==="assistant"?"flex justify-start ml-[25px]":"flex justify-end"}get#s(){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}#o(){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?d`
1441
1704
  <div class="${this.#i} mb-2 min-h-[100px]">
1442
1705
  <div class="${this.#s} relative">
1443
1706
  <!-- Placeholder background that's only shown when loading or error -->
1444
- ${this.#e?null:u`
1707
+ ${this.#e?null:d`
1445
1708
  <div class="flex items-center justify-center bg-gray-100" style="width: ${this.width}; height: 200px;">
1446
- ${this.#t?u`
1709
+ ${this.#t?d`
1447
1710
  <!-- Error icon -->
1448
1711
  <svg class="h-8 w-8 text-gray-400" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
1449
1712
  <path
@@ -1451,7 +1714,7 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1451
1714
  stroke-linejoin="round"
1452
1715
  d="m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z" />
1453
1716
  </svg>
1454
- `:u`
1717
+ `:d`
1455
1718
  <!-- Loading pulse animation -->
1456
1719
  <div class="h-8 w-8 animate-pulse rounded-full bg-gray-300"></div>
1457
1720
  `}
@@ -1465,14 +1728,14 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1465
1728
  style="width: ${this.width}; height: ${this.height}; display: block;"
1466
1729
  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"
1467
1730
  @error="${this.#a}"
1468
- @load="${this.#h}"
1731
+ @load="${this.#d}"
1469
1732
  @click="${this.clickable?this.#c:void 0}"
1470
1733
  loading="lazy" />
1471
1734
  </div>
1472
1735
  </div>
1473
1736
 
1474
1737
  <!-- Full image modal -->
1475
- ${this.#r?u`
1738
+ ${this.#r?d`
1476
1739
  <div
1477
1740
  class="${this.#n?"bg-opacity-0":"bg-opacity-75"} fixed inset-0 z-50 flex items-center justify-center bg-black p-4 transition-opacity duration-300"
1478
1741
  @click="${this.#l}">
@@ -1492,30 +1755,34 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1492
1755
  src="${this.#o()}"
1493
1756
  alt="${this.alt}"
1494
1757
  class="${this.#n?"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"
1495
- @click="${this.#p}" />
1758
+ @click="${this.#h}" />
1496
1759
  </div>
1497
1760
  </div>
1498
1761
  `:null}
1499
- `:(console.warn("MwChatImage: No src provided"),null)}#a=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}))};#c=e=>{this.clickable&&(e.preventDefault(),e.stopPropagation(),this.#r=!0,this.requestUpdate(),this.#n=!0,this.requestUpdate(),setTimeout(()=>{this.#n=!1,this.requestUpdate()},500),this.dispatchEvent(new CustomEvent("mw-chat-image:click",{detail:{src:this.src,event:e},bubbles:!0})))};#l=e=>{e.preventDefault(),e.stopPropagation(),this.#r=!1,this.requestUpdate()};#p=e=>{e.preventDefault(),e.stopPropagation()}};de.ErrorEvent=class extends CustomEvent{static type="mw-chat-image:error";constructor(e,r={}){super(de.ErrorEvent.type,{detail:e,...r})}};de.LoadEvent=class extends CustomEvent{static type="mw-chat-image:load";constructor(e,r={}){super(de.LoadEvent.type,{detail:e,...r})}};de.ClickEvent=class extends CustomEvent{static type="mw-chat-image:click";constructor(e,r={}){super(de.ClickEvent.type,{detail:e,...r})}};customElements.get("mw-chat-image")||customElements.define("mw-chat-image",de);var F=t=>t??L;var mc=["javascript:","data:text/html","vbscript:","data:text/javascript","data:text/vbscript","data:text/css","data:text/plain","data:text/xml"],_t=class t extends C(v){static properties={text:{type:String},color:{type:String},dismissible:{type:Boolean},storageKey:{type:String,attribute:"storage-key"},_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.storageKey="mw-disclaimer-dismissed",this._dismissed=!1}updated(e){super.updated(e),e.has("storageKey")&&this.storageKey&&this.dismissible&&(this._dismissed=this.#e())}connectedCallback(){super.connectedCallback(),this.storageKey&&this.dismissible&&(this._dismissed=this.#e())}#e(){try{return localStorage.getItem(this.storageKey)==="true"}catch{return!1}}#t(){try{localStorage.setItem(this.storageKey,"true")}catch(e){console.warn("Could not save disclaimer dismissed state to localStorage:",e)}}#r=e=>{e.preventDefault(),this._dismissed=!0,this.storageKey&&this.#t(),this.dispatchEvent(new t.DismissEvent)};#n(e){let n=/\[([^\]]+)\]\(([^)]+)\)/g.exec(e);if(n){let i=n[0],s=n[1],o=n[2],c=n.index;return mc.some(l=>o.toLowerCase().startsWith(l))||!o||!s?e:u`${e.slice(0,c)}<a href="${F(o)}" target="_blank" rel="noopener noreferrer" @click="${this.#i}" class="underline" style="color: ${this.color}"
1762
+ `:(console.warn("MwChatImage: No src provided"),null)}#a=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}))};#d=e=>{this.#e=!0,this.requestUpdate(),this.dispatchEvent(new CustomEvent("mw-chat-image:load",{detail:{src:this.src,event:e},bubbles:!0}))};#c=e=>{this.clickable&&(e.preventDefault(),e.stopPropagation(),this.#r=!0,this.requestUpdate(),this.#n=!0,this.requestUpdate(),setTimeout(()=>{this.#n=!1,this.requestUpdate()},500),this.dispatchEvent(new CustomEvent("mw-chat-image:click",{detail:{src:this.src,event:e},bubbles:!0})))};#l=e=>{e.preventDefault(),e.stopPropagation(),this.#r=!1,this.requestUpdate()};#h=e=>{e.preventDefault(),e.stopPropagation()}};he.ErrorEvent=class extends CustomEvent{static type="mw-chat-image:error";constructor(e,r={}){super(he.ErrorEvent.type,{detail:e,...r})}};he.LoadEvent=class extends CustomEvent{static type="mw-chat-image:load";constructor(e,r={}){super(he.LoadEvent.type,{detail:e,...r})}};he.ClickEvent=class extends CustomEvent{static type="mw-chat-image:click";constructor(e,r={}){super(he.ClickEvent.type,{detail:e,...r})}};customElements.get("mw-chat-image")||customElements.define("mw-chat-image",he);var N=t=>t??j;var bc=["javascript:","data:text/html","vbscript:","data:text/javascript","data:text/vbscript","data:text/css","data:text/plain","data:text/xml"],Mt=class t extends C(v){static properties={text:{type:String},color:{type:String},dismissible:{type:Boolean},storageKey:{type:String,attribute:"storage-key"},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.storageKey="mw-disclaimer-dismissed",this.darkMode=!1,this._dismissed=!1}updated(e){super.updated(e),e.has("storageKey")&&this.storageKey&&this.dismissible&&(this._dismissed=this.#e())}connectedCallback(){super.connectedCallback(),this.storageKey&&this.dismissible&&(this._dismissed=this.#e())}#e(){try{return localStorage.getItem(this.storageKey)==="true"}catch{return!1}}#t(){try{localStorage.setItem(this.storageKey,"true")}catch(e){console.warn("Could not save disclaimer dismissed state to localStorage:",e)}}#r=e=>{e.preventDefault(),this._dismissed=!0,this.storageKey&&this.#t(),this.dispatchEvent(new t.DismissEvent)};#n(e){let n=/\[([^\]]+)\]\(([^)]+)\)/g.exec(e);if(n){let i=n[0],s=n[1],o=n[2],a=n.index;return bc.some(l=>o.toLowerCase().startsWith(l))||!o||!s?e:d`${e.slice(0,a)}<a href="${N(o)}" target="_blank" rel="noopener noreferrer" @click="${this.#i}" class="underline" style="color: ${this.color}"
1500
1763
  >${s}</a
1501
- >${e.slice(c+i.length)}`}return e}#i=e=>{e.stopPropagation()};render(){if(this._dismissed)return null;let e=this.#n(this.text);return u`
1502
- <div class="flex items-center justify-between">
1764
+ >${e.slice(a+i.length)}`}return e}#i=e=>{e.stopPropagation()};render(){if(this._dismissed)return null;let e=this.#n(this.text);return d`
1765
+ <div class="${this.darkMode?"dark":""} flex items-center justify-between">
1503
1766
  <div class="flex flex-1 items-center justify-center">
1504
- <span class="px-3 text-center text-xs font-light text-gray-500">${e}</span>
1767
+ <span class="px-3 text-center text-xs font-light text-gray-500 dark:text-gray-400">${e}</span>
1505
1768
  </div>
1506
1769
 
1507
- ${this.dismissible?u`
1508
- <button type="button" aria-label="Dismiss" class="ml-2 flex h-4 w-4 flex-shrink-0 cursor-pointer items-center justify-center rounded hover:bg-gray-200" @click="${this.#r}">
1509
- <lucide-icon name="x" class="h-3 w-3 text-gray-500"></lucide-icon>
1770
+ ${this.dismissible?d`
1771
+ <button
1772
+ type="button"
1773
+ aria-label="Dismiss"
1774
+ class="ml-2 flex h-4 w-4 flex-shrink-0 cursor-pointer items-center justify-center rounded hover:bg-gray-200 dark:hover:bg-gray-600"
1775
+ @click="${this.#r}">
1776
+ <lucide-icon name="x" class="h-3 w-3 text-gray-500 dark:text-gray-400"></lucide-icon>
1510
1777
  </button>
1511
1778
  `:null}
1512
1779
  </div>
1513
- `}};_t.DismissEvent=class extends CustomEvent{static type="mw-disclaimer:dismiss";constructor(e={}){super(_t.DismissEvent.type,{...e})}};customElements.get("mw-disclaimer")||customElements.define("mw-disclaimer",_t);var ri=class extends C(v){static properties={text:{type:String},variant:{type:String},autoDismissable:{type:Boolean,attribute:"auto-dismissable"},dismissDelay:{type:Number,attribute:"dismiss-delay"},_isVisible:{type:Boolean,state:!0}};constructor(){super(),this.text="I'm still learning!",this.variant="info",this.autoDismissable=!1,this.dismissDelay=5e3,this._isVisible=!0}connectedCallback(){super.connectedCallback(),this.autoDismissable&&this.#e()}#e(){setTimeout(()=>{this._isVisible=!1,this.requestUpdate()},this.dismissDelay)}#t(){switch(this.variant){case"error":return{bg:"bg-red-600",text:"text-white",icon:"badge-alert"};case"warning":return{bg:"bg-yellow-600",text:"text-white",icon:"alert-triangle"};case"success":return{bg:"bg-green-600",text:"text-white",icon:"check-circle"};case"info":default:return{bg:"bg-black",text:"text-white",icon:"info"}}}render(){let e=this.#t();return u`
1780
+ `}};Mt.DismissEvent=class extends CustomEvent{static type="mw-disclaimer:dismiss";constructor(e={}){super(Mt.DismissEvent.type,{...e})}};customElements.get("mw-disclaimer")||customElements.define("mw-disclaimer",Mt);var ni=class extends C(v){static properties={text:{type:String},variant:{type:String},autoDismissable:{type:Boolean,attribute:"auto-dismissable"},dismissDelay:{type:Number,attribute:"dismiss-delay"},_isVisible:{type:Boolean,state:!0}};constructor(){super(),this.text="I'm still learning!",this.variant="info",this.autoDismissable=!1,this.dismissDelay=5e3,this._isVisible=!0}connectedCallback(){super.connectedCallback(),this.autoDismissable&&this.#e()}#e(){setTimeout(()=>{this._isVisible=!1,this.requestUpdate()},this.dismissDelay)}#t(){switch(this.variant){case"error":return{bg:"bg-red-600",text:"text-white",icon:"badge-alert"};case"warning":return{bg:"bg-yellow-600",text:"text-white",icon:"alert-triangle"};case"success":return{bg:"bg-green-600",text:"text-white",icon:"check-circle"};case"info":default:return{bg:"bg-black",text:"text-white",icon:"info"}}}render(){let e=this.#t();return d`
1514
1781
  <div
1515
1782
  class="${this._isVisible?"opacity-100 translate-y-0":"opacity-0 translate-y-[50px] pointer-events-none mt-[-40px]"} flex justify-center transition-all transition-discrete duration-[1s] ease-in-out">
1516
1783
  <div class="${e.bg} mb-2 flex max-w-[70%] items-center justify-center rounded-full px-3 py-2 select-none">
1517
1784
  <!-- Icon based on variant -->
1518
- ${this.variant==="info"?u`
1785
+ ${this.variant==="info"?d`
1519
1786
  <!-- (i) symbol for info -->
1520
1787
  <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4">
1521
1788
  <path
@@ -1524,21 +1791,21 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1524
1791
  d="M2.25 12C2.25 6.61522 6.61522 2.25 12 2.25C17.3848 2.25 21.75 6.61522 21.75 12C21.75 17.3848 17.3848 21.75 12 21.75C6.61522 21.75 2.25 17.3848 2.25 12ZM10.9562 10.5584C12.1025 9.98533 13.3931 11.0206 13.0823 12.2639L12.3733 15.0999L12.4148 15.0792C12.7852 14.894 13.2357 15.0441 13.421 15.4146C13.6062 15.7851 13.4561 16.2356 13.0856 16.4208L13.0441 16.4416C11.8979 17.0147 10.6072 15.9794 10.9181 14.7361L11.6271 11.9001L11.5856 11.9208C11.2151 12.1061 10.7646 11.9559 10.5793 11.5854C10.3941 11.2149 10.5443 10.7644 10.9148 10.5792L10.9562 10.5584ZM12 9C12.4142 9 12.75 8.66421 12.75 8.25C12.75 7.83579 12.4142 7.5 12 7.5C11.5858 7.5 11.25 7.83579 11.25 8.25C11.25 8.66421 11.5858 9 12 9Z"
1525
1792
  fill="white" />
1526
1793
  </svg>
1527
- `:this.variant==="error"?u`
1794
+ `:this.variant==="error"?d`
1528
1795
  <!-- Alert circle for error -->
1529
1796
  <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4">
1530
1797
  <circle cx="12" cy="12" r="10" stroke="white" stroke-width="2" />
1531
1798
  <line x1="15" y1="9" x2="9" y2="15" stroke="white" stroke-width="2" />
1532
1799
  <line x1="9" y1="9" x2="15" y2="15" stroke="white" stroke-width="2" />
1533
1800
  </svg>
1534
- `:this.variant==="warning"?u`
1801
+ `:this.variant==="warning"?d`
1535
1802
  <!-- Alert triangle for warning -->
1536
1803
  <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4">
1537
1804
  <path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
1538
1805
  <line x1="12" y1="9" x2="12" y2="13" stroke="white" stroke-width="2" stroke-linecap="round" />
1539
1806
  <path d="M12 17h.01" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
1540
1807
  </svg>
1541
- `:u`
1808
+ `:d`
1542
1809
  <!-- Check circle for success -->
1543
1810
  <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4">
1544
1811
  <path d="M22 11.08V12a10 10 0 11-5.93-9.14" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
@@ -1549,131 +1816,131 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1549
1816
  <span class="${e.text} ml-1 text-xs">${this.text}</span>
1550
1817
  </div>
1551
1818
  </div>
1552
- `}};customElements.get("mw-info-banner")||customElements.define("mw-info-banner",ri);var ni=class extends C(v){render=()=>u`
1819
+ `}};customElements.get("mw-info-banner")||customElements.define("mw-info-banner",ni);var ii=class extends C(v){render=()=>d`
1553
1820
  <svg class="inline-block h-full w-full leading-none" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" xml:space="preserve">
1554
- <circle fill="currentFill" stroke="none" cx="27" cy="50" r="6">
1821
+ <circle fill="currentColor" stroke="none" cx="27" cy="50" r="6">
1555
1822
  <animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.1" />
1556
1823
  </circle>
1557
- <circle fill="currentFill" stroke="none" cx="47" cy="50" r="6">
1824
+ <circle fill="currentColor" stroke="none" cx="47" cy="50" r="6">
1558
1825
  <animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.2" />
1559
1826
  </circle>
1560
- <circle fill="currentFill" stroke="none" cx="67" cy="50" r="6">
1827
+ <circle fill="currentColor" stroke="none" cx="67" cy="50" r="6">
1561
1828
  <animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.3" />
1562
1829
  </circle>
1563
1830
  </svg>
1564
- `};customElements.get("mw-loading")||customElements.define("mw-loading",ni);var gc="https://molin.ai/?utm_source=molin-shop-ai&utm_medium=widget&utm_campaign=poweredby",ii=class extends C(v){render=()=>u`
1565
- <p class="flex items-center justify-center text-xs whitespace-nowrap">
1566
- <span>Powered by</span>
1567
-
1568
- <a href="${gc}" target="_blank" class="inline-flex items-center underline">
1569
- <svg class="mx-1 inline-block h-4 w-4" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
1570
- <circle cx="10.0361" cy="10.0361" r="10.0361" fill="#242038" />
1571
- <path
1572
- fill-rule="evenodd"
1573
- clip-rule="evenodd"
1574
- d="M14.4482 15.0424C15.0767 15.2108 15.7464 15.1227 16.3099 14.7973L15.0832 12.6725L13.8564 10.5477L13.8562 10.5479L11.4869 6.44411L11.4774 6.42785L11.475 6.42371C11.1496 5.86018 10.6137 5.44898 9.98519 5.28057C9.35666 5.11215 8.68697 5.20032 8.12345 5.52567L9.35019 7.65045L10.5769 9.77523L10.577 9.77516L12.9461 13.8785L12.9593 13.9008C13.2847 14.4635 13.8202 14.8741 14.4482 15.0424ZM10.8392 15.0436C11.4677 15.212 12.1374 15.1238 12.701 14.7985L11.4742 12.6737L10.2475 10.5489L10.2474 10.549L7.87793 6.44488L7.87142 6.43373L7.86629 6.4248C7.54093 5.86127 7.00505 5.45007 6.37652 5.28166C5.90455 5.15519 5.40058 5.17178 4.94379 5.32631C4.44552 5.48229 4.08397 5.94754 4.08397 6.49724V12.5389C4.08354 12.5576 4.08333 12.5763 4.08333 12.5951C4.08333 13.2451 4.34182 13.8686 4.80194 14.3283C5.26205 14.7879 5.88611 15.0462 6.53681 15.0462V12.6098C6.53724 12.5964 6.53746 12.5831 6.53746 12.5696V9.7318C6.33805 9.40929 6.1011 8.99037 5.8593 8.52589C5.2972 7.44609 4.92176 6.52897 5.02074 6.47745C5.03257 6.47129 5.05064 6.47777 5.07425 6.4958L5.07612 6.49904C5.25259 6.63858 5.72449 7.39502 6.21645 8.34007C6.38575 8.66529 6.53812 8.97576 6.66569 9.25226L6.96825 9.77632L6.96829 9.77629L9.33716 13.8793L9.34457 13.892L9.34944 13.9004C9.67479 14.464 10.2107 14.8752 10.8392 15.0436Z"
1575
- fill="url(#paint0_linear_1_17)" />
1576
- <defs>
1577
- <linearGradient id="paint0_linear_1_17" x1="4.08333" y1="10.1653" x2="16.3099" y2="10.1653" gradientUnits="userSpaceOnUse">
1578
- <stop offset="0.197917" stop-color="#E4FF1A" />
1579
- <stop offset="0.822917" stop-color="#21F4F0" />
1580
- </linearGradient>
1581
- </defs>
1582
- </svg>
1583
-
1584
- <span>Molin AI</span>
1585
- </a>
1586
- </p>
1587
- `};customElements.get("mw-powered-by")||customElements.define("mw-powered-by",ii);var wc=Math.pow(10,8)*24*60*60*1e3,K1=-wc;var yc=3600;var ko=yc*24,Y1=ko*7,vc=ko*365.2425,bc=vc/12,Q1=bc*3,si=Symbol.for("constructDateFrom");function Co(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&si in t?t[si](e):t instanceof Date?new t.constructor(e):new Date(e)}function oi(t,e){return Co(e||t,t)}function $o(t){return e=>{let n=(t?Math[t]:Math.trunc)(e);return n===0?0:n}}function So(t,e){return+oi(t)-+oi(e)}function ai(t,e,r){let n=So(t,e)/1e3;return $o(r?.roundingMethod)(n)}var li=class extends C(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},_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=D`
1831
+ `};customElements.get("mw-loading")||customElements.define("mw-loading",ii);var xc="https://molin.ai/?utm_source=molin-shop-ai&utm_medium=widget&utm_campaign=poweredby",si=class extends C(v){static properties={darkMode:{type:Boolean,attribute:"dark-mode"}};constructor(){super(),this.darkMode=!1}render(){return d`
1832
+ <p class="${this.darkMode?"dark text-gray-300":"text-gray-600"} flex items-center justify-center text-xs whitespace-nowrap">
1833
+ <span>Powered by</span>
1834
+
1835
+ <a href="${xc}" target="_blank" class="${this.darkMode?"text-gray-200":""} inline-flex items-center underline">
1836
+ <svg class="mx-1 inline-block h-4 w-4" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
1837
+ <circle cx="10.0361" cy="10.0361" r="10.0361" fill="#242038" />
1838
+ <path
1839
+ fill-rule="evenodd"
1840
+ clip-rule="evenodd"
1841
+ d="M14.4482 15.0424C15.0767 15.2108 15.7464 15.1227 16.3099 14.7973L15.0832 12.6725L13.8564 10.5477L13.8562 10.5479L11.4869 6.44411L11.4774 6.42785L11.475 6.42371C11.1496 5.86018 10.6137 5.44898 9.98519 5.28057C9.35666 5.11215 8.68697 5.20032 8.12345 5.52567L9.35019 7.65045L10.5769 9.77523L10.577 9.77516L12.9461 13.8785L12.9593 13.9008C13.2847 14.4635 13.8202 14.8741 14.4482 15.0424ZM10.8392 15.0436C11.4677 15.212 12.1374 15.1238 12.701 14.7985L11.4742 12.6737L10.2475 10.5489L10.2474 10.549L7.87793 6.44488L7.87142 6.43373L7.86629 6.4248C7.54093 5.86127 7.00505 5.45007 6.37652 5.28166C5.90455 5.15519 5.40058 5.17178 4.94379 5.32631C4.44552 5.48229 4.08397 5.94754 4.08397 6.49724V12.5389C4.08354 12.5576 4.08333 12.5763 4.08333 12.5951C4.08333 13.2451 4.34182 13.8686 4.80194 14.3283C5.26205 14.7879 5.88611 15.0462 6.53681 15.0462V12.6098C6.53724 12.5964 6.53746 12.5831 6.53746 12.5696V9.7318C6.33805 9.40929 6.1011 8.99037 5.8593 8.52589C5.2972 7.44609 4.92176 6.52897 5.02074 6.47745C5.03257 6.47129 5.05064 6.47777 5.07425 6.4958L5.07612 6.49904C5.25259 6.63858 5.72449 7.39502 6.21645 8.34007C6.38575 8.66529 6.53812 8.97576 6.66569 9.25226L6.96825 9.77632L6.96829 9.77629L9.33716 13.8793L9.34457 13.892L9.34944 13.9004C9.67479 14.464 10.2107 14.8752 10.8392 15.0436Z"
1842
+ fill="url(#paint0_linear_1_17)" />
1843
+ <defs>
1844
+ <linearGradient id="paint0_linear_1_17" x1="4.08333" y1="10.1653" x2="16.3099" y2="10.1653" gradientUnits="userSpaceOnUse">
1845
+ <stop offset="0.197917" stop-color="#E4FF1A" />
1846
+ <stop offset="0.822917" stop-color="#21F4F0" />
1847
+ </linearGradient>
1848
+ </defs>
1849
+ </svg>
1850
+
1851
+ <span>Molin AI</span>
1852
+ </a>
1853
+ </p>
1854
+ `}};customElements.get("mw-powered-by")||customElements.define("mw-powered-by",si);var kc=Math.pow(10,8)*24*60*60*1e3,D0=-kc;var Cc=3600;var Eo=Cc*24,O0=Eo*7,$c=Eo*365.2425,Sc=$c/12,U0=Sc*3,oi=Symbol.for("constructDateFrom");function _o(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&oi in t?t[oi](e):t instanceof Date?new t.constructor(e):new Date(e)}function ai(t,e){return _o(e||t,t)}function Mo(t){return e=>{let n=(t?Math[t]:Math.trunc)(e);return n===0?0:n}}function Io(t,e){return+ai(t)-+ai(e)}function li(t,e,r){let n=Io(t,e)/1e3;return Mo(r?.roundingMethod)(n)}var ci=class extends C(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=L`
1588
1855
  :host {
1589
1856
  display: block;
1590
1857
  }
1591
- `;#e=7;constructor(){super(),this.question="",this.options=["No","Yes"],this.heading="",this.gameTitle="",this.resultPrefix="",this.correctButtonText="Correct",this.wrongButtonText="Wrong",this.color="#601feb",this.apiBaseUrl="",this.cdnBaseUrl="",this.minutes="00",this.seconds="00",this._questionHistory=[],this._currentQuestion="",this._guessedJob="",this._isLoadingNextQuestion=!1,this._loadingAnswer="",this._guessValidated=!1,this._validatingButton="",this._currentAttemptQuestionCount=0}firstUpdated(){this._currentQuestion=this.question}async#t(){if(!this.apiBaseUrl)return console.warn("API base URL not configured, cannot fetch next question"),null;this._isLoadingNextQuestion=!0;try{let e=await fetch(`${this.apiBaseUrl}/preview/wait-game/next-question`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({questionAnswers:this._questionHistory,takeGuess:this._currentAttemptQuestionCount>=this.#e})});return e.ok?await e.json():(console.error("failed to fetch next question",e.status),null)}catch(e){return console.error("error fetching next question",e),null}finally{this._isLoadingNextQuestion=!1}}#r=async e=>{this._loadingAnswer=e,this._questionHistory.push({question:this._currentQuestion,answer:e}),this._currentAttemptQuestionCount++,this.dispatchEvent(new CustomEvent("mw-chat-wait-game:question-answered",{bubbles:!0,composed:!0,detail:{questionIndex:this._questionHistory.length-1,question:this._currentQuestion,answer:e,totalQuestions:this.#e,allAnswers:this._questionHistory.map(n=>n.answer)}}));let r=await this.#t();r&&(r.isComplete&&r.guessedJob?(this._guessedJob=r.guessedJob,this.dispatchEvent(new CustomEvent("mw-chat-wait-game:game-completed",{bubbles:!0,composed:!0,detail:{guessedProfession:this._guessedJob,questionCount:this._questionHistory.length,allAnswers:this._questionHistory.map(n=>n.answer)}}))):r.nextQuestion&&(this._currentQuestion=r.nextQuestion)),this._loadingAnswer=""};#n=async e=>{if(this._validatingButton=e?"correct":"wrong",this.dispatchEvent(new CustomEvent("mw-chat-wait-game:guess-validated",{bubbles:!0,composed:!0,detail:{guessedProfession:this._guessedJob,isCorrect:e,questionCount:this._questionHistory.length,allAnswers:this._questionHistory.map(r=>r.answer)}})),e)this._guessValidated=!0,this._validatingButton="";else{let r=await this.#t();r?.nextQuestion&&(this._currentQuestion=r.nextQuestion),this._guessedJob="",this._currentAttemptQuestionCount=0,this._validatingButton=""}};#i(){return Math.round(this._currentAttemptQuestionCount/this.#e*100)}#s(){let e=this.cdnBaseUrl?`${this.cdnBaseUrl}/assets/career-ladder`:"https://widget.molin.ai/assets/career-ladder";return u`
1858
+ `;#e=7;constructor(){super(),this.question="",this.options=["No","Yes"],this.heading="",this.gameTitle="",this.resultPrefix="",this.correctButtonText="Correct",this.wrongButtonText="Wrong",this.color="#601feb",this.apiBaseUrl="",this.cdnBaseUrl="",this.minutes="00",this.seconds="00",this.darkMode=!1,this._questionHistory=[],this._currentQuestion="",this._guessedJob="",this._isLoadingNextQuestion=!1,this._loadingAnswer="",this._guessValidated=!1,this._validatingButton="",this._currentAttemptQuestionCount=0}firstUpdated(){this._currentQuestion=this.question}async#t(){if(!this.apiBaseUrl)return console.warn("API base URL not configured, cannot fetch next question"),null;this._isLoadingNextQuestion=!0;try{let e=await fetch(`${this.apiBaseUrl}/preview/wait-game/next-question`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({questionAnswers:this._questionHistory,takeGuess:this._currentAttemptQuestionCount>=this.#e})});return e.ok?await e.json():(console.error("failed to fetch next question",e.status),null)}catch(e){return console.error("error fetching next question",e),null}finally{this._isLoadingNextQuestion=!1}}#r=async e=>{this._loadingAnswer=e,this._questionHistory.push({question:this._currentQuestion,answer:e}),this._currentAttemptQuestionCount++,this.dispatchEvent(new CustomEvent("mw-chat-wait-game:question-answered",{bubbles:!0,composed:!0,detail:{questionIndex:this._questionHistory.length-1,question:this._currentQuestion,answer:e,totalQuestions:this.#e,allAnswers:this._questionHistory.map(n=>n.answer)}}));let r=await this.#t();r&&(r.isComplete&&r.guessedJob?(this._guessedJob=r.guessedJob,this.dispatchEvent(new CustomEvent("mw-chat-wait-game:game-completed",{bubbles:!0,composed:!0,detail:{guessedProfession:this._guessedJob,questionCount:this._questionHistory.length,allAnswers:this._questionHistory.map(n=>n.answer)}}))):r.nextQuestion&&(this._currentQuestion=r.nextQuestion)),this._loadingAnswer=""};#n=async e=>{if(this._validatingButton=e?"correct":"wrong",this.dispatchEvent(new CustomEvent("mw-chat-wait-game:guess-validated",{bubbles:!0,composed:!0,detail:{guessedProfession:this._guessedJob,isCorrect:e,questionCount:this._questionHistory.length,allAnswers:this._questionHistory.map(r=>r.answer)}})),e)this._guessValidated=!0,this._validatingButton="";else{let r=await this.#t();r?.nextQuestion&&(this._currentQuestion=r.nextQuestion),this._guessedJob="",this._currentAttemptQuestionCount=0,this._validatingButton=""}};#i(){return Math.round(this._currentAttemptQuestionCount/this.#e*100)}#s(){let e=this.cdnBaseUrl?`${this.cdnBaseUrl}/assets/career-ladder`:"https://widget.molin.ai/assets/career-ladder";return d`
1592
1859
  <div class="mt-3 flex items-center justify-center gap-1">
1593
- <span class="text-[11px] text-black/40">Inspired by</span>
1860
+ <span class="text-[11px] text-black/40 dark:text-gray-500">Inspired by</span>
1594
1861
 
1595
1862
  <img src="${e}" alt="Career Ladder" class="h-6" />
1596
1863
  </div>
1597
- `}render(){let e=this.#i(),r=this.heading||"Agent joining in",n=this.gameTitle||"\u{1F9E0} I'll guess your job",i=this.resultPrefix||"I'm pretty confident:";return this._guessedJob?u`
1598
- <div class="mx-auto w-full max-w-xs rounded-2xl bg-white/70 p-4 shadow-sm ring-1 ring-black/10 backdrop-blur">
1864
+ `}render(){let e=this.#i(),r=this.heading||"Agent joining in",n=this.gameTitle||"\u{1F9E0} I'll guess your job",i=this.resultPrefix||"I'm pretty confident:";return this._guessedJob?d`
1865
+ <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">
1599
1866
  <div class="flex items-center justify-between">
1600
- <div class="text-[13px] text-black/60">${r}</div>
1867
+ <div class="text-[13px] text-black/60 dark:text-gray-300">${r}</div>
1601
1868
  <span class="h-1.5 w-1.5 animate-pulse rounded-full bg-green-500"></span>
1602
1869
  </div>
1603
1870
 
1604
1871
  <!-- Timer -->
1605
- <div class="mt-2 font-[ui-monospace,Menlo,Monaco,Consolas] text-2xl tracking-tight text-black tabular-nums" aria-live="polite">
1606
- ${this.minutes}<span class="text-black/30">:</span>${this.seconds}
1872
+ <div class="mt-2 font-[ui-monospace,Menlo,Monaco,Consolas] text-2xl tracking-tight text-black tabular-nums dark:text-white" aria-live="polite">
1873
+ ${this.minutes}<span class="text-black/60 dark:text-gray-400">:</span>${this.seconds}
1607
1874
  </div>
1608
1875
 
1609
- <div class="mt-3 space-y-1.5 text-[13px] text-black/80">
1610
- <div class="rounded-xl bg-black/[0.04] px-3 py-2">${i} ${this._guessedJob}.</div>
1876
+ <div class="mt-3 space-y-1.5 text-[13px] text-black dark:text-white">
1877
+ <div class="rounded-xl bg-black/[0.04] px-3 py-2 dark:bg-white/10">${i} ${this._guessedJob}.</div>
1611
1878
  </div>
1612
1879
 
1613
- ${this._guessValidated?"":u`
1880
+ ${this._guessValidated?"":d`
1614
1881
  <div class="mt-3 grid grid-cols-2 gap-2">
1615
1882
  <button
1616
1883
  @click="${()=>this.#n(!1)}"
1617
1884
  ?disabled="${!!this._validatingButton}"
1618
- class="flex items-center justify-center gap-1 rounded-xl border border-[${this.color}] bg-white px-4 py-2 text-sm font-medium text-black transition-colors hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50">
1619
- ${this._validatingButton==="wrong"?u`<lucide-icon class="h-4 w-4 animate-spin" name="loader-circle"></lucide-icon>`:this.wrongButtonText}
1885
+ class="flex items-center justify-center gap-1 rounded-xl border border-[${this.color}] bg-white px-4 py-2 text-sm font-medium text-black transition-colors hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50 dark:bg-[#2B2D31] dark:text-gray-200">
1886
+ ${this._validatingButton==="wrong"?d`<lucide-icon class="h-4 w-4 animate-spin" name="loader-circle"></lucide-icon>`:this.wrongButtonText}
1620
1887
  </button>
1621
1888
  <button
1622
1889
  @click="${()=>this.#n(!0)}"
1623
1890
  ?disabled="${!!this._validatingButton}"
1624
1891
  class="flex items-center justify-center gap-1 rounded-xl bg-[${this.color}] px-4 py-2 text-sm font-medium text-white transition-colors hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50">
1625
- ${this._validatingButton==="correct"?u`<lucide-icon class="h-4 w-4 animate-spin" name="loader-circle"></lucide-icon>`:this.correctButtonText}
1892
+ ${this._validatingButton==="correct"?d`<lucide-icon class="h-4 w-4 animate-spin" name="loader-circle"></lucide-icon>`:this.correctButtonText}
1626
1893
  </button>
1627
1894
  </div>
1628
1895
  `}
1629
- ${this._guessValidated?"":u`
1630
- <div class="mt-3 h-1.5 overflow-hidden rounded-full bg-black/5">
1896
+ ${this._guessValidated?"":d`
1897
+ <div class="mt-3 h-1.5 overflow-hidden rounded-full bg-black/5 dark:bg-white/10">
1631
1898
  <div class="h-full rounded-full bg-[${this.color}] transition-[width] duration-300" style="width: 100%"></div>
1632
1899
  </div>
1633
1900
  `}
1634
1901
  ${this.#s()}
1635
1902
  </div>
1636
- `:this._currentQuestion?u`
1637
- <div class="mx-auto w-full max-w-xs rounded-2xl bg-white/70 p-4 shadow-sm ring-1 ring-black/10 backdrop-blur">
1903
+ `:this._currentQuestion?d`
1904
+ <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">
1638
1905
  <div class="flex items-center justify-between">
1639
- <div class="text-[13px] text-black/60">${r}</div>
1906
+ <div class="text-[13px] text-black/60 dark:text-gray-300">${r}</div>
1640
1907
  <span class="h-1.5 w-1.5 animate-pulse rounded-full bg-green-500"></span>
1641
1908
  </div>
1642
1909
 
1643
1910
  <!-- Timer -->
1644
- <div class="mt-2 font-[ui-monospace,Menlo,Monaco,Consolas] text-2xl tracking-tight text-black tabular-nums" aria-live="polite">
1645
- ${this.minutes}<span class="text-black/30">:</span>${this.seconds}
1911
+ <div class="mt-2 font-[ui-monospace,Menlo,Monaco,Consolas] text-2xl tracking-tight text-black tabular-nums dark:text-white" aria-live="polite">
1912
+ ${this.minutes}<span class="text-black/60 dark:text-gray-400">:</span>${this.seconds}
1646
1913
  </div>
1647
1914
 
1648
1915
  <div class="mt-2 flex items-center justify-between">
1649
- <h3 class="text-sm font-semibold text-black">${n}</h3>
1650
- <div class="text-xs text-black/40"><span>${this._currentAttemptQuestionCount}</span>/${this.#e}</div>
1916
+ <h3 class="text-sm font-semibold text-black dark:text-white">${n}</h3>
1917
+ <div class="text-xs text-black/60 dark:text-gray-300"><span>${this._currentAttemptQuestionCount}</span>/${this.#e}</div>
1651
1918
  </div>
1652
1919
 
1653
- <div class="mt-3 rounded-xl bg-black/[0.04] px-3 py-2 text-[14px] font-medium text-black">${this._currentQuestion}</div>
1920
+ <div class="mt-3 rounded-xl bg-black/[0.04] px-3 py-2 text-[14px] font-medium text-black dark:bg-white/10 dark:text-white">${this._currentQuestion}</div>
1654
1921
 
1655
1922
  <div class="mt-3 grid grid-cols-2 gap-1">
1656
- ${this.options.map((s,o)=>{let c=this._loadingAnswer===s;return u`
1923
+ ${this.options.map((s,o)=>{let a=this._loadingAnswer===s;return d`
1657
1924
  <button
1658
1925
  @click="${()=>this.#r(s)}"
1659
1926
  ?disabled="${this._isLoadingNextQuestion}"
1660
- class="${o===0?`flex items-center justify-center gap-1 rounded-xl border border-[${this.color}] bg-white text-black px-1 py-1.5 max-h-[35px] text-sm transition-colors hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50`:`flex items-center justify-center gap-1 rounded-xl bg-[${this.color}] py-1.5 max-h-[35px] px-1 text-sm text-white transition-colors hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50`}">
1661
- ${c?u`<lucide-icon class="h-3.5 w-3.5 animate-spin" name="loader-circle"></lucide-icon>`:s}
1927
+ class="${o===0?`bg-white dark:bg-[#2B2D31] text-black dark:text-gray-200 flex items-center justify-center gap-1 rounded-xl border border-[${this.color}] px-1 py-1.5 max-h-[35px] text-sm transition-colors hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50`:`flex items-center justify-center gap-1 rounded-xl bg-[${this.color}] py-1.5 max-h-[35px] px-1 text-sm text-white transition-colors hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50`}">
1928
+ ${a?d`<lucide-icon class="h-3.5 w-3.5 animate-spin" name="loader-circle"></lucide-icon>`:s}
1662
1929
  </button>
1663
1930
  `})}
1664
1931
  </div>
1665
1932
 
1666
- <div class="mt-3 h-1.5 overflow-hidden rounded-full bg-black/5">
1933
+ <div class="mt-3 h-1.5 overflow-hidden rounded-full bg-black/5 dark:bg-white/10">
1667
1934
  <div class="h-full rounded-full bg-[${this.color}] transition-[width] duration-300" style="width: ${e}%"></div>
1668
1935
  </div>
1669
1936
 
1670
1937
  ${this.#s()}
1671
1938
  </div>
1672
- `:u`<div class="mx-auto w-full max-w-xs rounded-2xl bg-white/70 p-4 text-center text-sm text-black/60">Loading game...</div>`}};customElements.get("mw-chat-wait-game")||customElements.define("mw-chat-wait-game",li);var ci=class extends C(v){static properties={totalSeconds:{type:Number},heading:{type:String},message:{type:String},completeMessage:{type:String},gameButton:{type:String},question:{type:String},options:{type:String},gameTitle:{type:String,attribute:"game-title"},resultPrefix:{type:String,attribute:"result-prefix"},correctButtonText:{type:String,attribute:"correct-button-text"},wrongButtonText:{type:String,attribute:"wrong-button-text"},targetEndTime:{type:String,attribute:"target-end-time"},color:{type:String},apiBaseUrl:{type:String},cdnBaseUrl:{type:String},soundUrl:{type:String,attribute:"sound"},_remainingSeconds:{type:Number,state:!0},_isComplete:{type:Boolean,state:!0},_showGame:{type:Boolean,state:!0}};static styles=D`
1939
+ `:d` <div class="${this.darkMode?"dark bg-[#1E1F23] text-gray-300":"bg-white/70 text-black/60"} mx-auto w-full max-w-xs rounded-2xl p-4 text-center text-sm">Loading game...</div> `}};customElements.get("mw-chat-wait-game")||customElements.define("mw-chat-wait-game",ci);var ui=class extends C(v){static properties={totalSeconds:{type:Number},heading:{type:String},message:{type:String},completeMessage:{type:String},gameButton:{type:String},question:{type:String},options:{type:String},gameTitle:{type:String,attribute:"game-title"},resultPrefix:{type:String,attribute:"result-prefix"},correctButtonText:{type:String,attribute:"correct-button-text"},wrongButtonText:{type:String,attribute:"wrong-button-text"},targetEndTime:{type:String,attribute:"target-end-time"},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}};static styles=L`
1673
1940
  :host {
1674
1941
  display: block;
1675
1942
  }
1676
- `;#e=null;#t=null;#r=0;constructor(){super(),this.heading="",this.message="",this.completeMessage="",this.gameButton="",this.question="",this.options="",this.gameTitle="",this.resultPrefix="",this.correctButtonText="Correct",this.wrongButtonText="Wrong",this.targetEndTime="",this.color="#601feb",this.apiBaseUrl="",this.cdnBaseUrl="",this.soundUrl="",this._remainingSeconds=480,this._isComplete=!1,this._showGame=!1}connectedCallback(){super.connectedCallback(),this.#n(),this.#s()}disconnectedCallback(){super.disconnectedCallback(),this.#o()}#n(){this.targetEndTime?this.#t=new Date(this.targetEndTime):this.#t=new Date(Date.now()+this._remainingSeconds*1e3),this.#r=Math.max(ai(this.#t,new Date),0),this.#i()}#i(){if(this.#t===null)return;let e=new Date,r=ai(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.#i()},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}))};#h(){if(!this.question)return!1;try{return localStorage.getItem("_molin_timer_sound_question")===this.question}catch{return!1}}#c(){if(this.question)try{localStorage.setItem("_molin_timer_sound_question",this.question)}catch(e){console.error("Error saving sound state to localStorage:",e,{})}}#l(){if(!this.soundUrl||!this.question||this.#h())return;let e=new Audio(this.soundUrl);e.volume=.5,e.play().then(()=>{this.#c()}).catch(r=>{console.error("Error playing audio:",r,{})})}#p(){let e=Math.floor(this._remainingSeconds/60),r=this._remainingSeconds%60,n=i=>String(i).padStart(2,"0");return{minutes:n(e),seconds:n(r)}}#m(){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.#p();if(this._showGame)return u`
1943
+ `;#e=null;#t=null;#r=0;constructor(){super(),this.heading="",this.message="",this.completeMessage="",this.gameButton="",this.question="",this.options="",this.gameTitle="",this.resultPrefix="",this.correctButtonText="Correct",this.wrongButtonText="Wrong",this.targetEndTime="",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.#n(),this.#s()}disconnectedCallback(){super.disconnectedCallback(),this.#o()}#n(){this.targetEndTime?this.#t=new Date(this.targetEndTime):this.#t=new Date(Date.now()+this._remainingSeconds*1e3),this.#r=Math.max(li(this.#t,new Date),0),this.#i()}#i(){if(this.#t===null)return;let e=new Date,r=li(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.#i()},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.question)return!1;try{return localStorage.getItem("_molin_timer_sound_question")===this.question}catch{return!1}}#c(){if(this.question)try{localStorage.setItem("_molin_timer_sound_question",this.question)}catch(e){console.error("Error saving sound state to localStorage:",e,{})}}#l(){if(!this.soundUrl||!this.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,n=i=>String(i).padStart(2,"0");return{minutes:n(e),seconds:n(r)}}#m(){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 d`
1677
1944
  <mw-chat-wait-game
1678
1945
  .question="${this.question}"
1679
1946
  .options="${this.options||["No","Yes"]}"
@@ -1686,79 +1953,82 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1686
1953
  .apiBaseUrl="${this.apiBaseUrl}"
1687
1954
  .cdnBaseUrl="${this.cdnBaseUrl}"
1688
1955
  .minutes="${e}"
1689
- .seconds="${r}"></mw-chat-wait-game>
1690
- `;let n=this.#m();return u`
1691
- <div class="mx-auto w-full max-w-xs rounded-2xl bg-white/70 p-4 shadow-sm ring-1 ring-black/10 backdrop-blur">
1956
+ .seconds="${r}"
1957
+ ?dark-mode="${this.darkMode}"></mw-chat-wait-game>
1958
+ `;let n=this.#m();return d`
1959
+ <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">
1692
1960
  <!-- Time -->
1693
- <div class="font-[ui-monospace,Menlo,Monaco,Consolas] text-4xl tracking-tight text-black tabular-nums" aria-live="polite">${e}<span class="text-black/30">:</span>${r}</div>
1961
+ <div class="font-[ui-monospace,Menlo,Monaco,Consolas] text-4xl tracking-tight text-black tabular-nums dark:text-white" aria-live="polite">
1962
+ ${e}<span class="text-black/30 dark:text-gray-400">:</span>${r}
1963
+ </div>
1694
1964
 
1695
1965
  <!-- Progress bar -->
1696
- <div class="mt-3 h-1.5 overflow-hidden rounded-full bg-black/5">
1966
+ <div class="mt-3 h-1.5 overflow-hidden rounded-full bg-black/5 dark:bg-white/10">
1697
1967
  <div class="h-full rounded-full bg-[${this.color}] transition-[width] duration-300" style="width: ${n}%"></div>
1698
1968
  </div>
1699
1969
 
1700
1970
  <!-- Message -->
1701
- <div class="mt-2 text-[12px] leading-tight text-black/50">${this._isComplete?this.completeMessage:this.message}</div>
1971
+ <div class="mt-2 text-[12px] leading-tight text-black/50 dark:text-gray-300">${this._isComplete?this.completeMessage:this.message}</div>
1702
1972
 
1703
1973
  <!-- Play a Game Button -->
1704
1974
  <div class="mt-4">
1705
1975
  <button @click="${this.#a}" class="w-full rounded-xl bg-[${this.color}] px-4 py-2 text-sm font-medium text-white transition hover:opacity-90">${this.gameButton}</button>
1706
1976
  </div>
1707
1977
  </div>
1708
- `}};customElements.get("mw-chat-wait-timer")||customElements.define("mw-chat-wait-timer",ci);var ui=class extends C(v){static properties={product:{type:Object},streaming:{type:Boolean},linksNewTab:{type:Boolean,attribute:"links-new-tab"},searchParams:{type:Object},imagesByProductUrl:{type:Object}};constructor(){super(),this.product=void 0,this.streaming=!1,this.linksNewTab=!1,this.searchParams=void 0,this.imagesByProductUrl={}}get trackedProductUrl(){let e=this.product?.url,r=this.searchParams;try{if(e&&r)return ps(e,r).href}catch{}return e}render(){let{name:e,description:r,price:n,url:i}=this.product||{},s=i?this.imagesByProductUrl?.[i]:void 0;return u`
1978
+ `}};customElements.get("mw-chat-wait-timer")||customElements.define("mw-chat-wait-timer",ui);var di=class extends C(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 ws(e,r).href}catch{}return e}render(){let{name:e,description:r,price:n,url:i}=this.product||{},s=i?this.imagesByProductUrl?.[i]:void 0;return d`
1709
1979
  <a
1710
- href="${F(this.trackedProductUrl)}"
1711
- title="${F(e)}"
1712
- class="group flex w-full max-w-md cursor-pointer gap-[10px] overflow-hidden rounded-lg"
1980
+ href="${N(this.trackedProductUrl)}"
1981
+ title="${N(e)}"
1982
+ class="${this.darkMode?"dark":""} group flex w-full max-w-md cursor-pointer gap-[10px] overflow-hidden rounded-lg"
1713
1983
  target="${this.linksNewTab?"_blank":"_self"}"
1714
1984
  ?disabled="${this.streaming}">
1715
- ${this.streaming?u`
1985
+ ${this.streaming?d`
1716
1986
  <!-- shimmer -->
1717
- <div class="h-[70px] w-[70px] animate-pulse overflow-hidden rounded-lg bg-gray-200"></div>
1718
- `:u`<img src="${F(s)}" class="block h-[70px] w-[70px] rounded-lg bg-gray-100 object-contain" loading="lazy" />`}
1987
+ <div class="h-[70px] w-[70px] animate-pulse overflow-hidden rounded-lg bg-gray-200 dark:bg-gray-700"></div>
1988
+ `:d`<img src="${N(s)}" class="block h-[70px] w-[70px] rounded-lg bg-gray-100 object-contain dark:bg-gray-700" loading="lazy" />`}
1719
1989
 
1720
1990
  <div class="flex flex-1 flex-col justify-between">
1721
1991
  <div>
1722
- ${e||!this.streaming?u`<h3 class="line-clamp-1 text-sm font-medium group-hover:underline">${e}</h3>`:u`<div class="h-5 w-32 animate-pulse rounded bg-gray-200"></div>`}
1992
+ ${e||!this.streaming?d`<h3 class="line-clamp-1 text-sm font-medium text-black group-hover:underline dark:text-white">${e}</h3>`:d`<div class="h-5 w-32 animate-pulse rounded bg-gray-200 dark:bg-gray-700"></div>`}
1723
1993
 
1724
1994
  <!-- no margin here -->
1725
1995
 
1726
- ${r||!this.streaming?u`<p class="line-clamp-2 text-xs text-gray-500">${r}</p>`:u`<div class="my-1 h-6 w-3/4 animate-pulse rounded bg-gray-200"></div>`}
1996
+ ${r||!this.streaming?d`<p class="line-clamp-2 text-xs text-gray-500 dark:text-gray-400">${r}</p>`:d`<div class="my-1 h-6 w-3/4 animate-pulse rounded bg-gray-200 dark:bg-gray-700"></div>`}
1727
1997
  </div>
1728
1998
 
1729
1999
  <!-- flexbox filled space -->
1730
2000
 
1731
- ${n||!this.streaming?u`<span class="text-xs text-gray-900">${n}</span>`:u`<div class="h-4 w-14 animate-pulse rounded bg-gray-200"></div>`}
2001
+ ${n||!this.streaming?d`<span class="text-xs text-gray-900 dark:text-white">${n}</span>`:d`<div class="h-4 w-14 animate-pulse rounded bg-gray-200 dark:bg-gray-700"></div>`}
1732
2002
  </div>
1733
2003
  </a>
1734
- `}};customElements.get("mw-product-card-horizontal")||customElements.define("mw-product-card-horizontal",ui);function $r(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}var Sr=function(){},rt=function(){};var Mt=(t,e,r)=>Math.min(Math.max(r,t),e);var hi=.001,xc=.01,Eo=10,kc=.05,Cc=1;function _o({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let i,s;Sr(t<=Eo*1e3,"Spring duration must be 10 seconds or less");let o=1-e;o=Mt(kc,Cc,o),t=Mt(xc,Eo,t/1e3),o<1?(i=a=>{let h=a*o,d=h*t,f=h-r,p=Er(a,o),y=Math.exp(-d);return hi-f/p*y},s=a=>{let d=a*o*t,f=d*r+r,p=Math.pow(o,2)*Math.pow(a,2)*t,y=Math.exp(-d),E=Er(Math.pow(a,2),o);return(-i(a)+hi>0?-1:1)*((f-p)*y)/E}):(i=a=>{let h=Math.exp(-a*t),d=(a-r)*t+1;return-hi+h*d},s=a=>{let h=Math.exp(-a*t),d=(r-a)*(t*t);return h*d});let c=5/t,l=Sc(i,s,c);if(t=t*1e3,isNaN(l))return{stiffness:100,damping:10,duration:t};{let a=Math.pow(l,2)*n;return{stiffness:a,damping:o*2*Math.sqrt(n*a),duration:t}}}var $c=12;function Sc(t,e,r){let n=r;for(let i=1;i<$c;i++)n=n-t(n)/e(n);return n}function Er(t,e){return t*Math.sqrt(1-e*e)}var Ec=["duration","bounce"],_c=["stiffness","damping","mass"];function Mo(t,e){return e.some(r=>t[r]!==void 0)}function Mc(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!Mo(t,_c)&&Mo(t,Ec)){let r=_o(t);e=Object.assign(Object.assign(Object.assign({},e),r),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function _r(t){var{from:e=0,to:r=1,restSpeed:n=2,restDelta:i}=t,s=$r(t,["from","to","restSpeed","restDelta"]);let o={done:!1,value:e},{stiffness:c,damping:l,mass:a,velocity:h,duration:d,isResolvedFromDuration:f}=Mc(s),p=Io,y=Io;function E(){let b=h?-(h/1e3):0,x=r-e,w=l/(2*Math.sqrt(c*a)),$=Math.sqrt(c/a)/1e3;if(i===void 0&&(i=Math.min(Math.abs(r-e)/100,.4)),w<1){let S=Er($,w);p=T=>{let U=Math.exp(-w*$*T);return r-U*((b+w*$*x)/S*Math.sin(S*T)+x*Math.cos(S*T))},y=T=>{let U=Math.exp(-w*$*T);return w*$*U*(Math.sin(S*T)*(b+w*$*x)/S+x*Math.cos(S*T))-U*(Math.cos(S*T)*(b+w*$*x)-S*x*Math.sin(S*T))}}else if(w===1)p=S=>r-Math.exp(-$*S)*(x+(b+$*x)*S);else{let S=$*Math.sqrt(w*w-1);p=T=>{let U=Math.exp(-w*$*T),B=Math.min(S*T,300);return r-U*((b+w*$*x)*Math.sinh(B)+S*x*Math.cosh(B))/S}}}return E(),{next:b=>{let x=p(b);if(f)o.done=b>=d;else{let w=y(b)*1e3,$=Math.abs(w)<=n,S=Math.abs(r-x)<=i;o.done=$&&S}return o.value=o.done?r:x,o},flipTarget:()=>{h=-h,[e,r]=[r,e],E()}}}_r.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";var Io=t=>0;var di=(t,e,r)=>{let n=e-t;return n===0?1:(r-t)/n};var nt=(t,e,r)=>-r*t+r*e+t;var Mr=(t,e)=>r=>Math.max(Math.min(r,e),t),ye=t=>t%1?Number(t.toFixed(5)):t,it=/(-)?([\d]*\.?[\d])+/g,Ir=/(#[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,Ao=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function pe(t){return typeof t=="string"}var st={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ar=Object.assign(Object.assign({},st),{transform:Mr(0,1)}),P0=Object.assign(Object.assign({},st),{default:1});var It=t=>({test:e=>pe(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),q0=It("deg"),ot=It("%"),V0=It("px"),F0=It("vh"),N0=It("vw"),H0=Object.assign(Object.assign({},ot),{parse:t=>ot.parse(t)/100,transform:t=>ot.transform(t*100)});var at=(t,e)=>r=>!!(pe(r)&&Ao.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),Tr=(t,e,r)=>n=>{if(!pe(n))return n;let[i,s,o,c]=n.match(it);return{[t]:parseFloat(i),[e]:parseFloat(s),[r]:parseFloat(o),alpha:c!==void 0?parseFloat(c):1}};var oe={test:at("hsl","hue"),parse:Tr("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+ot.transform(ye(e))+", "+ot.transform(ye(r))+", "+ye(Ar.transform(n))+")"};var Ic=Mr(0,255),Lr=Object.assign(Object.assign({},st),{transform:t=>Math.round(Ic(t))}),X={test:at("rgb","red"),parse:Tr("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+Lr.transform(t)+", "+Lr.transform(e)+", "+Lr.transform(r)+", "+ye(Ar.transform(n))+")"};function Ac(t){let e="",r="",n="",i="";return t.length>5?(e=t.substr(1,2),r=t.substr(3,2),n=t.substr(5,2),i=t.substr(7,2)):(e=t.substr(1,1),r=t.substr(2,1),n=t.substr(3,1),i=t.substr(4,1),e+=e,r+=r,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}var lt={test:at("#"),parse:Ac,transform:X.transform};var ve={test:t=>X.test(t)||lt.test(t)||oe.test(t),parse:t=>X.test(t)?X.parse(t):oe.test(t)?oe.parse(t):lt.parse(t),transform:t=>pe(t)?t:t.hasOwnProperty("red")?X.transform(t):oe.transform(t)};var To="${c}",Lo="${n}";function Tc(t){var e,r,n,i;return isNaN(t)&&pe(t)&&((r=(e=t.match(it))===null||e===void 0?void 0:e.length)!==null&&r!==void 0?r:0)+((i=(n=t.match(Ir))===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0)>0}function jo(t){typeof t=="number"&&(t=`${t}`);let e=[],r=0,n=t.match(Ir);n&&(r=n.length,t=t.replace(Ir,To),e.push(...n.map(ve.parse)));let i=t.match(it);return i&&(t=t.replace(it,Lo),e.push(...i.map(st.parse))),{values:e,numColors:r,tokenised:t}}function Do(t){return jo(t).values}function Oo(t){let{values:e,numColors:r,tokenised:n}=jo(t),i=e.length;return s=>{let o=n;for(let c=0;c<i;c++)o=o.replace(c<r?To:Lo,c<r?ve.transform(s[c]):ye(s[c]));return o}}var Lc=t=>typeof t=="number"?0:t;function jc(t){let e=Do(t);return Oo(t)(e.map(Lc))}var jr={test:Tc,parse:Do,createTransformer:Oo,getAnimatableNone:jc};function pi(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 fi({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let i=0,s=0,o=0;if(!e)i=s=o=r;else{let c=r<.5?r*(1+e):r+e-r*e,l=2*r-c;i=pi(l,c,t+1/3),s=pi(l,c,t),o=pi(l,c,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}var Dc=(t,e,r)=>{let n=t*t,i=e*e;return Math.sqrt(Math.max(0,r*(i-n)+n))},Oc=[lt,X,oe],Uo=t=>Oc.find(e=>e.test(t)),Po=t=>`'${t}' is not an animatable color. Use the equivalent color code instead.`,Dr=(t,e)=>{let r=Uo(t),n=Uo(e);rt(!!r,Po(t)),rt(!!n,Po(e));let i=r.parse(t),s=n.parse(e);r===oe&&(i=fi(i),r=X),n===oe&&(s=fi(s),n=X);let o=Object.assign({},i);return c=>{for(let l in o)l!=="alpha"&&(o[l]=Dc(i[l],s[l],c));return o.alpha=nt(i.alpha,s.alpha,c),r.transform(o)}};var Ro=t=>typeof t=="number";var Uc=(t,e)=>r=>e(t(r)),Or=(...t)=>t.reduce(Uc);function qo(t,e){return Ro(t)?r=>nt(t,e,r):ve.test(t)?Dr(t,e):gi(t,e)}var mi=(t,e)=>{let r=[...t],n=r.length,i=t.map((s,o)=>qo(s,e[o]));return s=>{for(let o=0;o<n;o++)r[o]=i[o](s);return r}},Vo=(t,e)=>{let r=Object.assign(Object.assign({},t),e),n={};for(let i in r)t[i]!==void 0&&e[i]!==void 0&&(n[i]=qo(t[i],e[i]));return i=>{for(let s in n)r[s]=n[s](i);return r}};function Bo(t){let e=jr.parse(t),r=e.length,n=0,i=0,s=0;for(let o=0;o<r;o++)n||typeof e[o]=="number"?n++:e[o].hue!==void 0?s++:i++;return{parsed:e,numNumbers:n,numRGB:i,numHSL:s}}var gi=(t,e)=>{let r=jr.createTransformer(e),n=Bo(t),i=Bo(e);return n.numHSL===i.numHSL&&n.numRGB===i.numRGB&&n.numNumbers>=i.numNumbers?Or(mi(n.parsed,i.parsed),r):(Sr(!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 Pc=(t,e)=>r=>nt(t,e,r);function Rc(t){if(typeof t=="number")return Pc;if(typeof t=="string")return ve.test(t)?Dr:gi;if(Array.isArray(t))return mi;if(typeof t=="object")return Vo}function Bc(t,e,r){let n=[],i=r||Rc(t[0]),s=t.length-1;for(let o=0;o<s;o++){let c=i(t[o],t[o+1]);if(e){let l=Array.isArray(e)?e[o]:e;c=Or(l,c)}n.push(c)}return n}function qc([t,e],[r]){return n=>r(di(t,e,n))}function Vc(t,e){let r=t.length,n=r-1;return i=>{let s=0,o=!1;if(i<=t[0]?o=!0:i>=t[n]&&(s=n-1,o=!0),!o){let l=1;for(;l<r&&!(t[l]>i||l===n);l++);s=l-1}let c=di(t[s],t[s+1],i);return e[s](c)}}function Ur(t,e,{clamp:r=!0,ease:n,mixer:i}={}){let s=t.length;rt(s===e.length,"Both input and output ranges must be the same length"),rt(!n||!Array.isArray(n)||n.length===s-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),t[0]>t[s-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());let o=Bc(e,n,i),c=s===2?qc(t,o):Vc(t,o);return r?l=>c(Mt(t[0],t[s-1],l)):c}var At=t=>e=>1-t(1-e),Pr=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Fo=t=>e=>Math.pow(e,t),wi=t=>e=>e*e*((t+1)*e-t),No=t=>{let e=wi(t);return r=>(r*=2)<1?.5*e(r):.5*(2-Math.pow(2,-10*(r-1)))};var Ho=1.525,Fc=4/11,Nc=8/11,Hc=9/10;var zo=Fo(2),Zf=At(zo),Wo=Pr(zo),zc=t=>1-Math.sin(Math.acos(t)),Wc=At(zc),Jf=Pr(Wc),Go=wi(Ho),Kf=At(Go),Yf=Pr(Go),Qf=No(Ho),Gc=4356/361,Zc=35442/1805,Jc=16061/1805,Kc=t=>{if(t===1||t===0)return t;let e=t*t;return t<Fc?7.5625*e:t<Nc?9.075*e-9.9*t+3.4:t<Hc?Gc*e-Zc*t+Jc:10.8*t*t-20.52*t+10.72},Xf=At(Kc);function Yc(t,e){return t.map(()=>e||Wo).splice(0,t.length-1)}function Qc(t){let e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function Xc(t,e){return t.map(r=>r*e)}function Tt({from:t=0,to:e=1,ease:r,offset:n,duration:i=300}){let s={done:!1,value:t},o=Array.isArray(e)?e:[t,e],c=Xc(n&&n.length===o.length?n:Qc(o),i);function l(){return Ur(c,o,{ease:Array.isArray(r)?r:Yc(o,r)})}let a=l();return{next:h=>(s.value=a(h),s.done=h>=i,s),flipTarget:()=>{o.reverse(),a=l()}}}function Zo({velocity:t=0,from:e=0,power:r=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:s}){let o={done:!1,value:e},c=r*t,l=e+c,a=s===void 0?l:s(l);return a!==l&&(c=a-e),{next:h=>{let d=-c*Math.exp(-h/n);return o.done=!(d>i||d<-i),o.value=o.done?a:a+d,o},flipTarget:()=>{}}}var Jo={keyframes:Tt,spring:_r,decay:Zo};function Ko(t){if(Array.isArray(t.to))return Tt;if(Jo[t.type])return Jo[t.type];let e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Tt:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?_r:Tt}var yi=16.666666666666668,eu=typeof performance<"u"?()=>performance.now():()=>Date.now(),vi=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(eu()),yi);function Yo(t){let e=[],r=[],n=0,i=!1,s=!1,o=new WeakSet,c={schedule:(l,a=!1,h=!1)=>{let d=h&&i,f=d?e:r;return a&&o.add(l),f.indexOf(l)===-1&&(f.push(l),d&&i&&(n=e.length)),l},cancel:l=>{let a=r.indexOf(l);a!==-1&&r.splice(a,1),o.delete(l)},process:l=>{if(i){s=!0;return}if(i=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let a=0;a<n;a++){let h=e[a];h(l),o.has(h)&&(c.schedule(h),t())}i=!1,s&&(s=!1,c.process(l))}};return c}var tu=40,bi=!0,jt=!1,xi=!1,Lt={delta:0,timestamp:0},Dt=["read","update","preRender","render","postRender"],Rr=Dt.reduce((t,e)=>(t[e]=Yo(()=>jt=!0),t),{}),ru=Dt.reduce((t,e)=>{let r=Rr[e];return t[e]=(n,i=!1,s=!1)=>(jt||iu(),r.schedule(n,i,s)),t},{}),Qo=Dt.reduce((t,e)=>(t[e]=Rr[e].cancel,t),{}),p2=Dt.reduce((t,e)=>(t[e]=()=>Rr[e].process(Lt),t),{}),nu=t=>Rr[t].process(Lt),Xo=t=>{jt=!1,Lt.delta=bi?yi:Math.max(Math.min(t-Lt.timestamp,tu),1),Lt.timestamp=t,xi=!0,Dt.forEach(nu),xi=!1,jt&&(bi=!1,vi(Xo))},iu=()=>{jt=!0,bi=!0,xi||vi(Xo)};var ea=ru;function ki(t,e,r=0){return t-e-r}function ta(t,e,r=0,n=!0){return n?ki(e+-t,e,r):e-(t-e)+r}function ra(t,e,r,n){return n?t>=e+r:t<=-r}var su=t=>{let e=({delta:r})=>t(r);return{start:()=>ea.update(e,!0),stop:()=>Qo.update(e)}};function Ci(t){var e,r,{from:n,autoplay:i=!0,driver:s=su,elapsed:o=0,repeat:c=0,repeatType:l="loop",repeatDelay:a=0,onPlay:h,onStop:d,onComplete:f,onRepeat:p,onUpdate:y}=t,E=$r(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:b}=E,x,w=0,$=E.duration,S,T=!1,U=!0,B,M=Ko(E);!((r=(e=M).needsInterpolation)===null||r===void 0)&&r.call(e,n,b)&&(B=Ur([0,100],[n,b],{clamp:!1}),n=0,b=100);let q=M(Object.assign(Object.assign({},E),{from:n,to:b}));function N(){w++,l==="reverse"?(U=w%2===0,o=ta(o,$,a,U)):(o=ki(o,$,a),l==="mirror"&&q.flipTarget()),T=!1,p&&p()}function Zr(){x.stop(),f&&f()}function xe(j){if(U||(j=-j),o+=j,!T){let V=q.next(Math.max(0,o));S=V.value,B&&(S=B(S)),T=U?V.done:o<=0}y?.(S),T&&(w===0&&($??($=o)),w<c?ra(o,$,a,U)&&N():Zr())}function qt(){h?.(),x=s(xe),x.start()}return i&&qt(),{stop:()=>{d?.(),x.stop()}}}var Ot=class t extends C(v){static properties={product:{type:Object},labels:{type:Object},_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._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`
1735
- <div class="my-2 w-full rounded-3xl border bg-white p-4">
2004
+ `}};customElements.get("mw-product-card-horizontal")||customElements.define("mw-product-card-horizontal",di);function Er(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}var _r=function(){},et=function(){};var It=(t,e,r)=>Math.min(Math.max(r,t),e);var hi=.001,Ec=.01,Ao=10,_c=.05,Mc=1;function To({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let i,s;_r(t<=Ao*1e3,"Spring duration must be 10 seconds or less");let o=1-e;o=It(_c,Mc,o),t=It(Ec,Ao,t/1e3),o<1?(i=c=>{let u=c*o,h=u*t,p=u-r,y=Mr(c,o),g=Math.exp(-h);return hi-p/y*g},s=c=>{let h=c*o*t,p=h*r+r,y=Math.pow(o,2)*Math.pow(c,2)*t,g=Math.exp(-h),$=Mr(Math.pow(c,2),o);return(-i(c)+hi>0?-1:1)*((p-y)*g)/$}):(i=c=>{let u=Math.exp(-c*t),h=(c-r)*t+1;return-hi+u*h},s=c=>{let u=Math.exp(-c*t),h=(r-c)*(t*t);return u*h});let a=5/t,l=Ac(i,s,a);if(t=t*1e3,isNaN(l))return{stiffness:100,damping:10,duration:t};{let c=Math.pow(l,2)*n;return{stiffness:c,damping:o*2*Math.sqrt(n*c),duration:t}}}var Ic=12;function Ac(t,e,r){let n=r;for(let i=1;i<Ic;i++)n=n-t(n)/e(n);return n}function Mr(t,e){return t*Math.sqrt(1-e*e)}var Tc=["duration","bounce"],Lc=["stiffness","damping","mass"];function Lo(t,e){return e.some(r=>t[r]!==void 0)}function jc(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!Lo(t,Lc)&&Lo(t,Tc)){let r=To(t);e=Object.assign(Object.assign(Object.assign({},e),r),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function Ir(t){var{from:e=0,to:r=1,restSpeed:n=2,restDelta:i}=t,s=Er(t,["from","to","restSpeed","restDelta"]);let o={done:!1,value:e},{stiffness:a,damping:l,mass:c,velocity:u,duration:h,isResolvedFromDuration:p}=jc(s),y=jo,g=jo;function $(){let b=u?-(u/1e3):0,S=r-e,w=l/(2*Math.sqrt(a*c)),x=Math.sqrt(a/c)/1e3;if(i===void 0&&(i=Math.min(Math.abs(r-e)/100,.4)),w<1){let E=Mr(x,w);y=T=>{let U=Math.exp(-w*x*T);return r-U*((b+w*x*S)/E*Math.sin(E*T)+S*Math.cos(E*T))},g=T=>{let U=Math.exp(-w*x*T);return w*x*U*(Math.sin(E*T)*(b+w*x*S)/E+S*Math.cos(E*T))-U*(Math.cos(E*T)*(b+w*x*S)-E*S*Math.sin(E*T))}}else if(w===1)y=E=>r-Math.exp(-x*E)*(S+(b+x*S)*E);else{let E=x*Math.sqrt(w*w-1);y=T=>{let U=Math.exp(-w*x*T),B=Math.min(E*T,300);return r-U*((b+w*x*S)*Math.sinh(B)+E*S*Math.cosh(B))/E}}}return $(),{next:b=>{let S=y(b);if(p)o.done=b>=h;else{let w=g(b)*1e3,x=Math.abs(w)<=n,E=Math.abs(r-S)<=i;o.done=x&&E}return o.value=o.done?r:S,o},flipTarget:()=>{u=-u,[e,r]=[r,e],$()}}}Ir.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";var jo=t=>0;var pi=(t,e,r)=>{let n=e-t;return n===0?1:(r-t)/n};var tt=(t,e,r)=>-r*t+r*e+t;var Ar=(t,e)=>r=>Math.max(Math.min(r,e),t),ye=t=>t%1?Number(t.toFixed(5)):t,rt=/(-)?([\d]*\.?[\d])+/g,Tr=/(#[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,Do=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function pe(t){return typeof t=="string"}var nt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Lr=Object.assign(Object.assign({},nt),{transform:Ar(0,1)}),x1=Object.assign(Object.assign({},nt),{default:1});var At=t=>({test:e=>pe(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),$1=At("deg"),it=At("%"),S1=At("px"),E1=At("vh"),_1=At("vw"),M1=Object.assign(Object.assign({},it),{parse:t=>it.parse(t)/100,transform:t=>it.transform(t*100)});var st=(t,e)=>r=>!!(pe(r)&&Do.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),jr=(t,e,r)=>n=>{if(!pe(n))return n;let[i,s,o,a]=n.match(rt);return{[t]:parseFloat(i),[e]:parseFloat(s),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}};var le={test:st("hsl","hue"),parse:jr("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+it.transform(ye(e))+", "+it.transform(ye(r))+", "+ye(Lr.transform(n))+")"};var Dc=Ar(0,255),Dr=Object.assign(Object.assign({},nt),{transform:t=>Math.round(Dc(t))}),ee={test:st("rgb","red"),parse:jr("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+Dr.transform(t)+", "+Dr.transform(e)+", "+Dr.transform(r)+", "+ye(Lr.transform(n))+")"};function Oc(t){let e="",r="",n="",i="";return t.length>5?(e=t.substr(1,2),r=t.substr(3,2),n=t.substr(5,2),i=t.substr(7,2)):(e=t.substr(1,1),r=t.substr(2,1),n=t.substr(3,1),i=t.substr(4,1),e+=e,r+=r,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}var ot={test:st("#"),parse:Oc,transform:ee.transform};var ve={test:t=>ee.test(t)||ot.test(t)||le.test(t),parse:t=>ee.test(t)?ee.parse(t):le.test(t)?le.parse(t):ot.parse(t),transform:t=>pe(t)?t:t.hasOwnProperty("red")?ee.transform(t):le.transform(t)};var Oo="${c}",Uo="${n}";function Uc(t){var e,r,n,i;return isNaN(t)&&pe(t)&&((r=(e=t.match(rt))===null||e===void 0?void 0:e.length)!==null&&r!==void 0?r:0)+((i=(n=t.match(Tr))===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0)>0}function Po(t){typeof t=="number"&&(t=`${t}`);let e=[],r=0,n=t.match(Tr);n&&(r=n.length,t=t.replace(Tr,Oo),e.push(...n.map(ve.parse)));let i=t.match(rt);return i&&(t=t.replace(rt,Uo),e.push(...i.map(nt.parse))),{values:e,numColors:r,tokenised:t}}function Ro(t){return Po(t).values}function Bo(t){let{values:e,numColors:r,tokenised:n}=Po(t),i=e.length;return s=>{let o=n;for(let a=0;a<i;a++)o=o.replace(a<r?Oo:Uo,a<r?ve.transform(s[a]):ye(s[a]));return o}}var Pc=t=>typeof t=="number"?0:t;function Rc(t){let e=Ro(t);return Bo(t)(e.map(Pc))}var Or={test:Uc,parse:Ro,createTransformer:Bo,getAnimatableNone:Rc};function fi(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 mi({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let i=0,s=0,o=0;if(!e)i=s=o=r;else{let a=r<.5?r*(1+e):r+e-r*e,l=2*r-a;i=fi(l,a,t+1/3),s=fi(l,a,t),o=fi(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}var Bc=(t,e,r)=>{let n=t*t,i=e*e;return Math.sqrt(Math.max(0,r*(i-n)+n))},qc=[ot,ee,le],qo=t=>qc.find(e=>e.test(t)),Fo=t=>`'${t}' is not an animatable color. Use the equivalent color code instead.`,Ur=(t,e)=>{let r=qo(t),n=qo(e);et(!!r,Fo(t)),et(!!n,Fo(e));let i=r.parse(t),s=n.parse(e);r===le&&(i=mi(i),r=ee),n===le&&(s=mi(s),n=ee);let o=Object.assign({},i);return a=>{for(let l in o)l!=="alpha"&&(o[l]=Bc(i[l],s[l],a));return o.alpha=tt(i.alpha,s.alpha,a),r.transform(o)}};var Vo=t=>typeof t=="number";var Fc=(t,e)=>r=>e(t(r)),Pr=(...t)=>t.reduce(Fc);function Ho(t,e){return Vo(t)?r=>tt(t,e,r):ve.test(t)?Ur(t,e):wi(t,e)}var gi=(t,e)=>{let r=[...t],n=r.length,i=t.map((s,o)=>Ho(s,e[o]));return s=>{for(let o=0;o<n;o++)r[o]=i[o](s);return r}},zo=(t,e)=>{let r=Object.assign(Object.assign({},t),e),n={};for(let i in r)t[i]!==void 0&&e[i]!==void 0&&(n[i]=Ho(t[i],e[i]));return i=>{for(let s in n)r[s]=n[s](i);return r}};function No(t){let e=Or.parse(t),r=e.length,n=0,i=0,s=0;for(let o=0;o<r;o++)n||typeof e[o]=="number"?n++:e[o].hue!==void 0?s++:i++;return{parsed:e,numNumbers:n,numRGB:i,numHSL:s}}var wi=(t,e)=>{let r=Or.createTransformer(e),n=No(t),i=No(e);return n.numHSL===i.numHSL&&n.numRGB===i.numRGB&&n.numNumbers>=i.numNumbers?Pr(gi(n.parsed,i.parsed),r):(_r(!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 Vc=(t,e)=>r=>tt(t,e,r);function Nc(t){if(typeof t=="number")return Vc;if(typeof t=="string")return ve.test(t)?Ur:wi;if(Array.isArray(t))return gi;if(typeof t=="object")return zo}function Hc(t,e,r){let n=[],i=r||Nc(t[0]),s=t.length-1;for(let o=0;o<s;o++){let a=i(t[o],t[o+1]);if(e){let l=Array.isArray(e)?e[o]:e;a=Pr(l,a)}n.push(a)}return n}function zc([t,e],[r]){return n=>r(pi(t,e,n))}function Wc(t,e){let r=t.length,n=r-1;return i=>{let s=0,o=!1;if(i<=t[0]?o=!0:i>=t[n]&&(s=n-1,o=!0),!o){let l=1;for(;l<r&&!(t[l]>i||l===n);l++);s=l-1}let a=pi(t[s],t[s+1],i);return e[s](a)}}function Rr(t,e,{clamp:r=!0,ease:n,mixer:i}={}){let s=t.length;et(s===e.length,"Both input and output ranges must be the same length"),et(!n||!Array.isArray(n)||n.length===s-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),t[0]>t[s-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());let o=Hc(e,n,i),a=s===2?zc(t,o):Wc(t,o);return r?l=>a(It(t[0],t[s-1],l)):a}var Tt=t=>e=>1-t(1-e),Br=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Wo=t=>e=>Math.pow(e,t),yi=t=>e=>e*e*((t+1)*e-t),Go=t=>{let e=yi(t);return r=>(r*=2)<1?.5*e(r):.5*(2-Math.pow(2,-10*(r-1)))};var Zo=1.525,Gc=4/11,Zc=8/11,Kc=9/10;var Ko=Wo(2),Lf=Tt(Ko),Jo=Br(Ko),Jc=t=>1-Math.sin(Math.acos(t)),Yc=Tt(Jc),jf=Br(Yc),Yo=yi(Zo),Df=Tt(Yo),Of=Br(Yo),Uf=Go(Zo),Xc=4356/361,Qc=35442/1805,eu=16061/1805,tu=t=>{if(t===1||t===0)return t;let e=t*t;return t<Gc?7.5625*e:t<Zc?9.075*e-9.9*t+3.4:t<Kc?Xc*e-Qc*t+eu:10.8*t*t-20.52*t+10.72},Pf=Tt(tu);function ru(t,e){return t.map(()=>e||Jo).splice(0,t.length-1)}function nu(t){let e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function iu(t,e){return t.map(r=>r*e)}function Lt({from:t=0,to:e=1,ease:r,offset:n,duration:i=300}){let s={done:!1,value:t},o=Array.isArray(e)?e:[t,e],a=iu(n&&n.length===o.length?n:nu(o),i);function l(){return Rr(a,o,{ease:Array.isArray(r)?r:ru(o,r)})}let c=l();return{next:u=>(s.value=c(u),s.done=u>=i,s),flipTarget:()=>{o.reverse(),c=l()}}}function Xo({velocity:t=0,from:e=0,power:r=.8,timeConstant:n=350,restDelta:i=.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:u=>{let h=-a*Math.exp(-u/n);return o.done=!(h>i||h<-i),o.value=o.done?c:c+h,o},flipTarget:()=>{}}}var Qo={keyframes:Lt,spring:Ir,decay:Xo};function ea(t){if(Array.isArray(t.to))return Lt;if(Qo[t.type])return Qo[t.type];let e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Lt:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?Ir:Lt}var vi=16.666666666666668,su=typeof performance<"u"?()=>performance.now():()=>Date.now(),bi=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(su()),vi);function ta(t){let e=[],r=[],n=0,i=!1,s=!1,o=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{let h=u&&i,p=h?e:r;return c&&o.add(l),p.indexOf(l)===-1&&(p.push(l),h&&i&&(n=e.length)),l},cancel:l=>{let c=r.indexOf(l);c!==-1&&r.splice(c,1),o.delete(l)},process:l=>{if(i){s=!0;return}if(i=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let c=0;c<n;c++){let u=e[c];u(l),o.has(u)&&(a.schedule(u),t())}i=!1,s&&(s=!1,a.process(l))}};return a}var ou=40,xi=!0,Dt=!1,ki=!1,jt={delta:0,timestamp:0},Ot=["read","update","preRender","render","postRender"],qr=Ot.reduce((t,e)=>(t[e]=ta(()=>Dt=!0),t),{}),au=Ot.reduce((t,e)=>{let r=qr[e];return t[e]=(n,i=!1,s=!1)=>(Dt||cu(),r.schedule(n,i,s)),t},{}),ra=Ot.reduce((t,e)=>(t[e]=qr[e].cancel,t),{}),Yf=Ot.reduce((t,e)=>(t[e]=()=>qr[e].process(jt),t),{}),lu=t=>qr[t].process(jt),na=t=>{Dt=!1,jt.delta=xi?vi:Math.max(Math.min(t-jt.timestamp,ou),1),jt.timestamp=t,ki=!0,Ot.forEach(lu),ki=!1,Dt&&(xi=!1,bi(na))},cu=()=>{Dt=!0,xi=!0,ki||bi(na)};var ia=au;function Ci(t,e,r=0){return t-e-r}function sa(t,e,r=0,n=!0){return n?Ci(e+-t,e,r):e-(t-e)+r}function oa(t,e,r,n){return n?t>=e+r:t<=-r}var uu=t=>{let e=({delta:r})=>t(r);return{start:()=>ia.update(e,!0),stop:()=>ra.update(e)}};function $i(t){var e,r,{from:n,autoplay:i=!0,driver:s=uu,elapsed:o=0,repeat:a=0,repeatType:l="loop",repeatDelay:c=0,onPlay:u,onStop:h,onComplete:p,onRepeat:y,onUpdate:g}=t,$=Er(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:b}=$,S,w=0,x=$.duration,E,T=!1,U=!0,B,M=ea($);!((r=(e=M).needsInterpolation)===null||r===void 0)&&r.call(e,n,b)&&(B=Rr([0,100],[n,b],{clamp:!1}),n=0,b=100);let q=M(Object.assign(Object.assign({},$),{from:n,to:b}));function H(){w++,l==="reverse"?(U=w%2===0,o=sa(o,x,c,U)):(o=Ci(o,x,c),l==="mirror"&&q.flipTarget()),T=!1,y&&y()}function Jr(){S.stop(),p&&p()}function xe(D){if(U||(D=-D),o+=D,!T){let F=q.next(Math.max(0,o));E=F.value,B&&(E=B(E)),T=U?F.done:o<=0}g?.(E),T&&(w===0&&(x??(x=o)),w<a?oa(o,x,c,U)&&H():Jr())}function Ft(){u?.(),S=s(xe),S.start()}return i&&Ft(),{stop:()=>{h?.(),S.stop()}}}var Ut=class t extends C(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 d`
2005
+ <div class="${this.darkMode?"dark border-gray-600 bg-[#1E1F23]":"border-[#5e5d59]/25 bg-white"} my-2 w-full rounded-3xl border p-4">
1736
2006
  <div class="relative mx-auto mb-4 max-w-[240px]">
1737
- <div class="h-[180px] w-full animate-pulse rounded-2xl bg-gray-200"></div>
2007
+ <div class="h-[180px] w-full animate-pulse rounded-2xl bg-gray-200 dark:bg-gray-700"></div>
1738
2008
  </div>
1739
2009
  <div class="mb-2 flex items-end justify-between">
1740
2010
  <div>
1741
- <div class="mb-1 h-4 w-20 animate-pulse rounded bg-gray-200"></div>
1742
- <div class="h-6 w-32 animate-pulse rounded bg-gray-200"></div>
2011
+ <div class="mb-1 h-4 w-20 animate-pulse rounded bg-gray-200 dark:bg-gray-700"></div>
2012
+ <div class="h-6 w-32 animate-pulse rounded bg-gray-200 dark:bg-gray-700"></div>
1743
2013
  </div>
1744
- <div class="h-6 w-16 animate-pulse rounded bg-gray-200"></div>
2014
+ <div class="h-6 w-16 animate-pulse rounded bg-gray-200 dark:bg-gray-700"></div>
1745
2015
  </div>
1746
- <div class="mb-4 h-4 w-3/4 animate-pulse rounded bg-gray-200"></div>
1747
- <div class="my-4 border-t border-gray-200"></div>
2016
+ <div class="mb-4 h-4 w-3/4 animate-pulse rounded bg-gray-200 dark:bg-gray-700"></div>
2017
+ <div class="my-4 border-t border-[#5e5d59]/25 dark:border-gray-600"></div>
1748
2018
  <div class="flex items-end justify-between gap-3">
1749
- <div class="h-6 w-16 animate-pulse rounded bg-gray-200"></div>
1750
- <div class="h-8 flex-auto animate-pulse rounded-xl bg-gray-200"></div>
2019
+ <div class="h-6 w-16 animate-pulse rounded bg-gray-200 dark:bg-gray-700"></div>
2020
+ <div class="h-8 flex-auto animate-pulse rounded-xl bg-gray-200 dark:bg-gray-700"></div>
1751
2021
  </div>
1752
2022
  </div>
1753
- `;if(this.product.layout==="horizontal")return u` <mw-product-card-horizontal product="${JSON.stringify(this.product)}"></mw-product-card-horizontal> `;let{name:e,description:r,price:n,category:i}=this.product;return u`
1754
- <div class="my-2 w-full rounded-3xl border-[0.5px] border-[#5e5d59]/25 bg-white p-4 hover:shadow-sm">
2023
+ `;if(this.product.layout==="horizontal")return d` <mw-product-card-horizontal product="${JSON.stringify(this.product)}" ?dark-mode="${this.darkMode}"></mw-product-card-horizontal> `;let{name:e,description:r,price:n,category:i}=this.product;return d`
2024
+ <div class="${this.darkMode?"dark border-gray-600 bg-[#1E1F23]":"border-[#5e5d59]/25 bg-white"} my-2 w-full rounded-3xl border-[0.5px] p-4 hover:shadow-sm">
1755
2025
  <div class="pointer-events-auto mx-auto mb-4">
1756
2026
  <div class="group relative overflow-hidden rounded-2xl">
1757
2027
  <div class="image-slider z-0 flex transition-transform duration-300 ease-in-out" style="transform: translateX(-${this._currentImageIndex*100}%)">
1758
- ${this.images.length>0?Q(this.images,s=>s,(s,o)=>u`
2028
+ ${this.images.length>0?Q(this.images,s=>s,(s,o)=>d`
1759
2029
  <!-- TODO: add srcset with 1x/2x variants for high DPI displays -->
1760
2030
  <img src="${s}" alt="image ${o+1}: ${e}" class="h-auto w-full flex-shrink-0 object-scale-down" loading="lazy" />
1761
- `):u`
2031
+ `):d`
1762
2032
  <div class="h-full w-full flex-shrink-0 object-scale-down"></div>
1763
2033
  <svg class="rounded-lg" height="144" viewBox="0 0 100 133" fill="none" xmlns="http://www.w3.org/2000/svg">
1764
2034
  <rect width="100" height="133" rx="2" fill="#EEEEEE" style="" transform="matrix(0.9999999999999999, 0, 0, 0.9999999999999999, 0, -7.105427357601002e-15)" />
@@ -1770,41 +2040,43 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1770
2040
  </svg>
1771
2041
  `}
1772
2042
  </div>
1773
- ${this.images.length>1?u`
2043
+ ${this.images.length>1?d`
1774
2044
  <div class="absolute inset-0 flex items-center justify-between px-4">
1775
2045
  <button
1776
2046
  @click="${this.#s}"
1777
- class="bg-opacity-80 hover:bg-opacity-100 absolute top-1/2 left-2 flex h-5 w-5 -translate-y-1/2 items-center justify-center rounded-full bg-white shadow transition-all">
2047
+ class="bg-opacity-80 hover:bg-opacity-100 absolute top-1/2 left-2 flex h-5 w-5 -translate-y-1/2 items-center justify-center rounded-full bg-white shadow transition-all dark:bg-gray-700">
1778
2048
  <hi-outline class="block h-6 w-3" name="chevron-left"></hi-outline>
1779
2049
  </button>
1780
2050
  <button
1781
2051
  @click="${this.#i}"
1782
- class="bg-opacity-80 hover:bg-opacity-100 absolute top-1/2 right-2 flex h-5 w-5 -translate-y-1/2 items-center justify-center rounded-full bg-white shadow transition-all">
2052
+ class="bg-opacity-80 hover:bg-opacity-100 absolute top-1/2 right-2 flex h-5 w-5 -translate-y-1/2 items-center justify-center rounded-full bg-white shadow transition-all dark:bg-gray-700">
1783
2053
  <hi-outline class="block h-6 w-3" name="chevron-right"></hi-outline>
1784
2054
  </button>
1785
2055
  </div>
1786
2056
  `:null}
1787
- ${this.images?.length>1?u`
2057
+ ${this.images?.length>1?d`
1788
2058
  <div class="slider-dots absolute bottom-3 left-1/2 flex -translate-x-1/2 gap-2">
1789
- ${this.images.map((s,o)=>u`
2059
+ ${this.images.map((s,o)=>d`
1790
2060
  <button
1791
2061
  @click="${()=>this.#o(o)}"
1792
- class="${o===this._currentImageIndex?"bg-opacity-100":"bg-opacity-60"} hover:bg-opacity-80 h-1.5 w-1.5 rounded-full bg-white transition-all"></button>
2062
+ class="${o===this._currentImageIndex?"bg-opacity-100":"bg-opacity-60"} hover:bg-opacity-80 h-1.5 w-1.5 rounded-full bg-white transition-all dark:bg-gray-400"></button>
1793
2063
  `)}
1794
2064
  </div>
1795
2065
  `:null}
1796
2066
  </div>
1797
2067
  </div>
1798
2068
  <div @click="${this.#t}" class="cursor-pointer">
1799
- ${i?u`<a @click="${this.#t}" class="${this._isValidUrl?"":"pointer-events-none"} line-clamp-1 text-xs text-gray-600 hover:underline"> ${i} </a>`:null}
2069
+ ${i?d`<a @click="${this.#t}" class="${this._isValidUrl?"":"pointer-events-none"} line-clamp-1 text-xs text-gray-600 hover:underline dark:text-gray-400">
2070
+ ${i}
2071
+ </a>`:null}
1800
2072
 
1801
2073
  <h3
1802
2074
  @click="${this.#t}"
1803
- class="${this._isValidUrl?"":"pointer-events-none cursor-default"} mb-1 line-clamp-2 cursor-pointer text-lg font-semibold transition-all hover:underline">
1804
- ${e||u`<span class="inline-block h-6 w-32 animate-pulse rounded bg-gray-200"></span>`}
2075
+ class="${this._isValidUrl?"":"pointer-events-none cursor-default"} mb-1 line-clamp-2 cursor-pointer text-lg font-semibold text-black transition-all hover:underline dark:text-gray-200">
2076
+ ${e||d`<span class="inline-block h-6 w-32 animate-pulse rounded bg-gray-200 dark:bg-gray-700"></span>`}
1805
2077
  </h3>
1806
- ${r?u`<p class="mb-2 line-clamp-2 text-sm text-gray-600">${r}</p>`:u`<div class="mb-2 h-4 w-3/4 animate-pulse rounded bg-gray-200"></div>`}
1807
- <span class="text-lg font-bold"> ${n||u`<span class="inline-block h-6 w-16 animate-pulse rounded bg-gray-200"></span>`} </span>
2078
+ ${r?d`<p class="mb-2 line-clamp-2 text-sm text-gray-600 dark:text-gray-400">${r}</p>`:d`<div class="mb-2 h-4 w-3/4 animate-pulse rounded bg-gray-200 dark:bg-gray-700"></div>`}
2079
+ <span class="text-lg font-bold text-black dark:text-gray-200"> ${n||d`<span class="inline-block h-6 w-16 animate-pulse rounded bg-gray-200 dark:bg-gray-700"></span>`} </span>
1808
2080
 
1809
2081
  <!-- <div class="my-4 border-t border-gray-200"></div> -->
1810
2082
 
@@ -1816,57 +2088,59 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1816
2088
  </button> -->
1817
2089
  </div>
1818
2090
  </div>
1819
- `}#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)))}#n(e,r){this.#a&&Ci({from:e,to:r,duration:300,onUpdate:n=>{this.#a&&(this.#a.style.transform=`translateX(${n}%)`)}})}#i(){if(!this.product?.images?.length)return;let e=this._currentImageIndex,r=(e+1)%this.product.images.length,n=-(e*100),i=-(r*100);this.#n(n,i),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,n=-(e*100),i=-(r*100);this.#n(n,i),this._currentImageIndex=r}#o(e){if(!this.product?.images?.length)return;let r=this._currentImageIndex,n=Math.max(0,Math.min(e,this.product.images.length-1)),i=-(r*100),s=-(n*100);this.#n(i,s),this._currentImageIndex=n}get#a(){return this.renderRoot.querySelector(".image-slider")}};Ot.AddToCartEvent=class extends CustomEvent{static type="mw-product-card:add-to-cart";constructor(e,r={}){super(Ot.AddToCartEvent.type,{detail:{product:e},...r})}};customElements.get("mw-product-card")||customElements.define("mw-product-card",Ot);function ct(t){return Array.isArray(t)?t:t?[t]:[]}function na(t,e){let r=new Map;for(let n of t){let i=e(n);r.has(i)||r.set(i,[]),(r.get(i)||[]).push(n)}return r}var Br=(t,e,r)=>{for(let n of e)if(n[0]===t)return(0,n[1])();return r?.()};var $i=class extends C(v){static properties={orderDetails:{type:Object,attribute:"order-details"},streaming:{type:Boolean},linksNewTab:{type:Boolean,attribute:"links-new-tab"},color:{type:String}};constructor(){super(),this.orderDetails=null,this.streaming=!1,this.linksNewTab=!1,this.color="#601feb"}render(){let e=ct(this.orderDetails?.order_status?.step||[]),r=ct(this.orderDetails?.items?.item||[]),n=ct(this.orderDetails?.actions||[]);return u`
1820
- <div class="flex w-full max-w-md flex-col rounded-3xl border bg-white p-4">
2091
+ `}#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)))}#n(e,r){this.#a&&$i({from:e,to:r,duration:300,onUpdate:n=>{this.#a&&(this.#a.style.transform=`translateX(${n}%)`)}})}#i(){if(!this.product?.images?.length)return;let e=this._currentImageIndex,r=(e+1)%this.product.images.length,n=-(e*100),i=-(r*100);this.#n(n,i),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,n=-(e*100),i=-(r*100);this.#n(n,i),this._currentImageIndex=r}#o(e){if(!this.product?.images?.length)return;let r=this._currentImageIndex,n=Math.max(0,Math.min(e,this.product.images.length-1)),i=-(r*100),s=-(n*100);this.#n(i,s),this._currentImageIndex=n}get#a(){return this.renderRoot.querySelector(".image-slider")}};Ut.AddToCartEvent=class extends CustomEvent{static type="mw-product-card:add-to-cart";constructor(e,r={}){super(Ut.AddToCartEvent.type,{detail:{product:e},...r})}};customElements.get("mw-product-card")||customElements.define("mw-product-card",Ut);function at(t){return Array.isArray(t)?t:t?[t]:[]}function aa(t,e){let r=new Map;for(let n of t){let i=e(n);r.has(i)||r.set(i,[]),(r.get(i)||[]).push(n)}return r}var Fr=(t,e,r)=>{for(let n of e)if(n[0]===t)return(0,n[1])();return r?.()};var Si=class extends C(v){static properties={orderDetails:{type:Object,attribute:"order-details"},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=at(this.orderDetails?.order_status?.step||[]),r=at(this.orderDetails?.items?.item||[]),n=at(this.orderDetails?.actions||[]);return d`
2092
+ <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">
1821
2093
  <!-- Header with order ID -->
1822
2094
  <div class="mb-2">
1823
- ${this.orderDetails?.order_id?.label||!this.streaming?u`<h2 class="text-lg font-semibold">${this.orderDetails?.order_id?.label} ${this.orderDetails?.order_id?.value}</h2>`:u`<div class="h-7 w-full animate-pulse rounded bg-gray-200"></div>`}
2095
+ ${this.orderDetails?.order_id?.label||!this.streaming?d`<h2 class="text-lg font-semibold text-gray-900 dark:text-white">${this.orderDetails?.order_id?.label} ${this.orderDetails?.order_id?.value}</h2>`:d`<div class="h-7 w-full animate-pulse rounded bg-gray-200 dark:bg-gray-600"></div>`}
1824
2096
  </div>
1825
2097
 
1826
2098
  <!-- Progress Timeline -->
1827
2099
  <div>
1828
2100
  <ol role="list" class="w-full overflow-hidden">
1829
- ${this.streaming&&!this.orderDetails?u`
2101
+ ${this.streaming&&!this.orderDetails?d`
1830
2102
  <!-- Loading for status timeline -->
1831
- ${[1,2,3].map((i,s)=>u`
2103
+ ${[1,2,3].map((i,s)=>d`
1832
2104
  <li class="w-full pb-8">
1833
- ${s<2?u`<div class="absolute top-2 left-2 mt-0.5 -ml-px h-full w-0.5 animate-pulse bg-gray-200" aria-hidden="true"></div>`:""}
2105
+ ${s<2?d`<div class="absolute top-2 left-2 mt-0.5 -ml-px h-full w-0.5 animate-pulse bg-gray-200 dark:bg-gray-600" aria-hidden="true"></div>`:""}
1834
2106
  <div class="group relative flex items-start">
1835
2107
  <span class="flex h-6 items-center">
1836
- <span class="h-4 w-4 animate-pulse rounded-full bg-gray-200"></span>
2108
+ <span class="h-4 w-4 animate-pulse rounded-full bg-gray-200 dark:bg-gray-600"></span>
1837
2109
  </span>
1838
2110
  <span class="ml-3 flex min-w-0 flex-col">
1839
- <span class="h-5 w-24 animate-pulse rounded bg-gray-200"></span>
2111
+ <span class="h-5 w-24 animate-pulse rounded bg-gray-200 dark:bg-gray-600"></span>
1840
2112
  </span>
1841
2113
  </div>
1842
2114
  </li>
1843
2115
  `)}
1844
- `:Q(e,i=>i.label,(i,s)=>{let o=i.status==="completed",c=i.status==="in_progress",l=s===e.length-1;return u`<li class="relative pb-4">
1845
- ${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"}`}" aria-hidden="true"></div>`}
2116
+ `:Q(e,i=>i.label,(i,s)=>{let o=i.status==="completed",a=i.status==="in_progress",l=s===e.length-1;return d`<li class="relative pb-4">
2117
+ ${l?"":d`<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>`}
1846
2118
 
1847
2119
  <div class="group relative flex items-start">
1848
- ${Br(i.status,[["pending",()=>u` <span class="flex h-6 items-center">
1849
- <span class="flex h-4 w-4 items-center justify-center rounded-full border-2 border-gray-300 bg-white">
2120
+ ${Fr(i.status,[["pending",()=>d` <span class="flex h-6 items-center">
2121
+ <span class="flex h-4 w-4 items-center justify-center rounded-full border-2 border-gray-300 bg-white dark:border-gray-500 dark:bg-[#1E1F23]">
1850
2122
  <span class="h-1.5 w-1.5 rounded-full bg-transparent"></span>
1851
2123
  </span>
1852
- </span>`],["in_progress",()=>u`<span class="flex h-6 items-center">
1853
- <span class="flex h-4 w-4 items-center justify-center rounded-full border-2 border-[${this.color}] bg-white">
2124
+ </span>`],["in_progress",()=>d`<span class="flex h-6 items-center">
2125
+ <span class="flex h-4 w-4 items-center justify-center rounded-full border-2 border-[${this.color}] bg-white dark:bg-[#1E1F23]">
1854
2126
  <span class="h-1.5 w-1.5 rounded-full bg-[${this.color}]"></span>
1855
2127
  </span>
1856
- </span>`],["completed",()=>u`
2128
+ </span>`],["completed",()=>d`
1857
2129
  <span class="flex h-6 items-center">
1858
2130
  <span class="flex h-4 w-4 items-center justify-center rounded-full bg-[${this.color}]">
1859
- <hi-outline class="mb-3 block h-3 w-3 text-white" name="check"></hi-outline>
2131
+ <hi-outline class="mb-3 block h-3 w-3 text-white dark:text-gray-800" name="check"></hi-outline>
1860
2132
  </span>
1861
2133
  </span>
1862
- `]],()=>u`<span class="flex h-6 items-center">
1863
- <span class="flex h-4 w-4 items-center justify-center rounded-full border-2 border-[${this.color}] bg-white">
2134
+ `]],()=>d`<span class="flex h-6 items-center">
2135
+ <span class="flex h-4 w-4 items-center justify-center rounded-full border-2 border-[${this.color}] bg-white dark:bg-[#1E1F23]">
1864
2136
  <span class="h-1.5 w-1.5 rounded-full bg-[${this.color}]"></span>
1865
2137
  </span>
1866
2138
  </span>`)}
1867
2139
 
1868
2140
  <span class="ml-3 flex min-w-0 flex-col">
1869
- <span class="${`text-sm font-medium ${c?`text-[${this.color}]`:o?"text-gray-900":"text-gray-500"}`}"> ${i.label} </span>
2141
+ <span class="${`text-sm font-medium ${a?`text-[${this.color}]`:o?"text-gray-900 dark:text-gray-100":"text-gray-500 dark:text-gray-400"}`}">
2142
+ ${i.label}
2143
+ </span>
1870
2144
  </span>
1871
2145
  </div>
1872
2146
  </li>`})}
@@ -1875,48 +2149,48 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1875
2149
 
1876
2150
  <!-- Products list with order items -->
1877
2151
  <div class="mb-2 w-full">
1878
- ${r.length===0&&!this.orderDetails?.total?.amount&&this.streaming?u`
2152
+ ${r.length===0&&!this.orderDetails?.total?.amount&&this.streaming?d`
1879
2153
  <!-- Loading shimmer for products -->
1880
2154
  <div class="w-full space-y-4">
1881
2155
  <div class="flex items-center gap-2">
1882
- <div class="h-12 w-12 animate-pulse rounded-lg bg-gray-200"></div>
2156
+ <div class="h-12 w-12 animate-pulse rounded-lg bg-gray-200 dark:bg-gray-600"></div>
1883
2157
  <div class="flex-1 space-y-2">
1884
- <div class="h-4 w-32 animate-pulse rounded bg-gray-200"></div>
1885
- <div class="h-4 w-24 animate-pulse rounded bg-gray-200"></div>
2158
+ <div class="h-4 w-32 animate-pulse rounded bg-gray-200 dark:bg-gray-600"></div>
2159
+ <div class="h-4 w-24 animate-pulse rounded bg-gray-200 dark:bg-gray-600"></div>
1886
2160
  </div>
1887
2161
  </div>
1888
2162
  <div class="flex items-center justify-between">
1889
- <div class="h-4 w-12 animate-pulse rounded bg-gray-200"></div>
1890
- <div class="h-4 w-10 animate-pulse rounded bg-gray-200"></div>
2163
+ <div class="h-4 w-12 animate-pulse rounded bg-gray-200 dark:bg-gray-600"></div>
2164
+ <div class="h-4 w-10 animate-pulse rounded bg-gray-200 dark:bg-gray-600"></div>
1891
2165
  </div>
1892
2166
  </div>
1893
- `:u`
1894
- <div class="divide-y divide-gray-100">
1895
- ${this.streaming&&!r.length?u`
2167
+ `:d`
2168
+ <div class="divide-y divide-gray-100 dark:divide-gray-600">
2169
+ ${this.streaming&&!r.length?d`
1896
2170
  <!-- Loading shimmer for individual products -->
1897
- ${[1,2].map(()=>u`
2171
+ ${[1,2].map(()=>d`
1898
2172
  <div class="flex items-center gap-2 py-1.5">
1899
- <div class="h-12 w-12 animate-pulse rounded-lg bg-gray-200"></div>
2173
+ <div class="h-12 w-12 animate-pulse rounded-lg bg-gray-200 dark:bg-gray-600"></div>
1900
2174
  <div class="min-w-0 flex-1">
1901
- <div class="h-4 w-32 animate-pulse rounded bg-gray-200"></div>
2175
+ <div class="h-4 w-32 animate-pulse rounded bg-gray-200 dark:bg-gray-600"></div>
1902
2176
  </div>
1903
- <div class="h-4 w-24 animate-pulse rounded bg-gray-200"></div>
2177
+ <div class="h-4 w-24 animate-pulse rounded bg-gray-200 dark:bg-gray-600"></div>
1904
2178
  </div>
1905
2179
  `)}
1906
- `:r?.map(i=>{let s=i?.image_url;return u`
2180
+ `:r?.map(i=>{let s=i?.image_url;return d`
1907
2181
  <div class="flex items-center gap-2 py-1.5">
1908
- <img src="${F(s)}" class="block h-12 w-12 rounded-lg bg-gray-100 object-contain" loading="lazy" />
2182
+ <img src="${N(s)}" class="block h-12 w-12 rounded-lg bg-gray-100 object-contain dark:bg-gray-700" loading="lazy" />
1909
2183
 
1910
2184
  <div class="min-w-0 flex-1">
1911
- ${!i?.name&&this.streaming?u`<div class="h-4 w-32 animate-pulse rounded bg-gray-200"></div>`:u`<h3 class="truncate text-sm font-medium">${i?.name}</h3>`}
2185
+ ${!i?.name&&this.streaming?d`<div class="h-4 w-32 animate-pulse rounded bg-gray-200 dark:bg-gray-600"></div>`:d`<h3 class="truncate text-sm font-medium text-gray-900 dark:text-gray-100">${i?.name}</h3>`}
1912
2186
  </div>
1913
- ${!i?.price&&this.streaming?u`<div class="h-4 w-24 animate-pulse rounded bg-gray-200"></div>`:u`<span class="text-sm text-gray-500">${i?.quantity&&Number(i.quantity)>1?"x":""} ${i?.price}</span>`}
2187
+ ${!i?.price&&this.streaming?d`<div class="h-4 w-24 animate-pulse rounded bg-gray-200 dark:bg-gray-600"></div>`:d`<span class="text-sm text-gray-500 dark:text-gray-400">${i?.quantity&&Number(i.quantity)>1?"x":""} ${i?.price}</span>`}
1914
2188
  </div>
1915
2189
  `})}
1916
2190
  </div>
1917
2191
  <!-- Order total -->
1918
- <div class="mt-1 border-t border-gray-200 pt-1">
1919
- <div class="flex justify-between font-medium">
2192
+ <div class="mt-1 border-t border-gray-200 pt-1 dark:border-gray-600">
2193
+ <div class="flex justify-between font-medium text-gray-900 dark:text-gray-100">
1920
2194
  <span>${this.orderDetails?.total?.label}</span>
1921
2195
  <span>${this.orderDetails?.total?.amount}</span>
1922
2196
  </div>
@@ -1926,57 +2200,57 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1926
2200
 
1927
2201
  <!-- Shipping and payment information -->
1928
2202
  <div class="mb-2 flex w-full flex-col gap-2 overflow-hidden">
1929
- ${this.streaming&&!this.orderDetails?u`
2203
+ ${this.streaming&&!this.orderDetails?d`
1930
2204
  <!-- Loading shimmer template -->
1931
- ${[1,2].map(()=>u`
2205
+ ${[1,2].map(()=>d`
1932
2206
  <div>
1933
- <div class="mb-2 h-5 w-32 animate-pulse rounded bg-gray-200"></div>
2207
+ <div class="mb-2 h-5 w-32 animate-pulse rounded bg-gray-200 dark:bg-gray-600"></div>
1934
2208
  <div class="space-y-2 overflow-hidden">
1935
- <div class="h-4 w-40 animate-pulse rounded bg-gray-200"></div>
1936
- <div class="h-4 w-36 animate-pulse rounded bg-gray-200"></div>
2209
+ <div class="h-4 w-40 animate-pulse rounded bg-gray-200 dark:bg-gray-600"></div>
2210
+ <div class="h-4 w-36 animate-pulse rounded bg-gray-200 dark:bg-gray-600"></div>
1937
2211
  </div>
1938
2212
  </div>
1939
2213
  `)}
1940
- `:u`
2214
+ `:d`
1941
2215
  <!-- Shipping Section -->
1942
2216
  <div>
1943
- ${this.streaming&&!this.orderDetails?.shipping?u`
2217
+ ${this.streaming&&!this.orderDetails?.shipping?d`
1944
2218
  <div>
1945
- <div class="mb-2 h-5 w-32 animate-pulse rounded bg-gray-200"></div>
2219
+ <div class="mb-2 h-5 w-32 animate-pulse rounded bg-gray-200 dark:bg-gray-600"></div>
1946
2220
  <div class="space-y-2 overflow-hidden">
1947
- <div class="h-4 w-40 animate-pulse rounded bg-gray-200"></div>
1948
- <div class="h-4 w-36 animate-pulse rounded bg-gray-200"></div>
2221
+ <div class="h-4 w-40 animate-pulse rounded bg-gray-200 dark:bg-gray-600"></div>
2222
+ <div class="h-4 w-36 animate-pulse rounded bg-gray-200 dark:bg-gray-600"></div>
1949
2223
  </div>
1950
2224
  </div>
1951
- `:this.orderDetails?.shipping?.method||this.orderDetails?.customer?.name?u`
1952
- <h3 class="mb-1 text-sm font-medium">${this.orderDetails?.shipping?.label}</h3>
2225
+ `:this.orderDetails?.shipping?.method||this.orderDetails?.customer?.name?d`
2226
+ <h3 class="mb-1 text-sm font-medium text-gray-900 dark:text-gray-100">${this.orderDetails?.shipping?.label}</h3>
1953
2227
  <div class="space-y-1">
1954
- ${this.orderDetails.customer?.name?u`<p class="text-xs text-gray-600">${this.orderDetails.customer.name}</p>`:""}
1955
- ${this.orderDetails.shipping?.method?u`<p class="text-xs text-gray-600">${this.orderDetails.shipping.method}</p>`:""}
2228
+ ${this.orderDetails.customer?.name?d`<p class="text-xs text-gray-600 dark:text-gray-400">${this.orderDetails.customer.name}</p>`:""}
2229
+ ${this.orderDetails.shipping?.method?d`<p class="text-xs text-gray-600 dark:text-gray-400">${this.orderDetails.shipping.method}</p>`:""}
1956
2230
  </div>
1957
2231
  `:""}
1958
2232
  </div>
1959
2233
 
1960
2234
  <!-- Payment Section -->
1961
2235
  <div>
1962
- ${this.streaming&&!this.orderDetails?.payment?u`
2236
+ ${this.streaming&&!this.orderDetails?.payment?d`
1963
2237
  <div>
1964
- <div class="mb-2 h-5 w-32 animate-pulse rounded bg-gray-200"></div>
2238
+ <div class="mb-2 h-5 w-32 animate-pulse rounded bg-gray-200 dark:bg-gray-600"></div>
1965
2239
  <div class="space-y-2 overflow-hidden">
1966
- <div class="h-4 w-40 animate-pulse rounded bg-gray-200"></div>
1967
- <div class="h-4 w-36 animate-pulse rounded bg-gray-200"></div>
2240
+ <div class="h-4 w-40 animate-pulse rounded bg-gray-200 dark:bg-gray-600"></div>
2241
+ <div class="h-4 w-36 animate-pulse rounded bg-gray-200 dark:bg-gray-600"></div>
1968
2242
  </div>
1969
2243
  </div>
1970
- `:this.orderDetails?.payment?u`
1971
- <h3 class="mb-1 text-sm font-medium">${this.orderDetails.payment.label}</h3>
1972
- ${this.orderDetails.payment?.method?.value?u`
1973
- <p class="text-xs text-gray-600">
2244
+ `:this.orderDetails?.payment?d`
2245
+ <h3 class="mb-1 text-sm font-medium text-gray-900 dark:text-gray-100">${this.orderDetails.payment.label}</h3>
2246
+ ${this.orderDetails.payment?.method?.value?d`
2247
+ <p class="text-xs text-gray-600 dark:text-gray-400">
1974
2248
  <span class="font-medium">${this.orderDetails.payment.method.label}:</span>
1975
2249
  ${this.orderDetails.payment.method.value}
1976
2250
  </p>
1977
2251
  `:""}
1978
- ${this.orderDetails.payment.status?.value?u`
1979
- <p class="text-xs text-gray-600">
2252
+ ${this.orderDetails.payment.status?.value?d`
2253
+ <p class="text-xs text-gray-600 dark:text-gray-400">
1980
2254
  <span class="font-medium">${this.orderDetails.payment.status.label}:</span>
1981
2255
  <span>${this.orderDetails.payment.status.value}</span>
1982
2256
  </p>
@@ -1988,11 +2262,11 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
1988
2262
 
1989
2263
  <!-- Action buttons section -->
1990
2264
  <div class="flex w-full flex-col gap-2 overflow-hidden">
1991
- ${this.streaming&&!n[0]?.track_order?.label&&!xn(n[0]?.track_order?.tracking_url||"")?u`
2265
+ ${this.streaming&&!n[0]?.track_order?.label&&!xn(n[0]?.track_order?.tracking_url||"")?d`
1992
2266
  <!-- Loading shimmer for buttons -->
1993
- <div class="h-10 w-full min-w-[250px] animate-pulse overflow-hidden rounded-xl bg-gray-200"></div>
1994
- `:Q(n,(i,s)=>`action-${s}`,i=>{if(i?.track_order?.label)return u`
1995
- ${xn(i.track_order?.tracking_url||"")?u` <a
2267
+ <div class="h-10 w-full min-w-[250px] animate-pulse overflow-hidden rounded-xl bg-gray-200 dark:bg-gray-600"></div>
2268
+ `:Q(n,(i,s)=>`action-${s}`,i=>{if(i?.track_order?.label)return d`
2269
+ ${xn(i.track_order?.tracking_url||"")?d` <a
1996
2270
  target="${this.linksNewTab?"_blank":"_self"}"
1997
2271
  href="${i.track_order?.tracking_url}"
1998
2272
  class="mt-1 w-full rounded-xl bg-[${this.color}] px-4 py-2 text-center text-sm font-medium text-white hover:opacity-90"
@@ -2001,7 +2275,7 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
2001
2275
  `})}
2002
2276
  </div>
2003
2277
  </div>
2004
- `}};customElements.get("mw-product-order-status-card")||customElements.define("mw-product-order-status-card",$i);var ou={".section-spacing":{"@apply":"relative flex justify-center px-[25px] py-16 sm:px-9 sm:py-[45px] lg:px-24 lg:py-[104px]"}},Si=Ct({preflight:{...ou},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:[fr(),hr(),dr(),mr()],ignorelist:/^(sb-|css-|sbdocs|docblock|innerZoomElementWrapper|docs-|rejt-)/});var Ei=t=>gr(Si)(t);var _i=class extends Ei(v){static styles=D`
2278
+ `}};customElements.get("mw-product-order-status-card")||customElements.define("mw-product-order-status-card",Si);var du={".section-spacing":{"@apply":"relative flex justify-center px-[25px] py-16 sm:px-9 sm:py-[45px] lg:px-24 lg:py-[104px]"}},Ei=$t({preflight:{...du},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:[gr(),pr(),fr(),wr()],ignorelist:/^(sb-|css-|sbdocs|docblock|innerZoomElementWrapper|docs-|rejt-)/});var _i=t=>yr(Ei)(t);var Mi=class extends _i(v){static styles=L`
2005
2279
  :host {
2006
2280
  --w-hover-arrow--hovered: 0;
2007
2281
  }
@@ -2015,21 +2289,21 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
2015
2289
  transform: translateX(calc(var(--w-hover-arrow--hovered) * 3px));
2016
2290
  transition: transform 0.3s ease-in-out;
2017
2291
  }
2018
- `;render(){return u`
2292
+ `;render(){return d`
2019
2293
  <svg width="10" height="10" viewBox="0 0 10 10" aria-hidden="true">
2020
2294
  <g fill-rule="evenodd">
2021
2295
  <path part="line" stroke="currentColor" fill="currentColor" d="M0 5h7"></path>
2022
2296
  <path part="tip" stroke="currentColor" fill="transparent" d="M1 1l4 4-4 4"></path>
2023
2297
  </g>
2024
2298
  </svg>
2025
- `}};customElements.get("w-hover-arrow")||customElements.define("w-hover-arrow",_i);var Ut=class t extends C(v){static properties={title:{type:String},type:{type:String},color:{type:String},_hoverRating:{type:Number,state:!0}};constructor(){super(),this.title="",this.type="star-rating",this.color="#8B5CF6",this._hoverRating=0}render(){return u`
2299
+ `}};customElements.get("w-hover-arrow")||customElements.define("w-hover-arrow",Mi);var Pt=class t extends C(v){static properties={title:{type:String},type:{type:String},color:{type:String},darkMode:{type:Boolean,attribute:"dark-mode"},_hoverRating:{type:Number,state:!0}};constructor(){super(),this.title="",this.type="star-rating",this.color="#8B5CF6",this.darkMode=!1,this._hoverRating=0}render(){return d`
2026
2300
  <div
2027
- class="focus-within:ring-opacity-50 w-full overflow-hidden rounded-[18px] bg-white shadow-[0px_3px_20px_0px_rgba(0,0,0,0.2)] transition-all duration-200 focus-within:ring-2 focus-within:ring-[${this.color}]">
2301
+ 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}]">
2028
2302
  <div class="flex flex-col gap-2 p-4">
2029
- ${Br(this.type,[["star-rating",()=>this.#t()],["binary-vote",()=>this.#r()],["new-conversation-button",()=>this.#e()]],()=>u`<span class="text-sm text-gray-500">Unsupported input type</span>`)}
2303
+ ${Fr(this.type,[["star-rating",()=>this.#t()],["binary-vote",()=>this.#r()],["new-conversation-button",()=>this.#e()]],()=>d`<span class="text-sm text-gray-500">Unsupported input type</span>`)}
2030
2304
  </div>
2031
2305
  </div>
2032
- `}#e(){return u`
2306
+ `}#e(){return d`
2033
2307
  <button
2034
2308
  type="button"
2035
2309
  @click="${()=>this.dispatchEvent(new t.SubmitEvent({type:"new-conversation-button"}))}">
@@ -2038,10 +2312,10 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
2038
2312
  <w-hover-arrow class="text-[${this.color}] group-hover:[--w-hover-arrow--hovered:1]"></w-hover-arrow>
2039
2313
  </span>
2040
2314
  </button>
2041
- `}#t(){return u`
2042
- ${this.title?u`<p class="text-sm font-medium text-gray-700">${this.title}</p>`:null}
2315
+ `}#t(){return d`
2316
+ ${this.title?d`<p class="text-sm font-medium text-gray-700 dark:text-gray-200">${this.title}</p>`:null}
2043
2317
  <div class="flex justify-center gap-1">
2044
- ${[1,2,3,4,5].map(e=>u`
2318
+ ${[1,2,3,4,5].map(e=>d`
2045
2319
  <button
2046
2320
  type="button"
2047
2321
  @click="${()=>this.#i(e)}"
@@ -2053,14 +2327,14 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
2053
2327
  </button>
2054
2328
  `)}
2055
2329
  </div>
2056
- `}#r(){return u`
2057
- ${this.title?u`<p class="text-sm font-medium text-gray-700">${this.title}</p>`:null}
2330
+ `}#r(){return d`
2331
+ ${this.title?d`<p class="text-sm font-medium text-gray-700 dark:text-gray-200">${this.title}</p>`:null}
2058
2332
  <div class="flex justify-center gap-4">
2059
2333
  <button
2060
2334
  type="button"
2061
2335
  @click="${()=>this.#a("negative")}"
2062
- class="flex flex-col items-center gap-1 rounded-lg border-2 border-gray-300 p-1 transition-all hover:border-red-400">
2063
- <svg class="h-6 w-6 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
2336
+ class="flex flex-col items-center gap-1 rounded-lg border-2 border-gray-300 p-1 transition-all hover:border-red-400 dark:border-gray-600">
2337
+ <svg class="h-6 w-6 text-gray-400 dark:text-gray-300" fill="none" stroke="currentColor" viewBox="0 0 24 24">
2064
2338
  <path
2065
2339
  stroke-linecap="round"
2066
2340
  stroke-linejoin="round"
@@ -2071,8 +2345,8 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
2071
2345
  <button
2072
2346
  type="button"
2073
2347
  @click="${()=>this.#a("positive")}"
2074
- class="flex flex-col items-center gap-1 rounded-lg border-2 border-gray-300 p-1 transition-all hover:border-green-400">
2075
- <svg class="h-6 w-6 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
2348
+ class="flex flex-col items-center gap-1 rounded-lg border-2 border-gray-300 p-1 transition-all hover:border-green-400 dark:border-gray-600">
2349
+ <svg class="h-6 w-6 text-gray-400 dark:text-gray-300" fill="none" stroke="currentColor" viewBox="0 0 24 24">
2076
2350
  <path
2077
2351
  stroke-linecap="round"
2078
2352
  stroke-linejoin="round"
@@ -2081,7 +2355,7 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
2081
2355
  </svg>
2082
2356
  </button>
2083
2357
  </div>
2084
- `}#n(e){let r=e<=this._hoverRating;return u`
2358
+ `}#n(e){let r=e<=this._hoverRating;return d`
2085
2359
  <svg class="${r?"text-yellow-400":"text-gray-300"} h-6 w-6" fill="${r?"currentColor":"none"}" stroke="currentColor" viewBox="0 0 24 24">
2086
2360
  <path
2087
2361
  stroke-linecap="round"
@@ -2089,44 +2363,53 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
2089
2363
  stroke-width="2"
2090
2364
  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" />
2091
2365
  </svg>
2092
- `}#i(e){this._hoverRating=0,this.dispatchEvent(new t.SubmitEvent({type:"star-rating",rating:e}))}#s(e){this._hoverRating=e}#o(){this._hoverRating=0}#a(e){this.dispatchEvent(new t.SubmitEvent({type:"binary-vote",vote:e}))}};Ut.SubmitEvent=class extends CustomEvent{static type="mw-request-input:submit";constructor(e,r={}){super(Ut.SubmitEvent.type,{detail:e,bubbles:!0,composed:!0,...r})}};customElements.get("mw-request-input")||customElements.define("mw-request-input",Ut);var Pt=class extends Xe{constructor(e){if(super(e),this.it=L,e.type!==yr.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===L||e==null)return this._t=void 0,this.it=e;if(e===ee)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:[]}}};Pt.directiveName="unsafeHTML",Pt.resultType=1;var ia=vr(Pt);var sa=Cs(ue({name:O(),description:O(),price:O(),image_url:Ze([O(),We(O())]),category:O(),url:O()}));function oa(t,e,r,{imagesByProductUrl:n,linksNewTab:i=!0,searchParams:s,messageIsStreaming:o=!1,isSupportAgent:c,color:l="#601feb",apiBaseUrl:a="",cdnBaseUrl:h=""}){if(!t)return u``;let d=e>0&&r[e-1]&&"data"in r[e-1],f=e<r.length-1||!o;if("text"in t)return u`<p>${t.text}</p>`;if("html"in t)return u`${ia(t.html)}`;if("data"in t)switch(t.tag){case"product-card":case"product-card-v1":case"product-card-horizontal":{let p=xt(sa,t.data);if(p.success){let y={...p.output,images:[]};return y.images=ct(y.image_url),u`
2093
- ${d?u`<div class="my-3 w-full border-t border-gray-200/50"></div>`:null}
2366
+ `}#i(e){this._hoverRating=0,this.dispatchEvent(new t.SubmitEvent({type:"star-rating",rating:e}))}#s(e){this._hoverRating=e}#o(){this._hoverRating=0}#a(e){this.dispatchEvent(new t.SubmitEvent({type:"binary-vote",vote:e}))}};Pt.SubmitEvent=class extends CustomEvent{static type="mw-request-input:submit";constructor(e,r={}){super(Pt.SubmitEvent.type,{detail:e,bubbles:!0,composed:!0,...r})}};customElements.get("mw-request-input")||customElements.define("mw-request-input",Pt);var Rt=class extends Ye{constructor(e){if(super(e),this.it=j,e.type!==br.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===j||e==null)return this._t=void 0,this.it=e;if(e===te)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:[]}}};Rt.directiveName="unsafeHTML",Rt.resultType=1;var la=xr(Rt);var hu=new Map([["amp","&"],["lt","<"],["gt",">"],["quot",'"'],["apos","'"],["nbsp","\xA0"],["ensp","\u2002"],["emsp","\u2003"],["thinsp","\u2009"],["eacute","\xE9"],["Eacute","\xC9"],["ntilde","\xF1"],["uuml","\xFC"],["ccedil","\xE7"],["aacute","\xE1"],["Aacute","\xC1"],["agrave","\xE0"],["Agrave","\xC0"],["acirc","\xE2"],["Acirc","\xC2"],["auml","\xE4"],["Auml","\xC4"],["aring","\xE5"],["Aring","\xC5"],["aelig","\xE6"],["AElig","\xC6"],["egrave","\xE8"],["Egrave","\xC8"],["ecirc","\xEA"],["Ecirc","\xCA"],["euml","\xEB"],["Euml","\xCB"],["iacute","\xED"],["Iacute","\xCD"],["igrave","\xEC"],["Igrave","\xCC"],["icirc","\xEE"],["Icirc","\xCE"],["iuml","\xEF"],["Iuml","\xCF"],["oacute","\xF3"],["Oacute","\xD3"],["ograve","\xF2"],["Ograve","\xD2"],["ocirc","\xF4"],["Ocirc","\xD4"],["ouml","\xF6"],["Ouml","\xD6"],["oslash","\xF8"],["Oslash","\xD8"],["otilde","\xF5"],["Otilde","\xD5"],["uacute","\xFA"],["Uacute","\xDA"],["ugrave","\xF9"],["Ugrave","\xD9"],["ucirc","\xFB"],["Ucirc","\xDB"],["Uuml","\xDC"],["yacute","\xFD"],["Yacute","\xDD"],["yuml","\xFF"],["Yuml","\u0178"],["Ntilde","\xD1"],["Ccedil","\xC7"],["euro","\u20AC"],["pound","\xA3"],["yen","\xA5"],["cent","\xA2"],["copy","\xA9"],["reg","\xAE"],["trade","\u2122"],["curren","\xA4"],["plusmn","\xB1"],["times","\xD7"],["divide","\xF7"],["le","\u2264"],["ge","\u2265"],["ne","\u2260"],["sum","\u2211"],["prod","\u220F"],["int","\u222B"],["infin","\u221E"],["radic","\u221A"],["minus","\u2212"],["sup2","\xB2"],["sup3","\xB3"],["frac14","\xBC"],["frac12","\xBD"],["frac34","\xBE"],["larr","\u2190"],["rarr","\u2192"],["uarr","\u2191"],["darr","\u2193"],["harr","\u2194"],["lArr","\u21D0"],["rArr","\u21D2"],["uArr","\u21D1"],["dArr","\u21D3"],["hArr","\u21D4"],["alpha","\u03B1"],["beta","\u03B2"],["gamma","\u03B3"],["delta","\u03B4"],["epsilon","\u03B5"],["zeta","\u03B6"],["eta","\u03B7"],["theta","\u03B8"],["iota","\u03B9"],["kappa","\u03BA"],["lambda","\u03BB"],["mu","\u03BC"],["nu","\u03BD"],["xi","\u03BE"],["omicron","\u03BF"],["pi","\u03C0"],["rho","\u03C1"],["sigma","\u03C3"],["tau","\u03C4"],["upsilon","\u03C5"],["phi","\u03C6"],["chi","\u03C7"],["psi","\u03C8"],["omega","\u03C9"],["Alpha","\u0391"],["Beta","\u0392"],["Gamma","\u0393"],["Delta","\u0394"],["Epsilon","\u0395"],["Zeta","\u0396"],["Eta","\u0397"],["Theta","\u0398"],["Iota","\u0399"],["Kappa","\u039A"],["Lambda","\u039B"],["Mu","\u039C"],["Nu","\u039D"],["Xi","\u039E"],["Omicron","\u039F"],["Pi","\u03A0"],["Rho","\u03A1"],["Sigma","\u03A3"],["Tau","\u03A4"],["Upsilon","\u03A5"],["Phi","\u03A6"],["Chi","\u03A7"],["Psi","\u03A8"],["Omega","\u03A9"],["clubs","\u2663"],["hearts","\u2665"],["diams","\u2666"],["spades","\u2660"],["iexcl","\xA1"],["iquest","\xBF"],["sect","\xA7"],["para","\xB6"],["deg","\xB0"],["middot","\xB7"],["bull","\u2022"],["hellip","\u2026"],["prime","\u2032"],["Prime","\u2033"],["lsaquo","\u2039"],["rsaquo","\u203A"],["laquo","\xAB"],["raquo","\xBB"],["lsquo","\u2018"],["rsquo","\u2019"],["ldquo","\u201C"],["rdquo","\u201D"],["sbquo","\u201A"],["bdquo","\u201E"],["ndash","\u2013"],["mdash","\u2014"],["macr","\xAF"],["oline","\u203E"],["not","\xAC"],["shy","\xAD"],["ordf","\xAA"],["ordm","\xBA"],["micro","\xB5"],["acute","\xB4"],["cedil","\xB8"],["uml","\xA8"]]),pu=/&(?:(#[xX])([0-9a-fA-F]+)|(#)([0-9]+)|([a-zA-Z]+));/g;function fu(t,e,r,n,i,s){if(e){let o=Number.parseInt(r,16);return o>=0&&o<=1114111?String.fromCodePoint(o):t}if(n){let o=Number.parseInt(i,10);return o>=0&&o<=1114111?String.fromCodePoint(o):t}if(s){let o=hu.get(s);if(o!==void 0)return o}return t}function ca(t){return t.replace(pu,fu)}function ua(t){if(!t.includes("&"))return t;try{t=ca(t)}catch{}if(!t.includes("&"))return t;try{t=ca(t)}catch{}return t}var da=t=>We(bt(),vt(e=>Array.isArray(e)?e:[e]),He(t)),om=We(O(),vt(ua));var am=We(Mn({}),vt(t=>{function e(r){let n={};for(let[i,s]of Object.entries(r))s!==null&&(typeof s=="object"&&s!==null&&!Array.isArray(s)?n[i]=e(s):n[i]=s);return n}return e(t)}));var ha=Ms(ie({name:O(),description:O(),price:O(),image_url:da(O()),category:O(),url:O()}));function pa(t,e,r,{imagesByProductUrl:n,linksNewTab:i=!0,searchParams:s,messageIsStreaming:o=!1,isSupportAgent:a,color:l="#601feb",darkMode:c=!1,apiBaseUrl:u="",cdnBaseUrl:h=""}){if(!t)return d``;let p=e>0&&r[e-1]&&"data"in r[e-1],y=e<r.length-1||!o;if("text"in t)return d`<p>${t.text}</p>`;if("html"in t)return d`${la(t.html)}`;if("data"in t)switch(t.tag){case"product-card":case"product-card-v1":case"product-card-horizontal":{let g=xt(ha,t.data);if(g.success){let $={...g.output,images:[]};return $.images=at($.image_url),d`
2367
+ ${p?d`<div class="my-3 w-full border-t border-gray-200/50"></div>`:null}
2094
2368
  <mw-product-card-horizontal
2095
- product="${JSON.stringify(y)}"
2096
- ?streaming="${!f}"
2369
+ product="${JSON.stringify($)}"
2370
+ ?streaming="${!y}"
2097
2371
  ?links-new-tab="${i}"
2372
+ ?dark-mode="${c}"
2098
2373
  .searchParams="${s}"
2099
2374
  .imagesByProductUrl="${n}"></mw-product-card-horizontal>
2100
- `}console.warn(p.issues);break}case"order-status-card-v1":return u`<mw-product-order-status-card
2375
+ `}console.warn(g.issues);break}case"order-status-card-v1":return d`<mw-product-order-status-card
2101
2376
  order-details="${JSON.stringify(t.data)}"
2102
- ?streaming="${!f}"
2377
+ ?streaming="${!y}"
2103
2378
  ?links-new-tab="${i}"
2104
- color="${l}"></mw-product-order-status-card> `;case"live-chat-wait-card-v1":{let p=t.data||{};if(c)return u`<p><i>${p.message}</i></p>`;let y=h?`${h}/assets/game-intro.aac`:"";return u`<mw-chat-wait-timer
2105
- heading="${p.title||""}"
2106
- message="${p.message||""}"
2107
- completeMessage="${p.completeMessage||""}"
2108
- gameButton="${p.gameButton||""}"
2109
- target-end-time="${p.targetEndTime||""}"
2110
- question="${p.firstQuestion||""}"
2111
- .options="${p.options?.option||["No","Yes"]}"
2112
- game-title="${p.gameTitle||""}"
2113
- result-prefix="${p.resultPrefix||""}"
2114
- correct-button-text="${p.correctButtonText||"Correct"}"
2115
- wrong-button-text="${p.wrongButtonText||"Wrong"}"
2379
+ ?dark-mode="${c}"
2380
+ color="${l}"></mw-product-order-status-card> `;case"live-chat-wait-card-v1":{let g=t.data||{};if(a)return d`<p><i>${g.message}</i></p>`;let $=h?`${h}/assets/game-intro.aac`:"";return d`<mw-chat-wait-timer
2381
+ heading="${g.title||""}"
2382
+ message="${g.message||""}"
2383
+ completeMessage="${g.completeMessage||""}"
2384
+ gameButton="${g.gameButton||""}"
2385
+ target-end-time="${g.targetEndTime||""}"
2386
+ question="${g.firstQuestion||""}"
2387
+ .options="${g.options?.option||["No","Yes"]}"
2388
+ game-title="${g.gameTitle||""}"
2389
+ result-prefix="${g.resultPrefix||""}"
2390
+ correct-button-text="${g.correctButtonText||"Correct"}"
2391
+ wrong-button-text="${g.wrongButtonText||"Wrong"}"
2116
2392
  color="${l}"
2117
- apiBaseUrl="${a}"
2393
+ apiBaseUrl="${u}"
2118
2394
  cdnBaseUrl="${h}"
2119
- sound="${y}"></mw-chat-wait-timer>`}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;#n=!1;timeoutMs;get isTyping(){return this.#n}constructor(e,r,{timeoutMs:n=2e3}={}){this.#e=e,this.#t=r,this.timeoutMs=n,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.#n||this.#i()}}#i(){this.#n=!0,this.#t.typingStarted()}typingStopped(){clearTimeout(this.#r),this.#n=!1,this.#t.typingStopped()}};function aa(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 la(t){t?.body?.cancel().catch(console.warn)}var Mi=class{#e;constructor(e=window.localStorage){this.#e=e}#t(e){if(!(typeof e!="string"||e===""))try{return JSON.parse(e)}catch{return}}#r(e){if(e!==void 0)try{return JSON.stringify(e)}catch{return}}setex(e,r,n){return this.#e.setItem(e,this.#r({value:this.#r(r),expiresAt:Date.now()+n*1e3})||"")}set(e,r){return this.#e.setItem(e,this.#r({value:this.#r(r)})||"")}get(e){let r=this.#e.getItem(e);if(!r)return;let n=this.#t(r);if(n){if(n.expiresAt&&n.expiresAt<Date.now()){this.#e.removeItem(e);return}return this.#t(n.value)}}get molin_shop_assistant_distinct_id(){return localStorage.getItem("molin_shop_assistant_distinct_id")}set molin_shop_assistant_distinct_id(e){e===null?localStorage.removeItem("molin_shop_assistant_distinct_id"):localStorage.setItem("molin_shop_assistant_distinct_id",e)}get molin_widget_open_state(){return Z.get("molin-shop-ai-widget-open")??null}set molin_widget_open_state(e){Z.set("molin-shop-ai-widget-open",e)}resetWidgetData(){Z.molin_shop_assistant_distinct_id=null,Z.molin_widget_open_state=null}},Z=new Mi;var Ii=class{#e=[];#t;#r=10;#n=5e3;#i=!1;async add(e,r){if(this.#e.push(ha(e,r)),this.#e.length>=this.#r)return this.flush();this.#t||(this.#t=setTimeout(()=>{this.flush().catch(console.error)},this.#n))}async flush(){if(this.#i||this.#e.length===0)return;let e=[...this.#e];try{this.#i=!0,clearTimeout(this.#t),this.#t=void 0,this.#e=[];let r=new AbortController,n=setTimeout(()=>r.abort(),5e3);await ua(e,{signal:r.signal}),clearTimeout(n)}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 n=e.filter(i=>i.event.includes("error"));this.#e=[...n,...this.#e]}}finally{this.#i=!1,this.#e.length>0&&!this.#t&&(this.#t=setTimeout(()=>{this.flush().catch(console.error)},this.#n))}}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",Vr()).href,e)}catch(e){console.error("Failed to send final events:",e)}}},ca=new Ii;window.addEventListener("beforeunload",()=>{ca.flushBeforeUnload().catch(console.error)});async function A(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"&&cu("molin_link_click",e),r?.immediate){await ua([ha(t,e)]);return}else return ca.add(t,e)}catch(n){console.error("Failed to send event:",n)}}async function ua(t,{signal:e}={}){let r=new FormData;r.set("events",JSON.stringify(t));let n=await fetch(new URL("/widgets/data/collect",Vr()),{method:"POST",body:r,signal:e});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);la(n)}function ha(t,e){return{event:t,widget_id:e.widgetId,properties:Object.assign({},e,lu()),distinct_id:au(),timestamp:new Date().toISOString()}}function au(){try{let t=Z.molin_shop_assistant_distinct_id;return t||(t=crypto.randomUUID(),Z.molin_shop_assistant_distinct_id=t),t}catch(t){console.error("Failed to deserialize distinct_id:",t);let e=crypto.randomUUID();try{Z.molin_shop_assistant_distinct_id=e}catch(r){console.error("Failed to store new distinct_id:",r)}return e}}function lu(){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 Vr(){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 cu(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 pa(){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 fa(){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 uu="\xB7 \xB7 \xB7",hu=["star-rating","binary-vote","new-conversation-button"],Rt=class t extends C(v){#e=Is(this);static properties={showClose:{type:Boolean,attribute:"show-close"},_currentRequestInputIndex:{type:Number,state:!0}};#t=[];constructor(){super(),this.showClose=!1,this._currentRequestInputIndex=0}#r=new qr(this,{typingStarted:()=>this.#e.value?.sendUserTypingStart(),typingStopped:()=>this.#e.value?.sendUserTypingStop()});#n=new Cr(this,{onImageDelete:e=>{if(!this.#e.value){console.warn("widget context not available, cannot delete image");return}this.#e.value.sendImageDelete(e),this.#f?.focus()},uploadUrl:new URL("/v1/uploads",pa()).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}#i="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.#h),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.#h),this.removeEventListener("mw-chat-wait-game:guess-validated",this.#c)}#o=e=>{let r=e,{pendingImages:n}=r.detail;Array.isArray(n)&&this.#n.restoreImages(n)};#a=e=>{let r=e,{questionIndex:n,question:i,answer:s,totalQuestions:o}=r.detail;this.callbacks.onWaitGameQuestionAnswered?.({widgetId:this.widgetId,conversationId:this.conversationId,questionIndex:n,question:i,answer:s,totalQuestions:o})};#h=e=>{let r=e,{guessedProfession:n,questionCount:i}=r.detail;this.callbacks.onWaitGameCompleted?.({widgetId:this.widgetId,conversationId:this.conversationId,guessedProfession:n,questionCount:i})};#c=e=>{let r=e,{guessedProfession:n,isCorrect:i,questionCount:s}=r.detail;this.callbacks.onWaitGameGuessValidated?.({widgetId:this.widgetId,conversationId:this.conversationId,guessedProfession:n,isCorrect:i,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.#n.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(){J(this.config,"config is required");let e=na(this.messages,i=>{try{let s=new Date(i.timestamp),o=Math.floor(s.getUTCMinutes()/5)*5;return s.setUTCMinutes(o,0,0),s.valueOf().toString()}catch(s){console.error(s)}}),r=Math.max(0,Math.min(this._currentRequestInputIndex,this.#d.length-1)),n=this.#d[r];return u`
2120
- <div class="relative mx-auto h-full bg-[#FDFDFD] font-sans text-base before:absolute before:inset-0 before:bg-[#8d8d8d] before:opacity-10 sm:rounded-[36px] sm:p-1.5 sm:before:rounded-[36px]">
2395
+ sound="${$}"></mw-chat-wait-timer>`}case"request-input-v1":return d``}return console.warn("could not render part:",t),d`<p><i>data type not supported</i></p>`}var Vr=class{#e;#t;#r;#n=!1;timeoutMs;get isTyping(){return this.#n}constructor(e,r,{timeoutMs:n=2e3}={}){this.#e=e,this.#t=r,this.timeoutMs=n,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.#n||this.#i()}}#i(){this.#n=!0,this.#t.typingStarted()}typingStopped(){clearTimeout(this.#r),this.#n=!1,this.#t.typingStopped()}};function fa(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 ma(t){t?.body?.cancel().catch(console.warn)}var Ii=class{#e;constructor(e=window.localStorage){this.#e=e}#t(e){if(!(typeof e!="string"||e===""))try{return JSON.parse(e)}catch{return}}#r(e){if(e!==void 0)try{return JSON.stringify(e)}catch{return}}setex(e,r,n){return this.#e.setItem(e,this.#r({value:this.#r(r),expiresAt:Date.now()+n*1e3})||"")}set(e,r){return this.#e.setItem(e,this.#r({value:this.#r(r)})||"")}get(e){let r=this.#e.getItem(e);if(!r)return;let n=this.#t(r);if(n){if(n.expiresAt&&n.expiresAt<Date.now()){this.#e.removeItem(e);return}return this.#t(n.value)}}get molin_shop_assistant_distinct_id(){return localStorage.getItem("molin_shop_assistant_distinct_id")}set molin_shop_assistant_distinct_id(e){e===null?localStorage.removeItem("molin_shop_assistant_distinct_id"):localStorage.setItem("molin_shop_assistant_distinct_id",e)}get molin_widget_open_state(){return K.get("molin-shop-ai-widget-open")??null}set molin_widget_open_state(e){K.set("molin-shop-ai-widget-open",e)}resetWidgetData(){K.molin_shop_assistant_distinct_id=null,K.molin_widget_open_state=null}},K=new Ii;var Ai=class{#e=[];#t;#r=10;#n=5e3;#i=!1;async add(e,r){if(this.#e.push(ya(e,r)),this.#e.length>=this.#r)return this.flush();this.#t||(this.#t=setTimeout(()=>{this.flush().catch(console.error)},this.#n))}async flush(){if(this.#i||this.#e.length===0)return;let e=[...this.#e];try{this.#i=!0,clearTimeout(this.#t),this.#t=void 0,this.#e=[];let r=new AbortController,n=setTimeout(()=>r.abort(),5e3);await wa(e,{signal:r.signal}),clearTimeout(n)}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 n=e.filter(i=>i.event.includes("error"));this.#e=[...n,...this.#e]}}finally{this.#i=!1,this.#e.length>0&&!this.#t&&(this.#t=setTimeout(()=>{this.flush().catch(console.error)},this.#n))}}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",Nr()).href,e)}catch(e){console.error("Failed to send final events:",e)}}},ga=new Ai;window.addEventListener("beforeunload",()=>{ga.flushBeforeUnload().catch(console.error)});async function A(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"&&wu("molin_link_click",e),r?.immediate){await wa([ya(t,e)]);return}else return ga.add(t,e)}catch(n){console.error("Failed to send event:",n)}}async function wa(t,{signal:e}={}){let r=new FormData;r.set("events",JSON.stringify(t));let n=await fetch(new URL("/widgets/data/collect",Nr()),{method:"POST",body:r,signal:e});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);ma(n)}function ya(t,e){return{event:t,widget_id:e.widgetId,properties:Object.assign({},e,gu()),distinct_id:mu(),timestamp:new Date().toISOString()}}function mu(){try{let t=K.molin_shop_assistant_distinct_id;return t||(t=crypto.randomUUID(),K.molin_shop_assistant_distinct_id=t),t}catch(t){console.error("Failed to deserialize distinct_id:",t);let e=crypto.randomUUID();try{K.molin_shop_assistant_distinct_id=e}catch(r){console.error("Failed to store new distinct_id:",r)}return e}}function gu(){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 Nr(){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 wu(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 ba(){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 xa(){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 yu="\xB7 \xB7 \xB7",vu=["star-rating","binary-vote","new-conversation-button"],Bt=class t extends C(v){static styles=L`
2396
+ div.dark::before {
2397
+ opacity: 0.8;
2398
+ background-color: rgba(20, 22, 26, var(--tw-bg-opacity));
2399
+ }
2400
+ `;static properties={showClose:{type:Boolean,attribute:"show-close"},_currentRequestInputIndex:{type:Number,state:!0}};#e=js(this);#t=[];constructor(){super(),this.showClose=!1,this._currentRequestInputIndex=0}#r=new Vr(this,{typingStarted:()=>this.#e.value?.sendUserTypingStart(),typingStopped:()=>this.#e.value?.sendUserTypingStop()});#n=new Sr(this,{onImageDelete:e=>{if(!this.#e.value){console.warn("widget context not available, cannot delete image");return}this.#e.value.sendImageDelete(e),this.#f?.focus()},uploadUrl:new URL("/v1/uploads",ba()).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}#i="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:n}=r.detail;Array.isArray(n)&&this.#n.restoreImages(n)};#a=e=>{let r=e,{questionIndex:n,question:i,answer:s,totalQuestions:o}=r.detail;this.callbacks.onWaitGameQuestionAnswered?.({widgetId:this.widgetId,conversationId:this.conversationId,questionIndex:n,question:i,answer:s,totalQuestions:o})};#d=e=>{let r=e,{guessedProfession:n,questionCount:i}=r.detail;this.callbacks.onWaitGameCompleted?.({widgetId:this.widgetId,conversationId:this.conversationId,guessedProfession:n,questionCount:i})};#c=e=>{let r=e,{guessedProfession:n,isCorrect:i,questionCount:s}=r.detail;this.callbacks.onWaitGameGuessValidated?.({widgetId:this.widgetId,conversationId:this.conversationId,guessedProfession:n,isCorrect:i,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.#n.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(){J(this.config,"config is required");let e=aa(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.#p.length-1)),n=this.#p[r],i=this.config.darkMode;return d`
2401
+ <div
2402
+ class="${i?"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]">
2121
2403
  <div
2122
- class="relative flex h-full flex-col bg-white shadow-[0px_4px_4px_0px_rgba(0,0,0,0.25),-116px_177px_59px_0px_rgba(0,0,0,0.00),-74px_113px_54px_0px_rgba(0,0,0,0.01),-42px_64px_46px_0px_rgba(0,0,0,0.03),-19px_28px_34px_0px_rgba(0,0,0,0.06)] sm:rounded-[30px]">
2404
+ class="relative flex h-full flex-col bg-white shadow-[0px_4px_4px_0px_rgba(0,0,0,0.25),-116px_177px_59px_0px_rgba(0,0,0,0.00),-74px_113px_54px_0px_rgba(0,0,0,0.01),-42px_64px_46px_0px_rgba(0,0,0,0.03),-19px_28px_34px_0px_rgba(0,0,0,0.06)] sm:rounded-[30px] dark:bg-[#2B2D31]">
2123
2405
  <mw-chat-header
2124
2406
  class="absolute top-1.5 right-1.5 left-1.5"
2125
2407
  .content="${{logoUrl:this.config.logoUrl,title:this.config.title,color:this.config.color}}"
2126
- ?show-new-chat="${!this.isLiveMode&&this.messages.length>0&&!this.#k}"
2408
+ ?show-new-chat="${!this.isLiveMode&&this.messages.length>0&&!this.#C}"
2127
2409
  ?show-close="${this.showClose}"
2128
- @mw:new-chat-click="${this.#g}"
2129
- @mw:close-click="${this.#x}">
2410
+ ?dark-mode="${i}"
2411
+ @mw:new-chat-click="${this.#y}"
2412
+ @mw:close-click="${this.#g}">
2130
2413
  </mw-chat-header>
2131
2414
 
2132
2415
  <!-- used by the dashboard to inject content -->
@@ -2135,20 +2418,20 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
2135
2418
  </div>
2136
2419
 
2137
2420
  <!-- drag overlay -->
2138
- ${this.config.enableImageUpload&&this.#n.isDragging?u`
2139
- <div class="bg-opacity-90 absolute inset-0 z-50 flex items-center justify-center bg-white sm:rounded-[30px]">
2421
+ ${this.config.enableImageUpload&&this.#n.isDragging?d`
2422
+ <div class="bg-opacity-90 absolute inset-0 z-50 flex items-center justify-center bg-white sm:rounded-[30px] dark:bg-[#2B2D31]">
2140
2423
  <div class="p-8 text-center">
2141
2424
  <lucide-icon name="image-plus" class="mx-auto mb-4 h-12 w-12 text-blue-500"></lucide-icon>
2142
- <p class="mb-2 text-lg font-semibold text-black">Add images</p>
2143
- <p class="text-opacity-80 text-sm text-black">JPEG, PNG, GIF, WebP, SVG, HEIC supported. Max size: 10MB.</p>
2425
+ <p class="mb-2 text-lg font-semibold text-black dark:text-white">Add images</p>
2426
+ <p class="text-opacity-80 text-sm text-black dark:text-gray-300">JPEG, PNG, GIF, WebP, SVG, HEIC supported. Max size: 10MB.</p>
2144
2427
  </div>
2145
2428
  </div>
2146
2429
  `:null}
2147
2430
 
2148
2431
  <!-- this structure of 2 divs is required for the browser native stick/scroll to bottom -->
2149
2432
  <div id="scrollable-content" class="mt-6 flex h-full flex-shrink flex-grow flex-col-reverse overflow-auto">
2150
- ${this.config.enableImageUpload&&this.#n.error?u`<mw-info-banner variant="error" text="${this.#n.error}" auto-dismissable></mw-info-banner> `:null}
2151
- ${this.config?.showStillLearningBanner?u`<mw-info-banner variant="info" text="I'm still learning!"></mw-info-banner>`:u`
2433
+ ${this.config.enableImageUpload&&this.#n.error?d`<mw-info-banner variant="error" text="${this.#n.error}" auto-dismissable></mw-info-banner> `:null}
2434
+ ${this.config?.showStillLearningBanner?d`<mw-info-banner variant="info" text="I'm still learning!"></mw-info-banner>`:d`
2152
2435
  <!-- this makes the chat stick to bottom when the banner is hidden -->
2153
2436
  <div class="flex p-1"></div>
2154
2437
  `}
@@ -2156,30 +2439,31 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
2156
2439
  <!-- the padding at the top makes empty room at the top when scrolling and content is hidden behind header -->
2157
2440
  <!-- this is the 2nd (inner) div that will natively stick/scroll to bottom -->
2158
2441
  <div class="${this.messages.length>0?"pt-20":""}">
2159
- ${Q(Array.from(e),([i])=>i,([i,s])=>u`
2160
- <div class="my-2 text-center text-xs text-gray-500">${aa(new Date(Number(i)),window.navigator.language)}</div>
2161
- ${Q(s??[],o=>o.id,(o,c)=>{let a=s[c+1]?.role===o.role,d=(c>0?s[c-1]:void 0)?.role===o.role,p=(s.length>0?s[s.length-1]:void 0)?.id===o.id,y=()=>p&&!d&&!a?"single-current":!d&&!a?"single":!d&&a?"first":p&&d&&!a?"last-current":d&&!a?"last":d&&a?"middle":"single";this.#i=y();let E=this.isLiveMode&&o.role==="user"&&o.id===this.lastMsg?.id?"sent":"",b=(o.content.includes("<request-input-v1>")||!o.content)&&o.parts?.every(x=>"data"in x&&x.tag==="request-input-v1");return u`
2162
- ${o.images?Q(o.images,x=>x,x=>u`
2163
- <div data-id="${o.id}" class="${a?"mb-[1px]":"mb-3"} mr-2 ml-[15px] flex-row">
2442
+ ${Q(Array.from(e),([s])=>s,([s,o])=>d`
2443
+ <div class="my-2 text-center text-xs text-gray-500 dark:text-gray-400">${fa(new Date(Number(s)),window.navigator.language)}</div>
2444
+ ${Q(o??[],a=>a.id,(a,l)=>{let u=o[l+1]?.role===a.role,p=(l>0?o[l-1]:void 0)?.role===a.role,g=(o.length>0?o[o.length-1]:void 0)?.id===a.id,$=()=>g&&!p&&!u?"single-current":!p&&!u?"single":!p&&u?"first":g&&p&&!u?"last-current":p&&!u?"last":p&&u?"middle":"single";this.#i=$();let b=this.isLiveMode&&a.role==="user"&&a.id===this.lastMsg?.id?"sent":"",S=(a.content.includes("<request-input-v1>")||!a.content)&&a.parts?.every(w=>"data"in w&&w.tag==="request-input-v1");return d`
2445
+ ${a.images?Q(a.images,w=>w,w=>d`
2446
+ <div data-id="${a.id}" class="${u?"mb-[1px]":"mb-3"} mr-2 ml-[15px] flex-row">
2164
2447
  <mw-chat-image
2165
- src="${x}"
2448
+ src="${w}"
2166
2449
  alt="User uploaded image"
2167
- .side="${o.role==="user"?"right":"left"}"
2450
+ .side="${a.role==="user"?"right":"left"}"
2168
2451
  position=${this.#i}
2169
2452
  width="300px"></mw-chat-image>
2170
2453
  </div>
2171
2454
  `):null}
2172
- ${(o.content||o.parts)&&!b?u` <div data-id="${o.id}" class="${a?"mb-[1px]":"mb-3"} mx-2 flex-row">
2455
+ ${(a.content||a.parts)&&!S?d` <div data-id="${a.id}" class="${u?"mb-[1px]":"mb-3"} mx-2 flex-row">
2173
2456
  <mw-chat-message
2174
2457
  .color="${this.config?.color}"
2175
- status="${E}"
2176
- logo="${o.metadata?.avatar||this.config?.logoUrl}"
2177
- side="${o.role}"
2458
+ status="${b}"
2459
+ logo="${a.metadata?.avatar||this.config?.logoUrl}"
2460
+ side="${a.role}"
2178
2461
  position=${this.#i}
2462
+ ?dark-mode="${i}"
2179
2463
  @click="${this.#l}">
2180
2464
  <div
2181
- 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 break-words text-inherit">
2182
- ${o.content===uu?u`<mw-loading class="-mx-2 block h-8 max-h-[24px] w-8 fill-[${this.config?.color}]"></mw-loading>`:o.parts?Q(o.parts,(x,w)=>w,(x,w)=>oa(x,w,o.parts??[],{imagesByProductUrl:o.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:o.streaming,color:this.config?.color,apiBaseUrl:Vr(),cdnBaseUrl:fa()})):u`<p>${o.content}</p>`}
2465
+ 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 break-words text-inherit">
2466
+ ${a.content===yu?d`<mw-loading class="-mx-2 block h-8 max-h-[24px] w-8 fill-[${this.config?.color}]"></mw-loading>`:a.parts?Q(a.parts,(w,x)=>x,(w,x)=>pa(w,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:i,apiBaseUrl:Nr(),cdnBaseUrl:xa()})):d`<p>${a.content}</p>`}
2183
2467
  </div>
2184
2468
  </mw-chat-message>
2185
2469
  </div>`:null}
@@ -2187,10 +2471,15 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
2187
2471
  `)}
2188
2472
 
2189
2473
  <!-- show typing indicator if the non-user side is typing -->
2190
- ${["assistant","support"].includes(this.typingIndicator?.role??"")&&this.typingIndicator?.role?u`
2191
- <mw-chat-message class="mx-2 mb-3 block" color="${this.config?.color}" logo="${this.typingIndicator?.metadata?.avatar||this.config?.logoUrl}" side="${this.typingIndicator.role}">
2474
+ ${["assistant","support"].includes(this.typingIndicator?.role??"")&&this.typingIndicator?.role?d`
2475
+ <mw-chat-message
2476
+ class="mx-2 mb-3 block"
2477
+ color="${this.config?.color}"
2478
+ logo="${this.typingIndicator?.metadata?.avatar||this.config?.logoUrl}"
2479
+ side="${this.typingIndicator.role}"
2480
+ ?dark-mode="${i}">
2192
2481
  <div
2193
- 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 break-words text-inherit">
2482
+ 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 dark:prose-headings:text-white dark:prose-strong:text-white dark:prose-p:text-inherit break-words text-inherit">
2194
2483
  <mw-loading class="-mx-2 block h-8 max-h-[24px] w-8 fill-[${this.config.color}]"></mw-loading>
2195
2484
  </div>
2196
2485
  </mw-chat-message>
@@ -2201,60 +2490,63 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
2201
2490
  class="flex-grow"
2202
2491
  .examples="${this.messages.length>0?[]:this.config.examples}"
2203
2492
  color="${this.config.color}"
2204
- @mw:example-click="${this.#p}"></mw-chat-background>
2493
+ ?dark-mode="${i}"
2494
+ @mw:example-click="${this.#h}"></mw-chat-background>
2205
2495
  </div>
2206
2496
 
2207
- ${this.messages.length===0&&this.config.disclaimerFloating?u`
2208
- <div class="mx-4 mb-2 rounded-xl bg-[#eeedf1] px-3 py-2">
2209
- <mw-disclaimer .text="${this.config.disclaimerFloating}" .color="${this.config.color}"></mw-disclaimer>
2497
+ ${this.messages.length===0&&this.config.disclaimerFloating?d`
2498
+ <div class="mx-4 mb-2 rounded-xl bg-[#eeedf1] px-3 py-2 dark:bg-[#1E1F23]">
2499
+ <mw-disclaimer .text="${this.config.disclaimerFloating}" .color="${this.config.color}" ?dark-mode="${i}"></mw-disclaimer>
2210
2500
  </div>
2211
2501
  `:null}
2212
2502
 
2213
- <div class="m-1.5 flex-shrink-0 flex-grow-0 space-y-2 rounded-3xl bg-[#eeedf1] p-1.5">
2214
- ${this.config.disclaimer&&!this.config.removePoweredBy?u`
2503
+ <div class="m-1.5 flex-shrink-0 flex-grow-0 space-y-2 rounded-3xl bg-[#eeedf1] p-1.5 dark:bg-[#1E1F23]">
2504
+ ${this.config.disclaimer&&!this.config.removePoweredBy?d`
2215
2505
  <!-- spacing between input box and disclaimer or bottom -->
2216
2506
  <div class="mb-1.5">
2217
- <mw-disclaimer .text="${this.config.disclaimer}" .color="${this.config.color}"></mw-disclaimer>
2507
+ <mw-disclaimer .text="${this.config.disclaimer}" .color="${this.config.color}" ?dark-mode="${i}"></mw-disclaimer>
2218
2508
  </div>
2219
2509
  `:null}
2220
- ${this.#d.length===0?u`
2510
+ ${this.#p.length===0?d`
2221
2511
  <mw-chat-input
2222
- @mw:change="${this.#v}"
2223
- @mw:submit="${this.#y}"
2224
- @mw:cancel="${this.#b}"
2512
+ @mw:change="${this.#b}"
2513
+ @mw:submit="${this.#v}"
2514
+ @mw:cancel="${this.#x}"
2515
+ @mw:image-upload-click="${this.config?.enableImageUpload?this.#n.openImagePicker:void 0}"
2516
+ @mw:image-delete="${this.config?.enableImageUpload?this.#w:void 0}"
2225
2517
  placeholder="${this.config?.input?.placeholder??""}"
2226
2518
  ?disabled="${this.ranOutOfCredits||this.hasQueuedMessages||this.#n.hasPendingImages}"
2227
2519
  ?streaming="${this.isStreaming??!0}"
2228
2520
  ?loading="${this.hasQueuedMessages||this.#n.hasPendingImages}"
2229
2521
  ?enableImageUpload="${this.config?.enableImageUpload&&!this.ranOutOfCredits}"
2522
+ ?dark-mode="${i}"
2230
2523
  color="${this.config?.color??""}"
2231
- .onImageUploadClick="${this.config?.enableImageUpload?this.#n.openImagePicker:void 0}"
2232
- .images="${this.config?.enableImageUpload?this.#n.selectedImages:[]}"
2233
- .onImageDelete="${this.config?.enableImageUpload?this.#n.onImageDelete:void 0}">
2524
+ .images="${this.config?.enableImageUpload?this.#n.selectedImages:[]}">
2234
2525
  </mw-chat-input>
2235
- `:u`
2526
+ `:d`
2236
2527
  <mw-request-input
2237
2528
  .title="${n?.title}"
2238
2529
  .type="${n?.type}"
2239
2530
  .color="${this.config?.color??"#8B5CF6"}"
2240
- @mw-request-input:submit="${this.#w}">
2531
+ ?dark-mode="${i}"
2532
+ @mw-request-input:submit="${this.#u}">
2241
2533
  </mw-request-input>
2242
2534
  `}
2243
- ${this.config.removePoweredBy?this.config.disclaimer?u`
2535
+ ${this.config.removePoweredBy?this.config.disclaimer?d`
2244
2536
  <!-- spacing between input box and disclaimer or bottom -->
2245
2537
  <div class="mt-1.5">
2246
- <mw-disclaimer .text="${this.config.disclaimer}" .color="${this.config.color}"></mw-disclaimer>
2538
+ <mw-disclaimer .text="${this.config.disclaimer}" .color="${this.config.color}" ?dark-mode="${i}"></mw-disclaimer>
2247
2539
  </div>
2248
- `:null:u`
2540
+ `:null:d`
2249
2541
  <!-- spacing between input box and powered-by or bottom -->
2250
2542
  <div class="h-4">
2251
- <mw-powered-by></mw-powered-by>
2543
+ <mw-powered-by ?dark-mode="${i}"></mw-powered-by>
2252
2544
  </div>
2253
2545
  `}
2254
2546
  </div>
2255
2547
  </div>
2256
2548
  </div>
2257
- `}#l(e){let n=e.composedPath().find(i=>i instanceof HTMLAnchorElement);if(n){if(e.preventDefault(),this.callbacks.onUserClickedLink?.({widgetId:this.widgetId,url:n.href,conversationId:this.conversationId}),window.self!==window.top){window.open(n.href,"_blank");return}let s=this.config?.linksNewTab?"_blank":"_self";window.open(n.href,n.target||s)}}#p(e){if(this.isStreaming)return;e.preventDefault();let r=e.detail.example;this.#m(r)}#m=Ne({interval:200},async e=>{J(this.#e.value,"widget context is required"),await this.#e.value.enqueueUserInput(e,{xUserData:this.#e.value?.xUserData,xCustomInstructions:this.#e.value?.xCustomInstructions})&&(this.#f?.setValue(""),this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:e,example:!0,conversationId:this.conversationId}))});#y(e){if(J(this.#e.value,"widget context is required"),e.preventDefault(),this.config?.enableImageUpload&&this.#n.hasPendingImages)return;let r=e.detail;this.#e.value.enqueueUserInput(r,{xUserData:this.#e.value?.xUserData,xCustomInstructions:this.#e.value?.xCustomInstructions}).then(n=>{n&&(this.#f?.setValue(""),this.#n.clearImages(),this.#r.typingStopped(),this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:r,example:!1,conversationId:this.conversationId}),window.requestAnimationFrame(()=>{this.#f?.focus()}))}).catch(console.warn)}#v(e){this.#r.onInput(e.detail.full)}#b(){J(this.#e.value,"widget context is required"),this.#e.value.sendUserCancel(),this.callbacks.onUserCanceledStreaming?.({widgetId:this.widgetId})}#g(){J(this.#e.value,"widget context is required"),this.#e.value.sendNewChat(),this.reset()}#x(){this.dispatchEvent(new t.CloseClickEvent)}#w(e){J(this.#e.value,"widget context is required");let r=this.#d,n=r[this._currentRequestInputIndex];if(!n){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.push({type:o,rating:s,key:n.key,title:n.title});break}case"binary-vote":{let{vote:s,type:o}=e.detail;this.#t.push({type:o,vote:s,key:n.key,title:n.title});break}case"new-conversation-button":{this.#g(),this.requestUpdate();return}default:console.warn("unknown request input type",e.detail);return}this._currentRequestInputIndex+=1;let i=r.filter(s=>s.type==="star-rating"||s.type==="binary-vote").length;this.#t.length>=i&&this.#u(),this.requestUpdate()}async#u(){if(J(this.#e.value,"widget context is required"),this.#t.length===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:this.#t})&&(this.#t=[]),this.requestUpdate()}get#d(){J(this.#e.value,"widget context is required");let e=this.messages.findLast(i=>i.role==="assistant"&&i.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 i=e?.parts?.find(s=>"tag"in s&&s.tag==="request-input-v1"&&"data"in s&&s.data.type==="new-conversation-button");if(i&&"data"in i)return[{title:i.data.title,type:i.data.type,key:i.data.key}]}if(r?.role!=="assistant")return[];let n=r.parts?.filter(i=>"tag"in i&&i.tag==="request-input-v1");return!n||n.length===0?[]:n.map(i=>!("data"in i)||!hu.includes(i.data.type)?null:{title:i.data.title,type:i.data.type,key:i.data.key}).filter(i=>i!==null)}get#k(){if(this.#d.length===0)return!1;let r=this.#d.filter(n=>n.type==="star-rating"||n.type==="binary-vote").length;return this.#t.length<r}get#C(){return this.renderRoot.querySelector("#scrollable-content")}get#f(){return this.renderRoot.querySelector("mw-chat-input")}reloadConfig(){this.#e.value?.reloadConfig(),this.requestUpdate()}sendMessage=Ne({interval:200},async e=>{if(!e?.trim())return console.warn("sendMessage: Message must be a non-empty string"),!1;J(this.#e.value,"Widget context is required");let{value:r}=this.#e,n=await r.enqueueUserInput(e,{xUserData:r.xUserData,xCustomInstructions:r.xCustomInstructions,role:"user",expectStreaming:!0});return n&&this.#f?.setValue(""),n??!1});setInputValue(e){if(!e||typeof e!="string"){console.warn("setInputValue requires a valid string value");return}let r=this.#f;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.#f?.focus()})}reset(){this.#n.clearImages(),this._currentRequestInputIndex=0,this.#t=[],this.#e.value?.reset()}};Rt.CloseClickEvent=class extends CustomEvent{static type="mw:close-click";constructor(e={}){super(Rt.CloseClickEvent.type,{...e})}};customElements.get("mw-chat")||customElements.define("mw-chat",Rt);var Ue=class t extends C(v){static properties={text:{type:String},color:{type:String}};static styles=D`
2549
+ `}#l(e){let n=e.composedPath().find(i=>i instanceof HTMLAnchorElement);if(n){if(e.preventDefault(),this.callbacks.onUserClickedLink?.({widgetId:this.widgetId,url:n.href,conversationId:this.conversationId}),window.self!==window.top){window.open(n.href,"_blank");return}let s=this.config?.linksNewTab?"_blank":"_self";window.open(n.href,n.target||s)}}#h(e){if(this.isStreaming)return;e.preventDefault();let r=e.detail.example;this.#m(r)}#m=Fe({interval:200},async e=>{J(this.#e.value,"widget context is required"),await this.#e.value.enqueueUserInput(e,{xUserData:this.#e.value?.xUserData,xCustomInstructions:this.#e.value?.xCustomInstructions})&&(this.#f?.setValue(""),this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:e,example:!0,conversationId:this.conversationId}))});#v(e){if(J(this.#e.value,"widget context is required"),e.preventDefault(),this.config?.enableImageUpload&&this.#n.hasPendingImages)return;let r=e.detail;this.#e.value.enqueueUserInput(r,{xUserData:this.#e.value?.xUserData,xCustomInstructions:this.#e.value?.xCustomInstructions}).then(n=>{n&&(this.#f?.setValue(""),this.#n.clearImages(),this.#r.typingStopped(),this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:r,example:!1,conversationId:this.conversationId}),window.requestAnimationFrame(()=>{this.#f?.focus()}))}).catch(console.warn)}#b(e){this.#r.onInput(e.detail.full)}#x(){J(this.#e.value,"widget context is required"),this.#e.value.sendUserCancel(),this.callbacks.onUserCanceledStreaming?.({widgetId:this.widgetId})}#w(e){this.#n.onImageDelete(e.detail)}#y(){J(this.#e.value,"widget context is required"),this.#e.value.sendNewChat(),this.reset()}#g(){this.dispatchEvent(new t.CloseClickEvent)}#u(e){J(this.#e.value,"widget context is required");let r=this.#p,n=r[this._currentRequestInputIndex];if(!n){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.push({type:o,rating:s,key:n.key,title:n.title});break}case"binary-vote":{let{vote:s,type:o}=e.detail;this.#t.push({type:o,vote:s,key:n.key,title:n.title});break}case"new-conversation-button":{this.#y(),this.requestUpdate();return}default:console.warn("unknown request input type",e.detail);return}this._currentRequestInputIndex+=1;let i=r.filter(s=>s.type==="star-rating"||s.type==="binary-vote").length;this.#t.length>=i&&this.#k(),this.requestUpdate()}async#k(){if(J(this.#e.value,"widget context is required"),this.#t.length===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:this.#t})&&(this.#t=[]),this.requestUpdate()}get#p(){J(this.#e.value,"widget context is required");let e=this.messages.findLast(i=>i.role==="assistant"&&i.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 i=e?.parts?.find(s=>"tag"in s&&s.tag==="request-input-v1"&&"data"in s&&s.data.type==="new-conversation-button");if(i&&"data"in i)return[{title:i.data.title,type:i.data.type,key:i.data.key}]}if(r?.role!=="assistant")return[];let n=r.parts?.filter(i=>"tag"in i&&i.tag==="request-input-v1");return!n||n.length===0?[]:n.map(i=>!("data"in i)||!vu.includes(i.data.type)?null:{title:i.data.title,type:i.data.type,key:i.data.key}).filter(i=>i!==null)}get#C(){if(this.#p.length===0)return!1;let r=this.#p.filter(n=>n.type==="star-rating"||n.type==="binary-vote").length;return this.#t.length<r}get#$(){return this.renderRoot.querySelector("#scrollable-content")}get#f(){return this.renderRoot.querySelector("mw-chat-input")}reloadConfig(){this.#e.value?.reloadConfig(),this.requestUpdate()}sendMessage=Fe({interval:200},async e=>{if(!e?.trim())return console.warn("sendMessage: Message must be a non-empty string"),!1;J(this.#e.value,"Widget context is required");let{value:r}=this.#e,n=await r.enqueueUserInput(e,{xUserData:r.xUserData,xCustomInstructions:r.xCustomInstructions,role:"user",expectStreaming:!0});return n&&this.#f?.setValue(""),n??!1});setInputValue(e){if(!e||typeof e!="string"){console.warn("setInputValue requires a valid string value");return}let r=this.#f;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.#f?.focus()})}reset(){this.#n.clearImages(),this._currentRequestInputIndex=0,this.#t=[],this.#e.value?.reset()}};Bt.CloseClickEvent=class extends CustomEvent{static type="mw:close-click";constructor(e={}){super(Bt.CloseClickEvent.type,{...e})}};customElements.get("mw-chat")||customElements.define("mw-chat",Bt);var Ue=class t extends C(v){static properties={text:{type:String},color:{type:String},darkMode:{type:Boolean,attribute:"dark-mode"}};static styles=L`
2258
2550
  .popup-desktop:hover button {
2259
2551
  transition-delay: 0s !important;
2260
2552
  }
@@ -2262,67 +2554,73 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
2262
2554
  .popup-desktop button {
2263
2555
  transition-delay: 1s;
2264
2556
  }
2265
- `;constructor(){super(),this.text="Hello there. How can we help?",this.color="#601feb"}render=()=>u`
2266
- <div class="popup-desktop group relative w-[300px] cursor-pointer rounded-[17px] shadow-2xl select-none">
2267
- <mw-spinning-border .color="${this.color}" .border="${"transparent"}" .radius="${"17px"}">
2268
- <!-- wrapper -->
2269
- <div class="relative z-[2147483647] m-[1px] w-[300px] rounded-2xl bg-white font-sans text-base leading-normal">
2270
- <!-- content -->
2271
- <div class="p-4 text-left text-gray-800" @click="${this.#t}">
2272
- <p>${this.text}</p>
2557
+ `;constructor(){super(),this.text="Hello there. How can we help?",this.color="#601feb",this.darkMode=!1}render=()=>d`
2558
+ <div class="${this.darkMode?"dark":""} popup-desktop group relative w-[300px] cursor-pointer rounded-[17px] shadow-2xl select-none">
2559
+ <mw-spinning-border .color="${this.color}" .border="${"transparent"}" .radius="${"17px"}" ?dark-mode="${this.darkMode}">
2560
+ <!-- wrapper -->
2561
+ <div class="relative z-[2147483647] m-[1px] w-[300px] rounded-2xl bg-white font-sans text-base leading-normal dark:bg-[#2B2D31]">
2562
+ <!-- content -->
2563
+ <div class="p-4 text-left text-gray-800 dark:text-gray-200" @click="${this.#t}">
2564
+ <p>${this.text}</p>
2565
+ </div>
2273
2566
  </div>
2274
- </div>
2275
- </mw-spinning-border>
2276
-
2277
- <!-- close button -->
2278
- <button
2279
- class="bg-opacity-50 absolute -top-8 right-0 inline-flex h-6 w-6 items-center justify-center rounded-full bg-gray-300 pb-[2px] text-center text-gray-700 opacity-0 shadow transition-opacity duration-300 ease-in-out group-hover:opacity-100"
2280
- @click="${this.#e}"
2281
- aria-label="Close">
2282
- ×
2283
- </button>
2284
- </div>
2285
- `;#e(){this.dispatchEvent(new t.CloseEvent)}#t(){this.dispatchEvent(new t.ClickEvent)}};Ue.CloseEvent=class extends CustomEvent{static type="mw:close";constructor(e={}){super(Ue.CloseEvent.type,{...e})}};Ue.ClickEvent=class extends CustomEvent{static type="mw:click";constructor(e={}){super(Ue.ClickEvent.type,{...e})}};customElements.get("mw-popup-desktop")||customElements.define("mw-popup-desktop",Ue);var Pe=class t extends C(v){static properties={title:{type:String},text:{type:String},button:{type:String},color:{type:String}};constructor(){super(),this.title="Chat with Molin AI",this.text="Hello there. How can we help?",this.button="Chat now",this.color="#601feb"}render=()=>u`
2286
- <!-- wrapper -->
2287
- <div class="group relative z-[2147483647] rounded-t-2xl bg-white text-left font-sans text-base text-[16px] leading-normal text-gray-800 shadow-2xl transition-all select-none">
2288
- <!-- close button -->
2289
- <button
2290
- class="bg-opacity-50 absolute top-[28px] right-4 inline-flex h-7 w-7 items-center justify-center rounded-full bg-gray-300 pb-[2px] text-center text-xl shadow-none duration-300 ease-in-out focus:outline-none"
2291
- @click="${this.#e}"
2292
- aria-label="Close">
2293
- ×
2294
- </button>
2567
+ </mw-spinning-border>
2295
2568
 
2296
- <!-- content -->
2297
- <div class="p-4 text-gray-800" @click="${this.#t}">
2298
- <h1 class="font-display mr-8 py-2.5 text-left text-lg font-bold">${this.title}</h1>
2299
- <p class="py-2.5 text-left">${this.text}</p>
2300
- <div class="h-4"></div>
2301
- ${this.button&&this.color?u`
2302
- <!-- only visible if button text and color are given -->
2303
- <button class="w-full rounded-full bg-[${this.color}] px-5 py-2.5 text-center text-sm font-medium text-white" type="button">${this.button}</button>
2304
- `:null}
2569
+ <!-- close button -->
2570
+ <button
2571
+ class="bg-opacity-50 absolute -top-8 right-0 inline-flex h-6 w-6 items-center justify-center rounded-full bg-gray-300 pb-[2px] text-center text-gray-700 opacity-0 shadow transition-opacity duration-300 ease-in-out group-hover:opacity-100"
2572
+ @click="${this.#e}"
2573
+ aria-label="Close">
2574
+ ×
2575
+ </button>
2305
2576
  </div>
2577
+ `;#e(){this.dispatchEvent(new t.CloseEvent)}#t(){this.dispatchEvent(new t.ClickEvent)}};Ue.CloseEvent=class extends CustomEvent{static type="mw:close";constructor(e={}){super(Ue.CloseEvent.type,{...e})}};Ue.ClickEvent=class extends CustomEvent{static type="mw:click";constructor(e={}){super(Ue.ClickEvent.type,{...e})}};customElements.get("mw-popup-desktop")||customElements.define("mw-popup-desktop",Ue);var Pe=class t extends C(v){static properties={text:{type:String},button:{type:String},color:{type:String},darkMode:{type:Boolean,attribute:"dark-mode"}};constructor(){super(),this.text="Hello there. How can we help?",this.button="Chat now",this.color="#601feb",this.darkMode=!1}render(){return d`
2578
+ <!-- wrapper -->
2579
+ <div
2580
+ class="${this.darkMode?"dark bg-[#2B2D31] text-gray-200":"bg-white text-gray-800"} group relative z-[2147483647] rounded-t-2xl text-left font-sans text-base text-[16px] leading-normal shadow-2xl transition-all select-none">
2581
+ <!-- close button -->
2582
+ <button
2583
+ class="bg-opacity-50 absolute top-[28px] right-4 inline-flex h-7 w-7 items-center justify-center rounded-full bg-gray-300 pb-[2px] text-center text-xl shadow-none duration-300 ease-in-out focus:outline-none dark:bg-gray-700"
2584
+ @click="${this.#e}"
2585
+ aria-label="Close">
2586
+ ×
2587
+ </button>
2306
2588
 
2307
- <!-- can append any other content -->
2308
- <slot name="footer"></slot>
2309
- </div>
2310
- `;#e(){this.dispatchEvent(new t.CloseEvent)}#t(){this.dispatchEvent(new t.ClickEvent)}};Pe.CloseEvent=class extends CustomEvent{static type="mw:close";constructor(e={}){super(Pe.CloseEvent.type,{...e})}};Pe.ClickEvent=class extends CustomEvent{static type="mw:click";constructor(e={}){super(Pe.ClickEvent.type,{...e})}};customElements.get("mw-popup-mobile")||customElements.define("mw-popup-mobile",Pe);var Fr=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 du=1440*60*1e3,Nr=class{#e;#t;#r;#n;#i=!1;#s=!1;get showing(){return this.#i}constructor(e,r,n=Date){this.#e=e,this.#t=r,this.#r=n,e.addController(this)}hostDisconnected(){this.abortAutoShowTimer()}show({sound:e}={}){if(this.abortAutoShowTimer(),!this.#i&&(this.#i=!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<du||this.show({sound:!r})}hide(){this.#s=!0,this.abortAutoShowTimer(),this.#i=!1,this.#e.requestUpdate()}abortAutoShowTimer(){clearTimeout(this.#n)}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.#n=setTimeout(()=>this.#o(),this.#t.getDelayMs()))}};var Bt=class t extends C(v){static properties={positionClasses:{type:String,attribute:"position"},delayMs:{type:Number,attribute:"delay"},soundUrl:{type:String,attribute:"sound"},content:{type:Object}};#e=new Nr(this,{getDelayMs:()=>this.delayMs,playPopupSound:()=>{this.soundUrl&&new Audio(this.soundUrl).play().then(()=>{}).catch(e=>{console.error("Error playing audio:",e,{})})},setPersistedState:e=>{e?localStorage.setItem("_molin_popup",JSON.stringify(e)):localStorage.removeItem("_molin_popup")},getPersistedState:()=>{let e=localStorage.getItem("_molin_popup");try{return e?JSON.parse(e):null}catch{return null}}});#t=new Fr(this,this.#e);constructor(){super(),this.positionClasses="",this.delayMs=0,this.soundUrl="",this.content={desktop:{text:"",color:""},mobile:{title:"",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`
2589
+ <!-- content -->
2590
+ <div class="p-4 text-gray-800 dark:text-gray-200" @click="${this.#t}">
2591
+ <h1 class="font-display mr-8 py-2.5 text-left text-lg font-bold">${this.text}</h1>
2592
+ <div class="h-4"></div>
2593
+ ${this.button&&this.color?d`
2594
+ <!-- only visible if button text and color are given -->
2595
+ <button class="w-full rounded-2xl bg-[${this.color}] px-5 py-2.5 text-center text-sm font-medium text-white dark:text-gray-800" type="button">${this.button}</button>
2596
+ `:null}
2597
+ </div>
2598
+
2599
+ <!-- can append any other content -->
2600
+ <slot name="footer"></slot>
2601
+ </div>
2602
+ `}#e(){this.dispatchEvent(new t.CloseEvent)}#t(){this.dispatchEvent(new t.ClickEvent)}};Pe.CloseEvent=class extends CustomEvent{static type="mw:close";constructor(e={}){super(Pe.CloseEvent.type,{...e})}};Pe.ClickEvent=class extends CustomEvent{static type="mw:click";constructor(e={}){super(Pe.ClickEvent.type,{...e})}};customElements.get("mw-popup-mobile")||customElements.define("mw-popup-mobile",Pe);var Hr=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 bu=1440*60*1e3,zr=class{#e;#t;#r;#n;#i=!1;#s=!1;get showing(){return this.#i}constructor(e,r,n=Date){this.#e=e,this.#t=r,this.#r=n,e.addController(this)}hostDisconnected(){this.abortAutoShowTimer()}show({sound:e}={}){if(this.abortAutoShowTimer(),!this.#i&&(this.#i=!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<bu||this.show({sound:!r})}hide(){this.#s=!0,this.abortAutoShowTimer(),this.#i=!1,this.#e.requestUpdate()}abortAutoShowTimer(){clearTimeout(this.#n)}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.#n=setTimeout(()=>this.#o(),this.#t.getDelayMs()))}};var qt=class t extends C(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 zr(this,{getDelayMs:()=>this.delayMs,playPopupSound:()=>{this.soundUrl&&new Audio(this.soundUrl).play().then(()=>{}).catch(e=>{console.error("Error playing audio:",e,{})})},setPersistedState:e=>{e?localStorage.setItem("_molin_popup",JSON.stringify(e)):localStorage.removeItem("_molin_popup")},getPersistedState:()=>{let e=localStorage.getItem("_molin_popup");try{return e?JSON.parse(e):null}catch{return null}}});#t=new Hr(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 d`
2311
2603
  <!-- mobile shadow backdrop -->
2312
2604
  <div @click="${this.#r}" class="${e} fixed inset-0 z-[2147483647] bg-black/50 transition-[opacity,visibility] sm:hidden"></div>
2313
2605
 
2314
2606
  <!-- mobile overlay -->
2315
2607
  <div class="${e} fixed right-0 bottom-0 left-0 z-[2147483647] sm:hidden">
2316
- <mw-popup-mobile title="${r.mobile.title}" text="${r.mobile.text}" button="${r.mobile.button}" color="${r.mobile.color}" @mw:click="${this.#n}" @mw:close="${this.#r}">
2317
- ${r.mobile.poweredBy?u`<mw-powered-by class="block p-4" slot="footer"></mw-powered-by>`:null}
2608
+ <mw-popup-mobile
2609
+ text="${r.mobile.text}"
2610
+ button="${r.mobile.button}"
2611
+ color="${r.mobile.color}"
2612
+ ?dark-mode="${this.darkMode}"
2613
+ @mw:click="${this.#n}"
2614
+ @mw:close="${this.#r}">
2615
+ ${r.mobile.poweredBy?d`<mw-powered-by class="block p-4" slot="footer" ?dark-mode="${this.darkMode}"></mw-powered-by>`:null}
2318
2616
  </mw-popup-mobile>
2319
2617
  </div>
2320
2618
 
2321
2619
  <!-- desktop -->
2322
2620
  <div class="${e} ${this.positionClasses} fixed z-[2147483647] transition-[opacity,translate,visibility] max-sm:hidden">
2323
- <mw-popup-desktop color="${r.desktop.color}" text="${r.desktop.text}" @mw:click="${this.#n}" @mw:close="${this.#r}"></mw-popup-desktop>
2621
+ <mw-popup-desktop color="${r.desktop.color}" text="${r.desktop.text}" ?dark-mode="${this.darkMode}" @mw:click="${this.#n}" @mw:close="${this.#r}"></mw-popup-desktop>
2324
2622
  </div>
2325
- `}#r(){this.#e.onCloseClick()}#n(){this.dispatchEvent(new t.ClickEvent),this.#e.onContentClick()}hide(){this.#e.hide()}};Bt.ClickEvent=class extends CustomEvent{static type="mw:click";constructor(e={}){super(Bt.ClickEvent.type,{...e})}};customElements.get("mw-popup")||customElements.define("mw-popup",Bt);var Ai=class extends C(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`
2623
+ `}#r(){this.#e.onCloseClick()}#n(){this.dispatchEvent(new t.ClickEvent),this.#e.onContentClick()}hide(){this.#e.hide()}};qt.ClickEvent=class extends CustomEvent{static type="mw:click";constructor(e={}){super(qt.ClickEvent.type,{...e})}};customElements.get("mw-popup")||customElements.define("mw-popup",qt);var Ti=class extends C(v){static properties={color:{type:String,attribute:"color"},position:{type:String,attribute:"position"}};constructor(){super(),this.color="sky-500",this.position="top-right"}render=()=>d`
2326
2624
  <span class="relative inline-flex">
2327
2625
  <slot></slot>
2328
2626
  <span class="${this.#e} pointer-events-none absolute z-10 flex h-3 w-3">
@@ -2330,7 +2628,7 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
2330
2628
  <span class="bg-${this.color} relative inline-flex h-3 w-3 rounded-full"></span>
2331
2629
  </span>
2332
2630
  </span>
2333
- `;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",Ai);var Ti=class extends C(v){static properties={positionClasses:{type:String,attribute:"position"},text:{type:String}};constructor(){super(),this.positionClasses="",this.text="Try it out"}render=()=>u`
2631
+ `;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",Ti);var Li=class extends C(v){static properties={positionClasses:{type:String,attribute:"position"},text:{type:String}};constructor(){super(),this.positionClasses="",this.text="Try it out"}render=()=>d`
2334
2632
  <div class="${this.positionClasses} fixed right-6 bottom-24 z-10 flex animate-bounce flex-col items-center justify-center font-sans text-base">
2335
2633
  <p class="mb-2 -translate-x-4 -rotate-12 transform text-lg leading-normal font-bold text-gray-800">${this.text}</p>
2336
2634
 
@@ -2343,11 +2641,11 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
2343
2641
  stroke-linecap="round"></path>
2344
2642
  </svg>
2345
2643
  </div>
2346
- `};customElements.get("mw-try-it-out")||customElements.define("mw-try-it-out",Ti);var Hr=class{#e;#t;#r;#n;isLoading=!1;data=void 0;constructor(e,r,n){this.#e=e,this.#t=r,this.#r=n,e.addController(this)}fetch(){if(this.isLoading)return;this.#n?.abort();let e=new AbortController;this.#n=e,this.isLoading=!0,this.data=void 0,this.#e.requestUpdate(),(async()=>{let r=this.#i();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()})}#i(){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.#n?.abort(),this.#n=void 0}};var Li=class{#e;#t;#r;#n;get data(){return this.#n||this.#r?.data}constructor(e,r){this.#e=e,this.#t=r,e.addController(this)}hostConnected(){if(this.#r||this.#n)return;let e=ma();e&&e.widgetId===this.#e.widgetId?this.#n=e.config:this.#r=new Hr(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 n=await r.json();return n&&!e&&window.__INIT_MOLIN_SHOP_AI({cdn:this.#e.cdn,widgetId:this.#e.widgetId,config:n}),n},onError:this.#t?.onError})}},ut=(t,e)=>new Li(t,{onError:e?.onError||console.error,...e});function be(){return window.molinSettings&&typeof window.molinSettings=="object"?window.molinSettings:null}var Re=class t extends C(v){static styles=D`
2644
+ `};customElements.get("mw-try-it-out")||customElements.define("mw-try-it-out",Li);var Wr=class{#e;#t;#r;#n;isLoading=!1;data=void 0;constructor(e,r,n){this.#e=e,this.#t=r,this.#r=n,e.addController(this)}fetch(){if(this.isLoading)return;this.#n?.abort();let e=new AbortController;this.#n=e,this.isLoading=!0,this.data=void 0,this.#e.requestUpdate(),(async()=>{let r=this.#i();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()})}#i(){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.#n?.abort(),this.#n=void 0}};var ji=class{#e;#t;#r;#n;get data(){return this.#n||this.#r?.data}constructor(e,r){this.#e=e,this.#t=r,e.addController(this)}hostConnected(){if(this.#r||this.#n)return;let e=ka();e&&e.widgetId===this.#e.widgetId?this.#n=e.config:this.#r=new Wr(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 n=await r.json();return n&&!e&&window.__INIT_MOLIN_SHOP_AI({cdn:this.#e.cdn,widgetId:this.#e.widgetId,config:n}),n},onError:this.#t?.onError})}},lt=(t,e)=>new ji(t,{onError:e?.onError||console.error,...e});function be(){return window.molinSettings&&typeof window.molinSettings=="object"?window.molinSettings:null}var Re=class t extends C(v){static styles=L`
2347
2645
  :host {
2348
2646
  all: initial; /* reset all properties that can pierce the shadow DOM */
2349
2647
  }
2350
- `;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),A("ShopAssistant: error",{...e},{immediate:!0})},onNewMessageStartedStreaming:e=>{A("ShopAssistant: user received bot message (streaming started)",e)},onMessageEndedStreaming:e=>{A("ShopAssistant: user received bot message (streaming ended)",e)},onUserCanceledStreaming:e=>{A("ShopAssistant: user canceled streaming",e)},onUserClickedLink:e=>{A("ShopAssistant: user clicked link",e)},onUserSentInput:e=>{A("ShopAssistant: user sent input",e)}};constructor(){super(),this.cdn="https://widget.molin.ai",this.widgetId="",this.showClose=!1,this.xUserData=be()?.userData,this.xCustomInstructions=be()?.customInstructions,this.#e=ut(this)}render(){return this.config?u`
2648
+ `;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),A("ShopAssistant: error",{...e},{immediate:!0})},onNewMessageStartedStreaming:e=>{A("ShopAssistant: user received bot message (streaming started)",e)},onMessageEndedStreaming:e=>{A("ShopAssistant: user received bot message (streaming ended)",e)},onUserCanceledStreaming:e=>{A("ShopAssistant: user canceled streaming",e)},onUserClickedLink:e=>{A("ShopAssistant: user clicked link",e)},onUserSentInput:e=>{A("ShopAssistant: user sent input",e)}};constructor(){super(),this.cdn="https://widget.molin.ai",this.widgetId="",this.showClose=!1,this.xUserData=be()?.userData,this.xCustomInstructions=be()?.customInstructions,this.#e=lt(this)}render(){return this.config?d`
2351
2649
  <mw-context-widget
2352
2650
  .widgetId="${this.widgetId}"
2353
2651
  .config="${this.config}"
@@ -2360,11 +2658,11 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
2360
2658
  <slot name="banner" slot="banner"></slot>
2361
2659
  </mw-chat>
2362
2660
  </mw-context-widget>
2363
- `:null}#n(){this.dispatchEvent(new t.CloseClickEvent)}injectConfig(e){this.#t=e,this.requestUpdate()}reloadConfig(){this.#i?.reloadConfig()}reset(){this.xUserData={},this.xCustomInstructions="",this.#i?.reset(),this.requestUpdate()}get#i(){return this.renderRoot.querySelector("mw-chat")}get conversationId(){return this.#i?.conversationId??""}get messages(){return this.#i?.messages??[]}};customElements.get("molin-shop-ai-chat")||customElements.define("molin-shop-ai-chat",Re);Re.CloseClickEvent=class extends CustomEvent{static type="mw:close-click";constructor(e={}){super(Re.CloseClickEvent.type,{...e})}};var ji=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 fe&&e.showLauncher()}hideLauncher(){for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof fe&&e.hideLauncher()}openChat(e){let{message:r,autoSend:n}=e||{};for(let i of document.querySelectorAll("molin-shop-ai"))i instanceof fe&&i.openChat({message:r,autoSend:n})}closeChat(){for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof fe&&e.closeChat()}reset(){Z.resetWidgetData();for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof fe&&e.reset();for(let e of document.querySelectorAll("molin-shop-ai-chat"))e instanceof Re&&e.reset()}};function ga({hidden:t}){let e=new ji({hidden:t});return window.Molin=e,e}function zr(){let t=window.Molin;if(!t)throw new Error("window.Molin global not initialized");return t}window.__INIT_MOLIN_SHOP_AI=function(e){pu(e);let r=be(),n=typeof r?.hidden=="boolean"?r.hidden:window.self!==window.top;if(ga({hidden:n}),e.auto){let i=document.createElement("molin-shop-ai");i.setAttribute("cdn",e.cdn),i.setAttribute("widget",e.widgetId),document.body.appendChild(i)}};function pu(t){window.__INIT_MOLIN_SHOP_AI_OPTIONS=t}function ma(){return window.__INIT_MOLIN_SHOP_AI_OPTIONS}var Di=class extends C(v){static styles=D`
2661
+ `:null}#n(){this.dispatchEvent(new t.CloseClickEvent)}injectConfig(e){this.#t=e,this.requestUpdate()}reloadConfig(){this.#i?.reloadConfig()}reset(){this.xUserData={},this.xCustomInstructions="",this.#i?.reset(),this.requestUpdate()}get#i(){return this.renderRoot.querySelector("mw-chat")}get conversationId(){return this.#i?.conversationId??""}get messages(){return this.#i?.messages??[]}};customElements.get("molin-shop-ai-chat")||customElements.define("molin-shop-ai-chat",Re);Re.CloseClickEvent=class extends CustomEvent{static type="mw:close-click";constructor(e={}){super(Re.CloseClickEvent.type,{...e})}};var Di=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 fe&&e.showLauncher()}hideLauncher(){for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof fe&&e.hideLauncher()}openChat(e){let{message:r,autoSend:n}=e||{};for(let i of document.querySelectorAll("molin-shop-ai"))i instanceof fe&&i.openChat({message:r,autoSend:n})}closeChat(){for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof fe&&e.closeChat()}reset(){K.resetWidgetData();for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof fe&&e.reset();for(let e of document.querySelectorAll("molin-shop-ai-chat"))e instanceof Re&&e.reset()}};function Ca({hidden:t}){let e=new Di({hidden:t});return window.Molin=e,e}function Gr(){let t=window.Molin;if(!t)throw new Error("window.Molin global not initialized");return t}window.__INIT_MOLIN_SHOP_AI=function(e){xu(e);let r=be(),n=typeof r?.hidden=="boolean"?r.hidden:window.self!==window.top;if(Ca({hidden:n}),e.auto){let i=document.createElement("molin-shop-ai");i.setAttribute("cdn",e.cdn),i.setAttribute("widget",e.widgetId),document.body.appendChild(i)}};function xu(t){window.__INIT_MOLIN_SHOP_AI_OPTIONS=t}function ka(){return window.__INIT_MOLIN_SHOP_AI_OPTIONS}var Oi=class extends C(v){static styles=L`
2364
2662
  :host {
2365
2663
  all: initial; /* reset all properties that can pierce the shadow DOM */
2366
2664
  }
2367
- `;static properties={cdn:{type:String},widgetId:{type:String,attribute:"widget"},state:{type:String}};constructor(){super(),this.cdn="https://widget.molin.ai",this.widgetId="",this.state="open"}#e=ut(this);get config(){return this.#e.data}render(){return this.config?u`
2665
+ `;static properties={cdn:{type:String},widgetId:{type:String,attribute:"widget"},state:{type:String}};constructor(){super(),this.cdn="https://widget.molin.ai",this.widgetId="",this.state="open"}#e=lt(this);get config(){return this.#e.data}render(){return this.config?d`
2368
2666
  <!-- embed our bubble component forwarding props -->
2369
2667
  <!-- these props are never internally updated by mw-bubble so we pass them down only one way -->
2370
2668
  <mw-bubble
@@ -2372,13 +2670,13 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
2372
2670
  .color="${this.config?.bubble?.color||this.config?.color}"
2373
2671
  .bubbleStyle="${this.config?.bubble?.style}"
2374
2672
  .src="${this.config?.bubble?.bubbleUrl}"
2375
- width="${F(this.config?.bubble?.size?.width)}"
2376
- height="${F(this.config?.bubble?.size?.height)}"></mw-bubble>
2377
- `:null}};customElements.get("molin-shop-ai-launcher")||customElements.define("molin-shop-ai-launcher",Di);var J5="navigator"in globalThis&&/Mobi|Android|iPhone/i.test(navigator.userAgent),K5="navigator"in globalThis&&"share"in navigator,fu=Object.freeze({sm:640,md:768,lg:1024,xl:1280,"2xl":1536});function mu(t){if(typeof window>"u")return!1;let e=fu[t];return typeof e!="number"?(console.warn(`Invalid breakpoint: ${t}`),!1):window.matchMedia(`(min-width: ${e}px)`).matches}function Oi(){return mu("sm")}var Wr=class{#e;#t;#r;#n;#i=!1;constructor(e,r,n,i=window.history){this.#e=e,this.#t=r,this.#r=n,this.#n=i,e.addController(this)}hostConnected(){this.#s();let e=this.#n.pushState;this.#n.pushState=(...r)=>{if(e.call(this.#n,...r),!this.#i)try{let n=new URL(r[2],window.location.origin);this.#t.test(n.pathname)&&this.#r.navigated()}catch{}}}hostDisconnected(){this.#i=!0}#s=()=>{this.#t.test(window.location.pathname)&&this.#r.navigated()}};function wa({minMs:t,maxMs:e}){return Math.random()*(e-t)+t}function Gr(t,e=""){return Object.entries(t).filter(([r,n])=>n).map(([r,n])=>`${e}${r}-[${n}]`).join(" ")}function ya(t,e={}){return[Gr(t),Gr(e,"max-sm:")].join(" ")}function va(t){return Gr(t)}function ba(t){return Object.entries(t).filter(([e,r])=>r).filter(([e])=>e==="left"||e==="right").map(([e,r])=>{let n=`sm:${e}-[${r}]`;return e==="left"&&(n+=" sm:right-auto"),e==="right"&&(n+=" sm:left-auto"),n}).join(" ")}function xa(t){let e=Gr(t),n=`sm:bottom-[${t.bottom?`calc(${t.bottom}+72px)`:"72px"}]`;return[e,n].filter(Boolean).join(" ")}var Ui=class{#e=0;#t=!1;#r;#n;constructor(e,r,{threshold:n=5}={}){this.#r=r,this.#n=n,e.addController(this)}hostConnected(){this.#e=window.scrollY,window.addEventListener("scroll",this.#i,{passive:!0})}hostDisconnected(){window.removeEventListener("scroll",this.#i)}#i=()=>{this.#t||(requestAnimationFrame(this.#s),this.#t=!0)};#s=()=>{let e=window.scrollY,r=e-this.#e;if(Math.abs(r)>=this.#n){let n=r>0?"down":"up";this.#r({scrollY:e,direction:n,deltaY:Math.abs(r)}),this.#e=e}this.#t=!1}};function ka(t,e,r){return new Ui(t,e,r)}var fe=class extends C(v){static styles=D`
2673
+ width="${N(this.config?.bubble?.size?.width)}"
2674
+ height="${N(this.config?.bubble?.size?.height)}"></mw-bubble>
2675
+ `:null}};customElements.get("molin-shop-ai-launcher")||customElements.define("molin-shop-ai-launcher",Oi);var z5="navigator"in globalThis&&/Mobi|Android|iPhone/i.test(navigator.userAgent),W5="navigator"in globalThis&&"share"in navigator,ku=Object.freeze({sm:640,md:768,lg:1024,xl:1280,"2xl":1536});function Cu(t){if(typeof window>"u")return!1;let e=ku[t];return typeof e!="number"?(console.warn(`Invalid breakpoint: ${t}`),!1):window.matchMedia(`(min-width: ${e}px)`).matches}function Ui(){return Cu("sm")}var Zr=class{#e;#t;#r;#n;#i=!1;constructor(e,r,n,i=window.history){this.#e=e,this.#t=r,this.#r=n,this.#n=i,e.addController(this)}hostConnected(){this.#s();let e=this.#n.pushState;this.#n.pushState=(...r)=>{if(e.call(this.#n,...r),!this.#i)try{let n=new URL(r[2],window.location.origin);this.#t.test(n.pathname)&&this.#r.navigated()}catch{}}}hostDisconnected(){this.#i=!0}#s=()=>{this.#t.test(window.location.pathname)&&this.#r.navigated()}};function $a({minMs:t,maxMs:e}){return Math.random()*(e-t)+t}function Kr(t,e=""){return Object.entries(t).filter(([r,n])=>n).map(([r,n])=>`${e}${r}-[${n}]`).join(" ")}function Sa(t,e={}){return[Kr(t),Kr(e,"max-sm:")].join(" ")}function Ea(t){return Kr(t)}function _a(t){return Object.entries(t).filter(([e,r])=>r).filter(([e])=>e==="left"||e==="right").map(([e,r])=>{let n=`sm:${e}-[${r}]`;return e==="left"&&(n+=" sm:right-auto"),e==="right"&&(n+=" sm:left-auto"),n}).join(" ")}function Ma(t){let e=Kr(t),n=`sm:bottom-[${t.bottom?`calc(${t.bottom}+72px)`:"72px"}]`;return[e,n].filter(Boolean).join(" ")}var Pi=class{#e=0;#t=!1;#r;#n;constructor(e,r,{threshold:n=5}={}){this.#r=r,this.#n=n,e.addController(this)}hostConnected(){this.#e=window.scrollY,window.addEventListener("scroll",this.#i,{passive:!0})}hostDisconnected(){window.removeEventListener("scroll",this.#i)}#i=()=>{this.#t||(requestAnimationFrame(this.#s),this.#t=!0)};#s=()=>{let e=window.scrollY,r=e-this.#e;if(Math.abs(r)>=this.#n){let n=r>0?"down":"up";this.#r({scrollY:e,direction:n,deltaY:Math.abs(r)}),this.#e=e}this.#t=!1}};function Ia(t,e,r){return new Pi(t,e,r)}var fe=class extends C(v){static styles=L`
2378
2676
  :host {
2379
2677
  all: initial; /* reset all properties that can pierce the shadow DOM */
2380
2678
  }
2381
- `;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=be()?.userData,this.xCustomInstructions=be()?.customInstructions}#e=ut(this);#t=ka(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;#n=new Wr(this,/.*/i,{navigated:()=>{if(this.requestUpdate(),!this.widgetId){console.warn("No widgetId set, cannot track page view");return}let e=this.#l?.conversationId,r=Je.restore(this.widgetId)?.conversationId,n=e||r;n&&A("ShopAssistant: pageview",{widgetId:this.widgetId,conversationId:n,url:document.location.href,title:document.title,hidden:this.config?this.config.hidden||!1:void 0,shouldHideForCurrentUrl:this.#h})}});#i=!1;#s={onError:e=>{alert(e.error),console.error(e.widgetId,e.error),A("ShopAssistant: error",{...e},{immediate:!0})},onNewMessageStartedStreaming:e=>{A("ShopAssistant: user received bot message (streaming started)",e)},onMessageEndedStreaming:e=>{A("ShopAssistant: user received bot message (streaming ended)",e)},onUserCanceledStreaming:e=>{A("ShopAssistant: user canceled streaming",e)},onUserClickedLink:e=>{A("ShopAssistant: user clicked link",e)},onUserSentInput:e=>{A("ShopAssistant: user sent input",e)},onWaitGameQuestionAnswered:e=>{A("ShopAssistant: wait game question answered",e)},onWaitGameCompleted:e=>{A("ShopAssistant: wait game completed",e)},onWaitGameGuessValidated:e=>{A("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#h(){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(n=>{if(!n||typeof n!="string")return!1;let i=n.endsWith("*"),s=i?n.slice(0,-1):n;return n.startsWith("http")?i?e.startsWith(s):e===s:i?r.startsWith(s):r===s})}render(){if(!this.config)return null;let e=ya(this.config.bubble.position,this.config.bubble.mobilePosition),r=va(this.config.bubble.position),n=ba(this.config.bubble.position),i=xa(this.config.bubble.position);return this.config.hidden||zr().hidden||this.#h?null:u`
2679
+ `;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=be()?.userData,this.xCustomInstructions=be()?.customInstructions}#e=lt(this);#t=Ia(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;#n=new Zr(this,/.*/i,{navigated:()=>{if(this.requestUpdate(),!this.widgetId){console.warn("No widgetId set, cannot track page view");return}let e=this.#l?.conversationId,r=Ge.restore(this.widgetId)?.conversationId,n=e||r;n&&A("ShopAssistant: pageview",{widgetId:this.widgetId,conversationId:n,url:document.location.href,title:document.title,hidden:this.config?this.config.hidden||!1:void 0,shouldHideForCurrentUrl:this.#d})}});#i=!1;#s={onError:e=>{alert(e.error),console.error(e.widgetId,e.error),A("ShopAssistant: error",{...e},{immediate:!0})},onNewMessageStartedStreaming:e=>{A("ShopAssistant: user received bot message (streaming started)",e)},onMessageEndedStreaming:e=>{A("ShopAssistant: user received bot message (streaming ended)",e)},onUserCanceledStreaming:e=>{A("ShopAssistant: user canceled streaming",e)},onUserClickedLink:e=>{A("ShopAssistant: user clicked link",e)},onUserSentInput:e=>{A("ShopAssistant: user sent input",e)},onWaitGameQuestionAnswered:e=>{A("ShopAssistant: wait game question answered",e)},onWaitGameCompleted:e=>{A("ShopAssistant: wait game completed",e)},onWaitGameGuessValidated:e=>{A("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(n=>{if(!n||typeof n!="string")return!1;let i=n.endsWith("*"),s=i?n.slice(0,-1):n;return n.startsWith("http")?i?e.startsWith(s):e===s:i?r.startsWith(s):r===s})}render(){if(!this.config)return null;let e=Sa(this.config.bubble.position,this.config.bubble.mobilePosition),r=Ea(this.config.bubble.position),n=_a(this.config.bubble.position),i=Ma(this.config.bubble.position);return this.config.hidden||Gr().hidden||this.#d?null:d`
2382
2680
  <mw-context-widget
2383
2681
  .widgetId="${this.widgetId}"
2384
2682
  .config="${this.config}"
@@ -2388,50 +2686,51 @@ var $a=Object.create;var Pi=Object.defineProperty;var Sa=Object.getOwnPropertyDe
2388
2686
  .autoConnect="${this.#i}">
2389
2687
  <mw-bubble
2390
2688
  class="${e} ${this._dialogShown?"opacity-0":"opacity-100"} fixed z-[${this.#o}] transition-opacity"
2391
- @click="${this.#y}"
2689
+ @click="${this.#v}"
2392
2690
  state="${this._dialogShown?"close":"open"}"
2393
2691
  .color="${this.config?.bubble?.color||this.config?.color}"
2394
2692
  .bubbleStyle="${this.config?.bubble?.style}"
2395
2693
  .src="${this.config?.bubble?.bubbleUrl}"
2396
- width="${F(this.config?.bubble?.size?.width)}"
2397
- height="${F(this.config?.bubble?.size?.height)}"></mw-bubble>
2694
+ width="${N(this.config?.bubble?.size?.width)}"
2695
+ height="${N(this.config?.bubble?.size?.height)}"></mw-bubble>
2398
2696
 
2399
2697
  <!-- only load the component if enabled on any platform -->
2400
- ${this.isPopupEnabled?u`
2698
+ ${this.isPopupEnabled?d`
2401
2699
  <mw-popup
2402
2700
  position="${i}"
2403
- delay="${this.config.popup?.delayMs||wa({minMs:2e3,maxMs:5e3})}"
2701
+ delay="${this.config.popup?.delayMs||$a({minMs:2e3,maxMs:5e3})}"
2404
2702
  sound="${this.config.popup?.muteSounds?"":this.config.popup?.soundUrl||""}"
2405
- .content="${{desktop:{text:this.config.popup?.text||"Hello there. How can we help?",color:this.config?.bubble?.color||this.config.color},mobile:{title:this.config.popup?.mobileTitleText||`Chat with ${this.config.title}`,text:this.config.popup?.text||"Hello there. How can we help?",button:this.config.popup?.mobileButtonText||`Chat with ${this.config.title}`,color:this.config.color,poweredBy:!this.config.removePoweredBy}}}"
2703
+ ?dark-mode="${this.config?.darkMode}"
2704
+ .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}}}"
2406
2705
  @mw:click="${this.#m}"></mw-popup>
2407
2706
  `:null}
2408
2707
 
2409
2708
  <!-- show "Try it out" if enabled (even if the chat window is showing) -->
2410
- ${this.config?.tryItOut?.mobileEnabled||this.config?.tryItOut?.desktopEnabled?u`<mw-try-it-out
2709
+ ${this.config?.tryItOut?.mobileEnabled||this.config?.tryItOut?.desktopEnabled?d`<mw-try-it-out
2411
2710
  class="${this.config?.tryItOut?.mobileEnabled?"visible":"invisible"} ${this.config?.tryItOut?.desktopEnabled?"sm:visible":"sm:invisible"}"
2412
2711
  position="${r}"
2413
2712
  text="${this.config.tryItOut?.text||""}"></mw-try-it-out>`:null}
2414
2713
 
2415
2714
  <!-- 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. -->
2416
2715
  <div
2417
- class="${this._dialogShown?"visible opacity-100 translate-y-0":"invisible opacity-0 translate-y-3"} ${n} fixed inset-0 z-[2147483647] bg-white font-sans text-[16px] leading-normal text-gray-800 shadow-2xl transition-all sm:top-auto sm:bottom-[1.5rem] 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]">
2418
- <mw-chat ?show-close="${!0}" @mw:close-click="${this.#v}">
2716
+ class="${this._dialogShown?"visible opacity-100 translate-y-0":"invisible opacity-0 translate-y-3"} ${n} ${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-[1.5rem] 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]">
2717
+ <mw-chat ?show-close="${!0}" @mw:close-click="${this.#b}">
2419
2718
  <slot name="banner" slot="banner"></slot>
2420
2719
  </mw-chat>
2421
2720
  </div>
2422
2721
 
2423
2722
  <!-- Floating input only visible when enabled, in center, on desktop only -->
2424
- ${this.config?.floatingAskAI?.enabled&&this.#a?u`
2723
+ ${this.config?.floatingAskAI?.enabled&&this.#a?d`
2425
2724
  <mw-floating-ask-ai
2426
2725
  ?dark="${this.config?.floatingAskAI?.darkMode}"
2427
2726
  .color="${this.config.color||this.config?.bubble?.color}"
2428
- placeholder="${F(this.config?.floatingAskAI?.placeholder)}"
2727
+ placeholder="${N(this.config?.floatingAskAI?.placeholder)}"
2429
2728
  class="${!this._dialogShown&&this._floatingInputVisible?"opacity-100 translate-y-0":"opacity-0 translate-y-full"} fixed left-1/2 z-[${this.#o}] hidden -translate-x-1/2 transition-all duration-300 ease-in-out max-md:hidden sm:block"
2430
2729
  style="bottom: ${this.config.bubble.position.bottom||"1.5rem"}"
2431
- @mw-floating-ask-ai:submit="${this.#b}"></mw-floating-ask-ai>
2730
+ @mw-floating-ask-ai:submit="${this.#x}"></mw-floating-ask-ai>
2432
2731
  `:null}
2433
2732
  </mw-context-widget>
2434
- `}get isPopupEnabled(){return Oi()?!!this.config?.popup?.desktopEnabled:!!this.config?.popup?.mobileEnabled}updated(){this._dialogShown&&this.#c?.hide(),this._dialogShown&&setTimeout(()=>{this.#l?.focusInput()},0)}firstUpdated(){Oi()&&Z.molin_widget_open_state?.isOpen&&!this._dialogShown&&(this._dialogShown=!0,this.#i=!0,this.requestUpdate())}get#c(){return this.renderRoot.querySelector("mw-popup")}get#l(){return this.renderRoot.querySelector("mw-chat")}get#p(){return this.renderRoot.querySelector("mw-context-widget")}#m(){this._dialogShown=!0,this.#i=!0,this.requestUpdate(),this.#u(!0),A("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"popup-click",state:this._dialogShown?"open":"close"})}#y(){this._dialogShown=!this._dialogShown,this.#i=!0,this.requestUpdate(),this.#u(this._dialogShown),this.#c?.hide(),A("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"bubble-toggle",state:this._dialogShown?"open":"close"})}#v(){this._dialogShown=!1,this._floatingInputVisible=!0,this.requestUpdate(),this.#u(!1),A("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"top-right-close-button",state:this._dialogShown?"open":"close"})}#b=e=>{let r=e.detail.text,n=this.#p;n&&typeof n.connect=="function"&&n.connect(),this._dialogShown=!0,this.#i=!0,this.requestUpdate(),this.#u(!0),setTimeout(()=>{this.#w(r),this.#x(r).catch(console.warn)},100),A("ShopAssistant: user sent input",{widgetId:this.widgetId,text:r,example:!1,conversationId:this.#l?.conversationId||"",source:"ask-ai"})};#g=Ne({interval:200},({message:e,autoSend:r=!1}={})=>{if(!e)return;this.#w(e);let n=this.#l?.isLiveMode;n||this.reset(),r&&!n&&this.#x(e).catch(console.warn)});openChat(e){let{message:r,autoSend:n}=e||{};if(this._dialogShown){this.#g({message:r,autoSend:n});return}let i=this.#p;i&&typeof i.connect=="function"&&i.connect(),this._dialogShown=!0,this.#i=!0,this.requestUpdate(),this.#u(!0),this.#c?.hide(),setTimeout(()=>{this.#g({message:r,autoSend:n})},100),A("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(),A("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"programmatic-method",state:this._dialogShown?"open":"close"}))}showLauncher(){let e=zr();e.hidden=!1,this.requestUpdate(),A("ShopAssistant: called show launcher",{widgetId:this.widgetId,source:"programmatic-method"})}hideLauncher(){let e=zr();e.hidden=!0,this.requestUpdate(),A("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#x(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")}#w(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){Z.molin_widget_open_state={isOpen:e}}};customElements.get("molin-shop-ai")||customElements.define("molin-shop-ai",fe);export{fe as MolinShopAI};
2733
+ `}get isPopupEnabled(){return Ui()?!!this.config?.popup?.desktopEnabled:!!this.config?.popup?.mobileEnabled}updated(){this._dialogShown&&this.#c?.hide(),this._dialogShown&&setTimeout(()=>{this.#l?.focusInput()},0)}firstUpdated(){Ui()&&K.molin_widget_open_state?.isOpen&&!this._dialogShown&&(this._dialogShown=!0,this.#i=!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")}#m(){this._dialogShown=!0,this.#i=!0,this.requestUpdate(),this.#u(!0),A("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"popup-click",state:this._dialogShown?"open":"close"})}#v(){this._dialogShown=!this._dialogShown,this.#i=!0,this.requestUpdate(),this.#u(this._dialogShown),this.#c?.hide(),A("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"bubble-toggle",state:this._dialogShown?"open":"close"})}#b(){this._dialogShown=!1,this._floatingInputVisible=!0,this.requestUpdate(),this.#u(!1),A("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"top-right-close-button",state:this._dialogShown?"open":"close"})}#x=e=>{let r=e.detail.text,n=this.#h;n&&typeof n.connect=="function"&&n.connect(),this._dialogShown=!0,this.#i=!0,this.requestUpdate(),this.#u(!0),setTimeout(()=>{this.#g(r),this.#y(r).catch(console.warn)},100),A("ShopAssistant: user sent input",{widgetId:this.widgetId,text:r,example:!1,conversationId:this.#l?.conversationId||"",source:"ask-ai"})};#w=Fe({interval:200},({message:e,autoSend:r=!1}={})=>{if(!e)return;this.#g(e);let n=this.#l?.isLiveMode;n||this.reset(),r&&!n&&this.#y(e).catch(console.warn)});openChat(e){let{message:r,autoSend:n}=e||{};if(this._dialogShown){this.#w({message:r,autoSend:n});return}let i=this.#h;i&&typeof i.connect=="function"&&i.connect(),this._dialogShown=!0,this.#i=!0,this.requestUpdate(),this.#u(!0),this.#c?.hide(),setTimeout(()=>{this.#w({message:r,autoSend:n})},100),A("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(),A("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"programmatic-method",state:this._dialogShown?"open":"close"}))}showLauncher(){let e=Gr();e.hidden=!1,this.requestUpdate(),A("ShopAssistant: called show launcher",{widgetId:this.widgetId,source:"programmatic-method"})}hideLauncher(){let e=Gr();e.hidden=!0,this.requestUpdate(),A("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#y(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")}#g(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){K.molin_widget_open_state={isOpen:e}}};customElements.get("molin-shop-ai")||customElements.define("molin-shop-ai",fe);export{fe as MolinShopAI};
2435
2734
  /*! Bundled license information:
2436
2735
 
2437
2736
  @lit/reactive-element/css-tag.js: