@opens/widget-ui 1.0.11 → 1.0.12
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/components/pages/app-service-page.vue.d.ts +2 -0
- package/dist/components/ui/app-empty.vue.d.ts +18 -0
- package/dist/components/ui/app-skeleton.vue.d.ts +14 -0
- package/dist/components/widget/app-widget-view.vue.d.ts +2 -0
- package/dist/components/widget/app-widget.vue.d.ts +2 -0
- package/dist/composables/use-app-widget.d.ts +3 -0
- package/dist/composables/use-service-chat-behavior.d.ts +3 -0
- package/dist/composables/use-service-page.d.ts +3 -0
- package/dist/index.d.ts +1 -1
- package/dist/main.d.ts +3 -1
- package/dist/ui/app-empty.vue.d.ts +4 -0
- package/dist/ui/app-empty.vue.d.ts.map +1 -0
- package/dist/ui/app-skeleton.vue.d.ts +4 -0
- package/dist/ui/app-skeleton.vue.d.ts.map +1 -0
- package/dist/widget/app-widget-view.vue.d.ts +1 -1
- package/dist/widget/app-widget.vue.d.ts +1 -1
- package/dist/yunique_widget_ui.cjs.js +1 -1
- package/dist/yunique_widget_ui.css +1 -1
- package/dist/yunique_widget_ui.es.js +1276 -1157
- package/dist/yunique_widget_ui.umd.js +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");function wo(){return{maskPhone:i=>{if(!i)return"";let s=i.replace(/\D/g,"");return s.length<=4?s:(s.startsWith("0")&&!s.startsWith("0800")&&s.length>3&&(s=s.replace(/^0+/,"")),s.startsWith("0800")?s.length>11?s:s.replace(/(0800)(\d{0,3})(\d{0,4})/,(a,l,u,c)=>[l,u,c].filter(Boolean).join(" ")):s.length>11?s:s.length<=8?s.replace(/(\d{4})(\d{0,4})/,"$1-$2").replace(/-$/,""):s.length===9?s.replace(/(\d{5})(\d{0,4})/,"$1-$2"):s.length===10?s.replace(/(\d{2})(\d{0,4})(\d{0,4})/,"($1) $2-$3").replace(/-$/,""):s.replace(/(\d{2})(\d{0,5})(\d{0,4})/,"($1) $2-$3").replace(/-$/,""))},maskCnpj:i=>{const s=i.toUpperCase().replace(/[^0-9A-Z]/g,"");let a="";for(const l of s){if(a.length>=14)break;(a.length<12||/\d/.test(l))&&(a+=l)}return a.replace(/^([0-9A-Z]{2})([0-9A-Z])/,"$1.$2").replace(/^([0-9A-Z]{2})\.([0-9A-Z]{3})([0-9A-Z])/,"$1.$2.$3").replace(/^([0-9A-Z]{2})\.([0-9A-Z]{3})\.([0-9A-Z]{3})([0-9A-Z])/,"$1.$2.$3/$4").replace(/^([0-9A-Z]{2})\.([0-9A-Z]{3})\.([0-9A-Z]{3})\/([0-9A-Z]{4})(\d)/,"$1.$2.$3/$4-$5")},maskCep:i=>i.replace(/\D/g,"").slice(0,8).replace(/^(\d{5})(\d)/,"$1-$2"),maskCpf:i=>i.replace(/\D/g,"").slice(0,11).replace(/^(\d{3})(\d)/,"$1.$2").replace(/^(\d{3})\.(\d{3})(\d)/,"$1.$2.$3").replace(/^(\d{3})\.(\d{3})\.(\d{3})(\d)/,"$1.$2.$3-$4")}}function Rt(){return{}}const Oe=e.ref([]),xo=e.ref("");function Ot(){return{messages:Oe,text:xo,setMessages:n=>{Oe.value=[...n]},addMessage:n=>{Oe.value.push(n)}}}function Ht(){const t=Ot(),o=Rt();return{chat:t,voice:o}}const fe=e.ref([]),He=e.ref(void 0),te=e.ref(void 0),ue=()=>{const t=d=>{const y=new Set(Object.values(d.edges??{}).flatMap(v=>v.map(g=>g.nextRuleId)));return d.rules.find(v=>!y.has(v.id))??d.rules[0]},o=(d,y)=>{const v=new Map(d.rules.map(g=>[g.id,g]));return(d.edges[y]??[]).flatMap(g=>{const f=v.get(g.nextRuleId);return f?[f]:[]})},n=e.computed(()=>new Map((te.value?.rules??[]).map(d=>[d.id,d]))),r=e.computed(()=>te.value?t(te.value):void 0),i=e.computed(()=>{const d=He.value;return d&&n.value.get(d)||r.value}),s=e.computed(()=>!te.value||!i.value?[]:o(te.value,i.value.id)),a=Ht();return{currentRuleId:He,currentRule:i,rootRule:r,workflow:te,history:fe,edges:s,setCurrentRuleId:d=>{He.value=d},clearHistory:()=>{fe.value=[]},setWorkflow:d=>{te.value=d},pushHistory:d=>{fe.value.push(d)},setHistory:d=>{fe.value=[...d]},popHistory:()=>fe.value.pop(),...a}},se=t=>t==="name",ct=t=>!!t?.trim(),bo=t=>{const o=t.filter(r=>se(r.name)),n=t.filter(r=>!se(r.name));return[...o,...n]};function ko(t,o){const{maskPhone:n,maskCpf:r}=wo(),{history:i}=ue(),s=e.ref(0),a=e.ref("forward"),l=e.ref(null),u=e.computed(()=>{const b=e.toValue(t),T=b.settings?.form&&b.settings.form.fields||[];return bo(T)}),c=e.reactive(Object.fromEntries(u.value.map(b=>[b.name,""]))),h=e.computed(()=>u.value[s.value]),m=e.computed(()=>s.value>=u.value.length-1),p=e.computed(()=>i.value.length>0||s.value>0),d=e.computed(()=>a.value==="back"?"step-back":"step-forward");e.watch(s,async()=>{await e.nextTick();const b=l.value;if(!b)return;(b.querySelector(".is-active input")??b.querySelector("input"))?.focus({preventScroll:!0})});const y=e.computed(()=>u.value.every(b=>!b.required||ct(c[b.name]))),v=b=>{const T=u.value[b];return T?T.required&&!ct(c[T.name])?!1:b>=u.value.length-1?y.value:!0:y.value},g=e.computed(()=>v(s.value)),f=e.computed(()=>{const b=u.value.find(T=>se(T.name));return b?c[b.name]?.trim().split(/\s+/)[0]??"":""}),w=b=>{const T=u.value[b],P=f.value,R=u.value.length?`Passo ${b+1} de ${u.value.length}`:"",z=e.toValue(t),L=b>=u.value.length-1;if(!T)return{eyebrow:R,title:z.settings?.body?.title??"",subtitle:z.settings?.body?.subtitle??""};if(se(T.name))return{eyebrow:R,title:"Como podemos te chamar?",subtitle:"Primeiro, nos diga o seu nome."};const O=L?P?`Quase lá, ${P}.`:"Quase lá.":P?`Olá, ${P}.`:"Olá.",W=T.required?`Informe seu ${T.alias} para continuar.`:`Gostaria de deixar seu ${T.alias}?`;return{eyebrow:R,title:O,subtitle:W}},k=e.computed(()=>w(s.value)),A=b=>b==="email"?"email":b==="phone"?"tel":"text",B=b=>b==="email"?"email":b==="phone"?"call":se(b)?"person":b==="order"?"receipt":"badge",C=b=>b.required?`${b.alias} *`:b.alias,x=b=>se(b.name)?"Seu nome":b.name==="phone"?"Seu telefone":b.name==="email"?"Seu e-mail":b.name==="cpf"?"000.000.000-00":b.alias,$=b=>{if(b==="phone")return n;if(b==="cpf")return r},N=()=>{y.value&&o("submit",{...c})};return{stepTransition:d,currentField:h,canContinue:g,currentStep:s,isLastStep:m,stepIntro:k,fieldHost:l,showBack:p,fields:u,form:c,continueStep:()=>{if(g.value){if(m.value||u.value.length===0)return N();a.value="forward",s.value+=1}},canContinueAt:v,introFor:w,fieldLabel:C,fieldPlaceholder:x,fieldType:A,fieldMask:$,fieldIcon:B,goBack:()=>{if(s.value>0){a.value="back",s.value-=1;return}o("back")}}}function Ft(t){const o=e.computed(()=>t.small?"!yu-h-8 !yu-min-h-[2rem]":"!yu-h-12 !yu-min-h-[3rem]"),n=e.computed(()=>"!yu-text-xs"),r=e.computed(()=>t.fluid?"!yu-w-full":"yu-w-fit");return{height:o,textSize:n,width:r}}function Co(t,o){const n=e.computed(()=>({"!yu-font-plus":o.plus,"!yu-font-inter":o.inter,"!yu-font-titillium":o.titillium,"!yu-font-mono":o.mono})),r=e.computed(()=>({"!yu-text-white":o.white,"!yu-text-primary":o.primary,"!yu-text-secondary":o.secondary,"!yu-text-base":o.neutral,"!yu-text-neutral dark:!yu-text-neutral-200":o.gray})),i=e.computed(()=>({"!yu-font-thin":o.thin,"!yu-font-extralight":o.extralight,"!yu-font-light":o.light,"!yu-font-normal":o.normal,"!yu-font-medium":o.medium,"!yu-font-semibold":o.semibold,"!yu-font-bold":o.bold,"!yu-font-extrabold":o.extrabold,"!yu-font-black":o.black})),s=e.computed(()=>({...{title:{"!yu-text-xl":o.small,"!yu-text-2xl":o.base,"!yu-text-3xl":o.large,"!yu-text-4xl":o.extraLarge},subtitle:{"!yu-text-sm":o.small,"!yu-text-md":o.base,"!yu-text-xl":o.large},text:{"!yu-text-xxs":o.extraSmall,"!yu-text-xs":o.small,"!yu-text-sm":o.base,"!yu-text-lg":o.large,"!yu-text-2xl":o.extraLarge}}[t]}));return{fontClass:n,colorClass:r,weightClass:i,sizeClass:s}}const $o=e.defineComponent({__name:"app-text",props:{extraSmall:{type:Boolean},inter:{type:Boolean},plus:{type:Boolean},titillium:{type:Boolean},mono:{type:Boolean},small:{type:Boolean},base:{type:Boolean},large:{type:Boolean},extraLarge:{type:Boolean},thin:{type:Boolean},extralight:{type:Boolean},light:{type:Boolean},normal:{type:Boolean},medium:{type:Boolean},semibold:{type:Boolean},bold:{type:Boolean},extrabold:{type:Boolean},black:{type:Boolean},primary:{type:Boolean},secondary:{type:Boolean},gray:{type:Boolean},neutral:{type:Boolean},white:{type:Boolean}},setup(t){const o=t,{fontClass:n,colorClass:r,weightClass:i,sizeClass:s}=Co("text",o);return(a,l)=>(e.openBlock(),e.createElementBlock("p",{class:e.normalizeClass(["yu-font-primary yu-text-sm yu-font-normal yu-text-gray-900 dark:yu-text-neutral-100",[e.unref(n),e.unref(r),e.unref(i),e.unref(s)]])},[e.renderSlot(a.$slots,"default",{},void 0,!0)],2))}}),Pe=(t,o)=>{const n=t.__vccOpts||t;for(const[r,i]of o)n[r]=i;return n},V=Pe($o,[["__scopeId","data-v-030e2417"]]),U=e.defineComponent({__name:"app-group",props:{fit:{type:Boolean},full:{type:Boolean},row:{type:Boolean},col:{type:Boolean},gapNone:{type:Boolean},gapXs:{type:Boolean},gapBase:{type:Boolean},gapSm:{type:Boolean},gapMd:{type:Boolean},gapLg:{type:Boolean},wrap:{type:Boolean},paddingNone:{type:Boolean},paddingBase:{type:Boolean},paddingXs:{type:Boolean},paddingSm:{type:Boolean},paddingMd:{type:Boolean},paddingLg:{type:Boolean},center:{type:Boolean},justifyEnd:{type:Boolean},centerBetween:{type:Boolean},border:{type:Boolean},borderPrimary:{type:Boolean},rounded:{type:Boolean},roundedTop:{type:Boolean},roundedBottom:{type:Boolean},bgPrimary:{type:Boolean},bgWhite:{type:Boolean},divisor:{type:Boolean}},setup(t){const o=t,n=e.computed(()=>o.fit?"yu-w-fit yu-h-fit":o.full?"yu-w-full yu-h-full":""),r=e.computed(()=>o.justifyEnd?"yu-items-end yu-justify-end":o.center?"yu-items-center yu-justify-center":o.centerBetween?"yu-items-center yu-justify-between":""),i=e.computed(()=>o.row?"yu-flex-row":o.col?"yu-flex-col":"yu-flex-row"),s=e.computed(()=>o.gapBase?"yu-gap-4":o.gapXs?"yu-gap-1":o.gapSm?"yu-gap-2":o.gapMd?"yu-gap-6":o.gapLg?"yu-gap-8":o.gapNone?"yu-gap-0":"yu-gap-4"),a=e.computed(()=>o.wrap?"yu-flex-wrap":""),l=e.computed(()=>o.paddingXs?"yu-p-1":o.paddingSm?"yu-p-2":o.paddingBase?"yu-p-4":o.paddingMd?"yu-p-6":o.paddingLg?"yu-p-8":""),u=e.computed(()=>o.border?"yu-border":o.borderPrimary?"yu-border yu-border-primary":""),c=e.computed(()=>o.rounded?"yu-rounded-md":o.roundedTop?"yu-rounded-t-md":o.roundedBottom?"yu-rounded-b-md":""),h=e.computed(()=>o.bgPrimary?"yu-bg-primary":o.bgWhite?"yu-bg-white":""),m=e.computed(()=>o.divisor&&o.col?"yu-divide-y":o.divisor&&o.row?"yu-divide-x":""),p=e.computed(()=>[i.value,s.value,a.value,l.value,r.value,u.value,c.value,h.value,n.value,m.value]);return(d,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yu-flex",p.value])},[e.renderSlot(d.$slots,"default")],2))}}),Bo={class:"yu-flex yu-flex-col yu-items-stretch yu-w-full yu-cursor-text yu-gap-1","data-testid":"app-form-text-input"},_o=["value","type","placeholder","disabled","maxlength","aria-invalid"],Qe=e.defineComponent({__name:"app-form-text-input",props:{modelValue:{default:""},type:{default:"text"},placeholder:{},maxLength:{},disabled:{type:Boolean},invalid:{type:Boolean},valid:{type:Boolean},fluid:{type:Boolean},maskFunction:{}},emits:["update:modelValue","keyup-enter"],setup(t,{expose:o,emit:n}){const r=t,i=n,s=e.computed(()=>e.useSlots());function a(g){return!!s.value[g]}const l=e.ref(""),u=e.ref(!1);function c(g){if(!r.maskFunction)return g;try{const f=r.maskFunction(g);return typeof f=="string"?f:g}catch{return g}}e.watch(()=>r.modelValue,g=>{if(g==null){l.value="";return}l.value=r.maskFunction?c(g):g},{immediate:!0});const{width:h}=Ft(r),m=e.computed(()=>r.invalid?"yu-text-red-500":r.valid?"yu-text-green-500":""),p=e.computed(()=>r.invalid?"yu-text-red-600 placeholder:yu-text-red-300 placeholder:yu-font-medium":r.valid?"yu-text-green-700 placeholder:yu-font-medium":"yu-text-gray-900 placeholder:yu-text-gray-400 placeholder:yu-font-medium dark:yu-text-neutral-100 dark:placeholder:yu-text-neutral-500"),d=e.computed(()=>r.invalid?"yu-text-red-500":r.valid?"yu-text-green-500":"yu-text-gray-500"),y=e.computed(()=>r.disabled?"yu-opacity-50 yu-pointer-events-none":"");function v(g){const w=g.target.value;l.value=r.maskFunction?c(w):w,i("update:modelValue",l.value)}return o({focus:u,content:l}),(g,f)=>(e.openBlock(),e.createBlock(U,{class:e.normalizeClass([e.unref(h),y.value]),col:"","gap-none":""},{default:e.withCtx(()=>[e.createElementVNode("label",Bo,[a("default")?(e.openBlock(),e.createBlock(V,{key:0,small:"",gray:"",class:e.normalizeClass([m.value])},{default:e.withCtx(()=>[e.renderSlot(g.$slots,"default")]),_:3},8,["class"])):e.createCommentVNode("",!0),e.createElementVNode("input",{class:e.normalizeClass(["yu-w-full yu-bg-transparent yu-border-0 yu-outline-none yu-p-0 yu-m-0 yu-appearance-none yu-font-primary yu-text-2xl yu-leading-tight yu-caret-gray-900 dark:yu-caret-white",[p.value]]),value:l.value,type:t.type,placeholder:t.placeholder,disabled:t.disabled,maxlength:t.maxLength,"aria-invalid":t.invalid?!0:void 0,onInput:v,onFocus:f[0]||(f[0]=w=>u.value=!0),onBlur:f[1]||(f[1]=w=>u.value=!1),onKeyup:f[2]||(f[2]=e.withKeys(w=>i("keyup-enter"),["enter"]))},null,42,_o)]),a("feedback")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["yu-mt-1",[d.value]])},[e.renderSlot(g.$slots,"feedback")],2)):e.createCommentVNode("",!0)]),_:3},8,["class"]))}});function So(t){const o=e.computed(()=>t.small?"!yu-h-8 !yu-min-h-[2rem]":""),n=e.computed(()=>"!yu-text-xs"),r=e.computed(()=>t.small?"yu-px-[0.625rem]":"yu-p-[0.9rem]"),i=e.computed(()=>t.fluid?"!yu-w-full":"yu-w-fit");return{height:o,textSize:n,padding:r,width:i}}const M=e.defineComponent({__name:"app-icon",props:{small:Boolean,large:Boolean,extraLarge:Boolean,gray:Boolean,base:Boolean,light:Boolean,dark:Boolean,outlined:Boolean},setup(t){const o=t,n=e.computed(()=>o.small?"!yu-text-xs yu-w-4 yu-h-4":o.large?"!yu-text-2xl yu-w-8 yu-h-8":o.extraLarge?"!yu-text-4xl yu-w-10 yu-h-10":"!yu-text-base yu-w-6 yu-h-6"),r=e.computed(()=>o.dark?"yu-text-neutral-800 dark:yu-text-white":o.light?"yu-text-white dark:yu-text-neutral-800":o.gray?"yu-text-gray-500 dark:yu-text-neutral-400":""),i=e.computed(()=>o.outlined?"material-symbols-outlined":"material-icons");return(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["notranslate yu-flex yu-items-center yu-justify-center yu-text-center",[n.value,r.value,i.value]]),"data-testid":"app-icon"},[e.renderSlot(s.$slots,"default")],2))}}),Ao=["disabled"],To={class:"yu-flex yu-items-center yu-justify-center yu-gap-2"},J=e.defineComponent({__name:"app-button",props:{small:Boolean,soft:Boolean,outline:Boolean,ghost:Boolean,link:Boolean,round:Boolean,icon:Boolean,fluid:Boolean,disabled:Boolean,loading:Boolean,alert:Boolean,warning:Boolean,success:Boolean,block:Boolean},emits:["click"],setup(t){const o=t,n=e.computed(()=>e.useSlots());function r(d){return!!n.value[d]}const{height:i,textSize:s,padding:a,width:l}=So(o),u=e.computed(()=>o.soft?"yu-bg-primary-50 !yu-text-primary-400":o.alert?"yu-bg-red-500 !yu-text-white":o.warning?"yu-bg-amber-500 !yu-text-white":o.success?"yu-bg-green-500 !yu-text-white":o.outline?"yu-bg-transparent !yu-border-gray-200 hover:!yu-bg-gray-100 hover:!yu-border-gray-300 dark:!yu-border-neutral-600 dark:hover:!yu-bg-neutral-700 dark:hover:!yu-border-neutral-500 dark:!yu-text-neutral-100":o.ghost?"yu-bg-transparent !yu-text-gray-700 hover:!yu-bg-gray-100 dark:!yu-text-neutral-200 dark:hover:!yu-bg-neutral-700":o.link?"yu-bg-transparent !yu-text-blue-600 hover:yu-underline":"yu-bg-primary-500 !yu-text-[var(--yu-primary-fg)]"),c=e.computed(()=>o.block?"yu-rounded-none":o.round?"yu-rounded-full":"yu-rounded-lg"),h=e.computed(()=>o.icon&&o.small?"!yu-w-8 !yu-h-8 yu-p-0":o.icon?"!yu-w-11 !yu-h-11 yu-p-0":a.value),m=e.computed(()=>o.icon?"yu-justify-center":"yu-justify-between"),p=e.computed(()=>o.disabled||o.loading?"yu-opacity-50 yu-pointer-events-none":"");return(d,y)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["yu-inline-flex yu-items-center yu-gap-2 yu-cursor-pointer yu-transition-all yu-border yu-border-transparent disabled:yu-opacity-50 disabled:yu-pointer-events-none hover:yu-opacity-80 focus:yu-outline-hidden focus:yu-opacity-80",[e.unref(s),u.value,c.value,e.unref(l),e.unref(i),p.value,h.value,m.value]]),type:"button",disabled:t.disabled||t.loading,"data-testid":"app-button",onClick:y[0]||(y[0]=v=>d.$emit("click",v))},[e.createElementVNode("div",To,[t.loading?(e.openBlock(),e.createBlock(M,{key:0,class:"yu-animate-spin yu-flex yu-items-center yu-justify-center",small:"",outlined:""},{default:e.withCtx(()=>[...y[1]||(y[1]=[e.createTextVNode("progress_activity",-1)])]),_:1})):r("icon")?(e.openBlock(),e.createBlock(M,{key:1,small:""},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"icon")]),_:3})):e.createCommentVNode("",!0),!t.loading&&r("default")?(e.openBlock(),e.createBlock(V,{key:2,class:"!yu-text-inherit",small:""},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"default")]),_:3})):e.createCommentVNode("",!0)]),!t.loading&&r("trailing")?(e.openBlock(),e.createBlock(M,{key:0,small:""},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"trailing")]),_:3})):e.createCommentVNode("",!0)],10,Ao))}}),No=["aria-hidden"],Vo=e.defineComponent({__name:"app-carousel",props:{modelValue:{default:0},vertical:{type:Boolean},fill:{type:Boolean}},emits:["update:modelValue"],setup(t,{expose:o,emit:n}){const r=t,i=n,s=e.useSlots(),a=e.ref(null),l=e.ref(null),u=e.ref(0),c=e.ref(0),h=e.ref(!1);let m=null;const p=e.computed(()=>Math.max(r.modelValue,0)),d=()=>(s.default?.()??[]).flatMap(x=>x.type===e.Comment||x.type===e.Text?[]:x.type===e.Fragment?(x.children??[]).filter($=>!!$&&typeof $=="object"&&$.type!==e.Comment&&$.type!==e.Text):[x]),y=x=>{const $=Math.abs(x-p.value);return $===0?"is-active":$===1?"is-adjacent":"is-far"},v=x=>{const $=l.value?.childElementCount||d().length,N=Math.min(Math.max(x,0),Math.max($-1,0));N!==r.modelValue&&i("update:modelValue",N)},g=()=>{const x=a.value;x&&(x.scrollLeft&&(x.scrollLeft=0),x.scrollTop&&(x.scrollTop=0))},f=()=>{const x=a.value,$=l.value;if(!x||!$)return;g();const N=[...$.children],S=parseFloat(getComputedStyle($).gap)||0,E=parseFloat(getComputedStyle(x).scrollPaddingTop)||0,b=z=>r.vertical?z.offsetHeight:z.offsetWidth,T=N[p.value]?b(N[p.value]):0,P=r.vertical&&r.fill?Math.max((x.clientHeight-T)/2,0):E,R=N.slice(0,p.value).reduce((z,L)=>z+b(L)+S,0);u.value=P-R,c.value=r.vertical&&!r.fill?T+E*2:0,h.value=!0},w=()=>{m?.disconnect();const x=a.value,$=l.value;if(!(!x||!$)&&(f(),!(typeof ResizeObserver>"u"))){if(m=new ResizeObserver(f),m.observe(x),r.vertical)for(const N of $.children)m.observe(N);x.removeEventListener("scroll",g),x.addEventListener("scroll",g,{passive:!0})}},k=e.computed(()=>[r.vertical?"yu-carousel--vertical":"yu-carousel--horizontal",{"is-ready":h.value,"yu-carousel--fill":r.fill}]),A=e.computed(()=>r.vertical?"yu-flex-col yu-items-stretch":"yu-flex-row yu-items-center"),B=e.computed(()=>{if(!(!r.vertical||r.fill||!c.value))return{height:`${c.value}px`}}),C=e.computed(()=>{const x=`${u.value}px`;return{transform:r.vertical?`translate3d(0, ${x}, 0)`:`translate3d(${x}, 0, 0)`}});return e.watch(()=>[r.vertical,r.fill,r.modelValue],async()=>{await e.nextTick(),w()}),e.onMounted(async()=>{await e.nextTick(),w()}),e.onBeforeUnmount(()=>{m?.disconnect(),a.value?.removeEventListener("scroll",g)}),o({next:()=>v(p.value+1),prev:()=>v(p.value-1),goTo:v}),(x,$)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yu-relative yu-w-full yu-overflow-hidden",k.value]),ref_key:"rootRef",ref:a,"data-testid":"app-carousel",style:e.normalizeStyle(B.value)},[e.createElementVNode("div",{class:e.normalizeClass(["yu-carousel-track yu-flex",A.value]),ref_key:"trackRef",ref:l,style:e.normalizeStyle(C.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d(),(N,S)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yu-carousel-slide",y(S)]),key:N.key??S,"aria-hidden":S!==p.value,"data-testid":"app-carousel-slide"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N)))],10,No))),128))],6)],6))}}),Je=Pe(Vo,[["__scopeId","data-v-c6006063"]]),Po={class:"yu-flex yu-flex-col yu-w-full yu-h-full"},Eo={class:"yu-relative yu-flex yu-items-center yu-w-full yu-shrink-0"},zo={class:"yu-flex yu-shrink-0 yu-items-center yu-w-fit yu-justify-center yu-px-6 yu-py-4"},Lo={class:"yu-absolute yu-inset-0 yu-flex yu-items-center yu-justify-center yu-pointer-events-none"},Mo={class:"yu-flex yu-items-center yu-gap-1.5"},et=e.defineComponent({__name:"app-identification-page",props:{rule:{},edges:{}},emits:["submit","back"],setup(t,{emit:o}){const n=t,r=o,{currentStep:i,fieldHost:s,showBack:a,fields:l,form:u,continueStep:c,canContinueAt:h,introFor:m,fieldPlaceholder:p,fieldType:d,fieldMask:y,goBack:v}=ko(()=>n.rule,r);return(g,f)=>(e.openBlock(),e.createElementBlock("div",Po,[e.createElementVNode("div",Eo,[e.createElementVNode("div",zo,[e.createElementVNode("div",{class:e.normalizeClass(["yu-flex yu-items-center yu-w-fit yu-justify-center yu-cursor-pointer yu-group",{"yu-invisible yu-pointer-events-none":!e.unref(a)}]),onClick:f[0]||(f[0]=(...w)=>e.unref(v)&&e.unref(v)(...w))},[e.createVNode(M,{class:"yu-transition-colors group-hover:!yu-text-gray-700 dark:group-hover:!yu-text-neutral-200",small:"",gray:""},{default:e.withCtx(()=>[...f[2]||(f[2]=[e.createTextVNode("chevron_left",-1)])]),_:1}),e.createVNode(V,{class:"yu-transition-colors group-hover:!yu-text-gray-700 dark:group-hover:!yu-text-neutral-200","extra-small":"",medium:"",gray:""},{default:e.withCtx(()=>[...f[3]||(f[3]=[e.createTextVNode("Voltar",-1)])]),_:1})],2)]),e.createElementVNode("div",Lo,[e.createElementVNode("div",Mo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(w,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yu-h-1 yu-w-6 yu-rounded-full yu-transition-colors",k<=e.unref(i)?"yu-bg-gray-900 dark:yu-bg-white":"yu-bg-gray-200 dark:yu-bg-neutral-600"]),key:k},null,2))),128))])])]),e.createElementVNode("div",{class:"yu-flex-1 yu-min-h-0 yu-w-full yu-px-6 yu-pb-12",ref_key:"fieldHost",ref:s},[e.createVNode(Je,{class:"yu-w-full yu-h-full",modelValue:e.unref(i),"onUpdate:modelValue":f[1]||(f[1]=w=>e.isRef(i)?i.value=w:null),vertical:"",fill:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(w,k)=>(e.openBlock(),e.createBlock(U,{class:"yu-w-full yu-gap-8",key:w.name,col:"",center:""},{default:e.withCtx(()=>[e.createVNode(U,{class:"yu-w-full yu-relative yu-pr-6",col:"","gap-sm":""},{default:e.withCtx(()=>[e.unref(m)(k).title?(e.openBlock(),e.createBlock(V,{key:0,class:"yu-text-left","extra-large":"",semibold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(m)(k).title),1)]),_:2},1024)):e.createCommentVNode("",!0),e.unref(m)(k).subtitle?(e.openBlock(),e.createBlock(V,{key:1,class:"yu-text-left",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(m)(k).subtitle),1)]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(V,{class:"yu-opacity-50 yu-absolute -yu-top-2 yu-right-0",gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k+1),1)]),_:2},1024)]),_:2},1024),e.createVNode(U,{class:"yu-w-full yu-items-center",col:"","gap-md":""},{default:e.withCtx(()=>[e.createVNode(Qe,{modelValue:e.unref(u)[w.name],"onUpdate:modelValue":A=>e.unref(u)[w.name]=A,"mask-function":e.unref(y)(w.name),placeholder:e.unref(p)(w),type:e.unref(d)(w.name),onKeyupEnter:e.unref(c),fluid:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.alias),1)]),_:2},1032,["modelValue","onUpdate:modelValue","mask-function","placeholder","type","onKeyupEnter"]),e.createVNode(J,{fluid:"",disabled:!e.unref(h)(k),onClick:e.unref(c)},{trailing:e.withCtx(()=>[...f[4]||(f[4]=[e.createTextVNode("arrow_forward",-1)])]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k>=e.unref(l).length-1?"Finalizar":"Continuar"),1)]),_:2},1032,["disabled","onClick"])]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["modelValue"])],512)]))}}),Ro=["disabled"],Oo=["src"],tt=e.defineComponent({__name:"app-widget-anchor",props:{small:Boolean,large:Boolean,logo:{type:String,default:""},label:{type:String,default:""},outline:Boolean,ghost:Boolean,disabled:Boolean,loading:Boolean},emits:["click"],setup(t){const o=t,n=e.computed(()=>!!o.label.trim()),r=e.computed(()=>o.outline?"yu-bg-transparent !yu-border-gray-200 hover:!yu-bg-gray-100 hover:!yu-border-gray-300":o.ghost?"yu-bg-transparent !yu-text-gray-700 hover:!yu-bg-gray-100":"yu-bg-gradient-to-br yu-from-primary-500 yu-to-secondary-500 yu-text-white"),i=e.computed(()=>n.value?o.small?"yu-h-12 yu-w-fit yu-px-3 yu-gap-2":o.large?"yu-h-16 yu-w-fit yu-px-5 yu-gap-3":"yu-h-14 yu-w-fit yu-px-4 yu-gap-2":o.small?"yu-w-12 yu-h-12 yu-p-0":o.large?"yu-w-16 yu-h-16 yu-p-0":"yu-w-14 yu-h-14 yu-p-0"),s=e.computed(()=>o.small?"yu-w-6 yu-h-6":o.large?"yu-w-8 yu-h-8":"yu-w-7 yu-h-7"),a=e.computed(()=>o.disabled||o.loading?"yu-opacity-50 yu-pointer-events-none":"");return(l,u)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["yu-rounded-full yu-inline-flex yu-items-center yu-justify-center yu-cursor-pointer yu-overflow-hidden yu-transition-all yu-border yu-border-transparent hover:yu-opacity-80 focus:yu-outline-hidden focus:yu-opacity-80 disabled:yu-opacity-50 disabled:yu-pointer-events-none",[i.value,r.value,a.value]]),type:"button","data-testid":"app-anchor",disabled:t.disabled||t.loading,onClick:u[0]||(u[0]=c=>l.$emit("click",c))},[t.loading?(e.openBlock(),e.createBlock(M,{key:0,class:"yu-animate-spin",outlined:"",large:!t.small&&!t.large,"extra-large":t.large},{default:e.withCtx(()=>[...u[1]||(u[1]=[e.createTextVNode("progress_activity",-1)])]),_:1},8,["large","extra-large"])):t.logo?(e.openBlock(),e.createElementBlock("img",{key:1,class:e.normalizeClass(["yu-object-contain yu-pointer-events-none yu-select-none yu-shrink-0",s.value]),src:t.logo,alt:"","data-testid":"app-anchor-logo"},null,10,Oo)):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createBlock(V,{key:2,class:"!yu-text-inherit yu-whitespace-nowrap",small:!t.large,"data-testid":"app-anchor-label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1},8,["small"])):e.createCommentVNode("",!0)],10,Ro))}}),Ho={key:0,class:"yu-flex yu-shrink-0 yu-items-end","data-testid":"app-message-avatar"},Fo={key:0,class:"yu-w-full yu-flex yu-justify-end yu-h-2","data-testid":"app-message-trailing"},ot=e.defineComponent({__name:"app-message",props:{primary:Boolean,secondary:Boolean,tertiary:Boolean},setup(t){const o=t,n=e.computed(()=>e.useSlots());function r(c){return!!n.value[c]}const i=e.computed(()=>o.tertiary),s=e.computed(()=>!i.value&&o.secondary),a=e.computed(()=>!i.value&&r("avatar")),l=e.computed(()=>i.value?"yu-justify-center":s.value?"yu-flex-row-reverse":""),u=e.computed(()=>i.value?"":s.value?"yu-rounded-br-none yu-bg-primary-100 yu-p-3 dark:yu-bg-primary-900":"yu-rounded-bl-none yu-bg-gray-200 yu-p-3 dark:yu-bg-neutral-700");return(c,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yu-flex yu-items-end yu-gap-2 yu-w-full",l.value]),"data-testid":"app-message"},[a.value?(e.openBlock(),e.createElementBlock("div",Ho,[e.renderSlot(c.$slots,"avatar")])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["yu-rounded-md yu-relative",u.value]),"data-testid":"app-message-bubble"},[e.renderSlot(c.$slots,"default"),r("trailing")?(e.openBlock(),e.createElementBlock("div",Fo,[e.renderSlot(c.$slots,"trailing")])):e.createCommentVNode("",!0)],2)],2))}}),Do={class:"yu-flex yu-flex-col yu-items-center yu-h-full yu-w-full yu-overflow-hidden"},Io={key:0,class:"yu-w-full yu-h-12"},Wo={key:0,class:"yu-flex yu-items-center yu-justify-center yu-rounded-full yu-bg-gray-100 yu-w-7 yu-h-7 dark:yu-bg-neutral-700"},jo=["src"],qo={key:1,class:"yu-flex yu-w-7 yu-h-7"},Go={class:"yu-w-full yu-shrink-0 yu-border-t yu-border-gray-200 yu-flex yu-flex-col dark:yu-border-neutral-700"},Zo=["onKeydown"],Uo={class:"yu-flex yu-items-center yu-gap-2 yu-w-full yu-justify-end yu-px-6 yu-py-2"},nt=e.defineComponent({__name:"app-service-page",props:{rule:{},edges:{}},emits:["send-message"],setup(t,{emit:o}){const n=o,{history:r,chat:i}=ue(),{messages:s,text:a,setMessages:l}=i,u=e.computed(()=>r.value.length>0),c=e.ref(null),h=(d=!0)=>{const y=c.value;y&&y.scrollTo({top:y.scrollHeight,behavior:d?"smooth":"auto"})},m=d=>`https://api.dicebear.com/10.x/marbles/svg?backgroundColor=&seed=${d==="operator"?"operator":"user"}`,p=()=>{n("send-message",a.value)};return e.watch(()=>s.value.length,async()=>{await e.nextTick(),h()}),e.onMounted(()=>{h(!1)}),(d,y)=>(e.openBlock(),e.createElementBlock("div",Do,[e.createElementVNode("div",{class:"yu-flex yu-flex-col yu-flex-1 yu-min-h-0 yu-gap-2 yu-w-full yu-px-6 yu-overflow-y-auto",ref_key:"messagesList",ref:c,"data-testid":"app-service-messages"},[u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Io)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),(v,g)=>(e.openBlock(),e.createBlock(ot,{key:g,primary:v.from==="operator",secondary:v.from==="contact",tertiary:v.from==="system"},e.createSlots({default:e.withCtx(()=>[v.from=="system"?(e.openBlock(),e.createBlock(V,{key:0,class:"yu-text-center",gray:"","extra-small":"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v.text),1)]),_:2},1024)):(e.openBlock(),e.createBlock(V,{key:1,gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v.text),1)]),_:2},1024))]),_:2},[v.from!=="system"?{name:"avatar",fn:e.withCtx(()=>[e.unref(s)[g+1]?.from!==v.from?(e.openBlock(),e.createElementBlock("div",Wo,[e.createElementVNode("img",{class:"yu-rounded-full yu-w-full yu-h-full yu-object-contain",src:m(v.from)},null,8,jo)])):(e.openBlock(),e.createElementBlock("div",qo))]),key:"0"}:void 0,v.from!=="system"?{name:"trailing",fn:e.withCtx(()=>[e.createVNode(V,{gray:"","extra-small":"",medium:""},{default:e.withCtx(()=>[...y[1]||(y[1]=[e.createTextVNode("12:58",-1)])]),_:1})]),key:"1"}:void 0]),1032,["primary","secondary","tertiary"]))),128)),y[2]||(y[2]=e.createElementVNode("div",{class:"yu-w-full yu-h-12"},null,-1))],512),e.createElementVNode("div",Go,[e.withDirectives(e.createElementVNode("textarea",{class:"yu-w-full yu-p-6 yu-resize-none yu-font-primary yu-text-xs yu-bg-transparent yu-text-gray-900 placeholder:yu-text-neutral placeholder:yu-text-xs placeholder:yu-font-normal focus:yu-outline-none dark:yu-text-neutral-100","onUpdate:modelValue":y[0]||(y[0]=v=>e.isRef(a)?a.value=v:null),placeholder:"Escreva uma mensagem...",onKeydown:e.withKeys(e.withModifiers(p,["exact","prevent"]),["enter"])},null,40,Zo),[[e.vModelText,e.unref(a)]]),e.createElementVNode("div",Uo,[e.createVNode(J,{icon:"",ghost:"",small:""},{icon:e.withCtx(()=>[e.createVNode(M,{class:"yu-rotate-45"},{default:e.withCtx(()=>[...y[3]||(y[3]=[e.createTextVNode("attach_file",-1)])]),_:1})]),_:1}),e.createVNode(J,{icon:"",small:"",onClick:p},{icon:e.withCtx(()=>[e.createVNode(M,null,{default:e.withCtx(()=>[...y[4]||(y[4]=[e.createTextVNode("send",-1)])]),_:1})]),_:1})])])]))}}),Xo=t=>{const o=n=>n.toString(16).padStart(2,"0");return`#${o(t.r)}${o(t.g)}${o(t.b)}`},Dt=()=>{const t="#6D3595",o=i=>{const s=i.replace("#","").trim(),a=s.length===3&&/^[0-9a-fA-F]{3}$/.test(s)?`${s[0]}${s[0]}${s[1]}${s[1]}${s[2]}${s[2]}`:s;return a.length!==6||!/^[0-9a-fA-F]{6}$/.test(a)?null:{r:parseInt(a.slice(0,2),16),g:parseInt(a.slice(2,4),16),b:parseInt(a.slice(4,6),16)}};return{isLightHex:i=>{const s=o(i);return s?(s.r*299+s.g*587+s.b*114)/1e3>160:!1},normalizeHex:i=>{const s=o(i)??o(t);return s?Xo(s):t.toLowerCase()},parseHex:o}},Ko=()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches,It=t=>{const{isLightHex:o,normalizeHex:n,parseHex:r}=Dt(),i=(m,p)=>m==="dark"?"dark":m==="light"?"light":p?"dark":"light",s=m=>{const p=n(m),d=r(p)??{r:109,g:53,b:149},y=o(p);return{"--yu-primary":p,"--yu-primary-rgb":`${d.r} ${d.g} ${d.b}`,"--yu-primary-fg":y?"#1c1917":"#ffffff","--yu-primary-border":y?"#e5e7eb":"color-mix(in srgb, var(--yu-primary-fg) 22%, transparent)","--yu-primary-50":`color-mix(in srgb, ${p} 8%, white)`,"--yu-primary-100":`color-mix(in srgb, ${p} 22%, white)`,"--yu-primary-200":`color-mix(in srgb, ${p} 38%, white)`,"--yu-primary-300":`color-mix(in srgb, ${p} 55%, white)`,"--yu-primary-400":y?`color-mix(in srgb, ${p} 70%, black)`:`color-mix(in srgb, ${p} 78%, white)`,"--yu-primary-500":p,"--yu-primary-600":`color-mix(in srgb, ${p} 82%, black)`,"--yu-primary-700":`color-mix(in srgb, ${p} 64%, black)`,"--yu-primary-800":`color-mix(in srgb, ${p} 42%, black)`,"--yu-primary-900":`color-mix(in srgb, ${p} 22%, black)`}},a=m=>{const p=e.ref(Ko()),d=e.computed(()=>i(e.toValue(m),p.value)),y=e.computed(()=>d.value==="dark"),v=e.computed(()=>y.value?"yu-dark":"");return e.onMounted(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const g=window.matchMedia("(prefers-color-scheme: dark)");p.value=g.matches;const f=w=>{p.value=w.matches};g.addEventListener("change",f),e.onBeforeUnmount(()=>g.removeEventListener("change",f))}),{isDark:y,resolvedTheme:d,themeClass:v}},{isDark:l,themeClass:u,resolvedTheme:c}=a(()=>e.toValue(t).theme),h=e.computed(()=>({...s(e.toValue(t).primaryColor),colorScheme:c.value}));return{isDark:l,themeClass:u,resolvedTheme:c,appearanceStyle:h}},Yo={class:"yu-flex yu-flex-col yu-w-full yu-gap-8"},Qo={key:0,class:"yu-flex yu-items-center yu-w-fit yu-justify-center yu-h-0"},Jo=["src"],en={key:1,class:"yu-flex yu-flex-col yu-items-center yu-justify-start yu-gap-2 yu-px-6 yu-w-full"},tn=["src"],on=["src"],rt=e.defineComponent({__name:"app-screen-page",props:{rule:{},edges:{}},emits:["edge-click"],setup(t,{emit:o}){const n=t,r=o,{history:i}=ue(),s=e.computed(()=>i.value.length>0),a=e.computed(()=>n.edges??[]),l=e.computed(()=>n.rule.settings?.body);return(u,c)=>(e.openBlock(),e.createElementBlock("div",Yo,[s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Qo)),e.createVNode(U,{class:"yu-px-6 yu-w-full",col:"",center:"","gap-base":""},{default:e.withCtx(()=>[l.value?.logo?(e.openBlock(),e.createElementBlock("img",{key:0,class:"yu-w-10 yu-h-10 yu-object-contain",src:l.value.logo,alt:""},null,8,Jo)):e.createCommentVNode("",!0),l.value?.eyebrow?(e.openBlock(),e.createBlock(V,{key:1,class:"yu-text-center yu-uppercase yu-tracking-widest yu-leading-none","extra-small":"",gray:"",mono:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value.eyebrow),1)]),_:1})):e.createCommentVNode("",!0),l.value?.title?(e.openBlock(),e.createBlock(V,{key:2,class:"yu-text-center","extra-large":"",semibold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value.title),1)]),_:1})):e.createCommentVNode("",!0),l.value?.subtitle?(e.openBlock(),e.createBlock(V,{key:3,class:"yu-w-64 yu-text-center",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value.subtitle),1)]),_:1})):e.createCommentVNode("",!0)]),_:1}),a.value.length?(e.openBlock(),e.createElementBlock("div",en,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value.slice(0,3),h=>(e.openBlock(),e.createBlock(J,{class:"hover:yu-translate-x-1 yu-max-w-[25rem]",key:h.id,outline:"",fluid:"",onClick:m=>r("edge-click",h)},e.createSlots({trailing:e.withCtx(()=>[c[0]||(c[0]=e.createTextVNode("chevron_right",-1))]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.name),1)]),_:2},[h.settings?.body?.logo?{name:"icon",fn:e.withCtx(()=>[e.createElementVNode("img",{class:"yu-w-4 yu-h-4 yu-object-contain",src:h.settings.body.logo,alt:""},null,8,tn)]),key:"0"}:void 0]),1032,["onClick"]))),128)),e.createElementVNode("div",{class:e.normalizeClass(["yu-flex yu-items-start yu-overflow-x-auto yu-w-full invisible-scrollbar yu-pt-6",{"yu-justify-start":a.value.slice(3).length>4,"yu-justify-center":a.value.slice(3).length<=4}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value.slice(3),h=>(e.openBlock(),e.createElementBlock("div",{class:"yu-flex yu-flex-col yu-items-center yu-gap-2",key:h.id},[e.createVNode(J,{outline:"",icon:"",onClick:m=>r("edge-click",h)},e.createSlots({_:2},[h.settings?.body?.logo?{name:"icon",fn:e.withCtx(()=>[e.createElementVNode("img",{class:"yu-w-5 yu-h-5 yu-object-contain",src:h.settings.body.logo,alt:""},null,8,on)]),key:"0"}:void 0]),1032,["onClick"]),e.createVNode(V,{class:"yu-w-20 yu-text-center yu-leading-3 yu-line-clamp-2","extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.name),1)]),_:2},1024)]))),128))],2)])):e.createCommentVNode("",!0)]))}}),nn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAVCAYAAAAnzezqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAVtSURBVHgBpVVriFVVFF6Pvc+5c+/MOM2Yo2hq41tDU1EsC50pU9NySqZUDCQiCwWZSKJQGOpHZjhpomOGNkE4pBQUgUIPGAz9Of0oGS0tCpWY0dIf93nO3q1zzzn3Xh+J1oHLPfusvb/v299ea22EO3hmz35RN2XGNyimOrZYr8g0aFZ1RH49k63VbIcogrsI4S6Wb4qhToGRmHwjk5IYypoLiu0hzjrbNn77xiW8FeHS+vdrdQOtR7ZPC8FkhbZOQIDRgIxByU/A5V/GaC2zEMQxLMatxJGL8wwU1wbvEtNk+zGTncc3p7b4+LhhS1SKPhKAdbJwlPwSjGAFFFWJPCQKCYq7sxQQczAHICQ3VkUilGxXYhCtb1Aupm9wYMm9eychwy6FfrMAOEVSARRgGy40AZiNCEMhoQj5FokruWGBKubEDgQiojW/lgTMH3qgpro21y7A7RIcwmWykm2lXcuuigICkBCsTH7NEUFkfXhU5aMxESakVUD+6PiuxcpmdxBioyz+XianZdJ98j+FA9sE/FoBEAriCBgt8o3Hcq2oIqEBSVRLRfFFoWepdWzXWGXsIUDyQJn5Z/Xgyiqb3TCiALOE/G3F5jryEJhjG9HEZ2orRNhYqPyCHCjFCMPNBGMi/Epl2bwpZZNOg7d8qOGWqVj/k9WWLpE9nshnn0ClR8uiuUR2IBLys9j6kOxifAR0kcA/KmBSntDCYB1xpldio8SdExJvkflN8p6Rbz0iplHGj4gDuRzmO3HZhL0DAH6PsXZLyrEXZEIqVihkrxL6fRppTiNU7x5M/F3nopkIKvej67v7RNSElI8LTcIsVWDPofLqFeBWhYMLyW0Yw8ZPkZs/5xrdJyY847KtId+m2cFJhGZE66Ft70hP8V1GHFRUGMaoErGlQfmIkHuUhq/JGhiAS1UJ4DNSt0ll3BccNh0IOMO6djKBeUx8/XPIwIgtucaLrTXpBiw45oi4NC2ZqRruJ7wT5OSvWJ/nogsrRLhHycttQf6RWHFaiKbAVTgvifdLOZHk3BT1SiebGJxllatHir3JwB1AM7lKq8tgC1cdyF9R5B9z0esr3H1xpVidhLqgZ9haweGcylTLZlLaqD0OQX+ygGvBy7/05P796UCAOEB7FHoHsZ6/YJNbRqS3S4LVSLJ+nvTtcd+Fb0RETzVnTuXA3cWE9yvM7/Wsv9BRNAvBP02Mm4DgiuRKL7HfJPkdlR2AZyCoin5A/ztFtMu45ljrJ52b4/JXR05t6F47fedy2fk+1k5nUtFWT9usk4epvvK/lDqdIVb2ZD13dEL5n0nh73ZJr0A0r8lxDWfG88yFNcqolAh/Oej7iJnpijQFx+kmaLpGmCkDR1xa7fxR3V/Z+EqNaN3M9553yWwVu8YU7SdLHOcCweua/F4RclJihkulCRgdmYlqn+JykzuhWO86KlsKy/Lwko+3P1spgOKX7r72g57NLZIS+kAI0kylboYaTZNCfCDIBWmtFDSeiDyub1Jxb6C4xmNxIU4gRHJmx/Wt/6a34eYH3xoHpFdLpm+SnQ2N22h4sQgYhgTXdb+wQVV8q2xg0tQ+XdT97qrbEhA/Hcs7kphxnhMHXhGQCSIg6v8QVkkwrrA7uqyKIsN2W7wJAwHS17w5zd07f7sjASUhHR1UcxIXCFg7sV0sgnTZARNdMCAiDKqKS6d8kZmNzQc799wM+7YExE9bWxu3ZKctEGvbmf1FQuaWGxdAOQHLF5EIPqN0et7DXV1//W8BlU/XUx3Dqtlbr8msF7KRlW6UckaaHLC3qvnDnT/8G85/FhA/h9s6HFKZVulya6SC5Ao30l3xdym7o5C2B5p7dgzeav0/0mtgehRo/YYAAAAASUVORK5CYII=",rn={class:"yu-flex yu-flex-col yu-h-full yu-w-full yu-bg-white yu-overflow-hidden dark:yu-bg-neutral-800"},sn={class:"yu-w-full yu-shrink-0 yu-border-b yu-flex yu-items-center yu-px-4 yu-justify-between yu-gap-2 yu-bg-primary yu-h-[4.4rem] yu-text-[var(--yu-primary-fg)] yu-border-[var(--yu-primary-border)]"},an={class:"yu-flex yu-items-center yu-gap-3 yu-min-w-0 yu-flex-1"},ln=["src"],un={class:"yu-flex yu-flex-col yu-justify-center yu-min-w-0 yu-overflow-hidden"},cn={class:"yu-flex yu-flex-col yu-w-full yu-flex-1 yu-min-h-0"},dn={key:0,class:"yu-flex yu-shrink-0 yu-items-center yu-w-fit yu-justify-center yu-px-6 yu-py-4"},pn={class:"yu-flex yu-flex-col yu-w-full yu-flex-1 yu-min-h-0 yu-overflow-y-auto yu-gap-8"},fn={class:"yu-h-7 yu-w-full yu-shrink-0 yu-border-t yu-border-gray-200 yu-flex yu-items-center yu-justify-center yu-p-2 yu-gap-1 yu-bg-white dark:yu-border-neutral-700 dark:yu-bg-neutral-800"},mn=["src"],yn=e.defineComponent({inheritAttrs:!1,__name:"app-widget-view",props:{workflow:{},config:{},fullscreen:{type:Boolean}},emits:["send-message","edge-click","submit","close","back"],setup(t,{emit:o}){const n=t,r=o,{history:i,currentRule:s,edges:a,setWorkflow:l}=ue(),{appearanceStyle:u,themeClass:c}=It(()=>n.config.configurations.appearance);l(n.workflow),e.watch(()=>n.workflow,g=>l(g));const h=e.computed(()=>i.value.length>0),m=e.computed(()=>h.value&&s.value?.action!=="identification"),p=e.computed(()=>n.config.configurations.general.isClosable),d={identification:et,service:nt,screen:rt},y=e.computed(()=>{const g=s.value?.action;return g&&g in d?d[g]:void 0}),v=e.computed(()=>n.fullscreen?"yu-w-screen yu-h-screen":"yu-w-[24.4rem] yu-h-[38rem] widget-shadow yu-rounded-2xl");return(g,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yunique yu-overflow-hidden yu-relative",[v.value,e.unref(c)]]),"data-testid":"app-widget-view",style:e.normalizeStyle(e.unref(u))},[e.createElementVNode("div",rn,[e.createElementVNode("div",sn,[e.createElementVNode("div",an,[e.unref(s)?.settings?.header?.logo?(e.openBlock(),e.createElementBlock("img",{key:0,class:"yu-w-9 yu-h-9 yu-object-contain yu-rounded-lg yu-shrink-0",src:e.unref(s).settings.header.logo,alt:""},null,8,ln)):e.createCommentVNode("",!0),e.createElementVNode("div",un,[e.unref(s)?.settings?.header?.title?(e.openBlock(),e.createBlock(V,{key:0,class:"yu-w-full yu-truncate !yu-text-inherit",bold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s).settings.header.title),1)]),_:1})):e.createCommentVNode("",!0),e.unref(s)?.settings?.header?.subtitle?(e.openBlock(),e.createBlock(V,{key:1,class:"yu-w-full yu-truncate !yu-text-inherit yu-opacity-75","extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s).settings.header.subtitle),1)]),_:1})):e.createCommentVNode("",!0)])]),p.value?(e.openBlock(),e.createBlock(J,{key:0,class:"yu-shrink-0 !yu-bg-transparent hover:!yu-bg-[color-mix(in_srgb,var(--yu-primary-fg)_12%,transparent)]",onClick:f[0]||(f[0]=w=>r("close")),"data-testid":"app-widget-close",small:"",icon:""},{default:e.withCtx(()=>[e.createVNode(M,null,{default:e.withCtx(()=>[...f[6]||(f[6]=[e.createTextVNode("close",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",cn,[e.createVNode(e.Transition,{name:"page-transition",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("div",{class:"yu-flex yu-flex-col yu-w-full yu-h-full yu-min-h-0",key:e.unref(s)?.id},[m.value?(e.openBlock(),e.createElementBlock("div",dn,[e.createElementVNode("div",{class:"yu-flex yu-items-center yu-w-fit yu-justify-center yu-cursor-pointer yu-group",onClick:f[1]||(f[1]=w=>r("back"))},[e.createVNode(M,{class:"yu-transition-colors group-hover:!yu-text-gray-700 dark:group-hover:!yu-text-neutral-200",small:"",gray:""},{default:e.withCtx(()=>[...f[7]||(f[7]=[e.createTextVNode("chevron_left",-1)])]),_:1}),e.createVNode(V,{class:"yu-transition-colors group-hover:!yu-text-gray-700 dark:group-hover:!yu-text-neutral-200","extra-small":"",medium:"",gray:""},{default:e.withCtx(()=>[...f[8]||(f[8]=[e.createTextVNode("Voltar",-1)])]),_:1})])])):e.createCommentVNode("",!0),e.createElementVNode("div",pn,[y.value&&e.unref(s)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.value),{key:0,rule:e.unref(s),edges:e.unref(a),onSubmit:f[2]||(f[2]=w=>r("submit",w)),onBack:f[3]||(f[3]=w=>r("back")),onEdgeClick:f[4]||(f[4]=w=>r("edge-click",w)),onSendMessage:f[5]||(f[5]=w=>r("send-message",w))},null,40,["rule","edges"])):e.createCommentVNode("",!0)])]))]),_:1})]),e.createElementVNode("div",fn,[e.createElementVNode("img",{class:"yu-w-3 yu-h-2",src:e.unref(nn),alt:"Opens"},null,8,mn),e.createVNode(V,{class:"!yu-text-xxs",gray:""},{default:e.withCtx(()=>[...f[9]||(f[9]=[e.createTextVNode("Powered By",-1),e.createElementVNode("b",{class:"yu-ml-1"},"Opens",-1)])]),_:1})])])],6))}}),it=Pe(yn,[["__scopeId","data-v-5996da4f"]]),hn={class:"yu-flex yu-h-full yu-pl-3 yu-gap-2 yu-z-10 yu-pointer-events-none"},gn={class:"yu-h-full yu-flex yu-items-center yu-justify-center"},vn=["value","type","disabled","maxlength"],wn={class:"yu-absolute yu-right-2 yu-z-10 yu-flex yu-items-center yu-gap-1 yu-text-gray-500"},Wt=e.defineComponent({__name:"app-text-input",props:{modelValue:{default:""},type:{default:"text"},maxLength:{},disabled:{type:Boolean},loading:{type:Boolean},invalid:{type:Boolean},small:{type:Boolean},fluid:{type:Boolean},round:{type:Boolean},valid:{type:Boolean},block:{type:Boolean},maskFunction:{},passwordToggle:{type:Boolean}},emits:["update:modelValue","keyup-enter"],setup(t,{expose:o,emit:n}){const r=t,i=n,s=e.computed(()=>e.useSlots());function a(C){return!!s.value[C]}const l=e.ref(""),u=e.ref(!1),c=e.ref(!1);function h(C){if(!r.maskFunction)return C;try{const x=r.maskFunction(C);return typeof x=="string"?x:C}catch{return C}}e.watch(()=>r.modelValue,C=>{if(C==null){l.value="";return}l.value=r.maskFunction?h(C):C},{immediate:!0});function m(){return!(u.value||l.value)}const{height:p,textSize:d,width:y}=Ft(r),v=e.computed(()=>r.invalid?"yu-border-red-500 focus-within:yu-border-red-500":r.valid?"yu-border-green-500 focus-within:yu-border-green-500":"yu-border-gray-200 focus-within:!yu-border-primary/40 hover:yu-border-gray-300"),g=e.computed(()=>r.invalid?"yu-text-red-500":r.valid?"yu-text-green-500":"yu-text-gray-500"),f=e.computed(()=>r.small&&m()?"yu-translate-y-[7px]":r.small&&!m()?"yu-translate-y-0":m()?"yu-translate-y-[11px]":"yu-translate-y-0"),w=e.computed(()=>a("icon")||r.loading?"yu-pl-[34px]":"yu-pl-3"),k=e.computed(()=>r.block?"yu-rounded-none":r.round?"yu-rounded-full":"yu-rounded-lg"),A=e.computed(()=>r.disabled||r.loading?"yu-opacity-50 yu-pointer-events-none":"");function B(C){const $=C.target.value;l.value=r.maskFunction?h($):$,i("update:modelValue",l.value)}return o({focus:u,content:l}),(C,x)=>(e.openBlock(),e.createBlock(U,{class:e.normalizeClass([e.unref(y)]),col:"","gap-none":""},{default:e.withCtx(()=>[e.createVNode(U,{col:"","gap-sm":""},{default:e.withCtx(()=>[a("label")?(e.openBlock(),e.createBlock(V,{key:0,small:"",medium:""},{default:e.withCtx(()=>[e.renderSlot(C.$slots,"label")]),_:3})):e.createCommentVNode("",!0),e.createElementVNode("label",{class:e.normalizeClass(["yu-relative yu-flex yu-flex-col yu-justify-center yu-items-start yu-border yu-cursor-text yu-transition-colors yu-w-full yu-bg-transparent",[k.value,A.value,e.unref(p),v.value]]),"data-testid":"app-text-input"},[e.createElementVNode("div",hn,[e.createElementVNode("div",gn,[!t.loading&&a("icon")?(e.openBlock(),e.createBlock(M,{key:0,small:""},{default:e.withCtx(()=>[e.renderSlot(C.$slots,"icon")]),_:3})):e.createCommentVNode("",!0),t.loading?(e.openBlock(),e.createBlock(M,{key:1,class:"yu-animate-spin",small:"",outlined:""},{default:e.withCtx(()=>[...x[4]||(x[4]=[e.createTextVNode("progress_activity",-1)])]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(V,{class:e.normalizeClass(["yu-py-1 yu-transition",[f.value]]),small:"",medium:"",gray:""},{default:e.withCtx(()=>[e.renderSlot(C.$slots,"default")]),_:3},8,["class"])]),e.createElementVNode("input",{class:e.normalizeClass(["yu-absolute yu-inset-0 yu-w-full yu-h-full yu-outline-none yu-appearance-none yu-bg-transparent yu-pt-3 yu-pr-3 yu-text-gray-700 yu-font-primary yu-z-0",[e.unref(d),w.value,k.value]]),value:l.value,type:t.passwordToggle&&c.value?"text":t.type,disabled:t.disabled||t.loading,maxlength:t.maxLength,onInput:B,onFocus:x[0]||(x[0]=$=>u.value=!0),onBlur:x[1]||(x[1]=$=>u.value=!1),onKeyup:x[2]||(x[2]=e.withKeys($=>i("keyup-enter"),["enter"]))},null,42,vn),e.createElementVNode("div",wn,[t.maxLength?(e.openBlock(),e.createBlock(V,{key:0,small:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(`${l.value.length} / ${t.maxLength}`),1)]),_:1})):e.createCommentVNode("",!0),t.type==="password"&&t.passwordToggle?(e.openBlock(),e.createElementBlock("button",{key:1,class:"yu-bg-transparent yu-border-0 yu-p-0 yu-cursor-pointer yu-flex yu-items-center",type:"button",tabindex:"-1",onClick:x[3]||(x[3]=$=>c.value=!c.value)},[e.createVNode(M,{small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value?"visibility_off":"visibility"),1)]),_:1})])):e.createCommentVNode("",!0),e.renderSlot(C.$slots,"suffix")])],2)]),_:3}),a("feedback")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["yu-mt-1",[g.value]])},[e.renderSlot(C.$slots,"feedback")],2)):e.createCommentVNode("",!0)]),_:3},8,["class"]))}}),xn=()=>{const{isLightHex:t,normalizeHex:o}=Dt();return{getOffset:(s,a)=>{const l=`${a.x}px`,u=`${a.y}px`;switch(s){case"bottom-left":return{bottom:u,left:l};case"top-left":return{top:u,left:l};case"top-right":return{top:u,right:l};default:return{bottom:u,right:l}}},getPosition:s=>{switch(s){case"bottom-left":return"bottom left";case"top-left":return"top left";case"top-right":return"top right";default:return"bottom right"}},getTone:s=>{const a=o(s);return{backgroundImage:"none",backgroundColor:a,color:t(a)?"#1c1917":"#ffffff"}}}},bn=e.defineComponent({__name:"app-widget",props:{workflow:{},config:{},fullscreen:{type:Boolean}},emits:["send-message","edge-click","submit","close","back","open"],setup(t,{emit:o}){const n=t,r=o,i=e.ref(n.config.configurations.general.defaultBehavior==="active"),s=e.ref(!i.value),{setWorkflow:a}=ue(),{getOffset:l,getPosition:u,getTone:c}=xn(),{appearanceStyle:h,themeClass:m}=It(()=>n.config.configurations.appearance),p=e.computed(()=>n.config.configurations.anchor),d=e.computed(()=>n.config.configurations.appearance),y=e.computed(()=>{if(!(i.value&&n.fullscreen))return l(p.value.position,p.value.offset)}),v=e.computed(()=>u(p.value.position)),g=e.computed(()=>({workflow:n.workflow,config:n.config,fullscreen:n.fullscreen})),f=e.computed(()=>({style:c(d.value.primaryColor),small:p.value.size==="small",large:p.value.size==="large",logo:p.value.logo??"",label:p.value.label??""})),w=async()=>{i.value||(s.value=!1,await e.nextTick(),i.value=!0,r("open"))},k=()=>{i.value&&(i.value=!1,r("close"))},A=()=>{s.value=!0};return a(n.workflow),e.watch(()=>n.workflow,B=>a(B)),e.watch(()=>n.config.configurations.general.defaultBehavior,B=>{B==="active"?w():k()}),(B,C)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yu-fixed yunique yu-z-[99999]",[e.unref(m),i.value&&t.fullscreen?"yu-inset-0":""]]),"data-testid":"app-widget",style:e.normalizeStyle([{"--widget-origin":v.value},y.value,e.unref(h)])},[e.createVNode(e.Transition,{name:"widget",onAfterLeave:A},{default:e.withCtx(()=>[i.value?(e.openBlock(),e.createBlock(it,e.mergeProps({key:0},g.value,{onClose:k,onBack:C[0]||(C[0]=x=>r("back")),onSubmit:C[1]||(C[1]=x=>r("submit",x)),onEdgeClick:C[2]||(C[2]=x=>r("edge-click",x)),onSendMessage:C[3]||(C[3]=x=>r("send-message",x))}),null,16)):e.createCommentVNode("",!0)]),_:1}),s.value?(e.openBlock(),e.createBlock(tt,{key:0,style:e.normalizeStyle(f.value.style),small:f.value.small,large:f.value.large,logo:f.value.logo,label:f.value.label,onClick:w},null,8,["style","small","large","logo","label"])):e.createCommentVNode("",!0)],6))}}),jt=Pe(bn,[["__scopeId","data-v-5da01276"]]),kn=["top","right","bottom","left"],dt=["start","end"],pt=kn.reduce((t,o)=>t.concat(o,o+"-"+dt[0],o+"-"+dt[1]),[]),we=Math.min,ne=Math.max,Cn={left:"right",right:"left",bottom:"top",top:"bottom"},$n={start:"end",end:"start"};function Ge(t,o,n){return ne(t,we(o,n))}function re(t,o){return typeof t=="function"?t(o):t}function G(t){return t.split("-")[0]}function D(t){return t.split("-")[1]}function qt(t){return t==="x"?"y":"x"}function st(t){return t==="y"?"height":"width"}const Bn=new Set(["top","bottom"]);function Z(t){return Bn.has(G(t))?"y":"x"}function at(t){return qt(Z(t))}function Gt(t,o,n){n===void 0&&(n=!1);const r=D(t),i=at(t),s=st(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return o.reference[s]>o.floating[s]&&(a=Ae(a)),[a,Ae(a)]}function _n(t){const o=Ae(t);return[Se(t),o,Se(o)]}function Se(t){return t.replace(/start|end/g,o=>$n[o])}const ft=["left","right"],mt=["right","left"],Sn=["top","bottom"],An=["bottom","top"];function Tn(t,o,n){switch(t){case"top":case"bottom":return n?o?mt:ft:o?ft:mt;case"left":case"right":return o?Sn:An;default:return[]}}function Nn(t,o,n,r){const i=D(t);let s=Tn(G(t),n==="start",r);return i&&(s=s.map(a=>a+"-"+i),o&&(s=s.concat(s.map(Se)))),s}function Ae(t){return t.replace(/left|right|bottom|top/g,o=>Cn[o])}function Vn(t){return{top:0,right:0,bottom:0,left:0,...t}}function Zt(t){return typeof t!="number"?Vn(t):{top:t,right:t,bottom:t,left:t}}function ye(t){const{x:o,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:o,right:o+r,bottom:n+i,x:o,y:n}}function yt(t,o,n){let{reference:r,floating:i}=t;const s=Z(o),a=at(o),l=st(a),u=G(o),c=s==="y",h=r.x+r.width/2-i.width/2,m=r.y+r.height/2-i.height/2,p=r[l]/2-i[l]/2;let d;switch(u){case"top":d={x:h,y:r.y-i.height};break;case"bottom":d={x:h,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:m};break;case"left":d={x:r.x-i.width,y:m};break;default:d={x:r.x,y:r.y}}switch(D(o)){case"start":d[a]-=p*(n&&c?-1:1);break;case"end":d[a]+=p*(n&&c?-1:1);break}return d}const Pn=async(t,o,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,l=s.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(o));let c=await a.getElementRects({reference:t,floating:o,strategy:i}),{x:h,y:m}=yt(c,r,u),p=r,d={},y=0;for(let v=0;v<l.length;v++){const{name:g,fn:f}=l[v],{x:w,y:k,data:A,reset:B}=await f({x:h,y:m,initialPlacement:r,placement:p,strategy:i,middlewareData:d,rects:c,platform:a,elements:{reference:t,floating:o}});h=w??h,m=k??m,d={...d,[g]:{...d[g],...A}},B&&y<=50&&(y++,typeof B=="object"&&(B.placement&&(p=B.placement),B.rects&&(c=B.rects===!0?await a.getElementRects({reference:t,floating:o,strategy:i}):B.rects),{x:h,y:m}=yt(c,p,u)),v=-1)}return{x:h,y:m,placement:p,strategy:i,middlewareData:d}};async function Ee(t,o){var n;o===void 0&&(o={});const{x:r,y:i,platform:s,rects:a,elements:l,strategy:u}=t,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:m="floating",altBoundary:p=!1,padding:d=0}=re(o,t),y=Zt(d),g=l[p?m==="floating"?"reference":"floating":m],f=ye(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:h,strategy:u})),w=m==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),A=await(s.isElement==null?void 0:s.isElement(k))?await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1}:{x:1,y:1},B=ye(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:k,strategy:u}):w);return{top:(f.top-B.top+y.top)/A.y,bottom:(B.bottom-f.bottom+y.bottom)/A.y,left:(f.left-B.left+y.left)/A.x,right:(B.right-f.right+y.right)/A.x}}const En=t=>({name:"arrow",options:t,async fn(o){const{x:n,y:r,placement:i,rects:s,platform:a,elements:l,middlewareData:u}=o,{element:c,padding:h=0}=re(t,o)||{};if(c==null)return{};const m=Zt(h),p={x:n,y:r},d=at(i),y=st(d),v=await a.getDimensions(c),g=d==="y",f=g?"top":"left",w=g?"bottom":"right",k=g?"clientHeight":"clientWidth",A=s.reference[y]+s.reference[d]-p[d]-s.floating[y],B=p[d]-s.reference[d],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let x=C?C[k]:0;(!x||!await(a.isElement==null?void 0:a.isElement(C)))&&(x=l.floating[k]||s.floating[y]);const $=A/2-B/2,N=x/2-v[y]/2-1,S=we(m[f],N),E=we(m[w],N),b=S,T=x-v[y]-E,P=x/2-v[y]/2+$,R=Ge(b,P,T),z=!u.arrow&&D(i)!=null&&P!==R&&s.reference[y]/2-(P<b?S:E)-v[y]/2<0,L=z?P<b?P-b:P-T:0;return{[d]:p[d]+L,data:{[d]:R,centerOffset:P-R-L,...z&&{alignmentOffset:L}},reset:z}}});function zn(t,o,n){return(t?[...n.filter(i=>D(i)===t),...n.filter(i=>D(i)!==t)]:n.filter(i=>G(i)===i)).filter(i=>t?D(i)===t||(o?Se(i)!==i:!1):!0)}const Ln=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(o){var n,r,i;const{rects:s,middlewareData:a,placement:l,platform:u,elements:c}=o,{crossAxis:h=!1,alignment:m,allowedPlacements:p=pt,autoAlignment:d=!0,...y}=re(t,o),v=m!==void 0||p===pt?zn(m||null,d,p):p,g=await Ee(o,y),f=((n=a.autoPlacement)==null?void 0:n.index)||0,w=v[f];if(w==null)return{};const k=Gt(w,s,await(u.isRTL==null?void 0:u.isRTL(c.floating)));if(l!==w)return{reset:{placement:v[0]}};const A=[g[G(w)],g[k[0]],g[k[1]]],B=[...((r=a.autoPlacement)==null?void 0:r.overflows)||[],{placement:w,overflows:A}],C=v[f+1];if(C)return{data:{index:f+1,overflows:B},reset:{placement:C}};const x=B.map(S=>{const E=D(S.placement);return[S.placement,E&&h?S.overflows.slice(0,2).reduce((b,T)=>b+T,0):S.overflows[0],S.overflows]}).sort((S,E)=>S[1]-E[1]),N=((i=x.filter(S=>S[2].slice(0,D(S[0])?2:3).every(E=>E<=0))[0])==null?void 0:i[0])||x[0][0];return N!==l?{data:{index:f+1,overflows:B},reset:{placement:N}}:{}}}},Mn=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(o){var n,r;const{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:u,elements:c}=o,{mainAxis:h=!0,crossAxis:m=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:v=!0,...g}=re(t,o);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const f=G(i),w=Z(l),k=G(l)===l,A=await(u.isRTL==null?void 0:u.isRTL(c.floating)),B=p||(k||!v?[Ae(l)]:_n(l)),C=y!=="none";!p&&C&&B.push(...Nn(l,v,y,A));const x=[l,...B],$=await Ee(o,g),N=[];let S=((r=s.flip)==null?void 0:r.overflows)||[];if(h&&N.push($[f]),m){const P=Gt(i,a,A);N.push($[P[0]],$[P[1]])}if(S=[...S,{placement:i,overflows:N}],!N.every(P=>P<=0)){var E,b;const P=(((E=s.flip)==null?void 0:E.index)||0)+1,R=x[P];if(R&&(!(m==="alignment"?w!==Z(R):!1)||S.every(O=>Z(O.placement)===w?O.overflows[0]>0:!0)))return{data:{index:P,overflows:S},reset:{placement:R}};let z=(b=S.filter(L=>L.overflows[0]<=0).sort((L,O)=>L.overflows[1]-O.overflows[1])[0])==null?void 0:b.placement;if(!z)switch(d){case"bestFit":{var T;const L=(T=S.filter(O=>{if(C){const W=Z(O.placement);return W===w||W==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(W=>W>0).reduce((W,vo)=>W+vo,0)]).sort((O,W)=>O[1]-W[1])[0])==null?void 0:T[0];L&&(z=L);break}case"initialPlacement":z=l;break}if(i!==z)return{reset:{placement:z}}}return{}}}},Rn=new Set(["left","top"]);async function On(t,o){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=G(n),l=D(n),u=Z(n)==="y",c=Rn.has(a)?-1:1,h=s&&u?-1:1,m=re(o,t);let{mainAxis:p,crossAxis:d,alignmentAxis:y}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof y=="number"&&(d=l==="end"?y*-1:y),u?{x:d*h,y:p*c}:{x:p*c,y:d*h}}const Hn=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(o){var n,r;const{x:i,y:s,placement:a,middlewareData:l}=o,u=await On(o,t);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:s+u.y,data:{...u,placement:a}}}}},Fn=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(o){const{x:n,y:r,placement:i}=o,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:g=>{let{x:f,y:w}=g;return{x:f,y:w}}},...u}=re(t,o),c={x:n,y:r},h=await Ee(o,u),m=Z(G(i)),p=qt(m);let d=c[p],y=c[m];if(s){const g=p==="y"?"top":"left",f=p==="y"?"bottom":"right",w=d+h[g],k=d-h[f];d=Ge(w,d,k)}if(a){const g=m==="y"?"top":"left",f=m==="y"?"bottom":"right",w=y+h[g],k=y-h[f];y=Ge(w,y,k)}const v=l.fn({...o,[p]:d,[m]:y});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[p]:s,[m]:a}}}}}},Dn=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(o){var n,r;const{placement:i,rects:s,platform:a,elements:l}=o,{apply:u=()=>{},...c}=re(t,o),h=await Ee(o,c),m=G(i),p=D(i),d=Z(i)==="y",{width:y,height:v}=s.floating;let g,f;m==="top"||m==="bottom"?(g=m,f=p===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(f=m,g=p==="end"?"top":"bottom");const w=v-h.top-h.bottom,k=y-h.left-h.right,A=we(v-h[g],w),B=we(y-h[f],k),C=!o.middlewareData.shift;let x=A,$=B;if((n=o.middlewareData.shift)!=null&&n.enabled.x&&($=k),(r=o.middlewareData.shift)!=null&&r.enabled.y&&(x=w),C&&!p){const S=ne(h.left,0),E=ne(h.right,0),b=ne(h.top,0),T=ne(h.bottom,0);d?$=y-2*(S!==0||E!==0?S+E:ne(h.left,h.right)):x=v-2*(b!==0||T!==0?b+T:ne(h.top,h.bottom))}await u({...o,availableWidth:$,availableHeight:x});const N=await a.getDimensions(l.floating);return y!==N.width||v!==N.height?{reset:{rects:!0}}:{}}}};function H(t){var o;return((o=t.ownerDocument)==null?void 0:o.defaultView)||window}function j(t){return H(t).getComputedStyle(t)}const ht=Math.min,he=Math.max,Te=Math.round;function Ut(t){const o=j(t);let n=parseFloat(o.width),r=parseFloat(o.height);const i=t.offsetWidth,s=t.offsetHeight,a=Te(n)!==i||Te(r)!==s;return a&&(n=i,r=s),{width:n,height:r,fallback:a}}function ee(t){return Kt(t)?(t.nodeName||"").toLowerCase():""}let $e;function Xt(){if($e)return $e;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?($e=t.brands.map((o=>o.brand+"/"+o.version)).join(" "),$e):navigator.userAgent}function q(t){return t instanceof H(t).HTMLElement}function Y(t){return t instanceof H(t).Element}function Kt(t){return t instanceof H(t).Node}function gt(t){return typeof ShadowRoot>"u"?!1:t instanceof H(t).ShadowRoot||t instanceof ShadowRoot}function ze(t){const{overflow:o,overflowX:n,overflowY:r,display:i}=j(t);return/auto|scroll|overlay|hidden|clip/.test(o+r+n)&&!["inline","contents"].includes(i)}function In(t){return["table","td","th"].includes(ee(t))}function Ze(t){const o=/firefox/i.test(Xt()),n=j(t),r=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!=="none"||n.perspective!=="none"||!!r&&r!=="none"||o&&n.willChange==="filter"||o&&!!n.filter&&n.filter!=="none"||["transform","perspective"].some((i=>n.willChange.includes(i)))||["paint","layout","strict","content"].some((i=>{const s=n.contain;return s!=null&&s.includes(i)}))}function Yt(){return!/^((?!chrome|android).)*safari/i.test(Xt())}function lt(t){return["html","body","#document"].includes(ee(t))}function Qt(t){return Y(t)?t:t.contextElement}const Jt={x:1,y:1};function ae(t){const o=Qt(t);if(!q(o))return Jt;const n=o.getBoundingClientRect(),{width:r,height:i,fallback:s}=Ut(o);let a=(s?Te(n.width):n.width)/r,l=(s?Te(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}function xe(t,o,n,r){var i,s;o===void 0&&(o=!1),n===void 0&&(n=!1);const a=t.getBoundingClientRect(),l=Qt(t);let u=Jt;o&&(r?Y(r)&&(u=ae(r)):u=ae(t));const c=l?H(l):window,h=!Yt()&&n;let m=(a.left+(h&&((i=c.visualViewport)==null?void 0:i.offsetLeft)||0))/u.x,p=(a.top+(h&&((s=c.visualViewport)==null?void 0:s.offsetTop)||0))/u.y,d=a.width/u.x,y=a.height/u.y;if(l){const v=H(l),g=r&&Y(r)?H(r):r;let f=v.frameElement;for(;f&&r&&g!==v;){const w=ae(f),k=f.getBoundingClientRect(),A=getComputedStyle(f);k.x+=(f.clientLeft+parseFloat(A.paddingLeft))*w.x,k.y+=(f.clientTop+parseFloat(A.paddingTop))*w.y,m*=w.x,p*=w.y,d*=w.x,y*=w.y,m+=k.x,p+=k.y,f=H(f).frameElement}}return{width:d,height:y,top:p,right:m+d,bottom:p+y,left:m,x:m,y:p}}function Q(t){return((Kt(t)?t.ownerDocument:t.document)||window.document).documentElement}function Le(t){return Y(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function eo(t){return xe(Q(t)).left+Le(t).scrollLeft}function be(t){if(ee(t)==="html")return t;const o=t.assignedSlot||t.parentNode||gt(t)&&t.host||Q(t);return gt(o)?o.host:o}function to(t){const o=be(t);return lt(o)?o.ownerDocument.body:q(o)&&ze(o)?o:to(o)}function Ne(t,o){var n;o===void 0&&(o=[]);const r=to(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),s=H(r);return i?o.concat(s,s.visualViewport||[],ze(r)?r:[]):o.concat(r,Ne(r))}function vt(t,o,n){return o==="viewport"?ye((function(r,i){const s=H(r),a=Q(r),l=s.visualViewport;let u=a.clientWidth,c=a.clientHeight,h=0,m=0;if(l){u=l.width,c=l.height;const p=Yt();(p||!p&&i==="fixed")&&(h=l.offsetLeft,m=l.offsetTop)}return{width:u,height:c,x:h,y:m}})(t,n)):Y(o)?ye((function(r,i){const s=xe(r,!0,i==="fixed"),a=s.top+r.clientTop,l=s.left+r.clientLeft,u=q(r)?ae(r):{x:1,y:1};return{width:r.clientWidth*u.x,height:r.clientHeight*u.y,x:l*u.x,y:a*u.y}})(o,n)):ye((function(r){const i=Q(r),s=Le(r),a=r.ownerDocument.body,l=he(i.scrollWidth,i.clientWidth,a.scrollWidth,a.clientWidth),u=he(i.scrollHeight,i.clientHeight,a.scrollHeight,a.clientHeight);let c=-s.scrollLeft+eo(r);const h=-s.scrollTop;return j(a).direction==="rtl"&&(c+=he(i.clientWidth,a.clientWidth)-l),{width:l,height:u,x:c,y:h}})(Q(t)))}function wt(t){return q(t)&&j(t).position!=="fixed"?t.offsetParent:null}function xt(t){const o=H(t);let n=wt(t);for(;n&&In(n)&&j(n).position==="static";)n=wt(n);return n&&(ee(n)==="html"||ee(n)==="body"&&j(n).position==="static"&&!Ze(n))?o:n||(function(r){let i=be(r);for(;q(i)&&!lt(i);){if(Ze(i))return i;i=be(i)}return null})(t)||o}function Wn(t,o,n){const r=q(o),i=Q(o),s=xe(t,!0,n==="fixed",o);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(r||!r&&n!=="fixed")if((ee(o)!=="body"||ze(i))&&(a=Le(o)),q(o)){const u=xe(o,!0);l.x=u.x+o.clientLeft,l.y=u.y+o.clientTop}else i&&(l.x=eo(i));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}const jn={getClippingRect:function(t){let{element:o,boundary:n,rootBoundary:r,strategy:i}=t;const s=n==="clippingAncestors"?(function(c,h){const m=h.get(c);if(m)return m;let p=Ne(c).filter((g=>Y(g)&&ee(g)!=="body")),d=null;const y=j(c).position==="fixed";let v=y?be(c):c;for(;Y(v)&&!lt(v);){const g=j(v),f=Ze(v);(y?f||d:f||g.position!=="static"||!d||!["absolute","fixed"].includes(d.position))?d=g:p=p.filter((w=>w!==v)),v=be(v)}return h.set(c,p),p})(o,this._c):[].concat(n),a=[...s,r],l=a[0],u=a.reduce(((c,h)=>{const m=vt(o,h,i);return c.top=he(m.top,c.top),c.right=ht(m.right,c.right),c.bottom=ht(m.bottom,c.bottom),c.left=he(m.left,c.left),c}),vt(o,l,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:o,offsetParent:n,strategy:r}=t;const i=q(n),s=Q(n);if(n===s)return o;let a={scrollLeft:0,scrollTop:0},l={x:1,y:1};const u={x:0,y:0};if((i||!i&&r!=="fixed")&&((ee(n)!=="body"||ze(s))&&(a=Le(n)),q(n))){const c=xe(n);l=ae(n),u.x=c.x+n.clientLeft,u.y=c.y+n.clientTop}return{width:o.width*l.x,height:o.height*l.y,x:o.x*l.x-a.scrollLeft*l.x+u.x,y:o.y*l.y-a.scrollTop*l.y+u.y}},isElement:Y,getDimensions:function(t){return q(t)?Ut(t):t.getBoundingClientRect()},getOffsetParent:xt,getDocumentElement:Q,getScale:ae,async getElementRects(t){let{reference:o,floating:n,strategy:r}=t;const i=this.getOffsetParent||xt,s=this.getDimensions;return{reference:Wn(o,await i(n),r),floating:{x:0,y:0,...await s(n)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>j(t).direction==="rtl"},qn=(t,o,n)=>{const r=new Map,i={platform:jn,...n},s={...i.platform,_c:r};return Pn(t,o,{...i,platform:s})};function oo(t,o){for(const n in o)Object.prototype.hasOwnProperty.call(o,n)&&(typeof o[n]=="object"&&t[n]?oo(t[n],o[n]):t[n]=o[n])}const I={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:t=>[...t,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover"],delay:{show:0,hide:400}}}};function ke(t,o){let n=I.themes[t]||{},r;do r=n[o],typeof r>"u"?n.$extend?n=I.themes[n.$extend]||{}:(n=null,r=I[o]):n=null;while(n);return r}function Gn(t){const o=[t];let n=I.themes[t]||{};do n.$extend&&!n.$resetCss?(o.push(n.$extend),n=I.themes[n.$extend]||{}):n=null;while(n);return o.map(r=>`v-popper--theme-${r}`)}function bt(t){const o=[t];let n=I.themes[t]||{};do n.$extend?(o.push(n.$extend),n=I.themes[n.$extend]||{}):n=null;while(n);return o}let le=!1;if(typeof window<"u"){le=!1;try{const t=Object.defineProperty({},"passive",{get(){le=!0}});window.addEventListener("test",null,t)}catch{}}let no=!1;typeof window<"u"&&typeof navigator<"u"&&(no=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const ro=["auto","top","bottom","left","right"].reduce((t,o)=>t.concat([o,`${o}-start`,`${o}-end`]),[]),kt={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},Ct={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function $t(t,o){const n=t.indexOf(o);n!==-1&&t.splice(n,1)}function Fe(){return new Promise(t=>requestAnimationFrame(()=>{requestAnimationFrame(t)}))}const F=[];let oe=null;const Bt={};function _t(t){let o=Bt[t];return o||(o=Bt[t]=[]),o}let Ue=function(){};typeof window<"u"&&(Ue=window.Element);function _(t){return function(o){return ke(o.theme,t)}}const De="__floating-vue__popper",io=()=>e.defineComponent({name:"VPopper",provide(){return{[De]:{parentPopper:this}}},inject:{[De]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:_("disabled")},positioningDisabled:{type:Boolean,default:_("positioningDisabled")},placement:{type:String,default:_("placement"),validator:t=>ro.includes(t)},delay:{type:[String,Number,Object],default:_("delay")},distance:{type:[Number,String],default:_("distance")},skidding:{type:[Number,String],default:_("skidding")},triggers:{type:Array,default:_("triggers")},showTriggers:{type:[Array,Function],default:_("showTriggers")},hideTriggers:{type:[Array,Function],default:_("hideTriggers")},popperTriggers:{type:Array,default:_("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:_("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:_("popperHideTriggers")},container:{type:[String,Object,Ue,Boolean],default:_("container")},boundary:{type:[String,Ue],default:_("boundary")},strategy:{type:String,validator:t=>["absolute","fixed"].includes(t),default:_("strategy")},autoHide:{type:[Boolean,Function],default:_("autoHide")},handleResize:{type:Boolean,default:_("handleResize")},instantMove:{type:Boolean,default:_("instantMove")},eagerMount:{type:Boolean,default:_("eagerMount")},popperClass:{type:[String,Array,Object],default:_("popperClass")},computeTransformOrigin:{type:Boolean,default:_("computeTransformOrigin")},autoMinSize:{type:Boolean,default:_("autoMinSize")},autoSize:{type:[Boolean,String],default:_("autoSize")},autoMaxSize:{type:Boolean,default:_("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:_("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:_("preventOverflow")},overflowPadding:{type:[Number,String],default:_("overflowPadding")},arrowPadding:{type:[Number,String],default:_("arrowPadding")},arrowOverflow:{type:Boolean,default:_("arrowOverflow")},flip:{type:Boolean,default:_("flip")},shift:{type:Boolean,default:_("shift")},shiftCrossAxis:{type:Boolean,default:_("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:_("noAutoFocus")},disposeTimeout:{type:Number,default:_("disposeTimeout")}},emits:{show:()=>!0,hide:()=>!0,"update:shown":t=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(t=>t.toString(36).substring(2,10)).join("_")}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var t;return(t=this[De])==null?void 0:t.parentPopper},hasPopperShowTriggerHover(){var t,o;return((t=this.popperTriggers)==null?void 0:t.includes("hover"))||((o=this.popperShowTriggers)==null?void 0:o.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(t){t?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:"$_refreshListeners",deep:!0},positioningDisabled:"$_refreshListeners",...["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((t,o)=>(t[o]="$_computePosition",t),{})},created(){this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:t=null,skipDelay:o=!1,force:n=!1}={}){var r,i;(r=this.parentPopper)!=null&&r.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(n||!this.disabled)&&(((i=this.parentPopper)==null?void 0:i.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(t,o),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:t=null,skipDelay:o=!1}={}){var n;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:o}),this.parentPopper.lockedChild=null)},1e3));return}((n=this.parentPopper)==null?void 0:n.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(t,o),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var t;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=((t=this.referenceNode)==null?void 0:t.call(this))??this.$el,this.$_targetNodes=this.targetNodes().filter(o=>o.nodeType===o.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;const t={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&t.middleware.push(Hn({mainAxis:this.distance,crossAxis:this.skidding}));const o=this.placement.startsWith("auto");if(o?t.middleware.push(Ln({alignment:this.placement.split("-")[1]??""})):t.placement=this.placement,this.preventOverflow&&(this.shift&&t.middleware.push(Fn({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!o&&this.flip&&t.middleware.push(Mn({padding:this.overflowPadding,boundary:this.boundary}))),t.middleware.push(En({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&t.middleware.push({name:"arrowOverflow",fn:({placement:r,rects:i,middlewareData:s})=>{let a;const{centerOffset:l}=s.arrow;return r.startsWith("top")||r.startsWith("bottom")?a=Math.abs(l)>i.reference.width/2:a=Math.abs(l)>i.reference.height/2,{data:{overflow:a}}}}),this.autoMinSize||this.autoSize){const r=this.autoSize?this.autoSize:this.autoMinSize?"min":null;t.middleware.push({name:"autoSize",fn:({rects:i,placement:s,middlewareData:a})=>{var l;if((l=a.autoSize)!=null&&l.skip)return{};let u,c;return s.startsWith("top")||s.startsWith("bottom")?u=i.reference.width:c=i.reference.height,this.$_innerNode.style[r==="min"?"minWidth":r==="max"?"maxWidth":"width"]=u!=null?`${u}px`:null,this.$_innerNode.style[r==="min"?"minHeight":r==="max"?"maxHeight":"height"]=c!=null?`${c}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,t.middleware.push(Dn({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:r,availableHeight:i})=>{this.$_innerNode.style.maxWidth=r!=null?`${r}px`:null,this.$_innerNode.style.maxHeight=i!=null?`${i}px`:null}})));const n=await qn(this.$_referenceNode,this.$_popperNode,t);Object.assign(this.result,{x:n.x,y:n.y,placement:n.placement,strategy:n.strategy,arrow:{...n.middlewareData.arrow,...n.middlewareData.arrowOverflow}})},$_scheduleShow(t,o=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),oe&&this.instantMove&&oe.instantMove&&oe!==this.parentPopper){oe.$_applyHide(!0),this.$_applyShow(!0);return}o?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(t,o=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(oe=this),o?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(t){const o=this.delay;return parseInt(o&&o[t]||o||0)},async $_applyShow(t=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=t,!this.isShown&&(this.$_ensureTeleport(),await Fe(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Ne(this.$_referenceNode),...Ne(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const o=this.$_referenceNode.getBoundingClientRect(),n=this.$_popperNode.querySelector(".v-popper__wrapper"),r=n.parentNode.getBoundingClientRect(),i=o.x+o.width/2-(r.left+n.offsetLeft),s=o.y+o.height/2-(r.top+n.offsetTop);this.result.transformOrigin=`${i}px ${s}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const t=this.showGroup;if(t){let o;for(let n=0;n<F.length;n++)o=F[n],o.showGroup!==t&&(o.hide(),o.$emit("close-group"))}F.push(this),document.body.classList.add("v-popper--some-open");for(const o of bt(this.theme))_t(o).push(this),document.body.classList.add(`v-popper--some-open--${o}`);this.$emit("apply-show"),this.classes.showFrom=!0,this.classes.showTo=!1,this.classes.hideFrom=!1,this.classes.hideTo=!1,await Fe(),this.classes.showFrom=!1,this.classes.showTo=!0,this.noAutoFocus||this.$_popperNode.focus()},async $_applyHide(t=!1){if(this.shownChildren.size>0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=t,$t(F,this),F.length===0&&document.body.classList.remove("v-popper--some-open");for(const n of bt(this.theme)){const r=_t(n);$t(r,this),r.length===0&&document.body.classList.remove(`v-popper--some-open--${n}`)}oe===this&&(oe=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const o=this.disposeTimeout;o!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},o)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await Fe(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let t=this.container;if(typeof t=="string"?t=window.document.querySelector(t):t===!1&&(t=this.$_targetNodes[0].parentNode),!t)throw new Error("No container for popover: "+this.container);t.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const t=n=>{this.isShown&&!this.$_hideInProgress||(n.usedByTooltip=!0,!this.$_preventShow&&this.show({event:n}))};this.$_registerTriggerListeners(this.$_targetNodes,kt,this.triggers,this.showTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],kt,this.popperTriggers,this.popperShowTriggers,t);const o=n=>{n.usedByTooltip||this.hide({event:n})};this.$_registerTriggerListeners(this.$_targetNodes,Ct,this.triggers,this.hideTriggers,o),this.$_registerTriggerListeners([this.$_popperNode],Ct,this.popperTriggers,this.popperHideTriggers,o)},$_registerEventListeners(t,o,n){this.$_events.push({targetNodes:t,eventType:o,handler:n}),t.forEach(r=>r.addEventListener(o,n,le?{passive:!0}:void 0))},$_registerTriggerListeners(t,o,n,r,i){let s=n;r!=null&&(s=typeof r=="function"?r(s):r),s.forEach(a=>{const l=o[a];l&&this.$_registerEventListeners(t,l,i)})},$_removeEventListeners(t){const o=[];this.$_events.forEach(n=>{const{targetNodes:r,eventType:i,handler:s}=n;!t||t===i?r.forEach(a=>a.removeEventListener(i,s)):o.push(n)}),this.$_events=o},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(t,o=!1){this.$_showFrameLocked||(this.hide({event:t}),t.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),o&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(t,o){for(const n of this.$_targetNodes){const r=n.getAttribute(t);r&&(n.removeAttribute(t),n.setAttribute(o,r))}},$_applyAttrsToTarget(t){for(const o of this.$_targetNodes)for(const n in t){const r=t[n];r==null?o.removeAttribute(n):o.setAttribute(n,r)}},$_updateParentShownChildren(t){let o=this.parentPopper;for(;o;)t?o.shownChildren.add(this.randomId):(o.shownChildren.delete(this.randomId),o.pendingHide&&o.hide()),o=o.parentPopper},$_isAimingPopper(){const t=this.$_referenceNode.getBoundingClientRect();if(ge>=t.left&&ge<=t.right&&ve>=t.top&&ve<=t.bottom){const o=this.$_popperNode.getBoundingClientRect(),n=ge-X,r=ve-K,i=o.left+o.width/2-X+(o.top+o.height/2)-K+o.width+o.height,s=X+n*i,a=K+r*i;return Be(X,K,s,a,o.left,o.top,o.left,o.bottom)||Be(X,K,s,a,o.left,o.top,o.right,o.top)||Be(X,K,s,a,o.right,o.top,o.right,o.bottom)||Be(X,K,s,a,o.left,o.bottom,o.right,o.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<"u"&&typeof window<"u"){if(no){const t=le?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",o=>St(o,!0),t),document.addEventListener("touchend",o=>At(o,!0),t)}else window.addEventListener("mousedown",t=>St(t,!1),!0),window.addEventListener("click",t=>At(t,!1),!0);window.addEventListener("resize",Un)}function St(t,o){if(I.autoHideOnMousedown)so(t,o);else for(let n=0;n<F.length;n++){const r=F[n];try{r.mouseDownContains=r.popperNode().contains(t.target)}catch{}}}function At(t,o){I.autoHideOnMousedown||so(t,o)}function so(t,o){const n={};for(let r=F.length-1;r>=0;r--){const i=F[r];try{const s=i.containsGlobalTarget=i.mouseDownContains||i.popperNode().contains(t.target);i.pendingHide=!1,requestAnimationFrame(()=>{if(i.pendingHide=!1,!n[i.randomId]&&Tt(i,s,t)){if(i.$_handleGlobalClose(t,o),!t.closeAllPopover&&t.closePopover&&s){let l=i.parentPopper;for(;l;)n[l.randomId]=!0,l=l.parentPopper;return}let a=i.parentPopper;for(;a&&Tt(a,a.containsGlobalTarget,t);)a.$_handleGlobalClose(t,o),a=a.parentPopper}})}catch{}}}function Tt(t,o,n){return n.closeAllPopover||n.closePopover&&o||Zn(t,n)&&!o}function Zn(t,o){if(typeof t.autoHide=="function"){const n=t.autoHide(o);return t.lastAutoHide=n,n}return t.autoHide}function Un(){for(let t=0;t<F.length;t++)F[t].$_computePosition()}let X=0,K=0,ge=0,ve=0;typeof window<"u"&&window.addEventListener("mousemove",t=>{X=ge,K=ve,ge=t.clientX,ve=t.clientY},le?{passive:!0}:void 0);function Be(t,o,n,r,i,s,a,l){const u=((a-i)*(o-s)-(l-s)*(t-i))/((l-s)*(n-t)-(a-i)*(r-o)),c=((n-t)*(o-s)-(r-o)*(t-i))/((l-s)*(n-t)-(a-i)*(r-o));return u>=0&&u<=1&&c>=0&&c<=1}const Xn={extends:io()},Me=(t,o)=>{const n=t.__vccOpts||t;for(const[r,i]of o)n[r]=i;return n};function Kn(t,o,n,r,i,s){return e.openBlock(),e.createElementBlock("div",{ref:"reference",class:e.normalizeClass(["v-popper",{"v-popper--shown":t.slotData.isShown}])},[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps(t.slotData)))],2)}const Yn=Me(Xn,[["render",Kn]]);function Qn(){var t=window.navigator.userAgent,o=t.indexOf("MSIE ");if(o>0)return parseInt(t.substring(o+5,t.indexOf(".",o)),10);var n=t.indexOf("Trident/");if(n>0){var r=t.indexOf("rv:");return parseInt(t.substring(r+3,t.indexOf(".",r)),10)}var i=t.indexOf("Edge/");return i>0?parseInt(t.substring(i+5,t.indexOf(".",i)),10):-1}let _e;function Xe(){Xe.init||(Xe.init=!0,_e=Qn()!==-1)}var Re={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Xe(),e.nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const t=document.createElement("object");this._resizeObject=t,t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex",-1),t.onload=this.addResizeHandlers,t.type="text/html",_e&&this.$el.appendChild(t),t.data="about:blank",_e||this.$el.appendChild(t)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!_e&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const Jn=e.withScopeId("data-v-b329ee4c");e.pushScopeId("data-v-b329ee4c");const er={class:"resize-observer",tabindex:"-1"};e.popScopeId();const tr=Jn((t,o,n,r,i,s)=>(e.openBlock(),e.createBlock("div",er)));Re.render=tr;Re.__scopeId="data-v-b329ee4c";Re.__file="src/components/ResizeObserver.vue";const ao=(t="theme")=>({computed:{themeClass(){return Gn(this[t])}}}),or=e.defineComponent({name:"VPopperContent",components:{ResizeObserver:Re},mixins:[ao()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(t){return t!=null&&!isNaN(t)?`${t}px`:null}}}),nr=["id","aria-hidden","tabindex","data-popper-placement"],rr={ref:"inner",class:"v-popper__inner"},ir=e.createElementVNode("div",{class:"v-popper__arrow-outer"},null,-1),sr=e.createElementVNode("div",{class:"v-popper__arrow-inner"},null,-1),ar=[ir,sr];function lr(t,o,n,r,i,s){const a=e.resolveComponent("ResizeObserver");return e.openBlock(),e.createElementBlock("div",{id:t.popperId,ref:"popover",class:e.normalizeClass(["v-popper__popper",[t.themeClass,t.classes.popperClass,{"v-popper__popper--shown":t.shown,"v-popper__popper--hidden":!t.shown,"v-popper__popper--show-from":t.classes.showFrom,"v-popper__popper--show-to":t.classes.showTo,"v-popper__popper--hide-from":t.classes.hideFrom,"v-popper__popper--hide-to":t.classes.hideTo,"v-popper__popper--skip-transition":t.skipTransition,"v-popper__popper--arrow-overflow":t.result&&t.result.arrow.overflow,"v-popper__popper--no-positioning":!t.result}]]),style:e.normalizeStyle(t.result?{position:t.result.strategy,transform:`translate3d(${Math.round(t.result.x)}px,${Math.round(t.result.y)}px,0)`}:void 0),"aria-hidden":t.shown?"false":"true",tabindex:t.autoHide?0:void 0,"data-popper-placement":t.result?t.result.placement:void 0,onKeyup:o[2]||(o[2]=e.withKeys(l=>t.autoHide&&t.$emit("hide"),["esc"]))},[e.createElementVNode("div",{class:"v-popper__backdrop",onClick:o[0]||(o[0]=l=>t.autoHide&&t.$emit("hide"))}),e.createElementVNode("div",{class:"v-popper__wrapper",style:e.normalizeStyle(t.result?{transformOrigin:t.result.transformOrigin}:void 0)},[e.createElementVNode("div",rr,[t.mounted?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",null,[e.renderSlot(t.$slots,"default")]),t.handleResize?(e.openBlock(),e.createBlock(a,{key:0,onNotify:o[1]||(o[1]=l=>t.$emit("resize",l))})):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],512),e.createElementVNode("div",{ref:"arrow",class:"v-popper__arrow-container",style:e.normalizeStyle(t.result?{left:t.toPx(t.result.arrow.x),top:t.toPx(t.result.arrow.y)}:void 0)},ar,4)],4)],46,nr)}const lo=Me(or,[["render",lr]]),uo={methods:{show(...t){return this.$refs.popper.show(...t)},hide(...t){return this.$refs.popper.hide(...t)},dispose(...t){return this.$refs.popper.dispose(...t)},onResize(...t){return this.$refs.popper.onResize(...t)}}};let Ke=function(){};typeof window<"u"&&(Ke=window.Element);const ur=e.defineComponent({name:"VPopperWrapper",components:{Popper:Yn,PopperContent:lo},mixins:[uo,ao("finalTheme")],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,Ke,Boolean],default:void 0},boundary:{type:[String,Ke],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":t=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(t=>t!==this.$refs.popperContent.$el)}}});function cr(t,o,n,r,i,s){const a=e.resolveComponent("PopperContent"),l=e.resolveComponent("Popper");return e.openBlock(),e.createBlock(l,e.mergeProps({ref:"popper"},t.$props,{theme:t.finalTheme,"target-nodes":t.getTargetNodes,"popper-node":()=>t.$refs.popperContent.$el,class:[t.themeClass],onShow:o[0]||(o[0]=()=>t.$emit("show")),onHide:o[1]||(o[1]=()=>t.$emit("hide")),"onUpdate:shown":o[2]||(o[2]=u=>t.$emit("update:shown",u)),onApplyShow:o[3]||(o[3]=()=>t.$emit("apply-show")),onApplyHide:o[4]||(o[4]=()=>t.$emit("apply-hide")),onCloseGroup:o[5]||(o[5]=()=>t.$emit("close-group")),onCloseDirective:o[6]||(o[6]=()=>t.$emit("close-directive")),onAutoHide:o[7]||(o[7]=()=>t.$emit("auto-hide")),onResize:o[8]||(o[8]=()=>t.$emit("resize"))}),{default:e.withCtx(({popperId:u,isShown:c,shouldMountContent:h,skipTransition:m,autoHide:p,show:d,hide:y,handleResize:v,onResize:g,classes:f,result:w})=>[e.renderSlot(t.$slots,"default",{shown:c,show:d,hide:y}),e.createVNode(a,{ref:"popperContent","popper-id":u,theme:t.finalTheme,shown:c,mounted:h,"skip-transition":m,"auto-hide":p,"handle-resize":v,classes:f,result:w,onHide:y,onResize:g},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"popper",{shown:c,hide:y})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},16,["theme","target-nodes","popper-node","class"])}const ut=Me(ur,[["render",cr]]),dr={...ut,name:"VDropdown",vPopperTheme:"dropdown"},pr={...ut,name:"VMenu",vPopperTheme:"menu"},fr={...ut,name:"VTooltip",vPopperTheme:"tooltip"},mr=e.defineComponent({name:"VTooltipDirective",components:{Popper:io(),PopperContent:lo},mixins:[uo],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:t=>ke(t.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:t=>ke(t.theme,"loadingContent")},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(t){if(typeof this.content=="function"&&this.$_isShown&&(t||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const o=++this.$_fetchId,n=this.content(this);n.then?n.then(r=>this.onResult(o,r)):this.onResult(o,n)}},onResult(t,o){t===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=o)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),yr=["innerHTML"],hr=["textContent"];function gr(t,o,n,r,i,s){const a=e.resolveComponent("PopperContent"),l=e.resolveComponent("Popper");return e.openBlock(),e.createBlock(l,e.mergeProps({ref:"popper"},t.$attrs,{theme:t.theme,"target-nodes":t.targetNodes,"popper-node":()=>t.$refs.popperContent.$el,onApplyShow:t.onShow,onApplyHide:t.onHide}),{default:e.withCtx(({popperId:u,isShown:c,shouldMountContent:h,skipTransition:m,autoHide:p,hide:d,handleResize:y,onResize:v,classes:g,result:f})=>[e.createVNode(a,{ref:"popperContent",class:e.normalizeClass({"v-popper--tooltip-loading":t.loading}),"popper-id":u,theme:t.theme,shown:c,mounted:h,"skip-transition":m,"auto-hide":p,"handle-resize":y,classes:g,result:f,onHide:d,onResize:v},{default:e.withCtx(()=>[t.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:t.finalContent},null,8,yr)):(e.openBlock(),e.createElementBlock("div",{key:1,textContent:e.toDisplayString(t.finalContent)},null,8,hr))]),_:2},1032,["class","popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:1},16,["theme","target-nodes","popper-node","onApplyShow","onApplyHide"])}const vr=Me(mr,[["render",gr]]),co="v-popper--has-tooltip";function wr(t,o){let n=t.placement;if(!n&&o)for(const r of ro)o[r]&&(n=r);return n||(n=ke(t.theme||"tooltip","placement")),n}function po(t,o,n){let r;const i=typeof o;return i==="string"?r={content:o}:o&&i==="object"?r=o:r={content:!1},r.placement=wr(r,n),r.targetNodes=()=>[t],r.referenceNode=()=>t,r}let Ie,Ce,xr=0;function br(){if(Ie)return;Ce=e.ref([]),Ie=e.createApp({name:"VTooltipDirectiveApp",setup(){return{directives:Ce}},render(){return this.directives.map(o=>e.h(vr,{...o.options,shown:o.shown||o.options.shown,key:o.id}))},devtools:{hide:!0}});const t=document.createElement("div");document.body.appendChild(t),Ie.mount(t)}function kr(t,o,n){br();const r=e.ref(po(t,o,n)),i=e.ref(!1),s={id:xr++,options:r,shown:i};return Ce.value.push(s),t.classList&&t.classList.add(co),t.$_popper={options:r,item:s,show(){i.value=!0},hide(){i.value=!1}}}function fo(t){if(t.$_popper){const o=Ce.value.indexOf(t.$_popper.item);o!==-1&&Ce.value.splice(o,1),delete t.$_popper,delete t.$_popperOldShown,delete t.$_popperMountTarget}t.classList&&t.classList.remove(co)}function Nt(t,{value:o,modifiers:n}){const r=po(t,o,n);if(!r.content||ke(r.theme||"tooltip","disabled"))fo(t);else{let i;t.$_popper?(i=t.$_popper,i.options.value=r):i=kr(t,o,n),typeof o.shown<"u"&&o.shown!==t.$_popperOldShown&&(t.$_popperOldShown=o.shown,o.shown?i.show():i.hide())}}const Cr={beforeMount:Nt,updated:Nt,beforeUnmount(t){fo(t)}};function Vt(t){t.addEventListener("mousedown",Ve),t.addEventListener("click",Ve),t.addEventListener("touchstart",mo,le?{passive:!0}:!1)}function Pt(t){t.removeEventListener("mousedown",Ve),t.removeEventListener("click",Ve),t.removeEventListener("touchstart",mo),t.removeEventListener("touchend",yo),t.removeEventListener("touchcancel",ho)}function Ve(t){const o=t.currentTarget;t.closePopover=!o.$_vclosepopover_touch,t.closeAllPopover=o.$_closePopoverModifiers&&!!o.$_closePopoverModifiers.all}function mo(t){if(t.changedTouches.length===1){const o=t.currentTarget;o.$_vclosepopover_touch=!0;const n=t.changedTouches[0];o.$_vclosepopover_touchPoint=n,o.addEventListener("touchend",yo),o.addEventListener("touchcancel",ho)}}function yo(t){const o=t.currentTarget;if(o.$_vclosepopover_touch=!1,t.changedTouches.length===1){const n=t.changedTouches[0],r=o.$_vclosepopover_touchPoint;t.closePopover=Math.abs(n.screenY-r.screenY)<20&&Math.abs(n.screenX-r.screenX)<20,t.closeAllPopover=o.$_closePopoverModifiers&&!!o.$_closePopoverModifiers.all}}function ho(t){const o=t.currentTarget;o.$_vclosepopover_touch=!1}const $r={beforeMount(t,{value:o,modifiers:n}){t.$_closePopoverModifiers=n,(typeof o>"u"||o)&&Vt(t)},updated(t,{value:o,oldValue:n,modifiers:r}){t.$_closePopoverModifiers=r,o!==n&&(typeof o>"u"||o?Vt(t):Pt(t))},beforeUnmount(t){Pt(t)}};function Br(t,o={}){t.$_vTooltipInstalled||(t.$_vTooltipInstalled=!0,oo(I,o),t.directive("tooltip",Cr),t.directive("close-popper",$r),t.component("VTooltip",fr),t.component("VDropdown",dr),t.component("VMenu",pr))}const _r={version:"5.2.2",install:Br,options:I},Sr="c3fd21c9-c91a-4c66-baa5-c3e050c2cc74",Et="2026-10-13T14:00:00.000Z",Ar="69756c6a-cd47-41ef-a9c3-faa0b1aeb4a1",We="https://i.allsvgicons.com/lucide",ie={marketplace:"https://svgl.app/library/mercado-libre.svg",support:`${We}/headphones.svg`,chat:`${We}/message-circle.svg`,cancel:`${We}/x.svg`},ce={logo:ie.marketplace,title:"Mercado Livre",subtitle:"Atendimento online"},de=(t,o,n)=>({logo:t,eyebrow:"MERCADO LIVRE",title:o,subtitle:n}),Tr=[{name:"name",alias:"Nome",required:!0},{name:"phone",alias:"Telefone",required:!0},{name:"email",alias:"E-mail",required:!1}],Nr=[{name:"name",alias:"Nome",required:!0},{name:"phone",alias:"Telefone",required:!0},{name:"email",alias:"E-mail",required:!1},{name:"cpf",alias:"CPF",required:!0}],pe=t=>({id:t.id,companyId:Sr,name:t.name,action:t.action,message:null,automaticMessage:null,callOnQueue:null,uraDescription:null,interactiveMessageId:null,configId:t.configId??null,queueId:null,redirectQueue:null,redirectRuleId:null,questionnaire:null,webhook:null,isRoot:!1,redirectDefault:!1,redirectTimeout:60,delay:null,disableTyping:!1,settings:t.settings??null,archivedAt:null,autoTagEnabled:!1,autoTagIds:[],createdAt:Et,updatedAt:Et}),me=(t,o)=>({id:t,nextRuleId:o}),zt=pe({id:"a1111111-1111-4111-8111-111111111105",name:"Falar com atendente",action:"service",settings:{header:ce,body:de(ie.chat,"Falar com atendente","Conte o que você precisa e vamos te ajudar."),features:{sendMessage:!0,sendAttachment:!0},behavior:"chat"}}),Lt=pe({id:"a1111111-1111-4111-8111-111111111101",name:"Consultar meu plano",action:"service",settings:{header:ce,body:de(ie.support,"Consultar meu plano","Vamos te ajudar a entender o seu plano."),features:{sendMessage:!0,sendAttachment:!0},behavior:"chat"}}),Mt=pe({id:"a1111111-1111-4111-8111-111111111106",name:"Cancelar plano",action:"service",settings:{header:ce,body:de(ie.cancel,"Cancelar plano","Vamos verificar se o plano ainda pode ser cancelado."),features:{sendMessage:!0,sendAttachment:!0},behavior:"chat"}}),je=pe({id:"b2222222-2222-4222-8222-222222222201",name:"Consultar meu plano",action:"identification",settings:{header:ce,body:de(ie.support,"Consultar meu plano","Informe seus dados para consultar o plano."),form:{fields:[...Tr]}}}),qe=pe({id:"b2222222-2222-4222-8222-222222222204",name:"Cancelar plano",action:"identification",settings:{header:ce,body:de(ie.cancel,"Cancelar plano","Informe seus dados para verificar o cancelamento."),form:{fields:[...Nr]}}}),Ye=pe({id:"d0000000-0000-4000-8000-000000000001",name:"Mercado Livre",action:"screen",configId:"37b0b2d3-6a07-4567-a5ad-7456a820905d",settings:{header:ce,body:de(ie.marketplace,"Como podemos ajudar?","Escolha uma opção para continuar.")}}),go={id:Ar,rules:[zt,je,qe,Lt,Mt,Ye],edges:{[Ye.id]:[me("aa2db433-f691-4b0e-b2f3-703eb131fcc1",zt.id),me("aa2db433-f691-4b0e-b2f3-703eb131fcc2",je.id),me("aa2db433-f691-4b0e-b2f3-703eb131fcc3",qe.id)],[je.id]:[me("cc2db433-f691-4b0e-b2f3-703eb131fcc1",Lt.id)],[qe.id]:[me("cc2db433-f691-4b0e-b2f3-703eb131fcc2",Mt.id)]}},Vr=Ye,Pr=t=>go.rules.find(o=>o.id===t),Er={configurations:{alias:"Mercado Livre",general:{defaultBehavior:"inactive",language:"pt-BR",isClosable:!0},appearance:{theme:"light",primaryColor:"#FFE600"},anchor:{label:"Fale conosco",size:"medium",logo:"https://svgl.app/library/mercado-libre.svg",position:"bottom-right",offset:{x:32,y:36}}}},zr={install:t=>{t.use(_r),t.component("AppIdentificationPage",et),t.component("AppFormTextInput",Qe),t.component("AppWidgetAnchor",tt),t.component("AppServicePage",nt),t.component("AppScreenPage",rt),t.component("AppWidgetView",it),t.component("AppTextInput",Wt),t.component("AppCarousel",Je),t.component("AppMessage",ot),t.component("AppWidget",jt),t.component("AppButton",J),t.component("AppGroup",U),t.component("AppIcon",M),t.component("AppText",V)}};exports.AppButton=J;exports.AppCarousel=Je;exports.AppFormTextInput=Qe;exports.AppGroup=U;exports.AppIcon=M;exports.AppIdentificationPage=et;exports.AppMessage=ot;exports.AppScreenPage=rt;exports.AppServicePage=nt;exports.AppText=V;exports.AppTextInput=Wt;exports.AppWidget=jt;exports.AppWidgetAnchor=tt;exports.AppWidgetView=it;exports.default=zr;exports.demoRootRule=Vr;exports.demoWidgetConfig=Er;exports.demoWorkflow=go;exports.findDemoRuleById=Pr;exports.useAppWidget=ue;exports.useServiceChatBehavior=Ot;exports.useServicePage=Ht;exports.useServiceVoiceBehavior=Rt;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");function bo(){return{maskPhone:i=>{if(!i)return"";let s=i.replace(/\D/g,"");return s.length<=4?s:(s.startsWith("0")&&!s.startsWith("0800")&&s.length>3&&(s=s.replace(/^0+/,"")),s.startsWith("0800")?s.length>11?s:s.replace(/(0800)(\d{0,3})(\d{0,4})/,(a,l,u,c)=>[l,u,c].filter(Boolean).join(" ")):s.length>11?s:s.length<=8?s.replace(/(\d{4})(\d{0,4})/,"$1-$2").replace(/-$/,""):s.length===9?s.replace(/(\d{5})(\d{0,4})/,"$1-$2"):s.length===10?s.replace(/(\d{2})(\d{0,4})(\d{0,4})/,"($1) $2-$3").replace(/-$/,""):s.replace(/(\d{2})(\d{0,5})(\d{0,4})/,"($1) $2-$3").replace(/-$/,""))},maskCnpj:i=>{const s=i.toUpperCase().replace(/[^0-9A-Z]/g,"");let a="";for(const l of s){if(a.length>=14)break;(a.length<12||/\d/.test(l))&&(a+=l)}return a.replace(/^([0-9A-Z]{2})([0-9A-Z])/,"$1.$2").replace(/^([0-9A-Z]{2})\.([0-9A-Z]{3})([0-9A-Z])/,"$1.$2.$3").replace(/^([0-9A-Z]{2})\.([0-9A-Z]{3})\.([0-9A-Z]{3})([0-9A-Z])/,"$1.$2.$3/$4").replace(/^([0-9A-Z]{2})\.([0-9A-Z]{3})\.([0-9A-Z]{3})\/([0-9A-Z]{4})(\d)/,"$1.$2.$3/$4-$5")},maskCep:i=>i.replace(/\D/g,"").slice(0,8).replace(/^(\d{5})(\d)/,"$1-$2"),maskCpf:i=>i.replace(/\D/g,"").slice(0,11).replace(/^(\d{3})(\d)/,"$1.$2").replace(/^(\d{3})\.(\d{3})(\d)/,"$1.$2.$3").replace(/^(\d{3})\.(\d{3})\.(\d{3})(\d)/,"$1.$2.$3-$4")}}function Ht(){return{}}const He=e.ref([]),ko=e.ref(""),Co=e.ref(!1),$o=e.ref(!1),Bo=e.ref(!1);function Ft(){return{isErrorLoadingMessages:Co,isLoadingMessages:$o,isSendingMessage:Bo,messages:He,text:ko,setMessages:n=>{He.value=[...n]},addMessage:n=>{He.value.push(n)}}}function Dt(){const t=Ft(),o=Ht();return{chat:t,voice:o}}const fe=e.ref([]),Fe=e.ref(void 0),te=e.ref(void 0),ue=()=>{const t=p=>{const v=new Set(Object.values(p.edges??{}).flatMap(w=>w.map(g=>g.nextRuleId)));return p.rules.find(w=>!v.has(w.id))??p.rules[0]},o=(p,v)=>{const w=new Map(p.rules.map(g=>[g.id,g]));return(p.edges[v]??[]).flatMap(g=>{const d=w.get(g.nextRuleId);return d?[d]:[]})},n=e.computed(()=>new Map((te.value?.rules??[]).map(p=>[p.id,p]))),r=e.computed(()=>te.value?t(te.value):void 0),i=e.computed(()=>{const p=Fe.value;return p&&n.value.get(p)||r.value}),s=e.computed(()=>!te.value||!i.value?[]:o(te.value,i.value.id)),a=Dt();return{currentRuleId:Fe,currentRule:i,rootRule:r,workflow:te,history:fe,edges:s,setCurrentRuleId:p=>{Fe.value=p},clearHistory:()=>{fe.value=[]},setWorkflow:p=>{te.value=p},pushHistory:p=>{fe.value.push(p)},setHistory:p=>{fe.value=[...p]},popHistory:()=>fe.value.pop(),...a}},se=t=>t==="name",pt=t=>!!t?.trim(),_o=t=>{const o=t.filter(r=>se(r.name)),n=t.filter(r=>!se(r.name));return[...o,...n]};function So(t,o){const{maskPhone:n,maskCpf:r}=bo(),{history:i}=ue(),s=e.ref(0),a=e.ref("forward"),l=e.ref(null),u=e.computed(()=>{const k=e.toValue(t),T=k.settings?.form&&k.settings.form.fields||[];return _o(T)}),c=e.reactive(Object.fromEntries(u.value.map(k=>[k.name,""]))),h=e.computed(()=>u.value[s.value]),y=e.computed(()=>s.value>=u.value.length-1),f=e.computed(()=>i.value.length>0||s.value>0),p=e.computed(()=>a.value==="back"?"step-back":"step-forward");e.watch(s,async()=>{await e.nextTick();const k=l.value;if(!k)return;(k.querySelector(".is-active input")??k.querySelector("input"))?.focus({preventScroll:!0})});const v=e.computed(()=>u.value.every(k=>!k.required||pt(c[k.name]))),w=k=>{const T=u.value[k];return T?T.required&&!pt(c[T.name])?!1:k>=u.value.length-1?v.value:!0:v.value},g=e.computed(()=>w(s.value)),d=e.computed(()=>{const k=u.value.find(T=>se(T.name));return k?c[k.name]?.trim().split(/\s+/)[0]??"":""}),m=k=>{const T=u.value[k],E=d.value,R=u.value.length?`Passo ${k+1} de ${u.value.length}`:"",z=e.toValue(t),M=k>=u.value.length-1;if(!T)return{eyebrow:R,title:z.settings?.body?.title??"",subtitle:z.settings?.body?.subtitle??""};if(se(T.name))return{eyebrow:R,title:"Como podemos te chamar?",subtitle:"Primeiro, nos diga o seu nome."};const O=M?E?`Quase lá, ${E}.`:"Quase lá.":E?`Olá, ${E}.`:"Olá.",W=T.required?`Informe seu ${T.alias} para continuar.`:`Gostaria de deixar seu ${T.alias}?`;return{eyebrow:R,title:O,subtitle:W}},b=e.computed(()=>m(s.value)),B=k=>k==="email"?"email":k==="phone"?"tel":"text",_=k=>k==="email"?"email":k==="phone"?"call":se(k)?"person":k==="order"?"receipt":"badge",C=k=>k.required?`${k.alias} *`:k.alias,x=k=>se(k.name)?"Seu nome":k.name==="phone"?"Seu telefone":k.name==="email"?"Seu e-mail":k.name==="cpf"?"000.000.000-00":k.alias,$=k=>{if(k==="phone")return n;if(k==="cpf")return r},N=()=>{v.value&&o("submit",{...c})};return{stepTransition:p,currentField:h,canContinue:g,currentStep:s,isLastStep:y,stepIntro:b,fieldHost:l,showBack:f,fields:u,form:c,continueStep:()=>{if(g.value){if(y.value||u.value.length===0)return N();a.value="forward",s.value+=1}},canContinueAt:w,introFor:m,fieldLabel:C,fieldPlaceholder:x,fieldType:B,fieldMask:$,fieldIcon:_,goBack:()=>{if(s.value>0){a.value="back",s.value-=1;return}o("back")}}}function It(t){const o=e.computed(()=>t.small?"!yu-h-8 !yu-min-h-[2rem]":"!yu-h-12 !yu-min-h-[3rem]"),n=e.computed(()=>"!yu-text-xs"),r=e.computed(()=>t.fluid?"!yu-w-full":"yu-w-fit");return{height:o,textSize:n,width:r}}function Ao(t,o){const n=e.computed(()=>({"!yu-font-plus":o.plus,"!yu-font-inter":o.inter,"!yu-font-titillium":o.titillium,"!yu-font-mono":o.mono})),r=e.computed(()=>({"!yu-text-white":o.white,"!yu-text-primary":o.primary,"!yu-text-secondary":o.secondary,"!yu-text-base":o.neutral,"!yu-text-neutral dark:!yu-text-neutral-200":o.gray})),i=e.computed(()=>({"!yu-font-thin":o.thin,"!yu-font-extralight":o.extralight,"!yu-font-light":o.light,"!yu-font-normal":o.normal,"!yu-font-medium":o.medium,"!yu-font-semibold":o.semibold,"!yu-font-bold":o.bold,"!yu-font-extrabold":o.extrabold,"!yu-font-black":o.black})),s=e.computed(()=>({...{title:{"!yu-text-xl":o.small,"!yu-text-2xl":o.base,"!yu-text-3xl":o.large,"!yu-text-4xl":o.extraLarge},subtitle:{"!yu-text-sm":o.small,"!yu-text-md":o.base,"!yu-text-xl":o.large},text:{"!yu-text-xxs":o.extraSmall,"!yu-text-xs":o.small,"!yu-text-sm":o.base,"!yu-text-lg":o.large,"!yu-text-2xl":o.extraLarge}}[t]}));return{fontClass:n,colorClass:r,weightClass:i,sizeClass:s}}const To=e.defineComponent({__name:"app-text",props:{extraSmall:{type:Boolean},inter:{type:Boolean},plus:{type:Boolean},titillium:{type:Boolean},mono:{type:Boolean},small:{type:Boolean},base:{type:Boolean},large:{type:Boolean},extraLarge:{type:Boolean},thin:{type:Boolean},extralight:{type:Boolean},light:{type:Boolean},normal:{type:Boolean},medium:{type:Boolean},semibold:{type:Boolean},bold:{type:Boolean},extrabold:{type:Boolean},black:{type:Boolean},primary:{type:Boolean},secondary:{type:Boolean},gray:{type:Boolean},neutral:{type:Boolean},white:{type:Boolean}},setup(t){const o=t,{fontClass:n,colorClass:r,weightClass:i,sizeClass:s}=Ao("text",o);return(a,l)=>(e.openBlock(),e.createElementBlock("p",{class:e.normalizeClass(["yu-font-primary yu-text-sm yu-font-normal yu-text-gray-900 dark:yu-text-neutral-100",[e.unref(n),e.unref(r),e.unref(i),e.unref(s)]])},[e.renderSlot(a.$slots,"default",{},void 0,!0)],2))}}),Pe=(t,o)=>{const n=t.__vccOpts||t;for(const[r,i]of o)n[r]=i;return n},V=Pe(To,[["__scopeId","data-v-030e2417"]]),j=e.defineComponent({__name:"app-group",props:{fit:{type:Boolean},full:{type:Boolean},row:{type:Boolean},col:{type:Boolean},gapNone:{type:Boolean},gapXs:{type:Boolean},gapBase:{type:Boolean},gapSm:{type:Boolean},gapMd:{type:Boolean},gapLg:{type:Boolean},wrap:{type:Boolean},paddingNone:{type:Boolean},paddingBase:{type:Boolean},paddingXs:{type:Boolean},paddingSm:{type:Boolean},paddingMd:{type:Boolean},paddingLg:{type:Boolean},center:{type:Boolean},justifyEnd:{type:Boolean},centerBetween:{type:Boolean},border:{type:Boolean},borderPrimary:{type:Boolean},rounded:{type:Boolean},roundedTop:{type:Boolean},roundedBottom:{type:Boolean},bgPrimary:{type:Boolean},bgWhite:{type:Boolean},divisor:{type:Boolean}},setup(t){const o=t,n=e.computed(()=>o.fit?"yu-w-fit yu-h-fit":o.full?"yu-w-full yu-h-full":""),r=e.computed(()=>o.justifyEnd?"yu-items-end yu-justify-end":o.center?"yu-items-center yu-justify-center":o.centerBetween?"yu-items-center yu-justify-between":""),i=e.computed(()=>o.row?"yu-flex-row":o.col?"yu-flex-col":"yu-flex-row"),s=e.computed(()=>o.gapBase?"yu-gap-4":o.gapXs?"yu-gap-1":o.gapSm?"yu-gap-2":o.gapMd?"yu-gap-6":o.gapLg?"yu-gap-8":o.gapNone?"yu-gap-0":"yu-gap-4"),a=e.computed(()=>o.wrap?"yu-flex-wrap":""),l=e.computed(()=>o.paddingXs?"yu-p-1":o.paddingSm?"yu-p-2":o.paddingBase?"yu-p-4":o.paddingMd?"yu-p-6":o.paddingLg?"yu-p-8":""),u=e.computed(()=>o.border?"yu-border":o.borderPrimary?"yu-border yu-border-primary":""),c=e.computed(()=>o.rounded?"yu-rounded-md":o.roundedTop?"yu-rounded-t-md":o.roundedBottom?"yu-rounded-b-md":""),h=e.computed(()=>o.bgPrimary?"yu-bg-primary":o.bgWhite?"yu-bg-white":""),y=e.computed(()=>o.divisor&&o.col?"yu-divide-y":o.divisor&&o.row?"yu-divide-x":""),f=e.computed(()=>[i.value,s.value,a.value,l.value,r.value,u.value,c.value,h.value,n.value,y.value]);return(p,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yu-flex",f.value])},[e.renderSlot(p.$slots,"default")],2))}}),No={class:"yu-flex yu-flex-col yu-items-stretch yu-w-full yu-cursor-text yu-gap-1","data-testid":"app-form-text-input"},Vo=["value","type","placeholder","disabled","maxlength","aria-invalid"],Je=e.defineComponent({__name:"app-form-text-input",props:{modelValue:{default:""},type:{default:"text"},placeholder:{},maxLength:{},disabled:{type:Boolean},invalid:{type:Boolean},valid:{type:Boolean},fluid:{type:Boolean},maskFunction:{}},emits:["update:modelValue","keyup-enter"],setup(t,{expose:o,emit:n}){const r=t,i=n,s=e.computed(()=>e.useSlots());function a(g){return!!s.value[g]}const l=e.ref(""),u=e.ref(!1);function c(g){if(!r.maskFunction)return g;try{const d=r.maskFunction(g);return typeof d=="string"?d:g}catch{return g}}e.watch(()=>r.modelValue,g=>{if(g==null){l.value="";return}l.value=r.maskFunction?c(g):g},{immediate:!0});const{width:h}=It(r),y=e.computed(()=>r.invalid?"yu-text-red-500":r.valid?"yu-text-green-500":""),f=e.computed(()=>r.invalid?"yu-text-red-600 placeholder:yu-text-red-300 placeholder:yu-font-medium":r.valid?"yu-text-green-700 placeholder:yu-font-medium":"yu-text-gray-900 placeholder:yu-text-gray-400 placeholder:yu-font-medium dark:yu-text-neutral-100 dark:placeholder:yu-text-neutral-500"),p=e.computed(()=>r.invalid?"yu-text-red-500":r.valid?"yu-text-green-500":"yu-text-gray-500"),v=e.computed(()=>r.disabled?"yu-opacity-50 yu-pointer-events-none":"");function w(g){const m=g.target.value;l.value=r.maskFunction?c(m):m,i("update:modelValue",l.value)}return o({focus:u,content:l}),(g,d)=>(e.openBlock(),e.createBlock(j,{class:e.normalizeClass([e.unref(h),v.value]),col:"","gap-none":""},{default:e.withCtx(()=>[e.createElementVNode("label",No,[a("default")?(e.openBlock(),e.createBlock(V,{key:0,small:"",gray:"",class:e.normalizeClass([y.value])},{default:e.withCtx(()=>[e.renderSlot(g.$slots,"default")]),_:3},8,["class"])):e.createCommentVNode("",!0),e.createElementVNode("input",{class:e.normalizeClass(["yu-w-full yu-bg-transparent yu-border-0 yu-outline-none yu-p-0 yu-m-0 yu-appearance-none yu-font-primary yu-text-2xl yu-leading-tight yu-caret-gray-900 dark:yu-caret-white",[f.value]]),value:l.value,type:t.type,placeholder:t.placeholder,disabled:t.disabled,maxlength:t.maxLength,"aria-invalid":t.invalid?!0:void 0,onInput:w,onFocus:d[0]||(d[0]=m=>u.value=!0),onBlur:d[1]||(d[1]=m=>u.value=!1),onKeyup:d[2]||(d[2]=e.withKeys(m=>i("keyup-enter"),["enter"]))},null,42,Vo)]),a("feedback")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["yu-mt-1",[p.value]])},[e.renderSlot(g.$slots,"feedback")],2)):e.createCommentVNode("",!0)]),_:3},8,["class"]))}});function Eo(t){const o=e.computed(()=>t.small?"!yu-h-8 !yu-min-h-[2rem]":""),n=e.computed(()=>"!yu-text-xs"),r=e.computed(()=>t.small?"yu-px-[0.625rem]":"yu-p-[0.9rem]"),i=e.computed(()=>t.fluid?"!yu-w-full":"yu-w-fit");return{height:o,textSize:n,padding:r,width:i}}const L=e.defineComponent({__name:"app-icon",props:{small:Boolean,large:Boolean,extraLarge:Boolean,gray:Boolean,base:Boolean,light:Boolean,dark:Boolean,outlined:Boolean},setup(t){const o=t,n=e.computed(()=>o.small?"!yu-text-xs yu-w-4 yu-h-4":o.large?"!yu-text-2xl yu-w-8 yu-h-8":o.extraLarge?"!yu-text-4xl yu-w-10 yu-h-10":"!yu-text-base yu-w-6 yu-h-6"),r=e.computed(()=>o.dark?"yu-text-neutral-800 dark:yu-text-white":o.light?"yu-text-white dark:yu-text-neutral-800":o.gray?"yu-text-gray-500 dark:yu-text-neutral-400":""),i=e.computed(()=>o.outlined?"material-symbols-outlined":"material-icons");return(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["notranslate yu-flex yu-items-center yu-justify-center yu-text-center",[n.value,r.value,i.value]]),"data-testid":"app-icon"},[e.renderSlot(s.$slots,"default")],2))}}),Po=["disabled"],zo={class:"yu-flex yu-items-center yu-justify-center yu-gap-2"},X=e.defineComponent({__name:"app-button",props:{small:Boolean,soft:Boolean,outline:Boolean,ghost:Boolean,link:Boolean,round:Boolean,icon:Boolean,fluid:Boolean,disabled:Boolean,loading:Boolean,alert:Boolean,warning:Boolean,success:Boolean,block:Boolean},emits:["click"],setup(t){const o=t,n=e.computed(()=>e.useSlots());function r(p){return!!n.value[p]}const{height:i,textSize:s,padding:a,width:l}=Eo(o),u=e.computed(()=>o.soft?"yu-bg-primary-50 !yu-text-primary-400":o.alert?"yu-bg-red-500 !yu-text-white":o.warning?"yu-bg-amber-500 !yu-text-white":o.success?"yu-bg-green-500 !yu-text-white":o.outline?"yu-bg-transparent !yu-border-gray-200 hover:!yu-bg-gray-100 hover:!yu-border-gray-300 dark:!yu-border-neutral-600 dark:hover:!yu-bg-neutral-700 dark:hover:!yu-border-neutral-500 dark:!yu-text-neutral-100":o.ghost?"yu-bg-transparent !yu-text-gray-700 hover:!yu-bg-gray-100 dark:!yu-text-neutral-200 dark:hover:!yu-bg-neutral-700":o.link?"yu-bg-transparent !yu-text-blue-600 hover:yu-underline":"yu-bg-primary-500 !yu-text-[var(--yu-primary-fg)]"),c=e.computed(()=>o.block?"yu-rounded-none":o.round?"yu-rounded-full":"yu-rounded-lg"),h=e.computed(()=>o.icon&&o.small?"!yu-w-8 !yu-h-8 yu-p-0":o.icon?"!yu-w-11 !yu-h-11 yu-p-0":a.value),y=e.computed(()=>o.icon?"yu-justify-center":"yu-justify-between"),f=e.computed(()=>o.disabled||o.loading?"yu-opacity-50 yu-pointer-events-none":"");return(p,v)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["yu-inline-flex yu-items-center yu-gap-2 yu-cursor-pointer yu-transition-all yu-border yu-border-transparent disabled:yu-opacity-50 disabled:yu-pointer-events-none hover:yu-opacity-80 focus:yu-outline-hidden focus:yu-opacity-80",[e.unref(s),u.value,c.value,e.unref(l),e.unref(i),f.value,h.value,y.value]]),type:"button",disabled:t.disabled||t.loading,"data-testid":"app-button",onClick:v[0]||(v[0]=w=>p.$emit("click",w))},[e.createElementVNode("div",zo,[t.loading?(e.openBlock(),e.createBlock(L,{key:0,class:"yu-animate-spin yu-flex yu-items-center yu-justify-center",small:"",outlined:""},{default:e.withCtx(()=>[...v[1]||(v[1]=[e.createTextVNode("progress_activity",-1)])]),_:1})):r("icon")?(e.openBlock(),e.createBlock(L,{key:1,small:""},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"icon")]),_:3})):e.createCommentVNode("",!0),!t.loading&&r("default")?(e.openBlock(),e.createBlock(V,{key:2,class:"!yu-text-inherit",small:""},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"default")]),_:3})):e.createCommentVNode("",!0)]),!t.loading&&r("trailing")?(e.openBlock(),e.createBlock(L,{key:0,small:""},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"trailing")]),_:3})):e.createCommentVNode("",!0)],10,Po))}}),Lo=["aria-hidden"],Mo=e.defineComponent({__name:"app-carousel",props:{modelValue:{default:0},vertical:{type:Boolean},fill:{type:Boolean}},emits:["update:modelValue"],setup(t,{expose:o,emit:n}){const r=t,i=n,s=e.useSlots(),a=e.ref(null),l=e.ref(null),u=e.ref(0),c=e.ref(0),h=e.ref(!1);let y=null;const f=e.computed(()=>Math.max(r.modelValue,0)),p=()=>(s.default?.()??[]).flatMap(x=>x.type===e.Comment||x.type===e.Text?[]:x.type===e.Fragment?(x.children??[]).filter($=>!!$&&typeof $=="object"&&$.type!==e.Comment&&$.type!==e.Text):[x]),v=x=>{const $=Math.abs(x-f.value);return $===0?"is-active":$===1?"is-adjacent":"is-far"},w=x=>{const $=l.value?.childElementCount||p().length,N=Math.min(Math.max(x,0),Math.max($-1,0));N!==r.modelValue&&i("update:modelValue",N)},g=()=>{const x=a.value;x&&(x.scrollLeft&&(x.scrollLeft=0),x.scrollTop&&(x.scrollTop=0))},d=()=>{const x=a.value,$=l.value;if(!x||!$)return;g();const N=[...$.children],A=parseFloat(getComputedStyle($).gap)||0,P=parseFloat(getComputedStyle(x).scrollPaddingTop)||0,k=z=>r.vertical?z.offsetHeight:z.offsetWidth,T=N[f.value]?k(N[f.value]):0,E=r.vertical&&r.fill?Math.max((x.clientHeight-T)/2,0):P,R=N.slice(0,f.value).reduce((z,M)=>z+k(M)+A,0);u.value=E-R,c.value=r.vertical&&!r.fill?T+P*2:0,h.value=!0},m=()=>{y?.disconnect();const x=a.value,$=l.value;if(!(!x||!$)&&(d(),!(typeof ResizeObserver>"u"))){if(y=new ResizeObserver(d),y.observe(x),r.vertical)for(const N of $.children)y.observe(N);x.removeEventListener("scroll",g),x.addEventListener("scroll",g,{passive:!0})}},b=e.computed(()=>[r.vertical?"yu-carousel--vertical":"yu-carousel--horizontal",{"is-ready":h.value,"yu-carousel--fill":r.fill}]),B=e.computed(()=>r.vertical?"yu-flex-col yu-items-stretch":"yu-flex-row yu-items-center"),_=e.computed(()=>{if(!(!r.vertical||r.fill||!c.value))return{height:`${c.value}px`}}),C=e.computed(()=>{const x=`${u.value}px`;return{transform:r.vertical?`translate3d(0, ${x}, 0)`:`translate3d(${x}, 0, 0)`}});return e.watch(()=>[r.vertical,r.fill,r.modelValue],async()=>{await e.nextTick(),m()}),e.onMounted(async()=>{await e.nextTick(),m()}),e.onBeforeUnmount(()=>{y?.disconnect(),a.value?.removeEventListener("scroll",g)}),o({next:()=>w(f.value+1),prev:()=>w(f.value-1),goTo:w}),(x,$)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yu-relative yu-w-full yu-overflow-hidden",b.value]),ref_key:"rootRef",ref:a,"data-testid":"app-carousel",style:e.normalizeStyle(_.value)},[e.createElementVNode("div",{class:e.normalizeClass(["yu-carousel-track yu-flex",B.value]),ref_key:"trackRef",ref:l,style:e.normalizeStyle(C.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p(),(N,A)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yu-carousel-slide",v(A)]),key:N.key??A,"aria-hidden":A!==f.value,"data-testid":"app-carousel-slide"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N)))],10,Lo))),128))],6)],6))}}),et=Pe(Mo,[["__scopeId","data-v-c6006063"]]),Ro={class:"yu-flex yu-flex-col yu-w-full yu-h-full"},Oo={class:"yu-relative yu-flex yu-items-center yu-w-full yu-shrink-0"},Ho={class:"yu-flex yu-shrink-0 yu-items-center yu-w-fit yu-justify-center yu-px-6 yu-py-4"},Fo={class:"yu-absolute yu-inset-0 yu-flex yu-items-center yu-justify-center yu-pointer-events-none"},Do={class:"yu-flex yu-items-center yu-gap-1.5"},tt=e.defineComponent({__name:"app-identification-page",props:{rule:{},edges:{}},emits:["submit","back"],setup(t,{emit:o}){const n=t,r=o,{currentStep:i,fieldHost:s,showBack:a,fields:l,form:u,continueStep:c,canContinueAt:h,introFor:y,fieldPlaceholder:f,fieldType:p,fieldMask:v,goBack:w}=So(()=>n.rule,r);return(g,d)=>(e.openBlock(),e.createElementBlock("div",Ro,[e.createElementVNode("div",Oo,[e.createElementVNode("div",Ho,[e.createElementVNode("div",{class:e.normalizeClass(["yu-flex yu-items-center yu-w-fit yu-justify-center yu-cursor-pointer yu-group",{"yu-invisible yu-pointer-events-none":!e.unref(a)}]),onClick:d[0]||(d[0]=(...m)=>e.unref(w)&&e.unref(w)(...m))},[e.createVNode(L,{class:"yu-transition-colors group-hover:!yu-text-gray-700 dark:group-hover:!yu-text-neutral-200",small:"",gray:""},{default:e.withCtx(()=>[...d[2]||(d[2]=[e.createTextVNode("chevron_left",-1)])]),_:1}),e.createVNode(V,{class:"yu-transition-colors group-hover:!yu-text-gray-700 dark:group-hover:!yu-text-neutral-200","extra-small":"",medium:"",gray:""},{default:e.withCtx(()=>[...d[3]||(d[3]=[e.createTextVNode("Voltar",-1)])]),_:1})],2)]),e.createElementVNode("div",Fo,[e.createElementVNode("div",Do,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(m,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yu-h-1 yu-w-6 yu-rounded-full yu-transition-colors",b<=e.unref(i)?"yu-bg-gray-900 dark:yu-bg-white":"yu-bg-gray-200 dark:yu-bg-neutral-600"]),key:b},null,2))),128))])])]),e.createElementVNode("div",{class:"yu-flex-1 yu-min-h-0 yu-w-full yu-px-6 yu-pb-12",ref_key:"fieldHost",ref:s},[e.createVNode(et,{class:"yu-w-full yu-h-full",modelValue:e.unref(i),"onUpdate:modelValue":d[1]||(d[1]=m=>e.isRef(i)?i.value=m:null),vertical:"",fill:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(m,b)=>(e.openBlock(),e.createBlock(j,{class:"yu-w-full yu-gap-8",key:m.name,col:"",center:""},{default:e.withCtx(()=>[e.createVNode(j,{class:"yu-w-full yu-relative yu-pr-6",col:"","gap-sm":""},{default:e.withCtx(()=>[e.unref(y)(b).title?(e.openBlock(),e.createBlock(V,{key:0,class:"yu-text-left","extra-large":"",semibold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(y)(b).title),1)]),_:2},1024)):e.createCommentVNode("",!0),e.unref(y)(b).subtitle?(e.openBlock(),e.createBlock(V,{key:1,class:"yu-text-left",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(y)(b).subtitle),1)]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(V,{class:"yu-opacity-50 yu-absolute -yu-top-2 yu-right-0",gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b+1),1)]),_:2},1024)]),_:2},1024),e.createVNode(j,{class:"yu-w-full yu-items-center",col:"","gap-md":""},{default:e.withCtx(()=>[e.createVNode(Je,{modelValue:e.unref(u)[m.name],"onUpdate:modelValue":B=>e.unref(u)[m.name]=B,"mask-function":e.unref(v)(m.name),placeholder:e.unref(f)(m),type:e.unref(p)(m.name),onKeyupEnter:e.unref(c),fluid:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.alias),1)]),_:2},1032,["modelValue","onUpdate:modelValue","mask-function","placeholder","type","onKeyupEnter"]),e.createVNode(X,{fluid:"",disabled:!e.unref(h)(b),onClick:e.unref(c)},{trailing:e.withCtx(()=>[...d[4]||(d[4]=[e.createTextVNode("arrow_forward",-1)])]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b>=e.unref(l).length-1?"Finalizar":"Continuar"),1)]),_:2},1032,["disabled","onClick"])]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["modelValue"])],512)]))}}),Io=["disabled"],Wo=["src"],ot=e.defineComponent({__name:"app-widget-anchor",props:{small:Boolean,large:Boolean,logo:{type:String,default:""},label:{type:String,default:""},outline:Boolean,ghost:Boolean,disabled:Boolean,loading:Boolean},emits:["click"],setup(t){const o=t,n=e.computed(()=>!!o.label.trim()),r=e.computed(()=>o.outline?"yu-bg-transparent !yu-border-gray-200 hover:!yu-bg-gray-100 hover:!yu-border-gray-300":o.ghost?"yu-bg-transparent !yu-text-gray-700 hover:!yu-bg-gray-100":"yu-bg-gradient-to-br yu-from-primary-500 yu-to-secondary-500 yu-text-white"),i=e.computed(()=>n.value?o.small?"yu-h-12 yu-w-fit yu-px-3 yu-gap-2":o.large?"yu-h-16 yu-w-fit yu-px-5 yu-gap-3":"yu-h-14 yu-w-fit yu-px-4 yu-gap-2":o.small?"yu-w-12 yu-h-12 yu-p-0":o.large?"yu-w-16 yu-h-16 yu-p-0":"yu-w-14 yu-h-14 yu-p-0"),s=e.computed(()=>o.small?"yu-w-6 yu-h-6":o.large?"yu-w-8 yu-h-8":"yu-w-7 yu-h-7"),a=e.computed(()=>o.disabled||o.loading?"yu-opacity-50 yu-pointer-events-none":"");return(l,u)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["yu-rounded-full yu-inline-flex yu-items-center yu-justify-center yu-cursor-pointer yu-overflow-hidden yu-transition-all yu-border yu-border-transparent hover:yu-opacity-80 focus:yu-outline-hidden focus:yu-opacity-80 disabled:yu-opacity-50 disabled:yu-pointer-events-none",[i.value,r.value,a.value]]),type:"button","data-testid":"app-anchor",disabled:t.disabled||t.loading,onClick:u[0]||(u[0]=c=>l.$emit("click",c))},[t.loading?(e.openBlock(),e.createBlock(L,{key:0,class:"yu-animate-spin",outlined:"",large:!t.small&&!t.large,"extra-large":t.large},{default:e.withCtx(()=>[...u[1]||(u[1]=[e.createTextVNode("progress_activity",-1)])]),_:1},8,["large","extra-large"])):t.logo?(e.openBlock(),e.createElementBlock("img",{key:1,class:e.normalizeClass(["yu-object-contain yu-pointer-events-none yu-select-none yu-shrink-0",s.value]),src:t.logo,alt:"","data-testid":"app-anchor-logo"},null,10,Wo)):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createBlock(V,{key:2,class:"!yu-text-inherit yu-whitespace-nowrap",small:!t.large,"data-testid":"app-anchor-label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1},8,["small"])):e.createCommentVNode("",!0)],10,Io))}}),jo={key:0,class:"yu-flex yu-shrink-0 yu-items-end","data-testid":"app-message-avatar"},qo={key:0,class:"yu-w-full yu-flex yu-justify-end yu-h-2","data-testid":"app-message-trailing"},Se=e.defineComponent({__name:"app-message",props:{primary:Boolean,secondary:Boolean,tertiary:Boolean},setup(t){const o=t,n=e.computed(()=>e.useSlots());function r(c){return!!n.value[c]}const i=e.computed(()=>o.tertiary),s=e.computed(()=>!i.value&&o.secondary),a=e.computed(()=>!i.value&&r("avatar")),l=e.computed(()=>i.value?"yu-justify-center":s.value?"yu-flex-row-reverse":""),u=e.computed(()=>i.value?"yu-items-center yu-flex":s.value?"yu-rounded-br-none yu-bg-primary-100 yu-p-3 dark:yu-bg-primary-900":"yu-rounded-bl-none yu-bg-gray-200 yu-p-3 dark:yu-bg-neutral-700");return(c,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yu-flex yu-items-end yu-gap-2 yu-w-full",l.value]),"data-testid":"app-message"},[a.value?(e.openBlock(),e.createElementBlock("div",jo,[e.renderSlot(c.$slots,"avatar")])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["yu-rounded-md yu-relative yu-min-h-8",u.value]),"data-testid":"app-message-bubble"},[e.renderSlot(c.$slots,"default"),r("trailing")?(e.openBlock(),e.createElementBlock("div",qo,[e.renderSlot(c.$slots,"trailing")])):e.createCommentVNode("",!0)],2)],2))}}),nt=e.defineComponent({__name:"app-skeleton",props:{round:Boolean,fluid:Boolean,block:Boolean},setup(t){const o=t,n=e.computed(()=>o.fluid?"!yu-w-full":""),r=e.computed(()=>o.round?"!yu-rounded-full":o.block?"!yu-rounded-none":"!yu-rounded-lg");return(i,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yu-animate-pulse yu-bg-gray-200 dark:yu-bg-neutral-700",[r.value,n.value]])},null,2))}}),rt=e.defineComponent({__name:"app-empty",props:{error:{type:Boolean,default:!1}},emits:["refetch"],setup(t,{emit:o}){const n=o,r=e.computed(()=>e.useSlots());function i(s){return!!r.value[s]}return(s,a)=>(e.openBlock(),e.createBlock(j,{"gap-sm":"",center:"",col:""},{default:e.withCtx(()=>[t.error?(e.openBlock(),e.createBlock(L,{key:0,class:"yu-text-gray-500",large:""},{default:e.withCtx(()=>[...a[1]||(a[1]=[e.createTextVNode("error_outline",-1)])]),_:1})):i("icon")?e.renderSlot(s.$slots,"icon",{key:1}):(e.openBlock(),e.createBlock(L,{key:2,class:"yu-text-gray-500",large:""},{default:e.withCtx(()=>[...a[2]||(a[2]=[e.createTextVNode("list",-1)])]),_:1})),e.createVNode(V,{class:"yu-text-center",gray:""},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:3}),t.error?(e.openBlock(),e.createBlock(X,{key:3,onClick:a[0]||(a[0]=l=>n("refetch")),outline:"",small:"","data-testid":"refetch-button"},{icon:e.withCtx(()=>[...a[3]||(a[3]=[e.createTextVNode("refresh",-1)])]),default:e.withCtx(()=>[a[4]||(a[4]=e.createTextVNode("Tentar novamente",-1))]),_:1})):e.createCommentVNode("",!0)]),_:3}))}}),Go={class:"yu-flex yu-flex-col yu-items-center yu-h-full yu-w-full yu-overflow-hidden"},Zo={key:0,class:"yu-w-full yu-h-12"},Uo={key:0,class:"yu-flex yu-items-center yu-justify-center yu-rounded-full yu-bg-gray-100 yu-w-7 yu-h-7 dark:yu-bg-neutral-700"},Xo=["src"],Ko={key:1,class:"yu-flex yu-w-7 yu-h-7"},Yo={key:0,class:"yu-w-full yu-shrink-0 yu-border-t yu-border-gray-200 yu-flex yu-flex-col dark:yu-border-neutral-700"},Qo=["onKeydown","disabled"],Jo={class:"yu-flex yu-items-center yu-gap-2 yu-w-full yu-justify-end yu-px-6 yu-py-2"},it=e.defineComponent({__name:"app-service-page",props:{rule:{},edges:{}},emits:["send-message","retry-loading-messages"],setup(t,{emit:o}){const n=o,{history:r,chat:i}=ue(),{isErrorLoadingMessages:s,isLoadingMessages:a,isSendingMessage:l,messages:u,text:c,setMessages:h}=i,y=e.computed(()=>r.value.length>0),f=e.ref(null),p=(d=!0)=>{const m=f.value;m&&m.scrollTo({top:m.scrollHeight,behavior:d?"smooth":"auto"})},v=d=>`https://api.dicebear.com/10.x/marbles/svg?backgroundColor=&seed=${d==="operator"?"operator":"user"}`,w=()=>{n("send-message",c.value)};e.watch(()=>u.value.length,async()=>{await e.nextTick(),p()}),e.onMounted(()=>{p(!1)});const g=(d,m,b)=>m[b-1]?.from===d.from?"yu-mt-1":"yu-mt-4";return(d,m)=>(e.openBlock(),e.createElementBlock("div",Go,[e.createElementVNode("div",{class:"yu-flex yu-flex-col yu-flex-1 yu-min-h-0 yu-w-full yu-px-6 yu-overflow-y-auto",ref_key:"messagesList",ref:f,"data-testid":"app-service-messages"},[y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Zo)),e.unref(a)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},e.renderList(10,(b,B)=>e.createVNode(Se,{key:B,primary:B%2===0,secondary:B%2===1},{default:e.withCtx(()=>[e.createVNode(nt,{class:"yu-h-4 yu-w-32",block:""})]),_:1},8,["primary","secondary"])),64)):e.unref(s)?(e.openBlock(),e.createBlock(rt,{key:2,class:"yu-h-full",onRefetch:m[0]||(m[0]=b=>n("retry-loading-messages")),error:""},{default:e.withCtx(()=>[...m[2]||(m[2]=[e.createTextVNode("Ocorreu um erro ao carregar as mensagens.",-1)])]),_:1})):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(e.unref(u),(b,B)=>(e.openBlock(),e.createBlock(Se,{key:B,primary:b.from==="operator",secondary:b.from==="contact",tertiary:b.from==="system",class:e.normalizeClass([g(b,e.unref(u),B)])},e.createSlots({default:e.withCtx(()=>[b.from=="system"?(e.openBlock(),e.createBlock(V,{key:0,class:"yu-text-center",gray:"","extra-small":"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.text),1)]),_:2},1024)):(e.openBlock(),e.createBlock(V,{key:1,gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.text),1)]),_:2},1024))]),_:2},[b.from==="operator"?{name:"avatar",fn:e.withCtx(()=>[e.unref(u)[B+1]?.from!==b.from?(e.openBlock(),e.createElementBlock("div",Uo,[e.createElementVNode("img",{class:"yu-rounded-full yu-w-full yu-h-full yu-object-contain",src:v(b.from)},null,8,Xo)])):(e.openBlock(),e.createElementBlock("div",Ko))]),key:"0"}:void 0,b.from!=="system"?{name:"trailing",fn:e.withCtx(()=>[e.createVNode(V,{gray:"","extra-small":"",medium:""},{default:e.withCtx(()=>[...m[3]||(m[3]=[e.createTextVNode("12:58",-1)])]),_:1})]),key:"1"}:void 0]),1032,["primary","secondary","tertiary","class"]))),128)),m[4]||(m[4]=e.createElementVNode("div",{class:"yu-w-full yu-min-h-8"},null,-1))],512),!e.unref(a)&&!e.unref(s)?(e.openBlock(),e.createElementBlock("div",Yo,[e.withDirectives(e.createElementVNode("textarea",{class:"yu-w-full yu-p-6 yu-resize-none yu-font-primary yu-text-xs yu-bg-transparent yu-text-gray-900 placeholder:yu-text-neutral placeholder:yu-text-xs placeholder:yu-font-normal focus:yu-outline-none dark:yu-text-neutral-100 [&:disabled]:yu-opacity-50","onUpdate:modelValue":m[1]||(m[1]=b=>e.isRef(c)?c.value=b:null),onKeydown:e.withKeys(e.withModifiers(w,["exact","prevent"]),["enter"]),placeholder:"Escreva uma mensagem...",disabled:e.unref(l)},null,40,Qo),[[e.vModelText,e.unref(c)]]),e.createElementVNode("div",Jo,[e.createVNode(X,{disabled:e.unref(l),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(L,{class:"yu-rotate-45"},{default:e.withCtx(()=>[...m[5]||(m[5]=[e.createTextVNode("attach_file",-1)])]),_:1})]),_:1},8,["disabled"]),e.createVNode(X,{onClick:w,loading:e.unref(l),disabled:!e.unref(c),small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(L,null,{default:e.withCtx(()=>[...m[6]||(m[6]=[e.createTextVNode("send",-1)])]),_:1})]),_:1},8,["loading","disabled"])])])):e.createCommentVNode("",!0)]))}}),en=t=>{const o=n=>n.toString(16).padStart(2,"0");return`#${o(t.r)}${o(t.g)}${o(t.b)}`},Wt=()=>{const t="#6D3595",o=i=>{const s=i.replace("#","").trim(),a=s.length===3&&/^[0-9a-fA-F]{3}$/.test(s)?`${s[0]}${s[0]}${s[1]}${s[1]}${s[2]}${s[2]}`:s;return a.length!==6||!/^[0-9a-fA-F]{6}$/.test(a)?null:{r:parseInt(a.slice(0,2),16),g:parseInt(a.slice(2,4),16),b:parseInt(a.slice(4,6),16)}};return{isLightHex:i=>{const s=o(i);return s?(s.r*299+s.g*587+s.b*114)/1e3>160:!1},normalizeHex:i=>{const s=o(i)??o(t);return s?en(s):t.toLowerCase()},parseHex:o}},tn=()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches,jt=t=>{const{isLightHex:o,normalizeHex:n,parseHex:r}=Wt(),i=(y,f)=>y==="dark"?"dark":y==="light"?"light":f?"dark":"light",s=y=>{const f=n(y),p=r(f)??{r:109,g:53,b:149},v=o(f);return{"--yu-primary":f,"--yu-primary-rgb":`${p.r} ${p.g} ${p.b}`,"--yu-primary-fg":v?"#1c1917":"#ffffff","--yu-primary-border":v?"#e5e7eb":"color-mix(in srgb, var(--yu-primary-fg) 22%, transparent)","--yu-primary-50":`color-mix(in srgb, ${f} 8%, white)`,"--yu-primary-100":`color-mix(in srgb, ${f} 22%, white)`,"--yu-primary-200":`color-mix(in srgb, ${f} 38%, white)`,"--yu-primary-300":`color-mix(in srgb, ${f} 55%, white)`,"--yu-primary-400":v?`color-mix(in srgb, ${f} 70%, black)`:`color-mix(in srgb, ${f} 78%, white)`,"--yu-primary-500":f,"--yu-primary-600":`color-mix(in srgb, ${f} 82%, black)`,"--yu-primary-700":`color-mix(in srgb, ${f} 64%, black)`,"--yu-primary-800":`color-mix(in srgb, ${f} 42%, black)`,"--yu-primary-900":`color-mix(in srgb, ${f} 22%, black)`}},a=y=>{const f=e.ref(tn()),p=e.computed(()=>i(e.toValue(y),f.value)),v=e.computed(()=>p.value==="dark"),w=e.computed(()=>v.value?"yu-dark":"");return e.onMounted(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const g=window.matchMedia("(prefers-color-scheme: dark)");f.value=g.matches;const d=m=>{f.value=m.matches};g.addEventListener("change",d),e.onBeforeUnmount(()=>g.removeEventListener("change",d))}),{isDark:v,resolvedTheme:p,themeClass:w}},{isDark:l,themeClass:u,resolvedTheme:c}=a(()=>e.toValue(t).theme),h=e.computed(()=>({...s(e.toValue(t).primaryColor),colorScheme:c.value}));return{isDark:l,themeClass:u,resolvedTheme:c,appearanceStyle:h}},on={class:"yu-flex yu-flex-col yu-w-full yu-gap-8"},nn={key:0,class:"yu-flex yu-items-center yu-w-fit yu-justify-center yu-h-0"},rn=["src"],sn={key:1,class:"yu-flex yu-flex-col yu-items-center yu-justify-start yu-gap-2 yu-px-6 yu-w-full"},an=["src"],ln=["src"],st=e.defineComponent({__name:"app-screen-page",props:{rule:{},edges:{}},emits:["edge-click"],setup(t,{emit:o}){const n=t,r=o,{history:i}=ue(),s=e.computed(()=>i.value.length>0),a=e.computed(()=>n.edges??[]),l=e.computed(()=>n.rule.settings?.body);return(u,c)=>(e.openBlock(),e.createElementBlock("div",on,[s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",nn)),e.createVNode(j,{class:"yu-px-6 yu-w-full",col:"",center:"","gap-base":""},{default:e.withCtx(()=>[l.value?.logo?(e.openBlock(),e.createElementBlock("img",{key:0,class:"yu-w-10 yu-h-10 yu-object-contain",src:l.value.logo,alt:""},null,8,rn)):e.createCommentVNode("",!0),l.value?.eyebrow?(e.openBlock(),e.createBlock(V,{key:1,class:"yu-text-center yu-uppercase yu-tracking-widest yu-leading-none","extra-small":"",gray:"",mono:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value.eyebrow),1)]),_:1})):e.createCommentVNode("",!0),l.value?.title?(e.openBlock(),e.createBlock(V,{key:2,class:"yu-text-center","extra-large":"",semibold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value.title),1)]),_:1})):e.createCommentVNode("",!0),l.value?.subtitle?(e.openBlock(),e.createBlock(V,{key:3,class:"yu-w-64 yu-text-center",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value.subtitle),1)]),_:1})):e.createCommentVNode("",!0)]),_:1}),a.value.length?(e.openBlock(),e.createElementBlock("div",sn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value.slice(0,3),h=>(e.openBlock(),e.createBlock(X,{class:"hover:yu-translate-x-1 yu-max-w-[25rem]",key:h.id,outline:"",fluid:"",onClick:y=>r("edge-click",h)},e.createSlots({trailing:e.withCtx(()=>[c[0]||(c[0]=e.createTextVNode("chevron_right",-1))]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.name),1)]),_:2},[h.settings?.body?.logo?{name:"icon",fn:e.withCtx(()=>[e.createElementVNode("img",{class:"yu-w-4 yu-h-4 yu-object-contain",src:h.settings.body.logo,alt:""},null,8,an)]),key:"0"}:void 0]),1032,["onClick"]))),128)),e.createElementVNode("div",{class:e.normalizeClass(["yu-flex yu-items-start yu-overflow-x-auto yu-w-full invisible-scrollbar yu-pt-6",{"yu-justify-start":a.value.slice(3).length>4,"yu-justify-center":a.value.slice(3).length<=4}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value.slice(3),h=>(e.openBlock(),e.createElementBlock("div",{class:"yu-flex yu-flex-col yu-items-center yu-gap-2",key:h.id},[e.createVNode(X,{outline:"",icon:"",onClick:y=>r("edge-click",h)},e.createSlots({_:2},[h.settings?.body?.logo?{name:"icon",fn:e.withCtx(()=>[e.createElementVNode("img",{class:"yu-w-5 yu-h-5 yu-object-contain",src:h.settings.body.logo,alt:""},null,8,ln)]),key:"0"}:void 0]),1032,["onClick"]),e.createVNode(V,{class:"yu-w-20 yu-text-center yu-leading-3 yu-line-clamp-2","extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.name),1)]),_:2},1024)]))),128))],2)])):e.createCommentVNode("",!0)]))}}),un="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAVCAYAAAAnzezqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAVtSURBVHgBpVVriFVVFF6Pvc+5c+/MOM2Yo2hq41tDU1EsC50pU9NySqZUDCQiCwWZSKJQGOpHZjhpomOGNkE4pBQUgUIPGAz9Of0oGS0tCpWY0dIf93nO3q1zzzn3Xh+J1oHLPfusvb/v299ea22EO3hmz35RN2XGNyimOrZYr8g0aFZ1RH49k63VbIcogrsI4S6Wb4qhToGRmHwjk5IYypoLiu0hzjrbNn77xiW8FeHS+vdrdQOtR7ZPC8FkhbZOQIDRgIxByU/A5V/GaC2zEMQxLMatxJGL8wwU1wbvEtNk+zGTncc3p7b4+LhhS1SKPhKAdbJwlPwSjGAFFFWJPCQKCYq7sxQQczAHICQ3VkUilGxXYhCtb1Aupm9wYMm9eychwy6FfrMAOEVSARRgGy40AZiNCEMhoQj5FokruWGBKubEDgQiojW/lgTMH3qgpro21y7A7RIcwmWykm2lXcuuigICkBCsTH7NEUFkfXhU5aMxESakVUD+6PiuxcpmdxBioyz+XianZdJ98j+FA9sE/FoBEAriCBgt8o3Hcq2oIqEBSVRLRfFFoWepdWzXWGXsIUDyQJn5Z/Xgyiqb3TCiALOE/G3F5jryEJhjG9HEZ2orRNhYqPyCHCjFCMPNBGMi/Epl2bwpZZNOg7d8qOGWqVj/k9WWLpE9nshnn0ClR8uiuUR2IBLys9j6kOxifAR0kcA/KmBSntDCYB1xpldio8SdExJvkflN8p6Rbz0iplHGj4gDuRzmO3HZhL0DAH6PsXZLyrEXZEIqVihkrxL6fRppTiNU7x5M/F3nopkIKvej67v7RNSElI8LTcIsVWDPofLqFeBWhYMLyW0Yw8ZPkZs/5xrdJyY847KtId+m2cFJhGZE66Ft70hP8V1GHFRUGMaoErGlQfmIkHuUhq/JGhiAS1UJ4DNSt0ll3BccNh0IOMO6djKBeUx8/XPIwIgtucaLrTXpBiw45oi4NC2ZqRruJ7wT5OSvWJ/nogsrRLhHycttQf6RWHFaiKbAVTgvifdLOZHk3BT1SiebGJxllatHir3JwB1AM7lKq8tgC1cdyF9R5B9z0esr3H1xpVidhLqgZ9haweGcylTLZlLaqD0OQX+ygGvBy7/05P796UCAOEB7FHoHsZ6/YJNbRqS3S4LVSLJ+nvTtcd+Fb0RETzVnTuXA3cWE9yvM7/Wsv9BRNAvBP02Mm4DgiuRKL7HfJPkdlR2AZyCoin5A/ztFtMu45ljrJ52b4/JXR05t6F47fedy2fk+1k5nUtFWT9usk4epvvK/lDqdIVb2ZD13dEL5n0nh73ZJr0A0r8lxDWfG88yFNcqolAh/Oej7iJnpijQFx+kmaLpGmCkDR1xa7fxR3V/Z+EqNaN3M9553yWwVu8YU7SdLHOcCweua/F4RclJihkulCRgdmYlqn+JykzuhWO86KlsKy/Lwko+3P1spgOKX7r72g57NLZIS+kAI0kylboYaTZNCfCDIBWmtFDSeiDyub1Jxb6C4xmNxIU4gRHJmx/Wt/6a34eYH3xoHpFdLpm+SnQ2N22h4sQgYhgTXdb+wQVV8q2xg0tQ+XdT97qrbEhA/Hcs7kphxnhMHXhGQCSIg6v8QVkkwrrA7uqyKIsN2W7wJAwHS17w5zd07f7sjASUhHR1UcxIXCFg7sV0sgnTZARNdMCAiDKqKS6d8kZmNzQc799wM+7YExE9bWxu3ZKctEGvbmf1FQuaWGxdAOQHLF5EIPqN0et7DXV1//W8BlU/XUx3Dqtlbr8msF7KRlW6UckaaHLC3qvnDnT/8G85/FhA/h9s6HFKZVulya6SC5Ao30l3xdym7o5C2B5p7dgzeav0/0mtgehRo/YYAAAAASUVORK5CYII=",cn={class:"yu-flex yu-flex-col yu-h-full yu-w-full yu-bg-white yu-overflow-hidden dark:yu-bg-neutral-800"},dn={class:"yu-w-full yu-shrink-0 yu-border-b yu-flex yu-items-center yu-px-4 yu-justify-between yu-gap-2 yu-bg-primary yu-h-[4.4rem] yu-text-[var(--yu-primary-fg)] yu-border-[var(--yu-primary-border)]"},pn={class:"yu-flex yu-items-center yu-gap-3 yu-min-w-0 yu-flex-1"},fn=["src"],mn={class:"yu-flex yu-flex-col yu-justify-center yu-min-w-0 yu-overflow-hidden"},yn={class:"yu-flex yu-flex-col yu-w-full yu-flex-1 yu-min-h-0"},hn={key:0,class:"yu-flex yu-shrink-0 yu-items-center yu-w-fit yu-justify-center yu-px-6 yu-py-4"},gn={class:"yu-flex yu-flex-col yu-w-full yu-flex-1 yu-min-h-0 yu-overflow-y-auto yu-gap-8"},vn={class:"yu-h-7 yu-w-full yu-shrink-0 yu-border-t yu-border-gray-200 yu-flex yu-items-center yu-justify-center yu-p-2 yu-gap-1 yu-bg-white dark:yu-border-neutral-700 dark:yu-bg-neutral-800"},wn=["src"],xn=e.defineComponent({inheritAttrs:!1,__name:"app-widget-view",props:{workflow:{},config:{},fullscreen:{type:Boolean}},emits:["send-message","retry-loading-messages","edge-click","submit","close","back"],setup(t,{emit:o}){const n=t,r=o,{history:i,currentRule:s,edges:a,setWorkflow:l}=ue(),{appearanceStyle:u,themeClass:c}=jt(()=>n.config.configurations.appearance);l(n.workflow),e.watch(()=>n.workflow,g=>l(g));const h=e.computed(()=>i.value.length>0),y=e.computed(()=>h.value&&s.value?.action!=="identification"),f=e.computed(()=>n.config.configurations.general.isClosable),p={identification:tt,service:it,screen:st},v=e.computed(()=>{const g=s.value?.action;return g&&g in p?p[g]:void 0}),w=e.computed(()=>n.fullscreen?"yu-w-screen yu-h-screen":"yu-w-[24.4rem] yu-h-[38rem] widget-shadow yu-rounded-2xl");return(g,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yunique yu-overflow-hidden yu-relative",[w.value,e.unref(c)]]),"data-testid":"app-widget-view",style:e.normalizeStyle(e.unref(u))},[e.createElementVNode("div",cn,[e.createElementVNode("div",dn,[e.createElementVNode("div",pn,[e.unref(s)?.settings?.header?.logo?(e.openBlock(),e.createElementBlock("img",{key:0,class:"yu-w-9 yu-h-9 yu-object-contain yu-rounded-lg yu-shrink-0",src:e.unref(s).settings.header.logo,alt:""},null,8,fn)):e.createCommentVNode("",!0),e.createElementVNode("div",mn,[e.unref(s)?.settings?.header?.title?(e.openBlock(),e.createBlock(V,{key:0,class:"yu-w-full yu-truncate !yu-text-inherit",bold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s).settings.header.title),1)]),_:1})):e.createCommentVNode("",!0),e.unref(s)?.settings?.header?.subtitle?(e.openBlock(),e.createBlock(V,{key:1,class:"yu-w-full yu-truncate !yu-text-inherit yu-opacity-75","extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s).settings.header.subtitle),1)]),_:1})):e.createCommentVNode("",!0)])]),f.value?(e.openBlock(),e.createBlock(X,{key:0,class:"yu-shrink-0 !yu-bg-transparent hover:!yu-bg-[color-mix(in_srgb,var(--yu-primary-fg)_12%,transparent)]",onClick:d[0]||(d[0]=m=>r("close")),"data-testid":"app-widget-close",small:"",icon:""},{default:e.withCtx(()=>[e.createVNode(L,null,{default:e.withCtx(()=>[...d[7]||(d[7]=[e.createTextVNode("close",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",yn,[e.createVNode(e.Transition,{name:"page-transition",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("div",{class:"yu-flex yu-flex-col yu-w-full yu-h-full yu-min-h-0",key:e.unref(s)?.id},[y.value?(e.openBlock(),e.createElementBlock("div",hn,[e.createElementVNode("div",{class:"yu-flex yu-items-center yu-w-fit yu-justify-center yu-cursor-pointer yu-group",onClick:d[1]||(d[1]=m=>r("back"))},[e.createVNode(L,{class:"yu-transition-colors group-hover:!yu-text-gray-700 dark:group-hover:!yu-text-neutral-200",small:"",gray:""},{default:e.withCtx(()=>[...d[8]||(d[8]=[e.createTextVNode("chevron_left",-1)])]),_:1}),e.createVNode(V,{class:"yu-transition-colors group-hover:!yu-text-gray-700 dark:group-hover:!yu-text-neutral-200","extra-small":"",medium:"",gray:""},{default:e.withCtx(()=>[...d[9]||(d[9]=[e.createTextVNode("Voltar",-1)])]),_:1})])])):e.createCommentVNode("",!0),e.createElementVNode("div",gn,[v.value&&e.unref(s)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v.value),{key:0,rule:e.unref(s),edges:e.unref(a),onSubmit:d[2]||(d[2]=m=>r("submit",m)),onBack:d[3]||(d[3]=m=>r("back")),onEdgeClick:d[4]||(d[4]=m=>r("edge-click",m)),onSendMessage:d[5]||(d[5]=m=>r("send-message",m)),onRetryLoadingMessages:d[6]||(d[6]=m=>r("retry-loading-messages"))},null,40,["rule","edges"])):e.createCommentVNode("",!0)])]))]),_:1})]),e.createElementVNode("div",vn,[e.createElementVNode("img",{class:"yu-w-3 yu-h-2",src:e.unref(un),alt:"Opens"},null,8,wn),e.createVNode(V,{class:"!yu-text-xxs",gray:""},{default:e.withCtx(()=>[...d[10]||(d[10]=[e.createTextVNode("Powered By",-1),e.createElementVNode("b",{class:"yu-ml-1"},"Opens",-1)])]),_:1})])])],6))}}),at=Pe(xn,[["__scopeId","data-v-16ec137d"]]),bn={class:"yu-flex yu-h-full yu-pl-3 yu-gap-2 yu-z-10 yu-pointer-events-none"},kn={class:"yu-h-full yu-flex yu-items-center yu-justify-center"},Cn=["value","type","disabled","maxlength"],$n={class:"yu-absolute yu-right-2 yu-z-10 yu-flex yu-items-center yu-gap-1 yu-text-gray-500"},qt=e.defineComponent({__name:"app-text-input",props:{modelValue:{default:""},type:{default:"text"},maxLength:{},disabled:{type:Boolean},loading:{type:Boolean},invalid:{type:Boolean},small:{type:Boolean},fluid:{type:Boolean},round:{type:Boolean},valid:{type:Boolean},block:{type:Boolean},maskFunction:{},passwordToggle:{type:Boolean}},emits:["update:modelValue","keyup-enter"],setup(t,{expose:o,emit:n}){const r=t,i=n,s=e.computed(()=>e.useSlots());function a(C){return!!s.value[C]}const l=e.ref(""),u=e.ref(!1),c=e.ref(!1);function h(C){if(!r.maskFunction)return C;try{const x=r.maskFunction(C);return typeof x=="string"?x:C}catch{return C}}e.watch(()=>r.modelValue,C=>{if(C==null){l.value="";return}l.value=r.maskFunction?h(C):C},{immediate:!0});function y(){return!(u.value||l.value)}const{height:f,textSize:p,width:v}=It(r),w=e.computed(()=>r.invalid?"yu-border-red-500 focus-within:yu-border-red-500":r.valid?"yu-border-green-500 focus-within:yu-border-green-500":"yu-border-gray-200 focus-within:!yu-border-primary/40 hover:yu-border-gray-300"),g=e.computed(()=>r.invalid?"yu-text-red-500":r.valid?"yu-text-green-500":"yu-text-gray-500"),d=e.computed(()=>r.small&&y()?"yu-translate-y-[7px]":r.small&&!y()?"yu-translate-y-0":y()?"yu-translate-y-[11px]":"yu-translate-y-0"),m=e.computed(()=>a("icon")||r.loading?"yu-pl-[34px]":"yu-pl-3"),b=e.computed(()=>r.block?"yu-rounded-none":r.round?"yu-rounded-full":"yu-rounded-lg"),B=e.computed(()=>r.disabled||r.loading?"yu-opacity-50 yu-pointer-events-none":"");function _(C){const $=C.target.value;l.value=r.maskFunction?h($):$,i("update:modelValue",l.value)}return o({focus:u,content:l}),(C,x)=>(e.openBlock(),e.createBlock(j,{class:e.normalizeClass([e.unref(v)]),col:"","gap-none":""},{default:e.withCtx(()=>[e.createVNode(j,{col:"","gap-sm":""},{default:e.withCtx(()=>[a("label")?(e.openBlock(),e.createBlock(V,{key:0,small:"",medium:""},{default:e.withCtx(()=>[e.renderSlot(C.$slots,"label")]),_:3})):e.createCommentVNode("",!0),e.createElementVNode("label",{class:e.normalizeClass(["yu-relative yu-flex yu-flex-col yu-justify-center yu-items-start yu-border yu-cursor-text yu-transition-colors yu-w-full yu-bg-transparent",[b.value,B.value,e.unref(f),w.value]]),"data-testid":"app-text-input"},[e.createElementVNode("div",bn,[e.createElementVNode("div",kn,[!t.loading&&a("icon")?(e.openBlock(),e.createBlock(L,{key:0,small:""},{default:e.withCtx(()=>[e.renderSlot(C.$slots,"icon")]),_:3})):e.createCommentVNode("",!0),t.loading?(e.openBlock(),e.createBlock(L,{key:1,class:"yu-animate-spin",small:"",outlined:""},{default:e.withCtx(()=>[...x[4]||(x[4]=[e.createTextVNode("progress_activity",-1)])]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(V,{class:e.normalizeClass(["yu-py-1 yu-transition",[d.value]]),small:"",medium:"",gray:""},{default:e.withCtx(()=>[e.renderSlot(C.$slots,"default")]),_:3},8,["class"])]),e.createElementVNode("input",{class:e.normalizeClass(["yu-absolute yu-inset-0 yu-w-full yu-h-full yu-outline-none yu-appearance-none yu-bg-transparent yu-pt-3 yu-pr-3 yu-text-gray-700 yu-font-primary yu-z-0",[e.unref(p),m.value,b.value]]),value:l.value,type:t.passwordToggle&&c.value?"text":t.type,disabled:t.disabled||t.loading,maxlength:t.maxLength,onInput:_,onFocus:x[0]||(x[0]=$=>u.value=!0),onBlur:x[1]||(x[1]=$=>u.value=!1),onKeyup:x[2]||(x[2]=e.withKeys($=>i("keyup-enter"),["enter"]))},null,42,Cn),e.createElementVNode("div",$n,[t.maxLength?(e.openBlock(),e.createBlock(V,{key:0,small:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(`${l.value.length} / ${t.maxLength}`),1)]),_:1})):e.createCommentVNode("",!0),t.type==="password"&&t.passwordToggle?(e.openBlock(),e.createElementBlock("button",{key:1,class:"yu-bg-transparent yu-border-0 yu-p-0 yu-cursor-pointer yu-flex yu-items-center",type:"button",tabindex:"-1",onClick:x[3]||(x[3]=$=>c.value=!c.value)},[e.createVNode(L,{small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value?"visibility_off":"visibility"),1)]),_:1})])):e.createCommentVNode("",!0),e.renderSlot(C.$slots,"suffix")])],2)]),_:3}),a("feedback")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["yu-mt-1",[g.value]])},[e.renderSlot(C.$slots,"feedback")],2)):e.createCommentVNode("",!0)]),_:3},8,["class"]))}}),Bn=()=>{const{isLightHex:t,normalizeHex:o}=Wt();return{getOffset:(s,a)=>{const l=`${a.x}px`,u=`${a.y}px`;switch(s){case"bottom-left":return{bottom:u,left:l};case"top-left":return{top:u,left:l};case"top-right":return{top:u,right:l};default:return{bottom:u,right:l}}},getPosition:s=>{switch(s){case"bottom-left":return"bottom left";case"top-left":return"top left";case"top-right":return"top right";default:return"bottom right"}},getTone:s=>{const a=o(s);return{backgroundImage:"none",backgroundColor:a,color:t(a)?"#1c1917":"#ffffff"}}}},_n=e.defineComponent({__name:"app-widget",props:{workflow:{},config:{},fullscreen:{type:Boolean}},emits:["send-message","retry-loading-messages","edge-click","submit","close","back","open"],setup(t,{emit:o}){const n=t,r=o,i=e.ref(n.config.configurations.general.defaultBehavior==="active"),s=e.ref(!i.value),{setWorkflow:a}=ue(),{getOffset:l,getPosition:u,getTone:c}=Bn(),{appearanceStyle:h,themeClass:y}=jt(()=>n.config.configurations.appearance),f=e.computed(()=>n.config.configurations.anchor),p=e.computed(()=>n.config.configurations.appearance),v=e.computed(()=>{if(!(i.value&&n.fullscreen))return l(f.value.position,f.value.offset)}),w=e.computed(()=>u(f.value.position)),g=e.computed(()=>({workflow:n.workflow,config:n.config,fullscreen:n.fullscreen})),d=e.computed(()=>({style:c(p.value.primaryColor),small:f.value.size==="small",large:f.value.size==="large",logo:f.value.logo??"",label:f.value.label??""})),m=async()=>{i.value||(s.value=!1,await e.nextTick(),i.value=!0,r("open"))},b=()=>{i.value&&(i.value=!1,r("close"))},B=()=>{s.value=!0};return a(n.workflow),e.watch(()=>n.workflow,_=>a(_)),e.watch(()=>n.config.configurations.general.defaultBehavior,_=>{_==="active"?m():b()}),(_,C)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yu-fixed yunique yu-z-[99999]",[e.unref(y),i.value&&t.fullscreen?"yu-inset-0":""]]),"data-testid":"app-widget",style:e.normalizeStyle([{"--widget-origin":w.value},v.value,e.unref(h)])},[e.createVNode(e.Transition,{name:"widget",onAfterLeave:B},{default:e.withCtx(()=>[i.value?(e.openBlock(),e.createBlock(at,e.mergeProps({key:0},g.value,{onClose:b,onBack:C[0]||(C[0]=x=>r("back")),onSubmit:C[1]||(C[1]=x=>r("submit",x)),onEdgeClick:C[2]||(C[2]=x=>r("edge-click",x)),onSendMessage:C[3]||(C[3]=x=>r("send-message",x)),onRetryLoadingMessages:C[4]||(C[4]=x=>r("retry-loading-messages"))}),null,16)):e.createCommentVNode("",!0)]),_:1}),s.value?(e.openBlock(),e.createBlock(ot,{key:0,style:e.normalizeStyle(d.value.style),small:d.value.small,large:d.value.large,logo:d.value.logo,label:d.value.label,onClick:m},null,8,["style","small","large","logo","label"])):e.createCommentVNode("",!0)],6))}}),Gt=Pe(_n,[["__scopeId","data-v-d89436c3"]]),Sn=["top","right","bottom","left"],ft=["start","end"],mt=Sn.reduce((t,o)=>t.concat(o,o+"-"+ft[0],o+"-"+ft[1]),[]),we=Math.min,ne=Math.max,An={left:"right",right:"left",bottom:"top",top:"bottom"},Tn={start:"end",end:"start"};function Ze(t,o,n){return ne(t,we(o,n))}function re(t,o){return typeof t=="function"?t(o):t}function Z(t){return t.split("-")[0]}function D(t){return t.split("-")[1]}function Zt(t){return t==="x"?"y":"x"}function lt(t){return t==="y"?"height":"width"}const Nn=new Set(["top","bottom"]);function U(t){return Nn.has(Z(t))?"y":"x"}function ut(t){return Zt(U(t))}function Ut(t,o,n){n===void 0&&(n=!1);const r=D(t),i=ut(t),s=lt(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return o.reference[s]>o.floating[s]&&(a=Te(a)),[a,Te(a)]}function Vn(t){const o=Te(t);return[Ae(t),o,Ae(o)]}function Ae(t){return t.replace(/start|end/g,o=>Tn[o])}const yt=["left","right"],ht=["right","left"],En=["top","bottom"],Pn=["bottom","top"];function zn(t,o,n){switch(t){case"top":case"bottom":return n?o?ht:yt:o?yt:ht;case"left":case"right":return o?En:Pn;default:return[]}}function Ln(t,o,n,r){const i=D(t);let s=zn(Z(t),n==="start",r);return i&&(s=s.map(a=>a+"-"+i),o&&(s=s.concat(s.map(Ae)))),s}function Te(t){return t.replace(/left|right|bottom|top/g,o=>An[o])}function Mn(t){return{top:0,right:0,bottom:0,left:0,...t}}function Xt(t){return typeof t!="number"?Mn(t):{top:t,right:t,bottom:t,left:t}}function ye(t){const{x:o,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:o,right:o+r,bottom:n+i,x:o,y:n}}function gt(t,o,n){let{reference:r,floating:i}=t;const s=U(o),a=ut(o),l=lt(a),u=Z(o),c=s==="y",h=r.x+r.width/2-i.width/2,y=r.y+r.height/2-i.height/2,f=r[l]/2-i[l]/2;let p;switch(u){case"top":p={x:h,y:r.y-i.height};break;case"bottom":p={x:h,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y};break;case"left":p={x:r.x-i.width,y};break;default:p={x:r.x,y:r.y}}switch(D(o)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1);break}return p}const Rn=async(t,o,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,l=s.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(o));let c=await a.getElementRects({reference:t,floating:o,strategy:i}),{x:h,y}=gt(c,r,u),f=r,p={},v=0;for(let w=0;w<l.length;w++){const{name:g,fn:d}=l[w],{x:m,y:b,data:B,reset:_}=await d({x:h,y,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:c,platform:a,elements:{reference:t,floating:o}});h=m??h,y=b??y,p={...p,[g]:{...p[g],...B}},_&&v<=50&&(v++,typeof _=="object"&&(_.placement&&(f=_.placement),_.rects&&(c=_.rects===!0?await a.getElementRects({reference:t,floating:o,strategy:i}):_.rects),{x:h,y}=gt(c,f,u)),w=-1)}return{x:h,y,placement:f,strategy:i,middlewareData:p}};async function ze(t,o){var n;o===void 0&&(o={});const{x:r,y:i,platform:s,rects:a,elements:l,strategy:u}=t,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:y="floating",altBoundary:f=!1,padding:p=0}=re(o,t),v=Xt(p),g=l[f?y==="floating"?"reference":"floating":y],d=ye(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:h,strategy:u})),m=y==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),B=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},_=ye(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:m,offsetParent:b,strategy:u}):m);return{top:(d.top-_.top+v.top)/B.y,bottom:(_.bottom-d.bottom+v.bottom)/B.y,left:(d.left-_.left+v.left)/B.x,right:(_.right-d.right+v.right)/B.x}}const On=t=>({name:"arrow",options:t,async fn(o){const{x:n,y:r,placement:i,rects:s,platform:a,elements:l,middlewareData:u}=o,{element:c,padding:h=0}=re(t,o)||{};if(c==null)return{};const y=Xt(h),f={x:n,y:r},p=ut(i),v=lt(p),w=await a.getDimensions(c),g=p==="y",d=g?"top":"left",m=g?"bottom":"right",b=g?"clientHeight":"clientWidth",B=s.reference[v]+s.reference[p]-f[p]-s.floating[v],_=f[p]-s.reference[p],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let x=C?C[b]:0;(!x||!await(a.isElement==null?void 0:a.isElement(C)))&&(x=l.floating[b]||s.floating[v]);const $=B/2-_/2,N=x/2-w[v]/2-1,A=we(y[d],N),P=we(y[m],N),k=A,T=x-w[v]-P,E=x/2-w[v]/2+$,R=Ze(k,E,T),z=!u.arrow&&D(i)!=null&&E!==R&&s.reference[v]/2-(E<k?A:P)-w[v]/2<0,M=z?E<k?E-k:E-T:0;return{[p]:f[p]+M,data:{[p]:R,centerOffset:E-R-M,...z&&{alignmentOffset:M}},reset:z}}});function Hn(t,o,n){return(t?[...n.filter(i=>D(i)===t),...n.filter(i=>D(i)!==t)]:n.filter(i=>Z(i)===i)).filter(i=>t?D(i)===t||(o?Ae(i)!==i:!1):!0)}const Fn=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(o){var n,r,i;const{rects:s,middlewareData:a,placement:l,platform:u,elements:c}=o,{crossAxis:h=!1,alignment:y,allowedPlacements:f=mt,autoAlignment:p=!0,...v}=re(t,o),w=y!==void 0||f===mt?Hn(y||null,p,f):f,g=await ze(o,v),d=((n=a.autoPlacement)==null?void 0:n.index)||0,m=w[d];if(m==null)return{};const b=Ut(m,s,await(u.isRTL==null?void 0:u.isRTL(c.floating)));if(l!==m)return{reset:{placement:w[0]}};const B=[g[Z(m)],g[b[0]],g[b[1]]],_=[...((r=a.autoPlacement)==null?void 0:r.overflows)||[],{placement:m,overflows:B}],C=w[d+1];if(C)return{data:{index:d+1,overflows:_},reset:{placement:C}};const x=_.map(A=>{const P=D(A.placement);return[A.placement,P&&h?A.overflows.slice(0,2).reduce((k,T)=>k+T,0):A.overflows[0],A.overflows]}).sort((A,P)=>A[1]-P[1]),N=((i=x.filter(A=>A[2].slice(0,D(A[0])?2:3).every(P=>P<=0))[0])==null?void 0:i[0])||x[0][0];return N!==l?{data:{index:d+1,overflows:_},reset:{placement:N}}:{}}}},Dn=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(o){var n,r;const{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:u,elements:c}=o,{mainAxis:h=!0,crossAxis:y=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:w=!0,...g}=re(t,o);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const d=Z(i),m=U(l),b=Z(l)===l,B=await(u.isRTL==null?void 0:u.isRTL(c.floating)),_=f||(b||!w?[Te(l)]:Vn(l)),C=v!=="none";!f&&C&&_.push(...Ln(l,w,v,B));const x=[l,..._],$=await ze(o,g),N=[];let A=((r=s.flip)==null?void 0:r.overflows)||[];if(h&&N.push($[d]),y){const E=Ut(i,a,B);N.push($[E[0]],$[E[1]])}if(A=[...A,{placement:i,overflows:N}],!N.every(E=>E<=0)){var P,k;const E=(((P=s.flip)==null?void 0:P.index)||0)+1,R=x[E];if(R&&(!(y==="alignment"?m!==U(R):!1)||A.every(O=>U(O.placement)===m?O.overflows[0]>0:!0)))return{data:{index:E,overflows:A},reset:{placement:R}};let z=(k=A.filter(M=>M.overflows[0]<=0).sort((M,O)=>M.overflows[1]-O.overflows[1])[0])==null?void 0:k.placement;if(!z)switch(p){case"bestFit":{var T;const M=(T=A.filter(O=>{if(C){const W=U(O.placement);return W===m||W==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(W=>W>0).reduce((W,xo)=>W+xo,0)]).sort((O,W)=>O[1]-W[1])[0])==null?void 0:T[0];M&&(z=M);break}case"initialPlacement":z=l;break}if(i!==z)return{reset:{placement:z}}}return{}}}},In=new Set(["left","top"]);async function Wn(t,o){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Z(n),l=D(n),u=U(n)==="y",c=In.has(a)?-1:1,h=s&&u?-1:1,y=re(o,t);let{mainAxis:f,crossAxis:p,alignmentAxis:v}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return l&&typeof v=="number"&&(p=l==="end"?v*-1:v),u?{x:p*h,y:f*c}:{x:f*c,y:p*h}}const jn=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(o){var n,r;const{x:i,y:s,placement:a,middlewareData:l}=o,u=await Wn(o,t);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:s+u.y,data:{...u,placement:a}}}}},qn=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(o){const{x:n,y:r,placement:i}=o,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:g=>{let{x:d,y:m}=g;return{x:d,y:m}}},...u}=re(t,o),c={x:n,y:r},h=await ze(o,u),y=U(Z(i)),f=Zt(y);let p=c[f],v=c[y];if(s){const g=f==="y"?"top":"left",d=f==="y"?"bottom":"right",m=p+h[g],b=p-h[d];p=Ze(m,p,b)}if(a){const g=y==="y"?"top":"left",d=y==="y"?"bottom":"right",m=v+h[g],b=v-h[d];v=Ze(m,v,b)}const w=l.fn({...o,[f]:p,[y]:v});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[f]:s,[y]:a}}}}}},Gn=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(o){var n,r;const{placement:i,rects:s,platform:a,elements:l}=o,{apply:u=()=>{},...c}=re(t,o),h=await ze(o,c),y=Z(i),f=D(i),p=U(i)==="y",{width:v,height:w}=s.floating;let g,d;y==="top"||y==="bottom"?(g=y,d=f===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(d=y,g=f==="end"?"top":"bottom");const m=w-h.top-h.bottom,b=v-h.left-h.right,B=we(w-h[g],m),_=we(v-h[d],b),C=!o.middlewareData.shift;let x=B,$=_;if((n=o.middlewareData.shift)!=null&&n.enabled.x&&($=b),(r=o.middlewareData.shift)!=null&&r.enabled.y&&(x=m),C&&!f){const A=ne(h.left,0),P=ne(h.right,0),k=ne(h.top,0),T=ne(h.bottom,0);p?$=v-2*(A!==0||P!==0?A+P:ne(h.left,h.right)):x=w-2*(k!==0||T!==0?k+T:ne(h.top,h.bottom))}await u({...o,availableWidth:$,availableHeight:x});const N=await a.getDimensions(l.floating);return v!==N.width||w!==N.height?{reset:{rects:!0}}:{}}}};function H(t){var o;return((o=t.ownerDocument)==null?void 0:o.defaultView)||window}function q(t){return H(t).getComputedStyle(t)}const vt=Math.min,he=Math.max,Ne=Math.round;function Kt(t){const o=q(t);let n=parseFloat(o.width),r=parseFloat(o.height);const i=t.offsetWidth,s=t.offsetHeight,a=Ne(n)!==i||Ne(r)!==s;return a&&(n=i,r=s),{width:n,height:r,fallback:a}}function ee(t){return Qt(t)?(t.nodeName||"").toLowerCase():""}let $e;function Yt(){if($e)return $e;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?($e=t.brands.map((o=>o.brand+"/"+o.version)).join(" "),$e):navigator.userAgent}function G(t){return t instanceof H(t).HTMLElement}function Q(t){return t instanceof H(t).Element}function Qt(t){return t instanceof H(t).Node}function wt(t){return typeof ShadowRoot>"u"?!1:t instanceof H(t).ShadowRoot||t instanceof ShadowRoot}function Le(t){const{overflow:o,overflowX:n,overflowY:r,display:i}=q(t);return/auto|scroll|overlay|hidden|clip/.test(o+r+n)&&!["inline","contents"].includes(i)}function Zn(t){return["table","td","th"].includes(ee(t))}function Ue(t){const o=/firefox/i.test(Yt()),n=q(t),r=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!=="none"||n.perspective!=="none"||!!r&&r!=="none"||o&&n.willChange==="filter"||o&&!!n.filter&&n.filter!=="none"||["transform","perspective"].some((i=>n.willChange.includes(i)))||["paint","layout","strict","content"].some((i=>{const s=n.contain;return s!=null&&s.includes(i)}))}function Jt(){return!/^((?!chrome|android).)*safari/i.test(Yt())}function ct(t){return["html","body","#document"].includes(ee(t))}function eo(t){return Q(t)?t:t.contextElement}const to={x:1,y:1};function ae(t){const o=eo(t);if(!G(o))return to;const n=o.getBoundingClientRect(),{width:r,height:i,fallback:s}=Kt(o);let a=(s?Ne(n.width):n.width)/r,l=(s?Ne(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}function xe(t,o,n,r){var i,s;o===void 0&&(o=!1),n===void 0&&(n=!1);const a=t.getBoundingClientRect(),l=eo(t);let u=to;o&&(r?Q(r)&&(u=ae(r)):u=ae(t));const c=l?H(l):window,h=!Jt()&&n;let y=(a.left+(h&&((i=c.visualViewport)==null?void 0:i.offsetLeft)||0))/u.x,f=(a.top+(h&&((s=c.visualViewport)==null?void 0:s.offsetTop)||0))/u.y,p=a.width/u.x,v=a.height/u.y;if(l){const w=H(l),g=r&&Q(r)?H(r):r;let d=w.frameElement;for(;d&&r&&g!==w;){const m=ae(d),b=d.getBoundingClientRect(),B=getComputedStyle(d);b.x+=(d.clientLeft+parseFloat(B.paddingLeft))*m.x,b.y+=(d.clientTop+parseFloat(B.paddingTop))*m.y,y*=m.x,f*=m.y,p*=m.x,v*=m.y,y+=b.x,f+=b.y,d=H(d).frameElement}}return{width:p,height:v,top:f,right:y+p,bottom:f+v,left:y,x:y,y:f}}function J(t){return((Qt(t)?t.ownerDocument:t.document)||window.document).documentElement}function Me(t){return Q(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function oo(t){return xe(J(t)).left+Me(t).scrollLeft}function be(t){if(ee(t)==="html")return t;const o=t.assignedSlot||t.parentNode||wt(t)&&t.host||J(t);return wt(o)?o.host:o}function no(t){const o=be(t);return ct(o)?o.ownerDocument.body:G(o)&&Le(o)?o:no(o)}function Ve(t,o){var n;o===void 0&&(o=[]);const r=no(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),s=H(r);return i?o.concat(s,s.visualViewport||[],Le(r)?r:[]):o.concat(r,Ve(r))}function xt(t,o,n){return o==="viewport"?ye((function(r,i){const s=H(r),a=J(r),l=s.visualViewport;let u=a.clientWidth,c=a.clientHeight,h=0,y=0;if(l){u=l.width,c=l.height;const f=Jt();(f||!f&&i==="fixed")&&(h=l.offsetLeft,y=l.offsetTop)}return{width:u,height:c,x:h,y}})(t,n)):Q(o)?ye((function(r,i){const s=xe(r,!0,i==="fixed"),a=s.top+r.clientTop,l=s.left+r.clientLeft,u=G(r)?ae(r):{x:1,y:1};return{width:r.clientWidth*u.x,height:r.clientHeight*u.y,x:l*u.x,y:a*u.y}})(o,n)):ye((function(r){const i=J(r),s=Me(r),a=r.ownerDocument.body,l=he(i.scrollWidth,i.clientWidth,a.scrollWidth,a.clientWidth),u=he(i.scrollHeight,i.clientHeight,a.scrollHeight,a.clientHeight);let c=-s.scrollLeft+oo(r);const h=-s.scrollTop;return q(a).direction==="rtl"&&(c+=he(i.clientWidth,a.clientWidth)-l),{width:l,height:u,x:c,y:h}})(J(t)))}function bt(t){return G(t)&&q(t).position!=="fixed"?t.offsetParent:null}function kt(t){const o=H(t);let n=bt(t);for(;n&&Zn(n)&&q(n).position==="static";)n=bt(n);return n&&(ee(n)==="html"||ee(n)==="body"&&q(n).position==="static"&&!Ue(n))?o:n||(function(r){let i=be(r);for(;G(i)&&!ct(i);){if(Ue(i))return i;i=be(i)}return null})(t)||o}function Un(t,o,n){const r=G(o),i=J(o),s=xe(t,!0,n==="fixed",o);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(r||!r&&n!=="fixed")if((ee(o)!=="body"||Le(i))&&(a=Me(o)),G(o)){const u=xe(o,!0);l.x=u.x+o.clientLeft,l.y=u.y+o.clientTop}else i&&(l.x=oo(i));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}const Xn={getClippingRect:function(t){let{element:o,boundary:n,rootBoundary:r,strategy:i}=t;const s=n==="clippingAncestors"?(function(c,h){const y=h.get(c);if(y)return y;let f=Ve(c).filter((g=>Q(g)&&ee(g)!=="body")),p=null;const v=q(c).position==="fixed";let w=v?be(c):c;for(;Q(w)&&!ct(w);){const g=q(w),d=Ue(w);(v?d||p:d||g.position!=="static"||!p||!["absolute","fixed"].includes(p.position))?p=g:f=f.filter((m=>m!==w)),w=be(w)}return h.set(c,f),f})(o,this._c):[].concat(n),a=[...s,r],l=a[0],u=a.reduce(((c,h)=>{const y=xt(o,h,i);return c.top=he(y.top,c.top),c.right=vt(y.right,c.right),c.bottom=vt(y.bottom,c.bottom),c.left=he(y.left,c.left),c}),xt(o,l,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:o,offsetParent:n,strategy:r}=t;const i=G(n),s=J(n);if(n===s)return o;let a={scrollLeft:0,scrollTop:0},l={x:1,y:1};const u={x:0,y:0};if((i||!i&&r!=="fixed")&&((ee(n)!=="body"||Le(s))&&(a=Me(n)),G(n))){const c=xe(n);l=ae(n),u.x=c.x+n.clientLeft,u.y=c.y+n.clientTop}return{width:o.width*l.x,height:o.height*l.y,x:o.x*l.x-a.scrollLeft*l.x+u.x,y:o.y*l.y-a.scrollTop*l.y+u.y}},isElement:Q,getDimensions:function(t){return G(t)?Kt(t):t.getBoundingClientRect()},getOffsetParent:kt,getDocumentElement:J,getScale:ae,async getElementRects(t){let{reference:o,floating:n,strategy:r}=t;const i=this.getOffsetParent||kt,s=this.getDimensions;return{reference:Un(o,await i(n),r),floating:{x:0,y:0,...await s(n)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>q(t).direction==="rtl"},Kn=(t,o,n)=>{const r=new Map,i={platform:Xn,...n},s={...i.platform,_c:r};return Rn(t,o,{...i,platform:s})};function ro(t,o){for(const n in o)Object.prototype.hasOwnProperty.call(o,n)&&(typeof o[n]=="object"&&t[n]?ro(t[n],o[n]):t[n]=o[n])}const I={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:t=>[...t,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover"],delay:{show:0,hide:400}}}};function ke(t,o){let n=I.themes[t]||{},r;do r=n[o],typeof r>"u"?n.$extend?n=I.themes[n.$extend]||{}:(n=null,r=I[o]):n=null;while(n);return r}function Yn(t){const o=[t];let n=I.themes[t]||{};do n.$extend&&!n.$resetCss?(o.push(n.$extend),n=I.themes[n.$extend]||{}):n=null;while(n);return o.map(r=>`v-popper--theme-${r}`)}function Ct(t){const o=[t];let n=I.themes[t]||{};do n.$extend?(o.push(n.$extend),n=I.themes[n.$extend]||{}):n=null;while(n);return o}let le=!1;if(typeof window<"u"){le=!1;try{const t=Object.defineProperty({},"passive",{get(){le=!0}});window.addEventListener("test",null,t)}catch{}}let io=!1;typeof window<"u"&&typeof navigator<"u"&&(io=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const so=["auto","top","bottom","left","right"].reduce((t,o)=>t.concat([o,`${o}-start`,`${o}-end`]),[]),$t={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},Bt={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function _t(t,o){const n=t.indexOf(o);n!==-1&&t.splice(n,1)}function De(){return new Promise(t=>requestAnimationFrame(()=>{requestAnimationFrame(t)}))}const F=[];let oe=null;const St={};function At(t){let o=St[t];return o||(o=St[t]=[]),o}let Xe=function(){};typeof window<"u"&&(Xe=window.Element);function S(t){return function(o){return ke(o.theme,t)}}const Ie="__floating-vue__popper",ao=()=>e.defineComponent({name:"VPopper",provide(){return{[Ie]:{parentPopper:this}}},inject:{[Ie]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:S("disabled")},positioningDisabled:{type:Boolean,default:S("positioningDisabled")},placement:{type:String,default:S("placement"),validator:t=>so.includes(t)},delay:{type:[String,Number,Object],default:S("delay")},distance:{type:[Number,String],default:S("distance")},skidding:{type:[Number,String],default:S("skidding")},triggers:{type:Array,default:S("triggers")},showTriggers:{type:[Array,Function],default:S("showTriggers")},hideTriggers:{type:[Array,Function],default:S("hideTriggers")},popperTriggers:{type:Array,default:S("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:S("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:S("popperHideTriggers")},container:{type:[String,Object,Xe,Boolean],default:S("container")},boundary:{type:[String,Xe],default:S("boundary")},strategy:{type:String,validator:t=>["absolute","fixed"].includes(t),default:S("strategy")},autoHide:{type:[Boolean,Function],default:S("autoHide")},handleResize:{type:Boolean,default:S("handleResize")},instantMove:{type:Boolean,default:S("instantMove")},eagerMount:{type:Boolean,default:S("eagerMount")},popperClass:{type:[String,Array,Object],default:S("popperClass")},computeTransformOrigin:{type:Boolean,default:S("computeTransformOrigin")},autoMinSize:{type:Boolean,default:S("autoMinSize")},autoSize:{type:[Boolean,String],default:S("autoSize")},autoMaxSize:{type:Boolean,default:S("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:S("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:S("preventOverflow")},overflowPadding:{type:[Number,String],default:S("overflowPadding")},arrowPadding:{type:[Number,String],default:S("arrowPadding")},arrowOverflow:{type:Boolean,default:S("arrowOverflow")},flip:{type:Boolean,default:S("flip")},shift:{type:Boolean,default:S("shift")},shiftCrossAxis:{type:Boolean,default:S("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:S("noAutoFocus")},disposeTimeout:{type:Number,default:S("disposeTimeout")}},emits:{show:()=>!0,hide:()=>!0,"update:shown":t=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(t=>t.toString(36).substring(2,10)).join("_")}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var t;return(t=this[Ie])==null?void 0:t.parentPopper},hasPopperShowTriggerHover(){var t,o;return((t=this.popperTriggers)==null?void 0:t.includes("hover"))||((o=this.popperShowTriggers)==null?void 0:o.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(t){t?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:"$_refreshListeners",deep:!0},positioningDisabled:"$_refreshListeners",...["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((t,o)=>(t[o]="$_computePosition",t),{})},created(){this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:t=null,skipDelay:o=!1,force:n=!1}={}){var r,i;(r=this.parentPopper)!=null&&r.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(n||!this.disabled)&&(((i=this.parentPopper)==null?void 0:i.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(t,o),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:t=null,skipDelay:o=!1}={}){var n;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:o}),this.parentPopper.lockedChild=null)},1e3));return}((n=this.parentPopper)==null?void 0:n.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(t,o),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var t;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=((t=this.referenceNode)==null?void 0:t.call(this))??this.$el,this.$_targetNodes=this.targetNodes().filter(o=>o.nodeType===o.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;const t={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&t.middleware.push(jn({mainAxis:this.distance,crossAxis:this.skidding}));const o=this.placement.startsWith("auto");if(o?t.middleware.push(Fn({alignment:this.placement.split("-")[1]??""})):t.placement=this.placement,this.preventOverflow&&(this.shift&&t.middleware.push(qn({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!o&&this.flip&&t.middleware.push(Dn({padding:this.overflowPadding,boundary:this.boundary}))),t.middleware.push(On({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&t.middleware.push({name:"arrowOverflow",fn:({placement:r,rects:i,middlewareData:s})=>{let a;const{centerOffset:l}=s.arrow;return r.startsWith("top")||r.startsWith("bottom")?a=Math.abs(l)>i.reference.width/2:a=Math.abs(l)>i.reference.height/2,{data:{overflow:a}}}}),this.autoMinSize||this.autoSize){const r=this.autoSize?this.autoSize:this.autoMinSize?"min":null;t.middleware.push({name:"autoSize",fn:({rects:i,placement:s,middlewareData:a})=>{var l;if((l=a.autoSize)!=null&&l.skip)return{};let u,c;return s.startsWith("top")||s.startsWith("bottom")?u=i.reference.width:c=i.reference.height,this.$_innerNode.style[r==="min"?"minWidth":r==="max"?"maxWidth":"width"]=u!=null?`${u}px`:null,this.$_innerNode.style[r==="min"?"minHeight":r==="max"?"maxHeight":"height"]=c!=null?`${c}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,t.middleware.push(Gn({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:r,availableHeight:i})=>{this.$_innerNode.style.maxWidth=r!=null?`${r}px`:null,this.$_innerNode.style.maxHeight=i!=null?`${i}px`:null}})));const n=await Kn(this.$_referenceNode,this.$_popperNode,t);Object.assign(this.result,{x:n.x,y:n.y,placement:n.placement,strategy:n.strategy,arrow:{...n.middlewareData.arrow,...n.middlewareData.arrowOverflow}})},$_scheduleShow(t,o=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),oe&&this.instantMove&&oe.instantMove&&oe!==this.parentPopper){oe.$_applyHide(!0),this.$_applyShow(!0);return}o?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(t,o=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(oe=this),o?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(t){const o=this.delay;return parseInt(o&&o[t]||o||0)},async $_applyShow(t=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=t,!this.isShown&&(this.$_ensureTeleport(),await De(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Ve(this.$_referenceNode),...Ve(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const o=this.$_referenceNode.getBoundingClientRect(),n=this.$_popperNode.querySelector(".v-popper__wrapper"),r=n.parentNode.getBoundingClientRect(),i=o.x+o.width/2-(r.left+n.offsetLeft),s=o.y+o.height/2-(r.top+n.offsetTop);this.result.transformOrigin=`${i}px ${s}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const t=this.showGroup;if(t){let o;for(let n=0;n<F.length;n++)o=F[n],o.showGroup!==t&&(o.hide(),o.$emit("close-group"))}F.push(this),document.body.classList.add("v-popper--some-open");for(const o of Ct(this.theme))At(o).push(this),document.body.classList.add(`v-popper--some-open--${o}`);this.$emit("apply-show"),this.classes.showFrom=!0,this.classes.showTo=!1,this.classes.hideFrom=!1,this.classes.hideTo=!1,await De(),this.classes.showFrom=!1,this.classes.showTo=!0,this.noAutoFocus||this.$_popperNode.focus()},async $_applyHide(t=!1){if(this.shownChildren.size>0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=t,_t(F,this),F.length===0&&document.body.classList.remove("v-popper--some-open");for(const n of Ct(this.theme)){const r=At(n);_t(r,this),r.length===0&&document.body.classList.remove(`v-popper--some-open--${n}`)}oe===this&&(oe=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const o=this.disposeTimeout;o!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},o)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await De(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let t=this.container;if(typeof t=="string"?t=window.document.querySelector(t):t===!1&&(t=this.$_targetNodes[0].parentNode),!t)throw new Error("No container for popover: "+this.container);t.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const t=n=>{this.isShown&&!this.$_hideInProgress||(n.usedByTooltip=!0,!this.$_preventShow&&this.show({event:n}))};this.$_registerTriggerListeners(this.$_targetNodes,$t,this.triggers,this.showTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],$t,this.popperTriggers,this.popperShowTriggers,t);const o=n=>{n.usedByTooltip||this.hide({event:n})};this.$_registerTriggerListeners(this.$_targetNodes,Bt,this.triggers,this.hideTriggers,o),this.$_registerTriggerListeners([this.$_popperNode],Bt,this.popperTriggers,this.popperHideTriggers,o)},$_registerEventListeners(t,o,n){this.$_events.push({targetNodes:t,eventType:o,handler:n}),t.forEach(r=>r.addEventListener(o,n,le?{passive:!0}:void 0))},$_registerTriggerListeners(t,o,n,r,i){let s=n;r!=null&&(s=typeof r=="function"?r(s):r),s.forEach(a=>{const l=o[a];l&&this.$_registerEventListeners(t,l,i)})},$_removeEventListeners(t){const o=[];this.$_events.forEach(n=>{const{targetNodes:r,eventType:i,handler:s}=n;!t||t===i?r.forEach(a=>a.removeEventListener(i,s)):o.push(n)}),this.$_events=o},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(t,o=!1){this.$_showFrameLocked||(this.hide({event:t}),t.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),o&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(t,o){for(const n of this.$_targetNodes){const r=n.getAttribute(t);r&&(n.removeAttribute(t),n.setAttribute(o,r))}},$_applyAttrsToTarget(t){for(const o of this.$_targetNodes)for(const n in t){const r=t[n];r==null?o.removeAttribute(n):o.setAttribute(n,r)}},$_updateParentShownChildren(t){let o=this.parentPopper;for(;o;)t?o.shownChildren.add(this.randomId):(o.shownChildren.delete(this.randomId),o.pendingHide&&o.hide()),o=o.parentPopper},$_isAimingPopper(){const t=this.$_referenceNode.getBoundingClientRect();if(ge>=t.left&&ge<=t.right&&ve>=t.top&&ve<=t.bottom){const o=this.$_popperNode.getBoundingClientRect(),n=ge-K,r=ve-Y,i=o.left+o.width/2-K+(o.top+o.height/2)-Y+o.width+o.height,s=K+n*i,a=Y+r*i;return Be(K,Y,s,a,o.left,o.top,o.left,o.bottom)||Be(K,Y,s,a,o.left,o.top,o.right,o.top)||Be(K,Y,s,a,o.right,o.top,o.right,o.bottom)||Be(K,Y,s,a,o.left,o.bottom,o.right,o.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<"u"&&typeof window<"u"){if(io){const t=le?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",o=>Tt(o,!0),t),document.addEventListener("touchend",o=>Nt(o,!0),t)}else window.addEventListener("mousedown",t=>Tt(t,!1),!0),window.addEventListener("click",t=>Nt(t,!1),!0);window.addEventListener("resize",Jn)}function Tt(t,o){if(I.autoHideOnMousedown)lo(t,o);else for(let n=0;n<F.length;n++){const r=F[n];try{r.mouseDownContains=r.popperNode().contains(t.target)}catch{}}}function Nt(t,o){I.autoHideOnMousedown||lo(t,o)}function lo(t,o){const n={};for(let r=F.length-1;r>=0;r--){const i=F[r];try{const s=i.containsGlobalTarget=i.mouseDownContains||i.popperNode().contains(t.target);i.pendingHide=!1,requestAnimationFrame(()=>{if(i.pendingHide=!1,!n[i.randomId]&&Vt(i,s,t)){if(i.$_handleGlobalClose(t,o),!t.closeAllPopover&&t.closePopover&&s){let l=i.parentPopper;for(;l;)n[l.randomId]=!0,l=l.parentPopper;return}let a=i.parentPopper;for(;a&&Vt(a,a.containsGlobalTarget,t);)a.$_handleGlobalClose(t,o),a=a.parentPopper}})}catch{}}}function Vt(t,o,n){return n.closeAllPopover||n.closePopover&&o||Qn(t,n)&&!o}function Qn(t,o){if(typeof t.autoHide=="function"){const n=t.autoHide(o);return t.lastAutoHide=n,n}return t.autoHide}function Jn(){for(let t=0;t<F.length;t++)F[t].$_computePosition()}let K=0,Y=0,ge=0,ve=0;typeof window<"u"&&window.addEventListener("mousemove",t=>{K=ge,Y=ve,ge=t.clientX,ve=t.clientY},le?{passive:!0}:void 0);function Be(t,o,n,r,i,s,a,l){const u=((a-i)*(o-s)-(l-s)*(t-i))/((l-s)*(n-t)-(a-i)*(r-o)),c=((n-t)*(o-s)-(r-o)*(t-i))/((l-s)*(n-t)-(a-i)*(r-o));return u>=0&&u<=1&&c>=0&&c<=1}const er={extends:ao()},Re=(t,o)=>{const n=t.__vccOpts||t;for(const[r,i]of o)n[r]=i;return n};function tr(t,o,n,r,i,s){return e.openBlock(),e.createElementBlock("div",{ref:"reference",class:e.normalizeClass(["v-popper",{"v-popper--shown":t.slotData.isShown}])},[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps(t.slotData)))],2)}const or=Re(er,[["render",tr]]);function nr(){var t=window.navigator.userAgent,o=t.indexOf("MSIE ");if(o>0)return parseInt(t.substring(o+5,t.indexOf(".",o)),10);var n=t.indexOf("Trident/");if(n>0){var r=t.indexOf("rv:");return parseInt(t.substring(r+3,t.indexOf(".",r)),10)}var i=t.indexOf("Edge/");return i>0?parseInt(t.substring(i+5,t.indexOf(".",i)),10):-1}let _e;function Ke(){Ke.init||(Ke.init=!0,_e=nr()!==-1)}var Oe={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Ke(),e.nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const t=document.createElement("object");this._resizeObject=t,t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex",-1),t.onload=this.addResizeHandlers,t.type="text/html",_e&&this.$el.appendChild(t),t.data="about:blank",_e||this.$el.appendChild(t)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!_e&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const rr=e.withScopeId("data-v-b329ee4c");e.pushScopeId("data-v-b329ee4c");const ir={class:"resize-observer",tabindex:"-1"};e.popScopeId();const sr=rr((t,o,n,r,i,s)=>(e.openBlock(),e.createBlock("div",ir)));Oe.render=sr;Oe.__scopeId="data-v-b329ee4c";Oe.__file="src/components/ResizeObserver.vue";const uo=(t="theme")=>({computed:{themeClass(){return Yn(this[t])}}}),ar=e.defineComponent({name:"VPopperContent",components:{ResizeObserver:Oe},mixins:[uo()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(t){return t!=null&&!isNaN(t)?`${t}px`:null}}}),lr=["id","aria-hidden","tabindex","data-popper-placement"],ur={ref:"inner",class:"v-popper__inner"},cr=e.createElementVNode("div",{class:"v-popper__arrow-outer"},null,-1),dr=e.createElementVNode("div",{class:"v-popper__arrow-inner"},null,-1),pr=[cr,dr];function fr(t,o,n,r,i,s){const a=e.resolveComponent("ResizeObserver");return e.openBlock(),e.createElementBlock("div",{id:t.popperId,ref:"popover",class:e.normalizeClass(["v-popper__popper",[t.themeClass,t.classes.popperClass,{"v-popper__popper--shown":t.shown,"v-popper__popper--hidden":!t.shown,"v-popper__popper--show-from":t.classes.showFrom,"v-popper__popper--show-to":t.classes.showTo,"v-popper__popper--hide-from":t.classes.hideFrom,"v-popper__popper--hide-to":t.classes.hideTo,"v-popper__popper--skip-transition":t.skipTransition,"v-popper__popper--arrow-overflow":t.result&&t.result.arrow.overflow,"v-popper__popper--no-positioning":!t.result}]]),style:e.normalizeStyle(t.result?{position:t.result.strategy,transform:`translate3d(${Math.round(t.result.x)}px,${Math.round(t.result.y)}px,0)`}:void 0),"aria-hidden":t.shown?"false":"true",tabindex:t.autoHide?0:void 0,"data-popper-placement":t.result?t.result.placement:void 0,onKeyup:o[2]||(o[2]=e.withKeys(l=>t.autoHide&&t.$emit("hide"),["esc"]))},[e.createElementVNode("div",{class:"v-popper__backdrop",onClick:o[0]||(o[0]=l=>t.autoHide&&t.$emit("hide"))}),e.createElementVNode("div",{class:"v-popper__wrapper",style:e.normalizeStyle(t.result?{transformOrigin:t.result.transformOrigin}:void 0)},[e.createElementVNode("div",ur,[t.mounted?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",null,[e.renderSlot(t.$slots,"default")]),t.handleResize?(e.openBlock(),e.createBlock(a,{key:0,onNotify:o[1]||(o[1]=l=>t.$emit("resize",l))})):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],512),e.createElementVNode("div",{ref:"arrow",class:"v-popper__arrow-container",style:e.normalizeStyle(t.result?{left:t.toPx(t.result.arrow.x),top:t.toPx(t.result.arrow.y)}:void 0)},pr,4)],4)],46,lr)}const co=Re(ar,[["render",fr]]),po={methods:{show(...t){return this.$refs.popper.show(...t)},hide(...t){return this.$refs.popper.hide(...t)},dispose(...t){return this.$refs.popper.dispose(...t)},onResize(...t){return this.$refs.popper.onResize(...t)}}};let Ye=function(){};typeof window<"u"&&(Ye=window.Element);const mr=e.defineComponent({name:"VPopperWrapper",components:{Popper:or,PopperContent:co},mixins:[po,uo("finalTheme")],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,Ye,Boolean],default:void 0},boundary:{type:[String,Ye],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":t=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(t=>t!==this.$refs.popperContent.$el)}}});function yr(t,o,n,r,i,s){const a=e.resolveComponent("PopperContent"),l=e.resolveComponent("Popper");return e.openBlock(),e.createBlock(l,e.mergeProps({ref:"popper"},t.$props,{theme:t.finalTheme,"target-nodes":t.getTargetNodes,"popper-node":()=>t.$refs.popperContent.$el,class:[t.themeClass],onShow:o[0]||(o[0]=()=>t.$emit("show")),onHide:o[1]||(o[1]=()=>t.$emit("hide")),"onUpdate:shown":o[2]||(o[2]=u=>t.$emit("update:shown",u)),onApplyShow:o[3]||(o[3]=()=>t.$emit("apply-show")),onApplyHide:o[4]||(o[4]=()=>t.$emit("apply-hide")),onCloseGroup:o[5]||(o[5]=()=>t.$emit("close-group")),onCloseDirective:o[6]||(o[6]=()=>t.$emit("close-directive")),onAutoHide:o[7]||(o[7]=()=>t.$emit("auto-hide")),onResize:o[8]||(o[8]=()=>t.$emit("resize"))}),{default:e.withCtx(({popperId:u,isShown:c,shouldMountContent:h,skipTransition:y,autoHide:f,show:p,hide:v,handleResize:w,onResize:g,classes:d,result:m})=>[e.renderSlot(t.$slots,"default",{shown:c,show:p,hide:v}),e.createVNode(a,{ref:"popperContent","popper-id":u,theme:t.finalTheme,shown:c,mounted:h,"skip-transition":y,"auto-hide":f,"handle-resize":w,classes:d,result:m,onHide:v,onResize:g},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"popper",{shown:c,hide:v})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},16,["theme","target-nodes","popper-node","class"])}const dt=Re(mr,[["render",yr]]),hr={...dt,name:"VDropdown",vPopperTheme:"dropdown"},gr={...dt,name:"VMenu",vPopperTheme:"menu"},vr={...dt,name:"VTooltip",vPopperTheme:"tooltip"},wr=e.defineComponent({name:"VTooltipDirective",components:{Popper:ao(),PopperContent:co},mixins:[po],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:t=>ke(t.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:t=>ke(t.theme,"loadingContent")},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(t){if(typeof this.content=="function"&&this.$_isShown&&(t||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const o=++this.$_fetchId,n=this.content(this);n.then?n.then(r=>this.onResult(o,r)):this.onResult(o,n)}},onResult(t,o){t===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=o)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),xr=["innerHTML"],br=["textContent"];function kr(t,o,n,r,i,s){const a=e.resolveComponent("PopperContent"),l=e.resolveComponent("Popper");return e.openBlock(),e.createBlock(l,e.mergeProps({ref:"popper"},t.$attrs,{theme:t.theme,"target-nodes":t.targetNodes,"popper-node":()=>t.$refs.popperContent.$el,onApplyShow:t.onShow,onApplyHide:t.onHide}),{default:e.withCtx(({popperId:u,isShown:c,shouldMountContent:h,skipTransition:y,autoHide:f,hide:p,handleResize:v,onResize:w,classes:g,result:d})=>[e.createVNode(a,{ref:"popperContent",class:e.normalizeClass({"v-popper--tooltip-loading":t.loading}),"popper-id":u,theme:t.theme,shown:c,mounted:h,"skip-transition":y,"auto-hide":f,"handle-resize":v,classes:g,result:d,onHide:p,onResize:w},{default:e.withCtx(()=>[t.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:t.finalContent},null,8,xr)):(e.openBlock(),e.createElementBlock("div",{key:1,textContent:e.toDisplayString(t.finalContent)},null,8,br))]),_:2},1032,["class","popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:1},16,["theme","target-nodes","popper-node","onApplyShow","onApplyHide"])}const Cr=Re(wr,[["render",kr]]),fo="v-popper--has-tooltip";function $r(t,o){let n=t.placement;if(!n&&o)for(const r of so)o[r]&&(n=r);return n||(n=ke(t.theme||"tooltip","placement")),n}function mo(t,o,n){let r;const i=typeof o;return i==="string"?r={content:o}:o&&i==="object"?r=o:r={content:!1},r.placement=$r(r,n),r.targetNodes=()=>[t],r.referenceNode=()=>t,r}let We,Ce,Br=0;function _r(){if(We)return;Ce=e.ref([]),We=e.createApp({name:"VTooltipDirectiveApp",setup(){return{directives:Ce}},render(){return this.directives.map(o=>e.h(Cr,{...o.options,shown:o.shown||o.options.shown,key:o.id}))},devtools:{hide:!0}});const t=document.createElement("div");document.body.appendChild(t),We.mount(t)}function Sr(t,o,n){_r();const r=e.ref(mo(t,o,n)),i=e.ref(!1),s={id:Br++,options:r,shown:i};return Ce.value.push(s),t.classList&&t.classList.add(fo),t.$_popper={options:r,item:s,show(){i.value=!0},hide(){i.value=!1}}}function yo(t){if(t.$_popper){const o=Ce.value.indexOf(t.$_popper.item);o!==-1&&Ce.value.splice(o,1),delete t.$_popper,delete t.$_popperOldShown,delete t.$_popperMountTarget}t.classList&&t.classList.remove(fo)}function Et(t,{value:o,modifiers:n}){const r=mo(t,o,n);if(!r.content||ke(r.theme||"tooltip","disabled"))yo(t);else{let i;t.$_popper?(i=t.$_popper,i.options.value=r):i=Sr(t,o,n),typeof o.shown<"u"&&o.shown!==t.$_popperOldShown&&(t.$_popperOldShown=o.shown,o.shown?i.show():i.hide())}}const Ar={beforeMount:Et,updated:Et,beforeUnmount(t){yo(t)}};function Pt(t){t.addEventListener("mousedown",Ee),t.addEventListener("click",Ee),t.addEventListener("touchstart",ho,le?{passive:!0}:!1)}function zt(t){t.removeEventListener("mousedown",Ee),t.removeEventListener("click",Ee),t.removeEventListener("touchstart",ho),t.removeEventListener("touchend",go),t.removeEventListener("touchcancel",vo)}function Ee(t){const o=t.currentTarget;t.closePopover=!o.$_vclosepopover_touch,t.closeAllPopover=o.$_closePopoverModifiers&&!!o.$_closePopoverModifiers.all}function ho(t){if(t.changedTouches.length===1){const o=t.currentTarget;o.$_vclosepopover_touch=!0;const n=t.changedTouches[0];o.$_vclosepopover_touchPoint=n,o.addEventListener("touchend",go),o.addEventListener("touchcancel",vo)}}function go(t){const o=t.currentTarget;if(o.$_vclosepopover_touch=!1,t.changedTouches.length===1){const n=t.changedTouches[0],r=o.$_vclosepopover_touchPoint;t.closePopover=Math.abs(n.screenY-r.screenY)<20&&Math.abs(n.screenX-r.screenX)<20,t.closeAllPopover=o.$_closePopoverModifiers&&!!o.$_closePopoverModifiers.all}}function vo(t){const o=t.currentTarget;o.$_vclosepopover_touch=!1}const Tr={beforeMount(t,{value:o,modifiers:n}){t.$_closePopoverModifiers=n,(typeof o>"u"||o)&&Pt(t)},updated(t,{value:o,oldValue:n,modifiers:r}){t.$_closePopoverModifiers=r,o!==n&&(typeof o>"u"||o?Pt(t):zt(t))},beforeUnmount(t){zt(t)}};function Nr(t,o={}){t.$_vTooltipInstalled||(t.$_vTooltipInstalled=!0,ro(I,o),t.directive("tooltip",Ar),t.directive("close-popper",Tr),t.component("VTooltip",vr),t.component("VDropdown",hr),t.component("VMenu",gr))}const Vr={version:"5.2.2",install:Nr,options:I},Er="c3fd21c9-c91a-4c66-baa5-c3e050c2cc74",Lt="2026-10-13T14:00:00.000Z",Pr="69756c6a-cd47-41ef-a9c3-faa0b1aeb4a1",je="https://i.allsvgicons.com/lucide",ie={marketplace:"https://svgl.app/library/mercado-libre.svg",support:`${je}/headphones.svg`,chat:`${je}/message-circle.svg`,cancel:`${je}/x.svg`},ce={logo:ie.marketplace,title:"Mercado Livre",subtitle:"Atendimento online"},de=(t,o,n)=>({logo:t,eyebrow:"MERCADO LIVRE",title:o,subtitle:n}),zr=[{name:"name",alias:"Nome",required:!0},{name:"phone",alias:"Telefone",required:!0},{name:"email",alias:"E-mail",required:!1}],Lr=[{name:"name",alias:"Nome",required:!0},{name:"phone",alias:"Telefone",required:!0},{name:"email",alias:"E-mail",required:!1},{name:"cpf",alias:"CPF",required:!0}],pe=t=>({id:t.id,companyId:Er,name:t.name,action:t.action,message:null,automaticMessage:null,callOnQueue:null,uraDescription:null,interactiveMessageId:null,configId:t.configId??null,queueId:null,redirectQueue:null,redirectRuleId:null,questionnaire:null,webhook:null,isRoot:!1,redirectDefault:!1,redirectTimeout:60,delay:null,disableTyping:!1,settings:t.settings??null,archivedAt:null,autoTagEnabled:!1,autoTagIds:[],createdAt:Lt,updatedAt:Lt}),me=(t,o)=>({id:t,nextRuleId:o}),Mt=pe({id:"a1111111-1111-4111-8111-111111111105",name:"Falar com atendente",action:"service",settings:{header:ce,body:de(ie.chat,"Falar com atendente","Conte o que você precisa e vamos te ajudar."),features:{sendMessage:!0,sendAttachment:!0},behavior:"chat"}}),Rt=pe({id:"a1111111-1111-4111-8111-111111111101",name:"Consultar meu plano",action:"service",settings:{header:ce,body:de(ie.support,"Consultar meu plano","Vamos te ajudar a entender o seu plano."),features:{sendMessage:!0,sendAttachment:!0},behavior:"chat"}}),Ot=pe({id:"a1111111-1111-4111-8111-111111111106",name:"Cancelar plano",action:"service",settings:{header:ce,body:de(ie.cancel,"Cancelar plano","Vamos verificar se o plano ainda pode ser cancelado."),features:{sendMessage:!0,sendAttachment:!0},behavior:"chat"}}),qe=pe({id:"b2222222-2222-4222-8222-222222222201",name:"Consultar meu plano",action:"identification",settings:{header:ce,body:de(ie.support,"Consultar meu plano","Informe seus dados para consultar o plano."),form:{fields:[...zr]}}}),Ge=pe({id:"b2222222-2222-4222-8222-222222222204",name:"Cancelar plano",action:"identification",settings:{header:ce,body:de(ie.cancel,"Cancelar plano","Informe seus dados para verificar o cancelamento."),form:{fields:[...Lr]}}}),Qe=pe({id:"d0000000-0000-4000-8000-000000000001",name:"Mercado Livre",action:"screen",configId:"37b0b2d3-6a07-4567-a5ad-7456a820905d",settings:{header:ce,body:de(ie.marketplace,"Como podemos ajudar?","Escolha uma opção para continuar.")}}),wo={id:Pr,rules:[Mt,qe,Ge,Rt,Ot,Qe],edges:{[Qe.id]:[me("aa2db433-f691-4b0e-b2f3-703eb131fcc1",Mt.id),me("aa2db433-f691-4b0e-b2f3-703eb131fcc2",qe.id),me("aa2db433-f691-4b0e-b2f3-703eb131fcc3",Ge.id)],[qe.id]:[me("cc2db433-f691-4b0e-b2f3-703eb131fcc1",Rt.id)],[Ge.id]:[me("cc2db433-f691-4b0e-b2f3-703eb131fcc2",Ot.id)]}},Mr=Qe,Rr=t=>wo.rules.find(o=>o.id===t),Or={configurations:{alias:"Mercado Livre",general:{defaultBehavior:"inactive",language:"pt-BR",isClosable:!0},appearance:{theme:"light",primaryColor:"#FFE600"},anchor:{label:"Fale conosco",size:"medium",logo:"https://svgl.app/library/mercado-libre.svg",position:"bottom-right",offset:{x:32,y:36}}}},Hr={install:t=>{t.use(Vr),t.component("AppIdentificationPage",tt),t.component("AppFormTextInput",Je),t.component("AppWidgetAnchor",ot),t.component("AppServicePage",it),t.component("AppScreenPage",st),t.component("AppWidgetView",at),t.component("AppTextInput",qt),t.component("AppCarousel",et),t.component("AppSkeleton",nt),t.component("AppMessage",Se),t.component("AppWidget",Gt),t.component("AppButton",X),t.component("AppEmpty",rt),t.component("AppGroup",j),t.component("AppIcon",L),t.component("AppText",V)}};exports.AppButton=X;exports.AppCarousel=et;exports.AppEmpty=rt;exports.AppFormTextInput=Je;exports.AppGroup=j;exports.AppIcon=L;exports.AppIdentificationPage=tt;exports.AppMessage=Se;exports.AppScreenPage=st;exports.AppServicePage=it;exports.AppSkeleton=nt;exports.AppText=V;exports.AppTextInput=qt;exports.AppWidget=Gt;exports.AppWidgetAnchor=ot;exports.AppWidgetView=at;exports.default=Hr;exports.demoRootRule=Mr;exports.demoWidgetConfig=Or;exports.demoWorkflow=wo;exports.findDemoRuleById=Rr;exports.useAppWidget=ue;exports.useServiceChatBehavior=Ft;exports.useServicePage=Dt;exports.useServiceVoiceBehavior=Ht;
|