@molin.ai/shop-ai 0.9.19 → 0.9.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/molin-shop-ai.min.js +840 -308
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDescriptor;var Jp=Object.getOwnPropertyNames;var Xp=Object.getPrototypeOf,Yp=Object.prototype.hasOwnProperty;var il=t=>{throw TypeError(t)};var Qp=(t,e,r)=>e in t?Ks(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var qr=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var eh=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Jp(e))!Yp.call(t,i)&&i!==r&&Ks(t,i,{get:()=>e[i],enumerable:!(n=Kp(e,i))||n.enumerable});return t};var th=(t,e,r)=>(r=t!=null?Zp(Xp(t)):{},eh(e||!t||!t.__esModule?Ks(r,"default",{value:t,enumerable:!0}):r,t));var w=(t,e,r)=>Qp(t,typeof e!="symbol"?e+"":e,r),Js=(t,e,r)=>e.has(t)||il("Cannot "+r);var a=(t,e,r)=>(Js(t,e,"read from private field"),r?r.call(t):e.get(t)),h=(t,e,r)=>e.has(t)?il("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),g=(t,e,r,n)=>(Js(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),m=(t,e,r)=>(Js(t,e,"access private method"),r);var sl=(t,e,r,n)=>({set _(i){g(t,e,i,r)},get _(){return a(t,e,n)}});var nu=qr(Mt=>{"use strict";var $d=Mt&&Mt.__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 u(p){try{c(n.next(p))}catch(d){o(d)}}function l(p){try{c(n.throw(p))}catch(d){o(d)}}function c(p){p.done?s(p.value):i(p.value).then(u,l)}c((n=n.apply(t,e||[])).next())})},Ed=Mt&&Mt.__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=u(0),o.throw=u(1),o.return=u(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(c){return function(p){return l([c,p])}}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(p){c=[6,p],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(Mt,"__esModule",{value:!0});Mt.base64ToBlob=_d;function _d(t){return $d(this,void 0,void 0,function(){var e,r,n;return Ed(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=Ad(t),n&&(r=r.slice(0,r.size,n)),[2,r]}})})}var Md=/^data:(.+);base64,/;function Ad(t){var e;return(e=t.match(Md))===null||e===void 0?void 0:e.slice(1,2).pop()}});var iu=qr(At=>{"use strict";var Id=At&&At.__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 u(p){try{c(n.next(p))}catch(d){o(d)}}function l(p){try{c(n.throw(p))}catch(d){o(d)}}function c(p){p.done?s(p.value):i(p.value).then(u,l)}c((n=n.apply(t,e||[])).next())})},Td=At&&At.__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=u(0),o.throw=u(1),o.return=u(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(c){return function(p){return l([c,p])}}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(p){c=[6,p],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(At,"__esModule",{value:!0});At.base64ToFile=Ld;function Ld(t,e,r){return Id(this,void 0,void 0,function(){var n,i;return Td(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 oa=qr(It=>{"use strict";var ia=It&&It.__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 u(p){try{c(n.next(p))}catch(d){o(d)}}function l(p){try{c(n.throw(p))}catch(d){o(d)}}function c(p){p.done?s(p.value):i(p.value).then(u,l)}c((n=n.apply(t,e||[])).next())})},sa=It&&It.__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=u(0),o.throw=u(1),o.return=u(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(c){return function(p){return l([c,p])}}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(p){c=[6,p],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(It,"__esModule",{value:!0});It.blobToBase64=jd;function jd(t){return ia(this,void 0,void 0,function(){return sa(this,function(e){return[2,typeof FileReader=="function"?Od(t):Ud(t)]})})}var dr;(function(t){t.error="error",t.loadend="loadend"})(dr||(dr={}));function Od(t){return ia(this,void 0,void 0,function(){return sa(this,function(e){return[2,new Promise(function(r,n){try{var i=new FileReader,s=function(){r(i.result),i.removeEventListener(dr.loadend,s)};i.addEventListener(dr.loadend,s);var o=function(){n(i.error),i.removeEventListener(dr.error,o)};i.addEventListener(dr.error,o),i.readAsDataURL(t)}catch(u){n(u)}})]})})}var Dd="application/octet-stream";function Ud(t){return ia(this,void 0,void 0,function(){var e,r,n,i;return sa(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||Dd,[2,"data:".concat(i,";base64,").concat(e.toString("base64"))]}})})}});var su=qr(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.fileToBase64=void 0;var Pd=oa();Object.defineProperty(Bi,"fileToBase64",{enumerable:!0,get:function(){return Pd.blobToBase64}})});var ou=qr(Oe=>{"use strict";var Rd=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]})),Vi=Oe&&Oe.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Rd(e,t,r)};Object.defineProperty(Oe,"__esModule",{value:!0});Vi(nu(),Oe);Vi(iu(),Oe);Vi(oa(),Oe);Vi(su(),Oe)});var oi=globalThis,ai=oi.ShadowRoot&&(oi.ShadyCSS===void 0||oi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Xs=Symbol(),ol=new WeakMap,Wr=class{constructor(e,r,n){if(this._$cssResult$=!0,n!==Xs)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(ai&&e===void 0){let n=r!==void 0&&r.length===1;n&&(e=ol.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&ol.set(r,e))}return e}toString(){return this.cssText}},al=t=>new Wr(typeof t=="string"?t:t+"",void 0,Xs),ae=(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 Wr(r,t,Xs)},ll=(t,e)=>{if(ai)t.adoptedStyleSheets=e.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of e){let n=document.createElement("style"),i=oi.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)}},Ys=ai?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let n of e.cssRules)r+=n.cssText;return al(r)})(t):t;var{is:rh,defineProperty:nh,getOwnPropertyDescriptor:ih,getOwnPropertyNames:sh,getOwnPropertySymbols:oh,getPrototypeOf:ah}=Object,li=globalThis,cl=li.trustedTypes,lh=cl?cl.emptyScript:"",ch=li.reactiveElementPolyfillSupport,Gr=(t,e)=>t,Qs={toAttribute(t,e){switch(e){case Boolean:t=t?lh: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}},pl=(t,e)=>!rh(t,e),ul={attribute:!0,type:String,converter:Qs,reflect:!1,useDefault:!1,hasChanged:pl};Symbol.metadata??=Symbol("metadata"),li.litPropertyMetadata??=new WeakMap;var Ve=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=ul){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&&nh(this.prototype,e,i)}}static getPropertyDescriptor(e,r,n){let{get:i,set:s}=ih(this.prototype,e)??{get(){return this[r]},set(o){this[r]=o}};return{get:i,set(o){let u=i?.call(this);s?.call(this,o),this.requestUpdate(e,u,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??ul}static _$Ei(){if(this.hasOwnProperty(Gr("elementProperties")))return;let e=ah(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Gr("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Gr("properties"))){let r=this.properties,n=[...sh(r),...oh(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(Ys(i))}else e!==void 0&&r.push(Ys(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 ll(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:Qs).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:Qs;this._$Em=i;let u=o.fromAttribute(r,s.type);this[i]=u??this._$Ej?.get(i)??u,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??pl)(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,u=this[i];o!==!0||this._$AL.has(i)||u===void 0||this.C(i,void 0,s,u)}}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){}};Ve.elementStyles=[],Ve.shadowRootOptions={mode:"open"},Ve[Gr("elementProperties")]=new Map,Ve[Gr("finalized")]=new Map,ch?.({ReactiveElement:Ve}),(li.reactiveElementVersions??=[]).push("2.1.1");var to=globalThis,ci=to.trustedTypes,hl=ci?ci.createPolicy("lit-html",{createHTML:t=>t}):void 0,ro="$lit$",Fe=`lit$${Math.random().toFixed(9).slice(2)}$`,no="?"+Fe,uh=`<${no}>`,wt=document,Kr=()=>wt.createComment(""),Jr=t=>t===null||typeof t!="object"&&typeof t!="function",io=Array.isArray,yl=t=>io(t)||typeof t?.[Symbol.iterator]=="function",eo=`[
|
|
2
|
-
\f\r]`,
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
1
|
+
var ku=Object.create;var mo=Object.defineProperty;var Cu=Object.getOwnPropertyDescriptor;var $u=Object.getOwnPropertyNames;var Su=Object.getPrototypeOf,Eu=Object.prototype.hasOwnProperty;var Ml=t=>{throw TypeError(t)};var _u=(t,e,r)=>e in t?mo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Yr=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Mu=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of $u(e))!Eu.call(t,i)&&i!==r&&mo(t,i,{get:()=>e[i],enumerable:!(n=Cu(e,i))||n.enumerable});return t};var Au=(t,e,r)=>(r=t!=null?ku(Su(t)):{},Mu(e||!t||!t.__esModule?mo(r,"default",{value:t,enumerable:!0}):r,t));var w=(t,e,r)=>_u(t,typeof e!="symbol"?e+"":e,r),go=(t,e,r)=>e.has(t)||Ml("Cannot "+r);var o=(t,e,r)=>(go(t,e,"read from private field"),r?r.call(t):e.get(t)),d=(t,e,r)=>e.has(t)?Ml("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),g=(t,e,r,n)=>(go(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),m=(t,e,r)=>(go(t,e,"access private method"),r);var Al=(t,e,r,n)=>({set _(i){g(t,e,i,r)},get _(){return o(t,e,n)}});var k0=Yr(It=>{"use strict";var Q2=It&&It.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function u(p){try{c(n.next(p))}catch(f){a(f)}}function l(p){try{c(n.throw(p))}catch(f){a(f)}}function c(p){p.done?s(p.value):i(p.value).then(u,l)}c((n=n.apply(t,e||[])).next())})},eh=It&&It.__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,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(c){return function(p){return l([c,p])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=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(p){c=[6,p],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(It,"__esModule",{value:!0});It.base64ToBlob=th;function th(t){return Q2(this,void 0,void 0,function(){var e,r,n;return eh(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=nh(t),n&&(r=r.slice(0,r.size,n)),[2,r]}})})}var rh=/^data:(.+);base64,/;function nh(t){var e;return(e=t.match(rh))===null||e===void 0?void 0:e.slice(1,2).pop()}});var C0=Yr(Lt=>{"use strict";var ih=Lt&&Lt.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function u(p){try{c(n.next(p))}catch(f){a(f)}}function l(p){try{c(n.throw(p))}catch(f){a(f)}}function c(p){p.done?s(p.value):i(p.value).then(u,l)}c((n=n.apply(t,e||[])).next())})},sh=Lt&&Lt.__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,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(c){return function(p){return l([c,p])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=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(p){c=[6,p],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(Lt,"__esModule",{value:!0});Lt.base64ToFile=oh;function oh(t,e,r){return ih(this,void 0,void 0,function(){var n,i;return sh(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 $a=Yr(jt=>{"use strict";var ka=jt&&jt.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function u(p){try{c(n.next(p))}catch(f){a(f)}}function l(p){try{c(n.throw(p))}catch(f){a(f)}}function c(p){p.done?s(p.value):i(p.value).then(u,l)}c((n=n.apply(t,e||[])).next())})},Ca=jt&&jt.__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,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(c){return function(p){return l([c,p])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=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(p){c=[6,p],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(jt,"__esModule",{value:!0});jt.blobToBase64=ah;function ah(t){return ka(this,void 0,void 0,function(){return Ca(this,function(e){return[2,typeof FileReader=="function"?lh(t):uh(t)]})})}var vr;(function(t){t.error="error",t.loadend="loadend"})(vr||(vr={}));function lh(t){return ka(this,void 0,void 0,function(){return Ca(this,function(e){return[2,new Promise(function(r,n){try{var i=new FileReader,s=function(){r(i.result),i.removeEventListener(vr.loadend,s)};i.addEventListener(vr.loadend,s);var a=function(){n(i.error),i.removeEventListener(vr.error,a)};i.addEventListener(vr.error,a),i.readAsDataURL(t)}catch(u){n(u)}})]})})}var ch="application/octet-stream";function uh(t){return ka(this,void 0,void 0,function(){var e,r,n,i;return Ca(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||ch,[2,"data:".concat(i,";base64,").concat(e.toString("base64"))]}})})}});var $0=Yr(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts.fileToBase64=void 0;var hh=$a();Object.defineProperty(ts,"fileToBase64",{enumerable:!0,get:function(){return hh.blobToBase64}})});var S0=Yr(Ue=>{"use strict";var ph=Ue&&Ue.__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]})),rs=Ue&&Ue.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&ph(e,t,r)};Object.defineProperty(Ue,"__esModule",{value:!0});rs(k0(),Ue);rs(C0(),Ue);rs($a(),Ue);rs($0(),Ue)});var vi=globalThis,yi=vi.ShadowRoot&&(vi.ShadyCSS===void 0||vi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,wo=Symbol(),Il=new WeakMap,Qr=class{constructor(e,r,n){if(this._$cssResult$=!0,n!==wo)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(yi&&e===void 0){let n=r!==void 0&&r.length===1;n&&(e=Il.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Il.set(r,e))}return e}toString(){return this.cssText}},Ll=t=>new Qr(typeof t=="string"?t:t+"",void 0,wo),K=(t,...e)=>{let r=t.length===1?t[0]:e.reduce(((n,i,s)=>n+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new Qr(r,t,wo)},jl=(t,e)=>{if(yi)t.adoptedStyleSheets=e.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of e){let n=document.createElement("style"),i=vi.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)}},vo=yi?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let n of e.cssRules)r+=n.cssText;return Ll(r)})(t):t;var{is:Iu,defineProperty:Lu,getOwnPropertyDescriptor:ju,getOwnPropertyNames:Tu,getOwnPropertySymbols:Du,getPrototypeOf:Ou}=Object,bi=globalThis,Tl=bi.trustedTypes,Pu=Tl?Tl.emptyScript:"",Uu=bi.reactiveElementPolyfillSupport,en=(t,e)=>t,yo={toAttribute(t,e){switch(e){case Boolean:t=t?Pu: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}},Ol=(t,e)=>!Iu(t,e),Dl={attribute:!0,type:String,converter:yo,reflect:!1,useDefault:!1,hasChanged:Ol};Symbol.metadata??=Symbol("metadata"),bi.litPropertyMetadata??=new WeakMap;var Fe=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=Dl){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&&Lu(this.prototype,e,i)}}static getPropertyDescriptor(e,r,n){let{get:i,set:s}=ju(this.prototype,e)??{get(){return this[r]},set(a){this[r]=a}};return{get:i,set(a){let u=i?.call(this);s?.call(this,a),this.requestUpdate(e,u,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Dl}static _$Ei(){if(this.hasOwnProperty(en("elementProperties")))return;let e=Ou(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(en("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(en("properties"))){let r=this.properties,n=[...Tu(r),...Du(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(vo(i))}else e!==void 0&&r.push(vo(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 jl(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:yo).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),a=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:yo;this._$Em=i;let u=a.fromAttribute(r,s.type);this[i]=u??this._$Ej?.get(i)??u,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??Ol)(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},a){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??r??this[e]),s!==!0||a!==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:a}=s,u=this[i];a!==!0||this._$AL.has(i)||u===void 0||this.C(i,void 0,s,u)}}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){}};Fe.elementStyles=[],Fe.shadowRootOptions={mode:"open"},Fe[en("elementProperties")]=new Map,Fe[en("finalized")]=new Map,Uu?.({ReactiveElement:Fe}),(bi.reactiveElementVersions??=[]).push("2.1.1");var xo=globalThis,xi=xo.trustedTypes,Pl=xi?xi.createPolicy("lit-html",{createHTML:t=>t}):void 0,ko="$lit$",Ne=`lit$${Math.random().toFixed(9).slice(2)}$`,Co="?"+Ne,Ru=`<${Co}>`,yt=document,rn=()=>yt.createComment(""),nn=t=>t===null||typeof t!="object"&&typeof t!="function",$o=Array.isArray,zl=t=>$o(t)||typeof t?.[Symbol.iterator]=="function",bo=`[
|
|
2
|
+
\f\r]`,tn=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ul=/-->/g,Rl=/>/g,wt=RegExp(`>|${bo}(?:([^\\s"'>=/]+)(${bo}*=${bo}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Vl=/'/g,Bl=/"/g,Fl=/^(?:script|style|textarea|title)$/i,So=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),h=So(1),yp=So(2),bp=So(3),Ae=Symbol.for("lit-noChange"),N=Symbol.for("lit-nothing"),Hl=new WeakMap,vt=yt.createTreeWalker(yt,129);function Nl(t,e){if(!$o(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Pl!==void 0?Pl.createHTML(e):e}var ql=(t,e)=>{let r=t.length-1,n=[],i,s=e===2?"<svg>":e===3?"<math>":"",a=tn;for(let u=0;u<r;u++){let l=t[u],c,p,f=-1,v=0;for(;v<l.length&&(a.lastIndex=v,p=a.exec(l),p!==null);)v=a.lastIndex,a===tn?p[1]==="!--"?a=Ul:p[1]!==void 0?a=Rl:p[2]!==void 0?(Fl.test(p[2])&&(i=RegExp("</"+p[2],"g")),a=wt):p[3]!==void 0&&(a=wt):a===wt?p[0]===">"?(a=i??tn,f=-1):p[1]===void 0?f=-2:(f=a.lastIndex-p[2].length,c=p[1],a=p[3]===void 0?wt:p[3]==='"'?Bl:Vl):a===Bl||a===Vl?a=wt:a===Ul||a===Rl?a=tn:(a=wt,i=void 0);let x=a===wt&&t[u+1].startsWith("/>")?" ":"";s+=a===tn?l+Ru:f>=0?(n.push(c),l.slice(0,f)+ko+l.slice(f)+Ne+x):l+Ne+(f===-2?u:x)}return[Nl(t,s+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},sn=class t{constructor({strings:e,_$litType$:r},n){let i;this.parts=[];let s=0,a=0,u=e.length-1,l=this.parts,[c,p]=ql(e,r);if(this.el=t.createElement(c,n),vt.currentNode=this.el.content,r===2||r===3){let f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(i=vt.nextNode())!==null&&l.length<u;){if(i.nodeType===1){if(i.hasAttributes())for(let f of i.getAttributeNames())if(f.endsWith(ko)){let v=p[a++],x=i.getAttribute(f).split(Ne),S=/([.?@])?(.*)/.exec(v);l.push({type:1,index:s,name:S[2],strings:x,ctor:S[1]==="."?Ci:S[1]==="?"?$i:S[1]==="@"?Si:xt}),i.removeAttribute(f)}else f.startsWith(Ne)&&(l.push({type:6,index:s}),i.removeAttribute(f));if(Fl.test(i.tagName)){let f=i.textContent.split(Ne),v=f.length-1;if(v>0){i.textContent=xi?xi.emptyScript:"";for(let x=0;x<v;x++)i.append(f[x],rn()),vt.nextNode(),l.push({type:2,index:++s});i.append(f[v],rn())}}}else if(i.nodeType===8)if(i.data===Co)l.push({type:2,index:s});else{let f=-1;for(;(f=i.data.indexOf(Ne,f+1))!==-1;)l.push({type:7,index:s}),f+=Ne.length-1}s++}}static createElement(e,r){let n=yt.createElement("template");return n.innerHTML=e,n}};function bt(t,e,r=t,n){if(e===Ae)return e;let i=n!==void 0?r._$Co?.[n]:r._$Cl,s=nn(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=bt(t,i._$AS(t,e.values),i,n)),e}var ki=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??yt).importNode(r,!0);vt.currentNode=i;let s=vt.nextNode(),a=0,u=0,l=n[0];for(;l!==void 0;){if(a===l.index){let c;l.type===2?c=new Kt(s,s.nextSibling,this,e):l.type===1?c=new l.ctor(s,l.name,l.strings,this,e):l.type===6&&(c=new Ei(s,this,e)),this._$AV.push(c),l=n[++u]}a!==l?.index&&(s=vt.nextNode(),a++)}return vt.currentNode=yt,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++}},Kt=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,n,i){this.type=2,this._$AH=N,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=bt(this,e,r),nn(e)?e===N||e==null||e===""?(this._$AH!==N&&this._$AR(),this._$AH=N):e!==this._$AH&&e!==Ae&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):zl(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!==N&&nn(this._$AH)?this._$AA.nextSibling.data=e:this.T(yt.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=sn.createElement(Nl(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(r);else{let s=new ki(i,this),a=s.u(this.options);s.p(r),this.T(a),this._$AH=s}}_$AC(e){let r=Hl.get(e.strings);return r===void 0&&Hl.set(e.strings,r=new sn(e)),r}k(e){$o(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(rn()),this.O(rn()),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))}},xt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,n,i,s){this.type=1,this._$AH=N,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=N}_$AI(e,r=this,n,i){let s=this.strings,a=!1;if(s===void 0)e=bt(this,e,r,0),a=!nn(e)||e!==this._$AH&&e!==Ae,a&&(this._$AH=e);else{let u=e,l,c;for(e=s[0],l=0;l<s.length-1;l++)c=bt(this,u[n+l],r,l),c===Ae&&(c=this._$AH[l]),a||=!nn(c)||c!==this._$AH[l],c===N?e=N:e!==N&&(e+=(c??"")+s[l+1]),this._$AH[l]=c}a&&!i&&this.j(e)}j(e){e===N?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Ci=class extends xt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===N?void 0:e}},$i=class extends xt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==N)}},Si=class extends xt{constructor(e,r,n,i,s){super(e,r,n,i,s),this.type=5}_$AI(e,r=this){if((e=bt(this,e,r,0)??N)===Ae)return;let n=this._$AH,i=e===N&&n!==N||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,s=e!==N&&(n===N||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)}},Ei=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){bt(this,e)}},Zl={M:ko,P:Ne,A:Co,C:1,L:ql,R:ki,D:zl,V:bt,I:Kt,H:xt,N:$i,U:Si,B:Ci,F:Ei},Vu=xo.litHtmlPolyfillSupport;Vu?.(sn,Kt),(xo.litHtmlVersions??=[]).push("3.3.1");var Wl=(t,e,r)=>{let n=r?.renderBefore??e,i=n._$litPart$;if(i===void 0){let s=r?.renderBefore??null;n._$litPart$=i=new Kt(e.insertBefore(rn(),s),s,void 0,r??{})}return i._$AI(t),i};var Eo=globalThis,$=class extends Fe{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=Wl(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Ae}};$._$litElement$=!0,$.finalized=!0,Eo.litElementHydrateSupport?.({LitElement:$});var Bu=Eo.litElementPolyfillSupport;Bu?.({LitElement:$});(Eo.litElementVersions??=[]).push("4.2.1");var on=class on extends HTMLElement{constructor(){super();w(this,"name","");this.attachShadow({mode:"open"})}attributeChangedCallback(r,n,i){if(n!==i&&on.observedAttributes.includes(r)){switch(r){case"name":this.name=i||"";break}this.render()}}resolveIcon(r){throw new Error("Not implemented")}render(){let r=document.createElement("style");for(r.textContent=`
|
|
4
4
|
:host {
|
|
5
5
|
display: inline-block;
|
|
6
6
|
line-height: 0;
|
|
7
7
|
}
|
|
8
|
-
`;this.shadowRoot?.firstChild;)this.shadowRoot.removeChild(this.shadowRoot.firstChild),this.shadowRoot.appendChild(r);if(!this.name)return;let n=this.resolveIcon(this.name);if(!n){console.warn(`'${this.name}' not found, please add it to ${
|
|
8
|
+
`;this.shadowRoot?.firstChild;)this.shadowRoot.removeChild(this.shadowRoot.firstChild),this.shadowRoot.appendChild(r);if(!this.name)return;let n=this.resolveIcon(this.name);if(!n){console.warn(`'${this.name}' not found, please add it to ${on.name}`);return}let a=new DOMParser().parseFromString(n,"image/svg+xml").documentElement;a.setAttribute("fill","currentColor"),a.style.width="100%",a.style.height="100%",this.shadowRoot?.appendChild(a)}};w(on,"observedAttributes",["name"]);var _i=on;var Gl={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"/>
|
|
@@ -123,7 +123,7 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
123
123
|
<path d="M2.25 6.75C2.25 15.0343 8.96573 21.75 17.25 21.75H19.5C20.7426 21.75 21.75 20.7426 21.75 19.5V18.1284C21.75 17.6121 21.3987 17.1622 20.8979 17.037L16.4747 15.9312C16.0355 15.8214 15.5734 15.9855 15.3018 16.3476L14.3316 17.6412C14.05 18.0166 13.563 18.1827 13.1223 18.0212C9.81539 16.8098 7.19015 14.1846 5.97876 10.8777C5.81734 10.437 5.98336 9.94998 6.3588 9.6684L7.65242 8.69818C8.01453 8.4266 8.17861 7.96445 8.06883 7.52533L6.96304 3.10215C6.83783 2.60133 6.38785 2.25 5.87163 2.25H4.5C3.25736 2.25 2.25 3.25736 2.25 4.5V6.75Z" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
124
124
|
</svg>`,"eye-slash":`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
125
125
|
<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"/>
|
|
126
|
-
</svg>`};var dh=Sl,ao=class extends mi{resolveIcon(e){let r=dh[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",ao);var Qr,he,me,en,lo,gi=class{constructor(e,r){h(this,en);h(this,Qr);h(this,he);h(this,me);if(!e)throw new Error("host is required");if(!r)throw new Error("config is required");g(this,Qr,e),a(this,Qr).addController(this),g(this,he,r)}connect(e){g(this,he,e),g(this,me,m(this,en,lo).call(this))}hostConnected(){a(this,me)||setTimeout(()=>{a(this,me)||g(this,me,m(this,en,lo).call(this))},0)}hostDisconnected(){a(this,me)?.close(1e3,"lit_host_disconnected"),g(this,me,void 0)}send(e){a(this,me)?.send(e)}close(e,r){a(this,me)?.close(e,r)}get isConnected(){return a(this,me)?.readyState===WebSocket.OPEN}get isConnecting(){return a(this,me)?.readyState===WebSocket.CONNECTING}};Qr=new WeakMap,he=new WeakMap,me=new WeakMap,en=new WeakSet,lo=function(){let e=new WebSocket(a(this,he).url());return a(this,he).onClose&&(e.onclose=a(this,he).onClose),a(this,he).onOpen&&(e.onopen=a(this,he).onOpen),a(this,he).onError&&(e.onerror=a(this,he).onError),a(this,he).onMessage&&(e.onmessage=a(this,he).onMessage),e};var $l=Array.isArray;var co=t=>!!(t&&t.constructor&&t.call&&t.apply);var El=t=>!(!t||!t.then||!co(t.then));var uo=(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*tn(t,e,r=i=>i,n=1){let i=co(r)?r:()=>r,s=e?t:0,o=e??t;for(let u=s;u<=o&&(yield i(u),!(u+n>o));u+=n);}var po=(t,e,r,n)=>Array.from(tn(t,e,r,n));var ho=(t,e)=>t?t.reduce((r,n)=>{let[i,s]=r;return e(n)?[[...i,n],s]:[i,[...s,n]]},[[],[]]):[[],[]];var fo=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}},mo=async(t,e,r)=>{let n=e.map((c,p)=>({index:p,item:c})),i=async c=>{let p=[];for(;;){let d=n.pop();if(!d)return c(p);let[y,x]=await rn(r)(d.item);p.push({error:y,result:x,index:d.index})}},s=po(1,t).map(()=>new Promise(i)),o=await Promise.all(s),[u,l]=ho(uo(o.flat(),c=>c.index),c=>!!c.error);if(u.length>0)throw new fo(u.map(c=>c.error));return l.map(c=>c.result)};var wi=t=>new Promise(e=>setTimeout(e,t)),rn=t=>(...e)=>{try{let r=t(...e);return El(r)?r.then(n=>[void 0,n]).catch(n=>[n,void 0]):[void 0,r]}catch(r){return[r,void 0]}};async function _l(t,e){let r=t?.times??3,n=t?.delay,i=t?.backoff??null;for(let s of tn(1,r)){let[o,u]=await rn(e)(l=>{throw{_exited:l}});if(!o)return u;if(o._exited)throw o._exited;if(s===r)throw o;n&&await wi(n),i&&await wi(i(s))}throw new Error("unreachable")}var fh=!0,go="Invariant failed";function Ne(t,e){if(!t){if(fh)throw new Error(go);var r=typeof e=="function"?e():e,n=r?"".concat(go,": ").concat(r):go;throw new Error(n)}}var K,ee,G,Wt,Gt,xe,J,Me,Ml,Al,Il,Tl,yi=class{constructor(e,r){h(this,J);h(this,K);h(this,ee);h(this,G,null);w(this,"isStreaming",!1);w(this,"typingIndicator");w(this,"ranOutOfCredits",!1);w(this,"messages",[]);w(this,"conversationId","");h(this,Wt,0);h(this,Gt);w(this,"isLiveMode",!1);h(this,xe,[]);g(this,K,e),g(this,ee,r),a(this,ee).autoConnect!==!1&&g(this,G,this.initWS()),e.addController(this)}get hasQueuedMessages(){return a(this,xe).length>0}async enqueueMessage(e,{expectStreaming:r=!1}={}){if(a(this,xe).length>0){let n=a(this,xe)[a(this,xe).length-1];if(e.type==="USER_INPUT"&&n.message.type==="USER_INPUT"&&e.value===n.message.value)return!0}return a(this,G)||this.connect(),a(this,G)?.isConnected?m(this,J,Me).call(this,e,{expectStreaming:r}):(a(this,xe).push({message:e,options:{expectStreaming:r}}),a(this,K).requestUpdate(),a(this,G)&&!a(this,G).isConnecting&&!a(this,G).isConnected&&this.retry(),await _l({times:5,delay:2e3},async()=>{if(a(this,G)?.isConnected){let n=[...a(this,xe)];g(this,xe,[]),a(this,K).requestUpdate();let i=!1;for(let{message:s,options:o}of n){let u=m(this,J,Me).call(this,s,o);s===e&&(i=u)}return i}else throw new Error("WebSocket not connected yet")}).catch(()=>(console.warn("Failed to send message after retries",e),g(this,xe,[]),a(this,K).requestUpdate(),!1)))}sendUserInput(e,{xUserData:r,xCustomInstructions:n,role:i="user",expectStreaming:s=!1}={}){return m(this,J,Me).call(this,{type:"USER_INPUT",value:e,role:i,xUserData:r,xCustomInstructions:n},{expectStreaming:s})}async enqueueUserInput(e,{xUserData:r,xCustomInstructions:n,role:i="user",expectStreaming:s=!1}={}){return this.enqueueMessage({type:"USER_INPUT",value:e,role:i,xUserData:r,xCustomInstructions:n},{expectStreaming:s})}sendImageDelete(e){return Ne(e,"imageId is required"),m(this,J,Me).call(this,{type:"USER_FILE_DELETE",imageId:e})}sendUserCancel(){return m(this,J,Me).call(this,{type:"USER_CANCEL"})}sendUserTypingStart(){return m(this,J,Me).call(this,{type:"USER_TYPING_START"})}sendUserTypingStop(){return m(this,J,Me).call(this,{type:"USER_TYPING_STOP"})}sendUserMeta(e){return m(this,J,Me).call(this,{type:"USER_META",metadata:e})}reloadConfig(){m(this,J,Me).call(this,{type:"RELOAD_CONFIG"})}close(){a(this,G)?.close(1e3,"closed by user")}retry(){clearTimeout(a(this,Gt)),g(this,Gt,setTimeout(()=>{a(this,ee).onReconnect?.(),g(this,G,this.initWS())},1e3*a(this,Wt))),sl(this,Wt)._++}initWS(){return new gi(a(this,K),{url:()=>a(this,ee).url(this.conversationId,{}),onOpen:e=>m(this,J,Ml).call(this,e),onMessage:e=>m(this,J,Al).call(this,JSON.parse(e.data)),onError:e=>m(this,J,Il).call(this,e),onClose:e=>m(this,J,Tl).call(this,e)})}hostConnected(){this.conversationId=a(this,ee).restoreConversationState?.()?.conversationId||"",this.messages=a(this,ee).restoreConversationState?.()?.messages||[]}reset(){m(this,J,Me).call(this,{type:"NEW_CHAT"}),a(this,ee).onReset?.(),this.isStreaming=!1,this.typingIndicator=void 0,this.ranOutOfCredits=!1,this.messages=[],this.conversationId="",this.isLiveMode=!1,g(this,xe,[]),a(this,K).requestUpdate()}hostDisconnected(){clearTimeout(a(this,Gt))}connect(){a(this,G)||g(this,G,this.initWS())}reconnectSocket(){a(this,G)?.close(1e3,"destroy"),g(this,G,this.initWS())}get lastMsg(){if(this.messages.length>0)return this.messages[this.messages.length-1]}};K=new WeakMap,ee=new WeakMap,G=new WeakMap,Wt=new WeakMap,Gt=new WeakMap,xe=new WeakMap,J=new WeakSet,Me=function(e,{expectStreaming:r=!1}={}){return this.ranOutOfCredits?!1:a(this,G)?a(this,G).isConnecting?(console.warn("WebSocket is connecting, message not sent",e),!1):a(this,G).isConnected?(r&&!this.isLiveMode&&(this.isStreaming=!0,a(this,K).requestUpdate()),a(this,G).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)},Ml=function(e){g(this,Wt,0)},Al=function(e){switch(e.type){case"NEW_MESSAGE":{this.messages=[...this.messages,{...e.message,streaming:!0}].filter((r,n,i)=>n===i.findIndex(s=>s.id===r.id)),this.typingIndicator=void 0,a(this,K).requestUpdate(),a(this,ee).onNewMessage?.(e.message);break}case"APPEND_MESSAGE":{let r=this.messages.find(n=>n.id===e.message.id);if(r){switch(e.message.content_type){case"text":{let{part:n,delta:i,position:s}=e.message;r.content=r.content.slice(0,s)+i,r.parts||=[],r.parts[n]={text:r.parts[n]&&"text"in r.parts[n]?(r.parts[n].text||"").slice(0,s)+i:i};break}case"html":{let{part:n,delta:i,position:s}=e.message;r.parts||=[],r.parts[n]={html:r.parts[n]&&"html"in r.parts[n]?(r.parts[n].html||"").slice(0,s)+i:i};break}case"data":{let{part:n}=e.message;r.parts||=[],r.parts[n]={tag:e.message.tag,data:r.parts[n]&&"data"in r.parts[n]?Object.assign(r.parts[n].data||{},e.message.data):e.message.data};break}}e.metadata&&(r.metadata=e.metadata),a(this,ee).onMessageAppend?.(e),a(this,K).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,a(this,K).requestUpdate(),a(this,ee).onMessageDone?.(e,r),a(this,ee).persistConversationState?.(this.conversationId,this.messages);break}case"MESSAGE_CANCEL":{this.isStreaming=!1,this.typingIndicator=void 0,a(this,K).requestUpdate();break}case"ERROR":{a(this,ee).onMessageError?.(e);break}case"CONNECTED":{this.conversationId=e.conversationId,this.messages=e.messages,a(this,ee).onConnect?.(e.conversationId,e.metadata),a(this,ee).persistConversationState?.(e.conversationId,e.messages),this.isLiveMode=e.metadata?.isLiveMode,a(this,K).requestUpdate();break}case"TYPING_START":{e.role==="assistant"&&(this.isStreaming=!0),this.typingIndicator={role:e.role,metadata:e.metadata},a(this,K).requestUpdate();break}case"TYPING_STOP":{this.typingIndicator=void 0,a(this,K).requestUpdate();break}case"RAN_OUT_OF_CREDITS":{this.ranOutOfCredits=!0,a(this,K).requestUpdate();break}case"RECONNECT":{this.reconnectSocket(),a(this,K).requestUpdate();break}default:console.warn(`Unknown message type: ${JSON.stringify(e)}`)}},Il=function(e){console.error("onError",e),a(this,ee).onError?.(e)},Tl=function(e){a(this,K).isConnected&&a(this,G)&&!a(this,G).isConnected&&e.reason==="reconnect"&&this.retry(),this.isStreaming=!1,this.typingIndicator=void 0,a(this,K).requestUpdate(),a(this,ee).onClose?.()};var l0=Symbol(),mh=Symbol();var Ll=Object.getPrototypeOf,wo=new WeakMap,gh=t=>t&&(wo.has(t)?wo.get(t):Ll(t)===Object.prototype||Ll(t)===Array.prototype);var jl=t=>gh(t)&&t[mh]||null,yo=(t,e=!0)=>{wo.set(t,e)};var bo=t=>typeof t=="object"&&t!==null,wh=t=>bo(t)&&!xo.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),Ul=(t,e)=>{let r=Ol.get(t);if(r?.[0]===e)return r[1];let n=Array.isArray(t)?[]:Object.create(Object.getPrototypeOf(t));return yo(n,!0),Ol.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),u={value:s,enumerable:o,configurable:!0};if(xo.has(s))yo(s,!1);else if(bt.has(s)){let[l,c]=bt.get(s);u.value=Ul(l,c())}Object.defineProperty(n,i,u)}),Object.preventExtensions(n)},yh=(t,e,r,n)=>({deleteProperty(i,s){let o=Reflect.get(i,s);r(s);let u=Reflect.deleteProperty(i,s);return u&&n(["delete",[s],o]),u},set(i,s,o,u){let l=!t()&&Reflect.has(i,s),c=Reflect.get(i,s,u);if(l&&(Dl(c,o)||vi.has(o)&&Dl(c,vi.get(o))))return!0;r(s),bo(o)&&(o=jl(o)||o);let p=!bt.has(o)&&bh(o)?ko(o):o;return e(s,p),Reflect.set(i,s,p,u),n(["set",[s],o,c]),!0}}),bt=new WeakMap,xo=new WeakSet,Ol=new WeakMap,vo=[1],vi=new WeakMap,Dl=Object.is,vh=(t,e)=>new Proxy(t,e),bh=wh,xh=Ul,kh=yh;function ko(t={}){if(!bo(t))throw new Error("object required");let e=vi.get(t);if(e)return e;let r=vo[0],n=new Set,i=(C,T=++vo[0])=>{r!==T&&(s=r=T,n.forEach(k=>k(C,T)))},s=r,o=(C=vo[0])=>(s!==C&&(s=C,l.forEach(([T])=>{let k=T[1](C);k>r&&(r=k)})),r),u=C=>(T,k)=>{let _=[...T];_[1]=[C,..._[1]],i(_,k)},l=new Map,c=(C,T)=>{let k=!xo.has(T)&&bt.get(T);if(k){if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&l.has(C))throw new Error("prop listener already exists");if(n.size){let _=k[2](u(C));l.set(C,[k,_])}else l.set(C,[k])}},p=C=>{var T;let k=l.get(C);k&&(l.delete(C),(T=k[1])==null||T.call(k))},d=C=>(n.add(C),n.size===1&&l.forEach(([k,_],L)=>{if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&_)throw new Error("remove already exists");let H=k[2](u(L));l.set(L,[k,H])}),()=>{n.delete(C),n.size===0&&l.forEach(([k,_],L)=>{_&&(_(),l.set(L,[k]))})}),y=!0,x=kh(()=>y,c,p,i),S=vh(t,x);vi.set(t,S);let I=[t,o,d];return bt.set(S,I),Reflect.ownKeys(t).forEach(C=>{let T=Object.getOwnPropertyDescriptor(t,C);"value"in T&&T.writable&&(S[C]=t[C])}),y=!1,S}function bi(t,e,r){let n=bt.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],u=!1,c=o(p=>{if(s.push(p),r){e(s.splice(0));return}i||(i=Promise.resolve().then(()=>{i=void 0,u&&e(s.splice(0))}))});return u=!0,()=>{u=!1,c()}}function Zt(t){let e=bt.get(t);(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!e&&console.warn("Please use proxy object");let[r,n]=e;return xh(r,n())}var nn,Kt,xt,Jt,Xt=class{constructor(e,r){h(this,nn);h(this,Kt);h(this,xt);h(this,Jt,()=>{});g(this,nn,e),g(this,Kt,r),g(this,xt,Zt(r)),e.addController(this)}get state(){return a(this,xt)}get value(){return a(this,xt)}hostConnected(){a(this,Jt).call(this),g(this,Jt,bi(a(this,Kt),()=>{g(this,xt,Zt(a(this,Kt))),a(this,nn).requestUpdate()}))}hostDisconnected(){a(this,Jt).call(this)}};nn=new WeakMap,Kt=new WeakMap,xt=new WeakMap,Jt=new WeakMap;var sn,on,kt,Yt,Xe=class{constructor(e,r,n){h(this,sn);h(this,on);w(this,"proxyObject");h(this,kt);h(this,Yt,()=>{});g(this,sn,e),g(this,on,n),this.proxyObject=ko(r),g(this,kt,Zt(this.proxyObject)),e.addController(this)}get state(){return a(this,kt)}get value(){return a(this,kt)}hostConnected(){a(this,Yt).call(this),a(this,on)?.subscribe&&g(this,Yt,bi(this.proxyObject,()=>{g(this,kt,Zt(this.proxyObject)),a(this,sn).requestUpdate()}))}hostDisconnected(){a(this,Yt).call(this)}};sn=new WeakMap,on=new WeakMap,kt=new WeakMap,Yt=new WeakMap;var Qt,an,er,Ct,St,xi=class{constructor(e,{provider:r,tag:n,key:i}){h(this,Qt);h(this,an);h(this,er);h(this,Ct,null);h(this,St,null);g(this,Qt,e),g(this,an,n),g(this,er,i),e.addController(this)}get value(){return a(this,St)?a(this,St).value:null}hostConnected(){if(a(this,St)||(g(this,Ct,Ch(a(this,Qt),a(this,an))),!a(this,Ct)))return;let e=a(this,Ct)[a(this,er)]instanceof Xe?a(this,Ct)[a(this,er)]:null;e&&g(this,St,new Xt(a(this,Qt),e.proxyObject))}hostDisconnected(){}};Qt=new WeakMap,an=new WeakMap,er=new WeakMap,Ct=new WeakMap,St=new WeakMap;function Ch(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 Pl=()=>{if(window.Shopify)try{return{customerId:Sh()}}catch{return null}return null},Sh=()=>{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},Rl=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 Bl(t,e="http"){return t.startsWith("http://")||t.startsWith("https://")?t:`${e}://${t}`}function Co(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 Vl(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 Fl=()=>{if(window.ShopRenter)try{let t=Eh();return{customerEmail:t?.customerEmail,customerId:t?.customerId,customerName:t?.customerName}}catch{return null}return null},Eh=()=>{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}}},Nl=async()=>{try{let t=window.ShopRenter.shop?.domain;if(!t)return[];let e=Bl(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 Hl=()=>{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},zl=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 So;function $o(t){return{lang:t?.lang??So?.lang,message:t?.message,abortEarly:t?.abortEarly??So?.abortEarly,abortPipeEarly:t?.abortPipeEarly??So?.abortPipeEarly}}var Ah;function Ih(t){return Ah?.get(t)}var Th;function Lh(t){return Th?.get(t)}var jh;function Oh(t,e){return jh?.get(t)?.get(e)}function Wl(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 ge(t,e,r,n,i){let s=i&&"input"in i?i.input:r.value,o=i?.expected??t.expects??null,u=i?.received??Wl(s),l={kind:t.kind,type:t.type,input:s,expected:o,received:u,message:`Invalid ${e}: ${o?`Expected ${o} but r`:"R"}eceived ${u}`,requirement:t.requirement,path:i?.path,issues:i?.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=t.kind==="schema",p=i?.message??t.message??Oh(t.reference,l.lang)??(c?Lh(l.lang):null)??n.message??Ih(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function we(t){return{version:1,vendor:"valibot",validate(e){return t["~run"]({value:e},$o())}}}function Dh(t,e){return Object.hasOwn(t,e)&&e!=="__proto__"&&e!=="prototype"&&e!=="constructor"}function Gl(t,e){let r=[...new Set(t)];return r.length>1?`(${r.join(` ${e} `)})`:r[0]??"never"}var Uh=class extends Error{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}};function Eo(t,e){return{kind:"validation",type:"max_length",reference:Eo,async:!1,expects:`<=${t}`,requirement:t,message:e,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&ge(this,"length",r,n,{received:`${r.value.length}`}),r}}}function _o(t,e){return{kind:"validation",type:"min_length",reference:_o,async:!1,expects:`>=${t}`,requirement:t,message:e,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&ge(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Ph(t,e,r){return typeof t.fallback=="function"?t.fallback(e,r):t.fallback}function Zl(t,e,r){return typeof t.default=="function"?t.default(e,r):t.default}function Mo(){return{kind:"schema",type:"any",reference:Mo,expects:"any",async:!1,get"~standard"(){return we(this)},"~run"(t){return t.typed=!0,t}}}function tr(t,e){return{kind:"schema",type:"array",reference:tr,expects:"Array",async:!1,item:t,message:e,get"~standard"(){return we(this)},"~run"(r,n){let i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let s=0;s<i.length;s++){let o=i[s],u=this.item["~run"]({value:o},n);if(u.issues){let l={type:"array",origin:"value",input:i,key:s,value:o};for(let c of u.issues)c.path?c.path.unshift(l):c.path=[l],r.issues?.push(c);if(r.issues||(r.issues=u.issues),n.abortEarly){r.typed=!1;break}}u.typed||(r.typed=!1),r.value.push(u.value)}}else ge(this,"type",r,n);return r}}}function Ao(t){return{kind:"schema",type:"boolean",reference:Ao,expects:"boolean",async:!1,message:t,get"~standard"(){return we(this)},"~run"(e,r){return typeof e.value=="boolean"?e.typed=!0:ge(this,"type",e,r),e}}}function Io(t){return{kind:"schema",type:"null",reference:Io,expects:"null",async:!1,message:t,get"~standard"(){return we(this)},"~run"(e,r){return e.value===null?e.typed=!0:ge(this,"type",e,r),e}}}function ki(t){return{kind:"schema",type:"number",reference:ki,expects:"number",async:!1,message:t,get"~standard"(){return we(this)},"~run"(e,r){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:ge(this,"type",e,r),e}}}function He(t,e){return{kind:"schema",type:"object",reference:He,expects:"Object",async:!1,entries:t,message:e,get"~standard"(){return we(this)},"~run"(r,n){let i=r.value;if(i&&typeof i=="object"){r.typed=!0,r.value={};for(let s in this.entries){let o=this.entries[s];if(s in i||(o.type==="exact_optional"||o.type==="optional"||o.type==="nullish")&&o.default!==void 0){let u=s in i?i[s]:Zl(o),l=o["~run"]({value:u},n);if(l.issues){let c={type:"object",origin:"value",input:i,key:s,value:u};for(let p of l.issues)p.path?p.path.unshift(c):p.path=[c],r.issues?.push(p);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value[s]=l.value}else if(o.fallback!==void 0)r.value[s]=Ph(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(ge(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 ge(this,"type",r,n);return r}}}function rr(t,e){return{kind:"schema",type:"optional",reference:rr,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,get"~standard"(){return we(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=Zl(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function To(t,e){return{kind:"schema",type:"picklist",reference:To,expects:Gl(t.map(Wl),"|"),async:!1,options:t,message:e,get"~standard"(){return we(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:ge(this,"type",r,n),r}}}function Ci(t,e,r){return{kind:"schema",type:"record",reference:Ci,expects:"Object",async:!1,key:t,value:e,message:r,get"~standard"(){return we(this)},"~run"(n,i){let s=n.value;if(s&&typeof s=="object"){n.typed=!0,n.value={};for(let o in s)if(Dh(s,o)){let u=s[o],l=this.key["~run"]({value:o},i);if(l.issues){let p={type:"object",origin:"key",input:s,key:o,value:u};for(let d of l.issues)d.path=[p],n.issues?.push(d);if(n.issues||(n.issues=l.issues),i.abortEarly){n.typed=!1;break}}let c=this.value["~run"]({value:u},i);if(c.issues){let p={type:"object",origin:"value",input:s,key:o,value:u};for(let d of c.issues)d.path?d.path.unshift(p):d.path=[p],n.issues?.push(d);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 ge(this,"type",n,i);return n}}}function X(t){return{kind:"schema",type:"string",reference:X,expects:"string",async:!1,message:t,get"~standard"(){return we(this)},"~run"(e,r){return typeof e.value=="string"?e.typed=!0:ge(this,"type",e,r),e}}}function ql(t){let e;if(t)for(let r of t)e?e.push(...r.issues):e=r.issues;return e}function nr(t,e){return{kind:"schema",type:"union",reference:nr,expects:Gl(t.map(r=>r.expects),"|"),async:!1,options:t,message:e,get"~standard"(){return we(this)},"~run"(r,n){let i,s,o;for(let u of this.options){let l=u["~run"]({value:r.value},n);if(l.typed)if(l.issues)s?s.push(l):s=[l];else{i=l;break}else o?o.push(l):o=[l]}if(i)return i;if(s){if(s.length===1)return s[0];ge(this,"type",r,n,{issues:ql(s)}),r.typed=!0}else{if(o?.length===1)return o[0];ge(this,"type",r,n,{issues:ql(o)})}return r}}}function Kl(t,e,r){let n=t["~run"]({value:e},$o(r));if(n.issues)throw new Uh(n.issues);return n.value}function Jl(t,e){let r={};for(let n in t.entries)r[n]=!e||e.includes(n)?rr(t.entries[n]):t.entries[n];return{...t,entries:r,get"~standard"(){return we(this)}}}function Xl(...t){return{...t[0],pipe:t,get"~standard"(){return we(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 ln(t,e,r){let n=t["~run"]({value:e},$o(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var Yl=Ci(X(),nr([X(),ki(),Ao(),Io()])),Ql=Xl(X(),_o(1),Eo(5e3)),ec=()=>{try{return window.UNAS?Hl():window.Shopify?Pl():window.ShopRenter?Fl():null}catch{return null}},tc=async()=>{try{return window.UNAS?await zl():window.Shopify?await Rl():window.ShopRenter?await Nl():[]}catch{return[]}},ir={schema:He({conversationId:rr(X()),messages:rr(tr(He({id:X(),timestamp:ki(),role:To(["user","assistant","support"]),content:X(),parts:rr(tr(nr([He({text:X()}),He({html:X()}),He({tag:X(),data:Ci(X(),Mo())})])))})))}),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=Kl(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 D,rc,cn,un,sr,R,nc,$i=class $i extends ${constructor(){super();h(this,D);w(this,"contextCtrl");h(this,cn);h(this,un);h(this,sr,null);this.widgetId="",this.config={},this.callbacks={},this.xUserData=void 0,this.xCustomInstructions=void 0,this.autoConnect=!1,this.contextCtrl=new Xe(this,{config:this.config,callbacks:this.callbacks,xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,widgetId:this.widgetId,conversationId:"",messages:[],isStreaming:!1,typingIndicator:void 0,ranOutOfCredits:!1,isLiveMode:!1,lastMsg:void 0,hasQueuedMessages:!1,sendUserInput:this.sendUserInput.bind(this),sendUserCancel:this.sendUserCancel.bind(this),sendUserTypingStart:this.sendUserTypingStart.bind(this),sendUserTypingStop:this.sendUserTypingStop.bind(this),reset:this.reset.bind(this),reloadConfig:this.reloadConfig.bind(this),enqueueUserInput:this.enqueueUserInput.bind(this),connect:this.connect.bind(this),sendImageDelete:a(this,D,R).sendImageDelete.bind(a(this,D,R))})}connectedCallback(){super.connectedCallback(),this.updated()}updated(){this.autoConnect&&a(this,D,R).connect(),Object.assign(this.contextCtrl.proxyObject,{widgetId:this.widgetId,config:this.config,callbacks:this.callbacks,xUserData:a(this,cn),xCustomInstructions:a(this,un),conversationId:a(this,D,R).conversationId,messages:a(this,D,rc),isStreaming:a(this,D,R).isStreaming,typingIndicator:a(this,D,R).typingIndicator,ranOutOfCredits:a(this,D,R).ranOutOfCredits,isLiveMode:a(this,D,R).isLiveMode,lastMsg:a(this,D,R).lastMsg,hasQueuedMessages:a(this,D,R).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:a(this,D,R).sendImageDelete.bind(a(this,D,R))}),m(this,D,nc).call(this)}sendUserInput(r,n={}){let i={xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,...n},s=a(this,D,R).sendUserInput(r,i);return s&&this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:r,example:!1,conversationId:a(this,D,R).conversationId}),s}async enqueueUserInput(r,n={}){let i={xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,role:"user",expectStreaming:!0,...n};return a(this,D,R).enqueueUserInput(r,i)}sendUserCancel(){a(this,D,R).sendUserCancel(),this.callbacks.onUserCanceledStreaming?.({widgetId:this.widgetId})}sendUserTypingStart(){a(this,D,R).sendUserTypingStart()}sendUserTypingStop(){a(this,D,R).sendUserTypingStop()}reset(){a(this,D,R).reset()}reloadConfig(){a(this,D,R).reloadConfig()}connect(){a(this,D,R).connect()}render(){return f`<slot></slot>`}};D=new WeakSet,rc=function(){return a(this,D,R)?.ranOutOfCredits?[{id:crypto.randomUUID(),role:"assistant",content:"Sorry, I've run out of credits. Please contact the shop directly.",timestamp:Date.now()}]:a(this,D,R)?.messages||[]},cn=new WeakMap,un=new WeakMap,sr=new WeakMap,R=function(){return a(this,sr)||g(this,sr,new yi(this,{autoConnect:this.autoConnect,url:r=>{let n=new URL(this.config.wsApiUrl);return n.searchParams.set("widgetId",this.widgetId),n.searchParams.set("conversationId",r),n.searchParams.set("pageUrl",window.location.href),n},onReconnect:()=>{},onError:r=>{console.error("ws error",r)},onClose:()=>{},onNewMessage:r=>{r.role==="assistant"&&this.callbacks.onNewMessageStartedStreaming?.({widgetId:this.widgetId,message:r,conversationId:a(this,D,R).conversationId})},onMessageAppend:r=>{},onMessageDone:(r,n)=>{n.role==="assistant"&&this.callbacks.onMessageEndedStreaming?.({widgetId:this.widgetId,text:n.content??"",message:n,usage_TOKENS_COMPLETION:r.message.usage.TOKENS_COMPLETION,conversationId:a(this,D,R).conversationId})},onMessageError:r=>{console.error("ws message error",r),r.message&&this.callbacks.onError?.({widgetId:this.widgetId,error:"WS: "+r.message})},onReset:()=>{ir.reset(this.widgetId)},onConnect:(r,n)=>{let i=ec();a(this,D,R).sendUserMeta({xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,customerInformation:i,language:window.navigator.language,cart:[]}),tc().then(s=>{s?.length>0&&a(this,D,R).sendUserMeta({xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,customerInformation:i,cart:s,language:window.navigator.language})}).catch(s=>{console.error(s)}),this.dispatchEvent(new $i.ConnectedEvent({conversationId:r,metadata:n,widgetId:this.widgetId,pendingImages:n?.pendingImages||[]}))},persistConversationState:(r,n)=>{ir.persist(this.widgetId,r,n)},restoreConversationState:()=>ir.restore(this.widgetId)})),a(this,sr)},nc=function(){function r(i){if(!i)return;let s;try{s=typeof i=="object"?i:JSON.parse(i)}catch(u){console.error("Molin: user-data is not valid JSON",u);return}if(!s||typeof s!="object"||Object.keys(s).length===0)return;let o=ln(Yl,s);if(!o.success){console.error("Molin: user-data does not pass schema validation",o.issues);return}return o.output}function n(i){if(!i)return;let s=ln(Ql,i);if(!s.success){console.error("Molin: custom-instructions does not pass schema validation",s.issues);return}return s.output}g(this,cn,r(this.xUserData)),g(this,un,n(this.xCustomInstructions))},w($i,"properties",{widgetId:{type:String},config:{type:Object},callbacks:{type:Object},xUserData:{type:Object},xCustomInstructions:{type:Object},autoConnect:{type:Boolean}});var or=$i;function ic(t){let e=new xi(t,{provider:or,tag:"mw-context-widget",key:"contextCtrl"});return new Proxy({value:null},{get(r,n){if(n==="value")return e.value}})}var Lo;or.ConnectedEvent=(Lo=class extends CustomEvent{constructor(e,r={}){super(or.ConnectedEvent.type,{detail:e,bubbles:!0,composed:!0,...r})}},w(Lo,"type","mw-context-widget:connected"),Lo);customElements.get("mw-context-widget")||customElements.define("mw-context-widget",or);function No(t){return[...t.v,(t.i?"!":"")+t.n].join(":")}function Rh(t,e=","){return t.map(No).join(e)}var pc=typeof CSS<"u"&&CSS.escape||(t=>t.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function Ei(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 Ai(t,e="@media "){return e+B(t).map(r=>(typeof r=="string"&&(r={min:r}),r.raw||Object.keys(r).map(n=>`(${n}-width:${r[n]})`).join(" and "))).join(",")}function B(t=[]){return Array.isArray(t)?t:t==null?[]:[t]}function sc(t){return t}function Ii(){}var te={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function hc(t){return t.match(/[-=:;]/g)?.length||0}function Po(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(hc(t),15)<<18}var Bh=["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 Ho({n:t,i:e,v:r=[]},n,i,s){t&&(t=No({n:t,i:e,v:r})),s=[...B(s)];for(let u of r){let l=n.theme("screens",u);for(let c of B(l&&Ai(l)||n.v(u))){var o;s.push(c),i|=l?67108864|Po(c):u=="dark"?1073741824:c[0]=="@"?Po(c):(o=c,1<<~(/:([a-z-]+)/.test(o)&&~Bh.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:t,p:i,r:s,i:e}}var dc=new Map;function Ro(t){if(t.d){let e=[],r=jo(t.r.reduce((n,i)=>i[0]=="@"?(e.push(i),n):i?jo(n,s=>jo(i,o=>{let u=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(o);if(u){let l=s.indexOf(u[1]);return~l?s.slice(0,l)+u[0]+s.slice(l+u[1].length):Oo(s,o)}return Oo(o,s)})):n,"&"),n=>Oo(n,t.n?"."+pc(t.n):""));return r&&e.push(r.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((n,i)=>i+"{"+n+"}",t.d)}}function jo(t,e){return t.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(r,n,i)=>e(n)+i)}function Oo(t,e){return t.replace(/&/g,e)}var oc=new Intl.Collator("en",{numeric:!0});function fc(t,e){for(var r=0,n=t.length;r<n;){let i=n+r>>1;0>=mc(t[i],e)?r=i+1:n=i}return n}function mc(t,e){let r=t.p&te.o;return r==(e.p&te.o)&&(r==te.b||r==te.o)?0:t.p-e.p||t.o-e.o||oc.compare(ac(t.n),ac(e.n))||oc.compare(lc(t.n),lc(e.n))}function ac(t){return(t||"").split(/:/).pop().split("/").pop()||"\0"}function lc(t){return(t||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function Do(t,e){return Math.round(parseInt(t,16)*e)}function ke(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(${[Do(t.substr(1,s),o),Do(t.substr(1+s,s),o),Do(t.substr(1+2*s,s),o),i]})`}return i=="1"?t:i=="0"?"#0000":t.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${i})`)}function gc(t,e,r,n,i=[]){return(function s(o,{n:u,p:l,r:c=[],i:p},d){let y=[],x="",S=0,I=0;for(let k in o||{}){var C,T;let _=o[k];if(k[0]=="@"){if(!_)continue;if(k[1]=="a"){y.push(...qo(u,l,Mi(""+_),d,l,c,p,!0));continue}if(k[1]=="l"){for(let L of B(_))y.push(...s(L,{n:u,p:(C=te[k[7]],l&~te.o|C),r:k[7]=="d"?[]:c,i:p},d));continue}if(k[1]=="i"){y.push(...B(_).map(L=>({p:-1,o:0,r:[],d:k+" "+L})));continue}if(k[1]=="k"){y.push({p:te.d,o:0,r:[k],d:s(_,{p:te.d},d).map(Ro).join("")});continue}if(k[1]=="f"){y.push(...B(_).map(L=>({p:te.d,o:0,r:[k],d:s(L,{p:te.d},d).map(Ro).join("")})));continue}}if(typeof _!="object"||Array.isArray(_))k=="label"&&_?u=_+Ei(JSON.stringify([l,p,o])):(_||_===0)&&(k=k.replace(/[A-Z]/g,L=>"-"+L.toLowerCase()),I+=1,S=Math.max(S,(T=k)[0]=="-"?0:hc(T)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(T)?+!!RegExp.$1||-!!RegExp.$2:0)+1),x+=(x?";":"")+B(_).map(L=>d.s(k,zo(""+L,d.theme)+(p?" !important":""))).join(";"));else if(k[0]=="@"||k.includes("&")){let L=l;k[0]=="@"&&(k=k.replace(/\bscreen\(([^)]+)\)/g,(H,Q)=>{let ne=d.theme("screens",Q);return ne?(L|=67108864,Ai(ne,"")):H}),L|=Po(k)),y.push(...s(_,{n:u,p:L,r:[...c,k],i:p},d))}else y.push(...s(_,{p:l,r:[...c,k]},d))}return y.unshift({n:u,p:l,o:Math.max(0,15-I)+1.5*Math.min(S||15,15),r:c,d:x}),y.sort(mc)})(t,Ho(e,r,n,i),r)}function zo(t,e){return t.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(r,n,i,s,o="")=>{let u=e(i,o);return typeof u=="function"&&/color|fill|stroke/i.test(i)?ke(u):""+B(u).filter(l=>Object(l)!==l)})}function wc(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 _i(t,e,r=te.u,n,i){let s=[];for(let o of t)for(let u of(function(l,c,p,d,y){l={...l,i:l.i||y};let x=(function(S,I){let C=dc.get(S.n);return C?C(S,I):I.r(S.n,S.v[0]=="dark")})(l,c);return x?typeof x=="string"?({r:d,p}=Ho(l,c,p,d),wc(_i(Mi(x),c,p,d,l.i),l.n)):Array.isArray(x)?x.map(S=>{var I,C;return{o:0,...S,r:[...B(d),...B(S.r)],p:(I=p,C=S.p??p,I&~te.o|C)}}):gc(x,l,c,p,d):[{c:No(l),p:0,o:0,r:[]}]})(o,e,r,n,i))s.splice(fc(s,u),0,u);return s}function qo(t,e,r,n,i,s,o,u){return wc((u?r.flatMap(l=>_i([l],n,i,s,o)):_i(r,n,i,s,o)).map(l=>l.p&te.o&&(l.n||e==te.b)?{...l,p:l.p&~te.o|e,o:0}:l),t)}function Vh(t,e,r,n){var i;return i=(s,o)=>{let{n:u,p:l,r:c,i:p}=Ho(s,o,e);return r&&qo(u,e,r,o,l,c,p,n)},dc.set(t,i),t}function Uo(t,e,r){if(t[t.length-1]!="("){let n=[],i=!1,s=!1,o="";for(let u of t)if(!(u=="("||/[~@]$/.test(u))){if(u[0]=="!"&&(u=u.slice(1),i=!i),u.endsWith(":")){n[u=="dark:"?"unshift":"push"](u.slice(0,-1));continue}u[0]=="-"&&(u=u.slice(1),s=!s),u.endsWith("-")&&(u=u.slice(0,-1)),u&&u!="&"&&(o+=(o&&"-")+u)}o&&(s&&(o="-"+o),e[0].push({n:o,v:n.filter(Fh),i}))}}function Fh(t,e,r){return r.indexOf(t)==e}var cc=new Map;function Mi(t){let e=cc.get(t);if(!e){let r=[],n=[[]],i=0,s=0,o=null,u=0,l=(c,p=0)=>{i!=u&&(r.push(t.slice(i,u+p)),c&&Uo(r,n)),i=u+1};for(;u<t.length;u++){let c=t[u];if(s)t[u-1]!="\\"&&(s+=+(c=="[")||-(c=="]"));else if(c=="[")s+=1;else if(o)t[u-1]!="\\"&&o.test(t.slice(u))&&(o=null,i=u+RegExp.lastMatch.length);else if(c=="/"&&t[u-1]!="\\"&&(t[u+1]=="*"||t[u+1]=="/"))o=t[u+1]=="*"?/^\*\//:/^[\r\n]/;else if(c=="(")l(),r.push(c);else if(c==":")t[u+1]!=":"&&l(!1,1);else if(/[\s,)]/.test(c)){l(!0);let p=r.lastIndexOf("(");if(c==")"){let d=r[p-1];if(/[~@]$/.test(d)){let y=n.shift();r.length=p,Uo([...r,"#"],n);let{v:x}=n[0].pop();for(let S of y)S.v.splice(+(S.v[0]=="dark")-+(x[0]=="dark"),x.length);Uo([...r,Vh(d.length>1?d.slice(0,-1)+Ei(JSON.stringify([d,y])):d+"("+Rh(y)+")",te.a,y,/@$/.test(d))],n)}p=r.lastIndexOf("(",p-1)}r.length=p+1}else/[~@]/.test(c)&&t[u+1]=="("&&n.unshift([])}l(!0),cc.set(t,e=n[0])}return e}function v(t,e,r){return[t,Bo(e,r)]}function Bo(t,e){return typeof t=="function"?t:typeof t=="string"&&/^[\w-]+$/.test(t)?(r,n)=>({[t]:e?e(r,n):Vo(r,1)}):r=>t||{[r[1]]:Vo(r,2)}}function Vo(t,e,r=t.slice(e).find(Boolean)||t.$$||t.input){return t.input[0]=="-"?`calc(${r} * -1)`:r}function b(t,e,r,n){return[t,Wo(e,r,n)]}function Wo(t,e,r){let n=typeof e=="string"?(i,s)=>({[e]:r?r(i,s):i._}):e||(({1:i,_:s},o,u)=>({[i||u]:s}));return(i,s)=>{let o=yc(t||i[1]),u=s.theme(o,i.$$)??je(i.$$,o,s);if(u!=null)return i._=Vo(i,0,u),n(i,s,o)}}function re(t,e={},r){return[t,Nh(e,r)]}function Nh(t={},e){return(r,n)=>{let{section:i=yc(r[0]).replace("-","")+"Color"}=t,[s,o]=Hh(r.$$);if(!s)return;let u=n.theme(i,s)||je(s,i,n);if(!u||typeof u=="object")return;let{opacityVariable:l=`--tw-${r[0].replace(/-$/,"")}-opacity`,opacitySection:c=i.replace("Color","Opacity"),property:p=i,selector:d}=t,y=n.theme(c,o||"DEFAULT")||o&&je(o,c,n),x=e||(({_:I})=>{let C=pn(p,I);return d?{[d]:C}:C});r._={value:ke(u,{opacityVariable:l||void 0,opacityValue:y||void 0}),color:I=>ke(u,I),opacityVariable:l||void 0,opacityValue:y||void 0};let S=x(r,n);if(!r.dark){let I=n.d(i,s,u);I&&I!==u&&(r._={value:ke(I,{opacityVariable:l||void 0,opacityValue:y||"1"}),color:C=>ke(I,C),opacityVariable:l||void 0,opacityValue:y||void 0},S={"&":S,[n.v("dark")]:x(r,n)})}return S}}function Hh(t){return(t.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function pn(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 je(t,e,r){if(t[0]=="["&&t.slice(-1)=="]"){if(t=ar(zo(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 yc(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function ar(t){return t.includes("url(")?t.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,r="",n,i="")=>ar(r)+n+ar(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 Go({presets:t=[],...e}){let r={darkMode:void 0,darkColor:void 0,preflight:e.preflight!==!1&&[],theme:{},variants:B(e.variants),rules:B(e.rules),ignorelist:B(e.ignorelist),hash:void 0,stringify:(n,i)=>n+":"+i,finalize:[]};for(let n of B([...t,{darkMode:e.darkMode,darkColor:e.darkColor,preflight:e.preflight!==!1&&B(e.preflight),theme:e.theme,hash:e.hash,stringify:e.stringify,finalize:e.finalize}])){let{preflight:i,darkMode:s=r.darkMode,darkColor:o=r.darkColor,theme:u,variants:l,rules:c,ignorelist:p,hash:d=r.hash,stringify:y=r.stringify,finalize:x}=typeof n=="function"?n(r):n;r={preflight:r.preflight!==!1&&i!==!1&&[...r.preflight,...B(i)],darkMode:s,darkColor:o,theme:{...r.theme,...u,extend:{...r.theme.extend,...u?.extend}},variants:[...r.variants,...B(l)],rules:[...r.rules,...B(c)],ignorelist:[...r.ignorelist,...B(p)],hash:d,stringify:y,finalize:[...r.finalize,...B(x)]}}return r}function uc(t,e,r,n,i,s){for(let o of e){let u=r.get(o);u||r.set(o,u=n(o));let l=u(t,i,s);if(l)return l}}function zh(t){var e;return Fo(t[0],typeof(e=t[1])=="function"?e:()=>e)}function qh(t){var e,r;return Array.isArray(t)?Fo(t[0],Bo(t[1],t[2])):Fo(t,Bo(e,r))}function Fo(t,e){return vc(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 vc(t,e){let r=B(t).map(Wh);return(n,i,s)=>{for(let o of r){let u=e(n,o,i,s);if(u)return u}}}function Wh(t){return typeof t=="string"?RegExp("^"+t+(t.includes("$")||t.slice(-1)=="-"?"":"$")):t}function bc(t,e){let r=Go(t),n=(function({theme:l,darkMode:c,darkColor:p=Ii,variants:d,rules:y,hash:x,stringify:S,ignorelist:I,finalize:C}){let T=new Map,k=new Map,_=new Map,L=new Map,H=vc(I,(P,ie)=>ie.test(P));d.push(["dark",Array.isArray(c)||c=="class"?`${B(c)[1]||".dark"} &`:typeof c=="string"&&c!="media"?c:"@media (prefers-color-scheme:dark)"]);let Q=typeof x=="function"?P=>x(P,Ei):x?Ei:sc;Q!==sc&&C.push(P=>({...P,n:P.n&&Q(P.n),d:P.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(ie,pe)=>"--"+Q(pe).replace("#",""))}));let ne={theme:(function({extend:P={},...ie}){let pe={},Zs={get colors(){return ht("colors")},theme:ht,negative(){return{}},breakpoints(Z){let se={};for(let fe in Z)typeof Z[fe]=="string"&&(se["screen-"+fe]=Z[fe]);return se}};return ht;function ht(Z,se,fe,Nr){if(Z){if({1:Z,2:Nr}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(Z)||[,Z],/[.[]/.test(Z)){let Be=[];Z.replace(/\[([^\]]+)\]|([^.[]+)/g,(ft,zr,Gp=zr)=>Be.push(Gp)),Z=Be.shift(),fe=se,se=Be.join("-")}let Le=pe[Z]||Object.assign(Object.assign(pe[Z]={},si(ie,Z)),si(P,Z));if(se==null)return Le;se||(se="DEFAULT");let dt=Le[se]??se.split("-").reduce((Be,ft)=>Be?.[ft],Le)??fe;return Nr?ke(dt,{opacityValue:zo(Nr,ht)}):dt}let Hr={};for(let Le of[...Object.keys(ie),...Object.keys(P)])Hr[Le]=ht(Le);return Hr}function si(Z,se){let fe=Z[se];return typeof fe=="function"&&(fe=fe(Zs)),fe&&/color|fill|stroke/i.test(se)?(function Nr(Hr,Le=[]){let dt={};for(let Be in Hr){let ft=Hr[Be],zr=[...Le,Be];dt[zr.join("-")]=ft,Be=="DEFAULT"&&(zr=Le,dt[Le.join("-")]=ft),typeof ft=="object"&&Object.assign(dt,Nr(ft,zr))}return dt})(fe):fe}})(l),e:pc,h:Q,s(P,ie){return S(P,ie,ne)},d(P,ie,pe){return p(P,ie,ne,pe)},v(P){return T.has(P)||T.set(P,uc(P,d,k,zh,ne)||"&:"+P),T.get(P)},r(P,ie){let pe=JSON.stringify([P,ie]);return _.has(pe)||_.set(pe,!H(P,ne)&&uc(P,y,L,qh,ne,ie)),_.get(pe)},f(P){return C.reduce((ie,pe)=>pe(ie,ne),P)}};return ne})(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 u(l){let c=n.f(l),p=Ro(c);if(p&&!o.has(p)){o.add(p);let d=fc(s,l);e.insert(p,d,l),s.splice(d,0,l)}return c.n}return Object.defineProperties(function(c){if(!i.size)for(let d of B(r.preflight))typeof d=="function"&&(d=d(n)),d&&(typeof d=="string"?qo("",te.b,Mi(d),n,te.b,[],!1,!0):gc(d,{},n,te.b)).forEach(u);c=""+c;let p=i.get(c);if(!p){let d=new Set;for(let y of _i(Mi(c),n))d.add(y.c).add(u(y));p=[...d].filter(Boolean).join(" "),i.set(c,p).set(p,p)}return p},Object.getOwnPropertyDescriptors({get target(){return e.target},theme:n.theme,config:r,snapshot(){let l=e.snapshot(),c=new Set(o),p=new Map(i),d=[...s];return()=>{l(),o=c,i=p,s=d}},clear(){e.clear(),o=new Set,i=new Map,s=[]},destroy(){this.clear(),e.destroy()}}))}function Gh(t,e){return t!=e&&""+t.split(" ").sort()!=""+e.split(" ").sort()}function xc(t){let e=new MutationObserver(r);return{observe(i){e.observe(i,{attributeFilter:["class"],subtree:!0,childList:!0}),n(i),r([{target:i,type:""}])},disconnect(){e.disconnect()}};function r(i){for(let{type:s,target:o}of i)if(s[0]=="a")n(o);else for(let u of o.querySelectorAll("[class]"))n(u);e.takeRecords()}function n(i){let s,o=i.getAttribute?.("class");o&&Gh(o,s=t(o))&&i.setAttribute("class",s)}}function Zh(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 Ti(t){let e=t?.cssRules?t:(t&&typeof t!="string"?t:Zh(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:Ii}}var Kh=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 kc(t){return Kh.get(t)}function Cc(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 Sc(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 Jh=[["-webkit-",1],["-moz-",2],["-ms-",4]];function $c(){return({stringify:t})=>({stringify(e,r,n){let i="",s=kc(e);s&&(i+=t(s,r,n)+";");let o=Cc(e),u=Sc(e,r);for(let l of Jh)o&l[1]&&(i+=t(l[0]+e,r,n)+";"),u&l[1]&&(i+=t(e,l[0]+r,n)+";");return i+t(e,r,n)}})}function _c(){return{rules:[["line-clamp-none",{"-webkit-line-clamp":"unset"}],["line-clamp-",Wo("lineClamp",({_:t})=>Ec(t))],["line-clamp-(\\d+)",({1:t})=>Ec(t)]]}}function Ec(t){return{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":`${t}`}}var dn={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",...ye(4,"rem",4,.5,.5),...ye(12,"rem",4,5),14:"3.5rem",...ye(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:U("blur"),backdropBrightness:U("brightness"),backdropContrast:U("contrast"),backdropGrayscale:U("grayscale"),backdropHueRotate:U("hueRotate"),backdropInvert:U("invert"),backdropOpacity:U("opacity"),backdropSaturate:U("saturate"),backdropSepia:U("sepia"),backgroundColor:U("colors"),backgroundImage:{none:"none"},backgroundOpacity:U("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:{...ye(200,"",100,0,50),...ye(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:t})=>({DEFAULT:t("colors.gray.200","currentColor"),...t("colors")}),borderOpacity:U("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:U("spacing"),borderWidth:{DEFAULT:"1px",...Ce(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:U("colors"),caretColor:U("colors"),accentColor:({theme:t})=>({auto:"auto",...t("colors")}),contrast:{...ye(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:U("borderColor"),divideOpacity:U("borderOpacity"),divideWidth:U("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"),...hn(2,6),...hn(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:U("spacing"),gradientColorStops:U("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"),...hn(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:t})=>({...t("spacing"),...hn(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:{...ye(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:{...ye(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:U("spacing"),placeholderColor:U("colors"),placeholderOpacity:U("opacity"),outlineColor:U("colors"),outlineOffset:Ce(8,"px"),outlineWidth:Ce(8,"px"),ringColor:({theme:t})=>({...t("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:U("colors"),ringOffsetWidth:Ce(8,"px"),ringOpacity:({theme:t})=>({...t("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...Ce(8,"px")},rotate:{...Ce(2,"deg"),...Ce(12,"deg",3),...Ce(180,"deg",45)},saturate:ye(200,"",100,0,50),scale:{...ye(150,"",100,0,50),...ye(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:U("spacing"),scrollPadding:U("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...Ce(2,"deg"),...Ce(12,"deg",3)},space:U("spacing"),stroke:({theme:t})=>({...t("colors"),none:"none"}),strokeWidth:ye(2),textColor:U("colors"),textDecorationColor:U("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...Ce(8,"px")},textUnderlineOffset:{auto:"auto",...Ce(8,"px")},textIndent:U("spacing"),textOpacity:U("opacity"),transitionDuration:({theme:t})=>({...t("durations"),DEFAULT:"150ms"}),transitionDelay:U("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"),...hn(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:{...ye(50,"",1,0,10),auto:"auto"}};function hn(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 Ce(t,e,r=0){let n={};for(;r<=t;r=2*r||1)n[r]=r+e;return n}function ye(t,e="",r=1,n=0,i=1,s={}){for(;n<=t;n+=i)s[n]=n/r+e;return s}function U(t){return({theme:e})=>e(t)}var Mc={"*,::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, ${dn.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, ${dn.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 Oc=[v("\\[([-\\w]+):(.+)]",({1:t,2:e},r)=>({"@layer overrides":{"&":{[t]:je(`[${e}]`,"",r)}}})),v("(group|peer)([~/][^-[]+)?",({input:t},{h:e})=>[{c:e(t)}]),b("aspect-","aspectRatio"),v("container",(t,{theme:e})=>{let{screens:r=e("screens"),center:n,padding:i}=e("container"),s={width:"100%",marginRight:n&&"auto",marginLeft:n&&"auto",...o("xs")};for(let u in r){let l=r[u];typeof l=="string"&&(s[Ai(l)]={"&":{maxWidth:l,...o(u)}})}return s;function o(u){let l=i&&(typeof i=="string"?i:i[u]||i.DEFAULT);if(l)return{paddingRight:l,paddingLeft:l}}}),b("content-","content",({_:t})=>({"--tw-content":t,content:"var(--tw-content)"})),v("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),v("box-(border|content)","boxSizing",({1:t})=>t+"-box"),v("hidden",{display:"none"}),v("table-(auto|fixed)","tableLayout"),v(["(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)",v("isolate","isolation"),v("object-(contain|cover|fill|none|scale-down)","objectFit"),b("object-","objectPosition"),v("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",Li),v("overscroll(-[xy])?-(auto|contain|none)",({1:t="",2:e})=>({["overscroll-behavior"+t]:e})),v("(static|fixed|absolute|relative|sticky)","position"),b("-?inset(-[xy])?(?:$|-)","inset",({1:t,_:e})=>({top:t!="-x"&&e,right:t!="-y"&&e,bottom:t!="-x"&&e,left:t!="-y"&&e})),b("-?(top|bottom|left|right)(?:$|-)","inset"),v("(visible|collapse)","visibility"),v("invisible",{visibility:"hidden"}),b("-?z-","zIndex"),v("flex-((row|col)(-reverse)?)","flexDirection",Ac),v("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),b("(flex-(?:grow|shrink))(?:$|-)"),b("(flex)-"),b("grow(?:$|-)","flexGrow"),b("shrink(?:$|-)","flexShrink"),b("basis-","flexBasis"),b("-?(order)-"),"-?(order)-(\\d+)",b("grid-cols-","gridTemplateColumns"),v("grid-cols-(\\d+)","gridTemplateColumns",jc),b("col-","gridColumn"),v("col-(span)-(\\d+)","gridColumn",Lc),b("col-start-","gridColumnStart"),v("col-start-(auto|\\d+)","gridColumnStart"),b("col-end-","gridColumnEnd"),v("col-end-(auto|\\d+)","gridColumnEnd"),b("grid-rows-","gridTemplateRows"),v("grid-rows-(\\d+)","gridTemplateRows",jc),b("row-","gridRow"),v("row-(span)-(\\d+)","gridRow",Lc),b("row-start-","gridRowStart"),v("row-start-(auto|\\d+)","gridRowStart"),b("row-end-","gridRowEnd"),v("row-end-(auto|\\d+)","gridRowEnd"),v("grid-flow-((row|col)(-dense)?)","gridAutoFlow",t=>Li(Ac(t))),v("grid-flow-(dense)","gridAutoFlow"),b("auto-cols-","gridAutoColumns"),b("auto-rows-","gridAutoRows"),b("gap-x(?:$|-)","gap","columnGap"),b("gap-y(?:$|-)","gap","rowGap"),b("gap(?:$|-)","gap"),"(justify-(?:items|self))-",v("justify-","justifyContent",Ic),v("(content|items|self)-",t=>({["align-"+t[1]]:Ic(t)})),v("(place-(content|items|self))-",({1:t,$$:e})=>({[t]:("wun".includes(e[3])?"space-":"")+e})),b("p([xytrbl])?(?:$|-)","padding",lr("padding")),b("-?m([xytrbl])?(?:$|-)","margin",lr("margin")),b("-?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))`}})),v("space-(x|y)-reverse",({1:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"1"}})),b("w-","width"),b("min-w-","minWidth"),b("max-w-","maxWidth"),b("h-","height"),b("min-h-","minHeight"),b("max-h-","maxHeight"),b("font-","fontWeight"),b("font-","fontFamily",({_:t})=>typeof(t=B(t))[1]=="string"?{fontFamily:Ae(t)}:{fontFamily:Ae(t[0]),...t[1]}),v("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),v("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),v("italic","fontStyle"),v("not-italic",{fontStyle:"normal"}),v("(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)",...Ye({"--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,/*!*/ /*!*/)"})}),b("tracking-","letterSpacing"),b("leading-","lineHeight"),v("list-(inside|outside)","listStylePosition"),b("list-","listStyleType"),v("list-","listStyleType"),b("placeholder-opacity-","placeholderOpacity",({_:t})=>({"&::placeholder":{"--tw-placeholder-opacity":t}})),re("placeholder-",{property:"color",selector:"&::placeholder"}),v("text-(left|center|right|justify|start|end)","textAlign"),v("text-(ellipsis|clip)","textOverflow"),b("text-opacity-","textOpacity","--tw-text-opacity"),re("text-",{property:"color"}),b("text-","fontSize",({_:t})=>typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}),b("indent-","textIndent"),v("(overline|underline|line-through)","textDecorationLine"),v("no-underline",{textDecorationLine:"none"}),b("underline-offset-","textUnderlineOffset"),re("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),b("decoration-","textDecorationThickness"),v("decoration-","textDecorationStyle"),v("(uppercase|lowercase|capitalize)","textTransform"),v("normal-case",{textTransform:"none"}),v("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),v("align-","verticalAlign"),v("whitespace-","whiteSpace"),v("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),v("break-words",{overflowWrap:"break-word"}),v("break-all",{wordBreak:"break-all"}),v("break-keep",{wordBreak:"keep-all"}),re("caret-",{opacityVariable:!1,opacitySection:"opacity"}),re("accent-",{opacityVariable:!1,opacitySection:"opacity"}),v("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:t})=>`linear-gradient(to ${$t(t," ")},var(--tw-gradient-stops))`),re("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)"})),re("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)`})),re("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),v("bg-(fixed|local|scroll)","backgroundAttachment"),v("bg-origin-(border|padding|content)","backgroundOrigin",({1:t})=>t+"-box"),v(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),v("bg-blend-","backgroundBlendMode"),v("bg-clip-(border|padding|content|text)","backgroundClip",({1:t})=>t+(t=="text"?"":"-box")),b("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),re("bg-",{section:"backgroundColor"}),b("bg-","backgroundImage"),b("bg-","backgroundPosition"),v("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",Li),b("bg-","backgroundSize"),b("rounded(?:$|-)","borderRadius"),b("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-${$t(r[0])}-radius`]:e,[`border-${$t(r[1])}-radius`]:e}}),v("border-(collapse|separate)","borderCollapse"),b("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),v("border-(solid|dashed|dotted|double|none)","borderStyle"),b("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:t,_:e})=>({...Ye({"--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)"})),re("border-([xytrbl])-",{section:"borderColor"},lr("border","Color")),re("border-"),b("border-([xytrbl])(?:$|-)","borderWidth",lr("border","Width")),b("border(?:$|-)","borderWidth"),b("divide-opacity(?:$|-)","divideOpacity",({_:t})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":t}})),v("divide-(solid|dashed|dotted|double|none)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:t}})),v("divide-([xy]-reverse)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+t]:"1"}})),b("divide-([xy])(?:$|-)","divideWidth",({1:t,_:e})=>{let r={x:"lr",y:"tb"}[t];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${t}-reverse`]:"0",[`border-${$t(r[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${t}-reverse)))`,[`border-${$t(r[1])}Width`]:`calc(${e} * var(--tw-divide-${t}-reverse))`}}}),re("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),b("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),re("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),b("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),v("ring-inset",{"--tw-ring-inset":"inset"}),re("ring-",{property:"--tw-ring-color"}),b("ring(?:$|-)","ringWidth",({_:t},{theme:e})=>({...Ye({"--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":ke(e("ringOffsetColor","","#fff")),"--tw-ring-color":ke(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)"})),re("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-shadow-color":t.value,"--tw-shadow":"var(--tw-shadow-colored)"})),b("shadow(?:$|-)","boxShadow",({_:t})=>({...Ye({"--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":Ae(t),"--tw-shadow-colored":Ae(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)"})),b("(opacity)-"),v("mix-blend-","mixBlendMode"),...Tc(),...Tc("backdrop-"),b("transition(?:$|-)","transitionProperty",(t,{theme:e})=>({transitionProperty:Ae(t),transitionTimingFunction:t._=="none"?void 0:Ae(e("transitionTimingFunction","")),transitionDuration:t._=="none"?void 0:Ae(e("transitionDuration",""))})),b("duration(?:$|-)","transitionDuration","transitionDuration",Ae),b("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",Ae),b("delay(?:$|-)","transitionDelay","transitionDelay",Ae),b("animate(?:$|-)","animation",(t,{theme:e,h:r,e:n})=>{let i=Ae(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)",v("transform",Ko),v("transform-(cpu|gpu)",({1:t})=>({"--tw-transform":Dc(t=="gpu")})),b("scale(-[xy])?-","scale",({1:t,_:e})=>({["--tw-scale"+(t||"-x")]:e,["--tw-scale"+(t||"-y")]:e,...Ko()})),b("-?(rotate)-","rotate",Zo),b("-?(translate-[xy])-","translate",Zo),b("-?(skew-[xy])-","skew",Zo),v("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",Li),"(appearance)-",b("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",b("(cursor)-"),"(cursor)-",v("snap-(none)","scroll-snap-type"),v("snap-(x|y|both)",({1:t})=>({...Ye({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":t+" var(--tw-scroll-snap-strictness)"})),v("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),v("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),v("snap-(normal|always)","scroll-snap-stop"),v("scroll-(auto|smooth)","scroll-behavior"),b("scroll-p([xytrbl])?(?:$|-)","padding",lr("scroll-padding")),b("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",lr("scroll-margin")),v("touch-(auto|none|manipulation)","touch-action"),v("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:t,2:e,3:r})=>({...Ye({"--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)"})),v("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),v("outline",{outlineStyle:"solid"}),v("outline-(dashed|dotted|double)","outlineStyle"),b("-?(outline-offset)-"),re("outline-",{opacityVariable:!1,opacitySection:"opacity"}),b("outline-","outlineWidth"),"(pointer-events)-",b("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:t})=>({x:"horizontal",y:"vertical"})[t]||t||"both"],v("select-(none|text|all|auto)","userSelect"),re("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),re("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),b("stroke-","strokeWidth"),v("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),v("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function Li(t){return(typeof t=="string"?t:t[1]).replace(/-/g," ").trim()}function Ac(t){return(typeof t=="string"?t:t[1]).replace("col","column")}function $t(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 Ae(t){return t&&""+(t._||t)}function Ic({$$:t}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[t[3]||""]||"")+t}function lr(t,e=""){return({1:r,_:n})=>{let i={x:"lr",y:"tb"}[r]||r+r;return i?{...pn(t+"-"+$t(i[0])+e,n),...pn(t+"-"+$t(i[1])+e,n)}:pn(t+e,n)}}function Tc(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={...Ye(r),[`${t}filter`]:e.map(n=>`var(--tw-${t}${n})`).join(" ")},[`(${t}filter)-(none)`,v(`${t}filter`,r),...e.map(n=>b(`${n[0]=="h"?"-?":""}(${t}${n})(?:$|-)`,n,({1:i,_:s})=>({[`--tw-${i}`]:B(s).map(o=>`${n}(${o})`).join(" "),...r})))]}function Zo({1:t,_:e}){return{["--tw-"+t]:e,...Ko()}}function Ko(){return{...Ye({"--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":Dc()}),transform:"var(--tw-transform)"}}function Dc(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 Lc({1:t,2:e}){return`${t} ${e} / ${t} ${e}`}function jc({1:t}){return`repeat(${t},minmax(0,1fr))`}function Ye(t){return{"@layer defaults":{"*,::before,::after":t,"::backdrop":t}}}var Uc=[["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)||je(e,"",r)||`${e}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:t,3:e="",4:r,5:n="",6:i=e},{e:s,h:o,v:u})=>{let l=ar(n)||(r[0]=="["?r:u(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)||je(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)||je(t,"",e)),typeof t=="string")return`@media not all and (min-width:${t})`}],["min-",({$$:t},e)=>(t&&(t=je(t,"",e)),t&&`@media (min-width:${t})`)],[/^\[(.+)]$/,({1:t})=>/[&@]/.test(t)&&ar(t).replace(/[}]+$/,"").split("{")]];function Pc({colors:t,disablePreflight:e}={}){return{preflight:e?void 0:Mc,theme:{...dn,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...t}},variants:Uc,rules:Oc,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 Xh={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},Yh={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},Qh={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},ed={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},td={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},rd={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},nd={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},id={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},sd={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},od={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},ad={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},ld={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},cd={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},ud={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},pd={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},hd={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},dd={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},fd={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},md={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},gd={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},wd={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},yd={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},Rc={__proto__:null,slate:Xh,gray:Yh,zinc:Qh,neutral:ed,stone:td,red:rd,orange:nd,amber:id,yellow:sd,lime:od,green:ad,emerald:ld,teal:cd,cyan:ud,sky:pd,blue:hd,indigo:dd,violet:fd,purple:md,fuchsia:gd,pink:wd,rose:yd};function Bc({disablePreflight:t}={}){return Pc({colors:Rc,disablePreflight:t})}function Nc({className:t="prose",defaultColor:e="gray",extend:r={},colors:n={}}={}){return n={body:"700",headings:"900",lead:"600",links:"900",bold:"900",counters:"500",bullets:"300",hr:"200",quotes:"900","quote-borders":"200",captions:"500",code:"900","pre-code":"200","pre-bg":"800","th-borders":"300","td-borders":"200",...n,dark:n.dark===null?null:{body:"300",headings:"#fff",lead:"400",links:"#fff",bold:"#fff",counters:"400",bullets:"600",hr:"700",quotes:"100","quote-borders":"700",captions:"400",code:"#fff","pre-code":"300","pre-bg":"rgb(0 0 0 / 50%)","th-borders":"600","td-borders":"700",...n.dark}},{variants:[["headings","h1,h2,h3,h4,h5,h6,th"],["h1"],["h2"],["h3"],["h4"],["h5"],["h6"],["p"],["a"],["blockquote"],["figure"],["figcaption"],["strong"],["em"],["code"],["pre"],["ol"],["ul"],["li"],["table"],["thead"],["tr"],["th"],["td"],["img"],["video"],["hr"],["lead",".lead"]].map(([s,o=s])=>[`${t}-${s}`,(u,l)=>Hc(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 u=Fc(o.theme("fontSize",s));return u&&{"@layer components":u}}],[t+"-",({$$:s},o)=>i(s,o)],[t,(s,o)=>({...i(e,o),"@layer base":[Vc(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:E(20,16),marginBottom:E(20,16),paddingLeft:E(26,16)},li:{marginTop:E(8,16),marginBottom:E(8,16)},"ol>li,ul>li":{paddingLeft:E(6,16)},">ul>li p":{marginTop:E(12,16),marginBottom:E(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:E(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:E(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:E(12,16),marginBottom:E(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:E(48,16),marginBottom:E(48,16)},blockquote:{marginTop:E(32,20),marginBottom:E(32,20),paddingLeft:E(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:E(20,16),marginBottom:E(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:E(36,16),marginTop:"0",marginBottom:E(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900",color:"inherit"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:E(24,16),marginTop:E(48,24),marginBottom:E(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800",color:"inherit"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:E(20,16),marginTop:E(32,20),marginBottom:E(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700",color:"inherit"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:E(24,16),marginBottom:E(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700",color:"inherit"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:E(32,16),marginBottom:E(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:E(14,16),lineHeight:"1.4",marginTop:E(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:E(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:E(21,24)},"h3 code":{fontSize:E(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:E(14,16),lineHeight:"1.7",marginTop:E(24,14),marginBottom:E(24,14),borderRadius:"0.375rem",paddingTop:E(12,14),paddingRight:E(16,14),paddingBottom:E(12,14),paddingLeft:E(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:E(32,16),marginBottom:E(32,16),fontSize:E(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:E(8,14),paddingBottom:E(8,14),paddingLeft:E(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:E(8,14),paddingRight:E(8,14),paddingBottom:E(8,14),paddingLeft:E(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:E(20,16),lineHeight:"1.6",marginTop:E(24,20),marginBottom:E(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),Vc(t,o,r)],"@layer components":{...Fc(o.theme("fontSize","base")),color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"}})]]};function i(s,o){let u={},l={},c=(p,d,y)=>{let x=o.theme(`colors.${s}.${d}`,d);y["--tw-prose-"+p]=ke(x);let S=y!=l&&o.d("colors",`${s}-${d}`,x);S&&(l["--tw-prose-"+p]=ke(S))};for(let p in n){let d=n[p];p!="dark"&&d&&c(p,d,u)}for(let p in n.dark||{}){let d=n.dark[p];d&&(n.dark?c("invert-"+p,d,u):c(p,d,l))}return Object.keys(u).length?{"@layer defaults":{"&":u,[o.v("dark")]:l}}:void 0}}function Vc(t,e,r){let n={};for(let i in r)n[Hc(t,i,e,s=>`.${e.e(e.h(t))}${s}`)]=r[i];return n}function Hc(t,e,{e:r,h:n},i){return e.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(s,o=" ",u=s,l="")=>i(`${o}:where(${u}):not(:where(.${r(n("not-"+t))} *))${l}`))}function Fc(t){return t?typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}:void 0}function E(t,e){return`${(t/e).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}var Jo=Go({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:[Bc(),$c(),_c(),Nc()]});function zc(t,e=!0){let r=(function(){if(vd)try{let l=Ti(new CSSStyleSheet);return l.connect=c=>{let p=Xo(c);p.adoptedStyleSheets=[...p.adoptedStyleSheets,l.target]},l.disconnect=Ii,l}catch{}let s=document.createElement("style");s.media="not all",document.head.prepend(s);let o=[Ti(s)],u=new WeakMap;return{get target(){return o[0].target},snapshot(){let l=o.map(c=>c.snapshot());return()=>l.forEach(c=>c())},clear(){o.forEach(l=>l.clear())},destroy(){o.forEach(l=>l.destroy())},insert(l,c,p){o[0].insert(l,c,p);let d=this.target.cssRules[c];o.forEach((y,x)=>x&&y.target.insertRule(d.cssText,c))},resume(l,c){return o[0].resume(l,c)},connect(l){let c=document.createElement("style");Xo(l).appendChild(c);let p=Ti(c),{cssRules:d}=this.target;for(let y=0;y<d.length;y++)p.target.insertRule(d[y].cssText,y);o.push(p),u.set(l,p)},disconnect(l){let c=o.indexOf(u.get(l));c>=0&&o.splice(c,1)}}})(),n=bc({...t,hash:t.hash??e},r),i=xc(n);return function(o){return class extends o{connectedCallback(){super.connectedCallback?.(),r.connect(this),i.observe(Xo(this))}disconnectedCallback(){r.disconnect(this),super.disconnectedCallback?.()}constructor(...l){super(...l),this.tw=n}}}}var vd=typeof ShadowRoot<"u"&&(typeof ShadyCSS>"u"||ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;function Xo(t){return t.shadowRoot||t.attachShadow({mode:"open"})}var M=t=>zc(Jo)(t);var fn=class extends M($){constructor(){super(),this.color="#601feb",this.radius="16.8576px",this.size="320px",this.border="#d1d5db"}render(){return f`
|
|
126
|
+
</svg>`};var Hu=Gl,_o=class extends _i{resolveIcon(e){let r=Hu[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",_o);var an,de,we,ln,Mo,Mi=class{constructor(e,r){d(this,ln);d(this,an);d(this,de);d(this,we);if(!e)throw new Error("host is required");if(!r)throw new Error("config is required");g(this,an,e),o(this,an).addController(this),g(this,de,r)}connect(e){g(this,de,e),g(this,we,m(this,ln,Mo).call(this))}hostConnected(){o(this,we)||setTimeout(()=>{o(this,we)||g(this,we,m(this,ln,Mo).call(this))},0)}hostDisconnected(){o(this,we)?.close(1e3,"lit_host_disconnected"),g(this,we,void 0)}send(e){o(this,we)?.send(e)}close(e,r){o(this,we)?.close(e,r)}get isConnected(){return o(this,we)?.readyState===WebSocket.OPEN}get isConnecting(){return o(this,we)?.readyState===WebSocket.CONNECTING}};an=new WeakMap,de=new WeakMap,we=new WeakMap,ln=new WeakSet,Mo=function(){let e=new WebSocket(o(this,de).url());return o(this,de).onClose&&(e.onclose=o(this,de).onClose),o(this,de).onOpen&&(e.onopen=o(this,de).onOpen),o(this,de).onError&&(e.onerror=o(this,de).onError),o(this,de).onMessage&&(e.onmessage=o(this,de).onMessage),e};var Kl=Array.isArray;var Ao=t=>!!(t&&t.constructor&&t.call&&t.apply);var Jl=t=>!(!t||!t.then||!Ao(t.then));var Io=(t,e,r=!1)=>{if(!t)return[];let n=(s,a)=>e(s)-e(a),i=(s,a)=>e(a)-e(s);return t.slice().sort(r===!0?i:n)};function*cn(t,e,r=i=>i,n=1){let i=Ao(r)?r:()=>r,s=e?t:0,a=e??t;for(let u=s;u<=a&&(yield i(u),!(u+n>a));u+=n);}var Lo=(t,e,r,n)=>Array.from(cn(t,e,r,n));var jo=(t,e)=>t?t.reduce((r,n)=>{let[i,s]=r;return e(n)?[[...i,n],s]:[i,[...s,n]]},[[],[]]):[[],[]];var To=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}},Do=async(t,e,r)=>{let n=e.map((c,p)=>({index:p,item:c})),i=async c=>{let p=[];for(;;){let f=n.pop();if(!f)return c(p);let[v,x]=await un(r)(f.item);p.push({error:v,result:x,index:f.index})}},s=Lo(1,t).map(()=>new Promise(i)),a=await Promise.all(s),[u,l]=jo(Io(a.flat(),c=>c.index),c=>!!c.error);if(u.length>0)throw new To(u.map(c=>c.error));return l.map(c=>c.result)};var Ai=t=>new Promise(e=>setTimeout(e,t)),un=t=>(...e)=>{try{let r=t(...e);return Jl(r)?r.then(n=>[void 0,n]).catch(n=>[n,void 0]):[void 0,r]}catch(r){return[r,void 0]}};async function Xl(t,e){let r=t?.times??3,n=t?.delay,i=t?.backoff??null;for(let s of cn(1,r)){let[a,u]=await un(e)(l=>{throw{_exited:l}});if(!a)return u;if(a._exited)throw a._exited;if(s===r)throw a;n&&await Ai(n),i&&await Ai(i(s))}throw new Error("unreachable")}var zu=!0,Oo="Invariant failed";function fe(t,e){if(!t){if(zu)throw new Error(Oo);var r=typeof e=="function"?e():e,n=r?"".concat(Oo,": ").concat(r):Oo;throw new Error(n)}}var J,re,W,Jt,Xt,Ce,X,Ie,Yl,Ql,e1,t1,Ii=class{constructor(e,r){d(this,X);d(this,J);d(this,re);d(this,W,null);w(this,"isStreaming",!1);w(this,"typingIndicator");w(this,"ranOutOfCredits",!1);w(this,"messages",[]);w(this,"conversationId","");d(this,Jt,0);d(this,Xt);w(this,"isLiveMode",!1);d(this,Ce,[]);g(this,J,e),g(this,re,r),o(this,re).autoConnect!==!1&&g(this,W,this.initWS()),e.addController(this)}get hasQueuedMessages(){return o(this,Ce).length>0}async enqueueMessage(e,{expectStreaming:r=!1}={}){if(o(this,Ce).length>0){let n=o(this,Ce)[o(this,Ce).length-1];if(e.type==="USER_INPUT"&&n.message.type==="USER_INPUT"&&e.value===n.message.value)return!0}return o(this,W)||this.connect(),o(this,W)?.isConnected?m(this,X,Ie).call(this,e,{expectStreaming:r}):(o(this,Ce).push({message:e,options:{expectStreaming:r}}),o(this,J).requestUpdate(),o(this,W)&&!o(this,W).isConnecting&&!o(this,W).isConnected&&this.retry(),await Xl({times:5,delay:2e3},async()=>{if(o(this,W)?.isConnected){let n=[...o(this,Ce)];g(this,Ce,[]),o(this,J).requestUpdate();let i=!1;for(let{message:s,options:a}of n){let u=m(this,X,Ie).call(this,s,a);s===e&&(i=u)}return i}else throw new Error("WebSocket not connected yet")}).catch(()=>(console.warn("Failed to send message after retries",e),g(this,Ce,[]),o(this,J).requestUpdate(),!1)))}sendUserInput(e,{xUserData:r,xCustomInstructions:n,role:i="user",expectStreaming:s=!1,requestInputResponse:a}={}){return m(this,X,Ie).call(this,{type:"USER_INPUT",value:e,role:i,xUserData:r,xCustomInstructions:n,requestInputResponse:a},{expectStreaming:s})}async enqueueUserInput(e,{xUserData:r,xCustomInstructions:n,role:i="user",expectStreaming:s=!1,requestInputResponse:a}={}){return this.enqueueMessage({type:"USER_INPUT",value:e,role:i,xUserData:r,xCustomInstructions:n,requestInputResponse:a},{expectStreaming:s})}sendImageDelete(e){return fe(e,"imageId is required"),m(this,X,Ie).call(this,{type:"USER_FILE_DELETE",imageId:e})}sendUserCancel(){return m(this,X,Ie).call(this,{type:"USER_CANCEL"})}sendUserTypingStart(){return m(this,X,Ie).call(this,{type:"USER_TYPING_START"})}sendUserTypingStop(){return m(this,X,Ie).call(this,{type:"USER_TYPING_STOP"})}sendUserMeta(e){return m(this,X,Ie).call(this,{type:"USER_META",metadata:e})}reloadConfig(){m(this,X,Ie).call(this,{type:"RELOAD_CONFIG"})}close(){o(this,W)?.close(1e3,"closed by user")}retry(){clearTimeout(o(this,Xt)),g(this,Xt,setTimeout(()=>{o(this,re).onReconnect?.(),g(this,W,this.initWS())},1e3*o(this,Jt))),Al(this,Jt)._++}initWS(){return new Mi(o(this,J),{url:()=>o(this,re).url(this.conversationId,{}),onOpen:e=>m(this,X,Yl).call(this,e),onMessage:e=>m(this,X,Ql).call(this,JSON.parse(e.data)),onError:e=>m(this,X,e1).call(this,e),onClose:e=>m(this,X,t1).call(this,e)})}hostConnected(){this.conversationId=o(this,re).restoreConversationState?.()?.conversationId||"",this.messages=o(this,re).restoreConversationState?.()?.messages||[]}reset(){m(this,X,Ie).call(this,{type:"NEW_CHAT"}),o(this,re).onReset?.(),this.isStreaming=!1,this.typingIndicator=void 0,this.ranOutOfCredits=!1,this.messages=[],this.conversationId="",this.isLiveMode=!1,g(this,Ce,[]),o(this,J).requestUpdate()}hostDisconnected(){clearTimeout(o(this,Xt))}connect(){o(this,W)||g(this,W,this.initWS())}reconnectSocket(){o(this,W)?.close(1e3,"destroy"),g(this,W,this.initWS())}get lastMsg(){if(this.messages.length>0)return this.messages[this.messages.length-1]}};J=new WeakMap,re=new WeakMap,W=new WeakMap,Jt=new WeakMap,Xt=new WeakMap,Ce=new WeakMap,X=new WeakSet,Ie=function(e,{expectStreaming:r=!1}={}){return this.ranOutOfCredits?!1:o(this,W)?o(this,W).isConnecting?(console.warn("WebSocket is connecting, message not sent",e),!1):o(this,W).isConnected?(r&&!this.isLiveMode&&(this.isStreaming=!0,o(this,J).requestUpdate()),o(this,W).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)},Yl=function(e){g(this,Jt,0)},Ql=function(e){switch(e.type){case"NEW_MESSAGE":{this.messages=[...this.messages,{...e.message,streaming:!0}].filter((r,n,i)=>n===i.findIndex(s=>s.id===r.id)),this.typingIndicator=void 0,o(this,J).requestUpdate(),o(this,re).onNewMessage?.(e.message);break}case"APPEND_MESSAGE":{let r=this.messages.find(n=>n.id===e.message.id);if(r){switch(e.message.content_type){case"text":{let{part:n,delta:i,position:s}=e.message;r.content=r.content.slice(0,s)+i,r.parts||=[],r.parts[n]={text:r.parts[n]&&"text"in r.parts[n]?(r.parts[n].text||"").slice(0,s)+i:i};break}case"html":{let{part:n,delta:i,position:s}=e.message;r.parts||=[],r.parts[n]={html:r.parts[n]&&"html"in r.parts[n]?(r.parts[n].html||"").slice(0,s)+i:i};break}case"data":{let{part:n}=e.message;r.parts||=[],r.parts[n]={tag:e.message.tag,data:r.parts[n]&&"data"in r.parts[n]?Object.assign(r.parts[n].data||{},e.message.data):e.message.data};break}}e.metadata&&(r.metadata=e.metadata),o(this,re).onMessageAppend?.(e),o(this,J).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,o(this,J).requestUpdate(),o(this,re).onMessageDone?.(e,r),o(this,re).persistConversationState?.(this.conversationId,this.messages);break}case"MESSAGE_CANCEL":{this.isStreaming=!1,this.typingIndicator=void 0,o(this,J).requestUpdate();break}case"ERROR":{o(this,re).onMessageError?.(e);break}case"CONNECTED":{this.conversationId=e.conversationId,this.messages=e.messages,o(this,re).onConnect?.(e.conversationId,e.metadata),o(this,re).persistConversationState?.(e.conversationId,e.messages),this.isLiveMode=e.metadata?.isLiveMode,o(this,J).requestUpdate();break}case"TYPING_START":{e.role==="assistant"&&(this.isStreaming=!0),this.typingIndicator={role:e.role,metadata:e.metadata},o(this,J).requestUpdate();break}case"TYPING_STOP":{this.typingIndicator=void 0,o(this,J).requestUpdate();break}case"RAN_OUT_OF_CREDITS":{this.ranOutOfCredits=!0,o(this,J).requestUpdate();break}case"RECONNECT":{this.reconnectSocket(),o(this,J).requestUpdate();break}default:console.warn(`Unknown message type: ${JSON.stringify(e)}`)}},e1=function(e){console.error("onError",e),o(this,re).onError?.(e)},t1=function(e){o(this,J).isConnected&&o(this,W)&&!o(this,W).isConnected&&e.reason==="reconnect"&&this.retry(),this.isStreaming=!1,this.typingIndicator=void 0,o(this,J).requestUpdate(),o(this,re).onClose?.()};var Vd=Symbol(),Fu=Symbol();var r1=Object.getPrototypeOf,Po=new WeakMap,Nu=t=>t&&(Po.has(t)?Po.get(t):r1(t)===Object.prototype||r1(t)===Array.prototype);var n1=t=>Nu(t)&&t[Fu]||null,Uo=(t,e=!0)=>{Po.set(t,e)};var Vo=t=>typeof t=="object"&&t!==null,qu=t=>Vo(t)&&!Bo.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),o1=(t,e)=>{let r=i1.get(t);if(r?.[0]===e)return r[1];let n=Array.isArray(t)?[]:Object.create(Object.getPrototypeOf(t));return Uo(n,!0),i1.set(t,[e,n]),Reflect.ownKeys(t).forEach(i=>{if(Object.getOwnPropertyDescriptor(n,i))return;let s=Reflect.get(t,i),{enumerable:a}=Reflect.getOwnPropertyDescriptor(t,i),u={value:s,enumerable:a,configurable:!0};if(Bo.has(s))Uo(s,!1);else if(kt.has(s)){let[l,c]=kt.get(s);u.value=o1(l,c())}Object.defineProperty(n,i,u)}),Object.preventExtensions(n)},Zu=(t,e,r,n)=>({deleteProperty(i,s){let a=Reflect.get(i,s);r(s);let u=Reflect.deleteProperty(i,s);return u&&n(["delete",[s],a]),u},set(i,s,a,u){let l=!t()&&Reflect.has(i,s),c=Reflect.get(i,s,u);if(l&&(s1(c,a)||Li.has(a)&&s1(c,Li.get(a))))return!0;r(s),Vo(a)&&(a=n1(a)||a);let p=!kt.has(a)&&Gu(a)?Ho(a):a;return e(s,p),Reflect.set(i,s,p,u),n(["set",[s],a,c]),!0}}),kt=new WeakMap,Bo=new WeakSet,i1=new WeakMap,Ro=[1],Li=new WeakMap,s1=Object.is,Wu=(t,e)=>new Proxy(t,e),Gu=qu,Ku=o1,Ju=Zu;function Ho(t={}){if(!Vo(t))throw new Error("object required");let e=Li.get(t);if(e)return e;let r=Ro[0],n=new Set,i=(k,M=++Ro[0])=>{r!==M&&(s=r=M,n.forEach(C=>C(k,M)))},s=r,a=(k=Ro[0])=>(s!==k&&(s=k,l.forEach(([M])=>{let C=M[1](k);C>r&&(r=C)})),r),u=k=>(M,C)=>{let _=[...M];_[1]=[k,..._[1]],i(_,C)},l=new Map,c=(k,M)=>{let C=!Bo.has(M)&&kt.get(M);if(C){if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&l.has(k))throw new Error("prop listener already exists");if(n.size){let _=C[2](u(k));l.set(k,[C,_])}else l.set(k,[C])}},p=k=>{var M;let C=l.get(k);C&&(l.delete(k),(M=C[1])==null||M.call(C))},f=k=>(n.add(k),n.size===1&&l.forEach(([C,_],L)=>{if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&_)throw new Error("remove already exists");let F=C[2](u(L));l.set(L,[C,F])}),()=>{n.delete(k),n.size===0&&l.forEach(([C,_],L)=>{_&&(_(),l.set(L,[C]))})}),v=!0,x=Ju(()=>v,c,p,i),S=Wu(t,x);Li.set(t,S);let T=[t,a,f];return kt.set(S,T),Reflect.ownKeys(t).forEach(k=>{let M=Object.getOwnPropertyDescriptor(t,k);"value"in M&&M.writable&&(S[k]=t[k])}),v=!1,S}function ji(t,e,r){let n=kt.get(t);(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!n&&console.warn("Please use proxy object");let i,s=[],a=n[2],u=!1,c=a(p=>{if(s.push(p),r){e(s.splice(0));return}i||(i=Promise.resolve().then(()=>{i=void 0,u&&e(s.splice(0))}))});return u=!0,()=>{u=!1,c()}}function Yt(t){let e=kt.get(t);(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!e&&console.warn("Please use proxy object");let[r,n]=e;return Ku(r,n())}var hn,Qt,Ct,er,tr=class{constructor(e,r){d(this,hn);d(this,Qt);d(this,Ct);d(this,er,()=>{});g(this,hn,e),g(this,Qt,r),g(this,Ct,Yt(r)),e.addController(this)}get state(){return o(this,Ct)}get value(){return o(this,Ct)}hostConnected(){o(this,er).call(this),g(this,er,ji(o(this,Qt),()=>{g(this,Ct,Yt(o(this,Qt))),o(this,hn).requestUpdate()}))}hostDisconnected(){o(this,er).call(this)}};hn=new WeakMap,Qt=new WeakMap,Ct=new WeakMap,er=new WeakMap;var pn,dn,$t,rr,Qe=class{constructor(e,r,n){d(this,pn);d(this,dn);w(this,"proxyObject");d(this,$t);d(this,rr,()=>{});g(this,pn,e),g(this,dn,n),this.proxyObject=Ho(r),g(this,$t,Yt(this.proxyObject)),e.addController(this)}get state(){return o(this,$t)}get value(){return o(this,$t)}hostConnected(){o(this,rr).call(this),o(this,dn)?.subscribe&&g(this,rr,ji(this.proxyObject,()=>{g(this,$t,Yt(this.proxyObject)),o(this,pn).requestUpdate()}))}hostDisconnected(){o(this,rr).call(this)}};pn=new WeakMap,dn=new WeakMap,$t=new WeakMap,rr=new WeakMap;var nr,fn,ir,St,Et,Ti=class{constructor(e,{provider:r,tag:n,key:i}){d(this,nr);d(this,fn);d(this,ir);d(this,St,null);d(this,Et,null);g(this,nr,e),g(this,fn,n),g(this,ir,i),e.addController(this)}get value(){return o(this,Et)?o(this,Et).value:null}hostConnected(){if(o(this,Et)||(g(this,St,Xu(o(this,nr),o(this,fn))),!o(this,St)))return;let e=o(this,St)[o(this,ir)]instanceof Qe?o(this,St)[o(this,ir)]:null;e&&g(this,Et,new tr(o(this,nr),e.proxyObject))}hostDisconnected(){}};nr=new WeakMap,fn=new WeakMap,ir=new WeakMap,St=new WeakMap,Et=new WeakMap;function Xu(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 a1=()=>{if(window.Shopify)try{return{customerId:Yu()}}catch{return null}return null},Yu=()=>{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},l1=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 c1(t,e="http"){return t.startsWith("http://")||t.startsWith("https://")?t:`${e}://${t}`}function zo(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 u1(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 h1=()=>{if(window.ShopRenter)try{let t=e2();return{customerEmail:t?.customerEmail,customerId:t?.customerId,customerName:t?.customerName}}catch{return null}return null},e2=()=>{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}}},p1=async()=>{try{let t=window.ShopRenter.shop?.domain;if(!t)return[];let e=c1(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 d1=()=>{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},f1=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 Fo;function No(t){return{lang:t?.lang??Fo?.lang,message:t?.message,abortEarly:t?.abortEarly??Fo?.abortEarly,abortPipeEarly:t?.abortPipeEarly??Fo?.abortPipeEarly}}var n2;function i2(t){return n2?.get(t)}var s2;function o2(t){return s2?.get(t)}var a2;function l2(t,e){return a2?.get(t)?.get(e)}function g1(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 ve(t,e,r,n,i){let s=i&&"input"in i?i.input:r.value,a=i?.expected??t.expects??null,u=i?.received??g1(s),l={kind:t.kind,type:t.type,input:s,expected:a,received:u,message:`Invalid ${e}: ${a?`Expected ${a} but r`:"R"}eceived ${u}`,requirement:t.requirement,path:i?.path,issues:i?.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=t.kind==="schema",p=i?.message??t.message??l2(t.reference,l.lang)??(c?o2(l.lang):null)??n.message??i2(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function ye(t){return{version:1,vendor:"valibot",validate(e){return t["~run"]({value:e},No())}}}function c2(t,e){return Object.hasOwn(t,e)&&e!=="__proto__"&&e!=="prototype"&&e!=="constructor"}function w1(t,e){let r=[...new Set(t)];return r.length>1?`(${r.join(` ${e} `)})`:r[0]??"never"}var u2=class extends Error{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}};function qo(t,e){return{kind:"validation",type:"max_length",reference:qo,async:!1,expects:`<=${t}`,requirement:t,message:e,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&ve(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Zo(t,e){return{kind:"validation",type:"min_length",reference:Zo,async:!1,expects:`>=${t}`,requirement:t,message:e,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&ve(this,"length",r,n,{received:`${r.value.length}`}),r}}}function h2(t,e,r){return typeof t.fallback=="function"?t.fallback(e,r):t.fallback}function v1(t,e,r){return typeof t.default=="function"?t.default(e,r):t.default}function Wo(){return{kind:"schema",type:"any",reference:Wo,expects:"any",async:!1,get"~standard"(){return ye(this)},"~run"(t){return t.typed=!0,t}}}function sr(t,e){return{kind:"schema",type:"array",reference:sr,expects:"Array",async:!1,item:t,message:e,get"~standard"(){return ye(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 a=i[s],u=this.item["~run"]({value:a},n);if(u.issues){let l={type:"array",origin:"value",input:i,key:s,value:a};for(let c of u.issues)c.path?c.path.unshift(l):c.path=[l],r.issues?.push(c);if(r.issues||(r.issues=u.issues),n.abortEarly){r.typed=!1;break}}u.typed||(r.typed=!1),r.value.push(u.value)}}else ve(this,"type",r,n);return r}}}function Go(t){return{kind:"schema",type:"boolean",reference:Go,expects:"boolean",async:!1,message:t,get"~standard"(){return ye(this)},"~run"(e,r){return typeof e.value=="boolean"?e.typed=!0:ve(this,"type",e,r),e}}}function Ko(t){return{kind:"schema",type:"null",reference:Ko,expects:"null",async:!1,message:t,get"~standard"(){return ye(this)},"~run"(e,r){return e.value===null?e.typed=!0:ve(this,"type",e,r),e}}}function Di(t){return{kind:"schema",type:"number",reference:Di,expects:"number",async:!1,message:t,get"~standard"(){return ye(this)},"~run"(e,r){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:ve(this,"type",e,r),e}}}function qe(t,e){return{kind:"schema",type:"object",reference:qe,expects:"Object",async:!1,entries:t,message:e,get"~standard"(){return ye(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 a=this.entries[s];if(s in i||(a.type==="exact_optional"||a.type==="optional"||a.type==="nullish")&&a.default!==void 0){let u=s in i?i[s]:v1(a),l=a["~run"]({value:u},n);if(l.issues){let c={type:"object",origin:"value",input:i,key:s,value:u};for(let p of l.issues)p.path?p.path.unshift(c):p.path=[c],r.issues?.push(p);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value[s]=l.value}else if(a.fallback!==void 0)r.value[s]=h2(a);else if(a.type!=="exact_optional"&&a.type!=="optional"&&a.type!=="nullish"&&(ve(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 ve(this,"type",r,n);return r}}}function or(t,e){return{kind:"schema",type:"optional",reference:or,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,get"~standard"(){return ye(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=v1(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Jo(t,e){return{kind:"schema",type:"picklist",reference:Jo,expects:w1(t.map(g1),"|"),async:!1,options:t,message:e,get"~standard"(){return ye(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:ve(this,"type",r,n),r}}}function Oi(t,e,r){return{kind:"schema",type:"record",reference:Oi,expects:"Object",async:!1,key:t,value:e,message:r,get"~standard"(){return ye(this)},"~run"(n,i){let s=n.value;if(s&&typeof s=="object"){n.typed=!0,n.value={};for(let a in s)if(c2(s,a)){let u=s[a],l=this.key["~run"]({value:a},i);if(l.issues){let p={type:"object",origin:"key",input:s,key:a,value:u};for(let f of l.issues)f.path=[p],n.issues?.push(f);if(n.issues||(n.issues=l.issues),i.abortEarly){n.typed=!1;break}}let c=this.value["~run"]({value:u},i);if(c.issues){let p={type:"object",origin:"value",input:s,key:a,value:u};for(let f of c.issues)f.path?f.path.unshift(p):f.path=[p],n.issues?.push(f);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 ve(this,"type",n,i);return n}}}function Q(t){return{kind:"schema",type:"string",reference:Q,expects:"string",async:!1,message:t,get"~standard"(){return ye(this)},"~run"(e,r){return typeof e.value=="string"?e.typed=!0:ve(this,"type",e,r),e}}}function m1(t){let e;if(t)for(let r of t)e?e.push(...r.issues):e=r.issues;return e}function ar(t,e){return{kind:"schema",type:"union",reference:ar,expects:w1(t.map(r=>r.expects),"|"),async:!1,options:t,message:e,get"~standard"(){return ye(this)},"~run"(r,n){let i,s,a;for(let u of this.options){let l=u["~run"]({value:r.value},n);if(l.typed)if(l.issues)s?s.push(l):s=[l];else{i=l;break}else a?a.push(l):a=[l]}if(i)return i;if(s){if(s.length===1)return s[0];ve(this,"type",r,n,{issues:m1(s)}),r.typed=!0}else{if(a?.length===1)return a[0];ve(this,"type",r,n,{issues:m1(a)})}return r}}}function y1(t,e,r){let n=t["~run"]({value:e},No(r));if(n.issues)throw new u2(n.issues);return n.value}function b1(t,e){let r={};for(let n in t.entries)r[n]=!e||e.includes(n)?or(t.entries[n]):t.entries[n];return{...t,entries:r,get"~standard"(){return ye(this)}}}function x1(...t){return{...t[0],pipe:t,get"~standard"(){return ye(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 mn(t,e,r){let n=t["~run"]({value:e},No(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var k1=Oi(Q(),ar([Q(),Di(),Go(),Ko()])),C1=x1(Q(),Zo(1),qo(5e3)),$1=()=>{try{return window.UNAS?d1():window.Shopify?a1():window.ShopRenter?h1():null}catch{return null}},S1=async()=>{try{return window.UNAS?await f1():window.Shopify?await l1():window.ShopRenter?await p1():[]}catch{return[]}},lr={schema:qe({conversationId:or(Q()),messages:or(sr(qe({id:Q(),timestamp:Di(),role:Jo(["user","assistant","support"]),content:Q(),parts:or(sr(ar([qe({text:Q()}),qe({html:Q()}),qe({tag:Q(),data:Oi(Q(),Wo())})])))})))}),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=y1(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 P,E1,gn,wn,cr,V,_1,Ui=class Ui extends ${constructor(){super();d(this,P);w(this,"contextCtrl");d(this,gn);d(this,wn);d(this,cr,null);this.widgetId="",this.config={},this.callbacks={},this.xUserData=void 0,this.xCustomInstructions=void 0,this.autoConnect=!1,this.contextCtrl=new Qe(this,{config:this.config,callbacks:this.callbacks,xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,widgetId:this.widgetId,conversationId:"",messages:[],isStreaming:!1,typingIndicator:void 0,ranOutOfCredits:!1,isLiveMode:!1,lastMsg:void 0,hasQueuedMessages:!1,sendUserInput:this.sendUserInput.bind(this),sendUserCancel:this.sendUserCancel.bind(this),sendUserTypingStart:this.sendUserTypingStart.bind(this),sendUserTypingStop:this.sendUserTypingStop.bind(this),reset:this.reset.bind(this),reloadConfig:this.reloadConfig.bind(this),enqueueUserInput:this.enqueueUserInput.bind(this),connect:this.connect.bind(this),sendImageDelete:o(this,P,V).sendImageDelete.bind(o(this,P,V))})}connectedCallback(){super.connectedCallback(),this.updated()}updated(){this.autoConnect&&o(this,P,V).connect(),Object.assign(this.contextCtrl.proxyObject,{widgetId:this.widgetId,config:this.config,callbacks:this.callbacks,xUserData:o(this,gn),xCustomInstructions:o(this,wn),conversationId:o(this,P,V).conversationId,messages:o(this,P,E1),isStreaming:o(this,P,V).isStreaming,typingIndicator:o(this,P,V).typingIndicator,ranOutOfCredits:o(this,P,V).ranOutOfCredits,isLiveMode:o(this,P,V).isLiveMode,lastMsg:o(this,P,V).lastMsg,hasQueuedMessages:o(this,P,V).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:o(this,P,V).sendImageDelete.bind(o(this,P,V))}),m(this,P,_1).call(this)}sendUserInput(r,n={}){let i={xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,...n},s=o(this,P,V).sendUserInput(r,i);return s&&this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:r,example:!1,conversationId:o(this,P,V).conversationId}),s}async enqueueUserInput(r,n={}){let i={xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,role:"user",expectStreaming:!0,...n};return o(this,P,V).enqueueUserInput(r,i)}sendUserCancel(){o(this,P,V).sendUserCancel(),this.callbacks.onUserCanceledStreaming?.({widgetId:this.widgetId})}sendUserTypingStart(){o(this,P,V).sendUserTypingStart()}sendUserTypingStop(){o(this,P,V).sendUserTypingStop()}reset(){o(this,P,V).reset()}reloadConfig(){o(this,P,V).reloadConfig()}connect(){o(this,P,V).connect()}render(){return h`<slot></slot>`}};P=new WeakSet,E1=function(){return o(this,P,V)?.ranOutOfCredits?[{id:crypto.randomUUID(),role:"assistant",content:"Sorry, I've run out of credits. Please contact the shop directly.",timestamp:Date.now()}]:o(this,P,V)?.messages||[]},gn=new WeakMap,wn=new WeakMap,cr=new WeakMap,V=function(){return o(this,cr)||g(this,cr,new Ii(this,{autoConnect:this.autoConnect,url:r=>{let n=new URL(this.config.wsApiUrl);return n.searchParams.set("widgetId",this.widgetId),n.searchParams.set("conversationId",r),n.searchParams.set("pageUrl",window.location.href),n},onReconnect:()=>{},onError:r=>{console.error("ws error",r)},onClose:()=>{},onNewMessage:r=>{r.role==="assistant"&&this.callbacks.onNewMessageStartedStreaming?.({widgetId:this.widgetId,message:r,conversationId:o(this,P,V).conversationId})},onMessageAppend:r=>{},onMessageDone:(r,n)=>{n.role==="assistant"&&this.callbacks.onMessageEndedStreaming?.({widgetId:this.widgetId,text:n.content??"",message:n,usage_TOKENS_COMPLETION:r.message.usage.TOKENS_COMPLETION,conversationId:o(this,P,V).conversationId})},onMessageError:r=>{console.error("ws message error",r),r.message&&this.callbacks.onError?.({widgetId:this.widgetId,error:"WS: "+r.message})},onReset:()=>{lr.reset(this.widgetId)},onConnect:(r,n)=>{let i=$1();o(this,P,V).sendUserMeta({xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,customerInformation:i,language:window.navigator.language,cart:[]}),S1().then(s=>{s?.length>0&&o(this,P,V).sendUserMeta({xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,customerInformation:i,cart:s,language:window.navigator.language})}).catch(s=>{console.error(s)}),this.dispatchEvent(new Ui.ConnectedEvent({conversationId:r,metadata:n,widgetId:this.widgetId,pendingImages:n?.pendingImages||[]}))},persistConversationState:(r,n)=>{lr.persist(this.widgetId,r,n)},restoreConversationState:()=>lr.restore(this.widgetId)})),o(this,cr)},_1=function(){function r(i){if(!i)return;let s;try{s=typeof i=="object"?i:JSON.parse(i)}catch(u){console.error("Molin: user-data is not valid JSON",u);return}if(!s||typeof s!="object"||Object.keys(s).length===0)return;let a=mn(k1,s);if(!a.success){console.error("Molin: user-data does not pass schema validation",a.issues);return}return a.output}function n(i){if(!i)return;let s=mn(C1,i);if(!s.success){console.error("Molin: custom-instructions does not pass schema validation",s.issues);return}return s.output}g(this,gn,r(this.xUserData)),g(this,wn,n(this.xCustomInstructions))},w(Ui,"properties",{widgetId:{type:String},config:{type:Object},callbacks:{type:Object},xUserData:{type:Object},xCustomInstructions:{type:Object},autoConnect:{type:Boolean}});var ur=Ui;function M1(t){let e=new Ti(t,{provider:ur,tag:"mw-context-widget",key:"contextCtrl"});return new Proxy({value:null},{get(r,n){if(n==="value")return e.value}})}var Xo;ur.ConnectedEvent=(Xo=class extends CustomEvent{constructor(e,r={}){super(ur.ConnectedEvent.type,{detail:e,bubbles:!0,composed:!0,...r})}},w(Xo,"type","mw-context-widget:connected"),Xo);customElements.get("mw-context-widget")||customElements.define("mw-context-widget",ur);function aa(t){return[...t.v,(t.i?"!":"")+t.n].join(":")}function p2(t,e=","){return t.map(aa).join(e)}var O1=typeof CSS<"u"&&CSS.escape||(t=>t.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function Ri(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 Hi(t,e="@media "){return e+B(t).map(r=>(typeof r=="string"&&(r={min:r}),r.raw||Object.keys(r).map(n=>`(${n}-width:${r[n]})`).join(" and "))).join(",")}function B(t=[]){return Array.isArray(t)?t:t==null?[]:[t]}function A1(t){return t}function zi(){}var ne={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function P1(t){return t.match(/[-=:;]/g)?.length||0}function ra(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(P1(t),15)<<18}var d2=["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 la({n:t,i:e,v:r=[]},n,i,s){t&&(t=aa({n:t,i:e,v:r})),s=[...B(s)];for(let u of r){let l=n.theme("screens",u);for(let c of B(l&&Hi(l)||n.v(u))){var a;s.push(c),i|=l?67108864|ra(c):u=="dark"?1073741824:c[0]=="@"?ra(c):(a=c,1<<~(/:([a-z-]+)/.test(a)&&~d2.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:t,p:i,r:s,i:e}}var U1=new Map;function na(t){if(t.d){let e=[],r=Yo(t.r.reduce((n,i)=>i[0]=="@"?(e.push(i),n):i?Yo(n,s=>Yo(i,a=>{let u=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(a);if(u){let l=s.indexOf(u[1]);return~l?s.slice(0,l)+u[0]+s.slice(l+u[1].length):Qo(s,a)}return Qo(a,s)})):n,"&"),n=>Qo(n,t.n?"."+O1(t.n):""));return r&&e.push(r.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((n,i)=>i+"{"+n+"}",t.d)}}function Yo(t,e){return t.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(r,n,i)=>e(n)+i)}function Qo(t,e){return t.replace(/&/g,e)}var I1=new Intl.Collator("en",{numeric:!0});function R1(t,e){for(var r=0,n=t.length;r<n;){let i=n+r>>1;0>=V1(t[i],e)?r=i+1:n=i}return n}function V1(t,e){let r=t.p&ne.o;return r==(e.p&ne.o)&&(r==ne.b||r==ne.o)?0:t.p-e.p||t.o-e.o||I1.compare(L1(t.n),L1(e.n))||I1.compare(j1(t.n),j1(e.n))}function L1(t){return(t||"").split(/:/).pop().split("/").pop()||"\0"}function j1(t){return(t||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function ea(t,e){return Math.round(parseInt(t,16)*e)}function $e(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,a=[17,1,.062272][s-1];return`rgba(${[ea(t.substr(1,s),a),ea(t.substr(1+s,s),a),ea(t.substr(1+2*s,s),a),i]})`}return i=="1"?t:i=="0"?"#0000":t.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${i})`)}function B1(t,e,r,n,i=[]){return(function s(a,{n:u,p:l,r:c=[],i:p},f){let v=[],x="",S=0,T=0;for(let C in a||{}){var k,M;let _=a[C];if(C[0]=="@"){if(!_)continue;if(C[1]=="a"){v.push(...ua(u,l,Bi(""+_),f,l,c,p,!0));continue}if(C[1]=="l"){for(let L of B(_))v.push(...s(L,{n:u,p:(k=ne[C[7]],l&~ne.o|k),r:C[7]=="d"?[]:c,i:p},f));continue}if(C[1]=="i"){v.push(...B(_).map(L=>({p:-1,o:0,r:[],d:C+" "+L})));continue}if(C[1]=="k"){v.push({p:ne.d,o:0,r:[C],d:s(_,{p:ne.d},f).map(na).join("")});continue}if(C[1]=="f"){v.push(...B(_).map(L=>({p:ne.d,o:0,r:[C],d:s(L,{p:ne.d},f).map(na).join("")})));continue}}if(typeof _!="object"||Array.isArray(_))C=="label"&&_?u=_+Ri(JSON.stringify([l,p,a])):(_||_===0)&&(C=C.replace(/[A-Z]/g,L=>"-"+L.toLowerCase()),T+=1,S=Math.max(S,(M=C)[0]=="-"?0:P1(M)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(M)?+!!RegExp.$1||-!!RegExp.$2:0)+1),x+=(x?";":"")+B(_).map(L=>f.s(C,ca(""+L,f.theme)+(p?" !important":""))).join(";"));else if(C[0]=="@"||C.includes("&")){let L=l;C[0]=="@"&&(C=C.replace(/\bscreen\(([^)]+)\)/g,(F,te)=>{let se=f.theme("screens",te);return se?(L|=67108864,Hi(se,"")):F}),L|=ra(C)),v.push(...s(_,{n:u,p:L,r:[...c,C],i:p},f))}else v.push(...s(_,{p:l,r:[...c,C]},f))}return v.unshift({n:u,p:l,o:Math.max(0,15-T)+1.5*Math.min(S||15,15),r:c,d:x}),v.sort(V1)})(t,la(e,r,n,i),r)}function ca(t,e){return t.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(r,n,i,s,a="")=>{let u=e(i,a);return typeof u=="function"&&/color|fill|stroke/i.test(i)?$e(u):""+B(u).filter(l=>Object(l)!==l)})}function H1(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 Vi(t,e,r=ne.u,n,i){let s=[];for(let a of t)for(let u of(function(l,c,p,f,v){l={...l,i:l.i||v};let x=(function(S,T){let k=U1.get(S.n);return k?k(S,T):T.r(S.n,S.v[0]=="dark")})(l,c);return x?typeof x=="string"?({r:f,p}=la(l,c,p,f),H1(Vi(Bi(x),c,p,f,l.i),l.n)):Array.isArray(x)?x.map(S=>{var T,k;return{o:0,...S,r:[...B(f),...B(S.r)],p:(T=p,k=S.p??p,T&~ne.o|k)}}):B1(x,l,c,p,f):[{c:aa(l),p:0,o:0,r:[]}]})(a,e,r,n,i))s.splice(R1(s,u),0,u);return s}function ua(t,e,r,n,i,s,a,u){return H1((u?r.flatMap(l=>Vi([l],n,i,s,a)):Vi(r,n,i,s,a)).map(l=>l.p&ne.o&&(l.n||e==ne.b)?{...l,p:l.p&~ne.o|e,o:0}:l),t)}function f2(t,e,r,n){var i;return i=(s,a)=>{let{n:u,p:l,r:c,i:p}=la(s,a,e);return r&&ua(u,e,r,a,l,c,p,n)},U1.set(t,i),t}function ta(t,e,r){if(t[t.length-1]!="("){let n=[],i=!1,s=!1,a="";for(let u of t)if(!(u=="("||/[~@]$/.test(u))){if(u[0]=="!"&&(u=u.slice(1),i=!i),u.endsWith(":")){n[u=="dark:"?"unshift":"push"](u.slice(0,-1));continue}u[0]=="-"&&(u=u.slice(1),s=!s),u.endsWith("-")&&(u=u.slice(0,-1)),u&&u!="&"&&(a+=(a&&"-")+u)}a&&(s&&(a="-"+a),e[0].push({n:a,v:n.filter(m2),i}))}}function m2(t,e,r){return r.indexOf(t)==e}var T1=new Map;function Bi(t){let e=T1.get(t);if(!e){let r=[],n=[[]],i=0,s=0,a=null,u=0,l=(c,p=0)=>{i!=u&&(r.push(t.slice(i,u+p)),c&&ta(r,n)),i=u+1};for(;u<t.length;u++){let c=t[u];if(s)t[u-1]!="\\"&&(s+=+(c=="[")||-(c=="]"));else if(c=="[")s+=1;else if(a)t[u-1]!="\\"&&a.test(t.slice(u))&&(a=null,i=u+RegExp.lastMatch.length);else if(c=="/"&&t[u-1]!="\\"&&(t[u+1]=="*"||t[u+1]=="/"))a=t[u+1]=="*"?/^\*\//:/^[\r\n]/;else if(c=="(")l(),r.push(c);else if(c==":")t[u+1]!=":"&&l(!1,1);else if(/[\s,)]/.test(c)){l(!0);let p=r.lastIndexOf("(");if(c==")"){let f=r[p-1];if(/[~@]$/.test(f)){let v=n.shift();r.length=p,ta([...r,"#"],n);let{v:x}=n[0].pop();for(let S of v)S.v.splice(+(S.v[0]=="dark")-+(x[0]=="dark"),x.length);ta([...r,f2(f.length>1?f.slice(0,-1)+Ri(JSON.stringify([f,v])):f+"("+p2(v)+")",ne.a,v,/@$/.test(f))],n)}p=r.lastIndexOf("(",p-1)}r.length=p+1}else/[~@]/.test(c)&&t[u+1]=="("&&n.unshift([])}l(!0),T1.set(t,e=n[0])}return e}function y(t,e,r){return[t,ia(e,r)]}function ia(t,e){return typeof t=="function"?t:typeof t=="string"&&/^[\w-]+$/.test(t)?(r,n)=>({[t]:e?e(r,n):sa(r,1)}):r=>t||{[r[1]]:sa(r,2)}}function sa(t,e,r=t.slice(e).find(Boolean)||t.$$||t.input){return t.input[0]=="-"?`calc(${r} * -1)`:r}function b(t,e,r,n){return[t,ha(e,r,n)]}function ha(t,e,r){let n=typeof e=="string"?(i,s)=>({[e]:r?r(i,s):i._}):e||(({1:i,_:s},a,u)=>({[i||u]:s}));return(i,s)=>{let a=z1(t||i[1]),u=s.theme(a,i.$$)??Pe(i.$$,a,s);if(u!=null)return i._=sa(i,0,u),n(i,s,a)}}function ie(t,e={},r){return[t,g2(e,r)]}function g2(t={},e){return(r,n)=>{let{section:i=z1(r[0]).replace("-","")+"Color"}=t,[s,a]=w2(r.$$);if(!s)return;let u=n.theme(i,s)||Pe(s,i,n);if(!u||typeof u=="object")return;let{opacityVariable:l=`--tw-${r[0].replace(/-$/,"")}-opacity`,opacitySection:c=i.replace("Color","Opacity"),property:p=i,selector:f}=t,v=n.theme(c,a||"DEFAULT")||a&&Pe(a,c,n),x=e||(({_:T})=>{let k=vn(p,T);return f?{[f]:k}:k});r._={value:$e(u,{opacityVariable:l||void 0,opacityValue:v||void 0}),color:T=>$e(u,T),opacityVariable:l||void 0,opacityValue:v||void 0};let S=x(r,n);if(!r.dark){let T=n.d(i,s,u);T&&T!==u&&(r._={value:$e(T,{opacityVariable:l||void 0,opacityValue:v||"1"}),color:k=>$e(T,k),opacityVariable:l||void 0,opacityValue:v||void 0},S={"&":S,[n.v("dark")]:x(r,n)})}return S}}function w2(t){return(t.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function vn(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 Pe(t,e,r){if(t[0]=="["&&t.slice(-1)=="]"){if(t=hr(ca(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 z1(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function hr(t){return t.includes("url(")?t.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,r="",n,i="")=>hr(r)+n+hr(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 yn({presets:t=[],...e}){let r={darkMode:void 0,darkColor:void 0,preflight:e.preflight!==!1&&[],theme:{},variants:B(e.variants),rules:B(e.rules),ignorelist:B(e.ignorelist),hash:void 0,stringify:(n,i)=>n+":"+i,finalize:[]};for(let n of B([...t,{darkMode:e.darkMode,darkColor:e.darkColor,preflight:e.preflight!==!1&&B(e.preflight),theme:e.theme,hash:e.hash,stringify:e.stringify,finalize:e.finalize}])){let{preflight:i,darkMode:s=r.darkMode,darkColor:a=r.darkColor,theme:u,variants:l,rules:c,ignorelist:p,hash:f=r.hash,stringify:v=r.stringify,finalize:x}=typeof n=="function"?n(r):n;r={preflight:r.preflight!==!1&&i!==!1&&[...r.preflight,...B(i)],darkMode:s,darkColor:a,theme:{...r.theme,...u,extend:{...r.theme.extend,...u?.extend}},variants:[...r.variants,...B(l)],rules:[...r.rules,...B(c)],ignorelist:[...r.ignorelist,...B(p)],hash:f,stringify:v,finalize:[...r.finalize,...B(x)]}}return r}function D1(t,e,r,n,i,s){for(let a of e){let u=r.get(a);u||r.set(a,u=n(a));let l=u(t,i,s);if(l)return l}}function v2(t){var e;return oa(t[0],typeof(e=t[1])=="function"?e:()=>e)}function y2(t){var e,r;return Array.isArray(t)?oa(t[0],ia(t[1],t[2])):oa(t,ia(e,r))}function oa(t,e){return F1(t,(r,n,i,s)=>{let a=n.exec(r);if(a)return a.$$=r.slice(a[0].length),a.dark=s,e(a,i)})}function F1(t,e){let r=B(t).map(b2);return(n,i,s)=>{for(let a of r){let u=e(n,a,i,s);if(u)return u}}}function b2(t){return typeof t=="string"?RegExp("^"+t+(t.includes("$")||t.slice(-1)=="-"?"":"$")):t}function N1(t,e){let r=yn(t),n=(function({theme:l,darkMode:c,darkColor:p=zi,variants:f,rules:v,hash:x,stringify:S,ignorelist:T,finalize:k}){let M=new Map,C=new Map,_=new Map,L=new Map,F=F1(T,(R,oe)=>oe.test(R));f.push(["dark",Array.isArray(c)||c=="class"?`${B(c)[1]||".dark"} &`:typeof c=="string"&&c!="media"?c:"@media (prefers-color-scheme:dark)"]);let te=typeof x=="function"?R=>x(R,Ri):x?Ri:A1;te!==A1&&k.push(R=>({...R,n:R.n&&te(R.n),d:R.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(oe,pe)=>"--"+te(pe).replace("#",""))}));let se={theme:(function({extend:R={},...oe}){let pe={},fo={get colors(){return ft("colors")},theme:ft,negative(){return{}},breakpoints(G){let ae={};for(let ge in G)typeof G[ge]=="string"&&(ae["screen-"+ge]=G[ge]);return ae}};return ft;function ft(G,ae,ge,Kr){if(G){if({1:G,2:Kr}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(G)||[,G],/[.[]/.test(G)){let ze=[];G.replace(/\[([^\]]+)\]|([^.[]+)/g,(gt,Xr,xu=Xr)=>ze.push(xu)),G=ze.shift(),ge=ae,ae=ze.join("-")}let Oe=pe[G]||Object.assign(Object.assign(pe[G]={},wi(oe,G)),wi(R,G));if(ae==null)return Oe;ae||(ae="DEFAULT");let mt=Oe[ae]??ae.split("-").reduce((ze,gt)=>ze?.[gt],Oe)??ge;return Kr?$e(mt,{opacityValue:ca(Kr,ft)}):mt}let Jr={};for(let Oe of[...Object.keys(oe),...Object.keys(R)])Jr[Oe]=ft(Oe);return Jr}function wi(G,ae){let ge=G[ae];return typeof ge=="function"&&(ge=ge(fo)),ge&&/color|fill|stroke/i.test(ae)?(function Kr(Jr,Oe=[]){let mt={};for(let ze in Jr){let gt=Jr[ze],Xr=[...Oe,ze];mt[Xr.join("-")]=gt,ze=="DEFAULT"&&(Xr=Oe,mt[Oe.join("-")]=gt),typeof gt=="object"&&Object.assign(mt,Kr(gt,Xr))}return mt})(ge):ge}})(l),e:O1,h:te,s(R,oe){return S(R,oe,se)},d(R,oe,pe){return p(R,oe,se,pe)},v(R){return M.has(R)||M.set(R,D1(R,f,C,v2,se)||"&:"+R),M.get(R)},r(R,oe){let pe=JSON.stringify([R,oe]);return _.has(pe)||_.set(pe,!F(R,se)&&D1(R,v,L,y2,se,oe)),_.get(pe)},f(R){return k.reduce((oe,pe)=>pe(oe,se),R)}};return se})(r),i=new Map,s=[],a=new Set;e.resume(l=>i.set(l,l),(l,c)=>{e.insert(l,s.length,c),s.push(c),a.add(l)});function u(l){let c=n.f(l),p=na(c);if(p&&!a.has(p)){a.add(p);let f=R1(s,l);e.insert(p,f,l),s.splice(f,0,l)}return c.n}return Object.defineProperties(function(c){if(!i.size)for(let f of B(r.preflight))typeof f=="function"&&(f=f(n)),f&&(typeof f=="string"?ua("",ne.b,Bi(f),n,ne.b,[],!1,!0):B1(f,{},n,ne.b)).forEach(u);c=""+c;let p=i.get(c);if(!p){let f=new Set;for(let v of Vi(Bi(c),n))f.add(v.c).add(u(v));p=[...f].filter(Boolean).join(" "),i.set(c,p).set(p,p)}return p},Object.getOwnPropertyDescriptors({get target(){return e.target},theme:n.theme,config:r,snapshot(){let l=e.snapshot(),c=new Set(a),p=new Map(i),f=[...s];return()=>{l(),a=c,i=p,s=f}},clear(){e.clear(),a=new Set,i=new Map,s=[]},destroy(){this.clear(),e.destroy()}}))}function x2(t,e){return t!=e&&""+t.split(" ").sort()!=""+e.split(" ").sort()}function q1(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:a}of i)if(s[0]=="a")n(a);else for(let u of a.querySelectorAll("[class]"))n(u);e.takeRecords()}function n(i){let s,a=i.getAttribute?.("class");a&&x2(a,s=t(a))&&i.setAttribute("class",s)}}function k2(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 Fi(t){let e=t?.cssRules?t:(t&&typeof t!="string"?t:k2(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:zi}}var C2=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 Z1(t){return C2.get(t)}function W1(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 G1(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 $2=[["-webkit-",1],["-moz-",2],["-ms-",4]];function Ni(){return({stringify:t})=>({stringify(e,r,n){let i="",s=Z1(e);s&&(i+=t(s,r,n)+";");let a=W1(e),u=G1(e,r);for(let l of $2)a&l[1]&&(i+=t(l[0]+e,r,n)+";"),u&l[1]&&(i+=t(e,l[0]+r,n)+";");return i+t(e,r,n)}})}function qi(){return{rules:[["line-clamp-none",{"-webkit-line-clamp":"unset"}],["line-clamp-",ha("lineClamp",({_:t})=>K1(t))],["line-clamp-(\\d+)",({1:t})=>K1(t)]]}}function K1(t){return{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":`${t}`}}var xn={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",...be(4,"rem",4,.5,.5),...be(12,"rem",4,5),14:"3.5rem",...be(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:U("blur"),backdropBrightness:U("brightness"),backdropContrast:U("contrast"),backdropGrayscale:U("grayscale"),backdropHueRotate:U("hueRotate"),backdropInvert:U("invert"),backdropOpacity:U("opacity"),backdropSaturate:U("saturate"),backdropSepia:U("sepia"),backgroundColor:U("colors"),backgroundImage:{none:"none"},backgroundOpacity:U("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:{...be(200,"",100,0,50),...be(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:t})=>({DEFAULT:t("colors.gray.200","currentColor"),...t("colors")}),borderOpacity:U("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:U("spacing"),borderWidth:{DEFAULT:"1px",...Se(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:U("colors"),caretColor:U("colors"),accentColor:({theme:t})=>({auto:"auto",...t("colors")}),contrast:{...be(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:U("borderColor"),divideOpacity:U("borderOpacity"),divideWidth:U("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"),...bn(2,6),...bn(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:U("spacing"),gradientColorStops:U("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"),...bn(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:t})=>({...t("spacing"),...bn(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:{...be(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:{...be(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:U("spacing"),placeholderColor:U("colors"),placeholderOpacity:U("opacity"),outlineColor:U("colors"),outlineOffset:Se(8,"px"),outlineWidth:Se(8,"px"),ringColor:({theme:t})=>({...t("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:U("colors"),ringOffsetWidth:Se(8,"px"),ringOpacity:({theme:t})=>({...t("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...Se(8,"px")},rotate:{...Se(2,"deg"),...Se(12,"deg",3),...Se(180,"deg",45)},saturate:be(200,"",100,0,50),scale:{...be(150,"",100,0,50),...be(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:U("spacing"),scrollPadding:U("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...Se(2,"deg"),...Se(12,"deg",3)},space:U("spacing"),stroke:({theme:t})=>({...t("colors"),none:"none"}),strokeWidth:be(2),textColor:U("colors"),textDecorationColor:U("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...Se(8,"px")},textUnderlineOffset:{auto:"auto",...Se(8,"px")},textIndent:U("spacing"),textOpacity:U("opacity"),transitionDuration:({theme:t})=>({...t("durations"),DEFAULT:"150ms"}),transitionDelay:U("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"),...bn(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:{...be(50,"",1,0,10),auto:"auto"}};function bn(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 Se(t,e,r=0){let n={};for(;r<=t;r=2*r||1)n[r]=r+e;return n}function be(t,e="",r=1,n=0,i=1,s={}){for(;n<=t;n+=i)s[n]=n/r+e;return s}function U(t){return({theme:e})=>e(t)}var J1={"*,::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, ${xn.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, ${xn.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 r0=[y("\\[([-\\w]+):(.+)]",({1:t,2:e},r)=>({"@layer overrides":{"&":{[t]:Pe(`[${e}]`,"",r)}}})),y("(group|peer)([~/][^-[]+)?",({input:t},{h:e})=>[{c:e(t)}]),b("aspect-","aspectRatio"),y("container",(t,{theme:e})=>{let{screens:r=e("screens"),center:n,padding:i}=e("container"),s={width:"100%",marginRight:n&&"auto",marginLeft:n&&"auto",...a("xs")};for(let u in r){let l=r[u];typeof l=="string"&&(s[Hi(l)]={"&":{maxWidth:l,...a(u)}})}return s;function a(u){let l=i&&(typeof i=="string"?i:i[u]||i.DEFAULT);if(l)return{paddingRight:l,paddingLeft:l}}}),b("content-","content",({_:t})=>({"--tw-content":t,content:"var(--tw-content)"})),y("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),y("box-(border|content)","boxSizing",({1:t})=>t+"-box"),y("hidden",{display:"none"}),y("table-(auto|fixed)","tableLayout"),y(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",y("isolate","isolation"),y("object-(contain|cover|fill|none|scale-down)","objectFit"),b("object-","objectPosition"),y("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",Zi),y("overscroll(-[xy])?-(auto|contain|none)",({1:t="",2:e})=>({["overscroll-behavior"+t]:e})),y("(static|fixed|absolute|relative|sticky)","position"),b("-?inset(-[xy])?(?:$|-)","inset",({1:t,_:e})=>({top:t!="-x"&&e,right:t!="-y"&&e,bottom:t!="-x"&&e,left:t!="-y"&&e})),b("-?(top|bottom|left|right)(?:$|-)","inset"),y("(visible|collapse)","visibility"),y("invisible",{visibility:"hidden"}),b("-?z-","zIndex"),y("flex-((row|col)(-reverse)?)","flexDirection",X1),y("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),b("(flex-(?:grow|shrink))(?:$|-)"),b("(flex)-"),b("grow(?:$|-)","flexGrow"),b("shrink(?:$|-)","flexShrink"),b("basis-","flexBasis"),b("-?(order)-"),"-?(order)-(\\d+)",b("grid-cols-","gridTemplateColumns"),y("grid-cols-(\\d+)","gridTemplateColumns",t0),b("col-","gridColumn"),y("col-(span)-(\\d+)","gridColumn",e0),b("col-start-","gridColumnStart"),y("col-start-(auto|\\d+)","gridColumnStart"),b("col-end-","gridColumnEnd"),y("col-end-(auto|\\d+)","gridColumnEnd"),b("grid-rows-","gridTemplateRows"),y("grid-rows-(\\d+)","gridTemplateRows",t0),b("row-","gridRow"),y("row-(span)-(\\d+)","gridRow",e0),b("row-start-","gridRowStart"),y("row-start-(auto|\\d+)","gridRowStart"),b("row-end-","gridRowEnd"),y("row-end-(auto|\\d+)","gridRowEnd"),y("grid-flow-((row|col)(-dense)?)","gridAutoFlow",t=>Zi(X1(t))),y("grid-flow-(dense)","gridAutoFlow"),b("auto-cols-","gridAutoColumns"),b("auto-rows-","gridAutoRows"),b("gap-x(?:$|-)","gap","columnGap"),b("gap-y(?:$|-)","gap","rowGap"),b("gap(?:$|-)","gap"),"(justify-(?:items|self))-",y("justify-","justifyContent",Y1),y("(content|items|self)-",t=>({["align-"+t[1]]:Y1(t)})),y("(place-(content|items|self))-",({1:t,$$:e})=>({[t]:("wun".includes(e[3])?"space-":"")+e})),b("p([xytrbl])?(?:$|-)","padding",pr("padding")),b("-?m([xytrbl])?(?:$|-)","margin",pr("margin")),b("-?space-(x|y)(?:$|-)","space",({1:t,_:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[t]]:`calc(${e} * calc(1 - var(--tw-space-${t}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[t]]:`calc(${e} * var(--tw-space-${t}-reverse))`}})),y("space-(x|y)-reverse",({1:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"1"}})),b("w-","width"),b("min-w-","minWidth"),b("max-w-","maxWidth"),b("h-","height"),b("min-h-","minHeight"),b("max-h-","maxHeight"),b("font-","fontWeight"),b("font-","fontFamily",({_:t})=>typeof(t=B(t))[1]=="string"?{fontFamily:Le(t)}:{fontFamily:Le(t[0]),...t[1]}),y("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),y("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),y("italic","fontStyle"),y("not-italic",{fontStyle:"normal"}),y("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:t,2:e="",3:r})=>e=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(r?"numeric-fraction":"pt".includes(e[0])?"numeric-spacing":e?"numeric-figure":t)]:t,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...et({"--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,/*!*/ /*!*/)"})}),b("tracking-","letterSpacing"),b("leading-","lineHeight"),y("list-(inside|outside)","listStylePosition"),b("list-","listStyleType"),y("list-","listStyleType"),b("placeholder-opacity-","placeholderOpacity",({_:t})=>({"&::placeholder":{"--tw-placeholder-opacity":t}})),ie("placeholder-",{property:"color",selector:"&::placeholder"}),y("text-(left|center|right|justify|start|end)","textAlign"),y("text-(ellipsis|clip)","textOverflow"),b("text-opacity-","textOpacity","--tw-text-opacity"),ie("text-",{property:"color"}),b("text-","fontSize",({_:t})=>typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}),b("indent-","textIndent"),y("(overline|underline|line-through)","textDecorationLine"),y("no-underline",{textDecorationLine:"none"}),b("underline-offset-","textUnderlineOffset"),ie("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),b("decoration-","textDecorationThickness"),y("decoration-","textDecorationStyle"),y("(uppercase|lowercase|capitalize)","textTransform"),y("normal-case",{textTransform:"none"}),y("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),y("align-","verticalAlign"),y("whitespace-","whiteSpace"),y("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),y("break-words",{overflowWrap:"break-word"}),y("break-all",{wordBreak:"break-all"}),y("break-keep",{wordBreak:"keep-all"}),ie("caret-",{opacityVariable:!1,opacitySection:"opacity"}),ie("accent-",{opacityVariable:!1,opacitySection:"opacity"}),y("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:t})=>`linear-gradient(to ${_t(t," ")},var(--tw-gradient-stops))`),ie("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)"})),ie("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)`})),ie("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),y("bg-(fixed|local|scroll)","backgroundAttachment"),y("bg-origin-(border|padding|content)","backgroundOrigin",({1:t})=>t+"-box"),y(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),y("bg-blend-","backgroundBlendMode"),y("bg-clip-(border|padding|content|text)","backgroundClip",({1:t})=>t+(t=="text"?"":"-box")),b("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),ie("bg-",{section:"backgroundColor"}),b("bg-","backgroundImage"),b("bg-","backgroundPosition"),y("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",Zi),b("bg-","backgroundSize"),b("rounded(?:$|-)","borderRadius"),b("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-${_t(r[0])}-radius`]:e,[`border-${_t(r[1])}-radius`]:e}}),y("border-(collapse|separate)","borderCollapse"),b("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),y("border-(solid|dashed|dotted|double|none)","borderStyle"),b("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:t,_:e})=>({...et({"--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)"})),ie("border-([xytrbl])-",{section:"borderColor"},pr("border","Color")),ie("border-"),b("border-([xytrbl])(?:$|-)","borderWidth",pr("border","Width")),b("border(?:$|-)","borderWidth"),b("divide-opacity(?:$|-)","divideOpacity",({_:t})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":t}})),y("divide-(solid|dashed|dotted|double|none)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:t}})),y("divide-([xy]-reverse)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+t]:"1"}})),b("divide-([xy])(?:$|-)","divideWidth",({1:t,_:e})=>{let r={x:"lr",y:"tb"}[t];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${t}-reverse`]:"0",[`border-${_t(r[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${t}-reverse)))`,[`border-${_t(r[1])}Width`]:`calc(${e} * var(--tw-divide-${t}-reverse))`}}}),ie("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),b("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),ie("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),b("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),y("ring-inset",{"--tw-ring-inset":"inset"}),ie("ring-",{property:"--tw-ring-color"}),b("ring(?:$|-)","ringWidth",({_:t},{theme:e})=>({...et({"--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":$e(e("ringOffsetColor","","#fff")),"--tw-ring-color":$e(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)"})),ie("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-shadow-color":t.value,"--tw-shadow":"var(--tw-shadow-colored)"})),b("shadow(?:$|-)","boxShadow",({_:t})=>({...et({"--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":Le(t),"--tw-shadow-colored":Le(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)"})),b("(opacity)-"),y("mix-blend-","mixBlendMode"),...Q1(),...Q1("backdrop-"),b("transition(?:$|-)","transitionProperty",(t,{theme:e})=>({transitionProperty:Le(t),transitionTimingFunction:t._=="none"?void 0:Le(e("transitionTimingFunction","")),transitionDuration:t._=="none"?void 0:Le(e("transitionDuration",""))})),b("duration(?:$|-)","transitionDuration","transitionDuration",Le),b("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",Le),b("delay(?:$|-)","transitionDelay","transitionDelay",Le),b("animate(?:$|-)","animation",(t,{theme:e,h:r,e:n})=>{let i=Le(t),s=i.split(" "),a=e("keyframes",s[0]);return a?{["@keyframes "+(s[0]=n(r(s[0])))]:a,animation:s.join(" ")}:{animation:i}}),"(transform)-(none)",y("transform",da),y("transform-(cpu|gpu)",({1:t})=>({"--tw-transform":n0(t=="gpu")})),b("scale(-[xy])?-","scale",({1:t,_:e})=>({["--tw-scale"+(t||"-x")]:e,["--tw-scale"+(t||"-y")]:e,...da()})),b("-?(rotate)-","rotate",pa),b("-?(translate-[xy])-","translate",pa),b("-?(skew-[xy])-","skew",pa),y("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",Zi),"(appearance)-",b("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",b("(cursor)-"),"(cursor)-",y("snap-(none)","scroll-snap-type"),y("snap-(x|y|both)",({1:t})=>({...et({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":t+" var(--tw-scroll-snap-strictness)"})),y("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),y("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),y("snap-(normal|always)","scroll-snap-stop"),y("scroll-(auto|smooth)","scroll-behavior"),b("scroll-p([xytrbl])?(?:$|-)","padding",pr("scroll-padding")),b("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",pr("scroll-margin")),y("touch-(auto|none|manipulation)","touch-action"),y("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:t,2:e,3:r})=>({...et({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${e?"pan-x":r?"pan-y":t}`]:t,"touch-action":"var(--tw-touch-action)"})),y("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),y("outline",{outlineStyle:"solid"}),y("outline-(dashed|dotted|double)","outlineStyle"),b("-?(outline-offset)-"),ie("outline-",{opacityVariable:!1,opacitySection:"opacity"}),b("outline-","outlineWidth"),"(pointer-events)-",b("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:t})=>({x:"horizontal",y:"vertical"})[t]||t||"both"],y("select-(none|text|all|auto)","userSelect"),ie("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),ie("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),b("stroke-","strokeWidth"),y("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),y("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function Zi(t){return(typeof t=="string"?t:t[1]).replace(/-/g," ").trim()}function X1(t){return(typeof t=="string"?t:t[1]).replace("col","column")}function _t(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 Le(t){return t&&""+(t._||t)}function Y1({$$:t}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[t[3]||""]||"")+t}function pr(t,e=""){return({1:r,_:n})=>{let i={x:"lr",y:"tb"}[r]||r+r;return i?{...vn(t+"-"+_t(i[0])+e,n),...vn(t+"-"+_t(i[1])+e,n)}:vn(t+e,n)}}function Q1(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={...et(r),[`${t}filter`]:e.map(n=>`var(--tw-${t}${n})`).join(" ")},[`(${t}filter)-(none)`,y(`${t}filter`,r),...e.map(n=>b(`${n[0]=="h"?"-?":""}(${t}${n})(?:$|-)`,n,({1:i,_:s})=>({[`--tw-${i}`]:B(s).map(a=>`${n}(${a})`).join(" "),...r})))]}function pa({1:t,_:e}){return{["--tw-"+t]:e,...da()}}function da(){return{...et({"--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":n0()}),transform:"var(--tw-transform)"}}function n0(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 e0({1:t,2:e}){return`${t} ${e} / ${t} ${e}`}function t0({1:t}){return`repeat(${t},minmax(0,1fr))`}function et(t){return{"@layer defaults":{"*,::before,::after":t,"::backdrop":t}}}var i0=[["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)||Pe(e,"",r)||`${e}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:t,3:e="",4:r,5:n="",6:i=e},{e:s,h:a,v:u})=>{let l=hr(n)||(r[0]=="["?r:u(r.slice(1)));return`${(l.includes("&")?l:"&"+l).replace(/&/g,`:merge(.${s(a(t+i))})`)}${t[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:t})=>`[dir="${t}"] &`],["supports-",({$$:t},e)=>{if(t&&(t=e.theme("supports",t)||Pe(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)||Pe(t,"",e)),typeof t=="string")return`@media not all and (min-width:${t})`}],["min-",({$$:t},e)=>(t&&(t=Pe(t,"",e)),t&&`@media (min-width:${t})`)],[/^\[(.+)]$/,({1:t})=>/[&@]/.test(t)&&hr(t).replace(/[}]+$/,"").split("{")]];function s0({colors:t,disablePreflight:e}={}){return{preflight:e?void 0:J1,theme:{...xn,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...t}},variants:i0,rules:r0,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 S2={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},E2={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},_2={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},M2={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},A2={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},I2={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},L2={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},j2={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},T2={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},D2={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},O2={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},P2={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},U2={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},R2={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},V2={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},B2={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},H2={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},z2={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},F2={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},N2={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},q2={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},Z2={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},o0={__proto__:null,slate:S2,gray:E2,zinc:_2,neutral:M2,stone:A2,red:I2,orange:L2,amber:j2,yellow:T2,lime:D2,green:O2,emerald:P2,teal:U2,cyan:R2,sky:V2,blue:B2,indigo:H2,violet:z2,purple:F2,fuchsia:N2,pink:q2,rose:Z2};function Wi({disablePreflight:t}={}){return s0({colors:o0,disablePreflight:t})}function Gi({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,a=s])=>[`${t}-${s}`,(u,l)=>c0(t,a[0]=="."?"."+l.e(l.h(a.slice(1))):a,l,c=>`& :is(${c.trim()})`)]),rules:[[`(lead|not-${t})`,({1:s},{h:a})=>[{c:a(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},a)=>{let u=l0(a.theme("fontSize",s));return u&&{"@layer components":u}}],[t+"-",({$$:s},a)=>i(s,a)],[t,(s,a)=>({...i(e,a),"@layer base":[a0(t,a,{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:E(20,16),marginBottom:E(20,16),paddingLeft:E(26,16)},li:{marginTop:E(8,16),marginBottom:E(8,16)},"ol>li,ul>li":{paddingLeft:E(6,16)},">ul>li p":{marginTop:E(12,16),marginBottom:E(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:E(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:E(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:E(12,16),marginBottom:E(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:E(48,16),marginBottom:E(48,16)},blockquote:{marginTop:E(32,20),marginBottom:E(32,20),paddingLeft:E(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:E(20,16),marginBottom:E(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:E(36,16),marginTop:"0",marginBottom:E(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900",color:"inherit"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:E(24,16),marginTop:E(48,24),marginBottom:E(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800",color:"inherit"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:E(20,16),marginTop:E(32,20),marginBottom:E(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700",color:"inherit"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:E(24,16),marginBottom:E(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700",color:"inherit"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:E(32,16),marginBottom:E(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:E(14,16),lineHeight:"1.4",marginTop:E(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:E(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:E(21,24)},"h3 code":{fontSize:E(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:E(14,16),lineHeight:"1.7",marginTop:E(24,14),marginBottom:E(24,14),borderRadius:"0.375rem",paddingTop:E(12,14),paddingRight:E(16,14),paddingBottom:E(12,14),paddingLeft:E(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:E(32,16),marginBottom:E(32,16),fontSize:E(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:E(8,14),paddingBottom:E(8,14),paddingLeft:E(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:E(8,14),paddingRight:E(8,14),paddingBottom:E(8,14),paddingLeft:E(8,14)},"tbody td:first-child,tfoot td:first-child":{paddingLeft:"0"},"tbody td:last-child,tfoot td:last-child":{paddingRight:"0"},[`.${a.e(a.h("lead"))}`]:{color:"var(--tw-prose-lead)",fontSize:E(20,16),lineHeight:"1.6",marginTop:E(24,20),marginBottom:E(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),a0(t,a,r)],"@layer components":{...l0(a.theme("fontSize","base")),color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"}})]]};function i(s,a){let u={},l={},c=(p,f,v)=>{let x=a.theme(`colors.${s}.${f}`,f);v["--tw-prose-"+p]=$e(x);let S=v!=l&&a.d("colors",`${s}-${f}`,x);S&&(l["--tw-prose-"+p]=$e(S))};for(let p in n){let f=n[p];p!="dark"&&f&&c(p,f,u)}for(let p in n.dark||{}){let f=n.dark[p];f&&(n.dark?c("invert-"+p,f,u):c(p,f,l))}return Object.keys(u).length?{"@layer defaults":{"&":u,[a.v("dark")]:l}}:void 0}}function a0(t,e,r){let n={};for(let i in r)n[c0(t,i,e,s=>`.${e.e(e.h(t))}${s}`)]=r[i];return n}function c0(t,e,{e:r,h:n},i){return e.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(s,a=" ",u=s,l="")=>i(`${a}:where(${u}):not(:where(.${r(n("not-"+t))} *))${l}`))}function l0(t){return t?typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}:void 0}function E(t,e){return`${(t/e).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}var fa=yn({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:[Wi(),Ni(),qi(),Gi()]});function Ki(t,e=!0){let r=(function(){if(W2)try{let l=Fi(new CSSStyleSheet);return l.connect=c=>{let p=ma(c);p.adoptedStyleSheets=[...p.adoptedStyleSheets,l.target]},l.disconnect=zi,l}catch{}let s=document.createElement("style");s.media="not all",document.head.prepend(s);let a=[Fi(s)],u=new WeakMap;return{get target(){return a[0].target},snapshot(){let l=a.map(c=>c.snapshot());return()=>l.forEach(c=>c())},clear(){a.forEach(l=>l.clear())},destroy(){a.forEach(l=>l.destroy())},insert(l,c,p){a[0].insert(l,c,p);let f=this.target.cssRules[c];a.forEach((v,x)=>x&&v.target.insertRule(f.cssText,c))},resume(l,c){return a[0].resume(l,c)},connect(l){let c=document.createElement("style");ma(l).appendChild(c);let p=Fi(c),{cssRules:f}=this.target;for(let v=0;v<f.length;v++)p.target.insertRule(f[v].cssText,v);a.push(p),u.set(l,p)},disconnect(l){let c=a.indexOf(u.get(l));c>=0&&a.splice(c,1)}}})(),n=N1({...t,hash:t.hash??e},r),i=q1(n);return function(a){return class extends a{connectedCallback(){super.connectedCallback?.(),r.connect(this),i.observe(ma(this))}disconnectedCallback(){r.disconnect(this),super.disconnectedCallback?.()}constructor(...l){super(...l),this.tw=n}}}}var W2=typeof ShadowRoot<"u"&&(typeof ShadyCSS>"u"||ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;function ma(t){return t.shadowRoot||t.attachShadow({mode:"open"})}var A=t=>Ki(fa)(t);var kn=class extends A($){constructor(){super(),this.color="#601feb",this.radius="16.8576px",this.size="320px",this.border="#d1d5db"}render(){return h`
|
|
127
127
|
<div class="flex flex-row flex-wrap gap-0">
|
|
128
128
|
<div class="relative z-0 flex min-h-9 items-center justify-center overflow-hidden" style="border-radius: ${this.radius};">
|
|
129
129
|
<!-- Spinning gradient background -->
|
|
@@ -135,7 +135,7 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
135
135
|
<slot></slot>
|
|
136
136
|
</div>
|
|
137
137
|
</div>
|
|
138
|
-
`}};w(
|
|
138
|
+
`}};w(kn,"properties",{color:{type:String},radius:{type:String},size:{type:String},border:{type:String}}),w(kn,"styles",K`
|
|
139
139
|
:host {
|
|
140
140
|
display: block;
|
|
141
141
|
}
|
|
@@ -150,7 +150,7 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
150
150
|
transform: rotate(360deg);
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
|
-
`);customElements.get("mw-spinning-border")||customElements.define("mw-spinning-border",
|
|
153
|
+
`);customElements.get("mw-spinning-border")||customElements.define("mw-spinning-border",kn);var Cn=class extends A($){constructor(){super();w(this,"render",()=>h`
|
|
154
154
|
<div class="shadow-button inline-block transition-transform hover:scale-105 active:scale-90" style="border-radius: ${this.dynamicRadius};">
|
|
155
155
|
<mw-spinning-border .color="${this.color}" .border="${"#f9fafb"}" .radius="${this.dynamicRadius}">
|
|
156
156
|
<!-- we want the transform transition on the root element so that both the transform transition and state switch transition are continuous and fluid -->
|
|
@@ -161,14 +161,14 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
161
161
|
aria-label="Open Molin AI chat window">
|
|
162
162
|
<!-- the 'open' state invites the user to open (e.g. the chat window) -->
|
|
163
163
|
<div class="${this.state==="open"?"visible opacity-100":"invisible opacity-0"} absolute top-[1px] right-0 bottom-0 left-[1px] transition-[opacity,visibility]">
|
|
164
|
-
${this.src?
|
|
164
|
+
${this.src?h`
|
|
165
165
|
<!-- load given source -->
|
|
166
166
|
<img
|
|
167
167
|
class="flex items-center justify-center bg-white"
|
|
168
168
|
style="width: calc(${this.width} - 2px); height: calc(${this.height} - 2px); border-radius: ${this.dynamicRadius};"
|
|
169
169
|
src="${this.src}"
|
|
170
170
|
alt="Molin AI chat" />
|
|
171
|
-
`:
|
|
171
|
+
`:h`
|
|
172
172
|
<!-- the solid background with AI text -->
|
|
173
173
|
<div
|
|
174
174
|
class="flex items-center justify-center bg-[${this.backgroundColor}]"
|
|
@@ -207,7 +207,7 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
207
207
|
</button>
|
|
208
208
|
</mw-spinning-border>
|
|
209
209
|
</div>
|
|
210
|
-
`);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 r=parseFloat(this.width),n=parseFloat(this.height),s=Math.min(r,n)*.55,
|
|
210
|
+
`);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 r=parseFloat(this.width),n=parseFloat(this.height),s=Math.min(r,n)*.55,a=s,u=s/1.65;return{width:a,height:u}}get dynamicRadius(){let r=parseFloat(this.width),n=parseFloat(this.height);return`${Math.min(r,n)*.265}px`}};w(Cn,"properties",{state:{type:String},color:{type:String},bubbleStyle:{type:String},src:{type:String},width:{type:String},height:{type:String}}),w(Cn,"styles",K`
|
|
211
211
|
.shadow-button {
|
|
212
212
|
box-shadow:
|
|
213
213
|
-58.9194px 74.8436px 38.218px rgba(0, 0, 0, 0.01),
|
|
@@ -215,7 +215,7 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
215
215
|
-14.3318px 19.109px 23.8863px rgba(0, 0, 0, 0.09),
|
|
216
216
|
-3.18483px 4.77725px 12.7393px rgba(0, 0, 0, 0.1);
|
|
217
217
|
}
|
|
218
|
-
`);customElements.get("mw-bubble")||customElements.define("mw-bubble",
|
|
218
|
+
`);customElements.get("mw-bubble")||customElements.define("mw-bubble",Cn);var u0={airplay:`<svg
|
|
219
219
|
xmlns="http://www.w3.org/2000/svg"
|
|
220
220
|
width="24"
|
|
221
221
|
height="24"
|
|
@@ -1142,26 +1142,26 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1142
1142
|
>
|
|
1143
1143
|
<rect width="14" height="14" x="8" y="8" rx="2" ry="2" />
|
|
1144
1144
|
<path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />
|
|
1145
|
-
</svg>`};var
|
|
1145
|
+
</svg>`};var $n=class $n extends HTMLElement{constructor(){super();w(this,"name","");w(this,"fill","none");w(this,"stroke","currentColor");this.attachShadow({mode:"open"})}attributeChangedCallback(r,n,i){if(n!==i&&$n.observedAttributes.includes(r)){switch(r){case"name":this.name=i||"";break;case"fill":this.fill=i||"none";break;case"stroke":this.stroke=i||"currentColor";break}this.render()}}resolveIcon(r){throw new Error("Not implemented")}render(){let r=document.createElement("style");if(r.textContent=`
|
|
1146
1146
|
:host {
|
|
1147
1147
|
display: inline-block;
|
|
1148
1148
|
line-height: 0;
|
|
1149
1149
|
}
|
|
1150
|
-
`,this.shadowRoot){for(;this.shadowRoot.firstChild;)this.shadowRoot.removeChild(this.shadowRoot.firstChild);this.shadowRoot.appendChild(r)}if(!this.name)return;let n=this.resolveIcon(this.name);if(!n){console.warn(`'${this.name}' not found, please add it to ${
|
|
1150
|
+
`,this.shadowRoot){for(;this.shadowRoot.firstChild;)this.shadowRoot.removeChild(this.shadowRoot.firstChild);this.shadowRoot.appendChild(r)}if(!this.name)return;let n=this.resolveIcon(this.name);if(!n){console.warn(`'${this.name}' not found, please add it to ${$n.name}`);return}let a=new DOMParser().parseFromString(n,"image/svg+xml").documentElement;a.setAttribute("fill",this.fill),a.setAttribute("stroke",this.stroke),a.style.width="100%",a.style.height="100%",this.shadowRoot?.appendChild(a)}};w($n,"observedAttributes",["name","fill","stroke"]);var Ji=$n;var G2=u0,ga=class extends Ji{resolveIcon(e){return G2[e]}};customElements.get("lucide-icon")||customElements.define("lucide-icon",ga);var En,je,h0,p0,K2,d0,f0,Sn=class Sn extends A($){constructor(){super();d(this,je);d(this,En,new Date);this.color="#8B5CF6",this.disabled=!1,this.placeholder="Ask AI...",this.dark=!1,this._inputValue=""}render(){return h`
|
|
1151
1151
|
<mw-spinning-border
|
|
1152
1152
|
.size=${"420px"}
|
|
1153
1153
|
.color=${this.color||"#8B5CF6"}
|
|
1154
1154
|
.radius=${"24px"}
|
|
1155
1155
|
class="${this.dark?"dark":""} rounded-[24px] font-sans text-sm shadow-lg transition-transform duration-500 hover:scale-105">
|
|
1156
1156
|
<form
|
|
1157
|
-
@submit="${m(this,
|
|
1157
|
+
@submit="${m(this,je,p0)}"
|
|
1158
1158
|
class="m-[1px] flex w-[250px] items-center rounded-[24px] bg-white px-2 py-2 text-gray-800 transition-all duration-500 focus-within:w-[calc(100vw-2rem)] focus-within:scale-100 active:w-[calc(100vw-2rem)] md:focus-within:w-[350px] md:active:w-[350px] dark:bg-gray-900 dark:text-white">
|
|
1159
1159
|
<lucide-icon class="h-5 w-5 flex-none text-[${this.color||"#8B5CF6"}]" name="${"sparkles"}"></lucide-icon>
|
|
1160
1160
|
|
|
1161
1161
|
<input
|
|
1162
1162
|
?disabled="${this.disabled}"
|
|
1163
|
-
@keydown="${m(this,
|
|
1164
|
-
@input="${m(this,
|
|
1163
|
+
@keydown="${m(this,je,f0)}"
|
|
1164
|
+
@input="${m(this,je,h0)}"
|
|
1165
1165
|
.value="${this._inputValue}"
|
|
1166
1166
|
placeholder="${this.placeholder}"
|
|
1167
1167
|
autocomplete="off"
|
|
@@ -1179,9 +1179,9 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1179
1179
|
</button>
|
|
1180
1180
|
</form>
|
|
1181
1181
|
</mw-spinning-border>
|
|
1182
|
-
`}};
|
|
1182
|
+
`}};En=new WeakMap,je=new WeakSet,h0=function(r){let n=r.target;this._inputValue=n.value,this.dispatchEvent(new Sn.ChangeEvent({value:this._inputValue}))},p0=function(r){r.preventDefault();let n=new Date;if(n.getTime()-o(this,En).getTime()<500)return;g(this,En,n);let s=this._inputValue.trim();s&&this.dispatchEvent(new Sn.SubmitInputEvent({text:s}))&&(this._inputValue="")},K2=function(){return this.renderRoot.querySelector('input[name="input"]')??null},d0=function(){return this.renderRoot.querySelector('button[type="submit"]')??null},f0=function(r){J2(r)&&(r.preventDefault(),this.disabled||o(this,je,d0)?.click())},w(Sn,"properties",{color:{type:String},disabled:{type:Boolean},placeholder:{type:String},dark:{type:Boolean},_inputValue:{type:String,state:!0}});var Mt=Sn,wa;Mt.SubmitInputEvent=(wa=class extends CustomEvent{constructor(e,r={}){super(Mt.SubmitInputEvent.type,{detail:e,bubbles:!0,composed:!0,...r})}},w(wa,"type","mw-floating-ask-ai:submit"),wa);var va;Mt.ChangeEvent=(va=class extends CustomEvent{constructor(e,r={}){super(Mt.ChangeEvent.type,{detail:e,bubbles:!0,composed:!0,...r})}},w(va,"type","mw-floating-ask-ai:change"),va);function J2(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",Mt);var Xi={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},fr=t=>(...e)=>({_$litDirective$:t,values:e}),dr=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:X2}=Zl;var m0=()=>document.createComment(""),mr=(t,e,r)=>{let n=t._$AA.parentNode,i=e===void 0?t._$AB:e._$AA;if(r===void 0){let s=n.insertBefore(m0(),i),a=n.insertBefore(m0(),i);r=new X2(s,a,t,t.options)}else{let s=r._$AB.nextSibling,a=r._$AM,u=a!==t;if(u){let l;r._$AQ?.(t),r._$AM=t,r._$AP!==void 0&&(l=t._$AU)!==a._$AU&&r._$AP(l)}if(s!==i||u){let l=r._$AA;for(;l!==s;){let c=l.nextSibling;n.insertBefore(l,i),l=c}}}return r},tt=(t,e,r=t)=>(t._$AI(e,r),t),Y2={},g0=(t,e=Y2)=>t._$AH=e,w0=t=>t._$AH,Yi=t=>{t._$AR(),t._$AA.remove()};var v0=(t,e,r)=>{let n=new Map;for(let i=e;i<=r;i++)n.set(t[i],i);return n},Ee=fr(class extends dr{constructor(t){if(super(t),t.type!==Xi.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=[],a=0;for(let u of t)i[a]=n?n(u,a):a,s[a]=r(u,a),a++;return{values:s,keys:i}}render(t,e,r){return this.dt(t,e,r).values}update(t,[e,r,n]){let i=w0(t),{values:s,keys:a}=this.dt(e,r,n);if(!Array.isArray(i))return this.ut=a,s;let u=this.ut??=[],l=[],c,p,f=0,v=i.length-1,x=0,S=s.length-1;for(;f<=v&&x<=S;)if(i[f]===null)f++;else if(i[v]===null)v--;else if(u[f]===a[x])l[x]=tt(i[f],s[x]),f++,x++;else if(u[v]===a[S])l[S]=tt(i[v],s[S]),v--,S--;else if(u[f]===a[S])l[S]=tt(i[f],s[S]),mr(t,l[S+1],i[f]),f++,S--;else if(u[v]===a[x])l[x]=tt(i[v],s[x]),mr(t,i[f],i[v]),v--,x++;else if(c===void 0&&(c=v0(a,x,S),p=v0(u,f,v)),c.has(u[f]))if(c.has(u[v])){let T=p.get(a[x]),k=T!==void 0?i[T]:null;if(k===null){let M=mr(t,i[f]);tt(M,s[x]),l[x]=M}else l[x]=tt(k,s[x]),mr(t,i[f],k),i[T]=null;x++}else Yi(i[v]),v--;else Yi(i[f]),f++;for(;x<=S;){let T=mr(t,l[S+1]);tt(T,s[x]),l[x++]=T}for(;f<=v;){let T=i[f++];T!==null&&Yi(T)}return this.ut=a,g0(t,l),Ae}});var Qi,y0,es=class es extends A($){constructor(){super();d(this,Qi);this.examples={title:"",items:[]},this.color=""}render(){return!this.examples?.title&&!this.examples?.items?.length?null:h`
|
|
1183
1183
|
<div class="flex h-full w-full flex-1 flex-col overflow-y-auto px-4 pt-6 pb-2">
|
|
1184
|
-
${this.examples.title?
|
|
1184
|
+
${this.examples.title?h`
|
|
1185
1185
|
<h2 class="mt-14 px-2 pt-9 pb-2 text-left text-3xl leading-tight font-bold tracking-tight">
|
|
1186
1186
|
<span>${this.examples.title}</span>
|
|
1187
1187
|
<svg class="inline-block h-9 w-9 align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 58 61">
|
|
@@ -1191,19 +1191,19 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1191
1191
|
</svg>
|
|
1192
1192
|
</h2>
|
|
1193
1193
|
`:null}
|
|
1194
|
-
${this.examples?.items?.length?
|
|
1194
|
+
${this.examples?.items?.length?h`
|
|
1195
1195
|
<ul class="mt-auto flex flex-wrap justify-end gap-2.5 text-sm leading-6 text-black select-none">
|
|
1196
|
-
${
|
|
1196
|
+
${Ee(this.examples.items,r=>r,r=>h`
|
|
1197
1197
|
<li
|
|
1198
1198
|
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"
|
|
1199
|
-
@click="${()=>m(this,
|
|
1199
|
+
@click="${()=>m(this,Qi,y0).call(this,r)}">
|
|
1200
1200
|
<span>${r.trim()}</span>
|
|
1201
1201
|
</li>
|
|
1202
1202
|
`)}
|
|
1203
1203
|
</ul>
|
|
1204
1204
|
`:null}
|
|
1205
1205
|
</div>
|
|
1206
|
-
`}};
|
|
1206
|
+
`}};Qi=new WeakSet,y0=function(r){this.dispatchEvent(new es.ExampleClickEvent({example:r}))},w(es,"properties",{examples:{type:Object},color:{type:String}});var _n=es,ya;_n.ExampleClickEvent=(ya=class extends CustomEvent{constructor(e,r={}){super(_n.ExampleClickEvent.type,{detail:e,...r})}},w(ya,"type","mw:example-click"),ya);customElements.get("mw-chat-background")||customElements.define("mw-chat-background",_n);var wr,b0,x0,gr=class gr extends A($){constructor(){super();d(this,wr);this.content={logoUrl:"",title:"",color:""},this.showNewChat=!1,this.showClose=!1}render(){return h`
|
|
1207
1207
|
<div class="relative z-10 h-12">
|
|
1208
1208
|
<div class="gradient-blur absolute inset-x-0.5 mt-2 h-12"></div>
|
|
1209
1209
|
|
|
@@ -1226,7 +1226,7 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1226
1226
|
<div class="flex-grow"></div>
|
|
1227
1227
|
|
|
1228
1228
|
<!-- new chat btn -->
|
|
1229
|
-
<button @click=${m(this,
|
|
1229
|
+
<button @click=${m(this,wr,b0)} type="button" class="${this.showNewChat?"inline-flex":"hidden"} shrink-0">
|
|
1230
1230
|
<!-- svg icon of a bubble with a plus -->
|
|
1231
1231
|
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 37 36">
|
|
1232
1232
|
<path
|
|
@@ -1238,7 +1238,7 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1238
1238
|
</button>
|
|
1239
1239
|
|
|
1240
1240
|
<!-- close chat btn -->
|
|
1241
|
-
<button @click=${m(this,
|
|
1241
|
+
<button @click=${m(this,wr,x0)} class="${this.showClose?"inline-flex":"hidden"} shrink-0">
|
|
1242
1242
|
<!-- svg icon of an X -->
|
|
1243
1243
|
<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">
|
|
1244
1244
|
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" />
|
|
@@ -1253,7 +1253,7 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1253
1253
|
</div>
|
|
1254
1254
|
</div>
|
|
1255
1255
|
</div>
|
|
1256
|
-
`}};
|
|
1256
|
+
`}};wr=new WeakSet,b0=function(){this.dispatchEvent(new gr.NewChatClickEvent)},x0=function(){this.dispatchEvent(new gr.CloseClickEvent)},w(gr,"properties",{content:{type:Object},showNewChat:{type:Boolean,attribute:"show-new-chat"},showClose:{type:Boolean,attribute:"show-close"}}),w(gr,"styles",K`
|
|
1257
1257
|
/* blurred background */
|
|
1258
1258
|
|
|
1259
1259
|
.gradient-blur {
|
|
@@ -1265,13 +1265,122 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1265
1265
|
/* bg-color gradient */
|
|
1266
1266
|
background-image: linear-gradient(to bottom, white 20%, transparent);
|
|
1267
1267
|
}
|
|
1268
|
-
`);var
|
|
1269
|
-
<div
|
|
1270
|
-
|
|
1268
|
+
`);var At=gr,ba;At.NewChatClickEvent=(ba=class extends CustomEvent{constructor(e={}){super(At.NewChatClickEvent.type,{...e})}},w(ba,"type","mw:new-chat-click"),ba);var xa;At.CloseClickEvent=(xa=class extends CustomEvent{constructor(e={}){super(At.CloseClickEvent.type,{...e})}},w(xa,"type","mw:close-click"),xa);customElements.get("mw-chat-header")||customElements.define("mw-chat-header",At);var E0=Au(S0(),1);var Re=Object.freeze({PENDING:"pending",READY:"ready",ERROR:"error"}),H,q,le,yr,br,me,O,_0,Sa,M0,ss,An,In,Ln,jn,A0,ns,rt,Mn,Ea,I0,L0,j0,is=class{constructor(e,r){d(this,O);d(this,H);d(this,q);d(this,le,null);d(this,yr,!1);d(this,br,null);d(this,me,[]);d(this,ss,e=>{let r=e.target,n=Array.from(r.files||[]);m(this,O,Ea).call(this,n),r.value=""});d(this,An,e=>{e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="copy")});d(this,In,e=>{e.preventDefault(),e.dataTransfer&&m(this,O,A0).call(this,e.dataTransfer)&&m(this,O,ns).call(this,!0)});d(this,Ln,e=>{e.preventDefault();let r=e.relatedTarget;o(this,H).contains(r)||m(this,O,ns).call(this,!1)});d(this,jn,e=>{if(e.preventDefault(),m(this,O,ns).call(this,!1),e.dataTransfer){let r=Array.from(e.dataTransfer.files||[]);m(this,O,Ea).call(this,r)}});w(this,"openImagePicker",()=>{o(this,le)&&o(this,le).click()});w(this,"onImageDelete",e=>{o(this,q).onImageDelete&&o(this,q).onImageDelete(e),g(this,me,o(this,me).filter(r=>r.id!==e)),m(this,O,Mn).call(this),o(this,H).requestUpdate()});g(this,H,e),g(this,q,{acceptedTypes:["image/jpeg","image/png","image/gif","image/webp","image/svg+xml","image/heic"],maxFileSize:10*1024*1024,maxFiles:3,onError:()=>{},enabled:!0,...r}),e.addController(this),m(this,O,M0).call(this)}hostConnected(){m(this,O,_0).call(this)}hostDisconnected(){m(this,O,Sa).call(this),o(this,le)&&o(this,le).parentNode&&o(this,le).parentNode.removeChild(o(this,le))}get isDragging(){return o(this,yr)}get error(){return o(this,br)}get selectedImages(){return o(this,me)}get hasPendingImages(){return o(this,me).some(e=>e.processingState===Re.PENDING)}clearError(){m(this,O,Mn).call(this)}updateUploadOptions(e){e.conversationId!==void 0&&(o(this,q).conversationId=e.conversationId),e.widgetId!==void 0&&(o(this,q).widgetId=e.widgetId),o(this,q).enabled=!!e.enabled,e.enabled||m(this,O,Sa).call(this)}restoreImages(e){if(!Array.isArray(e)||e.length===0){g(this,me,[]),o(this,H).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:Re.READY,imageUrl:n.url}});g(this,me,r),o(this,H).requestUpdate()}clearImages(){g(this,me,[]),this.clearError(),o(this,H).requestUpdate()}};H=new WeakMap,q=new WeakMap,le=new WeakMap,yr=new WeakMap,br=new WeakMap,me=new WeakMap,O=new WeakSet,_0=function(){o(this,q).enabled&&(o(this,H).addEventListener("dragover",o(this,An)),o(this,H).addEventListener("dragenter",o(this,In)),o(this,H).addEventListener("dragleave",o(this,Ln)),o(this,H).addEventListener("drop",o(this,jn)))},Sa=function(){o(this,H).removeEventListener("dragover",o(this,An)),o(this,H).removeEventListener("dragenter",o(this,In)),o(this,H).removeEventListener("dragleave",o(this,Ln)),o(this,H).removeEventListener("drop",o(this,jn))},M0=function(){g(this,le,document.createElement("input")),o(this,le).type="file",o(this,le).accept=o(this,q).acceptedTypes.join(","),o(this,le).multiple=o(this,q).maxFiles>1,o(this,le).style.display="none",o(this,le).addEventListener("change",o(this,ss)),document.body.appendChild(o(this,le))},ss=new WeakMap,An=new WeakMap,In=new WeakMap,Ln=new WeakMap,jn=new WeakMap,A0=function(e){return e.types&&e.types.includes("Files")},ns=function(e){o(this,yr)!==e&&(g(this,yr,e),o(this,H).requestUpdate())},rt=function(e){g(this,br,e),o(this,q).onError(e),o(this,H).requestUpdate(),setTimeout(()=>{m(this,O,Mn).call(this)},6e3)},Mn=function(){g(this,br,null),o(this,H).requestUpdate()},Ea=async function(e){if(e.length===0)return;m(this,O,Mn).call(this);let r=e.filter(a=>m(this,O,I0).call(this,a));if(r.length===0)return;let n=o(this,me).length,i=o(this,q).maxFiles??1/0,s=r.length;if(n+s>i){m(this,O,rt).call(this,`You can upload a maximum of ${i} files`);return}try{let u=(await Promise.all(r.map(l=>m(this,O,L0).call(this,l)))).filter(l=>!o(this,me).some(c=>c.dataUrl===l.dataUrl));g(this,me,[...o(this,me),...u]),await Do(3,u,async l=>{await m(this,O,j0).call(this,l)}),o(this,H).requestUpdate()}catch(a){let u=a instanceof Error?a:new Error(String(a));m(this,O,rt).call(this,"Upload failed")}},I0=function(e){return o(this,q).acceptedTypes.includes(e.type)?e.size>o(this,q).maxFileSize?(m(this,O,rt).call(this,`Max file size: ${o(this,q).maxFileSize/(1024*1024)}MB`),!1):!0:(m(this,O,rt).call(this,"Invalid file type"),!1)},L0=async function(e){try{let r=await(0,E0.fileToBase64)(e);return{id:crypto.randomUUID(),name:e.name,type:e.type,size:e.size,dataUrl:r,file:e,processingState:Re.PENDING}}catch(r){let n=r instanceof Error?r:new Error(String(r));throw new Error(`Failed to read file: ${e.name} - ${n.message}`)}},j0=async function(e){if(!e){console.error("No image provided to upload"),m(this,O,rt).call(this,"No image provided");return}if(!o(this,q)?.uploadUrl){console.error("Missing uploadUrl in options"),m(this,O,rt).call(this,"Upload URL not configured");return}e.processingState=Re.PENDING,o(this,H).requestUpdate();let r=new FormData;r.append("file",e.file),r.append("imageId",e.id),o(this,q).conversationId&&r.append("conversationId",o(this,q).conversationId),o(this,q).widgetId&&r.append("widgetId",o(this,q).widgetId);try{let n=await fetch(o(this,q).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 a=i?.error||"Upload failed";throw new Error(a)}i.imageUrl&&i.imageId?(e.imageUrl=i.imageUrl,e.id=i.imageId,e.processingState=Re.READY):e.processingState=Re.PENDING,o(this,H).requestUpdate()}catch(n){let i=n instanceof Error?n:new Error(String(n));console.error("Upload error:",i.message),m(this,O,rt).call(this,i.message),e.processingState=Re.ERROR,o(this,H).requestUpdate()}};var _a={maxHeight:120,initialHeight:32,paddingY:12},Tn,ee,xr,T0,D0,O0,P0,os,Tt=class Tt extends A($){constructor(){super();d(this,ee);d(this,Tn,new Date);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 o(this,ee,xr)?.value?.trim()??""}render(){return h`
|
|
1269
|
+
<div
|
|
1270
|
+
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}]">
|
|
1271
|
+
<!-- Image preview area -->
|
|
1272
|
+
${this.enableImageUpload&&this.images&&this.images.length>0?h`
|
|
1273
|
+
<div class="mb-2 flex flex-wrap gap-2 rounded-t-[18px] bg-white p-2">
|
|
1274
|
+
${this.images.map(r=>h`
|
|
1275
|
+
<div class="relative inline-block">
|
|
1276
|
+
<img src="${r.dataUrl}" alt="${r.name}" class="h-[60px] w-[60px] rounded-xl object-cover" />
|
|
1277
|
+
|
|
1278
|
+
<!-- Progress/Status overlay -->
|
|
1279
|
+
${r.processingState===Re.PENDING?h`
|
|
1280
|
+
<div class="absolute inset-0 flex items-center justify-center rounded-xl bg-black/40">
|
|
1281
|
+
<lucide-icon name="loader-circle" class="inline-flex animate-spin text-white transition-all duration-1000"></lucide-icon>
|
|
1282
|
+
</div>
|
|
1283
|
+
`:r.processingState===Re.ERROR?h`
|
|
1284
|
+
<div class="absolute inset-0 flex items-center justify-center rounded-xl bg-red-500/60">
|
|
1285
|
+
<lucide-icon name="badge-alert" class="h-6 w-6 text-white"></lucide-icon>
|
|
1286
|
+
</div>
|
|
1287
|
+
`:null}
|
|
1288
|
+
|
|
1289
|
+
<!-- Delete button -->
|
|
1290
|
+
<button
|
|
1291
|
+
data-testid="image-delete-btn"
|
|
1292
|
+
type="button"
|
|
1293
|
+
@click="${()=>this.onImageDelete?.(r.id)}"
|
|
1294
|
+
class="absolute -top-1 -right-1 flex h-5 w-5 items-center justify-center rounded-full bg-[#eeedf1] text-white hover:bg-[#eeedf195]">
|
|
1295
|
+
<lucide-icon name="x" class="h-3 w-3 text-[#14161a]"></lucide-icon>
|
|
1296
|
+
</button>
|
|
1297
|
+
</div>
|
|
1298
|
+
`)}
|
|
1299
|
+
</div>
|
|
1300
|
+
`:null}
|
|
1301
|
+
|
|
1302
|
+
<!-- Input form -->
|
|
1303
|
+
<form @submit="${m(this,ee,O0)}" class="flex w-full items-center">
|
|
1304
|
+
${this.enableImageUpload?h`
|
|
1305
|
+
<button
|
|
1306
|
+
data-testid="image-upload-btn"
|
|
1307
|
+
type="button"
|
|
1308
|
+
@click="${this.onImageUploadClick}"
|
|
1309
|
+
?disabled="${this.disabled||this.loading}"
|
|
1310
|
+
class="mx-1 px-2 transition-opacity duration-200 hover:opacity-80">
|
|
1311
|
+
<lucide-icon name="image-plus" class="block h-6 w-6 text-[#312E30]"></lucide-icon>
|
|
1312
|
+
</button>
|
|
1313
|
+
`:null}
|
|
1314
|
+
|
|
1315
|
+
<textarea
|
|
1316
|
+
data-testid="mw-chat-input-textarea"
|
|
1317
|
+
name="input"
|
|
1318
|
+
@input="${m(this,ee,P0)}"
|
|
1319
|
+
@keydown="${m(this,ee,D0)}"
|
|
1320
|
+
autofocus
|
|
1321
|
+
?disabled="${this.disabled}"
|
|
1322
|
+
placeholder="${this.placeholder}"
|
|
1323
|
+
class="${this.enableImageUpload?"px-1":"pl-3 pr-1"} box-content h-[${_a.initialHeight}px] w-full resize-none place-content-center rounded bg-white py-[${_a.paddingY}px] text-base text-gray-800 outline-none placeholder:text-[14px] placeholder:font-light disabled:place-content-baseline"></textarea>
|
|
1324
|
+
|
|
1325
|
+
<button
|
|
1326
|
+
type="submit"
|
|
1327
|
+
data-testid="mw-chat-input-submit-btn"
|
|
1328
|
+
?disabled="${this.disabled||this.loading}"
|
|
1329
|
+
class="mx-1 rounded-full px-2 transition-all duration-150 ease-out disabled:cursor-not-allowed disabled:opacity-50">
|
|
1330
|
+
<div
|
|
1331
|
+
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">
|
|
1332
|
+
${this.loading?h`<lucide-icon name="loader-circle" class="inline-flex animate-spin text-white transition-all"></lucide-icon>`:this.streaming?h`<lucide-icon name="x" class="inline-flex h-4 w-4 text-white transition-colors"></lucide-icon>`:h`<lucide-icon name="arrow-up" class="inline-flex h-4 w-4 text-white transition-colors"></lucide-icon>`}
|
|
1333
|
+
</div>
|
|
1334
|
+
</button>
|
|
1335
|
+
</form>
|
|
1336
|
+
</div>
|
|
1337
|
+
|
|
1338
|
+
<slot>
|
|
1339
|
+
<div class="h-5 w-full"></div>
|
|
1340
|
+
</slot>
|
|
1341
|
+
`}setValue(r){let n=o(this,ee,xr);if(!n){console.warn("input element not found, cannot set value");return}n.value=r,m(this,ee,os).call(this),this.dispatchEvent(new Tt.ChangeEvent({delta:null,full:r}))}focus(){o(this,ee,xr)?.focus()}};Tn=new WeakMap,ee=new WeakSet,xr=function(){return this.renderRoot.querySelector('textarea[name="input"]')??null},T0=function(){return this.renderRoot.querySelector('button[type="submit"]')??null},D0=function(r){dh(r)&&(r.preventDefault(),!this.streaming&&!this.disabled&&!this.loading&&o(this,ee,T0)?.click())},O0=function(r){r.preventDefault();let n=new Date;if(n.getTime()-o(this,Tn).getTime()<500)return;if(g(this,Tn,n),this.streaming){this.dispatchEvent(new Tt.CancelEvent);return}let s=o(this,ee,xr);if(!s)throw new Error("Expected input element to be present");let a=s.value.trim();(a||this.enableImageUpload&&this.images.length>0)&&this.dispatchEvent(new Tt.SubmitEvent(a))&&(s.value=""),m(this,ee,os).call(this),window.requestAnimationFrame(()=>{this.focus()})},P0=function(r){this.dispatchEvent(new Tt.ChangeEvent({delta:r.data,full:r.target instanceof HTMLTextAreaElement?r.target.value:""})),m(this,ee,os).call(this)},os=function(){let r=o(this,ee,xr);if(!r)return;let{maxHeight:n,initialHeight:i,paddingY:s}=_a;r.style.height=`${i}px`;let a=r.scrollHeight,u=s*2,l=Math.min(a-u,n);r.style.height=`${l}px`,this.requestUpdate()},w(Tt,"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}});var Ze=Tt,Ma;Ze.ChangeEvent=(Ma=class extends CustomEvent{constructor(e,r={}){super(Ze.ChangeEvent.type,{detail:e,...r})}},w(Ma,"type","mw:change"),Ma);var Aa;Ze.SubmitEvent=(Aa=class extends CustomEvent{constructor(e,r={}){super(Ze.SubmitEvent.type,{detail:e,...r,cancelable:!0})}},w(Aa,"type","mw:submit"),Aa);var Ia;Ze.CancelEvent=(Ia=class extends CustomEvent{constructor(e={}){super(Ze.CancelEvent.type,{...e})}},w(Ia,"type","mw:cancel"),Ia);function dh(t){return(t.code==="Enter"||t.code==="NumpadEnter")&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey}customElements.get("mw-chat-input")||customElements.define("mw-chat-input",Ze);var as=class extends A($){constructor(){super(),this.side="assistant",this.status="",this.color="",this.logoUrl="",this.position="single"}render(){let r=this.side==="user"&&this.position==="single"?"rounded-2xl":this.side==="user"&&["single-current","first"].includes(this.position)?"rounded-2xl rounded-br-[4px]":this.side==="user"&&["middle","last-current"].includes(this.position)?"rounded-2xl rounded-r-[4px]":this.side==="user"&&this.position==="last"?"rounded-2xl rounded-tr-[4px]":["support","assistant"].includes(this.side)&&["single","single-current"].includes(this.position)?"rounded-2xl":["support","assistant"].includes(this.side)&&this.position==="first"?"rounded-2xl rounded-bl-[4px]":["support","assistant"].includes(this.side)&&this.position==="middle"?"rounded-2xl rounded-l-[4px]":["support","assistant"].includes(this.side)&&["last","last-current"].includes(this.position)?"rounded-2xl rounded-tl-[4px]":"rounded-2xl";switch(this.side){case"user":return h`
|
|
1342
|
+
<div class="ml-20 flex justify-end font-sans text-base">
|
|
1343
|
+
<div class="max-w-full">
|
|
1344
|
+
<!-- include an invisible border (same color as background) so that this message is the same height as the bot message -->
|
|
1345
|
+
<div class="${r} border border-[${this.color}] bg-[${this.color}] px-4 py-3 text-left text-white">
|
|
1346
|
+
<slot></slot>
|
|
1347
|
+
</div>
|
|
1348
|
+
|
|
1349
|
+
<!-- render status (if any) -->
|
|
1350
|
+
${this.status==="sent"?h`
|
|
1351
|
+
<!-- tick mark -->
|
|
1352
|
+
<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">
|
|
1353
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 12.75 6 6 9-13.5" />
|
|
1354
|
+
</svg>
|
|
1355
|
+
`:null}
|
|
1356
|
+
</div>
|
|
1357
|
+
</div>
|
|
1358
|
+
`;case"assistant":case"support":return h`
|
|
1359
|
+
<div class="mr-8 flex justify-start font-sans text-base">
|
|
1360
|
+
<div class="flex max-w-full space-x-2">
|
|
1361
|
+
<!--
|
|
1362
|
+
mt-[9px] because the message is 50px tall, the icon is 32px tall, we want to center it
|
|
1363
|
+
-->
|
|
1364
|
+
<div class="mt-[9px] h-6 w-6 flex-shrink-0 flex-grow-0 overflow-hidden rounded-full">
|
|
1365
|
+
<img class="h-full w-full bg-white object-cover" src="${this.logoUrl}" alt="Logo" />
|
|
1366
|
+
</div>
|
|
1367
|
+
|
|
1368
|
+
<!--
|
|
1369
|
+
min-h-[50px] because when we start streaming we sometimes start with an empty paragraph
|
|
1370
|
+
-->
|
|
1371
|
+
<!-- TODO: maybe add back border? border border-gray-100 -->
|
|
1372
|
+
<div class="${r} min-h-[50px] max-w-full overflow-hidden bg-gray-50 px-4 py-3 text-left text-gray-800">
|
|
1373
|
+
<slot></slot>
|
|
1374
|
+
</div>
|
|
1375
|
+
</div>
|
|
1376
|
+
</div>
|
|
1377
|
+
`;default:throw new Error(`Unknown side: ${this.side}`)}}};w(as,"properties",{side:{type:String},status:{type:String},color:{type:String},logoUrl:{type:String,attribute:"logo"},position:{type:String}});customElements.get("mw-chat-message")||customElements.define("mw-chat-message",as);var Dt,kr,Cr,nt,it,U0,R0,V0,ls,cs,us,Dn,hs,Ve=class extends A($){constructor(){super();d(this,it);d(this,Dt,!1);d(this,kr,!1);d(this,Cr,!1);d(this,nt,!1);d(this,ls,r=>{console.error("Failed to load chat image:",this.src),g(this,kr,!0),this.requestUpdate(),this.dispatchEvent(new CustomEvent("mw-chat-image:error",{detail:{src:this.src,event:r},bubbles:!0}))});d(this,cs,r=>{g(this,Dt,!0),this.requestUpdate(),this.dispatchEvent(new CustomEvent("mw-chat-image:load",{detail:{src:this.src,event:r},bubbles:!0}))});d(this,us,r=>{this.clickable&&(r.preventDefault(),r.stopPropagation(),g(this,Cr,!0),this.requestUpdate(),g(this,nt,!0),this.requestUpdate(),setTimeout(()=>{g(this,nt,!1),this.requestUpdate()},500),this.dispatchEvent(new CustomEvent("mw-chat-image:click",{detail:{src:this.src,event:r},bubbles:!0})))});d(this,Dn,r=>{r.preventDefault(),r.stopPropagation(),g(this,Cr,!1),this.requestUpdate()});d(this,hs,r=>{r.preventDefault(),r.stopPropagation()});this.src="",this.alt="",this.side="right",this.position="single",this.width="300px",this.height="auto",this.clickable=!1}updated(r){r.has("src")&&(g(this,Dt,!1),g(this,kr,!1))}render(){return this.src?h`
|
|
1378
|
+
<div class="${o(this,it,U0)} mb-2 min-h-[100px]">
|
|
1379
|
+
<div class="${o(this,it,R0)} relative">
|
|
1271
1380
|
<!-- Placeholder background that's only shown when loading or error -->
|
|
1272
|
-
${
|
|
1381
|
+
${o(this,Dt)?null:h`
|
|
1273
1382
|
<div class="flex items-center justify-center bg-gray-100" style="width: ${this.width}; height: 200px;">
|
|
1274
|
-
${
|
|
1383
|
+
${o(this,kr)?h`
|
|
1275
1384
|
<!-- Error icon -->
|
|
1276
1385
|
<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">
|
|
1277
1386
|
<path
|
|
@@ -1279,7 +1388,7 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1279
1388
|
stroke-linejoin="round"
|
|
1280
1389
|
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" />
|
|
1281
1390
|
</svg>
|
|
1282
|
-
`:
|
|
1391
|
+
`:h`
|
|
1283
1392
|
<!-- Loading pulse animation -->
|
|
1284
1393
|
<div class="h-8 w-8 animate-pulse rounded-full bg-gray-300"></div>
|
|
1285
1394
|
`}
|
|
@@ -1291,24 +1400,24 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1291
1400
|
src="${this.src}"
|
|
1292
1401
|
alt="${this.alt}"
|
|
1293
1402
|
style="width: ${this.width}; height: ${this.height}; display: block;"
|
|
1294
|
-
class="${
|
|
1295
|
-
@error="${
|
|
1296
|
-
@load="${
|
|
1297
|
-
@click="${this.clickable?
|
|
1403
|
+
class="${o(this,Dt)?"opacity-100":"opacity-0 hidden"} ${this.clickable?"cursor-pointer hover:scale-[105%]":""} h-full w-full max-w-full transition-all duration-200"
|
|
1404
|
+
@error="${o(this,ls)}"
|
|
1405
|
+
@load="${o(this,cs)}"
|
|
1406
|
+
@click="${this.clickable?o(this,us):void 0}"
|
|
1298
1407
|
loading="lazy" />
|
|
1299
1408
|
</div>
|
|
1300
1409
|
</div>
|
|
1301
1410
|
|
|
1302
1411
|
<!-- Full image modal -->
|
|
1303
|
-
${
|
|
1412
|
+
${o(this,Cr)?h`
|
|
1304
1413
|
<div
|
|
1305
|
-
class="${
|
|
1306
|
-
@click="${
|
|
1414
|
+
class="${o(this,nt)?"bg-opacity-0":"bg-opacity-75"} fixed inset-0 z-50 flex items-center justify-center bg-black p-4 transition-opacity duration-300"
|
|
1415
|
+
@click="${o(this,Dn)}">
|
|
1307
1416
|
<!-- Close button -->
|
|
1308
1417
|
<button
|
|
1309
1418
|
type="button"
|
|
1310
|
-
class="bg-opacity-50 ${
|
|
1311
|
-
@click="${
|
|
1419
|
+
class="bg-opacity-50 ${o(this,nt)?"opacity-0":"opacity-75"} hover:bg-opacity-75 absolute top-8 right-8 z-10 rounded-full bg-black p-2 text-white transition-[colors,opacity] delay-300 focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-transparent focus:outline-none"
|
|
1420
|
+
@click="${o(this,Dn)}"
|
|
1312
1421
|
aria-label="Close full image">
|
|
1313
1422
|
<!-- X mark icon -->
|
|
1314
1423
|
<svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
@@ -1317,67 +1426,31 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1317
1426
|
</button>
|
|
1318
1427
|
<div class="relative max-h-full max-w-full">
|
|
1319
1428
|
<img
|
|
1320
|
-
src="${m(this,
|
|
1429
|
+
src="${m(this,it,V0).call(this)}"
|
|
1321
1430
|
alt="${this.alt}"
|
|
1322
|
-
class="${
|
|
1323
|
-
@click="${
|
|
1431
|
+
class="${o(this,nt)?"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"
|
|
1432
|
+
@click="${o(this,hs)}" />
|
|
1324
1433
|
</div>
|
|
1325
1434
|
</div>
|
|
1326
1435
|
`:null}
|
|
1327
|
-
`:(console.warn("MwChatImage: No src provided"),null)}};
|
|
1328
|
-
<div class="ml-20 flex justify-end font-sans text-base">
|
|
1329
|
-
<div class="max-w-full">
|
|
1330
|
-
<!-- include an invisible border (same color as background) so that this message is the same height as the bot message -->
|
|
1331
|
-
<div class="${r} border border-[${this.color}] bg-[${this.color}] px-4 py-3 text-left text-white">
|
|
1332
|
-
<slot></slot>
|
|
1333
|
-
</div>
|
|
1334
|
-
|
|
1335
|
-
<!-- render status (if any) -->
|
|
1336
|
-
${this.status==="sent"?f`
|
|
1337
|
-
<!-- tick mark -->
|
|
1338
|
-
<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">
|
|
1339
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 12.75 6 6 9-13.5" />
|
|
1340
|
-
</svg>
|
|
1341
|
-
`:null}
|
|
1342
|
-
</div>
|
|
1343
|
-
</div>
|
|
1344
|
-
`;case"assistant":case"support":return f`
|
|
1345
|
-
<div class="mr-8 flex justify-start font-sans text-base">
|
|
1346
|
-
<div class="flex max-w-full space-x-2">
|
|
1347
|
-
<!--
|
|
1348
|
-
mt-[9px] because the message is 50px tall, the icon is 32px tall, we want to center it
|
|
1349
|
-
-->
|
|
1350
|
-
<div class="mt-[9px] h-6 w-6 flex-shrink-0 flex-grow-0 overflow-hidden rounded-full">
|
|
1351
|
-
<img class="h-full w-full bg-white object-cover" src="${this.logoUrl}" alt="Logo" />
|
|
1352
|
-
</div>
|
|
1353
|
-
|
|
1354
|
-
<!--
|
|
1355
|
-
min-h-[50px] because when we start streaming we sometimes start with an empty paragraph
|
|
1356
|
-
-->
|
|
1357
|
-
<!-- TODO: maybe add back border? border border-gray-100 -->
|
|
1358
|
-
<div class="${r} min-h-[50px] max-w-full overflow-hidden bg-gray-50 px-4 py-3 text-left text-gray-800">
|
|
1359
|
-
<slot></slot>
|
|
1360
|
-
</div>
|
|
1361
|
-
</div>
|
|
1362
|
-
</div>
|
|
1363
|
-
`;default:throw new Error(`Unknown side: ${this.side}`)}}};w(Gi,"properties",{side:{type:String},status:{type:String},color:{type:String},logoUrl:{type:String,attribute:"logo"},position:{type:String}});customElements.get("mw-chat-message")||customElements.define("mw-chat-message",Gi);var le=t=>t??z;var Bd=["javascript:","data:text/html","vbscript:","data:text/javascript","data:text/vbscript","data:text/css","data:text/plain","data:text/xml"],ze,da,pu,Zi,hu,Ki,Ji=class Ji extends M($){constructor(){super();h(this,ze);h(this,Zi,r=>{r.preventDefault(),this._dismissed=!0,this.storageKey&&m(this,ze,pu).call(this),this.dispatchEvent(new Ji.DismissEvent)});h(this,Ki,r=>{r.stopPropagation()});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(r){super.updated(r),r.has("storageKey")&&this.storageKey&&this.dismissible&&(this._dismissed=m(this,ze,da).call(this))}connectedCallback(){super.connectedCallback(),this.storageKey&&this.dismissible&&(this._dismissed=m(this,ze,da).call(this))}render(){if(this._dismissed)return null;let r=m(this,ze,hu).call(this,this.text);return f`
|
|
1436
|
+
`:(console.warn("MwChatImage: No src provided"),null)}};Dt=new WeakMap,kr=new WeakMap,Cr=new WeakMap,nt=new WeakMap,it=new WeakSet,U0=function(){return this.side==="left"||this.side==="assistant"?"flex justify-start ml-[25px]":"flex justify-end"},R0=function(){let r="inline-block overflow-hidden shadow-sm";if(this.side==="right"||this.side==="user")switch(this.position){case"first":r+=" rounded-2xl rounded-br-[4px]";break;case"middle":r+=" rounded-2xl rounded-r-[4px]";break;case"last":case"last-current":r+=" rounded-2xl rounded-tr-[4px]";break;default:r+=" rounded-2xl";break}else switch(this.position){case"first":r+=" rounded-2xl rounded-bl-[4px]";break;case"middle":r+=" rounded-2xl rounded-l-[4px]";break;case"last":case"last-current":r+=" rounded-2xl rounded-tl-[4px]";break;default:r+=" rounded-2xl";break}return r},V0=function(){if(!this.src)return"";try{let r=new URL(this.src);return r.searchParams.set("for","full"),r.href}catch{return this.src}},ls=new WeakMap,cs=new WeakMap,us=new WeakMap,Dn=new WeakMap,hs=new WeakMap,w(Ve,"properties",{src:{type:String},alt:{type:String},side:{type:String},position:{type:String},width:{type:String},height:{type:String},clickable:{type:Boolean}});var La;Ve.ErrorEvent=(La=class extends CustomEvent{constructor(e,r={}){super(Ve.ErrorEvent.type,{detail:e,...r})}},w(La,"type","mw-chat-image:error"),La);var ja;Ve.LoadEvent=(ja=class extends CustomEvent{constructor(e,r={}){super(Ve.LoadEvent.type,{detail:e,...r})}},w(ja,"type","mw-chat-image:load"),ja);var Ta;Ve.ClickEvent=(Ta=class extends CustomEvent{constructor(e,r={}){super(Ve.ClickEvent.type,{detail:e,...r})}},w(Ta,"type","mw-chat-image:click"),Ta);customElements.get("mw-chat-image")||customElements.define("mw-chat-image",Ve);var ce=t=>t??N;var fh=["javascript:","data:text/html","vbscript:","data:text/javascript","data:text/vbscript","data:text/css","data:text/plain","data:text/xml"],We,Oa,B0,ps,H0,ds,fs=class fs extends A($){constructor(){super();d(this,We);d(this,ps,r=>{r.preventDefault(),this._dismissed=!0,this.storageKey&&m(this,We,B0).call(this),this.dispatchEvent(new fs.DismissEvent)});d(this,ds,r=>{r.stopPropagation()});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(r){super.updated(r),r.has("storageKey")&&this.storageKey&&this.dismissible&&(this._dismissed=m(this,We,Oa).call(this))}connectedCallback(){super.connectedCallback(),this.storageKey&&this.dismissible&&(this._dismissed=m(this,We,Oa).call(this))}render(){if(this._dismissed)return null;let r=m(this,We,H0).call(this,this.text);return h`
|
|
1364
1437
|
<div class="flex items-center justify-between">
|
|
1365
1438
|
<div class="flex flex-1 items-center justify-center">
|
|
1366
1439
|
<span class="text-xs text-gray-600"> ${r} </span>
|
|
1367
1440
|
</div>
|
|
1368
1441
|
|
|
1369
|
-
${this.dismissible?
|
|
1370
|
-
<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="${
|
|
1442
|
+
${this.dismissible?h`
|
|
1443
|
+
<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="${o(this,ps)}">
|
|
1371
1444
|
<lucide-icon name="x" class="h-3 w-3 text-gray-500"></lucide-icon>
|
|
1372
1445
|
</button>
|
|
1373
1446
|
`:null}
|
|
1374
1447
|
</div>
|
|
1375
|
-
`}};
|
|
1448
|
+
`}};We=new WeakSet,Oa=function(){try{return localStorage.getItem(this.storageKey)==="true"}catch{return!1}},B0=function(){try{localStorage.setItem(this.storageKey,"true")}catch(r){console.warn("Could not save disclaimer dismissed state to localStorage:",r)}},ps=new WeakMap,H0=function(r){let i=/\[([^\]]+)\]\(([^)]+)\)/g.exec(r);if(i){let s=i[0],a=i[1],u=i[2],l=i.index;return fh.some(c=>u.toLowerCase().startsWith(c))||!u||!a?r:h`${r.slice(0,l)}<a href="${ce(u)}" @click="${o(this,ds)}" class="underline" style="color: ${this.color}">${a}</a>${r.slice(l+s.length)}`}return r},ds=new WeakMap,w(fs,"properties",{text:{type:String},color:{type:String},dismissible:{type:Boolean},storageKey:{type:String,attribute:"storage-key"},_dismissed:{type:Boolean,state:!0}});var On=fs,Da;On.DismissEvent=(Da=class extends CustomEvent{constructor(e={}){super(On.DismissEvent.type,{...e})}},w(Da,"type","mw-disclaimer:dismiss"),Da);customElements.get("mw-disclaimer")||customElements.define("mw-disclaimer",On);var $r,z0,F0,ms=class extends A($){constructor(){super();d(this,$r);this.text="I'm still learning!",this.variant="info",this.autoDismissable=!1,this.dismissDelay=5e3,this._isVisible=!0}connectedCallback(){super.connectedCallback(),this.autoDismissable&&m(this,$r,z0).call(this)}render(){let r=m(this,$r,F0).call(this);return h`
|
|
1376
1449
|
<div
|
|
1377
1450
|
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">
|
|
1378
1451
|
<div class="${r.bg} mb-2 flex max-w-[70%] items-center justify-center rounded-full px-3 py-2 select-none">
|
|
1379
1452
|
<!-- Icon based on variant -->
|
|
1380
|
-
${this.variant==="info"?
|
|
1453
|
+
${this.variant==="info"?h`
|
|
1381
1454
|
<!-- (i) symbol for info -->
|
|
1382
1455
|
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4">
|
|
1383
1456
|
<path
|
|
@@ -1386,21 +1459,21 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1386
1459
|
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"
|
|
1387
1460
|
fill="white" />
|
|
1388
1461
|
</svg>
|
|
1389
|
-
`:this.variant==="error"?
|
|
1462
|
+
`:this.variant==="error"?h`
|
|
1390
1463
|
<!-- Alert circle for error -->
|
|
1391
1464
|
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4">
|
|
1392
1465
|
<circle cx="12" cy="12" r="10" stroke="white" stroke-width="2" />
|
|
1393
1466
|
<line x1="15" y1="9" x2="9" y2="15" stroke="white" stroke-width="2" />
|
|
1394
1467
|
<line x1="9" y1="9" x2="15" y2="15" stroke="white" stroke-width="2" />
|
|
1395
1468
|
</svg>
|
|
1396
|
-
`:this.variant==="warning"?
|
|
1469
|
+
`:this.variant==="warning"?h`
|
|
1397
1470
|
<!-- Alert triangle for warning -->
|
|
1398
1471
|
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4">
|
|
1399
1472
|
<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" />
|
|
1400
1473
|
<line x1="12" y1="9" x2="12" y2="13" stroke="white" stroke-width="2" stroke-linecap="round" />
|
|
1401
1474
|
<path d="M12 17h.01" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
|
1402
1475
|
</svg>
|
|
1403
|
-
`:
|
|
1476
|
+
`:h`
|
|
1404
1477
|
<!-- Check circle for success -->
|
|
1405
1478
|
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4">
|
|
1406
1479
|
<path d="M22 11.08V12a10 10 0 11-5.93-9.14" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
|
@@ -1411,7 +1484,7 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1411
1484
|
<span class="${r.text} ml-1 text-xs">${this.text}</span>
|
|
1412
1485
|
</div>
|
|
1413
1486
|
</div>
|
|
1414
|
-
`}}
|
|
1487
|
+
`}};$r=new WeakSet,z0=function(){setTimeout(()=>{this._isVisible=!1,this.requestUpdate()},this.dismissDelay)},F0=function(){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"}}},w(ms,"properties",{text:{type:String},variant:{type:String},autoDismissable:{type:Boolean,attribute:"auto-dismissable"},dismissDelay:{type:Number,attribute:"dismiss-delay"},_isVisible:{type:Boolean,state:!0}});customElements.get("mw-info-banner")||customElements.define("mw-info-banner",ms);var Pa=class extends A($){constructor(){super(...arguments);w(this,"render",()=>h`
|
|
1415
1488
|
<svg class="inline-block h-full w-full leading-0" 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">
|
|
1416
1489
|
<circle fill="currentFill" stroke="none" cx="27" cy="50" r="6">
|
|
1417
1490
|
<animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.1" />
|
|
@@ -1423,11 +1496,11 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1423
1496
|
<animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.3" />
|
|
1424
1497
|
</circle>
|
|
1425
1498
|
</svg>
|
|
1426
|
-
`)}};customElements.get("mw-loading")||customElements.define("mw-loading",
|
|
1499
|
+
`)}};customElements.get("mw-loading")||customElements.define("mw-loading",Pa);var mh="https://molin.ai/?utm_source=molin-shop-ai&utm_medium=widget&utm_campaign=poweredby",Ua=class extends A($){constructor(){super(...arguments);w(this,"render",()=>h`
|
|
1427
1500
|
<p class="flex items-center justify-center text-xs whitespace-nowrap">
|
|
1428
1501
|
<span>Powered by</span>
|
|
1429
1502
|
|
|
1430
|
-
<a href="${
|
|
1503
|
+
<a href="${mh}" target="_blank" class="inline-flex items-center underline">
|
|
1431
1504
|
<svg class="mx-1 inline-block h-4 w-4" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1432
1505
|
<circle cx="10.0361" cy="10.0361" r="10.0361" fill="#242038" />
|
|
1433
1506
|
<path
|
|
@@ -1446,33 +1519,551 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1446
1519
|
<span>Molin AI</span>
|
|
1447
1520
|
</a>
|
|
1448
1521
|
</p>
|
|
1449
|
-
`)}};customElements.get("mw-powered-by")||customElements.define("mw-powered-by",
|
|
1522
|
+
`)}};customElements.get("mw-powered-by")||customElements.define("mw-powered-by",Ua);var gh={".section-spacing":{"@apply":"relative flex justify-center px-[25px] py-16 sm:px-9 sm:py-[45px] lg:px-24 lg:py-[104px]"}},Ra=yn({preflight:{...gh},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:[Wi(),Ni(),qi(),Gi()],ignorelist:/^(sb-|css-|sbdocs|docblock|innerZoomElementWrapper|docs-|rejt-)/});var Ot=t=>Ki(Ra)(t);var N0={afterpay:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1523
|
+
<g clip-path="url(#clip0_72_99)">
|
|
1524
|
+
<path d="M4.05111 17.7979C3.3811 17.609 2.88528 16.8228 3.02311 16.1679C3.08754 15.8613 3.62488 14.8916 5.66696 11.3969C7.31253 8.58086 7.16807 8.79614 7.5579 8.57693C8.1651 8.23577 8.85729 8.35944 9.3574 8.89876C9.57406 9.13227 12.7138 14.5138 13.2446 15.5611C13.7013 16.4624 13.4779 17.2918 12.6683 17.7008C12.3026 17.8856 12.1445 17.9027 10.807 17.9027H9.34544V16.7853V15.668L9.90628 15.6413C10.3909 15.6177 10.4707 15.5894 10.4932 15.4321C10.5327 15.1567 8.50761 11.6728 8.28829 11.6389C8.1454 11.6169 7.90872 11.9632 7.01429 13.5023C5.77516 15.6347 5.77068 15.6592 6.61953 15.6592H7.10209V16.7809V17.9026L5.73364 17.8869C4.98099 17.8869 4.22386 17.8397 4.05111 17.7894V17.7979ZM16.1369 16.4297C15.9485 16.3605 15.7151 16.2328 15.6182 16.1451C15.4392 15.9829 13.9709 13.5122 14.0263 13.4663C14.1601 13.3547 15.8055 12.4296 15.8647 12.4316C15.9066 12.4331 16.0522 12.6179 16.1881 12.8416C16.5946 13.5112 16.6682 13.4466 17.8815 11.3525C18.4675 10.3409 18.947 9.46699 18.947 9.41041C18.947 9.22184 18.6781 9.19843 16.514 9.19843C14.0428 9.19843 14.0805 9.18271 14.4881 9.94894C14.6196 10.1953 14.7176 10.4028 14.7059 10.4095C13.2307 11.2587 12.9019 11.4418 12.8521 11.4418C12.819 11.4418 12.4606 10.8657 12.0557 10.1617C11.3983 9.0185 11.3196 8.83291 11.3196 8.42529C11.3196 7.92054 11.5349 7.51511 11.9768 7.18779C12.2256 7.0033 12.3073 7 16.5532 7C20.5886 7 20.8942 7.01571 21.1455 7.16469C21.7124 7.51134 21.9754 8.15783 21.8067 8.79033C21.7221 9.1076 18.1774 15.3666 17.7607 15.9344C17.3974 16.4295 16.7103 16.639 16.1369 16.4297Z" fill="currentColor"/>
|
|
1525
|
+
</g>
|
|
1526
|
+
<defs>
|
|
1527
|
+
<clipPath id="clip0_72_99">
|
|
1528
|
+
<rect width="24" height="24" fill="white"/>
|
|
1529
|
+
</clipPath>
|
|
1530
|
+
</defs>
|
|
1531
|
+
</svg>`,alipay:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1532
|
+
<g clip-path="url(#clip0_72_123)">
|
|
1533
|
+
<path d="M7.4235 12.7583C6.978 12.8033 6.13875 12.999 5.682 13.4018C4.3095 14.5942 5.13075 16.7768 7.9095 16.7768C9.525 16.7768 11.1383 15.7485 12.405 14.0992C10.6005 13.224 9.07275 12.5963 7.4235 12.7583ZM20.28 3H3.72C3.32175 3 3 3.32175 3 3.72V20.28C3 20.6783 3.32175 21 3.72 21H20.28C20.6783 21 21 20.6783 21 20.28V3.72C21 3.32175 20.6783 3 20.28 3ZM20.9415 17.922C20.9415 17.922 16.2975 15.9915 13.9508 14.8688C12.378 16.797 10.3485 17.9693 8.2425 17.9693C4.6785 17.9693 3.47025 14.862 5.1555 12.8168C5.52225 12.3713 6.15 11.946 7.11975 11.7052C8.6385 11.334 11.0573 11.937 13.323 12.6818C13.7303 11.9325 14.0745 11.109 14.3288 10.2315H7.34475V9.525H10.9448V8.2605H6.58425V7.55625H10.9448V5.754C10.9448 5.754 10.9447 5.45025 11.253 5.45025H13.0125V7.55625H17.3258V8.2605H13.0147V9.525H16.5338C16.1963 10.8998 15.6855 12.1665 15.0443 13.278C16.113 13.6628 17.0715 14.0273 17.7847 14.2658C20.3565 15.1253 20.9393 15.1703 20.9393 15.1703V17.922H20.9415Z" fill="currentColor"/>
|
|
1534
|
+
</g>
|
|
1535
|
+
<defs>
|
|
1536
|
+
<clipPath id="clip0_72_123">
|
|
1537
|
+
<rect width="24" height="24" fill="white"/>
|
|
1538
|
+
</clipPath>
|
|
1539
|
+
</defs>
|
|
1540
|
+
</svg>`,"apple-pay":`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1541
|
+
<path d="M22.4 20H1.6C0.716667 20 0 19.2833 0 18.4V5.6C0 4.71667 0.716667 4 1.6 4H22.4C23.2833 4 24 4.71667 24 5.6V18.4C24 19.2833 23.2833 20 22.4 20ZM18.5287 15.26V16C18.6347 16.0147 18.7567 16.0233 18.8807 16.0233H18.8913C19.8207 16.0233 20.2613 15.662 20.6413 14.592L22.3173 9.892H21.348L20.224 13.5227H20.204L19.08 9.892H18.0827L19.6993 14.3673L19.6127 14.6393C19.554 15.0053 19.24 15.2813 18.8627 15.2813C18.844 15.2813 18.8253 15.2807 18.8067 15.2793H18.8093C18.7347 15.276 18.5873 15.2673 18.5287 15.26ZM3.80867 9.36933H3.79133C3.20067 9.386 2.69067 9.71533 2.41933 10.1967L2.41533 10.2047C1.85267 11.1727 2.21067 12.654 2.83333 13.556C3.12533 13.9827 3.44533 14.4 3.86733 14.4H3.89C4.06667 14.3887 4.23 14.3427 4.37733 14.2687L4.37 14.272C4.548 14.1827 4.75733 14.13 4.97867 14.128C5.19267 14.1293 5.39533 14.1813 5.57333 14.272L5.566 14.2687C5.70933 14.3433 5.878 14.3887 6.05733 14.3927H6.05867H6.07667C6.54667 14.384 6.84133 13.9527 7.102 13.5727C7.288 13.3033 7.442 12.9933 7.55 12.662L7.55733 12.6367V12.63L7.54533 12.6247C7.02533 12.388 6.67 11.8747 6.66667 11.2773C6.672 10.7467 6.95133 10.282 7.37 10.0187L7.376 10.0153L7.388 10.0073C7.11533 9.61533 6.672 9.358 6.168 9.34467H6.166C6.14267 9.34467 6.11867 9.34467 6.09533 9.34467C5.798 9.36067 5.52067 9.432 5.26933 9.54933L5.28333 9.54333C5.16867 9.59933 5.03533 9.64 4.89467 9.65733L4.88867 9.658C4.73667 9.64133 4.598 9.6 4.47133 9.53733L4.47867 9.54067C4.28333 9.446 4.05467 9.384 3.814 9.368H3.80867V9.36933ZM15.884 10.58C16.4707 10.58 16.7947 10.8547 16.7947 11.3527V11.692L15.604 11.7627C14.4873 11.83 13.8973 12.2827 13.8973 13.0713C13.9053 13.81 14.5053 14.4053 15.2453 14.4053C15.3013 14.4053 15.356 14.402 15.41 14.3953L15.4033 14.396C15.416 14.3967 15.4313 14.3967 15.4467 14.3967C16.026 14.3967 16.5327 14.0847 16.8073 13.6187L16.8113 13.6113H16.8313V14.346H17.7147V11.2887C17.7147 10.402 17.0073 9.83 15.9127 9.83C14.9033 9.83 14.1527 10.4087 14.1227 11.2053H14.9827C15.0787 10.8393 15.406 10.574 15.7953 10.574C15.8267 10.574 15.858 10.576 15.8887 10.5793L15.8847 10.5787L15.884 10.58ZM9.33333 8.20267V14.3467H10.2873V12.2453H11.6053C11.636 12.2473 11.6727 12.248 11.7087 12.248C12.7873 12.248 13.6613 11.374 13.6613 10.2953C13.6613 10.268 13.6607 10.2413 13.66 10.2147V10.2187C13.6613 10.1933 13.662 10.164 13.662 10.134C13.662 9.066 12.7967 8.20067 11.7287 8.20067C11.6967 8.20067 11.6647 8.20133 11.6333 8.20267H11.638H9.33333ZM6.16867 7.73333C5.77267 7.772 5.42733 7.96 5.184 8.24L5.18267 8.242C4.96067 8.49067 4.82533 8.82067 4.82533 9.182C4.82533 9.21333 4.82667 9.24467 4.82867 9.27533V9.27133C4.85133 9.27133 4.87533 9.274 4.902 9.274C5.27533 9.25267 5.60267 9.074 5.82067 8.80267L5.82267 8.8C6.04067 8.542 6.17333 8.206 6.17333 7.838C6.17333 7.80133 6.172 7.76467 6.16933 7.728V7.73267L6.16867 7.73333ZM15.6593 13.6673C15.154 13.6673 14.8267 13.424 14.8267 13.048C14.8267 12.66 15.14 12.4367 15.7333 12.4013L16.7933 12.3347V12.682C16.77 13.234 16.3167 13.672 15.7613 13.672C15.7253 13.672 15.69 13.67 15.6547 13.6667L15.6593 13.6673ZM11.3807 11.4473H10.2847V9.00667H11.3847C11.4313 9 11.4853 8.996 11.5407 8.996C12.1747 8.996 12.6887 9.51 12.6887 10.144C12.6887 10.172 12.6873 10.2007 12.6853 10.228V10.224C12.6873 10.248 12.688 10.2767 12.688 10.3053C12.688 10.9413 12.172 11.4573 11.536 11.4573C11.4813 11.4573 11.4267 11.4533 11.374 11.446L11.38 11.4467L11.3807 11.4473Z" fill="currentColor"/>
|
|
1542
|
+
</svg>`,"arrow-left-start-on-rectangle-outline":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" >
|
|
1543
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 9V5.25A2.25 2.25 0 0 1 10.5 3h6a2.25 2.25 0 0 1 2.25 2.25v13.5A2.25 2.25 0 0 1 16.5 21h-6a2.25 2.25 0 0 1-2.25-2.25V15m-3 0-3-3m0 0 3-3m-3 3H15" />
|
|
1544
|
+
</svg>`,"arrow-up-circle":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
1545
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="m15 11.25-3-3m0 0-3 3m3-3v7.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" />
|
|
1546
|
+
</svg>`,"bank-transfer":`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1547
|
+
<g clip-path="url(#clip0_72_63)">
|
|
1548
|
+
<path d="M3.75 21H20.25M4.5 3H19.5M5.25 3V21M18.75 3V21M9 6.75H10.5M9 9.75H10.5M9 12.75H10.5M13.5 6.75H15M13.5 9.75H15M13.5 12.75H15M9 21V17.625C9 17.004 9.504 16.5 10.125 16.5H13.875C14.496 16.5 15 17.004 15 17.625V21" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1549
|
+
</g>
|
|
1550
|
+
<defs>
|
|
1551
|
+
<clipPath id="clip0_72_63">
|
|
1552
|
+
<rect width="24" height="24" fill="white"/>
|
|
1553
|
+
</clipPath>
|
|
1554
|
+
</defs>
|
|
1555
|
+
</svg>`,bitcoin:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1556
|
+
<path d="M13.513 13.6932C13.1584 15.1245 10.7555 14.3498 9.96759 14.1528L10.5979 11.6185C11.3857 11.8155 13.8807 12.1963 13.513 13.6932ZM11.4645 8.15198L10.8868 10.4499C11.5433 10.6074 13.5524 11.2771 13.8807 9.97716C14.2089 8.6247 12.1211 8.30955 11.4645 8.15198ZM21.7068 14.0347C20.3017 19.6548 14.6029 23.082 8.96963 21.6901C3.34953 20.285 -0.0908073 14.5862 1.31422 8.96606C2.71924 3.33288 8.41813 -0.0812019 14.0514 1.31069C19.6715 2.71572 23.1118 8.4146 21.7068 14.0347ZM8.06359 13.2599C8.01106 13.4044 7.86662 13.6145 7.53834 13.5357C7.48582 13.5357 6.69796 13.3256 6.69796 13.3256L6.12019 14.6387L7.61713 15.0064C7.90601 15.0851 8.16864 15.1508 8.44439 15.2296L7.97167 17.1336L9.11407 17.4225L9.58679 15.5316C9.90194 15.6235 10.204 15.6892 10.506 15.768L10.0332 17.6457L11.1888 17.9346L11.6615 16.0306C13.6312 16.3982 15.115 16.2538 15.7321 14.468C16.2311 13.0367 15.7059 12.2094 14.6685 11.6711C15.417 11.5004 15.9816 11.0014 16.1392 9.97716C16.3493 8.5853 15.2857 7.8237 13.8281 7.33785L14.3008 5.43385L13.1453 5.14496L12.6857 6.98331C12.3837 6.90453 12.0686 6.83887 11.7534 6.76008L12.213 4.9086L11.0706 4.61972L10.5979 6.51059C10.3484 6.45807 10.0989 6.39241 9.86254 6.33989L8.27368 5.93283L7.97167 7.16715C7.97167 7.16715 8.81206 7.36411 8.81206 7.37724C9.27164 7.49542 9.35043 7.79744 9.35043 8.04693L8.05046 13.2337L8.06359 13.2599Z" fill="currentColor"/>
|
|
1557
|
+
</svg>`,"card-payment":`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1558
|
+
<path d="M2.25 8.25H21.75M2.25 9H21.75M5.25 14.25H11.25M5.25 16.5H8.25M4.5 19.5H19.5C20.0967 19.5 20.669 19.2629 21.091 18.841C21.5129 18.419 21.75 17.8467 21.75 17.25V6.75C21.75 6.15326 21.5129 5.58097 21.091 5.15901C20.669 4.73705 20.0967 4.5 19.5 4.5H4.5C3.90326 4.5 3.33097 4.73705 2.90901 5.15901C2.48705 5.58097 2.25 6.15326 2.25 6.75V17.25C2.25 17.8467 2.48705 18.419 2.90901 18.841C3.33097 19.2629 3.90326 19.5 4.5 19.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1559
|
+
</svg>`,"cash-on-delivery":`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1560
|
+
<g clip-path="url(#clip0_72_58)">
|
|
1561
|
+
<path d="M2.25 18.75C7.58561 18.7457 12.898 19.4522 18.047 20.851C18.774 21.049 19.5 20.509 19.5 19.755V18.75M3.75 4.5V5.25C3.75 5.44891 3.67098 5.63968 3.53033 5.78033C3.38968 5.92098 3.19891 6 3 6H2.25M2.25 6V5.625C2.25 5.004 2.754 4.5 3.375 4.5H20.25M2.25 6V15M20.25 4.5V5.25C20.25 5.664 20.586 6 21 6H21.75M20.25 4.5H20.625C21.246 4.5 21.75 5.004 21.75 5.625V15.375C21.75 15.996 21.246 16.5 20.625 16.5H20.25M2.25 15V15.375C2.25 15.6734 2.36853 15.9595 2.5795 16.1705C2.79048 16.3815 3.07663 16.5 3.375 16.5H3.75M2.25 15H3C3.19891 15 3.38968 15.079 3.53033 15.2197C3.67098 15.3603 3.75 15.5511 3.75 15.75V16.5M20.25 16.5V15.75C20.25 15.5511 20.329 15.3603 20.4697 15.2197C20.6103 15.079 20.8011 15 21 15H21.75M20.25 16.5H3.75M15 10.5C15 11.2956 14.6839 12.0587 14.1213 12.6213C13.5587 13.1839 12.7956 13.5 12 13.5C11.2044 13.5 10.4413 13.1839 9.87868 12.6213C9.31607 12.0587 9 11.2956 9 10.5C9 9.70435 9.31607 8.94129 9.87868 8.37868C10.4413 7.81607 11.2044 7.5 12 7.5C12.7956 7.5 13.5587 7.81607 14.1213 8.37868C14.6839 8.94129 15 9.70435 15 10.5ZM18 10.5H18.008V10.508H18V10.5ZM6 10.5H6.008V10.508H6V10.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1562
|
+
</g>
|
|
1563
|
+
<defs>
|
|
1564
|
+
<clipPath id="clip0_72_58">
|
|
1565
|
+
<rect width="24" height="24" fill="white"/>
|
|
1566
|
+
</clipPath>
|
|
1567
|
+
</defs>
|
|
1568
|
+
</svg>`,"chart-bar-outline":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" >
|
|
1569
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z" />
|
|
1570
|
+
</svg>`,"chart-bar":`<!-- https://heroicons.com/ chart-bar -->
|
|
1571
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
1572
|
+
<path d="M18.375 2.25c-1.035 0-1.875.84-1.875 1.875v15.75c0 1.035.84 1.875 1.875 1.875h.75c1.035 0 1.875-.84 1.875-1.875V4.125c0-1.036-.84-1.875-1.875-1.875h-.75zM9.75 8.625c0-1.036.84-1.875 1.875-1.875h.75c1.036 0 1.875.84 1.875 1.875v11.25c0 1.035-.84 1.875-1.875 1.875h-.75a1.875 1.875 0 01-1.875-1.875V8.625zM3 13.125c0-1.036.84-1.875 1.875-1.875h.75c1.036 0 1.875.84 1.875 1.875v6.75c0 1.035-.84 1.875-1.875 1.875h-.75A1.875 1.875 0 013 19.875v-6.75z" />
|
|
1573
|
+
</svg>`,"chat-bubble-bottom-center-text":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
1574
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 01.865-.501 48.172 48.172 0 003.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z" />
|
|
1575
|
+
</svg>`,"chat-bubble-left-right-outline":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
1576
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M20.25 8.511c.884.284 1.5 1.128 1.5 2.097v4.286c0 1.136-.847 2.1-1.98 2.193-.34.027-.68.052-1.02.072v3.091l-3-3c-1.354 0-2.694-.055-4.02-.163a2.115 2.115 0 01-.825-.242m9.345-8.334a2.126 2.126 0 00-.476-.095 48.64 48.64 0 00-8.048 0c-1.131.094-1.976 1.057-1.976 2.192v4.286c0 .837.46 1.58 1.155 1.951m9.345-8.334V6.637c0-1.621-1.152-3.026-2.76-3.235A48.455 48.455 0 0011.25 3c-2.115 0-4.198.137-6.24.402-1.608.209-2.76 1.614-2.76 3.235v6.226c0 1.621 1.152 3.026 2.76 3.235.577.075 1.157.14 1.74.194V21l4.155-4.155" />
|
|
1577
|
+
</svg>`,"chat-bubble-left-right":`<!-- https://heroicons.com/ chat-bubble-left-right -->
|
|
1578
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" >
|
|
1579
|
+
<path d="M3.505 2.365A41.369 41.369 0 019 2c1.863 0 3.697.124 5.495.365 1.247.167 2.18 1.108 2.435 2.268a4.45 4.45 0 00-.577-.069 43.141 43.141 0 00-4.706 0C9.229 4.696 7.5 6.727 7.5 8.998v2.24c0 1.413.67 2.735 1.76 3.562l-2.98 2.98A.75.75 0 015 17.25v-3.443c-.501-.048-1-.106-1.495-.172C2.033 13.438 1 12.162 1 10.72V5.28c0-1.441 1.033-2.717 2.505-2.914z" />
|
|
1580
|
+
<path d="M14 6c-.762 0-1.52.02-2.271.062C10.157 6.148 9 7.472 9 8.998v2.24c0 1.519 1.147 2.839 2.71 2.935.214.013.428.024.642.034.2.009.385.09.518.224l2.35 2.35a.75.75 0 001.28-.531v-2.07c1.453-.195 2.5-1.463 2.5-2.915V8.998c0-1.526-1.157-2.85-2.729-2.936A41.645 41.645 0 0014 6z" />
|
|
1581
|
+
</svg>`,"chat-bubble-oval-left-ellipsis":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
1582
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M8.625 12a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0zm0 0h-.375M21 12c0 4.556-4.03 8.25-9 8.25a9.764 9.764 0 0 1-2.555-.337A5.972 5.972 0 0 1 5.41 20.97a5.969 5.969 0 0 1-.474-.065 4.48 4.48 0 0 0 .978-2.025c.09-.457-.133-.901-.467-1.226C3.93 16.178 3 14.189 3 12c0-4.556 4.03-8.25 9-8.25s9 3.694 9 8.25z"/>
|
|
1583
|
+
</svg>`,"chat-bubble-oval-left":`<!-- https://heroicons.com/ chat-bubble-oval-left -->
|
|
1584
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" >
|
|
1585
|
+
<path fill-rule="evenodd" d="M2 10c0-3.967 3.69-7 8-7 4.31 0 8 3.033 8 7s-3.69 7-8 7a9.165 9.165 0 01-1.504-.123 5.976 5.976 0 01-3.935 1.107.75.75 0 01-.584-1.143 3.478 3.478 0 00.522-1.756C2.979 13.825 2 12.025 2 10z" clip-rule="evenodd" />
|
|
1586
|
+
</svg>`,"check-circle":`<!-- https://heroicons.com/ -->
|
|
1587
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24">
|
|
1588
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/>
|
|
1589
|
+
</svg>`,"cog-wheel":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
1590
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z" />
|
|
1591
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
1592
|
+
</svg>`,"cog-wheel-solid":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
1593
|
+
<path fill-rule="evenodd" d="M11.078 2.25c-.917 0-1.699.663-1.85 1.567L9.05 4.889c-.02.12-.115.26-.297.348a7.493 7.493 0 0 0-.986.57c-.166.115-.334.126-.45.083L6.3 5.508a1.875 1.875 0 0 0-2.282.819l-.922 1.597a1.875 1.875 0 0 0 .432 2.385l.84.692c.095.078.17.229.154.43a7.598 7.598 0 0 0 0 1.139c.015.2-.059.352-.153.43l-.841.692a1.875 1.875 0 0 0-.432 2.385l.922 1.597a1.875 1.875 0 0 0 2.282.818l1.019-.382c.115-.043.283-.031.45.082.312.214.641.405.985.57.182.088.277.228.297.35l.178 1.071c.151.904.933 1.567 1.85 1.567h1.844c.916 0 1.699-.663 1.85-1.567l.178-1.072c.02-.12.114-.26.297-.349.344-.165.673-.356.985-.57.167-.114.335-.125.45-.082l1.02.382a1.875 1.875 0 0 0 2.28-.819l.923-1.597a1.875 1.875 0 0 0-.432-2.385l-.84-.692c-.095-.078-.17-.229-.154-.43a7.614 7.614 0 0 0 0-1.139c-.016-.2.059-.352.153-.43l.84-.692c.708-.582.891-1.59.433-2.385l-.922-1.597a1.875 1.875 0 0 0-2.282-.818l-1.02.382c-.114.043-.282.031-.449-.083a7.49 7.49 0 0 0-.985-.57c-.183-.087-.277-.227-.297-.348l-.179-1.072a1.875 1.875 0 0 0-1.85-1.567h-1.843ZM12 15.75a3.75 3.75 0 1 0 0-7.5 3.75 3.75 0 0 0 0 7.5Z" clip-rule="evenodd" />
|
|
1594
|
+
</svg>
|
|
1595
|
+
`,"computer-desktop":`<!-- https://heroicons.com/ -->
|
|
1596
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M9 17.25v1.007a3 3 0 0 1-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0 1 15 18.257V17.25m6-12V15a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 15V5.25m18 0A2.25 2.25 0 0 0 18.75 3H5.25A2.25 2.25 0 0 0 3 5.25m18 0V12a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 12V5.25"/></svg>`,"credit-card-outline":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" >
|
|
1597
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Z" />
|
|
1598
|
+
</svg>`,details:`<!-- https://www.svgrepo.com/svg/372349/details -->
|
|
1599
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36">
|
|
1600
|
+
<path d="M32 6H4a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h28a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2Zm0 22H4V8h28Z"/>
|
|
1601
|
+
<path d="M9 14h18a1 1 0 0 0 0-2H9a1 1 0 0 0 0 2Z"/>
|
|
1602
|
+
<path d="M9 18h18a1 1 0 0 0 0-2H9a1 1 0 0 0 0 2Z"/>
|
|
1603
|
+
<path d="M9 22h10a1 1 0 0 0 0-2H9a1 1 0 0 0 0 2Z"/>
|
|
1604
|
+
<path fill="none" d="M0 0h36v36H0z"/>
|
|
1605
|
+
</svg>`,"document-magnifying-glass":`<!-- heroicons -->
|
|
1606
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
1607
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m5.231 13.481L15 17.25m-4.5-15H5.625c-.621 0-1.125.504-1.125 1.125v16.5c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Zm3.75 11.625a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z" />
|
|
1608
|
+
</svg>`,"document-minus":`<!-- heroicons -->
|
|
1609
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
1610
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m6.75 12H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z" />
|
|
1611
|
+
</svg>`,"document-text":`<!-- https://heroicons.com/ document-text -->
|
|
1612
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" >
|
|
1613
|
+
<path fill-rule="evenodd" d="M4.5 2A1.5 1.5 0 003 3.5v13A1.5 1.5 0 004.5 18h11a1.5 1.5 0 001.5-1.5V7.621a1.5 1.5 0 00-.44-1.06l-4.12-4.122A1.5 1.5 0 0011.378 2H4.5zm2.25 8.5a.75.75 0 000 1.5h6.5a.75.75 0 000-1.5h-6.5zm0 3a.75.75 0 000 1.5h6.5a.75.75 0 000-1.5h-6.5z" clip-rule="evenodd" />
|
|
1614
|
+
</svg>`,"e-checks":`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1615
|
+
<g clip-path="url(#clip0_72_130)">
|
|
1616
|
+
<g clip-path="url(#clip1_72_130)">
|
|
1617
|
+
<path d="M16.862 4.487L18.549 2.799C18.9007 2.44733 19.3777 2.24976 19.875 2.24976C20.3723 2.24976 20.8493 2.44733 21.201 2.799C21.5527 3.15068 21.7502 3.62766 21.7502 4.125C21.7502 4.62235 21.5527 5.09933 21.201 5.451L10.582 16.07C10.0533 16.5984 9.40137 16.9867 8.685 17.2L6 18L6.8 15.315C7.01328 14.5986 7.40163 13.9467 7.93 13.418L16.862 4.487ZM16.862 4.487L19.5 7.125M18 14V18.75C18 19.3467 17.7629 19.919 17.341 20.341C16.919 20.763 16.3467 21 15.75 21H5.25C4.65326 21 4.08097 20.763 3.65901 20.341C3.23705 19.919 3 19.3467 3 18.75V8.25C3 7.65327 3.23705 7.08097 3.65901 6.65901C4.08097 6.23706 4.65326 6 5.25 6H10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1618
|
+
</g>
|
|
1619
|
+
</g>
|
|
1620
|
+
<defs>
|
|
1621
|
+
<clipPath id="clip0_72_130">
|
|
1622
|
+
<rect width="24" height="24" fill="white"/>
|
|
1623
|
+
</clipPath>
|
|
1624
|
+
<clipPath id="clip1_72_130">
|
|
1625
|
+
<rect width="24" height="24" fill="white"/>
|
|
1626
|
+
</clipPath>
|
|
1627
|
+
</defs>
|
|
1628
|
+
</svg>`,"eye-slash":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
1629
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88" />
|
|
1630
|
+
</svg>`,facebook:`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="1 1 14 14">
|
|
1631
|
+
<path fill="currentColor" d="M15 8a7 7 0 0 0-7-7 7 7 0 0 0-1.094 13.915v-4.892H5.13V8h1.777V6.458c0-1.754 1.045-2.724 2.644-2.724.766 0 1.567.137 1.567.137v1.723h-.883c-.87 0-1.14.54-1.14 1.093V8h1.941l-.31 2.023H9.094v4.892A7.001 7.001 0 0 0 15 8z"/>
|
|
1632
|
+
<path fill="#fff" d="M10.725 10.023 11.035 8H9.094V6.687c0-.553.27-1.093 1.14-1.093h.883V3.87s-.801-.137-1.567-.137c-1.6 0-2.644.97-2.644 2.724V8H5.13v2.023h1.777v4.892a7.037 7.037 0 0 0 2.188 0v-4.892h1.63z"/>
|
|
1633
|
+
</svg>`,"gift-cards":`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1634
|
+
<g clip-path="url(#clip0_72_117)">
|
|
1635
|
+
<g clip-path="url(#clip1_72_117)">
|
|
1636
|
+
<path d="M21 11.25V19.5C21 19.8978 20.842 20.2794 20.5607 20.5607C20.2794 20.842 19.8978 21 19.5 21H5.25C4.85218 21 4.47064 20.842 4.18934 20.5607C3.90804 20.2794 3.75 19.8978 3.75 19.5V11.25M12 4.875C12 4.35582 11.846 3.84831 11.5576 3.41663C11.2692 2.98495 10.8592 2.6485 10.3795 2.44982C9.89989 2.25114 9.37209 2.19915 8.86289 2.30044C8.35369 2.40172 7.88596 2.65173 7.51884 3.01884C7.15173 3.38596 6.90172 3.85369 6.80044 4.36289C6.69915 4.87209 6.75114 5.39989 6.94982 5.87954C7.1485 6.3592 7.48495 6.76917 7.91663 7.05761C8.34831 7.34605 8.85582 7.5 9.375 7.5H12M12 4.875V7.5M12 4.875C12 4.35582 12.154 3.84831 12.4424 3.41663C12.7308 2.98495 13.1408 2.6485 13.6205 2.44982C14.1001 2.25114 14.6279 2.19915 15.1371 2.30044C15.6463 2.40172 16.114 2.65173 16.4812 3.01884C16.8483 3.38596 17.0983 3.85369 17.1996 4.36289C17.3008 4.87209 17.2489 5.39989 17.0502 5.87954C16.8515 6.3592 16.5151 6.76917 16.0834 7.05761C15.6517 7.34605 15.1442 7.5 14.625 7.5H12M12 7.5V21M3.375 11.25H21.375C21.996 11.25 22.5 10.746 22.5 10.125V8.625C22.5 8.004 21.996 7.5 21.375 7.5H3.375C2.754 7.5 2.25 8.004 2.25 8.625V10.125C2.25 10.746 2.754 11.25 3.375 11.25Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1637
|
+
</g>
|
|
1638
|
+
</g>
|
|
1639
|
+
<defs>
|
|
1640
|
+
<clipPath id="clip0_72_117">
|
|
1641
|
+
<rect width="24" height="24" fill="white"/>
|
|
1642
|
+
</clipPath>
|
|
1643
|
+
<clipPath id="clip1_72_117">
|
|
1644
|
+
<rect width="24" height="24" fill="white"/>
|
|
1645
|
+
</clipPath>
|
|
1646
|
+
</defs>
|
|
1647
|
+
</svg>`,"identification-outline":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
1648
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M15 9h3.75M15 12h3.75M15 15h3.75M4.5 19.5h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Zm6-10.125a1.875 1.875 0 1 1-3.75 0 1.875 1.875 0 0 1 3.75 0Zm1.294 6.336a6.721 6.721 0 0 1-3.17.789 6.721 6.721 0 0 1-3.168-.789 3.376 3.376 0 0 1 6.338 0Z" />
|
|
1649
|
+
</svg>`,identification:`<!-- heroicons -->
|
|
1650
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
1651
|
+
<path fill-rule="evenodd" d="M4.5 3.75a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3V6.75a3 3 0 0 0-3-3h-15Zm4.125 3a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5Zm-3.873 8.703a4.126 4.126 0 0 1 7.746 0 .75.75 0 0 1-.351.92 7.47 7.47 0 0 1-3.522.877 7.47 7.47 0 0 1-3.522-.877.75.75 0 0 1-.351-.92ZM15 8.25a.75.75 0 0 0 0 1.5h3.75a.75.75 0 0 0 0-1.5H15ZM14.25 12a.75.75 0 0 1 .75-.75h3.75a.75.75 0 0 1 0 1.5H15a.75.75 0 0 1-.75-.75Zm.75 2.25a.75.75 0 0 0 0 1.5h3.75a.75.75 0 0 0 0-1.5H15Z" clip-rule="evenodd" />
|
|
1652
|
+
</svg>`,"in-store-payment":`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1653
|
+
<g clip-path="url(#clip0_72_86)">
|
|
1654
|
+
<path d="M13.5 21V13.5C13.5 13.3011 13.579 13.1103 13.7197 12.9697C13.8603 12.829 14.0511 12.75 14.25 12.75H17.25C17.4489 12.75 17.6397 12.829 17.7803 12.9697C17.921 13.1103 18 13.3011 18 13.5V21M13.5 21H2.35999M13.5 21H18M18 21H21.64M20.25 21V9.349M20.25 9.349C19.6501 9.6951 18.9489 9.82304 18.2654 9.71113C17.5819 9.59922 16.9582 9.25435 16.5 8.735C15.95 9.357 15.146 9.75 14.25 9.75C13.8243 9.75041 13.4034 9.66 13.0154 9.48479C12.6274 9.30959 12.2812 9.05363 12 8.734C11.45 9.357 10.646 9.75 9.74999 9.75C9.32427 9.75041 8.90336 9.66 8.51536 9.48479C8.12736 9.30959 7.7812 9.05363 7.49999 8.734C7.04191 9.25351 6.41823 9.59858 5.73473 9.71067C5.05124 9.82276 4.35001 9.69498 3.74999 9.349M20.25 9.349C20.6486 9.11891 20.9889 8.80019 21.2446 8.41751C21.5003 8.03484 21.6645 7.59846 21.7245 7.14215C21.7846 6.68584 21.7388 6.22184 21.5908 5.78605C21.4428 5.35026 21.1965 4.95436 20.871 4.629L19.681 3.44C19.4 3.15862 19.0187 3.00035 18.621 3H5.37799C4.98044 3.00008 4.59919 3.15798 4.31799 3.439L3.12899 4.629C2.80423 4.95474 2.5586 5.3507 2.41106 5.78637C2.26351 6.22204 2.21799 6.68577 2.27799 7.14182C2.33799 7.59786 2.50191 8.03403 2.75713 8.41671C3.01234 8.79939 3.35202 9.11835 3.74999 9.349M3.74999 21V9.349M6.74999 18H10.5C10.6989 18 10.8897 17.921 11.0303 17.7803C11.171 17.6397 11.25 17.4489 11.25 17.25V13.5C11.25 13.3011 11.171 13.1103 11.0303 12.9697C10.8897 12.829 10.6989 12.75 10.5 12.75H6.74999C6.55108 12.75 6.36031 12.829 6.21966 12.9697C6.07901 13.1103 5.99999 13.3011 5.99999 13.5V17.25C5.99999 17.664 6.33599 18 6.74999 18Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1655
|
+
</g>
|
|
1656
|
+
<defs>
|
|
1657
|
+
<clipPath id="clip0_72_86">
|
|
1658
|
+
<rect width="24" height="24" fill="white"/>
|
|
1659
|
+
</clipPath>
|
|
1660
|
+
</defs>
|
|
1661
|
+
</svg>`,instagram:`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 16">
|
|
1662
|
+
<path d="M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z" />
|
|
1663
|
+
</svg>`,instructions:`<!-- https://www.svgrepo.com/svg/453613/readme -->
|
|
1664
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 26">
|
|
1665
|
+
<g fill="none" fill-rule="evenodd">
|
|
1666
|
+
<path stroke="currentColor" d="M20 20h4c.553 0 1-.445 1-.995V1.995A1 1 0 0 0 24 1H2c-.553 0-1 .445-1 .995v17.01c0 .544.448.995 1 .995h12.167l5.07 4.346c.425.365.763.21.763-.337V20z"/>
|
|
1667
|
+
<path fill="currentColor" d="M6 7h13v1H6zm0 3h13v1H6zm0 3h9v1H6z"/>
|
|
1668
|
+
</g>
|
|
1669
|
+
</svg>`,klarna:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1670
|
+
<path d="M4.40067 2V21.1667H0V2H4.40067ZM15.3832 2C15.3832 6.01925 13.8661 9.76729 11.1521 12.6068L10.8857 12.878L16.9644 21.1667H11.5326L4.92679 12.1583L6.63167 10.8818C9.37058 8.831 10.9777 5.72792 11.0755 2.32967L11.0802 2H15.3832ZM20.6042 16.375C21.2396 16.375 21.849 16.6274 22.2983 17.0767C22.7476 17.526 23 18.1354 23 18.7708C23 19.4062 22.7476 20.0156 22.2983 20.4649C21.849 20.9143 21.2396 21.1667 20.6042 21.1667C19.9688 21.1667 19.3594 20.9143 18.9101 20.4649C18.4608 20.0156 18.2083 19.4062 18.2083 18.7708C18.2083 18.1354 18.4608 17.526 18.9101 17.0767C19.3594 16.6274 19.9688 16.375 20.6042 16.375Z" fill="currentColor"/>
|
|
1671
|
+
</svg>`,knowledge:`<!-- https://www.svgrepo.com/svg/426146/info -->
|
|
1672
|
+
|
|
1673
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 48.296 48.257">
|
|
1674
|
+
<path d="M24.149 0C10.812 0 0 10.8 0 24.125c0 13.326 10.812 24.132 24.149 24.132 13.334 0 24.147-10.807 24.147-24.132C48.296 10.8 37.483 0 24.149 0zm2.022 35.919a2.023 2.023 0 0 1-4.047 0V22.507a2.024 2.024 0 0 1 4.047 0v13.412zm0-20.818a2.022 2.022 0 0 1-2.022 2.022 2.021 2.021 0 0 1-2.025-2.022v-.633c0-1.119.905-2.022 2.025-2.022 1.115 0 2.022.903 2.022 2.022v.633z"/>
|
|
1675
|
+
</svg>`,loader:'<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.84998 7.49998C1.84998 4.66458 4.05979 1.84998 7.49998 1.84998C10.2783 1.84998 11.6515 3.9064 12.2367 5H10.5C10.2239 5 10 5.22386 10 5.5C10 5.77614 10.2239 6 10.5 6H13.5C13.7761 6 14 5.77614 14 5.5V2.5C14 2.22386 13.7761 2 13.5 2C13.2239 2 13 2.22386 13 2.5V4.31318C12.2955 3.07126 10.6659 0.849976 7.49998 0.849976C3.43716 0.849976 0.849976 4.18537 0.849976 7.49998C0.849976 10.8146 3.43716 14.15 7.49998 14.15C9.44382 14.15 11.0622 13.3808 12.2145 12.2084C12.8315 11.5806 13.3133 10.839 13.6418 10.0407C13.7469 9.78536 13.6251 9.49315 13.3698 9.38806C13.1144 9.28296 12.8222 9.40478 12.7171 9.66014C12.4363 10.3425 12.0251 10.9745 11.5013 11.5074C10.5295 12.4963 9.16504 13.15 7.49998 13.15C4.05979 13.15 1.84998 10.3354 1.84998 7.49998Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg>',loading:`<svg aria-hidden="true" role="status" class="animate-spin" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1676
|
+
<path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"/>
|
|
1677
|
+
<path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="#784dff"/>
|
|
1678
|
+
</svg>`,"molin-logo":`<svg viewBox="0 0 1600 1600" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1679
|
+
<g clip-path="url(#clip0_1347_2815)">
|
|
1680
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M800 1600C1241.83 1600 1600 1241.83 1600 800C1600 358.172 1241.83 0 800 0C358.172 0 0 358.172 0 800C0 1241.83 358.172 1600 800 1600ZM1053.93 1204.94C1004.11 1233.7 944.905 1241.5 889.338 1226.61C833.772 1211.72 786.395 1175.37 757.632 1125.55C757.546 1125.4 757.46 1125.25 757.375 1125.1C757.312 1124.99 757.248 1124.88 757.185 1124.77L757.051 1124.53C756.97 1124.4 756.89 1124.26 756.81 1124.12C756.729 1123.98 756.648 1123.85 756.567 1123.71L520.274 714.434C516.674 706.633 512.851 698.527 508.828 690.171V690.175C500.263 672.388 490.791 653.467 480.628 633.946C430.934 538.484 383.555 464.79 374.805 469.345C366.054 473.901 399.245 554.98 448.939 650.442C470.289 691.455 491.212 728.45 508.828 756.948V793.508H508.83V1010.2V1226.89C451.303 1226.89 396.132 1204.06 355.455 1163.43C314.777 1122.79 291.925 1067.67 291.925 1010.2C291.925 1009.83 291.925 1009.45 291.927 1009.08C291.924 1008.71 291.922 1008.34 291.922 1007.97V471.125C291.922 423.461 322.67 382.979 365.413 368.431C406.508 353.902 452.128 352.113 494.791 363.544C550.357 378.433 597.734 414.786 626.497 464.606C626.705 464.966 626.911 465.326 627.117 465.687C627.194 465.819 627.272 465.951 627.349 466.083C627.42 466.205 627.49 466.326 627.561 466.448L837.024 829.249L837.025 829.249L945.478 1017.09L1053.93 1204.94ZM813.776 363.545C758.21 348.656 699.004 356.451 649.184 385.214L757.637 573.06L758.402 574.384C758.5 574.557 758.599 574.729 758.698 574.901L1075.55 1123.71C1075.71 1123.98 1075.87 1124.26 1076.03 1124.53L1076.16 1124.76C1076.31 1125.02 1076.46 1125.28 1076.62 1125.55C1105.38 1175.37 1152.75 1211.72 1208.32 1226.61C1263.89 1241.5 1323.09 1233.7 1372.91 1204.94L1264.46 1017.09L1156.01 829.249L1156.01 829.249L946.544 466.448C946.416 466.227 946.288 466.006 946.158 465.785C946.074 465.637 945.99 465.489 945.905 465.341C945.765 465.096 945.624 464.852 945.483 464.607C916.719 414.787 869.343 378.434 813.776 363.545Z" fill="currentColor" />
|
|
1681
|
+
</g>
|
|
1682
|
+
<defs>
|
|
1683
|
+
<clipPath id="clip0_1347_2815">
|
|
1684
|
+
<rect width="1600" height="1600" fill="white" />
|
|
1685
|
+
</clipPath>
|
|
1686
|
+
</defs>
|
|
1687
|
+
</svg>`,"paint-brush-outline":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" >
|
|
1688
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M9.53 16.122a3 3 0 0 0-5.78 1.128 2.25 2.25 0 0 1-2.4 2.245 4.5 4.5 0 0 0 8.4-2.245c0-.399-.078-.78-.22-1.128Zm0 0a15.998 15.998 0 0 0 3.388-1.62m-5.043-.025a15.994 15.994 0 0 1 1.622-3.395m3.42 3.42a15.995 15.995 0 0 0 4.764-4.648l3.876-5.814a1.151 1.151 0 0 0-1.597-1.597L14.146 6.32a15.996 15.996 0 0 0-4.649 4.763m3.42 3.42a6.776 6.776 0 0 0-3.42-3.42" />
|
|
1689
|
+
</svg>`,"paint-brush":`<!-- https://heroicons.com/ paint-brush -->
|
|
1690
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" >
|
|
1691
|
+
<path d="M15.993 1.385a1.87 1.87 0 012.623 2.622l-4.03 5.27a12.749 12.749 0 01-4.237 3.562 4.508 4.508 0 00-3.188-3.188 12.75 12.75 0 013.562-4.236l5.27-4.03zM6 11a3 3 0 00-3 3 .5.5 0 01-.72.45.75.75 0 00-1.035.931A4.001 4.001 0 009 14.004V14a3.01 3.01 0 00-1.66-2.685A2.99 2.99 0 006 11z" />
|
|
1692
|
+
</svg>`,paypal:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1693
|
+
<g clip-path="url(#clip0_72_74)">
|
|
1694
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M20.4755 7.8999C19.2608 13.1169 15.5556 14 10.5787 14L9.07814 22H11.8254C12.3259 22 12.5355 21.6592 12.6278 21.1792C13.3129 16.8482 13.2166 17.5569 13.2788 16.8789C13.338 16.5009 13.6649 16 14.0491 16C17.6981 16 20.1184 14.9452 20.8576 11.1582C21.1204 9.8112 21.0341 8.7719 20.4755 7.8999ZM9.13431 13.8599L8.01193 20H4.53546C4.20647 20 3.95471 19.5979 4.00686 19.2739L6.60267 2.75098C6.67088 2.31898 7.04502 2 7.48434 2H13.7181C17.4092 2 19.8947 3.4012 19.32 7.0542C18.3139 13.5602 12.7371 13 10.1995 13C9.76018 13 9.20351 13.4279 9.13431 13.8599Z" fill="currentColor"/>
|
|
1695
|
+
</g>
|
|
1696
|
+
<defs>
|
|
1697
|
+
<clipPath id="clip0_72_74">
|
|
1698
|
+
<rect width="24" height="24" fill="white"/>
|
|
1699
|
+
</clipPath>
|
|
1700
|
+
</defs>
|
|
1701
|
+
</svg>`,"pencil-square":`<!-- https://heroicons.com/ pencil-square -->
|
|
1702
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" >
|
|
1703
|
+
<path d="M5.433 13.917l1.262-3.155A4 4 0 017.58 9.42l6.92-6.918a2.121 2.121 0 013 3l-6.92 6.918c-.383.383-.84.685-1.343.886l-3.154 1.262a.5.5 0 01-.65-.65z" />
|
|
1704
|
+
<path d="M3.5 5.75c0-.69.56-1.25 1.25-1.25H10A.75.75 0 0010 3H4.75A2.75 2.75 0 002 5.75v9.5A2.75 2.75 0 004.75 18h9.5A2.75 2.75 0 0017 15.25V10a.75.75 0 00-1.5 0v5.25c0 .69-.56 1.25-1.25 1.25h-9.5c-.69 0-1.25-.56-1.25-1.25v-9.5z" />
|
|
1705
|
+
</svg>`,personality:`<!-- https://www.svgrepo.com/svg/501320/quiz-instructions -->
|
|
1706
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1920">
|
|
1707
|
+
<path fill-rule="evenodd" d="M1920 332v1257H0V332h1920Zm-689 797H409v113h822v-113Zm275-226H409v113h1097V903Zm-275-226H409v113h822V677Z"/>
|
|
1708
|
+
</svg>`,"phone-arrow-down-left":`<!-- https://heroicons.com/ phone-arrow-down-left -->
|
|
1709
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-5 h-5">
|
|
1710
|
+
<path d="M3.5 2A1.5 1.5 0 0 0 2 3.5V5c0 1.149.15 2.263.43 3.326a13.022 13.022 0 0 0 9.244 9.244c1.063.28 2.177.43 3.326.43h1.5a1.5 1.5 0 0 0 1.5-1.5v-1.148a1.5 1.5 0 0 0-1.175-1.465l-3.223-.716a1.5 1.5 0 0 0-1.767 1.052l-.267.933c-.117.41-.555.643-.95.48a11.542 11.542 0 0 1-6.254-6.254c-.163-.395.07-.833.48-.95l.933-.267a1.5 1.5 0 0 0 1.052-1.767l-.716-3.223A1.5 1.5 0 0 0 4.648 2H3.5ZM16.72 2.22a.75.75 0 1 1 1.06 1.06L14.56 6.5h2.69a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75v-4.5a.75.75 0 0 1 1.5 0v2.69l3.22-3.22Z" />
|
|
1711
|
+
</svg>`,phone:`<!-- heroicons -->
|
|
1712
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24">
|
|
1713
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 0 0 2.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 0 1-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 0 0-1.091-.852H4.5A2.25 2.25 0 0 0 2.25 4.5v2.25Z"/>
|
|
1714
|
+
</svg>`,"placeholder-avatar":'<svg fill="currentColor" viewBox="0 0 24 24"><path d="M24 20.993V24H0v-2.996A14.977 14.977 0 0112.004 15c4.904 0 9.26 2.354 11.996 5.993zM16.002 8.999a4 4 0 11-8 0 4 4 0 018 0z"></path></svg>',"plus-circle-outline":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
1715
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M12 9v6m3-3H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" />
|
|
1716
|
+
</svg>`,"puzzle-piece-solid":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
1717
|
+
<path d="M11.25 5.337c0-.355-.186-.676-.401-.959a1.647 1.647 0 0 1-.349-1.003c0-1.036 1.007-1.875 2.25-1.875S15 2.34 15 3.375c0 .369-.128.713-.349 1.003-.215.283-.401.604-.401.959 0 .332.278.598.61.578 1.91-.114 3.79-.342 5.632-.676a.75.75 0 0 1 .878.645 49.17 49.17 0 0 1 .376 5.452.657.657 0 0 1-.66.664c-.354 0-.675-.186-.958-.401a1.647 1.647 0 0 0-1.003-.349c-1.035 0-1.875 1.007-1.875 2.25s.84 2.25 1.875 2.25c.369 0 .713-.128 1.003-.349.283-.215.604-.401.959-.401.31 0 .557.262.534.571a48.774 48.774 0 0 1-.595 4.845.75.75 0 0 1-.61.61c-1.82.317-3.673.533-5.555.642a.58.58 0 0 1-.611-.581c0-.355.186-.676.401-.959.221-.29.349-.634.349-1.003 0-1.035-1.007-1.875-2.25-1.875s-2.25.84-2.25 1.875c0 .369.128.713.349 1.003.215.283.401.604.401.959a.641.641 0 0 1-.658.643 49.118 49.118 0 0 1-4.708-.36.75.75 0 0 1-.645-.878c.293-1.614.504-3.257.629-4.924A.53.53 0 0 0 5.337 15c-.355 0-.676.186-.959.401-.29.221-.634.349-1.003.349-1.036 0-1.875-1.007-1.875-2.25s.84-2.25 1.875-2.25c.369 0 .713.128 1.003.349.283.215.604.401.959.401a.656.656 0 0 0 .659-.663 47.703 47.703 0 0 0-.31-4.82.75.75 0 0 1 .83-.832c1.343.155 2.703.254 4.077.294a.64.64 0 0 0 .657-.642Z" />
|
|
1718
|
+
</svg>`,"question-mark-circle-outline":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
1719
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0zm-9 5.25h.008v.008H12v-.008z"/>
|
|
1720
|
+
</svg>`,"question-mark-circle":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
1721
|
+
<path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm11.378-3.917c-.89-.777-2.366-.777-3.255 0a.75.75 0 0 1-.988-1.129c1.454-1.272 3.776-1.272 5.23 0 1.513 1.324 1.513 3.518 0 4.842a3.75 3.75 0 0 1-.837.552c-.676.328-1.028.774-1.028 1.152v.75a.75.75 0 0 1-1.5 0v-.75c0-1.279 1.06-2.107 1.875-2.502.182-.088.351-.199.503-.331.83-.727.83-1.857 0-2.584ZM12 18a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z" clip-rule="evenodd" />
|
|
1722
|
+
</svg>`,"rectangle-group-outline":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
1723
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 7.125C2.25 6.504 2.754 6 3.375 6h6c.621 0 1.125.504 1.125 1.125v3.75c0 .621-.504 1.125-1.125 1.125h-6a1.125 1.125 0 01-1.125-1.125v-3.75zM14.25 8.625c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v8.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 01-1.125-1.125v-8.25zM3.75 16.125c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v2.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 01-1.125-1.125v-2.25z" />
|
|
1724
|
+
</svg>`,"rocket-launch-outline":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
1725
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M15.59 14.37a6 6 0 0 1-5.84 7.38v-4.8m5.84-2.58a14.98 14.98 0 0 0 6.16-12.12A14.98 14.98 0 0 0 9.631 8.41m5.96 5.96a14.926 14.926 0 0 1-5.841 2.58m-.119-8.54a6 6 0 0 0-7.381 5.84h4.8m2.581-5.84a14.927 14.927 0 0 0-2.58 5.84m2.699 2.7c-.103.021-.207.041-.311.06a15.09 15.09 0 0 1-2.448-2.448 14.9 14.9 0 0 1 .06-.312m-2.24 2.39a4.493 4.493 0 0 0-1.757 4.306 4.493 4.493 0 0 0 4.306-1.758M16.5 9a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z" />
|
|
1726
|
+
</svg>`,"rocket-launch":`<!-- https://heroicons.com/ rocket-launch -->
|
|
1727
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" >
|
|
1728
|
+
<path fill-rule="evenodd" d="M4.606 12.97a.75.75 0 01-.134 1.051 2.494 2.494 0 00-.93 2.437 2.494 2.494 0 002.437-.93.75.75 0 111.186.918 3.995 3.995 0 01-4.482 1.332.75.75 0 01-.461-.461 3.994 3.994 0 011.332-4.482.75.75 0 011.052.134z" clip-rule="evenodd" />
|
|
1729
|
+
<path fill-rule="evenodd" d="M5.752 12A13.07 13.07 0 008 14.248v4.002c0 .414.336.75.75.75a5 5 0 004.797-6.414 12.984 12.984 0 005.45-10.848.75.75 0 00-.735-.735 12.984 12.984 0 00-10.849 5.45A5 5 0 001 11.25c.001.414.337.75.751.75h4.002zM13 9a2 2 0 100-4 2 2 0 000 4z" clip-rule="evenodd" />
|
|
1730
|
+
</svg>`,"save-outline":`<!-- https://www.svgrepo.com/svg/505487/save -->
|
|
1731
|
+
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g stroke-width="0"></g><g stroke-linecap="round" stroke-linejoin="round"></g><g> <path d="M15 20V15H9V20M18 20H6C4.89543 20 4 19.1046 4 18V6C4 4.89543 4.89543 4 6 4H14.1716C14.702 4 15.2107 4.21071 15.5858 4.58579L19.4142 8.41421C19.7893 8.78929 20 9.29799 20 9.82843V18C20 19.1046 19.1046 20 18 20Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> </g></svg>`,"shopping-bag-outline":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
1732
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 10.5V6a3.75 3.75 0 1 0-7.5 0v4.5m11.356-1.993 1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 0 1-1.12-1.243l1.264-12A1.125 1.125 0 0 1 5.513 7.5h12.974c.576 0 1.059.435 1.119 1.007ZM8.625 10.5a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm7.5 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z" />
|
|
1733
|
+
</svg>`,"shopping-bag":`<!-- heroicons -->
|
|
1734
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
1735
|
+
<path fill-rule="evenodd" d="M7.5 6v.75H5.513c-.96 0-1.764.724-1.865 1.679l-1.263 12A1.875 1.875 0 0 0 4.25 22.5h15.5a1.875 1.875 0 0 0 1.865-2.071l-1.263-12a1.875 1.875 0 0 0-1.865-1.679H16.5V6a4.5 4.5 0 1 0-9 0ZM12 3a3 3 0 0 0-3 3v.75h6V6a3 3 0 0 0-3-3Zm-3 8.25a3 3 0 1 0 6 0v-.75a.75.75 0 0 1 1.5 0v.75a4.5 4.5 0 1 1-9 0v-.75a.75.75 0 0 1 1.5 0v.75Z" clip-rule="evenodd" />
|
|
1736
|
+
</svg>`,"sparkles-solid":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
1737
|
+
<path fill-rule="evenodd" d="M9 4.5a.75.75 0 0 1 .721.544l.813 2.846a3.75 3.75 0 0 0 2.576 2.576l2.846.813a.75.75 0 0 1 0 1.442l-2.846.813a3.75 3.75 0 0 0-2.576 2.576l-.813 2.846a.75.75 0 0 1-1.442 0l-.813-2.846a3.75 3.75 0 0 0-2.576-2.576l-2.846-.813a.75.75 0 0 1 0-1.442l2.846-.813A3.75 3.75 0 0 0 7.466 7.89l.813-2.846A.75.75 0 0 1 9 4.5ZM18 1.5a.75.75 0 0 1 .728.568l.258 1.036c.236.94.97 1.674 1.91 1.91l1.036.258a.75.75 0 0 1 0 1.456l-1.036.258c-.94.236-1.674.97-1.91 1.91l-.258 1.036a.75.75 0 0 1-1.456 0l-.258-1.036a2.625 2.625 0 0 0-1.91-1.91l-1.036-.258a.75.75 0 0 1 0-1.456l1.036-.258a2.625 2.625 0 0 0 1.91-1.91l.258-1.036A.75.75 0 0 1 18 1.5ZM16.5 15a.75.75 0 0 1 .712.513l.394 1.183c.15.447.5.799.948.948l1.183.395a.75.75 0 0 1 0 1.422l-1.183.395c-.447.15-.799.5-.948.948l-.395 1.183a.75.75 0 0 1-1.422 0l-.395-1.183a1.5 1.5 0 0 0-.948-.948l-1.183-.395a.75.75 0 0 1 0-1.422l1.183-.395c.447-.15.799-.5.948-.948l.395-1.183A.75.75 0 0 1 16.5 15Z" clip-rule="evenodd" />
|
|
1738
|
+
</svg>`,sparkles:`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" >
|
|
1739
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z" />
|
|
1740
|
+
</svg>`,"table-cells":`<!-- https://heroicons.com/ table-cells -->
|
|
1741
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" >
|
|
1742
|
+
<path fill-rule="evenodd" d="M.99 5.24A2.25 2.25 0 013.25 3h13.5A2.25 2.25 0 0119 5.25l.01 9.5A2.25 2.25 0 0116.76 17H3.26A2.267 2.267 0 011 14.74l-.01-9.5zm8.26 9.52v-.625a.75.75 0 00-.75-.75H3.25a.75.75 0 00-.75.75v.615c0 .414.336.75.75.75h5.373a.75.75 0 00.627-.74zm1.5 0a.75.75 0 00.627.74h5.373a.75.75 0 00.75-.75v-.615a.75.75 0 00-.75-.75H11.5a.75.75 0 00-.75.75v.625zm6.75-3.63v-.625a.75.75 0 00-.75-.75H11.5a.75.75 0 00-.75.75v.625c0 .414.336.75.75.75h5.25a.75.75 0 00.75-.75zm-8.25 0v-.625a.75.75 0 00-.75-.75H3.25a.75.75 0 00-.75.75v.625c0 .414.336.75.75.75H8.5a.75.75 0 00.75-.75zM17.5 7.5v-.625a.75.75 0 00-.75-.75H11.5a.75.75 0 00-.75.75V7.5c0 .414.336.75.75.75h5.25a.75.75 0 00.75-.75zm-8.25 0v-.625a.75.75 0 00-.75-.75H3.25a.75.75 0 00-.75.75V7.5c0 .414.336.75.75.75H8.5a.75.75 0 00.75-.75z" clip-rule="evenodd" />
|
|
1743
|
+
</svg>`,templates:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
|
|
1744
|
+
<path fill-rule="evenodd" d="M4.25 2A2.25 2.25 0 002 4.25v2.5A2.25 2.25 0 004.25 9h2.5A2.25 2.25 0 009 6.75v-2.5A2.25 2.25 0 006.75 2h-2.5zm0 9A2.25 2.25 0 002 13.25v2.5A2.25 2.25 0 004.25 18h2.5A2.25 2.25 0 009 15.75v-2.5A2.25 2.25 0 006.75 11h-2.5zm9-9A2.25 2.25 0 0011 4.25v2.5A2.25 2.25 0 0013.25 9h2.5A2.25 2.25 0 0018 6.75v-2.5A2.25 2.25 0 0015.75 2h-2.5zm0 9A2.25 2.25 0 0011 13.25v2.5A2.25 2.25 0 0013.25 18h2.5A2.25 2.25 0 0018 15.75v-2.5A2.25 2.25 0 0015.75 11h-2.5z" clip-rule="evenodd" />
|
|
1745
|
+
</svg>`,ticket:`<!-- heroicons -->
|
|
1746
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
1747
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M16.5 6v.75m0 3v.75m0 3v.75m0 3V18m-9-5.25h5.25M7.5 15h3M3.375 5.25c-.621 0-1.125.504-1.125 1.125v3.026a2.999 2.999 0 0 1 0 5.198v3.026c0 .621.504 1.125 1.125 1.125h17.25c.621 0 1.125-.504 1.125-1.125v-3.026a2.999 2.999 0 0 1 0-5.198V6.375c0-.621-.504-1.125-1.125-1.125H3.375Z" />
|
|
1748
|
+
</svg>`,"trash-outline":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" >
|
|
1749
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0" />
|
|
1750
|
+
</svg>`,twitter:`<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20">
|
|
1751
|
+
<path stroke="currentColor" d="M12.186 8.672 18.743.947h-2.927l-5.005 5.9-4.44-5.9H0l7.434 9.876-6.986 8.23h2.927l5.434-6.4 4.82 6.4H20L12.186 8.672Zm-2.267 2.671L8.544 9.515 3.2 2.42h2.2l4.312 5.719 1.375 1.828 5.731 7.613h-2.2l-4.699-6.237Z" />
|
|
1752
|
+
</svg>`,"user-circle":`<!-- heroicons -->
|
|
1753
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
1754
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
1755
|
+
</svg>`,"user-solid":`<!-- heroicons -->
|
|
1756
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
1757
|
+
<path fill-rule="evenodd" d="M7.5 6a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM3.751 20.105a8.25 8.25 0 0 1 16.498 0 .75.75 0 0 1-.437.695A18.683 18.683 0 0 1 12 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 0 1-.437-.695Z" clip-rule="evenodd" />
|
|
1758
|
+
</svg>`,user:`<!-- heroicons -->
|
|
1759
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
1760
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z" />
|
|
1761
|
+
</svg>`,users:`<!-- heroicons -->
|
|
1762
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
1763
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z" />
|
|
1764
|
+
</svg>`,"wechat-pay":`<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1765
|
+
<path d="M10.0425 15.8914C9.87678 15.9759 9.68475 15.9928 9.50688 15.9384C9.32901 15.8841 9.17922 15.7627 9.08913 15.6L9.04254 15.4971L7.07304 11.1659C7.06497 11.1139 7.06497 11.0609 7.07304 11.0088C7.07288 10.9615 7.08222 10.9146 7.1005 10.8709C7.11877 10.8272 7.14562 10.7876 7.17946 10.7545C7.21329 10.7214 7.25342 10.6954 7.29748 10.678C7.34154 10.6607 7.38862 10.6523 7.43596 10.6535C7.5129 10.6519 7.588 10.6772 7.64829 10.725L10.01 12.3793C10.1851 12.4964 10.3908 12.5593 10.6015 12.5602C10.7285 12.5609 10.8543 12.5366 10.972 12.4887L21.8562 7.61367C20.7399 6.38076 19.372 5.40176 17.8449 4.74278C16.3179 4.08381 14.6671 3.76021 13.0043 3.79383C7.01779 3.79383 2.16663 7.83467 2.16663 12.8592C2.2017 14.2127 2.56028 15.5382 3.21238 16.7248C3.86449 17.9114 4.79117 18.9246 5.91496 19.6798C6.03454 19.768 6.12378 19.8911 6.17036 20.0322C6.21693 20.1733 6.21854 20.3254 6.17496 20.4674L5.68746 22.3102C5.65782 22.3941 5.63925 22.4815 5.63221 22.5702C5.63117 22.618 5.63983 22.6655 5.65764 22.7099C5.67546 22.7542 5.70208 22.7945 5.73588 22.8283C5.76969 22.8621 5.80999 22.8887 5.85436 22.9066C5.89873 22.9244 5.94624 22.933 5.99404 22.932C6.06674 22.9281 6.13738 22.9065 6.19988 22.8692L8.56154 21.4988C8.73488 21.3926 8.93313 21.3352 9.13679 21.3341C9.24404 21.3341 9.35021 21.3493 9.45096 21.3807C10.6025 21.7057 11.792 21.8703 12.988 21.8682C18.9735 21.8682 23.8322 17.8284 23.8322 12.844C23.8435 11.3574 23.4313 9.89832 22.6438 8.63742L10.1291 15.8438L10.0425 15.8914Z" fill="currentColor"/>
|
|
1766
|
+
</svg>`,"wrench-screwdriver-solid":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
1767
|
+
<path fill-rule="evenodd" d="M12 6.75a5.25 5.25 0 0 1 6.775-5.025.75.75 0 0 1 .313 1.248l-3.32 3.319c.063.475.276.934.641 1.299.365.365.824.578 1.3.64l3.318-3.319a.75.75 0 0 1 1.248.313 5.25 5.25 0 0 1-5.472 6.756c-1.018-.086-1.87.1-2.309.634L7.344 21.3A3.298 3.298 0 1 1 2.7 16.657l8.684-7.151c.533-.44.72-1.291.634-2.309A5.342 5.342 0 0 1 12 6.75ZM4.117 19.125a.75.75 0 0 1 .75-.75h.008a.75.75 0 0 1 .75.75v.008a.75.75 0 0 1-.75.75h-.008a.75.75 0 0 1-.75-.75v-.008Z" clip-rule="evenodd" />
|
|
1768
|
+
<path d="m10.076 8.64-2.201-2.2V4.874a.75.75 0 0 0-.364-.643l-3.75-2.25a.75.75 0 0 0-.916.113l-.75.75a.75.75 0 0 0-.113.916l2.25 3.75a.75.75 0 0 0 .643.364h1.564l2.062 2.062 1.575-1.297Z" />
|
|
1769
|
+
<path fill-rule="evenodd" d="m12.556 17.329 4.183 4.182a3.375 3.375 0 0 0 4.773-4.773l-3.306-3.305a6.803 6.803 0 0 1-1.53.043c-.394-.034-.682-.006-.867.042a.589.589 0 0 0-.167.063l-3.086 3.748Zm3.414-1.36a.75.75 0 0 1 1.06 0l1.875 1.876a.75.75 0 1 1-1.06 1.06L15.97 17.03a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" />
|
|
1770
|
+
</svg>`};var Pt=class extends dr{constructor(e){if(super(e),this.it=N,e.type!==Xi.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===N||e==null)return this._t=void 0,this.it=e;if(e===Ae)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 q0=fr(Pt);var Pn=class extends Pt{};Pn.directiveName="unsafeSVG",Pn.resultType=2;var Z0=fr(Pn);var Sr,Un=class extends Ot($){constructor(){super();d(this,Sr,"");this.icon=""}updated(r){if(super.updated(r),r.has("icon")){let n=N0[this.icon];n&&(g(this,Sr,n),this.requestUpdate())}}render(){return this.icon&&o(this,Sr)?Z0(o(this,Sr)):null}};Sr=new WeakMap,w(Un,"properties",{icon:{type:String}}),w(Un,"styles",K`
|
|
1771
|
+
:host(:not([class])) svg {
|
|
1772
|
+
width: 20px;
|
|
1773
|
+
height: 20px;
|
|
1774
|
+
}
|
|
1775
|
+
:host([class]) svg {
|
|
1776
|
+
width: 100%;
|
|
1777
|
+
height: 100%;
|
|
1778
|
+
}
|
|
1779
|
+
`);customElements.define("m-svg-icon",Un);var gs=class extends Ot($){render(){return h`
|
|
1780
|
+
<svg width="10" height="10" viewBox="0 0 10 10" aria-hidden="true">
|
|
1781
|
+
<g fill-rule="evenodd">
|
|
1782
|
+
<path part="line" stroke="currentColor" fill="currentColor" d="M0 5h7"></path>
|
|
1783
|
+
<path part="tip" stroke="currentColor" fill="transparent" d="M1 1l4 4-4 4"></path>
|
|
1784
|
+
</g>
|
|
1785
|
+
</svg>
|
|
1786
|
+
`}};w(gs,"styles",K`
|
|
1787
|
+
:host {
|
|
1788
|
+
--w-hover-arrow--hovered: 0;
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
[part='line'] {
|
|
1792
|
+
opacity: calc(var(--w-hover-arrow--hovered) * 1);
|
|
1793
|
+
transition: opacity 0.3s ease-in-out;
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
[part='tip'] {
|
|
1797
|
+
transform: translateX(calc(var(--w-hover-arrow--hovered) * 3px));
|
|
1798
|
+
transition: transform 0.3s ease-in-out;
|
|
1799
|
+
}
|
|
1800
|
+
`);customElements.define("w-hover-arrow",gs);var wh=["primary","secondary","black","transparent","gradient","transparent-hover","link","transparent-rounded","dialog-primary","dialog-primary-danger","dialog-secondary","ninja-solid","ninja-outline"],Rn=class extends Ot($){constructor(){super(),this.variant="primary",this.disabled=!1,this.isLoading=!1,this.bgColor="#FCBF0B",this.textColor="black"}renderPrimary(){return h`
|
|
1801
|
+
<span
|
|
1802
|
+
class="group relative inline-block h-auto w-full rounded-full border border-black/20 bg-transparent p-[1px] shadow-[0px_0px_3.13px_0px_#0000001a] duration-200 ease-[cubic-bezier(0.33,1,0.68,1)] disabled:cursor-default disabled:opacity-80 lg:hover:border-transparent lg:hover:shadow-none"
|
|
1803
|
+
?disabled="${this.disabled}">
|
|
1804
|
+
<span
|
|
1805
|
+
part="btn-rainbow-gradient"
|
|
1806
|
+
class="absolute top-1/2 left-1/2 block h-[calc(100%_+_4px)] w-[calc(100%_+_6px)] -translate-x-1/2 -translate-y-1/2 rounded-[80px] bg-transparent bg-cover bg-no-repeat transition-all duration-200 ease-in-out">
|
|
1807
|
+
</span>
|
|
1808
|
+
<span
|
|
1809
|
+
class="to-violet relative flex h-full w-full flex-row items-center justify-center gap-1 rounded-full bg-gradient-to-r from-[#8d00ff] from-40% px-8 py-2 text-center font-sans text-base leading-6 font-medium text-white transition-all ease-[cubic-bezier(0.33,1,0.68,1)] hover:from-[#0a2540] hover:to-[#0a2540] hover:shadow-xl">
|
|
1810
|
+
${this.isLoading?h`<m-svg-icon class="absolute h-5 w-5 stroke-2" icon="loading"></m-svg-icon>`:null}
|
|
1811
|
+
<span class="${this.isLoading?"opacity-0":""} transition-opacity">
|
|
1812
|
+
<slot></slot>
|
|
1813
|
+
</span>
|
|
1814
|
+
</span>
|
|
1815
|
+
</span>
|
|
1816
|
+
`}renderSecondary(){return h`
|
|
1817
|
+
<span
|
|
1818
|
+
class="group inline-block rounded-full border-[0.5px] border-current bg-current px-6 py-1.5 text-center font-sans text-sm leading-6 font-medium transition-[color,opacity,box-shadow] duration-200 ease-[cubic-bezier(0.215,0.61,0.355,1)] hover:opacity-90 hover:shadow-xl disabled:cursor-default disabled:opacity-80"
|
|
1819
|
+
?disabled="${this.disabled}">
|
|
1820
|
+
<span class="flex items-center justify-center gap-3 whitespace-nowrap text-white">
|
|
1821
|
+
${this.isLoading?h`<m-svg-icon class="absolute h-5 w-5 stroke-2" icon="loading"></m-svg-icon>`:null}
|
|
1822
|
+
<span class="${this.isLoading?"opacity-0":""} transition-opacity">
|
|
1823
|
+
<slot></slot>
|
|
1824
|
+
</span>
|
|
1825
|
+
<w-hover-arrow class="group-hover:[--w-hover-arrow--hovered:1]"></w-hover-arrow>
|
|
1826
|
+
</span>
|
|
1827
|
+
</span>
|
|
1828
|
+
`}renderBlack(){return h`
|
|
1829
|
+
<span
|
|
1830
|
+
class="${this.disabled?"pointer-events-none opacity-50":""} inline-flex h-9 items-center justify-center gap-3 rounded-md bg-[#18181A] px-4 py-2 text-sm font-medium whitespace-nowrap text-[#FAFAFA] shadow transition-colors hover:bg-[#18181A]/80">
|
|
1831
|
+
${this.isLoading?h`<m-svg-icon class="h-5 w-5 stroke-2" icon="loading"></m-svg-icon>`:null}
|
|
1832
|
+
<slot></slot>
|
|
1833
|
+
</span>
|
|
1834
|
+
`}renderLink(){return h`
|
|
1835
|
+
<span
|
|
1836
|
+
class="group relative flex items-center justify-center gap-3 font-sans text-sm font-semibold whitespace-nowrap text-black disabled:cursor-default disabled:opacity-80 lg:hover:text-[#8D00FF]"
|
|
1837
|
+
?disabled="${this.disabled}">
|
|
1838
|
+
${this.isLoading?h`<m-svg-icon class="absolute h-5 w-5 stroke-2" icon="loading"></m-svg-icon>`:null}
|
|
1839
|
+
<span class="${this.isLoading?"opacity-0":""} transition-opacity">
|
|
1840
|
+
<slot></slot>
|
|
1841
|
+
</span>
|
|
1842
|
+
<w-hover-arrow class="group-hover:[--w-hover-arrow--hovered:1]"></w-hover-arrow>
|
|
1843
|
+
</span>
|
|
1844
|
+
`}renderTransparent(){return h`
|
|
1845
|
+
<span
|
|
1846
|
+
class="relative inline-block h-auto w-full rounded-full border border-black/20 bg-transparent p-[1px] shadow-[0px_0px_3.13px_0px_#0000001a] duration-200 ease-[cubic-bezier(0.33,1,0.68,1)] lg:hover:shadow-none">
|
|
1847
|
+
<span class="hover:border-violet relative inline-block w-full rounded-full border border-gray-500">
|
|
1848
|
+
<span
|
|
1849
|
+
class="hover:text-violet relative flex h-full w-full flex-row items-center justify-center gap-1 rounded-full bg-transparent px-8 py-[7px] text-center font-sans text-base leading-6 font-medium text-[#0A2540] transition-all ease-[cubic-bezier(0.33,1,0.68,1)] hover:cursor-pointer hover:shadow-xl disabled:cursor-default disabled:opacity-80">
|
|
1850
|
+
${this.isLoading?h`<m-svg-icon class="absolute h-5 w-5 stroke-2" icon="loading"></m-svg-icon>`:null}
|
|
1851
|
+
<span class="${this.isLoading?"opacity-0":""} transition-opacity">
|
|
1852
|
+
<slot></slot>
|
|
1853
|
+
</span>
|
|
1854
|
+
</span>
|
|
1855
|
+
</span>
|
|
1856
|
+
</span>
|
|
1857
|
+
`}renderTransparentRounded(){return h`
|
|
1858
|
+
<span
|
|
1859
|
+
class="inline-block h-12 w-full overflow-hidden rounded-3xl border-[0.5px] border-[#0A254033] bg-[#EEEDF133] p-[2px] shadow-[0px_0px_3.13px_0px_#0000001a] duration-200 ease-[cubic-bezier(0.33,1,0.68,1)]">
|
|
1860
|
+
<span
|
|
1861
|
+
class="lg:hover:border-violet lg:hover:text-violet flex h-full w-full items-center justify-center gap-5 rounded-3xl border border-[#0A2540] bg-transparent py-2 font-sans text-[15px] leading-[18px] font-semibold text-[#0A2540] disabled:cursor-default disabled:opacity-80 lg:text-lg lg:hover:border-2 lg:hover:bg-transparent">
|
|
1862
|
+
${this.isLoading?h`<m-svg-icon class="absolute h-5 w-5 stroke-2" icon="loading"></m-svg-icon>`:null}
|
|
1863
|
+
<span class="${this.isLoading?"opacity-0":""} transition-opacity">
|
|
1864
|
+
<slot></slot>
|
|
1865
|
+
</span>
|
|
1866
|
+
</span>
|
|
1867
|
+
</span>
|
|
1868
|
+
`}renderTransparentHover(){return h`
|
|
1869
|
+
<span
|
|
1870
|
+
class="hover:shadow[#e0e0e033] group relative inline-block w-full overflow-hidden rounded-full border-[0.5px] border-[#EEEDF133] p-[2px] shadow-[0px_0px_3.13px_0px_#0000001a] duration-200 ease-[cubic-bezier(0.33,1,0.68,1)] group-hover:bg-transparent hover:shadow-sm">
|
|
1871
|
+
<span
|
|
1872
|
+
class="absolute -top-[5px] -left-[5px] block h-[calc(100%+10px)] w-[calc(100%+10px)] rounded-[80px] bg-transparent bg-cover bg-no-repeat duration-200 ease-[cubic-bezier(0.33,1,0.68,1)] lg:group-hover:blur-[6px]">
|
|
1873
|
+
</span>
|
|
1874
|
+
<span
|
|
1875
|
+
class="relative flex h-auto w-auto items-center justify-center gap-5 rounded-full border px-6 py-2 font-sans text-base font-semibold text-white duration-200 ease-[cubic-bezier(0.33,1,0.68,1)] disabled:cursor-default disabled:opacity-80 sm:text-[15px] lg:group-hover:border-transparent lg:group-hover:bg-white lg:group-hover:text-black">
|
|
1876
|
+
${this.isLoading?h`<m-svg-icon class="absolute h-5 w-5 stroke-2" icon="loading"></m-svg-icon>`:null}
|
|
1877
|
+
<span class="${this.isLoading?"opacity-0":""} transition-opacity">
|
|
1878
|
+
<slot></slot>
|
|
1879
|
+
</span>
|
|
1880
|
+
|
|
1881
|
+
<!-- right arrow -->
|
|
1882
|
+
<svg width="20" height="19" viewBox="0 0 20 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1883
|
+
<path
|
|
1884
|
+
d="M19 9.49473C19 9.38257 18.9681 9.27259 18.9077 9.17697C18.8474 9.08136 18.761 9.00384 18.6581 8.95299L2.80405 1.12543C2.56474 1.01069 2.29394 0.973353 2.03124 1.01886C1.76854 1.06437 1.5277 1.19035 1.34392 1.37839C1.16014 1.56642 1.04305 1.80665 1.00977 2.06397C0.976486 2.3213 1.02875 2.58222 1.15893 2.80861L5.37636 9.49433L1.15893 16.1914C1.02875 16.4178 0.976486 16.6787 1.00977 16.936C1.04305 17.1933 1.16014 17.4336 1.34392 17.6216C1.5277 17.8096 1.76854 17.9356 2.03124 17.9811C2.29394 18.0266 2.56474 17.9893 2.80405 17.8746L18.6581 10.0365C18.761 9.98563 18.8474 9.9081 18.9077 9.81249C18.9681 9.71687 19 9.6069 19 9.49473ZM19 9.49473L5.37219 9.49433"
|
|
1885
|
+
class="lg:group-hover:stroke-black"
|
|
1886
|
+
stroke="white"
|
|
1887
|
+
stroke-width="1.2"
|
|
1888
|
+
stroke-linecap="round"
|
|
1889
|
+
stroke-linejoin="round" />
|
|
1890
|
+
</svg>
|
|
1891
|
+
</span>
|
|
1892
|
+
</span>
|
|
1893
|
+
`}renderGradient(){return h`
|
|
1894
|
+
<span class="group inline-block rounded-full border border-black/20 p-[1px]">
|
|
1895
|
+
<span
|
|
1896
|
+
class="to-violet hover:from-violet hover:to-violet flex flex-row items-center justify-center gap-1 rounded-full bg-gradient-to-r from-[#8d00ff] from-40% px-8 py-[5px] text-center font-sans text-sm leading-6 font-medium text-white transition-[background-image,box-shadow] hover:cursor-pointer hover:shadow-xl disabled:cursor-default disabled:opacity-80">
|
|
1897
|
+
${this.isLoading?h`<m-svg-icon class="absolute h-5 w-5 stroke-2" icon="loading"></m-svg-icon>`:null}
|
|
1898
|
+
<span class="${this.isLoading?"opacity-0":""} transition-opacity">
|
|
1899
|
+
<slot></slot>
|
|
1900
|
+
</span>
|
|
1901
|
+
</span>
|
|
1902
|
+
</span>
|
|
1903
|
+
`}renderDialogPrimary(){return h`
|
|
1904
|
+
<span class="inline-block rounded-full border border-violet-400/20 p-[1px]">
|
|
1905
|
+
<span
|
|
1906
|
+
class="flex flex-row items-center justify-center gap-1 rounded-full bg-gradient-to-r from-violet-600 to-violet-500 px-8 py-[5px] text-center font-sans text-sm leading-6 font-medium text-white transition-all hover:cursor-pointer hover:from-violet-500 hover:to-violet-500">
|
|
1907
|
+
${this.isLoading?h`<m-svg-icon class="absolute h-5 w-5 stroke-2" icon="loading"></m-svg-icon>`:null}
|
|
1908
|
+
<span class="${this.isLoading?"opacity-0":""} transition-opacity">
|
|
1909
|
+
<slot></slot>
|
|
1910
|
+
</span>
|
|
1911
|
+
</span>
|
|
1912
|
+
</span>
|
|
1913
|
+
`}renderDialogPrimaryDanger(){return h`
|
|
1914
|
+
<span class="inline-block rounded-full border border-red-400/20 p-[1px]">
|
|
1915
|
+
<span
|
|
1916
|
+
class="flex flex-row items-center justify-center gap-1 rounded-full bg-gradient-to-r from-red-600 to-red-500 px-8 py-[5px] text-center font-sans text-sm leading-6 font-medium text-white transition-all hover:cursor-pointer hover:from-red-500 hover:to-red-500">
|
|
1917
|
+
${this.isLoading?h`<m-svg-icon class="absolute h-5 w-5 stroke-2" icon="loading"></m-svg-icon>`:null}
|
|
1918
|
+
<span class="${this.isLoading?"opacity-0":""} transition-opacity">
|
|
1919
|
+
<slot></slot>
|
|
1920
|
+
</span>
|
|
1921
|
+
</span>
|
|
1922
|
+
</span>
|
|
1923
|
+
`}renderDialogSecondary(){return h`
|
|
1924
|
+
<span class="inline-block rounded-full p-[1px]">
|
|
1925
|
+
<span
|
|
1926
|
+
class="hover:text-violet flex flex-row items-center justify-center gap-1 rounded-full bg-neutral-400/10 bg-gradient-to-r px-8 py-[5px] text-center font-sans text-sm leading-6 font-medium transition-all hover:cursor-pointer">
|
|
1927
|
+
${this.isLoading?h`<m-svg-icon class="absolute h-5 w-5 stroke-2" icon="loading"></m-svg-icon>`:null}
|
|
1928
|
+
<span class="${this.isLoading?"opacity-0":""} transition-opacity">
|
|
1929
|
+
<slot></slot>
|
|
1930
|
+
</span>
|
|
1931
|
+
</span>
|
|
1932
|
+
</span>
|
|
1933
|
+
`}renderNinjaSolid(){return h`
|
|
1934
|
+
<span
|
|
1935
|
+
class="text-${this.textColor} inline-flex h-10 items-center justify-center gap-2 rounded-2xl px-4 py-1.5 text-sm font-medium whitespace-nowrap transition-all duration-200 ease-[cubic-bezier(0.33,1,0.68,1)] hover:opacity-80 hover:shadow-md disabled:cursor-default disabled:opacity-50"
|
|
1936
|
+
style="background-color: ${this.bgColor}"
|
|
1937
|
+
?disabled="${this.disabled}">
|
|
1938
|
+
${this.isLoading?h`<m-svg-icon class="text-${this.textColor==="black"?"white":"black"} absolute h-4 w-4 stroke-2" icon="loading"></m-svg-icon>`:null}
|
|
1939
|
+
<span class="${this.isLoading?"opacity-0":""} transition-opacity">
|
|
1940
|
+
<slot></slot>
|
|
1941
|
+
</span>
|
|
1942
|
+
</span>
|
|
1943
|
+
`}renderNinjaOutline(){return h`
|
|
1944
|
+
<span
|
|
1945
|
+
class="inline-flex h-10 items-center justify-center gap-2 rounded-2xl border border-[#ffffff20] bg-transparent px-4 py-1.5 text-sm font-medium whitespace-nowrap text-white transition-all duration-200 ease-[cubic-bezier(0.33,1,0.68,1)] hover:bg-[#ffffff10] disabled:cursor-default disabled:opacity-50"
|
|
1946
|
+
?disabled="${this.disabled}">
|
|
1947
|
+
${this.isLoading?h`<m-svg-icon class="absolute h-4 w-4 stroke-2" style="color: #FCBF0B;" icon="loading"></m-svg-icon>`:null}
|
|
1948
|
+
<span class="${this.isLoading?"opacity-0":""} transition-opacity">
|
|
1949
|
+
<slot></slot>
|
|
1950
|
+
</span>
|
|
1951
|
+
</span>
|
|
1952
|
+
`}render(){switch(fe(wh.includes(this.variant),`invalid variant: ${this.variant}`),this.variant){case"primary":return this.renderPrimary();case"secondary":return this.renderSecondary();case"black":return this.renderBlack();case"transparent":return this.renderTransparent();case"gradient":return this.renderGradient();case"transparent-hover":return this.renderTransparentHover();case"link":return this.renderLink();case"transparent-rounded":return this.renderTransparentRounded();case"dialog-primary":return this.renderDialogPrimary();case"dialog-primary-danger":return this.renderDialogPrimaryDanger();case"dialog-secondary":return this.renderDialogSecondary();case"ninja-solid":return this.renderNinjaSolid();case"ninja-outline":return this.renderNinjaOutline()}}};w(Rn,"styles",K`
|
|
1953
|
+
:host {
|
|
1954
|
+
display: inline-block;
|
|
1955
|
+
line-height: 0;
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1958
|
+
@media (min-width: 1024px) {
|
|
1959
|
+
.group:hover [part='btn-rainbow-gradient'] {
|
|
1960
|
+
background: conic-gradient(
|
|
1961
|
+
from 180deg at 50% 50%,
|
|
1962
|
+
#ffba71 0deg,
|
|
1963
|
+
#bc82f3 45deg,
|
|
1964
|
+
#f5b9eac9 90deg,
|
|
1965
|
+
#8d99ff 135deg,
|
|
1966
|
+
#aa6eeecf 180deg,
|
|
1967
|
+
#ff6778c2 225deg,
|
|
1968
|
+
#ffba71 270deg,
|
|
1969
|
+
#bc82f3 315deg,
|
|
1970
|
+
#ffba71 360deg
|
|
1971
|
+
);
|
|
1972
|
+
filter: blur(6.5px);
|
|
1973
|
+
}
|
|
1974
|
+
}
|
|
1975
|
+
`),w(Rn,"properties",{variant:{type:String},disabled:{type:Boolean},isLoading:{type:Boolean,attribute:"loading"},bgColor:{type:String,attribute:"bg-color"},textColor:{type:String,attribute:"text-color"}});customElements.define("w-button",Rn);var ws=(t,e,r)=>{for(let n of e)if(n[0]===t)return(0,n[1])();return r?.()};var Y,W0,Ba,Ha,G0,K0,J0,X0,za,Er=class Er extends A($){constructor(){super();d(this,Y);this.title="",this.type="star-rating",this.color="#8B5CF6",this._hoverRating=0}render(){return h`
|
|
1976
|
+
<div
|
|
1977
|
+
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}]">
|
|
1978
|
+
<div class="flex flex-col gap-2 p-4">
|
|
1979
|
+
${ws(this.type,[["star-rating",()=>m(this,Y,Ba).call(this)],["binary-vote",()=>m(this,Y,Ha).call(this)],["new-conversation-button",()=>m(this,Y,W0).call(this)]],()=>h`<span class="text-sm text-gray-500">Unsupported input type</span>`)}
|
|
1980
|
+
${this.type==="star-rating"?m(this,Y,Ba).call(this):this.type==="binary-vote"?m(this,Y,Ha).call(this):null}
|
|
1981
|
+
</div>
|
|
1982
|
+
</div>
|
|
1983
|
+
`}};Y=new WeakSet,W0=function(){return h`
|
|
1984
|
+
<button
|
|
1985
|
+
type="button"
|
|
1986
|
+
@click="${()=>this.dispatchEvent(new Er.SubmitEvent({type:"new-conversation-button"}))}">
|
|
1987
|
+
<w-button variant="link">${this.title||"Start a new conversation"}</w-button>
|
|
1988
|
+
</button>
|
|
1989
|
+
`},Ba=function(){return h`
|
|
1990
|
+
${this.title?h`<p class="text-sm font-medium text-gray-700">${this.title}</p>`:null}
|
|
1991
|
+
<div class="flex justify-center gap-1">
|
|
1992
|
+
${[1,2,3,4,5].map(r=>h`
|
|
1993
|
+
<button
|
|
1994
|
+
type="button"
|
|
1995
|
+
@click="${()=>m(this,Y,K0).call(this,r)}"
|
|
1996
|
+
@mouseenter="${()=>m(this,Y,J0).call(this,r)}"
|
|
1997
|
+
@mouseleave="${m(this,Y,X0)}"
|
|
1998
|
+
class="p-1 transition-transform hover:scale-110"
|
|
1999
|
+
aria-label="${r} star${r>1?"s":""}">
|
|
2000
|
+
${m(this,Y,G0).call(this,r)}
|
|
2001
|
+
</button>
|
|
2002
|
+
`)}
|
|
2003
|
+
</div>
|
|
2004
|
+
`},Ha=function(){return h`
|
|
2005
|
+
${this.title?h`<p class="text-sm font-medium text-gray-700">${this.title}</p>`:null}
|
|
2006
|
+
<div class="flex justify-center gap-4">
|
|
2007
|
+
<button
|
|
2008
|
+
type="button"
|
|
2009
|
+
@click="${()=>m(this,Y,za).call(this,"positive")}"
|
|
2010
|
+
class="flex flex-col items-center gap-1 rounded-lg border-2 border-gray-300 p-1 transition-all hover:border-green-400">
|
|
2011
|
+
<svg class="h-6 w-6 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
2012
|
+
<path
|
|
2013
|
+
stroke-linecap="round"
|
|
2014
|
+
stroke-linejoin="round"
|
|
2015
|
+
stroke-width="2"
|
|
2016
|
+
d="M14 10h4.764a2 2 0 011.789 2.894l-3.5 7A2 2 0 0115.263 21h-4.017c-.163 0-.326-.02-.485-.06L7 20m7-10V5a2 2 0 00-2-2h-.095c-.5 0-.905.405-.905.905 0 .714-.211 1.412-.608 2.006L7 11v9m7-10h-2M7 20H5a2 2 0 01-2-2v-6a2 2 0 012-2h2.5" />
|
|
2017
|
+
</svg>
|
|
2018
|
+
</button>
|
|
2019
|
+
<button
|
|
2020
|
+
type="button"
|
|
2021
|
+
@click="${()=>m(this,Y,za).call(this,"negative")}"
|
|
2022
|
+
class="flex flex-col items-center gap-1 rounded-lg border-2 border-gray-300 p-1 transition-all hover:border-red-400">
|
|
2023
|
+
<svg class="h-6 w-6 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
2024
|
+
<path
|
|
2025
|
+
stroke-linecap="round"
|
|
2026
|
+
stroke-linejoin="round"
|
|
2027
|
+
stroke-width="2"
|
|
2028
|
+
d="M10 14H5.236a2 2 0 01-1.789-2.894l3.5-7A2 2 0 018.736 3h4.018a2 2 0 01.485.06l3.76.94m-7 10v5a2 2 0 002 2h.096c.5 0 .905-.405.905-.904 0-.715.211-1.413.608-2.008L17 13V4m-7 10h2m5-10h2a2 2 0 012 2v6a2 2 0 01-2 2h-2.5" />
|
|
2029
|
+
</svg>
|
|
2030
|
+
</button>
|
|
2031
|
+
</div>
|
|
2032
|
+
`},G0=function(r){let n=r<=this._hoverRating;return h`
|
|
2033
|
+
<svg class="${n?"text-yellow-400":"text-gray-300"} h-6 w-6" fill="${n?"currentColor":"none"}" stroke="currentColor" viewBox="0 0 24 24">
|
|
2034
|
+
<path
|
|
2035
|
+
stroke-linecap="round"
|
|
2036
|
+
stroke-linejoin="round"
|
|
2037
|
+
stroke-width="2"
|
|
2038
|
+
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" />
|
|
2039
|
+
</svg>
|
|
2040
|
+
`},K0=function(r){this._hoverRating=0,this.dispatchEvent(new Er.SubmitEvent({type:"star-rating",rating:r}))},J0=function(r){this._hoverRating=r},X0=function(){this._hoverRating=0},za=function(r){this.dispatchEvent(new Er.SubmitEvent({type:"binary-vote",vote:r}))},w(Er,"properties",{title:{type:String},type:{type:String},color:{type:String},_hoverRating:{type:Number,state:!0}});var Vn=Er,Va;Vn.SubmitEvent=(Va=class extends CustomEvent{constructor(e,r={}){super(Vn.SubmitEvent.type,{detail:e,bubbles:!0,composed:!0,...r})}},w(Va,"type","mw-request-input:submit"),Va);customElements.get("mw-request-input")||customElements.define("mw-request-input",Vn);var vs=class extends A($){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 u1(e,r).href}catch{}return e}render(){let{name:e,description:r,price:n,url:i}=this.product||{},s=i?this.imagesByProductUrl?.[i]:void 0;return h`
|
|
1450
2041
|
<a
|
|
1451
|
-
href="${
|
|
1452
|
-
title="${
|
|
2042
|
+
href="${ce(this.trackedProductUrl)}"
|
|
2043
|
+
title="${ce(e)}"
|
|
1453
2044
|
class="group flex w-full max-w-md cursor-pointer gap-[10px] overflow-hidden rounded-lg"
|
|
1454
2045
|
target="${this.linksNewTab?"_blank":"_self"}"
|
|
1455
2046
|
?disabled="${this.streaming}">
|
|
1456
|
-
${this.streaming?
|
|
2047
|
+
${this.streaming?h`
|
|
1457
2048
|
<!-- shimmer -->
|
|
1458
2049
|
<div class="h-[70px] w-[70px] animate-pulse overflow-hidden rounded-lg bg-gray-200"></div>
|
|
1459
|
-
`:
|
|
2050
|
+
`:h`<img src="${ce(s)}" class="block h-[70px] w-[70px] rounded-lg bg-gray-100 object-contain" loading="lazy" />`}
|
|
1460
2051
|
|
|
1461
2052
|
<div class="flex flex-1 flex-col justify-between">
|
|
1462
2053
|
<div>
|
|
1463
|
-
${e||!this.streaming?
|
|
2054
|
+
${e||!this.streaming?h`<h3 class="line-clamp-1 text-sm font-medium group-hover:underline">${e}</h3>`:h`<div class="h-5 w-32 animate-pulse rounded bg-gray-200"></div>`}
|
|
1464
2055
|
|
|
1465
2056
|
<!-- no margin here -->
|
|
1466
2057
|
|
|
1467
|
-
${r||!this.streaming?
|
|
2058
|
+
${r||!this.streaming?h`<p class="line-clamp-2 text-xs text-gray-500">${r}</p>`:h`<div class="my-1 h-6 w-3/4 animate-pulse rounded bg-gray-200"></div>`}
|
|
1468
2059
|
</div>
|
|
1469
2060
|
|
|
1470
2061
|
<!-- flexbox filled space -->
|
|
1471
2062
|
|
|
1472
|
-
${n||!this.streaming?
|
|
2063
|
+
${n||!this.streaming?h`<span class="text-xs text-gray-900">${n}</span>`:h`<div class="h-4 w-14 animate-pulse rounded bg-gray-200"></div>`}
|
|
1473
2064
|
</div>
|
|
1474
2065
|
</a>
|
|
1475
|
-
`}};w(Yi,"properties",{product:{type:Object},streaming:{type:Boolean},linksNewTab:{type:Boolean,attribute:"links-new-tab"},searchParams:{type:Object},imagesByProductUrl:{type:Object}});customElements.get("mw-product-card-horizontal")||customElements.define("mw-product-card-horizontal",Yi);function Qi(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 es=function(){},wr=function(){};var Sn=(t,e,r)=>Math.min(Math.max(r,t),e);var ga=.001,Fd=.01,mu=10,Nd=.05,Hd=1;function gu({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let i,s;es(t<=mu*1e3,"Spring duration must be 10 seconds or less");let o=1-e;o=Sn(Nd,Hd,o),t=Sn(Fd,mu,t/1e3),o<1?(i=c=>{let p=c*o,d=p*t,y=p-r,x=ts(c,o),S=Math.exp(-d);return ga-y/x*S},s=c=>{let d=c*o*t,y=d*r+r,x=Math.pow(o,2)*Math.pow(c,2)*t,S=Math.exp(-d),I=ts(Math.pow(c,2),o);return(-i(c)+ga>0?-1:1)*((y-x)*S)/I}):(i=c=>{let p=Math.exp(-c*t),d=(c-r)*t+1;return-ga+p*d},s=c=>{let p=Math.exp(-c*t),d=(r-c)*(t*t);return p*d});let u=5/t,l=qd(i,s,u);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 zd=12;function qd(t,e,r){let n=r;for(let i=1;i<zd;i++)n=n-t(n)/e(n);return n}function ts(t,e){return t*Math.sqrt(1-e*e)}var Wd=["duration","bounce"],Gd=["stiffness","damping","mass"];function wu(t,e){return e.some(r=>t[r]!==void 0)}function Zd(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!wu(t,Gd)&&wu(t,Wd)){let r=gu(t);e=Object.assign(Object.assign(Object.assign({},e),r),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function rs(t){var{from:e=0,to:r=1,restSpeed:n=2,restDelta:i}=t,s=Qi(t,["from","to","restSpeed","restDelta"]);let o={done:!1,value:e},{stiffness:u,damping:l,mass:c,velocity:p,duration:d,isResolvedFromDuration:y}=Zd(s),x=yu,S=yu;function I(){let C=p?-(p/1e3):0,T=r-e,k=l/(2*Math.sqrt(u*c)),_=Math.sqrt(u/c)/1e3;if(i===void 0&&(i=Math.min(Math.abs(r-e)/100,.4)),k<1){let L=ts(_,k);x=H=>{let Q=Math.exp(-k*_*H);return r-Q*((C+k*_*T)/L*Math.sin(L*H)+T*Math.cos(L*H))},S=H=>{let Q=Math.exp(-k*_*H);return k*_*Q*(Math.sin(L*H)*(C+k*_*T)/L+T*Math.cos(L*H))-Q*(Math.cos(L*H)*(C+k*_*T)-L*T*Math.sin(L*H))}}else if(k===1)x=L=>r-Math.exp(-_*L)*(T+(C+_*T)*L);else{let L=_*Math.sqrt(k*k-1);x=H=>{let Q=Math.exp(-k*_*H),ne=Math.min(L*H,300);return r-Q*((C+k*_*T)*Math.sinh(ne)+L*T*Math.cosh(ne))/L}}}return I(),{next:C=>{let T=x(C);if(y)o.done=C>=d;else{let k=S(C)*1e3,_=Math.abs(k)<=n,L=Math.abs(r-T)<=i;o.done=_&&L}return o.value=o.done?r:T,o},flipTarget:()=>{p=-p,[e,r]=[r,e],I()}}}rs.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";var yu=t=>0;var wa=(t,e,r)=>{let n=e-t;return n===0?1:(r-t)/n};var yr=(t,e,r)=>-r*t+r*e+t;var ns=(t,e)=>r=>Math.max(Math.min(r,e),t),it=t=>t%1?Number(t.toFixed(5)):t,vr=/(-)?([\d]*\.?[\d])+/g,is=/(#[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,vu=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function qe(t){return typeof t=="string"}var br={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},ss=Object.assign(Object.assign({},br),{transform:ns(0,1)}),Vg=Object.assign(Object.assign({},br),{default:1});var $n=t=>({test:e=>qe(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Hg=$n("deg"),xr=$n("%"),zg=$n("px"),qg=$n("vh"),Wg=$n("vw"),Gg=Object.assign(Object.assign({},xr),{parse:t=>xr.parse(t)/100,transform:t=>xr.transform(t*100)});var kr=(t,e)=>r=>!!(qe(r)&&vu.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),os=(t,e,r)=>n=>{if(!qe(n))return n;let[i,s,o,u]=n.match(vr);return{[t]:parseFloat(i),[e]:parseFloat(s),[r]:parseFloat(o),alpha:u!==void 0?parseFloat(u):1}};var Pe={test:kr("hsl","hue"),parse:os("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+xr.transform(it(e))+", "+xr.transform(it(r))+", "+it(ss.transform(n))+")"};var Kd=ns(0,255),as=Object.assign(Object.assign({},br),{transform:t=>Math.round(Kd(t))}),$e={test:kr("rgb","red"),parse:os("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+as.transform(t)+", "+as.transform(e)+", "+as.transform(r)+", "+it(ss.transform(n))+")"};function Jd(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 Cr={test:kr("#"),parse:Jd,transform:$e.transform};var st={test:t=>$e.test(t)||Cr.test(t)||Pe.test(t),parse:t=>$e.test(t)?$e.parse(t):Pe.test(t)?Pe.parse(t):Cr.parse(t),transform:t=>qe(t)?t:t.hasOwnProperty("red")?$e.transform(t):Pe.transform(t)};var bu="${c}",xu="${n}";function Xd(t){var e,r,n,i;return isNaN(t)&&qe(t)&&((r=(e=t.match(vr))===null||e===void 0?void 0:e.length)!==null&&r!==void 0?r:0)+((i=(n=t.match(is))===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0)>0}function ku(t){typeof t=="number"&&(t=`${t}`);let e=[],r=0,n=t.match(is);n&&(r=n.length,t=t.replace(is,bu),e.push(...n.map(st.parse)));let i=t.match(vr);return i&&(t=t.replace(vr,xu),e.push(...i.map(br.parse))),{values:e,numColors:r,tokenised:t}}function Cu(t){return ku(t).values}function Su(t){let{values:e,numColors:r,tokenised:n}=ku(t),i=e.length;return s=>{let o=n;for(let u=0;u<i;u++)o=o.replace(u<r?bu:xu,u<r?st.transform(s[u]):it(s[u]));return o}}var Yd=t=>typeof t=="number"?0:t;function Qd(t){let e=Cu(t);return Su(t)(e.map(Yd))}var ls={test:Xd,parse:Cu,createTransformer:Su,getAnimatableNone:Qd};function ya(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 va({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let i=0,s=0,o=0;if(!e)i=s=o=r;else{let u=r<.5?r*(1+e):r+e-r*e,l=2*r-u;i=ya(l,u,t+1/3),s=ya(l,u,t),o=ya(l,u,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}var e1=(t,e,r)=>{let n=t*t,i=e*e;return Math.sqrt(Math.max(0,r*(i-n)+n))},t1=[Cr,$e,Pe],$u=t=>t1.find(e=>e.test(t)),Eu=t=>`'${t}' is not an animatable color. Use the equivalent color code instead.`,cs=(t,e)=>{let r=$u(t),n=$u(e);wr(!!r,Eu(t)),wr(!!n,Eu(e));let i=r.parse(t),s=n.parse(e);r===Pe&&(i=va(i),r=$e),n===Pe&&(s=va(s),n=$e);let o=Object.assign({},i);return u=>{for(let l in o)l!=="alpha"&&(o[l]=e1(i[l],s[l],u));return o.alpha=yr(i.alpha,s.alpha,u),r.transform(o)}};var _u=t=>typeof t=="number";var r1=(t,e)=>r=>e(t(r)),us=(...t)=>t.reduce(r1);function Au(t,e){return _u(t)?r=>yr(t,e,r):st.test(t)?cs(t,e):xa(t,e)}var ba=(t,e)=>{let r=[...t],n=r.length,i=t.map((s,o)=>Au(s,e[o]));return s=>{for(let o=0;o<n;o++)r[o]=i[o](s);return r}},Iu=(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]=Au(t[i],e[i]));return i=>{for(let s in n)r[s]=n[s](i);return r}};function Mu(t){let e=ls.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 xa=(t,e)=>{let r=ls.createTransformer(e),n=Mu(t),i=Mu(e);return n.numHSL===i.numHSL&&n.numRGB===i.numRGB&&n.numNumbers>=i.numNumbers?us(ba(n.parsed,i.parsed),r):(es(!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 n1=(t,e)=>r=>yr(t,e,r);function i1(t){if(typeof t=="number")return n1;if(typeof t=="string")return st.test(t)?cs:xa;if(Array.isArray(t))return ba;if(typeof t=="object")return Iu}function s1(t,e,r){let n=[],i=r||i1(t[0]),s=t.length-1;for(let o=0;o<s;o++){let u=i(t[o],t[o+1]);if(e){let l=Array.isArray(e)?e[o]:e;u=us(l,u)}n.push(u)}return n}function o1([t,e],[r]){return n=>r(wa(t,e,n))}function a1(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 u=wa(t[s],t[s+1],i);return e[s](u)}}function ps(t,e,{clamp:r=!0,ease:n,mixer:i}={}){let s=t.length;wr(s===e.length,"Both input and output ranges must be the same length"),wr(!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=s1(e,n,i),u=s===2?o1(t,o):a1(t,o);return r?l=>u(Sn(t[0],t[s-1],l)):u}var En=t=>e=>1-t(1-e),hs=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Tu=t=>e=>Math.pow(e,t),ka=t=>e=>e*e*((t+1)*e-t),Lu=t=>{let e=ka(t);return r=>(r*=2)<1?.5*e(r):.5*(2-Math.pow(2,-10*(r-1)))};var ju=1.525,l1=4/11,c1=8/11,u1=9/10;var Ou=Tu(2),J5=En(Ou),Du=hs(Ou),p1=t=>1-Math.sin(Math.acos(t)),h1=En(p1),X5=hs(h1),Uu=ka(ju),Y5=En(Uu),Q5=hs(Uu),ew=Lu(ju),d1=4356/361,f1=35442/1805,m1=16061/1805,g1=t=>{if(t===1||t===0)return t;let e=t*t;return t<l1?7.5625*e:t<c1?9.075*e-9.9*t+3.4:t<u1?d1*e-f1*t+m1:10.8*t*t-20.52*t+10.72},tw=En(g1);function w1(t,e){return t.map(()=>e||Du).splice(0,t.length-1)}function y1(t){let e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function v1(t,e){return t.map(r=>r*e)}function _n({from:t=0,to:e=1,ease:r,offset:n,duration:i=300}){let s={done:!1,value:t},o=Array.isArray(e)?e:[t,e],u=v1(n&&n.length===o.length?n:y1(o),i);function l(){return ps(u,o,{ease:Array.isArray(r)?r:w1(o,r)})}let c=l();return{next:p=>(s.value=c(p),s.done=p>=i,s),flipTarget:()=>{o.reverse(),c=l()}}}function Pu({velocity:t=0,from:e=0,power:r=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:s}){let o={done:!1,value:e},u=r*t,l=e+u,c=s===void 0?l:s(l);return c!==l&&(u=c-e),{next:p=>{let d=-u*Math.exp(-p/n);return o.done=!(d>i||d<-i),o.value=o.done?c:c+d,o},flipTarget:()=>{}}}var Ru={keyframes:_n,spring:rs,decay:Pu};function Bu(t){if(Array.isArray(t.to))return _n;if(Ru[t.type])return Ru[t.type];let e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?_n:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?rs:_n}var Ca=16.666666666666668,b1=typeof performance<"u"?()=>performance.now():()=>Date.now(),Sa=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(b1()),Ca);function Vu(t){let e=[],r=[],n=0,i=!1,s=!1,o=new WeakSet,u={schedule:(l,c=!1,p=!1)=>{let d=p&&i,y=d?e:r;return c&&o.add(l),y.indexOf(l)===-1&&(y.push(l),d&&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 p=e[c];p(l),o.has(p)&&(u.schedule(p),t())}i=!1,s&&(s=!1,u.process(l))}};return u}var x1=40,$a=!0,An=!1,Ea=!1,Mn={delta:0,timestamp:0},In=["read","update","preRender","render","postRender"],ds=In.reduce((t,e)=>(t[e]=Vu(()=>An=!0),t),{}),k1=In.reduce((t,e)=>{let r=ds[e];return t[e]=(n,i=!1,s=!1)=>(An||S1(),r.schedule(n,i,s)),t},{}),Fu=In.reduce((t,e)=>(t[e]=ds[e].cancel,t),{}),mw=In.reduce((t,e)=>(t[e]=()=>ds[e].process(Mn),t),{}),C1=t=>ds[t].process(Mn),Nu=t=>{An=!1,Mn.delta=$a?Ca:Math.max(Math.min(t-Mn.timestamp,x1),1),Mn.timestamp=t,Ea=!0,In.forEach(C1),Ea=!1,An&&($a=!1,Sa(Nu))},S1=()=>{An=!0,$a=!0,Ea||Sa(Nu)};var Hu=k1;function _a(t,e,r=0){return t-e-r}function zu(t,e,r=0,n=!0){return n?_a(e+-t,e,r):e-(t-e)+r}function qu(t,e,r,n){return n?t>=e+r:t<=-r}var $1=t=>{let e=({delta:r})=>t(r);return{start:()=>Hu.update(e,!0),stop:()=>Fu.update(e)}};function Ma(t){var e,r,{from:n,autoplay:i=!0,driver:s=$1,elapsed:o=0,repeat:u=0,repeatType:l="loop",repeatDelay:c=0,onPlay:p,onStop:d,onComplete:y,onRepeat:x,onUpdate:S}=t,I=Qi(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:C}=I,T,k=0,_=I.duration,L,H=!1,Q=!0,ne,P=Bu(I);!((r=(e=P).needsInterpolation)===null||r===void 0)&&r.call(e,n,C)&&(ne=ps([0,100],[n,C],{clamp:!1}),n=0,C=100);let ie=P(Object.assign(Object.assign({},I),{from:n,to:C}));function pe(){k++,l==="reverse"?(Q=k%2===0,o=zu(o,_,c,Q)):(o=_a(o,_,c),l==="mirror"&&ie.flipTarget()),H=!1,x&&x()}function Zs(){T.stop(),y&&y()}function ht(Z){if(Q||(Z=-Z),o+=Z,!H){let se=ie.next(Math.max(0,o));L=se.value,ne&&(L=ne(L)),H=Q?se.done:o<=0}S?.(L),H&&(k===0&&(_??(_=o)),k<u?qu(o,_,c,Q)&&pe():Zs())}function si(){p?.(),T=s(ht),T.start()}return i&&si(),{stop:()=>{d?.(),T.stop()}}}var V,Wu,fs,Gu,ms,Zu,Ku,Ju,gs,ws=class ws extends M($){constructor(){super();h(this,V);this.product=void 0,this.labels={addToCart:"Add to cart",color:"Color",size:"Size"},this._currentImageIndex=0,this._isValidUrl=!1}willUpdate(r){r.has("product")&&m(this,V,Wu).call(this)}get images(){return this.product?.images||[]}render(){if(!this.product)return f`
|
|
2066
|
+
`}};w(vs,"properties",{product:{type:Object},streaming:{type:Boolean},linksNewTab:{type:Boolean,attribute:"links-new-tab"},searchParams:{type:Object},imagesByProductUrl:{type:Object}});customElements.get("mw-product-card-horizontal")||customElements.define("mw-product-card-horizontal",vs);function ys(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 bs=function(){},_r=function(){};var Bn=(t,e,r)=>Math.min(Math.max(r,t),e);var Fa=.001,vh=.01,Y0=10,yh=.05,bh=1;function Q0({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let i,s;bs(t<=Y0*1e3,"Spring duration must be 10 seconds or less");let a=1-e;a=Bn(yh,bh,a),t=Bn(vh,Y0,t/1e3),a<1?(i=c=>{let p=c*a,f=p*t,v=p-r,x=xs(c,a),S=Math.exp(-f);return Fa-v/x*S},s=c=>{let f=c*a*t,v=f*r+r,x=Math.pow(a,2)*Math.pow(c,2)*t,S=Math.exp(-f),T=xs(Math.pow(c,2),a);return(-i(c)+Fa>0?-1:1)*((v-x)*S)/T}):(i=c=>{let p=Math.exp(-c*t),f=(c-r)*t+1;return-Fa+p*f},s=c=>{let p=Math.exp(-c*t),f=(r-c)*(t*t);return p*f});let u=5/t,l=kh(i,s,u);if(t=t*1e3,isNaN(l))return{stiffness:100,damping:10,duration:t};{let c=Math.pow(l,2)*n;return{stiffness:c,damping:a*2*Math.sqrt(n*c),duration:t}}}var xh=12;function kh(t,e,r){let n=r;for(let i=1;i<xh;i++)n=n-t(n)/e(n);return n}function xs(t,e){return t*Math.sqrt(1-e*e)}var Ch=["duration","bounce"],$h=["stiffness","damping","mass"];function ec(t,e){return e.some(r=>t[r]!==void 0)}function Sh(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!ec(t,$h)&&ec(t,Ch)){let r=Q0(t);e=Object.assign(Object.assign(Object.assign({},e),r),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function ks(t){var{from:e=0,to:r=1,restSpeed:n=2,restDelta:i}=t,s=ys(t,["from","to","restSpeed","restDelta"]);let a={done:!1,value:e},{stiffness:u,damping:l,mass:c,velocity:p,duration:f,isResolvedFromDuration:v}=Sh(s),x=tc,S=tc;function T(){let k=p?-(p/1e3):0,M=r-e,C=l/(2*Math.sqrt(u*c)),_=Math.sqrt(u/c)/1e3;if(i===void 0&&(i=Math.min(Math.abs(r-e)/100,.4)),C<1){let L=xs(_,C);x=F=>{let te=Math.exp(-C*_*F);return r-te*((k+C*_*M)/L*Math.sin(L*F)+M*Math.cos(L*F))},S=F=>{let te=Math.exp(-C*_*F);return C*_*te*(Math.sin(L*F)*(k+C*_*M)/L+M*Math.cos(L*F))-te*(Math.cos(L*F)*(k+C*_*M)-L*M*Math.sin(L*F))}}else if(C===1)x=L=>r-Math.exp(-_*L)*(M+(k+_*M)*L);else{let L=_*Math.sqrt(C*C-1);x=F=>{let te=Math.exp(-C*_*F),se=Math.min(L*F,300);return r-te*((k+C*_*M)*Math.sinh(se)+L*M*Math.cosh(se))/L}}}return T(),{next:k=>{let M=x(k);if(v)a.done=k>=f;else{let C=S(k)*1e3,_=Math.abs(C)<=n,L=Math.abs(r-M)<=i;a.done=_&&L}return a.value=a.done?r:M,a},flipTarget:()=>{p=-p,[e,r]=[r,e],T()}}}ks.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";var tc=t=>0;var Na=(t,e,r)=>{let n=e-t;return n===0?1:(r-t)/n};var Mr=(t,e,r)=>-r*t+r*e+t;var Cs=(t,e)=>r=>Math.max(Math.min(r,e),t),st=t=>t%1?Number(t.toFixed(5)):t,Ar=/(-)?([\d]*\.?[\d])+/g,$s=/(#[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,rc=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Ge(t){return typeof t=="string"}var Ir={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ss=Object.assign(Object.assign({},Ir),{transform:Cs(0,1)}),b7=Object.assign(Object.assign({},Ir),{default:1});var Hn=t=>({test:e=>Ge(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),C7=Hn("deg"),Lr=Hn("%"),$7=Hn("px"),S7=Hn("vh"),E7=Hn("vw"),_7=Object.assign(Object.assign({},Lr),{parse:t=>Lr.parse(t)/100,transform:t=>Lr.transform(t*100)});var jr=(t,e)=>r=>!!(Ge(r)&&rc.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),Es=(t,e,r)=>n=>{if(!Ge(n))return n;let[i,s,a,u]=n.match(Ar);return{[t]:parseFloat(i),[e]:parseFloat(s),[r]:parseFloat(a),alpha:u!==void 0?parseFloat(u):1}};var Be={test:jr("hsl","hue"),parse:Es("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+Lr.transform(st(e))+", "+Lr.transform(st(r))+", "+st(Ss.transform(n))+")"};var Eh=Cs(0,255),_s=Object.assign(Object.assign({},Ir),{transform:t=>Math.round(Eh(t))}),_e={test:jr("rgb","red"),parse:Es("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+_s.transform(t)+", "+_s.transform(e)+", "+_s.transform(r)+", "+st(Ss.transform(n))+")"};function _h(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 Tr={test:jr("#"),parse:_h,transform:_e.transform};var ot={test:t=>_e.test(t)||Tr.test(t)||Be.test(t),parse:t=>_e.test(t)?_e.parse(t):Be.test(t)?Be.parse(t):Tr.parse(t),transform:t=>Ge(t)?t:t.hasOwnProperty("red")?_e.transform(t):Be.transform(t)};var nc="${c}",ic="${n}";function Mh(t){var e,r,n,i;return isNaN(t)&&Ge(t)&&((r=(e=t.match(Ar))===null||e===void 0?void 0:e.length)!==null&&r!==void 0?r:0)+((i=(n=t.match($s))===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0)>0}function sc(t){typeof t=="number"&&(t=`${t}`);let e=[],r=0,n=t.match($s);n&&(r=n.length,t=t.replace($s,nc),e.push(...n.map(ot.parse)));let i=t.match(Ar);return i&&(t=t.replace(Ar,ic),e.push(...i.map(Ir.parse))),{values:e,numColors:r,tokenised:t}}function oc(t){return sc(t).values}function ac(t){let{values:e,numColors:r,tokenised:n}=sc(t),i=e.length;return s=>{let a=n;for(let u=0;u<i;u++)a=a.replace(u<r?nc:ic,u<r?ot.transform(s[u]):st(s[u]));return a}}var Ah=t=>typeof t=="number"?0:t;function Ih(t){let e=oc(t);return ac(t)(e.map(Ah))}var Ms={test:Mh,parse:oc,createTransformer:ac,getAnimatableNone:Ih};function qa(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 Za({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let i=0,s=0,a=0;if(!e)i=s=a=r;else{let u=r<.5?r*(1+e):r+e-r*e,l=2*r-u;i=qa(l,u,t+1/3),s=qa(l,u,t),a=qa(l,u,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:n}}var Lh=(t,e,r)=>{let n=t*t,i=e*e;return Math.sqrt(Math.max(0,r*(i-n)+n))},jh=[Tr,_e,Be],lc=t=>jh.find(e=>e.test(t)),cc=t=>`'${t}' is not an animatable color. Use the equivalent color code instead.`,As=(t,e)=>{let r=lc(t),n=lc(e);_r(!!r,cc(t)),_r(!!n,cc(e));let i=r.parse(t),s=n.parse(e);r===Be&&(i=Za(i),r=_e),n===Be&&(s=Za(s),n=_e);let a=Object.assign({},i);return u=>{for(let l in a)l!=="alpha"&&(a[l]=Lh(i[l],s[l],u));return a.alpha=Mr(i.alpha,s.alpha,u),r.transform(a)}};var uc=t=>typeof t=="number";var Th=(t,e)=>r=>e(t(r)),Is=(...t)=>t.reduce(Th);function pc(t,e){return uc(t)?r=>Mr(t,e,r):ot.test(t)?As(t,e):Ga(t,e)}var Wa=(t,e)=>{let r=[...t],n=r.length,i=t.map((s,a)=>pc(s,e[a]));return s=>{for(let a=0;a<n;a++)r[a]=i[a](s);return r}},dc=(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]=pc(t[i],e[i]));return i=>{for(let s in n)r[s]=n[s](i);return r}};function hc(t){let e=Ms.parse(t),r=e.length,n=0,i=0,s=0;for(let a=0;a<r;a++)n||typeof e[a]=="number"?n++:e[a].hue!==void 0?s++:i++;return{parsed:e,numNumbers:n,numRGB:i,numHSL:s}}var Ga=(t,e)=>{let r=Ms.createTransformer(e),n=hc(t),i=hc(e);return n.numHSL===i.numHSL&&n.numRGB===i.numRGB&&n.numNumbers>=i.numNumbers?Is(Wa(n.parsed,i.parsed),r):(bs(!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.`),a=>`${a>0?e:t}`)};var Dh=(t,e)=>r=>Mr(t,e,r);function Oh(t){if(typeof t=="number")return Dh;if(typeof t=="string")return ot.test(t)?As:Ga;if(Array.isArray(t))return Wa;if(typeof t=="object")return dc}function Ph(t,e,r){let n=[],i=r||Oh(t[0]),s=t.length-1;for(let a=0;a<s;a++){let u=i(t[a],t[a+1]);if(e){let l=Array.isArray(e)?e[a]:e;u=Is(l,u)}n.push(u)}return n}function Uh([t,e],[r]){return n=>r(Na(t,e,n))}function Rh(t,e){let r=t.length,n=r-1;return i=>{let s=0,a=!1;if(i<=t[0]?a=!0:i>=t[n]&&(s=n-1,a=!0),!a){let l=1;for(;l<r&&!(t[l]>i||l===n);l++);s=l-1}let u=Na(t[s],t[s+1],i);return e[s](u)}}function Ls(t,e,{clamp:r=!0,ease:n,mixer:i}={}){let s=t.length;_r(s===e.length,"Both input and output ranges must be the same length"),_r(!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 a=Ph(e,n,i),u=s===2?Uh(t,a):Rh(t,a);return r?l=>u(Bn(t[0],t[s-1],l)):u}var zn=t=>e=>1-t(1-e),js=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,fc=t=>e=>Math.pow(e,t),Ka=t=>e=>e*e*((t+1)*e-t),mc=t=>{let e=Ka(t);return r=>(r*=2)<1?.5*e(r):.5*(2-Math.pow(2,-10*(r-1)))};var gc=1.525,Vh=4/11,Bh=8/11,Hh=9/10;var wc=fc(2),Im=zn(wc),vc=js(wc),zh=t=>1-Math.sin(Math.acos(t)),Fh=zn(zh),Lm=js(Fh),yc=Ka(gc),jm=zn(yc),Tm=js(yc),Dm=mc(gc),Nh=4356/361,qh=35442/1805,Zh=16061/1805,Wh=t=>{if(t===1||t===0)return t;let e=t*t;return t<Vh?7.5625*e:t<Bh?9.075*e-9.9*t+3.4:t<Hh?Nh*e-qh*t+Zh:10.8*t*t-20.52*t+10.72},Om=zn(Wh);function Gh(t,e){return t.map(()=>e||vc).splice(0,t.length-1)}function Kh(t){let e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function Jh(t,e){return t.map(r=>r*e)}function Fn({from:t=0,to:e=1,ease:r,offset:n,duration:i=300}){let s={done:!1,value:t},a=Array.isArray(e)?e:[t,e],u=Jh(n&&n.length===a.length?n:Kh(a),i);function l(){return Ls(u,a,{ease:Array.isArray(r)?r:Gh(a,r)})}let c=l();return{next:p=>(s.value=c(p),s.done=p>=i,s),flipTarget:()=>{a.reverse(),c=l()}}}function bc({velocity:t=0,from:e=0,power:r=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:s}){let a={done:!1,value:e},u=r*t,l=e+u,c=s===void 0?l:s(l);return c!==l&&(u=c-e),{next:p=>{let f=-u*Math.exp(-p/n);return a.done=!(f>i||f<-i),a.value=a.done?c:c+f,a},flipTarget:()=>{}}}var xc={keyframes:Fn,spring:ks,decay:bc};function kc(t){if(Array.isArray(t.to))return Fn;if(xc[t.type])return xc[t.type];let e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Fn:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?ks:Fn}var Ja=16.666666666666668,Xh=typeof performance<"u"?()=>performance.now():()=>Date.now(),Xa=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Xh()),Ja);function Cc(t){let e=[],r=[],n=0,i=!1,s=!1,a=new WeakSet,u={schedule:(l,c=!1,p=!1)=>{let f=p&&i,v=f?e:r;return c&&a.add(l),v.indexOf(l)===-1&&(v.push(l),f&&i&&(n=e.length)),l},cancel:l=>{let c=r.indexOf(l);c!==-1&&r.splice(c,1),a.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 p=e[c];p(l),a.has(p)&&(u.schedule(p),t())}i=!1,s&&(s=!1,u.process(l))}};return u}var Yh=40,Ya=!0,qn=!1,Qa=!1,Nn={delta:0,timestamp:0},Zn=["read","update","preRender","render","postRender"],Ts=Zn.reduce((t,e)=>(t[e]=Cc(()=>qn=!0),t),{}),Qh=Zn.reduce((t,e)=>{let r=Ts[e];return t[e]=(n,i=!1,s=!1)=>(qn||tp(),r.schedule(n,i,s)),t},{}),$c=Zn.reduce((t,e)=>(t[e]=Ts[e].cancel,t),{}),Km=Zn.reduce((t,e)=>(t[e]=()=>Ts[e].process(Nn),t),{}),ep=t=>Ts[t].process(Nn),Sc=t=>{qn=!1,Nn.delta=Ya?Ja:Math.max(Math.min(t-Nn.timestamp,Yh),1),Nn.timestamp=t,Qa=!0,Zn.forEach(ep),Qa=!1,qn&&(Ya=!1,Xa(Sc))},tp=()=>{qn=!0,Ya=!0,Qa||Xa(Sc)};var Ec=Qh;function el(t,e,r=0){return t-e-r}function _c(t,e,r=0,n=!0){return n?el(e+-t,e,r):e-(t-e)+r}function Mc(t,e,r,n){return n?t>=e+r:t<=-r}var rp=t=>{let e=({delta:r})=>t(r);return{start:()=>Ec.update(e,!0),stop:()=>$c.update(e)}};function tl(t){var e,r,{from:n,autoplay:i=!0,driver:s=rp,elapsed:a=0,repeat:u=0,repeatType:l="loop",repeatDelay:c=0,onPlay:p,onStop:f,onComplete:v,onRepeat:x,onUpdate:S}=t,T=ys(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:k}=T,M,C=0,_=T.duration,L,F=!1,te=!0,se,R=kc(T);!((r=(e=R).needsInterpolation)===null||r===void 0)&&r.call(e,n,k)&&(se=Ls([0,100],[n,k],{clamp:!1}),n=0,k=100);let oe=R(Object.assign(Object.assign({},T),{from:n,to:k}));function pe(){C++,l==="reverse"?(te=C%2===0,a=_c(a,_,c,te)):(a=el(a,_,c),l==="mirror"&&oe.flipTarget()),F=!1,x&&x()}function fo(){M.stop(),v&&v()}function ft(G){if(te||(G=-G),a+=G,!F){let ae=oe.next(Math.max(0,a));L=ae.value,se&&(L=se(L)),F=te?ae.done:a<=0}S?.(L),F&&(C===0&&(_??(_=a)),C<u?Mc(a,_,c,te)&&pe():fo())}function wi(){p?.(),M=s(ft),M.start()}return i&&wi(),{stop:()=>{f?.(),M.stop()}}}var z,Ac,Ds,Ic,Os,Lc,jc,Tc,Ps,Us=class Us extends A($){constructor(){super();d(this,z);this.product=void 0,this.labels={addToCart:"Add to cart",color:"Color",size:"Size"},this._currentImageIndex=0,this._isValidUrl=!1}willUpdate(r){r.has("product")&&m(this,z,Ac).call(this)}get images(){return this.product?.images||[]}render(){if(!this.product)return h`
|
|
1476
2067
|
<div class="my-2 w-full rounded-3xl border bg-white p-4">
|
|
1477
2068
|
<div class="relative mx-auto mb-4 max-w-[240px]">
|
|
1478
2069
|
<div class="h-[180px] w-full animate-pulse rounded-2xl bg-gray-200"></div>
|
|
@@ -1491,15 +2082,15 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1491
2082
|
<div class="h-8 flex-auto animate-pulse rounded-xl bg-gray-200"></div>
|
|
1492
2083
|
</div>
|
|
1493
2084
|
</div>
|
|
1494
|
-
`;if(this.product.layout==="horizontal")return
|
|
2085
|
+
`;if(this.product.layout==="horizontal")return h` <mw-product-card-horizontal product="${JSON.stringify(this.product)}"></mw-product-card-horizontal> `;let{name:r,description:n,price:i,category:s}=this.product;return h`
|
|
1495
2086
|
<div class="my-2 w-full rounded-3xl border-[0.5px] border-[#5e5d59]/25 bg-white p-4 hover:shadow-sm">
|
|
1496
2087
|
<div class="pointer-events-auto mx-auto mb-4">
|
|
1497
2088
|
<div class="group relative overflow-hidden rounded-2xl">
|
|
1498
2089
|
<div class="image-slider z-0 flex transition-transform duration-300 ease-in-out" style="transform: translateX(-${this._currentImageIndex*100}%)">
|
|
1499
|
-
${this.images.length>0?
|
|
2090
|
+
${this.images.length>0?Ee(this.images,a=>a,(a,u)=>h`
|
|
1500
2091
|
<!-- TODO: add srcset with 1x/2x variants for high DPI displays -->
|
|
1501
|
-
<img src="${
|
|
1502
|
-
`):
|
|
2092
|
+
<img src="${a}" alt="image ${u+1}: ${r}" class="h-auto w-full flex-shrink-0 object-scale-down" loading="lazy" />
|
|
2093
|
+
`):h`
|
|
1503
2094
|
<div class="h-full w-full flex-shrink-0 object-scale-down"></div>
|
|
1504
2095
|
<svg class="rounded-lg" height="144" viewBox="0 0 100 133" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1505
2096
|
<rect width="100" height="133" rx="2" fill="#EEEEEE" style="" transform="matrix(0.9999999999999999, 0, 0, 0.9999999999999999, 0, -7.105427357601002e-15)" />
|
|
@@ -1511,67 +2102,67 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1511
2102
|
</svg>
|
|
1512
2103
|
`}
|
|
1513
2104
|
</div>
|
|
1514
|
-
${this.images.length>1?
|
|
2105
|
+
${this.images.length>1?h`
|
|
1515
2106
|
<div class="absolute inset-0 flex items-center justify-between px-4">
|
|
1516
2107
|
<button
|
|
1517
|
-
@click="${m(this,
|
|
2108
|
+
@click="${m(this,z,jc)}"
|
|
1518
2109
|
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">
|
|
1519
2110
|
<hi-outline class="block h-6 w-3" name="chevron-left"></hi-outline>
|
|
1520
2111
|
</button>
|
|
1521
2112
|
<button
|
|
1522
|
-
@click="${m(this,
|
|
2113
|
+
@click="${m(this,z,Lc)}"
|
|
1523
2114
|
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">
|
|
1524
2115
|
<hi-outline class="block h-6 w-3" name="chevron-right"></hi-outline>
|
|
1525
2116
|
</button>
|
|
1526
2117
|
</div>
|
|
1527
2118
|
`:null}
|
|
1528
|
-
${this.images?.length>1?
|
|
2119
|
+
${this.images?.length>1?h`
|
|
1529
2120
|
<div class="slider-dots absolute bottom-3 left-1/2 flex -translate-x-1/2 gap-2">
|
|
1530
|
-
${this.images.map((
|
|
2121
|
+
${this.images.map((a,u)=>h`
|
|
1531
2122
|
<button
|
|
1532
|
-
@click="${()=>m(this,
|
|
2123
|
+
@click="${()=>m(this,z,Tc).call(this,u)}"
|
|
1533
2124
|
class="${u===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>
|
|
1534
2125
|
`)}
|
|
1535
2126
|
</div>
|
|
1536
2127
|
`:null}
|
|
1537
2128
|
</div>
|
|
1538
2129
|
</div>
|
|
1539
|
-
<div @click="${m(this,
|
|
1540
|
-
${s?
|
|
2130
|
+
<div @click="${m(this,z,Ds)}" class="cursor-pointer">
|
|
2131
|
+
${s?h`<a @click="${m(this,z,Ds)}" class="${this._isValidUrl?"":"pointer-events-none"} line-clamp-1 text-xs text-gray-600 hover:underline"> ${s} </a>`:null}
|
|
1541
2132
|
|
|
1542
2133
|
<h3
|
|
1543
|
-
@click="${m(this,
|
|
2134
|
+
@click="${m(this,z,Ds)}"
|
|
1544
2135
|
class="${this._isValidUrl?"":"pointer-events-none cursor-default"} mb-1 line-clamp-2 cursor-pointer text-lg font-semibold transition-all hover:underline">
|
|
1545
|
-
${r||
|
|
2136
|
+
${r||h`<span class="inline-block h-6 w-32 animate-pulse rounded bg-gray-200"></span>`}
|
|
1546
2137
|
</h3>
|
|
1547
|
-
${n?
|
|
1548
|
-
<span class="text-lg font-bold"> ${i||
|
|
2138
|
+
${n?h`<p class="mb-2 line-clamp-2 text-sm text-gray-600">${n}</p>`:h`<div class="mb-2 h-4 w-3/4 animate-pulse rounded bg-gray-200"></div>`}
|
|
2139
|
+
<span class="text-lg font-bold"> ${i||h`<span class="inline-block h-6 w-16 animate-pulse rounded bg-gray-200"></span>`} </span>
|
|
1549
2140
|
|
|
1550
2141
|
<!-- <div class="my-4 border-t border-gray-200"></div> -->
|
|
1551
2142
|
|
|
1552
2143
|
<!-- <button
|
|
1553
|
-
@click="${m(this,
|
|
2144
|
+
@click="${m(this,z,Ic)}"
|
|
1554
2145
|
?disabled="${!this._isValidUrl}"
|
|
1555
2146
|
class="${this._isValidUrl?"bg-gray-900 hover:bg-gray-800":"bg-gray-900/80 cursor-default"} w-full rounded-xl px-4 py-1.5 text-sm text-white">
|
|
1556
2147
|
${this.labels.addToCart}
|
|
1557
2148
|
</button> -->
|
|
1558
2149
|
</div>
|
|
1559
2150
|
</div>
|
|
1560
|
-
`}};
|
|
2151
|
+
`}};z=new WeakSet,Ac=function(){if(!this.product?.url){this._isValidUrl=!1;return}try{let r=new URL(this.product.url);this._isValidUrl=r.protocol==="http:"||r.protocol==="https:"}catch{this._isValidUrl=!1}},Ds=function(r){r.preventDefault(),!(!this.product?.url||!this._isValidUrl)&&window.open(this.product.url,"_blank")},Ic=function(r){!this.product?.url||!this._isValidUrl||(window.open(this.product.url,"_blank"),this.dispatchEvent(new Us.AddToCartEvent(this.product)))},Os=function(r,n){o(this,z,Ps)&&tl({from:r,to:n,duration:300,onUpdate:i=>{o(this,z,Ps)&&(o(this,z,Ps).style.transform=`translateX(${i}%)`)}})},Lc=function(){if(!this.product?.images?.length)return;let r=this._currentImageIndex,n=(r+1)%this.product.images.length,i=-(r*100),s=-(n*100);m(this,z,Os).call(this,i,s),this._currentImageIndex=n},jc=function(){if(!this.product?.images?.length)return;let r=this._currentImageIndex,n=(r-1+this.product.images.length)%this.product.images.length,i=-(r*100),s=-(n*100);m(this,z,Os).call(this,i,s),this._currentImageIndex=n},Tc=function(r){if(!this.product?.images?.length)return;let n=this._currentImageIndex,i=Math.max(0,Math.min(r,this.product.images.length-1)),s=-(n*100),a=-(i*100);m(this,z,Os).call(this,s,a),this._currentImageIndex=i},Ps=function(){return this.renderRoot.querySelector(".image-slider")},w(Us,"properties",{product:{type:Object},labels:{type:Object},_currentImageIndex:{type:Number,state:!0},_isValidUrl:{type:Boolean,state:!0}});var Wn=Us,rl;Wn.AddToCartEvent=(rl=class extends CustomEvent{constructor(e,r={}){super(Wn.AddToCartEvent.type,{detail:{product:e},...r})}},w(rl,"type","mw-product-card:add-to-cart"),rl);customElements.get("mw-product-card")||customElements.define("mw-product-card",Wn);function Dr(t){return Array.isArray(t)?t:t?[t]:[]}function Dc(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 Rs=class extends A($){constructor(){super(),this.orderDetails=null,this.streaming=!1,this.linksNewTab=!1}render(){let e=Dr(this.orderDetails?.order_status?.step||[]),r=Dr(this.orderDetails?.items?.item||[]),n=Dr(this.orderDetails?.actions||[]);return h`
|
|
1561
2152
|
<div class="flex w-full max-w-md flex-col rounded-3xl border bg-white p-4">
|
|
1562
2153
|
<!-- Header with order ID -->
|
|
1563
2154
|
<div class="mb-2">
|
|
1564
|
-
${this.orderDetails?.order_id?.label||!this.streaming?
|
|
2155
|
+
${this.orderDetails?.order_id?.label||!this.streaming?h`<h2 class="text-lg font-semibold">${this.orderDetails?.order_id?.label} ${this.orderDetails?.order_id?.value}</h2>`:h`<div class="h-7 w-full animate-pulse rounded bg-gray-200"></div>`}
|
|
1565
2156
|
</div>
|
|
1566
2157
|
|
|
1567
2158
|
<!-- Progress Timeline -->
|
|
1568
2159
|
<div>
|
|
1569
2160
|
<ol role="list" class="w-full overflow-hidden">
|
|
1570
|
-
${this.streaming&&!this.orderDetails?
|
|
2161
|
+
${this.streaming&&!this.orderDetails?h`
|
|
1571
2162
|
<!-- Loading for status timeline -->
|
|
1572
|
-
${[1,2,3].map((i,s)=>
|
|
2163
|
+
${[1,2,3].map((i,s)=>h`
|
|
1573
2164
|
<li class="w-full pb-8">
|
|
1574
|
-
${s<2?
|
|
2165
|
+
${s<2?h`<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>`:""}
|
|
1575
2166
|
<div class="group relative flex items-start">
|
|
1576
2167
|
<span class="flex h-6 items-center">
|
|
1577
2168
|
<span class="h-4 w-4 animate-pulse rounded-full bg-gray-200"></span>
|
|
@@ -1582,32 +2173,32 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1582
2173
|
</div>
|
|
1583
2174
|
</li>
|
|
1584
2175
|
`)}
|
|
1585
|
-
`:
|
|
1586
|
-
${l?"":
|
|
2176
|
+
`:Ee(e,i=>i.label,(i,s)=>{let a=i.status==="completed",u=i.status==="in_progress",l=s===e.length-1;return h`<li class="relative pb-4">
|
|
2177
|
+
${l?"":h`<div class="${`absolute left-2 top-2 -ml-px mt-0.5 h-full w-0.5 ${a?"bg-[#601feb]":"bg-gray-300"}`}" aria-hidden="true"></div>`}
|
|
1587
2178
|
|
|
1588
2179
|
<div class="group relative flex items-start">
|
|
1589
|
-
${
|
|
2180
|
+
${ws(i.status,[["pending",()=>h` <span class="flex h-6 items-center">
|
|
1590
2181
|
<span class="flex h-4 w-4 items-center justify-center rounded-full border-2 border-gray-300 bg-white">
|
|
1591
2182
|
<span class="h-1.5 w-1.5 rounded-full bg-transparent"></span>
|
|
1592
2183
|
</span>
|
|
1593
|
-
</span>`],["in_progress",()=>
|
|
2184
|
+
</span>`],["in_progress",()=>h`<span class="flex h-6 items-center">
|
|
1594
2185
|
<span class="flex h-4 w-4 items-center justify-center rounded-full border-2 border-[#601feb] bg-white">
|
|
1595
2186
|
<span class="h-1.5 w-1.5 rounded-full bg-[#601feb]"></span>
|
|
1596
2187
|
</span>
|
|
1597
|
-
</span>`],["completed",()=>
|
|
2188
|
+
</span>`],["completed",()=>h`
|
|
1598
2189
|
<span class="flex h-6 items-center">
|
|
1599
2190
|
<span class="flex h-4 w-4 items-center justify-center rounded-full bg-[#601feb]">
|
|
1600
2191
|
<hi-outline class="mb-3 block h-3 w-3 text-white" name="check"></hi-outline>
|
|
1601
2192
|
</span>
|
|
1602
2193
|
</span>
|
|
1603
|
-
`]],()=>
|
|
2194
|
+
`]],()=>h`<span class="flex h-6 items-center">
|
|
1604
2195
|
<span class="flex h-4 w-4 items-center justify-center rounded-full border-2 border-[#601feb] bg-white">
|
|
1605
2196
|
<span class="h-1.5 w-1.5 rounded-full bg-[#601feb]"></span>
|
|
1606
2197
|
</span>
|
|
1607
2198
|
</span>`)}
|
|
1608
2199
|
|
|
1609
2200
|
<span class="ml-3 flex min-w-0 flex-col">
|
|
1610
|
-
<span class="${`text-sm font-medium ${u?"text-[#601feb]":
|
|
2201
|
+
<span class="${`text-sm font-medium ${u?"text-[#601feb]":a?"text-gray-900":"text-gray-500"}`}"> ${i.label} </span>
|
|
1611
2202
|
</span>
|
|
1612
2203
|
</div>
|
|
1613
2204
|
</li>`})}
|
|
@@ -1616,7 +2207,7 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1616
2207
|
|
|
1617
2208
|
<!-- Products list with order items -->
|
|
1618
2209
|
<div class="mb-2 w-full">
|
|
1619
|
-
${r.length===0&&!this.orderDetails?.total?.amount&&this.streaming?
|
|
2210
|
+
${r.length===0&&!this.orderDetails?.total?.amount&&this.streaming?h`
|
|
1620
2211
|
<!-- Loading shimmer for products -->
|
|
1621
2212
|
<div class="w-full space-y-4">
|
|
1622
2213
|
<div class="flex items-center gap-2">
|
|
@@ -1631,11 +2222,11 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1631
2222
|
<div class="h-4 w-10 animate-pulse rounded bg-gray-200"></div>
|
|
1632
2223
|
</div>
|
|
1633
2224
|
</div>
|
|
1634
|
-
`:
|
|
2225
|
+
`:h`
|
|
1635
2226
|
<div class="divide-y divide-gray-100">
|
|
1636
|
-
${this.streaming&&!r.length?
|
|
2227
|
+
${this.streaming&&!r.length?h`
|
|
1637
2228
|
<!-- Loading shimmer for individual products -->
|
|
1638
|
-
${[1,2].map(()=>
|
|
2229
|
+
${[1,2].map(()=>h`
|
|
1639
2230
|
<div class="flex items-center gap-2 py-1.5">
|
|
1640
2231
|
<div class="h-12 w-12 animate-pulse rounded-lg bg-gray-200"></div>
|
|
1641
2232
|
<div class="min-w-0 flex-1">
|
|
@@ -1644,14 +2235,14 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1644
2235
|
<div class="h-4 w-24 animate-pulse rounded bg-gray-200"></div>
|
|
1645
2236
|
</div>
|
|
1646
2237
|
`)}
|
|
1647
|
-
`:r?.map(i=>{let s=i?.image_url;return
|
|
2238
|
+
`:r?.map(i=>{let s=i?.image_url;return h`
|
|
1648
2239
|
<div class="flex items-center gap-2 py-1.5">
|
|
1649
|
-
<img src="${
|
|
2240
|
+
<img src="${ce(s)}" class="block h-12 w-12 rounded-lg bg-gray-100 object-contain" loading="lazy" />
|
|
1650
2241
|
|
|
1651
2242
|
<div class="min-w-0 flex-1">
|
|
1652
|
-
${!i?.name&&this.streaming?
|
|
2243
|
+
${!i?.name&&this.streaming?h`<div class="h-4 w-32 animate-pulse rounded bg-gray-200"></div>`:h`<h3 class="truncate text-sm font-medium">${i?.name}</h3>`}
|
|
1653
2244
|
</div>
|
|
1654
|
-
${!i?.price&&this.streaming?
|
|
2245
|
+
${!i?.price&&this.streaming?h`<div class="h-4 w-24 animate-pulse rounded bg-gray-200"></div>`:h`<span class="text-sm text-gray-500">${i?.quantity&&Number(i.quantity)>1?"x":""} ${i?.price}</span>`}
|
|
1655
2246
|
</div>
|
|
1656
2247
|
`})}
|
|
1657
2248
|
</div>
|
|
@@ -1667,9 +2258,9 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1667
2258
|
|
|
1668
2259
|
<!-- Shipping and payment information -->
|
|
1669
2260
|
<div class="mb-2 flex w-full flex-col gap-2 overflow-hidden">
|
|
1670
|
-
${this.streaming&&!this.orderDetails?
|
|
2261
|
+
${this.streaming&&!this.orderDetails?h`
|
|
1671
2262
|
<!-- Loading shimmer template -->
|
|
1672
|
-
${[1,2].map(()=>
|
|
2263
|
+
${[1,2].map(()=>h`
|
|
1673
2264
|
<div>
|
|
1674
2265
|
<div class="mb-2 h-5 w-32 animate-pulse rounded bg-gray-200"></div>
|
|
1675
2266
|
<div class="space-y-2 overflow-hidden">
|
|
@@ -1678,10 +2269,10 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1678
2269
|
</div>
|
|
1679
2270
|
</div>
|
|
1680
2271
|
`)}
|
|
1681
|
-
`:
|
|
2272
|
+
`:h`
|
|
1682
2273
|
<!-- Shipping Section -->
|
|
1683
2274
|
<div>
|
|
1684
|
-
${this.streaming&&!this.orderDetails?.shipping?
|
|
2275
|
+
${this.streaming&&!this.orderDetails?.shipping?h`
|
|
1685
2276
|
<div>
|
|
1686
2277
|
<div class="mb-2 h-5 w-32 animate-pulse rounded bg-gray-200"></div>
|
|
1687
2278
|
<div class="space-y-2 overflow-hidden">
|
|
@@ -1689,18 +2280,18 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1689
2280
|
<div class="h-4 w-36 animate-pulse rounded bg-gray-200"></div>
|
|
1690
2281
|
</div>
|
|
1691
2282
|
</div>
|
|
1692
|
-
`:this.orderDetails?.shipping?.method||this.orderDetails?.customer?.name?
|
|
2283
|
+
`:this.orderDetails?.shipping?.method||this.orderDetails?.customer?.name?h`
|
|
1693
2284
|
<h3 class="mb-1 text-sm font-medium">${this.orderDetails?.shipping?.label}</h3>
|
|
1694
2285
|
<div class="space-y-1">
|
|
1695
|
-
${this.orderDetails.customer?.name?
|
|
1696
|
-
${this.orderDetails.shipping?.method?
|
|
2286
|
+
${this.orderDetails.customer?.name?h`<p class="text-xs text-gray-600">${this.orderDetails.customer.name}</p>`:""}
|
|
2287
|
+
${this.orderDetails.shipping?.method?h`<p class="text-xs text-gray-600">${this.orderDetails.shipping.method}</p>`:""}
|
|
1697
2288
|
</div>
|
|
1698
2289
|
`:""}
|
|
1699
2290
|
</div>
|
|
1700
2291
|
|
|
1701
2292
|
<!-- Payment Section -->
|
|
1702
2293
|
<div>
|
|
1703
|
-
${this.streaming&&!this.orderDetails?.payment?
|
|
2294
|
+
${this.streaming&&!this.orderDetails?.payment?h`
|
|
1704
2295
|
<div>
|
|
1705
2296
|
<div class="mb-2 h-5 w-32 animate-pulse rounded bg-gray-200"></div>
|
|
1706
2297
|
<div class="space-y-2 overflow-hidden">
|
|
@@ -1708,15 +2299,15 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1708
2299
|
<div class="h-4 w-36 animate-pulse rounded bg-gray-200"></div>
|
|
1709
2300
|
</div>
|
|
1710
2301
|
</div>
|
|
1711
|
-
`:this.orderDetails?.payment?
|
|
2302
|
+
`:this.orderDetails?.payment?h`
|
|
1712
2303
|
<h3 class="mb-1 text-sm font-medium">${this.orderDetails.payment.label}</h3>
|
|
1713
|
-
${this.orderDetails.payment?.method?.value?
|
|
2304
|
+
${this.orderDetails.payment?.method?.value?h`
|
|
1714
2305
|
<p class="text-xs text-gray-600">
|
|
1715
2306
|
<span class="font-medium">${this.orderDetails.payment.method.label}:</span>
|
|
1716
2307
|
${this.orderDetails.payment.method.value}
|
|
1717
2308
|
</p>
|
|
1718
2309
|
`:""}
|
|
1719
|
-
${this.orderDetails.payment.status?.value?
|
|
2310
|
+
${this.orderDetails.payment.status?.value?h`
|
|
1720
2311
|
<p class="text-xs text-gray-600">
|
|
1721
2312
|
<span class="font-medium">${this.orderDetails.payment.status.label}:</span>
|
|
1722
2313
|
<span>${this.orderDetails.payment.status.value}</span>
|
|
@@ -1729,11 +2320,11 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1729
2320
|
|
|
1730
2321
|
<!-- Action buttons section -->
|
|
1731
2322
|
<div class="flex w-full flex-col gap-2 overflow-hidden">
|
|
1732
|
-
${this.streaming&&!n[0]?.track_order?.label&&!
|
|
2323
|
+
${this.streaming&&!n[0]?.track_order?.label&&!zo(n[0]?.track_order?.tracking_url||"")?h`
|
|
1733
2324
|
<!-- Loading shimmer for buttons -->
|
|
1734
2325
|
<div class="h-10 w-full min-w-[250px] animate-pulse overflow-hidden rounded-xl bg-gray-200"></div>
|
|
1735
|
-
`:
|
|
1736
|
-
${
|
|
2326
|
+
`:Ee(n,(i,s)=>`action-${s}`,i=>{if(i?.track_order?.label)return h`
|
|
2327
|
+
${zo(i.track_order?.tracking_url||"")?h` <a
|
|
1737
2328
|
target="${this.linksNewTab?"_blank":"_self"}"
|
|
1738
2329
|
href="${i.track_order?.tracking_url}"
|
|
1739
2330
|
class="mt-1 w-full rounded-xl bg-[#601feb] px-4 py-2 text-center text-sm font-medium text-white hover:opacity-90"
|
|
@@ -1742,25 +2333,36 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1742
2333
|
`})}
|
|
1743
2334
|
</div>
|
|
1744
2335
|
</div>
|
|
1745
|
-
`}};w(
|
|
1746
|
-
${u?
|
|
2336
|
+
`}};w(Rs,"properties",{orderDetails:{type:Object,attribute:"order-details"},streaming:{type:Boolean},linksNewTab:{type:Boolean,attribute:"links-new-tab"}});customElements.get("mw-product-order-status-card")||customElements.define("mw-product-order-status-card",Rs);var Oc=b1(qe({name:Q(),description:Q(),price:Q(),image_url:ar([Q(),sr(Q())]),category:Q(),url:Q()}));function Pc(t,e,r,{imagesByProductUrl:n,linksNewTab:i=!0,searchParams:s,messageIsStreaming:a=!1}){if(!t)return h``;let u=e>0&&r[e-1]&&"data"in r[e-1],l=e<r.length-1||!a;if("text"in t)return h`<p>${t.text}</p>`;if("html"in t)return h`${q0(t.html)}`;if("data"in t)switch(t.tag){case"product-card":case"product-card-v1":case"product-card-horizontal":{let c=mn(Oc,t.data);if(c.success){let p={...c.output,images:[]};return p.images=Dr(p.image_url),h`
|
|
2337
|
+
${u?h`<div class="my-3 w-full border-t border-gray-200/50"></div>`:null}
|
|
1747
2338
|
<mw-product-card-horizontal
|
|
1748
2339
|
product="${JSON.stringify(p)}"
|
|
1749
2340
|
?streaming="${!l}"
|
|
1750
2341
|
?links-new-tab="${i}"
|
|
1751
2342
|
.searchParams="${s}"
|
|
1752
2343
|
.imagesByProductUrl="${n}"></mw-product-card-horizontal>
|
|
1753
|
-
`}console.warn(c.issues);break}case"order-status-card-v1":return
|
|
2344
|
+
`}console.warn(c.issues);break}case"order-status-card-v1":return h`<mw-product-order-status-card order-details="${JSON.stringify(t.data)}" ?streaming="${!l}" ?links-new-tab="${i}"></mw-product-order-status-card> `;case"request-input-v1":return h``}return console.warn("could not render part:",t),h`<p><i>data type not supported</i></p>`}var Gn,Or,at,Ut,Bs,Uc,Vs=class{constructor(e,r,{timeoutMs:n=2e3}={}){d(this,Bs);d(this,Gn);d(this,Or);d(this,at);d(this,Ut,!1);w(this,"timeoutMs");g(this,Gn,e),g(this,Or,r),this.timeoutMs=n,e.addController(this)}get isTyping(){return o(this,Ut)}hostDisconnected(){clearTimeout(o(this,at)),g(this,at,void 0)}onInput(e){if(o(this,Gn).isConnected){if(!e.trim()){this.typingStopped();return}clearTimeout(o(this,at)),g(this,at,setTimeout(()=>this.typingStopped(),this.timeoutMs)),o(this,Ut)||m(this,Bs,Uc).call(this)}}typingStopped(){clearTimeout(o(this,at)),g(this,Ut,!1),o(this,Or).typingStopped()}};Gn=new WeakMap,Or=new WeakMap,at=new WeakMap,Ut=new WeakMap,Bs=new WeakSet,Uc=function(){g(this,Ut,!0),o(this,Or).typingStarted()};function Rc(t,e="en-US"){let r=new Intl.DateTimeFormat(e,{hour:"numeric",minute:"numeric"}).format(t);return`${t.toLocaleDateString(e,{year:"numeric",month:"short",day:"numeric"})}, ${r}`}var Rt,Kn,lt,Vt,zs,Vc,Hs=class{constructor(e,r,n){d(this,zs);d(this,Rt);d(this,Kn);d(this,lt);d(this,Vt);w(this,"isLoading",!1);w(this,"data");g(this,Rt,e),g(this,Kn,r),g(this,lt,n),e.addController(this)}fetch(){if(this.isLoading)return;o(this,Vt)?.abort();let e=new AbortController;g(this,Vt,e),this.isLoading=!0,this.data=void 0,o(this,Rt).requestUpdate(),(async()=>{let r=m(this,zs,Vc).call(this);return r.signal?.addEventListener("abort",()=>e.abort(),{signal:e.signal}),fetch(r,{signal:e.signal})})().then(async r=>{if(!r.ok)throw new Error(`${r.statusText}: ${await r.text()}`);this.isLoading=!1,this.data=typeof o(this,lt)?.transform=="function"?await o(this,lt).transform(r):r,o(this,Rt).requestUpdate()}).catch(r=>{o(this,lt)?.onError?.(r),this.isLoading=!1,this.data=void 0,o(this,Rt).requestUpdate()}).finally(()=>{e.abort()})}hostConnected(){this.isLoading||o(this,lt)?.fetchWhenConnected&&this.fetch()}hostDisconnected(){o(this,Vt)?.abort(),g(this,Vt,void 0)}};Rt=new WeakMap,Kn=new WeakMap,lt=new WeakMap,Vt=new WeakMap,zs=new WeakSet,Vc=function(){let e=o(this,Kn);if(typeof e=="function"&&(e=e()),!e)throw new Error("missing request");return new Request(e)};var ct,He,il,Jn,nl=class{constructor(e=window.localStorage){d(this,He);d(this,ct);g(this,ct,e)}setex(e,r,n){return o(this,ct).setItem(e,m(this,He,Jn).call(this,{value:m(this,He,Jn).call(this,r),expiresAt:Date.now()+n*1e3})||"")}set(e,r){return o(this,ct).setItem(e,m(this,He,Jn).call(this,{value:m(this,He,Jn).call(this,r)})||"")}get(e){let r=o(this,ct).getItem(e);if(!r)return;let n=m(this,He,il).call(this,r);if(n){if(n.expiresAt&&n.expiresAt<Date.now()){o(this,ct).removeItem(e);return}return m(this,He,il).call(this,n.value)}}get molin_shop_assistant_distinct_id(){return localStorage.getItem("molin_shop_assistant_distinct_id")}set molin_shop_assistant_distinct_id(e){e===null?localStorage.removeItem("molin_shop_assistant_distinct_id"):localStorage.setItem("molin_shop_assistant_distinct_id",e)}get molin_widget_open_state(){return xe.get("molin-shop-ai-widget-open")??null}set molin_widget_open_state(e){xe.set("molin-shop-ai-widget-open",e)}resetWidgetData(){xe.molin_shop_assistant_distinct_id=null,xe.molin_widget_open_state=null}};ct=new WeakMap,He=new WeakSet,il=function(e){if(!(typeof e!="string"||e===""))try{return JSON.parse(e)}catch{return}},Jn=function(e){if(e!==void 0)try{return JSON.stringify(e)}catch{return}};var xe=new nl;function Bc(t){t?.body?.cancel().catch(console.warn)}var ue,Ke,Fs,Xn,Pr,sl=class{constructor(){d(this,ue,[]);d(this,Ke);d(this,Fs,10);d(this,Xn,5e3);d(this,Pr,!1)}async add(e,r){if(o(this,ue).push(Fc(e,r)),o(this,ue).length>=o(this,Fs))return this.flush();o(this,Ke)||g(this,Ke,setTimeout(()=>{this.flush().catch(console.error)},o(this,Xn)))}async flush(){if(o(this,Pr)||o(this,ue).length===0)return;let e=[...o(this,ue)];try{g(this,Pr,!0),clearTimeout(o(this,Ke)),g(this,Ke,void 0),g(this,ue,[]);let r=new AbortController,n=setTimeout(()=>r.abort(),5e3);await zc(e,{signal:r.signal}),clearTimeout(n)}catch(r){if(r.name==="AbortError")console.error("Request timed out, retrying events"),g(this,ue,[...e,...o(this,ue)]);else{console.error("Failed to send events to backend:",r);let n=e.filter(i=>i.event.includes("error"));g(this,ue,[...n,...o(this,ue)])}}finally{g(this,Pr,!1),o(this,ue).length>0&&!o(this,Ke)&&g(this,Ke,setTimeout(()=>{this.flush().catch(console.error)},o(this,Xn)))}}async flushBeforeUnload(){if(o(this,ue).length>0)try{let e=new FormData;e.set("events",JSON.stringify(o(this,ue))),navigator.sendBeacon(new URL("/widgets/data/collect",Nc()).href,e)}catch(e){console.error("Failed to send final events:",e)}}};ue=new WeakMap,Ke=new WeakMap,Fs=new WeakMap,Xn=new WeakMap,Pr=new WeakMap;var Hc=new sl;window.addEventListener("beforeunload",()=>{Hc.flushBeforeUnload().catch(console.error)});async function Z(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"&&sp("molin_link_click",e),r?.immediate){await zc([Fc(t,e)]);return}else return Hc.add(t,e)}catch(n){console.error("Failed to send event:",n)}}async function zc(t,{signal:e}={}){let r=new FormData;r.set("events",JSON.stringify(t));let n=await fetch(new URL("/widgets/data/collect",Nc()),{method:"POST",body:r,signal:e});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);Bc(n)}function Fc(t,e){return{event:t,widget_id:e.widgetId,properties:Object.assign({},e,ip()),distinct_id:np(),timestamp:new Date().toISOString()}}function np(){try{let t=xe.molin_shop_assistant_distinct_id;return t||(t=crypto.randomUUID(),xe.molin_shop_assistant_distinct_id=t),t}catch(t){console.error("Failed to deserialize distinct_id:",t);let e=crypto.randomUUID();try{xe.molin_shop_assistant_distinct_id=e}catch(r){console.error("Failed to store new distinct_id:",r)}return e}}function ip(){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 Nc(){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 sp(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 ut(){return window.molinSettings&&typeof window.molinSettings=="object"?window.molinSettings:null}var Ns,ei,qs,Je,Zc,Yn,Qn=class Qn extends A($){constructor(){super();d(this,Je);d(this,Ns,new ht(this,{onError:console.error}));d(this,ei);d(this,qs,{onError:r=>{alert(r.error),console.error(r.widgetId,r.error),Z("ShopAssistant: error",{...r},{immediate:!0})},onNewMessageStartedStreaming:r=>{Z("ShopAssistant: user received bot message (streaming started)",r)},onMessageEndedStreaming:r=>{Z("ShopAssistant: user received bot message (streaming ended)",r)},onUserCanceledStreaming:r=>{Z("ShopAssistant: user canceled streaming",r)},onUserClickedLink:r=>{Z("ShopAssistant: user clicked link",r)},onUserSentInput:r=>{Z("ShopAssistant: user sent input",r)}});this.cdn="https://widget.molin.ai",this.widgetId="",this.showClose=!1,this.xUserData=ut()?.userData,this.xCustomInstructions=ut()?.customInstructions}get config(){return o(this,ei)||o(this,Ns).data}render(){return this.config?h`
|
|
2345
|
+
<mw-context-widget .widgetId="${this.widgetId}" .config="${this.config}" .callbacks="${o(this,qs)}" .xUserData="${this.xUserData}" .xCustomInstructions="${this.xCustomInstructions}">
|
|
2346
|
+
<!-- embed our chat component forwarding props -->
|
|
2347
|
+
<mw-chat ?show-close="${this.showClose}" @mw:close-click="${m(this,Je,Zc)}">
|
|
2348
|
+
<slot name="banner" slot="banner"></slot>
|
|
2349
|
+
</mw-chat>
|
|
2350
|
+
</mw-context-widget>
|
|
2351
|
+
`:null}injectConfig(r){g(this,ei,r),this.requestUpdate()}reloadConfig(){o(this,Je,Yn)?.reloadConfig()}reset(){this.xUserData={},this.xCustomInstructions="",o(this,Je,Yn)?.reset(),this.requestUpdate()}get conversationId(){return o(this,Je,Yn)?.conversationId??""}get messages(){return o(this,Je,Yn)?.messages??[]}};Ns=new WeakMap,ei=new WeakMap,qs=new WeakMap,Je=new WeakSet,Zc=function(){this.dispatchEvent(new Qn.CloseClickEvent)},Yn=function(){return this.renderRoot.querySelector("mw-chat")},w(Qn,"styles",K`
|
|
2352
|
+
:host {
|
|
2353
|
+
all: initial; /* reset all properties that can pierce the shadow DOM */
|
|
2354
|
+
}
|
|
2355
|
+
`),w(Qn,"properties",{cdn:{type:String},widgetId:{type:String,attribute:"widget"},showClose:{type:Boolean,attribute:"show-close"},xUserData:{type:Object,attribute:!1},xCustomInstructions:{type:String,attribute:!1}});var Bt=Qn;customElements.get("molin-shop-ai-chat")||customElements.define("molin-shop-ai-chat",Bt);var ol;Bt.CloseClickEvent=(ol=class extends CustomEvent{constructor(e={}){super(Bt.CloseClickEvent.type,{...e})}},w(ol,"type","mw:close-click"),ol);var al=class{constructor({hidden:e=!1}){w(this,"hidden");this.hidden=e}setUserData(e){for(let r of document.querySelectorAll("molin-shop-ai"))e?r.setAttribute("user-data",JSON.stringify(e)):r.removeAttribute("user-data");for(let r of document.querySelectorAll("molin-shop-ai-chat"))e?r.setAttribute("user-data",JSON.stringify(e)):r.removeAttribute("user-data")}setCustomInstructions(e){for(let r of document.querySelectorAll("molin-shop-ai"))e?r.setAttribute("custom-instructions",e):r.removeAttribute("custom-instructions");for(let r of document.querySelectorAll("molin-shop-ai-chat"))e?r.setAttribute("custom-instructions",e):r.removeAttribute("custom-instructions")}showLauncher(){for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof Te&&e.showLauncher()}hideLauncher(){for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof Te&&e.hideLauncher()}openChat(e){let{message:r,autoSend:n}=e||{};for(let i of document.querySelectorAll("molin-shop-ai"))i instanceof Te&&i.openChat({message:r,autoSend:n})}closeChat(){for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof Te&&e.closeChat()}reset(){xe.resetWidgetData();for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof Te&&e.reset();for(let e of document.querySelectorAll("molin-shop-ai-chat"))e instanceof Bt&&e.reset()}};function Wc({hidden:t}){let e=new al({hidden:t});return window.Molin=e,e}function Zs(){let t=window.Molin;if(!t)throw new Error("window.Molin global not initialized");return t}window.__INIT_MOLIN_SHOP_AI=function(e){op(e);let r=ut(),n=typeof r?.hidden=="boolean"?r.hidden:window.self!==window.top;if(Wc({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 op(t){window.__INIT_MOLIN_SHOP_AI_OPTIONS=t}function Gc(){return window.__INIT_MOLIN_SHOP_AI_OPTIONS}var Me,ti,Ur,Rr,ht=class{constructor(e,r){d(this,Me);d(this,ti);d(this,Ur);d(this,Rr);g(this,Me,e),g(this,ti,r),e.addController(this)}get data(){return o(this,Rr)||o(this,Ur)?.data}hostConnected(){if(o(this,Ur)||o(this,Rr))return;let e=Gc();e&&e.widgetId===o(this,Me).widgetId?g(this,Rr,e.config):g(this,Ur,new Hs(o(this,Me),()=>{if(o(this,Me).cdn&&o(this,Me).widgetId)return`${o(this,Me).cdn}/config?w=${o(this,Me).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:o(this,Me).cdn,widgetId:o(this,Me).widgetId,config:n}),n},onError:o(this,ti)?.onError}))}};Me=new WeakMap,ti=new WeakMap,Ur=new WeakMap,Rr=new WeakMap;function Kc(){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"}var ap="\xB7 \xB7 \xB7",lp=["star-rating","binary-vote","new-conversation-button"],j,De,ii,he,Vr,Gs,D,Jc,Xc,Yc,Qc,eu,Ws,tu,cl,cp,ru,nu,iu,ri,su,up,Ht,Ks=class Ks extends A($){constructor(){super();d(this,D);d(this,j,M1(this));d(this,De,[]);d(this,ii,new Vs(this,{typingStarted:()=>o(this,j).value?.sendUserTypingStart(),typingStopped:()=>o(this,j).value?.sendUserTypingStop()}));d(this,he,new is(this,{onImageDelete:r=>{if(!o(this,j).value){console.warn("widget context not available, cannot delete image");return}o(this,j).value.sendImageDelete(r),o(this,D,Ht)?.focus()},uploadUrl:new URL("/v1/uploads",Kc()).href}));d(this,Vr,"single");d(this,Gs,r=>{let n=r,{pendingImages:i}=n.detail;Array.isArray(i)&&o(this,he).restoreImages(i)});this.showClose=!1,this._currentRequestInputIndex=0}get conversationId(){return o(this,j).value?.conversationId||""}get messages(){return o(this,j).value?.messages||[]}get config(){return o(this,j).value?.config}get callbacks(){return o(this,j).value?.callbacks||{}}get widgetId(){return o(this,j).value?.widgetId||""}get typingIndicator(){return o(this,j).value?.typingIndicator}get isStreaming(){return o(this,j).value?.isStreaming}get ranOutOfCredits(){return o(this,j).value?.ranOutOfCredits}get isLiveMode(){return o(this,j).value?.isLiveMode}get lastMsg(){return o(this,j).value?.lastMsg}get hasQueuedMessages(){return o(this,j).value?.hasQueuedMessages}firstUpdated(){document.addEventListener("mw-context-widget:connected",o(this,Gs),{once:!0})}updated(){o(this,j).value?.widgetId&&o(this,he).updateUploadOptions({conversationId:this.conversationId,widgetId:o(this,j).value?.widgetId,enabled:this.config?.enableImageUpload})}render(){fe(this.config,"config is required");let r=Dc(this.messages,n=>{try{let i=new Date(n.timestamp),s=Math.floor(i.getUTCMinutes()/5)*5;return i.setUTCMinutes(s,0,0),i.valueOf().toString()}catch(i){console.error(i)}});return h`
|
|
1754
2356
|
<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]">
|
|
1755
2357
|
<div
|
|
1756
2358
|
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]">
|
|
1757
2359
|
<mw-chat-header
|
|
1758
2360
|
class="absolute top-1.5 right-1.5 left-1.5"
|
|
1759
2361
|
.content="${{logoUrl:this.config.logoUrl,title:this.config.title,color:this.config.color}}"
|
|
1760
|
-
?show-new-chat="${!this.isLiveMode&&this.messages.length>0}"
|
|
2362
|
+
?show-new-chat="${!this.isLiveMode&&this.messages.length>0&&!o(this,D,su)}"
|
|
1761
2363
|
?show-close="${this.showClose}"
|
|
1762
|
-
@mw:new-chat-click="${m(this,
|
|
1763
|
-
@mw:close-click="${m(this,
|
|
2364
|
+
@mw:new-chat-click="${m(this,D,Ws)}"
|
|
2365
|
+
@mw:close-click="${m(this,D,tu)}">
|
|
1764
2366
|
</mw-chat-header>
|
|
1765
2367
|
|
|
1766
2368
|
<!-- used by the dashboard to inject content -->
|
|
@@ -1769,7 +2371,7 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1769
2371
|
</div>
|
|
1770
2372
|
|
|
1771
2373
|
<!-- drag overlay -->
|
|
1772
|
-
${this.config.enableImageUpload&&
|
|
2374
|
+
${this.config.enableImageUpload&&o(this,he).isDragging?h`
|
|
1773
2375
|
<div class="bg-opacity-90 absolute inset-0 z-50 flex items-center justify-center bg-white sm:rounded-[30px]">
|
|
1774
2376
|
<div class="p-8 text-center">
|
|
1775
2377
|
<lucide-icon name="image-plus" class="mx-auto mb-4 h-12 w-12 text-blue-500"></lucide-icon>
|
|
@@ -1781,8 +2383,8 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1781
2383
|
|
|
1782
2384
|
<!-- this structure of 2 divs is required for the browser native stick/scroll to bottom -->
|
|
1783
2385
|
<div id="scrollable-content" class="mt-6 flex h-full flex-shrink flex-grow flex-col-reverse overflow-auto">
|
|
1784
|
-
${this.config.enableImageUpload&&
|
|
1785
|
-
${this.config?.showStillLearningBanner?
|
|
2386
|
+
${this.config.enableImageUpload&&o(this,he).error?h`<mw-info-banner variant="error" text="${o(this,he).error}" auto-dismissable></mw-info-banner> `:null}
|
|
2387
|
+
${this.config?.showStillLearningBanner?h`<mw-info-banner variant="info" text="I'm still learning!"></mw-info-banner>`:h`
|
|
1786
2388
|
<!-- this makes the chat stick to bottom when the banner is hidden -->
|
|
1787
2389
|
<div class="flex p-1"></div>
|
|
1788
2390
|
`}
|
|
@@ -1790,25 +2392,25 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1790
2392
|
<!-- the padding at the top makes empty room at the top when scrolling and content is hidden behind header -->
|
|
1791
2393
|
<!-- this is the 2nd (inner) div that will natively stick/scroll to bottom -->
|
|
1792
2394
|
<div class="${this.messages.length>0?"pt-20":""}">
|
|
1793
|
-
${
|
|
1794
|
-
<div class="my-2 text-center text-xs text-gray-500">${
|
|
1795
|
-
${
|
|
1796
|
-
${s.images?
|
|
2395
|
+
${Ee(Array.from(r),([n])=>n,([n,i])=>h`
|
|
2396
|
+
<div class="my-2 text-center text-xs text-gray-500">${Rc(new Date(Number(n)),window.navigator.language)}</div>
|
|
2397
|
+
${Ee(i??[],s=>s.id,(s,a)=>{let l=i[a+1]?.role===s.role,p=(a>0?i[a-1]:void 0)?.role===s.role,v=(i.length>0?i[i.length-1]:void 0)?.id===s.id;g(this,Vr,v&&!p&&!l?"single-current":!p&&!l?"single":!p&&l?"first":v&&p&&!l?"last-current":p&&!l?"last":p&&l?"middle":"single");let S=this.isLiveMode&&s.role==="user"&&s.id===this.lastMsg?.id?"sent":"",T=(s.content.includes("<request-input-v1>")||!s.content)&&s.parts?.every(k=>"data"in k&&k.tag==="request-input-v1");return h`
|
|
2398
|
+
${s.images?Ee(s.images,k=>k,k=>h`
|
|
1797
2399
|
<div data-id="${s.id}" class="${l?"mb-[1px]":"mb-3"} mx-2 flex-row">
|
|
1798
|
-
<mw-chat-image src="${
|
|
2400
|
+
<mw-chat-image src="${k}" alt="User uploaded image" side="${s.role}" position=${o(this,Vr)} width="300px"></mw-chat-image>
|
|
1799
2401
|
</div>
|
|
1800
2402
|
`):null}
|
|
1801
|
-
${s.content||s.parts?
|
|
2403
|
+
${(s.content||s.parts)&&!T?h` <div data-id="${s.id}" class="${l?"mb-[1px]":"mb-3"} mx-2 flex-row">
|
|
1802
2404
|
<mw-chat-message
|
|
1803
2405
|
.color="${this.config?.color}"
|
|
1804
2406
|
status="${S}"
|
|
1805
2407
|
logo="${s.metadata?.avatar||this.config?.logoUrl}"
|
|
1806
2408
|
side="${s.role}"
|
|
1807
|
-
position=${
|
|
1808
|
-
@click="${m(this,
|
|
2409
|
+
position=${o(this,Vr)}
|
|
2410
|
+
@click="${m(this,D,Jc)}">
|
|
1809
2411
|
<div
|
|
1810
2412
|
class="prose prose-h1:first:mt-0 prose-h2:first:mt-0 prose-h3:first:mt-0 prose-h4:first:mt-0 prose-h1:last:mb-0 prose-h2:last:mb-0 prose-h3:last:mb-0 prose-h4:last:mb-0 prose-h1:mt-5 prose-h2:mt-5 prose-h3:mt-5 prose-h4:mt-5 prose-h1:mb-2 prose-h2:mb-2 prose-h3:mb-2 prose-h4:mb-2 prose-h1:text-xl prose-h1:text-bold prose-h2:text-lg prose-h2:text-bold prose-h3:text-base prose-h3:text-bold prose-h4:text-sm prose-h4:text-bold break-words text-inherit">
|
|
1811
|
-
${s.content===
|
|
2413
|
+
${s.content===ap?h`<mw-loading class="-mx-2 block h-8 max-h-[24px] w-8 fill-[${this.config?.color}]"></mw-loading>`:s.parts?Ee(s.parts,(k,M)=>M,(k,M)=>Pc(k,M,s.parts??[],{imagesByProductUrl:s.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:s.streaming})):h`<p>${s.content}</p>`}
|
|
1812
2414
|
</div>
|
|
1813
2415
|
</mw-chat-message>
|
|
1814
2416
|
</div>`:null}
|
|
@@ -1816,7 +2418,7 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1816
2418
|
`)}
|
|
1817
2419
|
|
|
1818
2420
|
<!-- show typing indicator if the non-user side is typing -->
|
|
1819
|
-
${["assistant","support"].includes(this.typingIndicator?.role??"")&&this.typingIndicator?.role?
|
|
2421
|
+
${["assistant","support"].includes(this.typingIndicator?.role??"")&&this.typingIndicator?.role?h`
|
|
1820
2422
|
<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}">
|
|
1821
2423
|
<div
|
|
1822
2424
|
class="prose prose-h1:first:mt-0 prose-h2:first:mt-0 prose-h3:first:mt-0 prose-h4:first:mt-0 prose-h1:last:mb-0 prose-h2:last:mb-0 prose-h3:last:mb-0 prose-h4:last:mb-0 prose-h1:mt-5 prose-h2:mt-5 prose-h3:mt-5 prose-h4:mt-5 prose-h1:mb-2 prose-h2:mb-2 prose-h3:mb-2 prose-h4:mb-2 prose-h1:text-xl prose-h1:text-bold prose-h2:text-lg prose-h2:text-bold prose-h3:text-base prose-h3:text-bold prose-h4:text-sm prose-h4:text-bold break-words text-inherit">
|
|
@@ -1830,38 +2432,23 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1830
2432
|
class="flex-grow"
|
|
1831
2433
|
.examples="${this.messages.length>0?[]:this.config.examples}"
|
|
1832
2434
|
color="${this.config.color}"
|
|
1833
|
-
@mw:example-click="${m(this,
|
|
2435
|
+
@mw:example-click="${m(this,D,Xc)}"></mw-chat-background>
|
|
1834
2436
|
</div>
|
|
1835
2437
|
|
|
1836
2438
|
<div class="m-1.5 flex-shrink-0 flex-grow-0 space-y-2 rounded-3xl bg-[#eeedf1] p-1.5">
|
|
1837
|
-
${this.config.disclaimer&&!this.config.removePoweredBy?
|
|
2439
|
+
${this.config.disclaimer&&!this.config.removePoweredBy?h`
|
|
1838
2440
|
<!-- spacing between input box and disclaimer or bottom -->
|
|
1839
2441
|
<div class="mb-1.5">
|
|
1840
2442
|
<mw-disclaimer .text="${this.config.disclaimer}" .color="${this.config.color}"></mw-disclaimer>
|
|
1841
2443
|
</div>
|
|
1842
2444
|
`:null}
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
@mw:change="${m(this,F,ap)}"
|
|
1846
|
-
@mw:submit="${m(this,F,op)}"
|
|
1847
|
-
@mw:cancel="${m(this,F,lp)}"
|
|
1848
|
-
placeholder="${this.config.input?.placeholder}"
|
|
1849
|
-
?disabled="${this.ranOutOfCredits||this.hasQueuedMessages||a(this,ce).hasPendingImages}"
|
|
1850
|
-
?streaming="${this.isStreaming??!0}"
|
|
1851
|
-
?loading="${this.hasQueuedMessages||a(this,ce).hasPendingImages}"
|
|
1852
|
-
?enableImageUpload="${this.config.enableImageUpload}"
|
|
1853
|
-
color="${this.config.color}"
|
|
1854
|
-
.onImageUploadClick="${this.config.enableImageUpload?a(this,ce).openImagePicker:void 0}"
|
|
1855
|
-
.images="${this.config.enableImageUpload?a(this,ce).selectedImages:[]}"
|
|
1856
|
-
.onImageDelete="${this.config.enableImageUpload?a(this,ce).onImageDelete:void 0}">
|
|
1857
|
-
</mw-chat-input>
|
|
1858
|
-
|
|
1859
|
-
${this.config.removePoweredBy?this.config.disclaimer?f`
|
|
2445
|
+
${o(this,D,ri).length>0?m(this,D,ru).call(this,o(this,D,ri)):m(this,D,cl).call(this)}
|
|
2446
|
+
${this.config.removePoweredBy?this.config.disclaimer?h`
|
|
1860
2447
|
<!-- spacing between input box and disclaimer or bottom -->
|
|
1861
2448
|
<div class="mt-1.5">
|
|
1862
2449
|
<mw-disclaimer .text="${this.config.disclaimer}" .color="${this.config.color}"></mw-disclaimer>
|
|
1863
2450
|
</div>
|
|
1864
|
-
`:null:
|
|
2451
|
+
`:null:h`
|
|
1865
2452
|
<!-- spacing between input box and powered-by or bottom -->
|
|
1866
2453
|
<div class="h-4">
|
|
1867
2454
|
<mw-powered-by></mw-powered-by>
|
|
@@ -1870,97 +2457,41 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1870
2457
|
</div>
|
|
1871
2458
|
</div>
|
|
1872
2459
|
</div>
|
|
1873
|
-
`}reloadConfig(){
|
|
1874
|
-
<mw-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
2460
|
+
`}reloadConfig(){o(this,j).value?.reloadConfig(),this.requestUpdate()}async sendMessage(r){if(fe(o(this,j).value,"widget context is required"),!r||typeof r!="string")return console.warn("sendMessage requires a valid string message"),!1;let n=await o(this,j).value.enqueueUserInput(r,{xUserData:o(this,j).value?.xUserData,xCustomInstructions:o(this,j).value?.xCustomInstructions,role:"user",expectStreaming:!0});return n&&o(this,D,Ht)?.setValue(""),n??!1}setInputValue(r){if(!r||typeof r!="string"){console.warn("setInputValue requires a valid string value");return}let n=o(this,D,Ht);if(!n){console.warn("input element not found, cannot set value");return}n.setValue?n.setValue(r):console.warn("input element does not have setValue method")}focusInput(){window.requestAnimationFrame(()=>{o(this,D,Ht)?.focus()})}reset(){this._currentRequestInputIndex=0,g(this,De,[]),o(this,j).value?.reset()}};j=new WeakMap,De=new WeakMap,ii=new WeakMap,he=new WeakMap,Vr=new WeakMap,Gs=new WeakMap,D=new WeakSet,Jc=function(r){let i=r.composedPath().find(s=>s instanceof HTMLAnchorElement);if(i){if(r.preventDefault(),this.callbacks.onUserClickedLink?.({widgetId:this.widgetId,url:i.href,conversationId:this.conversationId}),window.self!==window.top){window.open(i.href,"_blank");return}let a=this.config?.linksNewTab?"_blank":"_self";window.open(i.href,i.target||a)}},Xc=function(r){if(fe(o(this,j).value,"widget context is required"),this.isStreaming)return;r.preventDefault();let n=r.detail.example;o(this,j).value.enqueueUserInput(n,{xUserData:o(this,j).value?.xUserData,xCustomInstructions:o(this,j).value?.xCustomInstructions}).then(i=>{i&&(o(this,D,Ht)?.setValue(""),this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:n,example:!0,conversationId:this.conversationId}))}).catch(console.warn)},Yc=function(r){if(fe(o(this,j).value,"widget context is required"),r.preventDefault(),this.config?.enableImageUpload&&o(this,he).hasPendingImages)return;let n=r.detail;o(this,j).value.enqueueUserInput(n,{xUserData:o(this,j).value?.xUserData,xCustomInstructions:o(this,j).value?.xCustomInstructions}).then(i=>{i&&(o(this,D,Ht)?.setValue(""),o(this,he).clearImages(),o(this,ii).typingStopped(),this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:n,example:!1,conversationId:this.conversationId}))}).catch(console.warn)},Qc=function(r){o(this,ii).onInput(r.detail.full)},eu=function(){fe(o(this,j).value,"widget context is required"),o(this,j).value.sendUserCancel(),this.callbacks.onUserCanceledStreaming?.({widgetId:this.widgetId})},Ws=function(){fe(o(this,j).value,"widget context is required"),this._currentRequestInputIndex=0,g(this,De,[]),o(this,j).value.reset()},tu=function(){this.dispatchEvent(new Ks.CloseClickEvent)},cl=function(){return h`
|
|
2461
|
+
<mw-chat-input
|
|
2462
|
+
@mw:change="${m(this,D,Qc)}"
|
|
2463
|
+
@mw:submit="${m(this,D,Yc)}"
|
|
2464
|
+
@mw:cancel="${m(this,D,eu)}"
|
|
2465
|
+
placeholder="${this.config?.input?.placeholder??""}"
|
|
2466
|
+
?disabled="${this.ranOutOfCredits||this.hasQueuedMessages||o(this,he).hasPendingImages}"
|
|
2467
|
+
?streaming="${this.isStreaming??!0}"
|
|
2468
|
+
?loading="${this.hasQueuedMessages||o(this,he).hasPendingImages}"
|
|
2469
|
+
?enableImageUpload="${this.config?.enableImageUpload&&!this.ranOutOfCredits}"
|
|
2470
|
+
color="${this.config?.color??""}"
|
|
2471
|
+
.onImageUploadClick="${this.config?.enableImageUpload?o(this,he).openImagePicker:void 0}"
|
|
2472
|
+
.images="${this.config?.enableImageUpload?o(this,he).selectedImages:[]}"
|
|
2473
|
+
.onImageDelete="${this.config?.enableImageUpload?o(this,he).onImageDelete:void 0}">
|
|
2474
|
+
</mw-chat-input>
|
|
2475
|
+
`},cp=function(){return h`
|
|
1885
2476
|
<div
|
|
1886
|
-
class="focus-within:ring-opacity-50
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
<!-- Progress/Status overlay -->
|
|
1895
|
-
${r.processingState===Re.PENDING?f`
|
|
1896
|
-
<div class="absolute inset-0 flex items-center justify-center rounded-xl bg-black/40">
|
|
1897
|
-
<lucide-icon name="loader-circle" class="inline-flex animate-spin text-white transition-all duration-1000"></lucide-icon>
|
|
1898
|
-
</div>
|
|
1899
|
-
`:r.processingState===Re.ERROR?f`
|
|
1900
|
-
<div class="absolute inset-0 flex items-center justify-center rounded-xl bg-red-500/60">
|
|
1901
|
-
<lucide-icon name="badge-alert" class="h-6 w-6 text-white"></lucide-icon>
|
|
1902
|
-
</div>
|
|
1903
|
-
`:null}
|
|
1904
|
-
|
|
1905
|
-
<!-- Delete button -->
|
|
1906
|
-
<button
|
|
1907
|
-
data-testid="image-delete-btn"
|
|
1908
|
-
type="button"
|
|
1909
|
-
@click="${()=>this.onImageDelete?.(r.id)}"
|
|
1910
|
-
class="absolute -top-1 -right-1 flex h-5 w-5 items-center justify-center rounded-full bg-[#eeedf1] text-white hover:bg-[#eeedf195]">
|
|
1911
|
-
<lucide-icon name="x" class="h-3 w-3 text-[#14161a]"></lucide-icon>
|
|
1912
|
-
</button>
|
|
1913
|
-
</div>
|
|
1914
|
-
`)}
|
|
1915
|
-
</div>
|
|
1916
|
-
`:null}
|
|
1917
|
-
|
|
1918
|
-
<!-- Input form -->
|
|
1919
|
-
<form @submit="${m(this,Y,Ip)}" class="flex w-full items-center">
|
|
1920
|
-
${this.enableImageUpload?f`
|
|
1921
|
-
<button
|
|
1922
|
-
data-testid="image-upload-btn"
|
|
1923
|
-
type="button"
|
|
1924
|
-
@click="${this.onImageUploadClick}"
|
|
1925
|
-
?disabled="${this.disabled||this.loading}"
|
|
1926
|
-
class="mx-1 px-2 transition-opacity duration-200 hover:opacity-80">
|
|
1927
|
-
<lucide-icon name="image-plus" class="block h-6 w-6 text-[#312E30]"></lucide-icon>
|
|
1928
|
-
</button>
|
|
1929
|
-
`:null}
|
|
1930
|
-
|
|
1931
|
-
<textarea
|
|
1932
|
-
data-testid="mw-chat-input-textarea"
|
|
1933
|
-
name="input"
|
|
1934
|
-
@input="${m(this,Y,Tp)}"
|
|
1935
|
-
@keydown="${m(this,Y,Ap)}"
|
|
1936
|
-
autofocus
|
|
1937
|
-
?disabled="${this.disabled}"
|
|
1938
|
-
placeholder="${this.placeholder}"
|
|
1939
|
-
class="${this.enableImageUpload?"px-1":"pl-3 pr-1"} box-content h-[${Ua.initialHeight}px] w-full resize-none place-content-center rounded bg-white py-[${Ua.paddingY}px] text-base text-gray-800 outline-none placeholder:text-[14px] placeholder:font-light disabled:place-content-baseline"></textarea>
|
|
1940
|
-
|
|
1941
|
-
<button
|
|
1942
|
-
type="submit"
|
|
1943
|
-
data-testid="mw-chat-input-submit-btn"
|
|
1944
|
-
?disabled="${this.disabled||this.loading}"
|
|
1945
|
-
class="mx-1 rounded-full px-2 transition-all duration-150 ease-out disabled:cursor-not-allowed disabled:opacity-50">
|
|
1946
|
-
<div
|
|
1947
|
-
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">
|
|
1948
|
-
${this.loading?f`<lucide-icon name="loader-circle" class="inline-flex animate-spin text-white transition-all"></lucide-icon>`:this.streaming?f`<lucide-icon name="x" class="inline-flex h-4 w-4 text-white transition-colors"></lucide-icon>`:f`<lucide-icon name="arrow-up" class="inline-flex h-4 w-4 text-white transition-colors"></lucide-icon>`}
|
|
1949
|
-
</div>
|
|
1950
|
-
</button>
|
|
1951
|
-
</form>
|
|
2477
|
+
class="focus-within:ring-opacity-50 min-h-[32px] 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.config?.color??"#000"}]">
|
|
2478
|
+
<button
|
|
2479
|
+
@click="${m(this,D,Ws)}"
|
|
2480
|
+
class="flex w-full items-center justify-center gap-2 rounded-2xl bg-white px-6 py-3 font-medium text-black shadow-sm transition-colors hover:bg-gray-50">
|
|
2481
|
+
<lucide-icon name="plus" class="h-5 w-5"></lucide-icon>
|
|
2482
|
+
<span>Start New Conversation</span>
|
|
2483
|
+
</button>
|
|
1952
2484
|
</div>
|
|
1953
|
-
|
|
1954
|
-
<
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
`}setValue(r){let n=a(this,Y,Lr);if(!n){console.warn("input element not found, cannot set value");return}n.value=r,m(this,Y,Is).call(this),this.dispatchEvent(new Pt.ChangeEvent({delta:null,full:r}))}focus(){a(this,Y,Lr)?.focus()}};Wn=new WeakMap,Y=new WeakSet,Lr=function(){return this.renderRoot.querySelector('textarea[name="input"]')??null},Mp=function(){return this.renderRoot.querySelector('button[type="submit"]')??null},Ap=function(r){L1(r)&&(r.preventDefault(),!this.streaming&&!this.disabled&&!this.loading&&a(this,Y,Mp)?.click())},Ip=function(r){r.preventDefault();let n=new Date;if(n.getTime()-a(this,Wn).getTime()<500)return;if(g(this,Wn,n),this.streaming){this.dispatchEvent(new Pt.CancelEvent);return}let s=a(this,Y,Lr);if(!s)throw new Error("Expected input element to be present");let o=s.value.trim();(o||this.enableImageUpload&&this.images.length>0)&&this.dispatchEvent(new Pt.SubmitEvent(o))&&(s.value=""),m(this,Y,Is).call(this),window.requestAnimationFrame(()=>{this.focus()})},Tp=function(r){this.dispatchEvent(new Pt.ChangeEvent({delta:r.data,full:r.target instanceof HTMLTextAreaElement?r.target.value:""})),m(this,Y,Is).call(this)},Is=function(){let r=a(this,Y,Lr);if(!r)return;let{maxHeight:n,initialHeight:i,paddingY:s}=Ua;r.style.height=`${i}px`;let o=r.scrollHeight,u=s*2,l=Math.min(o-u,n);r.style.height=`${l}px`,this.requestUpdate()},w(Pt,"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}});var Ze=Pt,Pa;Ze.ChangeEvent=(Pa=class extends CustomEvent{constructor(e,r={}){super(Ze.ChangeEvent.type,{detail:e,...r})}},w(Pa,"type","mw:change"),Pa);var Ra;Ze.SubmitEvent=(Ra=class extends CustomEvent{constructor(e,r={}){super(Ze.SubmitEvent.type,{detail:e,...r,cancelable:!0})}},w(Ra,"type","mw:submit"),Ra);var Ba;Ze.CancelEvent=(Ba=class extends CustomEvent{constructor(e={}){super(Ze.CancelEvent.type,{...e})}},w(Ba,"type","mw:cancel"),Ba);function L1(t){return(t.code==="Enter"||t.code==="NumpadEnter")&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey}customElements.get("mw-chat-input")||customElements.define("mw-chat-input",Ze);var Or,Lp,jp,jr=class jr extends M($){constructor(){super();h(this,Or);w(this,"render",()=>f`
|
|
2485
|
+
`},ru=function(r){if(r.length===0||this._currentRequestInputIndex>=r.length)return m(this,D,cl).call(this);let n=r[this._currentRequestInputIndex];return h`
|
|
2486
|
+
<mw-request-input .title="${n.title}" .type="${n.type}" .color="${this.config?.color??"#8B5CF6"}" @mw-request-input:submit="${m(this,D,nu)}">
|
|
2487
|
+
</mw-request-input>
|
|
2488
|
+
`},nu=function(r){fe(o(this,j).value,"widget context is required");let n=o(this,D,ri),i=n[this._currentRequestInputIndex];if(!i){console.warn("no current state found for request input");return}switch(r.detail.type){case"star-rating":{let{rating:s,type:a}=r.detail;o(this,De).push({type:a,rating:s,id:i.id,title:i.title});break}case"binary-vote":{let{vote:s,type:a}=r.detail;o(this,De).push({type:a,vote:s,id:i.id,title:i.title});break}case"new-conversation-button":{m(this,D,Ws).call(this),this.requestUpdate();return}default:console.warn("unknown request input type",r.detail);return}this._currentRequestInputIndex+=1,this._currentRequestInputIndex>=n.length&&m(this,D,iu).call(this),this.requestUpdate()},iu=async function(){if(fe(o(this,j).value,"widget context is required"),o(this,De).length===0)return;if(!o(this,j).value.lastMsg?.id){console.warn("cannot submit request inputs without message ID");return}await o(this,j).value.enqueueUserInput("",{role:"user",expectStreaming:!1,requestInputResponse:o(this,De)})&&g(this,De,[]),this.requestUpdate()},ri=function(){fe(o(this,j).value,"widget context is required");let r=o(this,j).value.lastMsg;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?lp.includes(i.data.type)?{title:i.data.title,type:i.data.type,id:i.data.id}:(console.warn("unknown request input type",i.data.type),null):null).filter(i=>i!==null)},su=function(){let r=o(this,D,ri).length;return r===0?!1:o(this,De).length<r},up=function(){return this.renderRoot.querySelector("#scrollable-content")},Ht=function(){return this.renderRoot.querySelector("mw-chat-input")},w(Ks,"properties",{showClose:{type:Boolean,attribute:"show-close"},_currentRequestInputIndex:{type:Number,state:!0}});var ni=Ks,ll;ni.CloseClickEvent=(ll=class extends CustomEvent{constructor(e={}){super(ni.CloseClickEvent.type,{...e})}},w(ll,"type","mw:close-click"),ll);customElements.get("mw-chat")||customElements.define("mw-chat",ni);var Hr,ou,au,Br=class Br extends A($){constructor(){super();d(this,Hr);w(this,"render",()=>h`
|
|
1958
2489
|
<div class="popup-desktop group relative w-[300px] cursor-pointer rounded-[17px] shadow-2xl select-none">
|
|
1959
2490
|
<mw-spinning-border .color="${this.color}" .border="${"transparent"}" .radius="${"17px"}">
|
|
1960
2491
|
<!-- wrapper -->
|
|
1961
2492
|
<div class="relative z-[2147483647] m-[1px] w-[300px] rounded-2xl bg-white font-sans text-base leading-normal">
|
|
1962
2493
|
<!-- content -->
|
|
1963
|
-
<div class="p-4 text-left text-gray-800" @click="${m(this,
|
|
2494
|
+
<div class="p-4 text-left text-gray-800" @click="${m(this,Hr,au)}">
|
|
1964
2495
|
<p>${this.text}</p>
|
|
1965
2496
|
</div>
|
|
1966
2497
|
</div>
|
|
@@ -1969,12 +2500,12 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1969
2500
|
<!-- close button -->
|
|
1970
2501
|
<button
|
|
1971
2502
|
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"
|
|
1972
|
-
@click="${m(this,
|
|
2503
|
+
@click="${m(this,Hr,ou)}"
|
|
1973
2504
|
aria-label="Close">
|
|
1974
2505
|
×
|
|
1975
2506
|
</button>
|
|
1976
2507
|
</div>
|
|
1977
|
-
`);this.text="Hello there. How can we help?",this.color="#601feb"}};
|
|
2508
|
+
`);this.text="Hello there. How can we help?",this.color="#601feb"}};Hr=new WeakSet,ou=function(){this.dispatchEvent(new Br.CloseEvent)},au=function(){this.dispatchEvent(new Br.ClickEvent)},w(Br,"properties",{text:{type:String},color:{type:String}}),w(Br,"styles",K`
|
|
1978
2509
|
.popup-desktop:hover button {
|
|
1979
2510
|
transition-delay: 0s !important;
|
|
1980
2511
|
}
|
|
@@ -1982,23 +2513,23 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
1982
2513
|
.popup-desktop button {
|
|
1983
2514
|
transition-delay: 1s;
|
|
1984
2515
|
}
|
|
1985
|
-
`);var
|
|
2516
|
+
`);var zt=Br,ul;zt.CloseEvent=(ul=class extends CustomEvent{constructor(e={}){super(zt.CloseEvent.type,{...e})}},w(ul,"type","mw:close"),ul);var hl;zt.ClickEvent=(hl=class extends CustomEvent{constructor(e={}){super(zt.ClickEvent.type,{...e})}},w(hl,"type","mw:click"),hl);customElements.get("mw-popup-desktop")||customElements.define("mw-popup-desktop",zt);var zr,lu,cu,si=class si extends A($){constructor(){super();d(this,zr);w(this,"render",()=>h`
|
|
1986
2517
|
<!-- wrapper -->
|
|
1987
2518
|
<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">
|
|
1988
2519
|
<!-- close button -->
|
|
1989
2520
|
<button
|
|
1990
2521
|
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"
|
|
1991
|
-
@click="${m(this,
|
|
2522
|
+
@click="${m(this,zr,lu)}"
|
|
1992
2523
|
aria-label="Close">
|
|
1993
2524
|
×
|
|
1994
2525
|
</button>
|
|
1995
2526
|
|
|
1996
2527
|
<!-- content -->
|
|
1997
|
-
<div class="p-4 text-gray-800" @click="${m(this,
|
|
2528
|
+
<div class="p-4 text-gray-800" @click="${m(this,zr,cu)}">
|
|
1998
2529
|
<h1 class="font-display mr-8 py-2.5 text-left text-lg font-bold">${this.title}</h1>
|
|
1999
2530
|
<p class="py-2.5 text-left">${this.text}</p>
|
|
2000
2531
|
<div class="h-4"></div>
|
|
2001
|
-
${this.button&&this.color?
|
|
2532
|
+
${this.button&&this.color?h`
|
|
2002
2533
|
<!-- only visible if button text and color are given -->
|
|
2003
2534
|
<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>
|
|
2004
2535
|
`:null}
|
|
@@ -2007,30 +2538,30 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
2007
2538
|
<!-- can append any other content -->
|
|
2008
2539
|
<slot name="footer"></slot>
|
|
2009
2540
|
</div>
|
|
2010
|
-
`);this.title="Chat with Molin AI",this.text="Hello there. How can we help?",this.button="Chat now",this.color="#601feb"}};
|
|
2541
|
+
`);this.title="Chat with Molin AI",this.text="Hello there. How can we help?",this.button="Chat now",this.color="#601feb"}};zr=new WeakSet,lu=function(){this.dispatchEvent(new si.CloseEvent)},cu=function(){this.dispatchEvent(new si.ClickEvent)},w(si,"properties",{title:{type:String},text:{type:String},button:{type:String},color:{type:String}});var Ft=si,pl;Ft.CloseEvent=(pl=class extends CustomEvent{constructor(e={}){super(Ft.CloseEvent.type,{...e})}},w(pl,"type","mw:close"),pl);var dl;Ft.ClickEvent=(dl=class extends CustomEvent{constructor(e={}){super(Ft.ClickEvent.type,{...e})}},w(dl,"type","mw:click"),dl);customElements.get("mw-popup-mobile")||customElements.define("mw-popup-mobile",Ft);var Fr,oi,Nt,Js=class{constructor(e,r){d(this,Fr);d(this,oi,!1);d(this,Nt,()=>{o(this,oi)||(o(this,Fr).userFirstInteracted?.(),g(this,oi,!0)),o(this,Fr).userInteracted?.()});g(this,Fr,r),e.addController(this)}hostConnected(){this.startListening()}hostDisconnected(){this.stopListening()}startListening(){window.addEventListener("click",o(this,Nt)),window.addEventListener("keydown",o(this,Nt))}stopListening(){window.removeEventListener("click",o(this,Nt)),window.removeEventListener("keydown",o(this,Nt))}};Fr=new WeakMap,oi=new WeakMap,Nt=new WeakMap;var hp=1440*60*1e3,Nr,ke,qt,ai,Zt,li,Ys,uu,Xs=class{constructor(e,r,n=Date){d(this,Ys);d(this,Nr);d(this,ke);d(this,qt);d(this,ai);d(this,Zt,!1);d(this,li,!1);g(this,Nr,e),g(this,ke,r),g(this,qt,n),e.addController(this)}get showing(){return o(this,Zt)}hostDisconnected(){this.abortAutoShowTimer()}show({sound:e}={}){if(this.abortAutoShowTimer(),!o(this,Zt)&&(g(this,Zt,!0),o(this,Nr).requestUpdate(),e)){o(this,ke).playPopupSound();let r=o(this,ke).getPersistedState();o(this,ke).setPersistedState({...r,playedSoundOnce:!0})}}hide(){g(this,li,!0),this.abortAutoShowTimer(),g(this,Zt,!1),o(this,Nr).requestUpdate()}abortAutoShowTimer(){clearTimeout(o(this,ai))}onCloseClick(){let e=o(this,ke).getPersistedState();o(this,ke).setPersistedState({...e,userDismissedAt:o(this,qt).now()}),this.hide()}onContentClick(){let e=o(this,ke).getPersistedState();o(this,ke).setPersistedState({...e,userDismissedAt:o(this,qt).now()}),this.hide()}userFirstInteracted(){this.abortAutoShowTimer(),o(this,li)||g(this,ai,setTimeout(()=>m(this,Ys,uu).call(this),o(this,ke).getDelayMs()))}};Nr=new WeakMap,ke=new WeakMap,qt=new WeakMap,ai=new WeakMap,Zt=new WeakMap,li=new WeakMap,Ys=new WeakSet,uu=function(){let e=o(this,ke).getPersistedState(),r=!!e?.playedSoundOnce;e?.userDismissedAt&&o(this,qt).now()-e.userDismissedAt<hp||this.show({sound:!r})};var pt,gl,Xe,Qs,ml,eo=class eo extends A($){constructor(){super();d(this,Xe);d(this,pt,new Xs(this,{getDelayMs:()=>this.delayMs,playPopupSound:()=>{this.soundUrl&&new Audio(this.soundUrl).play().then(()=>{}).catch(r=>{console.error("Error playing audio:",r,{})})},setPersistedState:r=>{r?localStorage.setItem("_molin_popup",JSON.stringify(r)):localStorage.removeItem("_molin_popup")},getPersistedState:()=>{let r=localStorage.getItem("_molin_popup");try{return r?JSON.parse(r):null}catch{return null}}}));d(this,gl,new Js(this,o(this,pt)));this.positionClasses="",this.delayMs=0,this.soundUrl="",this.content={desktop:{text:"",color:""},mobile:{title:"",text:"",button:"",color:"",poweredBy:!0}}}render(){let r=o(this,pt).showing?"visible opacity-100 translate-y-0":"invisible opacity-0 translate-y-3",n=this.content;return h`
|
|
2011
2542
|
<!-- mobile shadow backdrop -->
|
|
2012
|
-
<div @click="${m(this,
|
|
2543
|
+
<div @click="${m(this,Xe,Qs)}" class="${r} fixed inset-0 z-[2147483647] bg-black/50 transition-[opacity,visibility] sm:hidden"></div>
|
|
2013
2544
|
|
|
2014
2545
|
<!-- mobile overlay -->
|
|
2015
2546
|
<div class="${r} fixed right-0 bottom-0 left-0 z-[2147483647] sm:hidden">
|
|
2016
|
-
<mw-popup-mobile title="${n.mobile.title}" text="${n.mobile.text}" button="${n.mobile.button}" color="${n.mobile.color}" @mw:click="${m(this,
|
|
2017
|
-
${n.mobile.poweredBy?
|
|
2547
|
+
<mw-popup-mobile title="${n.mobile.title}" text="${n.mobile.text}" button="${n.mobile.button}" color="${n.mobile.color}" @mw:click="${m(this,Xe,ml)}" @mw:close="${m(this,Xe,Qs)}">
|
|
2548
|
+
${n.mobile.poweredBy?h`<mw-powered-by class="block p-4" slot="footer"></mw-powered-by>`:null}
|
|
2018
2549
|
</mw-popup-mobile>
|
|
2019
2550
|
</div>
|
|
2020
2551
|
|
|
2021
2552
|
<!-- desktop -->
|
|
2022
2553
|
<div class="${r} ${this.positionClasses} fixed z-[2147483647] transition-[opacity,translate,visibility] max-sm:hidden">
|
|
2023
|
-
<mw-popup-desktop color="${n.desktop.color}" text="${n.desktop.text}" @mw:click="${m(this,
|
|
2554
|
+
<mw-popup-desktop color="${n.desktop.color}" text="${n.desktop.text}" @mw:click="${m(this,Xe,ml)}" @mw:close="${m(this,Xe,Qs)}"></mw-popup-desktop>
|
|
2024
2555
|
</div>
|
|
2025
|
-
`}hide(){
|
|
2556
|
+
`}hide(){o(this,pt).hide()}};pt=new WeakMap,gl=new WeakMap,Xe=new WeakSet,Qs=function(){o(this,pt).onCloseClick()},ml=function(){this.dispatchEvent(new eo.ClickEvent),o(this,pt).onContentClick()},w(eo,"properties",{positionClasses:{type:String,attribute:"position"},delayMs:{type:Number,attribute:"delay"},soundUrl:{type:String,attribute:"sound"},content:{type:Object}});var ci=eo,fl;ci.ClickEvent=(fl=class extends CustomEvent{constructor(e={}){super(ci.ClickEvent.type,{...e})}},w(fl,"type","mw:click"),fl);customElements.get("mw-popup")||customElements.define("mw-popup",ci);var ro,hu,to=class extends A($){constructor(){super();d(this,ro);w(this,"render",()=>h`
|
|
2026
2557
|
<span class="relative inline-flex">
|
|
2027
2558
|
<slot></slot>
|
|
2028
|
-
<span class="${
|
|
2559
|
+
<span class="${o(this,ro,hu)} pointer-events-none absolute z-10 flex h-3 w-3">
|
|
2029
2560
|
<span class="bg-${this.color} absolute inline-flex h-3 w-3 animate-ping rounded-full opacity-75"></span>
|
|
2030
2561
|
<span class="bg-${this.color} relative inline-flex h-3 w-3 rounded-full"></span>
|
|
2031
2562
|
</span>
|
|
2032
2563
|
</span>
|
|
2033
|
-
`);this.color="sky-500",this.position="top-right"}};
|
|
2564
|
+
`);this.color="sky-500",this.position="top-right"}};ro=new WeakSet,hu=function(){switch(this.position){case"top-left":return"top-0 left-0 -mt-1 -ml-1";case"top-right":return"top-0 right-0 -mt-1 -mr-1";case"bottom-left":return"bottom-0 left-0 -mb-1 -ml-1";case"bottom-right":return"bottom-0 right-0 -mb-1 -mr-1";default:throw new Error(`Invalid position: ${this.position}`)}},w(to,"properties",{color:{type:String,attribute:"color"},position:{type:String,attribute:"position"}});customElements.get("mw-pulse-dot")||customElements.define("mw-pulse-dot",to);var no=class extends A($){constructor(){super();w(this,"render",()=>h`
|
|
2034
2565
|
<div class="${this.positionClasses} fixed right-6 bottom-24 z-10 flex animate-bounce flex-col items-center justify-center font-sans text-base">
|
|
2035
2566
|
<p class="mb-2 -translate-x-4 -rotate-12 transform text-lg leading-normal font-bold text-gray-800">${this.text}</p>
|
|
2036
2567
|
|
|
@@ -2043,7 +2574,7 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
2043
2574
|
stroke-linecap="round"></path>
|
|
2044
2575
|
</svg>
|
|
2045
2576
|
</div>
|
|
2046
|
-
`);this.positionClasses="",this.text="Try it out"}};w(
|
|
2577
|
+
`);this.positionClasses="",this.text="Try it out"}};w(no,"properties",{positionClasses:{type:String,attribute:"position"},text:{type:String}});customElements.get("mw-try-it-out")||customElements.define("mw-try-it-out",no);var io,ui=class extends A($){constructor(){super();d(this,io,new ht(this,{onError:console.error}));this.cdn="https://widget.molin.ai",this.widgetId="",this.state="open"}get config(){return o(this,io).data}render(){return this.config?h`
|
|
2047
2578
|
<!-- embed our bubble component forwarding props -->
|
|
2048
2579
|
<!-- these props are never internally updated by mw-bubble so we pass them down only one way -->
|
|
2049
2580
|
<mw-bubble
|
|
@@ -2051,42 +2582,42 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
2051
2582
|
.color="${this.config?.bubble?.color||this.config?.color}"
|
|
2052
2583
|
.bubbleStyle="${this.config?.bubble?.style}"
|
|
2053
2584
|
.src="${this.config?.bubble?.bubbleUrl}"
|
|
2054
|
-
width="${
|
|
2055
|
-
height="${
|
|
2056
|
-
`:null}};
|
|
2585
|
+
width="${ce(this.config?.bubble?.size?.width)}"
|
|
2586
|
+
height="${ce(this.config?.bubble?.size?.height)}"></mw-bubble>
|
|
2587
|
+
`:null}};io=new WeakMap,w(ui,"styles",K`
|
|
2057
2588
|
:host {
|
|
2058
2589
|
all: initial; /* reset all properties that can pierce the shadow DOM */
|
|
2059
2590
|
}
|
|
2060
|
-
`),w(
|
|
2591
|
+
`),w(ui,"properties",{cdn:{type:String},widgetId:{type:String,attribute:"widget"},state:{type:String}});customElements.get("molin-shop-ai-launcher")||customElements.define("molin-shop-ai-launcher",ui);var w8="navigator"in globalThis&&/Mobi|Android|iPhone/i.test(navigator.userAgent),v8="navigator"in globalThis&&"share"in navigator,pp=Object.freeze({sm:640,md:768,lg:1024,xl:1280,"2xl":1536});function dp(t){if(typeof window>"u")return!1;let e=pp[t];return typeof e!="number"?(console.warn(`Invalid breakpoint: ${t}`),!1):window.matchMedia(`(min-width: ${e}px)`).matches}function wl(){return dp("sm")}var oo,qr,Zr,Wt,hi,ao,so=class{constructor(e,r,n,i=window.history){d(this,oo);d(this,qr);d(this,Zr);d(this,Wt);d(this,hi,!1);d(this,ao,()=>{o(this,qr).test(window.location.pathname)&&o(this,Zr).navigated()});g(this,oo,e),g(this,qr,r),g(this,Zr,n),g(this,Wt,i),e.addController(this)}hostConnected(){o(this,ao).call(this);let e=o(this,Wt).pushState;o(this,Wt).pushState=(...r)=>{if(e.call(o(this,Wt),...r),!o(this,hi))try{let n=new URL(r[2],window.location.origin);o(this,qr).test(n.pathname)&&o(this,Zr).navigated()}catch{}}}hostDisconnected(){g(this,hi,!0)}};oo=new WeakMap,qr=new WeakMap,Zr=new WeakMap,Wt=new WeakMap,hi=new WeakMap,ao=new WeakMap;function pu({minMs:t,maxMs:e}){return Math.random()*(e-t)+t}function lo(t,e=""){return Object.entries(t).filter(([r,n])=>n).map(([r,n])=>`${e}${r}-[${n}]`).join(" ")}function du(t,e={}){return[lo(t),lo(e,"max-sm:")].join(" ")}function fu(t){return lo(t)}function mu(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 gu(t){let e=lo(t),n=`sm:bottom-[${t.bottom?`calc(${t.bottom}+72px)`:"72px"}]`;return[e,n].filter(Boolean).join(" ")}var Wr,Gr,pi,di,fi,co,vl=class{constructor(e,r,{threshold:n=5}={}){d(this,Wr,0);d(this,Gr,!1);d(this,pi);d(this,di);d(this,fi,()=>{o(this,Gr)||(requestAnimationFrame(o(this,co)),g(this,Gr,!0))});d(this,co,()=>{let e=window.scrollY,r=e-o(this,Wr);if(Math.abs(r)>=o(this,di)){let n=r>0?"down":"up";o(this,pi).call(this,{scrollY:e,direction:n,deltaY:Math.abs(r)}),g(this,Wr,e)}g(this,Gr,!1)});g(this,pi,r),g(this,di,n),e.addController(this)}hostConnected(){g(this,Wr,window.scrollY),window.addEventListener("scroll",o(this,fi),{passive:!0})}hostDisconnected(){window.removeEventListener("scroll",o(this,fi))}};Wr=new WeakMap,Gr=new WeakMap,pi=new WeakMap,di=new WeakMap,fi=new WeakMap,co=new WeakMap;function wu(t,e,r){return new vl(t,e,r)}var uo,El,gi,_l,Ye,ho,I,yl,bl,xl,mi,dt,kl,vu,yu,bu,po,Cl,$l,Sl,Gt,Te=class extends A($){constructor(){super();d(this,I);d(this,uo,new ht(this,{onError:console.error}));d(this,El,wu(this,r=>{o(this,I,bl)&&!this._dialogShown&&(r.direction==="down"?this._floatingInputVisible=!1:r.direction==="up"&&(this._floatingInputVisible=!0),this.requestUpdate())},{threshold:20}));d(this,gi);d(this,_l,new so(this,/.*/i,{navigated:()=>{if(this.requestUpdate(),!this.widgetId){console.warn("No widgetId set, cannot track page view");return}let r=o(this,I,dt)?.conversationId,n=lr.restore(this.widgetId)?.conversationId,i=r||n;i&&Z("ShopAssistant: pageview",{widgetId:this.widgetId,conversationId:i,url:document.location.href,title:document.title,hidden:this.config?this.config.hidden||!1:void 0,shouldHideForCurrentUrl:o(this,I,xl)})}}));d(this,Ye,!1);d(this,ho,{onError:r=>{alert(r.error),console.error(r.widgetId,r.error),Z("ShopAssistant: error",{...r},{immediate:!0})},onNewMessageStartedStreaming:r=>{Z("ShopAssistant: user received bot message (streaming started)",r)},onMessageEndedStreaming:r=>{Z("ShopAssistant: user received bot message (streaming ended)",r)},onUserCanceledStreaming:r=>{Z("ShopAssistant: user canceled streaming",r)},onUserClickedLink:r=>{Z("ShopAssistant: user clicked link",r)},onUserSentInput:r=>{Z("ShopAssistant: user sent input",r)}});d(this,po,r=>{let n=r.detail.text,i=o(this,I,kl);i&&typeof i.connect=="function"&&i.connect(),this._dialogShown=!0,g(this,Ye,!0),this.requestUpdate(),m(this,I,Gt).call(this,!0),setTimeout(()=>{m(this,I,Sl).call(this,n),m(this,I,$l).call(this,n).catch(console.warn)},100),Z("ShopAssistant: user sent input",{widgetId:this.widgetId,text:n,example:!1,conversationId:o(this,I,dt)?.conversationId||"",source:"ask-ai"})});this.cdn="https://widget.molin.ai",this.widgetId="",this._floatingInputVisible=!0,this._dialogShown=!1,this.xUserData=ut()?.userData,this.xCustomInstructions=ut()?.customInstructions}get config(){return o(this,gi)||o(this,uo).data}render(){if(!this.config)return null;let r=du(this.config.bubble.position,this.config.bubble.mobilePosition),n=fu(this.config.bubble.position),i=mu(this.config.bubble.position),s=gu(this.config.bubble.position);return this.config.hidden||Zs().hidden||o(this,I,xl)?null:h`
|
|
2061
2592
|
<mw-context-widget
|
|
2062
2593
|
.widgetId="${this.widgetId}"
|
|
2063
2594
|
.config="${this.config}"
|
|
2064
|
-
.callbacks="${
|
|
2595
|
+
.callbacks="${o(this,ho)}"
|
|
2065
2596
|
.xUserData="${this.xUserData}"
|
|
2066
2597
|
.xCustomInstructions="${this.xCustomInstructions}"
|
|
2067
|
-
.autoConnect="${
|
|
2598
|
+
.autoConnect="${o(this,Ye)}">
|
|
2068
2599
|
<mw-bubble
|
|
2069
|
-
class="${r} ${this._dialogShown?"opacity-0":"opacity-100"} fixed z-[${
|
|
2070
|
-
@click="${m(this,
|
|
2600
|
+
class="${r} ${this._dialogShown?"opacity-0":"opacity-100"} fixed z-[${o(this,I,yl)}] transition-opacity"
|
|
2601
|
+
@click="${m(this,I,yu)}"
|
|
2071
2602
|
state="${this._dialogShown?"close":"open"}"
|
|
2072
2603
|
.color="${this.config?.bubble?.color||this.config?.color}"
|
|
2073
2604
|
.bubbleStyle="${this.config?.bubble?.style}"
|
|
2074
2605
|
.src="${this.config?.bubble?.bubbleUrl}"
|
|
2075
|
-
width="${
|
|
2076
|
-
height="${
|
|
2606
|
+
width="${ce(this.config?.bubble?.size?.width)}"
|
|
2607
|
+
height="${ce(this.config?.bubble?.size?.height)}"></mw-bubble>
|
|
2077
2608
|
|
|
2078
2609
|
<!-- only load the component if enabled on any platform -->
|
|
2079
|
-
${this.isPopupEnabled?
|
|
2610
|
+
${this.isPopupEnabled?h`
|
|
2080
2611
|
<mw-popup
|
|
2081
2612
|
position="${s}"
|
|
2082
|
-
delay="${this.config.popup?.delayMs||
|
|
2613
|
+
delay="${this.config.popup?.delayMs||pu({minMs:2e3,maxMs:5e3})}"
|
|
2083
2614
|
sound="${this.config.popup?.muteSounds?"":this.config.popup?.soundUrl||""}"
|
|
2084
2615
|
.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}}}"
|
|
2085
|
-
@mw:click="${m(this,
|
|
2616
|
+
@mw:click="${m(this,I,vu)}"></mw-popup>
|
|
2086
2617
|
`:null}
|
|
2087
2618
|
|
|
2088
2619
|
<!-- show "Try it out" if enabled (even if the chat window is showing) -->
|
|
2089
|
-
${this.config?.tryItOut?.mobileEnabled||this.config?.tryItOut?.desktopEnabled?
|
|
2620
|
+
${this.config?.tryItOut?.mobileEnabled||this.config?.tryItOut?.desktopEnabled?h`<mw-try-it-out
|
|
2090
2621
|
class="${this.config?.tryItOut?.mobileEnabled?"visible":"invisible"} ${this.config?.tryItOut?.desktopEnabled?"sm:visible":"sm:invisible"}"
|
|
2091
2622
|
position="${n}"
|
|
2092
2623
|
text="${this.config.tryItOut?.text||""}"></mw-try-it-out>`:null}
|
|
@@ -2094,23 +2625,23 @@ var Zp=Object.create;var Ks=Object.defineProperty;var Kp=Object.getOwnPropertyDe
|
|
|
2094
2625
|
<!-- 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. -->
|
|
2095
2626
|
<div
|
|
2096
2627
|
class="${this._dialogShown?"visible opacity-100 translate-y-0":"invisible opacity-0 translate-y-3"} ${i} fixed inset-0 z-[2147483647] bg-white font-sans text-[16px] leading-normal text-gray-800 shadow-2xl transition-all sm: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]">
|
|
2097
|
-
<mw-chat ?show-close="${!0}" @mw:close-click="${m(this,
|
|
2628
|
+
<mw-chat ?show-close="${!0}" @mw:close-click="${m(this,I,bu)}">
|
|
2098
2629
|
<slot name="banner" slot="banner"></slot>
|
|
2099
2630
|
</mw-chat>
|
|
2100
2631
|
</div>
|
|
2101
2632
|
|
|
2102
2633
|
<!-- Floating input only visible when enabled, in center, on desktop only -->
|
|
2103
|
-
${this.config?.floatingAskAI?.enabled&&
|
|
2634
|
+
${this.config?.floatingAskAI?.enabled&&o(this,I,bl)?h`
|
|
2104
2635
|
<mw-floating-ask-ai
|
|
2105
2636
|
?dark="${this.config?.floatingAskAI?.darkMode}"
|
|
2106
2637
|
.color="${this.config.color||this.config?.bubble?.color}"
|
|
2107
|
-
placeholder="${
|
|
2108
|
-
class="${!this._dialogShown&&this._floatingInputVisible?"opacity-100 translate-y-0":"opacity-0 translate-y-full"} fixed left-1/2 z-[${
|
|
2638
|
+
placeholder="${ce(this.config?.floatingAskAI?.placeholder)}"
|
|
2639
|
+
class="${!this._dialogShown&&this._floatingInputVisible?"opacity-100 translate-y-0":"opacity-0 translate-y-full"} fixed left-1/2 z-[${o(this,I,yl)}] hidden -translate-x-1/2 transition-all duration-300 ease-in-out max-md:hidden sm:block"
|
|
2109
2640
|
style="bottom: ${this.config.bubble.position.bottom||"1.5rem"}"
|
|
2110
|
-
@mw-floating-ask-ai:submit="${
|
|
2641
|
+
@mw-floating-ask-ai:submit="${o(this,po)}"></mw-floating-ask-ai>
|
|
2111
2642
|
`:null}
|
|
2112
2643
|
</mw-context-widget>
|
|
2113
|
-
`}get isPopupEnabled(){return
|
|
2644
|
+
`}get isPopupEnabled(){return wl()?!!this.config?.popup?.desktopEnabled:!!this.config?.popup?.mobileEnabled}updated(){this._dialogShown&&o(this,I,mi)?.hide(),this._dialogShown&&setTimeout(()=>{o(this,I,dt)?.focusInput()},0)}firstUpdated(){wl()&&xe.molin_widget_open_state?.isOpen&&!this._dialogShown&&(this._dialogShown=!0,g(this,Ye,!0),this.requestUpdate())}openChat(r){let{message:n,autoSend:i}=r||{};if(this._dialogShown){m(this,I,Cl).call(this,{message:n,autoSend:i});return}let s=o(this,I,kl);s&&typeof s.connect=="function"&&s.connect(),this._dialogShown=!0,g(this,Ye,!0),this.requestUpdate(),m(this,I,Gt).call(this,!0),o(this,I,mi)?.hide(),setTimeout(()=>{m(this,I,Cl).call(this,{message:n,autoSend:i})},200),Z("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(),m(this,I,Gt).call(this,!1),o(this,I,mi)?.hide(),Z("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"programmatic-method",state:this._dialogShown?"open":"close"}))}showLauncher(){let r=Zs();r.hidden=!1,this.requestUpdate(),Z("ShopAssistant: called show launcher",{widgetId:this.widgetId,source:"programmatic-method"})}hideLauncher(){let r=Zs();r.hidden=!0,this.requestUpdate(),Z("ShopAssistant: called hide launcher",{widgetId:this.widgetId,source:"programmatic-method"})}injectConfig(r){g(this,gi,r),this.requestUpdate()}reset(){this.xUserData={},this.xCustomInstructions="",o(this,I,dt)?.reset(),this.requestUpdate()}};uo=new WeakMap,El=new WeakMap,gi=new WeakMap,_l=new WeakMap,Ye=new WeakMap,ho=new WeakMap,I=new WeakSet,yl=function(){return typeof this.config?.bubble?.zIndex=="number"?this.config.bubble.zIndex:2147483647},bl=function(){return this.config?.floatingAskAI?.enabled||!0},xl=function(){if(!this.config?.hideUrls||!Array.isArray(this.config.hideUrls))return!1;let r=window.location.href,n=window.location.pathname;return this.config.hideUrls.some(i=>{if(!i||typeof i!="string")return!1;let s=i.endsWith("*"),a=s?i.slice(0,-1):i;return i.startsWith("http")?s?r.startsWith(a):r===a:s?n.startsWith(a):n===a})},mi=function(){return this.renderRoot.querySelector("mw-popup")},dt=function(){return this.renderRoot.querySelector("mw-chat")},kl=function(){return this.renderRoot.querySelector("mw-context-widget")},vu=function(){this._dialogShown=!0,g(this,Ye,!0),this.requestUpdate(),m(this,I,Gt).call(this,!0),Z("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"popup-click",state:this._dialogShown?"open":"close"})},yu=function(){this._dialogShown=!this._dialogShown,g(this,Ye,!0),this.requestUpdate(),m(this,I,Gt).call(this,this._dialogShown),o(this,I,mi)?.hide(),Z("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"bubble-toggle",state:this._dialogShown?"open":"close"})},bu=function(){this._dialogShown=!1,this._floatingInputVisible=!0,this.requestUpdate(),m(this,I,Gt).call(this,!1),Z("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"top-right-close-button",state:this._dialogShown?"open":"close"})},po=new WeakMap,Cl=function({message:r,autoSend:n=!1}={}){if(!r)return;m(this,I,Sl).call(this,r);let i=o(this,I,dt)?.isLiveMode;i||this.reset(),n&&!i&&m(this,I,$l).call(this,r).catch(console.warn)},$l=async function(r){let n=o(this,I,dt);if(!n){console.warn("Chat element not found, cannot send message");return}n.sendMessage?await n.sendMessage(r):console.warn("Chat element does not have sendMessage method")},Sl=function(r){let n=o(this,I,dt);if(!n){console.warn("Chat element not found, cannot set input value");return}n.setInputValue?n.setInputValue(r):console.warn("Chat element does not have setInputValue method")},Gt=function(r){xe.molin_widget_open_state={isOpen:r}},w(Te,"styles",K`
|
|
2114
2645
|
:host {
|
|
2115
2646
|
all: initial; /* reset all properties that can pierce the shadow DOM */
|
|
2116
2647
|
}
|
|
@@ -2130,6 +2661,7 @@ lit-element/lit-element.js:
|
|
|
2130
2661
|
lit-html/directive.js:
|
|
2131
2662
|
lit-html/directives/repeat.js:
|
|
2132
2663
|
lit-html/directives/unsafe-html.js:
|
|
2664
|
+
lit-html/directives/unsafe-svg.js:
|
|
2133
2665
|
(**
|
|
2134
2666
|
* @license
|
|
2135
2667
|
* Copyright 2017 Google LLC
|