@opens/widget-ui 1.2.2 → 1.3.0

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.
Files changed (28) hide show
  1. package/dist/{pages/app-article-page.vue.d.ts → app-article-page.vue.d.ts} +2 -1
  2. package/dist/app-article-page.vue.d.ts.map +1 -0
  3. package/dist/app-identification-page.vue.d.ts.map +1 -0
  4. package/dist/app-screen-page.vue.d.ts.map +1 -0
  5. package/dist/app-service-page.vue.d.ts.map +1 -0
  6. package/dist/composables/use-app-widget.d.ts +3 -3
  7. package/dist/domain/chat-message/index.d.ts +1 -1
  8. package/dist/domain/chat-message/types.d.ts +2 -2
  9. package/dist/inputs/app-form-text-input.vue.d.ts.map +1 -0
  10. package/dist/inputs/app-text-input.vue.d.ts.map +1 -0
  11. package/dist/utils/message-helpers.d.ts +2 -0
  12. package/dist/utils/resolve-rule-option-icon.d.ts +0 -1
  13. package/dist/yunique_widget_ui.cjs.js +870 -1
  14. package/dist/yunique_widget_ui.css +1 -1
  15. package/dist/yunique_widget_ui.es.js +5274 -4439
  16. package/dist/yunique_widget_ui.umd.js +871 -2
  17. package/package.json +1 -1
  18. package/dist/app-form-text-input.vue.d.ts.map +0 -1
  19. package/dist/app-text-input.vue.d.ts.map +0 -1
  20. package/dist/pages/app-article-page.vue.d.ts.map +0 -1
  21. package/dist/pages/app-identification-page.vue.d.ts.map +0 -1
  22. package/dist/pages/app-screen-page.vue.d.ts.map +0 -1
  23. package/dist/pages/app-service-page.vue.d.ts.map +0 -1
  24. /package/dist/{pages/app-identification-page.vue.d.ts → app-identification-page.vue.d.ts} +0 -0
  25. /package/dist/{pages/app-screen-page.vue.d.ts → app-screen-page.vue.d.ts} +0 -0
  26. /package/dist/{pages/app-service-page.vue.d.ts → app-service-page.vue.d.ts} +0 -0
  27. /package/dist/{app-form-text-input.vue.d.ts → inputs/app-form-text-input.vue.d.ts} +0 -0
  28. /package/dist/{app-text-input.vue.d.ts → inputs/app-text-input.vue.d.ts} +0 -0
@@ -1 +1,870 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");function an(){return{maskPhone:a=>{if(!a)return"";let s=a.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})/,(l,i,u,c)=>[i,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:a=>{const s=a.toUpperCase().replace(/[^0-9A-Z]/g,"");let l="";for(const i of s){if(l.length>=14)break;(l.length<12||/\d/.test(i))&&(l+=i)}return l.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:a=>a.replace(/\D/g,"").slice(0,8).replace(/^(\d{5})(\d)/,"$1-$2"),maskCpf:a=>a.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 uo(){return{}}const Je=e.ref([]),sn=e.ref(""),ln=e.shallowRef([]),un=e.shallowRef(null),cn=e.ref(!1),dn=e.ref(!1),pn=e.ref(!1);function co(){return{isSendingMessage:cn,isErrorLoading:dn,attachments:ln,isLoading:pn,messages:Je,audio:un,text:sn,setMessages:n=>{Je.value=[...n]},addMessage:n=>{Je.value.push(n)}}}function po(){const t=co(),o=uo();return{chat:t,voice:o}}const xe=e.ref([]),et=e.ref(void 0),oe=e.ref(void 0),tt=e.ref(void 0),it=e.ref(void 0),mo=t=>!!(t?.logo?.trim()||t?.title?.trim()||t?.subtitle?.trim()),Mt=t=>{!t||!mo(t)||(it.value={...t})},pe=()=>{const t=h=>{const y=new Set(Object.values(h.edges??{}).flatMap(w=>w.map(g=>g.nextRuleId)));return h.rules.find(w=>!y.has(w.id))??h.rules[0]},o=(h,y)=>{const w=new Map(h.rules.map(g=>[g.id,g]));return(h.edges[y]??[]).flatMap(g=>{const $=w.get(g.nextRuleId);return $?[$]:[]})},n=e.computed(()=>new Map((oe.value?.rules??[]).map(h=>[h.id,h]))),r=e.computed(()=>oe.value?t(oe.value):void 0),a=e.computed(()=>{const h=et.value;return h&&n.value.get(h)||r.value}),s=e.computed(()=>!oe.value||!a.value?[]:o(oe.value,a.value.id)),l=e.computed(()=>{const h=a.value?.settings?.header;return mo(h)?h:it.value}),i=e.computed(()=>tt.value?.configurations.general.language??"pt-BR"),u=po();return{currentRuleId:et,currentRule:a,currentHeader:l,rootRule:r,workflow:oe,config:tt,language:i,history:xe,edges:s,setCurrentRuleId:h=>{et.value=h,Mt(a.value?.settings?.header)},clearHistory:()=>{xe.value=[]},setWorkflow:h=>{oe.value?.id!==h?.id&&(it.value=void 0),oe.value=h,Mt(a.value?.settings?.header)},setConfig:h=>{tt.value=h},pushHistory:h=>{xe.value.push(h)},setHistory:h=>{xe.value=[...h]},popHistory:()=>xe.value.pop(),...u}},fe=t=>t==="name",Lt=t=>!!t?.trim(),mn=t=>{const o=t.filter(r=>fe(r.name)),n=t.filter(r=>!fe(r.name));return[...o,...n]};function fn(t,o){const{maskPhone:n,maskCpf:r}=an(),{history:a}=pe(),s=e.ref(0),l=e.ref("forward"),i=e.ref(null),u=e.computed(()=>{const b=e.toValue(t),D=b.settings?.form&&b.settings.form.fields||[];return mn(D)}),c=e.reactive(Object.fromEntries(u.value.map(b=>[b.name,""]))),f=e.computed(()=>u.value[s.value]),d=e.computed(()=>s.value>=u.value.length-1),p=e.computed(()=>a.value.length>0||s.value>0),m=e.computed(()=>l.value==="back"?"step-back":"step-forward");e.watch(s,async()=>{await e.nextTick();const b=i.value;if(!b)return;(b.querySelector(".is-active input")??b.querySelector("input"))?.focus({preventScroll:!0})});const v=e.computed(()=>u.value.every(b=>!b.required||Lt(c[b.name]))),x=b=>{const D=u.value[b];return D?D.required&&!Lt(c[D.name])?!1:b>=u.value.length-1?v.value:!0:v.value},h=e.computed(()=>x(s.value)),y=e.computed(()=>{const b=u.value.find(D=>fe(D.name));return b?c[b.name]?.trim().split(/\s+/)[0]??"":""}),w=b=>{const D=u.value[b],z=y.value,F=u.value.length?`Passo ${b+1} de ${u.value.length}`:"",H=e.toValue(t),j=b>=u.value.length-1;if(!D)return{eyebrow:F,title:H.settings?.body?.title??H.name??"",subtitle:H.settings?.body?.subtitle??""};if(fe(D.name))return{eyebrow:F,title:"Como podemos te chamar?",subtitle:"Primeiro, nos diga o seu nome."};const I=j?z?`Quase lá, ${z}.`:"Quase lá.":z?`Olá, ${z}.`:"Olá.",W=D.required?`Informe seu ${D.label} para continuar.`:`Gostaria de deixar seu ${D.label}?`;return{eyebrow:F,title:I,subtitle:W}},g=e.computed(()=>w(s.value)),$=b=>b==="email"?"email":b==="phone"?"tel":"text",A=b=>b==="email"?"email":b==="phone"?"call":fe(b)?"person":b==="order"?"receipt":"badge",S=b=>b.required?`${b.label} *`:b.label,_=b=>fe(b.name)?"Seu nome":b.name==="phone"?"Seu telefone":b.name==="email"?"Seu e-mail":b.name==="cpf"?"000.000.000-00":b.placeholder||b.label,k=b=>{if(b==="phone")return n;if(b==="cpf")return r},B=()=>{v.value&&o("submit",{...c})};return{stepTransition:m,currentField:f,canContinue:h,currentStep:s,isLastStep:d,stepIntro:g,fieldHost:i,showBack:p,fields:u,form:c,continueStep:()=>{if(h.value){if(d.value||u.value.length===0)return B();l.value="forward",s.value+=1}},canContinueAt:x,introFor:w,fieldLabel:S,fieldPlaceholder:_,fieldType:$,fieldMask:k,fieldIcon:A,goBack:()=>{if(s.value>0){l.value="back",s.value-=1;return}o("back")}}}function fo(t){const o=e.computed(()=>t.small?"!wu-h-8 !wu-min-h-[2rem]":"!wu-h-12 !wu-min-h-[3rem]"),n=e.computed(()=>"!wu-text-xs"),r=e.computed(()=>t.fluid?"!wu-w-full":"wu-w-fit");return{height:o,textSize:n,width:r}}function wn(t,o){const n=e.computed(()=>({"!wu-font-plus":o.plus,"!wu-font-inter":o.inter,"!wu-font-titillium":o.titillium,"!wu-font-mono":o.mono})),r=e.computed(()=>({"!wu-text-white":o.white,"!wu-text-primary":o.primary,"!wu-text-secondary":o.secondary,"!wu-text-base":o.neutral,"!wu-text-neutral dark:!wu-text-neutral-200":o.gray})),a=e.computed(()=>({"!wu-font-thin":o.thin,"!wu-font-extralight":o.extralight,"!wu-font-light":o.light,"!wu-font-normal":o.normal,"!wu-font-medium":o.medium,"!wu-font-semibold":o.semibold,"!wu-font-bold":o.bold,"!wu-font-extrabold":o.extrabold,"!wu-font-black":o.black})),s=e.computed(()=>({...{title:{"!wu-text-xl":o.small,"!wu-text-2xl":o.base,"!wu-text-3xl":o.large,"!wu-text-4xl":o.extraLarge},subtitle:{"!wu-text-sm":o.small,"!wu-text-md":o.base,"!wu-text-xl":o.large},text:{"!wu-text-xxs":o.extraSmall,"!wu-text-xs":o.small,"!wu-text-sm":o.base,"!wu-text-lg":o.large,"!wu-text-2xl":o.extraLarge}}[t]}));return{fontClass:n,colorClass:r,weightClass:a,sizeClass:s}}const hn=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:a,sizeClass:s}=wn("text",o);return(l,i)=>(e.openBlock(),e.createElementBlock("p",{class:e.normalizeClass(["wu-font-primary wu-text-sm wu-font-normal wu-text-gray-900 dark:wu-text-neutral-100",[e.unref(n),e.unref(r),e.unref(a),e.unref(s)]])},[e.renderSlot(l.$slots,"default",{},void 0,!0)],2))}}),Ee=(t,o)=>{const n=t.__vccOpts||t;for(const[r,a]of o)n[r]=a;return n},T=Ee(hn,[["__scopeId","data-v-5fc0fe9d"]]),E=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?"wu-w-fit wu-h-fit":o.full?"wu-w-full wu-h-full":""),r=e.computed(()=>o.justifyEnd?"wu-items-end wu-justify-end":o.center?"wu-items-center wu-justify-center":o.centerBetween?"wu-items-center wu-justify-between":""),a=e.computed(()=>o.row?"wu-flex-row":o.col?"wu-flex-col":"wu-flex-row"),s=e.computed(()=>o.gapBase?"wu-gap-4":o.gapXs?"wu-gap-1":o.gapSm?"wu-gap-2":o.gapMd?"wu-gap-6":o.gapLg?"wu-gap-8":o.gapNone?"wu-gap-0":"wu-gap-4"),l=e.computed(()=>o.wrap?"wu-flex-wrap":""),i=e.computed(()=>o.paddingXs?"wu-p-1":o.paddingSm?"wu-p-2":o.paddingBase?"wu-p-4":o.paddingMd?"wu-p-6":o.paddingLg?"wu-p-8":""),u=e.computed(()=>o.border?"wu-border":o.borderPrimary?"wu-border wu-border-primary":""),c=e.computed(()=>o.rounded?"wu-rounded-lg":o.roundedTop?"wu-rounded-t-md":o.roundedBottom?"wu-rounded-b-md":""),f=e.computed(()=>o.bgPrimary?"wu-bg-primary":o.bgWhite?"wu-bg-white":""),d=e.computed(()=>o.divisor&&o.col?"wu-divide-y":o.divisor&&o.row?"wu-divide-x":""),p=e.computed(()=>[a.value,s.value,l.value,i.value,r.value,u.value,c.value,f.value,n.value,d.value]);return(m,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-flex",p.value])},[e.renderSlot(m.$slots,"default")],2))}}),gn={class:"wu-flex wu-flex-col wu-items-stretch wu-w-full wu-cursor-text wu-gap-1","data-testid":"app-form-text-input"},vn=["value","type","placeholder","disabled","maxlength","aria-invalid"],vt=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,a=n,s=e.computed(()=>e.useSlots());function l(h){return!!s.value[h]}const i=e.ref(""),u=e.ref(!1);function c(h){if(!r.maskFunction)return h;try{const y=r.maskFunction(h);return typeof y=="string"?y:h}catch{return h}}e.watch(()=>r.modelValue,h=>{if(h==null){i.value="";return}i.value=r.maskFunction?c(h):h},{immediate:!0});const{width:f}=fo(r),d=e.computed(()=>r.invalid?"wu-text-red-500":r.valid?"wu-text-green-500":""),p=e.computed(()=>r.invalid?"wu-text-red-600 placeholder:wu-text-red-300 placeholder:wu-font-medium":r.valid?"wu-text-green-700 placeholder:wu-font-medium":"wu-text-gray-900 placeholder:wu-text-gray-400 placeholder:wu-font-medium dark:wu-text-neutral-100 dark:placeholder:wu-text-neutral-500"),m=e.computed(()=>r.invalid?"wu-text-red-500":r.valid?"wu-text-green-500":"wu-text-gray-500"),v=e.computed(()=>r.disabled?"wu-opacity-50 wu-pointer-events-none":"");function x(h){const w=h.target.value;i.value=r.maskFunction?c(w):w,a("update:modelValue",i.value)}return o({focus:u,content:i}),(h,y)=>(e.openBlock(),e.createBlock(E,{class:e.normalizeClass([e.unref(f),v.value]),col:"","gap-none":""},{default:e.withCtx(()=>[e.createElementVNode("label",gn,[l("default")?(e.openBlock(),e.createBlock(T,{key:0,small:"",gray:"",class:e.normalizeClass([d.value])},{default:e.withCtx(()=>[e.renderSlot(h.$slots,"default")]),_:3},8,["class"])):e.createCommentVNode("",!0),e.createElementVNode("input",{class:e.normalizeClass(["wu-w-full wu-bg-transparent wu-border-0 wu-outline-none wu-p-0 wu-m-0 wu-appearance-none wu-font-primary wu-text-2xl wu-leading-tight wu-caret-gray-900 dark:wu-caret-white",[p.value]]),value:i.value,type:t.type,placeholder:t.placeholder,disabled:t.disabled,maxlength:t.maxLength,"aria-invalid":t.invalid?!0:void 0,onInput:x,onFocus:y[0]||(y[0]=w=>u.value=!0),onBlur:y[1]||(y[1]=w=>u.value=!1),onKeyup:y[2]||(y[2]=e.withKeys(w=>a("keyup-enter"),["enter"]))},null,42,vn)]),l("feedback")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["wu-mt-1",[m.value]])},[e.renderSlot(h.$slots,"feedback")],2)):e.createCommentVNode("",!0)]),_:3},8,["class"]))}});function yn(t){const o=e.computed(()=>t.small?"!wu-h-8 !wu-min-h-[2rem]":""),n=e.computed(()=>"!wu-text-xs"),r=e.computed(()=>t.small?"wu-px-[0.625rem]":"wu-p-[0.9rem]"),a=e.computed(()=>t.fluid?"!wu-w-full":"wu-w-fit");return{height:o,textSize:n,padding:r,width:a}}const V=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?"!wu-text-xs wu-w-4 wu-h-4":o.large?"!wu-text-xl wu-w-8 wu-h-8":o.extraLarge?"!wu-text-4xl wu-w-10 wu-h-10":"!wu-text-base wu-w-6 wu-h-6"),r=e.computed(()=>o.dark?"wu-text-neutral-800 dark:wu-text-white":o.light?"wu-text-white dark:wu-text-neutral-800":o.gray?"wu-text-gray-500 dark:wu-text-neutral-400":""),a=e.computed(()=>o.outlined?"material-symbols-outlined":"wu-material-icons");return(s,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["notranslate wu-flex wu-items-center wu-justify-center wu-text-center",[n.value,r.value,a.value]]),"data-testid":"app-icon"},[e.renderSlot(s.$slots,"default")],2))}}),xn=["disabled"],kn={class:"wu-flex wu-items-center wu-justify-center wu-gap-2"},O=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(m){return!!n.value[m]}const{height:a,textSize:s,padding:l,width:i}=yn(o),u=e.computed(()=>o.soft?"wu-bg-primary-50 !wu-text-primary-400":o.alert?"wu-bg-red-500 !wu-text-white":o.warning?"wu-bg-amber-500 !wu-text-white":o.success?"wu-bg-green-500 !wu-text-white":o.outline?"wu-bg-transparent !wu-border-gray-200 hover:!wu-bg-gray-100 hover:!wu-border-gray-300 dark:!wu-border-neutral-600 dark:hover:!wu-bg-neutral-700 dark:hover:!wu-border-neutral-500 dark:!wu-text-neutral-100":o.ghost?"wu-bg-transparent !wu-text-gray-700 hover:!wu-bg-gray-100 dark:!wu-text-neutral-200 dark:hover:!wu-bg-neutral-700":o.link?"wu-bg-transparent !wu-text-blue-600 hover:wu-underline":"wu-bg-primary-500 !wu-text-[var(--wu-primary-fg)]"),c=e.computed(()=>o.block?"wu-rounded-none":o.round?"wu-rounded-full":"wu-rounded-lg"),f=e.computed(()=>o.icon&&o.small?"!wu-w-8 !wu-h-8 wu-p-0":o.icon?"!wu-w-11 !wu-h-11 wu-p-0":l.value),d=e.computed(()=>o.icon?"wu-justify-center":"wu-justify-between"),p=e.computed(()=>o.disabled||o.loading?"wu-opacity-50 wu-pointer-events-none":"");return(m,v)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["wu-inline-flex wu-items-center wu-gap-2 wu-cursor-pointer wu-transition-all wu-border wu-border-transparent disabled:wu-opacity-50 disabled:wu-pointer-events-none hover:wu-opacity-80 focus:wu-outline-hidden focus:wu-opacity-80",[e.unref(s),u.value,c.value,e.unref(i),e.unref(a),p.value,f.value,d.value]]),type:"button",disabled:t.disabled||t.loading,"data-testid":"app-button",onClick:v[0]||(v[0]=x=>m.$emit("click",x))},[e.createElementVNode("div",kn,[t.loading?(e.openBlock(),e.createBlock(V,{key:0,class:"wu-animate-spin wu-flex wu-items-center wu-justify-center",small:"",outlined:""},{default:e.withCtx(()=>[...v[1]||(v[1]=[e.createTextVNode("progress_activity",-1)])]),_:1})):r("icon")?(e.openBlock(),e.createBlock(V,{key:1,small:""},{default:e.withCtx(()=>[e.renderSlot(m.$slots,"icon")]),_:3})):e.createCommentVNode("",!0),!t.loading&&r("default")?(e.openBlock(),e.createBlock(T,{key:2,class:"!wu-text-inherit",small:""},{default:e.withCtx(()=>[e.renderSlot(m.$slots,"default")]),_:3})):e.createCommentVNode("",!0)]),!t.loading&&r("trailing")?(e.openBlock(),e.createBlock(V,{key:0,small:""},{default:e.withCtx(()=>[e.renderSlot(m.$slots,"trailing")]),_:3})):e.createCommentVNode("",!0)],10,xn))}}),bn=["aria-hidden"],Cn=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,a=n,s=e.useSlots(),l=e.ref(null),i=e.ref(null),u=e.ref(0),c=e.ref(0),f=e.ref(!1);let d=null;const p=e.computed(()=>Math.max(r.modelValue,0)),m=()=>(s.default?.()??[]).flatMap(k=>k.type===e.Comment||k.type===e.Text?[]:k.type===e.Fragment?(k.children??[]).filter(B=>!!B&&typeof B=="object"&&B.type!==e.Comment&&B.type!==e.Text):[k]),v=k=>{const B=Math.abs(k-p.value);return B===0?"is-active":B===1?"is-adjacent":"is-far"},x=k=>{const B=i.value?.childElementCount||m().length,N=Math.min(Math.max(k,0),Math.max(B-1,0));N!==r.modelValue&&a("update:modelValue",N)},h=()=>{const k=l.value;k&&(k.scrollLeft&&(k.scrollLeft=0),k.scrollTop&&(k.scrollTop=0))},y=(k,B)=>{const N=getComputedStyle(k)[B].trim(),P=parseFloat(N);if(!Number.isFinite(P)||P<=0)return 0;if(N.endsWith("%")){const b=B==="scrollPaddingTop"?k.clientHeight:k.clientWidth;return P/100*b}return P},w=()=>{const k=l.value,B=i.value;if(!k||!B)return;h();const N=[...B.children],P=parseFloat(getComputedStyle(B).gap)||0,b=r.vertical?"scrollPaddingTop":"scrollPaddingLeft",D=y(k,b),z=I=>r.vertical?I.offsetHeight:I.offsetWidth,F=N[p.value]?z(N[p.value]):0,H=r.vertical&&r.fill?Math.max((k.clientHeight-F)/2,0):D,j=N.slice(0,p.value).reduce((I,W)=>I+z(W)+P,0);u.value=H-j,c.value=r.vertical&&!r.fill?F+D*2:0,f.value=!0},g=()=>{d?.disconnect();const k=l.value,B=i.value;if(!(!k||!B)&&(w(),!(typeof ResizeObserver>"u"))){if(d=new ResizeObserver(w),d.observe(k),r.vertical)for(const N of B.children)d.observe(N);k.removeEventListener("scroll",h),k.addEventListener("scroll",h,{passive:!0})}},$=e.computed(()=>[r.vertical?"wu-carousel--vertical":"wu-carousel--horizontal",{"is-ready":f.value,"wu-carousel--fill":r.fill}]),A=e.computed(()=>r.vertical?"wu-flex-col wu-items-stretch":"wu-flex-row wu-items-center"),S=e.computed(()=>{if(!(!r.vertical||r.fill||!c.value))return{height:`${c.value}px`}}),_=e.computed(()=>{const k=`${u.value}px`;return{transform:r.vertical?`translate3d(0, ${k}, 0)`:`translate3d(${k}, 0, 0)`}});return e.watch(()=>[r.vertical,r.fill,r.modelValue],async()=>{await e.nextTick(),g()}),e.onMounted(async()=>{await e.nextTick(),g()}),e.onBeforeUnmount(()=>{d?.disconnect(),l.value?.removeEventListener("scroll",h)}),o({next:()=>x(p.value+1),prev:()=>x(p.value-1),goTo:x}),(k,B)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-relative wu-w-full wu-overflow-hidden",$.value]),ref_key:"rootRef",ref:l,"data-testid":"app-carousel",style:e.normalizeStyle(S.value)},[e.createElementVNode("div",{class:e.normalizeClass(["wu-carousel-track wu-flex",A.value]),ref_key:"trackRef",ref:i,style:e.normalizeStyle(_.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m(),(N,P)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-carousel-slide",v(P)]),key:N.key??P,"aria-hidden":P!==p.value,"data-testid":"app-carousel-slide"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N)))],10,bn))),128))],6)],6))}}),Ue=Ee(Cn,[["__scopeId","data-v-96f06600"]]),Bn={class:"wu-flex wu-flex-col wu-w-full wu-h-full"},$n={class:"wu-relative wu-flex wu-items-center wu-w-full wu-shrink-0"},_n={class:"wu-flex wu-shrink-0 wu-items-center wu-w-fit wu-justify-center wu-px-6 wu-py-4"},Nn={class:"wu-absolute wu-inset-0 wu-flex wu-items-center wu-justify-center wu-pointer-events-none"},Vn={class:"wu-flex wu-items-center wu-gap-1.5"},yt=e.defineComponent({__name:"app-identification-page",props:{rule:{},edges:{}},emits:["submit","back"],setup(t,{emit:o}){const n=t,r=o,{currentStep:a,fieldHost:s,showBack:l,fields:i,form:u,continueStep:c,canContinueAt:f,introFor:d,fieldPlaceholder:p,fieldType:m,fieldMask:v,goBack:x}=fn(()=>n.rule,r);return(h,y)=>(e.openBlock(),e.createElementBlock("div",Bn,[e.createElementVNode("div",$n,[e.createElementVNode("div",_n,[e.createElementVNode("div",{class:e.normalizeClass(["wu-flex wu-items-center wu-w-fit wu-justify-center wu-cursor-pointer wu-group",{"wu-invisible wu-pointer-events-none":!e.unref(l)}]),onClick:y[0]||(y[0]=(...w)=>e.unref(x)&&e.unref(x)(...w))},[e.createVNode(V,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200",small:"",gray:""},{default:e.withCtx(()=>[...y[2]||(y[2]=[e.createTextVNode("chevron_left",-1)])]),_:1}),e.createVNode(T,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200","extra-small":"",medium:"",gray:""},{default:e.withCtx(()=>[...y[3]||(y[3]=[e.createTextVNode("Voltar",-1)])]),_:1})],2)]),e.createElementVNode("div",Nn,[e.createElementVNode("div",Vn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(w,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-h-1 wu-w-6 wu-rounded-full wu-transition-colors",g<=e.unref(a)?"wu-bg-gray-900 dark:wu-bg-white":"wu-bg-gray-200 dark:wu-bg-neutral-600"]),key:g},null,2))),128))])])]),e.createElementVNode("div",{class:"wu-flex-1 wu-min-h-0 wu-w-full wu-px-6 wu-pb-12",ref_key:"fieldHost",ref:s},[e.createVNode(Ue,{class:"wu-w-full wu-h-full",modelValue:e.unref(a),"onUpdate:modelValue":y[1]||(y[1]=w=>e.isRef(a)?a.value=w:null),vertical:"",fill:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(w,g)=>(e.openBlock(),e.createBlock(E,{class:"wu-w-full wu-gap-8",key:w.name,col:"",center:""},{default:e.withCtx(()=>[e.createVNode(E,{class:"wu-w-full wu-relative wu-pr-6",col:"","gap-sm":""},{default:e.withCtx(()=>[e.unref(d)(g).title?(e.openBlock(),e.createBlock(T,{key:0,class:"wu-text-left","extra-large":"",semibold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)(g).title),1)]),_:2},1024)):e.createCommentVNode("",!0),e.unref(d)(g).subtitle?(e.openBlock(),e.createBlock(T,{key:1,class:"wu-text-left",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)(g).subtitle),1)]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(T,{class:"wu-opacity-50 wu-absolute -wu-top-2 wu-right-0",gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g+1),1)]),_:2},1024)]),_:2},1024),e.createVNode(E,{class:"wu-w-full wu-items-center",col:"","gap-md":""},{default:e.withCtx(()=>[e.createVNode(vt,{modelValue:e.unref(u)[w.name],"onUpdate:modelValue":$=>e.unref(u)[w.name]=$,"mask-function":e.unref(v)(w.name),placeholder:e.unref(p)(w),type:e.unref(m)(w.name),onKeyupEnter:e.unref(c),fluid:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","mask-function","placeholder","type","onKeyupEnter"]),e.createVNode(O,{fluid:"",disabled:!e.unref(f)(g),onClick:e.unref(c)},{trailing:e.withCtx(()=>[...y[4]||(y[4]=[e.createTextVNode("arrow_forward",-1)])]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g>=e.unref(i).length-1?"Finalizar":"Continuar"),1)]),_:2},1032,["disabled","onClick"])]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["modelValue"])],512)]))}}),Sn=["disabled"],Tn=["src"],xt=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?"wu-bg-transparent !wu-border-gray-200 hover:!wu-bg-gray-100 hover:!wu-border-gray-300":o.ghost?"wu-bg-transparent !wu-text-gray-700 hover:!wu-bg-gray-100":"wu-bg-gradient-to-br wu-from-primary-500 wu-to-secondary-500 wu-text-white"),a=e.computed(()=>n.value?o.small?"wu-h-12 wu-w-fit wu-px-3 wu-gap-2":o.large?"wu-h-16 wu-w-fit wu-px-5 wu-gap-3":"wu-h-14 wu-w-fit wu-px-4 wu-gap-2":o.small?"wu-w-12 wu-h-12 wu-p-0":o.large?"wu-w-16 wu-h-16 wu-p-0":"wu-w-14 wu-h-14 wu-p-0"),s=e.computed(()=>o.small?"wu-w-6 wu-h-6":o.large?"wu-w-8 wu-h-8":"wu-w-7 wu-h-7"),l=e.computed(()=>o.disabled||o.loading?"wu-opacity-50 wu-pointer-events-none":"");return(i,u)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["wu-rounded-full wu-inline-flex wu-items-center wu-justify-center wu-cursor-pointer wu-overflow-hidden wu-transition-all wu-border wu-border-transparent hover:wu-opacity-80 focus:wu-outline-hidden focus:wu-opacity-80 disabled:wu-opacity-50 disabled:wu-pointer-events-none",[a.value,r.value,l.value]]),type:"button","data-testid":"app-anchor",disabled:t.disabled||t.loading,onClick:u[0]||(u[0]=c=>i.$emit("click",c))},[t.loading?(e.openBlock(),e.createBlock(V,{key:0,class:"wu-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(["wu-object-contain wu-pointer-events-none wu-select-none wu-shrink-0",s.value]),src:t.logo,alt:"","data-testid":"app-anchor-logo"},null,10,Tn)):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createBlock(T,{key:2,class:"!wu-text-inherit wu-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,Sn))}}),An="widgets",En={"widget-base-screen":"desktop_windows","widget-identification-screen":"assignment","widget-article-screen":"description","widget-service-screen":"chat"},Rt={chat:"chat",voice:"phone_in_talk"},Pn=t=>{if(t.action==="widget-service-screen"){const o=t.settings?.behavior;if(o&&o in Rt)return Rt[o]}return En[t.action]??An},Mn={key:0,class:"wu-flex wu-flex-col wu-items-center wu-gap-2","data-testid":"app-edge"},Ln=["src"],Rn={key:1,class:"wu-w-full wu-max-w-[25rem]","data-testid":"app-edge"},Dn=["src"],he=e.defineComponent({__name:"app-edge",props:{edge:{},icon:{type:Boolean}},emits:["click"],setup(t,{emit:o}){const n=t,r=o,a=e.computed(()=>n.edge.settings?.header?.logo),s=e.computed(()=>Pn(n.edge));return(l,i)=>t.icon?(e.openBlock(),e.createElementBlock("div",Mn,[e.createVNode(O,{outline:"",icon:"",onClick:i[0]||(i[0]=u=>r("click",t.edge))},{icon:e.withCtx(()=>[a.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-5 wu-h-5 wu-object-contain",src:a.value,alt:""},null,8,Ln)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(s.value),1)],64))]),_:1}),e.createVNode(T,{class:"wu-w-20 wu-text-center wu-leading-3 wu-line-clamp-2","extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.edge.name),1)]),_:1})])):(e.openBlock(),e.createElementBlock("div",Rn,[e.createVNode(O,{class:"hover:wu-translate-x-1",outline:"",fluid:"",onClick:i[1]||(i[1]=u=>r("click",t.edge))},{icon:e.withCtx(()=>[a.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-4 wu-h-4 wu-object-contain",src:a.value,alt:""},null,8,Dn)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(s.value),1)],64))]),trailing:e.withCtx(()=>[...i[2]||(i[2]=[e.createTextVNode("chevron_right",-1)])]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.edge.name),1)]),_:1})]))}}),On={class:"wu-flex wu-flex-col wu-w-full wu-gap-8"},zn={key:0,class:"wu-flex wu-items-center wu-w-fit wu-justify-center wu-h-0"},In=["innerHTML"],Fn={key:2,class:"wu-flex wu-flex-col wu-items-center wu-justify-start wu-gap-2 wu-px-6 wu-w-full"},Hn=e.defineComponent({__name:"app-article-page",props:{rule:{},edges:{}},emits:["edge-click"],setup(t,{emit:o}){const n=t,r=o,{history:a,language:s}=pe(),l=e.computed(()=>a.value.length>0),i=e.computed(()=>n.edges??[]),u=e.computed(()=>i.value.slice(0,3)),c=e.computed(()=>i.value.slice(3)),f=e.computed(()=>n.rule.settings?.body),d=m=>{if(!m)return"";const v=s.value;return m[v]??m["pt-BR"]??Object.values(m).find(Boolean)??""},p=e.computed(()=>d(f.value?.content));return(m,v)=>(e.openBlock(),e.createElementBlock("div",On,[l.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",zn)),p.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"wu-px-6 wu-w-full wu-article-content wu-font-primary wu-text-neutral dark:wu-text-neutral-200","data-testid":"app-article-content",innerHTML:p.value},null,8,In)):e.createCommentVNode("",!0),i.value.length?(e.openBlock(),e.createElementBlock("div",Fn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,x=>(e.openBlock(),e.createBlock(he,{key:x.id,edge:x,onClick:v[0]||(v[0]=h=>r("edge-click",h))},null,8,["edge"]))),128)),c.value.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["wu-flex wu-items-start wu-overflow-x-auto wu-w-full invisible-scrollbar wu-pt-6",{"wu-justify-start":c.value.length>4,"wu-justify-center":c.value.length<=4}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,x=>(e.openBlock(),e.createBlock(he,{key:x.id,edge:x,icon:"",onClick:v[1]||(v[1]=h=>r("edge-click",h))},null,8,["edge"]))),128))],2)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))}}),kt=Ee(Hn,[["__scopeId","data-v-97683cd0"]]),jn=120,Wn=()=>typeof MediaRecorder>"u"?"audio/webm":MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":MediaRecorder.isTypeSupported("audio/webm")?"audio/webm":MediaRecorder.isTypeSupported("audio/mp4")?"audio/mp4":"audio/webm",Un=t=>t.includes("mp4")?"m4a":"webm",Dt=t=>t.toString().padStart(2,"0");function qn(){const t=e.ref(!1),o=e.ref(0),n=e.ref(null);let r=null,a=null,s=[],l=null,i="audio/webm",u=!1,c=null;const f=e.computed(()=>{const w=Math.floor(o.value/60),g=o.value%60;return`${Dt(w)}:${Dt(g)}`}),d=()=>{l&&(clearInterval(l),l=null)},p=()=>{a?.getTracks().forEach(w=>w.stop()),a=null},m=()=>{d(),p(),r=null,s=[],o.value=0,t.value=!1},v=()=>{if(!s.length)return null;const w=i.split(";")[0]||"audio/webm",g=new Blob(s,{type:w});return new File([g],`recording.${Un(w)}`,{type:w})},x=async()=>{if(n.value=null,typeof navigator>"u"||!navigator.mediaDevices?.getUserMedia)return n.value="Gravação de áudio não é suportada neste navegador",!1;try{return a=await navigator.mediaDevices.getUserMedia({audio:!0}),i=Wn(),s=[],r=new MediaRecorder(a,{mimeType:i}),r.ondataavailable=w=>{w.data.size>0&&s.push(w.data)},r.onstop=()=>{const w=u?null:v(),g=c;c=null,u=!1,m(),g?.(w)},r.start(),t.value=!0,o.value=0,l=setInterval(()=>{o.value+=1,o.value>=jn&&h()},1e3),!0}catch{return m(),n.value="Não foi possível acessar o microfone",!1}},h=()=>!r||r.state==="inactive"?(m(),Promise.resolve(null)):(d(),t.value=!1,new Promise(w=>{c=w,r?.stop(),p()})),y=async()=>{u=!0,s=[],await h()};return e.onUnmounted(()=>{y()}),{formattedDuration:f,durationSeconds:o,isRecording:t,error:n,cancel:y,start:x,stop:h}}const ee=t=>t.provider?t.provider==="opens"?"operator":"contact":"system",qe=t=>{const o=t.attachments?.data;return Array.isArray(o)?o:[]},ae=t=>qe(t)[0],Gn=t=>{if(!t)return"";const o=t instanceof Date?t:new Date(t);return Number.isNaN(o.getTime())?"":o.toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"})},wo=t=>t.type==="document"&&t.filename.toLowerCase().endsWith(".pdf"),Zn=(t,o)=>{const n=o.metadata&&typeof o.metadata=="object"?o.metadata:null,r=t.selectedValue||(typeof n?.selectedValue=="string"?n.selectedValue:void 0),a=t.selectedOption||(typeof n?.selectedOption=="string"?n.selectedOption:void 0),s=t.selectedAt||(typeof n?.selectedAt=="string"?n.selectedAt:void 0);return{selectedValue:r,selectedOption:a,selectedAt:s}},Oe=t=>{const o=t.messageBody;if(!o)return null;try{const n=typeof o=="string"?JSON.parse(o):o;if(!n||!Array.isArray(n.menu))return null;const{selectedValue:r,selectedOption:a,selectedAt:s}=Zn(n,t),i=!!(r||a)||t.canBeInteractedWith===!1;return{description:n.description||"",selectedOption:a,selectedValue:r,selectedAt:s,menu:n.menu.map(u=>{const c=!!(r&&u.value===r||a&&u.label===a);return{...u,selected:c,disabled:i?!0:!!u.disabled}})}}catch{return null}},Kn=(t,o)=>{if(!t||!o)return!1;const n=new Date(t),r=new Date(o);return Number.isNaN(n.getTime())||Number.isNaN(r.getTime())?!1:Math.floor(n.getTime()/6e4)===Math.floor(r.getTime()/6e4)},Xn=t=>!!(t&&t.messageType==="image"&&!t.caption),Yn=(t=[])=>{if(!t.length)return[];const o=[];let n=[];const r=()=>{if(n.length){if(n.length===1)o.push(n[0]);else{const a=n[0];o.push({id:typeof a.id=="number"?a.id:void 0,provider:a.provider,recipientId:a.recipientId,messageType:"_grouped_images",messageBody:"",createdAt:a.createdAt,canBeInteractedWith:!1,messages:[...n]})}n=[]}};for(const a of t){if(!Xn(a)){r(),o.push(a);continue}if(!n.length){n.push(a);continue}const s=n[n.length-1];if(ee(s)===ee(a)&&Kn(s.createdAt,a.createdAt)){n.push(a);continue}r(),n.push(a)}return r(),o},ke=t=>ee(t)==="system",Qn=["src","alt"],Jn=["src"],er=["src"],tr=["title"],Ge=e.defineComponent({__name:"app-media-preview",props:{open:{type:Boolean},items:{},index:{}},emits:["close","update:index"],setup(t,{emit:o}){const n=t,r=o,a=e.computed({get:()=>n.index??0,set:p=>r("update:index",p)}),s=e.computed(()=>a.value>0),l=e.computed(()=>a.value<n.items.length-1),i=e.computed(()=>n.items.length>1),u=()=>r("close"),c=()=>{s.value&&(a.value-=1)},f=()=>{l.value&&(a.value+=1)},d=p=>{n.open&&(p.key==="Escape"&&u(),p.key==="ArrowLeft"&&c(),p.key==="ArrowRight"&&f())};return e.watch(()=>n.open,p=>{p?window.addEventListener("keydown",d):window.removeEventListener("keydown",d)}),e.onBeforeUnmount(()=>{window.removeEventListener("keydown",d)}),(p,m)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[t.open&&t.items.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:"wu-fixed wu-inset-0 wu-flex wu-items-center wu-justify-center wu-overflow-hidden wu-bg-black wu-bg-opacity-90 wu-z-[100000]","data-testid":"app-media-preview",onClick:u},[e.createElementVNode("button",{class:"wu-absolute wu-top-4 wu-right-4 wu-flex wu-items-center wu-justify-center wu-w-10 wu-h-10 wu-rounded-full wu-bg-black wu-bg-opacity-50 wu-border-0 wu-cursor-pointer",type:"button","data-testid":"app-media-preview-close",onClick:e.withModifiers(u,["stop"])},[e.createVNode(V,{light:""},{default:e.withCtx(()=>[...m[2]||(m[2]=[e.createTextVNode("close",-1)])]),_:1})]),i.value&&s.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"wu-absolute wu-left-4 wu-z-10 wu-flex wu-items-center wu-justify-center wu-w-10 wu-h-10 wu-rounded-full wu-bg-black wu-bg-opacity-50 wu-border-0 wu-cursor-pointer",type:"button","data-testid":"app-media-preview-prev",onClick:e.withModifiers(c,["stop"])},[e.createVNode(V,{light:""},{default:e.withCtx(()=>[...m[3]||(m[3]=[e.createTextVNode("chevron_left",-1)])]),_:1})])):e.createCommentVNode("",!0),i.value&&l.value?(e.openBlock(),e.createElementBlock("button",{key:1,class:"wu-absolute wu-right-4 wu-z-10 wu-flex wu-items-center wu-justify-center wu-w-10 wu-h-10 wu-rounded-full wu-bg-black wu-bg-opacity-50 wu-border-0 wu-cursor-pointer",type:"button","data-testid":"app-media-preview-next",onClick:e.withModifiers(f,["stop"])},[e.createVNode(V,{light:""},{default:e.withCtx(()=>[...m[4]||(m[4]=[e.createTextVNode("chevron_right",-1)])]),_:1})])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"wu-w-full wu-h-full wu-flex wu-items-center wu-justify-center",onClick:m[1]||(m[1]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(Ue,{class:"wu-w-full",modelValue:a.value,"onUpdate:modelValue":m[0]||(m[0]=v=>a.value=v)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(v,x)=>(e.openBlock(),e.createElementBlock("div",{class:"wu-flex wu-flex-col wu-items-center wu-justify-center wu-gap-3",key:`${v.src}-${x}`},[v.type==="image"?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-rounded wu-object-contain wu-w-full wu-max-h-[80vh]",src:v.src,alt:v.filename||"Imagem"},null,8,Qn)):v.type==="video"?(e.openBlock(),e.createElementBlock("video",{key:1,class:"wu-rounded wu-object-contain wu-w-full wu-max-h-[80vh]",src:v.src,controls:""},null,8,Jn)):v.type==="pdf"?(e.openBlock(),e.createElementBlock("iframe",{key:2,class:"wu-bg-white wu-rounded wu-w-full wu-h-[85vh]",src:v.src,frameborder:"0"},null,8,er)):e.createCommentVNode("",!0),v.filename?(e.openBlock(),e.createElementBlock("p",{key:3,class:"wu-text-white wu-text-xs wu-opacity-75 wu-truncate wu-max-w-full",title:v.filename},e.toDisplayString(v.filename),9,tr)):e.createCommentVNode("",!0)]))),128))]),_:1},8,["modelValue"])])])):e.createCommentVNode("",!0)]))}}),or=["onClick"],nr=["src","alt"],rr={key:1,class:"wu-flex wu-items-center wu-justify-center wu-w-full wu-h-full"},ar={key:2,class:"wu-absolute wu-inset-0 wu-flex wu-items-center wu-justify-center wu-bg-black wu-bg-opacity-50"},sr={class:"wu-text-white wu-text-lg wu-font-semibold"},lr=e.defineComponent({__name:"app-message-grouped-images",props:{message:{}},setup(t){const o=t,n=e.computed(()=>o.message.messages||[]),r=e.computed(()=>n.value.slice(0,4)),a=e.computed(()=>Math.max(0,n.value.length-4)),s=f=>ae(f)?.link||"",l=e.ref(!1),i=e.ref(0),u=e.computed(()=>{const f=[];for(const d of n.value){const p=ae(d);p?.link&&f.push({src:p.link,type:"image",filename:p.filename})}return f}),c=f=>{u.value.length&&(i.value=Math.min(f,u.value.length-1),l.value=!0)};return(f,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-grid wu-gap-1 wu-rounded wu-overflow-hidden wu-min-w-[12rem]",r.value.length===1?"wu-grid-cols-1":"wu-grid-cols-2"]),"data-testid":"app-message-grouped-images"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(p,m)=>(e.openBlock(),e.createElementBlock("div",{class:"wu-relative wu-aspect-square wu-bg-gray-100 wu-cursor-pointer dark:wu-bg-neutral-800",key:p.id??m,onClick:v=>c(m)},[s(p)?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-full wu-h-full wu-object-cover",src:s(p),alt:e.unref(ae)(p)?.filename||"Imagem"},null,8,nr)):(e.openBlock(),e.createElementBlock("div",rr,[e.createVNode(V,{gray:"",large:""},{default:e.withCtx(()=>[...d[2]||(d[2]=[e.createTextVNode("image",-1)])]),_:1})])),m===r.value.length-1&&a.value>0?(e.openBlock(),e.createElementBlock("div",ar,[e.createElementVNode("span",sr,e.toDisplayString(`+${a.value}`),1)])):e.createCommentVNode("",!0)],8,or))),128)),e.createVNode(Ge,{open:l.value,items:u.value,index:i.value,onClose:d[0]||(d[0]=p=>l.value=!1),"onUpdate:index":d[1]||(d[1]=p=>i.value=p)},null,8,["open","items","index"])],2))}}),ir=["disabled"],ur={key:0,class:"wu-w-2 wu-h-2 wu-rounded-full wu-bg-primary-600 wu-shrink-0"},Pe=e.defineComponent({__name:"app-audio-player",props:{src:{},file:{}},setup(t){const o=t,n=e.ref(null),r=e.ref(!1),a=e.ref(0),s=e.ref(0),l=e.ref(1),i=e.ref(null),u=B=>Math.floor(B).toString().padStart(2,"0"),c=B=>{if(!Number.isFinite(B)||B<0)return"00:00";const N=Math.floor(B/60),P=Math.floor(B%60);return`${u(N)}:${u(P)}`},f=e.computed(()=>!s.value||!Number.isFinite(s.value)?0:Math.min(100,a.value/s.value*100)),d=e.computed(()=>Number.isFinite(s.value)&&s.value>0),p=e.computed(()=>`${c(a.value)} / ${c(s.value)}`),m=()=>{i.value&&(URL.revokeObjectURL(i.value),i.value=null)},v=()=>{if(m(),o.src)return o.src;if(o.file)return i.value=URL.createObjectURL(e.toRaw(o.file)),i.value},x=()=>{s.value=n.value?.duration||0},h=()=>{a.value=n.value?.currentTime||0},y=()=>{r.value=!1,a.value=0,n.value&&(n.value.currentTime=0)},w=()=>{n.value&&(n.value.pause(),n.value.removeEventListener("loadedmetadata",x),n.value.removeEventListener("timeupdate",h),n.value.removeEventListener("ended",y),n.value=null,r.value=!1,a.value=0,s.value=0)},g=()=>{w();const B=v();if(!B)return;const N=new Audio(B);N.addEventListener("loadedmetadata",x),N.addEventListener("timeupdate",h),N.addEventListener("ended",y),N.playbackRate=l.value,n.value=N},$=async()=>{!n.value||!d.value||(await n.value.play(),r.value=!0)},A=()=>{n.value&&(n.value.pause(),r.value=!1)},S=()=>{r.value?A():$()},_=B=>{if(!n.value||!d.value)return;const P=B.currentTarget.getBoundingClientRect(),b=Math.min(1,Math.max(0,(B.clientX-P.left)/P.width));n.value.currentTime=b*s.value,a.value=n.value.currentTime},k=()=>{l.value=Math.max(1,(l.value+.5)%2.5),n.value&&(n.value.playbackRate=l.value)};return e.watch(()=>[o.src,o.file],()=>g(),{immediate:!0}),e.onBeforeUnmount(()=>{w(),m()}),(B,N)=>(e.openBlock(),e.createBlock(E,{class:"wu-w-full wu-min-w-0 wu-items-center","data-testid":"app-audio-player","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(O,{"data-testid":"app-audio-player-toggle",onClick:S,disabled:!d.value,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(V,{gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value?"pause":"play_arrow"),1)]),_:1})]),_:1},8,["disabled"]),e.createVNode(E,{class:"wu-flex-1 wu-min-w-0",col:"","gap-xs":""},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"wu-w-full wu-rounded-full wu-bg-gray-200 wu-cursor-pointer wu-overflow-hidden wu-h-1.5 dark:wu-bg-neutral-700 disabled:wu-cursor-default",type:"button","data-testid":"app-audio-player-seek",disabled:!d.value,onClick:_},[e.createElementVNode("div",{class:"wu-h-full wu-rounded-full wu-bg-primary-500 wu-transition-all wu-flex wu-items-center wu-justify-end",style:e.normalizeStyle({width:`${f.value}%`})},[f.value>0?(e.openBlock(),e.createElementBlock("div",ur)):e.createCommentVNode("",!0)],4)],8,ir),e.createVNode(T,{"extra-small":"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value),1)]),_:1})]),_:1}),e.createVNode(O,{"data-testid":"app-audio-player-speed",onClick:k,disabled:!d.value,ghost:"",small:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value)+"x",1)]),_:1},8,["disabled"])]),_:1}))}}),cr={class:"wu-flex wu-flex-col wu-gap-2 wu-min-w-[12rem]","data-testid":"app-message-attachments"},dr=["onClick"],pr=["src","alt"],mr=["src"],fr={key:2,class:"wu-flex wu-items-center wu-justify-center wu-w-full wu-h-full"},wr={key:3,class:"wu-absolute wu-inset-0 wu-flex wu-items-center wu-justify-center wu-bg-black wu-bg-opacity-50"},hr={class:"wu-text-white wu-text-lg wu-font-semibold"},gr={key:0,class:"wu-flex-1 wu-min-w-0"},vr=e.defineComponent({__name:"app-message-attachments",props:{message:{}},emits:["message-action"],setup(t,{emit:o}){const n=t,r=o,a=e.computed(()=>qe(n.message)),s=e.computed(()=>a.value.filter(y=>y.type==="image"||y.type==="video")),l=e.computed(()=>a.value.filter(y=>y.type!=="image"&&y.type!=="video")),i=e.computed(()=>s.value.slice(0,4)),u=e.computed(()=>Math.max(0,s.value.length-4)),c=e.computed(()=>n.message.caption||""),f=e.ref(!1),d=e.ref(0),p=e.ref([]),m=y=>{p.value=s.value.filter(w=>w.link).map(w=>({src:w.link,type:w.type==="video"?"video":"image",filename:w.filename})),p.value.length&&(d.value=Math.min(y,p.value.length-1),f.value=!0)},v=y=>{y.link&&(p.value=[{src:y.link,type:"pdf",filename:y.filename}],d.value=0,f.value=!0)},x=()=>{f.value=!1,p.value=[]},h=y=>{r("message-action",{action:"download",message:n.message,attachment:y})};return(y,w)=>(e.openBlock(),e.createElementBlock("div",cr,[i.value.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["wu-grid wu-gap-1 wu-rounded wu-overflow-hidden",i.value.length===1?"wu-grid-cols-1":"wu-grid-cols-2"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(g,$)=>(e.openBlock(),e.createElementBlock("div",{class:"wu-relative wu-aspect-square wu-bg-gray-100 wu-cursor-pointer dark:wu-bg-neutral-800",key:g.id,onClick:A=>m($)},[g.type==="image"&&g.link?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-full wu-h-full wu-object-cover",src:g.link,alt:g.filename},null,8,pr)):g.type==="video"&&g.link?(e.openBlock(),e.createElementBlock("video",{key:1,class:"wu-w-full wu-h-full wu-object-cover",src:g.link,preload:"metadata"},null,8,mr)):(e.openBlock(),e.createElementBlock("div",fr,[e.createVNode(V,{gray:"",large:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.type==="video"?"videocam":"image"),1)]),_:2},1024)])),$===i.value.length-1&&u.value>0?(e.openBlock(),e.createElementBlock("div",wr,[e.createElementVNode("span",hr,e.toDisplayString(`+${u.value}`),1)])):e.createCommentVNode("",!0),e.createVNode(O,{class:"wu-absolute wu-bottom-1 wu-right-1 !wu-bg-black/55 hover:!wu-bg-black/75 !wu-text-white !wu-border-0",onClick:e.withModifiers(A=>h(g),["stop"]),ghost:"",small:"",icon:"",round:""},{icon:e.withCtx(()=>[e.createVNode(V,{class:"!wu-text-white dark:!wu-text-white"},{default:e.withCtx(()=>[...w[1]||(w[1]=[e.createTextVNode("download",-1)])]),_:1})]),_:1},8,["onClick"])],8,dr))),128))],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,g=>(e.openBlock(),e.createBlock(E,{class:"wu-items-center wu-bg-white dark:wu-bg-neutral-800",key:g.id,"padding-sm":"",rounded:"",border:"","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(E,{class:"wu-w-8 wu-h-8 wu-bg-gray-200 wu-shrink-0 dark:wu-bg-neutral-700",center:"",rounded:""},{default:e.withCtx(()=>[e.createVNode(V,{gray:"",large:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.type==="audio"?"mic":"file_present"),1)]),_:2},1024)]),_:2},1024),g.type==="audio"&&g.link?(e.openBlock(),e.createElementBlock("div",gr,[e.createVNode(Pe,{src:g.link},null,8,["src"])])):(e.openBlock(),e.createBlock(T,{key:1,class:"wu-flex-1 wu-truncate wu-min-w-0",title:g.filename,semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.filename),1)]),_:2},1032,["title"])),e.unref(wo)(g)?(e.openBlock(),e.createBlock(O,{key:2,onClick:$=>v(g),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(V,{gray:""},{default:e.withCtx(()=>[...w[2]||(w[2]=[e.createTextVNode("visibility",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(O,{onClick:$=>h(g),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(V,{gray:""},{default:e.withCtx(()=>[...w[3]||(w[3]=[e.createTextVNode("download",-1)])]),_:1})]),_:1},8,["onClick"])]),_:2},1024))),128)),c.value&&(i.value.length||l.value.length)?(e.openBlock(),e.createBlock(T,{key:1,gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(Ge,{open:f.value,items:p.value,index:d.value,onClose:x,"onUpdate:index":w[0]||(w[0]=g=>d.value=g)},null,8,["open","items","index"])]))}}),yr={class:"wu-w-full wu-px-3 wu-py-2 wu-bg-primary-500"},xr=["disabled","onClick"],kr=e.defineComponent({__name:"app-message-interactive",props:{message:{}},emits:["message-action"],setup(t,{emit:o}){const n=t,r=o,a=e.ref(Oe(n.message));e.watch(()=>[n.message.messageBody,n.message.metadata,n.message.canBeInteractedWith],()=>{a.value=Oe(n.message)});const s=e.computed(()=>!!(n.message.canBeInteractedWith&&a.value)),l=i=>{s.value&&(i.disabled||i.selected||(r("message-action",{action:"select-option",message:n.message,option:i}),a.value&&(a.value={...a.value,selectedOption:i.label,selectedValue:i.value,selectedAt:new Date().toISOString(),menu:a.value.menu.map(u=>({...u,selected:u.value===i.value,disabled:!0}))})))};return(i,u)=>a.value?(e.openBlock(),e.createBlock(E,{key:0,class:"wu-w-full wu-overflow-hidden wu-bg-white wu-min-w-[14rem] dark:wu-bg-neutral-800",col:"","gap-none":"",rounded:"",border:"","data-testid":"app-message-interactive"},{default:e.withCtx(()=>[e.createElementVNode("div",yr,[e.createVNode(T,{class:"!wu-text-[var(--wu-primary-fg)]",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value.description),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value.menu,(c,f)=>(e.openBlock(),e.createElementBlock("button",{class:"wu-flex wu-w-full wu-items-center wu-justify-between wu-gap-2 wu-px-3 wu-py-3 wu-text-left wu-bg-transparent wu-border-0 wu-border-t wu-border-gray-100 dark:wu-border-neutral-700 disabled:wu-opacity-50",key:`${c.value}-${f}`,type:"button",disabled:!s.value||c.disabled,onClick:d=>l(c)},[e.createVNode(E,{class:"wu-items-start wu-flex-1 wu-min-w-0",col:"","gap-none":""},{default:e.withCtx(()=>[e.createVNode(T,{semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.label),1)]),_:2},1024),c.description?(e.openBlock(),e.createBlock(T,{key:0,"extra-small":"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.description),1)]),_:2},1024)):e.createCommentVNode("",!0)]),_:2},1024),e.createVNode(V,{class:e.normalizeClass(c.selected?"wu-text-green-500":""),gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.selected?"check_circle":"radio_button_unchecked"),1)]),_:2},1032,["class"])],8,xr))),128))]),_:1})):e.createCommentVNode("",!0)}}),br={class:"wu-flex wu-flex-col wu-gap-2 wu-min-w-[14rem]","data-testid":"app-message-document"},Cr=e.defineComponent({__name:"app-message-document",props:{message:{}},emits:["message-action"],setup(t,{emit:o}){const n=t,r=o,a=e.computed(()=>ae(n.message)),s=e.computed(()=>a.value?.filename||n.message.messageBody||"Documento"),l=e.computed(()=>!!(a.value?.link&&wo(a.value))),i=e.ref(!1),u=e.computed(()=>!l.value||!a.value?.link?[]:[{src:a.value.link,type:"pdf",filename:a.value.filename}]),c=()=>{r("message-action",{action:"download",message:n.message,attachment:a.value})};return(f,d)=>(e.openBlock(),e.createElementBlock("div",br,[e.createVNode(E,{class:"wu-items-center wu-bg-white dark:wu-bg-neutral-800","padding-sm":"",rounded:"",border:"","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(E,{class:"wu-w-8 wu-h-8 wu-bg-gray-200 wu-shrink-0 dark:wu-bg-neutral-700",center:"",rounded:""},{default:e.withCtx(()=>[e.createVNode(V,{gray:"",large:""},{default:e.withCtx(()=>[...d[2]||(d[2]=[e.createTextVNode("file_present",-1)])]),_:1})]),_:1}),e.createVNode(T,{class:"wu-flex-1 wu-truncate wu-min-w-0",title:s.value,semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value),1)]),_:1},8,["title"]),l.value?(e.openBlock(),e.createBlock(O,{key:0,onClick:d[0]||(d[0]=p=>i.value=!0),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(V,{gray:""},{default:e.withCtx(()=>[...d[3]||(d[3]=[e.createTextVNode("visibility",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(O,{onClick:c,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(V,{gray:""},{default:e.withCtx(()=>[...d[4]||(d[4]=[e.createTextVNode("download",-1)])]),_:1})]),_:1})]),_:1}),t.message.caption?(e.openBlock(),e.createBlock(T,{key:0,gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.message.caption),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(Ge,{open:i.value,items:u.value,index:0,onClose:d[1]||(d[1]=p=>i.value=!1)},null,8,["open","items"])]))}}),Br={class:"wu-w-full wu-px-3 wu-py-2 wu-bg-primary-500"},$r=["disabled","onClick"],_r=e.defineComponent({__name:"app-message-survey",props:{message:{}},emits:["message-action"],setup(t,{emit:o}){const n=t,r=o,a=e.ref(Oe(n.message));e.watch(()=>[n.message.messageBody,n.message.metadata,n.message.canBeInteractedWith],()=>{a.value=Oe(n.message)});const s=e.computed(()=>!!(n.message.canBeInteractedWith&&a.value)),l=e.computed(()=>!!a.value?.menu.some(u=>u.selected)),i=u=>{s.value&&(u.disabled||u.selected||(r("message-action",{action:"select-survey",message:n.message,option:u}),a.value&&(a.value={...a.value,menu:a.value.menu.map(c=>({...c,selected:c.value===u.value,disabled:!0}))})))};return(u,c)=>a.value?(e.openBlock(),e.createBlock(E,{key:0,class:"wu-w-full wu-overflow-hidden wu-bg-white wu-min-w-[14rem] dark:wu-bg-neutral-800",col:"","gap-none":"",rounded:"",border:"","data-testid":"app-message-survey"},{default:e.withCtx(()=>[e.createElementVNode("div",Br,[e.createVNode(T,{class:"!wu-text-[var(--wu-primary-fg)]",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value.description),1)]),_:1})]),s.value&&!l.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.value.menu,(f,d)=>(e.openBlock(),e.createElementBlock("button",{class:"wu-flex wu-w-full wu-items-center wu-justify-between wu-gap-2 wu-px-3 wu-py-3 wu-text-left wu-bg-transparent wu-border-0 wu-border-t wu-border-gray-100 dark:wu-border-neutral-700 disabled:wu-opacity-50",key:`${f.value}-${d}`,type:"button",disabled:f.disabled,onClick:p=>i(f)},[e.createVNode(T,{semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.label),1)]),_:2},1024),e.createVNode(V,{class:e.normalizeClass(f.selected?"wu-text-green-500":""),gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.selected?"check_circle":"radio_button_unchecked"),1)]),_:2},1032,["class"])],8,$r))),128)):(e.openBlock(),e.createBlock(E,{key:1,class:"wu-items-center wu-justify-center wu-px-3 wu-py-3 wu-border-t wu-border-gray-100 dark:wu-border-neutral-700","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(T,{small:"",gray:""},{default:e.withCtx(()=>[...c[0]||(c[0]=[e.createTextVNode("Pesquisa de satisfação já respondida",-1)])]),_:1}),e.createVNode(V,{class:"wu-text-green-500"},{default:e.withCtx(()=>[...c[1]||(c[1]=[e.createTextVNode("check_circle",-1)])]),_:1})]),_:1}))]),_:1})):e.createCommentVNode("",!0)}}),ut=e.defineComponent({__name:"app-message-audio",props:{message:{}},emits:["message-action"],setup(t,{emit:o}){const n=t,r=o,a=e.computed(()=>ae(n.message)),s=e.computed(()=>a.value?.link||""),l=()=>{r("message-action",{action:"download",message:n.message,attachment:a.value})};return(i,u)=>(e.openBlock(),e.createBlock(E,{class:"wu-items-center wu-min-w-[14rem]","gap-sm":"","data-testid":"app-message-audio"},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createBlock(Pe,{key:0,class:"wu-flex-1",src:s.value},null,8,["src"])):(e.openBlock(),e.createBlock(E,{key:1,class:"wu-items-center wu-justify-center wu-h-10 wu-flex-1 wu-rounded wu-bg-gray-100 dark:wu-bg-neutral-800"},{default:e.withCtx(()=>[e.createVNode(V,{gray:""},{default:e.withCtx(()=>[...u[0]||(u[0]=[e.createTextVNode("mic",-1)])]),_:1})]),_:1})),e.createVNode(O,{onClick:l,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(V,{gray:""},{default:e.withCtx(()=>[...u[1]||(u[1]=[e.createTextVNode("download",-1)])]),_:1})]),_:1})]),_:1}))}}),Nr={class:"wu-flex wu-flex-col wu-gap-2 wu-min-w-[10rem]","data-testid":"app-message-image"},Vr={class:"wu-relative wu-rounded wu-overflow-hidden wu-bg-gray-100 dark:wu-bg-neutral-800"},Sr=["src","alt"],Tr={key:1,class:"wu-flex wu-items-center wu-justify-center wu-h-32"},Ar=e.defineComponent({__name:"app-message-image",props:{message:{}},emits:["message-action"],setup(t,{emit:o}){const n=t,r=o,a=e.computed(()=>ae(n.message)),s=e.computed(()=>a.value?.link||""),l=e.ref(!1),i=e.computed(()=>s.value?[{src:s.value,type:"image",filename:a.value?.filename}]:[]),u=()=>{r("message-action",{action:"download",message:n.message,attachment:a.value})};return(c,f)=>(e.openBlock(),e.createElementBlock("div",Nr,[e.createElementVNode("div",Vr,[s.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-full wu-max-h-64 wu-object-cover wu-cursor-pointer",src:s.value,alt:a.value?.filename||t.message.caption||"Imagem",onClick:f[0]||(f[0]=d=>l.value=!0)},null,8,Sr)):(e.openBlock(),e.createElementBlock("div",Tr,[e.createVNode(V,{gray:"",large:""},{default:e.withCtx(()=>[...f[2]||(f[2]=[e.createTextVNode("image",-1)])]),_:1})])),e.createVNode(O,{class:"wu-absolute wu-bottom-2 wu-right-2 !wu-bg-black/55 hover:!wu-bg-black/75 !wu-text-white !wu-border-0",onClick:e.withModifiers(u,["stop"]),ghost:"",small:"",icon:"",round:""},{icon:e.withCtx(()=>[e.createVNode(V,{class:"!wu-text-white dark:!wu-text-white"},{default:e.withCtx(()=>[...f[3]||(f[3]=[e.createTextVNode("download",-1)])]),_:1})]),_:1})]),t.message.caption?(e.openBlock(),e.createBlock(T,{key:0,gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.message.caption),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(Ge,{open:l.value,items:i.value,index:0,onClose:f[1]||(f[1]=d=>l.value=!1)},null,8,["open","items"])]))}}),Er={class:"wu-flex wu-flex-col wu-gap-2 wu-min-w-[12rem]","data-testid":"app-message-video"},Pr={class:"wu-relative wu-rounded wu-overflow-hidden wu-bg-black"},Mr=["src"],Lr={key:1,class:"wu-flex wu-items-center wu-justify-center wu-h-32"},Rr=e.defineComponent({__name:"app-message-video",props:{message:{}},emits:["message-action"],setup(t,{emit:o}){const n=t,r=o,a=e.computed(()=>ae(n.message)),s=e.computed(()=>a.value?.link||""),l=()=>{r("message-action",{action:"download",message:n.message,attachment:a.value})};return(i,u)=>(e.openBlock(),e.createElementBlock("div",Er,[e.createElementVNode("div",Pr,[s.value?(e.openBlock(),e.createElementBlock("video",{key:0,class:"wu-w-full wu-max-h-64",src:s.value,controls:"",preload:"metadata"},null,8,Mr)):(e.openBlock(),e.createElementBlock("div",Lr,[e.createVNode(V,{gray:"",large:""},{default:e.withCtx(()=>[...u[0]||(u[0]=[e.createTextVNode("videocam",-1)])]),_:1})])),e.createVNode(O,{class:"wu-absolute wu-bottom-2 wu-right-2 !wu-bg-black/55 hover:!wu-bg-black/75 !wu-text-white !wu-border-0",onClick:l,ghost:"",small:"",icon:"",round:""},{icon:e.withCtx(()=>[e.createVNode(V,{class:"!wu-text-white dark:!wu-text-white"},{default:e.withCtx(()=>[...u[1]||(u[1]=[e.createTextVNode("download",-1)])]),_:1})]),_:1})]),t.message.caption?(e.openBlock(),e.createBlock(T,{key:0,gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.message.caption),1)]),_:1})):e.createCommentVNode("",!0)]))}}),Dr=["innerHTML"],Or=["innerHTML"],ct=e.defineComponent({__name:"app-message-text",props:{message:{}},setup(t){const o=t,n=e.computed(()=>ee(o.message)==="system");return(r,a)=>n.value?(e.openBlock(),e.createBlock(T,{key:0,class:"wu-text-center",gray:"","extra-small":"",medium:"","data-testid":"app-message-text"},{default:e.withCtx(()=>[e.createElementVNode("span",{innerHTML:t.message.messageBody},null,8,Dr)]),_:1})):(e.openBlock(),e.createBlock(T,{key:1,gray:"",small:"",medium:"","data-testid":"app-message-text"},{default:e.withCtx(()=>[e.createElementVNode("span",{innerHTML:t.message.messageBody},null,8,Or)]),_:1}))}}),zr={_grouped_images:lr,interactive:kr,document:Cr,automatic:ct,survey:_r,audio:ut,video:Rr,voice:ut,image:Ar,text:ct},Ir=t=>{const o=t.messageType;return o==="audio"||o==="voice"?ut:qe(t).length>0?vr:zr[o]??ct},Fr=["top","right","bottom","left"],Ot=["start","end"],zt=Fr.reduce((t,o)=>t.concat(o,o+"-"+Ot[0],o+"-"+Ot[1]),[]),_e=Math.min,de=Math.max,Hr={left:"right",right:"left",bottom:"top",top:"bottom"},jr={start:"end",end:"start"};function dt(t,o,n){return de(t,_e(o,n))}function me(t,o){return typeof t=="function"?t(o):t}function J(t){return t.split("-")[0]}function Z(t){return t.split("-")[1]}function ho(t){return t==="x"?"y":"x"}function bt(t){return t==="y"?"height":"width"}const Wr=new Set(["top","bottom"]);function te(t){return Wr.has(J(t))?"y":"x"}function Ct(t){return ho(te(t))}function go(t,o,n){n===void 0&&(n=!1);const r=Z(t),a=Ct(t),s=bt(a);let l=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return o.reference[s]>o.floating[s]&&(l=Ie(l)),[l,Ie(l)]}function Ur(t){const o=Ie(t);return[ze(t),o,ze(o)]}function ze(t){return t.replace(/start|end/g,o=>jr[o])}const It=["left","right"],Ft=["right","left"],qr=["top","bottom"],Gr=["bottom","top"];function Zr(t,o,n){switch(t){case"top":case"bottom":return n?o?Ft:It:o?It:Ft;case"left":case"right":return o?qr:Gr;default:return[]}}function Kr(t,o,n,r){const a=Z(t);let s=Zr(J(t),n==="start",r);return a&&(s=s.map(l=>l+"-"+a),o&&(s=s.concat(s.map(ze)))),s}function Ie(t){return t.replace(/left|right|bottom|top/g,o=>Hr[o])}function Xr(t){return{top:0,right:0,bottom:0,left:0,...t}}function vo(t){return typeof t!="number"?Xr(t):{top:t,right:t,bottom:t,left:t}}function be(t){const{x:o,y:n,width:r,height:a}=t;return{width:r,height:a,top:n,left:o,right:o+r,bottom:n+a,x:o,y:n}}function Ht(t,o,n){let{reference:r,floating:a}=t;const s=te(o),l=Ct(o),i=bt(l),u=J(o),c=s==="y",f=r.x+r.width/2-a.width/2,d=r.y+r.height/2-a.height/2,p=r[i]/2-a[i]/2;let m;switch(u){case"top":m={x:f,y:r.y-a.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-a.width,y:d};break;default:m={x:r.x,y:r.y}}switch(Z(o)){case"start":m[l]-=p*(n&&c?-1:1);break;case"end":m[l]+=p*(n&&c?-1:1);break}return m}const Yr=async(t,o,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:s=[],platform:l}=n,i=s.filter(Boolean),u=await(l.isRTL==null?void 0:l.isRTL(o));let c=await l.getElementRects({reference:t,floating:o,strategy:a}),{x:f,y:d}=Ht(c,r,u),p=r,m={},v=0;for(let x=0;x<i.length;x++){const{name:h,fn:y}=i[x],{x:w,y:g,data:$,reset:A}=await y({x:f,y:d,initialPlacement:r,placement:p,strategy:a,middlewareData:m,rects:c,platform:l,elements:{reference:t,floating:o}});f=w??f,d=g??d,m={...m,[h]:{...m[h],...$}},A&&v<=50&&(v++,typeof A=="object"&&(A.placement&&(p=A.placement),A.rects&&(c=A.rects===!0?await l.getElementRects({reference:t,floating:o,strategy:a}):A.rects),{x:f,y:d}=Ht(c,p,u)),x=-1)}return{x:f,y:d,placement:p,strategy:a,middlewareData:m}};async function Ze(t,o){var n;o===void 0&&(o={});const{x:r,y:a,platform:s,rects:l,elements:i,strategy:u}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:m=0}=me(o,t),v=vo(m),h=i[p?d==="floating"?"reference":"floating":d],y=be(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(h)))==null||n?h:h.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:c,rootBoundary:f,strategy:u})),w=d==="floating"?{x:r,y:a,width:l.floating.width,height:l.floating.height}:l.reference,g=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),$=await(s.isElement==null?void 0:s.isElement(g))?await(s.getScale==null?void 0:s.getScale(g))||{x:1,y:1}:{x:1,y:1},A=be(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:w,offsetParent:g,strategy:u}):w);return{top:(y.top-A.top+v.top)/$.y,bottom:(A.bottom-y.bottom+v.bottom)/$.y,left:(y.left-A.left+v.left)/$.x,right:(A.right-y.right+v.right)/$.x}}const Qr=t=>({name:"arrow",options:t,async fn(o){const{x:n,y:r,placement:a,rects:s,platform:l,elements:i,middlewareData:u}=o,{element:c,padding:f=0}=me(t,o)||{};if(c==null)return{};const d=vo(f),p={x:n,y:r},m=Ct(a),v=bt(m),x=await l.getDimensions(c),h=m==="y",y=h?"top":"left",w=h?"bottom":"right",g=h?"clientHeight":"clientWidth",$=s.reference[v]+s.reference[m]-p[m]-s.floating[v],A=p[m]-s.reference[m],S=await(l.getOffsetParent==null?void 0:l.getOffsetParent(c));let _=S?S[g]:0;(!_||!await(l.isElement==null?void 0:l.isElement(S)))&&(_=i.floating[g]||s.floating[v]);const k=$/2-A/2,B=_/2-x[v]/2-1,N=_e(d[y],B),P=_e(d[w],B),b=N,D=_-x[v]-P,z=_/2-x[v]/2+k,F=dt(b,z,D),H=!u.arrow&&Z(a)!=null&&z!==F&&s.reference[v]/2-(z<b?N:P)-x[v]/2<0,j=H?z<b?z-b:z-D:0;return{[m]:p[m]+j,data:{[m]:F,centerOffset:z-F-j,...H&&{alignmentOffset:j}},reset:H}}});function Jr(t,o,n){return(t?[...n.filter(a=>Z(a)===t),...n.filter(a=>Z(a)!==t)]:n.filter(a=>J(a)===a)).filter(a=>t?Z(a)===t||(o?ze(a)!==a:!1):!0)}const ea=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(o){var n,r,a;const{rects:s,middlewareData:l,placement:i,platform:u,elements:c}=o,{crossAxis:f=!1,alignment:d,allowedPlacements:p=zt,autoAlignment:m=!0,...v}=me(t,o),x=d!==void 0||p===zt?Jr(d||null,m,p):p,h=await Ze(o,v),y=((n=l.autoPlacement)==null?void 0:n.index)||0,w=x[y];if(w==null)return{};const g=go(w,s,await(u.isRTL==null?void 0:u.isRTL(c.floating)));if(i!==w)return{reset:{placement:x[0]}};const $=[h[J(w)],h[g[0]],h[g[1]]],A=[...((r=l.autoPlacement)==null?void 0:r.overflows)||[],{placement:w,overflows:$}],S=x[y+1];if(S)return{data:{index:y+1,overflows:A},reset:{placement:S}};const _=A.map(N=>{const P=Z(N.placement);return[N.placement,P&&f?N.overflows.slice(0,2).reduce((b,D)=>b+D,0):N.overflows[0],N.overflows]}).sort((N,P)=>N[1]-P[1]),B=((a=_.filter(N=>N[2].slice(0,Z(N[0])?2:3).every(P=>P<=0))[0])==null?void 0:a[0])||_[0][0];return B!==i?{data:{index:y+1,overflows:A},reset:{placement:B}}:{}}}},ta=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(o){var n,r;const{placement:a,middlewareData:s,rects:l,initialPlacement:i,platform:u,elements:c}=o,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:x=!0,...h}=me(t,o);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=J(a),w=te(i),g=J(i)===i,$=await(u.isRTL==null?void 0:u.isRTL(c.floating)),A=p||(g||!x?[Ie(i)]:Ur(i)),S=v!=="none";!p&&S&&A.push(...Kr(i,x,v,$));const _=[i,...A],k=await Ze(o,h),B=[];let N=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&B.push(k[y]),d){const z=go(a,l,$);B.push(k[z[0]],k[z[1]])}if(N=[...N,{placement:a,overflows:B}],!B.every(z=>z<=0)){var P,b;const z=(((P=s.flip)==null?void 0:P.index)||0)+1,F=_[z];if(F&&(!(d==="alignment"?w!==te(F):!1)||N.every(I=>te(I.placement)===w?I.overflows[0]>0:!0)))return{data:{index:z,overflows:N},reset:{placement:F}};let H=(b=N.filter(j=>j.overflows[0]<=0).sort((j,I)=>j.overflows[1]-I.overflows[1])[0])==null?void 0:b.placement;if(!H)switch(m){case"bestFit":{var D;const j=(D=N.filter(I=>{if(S){const W=te(I.placement);return W===w||W==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(W=>W>0).reduce((W,ye)=>W+ye,0)]).sort((I,W)=>I[1]-W[1])[0])==null?void 0:D[0];j&&(H=j);break}case"initialPlacement":H=i;break}if(a!==H)return{reset:{placement:H}}}return{}}}},oa=new Set(["left","top"]);async function na(t,o){const{placement:n,platform:r,elements:a}=t,s=await(r.isRTL==null?void 0:r.isRTL(a.floating)),l=J(n),i=Z(n),u=te(n)==="y",c=oa.has(l)?-1:1,f=s&&u?-1:1,d=me(o,t);let{mainAxis:p,crossAxis:m,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof v=="number"&&(m=i==="end"?v*-1:v),u?{x:m*f,y:p*c}:{x:p*c,y:m*f}}const ra=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(o){var n,r;const{x:a,y:s,placement:l,middlewareData:i}=o,u=await na(o,t);return l===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:a+u.x,y:s+u.y,data:{...u,placement:l}}}}},aa=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(o){const{x:n,y:r,placement:a}=o,{mainAxis:s=!0,crossAxis:l=!1,limiter:i={fn:h=>{let{x:y,y:w}=h;return{x:y,y:w}}},...u}=me(t,o),c={x:n,y:r},f=await Ze(o,u),d=te(J(a)),p=ho(d);let m=c[p],v=c[d];if(s){const h=p==="y"?"top":"left",y=p==="y"?"bottom":"right",w=m+f[h],g=m-f[y];m=dt(w,m,g)}if(l){const h=d==="y"?"top":"left",y=d==="y"?"bottom":"right",w=v+f[h],g=v-f[y];v=dt(w,v,g)}const x=i.fn({...o,[p]:m,[d]:v});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[p]:s,[d]:l}}}}}},sa=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(o){var n,r;const{placement:a,rects:s,platform:l,elements:i}=o,{apply:u=()=>{},...c}=me(t,o),f=await Ze(o,c),d=J(a),p=Z(a),m=te(a)==="y",{width:v,height:x}=s.floating;let h,y;d==="top"||d==="bottom"?(h=d,y=p===(await(l.isRTL==null?void 0:l.isRTL(i.floating))?"start":"end")?"left":"right"):(y=d,h=p==="end"?"top":"bottom");const w=x-f.top-f.bottom,g=v-f.left-f.right,$=_e(x-f[h],w),A=_e(v-f[y],g),S=!o.middlewareData.shift;let _=$,k=A;if((n=o.middlewareData.shift)!=null&&n.enabled.x&&(k=g),(r=o.middlewareData.shift)!=null&&r.enabled.y&&(_=w),S&&!p){const N=de(f.left,0),P=de(f.right,0),b=de(f.top,0),D=de(f.bottom,0);m?k=v-2*(N!==0||P!==0?N+P:de(f.left,f.right)):_=x-2*(b!==0||D!==0?b+D:de(f.top,f.bottom))}await u({...o,availableWidth:k,availableHeight:_});const B=await l.getDimensions(i.floating);return v!==B.width||x!==B.height?{reset:{rects:!0}}:{}}}};function U(t){var o;return((o=t.ownerDocument)==null?void 0:o.defaultView)||window}function Y(t){return U(t).getComputedStyle(t)}const jt=Math.min,Ce=Math.max,Fe=Math.round;function yo(t){const o=Y(t);let n=parseFloat(o.width),r=parseFloat(o.height);const a=t.offsetWidth,s=t.offsetHeight,l=Fe(n)!==a||Fe(r)!==s;return l&&(n=a,r=s),{width:n,height:r,fallback:l}}function ie(t){return ko(t)?(t.nodeName||"").toLowerCase():""}let Me;function xo(){if(Me)return Me;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(Me=t.brands.map((o=>o.brand+"/"+o.version)).join(" "),Me):navigator.userAgent}function Q(t){return t instanceof U(t).HTMLElement}function se(t){return t instanceof U(t).Element}function ko(t){return t instanceof U(t).Node}function Wt(t){return typeof ShadowRoot>"u"?!1:t instanceof U(t).ShadowRoot||t instanceof ShadowRoot}function Ke(t){const{overflow:o,overflowX:n,overflowY:r,display:a}=Y(t);return/auto|scroll|overlay|hidden|clip/.test(o+r+n)&&!["inline","contents"].includes(a)}function la(t){return["table","td","th"].includes(ie(t))}function pt(t){const o=/firefox/i.test(xo()),n=Y(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((a=>n.willChange.includes(a)))||["paint","layout","strict","content"].some((a=>{const s=n.contain;return s!=null&&s.includes(a)}))}function bo(){return!/^((?!chrome|android).)*safari/i.test(xo())}function Bt(t){return["html","body","#document"].includes(ie(t))}function Co(t){return se(t)?t:t.contextElement}const Bo={x:1,y:1};function we(t){const o=Co(t);if(!Q(o))return Bo;const n=o.getBoundingClientRect(),{width:r,height:a,fallback:s}=yo(o);let l=(s?Fe(n.width):n.width)/r,i=(s?Fe(n.height):n.height)/a;return l&&Number.isFinite(l)||(l=1),i&&Number.isFinite(i)||(i=1),{x:l,y:i}}function Ne(t,o,n,r){var a,s;o===void 0&&(o=!1),n===void 0&&(n=!1);const l=t.getBoundingClientRect(),i=Co(t);let u=Bo;o&&(r?se(r)&&(u=we(r)):u=we(t));const c=i?U(i):window,f=!bo()&&n;let d=(l.left+(f&&((a=c.visualViewport)==null?void 0:a.offsetLeft)||0))/u.x,p=(l.top+(f&&((s=c.visualViewport)==null?void 0:s.offsetTop)||0))/u.y,m=l.width/u.x,v=l.height/u.y;if(i){const x=U(i),h=r&&se(r)?U(r):r;let y=x.frameElement;for(;y&&r&&h!==x;){const w=we(y),g=y.getBoundingClientRect(),$=getComputedStyle(y);g.x+=(y.clientLeft+parseFloat($.paddingLeft))*w.x,g.y+=(y.clientTop+parseFloat($.paddingTop))*w.y,d*=w.x,p*=w.y,m*=w.x,v*=w.y,d+=g.x,p+=g.y,y=U(y).frameElement}}return{width:m,height:v,top:p,right:d+m,bottom:p+v,left:d,x:d,y:p}}function le(t){return((ko(t)?t.ownerDocument:t.document)||window.document).documentElement}function Xe(t){return se(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function $o(t){return Ne(le(t)).left+Xe(t).scrollLeft}function Ve(t){if(ie(t)==="html")return t;const o=t.assignedSlot||t.parentNode||Wt(t)&&t.host||le(t);return Wt(o)?o.host:o}function _o(t){const o=Ve(t);return Bt(o)?o.ownerDocument.body:Q(o)&&Ke(o)?o:_o(o)}function He(t,o){var n;o===void 0&&(o=[]);const r=_o(t),a=r===((n=t.ownerDocument)==null?void 0:n.body),s=U(r);return a?o.concat(s,s.visualViewport||[],Ke(r)?r:[]):o.concat(r,He(r))}function Ut(t,o,n){return o==="viewport"?be((function(r,a){const s=U(r),l=le(r),i=s.visualViewport;let u=l.clientWidth,c=l.clientHeight,f=0,d=0;if(i){u=i.width,c=i.height;const p=bo();(p||!p&&a==="fixed")&&(f=i.offsetLeft,d=i.offsetTop)}return{width:u,height:c,x:f,y:d}})(t,n)):se(o)?be((function(r,a){const s=Ne(r,!0,a==="fixed"),l=s.top+r.clientTop,i=s.left+r.clientLeft,u=Q(r)?we(r):{x:1,y:1};return{width:r.clientWidth*u.x,height:r.clientHeight*u.y,x:i*u.x,y:l*u.y}})(o,n)):be((function(r){const a=le(r),s=Xe(r),l=r.ownerDocument.body,i=Ce(a.scrollWidth,a.clientWidth,l.scrollWidth,l.clientWidth),u=Ce(a.scrollHeight,a.clientHeight,l.scrollHeight,l.clientHeight);let c=-s.scrollLeft+$o(r);const f=-s.scrollTop;return Y(l).direction==="rtl"&&(c+=Ce(a.clientWidth,l.clientWidth)-i),{width:i,height:u,x:c,y:f}})(le(t)))}function qt(t){return Q(t)&&Y(t).position!=="fixed"?t.offsetParent:null}function Gt(t){const o=U(t);let n=qt(t);for(;n&&la(n)&&Y(n).position==="static";)n=qt(n);return n&&(ie(n)==="html"||ie(n)==="body"&&Y(n).position==="static"&&!pt(n))?o:n||(function(r){let a=Ve(r);for(;Q(a)&&!Bt(a);){if(pt(a))return a;a=Ve(a)}return null})(t)||o}function ia(t,o,n){const r=Q(o),a=le(o),s=Ne(t,!0,n==="fixed",o);let l={scrollLeft:0,scrollTop:0};const i={x:0,y:0};if(r||!r&&n!=="fixed")if((ie(o)!=="body"||Ke(a))&&(l=Xe(o)),Q(o)){const u=Ne(o,!0);i.x=u.x+o.clientLeft,i.y=u.y+o.clientTop}else a&&(i.x=$o(a));return{x:s.left+l.scrollLeft-i.x,y:s.top+l.scrollTop-i.y,width:s.width,height:s.height}}const ua={getClippingRect:function(t){let{element:o,boundary:n,rootBoundary:r,strategy:a}=t;const s=n==="clippingAncestors"?(function(c,f){const d=f.get(c);if(d)return d;let p=He(c).filter((h=>se(h)&&ie(h)!=="body")),m=null;const v=Y(c).position==="fixed";let x=v?Ve(c):c;for(;se(x)&&!Bt(x);){const h=Y(x),y=pt(x);(v?y||m:y||h.position!=="static"||!m||!["absolute","fixed"].includes(m.position))?m=h:p=p.filter((w=>w!==x)),x=Ve(x)}return f.set(c,p),p})(o,this._c):[].concat(n),l=[...s,r],i=l[0],u=l.reduce(((c,f)=>{const d=Ut(o,f,a);return c.top=Ce(d.top,c.top),c.right=jt(d.right,c.right),c.bottom=jt(d.bottom,c.bottom),c.left=Ce(d.left,c.left),c}),Ut(o,i,a));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 a=Q(n),s=le(n);if(n===s)return o;let l={scrollLeft:0,scrollTop:0},i={x:1,y:1};const u={x:0,y:0};if((a||!a&&r!=="fixed")&&((ie(n)!=="body"||Ke(s))&&(l=Xe(n)),Q(n))){const c=Ne(n);i=we(n),u.x=c.x+n.clientLeft,u.y=c.y+n.clientTop}return{width:o.width*i.x,height:o.height*i.y,x:o.x*i.x-l.scrollLeft*i.x+u.x,y:o.y*i.y-l.scrollTop*i.y+u.y}},isElement:se,getDimensions:function(t){return Q(t)?yo(t):t.getBoundingClientRect()},getOffsetParent:Gt,getDocumentElement:le,getScale:we,async getElementRects(t){let{reference:o,floating:n,strategy:r}=t;const a=this.getOffsetParent||Gt,s=this.getDimensions;return{reference:ia(o,await a(n),r),floating:{x:0,y:0,...await s(n)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>Y(t).direction==="rtl"},ca=(t,o,n)=>{const r=new Map,a={platform:ua,...n},s={...a.platform,_c:r};return Yr(t,o,{...a,platform:s})};function No(t,o){for(const n in o)Object.prototype.hasOwnProperty.call(o,n)&&(typeof o[n]=="object"&&t[n]?No(t[n],o[n]):t[n]=o[n])}const K={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 Se(t,o){let n=K.themes[t]||{},r;do r=n[o],typeof r>"u"?n.$extend?n=K.themes[n.$extend]||{}:(n=null,r=K[o]):n=null;while(n);return r}function da(t){const o=[t];let n=K.themes[t]||{};do n.$extend&&!n.$resetCss?(o.push(n.$extend),n=K.themes[n.$extend]||{}):n=null;while(n);return o.map(r=>`v-popper--theme-${r}`)}function Zt(t){const o=[t];let n=K.themes[t]||{};do n.$extend?(o.push(n.$extend),n=K.themes[n.$extend]||{}):n=null;while(n);return o}let ge=!1;if(typeof window<"u"){ge=!1;try{const t=Object.defineProperty({},"passive",{get(){ge=!0}});window.addEventListener("test",null,t)}catch{}}let Vo=!1;typeof window<"u"&&typeof navigator<"u"&&(Vo=/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`]),[]),Kt={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},Xt={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function Yt(t,o){const n=t.indexOf(o);n!==-1&&t.splice(n,1)}function ot(){return new Promise(t=>requestAnimationFrame(()=>{requestAnimationFrame(t)}))}const G=[];let ue=null;const Qt={};function Jt(t){let o=Qt[t];return o||(o=Qt[t]=[]),o}let mt=function(){};typeof window<"u"&&(mt=window.Element);function M(t){return function(o){return Se(o.theme,t)}}const nt="__floating-vue__popper",To=()=>e.defineComponent({name:"VPopper",provide(){return{[nt]:{parentPopper:this}}},inject:{[nt]:{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:M("disabled")},positioningDisabled:{type:Boolean,default:M("positioningDisabled")},placement:{type:String,default:M("placement"),validator:t=>So.includes(t)},delay:{type:[String,Number,Object],default:M("delay")},distance:{type:[Number,String],default:M("distance")},skidding:{type:[Number,String],default:M("skidding")},triggers:{type:Array,default:M("triggers")},showTriggers:{type:[Array,Function],default:M("showTriggers")},hideTriggers:{type:[Array,Function],default:M("hideTriggers")},popperTriggers:{type:Array,default:M("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:M("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:M("popperHideTriggers")},container:{type:[String,Object,mt,Boolean],default:M("container")},boundary:{type:[String,mt],default:M("boundary")},strategy:{type:String,validator:t=>["absolute","fixed"].includes(t),default:M("strategy")},autoHide:{type:[Boolean,Function],default:M("autoHide")},handleResize:{type:Boolean,default:M("handleResize")},instantMove:{type:Boolean,default:M("instantMove")},eagerMount:{type:Boolean,default:M("eagerMount")},popperClass:{type:[String,Array,Object],default:M("popperClass")},computeTransformOrigin:{type:Boolean,default:M("computeTransformOrigin")},autoMinSize:{type:Boolean,default:M("autoMinSize")},autoSize:{type:[Boolean,String],default:M("autoSize")},autoMaxSize:{type:Boolean,default:M("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:M("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:M("preventOverflow")},overflowPadding:{type:[Number,String],default:M("overflowPadding")},arrowPadding:{type:[Number,String],default:M("arrowPadding")},arrowOverflow:{type:Boolean,default:M("arrowOverflow")},flip:{type:Boolean,default:M("flip")},shift:{type:Boolean,default:M("shift")},shiftCrossAxis:{type:Boolean,default:M("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:M("noAutoFocus")},disposeTimeout:{type:Number,default:M("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[nt])==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,a;(r=this.parentPopper)!=null&&r.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(n||!this.disabled)&&(((a=this.parentPopper)==null?void 0:a.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(ra({mainAxis:this.distance,crossAxis:this.skidding}));const o=this.placement.startsWith("auto");if(o?t.middleware.push(ea({alignment:this.placement.split("-")[1]??""})):t.placement=this.placement,this.preventOverflow&&(this.shift&&t.middleware.push(aa({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!o&&this.flip&&t.middleware.push(ta({padding:this.overflowPadding,boundary:this.boundary}))),t.middleware.push(Qr({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&t.middleware.push({name:"arrowOverflow",fn:({placement:r,rects:a,middlewareData:s})=>{let l;const{centerOffset:i}=s.arrow;return r.startsWith("top")||r.startsWith("bottom")?l=Math.abs(i)>a.reference.width/2:l=Math.abs(i)>a.reference.height/2,{data:{overflow:l}}}}),this.autoMinSize||this.autoSize){const r=this.autoSize?this.autoSize:this.autoMinSize?"min":null;t.middleware.push({name:"autoSize",fn:({rects:a,placement:s,middlewareData:l})=>{var i;if((i=l.autoSize)!=null&&i.skip)return{};let u,c;return s.startsWith("top")||s.startsWith("bottom")?u=a.reference.width:c=a.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(sa({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:r,availableHeight:a})=>{this.$_innerNode.style.maxWidth=r!=null?`${r}px`:null,this.$_innerNode.style.maxHeight=a!=null?`${a}px`:null}})));const n=await ca(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),ue&&this.instantMove&&ue.instantMove&&ue!==this.parentPopper){ue.$_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&&(ue=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 ot(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...He(this.$_referenceNode),...He(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(),a=o.x+o.width/2-(r.left+n.offsetLeft),s=o.y+o.height/2-(r.top+n.offsetTop);this.result.transformOrigin=`${a}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<G.length;n++)o=G[n],o.showGroup!==t&&(o.hide(),o.$emit("close-group"))}G.push(this),document.body.classList.add("v-popper--some-open");for(const o of Zt(this.theme))Jt(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 ot(),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,Yt(G,this),G.length===0&&document.body.classList.remove("v-popper--some-open");for(const n of Zt(this.theme)){const r=Jt(n);Yt(r,this),r.length===0&&document.body.classList.remove(`v-popper--some-open--${n}`)}ue===this&&(ue=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 ot(),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,Xt,this.triggers,this.hideTriggers,o),this.$_registerTriggerListeners([this.$_popperNode],Xt,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,ge?{passive:!0}:void 0))},$_registerTriggerListeners(t,o,n,r,a){let s=n;r!=null&&(s=typeof r=="function"?r(s):r),s.forEach(l=>{const i=o[l];i&&this.$_registerEventListeners(t,i,a)})},$_removeEventListeners(t){const o=[];this.$_events.forEach(n=>{const{targetNodes:r,eventType:a,handler:s}=n;!t||t===a?r.forEach(l=>l.removeEventListener(a,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(Be>=t.left&&Be<=t.right&&$e>=t.top&&$e<=t.bottom){const o=this.$_popperNode.getBoundingClientRect(),n=Be-ne,r=$e-re,a=o.left+o.width/2-ne+(o.top+o.height/2)-re+o.width+o.height,s=ne+n*a,l=re+r*a;return Le(ne,re,s,l,o.left,o.top,o.left,o.bottom)||Le(ne,re,s,l,o.left,o.top,o.right,o.top)||Le(ne,re,s,l,o.right,o.top,o.right,o.bottom)||Le(ne,re,s,l,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(Vo){const t=ge?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",o=>eo(o,!0),t),document.addEventListener("touchend",o=>to(o,!0),t)}else window.addEventListener("mousedown",t=>eo(t,!1),!0),window.addEventListener("click",t=>to(t,!1),!0);window.addEventListener("resize",ma)}function eo(t,o){if(K.autoHideOnMousedown)Ao(t,o);else for(let n=0;n<G.length;n++){const r=G[n];try{r.mouseDownContains=r.popperNode().contains(t.target)}catch{}}}function to(t,o){K.autoHideOnMousedown||Ao(t,o)}function Ao(t,o){const n={};for(let r=G.length-1;r>=0;r--){const a=G[r];try{const s=a.containsGlobalTarget=a.mouseDownContains||a.popperNode().contains(t.target);a.pendingHide=!1,requestAnimationFrame(()=>{if(a.pendingHide=!1,!n[a.randomId]&&oo(a,s,t)){if(a.$_handleGlobalClose(t,o),!t.closeAllPopover&&t.closePopover&&s){let i=a.parentPopper;for(;i;)n[i.randomId]=!0,i=i.parentPopper;return}let l=a.parentPopper;for(;l&&oo(l,l.containsGlobalTarget,t);)l.$_handleGlobalClose(t,o),l=l.parentPopper}})}catch{}}}function oo(t,o,n){return n.closeAllPopover||n.closePopover&&o||pa(t,n)&&!o}function pa(t,o){if(typeof t.autoHide=="function"){const n=t.autoHide(o);return t.lastAutoHide=n,n}return t.autoHide}function ma(){for(let t=0;t<G.length;t++)G[t].$_computePosition()}let ne=0,re=0,Be=0,$e=0;typeof window<"u"&&window.addEventListener("mousemove",t=>{ne=Be,re=$e,Be=t.clientX,$e=t.clientY},ge?{passive:!0}:void 0);function Le(t,o,n,r,a,s,l,i){const u=((l-a)*(o-s)-(i-s)*(t-a))/((i-s)*(n-t)-(l-a)*(r-o)),c=((n-t)*(o-s)-(r-o)*(t-a))/((i-s)*(n-t)-(l-a)*(r-o));return u>=0&&u<=1&&c>=0&&c<=1}const fa={extends:To()},Ye=(t,o)=>{const n=t.__vccOpts||t;for(const[r,a]of o)n[r]=a;return n};function wa(t,o,n,r,a,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 ha=Ye(fa,[["render",wa]]);function ga(){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 a=t.indexOf("Edge/");return a>0?parseInt(t.substring(a+5,t.indexOf(".",a)),10):-1}let Re;function ft(){ft.init||(ft.init=!0,Re=ga()!==-1)}var Qe={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){ft(),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",Re&&this.$el.appendChild(t),t.data="about:blank",Re||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&&(!Re&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const va=e.withScopeId("data-v-b329ee4c");e.pushScopeId("data-v-b329ee4c");const ya={class:"resize-observer",tabindex:"-1"};e.popScopeId();const xa=va((t,o,n,r,a,s)=>(e.openBlock(),e.createBlock("div",ya)));Qe.render=xa;Qe.__scopeId="data-v-b329ee4c";Qe.__file="src/components/ResizeObserver.vue";const Eo=(t="theme")=>({computed:{themeClass(){return da(this[t])}}}),ka=e.defineComponent({name:"VPopperContent",components:{ResizeObserver:Qe},mixins:[Eo()],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}}}),ba=["id","aria-hidden","tabindex","data-popper-placement"],Ca={ref:"inner",class:"v-popper__inner"},Ba=e.createElementVNode("div",{class:"v-popper__arrow-outer"},null,-1),$a=e.createElementVNode("div",{class:"v-popper__arrow-inner"},null,-1),_a=[Ba,$a];function Na(t,o,n,r,a,s){const l=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(i=>t.autoHide&&t.$emit("hide"),["esc"]))},[e.createElementVNode("div",{class:"v-popper__backdrop",onClick:o[0]||(o[0]=i=>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",Ca,[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(l,{key:0,onNotify:o[1]||(o[1]=i=>t.$emit("resize",i))})):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)},_a,4)],4)],46,ba)}const Po=Ye(ka,[["render",Na]]),Mo={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 wt=function(){};typeof window<"u"&&(wt=window.Element);const Va=e.defineComponent({name:"VPopperWrapper",components:{Popper:ha,PopperContent:Po},mixins:[Mo,Eo("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,wt,Boolean],default:void 0},boundary:{type:[String,wt],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 Sa(t,o,n,r,a,s){const l=e.resolveComponent("PopperContent"),i=e.resolveComponent("Popper");return e.openBlock(),e.createBlock(i,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:f,skipTransition:d,autoHide:p,show:m,hide:v,handleResize:x,onResize:h,classes:y,result:w})=>[e.renderSlot(t.$slots,"default",{shown:c,show:m,hide:v}),e.createVNode(l,{ref:"popperContent","popper-id":u,theme:t.finalTheme,shown:c,mounted:f,"skip-transition":d,"auto-hide":p,"handle-resize":x,classes:y,result:w,onHide:v,onResize:h},{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 $t=Ye(Va,[["render",Sa]]),Lo={...$t,name:"VDropdown",vPopperTheme:"dropdown"},Ta={...$t,name:"VMenu",vPopperTheme:"menu"},Aa={...$t,name:"VTooltip",vPopperTheme:"tooltip"},Ea=e.defineComponent({name:"VTooltipDirective",components:{Popper:To(),PopperContent:Po},mixins:[Mo],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:t=>Se(t.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:t=>Se(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}}}),Pa=["innerHTML"],Ma=["textContent"];function La(t,o,n,r,a,s){const l=e.resolveComponent("PopperContent"),i=e.resolveComponent("Popper");return e.openBlock(),e.createBlock(i,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:f,skipTransition:d,autoHide:p,hide:m,handleResize:v,onResize:x,classes:h,result:y})=>[e.createVNode(l,{ref:"popperContent",class:e.normalizeClass({"v-popper--tooltip-loading":t.loading}),"popper-id":u,theme:t.theme,shown:c,mounted:f,"skip-transition":d,"auto-hide":p,"handle-resize":v,classes:h,result:y,onHide:m,onResize:x},{default:e.withCtx(()=>[t.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:t.finalContent},null,8,Pa)):(e.openBlock(),e.createElementBlock("div",{key:1,textContent:e.toDisplayString(t.finalContent)},null,8,Ma))]),_: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 Ra=Ye(Ea,[["render",La]]),Ro="v-popper--has-tooltip";function Da(t,o){let n=t.placement;if(!n&&o)for(const r of So)o[r]&&(n=r);return n||(n=Se(t.theme||"tooltip","placement")),n}function Do(t,o,n){let r;const a=typeof o;return a==="string"?r={content:o}:o&&a==="object"?r=o:r={content:!1},r.placement=Da(r,n),r.targetNodes=()=>[t],r.referenceNode=()=>t,r}let rt,Te,Oa=0;function za(){if(rt)return;Te=e.ref([]),rt=e.createApp({name:"VTooltipDirectiveApp",setup(){return{directives:Te}},render(){return this.directives.map(o=>e.h(Ra,{...o.options,shown:o.shown||o.options.shown,key:o.id}))},devtools:{hide:!0}});const t=document.createElement("div");document.body.appendChild(t),rt.mount(t)}function Ia(t,o,n){za();const r=e.ref(Do(t,o,n)),a=e.ref(!1),s={id:Oa++,options:r,shown:a};return Te.value.push(s),t.classList&&t.classList.add(Ro),t.$_popper={options:r,item:s,show(){a.value=!0},hide(){a.value=!1}}}function Oo(t){if(t.$_popper){const o=Te.value.indexOf(t.$_popper.item);o!==-1&&Te.value.splice(o,1),delete t.$_popper,delete t.$_popperOldShown,delete t.$_popperMountTarget}t.classList&&t.classList.remove(Ro)}function no(t,{value:o,modifiers:n}){const r=Do(t,o,n);if(!r.content||Se(r.theme||"tooltip","disabled"))Oo(t);else{let a;t.$_popper?(a=t.$_popper,a.options.value=r):a=Ia(t,o,n),typeof o.shown<"u"&&o.shown!==t.$_popperOldShown&&(t.$_popperOldShown=o.shown,o.shown?a.show():a.hide())}}const Fa={beforeMount:no,updated:no,beforeUnmount(t){Oo(t)}};function ro(t){t.addEventListener("mousedown",je),t.addEventListener("click",je),t.addEventListener("touchstart",zo,ge?{passive:!0}:!1)}function ao(t){t.removeEventListener("mousedown",je),t.removeEventListener("click",je),t.removeEventListener("touchstart",zo),t.removeEventListener("touchend",Io),t.removeEventListener("touchcancel",Fo)}function je(t){const o=t.currentTarget;t.closePopover=!o.$_vclosepopover_touch,t.closeAllPopover=o.$_closePopoverModifiers&&!!o.$_closePopoverModifiers.all}function zo(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",Io),o.addEventListener("touchcancel",Fo)}}function Io(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 Fo(t){const o=t.currentTarget;o.$_vclosepopover_touch=!1}const Ha={beforeMount(t,{value:o,modifiers:n}){t.$_closePopoverModifiers=n,(typeof o>"u"||o)&&ro(t)},updated(t,{value:o,oldValue:n,modifiers:r}){t.$_closePopoverModifiers=r,o!==n&&(typeof o>"u"||o?ro(t):ao(t))},beforeUnmount(t){ao(t)}},ja=Lo;function Wa(t,o={}){t.$_vTooltipInstalled||(t.$_vTooltipInstalled=!0,No(K,o),t.directive("tooltip",Fa),t.directive("close-popper",Ha),t.component("VTooltip",Aa),t.component("VDropdown",Lo),t.component("VMenu",Ta))}const Ua={version:"5.2.2",install:Wa,options:K},qa={key:0,class:"wu-flex wu-shrink-0 wu-items-end","data-testid":"app-message-avatar"},Ga={key:0,class:"wu-w-full wu-flex wu-justify-end wu-h-2","data-testid":"app-message-trailing"},We=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 a=e.computed(()=>o.tertiary),s=e.computed(()=>!a.value&&o.secondary),l=e.computed(()=>!a.value&&r("avatar")),i=e.computed(()=>a.value?"wu-justify-center":s.value?"wu-flex-row-reverse":""),u=e.computed(()=>a.value?"wu-items-center wu-flex":s.value?"wu-rounded-br-none wu-bg-primary-100 wu-p-3 dark:wu-bg-primary-900":"wu-rounded-bl-none wu-bg-gray-200 wu-p-3 dark:wu-bg-neutral-700");return(c,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-flex wu-items-end wu-gap-2 wu-w-full",i.value]),"data-testid":"app-message"},[l.value?(e.openBlock(),e.createElementBlock("div",qa,[e.renderSlot(c.$slots,"avatar")])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["wu-rounded-lg wu-relative wu-min-h-8 [overflow-wrap:anywhere]",u.value]),"data-testid":"app-message-bubble"},[e.renderSlot(c.$slots,"default"),r("trailing")?(e.openBlock(),e.createElementBlock("div",Ga,[e.renderSlot(c.$slots,"trailing")])):e.createCommentVNode("",!0)],2)],2))}}),_t=e.defineComponent({__name:"app-skeleton",props:{round:Boolean,fluid:Boolean,block:Boolean},setup(t){const o=t,n=e.computed(()=>o.fluid?"!wu-w-full":""),r=e.computed(()=>o.round?"!wu-rounded-full":o.block?"!wu-rounded-none":"!wu-rounded-lg");return(a,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-animate-pulse wu-bg-gray-200 dark:wu-bg-neutral-700",[r.value,n.value]])},null,2))}}),Nt=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 a(s){return!!r.value[s]}return(s,l)=>(e.openBlock(),e.createBlock(E,{"gap-sm":"",center:"",col:""},{default:e.withCtx(()=>[t.error?(e.openBlock(),e.createBlock(V,{key:0,class:"wu-text-gray-500",large:""},{default:e.withCtx(()=>[...l[1]||(l[1]=[e.createTextVNode("error_outline",-1)])]),_:1})):a("icon")?e.renderSlot(s.$slots,"icon",{key:1}):(e.openBlock(),e.createBlock(V,{key:2,class:"wu-text-gray-500",large:""},{default:e.withCtx(()=>[...l[2]||(l[2]=[e.createTextVNode("list",-1)])]),_:1})),e.createVNode(T,{class:"wu-text-center",gray:""},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:3}),t.error?(e.openBlock(),e.createBlock(O,{key:3,onClick:l[0]||(l[0]=i=>n("refetch")),outline:"",small:"","data-testid":"refetch-button"},{icon:e.withCtx(()=>[...l[3]||(l[3]=[e.createTextVNode("refresh",-1)])]),default:e.withCtx(()=>[l[4]||(l[4]=e.createTextVNode("Tentar novamente",-1))]),_:1})):e.createCommentVNode("",!0)]),_:3}))}}),Za={class:"wu-flex wu-flex-col wu-items-center wu-h-full wu-w-full wu-overflow-hidden","data-testid":"app-chat-service"},Ka={key:0,class:"wu-w-full wu-h-12"},Xa=["onClick","disabled"],Ya={key:1,class:"wu-w-full wu-shrink-0 wu-border-t wu-border-gray-200 wu-flex wu-flex-col dark:wu-border-neutral-700"},Qa={class:"wu-relative wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-8 wu-rounded-full wu-bg-red-500 wu-bg-opacity-10"},Ja={key:0,class:"wu-absolute wu-inset-0 wu-rounded-full wu-bg-red-500 wu-bg-opacity-20 wu-animate-ping"},es=["src","alt"],ts=["onKeydown","disabled"],os={class:"wu-flex wu-items-center wu-gap-2 wu-w-full wu-justify-end wu-px-6 wu-py-2"},ns=e.defineComponent({__name:"app-chat-service",props:{rule:{},edges:{}},emits:["send-message","retry-loading-chat-service","message-action"],setup(t,{emit:o}){const n=t,r=o,{history:a,chat:s,language:l}=pe(),{isErrorLoading:i,isLoading:u,isSendingMessage:c,messages:f,text:d,attachments:p,audio:m}=s,{isRecording:v,formattedDuration:x,start:h,stop:y,cancel:w}=qn(),g=e.computed(()=>a.value.length>0),$=e.ref(null),A=e.ref(!1),S=e.computed(()=>Yn(f.value)),_=e.ref(null),k=e.ref(null),B=e.computed(()=>!!(p.value.length||m.value)),N=e.computed(()=>!!(B.value||d.value.trim())),P=e.computed(()=>c.value||B.value||A.value),b=e.computed(()=>(n.rule.settings?.features?.quickReplies??[]).map(C=>C[l.value]??C["pt-BR"]??Object.values(C)[0]??"").filter(Boolean)),D=e.computed(()=>b.value.length>0&&f.value.length===0),z=e.computed(()=>c.value||B.value||A.value),F=(L=!0)=>{const C=$.value;C&&C.scrollTo({top:C.scrollHeight,behavior:L?"smooth":"auto"})},H=()=>_.value?.click(),j=()=>k.value?.click(),I=L=>{L&&URL.revokeObjectURL(L)},W=()=>{p.value.forEach(L=>I(L.previewUrl)),p.value=[]},ye=()=>{I(m.value?.previewUrl),m.value=null},Go=(L,C)=>{W(),ye(),d.value="",p.value=[{file:L,type:C,previewUrl:C==="image"?URL.createObjectURL(L):void 0}]},Zo=L=>{W(),ye(),d.value="",m.value={file:L,previewUrl:URL.createObjectURL(L)}},Et=(L,C)=>{const X=L.target,R=X.files?.[0];R&&(Go(R,C),X.value="")},Ko=L=>{I(p.value[L]?.previewUrl),p.value=p.value.filter((C,X)=>X!==L)},Xo=()=>{ye()},Yo=async()=>{P.value||!await h()||(d.value="",A.value=!0)},Qo=async()=>{await w(),A.value=!1},Jo=async()=>{const L=await y();A.value=!1,L&&Zo(L)},Pt=()=>r("send-message"),en=L=>{z.value||!L.trim()||(d.value=L,r("send-message"))};e.watch(()=>S.value.length,async()=>{await e.nextTick(),F()}),e.onMounted(()=>{F(!1)});const tn=(L,C,X)=>C[X-1]?ee(C[X-1])===ee(L)?"wu-mt-1":"wu-mt-4":"wu-mt-0",on=L=>Gn(L.createdAt)||"12:58",nn=L=>r("message-action",L);return(L,C)=>{const X=e.resolveDirective("close-popper");return e.openBlock(),e.createElementBlock("div",Za,[e.createElementVNode("div",{class:"wu-flex wu-flex-col wu-flex-1 wu-min-h-0 wu-w-full wu-px-6 wu-overflow-y-auto",ref_key:"messagesList",ref:$,"data-testid":"app-service-messages"},[g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ka)),e.unref(u)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},e.renderList(10,(R,q)=>e.createVNode(We,{key:q,primary:q%2===0,secondary:q%2===1},{default:e.withCtx(()=>[e.createVNode(_t,{class:"wu-h-4 wu-w-32",block:""})]),_:1},8,["primary","secondary"])),64)):e.unref(i)?(e.openBlock(),e.createBlock(Nt,{key:2,class:"wu-h-full",onRefetch:C[0]||(C[0]=R=>r("retry-loading-chat-service")),error:""},{default:e.withCtx(()=>[...C[4]||(C[4]=[e.createTextVNode("Ocorreu um erro ao carregar o atendimento.",-1)])]),_:1})):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(S.value,(R,q)=>(e.openBlock(),e.createBlock(We,{key:R.id??q,primary:!e.unref(ke)(R)&&e.unref(ee)(R)==="operator",secondary:!e.unref(ke)(R)&&e.unref(ee)(R)==="contact",tertiary:e.unref(ke)(R),class:e.normalizeClass([tn(R,S.value,q)])},e.createSlots({default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Ir)(R)),{message:R,onMessageAction:nn},null,40,["message"]))]),_:2},[e.unref(ke)(R)?void 0:{name:"trailing",fn:e.withCtx(()=>[e.createVNode(T,{gray:"","extra-small":"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(on(R)),1)]),_:2},1024)]),key:"0"}]),1032,["primary","secondary","tertiary","class"]))),128)),C[5]||(C[5]=e.createElementVNode("div",{class:"wu-w-full wu-min-h-4"},null,-1))],512),!e.unref(u)&&!e.unref(i)&&D.value?(e.openBlock(),e.createBlock(E,{key:0,class:"wu-items-end wu-w-full","data-testid":"app-chat-quick-replies","padding-md":"","gap-sm":"",col:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(R,q)=>(e.openBlock(),e.createElementBlock("button",{class:"wu-w-fit wu-max-w-full wu-px-3 wu-py-2 wu-text-left wu-rounded-2xl wu-rounded-br-none wu-border wu-border-gray-200 wu-bg-transparent wu-text-gray-700 wu-font-primary wu-text-xs wu-leading-snug wu-cursor-pointer wu-transition-colors hover:wu-bg-gray-100 disabled:wu-opacity-50 disabled:wu-pointer-events-none dark:wu-border-neutral-600 dark:wu-text-neutral-100 dark:hover:wu-bg-neutral-700 [overflow-wrap:anywhere]",key:q,type:"button","data-testid":"app-chat-quick-reply",onClick:rn=>en(R),disabled:z.value},e.toDisplayString(R),9,Xa))),128))]),_:1})):e.createCommentVNode("",!0),!e.unref(u)&&!e.unref(i)&&t.rule.settings?.features?.sendMessage?(e.openBlock(),e.createElementBlock("div",Ya,[A.value?(e.openBlock(),e.createBlock(E,{key:0,"data-testid":"app-chat-audio-recording","padding-md":"","center-between":""},{default:e.withCtx(()=>[e.createVNode(O,{"data-testid":"app-chat-audio-cancel",onClick:Qo,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(V,{gray:""},{default:e.withCtx(()=>[...C[6]||(C[6]=[e.createTextVNode("close",-1)])]),_:1})]),_:1}),e.createVNode(E,{class:"wu-items-center","gap-sm":""},{default:e.withCtx(()=>[e.createElementVNode("div",Qa,[e.unref(v)?(e.openBlock(),e.createElementBlock("div",Ja)):e.createCommentVNode("",!0),e.createVNode(V,{class:"wu-text-red-500",large:""},{default:e.withCtx(()=>[...C[7]||(C[7]=[e.createTextVNode("mic",-1)])]),_:1})]),e.createVNode(T,{semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(x)),1)]),_:1})]),_:1}),e.createVNode(O,{"data-testid":"app-chat-audio-stop",onClick:Jo,disabled:!e.unref(v),small:"",icon:"",success:""},{icon:e.withCtx(()=>[e.createVNode(V,{light:""},{default:e.withCtx(()=>[...C[8]||(C[8]=[e.createTextVNode("check",-1)])]),_:1})]),_:1},8,["disabled"])]),_:1})):e.unref(m)?(e.openBlock(),e.createBlock(E,{key:1,"data-testid":"app-chat-audio-preview","padding-md":""},{default:e.withCtx(()=>[e.createVNode(E,{class:"wu-w-full wu-items-center","padding-sm":"",rounded:"",border:"","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(Pe,{class:"wu-flex-1",src:e.unref(m).previewUrl},null,8,["src"]),e.createVNode(O,{"data-testid":"app-chat-audio-discard",onClick:Xo,disabled:e.unref(c),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(V,{gray:""},{default:e.withCtx(()=>[...C[9]||(C[9]=[e.createTextVNode("close",-1)])]),_:1})]),_:1},8,["disabled"])]),_:1})]),_:1})):e.unref(p).length?(e.openBlock(),e.createBlock(E,{key:2,"data-testid":"app-chat-attachment-preview","padding-md":"",col:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p),(R,q)=>(e.openBlock(),e.createBlock(E,{class:"wu-items-center",key:q,"padding-sm":"",rounded:"",border:"","gap-sm":""},{default:e.withCtx(()=>[R.type==="image"&&R.previewUrl?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-10 wu-h-10 wu-rounded wu-object-cover",src:R.previewUrl,alt:R.file.name},null,8,es)):(e.openBlock(),e.createBlock(E,{key:1,class:"wu-w-7 wu-h-7 wu-bg-gray-200",center:"","padding-base":"",rounded:""},{default:e.withCtx(()=>[e.createVNode(V,{large:"",gray:""},{default:e.withCtx(()=>[...C[10]||(C[10]=[e.createTextVNode("file_present",-1)])]),_:1})]),_:1})),e.createVNode(E,{class:"wu-flex-1 wu-items-start wu-truncate",col:"","gap-none":""},{default:e.withCtx(()=>[e.createVNode(T,{class:"wu-truncate",semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(R.file.name),1)]),_:2},1024),e.createVNode(T,{"extra-small":"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(R.file.type),1)]),_:2},1024)]),_:2},1024),e.createVNode(O,{"data-testid":"app-chat-attachment-discard",onClick:rn=>Ko(q),disabled:e.unref(c),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(V,{gray:""},{default:e.withCtx(()=>[...C[11]||(C[11]=[e.createTextVNode("close",-1)])]),_:1})]),_:1},8,["onClick","disabled"])]),_:2},1024))),128))]),_:1})):e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{key:3,class:"wu-w-full wu-p-6 wu-resize-none wu-font-primary wu-text-xs wu-bg-transparent wu-text-gray-900 placeholder:wu-text-neutral placeholder:wu-text-xs placeholder:wu-font-normal focus:wu-outline-none dark:wu-text-neutral-100 [&:disabled]:wu-opacity-50","onUpdate:modelValue":C[1]||(C[1]=R=>e.isRef(d)?d.value=R:null),onKeydown:e.withKeys(e.withModifiers(Pt,["exact","prevent"]),["enter"]),placeholder:"Escreva uma mensagem...",disabled:e.unref(c)},null,40,ts)),[[e.vModelText,e.unref(d)]]),e.withDirectives(e.createElementVNode("input",{ref_key:"imageInput",ref:_,type:"file",accept:"image/png,image/gif,image/jpeg","data-testid":"app-chat-image-input",onChange:C[2]||(C[2]=R=>Et(R,"image"))},null,544),[[e.vShow,!1]]),e.withDirectives(e.createElementVNode("input",{ref_key:"documentInput",ref:k,type:"file",accept:".xlsx,.xls,image/*,.doc, .docx,.ppt, .pptx,.txt,.pdf","data-testid":"app-chat-document-input",onChange:C[3]||(C[3]=R=>Et(R,"document"))},null,544),[[e.vShow,!1]]),e.createElementVNode("div",os,[t.rule.settings?.features?.sendAttachment?(e.openBlock(),e.createBlock(e.unref(ja),{key:0,placement:"top-end"},{popper:e.withCtx(()=>[e.createVNode(E,{"gap-none":"",col:""},{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("button",{class:"wu-flex wu-bg-white wu-transition-all wu-p-3 wu-gap-2 wu-items-center hover:wu-bg-gray-100",type:"button","data-testid":"app-chat-pick-image",onClick:H},[e.createVNode(E,{class:"wu-w-7 wu-h-7 wu-bg-gray-200 wu-rounded-full",center:"","padding-base":""},{default:e.withCtx(()=>[e.createVNode(V,{large:"",gray:""},{default:e.withCtx(()=>[...C[13]||(C[13]=[e.createTextVNode("image",-1)])]),_:1})]),_:1}),e.createVNode(E,{class:"wu-w-full wu-items-start",col:"","gap-none":""},{default:e.withCtx(()=>[e.createVNode(T,{semibold:"",small:""},{default:e.withCtx(()=>[...C[14]||(C[14]=[e.createTextVNode("Imagem",-1)])]),_:1}),e.createVNode(T,{"extra-small":"",gray:""},{default:e.withCtx(()=>[...C[15]||(C[15]=[e.createTextVNode("JPG, PNG ou GIF",-1)])]),_:1})]),_:1})])),[[X]]),C[19]||(C[19]=e.createElementVNode("hr",null,null,-1)),e.withDirectives((e.openBlock(),e.createElementBlock("button",{class:"wu-flex wu-bg-white wu-transition-all wu-p-3 wu-gap-2 wu-items-center hover:wu-bg-gray-100",type:"button","data-testid":"app-chat-pick-document",onClick:j},[e.createVNode(E,{class:"wu-w-7 wu-h-7 wu-bg-gray-200 wu-rounded-full",center:"","padding-base":""},{default:e.withCtx(()=>[e.createVNode(V,{large:"",gray:""},{default:e.withCtx(()=>[...C[16]||(C[16]=[e.createTextVNode("file_present",-1)])]),_:1})]),_:1}),e.createVNode(E,{class:"wu-w-full wu-items-start",col:"","gap-none":""},{default:e.withCtx(()=>[e.createVNode(T,{semibold:"",small:""},{default:e.withCtx(()=>[...C[17]||(C[17]=[e.createTextVNode("Documento",-1)])]),_:1}),e.createVNode(T,{"extra-small":"",gray:""},{default:e.withCtx(()=>[...C[18]||(C[18]=[e.createTextVNode("PDF, DOC, XLS, PPT, etc.",-1)])]),_:1})]),_:1})])),[[X]])]),_:1})]),default:e.withCtx(()=>[e.createVNode(O,{disabled:P.value,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(V,{class:"wu-rotate-45",large:"",gray:""},{default:e.withCtx(()=>[...C[12]||(C[12]=[e.createTextVNode("attach_file",-1)])]),_:1})]),_:1},8,["disabled"])]),_:1})):e.createCommentVNode("",!0),t.rule.settings?.features?.sendAttachment?(e.openBlock(),e.createBlock(O,{key:1,"data-testid":"app-chat-record-audio",onClick:Yo,disabled:P.value,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(V,{large:"",gray:""},{default:e.withCtx(()=>[...C[20]||(C[20]=[e.createTextVNode("mic",-1)])]),_:1})]),_:1},8,["disabled"])):e.createCommentVNode("",!0),e.createVNode(O,{onClick:Pt,loading:e.unref(c),disabled:!N.value||A.value,small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(V,{class:"-wu-rotate-45 wu-translate-x-[0.10rem] -wu-translate-y-[0.12rem]",outlined:"",large:""},{default:e.withCtx(()=>[...C[21]||(C[21]=[e.createTextVNode("send",-1)])]),_:1})]),_:1},8,["loading","disabled"])])])):e.createCommentVNode("",!0)])}}}),rs={class:"wu-flex wu-flex-col wu-items-center wu-justify-center wu-h-full wu-w-full wu-px-6","data-testid":"app-voice-service"},as={class:"wu-flex wu-items-center wu-justify-center wu-rounded-full wu-bg-gray-100 wu-w-20 wu-h-20 dark:wu-bg-neutral-700"},ss=e.defineComponent({__name:"app-voice-service",props:{rule:{},edges:{}},setup(t){const o=t,n=e.computed(()=>o.rule.name||"Ligação");return(r,a)=>(e.openBlock(),e.createElementBlock("div",rs,[e.createVNode(E,{class:"wu-w-full",col:"",center:"","gap-lg":""},{default:e.withCtx(()=>[e.createVNode(E,{col:"",center:"","gap-base":""},{default:e.withCtx(()=>[e.createElementVNode("div",as,[e.createVNode(V,{"extra-large":"",gray:""},{default:e.withCtx(()=>[...a[0]||(a[0]=[e.createTextVNode("phone_in_talk",-1)])]),_:1})]),e.createVNode(T,{class:"wu-text-center","extra-large":"",semibold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.value),1)]),_:1}),e.createVNode(T,{class:"wu-text-center",small:"",gray:""},{default:e.withCtx(()=>[...a[1]||(a[1]=[e.createTextVNode("Aguardando conexão",-1)])]),_:1})]),_:1}),e.createVNode(E,{center:"","gap-md":""},{default:e.withCtx(()=>[e.createVNode(O,{ghost:"",icon:"",round:"",disabled:""},{icon:e.withCtx(()=>[e.createVNode(V,{large:"",gray:""},{default:e.withCtx(()=>[...a[2]||(a[2]=[e.createTextVNode("mic",-1)])]),_:1})]),_:1}),e.createVNode(O,{alert:"",icon:"",round:"",disabled:""},{icon:e.withCtx(()=>[e.createVNode(V,{large:""},{default:e.withCtx(()=>[...a[3]||(a[3]=[e.createTextVNode("call_end",-1)])]),_:1})]),_:1}),e.createVNode(O,{ghost:"",icon:"",round:"",disabled:""},{icon:e.withCtx(()=>[e.createVNode(V,{large:"",gray:""},{default:e.withCtx(()=>[...a[4]||(a[4]=[e.createTextVNode("volume_up",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]))}}),Vt=e.defineComponent({__name:"app-service-page",props:{rule:{},edges:{}},emits:["send-message","retry-loading-chat-service","message-action"],setup(t,{emit:o}){const n=t,r=o,a=e.computed(()=>n.rule.settings?.behavior==="voice"?ss:ns);return(s,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value),{rule:t.rule,edges:t.edges,onSendMessage:l[0]||(l[0]=i=>r("send-message")),onRetryLoadingChatService:l[1]||(l[1]=i=>r("retry-loading-chat-service")),onMessageAction:l[2]||(l[2]=i=>r("message-action",i))},null,40,["rule","edges"]))}}),ls=t=>{const o=n=>n.toString(16).padStart(2,"0");return`#${o(t.r)}${o(t.g)}${o(t.b)}`},Ho=()=>{const t="#6D3595",o=a=>{const s=a.replace("#","").trim(),l=s.length===3&&/^[0-9a-fA-F]{3}$/.test(s)?`${s[0]}${s[0]}${s[1]}${s[1]}${s[2]}${s[2]}`:s;return l.length!==6||!/^[0-9a-fA-F]{6}$/.test(l)?null:{r:parseInt(l.slice(0,2),16),g:parseInt(l.slice(2,4),16),b:parseInt(l.slice(4,6),16)}};return{isLightHex:a=>{const s=o(a);return s?(s.r*299+s.g*587+s.b*114)/1e3>160:!1},normalizeHex:a=>{const s=o(a)??o(t);return s?ls(s):t.toLowerCase()},parseHex:o}},is=()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches,jo=t=>{const{isLightHex:o,normalizeHex:n,parseHex:r}=Ho(),a=(d,p)=>d==="dark"?"dark":d==="light"?"light":p?"dark":"light",s=d=>{const p=n(d),m=r(p)??{r:109,g:53,b:149},v=o(p);return{"--wu-primary":p,"--wu-primary-rgb":`${m.r} ${m.g} ${m.b}`,"--wu-primary-fg":v?"#1c1917":"#ffffff","--wu-primary-border":v?"#e5e7eb":"color-mix(in srgb, var(--wu-primary-fg) 22%, transparent)","--wu-primary-50":`color-mix(in srgb, ${p} 8%, white)`,"--wu-primary-100":`color-mix(in srgb, ${p} 22%, white)`,"--wu-primary-200":`color-mix(in srgb, ${p} 38%, white)`,"--wu-primary-300":`color-mix(in srgb, ${p} 55%, white)`,"--wu-primary-400":v?`color-mix(in srgb, ${p} 70%, black)`:`color-mix(in srgb, ${p} 78%, white)`,"--wu-primary-500":p,"--wu-primary-600":`color-mix(in srgb, ${p} 82%, black)`,"--wu-primary-700":`color-mix(in srgb, ${p} 64%, black)`,"--wu-primary-800":`color-mix(in srgb, ${p} 42%, black)`,"--wu-primary-900":`color-mix(in srgb, ${p} 22%, black)`}},l=d=>{const p=e.ref(is()),m=e.computed(()=>a(e.toValue(d),p.value)),v=e.computed(()=>m.value==="dark"),x=e.computed(()=>v.value?"wu-dark":"");return e.onMounted(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const h=window.matchMedia("(prefers-color-scheme: dark)");p.value=h.matches;const y=w=>{p.value=w.matches};h.addEventListener("change",y),e.onBeforeUnmount(()=>h.removeEventListener("change",y))}),{isDark:v,resolvedTheme:m,themeClass:x}},{isDark:i,themeClass:u,resolvedTheme:c}=l(()=>e.toValue(t).theme),f=e.computed(()=>({...s(e.toValue(t).primaryColor),colorScheme:c.value}));return{isDark:i,themeClass:u,resolvedTheme:c,appearanceStyle:f}},us={class:"wu-flex wu-flex-col wu-w-full wu-gap-8"},cs={key:0,class:"wu-flex wu-items-center wu-w-fit wu-justify-center wu-h-0"},ds=["src"],ps={key:1,class:"wu-flex wu-flex-col wu-items-center wu-justify-start wu-gap-2 wu-px-6 wu-w-full"},St=e.defineComponent({__name:"app-screen-page",props:{rule:{},edges:{}},emits:["edge-click"],setup(t,{emit:o}){const n=t,r=o,{history:a}=pe(),s=e.computed(()=>a.value.length>0),l=e.computed(()=>n.edges??[]),i=e.computed(()=>n.rule.settings?.body),u=e.computed(()=>l.value.slice(0,3)),c=e.computed(()=>l.value.slice(3));return(f,d)=>(e.openBlock(),e.createElementBlock("div",us,[s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",cs)),e.createVNode(E,{class:"wu-px-6 wu-w-full",col:"",center:"","gap-base":""},{default:e.withCtx(()=>[i.value?.logo?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-10 wu-h-10 wu-object-contain",src:i.value.logo,alt:""},null,8,ds)):e.createCommentVNode("",!0),i.value?.eyebrow?(e.openBlock(),e.createBlock(T,{key:1,class:"wu-text-center wu-uppercase wu-tracking-widest wu-leading-none","extra-small":"",gray:"",mono:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.eyebrow),1)]),_:1})):e.createCommentVNode("",!0),i.value?.title?(e.openBlock(),e.createBlock(T,{key:2,class:"wu-text-center","extra-large":"",semibold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.title),1)]),_:1})):e.createCommentVNode("",!0),i.value?.subtitle?(e.openBlock(),e.createBlock(T,{key:3,class:"wu-w-64 wu-text-center",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.subtitle),1)]),_:1})):e.createCommentVNode("",!0)]),_:1}),l.value.length?(e.openBlock(),e.createElementBlock("div",ps,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,p=>(e.openBlock(),e.createBlock(he,{key:p.id,edge:p,onClick:d[0]||(d[0]=m=>r("edge-click",m))},null,8,["edge"]))),128)),c.value.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["wu-flex wu-items-start wu-overflow-x-auto wu-w-full invisible-scrollbar wu-pt-6",{"wu-justify-start":c.value.length>4,"wu-justify-center":c.value.length<=4}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,p=>(e.openBlock(),e.createBlock(he,{key:p.id,edge:p,icon:"",onClick:d[1]||(d[1]=m=>r("edge-click",m))},null,8,["edge"]))),128))],2)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))}}),ms="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=",fs={class:"wu-flex wu-flex-col wu-h-full wu-w-full wu-bg-white wu-overflow-hidden dark:wu-bg-neutral-800"},ws={class:"wu-w-full wu-shrink-0 wu-border-b wu-flex wu-items-center wu-px-4 wu-justify-between wu-gap-2 wu-bg-primary wu-h-[4.4rem] wu-text-[var(--wu-primary-fg)] wu-border-[var(--wu-primary-border)]"},hs={class:"wu-flex wu-items-center wu-gap-3 wu-min-w-0 wu-flex-1"},gs=["src"],vs={class:"wu-flex wu-flex-col wu-justify-center wu-min-w-0 wu-overflow-hidden"},ys={class:"wu-flex wu-flex-col wu-w-full wu-flex-1 wu-min-h-0"},xs={key:0,class:"wu-flex wu-shrink-0 wu-items-center wu-w-fit wu-justify-center wu-px-6 wu-py-4"},ks={class:"wu-flex wu-flex-col wu-w-full wu-flex-1 wu-min-h-0 wu-overflow-y-auto wu-gap-8"},bs={class:"wu-h-7 wu-w-full wu-shrink-0 wu-border-t wu-border-gray-200 wu-flex wu-items-center wu-justify-center wu-p-2 wu-gap-1 wu-bg-white dark:wu-border-neutral-700 dark:wu-bg-neutral-800"},Cs=["src"],Bs=e.defineComponent({inheritAttrs:!1,__name:"app-widget-view",props:{workflow:{},config:{},fullscreen:{type:Boolean}},emits:["retry-loading-chat-service","edge-click","send-message","message-action","submit","close","back"],setup(t,{emit:o}){const n=t,r=o,{history:a,currentRule:s,currentHeader:l,edges:i,setWorkflow:u,setConfig:c}=pe(),{appearanceStyle:f,themeClass:d}=jo(()=>n.config.configurations.appearance);u(n.workflow),c(n.config),e.watch(()=>n.workflow,w=>u(w)),e.watch(()=>n.config,w=>c(w));const p=e.computed(()=>a.value.length>0),m=e.computed(()=>p.value&&s.value?.action!=="widget-identification-screen"),v=e.computed(()=>n.config.configurations.general.isClosable),x={"widget-identification-screen":yt,"widget-article-screen":kt,"widget-service-screen":Vt,"widget-base-screen":St},h=e.computed(()=>{const w=s.value?.action;return w&&w in x?x[w]:void 0}),y=e.computed(()=>n.fullscreen?"wu-w-screen wu-h-screen":"wu-w-[24.4rem] wu-h-[38rem] widget-shadow wu-rounded-2xl");return(w,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yunique wu-overflow-hidden wu-relative",[y.value,e.unref(d)]]),"data-testid":"app-widget-view",style:e.normalizeStyle(e.unref(f))},[e.createElementVNode("div",fs,[e.createElementVNode("div",ws,[e.createElementVNode("div",hs,[e.unref(l)?.logo?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-9 wu-h-9 wu-object-contain wu-rounded-lg wu-shrink-0",src:e.unref(l).logo,alt:""},null,8,gs)):e.createCommentVNode("",!0),e.createElementVNode("div",vs,[e.unref(l)?.title?(e.openBlock(),e.createBlock(T,{key:0,class:"wu-w-full wu-truncate !wu-text-inherit",bold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l).title),1)]),_:1})):e.createCommentVNode("",!0),e.unref(l)?.subtitle?(e.openBlock(),e.createBlock(T,{key:1,class:"wu-w-full wu-truncate !wu-text-inherit wu-opacity-75","extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l).subtitle),1)]),_:1})):e.createCommentVNode("",!0)])]),v.value?(e.openBlock(),e.createBlock(O,{key:0,class:"wu-shrink-0 !wu-bg-transparent hover:!wu-bg-[color-mix(in_srgb,var(--wu-primary-fg)_12%,transparent)]",onClick:g[0]||(g[0]=$=>r("close")),"data-testid":"app-widget-close",small:"",icon:""},{default:e.withCtx(()=>[e.createVNode(V,null,{default:e.withCtx(()=>[...g[8]||(g[8]=[e.createTextVNode("close",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",ys,[e.createVNode(e.Transition,{name:"page-transition",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("div",{class:"wu-flex wu-flex-col wu-w-full wu-h-full wu-min-h-0",key:e.unref(s)?.id},[m.value?(e.openBlock(),e.createElementBlock("div",xs,[e.createElementVNode("div",{class:"wu-flex wu-items-center wu-w-fit wu-justify-center wu-cursor-pointer wu-group",onClick:g[1]||(g[1]=$=>r("back"))},[e.createVNode(V,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200",small:"",gray:""},{default:e.withCtx(()=>[...g[9]||(g[9]=[e.createTextVNode("chevron_left",-1)])]),_:1}),e.createVNode(T,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200","extra-small":"",medium:"",gray:""},{default:e.withCtx(()=>[...g[10]||(g[10]=[e.createTextVNode("Voltar",-1)])]),_:1})])])):e.createCommentVNode("",!0),e.createElementVNode("div",ks,[h.value&&e.unref(s)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h.value),{key:0,rule:e.unref(s),edges:e.unref(i),onSubmit:g[2]||(g[2]=$=>r("submit",$)),onBack:g[3]||(g[3]=$=>r("back")),onEdgeClick:g[4]||(g[4]=$=>r("edge-click",$)),onSendMessage:g[5]||(g[5]=$=>r("send-message")),onRetryLoadingChatService:g[6]||(g[6]=$=>r("retry-loading-chat-service")),onMessageAction:g[7]||(g[7]=$=>r("message-action",$))},null,40,["rule","edges"])):e.createCommentVNode("",!0)])]))]),_:1})]),e.createElementVNode("div",bs,[e.createElementVNode("img",{class:"wu-w-3 wu-h-2",src:e.unref(ms),alt:"Opens"},null,8,Cs),e.createVNode(T,{class:"!wu-text-xxs",gray:""},{default:e.withCtx(()=>[...g[11]||(g[11]=[e.createTextVNode("Powered By",-1),e.createElementVNode("b",{class:"wu-ml-1"},"Opens",-1)])]),_:1})])])],6))}}),Tt=Ee(Bs,[["__scopeId","data-v-fea132f9"]]),$s={class:"wu-flex wu-h-full wu-pl-3 wu-gap-2 wu-z-10 wu-pointer-events-none"},_s={class:"wu-h-full wu-flex wu-items-center wu-justify-center"},Ns=["value","type","disabled","maxlength"],Vs={class:"wu-absolute wu-right-2 wu-z-10 wu-flex wu-items-center wu-gap-1 wu-text-gray-500"},Wo=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,a=n,s=e.computed(()=>e.useSlots());function l(S){return!!s.value[S]}const i=e.ref(""),u=e.ref(!1),c=e.ref(!1);function f(S){if(!r.maskFunction)return S;try{const _=r.maskFunction(S);return typeof _=="string"?_:S}catch{return S}}e.watch(()=>r.modelValue,S=>{if(S==null){i.value="";return}i.value=r.maskFunction?f(S):S},{immediate:!0});function d(){return!(u.value||i.value)}const{height:p,textSize:m,width:v}=fo(r),x=e.computed(()=>r.invalid?"wu-border-red-500 focus-within:wu-border-red-500":r.valid?"wu-border-green-500 focus-within:wu-border-green-500":"wu-border-gray-200 focus-within:!wu-border-primary/40 hover:wu-border-gray-300"),h=e.computed(()=>r.invalid?"wu-text-red-500":r.valid?"wu-text-green-500":"wu-text-gray-500"),y=e.computed(()=>r.small&&d()?"wu-translate-y-[7px]":r.small&&!d()?"wu-translate-y-0":d()?"wu-translate-y-[11px]":"wu-translate-y-0"),w=e.computed(()=>l("icon")||r.loading?"wu-pl-[34px]":"wu-pl-3"),g=e.computed(()=>r.block?"wu-rounded-none":r.round?"wu-rounded-full":"wu-rounded-lg"),$=e.computed(()=>r.disabled||r.loading?"wu-opacity-50 wu-pointer-events-none":"");function A(S){const k=S.target.value;i.value=r.maskFunction?f(k):k,a("update:modelValue",i.value)}return o({focus:u,content:i}),(S,_)=>(e.openBlock(),e.createBlock(E,{class:e.normalizeClass([e.unref(v)]),col:"","gap-none":""},{default:e.withCtx(()=>[e.createVNode(E,{col:"","gap-sm":""},{default:e.withCtx(()=>[l("label")?(e.openBlock(),e.createBlock(T,{key:0,small:"",medium:""},{default:e.withCtx(()=>[e.renderSlot(S.$slots,"label")]),_:3})):e.createCommentVNode("",!0),e.createElementVNode("label",{class:e.normalizeClass(["wu-relative wu-flex wu-flex-col wu-justify-center wu-items-start wu-border wu-cursor-text wu-transition-colors wu-w-full wu-bg-transparent",[g.value,$.value,e.unref(p),x.value]]),"data-testid":"app-text-input"},[e.createElementVNode("div",$s,[e.createElementVNode("div",_s,[!t.loading&&l("icon")?(e.openBlock(),e.createBlock(V,{key:0,small:""},{default:e.withCtx(()=>[e.renderSlot(S.$slots,"icon")]),_:3})):e.createCommentVNode("",!0),t.loading?(e.openBlock(),e.createBlock(V,{key:1,class:"wu-animate-spin",small:"",outlined:""},{default:e.withCtx(()=>[..._[4]||(_[4]=[e.createTextVNode("progress_activity",-1)])]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(T,{class:e.normalizeClass(["wu-py-1 wu-transition",[y.value]]),small:"",medium:"",gray:""},{default:e.withCtx(()=>[e.renderSlot(S.$slots,"default")]),_:3},8,["class"])]),e.createElementVNode("input",{class:e.normalizeClass(["wu-absolute wu-inset-0 wu-w-full wu-h-full wu-outline-none wu-appearance-none wu-bg-transparent wu-pt-3 wu-pr-3 wu-text-gray-700 wu-font-primary wu-z-0",[e.unref(m),w.value,g.value]]),value:i.value,type:t.passwordToggle&&c.value?"text":t.type,disabled:t.disabled||t.loading,maxlength:t.maxLength,onInput:A,onFocus:_[0]||(_[0]=k=>u.value=!0),onBlur:_[1]||(_[1]=k=>u.value=!1),onKeyup:_[2]||(_[2]=e.withKeys(k=>a("keyup-enter"),["enter"]))},null,42,Ns),e.createElementVNode("div",Vs,[t.maxLength?(e.openBlock(),e.createBlock(T,{key:0,small:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(`${i.value.length} / ${t.maxLength}`),1)]),_:1})):e.createCommentVNode("",!0),t.type==="password"&&t.passwordToggle?(e.openBlock(),e.createElementBlock("button",{key:1,class:"wu-bg-transparent wu-border-0 wu-p-0 wu-cursor-pointer wu-flex wu-items-center",type:"button",tabindex:"-1",onClick:_[3]||(_[3]=k=>c.value=!c.value)},[e.createVNode(V,{small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value?"visibility_off":"visibility"),1)]),_:1})])):e.createCommentVNode("",!0),e.renderSlot(S.$slots,"suffix")])],2)]),_:3}),l("feedback")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["wu-mt-1",[h.value]])},[e.renderSlot(S.$slots,"feedback")],2)):e.createCommentVNode("",!0)]),_:3},8,["class"]))}}),Ss=()=>{const{isLightHex:t,normalizeHex:o}=Ho();return{getOffset:(s,l)=>{const i=`${l.x}px`,u=`${l.y}px`;switch(s){case"bottom-left":return{bottom:u,left:i};case"top-left":return{top:u,left:i};case"top-right":return{top:u,right:i};default:return{bottom:u,right:i}}},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 l=o(s);return{backgroundImage:"none",backgroundColor:l,color:t(l)?"#1c1917":"#ffffff"}}}},Ts=e.defineComponent({__name:"app-widget",props:{workflow:{},config:{},fullscreen:{type:Boolean}},emits:["message-action","retry-loading-chat-service","edge-click","send-message","submit","close","back","open"],setup(t,{emit:o}){const n=t,r=o,a=e.ref(n.config.configurations.general.defaultBehavior==="active"),s=e.ref(!a.value),{setWorkflow:l,setConfig:i}=pe(),{getOffset:u,getPosition:c,getTone:f}=Ss(),{appearanceStyle:d,themeClass:p}=jo(()=>n.config.configurations.appearance),m=e.computed(()=>n.config.configurations.anchor),v=e.computed(()=>n.config.configurations.appearance),x=e.computed(()=>{if(!(a.value&&n.fullscreen))return u(m.value.position,m.value.offset)}),h=e.computed(()=>c(m.value.position)),y=e.computed(()=>({workflow:n.workflow,config:n.config,fullscreen:n.fullscreen})),w=e.computed(()=>({style:f(v.value.primaryColor),small:m.value.size==="small",large:m.value.size==="large",logo:m.value.logo??"",label:m.value.label??""})),g=async()=>{a.value||(s.value=!1,await e.nextTick(),a.value=!0,r("open"))},$=()=>{a.value&&(a.value=!1,r("close"))},A=()=>{s.value=!0};return l(n.workflow),i(n.config),e.watch(()=>n.workflow,S=>l(S)),e.watch(()=>n.config,S=>i(S)),e.watch(()=>n.config.configurations.general.defaultBehavior,S=>{S==="active"?g():$()}),(S,_)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-fixed yunique wu-z-[99999]",[e.unref(p),a.value&&t.fullscreen?"wu-inset-0":""]]),"data-testid":"app-widget",style:e.normalizeStyle([{"--widget-origin":h.value},x.value,e.unref(d)])},[e.createVNode(e.Transition,{name:"widget",onAfterLeave:A},{default:e.withCtx(()=>[a.value?(e.openBlock(),e.createBlock(Tt,e.mergeProps({key:0},y.value,{onClose:$,onBack:_[0]||(_[0]=k=>r("back")),onSubmit:_[1]||(_[1]=k=>r("submit",k)),onEdgeClick:_[2]||(_[2]=k=>r("edge-click",k)),onSendMessage:_[3]||(_[3]=k=>r("send-message")),onRetryLoadingChatService:_[4]||(_[4]=k=>r("retry-loading-chat-service")),onMessageAction:_[5]||(_[5]=k=>r("message-action",k))}),null,16)):e.createCommentVNode("",!0)]),_:1}),s.value?(e.openBlock(),e.createBlock(xt,{key:0,style:e.normalizeStyle(w.value.style),small:w.value.small,large:w.value.large,logo:w.value.logo,label:w.value.label,onClick:g},null,8,["style","small","large","logo","label"])):e.createCommentVNode("",!0)],6))}}),Uo=Ee(Ts,[["__scopeId","data-v-eac31e46"]]),As=t=>t?.data?.length?{data:t.data.map(o=>({...o}))}:null,Es=t=>t?.map(o=>ht(o)),ht=t=>({...t,caption:t.caption??null,attachments:As(t.attachments),...t.messages?{messages:Es(t.messages)}:{}});class Ae{payload;constructor(o){this.payload=ht(o)}static fromJSON(o){return new Ae(o)}static toJSON(o){return ht(o.payload)}toJSON(){return Ae.toJSON(this)}get from(){return ee(this.payload)}get isSystemLike(){return ke(this.payload)}get attachments(){return qe(this.payload)}get primaryAttachment(){return ae(this.payload)}}const Ps=["id","chatRoomId","companyId","recipientId","provider","canBeInteractedWith","createdAt"],Ms=t=>{const o={};for(const n of Ps)t[n]!==void 0&&(o[n]=t[n]);return o},so=(t,o="")=>typeof t=="string"?t:t==null?o:String(t);class At{payload={messageType:"text",messageBody:""};constructor(){}static create(){return new At}withRaw(o){const n=typeof o.caption=="string"||o.caption===null?o.caption:o.caption===void 0?void 0:null;return this.payload={...this.payload,...Ms(o),messageType:so(o.messageType,"text")||"text",messageBody:so(o.messageBody),...n!==void 0?{caption:n}:{}},this}withAttachments(o){return this.payload.attachments=o.length?{data:o.map(n=>({...n}))}:null,this}build(){return Ae.fromJSON({...this.payload,messageType:this.payload.messageType||"text",messageBody:this.payload.messageBody??"",attachments:this.payload.attachments??null})}}const Ls="c3fd21c9-c91a-4c66-baa5-c3e050c2cc74",lo="2026-10-30T16:35:31.633Z",Rs="da3cbfd7-4cdc-481b-a30e-314a9ce96b92",Ds="https://svgl.app/library/slack.svg",ve=t=>({id:t.id,companyId:Ls,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:lo,updatedAt:lo}),ce=(t,o)=>({id:t,nextRuleId:o}),gt=ve({id:"17139a38-401b-4d60-a695-df3dc9cb0975",name:"Início",action:"widget-base-screen",settings:{body:{logo:"",title:"Bem-vindo",eyebrow:"SLACK",subtitle:"Escolha uma das opções"},header:{logo:Ds,title:"Slack",subtitle:"Retire todas suas dúvidas no nosso Widget"}}}),at=ve({id:"3c672c70-4221-411b-bfaf-66ce0383bc38",name:"Falar com o suporte (Chat)",action:"widget-service-screen",settings:{behavior:"chat",features:{sendMessage:!0,sendAttachment:!0,quickReplies:[{"en-US":"I have a question about the product","es-ES":"Tengo una duda sobre el producto","pt-BR":"Estou com dúvida no produto"},{"en-US":"My phone extension isn't working","es-ES":"Mi extensión telefónica no funciona","pt-BR":"Meu ramal não está funcionando"}]}}}),st=ve({id:"f230e458-bfe3-461f-b971-00ff2e99ac77",name:"Falar com vendas (Ligação)",action:"widget-service-screen",settings:{behavior:"voice",features:{sendMessage:!1,sendAttachment:!1}}}),lt=ve({id:"af089783-0c06-4d44-9b8d-a7b748c5bfe6",name:"Cancelar plano",action:"widget-identification-screen",settings:{form:{fields:[{name:"nome",label:"Nome",required:!0,placeholder:"Digite seu nome"},{name:"email",label:"E-mail",required:!0,placeholder:"Digite seu e-mail"},{name:"cpf",label:"CPF",required:!0,placeholder:"Digite seu CPF"}]}}}),io=ve({id:"12bf98e7-1c99-4971-a4a8-23d039f2d730",name:"Nova tela",action:"widget-base-screen",settings:null}),De=ve({id:"9f2c1a6e-5b84-4d21-9c0e-7a1d8e4f2b30",name:"Perguntas frequentes",action:"widget-article-screen",settings:{header:{title:"Perguntas frequentes",subtitle:"Respostas rápidas sobre o produto"},body:{content:{"pt-BR":"<h2>Como podemos ajudar?</h2><p>Confira as respostas abaixo ou escolha uma opção para continuar o atendimento.</p><ul><li>Horário de atendimento: segunda a sexta, 9h às 18h</li><li>Canais: chat e ligação</li></ul>","en-US":"<h2>How can we help?</h2><p>Check the answers below or choose an option to continue.</p><ul><li>Support hours: Monday to Friday, 9am to 6pm</li><li>Channels: chat and call</li></ul>","es-ES":"<h2>¿Cómo podemos ayudar?</h2><p>Consulta las respuestas a continuación o elige una opción para continuar.</p><ul><li>Horario: lunes a viernes, 9h a 18h</li><li>Canales: chat y llamada</li></ul>"}}}}),qo={id:Rs,rules:[at,st,lt,io,De,gt],edges:{[gt.id]:[ce("a4d9ac3b-2212-46f6-afba-467b884b238d",at.id),ce("83c40bab-2126-450d-8556-a1c052a8efdb",st.id),ce("88435327-78cd-49bc-9f9d-37c764bc2091",lt.id),ce("c1e8f4a2-9b7d-4e6a-8f3c-2d5a1b0e7c94",De.id)],[De.id]:[ce("d4a2b9c1-6e8f-4a7b-9c2d-1f0e5a8b3c76",at.id),ce("e5b3c0d2-7f9a-4b8c-0d3e-2a1f6b9c4d87",st.id)],[lt.id]:[ce("27af113a-047e-4410-8d90-2f024c7a7fc5",io.id)]}},Os=De,zs=gt,Is=t=>qo.rules.find(o=>o.id===t),Fs={configurations:{alias:"Slack Suporte",general:{defaultBehavior:"inactive",language:"pt-BR",isClosable:!0},appearance:{theme:"dark",primaryColor:"#141e3e"},anchor:{label:"Fale conosco",size:"medium",logo:"https://svgl.app/library/slack.svg",position:"bottom-right",offset:{x:16,y:16}}}},Hs={install:t=>{t.use(Ua),t.component("AppIdentificationPage",yt),t.component("AppFormTextInput",vt),t.component("AppWidgetAnchor",xt),t.component("AppArticlePage",kt),t.component("AppServicePage",Vt),t.component("AppScreenPage",St),t.component("AppWidgetView",Tt),t.component("AppTextInput",Wo),t.component("AppCarousel",Ue),t.component("AppAudioPlayer",Pe),t.component("AppSkeleton",_t),t.component("AppMessage",We),t.component("AppWidget",Uo),t.component("AppButton",O),t.component("AppEmpty",Nt),t.component("AppGroup",E),t.component("AppEdge",he),t.component("AppIcon",V),t.component("AppText",T)}};exports.AppArticlePage=kt;exports.AppAudioPlayer=Pe;exports.AppButton=O;exports.AppCarousel=Ue;exports.AppEdge=he;exports.AppEmpty=Nt;exports.AppFormTextInput=vt;exports.AppGroup=E;exports.AppIcon=V;exports.AppIdentificationPage=yt;exports.AppMessage=We;exports.AppScreenPage=St;exports.AppServicePage=Vt;exports.AppSkeleton=_t;exports.AppText=T;exports.AppTextInput=Wo;exports.AppWidget=Uo;exports.AppWidgetAnchor=xt;exports.AppWidgetView=Tt;exports.ServiceChatMessageBuilder=At;exports.ServiceChatMessageVO=Ae;exports.default=Hs;exports.demoArticleRule=Os;exports.demoRootRule=zs;exports.demoWidgetConfig=Fs;exports.demoWorkflow=qo;exports.findDemoRuleById=Is;exports.useAppWidget=pe;exports.useChatService=co;exports.useServicePage=po;exports.useVoiceService=uo;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");function gn(){return{maskPhone:r=>{if(!r)return"";let s=r.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})/,(i,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:r=>{const s=r.toUpperCase().replace(/[^0-9A-Z]/g,"");let i="";for(const l of s){if(i.length>=14)break;(i.length<12||/\d/.test(l))&&(i+=l)}return i.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:r=>r.replace(/\D/g,"").slice(0,8).replace(/^(\d{5})(\d)/,"$1-$2"),maskCpf:r=>r.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 fo(){return{}}const nt=e.ref([]),vn=e.ref(""),yn=e.shallowRef([]),xn=e.shallowRef(null),bn=e.ref(!1),kn=e.ref(!1),Cn=e.ref(!1);function wo(){return{isSendingMessage:bn,isErrorLoading:kn,attachments:yn,isLoading:Cn,messages:nt,audio:xn,text:vn,setMessages:n=>{nt.value=[...n]},addMessage:n=>{nt.value.push(n)}}}function ho(){const t=wo(),o=fo();return{chat:t,voice:o}}const ve=e.ref([]),at=e.ref(void 0),te=e.ref(void 0),rt=e.ref(void 0),pt=e.ref(void 0),go=t=>!!(t?.logo?.trim()||t?.title?.trim()||t?.subtitle?.trim()),zt=t=>{!t||!go(t)||(pt.value={...t})},de=()=>{const t=h=>{const y=new Set(Object.values(h.edges??{}).flatMap(g=>g.map(v=>v.nextRuleId)));return h.rules.find(g=>!y.has(g.id))??h.rules[0]},o=(h,y)=>{const g=new Map(h.rules.map(v=>[v.id,v]));return(h.edges[y]??[]).flatMap(v=>{const B=g.get(v.nextRuleId);return B?[B]:[]})},n=e.computed(()=>new Map((te.value?.rules??[]).map(h=>[h.id,h]))),a=e.computed(()=>te.value?t(te.value):void 0),r=e.computed(()=>{const h=at.value;return h&&n.value.get(h)||a.value}),s=e.computed(()=>!te.value||!r.value?[]:o(te.value,r.value.id)),i=e.computed(()=>{const h=r.value?.settings?.header;return go(h)?h:pt.value}),l=e.computed(()=>rt.value?.configurations.general.language??"pt-BR"),u=ho();return{currentRuleId:at,currentHeader:i,currentRule:r,rootRule:a,workflow:te,language:l,history:ve,config:rt,edges:s,setCurrentRuleId:h=>{at.value=h,zt(r.value?.settings?.header)},clearHistory:()=>{ve.value=[]},setWorkflow:h=>{te.value?.id!==h?.id&&(pt.value=void 0),te.value=h,zt(r.value?.settings?.header)},setConfig:h=>{rt.value=h},pushHistory:h=>{ve.value.push(h)},setHistory:h=>{ve.value=[...h]},popHistory:()=>ve.value.pop(),...u}},me=t=>t==="name",Ot=t=>!!t?.trim(),Bn=t=>{const o=t.filter(a=>me(a.name)),n=t.filter(a=>!me(a.name));return[...o,...n]};function $n(t,o){const{maskPhone:n,maskCpf:a}=gn(),{history:r}=de(),s=e.ref(0),i=e.ref("forward"),l=e.ref(null),u=e.computed(()=>{const C=e.toValue(t),D=C.settings?.form&&C.settings.form.fields||[];return Bn(D)}),c=e.reactive(Object.fromEntries(u.value.map(C=>[C.name,""]))),f=e.computed(()=>u.value[s.value]),d=e.computed(()=>s.value>=u.value.length-1),p=e.computed(()=>r.value.length>0||s.value>0),m=e.computed(()=>i.value==="back"?"step-back":"step-forward");e.watch(s,async()=>{await e.nextTick();const C=l.value;if(!C)return;(C.querySelector(".is-active input")??C.querySelector("input"))?.focus({preventScroll:!0})});const w=e.computed(()=>u.value.every(C=>!C.required||Ot(c[C.name]))),x=C=>{const D=u.value[C];return D?D.required&&!Ot(c[D.name])?!1:C>=u.value.length-1?w.value:!0:w.value},h=e.computed(()=>x(s.value)),y=e.computed(()=>{const C=u.value.find(D=>me(D.name));return C?c[C.name]?.trim().split(/\s+/)[0]??"":""}),g=C=>{const D=u.value[C],z=y.value,H=u.value.length?`Passo ${C+1} de ${u.value.length}`:"",F=e.toValue(t),j=C>=u.value.length-1;if(!D)return{eyebrow:H,title:F.settings?.body?.title??F.name??"",subtitle:F.settings?.body?.subtitle??""};if(me(D.name))return{eyebrow:H,title:"Como podemos te chamar?",subtitle:"Primeiro, nos diga o seu nome."};const I=j?z?`Quase lá, ${z}.`:"Quase lá.":z?`Olá, ${z}.`:"Olá.",W=D.required?`Informe seu ${D.label} para continuar.`:`Gostaria de deixar seu ${D.label}?`;return{eyebrow:H,title:I,subtitle:W}},v=e.computed(()=>g(s.value)),B=C=>C==="email"?"email":C==="phone"?"tel":"text",k=C=>C==="email"?"email":C==="phone"?"call":me(C)?"person":C==="order"?"receipt":"badge",V=C=>C.required?`${C.label} *`:C.label,N=C=>me(C.name)?"Seu nome":C.name==="phone"?"Seu telefone":C.name==="email"?"Seu e-mail":C.name==="cpf"?"000.000.000-00":C.placeholder||C.label,b=C=>{if(C==="phone")return n;if(C==="cpf")return a},A=()=>{w.value&&o("submit",{...c})};return{stepTransition:m,currentField:f,canContinue:h,currentStep:s,isLastStep:d,stepIntro:v,fieldHost:l,showBack:p,fields:u,form:c,continueStep:()=>{if(h.value){if(d.value||u.value.length===0)return A();i.value="forward",s.value+=1}},canContinueAt:x,introFor:g,fieldLabel:V,fieldPlaceholder:N,fieldType:B,fieldMask:b,fieldIcon:k,goBack:()=>{if(s.value>0){i.value="back",s.value-=1;return}o("back")}}}function vo(t){const o=e.computed(()=>t.small?"!wu-h-8 !wu-min-h-[2rem]":"!wu-h-12 !wu-min-h-[3rem]"),n=e.computed(()=>"!wu-text-xs"),a=e.computed(()=>t.fluid?"!wu-w-full":"wu-w-fit");return{height:o,textSize:n,width:a}}function _n(t,o){const n=e.computed(()=>({"!wu-font-plus":o.plus,"!wu-font-inter":o.inter,"!wu-font-titillium":o.titillium,"!wu-font-mono":o.mono})),a=e.computed(()=>({"!wu-text-white":o.white,"!wu-text-primary":o.primary,"!wu-text-secondary":o.secondary,"!wu-text-base":o.neutral,"!wu-text-neutral dark:!wu-text-neutral-200":o.gray})),r=e.computed(()=>({"!wu-font-thin":o.thin,"!wu-font-extralight":o.extralight,"!wu-font-light":o.light,"!wu-font-normal":o.normal,"!wu-font-medium":o.medium,"!wu-font-semibold":o.semibold,"!wu-font-bold":o.bold,"!wu-font-extrabold":o.extrabold,"!wu-font-black":o.black})),s=e.computed(()=>({...{title:{"!wu-text-xl":o.small,"!wu-text-2xl":o.base,"!wu-text-3xl":o.large,"!wu-text-4xl":o.extraLarge},subtitle:{"!wu-text-sm":o.small,"!wu-text-md":o.base,"!wu-text-xl":o.large},text:{"!wu-text-xxs":o.extraSmall,"!wu-text-xs":o.small,"!wu-text-sm":o.base,"!wu-text-lg":o.large,"!wu-text-2xl":o.extraLarge}}[t]}));return{fontClass:n,colorClass:a,weightClass:r,sizeClass:s}}const Nn=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:a,weightClass:r,sizeClass:s}=_n("text",o);return(i,l)=>(e.openBlock(),e.createElementBlock("p",{class:e.normalizeClass(["wu-font-primary wu-text-sm wu-font-normal wu-text-gray-900 dark:wu-text-neutral-100",[e.unref(n),e.unref(a),e.unref(r),e.unref(s)]])},[e.renderSlot(i.$slots,"default",{},void 0,!0)],2))}}),Ae=(t,o)=>{const n=t.__vccOpts||t;for(const[a,r]of o)n[a]=r;return n},E=Ae(Nn,[["__scopeId","data-v-5fc0fe9d"]]),L=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?"wu-w-fit wu-h-fit":o.full?"wu-w-full wu-h-full":""),a=e.computed(()=>o.justifyEnd?"wu-items-end wu-justify-end":o.center?"wu-items-center wu-justify-center":o.centerBetween?"wu-items-center wu-justify-between":""),r=e.computed(()=>o.row?"wu-flex-row":o.col?"wu-flex-col":"wu-flex-row"),s=e.computed(()=>o.gapBase?"wu-gap-4":o.gapXs?"wu-gap-1":o.gapSm?"wu-gap-2":o.gapMd?"wu-gap-6":o.gapLg?"wu-gap-8":o.gapNone?"wu-gap-0":"wu-gap-4"),i=e.computed(()=>o.wrap?"wu-flex-wrap":""),l=e.computed(()=>o.paddingXs?"wu-p-1":o.paddingSm?"wu-p-2":o.paddingBase?"wu-p-4":o.paddingMd?"wu-p-6":o.paddingLg?"wu-p-8":""),u=e.computed(()=>o.border?"wu-border":o.borderPrimary?"wu-border wu-border-primary":""),c=e.computed(()=>o.rounded?"wu-rounded-lg":o.roundedTop?"wu-rounded-t-md":o.roundedBottom?"wu-rounded-b-md":""),f=e.computed(()=>o.bgPrimary?"wu-bg-primary":o.bgWhite?"wu-bg-white":""),d=e.computed(()=>o.divisor&&o.col?"wu-divide-y":o.divisor&&o.row?"wu-divide-x":""),p=e.computed(()=>[r.value,s.value,i.value,l.value,a.value,u.value,c.value,f.value,n.value,d.value]);return(m,w)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-flex",p.value])},[e.renderSlot(m.$slots,"default")],2))}}),Sn={class:"wu-flex wu-flex-col wu-items-stretch wu-w-full wu-cursor-text wu-gap-1","data-testid":"app-form-text-input"},Vn=["value","type","placeholder","disabled","maxlength","aria-invalid"],kt=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 a=t,r=n,s=e.computed(()=>e.useSlots());function i(h){return!!s.value[h]}const l=e.ref(""),u=e.ref(!1);function c(h){if(!a.maskFunction)return h;try{const y=a.maskFunction(h);return typeof y=="string"?y:h}catch{return h}}e.watch(()=>a.modelValue,h=>{if(h==null){l.value="";return}l.value=a.maskFunction?c(h):h},{immediate:!0});const{width:f}=vo(a),d=e.computed(()=>a.invalid?"wu-text-red-500":a.valid?"wu-text-green-500":""),p=e.computed(()=>a.invalid?"wu-text-red-600 placeholder:wu-text-red-300 placeholder:wu-font-medium":a.valid?"wu-text-green-700 placeholder:wu-font-medium":"wu-text-gray-900 placeholder:wu-text-gray-400 placeholder:wu-font-medium dark:wu-text-neutral-100 dark:placeholder:wu-text-neutral-500"),m=e.computed(()=>a.invalid?"wu-text-red-500":a.valid?"wu-text-green-500":"wu-text-gray-500"),w=e.computed(()=>a.disabled?"wu-opacity-50 wu-pointer-events-none":"");function x(h){const g=h.target.value;l.value=a.maskFunction?c(g):g,r("update:modelValue",l.value)}return o({focus:u,content:l}),(h,y)=>(e.openBlock(),e.createBlock(L,{class:e.normalizeClass([e.unref(f),w.value]),col:"","gap-none":""},{default:e.withCtx(()=>[e.createElementVNode("label",Sn,[i("default")?(e.openBlock(),e.createBlock(E,{key:0,small:"",gray:"",class:e.normalizeClass([d.value])},{default:e.withCtx(()=>[e.renderSlot(h.$slots,"default")]),_:3},8,["class"])):e.createCommentVNode("",!0),e.createElementVNode("input",{class:e.normalizeClass(["wu-w-full wu-bg-transparent wu-border-0 wu-outline-none wu-p-0 wu-m-0 wu-appearance-none wu-font-primary wu-text-2xl wu-leading-tight wu-caret-gray-900 dark:wu-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:x,onFocus:y[0]||(y[0]=g=>u.value=!0),onBlur:y[1]||(y[1]=g=>u.value=!1),onKeyup:y[2]||(y[2]=e.withKeys(g=>r("keyup-enter"),["enter"]))},null,42,Vn)]),i("feedback")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["wu-mt-1",[m.value]])},[e.renderSlot(h.$slots,"feedback")],2)):e.createCommentVNode("",!0)]),_:3},8,["class"]))}});function An(t){const o=e.computed(()=>t.small?"!wu-h-8 !wu-min-h-[2rem]":""),n=e.computed(()=>"!wu-text-xs"),a=e.computed(()=>t.small?"wu-px-[0.625rem]":"wu-p-[0.9rem]"),r=e.computed(()=>t.fluid?"!wu-w-full":"wu-w-fit");return{height:o,textSize:n,padding:a,width:r}}const T=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?"!wu-text-xs wu-w-4 wu-h-4":o.large?"!wu-text-xl wu-w-8 wu-h-8":o.extraLarge?"!wu-text-4xl wu-w-10 wu-h-10":"!wu-text-base wu-w-6 wu-h-6"),a=e.computed(()=>o.dark?"wu-text-neutral-800 dark:wu-text-white":o.light?"wu-text-white dark:wu-text-neutral-800":o.gray?"wu-text-gray-500 dark:wu-text-neutral-400":""),r=e.computed(()=>o.outlined?"material-symbols-outlined":"wu-material-icons");return(s,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["notranslate wu-flex wu-items-center wu-justify-center wu-text-center",[n.value,a.value,r.value]]),"data-testid":"app-icon"},[e.renderSlot(s.$slots,"default")],2))}}),Tn=["disabled"],En={class:"wu-flex wu-items-center wu-justify-center wu-gap-2"},O=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 a(m){return!!n.value[m]}const{height:r,textSize:s,padding:i,width:l}=An(o),u=e.computed(()=>o.soft?"wu-bg-primary-50 !wu-text-primary-400":o.alert?"wu-bg-red-500 !wu-text-white":o.warning?"wu-bg-amber-500 !wu-text-white":o.success?"wu-bg-green-500 !wu-text-white":o.outline?"wu-bg-transparent !wu-border-gray-200 hover:!wu-bg-gray-100 hover:!wu-border-gray-300 dark:!wu-border-neutral-600 dark:hover:!wu-bg-neutral-700 dark:hover:!wu-border-neutral-500 dark:!wu-text-neutral-100":o.ghost?"wu-bg-transparent !wu-text-gray-700 hover:!wu-bg-gray-100 dark:!wu-text-neutral-200 dark:hover:!wu-bg-neutral-700":o.link?"wu-bg-transparent !wu-text-blue-600 hover:wu-underline":"wu-bg-primary-500 !wu-text-[var(--wu-primary-fg)]"),c=e.computed(()=>o.block?"wu-rounded-none":o.round?"wu-rounded-full":"wu-rounded-lg"),f=e.computed(()=>o.icon&&o.small?"!wu-w-8 !wu-h-8 wu-p-0":o.icon?"!wu-w-11 !wu-h-11 wu-p-0":i.value),d=e.computed(()=>o.icon?"wu-justify-center":"wu-justify-between"),p=e.computed(()=>o.disabled||o.loading?"wu-opacity-50 wu-pointer-events-none":"");return(m,w)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["wu-inline-flex wu-items-center wu-gap-2 wu-cursor-pointer wu-transition-all wu-border wu-border-transparent disabled:wu-opacity-50 disabled:wu-pointer-events-none hover:wu-opacity-80 focus:wu-outline-hidden focus:wu-opacity-80",[e.unref(s),u.value,c.value,e.unref(l),e.unref(r),p.value,f.value,d.value]]),type:"button",disabled:t.disabled||t.loading,"data-testid":"app-button",onClick:w[0]||(w[0]=x=>m.$emit("click",x))},[e.createElementVNode("div",En,[t.loading?(e.openBlock(),e.createBlock(T,{key:0,class:"wu-animate-spin wu-flex wu-items-center wu-justify-center",small:"",outlined:""},{default:e.withCtx(()=>[...w[1]||(w[1]=[e.createTextVNode("progress_activity",-1)])]),_:1})):a("icon")?(e.openBlock(),e.createBlock(T,{key:1,small:""},{default:e.withCtx(()=>[e.renderSlot(m.$slots,"icon")]),_:3})):e.createCommentVNode("",!0),!t.loading&&a("default")?(e.openBlock(),e.createBlock(E,{key:2,class:"!wu-text-inherit",small:""},{default:e.withCtx(()=>[e.renderSlot(m.$slots,"default")]),_:3})):e.createCommentVNode("",!0)]),!t.loading&&a("trailing")?(e.openBlock(),e.createBlock(T,{key:0,small:""},{default:e.withCtx(()=>[e.renderSlot(m.$slots,"trailing")]),_:3})):e.createCommentVNode("",!0)],10,Tn))}}),Pn=["aria-hidden"],Rn=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 a=t,r=n,s=e.useSlots(),i=e.ref(null),l=e.ref(null),u=e.ref(0),c=e.ref(0),f=e.ref(!1);let d=null;const p=e.computed(()=>Math.max(a.modelValue,0)),m=()=>(s.default?.()??[]).flatMap(b=>b.type===e.Comment||b.type===e.Text?[]:b.type===e.Fragment?(b.children??[]).filter(A=>!!A&&typeof A=="object"&&A.type!==e.Comment&&A.type!==e.Text):[b]),w=b=>{const A=Math.abs(b-p.value);return A===0?"is-active":A===1?"is-adjacent":"is-far"},x=b=>{const A=l.value?.childElementCount||m().length,S=Math.min(Math.max(b,0),Math.max(A-1,0));S!==a.modelValue&&r("update:modelValue",S)},h=()=>{const b=i.value;b&&(b.scrollLeft&&(b.scrollLeft=0),b.scrollTop&&(b.scrollTop=0))},y=(b,A)=>{const S=getComputedStyle(b)[A].trim(),R=parseFloat(S);if(!Number.isFinite(R)||R<=0)return 0;if(S.endsWith("%")){const C=A==="scrollPaddingTop"?b.clientHeight:b.clientWidth;return R/100*C}return R},g=()=>{const b=i.value,A=l.value;if(!b||!A)return;h();const S=[...A.children],R=parseFloat(getComputedStyle(A).gap)||0,C=a.vertical?"scrollPaddingTop":"scrollPaddingLeft",D=y(b,C),z=I=>a.vertical?I.offsetHeight:I.offsetWidth,H=S[p.value]?z(S[p.value]):0,F=a.vertical&&a.fill?Math.max((b.clientHeight-H)/2,0):D,j=S.slice(0,p.value).reduce((I,W)=>I+z(W)+R,0);u.value=F-j,c.value=a.vertical&&!a.fill?H+D*2:0,f.value=!0},v=()=>{d?.disconnect();const b=i.value,A=l.value;if(!(!b||!A)&&(g(),!(typeof ResizeObserver>"u"))){if(d=new ResizeObserver(g),d.observe(b),a.vertical)for(const S of A.children)d.observe(S);b.removeEventListener("scroll",h),b.addEventListener("scroll",h,{passive:!0})}},B=e.computed(()=>[a.vertical?"wu-carousel--vertical":"wu-carousel--horizontal",{"is-ready":f.value,"wu-carousel--fill":a.fill}]),k=e.computed(()=>a.vertical?"wu-flex-col wu-items-stretch":"wu-flex-row wu-items-center"),V=e.computed(()=>{if(!(!a.vertical||a.fill||!c.value))return{height:`${c.value}px`}}),N=e.computed(()=>{const b=`${u.value}px`;return{transform:a.vertical?`translate3d(0, ${b}, 0)`:`translate3d(${b}, 0, 0)`}});return e.watch(()=>[a.vertical,a.fill,a.modelValue],async()=>{await e.nextTick(),v()}),e.onMounted(async()=>{await e.nextTick(),v()}),e.onBeforeUnmount(()=>{d?.disconnect(),i.value?.removeEventListener("scroll",h)}),o({next:()=>x(p.value+1),prev:()=>x(p.value-1),goTo:x}),(b,A)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-relative wu-w-full wu-overflow-hidden",B.value]),ref_key:"rootRef",ref:i,"data-testid":"app-carousel",style:e.normalizeStyle(V.value)},[e.createElementVNode("div",{class:e.normalizeClass(["wu-carousel-track wu-flex",k.value]),ref_key:"trackRef",ref:l,style:e.normalizeStyle(N.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m(),(S,R)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-carousel-slide",w(R)]),key:S.key??R,"aria-hidden":R!==p.value,"data-testid":"app-carousel-slide"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(S)))],10,Pn))),128))],6)],6))}}),je=Ae(Rn,[["__scopeId","data-v-96f06600"]]),Ln={class:"wu-flex wu-flex-col wu-w-full wu-h-full"},Mn={class:"wu-relative wu-flex wu-items-center wu-w-full wu-shrink-0"},Dn={class:"wu-flex wu-shrink-0 wu-items-center wu-w-fit wu-justify-center wu-px-6 wu-py-4"},zn={class:"wu-absolute wu-inset-0 wu-flex wu-items-center wu-justify-center wu-pointer-events-none"},On={class:"wu-flex wu-items-center wu-gap-1.5"},Ct=e.defineComponent({__name:"app-identification-page",props:{rule:{},edges:{}},emits:["submit","back"],setup(t,{emit:o}){const n=t,a=o,{currentStep:r,fieldHost:s,showBack:i,fields:l,form:u,continueStep:c,canContinueAt:f,introFor:d,fieldPlaceholder:p,fieldType:m,fieldMask:w,goBack:x}=$n(()=>n.rule,a);return(h,y)=>(e.openBlock(),e.createElementBlock("div",Ln,[e.createElementVNode("div",Mn,[e.createElementVNode("div",Dn,[e.createElementVNode("div",{class:e.normalizeClass(["wu-flex wu-items-center wu-w-fit wu-justify-center wu-cursor-pointer wu-group",{"wu-invisible wu-pointer-events-none":!e.unref(i)}]),onClick:y[0]||(y[0]=(...g)=>e.unref(x)&&e.unref(x)(...g))},[e.createVNode(T,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200",small:"",gray:""},{default:e.withCtx(()=>[...y[2]||(y[2]=[e.createTextVNode("chevron_left",-1)])]),_:1}),e.createVNode(E,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200","extra-small":"",medium:"",gray:""},{default:e.withCtx(()=>[...y[3]||(y[3]=[e.createTextVNode("Voltar",-1)])]),_:1})],2)]),e.createElementVNode("div",zn,[e.createElementVNode("div",On,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(g,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-h-1 wu-w-6 wu-rounded-full wu-transition-colors",v<=e.unref(r)?"wu-bg-gray-900 dark:wu-bg-white":"wu-bg-gray-200 dark:wu-bg-neutral-600"]),key:v},null,2))),128))])])]),e.createElementVNode("div",{class:"wu-flex-1 wu-min-h-0 wu-w-full wu-px-6 wu-pb-12",ref_key:"fieldHost",ref:s},[e.createVNode(je,{class:"wu-w-full wu-h-full",modelValue:e.unref(r),"onUpdate:modelValue":y[1]||(y[1]=g=>e.isRef(r)?r.value=g:null),vertical:"",fill:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(g,v)=>(e.openBlock(),e.createBlock(L,{class:"wu-w-full wu-gap-8",key:g.name,col:"",center:""},{default:e.withCtx(()=>[e.createVNode(L,{class:"wu-w-full wu-relative wu-pr-6",col:"","gap-sm":""},{default:e.withCtx(()=>[e.unref(d)(v).title?(e.openBlock(),e.createBlock(E,{key:0,class:"wu-text-left","extra-large":"",semibold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)(v).title),1)]),_:2},1024)):e.createCommentVNode("",!0),e.unref(d)(v).subtitle?(e.openBlock(),e.createBlock(E,{key:1,class:"wu-text-left",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)(v).subtitle),1)]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(E,{class:"wu-opacity-50 wu-absolute -wu-top-2 wu-right-0",gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v+1),1)]),_:2},1024)]),_:2},1024),e.createVNode(L,{class:"wu-w-full wu-items-center",col:"","gap-md":""},{default:e.withCtx(()=>[e.createVNode(kt,{modelValue:e.unref(u)[g.name],"onUpdate:modelValue":B=>e.unref(u)[g.name]=B,"mask-function":e.unref(w)(g.name),placeholder:e.unref(p)(g),type:e.unref(m)(g.name),onKeyupEnter:e.unref(c),fluid:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","mask-function","placeholder","type","onKeyupEnter"]),e.createVNode(O,{fluid:"",disabled:!e.unref(f)(v),onClick:e.unref(c)},{trailing:e.withCtx(()=>[...y[4]||(y[4]=[e.createTextVNode("arrow_forward",-1)])]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v>=e.unref(l).length-1?"Finalizar":"Continuar"),1)]),_:2},1032,["disabled","onClick"])]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["modelValue"])],512)]))}}),In=["disabled"],Hn=["src"],Bt=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()),a=e.computed(()=>o.outline?"wu-bg-transparent !wu-border-gray-200 hover:!wu-bg-gray-100 hover:!wu-border-gray-300":o.ghost?"wu-bg-transparent !wu-text-gray-700 hover:!wu-bg-gray-100":"wu-bg-gradient-to-br wu-from-primary-500 wu-to-secondary-500 wu-text-white"),r=e.computed(()=>n.value?o.small?"wu-h-12 wu-w-fit wu-px-3 wu-gap-2":o.large?"wu-h-16 wu-w-fit wu-px-5 wu-gap-3":"wu-h-14 wu-w-fit wu-px-4 wu-gap-2":o.small?"wu-w-12 wu-h-12 wu-p-0":o.large?"wu-w-16 wu-h-16 wu-p-0":"wu-w-14 wu-h-14 wu-p-0"),s=e.computed(()=>o.small?"wu-w-6 wu-h-6":o.large?"wu-w-8 wu-h-8":"wu-w-7 wu-h-7"),i=e.computed(()=>o.disabled||o.loading?"wu-opacity-50 wu-pointer-events-none":"");return(l,u)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["wu-rounded-full wu-inline-flex wu-items-center wu-justify-center wu-cursor-pointer wu-overflow-hidden wu-transition-all wu-border wu-border-transparent hover:wu-opacity-80 focus:wu-outline-hidden focus:wu-opacity-80 disabled:wu-opacity-50 disabled:wu-pointer-events-none",[r.value,a.value,i.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(T,{key:0,class:"wu-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(["wu-object-contain wu-pointer-events-none wu-select-none wu-shrink-0",s.value]),src:t.logo,alt:"","data-testid":"app-anchor-logo"},null,10,Hn)):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createBlock(E,{key:2,class:"!wu-text-inherit wu-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,In))}}),Fn="widgets",jn={"widget-identification-screen":"assignment","widget-base-screen":"desktop_windows","widget-article-screen":"description","widget-service-screen":"chat"},It={chat:"chat",voice:"phone_in_talk"},Wn=t=>{if(t.action==="widget-service-screen"){const o=t.settings?.behavior;if(o&&o in It)return It[o]}return jn[t.action]??Fn},qn={key:0,class:"wu-flex wu-flex-col wu-items-center wu-gap-2","data-testid":"app-edge"},Un=["src"],Gn={key:1,class:"wu-w-full wu-max-w-[25rem]","data-testid":"app-edge"},Zn=["src"],we=e.defineComponent({__name:"app-edge",props:{edge:{},icon:{type:Boolean}},emits:["click"],setup(t,{emit:o}){const n=t,a=o,r=e.computed(()=>n.edge.settings?.header?.logo),s=e.computed(()=>Wn(n.edge));return(i,l)=>t.icon?(e.openBlock(),e.createElementBlock("div",qn,[e.createVNode(O,{outline:"",icon:"",onClick:l[0]||(l[0]=u=>a("click",t.edge))},{icon:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-5 wu-h-5 wu-object-contain",src:r.value,alt:""},null,8,Un)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(s.value),1)],64))]),_:1}),e.createVNode(E,{class:"wu-w-20 wu-text-center wu-leading-3 wu-line-clamp-2","extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.edge.name),1)]),_:1})])):(e.openBlock(),e.createElementBlock("div",Gn,[e.createVNode(O,{class:"hover:wu-translate-x-1",outline:"",fluid:"",onClick:l[1]||(l[1]=u=>a("click",t.edge))},{icon:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-4 wu-h-4 wu-object-contain",src:r.value,alt:""},null,8,Zn)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(s.value),1)],64))]),trailing:e.withCtx(()=>[...l[2]||(l[2]=[e.createTextVNode("chevron_right",-1)])]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.edge.name),1)]),_:1})]))}}),Qn={class:"wu-flex wu-flex-col wu-w-full wu-gap-8"},Kn={key:0,class:"wu-flex wu-items-center wu-w-fit wu-justify-center wu-h-0"},Xn=["innerHTML"],Yn={key:2,class:"wu-flex wu-flex-col wu-items-center wu-justify-start wu-gap-2 wu-px-6 wu-w-full"},Jn=e.defineComponent({__name:"app-article-page",props:{rule:{},edges:{}},emits:["edge-click"],setup(t,{emit:o}){const n=t,a=o,{history:r,language:s}=de(),i=e.computed(()=>r.value.length>0),l=e.computed(()=>n.edges??[]),u=e.computed(()=>l.value.slice(0,3)),c=e.computed(()=>l.value.slice(3)),f=e.computed(()=>n.rule.settings?.body),d=m=>{if(!m)return"";const w=s.value;return m[w]??m["pt-BR"]??Object.values(m).find(Boolean)??""},p=e.computed(()=>d(f.value?.content));return(m,w)=>(e.openBlock(),e.createElementBlock("div",Qn,[i.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Kn)),p.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"wu-px-6 wu-w-full wu-article-content wu-font-primary wu-text-neutral wu-overflow-x-auto dark:wu-text-neutral-200","data-testid":"app-article-content",innerHTML:p.value},null,8,Xn)):e.createCommentVNode("",!0),l.value.length?(e.openBlock(),e.createElementBlock("div",Yn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,x=>(e.openBlock(),e.createBlock(we,{key:x.id,edge:x,onClick:w[0]||(w[0]=h=>a("edge-click",h))},null,8,["edge"]))),128)),c.value.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["wu-flex wu-items-start wu-overflow-x-auto wu-w-full invisible-scrollbar wu-pt-6",{"wu-justify-start":c.value.length>4,"wu-justify-center":c.value.length<=4}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,x=>(e.openBlock(),e.createBlock(we,{key:x.id,edge:x,icon:"",onClick:w[1]||(w[1]=h=>a("edge-click",h))},null,8,["edge"]))),128))],2)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),w[2]||(w[2]=e.createElementVNode("div",{class:"wu-flex wu-items-center wu-w-fit wu-justify-center wu-h-0"},null,-1))]))}}),$t=Ae(Jn,[["__scopeId","data-v-54b98051"]]),ea=120,ta=()=>typeof MediaRecorder>"u"?"audio/webm":MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":MediaRecorder.isTypeSupported("audio/webm")?"audio/webm":MediaRecorder.isTypeSupported("audio/mp4")?"audio/mp4":"audio/webm",oa=t=>t.includes("mp4")?"m4a":"webm",Ht=t=>t.toString().padStart(2,"0");function na(){const t=e.ref(!1),o=e.ref(0),n=e.ref(null);let a=null,r=null,s=[],i=null,l="audio/webm",u=!1,c=null;const f=e.computed(()=>{const g=Math.floor(o.value/60),v=o.value%60;return`${Ht(g)}:${Ht(v)}`}),d=()=>{i&&(clearInterval(i),i=null)},p=()=>{r?.getTracks().forEach(g=>g.stop()),r=null},m=()=>{d(),p(),a=null,s=[],o.value=0,t.value=!1},w=()=>{if(!s.length)return null;const g=l.split(";")[0]||"audio/webm",v=new Blob(s,{type:g});return new File([v],`recording.${oa(g)}`,{type:g})},x=async()=>{if(n.value=null,typeof navigator>"u"||!navigator.mediaDevices?.getUserMedia)return n.value="Gravação de áudio não é suportada neste navegador",!1;try{return r=await navigator.mediaDevices.getUserMedia({audio:!0}),l=ta(),s=[],a=new MediaRecorder(r,{mimeType:l}),a.ondataavailable=g=>{g.data.size>0&&s.push(g.data)},a.onstop=()=>{const g=u?null:w(),v=c;c=null,u=!1,m(),v?.(g)},a.start(),t.value=!0,o.value=0,i=setInterval(()=>{o.value+=1,o.value>=ea&&h()},1e3),!0}catch{return m(),n.value="Não foi possível acessar o microfone",!1}},h=()=>!a||a.state==="inactive"?(m(),Promise.resolve(null)):(d(),t.value=!1,new Promise(g=>{c=g,a?.stop(),p()})),y=async()=>{u=!0,s=[],await h()};return e.onUnmounted(()=>{y()}),{formattedDuration:f,durationSeconds:o,isRecording:t,error:n,cancel:y,start:x,stop:h}}const J=t=>t.provider?t.provider==="opens"?"operator":"contact":"system",We=t=>{const o=t.attachments?.data;return Array.isArray(o)?o:[]},ae=t=>We(t)[0],yo=t=>typeof t.caption=="string"?t.caption.trim():"",aa=t=>t.messageBody?.trim()??"",ra=t=>{if(!t)return"";const o=t instanceof Date?t:new Date(t);return Number.isNaN(o.getTime())?"":o.toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"})},xo=t=>t.type==="document"&&t.filename.toLowerCase().endsWith(".pdf"),sa=(t,o)=>{const n=o.metadata&&typeof o.metadata=="object"?o.metadata:null,a=t.selectedValue||(typeof n?.selectedValue=="string"?n.selectedValue:void 0),r=t.selectedOption||(typeof n?.selectedOption=="string"?n.selectedOption:void 0),s=t.selectedAt||(typeof n?.selectedAt=="string"?n.selectedAt:void 0);return{selectedValue:a,selectedOption:r,selectedAt:s}},Me=t=>{const o=t.messageBody;if(!o)return null;try{const n=typeof o=="string"?JSON.parse(o):o;if(!n||!Array.isArray(n.menu))return null;const{selectedValue:a,selectedOption:r,selectedAt:s}=sa(n,t),l=!!(a||r)||t.canBeInteractedWith===!1;return{description:n.description||"",selectedOption:r,selectedValue:a,selectedAt:s,menu:n.menu.map(u=>{const c=!!(a&&u.value===a||r&&u.label===r);return{...u,selected:c,disabled:l?!0:!!u.disabled}})}}catch{return null}},ia=(t,o)=>{if(!t||!o)return!1;const n=new Date(t),a=new Date(o);return Number.isNaN(n.getTime())||Number.isNaN(a.getTime())?!1:Math.floor(n.getTime()/6e4)===Math.floor(a.getTime()/6e4)},la=t=>!!(t&&t.messageType==="image"&&!yo(t)),ua=(t=[])=>{if(!t.length)return[];const o=[];let n=[];const a=()=>{if(n.length){if(n.length===1)o.push(n[0]);else{const r=n[0];o.push({id:typeof r.id=="number"?r.id:void 0,provider:r.provider,recipientId:r.recipientId,messageType:"_grouped_images",messageBody:"",createdAt:r.createdAt,canBeInteractedWith:!1,messages:[...n]})}n=[]}};for(const r of t){if(!la(r)){a(),o.push(r);continue}if(!n.length){n.push(r);continue}const s=n[n.length-1];if(J(s)===J(r)&&ia(s.createdAt,r.createdAt)){n.push(r);continue}a(),n.push(r)}return a(),o},ye=t=>J(t)==="system",ca=["src","alt"],da=["src"],pa=["src"],ma=["title"],qe=e.defineComponent({__name:"app-media-preview",props:{open:{type:Boolean},items:{},index:{}},emits:["close","update:index"],setup(t,{emit:o}){const n=t,a=o,r=e.computed({get:()=>n.index??0,set:p=>a("update:index",p)}),s=e.computed(()=>r.value>0),i=e.computed(()=>r.value<n.items.length-1),l=e.computed(()=>n.items.length>1),u=()=>a("close"),c=()=>{s.value&&(r.value-=1)},f=()=>{i.value&&(r.value+=1)},d=p=>{n.open&&(p.key==="Escape"&&u(),p.key==="ArrowLeft"&&c(),p.key==="ArrowRight"&&f())};return e.watch(()=>n.open,p=>{p?window.addEventListener("keydown",d):window.removeEventListener("keydown",d)}),e.onBeforeUnmount(()=>{window.removeEventListener("keydown",d)}),(p,m)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[t.open&&t.items.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:"wu-fixed wu-inset-0 wu-flex wu-items-center wu-justify-center wu-overflow-hidden wu-bg-black wu-bg-opacity-90 wu-z-[100000]","data-testid":"app-media-preview",onClick:u},[e.createElementVNode("button",{class:"wu-absolute wu-top-4 wu-right-4 wu-flex wu-items-center wu-justify-center wu-w-10 wu-h-10 wu-rounded-full wu-bg-black wu-bg-opacity-50 wu-border-0 wu-cursor-pointer",type:"button","data-testid":"app-media-preview-close",onClick:e.withModifiers(u,["stop"])},[e.createVNode(T,{light:""},{default:e.withCtx(()=>[...m[2]||(m[2]=[e.createTextVNode("close",-1)])]),_:1})]),l.value&&s.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"wu-absolute wu-left-4 wu-z-10 wu-flex wu-items-center wu-justify-center wu-w-10 wu-h-10 wu-rounded-full wu-bg-black wu-bg-opacity-50 wu-border-0 wu-cursor-pointer",type:"button","data-testid":"app-media-preview-prev",onClick:e.withModifiers(c,["stop"])},[e.createVNode(T,{light:""},{default:e.withCtx(()=>[...m[3]||(m[3]=[e.createTextVNode("chevron_left",-1)])]),_:1})])):e.createCommentVNode("",!0),l.value&&i.value?(e.openBlock(),e.createElementBlock("button",{key:1,class:"wu-absolute wu-right-4 wu-z-10 wu-flex wu-items-center wu-justify-center wu-w-10 wu-h-10 wu-rounded-full wu-bg-black wu-bg-opacity-50 wu-border-0 wu-cursor-pointer",type:"button","data-testid":"app-media-preview-next",onClick:e.withModifiers(f,["stop"])},[e.createVNode(T,{light:""},{default:e.withCtx(()=>[...m[4]||(m[4]=[e.createTextVNode("chevron_right",-1)])]),_:1})])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"wu-w-full wu-h-full wu-flex wu-items-center wu-justify-center",onClick:m[1]||(m[1]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(je,{class:"wu-w-full",modelValue:r.value,"onUpdate:modelValue":m[0]||(m[0]=w=>r.value=w)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(w,x)=>(e.openBlock(),e.createElementBlock("div",{class:"wu-flex wu-flex-col wu-items-center wu-justify-center wu-gap-3",key:`${w.src}-${x}`},[w.type==="image"?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-rounded wu-object-contain wu-w-full wu-max-h-[80vh]",src:w.src,alt:w.filename||"Imagem"},null,8,ca)):w.type==="video"?(e.openBlock(),e.createElementBlock("video",{key:1,class:"wu-rounded wu-object-contain wu-w-full wu-max-h-[80vh]",src:w.src,controls:""},null,8,da)):w.type==="pdf"?(e.openBlock(),e.createElementBlock("iframe",{key:2,class:"wu-bg-white wu-rounded wu-w-full wu-h-[85vh]",src:w.src,frameborder:"0"},null,8,pa)):e.createCommentVNode("",!0),w.filename?(e.openBlock(),e.createElementBlock("p",{key:3,class:"wu-text-white wu-text-xs wu-opacity-75 wu-truncate wu-max-w-full",title:w.filename},e.toDisplayString(w.filename),9,ma)):e.createCommentVNode("",!0)]))),128))]),_:1},8,["modelValue"])])])):e.createCommentVNode("",!0)]))}}),fa=["onClick"],wa=["src","alt"],ha={key:1,class:"wu-flex wu-items-center wu-justify-center wu-w-full wu-h-full"},ga={key:2,class:"wu-absolute wu-inset-0 wu-flex wu-items-center wu-justify-center wu-bg-black wu-bg-opacity-50"},va={class:"wu-text-white wu-text-lg wu-font-semibold"},ya=e.defineComponent({__name:"app-message-grouped-images",props:{message:{}},setup(t){const o=t,n=e.computed(()=>o.message.messages||[]),a=e.computed(()=>n.value.slice(0,4)),r=e.computed(()=>Math.max(0,n.value.length-4)),s=f=>ae(f)?.link||"",i=e.ref(!1),l=e.ref(0),u=e.computed(()=>{const f=[];for(const d of n.value){const p=ae(d);p?.link&&f.push({src:p.link,type:"image",filename:p.filename})}return f}),c=f=>{u.value.length&&(l.value=Math.min(f,u.value.length-1),i.value=!0)};return(f,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-grid wu-gap-1 wu-rounded wu-overflow-hidden wu-min-w-[12rem]",a.value.length===1?"wu-grid-cols-1":"wu-grid-cols-2"]),"data-testid":"app-message-grouped-images"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(p,m)=>(e.openBlock(),e.createElementBlock("div",{class:"wu-relative wu-aspect-square wu-bg-gray-100 wu-cursor-pointer dark:wu-bg-neutral-800",key:p.id??m,onClick:w=>c(m)},[s(p)?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-full wu-h-full wu-object-cover",src:s(p),alt:e.unref(ae)(p)?.filename||"Imagem"},null,8,wa)):(e.openBlock(),e.createElementBlock("div",ha,[e.createVNode(T,{gray:"",large:""},{default:e.withCtx(()=>[...d[2]||(d[2]=[e.createTextVNode("image",-1)])]),_:1})])),m===a.value.length-1&&r.value>0?(e.openBlock(),e.createElementBlock("div",ga,[e.createElementVNode("span",va,e.toDisplayString(`+${r.value}`),1)])):e.createCommentVNode("",!0)],8,fa))),128)),e.createVNode(qe,{open:i.value,items:u.value,index:l.value,onClose:d[0]||(d[0]=p=>i.value=!1),"onUpdate:index":d[1]||(d[1]=p=>l.value=p)},null,8,["open","items","index"])],2))}}),xa=["disabled"],ba={key:0,class:"wu-w-2 wu-h-2 wu-rounded-full wu-bg-primary-600 wu-shrink-0"},Te=e.defineComponent({__name:"app-audio-player",props:{src:{},file:{}},setup(t){const o=t,n=e.ref(null),a=e.ref(!1),r=e.ref(0),s=e.ref(0),i=e.ref(1),l=e.ref(null),u=A=>Math.floor(A).toString().padStart(2,"0"),c=A=>{if(!Number.isFinite(A)||A<0)return"00:00";const S=Math.floor(A/60),R=Math.floor(A%60);return`${u(S)}:${u(R)}`},f=e.computed(()=>!s.value||!Number.isFinite(s.value)?0:Math.min(100,r.value/s.value*100)),d=e.computed(()=>Number.isFinite(s.value)&&s.value>0),p=e.computed(()=>`${c(r.value)} / ${c(s.value)}`),m=()=>{l.value&&(URL.revokeObjectURL(l.value),l.value=null)},w=()=>{if(m(),o.src)return o.src;if(o.file)return l.value=URL.createObjectURL(e.toRaw(o.file)),l.value},x=()=>{s.value=n.value?.duration||0},h=()=>{r.value=n.value?.currentTime||0},y=()=>{a.value=!1,r.value=0,n.value&&(n.value.currentTime=0)},g=()=>{n.value&&(n.value.pause(),n.value.removeEventListener("loadedmetadata",x),n.value.removeEventListener("timeupdate",h),n.value.removeEventListener("ended",y),n.value=null,a.value=!1,r.value=0,s.value=0)},v=()=>{g();const A=w();if(!A)return;const S=new Audio(A);S.addEventListener("loadedmetadata",x),S.addEventListener("timeupdate",h),S.addEventListener("ended",y),S.playbackRate=i.value,n.value=S},B=async()=>{!n.value||!d.value||(await n.value.play(),a.value=!0)},k=()=>{n.value&&(n.value.pause(),a.value=!1)},V=()=>{a.value?k():B()},N=A=>{if(!n.value||!d.value)return;const R=A.currentTarget.getBoundingClientRect(),C=Math.min(1,Math.max(0,(A.clientX-R.left)/R.width));n.value.currentTime=C*s.value,r.value=n.value.currentTime},b=()=>{i.value=Math.max(1,(i.value+.5)%2.5),n.value&&(n.value.playbackRate=i.value)};return e.watch(()=>[o.src,o.file],()=>v(),{immediate:!0}),e.onBeforeUnmount(()=>{g(),m()}),(A,S)=>(e.openBlock(),e.createBlock(L,{class:"wu-w-full wu-min-w-0 wu-items-center","data-testid":"app-audio-player","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(O,{"data-testid":"app-audio-player-toggle",onClick:V,disabled:!d.value,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(T,{gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value?"pause":"play_arrow"),1)]),_:1})]),_:1},8,["disabled"]),e.createVNode(L,{class:"wu-flex-1 wu-min-w-0",col:"","gap-xs":""},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"wu-w-full wu-rounded-full wu-bg-gray-200 wu-cursor-pointer wu-overflow-hidden wu-h-1.5 dark:wu-bg-neutral-700 disabled:wu-cursor-default",type:"button","data-testid":"app-audio-player-seek",disabled:!d.value,onClick:N},[e.createElementVNode("div",{class:"wu-h-full wu-rounded-full wu-bg-primary-500 wu-transition-all wu-flex wu-items-center wu-justify-end",style:e.normalizeStyle({width:`${f.value}%`})},[f.value>0?(e.openBlock(),e.createElementBlock("div",ba)):e.createCommentVNode("",!0)],4)],8,xa),e.createVNode(E,{"extra-small":"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value),1)]),_:1})]),_:1}),e.createVNode(O,{"data-testid":"app-audio-player-speed",onClick:b,disabled:!d.value,ghost:"",small:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value)+"x",1)]),_:1},8,["disabled"])]),_:1}))}}),ka={class:"wu-flex wu-flex-col wu-gap-2 wu-min-w-[12rem]","data-testid":"app-message-attachments"},Ca=["innerHTML"],Ba=["onClick"],$a=["src","alt"],_a=["src"],Na={key:2,class:"wu-flex wu-items-center wu-justify-center wu-w-full wu-h-full"},Sa={key:3,class:"wu-absolute wu-inset-0 wu-flex wu-items-center wu-justify-center wu-bg-black wu-bg-opacity-50"},Va={class:"wu-text-white wu-text-lg wu-font-semibold"},Aa={key:0,class:"wu-flex-1 wu-min-w-0"},Ta=e.defineComponent({__name:"app-message-attachments",props:{message:{}},emits:["message-action"],setup(t,{emit:o}){const n=t,a=o,r=e.computed(()=>We(n.message)),s=e.computed(()=>r.value.filter(v=>v.type==="image"||v.type==="video")),i=e.computed(()=>r.value.filter(v=>v.type!=="image"&&v.type!=="video")),l=e.computed(()=>s.value.slice(0,4)),u=e.computed(()=>Math.max(0,s.value.length-4)),c=e.computed(()=>aa(n.message)),f=e.computed(()=>yo(n.message)),d=e.computed(()=>!!(l.value.length||i.value.length)),p=e.ref(!1),m=e.ref(0),w=e.ref([]),x=v=>{w.value=s.value.filter(B=>B.link).map(B=>({src:B.link,type:B.type==="video"?"video":"image",filename:B.filename})),w.value.length&&(m.value=Math.min(v,w.value.length-1),p.value=!0)},h=v=>{v.link&&(w.value=[{src:v.link,type:"pdf",filename:v.filename}],m.value=0,p.value=!0)},y=()=>{p.value=!1,w.value=[]},g=v=>{a("message-action",{action:"download",message:n.message,attachment:v})};return(v,B)=>(e.openBlock(),e.createElementBlock("div",ka,[c.value?(e.openBlock(),e.createBlock(E,{key:0,"data-testid":"app-message-attachments-body",gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createElementVNode("span",{innerHTML:c.value},null,8,Ca)]),_:1})):e.createCommentVNode("",!0),l.value.length?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["wu-grid wu-gap-1 wu-rounded wu-overflow-hidden",l.value.length===1?"wu-grid-cols-1":"wu-grid-cols-2"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(k,V)=>(e.openBlock(),e.createElementBlock("div",{class:"wu-relative wu-aspect-square wu-bg-gray-100 wu-cursor-pointer dark:wu-bg-neutral-800",key:k.id,onClick:N=>x(V)},[k.type==="image"&&k.link?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-full wu-h-full wu-object-cover",src:k.link,alt:k.filename},null,8,$a)):k.type==="video"&&k.link?(e.openBlock(),e.createElementBlock("video",{key:1,class:"wu-w-full wu-h-full wu-object-cover",src:k.link,preload:"metadata"},null,8,_a)):(e.openBlock(),e.createElementBlock("div",Na,[e.createVNode(T,{gray:"",large:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.type==="video"?"videocam":"image"),1)]),_:2},1024)])),V===l.value.length-1&&u.value>0?(e.openBlock(),e.createElementBlock("div",Sa,[e.createElementVNode("span",Va,e.toDisplayString(`+${u.value}`),1)])):e.createCommentVNode("",!0),e.createVNode(O,{class:"wu-absolute wu-bottom-1 wu-right-1 !wu-bg-black/55 hover:!wu-bg-black/75 !wu-text-white !wu-border-0",onClick:e.withModifiers(N=>g(k),["stop"]),ghost:"",small:"",icon:"",round:""},{icon:e.withCtx(()=>[e.createVNode(T,{class:"!wu-text-white dark:!wu-text-white"},{default:e.withCtx(()=>[...B[1]||(B[1]=[e.createTextVNode("download",-1)])]),_:1})]),_:1},8,["onClick"])],8,Ba))),128))],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,k=>(e.openBlock(),e.createBlock(L,{class:"wu-items-center wu-bg-white dark:wu-bg-neutral-800",key:k.id,"padding-sm":"",rounded:"",border:"","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(L,{class:"wu-w-8 wu-h-8 wu-bg-gray-200 wu-shrink-0 dark:wu-bg-neutral-700",center:"",rounded:""},{default:e.withCtx(()=>[e.createVNode(T,{gray:"",large:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.type==="audio"?"mic":"file_present"),1)]),_:2},1024)]),_:2},1024),k.type==="audio"&&k.link?(e.openBlock(),e.createElementBlock("div",Aa,[e.createVNode(Te,{src:k.link},null,8,["src"])])):(e.openBlock(),e.createBlock(E,{key:1,class:"wu-flex-1 wu-truncate wu-min-w-0",title:k.filename,semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.filename),1)]),_:2},1032,["title"])),e.unref(xo)(k)?(e.openBlock(),e.createBlock(O,{key:2,onClick:V=>h(k),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(T,{gray:""},{default:e.withCtx(()=>[...B[2]||(B[2]=[e.createTextVNode("visibility",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(O,{onClick:V=>g(k),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(T,{gray:""},{default:e.withCtx(()=>[...B[3]||(B[3]=[e.createTextVNode("download",-1)])]),_:1})]),_:1},8,["onClick"])]),_:2},1024))),128)),f.value&&d.value?(e.openBlock(),e.createBlock(E,{key:2,"data-testid":"app-message-attachments-caption",gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.value),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(qe,{open:p.value,items:w.value,index:m.value,onClose:y,"onUpdate:index":B[0]||(B[0]=k=>m.value=k)},null,8,["open","items","index"])]))}}),Ea={class:"wu-w-full wu-px-3 wu-py-2 wu-bg-primary-500"},Pa=["disabled","onClick"],Ra=e.defineComponent({__name:"app-message-interactive",props:{message:{}},emits:["message-action"],setup(t,{emit:o}){const n=t,a=o,r=e.ref(Me(n.message));e.watch(()=>[n.message.messageBody,n.message.metadata,n.message.canBeInteractedWith],()=>{r.value=Me(n.message)});const s=e.computed(()=>!!(n.message.canBeInteractedWith&&r.value)),i=l=>{s.value&&(l.disabled||l.selected||(a("message-action",{action:"select-option",message:n.message,option:l}),r.value&&(r.value={...r.value,selectedOption:l.label,selectedValue:l.value,selectedAt:new Date().toISOString(),menu:r.value.menu.map(u=>({...u,selected:u.value===l.value,disabled:!0}))})))};return(l,u)=>r.value?(e.openBlock(),e.createBlock(L,{key:0,class:"wu-w-full wu-overflow-hidden wu-bg-white wu-min-w-[14rem] dark:wu-bg-neutral-800",col:"","gap-none":"",rounded:"",border:"","data-testid":"app-message-interactive"},{default:e.withCtx(()=>[e.createElementVNode("div",Ea,[e.createVNode(E,{class:"!wu-text-[var(--wu-primary-fg)]",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value.description),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.menu,(c,f)=>(e.openBlock(),e.createElementBlock("button",{class:"wu-flex wu-w-full wu-items-center wu-justify-between wu-gap-2 wu-px-3 wu-py-3 wu-text-left wu-bg-transparent wu-border-0 wu-border-t wu-border-gray-100 dark:wu-border-neutral-700 disabled:wu-opacity-50",key:`${c.value}-${f}`,type:"button",disabled:!s.value||c.disabled,onClick:d=>i(c)},[e.createVNode(L,{class:"wu-items-start wu-flex-1 wu-min-w-0",col:"","gap-none":""},{default:e.withCtx(()=>[e.createVNode(E,{semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.label),1)]),_:2},1024),c.description?(e.openBlock(),e.createBlock(E,{key:0,"extra-small":"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.description),1)]),_:2},1024)):e.createCommentVNode("",!0)]),_:2},1024),e.createVNode(T,{class:e.normalizeClass(c.selected?"wu-text-green-500":""),gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.selected?"check_circle":"radio_button_unchecked"),1)]),_:2},1032,["class"])],8,Pa))),128))]),_:1})):e.createCommentVNode("",!0)}}),La={class:"wu-flex wu-flex-col wu-gap-2 wu-min-w-[14rem]","data-testid":"app-message-document"},Ma=e.defineComponent({__name:"app-message-document",props:{message:{}},emits:["message-action"],setup(t,{emit:o}){const n=t,a=o,r=e.computed(()=>ae(n.message)),s=e.computed(()=>r.value?.filename||n.message.messageBody||"Documento"),i=e.computed(()=>!!(r.value?.link&&xo(r.value))),l=e.ref(!1),u=e.computed(()=>!i.value||!r.value?.link?[]:[{src:r.value.link,type:"pdf",filename:r.value.filename}]),c=()=>{a("message-action",{action:"download",message:n.message,attachment:r.value})};return(f,d)=>(e.openBlock(),e.createElementBlock("div",La,[e.createVNode(L,{class:"wu-items-center wu-bg-white dark:wu-bg-neutral-800","padding-sm":"",rounded:"",border:"","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(L,{class:"wu-w-8 wu-h-8 wu-bg-gray-200 wu-shrink-0 dark:wu-bg-neutral-700",center:"",rounded:""},{default:e.withCtx(()=>[e.createVNode(T,{gray:"",large:""},{default:e.withCtx(()=>[...d[2]||(d[2]=[e.createTextVNode("file_present",-1)])]),_:1})]),_:1}),e.createVNode(E,{class:"wu-flex-1 wu-truncate wu-min-w-0",title:s.value,semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value),1)]),_:1},8,["title"]),i.value?(e.openBlock(),e.createBlock(O,{key:0,onClick:d[0]||(d[0]=p=>l.value=!0),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(T,{gray:""},{default:e.withCtx(()=>[...d[3]||(d[3]=[e.createTextVNode("visibility",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(O,{onClick:c,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(T,{gray:""},{default:e.withCtx(()=>[...d[4]||(d[4]=[e.createTextVNode("download",-1)])]),_:1})]),_:1})]),_:1}),t.message.caption?(e.openBlock(),e.createBlock(E,{key:0,gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.message.caption),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(qe,{open:l.value,items:u.value,index:0,onClose:d[1]||(d[1]=p=>l.value=!1)},null,8,["open","items"])]))}}),Da={class:"wu-w-full wu-px-3 wu-py-2 wu-bg-primary-500"},za=["disabled","onClick"],Oa=e.defineComponent({__name:"app-message-survey",props:{message:{}},emits:["message-action"],setup(t,{emit:o}){const n=t,a=o,r=e.ref(Me(n.message));e.watch(()=>[n.message.messageBody,n.message.metadata,n.message.canBeInteractedWith],()=>{r.value=Me(n.message)});const s=e.computed(()=>!!(n.message.canBeInteractedWith&&r.value)),i=e.computed(()=>!!r.value?.menu.some(u=>u.selected)),l=u=>{s.value&&(u.disabled||u.selected||(a("message-action",{action:"select-survey",message:n.message,option:u}),r.value&&(r.value={...r.value,menu:r.value.menu.map(c=>({...c,selected:c.value===u.value,disabled:!0}))})))};return(u,c)=>r.value?(e.openBlock(),e.createBlock(L,{key:0,class:"wu-w-full wu-overflow-hidden wu-bg-white wu-min-w-[14rem] dark:wu-bg-neutral-800",col:"","gap-none":"",rounded:"",border:"","data-testid":"app-message-survey"},{default:e.withCtx(()=>[e.createElementVNode("div",Da,[e.createVNode(E,{class:"!wu-text-[var(--wu-primary-fg)]",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value.description),1)]),_:1})]),s.value&&!i.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.value.menu,(f,d)=>(e.openBlock(),e.createElementBlock("button",{class:"wu-flex wu-w-full wu-items-center wu-justify-between wu-gap-2 wu-px-3 wu-py-3 wu-text-left wu-bg-transparent wu-border-0 wu-border-t wu-border-gray-100 dark:wu-border-neutral-700 disabled:wu-opacity-50",key:`${f.value}-${d}`,type:"button",disabled:f.disabled,onClick:p=>l(f)},[e.createVNode(E,{semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.label),1)]),_:2},1024),e.createVNode(T,{class:e.normalizeClass(f.selected?"wu-text-green-500":""),gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.selected?"check_circle":"radio_button_unchecked"),1)]),_:2},1032,["class"])],8,za))),128)):(e.openBlock(),e.createBlock(L,{key:1,class:"wu-items-center wu-justify-center wu-px-3 wu-py-3 wu-border-t wu-border-gray-100 dark:wu-border-neutral-700","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(E,{small:"",gray:""},{default:e.withCtx(()=>[...c[0]||(c[0]=[e.createTextVNode("Pesquisa de satisfação já respondida",-1)])]),_:1}),e.createVNode(T,{class:"wu-text-green-500"},{default:e.withCtx(()=>[...c[1]||(c[1]=[e.createTextVNode("check_circle",-1)])]),_:1})]),_:1}))]),_:1})):e.createCommentVNode("",!0)}}),mt=e.defineComponent({__name:"app-message-audio",props:{message:{}},emits:["message-action"],setup(t,{emit:o}){const n=t,a=o,r=e.computed(()=>ae(n.message)),s=e.computed(()=>r.value?.link||""),i=()=>{a("message-action",{action:"download",message:n.message,attachment:r.value})};return(l,u)=>(e.openBlock(),e.createBlock(L,{class:"wu-items-center wu-min-w-[14rem]","gap-sm":"","data-testid":"app-message-audio"},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createBlock(Te,{key:0,class:"wu-flex-1",src:s.value},null,8,["src"])):(e.openBlock(),e.createBlock(L,{key:1,class:"wu-items-center wu-justify-center wu-h-10 wu-flex-1 wu-rounded wu-bg-gray-100 dark:wu-bg-neutral-800"},{default:e.withCtx(()=>[e.createVNode(T,{gray:""},{default:e.withCtx(()=>[...u[0]||(u[0]=[e.createTextVNode("mic",-1)])]),_:1})]),_:1})),e.createVNode(O,{onClick:i,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(T,{gray:""},{default:e.withCtx(()=>[...u[1]||(u[1]=[e.createTextVNode("download",-1)])]),_:1})]),_:1})]),_:1}))}}),Ia={class:"wu-flex wu-flex-col wu-gap-2 wu-min-w-[10rem]","data-testid":"app-message-image"},Ha={class:"wu-relative wu-rounded wu-overflow-hidden wu-bg-gray-100 dark:wu-bg-neutral-800"},Fa=["src","alt"],ja={key:1,class:"wu-flex wu-items-center wu-justify-center wu-h-32"},Wa=e.defineComponent({__name:"app-message-image",props:{message:{}},emits:["message-action"],setup(t,{emit:o}){const n=t,a=o,r=e.computed(()=>ae(n.message)),s=e.computed(()=>r.value?.link||""),i=e.ref(!1),l=e.computed(()=>s.value?[{src:s.value,type:"image",filename:r.value?.filename}]:[]),u=()=>{a("message-action",{action:"download",message:n.message,attachment:r.value})};return(c,f)=>(e.openBlock(),e.createElementBlock("div",Ia,[e.createElementVNode("div",Ha,[s.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-full wu-max-h-64 wu-object-cover wu-cursor-pointer",src:s.value,alt:r.value?.filename||t.message.caption||"Imagem",onClick:f[0]||(f[0]=d=>i.value=!0)},null,8,Fa)):(e.openBlock(),e.createElementBlock("div",ja,[e.createVNode(T,{gray:"",large:""},{default:e.withCtx(()=>[...f[2]||(f[2]=[e.createTextVNode("image",-1)])]),_:1})])),e.createVNode(O,{class:"wu-absolute wu-bottom-2 wu-right-2 !wu-bg-black/55 hover:!wu-bg-black/75 !wu-text-white !wu-border-0",onClick:e.withModifiers(u,["stop"]),ghost:"",small:"",icon:"",round:""},{icon:e.withCtx(()=>[e.createVNode(T,{class:"!wu-text-white dark:!wu-text-white"},{default:e.withCtx(()=>[...f[3]||(f[3]=[e.createTextVNode("download",-1)])]),_:1})]),_:1})]),t.message.caption?(e.openBlock(),e.createBlock(E,{key:0,gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.message.caption),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(qe,{open:i.value,items:l.value,index:0,onClose:f[1]||(f[1]=d=>i.value=!1)},null,8,["open","items"])]))}}),qa={class:"wu-flex wu-flex-col wu-gap-2 wu-min-w-[12rem]","data-testid":"app-message-video"},Ua={class:"wu-relative wu-rounded wu-overflow-hidden wu-bg-black"},Ga=["src"],Za={key:1,class:"wu-flex wu-items-center wu-justify-center wu-h-32"},Qa=e.defineComponent({__name:"app-message-video",props:{message:{}},emits:["message-action"],setup(t,{emit:o}){const n=t,a=o,r=e.computed(()=>ae(n.message)),s=e.computed(()=>r.value?.link||""),i=()=>{a("message-action",{action:"download",message:n.message,attachment:r.value})};return(l,u)=>(e.openBlock(),e.createElementBlock("div",qa,[e.createElementVNode("div",Ua,[s.value?(e.openBlock(),e.createElementBlock("video",{key:0,class:"wu-w-full wu-max-h-64",src:s.value,controls:"",preload:"metadata"},null,8,Ga)):(e.openBlock(),e.createElementBlock("div",Za,[e.createVNode(T,{gray:"",large:""},{default:e.withCtx(()=>[...u[0]||(u[0]=[e.createTextVNode("videocam",-1)])]),_:1})])),e.createVNode(O,{class:"wu-absolute wu-bottom-2 wu-right-2 !wu-bg-black/55 hover:!wu-bg-black/75 !wu-text-white !wu-border-0",onClick:i,ghost:"",small:"",icon:"",round:""},{icon:e.withCtx(()=>[e.createVNode(T,{class:"!wu-text-white dark:!wu-text-white"},{default:e.withCtx(()=>[...u[1]||(u[1]=[e.createTextVNode("download",-1)])]),_:1})]),_:1})]),t.message.caption?(e.openBlock(),e.createBlock(E,{key:0,gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.message.caption),1)]),_:1})):e.createCommentVNode("",!0)]))}}),Ka=["innerHTML"],Xa=["innerHTML"],ft=e.defineComponent({__name:"app-message-text",props:{message:{}},setup(t){const o=t,n=e.computed(()=>J(o.message)==="system");return(a,r)=>n.value?(e.openBlock(),e.createBlock(E,{key:0,class:"wu-text-center",gray:"","extra-small":"",medium:"","data-testid":"app-message-text"},{default:e.withCtx(()=>[e.createElementVNode("span",{innerHTML:t.message.messageBody},null,8,Ka)]),_:1})):(e.openBlock(),e.createBlock(E,{key:1,gray:"",small:"",medium:"","data-testid":"app-message-text"},{default:e.withCtx(()=>[e.createElementVNode("span",{innerHTML:t.message.messageBody},null,8,Xa)]),_:1}))}}),Ya={_grouped_images:ya,interactive:Ra,document:Ma,automatic:ft,survey:Oa,audio:mt,video:Qa,voice:mt,image:Wa,text:ft},Ja=t=>{const o=t.messageType;return o==="audio"||o==="voice"?mt:We(t).length>0?Ta:Ya[o]??ft},er={key:0,class:"wu-flex wu-shrink-0 wu-items-end","data-testid":"app-message-avatar"},tr={key:0,class:"wu-w-full wu-flex wu-justify-end wu-h-2","data-testid":"app-message-trailing"},De=e.defineComponent({__name:"app-message",props:{primary:Boolean,secondary:Boolean,tertiary:Boolean},setup(t){const o=t,n=e.computed(()=>e.useSlots());function a(c){return!!n.value[c]}const r=e.computed(()=>o.tertiary),s=e.computed(()=>!r.value&&o.secondary),i=e.computed(()=>!r.value&&a("avatar")),l=e.computed(()=>r.value?"wu-justify-center":s.value?"wu-flex-row-reverse":""),u=e.computed(()=>r.value?"wu-items-center wu-flex":s.value?"wu-rounded-br-none wu-bg-primary-100 wu-p-3 dark:wu-bg-primary-900":"wu-rounded-bl-none wu-bg-gray-200 wu-p-3 dark:wu-bg-neutral-700");return(c,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-flex wu-items-end wu-gap-2 wu-w-full",l.value]),"data-testid":"app-message"},[i.value?(e.openBlock(),e.createElementBlock("div",er,[e.renderSlot(c.$slots,"avatar")])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["wu-rounded-lg wu-relative wu-min-h-8 [overflow-wrap:anywhere]",u.value]),"data-testid":"app-message-bubble"},[e.renderSlot(c.$slots,"default"),a("trailing")?(e.openBlock(),e.createElementBlock("div",tr,[e.renderSlot(c.$slots,"trailing")])):e.createCommentVNode("",!0)],2)],2))}}),_t=e.defineComponent({__name:"app-skeleton",props:{round:Boolean,fluid:Boolean,block:Boolean},setup(t){const o=t,n=e.computed(()=>o.fluid?"!wu-w-full":""),a=e.computed(()=>o.round?"!wu-rounded-full":o.block?"!wu-rounded-none":"!wu-rounded-lg");return(r,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-animate-pulse wu-bg-gray-200 dark:wu-bg-neutral-700",[a.value,n.value]])},null,2))}}),Nt=e.defineComponent({__name:"app-empty",props:{error:{type:Boolean,default:!1}},emits:["refetch"],setup(t,{emit:o}){const n=o,a=e.computed(()=>e.useSlots());function r(s){return!!a.value[s]}return(s,i)=>(e.openBlock(),e.createBlock(L,{"gap-sm":"",center:"",col:""},{default:e.withCtx(()=>[t.error?(e.openBlock(),e.createBlock(T,{key:0,class:"wu-text-gray-500",large:""},{default:e.withCtx(()=>[...i[1]||(i[1]=[e.createTextVNode("error_outline",-1)])]),_:1})):r("icon")?e.renderSlot(s.$slots,"icon",{key:1}):(e.openBlock(),e.createBlock(T,{key:2,class:"wu-text-gray-500",large:""},{default:e.withCtx(()=>[...i[2]||(i[2]=[e.createTextVNode("list",-1)])]),_:1})),e.createVNode(E,{class:"wu-text-center",gray:""},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:3}),t.error?(e.openBlock(),e.createBlock(O,{key:3,onClick:i[0]||(i[0]=l=>n("refetch")),outline:"",small:"","data-testid":"refetch-button"},{icon:e.withCtx(()=>[...i[3]||(i[3]=[e.createTextVNode("refresh",-1)])]),default:e.withCtx(()=>[i[4]||(i[4]=e.createTextVNode("Tentar novamente",-1))]),_:1})):e.createCommentVNode("",!0)]),_:3}))}}),or={key:0,class:"wu-absolute wu-inset-0 wu-z-10 wu-flex wu-flex-col wu-items-center wu-justify-center wu-gap-2 wu-border-2 wu-border-dashed wu-border-primary wu-bg-white wu-bg-opacity-90 dark:wu-bg-neutral-900 dark:wu-bg-opacity-90","data-testid":"app-chat-drag-overlay"},nr={key:0,class:"wu-w-full wu-h-12"},ar=["onClick","disabled"],rr={key:2,class:"wu-w-full wu-shrink-0 wu-border-t wu-border-gray-200 wu-flex wu-flex-col dark:wu-border-neutral-700"},sr={class:"wu-relative wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-8 wu-rounded-full wu-bg-red-500 wu-bg-opacity-10"},ir={key:0,class:"wu-absolute wu-inset-0 wu-rounded-full wu-bg-red-500 wu-bg-opacity-20 wu-animate-ping"},lr=["src","alt"],ur=["onKeydown","disabled"],cr={class:"wu-flex wu-items-center wu-gap-2 wu-w-full wu-justify-end wu-px-6 wu-py-2"},dr=e.defineComponent({__name:"app-chat-service",props:{rule:{},edges:{}},emits:["send-message","retry-loading-chat-service","message-action"],setup(t,{emit:o}){const n=t,a=o,{history:r,chat:s,language:i}=de(),{isErrorLoading:l,isLoading:u,isSendingMessage:c,messages:f,text:d,attachments:p,audio:m}=s,{isRecording:w,formattedDuration:x,start:h,stop:y,cancel:g}=na(),v=e.computed(()=>r.value.length>0),B=e.ref(null),k=e.ref(!1),V=e.computed(()=>ua(f.value)),N=e.ref(null),b=e.computed(()=>!!(p.value.length||m.value)),A=e.computed(()=>!!(b.value||d.value.trim())),S=e.computed(()=>!!n.rule.settings?.features?.sendAttachment),R=e.computed(()=>c.value||!!m.value||k.value),C=e.computed(()=>c.value||b.value||k.value),D=e.computed(()=>S.value&&!R.value),z=e.ref(!1);let H=null;const F=e.computed(()=>(n.rule.settings?.features?.quickReplies??[]).map($=>$[i.value]??$["pt-BR"]??Object.values($)[0]??"").filter(Boolean)),j=e.computed(()=>F.value.length>0&&f.value.length===0),I=e.computed(()=>c.value||b.value||k.value),W=(_=!0)=>{const $=B.value;$&&$.scrollTo({top:$.scrollHeight,behavior:_?"smooth":"auto"})},Xe=()=>{R.value||N.value?.click()},Ye=_=>{_&&URL.revokeObjectURL(_)},Xo=()=>{p.value.forEach(_=>Ye(_.previewUrl)),p.value=[]},Je=()=>{Ye(m.value?.previewUrl),m.value=null},Yo=_=>_.type.startsWith("image/")?"image":"document",et=_=>{_.length&&(Je(),p.value=[...p.value,..._.map($=>{const P=Yo($);return{file:$,type:P,previewUrl:P==="image"?URL.createObjectURL($):void 0}})])},Jo=_=>{Xo(),Je(),d.value="",m.value={file:_,previewUrl:URL.createObjectURL(_)}},en=_=>{const $=_.target,P=Array.from($.files??[]);et(P),$.value=""},tn=_=>{if(!_)return[];const $=Array.from(_.items??[]).filter(P=>P.kind==="file").map(P=>P.getAsFile()).filter(P=>!!P);return $.length?$:Array.from(_.files??[])},tt=_=>{const $=_.dataTransfer?.types;return $?Array.from($).includes("Files"):!1},ot=()=>{H&&(clearTimeout(H),H=null)},Mt=()=>{ot(),H=setTimeout(()=>{z.value=!1},300)},on=_=>{if(!D.value)return;const $=tn(_.clipboardData);$.length&&(_.preventDefault(),et($))},nn=_=>{!D.value||!tt(_)||(_.preventDefault(),_.dataTransfer&&(_.dataTransfer.dropEffect="copy"),z.value=!0,Mt())},an=_=>{!D.value||!tt(_)||Mt()},rn=_=>{if(!D.value||!tt(_))return;_.preventDefault(),ot(),z.value=!1;const $=Array.from(_.dataTransfer?.files??[]);$.length&&et($)},sn=_=>{Ye(p.value[_]?.previewUrl),p.value=p.value.filter(($,P)=>P!==_)},ln=()=>{Je()},un=async()=>{C.value||!await h()||(d.value="",k.value=!0)},cn=async()=>{await g(),k.value=!1},dn=async()=>{const _=await y();k.value=!1,_&&Jo(_)},Dt=()=>a("send-message"),pn=_=>{I.value||!_.trim()||(d.value=_,a("send-message"))};e.watch(()=>V.value.length,async()=>{await e.nextTick(),W()}),e.onMounted(()=>{W(!1)}),e.onBeforeUnmount(()=>{ot()});const mn=(_,$,P)=>$[P-1]?J($[P-1])===J(_)?"wu-mt-1":"wu-mt-4":"wu-mt-0",fn=_=>ra(_.createdAt)||"12:58",wn=_=>a("message-action",_);return(_,$)=>(e.openBlock(),e.createElementBlock("div",{class:"wu-relative wu-flex wu-flex-col wu-items-center wu-h-full wu-w-full wu-overflow-hidden","data-testid":"app-chat-service",onDragover:nn,onDragleave:an,onDrop:rn},[z.value?(e.openBlock(),e.createElementBlock("div",or,[e.createVNode(T,{class:"wu-text-primary",large:""},{default:e.withCtx(()=>[...$[2]||($[2]=[e.createTextVNode("upload",-1)])]),_:1}),e.createVNode(E,{semibold:"",gray:""},{default:e.withCtx(()=>[...$[3]||($[3]=[e.createTextVNode("Solte os arquivos para anexar",-1)])]),_:1})])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"wu-flex wu-flex-col wu-flex-1 wu-min-h-0 wu-w-full wu-px-6 wu-overflow-y-auto",ref_key:"messagesList",ref:B,"data-testid":"app-service-messages"},[v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",nr)),e.unref(u)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},e.renderList(10,(P,U)=>e.createVNode(De,{key:U,primary:U%2===0,secondary:U%2===1},{default:e.withCtx(()=>[e.createVNode(_t,{class:"wu-h-4 wu-w-32",block:""})]),_:1},8,["primary","secondary"])),64)):e.unref(l)?(e.openBlock(),e.createBlock(Nt,{key:2,class:"wu-h-full",onRefetch:$[0]||($[0]=P=>a("retry-loading-chat-service")),error:""},{default:e.withCtx(()=>[...$[4]||($[4]=[e.createTextVNode("Ocorreu um erro ao carregar o atendimento.",-1)])]),_:1})):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(V.value,(P,U)=>(e.openBlock(),e.createBlock(De,{key:P.id??U,primary:!e.unref(ye)(P)&&e.unref(J)(P)==="operator",secondary:!e.unref(ye)(P)&&e.unref(J)(P)==="contact",tertiary:e.unref(ye)(P),class:e.normalizeClass([mn(P,V.value,U)])},e.createSlots({default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Ja)(P)),{message:P,onMessageAction:wn},null,40,["message"]))]),_:2},[e.unref(ye)(P)?void 0:{name:"trailing",fn:e.withCtx(()=>[e.createVNode(E,{gray:"","extra-small":"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(fn(P)),1)]),_:2},1024)]),key:"0"}]),1032,["primary","secondary","tertiary","class"]))),128)),$[5]||($[5]=e.createElementVNode("div",{class:"wu-w-full wu-min-h-4"},null,-1))],512),!e.unref(u)&&!e.unref(l)&&j.value?(e.openBlock(),e.createBlock(L,{key:1,class:"wu-items-end wu-w-full","data-testid":"app-chat-quick-replies","padding-md":"","gap-sm":"",col:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(P,U)=>(e.openBlock(),e.createElementBlock("button",{class:"wu-w-fit wu-max-w-full wu-px-3 wu-py-2 wu-text-left wu-rounded-2xl wu-rounded-br-none wu-border wu-border-gray-200 wu-bg-transparent wu-text-gray-700 wu-font-primary wu-text-xs wu-leading-snug wu-cursor-pointer wu-transition-colors hover:wu-bg-gray-100 disabled:wu-opacity-50 disabled:wu-pointer-events-none dark:wu-border-neutral-600 dark:wu-text-neutral-100 dark:hover:wu-bg-neutral-700 [overflow-wrap:anywhere]",key:U,type:"button","data-testid":"app-chat-quick-reply",onClick:hn=>pn(P),disabled:I.value},e.toDisplayString(P),9,ar))),128))]),_:1})):e.createCommentVNode("",!0),!e.unref(u)&&!e.unref(l)&&t.rule.settings?.features?.sendMessage?(e.openBlock(),e.createElementBlock("div",rr,[k.value?(e.openBlock(),e.createBlock(L,{key:0,"data-testid":"app-chat-audio-recording","padding-md":"","center-between":""},{default:e.withCtx(()=>[e.createVNode(O,{"data-testid":"app-chat-audio-cancel",onClick:cn,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(T,{gray:""},{default:e.withCtx(()=>[...$[6]||($[6]=[e.createTextVNode("close",-1)])]),_:1})]),_:1}),e.createVNode(L,{class:"wu-items-center","gap-sm":""},{default:e.withCtx(()=>[e.createElementVNode("div",sr,[e.unref(w)?(e.openBlock(),e.createElementBlock("div",ir)):e.createCommentVNode("",!0),e.createVNode(T,{class:"wu-text-red-500",large:""},{default:e.withCtx(()=>[...$[7]||($[7]=[e.createTextVNode("mic",-1)])]),_:1})]),e.createVNode(E,{semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(x)),1)]),_:1})]),_:1}),e.createVNode(O,{"data-testid":"app-chat-audio-stop",onClick:dn,disabled:!e.unref(w),small:"",icon:"",success:""},{icon:e.withCtx(()=>[e.createVNode(T,{light:""},{default:e.withCtx(()=>[...$[8]||($[8]=[e.createTextVNode("check",-1)])]),_:1})]),_:1},8,["disabled"])]),_:1})):e.unref(m)?(e.openBlock(),e.createBlock(L,{key:1,"data-testid":"app-chat-audio-preview","padding-md":""},{default:e.withCtx(()=>[e.createVNode(L,{class:"wu-w-full wu-items-center","padding-sm":"",rounded:"",border:"","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(Te,{class:"wu-flex-1",src:e.unref(m).previewUrl},null,8,["src"]),e.createVNode(O,{"data-testid":"app-chat-audio-discard",onClick:ln,disabled:e.unref(c),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(T,{gray:""},{default:e.withCtx(()=>[...$[9]||($[9]=[e.createTextVNode("close",-1)])]),_:1})]),_:1},8,["disabled"])]),_:1})]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.unref(p).length?(e.openBlock(),e.createBlock(L,{key:0,class:"wu-px-6 wu-pt-6 wu-overflow-x-auto invisible-scrollbar","data-testid":"app-chat-attachment-preview"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p),(P,U)=>(e.openBlock(),e.createBlock(L,{class:"wu-items-center",key:U,"padding-sm":"",rounded:"",border:"","gap-sm":""},{default:e.withCtx(()=>[P.type==="image"&&P.previewUrl?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-10 wu-h-10 wu-rounded wu-object-cover",src:P.previewUrl,alt:P.file.name},null,8,lr)):(e.openBlock(),e.createBlock(L,{key:1,class:"wu-w-7 wu-h-7 wu-bg-gray-200",center:"","padding-base":"",rounded:""},{default:e.withCtx(()=>[e.createVNode(T,{large:"",gray:""},{default:e.withCtx(()=>[...$[10]||($[10]=[e.createTextVNode("file_present",-1)])]),_:1})]),_:1})),e.createVNode(L,{class:"wu-flex-1 wu-items-start wu-truncate",col:"","gap-none":""},{default:e.withCtx(()=>[e.createVNode(E,{class:"wu-truncate",semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(P.file.name),1)]),_:2},1024),e.createVNode(E,{"extra-small":"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(P.file.type),1)]),_:2},1024)]),_:2},1024),e.createVNode(O,{"data-testid":"app-chat-attachment-discard",onClick:hn=>sn(U),disabled:e.unref(c),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(T,{gray:""},{default:e.withCtx(()=>[...$[11]||($[11]=[e.createTextVNode("close",-1)])]),_:1})]),_:1},8,["onClick","disabled"])]),_:2},1024))),128))]),_:1})):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("textarea",{class:"wu-w-full wu-p-6 wu-resize-none wu-font-primary wu-text-xs wu-bg-transparent wu-text-gray-900 placeholder:wu-text-neutral placeholder:wu-text-xs placeholder:wu-font-normal focus:wu-outline-none dark:wu-text-neutral-100 [&:disabled]:wu-opacity-50","onUpdate:modelValue":$[1]||($[1]=P=>e.isRef(d)?d.value=P:null),onKeydown:e.withKeys(e.withModifiers(Dt,["exact","prevent"]),["enter"]),onPaste:on,placeholder:"Escreva uma mensagem...",disabled:e.unref(c)},null,40,ur),[[e.vModelText,e.unref(d)]])],64)),e.withDirectives(e.createElementVNode("input",{ref_key:"fileInput",ref:N,type:"file",multiple:"","data-testid":"app-chat-file-input",onChange:en},null,544),[[e.vShow,!1]]),e.createElementVNode("div",cr,[S.value?(e.openBlock(),e.createBlock(O,{key:0,"data-testid":"app-chat-attach-file",onClick:Xe,disabled:R.value,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(T,{class:"wu-rotate-45",large:"",gray:""},{default:e.withCtx(()=>[...$[12]||($[12]=[e.createTextVNode("attach_file",-1)])]),_:1})]),_:1},8,["disabled"])):e.createCommentVNode("",!0),S.value?(e.openBlock(),e.createBlock(O,{key:1,"data-testid":"app-chat-record-audio",onClick:un,disabled:C.value,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(T,{large:"",gray:""},{default:e.withCtx(()=>[...$[13]||($[13]=[e.createTextVNode("mic",-1)])]),_:1})]),_:1},8,["disabled"])):e.createCommentVNode("",!0),e.createVNode(O,{onClick:Dt,loading:e.unref(c),disabled:!A.value||k.value,small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(T,{class:"-wu-rotate-45 wu-translate-x-[0.10rem] -wu-translate-y-[0.12rem]",outlined:"",large:""},{default:e.withCtx(()=>[...$[14]||($[14]=[e.createTextVNode("send",-1)])]),_:1})]),_:1},8,["loading","disabled"])])])):e.createCommentVNode("",!0)],32))}}),pr={class:"wu-flex wu-flex-col wu-items-center wu-justify-center wu-h-full wu-w-full wu-px-6","data-testid":"app-voice-service"},mr={class:"wu-flex wu-items-center wu-justify-center wu-rounded-full wu-bg-gray-100 wu-w-20 wu-h-20 dark:wu-bg-neutral-700"},fr=e.defineComponent({__name:"app-voice-service",props:{rule:{},edges:{}},setup(t){const o=t,n=e.computed(()=>o.rule.name||"Ligação");return(a,r)=>(e.openBlock(),e.createElementBlock("div",pr,[e.createVNode(L,{class:"wu-w-full",col:"",center:"","gap-lg":""},{default:e.withCtx(()=>[e.createVNode(L,{col:"",center:"","gap-base":""},{default:e.withCtx(()=>[e.createElementVNode("div",mr,[e.createVNode(T,{"extra-large":"",gray:""},{default:e.withCtx(()=>[...r[0]||(r[0]=[e.createTextVNode("phone_in_talk",-1)])]),_:1})]),e.createVNode(E,{class:"wu-text-center","extra-large":"",semibold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.value),1)]),_:1}),e.createVNode(E,{class:"wu-text-center",small:"",gray:""},{default:e.withCtx(()=>[...r[1]||(r[1]=[e.createTextVNode("Aguardando conexão",-1)])]),_:1})]),_:1}),e.createVNode(L,{center:"","gap-md":""},{default:e.withCtx(()=>[e.createVNode(O,{ghost:"",icon:"",round:"",disabled:""},{icon:e.withCtx(()=>[e.createVNode(T,{large:"",gray:""},{default:e.withCtx(()=>[...r[2]||(r[2]=[e.createTextVNode("mic",-1)])]),_:1})]),_:1}),e.createVNode(O,{alert:"",icon:"",round:"",disabled:""},{icon:e.withCtx(()=>[e.createVNode(T,{large:""},{default:e.withCtx(()=>[...r[3]||(r[3]=[e.createTextVNode("call_end",-1)])]),_:1})]),_:1}),e.createVNode(O,{ghost:"",icon:"",round:"",disabled:""},{icon:e.withCtx(()=>[e.createVNode(T,{large:"",gray:""},{default:e.withCtx(()=>[...r[4]||(r[4]=[e.createTextVNode("volume_up",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]))}}),St=e.defineComponent({__name:"app-service-page",props:{rule:{},edges:{}},emits:["send-message","retry-loading-chat-service","message-action"],setup(t,{emit:o}){const n=t,a=o,r=e.computed(()=>n.rule.settings?.behavior==="voice"?fr:dr);return(s,i)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value),{rule:t.rule,edges:t.edges,onSendMessage:i[0]||(i[0]=l=>a("send-message")),onRetryLoadingChatService:i[1]||(i[1]=l=>a("retry-loading-chat-service")),onMessageAction:i[2]||(i[2]=l=>a("message-action",l))},null,40,["rule","edges"]))}}),wr=t=>{const o=n=>n.toString(16).padStart(2,"0");return`#${o(t.r)}${o(t.g)}${o(t.b)}`},bo=()=>{const t="#6D3595",o=r=>{const s=r.replace("#","").trim(),i=s.length===3&&/^[0-9a-fA-F]{3}$/.test(s)?`${s[0]}${s[0]}${s[1]}${s[1]}${s[2]}${s[2]}`:s;return i.length!==6||!/^[0-9a-fA-F]{6}$/.test(i)?null:{r:parseInt(i.slice(0,2),16),g:parseInt(i.slice(2,4),16),b:parseInt(i.slice(4,6),16)}};return{isLightHex:r=>{const s=o(r);return s?(s.r*299+s.g*587+s.b*114)/1e3>160:!1},normalizeHex:r=>{const s=o(r)??o(t);return s?wr(s):t.toLowerCase()},parseHex:o}},hr=()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches,ko=t=>{const{isLightHex:o,normalizeHex:n,parseHex:a}=bo(),r=(d,p)=>d==="dark"?"dark":d==="light"?"light":p?"dark":"light",s=d=>{const p=n(d),m=a(p)??{r:109,g:53,b:149},w=o(p);return{"--wu-primary":p,"--wu-primary-rgb":`${m.r} ${m.g} ${m.b}`,"--wu-primary-fg":w?"#1c1917":"#ffffff","--wu-primary-border":w?"#e5e7eb":"color-mix(in srgb, var(--wu-primary-fg) 22%, transparent)","--wu-primary-50":`color-mix(in srgb, ${p} 8%, white)`,"--wu-primary-100":`color-mix(in srgb, ${p} 22%, white)`,"--wu-primary-200":`color-mix(in srgb, ${p} 38%, white)`,"--wu-primary-300":`color-mix(in srgb, ${p} 55%, white)`,"--wu-primary-400":w?`color-mix(in srgb, ${p} 70%, black)`:`color-mix(in srgb, ${p} 78%, white)`,"--wu-primary-500":p,"--wu-primary-600":`color-mix(in srgb, ${p} 82%, black)`,"--wu-primary-700":`color-mix(in srgb, ${p} 64%, black)`,"--wu-primary-800":`color-mix(in srgb, ${p} 42%, black)`,"--wu-primary-900":`color-mix(in srgb, ${p} 22%, black)`}},i=d=>{const p=e.ref(hr()),m=e.computed(()=>r(e.toValue(d),p.value)),w=e.computed(()=>m.value==="dark"),x=e.computed(()=>w.value?"wu-dark":"");return e.onMounted(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const h=window.matchMedia("(prefers-color-scheme: dark)");p.value=h.matches;const y=g=>{p.value=g.matches};h.addEventListener("change",y),e.onBeforeUnmount(()=>h.removeEventListener("change",y))}),{isDark:w,resolvedTheme:m,themeClass:x}},{isDark:l,themeClass:u,resolvedTheme:c}=i(()=>e.toValue(t).theme),f=e.computed(()=>({...s(e.toValue(t).primaryColor),colorScheme:c.value}));return{isDark:l,themeClass:u,resolvedTheme:c,appearanceStyle:f}},gr={class:"wu-flex wu-flex-col wu-w-full wu-gap-8"},vr={key:0,class:"wu-flex wu-items-center wu-w-fit wu-justify-center wu-h-0"},yr=["src"],xr={key:1,class:"wu-flex wu-flex-col wu-items-center wu-justify-start wu-gap-2 wu-px-6 wu-w-full"},Vt=e.defineComponent({__name:"app-screen-page",props:{rule:{},edges:{}},emits:["edge-click"],setup(t,{emit:o}){const n=t,a=o,{history:r}=de(),s=e.computed(()=>r.value.length>0),i=e.computed(()=>n.edges??[]),l=e.computed(()=>n.rule.settings?.body),u=e.computed(()=>i.value.slice(0,3)),c=e.computed(()=>i.value.slice(3));return(f,d)=>(e.openBlock(),e.createElementBlock("div",gr,[s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",vr)),e.createVNode(L,{class:"wu-px-6 wu-w-full",col:"",center:"","gap-base":""},{default:e.withCtx(()=>[l.value?.logo?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-10 wu-h-10 wu-object-contain",src:l.value.logo,alt:""},null,8,yr)):e.createCommentVNode("",!0),l.value?.eyebrow?(e.openBlock(),e.createBlock(E,{key:1,class:"wu-text-center wu-uppercase wu-tracking-widest wu-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(E,{key:2,class:"wu-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(E,{key:3,class:"wu-w-64 wu-text-center",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value.subtitle),1)]),_:1})):e.createCommentVNode("",!0),e.unref(r).length>0?(e.openBlock(),e.createBlock(L,{key:4,class:"wu-rounded-full wu-px-2 wu-h-6 wu-bg-primary-500 !wu-text-[var(--wu-primary-fg)]","padding-sm":"","gap-sm":"",center:""},{default:e.withCtx(()=>[e.createVNode(T,{small:""},{default:e.withCtx(()=>[...d[2]||(d[2]=[e.createTextVNode("check",-1)])]),_:1}),e.createVNode(E,{semibold:"","extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.rule?.name),1)]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1}),i.value.length?(e.openBlock(),e.createElementBlock("div",xr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,p=>(e.openBlock(),e.createBlock(we,{key:p.id,edge:p,onClick:d[0]||(d[0]=m=>a("edge-click",m))},null,8,["edge"]))),128)),c.value.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["wu-flex wu-items-start wu-overflow-x-auto wu-w-full invisible-scrollbar wu-pt-6",{"wu-justify-start":c.value.length>4,"wu-justify-center":c.value.length<=4}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,p=>(e.openBlock(),e.createBlock(we,{key:p.id,edge:p,icon:"",onClick:d[1]||(d[1]=m=>a("edge-click",m))},null,8,["edge"]))),128))],2)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))}}),br="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=",kr={class:"wu-flex wu-flex-col wu-h-full wu-w-full wu-bg-white wu-overflow-hidden dark:wu-bg-neutral-800"},Cr={class:"wu-w-full wu-shrink-0 wu-border-b wu-flex wu-items-center wu-px-4 wu-justify-between wu-gap-2 wu-bg-primary wu-h-[4.4rem] wu-text-[var(--wu-primary-fg)] wu-border-[var(--wu-primary-border)]"},Br={class:"wu-flex wu-items-center wu-gap-3 wu-min-w-0 wu-flex-1"},$r=["src"],_r={class:"wu-flex wu-flex-col wu-justify-center wu-min-w-0 wu-overflow-hidden"},Nr={class:"wu-flex wu-flex-col wu-w-full wu-flex-1 wu-min-h-0"},Sr={key:0,class:"wu-flex wu-shrink-0 wu-items-center wu-w-fit wu-justify-center wu-px-6 wu-py-4"},Vr={class:"wu-flex wu-flex-col wu-w-full wu-flex-1 wu-min-h-0 wu-overflow-y-auto wu-gap-8"},Ar={class:"wu-h-7 wu-w-full wu-shrink-0 wu-border-t wu-border-gray-200 wu-flex wu-items-center wu-justify-center wu-p-2 wu-gap-1 wu-bg-white dark:wu-border-neutral-700 dark:wu-bg-neutral-800"},Tr=["src"],Er=e.defineComponent({inheritAttrs:!1,__name:"app-widget-view",props:{workflow:{},config:{},fullscreen:{type:Boolean}},emits:["retry-loading-chat-service","edge-click","send-message","message-action","submit","close","back"],setup(t,{emit:o}){const n=t,a=o,{history:r,currentRule:s,currentHeader:i,edges:l,setWorkflow:u,setConfig:c}=de(),{appearanceStyle:f,themeClass:d}=ko(()=>n.config.configurations.appearance);u(n.workflow),c(n.config),e.watch(()=>n.workflow,g=>u(g)),e.watch(()=>n.config,g=>c(g));const p=e.computed(()=>r.value.length>0),m=e.computed(()=>p.value&&s.value?.action!=="widget-identification-screen"),w=e.computed(()=>n.config.configurations.general.isClosable),x={"widget-identification-screen":Ct,"widget-article-screen":$t,"widget-service-screen":St,"widget-base-screen":Vt},h=e.computed(()=>{const g=s.value?.action;return g&&g in x?x[g]:void 0}),y=e.computed(()=>n.fullscreen?"wu-w-screen wu-h-screen":"wu-w-[24.4rem] wu-h-[38rem] widget-shadow wu-rounded-2xl");return(g,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yunique wu-overflow-hidden wu-relative",[y.value,e.unref(d)]]),"data-testid":"app-widget-view",style:e.normalizeStyle(e.unref(f))},[e.createElementVNode("div",kr,[e.createElementVNode("div",Cr,[e.createElementVNode("div",Br,[e.unref(i)?.logo?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-9 wu-h-9 wu-object-contain wu-rounded-lg wu-shrink-0",src:e.unref(i).logo,alt:""},null,8,$r)):e.createCommentVNode("",!0),e.createElementVNode("div",_r,[e.unref(i)?.title?(e.openBlock(),e.createBlock(E,{key:0,class:"wu-w-full wu-truncate !wu-text-inherit",bold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).title),1)]),_:1})):e.createCommentVNode("",!0),e.unref(i)?.subtitle?(e.openBlock(),e.createBlock(E,{key:1,class:"wu-w-full wu-truncate !wu-text-inherit wu-opacity-75","extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).subtitle),1)]),_:1})):e.createCommentVNode("",!0)])]),w.value?(e.openBlock(),e.createBlock(O,{key:0,class:"wu-shrink-0 !wu-bg-transparent hover:!wu-bg-[color-mix(in_srgb,var(--wu-primary-fg)_12%,transparent)]",onClick:v[0]||(v[0]=B=>a("close")),"data-testid":"app-widget-close",small:"",icon:""},{default:e.withCtx(()=>[e.createVNode(T,null,{default:e.withCtx(()=>[...v[8]||(v[8]=[e.createTextVNode("close",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",Nr,[e.createVNode(e.Transition,{name:"page-transition",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("div",{class:"wu-flex wu-flex-col wu-w-full wu-h-full wu-min-h-0",key:e.unref(s)?.id},[m.value?(e.openBlock(),e.createElementBlock("div",Sr,[e.createElementVNode("div",{class:"wu-flex wu-items-center wu-w-fit wu-justify-center wu-cursor-pointer wu-group",onClick:v[1]||(v[1]=B=>a("back"))},[e.createVNode(T,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200",small:"",gray:""},{default:e.withCtx(()=>[...v[9]||(v[9]=[e.createTextVNode("chevron_left",-1)])]),_:1}),e.createVNode(E,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200","extra-small":"",medium:"",gray:""},{default:e.withCtx(()=>[...v[10]||(v[10]=[e.createTextVNode("Voltar",-1)])]),_:1})])])):e.createCommentVNode("",!0),e.createElementVNode("div",Vr,[h.value&&e.unref(s)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h.value),{key:0,rule:e.unref(s),edges:e.unref(l),onSubmit:v[2]||(v[2]=B=>a("submit",B)),onBack:v[3]||(v[3]=B=>a("back")),onEdgeClick:v[4]||(v[4]=B=>a("edge-click",B)),onSendMessage:v[5]||(v[5]=B=>a("send-message")),onRetryLoadingChatService:v[6]||(v[6]=B=>a("retry-loading-chat-service")),onMessageAction:v[7]||(v[7]=B=>a("message-action",B))},null,40,["rule","edges"])):e.createCommentVNode("",!0)])]))]),_:1})]),e.createElementVNode("div",Ar,[e.createElementVNode("img",{class:"wu-w-3 wu-h-2",src:e.unref(br),alt:"Opens"},null,8,Tr),e.createVNode(E,{class:"!wu-text-xxs",gray:""},{default:e.withCtx(()=>[...v[11]||(v[11]=[e.createTextVNode("Powered By",-1),e.createElementVNode("b",{class:"wu-ml-1"},"Opens",-1)])]),_:1})])])],6))}}),At=Ae(Er,[["__scopeId","data-v-fea132f9"]]),Pr={class:"wu-flex wu-h-full wu-pl-3 wu-gap-2 wu-z-10 wu-pointer-events-none"},Rr={class:"wu-h-full wu-flex wu-items-center wu-justify-center"},Lr=["value","type","disabled","maxlength"],Mr={class:"wu-absolute wu-right-2 wu-z-10 wu-flex wu-items-center wu-gap-1 wu-text-gray-500"},Co=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 a=t,r=n,s=e.computed(()=>e.useSlots());function i(V){return!!s.value[V]}const l=e.ref(""),u=e.ref(!1),c=e.ref(!1);function f(V){if(!a.maskFunction)return V;try{const N=a.maskFunction(V);return typeof N=="string"?N:V}catch{return V}}e.watch(()=>a.modelValue,V=>{if(V==null){l.value="";return}l.value=a.maskFunction?f(V):V},{immediate:!0});function d(){return!(u.value||l.value)}const{height:p,textSize:m,width:w}=vo(a),x=e.computed(()=>a.invalid?"wu-border-red-500 focus-within:wu-border-red-500":a.valid?"wu-border-green-500 focus-within:wu-border-green-500":"wu-border-gray-200 focus-within:!wu-border-primary/40 hover:wu-border-gray-300"),h=e.computed(()=>a.invalid?"wu-text-red-500":a.valid?"wu-text-green-500":"wu-text-gray-500"),y=e.computed(()=>a.small&&d()?"wu-translate-y-[7px]":a.small&&!d()?"wu-translate-y-0":d()?"wu-translate-y-[11px]":"wu-translate-y-0"),g=e.computed(()=>i("icon")||a.loading?"wu-pl-[34px]":"wu-pl-3"),v=e.computed(()=>a.block?"wu-rounded-none":a.round?"wu-rounded-full":"wu-rounded-lg"),B=e.computed(()=>a.disabled||a.loading?"wu-opacity-50 wu-pointer-events-none":"");function k(V){const b=V.target.value;l.value=a.maskFunction?f(b):b,r("update:modelValue",l.value)}return o({focus:u,content:l}),(V,N)=>(e.openBlock(),e.createBlock(L,{class:e.normalizeClass([e.unref(w)]),col:"","gap-none":""},{default:e.withCtx(()=>[e.createVNode(L,{col:"","gap-sm":""},{default:e.withCtx(()=>[i("label")?(e.openBlock(),e.createBlock(E,{key:0,small:"",medium:""},{default:e.withCtx(()=>[e.renderSlot(V.$slots,"label")]),_:3})):e.createCommentVNode("",!0),e.createElementVNode("label",{class:e.normalizeClass(["wu-relative wu-flex wu-flex-col wu-justify-center wu-items-start wu-border wu-cursor-text wu-transition-colors wu-w-full wu-bg-transparent",[v.value,B.value,e.unref(p),x.value]]),"data-testid":"app-text-input"},[e.createElementVNode("div",Pr,[e.createElementVNode("div",Rr,[!t.loading&&i("icon")?(e.openBlock(),e.createBlock(T,{key:0,small:""},{default:e.withCtx(()=>[e.renderSlot(V.$slots,"icon")]),_:3})):e.createCommentVNode("",!0),t.loading?(e.openBlock(),e.createBlock(T,{key:1,class:"wu-animate-spin",small:"",outlined:""},{default:e.withCtx(()=>[...N[4]||(N[4]=[e.createTextVNode("progress_activity",-1)])]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(E,{class:e.normalizeClass(["wu-py-1 wu-transition",[y.value]]),small:"",medium:"",gray:""},{default:e.withCtx(()=>[e.renderSlot(V.$slots,"default")]),_:3},8,["class"])]),e.createElementVNode("input",{class:e.normalizeClass(["wu-absolute wu-inset-0 wu-w-full wu-h-full wu-outline-none wu-appearance-none wu-bg-transparent wu-pt-3 wu-pr-3 wu-text-gray-700 wu-font-primary wu-z-0",[e.unref(m),g.value,v.value]]),value:l.value,type:t.passwordToggle&&c.value?"text":t.type,disabled:t.disabled||t.loading,maxlength:t.maxLength,onInput:k,onFocus:N[0]||(N[0]=b=>u.value=!0),onBlur:N[1]||(N[1]=b=>u.value=!1),onKeyup:N[2]||(N[2]=e.withKeys(b=>r("keyup-enter"),["enter"]))},null,42,Lr),e.createElementVNode("div",Mr,[t.maxLength?(e.openBlock(),e.createBlock(E,{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:"wu-bg-transparent wu-border-0 wu-p-0 wu-cursor-pointer wu-flex wu-items-center",type:"button",tabindex:"-1",onClick:N[3]||(N[3]=b=>c.value=!c.value)},[e.createVNode(T,{small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value?"visibility_off":"visibility"),1)]),_:1})])):e.createCommentVNode("",!0),e.renderSlot(V.$slots,"suffix")])],2)]),_:3}),i("feedback")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["wu-mt-1",[h.value]])},[e.renderSlot(V.$slots,"feedback")],2)):e.createCommentVNode("",!0)]),_:3},8,["class"]))}}),Dr=()=>{const{isLightHex:t,normalizeHex:o}=bo();return{getOffset:(s,i)=>{const l=`${i.x}px`,u=`${i.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 i=o(s);return{backgroundImage:"none",backgroundColor:i,color:t(i)?"#1c1917":"#ffffff"}}}},zr=e.defineComponent({__name:"app-widget",props:{workflow:{},config:{},fullscreen:{type:Boolean}},emits:["message-action","retry-loading-chat-service","edge-click","send-message","submit","close","back","open"],setup(t,{emit:o}){const n=t,a=o,r=e.ref(n.config.configurations.general.defaultBehavior==="active"),s=e.ref(!r.value),{setWorkflow:i,setConfig:l}=de(),{getOffset:u,getPosition:c,getTone:f}=Dr(),{appearanceStyle:d,themeClass:p}=ko(()=>n.config.configurations.appearance),m=e.computed(()=>n.config.configurations.anchor),w=e.computed(()=>n.config.configurations.appearance),x=e.computed(()=>{if(!(r.value&&n.fullscreen))return u(m.value.position,m.value.offset)}),h=e.computed(()=>c(m.value.position)),y=e.computed(()=>({workflow:n.workflow,config:n.config,fullscreen:n.fullscreen})),g=e.computed(()=>({style:f(w.value.primaryColor),small:m.value.size==="small",large:m.value.size==="large",logo:m.value.logo??"",label:m.value.label??""})),v=async()=>{r.value||(s.value=!1,await e.nextTick(),r.value=!0,a("open"))},B=()=>{r.value&&(r.value=!1,a("close"))},k=()=>{s.value=!0};return i(n.workflow),l(n.config),e.watch(()=>n.workflow,V=>i(V)),e.watch(()=>n.config,V=>l(V)),e.watch(()=>n.config.configurations.general.defaultBehavior,V=>{V==="active"?v():B()}),(V,N)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-fixed yunique wu-z-[99999]",[e.unref(p),r.value&&t.fullscreen?"wu-inset-0":""]]),"data-testid":"app-widget",style:e.normalizeStyle([{"--widget-origin":h.value},x.value,e.unref(d)])},[e.createVNode(e.Transition,{name:"widget",onAfterLeave:k},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createBlock(At,e.mergeProps({key:0},y.value,{onClose:B,onBack:N[0]||(N[0]=b=>a("back")),onSubmit:N[1]||(N[1]=b=>a("submit",b)),onEdgeClick:N[2]||(N[2]=b=>a("edge-click",b)),onSendMessage:N[3]||(N[3]=b=>a("send-message")),onRetryLoadingChatService:N[4]||(N[4]=b=>a("retry-loading-chat-service")),onMessageAction:N[5]||(N[5]=b=>a("message-action",b))}),null,16)):e.createCommentVNode("",!0)]),_:1}),s.value?(e.openBlock(),e.createBlock(Bt,{key:0,style:e.normalizeStyle(g.value.style),small:g.value.small,large:g.value.large,logo:g.value.logo,label:g.value.label,onClick:v},null,8,["style","small","large","logo","label"])):e.createCommentVNode("",!0)],6))}}),Bo=Ae(zr,[["__scopeId","data-v-eac31e46"]]),Or=["top","right","bottom","left"],Ft=["start","end"],jt=Or.reduce((t,o)=>t.concat(o,o+"-"+Ft[0],o+"-"+Ft[1]),[]),Be=Math.min,ce=Math.max,Ir={left:"right",right:"left",bottom:"top",top:"bottom"},Hr={start:"end",end:"start"};function wt(t,o,n){return ce(t,Be(o,n))}function pe(t,o){return typeof t=="function"?t(o):t}function Y(t){return t.split("-")[0]}function Z(t){return t.split("-")[1]}function $o(t){return t==="x"?"y":"x"}function Tt(t){return t==="y"?"height":"width"}const Fr=new Set(["top","bottom"]);function ee(t){return Fr.has(Y(t))?"y":"x"}function Et(t){return $o(ee(t))}function _o(t,o,n){n===void 0&&(n=!1);const a=Z(t),r=Et(t),s=Tt(r);let i=r==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return o.reference[s]>o.floating[s]&&(i=Oe(i)),[i,Oe(i)]}function jr(t){const o=Oe(t);return[ze(t),o,ze(o)]}function ze(t){return t.replace(/start|end/g,o=>Hr[o])}const Wt=["left","right"],qt=["right","left"],Wr=["top","bottom"],qr=["bottom","top"];function Ur(t,o,n){switch(t){case"top":case"bottom":return n?o?qt:Wt:o?Wt:qt;case"left":case"right":return o?Wr:qr;default:return[]}}function Gr(t,o,n,a){const r=Z(t);let s=Ur(Y(t),n==="start",a);return r&&(s=s.map(i=>i+"-"+r),o&&(s=s.concat(s.map(ze)))),s}function Oe(t){return t.replace(/left|right|bottom|top/g,o=>Ir[o])}function Zr(t){return{top:0,right:0,bottom:0,left:0,...t}}function No(t){return typeof t!="number"?Zr(t):{top:t,right:t,bottom:t,left:t}}function xe(t){const{x:o,y:n,width:a,height:r}=t;return{width:a,height:r,top:n,left:o,right:o+a,bottom:n+r,x:o,y:n}}function Ut(t,o,n){let{reference:a,floating:r}=t;const s=ee(o),i=Et(o),l=Tt(i),u=Y(o),c=s==="y",f=a.x+a.width/2-r.width/2,d=a.y+a.height/2-r.height/2,p=a[l]/2-r[l]/2;let m;switch(u){case"top":m={x:f,y:a.y-r.height};break;case"bottom":m={x:f,y:a.y+a.height};break;case"right":m={x:a.x+a.width,y:d};break;case"left":m={x:a.x-r.width,y:d};break;default:m={x:a.x,y:a.y}}switch(Z(o)){case"start":m[i]-=p*(n&&c?-1:1);break;case"end":m[i]+=p*(n&&c?-1:1);break}return m}const Qr=async(t,o,n)=>{const{placement:a="bottom",strategy:r="absolute",middleware:s=[],platform:i}=n,l=s.filter(Boolean),u=await(i.isRTL==null?void 0:i.isRTL(o));let c=await i.getElementRects({reference:t,floating:o,strategy:r}),{x:f,y:d}=Ut(c,a,u),p=a,m={},w=0;for(let x=0;x<l.length;x++){const{name:h,fn:y}=l[x],{x:g,y:v,data:B,reset:k}=await y({x:f,y:d,initialPlacement:a,placement:p,strategy:r,middlewareData:m,rects:c,platform:i,elements:{reference:t,floating:o}});f=g??f,d=v??d,m={...m,[h]:{...m[h],...B}},k&&w<=50&&(w++,typeof k=="object"&&(k.placement&&(p=k.placement),k.rects&&(c=k.rects===!0?await i.getElementRects({reference:t,floating:o,strategy:r}):k.rects),{x:f,y:d}=Ut(c,p,u)),x=-1)}return{x:f,y:d,placement:p,strategy:r,middlewareData:m}};async function Ue(t,o){var n;o===void 0&&(o={});const{x:a,y:r,platform:s,rects:i,elements:l,strategy:u}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:m=0}=pe(o,t),w=No(m),h=l[p?d==="floating"?"reference":"floating":d],y=xe(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(h)))==null||n?h:h.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:f,strategy:u})),g=d==="floating"?{x:a,y:r,width:i.floating.width,height:i.floating.height}:i.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),B=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},k=xe(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:v,strategy:u}):g);return{top:(y.top-k.top+w.top)/B.y,bottom:(k.bottom-y.bottom+w.bottom)/B.y,left:(y.left-k.left+w.left)/B.x,right:(k.right-y.right+w.right)/B.x}}const Kr=t=>({name:"arrow",options:t,async fn(o){const{x:n,y:a,placement:r,rects:s,platform:i,elements:l,middlewareData:u}=o,{element:c,padding:f=0}=pe(t,o)||{};if(c==null)return{};const d=No(f),p={x:n,y:a},m=Et(r),w=Tt(m),x=await i.getDimensions(c),h=m==="y",y=h?"top":"left",g=h?"bottom":"right",v=h?"clientHeight":"clientWidth",B=s.reference[w]+s.reference[m]-p[m]-s.floating[w],k=p[m]-s.reference[m],V=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let N=V?V[v]:0;(!N||!await(i.isElement==null?void 0:i.isElement(V)))&&(N=l.floating[v]||s.floating[w]);const b=B/2-k/2,A=N/2-x[w]/2-1,S=Be(d[y],A),R=Be(d[g],A),C=S,D=N-x[w]-R,z=N/2-x[w]/2+b,H=wt(C,z,D),F=!u.arrow&&Z(r)!=null&&z!==H&&s.reference[w]/2-(z<C?S:R)-x[w]/2<0,j=F?z<C?z-C:z-D:0;return{[m]:p[m]+j,data:{[m]:H,centerOffset:z-H-j,...F&&{alignmentOffset:j}},reset:F}}});function Xr(t,o,n){return(t?[...n.filter(r=>Z(r)===t),...n.filter(r=>Z(r)!==t)]:n.filter(r=>Y(r)===r)).filter(r=>t?Z(r)===t||(o?ze(r)!==r:!1):!0)}const Yr=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(o){var n,a,r;const{rects:s,middlewareData:i,placement:l,platform:u,elements:c}=o,{crossAxis:f=!1,alignment:d,allowedPlacements:p=jt,autoAlignment:m=!0,...w}=pe(t,o),x=d!==void 0||p===jt?Xr(d||null,m,p):p,h=await Ue(o,w),y=((n=i.autoPlacement)==null?void 0:n.index)||0,g=x[y];if(g==null)return{};const v=_o(g,s,await(u.isRTL==null?void 0:u.isRTL(c.floating)));if(l!==g)return{reset:{placement:x[0]}};const B=[h[Y(g)],h[v[0]],h[v[1]]],k=[...((a=i.autoPlacement)==null?void 0:a.overflows)||[],{placement:g,overflows:B}],V=x[y+1];if(V)return{data:{index:y+1,overflows:k},reset:{placement:V}};const N=k.map(S=>{const R=Z(S.placement);return[S.placement,R&&f?S.overflows.slice(0,2).reduce((C,D)=>C+D,0):S.overflows[0],S.overflows]}).sort((S,R)=>S[1]-R[1]),A=((r=N.filter(S=>S[2].slice(0,Z(S[0])?2:3).every(R=>R<=0))[0])==null?void 0:r[0])||N[0][0];return A!==l?{data:{index:y+1,overflows:k},reset:{placement:A}}:{}}}},Jr=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(o){var n,a;const{placement:r,middlewareData:s,rects:i,initialPlacement:l,platform:u,elements:c}=o,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:x=!0,...h}=pe(t,o);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Y(r),g=ee(l),v=Y(l)===l,B=await(u.isRTL==null?void 0:u.isRTL(c.floating)),k=p||(v||!x?[Oe(l)]:jr(l)),V=w!=="none";!p&&V&&k.push(...Gr(l,x,w,B));const N=[l,...k],b=await Ue(o,h),A=[];let S=((a=s.flip)==null?void 0:a.overflows)||[];if(f&&A.push(b[y]),d){const z=_o(r,i,B);A.push(b[z[0]],b[z[1]])}if(S=[...S,{placement:r,overflows:A}],!A.every(z=>z<=0)){var R,C;const z=(((R=s.flip)==null?void 0:R.index)||0)+1,H=N[z];if(H&&(!(d==="alignment"?g!==ee(H):!1)||S.every(I=>ee(I.placement)===g?I.overflows[0]>0:!0)))return{data:{index:z,overflows:S},reset:{placement:H}};let F=(C=S.filter(j=>j.overflows[0]<=0).sort((j,I)=>j.overflows[1]-I.overflows[1])[0])==null?void 0:C.placement;if(!F)switch(m){case"bestFit":{var D;const j=(D=S.filter(I=>{if(V){const W=ee(I.placement);return W===g||W==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(W=>W>0).reduce((W,Xe)=>W+Xe,0)]).sort((I,W)=>I[1]-W[1])[0])==null?void 0:D[0];j&&(F=j);break}case"initialPlacement":F=l;break}if(r!==F)return{reset:{placement:F}}}return{}}}},es=new Set(["left","top"]);async function ts(t,o){const{placement:n,platform:a,elements:r}=t,s=await(a.isRTL==null?void 0:a.isRTL(r.floating)),i=Y(n),l=Z(n),u=ee(n)==="y",c=es.has(i)?-1:1,f=s&&u?-1:1,d=pe(o,t);let{mainAxis:p,crossAxis:m,alignmentAxis:w}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof w=="number"&&(m=l==="end"?w*-1:w),u?{x:m*f,y:p*c}:{x:p*c,y:m*f}}const os=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(o){var n,a;const{x:r,y:s,placement:i,middlewareData:l}=o,u=await ts(o,t);return i===((n=l.offset)==null?void 0:n.placement)&&(a=l.arrow)!=null&&a.alignmentOffset?{}:{x:r+u.x,y:s+u.y,data:{...u,placement:i}}}}},ns=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(o){const{x:n,y:a,placement:r}=o,{mainAxis:s=!0,crossAxis:i=!1,limiter:l={fn:h=>{let{x:y,y:g}=h;return{x:y,y:g}}},...u}=pe(t,o),c={x:n,y:a},f=await Ue(o,u),d=ee(Y(r)),p=$o(d);let m=c[p],w=c[d];if(s){const h=p==="y"?"top":"left",y=p==="y"?"bottom":"right",g=m+f[h],v=m-f[y];m=wt(g,m,v)}if(i){const h=d==="y"?"top":"left",y=d==="y"?"bottom":"right",g=w+f[h],v=w-f[y];w=wt(g,w,v)}const x=l.fn({...o,[p]:m,[d]:w});return{...x,data:{x:x.x-n,y:x.y-a,enabled:{[p]:s,[d]:i}}}}}},as=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(o){var n,a;const{placement:r,rects:s,platform:i,elements:l}=o,{apply:u=()=>{},...c}=pe(t,o),f=await Ue(o,c),d=Y(r),p=Z(r),m=ee(r)==="y",{width:w,height:x}=s.floating;let h,y;d==="top"||d==="bottom"?(h=d,y=p===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(y=d,h=p==="end"?"top":"bottom");const g=x-f.top-f.bottom,v=w-f.left-f.right,B=Be(x-f[h],g),k=Be(w-f[y],v),V=!o.middlewareData.shift;let N=B,b=k;if((n=o.middlewareData.shift)!=null&&n.enabled.x&&(b=v),(a=o.middlewareData.shift)!=null&&a.enabled.y&&(N=g),V&&!p){const S=ce(f.left,0),R=ce(f.right,0),C=ce(f.top,0),D=ce(f.bottom,0);m?b=w-2*(S!==0||R!==0?S+R:ce(f.left,f.right)):N=x-2*(C!==0||D!==0?C+D:ce(f.top,f.bottom))}await u({...o,availableWidth:b,availableHeight:N});const A=await i.getDimensions(l.floating);return w!==A.width||x!==A.height?{reset:{rects:!0}}:{}}}};function q(t){var o;return((o=t.ownerDocument)==null?void 0:o.defaultView)||window}function K(t){return q(t).getComputedStyle(t)}const Gt=Math.min,be=Math.max,Ie=Math.round;function So(t){const o=K(t);let n=parseFloat(o.width),a=parseFloat(o.height);const r=t.offsetWidth,s=t.offsetHeight,i=Ie(n)!==r||Ie(a)!==s;return i&&(n=r,a=s),{width:n,height:a,fallback:i}}function ie(t){return Ao(t)?(t.nodeName||"").toLowerCase():""}let Ee;function Vo(){if(Ee)return Ee;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(Ee=t.brands.map((o=>o.brand+"/"+o.version)).join(" "),Ee):navigator.userAgent}function X(t){return t instanceof q(t).HTMLElement}function re(t){return t instanceof q(t).Element}function Ao(t){return t instanceof q(t).Node}function Zt(t){return typeof ShadowRoot>"u"?!1:t instanceof q(t).ShadowRoot||t instanceof ShadowRoot}function Ge(t){const{overflow:o,overflowX:n,overflowY:a,display:r}=K(t);return/auto|scroll|overlay|hidden|clip/.test(o+a+n)&&!["inline","contents"].includes(r)}function rs(t){return["table","td","th"].includes(ie(t))}function ht(t){const o=/firefox/i.test(Vo()),n=K(t),a=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!=="none"||n.perspective!=="none"||!!a&&a!=="none"||o&&n.willChange==="filter"||o&&!!n.filter&&n.filter!=="none"||["transform","perspective"].some((r=>n.willChange.includes(r)))||["paint","layout","strict","content"].some((r=>{const s=n.contain;return s!=null&&s.includes(r)}))}function To(){return!/^((?!chrome|android).)*safari/i.test(Vo())}function Pt(t){return["html","body","#document"].includes(ie(t))}function Eo(t){return re(t)?t:t.contextElement}const Po={x:1,y:1};function fe(t){const o=Eo(t);if(!X(o))return Po;const n=o.getBoundingClientRect(),{width:a,height:r,fallback:s}=So(o);let i=(s?Ie(n.width):n.width)/a,l=(s?Ie(n.height):n.height)/r;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}function $e(t,o,n,a){var r,s;o===void 0&&(o=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),l=Eo(t);let u=Po;o&&(a?re(a)&&(u=fe(a)):u=fe(t));const c=l?q(l):window,f=!To()&&n;let d=(i.left+(f&&((r=c.visualViewport)==null?void 0:r.offsetLeft)||0))/u.x,p=(i.top+(f&&((s=c.visualViewport)==null?void 0:s.offsetTop)||0))/u.y,m=i.width/u.x,w=i.height/u.y;if(l){const x=q(l),h=a&&re(a)?q(a):a;let y=x.frameElement;for(;y&&a&&h!==x;){const g=fe(y),v=y.getBoundingClientRect(),B=getComputedStyle(y);v.x+=(y.clientLeft+parseFloat(B.paddingLeft))*g.x,v.y+=(y.clientTop+parseFloat(B.paddingTop))*g.y,d*=g.x,p*=g.y,m*=g.x,w*=g.y,d+=v.x,p+=v.y,y=q(y).frameElement}}return{width:m,height:w,top:p,right:d+m,bottom:p+w,left:d,x:d,y:p}}function se(t){return((Ao(t)?t.ownerDocument:t.document)||window.document).documentElement}function Ze(t){return re(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Ro(t){return $e(se(t)).left+Ze(t).scrollLeft}function _e(t){if(ie(t)==="html")return t;const o=t.assignedSlot||t.parentNode||Zt(t)&&t.host||se(t);return Zt(o)?o.host:o}function Lo(t){const o=_e(t);return Pt(o)?o.ownerDocument.body:X(o)&&Ge(o)?o:Lo(o)}function He(t,o){var n;o===void 0&&(o=[]);const a=Lo(t),r=a===((n=t.ownerDocument)==null?void 0:n.body),s=q(a);return r?o.concat(s,s.visualViewport||[],Ge(a)?a:[]):o.concat(a,He(a))}function Qt(t,o,n){return o==="viewport"?xe((function(a,r){const s=q(a),i=se(a),l=s.visualViewport;let u=i.clientWidth,c=i.clientHeight,f=0,d=0;if(l){u=l.width,c=l.height;const p=To();(p||!p&&r==="fixed")&&(f=l.offsetLeft,d=l.offsetTop)}return{width:u,height:c,x:f,y:d}})(t,n)):re(o)?xe((function(a,r){const s=$e(a,!0,r==="fixed"),i=s.top+a.clientTop,l=s.left+a.clientLeft,u=X(a)?fe(a):{x:1,y:1};return{width:a.clientWidth*u.x,height:a.clientHeight*u.y,x:l*u.x,y:i*u.y}})(o,n)):xe((function(a){const r=se(a),s=Ze(a),i=a.ownerDocument.body,l=be(r.scrollWidth,r.clientWidth,i.scrollWidth,i.clientWidth),u=be(r.scrollHeight,r.clientHeight,i.scrollHeight,i.clientHeight);let c=-s.scrollLeft+Ro(a);const f=-s.scrollTop;return K(i).direction==="rtl"&&(c+=be(r.clientWidth,i.clientWidth)-l),{width:l,height:u,x:c,y:f}})(se(t)))}function Kt(t){return X(t)&&K(t).position!=="fixed"?t.offsetParent:null}function Xt(t){const o=q(t);let n=Kt(t);for(;n&&rs(n)&&K(n).position==="static";)n=Kt(n);return n&&(ie(n)==="html"||ie(n)==="body"&&K(n).position==="static"&&!ht(n))?o:n||(function(a){let r=_e(a);for(;X(r)&&!Pt(r);){if(ht(r))return r;r=_e(r)}return null})(t)||o}function ss(t,o,n){const a=X(o),r=se(o),s=$e(t,!0,n==="fixed",o);let i={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(a||!a&&n!=="fixed")if((ie(o)!=="body"||Ge(r))&&(i=Ze(o)),X(o)){const u=$e(o,!0);l.x=u.x+o.clientLeft,l.y=u.y+o.clientTop}else r&&(l.x=Ro(r));return{x:s.left+i.scrollLeft-l.x,y:s.top+i.scrollTop-l.y,width:s.width,height:s.height}}const is={getClippingRect:function(t){let{element:o,boundary:n,rootBoundary:a,strategy:r}=t;const s=n==="clippingAncestors"?(function(c,f){const d=f.get(c);if(d)return d;let p=He(c).filter((h=>re(h)&&ie(h)!=="body")),m=null;const w=K(c).position==="fixed";let x=w?_e(c):c;for(;re(x)&&!Pt(x);){const h=K(x),y=ht(x);(w?y||m:y||h.position!=="static"||!m||!["absolute","fixed"].includes(m.position))?m=h:p=p.filter((g=>g!==x)),x=_e(x)}return f.set(c,p),p})(o,this._c):[].concat(n),i=[...s,a],l=i[0],u=i.reduce(((c,f)=>{const d=Qt(o,f,r);return c.top=be(d.top,c.top),c.right=Gt(d.right,c.right),c.bottom=Gt(d.bottom,c.bottom),c.left=be(d.left,c.left),c}),Qt(o,l,r));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:a}=t;const r=X(n),s=se(n);if(n===s)return o;let i={scrollLeft:0,scrollTop:0},l={x:1,y:1};const u={x:0,y:0};if((r||!r&&a!=="fixed")&&((ie(n)!=="body"||Ge(s))&&(i=Ze(n)),X(n))){const c=$e(n);l=fe(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-i.scrollLeft*l.x+u.x,y:o.y*l.y-i.scrollTop*l.y+u.y}},isElement:re,getDimensions:function(t){return X(t)?So(t):t.getBoundingClientRect()},getOffsetParent:Xt,getDocumentElement:se,getScale:fe,async getElementRects(t){let{reference:o,floating:n,strategy:a}=t;const r=this.getOffsetParent||Xt,s=this.getDimensions;return{reference:ss(o,await r(n),a),floating:{x:0,y:0,...await s(n)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>K(t).direction==="rtl"},ls=(t,o,n)=>{const a=new Map,r={platform:is,...n},s={...r.platform,_c:a};return Qr(t,o,{...r,platform:s})};function Mo(t,o){for(const n in o)Object.prototype.hasOwnProperty.call(o,n)&&(typeof o[n]=="object"&&t[n]?Mo(t[n],o[n]):t[n]=o[n])}const Q={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 Ne(t,o){let n=Q.themes[t]||{},a;do a=n[o],typeof a>"u"?n.$extend?n=Q.themes[n.$extend]||{}:(n=null,a=Q[o]):n=null;while(n);return a}function us(t){const o=[t];let n=Q.themes[t]||{};do n.$extend&&!n.$resetCss?(o.push(n.$extend),n=Q.themes[n.$extend]||{}):n=null;while(n);return o.map(a=>`v-popper--theme-${a}`)}function Yt(t){const o=[t];let n=Q.themes[t]||{};do n.$extend?(o.push(n.$extend),n=Q.themes[n.$extend]||{}):n=null;while(n);return o}let he=!1;if(typeof window<"u"){he=!1;try{const t=Object.defineProperty({},"passive",{get(){he=!0}});window.addEventListener("test",null,t)}catch{}}let Do=!1;typeof window<"u"&&typeof navigator<"u"&&(Do=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const zo=["auto","top","bottom","left","right"].reduce((t,o)=>t.concat([o,`${o}-start`,`${o}-end`]),[]),Jt={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},eo={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function to(t,o){const n=t.indexOf(o);n!==-1&&t.splice(n,1)}function st(){return new Promise(t=>requestAnimationFrame(()=>{requestAnimationFrame(t)}))}const G=[];let le=null;const oo={};function no(t){let o=oo[t];return o||(o=oo[t]=[]),o}let gt=function(){};typeof window<"u"&&(gt=window.Element);function M(t){return function(o){return Ne(o.theme,t)}}const it="__floating-vue__popper",Oo=()=>e.defineComponent({name:"VPopper",provide(){return{[it]:{parentPopper:this}}},inject:{[it]:{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:M("disabled")},positioningDisabled:{type:Boolean,default:M("positioningDisabled")},placement:{type:String,default:M("placement"),validator:t=>zo.includes(t)},delay:{type:[String,Number,Object],default:M("delay")},distance:{type:[Number,String],default:M("distance")},skidding:{type:[Number,String],default:M("skidding")},triggers:{type:Array,default:M("triggers")},showTriggers:{type:[Array,Function],default:M("showTriggers")},hideTriggers:{type:[Array,Function],default:M("hideTriggers")},popperTriggers:{type:Array,default:M("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:M("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:M("popperHideTriggers")},container:{type:[String,Object,gt,Boolean],default:M("container")},boundary:{type:[String,gt],default:M("boundary")},strategy:{type:String,validator:t=>["absolute","fixed"].includes(t),default:M("strategy")},autoHide:{type:[Boolean,Function],default:M("autoHide")},handleResize:{type:Boolean,default:M("handleResize")},instantMove:{type:Boolean,default:M("instantMove")},eagerMount:{type:Boolean,default:M("eagerMount")},popperClass:{type:[String,Array,Object],default:M("popperClass")},computeTransformOrigin:{type:Boolean,default:M("computeTransformOrigin")},autoMinSize:{type:Boolean,default:M("autoMinSize")},autoSize:{type:[Boolean,String],default:M("autoSize")},autoMaxSize:{type:Boolean,default:M("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:M("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:M("preventOverflow")},overflowPadding:{type:[Number,String],default:M("overflowPadding")},arrowPadding:{type:[Number,String],default:M("arrowPadding")},arrowOverflow:{type:Boolean,default:M("arrowOverflow")},flip:{type:Boolean,default:M("flip")},shift:{type:Boolean,default:M("shift")},shiftCrossAxis:{type:Boolean,default:M("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:M("noAutoFocus")},disposeTimeout:{type:Number,default:M("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[it])==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 a,r;(a=this.parentPopper)!=null&&a.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(n||!this.disabled)&&(((r=this.parentPopper)==null?void 0:r.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(os({mainAxis:this.distance,crossAxis:this.skidding}));const o=this.placement.startsWith("auto");if(o?t.middleware.push(Yr({alignment:this.placement.split("-")[1]??""})):t.placement=this.placement,this.preventOverflow&&(this.shift&&t.middleware.push(ns({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!o&&this.flip&&t.middleware.push(Jr({padding:this.overflowPadding,boundary:this.boundary}))),t.middleware.push(Kr({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&t.middleware.push({name:"arrowOverflow",fn:({placement:a,rects:r,middlewareData:s})=>{let i;const{centerOffset:l}=s.arrow;return a.startsWith("top")||a.startsWith("bottom")?i=Math.abs(l)>r.reference.width/2:i=Math.abs(l)>r.reference.height/2,{data:{overflow:i}}}}),this.autoMinSize||this.autoSize){const a=this.autoSize?this.autoSize:this.autoMinSize?"min":null;t.middleware.push({name:"autoSize",fn:({rects:r,placement:s,middlewareData:i})=>{var l;if((l=i.autoSize)!=null&&l.skip)return{};let u,c;return s.startsWith("top")||s.startsWith("bottom")?u=r.reference.width:c=r.reference.height,this.$_innerNode.style[a==="min"?"minWidth":a==="max"?"maxWidth":"width"]=u!=null?`${u}px`:null,this.$_innerNode.style[a==="min"?"minHeight":a==="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(as({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:a,availableHeight:r})=>{this.$_innerNode.style.maxWidth=a!=null?`${a}px`:null,this.$_innerNode.style.maxHeight=r!=null?`${r}px`:null}})));const n=await ls(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),le&&this.instantMove&&le.instantMove&&le!==this.parentPopper){le.$_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&&(le=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 st(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...He(this.$_referenceNode),...He(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"),a=n.parentNode.getBoundingClientRect(),r=o.x+o.width/2-(a.left+n.offsetLeft),s=o.y+o.height/2-(a.top+n.offsetTop);this.result.transformOrigin=`${r}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<G.length;n++)o=G[n],o.showGroup!==t&&(o.hide(),o.$emit("close-group"))}G.push(this),document.body.classList.add("v-popper--some-open");for(const o of Yt(this.theme))no(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 st(),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,to(G,this),G.length===0&&document.body.classList.remove("v-popper--some-open");for(const n of Yt(this.theme)){const a=no(n);to(a,this),a.length===0&&document.body.classList.remove(`v-popper--some-open--${n}`)}le===this&&(le=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 st(),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,Jt,this.triggers,this.showTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],Jt,this.popperTriggers,this.popperShowTriggers,t);const o=n=>{n.usedByTooltip||this.hide({event:n})};this.$_registerTriggerListeners(this.$_targetNodes,eo,this.triggers,this.hideTriggers,o),this.$_registerTriggerListeners([this.$_popperNode],eo,this.popperTriggers,this.popperHideTriggers,o)},$_registerEventListeners(t,o,n){this.$_events.push({targetNodes:t,eventType:o,handler:n}),t.forEach(a=>a.addEventListener(o,n,he?{passive:!0}:void 0))},$_registerTriggerListeners(t,o,n,a,r){let s=n;a!=null&&(s=typeof a=="function"?a(s):a),s.forEach(i=>{const l=o[i];l&&this.$_registerEventListeners(t,l,r)})},$_removeEventListeners(t){const o=[];this.$_events.forEach(n=>{const{targetNodes:a,eventType:r,handler:s}=n;!t||t===r?a.forEach(i=>i.removeEventListener(r,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 a=n.getAttribute(t);a&&(n.removeAttribute(t),n.setAttribute(o,a))}},$_applyAttrsToTarget(t){for(const o of this.$_targetNodes)for(const n in t){const a=t[n];a==null?o.removeAttribute(n):o.setAttribute(n,a)}},$_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(ke>=t.left&&ke<=t.right&&Ce>=t.top&&Ce<=t.bottom){const o=this.$_popperNode.getBoundingClientRect(),n=ke-oe,a=Ce-ne,r=o.left+o.width/2-oe+(o.top+o.height/2)-ne+o.width+o.height,s=oe+n*r,i=ne+a*r;return Pe(oe,ne,s,i,o.left,o.top,o.left,o.bottom)||Pe(oe,ne,s,i,o.left,o.top,o.right,o.top)||Pe(oe,ne,s,i,o.right,o.top,o.right,o.bottom)||Pe(oe,ne,s,i,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(Do){const t=he?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",o=>ao(o,!0),t),document.addEventListener("touchend",o=>ro(o,!0),t)}else window.addEventListener("mousedown",t=>ao(t,!1),!0),window.addEventListener("click",t=>ro(t,!1),!0);window.addEventListener("resize",ds)}function ao(t,o){if(Q.autoHideOnMousedown)Io(t,o);else for(let n=0;n<G.length;n++){const a=G[n];try{a.mouseDownContains=a.popperNode().contains(t.target)}catch{}}}function ro(t,o){Q.autoHideOnMousedown||Io(t,o)}function Io(t,o){const n={};for(let a=G.length-1;a>=0;a--){const r=G[a];try{const s=r.containsGlobalTarget=r.mouseDownContains||r.popperNode().contains(t.target);r.pendingHide=!1,requestAnimationFrame(()=>{if(r.pendingHide=!1,!n[r.randomId]&&so(r,s,t)){if(r.$_handleGlobalClose(t,o),!t.closeAllPopover&&t.closePopover&&s){let l=r.parentPopper;for(;l;)n[l.randomId]=!0,l=l.parentPopper;return}let i=r.parentPopper;for(;i&&so(i,i.containsGlobalTarget,t);)i.$_handleGlobalClose(t,o),i=i.parentPopper}})}catch{}}}function so(t,o,n){return n.closeAllPopover||n.closePopover&&o||cs(t,n)&&!o}function cs(t,o){if(typeof t.autoHide=="function"){const n=t.autoHide(o);return t.lastAutoHide=n,n}return t.autoHide}function ds(){for(let t=0;t<G.length;t++)G[t].$_computePosition()}let oe=0,ne=0,ke=0,Ce=0;typeof window<"u"&&window.addEventListener("mousemove",t=>{oe=ke,ne=Ce,ke=t.clientX,Ce=t.clientY},he?{passive:!0}:void 0);function Pe(t,o,n,a,r,s,i,l){const u=((i-r)*(o-s)-(l-s)*(t-r))/((l-s)*(n-t)-(i-r)*(a-o)),c=((n-t)*(o-s)-(a-o)*(t-r))/((l-s)*(n-t)-(i-r)*(a-o));return u>=0&&u<=1&&c>=0&&c<=1}const ps={extends:Oo()},Qe=(t,o)=>{const n=t.__vccOpts||t;for(const[a,r]of o)n[a]=r;return n};function ms(t,o,n,a,r,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 fs=Qe(ps,[["render",ms]]);function ws(){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 a=t.indexOf("rv:");return parseInt(t.substring(a+3,t.indexOf(".",a)),10)}var r=t.indexOf("Edge/");return r>0?parseInt(t.substring(r+5,t.indexOf(".",r)),10):-1}let Re;function vt(){vt.init||(vt.init=!0,Re=ws()!==-1)}var Ke={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){vt(),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",Re&&this.$el.appendChild(t),t.data="about:blank",Re||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&&(!Re&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const hs=e.withScopeId("data-v-b329ee4c");e.pushScopeId("data-v-b329ee4c");const gs={class:"resize-observer",tabindex:"-1"};e.popScopeId();const vs=hs((t,o,n,a,r,s)=>(e.openBlock(),e.createBlock("div",gs)));Ke.render=vs;Ke.__scopeId="data-v-b329ee4c";Ke.__file="src/components/ResizeObserver.vue";const Ho=(t="theme")=>({computed:{themeClass(){return us(this[t])}}}),ys=e.defineComponent({name:"VPopperContent",components:{ResizeObserver:Ke},mixins:[Ho()],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}}}),xs=["id","aria-hidden","tabindex","data-popper-placement"],bs={ref:"inner",class:"v-popper__inner"},ks=e.createElementVNode("div",{class:"v-popper__arrow-outer"},null,-1),Cs=e.createElementVNode("div",{class:"v-popper__arrow-inner"},null,-1),Bs=[ks,Cs];function $s(t,o,n,a,r,s){const i=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",bs,[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(i,{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)},Bs,4)],4)],46,xs)}const Fo=Qe(ys,[["render",$s]]),jo={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 yt=function(){};typeof window<"u"&&(yt=window.Element);const _s=e.defineComponent({name:"VPopperWrapper",components:{Popper:fs,PopperContent:Fo},mixins:[jo,Ho("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,yt,Boolean],default:void 0},boundary:{type:[String,yt],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 Ns(t,o,n,a,r,s){const i=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:f,skipTransition:d,autoHide:p,show:m,hide:w,handleResize:x,onResize:h,classes:y,result:g})=>[e.renderSlot(t.$slots,"default",{shown:c,show:m,hide:w}),e.createVNode(i,{ref:"popperContent","popper-id":u,theme:t.finalTheme,shown:c,mounted:f,"skip-transition":d,"auto-hide":p,"handle-resize":x,classes:y,result:g,onHide:w,onResize:h},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"popper",{shown:c,hide:w})]),_: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 Rt=Qe(_s,[["render",Ns]]),Ss={...Rt,name:"VDropdown",vPopperTheme:"dropdown"},Vs={...Rt,name:"VMenu",vPopperTheme:"menu"},As={...Rt,name:"VTooltip",vPopperTheme:"tooltip"},Ts=e.defineComponent({name:"VTooltipDirective",components:{Popper:Oo(),PopperContent:Fo},mixins:[jo],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:t=>Ne(t.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:t=>Ne(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(a=>this.onResult(o,a)):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}}}),Es=["innerHTML"],Ps=["textContent"];function Rs(t,o,n,a,r,s){const i=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:f,skipTransition:d,autoHide:p,hide:m,handleResize:w,onResize:x,classes:h,result:y})=>[e.createVNode(i,{ref:"popperContent",class:e.normalizeClass({"v-popper--tooltip-loading":t.loading}),"popper-id":u,theme:t.theme,shown:c,mounted:f,"skip-transition":d,"auto-hide":p,"handle-resize":w,classes:h,result:y,onHide:m,onResize:x},{default:e.withCtx(()=>[t.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:t.finalContent},null,8,Es)):(e.openBlock(),e.createElementBlock("div",{key:1,textContent:e.toDisplayString(t.finalContent)},null,8,Ps))]),_: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 Ls=Qe(Ts,[["render",Rs]]),Wo="v-popper--has-tooltip";function Ms(t,o){let n=t.placement;if(!n&&o)for(const a of zo)o[a]&&(n=a);return n||(n=Ne(t.theme||"tooltip","placement")),n}function qo(t,o,n){let a;const r=typeof o;return r==="string"?a={content:o}:o&&r==="object"?a=o:a={content:!1},a.placement=Ms(a,n),a.targetNodes=()=>[t],a.referenceNode=()=>t,a}let lt,Se,Ds=0;function zs(){if(lt)return;Se=e.ref([]),lt=e.createApp({name:"VTooltipDirectiveApp",setup(){return{directives:Se}},render(){return this.directives.map(o=>e.h(Ls,{...o.options,shown:o.shown||o.options.shown,key:o.id}))},devtools:{hide:!0}});const t=document.createElement("div");document.body.appendChild(t),lt.mount(t)}function Os(t,o,n){zs();const a=e.ref(qo(t,o,n)),r=e.ref(!1),s={id:Ds++,options:a,shown:r};return Se.value.push(s),t.classList&&t.classList.add(Wo),t.$_popper={options:a,item:s,show(){r.value=!0},hide(){r.value=!1}}}function Uo(t){if(t.$_popper){const o=Se.value.indexOf(t.$_popper.item);o!==-1&&Se.value.splice(o,1),delete t.$_popper,delete t.$_popperOldShown,delete t.$_popperMountTarget}t.classList&&t.classList.remove(Wo)}function io(t,{value:o,modifiers:n}){const a=qo(t,o,n);if(!a.content||Ne(a.theme||"tooltip","disabled"))Uo(t);else{let r;t.$_popper?(r=t.$_popper,r.options.value=a):r=Os(t,o,n),typeof o.shown<"u"&&o.shown!==t.$_popperOldShown&&(t.$_popperOldShown=o.shown,o.shown?r.show():r.hide())}}const Is={beforeMount:io,updated:io,beforeUnmount(t){Uo(t)}};function lo(t){t.addEventListener("mousedown",Fe),t.addEventListener("click",Fe),t.addEventListener("touchstart",Go,he?{passive:!0}:!1)}function uo(t){t.removeEventListener("mousedown",Fe),t.removeEventListener("click",Fe),t.removeEventListener("touchstart",Go),t.removeEventListener("touchend",Zo),t.removeEventListener("touchcancel",Qo)}function Fe(t){const o=t.currentTarget;t.closePopover=!o.$_vclosepopover_touch,t.closeAllPopover=o.$_closePopoverModifiers&&!!o.$_closePopoverModifiers.all}function Go(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",Zo),o.addEventListener("touchcancel",Qo)}}function Zo(t){const o=t.currentTarget;if(o.$_vclosepopover_touch=!1,t.changedTouches.length===1){const n=t.changedTouches[0],a=o.$_vclosepopover_touchPoint;t.closePopover=Math.abs(n.screenY-a.screenY)<20&&Math.abs(n.screenX-a.screenX)<20,t.closeAllPopover=o.$_closePopoverModifiers&&!!o.$_closePopoverModifiers.all}}function Qo(t){const o=t.currentTarget;o.$_vclosepopover_touch=!1}const Hs={beforeMount(t,{value:o,modifiers:n}){t.$_closePopoverModifiers=n,(typeof o>"u"||o)&&lo(t)},updated(t,{value:o,oldValue:n,modifiers:a}){t.$_closePopoverModifiers=a,o!==n&&(typeof o>"u"||o?lo(t):uo(t))},beforeUnmount(t){uo(t)}};function Fs(t,o={}){t.$_vTooltipInstalled||(t.$_vTooltipInstalled=!0,Mo(Q,o),t.directive("tooltip",Is),t.directive("close-popper",Hs),t.component("VTooltip",As),t.component("VDropdown",Ss),t.component("VMenu",Vs))}const js={version:"5.2.2",install:Fs,options:Q},Ws=t=>t?.data?.length?{data:t.data.map(o=>({...o}))}:null,qs=t=>t?.map(o=>xt(o)),xt=t=>({...t,caption:t.caption??null,attachments:Ws(t.attachments),...t.messages?{messages:qs(t.messages)}:{}});class Ve{payload;constructor(o){this.payload=xt(o)}static fromJSON(o){return new Ve(o)}static toJSON(o){return xt(o.payload)}toJSON(){return Ve.toJSON(this)}get from(){return J(this.payload)}get isSystemLike(){return ye(this.payload)}get attachments(){return We(this.payload)}get primaryAttachment(){return ae(this.payload)}}const Us=["canBeInteractedWith","recipientId","chatRoomId","companyId","createdAt","provider","id"],Gs=t=>{const o={};for(const n of Us)t[n]!==void 0&&(o[n]=t[n]);return o},co=(t,o="")=>typeof t=="string"?t:t==null?o:String(t);class Lt{payload={messageType:"text",messageBody:""};constructor(){}static create(){return new Lt}withRaw(o){const n=typeof o.caption=="string"||o.caption===null?o.caption:o.caption===void 0?void 0:null;return this.payload={...this.payload,...Gs(o),messageType:co(o.messageType,"text")||"text",messageBody:co(o.messageBody),...n!==void 0?{caption:n}:{}},this}withAttachments(o){return this.payload.attachments=o.length?{data:o.map(n=>({...n}))}:null,this}build(){return Ve.fromJSON({...this.payload,messageType:this.payload.messageType||"text",messageBody:this.payload.messageBody??"",attachments:this.payload.attachments??null})}}const Zs="c3fd21c9-c91a-4c66-baa5-c3e050c2cc74",po="2026-10-30T16:35:31.633Z",Qs="da3cbfd7-4cdc-481b-a30e-314a9ce96b92",Ks="https://svgl.app/library/slack.svg",ge=t=>({id:t.id,companyId:Zs,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:po,updatedAt:po}),ue=(t,o)=>({id:t,nextRuleId:o}),bt=ge({id:"17139a38-401b-4d60-a695-df3dc9cb0975",name:"Início",action:"widget-base-screen",settings:{body:{logo:"",title:"Bem-vindo",eyebrow:"SLACK",subtitle:"Escolha uma das opções"},header:{logo:Ks,title:"Slack",subtitle:"Retire todas suas dúvidas no nosso Widget"}}}),ut=ge({id:"3c672c70-4221-411b-bfaf-66ce0383bc38",name:"Falar com o suporte (Chat)",action:"widget-service-screen",settings:{behavior:"chat",features:{sendMessage:!0,sendAttachment:!0,quickReplies:[{"en-US":"I have a question about the product","es-ES":"Tengo una duda sobre el producto","pt-BR":"Estou com dúvida no produto"},{"en-US":"My phone extension isn't working","es-ES":"Mi extensión telefónica no funciona","pt-BR":"Meu ramal não está funcionando"}]}}}),ct=ge({id:"f230e458-bfe3-461f-b971-00ff2e99ac77",name:"Falar com vendas (Ligação)",action:"widget-service-screen",settings:{behavior:"voice",features:{sendMessage:!1,sendAttachment:!1}}}),dt=ge({id:"af089783-0c06-4d44-9b8d-a7b748c5bfe6",name:"Cancelar plano",action:"widget-identification-screen",settings:{form:{fields:[{name:"nome",label:"Nome",required:!0,placeholder:"Digite seu nome"},{name:"email",label:"E-mail",required:!0,placeholder:"Digite seu e-mail"},{name:"cpf",label:"CPF",required:!0,placeholder:"Digite seu CPF"}]}}}),mo=ge({id:"12bf98e7-1c99-4971-a4a8-23d039f2d730",name:"Nova tela",action:"widget-base-screen",settings:null}),Le=ge({id:"9f2c1a6e-5b84-4d21-9c0e-7a1d8e4f2b30",name:"Perguntas frequentes",action:"widget-article-screen",settings:{header:{title:"Perguntas frequentes",subtitle:"Encontre respostas, orientações e suporte para sua experiência."},body:{content:{"pt-BR":`
2
+ </h3>
3
+
4
+ <p>
5
+ Para criar uma conta, acesse a tela inicial e selecione
6
+ a opção de cadastro. Preencha os campos solicitados
7
+ e siga as instruções apresentadas.
8
+ </p>
9
+
10
+ <ol>
11
+ <li>Acesse a página de cadastro.</li>
12
+ <li>Informe seus dados pessoais.</li>
13
+ <li>Revise as informações preenchidas.</li>
14
+ <li>Confirme o envio do formulário.</li>
15
+ <li>Aguarde a confirmação do cadastro.</li>
16
+ </ol>
17
+
18
+ <h3>Informações importantes</h3>
19
+
20
+ <p>
21
+ Os dados informados devem estar corretos e atualizados.
22
+ Informações inconsistentes poderão impedir a conclusão
23
+ de determinados procedimentos.
24
+ </p>
25
+
26
+ <div>
27
+ <strong>Atenção:</strong>
28
+ <span>
29
+ Nunca compartilhe sua senha ou suas credenciais
30
+ de acesso com terceiros.
31
+ </span>
32
+ </div>
33
+
34
+ <h3>Recuperação de senha</h3>
35
+
36
+ <p>
37
+ Caso tenha esquecido sua senha, utilize a funcionalidade
38
+ de recuperação disponível na tela de login.
39
+ </p>
40
+
41
+ <p>
42
+ <a href="/regras/recuperacao-de-senha">
43
+ Acessar instruções de recuperação de senha
44
+ </a>
45
+ </p>
46
+ </section>
47
+
48
+ <hr />
49
+ <br>
50
+
51
+ <section>
52
+ <h2>3. Funcionalidades disponíveis</h2>
53
+
54
+ <p>
55
+ A plataforma disponibiliza diferentes recursos para
56
+ facilitar o gerenciamento das atividades.
57
+ </p>
58
+
59
+ <table>
60
+ <caption>
61
+ Tabela 1 — Resumo das funcionalidades
62
+ </caption>
63
+
64
+ <thead>
65
+ <tr>
66
+ <th scope="col">Funcionalidade</th>
67
+ <th scope="col">Descrição</th>
68
+ <th scope="col">Disponibilidade</th>
69
+ </tr>
70
+ </thead>
71
+
72
+ <tbody>
73
+ <tr>
74
+ <td>Cadastro</td>
75
+ <td>Criação e gerenciamento de conta.</td>
76
+ <td>Disponível</td>
77
+ </tr>
78
+
79
+ <tr>
80
+ <td>Perfil</td>
81
+ <td>Consulta e atualização de dados.</td>
82
+ <td>Disponível</td>
83
+ </tr>
84
+
85
+ <tr>
86
+ <td>Notificações</td>
87
+ <td>Recebimento de avisos e comunicados.</td>
88
+ <td>Conforme configuração</td>
89
+ </tr>
90
+
91
+ <tr>
92
+ <td>Relatórios</td>
93
+ <td>Consulta de informações e históricos.</td>
94
+ <td>Conforme permissão</td>
95
+ </tr>
96
+
97
+ <tr>
98
+ <td>Atendimento</td>
99
+ <td>Contato com a equipe de suporte.</td>
100
+ <td>Disponível</td>
101
+ </tr>
102
+ </tbody>
103
+
104
+ <tfoot>
105
+ <tr>
106
+ <td colspan="3">
107
+ A disponibilidade pode variar conforme o perfil
108
+ e as permissões do usuário.
109
+ </td>
110
+ </tr>
111
+ </tfoot>
112
+ </table>
113
+
114
+ <h3>Comparação de recursos</h3>
115
+
116
+ <table>
117
+ <thead>
118
+ <tr>
119
+ <th>Recurso</th>
120
+ <th>Plano básico</th>
121
+ <th>Plano avançado</th>
122
+ </tr>
123
+ </thead>
124
+
125
+ <tbody>
126
+ <tr>
127
+ <td>Acesso à plataforma</td>
128
+ <td>Sim</td>
129
+ <td>Sim</td>
130
+ </tr>
131
+
132
+ <tr>
133
+ <td>Relatórios detalhados</td>
134
+ <td>Não</td>
135
+ <td>Sim</td>
136
+ </tr>
137
+
138
+ <tr>
139
+ <td>Suporte prioritário</td>
140
+ <td>Não</td>
141
+ <td>Sim</td>
142
+ </tr>
143
+ </tbody>
144
+ </table>
145
+ </section>
146
+
147
+ <hr />
148
+ <br>
149
+
150
+ <section>
151
+ <h2>4. Pagamentos e transações</h2>
152
+
153
+ <p>
154
+ Nesta seção você encontra informações gerais sobre
155
+ pagamentos, cobranças e histórico de transações.
156
+ </p>
157
+
158
+ <h3>Como consultar uma transação?</h3>
159
+
160
+ <p>
161
+ Acesse a área financeira da plataforma e localize
162
+ o histórico de transações.
163
+ </p>
164
+
165
+ <table>
166
+ <thead>
167
+ <tr>
168
+ <th>Etapa</th>
169
+ <th>Procedimento</th>
170
+ </tr>
171
+ </thead>
172
+
173
+ <tbody>
174
+ <tr>
175
+ <td>01</td>
176
+ <td>Acesse sua conta.</td>
177
+ </tr>
178
+ <tr>
179
+ <td>02</td>
180
+ <td>Abra a área financeira.</td>
181
+ </tr>
182
+ <tr>
183
+ <td>03</td>
184
+ <td>Selecione o histórico.</td>
185
+ </tr>
186
+ <tr>
187
+ <td>04</td>
188
+ <td>Consulte os detalhes da transação.</td>
189
+ </tr>
190
+ </tbody>
191
+ </table>
192
+
193
+ <h3>Exemplo de resumo financeiro</h3>
194
+
195
+ <table>
196
+ <tbody>
197
+ <tr>
198
+ <th scope="row">Valor total</th>
199
+ <td>R$ 1.250,00</td>
200
+ </tr>
201
+ <tr>
202
+ <th scope="row">Valor pago</th>
203
+ <td>R$ 1.000,00</td>
204
+ </tr>
205
+ <tr>
206
+ <th scope="row">Valor pendente</th>
207
+ <td>R$ 250,00</td>
208
+ </tr>
209
+ <tr>
210
+ <th scope="row">Status</th>
211
+ <td>Parcialmente pago</td>
212
+ </tr>
213
+ </tbody>
214
+ </table>
215
+
216
+ <p>
217
+ <mark>Importante:</mark>
218
+ Os valores acima são exemplos ilustrativos e não
219
+ representam cobranças reais.
220
+ </p>
221
+ </section>
222
+
223
+ <hr />
224
+ <br>
225
+
226
+ <section>
227
+ <h2>5. Segurança e privacidade</h2>
228
+
229
+ <h3>Como proteger sua conta?</h3>
230
+
231
+ <ul>
232
+ <li>Utilize senhas fortes e exclusivas.</li>
233
+ <li>Não compartilhe suas credenciais.</li>
234
+ <li>Evite utilizar redes públicas desconhecidas.</li>
235
+ <li>Não abra links suspeitos.</li>
236
+ <li>Mantenha seus dispositivos atualizados.</li>
237
+ </ul>
238
+
239
+ <h3>Classificação das informações</h3>
240
+
241
+ <dl>
242
+ <dt>Dados públicos</dt>
243
+ <dd>
244
+ Informações que podem ser disponibilizadas publicamente.
245
+ </dd>
246
+
247
+ <dt>Dados internos</dt>
248
+ <dd>
249
+ Informações destinadas ao uso interno da organização.
250
+ </dd>
251
+
252
+ <dt>Dados confidenciais</dt>
253
+ <dd>
254
+ Informações que exigem controle de acesso e proteção adicional.
255
+ </dd>
256
+ </dl>
257
+
258
+ <p>
259
+ Consulte também nossa
260
+ <a href="/regras/privacidade">política de privacidade</a>
261
+ para conhecer as orientações aplicáveis ao tratamento
262
+ das informações.
263
+ </p>
264
+ </section>
265
+
266
+ <hr />
267
+ <br>
268
+
269
+ <section>
270
+ <h2>6. Elementos adicionais e formatação</h2>
271
+
272
+ <h3>Formatação de texto</h3>
273
+
274
+ <p>
275
+ Este é um exemplo de texto em <strong>negrito</strong>,
276
+ texto em <em>itálico</em>, texto <u>sublinhado</u>,
277
+ texto <del>removido</del> e texto <ins>inserido</ins>.
278
+ </p>
279
+
280
+ <p>
281
+ Também podemos utilizar
282
+ <mark>texto destacado</mark>,
283
+ <small>texto menor</small>,
284
+ <sub>texto subscrito</sub> e
285
+ <sup>texto sobrescrito</sup>.
286
+ </p>
287
+
288
+ <h3>Representação de código</h3>
289
+
290
+ <p>
291
+ Exemplo de código em linha:
292
+ <code>const status = 'active';</code>
293
+ </p>
294
+
295
+ <pre><code>function consultarUsuario(id) {
296
+ return {
297
+ id: id,
298
+ nome: 'Usuário exemplo',
299
+ ativo: true
300
+ };
301
+ }</code></pre>
302
+
303
+ <h3>Endereço de referência</h3>
304
+
305
+ <address>
306
+ Equipe de suporte<br />
307
+ Central de atendimento<br />
308
+ E-mail: suporte@exemplo.com
309
+ </address>
310
+
311
+ <h3>Imagem ilustrativa</h3>
312
+
313
+ <figure>
314
+ <img
315
+ src="https://placehold.co/800x400?text=Imagem+ilustrativa"
316
+ alt="Imagem ilustrativa para teste de renderização"
317
+ width="800"
318
+ height="400"
319
+ />
320
+ <figcaption>
321
+ Figura 1 — Exemplo de imagem com legenda.
322
+ </figcaption>
323
+ </figure>
324
+ </section>
325
+
326
+ <hr />
327
+ <br>
328
+
329
+ <section>
330
+ <h2>7. Perguntas frequentes</h2>
331
+
332
+ <details>
333
+ <summary>Como posso atualizar meus dados?</summary>
334
+ <p>
335
+ Acesse as configurações da sua conta e verifique
336
+ as opções disponíveis para atualização cadastral.
337
+ </p>
338
+ </details>
339
+
340
+ <details>
341
+ <summary>Como entrar em contato com o suporte?</summary>
342
+ <p>
343
+ Utilize os canais oficiais de atendimento,
344
+ como chat ou ligação, conforme disponibilidade.
345
+ </p>
346
+ </details>
347
+
348
+ <details>
349
+ <summary>Posso acessar a plataforma pelo celular?</summary>
350
+ <p>
351
+ A compatibilidade depende da versão e dos recursos
352
+ disponibilizados pela plataforma.
353
+ </p>
354
+ </details>
355
+
356
+ <details>
357
+ <summary>O que fazer se encontrar um erro?</summary>
358
+ <p>
359
+ Registre os detalhes do problema e entre em contato
360
+ com a equipe responsável pelo atendimento.
361
+ </p>
362
+ </details>
363
+ </section>
364
+
365
+ <hr />
366
+ <br>
367
+
368
+ <section>
369
+ <h2>8. Canais de atendimento</h2>
370
+
371
+ <table>
372
+ <thead>
373
+ <tr>
374
+ <th>Canal</th>
375
+ <th>Disponibilidade</th>
376
+ <th>Finalidade</th>
377
+ </tr>
378
+ </thead>
379
+
380
+ <tbody>
381
+ <tr>
382
+ <td>Chat</td>
383
+ <td>Segunda a sexta</td>
384
+ <td>Dúvidas gerais</td>
385
+ </tr>
386
+
387
+ <tr>
388
+ <td>Telefone</td>
389
+ <td>Segunda a sexta</td>
390
+ <td>Atendimento especializado</td>
391
+ </tr>
392
+
393
+ <tr>
394
+ <td>Central de ajuda</td>
395
+ <td>Online</td>
396
+ <td>Consulta de documentação</td>
397
+ </tr>
398
+ </tbody>
399
+ </table>
400
+
401
+ <p>
402
+ Horário de atendimento:
403
+ <strong>segunda a sexta-feira, das 9h às 18h.</strong>
404
+ </p>
405
+ </section>
406
+
407
+ <hr />
408
+ <br>
409
+
410
+ <section>
411
+ <h2>9. Links relacionados</h2>
412
+
413
+ <ul>
414
+ <li>
415
+ <a href="/regras/atendimento">
416
+ Central de atendimento
417
+ </a>
418
+ </li>
419
+
420
+ <li>
421
+ <a href="/regras/privacidade">
422
+ Política de privacidade
423
+ </a>
424
+ </li>
425
+
426
+ <li>
427
+ <a href="/regras/termos">
428
+ Termos de uso
429
+ </a>
430
+ </li>
431
+
432
+ <li>
433
+ <a href="/regras/conta">
434
+ Gerenciamento da conta
435
+ </a>
436
+ </li>
437
+
438
+ <li>
439
+ <a href="/regras/seguranca">
440
+ Segurança da informação
441
+ </a>
442
+ </li>
443
+ </ul>
444
+ </section>
445
+
446
+ <hr />
447
+ <br>
448
+
449
+ <footer>
450
+ <h2>Precisa de mais ajuda?</h2>
451
+
452
+ <p>
453
+ Caso não tenha encontrado a resposta desejada,
454
+ entre em contato com nossa equipe de atendimento.
455
+ </p>
456
+
457
+ <p>
458
+ <strong>Estamos à disposição para ajudar!</strong>
459
+ </p>
460
+
461
+ <small>
462
+ Documento de demonstração para validação dos elementos
463
+ HTML suportados pelo componente de artigos.
464
+ </small>
465
+ </footer>
466
+ </article>
467
+
468
+ `,"en-US":`
469
+ <h2>How can we help?</h2>
470
+
471
+ <p>
472
+ Welcome to our help center! Here you can find important
473
+ information about the product, customer support, payments,
474
+ security and available features.
475
+ </p>
476
+
477
+ <p>
478
+ Our goal is to make your experience simple, fast and secure.
479
+ Browse the sections below to find the information you need.
480
+ </p>
481
+
482
+ <hr />
483
+ <br>
484
+
485
+ <h2>1. General information</h2>
486
+
487
+ <h3>What is this product?</h3>
488
+ <p>
489
+ Our platform was designed to provide a practical and intuitive
490
+ experience, allowing you to access the main features in one place.
491
+ </p>
492
+
493
+ <h3>How do I get started?</h3>
494
+ <p>
495
+ Access your account, review the available features and follow
496
+ the instructions provided at each step.
497
+ </p>
498
+
499
+ <h3>Do I need to install an application?</h3>
500
+ <p>
501
+ Access requirements depend on the product version.
502
+ Check our official channels for more information.
503
+ </p>
504
+
505
+ <hr />
506
+ <br>
507
+
508
+ <h2>2. Account and registration</h2>
509
+
510
+ <h3>How do I register?</h3>
511
+ <p>
512
+ Select the registration option on the home screen,
513
+ enter the requested information and follow the instructions.
514
+ </p>
515
+
516
+ <h3>I forgot my password. What should I do?</h3>
517
+ <p>
518
+ Use the password recovery option on the login screen
519
+ to receive instructions for resetting your credentials.
520
+ </p>
521
+
522
+ <h3>Can I update my information?</h3>
523
+ <p>
524
+ Yes. If available, access your account settings
525
+ to review and update your personal information.
526
+ </p>
527
+
528
+ <h3>How can I close my account?</h3>
529
+ <p>
530
+ Contact our support team to receive instructions
531
+ about the account closure process.
532
+ </p>
533
+
534
+ <hr />
535
+ <br>
536
+
537
+ <h2>3. Customer support</h2>
538
+
539
+ <h3>What are your support hours?</h3>
540
+ <ul>
541
+ <li>Monday to Friday: 9am to 6pm.</li>
542
+ <li>Weekends and holidays: subject to availability.</li>
543
+ </ul>
544
+
545
+ <h3>Which support channels are available?</h3>
546
+ <ul>
547
+ <li>Live chat.</li>
548
+ <li>Phone support.</li>
549
+ <li>Help center.</li>
550
+ <li>Other official platform channels.</li>
551
+ </ul>
552
+
553
+ <h3>How long does it take to receive a response?</h3>
554
+ <p>
555
+ Response times may vary depending on request volume
556
+ and the complexity of the issue.
557
+ </p>
558
+
559
+ <h3>How can I follow up on a request?</h3>
560
+ <p>
561
+ If you received a support ticket number,
562
+ provide it when contacting our team again.
563
+ </p>
564
+
565
+ <hr />
566
+ <br>
567
+
568
+ <h2>4. Payments and billing</h2>
569
+
570
+ <h3>Which payment methods are available?</h3>
571
+ <p>
572
+ Available payment methods depend on the features
573
+ enabled for your product.
574
+ </p>
575
+
576
+ <h3>How can I check my charges?</h3>
577
+ <p>
578
+ Access the financial section or transaction history,
579
+ if available in your account.
580
+ </p>
581
+
582
+ <h3>What if I find an incorrect charge?</h3>
583
+ <p>
584
+ Contact support with the transaction date, amount
585
+ and payment receipt whenever possible.
586
+ </p>
587
+
588
+ <hr />
589
+ <br>
590
+
591
+ <h2>5. Security and privacy</h2>
592
+
593
+ <h3>Is my information protected?</h3>
594
+ <p>
595
+ Information protection must follow the security
596
+ and privacy policies applicable to the product.
597
+ </p>
598
+
599
+ <h3>How can I keep my account secure?</h3>
600
+ <ul>
601
+ <li>Use a strong and unique password.</li>
602
+ <li>Never share your login credentials.</li>
603
+ <li>Avoid unknown devices.</li>
604
+ <li>Be careful with suspicious messages and links.</li>
605
+ <li>Keep your contact information updated.</li>
606
+ </ul>
607
+
608
+ <h3>What should I do if I notice suspicious activity?</h3>
609
+ <p>
610
+ Contact our support team immediately and report
611
+ any activity you do not recognize.
612
+ </p>
613
+
614
+ <hr />
615
+ <br>
616
+
617
+ <h2>6. Technical issues</h2>
618
+
619
+ <h3>The platform is not working properly. What should I do?</h3>
620
+ <ol>
621
+ <li>Refresh the page or restart the application.</li>
622
+ <li>Check your internet connection.</li>
623
+ <li>Make sure you are using the latest version.</li>
624
+ <li>Try again after a few moments.</li>
625
+ <li>Contact support if the issue continues.</li>
626
+ </ol>
627
+
628
+ <h3>I cannot access my account.</h3>
629
+ <p>
630
+ Check your credentials and internet connection.
631
+ Use the account recovery option if necessary.
632
+ </p>
633
+
634
+ <h3>How do I report a technical issue?</h3>
635
+ <p>
636
+ Describe the problem, indicate where it occurred
637
+ and provide a screenshot if possible.
638
+ </p>
639
+
640
+ <hr />
641
+ <br>
642
+
643
+ <h2>7. Useful links</h2>
644
+
645
+ <ul>
646
+ <li><a href="/regras/atendimento">Customer support</a></li>
647
+ <li><a href="/regras/privacidade">Privacy policy</a></li>
648
+ <li><a href="/regras/termos">Terms of use</a></li>
649
+ <li><a href="/regras/conta">Account management</a></li>
650
+ </ul>
651
+
652
+ <hr />
653
+ <br>
654
+
655
+ <h2>8. Need additional help?</h2>
656
+
657
+ <p>
658
+ Could not find the answer you were looking for?
659
+ Our team is ready to help.
660
+ </p>
661
+
662
+ <p>
663
+ Contact us through our official support channels
664
+ and explain your needs.
665
+ </p>
666
+
667
+ <p><strong>We are here to help!</strong></p>
668
+ `,"es-ES":`
669
+ <h2>¿Cómo podemos ayudarte?</h2>
670
+
671
+ <p>
672
+ ¡Te damos la bienvenida a nuestro centro de ayuda!
673
+ Aquí encontrarás información sobre el producto,
674
+ atención al cliente, pagos, seguridad y funcionalidades.
675
+ </p>
676
+
677
+ <p>
678
+ Nuestro objetivo es ofrecerte una experiencia sencilla,
679
+ rápida y segura. Consulta las siguientes secciones
680
+ para encontrar la información que necesitas.
681
+ </p>
682
+
683
+ <hr />
684
+ <br>
685
+
686
+ <h2>1. Información general</h2>
687
+
688
+ <h3>¿Qué es este producto?</h3>
689
+ <p>
690
+ Nuestra plataforma ha sido diseñada para ofrecer
691
+ una experiencia práctica e intuitiva, permitiéndote
692
+ acceder a las principales funcionalidades desde un solo lugar.
693
+ </p>
694
+
695
+ <h3>¿Cómo puedo empezar?</h3>
696
+ <p>
697
+ Accede a tu cuenta, consulta las funcionalidades disponibles
698
+ y sigue las instrucciones de cada paso.
699
+ </p>
700
+
701
+ <h3>¿Necesito instalar una aplicación?</h3>
702
+ <p>
703
+ Los requisitos de acceso dependen de la versión del producto.
704
+ Consulta nuestros canales oficiales para obtener más información.
705
+ </p>
706
+
707
+ <hr />
708
+ <br>
709
+
710
+ <h2>2. Cuenta y registro</h2>
711
+
712
+ <h3>¿Cómo puedo registrarme?</h3>
713
+ <p>
714
+ Selecciona la opción de registro en la pantalla principal,
715
+ introduce los datos solicitados y sigue las instrucciones.
716
+ </p>
717
+
718
+ <h3>He olvidado mi contraseña. ¿Qué debo hacer?</h3>
719
+ <p>
720
+ Utiliza la opción de recuperación de contraseña
721
+ disponible en la pantalla de acceso.
722
+ </p>
723
+
724
+ <h3>¿Puedo actualizar mis datos?</h3>
725
+ <p>
726
+ Sí. Si está disponible, accede a la configuración
727
+ de tu cuenta para revisar y actualizar tus datos personales.
728
+ </p>
729
+
730
+ <h3>¿Cómo puedo cerrar mi cuenta?</h3>
731
+ <p>
732
+ Ponte en contacto con nuestro equipo de atención
733
+ para recibir instrucciones sobre el procedimiento.
734
+ </p>
735
+
736
+ <hr />
737
+ <br>
738
+
739
+ <h2>3. Atención al cliente</h2>
740
+
741
+ <h3>¿Cuál es el horario de atención?</h3>
742
+ <ul>
743
+ <li>De lunes a viernes: de 9h a 18h.</li>
744
+ <li>Fines de semana y festivos: según disponibilidad.</li>
745
+ </ul>
746
+
747
+ <h3>¿Qué canales de atención están disponibles?</h3>
748
+ <ul>
749
+ <li>Chat de atención.</li>
750
+ <li>Atención telefónica.</li>
751
+ <li>Centro de ayuda.</li>
752
+ <li>Otros canales oficiales de la plataforma.</li>
753
+ </ul>
754
+
755
+ <h3>¿Cuánto tarda en llegar una respuesta?</h3>
756
+ <p>
757
+ El tiempo de respuesta puede variar según el volumen
758
+ de solicitudes y la complejidad de cada consulta.
759
+ </p>
760
+
761
+ <h3>¿Cómo puedo consultar mi solicitud?</h3>
762
+ <p>
763
+ Si has recibido un número de protocolo,
764
+ facilítalo cuando vuelvas a contactar con nuestro equipo.
765
+ </p>
766
+
767
+ <hr />
768
+ <br>
769
+
770
+ <h2>4. Pagos y facturación</h2>
771
+
772
+ <h3>¿Qué métodos de pago están disponibles?</h3>
773
+ <p>
774
+ Los métodos disponibles dependen de las funcionalidades
775
+ habilitadas en el producto.
776
+ </p>
777
+
778
+ <h3>¿Cómo puedo consultar mis cargos?</h3>
779
+ <p>
780
+ Accede al apartado financiero o al historial
781
+ de transacciones, si está disponible.
782
+ </p>
783
+
784
+ <h3>¿Qué hago si encuentro un cargo incorrecto?</h3>
785
+ <p>
786
+ Contacta con atención al cliente e informa de la fecha,
787
+ el importe y el justificante de pago, si lo tienes.
788
+ </p>
789
+
790
+ <hr />
791
+ <br>
792
+
793
+ <h2>5. Seguridad y privacidad</h2>
794
+
795
+ <h3>¿Están protegidos mis datos?</h3>
796
+ <p>
797
+ La protección de la información debe cumplir
798
+ las políticas de seguridad y privacidad aplicables al producto.
799
+ </p>
800
+
801
+ <h3>¿Cómo puedo proteger mi cuenta?</h3>
802
+ <ul>
803
+ <li>Utiliza una contraseña segura y exclusiva.</li>
804
+ <li>No compartas tus credenciales.</li>
805
+ <li>Evita utilizar dispositivos desconocidos.</li>
806
+ <li>Desconfía de mensajes y enlaces sospechosos.</li>
807
+ <li>Mantén actualizados tus datos de contacto.</li>
808
+ </ul>
809
+
810
+ <h3>¿Qué hago si detecto actividad sospechosa?</h3>
811
+ <p>
812
+ Contacta inmediatamente con nuestro equipo de atención
813
+ e informa de cualquier actividad que no reconozcas.
814
+ </p>
815
+
816
+ <hr />
817
+ <br>
818
+
819
+ <h2>6. Problemas técnicos</h2>
820
+
821
+ <h3>La plataforma no funciona correctamente. ¿Qué hago?</h3>
822
+ <ol>
823
+ <li>Actualiza la página o reinicia la aplicación.</li>
824
+ <li>Comprueba tu conexión a Internet.</li>
825
+ <li>Verifica que utilizas la versión más reciente.</li>
826
+ <li>Inténtalo de nuevo después de unos minutos.</li>
827
+ <li>Contacta con soporte si el problema continúa.</li>
828
+ </ol>
829
+
830
+ <h3>No puedo acceder a mi cuenta.</h3>
831
+ <p>
832
+ Comprueba tus credenciales y tu conexión.
833
+ Utiliza la opción de recuperación si es necesario.
834
+ </p>
835
+
836
+ <h3>¿Cómo puedo informar de un error?</h3>
837
+ <p>
838
+ Describe el problema, indica dónde se ha producido
839
+ y adjunta una captura de pantalla si es posible.
840
+ </p>
841
+
842
+ <hr />
843
+ <br>
844
+
845
+ <h2>7. Enlaces útiles</h2>
846
+
847
+ <ul>
848
+ <li><a href="/regras/atendimento">Atención al cliente</a></li>
849
+ <li><a href="/regras/privacidade">Política de privacidad</a></li>
850
+ <li><a href="/regras/termos">Términos de uso</a></li>
851
+ <li><a href="/regras/conta">Gestión de la cuenta</a></li>
852
+ </ul>
853
+
854
+ <hr />
855
+ <br>
856
+
857
+ <h2>8. ¿Necesitas más ayuda?</h2>
858
+
859
+ <p>
860
+ ¿No has encontrado la respuesta que buscabas?
861
+ Nuestro equipo está preparado para ayudarte.
862
+ </p>
863
+
864
+ <p>
865
+ Ponte en contacto con nosotros a través
866
+ de nuestros canales oficiales de atención.
867
+ </p>
868
+
869
+ <p><strong>¡Estamos aquí para ayudarte!</strong></p>
870
+ `}}}}),Ko={id:Qs,rules:[ut,ct,dt,mo,Le,bt],edges:{[bt.id]:[ue("a4d9ac3b-2212-46f6-afba-467b884b238d",ut.id),ue("83c40bab-2126-450d-8556-a1c052a8efdb",ct.id),ue("88435327-78cd-49bc-9f9d-37c764bc2091",dt.id),ue("c1e8f4a2-9b7d-4e6a-8f3c-2d5a1b0e7c94",Le.id)],[Le.id]:[ue("d4a2b9c1-6e8f-4a7b-9c2d-1f0e5a8b3c76",ut.id),ue("e5b3c0d2-7f9a-4b8c-0d3e-2a1f6b9c4d87",ct.id)],[dt.id]:[ue("27af113a-047e-4410-8d90-2f024c7a7fc5",mo.id)]}},Xs=Le,Ys=bt,Js=t=>Ko.rules.find(o=>o.id===t),ei={configurations:{alias:"Slack Suporte",general:{defaultBehavior:"inactive",language:"pt-BR",isClosable:!0},appearance:{theme:"dark",primaryColor:"#141e3e"},anchor:{label:"Fale conosco",size:"medium",logo:"https://svgl.app/library/slack.svg",position:"bottom-right",offset:{x:16,y:16}}}},ti={install:t=>{t.use(js),t.component("AppIdentificationPage",Ct),t.component("AppFormTextInput",kt),t.component("AppWidgetAnchor",Bt),t.component("AppArticlePage",$t),t.component("AppServicePage",St),t.component("AppScreenPage",Vt),t.component("AppWidgetView",At),t.component("AppTextInput",Co),t.component("AppCarousel",je),t.component("AppAudioPlayer",Te),t.component("AppSkeleton",_t),t.component("AppMessage",De),t.component("AppWidget",Bo),t.component("AppButton",O),t.component("AppEmpty",Nt),t.component("AppGroup",L),t.component("AppEdge",we),t.component("AppIcon",T),t.component("AppText",E)}};exports.AppArticlePage=$t;exports.AppAudioPlayer=Te;exports.AppButton=O;exports.AppCarousel=je;exports.AppEdge=we;exports.AppEmpty=Nt;exports.AppFormTextInput=kt;exports.AppGroup=L;exports.AppIcon=T;exports.AppIdentificationPage=Ct;exports.AppMessage=De;exports.AppScreenPage=Vt;exports.AppServicePage=St;exports.AppSkeleton=_t;exports.AppText=E;exports.AppTextInput=Co;exports.AppWidget=Bo;exports.AppWidgetAnchor=Bt;exports.AppWidgetView=At;exports.ServiceChatMessageBuilder=Lt;exports.ServiceChatMessageVO=Ve;exports.default=ti;exports.demoArticleRule=Xs;exports.demoRootRule=Ys;exports.demoWidgetConfig=ei;exports.demoWorkflow=Ko;exports.findDemoRuleById=Js;exports.useAppWidget=de;exports.useChatService=wo;exports.useServicePage=ho;exports.useVoiceService=fo;