@yartsun/hypershadow-widget 0.1.5 → 0.1.7
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 +5 -5
- package/dist/lib/index.es.js +3149 -2787
- package/dist/lib/style.css +1 -1
- package/dist/standalone/hs-widget.css +1 -1
- package/dist/standalone/hs-widget.es.js +4428 -4402
- package/dist/standalone/hs-widget.iife.js +12 -12
- package/dist/static/widget/v1/chat/assets/ChatWrapper.vue_vue_type_style_index_0_lang-CAUPZotr.js +26 -0
- package/dist/static/widget/v1/chat/assets/{federation-expose-Chat-Bm8Hs5nl.js → federation-expose-Chat-t2vw-QRr.js} +1 -1
- package/dist/static/widget/v1/chat/assets/{index-DzIXELKk.js → index-DevGU4BY.js} +1 -1
- package/dist/static/widget/v1/chat/assets/remoteChat.js +1 -1
- package/dist/static/widget/v1/chat/assets/style-kFOC9_Hz.css +1 -0
- package/dist/static/widget/v1/chat/index.html +3 -3
- package/package.json +8 -2
- 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 Kr=Object.defineProperty;var Nr=(i,e,t)=>e in i?Kr(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var ue=(i,e,t)=>Nr(i,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue");function fi(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=fi(i[e]))&&(s&&(s+=" "),s+=t)}else for(t in i)i[t]&&(s&&(s+=" "),s+=t);return s}function gi(){for(var i,e,t=0,s="",n=arguments.length;t<n;t++)(i=arguments[t])&&(e=fi(i))&&(s&&(s+=" "),s+=e);return s}const Vn=i=>typeof i=="boolean"?`${i}`:i===0?"0":i,In=gi,Fr=(i,e)=>t=>{var s;if((e==null?void 0:e.variants)==null)return In(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=Vn(d)||Vn(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},{}),c=e==null||(s=e.compoundVariants)===null||s===void 0?void 0:s.reduce((u,d)=>{let{class:p,className:h,...m}=d;return Object.entries(m).every(g=>{let[f,y]=g;return Array.isArray(y)?y.includes({...r,...a}[f]):{...r,...a}[f]===y})?[...u,p,h]:u},[]);return In(i,o,c,t==null?void 0:t.class,t==null?void 0:t.className)};function pi(i){return i?i.flatMap(e=>e.type===l.Fragment?pi(e.children):[e]):[]}const Wr=l.defineComponent({name:"PrimitiveSlot",inheritAttrs:!1,setup(i,{attrs:e,slots:t}){return()=>{var c;if(!t.default)return null;const s=pi(t.default()),n=s.findIndex(u=>u.type!==l.Comment);if(n===-1)return s;const r=s[n];(c=r.props)==null||delete c.ref;const o=r.props?l.mergeProps(e,r.props):e,a=l.cloneVNode({...r,props:{}},o);return s.length===1?a:(s[n]=a,s)}}}),$r=["area","img","input"],Ur=l.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"&&$r.includes(s)?()=>l.h(s,e):s!=="template"?()=>l.h(i.as,e,{default:t.default}):()=>l.h(Wr,e,{default:t.default})}}),ln="-",Hr=i=>{const e=Gr(i),{conflictingClassGroups:t,conflictingClassGroupModifiers:s}=i;return{getClassGroupId:o=>{const a=o.split(ln);return a[0]===""&&a.length!==1&&a.shift(),hi(a,e)||jr(o)},getConflictingClassGroupIds:(o,a)=>{const c=t[o]||[];return a&&s[o]?[...c,...s[o]]:c}}},hi=(i,e)=>{var o;if(i.length===0)return e.classGroupId;const t=i[0],s=e.nextPart.get(t),n=s?hi(i.slice(1),s):void 0;if(n)return n;if(e.validators.length===0)return;const r=i.join(ln);return(o=e.validators.find(({validator:a})=>a(r)))==null?void 0:o.classGroupId},Kn=/^\[(.+)\]$/,jr=i=>{if(Kn.test(i)){const e=Kn.exec(i)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},Gr=i=>{const{theme:e,classGroups:t}=i,s={nextPart:new Map,validators:[]};for(const n in t)Ks(t[n],s,n,e);return s},Ks=(i,e,t,s)=>{i.forEach(n=>{if(typeof n=="string"){const r=n===""?e:Nn(e,n);r.classGroupId=t;return}if(typeof n=="function"){if(Zr(n)){Ks(n(s),e,t,s);return}e.validators.push({validator:n,classGroupId:t});return}Object.entries(n).forEach(([r,o])=>{Ks(o,Nn(e,r),t,s)})})},Nn=(i,e)=>{let t=i;return e.split(ln).forEach(s=>{t.nextPart.has(s)||t.nextPart.set(s,{nextPart:new Map,validators:[]}),t=t.nextPart.get(s)}),t},Zr=i=>i.isThemeGetter,qr=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)}}},Ns="!",Fs=":",Yr=Fs.length,Xr=i=>{const{prefix:e,experimentalParseClassName:t}=i;let s=n=>{const r=[];let o=0,a=0,c=0,u;for(let g=0;g<n.length;g++){let f=n[g];if(o===0&&a===0){if(f===Fs){r.push(n.slice(c,g)),c=g+Yr;continue}if(f==="/"){u=g;continue}}f==="["?o++:f==="]"?o--:f==="("?a++:f===")"&&a--}const d=r.length===0?n:n.substring(c),p=Jr(d),h=p!==d,m=u&&u>c?u-c:void 0;return{modifiers:r,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}};if(e){const n=e+Fs,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},Jr=i=>i.endsWith(Ns)?i.substring(0,i.length-1):i.startsWith(Ns)?i.substring(1):i,Qr=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}},eo=i=>({cache:qr(i.cacheSize),parseClassName:Xr(i),sortModifiers:Qr(i),...Hr(i)}),to=/\s+/,so=(i,e)=>{const{parseClassName:t,getClassGroupId:s,getConflictingClassGroupIds:n,sortModifiers:r}=e,o=[],a=i.trim().split(to);let c="";for(let u=a.length-1;u>=0;u-=1){const d=a[u],{isExternal:p,modifiers:h,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:f}=t(d);if(p){c=d+(c.length>0?" "+c:c);continue}let y=!!f,_=s(y?g.substring(0,f):g);if(!_){if(!y){c=d+(c.length>0?" "+c:c);continue}if(_=s(g),!_){c=d+(c.length>0?" "+c:c);continue}y=!1}const b=r(h).join(":"),w=m?b+Ns:b,C=w+_;if(o.includes(C))continue;o.push(C);const v=n(_,y);for(let k=0;k<v.length;++k){const z=v[k];o.push(w+z)}c=d+(c.length>0?" "+c:c)}return c};function no(){let i=0,e,t,s="";for(;i<arguments.length;)(e=arguments[i++])&&(t=mi(e))&&(s&&(s+=" "),s+=t);return s}const mi=i=>{if(typeof i=="string")return i;let e,t="";for(let s=0;s<i.length;s++)i[s]&&(e=mi(i[s]))&&(t&&(t+=" "),t+=e);return t};function io(i,...e){let t,s,n,r=o;function o(c){const u=e.reduce((d,p)=>p(d),i());return t=eo(u),s=t.cache.get,n=t.cache.set,r=a,a(c)}function a(c){const u=s(c);if(u)return u;const d=so(c,t);return n(c,d),d}return function(){return r(no.apply(null,arguments))}}const ae=i=>{const e=t=>t[i]||[];return e.isThemeGetter=!0,e},yi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,wi=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ro=/^\d+\/\d+$/,oo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ao=/\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$/,lo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,co=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,uo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xt=i=>ro.test(i),I=i=>!!i&&!Number.isNaN(Number(i)),st=i=>!!i&&Number.isInteger(Number(i)),Ms=i=>i.endsWith("%")&&I(i.slice(0,-1)),Ye=i=>oo.test(i),fo=()=>!0,go=i=>ao.test(i)&&!lo.test(i),bi=()=>!1,po=i=>co.test(i),ho=i=>uo.test(i),mo=i=>!B(i)&&!E(i),yo=i=>Vt(i,Ci,bi),B=i=>yi.test(i),ft=i=>Vt(i,xi,go),Rs=i=>Vt(i,Co,I),Fn=i=>Vt(i,vi,bi),wo=i=>Vt(i,_i,ho),ls=i=>Vt(i,Si,po),E=i=>wi.test(i),Wt=i=>It(i,xi),bo=i=>It(i,xo),Wn=i=>It(i,vi),vo=i=>It(i,Ci),_o=i=>It(i,_i),cs=i=>It(i,Si,!0),Vt=(i,e,t)=>{const s=yi.exec(i);return s?s[1]?e(s[1]):t(s[2]):!1},It=(i,e,t=!1)=>{const s=wi.exec(i);return s?s[1]?e(s[1]):t:!1},vi=i=>i==="position"||i==="percentage",_i=i=>i==="image"||i==="url",Ci=i=>i==="length"||i==="size"||i==="bg-size",xi=i=>i==="length",Co=i=>i==="number",xo=i=>i==="family-name",Si=i=>i==="shadow",So=()=>{const i=ae("color"),e=ae("font"),t=ae("text"),s=ae("font-weight"),n=ae("tracking"),r=ae("leading"),o=ae("breakpoint"),a=ae("container"),c=ae("spacing"),u=ae("radius"),d=ae("shadow"),p=ae("inset-shadow"),h=ae("text-shadow"),m=ae("drop-shadow"),g=ae("blur"),f=ae("perspective"),y=ae("aspect"),_=ae("ease"),b=ae("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"],v=()=>[...C(),E,B],k=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],x=()=>[E,B,c],T=()=>[xt,"full","auto",...x()],L=()=>[st,"none","subgrid",E,B],W=()=>["auto",{span:["full",st,E,B]},st,E,B],K=()=>[st,"auto",E,B],$=()=>["auto","min","max","fr",E,B],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],P=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...x()],j=()=>[xt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],D=()=>[i,E,B],G=()=>[...C(),Wn,Fn,{position:[E,B]}],Ke=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ce=()=>["auto","cover","contain",vo,yo,{size:[E,B]}],xe=()=>[Ms,Wt,ft],q=()=>["","none","full",u,E,B],U=()=>["",I,Wt,ft],me=()=>["solid","dashed","dotted","double"],Ze=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>[I,Ms,Wn,Fn],qe=()=>["","none",g,E,B],Q=()=>["none",I,E,B],Ee=()=>["none",I,E,B],Nt=()=>[I,E,B],tt=()=>[xt,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ye],breakpoint:[Ye],color:[fo],container:[Ye],"drop-shadow":[Ye],ease:["in","out","in-out"],font:[mo],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ye],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ye],shadow:[Ye],spacing:["px",I],text:[Ye],"text-shadow":[Ye],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xt,B,E,y]}],container:["container"],columns:[{columns:[I,B,E,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:v()}],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:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[st,"auto",E,B]}],basis:[{basis:[xt,"full","auto",a,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[I,xt,"auto","initial","none",B]}],grow:[{grow:["",I,E,B]}],shrink:[{shrink:["",I,E,B]}],order:[{order:[st,"first","last","none",E,B]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:W()}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:W()}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$()}],"auto-rows":[{"auto-rows":$()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...P(),"normal"]}],"justify-self":[{"justify-self":["auto",...P()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...P(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...P(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"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:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:j()}],w:[{w:[a,"screen",...j()]}],"min-w":[{"min-w":[a,"screen","none",...j()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...j()]}],h:[{h:["screen","lh",...j()]}],"min-h":[{"min-h":["screen","lh","none",...j()]}],"max-h":[{"max-h":["screen","lh",...j()]}],"font-size":[{text:["base",t,Wt,ft]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,E,Rs]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ms,B]}],"font-family":[{font:[bo,B,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,E,B]}],"line-clamp":[{"line-clamp":[I,"none",E,Rs]}],leading:[{leading:[r,...x()]}],"list-image":[{"list-image":["none",E,B]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",E,B]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:[I,"from-font","auto",E,ft]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[I,"auto",E,B]}],"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",E,B]}],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",E,B]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:G()}],"bg-repeat":[{bg:Ke()}],"bg-size":[{bg:Ce()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},st,E,B],radial:["",E,B],conic:[st,E,B]},_o,wo]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:xe()}],"gradient-via-pos":[{via:xe()}],"gradient-to-pos":[{to:xe()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],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:U()}],"border-w-x":[{"border-x":U()}],"border-w-y":[{"border-y":U()}],"border-w-s":[{"border-s":U()}],"border-w-e":[{"border-e":U()}],"border-w-t":[{"border-t":U()}],"border-w-r":[{"border-r":U()}],"border-w-b":[{"border-b":U()}],"border-w-l":[{"border-l":U()}],"divide-x":[{"divide-x":U()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":U()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...me(),"hidden","none"]}],"divide-style":[{divide:[...me(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...me(),"none","hidden"]}],"outline-offset":[{"outline-offset":[I,E,B]}],"outline-w":[{outline:["",I,Wt,ft]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",d,cs,ls]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",p,cs,ls]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[I,ft]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":U()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",h,cs,ls]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[I,E,B]}],"mix-blend":[{"mix-blend":[...Ze(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ze()}],"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":V()}],"mask-image-linear-to-pos":[{"mask-linear-to":V()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":V()}],"mask-image-t-to-pos":[{"mask-t-to":V()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":V()}],"mask-image-r-to-pos":[{"mask-r-to":V()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":V()}],"mask-image-b-to-pos":[{"mask-b-to":V()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":V()}],"mask-image-l-to-pos":[{"mask-l-to":V()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":V()}],"mask-image-x-to-pos":[{"mask-x-to":V()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":V()}],"mask-image-y-to-pos":[{"mask-y-to":V()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[E,B]}],"mask-image-radial-from-pos":[{"mask-radial-from":V()}],"mask-image-radial-to-pos":[{"mask-radial-to":V()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"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":V()}],"mask-image-conic-to-pos":[{"mask-conic-to":V()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:G()}],"mask-repeat":[{mask:Ke()}],"mask-size":[{mask:Ce()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",E,B]}],filter:[{filter:["","none",E,B]}],blur:[{blur:qe()}],brightness:[{brightness:[I,E,B]}],contrast:[{contrast:[I,E,B]}],"drop-shadow":[{"drop-shadow":["","none",m,cs,ls]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",I,E,B]}],"hue-rotate":[{"hue-rotate":[I,E,B]}],invert:[{invert:["",I,E,B]}],saturate:[{saturate:[I,E,B]}],sepia:[{sepia:["",I,E,B]}],"backdrop-filter":[{"backdrop-filter":["","none",E,B]}],"backdrop-blur":[{"backdrop-blur":qe()}],"backdrop-brightness":[{"backdrop-brightness":[I,E,B]}],"backdrop-contrast":[{"backdrop-contrast":[I,E,B]}],"backdrop-grayscale":[{"backdrop-grayscale":["",I,E,B]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[I,E,B]}],"backdrop-invert":[{"backdrop-invert":["",I,E,B]}],"backdrop-opacity":[{"backdrop-opacity":[I,E,B]}],"backdrop-saturate":[{"backdrop-saturate":[I,E,B]}],"backdrop-sepia":[{"backdrop-sepia":["",I,E,B]}],"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",E,B]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[I,"initial",E,B]}],ease:[{ease:["linear","initial",_,E,B]}],delay:[{delay:[I,E,B]}],animate:[{animate:["none",b,E,B]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[f,E,B]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:Q()}],"rotate-x":[{"rotate-x":Q()}],"rotate-y":[{"rotate-y":Q()}],"rotate-z":[{"rotate-z":Q()}],scale:[{scale:Ee()}],"scale-x":[{"scale-x":Ee()}],"scale-y":[{"scale-y":Ee()}],"scale-z":[{"scale-z":Ee()}],"scale-3d":["scale-3d"],skew:[{skew:Nt()}],"skew-x":[{"skew-x":Nt()}],"skew-y":[{"skew-y":Nt()}],transform:[{transform:[E,B,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:tt()}],"translate-x":[{"translate-x":tt()}],"translate-y":[{"translate-y":tt()}],"translate-z":[{"translate-z":tt()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"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",E,B]}],"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",E,B]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[I,Wt,ft,Rs]}],stroke:[{stroke:["none",...D()]}],"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"]}},ko=io(So);function cn(...i){return ko(gi(i))}const ot=l.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)=>(l.openBlock(),l.createBlock(l.unref(Ur),{"data-slot":"button",as:t.as,"as-child":t.asChild,class:l.normalizeClass(l.unref(cn)(l.unref(To)({variant:t.variant,size:t.size}),e.class))},{default:l.withCtx(()=>[l.renderSlot(t.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),To=Fr("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"}}),zo={md:16};function ki(i){const e=i.getKey("settings.borderRadius")??16;return typeof e!="number"?zo.md:e}function Mo(i,e=8){if(i<=0)return 0;const t=i-e;return t<=0?4:Math.max(4,t)}function Xt(i,e=8){const t=ki(i);return{borderRadius:`${Mo(t,e)}px`}}const Ws=i=>i?i.replace(/<br>/g,"<br />").replace(/\n/g,"<br />"):"",Ro=["innerHTML"],Bo=["innerHTML"],Eo=["innerHTML"],Po=["width","height"],Do=`
|
|
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>`,$s=l.defineComponent({__name:"ChatError",props:{warningElement:{},headlineText:{},descriptionText:{},resetButtonText:{},type:{},configDesignClass:{},borderOffset:{},restartChat:{type:Function}},setup(i){const e=i,t=l.computed(()=>{var c,u;return(c=e.configDesignClass)!=null&&c.getKey("settings.globalRoundingRadius")?Xt(e.configDesignClass,8):{borderRadius:((u=e.warningElement.resetButton)==null?void 0:u.borderRadius)+"px"}}),s=l.computed(()=>{var u;const c=(u=e.configDesignClass)!=null&&u.getKey("settings.globalRoundingRadius")?Xt(e.configDesignClass,8):{borderRadius:e.warningElement.content.borderRadius+"px"};return e.warningElement.warningStyle==="gradient"?{...c,"border-bottom-left-radius":"0px !important","border-bottom-right-radius":"0px !important"}:c}),n=l.computed(()=>{const c=e.warningElement.content.bgColor;if(e.warningElement.warningStyle==="gradient"){const u=c==null?void 0:c.match(/rgba?\(([^)]+)\)/);if(u){const[d,p,h]=u[1].split(",").map(m=>m.trim());return{background:`linear-gradient(180deg, ${c} 0%, rgba(${d}, ${p}, ${h}, 0) 100%)`}}else if(c!=null&&c.startsWith("#")){const d=c.replace("#",""),p=parseInt(d.substr(0,2),16),h=parseInt(d.substr(2,2),16),m=parseInt(d.substr(4,2),16);return{background:`linear-gradient(180deg, ${c} 0%, rgba(${p}, ${h}, ${m}, 0) 100%)`}}}else if(e.warningElement.warningStyle==="faded"){const u=c==null?void 0:c.match(/rgba?\(([^)]+)\)/);if(u){const[d,p,h]=u[1].split(",").map(m=>m.trim());return{backgroundColor:`rgba(${d}, ${p}, ${h}, 0.2)`,border:`1px solid ${c}`}}else if(c!=null&&c.startsWith("#")){const d=c.replace("#",""),p=parseInt(d.substr(0,2),16),h=parseInt(d.substr(2,2),16),m=parseInt(d.substr(4,2),16);return{backgroundColor:`rgba(${p}, ${h}, ${m}, 0.2)`,border:`1px solid ${c}`}}}return{backgroundColor:c}}),r=l.computed(()=>{var u,d,p;const c=((p=(d=(u=e.warningElement)==null?void 0:u.content)==null?void 0:d.icon)==null?void 0:p.src)||Do;try{const g=new DOMParser().parseFromString(String(c),"image/svg+xml").documentElement;return g.setAttribute("width","1em"),g.setAttribute("height","1em"),g.querySelectorAll("[fill], [stroke]").forEach(y=>{const _=y.getAttribute("fill");_&&_!=="none"&&!_.startsWith("url(")&&y.setAttribute("fill","currentColor");const b=y.getAttribute("stroke");b&&b!=="none"&&!b.startsWith("url(")&&y.setAttribute("stroke","currentColor")}),g.outerHTML}catch{return String(c)}}),o=l.computed(()=>e.type==="launchIssue"?"24px":"16px"),a=l.computed(()=>e.warningElement.resetButton?{backgroundColor:e.warningElement.resetButton.bgColor,color:e.warningElement.resetButton.color}:{});return(c,u)=>{var d,p,h,m,g,f,y,_,b,w,C;return l.openBlock(),l.createElementBlock("div",{class:l.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":c.type==="connectionIssue"||c.type==="reconnecting","tw:flex-col tw:items-center tw:justify-center tw:h-full":c.type==="launchIssue","tw:p-4":c.warningElement.warningStyle==="gradient","tw:p-2":c.warningElement.warningStyle!=="gradient"}]),style:l.normalizeStyle({...n.value,...s.value,paddingTop:(((d=c.warningElement.content)==null?void 0:d.verticalPadding)||null)+"px",paddingBottom:(((p=c.warningElement.content)==null?void 0:p.verticalPadding)||null)+"px"})},[l.createElementVNode("div",{class:l.normalizeClass(["tw:flex tw:gap-1 tw:items-center svg-inherit",{"tw:flex-row":c.type==="connectionIssue"||c.type==="reconnecting","tw:flex-col ":c.type==="launchIssue"}]),style:l.normalizeStyle({gap:(((h=c.warningElement.content)==null?void 0:h.verticalSpacing)||4)+"px"})},[(m=c.warningElement.content.icon)!=null&&m.showIcon?(l.openBlock(),l.createElementBlock("div",{key:0,style:l.normalizeStyle({color:((g=c.warningElement.content.icon)==null?void 0:g.color)||c.warningElement.content.color,fontSize:o.value,width:(((f=c.warningElement.content.icon)==null?void 0:f.size)||16)+"px",height:(((y=c.warningElement.content.icon)==null?void 0:y.size)||16)+"px"}),class:l.normalizeClass({"tw:w-4 tw:h-4 tw:animate-spin":c.type==="reconnecting"}),innerHTML:r.value},null,14,Ro)):l.createCommentVNode("",!0),l.createElementVNode("div",{class:l.normalizeClass(["tw:transition-all tw:justify-center tw:text-center tw:leading-none",{"tw:text-left tw:text-xs":c.type==="connectionIssue"||c.type==="reconnecting","tw:text-center tw:text-sm":c.type==="launchIssue"}]),innerHTML:l.unref(Ws)(c.headlineText),style:l.normalizeStyle({color:((_=c.warningElement.content)==null?void 0:_.headlineColor)||c.warningElement.content.color,fontSize:(((b=c.warningElement.content)==null?void 0:b.headlineTextSize)||c.warningElement.content.fontSize)+"px"})},null,14,Bo),l.createElementVNode("p",{class:"tw:text-center tw:justify-center tw:text-xs tw:leading-none",style:l.normalizeStyle({color:c.warningElement.content.color,fontSize:(((w=c.warningElement.content)==null?void 0:w.subTextSize)||c.warningElement.content.fontSize)+"px"}),innerHTML:l.unref(Ws)(c.descriptionText)},null,12,Eo)],6),c.warningElement.resetButton?(l.openBlock(),l.createBlock(l.unref(ot),{key:0,size:(C=c.warningElement.resetButton)==null?void 0:C.size,class:l.normalizeClass([{"tw:mt-8":c.type==="launchIssue"||c.type==="reconnecting"}]),variant:"default",style:l.normalizeStyle([a.value,t.value]),onClick:c.restartChat},{default:l.withCtx(()=>{var v,k;return[((v=c.warningElement.resetButton)==null?void 0:v.showType)!=="text"?(l.openBlock(),l.createElementBlock("svg",{key:0,width:c.warningElement.resetButton.fontSize?c.warningElement.resetButton.fontSize+4:16,height:c.warningElement.resetButton.fontSize?c.warningElement.resetButton.fontSize+4:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:l.normalizeStyle({fill:c.warningElement.resetButton.color||"#2F2F31"})},u[0]||(u[0]=[l.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,Po)):l.createCommentVNode("",!0),((k=c.warningElement.resetButton)==null?void 0:k.showType)!=="icon"?(l.openBlock(),l.createElementBlock("span",{key:1,style:l.normalizeStyle({fontSize:c.warningElement.resetButton.fontSize+"px"})},l.toDisplayString(c.resetButtonText||"Restart"),5)):l.createCommentVNode("",!0)]}),_:1},8,["size","class","style","onClick"])):l.createCommentVNode("",!0)],6)}}});function Xe(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Ti(i,e){i.prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__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 Me={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Et={duration:.5,overwrite:!1,delay:0},un,ce,X,He=1e8,fe=1/He,Us=Math.PI*2,Ao=Us/4,Lo=0,zi=Math.sqrt,Oo=Math.cos,Vo=Math.sin,le=function(e){return typeof e=="string"},ne=function(e){return typeof e=="function"},Qe=function(e){return typeof e=="number"},dn=function(e){return typeof e>"u"},je=function(e){return typeof e=="object"},ye=function(e){return e!==!1},fn=function(){return typeof window<"u"},us=function(e){return ne(e)||le(e)},Mi=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},ge=Array.isArray,Hs=/(?:-?\.?\d|\.)+/gi,Ri=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Tt=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,Bs=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,Bi=/[+-]=-?[.\d]+/,Ei=/[^,'"\[\]\s]+/gi,Io=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,te,We,js,gn,Re={},ps={},Pi,Di=function(e){return(ps=Pt(e,Re))&&_e},pn=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},Jt=function(e,t){return!t&&console.warn(e)},Ai=function(e,t){return e&&(Re[e]=t)&&ps&&(ps[e]=t)||Re},Qt=function(){return 0},Ko={suppressEvents:!0,isStart:!0,kill:!1},ds={suppressEvents:!0,kill:!1},No={suppressEvents:!0},hn={},at=[],Gs={},Li,ke={},Es={},$n=30,fs=[],mn="",yn=function(e){var t=e[0],s,n;if(je(t)||ne(t)||(e=[e]),!(s=(t._gsap||{}).harness)){for(n=fs.length;n--&&!fs[n].targetTest(t););s=fs[n]}for(n=e.length;n--;)e[n]&&(e[n]._gsap||(e[n]._gsap=new rr(e[n],s)))||e.splice(n,1);return e},yt=function(e){return e._gsap||yn(Le(e))[0]._gsap},Oi=function(e,t,s){return(s=e[t])&&ne(s)?e[t]():dn(s)&&e.getAttribute&&e.getAttribute(t)||s},we=function(e,t){return(e=e.split(",")).forEach(t)||e},ie=function(e){return Math.round(e*1e5)/1e5||0},oe=function(e){return Math.round(e*1e7)/1e7||0},Mt=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},Fo=function(e,t){for(var s=t.length,n=0;e.indexOf(t[n])<0&&++n<s;);return n<s},hs=function(){var e=at.length,t=at.slice(0),s,n;for(Gs={},at.length=0,s=0;s<e;s++)n=t[s],n&&n._lazy&&(n.render(n._lazy[0],n._lazy[1],!0)._lazy=0)},wn=function(e){return!!(e._initted||e._startAt||e.add)},Vi=function(e,t,s,n){at.length&&!ce&&hs(),e.render(t,s,!!(ce&&t<0&&wn(e))),at.length&&!ce&&hs()},Ii=function(e){var t=parseFloat(e);return(t||t===0)&&(e+"").match(Ei).length<2?t:le(e)?e.trim():e},Ki=function(e){return e},Be=function(e,t){for(var s in t)s in e||(e[s]=t[s]);return e},Wo=function(e){return function(t,s){for(var n in s)n in t||n==="duration"&&e||n==="ease"||(t[n]=s[n])}},Pt=function(e,t){for(var s in t)e[s]=t[s];return e},Un=function i(e,t){for(var s in t)s!=="__proto__"&&s!=="constructor"&&s!=="prototype"&&(e[s]=je(t[s])?i(e[s]||(e[s]={}),t[s]):t[s]);return e},ms=function(e,t){var s={},n;for(n in e)n in t||(s[n]=e[n]);return s},Zt=function(e){var t=e.parent||te,s=e.keyframes?Wo(ge(e.keyframes)):Be;if(ye(e.inherit))for(;t;)s(e,t.vars.defaults),t=t.parent||t._dp;return e},$o=function(e,t){for(var s=e.length,n=s===t.length;n&&s--&&e[s]===t[s];);return s<0},Ni=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},_s=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},ct=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},wt=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},Uo=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},Zs=function(e,t,s,n){return e._startAt&&(ce?e._startAt.revert(ds):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,n))},Ho=function i(e){return!e||e._ts&&i(e.parent)},Hn=function(e){return e._repeat?Dt(e._tTime,e=e.duration()+e._rDelay)*e:0},Dt=function(e,t){var s=Math.floor(e=oe(e/t));return e&&s===e?s-1:s},ys=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},Cs=function(e){return e._end=oe(e._start+(e._tDur/Math.abs(e._ts||e._rts||fe)||0))},xs=function(e,t){var s=e._dp;return s&&s.smoothChildTiming&&e._ts&&(e._start=oe(s._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),Cs(e),s._dirty||wt(s,e)),e},Fi=function(e,t){var s;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(s=ys(e.rawTime(),t),(!t._dur||rs(0,t.totalDuration(),s)-t._tTime>fe)&&t.render(s,!0)),wt(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}},$e=function(e,t,s,n){return t.parent&&ct(t),t._start=oe((Qe(s)?s:s||e!==te?Ae(e,s,t):e._time)+t._delay),t._end=oe(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),Ni(e,t,"_first","_last",e._sort?"_start":0),qs(t)||(e._recent=t),n||Fi(e,t),e._ts<0&&xs(e,e._tTime),e},Wi=function(e,t){return(Re.ScrollTrigger||pn("scrollTrigger",t))&&Re.ScrollTrigger.create(t,e)},$i=function(e,t,s,n,r){if(vn(e,t,r),!e._initted)return 1;if(!s&&e._pt&&!ce&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&Li!==Te.frame)return at.push(e),e._lazy=[r,n],1},jo=function i(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||i(t))},qs=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},Go=function(e,t,s,n){var r=e.ratio,o=t<0||!t&&(!e._start&&jo(e)&&!(!e._initted&&qs(e))||(e._ts<0||e._dp._ts<0)&&!qs(e))?0:1,a=e._rDelay,c=0,u,d,p;if(a&&e._repeat&&(c=rs(0,e._tDur,t),d=Dt(c,a),e._yoyo&&d&1&&(o=1-o),d!==Dt(e._tTime,a)&&(r=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==r||ce||n||e._zTime===fe||!t&&e._zTime){if(!e._initted&&$i(e,t,n,s,c))return;for(p=e._zTime,e._zTime=t||(s?fe:0),s||(s=t&&!p),e.ratio=o,e._from&&(o=1-o),e._time=0,e._tTime=c,u=e._pt;u;)u.r(o,u.d),u=u._next;t<0&&Zs(e,t,s,!0),e._onUpdate&&!s&&ze(e,"onUpdate"),c&&e._repeat&&!s&&e.parent&&ze(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===o&&(o&&ct(e,1),!s&&!ce&&(ze(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},Zo=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}},At=function(e,t,s,n){var r=e._repeat,o=oe(t)||0,a=e._tTime/e._tDur;return a&&!n&&(e._time*=o/e._dur),e._dur=o,e._tDur=r?r<0?1e10:oe(o*(r+1)+e._rDelay*r):o,a>0&&!n&&xs(e,e._tTime=e._tDur*a),e.parent&&Cs(e),s||wt(e.parent,e),e},jn=function(e){return e instanceof he?wt(e):At(e,e._dur)},qo={_start:0,endTime:Qt,totalDuration:Qt},Ae=function i(e,t,s){var n=e.labels,r=e._recent||qo,o=e.duration()>=He?r.endTime(!1):e._dur,a,c,u;return le(t)&&(isNaN(t)||t in n)?(c=t.charAt(0),u=t.substr(-1)==="%",a=t.indexOf("="),c==="<"||c===">"?(a>=0&&(t=t.replace(/=/,"")),(c==="<"?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]):(c=parseFloat(t.charAt(a-1)+t.substr(a+1)),u&&s&&(c=c/100*(ge(s)?s[0]:s).totalDuration()),a>1?i(e,t.substr(0,a-1),s)+c:o+c)):t==null?o:+t},qt=function(e,t,s){var n=Qe(t[1]),r=(n?2:1)+(e<2?0:1),o=t[r],a,c;if(n&&(o.duration=t[1]),o.parent=s,e){for(a=o,c=s;c&&!("immediateRender"in a);)a=c.vars.defaults||{},c=ye(c.vars.inherit)&&c.parent;o.immediateRender=ye(a.immediateRender),e<2?o.runBackwards=1:o.startAt=t[r-1]}return new re(t[0],o,t[r+1])},dt=function(e,t){return e||e===0?t(e):t},rs=function(e,t,s){return s<e?e:s>t?t:s},de=function(e,t){return!le(e)||!(t=Io.exec(e))?"":t[1]},Yo=function(e,t,s){return dt(s,function(n){return rs(e,t,n)})},Ys=[].slice,Ui=function(e,t){return e&&je(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&je(e[0]))&&!e.nodeType&&e!==We},Xo=function(e,t,s){return s===void 0&&(s=[]),e.forEach(function(n){var r;return le(n)&&!t||Ui(n,1)?(r=s).push.apply(r,Le(n)):s.push(n)})||s},Le=function(e,t,s){return X&&!t&&X.selector?X.selector(e):le(e)&&!s&&(js||!Lt())?Ys.call((t||gn).querySelectorAll(e),0):ge(e)?Xo(e,s):Ui(e)?Ys.call(e,0):e?[e]:[]},Xs=function(e){return e=Le(e)[0]||Jt("Invalid scope")||{},function(t){var s=e.current||e.nativeElement||e;return Le(t,s.querySelectorAll?s:s===e?Jt("Invalid scope")||gn.createElement("div"):e)}},Hi=function(e){return e.sort(function(){return .5-Math.random()})},ji=function(e){if(ne(e))return e;var t=je(e)?e:{each:e},s=bt(t.ease),n=t.from||0,r=parseFloat(t.base)||0,o={},a=n>0&&n<1,c=isNaN(n)||a,u=t.axis,d=n,p=n;return le(n)?d=p={center:.5,edges:.5,end:1}[n]||0:!a&&c&&(d=n[0],p=n[1]),function(h,m,g){var f=(g||t).length,y=o[f],_,b,w,C,v,k,z,x,T;if(!y){if(T=t.grid==="auto"?0:(t.grid||[1,He])[1],!T){for(z=-1e8;z<(z=g[T++].getBoundingClientRect().left)&&T<f;);T<f&&T--}for(y=o[f]=[],_=c?Math.min(T,f)*d-.5:n%T,b=T===He?0:c?f*p/T-.5:n/T|0,z=0,x=He,k=0;k<f;k++)w=k%T-_,C=b-(k/T|0),y[k]=v=u?Math.abs(u==="y"?C:w):zi(w*w+C*C),v>z&&(z=v),v<x&&(x=v);n==="random"&&Hi(y),y.max=z-x,y.min=x,y.v=f=(parseFloat(t.amount)||parseFloat(t.each)*(T>f?f-1:u?u==="y"?f/T:T:Math.max(T,f/T))||0)*(n==="edges"?-1:1),y.b=f<0?r-f:r,y.u=de(t.amount||t.each)||0,s=s&&f<0?sr(s):s}return f=(y[h]-y.min)/y.max||0,oe(y.b+(s?s(f):f)*y.v)+y.u}},Js=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(s){var n=oe(Math.round(parseFloat(s)/e)*e*t);return(n-n%1)/t+(Qe(s)?0:de(s))}},Gi=function(e,t){var s=ge(e),n,r;return!s&&je(e)&&(n=s=e.radius||He,e.values?(e=Le(e.values),(r=!Qe(e[0]))&&(n*=n)):e=Js(e.increment)),dt(t,s?ne(e)?function(o){return r=e(o),Math.abs(r-o)<=n?r:o}:function(o){for(var a=parseFloat(r?o.x:o),c=parseFloat(r?o.y:0),u=He,d=0,p=e.length,h,m;p--;)r?(h=e[p].x-a,m=e[p].y-c,h=h*h+m*m):h=Math.abs(e[p]-a),h<u&&(u=h,d=p);return d=!n||u<=n?e[d]:o,r||d===o||Qe(o)?d:d+de(o)}:Js(e))},Zi=function(e,t,s,n){return dt(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})},Jo=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)}},Qo=function(e,t){return function(s){return e(parseFloat(s))+(t||de(s))}},ea=function(e,t,s){return Yi(e,t,0,1,s)},qi=function(e,t,s){return dt(s,function(n){return e[~~t(n)]})},ta=function i(e,t,s){var n=t-e;return ge(e)?qi(e,i(0,e.length),t):dt(s,function(r){return(n+(r-e)%n)%n+e})},sa=function i(e,t,s){var n=t-e,r=n*2;return ge(e)?qi(e,i(0,e.length-1),t):dt(s,function(o){return o=(r+(o-e)%r)%r||0,e+(o>n?r-o:o)})},es=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?Ei:Hs),s+=e.substr(t,n-t)+Zi(a?r:+r[0],a?0:+r[1],+r[2]||1e-5),t=o+1;return s+e.substr(t,e.length-t)},Yi=function(e,t,s,n,r){var o=t-e,a=n-s;return dt(r,function(c){return s+((c-e)/o*a||0)})},na=function i(e,t,s,n){var r=isNaN(e+t)?0:function(m){return(1-m)*e+m*t};if(!r){var o=le(e),a={},c,u,d,p,h;if(s===!0&&(n=1)&&(s=null),o)e={p:e},t={p:t};else if(ge(e)&&!ge(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(g){g*=p;var f=Math.min(h,~~g);return d[f](g-f)},s=t}else n||(e=Pt(ge(e)?[]:{},e));if(!d){for(c in t)bn.call(a,e,c,"get",t[c]);r=function(g){return xn(g,a)||(o?e.p:e)}}}return dt(s,r)},Gn=function(e,t,s){var n=e.labels,r=He,o,a,c;for(o in n)a=n[o]-t,a<0==!!s&&a&&r>(a=Math.abs(a))&&(c=o,r=a);return c},ze=function(e,t,s){var n=e.vars,r=n[t],o=X,a=e._ctx,c,u,d;if(r)return c=n[t+"Params"],u=n.callbackScope||e,s&&at.length&&hs(),a&&(X=a),d=c?r.apply(u,c):r.call(u),X=o,d},jt=function(e){return ct(e),e.scrollTrigger&&e.scrollTrigger.kill(!!ce),e.progress()<1&&ze(e,"onInterrupt"),e},zt,Xi=[],Ji=function(e){if(e)if(e=!e.name&&e.default||e,fn()||e.headless){var t=e.name,s=ne(e),n=t&&!s&&e.init?function(){this._props=[]}:e,r={init:Qt,render:xn,add:bn,kill:ba,modifier:wa,rawVars:0},o={targetTest:0,get:0,getSetter:Cn,aliases:{},register:0};if(Lt(),e!==n){if(ke[t])return;Be(n,Be(ms(e,r),o)),Pt(n.prototype,Pt(r,ms(e,o))),ke[n.prop=t]=n,e.targetTest&&(fs.push(n),hn[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}Ai(t,n),e.register&&e.register(_e,n,be)}else Xi.push(e)},Z=255,Gt={aqua:[0,Z,Z],lime:[0,Z,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Z],navy:[0,0,128],white:[Z,Z,Z],olive:[128,128,0],yellow:[Z,Z,0],orange:[Z,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Z,0,0],pink:[Z,192,203],cyan:[0,Z,Z],transparent:[Z,Z,Z,0]},Ps=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)*Z+.5|0},Qi=function(e,t,s){var n=e?Qe(e)?[e>>16,e>>8&Z,e&Z]:0:Gt.black,r,o,a,c,u,d,p,h,m,g;if(!n){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),Gt[e])n=Gt[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&Z,n&Z,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),n=[e>>16,e>>8&Z,e&Z]}else if(e.substr(0,3)==="hsl"){if(n=g=e.match(Hs),!t)c=+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]=Ps(c+1/3,r,o),n[1]=Ps(c,r,o),n[2]=Ps(c-1/3,r,o);else if(~e.indexOf("="))return n=e.match(Ri),s&&n.length<4&&(n[3]=1),n}else n=e.match(Hs)||Gt.transparent;n=n.map(Number)}return t&&!g&&(r=n[0]/Z,o=n[1]/Z,a=n[2]/Z,p=Math.max(r,o,a),h=Math.min(r,o,a),d=(p+h)/2,p===h?c=u=0:(m=p-h,u=d>.5?m/(2-p-h):m/(p+h),c=p===r?(o-a)/m+(o<a?6:0):p===o?(a-r)/m+2:(r-o)/m+4,c*=60),n[0]=~~(c+.5),n[1]=~~(u*100+.5),n[2]=~~(d*100+.5)),s&&n.length<4&&(n[3]=1),n},er=function(e){var t=[],s=[],n=-1;return e.split(lt).forEach(function(r){var o=r.match(Tt)||[];t.push.apply(t,o),s.push(n+=o.length+1)}),t.c=s,t},Zn=function(e,t,s){var n="",r=(e+n).match(lt),o=t?"hsla(":"rgba(",a=0,c,u,d,p;if(!r)return e;if(r=r.map(function(h){return(h=Qi(h,t,1))&&o+(t?h[0]+","+h[1]+"%,"+h[2]+"%,"+h[3]:h.join(","))+")"}),s&&(d=er(e),c=s.c,c.join(n)!==d.c.join(n)))for(u=e.replace(lt,"1").split(Tt),p=u.length-1;a<p;a++)n+=u[a]+(~c.indexOf(a)?r.shift()||o+"0,0,0,0)":(d.length?d:r.length?r:s).shift());if(!u)for(u=e.split(lt),p=u.length-1;a<p;a++)n+=u[a]+r[a];return n+u[p]},lt=function(){var i="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in Gt)i+="|"+e+"\\b";return new RegExp(i+")","gi")}(),ia=/hsl[a]?\(/,tr=function(e){var t=e.join(" "),s;if(lt.lastIndex=0,lt.test(t))return s=ia.test(t),e[1]=Zn(e[1],s),e[0]=Zn(e[0],s,er(e[1])),!0},ts,Te=function(){var i=Date.now,e=500,t=33,s=i(),n=s,r=1e3/240,o=r,a=[],c,u,d,p,h,m,g=function f(y){var _=i()-n,b=y===!0,w,C,v,k;if((_>e||_<0)&&(s+=_-t),n+=_,v=n-s,w=v-o,(w>0||b)&&(k=++p.frame,h=v-p.time*1e3,p.time=v=v/1e3,o+=w+(w>=r?4:r-w),C=1),b||(c=u(f)),C)for(m=0;m<a.length;m++)a[m](v,h,k,y)};return p={time:0,frame:0,tick:function(){g(!0)},deltaRatio:function(y){return h/(1e3/(y||60))},wake:function(){Pi&&(!js&&fn()&&(We=js=window,gn=We.document||{},Re.gsap=_e,(We.gsapVersions||(We.gsapVersions=[])).push(_e.version),Di(ps||We.GreenSockGlobals||!We.gsap&&We||{}),Xi.forEach(Ji)),d=typeof requestAnimationFrame<"u"&&requestAnimationFrame,c&&p.sleep(),u=d||function(y){return setTimeout(y,o-p.time*1e3+1|0)},ts=1,g(2))},sleep:function(){(d?cancelAnimationFrame:clearTimeout)(c),ts=0,u=Qt},lagSmoothing:function(y,_){e=y||1/0,t=Math.min(_||33,e)},fps:function(y){r=1e3/(y||240),o=p.time*1e3+r},add:function(y,_,b){var w=_?function(C,v,k,z){y(C,v,k,z),p.remove(w)}:y;return p.remove(y),a[b?"unshift":"push"](w),Lt(),w},remove:function(y,_){~(_=a.indexOf(y))&&a.splice(_,1)&&m>=_&&m--},_listeners:a},p}(),Lt=function(){return!ts&&Te.wake()},N={},ra=/^[\d.\-M][\d.\-,\s]/,oa=/["']/g,aa=function(e){for(var t={},s=e.substr(1,e.length-3).split(":"),n=s[0],r=1,o=s.length,a,c,u;r<o;r++)c=s[r],a=r!==o-1?c.lastIndexOf(","):c.length,u=c.substr(0,a),t[n]=isNaN(u)?u.replace(oa,"").trim():+u,n=c.substr(a+1).trim();return t},la=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)},ca=function(e){var t=(e+"").split("("),s=N[t[0]];return s&&t.length>1&&s.config?s.config.apply(null,~e.indexOf("{")?[aa(t[1])]:la(e).split(",").map(Ii)):N._CE&&ra.test(e)?N._CE("",e):s},sr=function(e){return function(t){return 1-e(1-t)}},nr=function i(e,t){for(var s=e._first,n;s;)s instanceof he?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},bt=function(e,t){return e&&(ne(e)?e:N[e]||ca(e))||t},Ct=function(e,t,s,n){s===void 0&&(s=function(c){return 1-t(1-c)}),n===void 0&&(n=function(c){return c<.5?t(c*2)/2:1-t((1-c)*2)/2});var r={easeIn:t,easeOut:s,easeInOut:n},o;return we(e,function(a){N[a]=Re[a]=r,N[o=a.toLowerCase()]=s;for(var c in r)N[o+(c==="easeIn"?".in":c==="easeOut"?".out":".inOut")]=N[a+"."+c]=r[c]}),r},ir=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},Ds=function i(e,t,s){var n=t>=1?t:1,r=(s||(e?.3:.45))/(t<1?t:1),o=r/Us*(Math.asin(1/n)||0),a=function(d){return d===1?1:n*Math.pow(2,-10*d)*Vo((d-o)*r)+1},c=e==="out"?a:e==="in"?function(u){return 1-a(1-u)}:ir(a);return r=Us/r,c.config=function(u,d){return i(e,u,d)},c},As=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)}:ir(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;Ct(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})});N.Linear.easeNone=N.none=N.Linear.easeIn;Ct("Elastic",Ds("in"),Ds("out"),Ds());(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};Ct("Bounce",function(o){return 1-r(1-o)},r)})(7.5625,2.75);Ct("Expo",function(i){return Math.pow(2,10*(i-1))*i+i*i*i*i*i*i*(1-i)});Ct("Circ",function(i){return-(zi(1-i*i)-1)});Ct("Sine",function(i){return i===1?1:-Oo(i*Ao)+1});Ct("Back",As("in"),As("out"),As());N.SteppedEase=N.steps=Re.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-fe;return function(a){return((n*rs(0,o,a)|0)+r)*s}}};Et.ease=N["quad.out"];we("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(i){return mn+=i+","+i+"Params,"});var rr=function(e,t){this.id=Lo++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:Oi,this.set=t?t.getSetter:Cn},ss=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,At(this,+t.duration,1,1),this.data=t.data,X&&(this._ctx=X,X.data.push(this)),ts||Te.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,At(this,this._repeat<0?s:(s-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(s,n){if(Lt(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(xs(this,s),!r._dp||r.parent||Fi(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)&&$e(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),Vi(this,s,n)),this},e.time=function(s,n){return arguments.length?this.totalTime(Math.min(this.totalDuration(),s+Hn(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)+Hn(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?Dt(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?ys(this.parent._time,this):this._tTime;return this._rts=+s||0,this._ts=this._ps||s===-1e-8?0:this._rts,this.totalTime(rs(-Math.abs(this._delay),this.totalDuration(),r),n!==!1),Cs(this),Uo(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):(Lt(),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)&&$e(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?ys(n.rawTime(s),this):this._tTime:this._tTime},e.revert=function(s){s===void 0&&(s=No);var n=ce;return ce=s,wn(this)&&(this.timeline&&this.timeline.revert(s),this.totalTime(-.01,s.suppressEvents)),this.data!=="nested"&&s.kill!==!1&&this.kill(),ce=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,jn(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(s){if(arguments.length){var n=this._time;return this._rDelay=s,jn(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(Ae(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)-fe)},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=ne(s)?s:Ki,a=function(){var u=n.then;n.then=null,ne(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(){jt(this)},i}();Be(ss.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 he=function(i){Ti(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),te&&$e(s.parent||te,Xe(r),n),s.reversed&&r.reverse(),s.paused&&r.paused(!0),s.scrollTrigger&&Wi(Xe(r),s.scrollTrigger),r}var t=e.prototype;return t.to=function(n,r,o){return qt(0,arguments,this),this},t.from=function(n,r,o){return qt(1,arguments,this),this},t.fromTo=function(n,r,o,a){return qt(2,arguments,this),this},t.set=function(n,r,o){return r.duration=0,r.parent=this,Zt(r).repeatDelay||(r.repeat=0),r.immediateRender=!!r.immediateRender,new re(n,r,Ae(this,o),1),this},t.call=function(n,r,o){return $e(this,re.delayedCall(0,n,r),o)},t.staggerTo=function(n,r,o,a,c,u,d){return o.duration=r,o.stagger=o.stagger||a,o.onComplete=u,o.onCompleteParams=d,o.parent=this,new re(n,o,Ae(this,c)),this},t.staggerFrom=function(n,r,o,a,c,u,d){return o.runBackwards=1,Zt(o).immediateRender=ye(o.immediateRender),this.staggerTo(n,r,o,a,c,u,d)},t.staggerFromTo=function(n,r,o,a,c,u,d,p){return a.startAt=o,Zt(a).immediateRender=ye(a.immediateRender),this.staggerTo(n,r,a,c,u,d,p)},t.render=function(n,r,o){var a=this._time,c=this._dirty?this.totalDuration():this._tDur,u=this._dur,d=n<=0?0:oe(n),p=this._zTime<0!=n<0&&(this._initted||!u),h,m,g,f,y,_,b,w,C,v,k,z;if(this!==te&&d>c&&n>=0&&(d=c),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,y=u+this._rDelay,this._repeat<-1&&n<0)return this.totalTime(y*100+n,r,o);if(h=oe(d%y),d===c?(f=this._repeat,h=u):(v=oe(d/y),f=~~v,f&&f===v&&(h=u,f--),h>u&&(h=u)),v=Dt(this._tTime,y),!a&&this._tTime&&v!==f&&this._tTime-v*y-this._dur<=0&&(v=f),k&&f&1&&(h=u-h,z=1),f!==v&&!this._lock){var x=k&&v&1,T=x===(k&&f&1);if(f<v&&(x=!x),a=x?0:d%u?u:d,this._lock=1,this.render(a||(z?0:oe(f*y)),r,!u)._lock=0,this._tTime=d,!r&&this.parent&&ze(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,c=this._tDur,T&&(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;nr(this,z)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(b=Zo(this,oe(a),oe(h)),b&&(d-=h-(h=b._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&&!v&&(ze(this,"onStart"),this._tTime!==d))return this;if(h>=a&&n>=0)for(m=this._first;m;){if(g=m._next,(m._act||h>=m._start)&&m._ts&&b!==m){if(m.parent!==this)return this.render(n,r,o);if(m.render(m._ts>0?(h-m._start)*m._ts:(m._dirty?m.totalDuration():m._tDur)+(h-m._start)*m._ts,r,o),h!==this._time||!this._ts&&!_){b=0,g&&(d+=this._zTime=-1e-8);break}}m=g}else{m=this._last;for(var L=n<0?n:h;m;){if(g=m._prev,(m._act||L<=m._end)&&m._ts&&b!==m){if(m.parent!==this)return this.render(n,r,o);if(m.render(m._ts>0?(L-m._start)*m._ts:(m._dirty?m.totalDuration():m._tDur)+(L-m._start)*m._ts,r,o||ce&&wn(m)),h!==this._time||!this._ts&&!_){b=0,g&&(d+=this._zTime=L?-1e-8:fe);break}}m=g}}if(b&&!r&&(this.pause(),b.render(h>=a?0:-1e-8)._zTime=h>=a?1:-1,this._ts))return this._start=C,Cs(this),this.render(n,r,o);this._onUpdate&&!r&&ze(this,"onUpdate",!0),(d===c&&this._tTime>=this.totalDuration()||!d&&a)&&(C===this._start||Math.abs(w)!==Math.abs(this._ts))&&(this._lock||((n||!u)&&(d===c&&this._ts>0||!d&&this._ts<0)&&ct(this,1),!r&&!(n<0&&!a)&&(d||a||!c)&&(ze(this,d===c&&n>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(d<c&&this.timeScale()>0)&&this._prom())))}return this},t.add=function(n,r){var o=this;if(Qe(r)||(r=Ae(this,r,n)),!(n instanceof ss)){if(ge(n))return n.forEach(function(a){return o.add(a,r)}),this;if(le(n))return this.addLabel(n,r);if(ne(n))n=re.delayedCall(0,n);else return this}return this!==n?$e(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 c=[],u=this._first;u;)u._start>=a&&(u instanceof re?r&&c.push(u):(o&&c.push(u),n&&c.push.apply(c,u.getChildren(!0,r,o)))),u=u._next;return c},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):ne(n)?this.killTweensOf(n):(n.parent===this&&_s(this,n),n===this._recent&&(this._recent=this._last),wt(this))},t.totalTime=function(n,r){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=oe(Te.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]=Ae(this,r),this},t.removeLabel=function(n){return delete this.labels[n],this},t.addPause=function(n,r,o){var a=re.delayedCall(0,r||Qt,o);return a.data="isPause",this._hasPause=1,$e(this,a,Ae(this,n))},t.removePause=function(n){var r=this._first;for(n=Ae(this,n);r;)r._start===n&&r.data==="isPause"&&ct(r),r=r._next},t.killTweensOf=function(n,r,o){for(var a=this.getTweensOf(n,o),c=a.length;c--;)nt!==a[c]&&a[c].kill(n,r);return this},t.getTweensOf=function(n,r){for(var o=[],a=Le(n),c=this._first,u=Qe(r),d;c;)c instanceof re?Fo(c._targets,a)&&(u?(!nt||c._initted&&c._ts)&&c.globalTime(0)<=r&&c.globalTime(c.totalDuration())>r:!r||c.isActive())&&o.push(c):(d=c.getTweensOf(a,r)).length&&o.push.apply(o,d),c=c._next;return o},t.tweenTo=function(n,r){r=r||{};var o=this,a=Ae(o,n),c=r,u=c.startAt,d=c.onStart,p=c.onStartParams,h=c.immediateRender,m,g=re.to(o,Be({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())||fe,onStart:function(){if(o.pause(),!m){var y=r.duration||Math.abs((a-(u&&"time"in u?u.time:o._time))/o.timeScale());g._dur!==y&&At(g,y,0,1).render(g._time,!0,!0),m=1}d&&d.apply(g,p||[])}},r));return h?g.render(0):g},t.tweenFromTo=function(n,r,o){return this.tweenTo(r,Be({startAt:{time:Ae(this,n)}},o))},t.recent=function(){return this._recent},t.nextLabel=function(n){return n===void 0&&(n=this._time),Gn(this,Ae(this,n))},t.previousLabel=function(n){return n===void 0&&(n=this._time),Gn(this,Ae(this,n),1)},t.currentLabel=function(n){return arguments.length?this.seek(n,!0):this.previousLabel(this._time+fe)},t.shiftChildren=function(n,r,o){o===void 0&&(o=0);for(var a=this._first,c=this.labels,u;a;)a._start>=o&&(a._start+=n,a._end+=n),a=a._next;if(r)for(u in c)c[u]>=o&&(c[u]+=n);return wt(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={}),wt(this)},t.totalDuration=function(n){var r=0,o=this,a=o._last,c=He,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>c&&o._sort&&a._ts&&!o._lock?(o._lock=1,$e(o,a,d-a._delay,1)._lock=0):c=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),c=0),a._end>r&&a._ts&&(r=a._end),a=u;At(o,o===te&&o._time>r?o._time:r,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(n){if(te._ts&&(Vi(te,ys(n,te)),Li=Te.frame),Te.frame>=$n){$n+=Me.autoSleep||120;var r=te._first;if((!r||!r._ts)&&Me.autoSleep&&Te._listeners.length<2){for(;r&&!r._ts;)r=r._next;r||Te.sleep()}}},e}(ss);Be(he.prototype,{_lock:0,_hasPause:0,_forcing:0});var ua=function(e,t,s,n,r,o,a){var c=new be(this._pt,e,t,0,1,dr,null,r),u=0,d=0,p,h,m,g,f,y,_,b;for(c.b=s,c.e=n,s+="",n+="",(_=~n.indexOf("random("))&&(n=es(n)),o&&(b=[s,n],o(b,e,t),s=b[0],n=b[1]),h=s.match(Bs)||[];p=Bs.exec(n);)g=p[0],f=n.substring(u,p.index),m?m=(m+1)%5:f.substr(-5)==="rgba("&&(m=1),g!==h[d++]&&(y=parseFloat(h[d-1])||0,c._pt={_next:c._pt,p:f||d===1?f:",",s:y,c:g.charAt(1)==="="?Mt(y,g)-y:parseFloat(g)-y,m:m&&m<4?Math.round:0},u=Bs.lastIndex);return c.c=u<n.length?n.substring(u,n.length):"",c.fp=a,(Bi.test(n)||_)&&(c.e=0),this._pt=c,c},bn=function(e,t,s,n,r,o,a,c,u,d){ne(n)&&(n=n(r||0,e,o));var p=e[t],h=s!=="get"?s:ne(p)?u?e[t.indexOf("set")||!ne(e["get"+t.substr(3)])?t:"get"+t.substr(3)](u):e[t]():p,m=ne(p)?u?ha:cr:_n,g;if(le(n)&&(~n.indexOf("random(")&&(n=es(n)),n.charAt(1)==="="&&(g=Mt(h,n)+(de(h)||0),(g||g===0)&&(n=g))),!d||h!==n||Qs)return!isNaN(h*n)&&n!==""?(g=new be(this._pt,e,t,+h||0,n-(h||0),typeof p=="boolean"?ya:ur,0,m),u&&(g.fp=u),a&&g.modifier(a,this,e),this._pt=g):(!p&&!(t in e)&&pn(t,n),ua.call(this,e,t,h,n,m,c||Me.stringFilter,u))},da=function(e,t,s,n,r){if(ne(e)&&(e=Yt(e,r,t,s,n)),!je(e)||e.style&&e.nodeType||ge(e)||Mi(e))return le(e)?Yt(e,r,t,s,n):e;var o={},a;for(a in e)o[a]=Yt(e[a],r,t,s,n);return o},or=function(e,t,s,n,r,o){var a,c,u,d;if(ke[e]&&(a=new ke[e]).init(r,a.rawVars?t[e]:da(t[e],n,r,o,s),s,n,o)!==!1&&(s._pt=c=new be(s._pt,r,e,0,1,a.render,a,0,a.priority),s!==zt))for(u=s._ptLookup[s._targets.indexOf(r)],d=a._props.length;d--;)u[a._props[d]]=c;return a},nt,Qs,vn=function i(e,t,s){var n=e.vars,r=n.ease,o=n.startAt,a=n.immediateRender,c=n.lazy,u=n.onUpdate,d=n.runBackwards,p=n.yoyoEase,h=n.keyframes,m=n.autoRevert,g=e._dur,f=e._startAt,y=e._targets,_=e.parent,b=_&&_.data==="nested"?_.vars.targets:y,w=e._overwrite==="auto"&&!un,C=e.timeline,v,k,z,x,T,L,W,K,$,J,P,F,j;if(C&&(!h||!r)&&(r="none"),e._ease=bt(r,Et.ease),e._yEase=p?sr(bt(p===!0?r:p,Et.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(K=y[0]?yt(y[0]).harness:0,F=K&&n[K.prop],v=ms(n,hn),f&&(f._zTime<0&&f.progress(1),t<0&&d&&a&&!m?f.render(-1,!0):f.revert(d&&g?ds:Ko),f._lazy=0),o){if(ct(e._startAt=re.set(y,Be({data:"isStart",overwrite:!1,parent:_,immediateRender:!0,lazy:!f&&ye(c),startAt:null,delay:0,onUpdate:u&&function(){return ze(e,"onUpdate")},stagger:0},o))),e._startAt._dp=0,e._startAt._sat=e,t<0&&(ce||!a&&!m)&&e._startAt.revert(ds),a&&g&&t<=0&&s<=0){t&&(e._zTime=t);return}}else if(d&&g&&!f){if(t&&(a=!1),z=Be({overwrite:!1,data:"isFromStart",lazy:a&&!f&&ye(c),immediateRender:a,stagger:0,parent:_},v),F&&(z[K.prop]=F),ct(e._startAt=re.set(y,z)),e._startAt._dp=0,e._startAt._sat=e,t<0&&(ce?e._startAt.revert(ds):e._startAt.render(-1,!0)),e._zTime=t,!a)i(e._startAt,fe,fe);else if(!t)return}for(e._pt=e._ptCache=0,c=g&&ye(c)||c&&!g,k=0;k<y.length;k++){if(T=y[k],W=T._gsap||yn(y)[k]._gsap,e._ptLookup[k]=J={},Gs[W.id]&&at.length&&hs(),P=b===y?k:b.indexOf(T),K&&($=new K).init(T,F||v,e,P,b)!==!1&&(e._pt=x=new be(e._pt,T,$.name,0,1,$.render,$,0,$.priority),$._props.forEach(function(D){J[D]=x}),$.priority&&(L=1)),!K||F)for(z in v)ke[z]&&($=or(z,v,e,P,T,b))?$.priority&&(L=1):J[z]=x=bn.call(e,T,z,"get",v[z],P,b,0,n.stringFilter);e._op&&e._op[k]&&e.kill(T,e._op[k]),w&&e._pt&&(nt=e,te.killTweensOf(T,J,e.globalTime(t)),j=!e.parent,nt=0),e._pt&&c&&(Gs[W.id]=1)}L&&fr(e),e._onInit&&e._onInit(e)}e._onUpdate=u,e._initted=(!e._op||e._pt)&&!j,h&&t<=0&&C.render(He,!0,!0)},fa=function(e,t,s,n,r,o,a,c){var u=(e._pt&&e._ptCache||(e._ptCache={}))[t],d,p,h,m;if(!u)for(u=e._ptCache[t]=[],h=e._ptLookup,m=e._targets.length;m--;){if(d=h[m][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",vn(e,a),Qs=0,c?Jt(t+" not eligible for reset"):1;u.push(d)}for(m=u.length;m--;)p=u[m],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=ie(s)+de(p.e)),p.b&&(p.b=d.s+de(p.b))},ga=function(e,t){var s=e[0]?yt(e[0]).harness:0,n=s&&s.aliases,r,o,a,c;if(!n)return t;r=Pt({},t);for(o in n)if(o in r)for(c=n[o].split(","),a=c.length;a--;)r[c[a]]=r[o];return r},pa=function(e,t,s,n){var r=t.ease||n||"power1.inOut",o,a;if(ge(t))a=s[e]||(s[e]=[]),t.forEach(function(c,u){return a.push({t:u/(t.length-1)*100,v:c,e:r})});else for(o in t)a=s[o]||(s[o]=[]),o==="ease"||a.push({t:parseFloat(e),v:t[o],e:r})},Yt=function(e,t,s,n,r){return ne(e)?e.call(t,s,n,r):le(e)&&~e.indexOf("random(")?es(e):e},ar=mn+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",lr={};we(ar+",id,stagger,delay,duration,paused,scrollTrigger",function(i){return lr[i]=1});var re=function(i){Ti(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:Zt(n))||this;var c=a.vars,u=c.duration,d=c.delay,p=c.immediateRender,h=c.stagger,m=c.overwrite,g=c.keyframes,f=c.defaults,y=c.scrollTrigger,_=c.yoyoEase,b=n.parent||te,w=(ge(s)||Mi(s)?Qe(s[0]):"length"in n)?[s]:Le(s),C,v,k,z,x,T,L,W;if(a._targets=w.length?yn(w):Jt("GSAP target "+s+" not found. https://gsap.com",!Me.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=m,g||h||us(u)||us(d)){if(n=a.vars,C=a.timeline=new he({data:"nested",defaults:f||{},targets:b&&b.data==="nested"?b.vars.targets:w}),C.kill(),C.parent=C._dp=Xe(a),C._start=0,h||us(u)||us(d)){if(z=w.length,L=h&&ji(h),je(h))for(x in h)~ar.indexOf(x)&&(W||(W={}),W[x]=h[x]);for(v=0;v<z;v++)k=ms(n,lr),k.stagger=0,_&&(k.yoyoEase=_),W&&Pt(k,W),T=w[v],k.duration=+Yt(u,Xe(a),v,T,w),k.delay=(+Yt(d,Xe(a),v,T,w)||0)-a._delay,!h&&z===1&&k.delay&&(a._delay=d=k.delay,a._start+=d,k.delay=0),C.to(T,k,L?L(v,T,w):0),C._ease=N.none;C.duration()?u=d=0:a.timeline=0}else if(g){Zt(Be(C.vars.defaults,{ease:"none"})),C._ease=bt(g.ease||n.ease||"none");var K=0,$,J,P;if(ge(g))g.forEach(function(F){return C.to(w,F,">")}),C.duration();else{k={};for(x in g)x==="ease"||x==="easeEach"||pa(x,g[x],k,g.easeEach);for(x in k)for($=k[x].sort(function(F,j){return F.t-j.t}),K=0,v=0;v<$.length;v++)J=$[v],P={ease:J.e,duration:(J.t-(v?$[v-1].t:0))/100*u},P[x]=J.v,C.to(w,P,K),K+=P.duration;C.duration()<u&&C.to({},{duration:u-C.duration()})}}u||a.duration(u=C.duration())}else a.timeline=0;return m===!0&&!un&&(nt=Xe(a),te.killTweensOf(w),nt=0),$e(b,Xe(a),r),n.reversed&&a.reverse(),n.paused&&a.paused(!0),(p||!u&&!g&&a._start===oe(b._time)&&ye(p)&&Ho(Xe(a))&&b.data!=="nested")&&(a._tTime=-1e-8,a.render(Math.max(0,-d)||0)),y&&Wi(Xe(a),y),a}var t=e.prototype;return t.render=function(n,r,o){var a=this._time,c=this._tDur,u=this._dur,d=n<0,p=n>c-fe&&!d?c:n<fe?0:n,h,m,g,f,y,_,b,w,C;if(!u)Go(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=oe(p%f),p===c?(g=this._repeat,h=u):(y=oe(p/f),g=~~y,g&&g===y?(h=u,g--):h>u&&(h=u)),_=this._yoyo&&g&1,_&&(C=this._yEase,h=u-h),y=Dt(this._tTime,f),h===a&&!o&&this._initted&&g===y)return this._tTime=p,this;g!==y&&(w&&this._yEase&&nr(w,_),this.vars.repeatRefresh&&!_&&!this._lock&&h!==f&&this._initted&&(this._lock=o=1,this.render(oe(f*g),!0).invalidate()._lock=0))}if(!this._initted){if($i(this,d?n:h,o,r,p))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&g!==y))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=b=(C||this._ease)(h/u),this._from&&(this.ratio=b=1-b),!a&&p&&!r&&!y&&(ze(this,"onStart"),this._tTime!==p))return this;for(m=this._pt;m;)m.r(b,m.d),m=m._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&&Zs(this,n,r,o),ze(this,"onUpdate")),this._repeat&&g!==y&&this.vars.onRepeat&&!r&&this.parent&&ze(this,"onRepeat"),(p===this._tDur||!p)&&this._tTime===p&&(d&&!this._onUpdate&&Zs(this,n,!0,!0),(n||!u)&&(p===this._tDur&&this._ts>0||!p&&this._ts<0)&&ct(this,1),!r&&!(d&&!a)&&(p||a||_)&&(ze(this,p===c?"onComplete":"onReverseComplete",!0),this._prom&&!(p<c&&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,c){ts||Te.wake(),this._ts||this.play();var u=Math.min(this._dur,(this._dp._time-this._start)*this._ts),d;return this._initted||vn(this,u),d=this._ease(u/this._dur),fa(this,n,r,o,a,d,u,c)?this.resetTo(n,r,o,a,1):(xs(this,0),this.parent||Ni(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?jt(this):this.scrollTrigger&&this.scrollTrigger.kill(!!ce),this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(n,r,nt&&nt.vars.overwrite!==!0)._first||jt(this),this.parent&&o!==this.timeline.totalDuration()&&At(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,c=n?Le(n):a,u=this._ptLookup,d=this._pt,p,h,m,g,f,y,_;if((!r||r==="all")&&$o(a,c))return r==="all"&&(this._pt=0),jt(this);for(p=this._op=this._op||[],r!=="all"&&(le(r)&&(f={},we(r,function(b){return f[b]=1}),r=f),r=ga(a,r)),_=a.length;_--;)if(~c.indexOf(a[_])){h=u[_],r==="all"?(p[_]=r,g=h,m={}):(m=p[_]=p[_]||{},g=r);for(f in g)y=h&&h[f],y&&((!("kill"in y.d)||y.d.kill(f)===!0)&&_s(this,y,"_pt"),delete h[f]),m!=="all"&&(m[f]=1)}return this._initted&&!this._pt&&d&&jt(this),this},e.to=function(n,r){return new e(n,r,arguments[2])},e.from=function(n,r){return qt(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 qt(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 te.killTweensOf(n,r,o)},e}(ss);Be(re.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});we("staggerTo,staggerFrom,staggerFromTo",function(i){re[i]=function(){var e=new he,t=Ys.call(arguments,0);return t.splice(i==="staggerFromTo"?5:4,0,0),e[i].apply(e,t)}});var _n=function(e,t,s){return e[t]=s},cr=function(e,t,s){return e[t](s)},ha=function(e,t,s,n){return e[t](n.fp,s)},ma=function(e,t,s){return e.setAttribute(t,s)},Cn=function(e,t){return ne(e[t])?cr:dn(e[t])&&e.setAttribute?ma:_n},ur=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},ya=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},dr=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)},xn=function(e,t){for(var s=t._pt;s;)s.r(e,s.d),s=s._next},wa=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},ba=function(e){for(var t=this._pt,s,n;t;)n=t._next,t.p===e&&!t.op||t.op===e?_s(this,t,"_pt"):t.dep||(s=1),t=n;return!s},va=function(e,t,s,n){n.mSet(e,t,n.m.call(n.tween,s,n.mt),n)},fr=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,c,u,d){this.t=s,this.s=r,this.c=o,this.p=n,this.r=a||ur,this.d=c||this,this.set=u||_n,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=va,this.m=s,this.mt=r,this.tween=n},i}();we(mn+"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 hn[i]=1});Re.TweenMax=Re.TweenLite=re;Re.TimelineLite=Re.TimelineMax=he;te=new he({sortChildren:!1,defaults:Et,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Me.stringFilter=tr;var vt=[],gs={},_a=[],qn=0,Ca=0,Ls=function(e){return(gs[e]||_a).map(function(t){return t()})},en=function(){var e=Date.now(),t=[];e-qn>2&&(Ls("matchMediaInit"),vt.forEach(function(s){var n=s.queries,r=s.conditions,o,a,c,u;for(a in n)o=We.matchMedia(n[a]).matches,o&&(c=1),o!==r[a]&&(r[a]=o,u=1);u&&(s.revert(),c&&t.push(s))}),Ls("matchMediaRevert"),t.forEach(function(s){return s.onMatch(s,function(n){return s.add(null,n)})}),qn=e,Ls("matchMedia"))},gr=function(){function i(t,s){this.selector=s&&Xs(s),this.data=[],this._r=[],this.isReverted=!1,this.id=Ca++,t&&this.add(t)}var e=i.prototype;return e.add=function(s,n,r){ne(s)&&(r=n,n=s,s=ne);var o=this,a=function(){var u=X,d=o.selector,p;return u&&u!==o&&u.data.push(o),r&&(o.selector=Xs(r)),X=o,p=n.apply(o,arguments),ne(p)&&o._r.push(p),X=u,o.selector=d,o.isReverted=!1,p};return o.last=a,s===ne?a(o,function(c){return o.add(null,c)}):s?o[s]=a:a},e.ignore=function(s){var n=X;X=null,s(this),X=n},e.getTweens=function(){var s=[];return this.data.forEach(function(n){return n instanceof i?s.push.apply(s,n.getTweens()):n instanceof re&&!(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(),c=r.data.length,u;c--;)u=r.data[c],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)}),c=r.data.length;c--;)u=r.data[c],u instanceof he?u.data!=="nested"&&(u.scrollTrigger&&u.scrollTrigger.revert(),u.kill()):!(u instanceof re)&&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=vt.length;o--;)vt[o].id===this.id&&vt.splice(o,1)},e.revert=function(s){this.kill(s||{})},i}(),xa=function(){function i(t){this.contexts=[],this.scope=t,X&&X.data.push(this)}var e=i.prototype;return e.add=function(s,n,r){je(s)||(s={matches:s});var o=new gr(0,r||this.scope),a=o.conditions={},c,u,d;X&&!o.selector&&(o.selector=X.selector),this.contexts.push(o),n=o.add("onMatch",n),o.queries=s;for(u in s)u==="all"?d=1:(c=We.matchMedia(s[u]),c&&(vt.indexOf(o)<0&&vt.push(o),(a[u]=c.matches)&&(d=1),c.addListener?c.addListener(en):c.addEventListener("change",en)));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}(),ws={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 Ji(n)})},timeline:function(e){return new he(e)},getTweensOf:function(e,t){return te.getTweensOf(e,t)},getProperty:function(e,t,s,n){le(e)&&(e=Le(e)[0]);var r=yt(e||{}).get,o=s?Ki:Ii;return s==="native"&&(s=""),e&&(t?o((ke[t]&&ke[t].get||r)(e,t,s,n)):function(a,c,u){return o((ke[a]&&ke[a].get||r)(e,a,c,u))})},quickSetter:function(e,t,s){if(e=Le(e),e.length>1){var n=e.map(function(d){return _e.quickSetter(d,t,s)}),r=n.length;return function(d){for(var p=r;p--;)n[p](d)}}e=e[0]||{};var o=ke[t],a=yt(e),c=a.harness&&(a.harness.aliases||{})[t]||t,u=o?function(d){var p=new o;zt._pt=0,p.init(e,s?d+s:d,zt,0,[e]),p.render(1,p),zt._pt&&xn(1,zt)}:a.set(e,c);return o?u:function(d){return u(e,c,s?d+s:d,a,1)}},quickTo:function(e,t,s){var n,r=_e.to(e,Be((n={},n[t]="+=0.1",n.paused=!0,n.stagger=0,n),s||{})),o=function(c,u,d){return r.resetTo(t,c,u,d)};return o.tween=r,o},isTweening:function(e){return te.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=bt(e.ease,Et.ease)),Un(Et,e||{})},config:function(e){return Un(Me,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&&!ke[a]&&!Re[a]&&Jt(t+" effect requires "+a+" plugin.")}),Es[t]=function(a,c,u){return s(Le(a),Be(c||{},r),u)},o&&(he.prototype[t]=function(a,c,u){return this.add(Es[t](a,je(c)?c:(u=c)&&{},this),u)})},registerEase:function(e,t){N[e]=bt(t)},parseEase:function(e,t){return arguments.length?bt(e,t):N},getById:function(e){return te.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var s=new he(e),n,r;for(s.smoothChildTiming=ye(e.smoothChildTiming),te.remove(s),s._dp=0,s._time=s._tTime=te._time,n=te._first;n;)r=n._next,(t||!(!n._dur&&n instanceof re&&n.vars.onComplete===n._targets[0]))&&$e(s,n,n._start-n._delay),n=r;return $e(te,s,0),s},context:function(e,t){return e?new gr(e,t):X},matchMedia:function(e){return new xa(e)},matchMediaRefresh:function(){return vt.forEach(function(e){var t=e.conditions,s,n;for(n in t)t[n]&&(t[n]=!1,s=1);s&&e.revert()})||en()},addEventListener:function(e,t){var s=gs[e]||(gs[e]=[]);~s.indexOf(t)||s.push(t)},removeEventListener:function(e,t){var s=gs[e],n=s&&s.indexOf(t);n>=0&&s.splice(n,1)},utils:{wrap:ta,wrapYoyo:sa,distribute:ji,random:Zi,snap:Gi,normalize:ea,getUnit:de,clamp:Yo,splitColor:Qi,toArray:Le,selector:Xs,mapRange:Yi,pipe:Jo,unitize:Qo,interpolate:na,shuffle:Hi},install:Di,effects:Es,ticker:Te,updateRoot:he.updateRoot,plugins:ke,globalTimeline:te,core:{PropTween:be,globals:Ai,Tween:re,Timeline:he,Animation:ss,getCache:yt,_removeLinkedListItem:_s,reverting:function(){return ce},context:function(e){return e&&X&&(X.data.push(e),e._ctx=X),X},suppressOverwrites:function(e){return un=e}}};we("to,from,fromTo,delayedCall,set,killTweensOf",function(i){return ws[i]=re[i]});Te.add(he.updateRoot);zt=ws.to({},{duration:0});var Sa=function(e,t){for(var s=e._pt;s&&s.p!==t&&s.op!==t&&s.fp!==t;)s=s._next;return s},ka=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=Sa(o,n)),o&&o.modifier&&o.modifier(t[n],e,s[r],n))},Os=function(e,t){return{name:e,headless:1,rawVars:1,init:function(n,r,o){o._onInit=function(a){var c,u;if(le(r)&&(c={},we(r,function(d){return c[d]=1}),r=c),t){c={};for(u in r)c[u]=t(r[u]);r=c}ka(a,r)}}}},_e=ws.registerPlugin({name:"attr",init:function(e,t,s,n,r){var o,a,c;this.tween=s;for(o in t)c=e.getAttribute(o)||"",a=this.add(e,"setAttribute",(c||0)+"",t[o],n,r,0,0,o),a.op=o,a.b=c,this._props.push(o)},render:function(e,t){for(var s=t._pt;s;)ce?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)}},Os("roundProps",Js),Os("modifiers"),Os("snap",Gi))||ws;re.version=he.version=_e.version="3.13.0";Pi=1;fn()&&Lt();N.Power0;N.Power1;N.Power2;N.Power3;N.Power4;N.Linear;N.Quad;N.Cubic;N.Quart;N.Quint;N.Strong;N.Elastic;N.Back;N.SteppedEase;N.Bounce;N.Sine;N.Expo;N.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 Yn,it,Rt,Sn,mt,Xn,kn,Ta=function(){return typeof window<"u"},et={},ht=180/Math.PI,Bt=Math.PI/180,St=Math.atan2,Jn=1e8,Tn=/([A-Z])/g,za=/(left|right|width|margin|padding|x)/i,Ma=/[\s,\(]\S/,Ue={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},tn=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Ra=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)},Ba=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)},Ea=function(e,t){var s=t.s+t.c*e;t.set(t.t,t.p,~~(s+(s<0?-.5:.5))+t.u,t)},pr=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},hr=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},Pa=function(e,t,s){return e.style[t]=s},Da=function(e,t,s){return e.style.setProperty(t,s)},Aa=function(e,t,s){return e._gsap[t]=s},La=function(e,t,s){return e._gsap.scaleX=e._gsap.scaleY=s},Oa=function(e,t,s,n,r){var o=e._gsap;o.scaleX=o.scaleY=s,o.renderTransform(r,o)},Va=function(e,t,s,n,r){var o=e._gsap;o[t]=s,o.renderTransform(r,o)},se="transform",ve=se+"Origin",Ia=function i(e,t){var s=this,n=this.target,r=n.style,o=n._gsap;if(e in et&&r){if(this.tfm=this.tfm||{},e!=="transform")e=Ue[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===ve&&(this.tfm.zOrigin=o.zOrigin);else return Ue.transform.split(",").forEach(function(a){return i.call(s,a,t)});if(this.props.indexOf(se)>=0)return;o.svg&&(this.svgo=n.getAttribute("data-svg-origin"),this.props.push(ve,t,"")),e=se}(r||t)&&this.props.push(e,t,r[e])},mr=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},Ka=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(Tn,"-$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=kn(),(!r||!r.isStart)&&!s[se]&&(mr(s),n.zOrigin&&s[ve]&&(s[ve]+=" "+n.zOrigin+"px",n.zOrigin=0,n.renderTransform()),n.uncache=1)}},yr=function(e,t){var s={target:e,props:[],revert:Ka,save:Ia};return e._gsap||_e.core.getCache(e),t&&e.style&&e.nodeType&&t.split(",").forEach(function(n){return s.save(n)}),s},wr,sn=function(e,t){var s=it.createElementNS?it.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):it.createElement(e);return s&&s.style?s:it.createElement(e)},Oe=function i(e,t,s){var n=getComputedStyle(e);return n[t]||n.getPropertyValue(t.replace(Tn,"-$1").toLowerCase())||n.getPropertyValue(t)||!s&&i(e,Ot(t)||t,1)||""},Qn="O,Moz,ms,Ms,Webkit".split(","),Ot=function(e,t,s){var n=t||mt,r=n.style,o=5;if(e in r&&!s)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);o--&&!(Qn[o]+e in r););return o<0?null:(o===3?"ms":o>=0?Qn[o]:"")+e},nn=function(){Ta()&&window.document&&(Yn=window,it=Yn.document,Rt=it.documentElement,mt=sn("div")||{style:{}},sn("div"),se=Ot(se),ve=se+"Origin",mt.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",wr=!!Ot("perspective"),kn=_e.core.reverting,Sn=1)},ei=function(e){var t=e.ownerSVGElement,s=sn("svg",t&&t.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=e.cloneNode(!0),r;n.style.display="block",s.appendChild(n),Rt.appendChild(s);try{r=n.getBBox()}catch{}return s.removeChild(n),Rt.removeChild(s),r},ti=function(e,t){for(var s=t.length;s--;)if(e.hasAttribute(t[s]))return e.getAttribute(t[s])},br=function(e){var t,s;try{t=e.getBBox()}catch{t=ei(e),s=1}return t&&(t.width||t.height)||s||(t=ei(e)),t&&!t.width&&!t.x&&!t.y?{x:+ti(e,["x","cx","x1"])||0,y:+ti(e,["y","cy","y1"])||0,width:0,height:0}:t},vr=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&br(e))},_t=function(e,t){if(t){var s=e.style,n;t in et&&t!==ve&&(t=se),s.removeProperty?(n=t.substr(0,2),(n==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),s.removeProperty(n==="--"?t:t.replace(Tn,"-$1").toLowerCase())):s.removeAttribute(t)}},rt=function(e,t,s,n,r,o){var a=new be(e._pt,t,s,0,1,o?hr:pr);return e._pt=a,a.b=n,a.e=r,e._props.push(s),a},si={deg:1,rad:1,turn:1},Na={grid:1,flex:1},ut=function i(e,t,s,n){var r=parseFloat(s)||0,o=(s+"").trim().substr((r+"").length)||"px",a=mt.style,c=za.test(t),u=e.tagName.toLowerCase()==="svg",d=(u?"client":"offset")+(c?"Width":"Height"),p=100,h=n==="px",m=n==="%",g,f,y,_;if(n===o||!r||si[n]||si[o])return r;if(o!=="px"&&!h&&(r=i(e,t,s,"px")),_=e.getCTM&&vr(e),(m||o==="%")&&(et[t]||~t.indexOf("adius")))return g=_?e.getBBox()[c?"width":"height"]:e[d],ie(m?r/g*p:r/100*g);if(a[c?"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===it||!f.appendChild)&&(f=it.body),y=f._gsap,y&&m&&y.width&&c&&y.time===Te.time&&!y.uncache)return ie(r/y.width*p);if(m&&(t==="height"||t==="width")){var b=e.style[t];e.style[t]=p+n,g=e[d],b?e.style[t]=b:_t(e,t)}else(m||o==="%")&&!Na[Oe(f,"display")]&&(a.position=Oe(e,"position")),f===e&&(a.position="static"),f.appendChild(mt),g=mt[d],f.removeChild(mt),a.position="absolute";return c&&m&&(y=yt(f),y.time=Te.time,y.width=f[d]),ie(h?g*r/p:g&&r?p/g*r:0)},Je=function(e,t,s,n){var r;return Sn||nn(),t in Ue&&t!=="transform"&&(t=Ue[t],~t.indexOf(",")&&(t=t.split(",")[0])),et[t]&&t!=="transform"?(r=is(e,n),r=t!=="transformOrigin"?r[t]:r.svg?r.origin:vs(Oe(e,ve))+" "+r.zOrigin+"px"):(r=e.style[t],(!r||r==="auto"||n||~(r+"").indexOf("calc("))&&(r=bs[t]&&bs[t](e,t,s)||Oe(e,t)||Oi(e,t)||(t==="opacity"?1:0))),s&&!~(r+"").trim().indexOf(" ")?ut(e,t,r,s)+s:r},Fa=function(e,t,s,n){if(!s||s==="none"){var r=Ot(t,e,1),o=r&&Oe(e,r,1);o&&o!==s?(t=r,s=o):t==="borderColor"&&(s=Oe(e,"borderTopColor"))}var a=new be(this._pt,e.style,t,0,1,dr),c=0,u=0,d,p,h,m,g,f,y,_,b,w,C,v;if(a.b=s,a.e=n,s+="",n+="",n.substring(0,6)==="var(--"&&(n=Oe(e,n.substring(4,n.indexOf(")")))),n==="auto"&&(f=e.style[t],e.style[t]=n,n=Oe(e,t)||n,f?e.style[t]=f:_t(e,t)),d=[s,n],tr(d),s=d[0],n=d[1],h=s.match(Tt)||[],v=n.match(Tt)||[],v.length){for(;p=Tt.exec(n);)y=p[0],b=n.substring(c,p.index),g?g=(g+1)%5:(b.substr(-5)==="rgba("||b.substr(-5)==="hsla(")&&(g=1),y!==(f=h[u++]||"")&&(m=parseFloat(f)||0,C=f.substr((m+"").length),y.charAt(1)==="="&&(y=Mt(m,y)+C),_=parseFloat(y),w=y.substr((_+"").length),c=Tt.lastIndex-w.length,w||(w=w||Me.units[t]||C,c===n.length&&(n+=w,a.e+=w)),C!==w&&(m=ut(e,t,f,w)||0),a._pt={_next:a._pt,p:b||u===1?b:",",s:m,c:_-m,m:g&&g<4||t==="zIndex"?Math.round:0});a.c=c<n.length?n.substring(c,n.length):""}else a.r=t==="display"&&n==="none"?hr:pr;return Bi.test(n)&&(a.e=0),this._pt=a,a},ni={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},Wa=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]=ni[s]||s,t[1]=ni[n]||n,t.join(" ")},$a=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,c,u;if(r==="all"||r===!0)n.cssText="",c=1;else for(r=r.split(","),u=r.length;--u>-1;)a=r[u],et[a]&&(c=1,a=a==="transformOrigin"?ve:se),_t(s,a);c&&(_t(s,se),o&&(o.svg&&s.removeAttribute("transform"),n.scale=n.rotate=n.translate="none",is(s,1),o.uncache=1,mr(n)))}},bs={clearProps:function(e,t,s,n,r){if(r.data!=="isFromStart"){var o=e._pt=new be(e._pt,t,s,0,0,$a);return o.u=n,o.pr=-10,o.tween=r,e._props.push(s),1}}},ns=[1,0,0,1,0,0],_r={},Cr=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},ii=function(e){var t=Oe(e,se);return Cr(t)?ns:t.substr(7).match(Ri).map(ie)},zn=function(e,t){var s=e._gsap||yt(e),n=e.style,r=ii(e),o,a,c,u;return s.svg&&e.getAttribute("transform")?(c=e.transform.baseVal.consolidate().matrix,r=[c.a,c.b,c.c,c.d,c.e,c.f],r.join(",")==="1,0,0,1,0,0"?ns:r):(r===ns&&!e.offsetParent&&e!==Rt&&!s.svg&&(c=n.display,n.display="block",o=e.parentNode,(!o||!e.offsetParent&&!e.getBoundingClientRect().width)&&(u=1,a=e.nextElementSibling,Rt.appendChild(e)),r=ii(e),c?n.display=c:_t(e,"display"),u&&(a?o.insertBefore(e,a):o?o.appendChild(e):Rt.removeChild(e))),t&&r.length>6?[r[0],r[1],r[4],r[5],r[12],r[13]]:r)},rn=function(e,t,s,n,r,o){var a=e._gsap,c=r||zn(e,!0),u=a.xOrigin||0,d=a.yOrigin||0,p=a.xOffset||0,h=a.yOffset||0,m=c[0],g=c[1],f=c[2],y=c[3],_=c[4],b=c[5],w=t.split(" "),C=parseFloat(w[0])||0,v=parseFloat(w[1])||0,k,z,x,T;s?c!==ns&&(z=m*y-g*f)&&(x=C*(y/z)+v*(-f/z)+(f*b-y*_)/z,T=C*(-g/z)+v*(m/z)-(m*b-g*_)/z,C=x,v=T):(k=br(e),C=k.x+(~w[0].indexOf("%")?C/100*k.width:C),v=k.y+(~(w[1]||w[0]).indexOf("%")?v/100*k.height:v)),n||n!==!1&&a.smooth?(_=C-u,b=v-d,a.xOffset=p+(_*m+b*f)-_,a.yOffset=h+(_*g+b*y)-b):a.xOffset=a.yOffset=0,a.xOrigin=C,a.yOrigin=v,a.smooth=!!n,a.origin=t,a.originIsAbsolute=!!s,e.style[ve]="0px 0px",o&&(rt(o,a,"xOrigin",u,C),rt(o,a,"yOrigin",d,v),rt(o,a,"xOffset",p,a.xOffset),rt(o,a,"yOffset",h,a.yOffset)),e.setAttribute("data-svg-origin",C+" "+v)},is=function(e,t){var s=e._gsap||new rr(e);if("x"in s&&!t&&!s.uncache)return s;var n=e.style,r=s.scaleX<0,o="px",a="deg",c=getComputedStyle(e),u=Oe(e,ve)||"0",d,p,h,m,g,f,y,_,b,w,C,v,k,z,x,T,L,W,K,$,J,P,F,j,D,G,Ke,Ce,xe,q,U,me;return d=p=h=f=y=_=b=w=C=0,m=g=1,s.svg=!!(e.getCTM&&vr(e)),c.translate&&((c.translate!=="none"||c.scale!=="none"||c.rotate!=="none")&&(n[se]=(c.translate!=="none"?"translate3d("+(c.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(c.rotate!=="none"?"rotate("+c.rotate+") ":"")+(c.scale!=="none"?"scale("+c.scale.split(" ").join(",")+") ":"")+(c[se]!=="none"?c[se]:"")),n.scale=n.rotate=n.translate="none"),z=zn(e,s.svg),s.svg&&(s.uncache?(D=e.getBBox(),u=s.xOrigin-D.x+"px "+(s.yOrigin-D.y)+"px",j=""):j=!t&&e.getAttribute("data-svg-origin"),rn(e,j||u,!!j||s.originIsAbsolute,s.smooth!==!1,z)),v=s.xOrigin||0,k=s.yOrigin||0,z!==ns&&(W=z[0],K=z[1],$=z[2],J=z[3],d=P=z[4],p=F=z[5],z.length===6?(m=Math.sqrt(W*W+K*K),g=Math.sqrt(J*J+$*$),f=W||K?St(K,W)*ht:0,b=$||J?St($,J)*ht+f:0,b&&(g*=Math.abs(Math.cos(b*Bt))),s.svg&&(d-=v-(v*W+k*$),p-=k-(v*K+k*J))):(me=z[6],q=z[7],Ke=z[8],Ce=z[9],xe=z[10],U=z[11],d=z[12],p=z[13],h=z[14],x=St(me,xe),y=x*ht,x&&(T=Math.cos(-x),L=Math.sin(-x),j=P*T+Ke*L,D=F*T+Ce*L,G=me*T+xe*L,Ke=P*-L+Ke*T,Ce=F*-L+Ce*T,xe=me*-L+xe*T,U=q*-L+U*T,P=j,F=D,me=G),x=St(-$,xe),_=x*ht,x&&(T=Math.cos(-x),L=Math.sin(-x),j=W*T-Ke*L,D=K*T-Ce*L,G=$*T-xe*L,U=J*L+U*T,W=j,K=D,$=G),x=St(K,W),f=x*ht,x&&(T=Math.cos(x),L=Math.sin(x),j=W*T+K*L,D=P*T+F*L,K=K*T-W*L,F=F*T-P*L,W=j,P=D),y&&Math.abs(y)+Math.abs(f)>359.9&&(y=f=0,_=180-_),m=ie(Math.sqrt(W*W+K*K+$*$)),g=ie(Math.sqrt(F*F+me*me)),x=St(P,F),b=Math.abs(x)>2e-4?x*ht:0,C=U?1/(U<0?-U:U):0),s.svg&&(j=e.getAttribute("transform"),s.forceCSS=e.setAttribute("transform","")||!Cr(Oe(e,se)),j&&e.setAttribute("transform",j))),Math.abs(b)>90&&Math.abs(b)<270&&(r?(m*=-1,b+=f<=0?180:-180,f+=f<=0?180:-180):(g*=-1,b+=b<=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=ie(m),s.scaleY=ie(g),s.rotation=ie(f)+a,s.rotationX=ie(y)+a,s.rotationY=ie(_)+a,s.skewX=b+a,s.skewY=w+a,s.transformPerspective=C+o,(s.zOrigin=parseFloat(u.split(" ")[2])||!t&&s.zOrigin||0)&&(n[ve]=vs(u)),s.xOffset=s.yOffset=0,s.force3D=Me.force3D,s.renderTransform=s.svg?Ha:wr?xr:Ua,s.uncache=0,s},vs=function(e){return(e=e.split(" "))[0]+" "+e[1]},Vs=function(e,t,s){var n=de(t);return ie(parseFloat(t)+parseFloat(ut(e,"x",s+"px",n)))+n},Ua=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,xr(e,t)},gt="0deg",$t="0px",pt=") ",xr=function(e,t){var s=t||this,n=s.xPercent,r=s.yPercent,o=s.x,a=s.y,c=s.z,u=s.rotation,d=s.rotationY,p=s.rotationX,h=s.skewX,m=s.skewY,g=s.scaleX,f=s.scaleY,y=s.transformPerspective,_=s.force3D,b=s.target,w=s.zOrigin,C="",v=_==="auto"&&e&&e!==1||_===!0;if(w&&(p!==gt||d!==gt)){var k=parseFloat(d)*Bt,z=Math.sin(k),x=Math.cos(k),T;k=parseFloat(p)*Bt,T=Math.cos(k),o=Vs(b,o,z*T*-w),a=Vs(b,a,-Math.sin(k)*-w),c=Vs(b,c,x*T*-w+w)}y!==$t&&(C+="perspective("+y+pt),(n||r)&&(C+="translate("+n+"%, "+r+"%) "),(v||o!==$t||a!==$t||c!==$t)&&(C+=c!==$t||v?"translate3d("+o+", "+a+", "+c+") ":"translate("+o+", "+a+pt),u!==gt&&(C+="rotate("+u+pt),d!==gt&&(C+="rotateY("+d+pt),p!==gt&&(C+="rotateX("+p+pt),(h!==gt||m!==gt)&&(C+="skew("+h+", "+m+pt),(g!==1||f!==1)&&(C+="scale("+g+", "+f+pt),b.style[se]=C||"translate(0, 0)"},Ha=function(e,t){var s=t||this,n=s.xPercent,r=s.yPercent,o=s.x,a=s.y,c=s.rotation,u=s.skewX,d=s.skewY,p=s.scaleX,h=s.scaleY,m=s.target,g=s.xOrigin,f=s.yOrigin,y=s.xOffset,_=s.yOffset,b=s.forceCSS,w=parseFloat(o),C=parseFloat(a),v,k,z,x,T;c=parseFloat(c),u=parseFloat(u),d=parseFloat(d),d&&(d=parseFloat(d),u+=d,c+=d),c||u?(c*=Bt,u*=Bt,v=Math.cos(c)*p,k=Math.sin(c)*p,z=Math.sin(c-u)*-h,x=Math.cos(c-u)*h,u&&(d*=Bt,T=Math.tan(u-d),T=Math.sqrt(1+T*T),z*=T,x*=T,d&&(T=Math.tan(d),T=Math.sqrt(1+T*T),v*=T,k*=T)),v=ie(v),k=ie(k),z=ie(z),x=ie(x)):(v=p,x=h,k=z=0),(w&&!~(o+"").indexOf("px")||C&&!~(a+"").indexOf("px"))&&(w=ut(m,"x",o,"px"),C=ut(m,"y",a,"px")),(g||f||y||_)&&(w=ie(w+g-(g*v+f*z)+y),C=ie(C+f-(g*k+f*x)+_)),(n||r)&&(T=m.getBBox(),w=ie(w+n/100*T.width),C=ie(C+r/100*T.height)),T="matrix("+v+","+k+","+z+","+x+","+w+","+C+")",m.setAttribute("transform",T),b&&(m.style[se]=T)},ja=function(e,t,s,n,r){var o=360,a=le(r),c=parseFloat(r)*(a&&~r.indexOf("rad")?ht:1),u=c-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*Jn)%o-~~(u/o)*o:p==="ccw"&&u>0&&(u=(u-o*Jn)%o-~~(u/o)*o)),e._pt=h=new be(e._pt,t,s,n,u,Ra),h.e=d,h.u="deg",e._props.push(s),h},ri=function(e,t){for(var s in t)e[s]=t[s];return e},Ga=function(e,t,s){var n=ri({},s._gsap),r="perspective,force3D,transformOrigin,svgOrigin",o=s.style,a,c,u,d,p,h,m,g;n.svg?(u=s.getAttribute("transform"),s.setAttribute("transform",""),o[se]=t,a=is(s,1),_t(s,se),s.setAttribute("transform",u)):(u=getComputedStyle(s)[se],o[se]=t,a=is(s,1),o[se]=u);for(c in et)u=n[c],d=a[c],u!==d&&r.indexOf(c)<0&&(m=de(u),g=de(d),p=m!==g?ut(s,c,u,g):parseFloat(u),h=parseFloat(d),e._pt=new be(e._pt,a,c,p,h-p,tn),e._pt.u=g||0,e._props.push(c));ri(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});bs[e>1?"border"+i:i]=function(a,c,u,d,p){var h,m;if(arguments.length<4)return h=o.map(function(g){return Je(a,g,u)}),m=h.join(" "),m.split(h[0]).length===5?h[0]:m;h=(d+"").split(" "),m={},o.forEach(function(g,f){return m[g]=h[f]=h[f]||h[(f-1)/2|0]}),a.init(c,m,p)}});var Sr={name:"css",register:nn,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,s,n,r){var o=this._props,a=e.style,c=s.vars.startAt,u,d,p,h,m,g,f,y,_,b,w,C,v,k,z,x;Sn||nn(),this.styles=this.styles||yr(e),x=this.styles.props,this.tween=s;for(f in t)if(f!=="autoRound"&&(d=t[f],!(ke[f]&&or(f,t,s,n,e,r)))){if(m=typeof d,g=bs[f],m==="function"&&(d=d.call(s,n,e,r),m=typeof d),m==="string"&&~d.indexOf("random(")&&(d=es(d)),g)g(this,e,f,d,s)&&(z=1);else if(f.substr(0,2)==="--")u=(getComputedStyle(e).getPropertyValue(f)+"").trim(),d+="",lt.lastIndex=0,lt.test(u)||(y=de(u),_=de(d)),_?y!==_&&(u=ut(e,f,u,_)+_):y&&(d+=y),this.add(a,"setProperty",u,d,n,r,0,0,f),o.push(f),x.push(f,0,a[f]);else if(m!=="undefined"){if(c&&f in c?(u=typeof c[f]=="function"?c[f].call(s,n,e,r):c[f],le(u)&&~u.indexOf("random(")&&(u=es(u)),de(u+"")||u==="auto"||(u+=Me.units[f]||de(Je(e,f))||""),(u+"").charAt(1)==="="&&(u=Je(e,f))):u=Je(e,f),h=parseFloat(u),b=m==="string"&&d.charAt(1)==="="&&d.substr(0,2),b&&(d=d.substr(2)),p=parseFloat(d),f in Ue&&(f==="autoAlpha"&&(h===1&&Je(e,"visibility")==="hidden"&&p&&(h=0),x.push("visibility",0,a.visibility),rt(this,a,"visibility",h?"inherit":"hidden",p?"inherit":"hidden",!p)),f!=="scale"&&f!=="transform"&&(f=Ue[f],~f.indexOf(",")&&(f=f.split(",")[0]))),w=f in et,w){if(this.styles.save(f),m==="string"&&d.substring(0,6)==="var(--"&&(d=Oe(e,d.substring(4,d.indexOf(")"))),p=parseFloat(d)),C||(v=e._gsap,v.renderTransform&&!t.parseTransform||is(e,t.parseTransform),k=t.smoothOrigin!==!1&&v.smooth,C=this._pt=new be(this._pt,a,se,0,1,v.renderTransform,v,0,-1),C.dep=1),f==="scale")this._pt=new be(this._pt,v,"scaleY",v.scaleY,(b?Mt(v.scaleY,b+p):p)-v.scaleY||0,tn),this._pt.u=0,o.push("scaleY",f),f+="X";else if(f==="transformOrigin"){x.push(ve,0,a[ve]),d=Wa(d),v.svg?rn(e,d,0,k,0,this):(_=parseFloat(d.split(" ")[2])||0,_!==v.zOrigin&&rt(this,v,"zOrigin",v.zOrigin,_),rt(this,a,f,vs(u),vs(d)));continue}else if(f==="svgOrigin"){rn(e,d,1,k,0,this);continue}else if(f in _r){ja(this,v,f,h,b?Mt(h,b+d):d);continue}else if(f==="smoothOrigin"){rt(this,v,"smooth",v.smooth,d);continue}else if(f==="force3D"){v[f]=d;continue}else if(f==="transform"){Ga(this,d,e);continue}}else f in a||(f=Ot(f)||f);if(w||(p||p===0)&&(h||h===0)&&!Ma.test(d)&&f in a)y=(u+"").substr((h+"").length),p||(p=0),_=de(d)||(f in Me.units?Me.units[f]:y),y!==_&&(h=ut(e,f,u,_)),this._pt=new be(this._pt,w?v:a,f,h,(b?Mt(h,b+p):p)-h,!w&&(_==="px"||f==="zIndex")&&t.autoRound!==!1?Ea:tn),this._pt.u=_||0,y!==_&&_!=="%"&&(this._pt.b=u,this._pt.r=Ba);else if(f in a)Fa.call(this,e,f,u,b?b+d:d);else if(f in e)this.add(e,f,u||e[f],b?b+d:d,n,r);else if(f!=="parseTransform"){pn(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&&fr(this)},render:function(e,t){if(t.tween._time||!kn())for(var s=t._pt;s;)s.r(e,s.d),s=s._next;else t.styles.revert()},get:Je,aliases:Ue,getSetter:function(e,t,s){var n=Ue[t];return n&&n.indexOf(",")<0&&(t=n),t in et&&t!==ve&&(e._gsap.x||Je(e,"x"))?s&&Xn===s?t==="scale"?La:Aa:(Xn=s||{})&&(t==="scale"?Oa:Va):e.style&&!dn(e.style[t])?Pa:~t.indexOf("-")?Da:Cn(e,t)},core:{_removeProperty:_t,_getMatrix:zn}};_e.utils.checkPrefix=Ot;_e.core.getStyleSaver=yr;(function(i,e,t,s){var n=we(i+","+e+","+t,function(r){et[r]=1});we(e,function(r){Me.units[r]="deg",_r[r]=1}),Ue[n[13]]=i+","+e,we(s,function(r){var o=r.split(":");Ue[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){Me.units[i]="px"});_e.registerPlugin(Sr);var H=_e.registerPlugin(Sr)||_e;H.core.Tween;const oi={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 kt(i){if(i!=null)return`${i}px`}function kr(i){return Math.max(0,Math.min(1,i))}function Tr(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 Is(i){const t=Math.max(0,Math.min(255,Math.round(i))).toString(16);return t.length===1?`0${t}`:t}function zr(i){if(i)return`#${Is(i.r)}${Is(i.g)}${Is(i.b)}`}function ai(i,e=.12){const t=Tr(i);if(!t)return i;const s=kr(e);return zr({r:t.r+(255-t.r)*s,g:t.g+(255-t.g)*s,b:t.b+(255-t.b)*s})}function Za(i,e=.12){const t=Tr(i);if(!t)return i;const s=kr(e);return zr({r:t.r*(1-s),g:t.g*(1-s),b:t.b*(1-s)})}function qa(i,e){if(i)switch(e){case"gradient":{const t=ai(i,.08)||i,s=Za(i,.12)||i;return`linear-gradient(180deg, ${t} 0%, ${s} 100%)`}case"bubble":return`radial-gradient(120% 120% at 10% 0%, ${ai(i,.14)||i} 0%, ${i} 60%)`;default:return i}}function Ya(i,e){return{...i?oi[i]:oi.md,...void 0}}function Xa(i,e){const t=Ya(i.size),s=i.color,n=qa(i.bgColor??(e==null?void 0:e.fallbackColor),i.bgType),r=kt(i.fontSize??t.fontSize),o=kt(i.borderRadius??t.borderRadius),a=kt(i.verticalPadding),c=kt(i.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,h={color:s,background:n,fontSize:r,borderRadius:o,width:kt(d),height:kt(p),padding:a&&c?`${a} ${c}`:void 0,border:u},m={};for(const g in h){const f=h[g];f!=null&&f!==""&&(m[g]=String(f))}return m}const Ja=["innerHTML"],Qa=["src"],el=l.defineComponent({__name:"ChatCollapsed",props:{element:{},toggleChat:{type:Function}},setup(i){const e=i,t=l.computed(()=>e.element),s=l.computed(()=>Xa(t.value)),n=l.computed(()=>{const a=e.element.logo;return a?a.includes("<svg"):!1}),r=l.computed(()=>{const a=e.element.logo;return a&&a.replace('width="',"").replace('height="',"").replace('"',""),a}),o=l.computed(()=>{var c;const a=(c=e.element.icon)==null?void 0:c.size;return a?a+"px":void 0});return(a,c)=>(l.openBlock(),l.createElementBlock("div",{style:l.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:c[0]||(c[0]=(...u)=>a.toggleChat&&a.toggleChat(...u))},[n.value?(l.openBlock(),l.createElementBlock("span",{key:0,class:"hs-collapsed-logo tw:transition-all",innerHTML:r.value,style:l.normalizeStyle({width:o.value,height:o.value})},null,12,Ja)):r.value?(l.openBlock(),l.createElementBlock("img",{key:1,class:"tw:transition-all",src:r.value,alt:"logo",style:l.normalizeStyle({width:o.value,height:o.value})},null,12,Qa)):l.createCommentVNode("",!0)],4))}}),Ve={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,4 @@ 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 Kt{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 tl extends Kt{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:Ve.settings.loader};return s.push(`Добавлены поля loader: '${n.loader}'`),this.createSuccessResult({...t,settings:n},s)}catch(t){return this.createErrorResult([`Ошибка при добавлении полей settings: ${t}`])}}}class sl extends Kt{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:Ve.sections.top.params.chipStyle},s.push(`Добавлено поле chipStyle: '${Ve.sections.top.params.chipStyle}' в sections.top.params`),this.createSuccessResult(t,s)}catch(t){return this.createErrorResult([`Ошибка при добавлении chipStyle: ${t}`])}}}class nl extends Kt{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:Ve.sections.inside.messageUser.bgType},t.sections.inside.messageBot={...t.sections.inside.messageBot,bgType:Ve.sections.inside.messageBot.bgType},s.push("Добавлены поля bgType для messageUser и messageBot"),this.createSuccessResult(t,s)}catch(t){return this.createErrorResult([`Ошибка при добавлении bgType для сообщений: ${t}`])}}}class il extends Kt{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 rl extends Kt{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:Ve.sections.bottom.inputSend.borderColor,borderWidth:Ve.sections.bottom.inputSend.borderWidth},inputStyle:Ve.sections.bottom.inputSend.inputStyle,bgType:Ve.sections.bottom.inputSend.bgType},s.push("Расширен inputSend с новыми полями borderStyle, inputStyle, bgType"),this.createSuccessResult(t,s)}catch(t){return this.createErrorResult([`Ошибка при расширении inputSend: ${t}`])}}}class ol extends Kt{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 tl,new sl,new nl,new il,new rl,new ol;const Fe=i=>typeof i=="string"&&i.length>=0,li=i=>typeof i=="number"&&!Number.isNaN(i),Ut=(i,e)=>typeof i=="string"&&e.includes(i);function al(i){var u,d,p,h,m,g,f;const e=[];if(!i||typeof i!="object")return{isValid:!1,errors:["config: must be an object"]};const t=i.settings||{};li(t.letterSpacing)||t.letterSpacing===void 0||e.push("settings.letterSpacing: number"),Fe(t.bgChat)||t.bgChat===void 0||e.push("settings.bgChat: string"),Fe(t.fontFamily)||t.fontFamily===void 0||e.push("settings.fontFamily: string"),li(t.fontWeight)||t.fontWeight===void 0||e.push("settings.fontWeight: number"),t.logo===void 0||Fe(t.logo)||e.push("settings.logo: string (svg or url)"),t.widgetTitle===void 0||Fe(t.widgetTitle)||e.push("settings.widgetTitle: string"),t.position===void 0&&e.push("settings.position: undefined");const s=i.texts||{};s.launchIssueTitle===void 0||Fe(s.launchIssueTitle)||e.push("texts.launchIssueTitle: string"),s.issueText===void 0||Fe(s.issueText)||e.push("texts.issueText: string"),s.widgetTitle===void 0||Fe(s.widgetTitle)||e.push("texts.widgetTitle: string"),s.hideText===void 0||Fe(s.hideText)||e.push("texts.hideText: string");const n=((u=i.sections)==null?void 0:u.top)||{},r=n.params||{};r.size===void 0||Ut(r.size,["sm","md","lg"])||e.push("sections.top.params.size: sm|md|lg"),r.chipStyle===void 0||Ut(r.chipStyle,["filled","outlined","invisible"])||e.push("sections.top.params.chipStyle: filled|outlined|invisible"),r.buttonStyle===void 0||Ut(r.buttonStyle,["filled","outlined","invisible"])||e.push("sections.top.params.buttonStyle: filled|outlined|invisible"),r.buttonType===void 0||Ut(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||Fe((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||Fe((m=n==null?void 0:n.chipWidgetTitle)==null?void 0:m.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=(((g=i.sections)==null?void 0:g.bottom)||{}).params||{};a.size===void 0||Ut(a.size,["sm","md","lg"])||e.push("sections.bottom.params.size: sm|md|lg");const c=((f=i.sections)==null?void 0:f.warnings)||{};return c.launchIssue===void 0||typeof c.launchIssue=="object"||e.push("sections.warnings.launchIssue: object"),c.connectionIssue===void 0||typeof c.connectionIssue=="object"||e.push("sections.warnings.connectionIssue: object"),{isValid:e.length===0,errors:e}}class ll{constructor(e){ue(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 on={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 an(i){return i==="sm"||i==="md"||i==="lg"?on[i]:on.md}function Mn(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 an(n)}catch{return on.md}}const cl=["aria-expanded"],ul=["innerHTML"],dl=["src","alt"],fl={key:2},gl={key:0,class:"tw:flex tw:items-center tw:w-full tw:justify-end tw:gap-1.5 header-buttons"},pl=["width","height"],hl={key:1},ml=["width","height"],yl={key:1},wl=l.defineComponent({__name:"ChatHeader",props:{isChatOpen:{type:Boolean},toggleChat:{type:Function},configDesignClass:{},sectionBorderRadius:{},mainBorderRadius:{},isPreview:{type:Boolean},isEmbedded:{type:Boolean},restartChat:{type:Function}},setup(i){const e=i,t=l.computed(()=>e.configDesignClass.getKeyObject("sections.top.params")),s=l.computed(()=>Mn(e.configDesignClass,"top")),n=l.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{borderTopLeftRadius:`${e.mainBorderRadius}px`,borderTopRightRadius:`${e.mainBorderRadius}px`,background:f,padding:`${t.value.paddingVertical}px ${t.value.paddingHorizontal}px`}}),r=l.computed(()=>{const f=e.configDesignClass.getKey("texts.widgetTitle"),y=e.configDesignClass.getKey("settings.widgetTitle");return f&&f!=="undefined"?f:y&&y!=="undefined"?y:""}),o=l.computed(()=>e.configDesignClass.getKey("sections.top.chipWidgetTitle.showType")),a=l.computed(()=>{const f=e.configDesignClass.getKey("sections.top.params.chipStyle"),y=e.configDesignClass.getKey("sections.top.chipWidgetTitle.color"),_=e.configDesignClass.getKey("sections.top.chipWidgetTitle.bgColor"),b=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:y,border:b?`1px solid ${_}`:"none",padding:C?"0px":null,"background-color":w?_:"transparent"}}),c=l.computed(()=>e.configDesignClass.getKey("sections.top.buttons.showType")),u=l.computed(()=>{const f=e.configDesignClass.getKey("sections.top.buttons.showType");return f&&f!=="undefined"?f:"icon"}),d=l.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=l.computed(()=>{const f=e.configDesignClass.getKey("sections.top.params.buttonStyle"),y=f==="outlined",_=f==="invisible",b=d.value;return{borderRadius:e.configDesignClass.getKey("settings.globalRoundingRadius")?e.sectionBorderRadius.borderRadius:e.configDesignClass.getKey("sections.top.buttons.borderRadius")+"px",color:b.color,border:y?`1px solid ${b.bgColor}`:"none",padding:_?"0px":null,"background-color":_?"transparent":f==="filled"?b.bgColor:"transparent"}}),h=l.computed(()=>{const f=e.configDesignClass.getKey("texts.hideText");return f&&f!=="undefined"?f:"Hide"}),m=l.computed(()=>e.configDesignClass.getKey("settings.logo").includes("<svg")),g=l.computed(()=>e.configDesignClass.getKey("settings.logo"));return(f,y)=>(l.openBlock(),l.createElementBlock("div",{onClick:y[0]||(y[0]=(..._)=>f.toggleChat&&f.toggleChat(..._)),class:"chat-action tw:transition-all tw:cursor-pointer tw:flex tw:items-center tw:w-full tw:justify-start tw:overflow-hidden",style:l.normalizeStyle(n.value),role:"button","aria-expanded":f.isChatOpen},[l.createVNode(l.unref(ot),{class:l.normalizeClass(["tw:transition-all tw:flex tw:items-center tw:shadow-none header-title",s.value]),variant:o.value,size:f.configDesignClass.getKey("sections.top.params.size"),style:l.normalizeStyle(a.value),type:"button","aria-label":r.value,title:r.value},{default:l.withCtx(()=>[m.value&&f.configDesignClass.getKey("sections.top.chipWidgetTitle.showType")!=="text"?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["header-logo",f.configDesignClass.getKey("sections.top.params.size")]),innerHTML:g.value},null,10,ul)):g.value&&f.configDesignClass.getKey("sections.top.chipWidgetTitle.showType")!=="text"?(l.openBlock(),l.createElementBlock("img",{key:1,src:g.value,alt:f.configDesignClass.getKey("sections.top.iconWidget.alt"),class:l.normalizeClass(f.configDesignClass.getKey("sections.top.params.size")==="sm"?"tw:w-3 tw:h-3":"tw:w-4 tw:h-4")},null,10,dl)):l.createCommentVNode("",!0),f.configDesignClass.getKey("sections.top.chipWidgetTitle.showType")!=="icon"?(l.openBlock(),l.createElementBlock("span",fl,l.toDisplayString(r.value),1)):l.createCommentVNode("",!0)]),_:1},8,["class","variant","size","style","aria-label","title"]),f.isChatOpen?(l.openBlock(),l.createElementBlock("div",gl,[l.createVNode(l.unref(ot),{variant:c.value,class:l.normalizeClass(["tw:transition-all",[s.value]]),size:f.configDesignClass.getKey("sections.top.params.size"),style:l.normalizeStyle(p.value),type:"button","aria-label":h.value,title:h.value,onClick:l.withModifiers(f.restartChat,["stop"])},{default:l.withCtx(()=>[u.value!=="text"?(l.openBlock(),l.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"},y[1]||(y[1]=[l.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,pl)):l.createCommentVNode("",!0),u.value!=="icon"?(l.openBlock(),l.createElementBlock("span",hl," Restart ")):l.createCommentVNode("",!0)]),_:1},8,["variant","class","size","style","aria-label","title","onClick"]),l.createVNode(l.unref(ot),{variant:c.value,class:l.normalizeClass(["tw:transition-all",[s.value]]),size:f.configDesignClass.getKey("sections.top.params.size"),style:l.normalizeStyle(p.value),type:"button","aria-label":h.value,title:h.value,onClick:l.withModifiers(f.toggleChat,["stop"])},{default:l.withCtx(()=>[u.value!=="text"?(l.openBlock(),l.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"},y[2]||(y[2]=[l.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,ml)):l.createCommentVNode("",!0),u.value!=="icon"?(l.openBlock(),l.createElementBlock("span",yl,l.toDisplayString(h.value),1)):l.createCommentVNode("",!0)]),_:1},8,["variant","class","size","style","aria-label","title","onClick"])])):l.createCommentVNode("",!0)],12,cl))}});typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const bl=i=>typeof i<"u";function vl(i){return JSON.parse(JSON.stringify(i))}function Mr(i,e,t,s={}){var n,r,o;const{clone:a=!1,passive:c=!1,eventName:u,deep:d=!1,defaultValue:p,shouldEmit:h}=s,m=l.getCurrentInstance(),g=t||(m==null?void 0:m.emit)||((n=m==null?void 0:m.$emit)==null?void 0:n.bind(m))||((o=(r=m==null?void 0:m.proxy)==null?void 0:r.$emit)==null?void 0:o.bind(m==null?void 0:m.proxy));let f=u;e||(e="modelValue"),f=f||`update:${e.toString()}`;const y=w=>a?typeof a=="function"?a(w):vl(w):w,_=()=>bl(i[e])?y(i[e]):p,b=w=>{h?h(w)&&g(f,w):g(f,w)};if(c){const w=_(),C=l.ref(w);let v=!1;return l.watch(()=>i[e],k=>{v||(v=!0,C.value=y(k),l.nextTick(()=>v=!1))}),l.watch(C,k=>{!v&&(k!==i[e]||d)&&b(k)},{deep:d}),C}else return l.computed({get(){return _()},set(w){b(w)}})}const _l=l.defineComponent({__name:"Textarea",props:{class:{},defaultValue:{},modelValue:{}},emits:["update:modelValue"],setup(i,{emit:e}){const t=i,n=Mr(t,"modelValue",e,{passive:!0,defaultValue:t.defaultValue});return(r,o)=>l.withDirectives((l.openBlock(),l.createElementBlock("textarea",{"onUpdate:modelValue":o[0]||(o[0]=a=>l.isRef(n)?n.value=a:null),style:{resize:"none"},"data-slot":"textarea",class:l.normalizeClass(l.unref(cn)("tw:md:text-sm",t.class))},null,2)),[[l.vModelText,l.unref(n)]])}}),Cl={key:0,class:"tw:transition-all tw:w-full"},xl={key:0,class:"svg-icon"},Sl=["innerHTML"],kl={key:1},Tl=l.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}},emits:["update:messageText","trace"],setup(i,{emit:e}){const t=i,s=()=>{t.sendMessage()},r=Mr(t,"messageText",e,{passive:!0}),o=l.computed(()=>{var g;return((g=t.configDesignClass)==null?void 0:g.getKey("sections.bottom.inputSend.inputStyle"))==="stacked"}),a=l.computed(()=>Mn(t.configDesignClass,"bottom")),c=l.computed(()=>{const g=t.configDesignClass.getKey("texts.topWarningText");return g&&g!=="undefined"?g:""}),u=l.computed(()=>{const g=t.configDesignClass.getKey("texts.disableInputText");return g&&g!=="undefined"?g:""}),d=l.computed(()=>t.configDesignClass.getKey("sections.bottom.inputSend.size")),p=l.computed(()=>t.isInputDisabled&&u.value?u.value:c.value||t.configDesignClass.getKey("texts.reconnectText")||"Reconnecting..."),h=l.computed(()=>t.configDesignClass.getKey("sections.bottom.btnSend.icon.showIcon")?t.configDesignClass.getKey("sections.bottom.btnSend.icon.src"):null),m=l.computed(()=>{const g=t.configDesignClass.getKey("texts.disclaimerText"),f=t.configDesignClass.getKey("texts.disclaimer"),y=g&&g!=="undefined"?g:f,b=!!t.configDesignClass.getKey("sections.bottom.params.disclaimerShow");return y&&y!=="undefined"&&b?y:""});return(g,f)=>(l.openBlock(),l.createElementBlock("div",null,[g.isProduction?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"tw:flex tw:flex-row tw:gap-2",style:l.normalizeStyle({padding:o.value?"0":"0 "+g.configDesignClass.getKey("sections.bottom.inputSend.sidePadding")+"px"})},[l.createVNode(l.unref(ot),{type:"button",style:l.normalizeStyle({backgroundColor:"#27272A",borderRadius:g.configDesignClass.getKey("settings.globalRoundingRadius")?g.sectionBorderRadius.borderRadius:g.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:f[0]||(f[0]=l.withModifiers(y=>g.$emit("trace",{action:"copyLast"}),["stop"]))},{default:l.withCtx(()=>f[3]||(f[3]=[l.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[l.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"}),l.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"}),l.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),l.createTextVNode(" Log last function call ")])),_:1,__:[3]},8,["style"]),l.createVNode(l.unref(ot),{type:"button",class:"tw:flex-shrink-1 tw:flex-grow-1",style:l.normalizeStyle({backgroundColor:"#27272A",borderRadius:g.configDesignClass.getKey("settings.globalRoundingRadius")?g.sectionBorderRadius.borderRadius:g.configDesignClass.getKey("sections.bottom.inputSend.borderRadius")+"px"}),"aria-label":"Copy all",title:"Copy all",onClick:f[1]||(f[1]=l.withModifiers(y=>g.$emit("trace",{action:"copyAll"}),["stop"]))},{default:l.withCtx(()=>f[4]||(f[4]=[l.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[l.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"}),l.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"}),l.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"}),l.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),l.createTextVNode(" Log all function calls ")])),_:1,__:[4]},8,["style"])],4)),l.createElementVNode("div",{class:"tw:transition-all tw:flex tw:flex-col tw:items-center tw:relative tw:mt-2",style:l.normalizeStyle({padding:o.value?"0":"0 "+g.configDesignClass.getKey("sections.bottom.inputSend.sidePadding")+"px"})},[g.showReconnectNotice||c.value||g.isInputDisabled?(l.openBlock(),l.createElementBlock("div",Cl,[l.createVNode($s,{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:p.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"])])):l.createCommentVNode("",!0),l.createElementVNode("div",{class:l.normalizeClass(["message-input tw:transition-all tw:flex-1 tw:w-full tw:p-0 tw:gap-[10px] tw:flex",[g.classSize,o.value?"tw:flex-col tw:items-stretch tw:justify-between":" tw:items-end",d.value==="sm"?"tw:items-center":""]]),style:l.normalizeStyle({...o.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":o.value?"0px":g.configDesignClass.getKey("sections.bottom.inputSend.sidePadding")+"px",border:o.value?"none":`${g.configDesignClass.getKey("sections.bottom.inputSend.borderWidth")}px solid ${g.configDesignClass.getKey("sections.bottom.inputSend.borderColor")}`})},[(l.openBlock(),l.createBlock(l.unref(_l),{class:l.normalizeClass(["tw:transition-all",["tw:w-full tw:outline-none tw:border-0 focus:tw:outline-none",o.value?"tw:h-auto rounded-none":"h-full"]]),placeholder:g.configDesignClass.getKey("texts.inputPlaceholder")||"Type question",rows:d.value==="sm"?1:d.value==="md"?2:3,key:g.configDesignClass.getKey("sections.bottom.inputSend.color"),modelValue:l.unref(r),"onUpdate:modelValue":f[2]||(f[2]=y=>l.isRef(r)?r.value=y:null),onKeyup:l.withKeys(l.withModifiers(s,["exact"]),["enter"]),style:l.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"])),l.createElementVNode("div",{class:l.normalizeClass(o.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:l.normalizeStyle({marginBottom:g.configDesignClass.getKey("sections.bottom.inputSend.paddingVertical")+"px",marginRight:g.configDesignClass.getKey("sections.bottom.inputSend.paddingHorizontal")+"px"})},[l.createVNode(l.unref(ot),{class:l.normalizeClass(["tw:transition-all",["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":a.value,o.value?"tw:self-end":"tw:ml-auto",{"tw:opacity-50":l.unref(r).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"}]]),size:g.configDesignClass.getKey("sections.bottom.btnSend.showType")==="icon"?"icon":g.configDesignClass.getKey("sections.bottom.params.size"),onClick:s,style:l.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:l.withCtx(()=>[h.value?(l.openBlock(),l.createElementBlock("div",xl,[l.createElementVNode("div",{innerHTML:h.value,style:l.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,Sl)])):l.createCommentVNode("",!0),g.configDesignClass.getKey("sections.bottom.btnSend.showType")==="text"||g.configDesignClass.getKey("sections.bottom.btnSend.showType")==="both"?(l.openBlock(),l.createElementBlock("span",kl,l.toDisplayString(g.configDesignClass.getKey("texts.sendButton")),1)):l.createCommentVNode("",!0)]),_:1},8,["size","class","style","disabled"]),o.value&&m.value?(l.openBlock(),l.createElementBlock("div",{key:0,class:"tw:text-[11px] tw:text-white/50 tw:flex tw:items-center",style:l.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")})},l.toDisplayString(m.value),5)):l.createCommentVNode("",!0)],6)],6),!o.value&&m.value?(l.openBlock(),l.createElementBlock("div",{key:1,class:"tw:px-2 tw:text-white/50 tw:mb-2 tw:flex tw:items-center tw:justify-center",style:l.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")})},l.toDisplayString(m.value),5)):l.createCommentVNode("",!0)],4)]))}});var ee=(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))(ee||{}),Rr=(i=>(i.UserMessage="Give me some action",i))(Rr||{});class Ie{base(e){return{isChatOpen:!0,isChatActive:!0,messages:[],isConnectionError:!1,isProcessError:!1,isReconnectError:!1,isInputDisabled:!1,showWelcome:!1,blockSocket:!0,traceLastShown:!1,...e}}}class zl extends Ie{constructor(){super(...arguments);ue(this,"type",ee.Collapsed)}getState(){return this.base({isChatOpen:!1})}}class ci extends Ie{constructor(){super(...arguments);ue(this,"type",ee.EmptyChat)}getState(){return this.base({showWelcome:!0,messages:[]})}}class Ml extends Ie{constructor(){super(...arguments);ue(this,"type",ee.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 Rl extends Ie{constructor(){super(...arguments);ue(this,"type",ee.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 Bl extends Ie{constructor(){super(...arguments);ue(this,"type",ee.LaunchIssue)}getState(){return this.base({isConnectionError:!0})}}class El extends Ie{constructor(){super(...arguments);ue(this,"type",ee.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 Pl extends Ie{constructor(){super(...arguments);ue(this,"type",ee.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 Dl extends Ie{constructor(){super(...arguments);ue(this,"type",ee.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 Al extends Ie{constructor(){super(...arguments);ue(this,"type",ee.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 Ll extends Ie{constructor(){super(...arguments);ue(this,"type",ee.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 Ol extends Ie{constructor(){super(...arguments);ue(this,"type",ee.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 Vl{static create(e){switch(e){case ee.Collapsed:case"collapsed":return new zl;case ee.EmptyChat:case"empty":return new ci;case ee.Messages:case"messages":return new Ml;case ee.ActionSnippet:case"action_snippet":return new Rl;case ee.LaunchIssue:case"launch_issue":return new Bl;case ee.ConnectionIssue:case"connection_issue":return new El;case ee.ReconnectingAttempt:case"reconnecting_attempt":return new Pl;case ee.InputBlocked:case"input_blocked":return new Dl;case ee.ActionLoader:case"action_loader":return new Al;case ee.TracesMessage:case"traces_message":return new Ll;case ee.TracesWithMeta:case"traces_with_meta":return new Ol;default:return new ci}}}class ui{static getScenarioFromUrl(){try{return new URLSearchParams(window.location.search).get("scenario")??void 0}catch{return}}static getState(e,t,s){return{...Vl.create(e).getState(t,s),...s??{}}}}const Il={key:"message",class:"tw:transition-all message-text"},Kl=l.defineComponent({__name:"MessageBot",props:{message:{},welcomeColor:{},color:{},bgColor:{},size:{},bgType:{},fontSize:{},borderWidth:{},borderColor:{},configDesignClass:{}},setup(i){const e=i,t=l.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 l.openBlock(),l.createElementBlock("li",{class:l.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]",[t.value,{"item-primary":!((r=s.message.chunk)!=null&&r.start)}]]),style:l.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"})},[l.createElementVNode("div",Il,l.toDisplayString(s.message.text),1)],6)}}}),Br=(i,e)=>{const t=i.__vccOpts||i;for(const[s,n]of e)t[s]=n;return t},Nl=Br(Kl,[["__scopeId","data-v-121f4dbb"]]),Fl=l.defineComponent({__name:"MessageUser",props:{message:{},isFirst:{type:Boolean},color:{},bgColor:{},borderWidth:{},borderColor:{},fontSize:{},size:{},bgType:{},configDesignClass:{}},setup(i){const e=i,t=l.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=l.computed(()=>e.bgType==="bubble"?e.borderWidth+"px solid "+e.borderColor:"none");return(n,r)=>(l.openBlock(),l.createElementBlock("li",{class:l.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:l.normalizeStyle({color:n.color,"background-color":n.bgType==="bubble"?n.bgColor:"transparent",border:s.value,"font-size":n.fontSize+"px"})},l.toDisplayString(n.message.text),7))}}),Wl=["innerHTML"],$l={key:"dots",class:"tw:flex tw:items-center tw:justify-start tw:gap-1 tw:h-4"},Ul={key:"dots-pulse",class:"tw:flex tw:items-center tw:justify-start tw:gap-1 tw:h-4"},Hl={key:"circle-pulse",class:"circle-pulse"},jl={key:"circle-pulse-1",class:"circle-pulse-1"},Gl=["data-text"],Zl=l.defineComponent({__name:"LoadingMessage",props:{loader:{},text:{},message:{},configDesignClass:{},paused:{type:Boolean}},setup(i){const e=i,t=l.ref(null),s=l.ref(!1);let n=null;const r=()=>{const a=t.value;if(!a)return;const c=a.closest("li");if(!c)return;const u=c.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};l.onMounted(()=>{l.nextTick(r);const a=t.value,c=a==null?void 0:a.closest("ul");c&&(n=new MutationObserver(()=>r()),n.observe(c,{childList:!0,subtree:!0}))}),l.onBeforeUnmount(()=>{n&&n.disconnect()}),l.watch(()=>e.text,()=>l.nextTick(r));const o=l.computed(()=>!!e.paused||s.value);return(a,c)=>(l.openBlock(),l.createElementBlock("li",{key:"loading",ref_key:"rootRef",ref:t,class:"message-text-loading tw:flex tw:items-center tw:justify-start tw:gap-3"},[l.createVNode(l.Transition,{name:"fade",mode:"out-in"},{default:l.withCtx(()=>[o.value?(l.openBlock(),l.createElementBlock("div",{key:"complete-step-icon",innerHTML:a.configDesignClass.getKey("sections.loader.completeStep.icon.src"),class:"svg-inherit",style:l.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,Wl)):!a.loader||a.loader==="dots"?(l.openBlock(),l.createElementBlock("div",$l,c[0]||(c[0]=[l.createElementVNode("div",{class:"loading-dot tw:rounded-full"},null,-1),l.createElementVNode("div",{class:"loading-dot loading-dot-delay-1 tw:rounded-full"},null,-1),l.createElementVNode("div",{class:"loading-dot loading-dot-delay-2 tw:rounded-full"},null,-1),l.createElementVNode("div",{class:"loading-dot loading-dot-delay-3 tw:rounded-full"},null,-1)]))):a.loader==="dots-pulse"?(l.openBlock(),l.createElementBlock("div",Ul,c[1]||(c[1]=[l.createElementVNode("span",{class:"dot-pulse dot-1"},null,-1),l.createElementVNode("span",{class:"dot-pulse dot-2"},null,-1),l.createElementVNode("span",{class:"dot-pulse dot-3"},null,-1)]))):a.loader==="circle-pulse"?(l.openBlock(),l.createElementBlock("div",Hl,c[2]||(c[2]=[l.createElementVNode("span",{class:"ring ring-1"},null,-1),l.createElementVNode("span",{class:"ring ring-2"},null,-1)]))):a.loader==="circle-pulse-1"?(l.openBlock(),l.createElementBlock("div",jl,c[3]||(c[3]=[l.createElementVNode("span",{class:"ripple r1"},null,-1),l.createElementVNode("span",{class:"ripple r2"},null,-1),l.createElementVNode("span",{class:"center"},null,-1)]))):l.createCommentVNode("",!0)]),_:1}),l.createVNode(l.Transition,{name:"fade-text",mode:"out-in"},{default:l.withCtx(()=>{var u,d,p,h;return[(l.openBlock(),l.createElementBlock("span",{class:l.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:l.normalizeStyle({color:a.configDesignClass.getKey("sections.loader.typingLoader.color")})},l.toDisplayString(o.value?"Thinking completed":(p=a.message)!=null&&p.text?(h=a.message)==null?void 0:h.text:a.text),15,Gl))]}),_:1})],512))}}),di=Br(Zl,[["__scopeId","data-v-bb55e057"]]),ql=["data-height"],Yl={class:"tw:transition-all tw:flex tw:flex-col tw:items-center tw:gap-1 tw:px-1"},Xl=["innerHTML"],Jl={class:"tw:transition-all tw:flex tw:items-center tw:gap-2"},Ql=l.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=l.computed(()=>e.index===3&&e.traceLastShown||e.isLast),s=l.computed(()=>{switch(e.size){case"sm":return"tw:text-xs";case"md":return"tw:text-xs";case"lg":return"tw:text-base"}}),n=l.computed(()=>t.value?e.configDesignClass.getKey("sections.loader.activeStep.icon.src"):e.configDesignClass.getKey("sections.loader.completeStep.icon.src")),r=l.computed(()=>e.configDesignClass.getKey("sections.loader.activeStep.color")),o=l.computed(()=>e.configDesignClass.getKey("sections.loader.completeStep.color")),a=l.computed(()=>t.value?r.value:o.value),c=l.computed(()=>t.value?e.configDesignClass.getKey("sections.loader.activeStep.icon.color"):e.configDesignClass.getKey("sections.loader.completeStep.icon.color")),u=l.computed(()=>Mn(e.configDesignClass,"inside"));return(d,p)=>(l.openBlock(),l.createElementBlock("li",{class:l.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:l.normalizeStyle({"padding-top":d.configDesignClass.getKey("sections.loader.completeStep.verticalSpacing")+"px"})},[l.createElementVNode("hr",{class:"tw:w-[1px] tw:bg-white tw:opacity-20 tw:absolute",style:l.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),l.createElementVNode("div",{key:"message",class:l.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}])},[l.createElementVNode("div",Yl,[l.createElementVNode("div",{innerHTML:n.value,class:l.normalizeClass(["svg-inherit",{"tw:animate-spin":t.value}]),style:l.normalizeStyle({color:c.value,height:d.configDesignClass.getKey("sections.loader.completeStep.icon.size")+"px",width:d.configDesignClass.getKey("sections.loader.completeStep.icon.size")+"px"})},null,14,Xl)]),l.createElementVNode("div",Jl,[d.message.meta?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("p",{key:0,style:l.normalizeStyle({color:a.value,"font-size":d.configDesignClass.getKey("sections.loader.completeStep.fontSize")+"px"})},l.toDisplayString(d.message.text),5)),d.message.meta?(l.openBlock(),l.createBlock(l.unref(ot),{key:1,style:l.normalizeStyle({color:e.activeMessage?"rgba(255, 255, 255, 0.60)":"#3F3F46",background:e.activeMessage?"#2F2F31":"#ECEDEE",border:e.activeMessage?"none":"1px solid #fff"}),class:l.normalizeClass(["tw:flex tw:items-center tw:gap-1 tw:rounded-md tw:shadow-xs",u.value])},{default:l.withCtx(()=>[p[0]||(p[0]=l.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[l.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)),l.createElementVNode("span",null,l.toDisplayString(d.message.text),1)]),_:1,__:[0]},8,["style","class"])):l.createCommentVNode("",!0)])],2)],14,ql))}});class ec{constructor(e,t){ue(this,"structure");ue(this,"options");ue(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 c,u;const a=new RegExp(`\\{${this.escapeRegExp(r)}\\}`,"g");if(o.type==="text"){const d=(c=s==null?void 0:s[r])==null?void 0:c.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||{},m=d.map(g=>this.renderLayout(p,h,g)).join("");n=n.replace(a,m);return}}),n=n.replace(/style=\"([^\"]*)\"/g,(r,o)=>{const a=o.split(";").map(c=>c.trim()).filter(Boolean).filter(c=>{const[u]=c.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 tc={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 sc(i){const e=l.computed(()=>{const w=i==null?void 0:i.getKeyObject("sections.inside.activeSnippet"),C=i==null?void 0:i.getKeyObject("sections.activeSnippet"),v=w&&w!=="undefined"?w:C;return v&&v!=="undefined"?v:{}}),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=l.computed(()=>i==null?void 0:i.getKey("sections.inside.activeSnippet.element.bgColor")),n=l.computed(()=>i==null?void 0:i.getKey("sections.inside.activeSnippet.element.color")),r=l.computed(()=>i==null?void 0:i.getKey("sections.inside.activeSnippet.element.sidePadding")),o=l.computed(()=>i==null?void 0:i.getKey("sections.inside.activeSnippet.element.verticalSpacing")),a=l.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"))),c=l.computed(()=>{var w,C,v,k,z,x,T,L;return{color:(C=(w=e.value)==null?void 0:w.headerChip)==null?void 0:C.color,background:(k=(v=e.value)==null?void 0:v.headerChip)==null?void 0:k.bgColor,borderColor:(x=(z=e.value)==null?void 0:z.headerChip)==null?void 0:x.borderColor,bgColor:(L=(T=e.value)==null?void 0:T.headerChip)==null?void 0:L.bgColor}}),u=l.computed(()=>{var w,C;return t(c.value,(C=(w=e.value)==null?void 0:w.headerChip)==null?void 0:C.bgType)}),d=l.computed(()=>{var w,C,v,k;return{...u.value,"border-radius":i!=null&&i.getKey("settings.globalRoundingRadius")?Xt(i,2).borderRadius:((C=(w=e.value)==null?void 0:w.headerChip)==null?void 0:C.borderRadius)+"px","font-size":((k=(v=e.value)==null?void 0:v.headerChip)==null?void 0:k.fontSize)+"px"}}),p=l.computed(()=>{var w;return(w=e.value)==null?void 0:w.propertyColor}),h=l.computed(()=>{var w;return(w=e.value)==null?void 0:w.valueColor}),m=l.computed(()=>{var w,C,v,k;return{color:(C=(w=e.value)==null?void 0:w.yesButton)==null?void 0:C.color,background:(k=(v=e.value)==null?void 0:v.yesButton)==null?void 0:k.bgColor}}),g=l.computed(()=>{var w,C,v,k;return{color:(C=(w=e.value)==null?void 0:w.noButton)==null?void 0:C.color,background:(k=(v=e.value)==null?void 0:v.noButton)==null?void 0:k.bgColor}}),f=l.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 an(w!=="undefined"?w:C)}),y=l.computed(()=>{const w=i==null?void 0:i.getKey("sections.inside.activeSnippet.headerChip.size");return an(w)}),_=w=>{const C=(w.id||"").toLowerCase(),k=C==="confirm"||C==="yes"?m.value:g.value,z=i==null?void 0:i.getKey("sections.inside.activeSnippet.params.buttonStyle");return t(k,z)},b=l.computed(()=>i!=null&&i.getKey("settings.globalRoundingRadius")?Xt(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:m,noButton:g,buttonStyle:_,getButtonStyle:t,actionBtnSizeClass:f,buttonRadiusStyle:b,chipSizeClass:y}}const nc=["innerHTML"],ic=l.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:c,buttonRadiusStyle:u,verticalSpacing:d,sidePadding:p,valueColor:h,getButtonStyle:m,border:g,chipSizeClass:f}=sc(t.configDesignClass),y=l.computed(()=>{var k;return(k=t.configDesignClass)==null?void 0:k.getKey("sections.inside.activeSnippet.params.buttonStyle")}),_=l.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:g.value,padding:`${p.value}px`,gap:`${d.value}px`}}),b=l.computed(()=>{var k,z,x,T,L,W,K;return{container:{style:_.value},headerChip:{style:r.value,class:f.value},actionConfirm:{class:c.value,style:{...m(o.value,y.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":((T=t.configDesignClass)==null?void 0:T.getKey("sections.inside.activeSnippet.element.fontSize"))+"px"}},actionCancel:{class:c.value,style:{...m(a.value,y.value),flex:"1","line-height":"1","border-radius":(L=t.configDesignClass)!=null&&L.getKey("settings.globalRoundingRadius")?u.value.borderRadius:((W=t.configDesignClass)==null?void 0:W.getKey("sections.inside.activeSnippet.yesButton.borderRadius"))+"px","font-size":((K=t.configDesignClass)==null?void 0:K.getKey("sections.inside.activeSnippet.yesButton.fontSize"))+"px"}}}}),w=e,C=l.computed(()=>new ec(t.structure).build(t.data).buildStyle(b.value).result()),v=k=>{var L;const z=k.target;if(!z)return;const x=z.closest("[data-cb]"),T=x==null?void 0:x.getAttribute("data-cb");T&&((L=t.message.snippet)!=null&&L.sequence)&&w("action",T,t.message.snippet.sequence)};return(k,z)=>(l.openBlock(),l.createElementBlock("div",{class:"tw:mt-1 tw:mb-1 tw:max-w-[65%]",onClick:v,innerHTML:C.value},null,8,nc))}}),rc=["innerHTML"],oc=l.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}},emits:["handleClickMessage","handleSnippetAction"],setup(i,{emit:e}){const t=l.ref(null),s=i,n=e,r=g=>{g.meta&&n("handleClickMessage",g)},o=l.computed(()=>s.messages.filter((g,f,y)=>{var _;return s.isProduction?!(g.type==="usageTokensByAI"||g.isSystem&&((_=y[f+1])!=null&&_.isSystem)):!0}));l.watch(s.messages,()=>{c()&&a()},{deep:!0});const a=()=>{l.nextTick(()=>{t.value&&(t.value.scrollTop=t.value.scrollHeight)})},c=()=>{if(!t.value)return!0;const g=t.value;return g.scrollHeight-g.scrollTop-g.clientHeight<=24},u=()=>{},d=g=>{const f=g.replace("#",""),y=parseInt(f.substr(0,2),16),_=parseInt(f.substr(2,2),16),b=parseInt(f.substr(4,2),16),w=Math.max(0,y-12),C=Math.max(0,_-12),v=Math.max(0,b-12);return`linear-gradient(180deg, rgba(${w}, ${C}, ${v}, 0.95) 0%, rgba(0,0,0, 0) 100%)`},p=l.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"}}),h=l.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"),m=g=>s.configDesignClass.getKey("settings.globalRoundingRadius")?s.sectionBorderRadius.borderRadius:s.configDesignClass.getKey(g?"sections.inside.messageUser.borderRadius":"sections.inside.messageBot.borderRadius")+"px";return(g,f)=>(l.openBlock(),l.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},[g.showWelcome?(l.openBlock(),l.createElementBlock("li",{key:0,class:l.normalizeClass(["tw:transition-all",["tw:text-"+(g.configDesignClass.getKey("sections.inside.params.size")==="sm"?"xs":g.configDesignClass.getKey("sections.inside.params.size")==="md"?"sm":"base")]]),style:l.normalizeStyle({color:g.configDesignClass.getKey("sections.inside.messageUser.color"),"margin-bottom":`${g.configDesignClass.getKey("settings.gapMessageLine")}px`})},[l.createElementVNode("div",{key:"message",class:l.normalizeClass(["tw:transition-all",p.value]),style:l.normalizeStyle({borderRadius:g.configDesignClass.getKey("settings.globalRoundingRadius")?g.sectionBorderRadius.borderRadius:g.configDesignClass.getKey("sections.inside.welcomeMessage.borderRadius")+"px",color:g.configDesignClass.getKey("sections.inside.welcomeMessage.color"),background:h.value,lineHeight:g.configDesignClass.getKey("settings.lineHeight"),fontSize:g.configDesignClass.getKey("sections.inside.welcomeMessage.fontSize")+"px",letterSpacing:g.configDesignClass.getKey("settings.letterSpacing")+"px"})},[l.createElementVNode("div",{innerHTML:l.unref(Ws)(g.configDesignClass.getKey("texts.welcomeMessage"))},null,8,rc)],6)],6)):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(o.value,(y,_)=>{var b;return l.openBlock(),l.createElementBlock(l.Fragment,{key:_},[y.snippet?(l.openBlock(),l.createBlock(ic,{key:0,structure:l.unref(tc),data:y.snippet.data,message:y,configDesignClass:g.configDesignClass,onAction:f[0]||(f[0]=(w,C)=>n("handleSnippetAction",w,C))},null,8,["structure","data","message","configDesignClass"])):(l.openBlock(),l.createBlock(l.resolveDynamicComponent(y.isUser?Fl:y.isSystem?g.isProduction?di:Ql:Nl),{key:1,message:y,"data-component":y.isSystem?g.isProduction?"LoadingMessage":"MessageSystem":"MessageBot",style:l.normalizeStyle({borderRadius:m(y.isUser),"margin-top":`${(b=o.value[_-1])!=null&&b.isSystem&&!y.isSystem?"12px":"0px"}`,"margin-bottom":`${y.isSystem?"2px":g.configDesignClass.getKey("settings.gapMessageLine")+"px"}`,lineHeight:g.configDesignClass.getKey("settings.lineHeight"),letterSpacing:g.configDesignClass.getKey("settings.letterSpacing")+"px"}),loader:g.configDesignClass.getKey("settings.loader"),color:y.isUser?g.configDesignClass.getKey("sections.inside.messageUser.color"):g.configDesignClass.getKey("sections.inside.messageBot.color"),welcomeColor:g.configDesignClass.getKey("sections.inside.messageUser.color"),bgType:y.isUser?g.configDesignClass.getKey("sections.inside.messageUser.bgType"):g.configDesignClass.getKey("sections.inside.messageBot.bgType"),bgColor:y.isUser?g.configDesignClass.getKey("sections.inside.messageUser.bgColor"):g.configDesignClass.getKey("sections.inside.messageBot.bgColor"),size:y.isUser?g.configDesignClass.getKey("sections.inside.messageUser.size"):g.configDesignClass.getKey("sections.inside.messageBot.size"),fontSize:y.isUser?g.configDesignClass.getKey("sections.inside.messageUser.fontSize"):g.configDesignClass.getKey("sections.inside.messageBot.fontSize"),borderWidth:y.isUser?g.configDesignClass.getKey("sections.inside.messageUser.borderWidth"):g.configDesignClass.getKey("sections.inside.messageBot.borderWidth"),borderColor:y.isUser?g.configDesignClass.getKey("sections.inside.messageUser.borderColor"):g.configDesignClass.getKey("sections.inside.messageBot.borderColor"),index:_,traceLastShown:g.traceLastShown,configDesignClass:g.configDesignClass,activeMessage:g.activeMessage===y,isLast:_===o.value.length-1,onClick:w=>r(y)},null,8,["message","data-component","style","loader","color","welcomeColor","bgType","bgColor","size","fontSize","borderWidth","borderColor","index","traceLastShown","configDesignClass","activeMessage","isLast","onClick"]))],64)}),128)),g.isLoading?(l.openBlock(),l.createBlock(di,{key:1,class:l.normalizeClass({"tw:mt-8":g.traceLastShown}),loader:g.configDesignClass.getKey("settings.loader"),configDesignClass:g.configDesignClass,text:g.configDesignClass.getKey("texts.typingLoader")},null,8,["class","loader","configDesignClass","text"])):l.createCommentVNode("",!0),l.renderSlot(g.$slots,"footer")],544))}}),ac=l.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}},emits:["handleClickMessage","update:activeMessage","handleSnippetAction"],setup(i,{emit:e}){const t=i,s=e,n=l.computed({get:()=>t.activeMessage,set:r=>s("update:activeMessage",r)});return(r,o)=>(l.openBlock(),l.createElementBlock("div",{class:"tw:transition-all tw:flex tw:flex-col tw:justify-between tw:w-full tw:min-h-0",style:l.normalizeStyle([{flex:"1 1 0"},{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"}])},[l.createVNode(oc,{messages:r.messages,isPreview:r.isPreview,isEmbedded:r.isEmbedded,configDesignClass:r.configDesignClass,isLoading:r.isLoading,isStreaming:r.isStreaming,isProduction:r.isProduction,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,c)=>s("handleSnippetAction",a,c))},null,8,["messages","isPreview","isEmbedded","configDesignClass","isLoading","isStreaming","isProduction","sectionBorderRadius","showWelcome","activeMessage","traceLastShown"])],4))}}),lc={key:0,class:"chat tw:w-full tw:h-full tw:flex tw:pt-0 tw:relative",style:{overflow:"hidden"}},cc={key:0,class:"tw:w-full tw:h-full"},uc={key:1,class:"messages tw:transition-all tw:flex tw:flex-col tw:justify-between tw:w-full"},Ht=0,dc=l.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(i,{expose:e,emit:t}){const s=t,n=l.ref(!1),r=l.ref(!1),o=l.ref(null),a=l.ref(!1),c=l.ref(!1),u=l.ref(!1),d=l.ref(!1),p=l.ref(!0),h=l.ref(!1),m=l.ref(!1),g=l.ref(!1),f=l.ref(0),y=l.ref(!1),_=l.ref(null),b=i,w=async()=>{if(!(b.isPreview||b.scenario))try{s("restart-chat"),Dr(),await os()}catch(S){console.error("Failed to restart chat connection",S)}},C=l.computed(()=>{const S=P.value.getKey("settings.position"),M=P.value.getKey("settings.offset.x"),R=P.value.getKey("settings.offset.y"),O=G.value?P.value.getKey("settings.size.width"):P.value.getKey("sections.colapsed.width"),Y=G.value?P.value.getKey("settings.size.height"):P.value.getKey("sections.colapsed.height");return{...{...S==="topLeft"?{top:R+"px",left:M+"px"}:{},...S==="topRight"?{top:R+"px",right:M+"px"}:{},...S==="bottomLeft"?{bottom:R+"px",left:M+"px"}:{},...S==="bottomRight"?{bottom:R+"px",right:M+"px"}:{},...S==="top"?{top:R+"px",left:"50%",transform:"translateX(-50%)"}:{},...S==="bottom"?{bottom:R+"px",left:"50%",transform:"translateX(-50%)"}:{},...S==="left"?{left:M+"px",top:"50%",transform:"translateY(-50%)"}:{},...S==="right"?{right:M+"px",top:"50%",transform:"translateY(-50%)"}:{}},width:G.value&&!U.value?O+"px":void 0,height:G.value||U.value?Y+"px":void 0}}),v=()=>{if(b.configLink)return b.configLink;const M=new URLSearchParams(window.location.search).get("config");if(M)return M},k=l.ref(null),z=l.ref(null),x=l.ref(null),T=()=>x.value?x.value:v()?z.value:b.configWidget?b.configWidget:Ve,L=l.computed(()=>{const S=T(),{isValid:M,errors:R}=al(S);return M?S:(console.warn("[HSW] Invalid widget config, falling back to DEFAULT_CONFIG:",R),Ve)}),W=S=>{k.value=S,s("choose-trace",{action:S.type,messages:[S]})},K=async()=>{s("choose-trace",{action:"copyAll",messages:V.value})},$=async()=>{if(V.value.length===0){s("choose-trace",{action:"copyLast",messages:[]});return}let S=-1;for(let R=V.value.length-1;R>=0;R--)if(V.value[R].isUser){S=R;break}const M=S>=0?S:0;s("choose-trace",{action:"copyLast",messages:V.value.slice(M)})},J=async S=>{switch(S.action){case"copyLast":await $();break;case"copyIteration":await $();break;case"copyAll":await K();break}},P=l.computed(()=>new ll(L.value)),F=l.computed(()=>ki(P.value)),j=l.computed(()=>Xt(P.value,8)),D=l.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]"}}),G=l.ref(!0),Ke=()=>{const S=o.value;if(!S)return{width:56,height:56};const M=S.querySelector(".chat-action");if(!M)return{width:56,height:56};const R=M.getBoundingClientRect();return{width:Math.max(1,R.width),height:Math.max(1,R.height)}},Ce=l.ref(!1),xe=async S=>{if(Ce.value)return;Ce.value=!0;const M=o.value;if(!M||S===G.value)return;const R=M.querySelector(".chatWrapper"),O=R==null?void 0:R.querySelector(".chat");if(S){const Y=M.querySelector(".chat-collapsed");Y&&(H.killTweensOf(Y),H.to(Y,{opacity:1,duration:.15,ease:"power2.in"}));const{height:pe,width:Ne}=Ke();await new Promise(as=>setTimeout(as,150)),G.value=!0,await l.nextTick();const De=Math.max(pe||0,Ne||0)||56;H.killTweensOf(M),O&&H.killTweensOf(O),R&&H.killTweensOf(R),H.set(M,{width:De,height:De,overflow:"hidden",opacity:0,willChange:"width, height, opacity"}),R&&H.set(R,{opacity:0,willChange:"opacity"}),O&&H.set(O,{opacity:0,willChange:"opacity"}),H.set(M,{width:De,height:De,overflow:"hidden",opacity:0,willChange:"width, height, opacity"}),H.to(M,{width:P.value.getKey("settings.size.width"),height:P.value.getKey("settings.size.height"),opacity:1,duration:.4,ease:"power2.out",onComplete:()=>{H.set(M,{clearProps:"overflow,position,left,top,xPercent,yPercent,marginTop,willChange,opacity"}),Ce.value=!1}}),R&&H.to(R,{opacity:1,duration:.3,delay:.35,ease:"power2.out",onComplete:()=>{H.set(R,{clearProps:"willChange,opacity"})}}),O&&H.to(O,{opacity:1,duration:.3,delay:.15,ease:"power2.out",onComplete:()=>{H.set(O,{clearProps:"willChange"})}})}else{const Y=P.value.getKey("sections.colapsed.height")+P.value.getKey("sections.colapsed.borderWidth")*2;H.killTweensOf(M),O&&H.killTweensOf(O),R&&H.killTweensOf(R),H.set(M,{width:P.value.getKey("settings.size.width"),height:P.value.getKey("settings.size.height"),overflow:"hidden",willChange:"width, height, opacity"}),R&&(H.set(R,{willChange:"opacity"}),H.to(R,{opacity:0,duration:.5,ease:"power3.inOut",onComplete:()=>{H.set(R,{clearProps:"willChange,opacity"})}})),O&&(H.set(O,{willChange:"opacity"}),H.to(O,{opacity:0,duration:.2,ease:"power2.in",onComplete:()=>{H.set(O,{clearProps:"willChange"})}})),H.to(M,{width:Y,height:Y,opacity:0,duration:.35,marginTop:0,ease:"power2.inOut",onComplete:()=>{G.value=!1,l.nextTick().then(()=>{const pe=M.querySelector(".chat-collapsed");pe&&(H.set(pe,{opacity:0}),H.to(pe,{opacity:1,duration:.25,ease:"power2.out"})),H.set(M,{opacity:1})}),H.set(M,{clearProps:"overflow,position,left,top,xPercent,yPercent,marginTop,willChange"}),Ce.value=!1}})}},q=l.ref(b.isPreview||!1),U=l.ref(b.isEmbedded||!1);l.watch(()=>b.isEmbedded,S=>{U.value=S});const me=l.ref(!!b.isPreview),Ze=l.ref(b.widgetId||`hsw-${Math.random().toString(36).slice(2,10)}`),V=l.ref([]),qe=l.ref("");let Q=null,Ee=0;const Nt=l.computed(()=>V.value.length>0&&V.value[V.value.length-1].isUser===!0||c.value),tt=l.ref(null),Er=(S,M)=>{console.log("handleSnippetAction",S,M),Bn({action:{sequence:M,command:S,data:{}}})},Pe=S=>{var M;if(S.chunkId&&S.text){const R=V.value[V.value.length-1];R.chunkId===S.chunkId?((M=S.chunk)!=null&&M.start?R.text="":R.text+=S.text,R.chunk.start=!1):V.value.push(S)}else V.value.push(S)},Ft=(()=>{if(b.link)return b.link;const M=new URLSearchParams(window.location.search).get("link");if(M)return M;const O=new URLSearchParams(window.location.hash.substring(1)).get("link");if(O)return O;try{const Y="ws://localhost:8080/client/widget-chat/v1/ws/?token=KOUNf8Nk4P7DpAhamBZWqyfW5Jf5gJpxw6UN0un7WnBEs2IxMZBEmvKOix9NfWYwCDKIAmi5b0o9HxFvZukXstLJRoYkVcp2eRWb3NA4lC7BEuSMik4_9wTJCBNpMEOTAxeTulrhWPUN4FGnKCJz7D52";if(Y)return Y}catch(Y){console.warn("Environment variables not available:",Y)}return console.log("Using fallback link: ws://localhost:3000"),"ws://localhost:3000"})(),Rn=()=>{if(Ee>=Ht){Pe({text:`Failed to connect after ${Ht} attempts. Please check your connection.`,isUser:!1});return}Ee++,console.log(`Reconnection attempt ${Ee}/${Ht}`),setTimeout(()=>{Ss()},2e3*Ee)},Pr=()=>{Pe({text:Rr.UserMessage,isUser:!0}),Pe({text:"{Agent response message}",isUser:!1})},Ss=()=>{try{if(!Ft||typeof Ft!="string"){console.error("Invalid WebSocket link:",Ft),Pe({text:"Error: Invalid WebSocket URL",isUser:!1});return}if(console.log("Attempting to connect to:",Ft),Q=new WebSocket(Ft),!Q){console.error("Failed to create WebSocket instance");return}Q.onmessage=S=>{var M,R,O,Y,pe,Ne,De,as,Ln,On;try{const A=JSON.parse(S.data);if(A.snippet)return Pe({snippet:{...A.snippet,data:JSON.parse(A.snippet.data||"{}")},isUser:!1,isSystem:!0,isError:!1});if(A.error)return Pe({text:A.error.message,isUser:!1,isSystem:!0,isError:!0});if((M=A==null?void 0:A.textChunk)!=null&&M.start&&(y.value=!0,_.value=(R=A==null?void 0:A.textChunk)==null?void 0:R.start,Pe({text:"",isUser:!1,chunkId:(O=A==null?void 0:A.textChunk)==null?void 0:O.start,chunk:A==null?void 0:A.textChunk})),(Y=A==null?void 0:A.textChunk)!=null&&Y.end||(pe=A==null?void 0:A.textChunk)!=null&&pe.start){(Ne=A==null?void 0:A.textChunk)!=null&&Ne.end&&_.value&&((De=A==null?void 0:A.textChunk)==null?void 0:De.end)===_.value&&(y.value=!1,_.value=null);return}(as=A==null?void 0:A.textChunk)!=null&&as.text&&Pe({text:A.textChunk.text,isUser:!1,chunkId:(Ln=A==null?void 0:A.textChunk)==null?void 0:Ln.id}),A!=null&&A.trace&&Pe({text:A.trace.message,isUser:!1,isSystem:!0,meta:A.trace.meta,time:A.trace.time,type:A.trace.type}),(On=A==null?void 0:A.trace)!=null&&On.meta&&!b.isProduction&&s("trace",{action:A.trace.type,messages:[A.trace]})}catch(A){console.error("Error parsing WebSocket message:",A),Pe({text:"Error: Failed to parse server response",isUser:!1})}},Q.onopen=()=>{Ee=0},Q.onclose=S=>{console.log("Connection closed",S);let M=`Connection closed (${S.code})`;switch(S.code){case 1e3:M="Connection closed normally";break;case 1001:M="Connection closed: going away";break;case 1006:if(d.value=!0,Ee<Ht&&!q.value){Rn();return}break;case 1011:M="Connection closed: server error";break;default:u.value=!0}console.log(M)},Q.onerror=S=>{console.error("WebSocket connection error:",S),a.value=!0,Pe({text:"Connection error: Unable to connect to chat server",isUser:!1,isSystem:!0,isError:!0}),Ee<Ht&&!q.value&&Rn()}}catch(S){console.error("Error connecting to socket server:",S),Pe({text:`Connection error: ${S instanceof Error?S.message:"Unknown error"}`,isUser:!1,isSystem:!0,isError:!0})}},Dr=()=>{Q&&Q.close(),Q=null};l.onUnmounted(()=>{Q&&Q.close()});const ks=S=>{(b.isPreview||b.scenario)&&!S||xe(!G.value)},Ar=()=>{if(!(b.isPreview||b.scenario)&&qe.value.trim()!==""){if(b.isProduction&&V.value.length>0){const S=V.value[V.value.length-1];S.isSystem===!0&&!S.isError&&!S.snippet&&V.value.pop()}V.value.push({text:qe.value,isUser:!0}),y.value=!0,Bn({message:qe.value}),qe.value=""}},Bn=S=>{Q&&Q.send(JSON.stringify(S))},En=()=>{try{const S=P.value.getKey("settings.fontFamily")||"MacPaw Fixel",M=`https://fonts.googleapis.com/css2?family=${S.replace(/\s+/g,"+")}:wght@300;400;500;600;700&display=swap`,R=document.createElement("link");R.rel="preload",R.as="style",R.href=M,document.head.appendChild(R);const O=document.createElement("link");O.rel="stylesheet",O.href=M,O.setAttribute("data-google-font","true"),document.head.appendChild(O),o.value&&(o.value.style.fontFamily=`"${S}", sans-serif`)}catch(S){console.error("Error loading font:",S)}},Pn=()=>{const S=P.value.getKey("settings.fontWeight")||400;o.value&&(o.value.style.fontWeight=S)};r.value=!0,l.watch(()=>P.value.getKey("settings.fontFamily"),()=>{En()}),l.watch(()=>P.value.getKey("settings.fontWeight"),()=>{Pn()});const Lr=async()=>{if(v()){const M=await(await fetch(v()+"config")).json();z.value=M,n.value=!0}else n.value=!0},Ts=(S,M,R)=>new Promise(O=>{const Y=performance.now(),pe=Ne=>{const De=Math.min(1,(Ne-Y)/R);f.value=S+(M-S)*De,De<1?requestAnimationFrame(pe):O()};requestAnimationFrame(pe)}),Dn=async S=>{g.value=!0,f.value=0,await l.nextTick(),await Ts(0,.3,500),S(),await Ts(.3,.6,200),f.value=.6,await new Promise(M=>setTimeout(M,100)),await Ts(.6,0,500),g.value=!1},Or=async(S=25)=>{const M=V.value.filter(O=>!O.isUser&&!O.isSystem&&O.text);if(!M.length)return;const R=M.map(O=>O.text||"");M.forEach(O=>O.text="");for(let O=0;O<M.length;O++){const Y=M[O],pe=R[O];for(let Ne=0;Ne<pe.length;Ne++)Y.text=pe.slice(0,Ne+1),await new Promise(De=>setTimeout(De,S))}},zs=async(S,M)=>{await Dn(()=>{const R=ui.getState(S,P.value,M||b.scenarioOptions);if(G.value=R.isChatOpen,V.value=R.messages,c.value=R.traceLastShown,a.value=R.isConnectionError,u.value=R.isProcessError,d.value=R.isReconnectError,h.value=R.isInputDisabled,p.value=R.showWelcome,m.value=R.showReconnectNotice??!1,tt.value=R.snippet??null,q.value=!0,Q){try{Q.close()}catch{}Q=null}}),Or()},os=async()=>{await Dn(()=>{q.value=me.value,p.value=!0,h.value=!1,m.value=!1,a.value=!1,u.value=!1,d.value=!1,V.value=[],q.value||(!Q||Q.readyState!==1)&&Ss()})};l.onMounted(async()=>{await Lr(),En(),Pn();const S=b.scenario??ui.getScenarioFromUrl();if(S){await zs(S);return}if(b.isPreview){Pr();return}Ss()}),l.watch(()=>b.scenario,async S=>{S?await zs(S):await os()});const Se={id:Ze,setScenario:async(S,M)=>{await zs(S,M)},clearScenario:async()=>{await os()},toggleChat:()=>{ks(!0)},setOpen:S=>{G.value=S},setActive:S=>{S&&!G.value&&(G.value=!0)},setInputDisabled:S=>{h.value=S},setShowReconnectNotice:S=>{m.value=S},setMessages:S=>{V.value=Array.isArray(S)?S:[]},pushMessage:S=>{V.value.push(S)},setSnippet:S=>{tt.value=S??null},resetToLive:async()=>{await os()},setConfig:S=>{x.value=JSON.parse(JSON.stringify(S))},getConfig:()=>L.value},Vr=()=>{const S=window;S.hswWidgets=S.hswWidgets||{},S.hswWidgets[Ze.value]=Se,window.dispatchEvent(new CustomEvent("hsw:ready",{detail:{widgetId:Ze.value}}))},Ir=()=>{const S=window;S.hswWidgets&&S.hswWidgets[Ze.value]&&delete S.hswWidgets[Ze.value]},An=async S=>{var Y;const M=S,R=(Y=M.detail)==null?void 0:Y.widgetId;if(R&&R!==Ze.value)return;const{action:O}=M.detail;switch(O){case"setScenario":await Se.setScenario(M.detail.payload.type,M.detail.payload.options);break;case"clearScenario":await Se.clearScenario();break;case"setOpen":Se.setOpen(M.detail.payload);break;case"setActive":Se.setActive(M.detail.payload);break;case"setInputDisabled":Se.setInputDisabled(M.detail.payload);break;case"setShowReconnectNotice":Se.setShowReconnectNotice(M.detail.payload);break;case"setMessages":Se.setMessages(M.detail.payload);break;case"pushMessage":Se.pushMessage(M.detail.payload);break;case"setSnippet":Se.setSnippet(M.detail.payload);break;case"resetToLive":await Se.resetToLive();break;case"setConfig":Se.setConfig(M.detail.payload);break}};return l.onMounted(()=>{Vr(),window.addEventListener("hsw:control",An)}),l.onUnmounted(()=>{Ir(),window.removeEventListener("hsw:control",An)}),e(Se),(S,M)=>n.value?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["tw:z-[999] tw:flex tw:justify-end component-isolator tw:transition-all",{"tw:fixed":!U.value,"tw:w-full":G.value}]),style:l.normalizeStyle({letterSpacing:P.value.getKey("settings.letterSpacing")+"px",...C.value}),ref_key:"chatWrapperRef",ref:o},[l.withDirectives(l.createVNode(el,{toggleChat:ks,element:P.value.getKeyObject("sections.colapsed")},null,8,["element"]),[[l.vShow,!G.value]]),l.withDirectives(l.createElementVNode("div",{class:l.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":G.value,"tw:shadow-lg tw:w-fit":!G.value,"chat-embedded tw:w-full tw:h-full tw:static tw:top-0 tw:left-0":U.value}]]),style:l.normalizeStyle({background:P.value.getKey("settings.bgChat"),borderRadius:`${String(F.value)}px`})},[l.createVNode(wl,{isChatOpen:G.value,toggleChat:ks,configDesignClass:P.value,sectionBorderRadius:j.value,mainBorderRadius:F.value,isPreview:q.value,isEmbedded:U.value,isProduction:S.isProduction||!1,restartChat:w},null,8,["isChatOpen","configDesignClass","sectionBorderRadius","mainBorderRadius","isPreview","isEmbedded","isProduction"]),G.value?(l.openBlock(),l.createElementBlock("div",lc,[a.value?(l.openBlock(),l.createElementBlock("div",cc,[l.createElementVNode("div",{class:"tw:absolute tw:left-0 tw:top-0 tw:w-full tw:h-full",style:l.normalizeStyle({padding:P.value.getKey("sections.warnings.launchIssue.content.sidePadding")+"px"})},[l.createVNode($s,{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:w},null,8,["headlineText","descriptionText","warningElement","configDesignClass","isProcessError"])],4)])):(l.openBlock(),l.createElementBlock("div",uc,[l.createVNode(ac,{messages:V.value,isPreview:q.value,isEmbedded:U.value,configDesignClass:P.value,isLoading:Nt.value,isStreaming:y.value,isProduction:S.isProduction,sectionBorderRadius:j.value,showWelcome:p.value,activeMessage:k.value,"onUpdate:activeMessage":M[0]||(M[0]=R=>k.value=R),isProcessError:u.value,snippet:tt.value,traceLastShown:c.value,onHandleClickMessage:W,onHandleSnippetAction:Er,restartChat:w},null,8,["messages","isPreview","isEmbedded","configDesignClass","isLoading","isStreaming","isProduction","sectionBorderRadius","showWelcome","activeMessage","isProcessError","snippet","traceLastShown"]),u.value?(l.openBlock(),l.createElementBlock("div",{key:0,style:l.normalizeStyle({padding:P.value.getKey("sections.warnings.connectionIssue.content.sidePadding")+"px"})},[l.createVNode($s,{type:"connectionIssue",headlineText:P.value.getKey("texts.issueText"),configDesignClass:P.value,warningElement:P.value.getKeyObject("sections.warnings.connectionIssue"),restartChat:w},null,8,["headlineText","configDesignClass","warningElement"])],4)):(l.openBlock(),l.createBlock(Tl,{key:1,messageText:qe.value,"onUpdate:messageText":M[1]||(M[1]=R=>qe.value=R),isProduction:S.isProduction||!1,configDesignClass:P.value,sectionBorderRadius:j.value,classSize:D.value,sendMessage:Ar,isInputDisabled:h.value,showReconnectNotice:m.value,restartChat:w,isStreaming:y.value,onTrace:J},null,8,["messageText","isProduction","configDesignClass","sectionBorderRadius","classSize","isInputDisabled","showReconnectNotice","isStreaming"]))]))])):l.createCommentVNode("",!0),l.createVNode(l.Transition,{name:"fade"},{default:l.withCtx(()=>[g.value?(l.openBlock(),l.createElementBlock("div",{key:0,class:"tw:absolute tw:inset-0 tw:backdrop-blur-[40px] tw:z-[1000]",style:l.normalizeStyle({borderRadius:`${String(F.value)}px`,backgroundColor:`rgba(0,0,0, ${f.value})`})},null,4)):l.createCommentVNode("",!0)]),_:1})],6),[[l.vShow,r.value&&G.value]])],6)):l.createCommentVNode("",!0)}}),Ge=i=>{const e=window,t=i||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]},fc=async(i,e,t)=>Ge(t).setScenario(i,e),gc=async i=>Ge(i).clearScenario(),pc=(i,e)=>Ge(e).setOpen(i),hc=(i,e)=>Ge(e).setActive(i),mc=(i,e)=>Ge(e).setInputDisabled(i),yc=(i,e)=>Ge(e).setShowReconnectNotice(i),wc=(i,e)=>Ge(e).setMessages(i),bc=(i,e)=>Ge(e).pushMessage(i),vc=(i,e)=>Ge(e).setSnippet(i),_c=async i=>Ge(i).resetToLive();exports.ChatWrapper=dc;exports.clearScenario=gc;exports.cn=cn;exports.pushMessage=bc;exports.resetToLive=_c;exports.setActive=hc;exports.setInputDisabled=mc;exports.setMessages=wc;exports.setOpen=pc;exports.setScenario=fc;exports.setShowReconnectNotice=yc;exports.setSnippet=vc;
|