@yartsun/hypershadow-widget 0.1.6 → 0.1.8
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/lib/index.cjs.js +63 -5
- package/dist/lib/index.es.js +4311 -2538
- package/dist/lib/style.css +1 -1
- package/dist/standalone/hs-widget.css +1 -1
- package/dist/standalone/hs-widget.es.js +7611 -6174
- package/dist/standalone/hs-widget.iife.js +71 -13
- package/dist/static/widget/v1/chat/assets/ChatWrapper.vue_vue_type_style_index_0_lang-BJEW3T51.js +84 -0
- package/dist/static/widget/v1/chat/assets/{federation-expose-Chat-Bm8Hs5nl.js → federation-expose-Chat-CpykKNL7.js} +1 -1
- package/dist/static/widget/v1/chat/assets/{index-DzIXELKk.js → index-CiCnDOSD.js} +1 -1
- package/dist/static/widget/v1/chat/assets/remoteChat.js +1 -1
- package/dist/static/widget/v1/chat/assets/style-6WbxXmGJ.css +1 -0
- package/dist/static/widget/v1/chat/index.html +3 -3
- package/package.json +12 -3
- package/types/standalone.d.ts +2 -1
- package/dist/static/widget/v1/chat/assets/ChatWrapper.vue_vue_type_style_index_0_lang-DixkyFkr.js +0 -26
- package/dist/static/widget/v1/chat/assets/style-BAqCilbD.css +0 -1
package/dist/lib/index.cjs.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
"use strict";var Bi=Object.defineProperty;var Pi=(i,e,t)=>e in i?Bi(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var de=(i,e,t)=>Pi(i,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue");function rr(i){var e,t,s="";if(typeof i=="string"||typeof i=="number")s+=i;else if(typeof i=="object")if(Array.isArray(i)){var n=i.length;for(e=0;e<n;e++)i[e]&&(t=rr(i[e]))&&(s&&(s+=" "),s+=t)}else for(t in i)i[t]&&(s&&(s+=" "),s+=t);return s}function ir(){for(var i,e,t=0,s="",n=arguments.length;t<n;t++)(i=arguments[t])&&(e=rr(i))&&(s&&(s+=" "),s+=e);return s}const En=i=>typeof i=="boolean"?`${i}`:i===0?"0":i,Bn=ir,Di=(i,e)=>t=>{var s;if((e==null?void 0:e.variants)==null)return Bn(i,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:n,defaultVariants:r}=e,o=Object.keys(n).map(u=>{const d=t==null?void 0:t[u],p=r==null?void 0:r[u];if(d===null)return null;const h=En(d)||En(p);return n[u][h]}),a=t&&Object.entries(t).reduce((u,d)=>{let[p,h]=d;return h===void 0||(u[p]=h),u},{}),l=e==null||(s=e.compoundVariants)===null||s===void 0?void 0:s.reduce((u,d)=>{let{class:p,className:h,...g}=d;return Object.entries(g).every(y=>{let[f,m]=y;return Array.isArray(m)?m.includes({...r,...a}[f]):{...r,...a}[f]===m})?[...u,p,h]:u},[]);return Bn(i,o,l,t==null?void 0:t.class,t==null?void 0:t.className)};function or(i){return i?i.flatMap(e=>e.type===c.Fragment?or(e.children):[e]):[]}const Ai=c.defineComponent({name:"PrimitiveSlot",inheritAttrs:!1,setup(i,{attrs:e,slots:t}){return()=>{var l;if(!t.default)return null;const s=or(t.default()),n=s.findIndex(u=>u.type!==c.Comment);if(n===-1)return s;const r=s[n];(l=r.props)==null||delete l.ref;const o=r.props?c.mergeProps(e,r.props):e,a=c.cloneVNode({...r,props:{}},o);return s.length===1?a:(s[n]=a,s)}}}),Oi=["area","img","input"],Li=c.defineComponent({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(i,{attrs:e,slots:t}){const s=i.asChild?"template":i.as;return typeof s=="string"&&Oi.includes(s)?()=>c.h(s,e):s!=="template"?()=>c.h(i.as,e,{default:t.default}):()=>c.h(Ai,e,{default:t.default})}}),sn="-",Ii=i=>{const e=Ki(i),{conflictingClassGroups:t,conflictingClassGroupModifiers:s}=i;return{getClassGroupId:o=>{const a=o.split(sn);return a[0]===""&&a.length!==1&&a.shift(),ar(a,e)||Vi(o)},getConflictingClassGroupIds:(o,a)=>{const l=t[o]||[];return a&&s[o]?[...l,...s[o]]:l}}},ar=(i,e)=>{var o;if(i.length===0)return e.classGroupId;const t=i[0],s=e.nextPart.get(t),n=s?ar(i.slice(1),s):void 0;if(n)return n;if(e.validators.length===0)return;const r=i.join(sn);return(o=e.validators.find(({validator:a})=>a(r)))==null?void 0:o.classGroupId},Pn=/^\[(.+)\]$/,Vi=i=>{if(Pn.test(i)){const e=Pn.exec(i)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},Ki=i=>{const{theme:e,classGroups:t}=i,s={nextPart:new Map,validators:[]};for(const n in t)As(t[n],s,n,e);return s},As=(i,e,t,s)=>{i.forEach(n=>{if(typeof n=="string"){const r=n===""?e:Dn(e,n);r.classGroupId=t;return}if(typeof n=="function"){if(Fi(n)){As(n(s),e,t,s);return}e.validators.push({validator:n,classGroupId:t});return}Object.entries(n).forEach(([r,o])=>{As(o,Dn(e,r),t,s)})})},Dn=(i,e)=>{let t=i;return e.split(sn).forEach(s=>{t.nextPart.has(s)||t.nextPart.set(s,{nextPart:new Map,validators:[]}),t=t.nextPart.get(s)}),t},Fi=i=>i.isThemeGetter,Ni=i=>{if(i<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,s=new Map;const n=(r,o)=>{t.set(r,o),e++,e>i&&(e=0,s=t,t=new Map)};return{get(r){let o=t.get(r);if(o!==void 0)return o;if((o=s.get(r))!==void 0)return n(r,o),o},set(r,o){t.has(r)?t.set(r,o):n(r,o)}}},Os="!",Ls=":",Wi=Ls.length,Ui=i=>{const{prefix:e,experimentalParseClassName:t}=i;let s=n=>{const r=[];let o=0,a=0,l=0,u;for(let y=0;y<n.length;y++){let f=n[y];if(o===0&&a===0){if(f===Ls){r.push(n.slice(l,y)),l=y+Wi;continue}if(f==="/"){u=y;continue}}f==="["?o++:f==="]"?o--:f==="("?a++:f===")"&&a--}const d=r.length===0?n:n.substring(l),p=$i(d),h=p!==d,g=u&&u>l?u-l:void 0;return{modifiers:r,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:g}};if(e){const n=e+Ls,r=s;s=o=>o.startsWith(n)?r(o.substring(n.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(t){const n=s;s=r=>t({className:r,parseClassName:n})}return s},$i=i=>i.endsWith(Os)?i.substring(0,i.length-1):i.startsWith(Os)?i.substring(1):i,Hi=i=>{const e=Object.fromEntries(i.orderSensitiveModifiers.map(s=>[s,!0]));return s=>{if(s.length<=1)return s;const n=[];let r=[];return s.forEach(o=>{o[0]==="["||e[o]?(n.push(...r.sort(),o),r=[]):r.push(o)}),n.push(...r.sort()),n}},ji=i=>({cache:Ni(i.cacheSize),parseClassName:Ui(i),sortModifiers:Hi(i),...Ii(i)}),Gi=/\s+/,qi=(i,e)=>{const{parseClassName:t,getClassGroupId:s,getConflictingClassGroupIds:n,sortModifiers:r}=e,o=[],a=i.trim().split(Gi);let l="";for(let u=a.length-1;u>=0;u-=1){const d=a[u],{isExternal:p,modifiers:h,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:f}=t(d);if(p){l=d+(l.length>0?" "+l:l);continue}let m=!!f,_=s(m?y.substring(0,f):y);if(!_){if(!m){l=d+(l.length>0?" "+l:l);continue}if(_=s(y),!_){l=d+(l.length>0?" "+l:l);continue}m=!1}const S=r(h).join(":"),w=g?S+Os:S,C=w+_;if(o.includes(C))continue;o.push(C);const b=n(_,m);for(let k=0;k<b.length;++k){const z=b[k];o.push(w+z)}l=d+(l.length>0?" "+l:l)}return l};function Yi(){let i=0,e,t,s="";for(;i<arguments.length;)(e=arguments[i++])&&(t=lr(e))&&(s&&(s+=" "),s+=t);return s}const lr=i=>{if(typeof i=="string")return i;let e,t="";for(let s=0;s<i.length;s++)i[s]&&(e=lr(i[s]))&&(t&&(t+=" "),t+=e);return t};function Zi(i,...e){let t,s,n,r=o;function o(l){const u=e.reduce((d,p)=>p(d),i());return t=ji(u),s=t.cache.get,n=t.cache.set,r=a,a(l)}function a(l){const u=s(l);if(u)return u;const d=qi(l,t);return n(l,d),d}return function(){return r(Yi.apply(null,arguments))}}const oe=i=>{const e=t=>t[i]||[];return e.isThemeGetter=!0,e},cr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ur=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Xi=/^\d+\/\d+$/,Qi=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ji=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,eo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,to=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,so=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yt=i=>Xi.test(i),I=i=>!!i&&!Number.isNaN(Number(i)),Ye=i=>!!i&&Number.isInteger(Number(i)),xs=i=>i.endsWith("%")&&I(i.slice(0,-1)),$e=i=>Qi.test(i),no=()=>!0,ro=i=>Ji.test(i)&&!eo.test(i),dr=()=>!1,io=i=>to.test(i),oo=i=>so.test(i),ao=i=>!E(i)&&!B(i),lo=i=>Pt(i,pr,dr),E=i=>cr.test(i),ot=i=>Pt(i,hr,ro),Ss=i=>Pt(i,po,I),An=i=>Pt(i,fr,dr),co=i=>Pt(i,gr,oo),rs=i=>Pt(i,mr,io),B=i=>ur.test(i),It=i=>Dt(i,hr),uo=i=>Dt(i,ho),On=i=>Dt(i,fr),fo=i=>Dt(i,pr),go=i=>Dt(i,gr),is=i=>Dt(i,mr,!0),Pt=(i,e,t)=>{const s=cr.exec(i);return s?s[1]?e(s[1]):t(s[2]):!1},Dt=(i,e,t=!1)=>{const s=ur.exec(i);return s?s[1]?e(s[1]):t:!1},fr=i=>i==="position"||i==="percentage",gr=i=>i==="image"||i==="url",pr=i=>i==="length"||i==="size"||i==="bg-size",hr=i=>i==="length",po=i=>i==="number",ho=i=>i==="family-name",mr=i=>i==="shadow",mo=()=>{const i=oe("color"),e=oe("font"),t=oe("text"),s=oe("font-weight"),n=oe("tracking"),r=oe("leading"),o=oe("breakpoint"),a=oe("container"),l=oe("spacing"),u=oe("radius"),d=oe("shadow"),p=oe("inset-shadow"),h=oe("text-shadow"),g=oe("drop-shadow"),y=oe("blur"),f=oe("perspective"),m=oe("aspect"),_=oe("ease"),S=oe("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],b=()=>[...C(),B,E],k=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],x=()=>[B,E,l],v=()=>[yt,"full","auto",...x()],A=()=>[Ye,"none","subgrid",B,E],N=()=>["auto",{span:["full",Ye,B,E]},Ye,B,E],V=()=>[Ye,"auto",B,E],D=()=>["auto","min","max","fr",B,E],G=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...x()],W=()=>[yt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],M=()=>[i,B,E],ce=()=>[...C(),On,An,{position:[B,E]}],Oe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],he=()=>["auto","cover","contain",fo,lo,{size:[B,E]}],H=()=>[xs,It,ot],j=()=>["","none","full",u,B,E],L=()=>["",I,It,ot],se=()=>["solid","dashed","dotted","double"],ts=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>[I,xs,On,An],ss=()=>["","none",y,B,E],ae=()=>["none",I,B,E],Ot=()=>["none",I,B,E],Le=()=>[I,B,E],rt=()=>[yt,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[$e],breakpoint:[$e],color:[no],container:[$e],"drop-shadow":[$e],ease:["in","out","in-out"],font:[ao],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[$e],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[$e],shadow:[$e],spacing:["px",I],text:[$e],"text-shadow":[$e],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",yt,E,B,m]}],container:["container"],columns:[{columns:[I,E,B,a]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:b()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:v()}],"inset-x":[{"inset-x":v()}],"inset-y":[{"inset-y":v()}],start:[{start:v()}],end:[{end:v()}],top:[{top:v()}],right:[{right:v()}],bottom:[{bottom:v()}],left:[{left:v()}],visibility:["visible","invisible","collapse"],z:[{z:[Ye,"auto",B,E]}],basis:[{basis:[yt,"full","auto",a,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[I,yt,"auto","initial","none",E]}],grow:[{grow:["",I,B,E]}],shrink:[{shrink:["",I,B,E]}],order:[{order:[Ye,"first","last","none",B,E]}],"grid-cols":[{"grid-cols":A()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":A()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:[...G(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...G()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":G()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[a,"screen",...W()]}],"min-w":[{"min-w":[a,"screen","none",...W()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",t,It,ot]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,B,Ss]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",xs,E]}],"font-family":[{font:[uo,E,e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,B,E]}],"line-clamp":[{"line-clamp":[I,"none",B,Ss]}],leading:[{leading:[r,...x()]}],"list-image":[{"list-image":["none",B,E]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",B,E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[I,"from-font","auto",B,ot]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[I,"auto",B,E]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",B,E]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",B,E]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ce()}],"bg-repeat":[{bg:Oe()}],"bg-size":[{bg:he()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ye,B,E],radial:["",B,E],conic:[Ye,B,E]},go,co]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"border-w":[{border:L()}],"border-w-x":[{"border-x":L()}],"border-w-y":[{"border-y":L()}],"border-w-s":[{"border-s":L()}],"border-w-e":[{"border-e":L()}],"border-w-t":[{"border-t":L()}],"border-w-r":[{"border-r":L()}],"border-w-b":[{"border-b":L()}],"border-w-l":[{"border-l":L()}],"divide-x":[{"divide-x":L()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":L()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[I,B,E]}],"outline-w":[{outline:["",I,It,ot]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",d,is,rs]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",p,is,rs]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[I,ot]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":L()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",h,is,rs]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[I,B,E]}],"mix-blend":[{"mix-blend":[...ts(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ts()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[I]}],"mask-image-linear-from-pos":[{"mask-linear-from":Q()}],"mask-image-linear-to-pos":[{"mask-linear-to":Q()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":Q()}],"mask-image-t-to-pos":[{"mask-t-to":Q()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":Q()}],"mask-image-r-to-pos":[{"mask-r-to":Q()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":Q()}],"mask-image-b-to-pos":[{"mask-b-to":Q()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":Q()}],"mask-image-l-to-pos":[{"mask-l-to":Q()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":Q()}],"mask-image-x-to-pos":[{"mask-x-to":Q()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":Q()}],"mask-image-y-to-pos":[{"mask-y-to":Q()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[B,E]}],"mask-image-radial-from-pos":[{"mask-radial-from":Q()}],"mask-image-radial-to-pos":[{"mask-radial-to":Q()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[I]}],"mask-image-conic-from-pos":[{"mask-conic-from":Q()}],"mask-image-conic-to-pos":[{"mask-conic-to":Q()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ce()}],"mask-repeat":[{mask:Oe()}],"mask-size":[{mask:he()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",B,E]}],filter:[{filter:["","none",B,E]}],blur:[{blur:ss()}],brightness:[{brightness:[I,B,E]}],contrast:[{contrast:[I,B,E]}],"drop-shadow":[{"drop-shadow":["","none",g,is,rs]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",I,B,E]}],"hue-rotate":[{"hue-rotate":[I,B,E]}],invert:[{invert:["",I,B,E]}],saturate:[{saturate:[I,B,E]}],sepia:[{sepia:["",I,B,E]}],"backdrop-filter":[{"backdrop-filter":["","none",B,E]}],"backdrop-blur":[{"backdrop-blur":ss()}],"backdrop-brightness":[{"backdrop-brightness":[I,B,E]}],"backdrop-contrast":[{"backdrop-contrast":[I,B,E]}],"backdrop-grayscale":[{"backdrop-grayscale":["",I,B,E]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[I,B,E]}],"backdrop-invert":[{"backdrop-invert":["",I,B,E]}],"backdrop-opacity":[{"backdrop-opacity":[I,B,E]}],"backdrop-saturate":[{"backdrop-saturate":[I,B,E]}],"backdrop-sepia":[{"backdrop-sepia":["",I,B,E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",B,E]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[I,"initial",B,E]}],ease:[{ease:["linear","initial",_,B,E]}],delay:[{delay:[I,B,E]}],animate:[{animate:["none",S,B,E]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[f,B,E]}],"perspective-origin":[{"perspective-origin":b()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:Ot()}],"scale-x":[{"scale-x":Ot()}],"scale-y":[{"scale-y":Ot()}],"scale-z":[{"scale-z":Ot()}],"scale-3d":["scale-3d"],skew:[{skew:Le()}],"skew-x":[{"skew-x":Le()}],"skew-y":[{"skew-y":Le()}],transform:[{transform:[B,E,"","none","gpu","cpu"]}],"transform-origin":[{origin:b()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:rt()}],"translate-x":[{"translate-x":rt()}],"translate-y":[{"translate-y":rt()}],"translate-z":[{"translate-z":rt()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",B,E]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",B,E]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[I,It,ot,Ss]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},yo=Zi(mo);function nn(...i){return yo(ir(i))}const Ct=c.defineComponent({__name:"Button",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{type:[String,Object,Function],default:"button"}},setup(i){const e=i;return(t,s)=>(c.openBlock(),c.createBlock(c.unref(Li),{"data-slot":"button",as:t.as,"as-child":t.asChild,class:c.normalizeClass(c.unref(nn)(c.unref(wo)({variant:t.variant,size:t.size}),e.class))},{default:c.withCtx(()=>[c.renderSlot(t.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),wo=Di("tw:inline-flex tw:cursor-pointer tw:items-center tw:justify-center tw:whitespace-nowrap tw:text-sm tw:transition-all disabled:tw:pointer-events-none disabled:tw:opacity-50 [&_svg]:tw:pointer-events-none [&_svg:not([class*='size-'])]:tw:size-4 tw:shrink-0 [&_svg]:tw:shrink-0 tw:outline-none focus-visible:tw:border-ring focus-visible:tw:ring-ring/50 focus-visible:tw:ring-[3px] aria-invalid:tw:ring-destructive/20 dark:aria-invalid:tw:ring-destructive/40 aria-invalid:tw:border-destructive",{variants:{variant:{default:"tw:bg-primary tw:text-primary-foreground tw:shadow-xs hover:tw:bg-primary/90",destructive:"tw:bg-destructive tw:text-white tw:shadow-xs hover:tw:bg-destructive/90 focus-visible:tw:ring-destructive/20 dark:focus-visible:tw:ring-destructive/40 dark:tw:bg-destructive/60",outlined:"tw:border tw:bg-background tw:shadow-xs hover:tw:bg-accent hover:tw:text-accent-foreground dark:tw:bg-input/30 dark:tw:border-input dark:hover:tw:bg-input/50",secondary:"tw:bg-secondary tw:text-secondary-foreground tw:shadow-xs hover:tw:bg-secondary/80",ghost:"hover:tw:bg-accent hover:tw:text-accent-foreground dark:hover:tw:bg-accent/50",link:"tw:text-primary tw:underline-offset-4 hover:tw:underline",filled:"tw:border-transparent tw:bg-primary tw:text-primary-foreground [a&]:hover:tw:bg-primary/90",invisible:"tw:border-transparent tw:p-0! tw:bg-transparent tw:text-primary-foreground [a&]:hover:tw:bg-transparent"},size:{md:"tw:px-2 tw:py-1 tw:text-xs tw:h-6 tw:gap-1",sm:"tw:px-2 tw:py-1 tw:text-xs tw:h-5 tw:gap-1",lg:"tw:px-3 tw:py-1 tw:text-base tw:h-8 tw:gap-1",icon:"tw:size-9"}},defaultVariants:{variant:"default",size:"md"}}),bo={md:16};function yr(i){const e=i.getKey("settings.borderRadius")??16;return typeof e!="number"?bo.md:e}function _o(i,e=8){if(i<=0)return 0;const t=i-e;return t<=0?4:Math.max(4,t)}function jt(i,e=8){const t=yr(i);return{borderRadius:`${_o(t,e)}px`}}const Is=i=>i?i.replace(/<br>/g,"<br />").replace(/\n/g,"<br />"):"",vo=["innerHTML"],Co=["innerHTML"],xo=["innerHTML"],So=["width","height"],ko=`
|
|
1
|
+
"use strict";var Do=Object.defineProperty;var Lo=(r,e,t)=>e in r?Do(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var O=(r,e,t)=>Lo(r,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue");function Yr(r){var e,t,s="";if(typeof r=="string"||typeof r=="number")s+=r;else if(typeof r=="object")if(Array.isArray(r)){var n=r.length;for(e=0;e<n;e++)r[e]&&(t=Yr(r[e]))&&(s&&(s+=" "),s+=t)}else for(t in r)r[t]&&(s&&(s+=" "),s+=t);return s}function Xr(){for(var r,e,t=0,s="",n=arguments.length;t<n;t++)(r=arguments[t])&&(e=Yr(r))&&(s&&(s+=" "),s+=e);return s}const gr=r=>typeof r=="boolean"?`${r}`:r===0?"0":r,mr=Xr,Io=(r,e)=>t=>{var s;if((e==null?void 0:e.variants)==null)return mr(r,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:n,defaultVariants:i}=e,o=Object.keys(n).map(u=>{const d=t==null?void 0:t[u],f=i==null?void 0:i[u];if(d===null)return null;const g=gr(d)||gr(f);return n[u][g]}),a=t&&Object.entries(t).reduce((u,d)=>{let[f,g]=d;return g===void 0||(u[f]=g),u},{}),l=e==null||(s=e.compoundVariants)===null||s===void 0?void 0:s.reduce((u,d)=>{let{class:f,className:g,...h}=d;return Object.entries(h).every(m=>{let[p,b]=m;return Array.isArray(b)?b.includes({...i,...a}[p]):{...i,...a}[p]===b})?[...u,f,g]:u},[]);return mr(r,o,l,t==null?void 0:t.class,t==null?void 0:t.className)};function Qr(r){return r?r.flatMap(e=>e.type===c.Fragment?Qr(e.children):[e]):[]}const Oo=c.defineComponent({name:"PrimitiveSlot",inheritAttrs:!1,setup(r,{attrs:e,slots:t}){return()=>{var l;if(!t.default)return null;const s=Qr(t.default()),n=s.findIndex(u=>u.type!==c.Comment);if(n===-1)return s;const i=s[n];(l=i.props)==null||delete l.ref;const o=i.props?c.mergeProps(e,i.props):e,a=c.cloneVNode({...i,props:{}},o);return s.length===1?a:(s[n]=a,s)}}}),$o=["area","img","input"],Vo=c.defineComponent({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(r,{attrs:e,slots:t}){const s=r.asChild?"template":r.as;return typeof s=="string"&&$o.includes(s)?()=>c.h(s,e):s!=="template"?()=>c.h(r.as,e,{default:t.default}):()=>c.h(Oo,e,{default:t.default})}}),Bn="-",Ko=r=>{const e=Fo(r),{conflictingClassGroups:t,conflictingClassGroupModifiers:s}=r;return{getClassGroupId:o=>{const a=o.split(Bn);return a[0]===""&&a.length!==1&&a.shift(),Jr(a,e)||No(o)},getConflictingClassGroupIds:(o,a)=>{const l=t[o]||[];return a&&s[o]?[...l,...s[o]]:l}}},Jr=(r,e)=>{var o;if(r.length===0)return e.classGroupId;const t=r[0],s=e.nextPart.get(t),n=s?Jr(r.slice(1),s):void 0;if(n)return n;if(e.validators.length===0)return;const i=r.join(Bn);return(o=e.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},wr=/^\[(.+)\]$/,No=r=>{if(wr.test(r)){const e=wr.exec(r)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},Fo=r=>{const{theme:e,classGroups:t}=r,s={nextPart:new Map,validators:[]};for(const n in t)on(t[n],s,n,e);return s},on=(r,e,t,s)=>{r.forEach(n=>{if(typeof n=="string"){const i=n===""?e:br(e,n);i.classGroupId=t;return}if(typeof n=="function"){if(Uo(n)){on(n(s),e,t,s);return}e.validators.push({validator:n,classGroupId:t});return}Object.entries(n).forEach(([i,o])=>{on(o,br(e,i),t,s)})})},br=(r,e)=>{let t=r;return e.split(Bn).forEach(s=>{t.nextPart.has(s)||t.nextPart.set(s,{nextPart:new Map,validators:[]}),t=t.nextPart.get(s)}),t},Uo=r=>r.isThemeGetter,Wo=r=>{if(r<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,s=new Map;const n=(i,o)=>{t.set(i,o),e++,e>r&&(e=0,s=t,t=new Map)};return{get(i){let o=t.get(i);if(o!==void 0)return o;if((o=s.get(i))!==void 0)return n(i,o),o},set(i,o){t.has(i)?t.set(i,o):n(i,o)}}},an="!",ln=":",Ho=ln.length,jo=r=>{const{prefix:e,experimentalParseClassName:t}=r;let s=n=>{const i=[];let o=0,a=0,l=0,u;for(let m=0;m<n.length;m++){let p=n[m];if(o===0&&a===0){if(p===ln){i.push(n.slice(l,m)),l=m+Ho;continue}if(p==="/"){u=m;continue}}p==="["?o++:p==="]"?o--:p==="("?a++:p===")"&&a--}const d=i.length===0?n:n.substring(l),f=qo(d),g=f!==d,h=u&&u>l?u-l:void 0;return{modifiers:i,hasImportantModifier:g,baseClassName:f,maybePostfixModifierPosition:h}};if(e){const n=e+ln,i=s;s=o=>o.startsWith(n)?i(o.substring(n.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(t){const n=s;s=i=>t({className:i,parseClassName:n})}return s},qo=r=>r.endsWith(an)?r.substring(0,r.length-1):r.startsWith(an)?r.substring(1):r,Go=r=>{const e=Object.fromEntries(r.orderSensitiveModifiers.map(s=>[s,!0]));return s=>{if(s.length<=1)return s;const n=[];let i=[];return s.forEach(o=>{o[0]==="["||e[o]?(n.push(...i.sort(),o),i=[]):i.push(o)}),n.push(...i.sort()),n}},Zo=r=>({cache:Wo(r.cacheSize),parseClassName:jo(r),sortModifiers:Go(r),...Ko(r)}),Yo=/\s+/,Xo=(r,e)=>{const{parseClassName:t,getClassGroupId:s,getConflictingClassGroupIds:n,sortModifiers:i}=e,o=[],a=r.trim().split(Yo);let l="";for(let u=a.length-1;u>=0;u-=1){const d=a[u],{isExternal:f,modifiers:g,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:p}=t(d);if(f){l=d+(l.length>0?" "+l:l);continue}let b=!!p,k=s(b?m.substring(0,p):m);if(!k){if(!b){l=d+(l.length>0?" "+l:l);continue}if(k=s(m),!k){l=d+(l.length>0?" "+l:l);continue}b=!1}const v=i(g).join(":"),y=h?v+an:v,_=y+k;if(o.includes(_))continue;o.push(_);const w=n(k,b);for(let C=0;C<w.length;++C){const T=w[C];o.push(y+T)}l=d+(l.length>0?" "+l:l)}return l};function Qo(){let r=0,e,t,s="";for(;r<arguments.length;)(e=arguments[r++])&&(t=ei(e))&&(s&&(s+=" "),s+=t);return s}const ei=r=>{if(typeof r=="string")return r;let e,t="";for(let s=0;s<r.length;s++)r[s]&&(e=ei(r[s]))&&(t&&(t+=" "),t+=e);return t};function Jo(r,...e){let t,s,n,i=o;function o(l){const u=e.reduce((d,f)=>f(d),r());return t=Zo(u),s=t.cache.get,n=t.cache.set,i=a,a(l)}function a(l){const u=s(l);if(u)return u;const d=Xo(l,t);return n(l,d),d}return function(){return i(Qo.apply(null,arguments))}}const ue=r=>{const e=t=>t[r]||[];return e.isThemeGetter=!0,e},ti=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,si=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ea=/^\d+\/\d+$/,ta=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,sa=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,na=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ra=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ia=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Bt=r=>ea.test(r),V=r=>!!r&&!Number.isNaN(Number(r)),ct=r=>!!r&&Number.isInteger(Number(r)),Gs=r=>r.endsWith("%")&&V(r.slice(0,-1)),tt=r=>ta.test(r),oa=()=>!0,aa=r=>sa.test(r)&&!na.test(r),ni=()=>!1,la=r=>ra.test(r),ca=r=>ia.test(r),ua=r=>!M(r)&&!B(r),da=r=>Ht(r,oi,ni),M=r=>ti.test(r),bt=r=>Ht(r,ai,aa),Zs=r=>Ht(r,ma,V),yr=r=>Ht(r,ri,ni),pa=r=>Ht(r,ii,ca),ks=r=>Ht(r,li,la),B=r=>si.test(r),Yt=r=>jt(r,ai),ha=r=>jt(r,wa),vr=r=>jt(r,ri),fa=r=>jt(r,oi),ga=r=>jt(r,ii),_s=r=>jt(r,li,!0),Ht=(r,e,t)=>{const s=ti.exec(r);return s?s[1]?e(s[1]):t(s[2]):!1},jt=(r,e,t=!1)=>{const s=si.exec(r);return s?s[1]?e(s[1]):t:!1},ri=r=>r==="position"||r==="percentage",ii=r=>r==="image"||r==="url",oi=r=>r==="length"||r==="size"||r==="bg-size",ai=r=>r==="length",ma=r=>r==="number",wa=r=>r==="family-name",li=r=>r==="shadow",ba=()=>{const r=ue("color"),e=ue("font"),t=ue("text"),s=ue("font-weight"),n=ue("tracking"),i=ue("leading"),o=ue("breakpoint"),a=ue("container"),l=ue("spacing"),u=ue("radius"),d=ue("shadow"),f=ue("inset-shadow"),g=ue("text-shadow"),h=ue("drop-shadow"),m=ue("blur"),p=ue("perspective"),b=ue("aspect"),k=ue("ease"),v=ue("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[..._(),B,M],C=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],x=()=>[B,M,l],z=()=>[Bt,"full","auto",...x()],D=()=>[ct,"none","subgrid",B,M],K=()=>["auto",{span:["full",ct,B,M]},ct,B,M],N=()=>[ct,"auto",B,M],W=()=>["auto","min","max","fr",B,M],te=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],P=()=>["start","end","center","stretch","center-safe","end-safe"],U=()=>["auto",...x()],G=()=>[Bt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],A=()=>[r,B,M],Y=()=>[..._(),vr,yr,{position:[B,M]}],We=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Se=()=>["auto","cover","contain",fa,da,{size:[B,M]}],Te=()=>[Gs,Yt,bt],Q=()=>["","none","full",u,B,M],j=()=>["",V,Yt,bt],ye=()=>["solid","dashed","dotted","double"],Je=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$=()=>[V,Gs,vr,yr],et=()=>["","none",m,B,M],se=()=>["none",V,B,M],De=()=>["none",V,B,M],Gt=()=>[V,B,M],lt=()=>[Bt,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[tt],breakpoint:[tt],color:[oa],container:[tt],"drop-shadow":[tt],ease:["in","out","in-out"],font:[ua],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[tt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[tt],shadow:[tt],spacing:["px",V],text:[tt],"text-shadow":[tt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Bt,M,B,b]}],container:["container"],columns:[{columns:[V,M,B,a]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:z()}],"inset-x":[{"inset-x":z()}],"inset-y":[{"inset-y":z()}],start:[{start:z()}],end:[{end:z()}],top:[{top:z()}],right:[{right:z()}],bottom:[{bottom:z()}],left:[{left:z()}],visibility:["visible","invisible","collapse"],z:[{z:[ct,"auto",B,M]}],basis:[{basis:[Bt,"full","auto",a,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[V,Bt,"auto","initial","none",M]}],grow:[{grow:["",V,B,M]}],shrink:[{shrink:["",V,B,M]}],order:[{order:[ct,"first","last","none",B,M]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:K()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:K()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":W()}],"auto-rows":[{"auto-rows":W()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:[...te(),"normal"]}],"justify-items":[{"justify-items":[...P(),"normal"]}],"justify-self":[{"justify-self":["auto",...P()]}],"align-content":[{content:["normal",...te()]}],"align-items":[{items:[...P(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...P(),{baseline:["","last"]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...P(),"baseline"]}],"place-self":[{"place-self":["auto",...P()]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:U()}],mx:[{mx:U()}],my:[{my:U()}],ms:[{ms:U()}],me:[{me:U()}],mt:[{mt:U()}],mr:[{mr:U()}],mb:[{mb:U()}],ml:[{ml:U()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],w:[{w:[a,"screen",...G()]}],"min-w":[{"min-w":[a,"screen","none",...G()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",t,Yt,bt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,B,Zs]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Gs,M]}],"font-family":[{font:[ha,M,e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,B,M]}],"line-clamp":[{"line-clamp":[V,"none",B,Zs]}],leading:[{leading:[i,...x()]}],"list-image":[{"list-image":["none",B,M]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",B,M]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ye(),"wavy"]}],"text-decoration-thickness":[{decoration:[V,"from-font","auto",B,bt]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[V,"auto",B,M]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",B,M]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",B,M]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Y()}],"bg-repeat":[{bg:We()}],"bg-size":[{bg:Se()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ct,B,M],radial:["",B,M],conic:[ct,B,M]},ga,pa]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:Te()}],"gradient-via-pos":[{via:Te()}],"gradient-to-pos":[{to:Te()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border:j()}],"border-w-x":[{"border-x":j()}],"border-w-y":[{"border-y":j()}],"border-w-s":[{"border-s":j()}],"border-w-e":[{"border-e":j()}],"border-w-t":[{"border-t":j()}],"border-w-r":[{"border-r":j()}],"border-w-b":[{"border-b":j()}],"border-w-l":[{"border-l":j()}],"divide-x":[{"divide-x":j()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":j()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ye(),"hidden","none"]}],"divide-style":[{divide:[...ye(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...ye(),"none","hidden"]}],"outline-offset":[{"outline-offset":[V,B,M]}],"outline-w":[{outline:["",V,Yt,bt]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",d,_s,ks]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",f,_s,ks]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[V,bt]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":j()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",g,_s,ks]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[V,B,M]}],"mix-blend":[{"mix-blend":[...Je(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Je()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[V]}],"mask-image-linear-from-pos":[{"mask-linear-from":$()}],"mask-image-linear-to-pos":[{"mask-linear-to":$()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":$()}],"mask-image-t-to-pos":[{"mask-t-to":$()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":$()}],"mask-image-r-to-pos":[{"mask-r-to":$()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":$()}],"mask-image-b-to-pos":[{"mask-b-to":$()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":$()}],"mask-image-l-to-pos":[{"mask-l-to":$()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":$()}],"mask-image-x-to-pos":[{"mask-x-to":$()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":$()}],"mask-image-y-to-pos":[{"mask-y-to":$()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[B,M]}],"mask-image-radial-from-pos":[{"mask-radial-from":$()}],"mask-image-radial-to-pos":[{"mask-radial-to":$()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":_()}],"mask-image-conic-pos":[{"mask-conic":[V]}],"mask-image-conic-from-pos":[{"mask-conic-from":$()}],"mask-image-conic-to-pos":[{"mask-conic-to":$()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Y()}],"mask-repeat":[{mask:We()}],"mask-size":[{mask:Se()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",B,M]}],filter:[{filter:["","none",B,M]}],blur:[{blur:et()}],brightness:[{brightness:[V,B,M]}],contrast:[{contrast:[V,B,M]}],"drop-shadow":[{"drop-shadow":["","none",h,_s,ks]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",V,B,M]}],"hue-rotate":[{"hue-rotate":[V,B,M]}],invert:[{invert:["",V,B,M]}],saturate:[{saturate:[V,B,M]}],sepia:[{sepia:["",V,B,M]}],"backdrop-filter":[{"backdrop-filter":["","none",B,M]}],"backdrop-blur":[{"backdrop-blur":et()}],"backdrop-brightness":[{"backdrop-brightness":[V,B,M]}],"backdrop-contrast":[{"backdrop-contrast":[V,B,M]}],"backdrop-grayscale":[{"backdrop-grayscale":["",V,B,M]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[V,B,M]}],"backdrop-invert":[{"backdrop-invert":["",V,B,M]}],"backdrop-opacity":[{"backdrop-opacity":[V,B,M]}],"backdrop-saturate":[{"backdrop-saturate":[V,B,M]}],"backdrop-sepia":[{"backdrop-sepia":["",V,B,M]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",B,M]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[V,"initial",B,M]}],ease:[{ease:["linear","initial",k,B,M]}],delay:[{delay:[V,B,M]}],animate:[{animate:["none",v,B,M]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,B,M]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:De()}],"scale-x":[{"scale-x":De()}],"scale-y":[{"scale-y":De()}],"scale-z":[{"scale-z":De()}],"scale-3d":["scale-3d"],skew:[{skew:Gt()}],"skew-x":[{"skew-x":Gt()}],"skew-y":[{"skew-y":Gt()}],transform:[{transform:[B,M,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:lt()}],"translate-x":[{"translate-x":lt()}],"translate-y":[{"translate-y":lt()}],"translate-z":[{"translate-z":lt()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",B,M]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",B,M]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[V,Yt,bt,Zs]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},ya=Jo(ba);function Pn(...r){return ya(Xr(r))}const it=c.defineComponent({__name:"Button",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{type:[String,Object,Function],default:"button"}},setup(r){const e=r;return(t,s)=>(c.openBlock(),c.createBlock(c.unref(Vo),{"data-slot":"button",as:t.as,"as-child":t.asChild,class:c.normalizeClass(c.unref(Pn)(c.unref(va)({variant:t.variant,size:t.size}),e.class))},{default:c.withCtx(()=>[c.renderSlot(t.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),va=Io("tw:inline-flex tw:cursor-pointer tw:items-center tw:justify-center tw:whitespace-nowrap tw:text-sm tw:transition-all disabled:tw:pointer-events-none disabled:tw:opacity-50 [&_svg]:tw:pointer-events-none [&_svg:not([class*='size-'])]:tw:size-4 tw:shrink-0 [&_svg]:tw:shrink-0 tw:outline-none focus-visible:tw:border-ring focus-visible:tw:ring-ring/50 focus-visible:tw:ring-[3px] aria-invalid:tw:ring-destructive/20 dark:aria-invalid:tw:ring-destructive/40 aria-invalid:tw:border-destructive",{variants:{variant:{default:"tw:bg-primary tw:text-primary-foreground tw:shadow-xs hover:tw:bg-primary/90",destructive:"tw:bg-destructive tw:text-white tw:shadow-xs hover:tw:bg-destructive/90 focus-visible:tw:ring-destructive/20 dark:focus-visible:tw:ring-destructive/40 dark:tw:bg-destructive/60",outlined:"tw:border tw:bg-background tw:shadow-xs hover:tw:bg-accent hover:tw:text-accent-foreground dark:tw:bg-input/30 dark:tw:border-input dark:hover:tw:bg-input/50",secondary:"tw:bg-secondary tw:text-secondary-foreground tw:shadow-xs hover:tw:bg-secondary/80",ghost:"hover:tw:bg-accent hover:tw:text-accent-foreground dark:hover:tw:bg-accent/50",link:"tw:text-primary tw:underline-offset-4 hover:tw:underline",filled:"tw:border-transparent tw:bg-primary tw:text-primary-foreground [a&]:hover:tw:bg-primary/90",invisible:"tw:border-transparent tw:p-0! tw:bg-transparent tw:text-primary-foreground [a&]:hover:tw:bg-transparent"},size:{md:"tw:px-2 tw:py-1 tw:text-xs tw:h-6 tw:gap-1",sm:"tw:px-2 tw:py-1 tw:text-xs tw:h-5 tw:gap-1",lg:"tw:px-3 tw:py-1 tw:text-base tw:h-8 tw:gap-1",icon:"tw:size-9"}},defaultVariants:{variant:"default",size:"md"}}),ka={md:16};function ci(r){const e=r.getKey("settings.borderRadius")??16;return typeof e!="number"?ka.md:e}function _a(r,e=8){if(r<=0)return 0;const t=r-e;return t<=0?4:Math.max(4,t)}function cs(r,e=8){const t=ci(r);return{borderRadius:`${_a(t,e)}px`}}const cn=r=>r?r.replace(/<br>/g,"<br />").replace(/\n/g,"<br />"):"",Ca=["innerHTML"],xa=["innerHTML"],Sa=["innerHTML"],Ta=["width","height"],za=`
|
|
2
2
|
<svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
3
|
<path d="M21.76 16.42L15.36 4.9C14.5 3.35 13.31 2.5 12 2.5C10.69 2.5 9.49998 3.35 8.63998 4.9L2.23998 16.42C1.42998 17.89 1.33998 19.3 1.98998 20.41C2.63998 21.52 3.91998 22.13 5.59998 22.13H18.4C20.08 22.13 21.36 21.52 22.01 20.41C22.66 19.3 22.57 17.88 21.76 16.42ZM11.25 9.5C11.25 9.09 11.59 8.75 12 8.75C12.41 8.75 12.75 9.09 12.75 9.5V14.5C12.75 14.91 12.41 15.25 12 15.25C11.59 15.25 11.25 14.91 11.25 14.5V9.5ZM12.71 18.21C12.66 18.25 12.61 18.29 12.56 18.33C12.5 18.37 12.44 18.4 12.38 18.42C12.32 18.45 12.26 18.47 12.19 18.48C12.13 18.49 12.06 18.5 12 18.5C11.94 18.5 11.87 18.49 11.8 18.48C11.74 18.47 11.68 18.45 11.62 18.42C11.56 18.4 11.5 18.37 11.44 18.33C11.39 18.29 11.34 18.25 11.29 18.21C11.11 18.02 11 17.76 11 17.5C11 17.24 11.11 16.98 11.29 16.79C11.34 16.75 11.39 16.71 11.44 16.67C11.5 16.63 11.56 16.6 11.62 16.58C11.68 16.55 11.74 16.53 11.8 16.52C11.93 16.49 12.07 16.49 12.19 16.52C12.26 16.53 12.32 16.55 12.38 16.58C12.44 16.6 12.5 16.63 12.56 16.67C12.61 16.71 12.66 16.75 12.71 16.79C12.89 16.98 13 17.24 13 17.5C13 17.76 12.89 18.02 12.71 18.21Z" fill="currentColor"/>
|
|
4
|
-
</svg>`,
|
|
4
|
+
</svg>`,un=c.defineComponent({__name:"ChatError",props:{warningElement:{},headlineText:{},descriptionText:{},resetButtonText:{},type:{},configDesignClass:{},borderOffset:{},restartChat:{type:Function}},setup(r){const e=r,t=c.computed(()=>{var l,u;return(l=e.configDesignClass)!=null&&l.getKey("settings.globalRoundingRadius")?cs(e.configDesignClass,8):{borderRadius:((u=e.warningElement.resetButton)==null?void 0:u.borderRadius)+"px"}}),s=c.computed(()=>{var u;const l=(u=e.configDesignClass)!=null&&u.getKey("settings.globalRoundingRadius")?cs(e.configDesignClass,8):{borderRadius:e.warningElement.content.borderRadius+"px"};return e.warningElement.warningStyle==="gradient"?{...l,"border-bottom-left-radius":"0px !important","border-bottom-right-radius":"0px !important"}:l}),n=c.computed(()=>{const l=e.warningElement.content.bgColor;if(e.warningElement.warningStyle==="gradient"){const u=l==null?void 0:l.match(/rgba?\(([^)]+)\)/);if(u){const[d,f,g]=u[1].split(",").map(h=>h.trim());return{background:`linear-gradient(180deg, ${l} 0%, rgba(${d}, ${f}, ${g}, 0) 100%)`}}else if(l!=null&&l.startsWith("#")){const d=l.replace("#",""),f=parseInt(d.substr(0,2),16),g=parseInt(d.substr(2,2),16),h=parseInt(d.substr(4,2),16);return{background:`linear-gradient(180deg, ${l} 0%, rgba(${f}, ${g}, ${h}, 0) 100%)`}}}else if(e.warningElement.warningStyle==="faded"){const u=l==null?void 0:l.match(/rgba?\(([^)]+)\)/);if(u){const[d,f,g]=u[1].split(",").map(h=>h.trim());return{backgroundColor:`rgba(${d}, ${f}, ${g}, 0.2)`,border:`1px solid ${l}`}}else if(l!=null&&l.startsWith("#")){const d=l.replace("#",""),f=parseInt(d.substr(0,2),16),g=parseInt(d.substr(2,2),16),h=parseInt(d.substr(4,2),16);return{backgroundColor:`rgba(${f}, ${g}, ${h}, 0.2)`,border:`1px solid ${l}`}}}return{backgroundColor:l}}),i=c.computed(()=>{var u,d,f;const l=((f=(d=(u=e.warningElement)==null?void 0:u.content)==null?void 0:d.icon)==null?void 0:f.src)||za;try{const m=new DOMParser().parseFromString(String(l),"image/svg+xml").documentElement;return m.setAttribute("width","1em"),m.setAttribute("height","1em"),m.querySelectorAll("[fill], [stroke]").forEach(b=>{const k=b.getAttribute("fill");k&&k!=="none"&&!k.startsWith("url(")&&b.setAttribute("fill","currentColor");const v=b.getAttribute("stroke");v&&v!=="none"&&!v.startsWith("url(")&&b.setAttribute("stroke","currentColor")}),m.outerHTML}catch{return String(l)}}),o=c.computed(()=>e.type==="launchIssue"?"24px":"16px"),a=c.computed(()=>e.warningElement.resetButton?{backgroundColor:e.warningElement.resetButton.bgColor,color:e.warningElement.resetButton.color}:{});return(l,u)=>{var d,f,g,h,m,p,b,k,v,y,_;return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["tw:w-full tw:flex tw:items-center tw:flex-[1_0_0] tw:self-stretch",{"tw:flex-row tw:items-center tw:justify-between":l.type==="connectionIssue"||l.type==="reconnecting","tw:flex-col tw:items-center tw:justify-center tw:h-full":l.type==="launchIssue","tw:p-4":l.warningElement.warningStyle==="gradient","tw:p-2":l.warningElement.warningStyle!=="gradient"}]),style:c.normalizeStyle({...n.value,...s.value,paddingTop:(((d=l.warningElement.content)==null?void 0:d.verticalPadding)||null)+"px",paddingBottom:(((f=l.warningElement.content)==null?void 0:f.verticalPadding)||null)+"px"})},[c.createElementVNode("div",{class:c.normalizeClass(["tw:flex tw:gap-1 tw:items-center svg-inherit",{"tw:flex-row":l.type==="connectionIssue"||l.type==="reconnecting","tw:flex-col ":l.type==="launchIssue"}]),style:c.normalizeStyle({gap:(((g=l.warningElement.content)==null?void 0:g.verticalSpacing)||4)+"px"})},[(h=l.warningElement.content.icon)!=null&&h.showIcon?(c.openBlock(),c.createElementBlock("div",{key:0,style:c.normalizeStyle({color:((m=l.warningElement.content.icon)==null?void 0:m.color)||l.warningElement.content.color,fontSize:o.value,width:(((p=l.warningElement.content.icon)==null?void 0:p.size)||16)+"px",height:(((b=l.warningElement.content.icon)==null?void 0:b.size)||16)+"px"}),class:c.normalizeClass({"tw:w-4 tw:h-4 tw:animate-spin":l.type==="reconnecting"}),innerHTML:i.value},null,14,Ca)):c.createCommentVNode("",!0),c.createElementVNode("div",{class:c.normalizeClass(["tw:transition-all tw:justify-center tw:text-center tw:leading-none",{"tw:text-left tw:text-xs":l.type==="connectionIssue"||l.type==="reconnecting","tw:text-center tw:text-sm":l.type==="launchIssue"}]),innerHTML:c.unref(cn)(l.headlineText),style:c.normalizeStyle({color:((k=l.warningElement.content)==null?void 0:k.headlineColor)||l.warningElement.content.color,fontSize:(((v=l.warningElement.content)==null?void 0:v.headlineTextSize)||l.warningElement.content.fontSize)+"px"})},null,14,xa),c.createElementVNode("p",{class:"tw:text-center tw:justify-center tw:text-xs tw:leading-none",style:c.normalizeStyle({color:l.warningElement.content.color,fontSize:(((y=l.warningElement.content)==null?void 0:y.subTextSize)||l.warningElement.content.fontSize)+"px"}),innerHTML:c.unref(cn)(l.descriptionText)},null,12,Sa)],6),l.warningElement.resetButton?(c.openBlock(),c.createBlock(c.unref(it),{key:0,size:(_=l.warningElement.resetButton)==null?void 0:_.size,class:c.normalizeClass([{"tw:mt-8":l.type==="launchIssue"||l.type==="reconnecting"}]),variant:"default",style:c.normalizeStyle([a.value,t.value]),onClick:l.restartChat},{default:c.withCtx(()=>{var w,C;return[((w=l.warningElement.resetButton)==null?void 0:w.showType)!=="text"?(c.openBlock(),c.createElementBlock("svg",{key:0,width:l.warningElement.resetButton.fontSize?l.warningElement.resetButton.fontSize+4:16,height:l.warningElement.resetButton.fontSize?l.warningElement.resetButton.fontSize+4:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:c.normalizeStyle({fill:l.warningElement.resetButton.color||"#2F2F31"})},u[0]||(u[0]=[c.createElementVNode("path",{d:"M10.7935 1.83337H5.20683C2.78016 1.83337 1.3335 3.28004 1.3335 5.70671V11.2867C1.3335 13.72 2.78016 15.1667 5.20683 15.1667H10.7868C13.2135 15.1667 14.6602 13.72 14.6602 11.2934V5.70671C14.6668 3.28004 13.2202 1.83337 10.7935 1.83337ZM8.00016 12.6667C6.80683 12.6667 5.8735 12.0734 5.24016 11.4867V11.96C5.24016 12.2334 5.0135 12.46 4.74016 12.46C4.46683 12.46 4.24016 12.2334 4.24016 11.96V10.1267C4.24016 9.85337 4.46683 9.62671 4.74016 9.62671H6.3935C6.66683 9.62671 6.8935 9.85337 6.8935 10.1267C6.8935 10.4 6.66683 10.6267 6.3935 10.6267H5.7935C6.28683 11.12 7.0535 11.6667 8.00016 11.6667C9.74683 11.6667 11.1668 10.2467 11.1668 8.50004C11.1668 8.22671 11.3935 8.00004 11.6668 8.00004C11.9402 8.00004 12.1668 8.22671 12.1668 8.50004C12.1668 10.8 10.3002 12.6667 8.00016 12.6667ZM12.1668 6.86004C12.1668 6.88004 12.1668 6.90004 12.1668 6.91337C12.1602 6.98671 12.1402 7.05337 12.1068 7.11337C12.0735 7.17337 12.0268 7.22671 11.9668 7.27337C11.9202 7.30671 11.8668 7.33337 11.8068 7.35337C11.7602 7.36671 11.7135 7.37337 11.6668 7.37337H10.0468C9.7735 7.37337 9.54683 7.14671 9.54683 6.87337C9.54683 6.60004 9.7735 6.37337 10.0468 6.37337H10.6002C10.0668 5.88004 9.20683 5.33337 8.0135 5.33337C6.26683 5.33337 4.84683 6.75337 4.84683 8.50004C4.84683 8.77337 4.62016 9.00004 4.34683 9.00004C4.0735 9.00004 3.8335 8.77337 3.8335 8.50004C3.8335 6.20004 5.70016 4.33337 8.00016 4.33337C9.4335 4.33337 10.4868 4.95337 11.1668 5.54671V5.04004C11.1668 4.76671 11.3935 4.54004 11.6668 4.54004C11.9402 4.54004 12.1668 4.76671 12.1668 5.04004V6.86004Z"},null,-1)]),12,Ta)):c.createCommentVNode("",!0),((C=l.warningElement.resetButton)==null?void 0:C.showType)!=="icon"?(c.openBlock(),c.createElementBlock("span",{key:1,style:c.normalizeStyle({fontSize:l.warningElement.resetButton.fontSize+"px"})},c.toDisplayString(l.resetButtonText||"Restart"),5)):c.createCommentVNode("",!0)]}),_:1},8,["size","class","style","onClick"])):c.createCommentVNode("",!0)],6)}}});function nt(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function ui(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.__proto__=e}/*!
|
|
5
5
|
* GSAP 3.13.0
|
|
6
6
|
* https://gsap.com
|
|
7
7
|
*
|
|
8
8
|
* @license Copyright 2008-2025, GreenSock. All rights reserved.
|
|
9
9
|
* Subject to the terms at https://gsap.com/standard-license
|
|
10
10
|
* @author: Jack Doyle, jack@greensock.com
|
|
11
|
-
*/var ke={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Tt={duration:.5,overwrite:!1,delay:0},rn,ue,q,We=1e8,ge=1/We,Ks=Math.PI*2,To=Ks/4,zo=0,br=Math.sqrt,Ro=Math.cos,Mo=Math.sin,le=function(e){return typeof e=="string"},ee=function(e){return typeof e=="function"},Ge=function(e){return typeof e=="number"},on=function(e){return typeof e>"u"},Ue=function(e){return typeof e=="object"},ye=function(e){return e!==!1},an=function(){return typeof window<"u"},os=function(e){return ee(e)||le(e)},_r=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},pe=Array.isArray,Fs=/(?:-?\.?\d|\.)+/gi,vr=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,_t=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,ks=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,Cr=/[+-]=-?[.\d]+/,xr=/[^,'"\[\]\s]+/gi,Eo=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Z,Ke,Ns,ln,Te={},us={},Sr,kr=function(e){return(us=zt(e,Te))&&ve},cn=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},Gt=function(e,t){return!t&&console.warn(e)},Tr=function(e,t){return e&&(Te[e]=t)&&us&&(us[e]=t)||Te},qt=function(){return 0},Bo={suppressEvents:!0,isStart:!0,kill:!1},as={suppressEvents:!0,kill:!1},Po={suppressEvents:!0},un={},Je=[],Ws={},zr,Ce={},Ts={},Ln=30,ls=[],dn="",fn=function(e){var t=e[0],s,n;if(Ue(t)||ee(t)||(e=[e]),!(s=(t._gsap||{}).harness)){for(n=ls.length;n--&&!ls[n].targetTest(t););s=ls[n]}for(n=e.length;n--;)e[n]&&(e[n]._gsap||(e[n]._gsap=new Xr(e[n],s)))||e.splice(n,1);return e},dt=function(e){return e._gsap||fn(Ee(e))[0]._gsap},Rr=function(e,t,s){return(s=e[t])&&ee(s)?e[t]():on(s)&&e.getAttribute&&e.getAttribute(t)||s},we=function(e,t){return(e=e.split(",")).forEach(t)||e},te=function(e){return Math.round(e*1e5)/1e5||0},re=function(e){return Math.round(e*1e7)/1e7||0},xt=function(e,t){var s=t.charAt(0),n=parseFloat(t.substr(2));return e=parseFloat(e),s==="+"?e+n:s==="-"?e-n:s==="*"?e*n:e/n},Do=function(e,t){for(var s=t.length,n=0;e.indexOf(t[n])<0&&++n<s;);return n<s},ds=function(){var e=Je.length,t=Je.slice(0),s,n;for(Ws={},Je.length=0,s=0;s<e;s++)n=t[s],n&&n._lazy&&(n.render(n._lazy[0],n._lazy[1],!0)._lazy=0)},gn=function(e){return!!(e._initted||e._startAt||e.add)},Mr=function(e,t,s,n){Je.length&&!ue&&ds(),e.render(t,s,!!(ue&&t<0&&gn(e))),Je.length&&!ue&&ds()},Er=function(e){var t=parseFloat(e);return(t||t===0)&&(e+"").match(xr).length<2?t:le(e)?e.trim():e},Br=function(e){return e},ze=function(e,t){for(var s in t)s in e||(e[s]=t[s]);return e},Ao=function(e){return function(t,s){for(var n in s)n in t||n==="duration"&&e||n==="ease"||(t[n]=s[n])}},zt=function(e,t){for(var s in t)e[s]=t[s];return e},In=function i(e,t){for(var s in t)s!=="__proto__"&&s!=="constructor"&&s!=="prototype"&&(e[s]=Ue(t[s])?i(e[s]||(e[s]={}),t[s]):t[s]);return e},fs=function(e,t){var s={},n;for(n in e)n in t||(s[n]=e[n]);return s},Ut=function(e){var t=e.parent||Z,s=e.keyframes?Ao(pe(e.keyframes)):ze;if(ye(e.inherit))for(;t;)s(e,t.vars.defaults),t=t.parent||t._dp;return e},Oo=function(e,t){for(var s=e.length,n=s===t.length;n&&s--&&e[s]===t[s];);return s<0},Pr=function(e,t,s,n,r){var o=e[n],a;if(r)for(a=t[r];o&&o[r]>a;)o=o._prev;return o?(t._next=o._next,o._next=t):(t._next=e[s],e[s]=t),t._next?t._next._prev=t:e[n]=t,t._prev=o,t.parent=t._dp=e,t},ys=function(e,t,s,n){s===void 0&&(s="_first"),n===void 0&&(n="_last");var r=t._prev,o=t._next;r?r._next=o:e[s]===t&&(e[s]=o),o?o._prev=r:e[n]===t&&(e[n]=r),t._next=t._prev=t.parent=null},tt=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},ft=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var s=e;s;)s._dirty=1,s=s.parent;return e},Lo=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},Us=function(e,t,s,n){return e._startAt&&(ue?e._startAt.revert(as):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,n))},Io=function i(e){return!e||e._ts&&i(e.parent)},Vn=function(e){return e._repeat?Rt(e._tTime,e=e.duration()+e._rDelay)*e:0},Rt=function(e,t){var s=Math.floor(e=re(e/t));return e&&s===e?s-1:s},gs=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},ws=function(e){return e._end=re(e._start+(e._tDur/Math.abs(e._ts||e._rts||ge)||0))},bs=function(e,t){var s=e._dp;return s&&s.smoothChildTiming&&e._ts&&(e._start=re(s._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),ws(e),s._dirty||ft(s,e)),e},Dr=function(e,t){var s;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(s=gs(e.rawTime(),t),(!t._dur||es(0,t.totalDuration(),s)-t._tTime>ge)&&t.render(s,!0)),ft(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(s=e;s._dp;)s.rawTime()>=0&&s.totalTime(s._tTime),s=s._dp;e._zTime=-1e-8}},Fe=function(e,t,s,n){return t.parent&&tt(t),t._start=re((Ge(s)?s:s||e!==Z?Me(e,s,t):e._time)+t._delay),t._end=re(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),Pr(e,t,"_first","_last",e._sort?"_start":0),$s(t)||(e._recent=t),n||Dr(e,t),e._ts<0&&bs(e,e._tTime),e},Ar=function(e,t){return(Te.ScrollTrigger||cn("scrollTrigger",t))&&Te.ScrollTrigger.create(t,e)},Or=function(e,t,s,n,r){if(hn(e,t,r),!e._initted)return 1;if(!s&&e._pt&&!ue&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&zr!==xe.frame)return Je.push(e),e._lazy=[r,n],1},Vo=function i(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||i(t))},$s=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},Ko=function(e,t,s,n){var r=e.ratio,o=t<0||!t&&(!e._start&&Vo(e)&&!(!e._initted&&$s(e))||(e._ts<0||e._dp._ts<0)&&!$s(e))?0:1,a=e._rDelay,l=0,u,d,p;if(a&&e._repeat&&(l=es(0,e._tDur,t),d=Rt(l,a),e._yoyo&&d&1&&(o=1-o),d!==Rt(e._tTime,a)&&(r=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==r||ue||n||e._zTime===ge||!t&&e._zTime){if(!e._initted&&Or(e,t,n,s,l))return;for(p=e._zTime,e._zTime=t||(s?ge:0),s||(s=t&&!p),e.ratio=o,e._from&&(o=1-o),e._time=0,e._tTime=l,u=e._pt;u;)u.r(o,u.d),u=u._next;t<0&&Us(e,t,s,!0),e._onUpdate&&!s&&Se(e,"onUpdate"),l&&e._repeat&&!s&&e.parent&&Se(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===o&&(o&&tt(e,1),!s&&!ue&&(Se(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},Fo=function(e,t,s){var n;if(s>t)for(n=e._first;n&&n._start<=s;){if(n.data==="isPause"&&n._start>t)return n;n=n._next}else for(n=e._last;n&&n._start>=s;){if(n.data==="isPause"&&n._start<t)return n;n=n._prev}},Mt=function(e,t,s,n){var r=e._repeat,o=re(t)||0,a=e._tTime/e._tDur;return a&&!n&&(e._time*=o/e._dur),e._dur=o,e._tDur=r?r<0?1e10:re(o*(r+1)+e._rDelay*r):o,a>0&&!n&&bs(e,e._tTime=e._tDur*a),e.parent&&ws(e),s||ft(e.parent,e),e},Kn=function(e){return e instanceof me?ft(e):Mt(e,e._dur)},No={_start:0,endTime:qt,totalDuration:qt},Me=function i(e,t,s){var n=e.labels,r=e._recent||No,o=e.duration()>=We?r.endTime(!1):e._dur,a,l,u;return le(t)&&(isNaN(t)||t in n)?(l=t.charAt(0),u=t.substr(-1)==="%",a=t.indexOf("="),l==="<"||l===">"?(a>=0&&(t=t.replace(/=/,"")),(l==="<"?r._start:r.endTime(r._repeat>=0))+(parseFloat(t.substr(1))||0)*(u?(a<0?r:s).totalDuration()/100:1)):a<0?(t in n||(n[t]=o),n[t]):(l=parseFloat(t.charAt(a-1)+t.substr(a+1)),u&&s&&(l=l/100*(pe(s)?s[0]:s).totalDuration()),a>1?i(e,t.substr(0,a-1),s)+l:o+l)):t==null?o:+t},$t=function(e,t,s){var n=Ge(t[1]),r=(n?2:1)+(e<2?0:1),o=t[r],a,l;if(n&&(o.duration=t[1]),o.parent=s,e){for(a=o,l=s;l&&!("immediateRender"in a);)a=l.vars.defaults||{},l=ye(l.vars.inherit)&&l.parent;o.immediateRender=ye(a.immediateRender),e<2?o.runBackwards=1:o.startAt=t[r-1]}return new ne(t[0],o,t[r+1])},nt=function(e,t){return e||e===0?t(e):t},es=function(e,t,s){return s<e?e:s>t?t:s},fe=function(e,t){return!le(e)||!(t=Eo.exec(e))?"":t[1]},Wo=function(e,t,s){return nt(s,function(n){return es(e,t,n)})},Hs=[].slice,Lr=function(e,t){return e&&Ue(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&Ue(e[0]))&&!e.nodeType&&e!==Ke},Uo=function(e,t,s){return s===void 0&&(s=[]),e.forEach(function(n){var r;return le(n)&&!t||Lr(n,1)?(r=s).push.apply(r,Ee(n)):s.push(n)})||s},Ee=function(e,t,s){return q&&!t&&q.selector?q.selector(e):le(e)&&!s&&(Ns||!Et())?Hs.call((t||ln).querySelectorAll(e),0):pe(e)?Uo(e,s):Lr(e)?Hs.call(e,0):e?[e]:[]},js=function(e){return e=Ee(e)[0]||Gt("Invalid scope")||{},function(t){var s=e.current||e.nativeElement||e;return Ee(t,s.querySelectorAll?s:s===e?Gt("Invalid scope")||ln.createElement("div"):e)}},Ir=function(e){return e.sort(function(){return .5-Math.random()})},Vr=function(e){if(ee(e))return e;var t=Ue(e)?e:{each:e},s=gt(t.ease),n=t.from||0,r=parseFloat(t.base)||0,o={},a=n>0&&n<1,l=isNaN(n)||a,u=t.axis,d=n,p=n;return le(n)?d=p={center:.5,edges:.5,end:1}[n]||0:!a&&l&&(d=n[0],p=n[1]),function(h,g,y){var f=(y||t).length,m=o[f],_,S,w,C,b,k,z,x,v;if(!m){if(v=t.grid==="auto"?0:(t.grid||[1,We])[1],!v){for(z=-1e8;z<(z=y[v++].getBoundingClientRect().left)&&v<f;);v<f&&v--}for(m=o[f]=[],_=l?Math.min(v,f)*d-.5:n%v,S=v===We?0:l?f*p/v-.5:n/v|0,z=0,x=We,k=0;k<f;k++)w=k%v-_,C=S-(k/v|0),m[k]=b=u?Math.abs(u==="y"?C:w):br(w*w+C*C),b>z&&(z=b),b<x&&(x=b);n==="random"&&Ir(m),m.max=z-x,m.min=x,m.v=f=(parseFloat(t.amount)||parseFloat(t.each)*(v>f?f-1:u?u==="y"?f/v:v:Math.max(v,f/v))||0)*(n==="edges"?-1:1),m.b=f<0?r-f:r,m.u=fe(t.amount||t.each)||0,s=s&&f<0?qr(s):s}return f=(m[h]-m.min)/m.max||0,re(m.b+(s?s(f):f)*m.v)+m.u}},Gs=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(s){var n=re(Math.round(parseFloat(s)/e)*e*t);return(n-n%1)/t+(Ge(s)?0:fe(s))}},Kr=function(e,t){var s=pe(e),n,r;return!s&&Ue(e)&&(n=s=e.radius||We,e.values?(e=Ee(e.values),(r=!Ge(e[0]))&&(n*=n)):e=Gs(e.increment)),nt(t,s?ee(e)?function(o){return r=e(o),Math.abs(r-o)<=n?r:o}:function(o){for(var a=parseFloat(r?o.x:o),l=parseFloat(r?o.y:0),u=We,d=0,p=e.length,h,g;p--;)r?(h=e[p].x-a,g=e[p].y-l,h=h*h+g*g):h=Math.abs(e[p]-a),h<u&&(u=h,d=p);return d=!n||u<=n?e[d]:o,r||d===o||Ge(o)?d:d+fe(o)}:Gs(e))},Fr=function(e,t,s,n){return nt(pe(e)?!t:s===!0?!!(s=0):!n,function(){return pe(e)?e[~~(Math.random()*e.length)]:(s=s||1e-5)&&(n=s<1?Math.pow(10,(s+"").length-2):1)&&Math.floor(Math.round((e-s/2+Math.random()*(t-e+s*.99))/s)*s*n)/n})},$o=function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return function(n){return t.reduce(function(r,o){return o(r)},n)}},Ho=function(e,t){return function(s){return e(parseFloat(s))+(t||fe(s))}},jo=function(e,t,s){return Wr(e,t,0,1,s)},Nr=function(e,t,s){return nt(s,function(n){return e[~~t(n)]})},Go=function i(e,t,s){var n=t-e;return pe(e)?Nr(e,i(0,e.length),t):nt(s,function(r){return(n+(r-e)%n)%n+e})},qo=function i(e,t,s){var n=t-e,r=n*2;return pe(e)?Nr(e,i(0,e.length-1),t):nt(s,function(o){return o=(r+(o-e)%r)%r||0,e+(o>n?r-o:o)})},Yt=function(e){for(var t=0,s="",n,r,o,a;~(n=e.indexOf("random(",t));)o=e.indexOf(")",n),a=e.charAt(n+7)==="[",r=e.substr(n+7,o-n-7).match(a?xr:Fs),s+=e.substr(t,n-t)+Fr(a?r:+r[0],a?0:+r[1],+r[2]||1e-5),t=o+1;return s+e.substr(t,e.length-t)},Wr=function(e,t,s,n,r){var o=t-e,a=n-s;return nt(r,function(l){return s+((l-e)/o*a||0)})},Yo=function i(e,t,s,n){var r=isNaN(e+t)?0:function(g){return(1-g)*e+g*t};if(!r){var o=le(e),a={},l,u,d,p,h;if(s===!0&&(n=1)&&(s=null),o)e={p:e},t={p:t};else if(pe(e)&&!pe(t)){for(d=[],p=e.length,h=p-2,u=1;u<p;u++)d.push(i(e[u-1],e[u]));p--,r=function(y){y*=p;var f=Math.min(h,~~y);return d[f](y-f)},s=t}else n||(e=zt(pe(e)?[]:{},e));if(!d){for(l in t)pn.call(a,e,l,"get",t[l]);r=function(y){return wn(y,a)||(o?e.p:e)}}}return nt(s,r)},Fn=function(e,t,s){var n=e.labels,r=We,o,a,l;for(o in n)a=n[o]-t,a<0==!!s&&a&&r>(a=Math.abs(a))&&(l=o,r=a);return l},Se=function(e,t,s){var n=e.vars,r=n[t],o=q,a=e._ctx,l,u,d;if(r)return l=n[t+"Params"],u=n.callbackScope||e,s&&Je.length&&ds(),a&&(q=a),d=l?r.apply(u,l):r.call(u),q=o,d},Nt=function(e){return tt(e),e.scrollTrigger&&e.scrollTrigger.kill(!!ue),e.progress()<1&&Se(e,"onInterrupt"),e},vt,Ur=[],$r=function(e){if(e)if(e=!e.name&&e.default||e,an()||e.headless){var t=e.name,s=ee(e),n=t&&!s&&e.init?function(){this._props=[]}:e,r={init:qt,render:wn,add:pn,kill:da,modifier:ua,rawVars:0},o={targetTest:0,get:0,getSetter:yn,aliases:{},register:0};if(Et(),e!==n){if(Ce[t])return;ze(n,ze(fs(e,r),o)),zt(n.prototype,zt(r,fs(e,o))),Ce[n.prop=t]=n,e.targetTest&&(ls.push(n),un[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}Tr(t,n),e.register&&e.register(ve,n,be)}else Ur.push(e)},$=255,Wt={aqua:[0,$,$],lime:[0,$,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,$],navy:[0,0,128],white:[$,$,$],olive:[128,128,0],yellow:[$,$,0],orange:[$,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[$,0,0],pink:[$,192,203],cyan:[0,$,$],transparent:[$,$,$,0]},zs=function(e,t,s){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(s-t)*e*6:e<.5?s:e*3<2?t+(s-t)*(2/3-e)*6:t)*$+.5|0},Hr=function(e,t,s){var n=e?Ge(e)?[e>>16,e>>8&$,e&$]:0:Wt.black,r,o,a,l,u,d,p,h,g,y;if(!n){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),Wt[e])n=Wt[e];else if(e.charAt(0)==="#"){if(e.length<6&&(r=e.charAt(1),o=e.charAt(2),a=e.charAt(3),e="#"+r+r+o+o+a+a+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return n=parseInt(e.substr(1,6),16),[n>>16,n>>8&$,n&$,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),n=[e>>16,e>>8&$,e&$]}else if(e.substr(0,3)==="hsl"){if(n=y=e.match(Fs),!t)l=+n[0]%360/360,u=+n[1]/100,d=+n[2]/100,o=d<=.5?d*(u+1):d+u-d*u,r=d*2-o,n.length>3&&(n[3]*=1),n[0]=zs(l+1/3,r,o),n[1]=zs(l,r,o),n[2]=zs(l-1/3,r,o);else if(~e.indexOf("="))return n=e.match(vr),s&&n.length<4&&(n[3]=1),n}else n=e.match(Fs)||Wt.transparent;n=n.map(Number)}return t&&!y&&(r=n[0]/$,o=n[1]/$,a=n[2]/$,p=Math.max(r,o,a),h=Math.min(r,o,a),d=(p+h)/2,p===h?l=u=0:(g=p-h,u=d>.5?g/(2-p-h):g/(p+h),l=p===r?(o-a)/g+(o<a?6:0):p===o?(a-r)/g+2:(r-o)/g+4,l*=60),n[0]=~~(l+.5),n[1]=~~(u*100+.5),n[2]=~~(d*100+.5)),s&&n.length<4&&(n[3]=1),n},jr=function(e){var t=[],s=[],n=-1;return e.split(et).forEach(function(r){var o=r.match(_t)||[];t.push.apply(t,o),s.push(n+=o.length+1)}),t.c=s,t},Nn=function(e,t,s){var n="",r=(e+n).match(et),o=t?"hsla(":"rgba(",a=0,l,u,d,p;if(!r)return e;if(r=r.map(function(h){return(h=Hr(h,t,1))&&o+(t?h[0]+","+h[1]+"%,"+h[2]+"%,"+h[3]:h.join(","))+")"}),s&&(d=jr(e),l=s.c,l.join(n)!==d.c.join(n)))for(u=e.replace(et,"1").split(_t),p=u.length-1;a<p;a++)n+=u[a]+(~l.indexOf(a)?r.shift()||o+"0,0,0,0)":(d.length?d:r.length?r:s).shift());if(!u)for(u=e.split(et),p=u.length-1;a<p;a++)n+=u[a]+r[a];return n+u[p]},et=function(){var i="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in Wt)i+="|"+e+"\\b";return new RegExp(i+")","gi")}(),Zo=/hsl[a]?\(/,Gr=function(e){var t=e.join(" "),s;if(et.lastIndex=0,et.test(t))return s=Zo.test(t),e[1]=Nn(e[1],s),e[0]=Nn(e[0],s,jr(e[1])),!0},Zt,xe=function(){var i=Date.now,e=500,t=33,s=i(),n=s,r=1e3/240,o=r,a=[],l,u,d,p,h,g,y=function f(m){var _=i()-n,S=m===!0,w,C,b,k;if((_>e||_<0)&&(s+=_-t),n+=_,b=n-s,w=b-o,(w>0||S)&&(k=++p.frame,h=b-p.time*1e3,p.time=b=b/1e3,o+=w+(w>=r?4:r-w),C=1),S||(l=u(f)),C)for(g=0;g<a.length;g++)a[g](b,h,k,m)};return p={time:0,frame:0,tick:function(){y(!0)},deltaRatio:function(m){return h/(1e3/(m||60))},wake:function(){Sr&&(!Ns&&an()&&(Ke=Ns=window,ln=Ke.document||{},Te.gsap=ve,(Ke.gsapVersions||(Ke.gsapVersions=[])).push(ve.version),kr(us||Ke.GreenSockGlobals||!Ke.gsap&&Ke||{}),Ur.forEach($r)),d=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&p.sleep(),u=d||function(m){return setTimeout(m,o-p.time*1e3+1|0)},Zt=1,y(2))},sleep:function(){(d?cancelAnimationFrame:clearTimeout)(l),Zt=0,u=qt},lagSmoothing:function(m,_){e=m||1/0,t=Math.min(_||33,e)},fps:function(m){r=1e3/(m||240),o=p.time*1e3+r},add:function(m,_,S){var w=_?function(C,b,k,z){m(C,b,k,z),p.remove(w)}:m;return p.remove(m),a[S?"unshift":"push"](w),Et(),w},remove:function(m,_){~(_=a.indexOf(m))&&a.splice(_,1)&&g>=_&&g--},_listeners:a},p}(),Et=function(){return!Zt&&xe.wake()},F={},Xo=/^[\d.\-M][\d.\-,\s]/,Qo=/["']/g,Jo=function(e){for(var t={},s=e.substr(1,e.length-3).split(":"),n=s[0],r=1,o=s.length,a,l,u;r<o;r++)l=s[r],a=r!==o-1?l.lastIndexOf(","):l.length,u=l.substr(0,a),t[n]=isNaN(u)?u.replace(Qo,"").trim():+u,n=l.substr(a+1).trim();return t},ea=function(e){var t=e.indexOf("(")+1,s=e.indexOf(")"),n=e.indexOf("(",t);return e.substring(t,~n&&n<s?e.indexOf(")",s+1):s)},ta=function(e){var t=(e+"").split("("),s=F[t[0]];return s&&t.length>1&&s.config?s.config.apply(null,~e.indexOf("{")?[Jo(t[1])]:ea(e).split(",").map(Er)):F._CE&&Xo.test(e)?F._CE("",e):s},qr=function(e){return function(t){return 1-e(1-t)}},Yr=function i(e,t){for(var s=e._first,n;s;)s instanceof me?i(s,t):s.vars.yoyoEase&&(!s._yoyo||!s._repeat)&&s._yoyo!==t&&(s.timeline?i(s.timeline,t):(n=s._ease,s._ease=s._yEase,s._yEase=n,s._yoyo=t)),s=s._next},gt=function(e,t){return e&&(ee(e)?e:F[e]||ta(e))||t},mt=function(e,t,s,n){s===void 0&&(s=function(l){return 1-t(1-l)}),n===void 0&&(n=function(l){return l<.5?t(l*2)/2:1-t((1-l)*2)/2});var r={easeIn:t,easeOut:s,easeInOut:n},o;return we(e,function(a){F[a]=Te[a]=r,F[o=a.toLowerCase()]=s;for(var l in r)F[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=F[a+"."+l]=r[l]}),r},Zr=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},Rs=function i(e,t,s){var n=t>=1?t:1,r=(s||(e?.3:.45))/(t<1?t:1),o=r/Ks*(Math.asin(1/n)||0),a=function(d){return d===1?1:n*Math.pow(2,-10*d)*Mo((d-o)*r)+1},l=e==="out"?a:e==="in"?function(u){return 1-a(1-u)}:Zr(a);return r=Ks/r,l.config=function(u,d){return i(e,u,d)},l},Ms=function i(e,t){t===void 0&&(t=1.70158);var s=function(o){return o?--o*o*((t+1)*o+t)+1:0},n=e==="out"?s:e==="in"?function(r){return 1-s(1-r)}:Zr(s);return n.config=function(r){return i(e,r)},n};we("Linear,Quad,Cubic,Quart,Quint,Strong",function(i,e){var t=e<5?e+1:e;mt(i+",Power"+(t-1),e?function(s){return Math.pow(s,t)}:function(s){return s},function(s){return 1-Math.pow(1-s,t)},function(s){return s<.5?Math.pow(s*2,t)/2:1-Math.pow((1-s)*2,t)/2})});F.Linear.easeNone=F.none=F.Linear.easeIn;mt("Elastic",Rs("in"),Rs("out"),Rs());(function(i,e){var t=1/e,s=2*t,n=2.5*t,r=function(a){return a<t?i*a*a:a<s?i*Math.pow(a-1.5/e,2)+.75:a<n?i*(a-=2.25/e)*a+.9375:i*Math.pow(a-2.625/e,2)+.984375};mt("Bounce",function(o){return 1-r(1-o)},r)})(7.5625,2.75);mt("Expo",function(i){return Math.pow(2,10*(i-1))*i+i*i*i*i*i*i*(1-i)});mt("Circ",function(i){return-(br(1-i*i)-1)});mt("Sine",function(i){return i===1?1:-Ro(i*To)+1});mt("Back",Ms("in"),Ms("out"),Ms());F.SteppedEase=F.steps=Te.SteppedEase={config:function(e,t){e===void 0&&(e=1);var s=1/e,n=e+(t?0:1),r=t?1:0,o=1-ge;return function(a){return((n*es(0,o,a)|0)+r)*s}}};Tt.ease=F["quad.out"];we("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(i){return dn+=i+","+i+"Params,"});var Xr=function(e,t){this.id=zo++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:Rr,this.set=t?t.getSetter:yn},Xt=function(){function i(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,Mt(this,+t.duration,1,1),this.data=t.data,q&&(this._ctx=q,q.data.push(this)),Zt||xe.wake()}var e=i.prototype;return e.delay=function(s){return s||s===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+s-this._delay),this._delay=s,this):this._delay},e.duration=function(s){return arguments.length?this.totalDuration(this._repeat>0?s+(s+this._rDelay)*this._repeat:s):this.totalDuration()&&this._dur},e.totalDuration=function(s){return arguments.length?(this._dirty=0,Mt(this,this._repeat<0?s:(s-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(s,n){if(Et(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(bs(this,s),!r._dp||r.parent||Dr(r,this);r&&r.parent;)r.parent._time!==r._start+(r._ts>=0?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&s<this._tDur||this._ts<0&&s>0||!this._tDur&&!s)&&Fe(this._dp,this,this._start-this._delay)}return(this._tTime!==s||!this._dur&&!n||this._initted&&Math.abs(this._zTime)===ge||!s&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=s),Mr(this,s,n)),this},e.time=function(s,n){return arguments.length?this.totalTime(Math.min(this.totalDuration(),s+Vn(this))%(this._dur+this._rDelay)||(s?this._dur:0),n):this._time},e.totalProgress=function(s,n){return arguments.length?this.totalTime(this.totalDuration()*s,n):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(s,n){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-s:s)+Vn(this),n):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(s,n){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(s-1)*r,n):this._repeat?Rt(this._tTime,r)+1:1},e.timeScale=function(s,n){if(!arguments.length)return this._rts===-1e-8?0:this._rts;if(this._rts===s)return this;var r=this.parent&&this._ts?gs(this.parent._time,this):this._tTime;return this._rts=+s||0,this._ts=this._ps||s===-1e-8?0:this._rts,this.totalTime(es(-Math.abs(this._delay),this.totalDuration(),r),n!==!1),ws(this),Lo(this)},e.paused=function(s){return arguments.length?(this._ps!==s&&(this._ps=s,s?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Et(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==ge&&(this._tTime-=ge)))),this):this._ps},e.startTime=function(s){if(arguments.length){this._start=s;var n=this.parent||this._dp;return n&&(n._sort||!this.parent)&&Fe(n,this,s-this._delay),this}return this._start},e.endTime=function(s){return this._start+(ye(s)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(s){var n=this.parent||this._dp;return n?s&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?gs(n.rawTime(s),this):this._tTime:this._tTime},e.revert=function(s){s===void 0&&(s=Po);var n=ue;return ue=s,gn(this)&&(this.timeline&&this.timeline.revert(s),this.totalTime(-.01,s.suppressEvents)),this.data!=="nested"&&s.kill!==!1&&this.kill(),ue=n,this},e.globalTime=function(s){for(var n=this,r=arguments.length?s:n.rawTime();n;)r=n._start+r/(Math.abs(n._ts)||1),n=n._dp;return!this.parent&&this._sat?this._sat.globalTime(s):r},e.repeat=function(s){return arguments.length?(this._repeat=s===1/0?-2:s,Kn(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(s){if(arguments.length){var n=this._time;return this._rDelay=s,Kn(this),n?this.time(n):this}return this._rDelay},e.yoyo=function(s){return arguments.length?(this._yoyo=s,this):this._yoyo},e.seek=function(s,n){return this.totalTime(Me(this,s),ye(n))},e.restart=function(s,n){return this.play().totalTime(s?-this._delay:0,ye(n)),this._dur||(this._zTime=-1e-8),this},e.play=function(s,n){return s!=null&&this.seek(s,n),this.reversed(!1).paused(!1)},e.reverse=function(s,n){return s!=null&&this.seek(s||this.totalDuration(),n),this.reversed(!0).paused(!1)},e.pause=function(s,n){return s!=null&&this.seek(s,n),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(s){return arguments.length?(!!s!==this.reversed()&&this.timeScale(-this._rts||(s?-1e-8:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-1e-8,this},e.isActive=function(){var s=this.parent||this._dp,n=this._start,r;return!!(!s||this._ts&&this._initted&&s.isActive()&&(r=s.rawTime(!0))>=n&&r<this.endTime(!0)-ge)},e.eventCallback=function(s,n,r){var o=this.vars;return arguments.length>1?(n?(o[s]=n,r&&(o[s+"Params"]=r),s==="onUpdate"&&(this._onUpdate=n)):delete o[s],this):o[s]},e.then=function(s){var n=this;return new Promise(function(r){var o=ee(s)?s:Br,a=function(){var u=n.then;n.then=null,ee(o)&&(o=o(n))&&(o.then||o===n)&&(n.then=u),r(o),n.then=u};n._initted&&n.totalProgress()===1&&n._ts>=0||!n._tTime&&n._ts<0?a():n._prom=a})},e.kill=function(){Nt(this)},i}();ze(Xt.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-1e-8,_prom:0,_ps:!1,_rts:1});var me=function(i){wr(e,i);function e(s,n){var r;return s===void 0&&(s={}),r=i.call(this,s)||this,r.labels={},r.smoothChildTiming=!!s.smoothChildTiming,r.autoRemoveChildren=!!s.autoRemoveChildren,r._sort=ye(s.sortChildren),Z&&Fe(s.parent||Z,He(r),n),s.reversed&&r.reverse(),s.paused&&r.paused(!0),s.scrollTrigger&&Ar(He(r),s.scrollTrigger),r}var t=e.prototype;return t.to=function(n,r,o){return $t(0,arguments,this),this},t.from=function(n,r,o){return $t(1,arguments,this),this},t.fromTo=function(n,r,o,a){return $t(2,arguments,this),this},t.set=function(n,r,o){return r.duration=0,r.parent=this,Ut(r).repeatDelay||(r.repeat=0),r.immediateRender=!!r.immediateRender,new ne(n,r,Me(this,o),1),this},t.call=function(n,r,o){return Fe(this,ne.delayedCall(0,n,r),o)},t.staggerTo=function(n,r,o,a,l,u,d){return o.duration=r,o.stagger=o.stagger||a,o.onComplete=u,o.onCompleteParams=d,o.parent=this,new ne(n,o,Me(this,l)),this},t.staggerFrom=function(n,r,o,a,l,u,d){return o.runBackwards=1,Ut(o).immediateRender=ye(o.immediateRender),this.staggerTo(n,r,o,a,l,u,d)},t.staggerFromTo=function(n,r,o,a,l,u,d,p){return a.startAt=o,Ut(a).immediateRender=ye(a.immediateRender),this.staggerTo(n,r,a,l,u,d,p)},t.render=function(n,r,o){var a=this._time,l=this._dirty?this.totalDuration():this._tDur,u=this._dur,d=n<=0?0:re(n),p=this._zTime<0!=n<0&&(this._initted||!u),h,g,y,f,m,_,S,w,C,b,k,z;if(this!==Z&&d>l&&n>=0&&(d=l),d!==this._tTime||o||p){if(a!==this._time&&u&&(d+=this._time-a,n+=this._time-a),h=d,C=this._start,w=this._ts,_=!w,p&&(u||(a=this._zTime),(n||!r)&&(this._zTime=n)),this._repeat){if(k=this._yoyo,m=u+this._rDelay,this._repeat<-1&&n<0)return this.totalTime(m*100+n,r,o);if(h=re(d%m),d===l?(f=this._repeat,h=u):(b=re(d/m),f=~~b,f&&f===b&&(h=u,f--),h>u&&(h=u)),b=Rt(this._tTime,m),!a&&this._tTime&&b!==f&&this._tTime-b*m-this._dur<=0&&(b=f),k&&f&1&&(h=u-h,z=1),f!==b&&!this._lock){var x=k&&b&1,v=x===(k&&f&1);if(f<b&&(x=!x),a=x?0:d%u?u:d,this._lock=1,this.render(a||(z?0:re(f*m)),r,!u)._lock=0,this._tTime=d,!r&&this.parent&&Se(this,"onRepeat"),this.vars.repeatRefresh&&!z&&(this.invalidate()._lock=1),a&&a!==this._time||_!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(u=this._dur,l=this._tDur,v&&(this._lock=2,a=x?u:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!z&&this.invalidate()),this._lock=0,!this._ts&&!_)return this;Yr(this,z)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(S=Fo(this,re(a),re(h)),S&&(d-=h-(h=S._start))),this._tTime=d,this._time=h,this._act=!w,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=n,a=0),!a&&d&&!r&&!b&&(Se(this,"onStart"),this._tTime!==d))return this;if(h>=a&&n>=0)for(g=this._first;g;){if(y=g._next,(g._act||h>=g._start)&&g._ts&&S!==g){if(g.parent!==this)return this.render(n,r,o);if(g.render(g._ts>0?(h-g._start)*g._ts:(g._dirty?g.totalDuration():g._tDur)+(h-g._start)*g._ts,r,o),h!==this._time||!this._ts&&!_){S=0,y&&(d+=this._zTime=-1e-8);break}}g=y}else{g=this._last;for(var A=n<0?n:h;g;){if(y=g._prev,(g._act||A<=g._end)&&g._ts&&S!==g){if(g.parent!==this)return this.render(n,r,o);if(g.render(g._ts>0?(A-g._start)*g._ts:(g._dirty?g.totalDuration():g._tDur)+(A-g._start)*g._ts,r,o||ue&&gn(g)),h!==this._time||!this._ts&&!_){S=0,y&&(d+=this._zTime=A?-1e-8:ge);break}}g=y}}if(S&&!r&&(this.pause(),S.render(h>=a?0:-1e-8)._zTime=h>=a?1:-1,this._ts))return this._start=C,ws(this),this.render(n,r,o);this._onUpdate&&!r&&Se(this,"onUpdate",!0),(d===l&&this._tTime>=this.totalDuration()||!d&&a)&&(C===this._start||Math.abs(w)!==Math.abs(this._ts))&&(this._lock||((n||!u)&&(d===l&&this._ts>0||!d&&this._ts<0)&&tt(this,1),!r&&!(n<0&&!a)&&(d||a||!l)&&(Se(this,d===l&&n>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(d<l&&this.timeScale()>0)&&this._prom())))}return this},t.add=function(n,r){var o=this;if(Ge(r)||(r=Me(this,r,n)),!(n instanceof Xt)){if(pe(n))return n.forEach(function(a){return o.add(a,r)}),this;if(le(n))return this.addLabel(n,r);if(ee(n))n=ne.delayedCall(0,n);else return this}return this!==n?Fe(this,n,r):this},t.getChildren=function(n,r,o,a){n===void 0&&(n=!0),r===void 0&&(r=!0),o===void 0&&(o=!0),a===void 0&&(a=-1e8);for(var l=[],u=this._first;u;)u._start>=a&&(u instanceof ne?r&&l.push(u):(o&&l.push(u),n&&l.push.apply(l,u.getChildren(!0,r,o)))),u=u._next;return l},t.getById=function(n){for(var r=this.getChildren(1,1,1),o=r.length;o--;)if(r[o].vars.id===n)return r[o]},t.remove=function(n){return le(n)?this.removeLabel(n):ee(n)?this.killTweensOf(n):(n.parent===this&&ys(this,n),n===this._recent&&(this._recent=this._last),ft(this))},t.totalTime=function(n,r){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=re(xe.time-(this._ts>0?n/this._ts:(this.totalDuration()-n)/-this._ts))),i.prototype.totalTime.call(this,n,r),this._forcing=0,this):this._tTime},t.addLabel=function(n,r){return this.labels[n]=Me(this,r),this},t.removeLabel=function(n){return delete this.labels[n],this},t.addPause=function(n,r,o){var a=ne.delayedCall(0,r||qt,o);return a.data="isPause",this._hasPause=1,Fe(this,a,Me(this,n))},t.removePause=function(n){var r=this._first;for(n=Me(this,n);r;)r._start===n&&r.data==="isPause"&&tt(r),r=r._next},t.killTweensOf=function(n,r,o){for(var a=this.getTweensOf(n,o),l=a.length;l--;)Ze!==a[l]&&a[l].kill(n,r);return this},t.getTweensOf=function(n,r){for(var o=[],a=Ee(n),l=this._first,u=Ge(r),d;l;)l instanceof ne?Do(l._targets,a)&&(u?(!Ze||l._initted&&l._ts)&&l.globalTime(0)<=r&&l.globalTime(l.totalDuration())>r:!r||l.isActive())&&o.push(l):(d=l.getTweensOf(a,r)).length&&o.push.apply(o,d),l=l._next;return o},t.tweenTo=function(n,r){r=r||{};var o=this,a=Me(o,n),l=r,u=l.startAt,d=l.onStart,p=l.onStartParams,h=l.immediateRender,g,y=ne.to(o,ze({ease:r.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:r.duration||Math.abs((a-(u&&"time"in u?u.time:o._time))/o.timeScale())||ge,onStart:function(){if(o.pause(),!g){var m=r.duration||Math.abs((a-(u&&"time"in u?u.time:o._time))/o.timeScale());y._dur!==m&&Mt(y,m,0,1).render(y._time,!0,!0),g=1}d&&d.apply(y,p||[])}},r));return h?y.render(0):y},t.tweenFromTo=function(n,r,o){return this.tweenTo(r,ze({startAt:{time:Me(this,n)}},o))},t.recent=function(){return this._recent},t.nextLabel=function(n){return n===void 0&&(n=this._time),Fn(this,Me(this,n))},t.previousLabel=function(n){return n===void 0&&(n=this._time),Fn(this,Me(this,n),1)},t.currentLabel=function(n){return arguments.length?this.seek(n,!0):this.previousLabel(this._time+ge)},t.shiftChildren=function(n,r,o){o===void 0&&(o=0);for(var a=this._first,l=this.labels,u;a;)a._start>=o&&(a._start+=n,a._end+=n),a=a._next;if(r)for(u in l)l[u]>=o&&(l[u]+=n);return ft(this)},t.invalidate=function(n){var r=this._first;for(this._lock=0;r;)r.invalidate(n),r=r._next;return i.prototype.invalidate.call(this,n)},t.clear=function(n){n===void 0&&(n=!0);for(var r=this._first,o;r;)o=r._next,this.remove(r),r=o;return this._dp&&(this._time=this._tTime=this._pTime=0),n&&(this.labels={}),ft(this)},t.totalDuration=function(n){var r=0,o=this,a=o._last,l=We,u,d,p;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-n:n));if(o._dirty){for(p=o.parent;a;)u=a._prev,a._dirty&&a.totalDuration(),d=a._start,d>l&&o._sort&&a._ts&&!o._lock?(o._lock=1,Fe(o,a,d-a._delay,1)._lock=0):l=d,d<0&&a._ts&&(r-=d,(!p&&!o._dp||p&&p.smoothChildTiming)&&(o._start+=d/o._ts,o._time-=d,o._tTime-=d),o.shiftChildren(-d,!1,-1/0),l=0),a._end>r&&a._ts&&(r=a._end),a=u;Mt(o,o===Z&&o._time>r?o._time:r,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(n){if(Z._ts&&(Mr(Z,gs(n,Z)),zr=xe.frame),xe.frame>=Ln){Ln+=ke.autoSleep||120;var r=Z._first;if((!r||!r._ts)&&ke.autoSleep&&xe._listeners.length<2){for(;r&&!r._ts;)r=r._next;r||xe.sleep()}}},e}(Xt);ze(me.prototype,{_lock:0,_hasPause:0,_forcing:0});var sa=function(e,t,s,n,r,o,a){var l=new be(this._pt,e,t,0,1,ni,null,r),u=0,d=0,p,h,g,y,f,m,_,S;for(l.b=s,l.e=n,s+="",n+="",(_=~n.indexOf("random("))&&(n=Yt(n)),o&&(S=[s,n],o(S,e,t),s=S[0],n=S[1]),h=s.match(ks)||[];p=ks.exec(n);)y=p[0],f=n.substring(u,p.index),g?g=(g+1)%5:f.substr(-5)==="rgba("&&(g=1),y!==h[d++]&&(m=parseFloat(h[d-1])||0,l._pt={_next:l._pt,p:f||d===1?f:",",s:m,c:y.charAt(1)==="="?xt(m,y)-m:parseFloat(y)-m,m:g&&g<4?Math.round:0},u=ks.lastIndex);return l.c=u<n.length?n.substring(u,n.length):"",l.fp=a,(Cr.test(n)||_)&&(l.e=0),this._pt=l,l},pn=function(e,t,s,n,r,o,a,l,u,d){ee(n)&&(n=n(r||0,e,o));var p=e[t],h=s!=="get"?s:ee(p)?u?e[t.indexOf("set")||!ee(e["get"+t.substr(3)])?t:"get"+t.substr(3)](u):e[t]():p,g=ee(p)?u?aa:ti:mn,y;if(le(n)&&(~n.indexOf("random(")&&(n=Yt(n)),n.charAt(1)==="="&&(y=xt(h,n)+(fe(h)||0),(y||y===0)&&(n=y))),!d||h!==n||qs)return!isNaN(h*n)&&n!==""?(y=new be(this._pt,e,t,+h||0,n-(h||0),typeof p=="boolean"?ca:si,0,g),u&&(y.fp=u),a&&y.modifier(a,this,e),this._pt=y):(!p&&!(t in e)&&cn(t,n),sa.call(this,e,t,h,n,g,l||ke.stringFilter,u))},na=function(e,t,s,n,r){if(ee(e)&&(e=Ht(e,r,t,s,n)),!Ue(e)||e.style&&e.nodeType||pe(e)||_r(e))return le(e)?Ht(e,r,t,s,n):e;var o={},a;for(a in e)o[a]=Ht(e[a],r,t,s,n);return o},Qr=function(e,t,s,n,r,o){var a,l,u,d;if(Ce[e]&&(a=new Ce[e]).init(r,a.rawVars?t[e]:na(t[e],n,r,o,s),s,n,o)!==!1&&(s._pt=l=new be(s._pt,r,e,0,1,a.render,a,0,a.priority),s!==vt))for(u=s._ptLookup[s._targets.indexOf(r)],d=a._props.length;d--;)u[a._props[d]]=l;return a},Ze,qs,hn=function i(e,t,s){var n=e.vars,r=n.ease,o=n.startAt,a=n.immediateRender,l=n.lazy,u=n.onUpdate,d=n.runBackwards,p=n.yoyoEase,h=n.keyframes,g=n.autoRevert,y=e._dur,f=e._startAt,m=e._targets,_=e.parent,S=_&&_.data==="nested"?_.vars.targets:m,w=e._overwrite==="auto"&&!rn,C=e.timeline,b,k,z,x,v,A,N,V,D,G,U,K,W;if(C&&(!h||!r)&&(r="none"),e._ease=gt(r,Tt.ease),e._yEase=p?qr(gt(p===!0?r:p,Tt.ease)):0,p&&e._yoyo&&!e._repeat&&(p=e._yEase,e._yEase=e._ease,e._ease=p),e._from=!C&&!!n.runBackwards,!C||h&&!n.stagger){if(V=m[0]?dt(m[0]).harness:0,K=V&&n[V.prop],b=fs(n,un),f&&(f._zTime<0&&f.progress(1),t<0&&d&&a&&!g?f.render(-1,!0):f.revert(d&&y?as:Bo),f._lazy=0),o){if(tt(e._startAt=ne.set(m,ze({data:"isStart",overwrite:!1,parent:_,immediateRender:!0,lazy:!f&&ye(l),startAt:null,delay:0,onUpdate:u&&function(){return Se(e,"onUpdate")},stagger:0},o))),e._startAt._dp=0,e._startAt._sat=e,t<0&&(ue||!a&&!g)&&e._startAt.revert(as),a&&y&&t<=0&&s<=0){t&&(e._zTime=t);return}}else if(d&&y&&!f){if(t&&(a=!1),z=ze({overwrite:!1,data:"isFromStart",lazy:a&&!f&&ye(l),immediateRender:a,stagger:0,parent:_},b),K&&(z[V.prop]=K),tt(e._startAt=ne.set(m,z)),e._startAt._dp=0,e._startAt._sat=e,t<0&&(ue?e._startAt.revert(as):e._startAt.render(-1,!0)),e._zTime=t,!a)i(e._startAt,ge,ge);else if(!t)return}for(e._pt=e._ptCache=0,l=y&&ye(l)||l&&!y,k=0;k<m.length;k++){if(v=m[k],N=v._gsap||fn(m)[k]._gsap,e._ptLookup[k]=G={},Ws[N.id]&&Je.length&&ds(),U=S===m?k:S.indexOf(v),V&&(D=new V).init(v,K||b,e,U,S)!==!1&&(e._pt=x=new be(e._pt,v,D.name,0,1,D.render,D,0,D.priority),D._props.forEach(function(M){G[M]=x}),D.priority&&(A=1)),!V||K)for(z in b)Ce[z]&&(D=Qr(z,b,e,U,v,S))?D.priority&&(A=1):G[z]=x=pn.call(e,v,z,"get",b[z],U,S,0,n.stringFilter);e._op&&e._op[k]&&e.kill(v,e._op[k]),w&&e._pt&&(Ze=e,Z.killTweensOf(v,G,e.globalTime(t)),W=!e.parent,Ze=0),e._pt&&l&&(Ws[N.id]=1)}A&&ri(e),e._onInit&&e._onInit(e)}e._onUpdate=u,e._initted=(!e._op||e._pt)&&!W,h&&t<=0&&C.render(We,!0,!0)},ra=function(e,t,s,n,r,o,a,l){var u=(e._pt&&e._ptCache||(e._ptCache={}))[t],d,p,h,g;if(!u)for(u=e._ptCache[t]=[],h=e._ptLookup,g=e._targets.length;g--;){if(d=h[g][t],d&&d.d&&d.d._pt)for(d=d.d._pt;d&&d.p!==t&&d.fp!==t;)d=d._next;if(!d)return qs=1,e.vars[t]="+=0",hn(e,a),qs=0,l?Gt(t+" not eligible for reset"):1;u.push(d)}for(g=u.length;g--;)p=u[g],d=p._pt||p,d.s=(n||n===0)&&!r?n:d.s+(n||0)+o*d.c,d.c=s-d.s,p.e&&(p.e=te(s)+fe(p.e)),p.b&&(p.b=d.s+fe(p.b))},ia=function(e,t){var s=e[0]?dt(e[0]).harness:0,n=s&&s.aliases,r,o,a,l;if(!n)return t;r=zt({},t);for(o in n)if(o in r)for(l=n[o].split(","),a=l.length;a--;)r[l[a]]=r[o];return r},oa=function(e,t,s,n){var r=t.ease||n||"power1.inOut",o,a;if(pe(t))a=s[e]||(s[e]=[]),t.forEach(function(l,u){return a.push({t:u/(t.length-1)*100,v:l,e:r})});else for(o in t)a=s[o]||(s[o]=[]),o==="ease"||a.push({t:parseFloat(e),v:t[o],e:r})},Ht=function(e,t,s,n,r){return ee(e)?e.call(t,s,n,r):le(e)&&~e.indexOf("random(")?Yt(e):e},Jr=dn+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",ei={};we(Jr+",id,stagger,delay,duration,paused,scrollTrigger",function(i){return ei[i]=1});var ne=function(i){wr(e,i);function e(s,n,r,o){var a;typeof n=="number"&&(r.duration=n,n=r,r=null),a=i.call(this,o?n:Ut(n))||this;var l=a.vars,u=l.duration,d=l.delay,p=l.immediateRender,h=l.stagger,g=l.overwrite,y=l.keyframes,f=l.defaults,m=l.scrollTrigger,_=l.yoyoEase,S=n.parent||Z,w=(pe(s)||_r(s)?Ge(s[0]):"length"in n)?[s]:Ee(s),C,b,k,z,x,v,A,N;if(a._targets=w.length?fn(w):Gt("GSAP target "+s+" not found. https://gsap.com",!ke.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=g,y||h||os(u)||os(d)){if(n=a.vars,C=a.timeline=new me({data:"nested",defaults:f||{},targets:S&&S.data==="nested"?S.vars.targets:w}),C.kill(),C.parent=C._dp=He(a),C._start=0,h||os(u)||os(d)){if(z=w.length,A=h&&Vr(h),Ue(h))for(x in h)~Jr.indexOf(x)&&(N||(N={}),N[x]=h[x]);for(b=0;b<z;b++)k=fs(n,ei),k.stagger=0,_&&(k.yoyoEase=_),N&&zt(k,N),v=w[b],k.duration=+Ht(u,He(a),b,v,w),k.delay=(+Ht(d,He(a),b,v,w)||0)-a._delay,!h&&z===1&&k.delay&&(a._delay=d=k.delay,a._start+=d,k.delay=0),C.to(v,k,A?A(b,v,w):0),C._ease=F.none;C.duration()?u=d=0:a.timeline=0}else if(y){Ut(ze(C.vars.defaults,{ease:"none"})),C._ease=gt(y.ease||n.ease||"none");var V=0,D,G,U;if(pe(y))y.forEach(function(K){return C.to(w,K,">")}),C.duration();else{k={};for(x in y)x==="ease"||x==="easeEach"||oa(x,y[x],k,y.easeEach);for(x in k)for(D=k[x].sort(function(K,W){return K.t-W.t}),V=0,b=0;b<D.length;b++)G=D[b],U={ease:G.e,duration:(G.t-(b?D[b-1].t:0))/100*u},U[x]=G.v,C.to(w,U,V),V+=U.duration;C.duration()<u&&C.to({},{duration:u-C.duration()})}}u||a.duration(u=C.duration())}else a.timeline=0;return g===!0&&!rn&&(Ze=He(a),Z.killTweensOf(w),Ze=0),Fe(S,He(a),r),n.reversed&&a.reverse(),n.paused&&a.paused(!0),(p||!u&&!y&&a._start===re(S._time)&&ye(p)&&Io(He(a))&&S.data!=="nested")&&(a._tTime=-1e-8,a.render(Math.max(0,-d)||0)),m&&Ar(He(a),m),a}var t=e.prototype;return t.render=function(n,r,o){var a=this._time,l=this._tDur,u=this._dur,d=n<0,p=n>l-ge&&!d?l:n<ge?0:n,h,g,y,f,m,_,S,w,C;if(!u)Ko(this,n,r,o);else if(p!==this._tTime||!n||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==d||this._lazy){if(h=p,w=this.timeline,this._repeat){if(f=u+this._rDelay,this._repeat<-1&&d)return this.totalTime(f*100+n,r,o);if(h=re(p%f),p===l?(y=this._repeat,h=u):(m=re(p/f),y=~~m,y&&y===m?(h=u,y--):h>u&&(h=u)),_=this._yoyo&&y&1,_&&(C=this._yEase,h=u-h),m=Rt(this._tTime,f),h===a&&!o&&this._initted&&y===m)return this._tTime=p,this;y!==m&&(w&&this._yEase&&Yr(w,_),this.vars.repeatRefresh&&!_&&!this._lock&&h!==f&&this._initted&&(this._lock=o=1,this.render(re(f*y),!0).invalidate()._lock=0))}if(!this._initted){if(Or(this,d?n:h,o,r,p))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&y!==m))return this;if(u!==this._dur)return this.render(n,r,o)}if(this._tTime=p,this._time=h,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=S=(C||this._ease)(h/u),this._from&&(this.ratio=S=1-S),!a&&p&&!r&&!m&&(Se(this,"onStart"),this._tTime!==p))return this;for(g=this._pt;g;)g.r(S,g.d),g=g._next;w&&w.render(n<0?n:w._dur*w._ease(h/this._dur),r,o)||this._startAt&&(this._zTime=n),this._onUpdate&&!r&&(d&&Us(this,n,r,o),Se(this,"onUpdate")),this._repeat&&y!==m&&this.vars.onRepeat&&!r&&this.parent&&Se(this,"onRepeat"),(p===this._tDur||!p)&&this._tTime===p&&(d&&!this._onUpdate&&Us(this,n,!0,!0),(n||!u)&&(p===this._tDur&&this._ts>0||!p&&this._ts<0)&&tt(this,1),!r&&!(d&&!a)&&(p||a||_)&&(Se(this,p===l?"onComplete":"onReverseComplete",!0),this._prom&&!(p<l&&this.timeScale()>0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(n){return(!n||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(n),i.prototype.invalidate.call(this,n)},t.resetTo=function(n,r,o,a,l){Zt||xe.wake(),this._ts||this.play();var u=Math.min(this._dur,(this._dp._time-this._start)*this._ts),d;return this._initted||hn(this,u),d=this._ease(u/this._dur),ra(this,n,r,o,a,d,u,l)?this.resetTo(n,r,o,a,1):(bs(this,0),this.parent||Pr(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(n,r){if(r===void 0&&(r="all"),!n&&(!r||r==="all"))return this._lazy=this._pt=0,this.parent?Nt(this):this.scrollTrigger&&this.scrollTrigger.kill(!!ue),this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(n,r,Ze&&Ze.vars.overwrite!==!0)._first||Nt(this),this.parent&&o!==this.timeline.totalDuration()&&Mt(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,l=n?Ee(n):a,u=this._ptLookup,d=this._pt,p,h,g,y,f,m,_;if((!r||r==="all")&&Oo(a,l))return r==="all"&&(this._pt=0),Nt(this);for(p=this._op=this._op||[],r!=="all"&&(le(r)&&(f={},we(r,function(S){return f[S]=1}),r=f),r=ia(a,r)),_=a.length;_--;)if(~l.indexOf(a[_])){h=u[_],r==="all"?(p[_]=r,y=h,g={}):(g=p[_]=p[_]||{},y=r);for(f in y)m=h&&h[f],m&&((!("kill"in m.d)||m.d.kill(f)===!0)&&ys(this,m,"_pt"),delete h[f]),g!=="all"&&(g[f]=1)}return this._initted&&!this._pt&&d&&Nt(this),this},e.to=function(n,r){return new e(n,r,arguments[2])},e.from=function(n,r){return $t(1,arguments)},e.delayedCall=function(n,r,o,a){return new e(r,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:n,onComplete:r,onReverseComplete:r,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},e.fromTo=function(n,r,o){return $t(2,arguments)},e.set=function(n,r){return r.duration=0,r.repeatDelay||(r.repeat=0),new e(n,r)},e.killTweensOf=function(n,r,o){return Z.killTweensOf(n,r,o)},e}(Xt);ze(ne.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});we("staggerTo,staggerFrom,staggerFromTo",function(i){ne[i]=function(){var e=new me,t=Hs.call(arguments,0);return t.splice(i==="staggerFromTo"?5:4,0,0),e[i].apply(e,t)}});var mn=function(e,t,s){return e[t]=s},ti=function(e,t,s){return e[t](s)},aa=function(e,t,s,n){return e[t](n.fp,s)},la=function(e,t,s){return e.setAttribute(t,s)},yn=function(e,t){return ee(e[t])?ti:on(e[t])&&e.setAttribute?la:mn},si=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},ca=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},ni=function(e,t){var s=t._pt,n="";if(!e&&t.b)n=t.b;else if(e===1&&t.e)n=t.e;else{for(;s;)n=s.p+(s.m?s.m(s.s+s.c*e):Math.round((s.s+s.c*e)*1e4)/1e4)+n,s=s._next;n+=t.c}t.set(t.t,t.p,n,t)},wn=function(e,t){for(var s=t._pt;s;)s.r(e,s.d),s=s._next},ua=function(e,t,s,n){for(var r=this._pt,o;r;)o=r._next,r.p===n&&r.modifier(e,t,s),r=o},da=function(e){for(var t=this._pt,s,n;t;)n=t._next,t.p===e&&!t.op||t.op===e?ys(this,t,"_pt"):t.dep||(s=1),t=n;return!s},fa=function(e,t,s,n){n.mSet(e,t,n.m.call(n.tween,s,n.mt),n)},ri=function(e){for(var t=e._pt,s,n,r,o;t;){for(s=t._next,n=r;n&&n.pr>t.pr;)n=n._next;(t._prev=n?n._prev:o)?t._prev._next=t:r=t,(t._next=n)?n._prev=t:o=t,t=s}e._pt=r},be=function(){function i(t,s,n,r,o,a,l,u,d){this.t=s,this.s=r,this.c=o,this.p=n,this.r=a||si,this.d=l||this,this.set=u||mn,this.pr=d||0,this._next=t,t&&(t._prev=this)}var e=i.prototype;return e.modifier=function(s,n,r){this.mSet=this.mSet||this.set,this.set=fa,this.m=s,this.mt=r,this.tween=n},i}();we(dn+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(i){return un[i]=1});Te.TweenMax=Te.TweenLite=ne;Te.TimelineLite=Te.TimelineMax=me;Z=new me({sortChildren:!1,defaults:Tt,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});ke.stringFilter=Gr;var pt=[],cs={},ga=[],Wn=0,pa=0,Es=function(e){return(cs[e]||ga).map(function(t){return t()})},Ys=function(){var e=Date.now(),t=[];e-Wn>2&&(Es("matchMediaInit"),pt.forEach(function(s){var n=s.queries,r=s.conditions,o,a,l,u;for(a in n)o=Ke.matchMedia(n[a]).matches,o&&(l=1),o!==r[a]&&(r[a]=o,u=1);u&&(s.revert(),l&&t.push(s))}),Es("matchMediaRevert"),t.forEach(function(s){return s.onMatch(s,function(n){return s.add(null,n)})}),Wn=e,Es("matchMedia"))},ii=function(){function i(t,s){this.selector=s&&js(s),this.data=[],this._r=[],this.isReverted=!1,this.id=pa++,t&&this.add(t)}var e=i.prototype;return e.add=function(s,n,r){ee(s)&&(r=n,n=s,s=ee);var o=this,a=function(){var u=q,d=o.selector,p;return u&&u!==o&&u.data.push(o),r&&(o.selector=js(r)),q=o,p=n.apply(o,arguments),ee(p)&&o._r.push(p),q=u,o.selector=d,o.isReverted=!1,p};return o.last=a,s===ee?a(o,function(l){return o.add(null,l)}):s?o[s]=a:a},e.ignore=function(s){var n=q;q=null,s(this),q=n},e.getTweens=function(){var s=[];return this.data.forEach(function(n){return n instanceof i?s.push.apply(s,n.getTweens()):n instanceof ne&&!(n.parent&&n.parent.data==="nested")&&s.push(n)}),s},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(s,n){var r=this;if(s?function(){for(var a=r.getTweens(),l=r.data.length,u;l--;)u=r.data[l],u.data==="isFlip"&&(u.revert(),u.getChildren(!0,!0,!1).forEach(function(d){return a.splice(a.indexOf(d),1)}));for(a.map(function(d){return{g:d._dur||d._delay||d._sat&&!d._sat.vars.immediateRender?d.globalTime(0):-1/0,t:d}}).sort(function(d,p){return p.g-d.g||-1/0}).forEach(function(d){return d.t.revert(s)}),l=r.data.length;l--;)u=r.data[l],u instanceof me?u.data!=="nested"&&(u.scrollTrigger&&u.scrollTrigger.revert(),u.kill()):!(u instanceof ne)&&u.revert&&u.revert(s);r._r.forEach(function(d){return d(s,r)}),r.isReverted=!0}():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),n)for(var o=pt.length;o--;)pt[o].id===this.id&&pt.splice(o,1)},e.revert=function(s){this.kill(s||{})},i}(),ha=function(){function i(t){this.contexts=[],this.scope=t,q&&q.data.push(this)}var e=i.prototype;return e.add=function(s,n,r){Ue(s)||(s={matches:s});var o=new ii(0,r||this.scope),a=o.conditions={},l,u,d;q&&!o.selector&&(o.selector=q.selector),this.contexts.push(o),n=o.add("onMatch",n),o.queries=s;for(u in s)u==="all"?d=1:(l=Ke.matchMedia(s[u]),l&&(pt.indexOf(o)<0&&pt.push(o),(a[u]=l.matches)&&(d=1),l.addListener?l.addListener(Ys):l.addEventListener("change",Ys)));return d&&n(o,function(p){return o.add(null,p)}),this},e.revert=function(s){this.kill(s||{})},e.kill=function(s){this.contexts.forEach(function(n){return n.kill(s,!0)})},i}(),ps={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];t.forEach(function(n){return $r(n)})},timeline:function(e){return new me(e)},getTweensOf:function(e,t){return Z.getTweensOf(e,t)},getProperty:function(e,t,s,n){le(e)&&(e=Ee(e)[0]);var r=dt(e||{}).get,o=s?Br:Er;return s==="native"&&(s=""),e&&(t?o((Ce[t]&&Ce[t].get||r)(e,t,s,n)):function(a,l,u){return o((Ce[a]&&Ce[a].get||r)(e,a,l,u))})},quickSetter:function(e,t,s){if(e=Ee(e),e.length>1){var n=e.map(function(d){return ve.quickSetter(d,t,s)}),r=n.length;return function(d){for(var p=r;p--;)n[p](d)}}e=e[0]||{};var o=Ce[t],a=dt(e),l=a.harness&&(a.harness.aliases||{})[t]||t,u=o?function(d){var p=new o;vt._pt=0,p.init(e,s?d+s:d,vt,0,[e]),p.render(1,p),vt._pt&&wn(1,vt)}:a.set(e,l);return o?u:function(d){return u(e,l,s?d+s:d,a,1)}},quickTo:function(e,t,s){var n,r=ve.to(e,ze((n={},n[t]="+=0.1",n.paused=!0,n.stagger=0,n),s||{})),o=function(l,u,d){return r.resetTo(t,l,u,d)};return o.tween=r,o},isTweening:function(e){return Z.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=gt(e.ease,Tt.ease)),In(Tt,e||{})},config:function(e){return In(ke,e||{})},registerEffect:function(e){var t=e.name,s=e.effect,n=e.plugins,r=e.defaults,o=e.extendTimeline;(n||"").split(",").forEach(function(a){return a&&!Ce[a]&&!Te[a]&&Gt(t+" effect requires "+a+" plugin.")}),Ts[t]=function(a,l,u){return s(Ee(a),ze(l||{},r),u)},o&&(me.prototype[t]=function(a,l,u){return this.add(Ts[t](a,Ue(l)?l:(u=l)&&{},this),u)})},registerEase:function(e,t){F[e]=gt(t)},parseEase:function(e,t){return arguments.length?gt(e,t):F},getById:function(e){return Z.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var s=new me(e),n,r;for(s.smoothChildTiming=ye(e.smoothChildTiming),Z.remove(s),s._dp=0,s._time=s._tTime=Z._time,n=Z._first;n;)r=n._next,(t||!(!n._dur&&n instanceof ne&&n.vars.onComplete===n._targets[0]))&&Fe(s,n,n._start-n._delay),n=r;return Fe(Z,s,0),s},context:function(e,t){return e?new ii(e,t):q},matchMedia:function(e){return new ha(e)},matchMediaRefresh:function(){return pt.forEach(function(e){var t=e.conditions,s,n;for(n in t)t[n]&&(t[n]=!1,s=1);s&&e.revert()})||Ys()},addEventListener:function(e,t){var s=cs[e]||(cs[e]=[]);~s.indexOf(t)||s.push(t)},removeEventListener:function(e,t){var s=cs[e],n=s&&s.indexOf(t);n>=0&&s.splice(n,1)},utils:{wrap:Go,wrapYoyo:qo,distribute:Vr,random:Fr,snap:Kr,normalize:jo,getUnit:fe,clamp:Wo,splitColor:Hr,toArray:Ee,selector:js,mapRange:Wr,pipe:$o,unitize:Ho,interpolate:Yo,shuffle:Ir},install:kr,effects:Ts,ticker:xe,updateRoot:me.updateRoot,plugins:Ce,globalTimeline:Z,core:{PropTween:be,globals:Tr,Tween:ne,Timeline:me,Animation:Xt,getCache:dt,_removeLinkedListItem:ys,reverting:function(){return ue},context:function(e){return e&&q&&(q.data.push(e),e._ctx=q),q},suppressOverwrites:function(e){return rn=e}}};we("to,from,fromTo,delayedCall,set,killTweensOf",function(i){return ps[i]=ne[i]});xe.add(me.updateRoot);vt=ps.to({},{duration:0});var ma=function(e,t){for(var s=e._pt;s&&s.p!==t&&s.op!==t&&s.fp!==t;)s=s._next;return s},ya=function(e,t){var s=e._targets,n,r,o;for(n in t)for(r=s.length;r--;)o=e._ptLookup[r][n],o&&(o=o.d)&&(o._pt&&(o=ma(o,n)),o&&o.modifier&&o.modifier(t[n],e,s[r],n))},Bs=function(e,t){return{name:e,headless:1,rawVars:1,init:function(n,r,o){o._onInit=function(a){var l,u;if(le(r)&&(l={},we(r,function(d){return l[d]=1}),r=l),t){l={};for(u in r)l[u]=t(r[u]);r=l}ya(a,r)}}}},ve=ps.registerPlugin({name:"attr",init:function(e,t,s,n,r){var o,a,l;this.tween=s;for(o in t)l=e.getAttribute(o)||"",a=this.add(e,"setAttribute",(l||0)+"",t[o],n,r,0,0,o),a.op=o,a.b=l,this._props.push(o)},render:function(e,t){for(var s=t._pt;s;)ue?s.set(s.t,s.p,s.b,s):s.r(e,s.d),s=s._next}},{name:"endArray",headless:1,init:function(e,t){for(var s=t.length;s--;)this.add(e,s,e[s]||0,t[s],0,0,0,0,0,1)}},Bs("roundProps",Gs),Bs("modifiers"),Bs("snap",Kr))||ps;ne.version=me.version=ve.version="3.13.0";Sr=1;an()&&Et();F.Power0;F.Power1;F.Power2;F.Power3;F.Power4;F.Linear;F.Quad;F.Cubic;F.Quart;F.Quint;F.Strong;F.Elastic;F.Back;F.SteppedEase;F.Bounce;F.Sine;F.Expo;F.Circ;/*!
|
|
11
|
+
*/var Be={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Vt={duration:.5,overwrite:!1,delay:0},An,pe,ee,Ye=1e8,fe=1/Ye,dn=Math.PI*2,Ra=dn/4,Ea=0,di=Math.sqrt,Ma=Math.cos,Ba=Math.sin,de=function(e){return typeof e=="string"},oe=function(e){return typeof e=="function"},ot=function(e){return typeof e=="number"},Dn=function(e){return typeof e>"u"},Xe=function(e){return typeof e=="object"},ve=function(e){return e!==!1},Ln=function(){return typeof window<"u"},Cs=function(e){return oe(e)||de(e)},pi=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},ge=Array.isArray,pn=/(?:-?\.?\d|\.)+/gi,hi=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Dt=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,Ys=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,fi=/[+-]=-?[.\d]+/,gi=/[^,'"\[\]\s]+/gi,Pa=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,re,qe,hn,In,Pe={},Es={},mi,wi=function(e){return(Es=Kt(e,Pe))&&xe},On=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},us=function(e,t){return!t&&console.warn(e)},bi=function(e,t){return e&&(Pe[e]=t)&&Es&&(Es[e]=t)||Pe},ds=function(){return 0},Aa={suppressEvents:!0,isStart:!0,kill:!1},Ts={suppressEvents:!0,kill:!1},Da={suppressEvents:!0},$n={},ht=[],fn={},yi,Re={},Xs={},kr=30,zs=[],Vn="",Kn=function(e){var t=e[0],s,n;if(Xe(t)||oe(t)||(e=[e]),!(s=(t._gsap||{}).harness)){for(n=zs.length;n--&&!zs[n].targetTest(t););s=zs[n]}for(n=e.length;n--;)e[n]&&(e[n]._gsap||(e[n]._gsap=new Ui(e[n],s)))||e.splice(n,1);return e},Ct=function(e){return e._gsap||Kn($e(e))[0]._gsap},vi=function(e,t,s){return(s=e[t])&&oe(s)?e[t]():Dn(s)&&e.getAttribute&&e.getAttribute(t)||s},ke=function(e,t){return(e=e.split(",")).forEach(t)||e},ae=function(e){return Math.round(e*1e5)/1e5||0},ce=function(e){return Math.round(e*1e7)/1e7||0},It=function(e,t){var s=t.charAt(0),n=parseFloat(t.substr(2));return e=parseFloat(e),s==="+"?e+n:s==="-"?e-n:s==="*"?e*n:e/n},La=function(e,t){for(var s=t.length,n=0;e.indexOf(t[n])<0&&++n<s;);return n<s},Ms=function(){var e=ht.length,t=ht.slice(0),s,n;for(fn={},ht.length=0,s=0;s<e;s++)n=t[s],n&&n._lazy&&(n.render(n._lazy[0],n._lazy[1],!0)._lazy=0)},Nn=function(e){return!!(e._initted||e._startAt||e.add)},ki=function(e,t,s,n){ht.length&&!pe&&Ms(),e.render(t,s,!!(pe&&t<0&&Nn(e))),ht.length&&!pe&&Ms()},_i=function(e){var t=parseFloat(e);return(t||t===0)&&(e+"").match(gi).length<2?t:de(e)?e.trim():e},Ci=function(e){return e},Ae=function(e,t){for(var s in t)s in e||(e[s]=t[s]);return e},Ia=function(e){return function(t,s){for(var n in s)n in t||n==="duration"&&e||n==="ease"||(t[n]=s[n])}},Kt=function(e,t){for(var s in t)e[s]=t[s];return e},_r=function r(e,t){for(var s in t)s!=="__proto__"&&s!=="constructor"&&s!=="prototype"&&(e[s]=Xe(t[s])?r(e[s]||(e[s]={}),t[s]):t[s]);return e},Bs=function(e,t){var s={},n;for(n in e)n in t||(s[n]=e[n]);return s},is=function(e){var t=e.parent||re,s=e.keyframes?Ia(ge(e.keyframes)):Ae;if(ve(e.inherit))for(;t;)s(e,t.vars.defaults),t=t.parent||t._dp;return e},Oa=function(e,t){for(var s=e.length,n=s===t.length;n&&s--&&e[s]===t[s];);return s<0},xi=function(e,t,s,n,i){var o=e[n],a;if(i)for(a=t[i];o&&o[i]>a;)o=o._prev;return o?(t._next=o._next,o._next=t):(t._next=e[s],e[s]=t),t._next?t._next._prev=t:e[n]=t,t._prev=o,t.parent=t._dp=e,t},Vs=function(e,t,s,n){s===void 0&&(s="_first"),n===void 0&&(n="_last");var i=t._prev,o=t._next;i?i._next=o:e[s]===t&&(e[s]=o),o?o._prev=i:e[n]===t&&(e[n]=i),t._next=t._prev=t.parent=null},gt=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},xt=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var s=e;s;)s._dirty=1,s=s.parent;return e},$a=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},gn=function(e,t,s,n){return e._startAt&&(pe?e._startAt.revert(Ts):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,n))},Va=function r(e){return!e||e._ts&&r(e.parent)},Cr=function(e){return e._repeat?Nt(e._tTime,e=e.duration()+e._rDelay)*e:0},Nt=function(e,t){var s=Math.floor(e=ce(e/t));return e&&s===e?s-1:s},Ps=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},Ks=function(e){return e._end=ce(e._start+(e._tDur/Math.abs(e._ts||e._rts||fe)||0))},Ns=function(e,t){var s=e._dp;return s&&s.smoothChildTiming&&e._ts&&(e._start=ce(s._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),Ks(e),s._dirty||xt(s,e)),e},Si=function(e,t){var s;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(s=Ps(e.rawTime(),t),(!t._dur||ws(0,t.totalDuration(),s)-t._tTime>fe)&&t.render(s,!0)),xt(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(s=e;s._dp;)s.rawTime()>=0&&s.totalTime(s._tTime),s=s._dp;e._zTime=-1e-8}},Ge=function(e,t,s,n){return t.parent&>(t),t._start=ce((ot(s)?s:s||e!==re?Oe(e,s,t):e._time)+t._delay),t._end=ce(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),xi(e,t,"_first","_last",e._sort?"_start":0),mn(t)||(e._recent=t),n||Si(e,t),e._ts<0&&Ns(e,e._tTime),e},Ti=function(e,t){return(Pe.ScrollTrigger||On("scrollTrigger",t))&&Pe.ScrollTrigger.create(t,e)},zi=function(e,t,s,n,i){if(Un(e,t,i),!e._initted)return 1;if(!s&&e._pt&&!pe&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&yi!==Ee.frame)return ht.push(e),e._lazy=[i,n],1},Ka=function r(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||r(t))},mn=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},Na=function(e,t,s,n){var i=e.ratio,o=t<0||!t&&(!e._start&&Ka(e)&&!(!e._initted&&mn(e))||(e._ts<0||e._dp._ts<0)&&!mn(e))?0:1,a=e._rDelay,l=0,u,d,f;if(a&&e._repeat&&(l=ws(0,e._tDur,t),d=Nt(l,a),e._yoyo&&d&1&&(o=1-o),d!==Nt(e._tTime,a)&&(i=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==i||pe||n||e._zTime===fe||!t&&e._zTime){if(!e._initted&&zi(e,t,n,s,l))return;for(f=e._zTime,e._zTime=t||(s?fe:0),s||(s=t&&!f),e.ratio=o,e._from&&(o=1-o),e._time=0,e._tTime=l,u=e._pt;u;)u.r(o,u.d),u=u._next;t<0&&gn(e,t,s,!0),e._onUpdate&&!s&&Me(e,"onUpdate"),l&&e._repeat&&!s&&e.parent&&Me(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===o&&(o&>(e,1),!s&&!pe&&(Me(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},Fa=function(e,t,s){var n;if(s>t)for(n=e._first;n&&n._start<=s;){if(n.data==="isPause"&&n._start>t)return n;n=n._next}else for(n=e._last;n&&n._start>=s;){if(n.data==="isPause"&&n._start<t)return n;n=n._prev}},Ft=function(e,t,s,n){var i=e._repeat,o=ce(t)||0,a=e._tTime/e._tDur;return a&&!n&&(e._time*=o/e._dur),e._dur=o,e._tDur=i?i<0?1e10:ce(o*(i+1)+e._rDelay*i):o,a>0&&!n&&Ns(e,e._tTime=e._tDur*a),e.parent&&Ks(e),s||xt(e.parent,e),e},xr=function(e){return e instanceof we?xt(e):Ft(e,e._dur)},Ua={_start:0,endTime:ds,totalDuration:ds},Oe=function r(e,t,s){var n=e.labels,i=e._recent||Ua,o=e.duration()>=Ye?i.endTime(!1):e._dur,a,l,u;return de(t)&&(isNaN(t)||t in n)?(l=t.charAt(0),u=t.substr(-1)==="%",a=t.indexOf("="),l==="<"||l===">"?(a>=0&&(t=t.replace(/=/,"")),(l==="<"?i._start:i.endTime(i._repeat>=0))+(parseFloat(t.substr(1))||0)*(u?(a<0?i:s).totalDuration()/100:1)):a<0?(t in n||(n[t]=o),n[t]):(l=parseFloat(t.charAt(a-1)+t.substr(a+1)),u&&s&&(l=l/100*(ge(s)?s[0]:s).totalDuration()),a>1?r(e,t.substr(0,a-1),s)+l:o+l)):t==null?o:+t},os=function(e,t,s){var n=ot(t[1]),i=(n?2:1)+(e<2?0:1),o=t[i],a,l;if(n&&(o.duration=t[1]),o.parent=s,e){for(a=o,l=s;l&&!("immediateRender"in a);)a=l.vars.defaults||{},l=ve(l.vars.inherit)&&l.parent;o.immediateRender=ve(a.immediateRender),e<2?o.runBackwards=1:o.startAt=t[i-1]}return new le(t[0],o,t[i+1])},wt=function(e,t){return e||e===0?t(e):t},ws=function(e,t,s){return s<e?e:s>t?t:s},he=function(e,t){return!de(e)||!(t=Pa.exec(e))?"":t[1]},Wa=function(e,t,s){return wt(s,function(n){return ws(e,t,n)})},wn=[].slice,Ri=function(e,t){return e&&Xe(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&Xe(e[0]))&&!e.nodeType&&e!==qe},Ha=function(e,t,s){return s===void 0&&(s=[]),e.forEach(function(n){var i;return de(n)&&!t||Ri(n,1)?(i=s).push.apply(i,$e(n)):s.push(n)})||s},$e=function(e,t,s){return ee&&!t&&ee.selector?ee.selector(e):de(e)&&!s&&(hn||!Ut())?wn.call((t||In).querySelectorAll(e),0):ge(e)?Ha(e,s):Ri(e)?wn.call(e,0):e?[e]:[]},bn=function(e){return e=$e(e)[0]||us("Invalid scope")||{},function(t){var s=e.current||e.nativeElement||e;return $e(t,s.querySelectorAll?s:s===e?us("Invalid scope")||In.createElement("div"):e)}},Ei=function(e){return e.sort(function(){return .5-Math.random()})},Mi=function(e){if(oe(e))return e;var t=Xe(e)?e:{each:e},s=St(t.ease),n=t.from||0,i=parseFloat(t.base)||0,o={},a=n>0&&n<1,l=isNaN(n)||a,u=t.axis,d=n,f=n;return de(n)?d=f={center:.5,edges:.5,end:1}[n]||0:!a&&l&&(d=n[0],f=n[1]),function(g,h,m){var p=(m||t).length,b=o[p],k,v,y,_,w,C,T,x,z;if(!b){if(z=t.grid==="auto"?0:(t.grid||[1,Ye])[1],!z){for(T=-1e8;T<(T=m[z++].getBoundingClientRect().left)&&z<p;);z<p&&z--}for(b=o[p]=[],k=l?Math.min(z,p)*d-.5:n%z,v=z===Ye?0:l?p*f/z-.5:n/z|0,T=0,x=Ye,C=0;C<p;C++)y=C%z-k,_=v-(C/z|0),b[C]=w=u?Math.abs(u==="y"?_:y):di(y*y+_*_),w>T&&(T=w),w<x&&(x=w);n==="random"&&Ei(b),b.max=T-x,b.min=x,b.v=p=(parseFloat(t.amount)||parseFloat(t.each)*(z>p?p-1:u?u==="y"?p/z:z:Math.max(z,p/z))||0)*(n==="edges"?-1:1),b.b=p<0?i-p:i,b.u=he(t.amount||t.each)||0,s=s&&p<0?Ki(s):s}return p=(b[g]-b.min)/b.max||0,ce(b.b+(s?s(p):p)*b.v)+b.u}},yn=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(s){var n=ce(Math.round(parseFloat(s)/e)*e*t);return(n-n%1)/t+(ot(s)?0:he(s))}},Bi=function(e,t){var s=ge(e),n,i;return!s&&Xe(e)&&(n=s=e.radius||Ye,e.values?(e=$e(e.values),(i=!ot(e[0]))&&(n*=n)):e=yn(e.increment)),wt(t,s?oe(e)?function(o){return i=e(o),Math.abs(i-o)<=n?i:o}:function(o){for(var a=parseFloat(i?o.x:o),l=parseFloat(i?o.y:0),u=Ye,d=0,f=e.length,g,h;f--;)i?(g=e[f].x-a,h=e[f].y-l,g=g*g+h*h):g=Math.abs(e[f]-a),g<u&&(u=g,d=f);return d=!n||u<=n?e[d]:o,i||d===o||ot(o)?d:d+he(o)}:yn(e))},Pi=function(e,t,s,n){return wt(ge(e)?!t:s===!0?!!(s=0):!n,function(){return ge(e)?e[~~(Math.random()*e.length)]:(s=s||1e-5)&&(n=s<1?Math.pow(10,(s+"").length-2):1)&&Math.floor(Math.round((e-s/2+Math.random()*(t-e+s*.99))/s)*s*n)/n})},ja=function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return function(n){return t.reduce(function(i,o){return o(i)},n)}},qa=function(e,t){return function(s){return e(parseFloat(s))+(t||he(s))}},Ga=function(e,t,s){return Di(e,t,0,1,s)},Ai=function(e,t,s){return wt(s,function(n){return e[~~t(n)]})},Za=function r(e,t,s){var n=t-e;return ge(e)?Ai(e,r(0,e.length),t):wt(s,function(i){return(n+(i-e)%n)%n+e})},Ya=function r(e,t,s){var n=t-e,i=n*2;return ge(e)?Ai(e,r(0,e.length-1),t):wt(s,function(o){return o=(i+(o-e)%i)%i||0,e+(o>n?i-o:o)})},ps=function(e){for(var t=0,s="",n,i,o,a;~(n=e.indexOf("random(",t));)o=e.indexOf(")",n),a=e.charAt(n+7)==="[",i=e.substr(n+7,o-n-7).match(a?gi:pn),s+=e.substr(t,n-t)+Pi(a?i:+i[0],a?0:+i[1],+i[2]||1e-5),t=o+1;return s+e.substr(t,e.length-t)},Di=function(e,t,s,n,i){var o=t-e,a=n-s;return wt(i,function(l){return s+((l-e)/o*a||0)})},Xa=function r(e,t,s,n){var i=isNaN(e+t)?0:function(h){return(1-h)*e+h*t};if(!i){var o=de(e),a={},l,u,d,f,g;if(s===!0&&(n=1)&&(s=null),o)e={p:e},t={p:t};else if(ge(e)&&!ge(t)){for(d=[],f=e.length,g=f-2,u=1;u<f;u++)d.push(r(e[u-1],e[u]));f--,i=function(m){m*=f;var p=Math.min(g,~~m);return d[p](m-p)},s=t}else n||(e=Kt(ge(e)?[]:{},e));if(!d){for(l in t)Fn.call(a,e,l,"get",t[l]);i=function(m){return jn(m,a)||(o?e.p:e)}}}return wt(s,i)},Sr=function(e,t,s){var n=e.labels,i=Ye,o,a,l;for(o in n)a=n[o]-t,a<0==!!s&&a&&i>(a=Math.abs(a))&&(l=o,i=a);return l},Me=function(e,t,s){var n=e.vars,i=n[t],o=ee,a=e._ctx,l,u,d;if(i)return l=n[t+"Params"],u=n.callbackScope||e,s&&ht.length&&Ms(),a&&(ee=a),d=l?i.apply(u,l):i.call(u),ee=o,d},ss=function(e){return gt(e),e.scrollTrigger&&e.scrollTrigger.kill(!!pe),e.progress()<1&&Me(e,"onInterrupt"),e},Lt,Li=[],Ii=function(e){if(e)if(e=!e.name&&e.default||e,Ln()||e.headless){var t=e.name,s=oe(e),n=t&&!s&&e.init?function(){this._props=[]}:e,i={init:ds,render:jn,add:Fn,kill:hl,modifier:pl,rawVars:0},o={targetTest:0,get:0,getSetter:Hn,aliases:{},register:0};if(Ut(),e!==n){if(Re[t])return;Ae(n,Ae(Bs(e,i),o)),Kt(n.prototype,Kt(i,Bs(e,o))),Re[n.prop=t]=n,e.targetTest&&(zs.push(n),$n[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}bi(t,n),e.register&&e.register(xe,n,_e)}else Li.push(e)},X=255,ns={aqua:[0,X,X],lime:[0,X,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,X],navy:[0,0,128],white:[X,X,X],olive:[128,128,0],yellow:[X,X,0],orange:[X,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[X,0,0],pink:[X,192,203],cyan:[0,X,X],transparent:[X,X,X,0]},Qs=function(e,t,s){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(s-t)*e*6:e<.5?s:e*3<2?t+(s-t)*(2/3-e)*6:t)*X+.5|0},Oi=function(e,t,s){var n=e?ot(e)?[e>>16,e>>8&X,e&X]:0:ns.black,i,o,a,l,u,d,f,g,h,m;if(!n){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),ns[e])n=ns[e];else if(e.charAt(0)==="#"){if(e.length<6&&(i=e.charAt(1),o=e.charAt(2),a=e.charAt(3),e="#"+i+i+o+o+a+a+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return n=parseInt(e.substr(1,6),16),[n>>16,n>>8&X,n&X,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),n=[e>>16,e>>8&X,e&X]}else if(e.substr(0,3)==="hsl"){if(n=m=e.match(pn),!t)l=+n[0]%360/360,u=+n[1]/100,d=+n[2]/100,o=d<=.5?d*(u+1):d+u-d*u,i=d*2-o,n.length>3&&(n[3]*=1),n[0]=Qs(l+1/3,i,o),n[1]=Qs(l,i,o),n[2]=Qs(l-1/3,i,o);else if(~e.indexOf("="))return n=e.match(hi),s&&n.length<4&&(n[3]=1),n}else n=e.match(pn)||ns.transparent;n=n.map(Number)}return t&&!m&&(i=n[0]/X,o=n[1]/X,a=n[2]/X,f=Math.max(i,o,a),g=Math.min(i,o,a),d=(f+g)/2,f===g?l=u=0:(h=f-g,u=d>.5?h/(2-f-g):h/(f+g),l=f===i?(o-a)/h+(o<a?6:0):f===o?(a-i)/h+2:(i-o)/h+4,l*=60),n[0]=~~(l+.5),n[1]=~~(u*100+.5),n[2]=~~(d*100+.5)),s&&n.length<4&&(n[3]=1),n},$i=function(e){var t=[],s=[],n=-1;return e.split(ft).forEach(function(i){var o=i.match(Dt)||[];t.push.apply(t,o),s.push(n+=o.length+1)}),t.c=s,t},Tr=function(e,t,s){var n="",i=(e+n).match(ft),o=t?"hsla(":"rgba(",a=0,l,u,d,f;if(!i)return e;if(i=i.map(function(g){return(g=Oi(g,t,1))&&o+(t?g[0]+","+g[1]+"%,"+g[2]+"%,"+g[3]:g.join(","))+")"}),s&&(d=$i(e),l=s.c,l.join(n)!==d.c.join(n)))for(u=e.replace(ft,"1").split(Dt),f=u.length-1;a<f;a++)n+=u[a]+(~l.indexOf(a)?i.shift()||o+"0,0,0,0)":(d.length?d:i.length?i:s).shift());if(!u)for(u=e.split(ft),f=u.length-1;a<f;a++)n+=u[a]+i[a];return n+u[f]},ft=function(){var r="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in ns)r+="|"+e+"\\b";return new RegExp(r+")","gi")}(),Qa=/hsl[a]?\(/,Vi=function(e){var t=e.join(" "),s;if(ft.lastIndex=0,ft.test(t))return s=Qa.test(t),e[1]=Tr(e[1],s),e[0]=Tr(e[0],s,$i(e[1])),!0},hs,Ee=function(){var r=Date.now,e=500,t=33,s=r(),n=s,i=1e3/240,o=i,a=[],l,u,d,f,g,h,m=function p(b){var k=r()-n,v=b===!0,y,_,w,C;if((k>e||k<0)&&(s+=k-t),n+=k,w=n-s,y=w-o,(y>0||v)&&(C=++f.frame,g=w-f.time*1e3,f.time=w=w/1e3,o+=y+(y>=i?4:i-y),_=1),v||(l=u(p)),_)for(h=0;h<a.length;h++)a[h](w,g,C,b)};return f={time:0,frame:0,tick:function(){m(!0)},deltaRatio:function(b){return g/(1e3/(b||60))},wake:function(){mi&&(!hn&&Ln()&&(qe=hn=window,In=qe.document||{},Pe.gsap=xe,(qe.gsapVersions||(qe.gsapVersions=[])).push(xe.version),wi(Es||qe.GreenSockGlobals||!qe.gsap&&qe||{}),Li.forEach(Ii)),d=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&f.sleep(),u=d||function(b){return setTimeout(b,o-f.time*1e3+1|0)},hs=1,m(2))},sleep:function(){(d?cancelAnimationFrame:clearTimeout)(l),hs=0,u=ds},lagSmoothing:function(b,k){e=b||1/0,t=Math.min(k||33,e)},fps:function(b){i=1e3/(b||240),o=f.time*1e3+i},add:function(b,k,v){var y=k?function(_,w,C,T){b(_,w,C,T),f.remove(y)}:b;return f.remove(b),a[v?"unshift":"push"](y),Ut(),y},remove:function(b,k){~(k=a.indexOf(b))&&a.splice(k,1)&&h>=k&&h--},_listeners:a},f}(),Ut=function(){return!hs&&Ee.wake()},F={},Ja=/^[\d.\-M][\d.\-,\s]/,el=/["']/g,tl=function(e){for(var t={},s=e.substr(1,e.length-3).split(":"),n=s[0],i=1,o=s.length,a,l,u;i<o;i++)l=s[i],a=i!==o-1?l.lastIndexOf(","):l.length,u=l.substr(0,a),t[n]=isNaN(u)?u.replace(el,"").trim():+u,n=l.substr(a+1).trim();return t},sl=function(e){var t=e.indexOf("(")+1,s=e.indexOf(")"),n=e.indexOf("(",t);return e.substring(t,~n&&n<s?e.indexOf(")",s+1):s)},nl=function(e){var t=(e+"").split("("),s=F[t[0]];return s&&t.length>1&&s.config?s.config.apply(null,~e.indexOf("{")?[tl(t[1])]:sl(e).split(",").map(_i)):F._CE&&Ja.test(e)?F._CE("",e):s},Ki=function(e){return function(t){return 1-e(1-t)}},Ni=function r(e,t){for(var s=e._first,n;s;)s instanceof we?r(s,t):s.vars.yoyoEase&&(!s._yoyo||!s._repeat)&&s._yoyo!==t&&(s.timeline?r(s.timeline,t):(n=s._ease,s._ease=s._yEase,s._yEase=n,s._yoyo=t)),s=s._next},St=function(e,t){return e&&(oe(e)?e:F[e]||nl(e))||t},Et=function(e,t,s,n){s===void 0&&(s=function(l){return 1-t(1-l)}),n===void 0&&(n=function(l){return l<.5?t(l*2)/2:1-t((1-l)*2)/2});var i={easeIn:t,easeOut:s,easeInOut:n},o;return ke(e,function(a){F[a]=Pe[a]=i,F[o=a.toLowerCase()]=s;for(var l in i)F[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=F[a+"."+l]=i[l]}),i},Fi=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},Js=function r(e,t,s){var n=t>=1?t:1,i=(s||(e?.3:.45))/(t<1?t:1),o=i/dn*(Math.asin(1/n)||0),a=function(d){return d===1?1:n*Math.pow(2,-10*d)*Ba((d-o)*i)+1},l=e==="out"?a:e==="in"?function(u){return 1-a(1-u)}:Fi(a);return i=dn/i,l.config=function(u,d){return r(e,u,d)},l},en=function r(e,t){t===void 0&&(t=1.70158);var s=function(o){return o?--o*o*((t+1)*o+t)+1:0},n=e==="out"?s:e==="in"?function(i){return 1-s(1-i)}:Fi(s);return n.config=function(i){return r(e,i)},n};ke("Linear,Quad,Cubic,Quart,Quint,Strong",function(r,e){var t=e<5?e+1:e;Et(r+",Power"+(t-1),e?function(s){return Math.pow(s,t)}:function(s){return s},function(s){return 1-Math.pow(1-s,t)},function(s){return s<.5?Math.pow(s*2,t)/2:1-Math.pow((1-s)*2,t)/2})});F.Linear.easeNone=F.none=F.Linear.easeIn;Et("Elastic",Js("in"),Js("out"),Js());(function(r,e){var t=1/e,s=2*t,n=2.5*t,i=function(a){return a<t?r*a*a:a<s?r*Math.pow(a-1.5/e,2)+.75:a<n?r*(a-=2.25/e)*a+.9375:r*Math.pow(a-2.625/e,2)+.984375};Et("Bounce",function(o){return 1-i(1-o)},i)})(7.5625,2.75);Et("Expo",function(r){return Math.pow(2,10*(r-1))*r+r*r*r*r*r*r*(1-r)});Et("Circ",function(r){return-(di(1-r*r)-1)});Et("Sine",function(r){return r===1?1:-Ma(r*Ra)+1});Et("Back",en("in"),en("out"),en());F.SteppedEase=F.steps=Pe.SteppedEase={config:function(e,t){e===void 0&&(e=1);var s=1/e,n=e+(t?0:1),i=t?1:0,o=1-fe;return function(a){return((n*ws(0,o,a)|0)+i)*s}}};Vt.ease=F["quad.out"];ke("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(r){return Vn+=r+","+r+"Params,"});var Ui=function(e,t){this.id=Ea++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:vi,this.set=t?t.getSetter:Hn},fs=function(){function r(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,Ft(this,+t.duration,1,1),this.data=t.data,ee&&(this._ctx=ee,ee.data.push(this)),hs||Ee.wake()}var e=r.prototype;return e.delay=function(s){return s||s===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+s-this._delay),this._delay=s,this):this._delay},e.duration=function(s){return arguments.length?this.totalDuration(this._repeat>0?s+(s+this._rDelay)*this._repeat:s):this.totalDuration()&&this._dur},e.totalDuration=function(s){return arguments.length?(this._dirty=0,Ft(this,this._repeat<0?s:(s-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(s,n){if(Ut(),!arguments.length)return this._tTime;var i=this._dp;if(i&&i.smoothChildTiming&&this._ts){for(Ns(this,s),!i._dp||i.parent||Si(i,this);i&&i.parent;)i.parent._time!==i._start+(i._ts>=0?i._tTime/i._ts:(i.totalDuration()-i._tTime)/-i._ts)&&i.totalTime(i._tTime,!0),i=i.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&s<this._tDur||this._ts<0&&s>0||!this._tDur&&!s)&&Ge(this._dp,this,this._start-this._delay)}return(this._tTime!==s||!this._dur&&!n||this._initted&&Math.abs(this._zTime)===fe||!s&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=s),ki(this,s,n)),this},e.time=function(s,n){return arguments.length?this.totalTime(Math.min(this.totalDuration(),s+Cr(this))%(this._dur+this._rDelay)||(s?this._dur:0),n):this._time},e.totalProgress=function(s,n){return arguments.length?this.totalTime(this.totalDuration()*s,n):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(s,n){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-s:s)+Cr(this),n):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(s,n){var i=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(s-1)*i,n):this._repeat?Nt(this._tTime,i)+1:1},e.timeScale=function(s,n){if(!arguments.length)return this._rts===-1e-8?0:this._rts;if(this._rts===s)return this;var i=this.parent&&this._ts?Ps(this.parent._time,this):this._tTime;return this._rts=+s||0,this._ts=this._ps||s===-1e-8?0:this._rts,this.totalTime(ws(-Math.abs(this._delay),this.totalDuration(),i),n!==!1),Ks(this),$a(this)},e.paused=function(s){return arguments.length?(this._ps!==s&&(this._ps=s,s?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Ut(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==fe&&(this._tTime-=fe)))),this):this._ps},e.startTime=function(s){if(arguments.length){this._start=s;var n=this.parent||this._dp;return n&&(n._sort||!this.parent)&&Ge(n,this,s-this._delay),this}return this._start},e.endTime=function(s){return this._start+(ve(s)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(s){var n=this.parent||this._dp;return n?s&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Ps(n.rawTime(s),this):this._tTime:this._tTime},e.revert=function(s){s===void 0&&(s=Da);var n=pe;return pe=s,Nn(this)&&(this.timeline&&this.timeline.revert(s),this.totalTime(-.01,s.suppressEvents)),this.data!=="nested"&&s.kill!==!1&&this.kill(),pe=n,this},e.globalTime=function(s){for(var n=this,i=arguments.length?s:n.rawTime();n;)i=n._start+i/(Math.abs(n._ts)||1),n=n._dp;return!this.parent&&this._sat?this._sat.globalTime(s):i},e.repeat=function(s){return arguments.length?(this._repeat=s===1/0?-2:s,xr(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(s){if(arguments.length){var n=this._time;return this._rDelay=s,xr(this),n?this.time(n):this}return this._rDelay},e.yoyo=function(s){return arguments.length?(this._yoyo=s,this):this._yoyo},e.seek=function(s,n){return this.totalTime(Oe(this,s),ve(n))},e.restart=function(s,n){return this.play().totalTime(s?-this._delay:0,ve(n)),this._dur||(this._zTime=-1e-8),this},e.play=function(s,n){return s!=null&&this.seek(s,n),this.reversed(!1).paused(!1)},e.reverse=function(s,n){return s!=null&&this.seek(s||this.totalDuration(),n),this.reversed(!0).paused(!1)},e.pause=function(s,n){return s!=null&&this.seek(s,n),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(s){return arguments.length?(!!s!==this.reversed()&&this.timeScale(-this._rts||(s?-1e-8:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-1e-8,this},e.isActive=function(){var s=this.parent||this._dp,n=this._start,i;return!!(!s||this._ts&&this._initted&&s.isActive()&&(i=s.rawTime(!0))>=n&&i<this.endTime(!0)-fe)},e.eventCallback=function(s,n,i){var o=this.vars;return arguments.length>1?(n?(o[s]=n,i&&(o[s+"Params"]=i),s==="onUpdate"&&(this._onUpdate=n)):delete o[s],this):o[s]},e.then=function(s){var n=this;return new Promise(function(i){var o=oe(s)?s:Ci,a=function(){var u=n.then;n.then=null,oe(o)&&(o=o(n))&&(o.then||o===n)&&(n.then=u),i(o),n.then=u};n._initted&&n.totalProgress()===1&&n._ts>=0||!n._tTime&&n._ts<0?a():n._prom=a})},e.kill=function(){ss(this)},r}();Ae(fs.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-1e-8,_prom:0,_ps:!1,_rts:1});var we=function(r){ui(e,r);function e(s,n){var i;return s===void 0&&(s={}),i=r.call(this,s)||this,i.labels={},i.smoothChildTiming=!!s.smoothChildTiming,i.autoRemoveChildren=!!s.autoRemoveChildren,i._sort=ve(s.sortChildren),re&&Ge(s.parent||re,nt(i),n),s.reversed&&i.reverse(),s.paused&&i.paused(!0),s.scrollTrigger&&Ti(nt(i),s.scrollTrigger),i}var t=e.prototype;return t.to=function(n,i,o){return os(0,arguments,this),this},t.from=function(n,i,o){return os(1,arguments,this),this},t.fromTo=function(n,i,o,a){return os(2,arguments,this),this},t.set=function(n,i,o){return i.duration=0,i.parent=this,is(i).repeatDelay||(i.repeat=0),i.immediateRender=!!i.immediateRender,new le(n,i,Oe(this,o),1),this},t.call=function(n,i,o){return Ge(this,le.delayedCall(0,n,i),o)},t.staggerTo=function(n,i,o,a,l,u,d){return o.duration=i,o.stagger=o.stagger||a,o.onComplete=u,o.onCompleteParams=d,o.parent=this,new le(n,o,Oe(this,l)),this},t.staggerFrom=function(n,i,o,a,l,u,d){return o.runBackwards=1,is(o).immediateRender=ve(o.immediateRender),this.staggerTo(n,i,o,a,l,u,d)},t.staggerFromTo=function(n,i,o,a,l,u,d,f){return a.startAt=o,is(a).immediateRender=ve(a.immediateRender),this.staggerTo(n,i,a,l,u,d,f)},t.render=function(n,i,o){var a=this._time,l=this._dirty?this.totalDuration():this._tDur,u=this._dur,d=n<=0?0:ce(n),f=this._zTime<0!=n<0&&(this._initted||!u),g,h,m,p,b,k,v,y,_,w,C,T;if(this!==re&&d>l&&n>=0&&(d=l),d!==this._tTime||o||f){if(a!==this._time&&u&&(d+=this._time-a,n+=this._time-a),g=d,_=this._start,y=this._ts,k=!y,f&&(u||(a=this._zTime),(n||!i)&&(this._zTime=n)),this._repeat){if(C=this._yoyo,b=u+this._rDelay,this._repeat<-1&&n<0)return this.totalTime(b*100+n,i,o);if(g=ce(d%b),d===l?(p=this._repeat,g=u):(w=ce(d/b),p=~~w,p&&p===w&&(g=u,p--),g>u&&(g=u)),w=Nt(this._tTime,b),!a&&this._tTime&&w!==p&&this._tTime-w*b-this._dur<=0&&(w=p),C&&p&1&&(g=u-g,T=1),p!==w&&!this._lock){var x=C&&w&1,z=x===(C&&p&1);if(p<w&&(x=!x),a=x?0:d%u?u:d,this._lock=1,this.render(a||(T?0:ce(p*b)),i,!u)._lock=0,this._tTime=d,!i&&this.parent&&Me(this,"onRepeat"),this.vars.repeatRefresh&&!T&&(this.invalidate()._lock=1),a&&a!==this._time||k!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(u=this._dur,l=this._tDur,z&&(this._lock=2,a=x?u:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!T&&this.invalidate()),this._lock=0,!this._ts&&!k)return this;Ni(this,T)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(v=Fa(this,ce(a),ce(g)),v&&(d-=g-(g=v._start))),this._tTime=d,this._time=g,this._act=!y,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=n,a=0),!a&&d&&!i&&!w&&(Me(this,"onStart"),this._tTime!==d))return this;if(g>=a&&n>=0)for(h=this._first;h;){if(m=h._next,(h._act||g>=h._start)&&h._ts&&v!==h){if(h.parent!==this)return this.render(n,i,o);if(h.render(h._ts>0?(g-h._start)*h._ts:(h._dirty?h.totalDuration():h._tDur)+(g-h._start)*h._ts,i,o),g!==this._time||!this._ts&&!k){v=0,m&&(d+=this._zTime=-1e-8);break}}h=m}else{h=this._last;for(var D=n<0?n:g;h;){if(m=h._prev,(h._act||D<=h._end)&&h._ts&&v!==h){if(h.parent!==this)return this.render(n,i,o);if(h.render(h._ts>0?(D-h._start)*h._ts:(h._dirty?h.totalDuration():h._tDur)+(D-h._start)*h._ts,i,o||pe&&Nn(h)),g!==this._time||!this._ts&&!k){v=0,m&&(d+=this._zTime=D?-1e-8:fe);break}}h=m}}if(v&&!i&&(this.pause(),v.render(g>=a?0:-1e-8)._zTime=g>=a?1:-1,this._ts))return this._start=_,Ks(this),this.render(n,i,o);this._onUpdate&&!i&&Me(this,"onUpdate",!0),(d===l&&this._tTime>=this.totalDuration()||!d&&a)&&(_===this._start||Math.abs(y)!==Math.abs(this._ts))&&(this._lock||((n||!u)&&(d===l&&this._ts>0||!d&&this._ts<0)&>(this,1),!i&&!(n<0&&!a)&&(d||a||!l)&&(Me(this,d===l&&n>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(d<l&&this.timeScale()>0)&&this._prom())))}return this},t.add=function(n,i){var o=this;if(ot(i)||(i=Oe(this,i,n)),!(n instanceof fs)){if(ge(n))return n.forEach(function(a){return o.add(a,i)}),this;if(de(n))return this.addLabel(n,i);if(oe(n))n=le.delayedCall(0,n);else return this}return this!==n?Ge(this,n,i):this},t.getChildren=function(n,i,o,a){n===void 0&&(n=!0),i===void 0&&(i=!0),o===void 0&&(o=!0),a===void 0&&(a=-1e8);for(var l=[],u=this._first;u;)u._start>=a&&(u instanceof le?i&&l.push(u):(o&&l.push(u),n&&l.push.apply(l,u.getChildren(!0,i,o)))),u=u._next;return l},t.getById=function(n){for(var i=this.getChildren(1,1,1),o=i.length;o--;)if(i[o].vars.id===n)return i[o]},t.remove=function(n){return de(n)?this.removeLabel(n):oe(n)?this.killTweensOf(n):(n.parent===this&&Vs(this,n),n===this._recent&&(this._recent=this._last),xt(this))},t.totalTime=function(n,i){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=ce(Ee.time-(this._ts>0?n/this._ts:(this.totalDuration()-n)/-this._ts))),r.prototype.totalTime.call(this,n,i),this._forcing=0,this):this._tTime},t.addLabel=function(n,i){return this.labels[n]=Oe(this,i),this},t.removeLabel=function(n){return delete this.labels[n],this},t.addPause=function(n,i,o){var a=le.delayedCall(0,i||ds,o);return a.data="isPause",this._hasPause=1,Ge(this,a,Oe(this,n))},t.removePause=function(n){var i=this._first;for(n=Oe(this,n);i;)i._start===n&&i.data==="isPause"&>(i),i=i._next},t.killTweensOf=function(n,i,o){for(var a=this.getTweensOf(n,o),l=a.length;l--;)ut!==a[l]&&a[l].kill(n,i);return this},t.getTweensOf=function(n,i){for(var o=[],a=$e(n),l=this._first,u=ot(i),d;l;)l instanceof le?La(l._targets,a)&&(u?(!ut||l._initted&&l._ts)&&l.globalTime(0)<=i&&l.globalTime(l.totalDuration())>i:!i||l.isActive())&&o.push(l):(d=l.getTweensOf(a,i)).length&&o.push.apply(o,d),l=l._next;return o},t.tweenTo=function(n,i){i=i||{};var o=this,a=Oe(o,n),l=i,u=l.startAt,d=l.onStart,f=l.onStartParams,g=l.immediateRender,h,m=le.to(o,Ae({ease:i.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:i.duration||Math.abs((a-(u&&"time"in u?u.time:o._time))/o.timeScale())||fe,onStart:function(){if(o.pause(),!h){var b=i.duration||Math.abs((a-(u&&"time"in u?u.time:o._time))/o.timeScale());m._dur!==b&&Ft(m,b,0,1).render(m._time,!0,!0),h=1}d&&d.apply(m,f||[])}},i));return g?m.render(0):m},t.tweenFromTo=function(n,i,o){return this.tweenTo(i,Ae({startAt:{time:Oe(this,n)}},o))},t.recent=function(){return this._recent},t.nextLabel=function(n){return n===void 0&&(n=this._time),Sr(this,Oe(this,n))},t.previousLabel=function(n){return n===void 0&&(n=this._time),Sr(this,Oe(this,n),1)},t.currentLabel=function(n){return arguments.length?this.seek(n,!0):this.previousLabel(this._time+fe)},t.shiftChildren=function(n,i,o){o===void 0&&(o=0);for(var a=this._first,l=this.labels,u;a;)a._start>=o&&(a._start+=n,a._end+=n),a=a._next;if(i)for(u in l)l[u]>=o&&(l[u]+=n);return xt(this)},t.invalidate=function(n){var i=this._first;for(this._lock=0;i;)i.invalidate(n),i=i._next;return r.prototype.invalidate.call(this,n)},t.clear=function(n){n===void 0&&(n=!0);for(var i=this._first,o;i;)o=i._next,this.remove(i),i=o;return this._dp&&(this._time=this._tTime=this._pTime=0),n&&(this.labels={}),xt(this)},t.totalDuration=function(n){var i=0,o=this,a=o._last,l=Ye,u,d,f;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-n:n));if(o._dirty){for(f=o.parent;a;)u=a._prev,a._dirty&&a.totalDuration(),d=a._start,d>l&&o._sort&&a._ts&&!o._lock?(o._lock=1,Ge(o,a,d-a._delay,1)._lock=0):l=d,d<0&&a._ts&&(i-=d,(!f&&!o._dp||f&&f.smoothChildTiming)&&(o._start+=d/o._ts,o._time-=d,o._tTime-=d),o.shiftChildren(-d,!1,-1/0),l=0),a._end>i&&a._ts&&(i=a._end),a=u;Ft(o,o===re&&o._time>i?o._time:i,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(n){if(re._ts&&(ki(re,Ps(n,re)),yi=Ee.frame),Ee.frame>=kr){kr+=Be.autoSleep||120;var i=re._first;if((!i||!i._ts)&&Be.autoSleep&&Ee._listeners.length<2){for(;i&&!i._ts;)i=i._next;i||Ee.sleep()}}},e}(fs);Ae(we.prototype,{_lock:0,_hasPause:0,_forcing:0});var rl=function(e,t,s,n,i,o,a){var l=new _e(this._pt,e,t,0,1,Zi,null,i),u=0,d=0,f,g,h,m,p,b,k,v;for(l.b=s,l.e=n,s+="",n+="",(k=~n.indexOf("random("))&&(n=ps(n)),o&&(v=[s,n],o(v,e,t),s=v[0],n=v[1]),g=s.match(Ys)||[];f=Ys.exec(n);)m=f[0],p=n.substring(u,f.index),h?h=(h+1)%5:p.substr(-5)==="rgba("&&(h=1),m!==g[d++]&&(b=parseFloat(g[d-1])||0,l._pt={_next:l._pt,p:p||d===1?p:",",s:b,c:m.charAt(1)==="="?It(b,m)-b:parseFloat(m)-b,m:h&&h<4?Math.round:0},u=Ys.lastIndex);return l.c=u<n.length?n.substring(u,n.length):"",l.fp=a,(fi.test(n)||k)&&(l.e=0),this._pt=l,l},Fn=function(e,t,s,n,i,o,a,l,u,d){oe(n)&&(n=n(i||0,e,o));var f=e[t],g=s!=="get"?s:oe(f)?u?e[t.indexOf("set")||!oe(e["get"+t.substr(3)])?t:"get"+t.substr(3)](u):e[t]():f,h=oe(f)?u?cl:qi:Wn,m;if(de(n)&&(~n.indexOf("random(")&&(n=ps(n)),n.charAt(1)==="="&&(m=It(g,n)+(he(g)||0),(m||m===0)&&(n=m))),!d||g!==n||vn)return!isNaN(g*n)&&n!==""?(m=new _e(this._pt,e,t,+g||0,n-(g||0),typeof f=="boolean"?dl:Gi,0,h),u&&(m.fp=u),a&&m.modifier(a,this,e),this._pt=m):(!f&&!(t in e)&&On(t,n),rl.call(this,e,t,g,n,h,l||Be.stringFilter,u))},il=function(e,t,s,n,i){if(oe(e)&&(e=as(e,i,t,s,n)),!Xe(e)||e.style&&e.nodeType||ge(e)||pi(e))return de(e)?as(e,i,t,s,n):e;var o={},a;for(a in e)o[a]=as(e[a],i,t,s,n);return o},Wi=function(e,t,s,n,i,o){var a,l,u,d;if(Re[e]&&(a=new Re[e]).init(i,a.rawVars?t[e]:il(t[e],n,i,o,s),s,n,o)!==!1&&(s._pt=l=new _e(s._pt,i,e,0,1,a.render,a,0,a.priority),s!==Lt))for(u=s._ptLookup[s._targets.indexOf(i)],d=a._props.length;d--;)u[a._props[d]]=l;return a},ut,vn,Un=function r(e,t,s){var n=e.vars,i=n.ease,o=n.startAt,a=n.immediateRender,l=n.lazy,u=n.onUpdate,d=n.runBackwards,f=n.yoyoEase,g=n.keyframes,h=n.autoRevert,m=e._dur,p=e._startAt,b=e._targets,k=e.parent,v=k&&k.data==="nested"?k.vars.targets:b,y=e._overwrite==="auto"&&!An,_=e.timeline,w,C,T,x,z,D,K,N,W,te,P,U,G;if(_&&(!g||!i)&&(i="none"),e._ease=St(i,Vt.ease),e._yEase=f?Ki(St(f===!0?i:f,Vt.ease)):0,f&&e._yoyo&&!e._repeat&&(f=e._yEase,e._yEase=e._ease,e._ease=f),e._from=!_&&!!n.runBackwards,!_||g&&!n.stagger){if(N=b[0]?Ct(b[0]).harness:0,U=N&&n[N.prop],w=Bs(n,$n),p&&(p._zTime<0&&p.progress(1),t<0&&d&&a&&!h?p.render(-1,!0):p.revert(d&&m?Ts:Aa),p._lazy=0),o){if(gt(e._startAt=le.set(b,Ae({data:"isStart",overwrite:!1,parent:k,immediateRender:!0,lazy:!p&&ve(l),startAt:null,delay:0,onUpdate:u&&function(){return Me(e,"onUpdate")},stagger:0},o))),e._startAt._dp=0,e._startAt._sat=e,t<0&&(pe||!a&&!h)&&e._startAt.revert(Ts),a&&m&&t<=0&&s<=0){t&&(e._zTime=t);return}}else if(d&&m&&!p){if(t&&(a=!1),T=Ae({overwrite:!1,data:"isFromStart",lazy:a&&!p&&ve(l),immediateRender:a,stagger:0,parent:k},w),U&&(T[N.prop]=U),gt(e._startAt=le.set(b,T)),e._startAt._dp=0,e._startAt._sat=e,t<0&&(pe?e._startAt.revert(Ts):e._startAt.render(-1,!0)),e._zTime=t,!a)r(e._startAt,fe,fe);else if(!t)return}for(e._pt=e._ptCache=0,l=m&&ve(l)||l&&!m,C=0;C<b.length;C++){if(z=b[C],K=z._gsap||Kn(b)[C]._gsap,e._ptLookup[C]=te={},fn[K.id]&&ht.length&&Ms(),P=v===b?C:v.indexOf(z),N&&(W=new N).init(z,U||w,e,P,v)!==!1&&(e._pt=x=new _e(e._pt,z,W.name,0,1,W.render,W,0,W.priority),W._props.forEach(function(A){te[A]=x}),W.priority&&(D=1)),!N||U)for(T in w)Re[T]&&(W=Wi(T,w,e,P,z,v))?W.priority&&(D=1):te[T]=x=Fn.call(e,z,T,"get",w[T],P,v,0,n.stringFilter);e._op&&e._op[C]&&e.kill(z,e._op[C]),y&&e._pt&&(ut=e,re.killTweensOf(z,te,e.globalTime(t)),G=!e.parent,ut=0),e._pt&&l&&(fn[K.id]=1)}D&&Yi(e),e._onInit&&e._onInit(e)}e._onUpdate=u,e._initted=(!e._op||e._pt)&&!G,g&&t<=0&&_.render(Ye,!0,!0)},ol=function(e,t,s,n,i,o,a,l){var u=(e._pt&&e._ptCache||(e._ptCache={}))[t],d,f,g,h;if(!u)for(u=e._ptCache[t]=[],g=e._ptLookup,h=e._targets.length;h--;){if(d=g[h][t],d&&d.d&&d.d._pt)for(d=d.d._pt;d&&d.p!==t&&d.fp!==t;)d=d._next;if(!d)return vn=1,e.vars[t]="+=0",Un(e,a),vn=0,l?us(t+" not eligible for reset"):1;u.push(d)}for(h=u.length;h--;)f=u[h],d=f._pt||f,d.s=(n||n===0)&&!i?n:d.s+(n||0)+o*d.c,d.c=s-d.s,f.e&&(f.e=ae(s)+he(f.e)),f.b&&(f.b=d.s+he(f.b))},al=function(e,t){var s=e[0]?Ct(e[0]).harness:0,n=s&&s.aliases,i,o,a,l;if(!n)return t;i=Kt({},t);for(o in n)if(o in i)for(l=n[o].split(","),a=l.length;a--;)i[l[a]]=i[o];return i},ll=function(e,t,s,n){var i=t.ease||n||"power1.inOut",o,a;if(ge(t))a=s[e]||(s[e]=[]),t.forEach(function(l,u){return a.push({t:u/(t.length-1)*100,v:l,e:i})});else for(o in t)a=s[o]||(s[o]=[]),o==="ease"||a.push({t:parseFloat(e),v:t[o],e:i})},as=function(e,t,s,n,i){return oe(e)?e.call(t,s,n,i):de(e)&&~e.indexOf("random(")?ps(e):e},Hi=Vn+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",ji={};ke(Hi+",id,stagger,delay,duration,paused,scrollTrigger",function(r){return ji[r]=1});var le=function(r){ui(e,r);function e(s,n,i,o){var a;typeof n=="number"&&(i.duration=n,n=i,i=null),a=r.call(this,o?n:is(n))||this;var l=a.vars,u=l.duration,d=l.delay,f=l.immediateRender,g=l.stagger,h=l.overwrite,m=l.keyframes,p=l.defaults,b=l.scrollTrigger,k=l.yoyoEase,v=n.parent||re,y=(ge(s)||pi(s)?ot(s[0]):"length"in n)?[s]:$e(s),_,w,C,T,x,z,D,K;if(a._targets=y.length?Kn(y):us("GSAP target "+s+" not found. https://gsap.com",!Be.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=h,m||g||Cs(u)||Cs(d)){if(n=a.vars,_=a.timeline=new we({data:"nested",defaults:p||{},targets:v&&v.data==="nested"?v.vars.targets:y}),_.kill(),_.parent=_._dp=nt(a),_._start=0,g||Cs(u)||Cs(d)){if(T=y.length,D=g&&Mi(g),Xe(g))for(x in g)~Hi.indexOf(x)&&(K||(K={}),K[x]=g[x]);for(w=0;w<T;w++)C=Bs(n,ji),C.stagger=0,k&&(C.yoyoEase=k),K&&Kt(C,K),z=y[w],C.duration=+as(u,nt(a),w,z,y),C.delay=(+as(d,nt(a),w,z,y)||0)-a._delay,!g&&T===1&&C.delay&&(a._delay=d=C.delay,a._start+=d,C.delay=0),_.to(z,C,D?D(w,z,y):0),_._ease=F.none;_.duration()?u=d=0:a.timeline=0}else if(m){is(Ae(_.vars.defaults,{ease:"none"})),_._ease=St(m.ease||n.ease||"none");var N=0,W,te,P;if(ge(m))m.forEach(function(U){return _.to(y,U,">")}),_.duration();else{C={};for(x in m)x==="ease"||x==="easeEach"||ll(x,m[x],C,m.easeEach);for(x in C)for(W=C[x].sort(function(U,G){return U.t-G.t}),N=0,w=0;w<W.length;w++)te=W[w],P={ease:te.e,duration:(te.t-(w?W[w-1].t:0))/100*u},P[x]=te.v,_.to(y,P,N),N+=P.duration;_.duration()<u&&_.to({},{duration:u-_.duration()})}}u||a.duration(u=_.duration())}else a.timeline=0;return h===!0&&!An&&(ut=nt(a),re.killTweensOf(y),ut=0),Ge(v,nt(a),i),n.reversed&&a.reverse(),n.paused&&a.paused(!0),(f||!u&&!m&&a._start===ce(v._time)&&ve(f)&&Va(nt(a))&&v.data!=="nested")&&(a._tTime=-1e-8,a.render(Math.max(0,-d)||0)),b&&Ti(nt(a),b),a}var t=e.prototype;return t.render=function(n,i,o){var a=this._time,l=this._tDur,u=this._dur,d=n<0,f=n>l-fe&&!d?l:n<fe?0:n,g,h,m,p,b,k,v,y,_;if(!u)Na(this,n,i,o);else if(f!==this._tTime||!n||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==d||this._lazy){if(g=f,y=this.timeline,this._repeat){if(p=u+this._rDelay,this._repeat<-1&&d)return this.totalTime(p*100+n,i,o);if(g=ce(f%p),f===l?(m=this._repeat,g=u):(b=ce(f/p),m=~~b,m&&m===b?(g=u,m--):g>u&&(g=u)),k=this._yoyo&&m&1,k&&(_=this._yEase,g=u-g),b=Nt(this._tTime,p),g===a&&!o&&this._initted&&m===b)return this._tTime=f,this;m!==b&&(y&&this._yEase&&Ni(y,k),this.vars.repeatRefresh&&!k&&!this._lock&&g!==p&&this._initted&&(this._lock=o=1,this.render(ce(p*m),!0).invalidate()._lock=0))}if(!this._initted){if(zi(this,d?n:g,o,i,f))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&m!==b))return this;if(u!==this._dur)return this.render(n,i,o)}if(this._tTime=f,this._time=g,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=v=(_||this._ease)(g/u),this._from&&(this.ratio=v=1-v),!a&&f&&!i&&!b&&(Me(this,"onStart"),this._tTime!==f))return this;for(h=this._pt;h;)h.r(v,h.d),h=h._next;y&&y.render(n<0?n:y._dur*y._ease(g/this._dur),i,o)||this._startAt&&(this._zTime=n),this._onUpdate&&!i&&(d&&gn(this,n,i,o),Me(this,"onUpdate")),this._repeat&&m!==b&&this.vars.onRepeat&&!i&&this.parent&&Me(this,"onRepeat"),(f===this._tDur||!f)&&this._tTime===f&&(d&&!this._onUpdate&&gn(this,n,!0,!0),(n||!u)&&(f===this._tDur&&this._ts>0||!f&&this._ts<0)&>(this,1),!i&&!(d&&!a)&&(f||a||k)&&(Me(this,f===l?"onComplete":"onReverseComplete",!0),this._prom&&!(f<l&&this.timeScale()>0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(n){return(!n||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(n),r.prototype.invalidate.call(this,n)},t.resetTo=function(n,i,o,a,l){hs||Ee.wake(),this._ts||this.play();var u=Math.min(this._dur,(this._dp._time-this._start)*this._ts),d;return this._initted||Un(this,u),d=this._ease(u/this._dur),ol(this,n,i,o,a,d,u,l)?this.resetTo(n,i,o,a,1):(Ns(this,0),this.parent||xi(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(n,i){if(i===void 0&&(i="all"),!n&&(!i||i==="all"))return this._lazy=this._pt=0,this.parent?ss(this):this.scrollTrigger&&this.scrollTrigger.kill(!!pe),this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(n,i,ut&&ut.vars.overwrite!==!0)._first||ss(this),this.parent&&o!==this.timeline.totalDuration()&&Ft(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,l=n?$e(n):a,u=this._ptLookup,d=this._pt,f,g,h,m,p,b,k;if((!i||i==="all")&&Oa(a,l))return i==="all"&&(this._pt=0),ss(this);for(f=this._op=this._op||[],i!=="all"&&(de(i)&&(p={},ke(i,function(v){return p[v]=1}),i=p),i=al(a,i)),k=a.length;k--;)if(~l.indexOf(a[k])){g=u[k],i==="all"?(f[k]=i,m=g,h={}):(h=f[k]=f[k]||{},m=i);for(p in m)b=g&&g[p],b&&((!("kill"in b.d)||b.d.kill(p)===!0)&&Vs(this,b,"_pt"),delete g[p]),h!=="all"&&(h[p]=1)}return this._initted&&!this._pt&&d&&ss(this),this},e.to=function(n,i){return new e(n,i,arguments[2])},e.from=function(n,i){return os(1,arguments)},e.delayedCall=function(n,i,o,a){return new e(i,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:n,onComplete:i,onReverseComplete:i,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},e.fromTo=function(n,i,o){return os(2,arguments)},e.set=function(n,i){return i.duration=0,i.repeatDelay||(i.repeat=0),new e(n,i)},e.killTweensOf=function(n,i,o){return re.killTweensOf(n,i,o)},e}(fs);Ae(le.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});ke("staggerTo,staggerFrom,staggerFromTo",function(r){le[r]=function(){var e=new we,t=wn.call(arguments,0);return t.splice(r==="staggerFromTo"?5:4,0,0),e[r].apply(e,t)}});var Wn=function(e,t,s){return e[t]=s},qi=function(e,t,s){return e[t](s)},cl=function(e,t,s,n){return e[t](n.fp,s)},ul=function(e,t,s){return e.setAttribute(t,s)},Hn=function(e,t){return oe(e[t])?qi:Dn(e[t])&&e.setAttribute?ul:Wn},Gi=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},dl=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},Zi=function(e,t){var s=t._pt,n="";if(!e&&t.b)n=t.b;else if(e===1&&t.e)n=t.e;else{for(;s;)n=s.p+(s.m?s.m(s.s+s.c*e):Math.round((s.s+s.c*e)*1e4)/1e4)+n,s=s._next;n+=t.c}t.set(t.t,t.p,n,t)},jn=function(e,t){for(var s=t._pt;s;)s.r(e,s.d),s=s._next},pl=function(e,t,s,n){for(var i=this._pt,o;i;)o=i._next,i.p===n&&i.modifier(e,t,s),i=o},hl=function(e){for(var t=this._pt,s,n;t;)n=t._next,t.p===e&&!t.op||t.op===e?Vs(this,t,"_pt"):t.dep||(s=1),t=n;return!s},fl=function(e,t,s,n){n.mSet(e,t,n.m.call(n.tween,s,n.mt),n)},Yi=function(e){for(var t=e._pt,s,n,i,o;t;){for(s=t._next,n=i;n&&n.pr>t.pr;)n=n._next;(t._prev=n?n._prev:o)?t._prev._next=t:i=t,(t._next=n)?n._prev=t:o=t,t=s}e._pt=i},_e=function(){function r(t,s,n,i,o,a,l,u,d){this.t=s,this.s=i,this.c=o,this.p=n,this.r=a||Gi,this.d=l||this,this.set=u||Wn,this.pr=d||0,this._next=t,t&&(t._prev=this)}var e=r.prototype;return e.modifier=function(s,n,i){this.mSet=this.mSet||this.set,this.set=fl,this.m=s,this.mt=i,this.tween=n},r}();ke(Vn+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(r){return $n[r]=1});Pe.TweenMax=Pe.TweenLite=le;Pe.TimelineLite=Pe.TimelineMax=we;re=new we({sortChildren:!1,defaults:Vt,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Be.stringFilter=Vi;var Tt=[],Rs={},gl=[],zr=0,ml=0,tn=function(e){return(Rs[e]||gl).map(function(t){return t()})},kn=function(){var e=Date.now(),t=[];e-zr>2&&(tn("matchMediaInit"),Tt.forEach(function(s){var n=s.queries,i=s.conditions,o,a,l,u;for(a in n)o=qe.matchMedia(n[a]).matches,o&&(l=1),o!==i[a]&&(i[a]=o,u=1);u&&(s.revert(),l&&t.push(s))}),tn("matchMediaRevert"),t.forEach(function(s){return s.onMatch(s,function(n){return s.add(null,n)})}),zr=e,tn("matchMedia"))},Xi=function(){function r(t,s){this.selector=s&&bn(s),this.data=[],this._r=[],this.isReverted=!1,this.id=ml++,t&&this.add(t)}var e=r.prototype;return e.add=function(s,n,i){oe(s)&&(i=n,n=s,s=oe);var o=this,a=function(){var u=ee,d=o.selector,f;return u&&u!==o&&u.data.push(o),i&&(o.selector=bn(i)),ee=o,f=n.apply(o,arguments),oe(f)&&o._r.push(f),ee=u,o.selector=d,o.isReverted=!1,f};return o.last=a,s===oe?a(o,function(l){return o.add(null,l)}):s?o[s]=a:a},e.ignore=function(s){var n=ee;ee=null,s(this),ee=n},e.getTweens=function(){var s=[];return this.data.forEach(function(n){return n instanceof r?s.push.apply(s,n.getTweens()):n instanceof le&&!(n.parent&&n.parent.data==="nested")&&s.push(n)}),s},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(s,n){var i=this;if(s?function(){for(var a=i.getTweens(),l=i.data.length,u;l--;)u=i.data[l],u.data==="isFlip"&&(u.revert(),u.getChildren(!0,!0,!1).forEach(function(d){return a.splice(a.indexOf(d),1)}));for(a.map(function(d){return{g:d._dur||d._delay||d._sat&&!d._sat.vars.immediateRender?d.globalTime(0):-1/0,t:d}}).sort(function(d,f){return f.g-d.g||-1/0}).forEach(function(d){return d.t.revert(s)}),l=i.data.length;l--;)u=i.data[l],u instanceof we?u.data!=="nested"&&(u.scrollTrigger&&u.scrollTrigger.revert(),u.kill()):!(u instanceof le)&&u.revert&&u.revert(s);i._r.forEach(function(d){return d(s,i)}),i.isReverted=!0}():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),n)for(var o=Tt.length;o--;)Tt[o].id===this.id&&Tt.splice(o,1)},e.revert=function(s){this.kill(s||{})},r}(),wl=function(){function r(t){this.contexts=[],this.scope=t,ee&&ee.data.push(this)}var e=r.prototype;return e.add=function(s,n,i){Xe(s)||(s={matches:s});var o=new Xi(0,i||this.scope),a=o.conditions={},l,u,d;ee&&!o.selector&&(o.selector=ee.selector),this.contexts.push(o),n=o.add("onMatch",n),o.queries=s;for(u in s)u==="all"?d=1:(l=qe.matchMedia(s[u]),l&&(Tt.indexOf(o)<0&&Tt.push(o),(a[u]=l.matches)&&(d=1),l.addListener?l.addListener(kn):l.addEventListener("change",kn)));return d&&n(o,function(f){return o.add(null,f)}),this},e.revert=function(s){this.kill(s||{})},e.kill=function(s){this.contexts.forEach(function(n){return n.kill(s,!0)})},r}(),As={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];t.forEach(function(n){return Ii(n)})},timeline:function(e){return new we(e)},getTweensOf:function(e,t){return re.getTweensOf(e,t)},getProperty:function(e,t,s,n){de(e)&&(e=$e(e)[0]);var i=Ct(e||{}).get,o=s?Ci:_i;return s==="native"&&(s=""),e&&(t?o((Re[t]&&Re[t].get||i)(e,t,s,n)):function(a,l,u){return o((Re[a]&&Re[a].get||i)(e,a,l,u))})},quickSetter:function(e,t,s){if(e=$e(e),e.length>1){var n=e.map(function(d){return xe.quickSetter(d,t,s)}),i=n.length;return function(d){for(var f=i;f--;)n[f](d)}}e=e[0]||{};var o=Re[t],a=Ct(e),l=a.harness&&(a.harness.aliases||{})[t]||t,u=o?function(d){var f=new o;Lt._pt=0,f.init(e,s?d+s:d,Lt,0,[e]),f.render(1,f),Lt._pt&&jn(1,Lt)}:a.set(e,l);return o?u:function(d){return u(e,l,s?d+s:d,a,1)}},quickTo:function(e,t,s){var n,i=xe.to(e,Ae((n={},n[t]="+=0.1",n.paused=!0,n.stagger=0,n),s||{})),o=function(l,u,d){return i.resetTo(t,l,u,d)};return o.tween=i,o},isTweening:function(e){return re.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=St(e.ease,Vt.ease)),_r(Vt,e||{})},config:function(e){return _r(Be,e||{})},registerEffect:function(e){var t=e.name,s=e.effect,n=e.plugins,i=e.defaults,o=e.extendTimeline;(n||"").split(",").forEach(function(a){return a&&!Re[a]&&!Pe[a]&&us(t+" effect requires "+a+" plugin.")}),Xs[t]=function(a,l,u){return s($e(a),Ae(l||{},i),u)},o&&(we.prototype[t]=function(a,l,u){return this.add(Xs[t](a,Xe(l)?l:(u=l)&&{},this),u)})},registerEase:function(e,t){F[e]=St(t)},parseEase:function(e,t){return arguments.length?St(e,t):F},getById:function(e){return re.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var s=new we(e),n,i;for(s.smoothChildTiming=ve(e.smoothChildTiming),re.remove(s),s._dp=0,s._time=s._tTime=re._time,n=re._first;n;)i=n._next,(t||!(!n._dur&&n instanceof le&&n.vars.onComplete===n._targets[0]))&&Ge(s,n,n._start-n._delay),n=i;return Ge(re,s,0),s},context:function(e,t){return e?new Xi(e,t):ee},matchMedia:function(e){return new wl(e)},matchMediaRefresh:function(){return Tt.forEach(function(e){var t=e.conditions,s,n;for(n in t)t[n]&&(t[n]=!1,s=1);s&&e.revert()})||kn()},addEventListener:function(e,t){var s=Rs[e]||(Rs[e]=[]);~s.indexOf(t)||s.push(t)},removeEventListener:function(e,t){var s=Rs[e],n=s&&s.indexOf(t);n>=0&&s.splice(n,1)},utils:{wrap:Za,wrapYoyo:Ya,distribute:Mi,random:Pi,snap:Bi,normalize:Ga,getUnit:he,clamp:Wa,splitColor:Oi,toArray:$e,selector:bn,mapRange:Di,pipe:ja,unitize:qa,interpolate:Xa,shuffle:Ei},install:wi,effects:Xs,ticker:Ee,updateRoot:we.updateRoot,plugins:Re,globalTimeline:re,core:{PropTween:_e,globals:bi,Tween:le,Timeline:we,Animation:fs,getCache:Ct,_removeLinkedListItem:Vs,reverting:function(){return pe},context:function(e){return e&&ee&&(ee.data.push(e),e._ctx=ee),ee},suppressOverwrites:function(e){return An=e}}};ke("to,from,fromTo,delayedCall,set,killTweensOf",function(r){return As[r]=le[r]});Ee.add(we.updateRoot);Lt=As.to({},{duration:0});var bl=function(e,t){for(var s=e._pt;s&&s.p!==t&&s.op!==t&&s.fp!==t;)s=s._next;return s},yl=function(e,t){var s=e._targets,n,i,o;for(n in t)for(i=s.length;i--;)o=e._ptLookup[i][n],o&&(o=o.d)&&(o._pt&&(o=bl(o,n)),o&&o.modifier&&o.modifier(t[n],e,s[i],n))},sn=function(e,t){return{name:e,headless:1,rawVars:1,init:function(n,i,o){o._onInit=function(a){var l,u;if(de(i)&&(l={},ke(i,function(d){return l[d]=1}),i=l),t){l={};for(u in i)l[u]=t(i[u]);i=l}yl(a,i)}}}},xe=As.registerPlugin({name:"attr",init:function(e,t,s,n,i){var o,a,l;this.tween=s;for(o in t)l=e.getAttribute(o)||"",a=this.add(e,"setAttribute",(l||0)+"",t[o],n,i,0,0,o),a.op=o,a.b=l,this._props.push(o)},render:function(e,t){for(var s=t._pt;s;)pe?s.set(s.t,s.p,s.b,s):s.r(e,s.d),s=s._next}},{name:"endArray",headless:1,init:function(e,t){for(var s=t.length;s--;)this.add(e,s,e[s]||0,t[s],0,0,0,0,0,1)}},sn("roundProps",yn),sn("modifiers"),sn("snap",Bi))||As;le.version=we.version=xe.version="3.13.0";mi=1;Ln()&&Ut();F.Power0;F.Power1;F.Power2;F.Power3;F.Power4;F.Linear;F.Quad;F.Cubic;F.Quart;F.Quint;F.Strong;F.Elastic;F.Back;F.SteppedEase;F.Bounce;F.Sine;F.Expo;F.Circ;/*!
|
|
12
12
|
* CSSPlugin 3.13.0
|
|
13
13
|
* https://gsap.com
|
|
14
14
|
*
|
|
15
15
|
* Copyright 2008-2025, GreenSock. All rights reserved.
|
|
16
16
|
* Subject to the terms at https://gsap.com/standard-license
|
|
17
17
|
* @author: Jack Doyle, jack@greensock.com
|
|
18
|
-
*/var Un,Xe,St,bn,ut,$n,_n,wa=function(){return typeof window<"u"},qe={},ct=180/Math.PI,kt=Math.PI/180,wt=Math.atan2,Hn=1e8,vn=/([A-Z])/g,ba=/(left|right|width|margin|padding|x)/i,_a=/[\s,\(]\S/,Ne={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Zs=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},va=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Ca=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},xa=function(e,t){var s=t.s+t.c*e;t.set(t.t,t.p,~~(s+(s<0?-.5:.5))+t.u,t)},oi=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},ai=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},Sa=function(e,t,s){return e.style[t]=s},ka=function(e,t,s){return e.style.setProperty(t,s)},Ta=function(e,t,s){return e._gsap[t]=s},za=function(e,t,s){return e._gsap.scaleX=e._gsap.scaleY=s},Ra=function(e,t,s,n,r){var o=e._gsap;o.scaleX=o.scaleY=s,o.renderTransform(r,o)},Ma=function(e,t,s,n,r){var o=e._gsap;o[t]=s,o.renderTransform(r,o)},X="transform",_e=X+"Origin",Ea=function i(e,t){var s=this,n=this.target,r=n.style,o=n._gsap;if(e in qe&&r){if(this.tfm=this.tfm||{},e!=="transform")e=Ne[e]||e,~e.indexOf(",")?e.split(",").forEach(function(a){return s.tfm[a]=je(n,a)}):this.tfm[e]=o.x?o[e]:je(n,e),e===_e&&(this.tfm.zOrigin=o.zOrigin);else return Ne.transform.split(",").forEach(function(a){return i.call(s,a,t)});if(this.props.indexOf(X)>=0)return;o.svg&&(this.svgo=n.getAttribute("data-svg-origin"),this.props.push(_e,t,"")),e=X}(r||t)&&this.props.push(e,t,r[e])},li=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},Ba=function(){var e=this.props,t=this.target,s=t.style,n=t._gsap,r,o;for(r=0;r<e.length;r+=3)e[r+1]?e[r+1]===2?t[e[r]](e[r+2]):t[e[r]]=e[r+2]:e[r+2]?s[e[r]]=e[r+2]:s.removeProperty(e[r].substr(0,2)==="--"?e[r]:e[r].replace(vn,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)n[o]=this.tfm[o];n.svg&&(n.renderTransform(),t.setAttribute("data-svg-origin",this.svgo||"")),r=_n(),(!r||!r.isStart)&&!s[X]&&(li(s),n.zOrigin&&s[_e]&&(s[_e]+=" "+n.zOrigin+"px",n.zOrigin=0,n.renderTransform()),n.uncache=1)}},ci=function(e,t){var s={target:e,props:[],revert:Ba,save:Ea};return e._gsap||ve.core.getCache(e),t&&e.style&&e.nodeType&&t.split(",").forEach(function(n){return s.save(n)}),s},ui,Xs=function(e,t){var s=Xe.createElementNS?Xe.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):Xe.createElement(e);return s&&s.style?s:Xe.createElement(e)},Be=function i(e,t,s){var n=getComputedStyle(e);return n[t]||n.getPropertyValue(t.replace(vn,"-$1").toLowerCase())||n.getPropertyValue(t)||!s&&i(e,Bt(t)||t,1)||""},jn="O,Moz,ms,Ms,Webkit".split(","),Bt=function(e,t,s){var n=t||ut,r=n.style,o=5;if(e in r&&!s)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);o--&&!(jn[o]+e in r););return o<0?null:(o===3?"ms":o>=0?jn[o]:"")+e},Qs=function(){wa()&&window.document&&(Un=window,Xe=Un.document,St=Xe.documentElement,ut=Xs("div")||{style:{}},Xs("div"),X=Bt(X),_e=X+"Origin",ut.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",ui=!!Bt("perspective"),_n=ve.core.reverting,bn=1)},Gn=function(e){var t=e.ownerSVGElement,s=Xs("svg",t&&t.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=e.cloneNode(!0),r;n.style.display="block",s.appendChild(n),St.appendChild(s);try{r=n.getBBox()}catch{}return s.removeChild(n),St.removeChild(s),r},qn=function(e,t){for(var s=t.length;s--;)if(e.hasAttribute(t[s]))return e.getAttribute(t[s])},di=function(e){var t,s;try{t=e.getBBox()}catch{t=Gn(e),s=1}return t&&(t.width||t.height)||s||(t=Gn(e)),t&&!t.width&&!t.x&&!t.y?{x:+qn(e,["x","cx","x1"])||0,y:+qn(e,["y","cy","y1"])||0,width:0,height:0}:t},fi=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&di(e))},ht=function(e,t){if(t){var s=e.style,n;t in qe&&t!==_e&&(t=X),s.removeProperty?(n=t.substr(0,2),(n==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),s.removeProperty(n==="--"?t:t.replace(vn,"-$1").toLowerCase())):s.removeAttribute(t)}},Qe=function(e,t,s,n,r,o){var a=new be(e._pt,t,s,0,1,o?ai:oi);return e._pt=a,a.b=n,a.e=r,e._props.push(s),a},Yn={deg:1,rad:1,turn:1},Pa={grid:1,flex:1},st=function i(e,t,s,n){var r=parseFloat(s)||0,o=(s+"").trim().substr((r+"").length)||"px",a=ut.style,l=ba.test(t),u=e.tagName.toLowerCase()==="svg",d=(u?"client":"offset")+(l?"Width":"Height"),p=100,h=n==="px",g=n==="%",y,f,m,_;if(n===o||!r||Yn[n]||Yn[o])return r;if(o!=="px"&&!h&&(r=i(e,t,s,"px")),_=e.getCTM&&fi(e),(g||o==="%")&&(qe[t]||~t.indexOf("adius")))return y=_?e.getBBox()[l?"width":"height"]:e[d],te(g?r/y*p:r/100*y);if(a[l?"width":"height"]=p+(h?o:n),f=n!=="rem"&&~t.indexOf("adius")||n==="em"&&e.appendChild&&!u?e:e.parentNode,_&&(f=(e.ownerSVGElement||{}).parentNode),(!f||f===Xe||!f.appendChild)&&(f=Xe.body),m=f._gsap,m&&g&&m.width&&l&&m.time===xe.time&&!m.uncache)return te(r/m.width*p);if(g&&(t==="height"||t==="width")){var S=e.style[t];e.style[t]=p+n,y=e[d],S?e.style[t]=S:ht(e,t)}else(g||o==="%")&&!Pa[Be(f,"display")]&&(a.position=Be(e,"position")),f===e&&(a.position="static"),f.appendChild(ut),y=ut[d],f.removeChild(ut),a.position="absolute";return l&&g&&(m=dt(f),m.time=xe.time,m.width=f[d]),te(h?y*r/p:y&&r?p/y*r:0)},je=function(e,t,s,n){var r;return bn||Qs(),t in Ne&&t!=="transform"&&(t=Ne[t],~t.indexOf(",")&&(t=t.split(",")[0])),qe[t]&&t!=="transform"?(r=Jt(e,n),r=t!=="transformOrigin"?r[t]:r.svg?r.origin:ms(Be(e,_e))+" "+r.zOrigin+"px"):(r=e.style[t],(!r||r==="auto"||n||~(r+"").indexOf("calc("))&&(r=hs[t]&&hs[t](e,t,s)||Be(e,t)||Rr(e,t)||(t==="opacity"?1:0))),s&&!~(r+"").trim().indexOf(" ")?st(e,t,r,s)+s:r},Da=function(e,t,s,n){if(!s||s==="none"){var r=Bt(t,e,1),o=r&&Be(e,r,1);o&&o!==s?(t=r,s=o):t==="borderColor"&&(s=Be(e,"borderTopColor"))}var a=new be(this._pt,e.style,t,0,1,ni),l=0,u=0,d,p,h,g,y,f,m,_,S,w,C,b;if(a.b=s,a.e=n,s+="",n+="",n.substring(0,6)==="var(--"&&(n=Be(e,n.substring(4,n.indexOf(")")))),n==="auto"&&(f=e.style[t],e.style[t]=n,n=Be(e,t)||n,f?e.style[t]=f:ht(e,t)),d=[s,n],Gr(d),s=d[0],n=d[1],h=s.match(_t)||[],b=n.match(_t)||[],b.length){for(;p=_t.exec(n);)m=p[0],S=n.substring(l,p.index),y?y=(y+1)%5:(S.substr(-5)==="rgba("||S.substr(-5)==="hsla(")&&(y=1),m!==(f=h[u++]||"")&&(g=parseFloat(f)||0,C=f.substr((g+"").length),m.charAt(1)==="="&&(m=xt(g,m)+C),_=parseFloat(m),w=m.substr((_+"").length),l=_t.lastIndex-w.length,w||(w=w||ke.units[t]||C,l===n.length&&(n+=w,a.e+=w)),C!==w&&(g=st(e,t,f,w)||0),a._pt={_next:a._pt,p:S||u===1?S:",",s:g,c:_-g,m:y&&y<4||t==="zIndex"?Math.round:0});a.c=l<n.length?n.substring(l,n.length):""}else a.r=t==="display"&&n==="none"?ai:oi;return Cr.test(n)&&(a.e=0),this._pt=a,a},Zn={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},Aa=function(e){var t=e.split(" "),s=t[0],n=t[1]||"50%";return(s==="top"||s==="bottom"||n==="left"||n==="right")&&(e=s,s=n,n=e),t[0]=Zn[s]||s,t[1]=Zn[n]||n,t.join(" ")},Oa=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var s=t.t,n=s.style,r=t.u,o=s._gsap,a,l,u;if(r==="all"||r===!0)n.cssText="",l=1;else for(r=r.split(","),u=r.length;--u>-1;)a=r[u],qe[a]&&(l=1,a=a==="transformOrigin"?_e:X),ht(s,a);l&&(ht(s,X),o&&(o.svg&&s.removeAttribute("transform"),n.scale=n.rotate=n.translate="none",Jt(s,1),o.uncache=1,li(n)))}},hs={clearProps:function(e,t,s,n,r){if(r.data!=="isFromStart"){var o=e._pt=new be(e._pt,t,s,0,0,Oa);return o.u=n,o.pr=-10,o.tween=r,e._props.push(s),1}}},Qt=[1,0,0,1,0,0],gi={},pi=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},Xn=function(e){var t=Be(e,X);return pi(t)?Qt:t.substr(7).match(vr).map(te)},Cn=function(e,t){var s=e._gsap||dt(e),n=e.style,r=Xn(e),o,a,l,u;return s.svg&&e.getAttribute("transform")?(l=e.transform.baseVal.consolidate().matrix,r=[l.a,l.b,l.c,l.d,l.e,l.f],r.join(",")==="1,0,0,1,0,0"?Qt:r):(r===Qt&&!e.offsetParent&&e!==St&&!s.svg&&(l=n.display,n.display="block",o=e.parentNode,(!o||!e.offsetParent&&!e.getBoundingClientRect().width)&&(u=1,a=e.nextElementSibling,St.appendChild(e)),r=Xn(e),l?n.display=l:ht(e,"display"),u&&(a?o.insertBefore(e,a):o?o.appendChild(e):St.removeChild(e))),t&&r.length>6?[r[0],r[1],r[4],r[5],r[12],r[13]]:r)},Js=function(e,t,s,n,r,o){var a=e._gsap,l=r||Cn(e,!0),u=a.xOrigin||0,d=a.yOrigin||0,p=a.xOffset||0,h=a.yOffset||0,g=l[0],y=l[1],f=l[2],m=l[3],_=l[4],S=l[5],w=t.split(" "),C=parseFloat(w[0])||0,b=parseFloat(w[1])||0,k,z,x,v;s?l!==Qt&&(z=g*m-y*f)&&(x=C*(m/z)+b*(-f/z)+(f*S-m*_)/z,v=C*(-y/z)+b*(g/z)-(g*S-y*_)/z,C=x,b=v):(k=di(e),C=k.x+(~w[0].indexOf("%")?C/100*k.width:C),b=k.y+(~(w[1]||w[0]).indexOf("%")?b/100*k.height:b)),n||n!==!1&&a.smooth?(_=C-u,S=b-d,a.xOffset=p+(_*g+S*f)-_,a.yOffset=h+(_*y+S*m)-S):a.xOffset=a.yOffset=0,a.xOrigin=C,a.yOrigin=b,a.smooth=!!n,a.origin=t,a.originIsAbsolute=!!s,e.style[_e]="0px 0px",o&&(Qe(o,a,"xOrigin",u,C),Qe(o,a,"yOrigin",d,b),Qe(o,a,"xOffset",p,a.xOffset),Qe(o,a,"yOffset",h,a.yOffset)),e.setAttribute("data-svg-origin",C+" "+b)},Jt=function(e,t){var s=e._gsap||new Xr(e);if("x"in s&&!t&&!s.uncache)return s;var n=e.style,r=s.scaleX<0,o="px",a="deg",l=getComputedStyle(e),u=Be(e,_e)||"0",d,p,h,g,y,f,m,_,S,w,C,b,k,z,x,v,A,N,V,D,G,U,K,W,M,ce,Oe,he,H,j,L,se;return d=p=h=f=m=_=S=w=C=0,g=y=1,s.svg=!!(e.getCTM&&fi(e)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(n[X]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[X]!=="none"?l[X]:"")),n.scale=n.rotate=n.translate="none"),z=Cn(e,s.svg),s.svg&&(s.uncache?(M=e.getBBox(),u=s.xOrigin-M.x+"px "+(s.yOrigin-M.y)+"px",W=""):W=!t&&e.getAttribute("data-svg-origin"),Js(e,W||u,!!W||s.originIsAbsolute,s.smooth!==!1,z)),b=s.xOrigin||0,k=s.yOrigin||0,z!==Qt&&(N=z[0],V=z[1],D=z[2],G=z[3],d=U=z[4],p=K=z[5],z.length===6?(g=Math.sqrt(N*N+V*V),y=Math.sqrt(G*G+D*D),f=N||V?wt(V,N)*ct:0,S=D||G?wt(D,G)*ct+f:0,S&&(y*=Math.abs(Math.cos(S*kt))),s.svg&&(d-=b-(b*N+k*D),p-=k-(b*V+k*G))):(se=z[6],j=z[7],Oe=z[8],he=z[9],H=z[10],L=z[11],d=z[12],p=z[13],h=z[14],x=wt(se,H),m=x*ct,x&&(v=Math.cos(-x),A=Math.sin(-x),W=U*v+Oe*A,M=K*v+he*A,ce=se*v+H*A,Oe=U*-A+Oe*v,he=K*-A+he*v,H=se*-A+H*v,L=j*-A+L*v,U=W,K=M,se=ce),x=wt(-D,H),_=x*ct,x&&(v=Math.cos(-x),A=Math.sin(-x),W=N*v-Oe*A,M=V*v-he*A,ce=D*v-H*A,L=G*A+L*v,N=W,V=M,D=ce),x=wt(V,N),f=x*ct,x&&(v=Math.cos(x),A=Math.sin(x),W=N*v+V*A,M=U*v+K*A,V=V*v-N*A,K=K*v-U*A,N=W,U=M),m&&Math.abs(m)+Math.abs(f)>359.9&&(m=f=0,_=180-_),g=te(Math.sqrt(N*N+V*V+D*D)),y=te(Math.sqrt(K*K+se*se)),x=wt(U,K),S=Math.abs(x)>2e-4?x*ct:0,C=L?1/(L<0?-L:L):0),s.svg&&(W=e.getAttribute("transform"),s.forceCSS=e.setAttribute("transform","")||!pi(Be(e,X)),W&&e.setAttribute("transform",W))),Math.abs(S)>90&&Math.abs(S)<270&&(r?(g*=-1,S+=f<=0?180:-180,f+=f<=0?180:-180):(y*=-1,S+=S<=0?180:-180)),t=t||s.uncache,s.x=d-((s.xPercent=d&&(!t&&s.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-d)?-50:0)))?e.offsetWidth*s.xPercent/100:0)+o,s.y=p-((s.yPercent=p&&(!t&&s.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-p)?-50:0)))?e.offsetHeight*s.yPercent/100:0)+o,s.z=h+o,s.scaleX=te(g),s.scaleY=te(y),s.rotation=te(f)+a,s.rotationX=te(m)+a,s.rotationY=te(_)+a,s.skewX=S+a,s.skewY=w+a,s.transformPerspective=C+o,(s.zOrigin=parseFloat(u.split(" ")[2])||!t&&s.zOrigin||0)&&(n[_e]=ms(u)),s.xOffset=s.yOffset=0,s.force3D=ke.force3D,s.renderTransform=s.svg?Ia:ui?hi:La,s.uncache=0,s},ms=function(e){return(e=e.split(" "))[0]+" "+e[1]},Ps=function(e,t,s){var n=fe(t);return te(parseFloat(t)+parseFloat(st(e,"x",s+"px",n)))+n},La=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,hi(e,t)},at="0deg",Vt="0px",lt=") ",hi=function(e,t){var s=t||this,n=s.xPercent,r=s.yPercent,o=s.x,a=s.y,l=s.z,u=s.rotation,d=s.rotationY,p=s.rotationX,h=s.skewX,g=s.skewY,y=s.scaleX,f=s.scaleY,m=s.transformPerspective,_=s.force3D,S=s.target,w=s.zOrigin,C="",b=_==="auto"&&e&&e!==1||_===!0;if(w&&(p!==at||d!==at)){var k=parseFloat(d)*kt,z=Math.sin(k),x=Math.cos(k),v;k=parseFloat(p)*kt,v=Math.cos(k),o=Ps(S,o,z*v*-w),a=Ps(S,a,-Math.sin(k)*-w),l=Ps(S,l,x*v*-w+w)}m!==Vt&&(C+="perspective("+m+lt),(n||r)&&(C+="translate("+n+"%, "+r+"%) "),(b||o!==Vt||a!==Vt||l!==Vt)&&(C+=l!==Vt||b?"translate3d("+o+", "+a+", "+l+") ":"translate("+o+", "+a+lt),u!==at&&(C+="rotate("+u+lt),d!==at&&(C+="rotateY("+d+lt),p!==at&&(C+="rotateX("+p+lt),(h!==at||g!==at)&&(C+="skew("+h+", "+g+lt),(y!==1||f!==1)&&(C+="scale("+y+", "+f+lt),S.style[X]=C||"translate(0, 0)"},Ia=function(e,t){var s=t||this,n=s.xPercent,r=s.yPercent,o=s.x,a=s.y,l=s.rotation,u=s.skewX,d=s.skewY,p=s.scaleX,h=s.scaleY,g=s.target,y=s.xOrigin,f=s.yOrigin,m=s.xOffset,_=s.yOffset,S=s.forceCSS,w=parseFloat(o),C=parseFloat(a),b,k,z,x,v;l=parseFloat(l),u=parseFloat(u),d=parseFloat(d),d&&(d=parseFloat(d),u+=d,l+=d),l||u?(l*=kt,u*=kt,b=Math.cos(l)*p,k=Math.sin(l)*p,z=Math.sin(l-u)*-h,x=Math.cos(l-u)*h,u&&(d*=kt,v=Math.tan(u-d),v=Math.sqrt(1+v*v),z*=v,x*=v,d&&(v=Math.tan(d),v=Math.sqrt(1+v*v),b*=v,k*=v)),b=te(b),k=te(k),z=te(z),x=te(x)):(b=p,x=h,k=z=0),(w&&!~(o+"").indexOf("px")||C&&!~(a+"").indexOf("px"))&&(w=st(g,"x",o,"px"),C=st(g,"y",a,"px")),(y||f||m||_)&&(w=te(w+y-(y*b+f*z)+m),C=te(C+f-(y*k+f*x)+_)),(n||r)&&(v=g.getBBox(),w=te(w+n/100*v.width),C=te(C+r/100*v.height)),v="matrix("+b+","+k+","+z+","+x+","+w+","+C+")",g.setAttribute("transform",v),S&&(g.style[X]=v)},Va=function(e,t,s,n,r){var o=360,a=le(r),l=parseFloat(r)*(a&&~r.indexOf("rad")?ct:1),u=l-n,d=n+u+"deg",p,h;return a&&(p=r.split("_")[1],p==="short"&&(u%=o,u!==u%(o/2)&&(u+=u<0?o:-360)),p==="cw"&&u<0?u=(u+o*Hn)%o-~~(u/o)*o:p==="ccw"&&u>0&&(u=(u-o*Hn)%o-~~(u/o)*o)),e._pt=h=new be(e._pt,t,s,n,u,va),h.e=d,h.u="deg",e._props.push(s),h},Qn=function(e,t){for(var s in t)e[s]=t[s];return e},Ka=function(e,t,s){var n=Qn({},s._gsap),r="perspective,force3D,transformOrigin,svgOrigin",o=s.style,a,l,u,d,p,h,g,y;n.svg?(u=s.getAttribute("transform"),s.setAttribute("transform",""),o[X]=t,a=Jt(s,1),ht(s,X),s.setAttribute("transform",u)):(u=getComputedStyle(s)[X],o[X]=t,a=Jt(s,1),o[X]=u);for(l in qe)u=n[l],d=a[l],u!==d&&r.indexOf(l)<0&&(g=fe(u),y=fe(d),p=g!==y?st(s,l,u,y):parseFloat(u),h=parseFloat(d),e._pt=new be(e._pt,a,l,p,h-p,Zs),e._pt.u=y||0,e._props.push(l));Qn(a,n)};we("padding,margin,Width,Radius",function(i,e){var t="Top",s="Right",n="Bottom",r="Left",o=(e<3?[t,s,n,r]:[t+r,t+s,n+s,n+r]).map(function(a){return e<2?i+a:"border"+a+i});hs[e>1?"border"+i:i]=function(a,l,u,d,p){var h,g;if(arguments.length<4)return h=o.map(function(y){return je(a,y,u)}),g=h.join(" "),g.split(h[0]).length===5?h[0]:g;h=(d+"").split(" "),g={},o.forEach(function(y,f){return g[y]=h[f]=h[f]||h[(f-1)/2|0]}),a.init(l,g,p)}});var mi={name:"css",register:Qs,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,s,n,r){var o=this._props,a=e.style,l=s.vars.startAt,u,d,p,h,g,y,f,m,_,S,w,C,b,k,z,x;bn||Qs(),this.styles=this.styles||ci(e),x=this.styles.props,this.tween=s;for(f in t)if(f!=="autoRound"&&(d=t[f],!(Ce[f]&&Qr(f,t,s,n,e,r)))){if(g=typeof d,y=hs[f],g==="function"&&(d=d.call(s,n,e,r),g=typeof d),g==="string"&&~d.indexOf("random(")&&(d=Yt(d)),y)y(this,e,f,d,s)&&(z=1);else if(f.substr(0,2)==="--")u=(getComputedStyle(e).getPropertyValue(f)+"").trim(),d+="",et.lastIndex=0,et.test(u)||(m=fe(u),_=fe(d)),_?m!==_&&(u=st(e,f,u,_)+_):m&&(d+=m),this.add(a,"setProperty",u,d,n,r,0,0,f),o.push(f),x.push(f,0,a[f]);else if(g!=="undefined"){if(l&&f in l?(u=typeof l[f]=="function"?l[f].call(s,n,e,r):l[f],le(u)&&~u.indexOf("random(")&&(u=Yt(u)),fe(u+"")||u==="auto"||(u+=ke.units[f]||fe(je(e,f))||""),(u+"").charAt(1)==="="&&(u=je(e,f))):u=je(e,f),h=parseFloat(u),S=g==="string"&&d.charAt(1)==="="&&d.substr(0,2),S&&(d=d.substr(2)),p=parseFloat(d),f in Ne&&(f==="autoAlpha"&&(h===1&&je(e,"visibility")==="hidden"&&p&&(h=0),x.push("visibility",0,a.visibility),Qe(this,a,"visibility",h?"inherit":"hidden",p?"inherit":"hidden",!p)),f!=="scale"&&f!=="transform"&&(f=Ne[f],~f.indexOf(",")&&(f=f.split(",")[0]))),w=f in qe,w){if(this.styles.save(f),g==="string"&&d.substring(0,6)==="var(--"&&(d=Be(e,d.substring(4,d.indexOf(")"))),p=parseFloat(d)),C||(b=e._gsap,b.renderTransform&&!t.parseTransform||Jt(e,t.parseTransform),k=t.smoothOrigin!==!1&&b.smooth,C=this._pt=new be(this._pt,a,X,0,1,b.renderTransform,b,0,-1),C.dep=1),f==="scale")this._pt=new be(this._pt,b,"scaleY",b.scaleY,(S?xt(b.scaleY,S+p):p)-b.scaleY||0,Zs),this._pt.u=0,o.push("scaleY",f),f+="X";else if(f==="transformOrigin"){x.push(_e,0,a[_e]),d=Aa(d),b.svg?Js(e,d,0,k,0,this):(_=parseFloat(d.split(" ")[2])||0,_!==b.zOrigin&&Qe(this,b,"zOrigin",b.zOrigin,_),Qe(this,a,f,ms(u),ms(d)));continue}else if(f==="svgOrigin"){Js(e,d,1,k,0,this);continue}else if(f in gi){Va(this,b,f,h,S?xt(h,S+d):d);continue}else if(f==="smoothOrigin"){Qe(this,b,"smooth",b.smooth,d);continue}else if(f==="force3D"){b[f]=d;continue}else if(f==="transform"){Ka(this,d,e);continue}}else f in a||(f=Bt(f)||f);if(w||(p||p===0)&&(h||h===0)&&!_a.test(d)&&f in a)m=(u+"").substr((h+"").length),p||(p=0),_=fe(d)||(f in ke.units?ke.units[f]:m),m!==_&&(h=st(e,f,u,_)),this._pt=new be(this._pt,w?b:a,f,h,(S?xt(h,S+p):p)-h,!w&&(_==="px"||f==="zIndex")&&t.autoRound!==!1?xa:Zs),this._pt.u=_||0,m!==_&&_!=="%"&&(this._pt.b=u,this._pt.r=Ca);else if(f in a)Da.call(this,e,f,u,S?S+d:d);else if(f in e)this.add(e,f,u||e[f],S?S+d:d,n,r);else if(f!=="parseTransform"){cn(f,d);continue}w||(f in a?x.push(f,0,a[f]):typeof e[f]=="function"?x.push(f,2,e[f]()):x.push(f,1,u||e[f])),o.push(f)}}z&&ri(this)},render:function(e,t){if(t.tween._time||!_n())for(var s=t._pt;s;)s.r(e,s.d),s=s._next;else t.styles.revert()},get:je,aliases:Ne,getSetter:function(e,t,s){var n=Ne[t];return n&&n.indexOf(",")<0&&(t=n),t in qe&&t!==_e&&(e._gsap.x||je(e,"x"))?s&&$n===s?t==="scale"?za:Ta:($n=s||{})&&(t==="scale"?Ra:Ma):e.style&&!on(e.style[t])?Sa:~t.indexOf("-")?ka:yn(e,t)},core:{_removeProperty:ht,_getMatrix:Cn}};ve.utils.checkPrefix=Bt;ve.core.getStyleSaver=ci;(function(i,e,t,s){var n=we(i+","+e+","+t,function(r){qe[r]=1});we(e,function(r){ke.units[r]="deg",gi[r]=1}),Ne[n[13]]=i+","+e,we(s,function(r){var o=r.split(":");Ne[o[1]]=n[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");we("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(i){ke.units[i]="px"});ve.registerPlugin(mi);var Pe=ve.registerPlugin(mi)||ve;Pe.core.Tween;const Jn={sm:{fontSize:12,sidePadding:8,verticalSpacing:4,borderRadius:8},md:{fontSize:14,sidePadding:12,verticalSpacing:8,borderRadius:10},lg:{fontSize:16,sidePadding:16,verticalSpacing:12,borderRadius:12}};function bt(i){if(i!=null)return`${i}px`}function yi(i){return Math.max(0,Math.min(1,i))}function wi(i){if(!i)return;const e=i.trim();if(/^#([0-9a-fA-F]{3}){1,2}$/.test(e)){let s=0,n=0,r=0;return e.length===4?(s=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16),r=parseInt(e[3]+e[3],16)):(s=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16)),{r:s,g:n,b:r}}const t=e.match(/^rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i);if(t)return{r:Number(t[1]),g:Number(t[2]),b:Number(t[3])}}function Ds(i){const t=Math.max(0,Math.min(255,Math.round(i))).toString(16);return t.length===1?`0${t}`:t}function bi(i){if(i)return`#${Ds(i.r)}${Ds(i.g)}${Ds(i.b)}`}function er(i,e=.12){const t=wi(i);if(!t)return i;const s=yi(e);return bi({r:t.r+(255-t.r)*s,g:t.g+(255-t.g)*s,b:t.b+(255-t.b)*s})}function Fa(i,e=.12){const t=wi(i);if(!t)return i;const s=yi(e);return bi({r:t.r*(1-s),g:t.g*(1-s),b:t.b*(1-s)})}function Na(i,e){if(i)switch(e){case"gradient":{const t=er(i,.08)||i,s=Fa(i,.12)||i;return`linear-gradient(180deg, ${t} 0%, ${s} 100%)`}case"bubble":return`radial-gradient(120% 120% at 10% 0%, ${er(i,.14)||i} 0%, ${i} 60%)`;default:return i}}function Wa(i,e){return{...i?Jn[i]:Jn.md,...void 0}}function Ua(i,e){const t=Wa(i.size),s=i.color,n=Na(i.bgColor??(e==null?void 0:e.fallbackColor),i.bgType),r=bt(i.fontSize??t.fontSize),o=bt(i.borderRadius??t.borderRadius),a=bt(i.verticalPadding),l=bt(i.sidePadding);console.log("paddingTB",a,i.verticalSpacing,t.verticalSpacing),console.log("paddingLR",l,i.sidePadding,t.sidePadding);let u;i.borderWidth&&i.borderWidth>0?u=`${i.borderWidth}px solid ${i.borderColor||(e==null?void 0:e.fallbackColor)||"currentColor"}`:i.borderColor&&!i.borderWidth&&(u=`1px solid ${i.borderColor}`);const d=i.width?i.width+(i.borderWidth??0):void 0,p=i.height?i.height+(i.borderWidth??0):void 0;console.log("widthWithBorder",d,i.width,i.borderWidth),console.log("heightWithBorder",p,i.height,i.borderWidth);const h={color:s,background:n,fontSize:r,borderRadius:o,width:bt(d),height:bt(p),padding:a&&l?`${a} ${l}`:void 0,border:u},g={};for(const y in h){const f=h[y];f!=null&&f!==""&&(g[y]=String(f))}return g}const $a=["innerHTML"],Ha=["src"],ja=c.defineComponent({__name:"ChatCollapsed",props:{element:{}},setup(i){const e=i,t=c.computed(()=>e.element),s=c.computed(()=>Ua(t.value)),n=c.computed(()=>{const a=e.element.logo;return a?a.includes("<svg"):!1}),r=c.computed(()=>{const a=e.element.logo;return a&&a.replace('width="',"").replace('height="',"").replace('"',""),a}),o=c.computed(()=>{var l;const a=(l=e.element.icon)==null?void 0:l.size;return a?a+"px":void 0});return(a,l)=>(c.openBlock(),c.createElementBlock("div",{style:c.normalizeStyle([s.value,{"box-sizing":"content-box"}]),class:"tw:flex tw:items-center tw:justify-center"},[n.value?(c.openBlock(),c.createElementBlock("span",{key:0,class:"hs-collapsed-logo",innerHTML:r.value,style:c.normalizeStyle({width:o.value,height:o.value})},null,12,$a)):r.value?(c.openBlock(),c.createElementBlock("img",{key:1,src:r.value,alt:"logo",style:c.normalizeStyle({width:o.value,height:o.value})},null,12,Ha)):c.createCommentVNode("",!0)],4))}}),De={schema:{version:"1.0",required:["settings","texts","sections"]},settings:{bgChat:"#434345",gapMessageLine:12,fontFamily:"MacPaw Fixel",borderRadius:12,launchView:"closed",letterSpacing:0,logo:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.22048 12.26L8.71413 11.1293C9.1535 10.1231 9.94426 9.32209 10.9307 8.88424L12.2895 8.28107C12.7215 8.08931 12.7215 7.46082 12.2895 7.26906L10.9731 6.68472C9.9613 6.23561 9.15637 5.40496 8.72453 4.3644L8.22447 3.15941C8.0389 2.71224 7.42105 2.71224 7.23548 3.15941L6.7354 4.36439C6.30357 5.40496 5.49861 6.23561 4.48686 6.68472L3.17045 7.26906C2.73843 7.46082 2.73843 8.08931 3.17045 8.28107L4.5293 8.88424C5.51569 9.32209 6.30646 10.1231 6.7458 11.1293L7.23948 12.26C7.42924 12.6946 8.03069 12.6946 8.22048 12.26ZM13.1632 15.0131L13.302 14.6949C13.5495 14.1275 13.9953 13.6758 14.5515 13.4287L14.9792 13.2386C15.2106 13.1358 15.2106 12.7996 14.9792 12.6969L14.5754 12.5174C14.0049 12.264 13.5511 11.7955 13.3078 11.2089L13.1653 10.865C13.0659 10.6254 12.7346 10.6254 12.6352 10.865L12.4927 11.2089C12.2494 11.7955 11.7957 12.264 11.2251 12.5174L10.8213 12.6969C10.59 12.7996 10.59 13.1358 10.8213 13.2386L11.249 13.4287C11.8053 13.6758 12.251 14.1275 12.4985 14.6949L12.6374 15.0131C12.739 15.246 13.0615 15.246 13.1632 15.0131Z" fill="currentColor"/></svg>',fontWeight:500,lineHeight:1.2,loader:"dots",globalRoundingRadius:!0,theme:"light",mode:"collapsed",position:"bottomRight",size:{width:435,height:450},offset:{x:24,y:36}},texts:{welcomeMessage:`🖖 Hi there — I’m your assistant for finding documents, tracking access, and making sense of your files.
|
|
18
|
+
*/var Rr,dt,Ot,qn,_t,Er,Gn,vl=function(){return typeof window<"u"},at={},kt=180/Math.PI,$t=Math.PI/180,Pt=Math.atan2,Mr=1e8,Zn=/([A-Z])/g,kl=/(left|right|width|margin|padding|x)/i,_l=/[\s,\(]\S/,Ze={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},_n=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Cl=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},xl=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},Sl=function(e,t){var s=t.s+t.c*e;t.set(t.t,t.p,~~(s+(s<0?-.5:.5))+t.u,t)},Qi=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},Ji=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},Tl=function(e,t,s){return e.style[t]=s},zl=function(e,t,s){return e.style.setProperty(t,s)},Rl=function(e,t,s){return e._gsap[t]=s},El=function(e,t,s){return e._gsap.scaleX=e._gsap.scaleY=s},Ml=function(e,t,s,n,i){var o=e._gsap;o.scaleX=o.scaleY=s,o.renderTransform(i,o)},Bl=function(e,t,s,n,i){var o=e._gsap;o[t]=s,o.renderTransform(i,o)},ie="transform",Ce=ie+"Origin",Pl=function r(e,t){var s=this,n=this.target,i=n.style,o=n._gsap;if(e in at&&i){if(this.tfm=this.tfm||{},e!=="transform")e=Ze[e]||e,~e.indexOf(",")?e.split(",").forEach(function(a){return s.tfm[a]=rt(n,a)}):this.tfm[e]=o.x?o[e]:rt(n,e),e===Ce&&(this.tfm.zOrigin=o.zOrigin);else return Ze.transform.split(",").forEach(function(a){return r.call(s,a,t)});if(this.props.indexOf(ie)>=0)return;o.svg&&(this.svgo=n.getAttribute("data-svg-origin"),this.props.push(Ce,t,"")),e=ie}(i||t)&&this.props.push(e,t,i[e])},eo=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},Al=function(){var e=this.props,t=this.target,s=t.style,n=t._gsap,i,o;for(i=0;i<e.length;i+=3)e[i+1]?e[i+1]===2?t[e[i]](e[i+2]):t[e[i]]=e[i+2]:e[i+2]?s[e[i]]=e[i+2]:s.removeProperty(e[i].substr(0,2)==="--"?e[i]:e[i].replace(Zn,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)n[o]=this.tfm[o];n.svg&&(n.renderTransform(),t.setAttribute("data-svg-origin",this.svgo||"")),i=Gn(),(!i||!i.isStart)&&!s[ie]&&(eo(s),n.zOrigin&&s[Ce]&&(s[Ce]+=" "+n.zOrigin+"px",n.zOrigin=0,n.renderTransform()),n.uncache=1)}},to=function(e,t){var s={target:e,props:[],revert:Al,save:Pl};return e._gsap||xe.core.getCache(e),t&&e.style&&e.nodeType&&t.split(",").forEach(function(n){return s.save(n)}),s},so,Cn=function(e,t){var s=dt.createElementNS?dt.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):dt.createElement(e);return s&&s.style?s:dt.createElement(e)},Ve=function r(e,t,s){var n=getComputedStyle(e);return n[t]||n.getPropertyValue(t.replace(Zn,"-$1").toLowerCase())||n.getPropertyValue(t)||!s&&r(e,Wt(t)||t,1)||""},Br="O,Moz,ms,Ms,Webkit".split(","),Wt=function(e,t,s){var n=t||_t,i=n.style,o=5;if(e in i&&!s)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);o--&&!(Br[o]+e in i););return o<0?null:(o===3?"ms":o>=0?Br[o]:"")+e},xn=function(){vl()&&window.document&&(Rr=window,dt=Rr.document,Ot=dt.documentElement,_t=Cn("div")||{style:{}},Cn("div"),ie=Wt(ie),Ce=ie+"Origin",_t.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",so=!!Wt("perspective"),Gn=xe.core.reverting,qn=1)},Pr=function(e){var t=e.ownerSVGElement,s=Cn("svg",t&&t.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=e.cloneNode(!0),i;n.style.display="block",s.appendChild(n),Ot.appendChild(s);try{i=n.getBBox()}catch{}return s.removeChild(n),Ot.removeChild(s),i},Ar=function(e,t){for(var s=t.length;s--;)if(e.hasAttribute(t[s]))return e.getAttribute(t[s])},no=function(e){var t,s;try{t=e.getBBox()}catch{t=Pr(e),s=1}return t&&(t.width||t.height)||s||(t=Pr(e)),t&&!t.width&&!t.x&&!t.y?{x:+Ar(e,["x","cx","x1"])||0,y:+Ar(e,["y","cy","y1"])||0,width:0,height:0}:t},ro=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&no(e))},zt=function(e,t){if(t){var s=e.style,n;t in at&&t!==Ce&&(t=ie),s.removeProperty?(n=t.substr(0,2),(n==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),s.removeProperty(n==="--"?t:t.replace(Zn,"-$1").toLowerCase())):s.removeAttribute(t)}},pt=function(e,t,s,n,i,o){var a=new _e(e._pt,t,s,0,1,o?Ji:Qi);return e._pt=a,a.b=n,a.e=i,e._props.push(s),a},Dr={deg:1,rad:1,turn:1},Dl={grid:1,flex:1},mt=function r(e,t,s,n){var i=parseFloat(s)||0,o=(s+"").trim().substr((i+"").length)||"px",a=_t.style,l=kl.test(t),u=e.tagName.toLowerCase()==="svg",d=(u?"client":"offset")+(l?"Width":"Height"),f=100,g=n==="px",h=n==="%",m,p,b,k;if(n===o||!i||Dr[n]||Dr[o])return i;if(o!=="px"&&!g&&(i=r(e,t,s,"px")),k=e.getCTM&&ro(e),(h||o==="%")&&(at[t]||~t.indexOf("adius")))return m=k?e.getBBox()[l?"width":"height"]:e[d],ae(h?i/m*f:i/100*m);if(a[l?"width":"height"]=f+(g?o:n),p=n!=="rem"&&~t.indexOf("adius")||n==="em"&&e.appendChild&&!u?e:e.parentNode,k&&(p=(e.ownerSVGElement||{}).parentNode),(!p||p===dt||!p.appendChild)&&(p=dt.body),b=p._gsap,b&&h&&b.width&&l&&b.time===Ee.time&&!b.uncache)return ae(i/b.width*f);if(h&&(t==="height"||t==="width")){var v=e.style[t];e.style[t]=f+n,m=e[d],v?e.style[t]=v:zt(e,t)}else(h||o==="%")&&!Dl[Ve(p,"display")]&&(a.position=Ve(e,"position")),p===e&&(a.position="static"),p.appendChild(_t),m=_t[d],p.removeChild(_t),a.position="absolute";return l&&h&&(b=Ct(p),b.time=Ee.time,b.width=p[d]),ae(g?m*i/f:m&&i?f/m*i:0)},rt=function(e,t,s,n){var i;return qn||xn(),t in Ze&&t!=="transform"&&(t=Ze[t],~t.indexOf(",")&&(t=t.split(",")[0])),at[t]&&t!=="transform"?(i=ms(e,n),i=t!=="transformOrigin"?i[t]:i.svg?i.origin:Ls(Ve(e,Ce))+" "+i.zOrigin+"px"):(i=e.style[t],(!i||i==="auto"||n||~(i+"").indexOf("calc("))&&(i=Ds[t]&&Ds[t](e,t,s)||Ve(e,t)||vi(e,t)||(t==="opacity"?1:0))),s&&!~(i+"").trim().indexOf(" ")?mt(e,t,i,s)+s:i},Ll=function(e,t,s,n){if(!s||s==="none"){var i=Wt(t,e,1),o=i&&Ve(e,i,1);o&&o!==s?(t=i,s=o):t==="borderColor"&&(s=Ve(e,"borderTopColor"))}var a=new _e(this._pt,e.style,t,0,1,Zi),l=0,u=0,d,f,g,h,m,p,b,k,v,y,_,w;if(a.b=s,a.e=n,s+="",n+="",n.substring(0,6)==="var(--"&&(n=Ve(e,n.substring(4,n.indexOf(")")))),n==="auto"&&(p=e.style[t],e.style[t]=n,n=Ve(e,t)||n,p?e.style[t]=p:zt(e,t)),d=[s,n],Vi(d),s=d[0],n=d[1],g=s.match(Dt)||[],w=n.match(Dt)||[],w.length){for(;f=Dt.exec(n);)b=f[0],v=n.substring(l,f.index),m?m=(m+1)%5:(v.substr(-5)==="rgba("||v.substr(-5)==="hsla(")&&(m=1),b!==(p=g[u++]||"")&&(h=parseFloat(p)||0,_=p.substr((h+"").length),b.charAt(1)==="="&&(b=It(h,b)+_),k=parseFloat(b),y=b.substr((k+"").length),l=Dt.lastIndex-y.length,y||(y=y||Be.units[t]||_,l===n.length&&(n+=y,a.e+=y)),_!==y&&(h=mt(e,t,p,y)||0),a._pt={_next:a._pt,p:v||u===1?v:",",s:h,c:k-h,m:m&&m<4||t==="zIndex"?Math.round:0});a.c=l<n.length?n.substring(l,n.length):""}else a.r=t==="display"&&n==="none"?Ji:Qi;return fi.test(n)&&(a.e=0),this._pt=a,a},Lr={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},Il=function(e){var t=e.split(" "),s=t[0],n=t[1]||"50%";return(s==="top"||s==="bottom"||n==="left"||n==="right")&&(e=s,s=n,n=e),t[0]=Lr[s]||s,t[1]=Lr[n]||n,t.join(" ")},Ol=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var s=t.t,n=s.style,i=t.u,o=s._gsap,a,l,u;if(i==="all"||i===!0)n.cssText="",l=1;else for(i=i.split(","),u=i.length;--u>-1;)a=i[u],at[a]&&(l=1,a=a==="transformOrigin"?Ce:ie),zt(s,a);l&&(zt(s,ie),o&&(o.svg&&s.removeAttribute("transform"),n.scale=n.rotate=n.translate="none",ms(s,1),o.uncache=1,eo(n)))}},Ds={clearProps:function(e,t,s,n,i){if(i.data!=="isFromStart"){var o=e._pt=new _e(e._pt,t,s,0,0,Ol);return o.u=n,o.pr=-10,o.tween=i,e._props.push(s),1}}},gs=[1,0,0,1,0,0],io={},oo=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},Ir=function(e){var t=Ve(e,ie);return oo(t)?gs:t.substr(7).match(hi).map(ae)},Yn=function(e,t){var s=e._gsap||Ct(e),n=e.style,i=Ir(e),o,a,l,u;return s.svg&&e.getAttribute("transform")?(l=e.transform.baseVal.consolidate().matrix,i=[l.a,l.b,l.c,l.d,l.e,l.f],i.join(",")==="1,0,0,1,0,0"?gs:i):(i===gs&&!e.offsetParent&&e!==Ot&&!s.svg&&(l=n.display,n.display="block",o=e.parentNode,(!o||!e.offsetParent&&!e.getBoundingClientRect().width)&&(u=1,a=e.nextElementSibling,Ot.appendChild(e)),i=Ir(e),l?n.display=l:zt(e,"display"),u&&(a?o.insertBefore(e,a):o?o.appendChild(e):Ot.removeChild(e))),t&&i.length>6?[i[0],i[1],i[4],i[5],i[12],i[13]]:i)},Sn=function(e,t,s,n,i,o){var a=e._gsap,l=i||Yn(e,!0),u=a.xOrigin||0,d=a.yOrigin||0,f=a.xOffset||0,g=a.yOffset||0,h=l[0],m=l[1],p=l[2],b=l[3],k=l[4],v=l[5],y=t.split(" "),_=parseFloat(y[0])||0,w=parseFloat(y[1])||0,C,T,x,z;s?l!==gs&&(T=h*b-m*p)&&(x=_*(b/T)+w*(-p/T)+(p*v-b*k)/T,z=_*(-m/T)+w*(h/T)-(h*v-m*k)/T,_=x,w=z):(C=no(e),_=C.x+(~y[0].indexOf("%")?_/100*C.width:_),w=C.y+(~(y[1]||y[0]).indexOf("%")?w/100*C.height:w)),n||n!==!1&&a.smooth?(k=_-u,v=w-d,a.xOffset=f+(k*h+v*p)-k,a.yOffset=g+(k*m+v*b)-v):a.xOffset=a.yOffset=0,a.xOrigin=_,a.yOrigin=w,a.smooth=!!n,a.origin=t,a.originIsAbsolute=!!s,e.style[Ce]="0px 0px",o&&(pt(o,a,"xOrigin",u,_),pt(o,a,"yOrigin",d,w),pt(o,a,"xOffset",f,a.xOffset),pt(o,a,"yOffset",g,a.yOffset)),e.setAttribute("data-svg-origin",_+" "+w)},ms=function(e,t){var s=e._gsap||new Ui(e);if("x"in s&&!t&&!s.uncache)return s;var n=e.style,i=s.scaleX<0,o="px",a="deg",l=getComputedStyle(e),u=Ve(e,Ce)||"0",d,f,g,h,m,p,b,k,v,y,_,w,C,T,x,z,D,K,N,W,te,P,U,G,A,Y,We,Se,Te,Q,j,ye;return d=f=g=p=b=k=v=y=_=0,h=m=1,s.svg=!!(e.getCTM&&ro(e)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(n[ie]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[ie]!=="none"?l[ie]:"")),n.scale=n.rotate=n.translate="none"),T=Yn(e,s.svg),s.svg&&(s.uncache?(A=e.getBBox(),u=s.xOrigin-A.x+"px "+(s.yOrigin-A.y)+"px",G=""):G=!t&&e.getAttribute("data-svg-origin"),Sn(e,G||u,!!G||s.originIsAbsolute,s.smooth!==!1,T)),w=s.xOrigin||0,C=s.yOrigin||0,T!==gs&&(K=T[0],N=T[1],W=T[2],te=T[3],d=P=T[4],f=U=T[5],T.length===6?(h=Math.sqrt(K*K+N*N),m=Math.sqrt(te*te+W*W),p=K||N?Pt(N,K)*kt:0,v=W||te?Pt(W,te)*kt+p:0,v&&(m*=Math.abs(Math.cos(v*$t))),s.svg&&(d-=w-(w*K+C*W),f-=C-(w*N+C*te))):(ye=T[6],Q=T[7],We=T[8],Se=T[9],Te=T[10],j=T[11],d=T[12],f=T[13],g=T[14],x=Pt(ye,Te),b=x*kt,x&&(z=Math.cos(-x),D=Math.sin(-x),G=P*z+We*D,A=U*z+Se*D,Y=ye*z+Te*D,We=P*-D+We*z,Se=U*-D+Se*z,Te=ye*-D+Te*z,j=Q*-D+j*z,P=G,U=A,ye=Y),x=Pt(-W,Te),k=x*kt,x&&(z=Math.cos(-x),D=Math.sin(-x),G=K*z-We*D,A=N*z-Se*D,Y=W*z-Te*D,j=te*D+j*z,K=G,N=A,W=Y),x=Pt(N,K),p=x*kt,x&&(z=Math.cos(x),D=Math.sin(x),G=K*z+N*D,A=P*z+U*D,N=N*z-K*D,U=U*z-P*D,K=G,P=A),b&&Math.abs(b)+Math.abs(p)>359.9&&(b=p=0,k=180-k),h=ae(Math.sqrt(K*K+N*N+W*W)),m=ae(Math.sqrt(U*U+ye*ye)),x=Pt(P,U),v=Math.abs(x)>2e-4?x*kt:0,_=j?1/(j<0?-j:j):0),s.svg&&(G=e.getAttribute("transform"),s.forceCSS=e.setAttribute("transform","")||!oo(Ve(e,ie)),G&&e.setAttribute("transform",G))),Math.abs(v)>90&&Math.abs(v)<270&&(i?(h*=-1,v+=p<=0?180:-180,p+=p<=0?180:-180):(m*=-1,v+=v<=0?180:-180)),t=t||s.uncache,s.x=d-((s.xPercent=d&&(!t&&s.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-d)?-50:0)))?e.offsetWidth*s.xPercent/100:0)+o,s.y=f-((s.yPercent=f&&(!t&&s.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-f)?-50:0)))?e.offsetHeight*s.yPercent/100:0)+o,s.z=g+o,s.scaleX=ae(h),s.scaleY=ae(m),s.rotation=ae(p)+a,s.rotationX=ae(b)+a,s.rotationY=ae(k)+a,s.skewX=v+a,s.skewY=y+a,s.transformPerspective=_+o,(s.zOrigin=parseFloat(u.split(" ")[2])||!t&&s.zOrigin||0)&&(n[Ce]=Ls(u)),s.xOffset=s.yOffset=0,s.force3D=Be.force3D,s.renderTransform=s.svg?Vl:so?ao:$l,s.uncache=0,s},Ls=function(e){return(e=e.split(" "))[0]+" "+e[1]},nn=function(e,t,s){var n=he(t);return ae(parseFloat(t)+parseFloat(mt(e,"x",s+"px",n)))+n},$l=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,ao(e,t)},yt="0deg",Xt="0px",vt=") ",ao=function(e,t){var s=t||this,n=s.xPercent,i=s.yPercent,o=s.x,a=s.y,l=s.z,u=s.rotation,d=s.rotationY,f=s.rotationX,g=s.skewX,h=s.skewY,m=s.scaleX,p=s.scaleY,b=s.transformPerspective,k=s.force3D,v=s.target,y=s.zOrigin,_="",w=k==="auto"&&e&&e!==1||k===!0;if(y&&(f!==yt||d!==yt)){var C=parseFloat(d)*$t,T=Math.sin(C),x=Math.cos(C),z;C=parseFloat(f)*$t,z=Math.cos(C),o=nn(v,o,T*z*-y),a=nn(v,a,-Math.sin(C)*-y),l=nn(v,l,x*z*-y+y)}b!==Xt&&(_+="perspective("+b+vt),(n||i)&&(_+="translate("+n+"%, "+i+"%) "),(w||o!==Xt||a!==Xt||l!==Xt)&&(_+=l!==Xt||w?"translate3d("+o+", "+a+", "+l+") ":"translate("+o+", "+a+vt),u!==yt&&(_+="rotate("+u+vt),d!==yt&&(_+="rotateY("+d+vt),f!==yt&&(_+="rotateX("+f+vt),(g!==yt||h!==yt)&&(_+="skew("+g+", "+h+vt),(m!==1||p!==1)&&(_+="scale("+m+", "+p+vt),v.style[ie]=_||"translate(0, 0)"},Vl=function(e,t){var s=t||this,n=s.xPercent,i=s.yPercent,o=s.x,a=s.y,l=s.rotation,u=s.skewX,d=s.skewY,f=s.scaleX,g=s.scaleY,h=s.target,m=s.xOrigin,p=s.yOrigin,b=s.xOffset,k=s.yOffset,v=s.forceCSS,y=parseFloat(o),_=parseFloat(a),w,C,T,x,z;l=parseFloat(l),u=parseFloat(u),d=parseFloat(d),d&&(d=parseFloat(d),u+=d,l+=d),l||u?(l*=$t,u*=$t,w=Math.cos(l)*f,C=Math.sin(l)*f,T=Math.sin(l-u)*-g,x=Math.cos(l-u)*g,u&&(d*=$t,z=Math.tan(u-d),z=Math.sqrt(1+z*z),T*=z,x*=z,d&&(z=Math.tan(d),z=Math.sqrt(1+z*z),w*=z,C*=z)),w=ae(w),C=ae(C),T=ae(T),x=ae(x)):(w=f,x=g,C=T=0),(y&&!~(o+"").indexOf("px")||_&&!~(a+"").indexOf("px"))&&(y=mt(h,"x",o,"px"),_=mt(h,"y",a,"px")),(m||p||b||k)&&(y=ae(y+m-(m*w+p*T)+b),_=ae(_+p-(m*C+p*x)+k)),(n||i)&&(z=h.getBBox(),y=ae(y+n/100*z.width),_=ae(_+i/100*z.height)),z="matrix("+w+","+C+","+T+","+x+","+y+","+_+")",h.setAttribute("transform",z),v&&(h.style[ie]=z)},Kl=function(e,t,s,n,i){var o=360,a=de(i),l=parseFloat(i)*(a&&~i.indexOf("rad")?kt:1),u=l-n,d=n+u+"deg",f,g;return a&&(f=i.split("_")[1],f==="short"&&(u%=o,u!==u%(o/2)&&(u+=u<0?o:-360)),f==="cw"&&u<0?u=(u+o*Mr)%o-~~(u/o)*o:f==="ccw"&&u>0&&(u=(u-o*Mr)%o-~~(u/o)*o)),e._pt=g=new _e(e._pt,t,s,n,u,Cl),g.e=d,g.u="deg",e._props.push(s),g},Or=function(e,t){for(var s in t)e[s]=t[s];return e},Nl=function(e,t,s){var n=Or({},s._gsap),i="perspective,force3D,transformOrigin,svgOrigin",o=s.style,a,l,u,d,f,g,h,m;n.svg?(u=s.getAttribute("transform"),s.setAttribute("transform",""),o[ie]=t,a=ms(s,1),zt(s,ie),s.setAttribute("transform",u)):(u=getComputedStyle(s)[ie],o[ie]=t,a=ms(s,1),o[ie]=u);for(l in at)u=n[l],d=a[l],u!==d&&i.indexOf(l)<0&&(h=he(u),m=he(d),f=h!==m?mt(s,l,u,m):parseFloat(u),g=parseFloat(d),e._pt=new _e(e._pt,a,l,f,g-f,_n),e._pt.u=m||0,e._props.push(l));Or(a,n)};ke("padding,margin,Width,Radius",function(r,e){var t="Top",s="Right",n="Bottom",i="Left",o=(e<3?[t,s,n,i]:[t+i,t+s,n+s,n+i]).map(function(a){return e<2?r+a:"border"+a+r});Ds[e>1?"border"+r:r]=function(a,l,u,d,f){var g,h;if(arguments.length<4)return g=o.map(function(m){return rt(a,m,u)}),h=g.join(" "),h.split(g[0]).length===5?g[0]:h;g=(d+"").split(" "),h={},o.forEach(function(m,p){return h[m]=g[p]=g[p]||g[(p-1)/2|0]}),a.init(l,h,f)}});var lo={name:"css",register:xn,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,s,n,i){var o=this._props,a=e.style,l=s.vars.startAt,u,d,f,g,h,m,p,b,k,v,y,_,w,C,T,x;qn||xn(),this.styles=this.styles||to(e),x=this.styles.props,this.tween=s;for(p in t)if(p!=="autoRound"&&(d=t[p],!(Re[p]&&Wi(p,t,s,n,e,i)))){if(h=typeof d,m=Ds[p],h==="function"&&(d=d.call(s,n,e,i),h=typeof d),h==="string"&&~d.indexOf("random(")&&(d=ps(d)),m)m(this,e,p,d,s)&&(T=1);else if(p.substr(0,2)==="--")u=(getComputedStyle(e).getPropertyValue(p)+"").trim(),d+="",ft.lastIndex=0,ft.test(u)||(b=he(u),k=he(d)),k?b!==k&&(u=mt(e,p,u,k)+k):b&&(d+=b),this.add(a,"setProperty",u,d,n,i,0,0,p),o.push(p),x.push(p,0,a[p]);else if(h!=="undefined"){if(l&&p in l?(u=typeof l[p]=="function"?l[p].call(s,n,e,i):l[p],de(u)&&~u.indexOf("random(")&&(u=ps(u)),he(u+"")||u==="auto"||(u+=Be.units[p]||he(rt(e,p))||""),(u+"").charAt(1)==="="&&(u=rt(e,p))):u=rt(e,p),g=parseFloat(u),v=h==="string"&&d.charAt(1)==="="&&d.substr(0,2),v&&(d=d.substr(2)),f=parseFloat(d),p in Ze&&(p==="autoAlpha"&&(g===1&&rt(e,"visibility")==="hidden"&&f&&(g=0),x.push("visibility",0,a.visibility),pt(this,a,"visibility",g?"inherit":"hidden",f?"inherit":"hidden",!f)),p!=="scale"&&p!=="transform"&&(p=Ze[p],~p.indexOf(",")&&(p=p.split(",")[0]))),y=p in at,y){if(this.styles.save(p),h==="string"&&d.substring(0,6)==="var(--"&&(d=Ve(e,d.substring(4,d.indexOf(")"))),f=parseFloat(d)),_||(w=e._gsap,w.renderTransform&&!t.parseTransform||ms(e,t.parseTransform),C=t.smoothOrigin!==!1&&w.smooth,_=this._pt=new _e(this._pt,a,ie,0,1,w.renderTransform,w,0,-1),_.dep=1),p==="scale")this._pt=new _e(this._pt,w,"scaleY",w.scaleY,(v?It(w.scaleY,v+f):f)-w.scaleY||0,_n),this._pt.u=0,o.push("scaleY",p),p+="X";else if(p==="transformOrigin"){x.push(Ce,0,a[Ce]),d=Il(d),w.svg?Sn(e,d,0,C,0,this):(k=parseFloat(d.split(" ")[2])||0,k!==w.zOrigin&&pt(this,w,"zOrigin",w.zOrigin,k),pt(this,a,p,Ls(u),Ls(d)));continue}else if(p==="svgOrigin"){Sn(e,d,1,C,0,this);continue}else if(p in io){Kl(this,w,p,g,v?It(g,v+d):d);continue}else if(p==="smoothOrigin"){pt(this,w,"smooth",w.smooth,d);continue}else if(p==="force3D"){w[p]=d;continue}else if(p==="transform"){Nl(this,d,e);continue}}else p in a||(p=Wt(p)||p);if(y||(f||f===0)&&(g||g===0)&&!_l.test(d)&&p in a)b=(u+"").substr((g+"").length),f||(f=0),k=he(d)||(p in Be.units?Be.units[p]:b),b!==k&&(g=mt(e,p,u,k)),this._pt=new _e(this._pt,y?w:a,p,g,(v?It(g,v+f):f)-g,!y&&(k==="px"||p==="zIndex")&&t.autoRound!==!1?Sl:_n),this._pt.u=k||0,b!==k&&k!=="%"&&(this._pt.b=u,this._pt.r=xl);else if(p in a)Ll.call(this,e,p,u,v?v+d:d);else if(p in e)this.add(e,p,u||e[p],v?v+d:d,n,i);else if(p!=="parseTransform"){On(p,d);continue}y||(p in a?x.push(p,0,a[p]):typeof e[p]=="function"?x.push(p,2,e[p]()):x.push(p,1,u||e[p])),o.push(p)}}T&&Yi(this)},render:function(e,t){if(t.tween._time||!Gn())for(var s=t._pt;s;)s.r(e,s.d),s=s._next;else t.styles.revert()},get:rt,aliases:Ze,getSetter:function(e,t,s){var n=Ze[t];return n&&n.indexOf(",")<0&&(t=n),t in at&&t!==Ce&&(e._gsap.x||rt(e,"x"))?s&&Er===s?t==="scale"?El:Rl:(Er=s||{})&&(t==="scale"?Ml:Bl):e.style&&!Dn(e.style[t])?Tl:~t.indexOf("-")?zl:Hn(e,t)},core:{_removeProperty:zt,_getMatrix:Yn}};xe.utils.checkPrefix=Wt;xe.core.getStyleSaver=to;(function(r,e,t,s){var n=ke(r+","+e+","+t,function(i){at[i]=1});ke(e,function(i){Be.units[i]="deg",io[i]=1}),Ze[n[13]]=r+","+e,ke(s,function(i){var o=i.split(":");Ze[o[1]]=n[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");ke("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(r){Be.units[r]="px"});xe.registerPlugin(lo);var q=xe.registerPlugin(lo)||xe;q.core.Tween;const $r={sm:{fontSize:12,sidePadding:8,verticalSpacing:4,borderRadius:8},md:{fontSize:14,sidePadding:12,verticalSpacing:8,borderRadius:10},lg:{fontSize:16,sidePadding:16,verticalSpacing:12,borderRadius:12}};function At(r){if(r!=null)return`${r}px`}function co(r){return Math.max(0,Math.min(1,r))}function uo(r){if(!r)return;const e=r.trim();if(/^#([0-9a-fA-F]{3}){1,2}$/.test(e)){let s=0,n=0,i=0;return e.length===4?(s=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16),i=parseInt(e[3]+e[3],16)):(s=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),i=parseInt(e.slice(5,7),16)),{r:s,g:n,b:i}}const t=e.match(/^rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i);if(t)return{r:Number(t[1]),g:Number(t[2]),b:Number(t[3])}}function rn(r){const t=Math.max(0,Math.min(255,Math.round(r))).toString(16);return t.length===1?`0${t}`:t}function po(r){if(r)return`#${rn(r.r)}${rn(r.g)}${rn(r.b)}`}function Vr(r,e=.12){const t=uo(r);if(!t)return r;const s=co(e);return po({r:t.r+(255-t.r)*s,g:t.g+(255-t.g)*s,b:t.b+(255-t.b)*s})}function Fl(r,e=.12){const t=uo(r);if(!t)return r;const s=co(e);return po({r:t.r*(1-s),g:t.g*(1-s),b:t.b*(1-s)})}function Ul(r,e){if(r)switch(e){case"gradient":{const t=Vr(r,.08)||r,s=Fl(r,.12)||r;return`linear-gradient(180deg, ${t} 0%, ${s} 100%)`}case"bubble":return`radial-gradient(120% 120% at 10% 0%, ${Vr(r,.14)||r} 0%, ${r} 60%)`;default:return r}}function Wl(r,e){return{...r?$r[r]:$r.md,...void 0}}function Hl(r,e){const t=Wl(r.size),s=r.color,n=Ul(r.bgColor??(e==null?void 0:e.fallbackColor),r.bgType),i=At(r.fontSize??t.fontSize),o=At(r.borderRadius??t.borderRadius),a=At(r.verticalPadding),l=At(r.sidePadding);let u;r.borderWidth&&r.borderWidth>0?u=`${r.borderWidth}px solid ${r.borderColor||(e==null?void 0:e.fallbackColor)||"currentColor"}`:r.borderColor&&!r.borderWidth&&(u=`1px solid ${r.borderColor}`);const d=r.width?r.width+(r.borderWidth??0):void 0,f=r.height?r.height+(r.borderWidth??0):void 0,g={color:s,background:n,fontSize:i,borderRadius:o,width:At(d),height:At(f),padding:a&&l?`${a} ${l}`:void 0,border:u},h={};for(const m in g){const p=g[m];p!=null&&p!==""&&(h[m]=String(p))}return h}const jl=["innerHTML"],ql=["src"],Gl=c.defineComponent({__name:"ChatCollapsed",props:{element:{},toggleChat:{type:Function}},setup(r){const e=r,t=c.computed(()=>e.element),s=c.computed(()=>Hl(t.value)),n=c.computed(()=>{const a=e.element.logo;return a?a.includes("<svg"):!1}),i=c.computed(()=>{const a=e.element.logo;return a&&a.replace('width="',"").replace('height="',"").replace('"',""),a}),o=c.computed(()=>{var l;const a=(l=e.element.icon)==null?void 0:l.size;return a?a+"px":void 0});return(a,l)=>(c.openBlock(),c.createElementBlock("div",{style:c.normalizeStyle([s.value,{"box-sizing":"content-box"}]),class:"chat-collapsed tw:transition-all tw:flex tw:cursor-pointer tw:items-center tw:justify-center",onClick:l[0]||(l[0]=(...u)=>a.toggleChat&&a.toggleChat(...u))},[n.value?(c.openBlock(),c.createElementBlock("span",{key:0,class:"hs-collapsed-logo tw:transition-all",innerHTML:i.value,style:c.normalizeStyle({width:o.value,height:o.value})},null,12,jl)):i.value?(c.openBlock(),c.createElementBlock("img",{key:1,class:"tw:transition-all",src:i.value,alt:"logo",style:c.normalizeStyle({width:o.value,height:o.value})},null,12,ql)):c.createCommentVNode("",!0)],4))}}),Fe={schema:{version:"1.0",required:["settings","texts","sections"]},settings:{bgChat:"#434345",gapMessageLine:12,fontFamily:"MacPaw Fixel",borderRadius:12,launchView:"closed",letterSpacing:0,logo:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.22048 12.26L8.71413 11.1293C9.1535 10.1231 9.94426 9.32209 10.9307 8.88424L12.2895 8.28107C12.7215 8.08931 12.7215 7.46082 12.2895 7.26906L10.9731 6.68472C9.9613 6.23561 9.15637 5.40496 8.72453 4.3644L8.22447 3.15941C8.0389 2.71224 7.42105 2.71224 7.23548 3.15941L6.7354 4.36439C6.30357 5.40496 5.49861 6.23561 4.48686 6.68472L3.17045 7.26906C2.73843 7.46082 2.73843 8.08931 3.17045 8.28107L4.5293 8.88424C5.51569 9.32209 6.30646 10.1231 6.7458 11.1293L7.23948 12.26C7.42924 12.6946 8.03069 12.6946 8.22048 12.26ZM13.1632 15.0131L13.302 14.6949C13.5495 14.1275 13.9953 13.6758 14.5515 13.4287L14.9792 13.2386C15.2106 13.1358 15.2106 12.7996 14.9792 12.6969L14.5754 12.5174C14.0049 12.264 13.5511 11.7955 13.3078 11.2089L13.1653 10.865C13.0659 10.6254 12.7346 10.6254 12.6352 10.865L12.4927 11.2089C12.2494 11.7955 11.7957 12.264 11.2251 12.5174L10.8213 12.6969C10.59 12.7996 10.59 13.1358 10.8213 13.2386L11.249 13.4287C11.8053 13.6758 12.251 14.1275 12.4985 14.6949L12.6374 15.0131C12.739 15.246 13.0615 15.246 13.1632 15.0131Z" fill="currentColor"/></svg>',fontWeight:500,lineHeight:1.2,loader:"dots",globalRoundingRadius:!0,theme:"light",mode:"collapsed",position:"bottomRight",size:{width:435,height:450},offset:{x:24,y:36}},texts:{welcomeMessage:`🖖 Hi there — I’m your assistant for finding documents, tracking access, and making sense of your files.
|
|
19
19
|
|
|
20
20
|
How can I help?`,widgetTitle:"HyperShadow",launchIssueTitle:"There was a glitch",launchIssueText:"Please restart the chat, it should work",issueText:"Something went wrong, please restart",reconnectText:"Connection issue, trying to reconnect",inputPlaceholder:"Type question",disableInputText:"Can’t send a message while processing the previous request",disclaimer:"AI-Copilot makes mistakes, please don’t consider 100% accurate",typingLoader:"AI-Co-pilot typing",sendButton:"Send"},sections:{colapsed:{color:"#fff",bgColor:"#7D52F4",width:56,height:56,borderRadius:50,borderWidth:8,borderColor:"rgba(29, 29, 31, 0.90)",logo:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.22048 12.26L8.71413 11.1293C9.1535 10.1231 9.94426 9.32209 10.9307 8.88424L12.2895 8.28107C12.7215 8.08931 12.7215 7.46082 12.2895 7.26906L10.9731 6.68472C9.9613 6.23561 9.15637 5.40496 8.72453 4.3644L8.22447 3.15941C8.0389 2.71224 7.42105 2.71224 7.23548 3.15941L6.7354 4.36439C6.30357 5.40496 5.49861 6.23561 4.48686 6.68472L3.17045 7.26906C2.73843 7.46082 2.73843 8.08931 3.17045 8.28107L4.5293 8.88424C5.51569 9.32209 6.30646 10.1231 6.7458 11.1293L7.23948 12.26C7.42924 12.6946 8.03069 12.6946 8.22048 12.26ZM13.1632 15.0131L13.302 14.6949C13.5495 14.1275 13.9953 13.6758 14.5515 13.4287L14.9792 13.2386C15.2106 13.1358 15.2106 12.7996 14.9792 12.6969L14.5754 12.5174C14.0049 12.264 13.5511 11.7955 13.3078 11.2089L13.1653 10.865C13.0659 10.6254 12.7346 10.6254 12.6352 10.865L12.4927 11.2089C12.2494 11.7955 11.7957 12.264 11.2251 12.5174L10.8213 12.6969C10.59 12.7996 10.59 13.1358 10.8213 13.2386L11.249 13.4287C11.8053 13.6758 12.251 14.1275 12.4985 14.6949L12.6374 15.0131C12.739 15.246 13.0615 15.246 13.1632 15.0131Z" fill="currentColor"/></svg>',icon:{showIcon:!0,size:18}},warnings:{launchIssue:{warningStyle:"faded",content:{icon:{showIcon:!0,src:'<svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21.76 16.42L15.36 4.9C14.5 3.35 13.31 2.5 12 2.5C10.69 2.5 9.5 3.35 8.64 4.9L2.24 16.42C1.43 17.89 1.34 19.3 1.99 20.41C2.64 21.52 3.92 22.13 5.6 22.13H18.4C20.08 22.13 21.36 21.52 22.01 20.41C22.66 19.3 22.57 17.88 21.76 16.42ZM12.71 18.21C12.66 18.25 12.61 18.29 12.56 18.33C12.5 18.37 12.44 18.4 12.38 18.42C12.32 18.45 12.26 18.47 12.19 18.48C12.13 18.49 12.06 18.5 12 18.5C11.94 18.5 11.87 18.49 11.8 18.48C11.74 18.47 11.68 18.45 11.62 18.42C11.56 18.4 11.5 18.37 11.44 18.33C11.39 18.29 11.34 18.25 11.29 18.21C11.11 18.02 11 17.76 11 17.5C11 17.24 11.11 16.98 11.29 16.79C11.34 16.75 11.39 16.71 11.44 16.67C11.5 16.63 11.56 16.6 11.62 16.58C11.68 16.55 11.74 16.53 11.8 16.52C11.93 16.49 12.07 16.49 12.19 16.52C12.26 16.53 12.32 16.55 12.38 16.58C12.44 16.6 12.5 16.63 12.56 16.67C12.61 16.71 12.66 16.75 12.71 16.79C12.89 16.98 13 17.24 13 17.5C13 17.76 12.89 18.02 12.71 18.21ZM11.25 9.5C11.25 9.09 11.59 8.75 12 8.75C12.41 8.75 12.75 9.09 12.75 9.5V14.5C12.75 14.91 12.41 15.25 12 15.25C11.59 15.25 11.25 14.91 11.25 14.5V9.5Z" fill="currentColor"/></svg>',color:"#FFCC77",size:24},bgColor:"#8A7045",verticalSpacing:4,sidePadding:8,headlineColor:"#f9c97c",color:"#fff",headlineTextSize:12,subTextSize:12},resetButton:{bgType:"filled",showType:"both",borderRadius:12,size:"md",color:"#2e2e30",bgColor:"#e5e1dd",fontSize:12,icon:{showIcon:!0,src:'<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.793 1.83301H5.20634C2.77967 1.83301 1.33301 3.27967 1.33301 5.70634V11.2863C1.33301 13.7197 2.77967 15.1663 5.20634 15.1663H10.7863C13.213 15.1663 14.6597 13.7197 14.6597 11.293V5.70634C14.6663 3.27967 13.2197 1.83301 10.793 1.83301ZM7.99967 12.6663C6.80634 12.6663 5.87301 12.073 5.23967 11.4863V11.9597C5.23967 12.233 5.01301 12.4597 4.73967 12.4597C4.46634 12.4597 4.23967 12.233 4.23967 11.9597V10.1263C4.23967 9.85301 4.46634 9.62634 4.73967 9.62634H6.39301C6.66634 9.62634 6.89301 9.85301 6.89301 10.1263C6.89301 10.3997 6.66634 10.6263 6.39301 10.6263H5.79301C6.28634 11.1197 7.05301 11.6663 7.99967 11.6663C9.74634 11.6663 11.1663 10.2463 11.1663 8.49967C11.1663 8.22634 11.393 7.99967 11.6663 7.99967C11.9397 7.99967 12.1663 8.22634 12.1663 8.49967C12.1663 10.7997 10.2997 12.6663 7.99967 12.6663ZM12.1663 6.85967C12.1663 6.87967 12.1663 6.89967 12.1663 6.91301C12.1597 6.98634 12.1397 7.05301 12.1063 7.11301C12.073 7.17301 12.0263 7.22634 11.9663 7.27301C11.9197 7.30634 11.8663 7.33301 11.8063 7.35301C11.7597 7.36634 11.713 7.37301 11.6663 7.37301H10.0463C9.77301 7.37301 9.54634 7.14634 9.54634 6.87301C9.54634 6.59967 9.77301 6.37301 10.0463 6.37301H10.5997C10.0663 5.87967 9.20634 5.33301 8.01301 5.33301C6.26634 5.33301 4.84634 6.75301 4.84634 8.49967C4.84634 8.77301 4.61967 8.99967 4.34634 8.99967C4.07301 8.99967 3.83301 8.77301 3.83301 8.49967C3.83301 6.19967 5.69967 4.33301 7.99967 4.33301C9.43301 4.33301 10.4863 4.95301 11.1663 5.54634V5.03967C11.1663 4.76634 11.393 4.53967 11.6663 4.53967C11.9397 4.53967 12.1663 4.76634 12.1663 5.03967V6.85967Z" fill="currentColor"/></svg>',color:"#2e2e30",size:16}}},connectionIssue:{warningStyle:"faded",content:{icon:{showIcon:!0,src:`<svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
21
21
|
<path d="M21.76 16.42L15.36 4.9C14.5 3.35 13.31 2.5 12 2.5C10.69 2.5 9.49998 3.35 8.63998 4.9L2.23998 16.42C1.42998 17.89 1.33998 19.3 1.98998 20.41C2.63998 21.52 3.91998 22.13 5.59998 22.13H18.4C20.08 22.13 21.36 21.52 22.01 20.41C22.66 19.3 22.57 17.88 21.76 16.42ZM11.25 9.5C11.25 9.09 11.59 8.75 12 8.75C12.41 8.75 12.75 9.09 12.75 9.5V14.5C12.75 14.91 12.41 15.25 12 15.25C11.59 15.25 11.25 14.91 11.25 14.5V9.5ZM12.71 18.21C12.66 18.25 12.61 18.29 12.56 18.33C12.5 18.37 12.44 18.4 12.38 18.42C12.32 18.45 12.26 18.47 12.19 18.48C12.13 18.49 12.06 18.5 12 18.5C11.94 18.5 11.87 18.49 11.8 18.48C11.74 18.47 11.68 18.45 11.62 18.42C11.56 18.4 11.5 18.37 11.44 18.33C11.39 18.29 11.34 18.25 11.29 18.21C11.11 18.02 11 17.76 11 17.5C11 17.24 11.11 16.98 11.29 16.79C11.34 16.75 11.39 16.71 11.44 16.67C11.5 16.63 11.56 16.6 11.62 16.58C11.68 16.55 11.74 16.53 11.8 16.52C11.93 16.49 12.07 16.49 12.19 16.52C12.26 16.53 12.32 16.55 12.38 16.58C12.44 16.6 12.5 16.63 12.56 16.67C12.61 16.71 12.66 16.75 12.71 16.79C12.89 16.98 13 17.24 13 17.5C13 17.76 12.89 18.02 12.71 18.21Z" fill="#FFCC77"/>
|
|
@@ -23,4 +23,62 @@ How can I help?`,widgetTitle:"HyperShadow",launchIssueTitle:"There was a glitch"
|
|
|
23
23
|
<path d="M4 4.02667C3.06667 5.08667 2.5 6.48 2.5 8C2.5 11.3133 5.18667 14 8.5 14C11.8133 14 14.5 11.3133 14.5 8C14.5 4.68667 11.8133 2 8.5 2C8.02667 2 7.56667 2.05333 7.12667 2.16" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
|
|
24
24
|
</svg>`,color:"#FFF",size:16}}},disableInputIssue:{warningStyle:"gradient",content:{bgColor:"#8A7045",color:"#fff",icon:{showIcon:!0,src:`<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
25
25
|
<path d="M4 4.02667C3.06667 5.08667 2.5 6.48 2.5 8C2.5 11.3133 5.18667 14 8.5 14C11.8133 14 14.5 11.3133 14.5 8C14.5 4.68667 11.8133 2 8.5 2C8.02667 2 7.56667 2.05333 7.12667 2.16" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
|
|
26
|
-
</svg>`,color:"#FFF"}}}},loader:{typingLoader:{color:"#8E8E8F",bgColor:"#2F2F31"},completeStep:{verticalSpacing:8,fontSize:12,color:"#8E8E8F",icon:{showIcon:!0,src:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity="0.4" d="M7.99967 14.6666C11.6816 14.6666 14.6663 11.6818 14.6663 7.99992C14.6663 4.31802 11.6816 1.33325 7.99967 1.33325C4.31778 1.33325 1.33301 4.31802 1.33301 7.99992C1.33301 11.6818 4.31778 14.6666 7.99967 14.6666Z" fill="currentColor"></path><path d="M7.05297 10.3867C6.91964 10.3867 6.79297 10.3334 6.69964 10.2401L4.81297 8.3534C4.61964 8.16007 4.61964 7.84007 4.81297 7.64673C5.0063 7.4534 5.3263 7.4534 5.51964 7.64673L7.05297 9.18007L10.4796 5.7534C10.673 5.56007 10.993 5.56007 11.1863 5.7534C11.3796 5.94673 11.3796 6.26673 11.1863 6.46006L7.4063 10.2401C7.31297 10.3334 7.1863 10.3867 7.05297 10.3867Z" fill="currentColor"></path></svg>',color:"#8E8E8F",size:16}},activeStep:{fontSize:12,color:"#FFF",icon:{showIcon:!0,src:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 4.02667C2.56667 5.08667 2 6.48 2 8C2 11.3133 4.68667 14 8 14C11.3133 14 14 11.3133 14 8C14 4.68667 11.3133 2 8 2C7.52667 2 7.06667 2.05333 6.62667 2.16" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/></svg>',color:"#fff",size:16}}},top:{params:{size:"md",bgColor:"#5E4AC6",bgStyle:"gradient",paddingVertical:8,paddingHorizontal:8,chipStyle:"filled",buttonStyle:"filled"},chipWidgetTitle:{color:"#fff",bgColor:"#5E4AC6",borderRadius:12,showType:"both"},buttons:{color:"#BBBBBD",bgColor:"#2F2F31",borderRadius:12,showType:"both"}},inside:{params:{size:"md",sidePadding:8,verticalPadding:8},welcomeMessage:{color:"#fff",bgType:"gradient",fontSize:14,size:"md",borderRadius:12,borderWidth:1,bgColor:"#595959"},messageUser:{color:"#F9F8F8",bgColor:"#F8F8F933",bgType:"bubble",borderRadius:12,fontSize:14,size:"md",borderWidth:1,borderColor:"#595959"},messageBot:{color:"#fff",bgColor:"#5E4AC6",bgType:"plain",borderRadius:12,fontSize:14,size:"md",borderWidth:1,borderColor:"#595959"},activeSnippet:{params:{buttonType:"both",buttonStyle:"filled",size:"md"},element:{color:"#fff",bgColor:"#373739",borderRadius:12,borderWidth:1,borderColor:"#595959",verticalSpacing:8,sidePadding:8,fontSize:12},headerChip:{color:"#fff",bgColor:"#69696A",borderRadius:12,size:"md",fontSize:12,bgType:"filled"},propertyColor:"rgba(255, 255, 255, 0.30)",valueColor:"#fff",yesButton:{color:"#fff",bgColor:"#12A150",borderRadius:12,fontSize:12},noButton:{color:"#fff",bgColor:"#C20E4D",borderRadius:12,fontSize:12}}},bottom:{params:{size:"md",disclaimerShow:!1},inputSend:{size:"md",color:"#EEECEC",bgColor:"#373739",borderColor:"#595959",borderWidth:1,inputStyle:"inside",bgType:"plain",paddingVertical:8,paddingHorizontal:8,sidePadding:8,fontSize:12,borderRadius:8},btnSend:{color:"#1E1E1E",bgColor:"rgba(255, 255, 255, 0.50)",showType:"both",borderWidth:1,borderColor:"#595959",borderRadius:50,size:"md",fontSize:12,icon:{showIcon:!0,src:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9 2.56445C9.01973 2.56449 9.03453 2.57164 9.04395 2.58105L13.5967 7.13379C13.606 7.14324 13.6133 7.15811 13.6133 7.17773C13.6132 7.19738 13.606 7.21226 13.5967 7.22168L13.5898 7.22754L13.584 7.23438C13.5865 7.23164 13.5864 7.23284 13.5801 7.23535C13.5732 7.23801 13.5633 7.24018 13.5527 7.24023C13.5431 7.24023 13.5351 7.23862 13.5293 7.23633C13.524 7.23419 13.5171 7.22992 13.5088 7.22168L9 2.71289L4.49121 7.22168C4.48176 7.23107 4.46699 7.23828 4.44727 7.23828C4.42752 7.23826 4.41275 7.23109 4.40332 7.22168C4.3939 7.21226 4.38676 7.19747 4.38672 7.17773C4.38672 7.15801 4.39393 7.14324 4.40332 7.13379L8.95605 2.58105C8.9655 2.57167 8.98027 2.56445 9 2.56445Z" stroke="currentColor"/><path d="M9 2.68994C9.01306 2.68994 9.02868 2.69518 9.04297 2.70947C9.05726 2.72376 9.0625 2.73938 9.0625 2.75244V15.3745C9.0625 15.3875 9.0571 15.4032 9.04297 15.4175C9.02868 15.4318 9.01306 15.437 9 15.437C8.98694 15.437 8.97132 15.4318 8.95703 15.4175C8.9429 15.4032 8.9375 15.3875 8.9375 15.3745V2.75244C8.9375 2.73938 8.94274 2.72376 8.95703 2.70947C8.97132 2.69518 8.98694 2.68994 9 2.68994Z" fill="currentColor" stroke="currentColor"/></svg>',color:"#fff",size:18}},disclaimer:{color:"#fff",bgColor:"#FF0000",height:20,fontSize:12}}}};class At{canApply(e){return e.fromVersion===this.appliesTo.from&&e.toVersion===this.appliesTo.to}rollback(e){return{success:!1,errors:[`Rollback not implemented for strategy: ${this.name}`],warnings:[],modified:!1}}createSuccessResult(e,t=[]){return{success:!0,data:e,errors:[],warnings:t,modified:!0}}createErrorResult(e,t){return{success:!1,data:t,errors:e,warnings:[],modified:!1}}}class Ga extends At{constructor(){super(...arguments),this.name="AddSettingsFieldsV1toV2",this.description="Добавляет новые поля loader, buttonStyle, buttonType в settings",this.appliesTo={from:"1.0",to:"2.0"}}apply(e){try{const t={...e.config},s=[],n={...t.settings,loader:De.settings.loader};return s.push(`Добавлены поля loader: '${n.loader}'`),this.createSuccessResult({...t,settings:n},s)}catch(t){return this.createErrorResult([`Ошибка при добавлении полей settings: ${t}`])}}}class qa extends At{constructor(){super(...arguments),this.name="AddChipStyleV1toV2",this.description="Добавляет поле chipStyle в sections.top.params",this.appliesTo={from:"1.0",to:"2.0"}}apply(e){try{const t={...e.config},s=[];return t.sections.top.params={...t.sections.top.params,chipStyle:De.sections.top.params.chipStyle},s.push(`Добавлено поле chipStyle: '${De.sections.top.params.chipStyle}' в sections.top.params`),this.createSuccessResult(t,s)}catch(t){return this.createErrorResult([`Ошибка при добавлении chipStyle: ${t}`])}}}class Ya extends At{constructor(){super(...arguments),this.name="AddMessageBgTypeV1toV2",this.description="Добавляет поле bgType в messageUser и messageBot",this.appliesTo={from:"1.0",to:"2.0"}}apply(e){try{const t={...e.config},s=[];return t.sections.inside.messageUser={...t.sections.inside.messageUser,bgType:De.sections.inside.messageUser.bgType},t.sections.inside.messageBot={...t.sections.inside.messageBot,bgType:De.sections.inside.messageBot.bgType},s.push("Добавлены поля bgType для messageUser и messageBot"),this.createSuccessResult(t,s)}catch(t){return this.createErrorResult([`Ошибка при добавлении bgType для сообщений: ${t}`])}}}class Za extends At{constructor(){super(...arguments),this.name="AddActionButtonsV1toV2",this.description="Добавляет кнопки aprooveButton и rejectButton в inside секцию",this.appliesTo={from:"1.0",to:"2.0"}}apply(e){try{const t={...e.config},s=[];return t.sections.inside={...t.sections.inside},s.push("Добавлены кнопки aprooveButton и rejectButton"),this.createSuccessResult(t,s)}catch(t){return this.createErrorResult([`Ошибка при добавлении кнопок действий: ${t}`])}}}class Xa extends At{constructor(){super(...arguments),this.name="EnhanceInputSendV1toV2",this.description="Добавляет borderStyle, inputStyle, bgType в inputSend",this.appliesTo={from:"1.0",to:"2.0"}}apply(e){try{const t={...e.config},s=[];return t.sections.bottom.inputSend={...t.sections.bottom.inputSend,borderStyle:{borderColor:De.sections.bottom.inputSend.borderColor,borderWidth:De.sections.bottom.inputSend.borderWidth},inputStyle:De.sections.bottom.inputSend.inputStyle,bgType:De.sections.bottom.inputSend.bgType},s.push("Расширен inputSend с новыми полями borderStyle, inputStyle, bgType"),this.createSuccessResult(t,s)}catch(t){return this.createErrorResult([`Ошибка при расширении inputSend: ${t}`])}}}class Qa extends At{constructor(){super(...arguments),this.name="AddBottomElementsV1toV2",this.description="Добавляет warningAlert и disclaimer в bottom секцию",this.appliesTo={from:"1.0",to:"2.0"}}apply(e){try{const t={...e.config},s=[];return t.sections.bottom={...t.sections.bottom},s.push("Добавлены warningAlert и disclaimer в bottom секцию"),this.createSuccessResult(t,s)}catch(t){return this.createErrorResult([`Ошибка при добавлении элементов bottom: ${t}`])}}}new Ga,new qa,new Ya,new Za,new Xa,new Qa;const Ve=i=>typeof i=="string"&&i.length>=0,tr=i=>typeof i=="number"&&!Number.isNaN(i),Kt=(i,e)=>typeof i=="string"&&e.includes(i);function Ja(i){var u,d,p,h,g,y,f;const e=[];if(!i||typeof i!="object")return{isValid:!1,errors:["config: must be an object"]};const t=i.settings||{};tr(t.letterSpacing)||t.letterSpacing===void 0||e.push("settings.letterSpacing: number"),Ve(t.bgChat)||t.bgChat===void 0||e.push("settings.bgChat: string"),Ve(t.fontFamily)||t.fontFamily===void 0||e.push("settings.fontFamily: string"),tr(t.fontWeight)||t.fontWeight===void 0||e.push("settings.fontWeight: number"),t.logo===void 0||Ve(t.logo)||e.push("settings.logo: string (svg or url)"),t.widgetTitle===void 0||Ve(t.widgetTitle)||e.push("settings.widgetTitle: string"),t.position===void 0&&e.push("settings.position: undefined");const s=i.texts||{};s.launchIssueTitle===void 0||Ve(s.launchIssueTitle)||e.push("texts.launchIssueTitle: string"),s.issueText===void 0||Ve(s.issueText)||e.push("texts.issueText: string"),s.widgetTitle===void 0||Ve(s.widgetTitle)||e.push("texts.widgetTitle: string"),s.hideText===void 0||Ve(s.hideText)||e.push("texts.hideText: string");const n=((u=i.sections)==null?void 0:u.top)||{},r=n.params||{};r.size===void 0||Kt(r.size,["sm","md","lg"])||e.push("sections.top.params.size: sm|md|lg"),r.chipStyle===void 0||Kt(r.chipStyle,["filled","outlined","invisible"])||e.push("sections.top.params.chipStyle: filled|outlined|invisible"),r.buttonStyle===void 0||Kt(r.buttonStyle,["filled","outlined","invisible"])||e.push("sections.top.params.buttonStyle: filled|outlined|invisible"),r.buttonType===void 0||Kt(r.buttonType,["icon","text","both"])||e.push("sections.top.params.buttonType: icon|text|both"),((d=n==null?void 0:n.chipWidgetTitle)==null?void 0:d.color)===void 0||Ve((p=n==null?void 0:n.chipWidgetTitle)==null?void 0:p.color)||e.push("sections.top.chipWidgetTitle.color: string"),((h=n==null?void 0:n.chipWidgetTitle)==null?void 0:h.bgColor)===void 0||Ve((g=n==null?void 0:n.chipWidgetTitle)==null?void 0:g.bgColor)||e.push("sections.top.chipWidgetTitle.bgColor: string"),(n==null?void 0:n.btnClose)===void 0||typeof(n==null?void 0:n.btnClose)=="object"||e.push("sections.top.btnClose: object");const a=(((y=i.sections)==null?void 0:y.bottom)||{}).params||{};a.size===void 0||Kt(a.size,["sm","md","lg"])||e.push("sections.bottom.params.size: sm|md|lg");const l=((f=i.sections)==null?void 0:f.warnings)||{};return l.launchIssue===void 0||typeof l.launchIssue=="object"||e.push("sections.warnings.launchIssue: object"),l.connectionIssue===void 0||typeof l.connectionIssue=="object"||e.push("sections.warnings.connectionIssue: object"),{isValid:e.length===0,errors:e}}class el{constructor(e){de(this,"config");this.config=e}getFlatRecursiveConfig(e,t="",s={}){for(const n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;const r=e[n],o=t?`${t}.${n}`:n;r!==null&&typeof r=="object"&&!Array.isArray(r)?this.getFlatRecursiveConfig(r,o,s):s[o]=r}return s}get configFlat(){return this.getFlatRecursiveConfig(this.config)}getConfig(){return this.config}getKey(e){return this.configFlat[e]??void 0}getKeyObject(e){return e.split(".").reduce((t,s)=>t&&t[s]!==void 0?t[s]:"undefined",this.config)}}const en={sm:"tw:h-[20px] tw:px-1.5 tw:py-0 tw:[font-size:10px] [&_svg]:tw:size-4",md:"tw:h-[24px] tw:px-2 tw:py-1 tw:text-xs [&_svg]:tw:size-4.5",lg:"tw:h-[28px] tw:px-3 tw:py-1 tw:text-sm [&_svg]:tw:size-5"};function tn(i){return i==="sm"||i==="md"||i==="lg"?en[i]:en.md}function xn(i,e){try{const s={top:"sections.top.params.size",inside:"sections.inside.params.size",bottom:"sections.bottom.params.size"}[e],n=i==null?void 0:i.getKey(s);return tn(n)}catch{return en.md}}const tl=["aria-expanded"],sl=["innerHTML"],nl=["src","alt"],rl={key:2},il={key:0,class:"tw:flex tw:items-center tw:w-full tw:justify-end tw:gap-1.5"},ol=["width","height"],al={key:1},ll=["width","height"],cl={key:1},ul=c.defineComponent({__name:"ChatHeader",props:{isChatOpen:{type:Boolean},toggleChat:{type:Function},configDesignClass:{},sectionBorderRadius:{},isPreview:{type:Boolean},isEmbedded:{type:Boolean},restartChat:{type:Function}},setup(i){const e=i,t=c.computed(()=>e.configDesignClass.getKeyObject("sections.top.params")),s=c.computed(()=>xn(e.configDesignClass,"top")),n=c.computed(()=>{let f="";switch(t.value.bgStyle){case"gradient":f=`linear-gradient(180deg, ${t.value.bgColor} 0%, ${e.configDesignClass.getKey("settings.bgChat")} 100%)`;break;case"filled":f=t.value.bgColor;break;case"invisible":f="transparent";break;default:f="transparent";break}return{...e.sectionBorderRadius,borderBottomLeftRadius:0,borderBottomRightRadius:0,background:f,padding:`${t.value.paddingVertical}px ${t.value.paddingHorizontal}px`}}),r=c.computed(()=>{const f=e.configDesignClass.getKey("texts.widgetTitle"),m=e.configDesignClass.getKey("settings.widgetTitle");return f&&f!=="undefined"?f:m&&m!=="undefined"?m:""}),o=c.computed(()=>e.configDesignClass.getKey("sections.top.chipWidgetTitle.showType")),a=c.computed(()=>{const f=e.configDesignClass.getKey("sections.top.params.chipStyle"),m=e.configDesignClass.getKey("sections.top.chipWidgetTitle.color"),_=e.configDesignClass.getKey("sections.top.chipWidgetTitle.bgColor"),S=f==="outlined",w=f==="filled",C=f==="invisible";return{borderRadius:e.configDesignClass.getKey("settings.globalRoundingRadius")?e.sectionBorderRadius.borderRadius:e.configDesignClass.getKey("sections.top.chipWidgetTitle.borderRadius")+"px",color:m,border:S?`1px solid ${_}`:"none",padding:C?"0px":null,"background-color":w?_:"transparent"}}),l=c.computed(()=>e.configDesignClass.getKey("sections.top.buttons.showType")),u=c.computed(()=>{const f=e.configDesignClass.getKey("sections.top.buttons.showType");return f&&f!=="undefined"?f:"icon"}),d=c.computed(()=>{const f=e.configDesignClass.getKeyObject("sections.top.buttons");return{color:(f==null?void 0:f.color)??"#fff",bgColor:(f==null?void 0:f.bgColor)??"#000"}}),p=c.computed(()=>{const f=e.configDesignClass.getKey("sections.top.params.buttonStyle"),m=f==="outlined",_=f==="invisible",S=d.value;return{borderRadius:e.configDesignClass.getKey("settings.globalRoundingRadius")?e.sectionBorderRadius.borderRadius:e.configDesignClass.getKey("sections.top.buttons.borderRadius")+"px",color:S.color,border:m?`1px solid ${S.bgColor}`:"none",padding:_?"0px":null,"background-color":_?"transparent":f==="filled"?S.bgColor:"transparent"}}),h=c.computed(()=>{const f=e.configDesignClass.getKey("texts.hideText");return f&&f!=="undefined"?f:"Hide"}),g=c.computed(()=>e.configDesignClass.getKey("settings.logo").includes("<svg")),y=c.computed(()=>e.configDesignClass.getKey("settings.logo"));return(f,m)=>(c.openBlock(),c.createElementBlock("div",{onClick:m[0]||(m[0]=(..._)=>f.toggleChat&&f.toggleChat(..._)),class:"chat-action tw:cursor-pointer tw:flex tw:items-center tw:w-full tw:justify-start",style:c.normalizeStyle(n.value),role:"button","aria-expanded":f.isChatOpen},[c.createVNode(c.unref(Ct),{class:c.normalizeClass(["tw:flex tw:items-center tw:shadow-none",s.value]),variant:o.value,size:f.configDesignClass.getKey("sections.top.params.size"),style:c.normalizeStyle(a.value),type:"button","aria-label":r.value,title:r.value},{default:c.withCtx(()=>[g.value&&f.configDesignClass.getKey("sections.top.chipWidgetTitle.showType")!=="text"?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["header-logo",f.configDesignClass.getKey("sections.top.params.size")]),innerHTML:y.value},null,10,sl)):y.value&&f.configDesignClass.getKey("sections.top.chipWidgetTitle.showType")!=="text"?(c.openBlock(),c.createElementBlock("img",{key:1,src:y.value,alt:f.configDesignClass.getKey("sections.top.iconWidget.alt"),class:c.normalizeClass(f.configDesignClass.getKey("sections.top.params.size")==="sm"?"tw:w-3 tw:h-3":"tw:w-4 tw:h-4")},null,10,nl)):c.createCommentVNode("",!0),f.configDesignClass.getKey("sections.top.chipWidgetTitle.showType")!=="icon"?(c.openBlock(),c.createElementBlock("span",rl,c.toDisplayString(r.value),1)):c.createCommentVNode("",!0)]),_:1},8,["class","variant","size","style","aria-label","title"]),f.isChatOpen?(c.openBlock(),c.createElementBlock("div",il,[c.createVNode(c.unref(Ct),{variant:l.value,class:c.normalizeClass([s.value]),size:f.configDesignClass.getKey("sections.top.params.size"),style:c.normalizeStyle(p.value),type:"button","aria-label":h.value,title:h.value,onClick:c.withModifiers(f.restartChat,["stop"])},{default:c.withCtx(()=>[u.value!=="text"?(c.openBlock(),c.createElementBlock("svg",{key:0,width:f.configDesignClass.getKey("sections.top.params.size")==="sm"?"12":"16",height:f.configDesignClass.getKey("sections.top.params.size")==="sm"?"12":"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m[1]||(m[1]=[c.createElementVNode("path",{d:"M10.7935 1.33333H5.20683C2.78016 1.33333 1.3335 2.77999 1.3335 5.20666V10.7867C1.3335 13.22 2.78016 14.6667 5.20683 14.6667H10.7868C13.2135 14.6667 14.6602 13.22 14.6602 10.7933V5.20666C14.6668 2.77999 13.2202 1.33333 10.7935 1.33333ZM8.00016 12.1667C6.80683 12.1667 5.8735 11.5733 5.24016 10.9867V11.46C5.24016 11.7333 5.0135 11.96 4.74016 11.96C4.46683 11.96 4.24016 11.7333 4.24016 11.46V9.62666C4.24016 9.35333 4.46683 9.12666 4.74016 9.12666H6.3935C6.66683 9.12666 6.8935 9.35333 6.8935 9.62666C6.8935 9.89999 6.66683 10.1267 6.3935 10.1267H5.7935C6.28683 10.62 7.0535 11.1667 8.00016 11.1667C9.74683 11.1667 11.1668 9.74666 11.1668 8C11.1668 7.72666 11.3935 7.5 11.6668 7.5C11.9402 7.5 12.1668 7.72666 12.1668 8C12.1668 10.3 10.3002 12.1667 8.00016 12.1667ZM12.1668 6.35999C12.1668 6.37999 12.1668 6.39999 12.1668 6.41333C12.1602 6.48666 12.1402 6.55333 12.1068 6.61333C12.0735 6.67333 12.0268 6.72666 11.9668 6.77333C11.9202 6.80666 11.8668 6.83333 11.8068 6.85333C11.7602 6.86666 11.7135 6.87333 11.6668 6.87333H10.0468C9.7735 6.87333 9.54683 6.64666 9.54683 6.37333C9.54683 6.1 9.7735 5.87333 10.0468 5.87333H10.6002C10.0668 5.38 9.20683 4.83333 8.0135 4.83333C6.26683 4.83333 4.84683 6.25333 4.84683 8C4.84683 8.27333 4.62016 8.5 4.34683 8.5C4.0735 8.5 3.8335 8.27333 3.8335 8C3.8335 5.7 5.70016 3.83333 8.00016 3.83333C9.4335 3.83333 10.4868 4.45333 11.1668 5.04666V4.53999C11.1668 4.26666 11.3935 4.03999 11.6668 4.03999C11.9402 4.03999 12.1668 4.26666 12.1668 4.53999V6.35999Z",fill:"currentColor"},null,-1)]),8,ol)):c.createCommentVNode("",!0),u.value!=="icon"?(c.openBlock(),c.createElementBlock("span",al," Restart ")):c.createCommentVNode("",!0)]),_:1},8,["variant","class","size","style","aria-label","title","onClick"]),c.createVNode(c.unref(Ct),{variant:l.value,class:c.normalizeClass([s.value]),size:f.configDesignClass.getKey("sections.top.params.size"),style:c.normalizeStyle(p.value),type:"button","aria-label":h.value,title:h.value,onClick:c.withModifiers(f.toggleChat,["stop"])},{default:c.withCtx(()=>[u.value!=="text"?(c.openBlock(),c.createElementBlock("svg",{key:0,width:f.configDesignClass.getKey("sections.top.params.size")==="sm"?"12":"16",height:f.configDesignClass.getKey("sections.top.params.size")==="sm"?"12":"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m[2]||(m[2]=[c.createElementVNode("path",{d:"M10.7935 1.33337H5.20683C2.78016 1.33337 1.3335 2.78004 1.3335 5.20671V10.7867C1.3335 13.22 2.78016 14.6667 5.20683 14.6667H10.7868C13.2135 14.6667 14.6602 13.22 14.6602 10.7934V5.20671C14.6668 2.78004 13.2202 1.33337 10.7935 1.33337ZM12.3335 10.9334C12.3335 11.9334 11.9335 12.3334 10.9335 12.3334H8.40016C7.40016 12.3334 7.00016 11.9334 7.00016 10.9334V9.73337C7.00016 8.73337 7.40016 8.33337 8.40016 8.33337H10.9335C11.9335 8.33337 12.3335 8.73337 12.3335 9.73337V10.9334Z",fill:"currentColor"},null,-1)]),8,ll)):c.createCommentVNode("",!0),u.value!=="icon"?(c.openBlock(),c.createElementBlock("span",cl,c.toDisplayString(h.value),1)):c.createCommentVNode("",!0)]),_:1},8,["variant","class","size","style","aria-label","title","onClick"])])):c.createCommentVNode("",!0)],12,tl))}});typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const dl=i=>typeof i<"u";function fl(i){return JSON.parse(JSON.stringify(i))}function _i(i,e,t,s={}){var n,r,o;const{clone:a=!1,passive:l=!1,eventName:u,deep:d=!1,defaultValue:p,shouldEmit:h}=s,g=c.getCurrentInstance(),y=t||(g==null?void 0:g.emit)||((n=g==null?void 0:g.$emit)==null?void 0:n.bind(g))||((o=(r=g==null?void 0:g.proxy)==null?void 0:r.$emit)==null?void 0:o.bind(g==null?void 0:g.proxy));let f=u;e||(e="modelValue"),f=f||`update:${e.toString()}`;const m=w=>a?typeof a=="function"?a(w):fl(w):w,_=()=>dl(i[e])?m(i[e]):p,S=w=>{h?h(w)&&y(f,w):y(f,w)};if(l){const w=_(),C=c.ref(w);let b=!1;return c.watch(()=>i[e],k=>{b||(b=!0,C.value=m(k),c.nextTick(()=>b=!1))}),c.watch(C,k=>{!b&&(k!==i[e]||d)&&S(k)},{deep:d}),C}else return c.computed({get(){return _()},set(w){S(w)}})}const gl=c.defineComponent({__name:"Textarea",props:{class:{},defaultValue:{},modelValue:{}},emits:["update:modelValue"],setup(i,{emit:e}){const t=i,n=_i(t,"modelValue",e,{passive:!0,defaultValue:t.defaultValue});return(r,o)=>c.withDirectives((c.openBlock(),c.createElementBlock("textarea",{"onUpdate:modelValue":o[0]||(o[0]=a=>c.isRef(n)?n.value=a:null),style:{resize:"none"},"data-slot":"textarea",class:c.normalizeClass(c.unref(nn)("tw:md:text-sm",t.class))},null,2)),[[c.vModelText,c.unref(n)]])}}),pl={key:0,class:"tw:w-full"},hl={key:0,class:"svg-icon"},ml=["innerHTML"],yl={key:1},wl=c.defineComponent({__name:"ChatBottom",props:{configDesignClass:{},messageText:{},sendMessage:{type:Function},sectionBorderRadius:{},classSize:{},isInputDisabled:{type:Boolean},showReconnectNotice:{type:Boolean},restartChat:{type:Function}},emits:["update:messageText"],setup(i,{emit:e}){const t=i,n=_i(t,"messageText",e,{passive:!0}),r=c.computed(()=>{var g;return((g=t.configDesignClass)==null?void 0:g.getKey("sections.bottom.inputSend.inputStyle"))==="stacked"}),o=c.computed(()=>xn(t.configDesignClass,"bottom")),a=c.computed(()=>{const g=t.configDesignClass.getKey("texts.topWarningText");return g&&g!=="undefined"?g:""}),l=c.computed(()=>{const g=t.configDesignClass.getKey("texts.disableInputText");return g&&g!=="undefined"?g:""}),u=c.computed(()=>t.configDesignClass.getKey("sections.bottom.inputSend.size")),d=c.computed(()=>t.isInputDisabled&&l.value?l.value:a.value||t.configDesignClass.getKey("texts.reconnectText")||"Reconnecting..."),p=c.computed(()=>t.configDesignClass.getKey("sections.bottom.btnSend.icon.showIcon")?t.configDesignClass.getKey("sections.bottom.btnSend.icon.src"):null),h=c.computed(()=>{const g=t.configDesignClass.getKey("texts.disclaimerText"),y=t.configDesignClass.getKey("texts.disclaimer"),f=g&&g!=="undefined"?g:y,_=!!t.configDesignClass.getKey("sections.bottom.params.disclaimerShow");return f&&f!=="undefined"&&_?f:""});return(g,y)=>(c.openBlock(),c.createElementBlock("div",{class:"tw:flex tw:flex-col tw:items-center tw:relative tw:mt-2",style:c.normalizeStyle({padding:r.value?"0":"0 "+g.configDesignClass.getKey("sections.bottom.inputSend.sidePadding")+"px"})},[g.showReconnectNotice||a.value||g.isInputDisabled?(c.openBlock(),c.createElementBlock("div",pl,[c.createVNode(Vs,{class:"tw:rounded-b-none tw:mx-0 tw:flex tw:justify-center tw:item s-center tw:px-2 tw:py-2",type:"reconnecting",configDesignClass:g.configDesignClass,headlineText:d.value,restartChat:g.restartChat,warningElement:g.isInputDisabled?g.configDesignClass.getKeyObject("sections.warnings.disableInputIssue"):g.configDesignClass.getKeyObject("sections.warnings.reconnectIssue")},null,8,["configDesignClass","headlineText","restartChat","warningElement"])])):c.createCommentVNode("",!0),c.createElementVNode("div",{class:c.normalizeClass(["message-input tw:flex-1 tw:w-full tw:p-0 tw:gap-[10px] tw:flex",[g.classSize,r.value?"tw:flex-col tw:items-stretch tw:justify-between":" tw:items-end",u.value==="sm"?"tw:items-center":""]]),style:c.normalizeStyle({...r.value?{borderRadius:g.configDesignClass.getKey("settings.globalRoundingRadius")?g.sectionBorderRadius.borderRadius:g.configDesignClass.getKey("sections.bottom.inputSend.borderRadius")+"px",borderTopLeftRadius:"0px",borderTopRightRadius:"0px"}:{borderRadius:g.configDesignClass.getKey("settings.globalRoundingRadius")?g.sectionBorderRadius.borderRadius:g.configDesignClass.getKey("sections.bottom.inputSend.borderRadius")+"px"},"background-color":g.configDesignClass.getKey("sections.bottom.inputSend.bgColor"),"margin-bottom":r.value?"0px":g.configDesignClass.getKey("sections.bottom.inputSend.sidePadding")+"px",border:r.value?"none":`${g.configDesignClass.getKey("sections.bottom.inputSend.borderWidth")}px solid ${g.configDesignClass.getKey("sections.bottom.inputSend.borderColor")}`})},[(c.openBlock(),c.createBlock(c.unref(gl),{placeholder:g.configDesignClass.getKey("texts.inputPlaceholder")||"Type question",rows:u.value==="sm"?1:u.value==="md"?2:3,key:g.configDesignClass.getKey("sections.bottom.inputSend.color"),modelValue:c.unref(n),"onUpdate:modelValue":y[0]||(y[0]=f=>c.isRef(n)?n.value=f:null),onKeyup:c.withKeys(g.sendMessage,["enter"]),class:c.normalizeClass(["tw:w-full tw:outline-none tw:border-0 focus:tw:outline-none",r.value?"tw:h-auto rounded-none":"h-full"]),style:c.normalizeStyle({color:g.configDesignClass.getKey("sections.bottom.inputSend.color"),fontSize:g.configDesignClass.getKey("sections.bottom.inputSend.fontSize")+"px",lineHeight:g.configDesignClass.getKey("settings.lineHeight"),padding:g.configDesignClass.getKey("sections.bottom.inputSend.paddingVertical")+"px "+g.configDesignClass.getKey("sections.bottom.inputSend.paddingHorizontal")+"px",height:g.configDesignClass.getKey("sections.bottom.inputSend.height")+"px"})},null,8,["placeholder","rows","modelValue","onKeyup","class","style"])),c.createElementVNode("div",{class:c.normalizeClass(r.value?"tw:flex tw:flex-row-reverse tw:justify-between tw:items-center tw:gap-2 tw:pl-3":"tw:flex tw:ml-auto"),style:c.normalizeStyle({marginBottom:g.configDesignClass.getKey("sections.bottom.inputSend.paddingVertical")+"px",marginRight:g.configDesignClass.getKey("sections.bottom.inputSend.paddingHorizontal")+"px"})},[c.createVNode(c.unref(Ct),{size:g.configDesignClass.getKey("sections.bottom.btnSend.showType")==="icon"?"icon":g.configDesignClass.getKey("sections.bottom.params.size"),class:c.normalizeClass(["btn-send tw:bg-transparent tw:shadow-none tw:flex-shrink-0 tw:items-center tw:gap-1",g.configDesignClass.getKey("sections.bottom.btnSend.showType")==="icon"?"tw:rounded-full":o.value,r.value?"tw:self-end":"tw:ml-auto",{"tw:opacity-50":c.unref(n).trim()===""||g.isInputDisabled},{"tw:px-3 tw:py-2":g.configDesignClass.getKey("sections.bottom.btnSend.size")==="md"},{"tw:px-2 tw:py-1":g.configDesignClass.getKey("sections.bottom.btnSend.size")==="sm"},{"tw:px-4 tw:py-3":g.configDesignClass.getKey("sections.bottom.btnSend.size")==="lg"}]),onClick:g.sendMessage,style:c.normalizeStyle({...g.configDesignClass.getKey("sections.bottom.btnSend.type")==="icon"?{borderRadius:g.configDesignClass.getKey("settings.globalRoundingRadius")?g.sectionBorderRadius.borderRadius:g.configDesignClass.getKey("sections.bottom.btnSend.borderRadius")+"px"}:{borderRadius:g.configDesignClass.getKey("settings.globalRoundingRadius")?g.sectionBorderRadius.borderRadius:g.configDesignClass.getKey("sections.bottom.btnSend.borderRadius")+"px"},color:g.configDesignClass.getKey("sections.bottom.btnSend.color"),"background-color":g.configDesignClass.getKey("sections.bottom.btnSend.bgColor"),fontSize:g.configDesignClass.getKey("sections.bottom.btnSend.fontSize")+"px",border:g.configDesignClass.getKey("sections.bottom.btnSend.borderWidth")+"px solid "+g.configDesignClass.getKey("sections.bottom.btnSend.borderColor")}),disabled:g.isInputDisabled},{default:c.withCtx(()=>[p.value?(c.openBlock(),c.createElementBlock("div",hl,[c.createElementVNode("div",{innerHTML:p.value,style:c.normalizeStyle({color:g.configDesignClass.getKey("sections.bottom.btnSend.color"),width:g.configDesignClass.getKey("sections.bottom.btnSend.icon.size")+"px",height:g.configDesignClass.getKey("sections.bottom.btnSend.icon.size")+"px"})},null,12,ml)])):c.createCommentVNode("",!0),g.configDesignClass.getKey("sections.bottom.btnSend.showType")==="text"||g.configDesignClass.getKey("sections.bottom.btnSend.showType")==="both"?(c.openBlock(),c.createElementBlock("span",yl,c.toDisplayString(g.configDesignClass.getKey("texts.sendButton")),1)):c.createCommentVNode("",!0)]),_:1},8,["size","class","onClick","style","disabled"]),r.value&&h.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:"tw:text-[11px] tw:text-white/50 tw:flex tw:items-center",style:c.normalizeStyle({...g.sectionBorderRadius,fontSize:g.configDesignClass.getKey("sections.bottom.disclaimer.fontSize")+"px",height:g.configDesignClass.getKey("sections.bottom.disclaimer.height")+"px",color:g.configDesignClass.getKey("sections.bottom.disclaimer.color")})},c.toDisplayString(h.value),5)):c.createCommentVNode("",!0)],6)],6),!r.value&&h.value?(c.openBlock(),c.createElementBlock("div",{key:1,class:"tw:px-2 tw:text-white/50 tw:mb-2 tw:flex tw:items-center tw:justify-center",style:c.normalizeStyle({...g.sectionBorderRadius,fontSize:g.configDesignClass.getKey("sections.bottom.disclaimer.fontSize")+"px",height:g.configDesignClass.getKey("sections.bottom.disclaimer.height")+"px",color:g.configDesignClass.getKey("sections.bottom.disclaimer.color")})},c.toDisplayString(h.value),5)):c.createCommentVNode("",!0)],4))}});var Y=(i=>(i.Collapsed="collapsed",i.EmptyChat="empty",i.Messages="messages",i.ActionSnippet="action_snippet",i.LaunchIssue="launch_issue",i.ConnectionIssue="connection_issue",i.ReconnectingAttempt="reconnecting_attempt",i.InputBlocked="input_blocked",i.ActionLoader="action_loader",i.TracesMessage="traces_message",i.TracesWithMeta="traces_with_meta",i))(Y||{}),vi=(i=>(i.UserMessage="Give me some action",i))(vi||{});class Ae{base(e){return{isChatOpen:!0,isChatActive:!0,messages:[],isConnectionError:!1,isProcessError:!1,isReconnectError:!1,isInputDisabled:!1,showWelcome:!1,blockSocket:!0,traceLastShown:!1,...e}}}class bl extends Ae{constructor(){super(...arguments);de(this,"type",Y.Collapsed)}getState(){return this.base({isChatOpen:!1})}}class sr extends Ae{constructor(){super(...arguments);de(this,"type",Y.EmptyChat)}getState(){return this.base({showWelcome:!0,messages:[]})}}class _l extends Ae{constructor(){super(...arguments);de(this,"type",Y.Messages)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action",r=(s==null?void 0:s.botMessageText)??"What sort of action do you want?";return this.base({showWelcome:!0,messages:[{text:n,isUser:!0},{text:r,isUser:!1},{text:"Sort of action",isUser:!0}]})}}class vl extends Ae{constructor(){super(...arguments);de(this,"type",Y.ActionSnippet)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action";return this.base({showWelcome:!1,messages:[{text:n,isUser:!0},{snippet:{sequence:"38952101547613990",id:"38496103561174822",data:{actionCancel:{text:"Cancel"},actionConfirm:{text:"Confirm"},title:{text:"Do you really want to get the available contacts list?"}}},isUser:!1}]})}}class Cl extends Ae{constructor(){super(...arguments);de(this,"type",Y.LaunchIssue)}getState(){return this.base({isConnectionError:!0})}}class xl extends Ae{constructor(){super(...arguments);de(this,"type",Y.ConnectionIssue)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action",r=!0,o=(s==null?void 0:s.traceSteps)??["Step One","Step Two","Step three"];return this.base({isProcessError:!0,showWelcome:r,messages:[{text:n,isUser:!0},{text:o[0],isUser:!1,isSystem:!0,type:"trace"},{text:o[1],isUser:!1,isSystem:!0,type:"trace"},{text:o[2],isUser:!1,isSystem:!0,type:"trace"}]})}}class Sl extends Ae{constructor(){super(...arguments);de(this,"type",Y.ReconnectingAttempt)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action",r=!0,o=(s==null?void 0:s.traceSteps)??["Step One","Step Two","Step three"];return this.base({isReconnectError:!0,showReconnectNotice:!0,showWelcome:r,messages:[{text:n,isUser:!0},{text:o[0],isUser:!1,isSystem:!0,type:"trace"},{text:o[1],isUser:!1,isSystem:!0,type:"trace"},{text:o[2],isUser:!1,isSystem:!0,type:"trace"}]})}}class kl extends Ae{constructor(){super(...arguments);de(this,"type",Y.InputBlocked)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action",r=!0,o=(s==null?void 0:s.traceSteps)??["Step One","Step Two","Step three"];return this.base({isReconnectError:!0,showReconnectNotice:!0,isInputDisabled:!0,showWelcome:r,messages:[{text:n,isUser:!0},{text:o[0],isUser:!1,isSystem:!0,type:"trace"},{text:o[1],isUser:!1,isSystem:!0,type:"trace"},{text:o[2],isUser:!1,isSystem:!0,type:"trace"}]})}}class Tl extends Ae{constructor(){super(...arguments);de(this,"type",Y.ActionLoader)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action";return this.base({showWelcome:!0,messages:[{text:n,isUser:!0}]})}}class zl extends Ae{constructor(){super(...arguments);de(this,"type",Y.TracesMessage)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action",r=(s==null?void 0:s.traceSteps)??["Step One","Step Two","Step three"],o=[{text:n,isUser:!0},{text:r[0],isUser:!1,isSystem:!0,type:"trace"},{text:r[1],isUser:!1,isSystem:!0,type:"trace"},{text:r[2],isUser:!1,isSystem:!0,type:"trace"}];return this.base({showWelcome:!0,messages:o})}}class Rl extends Ae{constructor(){super(...arguments);de(this,"type",Y.TracesWithMeta)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action",r=(s==null?void 0:s.traceSteps)??["Step One","API Schema Requested","API Call Conducted","API Call Conducted"],o=[{text:n,isUser:!0},{text:r[0],isUser:!1,isSystem:!0,type:"trace",meta:{step:1}},{text:r[1],isUser:!1,isSystem:!0,type:"trace",meta:{step:2,json:{status:"requested",endpoint:"/v1/schema"}}},{text:r[2],isUser:!1,isSystem:!0,type:"trace",meta:{step:3,json:{status:"ok",code:200}}},{text:r[3],isUser:!1,isSystem:!0,type:"trace"}];return this.base({showWelcome:!0,messages:o})}}class Ml{static create(e){switch(e){case Y.Collapsed:case"collapsed":return new bl;case Y.EmptyChat:case"empty":return new sr;case Y.Messages:case"messages":return new _l;case Y.ActionSnippet:case"action_snippet":return new vl;case Y.LaunchIssue:case"launch_issue":return new Cl;case Y.ConnectionIssue:case"connection_issue":return new xl;case Y.ReconnectingAttempt:case"reconnecting_attempt":return new Sl;case Y.InputBlocked:case"input_blocked":return new kl;case Y.ActionLoader:case"action_loader":return new Tl;case Y.TracesMessage:case"traces_message":return new zl;case Y.TracesWithMeta:case"traces_with_meta":return new Rl;default:return new sr}}}class nr{static getScenarioFromUrl(){try{return new URLSearchParams(window.location.search).get("scenario")??void 0}catch{return}}static getState(e,t,s){return{...Ml.create(e).getState(t,s),...s??{}}}}const El={key:"message",class:"message-text"},Bl=c.defineComponent({__name:"MessageBot",props:{message:{},welcomeColor:{},color:{},bgColor:{},size:{},bgType:{},fontSize:{},borderWidth:{},borderColor:{},configDesignClass:{}},setup(i){const e=i,t=c.computed(()=>{switch(e.size){case"sm":return e.bgType==="bubble"?" tw:min-h-[25px] tw:py-1 tw:px-2 ":"";case"md":return e.bgType==="bubble"?" tw:min-h-[33px] tw:py-2 tw:px-3":"";case"lg":return e.bgType==="bubble"?" tw:min-h-[40px] tw:py-3 tw:px-4":""}});return(s,n)=>{var r,o,a;return c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(["message-item tw:text-white tw:w-fit tw:whitespace-break-spaces tw:transition-colors tw:duration-[250ms] tw:ease-[ease]",[t.value,{"item-primary":!((r=s.message.chunk)!=null&&r.start)}]]),style:c.normalizeStyle({color:(o=s.message.chunk)!=null&&o.start?"#2F2F31":s.color,"background-color":(a=s.message.chunk)!=null&&a.start?"transparent":s.bgType==="bubble"?s.bgColor:"transparent","font-size":s.fontSize+"px",border:s.bgType==="bubble"?s.borderWidth+"px solid "+s.borderColor:"none"})},[c.createElementVNode("div",El,c.toDisplayString(s.message.text),1)],6)}}}),Ci=(i,e)=>{const t=i.__vccOpts||i;for(const[s,n]of e)t[s]=n;return t},Pl=Ci(Bl,[["__scopeId","data-v-53770389"]]),Dl=c.defineComponent({__name:"MessageUser",props:{message:{},isFirst:{type:Boolean},color:{},bgColor:{},borderWidth:{},borderColor:{},fontSize:{},size:{},bgType:{},configDesignClass:{}},setup(i){const e=i,t=c.computed(()=>{switch(e.size){case"sm":return e.bgType==="bubble"?" tw:min-h-[25px] tw:py-1 tw:px-2 ":"";case"md":return e.bgType==="bubble"?" tw:min-h-[33px] tw:py-2 tw:px-3":"";case"lg":return e.bgType==="bubble"?" tw:min-h-[40px] tw:py-3 tw:px-4":""}}),s=c.computed(()=>e.bgType==="bubble"?e.borderWidth+"px solid "+e.borderColor:"none");return(n,r)=>(c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(["message-item tw:w-fit tw:whitespace-break-spaces item-secondary tw:ml-auto",[t.value,{"tw:mt-[5px] !tw:bg-transparent":n.isFirst}]]),style:c.normalizeStyle({color:n.color,"background-color":n.bgType==="bubble"?n.bgColor:"transparent",border:s.value,"font-size":n.fontSize+"px"})},c.toDisplayString(n.message.text),7))}}),Al={key:"loading",class:"message-text-loading tw:flex tw:items-center tw:justify-start tw:gap-3"},Ol={key:0,class:"tw:flex tw:items-center tw:justify-start tw:gap-1 tw:h-4"},Ll={key:1,class:"tw:flex tw:items-center tw:justify-start tw:gap-1 tw:h-4"},Il={key:2,class:"circle-pulse"},Vl={key:3,class:"circle-pulse-1"},Kl=c.defineComponent({__name:"LoadingMessage",props:{loader:{},text:{},configDesignClass:{}},setup(i){return(e,t)=>(c.openBlock(),c.createElementBlock("div",Al,[!e.loader||e.loader==="dots"?(c.openBlock(),c.createElementBlock("div",Ol,t[0]||(t[0]=[c.createElementVNode("div",{class:"loading-dot tw:rounded-full"},null,-1),c.createElementVNode("div",{class:"loading-dot loading-dot-delay-1 tw:rounded-full"},null,-1),c.createElementVNode("div",{class:"loading-dot loading-dot-delay-2 tw:rounded-full"},null,-1),c.createElementVNode("div",{class:"loading-dot loading-dot-delay-3 tw:rounded-full"},null,-1)]))):e.loader==="dots-pulse"?(c.openBlock(),c.createElementBlock("div",Ll,t[1]||(t[1]=[c.createElementVNode("span",{class:"dot-pulse dot-1"},null,-1),c.createElementVNode("span",{class:"dot-pulse dot-2"},null,-1),c.createElementVNode("span",{class:"dot-pulse dot-3"},null,-1)]))):e.loader==="circle-pulse"?(c.openBlock(),c.createElementBlock("div",Il,t[2]||(t[2]=[c.createElementVNode("span",{class:"ring ring-1"},null,-1),c.createElementVNode("span",{class:"ring ring-2"},null,-1)]))):e.loader==="circle-pulse-1"?(c.openBlock(),c.createElementBlock("div",Vl,t[3]||(t[3]=[c.createElementVNode("span",{class:"ripple r1"},null,-1),c.createElementVNode("span",{class:"ripple r2"},null,-1),c.createElementVNode("span",{class:"center"},null,-1)]))):c.createCommentVNode("",!0),c.createElementVNode("span",{class:"tw:text-sm",style:c.normalizeStyle({color:e.configDesignClass.getKey("sections.loader.typingLoader.color")})},c.toDisplayString(e.text),5)]))}}),Fl=Ci(Kl,[["__scopeId","data-v-01dfda19"]]),Nl=["data-height"],Wl={class:"tw:flex tw:flex-col tw:items-center tw:gap-1 tw:px-1"},Ul=["innerHTML"],$l={class:"tw:flex tw:items-center tw:gap-2"},Hl=c.defineComponent({__name:"MessageSystem",props:{message:{},welcomeColor:{},color:{},bgColor:{},size:{},configDesignClass:{},activeMessage:{type:Boolean},bgType:{},isLast:{type:Boolean},traceLastShown:{type:Boolean},index:{}},setup(i){const e=i,t=c.computed(()=>e.index===3&&e.traceLastShown||e.isLast),s=c.computed(()=>{switch(e.size){case"sm":return"tw:text-xs";case"md":return"tw:text-xs";case"lg":return"tw:text-base"}}),n=c.computed(()=>t.value?e.configDesignClass.getKey("sections.loader.activeStep.icon.src"):e.configDesignClass.getKey("sections.loader.completeStep.icon.src")),r=c.computed(()=>e.configDesignClass.getKey("sections.loader.activeStep.color")),o=c.computed(()=>e.configDesignClass.getKey("sections.loader.completeStep.color")),a=c.computed(()=>t.value?r.value:o.value),l=c.computed(()=>t.value?e.configDesignClass.getKey("sections.loader.activeStep.icon.color"):e.configDesignClass.getKey("sections.loader.completeStep.icon.color")),u=c.computed(()=>xn(e.configDesignClass,"inside"));return(d,p)=>(c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(["message-system tw:text-left tw:relative tw:w-full tw:text-white tw:w-fit tw:whitespace-break-spaces tw:transition-colors tw:duration-[250ms] tw:ease-[ease]",s.value]),"data-height":d.configDesignClass.getKey("sections.loader.completeStep.verticalSpacing"),style:c.normalizeStyle({"padding-top":d.configDesignClass.getKey("sections.loader.completeStep.verticalSpacing")+"px"})},[c.createElementVNode("hr",{class:"tw:w-[1px] tw:bg-white tw:opacity-20 tw:absolute",style:c.normalizeStyle([{display:"none"},{height:d.configDesignClass.getKey("sections.loader.completeStep.verticalSpacing")-2+"px",left:d.configDesignClass.getKey("sections.loader.completeStep.icon.size")/2+4+"px",top:"0px"}])},null,4),c.createElementVNode("div",{key:"message",class:c.normalizeClass(["message-text flex tw:space-between tw:gap-3 tw:flex tw:items-center tw:align-center",{"tw:mb-0":d.isLast}])},[c.createElementVNode("div",Wl,[c.createElementVNode("div",{innerHTML:n.value,class:c.normalizeClass(["svg-inherit",{"tw:animate-spin":t.value}]),style:c.normalizeStyle({color:l.value,height:d.configDesignClass.getKey("sections.loader.completeStep.icon.size")+"px",width:d.configDesignClass.getKey("sections.loader.completeStep.icon.size")+"px"})},null,14,Ul)]),c.createElementVNode("div",$l,[d.message.meta?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("p",{key:0,style:c.normalizeStyle({color:a.value,"font-size":d.configDesignClass.getKey("sections.loader.completeStep.fontSize")+"px"})},c.toDisplayString(d.message.text),5)),d.message.meta?(c.openBlock(),c.createBlock(c.unref(Ct),{key:1,style:c.normalizeStyle({color:e.activeMessage?"rgba(255, 255, 255, 0.60)":"#3F3F46",background:e.activeMessage?"#2F2F31":"#ECEDEE",border:e.activeMessage?"none":"1px solid #fff"}),class:c.normalizeClass(["tw:flex tw:items-center tw:gap-1 tw:rounded-md tw:shadow-xs",u.value])},{default:c.withCtx(()=>[p[0]||(p[0]=c.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[c.createElementVNode("path",{d:"M10.7935 1.33301H5.20683C2.78016 1.33301 1.3335 2.77967 1.3335 5.20634V10.7863C1.3335 13.2197 2.78016 14.6663 5.20683 14.6663H10.7868C13.2135 14.6663 14.6602 13.2197 14.6602 10.793V5.20634C14.6668 2.77967 13.2202 1.33301 10.7935 1.33301ZM6.62683 8.84634C6.1735 9.52634 5.54683 10.0797 4.8135 10.4463C4.74683 10.4797 4.66683 10.4997 4.5935 10.4997C4.40683 10.4997 4.2335 10.3997 4.14683 10.2263C4.02016 9.97967 4.12016 9.67967 4.3735 9.55301C4.9535 9.26634 5.44683 8.82634 5.80016 8.29301C5.92016 8.11301 5.92016 7.88634 5.80016 7.70634C5.44016 7.17301 4.94683 6.73301 4.3735 6.44634C4.12016 6.32634 4.02016 6.02634 4.14683 5.77301C4.26683 5.52634 4.56683 5.42634 4.8135 5.55301C5.54683 5.91967 6.1735 6.47301 6.62683 7.15301C6.9735 7.66634 6.9735 8.33301 6.62683 8.84634ZM11.3335 10.4997H8.66683C8.3935 10.4997 8.16683 10.273 8.16683 9.99967C8.16683 9.72634 8.3935 9.49967 8.66683 9.49967H11.3335C11.6068 9.49967 11.8335 9.72634 11.8335 9.99967C11.8335 10.273 11.6068 10.4997 11.3335 10.4997Z",fill:"currentColor"})],-1)),c.createElementVNode("span",null,c.toDisplayString(d.message.text),1)]),_:1,__:[0]},8,["style","class"])):c.createCommentVNode("",!0)])],2)],14,Nl))}});class jl{constructor(e,t){de(this,"structure");de(this,"options");de(this,"html","");this.structure=e,this.options={escape:(t==null?void 0:t.escape)??!0,whitelistStyles:(t==null?void 0:t.whitelistStyles)??["color","background","borderColor","borderRadius"]}}build(e){return this.html=this.renderLayout(this.structure.layout,this.structure.bindings||{},e),this}buildStyle(e){return Object.entries(e).forEach(([t,s])=>{const n=new RegExp(`data-visual="${this.escapeRegExp(t)}"`,"g"),r=Object.entries(s.style).map(([o,a])=>`${o}: ${a};`).join("");this.html=this.html.replace(n,`class="${s.class}" style="${r}"`)}),this}result(){return this.html}renderLayout(e,t,s){let n=e;return t&&(Object.entries(t).forEach(([r,o])=>{var l,u;const a=new RegExp(`\\{${this.escapeRegExp(r)}\\}`,"g");if(o.type==="text"){const d=(l=s==null?void 0:s[r])==null?void 0:l.text;n=n.replace(a,this.safeText(typeof d=="string"||typeof d=="number"?String(d):""));return}if(o.type==="button"){const d=(u=s==null?void 0:s[r])==null?void 0:u.text;n=n.replace(a,this.safeText(typeof d=="string"||typeof d=="number"?String(d):""));return}if(o.type==="repeater"){const d=Array.isArray(s==null?void 0:s[r])?s[r]:[],p=o.layout||"",h=o.bindings||{},g=d.map(y=>this.renderLayout(p,h,y)).join("");n=n.replace(a,g);return}}),n=n.replace(/style=\"([^\"]*)\"/g,(r,o)=>{const a=o.split(";").map(l=>l.trim()).filter(Boolean).filter(l=>{const[u]=l.split(":");return this.options.whitelistStyles.includes((u||"").trim())}).join("; ");return`style="${this.safeAttr(a)}"`})),n}safeText(e){return this.options.escape?e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\"/g,""").replace(/'/g,"'"):e}safeAttr(e){return this.safeText(e)}escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}}const Gl={layout:'<div class="tw:flex tw:flex-col" data-visual="container"><div><span data-visual="headerChip">Action</span></div><div class="tw:flex tw:mb-2 tw:mt-2 tw:text-xs"><div data-visual="title">{title}</div></div><div class="tw:flex tw:gap-1"><button data-cb="confirm" data-visual="actionConfirm" class="tw:flex-1">{actionConfirm}</button><button data-cb="cancel" data-visual="actionCancel" class="tw:flex-1">{actionCancel}</button></div></div>',bindings:{title:{type:"text"},actionConfirm:{type:"button"},actionCancel:{type:"button"}}};function ql(i){const e=c.computed(()=>{const w=i==null?void 0:i.getKeyObject("sections.inside.activeSnippet"),C=i==null?void 0:i.getKeyObject("sections.activeSnippet"),b=w&&w!=="undefined"?w:C;return b&&b!=="undefined"?b:{}}),t=(w,C)=>{if(!C)return w;switch(C){case"outlined":return{color:w.background,background:"transparent",border:`1px solid ${w.borderColor||w.background}`};case"invisible":return{color:w.background,background:"transparent"};default:return w}},s=c.computed(()=>i==null?void 0:i.getKey("sections.inside.activeSnippet.element.bgColor")),n=c.computed(()=>i==null?void 0:i.getKey("sections.inside.activeSnippet.element.color")),r=c.computed(()=>i==null?void 0:i.getKey("sections.inside.activeSnippet.element.sidePadding")),o=c.computed(()=>i==null?void 0:i.getKey("sections.inside.activeSnippet.element.verticalSpacing")),a=c.computed(()=>(i==null?void 0:i.getKey("sections.inside.activeSnippet.element.borderWidth"))+"px solid "+(i==null?void 0:i.getKey("sections.inside.activeSnippet.element.borderColor"))),l=c.computed(()=>{var w,C,b,k,z,x,v,A;return{color:(C=(w=e.value)==null?void 0:w.headerChip)==null?void 0:C.color,background:(k=(b=e.value)==null?void 0:b.headerChip)==null?void 0:k.bgColor,borderColor:(x=(z=e.value)==null?void 0:z.headerChip)==null?void 0:x.borderColor,bgColor:(A=(v=e.value)==null?void 0:v.headerChip)==null?void 0:A.bgColor}}),u=c.computed(()=>{var w,C;return t(l.value,(C=(w=e.value)==null?void 0:w.headerChip)==null?void 0:C.bgType)}),d=c.computed(()=>{var w,C,b,k;return{...u.value,"border-radius":i!=null&&i.getKey("settings.globalRoundingRadius")?jt(i,2).borderRadius:((C=(w=e.value)==null?void 0:w.headerChip)==null?void 0:C.borderRadius)+"px","font-size":((k=(b=e.value)==null?void 0:b.headerChip)==null?void 0:k.fontSize)+"px"}}),p=c.computed(()=>{var w;return(w=e.value)==null?void 0:w.propertyColor}),h=c.computed(()=>{var w;return(w=e.value)==null?void 0:w.valueColor}),g=c.computed(()=>{var w,C,b,k;return{color:(C=(w=e.value)==null?void 0:w.yesButton)==null?void 0:C.color,background:(k=(b=e.value)==null?void 0:b.yesButton)==null?void 0:k.bgColor}}),y=c.computed(()=>{var w,C,b,k;return{color:(C=(w=e.value)==null?void 0:w.noButton)==null?void 0:C.color,background:(k=(b=e.value)==null?void 0:b.noButton)==null?void 0:k.bgColor}}),f=c.computed(()=>{const w=i==null?void 0:i.getKey("sections.inside.activeSnippet.params.size"),C=i==null?void 0:i.getKey("sections.inside.params.size");return tn(w!=="undefined"?w:C)}),m=c.computed(()=>{const w=i==null?void 0:i.getKey("sections.inside.activeSnippet.headerChip.size");return tn(w)}),_=w=>{const C=(w.id||"").toLowerCase(),k=C==="confirm"||C==="yes"?g.value:y.value,z=i==null?void 0:i.getKey("sections.inside.activeSnippet.params.buttonStyle");return t(k,z)},S=c.computed(()=>i!=null&&i.getKey("settings.globalRoundingRadius")?jt(i,8):{borderRadius:(i==null?void 0:i.getKey("sections.inside.activeSnippet.element.borderRadius"))+"px"});return{containerBg:s,containerColor:n,sidePadding:r,verticalSpacing:o,headerChip:d,propertyColor:p,border:a,valueColor:h,yesButton:g,noButton:y,buttonStyle:_,getButtonStyle:t,actionBtnSizeClass:f,buttonRadiusStyle:S,chipSizeClass:m}}const Yl=["innerHTML"],Zl=c.defineComponent({__name:"DynamicSnippet",props:{structure:{},data:{},message:{},configDesignClass:{}},emits:["action"],setup(i,{emit:e}){const t=i,{containerBg:s,containerColor:n,headerChip:r,yesButton:o,noButton:a,actionBtnSizeClass:l,buttonRadiusStyle:u,verticalSpacing:d,sidePadding:p,valueColor:h,getButtonStyle:g,border:y,chipSizeClass:f}=ql(t.configDesignClass),m=c.computed(()=>{var k;return(k=t.configDesignClass)==null?void 0:k.getKey("sections.inside.activeSnippet.params.buttonStyle")}),_=c.computed(()=>{var k,z;return{background:s.value,color:n.value,"border-radius":(k=t.configDesignClass)!=null&&k.getKey("settings.globalRoundingRadius")?u.value.borderRadius:((z=t.configDesignClass)==null?void 0:z.getKey("sections.inside.activeSnippet.element.borderRadius"))+"px",border:y.value,padding:`${p.value}px`,gap:`${d.value}px`}}),S=c.computed(()=>{var k,z,x,v,A,N,V;return{container:{style:_.value},headerChip:{style:r.value,class:f.value},actionConfirm:{class:l.value,style:{...g(o.value,m.value),flex:"1","line-height":"1","border-radius":(k=t.configDesignClass)!=null&&k.getKey("settings.globalRoundingRadius")?u.value.borderRadius:((z=t.configDesignClass)==null?void 0:z.getKey("sections.inside.activeSnippet.yesButton.borderRadius"))+"px","font-size":((x=t.configDesignClass)==null?void 0:x.getKey("sections.inside.activeSnippet.yesButton.fontSize"))+"px"}},title:{style:{color:h.value,"font-size":((v=t.configDesignClass)==null?void 0:v.getKey("sections.inside.activeSnippet.element.fontSize"))+"px"}},actionCancel:{class:l.value,style:{...g(a.value,m.value),flex:"1","line-height":"1","border-radius":(A=t.configDesignClass)!=null&&A.getKey("settings.globalRoundingRadius")?u.value.borderRadius:((N=t.configDesignClass)==null?void 0:N.getKey("sections.inside.activeSnippet.yesButton.borderRadius"))+"px","font-size":((V=t.configDesignClass)==null?void 0:V.getKey("sections.inside.activeSnippet.yesButton.fontSize"))+"px"}}}}),w=e,C=c.computed(()=>new jl(t.structure).build(t.data).buildStyle(S.value).result()),b=k=>{var A;const z=k.target;if(!z)return;const x=z.closest("[data-cb]"),v=x==null?void 0:x.getAttribute("data-cb");v&&((A=t.message.snippet)!=null&&A.sequence)&&w("action",v,t.message.snippet.sequence)};return(k,z)=>(c.openBlock(),c.createElementBlock("div",{class:"tw:mt-1 tw:mb-1 tw:max-w-[65%]",onClick:b,innerHTML:C.value},null,8,Yl))}}),Xl=["innerHTML"],Ql=c.defineComponent({__name:"MessageList",props:{messages:{},isPreview:{type:Boolean},isEmbedded:{type:Boolean},showWelcome:{type:Boolean},sectionBorderRadius:{},isLoading:{type:Boolean},configDesignClass:{},activeMessage:{},traceLastShown:{type:Boolean}},emits:["handleClickMessage","handleSnippetAction"],setup(i,{emit:e}){const t=c.ref(null),s=i,n=e,r=p=>{p.meta&&n("handleClickMessage",p)};c.watch(s.messages,()=>{o()},{deep:!0});const o=()=>{c.nextTick(()=>{t.value&&(t.value.scrollTop=t.value.scrollHeight)})},a=p=>{const h=p.replace("#",""),g=parseInt(h.substr(0,2),16),y=parseInt(h.substr(2,2),16),f=parseInt(h.substr(4,2),16),m=Math.max(0,g-12),_=Math.max(0,y-12),S=Math.max(0,f-12);return`linear-gradient(180deg, rgba(${m}, ${_}, ${S}, 0.95) 0%, rgba(0,0,0, 0) 100%)`},l=c.computed(()=>{switch(s.configDesignClass.getKey("sections.inside.welcomeMessage.size")){case"sm":return"tw:px-1.5 tw:py-2.5";case"md":return"tw:px-3 tw:py-4";case"lg":return"tw:px-4.5 tw:py-5.5"}}),u=c.computed(()=>s.configDesignClass.getKey("sections.inside.welcomeMessage.bgType")==="gradient"?a(s.configDesignClass.getKey("sections.inside.welcomeMessage.bgColor")):s.configDesignClass.getKey("sections.inside.welcomeMessage.bgType")==="bubble"?s.configDesignClass.getKey("sections.inside.welcomeMessage.bgColor"):"transparent"),d=p=>s.configDesignClass.getKey("settings.globalRoundingRadius")?s.sectionBorderRadius.borderRadius:s.configDesignClass.getKey(p?"sections.inside.messageUser.borderRadius":"sections.inside.messageBot.borderRadius")+"px";return(p,h)=>(c.openBlock(),c.createElementBlock("ul",{class:"message-list tw:overflow-y-scroll tw:flex-1 tw:list-none tw:pb-4",ref_key:"messageListRef",ref:t},[p.showWelcome?(c.openBlock(),c.createElementBlock("li",{key:0,class:c.normalizeClass(["tw:text-"+(p.configDesignClass.getKey("sections.inside.params.size")==="sm"?"xs":p.configDesignClass.getKey("sections.inside.params.size")==="md"?"sm":"base")]),style:c.normalizeStyle({color:p.configDesignClass.getKey("sections.inside.messageUser.color"),"margin-bottom":`${p.configDesignClass.getKey("settings.gapMessageLine")}px`})},[c.createElementVNode("div",{key:"message",class:c.normalizeClass(l.value),style:c.normalizeStyle({borderRadius:p.configDesignClass.getKey("settings.globalRoundingRadius")?p.sectionBorderRadius.borderRadius:p.configDesignClass.getKey("sections.inside.welcomeMessage.borderRadius")+"px",color:p.configDesignClass.getKey("sections.inside.welcomeMessage.color"),background:u.value,lineHeight:p.configDesignClass.getKey("settings.lineHeight"),fontSize:p.configDesignClass.getKey("sections.inside.welcomeMessage.fontSize")+"px",letterSpacing:p.configDesignClass.getKey("settings.letterSpacing")+"px"})},[c.createElementVNode("div",{innerHTML:c.unref(Is)(p.configDesignClass.getKey("texts.welcomeMessage"))},null,8,Xl)],6)],6)):c.createCommentVNode("",!0),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(p.messages,(g,y)=>{var f;return c.openBlock(),c.createElementBlock(c.Fragment,{key:y},[g.snippet?(c.openBlock(),c.createBlock(Zl,{key:0,structure:c.unref(Gl),data:g.snippet.data,message:g,configDesignClass:p.configDesignClass,onAction:h[0]||(h[0]=(m,_)=>n("handleSnippetAction",m,_))},null,8,["structure","data","message","configDesignClass"])):(c.openBlock(),c.createBlock(c.resolveDynamicComponent(g.isUser?Dl:g.isSystem?Hl:Pl),{key:1,message:g,style:c.normalizeStyle({borderRadius:d(g.isUser),"margin-top":`${(f=p.messages[y-1])!=null&&f.isSystem&&!g.isSystem?"12px":"0px"}`,"margin-bottom":`${g.isSystem?"2px":p.configDesignClass.getKey("settings.gapMessageLine")+"px"}`,lineHeight:p.configDesignClass.getKey("settings.lineHeight"),letterSpacing:p.configDesignClass.getKey("settings.letterSpacing")+"px"}),color:g.isUser?p.configDesignClass.getKey("sections.inside.messageUser.color"):p.configDesignClass.getKey("sections.inside.messageBot.color"),welcomeColor:p.configDesignClass.getKey("sections.inside.messageUser.color"),bgType:g.isUser?p.configDesignClass.getKey("sections.inside.messageUser.bgType"):p.configDesignClass.getKey("sections.inside.messageBot.bgType"),bgColor:g.isUser?p.configDesignClass.getKey("sections.inside.messageUser.bgColor"):p.configDesignClass.getKey("sections.inside.messageBot.bgColor"),size:g.isUser?p.configDesignClass.getKey("sections.inside.messageUser.size"):p.configDesignClass.getKey("sections.inside.messageBot.size"),fontSize:g.isUser?p.configDesignClass.getKey("sections.inside.messageUser.fontSize"):p.configDesignClass.getKey("sections.inside.messageBot.fontSize"),borderWidth:g.isUser?p.configDesignClass.getKey("sections.inside.messageUser.borderWidth"):p.configDesignClass.getKey("sections.inside.messageBot.borderWidth"),borderColor:g.isUser?p.configDesignClass.getKey("sections.inside.messageUser.borderColor"):p.configDesignClass.getKey("sections.inside.messageBot.borderColor"),index:y,traceLastShown:p.traceLastShown,configDesignClass:p.configDesignClass,activeMessage:p.activeMessage===g,isLast:y===p.messages.length-1,onClick:m=>r(g)},null,8,["message","style","color","welcomeColor","bgType","bgColor","size","fontSize","borderWidth","borderColor","index","traceLastShown","configDesignClass","activeMessage","isLast","onClick"]))],64)}),128)),p.isLoading?(c.openBlock(),c.createBlock(Fl,{key:1,class:c.normalizeClass({"tw:mt-8":p.traceLastShown}),loader:p.configDesignClass.getKey("settings.loader"),configDesignClass:p.configDesignClass,text:p.configDesignClass.getKey("texts.typingLoader")},null,8,["class","loader","configDesignClass","text"])):c.createCommentVNode("",!0),c.renderSlot(p.$slots,"footer")],512))}}),Jl=c.defineComponent({__name:"ChatMessagesContainer",props:{messages:{},isPreview:{type:Boolean},isEmbedded:{type:Boolean},sectionBorderRadius:{},isLoading:{type:Boolean},configDesignClass:{},activeMessage:{},showWelcome:{type:Boolean},isProcessError:{type:Boolean},restartChat:{type:Function},traceLastShown:{type:Boolean}},emits:["handleClickMessage","update:activeMessage","handleSnippetAction"],setup(i,{emit:e}){const t=i,s=e,n=c.computed({get:()=>t.activeMessage,set:r=>s("update:activeMessage",r)});return(r,o)=>(c.openBlock(),c.createElementBlock("div",{class:"tw:flex tw:flex-col tw:justify-between tw:w-full tw:min-h-0",style:c.normalizeStyle({paddingLeft:(r.configDesignClass.getKey("sections.inside.params.sidePadding")??8)+"px",paddingRight:(r.configDesignClass.getKey("sections.inside.params.sidePadding")??8)+"px",paddingTop:(r.configDesignClass.getKey("sections.inside.params.verticalPadding")??8)/2+"px"})},[c.createVNode(Ql,{messages:r.messages,isPreview:r.isPreview,isEmbedded:r.isEmbedded,configDesignClass:r.configDesignClass,isLoading:r.isLoading,sectionBorderRadius:r.sectionBorderRadius,showWelcome:r.showWelcome,activeMessage:n.value,"onUpdate:activeMessage":o[0]||(o[0]=a=>n.value=a),traceLastShown:r.traceLastShown,onHandleClickMessage:o[1]||(o[1]=a=>r.$emit("handleClickMessage",a)),onHandleSnippetAction:o[2]||(o[2]=(a,l)=>s("handleSnippetAction",a,l))},null,8,["messages","isPreview","isEmbedded","configDesignClass","isLoading","sectionBorderRadius","showWelcome","activeMessage","traceLastShown"])],4))}}),ec={key:0,class:"chat tw:w-full tw:h-full tw:flex tw:pt-0 tw:relative",style:{overflow:"hidden"}},tc={key:0,class:"tw:w-full tw:h-full"},sc={key:1,class:"messages tw:flex tw:flex-col tw:justify-between tw:w-full"},Ft=0,nc=c.defineComponent({__name:"ChatWrapper",props:{link:{},isEmbedded:{type:Boolean},isPreview:{type:Boolean},configWidget:{},configLink:{},scenario:{},scenarioOptions:{},widgetId:{},isProduction:{type:Boolean}},emits:["trace"],setup(i,{expose:e,emit:t}){const s=t,n=c.ref(!1),r=c.ref(!1),o=c.ref(null),a=c.ref(!1),l=c.ref(!1),u=c.ref(!1),d=c.ref(!1),p=c.ref(!0),h=c.ref(!1),g=c.ref(!1),y=c.ref(!1),f=c.ref(0),m=i,_=async()=>{if(!(m.isPreview||m.scenario))try{Si(),await ns()}catch(T){console.error("Failed to restart chat connection",T)}},S=c.computed(()=>{const T=v.value.getKey("settings.position"),R=v.value.getKey("settings.offset.x"),P=v.value.getKey("settings.offset.y"),J=D.value?v.value.getKey("settings.size.width"):v.value.getKey("sections.colapsed.width"),ie=D.value?v.value.getKey("settings.size.height"):v.value.getKey("sections.colapsed.height");return{...{...T==="topLeft"?{top:P+"px",left:R+"px"}:{},...T==="topRight"?{top:P+"px",right:R+"px"}:{},...T==="bottomLeft"?{bottom:P+"px",left:R+"px"}:{},...T==="bottomRight"?{bottom:P+"px",right:R+"px"}:{},...T==="top"?{top:P+"px",left:"50%",transform:"translateX(-50%)"}:{},...T==="bottom"?{bottom:P+"px",left:"50%",transform:"translateX(-50%)"}:{},...T==="left"?{left:R+"px",top:"50%",transform:"translateY(-50%)"}:{},...T==="right"?{right:R+"px",top:"50%",transform:"translateY(-50%)"}:{}},width:D.value&&!ce.value?J+"px":void 0,height:D.value||ce.value?ie+"px":void 0}}),w=()=>{if(m.configLink)return m.configLink;const R=new URLSearchParams(window.location.search).get("config");if(R)return R},C=c.ref(null),b=c.ref(null),k=()=>w()?b.value:m.configWidget?m.configWidget:De,z=c.computed(()=>{const T=k(),{isValid:R,errors:P}=Ja(T);return R?T:(console.warn("[HSW] Invalid widget config, falling back to DEFAULT_CONFIG:",P),De)}),x=T=>{C.value=T,s("trace",T)},v=c.computed(()=>new el(z.value)),A=c.computed(()=>yr(v.value)),N=c.computed(()=>jt(v.value,8)),V=c.computed(()=>{switch(v.value.getKey("sections.bottom.params.size")){case"sm":return"tw:min-h-[25px]";case"md":return"tw:min-h-[45px]";case"lg":return"tw:min-h-[60px]"}}),D=c.ref(!0),G=()=>{const T=o.value;if(!T)return{width:56,height:56};const R=T.querySelector(".chat-action");if(!R)return{width:56,height:56};const P=R.getBoundingClientRect();return{width:Math.max(1,P.width),height:Math.max(1,P.height)}},U=()=>{const T=o.value;if(!T||!ce.value)return 390;const R=T.parentElement;return(R==null?void 0:R.clientWidth)||T.getBoundingClientRect().width||390},K=c.ref(!1),W=async T=>{if(K.value)return;K.value=!0;const R=o.value;if(R&&T!==D.value)if(T){const{height:P,width:J}=G();D.value=!0,await c.nextTick();const ie=R.scrollHeight,Ie=U(),it=Math.max(P||0,J||0)||56;Pe.killTweensOf(R),ce.value&&Pe.set(R,{position:"absolute",left:"50%",top:"50%",xPercent:-50,yPercent:-50}),Pe.set(R,{width:it,height:it,overflow:"hidden"}),Pe.to(R,{width:Ie,height:ie-5,duration:.4,ease:"power2.out",onComplete:()=>{Pe.set(R,{clearProps:"width,height,overflow,position,left,top,xPercent,yPercent,marginTop"}),K.value=!1}})}else{const{height:P}=G(),J=P+4,ie=R.getBoundingClientRect().height||R.scrollHeight,Ie=R.getBoundingClientRect().width||R.scrollWidth;Pe.killTweensOf(R),ce.value&&(console.log("preset position"),Pe.set(R,{position:"absolute",left:"50%",top:"50%",xPercent:-50,yPercent:-50}),console.log("set position")),Pe.set(R,{width:Ie,height:ie,overflow:"hidden"}),Pe.to(R,{width:J,height:J,duration:.35,marginTop:0,ease:"power2.inOut",onComplete:()=>{D.value=!1,Pe.set(R,{clearProps:"width,height,overflow,position,left,top,xPercent,yPercent,marginTop"}),K.value=!1}})}},M=c.ref(m.isPreview||!1),ce=c.ref(m.isEmbedded||!1),Oe=c.ref(!!m.isPreview),he=c.ref(m.widgetId||`hsw-${Math.random().toString(36).slice(2,10)}`),H=c.ref([]),j=c.ref("");let L=null,se=0;const ts=c.computed(()=>H.value.length>0&&H.value[H.value.length-1].isUser===!0||l.value),Q=c.ref(null),ss=(T,R)=>{console.log("handleSnippetAction",T,R),Sn({action:{sequence:R,command:T,data:{}}})},ae=T=>{var R;if(T.chunkId&&T.text){const P=H.value[H.value.length-1];P.chunkId===T.chunkId?((R=T.chunk)!=null&&R.start?P.text="":P.text+=T.text,P.chunk.start=!1):H.value.push(T)}else H.value.push(T)},Le=(()=>{if(m.link)return console.log("Using props.link:",m.link),m.link;const R=new URLSearchParams(window.location.search).get("link");if(R)return console.log("Using URL param link:",R),R;const J=new URLSearchParams(window.location.hash.substring(1)).get("link");if(J)return console.log("Using hash param link:",J),J;try{const ie="ws://localhost:8080/client/widget-chat/v1/ws/?token=8HAZQrKuBoF_IvLe6rwDJxuD6Qa8AU1qby3jf81SIHH0KLesxl9gCTslgyNl4l_Ac89tvlgQCiMscl-4gTcqqofaG5DV55XTcQS8JeJbHll_Dvg7s8zloPd5clHNITfGwz-YZgeWWRXxzCbknjmzEv3UWw";if(ie)return ie}catch(ie){console.warn("Environment variables not available:",ie)}return console.log("Using fallback link: ws://localhost:3000"),"ws://localhost:3000"})(),rt=()=>{if(se>=Ft){ae({text:`Failed to connect after ${Ft} attempts. Please check your connection.`,isUser:!1});return}se++,console.log(`Reconnection attempt ${se}/${Ft}`),setTimeout(()=>{_s()},2e3*se)},xi=()=>{ae({text:vi.UserMessage,isUser:!0}),ae({text:"{Agent response message}",isUser:!1})},_s=()=>{try{if(!Le||typeof Le!="string"){console.error("Invalid WebSocket link:",Le),ae({text:"Error: Invalid WebSocket URL",isUser:!1});return}if(console.log("Attempting to connect to:",Le),L=new WebSocket(Le),!L){console.error("Failed to create WebSocket instance");return}L.onmessage=T=>{var R,P,J,ie,Ie,it,Lt,Mn;try{const O=JSON.parse(T.data);if(O.snippet)return ae({snippet:{...O.snippet,data:JSON.parse(O.snippet.data||"{}")},isUser:!1,isSystem:!0,isError:!1});if(O.error)return ae({text:O.error.message,isUser:!1,isSystem:!0,isError:!0});if((R=O==null?void 0:O.textChunk)!=null&&R.start&&ae({text:"",isUser:!1,chunkId:(P=O==null?void 0:O.textChunk)==null?void 0:P.start,chunk:O==null?void 0:O.textChunk}),(J=O==null?void 0:O.textChunk)!=null&&J.end||(ie=O==null?void 0:O.textChunk)!=null&&ie.start)return;(Ie=O==null?void 0:O.textChunk)!=null&&Ie.text&&ae({text:O.textChunk.text,isUser:!1,chunkId:(it=O==null?void 0:O.textChunk)==null?void 0:it.id}),O!=null&&O.trace&&((Lt=O==null?void 0:O.trace)!=null&&Lt.meta&&!m.isProduction?ae({text:O.trace.message,isUser:!1,isSystem:!0,meta:O.trace.meta,time:O.trace.time,type:O.trace.type}):ae({text:O.trace.message,isUser:!1,isSystem:!0,time:O.trace.time,type:O.trace.type})),(Mn=O==null?void 0:O.trace)!=null&&Mn.meta&&!m.isProduction&&s("trace",O.trace)}catch(O){console.error("Error parsing WebSocket message:",O),ae({text:"Error: Failed to parse server response",isUser:!1})}},L.onopen=()=>{console.log("Connected to socket server:",Le),se=0},L.onclose=T=>{console.log("Connection closed",T);let R=`Connection closed (${T.code})`;switch(T.code){case 1e3:R="Connection closed normally";break;case 1001:R="Connection closed: going away";break;case 1006:if(d.value=!0,se<Ft&&!M.value){rt();return}break;case 1011:R="Connection closed: server error";break;default:u.value=!0}console.log(R)},L.onerror=T=>{console.error("WebSocket connection error:",T),a.value=!0,ae({text:"Connection error: Unable to connect to chat server",isUser:!1,isSystem:!0,isError:!0}),se<Ft&&!M.value&&rt()}}catch(T){console.error("Error connecting to socket server:",T),ae({text:`Connection error: ${T instanceof Error?T.message:"Unknown error"}`,isUser:!1,isSystem:!0,isError:!0})}},Si=()=>{L&&L.close(),L=null};c.onUnmounted(()=>{L&&L.close()});const ki=()=>{m.isPreview||m.scenario||W(!D.value)},Ti=()=>{m.isPreview||m.scenario||j.value.trim()!==""&&(H.value.push({text:j.value,isUser:!0}),Sn({message:j.value}),j.value="")},Sn=T=>{L&&L.send(JSON.stringify(T))},kn=()=>{try{const T=v.value.getKey("settings.fontFamily")||"MacPaw Fixel",R=`https://fonts.googleapis.com/css2?family=${T.replace(/\s+/g,"+")}:wght@300;400;500;600;700&display=swap`,P=document.createElement("link");P.rel="preload",P.as="style",P.href=R,document.head.appendChild(P);const J=document.createElement("link");J.rel="stylesheet",J.href=R,J.setAttribute("data-google-font","true"),document.head.appendChild(J),o.value&&(o.value.style.fontFamily=`"${T}", sans-serif`)}catch(T){console.error("Error loading font:",T)}},Tn=()=>{const T=v.value.getKey("settings.fontWeight")||400;o.value&&(o.value.style.fontWeight=T)};r.value=!0,c.watch(()=>v.value.getKey("settings.fontFamily"),()=>{kn()}),c.watch(()=>v.value.getKey("settings.fontWeight"),()=>{Tn()});const zi=async()=>{if(w()){const R=await(await fetch(w()+"config")).json();b.value=R,n.value=!0}else n.value=!0},vs=(T,R,P)=>new Promise(J=>{const ie=performance.now(),Ie=it=>{const Lt=Math.min(1,(it-ie)/P);f.value=T+(R-T)*Lt,Lt<1?requestAnimationFrame(Ie):J()};requestAnimationFrame(Ie)}),zn=async T=>{y.value=!0,f.value=0,await c.nextTick(),await vs(0,.3,500),T(),await vs(.3,.6,200),f.value=.6,await new Promise(R=>setTimeout(R,100)),await vs(.6,0,500),y.value=!1},Cs=async(T,R)=>{await zn(()=>{const P=nr.getState(T,v.value,R||m.scenarioOptions);if(D.value=P.isChatOpen,H.value=P.messages,l.value=P.traceLastShown,a.value=P.isConnectionError,u.value=P.isProcessError,d.value=P.isReconnectError,h.value=P.isInputDisabled,p.value=P.showWelcome,g.value=P.showReconnectNotice??!1,Q.value=P.snippet??null,M.value=!0,L){try{L.close()}catch{}L=null}})},ns=async()=>{await zn(()=>{M.value=Oe.value,p.value=!0,h.value=!1,g.value=!1,a.value=!1,u.value=!1,d.value=!1,H.value=[],M.value||(!L||L.readyState!==1)&&_s()})};c.onMounted(async()=>{await zi(),kn(),Tn();const T=m.scenario??nr.getScenarioFromUrl();if(T){await Cs(T);return}if(m.isPreview){xi();return}_s()}),c.watch(()=>m.scenario,async T=>{T?await Cs(T):await ns()});const Re={id:he,setScenario:async(T,R)=>{await Cs(T,R)},clearScenario:async()=>{await ns()},setOpen:T=>{D.value=T},setActive:T=>{T&&!D.value&&(D.value=!0)},setInputDisabled:T=>{h.value=T},setShowReconnectNotice:T=>{g.value=T},setMessages:T=>{H.value=Array.isArray(T)?T:[]},pushMessage:T=>{H.value.push(T)},setSnippet:T=>{Q.value=T??null},resetToLive:async()=>{await ns()}},Ri=()=>{const T=window;T.hswWidgets=T.hswWidgets||{},T.hswWidgets[he.value]=Re,window.dispatchEvent(new CustomEvent("hsw:ready",{detail:{widgetId:he.value}}))},Mi=()=>{const T=window;T.hswWidgets&&T.hswWidgets[he.value]&&delete T.hswWidgets[he.value]},Rn=async T=>{var ie;const R=T,P=(ie=R.detail)==null?void 0:ie.widgetId;if(P&&P!==he.value)return;const{action:J}=R.detail;switch(J){case"setScenario":await Re.setScenario(R.detail.payload.type,R.detail.payload.options);break;case"clearScenario":await Re.clearScenario();break;case"setOpen":Re.setOpen(R.detail.payload);break;case"setActive":Re.setActive(R.detail.payload);break;case"setInputDisabled":Re.setInputDisabled(R.detail.payload);break;case"setShowReconnectNotice":Re.setShowReconnectNotice(R.detail.payload);break;case"setMessages":Re.setMessages(R.detail.payload);break;case"pushMessage":Re.pushMessage(R.detail.payload);break;case"setSnippet":Re.setSnippet(R.detail.payload);break;case"resetToLive":await Re.resetToLive();break}};c.onMounted(()=>{Ri(),window.addEventListener("hsw:control",Rn)}),c.onUnmounted(()=>{Mi(),window.removeEventListener("hsw:control",Rn)}),e(Re);const Ei=c.computed(()=>{var T;return(T=m.configWidget)==null?void 0:T.texts});return console.log(Ei.value),(T,R)=>n.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["tw:z-[999] tw:flex tw:justify-end component-isolator",{"tw:fixed":!ce.value,"tw:w-full":D.value}]),style:c.normalizeStyle({letterSpacing:v.value.getKey("settings.letterSpacing")+"px",...S.value})},[D.value?c.withDirectives((c.openBlock(),c.createElementBlock("div",{key:1,ref_key:"chatWrapperRef",ref:o,class:c.normalizeClass(["chatWrapper tw:w-full tw:backdrop-blur-[22px] tw:flex tw:items-center tw:border-0 tw:flex-col",[{"tw:h-auto tw:shadow-2xl chat-active":D.value,"tw:shadow-lg tw:w-fit":!D.value,"chat-embedded tw:w-full tw:h-full tw:static tw:top-0 tw:left-0":ce.value}]]),style:c.normalizeStyle({background:v.value.getKey("settings.bgChat"),borderRadius:`${String(A.value)}px`})},[c.createVNode(ul,{isChatOpen:D.value,toggleChat:ki,configDesignClass:v.value,sectionBorderRadius:N.value,isPreview:M.value,isEmbedded:ce.value,restartChat:_},null,8,["isChatOpen","configDesignClass","sectionBorderRadius","isPreview","isEmbedded"]),D.value?(c.openBlock(),c.createElementBlock("div",ec,[a.value?(c.openBlock(),c.createElementBlock("div",tc,[c.createElementVNode("div",{class:"tw:absolute tw:left-0 tw:top-0 tw:w-full tw:h-full",style:c.normalizeStyle({padding:v.value.getKey("sections.warnings.launchIssue.content.sidePadding")+"px"})},[c.createVNode(Vs,{type:"launchIssue",class:"tw:h-full",headlineText:v.value.getKey("texts.launchIssueTitle"),descriptionText:v.value.getKeyObject("texts.launchIssueText"),warningElement:v.value.getKeyObject("sections.warnings.launchIssue"),configDesignClass:v.value,isProcessError:u.value,restartChat:_},null,8,["headlineText","descriptionText","warningElement","configDesignClass","isProcessError"])],4)])):(c.openBlock(),c.createElementBlock("div",sc,[c.createVNode(Jl,{messages:H.value,isPreview:M.value,isEmbedded:ce.value,configDesignClass:v.value,isLoading:ts.value,sectionBorderRadius:N.value,showWelcome:p.value,activeMessage:C.value,"onUpdate:activeMessage":R[0]||(R[0]=P=>C.value=P),isProcessError:u.value,snippet:Q.value,traceLastShown:l.value,onHandleClickMessage:x,onHandleSnippetAction:ss,restartChat:_},null,8,["messages","isPreview","isEmbedded","configDesignClass","isLoading","sectionBorderRadius","showWelcome","activeMessage","isProcessError","snippet","traceLastShown"]),u.value?(c.openBlock(),c.createElementBlock("div",{key:0,style:c.normalizeStyle({padding:v.value.getKey("sections.warnings.connectionIssue.content.sidePadding")+"px"})},[c.createVNode(Vs,{type:"connectionIssue",headlineText:v.value.getKey("texts.issueText"),configDesignClass:v.value,warningElement:v.value.getKeyObject("sections.warnings.connectionIssue"),restartChat:_},null,8,["headlineText","configDesignClass","warningElement"])],4)):(c.openBlock(),c.createBlock(wl,{key:1,messageText:j.value,"onUpdate:messageText":R[1]||(R[1]=P=>j.value=P),configDesignClass:v.value,sectionBorderRadius:N.value,classSize:V.value,sendMessage:Ti,isInputDisabled:h.value,showReconnectNotice:g.value,restartChat:_},null,8,["messageText","configDesignClass","sectionBorderRadius","classSize","isInputDisabled","showReconnectNotice"]))]))])):c.createCommentVNode("",!0),c.createVNode(c.Transition,{name:"fade"},{default:c.withCtx(()=>[y.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:"tw:absolute tw:inset-0 tw:backdrop-blur-[40px] tw:z-[1000]",style:c.normalizeStyle({borderRadius:`${String(A.value)}px`,backgroundColor:`rgba(0,0,0, ${f.value})`})},null,4)):c.createCommentVNode("",!0)]),_:1})],6)),[[c.vShow,r.value]]):(c.openBlock(),c.createBlock(ja,{key:0,element:v.value.getKeyObject("sections.colapsed")},null,8,["element"]))],6)):c.createCommentVNode("",!0)}});exports.ChatWrapper=nc;exports.cn=nn;
|
|
26
|
+
</svg>`,color:"#FFF"}}}},loader:{typingLoader:{color:"#8E8E8F",bgColor:"#2F2F31"},completeStep:{verticalSpacing:8,fontSize:12,color:"#8E8E8F",icon:{showIcon:!0,src:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity="0.4" d="M7.99967 14.6666C11.6816 14.6666 14.6663 11.6818 14.6663 7.99992C14.6663 4.31802 11.6816 1.33325 7.99967 1.33325C4.31778 1.33325 1.33301 4.31802 1.33301 7.99992C1.33301 11.6818 4.31778 14.6666 7.99967 14.6666Z" fill="currentColor"></path><path d="M7.05297 10.3867C6.91964 10.3867 6.79297 10.3334 6.69964 10.2401L4.81297 8.3534C4.61964 8.16007 4.61964 7.84007 4.81297 7.64673C5.0063 7.4534 5.3263 7.4534 5.51964 7.64673L7.05297 9.18007L10.4796 5.7534C10.673 5.56007 10.993 5.56007 11.1863 5.7534C11.3796 5.94673 11.3796 6.26673 11.1863 6.46006L7.4063 10.2401C7.31297 10.3334 7.1863 10.3867 7.05297 10.3867Z" fill="currentColor"></path></svg>',color:"#8E8E8F",size:16}},activeStep:{fontSize:12,color:"#FFF",icon:{showIcon:!0,src:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 4.02667C2.56667 5.08667 2 6.48 2 8C2 11.3133 4.68667 14 8 14C11.3133 14 14 11.3133 14 8C14 4.68667 11.3133 2 8 2C7.52667 2 7.06667 2.05333 6.62667 2.16" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/></svg>',color:"#fff",size:16}}},top:{params:{size:"md",bgColor:"#5E4AC6",bgStyle:"gradient",paddingVertical:8,paddingHorizontal:8,chipStyle:"filled",buttonStyle:"filled"},chipWidgetTitle:{color:"#fff",bgColor:"#5E4AC6",borderRadius:12,showType:"both"},buttons:{color:"#BBBBBD",bgColor:"#2F2F31",borderRadius:12,showType:"both"}},inside:{params:{size:"md",sidePadding:8,verticalPadding:8},welcomeMessage:{color:"#fff",bgType:"gradient",fontSize:14,size:"md",borderRadius:12,borderWidth:1,bgColor:"#595959"},messageUser:{color:"#F9F8F8",bgColor:"#F8F8F933",bgType:"bubble",borderRadius:12,fontSize:14,size:"md",borderWidth:1,borderColor:"#595959"},messageBot:{color:"#fff",bgColor:"#5E4AC6",bgType:"plain",borderRadius:12,fontSize:14,size:"md",borderWidth:1,borderColor:"#595959"},activeSnippet:{params:{buttonType:"both",buttonStyle:"filled",size:"md"},element:{color:"#fff",bgColor:"#373739",borderRadius:12,borderWidth:1,borderColor:"#595959",verticalSpacing:8,sidePadding:8,fontSize:12},headerChip:{color:"#fff",bgColor:"#69696A",borderRadius:12,size:"md",fontSize:12,bgType:"filled"},propertyColor:"rgba(255, 255, 255, 0.30)",valueColor:"#fff",yesButton:{color:"#fff",bgColor:"#12A150",borderRadius:12,fontSize:12},noButton:{color:"#fff",bgColor:"#C20E4D",borderRadius:12,fontSize:12}}},bottom:{params:{size:"md",disclaimerShow:!1},inputSend:{size:"md",color:"#EEECEC",bgColor:"#373739",borderColor:"#595959",borderWidth:1,inputStyle:"inside",bgType:"plain",paddingVertical:8,paddingHorizontal:8,sidePadding:8,fontSize:12,borderRadius:8},btnSend:{color:"#1E1E1E",bgColor:"rgba(255, 255, 255, 0.50)",showType:"both",borderWidth:1,borderColor:"#595959",borderRadius:50,size:"md",fontSize:12,icon:{showIcon:!0,src:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9 2.56445C9.01973 2.56449 9.03453 2.57164 9.04395 2.58105L13.5967 7.13379C13.606 7.14324 13.6133 7.15811 13.6133 7.17773C13.6132 7.19738 13.606 7.21226 13.5967 7.22168L13.5898 7.22754L13.584 7.23438C13.5865 7.23164 13.5864 7.23284 13.5801 7.23535C13.5732 7.23801 13.5633 7.24018 13.5527 7.24023C13.5431 7.24023 13.5351 7.23862 13.5293 7.23633C13.524 7.23419 13.5171 7.22992 13.5088 7.22168L9 2.71289L4.49121 7.22168C4.48176 7.23107 4.46699 7.23828 4.44727 7.23828C4.42752 7.23826 4.41275 7.23109 4.40332 7.22168C4.3939 7.21226 4.38676 7.19747 4.38672 7.17773C4.38672 7.15801 4.39393 7.14324 4.40332 7.13379L8.95605 2.58105C8.9655 2.57167 8.98027 2.56445 9 2.56445Z" stroke="currentColor"/><path d="M9 2.68994C9.01306 2.68994 9.02868 2.69518 9.04297 2.70947C9.05726 2.72376 9.0625 2.73938 9.0625 2.75244V15.3745C9.0625 15.3875 9.0571 15.4032 9.04297 15.4175C9.02868 15.4318 9.01306 15.437 9 15.437C8.98694 15.437 8.97132 15.4318 8.95703 15.4175C8.9429 15.4032 8.9375 15.3875 8.9375 15.3745V2.75244C8.9375 2.73938 8.94274 2.72376 8.95703 2.70947C8.97132 2.69518 8.98694 2.68994 9 2.68994Z" fill="currentColor" stroke="currentColor"/></svg>',color:"#fff",size:18}},disclaimer:{color:"#fff",bgColor:"#FF0000",height:20,fontSize:12}}}};class qt{canApply(e){return e.fromVersion===this.appliesTo.from&&e.toVersion===this.appliesTo.to}rollback(e){return{success:!1,errors:[`Rollback not implemented for strategy: ${this.name}`],warnings:[],modified:!1}}createSuccessResult(e,t=[]){return{success:!0,data:e,errors:[],warnings:t,modified:!0}}createErrorResult(e,t){return{success:!1,data:t,errors:e,warnings:[],modified:!1}}}class Zl extends qt{constructor(){super(...arguments),this.name="AddSettingsFieldsV1toV2",this.description="Добавляет новые поля loader, buttonStyle, buttonType в settings",this.appliesTo={from:"1.0",to:"2.0"}}apply(e){try{const t={...e.config},s=[],n={...t.settings,loader:Fe.settings.loader};return s.push(`Добавлены поля loader: '${n.loader}'`),this.createSuccessResult({...t,settings:n},s)}catch(t){return this.createErrorResult([`Ошибка при добавлении полей settings: ${t}`])}}}class Yl extends qt{constructor(){super(...arguments),this.name="AddChipStyleV1toV2",this.description="Добавляет поле chipStyle в sections.top.params",this.appliesTo={from:"1.0",to:"2.0"}}apply(e){try{const t={...e.config},s=[];return t.sections.top.params={...t.sections.top.params,chipStyle:Fe.sections.top.params.chipStyle},s.push(`Добавлено поле chipStyle: '${Fe.sections.top.params.chipStyle}' в sections.top.params`),this.createSuccessResult(t,s)}catch(t){return this.createErrorResult([`Ошибка при добавлении chipStyle: ${t}`])}}}class Xl extends qt{constructor(){super(...arguments),this.name="AddMessageBgTypeV1toV2",this.description="Добавляет поле bgType в messageUser и messageBot",this.appliesTo={from:"1.0",to:"2.0"}}apply(e){try{const t={...e.config},s=[];return t.sections.inside.messageUser={...t.sections.inside.messageUser,bgType:Fe.sections.inside.messageUser.bgType},t.sections.inside.messageBot={...t.sections.inside.messageBot,bgType:Fe.sections.inside.messageBot.bgType},s.push("Добавлены поля bgType для messageUser и messageBot"),this.createSuccessResult(t,s)}catch(t){return this.createErrorResult([`Ошибка при добавлении bgType для сообщений: ${t}`])}}}class Ql extends qt{constructor(){super(...arguments),this.name="AddActionButtonsV1toV2",this.description="Добавляет кнопки aprooveButton и rejectButton в inside секцию",this.appliesTo={from:"1.0",to:"2.0"}}apply(e){try{const t={...e.config},s=[];return t.sections.inside={...t.sections.inside},s.push("Добавлены кнопки aprooveButton и rejectButton"),this.createSuccessResult(t,s)}catch(t){return this.createErrorResult([`Ошибка при добавлении кнопок действий: ${t}`])}}}class Jl extends qt{constructor(){super(...arguments),this.name="EnhanceInputSendV1toV2",this.description="Добавляет borderStyle, inputStyle, bgType в inputSend",this.appliesTo={from:"1.0",to:"2.0"}}apply(e){try{const t={...e.config},s=[];return t.sections.bottom.inputSend={...t.sections.bottom.inputSend,borderStyle:{borderColor:Fe.sections.bottom.inputSend.borderColor,borderWidth:Fe.sections.bottom.inputSend.borderWidth},inputStyle:Fe.sections.bottom.inputSend.inputStyle,bgType:Fe.sections.bottom.inputSend.bgType},s.push("Расширен inputSend с новыми полями borderStyle, inputStyle, bgType"),this.createSuccessResult(t,s)}catch(t){return this.createErrorResult([`Ошибка при расширении inputSend: ${t}`])}}}class ec extends qt{constructor(){super(...arguments),this.name="AddBottomElementsV1toV2",this.description="Добавляет warningAlert и disclaimer в bottom секцию",this.appliesTo={from:"1.0",to:"2.0"}}apply(e){try{const t={...e.config},s=[];return t.sections.bottom={...t.sections.bottom},s.push("Добавлены warningAlert и disclaimer в bottom секцию"),this.createSuccessResult(t,s)}catch(t){return this.createErrorResult([`Ошибка при добавлении элементов bottom: ${t}`])}}}new Zl,new Yl,new Xl,new Ql,new Jl,new ec;const je=r=>typeof r=="string"&&r.length>=0,Kr=r=>typeof r=="number"&&!Number.isNaN(r),Qt=(r,e)=>typeof r=="string"&&e.includes(r);function tc(r){var u,d,f,g,h,m,p;const e=[];if(!r||typeof r!="object")return{isValid:!1,errors:["config: must be an object"]};const t=r.settings||{};Kr(t.letterSpacing)||t.letterSpacing===void 0||e.push("settings.letterSpacing: number"),je(t.bgChat)||t.bgChat===void 0||e.push("settings.bgChat: string"),je(t.fontFamily)||t.fontFamily===void 0||e.push("settings.fontFamily: string"),Kr(t.fontWeight)||t.fontWeight===void 0||e.push("settings.fontWeight: number"),t.logo===void 0||je(t.logo)||e.push("settings.logo: string (svg or url)"),t.widgetTitle===void 0||je(t.widgetTitle)||e.push("settings.widgetTitle: string"),t.position===void 0&&e.push("settings.position: undefined");const s=r.texts||{};s.launchIssueTitle===void 0||je(s.launchIssueTitle)||e.push("texts.launchIssueTitle: string"),s.issueText===void 0||je(s.issueText)||e.push("texts.issueText: string"),s.widgetTitle===void 0||je(s.widgetTitle)||e.push("texts.widgetTitle: string"),s.hideText===void 0||je(s.hideText)||e.push("texts.hideText: string");const n=((u=r.sections)==null?void 0:u.top)||{},i=n.params||{};i.size===void 0||Qt(i.size,["sm","md","lg"])||e.push("sections.top.params.size: sm|md|lg"),i.chipStyle===void 0||Qt(i.chipStyle,["filled","outlined","invisible"])||e.push("sections.top.params.chipStyle: filled|outlined|invisible"),i.buttonStyle===void 0||Qt(i.buttonStyle,["filled","outlined","invisible"])||e.push("sections.top.params.buttonStyle: filled|outlined|invisible"),i.buttonType===void 0||Qt(i.buttonType,["icon","text","both"])||e.push("sections.top.params.buttonType: icon|text|both"),((d=n==null?void 0:n.chipWidgetTitle)==null?void 0:d.color)===void 0||je((f=n==null?void 0:n.chipWidgetTitle)==null?void 0:f.color)||e.push("sections.top.chipWidgetTitle.color: string"),((g=n==null?void 0:n.chipWidgetTitle)==null?void 0:g.bgColor)===void 0||je((h=n==null?void 0:n.chipWidgetTitle)==null?void 0:h.bgColor)||e.push("sections.top.chipWidgetTitle.bgColor: string"),(n==null?void 0:n.btnClose)===void 0||typeof(n==null?void 0:n.btnClose)=="object"||e.push("sections.top.btnClose: object");const a=(((m=r.sections)==null?void 0:m.bottom)||{}).params||{};a.size===void 0||Qt(a.size,["sm","md","lg"])||e.push("sections.bottom.params.size: sm|md|lg");const l=((p=r.sections)==null?void 0:p.warnings)||{};return l.launchIssue===void 0||typeof l.launchIssue=="object"||e.push("sections.warnings.launchIssue: object"),l.connectionIssue===void 0||typeof l.connectionIssue=="object"||e.push("sections.warnings.connectionIssue: object"),{isValid:e.length===0,errors:e}}class sc{constructor(e){O(this,"config");this.config=e}getFlatRecursiveConfig(e,t="",s={}){for(const n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;const i=e[n],o=t?`${t}.${n}`:n;i!==null&&typeof i=="object"&&!Array.isArray(i)?this.getFlatRecursiveConfig(i,o,s):s[o]=i}return s}get configFlat(){return this.getFlatRecursiveConfig(this.config)}getConfig(){return this.config}getKey(e){return this.configFlat[e]??void 0}getKeyObject(e){return e.split(".").reduce((t,s)=>t&&t[s]!==void 0?t[s]:"undefined",this.config)}}const Tn={sm:"tw:h-[20px] tw:px-1.5 tw:py-0 tw:[font-size:10px] [&_svg]:tw:size-4",md:"tw:h-[24px] tw:px-2 tw:py-1 tw:text-xs [&_svg]:tw:size-4.5",lg:"tw:h-[28px] tw:px-3 tw:py-1 tw:text-sm [&_svg]:tw:size-5"};function zn(r){return r==="sm"||r==="md"||r==="lg"?Tn[r]:Tn.md}function Xn(r,e){try{const s={top:"sections.top.params.size",inside:"sections.inside.params.size",bottom:"sections.bottom.params.size"}[e],n=r==null?void 0:r.getKey(s);return zn(n)}catch{return Tn.md}}const nc=["aria-expanded"],rc=["innerHTML"],ic=["src","alt"],oc={key:2},ac={key:0,class:"tw:flex tw:items-center tw:w-full tw:justify-end tw:gap-1.5 header-buttons"},lc=["width","height"],cc={key:1},uc=["width","height"],dc={key:1},pc=c.defineComponent({__name:"ChatHeader",props:{isChatOpen:{type:Boolean},toggleChat:{type:Function},configDesignClass:{},sectionBorderRadius:{},mainBorderRadius:{},isPreview:{type:Boolean},isEmbedded:{type:Boolean},restartChat:{type:Function}},setup(r){const e=r,t=c.computed(()=>e.configDesignClass.getKeyObject("sections.top.params")),s=c.computed(()=>Xn(e.configDesignClass,"top")),n=c.computed(()=>{let p="";switch(t.value.bgStyle){case"gradient":p=`linear-gradient(180deg, ${t.value.bgColor} 0%, ${e.configDesignClass.getKey("settings.bgChat")} 100%)`;break;case"filled":p=t.value.bgColor;break;case"invisible":p="transparent";break;default:p="transparent";break}return{borderTopLeftRadius:`${e.mainBorderRadius}px`,borderTopRightRadius:`${e.mainBorderRadius}px`,background:p,padding:`${t.value.paddingVertical}px ${t.value.paddingHorizontal}px`}}),i=c.computed(()=>{const p=e.configDesignClass.getKey("texts.widgetTitle"),b=e.configDesignClass.getKey("settings.widgetTitle");return p&&p!=="undefined"?p:b&&b!=="undefined"?b:""}),o=c.computed(()=>e.configDesignClass.getKey("sections.top.chipWidgetTitle.showType")),a=c.computed(()=>{const p=e.configDesignClass.getKey("sections.top.params.chipStyle"),b=e.configDesignClass.getKey("sections.top.chipWidgetTitle.color"),k=e.configDesignClass.getKey("sections.top.chipWidgetTitle.bgColor"),v=p==="outlined",y=p==="filled",_=p==="invisible";return{borderRadius:e.configDesignClass.getKey("settings.globalRoundingRadius")?e.sectionBorderRadius.borderRadius:e.configDesignClass.getKey("sections.top.chipWidgetTitle.borderRadius")+"px",color:b,border:v?`1px solid ${k}`:"none",padding:_?"0px":null,"background-color":y?k:"transparent"}}),l=c.computed(()=>e.configDesignClass.getKey("sections.top.buttons.showType")),u=c.computed(()=>{const p=e.configDesignClass.getKey("sections.top.buttons.showType");return p&&p!=="undefined"?p:"icon"}),d=c.computed(()=>{const p=e.configDesignClass.getKeyObject("sections.top.buttons");return{color:(p==null?void 0:p.color)??"#fff",bgColor:(p==null?void 0:p.bgColor)??"#000"}}),f=c.computed(()=>{const p=e.configDesignClass.getKey("sections.top.params.buttonStyle"),b=p==="outlined",k=p==="invisible",v=d.value;return{borderRadius:e.configDesignClass.getKey("settings.globalRoundingRadius")?e.sectionBorderRadius.borderRadius:e.configDesignClass.getKey("sections.top.buttons.borderRadius")+"px",color:v.color,border:b?`1px solid ${v.bgColor}`:"none",padding:k?"0px":null,"background-color":k?"transparent":p==="filled"?v.bgColor:"transparent"}}),g=c.computed(()=>{const p=e.configDesignClass.getKey("texts.hideText");return p&&p!=="undefined"?p:"Hide"}),h=c.computed(()=>e.configDesignClass.getKey("settings.logo").includes("<svg")),m=c.computed(()=>e.configDesignClass.getKey("settings.logo"));return(p,b)=>(c.openBlock(),c.createElementBlock("div",{onClick:b[0]||(b[0]=(...k)=>p.toggleChat&&p.toggleChat(...k)),class:"chat-action tw:transition-all tw:cursor-pointer tw:flex tw:items-center tw:w-full tw:justify-start tw:overflow-hidden",style:c.normalizeStyle(n.value),role:"button","aria-expanded":p.isChatOpen},[c.createVNode(c.unref(it),{class:c.normalizeClass(["tw:transition-all tw:flex tw:items-center tw:shadow-none header-title",s.value]),variant:o.value,size:p.configDesignClass.getKey("sections.top.params.size"),style:c.normalizeStyle(a.value),type:"button","aria-label":i.value,title:i.value},{default:c.withCtx(()=>[h.value&&p.configDesignClass.getKey("sections.top.chipWidgetTitle.showType")!=="text"?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["header-logo",p.configDesignClass.getKey("sections.top.params.size")]),innerHTML:m.value},null,10,rc)):m.value&&p.configDesignClass.getKey("sections.top.chipWidgetTitle.showType")!=="text"?(c.openBlock(),c.createElementBlock("img",{key:1,src:m.value,alt:p.configDesignClass.getKey("sections.top.iconWidget.alt"),class:c.normalizeClass(p.configDesignClass.getKey("sections.top.params.size")==="sm"?"tw:w-3 tw:h-3":"tw:w-4 tw:h-4")},null,10,ic)):c.createCommentVNode("",!0),p.configDesignClass.getKey("sections.top.chipWidgetTitle.showType")!=="icon"?(c.openBlock(),c.createElementBlock("span",oc,c.toDisplayString(i.value),1)):c.createCommentVNode("",!0)]),_:1},8,["class","variant","size","style","aria-label","title"]),p.isChatOpen?(c.openBlock(),c.createElementBlock("div",ac,[c.createVNode(c.unref(it),{variant:l.value,class:c.normalizeClass(["tw:transition-all",[s.value]]),size:p.configDesignClass.getKey("sections.top.params.size"),style:c.normalizeStyle(f.value),type:"button","aria-label":g.value,title:g.value,onClick:c.withModifiers(p.restartChat,["stop"])},{default:c.withCtx(()=>[u.value!=="text"?(c.openBlock(),c.createElementBlock("svg",{key:0,width:p.configDesignClass.getKey("sections.top.params.size")==="sm"?"12":"16",height:p.configDesignClass.getKey("sections.top.params.size")==="sm"?"12":"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},b[1]||(b[1]=[c.createElementVNode("path",{d:"M10.7935 1.33333H5.20683C2.78016 1.33333 1.3335 2.77999 1.3335 5.20666V10.7867C1.3335 13.22 2.78016 14.6667 5.20683 14.6667H10.7868C13.2135 14.6667 14.6602 13.22 14.6602 10.7933V5.20666C14.6668 2.77999 13.2202 1.33333 10.7935 1.33333ZM8.00016 12.1667C6.80683 12.1667 5.8735 11.5733 5.24016 10.9867V11.46C5.24016 11.7333 5.0135 11.96 4.74016 11.96C4.46683 11.96 4.24016 11.7333 4.24016 11.46V9.62666C4.24016 9.35333 4.46683 9.12666 4.74016 9.12666H6.3935C6.66683 9.12666 6.8935 9.35333 6.8935 9.62666C6.8935 9.89999 6.66683 10.1267 6.3935 10.1267H5.7935C6.28683 10.62 7.0535 11.1667 8.00016 11.1667C9.74683 11.1667 11.1668 9.74666 11.1668 8C11.1668 7.72666 11.3935 7.5 11.6668 7.5C11.9402 7.5 12.1668 7.72666 12.1668 8C12.1668 10.3 10.3002 12.1667 8.00016 12.1667ZM12.1668 6.35999C12.1668 6.37999 12.1668 6.39999 12.1668 6.41333C12.1602 6.48666 12.1402 6.55333 12.1068 6.61333C12.0735 6.67333 12.0268 6.72666 11.9668 6.77333C11.9202 6.80666 11.8668 6.83333 11.8068 6.85333C11.7602 6.86666 11.7135 6.87333 11.6668 6.87333H10.0468C9.7735 6.87333 9.54683 6.64666 9.54683 6.37333C9.54683 6.1 9.7735 5.87333 10.0468 5.87333H10.6002C10.0668 5.38 9.20683 4.83333 8.0135 4.83333C6.26683 4.83333 4.84683 6.25333 4.84683 8C4.84683 8.27333 4.62016 8.5 4.34683 8.5C4.0735 8.5 3.8335 8.27333 3.8335 8C3.8335 5.7 5.70016 3.83333 8.00016 3.83333C9.4335 3.83333 10.4868 4.45333 11.1668 5.04666V4.53999C11.1668 4.26666 11.3935 4.03999 11.6668 4.03999C11.9402 4.03999 12.1668 4.26666 12.1668 4.53999V6.35999Z",fill:"currentColor"},null,-1)]),8,lc)):c.createCommentVNode("",!0),u.value!=="icon"?(c.openBlock(),c.createElementBlock("span",cc," Restart ")):c.createCommentVNode("",!0)]),_:1},8,["variant","class","size","style","aria-label","title","onClick"]),c.createVNode(c.unref(it),{variant:l.value,class:c.normalizeClass(["tw:transition-all",[s.value]]),size:p.configDesignClass.getKey("sections.top.params.size"),style:c.normalizeStyle(f.value),type:"button","aria-label":g.value,title:g.value,onClick:c.withModifiers(p.toggleChat,["stop"])},{default:c.withCtx(()=>[u.value!=="text"?(c.openBlock(),c.createElementBlock("svg",{key:0,width:p.configDesignClass.getKey("sections.top.params.size")==="sm"?"12":"16",height:p.configDesignClass.getKey("sections.top.params.size")==="sm"?"12":"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},b[2]||(b[2]=[c.createElementVNode("path",{d:"M10.7935 1.33337H5.20683C2.78016 1.33337 1.3335 2.78004 1.3335 5.20671V10.7867C1.3335 13.22 2.78016 14.6667 5.20683 14.6667H10.7868C13.2135 14.6667 14.6602 13.22 14.6602 10.7934V5.20671C14.6668 2.78004 13.2202 1.33337 10.7935 1.33337ZM12.3335 10.9334C12.3335 11.9334 11.9335 12.3334 10.9335 12.3334H8.40016C7.40016 12.3334 7.00016 11.9334 7.00016 10.9334V9.73337C7.00016 8.73337 7.40016 8.33337 8.40016 8.33337H10.9335C11.9335 8.33337 12.3335 8.73337 12.3335 9.73337V10.9334Z",fill:"currentColor"},null,-1)]),8,uc)):c.createCommentVNode("",!0),u.value!=="icon"?(c.openBlock(),c.createElementBlock("span",dc,c.toDisplayString(g.value),1)):c.createCommentVNode("",!0)]),_:1},8,["variant","class","size","style","aria-label","title","onClick"])])):c.createCommentVNode("",!0)],12,nc))}});typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const hc=r=>typeof r<"u";function fc(r){return JSON.parse(JSON.stringify(r))}function ho(r,e,t,s={}){var n,i,o;const{clone:a=!1,passive:l=!1,eventName:u,deep:d=!1,defaultValue:f,shouldEmit:g}=s,h=c.getCurrentInstance(),m=t||(h==null?void 0:h.emit)||((n=h==null?void 0:h.$emit)==null?void 0:n.bind(h))||((o=(i=h==null?void 0:h.proxy)==null?void 0:i.$emit)==null?void 0:o.bind(h==null?void 0:h.proxy));let p=u;e||(e="modelValue"),p=p||`update:${e.toString()}`;const b=y=>a?typeof a=="function"?a(y):fc(y):y,k=()=>hc(r[e])?b(r[e]):f,v=y=>{g?g(y)&&m(p,y):m(p,y)};if(l){const y=k(),_=c.ref(y);let w=!1;return c.watch(()=>r[e],C=>{w||(w=!0,_.value=b(C),c.nextTick(()=>w=!1))}),c.watch(_,C=>{!w&&(C!==r[e]||d)&&v(C)},{deep:d}),_}else return c.computed({get(){return k()},set(y){v(y)}})}const gc=c.defineComponent({__name:"Textarea",props:{class:{},defaultValue:{},modelValue:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=ho(t,"modelValue",e,{passive:!0,defaultValue:t.defaultValue});return(i,o)=>c.withDirectives((c.openBlock(),c.createElementBlock("textarea",{"onUpdate:modelValue":o[0]||(o[0]=a=>c.isRef(n)?n.value=a:null),style:{resize:"none"},"data-slot":"textarea",class:c.normalizeClass(c.unref(Pn)("tw:md:text-sm",t.class))},null,2)),[[c.vModelText,c.unref(n)]])}});function mc(r){var y;const e=()=>c.unref(r.transcribeUrl),t=c.ref(!1),s=c.ref(!1),n=c.ref(!0),i=c.ref(null),o=c.ref(0);let a=null,l=[],u=null,d=null;const f=r.maxDuration;(typeof navigator>"u"||!((y=navigator.mediaDevices)!=null&&y.getUserMedia))&&(n.value=!1);const g=()=>{const _=["audio/webm;codecs=opus","audio/webm","audio/mp4","audio/ogg;codecs=opus","audio/ogg"];for(const w of _)if(MediaRecorder.isTypeSupported(w))return w;return"audio/webm"},h=async()=>{var _;if(!(!n.value||t.value))try{i.value=null,l=[],o.value=0,u=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,sampleRate:16e3}});const w=g();a=new MediaRecorder(u,{mimeType:w}),a.ondataavailable=C=>{C.data.size>0&&l.push(C.data)},a.onstop=async()=>{d&&(clearInterval(d),d=null);const C=new Blob(l,{type:w});u&&(u.getTracks().forEach(T=>T.stop()),u=null),await b(C)},a.onerror=()=>{i.value="Recording error",m()},a.start(250),t.value=!0,d=setInterval(()=>{o.value++,o.value>=f&&m()},1e3)}catch(w){w.name==="NotAllowedError"?i.value="Microphone access denied":w.name==="NotFoundError"?i.value="No microphone found":i.value=w.message||"Failed to start recording",i.value&&((_=r.onError)==null||_.call(r,i.value))}},m=()=>{a&&t.value&&(a.stop(),t.value=!1)},p=()=>{t.value?m():h()},b=async _=>{var C,T,x;s.value=!0,i.value=null;const w=e();if(!w){i.value="Transcribe URL not configured",(C=r.onError)==null||C.call(r,i.value),s.value=!1;return}try{const z=new FormData;z.append("audio",_,"recording.webm");const D=await fetch(w,{method:"POST",body:z});if(!D.ok)throw new Error(`HTTP ${D.status}`);const K=await D.json();if(K.success&&K.text)(T=r.onTranscript)==null||T.call(r,K.text);else throw new Error(K.error||"Transcription failed")}catch(z){i.value=z.message||"Transcription failed",i.value&&((x=r.onError)==null||x.call(r,i.value))}finally{s.value=!1}},k=c.computed(()=>{const _=Math.floor(o.value/60),w=o.value%60;return`${_}:${w.toString().padStart(2,"0")}`}),v=c.computed(()=>t.value||s.value);return{isRecording:t,isTranscribing:s,isSupported:n,isBusy:v,error:i,recordingDuration:o,formattedDuration:k,startRecording:h,stopRecording:m,toggleRecording:p}}const wc={key:0,class:"tw:transition-all tw:w-full"},bc={key:0,width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},yc={key:1,width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},vc={key:2,width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",class:"tw:animate-spin"},kc={key:3,class:"tw:absolute tw:-top-6 tw:left-1/2 tw:-translate-x-1/2 tw:text-xs tw:text-white tw:bg-red-500 tw:px-2 tw:py-0.5 tw:rounded-full tw:whitespace-nowrap"},_c={key:0,class:"svg-icon"},Cc=["innerHTML"],xc={key:1},Sc=c.defineComponent({__name:"ChatBottom",props:{isProduction:{type:Boolean},configDesignClass:{},messageText:{},sendMessage:{type:Function},sectionBorderRadius:{},classSize:{},isInputDisabled:{type:Boolean},showReconnectNotice:{type:Boolean},restartChat:{type:Function},isStreaming:{type:Boolean},transcribeUrl:{}},emits:["update:messageText","trace"],setup(r,{emit:e}){const t=r,s=c.computed(()=>{var w;return t.transcribeUrl||((w=t.configDesignClass)==null?void 0:w.getKey("settings.transcribeUrl"))||""}),n=c.computed(()=>!!s.value),{isRecording:i,isTranscribing:o,isSupported:a,formattedDuration:l,toggleRecording:u}=mc({transcribeUrl:s,maxDuration:60,onTranscript:w=>{g.value=w},onError:w=>{console.error("Voice recording error:",w)}}),d=()=>{t.sendMessage()},g=ho(t,"messageText",e,{passive:!0}),h=c.computed(()=>{var w;return((w=t.configDesignClass)==null?void 0:w.getKey("sections.bottom.inputSend.inputStyle"))==="stacked"}),m=c.computed(()=>Xn(t.configDesignClass,"bottom")),p=c.computed(()=>{const w=t.configDesignClass.getKey("texts.topWarningText");return w&&w!=="undefined"?w:""}),b=c.computed(()=>{const w=t.configDesignClass.getKey("texts.disableInputText");return w&&w!=="undefined"?w:""}),k=c.computed(()=>t.configDesignClass.getKey("sections.bottom.inputSend.size")),v=c.computed(()=>t.isInputDisabled&&b.value?b.value:p.value||t.configDesignClass.getKey("texts.reconnectText")||"Reconnecting..."),y=c.computed(()=>t.configDesignClass.getKey("sections.bottom.btnSend.icon.showIcon")?t.configDesignClass.getKey("sections.bottom.btnSend.icon.src"):null),_=c.computed(()=>{const w=t.configDesignClass.getKey("texts.disclaimerText"),C=t.configDesignClass.getKey("texts.disclaimer"),T=w&&w!=="undefined"?w:C,z=!!t.configDesignClass.getKey("sections.bottom.params.disclaimerShow");return T&&T!=="undefined"&&z?T:""});return c.onMounted(()=>{console.log("ChatBottom mounted"),console.log(t),console.log(n,a)}),(w,C)=>(c.openBlock(),c.createElementBlock("div",null,[w.isProduction?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",{key:0,class:"tw:flex tw:flex-row tw:gap-2",style:c.normalizeStyle({padding:h.value?"0":"0 "+w.configDesignClass.getKey("sections.bottom.inputSend.sidePadding")+"px"})},[c.createVNode(c.unref(it),{type:"button",style:c.normalizeStyle({backgroundColor:"#27272A",borderRadius:w.configDesignClass.getKey("settings.globalRoundingRadius")?w.sectionBorderRadius.borderRadius:w.configDesignClass.getKey("sections.bottom.inputSend.borderRadius")+"px"}),class:"tw:flex-shrink-1 tw:flex-grow-1","aria-label":"Copy last message",title:"Copy last message",onClick:C[0]||(C[0]=c.withModifiers(T=>w.$emit("trace",{action:"copyLast"}),["stop"]))},{default:c.withCtx(()=>C[3]||(C[3]=[c.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[c.createElementVNode("path",{opacity:"0.4",d:"M17.5 5.83464V14.168C17.5 16.668 16.25 18.3346 13.3333 18.3346H7.5C8.50833 17.5763 9.16667 16.3596 9.16667 15.0013C9.16667 12.7013 7.3 10.8346 5 10.8346C4.05833 10.8346 3.19167 11.143 2.5 11.668V5.83464C2.5 3.33464 3.75 1.66797 6.66667 1.66797H13.3333C16.25 1.66797 17.5 3.33464 17.5 5.83464Z",fill:"white"}),c.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.084 3.125C12.4292 3.125 12.709 3.40482 12.709 3.75V5.41667C12.709 5.98816 13.1792 6.45833 13.7507 6.45833H15.4173C15.7625 6.45833 16.0423 6.73816 16.0423 7.08333C16.0423 7.42851 15.7625 7.70833 15.4173 7.70833H13.7507C12.4888 7.70833 11.459 6.67851 11.459 5.41667V3.75C11.459 3.40482 11.7388 3.125 12.084 3.125Z",fill:"white"}),c.createElementVNode("path",{d:"M5.00065 10.832C2.70065 10.832 0.833984 12.6987 0.833984 14.9987C0.833984 17.2987 2.70065 19.1654 5.00065 19.1654C7.30065 19.1654 9.16732 17.2987 9.16732 14.9987C9.16732 12.6987 7.30065 10.832 5.00065 10.832ZM4.30065 16.057C4.50899 16.2654 4.50899 16.607 4.30065 16.8237C4.19232 16.932 4.05899 16.982 3.91733 16.982C3.77566 16.982 3.64231 16.932 3.53398 16.8237L2.09233 15.382C1.88399 15.1737 1.88399 14.832 2.09233 14.6153L3.53398 13.1737C3.74231 12.9654 4.08399 12.9654 4.30065 13.1737C4.50899 13.382 4.50899 13.7237 4.30065 13.9403L3.24233 14.9987L4.30065 16.057ZM7.90066 15.382L6.45898 16.8237C6.35065 16.932 6.21733 16.982 6.07566 16.982C5.93399 16.982 5.80064 16.932 5.69231 16.8237C5.48397 16.6154 5.48397 16.2737 5.69231 16.057L6.75066 14.9987L5.69231 13.9403C5.48397 13.732 5.48397 13.3904 5.69231 13.1737C5.90064 12.9654 6.24232 12.9654 6.45898 13.1737L7.90066 14.6153C8.10899 14.832 8.10899 15.1654 7.90066 15.382Z",fill:"white"})],-1),c.createTextVNode(" Log last function call ")])),_:1,__:[3]},8,["style"]),c.createVNode(c.unref(it),{type:"button",class:"tw:flex-shrink-1 tw:flex-grow-1",style:c.normalizeStyle({backgroundColor:"#27272A",borderRadius:w.configDesignClass.getKey("settings.globalRoundingRadius")?w.sectionBorderRadius.borderRadius:w.configDesignClass.getKey("sections.bottom.inputSend.borderRadius")+"px"}),"aria-label":"Copy all",title:"Copy all",onClick:C[1]||(C[1]=c.withModifiers(T=>w.$emit("trace",{action:"copyAll"}),["stop"]))},{default:c.withCtx(()=>C[4]||(C[4]=[c.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[c.createElementVNode("path",{opacity:"0.4",d:"M17.5 5.83464V14.168C17.5 16.668 16.25 18.3346 13.3333 18.3346H6.66667C3.75 18.3346 2.5 16.668 2.5 14.168V5.83464C2.5 3.33464 3.75 1.66797 6.66667 1.66797H13.3333C16.25 1.66797 17.5 3.33464 17.5 5.83464Z",fill:"white"}),c.createElementVNode("path",{d:"M15.4173 7.70833H13.7507C12.484 7.70833 11.459 6.68333 11.459 5.41667V3.75C11.459 3.40833 11.7423 3.125 12.084 3.125C12.4257 3.125 12.709 3.40833 12.709 3.75V5.41667C12.709 5.99167 13.1757 6.45833 13.7507 6.45833H15.4173C15.759 6.45833 16.0423 6.74167 16.0423 7.08333C16.0423 7.425 15.759 7.70833 15.4173 7.70833Z",fill:"white"}),c.createElementVNode("path",{d:"M8.33255 14.7922C8.17422 14.7922 8.01589 14.7339 7.89089 14.6089L6.22422 12.9422C5.98255 12.7006 5.98255 12.3005 6.22422 12.0589L7.89089 10.3922C8.13255 10.1505 8.53255 10.1505 8.77422 10.3922C9.01588 10.6339 9.01588 11.0339 8.77422 11.2756L7.54922 12.5005L8.77422 13.7255C9.01588 13.9672 9.01588 14.3672 8.77422 14.6089C8.64922 14.7339 8.49088 14.7922 8.33255 14.7922Z",fill:"white"}),c.createElementVNode("path",{d:"M11.6659 14.7922C11.5076 14.7922 11.3492 14.7339 11.2242 14.6089C10.9826 14.3672 10.9826 13.9672 11.2242 13.7255L12.4492 12.5005L11.2242 11.2756C10.9826 11.0339 10.9826 10.6339 11.2242 10.3922C11.4659 10.1505 11.8659 10.1505 12.1076 10.3922L13.7742 12.0589C14.0159 12.3005 14.0159 12.7006 13.7742 12.9422L12.1076 14.6089C11.9826 14.7339 11.8242 14.7922 11.6659 14.7922Z",fill:"white"})],-1),c.createTextVNode(" Log all function calls ")])),_:1,__:[4]},8,["style"])],4)),c.createElementVNode("div",{class:"tw:transition-all tw:flex tw:flex-col tw:items-center tw:relative tw:mt-2",style:c.normalizeStyle({padding:h.value?"0":"0 "+w.configDesignClass.getKey("sections.bottom.inputSend.sidePadding")+"px"})},[w.showReconnectNotice||p.value||w.isInputDisabled?(c.openBlock(),c.createElementBlock("div",wc,[c.createVNode(un,{class:"tw:rounded-b-none tw:mx-0 tw:flex tw:justify-center tw:item s-center tw:px-2 tw:py-2",type:"reconnecting",configDesignClass:w.configDesignClass,headlineText:v.value,restartChat:w.restartChat,warningElement:w.isInputDisabled?w.configDesignClass.getKeyObject("sections.warnings.disableInputIssue"):w.configDesignClass.getKeyObject("sections.warnings.reconnectIssue")},null,8,["configDesignClass","headlineText","restartChat","warningElement"])])):c.createCommentVNode("",!0),c.createElementVNode("div",{class:c.normalizeClass(["message-input tw:transition-all tw:flex-1 tw:w-full tw:p-0 tw:gap-[10px] tw:flex",[w.classSize,h.value?"tw:flex-col tw:items-stretch tw:justify-between":" tw:items-end",k.value==="sm"?"tw:items-center":""]]),style:c.normalizeStyle({...h.value?{borderRadius:w.configDesignClass.getKey("settings.globalRoundingRadius")?w.sectionBorderRadius.borderRadius:w.configDesignClass.getKey("sections.bottom.inputSend.borderRadius")+"px",borderTopLeftRadius:"0px",borderTopRightRadius:"0px"}:{borderRadius:w.configDesignClass.getKey("settings.globalRoundingRadius")?w.sectionBorderRadius.borderRadius:w.configDesignClass.getKey("sections.bottom.inputSend.borderRadius")+"px"},"background-color":w.configDesignClass.getKey("sections.bottom.inputSend.bgColor"),"margin-bottom":h.value?"0px":w.configDesignClass.getKey("sections.bottom.inputSend.sidePadding")+"px",border:h.value?"none":`${w.configDesignClass.getKey("sections.bottom.inputSend.borderWidth")}px solid ${w.configDesignClass.getKey("sections.bottom.inputSend.borderColor")}`})},[(c.openBlock(),c.createBlock(c.unref(gc),{class:c.normalizeClass(["tw:transition-all",["tw:w-full tw:outline-none tw:border-0 focus:tw:outline-none",h.value?"tw:h-auto rounded-none":"h-full"]]),placeholder:w.configDesignClass.getKey("texts.inputPlaceholder")||"Type question",rows:k.value==="sm"?1:k.value==="md"?2:3,key:w.configDesignClass.getKey("sections.bottom.inputSend.color"),modelValue:c.unref(g),"onUpdate:modelValue":C[2]||(C[2]=T=>c.isRef(g)?g.value=T:null),onKeyup:c.withKeys(c.withModifiers(d,["exact"]),["enter"]),style:c.normalizeStyle({color:w.configDesignClass.getKey("sections.bottom.inputSend.color"),fontSize:w.configDesignClass.getKey("sections.bottom.inputSend.fontSize")+"px",lineHeight:w.configDesignClass.getKey("settings.lineHeight"),padding:w.configDesignClass.getKey("sections.bottom.inputSend.paddingVertical")+"px "+w.configDesignClass.getKey("sections.bottom.inputSend.paddingHorizontal")+"px",height:w.configDesignClass.getKey("sections.bottom.inputSend.height")+"px"})},null,8,["placeholder","rows","modelValue","onKeyup","class","style"])),c.createElementVNode("div",{class:c.normalizeClass(h.value?"tw:flex tw:flex-row-reverse tw:justify-between tw:items-center tw:gap-2 tw:pl-3":"tw:flex tw:ml-auto tw:items-center tw:gap-2"),style:c.normalizeStyle({marginBottom:w.configDesignClass.getKey("sections.bottom.inputSend.paddingVertical")+"px",marginRight:w.configDesignClass.getKey("sections.bottom.inputSend.paddingHorizontal")+"px"})},[n.value&&c.unref(a)?(c.openBlock(),c.createBlock(c.unref(it),{key:0,type:"button",class:c.normalizeClass(["btn-voice tw:relative tw:flex-shrink-0 tw:rounded-full tw:p-2 tw:transition-all tw:duration-200",c.unref(i)?"tw:bg-red-500 voice-recording":"tw:bg-white/10 hover:tw:bg-white/20",{"tw:opacity-50 tw:cursor-not-allowed":c.unref(o)||w.isInputDisabled}]),style:c.normalizeStyle({color:c.unref(i)?"#fff":w.configDesignClass.getKey("sections.bottom.inputSend.color")||"#fff"}),disabled:c.unref(o)||w.isInputDisabled,onClick:c.unref(u),title:c.unref(i)?"Stop recording":"Start voice input"},{default:c.withCtx(()=>[!c.unref(i)&&!c.unref(o)?(c.openBlock(),c.createElementBlock("svg",bc,C[5]||(C[5]=[c.createElementVNode("path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"},null,-1),c.createElementVNode("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"},null,-1),c.createElementVNode("line",{x1:"12",x2:"12",y1:"19",y2:"22"},null,-1)]))):c.unref(i)?(c.openBlock(),c.createElementBlock("svg",yc,C[6]||(C[6]=[c.createElementVNode("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"},null,-1)]))):(c.openBlock(),c.createElementBlock("svg",vc,C[7]||(C[7]=[c.createElementVNode("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"2",opacity:"0.25"},null,-1),c.createElementVNode("path",{d:"M12 2a10 10 0 0 1 10 10",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},null,-1)]))),c.unref(i)?(c.openBlock(),c.createElementBlock("span",kc,c.toDisplayString(c.unref(l)),1)):c.createCommentVNode("",!0)]),_:1},8,["class","style","disabled","onClick","title"])):c.createCommentVNode("",!0),c.createVNode(c.unref(it),{class:c.normalizeClass(["tw:transition-all",["btn-send tw:bg-transparent tw:shadow-none tw:flex-shrink-0 tw:items-center tw:gap-1",w.configDesignClass.getKey("sections.bottom.btnSend.showType")==="icon"?"tw:rounded-full":m.value,h.value?"tw:self-end":"tw:ml-auto",{"tw:opacity-50":c.unref(g).trim()===""||w.isInputDisabled},{"tw:px-3 tw:py-2":w.configDesignClass.getKey("sections.bottom.btnSend.size")==="md"},{"tw:px-2 tw:py-1":w.configDesignClass.getKey("sections.bottom.btnSend.size")==="sm"},{"tw:px-4 tw:py-3":w.configDesignClass.getKey("sections.bottom.btnSend.size")==="lg"}]]),size:w.configDesignClass.getKey("sections.bottom.btnSend.showType")==="icon"?"icon":w.configDesignClass.getKey("sections.bottom.params.size"),onClick:d,style:c.normalizeStyle({...w.configDesignClass.getKey("sections.bottom.btnSend.type")==="icon"?{borderRadius:w.configDesignClass.getKey("settings.globalRoundingRadius")?w.sectionBorderRadius.borderRadius:w.configDesignClass.getKey("sections.bottom.btnSend.borderRadius")+"px"}:{borderRadius:w.configDesignClass.getKey("settings.globalRoundingRadius")?w.sectionBorderRadius.borderRadius:w.configDesignClass.getKey("sections.bottom.btnSend.borderRadius")+"px"},color:w.configDesignClass.getKey("sections.bottom.btnSend.color"),"background-color":w.configDesignClass.getKey("sections.bottom.btnSend.bgColor"),fontSize:w.configDesignClass.getKey("sections.bottom.btnSend.fontSize")+"px",border:w.configDesignClass.getKey("sections.bottom.btnSend.borderWidth")+"px solid "+w.configDesignClass.getKey("sections.bottom.btnSend.borderColor")}),disabled:w.isInputDisabled},{default:c.withCtx(()=>[y.value?(c.openBlock(),c.createElementBlock("div",_c,[c.createElementVNode("div",{innerHTML:y.value,style:c.normalizeStyle({color:w.configDesignClass.getKey("sections.bottom.btnSend.color"),width:w.configDesignClass.getKey("sections.bottom.btnSend.icon.size")+"px",height:w.configDesignClass.getKey("sections.bottom.btnSend.icon.size")+"px"})},null,12,Cc)])):c.createCommentVNode("",!0),w.configDesignClass.getKey("sections.bottom.btnSend.showType")==="text"||w.configDesignClass.getKey("sections.bottom.btnSend.showType")==="both"?(c.openBlock(),c.createElementBlock("span",xc,c.toDisplayString(w.configDesignClass.getKey("texts.sendButton")),1)):c.createCommentVNode("",!0)]),_:1},8,["size","class","style","disabled"]),h.value&&_.value?(c.openBlock(),c.createElementBlock("div",{key:1,class:"tw:text-[11px] tw:text-white/50 tw:flex tw:items-center",style:c.normalizeStyle({...w.sectionBorderRadius,fontSize:w.configDesignClass.getKey("sections.bottom.disclaimer.fontSize")+"px",height:w.configDesignClass.getKey("sections.bottom.disclaimer.height")+"px",color:w.configDesignClass.getKey("sections.bottom.disclaimer.color")})},c.toDisplayString(_.value),5)):c.createCommentVNode("",!0)],6)],6),!h.value&&_.value?(c.openBlock(),c.createElementBlock("div",{key:1,class:"tw:px-2 tw:text-white/50 tw:mb-2 tw:flex tw:items-center tw:justify-center",style:c.normalizeStyle({...w.sectionBorderRadius,fontSize:w.configDesignClass.getKey("sections.bottom.disclaimer.fontSize")+"px",height:w.configDesignClass.getKey("sections.bottom.disclaimer.height")+"px",color:w.configDesignClass.getKey("sections.bottom.disclaimer.color")})},c.toDisplayString(_.value),5)):c.createCommentVNode("",!0)],4)]))}});var ne=(r=>(r.Collapsed="collapsed",r.EmptyChat="empty",r.Messages="messages",r.ActionSnippet="action_snippet",r.LaunchIssue="launch_issue",r.ConnectionIssue="connection_issue",r.ReconnectingAttempt="reconnecting_attempt",r.InputBlocked="input_blocked",r.ActionLoader="action_loader",r.TracesMessage="traces_message",r.TracesWithMeta="traces_with_meta",r))(ne||{}),fo=(r=>(r.UserMessage="Give me some action",r))(fo||{});class Ue{base(e){return{isChatOpen:!0,isChatActive:!0,messages:[],isConnectionError:!1,isProcessError:!1,isReconnectError:!1,isInputDisabled:!1,showWelcome:!1,blockSocket:!0,traceLastShown:!1,...e}}}class Tc extends Ue{constructor(){super(...arguments);O(this,"type",ne.Collapsed)}getState(){return this.base({isChatOpen:!1})}}class Nr extends Ue{constructor(){super(...arguments);O(this,"type",ne.EmptyChat)}getState(){return this.base({showWelcome:!0,messages:[]})}}class zc extends Ue{constructor(){super(...arguments);O(this,"type",ne.Messages)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action",i=(s==null?void 0:s.botMessageText)??"What sort of action do you want?";return this.base({showWelcome:!0,messages:[{text:n,isUser:!0},{text:i,isUser:!1},{text:"Sort of action",isUser:!0}]})}}class Rc extends Ue{constructor(){super(...arguments);O(this,"type",ne.ActionSnippet)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action";return this.base({showWelcome:!1,messages:[{text:n,isUser:!0},{snippet:{sequence:"38952101547613990",id:"38496103561174822",data:{actionCancel:{text:"Cancel"},actionConfirm:{text:"Confirm"},title:{text:"Do you really want to get the available contacts list?"}}},isUser:!1}]})}}class Ec extends Ue{constructor(){super(...arguments);O(this,"type",ne.LaunchIssue)}getState(){return this.base({isConnectionError:!0})}}class Mc extends Ue{constructor(){super(...arguments);O(this,"type",ne.ConnectionIssue)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action",i=!0,o=(s==null?void 0:s.traceSteps)??["Step One","Step Two","Step three"];return this.base({isProcessError:!0,showWelcome:i,messages:[{text:n,isUser:!0},{text:o[0],isUser:!1,isSystem:!0,type:"trace"},{text:o[1],isUser:!1,isSystem:!0,type:"trace"},{text:o[2],isUser:!1,isSystem:!0,type:"trace"}]})}}class Bc extends Ue{constructor(){super(...arguments);O(this,"type",ne.ReconnectingAttempt)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action",i=!0,o=(s==null?void 0:s.traceSteps)??["Step One","Step Two","Step three"];return this.base({isReconnectError:!0,showReconnectNotice:!0,showWelcome:i,messages:[{text:n,isUser:!0},{text:o[0],isUser:!1,isSystem:!0,type:"trace"},{text:o[1],isUser:!1,isSystem:!0,type:"trace"},{text:o[2],isUser:!1,isSystem:!0,type:"trace"}]})}}class Pc extends Ue{constructor(){super(...arguments);O(this,"type",ne.InputBlocked)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action",i=!0,o=(s==null?void 0:s.traceSteps)??["Step One","Step Two","Step three"];return this.base({isReconnectError:!0,showReconnectNotice:!0,isInputDisabled:!0,showWelcome:i,messages:[{text:n,isUser:!0},{text:o[0],isUser:!1,isSystem:!0,type:"trace"},{text:o[1],isUser:!1,isSystem:!0,type:"trace"},{text:o[2],isUser:!1,isSystem:!0,type:"trace"}]})}}class Ac extends Ue{constructor(){super(...arguments);O(this,"type",ne.ActionLoader)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action";return this.base({showWelcome:!0,messages:[{text:n,isUser:!0}]})}}class Dc extends Ue{constructor(){super(...arguments);O(this,"type",ne.TracesMessage)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action",i=(s==null?void 0:s.traceSteps)??["Step One","Step Two","Step three"],o=[{text:n,isUser:!0},{text:i[0],isUser:!1,isSystem:!0,type:"trace"},{text:i[1],isUser:!1,isSystem:!0,type:"trace"},{text:i[2],isUser:!1,isSystem:!0,type:"trace"}];return this.base({showWelcome:!0,messages:o})}}class Lc extends Ue{constructor(){super(...arguments);O(this,"type",ne.TracesWithMeta)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action",i=(s==null?void 0:s.traceSteps)??["Step One","API Schema Requested","API Call Conducted","API Call Conducted"],o=[{text:n,isUser:!0},{text:i[0],isUser:!1,isSystem:!0,type:"trace",meta:{step:1}},{text:i[1],isUser:!1,isSystem:!0,type:"trace",meta:{step:2,json:{status:"requested",endpoint:"/v1/schema"}}},{text:i[2],isUser:!1,isSystem:!0,type:"trace",meta:{step:3,json:{status:"ok",code:200}}},{text:i[3],isUser:!1,isSystem:!0,type:"trace"}];return this.base({showWelcome:!0,messages:o})}}class Ic{static create(e){switch(e){case ne.Collapsed:case"collapsed":return new Tc;case ne.EmptyChat:case"empty":return new Nr;case ne.Messages:case"messages":return new zc;case ne.ActionSnippet:case"action_snippet":return new Rc;case ne.LaunchIssue:case"launch_issue":return new Ec;case ne.ConnectionIssue:case"connection_issue":return new Mc;case ne.ReconnectingAttempt:case"reconnecting_attempt":return new Bc;case ne.InputBlocked:case"input_blocked":return new Pc;case ne.ActionLoader:case"action_loader":return new Ac;case ne.TracesMessage:case"traces_message":return new Dc;case ne.TracesWithMeta:case"traces_with_meta":return new Lc;default:return new Nr}}}class Fr{static getScenarioFromUrl(){try{return new URLSearchParams(window.location.search).get("scenario")??void 0}catch{return}}static getState(e,t,s){return{...Ic.create(e).getState(t,s),...s??{}}}}function Oc(r){const e=c.ref(!1),t=c.ref(!1),s=c.ref(null);let n=null,i=null;const o=()=>c.unref(r.ttsUrl),a=()=>{n&&(n.pause(),n.src="",n=null),i&&(URL.revokeObjectURL(i),i=null)},l=async h=>{const m=o();if(!m)throw s.value="TTS URL not configured",new Error(s.value);if(!(h!=null&&h.trim()))throw s.value="No text to speak",new Error(s.value);f(),t.value=!0,s.value=null;try{const p=await fetch(m,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:h.trim(),voice:r.voice||"nova"})});if(!p.ok){const k=await p.json().catch(()=>({}));throw new Error(k.error||`TTS request failed: ${p.status}`)}const b=await p.blob();return i=URL.createObjectURL(b),new Promise((k,v)=>{n=new Audio(i),n.onplay=()=>{e.value=!0,t.value=!1},n.onended=()=>{e.value=!1,a(),k()},n.onerror=()=>{e.value=!1,t.value=!1,s.value="Audio playback failed",a(),v(s.value)},n.play().catch(y=>{t.value=!1,s.value=y.message,v(y)})})}catch(p){throw t.value=!1,s.value=p.message||"TTS failed",p}},u=()=>{n&&e.value&&(n.pause(),e.value=!1)},d=()=>{n&&!e.value&&(n.play(),e.value=!0)},f=()=>{e.value=!1,t.value=!1,a()},g=h=>{e.value?u():n&&n.paused&&n.currentTime>0?d():h&&l(h)};return c.onUnmounted(()=>{f()}),{isSpeaking:e,isLoading:t,error:s,speak:l,pause:u,resume:d,stop:f,toggle:g}}const $c="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cpolygon%20points='11%205%206%209%202%209%202%2015%206%2015%2011%2019%2011%205'/%3e%3cpath%20d='M15.54%208.46a5%205%200%200%201%200%207.07'/%3e%3cpath%20d='M19.07%204.93a10%2010%200%200%201%200%2014.14'/%3e%3c/svg%3e",Vc="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cpolygon%20points='11%205%206%209%202%209%202%2015%206%2015%2011%2019%2011%205'/%3e%3cline%20x1='22'%20y1='9'%20x2='16'%20y2='15'/%3e%3cline%20x1='16'%20y1='9'%20x2='22'%20y2='15'/%3e%3c/svg%3e";function Qn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Mt=Qn();function go(r){Mt=r}var ls={exec:()=>null};function H(r,e=""){let t=typeof r=="string"?r:r.source,s={replace:(n,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(be.caret,"$1"),t=t.replace(n,o),s},getRegex:()=>new RegExp(t,e)};return s}var Kc=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),be={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},Nc=/^(?:[ \t]*(?:\n|$))+/,Fc=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Uc=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,bs=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Wc=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Jn=/(?:[*+-]|\d{1,9}[.)])/,mo=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,wo=H(mo).replace(/bull/g,Jn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Hc=H(mo).replace(/bull/g,Jn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),er=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,jc=/^[^\n]+/,tr=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,qc=H(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",tr).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Gc=H(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Jn).getRegex(),Fs="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",sr=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Zc=H("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",sr).replace("tag",Fs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),bo=H(er).replace("hr",bs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Fs).getRegex(),Yc=H(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",bo).getRegex(),nr={blockquote:Yc,code:Fc,def:qc,fences:Uc,heading:Wc,hr:bs,html:Zc,lheading:wo,list:Gc,newline:Nc,paragraph:bo,table:ls,text:jc},Ur=H("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",bs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Fs).getRegex(),Xc={...nr,lheading:Hc,table:Ur,paragraph:H(er).replace("hr",bs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ur).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Fs).getRegex()},Qc={...nr,html:H(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",sr).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ls,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:H(er).replace("hr",bs).replace("heading",` *#{1,6} *[^
|
|
27
|
+
]`).replace("lheading",wo).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Jc=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,eu=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,yo=/^( {2,}|\\)\n(?!\s*$)/,tu=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Us=/[\p{P}\p{S}]/u,rr=/[\s\p{P}\p{S}]/u,vo=/[^\s\p{P}\p{S}]/u,su=H(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,rr).getRegex(),ko=/(?!~)[\p{P}\p{S}]/u,nu=/(?!~)[\s\p{P}\p{S}]/u,ru=/(?:[^\s\p{P}\p{S}]|~)/u,iu=H(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Kc?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),_o=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ou=H(_o,"u").replace(/punct/g,Us).getRegex(),au=H(_o,"u").replace(/punct/g,ko).getRegex(),Co="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",lu=H(Co,"gu").replace(/notPunctSpace/g,vo).replace(/punctSpace/g,rr).replace(/punct/g,Us).getRegex(),cu=H(Co,"gu").replace(/notPunctSpace/g,ru).replace(/punctSpace/g,nu).replace(/punct/g,ko).getRegex(),uu=H("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,vo).replace(/punctSpace/g,rr).replace(/punct/g,Us).getRegex(),du=H(/\\(punct)/,"gu").replace(/punct/g,Us).getRegex(),pu=H(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),hu=H(sr).replace("(?:-->|$)","-->").getRegex(),fu=H("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",hu).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Is=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,gu=H(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Is).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),xo=H(/^!?\[(label)\]\[(ref)\]/).replace("label",Is).replace("ref",tr).getRegex(),So=H(/^!?\[(ref)\](?:\[\])?/).replace("ref",tr).getRegex(),mu=H("reflink|nolink(?!\\()","g").replace("reflink",xo).replace("nolink",So).getRegex(),Wr=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ir={_backpedal:ls,anyPunctuation:du,autolink:pu,blockSkip:iu,br:yo,code:eu,del:ls,emStrongLDelim:ou,emStrongRDelimAst:lu,emStrongRDelimUnd:uu,escape:Jc,link:gu,nolink:So,punctuation:su,reflink:xo,reflinkSearch:mu,tag:fu,text:tu,url:ls},wu={...ir,link:H(/^!?\[(label)\]\((.*?)\)/).replace("label",Is).getRegex(),reflink:H(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Is).getRegex()},Rn={...ir,emStrongRDelimAst:cu,emStrongLDelim:au,url:H(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Wr).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:H(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Wr).getRegex()},bu={...Rn,br:H(yo).replace("{2,}","*").getRegex(),text:H(Rn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},xs={normal:nr,gfm:Xc,pedantic:Qc},Jt={normal:ir,gfm:Rn,breaks:bu,pedantic:wu},yu={"&":"&","<":"<",">":">",'"':""","'":"'"},Hr=r=>yu[r];function st(r,e){if(e){if(be.escapeTest.test(r))return r.replace(be.escapeReplace,Hr)}else if(be.escapeTestNoEncode.test(r))return r.replace(be.escapeReplaceNoEncode,Hr);return r}function jr(r){try{r=encodeURI(r).replace(be.percentDecode,"%")}catch{return null}return r}function qr(r,e){var i;let t=r.replace(be.findPipe,(o,a,l)=>{let u=!1,d=a;for(;--d>=0&&l[d]==="\\";)u=!u;return u?"|":" |"}),s=t.split(be.splitPipe),n=0;if(s[0].trim()||s.shift(),s.length>0&&!((i=s.at(-1))!=null&&i.trim())&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;n<s.length;n++)s[n]=s[n].trim().replace(be.slashPipe,"|");return s}function es(r,e,t){let s=r.length;if(s===0)return"";let n=0;for(;n<s&&r.charAt(s-n-1)===e;)n++;return r.slice(0,s-n)}function vu(r,e){if(r.indexOf(e[1])===-1)return-1;let t=0;for(let s=0;s<r.length;s++)if(r[s]==="\\")s++;else if(r[s]===e[0])t++;else if(r[s]===e[1]&&(t--,t<0))return s;return t>0?-2:-1}function Gr(r,e,t,s,n){let i=e.href,o=e.title||null,a=r[1].replace(n.other.outputLinkReplace,"$1");s.state.inLink=!0;let l={type:r[0].charAt(0)==="!"?"image":"link",raw:t,href:i,title:o,text:a,tokens:s.inlineTokens(a)};return s.state.inLink=!1,l}function ku(r,e,t){let s=r.match(t.other.indentCodeCompensation);if(s===null)return e;let n=s[1];return e.split(`
|
|
28
|
+
`).map(i=>{let o=i.match(t.other.beginningSpace);if(o===null)return i;let[a]=o;return a.length>=n.length?i.slice(n.length):i}).join(`
|
|
29
|
+
`)}var Os=class{constructor(r){O(this,"options");O(this,"rules");O(this,"lexer");this.options=r||Mt}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:es(t,`
|
|
30
|
+
`)}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let t=e[0],s=ku(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let s=es(t,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(t=s.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:es(e[0],`
|
|
31
|
+
`)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let t=es(e[0],`
|
|
32
|
+
`).split(`
|
|
33
|
+
`),s="",n="",i=[];for(;t.length>0;){let o=!1,a=[],l;for(l=0;l<t.length;l++)if(this.rules.other.blockquoteStart.test(t[l]))a.push(t[l]),o=!0;else if(!o)a.push(t[l]);else break;t=t.slice(l);let u=a.join(`
|
|
34
|
+
`),d=u.replace(this.rules.other.blockquoteSetextReplace,`
|
|
35
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
36
|
+
${u}`:u,n=n?`${n}
|
|
37
|
+
${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,i,!0),this.lexer.state.top=f,t.length===0)break;let g=i.at(-1);if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){let h=g,m=h.raw+`
|
|
38
|
+
`+t.join(`
|
|
39
|
+
`),p=this.blockquote(m);i[i.length-1]=p,s=s.substring(0,s.length-h.raw.length)+p.raw,n=n.substring(0,n.length-h.text.length)+p.text;break}else if((g==null?void 0:g.type)==="list"){let h=g,m=h.raw+`
|
|
40
|
+
`+t.join(`
|
|
41
|
+
`),p=this.list(m);i[i.length-1]=p,s=s.substring(0,s.length-g.raw.length)+p.raw,n=n.substring(0,n.length-h.raw.length)+p.raw,t=m.substring(i.at(-1).raw.length).split(`
|
|
42
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:i,text:n}}}list(r){var t,s;let e=this.rules.block.list.exec(r);if(e){let n=e[1].trim(),i=n.length>1,o={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let a=this.rules.other.listItemRegex(n),l=!1;for(;r;){let d=!1,f="",g="";if(!(e=a.exec(r))||this.rules.block.hr.test(r))break;f=e[0],r=r.substring(f.length);let h=e[2].split(`
|
|
43
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,k=>" ".repeat(3*k.length)),m=r.split(`
|
|
44
|
+
`,1)[0],p=!h.trim(),b=0;if(this.options.pedantic?(b=2,g=h.trimStart()):p?b=e[1].length+1:(b=e[2].search(this.rules.other.nonSpaceChar),b=b>4?1:b,g=h.slice(b),b+=e[1].length),p&&this.rules.other.blankLine.test(m)&&(f+=m+`
|
|
45
|
+
`,r=r.substring(m.length+1),d=!0),!d){let k=this.rules.other.nextBulletRegex(b),v=this.rules.other.hrRegex(b),y=this.rules.other.fencesBeginRegex(b),_=this.rules.other.headingBeginRegex(b),w=this.rules.other.htmlBeginRegex(b);for(;r;){let C=r.split(`
|
|
46
|
+
`,1)[0],T;if(m=C,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),T=m):T=m.replace(this.rules.other.tabCharGlobal," "),y.test(m)||_.test(m)||w.test(m)||k.test(m)||v.test(m))break;if(T.search(this.rules.other.nonSpaceChar)>=b||!m.trim())g+=`
|
|
47
|
+
`+T.slice(b);else{if(p||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||y.test(h)||_.test(h)||v.test(h))break;g+=`
|
|
48
|
+
`+m}!p&&!m.trim()&&(p=!0),f+=C+`
|
|
49
|
+
`,r=r.substring(C.length+1),h=T.slice(b)}}o.loose||(l?o.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(l=!0)),o.items.push({type:"list_item",raw:f,task:!!this.options.gfm&&this.rules.other.listIsTask.test(g),loose:!1,text:g,tokens:[]}),o.raw+=f}let u=o.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let d of o.items){if(this.lexer.state.top=!1,d.tokens=this.lexer.blockTokens(d.text,[]),d.task){if(d.text=d.text.replace(this.rules.other.listReplaceTask,""),((t=d.tokens[0])==null?void 0:t.type)==="text"||((s=d.tokens[0])==null?void 0:s.type)==="paragraph"){d.tokens[0].raw=d.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),d.tokens[0].text=d.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let g=this.lexer.inlineQueue.length-1;g>=0;g--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[g].src)){this.lexer.inlineQueue[g].src=this.lexer.inlineQueue[g].src.replace(this.rules.other.listReplaceTask,"");break}}let f=this.rules.other.listTaskCheckbox.exec(d.raw);if(f){let g={type:"checkbox",raw:f[0]+" ",checked:f[0]!=="[ ]"};d.checked=g.checked,o.loose?d.tokens[0]&&["paragraph","text"].includes(d.tokens[0].type)&&"tokens"in d.tokens[0]&&d.tokens[0].tokens?(d.tokens[0].raw=g.raw+d.tokens[0].raw,d.tokens[0].text=g.raw+d.tokens[0].text,d.tokens[0].tokens.unshift(g)):d.tokens.unshift({type:"paragraph",raw:g.raw,text:g.raw,tokens:[g]}):d.tokens.unshift(g)}}if(!o.loose){let f=d.tokens.filter(h=>h.type==="space"),g=f.length>0&&f.some(h=>this.rules.other.anyLine.test(h.raw));o.loose=g}}if(o.loose)for(let d of o.items){d.loose=!0;for(let f of d.tokens)f.type==="text"&&(f.type="paragraph")}return o}}html(r){let e=this.rules.block.html.exec(r);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(r){let e=this.rules.block.def.exec(r);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:s,title:n}}}table(r){var o;let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=qr(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=(o=e[3])!=null&&o.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
50
|
+
`):[],i={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.length===s.length){for(let a of s)this.rules.other.tableAlignRight.test(a)?i.align.push("right"):this.rules.other.tableAlignCenter.test(a)?i.align.push("center"):this.rules.other.tableAlignLeft.test(a)?i.align.push("left"):i.align.push(null);for(let a=0;a<t.length;a++)i.header.push({text:t[a],tokens:this.lexer.inline(t[a]),header:!0,align:i.align[a]});for(let a of n)i.rows.push(qr(a,i.header.length).map((l,u)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:i.align[u]})));return i}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(r){let e=this.rules.block.paragraph.exec(r);if(e){let t=e[1].charAt(e[1].length-1)===`
|
|
51
|
+
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){let e=this.rules.inline.link.exec(r);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let i=es(t.slice(0,-1),"\\");if((t.length-i.length)%2===0)return}else{let i=vu(e[2],"()");if(i===-2)return;if(i>-1){let o=(e[0].indexOf("!")===0?5:4)+e[1].length+i;e[2]=e[2].substring(0,i),e[0]=e[0].substring(0,o).trim(),e[3]=""}}let s=e[2],n="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(s);i&&(s=i[1],n=i[3])}else n=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?s=s.slice(1):s=s.slice(1,-1)),Gr(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let t;if((t=this.rules.inline.reflink.exec(r))||(t=this.rules.inline.nolink.exec(r))){let s=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=e[s.toLowerCase()];if(!n){let i=t[0].charAt(0);return{type:"text",raw:i,text:i}}return Gr(t,n,t[0],this.lexer,this.rules)}}emStrong(r,e,t=""){let s=this.rules.inline.emStrongLDelim.exec(r);if(!(!s||s[3]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!t||this.rules.inline.punctuation.exec(t))){let n=[...s[0]].length-1,i,o,a=n,l=0,u=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,e=e.slice(-1*r.length+n);(s=u.exec(e))!=null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(o=[...i].length,s[3]||s[4]){a+=o;continue}else if((s[5]||s[6])&&n%3&&!((n+o)%3)){l+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a+l);let d=[...s[0]][0].length,f=r.slice(0,n+s.index+d+o);if(Math.min(n,o)%2){let h=f.slice(1,-1);return{type:"em",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}let g=f.slice(2,-2);return{type:"strong",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return s&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r){let e=this.rules.inline.del.exec(r);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let t,s;return e[2]==="@"?(t=e[1],s="mailto:"+t):(t=e[1],s=t),{type:"link",raw:e[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}url(r){var t;let e;if(e=this.rules.inline.url.exec(r)){let s,n;if(e[2]==="@")s=e[0],n="mailto:"+s;else{let i;do i=e[0],e[0]=((t=this.rules.inline._backpedal.exec(e[0]))==null?void 0:t[0])??"";while(i!==e[0]);s=e[0],e[1]==="www."?n="http://"+e[0]:n=e[0]}return{type:"link",raw:e[0],text:s,href:n,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},Ke=class En{constructor(e){O(this,"tokens");O(this,"options");O(this,"state");O(this,"inlineQueue");O(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Mt,this.options.tokenizer=this.options.tokenizer||new Os,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:be,block:xs.normal,inline:Jt.normal};this.options.pedantic?(t.block=xs.pedantic,t.inline=Jt.pedantic):this.options.gfm&&(t.block=xs.gfm,this.options.breaks?t.inline=Jt.breaks:t.inline=Jt.gfm),this.tokenizer.rules=t}static get rules(){return{block:xs,inline:Jt}}static lex(e,t){return new En(t).lex(e)}static lexInline(e,t){return new En(t).inlineTokens(e)}lex(e){e=e.replace(be.carriageReturn,`
|
|
52
|
+
`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let s=this.inlineQueue[t];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],s=!1){var n,i,o;for(this.options.pedantic&&(e=e.replace(be.tabCharGlobal," ").replace(be.spaceLine,""));e;){let a;if((i=(n=this.options.extensions)==null?void 0:n.block)!=null&&i.some(u=>(a=u.call({lexer:this},e,t))?(e=e.substring(a.raw.length),t.push(a),!0):!1))continue;if(a=this.tokenizer.space(e)){e=e.substring(a.raw.length);let u=t.at(-1);a.raw.length===1&&u!==void 0?u.raw+=`
|
|
53
|
+
`:t.push(a);continue}if(a=this.tokenizer.code(e)){e=e.substring(a.raw.length);let u=t.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(`
|
|
54
|
+
`)?"":`
|
|
55
|
+
`)+a.raw,u.text+=`
|
|
56
|
+
`+a.text,this.inlineQueue.at(-1).src=u.text):t.push(a);continue}if(a=this.tokenizer.fences(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.heading(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.hr(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.blockquote(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.list(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.html(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.def(e)){e=e.substring(a.raw.length);let u=t.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(`
|
|
57
|
+
`)?"":`
|
|
58
|
+
`)+a.raw,u.text+=`
|
|
59
|
+
`+a.raw,this.inlineQueue.at(-1).src=u.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title},t.push(a));continue}if(a=this.tokenizer.table(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.lheading(e)){e=e.substring(a.raw.length),t.push(a);continue}let l=e;if((o=this.options.extensions)!=null&&o.startBlock){let u=1/0,d=e.slice(1),f;this.options.extensions.startBlock.forEach(g=>{f=g.call({lexer:this},d),typeof f=="number"&&f>=0&&(u=Math.min(u,f))}),u<1/0&&u>=0&&(l=e.substring(0,u+1))}if(this.state.top&&(a=this.tokenizer.paragraph(l))){let u=t.at(-1);s&&(u==null?void 0:u.type)==="paragraph"?(u.raw+=(u.raw.endsWith(`
|
|
60
|
+
`)?"":`
|
|
61
|
+
`)+a.raw,u.text+=`
|
|
62
|
+
`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):t.push(a),s=l.length!==e.length,e=e.substring(a.raw.length);continue}if(a=this.tokenizer.text(e)){e=e.substring(a.raw.length);let u=t.at(-1);(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(`
|
|
63
|
+
`)?"":`
|
|
64
|
+
`)+a.raw,u.text+=`
|
|
65
|
+
`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):t.push(a);continue}if(e){let u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var l,u,d,f,g;let s=e,n=null;if(this.tokens.links){let h=Object.keys(this.tokens.links);if(h.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)h.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,n.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)i=n[2]?n[2].length:0,s=s.slice(0,n.index+i)+"["+"a".repeat(n[0].length-i-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=((u=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:u.call({lexer:this},s))??s;let o=!1,a="";for(;e;){o||(a=""),o=!1;let h;if((f=(d=this.options.extensions)==null?void 0:d.inline)!=null&&f.some(p=>(h=p.call({lexer:this},e,t))?(e=e.substring(h.raw.length),t.push(h),!0):!1))continue;if(h=this.tokenizer.escape(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.tag(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.link(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(h.raw.length);let p=t.at(-1);h.type==="text"&&(p==null?void 0:p.type)==="text"?(p.raw+=h.raw,p.text+=h.text):t.push(h);continue}if(h=this.tokenizer.emStrong(e,s,a)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.codespan(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.br(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.del(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.autolink(e)){e=e.substring(h.raw.length),t.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(e))){e=e.substring(h.raw.length),t.push(h);continue}let m=e;if((g=this.options.extensions)!=null&&g.startInline){let p=1/0,b=e.slice(1),k;this.options.extensions.startInline.forEach(v=>{k=v.call({lexer:this},b),typeof k=="number"&&k>=0&&(p=Math.min(p,k))}),p<1/0&&p>=0&&(m=e.substring(0,p+1))}if(h=this.tokenizer.inlineText(m)){e=e.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(a=h.raw.slice(-1)),o=!0;let p=t.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=h.raw,p.text+=h.text):t.push(h);continue}if(e){let p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return t}},$s=class{constructor(r){O(this,"options");O(this,"parser");this.options=r||Mt}space(r){return""}code({text:r,lang:e,escaped:t}){var i;let s=(i=(e||"").match(be.notSpaceStart))==null?void 0:i[0],n=r.replace(be.endingNewline,"")+`
|
|
66
|
+
`;return s?'<pre><code class="language-'+st(s)+'">'+(t?n:st(n,!0))+`</code></pre>
|
|
67
|
+
`:"<pre><code>"+(t?n:st(n,!0))+`</code></pre>
|
|
68
|
+
`}blockquote({tokens:r}){return`<blockquote>
|
|
69
|
+
${this.parser.parse(r)}</blockquote>
|
|
70
|
+
`}html({text:r}){return r}def(r){return""}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}>
|
|
71
|
+
`}hr(r){return`<hr>
|
|
72
|
+
`}list(r){let e=r.ordered,t=r.start,s="";for(let o=0;o<r.items.length;o++){let a=r.items[o];s+=this.listitem(a)}let n=e?"ol":"ul",i=e&&t!==1?' start="'+t+'"':"";return"<"+n+i+`>
|
|
73
|
+
`+s+"</"+n+`>
|
|
74
|
+
`}listitem(r){return`<li>${this.parser.parse(r.tokens)}</li>
|
|
75
|
+
`}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
|
|
76
|
+
`}table(r){let e="",t="";for(let n=0;n<r.header.length;n++)t+=this.tablecell(r.header[n]);e+=this.tablerow({text:t});let s="";for(let n=0;n<r.rows.length;n++){let i=r.rows[n];t="";for(let o=0;o<i.length;o++)t+=this.tablecell(i[o]);s+=this.tablerow({text:t})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
77
|
+
<thead>
|
|
78
|
+
`+e+`</thead>
|
|
79
|
+
`+s+`</table>
|
|
80
|
+
`}tablerow({text:r}){return`<tr>
|
|
81
|
+
${r}</tr>
|
|
82
|
+
`}tablecell(r){let e=this.parser.parseInline(r.tokens),t=r.header?"th":"td";return(r.align?`<${t} align="${r.align}">`:`<${t}>`)+e+`</${t}>
|
|
83
|
+
`}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${st(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:t}){let s=this.parser.parseInline(t),n=jr(r);if(n===null)return s;r=n;let i='<a href="'+r+'"';return e&&(i+=' title="'+st(e)+'"'),i+=">"+s+"</a>",i}image({href:r,title:e,text:t,tokens:s}){s&&(t=this.parser.parseInline(s,this.parser.textRenderer));let n=jr(r);if(n===null)return st(t);r=n;let i=`<img src="${r}" alt="${t}"`;return e&&(i+=` title="${st(e)}"`),i+=">",i}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:st(r.text)}},or=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}checkbox({raw:r}){return r}},Ne=class Mn{constructor(e){O(this,"options");O(this,"renderer");O(this,"textRenderer");this.options=e||Mt,this.options.renderer=this.options.renderer||new $s,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new or}static parse(e,t){return new Mn(t).parse(e)}static parseInline(e,t){return new Mn(t).parseInline(e)}parse(e){var s,n;let t="";for(let i=0;i<e.length;i++){let o=e[i];if((n=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&n[o.type]){let l=o,u=this.options.extensions.renderers[l.type].call({parser:this},l);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(l.type)){t+=u||"";continue}}let a=o;switch(a.type){case"space":{t+=this.renderer.space(a);break}case"hr":{t+=this.renderer.hr(a);break}case"heading":{t+=this.renderer.heading(a);break}case"code":{t+=this.renderer.code(a);break}case"table":{t+=this.renderer.table(a);break}case"blockquote":{t+=this.renderer.blockquote(a);break}case"list":{t+=this.renderer.list(a);break}case"checkbox":{t+=this.renderer.checkbox(a);break}case"html":{t+=this.renderer.html(a);break}case"def":{t+=this.renderer.def(a);break}case"paragraph":{t+=this.renderer.paragraph(a);break}case"text":{t+=this.renderer.text(a);break}default:{let l='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return t}parseInline(e,t=this.renderer){var n,i;let s="";for(let o=0;o<e.length;o++){let a=e[o];if((i=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&i[a.type]){let u=this.options.extensions.renderers[a.type].call({parser:this},a);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){s+=u||"";continue}}let l=a;switch(l.type){case"escape":{s+=t.text(l);break}case"html":{s+=t.html(l);break}case"link":{s+=t.link(l);break}case"image":{s+=t.image(l);break}case"checkbox":{s+=t.checkbox(l);break}case"strong":{s+=t.strong(l);break}case"em":{s+=t.em(l);break}case"codespan":{s+=t.codespan(l);break}case"br":{s+=t.br(l);break}case"del":{s+=t.del(l);break}case"text":{s+=t.text(l);break}default:{let u='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return s}},Ss,rs=(Ss=class{constructor(r){O(this,"options");O(this,"block");this.options=r||Mt}preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(){return this.block?Ke.lex:Ke.lexInline}provideParser(){return this.block?Ne.parse:Ne.parseInline}},O(Ss,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),O(Ss,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Ss),_u=class{constructor(...r){O(this,"defaults",Qn());O(this,"options",this.setOptions);O(this,"parse",this.parseMarkdown(!0));O(this,"parseInline",this.parseMarkdown(!1));O(this,"Parser",Ne);O(this,"Renderer",$s);O(this,"TextRenderer",or);O(this,"Lexer",Ke);O(this,"Tokenizer",Os);O(this,"Hooks",rs);this.use(...r)}walkTokens(r,e){var s,n;let t=[];for(let i of r)switch(t=t.concat(e.call(this,i)),i.type){case"table":{let o=i;for(let a of o.header)t=t.concat(this.walkTokens(a.tokens,e));for(let a of o.rows)for(let l of a)t=t.concat(this.walkTokens(l.tokens,e));break}case"list":{let o=i;t=t.concat(this.walkTokens(o.items,e));break}default:{let o=i;(n=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&n[o.type]?this.defaults.extensions.childTokens[o.type].forEach(a=>{let l=o[a].flat(1/0);t=t.concat(this.walkTokens(l,e))}):o.tokens&&(t=t.concat(this.walkTokens(o.tokens,e)))}}return t}use(...r){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(t=>{let s={...t};if(s.async=this.defaults.async||s.async||!1,t.extensions&&(t.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let i=e.renderers[n.name];i?e.renderers[n.name]=function(...o){let a=n.renderer.apply(this,o);return a===!1&&(a=i.apply(this,o)),a}:e.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=e[n.level];i?i.unshift(n.tokenizer):e[n.level]=[n.tokenizer],n.start&&(n.level==="block"?e.startBlock?e.startBlock.push(n.start):e.startBlock=[n.start]:n.level==="inline"&&(e.startInline?e.startInline.push(n.start):e.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(e.childTokens[n.name]=n.childTokens)}),s.extensions=e),t.renderer){let n=this.defaults.renderer||new $s(this.defaults);for(let i in t.renderer){if(!(i in n))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let o=i,a=t.renderer[o],l=n[o];n[o]=(...u)=>{let d=a.apply(n,u);return d===!1&&(d=l.apply(n,u)),d||""}}s.renderer=n}if(t.tokenizer){let n=this.defaults.tokenizer||new Os(this.defaults);for(let i in t.tokenizer){if(!(i in n))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let o=i,a=t.tokenizer[o],l=n[o];n[o]=(...u)=>{let d=a.apply(n,u);return d===!1&&(d=l.apply(n,u)),d}}s.tokenizer=n}if(t.hooks){let n=this.defaults.hooks||new rs;for(let i in t.hooks){if(!(i in n))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let o=i,a=t.hooks[o],l=n[o];rs.passThroughHooks.has(i)?n[o]=u=>{if(this.defaults.async&&rs.passThroughHooksRespectAsync.has(i))return(async()=>{let f=await a.call(n,u);return l.call(n,f)})();let d=a.call(n,u);return l.call(n,d)}:n[o]=(...u)=>{if(this.defaults.async)return(async()=>{let f=await a.apply(n,u);return f===!1&&(f=await l.apply(n,u)),f})();let d=a.apply(n,u);return d===!1&&(d=l.apply(n,u)),d}}s.hooks=n}if(t.walkTokens){let n=this.defaults.walkTokens,i=t.walkTokens;s.walkTokens=function(o){let a=[];return a.push(i.call(this,o)),n&&(a=a.concat(n.call(this,o))),a}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return Ke.lex(r,e??this.defaults)}parser(r,e){return Ne.parse(r,e??this.defaults)}parseMarkdown(r){return(e,t)=>{let s={...t},n={...this.defaults,...s},i=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&s.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=r),n.async)return(async()=>{let o=n.hooks?await n.hooks.preprocess(e):e,a=await(n.hooks?await n.hooks.provideLexer():r?Ke.lex:Ke.lexInline)(o,n),l=n.hooks?await n.hooks.processAllTokens(a):a;n.walkTokens&&await Promise.all(this.walkTokens(l,n.walkTokens));let u=await(n.hooks?await n.hooks.provideParser():r?Ne.parse:Ne.parseInline)(l,n);return n.hooks?await n.hooks.postprocess(u):u})().catch(i);try{n.hooks&&(e=n.hooks.preprocess(e));let o=(n.hooks?n.hooks.provideLexer():r?Ke.lex:Ke.lexInline)(e,n);n.hooks&&(o=n.hooks.processAllTokens(o)),n.walkTokens&&this.walkTokens(o,n.walkTokens);let a=(n.hooks?n.hooks.provideParser():r?Ne.parse:Ne.parseInline)(o,n);return n.hooks&&(a=n.hooks.postprocess(a)),a}catch(o){return i(o)}}}onError(r,e){return t=>{if(t.message+=`
|
|
84
|
+
Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error occurred:</p><pre>"+st(t.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(t);throw t}}},Rt=new _u;function Z(r,e){return Rt.parse(r,e)}Z.options=Z.setOptions=function(r){return Rt.setOptions(r),Z.defaults=Rt.defaults,go(Z.defaults),Z};Z.getDefaults=Qn;Z.defaults=Mt;Z.use=function(...r){return Rt.use(...r),Z.defaults=Rt.defaults,go(Z.defaults),Z};Z.walkTokens=function(r,e){return Rt.walkTokens(r,e)};Z.parseInline=Rt.parseInline;Z.Parser=Ne;Z.parser=Ne.parse;Z.Renderer=$s;Z.TextRenderer=or;Z.Lexer=Ke;Z.lexer=Ke.lex;Z.Tokenizer=Os;Z.Hooks=rs;Z.parse=Z;Z.options;Z.setOptions;Z.use;Z.walkTokens;Z.parseInline;Ne.parse;Ke.lex;const Cu={key:"message",class:"message-text tw:flex tw:items-end tw:gap-1 tw:transition-all"},xu=["innerHTML"],Su=["title","disabled"],Tu=c.defineComponent({__name:"MessageBot",props:{message:{},welcomeColor:{},color:{},bgColor:{},size:{},bgType:{},fontSize:{},borderWidth:{},borderColor:{},configDesignClass:{},ttsUrl:{}},setup(r){Z.setOptions({breaks:!0,gfm:!0});const e=r,t=c.computed(()=>{var g;return e.ttsUrl||((g=e.configDesignClass)==null?void 0:g.getKey("settings.ttsUrl"))||""}),s=c.computed(()=>!!t.value),{speak:n,stop:i,isSpeaking:o,isLoading:a}=Oc({ttsUrl:t,voice:"nova"}),l=c.ref(!1),u=()=>{o.value?i():e.message.text&&n(e.message.text)},d=c.computed(()=>{switch(e.size){case"sm":return e.bgType==="bubble"?" tw:min-h-[25px] tw:py-1 tw:px-2 ":"";case"md":return e.bgType==="bubble"?" tw:min-h-[33px] tw:py-2 tw:px-3":"";case"lg":return e.bgType==="bubble"?" tw:min-h-[40px] tw:py-3 tw:px-4":""}}),f=c.computed(()=>e.message.text?Z.parse(e.message.text):"");return(g,h)=>{var m,p,b,k;return c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(["message-item tw:transition-all tw:text-white tw:w-fit tw:whitespace-break-spaces tw:transition-colors tw:duration-[250ms] tw:ease-[ease]",[d.value,{"item-primary":!((m=g.message.chunk)!=null&&m.start)}]]),style:c.normalizeStyle({color:(p=g.message.chunk)!=null&&p.start?"#2F2F31":g.color,"background-color":(b=g.message.chunk)!=null&&b.start?"transparent":g.bgType==="bubble"?g.bgColor:"transparent","font-size":g.fontSize+"px",border:g.bgType==="bubble"?g.borderWidth+"px solid "+g.borderColor:"none"}),onMouseenter:h[0]||(h[0]=v=>l.value=!0),onMouseleave:h[1]||(h[1]=v=>l.value=!1)},[c.createElementVNode("div",Cu,[c.createElementVNode("span",{class:"tw:flex-1 markdown-content",innerHTML:f.value},null,8,xu),s.value&&g.message.text&&!((k=g.message.chunk)!=null&&k.start)?(c.openBlock(),c.createElementBlock("button",{key:0,class:c.normalizeClass(["tts-button tw:flex-shrink-0 tw:opacity-0 tw:transition-opacity tw:duration-200 tw:p-0.5 tw:rounded hover:tw:bg-white/10 tw:self-end",{"tw:opacity-100":l.value||c.unref(o)||c.unref(a),"tts-speaking":c.unref(o),"tts-loading":c.unref(a)}]),onClick:c.withModifiers(u,["stop"]),title:c.unref(a)?"Loading...":c.unref(o)?"Stop":"Speak",disabled:c.unref(a)},[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(c.unref(o)?c.unref(Vc):c.unref($c)),{class:"tw:w-3.5 tw:h-3.5",style:c.normalizeStyle({color:g.color,opacity:.6})},null,8,["style"]))],10,Su)):c.createCommentVNode("",!0)])],38)}}}),zu=c.defineComponent({__name:"MessageUser",props:{message:{},isFirst:{type:Boolean},color:{},bgColor:{},borderWidth:{},borderColor:{},fontSize:{},size:{},bgType:{},configDesignClass:{}},setup(r){const e=r,t=c.computed(()=>{switch(e.size){case"sm":return e.bgType==="bubble"?" tw:min-h-[25px] tw:py-1 tw:px-2 ":"";case"md":return e.bgType==="bubble"?" tw:min-h-[33px] tw:py-2 tw:px-3":"";case"lg":return e.bgType==="bubble"?" tw:min-h-[40px] tw:py-3 tw:px-4":""}}),s=c.computed(()=>e.bgType==="bubble"?e.borderWidth+"px solid "+e.borderColor:"none");return(n,i)=>(c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(["message-item tw:transition-all tw:w-fit tw:whitespace-break-spaces item-secondary tw:ml-auto",[t.value,{"tw:mt-[5px] !tw:bg-transparent":n.isFirst}]]),style:c.normalizeStyle({color:n.color,"background-color":n.bgType==="bubble"?n.bgColor:"transparent",border:s.value,"font-size":n.fontSize+"px"})},c.toDisplayString(n.message.text),7))}}),Ru=["innerHTML"],Eu={key:"dots",class:"tw:flex tw:items-center tw:justify-start tw:gap-1 tw:h-4"},Mu={key:"dots-pulse",class:"tw:flex tw:items-center tw:justify-start tw:gap-1 tw:h-4"},Bu={key:"circle-pulse",class:"circle-pulse"},Pu={key:"circle-pulse-1",class:"circle-pulse-1"},Au=["data-text"],Du=c.defineComponent({__name:"LoadingMessage",props:{loader:{},text:{},message:{},configDesignClass:{},paused:{type:Boolean}},setup(r){const e=r,t=c.ref(null),s=c.ref(!1);let n=null;const i=()=>{const a=t.value;if(!a)return;const l=a.closest("li");if(!l)return;const u=l.nextElementSibling;if(!u){s.value=!1;return}const d=u.getAttribute("data-component")==="MessageBot"||typeof u.matches=="function"&&u.matches('[data-component="MessageBot"]')||!!u.querySelector('[data-component="MessageBot"]');s.value=d};c.onMounted(()=>{c.nextTick(i);const a=t.value,l=a==null?void 0:a.closest("ul");l&&(n=new MutationObserver(()=>i()),n.observe(l,{childList:!0,subtree:!0}))}),c.onBeforeUnmount(()=>{n&&n.disconnect()}),c.watch(()=>e.text,()=>c.nextTick(i));const o=c.computed(()=>!!e.paused||s.value);return(a,l)=>(c.openBlock(),c.createElementBlock("li",{key:"loading",ref_key:"rootRef",ref:t,class:"message-text-loading tw:flex tw:items-center tw:justify-start tw:gap-3"},[c.createVNode(c.Transition,{name:"fade",mode:"out-in"},{default:c.withCtx(()=>[o.value?(c.openBlock(),c.createElementBlock("div",{key:"complete-step-icon",innerHTML:a.configDesignClass.getKey("sections.loader.completeStep.icon.src"),class:"svg-inherit",style:c.normalizeStyle({color:a.configDesignClass.getKey("sections.loader.completeStep.icon.color"),height:a.configDesignClass.getKey("sections.loader.completeStep.icon.size")+"px",width:a.configDesignClass.getKey("sections.loader.completeStep.icon.size")+"px"})},null,12,Ru)):!a.loader||a.loader==="dots"?(c.openBlock(),c.createElementBlock("div",Eu,l[0]||(l[0]=[c.createElementVNode("div",{class:"loading-dot tw:rounded-full"},null,-1),c.createElementVNode("div",{class:"loading-dot loading-dot-delay-1 tw:rounded-full"},null,-1),c.createElementVNode("div",{class:"loading-dot loading-dot-delay-2 tw:rounded-full"},null,-1),c.createElementVNode("div",{class:"loading-dot loading-dot-delay-3 tw:rounded-full"},null,-1)]))):a.loader==="dots-pulse"?(c.openBlock(),c.createElementBlock("div",Mu,l[1]||(l[1]=[c.createElementVNode("span",{class:"dot-pulse dot-1"},null,-1),c.createElementVNode("span",{class:"dot-pulse dot-2"},null,-1),c.createElementVNode("span",{class:"dot-pulse dot-3"},null,-1)]))):a.loader==="circle-pulse"?(c.openBlock(),c.createElementBlock("div",Bu,l[2]||(l[2]=[c.createElementVNode("span",{class:"ring ring-1"},null,-1),c.createElementVNode("span",{class:"ring ring-2"},null,-1)]))):a.loader==="circle-pulse-1"?(c.openBlock(),c.createElementBlock("div",Pu,l[3]||(l[3]=[c.createElementVNode("span",{class:"ripple r1"},null,-1),c.createElementVNode("span",{class:"ripple r2"},null,-1),c.createElementVNode("span",{class:"center"},null,-1)]))):c.createCommentVNode("",!0)]),_:1}),c.createVNode(c.Transition,{name:"fade-text",mode:"out-in"},{default:c.withCtx(()=>{var u,d,f,g;return[(c.openBlock(),c.createElementBlock("span",{class:c.normalizeClass(["tw:transition-all tw:text-sm",{"typing-shimmer":!o.value}]),key:a.text,"data-text":(u=a.message)!=null&&u.text?(d=a.message)==null?void 0:d.text:a.text,style:c.normalizeStyle({color:a.configDesignClass.getKey("sections.loader.typingLoader.color")})},c.toDisplayString(o.value?"Thinking completed":(f=a.message)!=null&&f.text?(g=a.message)==null?void 0:g.text:a.text),15,Au))]}),_:1})],512))}}),Lu=(r,e)=>{const t=r.__vccOpts||r;for(const[s,n]of e)t[s]=n;return t},Zr=Lu(Du,[["__scopeId","data-v-bb55e057"]]),Iu=["data-height"],Ou={class:"tw:transition-all tw:flex tw:flex-col tw:items-center tw:gap-1 tw:px-1"},$u=["innerHTML"],Vu={class:"tw:transition-all tw:flex tw:items-center tw:gap-2"},Ku=c.defineComponent({__name:"MessageSystem",props:{message:{},welcomeColor:{},color:{},bgColor:{},size:{},configDesignClass:{},activeMessage:{type:Boolean},bgType:{},isLast:{type:Boolean},traceLastShown:{type:Boolean},index:{}},setup(r){const e=r,t=c.computed(()=>e.index===3&&e.traceLastShown||e.isLast),s=c.computed(()=>{switch(e.size){case"sm":return"tw:text-xs";case"md":return"tw:text-xs";case"lg":return"tw:text-base"}}),n=c.computed(()=>t.value?e.configDesignClass.getKey("sections.loader.activeStep.icon.src"):e.configDesignClass.getKey("sections.loader.completeStep.icon.src")),i=c.computed(()=>e.configDesignClass.getKey("sections.loader.activeStep.color")),o=c.computed(()=>e.configDesignClass.getKey("sections.loader.completeStep.color")),a=c.computed(()=>t.value?i.value:o.value),l=c.computed(()=>t.value?e.configDesignClass.getKey("sections.loader.activeStep.icon.color"):e.configDesignClass.getKey("sections.loader.completeStep.icon.color")),u=c.computed(()=>Xn(e.configDesignClass,"inside"));return(d,f)=>(c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(["message-system tw:text-left tw:relative tw:w-full tw:text-white tw:w-fit tw:whitespace-break-spaces tw:transition-colors tw:duration-[250ms] tw:ease-[ease]",s.value]),"data-height":d.configDesignClass.getKey("sections.loader.completeStep.verticalSpacing"),style:c.normalizeStyle({"padding-top":d.configDesignClass.getKey("sections.loader.completeStep.verticalSpacing")+"px"})},[c.createElementVNode("hr",{class:"tw:w-[1px] tw:bg-white tw:opacity-20 tw:absolute",style:c.normalizeStyle([{display:"none"},{height:d.configDesignClass.getKey("sections.loader.completeStep.verticalSpacing")-2+"px",left:d.configDesignClass.getKey("sections.loader.completeStep.icon.size")/2+4+"px",top:"0px"}])},null,4),c.createElementVNode("div",{key:"message",class:c.normalizeClass(["message-text flex tw:transition-all tw:space-between tw:gap-3 tw:flex tw:items-center tw:align-center",{"tw:mb-0":d.isLast}])},[c.createElementVNode("div",Ou,[c.createElementVNode("div",{innerHTML:n.value,class:c.normalizeClass(["svg-inherit",{"tw:animate-spin":t.value}]),style:c.normalizeStyle({color:l.value,height:d.configDesignClass.getKey("sections.loader.completeStep.icon.size")+"px",width:d.configDesignClass.getKey("sections.loader.completeStep.icon.size")+"px"})},null,14,$u)]),c.createElementVNode("div",Vu,[d.message.meta?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("p",{key:0,style:c.normalizeStyle({color:a.value,"font-size":d.configDesignClass.getKey("sections.loader.completeStep.fontSize")+"px"})},c.toDisplayString(d.message.text),5)),d.message.meta?(c.openBlock(),c.createBlock(c.unref(it),{key:1,style:c.normalizeStyle({color:e.activeMessage?"rgba(255, 255, 255, 0.60)":"#3F3F46",background:e.activeMessage?"#2F2F31":"#ECEDEE",border:e.activeMessage?"none":"1px solid #fff"}),class:c.normalizeClass(["tw:flex tw:items-center tw:gap-1 tw:rounded-md tw:shadow-xs",u.value])},{default:c.withCtx(()=>[f[0]||(f[0]=c.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[c.createElementVNode("path",{d:"M10.7935 1.33301H5.20683C2.78016 1.33301 1.3335 2.77967 1.3335 5.20634V10.7863C1.3335 13.2197 2.78016 14.6663 5.20683 14.6663H10.7868C13.2135 14.6663 14.6602 13.2197 14.6602 10.793V5.20634C14.6668 2.77967 13.2202 1.33301 10.7935 1.33301ZM6.62683 8.84634C6.1735 9.52634 5.54683 10.0797 4.8135 10.4463C4.74683 10.4797 4.66683 10.4997 4.5935 10.4997C4.40683 10.4997 4.2335 10.3997 4.14683 10.2263C4.02016 9.97967 4.12016 9.67967 4.3735 9.55301C4.9535 9.26634 5.44683 8.82634 5.80016 8.29301C5.92016 8.11301 5.92016 7.88634 5.80016 7.70634C5.44016 7.17301 4.94683 6.73301 4.3735 6.44634C4.12016 6.32634 4.02016 6.02634 4.14683 5.77301C4.26683 5.52634 4.56683 5.42634 4.8135 5.55301C5.54683 5.91967 6.1735 6.47301 6.62683 7.15301C6.9735 7.66634 6.9735 8.33301 6.62683 8.84634ZM11.3335 10.4997H8.66683C8.3935 10.4997 8.16683 10.273 8.16683 9.99967C8.16683 9.72634 8.3935 9.49967 8.66683 9.49967H11.3335C11.6068 9.49967 11.8335 9.72634 11.8335 9.99967C11.8335 10.273 11.6068 10.4997 11.3335 10.4997Z",fill:"currentColor"})],-1)),c.createElementVNode("span",null,c.toDisplayString(d.message.text),1)]),_:1,__:[0]},8,["style","class"])):c.createCommentVNode("",!0)])],2)],14,Iu))}});class Nu{constructor(e,t){O(this,"structure");O(this,"options");O(this,"html","");this.structure=e,this.options={escape:(t==null?void 0:t.escape)??!0,whitelistStyles:(t==null?void 0:t.whitelistStyles)??["color","background","borderColor","borderRadius"]}}build(e){return this.html=this.renderLayout(this.structure.layout,this.structure.bindings||{},e),this}buildStyle(e){return Object.entries(e).forEach(([t,s])=>{const n=new RegExp(`data-visual="${this.escapeRegExp(t)}"`,"g"),i=Object.entries(s.style).map(([o,a])=>`${o}: ${a};`).join("");this.html=this.html.replace(n,`class="${s.class}" style="${i}"`)}),this}result(){return this.html}renderLayout(e,t,s){let n=e;return t&&(Object.entries(t).forEach(([i,o])=>{var l,u;const a=new RegExp(`\\{${this.escapeRegExp(i)}\\}`,"g");if(o.type==="text"){const d=(l=s==null?void 0:s[i])==null?void 0:l.text;n=n.replace(a,this.safeText(typeof d=="string"||typeof d=="number"?String(d):""));return}if(o.type==="button"){const d=(u=s==null?void 0:s[i])==null?void 0:u.text;n=n.replace(a,this.safeText(typeof d=="string"||typeof d=="number"?String(d):""));return}if(o.type==="repeater"){const d=Array.isArray(s==null?void 0:s[i])?s[i]:[],f=o.layout||"",g=o.bindings||{},h=d.map(m=>this.renderLayout(f,g,m)).join("");n=n.replace(a,h);return}}),n=n.replace(/style=\"([^\"]*)\"/g,(i,o)=>{const a=o.split(";").map(l=>l.trim()).filter(Boolean).filter(l=>{const[u]=l.split(":");return this.options.whitelistStyles.includes((u||"").trim())}).join("; ");return`style="${this.safeAttr(a)}"`})),n}safeText(e){return this.options.escape?e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\"/g,""").replace(/'/g,"'"):e}safeAttr(e){return this.safeText(e)}escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}}const Fu={layout:'<div class="tw:flex tw:flex-col" data-visual="container"><div><span data-visual="headerChip">Action</span></div><div class="tw:flex tw:mb-2 tw:mt-2 tw:text-xs"><div data-visual="title">{title}</div></div><div class="tw:flex tw:gap-1"><button data-cb="confirm" data-visual="actionConfirm" class="tw:flex-1">{actionConfirm}</button><button data-cb="cancel" data-visual="actionCancel" class="tw:flex-1">{actionCancel}</button></div></div>',bindings:{title:{type:"text"},actionConfirm:{type:"button"},actionCancel:{type:"button"}}};function Uu(r){const e=c.computed(()=>{const y=r==null?void 0:r.getKeyObject("sections.inside.activeSnippet"),_=r==null?void 0:r.getKeyObject("sections.activeSnippet"),w=y&&y!=="undefined"?y:_;return w&&w!=="undefined"?w:{}}),t=(y,_)=>{if(!_)return y;switch(_){case"outlined":return{color:y.background,background:"transparent",border:`1px solid ${y.borderColor||y.background}`};case"invisible":return{color:y.background,background:"transparent"};default:return y}},s=c.computed(()=>r==null?void 0:r.getKey("sections.inside.activeSnippet.element.bgColor")),n=c.computed(()=>r==null?void 0:r.getKey("sections.inside.activeSnippet.element.color")),i=c.computed(()=>r==null?void 0:r.getKey("sections.inside.activeSnippet.element.sidePadding")),o=c.computed(()=>r==null?void 0:r.getKey("sections.inside.activeSnippet.element.verticalSpacing")),a=c.computed(()=>(r==null?void 0:r.getKey("sections.inside.activeSnippet.element.borderWidth"))+"px solid "+(r==null?void 0:r.getKey("sections.inside.activeSnippet.element.borderColor"))),l=c.computed(()=>{var y,_,w,C,T,x,z,D;return{color:(_=(y=e.value)==null?void 0:y.headerChip)==null?void 0:_.color,background:(C=(w=e.value)==null?void 0:w.headerChip)==null?void 0:C.bgColor,borderColor:(x=(T=e.value)==null?void 0:T.headerChip)==null?void 0:x.borderColor,bgColor:(D=(z=e.value)==null?void 0:z.headerChip)==null?void 0:D.bgColor}}),u=c.computed(()=>{var y,_;return t(l.value,(_=(y=e.value)==null?void 0:y.headerChip)==null?void 0:_.bgType)}),d=c.computed(()=>{var y,_,w,C;return{...u.value,"border-radius":r!=null&&r.getKey("settings.globalRoundingRadius")?cs(r,2).borderRadius:((_=(y=e.value)==null?void 0:y.headerChip)==null?void 0:_.borderRadius)+"px","font-size":((C=(w=e.value)==null?void 0:w.headerChip)==null?void 0:C.fontSize)+"px"}}),f=c.computed(()=>{var y;return(y=e.value)==null?void 0:y.propertyColor}),g=c.computed(()=>{var y;return(y=e.value)==null?void 0:y.valueColor}),h=c.computed(()=>{var y,_,w,C;return{color:(_=(y=e.value)==null?void 0:y.yesButton)==null?void 0:_.color,background:(C=(w=e.value)==null?void 0:w.yesButton)==null?void 0:C.bgColor}}),m=c.computed(()=>{var y,_,w,C;return{color:(_=(y=e.value)==null?void 0:y.noButton)==null?void 0:_.color,background:(C=(w=e.value)==null?void 0:w.noButton)==null?void 0:C.bgColor}}),p=c.computed(()=>{const y=r==null?void 0:r.getKey("sections.inside.activeSnippet.params.size"),_=r==null?void 0:r.getKey("sections.inside.params.size");return zn(y!=="undefined"?y:_)}),b=c.computed(()=>{const y=r==null?void 0:r.getKey("sections.inside.activeSnippet.headerChip.size");return zn(y)}),k=y=>{const _=(y.id||"").toLowerCase(),C=_==="confirm"||_==="yes"?h.value:m.value,T=r==null?void 0:r.getKey("sections.inside.activeSnippet.params.buttonStyle");return t(C,T)},v=c.computed(()=>r!=null&&r.getKey("settings.globalRoundingRadius")?cs(r,8):{borderRadius:(r==null?void 0:r.getKey("sections.inside.activeSnippet.element.borderRadius"))+"px"});return{containerBg:s,containerColor:n,sidePadding:i,verticalSpacing:o,headerChip:d,propertyColor:f,border:a,valueColor:g,yesButton:h,noButton:m,buttonStyle:k,getButtonStyle:t,actionBtnSizeClass:p,buttonRadiusStyle:v,chipSizeClass:b}}const Wu=["innerHTML"],Hu=c.defineComponent({__name:"DynamicSnippet",props:{structure:{},data:{},message:{},configDesignClass:{}},emits:["action"],setup(r,{emit:e}){const t=r,{containerBg:s,containerColor:n,headerChip:i,yesButton:o,noButton:a,actionBtnSizeClass:l,buttonRadiusStyle:u,verticalSpacing:d,sidePadding:f,valueColor:g,getButtonStyle:h,border:m,chipSizeClass:p}=Uu(t.configDesignClass),b=c.computed(()=>{var C;return(C=t.configDesignClass)==null?void 0:C.getKey("sections.inside.activeSnippet.params.buttonStyle")}),k=c.computed(()=>{var C,T;return{background:s.value,color:n.value,"border-radius":(C=t.configDesignClass)!=null&&C.getKey("settings.globalRoundingRadius")?u.value.borderRadius:((T=t.configDesignClass)==null?void 0:T.getKey("sections.inside.activeSnippet.element.borderRadius"))+"px",border:m.value,padding:`${f.value}px`,gap:`${d.value}px`}}),v=c.computed(()=>{var C,T,x,z,D,K,N;return{container:{style:k.value},headerChip:{style:i.value,class:p.value},actionConfirm:{class:l.value,style:{...h(o.value,b.value),flex:"1","line-height":"1","border-radius":(C=t.configDesignClass)!=null&&C.getKey("settings.globalRoundingRadius")?u.value.borderRadius:((T=t.configDesignClass)==null?void 0:T.getKey("sections.inside.activeSnippet.yesButton.borderRadius"))+"px","font-size":((x=t.configDesignClass)==null?void 0:x.getKey("sections.inside.activeSnippet.yesButton.fontSize"))+"px"}},title:{style:{color:g.value,"font-size":((z=t.configDesignClass)==null?void 0:z.getKey("sections.inside.activeSnippet.element.fontSize"))+"px"}},actionCancel:{class:l.value,style:{...h(a.value,b.value),flex:"1","line-height":"1","border-radius":(D=t.configDesignClass)!=null&&D.getKey("settings.globalRoundingRadius")?u.value.borderRadius:((K=t.configDesignClass)==null?void 0:K.getKey("sections.inside.activeSnippet.yesButton.borderRadius"))+"px","font-size":((N=t.configDesignClass)==null?void 0:N.getKey("sections.inside.activeSnippet.yesButton.fontSize"))+"px"}}}}),y=e,_=c.computed(()=>new Nu(t.structure).build(t.data).buildStyle(v.value).result()),w=C=>{var D;const T=C.target;if(!T)return;const x=T.closest("[data-cb]"),z=x==null?void 0:x.getAttribute("data-cb");z&&((D=t.message.snippet)!=null&&D.sequence)&&y("action",z,t.message.snippet.sequence)};return(C,T)=>(c.openBlock(),c.createElementBlock("div",{class:"tw:mt-1 tw:mb-1 tw:max-w-[65%]",onClick:w,innerHTML:_.value},null,8,Wu))}}),ju=["innerHTML"],qu=c.defineComponent({__name:"MessageList",props:{messages:{},isPreview:{type:Boolean},isEmbedded:{type:Boolean},showWelcome:{type:Boolean},sectionBorderRadius:{},isLoading:{type:Boolean},isStreaming:{type:Boolean},configDesignClass:{},activeMessage:{},traceLastShown:{type:Boolean},isProduction:{type:Boolean},ttsUrl:{}},emits:["handleClickMessage","handleSnippetAction"],setup(r,{emit:e}){const t=c.ref(null),s=r,n=e,i=m=>{m.meta&&n("handleClickMessage",m)},o=c.computed(()=>s.messages.filter((m,p,b)=>{var k;return s.isProduction?!(m.type==="usageTokensByAI"||m.isSystem&&((k=b[p+1])!=null&&k.isSystem)):!0}));c.watch(s.messages,()=>{l()&&a()},{deep:!0});const a=()=>{c.nextTick(()=>{t.value&&(t.value.scrollTop=t.value.scrollHeight)})},l=()=>{if(!t.value)return!0;const m=t.value;return m.scrollHeight-m.scrollTop-m.clientHeight<=24},u=()=>{},d=m=>{const p=m.replace("#",""),b=parseInt(p.substr(0,2),16),k=parseInt(p.substr(2,2),16),v=parseInt(p.substr(4,2),16),y=Math.max(0,b-12),_=Math.max(0,k-12),w=Math.max(0,v-12);return`linear-gradient(180deg, rgba(${y}, ${_}, ${w}, 0.95) 0%, rgba(0,0,0, 0) 100%)`},f=c.computed(()=>{switch(s.configDesignClass.getKey("sections.inside.welcomeMessage.size")){case"sm":return"tw:px-1.5 tw:py-2.5";case"md":return"tw:px-3 tw:py-4";case"lg":return"tw:px-4.5 tw:py-5.5"}}),g=c.computed(()=>s.configDesignClass.getKey("sections.inside.welcomeMessage.bgType")==="gradient"?d(s.configDesignClass.getKey("sections.inside.welcomeMessage.bgColor")):s.configDesignClass.getKey("sections.inside.welcomeMessage.bgType")==="bubble"?s.configDesignClass.getKey("sections.inside.welcomeMessage.bgColor"):"transparent"),h=m=>s.configDesignClass.getKey("settings.globalRoundingRadius")?s.sectionBorderRadius.borderRadius:s.configDesignClass.getKey(m?"sections.inside.messageUser.borderRadius":"sections.inside.messageBot.borderRadius")+"px";return(m,p)=>(c.openBlock(),c.createElementBlock("ul",{class:"message-list tw:transition-all tw:overflow-y-scroll tw:flex-1 tw:list-none tw:pb-4",ref_key:"messageListRef",ref:t,onScroll:u},[m.showWelcome?(c.openBlock(),c.createElementBlock("li",{key:0,class:c.normalizeClass(["tw:transition-all",["tw:text-"+(m.configDesignClass.getKey("sections.inside.params.size")==="sm"?"xs":m.configDesignClass.getKey("sections.inside.params.size")==="md"?"sm":"base")]]),style:c.normalizeStyle({color:m.configDesignClass.getKey("sections.inside.messageUser.color"),"margin-bottom":`${m.configDesignClass.getKey("settings.gapMessageLine")}px`})},[c.createElementVNode("div",{key:"message",class:c.normalizeClass(["tw:transition-all",f.value]),style:c.normalizeStyle({borderRadius:m.configDesignClass.getKey("settings.globalRoundingRadius")?m.sectionBorderRadius.borderRadius:m.configDesignClass.getKey("sections.inside.welcomeMessage.borderRadius")+"px",color:m.configDesignClass.getKey("sections.inside.welcomeMessage.color"),background:g.value,lineHeight:m.configDesignClass.getKey("settings.lineHeight"),fontSize:m.configDesignClass.getKey("sections.inside.welcomeMessage.fontSize")+"px",letterSpacing:m.configDesignClass.getKey("settings.letterSpacing")+"px"})},[c.createElementVNode("div",{innerHTML:c.unref(cn)(m.configDesignClass.getKey("texts.welcomeMessage"))},null,8,ju)],6)],6)):c.createCommentVNode("",!0),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.value,(b,k)=>{var v;return c.openBlock(),c.createElementBlock(c.Fragment,{key:k},[b.snippet?(c.openBlock(),c.createBlock(Hu,{key:0,structure:c.unref(Fu),data:b.snippet.data,message:b,configDesignClass:m.configDesignClass,onAction:p[0]||(p[0]=(y,_)=>n("handleSnippetAction",y,_))},null,8,["structure","data","message","configDesignClass"])):(c.openBlock(),c.createBlock(c.resolveDynamicComponent(b.isUser?zu:b.isSystem?m.isProduction?Zr:Ku:Tu),{key:1,message:b,"data-component":b.isSystem?m.isProduction?"LoadingMessage":"MessageSystem":"MessageBot",style:c.normalizeStyle({borderRadius:h(b.isUser),"margin-top":`${(v=o.value[k-1])!=null&&v.isSystem&&!b.isSystem?"12px":"0px"}`,"margin-bottom":`${b.isSystem?"2px":m.configDesignClass.getKey("settings.gapMessageLine")+"px"}`,lineHeight:m.configDesignClass.getKey("settings.lineHeight"),letterSpacing:m.configDesignClass.getKey("settings.letterSpacing")+"px"}),loader:m.configDesignClass.getKey("settings.loader"),color:b.isUser?m.configDesignClass.getKey("sections.inside.messageUser.color"):m.configDesignClass.getKey("sections.inside.messageBot.color"),welcomeColor:m.configDesignClass.getKey("sections.inside.messageUser.color"),bgType:b.isUser?m.configDesignClass.getKey("sections.inside.messageUser.bgType"):m.configDesignClass.getKey("sections.inside.messageBot.bgType"),bgColor:b.isUser?m.configDesignClass.getKey("sections.inside.messageUser.bgColor"):m.configDesignClass.getKey("sections.inside.messageBot.bgColor"),size:b.isUser?m.configDesignClass.getKey("sections.inside.messageUser.size"):m.configDesignClass.getKey("sections.inside.messageBot.size"),fontSize:b.isUser?m.configDesignClass.getKey("sections.inside.messageUser.fontSize"):m.configDesignClass.getKey("sections.inside.messageBot.fontSize"),borderWidth:b.isUser?m.configDesignClass.getKey("sections.inside.messageUser.borderWidth"):m.configDesignClass.getKey("sections.inside.messageBot.borderWidth"),borderColor:b.isUser?m.configDesignClass.getKey("sections.inside.messageUser.borderColor"):m.configDesignClass.getKey("sections.inside.messageBot.borderColor"),index:k,traceLastShown:m.traceLastShown,configDesignClass:m.configDesignClass,ttsUrl:m.ttsUrl,activeMessage:m.activeMessage===b,isLast:k===o.value.length-1,onClick:y=>i(b)},null,8,["message","data-component","style","loader","color","welcomeColor","bgType","bgColor","size","fontSize","borderWidth","borderColor","index","traceLastShown","configDesignClass","ttsUrl","activeMessage","isLast","onClick"]))],64)}),128)),m.isLoading?(c.openBlock(),c.createBlock(Zr,{key:1,class:c.normalizeClass({"tw:mt-8":m.traceLastShown}),loader:m.configDesignClass.getKey("settings.loader"),configDesignClass:m.configDesignClass,text:m.configDesignClass.getKey("texts.typingLoader")},null,8,["class","loader","configDesignClass","text"])):c.createCommentVNode("",!0),c.renderSlot(m.$slots,"footer")],544))}}),Gu=c.defineComponent({__name:"ChatMessagesContainer",props:{messages:{},isPreview:{type:Boolean},isEmbedded:{type:Boolean},sectionBorderRadius:{},isLoading:{type:Boolean},isStreaming:{type:Boolean},configDesignClass:{},activeMessage:{},showWelcome:{type:Boolean},isProcessError:{type:Boolean},restartChat:{type:Function},traceLastShown:{type:Boolean},isProduction:{type:Boolean},ttsUrl:{}},emits:["handleClickMessage","update:activeMessage","handleSnippetAction"],setup(r,{emit:e}){const t=r,s=c.computed(()=>t.ttsUrl),n=e,i=c.computed({get:()=>t.activeMessage,set:o=>n("update:activeMessage",o)});return(o,a)=>(c.openBlock(),c.createElementBlock("div",{class:"tw:transition-all tw:flex tw:flex-col tw:justify-between tw:w-full tw:min-h-0",style:c.normalizeStyle([{flex:"1 1 0"},{paddingLeft:(o.configDesignClass.getKey("sections.inside.params.sidePadding")??8)+"px",paddingRight:(o.configDesignClass.getKey("sections.inside.params.sidePadding")??8)+"px",paddingTop:(o.configDesignClass.getKey("sections.inside.params.verticalPadding")??8)/2+"px"}])},[c.createVNode(qu,{messages:o.messages,isPreview:o.isPreview,isEmbedded:o.isEmbedded,configDesignClass:o.configDesignClass,isLoading:o.isLoading,isStreaming:o.isStreaming,isProduction:o.isProduction,sectionBorderRadius:o.sectionBorderRadius,showWelcome:o.showWelcome,ttsUrl:s.value,activeMessage:i.value,"onUpdate:activeMessage":a[0]||(a[0]=l=>i.value=l),traceLastShown:o.traceLastShown,onHandleClickMessage:a[1]||(a[1]=l=>o.$emit("handleClickMessage",l)),onHandleSnippetAction:a[2]||(a[2]=(l,u)=>n("handleSnippetAction",l,u))},null,8,["messages","isPreview","isEmbedded","configDesignClass","isLoading","isStreaming","isProduction","sectionBorderRadius","showWelcome","ttsUrl","activeMessage","traceLastShown"])],4))}}),Zu={key:0,class:"chat tw:w-full tw:h-full tw:flex tw:pt-0 tw:relative",style:{overflow:"hidden"}},Yu={key:0,class:"tw:w-full tw:h-full"},Xu={key:1,class:"messages tw:transition-all tw:flex tw:flex-col tw:justify-between tw:w-full"},Qu="https://hs-generator.onrender.com/api/transcribe",Ju="https://hs-generator.onrender.com/api/tts",ts=0,ed=c.defineComponent({__name:"ChatWrapper",props:{link:{},isEmbedded:{type:Boolean},isPreview:{type:Boolean},configWidget:{},configLink:{},scenario:{},scenarioOptions:{},widgetId:{},isProduction:{type:Boolean}},emits:["trace","choose-trace","restart-chat"],setup(r,{expose:e,emit:t}){const s=t,n=c.ref(!1),i=c.ref(!1),o=c.ref(null),a=c.ref(!1),l=c.ref(!1),u=c.ref(!1),d=c.ref(!1),f=c.ref(!0),g=c.ref(!1),h=c.ref(!1),m=c.ref(!1),p=c.ref(0),b=c.ref(!1),k=c.ref(null),v=r,y=async()=>{if(!(v.isPreview||v.scenario))try{s("restart-chat"),Ro(),await ys()}catch(S){console.error("Failed to restart chat connection",S)}},_=c.computed(()=>{const S=P.value.getKey("settings.position"),R=P.value.getKey("settings.offset.x"),E=P.value.getKey("settings.offset.y"),I=Y.value?P.value.getKey("settings.size.width"):P.value.getKey("sections.colapsed.width"),J=Y.value?P.value.getKey("settings.size.height"):P.value.getKey("sections.colapsed.height");return{...{...S==="topLeft"?{top:E+"px",left:R+"px"}:{},...S==="topRight"?{top:E+"px",right:R+"px"}:{},...S==="bottomLeft"?{bottom:E+"px",left:R+"px"}:{},...S==="bottomRight"?{bottom:E+"px",right:R+"px"}:{},...S==="top"?{top:E+"px",left:"50%",transform:"translateX(-50%)"}:{},...S==="bottom"?{bottom:E+"px",left:"50%",transform:"translateX(-50%)"}:{},...S==="left"?{left:R+"px",top:"50%",transform:"translateY(-50%)"}:{},...S==="right"?{right:R+"px",top:"50%",transform:"translateY(-50%)"}:{}},width:Y.value&&!j.value?I+"px":void 0,height:Y.value||j.value?J+"px":void 0}}),w=()=>{if(v.configLink)return v.configLink;const R=new URLSearchParams(window.location.search).get("config");if(R)return R},C=c.ref(null),T=c.ref(null),x=c.ref(null),z=()=>x.value?x.value:w()?T.value:v.configWidget?v.configWidget:Fe,D=c.computed(()=>{const S=z(),{isValid:R,errors:E}=tc(S);return R?S:(console.warn("[HSW] Invalid widget config, falling back to DEFAULT_CONFIG:",E),Fe)}),K=S=>{C.value=S,s("choose-trace",{action:S.type,messages:[S]})},N=async()=>{s("choose-trace",{action:"copyAll",messages:$.value})},W=async()=>{if($.value.length===0){s("choose-trace",{action:"copyLast",messages:[]});return}let S=-1;for(let E=$.value.length-1;E>=0;E--)if($.value[E].isUser){S=E;break}const R=S>=0?S:0;s("choose-trace",{action:"copyLast",messages:$.value.slice(R)})},te=async S=>{switch(S.action){case"copyLast":await W();break;case"copyIteration":await W();break;case"copyAll":await N();break}},P=c.computed(()=>new sc(D.value)),U=c.computed(()=>ci(P.value)),G=c.computed(()=>cs(P.value,8)),A=c.computed(()=>{switch(P.value.getKey("sections.bottom.params.size")){case"sm":return"tw:min-h-[25px]";case"md":return"tw:min-h-[45px]";case"lg":return"tw:min-h-[60px]"}}),Y=c.ref(!0),We=()=>{const S=o.value;if(!S)return{width:56,height:56};const R=S.querySelector(".chat-action");if(!R)return{width:56,height:56};const E=R.getBoundingClientRect();return{width:Math.max(1,E.width),height:Math.max(1,E.height)}},Se=c.ref(!1),Te=async S=>{if(Se.value)return;Se.value=!0;const R=o.value;if(!R||S===Y.value)return;const E=R.querySelector(".chatWrapper"),I=E==null?void 0:E.querySelector(".chat");if(S){const J=R.querySelector(".chat-collapsed");J&&(q.killTweensOf(J),q.to(J,{opacity:1,duration:.15,ease:"power2.in"}));const{height:me,width:He}=We();await new Promise(vs=>setTimeout(vs,150)),Y.value=!0,await c.nextTick();const Ie=Math.max(me||0,He||0)||56;q.killTweensOf(R),I&&q.killTweensOf(I),E&&q.killTweensOf(E),q.set(R,{width:Ie,height:Ie,overflow:"hidden",opacity:0,willChange:"width, height, opacity"}),E&&q.set(E,{opacity:0,willChange:"opacity"}),I&&q.set(I,{opacity:0,willChange:"opacity"}),q.set(R,{width:Ie,height:Ie,overflow:"hidden",opacity:0,willChange:"width, height, opacity"}),q.to(R,{width:P.value.getKey("settings.size.width"),height:P.value.getKey("settings.size.height"),opacity:1,duration:.4,ease:"power2.out",onComplete:()=>{q.set(R,{clearProps:"overflow,position,left,top,xPercent,yPercent,marginTop,willChange,opacity"}),Se.value=!1}}),E&&q.to(E,{opacity:1,duration:.3,delay:.35,ease:"power2.out",onComplete:()=>{q.set(E,{clearProps:"willChange,opacity"})}}),I&&q.to(I,{opacity:1,duration:.3,delay:.15,ease:"power2.out",onComplete:()=>{q.set(I,{clearProps:"willChange"})}})}else{const J=P.value.getKey("sections.colapsed.height")+P.value.getKey("sections.colapsed.borderWidth")*2;q.killTweensOf(R),I&&q.killTweensOf(I),E&&q.killTweensOf(E),q.set(R,{width:P.value.getKey("settings.size.width"),height:P.value.getKey("settings.size.height"),overflow:"hidden",willChange:"width, height, opacity"}),E&&(q.set(E,{willChange:"opacity"}),q.to(E,{opacity:0,duration:.5,ease:"power3.inOut",onComplete:()=>{q.set(E,{clearProps:"willChange,opacity"})}})),I&&(q.set(I,{willChange:"opacity"}),q.to(I,{opacity:0,duration:.2,ease:"power2.in",onComplete:()=>{q.set(I,{clearProps:"willChange"})}})),q.to(R,{width:J,height:J,opacity:0,duration:.35,marginTop:0,ease:"power2.inOut",onComplete:()=>{Y.value=!1,c.nextTick().then(()=>{const me=R.querySelector(".chat-collapsed");me&&(q.set(me,{opacity:0}),q.to(me,{opacity:1,duration:.25,ease:"power2.out"})),q.set(R,{opacity:1})}),q.set(R,{clearProps:"overflow,position,left,top,xPercent,yPercent,marginTop,willChange"}),Se.value=!1}})}},Q=c.ref(v.isPreview||!1),j=c.ref(v.isEmbedded||!1);c.watch(()=>v.isEmbedded,S=>{j.value=S});const ye=c.ref(!!v.isPreview),Je=c.ref(v.widgetId||`hsw-${Math.random().toString(36).slice(2,10)}`),$=c.ref([]),et=c.ref("");let se=null,De=0;const Gt=c.computed(()=>$.value.length>0&&$.value[$.value.length-1].isUser===!0||l.value),lt=c.ref(null),To=(S,R)=>{console.log("handleSnippetAction",S,R),lr({action:{sequence:R,command:S,data:{}}})},Le=S=>{var R;if(S.chunkId&&S.text){const E=$.value[$.value.length-1];E.chunkId===S.chunkId?((R=S.chunk)!=null&&R.start?E.text="":E.text+=S.text,E.chunk.start=!1):$.value.push(S)}else $.value.push(S)},Zt=(()=>{if(v.link)return v.link;const R=new URLSearchParams(window.location.search).get("link");if(R)return R;const I=new URLSearchParams(window.location.hash.substring(1)).get("link");if(I)return I;try{const J="ws://localhost:8080/client/widget-chat/v1/ws/?token=F0Pr83SJj0fETG0kvinAFPQREg1gRCizbwVvngwppnh9ImlN2ZlYeTkE0y0XFmj2hyiH93hjWxh0wFw7l1AxYacBwmdwO3wvUITsv63OQ2Prw6bFkR-eS508N7RExMwSatsXIoSV88nYYVfUA-eP-C55zw";if(J)return J}catch(J){console.warn("Environment variables not available:",J)}return console.log("Using fallback link: ws://localhost:3000"),"ws://localhost:3000"})(),ar=()=>{if(De>=ts){Le({text:`Failed to connect after ${ts} attempts. Please check your connection.`,isUser:!1});return}De++,console.log(`Reconnection attempt ${De}/${ts}`),setTimeout(()=>{Ws()},2e3*De)},zo=()=>{Le({text:fo.UserMessage,isUser:!0}),Le({text:"{Agent response message}",isUser:!1})},Ws=()=>{try{if(!Zt||typeof Zt!="string"){console.error("Invalid WebSocket link:",Zt),Le({text:"Error: Invalid WebSocket URL",isUser:!1});return}if(console.log("Attempting to connect to:",Zt),se=new WebSocket(Zt),!se){console.error("Failed to create WebSocket instance");return}se.onmessage=S=>{var R,E,I,J,me,He,Ie,vs,hr,fr;try{const L=JSON.parse(S.data);if(L.snippet)return Le({snippet:{...L.snippet,data:JSON.parse(L.snippet.data||"{}")},isUser:!1,isSystem:!0,isError:!1});if(L.error)return Le({text:L.error.message,isUser:!1,isSystem:!0,isError:!0});if((R=L==null?void 0:L.textChunk)!=null&&R.start&&(b.value=!0,k.value=(E=L==null?void 0:L.textChunk)==null?void 0:E.start,Le({text:"",isUser:!1,chunkId:(I=L==null?void 0:L.textChunk)==null?void 0:I.start,chunk:L==null?void 0:L.textChunk})),(J=L==null?void 0:L.textChunk)!=null&&J.end||(me=L==null?void 0:L.textChunk)!=null&&me.start){(He=L==null?void 0:L.textChunk)!=null&&He.end&&k.value&&((Ie=L==null?void 0:L.textChunk)==null?void 0:Ie.end)===k.value&&(b.value=!1,k.value=null);return}(vs=L==null?void 0:L.textChunk)!=null&&vs.text&&Le({text:L.textChunk.text,isUser:!1,chunkId:(hr=L==null?void 0:L.textChunk)==null?void 0:hr.id}),L!=null&&L.trace&&Le({text:L.trace.message,isUser:!1,isSystem:!0,meta:L.trace.meta,time:L.trace.time,type:L.trace.type}),(fr=L==null?void 0:L.trace)!=null&&fr.meta&&!v.isProduction&&s("trace",{action:L.trace.type,messages:[L.trace]})}catch(L){console.error("Error parsing WebSocket message:",L),Le({text:"Error: Failed to parse server response",isUser:!1})}},se.onopen=()=>{De=0},se.onclose=S=>{console.log("Connection closed",S);let R=`Connection closed (${S.code})`;switch(S.code){case 1e3:R="Connection closed normally";break;case 1001:R="Connection closed: going away";break;case 1006:if(d.value=!0,De<ts&&!Q.value){ar();return}break;case 1011:R="Connection closed: server error";break;default:u.value=!0}console.log(R)},se.onerror=S=>{console.error("WebSocket connection error:",S),a.value=!0,Le({text:"Connection error: Unable to connect to chat server",isUser:!1,isSystem:!0,isError:!0}),De<ts&&!Q.value&&ar()}}catch(S){console.error("Error connecting to socket server:",S),Le({text:`Connection error: ${S instanceof Error?S.message:"Unknown error"}`,isUser:!1,isSystem:!0,isError:!0})}},Ro=()=>{se&&se.close(),se=null};c.onUnmounted(()=>{se&&se.close()});const Hs=S=>{(v.isPreview||v.scenario)&&!S||Te(!Y.value)},Eo=()=>{if(!(v.isPreview||v.scenario)&&et.value.trim()!==""){if(v.isProduction&&$.value.length>0){const S=$.value[$.value.length-1];S.isSystem===!0&&!S.isError&&!S.snippet&&$.value.pop()}$.value.push({text:et.value,isUser:!0}),b.value=!0,lr({message:et.value}),et.value=""}},lr=S=>{se&&se.send(JSON.stringify(S))},cr=()=>{try{const S=P.value.getKey("settings.fontFamily")||"MacPaw Fixel",R=`https://fonts.googleapis.com/css2?family=${S.replace(/\s+/g,"+")}:wght@300;400;500;600;700&display=swap`,E=document.createElement("link");E.rel="preload",E.as="style",E.href=R,document.head.appendChild(E);const I=document.createElement("link");I.rel="stylesheet",I.href=R,I.setAttribute("data-google-font","true"),document.head.appendChild(I),o.value&&(o.value.style.fontFamily=`"${S}", sans-serif`)}catch(S){console.error("Error loading font:",S)}},ur=()=>{const S=P.value.getKey("settings.fontWeight")||400;o.value&&(o.value.style.fontWeight=S)};i.value=!0,c.watch(()=>P.value.getKey("settings.fontFamily"),()=>{cr()}),c.watch(()=>P.value.getKey("settings.fontWeight"),()=>{ur()});const Mo=async()=>{if(w()){const R=await(await fetch(w()+"config")).json();T.value=R,n.value=!0}else n.value=!0},js=(S,R,E)=>new Promise(I=>{const J=performance.now(),me=He=>{const Ie=Math.min(1,(He-J)/E);p.value=S+(R-S)*Ie,Ie<1?requestAnimationFrame(me):I()};requestAnimationFrame(me)}),dr=async S=>{m.value=!0,p.value=0,await c.nextTick(),await js(0,.3,500),S(),await js(.3,.6,200),p.value=.6,await new Promise(R=>setTimeout(R,100)),await js(.6,0,500),m.value=!1},Bo=async(S=25)=>{const R=$.value.filter(I=>!I.isUser&&!I.isSystem&&I.text);if(!R.length)return;const E=R.map(I=>I.text||"");R.forEach(I=>I.text="");for(let I=0;I<R.length;I++){const J=R[I],me=E[I];for(let He=0;He<me.length;He++)J.text=me.slice(0,He+1),await new Promise(Ie=>setTimeout(Ie,S))}},qs=async(S,R)=>{await dr(()=>{const E=Fr.getState(S,P.value,R||v.scenarioOptions);if(Y.value=E.isChatOpen,$.value=E.messages,l.value=E.traceLastShown,a.value=E.isConnectionError,u.value=E.isProcessError,d.value=E.isReconnectError,g.value=E.isInputDisabled,f.value=E.showWelcome,h.value=E.showReconnectNotice??!1,lt.value=E.snippet??null,Q.value=!0,se){try{se.close()}catch{}se=null}}),Bo()},ys=async()=>{await dr(()=>{Q.value=ye.value,f.value=!0,g.value=!1,h.value=!1,a.value=!1,u.value=!1,d.value=!1,$.value=[],Q.value||(!se||se.readyState!==1)&&Ws()})};c.onMounted(async()=>{await Mo(),cr(),ur();const S=v.scenario??Fr.getScenarioFromUrl();if(S){await qs(S);return}if(v.isPreview){zo();return}Ws()}),c.watch(()=>v.scenario,async S=>{S?await qs(S):await ys()});const ze={id:Je,setScenario:async(S,R)=>{await qs(S,R)},clearScenario:async()=>{await ys()},toggleChat:()=>{Hs(!0)},setOpen:S=>{Y.value=S},setActive:S=>{S&&!Y.value&&(Y.value=!0)},setInputDisabled:S=>{g.value=S},setShowReconnectNotice:S=>{h.value=S},setMessages:S=>{$.value=Array.isArray(S)?S:[]},pushMessage:S=>{$.value.push(S)},setSnippet:S=>{lt.value=S??null},resetToLive:async()=>{await ys()},setConfig:S=>{x.value=JSON.parse(JSON.stringify(S))},getConfig:()=>D.value},Po=()=>{const S=window;S.hswWidgets=S.hswWidgets||{},S.hswWidgets[Je.value]=ze,window.dispatchEvent(new CustomEvent("hsw:ready",{detail:{widgetId:Je.value}}))},Ao=()=>{const S=window;S.hswWidgets&&S.hswWidgets[Je.value]&&delete S.hswWidgets[Je.value]},pr=async S=>{var J;const R=S,E=(J=R.detail)==null?void 0:J.widgetId;if(E&&E!==Je.value)return;const{action:I}=R.detail;switch(I){case"setScenario":await ze.setScenario(R.detail.payload.type,R.detail.payload.options);break;case"clearScenario":await ze.clearScenario();break;case"setOpen":ze.setOpen(R.detail.payload);break;case"setActive":ze.setActive(R.detail.payload);break;case"setInputDisabled":ze.setInputDisabled(R.detail.payload);break;case"setShowReconnectNotice":ze.setShowReconnectNotice(R.detail.payload);break;case"setMessages":ze.setMessages(R.detail.payload);break;case"pushMessage":ze.pushMessage(R.detail.payload);break;case"setSnippet":ze.setSnippet(R.detail.payload);break;case"resetToLive":await ze.resetToLive();break;case"setConfig":ze.setConfig(R.detail.payload);break}};return c.onMounted(()=>{Po(),window.addEventListener("hsw:control",pr)}),c.onUnmounted(()=>{Ao(),window.removeEventListener("hsw:control",pr)}),e(ze),(S,R)=>n.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["tw:z-[999] tw:flex tw:justify-end component-isolator tw:transition-all",{"tw:fixed":!j.value,"tw:w-full":Y.value}]),style:c.normalizeStyle({letterSpacing:P.value.getKey("settings.letterSpacing")+"px",..._.value}),ref_key:"chatWrapperRef",ref:o},[c.withDirectives(c.createVNode(Gl,{toggleChat:Hs,element:P.value.getKeyObject("sections.colapsed")},null,8,["element"]),[[c.vShow,!Y.value]]),c.withDirectives(c.createElementVNode("div",{class:c.normalizeClass(["chatWrapper tw:w-full tw:backdrop-blur-[22px] tw:flex tw:items-center tw:border-0 tw:flex-col",[{"tw:h-auto tw:shadow-2xl chat-active":Y.value,"tw:shadow-lg tw:w-fit":!Y.value,"chat-embedded tw:w-full tw:h-full tw:static tw:top-0 tw:left-0":j.value}]]),style:c.normalizeStyle({background:P.value.getKey("settings.bgChat"),borderRadius:`${String(U.value)}px`})},[c.createVNode(pc,{isChatOpen:Y.value,toggleChat:Hs,configDesignClass:P.value,sectionBorderRadius:G.value,mainBorderRadius:U.value,isPreview:Q.value,isEmbedded:j.value,isProduction:S.isProduction||!1,restartChat:y},null,8,["isChatOpen","configDesignClass","sectionBorderRadius","mainBorderRadius","isPreview","isEmbedded","isProduction"]),Y.value?(c.openBlock(),c.createElementBlock("div",Zu,[a.value?(c.openBlock(),c.createElementBlock("div",Yu,[c.createElementVNode("div",{class:"tw:absolute tw:left-0 tw:top-0 tw:w-full tw:h-full",style:c.normalizeStyle({padding:P.value.getKey("sections.warnings.launchIssue.content.sidePadding")+"px"})},[c.createVNode(un,{type:"launchIssue",class:"tw:h-full",headlineText:P.value.getKey("texts.launchIssueTitle"),descriptionText:P.value.getKeyObject("texts.launchIssueText"),warningElement:P.value.getKeyObject("sections.warnings.launchIssue"),configDesignClass:P.value,isProcessError:u.value,restartChat:y},null,8,["headlineText","descriptionText","warningElement","configDesignClass","isProcessError"])],4)])):(c.openBlock(),c.createElementBlock("div",Xu,[c.createVNode(Gu,{messages:$.value,isPreview:Q.value,isEmbedded:j.value,configDesignClass:P.value,isLoading:Gt.value,isStreaming:b.value,isProduction:S.isProduction,sectionBorderRadius:G.value,showWelcome:f.value,ttsUrl:Ju,activeMessage:C.value,"onUpdate:activeMessage":R[0]||(R[0]=E=>C.value=E),isProcessError:u.value,snippet:lt.value,traceLastShown:l.value,onHandleClickMessage:K,onHandleSnippetAction:To,restartChat:y},null,8,["messages","isPreview","isEmbedded","configDesignClass","isLoading","isStreaming","isProduction","sectionBorderRadius","showWelcome","activeMessage","isProcessError","snippet","traceLastShown"]),u.value?(c.openBlock(),c.createElementBlock("div",{key:0,style:c.normalizeStyle({padding:P.value.getKey("sections.warnings.connectionIssue.content.sidePadding")+"px"})},[c.createVNode(un,{type:"connectionIssue",headlineText:P.value.getKey("texts.issueText"),configDesignClass:P.value,warningElement:P.value.getKeyObject("sections.warnings.connectionIssue"),restartChat:y},null,8,["headlineText","configDesignClass","warningElement"])],4)):(c.openBlock(),c.createBlock(Sc,{key:1,messageText:et.value,"onUpdate:messageText":R[1]||(R[1]=E=>et.value=E),isProduction:S.isProduction||!1,configDesignClass:P.value,sectionBorderRadius:G.value,classSize:A.value,sendMessage:Eo,isInputDisabled:g.value,showReconnectNotice:h.value,restartChat:y,isStreaming:b.value,transcribeUrl:Qu,onTrace:te},null,8,["messageText","isProduction","configDesignClass","sectionBorderRadius","classSize","isInputDisabled","showReconnectNotice","isStreaming"]))]))])):c.createCommentVNode("",!0),c.createVNode(c.Transition,{name:"fade"},{default:c.withCtx(()=>[m.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:"tw:absolute tw:inset-0 tw:backdrop-blur-[40px] tw:z-[1000]",style:c.normalizeStyle({borderRadius:`${String(U.value)}px`,backgroundColor:`rgba(0,0,0, ${p.value})`})},null,4)):c.createCommentVNode("",!0)]),_:1})],6),[[c.vShow,i.value&&Y.value]])],6)):c.createCommentVNode("",!0)}}),Qe=r=>{const e=window,t=r||Object.keys(e.hswWidgets||{})[0];if(!e.hswWidgets||!e.hswWidgets[t])throw new Error("HSW widget API not ready. Wait for hsw:ready event or pass correct widgetId");return e.hswWidgets[t]},td=async(r,e,t)=>Qe(t).setScenario(r,e),sd=async r=>Qe(r).clearScenario(),nd=(r,e)=>Qe(e).setOpen(r),rd=(r,e)=>Qe(e).setActive(r),id=(r,e)=>Qe(e).setInputDisabled(r),od=(r,e)=>Qe(e).setShowReconnectNotice(r),ad=(r,e)=>Qe(e).setMessages(r),ld=(r,e)=>Qe(e).pushMessage(r),cd=(r,e)=>Qe(e).setSnippet(r),ud=async r=>Qe(r).resetToLive();exports.ChatWrapper=ed;exports.clearScenario=sd;exports.cn=Pn;exports.pushMessage=ld;exports.resetToLive=ud;exports.setActive=rd;exports.setInputDisabled=id;exports.setMessages=ad;exports.setOpen=nd;exports.setScenario=td;exports.setShowReconnectNotice=od;exports.setSnippet=cd;
|