@opens/widget-ui 1.4.3 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-widget-anchor.vue.d.ts.map +1 -0
- package/dist/components/messages/app-message-link-preview.vue.d.ts +12 -0
- package/dist/messages/app-message-link-preview.vue.d.ts +4 -0
- package/dist/messages/app-message-link-preview.vue.d.ts.map +1 -0
- package/dist/pages/app-article-page.vue.d.ts.map +1 -0
- package/dist/pages/app-identification-page.vue.d.ts.map +1 -0
- package/dist/pages/app-screen-page.vue.d.ts.map +1 -0
- package/dist/yunique_widget_ui.cjs.js +6 -2
- package/dist/yunique_widget_ui.css +1 -1
- package/dist/yunique_widget_ui.es.js +4194 -2639
- package/dist/yunique_widget_ui.umd.js +7 -3
- package/package.json +3 -1
- package/dist/app-article-page.vue.d.ts.map +0 -1
- package/dist/app-identification-page.vue.d.ts.map +0 -1
- package/dist/app-screen-page.vue.d.ts.map +0 -1
- package/dist/widget/app-widget-anchor.vue.d.ts.map +0 -1
- /package/dist/{widget/app-widget-anchor.vue.d.ts → app-widget-anchor.vue.d.ts} +0 -0
- /package/dist/{app-article-page.vue.d.ts → pages/app-article-page.vue.d.ts} +0 -0
- /package/dist/{app-identification-page.vue.d.ts → pages/app-identification-page.vue.d.ts} +0 -0
- /package/dist/{app-screen-page.vue.d.ts → pages/app-screen-page.vue.d.ts} +0 -0
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");function Vn(){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 ko(){return{}}const _t=t=>t.from==="system"||t.from==="operator"||t.from==="contact"?t.from:t.provider?t.provider==="opens"?"operator":"contact":"system",We=t=>{const o=t.attachments?.data;return Array.isArray(o)?o:[]},ne=t=>We(t)[0],Co=t=>typeof t.caption=="string"?t.caption.trim():"",Sn=t=>t.messageBody?.trim()??"",Tn=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"})},Bo=t=>t.type==="document"&&t.filename.toLowerCase().endsWith(".pdf"),An=(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}},Le=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}=An(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}},En=(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)},Pn=t=>!!(t&&t.messageType==="image"&&!Co(t)),Mn=(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,from:r.from,messageType:"_grouped_images",messageBody:"",createdAt:r.createdAt,canBeInteractedWith:!1,messages:[...n]})}n=[]}};for(const r of t){if(!Pn(r)){a(),o.push(r);continue}if(!n.length){n.push(r);continue}const s=n[n.length-1];if(s.from===r.from&&En(s.createdAt,r.createdAt)){n.push(r);continue}a(),n.push(r)}return a(),o},Rn=t=>t?.data?.length?{data:t.data.map(o=>({...o}))}:null,zn=t=>t?.map(o=>wt(o)),wt=t=>({...t,from:_t(t),caption:t.caption??null,attachments:Rn(t.attachments),...t.messages?{messages:zn(t.messages)}:{}});class fe{payload;constructor(o){this.payload=wt(o)}static fromJSON(o){return new fe(o)}static toJSON(o){return wt(o.payload)}toJSON(){return fe.toJSON(this)}get from(){return _t(this.payload)}get isSystemLike(){return this.from==="system"}get attachments(){return We(this.payload)}get primaryAttachment(){return ne(this.payload)}}const Dn=["canBeInteractedWith","recipientId","chatRoomId","companyId","createdAt","provider","id"],Ln=t=>{const o={};for(const n of Dn)t[n]!==void 0&&(o[n]=t[n]);return o},qt=(t,o="")=>typeof t=="string"?t:t==null?o:String(t);class Nt{payload={messageType:"text",messageBody:""};constructor(){}static create(){return new Nt}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,...Ln(o),messageType:qt(o.messageType,"text")||"text",messageBody:qt(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 fe.fromJSON({...this.payload,messageType:this.payload.messageType||"text",messageBody:this.payload.messageBody??"",attachments:this.payload.attachments??null})}}const at=e.ref([]),rt=e.ref([]),On=e.ref(""),In=e.shallowRef([]),Fn=e.shallowRef(null),Hn=e.ref(!1),jn=e.ref(!1),Wn=e.ref(!1),Un=e.ref(!1),qn=e.ref(!1),Pe=t=>fe.fromJSON(t).toJSON();function _o(){const t=s=>{at.value.push(Pe(s))},o=s=>{at.value=s.map(Pe)};return{unreadMessagesCount:e.computed(()=>rt.value.length),isSendingMessage:Hn,isErrorLoading:jn,attachments:In,isFinished:Wn,isLoading:Un,messages:at,isTyping:qn,audio:Fn,text:On,setUnreadMessages:s=>{rt.value=s.map(Pe)},addUnreadMessage:s=>{rt.value.push(Pe(s))},setMessages:o,addMessage:t}}function No(){const t=_o(),o=ko();return{chat:t,voice:o}}const st=e.ref(!1),be=e.ref([]),it=e.ref(void 0),ee=e.ref(void 0),lt=e.ref(void 0),ht=e.ref(void 0),$o=t=>!!(t?.logo?.trim()||t?.title?.trim()||t?.subtitle?.trim()),Gt=t=>{!t||!$o(t)||(ht.value={...t})},ce=()=>{const t=m=>{const g=new Set(Object.values(m.edges??{}).flatMap(k=>k.map(B=>B.nextRuleId)));return m.rules.find(k=>!g.has(k.id))??m.rules[0]},o=(m,g)=>{const k=new Map(m.rules.map(B=>[B.id,B]));return(m.edges[g]??[]).flatMap(B=>{const T=k.get(B.nextRuleId);return T?[T]:[]})},n=e.computed(()=>new Map((ee.value?.rules??[]).map(m=>[m.id,m]))),a=e.computed(()=>ee.value?t(ee.value):void 0),r=e.computed(()=>{const m=it.value;return m&&n.value.get(m)||a.value}),s=e.computed(()=>!ee.value||!r.value?[]:o(ee.value,r.value.id)),i=e.computed(()=>{const m=r.value?.settings?.header;return $o(m)?m:ht.value}),l=e.computed(()=>lt.value?.configurations.general.language??"pt-BR"),u=No();return{currentRuleId:it,currentHeader:i,currentRule:r,rootRule:a,workflow:ee,language:l,history:be,isOpen:st,config:lt,edges:s,open:()=>{st.value=!0},close:()=>{st.value=!1},setCurrentRuleId:m=>{it.value=m,Gt(r.value?.settings?.header)},clearHistory:()=>{be.value=[]},setWorkflow:m=>{ee.value?.id!==m?.id&&(ht.value=void 0),ee.value=m,Gt(r.value?.settings?.header)},setConfig:m=>{lt.value=m},pushHistory:m=>{be.value.push(m)},setHistory:m=>{be.value=[...m]},popHistory:()=>be.value.pop(),...u}},pe=t=>t==="name",Zt=t=>!!t?.trim(),Gn=t=>{const o=t.filter(a=>pe(a.name)),n=t.filter(a=>!pe(a.name));return[...o,...n]};function Zn(t,o){const{maskPhone:n,maskCpf:a}=Vn(),{history:r}=ce(),s=e.ref(0),i=e.ref("forward"),l=e.ref(null),u=e.computed(()=>{const _=e.toValue(t),P=_.settings?.form&&_.settings.form.fields||[];return Gn(P)}),c=e.reactive(Object.fromEntries(u.value.map(_=>[_.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),h=e.computed(()=>i.value==="back"?"step-back":"step-forward");e.watch(s,async()=>{await e.nextTick();const _=l.value;if(!_)return;(_.querySelector(".is-active input")??_.querySelector("input"))?.focus({preventScroll:!0})});const w=e.computed(()=>u.value.every(_=>!_.required||Zt(c[_.name]))),y=_=>{const P=u.value[_];return P?P.required&&!Zt(c[P.name])?!1:_>=u.value.length-1?w.value:!0:w.value},v=e.computed(()=>y(s.value)),x=e.computed(()=>{const _=u.value.find(P=>pe(P.name));return _?c[_.name]?.trim().split(/\s+/)[0]??"":""}),m=_=>{const P=u.value[_],z=x.value,I=u.value.length?`Passo ${_+1} de ${u.value.length}`:"",H=e.toValue(t),j=_>=u.value.length-1;if(!P)return{eyebrow:I,title:H.settings?.body?.title??H.name??"",subtitle:H.settings?.body?.subtitle??""};if(pe(P.name))return{eyebrow:I,title:"Como podemos te chamar?",subtitle:"Primeiro, nos diga o seu nome."};const F=j?z?`Quase lá, ${z}.`:"Quase lá.":z?`Olá, ${z}.`:"Olá.",W=P.required?`Informe seu ${P.label} para continuar.`:`Gostaria de deixar seu ${P.label}?`;return{eyebrow:I,title:F,subtitle:W}},g=e.computed(()=>m(s.value)),k=_=>_==="email"?"email":_==="phone"?"tel":"text",B=_=>_==="email"?"email":_==="phone"?"call":pe(_)?"person":_==="order"?"receipt":"badge",T=_=>_.required?`${_.label} *`:_.label,E=_=>pe(_.name)?"Seu nome":_.name==="phone"?"Seu telefone":_.name==="email"?"Seu e-mail":_.name==="cpf"?"000.000.000-00":_.placeholder||_.label,N=_=>{if(_==="phone")return n;if(_==="cpf")return a},$=()=>{w.value&&o("submit",{...c})};return{stepTransition:h,currentField:f,canContinue:v,currentStep:s,isLastStep:d,stepIntro:g,fieldHost:l,showBack:p,fields:u,form:c,continueStep:()=>{if(v.value){if(d.value||u.value.length===0)return $();i.value="forward",s.value+=1}},canContinueAt:y,introFor:m,fieldLabel:T,fieldPlaceholder:E,fieldType:k,fieldMask:N,fieldIcon:B,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 Qn(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 Kn=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}=Qn("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))}}),ge=(t,o)=>{const n=t.__vccOpts||t;for(const[a,r]of o)n[a]=r;return n},A=ge(Kn,[["__scopeId","data-v-5fc0fe9d"]]),D=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(h,w)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-flex",p.value])},[e.renderSlot(h.$slots,"default")],2))}}),Xn={class:"wu-flex wu-flex-col wu-items-stretch wu-w-full wu-cursor-text wu-gap-1","data-testid":"app-form-text-input"},Yn=["value","type","placeholder","disabled","maxlength","aria-invalid"],$t=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(v){return!!s.value[v]}const l=e.ref(""),u=e.ref(!1);function c(v){if(!a.maskFunction)return v;try{const x=a.maskFunction(v);return typeof x=="string"?x:v}catch{return v}}e.watch(()=>a.modelValue,v=>{if(v==null){l.value="";return}l.value=a.maskFunction?c(v):v},{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"),h=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 y(v){const m=v.target.value;l.value=a.maskFunction?c(m):m,r("update:modelValue",l.value)}return o({focus:u,content:l}),(v,x)=>(e.openBlock(),e.createBlock(D,{class:e.normalizeClass([e.unref(f),w.value]),col:"","gap-none":""},{default:e.withCtx(()=>[e.createElementVNode("label",Xn,[i("default")?(e.openBlock(),e.createBlock(A,{key:0,small:"",gray:"",class:e.normalizeClass([d.value])},{default:e.withCtx(()=>[e.renderSlot(v.$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:y,onFocus:x[0]||(x[0]=m=>u.value=!0),onBlur:x[1]||(x[1]=m=>u.value=!1),onKeyup:x[2]||(x[2]=e.withKeys(m=>r("keyup-enter"),["enter"]))},null,42,Yn)]),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"]))}});function Jn(t){const o=e.computed(()=>t.fit?"wu-h-auto wu-min-h-0":t.small?"!wu-h-8 !wu-min-h-[2rem]":""),n=e.computed(()=>"!wu-text-xs"),a=e.computed(()=>t.fit?"wu-px-3 wu-py-2":t.small?"wu-px-[0.625rem]":"wu-p-[0.9rem]"),r=e.computed(()=>t.fluid?"!wu-w-full":t.fit?"wu-w-fit wu-max-w-full":"wu-w-fit");return{height:o,textSize:n,padding:a,width:r}}const S=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))}}),ea=["disabled"],ta={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,fit: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(w){return!!n.value[w]}const{height:r,textSize:s,padding:i,width:l}=Jn(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":o.fit?"wu-justify-start wu-text-left":"wu-justify-between"),p=e.computed(()=>o.fit?"wu-leading-snug [overflow-wrap:anywhere]":""),h=e.computed(()=>o.disabled||o.loading?"wu-opacity-50 wu-pointer-events-none":"");return(w,y)=>(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),h.value,f.value,d.value,p.value]]),type:"button",disabled:t.disabled||t.loading,"data-testid":"app-button",onClick:y[0]||(y[0]=v=>w.$emit("click",v))},[e.createElementVNode("div",ta,[t.loading?(e.openBlock(),e.createBlock(S,{key:0,class:"wu-animate-spin wu-flex wu-items-center wu-justify-center",small:"",outlined:""},{default:e.withCtx(()=>[...y[1]||(y[1]=[e.createTextVNode("progress_activity",-1)])]),_:1})):a("icon")?(e.openBlock(),e.createBlock(S,{key:1,small:""},{default:e.withCtx(()=>[e.renderSlot(w.$slots,"icon")]),_:3})):e.createCommentVNode("",!0),!t.loading&&a("default")?(e.openBlock(),e.createBlock(A,{key:2,class:"!wu-text-inherit",small:""},{default:e.withCtx(()=>[e.renderSlot(w.$slots,"default")]),_:3})):e.createCommentVNode("",!0)]),!t.loading&&a("trailing")?(e.openBlock(),e.createBlock(S,{key:0,small:""},{default:e.withCtx(()=>[e.renderSlot(w.$slots,"trailing")]),_:3})):e.createCommentVNode("",!0)],10,ea))}}),oa=["aria-hidden"],na=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)),h=()=>(s.default?.()??[]).flatMap(N=>N.type===e.Comment||N.type===e.Text?[]:N.type===e.Fragment?(N.children??[]).filter($=>!!$&&typeof $=="object"&&$.type!==e.Comment&&$.type!==e.Text):[N]),w=N=>{const $=Math.abs(N-p.value);return $===0?"is-active":$===1?"is-adjacent":"is-far"},y=N=>{const $=l.value?.childElementCount||h().length,V=Math.min(Math.max(N,0),Math.max($-1,0));V!==a.modelValue&&r("update:modelValue",V)},v=()=>{const N=i.value;N&&(N.scrollLeft&&(N.scrollLeft=0),N.scrollTop&&(N.scrollTop=0))},x=(N,$)=>{const V=getComputedStyle(N)[$].trim(),R=parseFloat(V);if(!Number.isFinite(R)||R<=0)return 0;if(V.endsWith("%")){const _=$==="scrollPaddingTop"?N.clientHeight:N.clientWidth;return R/100*_}return R},m=()=>{const N=i.value,$=l.value;if(!N||!$)return;v();const V=[...$.children],R=parseFloat(getComputedStyle($).gap)||0,_=a.vertical?"scrollPaddingTop":"scrollPaddingLeft",P=x(N,_),z=F=>a.vertical?F.offsetHeight:F.offsetWidth,I=V[p.value]?z(V[p.value]):0,H=a.vertical&&a.fill?Math.max((N.clientHeight-I)/2,0):P,j=V.slice(0,p.value).reduce((F,W)=>F+z(W)+R,0);u.value=H-j,c.value=a.vertical&&!a.fill?I+P*2:0,f.value=!0},g=()=>{d?.disconnect();const N=i.value,$=l.value;if(!(!N||!$)&&(m(),!(typeof ResizeObserver>"u"))){if(d=new ResizeObserver(m),d.observe(N),a.vertical)for(const V of $.children)d.observe(V);N.removeEventListener("scroll",v),N.addEventListener("scroll",v,{passive:!0})}},k=e.computed(()=>[a.vertical?"wu-carousel--vertical":"wu-carousel--horizontal",{"is-ready":f.value,"wu-carousel--fill":a.fill}]),B=e.computed(()=>a.vertical?"wu-flex-col wu-items-stretch":"wu-flex-row wu-items-center"),T=e.computed(()=>{if(!(!a.vertical||a.fill||!c.value))return{height:`${c.value}px`}}),E=e.computed(()=>{const N=`${u.value}px`;return{transform:a.vertical?`translate3d(0, ${N}, 0)`:`translate3d(${N}, 0, 0)`}});return e.watch(()=>[a.vertical,a.fill,a.modelValue],async()=>{await e.nextTick(),g()}),e.onMounted(async()=>{await e.nextTick(),g()}),e.onBeforeUnmount(()=>{d?.disconnect(),i.value?.removeEventListener("scroll",v)}),o({next:()=>y(p.value+1),prev:()=>y(p.value-1),goTo:y}),(N,$)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-relative wu-w-full wu-overflow-hidden",k.value]),ref_key:"rootRef",ref:i,"data-testid":"app-carousel",style:e.normalizeStyle(T.value)},[e.createElementVNode("div",{class:e.normalizeClass(["wu-carousel-track wu-flex",B.value]),ref_key:"trackRef",ref:l,style:e.normalizeStyle(E.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h(),(V,R)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-carousel-slide",w(R)]),key:V.key??R,"aria-hidden":R!==p.value,"data-testid":"app-carousel-slide"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(V)))],10,oa))),128))],6)],6))}}),Ue=ge(na,[["__scopeId","data-v-96f06600"]]),aa={class:"wu-flex wu-flex-col wu-w-full wu-h-full"},ra={class:"wu-relative wu-flex wu-items-center wu-w-full wu-shrink-0"},sa={class:"wu-flex wu-shrink-0 wu-items-center wu-w-fit wu-justify-center wu-px-6 wu-py-4"},ia={class:"wu-absolute wu-inset-0 wu-flex wu-items-center wu-justify-center wu-pointer-events-none"},la={class:"wu-flex wu-items-center wu-gap-1.5"},Vt=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:h,fieldMask:w,goBack:y}=Zn(()=>n.rule,a);return(v,x)=>(e.openBlock(),e.createElementBlock("div",aa,[e.createElementVNode("div",ra,[e.createElementVNode("div",sa,[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:x[0]||(x[0]=(...m)=>e.unref(y)&&e.unref(y)(...m))},[e.createVNode(S,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200",small:"",gray:""},{default:e.withCtx(()=>[...x[2]||(x[2]=[e.createTextVNode("chevron_left",-1)])]),_:1}),e.createVNode(A,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200","extra-small":"",medium:"",gray:""},{default:e.withCtx(()=>[...x[3]||(x[3]=[e.createTextVNode("Voltar",-1)])]),_:1})],2)]),e.createElementVNode("div",ia,[e.createElementVNode("div",la,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(m,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-h-1 wu-w-6 wu-rounded-full wu-transition-colors",g<=e.unref(r)?"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(r),"onUpdate:modelValue":x[1]||(x[1]=m=>e.isRef(r)?r.value=m:null),vertical:"",fill:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(m,g)=>(e.openBlock(),e.createBlock(D,{class:"wu-w-full wu-gap-8",key:m.name,col:"",center:""},{default:e.withCtx(()=>[e.createVNode(D,{class:"wu-w-full wu-relative wu-pr-6",col:"","gap-sm":""},{default:e.withCtx(()=>[e.unref(d)(g).title?(e.openBlock(),e.createBlock(A,{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(A,{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(A,{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(D,{class:"wu-w-full wu-items-center",col:"","gap-md":""},{default:e.withCtx(()=>[e.createVNode($t,{modelValue:e.unref(u)[m.name],"onUpdate:modelValue":k=>e.unref(u)[m.name]=k,"mask-function":e.unref(w)(m.name),placeholder:e.unref(p)(m),type:e.unref(h)(m.name),onKeyupEnter:e.unref(c),fluid:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.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(()=>[...x[4]||(x[4]=[e.createTextVNode("arrow_forward",-1)])]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g>=e.unref(l).length-1?"Finalizar":"Continuar"),1)]),_:2},1032,["disabled","onClick"])]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["modelValue"])],512)]))}}),ua=["disabled"],ca=["src"],St=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(S,{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,ca)):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createBlock(A,{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,ua))}}),da="widgets",pa={"widget-identification-screen":"assignment","widget-base-screen":"desktop_windows","widget-article-screen":"description","widget-service-screen":"chat"},Qt={chat:"chat",voice:"phone_in_talk"},ma=t=>{if(t.action==="widget-service-screen"){const o=t.settings?.behavior;if(o&&o in Qt)return Qt[o]}return pa[t.action]??da},fa={key:0,class:"wu-flex wu-flex-col wu-items-center wu-gap-2","data-testid":"app-edge"},wa=["src"],ha={key:1,class:"wu-w-full wu-max-w-[25rem]","data-testid":"app-edge"},ga=["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(()=>ma(n.edge));return(i,l)=>t.icon?(e.openBlock(),e.createElementBlock("div",fa,[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,wa)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(s.value),1)],64))]),_:1}),e.createVNode(A,{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",ha,[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,ga)):(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})]))}}),va={class:"wu-flex wu-flex-col wu-w-full wu-gap-8"},ya={key:0,class:"wu-flex wu-items-center wu-w-fit wu-justify-center wu-h-0"},xa=["innerHTML"],ba={key:2,class:"wu-flex wu-flex-col wu-items-center wu-justify-start wu-gap-2 wu-px-6 wu-w-full"},ka=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}=ce(),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=h=>{if(!h)return"";const w=s.value;return h[w]??h["pt-BR"]??Object.values(h).find(Boolean)??""},p=e.computed(()=>d(f.value?.content));return(h,w)=>(e.openBlock(),e.createElementBlock("div",va,[i.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ya)),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,xa)):e.createCommentVNode("",!0),l.value.length?(e.openBlock(),e.createElementBlock("div",ba,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,y=>(e.openBlock(),e.createBlock(we,{key:y.id,edge:y,onClick:w[0]||(w[0]=v=>a("edge-click",v))},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,y=>(e.openBlock(),e.createBlock(we,{key:y.id,edge:y,icon:"",onClick:w[1]||(w[1]=v=>a("edge-click",v))},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))]))}}),Tt=ge(ka,[["__scopeId","data-v-54b98051"]]),Ca=120,Ba=()=>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",_a=t=>t.includes("mp4")?"m4a":"webm",Kt=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 m=Math.floor(o.value/60),g=o.value%60;return`${Kt(m)}:${Kt(g)}`}),d=()=>{i&&(clearInterval(i),i=null)},p=()=>{r?.getTracks().forEach(m=>m.stop()),r=null},h=()=>{d(),p(),a=null,s=[],o.value=0,t.value=!1},w=()=>{if(!s.length)return null;const m=l.split(";")[0]||"audio/webm",g=new Blob(s,{type:m});return new File([g],`recording.${_a(m)}`,{type:m})},y=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=Ba(),s=[],a=new MediaRecorder(r,{mimeType:l}),a.ondataavailable=m=>{m.data.size>0&&s.push(m.data)},a.onstop=()=>{const m=u?null:w(),g=c;c=null,u=!1,h(),g?.(m)},a.start(),t.value=!0,o.value=0,i=setInterval(()=>{o.value+=1,o.value>=Ca&&v()},1e3),!0}catch{return h(),n.value="Não foi possível acessar o microfone",!1}},v=()=>!a||a.state==="inactive"?(h(),Promise.resolve(null)):(d(),t.value=!1,new Promise(m=>{c=m,a?.stop(),p()})),x=async()=>{u=!0,s=[],await v()};return e.onUnmounted(()=>{x()}),{formattedDuration:f,durationSeconds:o,isRecording:t,error:n,cancel:x,start:y,stop:v}}const $a=["src","alt"],Va=["src"],Sa=["src"],Ta=["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,h)=>(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(S,{light:""},{default:e.withCtx(()=>[...h[2]||(h[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(S,{light:""},{default:e.withCtx(()=>[...h[3]||(h[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(S,{light:""},{default:e.withCtx(()=>[...h[4]||(h[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:h[1]||(h[1]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(Ue,{class:"wu-w-full",modelValue:r.value,"onUpdate:modelValue":h[0]||(h[0]=w=>r.value=w)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(w,y)=>(e.openBlock(),e.createElementBlock("div",{class:"wu-flex wu-flex-col wu-items-center wu-justify-center wu-gap-3",key:`${w.src}-${y}`},[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,$a)):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,Va)):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,Sa)):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,Ta)):e.createCommentVNode("",!0)]))),128))]),_:1},8,["modelValue"])])])):e.createCommentVNode("",!0)]))}}),Aa=["onClick"],Ea=["src","alt"],Pa={key:1,class:"wu-flex wu-items-center wu-justify-center wu-w-full wu-h-full"},Ma={key:2,class:"wu-absolute wu-inset-0 wu-flex wu-items-center wu-justify-center wu-bg-black wu-bg-opacity-50"},Ra={class:"wu-text-white wu-text-lg wu-font-semibold"},za=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=>ne(f)?.link||"",i=e.ref(!1),l=e.ref(0),u=e.computed(()=>{const f=[];for(const d of n.value){const p=ne(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,h)=>(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??h,onClick:w=>c(h)},[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(ne)(p)?.filename||"Imagem"},null,8,Ea)):(e.openBlock(),e.createElementBlock("div",Pa,[e.createVNode(S,{gray:"",large:""},{default:e.withCtx(()=>[...d[2]||(d[2]=[e.createTextVNode("image",-1)])]),_:1})])),h===a.value.length-1&&r.value>0?(e.openBlock(),e.createElementBlock("div",Ma,[e.createElementVNode("span",Ra,e.toDisplayString(`+${r.value}`),1)])):e.createCommentVNode("",!0)],8,Aa))),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))}}),Da=["disabled"],Ee=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=$=>Math.floor($).toString().padStart(2,"0"),c=$=>{if(!Number.isFinite($)||$<0)return"00:00";const V=Math.floor($/60),R=Math.floor($%60);return`${u(V)}:${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)}`),h=()=>{l.value&&(URL.revokeObjectURL(l.value),l.value=null)},w=()=>{if(h(),o.src)return o.src;if(o.file)return l.value=URL.createObjectURL(e.toRaw(o.file)),l.value},y=()=>{s.value=n.value?.duration||0},v=()=>{r.value=n.value?.currentTime||0},x=()=>{a.value=!1,r.value=0,n.value&&(n.value.currentTime=0)},m=()=>{n.value&&(n.value.pause(),n.value.removeEventListener("loadedmetadata",y),n.value.removeEventListener("timeupdate",v),n.value.removeEventListener("ended",x),n.value=null,a.value=!1,r.value=0,s.value=0)},g=()=>{m();const $=w();if(!$)return;const V=new Audio($);V.addEventListener("loadedmetadata",y),V.addEventListener("timeupdate",v),V.addEventListener("ended",x),V.playbackRate=i.value,n.value=V},k=async()=>{!n.value||!d.value||(await n.value.play(),a.value=!0)},B=()=>{n.value&&(n.value.pause(),a.value=!1)},T=()=>{a.value?B():k()},E=$=>{if(!n.value||!d.value)return;const R=$.currentTarget.getBoundingClientRect(),_=Math.min(1,Math.max(0,($.clientX-R.left)/R.width));n.value.currentTime=_*s.value,r.value=n.value.currentTime},N=()=>{i.value=Math.max(1,(i.value+.5)%2.5),n.value&&(n.value.playbackRate=i.value)};return e.watch(()=>[o.src,o.file],()=>g(),{immediate:!0}),e.onBeforeUnmount(()=>{m(),h()}),($,V)=>(e.openBlock(),e.createBlock(D,{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:T,disabled:!d.value,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(S,{gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value?"pause":"play_arrow"),1)]),_:1})]),_:1},8,["disabled"]),e.createVNode(D,{class:"wu-flex-1 wu-min-w-0",col:"","gap-xs":""},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"wu-relative wu-w-full wu-rounded-full wu-cursor-pointer wu-h-1.5 wu-bg-gray-400 dark:wu-bg-neutral-500 disabled:wu-cursor-default",type:"button","data-testid":"app-audio-player-seek",disabled:!d.value,onClick:E},[e.createElementVNode("div",{class:"wu-absolute wu-left-0 wu-top-0 wu-bottom-0 wu-rounded-full wu-bg-primary-500 wu-transition-all",style:e.normalizeStyle({width:`${f.value}%`})},null,4),e.createElementVNode("div",{class:"wu-absolute wu-w-2 wu-h-2 wu-rounded-full wu-bg-primary-600 wu-shrink-0 wu-transition-all -wu-translate-x-1/2 -wu-translate-y-1/2 wu-top-1/2",style:e.normalizeStyle({left:`${f.value}%`})},null,4)],8,Da),e.createVNode(A,{"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:N,disabled:!d.value,ghost:"",small:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value)+"x",1)]),_:1},8,["disabled"])]),_:1}))}}),La={class:"wu-flex wu-flex-col wu-gap-2 wu-min-w-[12rem]","data-testid":"app-message-attachments"},Oa=["innerHTML"],Ia=["onClick"],Fa=["src","alt"],Ha=["src"],ja={key:2,class:"wu-flex wu-items-center wu-justify-center wu-w-full wu-h-full"},Wa={key:3,class:"wu-absolute wu-inset-0 wu-flex wu-items-center wu-justify-center wu-bg-black wu-bg-opacity-50"},Ua={class:"wu-text-white wu-text-lg wu-font-semibold"},qa={key:0,class:"wu-flex-1 wu-min-w-0"},Ga=e.defineComponent({__name:"app-message-attachments",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,a=o,r=e.computed(()=>We(n.message)),s=e.computed(()=>r.value.filter(g=>g.type==="image"||g.type==="video")),i=e.computed(()=>r.value.filter(g=>g.type!=="image"&&g.type!=="video")),l=e.computed(()=>s.value.slice(0,4)),u=e.computed(()=>Math.max(0,s.value.length-4)),c=e.computed(()=>Sn(n.message)),f=e.computed(()=>Co(n.message)),d=e.computed(()=>!!(l.value.length||i.value.length)),p=e.ref(!1),h=e.ref(0),w=e.ref([]),y=g=>{w.value=s.value.filter(k=>k.link).map(k=>({src:k.link,type:k.type==="video"?"video":"image",filename:k.filename})),w.value.length&&(h.value=Math.min(g,w.value.length-1),p.value=!0)},v=g=>{g.link&&(w.value=[{src:g.link,type:"pdf",filename:g.filename}],h.value=0,p.value=!0)},x=()=>{p.value=!1,w.value=[]},m=g=>{a("chat-service-message-action",{action:"download",message:n.message,attachment:g})};return(g,k)=>(e.openBlock(),e.createElementBlock("div",La,[c.value?(e.openBlock(),e.createBlock(A,{key:0,class:"wu-whitespace-pre-wrap","data-testid":"app-message-attachments-body",gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createElementVNode("span",{innerHTML:c.value},null,8,Oa)]),_: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,(B,T)=>(e.openBlock(),e.createElementBlock("div",{class:"wu-relative wu-aspect-square wu-bg-gray-100 wu-cursor-pointer dark:wu-bg-neutral-800",key:B.id,onClick:E=>y(T)},[B.type==="image"&&B.link?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-full wu-h-full wu-object-cover",src:B.link,alt:B.filename},null,8,Fa)):B.type==="video"&&B.link?(e.openBlock(),e.createElementBlock("video",{key:1,class:"wu-w-full wu-h-full wu-object-cover",src:B.link,preload:"metadata"},null,8,Ha)):(e.openBlock(),e.createElementBlock("div",ja,[e.createVNode(S,{gray:"",large:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.type==="video"?"videocam":"image"),1)]),_:2},1024)])),T===l.value.length-1&&u.value>0?(e.openBlock(),e.createElementBlock("div",Wa,[e.createElementVNode("span",Ua,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(E=>m(B),["stop"]),ghost:"",small:"",icon:"",round:""},{icon:e.withCtx(()=>[e.createVNode(S,{class:"!wu-text-white dark:!wu-text-white"},{default:e.withCtx(()=>[...k[1]||(k[1]=[e.createTextVNode("download",-1)])]),_:1})]),_:1},8,["onClick"])],8,Ia))),128))],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,B=>(e.openBlock(),e.createBlock(D,{class:"wu-items-center wu-bg-white dark:wu-bg-neutral-800",key:B.id,"padding-sm":"",rounded:"",border:"","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(D,{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(S,{gray:"",large:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.type==="audio"?"mic":"file_present"),1)]),_:2},1024)]),_:2},1024),B.type==="audio"&&B.link?(e.openBlock(),e.createElementBlock("div",qa,[e.createVNode(Ee,{src:B.link},null,8,["src"])])):(e.openBlock(),e.createBlock(A,{key:1,class:"wu-flex-1 wu-min-w-0 [overflow-wrap:anywhere]",title:B.filename,semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.filename),1)]),_:2},1032,["title"])),e.unref(Bo)(B)?(e.openBlock(),e.createBlock(O,{key:2,onClick:T=>v(B),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(S,{gray:""},{default:e.withCtx(()=>[...k[2]||(k[2]=[e.createTextVNode("visibility",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(O,{onClick:T=>m(B),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(S,{gray:""},{default:e.withCtx(()=>[...k[3]||(k[3]=[e.createTextVNode("download",-1)])]),_:1})]),_:1},8,["onClick"])]),_:2},1024))),128)),f.value&&d.value?(e.openBlock(),e.createBlock(A,{key:2,class:"wu-whitespace-pre-wrap","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:h.value,onClose:x,"onUpdate:index":k[0]||(k[0]=B=>h.value=B)},null,8,["open","items","index"])]))}}),Za={class:"wu-w-full wu-px-3 wu-py-2 wu-bg-primary-500"},Qa=["disabled","onClick"],Ka=e.defineComponent({__name:"app-message-interactive",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,a=o,r=e.ref(Le(n.message));e.watch(()=>[n.message.messageBody,n.message.metadata,n.message.canBeInteractedWith],()=>{r.value=Le(n.message)});const s=e.computed(()=>!!(n.message.canBeInteractedWith&&r.value)),i=l=>{s.value&&(l.disabled||l.selected||(a("chat-service-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(D,{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",Za,[e.createVNode(A,{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(D,{class:"wu-items-start wu-flex-1 wu-min-w-0",col:"","gap-none":""},{default:e.withCtx(()=>[e.createVNode(A,{semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.label),1)]),_:2},1024),c.description?(e.openBlock(),e.createBlock(A,{key:0,"extra-small":"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.description),1)]),_:2},1024)):e.createCommentVNode("",!0)]),_:2},1024),e.createVNode(S,{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,Qa))),128))]),_:1})):e.createCommentVNode("",!0)}}),Xa={class:"wu-flex wu-flex-col wu-gap-2 wu-min-w-[14rem]","data-testid":"app-message-document"},Ya=e.defineComponent({__name:"app-message-document",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,a=o,r=e.computed(()=>ne(n.message)),s=e.computed(()=>r.value?.filename||n.message.messageBody||"Documento"),i=e.computed(()=>!!(r.value?.link&&Bo(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("chat-service-message-action",{action:"download",message:n.message,attachment:r.value})};return(f,d)=>(e.openBlock(),e.createElementBlock("div",Xa,[e.createVNode(D,{class:"wu-items-center wu-bg-white dark:wu-bg-neutral-800","padding-sm":"",rounded:"",border:"","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(D,{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(S,{gray:"",large:""},{default:e.withCtx(()=>[...d[2]||(d[2]=[e.createTextVNode("file_present",-1)])]),_:1})]),_:1}),e.createVNode(A,{class:"wu-flex-1 wu-min-w-0 [overflow-wrap:anywhere]",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(S,{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(S,{gray:""},{default:e.withCtx(()=>[...d[4]||(d[4]=[e.createTextVNode("download",-1)])]),_:1})]),_:1})]),_:1}),t.message.caption?(e.openBlock(),e.createBlock(A,{key:0,class:"wu-whitespace-pre-wrap",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"])]))}}),Ja={class:"wu-w-full wu-px-3 wu-py-2 wu-bg-primary-500"},er=["disabled","onClick"],tr=e.defineComponent({__name:"app-message-survey",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,a=o,r=e.ref(Le(n.message));e.watch(()=>[n.message.messageBody,n.message.metadata,n.message.canBeInteractedWith],()=>{r.value=Le(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("chat-service-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(D,{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",Ja,[e.createVNode(A,{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(A,{semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.label),1)]),_:2},1024),e.createVNode(S,{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,er))),128)):(e.openBlock(),e.createBlock(D,{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(A,{small:"",gray:""},{default:e.withCtx(()=>[...c[0]||(c[0]=[e.createTextVNode("Pesquisa de satisfação já respondida",-1)])]),_:1}),e.createVNode(S,{class:"wu-text-green-500"},{default:e.withCtx(()=>[...c[1]||(c[1]=[e.createTextVNode("check_circle",-1)])]),_:1})]),_:1}))]),_:1})):e.createCommentVNode("",!0)}}),gt=e.defineComponent({__name:"app-message-audio",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,a=o,r=e.computed(()=>ne(n.message)),s=e.computed(()=>r.value?.link||""),i=()=>{a("chat-service-message-action",{action:"download",message:n.message,attachment:r.value})};return(l,u)=>(e.openBlock(),e.createBlock(D,{class:"wu-items-center wu-min-w-[14rem]","gap-sm":"","data-testid":"app-message-audio"},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createBlock(Ee,{key:0,class:"wu-flex-1",src:s.value},null,8,["src"])):(e.openBlock(),e.createBlock(D,{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(S,{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(S,{gray:""},{default:e.withCtx(()=>[...u[1]||(u[1]=[e.createTextVNode("download",-1)])]),_:1})]),_:1})]),_:1}))}}),or={class:"wu-flex wu-flex-col wu-gap-2 wu-min-w-[10rem]","data-testid":"app-message-image"},nr={class:"wu-relative wu-rounded wu-overflow-hidden wu-bg-gray-100 dark:wu-bg-neutral-800"},ar=["src","alt"],rr={key:1,class:"wu-flex wu-items-center wu-justify-center wu-h-32"},sr=e.defineComponent({__name:"app-message-image",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,a=o,r=e.computed(()=>ne(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("chat-service-message-action",{action:"download",message:n.message,attachment:r.value})};return(c,f)=>(e.openBlock(),e.createElementBlock("div",or,[e.createElementVNode("div",nr,[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,ar)):(e.openBlock(),e.createElementBlock("div",rr,[e.createVNode(S,{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(S,{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(A,{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"])]))}}),ir={class:"wu-flex wu-flex-col wu-gap-2 wu-min-w-[12rem]","data-testid":"app-message-video"},lr={class:"wu-relative wu-rounded wu-overflow-hidden wu-bg-black"},ur=["src"],cr={key:1,class:"wu-flex wu-items-center wu-justify-center wu-h-32"},dr=e.defineComponent({__name:"app-message-video",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,a=o,r=e.computed(()=>ne(n.message)),s=e.computed(()=>r.value?.link||""),i=()=>{a("chat-service-message-action",{action:"download",message:n.message,attachment:r.value})};return(l,u)=>(e.openBlock(),e.createElementBlock("div",ir,[e.createElementVNode("div",lr,[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,ur)):(e.openBlock(),e.createElementBlock("div",cr,[e.createVNode(S,{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(S,{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(A,{key:0,gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.message.caption),1)]),_:1})):e.createCommentVNode("",!0)]))}}),pr=["innerHTML"],vt=e.defineComponent({__name:"app-message-text",props:{message:{}},setup(t){return(o,n)=>(e.openBlock(),e.createBlock(A,{class:"wu-whitespace-pre-wrap",gray:"",small:"",medium:"","data-testid":"app-message-text"},{default:e.withCtx(()=>[e.createElementVNode("span",{innerHTML:t.message.messageBody},null,8,pr)]),_:1}))}}),mr={_grouped_images:za,interactive:Ka,document:Ya,automatic:vt,survey:tr,audio:gt,video:dr,voice:gt,image:sr,text:vt},fr=t=>{const o=t.messageType;return o==="audio"||o==="voice"?gt:We(t).length>0?Ga:mr[o]??vt},wr={key:0,class:"wu-w-full wu-flex wu-justify-end wu-h-2","data-testid":"app-message-trailing"},ke=e.defineComponent({__name:"app-message",props:{primary:Boolean,secondary:Boolean,tertiary:Boolean},setup(t){const o=t,n=e.computed(()=>e.useSlots());function a(u){return!!n.value[u]}const r=e.computed(()=>o.tertiary),s=e.computed(()=>!r.value&&o.secondary),i=e.computed(()=>r.value?"wu-justify-center":s.value?"wu-flex-row-reverse":""),l=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(u,c)=>(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"},[e.createElementVNode("div",{class:e.normalizeClass(["wu-rounded-lg wu-relative wu-min-h-8 [overflow-wrap:anywhere]",l.value]),"data-testid":"app-message-bubble"},[e.renderSlot(u.$slots,"default"),a("trailing")?(e.openBlock(),e.createElementBlock("div",wr,[e.renderSlot(u.$slots,"trailing")])):e.createCommentVNode("",!0)],2)],2))}}),At=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))}}),hr={class:"wu-typing__dots","aria-hidden":"true"},gr=e.defineComponent({__name:"app-typing",props:{small:Boolean},setup(t){const o=t,n=e.computed(()=>o.small?"wu-gap-1.5 wu-min-h-4":"wu-gap-2 wu-min-h-5"),a=e.computed(()=>o.small?"wu-typing__dot--small":"wu-typing__dot");return(r,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-inline-flex wu-items-center wu-text-gray-500",[n.value,"dark:wu-text-neutral-300"]]),role:"status","aria-live":"polite","aria-label":"Digitando","data-testid":"app-typing"},[e.createElementVNode("div",hr,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(3,i=>e.createElementVNode("span",{key:i,class:e.normalizeClass(a.value),style:e.normalizeStyle({"--i":i}),"data-testid":"app-typing-dot"},null,6)),64))])],2))}}),Et=ge(gr,[["__scopeId","data-v-b0aad068"]]),Pt=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(D,{"gap-sm":"",center:"",col:""},{default:e.withCtx(()=>[t.error?(e.openBlock(),e.createBlock(S,{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(S,{key:2,class:"wu-text-gray-500",large:""},{default:e.withCtx(()=>[...i[2]||(i[2]=[e.createTextVNode("list",-1)])]),_:1})),e.createVNode(A,{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}))}}),vr={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"},yr={class:"wu-relative wu-flex wu-flex-col wu-flex-1 wu-min-h-0 wu-w-full"},xr={key:0,class:"wu-w-full wu-min-h-4","data-testid":"app-chat-top-spacer"},br={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"},kr={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"},Cr={key:0,class:"wu-absolute wu-inset-0 wu-rounded-full wu-bg-red-500 wu-bg-opacity-20 wu-animate-ping"},Br=["src","alt"],_r=["onKeydown","disabled"],Nr={class:"wu-flex wu-items-center wu-gap-2 wu-w-full wu-justify-end wu-px-6 wu-py-2"},$r=100,Vr=e.defineComponent({__name:"app-chat-service",props:{rule:{},edges:{}},emits:["chat-service-action","chat-service-message-action"],setup(t,{emit:o}){const n=t,a=o,{history:r,chat:s,language:i}=ce(),{isSendingMessage:l,isErrorLoading:u,attachments:c,isFinished:f,isLoading:d,messages:p,isTyping:h,audio:w,text:y}=s,{isRecording:v,formattedDuration:x,start:m,stop:g,cancel:k}=Na(),B=e.computed(()=>r.value.length>0),T=e.ref(null),E=e.ref(!1),N=e.ref(!1),$=e.computed(()=>Mn(p.value)),V=e.ref(null),R=e.computed(()=>!!(c.value.length||w.value)),_=e.computed(()=>!!(R.value||y.value.trim())),P=e.computed(()=>!!n.rule.settings?.features?.sendAttachment),z=e.computed(()=>l.value||!!w.value||N.value),I=e.computed(()=>l.value||R.value||N.value),H=e.computed(()=>P.value&&!z.value),j=e.ref(!1);let F=null;const W=e.computed(()=>(n.rule.settings?.features?.quickReplies??[]).map(b=>b[i.value]??b["pt-BR"]??Object.values(b)[0]??"").filter(Boolean)),Ye=e.computed(()=>p.value.filter(C=>C.from==="contact")),rn=e.computed(()=>W.value.length>0&&Ye.value.length===0&&!f.value),Ft=e.computed(()=>l.value||R.value||N.value),sn=()=>{const C=T.value;if(!C)return;const b=C.scrollHeight-C.scrollTop-C.clientHeight;E.value=b>$r},ye=(C=!0)=>{const b=T.value;b&&(b.scrollTo({top:b.scrollHeight,behavior:C?"smooth":"auto"}),E.value=!1)},Ht=(C=!0)=>{E.value||ye(C)},ln=()=>{z.value||V.value?.click()},Je=C=>{C&&URL.revokeObjectURL(C)},un=()=>{c.value.forEach(C=>Je(C.previewUrl)),c.value=[]},et=()=>{Je(w.value?.previewUrl),w.value=null},cn=C=>C.type.startsWith("image/")?"image":"document",tt=C=>{C.length&&(et(),c.value=[...c.value,...C.map(b=>{const M=cn(b);return{file:b,type:M,previewUrl:M==="image"?URL.createObjectURL(b):void 0}})])},dn=C=>{un(),et(),y.value="",w.value={file:C,previewUrl:URL.createObjectURL(C)}},pn=C=>{const b=C.target,M=Array.from(b.files??[]);tt(M),b.value=""},mn=C=>{if(!C)return[];const b=Array.from(C.items??[]).filter(M=>M.kind==="file").map(M=>M.getAsFile()).filter(M=>!!M);return b.length?b:Array.from(C.files??[])},ot=C=>{const b=C.dataTransfer?.types;return b?Array.from(b).includes("Files"):!1},nt=()=>{F&&(clearTimeout(F),F=null)},jt=()=>{nt(),F=setTimeout(()=>{j.value=!1},300)},fn=C=>{if(!H.value)return;const b=mn(C.clipboardData);b.length&&(C.preventDefault(),tt(b))},wn=C=>{!H.value||!ot(C)||(C.preventDefault(),C.dataTransfer&&(C.dataTransfer.dropEffect="copy"),j.value=!0,jt())},hn=C=>{!H.value||!ot(C)||jt()},gn=C=>{if(!H.value||!ot(C))return;C.preventDefault(),nt(),j.value=!1;const b=Array.from(C.dataTransfer?.files??[]);b.length&&tt(b)},vn=C=>{Je(c.value[C]?.previewUrl),c.value=c.value.filter((b,M)=>M!==C)},yn=()=>{et()},xn=async()=>{I.value||!await m()||(y.value="",N.value=!0)},bn=async()=>{await k(),N.value=!1},kn=async()=>{const C=await g();N.value=!1,C&&dn(C)},xe=C=>a("chat-service-action",C),Wt=()=>{ye(),xe({action:"send-message"})},Cn=C=>{Ft.value||!C.trim()||(y.value=C,ye(),xe({action:"send-message"}))};e.watch(()=>$.value.length,async()=>{await e.nextTick(),Ht()}),e.watch(h,C=>{C&&Ht()}),e.onMounted(()=>{ye(!1)}),e.onBeforeUnmount(()=>{nt()});const Ut=C=>C.from==="contact"?"contact":"operator",Bn=(C,b,M)=>b[M-1]?Ut(b[M-1])===Ut(C)?"wu-mt-1":"wu-mt-4":"wu-mt-0",_n=C=>Tn(C.createdAt)||"12:58",Nn=C=>a("chat-service-message-action",C);return(C,b)=>(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:wn,onDragleave:hn,onDrop:gn},[j.value?(e.openBlock(),e.createElementBlock("div",vr,[e.createVNode(S,{class:"wu-text-primary",large:""},{default:e.withCtx(()=>[...b[5]||(b[5]=[e.createTextVNode("upload",-1)])]),_:1}),e.createVNode(A,{semibold:"",gray:""},{default:e.withCtx(()=>[...b[6]||(b[6]=[e.createTextVNode("Solte os arquivos para anexar",-1)])]),_:1})])):e.createCommentVNode("",!0),e.createElementVNode("div",yr,[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:T,"data-testid":"app-service-messages",onScroll:sn},[B.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",xr)),e.unref(d)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},e.renderList(10,(M,q)=>e.createVNode(ke,{key:q,primary:q%2===0,secondary:q%2===1},{default:e.withCtx(()=>[e.createVNode(At,{class:"wu-h-4 wu-w-32",block:""})]),_:1},8,["primary","secondary"])),64)):e.unref(u)?(e.openBlock(),e.createBlock(Pt,{key:2,class:"wu-h-full",onRefetch:b[0]||(b[0]=M=>xe({action:"retry-loading"})),error:""},{default:e.withCtx(()=>[...b[7]||(b[7]=[e.createTextVNode("Ocorreu um erro ao carregar o atendimento.",-1)])]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(M,q)=>(e.openBlock(),e.createBlock(ke,{key:M.id??q,primary:M.from!=="contact",secondary:M.from==="contact",class:e.normalizeClass([Bn(M,$.value,q)])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(fr)(M)),{message:M,onChatServiceMessageAction:Nn},null,40,["message"]))]),trailing:e.withCtx(()=>[e.createVNode(A,{gray:"","extra-small":"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_n(M)),1)]),_:2},1024)]),_:2},1032,["primary","secondary","class"]))),128)),e.unref(h)?(e.openBlock(),e.createBlock(ke,{key:0,class:"wu-mt-1",primary:""},{default:e.withCtx(()=>[e.createVNode(Et,{small:""})]),_:1})):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createBlock(D,{key:1,class:"wu-mt-4","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(O,{"data-testid":"app-chat-start-new-service",onClick:b[1]||(b[1]=M=>xe({action:"start-new-service"})),small:""},{icon:e.withCtx(()=>[e.createVNode(S,{small:""},{default:e.withCtx(()=>[...b[8]||(b[8]=[e.createTextVNode("chat",-1)])]),_:1})]),default:e.withCtx(()=>[b[9]||(b[9]=e.createTextVNode("Iniciar novo atendimento",-1))]),_:1}),e.createVNode(O,{"data-testid":"app-chat-back",onClick:b[2]||(b[2]=M=>xe({action:"back"})),small:"",outline:""},{icon:e.withCtx(()=>[e.createVNode(S,{small:""},{default:e.withCtx(()=>[...b[10]||(b[10]=[e.createTextVNode("arrow_back",-1)])]),_:1})]),default:e.withCtx(()=>[b[11]||(b[11]=e.createTextVNode("Voltar",-1))]),_:1})]),_:1})):e.createCommentVNode("",!0)],64)),b[12]||(b[12]=e.createElementVNode("div",{class:"wu-w-full wu-min-h-4"},null,-1))],544),E.value?(e.openBlock(),e.createBlock(O,{key:0,class:"wu-absolute wu-right-9 wu-bottom-3 wu-z-10 wu-shadow-md !wu-bg-white dark:!wu-bg-neutral-800","data-testid":"app-chat-scroll-to-bottom",onClick:b[3]||(b[3]=M=>ye()),round:"",small:"",icon:"",outline:""},{icon:e.withCtx(()=>[e.createVNode(S,{small:"",gray:""},{default:e.withCtx(()=>[...b[13]||(b[13]=[e.createTextVNode("keyboard_double_arrow_down",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),!e.unref(d)&&!e.unref(u)&&rn.value?(e.openBlock(),e.createBlock(D,{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(W.value,(M,q)=>(e.openBlock(),e.createBlock(O,{key:q,onClick:$n=>Cn(M),disabled:Ft.value,outline:"",round:"",fit:""},{trailing:e.withCtx(()=>[...b[14]||(b[14]=[e.createTextVNode("chevron_right",-1)])]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(M),1)]),_:2},1032,["onClick","disabled"]))),128))]),_:1})):e.createCommentVNode("",!0),!e.unref(d)&&!e.unref(u)&&t.rule.settings?.features?.sendMessage?(e.openBlock(),e.createElementBlock("div",br,[N.value?(e.openBlock(),e.createBlock(D,{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:bn,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(S,{gray:""},{default:e.withCtx(()=>[...b[15]||(b[15]=[e.createTextVNode("close",-1)])]),_:1})]),_:1}),e.createVNode(D,{class:"wu-items-center","gap-sm":""},{default:e.withCtx(()=>[e.createElementVNode("div",kr,[e.unref(v)?(e.openBlock(),e.createElementBlock("div",Cr)):e.createCommentVNode("",!0),e.createVNode(S,{class:"wu-text-red-500",large:""},{default:e.withCtx(()=>[...b[16]||(b[16]=[e.createTextVNode("mic",-1)])]),_:1})]),e.createVNode(A,{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:kn,disabled:!e.unref(v),small:"",icon:"",success:""},{icon:e.withCtx(()=>[e.createVNode(S,{light:""},{default:e.withCtx(()=>[...b[17]||(b[17]=[e.createTextVNode("check",-1)])]),_:1})]),_:1},8,["disabled"])]),_:1})):e.unref(w)?(e.openBlock(),e.createBlock(D,{key:1,"data-testid":"app-chat-audio-preview","padding-md":""},{default:e.withCtx(()=>[e.createVNode(D,{class:"wu-w-full wu-items-center","padding-sm":"",rounded:"",border:"","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(Ee,{class:"wu-flex-1",src:e.unref(w).previewUrl},null,8,["src"]),e.createVNode(O,{"data-testid":"app-chat-audio-discard",onClick:yn,disabled:e.unref(l),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(S,{gray:""},{default:e.withCtx(()=>[...b[18]||(b[18]=[e.createTextVNode("close",-1)])]),_:1})]),_:1},8,["disabled"])]),_:1})]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.unref(c).length?(e.openBlock(),e.createBlock(D,{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(c),(M,q)=>(e.openBlock(),e.createBlock(D,{class:"wu-items-center",key:q,"padding-sm":"",rounded:"",border:"","gap-sm":""},{default:e.withCtx(()=>[M.type==="image"&&M.previewUrl?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-10 wu-h-10 wu-rounded wu-object-cover",src:M.previewUrl,alt:M.file.name},null,8,Br)):(e.openBlock(),e.createBlock(D,{key:1,class:"wu-w-7 wu-h-7 wu-bg-gray-200",center:"","padding-base":"",rounded:""},{default:e.withCtx(()=>[e.createVNode(S,{large:"",gray:""},{default:e.withCtx(()=>[...b[19]||(b[19]=[e.createTextVNode("file_present",-1)])]),_:1})]),_:1})),e.createVNode(D,{class:"wu-flex-1 wu-items-start wu-min-w-0",col:"","gap-none":""},{default:e.withCtx(()=>[e.createVNode(A,{class:"[overflow-wrap:anywhere]",semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(M.file.name),1)]),_:2},1024),e.createVNode(A,{"extra-small":"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(M.file.type),1)]),_:2},1024)]),_:2},1024),e.createVNode(O,{"data-testid":"app-chat-attachment-discard",onClick:$n=>vn(q),disabled:e.unref(l),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(S,{gray:""},{default:e.withCtx(()=>[...b[20]||(b[20]=[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":b[4]||(b[4]=M=>e.isRef(y)?y.value=M:null),onKeydown:e.withKeys(e.withModifiers(Wt,["exact","prevent"]),["enter"]),onPaste:fn,placeholder:"Escreva uma mensagem...",disabled:e.unref(l)},null,40,_r),[[e.vModelText,e.unref(y)]])],64)),e.withDirectives(e.createElementVNode("input",{ref_key:"fileInput",ref:V,type:"file",multiple:"","data-testid":"app-chat-file-input",onChange:pn},null,544),[[e.vShow,!1]]),e.createElementVNode("div",Nr,[P.value?(e.openBlock(),e.createBlock(O,{key:0,"data-testid":"app-chat-attach-file",onClick:ln,disabled:z.value,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(S,{class:"wu-rotate-45",large:"",gray:""},{default:e.withCtx(()=>[...b[21]||(b[21]=[e.createTextVNode("attach_file",-1)])]),_:1})]),_:1},8,["disabled"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createBlock(O,{key:1,"data-testid":"app-chat-record-audio",onClick:xn,disabled:I.value,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(S,{large:"",gray:""},{default:e.withCtx(()=>[...b[22]||(b[22]=[e.createTextVNode("mic",-1)])]),_:1})]),_:1},8,["disabled"])):e.createCommentVNode("",!0),e.createVNode(O,{onClick:Wt,loading:e.unref(l),disabled:!_.value||N.value,small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(S,{class:"-wu-rotate-45 wu-translate-x-[0.10rem] -wu-translate-y-[0.12rem]",outlined:"",large:""},{default:e.withCtx(()=>[...b[23]||(b[23]=[e.createTextVNode("send",-1)])]),_:1})]),_:1},8,["loading","disabled"])])])):e.createCommentVNode("",!0)],32))}}),Sr={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"},Tr={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"},Ar=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",Sr,[e.createVNode(D,{class:"wu-w-full",col:"",center:"","gap-lg":""},{default:e.withCtx(()=>[e.createVNode(D,{col:"",center:"","gap-base":""},{default:e.withCtx(()=>[e.createElementVNode("div",Tr,[e.createVNode(S,{"extra-large":"",gray:""},{default:e.withCtx(()=>[...r[0]||(r[0]=[e.createTextVNode("phone_in_talk",-1)])]),_:1})]),e.createVNode(A,{class:"wu-text-center","extra-large":"",semibold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.value),1)]),_:1}),e.createVNode(A,{class:"wu-text-center",small:"",gray:""},{default:e.withCtx(()=>[...r[1]||(r[1]=[e.createTextVNode("Aguardando conexão",-1)])]),_:1})]),_:1}),e.createVNode(D,{center:"","gap-md":""},{default:e.withCtx(()=>[e.createVNode(O,{ghost:"",icon:"",round:"",disabled:""},{icon:e.withCtx(()=>[e.createVNode(S,{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(S,{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(S,{large:"",gray:""},{default:e.withCtx(()=>[...r[4]||(r[4]=[e.createTextVNode("volume_up",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]))}}),Mt=e.defineComponent({__name:"app-service-page",props:{rule:{},edges:{}},emits:["chat-service-action","chat-service-message-action"],setup(t,{emit:o}){const n=t,a=o,r=e.computed(()=>n.rule.settings?.behavior==="voice"?Ar:Vr);return(s,i)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value),{rule:t.rule,edges:t.edges,onChatServiceAction:i[0]||(i[0]=l=>a("chat-service-action",l)),onChatServiceMessageAction:i[1]||(i[1]=l=>a("chat-service-message-action",l))},null,40,["rule","edges"]))}}),Er=t=>{const o=n=>n.toString(16).padStart(2,"0");return`#${o(t.r)}${o(t.g)}${o(t.b)}`},So=()=>{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?Er(s):t.toLowerCase()},parseHex:o}},Pr=()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches,To=t=>{const{isLightHex:o,normalizeHex:n,parseHex:a}=So(),r=(d,p)=>d==="dark"?"dark":d==="light"?"light":p?"dark":"light",s=d=>{const p=n(d),h=a(p)??{r:109,g:53,b:149},w=o(p);return{"--wu-primary":p,"--wu-primary-rgb":`${h.r} ${h.g} ${h.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(Pr()),h=e.computed(()=>r(e.toValue(d),p.value)),w=e.computed(()=>h.value==="dark"),y=e.computed(()=>w.value?"wu-dark":"");return e.onMounted(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const v=window.matchMedia("(prefers-color-scheme: dark)");p.value=v.matches;const x=m=>{p.value=m.matches};v.addEventListener("change",x),e.onBeforeUnmount(()=>v.removeEventListener("change",x))}),{isDark:w,resolvedTheme:h,themeClass:y}},{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}},Mr={class:"wu-flex wu-flex-col wu-w-full wu-gap-8"},Rr={key:0,class:"wu-flex wu-items-center wu-w-fit wu-justify-center wu-h-0"},zr=["src"],Dr={key:1,class:"wu-flex wu-flex-col wu-items-center wu-justify-start wu-gap-2 wu-px-6 wu-w-full"},Rt=e.defineComponent({__name:"app-screen-page",props:{rule:{},edges:{}},emits:["edge-click"],setup(t,{emit:o}){const n=t,a=o,{history:r}=ce(),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",Mr,[s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Rr)),e.createVNode(D,{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,zr)):e.createCommentVNode("",!0),l.value?.eyebrow?(e.openBlock(),e.createBlock(A,{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(A,{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(A,{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(D,{key:4,class:"wu-rounded-full wu-px-2 wu-h-6 wu-bg-primary-500","padding-sm":"","gap-sm":"",center:""},{default:e.withCtx(()=>[e.createVNode(S,{class:"!wu-text-[var(--wu-primary-fg)]",small:""},{default:e.withCtx(()=>[...d[2]||(d[2]=[e.createTextVNode("check",-1)])]),_:1}),e.createVNode(A,{class:"!wu-text-[var(--wu-primary-fg)]",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",Dr,[(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]=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,p=>(e.openBlock(),e.createBlock(we,{key:p.id,edge:p,icon:"",onClick:d[1]||(d[1]=h=>a("edge-click",h))},null,8,["edge"]))),128))],2)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))}}),Lr="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=",Or={class:"wu-flex wu-flex-col wu-h-full wu-w-full wu-bg-white wu-overflow-hidden dark:wu-bg-neutral-800"},Ir={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)]"},Fr={class:"wu-flex wu-items-center wu-gap-3 wu-min-w-0 wu-flex-1"},Hr=["src"],jr={class:"wu-flex wu-flex-col wu-justify-center wu-min-w-0 wu-overflow-hidden"},Wr={class:"wu-flex wu-flex-col wu-w-full wu-flex-1 wu-min-h-0"},Ur={key:0,class:"wu-flex wu-shrink-0 wu-items-center wu-w-fit wu-justify-center wu-px-6 wu-py-4"},qr={class:"wu-flex wu-flex-col wu-w-full wu-flex-1 wu-min-h-0 wu-overflow-y-auto wu-gap-8"},Gr={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"},Zr=["src"],Qr=e.defineComponent({inheritAttrs:!1,__name:"app-widget-view",props:{workflow:{},config:{},fullscreen:{type:Boolean}},emits:["chat-service-action","edge-click","chat-service-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}=ce(),{appearanceStyle:f,themeClass:d}=To(()=>n.config.configurations.appearance);u(n.workflow),c(n.config),e.watch(()=>n.workflow,m=>u(m)),e.watch(()=>n.config,m=>c(m));const p=e.computed(()=>r.value.length>0),h=e.computed(()=>p.value&&s.value?.action!=="widget-identification-screen"),w=e.computed(()=>n.config.configurations.general.isClosable),y={"widget-identification-screen":Vt,"widget-article-screen":Tt,"widget-service-screen":Mt,"widget-base-screen":Rt},v=e.computed(()=>{const m=s.value?.action;return m&&m in y?y[m]:void 0}),x=e.computed(()=>n.fullscreen?"wu-w-full wu-h-[100dvh] wu-max-h-full":"wu-w-[24.4rem] wu-h-[38rem] widget-shadow wu-rounded-2xl");return(m,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yunique wu-overflow-hidden wu-relative",[x.value,e.unref(d)]]),"data-testid":"app-widget-view",style:e.normalizeStyle(e.unref(f))},[e.createElementVNode("div",Or,[e.createElementVNode("div",Ir,[e.createElementVNode("div",Fr,[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,Hr)):e.createCommentVNode("",!0),e.createElementVNode("div",jr,[e.unref(i)?.title?(e.openBlock(),e.createBlock(A,{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(A,{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:g[0]||(g[0]=k=>a("close")),"data-testid":"app-widget-close",small:"",icon:""},{default:e.withCtx(()=>[e.createVNode(S,null,{default:e.withCtx(()=>[...g[7]||(g[7]=[e.createTextVNode("close",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",Wr,[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},[h.value?(e.openBlock(),e.createElementBlock("div",Ur,[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]=k=>a("back"))},[e.createVNode(S,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200",small:"",gray:""},{default:e.withCtx(()=>[...g[8]||(g[8]=[e.createTextVNode("chevron_left",-1)])]),_:1}),e.createVNode(A,{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[9]||(g[9]=[e.createTextVNode("Voltar",-1)])]),_:1})])])):e.createCommentVNode("",!0),e.createElementVNode("div",qr,[v.value&&e.unref(s)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v.value),{key:0,rule:e.unref(s),edges:e.unref(l),onSubmit:g[2]||(g[2]=k=>a("submit",k)),onBack:g[3]||(g[3]=k=>a("back")),onEdgeClick:g[4]||(g[4]=k=>a("edge-click",k)),onChatServiceAction:g[5]||(g[5]=k=>a("chat-service-action",k)),onChatServiceMessageAction:g[6]||(g[6]=k=>a("chat-service-message-action",k))},null,40,["rule","edges"])):e.createCommentVNode("",!0)])]))]),_:1})]),e.createElementVNode("div",Gr,[e.createElementVNode("img",{class:"wu-w-3 wu-h-2",src:e.unref(Lr),alt:"Opens"},null,8,Zr),e.createVNode(A,{class:"!wu-text-xxs",gray:""},{default:e.withCtx(()=>[...g[10]||(g[10]=[e.createTextVNode("Powered By",-1),e.createElementVNode("b",{class:"wu-ml-1"},"Opens",-1)])]),_:1})])])],6))}}),zt=ge(Qr,[["__scopeId","data-v-700b6585"]]),Kr={class:"wu-flex wu-h-full wu-pl-3 wu-gap-2 wu-z-10 wu-pointer-events-none"},Xr={class:"wu-h-full wu-flex wu-items-center wu-justify-center"},Yr=["value","type","disabled","maxlength"],Jr={class:"wu-absolute wu-right-2 wu-z-10 wu-flex wu-items-center wu-gap-1 wu-text-gray-500"},Ao=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(T){return!!s.value[T]}const l=e.ref(""),u=e.ref(!1),c=e.ref(!1);function f(T){if(!a.maskFunction)return T;try{const E=a.maskFunction(T);return typeof E=="string"?E:T}catch{return T}}e.watch(()=>a.modelValue,T=>{if(T==null){l.value="";return}l.value=a.maskFunction?f(T):T},{immediate:!0});function d(){return!(u.value||l.value)}const{height:p,textSize:h,width:w}=Vo(a),y=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"),v=e.computed(()=>a.invalid?"wu-text-red-500":a.valid?"wu-text-green-500":"wu-text-gray-500"),x=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"),m=e.computed(()=>i("icon")||a.loading?"wu-pl-[34px]":"wu-pl-3"),g=e.computed(()=>a.block?"wu-rounded-none":a.round?"wu-rounded-full":"wu-rounded-lg"),k=e.computed(()=>a.disabled||a.loading?"wu-opacity-50 wu-pointer-events-none":"");function B(T){const N=T.target.value;l.value=a.maskFunction?f(N):N,r("update:modelValue",l.value)}return o({focus:u,content:l}),(T,E)=>(e.openBlock(),e.createBlock(D,{class:e.normalizeClass([e.unref(w)]),col:"","gap-none":""},{default:e.withCtx(()=>[e.createVNode(D,{col:"","gap-sm":""},{default:e.withCtx(()=>[i("label")?(e.openBlock(),e.createBlock(A,{key:0,small:"",medium:""},{default:e.withCtx(()=>[e.renderSlot(T.$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,k.value,e.unref(p),y.value]]),"data-testid":"app-text-input"},[e.createElementVNode("div",Kr,[e.createElementVNode("div",Xr,[!t.loading&&i("icon")?(e.openBlock(),e.createBlock(S,{key:0,small:""},{default:e.withCtx(()=>[e.renderSlot(T.$slots,"icon")]),_:3})):e.createCommentVNode("",!0),t.loading?(e.openBlock(),e.createBlock(S,{key:1,class:"wu-animate-spin",small:"",outlined:""},{default:e.withCtx(()=>[...E[4]||(E[4]=[e.createTextVNode("progress_activity",-1)])]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(A,{class:e.normalizeClass(["wu-py-1 wu-transition",[x.value]]),small:"",medium:"",gray:""},{default:e.withCtx(()=>[e.renderSlot(T.$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(h),m.value,g.value]]),value:l.value,type:t.passwordToggle&&c.value?"text":t.type,disabled:t.disabled||t.loading,maxlength:t.maxLength,onInput:B,onFocus:E[0]||(E[0]=N=>u.value=!0),onBlur:E[1]||(E[1]=N=>u.value=!1),onKeyup:E[2]||(E[2]=e.withKeys(N=>r("keyup-enter"),["enter"]))},null,42,Yr),e.createElementVNode("div",Jr,[t.maxLength?(e.openBlock(),e.createBlock(A,{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:E[3]||(E[3]=N=>c.value=!c.value)},[e.createVNode(S,{small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value?"visibility_off":"visibility"),1)]),_:1})])):e.createCommentVNode("",!0),e.renderSlot(T.$slots,"suffix")])],2)]),_:3}),i("feedback")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["wu-mt-1",[v.value]])},[e.renderSlot(T.$slots,"feedback")],2)):e.createCommentVNode("",!0)]),_:3},8,["class"]))}}),es=()=>{const{isLightHex:t,normalizeHex:o}=So();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"}}}},ts={key:0,class:"wu-flex wu-relative"},os=e.defineComponent({__name:"app-widget",props:{workflow:{},config:{},fullscreen:{type:Boolean}},emits:["chat-service-message-action","chat-service-action","edge-click","submit","close","back","open"],setup(t,{emit:o}){const n=t,a=o,{isOpen:r,config:s,chat:i,open:l,close:u,setWorkflow:c,setConfig:f}=ce(),{getOffset:d,getPosition:p,getTone:h}=es(),{appearanceStyle:w,themeClass:y}=To(()=>n.config.configurations.appearance),v=e.computed(()=>n.config.configurations.notifications?.enabled??!0),x=e.computed(()=>v.value&&i.unreadMessagesCount.value>0),m=n.config.configurations.general.defaultBehavior==="active",g=e.ref(!m);m?l():u();const k=e.computed(()=>n.config.configurations.anchor),B=e.computed(()=>n.config.configurations.appearance),T=e.computed(()=>{if(!(r.value&&n.fullscreen))return d(k.value.position,k.value.offset)}),E=e.computed(()=>p(k.value.position)),N=e.computed(()=>({workflow:n.workflow,config:n.config,fullscreen:n.fullscreen})),$=e.computed(()=>({style:h(B.value.primaryColor),small:k.value.size==="small",large:k.value.size==="large",logo:k.value.logo??"",label:k.value.label??""})),V=async()=>{r.value||(g.value=!1,await e.nextTick(),l(),a("open"))},R=()=>{r.value&&(u(),a("close"))},_=()=>{g.value=!0};return c(n.workflow),f(n.config),e.watch(()=>n.workflow,P=>c(P)),e.watch(()=>n.config,P=>f(P)),e.watch(()=>s.value?.configurations.general.defaultBehavior,P=>{P==="active"?V():R()},{immediate:!0}),e.watch(r,P=>{P&&(g.value=!1)}),(P,z)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-fixed yunique wu-z-[99999]",[e.unref(y),e.unref(r)&&t.fullscreen?"wu-inset-0 wu-overflow-hidden":""]]),"data-testid":"app-widget",style:e.normalizeStyle([{"--widget-origin":E.value},T.value,e.unref(w)])},[e.createVNode(e.Transition,{name:"widget",onAfterLeave:_},{default:e.withCtx(()=>[e.unref(r)?(e.openBlock(),e.createBlock(zt,e.mergeProps({key:0},N.value,{onClose:R,onBack:z[0]||(z[0]=I=>a("back")),onSubmit:z[1]||(z[1]=I=>a("submit",I)),onEdgeClick:z[2]||(z[2]=I=>a("edge-click",I)),onChatServiceAction:z[3]||(z[3]=I=>a("chat-service-action",I)),onChatServiceMessageAction:z[4]||(z[4]=I=>a("chat-service-message-action",I))}),null,16)):e.createCommentVNode("",!0)]),_:1}),g.value?(e.openBlock(),e.createElementBlock("div",ts,[e.createVNode(St,{style:e.normalizeStyle($.value.style),small:$.value.small,large:$.value.large,logo:$.value.logo,label:$.value.label,onClick:V},null,8,["style","small","large","logo","label"]),x.value?(e.openBlock(),e.createBlock(D,{key:0,class:"wu-rounded-full wu-absolute -wu-top-2 -wu-right-1 wu-h-5 wu-w-5 wu-bg-red-600","data-testid":"app-widget-unread-badge",center:""},{default:e.withCtx(()=>[e.createVNode(A,{small:"",bold:"",white:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).unreadMessagesCount>9?"9+":e.unref(i).unreadMessagesCount),1)]),_:1})]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],6))}}),Eo=ge(os,[["__scopeId","data-v-877709ba"]]),ns=["top","right","bottom","left"],Xt=["start","end"],Yt=ns.reduce((t,o)=>t.concat(o,o+"-"+Xt[0],o+"-"+Xt[1]),[]),$e=Math.min,ue=Math.max,as={left:"right",right:"left",bottom:"top",top:"bottom"},rs={start:"end",end:"start"};function yt(t,o,n){return ue(t,$e(o,n))}function de(t,o){return typeof t=="function"?t(o):t}function Y(t){return t.split("-")[0]}function Z(t){return t.split("-")[1]}function Po(t){return t==="x"?"y":"x"}function Dt(t){return t==="y"?"height":"width"}const ss=new Set(["top","bottom"]);function J(t){return ss.has(Y(t))?"y":"x"}function Lt(t){return Po(J(t))}function Mo(t,o,n){n===void 0&&(n=!1);const a=Z(t),r=Lt(t),s=Dt(r);let i=r==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return o.reference[s]>o.floating[s]&&(i=Ie(i)),[i,Ie(i)]}function is(t){const o=Ie(t);return[Oe(t),o,Oe(o)]}function Oe(t){return t.replace(/start|end/g,o=>rs[o])}const Jt=["left","right"],eo=["right","left"],ls=["top","bottom"],us=["bottom","top"];function cs(t,o,n){switch(t){case"top":case"bottom":return n?o?eo:Jt:o?Jt:eo;case"left":case"right":return o?ls:us;default:return[]}}function ds(t,o,n,a){const r=Z(t);let s=cs(Y(t),n==="start",a);return r&&(s=s.map(i=>i+"-"+r),o&&(s=s.concat(s.map(Oe)))),s}function Ie(t){return t.replace(/left|right|bottom|top/g,o=>as[o])}function ps(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ro(t){return typeof t!="number"?ps(t):{top:t,right:t,bottom:t,left:t}}function Ce(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 to(t,o,n){let{reference:a,floating:r}=t;const s=J(o),i=Lt(o),l=Dt(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 h;switch(u){case"top":h={x:f,y:a.y-r.height};break;case"bottom":h={x:f,y:a.y+a.height};break;case"right":h={x:a.x+a.width,y:d};break;case"left":h={x:a.x-r.width,y:d};break;default:h={x:a.x,y:a.y}}switch(Z(o)){case"start":h[i]-=p*(n&&c?-1:1);break;case"end":h[i]+=p*(n&&c?-1:1);break}return h}const ms=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}=to(c,a,u),p=a,h={},w=0;for(let y=0;y<l.length;y++){const{name:v,fn:x}=l[y],{x:m,y:g,data:k,reset:B}=await x({x:f,y:d,initialPlacement:a,placement:p,strategy:r,middlewareData:h,rects:c,platform:i,elements:{reference:t,floating:o}});f=m??f,d=g??d,h={...h,[v]:{...h[v],...k}},B&&w<=50&&(w++,typeof B=="object"&&(B.placement&&(p=B.placement),B.rects&&(c=B.rects===!0?await i.getElementRects({reference:t,floating:o,strategy:r}):B.rects),{x:f,y:d}=to(c,p,u)),y=-1)}return{x:f,y:d,placement:p,strategy:r,middlewareData:h}};async function Ge(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:h=0}=de(o,t),w=Ro(h),v=l[p?d==="floating"?"reference":"floating":d],x=Ce(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:f,strategy:u})),m=d==="floating"?{x:a,y:r,width:i.floating.width,height:i.floating.height}:i.reference,g=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),k=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},B=Ce(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:m,offsetParent:g,strategy:u}):m);return{top:(x.top-B.top+w.top)/k.y,bottom:(B.bottom-x.bottom+w.bottom)/k.y,left:(x.left-B.left+w.left)/k.x,right:(B.right-x.right+w.right)/k.x}}const fs=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}=de(t,o)||{};if(c==null)return{};const d=Ro(f),p={x:n,y:a},h=Lt(r),w=Dt(h),y=await i.getDimensions(c),v=h==="y",x=v?"top":"left",m=v?"bottom":"right",g=v?"clientHeight":"clientWidth",k=s.reference[w]+s.reference[h]-p[h]-s.floating[w],B=p[h]-s.reference[h],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let E=T?T[g]:0;(!E||!await(i.isElement==null?void 0:i.isElement(T)))&&(E=l.floating[g]||s.floating[w]);const N=k/2-B/2,$=E/2-y[w]/2-1,V=$e(d[x],$),R=$e(d[m],$),_=V,P=E-y[w]-R,z=E/2-y[w]/2+N,I=yt(_,z,P),H=!u.arrow&&Z(r)!=null&&z!==I&&s.reference[w]/2-(z<_?V:R)-y[w]/2<0,j=H?z<_?z-_:z-P:0;return{[h]:p[h]+j,data:{[h]:I,centerOffset:z-I-j,...H&&{alignmentOffset:j}},reset:H}}});function ws(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?Oe(r)!==r:!1):!0)}const hs=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=Yt,autoAlignment:h=!0,...w}=de(t,o),y=d!==void 0||p===Yt?ws(d||null,h,p):p,v=await Ge(o,w),x=((n=i.autoPlacement)==null?void 0:n.index)||0,m=y[x];if(m==null)return{};const g=Mo(m,s,await(u.isRTL==null?void 0:u.isRTL(c.floating)));if(l!==m)return{reset:{placement:y[0]}};const k=[v[Y(m)],v[g[0]],v[g[1]]],B=[...((a=i.autoPlacement)==null?void 0:a.overflows)||[],{placement:m,overflows:k}],T=y[x+1];if(T)return{data:{index:x+1,overflows:B},reset:{placement:T}};const E=B.map(V=>{const R=Z(V.placement);return[V.placement,R&&f?V.overflows.slice(0,2).reduce((_,P)=>_+P,0):V.overflows[0],V.overflows]}).sort((V,R)=>V[1]-R[1]),$=((r=E.filter(V=>V[2].slice(0,Z(V[0])?2:3).every(R=>R<=0))[0])==null?void 0:r[0])||E[0][0];return $!==l?{data:{index:x+1,overflows:B},reset:{placement:$}}:{}}}},gs=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:h="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:y=!0,...v}=de(t,o);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=Y(r),m=J(l),g=Y(l)===l,k=await(u.isRTL==null?void 0:u.isRTL(c.floating)),B=p||(g||!y?[Ie(l)]:is(l)),T=w!=="none";!p&&T&&B.push(...ds(l,y,w,k));const E=[l,...B],N=await Ge(o,v),$=[];let V=((a=s.flip)==null?void 0:a.overflows)||[];if(f&&$.push(N[x]),d){const z=Mo(r,i,k);$.push(N[z[0]],N[z[1]])}if(V=[...V,{placement:r,overflows:$}],!$.every(z=>z<=0)){var R,_;const z=(((R=s.flip)==null?void 0:R.index)||0)+1,I=E[z];if(I&&(!(d==="alignment"?m!==J(I):!1)||V.every(F=>J(F.placement)===m?F.overflows[0]>0:!0)))return{data:{index:z,overflows:V},reset:{placement:I}};let H=(_=V.filter(j=>j.overflows[0]<=0).sort((j,F)=>j.overflows[1]-F.overflows[1])[0])==null?void 0:_.placement;if(!H)switch(h){case"bestFit":{var P;const j=(P=V.filter(F=>{if(T){const W=J(F.placement);return W===m||W==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(W=>W>0).reduce((W,Ye)=>W+Ye,0)]).sort((F,W)=>F[1]-W[1])[0])==null?void 0:P[0];j&&(H=j);break}case"initialPlacement":H=l;break}if(r!==H)return{reset:{placement:H}}}return{}}}},vs=new Set(["left","top"]);async function ys(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=J(n)==="y",c=vs.has(i)?-1:1,f=s&&u?-1:1,d=de(o,t);let{mainAxis:p,crossAxis:h,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"&&(h=l==="end"?w*-1:w),u?{x:h*f,y:p*c}:{x:p*c,y:h*f}}const xs=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 ys(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}}}}},bs=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:v=>{let{x,y:m}=v;return{x,y:m}}},...u}=de(t,o),c={x:n,y:a},f=await Ge(o,u),d=J(Y(r)),p=Po(d);let h=c[p],w=c[d];if(s){const v=p==="y"?"top":"left",x=p==="y"?"bottom":"right",m=h+f[v],g=h-f[x];h=yt(m,h,g)}if(i){const v=d==="y"?"top":"left",x=d==="y"?"bottom":"right",m=w+f[v],g=w-f[x];w=yt(m,w,g)}const y=l.fn({...o,[p]:h,[d]:w});return{...y,data:{x:y.x-n,y:y.y-a,enabled:{[p]:s,[d]:i}}}}}},ks=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}=de(t,o),f=await Ge(o,c),d=Y(r),p=Z(r),h=J(r)==="y",{width:w,height:y}=s.floating;let v,x;d==="top"||d==="bottom"?(v=d,x=p===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(x=d,v=p==="end"?"top":"bottom");const m=y-f.top-f.bottom,g=w-f.left-f.right,k=$e(y-f[v],m),B=$e(w-f[x],g),T=!o.middlewareData.shift;let E=k,N=B;if((n=o.middlewareData.shift)!=null&&n.enabled.x&&(N=g),(a=o.middlewareData.shift)!=null&&a.enabled.y&&(E=m),T&&!p){const V=ue(f.left,0),R=ue(f.right,0),_=ue(f.top,0),P=ue(f.bottom,0);h?N=w-2*(V!==0||R!==0?V+R:ue(f.left,f.right)):E=y-2*(_!==0||P!==0?_+P:ue(f.top,f.bottom))}await u({...o,availableWidth:N,availableHeight:E});const $=await i.getDimensions(l.floating);return w!==$.width||y!==$.height?{reset:{rects:!0}}:{}}}};function U(t){var o;return((o=t.ownerDocument)==null?void 0:o.defaultView)||window}function K(t){return U(t).getComputedStyle(t)}const oo=Math.min,Be=Math.max,Fe=Math.round;function zo(t){const o=K(t);let n=parseFloat(o.width),a=parseFloat(o.height);const r=t.offsetWidth,s=t.offsetHeight,i=Fe(n)!==r||Fe(a)!==s;return i&&(n=r,a=s),{width:n,height:a,fallback:i}}function se(t){return Lo(t)?(t.nodeName||"").toLowerCase():""}let Me;function Do(){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 X(t){return t instanceof U(t).HTMLElement}function ae(t){return t instanceof U(t).Element}function Lo(t){return t instanceof U(t).Node}function no(t){return typeof ShadowRoot>"u"?!1:t instanceof U(t).ShadowRoot||t instanceof ShadowRoot}function Ze(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 Cs(t){return["table","td","th"].includes(se(t))}function xt(t){const o=/firefox/i.test(Do()),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 Oo(){return!/^((?!chrome|android).)*safari/i.test(Do())}function Ot(t){return["html","body","#document"].includes(se(t))}function Io(t){return ae(t)?t:t.contextElement}const Fo={x:1,y:1};function me(t){const o=Io(t);if(!X(o))return Fo;const n=o.getBoundingClientRect(),{width:a,height:r,fallback:s}=zo(o);let i=(s?Fe(n.width):n.width)/a,l=(s?Fe(n.height):n.height)/r;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}function Ve(t,o,n,a){var r,s;o===void 0&&(o=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),l=Io(t);let u=Fo;o&&(a?ae(a)&&(u=me(a)):u=me(t));const c=l?U(l):window,f=!Oo()&&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,h=i.width/u.x,w=i.height/u.y;if(l){const y=U(l),v=a&&ae(a)?U(a):a;let x=y.frameElement;for(;x&&a&&v!==y;){const m=me(x),g=x.getBoundingClientRect(),k=getComputedStyle(x);g.x+=(x.clientLeft+parseFloat(k.paddingLeft))*m.x,g.y+=(x.clientTop+parseFloat(k.paddingTop))*m.y,d*=m.x,p*=m.y,h*=m.x,w*=m.y,d+=g.x,p+=g.y,x=U(x).frameElement}}return{width:h,height:w,top:p,right:d+h,bottom:p+w,left:d,x:d,y:p}}function re(t){return((Lo(t)?t.ownerDocument:t.document)||window.document).documentElement}function Qe(t){return ae(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Ho(t){return Ve(re(t)).left+Qe(t).scrollLeft}function Se(t){if(se(t)==="html")return t;const o=t.assignedSlot||t.parentNode||no(t)&&t.host||re(t);return no(o)?o.host:o}function jo(t){const o=Se(t);return Ot(o)?o.ownerDocument.body:X(o)&&Ze(o)?o:jo(o)}function He(t,o){var n;o===void 0&&(o=[]);const a=jo(t),r=a===((n=t.ownerDocument)==null?void 0:n.body),s=U(a);return r?o.concat(s,s.visualViewport||[],Ze(a)?a:[]):o.concat(a,He(a))}function ao(t,o,n){return o==="viewport"?Ce((function(a,r){const s=U(a),i=re(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=Oo();(p||!p&&r==="fixed")&&(f=l.offsetLeft,d=l.offsetTop)}return{width:u,height:c,x:f,y:d}})(t,n)):ae(o)?Ce((function(a,r){const s=Ve(a,!0,r==="fixed"),i=s.top+a.clientTop,l=s.left+a.clientLeft,u=X(a)?me(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)):Ce((function(a){const r=re(a),s=Qe(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+Ho(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}})(re(t)))}function ro(t){return X(t)&&K(t).position!=="fixed"?t.offsetParent:null}function so(t){const o=U(t);let n=ro(t);for(;n&&Cs(n)&&K(n).position==="static";)n=ro(n);return n&&(se(n)==="html"||se(n)==="body"&&K(n).position==="static"&&!xt(n))?o:n||(function(a){let r=Se(a);for(;X(r)&&!Ot(r);){if(xt(r))return r;r=Se(r)}return null})(t)||o}function Bs(t,o,n){const a=X(o),r=re(o),s=Ve(t,!0,n==="fixed",o);let i={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(a||!a&&n!=="fixed")if((se(o)!=="body"||Ze(r))&&(i=Qe(o)),X(o)){const u=Ve(o,!0);l.x=u.x+o.clientLeft,l.y=u.y+o.clientTop}else r&&(l.x=Ho(r));return{x:s.left+i.scrollLeft-l.x,y:s.top+i.scrollTop-l.y,width:s.width,height:s.height}}const _s={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((v=>ae(v)&&se(v)!=="body")),h=null;const w=K(c).position==="fixed";let y=w?Se(c):c;for(;ae(y)&&!Ot(y);){const v=K(y),x=xt(y);(w?x||h:x||v.position!=="static"||!h||!["absolute","fixed"].includes(h.position))?h=v:p=p.filter((m=>m!==y)),y=Se(y)}return f.set(c,p),p})(o,this._c):[].concat(n),i=[...s,a],l=i[0],u=i.reduce(((c,f)=>{const d=ao(o,f,r);return c.top=Be(d.top,c.top),c.right=oo(d.right,c.right),c.bottom=oo(d.bottom,c.bottom),c.left=Be(d.left,c.left),c}),ao(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=re(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")&&((se(n)!=="body"||Ze(s))&&(i=Qe(n)),X(n))){const c=Ve(n);l=me(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:ae,getDimensions:function(t){return X(t)?zo(t):t.getBoundingClientRect()},getOffsetParent:so,getDocumentElement:re,getScale:me,async getElementRects(t){let{reference:o,floating:n,strategy:a}=t;const r=this.getOffsetParent||so,s=this.getDimensions;return{reference:Bs(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"},Ns=(t,o,n)=>{const a=new Map,r={platform:_s,...n},s={...r.platform,_c:a};return ms(t,o,{...r,platform:s})};function Wo(t,o){for(const n in o)Object.prototype.hasOwnProperty.call(o,n)&&(typeof o[n]=="object"&&t[n]?Wo(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 Te(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 $s(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 io(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 Uo=!1;typeof window<"u"&&typeof navigator<"u"&&(Uo=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const qo=["auto","top","bottom","left","right"].reduce((t,o)=>t.concat([o,`${o}-start`,`${o}-end`]),[]),lo={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},uo={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function co(t,o){const n=t.indexOf(o);n!==-1&&t.splice(n,1)}function ut(){return new Promise(t=>requestAnimationFrame(()=>{requestAnimationFrame(t)}))}const G=[];let ie=null;const po={};function mo(t){let o=po[t];return o||(o=po[t]=[]),o}let bt=function(){};typeof window<"u"&&(bt=window.Element);function L(t){return function(o){return Te(o.theme,t)}}const ct="__floating-vue__popper",Go=()=>e.defineComponent({name:"VPopper",provide(){return{[ct]:{parentPopper:this}}},inject:{[ct]:{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:L("disabled")},positioningDisabled:{type:Boolean,default:L("positioningDisabled")},placement:{type:String,default:L("placement"),validator:t=>qo.includes(t)},delay:{type:[String,Number,Object],default:L("delay")},distance:{type:[Number,String],default:L("distance")},skidding:{type:[Number,String],default:L("skidding")},triggers:{type:Array,default:L("triggers")},showTriggers:{type:[Array,Function],default:L("showTriggers")},hideTriggers:{type:[Array,Function],default:L("hideTriggers")},popperTriggers:{type:Array,default:L("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:L("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:L("popperHideTriggers")},container:{type:[String,Object,bt,Boolean],default:L("container")},boundary:{type:[String,bt],default:L("boundary")},strategy:{type:String,validator:t=>["absolute","fixed"].includes(t),default:L("strategy")},autoHide:{type:[Boolean,Function],default:L("autoHide")},handleResize:{type:Boolean,default:L("handleResize")},instantMove:{type:Boolean,default:L("instantMove")},eagerMount:{type:Boolean,default:L("eagerMount")},popperClass:{type:[String,Array,Object],default:L("popperClass")},computeTransformOrigin:{type:Boolean,default:L("computeTransformOrigin")},autoMinSize:{type:Boolean,default:L("autoMinSize")},autoSize:{type:[Boolean,String],default:L("autoSize")},autoMaxSize:{type:Boolean,default:L("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:L("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:L("preventOverflow")},overflowPadding:{type:[Number,String],default:L("overflowPadding")},arrowPadding:{type:[Number,String],default:L("arrowPadding")},arrowOverflow:{type:Boolean,default:L("arrowOverflow")},flip:{type:Boolean,default:L("flip")},shift:{type:Boolean,default:L("shift")},shiftCrossAxis:{type:Boolean,default:L("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:L("noAutoFocus")},disposeTimeout:{type:Number,default:L("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[ct])==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(xs({mainAxis:this.distance,crossAxis:this.skidding}));const o=this.placement.startsWith("auto");if(o?t.middleware.push(hs({alignment:this.placement.split("-")[1]??""})):t.placement=this.placement,this.preventOverflow&&(this.shift&&t.middleware.push(bs({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!o&&this.flip&&t.middleware.push(gs({padding:this.overflowPadding,boundary:this.boundary}))),t.middleware.push(fs({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(ks({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 Ns(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),ie&&this.instantMove&&ie.instantMove&&ie!==this.parentPopper){ie.$_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&&(ie=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 ut(),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 io(this.theme))mo(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 ut(),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,co(G,this),G.length===0&&document.body.classList.remove("v-popper--some-open");for(const n of io(this.theme)){const a=mo(n);co(a,this),a.length===0&&document.body.classList.remove(`v-popper--some-open--${n}`)}ie===this&&(ie=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 ut(),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,lo,this.triggers,this.showTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],lo,this.popperTriggers,this.popperShowTriggers,t);const o=n=>{n.usedByTooltip||this.hide({event:n})};this.$_registerTriggerListeners(this.$_targetNodes,uo,this.triggers,this.hideTriggers,o),this.$_registerTriggerListeners([this.$_popperNode],uo,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(_e>=t.left&&_e<=t.right&&Ne>=t.top&&Ne<=t.bottom){const o=this.$_popperNode.getBoundingClientRect(),n=_e-te,a=Ne-oe,r=o.left+o.width/2-te+(o.top+o.height/2)-oe+o.width+o.height,s=te+n*r,i=oe+a*r;return Re(te,oe,s,i,o.left,o.top,o.left,o.bottom)||Re(te,oe,s,i,o.left,o.top,o.right,o.top)||Re(te,oe,s,i,o.right,o.top,o.right,o.bottom)||Re(te,oe,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(Uo){const t=he?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",o=>fo(o,!0),t),document.addEventListener("touchend",o=>wo(o,!0),t)}else window.addEventListener("mousedown",t=>fo(t,!1),!0),window.addEventListener("click",t=>wo(t,!1),!0);window.addEventListener("resize",Ss)}function fo(t,o){if(Q.autoHideOnMousedown)Zo(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 wo(t,o){Q.autoHideOnMousedown||Zo(t,o)}function Zo(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]&&ho(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&&ho(i,i.containsGlobalTarget,t);)i.$_handleGlobalClose(t,o),i=i.parentPopper}})}catch{}}}function ho(t,o,n){return n.closeAllPopover||n.closePopover&&o||Vs(t,n)&&!o}function Vs(t,o){if(typeof t.autoHide=="function"){const n=t.autoHide(o);return t.lastAutoHide=n,n}return t.autoHide}function Ss(){for(let t=0;t<G.length;t++)G[t].$_computePosition()}let te=0,oe=0,_e=0,Ne=0;typeof window<"u"&&window.addEventListener("mousemove",t=>{te=_e,oe=Ne,_e=t.clientX,Ne=t.clientY},he?{passive:!0}:void 0);function Re(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 Ts={extends:Go()},Ke=(t,o)=>{const n=t.__vccOpts||t;for(const[a,r]of o)n[a]=r;return n};function As(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 Es=Ke(Ts,[["render",As]]);function Ps(){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 ze;function kt(){kt.init||(kt.init=!0,ze=Ps()!==-1)}var Xe={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){kt(),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",ze&&this.$el.appendChild(t),t.data="about:blank",ze||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&&(!ze&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const Ms=e.withScopeId("data-v-b329ee4c");e.pushScopeId("data-v-b329ee4c");const Rs={class:"resize-observer",tabindex:"-1"};e.popScopeId();const zs=Ms((t,o,n,a,r,s)=>(e.openBlock(),e.createBlock("div",Rs)));Xe.render=zs;Xe.__scopeId="data-v-b329ee4c";Xe.__file="src/components/ResizeObserver.vue";const Qo=(t="theme")=>({computed:{themeClass(){return $s(this[t])}}}),Ds=e.defineComponent({name:"VPopperContent",components:{ResizeObserver:Xe},mixins:[Qo()],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}}}),Ls=["id","aria-hidden","tabindex","data-popper-placement"],Os={ref:"inner",class:"v-popper__inner"},Is=e.createElementVNode("div",{class:"v-popper__arrow-outer"},null,-1),Fs=e.createElementVNode("div",{class:"v-popper__arrow-inner"},null,-1),Hs=[Is,Fs];function js(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",Os,[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)},Hs,4)],4)],46,Ls)}const Ko=Ke(Ds,[["render",js]]),Xo={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 Ct=function(){};typeof window<"u"&&(Ct=window.Element);const Ws=e.defineComponent({name:"VPopperWrapper",components:{Popper:Es,PopperContent:Ko},mixins:[Xo,Qo("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,Ct,Boolean],default:void 0},boundary:{type:[String,Ct],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 Us(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:h,hide:w,handleResize:y,onResize:v,classes:x,result:m})=>[e.renderSlot(t.$slots,"default",{shown:c,show:h,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":y,classes:x,result:m,onHide:w,onResize:v},{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 It=Ke(Ws,[["render",Us]]),qs={...It,name:"VDropdown",vPopperTheme:"dropdown"},Gs={...It,name:"VMenu",vPopperTheme:"menu"},Zs={...It,name:"VTooltip",vPopperTheme:"tooltip"},Qs=e.defineComponent({name:"VTooltipDirective",components:{Popper:Go(),PopperContent:Ko},mixins:[Xo],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:t=>Te(t.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:t=>Te(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}}}),Ks=["innerHTML"],Xs=["textContent"];function Ys(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:h,handleResize:w,onResize:y,classes:v,result:x})=>[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:v,result:x,onHide:h,onResize:y},{default:e.withCtx(()=>[t.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:t.finalContent},null,8,Ks)):(e.openBlock(),e.createElementBlock("div",{key:1,textContent:e.toDisplayString(t.finalContent)},null,8,Xs))]),_: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 Js=Ke(Qs,[["render",Ys]]),Yo="v-popper--has-tooltip";function ei(t,o){let n=t.placement;if(!n&&o)for(const a of qo)o[a]&&(n=a);return n||(n=Te(t.theme||"tooltip","placement")),n}function Jo(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=ei(a,n),a.targetNodes=()=>[t],a.referenceNode=()=>t,a}let dt,Ae,ti=0;function oi(){if(dt)return;Ae=e.ref([]),dt=e.createApp({name:"VTooltipDirectiveApp",setup(){return{directives:Ae}},render(){return this.directives.map(o=>e.h(Js,{...o.options,shown:o.shown||o.options.shown,key:o.id}))},devtools:{hide:!0}});const t=document.createElement("div");document.body.appendChild(t),dt.mount(t)}function ni(t,o,n){oi();const a=e.ref(Jo(t,o,n)),r=e.ref(!1),s={id:ti++,options:a,shown:r};return Ae.value.push(s),t.classList&&t.classList.add(Yo),t.$_popper={options:a,item:s,show(){r.value=!0},hide(){r.value=!1}}}function en(t){if(t.$_popper){const o=Ae.value.indexOf(t.$_popper.item);o!==-1&&Ae.value.splice(o,1),delete t.$_popper,delete t.$_popperOldShown,delete t.$_popperMountTarget}t.classList&&t.classList.remove(Yo)}function go(t,{value:o,modifiers:n}){const a=Jo(t,o,n);if(!a.content||Te(a.theme||"tooltip","disabled"))en(t);else{let r;t.$_popper?(r=t.$_popper,r.options.value=a):r=ni(t,o,n),typeof o.shown<"u"&&o.shown!==t.$_popperOldShown&&(t.$_popperOldShown=o.shown,o.shown?r.show():r.hide())}}const ai={beforeMount:go,updated:go,beforeUnmount(t){en(t)}};function vo(t){t.addEventListener("mousedown",je),t.addEventListener("click",je),t.addEventListener("touchstart",tn,he?{passive:!0}:!1)}function yo(t){t.removeEventListener("mousedown",je),t.removeEventListener("click",je),t.removeEventListener("touchstart",tn),t.removeEventListener("touchend",on),t.removeEventListener("touchcancel",nn)}function je(t){const o=t.currentTarget;t.closePopover=!o.$_vclosepopover_touch,t.closeAllPopover=o.$_closePopoverModifiers&&!!o.$_closePopoverModifiers.all}function tn(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",on),o.addEventListener("touchcancel",nn)}}function on(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 nn(t){const o=t.currentTarget;o.$_vclosepopover_touch=!1}const ri={beforeMount(t,{value:o,modifiers:n}){t.$_closePopoverModifiers=n,(typeof o>"u"||o)&&vo(t)},updated(t,{value:o,oldValue:n,modifiers:a}){t.$_closePopoverModifiers=a,o!==n&&(typeof o>"u"||o?vo(t):yo(t))},beforeUnmount(t){yo(t)}};function si(t,o={}){t.$_vTooltipInstalled||(t.$_vTooltipInstalled=!0,Wo(Q,o),t.directive("tooltip",ai),t.directive("close-popper",ri),t.component("VTooltip",Zs),t.component("VDropdown",qs),t.component("VMenu",Gs))}const ii={version:"5.2.2",install:si,options:Q},li="c3fd21c9-c91a-4c66-baa5-c3e050c2cc74",xo="2026-10-30T16:35:31.633Z",ui="da3cbfd7-4cdc-481b-a30e-314a9ce96b92",ci="https://svgl.app/library/slack.svg",ve=t=>({id:t.id,companyId:li,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:xo,updatedAt:xo}),le=(t,o)=>({id:t,nextRuleId:o}),Bt=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:ci,title:"Slack",subtitle:"Retire todas suas dúvidas no nosso Widget"}}}),pt=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"}]}}}),mt=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}}}),ft=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"}]}}}),bo=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:"Encontre respostas, orientações e suporte para sua experiência."},body:{content:{"pt-BR":`
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");function Ti(){return{maskPhone:a=>{if(!a)return"";let r=a.replace(/\D/g,"");return r.length<=4?r:(r.startsWith("0")&&!r.startsWith("0800")&&r.length>3&&(r=r.replace(/^0+/,"")),r.startsWith("0800")?r.length>11?r:r.replace(/(0800)(\d{0,3})(\d{0,4})/,(s,l,u,c)=>[l,u,c].filter(Boolean).join(" ")):r.length>11?r:r.length<=8?r.replace(/(\d{4})(\d{0,4})/,"$1-$2").replace(/-$/,""):r.length===9?r.replace(/(\d{5})(\d{0,4})/,"$1-$2"):r.length===10?r.replace(/(\d{2})(\d{0,4})(\d{0,4})/,"($1) $2-$3").replace(/-$/,""):r.replace(/(\d{2})(\d{0,5})(\d{0,4})/,"($1) $2-$3").replace(/-$/,""))},maskCnpj:a=>{const r=a.toUpperCase().replace(/[^0-9A-Z]/g,"");let s="";for(const l of r){if(s.length>=14)break;(s.length<12||/\d/.test(l))&&(s+=l)}return s.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 sa(){return{}}const eo=t=>t.from==="system"||t.from==="operator"||t.from==="contact"?t.from:t.provider?t.provider==="opens"?"operator":"contact":"system",to=t=>{const o=t.attachments?.data;return Array.isArray(o)?o:[]},ve=t=>to(t)[0],la=t=>typeof t.caption=="string"?t.caption.trim():"",Bi=t=>t.messageBody?.trim()??"",Ni=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"})},ua=t=>t.type==="document"&&t.filename.toLowerCase().endsWith(".pdf"),Ai=(t,o)=>{const n=o.metadata&&typeof o.metadata=="object"?o.metadata:null,i=t.selectedValue||(typeof n?.selectedValue=="string"?n.selectedValue:void 0),a=t.selectedOption||(typeof n?.selectedOption=="string"?n.selectedOption:void 0),r=t.selectedAt||(typeof n?.selectedAt=="string"?n.selectedAt:void 0);return{selectedValue:i,selectedOption:a,selectedAt:r}},kt=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:i,selectedOption:a,selectedAt:r}=Ai(n,t),l=!!(i||a)||t.canBeInteractedWith===!1;return{description:n.description||"",selectedOption:a,selectedValue:i,selectedAt:r,menu:n.menu.map(u=>{const c=!!(i&&u.value===i||a&&u.label===a);return{...u,selected:c,disabled:l?!0:!!u.disabled}})}}catch{return null}},Si=(t,o)=>{if(!t||!o)return!1;const n=new Date(t),i=new Date(o);return Number.isNaN(n.getTime())||Number.isNaN(i.getTime())?!1:Math.floor(n.getTime()/6e4)===Math.floor(i.getTime()/6e4)},Ei=t=>!!(t&&t.messageType==="image"&&!la(t)),_i=(t=[])=>{if(!t.length)return[];const o=[];let n=[];const i=()=>{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,from:a.from,messageType:"_grouped_images",messageBody:"",createdAt:a.createdAt,canBeInteractedWith:!1,messages:[...n]})}n=[]}};for(const a of t){if(!Ei(a)){i(),o.push(a);continue}if(!n.length){n.push(a);continue}const r=n[n.length-1];if(r.from===a.from&&Si(r.createdAt,a.createdAt)){n.push(a);continue}i(),n.push(a)}return i(),o},$i=t=>t?.data?.length?{data:t.data.map(o=>({...o}))}:null,Vi=t=>t?.map(o=>Vo(o)),Vo=t=>({...t,from:eo(t),caption:t.caption??null,attachments:$i(t.attachments),...t.messages?{messages:Vi(t.messages)}:{}});class Re{payload;constructor(o){this.payload=Vo(o)}static fromJSON(o){return new Re(o)}static toJSON(o){return Vo(o.payload)}toJSON(){return Re.toJSON(this)}get from(){return eo(this.payload)}get isSystemLike(){return this.from==="system"}get attachments(){return to(this.payload)}get primaryAttachment(){return ve(this.payload)}}const Di=["canBeInteractedWith","recipientId","chatRoomId","companyId","createdAt","provider","metadata","id"],Li=t=>{const o={};for(const n of Di)t[n]!==void 0&&(o[n]=t[n]);return o},Nn=(t,o="")=>typeof t=="string"?t:t==null?o:String(t);class Jo{payload={messageType:"text",messageBody:""};constructor(){}static create(){return new Jo}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,...Li(o),messageType:Nn(o.messageType,"text")||"text",messageBody:Nn(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 Re.fromJSON({...this.payload,messageType:this.payload.messageType||"text",messageBody:this.payload.messageBody??"",attachments:this.payload.attachments??null})}}const wo=e.ref([]),go=e.ref([]),Pi=e.ref(""),Ri=e.shallowRef([]),Oi=e.shallowRef(null),Ii=e.ref(!1),zi=e.ref(!1),Mi=e.ref(!1),Hi=e.ref(!1),Fi=e.ref(!1),dt=t=>Re.fromJSON(t).toJSON();function ca(){const t=r=>{wo.value.push(dt(r))},o=r=>{wo.value=r.map(dt)};return{unreadMessagesCount:e.computed(()=>go.value.length),isSendingMessage:Ii,isErrorLoading:zi,attachments:Ri,isFinished:Mi,isLoading:Hi,messages:wo,isTyping:Fi,audio:Oi,text:Pi,setUnreadMessages:r=>{go.value=r.map(dt)},addUnreadMessage:r=>{go.value.push(dt(r))},setMessages:o,addMessage:t}}function da(){const t=ca(),o=sa();return{chat:t,voice:o}}const vo=e.ref(!1),je=e.ref([]),yo=e.ref(void 0),fe=e.ref(void 0),bo=e.ref(void 0),Do=e.ref(void 0),pa=t=>!!(t?.logo?.trim()||t?.title?.trim()||t?.subtitle?.trim()),An=t=>{!t||!pa(t)||(Do.value={...t})},Se=()=>{const t=w=>{const y=new Set(Object.values(w.edges??{}).flatMap(x=>x.map(T=>T.nextRuleId)));return w.rules.find(x=>!y.has(x.id))??w.rules[0]},o=(w,y)=>{const x=new Map(w.rules.map(T=>[T.id,T]));return(w.edges[y]??[]).flatMap(T=>{const $=x.get(T.nextRuleId);return $?[$]:[]})},n=e.computed(()=>new Map((fe.value?.rules??[]).map(w=>[w.id,w]))),i=e.computed(()=>fe.value?t(fe.value):void 0),a=e.computed(()=>{const w=yo.value;return w&&n.value.get(w)||i.value}),r=e.computed(()=>!fe.value||!a.value?[]:o(fe.value,a.value.id)),s=e.computed(()=>{const w=a.value?.settings?.header;return pa(w)?w:Do.value}),l=e.computed(()=>bo.value?.configurations.general.language??"pt-BR"),u=da();return{currentRuleId:yo,currentHeader:s,currentRule:a,rootRule:i,workflow:fe,language:l,history:je,isOpen:vo,config:bo,edges:r,open:()=>{vo.value=!0},close:()=>{vo.value=!1},setCurrentRuleId:w=>{yo.value=w,An(a.value?.settings?.header)},clearHistory:()=>{je.value=[]},setWorkflow:w=>{fe.value?.id!==w?.id&&(Do.value=void 0),fe.value=w,An(a.value?.settings?.header)},setConfig:w=>{bo.value=w},pushHistory:w=>{je.value.push(w)},setHistory:w=>{je.value=[...w]},popHistory:()=>je.value.pop(),...u}},De=t=>t==="name",Sn=t=>!!t?.trim(),ji=t=>{const o=t.filter(i=>De(i.name)),n=t.filter(i=>!De(i.name));return[...o,...n]};function Ui(t,o){const{maskPhone:n,maskCpf:i}=Ti(),{history:a}=Se(),r=e.ref(0),s=e.ref("forward"),l=e.ref(null),u=e.computed(()=>{const N=e.toValue(t),L=N.settings?.form&&N.settings.form.fields||[];return ji(L)}),c=e.reactive(Object.fromEntries(u.value.map(N=>[N.name,""]))),f=e.computed(()=>u.value[r.value]),d=e.computed(()=>r.value>=u.value.length-1),p=e.computed(()=>a.value.length>0||r.value>0),m=e.computed(()=>s.value==="back"?"step-back":"step-forward");e.watch(r,async()=>{await e.nextTick();const N=l.value;if(!N)return;(N.querySelector(".is-active input")??N.querySelector("input"))?.focus({preventScroll:!0})});const h=e.computed(()=>u.value.every(N=>!N.required||Sn(c[N.name]))),g=N=>{const L=u.value[N];return L?L.required&&!Sn(c[L.name])?!1:N>=u.value.length-1?h.value:!0:h.value},v=e.computed(()=>g(r.value)),b=e.computed(()=>{const N=u.value.find(L=>De(L.name));return N?c[N.name]?.trim().split(/\s+/)[0]??"":""}),w=N=>{const L=u.value[N],P=b.value,M=u.value.length?`Passo ${N+1} de ${u.value.length}`:"",j=e.toValue(t),q=N>=u.value.length-1;if(!L)return{eyebrow:M,title:j.settings?.body?.title??j.name??"",subtitle:j.settings?.body?.subtitle??""};if(De(L.name))return{eyebrow:M,title:"Como podemos te chamar?",subtitle:"Primeiro, nos diga o seu nome."};const U=q?P?`Quase lá, ${P}.`:"Quase lá.":P?`Olá, ${P}.`:"Olá.",G=L.required?`Informe seu ${L.label} para continuar.`:`Gostaria de deixar seu ${L.label}?`;return{eyebrow:M,title:U,subtitle:G}},y=e.computed(()=>w(r.value)),x=N=>N==="email"?"email":N==="phone"?"tel":"text",T=N=>N==="email"?"email":N==="phone"?"call":De(N)?"person":N==="order"?"receipt":"badge",$=N=>N.required?`${N.label} *`:N.label,D=N=>De(N.name)?"Seu nome":N.name==="phone"?"Seu telefone":N.name==="email"?"Seu e-mail":N.name==="cpf"?"000.000.000-00":N.placeholder||N.label,S=N=>{if(N==="phone")return n;if(N==="cpf")return i},A=()=>{h.value&&o("submit",{...c})};return{stepTransition:m,currentField:f,canContinue:v,currentStep:r,isLastStep:d,stepIntro:y,fieldHost:l,showBack:p,fields:u,form:c,continueStep:()=>{if(v.value){if(d.value||u.value.length===0)return A();s.value="forward",r.value+=1}},canContinueAt:g,introFor:w,fieldLabel:$,fieldPlaceholder:D,fieldType:x,fieldMask:S,fieldIcon:T,goBack:()=>{if(r.value>0){s.value="back",r.value-=1;return}o("back")}}}function fa(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"),i=e.computed(()=>t.fluid?"!wu-w-full":"wu-w-fit");return{height:o,textSize:n,width:i}}function Wi(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})),i=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})),r=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:i,weightClass:a,sizeClass:r}}const qi=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:i,weightClass:a,sizeClass:r}=Wi("text",o);return(s,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(i),e.unref(a),e.unref(r)]])},[e.renderSlot(s.$slots,"default",{},void 0,!0)],2))}}),ze=(t,o)=>{const n=t.__vccOpts||t;for(const[i,a]of o)n[i]=a;return n},V=ze(qi,[["__scopeId","data-v-5fc0fe9d"]]),z=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":""),i=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"),r=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"),s=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(()=>[a.value,r.value,s.value,l.value,i.value,u.value,c.value,f.value,n.value,d.value]);return(m,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-flex",p.value])},[e.renderSlot(m.$slots,"default")],2))}}),Gi={class:"wu-flex wu-flex-col wu-items-stretch wu-w-full wu-cursor-text wu-gap-1","data-testid":"app-form-text-input"},Ki=["value","type","placeholder","disabled","maxlength","aria-invalid"],Xo=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 i=t,a=n,r=e.computed(()=>e.useSlots());function s(v){return!!r.value[v]}const l=e.ref(""),u=e.ref(!1);function c(v){if(!i.maskFunction)return v;try{const b=i.maskFunction(v);return typeof b=="string"?b:v}catch{return v}}e.watch(()=>i.modelValue,v=>{if(v==null){l.value="";return}l.value=i.maskFunction?c(v):v},{immediate:!0});const{width:f}=fa(i),d=e.computed(()=>i.invalid?"wu-text-red-500":i.valid?"wu-text-green-500":""),p=e.computed(()=>i.invalid?"wu-text-red-600 placeholder:wu-text-red-300 placeholder:wu-font-medium":i.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(()=>i.invalid?"wu-text-red-500":i.valid?"wu-text-green-500":"wu-text-gray-500"),h=e.computed(()=>i.disabled?"wu-opacity-50 wu-pointer-events-none":"");function g(v){const w=v.target.value;l.value=i.maskFunction?c(w):w,a("update:modelValue",l.value)}return o({focus:u,content:l}),(v,b)=>(e.openBlock(),e.createBlock(z,{class:e.normalizeClass([e.unref(f),h.value]),col:"","gap-none":""},{default:e.withCtx(()=>[e.createElementVNode("label",Gi,[s("default")?(e.openBlock(),e.createBlock(V,{key:0,small:"",gray:"",class:e.normalizeClass([d.value])},{default:e.withCtx(()=>[e.renderSlot(v.$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:g,onFocus:b[0]||(b[0]=w=>u.value=!0),onBlur:b[1]||(b[1]=w=>u.value=!1),onKeyup:b[2]||(b[2]=e.withKeys(w=>a("keyup-enter"),["enter"]))},null,42,Ki)]),s("feedback")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["wu-mt-1",[m.value]])},[e.renderSlot(v.$slots,"feedback")],2)):e.createCommentVNode("",!0)]),_:3},8,["class"]))}});function Qi(t){const o=e.computed(()=>t.fit?"wu-h-auto wu-min-h-0":t.small?"!wu-h-8 !wu-min-h-[2rem]":""),n=e.computed(()=>"!wu-text-xs"),i=e.computed(()=>t.fit?"wu-px-3 wu-py-2":t.small?"wu-px-[0.625rem]":"wu-p-[0.9rem]"),a=e.computed(()=>t.fluid?"!wu-w-full":t.fit?"wu-w-fit wu-max-w-full":"wu-w-fit");return{height:o,textSize:n,padding:i,width:a}}const _=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"),i=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(r,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["notranslate wu-flex wu-items-center wu-justify-center wu-text-center",[n.value,i.value,a.value]]),"data-testid":"app-icon"},[e.renderSlot(r.$slots,"default")],2))}}),Zi=["disabled"],Yi={class:"wu-flex wu-items-center wu-justify-center wu-gap-2"},F=e.defineComponent({__name:"app-button",props:{small:Boolean,soft:Boolean,outline:Boolean,ghost:Boolean,link:Boolean,round:Boolean,icon:Boolean,fluid:Boolean,fit: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 i(h){return!!n.value[h]}const{height:a,textSize:r,padding:s,width:l}=Qi(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":s.value),d=e.computed(()=>o.icon?"wu-justify-center":o.fit?"wu-justify-start wu-text-left":"wu-justify-between"),p=e.computed(()=>o.fit?"wu-leading-snug [overflow-wrap:anywhere]":""),m=e.computed(()=>o.disabled||o.loading?"wu-opacity-50 wu-pointer-events-none":"");return(h,g)=>(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(r),u.value,c.value,e.unref(l),e.unref(a),m.value,f.value,d.value,p.value]]),type:"button",disabled:t.disabled||t.loading,"data-testid":"app-button",onClick:g[0]||(g[0]=v=>h.$emit("click",v))},[e.createElementVNode("div",Yi,[t.loading?(e.openBlock(),e.createBlock(_,{key:0,class:"wu-animate-spin wu-flex wu-items-center wu-justify-center",small:"",outlined:""},{default:e.withCtx(()=>[...g[1]||(g[1]=[e.createTextVNode("progress_activity",-1)])]),_:1})):i("icon")?(e.openBlock(),e.createBlock(_,{key:1,small:""},{default:e.withCtx(()=>[e.renderSlot(h.$slots,"icon")]),_:3})):e.createCommentVNode("",!0),!t.loading&&i("default")?(e.openBlock(),e.createBlock(V,{key:2,class:"!wu-text-inherit",small:""},{default:e.withCtx(()=>[e.renderSlot(h.$slots,"default")]),_:3})):e.createCommentVNode("",!0)]),!t.loading&&i("trailing")?(e.openBlock(),e.createBlock(_,{key:0,small:""},{default:e.withCtx(()=>[e.renderSlot(h.$slots,"trailing")]),_:3})):e.createCommentVNode("",!0)],10,Zi))}}),Ji=["aria-hidden"],Xi=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 i=t,a=n,r=e.useSlots(),s=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(i.modelValue,0)),m=()=>(r.default?.()??[]).flatMap(S=>S.type===e.Comment||S.type===e.Text?[]:S.type===e.Fragment?(S.children??[]).filter(A=>!!A&&typeof A=="object"&&A.type!==e.Comment&&A.type!==e.Text):[S]),h=S=>{const A=Math.abs(S-p.value);return A===0?"is-active":A===1?"is-adjacent":"is-far"},g=S=>{const A=l.value?.childElementCount||m().length,E=Math.min(Math.max(S,0),Math.max(A-1,0));E!==i.modelValue&&a("update:modelValue",E)},v=()=>{const S=s.value;S&&(S.scrollLeft&&(S.scrollLeft=0),S.scrollTop&&(S.scrollTop=0))},b=(S,A)=>{const E=getComputedStyle(S)[A].trim(),R=parseFloat(E);if(!Number.isFinite(R)||R<=0)return 0;if(E.endsWith("%")){const N=A==="scrollPaddingTop"?S.clientHeight:S.clientWidth;return R/100*N}return R},w=()=>{const S=s.value,A=l.value;if(!S||!A)return;v();const E=[...A.children],R=parseFloat(getComputedStyle(A).gap)||0,N=i.vertical?"scrollPaddingTop":"scrollPaddingLeft",L=b(S,N),P=U=>i.vertical?U.offsetHeight:U.offsetWidth,M=E[p.value]?P(E[p.value]):0,j=i.vertical&&i.fill?Math.max((S.clientHeight-M)/2,0):L,q=E.slice(0,p.value).reduce((U,G)=>U+P(G)+R,0);u.value=j-q,c.value=i.vertical&&!i.fill?M+L*2:0,f.value=!0},y=()=>{d?.disconnect();const S=s.value,A=l.value;if(!(!S||!A)&&(w(),!(typeof ResizeObserver>"u"))){if(d=new ResizeObserver(w),d.observe(S),i.vertical)for(const E of A.children)d.observe(E);S.removeEventListener("scroll",v),S.addEventListener("scroll",v,{passive:!0})}},x=e.computed(()=>[i.vertical?"wu-carousel--vertical":"wu-carousel--horizontal",{"is-ready":f.value,"wu-carousel--fill":i.fill}]),T=e.computed(()=>i.vertical?"wu-flex-col wu-items-stretch":"wu-flex-row wu-items-center"),$=e.computed(()=>{if(!(!i.vertical||i.fill||!c.value))return{height:`${c.value}px`}}),D=e.computed(()=>{const S=`${u.value}px`;return{transform:i.vertical?`translate3d(0, ${S}, 0)`:`translate3d(${S}, 0, 0)`}});return e.watch(()=>[i.vertical,i.fill,i.modelValue],async()=>{await e.nextTick(),y()}),e.onMounted(async()=>{await e.nextTick(),y()}),e.onBeforeUnmount(()=>{d?.disconnect(),s.value?.removeEventListener("scroll",v)}),o({next:()=>g(p.value+1),prev:()=>g(p.value-1),goTo:g}),(S,A)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-relative wu-w-full wu-overflow-hidden",x.value]),ref_key:"rootRef",ref:s,"data-testid":"app-carousel",style:e.normalizeStyle($.value)},[e.createElementVNode("div",{class:e.normalizeClass(["wu-carousel-track wu-flex",T.value]),ref_key:"trackRef",ref:l,style:e.normalizeStyle(D.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m(),(E,R)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-carousel-slide",h(R)]),key:E.key??R,"aria-hidden":R!==p.value,"data-testid":"app-carousel-slide"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E)))],10,Ji))),128))],6)],6))}}),oo=ze(Xi,[["__scopeId","data-v-96f06600"]]),er={class:"wu-flex wu-flex-col wu-w-full wu-h-full"},tr={class:"wu-relative wu-flex wu-items-center wu-w-full wu-shrink-0"},or={class:"wu-flex wu-shrink-0 wu-items-center wu-w-fit wu-justify-center wu-px-6 wu-py-4"},nr={class:"wu-absolute wu-inset-0 wu-flex wu-items-center wu-justify-center wu-pointer-events-none"},ar={class:"wu-flex wu-items-center wu-gap-1.5"},en=e.defineComponent({__name:"app-identification-page",props:{rule:{},edges:{}},emits:["submit","back"],setup(t,{emit:o}){const n=t,i=o,{currentStep:a,fieldHost:r,showBack:s,fields:l,form:u,continueStep:c,canContinueAt:f,introFor:d,fieldPlaceholder:p,fieldType:m,fieldMask:h,goBack:g}=Ui(()=>n.rule,i);return(v,b)=>(e.openBlock(),e.createElementBlock("div",er,[e.createElementVNode("div",tr,[e.createElementVNode("div",or,[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(s)}]),onClick:b[0]||(b[0]=(...w)=>e.unref(g)&&e.unref(g)(...w))},[e.createVNode(_,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200",small:"",gray:""},{default:e.withCtx(()=>[...b[2]||(b[2]=[e.createTextVNode("chevron_left",-1)])]),_:1}),e.createVNode(V,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200","extra-small":"",medium:"",gray:""},{default:e.withCtx(()=>[...b[3]||(b[3]=[e.createTextVNode("Voltar",-1)])]),_:1})],2)]),e.createElementVNode("div",nr,[e.createElementVNode("div",ar,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(w,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-h-1 wu-w-6 wu-rounded-full wu-transition-colors",y<=e.unref(a)?"wu-bg-gray-900 dark:wu-bg-white":"wu-bg-gray-200 dark:wu-bg-neutral-600"]),key:y},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:r},[e.createVNode(oo,{class:"wu-w-full wu-h-full",modelValue:e.unref(a),"onUpdate:modelValue":b[1]||(b[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(l),(w,y)=>(e.openBlock(),e.createBlock(z,{class:"wu-w-full wu-gap-8",key:w.name,col:"",center:""},{default:e.withCtx(()=>[e.createVNode(z,{class:"wu-w-full wu-relative wu-pr-6",col:"","gap-sm":""},{default:e.withCtx(()=>[e.unref(d)(y).title?(e.openBlock(),e.createBlock(V,{key:0,class:"wu-text-left","extra-large":"",semibold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)(y).title),1)]),_:2},1024)):e.createCommentVNode("",!0),e.unref(d)(y).subtitle?(e.openBlock(),e.createBlock(V,{key:1,class:"wu-text-left",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)(y).subtitle),1)]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(V,{class:"wu-opacity-50 wu-absolute -wu-top-2 wu-right-0",gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y+1),1)]),_:2},1024)]),_:2},1024),e.createVNode(z,{class:"wu-w-full wu-items-center",col:"","gap-md":""},{default:e.withCtx(()=>[e.createVNode(Xo,{modelValue:e.unref(u)[w.name],"onUpdate:modelValue":x=>e.unref(u)[w.name]=x,"mask-function":e.unref(h)(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(F,{fluid:"",disabled:!e.unref(f)(y),onClick:e.unref(c)},{trailing:e.withCtx(()=>[...b[4]||(b[4]=[e.createTextVNode("arrow_forward",-1)])]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y>=e.unref(l).length-1?"Finalizar":"Continuar"),1)]),_:2},1032,["disabled","onClick"])]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["modelValue"])],512)]))}}),ir=["disabled"],rr=["src"],tn=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()),i=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"),r=e.computed(()=>o.small?"wu-w-6 wu-h-6":o.large?"wu-w-8 wu-h-8":"wu-w-7 wu-h-7"),s=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",[a.value,i.value,s.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(_,{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",r.value]),src:t.logo,alt:"","data-testid":"app-anchor-logo"},null,10,rr)):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createBlock(V,{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,ir))}}),sr="widgets",lr={"widget-identification-screen":"assignment","widget-base-screen":"desktop_windows","widget-article-screen":"description","widget-service-screen":"chat"},En={chat:"chat",voice:"phone_in_talk"},ur=t=>{if(t.action==="widget-service-screen"){const o=t.settings?.behavior;if(o&&o in En)return En[o]}return lr[t.action]??sr},cr={key:0,class:"wu-flex wu-flex-col wu-items-center wu-gap-2","data-testid":"app-edge"},dr=["src"],pr={key:1,class:"wu-w-full wu-max-w-[25rem]","data-testid":"app-edge"},fr=["src"],Oe=e.defineComponent({__name:"app-edge",props:{edge:{},icon:{type:Boolean}},emits:["click"],setup(t,{emit:o}){const n=t,i=o,a=e.computed(()=>n.edge.settings?.header?.logo),r=e.computed(()=>ur(n.edge));return(s,l)=>t.icon?(e.openBlock(),e.createElementBlock("div",cr,[e.createVNode(F,{outline:"",icon:"",onClick:l[0]||(l[0]=u=>i("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,dr)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(r.value),1)],64))]),_:1}),e.createVNode(V,{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",pr,[e.createVNode(F,{class:"hover:wu-translate-x-1",outline:"",fluid:"",onClick:l[1]||(l[1]=u=>i("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,fr)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(r.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})]))}}),mr={class:"wu-flex wu-flex-col wu-w-full wu-gap-8"},hr={key:0,class:"wu-flex wu-items-center wu-w-fit wu-justify-center wu-h-0"},wr=["innerHTML"],gr={key:2,class:"wu-flex wu-flex-col wu-items-center wu-justify-start wu-gap-2 wu-px-6 wu-w-full"},vr=e.defineComponent({__name:"app-article-page",props:{rule:{},edges:{}},emits:["edge-click"],setup(t,{emit:o}){const n=t,i=o,{history:a,language:r}=Se(),s=e.computed(()=>a.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 h=r.value;return m[h]??m["pt-BR"]??Object.values(m).find(Boolean)??""},p=e.computed(()=>d(f.value?.content));return(m,h)=>(e.openBlock(),e.createElementBlock("div",mr,[s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",hr)),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,wr)):e.createCommentVNode("",!0),l.value.length?(e.openBlock(),e.createElementBlock("div",gr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,g=>(e.openBlock(),e.createBlock(Oe,{key:g.id,edge:g,onClick:h[0]||(h[0]=v=>i("edge-click",v))},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,g=>(e.openBlock(),e.createBlock(Oe,{key:g.id,edge:g,icon:"",onClick:h[1]||(h[1]=v=>i("edge-click",v))},null,8,["edge"]))),128))],2)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),h[2]||(h[2]=e.createElementVNode("div",{class:"wu-flex wu-items-center wu-w-fit wu-justify-center wu-h-0"},null,-1))]))}}),on=ze(vr,[["__scopeId","data-v-54b98051"]]),yr=120,br=()=>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",kr=t=>t.includes("mp4")?"m4a":"webm",_n=t=>t.toString().padStart(2,"0");function xr(){const t=e.ref(!1),o=e.ref(0),n=e.ref(null);let i=null,a=null,r=[],s=null,l="audio/webm",u=!1,c=null;const f=e.computed(()=>{const w=Math.floor(o.value/60),y=o.value%60;return`${_n(w)}:${_n(y)}`}),d=()=>{s&&(clearInterval(s),s=null)},p=()=>{a?.getTracks().forEach(w=>w.stop()),a=null},m=()=>{d(),p(),i=null,r=[],o.value=0,t.value=!1},h=()=>{if(!r.length)return null;const w=l.split(";")[0]||"audio/webm",y=new Blob(r,{type:w});return new File([y],`recording.${kr(w)}`,{type:w})},g=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}),l=br(),r=[],i=new MediaRecorder(a,{mimeType:l}),i.ondataavailable=w=>{w.data.size>0&&r.push(w.data)},i.onstop=()=>{const w=u?null:h(),y=c;c=null,u=!1,m(),y?.(w)},i.start(),t.value=!0,o.value=0,s=setInterval(()=>{o.value+=1,o.value>=yr&&v()},1e3),!0}catch{return m(),n.value="Não foi possível acessar o microfone",!1}},v=()=>!i||i.state==="inactive"?(m(),Promise.resolve(null)):(d(),t.value=!1,new Promise(w=>{c=w,i?.stop(),p()})),b=async()=>{u=!0,r=[],await v()};return e.onUnmounted(()=>{b()}),{formattedDuration:f,durationSeconds:o,isRecording:t,error:n,cancel:b,start:g,stop:v}}const Cr=["src","alt"],Tr=["src"],Br=["src"],Nr=["title"],no=e.defineComponent({__name:"app-media-preview",props:{open:{type:Boolean},items:{},index:{}},emits:["close","update:index"],setup(t,{emit:o}){const n=t,i=o,a=e.computed({get:()=>n.index??0,set:p=>i("update:index",p)}),r=e.computed(()=>a.value>0),s=e.computed(()=>a.value<n.items.length-1),l=e.computed(()=>n.items.length>1),u=()=>i("close"),c=()=>{r.value&&(a.value-=1)},f=()=>{s.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(_,{light:""},{default:e.withCtx(()=>[...m[2]||(m[2]=[e.createTextVNode("close",-1)])]),_:1})]),l.value&&r.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(_,{light:""},{default:e.withCtx(()=>[...m[3]||(m[3]=[e.createTextVNode("chevron_left",-1)])]),_:1})])):e.createCommentVNode("",!0),l.value&&s.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(_,{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(oo,{class:"wu-w-full",modelValue:a.value,"onUpdate:modelValue":m[0]||(m[0]=h=>a.value=h)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(h,g)=>(e.openBlock(),e.createElementBlock("div",{class:"wu-flex wu-flex-col wu-items-center wu-justify-center wu-gap-3",key:`${h.src}-${g}`},[h.type==="image"?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-rounded wu-object-contain wu-w-full wu-max-h-[80vh]",src:h.src,alt:h.filename||"Imagem"},null,8,Cr)):h.type==="video"?(e.openBlock(),e.createElementBlock("video",{key:1,class:"wu-rounded wu-object-contain wu-w-full wu-max-h-[80vh]",src:h.src,controls:""},null,8,Tr)):h.type==="pdf"?(e.openBlock(),e.createElementBlock("iframe",{key:2,class:"wu-bg-white wu-rounded wu-w-full wu-h-[85vh]",src:h.src,frameborder:"0"},null,8,Br)):e.createCommentVNode("",!0),h.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:h.filename},e.toDisplayString(h.filename),9,Nr)):e.createCommentVNode("",!0)]))),128))]),_:1},8,["modelValue"])])])):e.createCommentVNode("",!0)]))}}),Ar=["onClick"],Sr=["src","alt"],Er={key:1,class:"wu-flex wu-items-center wu-justify-center wu-w-full wu-h-full"},_r={key:2,class:"wu-absolute wu-inset-0 wu-flex wu-items-center wu-justify-center wu-bg-black wu-bg-opacity-50"},$r={class:"wu-text-white wu-text-lg wu-font-semibold"},Vr=e.defineComponent({__name:"app-message-grouped-images",props:{message:{}},setup(t){const o=t,n=e.computed(()=>o.message.messages||[]),i=e.computed(()=>n.value.slice(0,4)),a=e.computed(()=>Math.max(0,n.value.length-4)),r=f=>ve(f)?.link||"",s=e.ref(!1),l=e.ref(0),u=e.computed(()=>{const f=[];for(const d of n.value){const p=ve(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),s.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]",i.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(i.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:h=>c(m)},[r(p)?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-full wu-h-full wu-object-cover",src:r(p),alt:e.unref(ve)(p)?.filename||"Imagem"},null,8,Sr)):(e.openBlock(),e.createElementBlock("div",Er,[e.createVNode(_,{gray:"",large:""},{default:e.withCtx(()=>[...d[2]||(d[2]=[e.createTextVNode("image",-1)])]),_:1})])),m===i.value.length-1&&a.value>0?(e.openBlock(),e.createElementBlock("div",_r,[e.createElementVNode("span",$r,e.toDisplayString(`+${a.value}`),1)])):e.createCommentVNode("",!0)],8,Ar))),128)),e.createVNode(no,{open:s.value,items:u.value,index:l.value,onClose:d[0]||(d[0]=p=>s.value=!1),"onUpdate:index":d[1]||(d[1]=p=>l.value=p)},null,8,["open","items","index"])],2))}}),Dr=["disabled"],lt=e.defineComponent({__name:"app-audio-player",props:{src:{},file:{}},setup(t){const o=t,n=e.ref(null),i=e.ref(!1),a=e.ref(0),r=e.ref(0),s=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 E=Math.floor(A/60),R=Math.floor(A%60);return`${u(E)}:${u(R)}`},f=e.computed(()=>!r.value||!Number.isFinite(r.value)?0:Math.min(100,a.value/r.value*100)),d=e.computed(()=>Number.isFinite(r.value)&&r.value>0),p=e.computed(()=>`${c(a.value)} / ${c(r.value)}`),m=()=>{l.value&&(URL.revokeObjectURL(l.value),l.value=null)},h=()=>{if(m(),o.src)return o.src;if(o.file)return l.value=URL.createObjectURL(e.toRaw(o.file)),l.value},g=()=>{r.value=n.value?.duration||0},v=()=>{a.value=n.value?.currentTime||0},b=()=>{i.value=!1,a.value=0,n.value&&(n.value.currentTime=0)},w=()=>{n.value&&(n.value.pause(),n.value.removeEventListener("loadedmetadata",g),n.value.removeEventListener("timeupdate",v),n.value.removeEventListener("ended",b),n.value=null,i.value=!1,a.value=0,r.value=0)},y=()=>{w();const A=h();if(!A)return;const E=new Audio(A);E.addEventListener("loadedmetadata",g),E.addEventListener("timeupdate",v),E.addEventListener("ended",b),E.playbackRate=s.value,n.value=E},x=async()=>{!n.value||!d.value||(await n.value.play(),i.value=!0)},T=()=>{n.value&&(n.value.pause(),i.value=!1)},$=()=>{i.value?T():x()},D=A=>{if(!n.value||!d.value)return;const R=A.currentTarget.getBoundingClientRect(),N=Math.min(1,Math.max(0,(A.clientX-R.left)/R.width));n.value.currentTime=N*r.value,a.value=n.value.currentTime},S=()=>{s.value=Math.max(1,(s.value+.5)%2.5),n.value&&(n.value.playbackRate=s.value)};return e.watch(()=>[o.src,o.file],()=>y(),{immediate:!0}),e.onBeforeUnmount(()=>{w(),m()}),(A,E)=>(e.openBlock(),e.createBlock(z,{class:"wu-w-full wu-min-w-0 wu-items-center","data-testid":"app-audio-player","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(F,{"data-testid":"app-audio-player-toggle",onClick:$,disabled:!d.value,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(_,{gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value?"pause":"play_arrow"),1)]),_:1})]),_:1},8,["disabled"]),e.createVNode(z,{class:"wu-flex-1 wu-min-w-0",col:"","gap-xs":""},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"wu-relative wu-w-full wu-rounded-full wu-cursor-pointer wu-h-1.5 wu-bg-gray-400 dark:wu-bg-neutral-500 disabled:wu-cursor-default",type:"button","data-testid":"app-audio-player-seek",disabled:!d.value,onClick:D},[e.createElementVNode("div",{class:"wu-absolute wu-left-0 wu-top-0 wu-bottom-0 wu-rounded-full wu-bg-primary-500 wu-transition-all",style:e.normalizeStyle({width:`${f.value}%`})},null,4),e.createElementVNode("div",{class:"wu-absolute wu-w-2 wu-h-2 wu-rounded-full wu-bg-primary-600 wu-shrink-0 wu-transition-all -wu-translate-x-1/2 -wu-translate-y-1/2 wu-top-1/2",style:e.normalizeStyle({left:`${f.value}%`})},null,4)],8,Dr),e.createVNode(V,{"extra-small":"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value),1)]),_:1})]),_:1}),e.createVNode(F,{"data-testid":"app-audio-player-speed",onClick:S,disabled:!d.value,ghost:"",small:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value)+"x",1)]),_:1},8,["disabled"])]),_:1}))}}),Lr={class:"wu-flex wu-flex-col wu-gap-2 wu-min-w-[12rem]","data-testid":"app-message-attachments"},Pr=["innerHTML"],Rr=["onClick"],Or=["src","alt"],Ir=["src"],zr={key:2,class:"wu-flex wu-items-center wu-justify-center wu-w-full wu-h-full"},Mr={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"},Fr={key:0,class:"wu-flex-1 wu-min-w-0"},jr=e.defineComponent({__name:"app-message-attachments",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,i=o,a=e.computed(()=>to(n.message)),r=e.computed(()=>a.value.filter(y=>y.type==="image"||y.type==="video")),s=e.computed(()=>a.value.filter(y=>y.type!=="image"&&y.type!=="video")),l=e.computed(()=>r.value.slice(0,4)),u=e.computed(()=>Math.max(0,r.value.length-4)),c=e.computed(()=>Bi(n.message)),f=e.computed(()=>la(n.message)),d=e.computed(()=>!!(l.value.length||s.value.length)),p=e.ref(!1),m=e.ref(0),h=e.ref([]),g=y=>{h.value=r.value.filter(x=>x.link).map(x=>({src:x.link,type:x.type==="video"?"video":"image",filename:x.filename})),h.value.length&&(m.value=Math.min(y,h.value.length-1),p.value=!0)},v=y=>{y.link&&(h.value=[{src:y.link,type:"pdf",filename:y.filename}],m.value=0,p.value=!0)},b=()=>{p.value=!1,h.value=[]},w=y=>{i("chat-service-message-action",{action:"download",message:n.message,attachment:y})};return(y,x)=>(e.openBlock(),e.createElementBlock("div",Lr,[c.value?(e.openBlock(),e.createBlock(V,{key:0,class:"wu-whitespace-pre-wrap","data-testid":"app-message-attachments-body",gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createElementVNode("span",{innerHTML:c.value},null,8,Pr)]),_: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,(T,$)=>(e.openBlock(),e.createElementBlock("div",{class:"wu-relative wu-aspect-square wu-bg-gray-100 wu-cursor-pointer dark:wu-bg-neutral-800",key:T.id,onClick:D=>g($)},[T.type==="image"&&T.link?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-full wu-h-full wu-object-cover",src:T.link,alt:T.filename},null,8,Or)):T.type==="video"&&T.link?(e.openBlock(),e.createElementBlock("video",{key:1,class:"wu-w-full wu-h-full wu-object-cover",src:T.link,preload:"metadata"},null,8,Ir)):(e.openBlock(),e.createElementBlock("div",zr,[e.createVNode(_,{gray:"",large:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.type==="video"?"videocam":"image"),1)]),_:2},1024)])),$===l.value.length-1&&u.value>0?(e.openBlock(),e.createElementBlock("div",Mr,[e.createElementVNode("span",Hr,e.toDisplayString(`+${u.value}`),1)])):e.createCommentVNode("",!0),e.createVNode(F,{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(D=>w(T),["stop"]),ghost:"",small:"",icon:"",round:""},{icon:e.withCtx(()=>[e.createVNode(_,{class:"!wu-text-white dark:!wu-text-white"},{default:e.withCtx(()=>[...x[1]||(x[1]=[e.createTextVNode("download",-1)])]),_:1})]),_:1},8,["onClick"])],8,Rr))),128))],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,T=>(e.openBlock(),e.createBlock(z,{class:"wu-items-center wu-bg-white dark:wu-bg-neutral-800",key:T.id,"padding-sm":"",rounded:"",border:"","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(z,{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(_,{gray:"",large:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.type==="audio"?"mic":"file_present"),1)]),_:2},1024)]),_:2},1024),T.type==="audio"&&T.link?(e.openBlock(),e.createElementBlock("div",Fr,[e.createVNode(lt,{src:T.link},null,8,["src"])])):(e.openBlock(),e.createBlock(V,{key:1,class:"wu-flex-1 wu-min-w-0 [overflow-wrap:anywhere]",title:T.filename,semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.filename),1)]),_:2},1032,["title"])),e.unref(ua)(T)?(e.openBlock(),e.createBlock(F,{key:2,onClick:$=>v(T),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(_,{gray:""},{default:e.withCtx(()=>[...x[2]||(x[2]=[e.createTextVNode("visibility",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(F,{onClick:$=>w(T),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(_,{gray:""},{default:e.withCtx(()=>[...x[3]||(x[3]=[e.createTextVNode("download",-1)])]),_:1})]),_:1},8,["onClick"])]),_:2},1024))),128)),f.value&&d.value?(e.openBlock(),e.createBlock(V,{key:2,class:"wu-whitespace-pre-wrap","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(no,{open:p.value,items:h.value,index:m.value,onClose:b,"onUpdate:index":x[0]||(x[0]=T=>m.value=T)},null,8,["open","items","index"])]))}}),Ur={class:"wu-w-full wu-px-3 wu-py-2 wu-bg-primary-500"},Wr=["disabled","onClick"],qr=e.defineComponent({__name:"app-message-interactive",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,i=o,a=e.ref(kt(n.message));e.watch(()=>[n.message.messageBody,n.message.metadata,n.message.canBeInteractedWith],()=>{a.value=kt(n.message)});const r=e.computed(()=>!!(n.message.canBeInteractedWith&&a.value)),s=l=>{r.value&&(l.disabled||l.selected||(i("chat-service-message-action",{action:"select-option",message:n.message,option:l}),a.value&&(a.value={...a.value,selectedOption:l.label,selectedValue:l.value,selectedAt:new Date().toISOString(),menu:a.value.menu.map(u=>({...u,selected:u.value===l.value,disabled:!0}))})))};return(l,u)=>a.value?(e.openBlock(),e.createBlock(z,{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",Ur,[e.createVNode(V,{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:!r.value||c.disabled,onClick:d=>s(c)},[e.createVNode(z,{class:"wu-items-start wu-flex-1 wu-min-w-0",col:"","gap-none":""},{default:e.withCtx(()=>[e.createVNode(V,{semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.label),1)]),_:2},1024),c.description?(e.openBlock(),e.createBlock(V,{key:0,"extra-small":"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.description),1)]),_:2},1024)):e.createCommentVNode("",!0)]),_:2},1024),e.createVNode(_,{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,Wr))),128))]),_:1})):e.createCommentVNode("",!0)}}),Gr={class:"wu-flex wu-flex-col wu-gap-2 wu-min-w-[14rem]","data-testid":"app-message-document"},Kr=e.defineComponent({__name:"app-message-document",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,i=o,a=e.computed(()=>ve(n.message)),r=e.computed(()=>a.value?.filename||n.message.messageBody||"Documento"),s=e.computed(()=>!!(a.value?.link&&ua(a.value))),l=e.ref(!1),u=e.computed(()=>!s.value||!a.value?.link?[]:[{src:a.value.link,type:"pdf",filename:a.value.filename}]),c=()=>{i("chat-service-message-action",{action:"download",message:n.message,attachment:a.value})};return(f,d)=>(e.openBlock(),e.createElementBlock("div",Gr,[e.createVNode(z,{class:"wu-items-center wu-bg-white dark:wu-bg-neutral-800","padding-sm":"",rounded:"",border:"","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(z,{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(_,{gray:"",large:""},{default:e.withCtx(()=>[...d[2]||(d[2]=[e.createTextVNode("file_present",-1)])]),_:1})]),_:1}),e.createVNode(V,{class:"wu-flex-1 wu-min-w-0 [overflow-wrap:anywhere]",title:r.value,semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1},8,["title"]),s.value?(e.openBlock(),e.createBlock(F,{key:0,onClick:d[0]||(d[0]=p=>l.value=!0),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(_,{gray:""},{default:e.withCtx(()=>[...d[3]||(d[3]=[e.createTextVNode("visibility",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(F,{onClick:c,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(_,{gray:""},{default:e.withCtx(()=>[...d[4]||(d[4]=[e.createTextVNode("download",-1)])]),_:1})]),_:1})]),_:1}),t.message.caption?(e.openBlock(),e.createBlock(V,{key:0,class:"wu-whitespace-pre-wrap",gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.message.caption),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(no,{open:l.value,items:u.value,index:0,onClose:d[1]||(d[1]=p=>l.value=!1)},null,8,["open","items"])]))}}),Qr={class:"wu-w-full wu-px-3 wu-py-2 wu-bg-primary-500"},Zr=["disabled","onClick"],Yr=e.defineComponent({__name:"app-message-survey",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,i=o,a=e.ref(kt(n.message));e.watch(()=>[n.message.messageBody,n.message.metadata,n.message.canBeInteractedWith],()=>{a.value=kt(n.message)});const r=e.computed(()=>!!(n.message.canBeInteractedWith&&a.value)),s=e.computed(()=>!!a.value?.menu.some(u=>u.selected)),l=u=>{r.value&&(u.disabled||u.selected||(i("chat-service-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(z,{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",Qr,[e.createVNode(V,{class:"!wu-text-[var(--wu-primary-fg)]",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value.description),1)]),_:1})]),r.value&&!s.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=>l(f)},[e.createVNode(V,{semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.label),1)]),_:2},1024),e.createVNode(_,{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,Zr))),128)):(e.openBlock(),e.createBlock(z,{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(V,{small:"",gray:""},{default:e.withCtx(()=>[...c[0]||(c[0]=[e.createTextVNode("Pesquisa de satisfação já respondida",-1)])]),_:1}),e.createVNode(_,{class:"wu-text-green-500"},{default:e.withCtx(()=>[...c[1]||(c[1]=[e.createTextVNode("check_circle",-1)])]),_:1})]),_:1}))]),_:1})):e.createCommentVNode("",!0)}}),Lo=e.defineComponent({__name:"app-message-audio",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,i=o,a=e.computed(()=>ve(n.message)),r=e.computed(()=>a.value?.link||""),s=()=>{i("chat-service-message-action",{action:"download",message:n.message,attachment:a.value})};return(l,u)=>(e.openBlock(),e.createBlock(z,{class:"wu-items-center wu-min-w-[14rem]","gap-sm":"","data-testid":"app-message-audio"},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createBlock(lt,{key:0,class:"wu-flex-1",src:r.value},null,8,["src"])):(e.openBlock(),e.createBlock(z,{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(_,{gray:""},{default:e.withCtx(()=>[...u[0]||(u[0]=[e.createTextVNode("mic",-1)])]),_:1})]),_:1})),e.createVNode(F,{onClick:s,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(_,{gray:""},{default:e.withCtx(()=>[...u[1]||(u[1]=[e.createTextVNode("download",-1)])]),_:1})]),_:1})]),_:1}))}}),Jr={class:"wu-flex wu-flex-col wu-gap-2 wu-min-w-[10rem]","data-testid":"app-message-image"},Xr={class:"wu-relative wu-rounded wu-overflow-hidden wu-bg-gray-100 dark:wu-bg-neutral-800"},es=["src","alt"],ts={key:1,class:"wu-flex wu-items-center wu-justify-center wu-h-32"},os=e.defineComponent({__name:"app-message-image",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,i=o,a=e.computed(()=>ve(n.message)),r=e.computed(()=>a.value?.link||""),s=e.ref(!1),l=e.computed(()=>r.value?[{src:r.value,type:"image",filename:a.value?.filename}]:[]),u=()=>{i("chat-service-message-action",{action:"download",message:n.message,attachment:a.value})};return(c,f)=>(e.openBlock(),e.createElementBlock("div",Jr,[e.createElementVNode("div",Xr,[r.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-full wu-max-h-64 wu-object-cover wu-cursor-pointer",src:r.value,alt:a.value?.filename||t.message.caption||"Imagem",onClick:f[0]||(f[0]=d=>s.value=!0)},null,8,es)):(e.openBlock(),e.createElementBlock("div",ts,[e.createVNode(_,{gray:"",large:""},{default:e.withCtx(()=>[...f[2]||(f[2]=[e.createTextVNode("image",-1)])]),_:1})])),e.createVNode(F,{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(_,{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(V,{key:0,gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.message.caption),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(no,{open:s.value,items:l.value,index:0,onClose:f[1]||(f[1]=d=>s.value=!1)},null,8,["open","items"])]))}}),ns={class:"wu-flex wu-flex-col wu-gap-2 wu-min-w-[12rem]","data-testid":"app-message-video"},as={class:"wu-relative wu-rounded wu-overflow-hidden wu-bg-black"},is=["src"],rs={key:1,class:"wu-flex wu-items-center wu-justify-center wu-h-32"},ss=e.defineComponent({__name:"app-message-video",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,i=o,a=e.computed(()=>ve(n.message)),r=e.computed(()=>a.value?.link||""),s=()=>{i("chat-service-message-action",{action:"download",message:n.message,attachment:a.value})};return(l,u)=>(e.openBlock(),e.createElementBlock("div",ns,[e.createElementVNode("div",as,[r.value?(e.openBlock(),e.createElementBlock("video",{key:0,class:"wu-w-full wu-max-h-64",src:r.value,controls:"",preload:"metadata"},null,8,is)):(e.openBlock(),e.createElementBlock("div",rs,[e.createVNode(_,{gray:"",large:""},{default:e.withCtx(()=>[...u[0]||(u[0]=[e.createTextVNode("videocam",-1)])]),_:1})])),e.createVNode(F,{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:s,ghost:"",small:"",icon:"",round:""},{icon:e.withCtx(()=>[e.createVNode(_,{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(V,{key:0,gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.message.caption),1)]),_:1})):e.createCommentVNode("",!0)]))}}),ls=["href"],us=["src","alt"],cs={class:"wu-flex wu-min-w-0 wu-flex-1 wu-flex-col wu-items-start wu-overflow-hidden wu-pr-4 wu-gap-0.5"},ds={class:"wu-truncate"},ps=e.defineComponent({__name:"app-message-link-preview",props:{preview:{}},setup(t){const o=t,n=e.ref(!1),i=e.computed(()=>o.preview.url||"#"),a=e.computed(()=>o.preview.images?.[0]||o.preview.favicons?.[0]||""),r=e.computed(()=>!n.value&&!!o.preview.title);return(s,l)=>r.value?(e.openBlock(),e.createElementBlock("a",{key:0,class:"wu-relative wu-flex wu-items-center wu-gap-2 wu-rounded-lg wu-border wu-border-gray-200 wu-bg-white wu-p-2 wu-no-underline dark:wu-border-neutral-700 dark:wu-bg-neutral-800","data-testid":"app-message-link-preview",href:i.value,target:"_blank",rel:"noopener noreferrer"},[e.createElementVNode("button",{class:"wu-absolute wu-right-1 wu-top-1 wu-border-0 wu-bg-transparent wu-p-0 wu-cursor-pointer",type:"button","aria-label":"Fechar preview",onClick:l[0]||(l[0]=e.withModifiers(u=>n.value=!0,["prevent"]))},[e.createVNode(_,{gray:"",small:""},{default:e.withCtx(()=>[...l[1]||(l[1]=[e.createTextVNode("close",-1)])]),_:1})]),a.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-h-12 wu-w-12 wu-shrink-0 wu-rounded wu-object-cover",src:a.value,alt:t.preview.title||"Link preview"},null,8,us)):e.createCommentVNode("",!0),e.createElementVNode("div",cs,[e.createVNode(V,{class:"wu-line-clamp-1 wu-leading-3",semibold:"","extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.preview.title),1)]),_:1}),t.preview.description?(e.openBlock(),e.createBlock(V,{key:0,class:"wu-line-clamp-2 wu-leading-3",gray:"","extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.preview.description),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(V,{class:"wu-flex wu-max-w-full wu-items-center wu-gap-1 wu-truncate",gray:"","extra-small":""},{default:e.withCtx(()=>[e.createVNode(_,{gray:"",small:""},{default:e.withCtx(()=>[...l[2]||(l[2]=[e.createTextVNode("link",-1)])]),_:1}),e.createElementVNode("span",ds,e.toDisplayString(t.preview.url),1)]),_:1})])],8,ls)):e.createCommentVNode("",!0)}}),fs="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos6kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12b0cam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",ms="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",Po="numeric",Ro="ascii",Oo="alpha",We="asciinumeric",Ue="alphanumeric",Io="domain",ma="emoji",hs="scheme",ws="slashscheme",ko="whitespace";function gs(t,o){return t in o||(o[t]=[]),o[t]}function Ne(t,o,n){o[Po]&&(o[We]=!0,o[Ue]=!0),o[Ro]&&(o[We]=!0,o[Oo]=!0),o[We]&&(o[Ue]=!0),o[Oo]&&(o[Ue]=!0),o[Ue]&&(o[Io]=!0),o[ma]&&(o[Io]=!0);for(const i in o){const a=gs(i,n);a.indexOf(t)<0&&a.push(t)}}function vs(t,o){const n={};for(const i in o)o[i].indexOf(t)>=0&&(n[i]=!0);return n}function Z(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}Z.groups={};Z.prototype={accepts(){return!!this.t},go(t){const o=this,n=o.j[t];if(n)return n;for(let i=0;i<o.jr.length;i++){const a=o.jr[i][0],r=o.jr[i][1];if(r&&a.test(t))return r}return o.jd},has(t,o=!1){return o?t in this.j:!!this.go(t)},ta(t,o,n,i){for(let a=0;a<t.length;a++)this.tt(t[a],o,n,i)},tr(t,o,n,i){i=i||Z.groups;let a;return o&&o.j?a=o:(a=new Z(o),n&&i&&Ne(o,n,i)),this.jr.push([t,a]),a},ts(t,o,n,i){let a=this;const r=t.length;if(!r)return a;for(let s=0;s<r-1;s++)a=a.tt(t[s]);return a.tt(t[r-1],o,n,i)},tt(t,o,n,i){i=i||Z.groups;const a=this;if(o&&o.j)return a.j[t]=o,o;const r=o;let s,l=a.go(t);if(l?(s=new Z,Object.assign(s.j,l.j),s.jr.push.apply(s.jr,l.jr),s.jd=l.jd,s.t=l.t):s=new Z,r){if(i)if(s.t&&typeof s.t=="string"){const u=Object.assign(vs(s.t,i),n);Ne(r,u,i)}else n&&Ne(r,n,i);s.t=r}return a.j[t]=s,s}};const I=(t,o,n,i,a)=>t.ta(o,n,i,a),W=(t,o,n,i,a)=>t.tr(o,n,i,a),$n=(t,o,n,i,a)=>t.ts(o,n,i,a),k=(t,o,n,i,a)=>t.tt(o,n,i,a),de="WORD",zo="UWORD",ha="ASCIINUMERICAL",wa="ALPHANUMERICAL",tt="LOCALHOST",Mo="TLD",Ho="UTLD",gt="SCHEME",$e="SLASH_SCHEME",nn="NUM",Fo="WS",an="NL",qe="OPENBRACE",Ge="CLOSEBRACE",xt="OPENBRACKET",Ct="CLOSEBRACKET",Tt="OPENPAREN",Bt="CLOSEPAREN",Nt="OPENANGLEBRACKET",At="CLOSEANGLEBRACKET",St="FULLWIDTHLEFTPAREN",Et="FULLWIDTHRIGHTPAREN",_t="LEFTCORNERBRACKET",$t="RIGHTCORNERBRACKET",Vt="LEFTWHITECORNERBRACKET",Dt="RIGHTWHITECORNERBRACKET",Lt="FULLWIDTHLESSTHAN",Pt="FULLWIDTHGREATERTHAN",Rt="AMPERSAND",Ot="APOSTROPHE",It="ASTERISK",ge="AT",zt="BACKSLASH",Mt="BACKTICK",Ht="CARET",Ae="COLON",rn="COMMA",Ft="DOLLAR",ae="DOT",jt="EQUALS",sn="EXCLAMATION",J="HYPHEN",Ke="PERCENT",Ut="PIPE",Wt="PLUS",Le="POUND",Be="QUERY",ln="QUOTE",ga="FULLWIDTHMIDDLEDOT",un="SEMI",ie="SLASH",Qe="TILDE",qt="UNDERSCORE",va="EMOJI",Gt="SYM";var ya=Object.freeze({__proto__:null,ALPHANUMERICAL:wa,AMPERSAND:Rt,APOSTROPHE:Ot,ASCIINUMERICAL:ha,ASTERISK:It,AT:ge,BACKSLASH:zt,BACKTICK:Mt,CARET:Ht,CLOSEANGLEBRACKET:At,CLOSEBRACE:Ge,CLOSEBRACKET:Ct,CLOSEPAREN:Bt,COLON:Ae,COMMA:rn,DOLLAR:Ft,DOT:ae,EMOJI:va,EQUALS:jt,EXCLAMATION:sn,FULLWIDTHGREATERTHAN:Pt,FULLWIDTHLEFTPAREN:St,FULLWIDTHLESSTHAN:Lt,FULLWIDTHMIDDLEDOT:ga,FULLWIDTHRIGHTPAREN:Et,HYPHEN:J,LEFTCORNERBRACKET:_t,LEFTWHITECORNERBRACKET:Vt,LOCALHOST:tt,NL:an,NUM:nn,OPENANGLEBRACKET:Nt,OPENBRACE:qe,OPENBRACKET:xt,OPENPAREN:Tt,PERCENT:Ke,PIPE:Ut,PLUS:Wt,POUND:Le,QUERY:Be,QUOTE:ln,RIGHTCORNERBRACKET:$t,RIGHTWHITECORNERBRACKET:Dt,SCHEME:gt,SEMI:un,SLASH:ie,SLASH_SCHEME:$e,SYM:Gt,TILDE:Qe,TLD:Mo,UNDERSCORE:qt,UTLD:Ho,UWORD:zo,WORD:de,WS:Fo});const ue=/[a-z]/;let Ve=/[a-z]/i,vt=/[\u{1F000}-\u{1FAFF}\u{2600}-\u{27BF}]|\u{FE0F}/u;try{Ve=new RegExp("\\p{L}","u"),vt=new RegExp("\\p{Emoji}","u")}catch{}const ce=/\d/,xo=/\s/,Vn="\r",Co=`
|
|
2
|
+
`,ys="️",bs="",To="";let pt=null,ft=null;function ks(t=[]){const o={};Z.groups=o;const n=new Z;pt==null&&(pt=Dn(fs)),ft==null&&(ft=Dn(ms)),k(n,"'",Ot),k(n,"{",qe),k(n,"}",Ge),k(n,"[",xt),k(n,"]",Ct),k(n,"(",Tt),k(n,")",Bt),k(n,"<",Nt),k(n,">",At),k(n,"(",St),k(n,")",Et),k(n,"「",_t),k(n,"」",$t),k(n,"『",Vt),k(n,"』",Dt),k(n,"<",Lt),k(n,">",Pt),k(n,"&",Rt),k(n,"*",It),k(n,"@",ge),k(n,"`",Mt),k(n,"^",Ht),k(n,":",Ae),k(n,",",rn),k(n,"$",Ft),k(n,".",ae),k(n,"=",jt),k(n,"!",sn),k(n,"-",J),k(n,"%",Ke),k(n,"|",Ut),k(n,"+",Wt),k(n,"#",Le),k(n,"?",Be),k(n,'"',ln),k(n,"/",ie),k(n,";",un),k(n,"~",Qe),k(n,"_",qt),k(n,"\\",zt),k(n,"・",ga);const i=W(n,ce,nn,{[Po]:!0});W(i,ce,i);const a=W(i,ue,ha,{[We]:!0}),r=W(i,Ve,wa,{[Ue]:!0}),s=W(n,ue,de,{[Ro]:!0});W(s,ce,a),W(s,ue,s),W(a,ce,a),W(a,ue,a);const l=W(n,Ve,zo,{[Oo]:!0});W(l,ue),W(l,ce,r),W(l,Ve,l),W(r,ce,r),W(r,ue),W(r,Ve,r);const u=k(n,Co,an,{[ko]:!0}),c=k(n,Vn,Fo,{[ko]:!0}),f=W(n,xo,Fo,{[ko]:!0});k(n,To,f),k(c,Co,u),k(c,To,f),W(c,xo,f),k(f,Vn),k(f,Co),W(f,xo,f),k(f,To,f);const d=W(n,vt,va,{[ma]:!0});k(d,"#"),W(d,vt,d),k(d,ys,d);const p=k(d,bs);k(p,"#"),W(p,vt,d);const m=[[ue,s],[ce,a]],h=[[ue,null],[Ve,l],[ce,r]];for(let g=0;g<pt.length;g++)me(n,pt[g],Mo,de,m);for(let g=0;g<ft.length;g++)me(n,ft[g],Ho,zo,h);Ne(Mo,{tld:!0,ascii:!0},o),Ne(Ho,{utld:!0,alpha:!0},o),me(n,"file",gt,de,m),me(n,"mailto",gt,de,m),me(n,"http",$e,de,m),me(n,"https",$e,de,m),me(n,"ftp",$e,de,m),me(n,"ftps",$e,de,m),Ne(gt,{scheme:!0,ascii:!0},o),Ne($e,{slashscheme:!0,ascii:!0},o),t=t.sort((g,v)=>g[0]>v[0]?1:-1);for(let g=0;g<t.length;g++){const v=t[g][0],w=t[g][1]?{[hs]:!0}:{[ws]:!0};v.indexOf("-")>=0?w[Io]=!0:ue.test(v)?ce.test(v)?w[We]=!0:w[Ro]=!0:w[Po]=!0,$n(n,v,v,w)}return $n(n,"localhost",tt,{ascii:!0}),n.jd=new Z(Gt),{start:n,tokens:Object.assign({groups:o},ya)}}function ba(t,o){const n=xs(o.replace(/[A-Z]/g,l=>l.toLowerCase())),i=n.length,a=[];let r=0,s=0;for(;s<i;){let l=t,u=null,c=0,f=null,d=-1,p=-1;for(;s<i&&(u=l.go(n[s]));)l=u,l.accepts()?(d=0,p=0,f=l):d>=0&&(d+=n[s].length,p++),c+=n[s].length,r+=n[s].length,s++;r-=d,s-=p,c-=d,a.push({t:f.t,v:o.slice(r-c,r),s:r-c,e:r})}return a}function xs(t){const o=[],n=t.length;let i=0;for(;i<n;){let a=t.charCodeAt(i),r,s=a<55296||a>56319||i+1===n||(r=t.charCodeAt(i+1))<56320||r>57343?t[i]:t.slice(i,i+2);o.push(s),i+=s.length}return o}function me(t,o,n,i,a){let r;const s=o.length;for(let l=0;l<s-1;l++){const u=o[l];t.j[u]?r=t.j[u]:(r=new Z(i),r.jr=a.slice(),t.j[u]=r),t=r}return r=new Z(n),r.jr=a.slice(),t.j[o[s-1]]=r,r}function Dn(t){const o=[],n=[];let i=0,a="0123456789";for(;i<t.length;){let r=0;for(;a.indexOf(t[i+r])>=0;)r++;if(r>0){o.push(n.join(""));for(let s=parseInt(t.substring(i,i+r),10);s>0;s--)n.pop();i+=r}else n.push(t[i]),i++}return o}const ot={defaultProtocol:"http",events:null,format:Ln,formatHref:Ln,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],ignoreClasses:[],render:null};function cn(t,o=null){let n=Object.assign({},ot);t&&(n=Object.assign(n,t instanceof cn?t.o:t));const i=n.ignoreTags,a=[];for(let r=0;r<i.length;r++)a.push(i[r].toUpperCase());this.o=n,o&&(this.defaultRender=o),this.ignoreTags=a,this.ignoreClasses=n.ignoreClasses.slice()}cn.prototype={o:ot,ignoreTags:[],ignoreClasses:[],isIgnoredClass(t){if(typeof t!="string"||this.ignoreClasses.length===0)return!1;const o=t.split(/\s+/);for(let n=0;n<o.length;n++)if(this.ignoreClasses.indexOf(o[n])>=0)return!0;return!1},defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,o,n){const i=o!=null;let a=this.o[t];return a&&(typeof a=="object"?(a=n.t in a?a[n.t]:ot[t],typeof a=="function"&&i&&(a=a(o,n))):typeof a=="function"&&i&&(a=a(o,n.t,n)),a)},getObj(t,o,n){let i=this.o[t];return typeof i=="function"&&o!=null&&(i=i(o,n.t,n)),i},render(t){const o=t.render(this);return(this.get("render",null,t)||this.defaultRender)(o,t.t,t)}};function Ln(t){return t}function ka(t,o){this.t="token",this.v=t,this.tk=o}ka.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const o=this.toString(),n=t.get("truncate",o,this),i=t.get("format",o,this);return n&&i.length>n?i.substring(0,n)+"…":i},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=ot.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const o=this,n=this.toHref(t.get("defaultProtocol")),i=t.get("formatHref",n,this),a=t.get("tagName",n,o),r=this.toFormattedString(t),s={},l=t.get("className",n,o),u=t.get("target",n,o),c=t.get("rel",n,o),f=t.getObj("attributes",n,o),d=t.getObj("events",n,o);return s.href=i,l&&(s.class=l),u&&(s.target=u),c&&(s.rel=c),f&&Object.assign(s,f),{tagName:a,attributes:s,content:r,eventListeners:d}}};function ao(t,o){class n extends ka{constructor(a,r){super(a,r),this.t=t}}for(const i in o)n.prototype[i]=o[i];return n.t=t,n}const Cs=ao("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Pn=ao("text"),Ts=ao("nl"),mt=ao("url",{isLink:!0,toHref(t=ot.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==tt&&t[1].t===Ae}}),Y=t=>new Z(t);function Bs({groups:t}){const o=t.domain.concat([Rt,It,ge,zt,Mt,Ht,Ft,jt,J,nn,Ke,Ut,Wt,Le,ie,Gt,Qe,qt]),n=[Ot,Ae,rn,ae,sn,Ke,Be,ln,un,Nt,At,qe,Ge,Ct,xt,Tt,Bt,St,Et,_t,$t,Vt,Dt,Lt,Pt],i=[Rt,Ot,It,zt,Mt,Ht,Ft,jt,J,qe,Ge,Ke,Ut,Wt,Le,Be,ie,Gt,Qe,qt],a=Y(),r=k(a,Qe);I(r,i,r),I(r,t.domain,r);const s=Y(),l=Y(),u=Y();I(a,t.domain,s),I(a,t.scheme,l),I(a,t.slashscheme,u),I(s,i,r),I(s,t.domain,s);const c=k(s,ge);k(r,ge,c),k(l,ge,c),k(u,ge,c);const f=k(r,ae);I(f,i,r),I(f,t.domain,r);const d=Y();I(c,t.domain,d),I(d,t.domain,d);const p=k(d,ae);I(p,t.domain,d);const m=Y(Cs);I(p,t.tld,m),I(p,t.utld,m),k(c,tt,m);const h=k(d,J);k(h,J,h),I(h,t.domain,d),I(m,t.domain,d),k(m,ae,p),k(m,J,h);const g=k(s,J),v=k(s,ae);k(g,J,g),I(g,t.domain,s),I(v,i,r),I(v,t.domain,s);const b=Y(mt);I(v,t.tld,b),I(v,t.utld,b),I(b,t.domain,s),I(b,i,r),k(b,ae,v),k(b,J,g),k(b,ge,c);const w=k(b,Ae),y=Y(mt);I(w,t.numeric,y);const x=Y(mt),T=Y();I(x,o,x),I(x,n,T),I(T,o,x),I(T,n,T),k(b,ie,x),k(y,ie,x),k(b,Be,T),k(b,Le,x),k(y,Be,T),k(y,Le,x);const $=k(l,Ae),D=k(u,Ae),S=k(D,ie),A=k(S,ie);I(l,t.domain,s),k(l,ae,v),k(l,J,g),I(u,t.domain,s),k(u,ae,v),k(u,J,g),I($,t.domain,x),k($,ie,x),k($,Be,x),I(A,t.domain,x),I(A,o,x),k(A,ie,x);const E=[[qe,Ge],[xt,Ct],[Tt,Bt],[Nt,At],[St,Et],[_t,$t],[Vt,Dt],[Lt,Pt]];for(let R=0;R<E.length;R++){const[N,L]=E[R],P=k(x,N);k(T,N,P);const M=Y(mt);I(P,o,M);const j=Y();I(P,n,j),k(P,L,x),I(M,o,M),I(M,n,j),I(j,o,M),I(j,n,j),k(M,L,x),k(j,L,x)}return k(a,tt,b),k(a,an,Ts),{start:a,tokens:ya}}function Ns(t,o,n){let i=n.length,a=0,r=[],s=[];const l=[];for(;a<i;){let u=t,c=null,f=null,d=0,p=null,m=-1,h=[];for(;a<i&&!(c=u.go(n[a].t));)s.push(n[a++]);for(;a<i&&(f=c||u.go(n[a].t));)if(c=null,u=f,a++,d++,u.accepts())m=0,p=u,h=[];else if(m>=0&&m++,h.push(u),l[a]&&l[a].has(u))break;for(let g=0,v=a-h.length+1;g<h.length;g++,v++)(l[v]||(l[v]=new Set)).add(h[g]);if(m<0)a-=d,a<i&&(s.push(n[a]),a++);else{s.length>0&&(r.push(Bo(Pn,o,s)),s=[]),a-=m,d-=m;const g=p.t,v=n.slice(a-d,a);r.push(Bo(g,o,v))}}return s.length>0&&r.push(Bo(Pn,o,s)),r}function Bo(t,o,n){const i=n[0].s,a=n[n.length-1].e,r=o.slice(i,a);return new t(r,n)}const Q={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function As(){Q.scanner=ks(Q.customSchemes);for(let t=0;t<Q.tokenQueue.length;t++)Q.tokenQueue[t][1]({scanner:Q.scanner});Q.parser=Bs(Q.scanner.tokens);for(let t=0;t<Q.pluginQueue.length;t++)Q.pluginQueue[t][1]({scanner:Q.scanner,parser:Q.parser});return Q.initialized=!0,Q}function xa(t){return Q.initialized||As(),Ns(Q.parser.start,t,ba(Q.scanner.start,t))}xa.scan=ba;var Ss={amp:"&",gt:">",lt:"<",nbsp:" ",quot:'"'},Es=/^#[xX]([A-Fa-f0-9]+)$/,_s=/^#([0-9]+)$/,$s=/^([A-Za-z0-9]+)$/,Vs=(function(){function t(o){this.named=o}return t.prototype.parse=function(o){if(o){var n=o.match(Es);if(n)return String.fromCharCode(parseInt(n[1],16));if(n=o.match(_s),n)return String.fromCharCode(parseInt(n[1],10));if(n=o.match($s),n)return this.named[n[1]]||"&"+n[1]+";"}},t})(),Ds=/[\t\n\f ]/,Ls=/[A-Za-z]/,Ps=/\r\n?/g;function K(t){return Ds.test(t)}function Rn(t){return Ls.test(t)}function Rs(t){return t.replace(Ps,`
|
|
3
|
+
`)}var Os=(function(){function t(o,n,i){i===void 0&&(i="precompile"),this.delegate=o,this.entityParser=n,this.mode=i,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var a=this.peek();if(a==="<"&&!this.isIgnoredEndTag())this.transitionTo("tagOpen"),this.markTagStart(),this.consume();else{if(this.mode==="precompile"&&a===`
|
|
4
|
+
`){var r=this.tagNameBuffer.toLowerCase();(r==="pre"||r==="textarea")&&this.consume()}this.transitionTo("data"),this.delegate.beginData()}},data:function(){var a=this.peek(),r=this.tagNameBuffer;a==="<"&&!this.isIgnoredEndTag()?(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume()):a==="&"&&r!=="script"&&r!=="style"?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(a))},tagOpen:function(){var a=this.consume();a==="!"?this.transitionTo("markupDeclarationOpen"):a==="/"?this.transitionTo("endTagOpen"):(a==="@"||a===":"||Rn(a))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(a))},markupDeclarationOpen:function(){var a=this.consume();if(a==="-"&&this.peek()==="-")this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment();else{var r=a.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase();r==="DOCTYPE"&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())}},doctype:function(){var a=this.consume();K(a)&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var a=this.consume();K(a)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(a.toLowerCase()))},doctypeName:function(){var a=this.consume();K(a)?this.transitionTo("afterDoctypeName"):a===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(a.toLowerCase())},afterDoctypeName:function(){var a=this.consume();if(!K(a))if(a===">")this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var r=a.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),s=r.toUpperCase()==="PUBLIC",l=r.toUpperCase()==="SYSTEM";(s||l)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),s?this.transitionTo("afterDoctypePublicKeyword"):l&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var a=this.peek();K(a)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):a==='"'?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):a==="'"?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):a===">"&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var a=this.consume();a==='"'?this.transitionTo("afterDoctypePublicIdentifier"):a===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(a)},doctypePublicIdentifierSingleQuoted:function(){var a=this.consume();a==="'"?this.transitionTo("afterDoctypePublicIdentifier"):a===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(a)},afterDoctypePublicIdentifier:function(){var a=this.consume();K(a)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):a===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):a==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):a==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var a=this.consume();K(a)||(a===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):a==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):a==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var a=this.consume();a==='"'?this.transitionTo("afterDoctypeSystemIdentifier"):a===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(a)},doctypeSystemIdentifierSingleQuoted:function(){var a=this.consume();a==="'"?this.transitionTo("afterDoctypeSystemIdentifier"):a===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(a)},afterDoctypeSystemIdentifier:function(){var a=this.consume();K(a)||a===">"&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var a=this.consume();a==="-"&&this.peek()==="-"?this.transitionTo("commentStartDash"):a===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(a),this.transitionTo("comment"))},commentStartDash:function(){var a=this.consume();a==="-"?this.transitionTo("commentEnd"):a===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("-"),this.transitionTo("comment"))},comment:function(){var a=this.consume();a==="-"?this.transitionTo("commentEndDash"):this.delegate.appendToCommentData(a)},commentEndDash:function(){var a=this.consume();a==="-"&&this.peek()==="-"?this.delegate.appendToCommentData(a):a==="-"?this.transitionTo("commentEnd"):(this.delegate.appendToCommentData("-"+a),this.transitionTo("comment"))},commentEnd:function(){var a=this.consume();a===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("--"+a),this.transitionTo("comment"))},tagName:function(){var a=this.consume();K(a)?this.transitionTo("beforeAttributeName"):a==="/"?this.transitionTo("selfClosingStartTag"):a===">"?(this.delegate.finishTag(),this.transitionTo("beforeData")):this.appendToTagName(a)},endTagName:function(){var a=this.consume();K(a)?(this.transitionTo("beforeAttributeName"),this.tagNameBuffer=""):a==="/"?(this.transitionTo("selfClosingStartTag"),this.tagNameBuffer=""):a===">"?(this.delegate.finishTag(),this.transitionTo("beforeData"),this.tagNameBuffer=""):this.appendToTagName(a)},beforeAttributeName:function(){var a=this.peek();if(K(a)){this.consume();return}else a==="/"?(this.transitionTo("selfClosingStartTag"),this.consume()):a===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):a==="="?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(a)):(this.transitionTo("attributeName"),this.delegate.beginAttribute())},attributeName:function(){var a=this.peek();K(a)?(this.transitionTo("afterAttributeName"),this.consume()):a==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):a==="="?(this.transitionTo("beforeAttributeValue"),this.consume()):a===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):a==='"'||a==="'"||a==="<"?(this.delegate.reportSyntaxError(a+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(a)):(this.consume(),this.delegate.appendToAttributeName(a))},afterAttributeName:function(){var a=this.peek();if(K(a)){this.consume();return}else a==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):a==="="?(this.consume(),this.transitionTo("beforeAttributeValue")):a===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(a))},beforeAttributeValue:function(){var a=this.peek();K(a)?this.consume():a==='"'?(this.transitionTo("attributeValueDoubleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):a==="'"?(this.transitionTo("attributeValueSingleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):a===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.transitionTo("attributeValueUnquoted"),this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(a))},attributeValueDoubleQuoted:function(){var a=this.consume();a==='"'?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):a==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(a)},attributeValueSingleQuoted:function(){var a=this.consume();a==="'"?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):a==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(a)},attributeValueUnquoted:function(){var a=this.peek();K(a)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("beforeAttributeName")):a==="/"?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):a==="&"?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||"&")):a===">"?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.consume(),this.delegate.appendToAttributeValue(a))},afterAttributeValueQuoted:function(){var a=this.peek();K(a)?(this.consume(),this.transitionTo("beforeAttributeName")):a==="/"?(this.consume(),this.transitionTo("selfClosingStartTag")):a===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},selfClosingStartTag:function(){var a=this.peek();a===">"?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},endTagOpen:function(){var a=this.consume();(a==="@"||a===":"||Rn(a))&&(this.transitionTo("endTagName"),this.tagNameBuffer="",this.delegate.beginEndTag(),this.appendToTagName(a))}},this.reset()}return t.prototype.reset=function(){this.transitionTo("beforeData"),this.input="",this.tagNameBuffer="",this.index=0,this.line=1,this.column=0,this.delegate.reset()},t.prototype.transitionTo=function(o){this.state=o},t.prototype.tokenize=function(o){this.reset(),this.tokenizePart(o),this.tokenizeEOF()},t.prototype.tokenizePart=function(o){for(this.input+=Rs(o);this.index<this.input.length;){var n=this.states[this.state];if(n!==void 0)n.call(this);else throw new Error("unhandled state "+this.state)}},t.prototype.tokenizeEOF=function(){this.flushData()},t.prototype.flushData=function(){this.state==="data"&&(this.delegate.finishData(),this.transitionTo("beforeData"))},t.prototype.peek=function(){return this.input.charAt(this.index)},t.prototype.consume=function(){var o=this.peek();return this.index++,o===`
|
|
5
|
+
`?(this.line++,this.column=0):this.column++,o},t.prototype.consumeCharRef=function(){var o=this.input.indexOf(";",this.index);if(o!==-1){var n=this.input.slice(this.index,o),i=this.entityParser.parse(n);if(i){for(var a=n.length;a;)this.consume(),a--;return this.consume(),i}}},t.prototype.markTagStart=function(){this.delegate.tagOpen()},t.prototype.appendToTagName=function(o){this.tagNameBuffer+=o,this.delegate.appendToTagName(o)},t.prototype.isIgnoredEndTag=function(){var o=this.tagNameBuffer;return o==="title"&&this.input.substring(this.index,this.index+8)!=="</title>"||o==="style"&&this.input.substring(this.index,this.index+8)!=="</style>"||o==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},t})(),Is=(function(){function t(o,n){n===void 0&&(n={}),this.options=n,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new Os(this,o,n.mode),this._currentAttribute=void 0}return t.prototype.tokenize=function(o){return this.tokens=[],this.tokenizer.tokenize(o),this.tokens},t.prototype.tokenizePart=function(o){return this.tokens=[],this.tokenizer.tokenizePart(o),this.tokens},t.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},t.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},t.prototype.current=function(){var o=this.token;if(o===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return o;for(var n=0;n<arguments.length;n++)if(o.type===arguments[n])return o;throw new Error("token type was unexpectedly "+o.type)},t.prototype.push=function(o){this.token=o,this.tokens.push(o)},t.prototype.currentAttribute=function(){return this._currentAttribute},t.prototype.addLocInfo=function(){this.options.loc&&(this.current().loc={start:{line:this.startLine,column:this.startColumn},end:{line:this.tokenizer.line,column:this.tokenizer.column}}),this.startLine=this.tokenizer.line,this.startColumn=this.tokenizer.column},t.prototype.beginDoctype=function(){this.push({type:"Doctype",name:""})},t.prototype.appendToDoctypeName=function(o){this.current("Doctype").name+=o},t.prototype.appendToDoctypePublicIdentifier=function(o){var n=this.current("Doctype");n.publicIdentifier===void 0?n.publicIdentifier=o:n.publicIdentifier+=o},t.prototype.appendToDoctypeSystemIdentifier=function(o){var n=this.current("Doctype");n.systemIdentifier===void 0?n.systemIdentifier=o:n.systemIdentifier+=o},t.prototype.endDoctype=function(){this.addLocInfo()},t.prototype.beginData=function(){this.push({type:"Chars",chars:""})},t.prototype.appendToData=function(o){this.current("Chars").chars+=o},t.prototype.finishData=function(){this.addLocInfo()},t.prototype.beginComment=function(){this.push({type:"Comment",chars:""})},t.prototype.appendToCommentData=function(o){this.current("Comment").chars+=o},t.prototype.finishComment=function(){this.addLocInfo()},t.prototype.tagOpen=function(){},t.prototype.beginStartTag=function(){this.push({type:"StartTag",tagName:"",attributes:[],selfClosing:!1})},t.prototype.beginEndTag=function(){this.push({type:"EndTag",tagName:""})},t.prototype.finishTag=function(){this.addLocInfo()},t.prototype.markTagAsSelfClosing=function(){this.current("StartTag").selfClosing=!0},t.prototype.appendToTagName=function(o){this.current("StartTag","EndTag").tagName+=o},t.prototype.beginAttribute=function(){this._currentAttribute=["","",!1]},t.prototype.appendToAttributeName=function(o){this.currentAttribute()[0]+=o},t.prototype.beginAttributeValue=function(o){this.currentAttribute()[2]=o},t.prototype.appendToAttributeValue=function(o){this.currentAttribute()[1]+=o},t.prototype.finishAttributeValue=function(){this.current("StartTag").attributes.push(this._currentAttribute)},t.prototype.reportSyntaxError=function(o){this.current().syntaxError=o},t})();function zs(t,o){var n=new Is(new Vs(Ss),o);return n.tokenize(t)}const Ca="LinkifyResult",Kt="StartTag",Ta="EndTag",jo="Chars",Ms="Comment",Hs="Doctype";function Fs(t,o={}){const n=zs(t),i=[],a=[],r=new cn(o,Ws);for(let s=0;s<n.length;s++){const l=n[s];if(l.type===Kt){i.push(l);const u=l.tagName.toUpperCase();if(!(u==="A"||r.ignoreTags.indexOf(u)>=0||r.isIgnoredClass(Ks(l.attributes,"class")))||l.selfClosing)continue;let f=i.length;Us(u,n,++s,i),s+=i.length-f-1}else if(l.type!==jo)i.push(l);else{const u=js(l.chars,r);i.push.apply(i,u)}}for(let s=0;s<i.length;s++){const l=i[s];switch(l.type){case Ca:a.push(l.rendered);break;case Kt:{let u="<"+l.tagName;l.attributes.length>0&&(u+=" "+Gs(l.attributes).join(" ")),l.selfClosing&&(u+=" /"),u+=">",a.push(u);break}case Ta:a.push(`</${l.tagName}>`);break;case jo:a.push(Uo(l.chars));break;case Ms:a.push(`<!--${Uo(l.chars)}-->`);break;case Hs:{let u=`<!DOCTYPE ${l.name}`;l.publicIdentifier&&(u+=` PUBLIC "${l.publicIdentifier}"`),l.systemIdentifier&&(u+=` "${l.systemIdentifier}"`),u+=">",a.push(u);break}}}return a.join("")}function js(t,o){const n=xa(t),i=[];for(let a=0;a<n.length;a++){const r=n[a];r.t==="nl"&&o.get("nl2br")?i.push({type:Kt,tagName:"br",attributes:[],selfClosing:!0}):!r.isLink||!o.check(r)?i.push({type:jo,chars:r.toString()}):i.push({type:Ca,rendered:o.render(r)})}return i}function Us(t,o,n,i){let a=1;for(;n<o.length&&a>0;){let r=o[n];r.type===Kt&&r.tagName.toUpperCase()===t?a++:r.type===Ta&&r.tagName.toUpperCase()===t&&a--,i.push(r),n++}return i}function Ws({tagName:t,attributes:o,content:n}){return`<${t} ${qs(o)}>${Uo(n)}</${t}>`}function Uo(t){return t.replace(/</g,"<").replace(/>/g,">")}function Ba(t){return t.replace(/"/g,""")}function qs(t){const o=[];for(const n in t){const i=t[n]+"";o.push(`${n}="${Ba(i)}"`)}return o.join(" ")}function Gs(t){const o=[];for(let n=0;n<t.length;n++){const i=t[n][0],a=t[n][1]+"";o.push(`${i}="${Ba(a)}"`)}return o}function Ks(t,o){for(let n=0;n<t.length;n++)if(t[n][0].toLowerCase()===o)return t[n][1];return null}const Qs={class:"wu-flex wu-flex-col wu-gap-2","data-testid":"app-message-text"},Zs=["innerHTML"],Wo=e.defineComponent({__name:"app-message-text",props:{message:{}},setup(t){const o=t,n=e.computed(()=>{const a=o.message.metadata?.linkPreview;return!a?.title||eo(o.message)==="contact"?null:a}),i=e.computed(()=>{const a=o.message.messageBody||"";return/<a\s/i.test(a)?a:Fs(a,{defaultProtocol:"https",target:"_blank",rel:"noopener noreferrer",className:"wu-underline"})});return(a,r)=>(e.openBlock(),e.createElementBlock("div",Qs,[n.value?(e.openBlock(),e.createBlock(ps,{key:0,preview:n.value},null,8,["preview"])):e.createCommentVNode("",!0),e.createVNode(V,{class:"wu-whitespace-pre-wrap",gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createElementVNode("span",{innerHTML:i.value},null,8,Zs)]),_:1})]))}}),Ys={_grouped_images:Vr,interactive:qr,document:Kr,automatic:Wo,survey:Yr,audio:Lo,video:ss,voice:Lo,image:os,text:Wo},Js=t=>{const o=t.messageType;return o==="audio"||o==="voice"?Lo:to(t).length>0?jr:Ys[o]??Wo},Xs={key:0,class:"wu-w-full wu-flex wu-justify-end wu-h-2","data-testid":"app-message-trailing"},Ze=e.defineComponent({__name:"app-message",props:{primary:Boolean,secondary:Boolean,tertiary:Boolean},setup(t){const o=t,n=e.computed(()=>e.useSlots());function i(u){return!!n.value[u]}const a=e.computed(()=>o.tertiary),r=e.computed(()=>!a.value&&o.secondary),s=e.computed(()=>a.value?"wu-justify-center":r.value?"wu-flex-row-reverse":""),l=e.computed(()=>a.value?"wu-items-center wu-flex":r.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(u,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-flex wu-items-end wu-gap-2 wu-w-full",s.value]),"data-testid":"app-message"},[e.createElementVNode("div",{class:e.normalizeClass(["wu-rounded-lg wu-relative wu-min-h-8 [overflow-wrap:anywhere]",l.value]),"data-testid":"app-message-bubble"},[e.renderSlot(u.$slots,"default"),i("trailing")?(e.openBlock(),e.createElementBlock("div",Xs,[e.renderSlot(u.$slots,"trailing")])):e.createCommentVNode("",!0)],2)],2))}}),dn=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":""),i=e.computed(()=>o.round?"!wu-rounded-full":o.block?"!wu-rounded-none":"!wu-rounded-lg");return(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-animate-pulse wu-bg-gray-200 dark:wu-bg-neutral-700",[i.value,n.value]])},null,2))}}),el={class:"wu-typing__dots","aria-hidden":"true"},tl=e.defineComponent({__name:"app-typing",props:{small:Boolean},setup(t){const o=t,n=e.computed(()=>o.small?"wu-gap-1.5 wu-min-h-4":"wu-gap-2 wu-min-h-5"),i=e.computed(()=>o.small?"wu-typing__dot--small":"wu-typing__dot");return(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-inline-flex wu-items-center wu-text-gray-500",[n.value,"dark:wu-text-neutral-300"]]),role:"status","aria-live":"polite","aria-label":"Digitando","data-testid":"app-typing"},[e.createElementVNode("div",el,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(3,s=>e.createElementVNode("span",{key:s,class:e.normalizeClass(i.value),style:e.normalizeStyle({"--i":s}),"data-testid":"app-typing-dot"},null,6)),64))])],2))}}),pn=ze(tl,[["__scopeId","data-v-b0aad068"]]),fn=e.defineComponent({__name:"app-empty",props:{error:{type:Boolean,default:!1}},emits:["refetch"],setup(t,{emit:o}){const n=o,i=e.computed(()=>e.useSlots());function a(r){return!!i.value[r]}return(r,s)=>(e.openBlock(),e.createBlock(z,{"gap-sm":"",center:"",col:""},{default:e.withCtx(()=>[t.error?(e.openBlock(),e.createBlock(_,{key:0,class:"wu-text-gray-500",large:""},{default:e.withCtx(()=>[...s[1]||(s[1]=[e.createTextVNode("error_outline",-1)])]),_:1})):a("icon")?e.renderSlot(r.$slots,"icon",{key:1}):(e.openBlock(),e.createBlock(_,{key:2,class:"wu-text-gray-500",large:""},{default:e.withCtx(()=>[...s[2]||(s[2]=[e.createTextVNode("list",-1)])]),_:1})),e.createVNode(V,{class:"wu-text-center",gray:""},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3}),t.error?(e.openBlock(),e.createBlock(F,{key:3,onClick:s[0]||(s[0]=l=>n("refetch")),outline:"",small:"","data-testid":"refetch-button"},{icon:e.withCtx(()=>[...s[3]||(s[3]=[e.createTextVNode("refresh",-1)])]),default:e.withCtx(()=>[s[4]||(s[4]=e.createTextVNode("Tentar novamente",-1))]),_:1})):e.createCommentVNode("",!0)]),_:3}))}}),ol={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"},nl={class:"wu-relative wu-flex wu-flex-col wu-flex-1 wu-min-h-0 wu-w-full"},al={key:0,class:"wu-w-full wu-min-h-4","data-testid":"app-chat-top-spacer"},il={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"},rl={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"},sl={key:0,class:"wu-absolute wu-inset-0 wu-rounded-full wu-bg-red-500 wu-bg-opacity-20 wu-animate-ping"},ll=["src","alt"],ul=["onKeydown","disabled"],cl={class:"wu-flex wu-items-center wu-gap-2 wu-w-full wu-justify-end wu-px-6 wu-py-2"},dl=100,pl=e.defineComponent({__name:"app-chat-service",props:{rule:{},edges:{}},emits:["chat-service-action","chat-service-message-action"],setup(t,{emit:o}){const n=t,i=o,{history:a,chat:r,language:s}=Se(),{isSendingMessage:l,isErrorLoading:u,attachments:c,isFinished:f,isLoading:d,messages:p,isTyping:m,audio:h,text:g}=r,{isRecording:v,formattedDuration:b,start:w,stop:y,cancel:x}=xr(),T=e.computed(()=>a.value.length>0),$=e.ref(null),D=e.ref(null),S=e.ref(!1),A=e.ref(!1),E=e.computed(()=>_i(p.value)),R=e.ref(null),N=e.computed(()=>!!(c.value.length||h.value)),L=e.computed(()=>!!(N.value||g.value.trim())),P=e.computed(()=>!!n.rule.settings?.features?.sendAttachment),M=e.computed(()=>l.value||!!h.value||A.value),j=e.computed(()=>l.value||N.value||A.value),q=e.computed(()=>P.value&&!M.value),U=e.ref(!1);let G=null;const ut=e.computed(()=>(n.rule.settings?.features?.quickReplies??[]).map(C=>C[s.value]??C["pt-BR"]??Object.values(C)[0]??"").filter(Boolean)),oi=e.computed(()=>ut.value.length>0&&p.value.length===0&&!f.value),kn=e.computed(()=>l.value||N.value||A.value),ni=()=>{const B=$.value;if(!B)return;const C=B.scrollHeight-B.scrollTop-B.clientHeight;S.value=C>dl},He=(B=!0)=>{const C=$.value;C&&(C.scrollTo({top:C.scrollHeight,behavior:B?"smooth":"auto"}),S.value=!1)},ct=(B=!0)=>{S.value||He(B)},ai=()=>{M.value||R.value?.click()},co=B=>{B&&URL.revokeObjectURL(B)},ii=()=>{c.value.forEach(B=>co(B.previewUrl)),c.value=[]},po=()=>{co(h.value?.previewUrl),h.value=null},ri=B=>B.type.startsWith("image/")?"image":"document",fo=B=>{B.length&&(po(),c.value=[...c.value,...B.map(C=>{const O=ri(C);return{file:C,type:O,previewUrl:O==="image"?URL.createObjectURL(C):void 0}})])},si=B=>{ii(),po(),g.value="",h.value={file:B,previewUrl:URL.createObjectURL(B)}},li=B=>{const C=B.target,O=Array.from(C.files??[]);fo(O),C.value=""},ui=B=>{if(!B)return[];const C=Array.from(B.items??[]).filter(O=>O.kind==="file").map(O=>O.getAsFile()).filter(O=>!!O);return C.length?C:Array.from(B.files??[])},mo=B=>{const C=B.dataTransfer?.types;return C?Array.from(C).includes("Files"):!1},ho=()=>{G&&(clearTimeout(G),G=null)},xn=()=>{ho(),G=setTimeout(()=>{U.value=!1},300)},ci=B=>{if(!q.value)return;const C=ui(B.clipboardData);C.length&&(B.preventDefault(),fo(C))},di=B=>{!q.value||!mo(B)||(B.preventDefault(),B.dataTransfer&&(B.dataTransfer.dropEffect="copy"),U.value=!0,xn())},pi=B=>{!q.value||!mo(B)||xn()},fi=B=>{if(!q.value||!mo(B))return;B.preventDefault(),ho(),U.value=!1;const C=Array.from(B.dataTransfer?.files??[]);C.length&&fo(C)},mi=B=>{co(c.value[B]?.previewUrl),c.value=c.value.filter((C,O)=>O!==B)},hi=()=>{po()},wi=async()=>{j.value||!await w()||(g.value="",A.value=!0)},gi=async()=>{await x(),A.value=!1},vi=async()=>{const B=await y();A.value=!1,B&&si(B)},Fe=B=>i("chat-service-action",B),Cn=()=>{He(),Fe({action:"send-message"})},yi=B=>{kn.value||!B.trim()||(g.value=B,He(),Fe({action:"send-message"}))};e.watch(()=>E.value.length,async()=>{await e.nextTick(),ct()}),e.watch(m,B=>{B&&ct()});let _e=null;const Tn=()=>{_e?.disconnect(),_e=null;const B=D.value;!B||typeof ResizeObserver>"u"||(_e=new ResizeObserver(()=>{ct(!1)}),_e.observe(B))};e.watch(d,async B=>{B||(await e.nextTick(),Tn(),ct(!1))}),e.onMounted(async()=>{He(!1),await e.nextTick(),Tn()}),e.onBeforeUnmount(()=>{ho(),_e?.disconnect(),_e=null});const Bn=B=>B.from==="contact"?"contact":"operator",bi=(B,C,O)=>C[O-1]?Bn(C[O-1])===Bn(B)?"wu-mt-1":"wu-mt-4":"wu-mt-0",ki=B=>Ni(B.createdAt)||"12:58",xi=B=>i("chat-service-message-action",B);return(B,C)=>(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:di,onDragleave:pi,onDrop:fi},[U.value?(e.openBlock(),e.createElementBlock("div",ol,[e.createVNode(_,{class:"wu-text-primary",large:""},{default:e.withCtx(()=>[...C[5]||(C[5]=[e.createTextVNode("upload",-1)])]),_:1}),e.createVNode(V,{semibold:"",gray:""},{default:e.withCtx(()=>[...C[6]||(C[6]=[e.createTextVNode("Solte os arquivos para anexar",-1)])]),_:1})])):e.createCommentVNode("",!0),e.createElementVNode("div",nl,[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",onScroll:ni},[e.createElementVNode("div",{class:"wu-w-full wu-flex wu-flex-col",ref_key:"messagesContent",ref:D},[T.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",al)),e.unref(d)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},e.renderList(10,(O,ee)=>e.createVNode(Ze,{key:ee,primary:ee%2===0,secondary:ee%2===1},{default:e.withCtx(()=>[e.createVNode(dn,{class:"wu-h-4 wu-w-32",block:""})]),_:1},8,["primary","secondary"])),64)):e.unref(u)?(e.openBlock(),e.createBlock(fn,{key:2,class:"wu-h-full",onRefetch:C[0]||(C[0]=O=>Fe({action:"retry-loading"})),error:""},{default:e.withCtx(()=>[...C[7]||(C[7]=[e.createTextVNode("Ocorreu um erro ao carregar o atendimento.",-1)])]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(O,ee)=>(e.openBlock(),e.createBlock(Ze,{key:O.id??ee,primary:O.from!=="contact",secondary:O.from==="contact",class:e.normalizeClass([bi(O,E.value,ee)])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Js)(O)),{message:O,onChatServiceMessageAction:xi},null,40,["message"]))]),trailing:e.withCtx(()=>[e.createVNode(V,{gray:"","extra-small":"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(ki(O)),1)]),_:2},1024)]),_:2},1032,["primary","secondary","class"]))),128)),e.unref(m)?(e.openBlock(),e.createBlock(Ze,{key:0,class:"wu-mt-1",primary:""},{default:e.withCtx(()=>[e.createVNode(pn,{small:""})]),_:1})):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createBlock(z,{key:1,class:"wu-mt-4","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(F,{"data-testid":"app-chat-start-new-service",onClick:C[1]||(C[1]=O=>Fe({action:"start-new-service"})),small:""},{icon:e.withCtx(()=>[e.createVNode(_,{small:""},{default:e.withCtx(()=>[...C[8]||(C[8]=[e.createTextVNode("chat",-1)])]),_:1})]),default:e.withCtx(()=>[C[9]||(C[9]=e.createTextVNode("Iniciar novo atendimento",-1))]),_:1}),e.createVNode(F,{"data-testid":"app-chat-back",onClick:C[2]||(C[2]=O=>Fe({action:"back"})),small:"",outline:""},{icon:e.withCtx(()=>[e.createVNode(_,{small:""},{default:e.withCtx(()=>[...C[10]||(C[10]=[e.createTextVNode("arrow_back",-1)])]),_:1})]),default:e.withCtx(()=>[C[11]||(C[11]=e.createTextVNode("Voltar",-1))]),_:1})]),_:1})):e.createCommentVNode("",!0)],64)),C[12]||(C[12]=e.createElementVNode("div",{class:"wu-w-full wu-min-h-4"},null,-1))],512)],544),S.value?(e.openBlock(),e.createBlock(F,{key:0,class:"wu-absolute wu-right-9 wu-bottom-3 wu-z-10 wu-shadow-md !wu-bg-white dark:!wu-bg-neutral-800","data-testid":"app-chat-scroll-to-bottom",onClick:C[3]||(C[3]=O=>He()),round:"",small:"",icon:"",outline:""},{icon:e.withCtx(()=>[e.createVNode(_,{small:"",gray:""},{default:e.withCtx(()=>[...C[13]||(C[13]=[e.createTextVNode("keyboard_double_arrow_down",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),!e.unref(d)&&!e.unref(u)&&oi.value?(e.openBlock(),e.createBlock(z,{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(ut.value,(O,ee)=>(e.openBlock(),e.createBlock(F,{key:ee,onClick:Ci=>yi(O),disabled:kn.value,outline:"",round:"",fit:""},{trailing:e.withCtx(()=>[...C[14]||(C[14]=[e.createTextVNode("chevron_right",-1)])]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(O),1)]),_:2},1032,["onClick","disabled"]))),128))]),_:1})):e.createCommentVNode("",!0),!e.unref(d)&&!e.unref(u)&&t.rule.settings?.features?.sendMessage?(e.openBlock(),e.createElementBlock("div",il,[A.value?(e.openBlock(),e.createBlock(z,{key:0,"data-testid":"app-chat-audio-recording","padding-md":"","center-between":""},{default:e.withCtx(()=>[e.createVNode(F,{"data-testid":"app-chat-audio-cancel",onClick:gi,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(_,{gray:""},{default:e.withCtx(()=>[...C[15]||(C[15]=[e.createTextVNode("close",-1)])]),_:1})]),_:1}),e.createVNode(z,{class:"wu-items-center","gap-sm":""},{default:e.withCtx(()=>[e.createElementVNode("div",rl,[e.unref(v)?(e.openBlock(),e.createElementBlock("div",sl)):e.createCommentVNode("",!0),e.createVNode(_,{class:"wu-text-red-500",large:""},{default:e.withCtx(()=>[...C[16]||(C[16]=[e.createTextVNode("mic",-1)])]),_:1})]),e.createVNode(V,{semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(b)),1)]),_:1})]),_:1}),e.createVNode(F,{"data-testid":"app-chat-audio-stop",onClick:vi,disabled:!e.unref(v),small:"",icon:"",success:""},{icon:e.withCtx(()=>[e.createVNode(_,{light:""},{default:e.withCtx(()=>[...C[17]||(C[17]=[e.createTextVNode("check",-1)])]),_:1})]),_:1},8,["disabled"])]),_:1})):e.unref(h)?(e.openBlock(),e.createBlock(z,{key:1,"data-testid":"app-chat-audio-preview","padding-md":""},{default:e.withCtx(()=>[e.createVNode(z,{class:"wu-w-full wu-items-center","padding-sm":"",rounded:"",border:"","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(lt,{class:"wu-flex-1",src:e.unref(h).previewUrl},null,8,["src"]),e.createVNode(F,{"data-testid":"app-chat-audio-discard",onClick:hi,disabled:e.unref(l),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(_,{gray:""},{default:e.withCtx(()=>[...C[18]||(C[18]=[e.createTextVNode("close",-1)])]),_:1})]),_:1},8,["disabled"])]),_:1})]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.unref(c).length?(e.openBlock(),e.createBlock(z,{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(c),(O,ee)=>(e.openBlock(),e.createBlock(z,{class:"wu-items-center",key:ee,"padding-sm":"",rounded:"",border:"","gap-sm":""},{default:e.withCtx(()=>[O.type==="image"&&O.previewUrl?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-10 wu-h-10 wu-rounded wu-object-cover",src:O.previewUrl,alt:O.file.name},null,8,ll)):(e.openBlock(),e.createBlock(z,{key:1,class:"wu-w-7 wu-h-7 wu-bg-gray-200",center:"","padding-base":"",rounded:""},{default:e.withCtx(()=>[e.createVNode(_,{large:"",gray:""},{default:e.withCtx(()=>[...C[19]||(C[19]=[e.createTextVNode("file_present",-1)])]),_:1})]),_:1})),e.createVNode(z,{class:"wu-flex-1 wu-items-start wu-min-w-0",col:"","gap-none":""},{default:e.withCtx(()=>[e.createVNode(V,{class:"[overflow-wrap:anywhere]",semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(O.file.name),1)]),_:2},1024),e.createVNode(V,{"extra-small":"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(O.file.type),1)]),_:2},1024)]),_:2},1024),e.createVNode(F,{"data-testid":"app-chat-attachment-discard",onClick:Ci=>mi(ee),disabled:e.unref(l),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(_,{gray:""},{default:e.withCtx(()=>[...C[20]||(C[20]=[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":C[4]||(C[4]=O=>e.isRef(g)?g.value=O:null),onKeydown:e.withKeys(e.withModifiers(Cn,["exact","prevent"]),["enter"]),onPaste:ci,placeholder:"Escreva uma mensagem...",disabled:e.unref(l)},null,40,ul),[[e.vModelText,e.unref(g)]])],64)),e.withDirectives(e.createElementVNode("input",{ref_key:"fileInput",ref:R,type:"file",multiple:"","data-testid":"app-chat-file-input",onChange:li},null,544),[[e.vShow,!1]]),e.createElementVNode("div",cl,[P.value?(e.openBlock(),e.createBlock(F,{key:0,"data-testid":"app-chat-attach-file",onClick:ai,disabled:M.value,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(_,{class:"wu-rotate-45",large:"",gray:""},{default:e.withCtx(()=>[...C[21]||(C[21]=[e.createTextVNode("attach_file",-1)])]),_:1})]),_:1},8,["disabled"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createBlock(F,{key:1,"data-testid":"app-chat-record-audio",onClick:wi,disabled:j.value,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(_,{large:"",gray:""},{default:e.withCtx(()=>[...C[22]||(C[22]=[e.createTextVNode("mic",-1)])]),_:1})]),_:1},8,["disabled"])):e.createCommentVNode("",!0),e.createVNode(F,{onClick:Cn,loading:e.unref(l),disabled:!L.value||A.value,small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(_,{class:"-wu-rotate-45 wu-translate-x-[0.10rem] -wu-translate-y-[0.12rem]",outlined:"",large:""},{default:e.withCtx(()=>[...C[23]||(C[23]=[e.createTextVNode("send",-1)])]),_:1})]),_:1},8,["loading","disabled"])])])):e.createCommentVNode("",!0)],32))}}),fl={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"},ml={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"},hl=e.defineComponent({__name:"app-voice-service",props:{rule:{},edges:{}},setup(t){const o=t,n=e.computed(()=>o.rule.name||"Ligação");return(i,a)=>(e.openBlock(),e.createElementBlock("div",fl,[e.createVNode(z,{class:"wu-w-full",col:"",center:"","gap-lg":""},{default:e.withCtx(()=>[e.createVNode(z,{col:"",center:"","gap-base":""},{default:e.withCtx(()=>[e.createElementVNode("div",ml,[e.createVNode(_,{"extra-large":"",gray:""},{default:e.withCtx(()=>[...a[0]||(a[0]=[e.createTextVNode("phone_in_talk",-1)])]),_:1})]),e.createVNode(V,{class:"wu-text-center","extra-large":"",semibold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.value),1)]),_:1}),e.createVNode(V,{class:"wu-text-center",small:"",gray:""},{default:e.withCtx(()=>[...a[1]||(a[1]=[e.createTextVNode("Aguardando conexão",-1)])]),_:1})]),_:1}),e.createVNode(z,{center:"","gap-md":""},{default:e.withCtx(()=>[e.createVNode(F,{ghost:"",icon:"",round:"",disabled:""},{icon:e.withCtx(()=>[e.createVNode(_,{large:"",gray:""},{default:e.withCtx(()=>[...a[2]||(a[2]=[e.createTextVNode("mic",-1)])]),_:1})]),_:1}),e.createVNode(F,{alert:"",icon:"",round:"",disabled:""},{icon:e.withCtx(()=>[e.createVNode(_,{large:""},{default:e.withCtx(()=>[...a[3]||(a[3]=[e.createTextVNode("call_end",-1)])]),_:1})]),_:1}),e.createVNode(F,{ghost:"",icon:"",round:"",disabled:""},{icon:e.withCtx(()=>[e.createVNode(_,{large:"",gray:""},{default:e.withCtx(()=>[...a[4]||(a[4]=[e.createTextVNode("volume_up",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]))}}),mn=e.defineComponent({__name:"app-service-page",props:{rule:{},edges:{}},emits:["chat-service-action","chat-service-message-action"],setup(t,{emit:o}){const n=t,i=o,a=e.computed(()=>n.rule.settings?.behavior==="voice"?hl:pl);return(r,s)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value),{rule:t.rule,edges:t.edges,onChatServiceAction:s[0]||(s[0]=l=>i("chat-service-action",l)),onChatServiceMessageAction:s[1]||(s[1]=l=>i("chat-service-message-action",l))},null,40,["rule","edges"]))}}),wl=t=>{const o=n=>n.toString(16).padStart(2,"0");return`#${o(t.r)}${o(t.g)}${o(t.b)}`},Na=()=>{const t="#6D3595",o=a=>{const r=a.replace("#","").trim(),s=r.length===3&&/^[0-9a-fA-F]{3}$/.test(r)?`${r[0]}${r[0]}${r[1]}${r[1]}${r[2]}${r[2]}`:r;return s.length!==6||!/^[0-9a-fA-F]{6}$/.test(s)?null:{r:parseInt(s.slice(0,2),16),g:parseInt(s.slice(2,4),16),b:parseInt(s.slice(4,6),16)}};return{isLightHex:a=>{const r=o(a);return r?(r.r*299+r.g*587+r.b*114)/1e3>160:!1},normalizeHex:a=>{const r=o(a)??o(t);return r?wl(r):t.toLowerCase()},parseHex:o}},gl=()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches,Aa=t=>{const{isLightHex:o,normalizeHex:n,parseHex:i}=Na(),a=(d,p)=>d==="dark"?"dark":d==="light"?"light":p?"dark":"light",r=d=>{const p=n(d),m=i(p)??{r:109,g:53,b:149},h=o(p);return{"--wu-primary":p,"--wu-primary-rgb":`${m.r} ${m.g} ${m.b}`,"--wu-primary-fg":h?"#1c1917":"#ffffff","--wu-primary-border":h?"#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":h?`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)`}},s=d=>{const p=e.ref(gl()),m=e.computed(()=>a(e.toValue(d),p.value)),h=e.computed(()=>m.value==="dark"),g=e.computed(()=>h.value?"wu-dark":"");return e.onMounted(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const v=window.matchMedia("(prefers-color-scheme: dark)");p.value=v.matches;const b=w=>{p.value=w.matches};v.addEventListener("change",b),e.onBeforeUnmount(()=>v.removeEventListener("change",b))}),{isDark:h,resolvedTheme:m,themeClass:g}},{isDark:l,themeClass:u,resolvedTheme:c}=s(()=>e.toValue(t).theme),f=e.computed(()=>({...r(e.toValue(t).primaryColor),colorScheme:c.value}));return{isDark:l,themeClass:u,resolvedTheme:c,appearanceStyle:f}},vl={class:"wu-flex wu-flex-col wu-w-full wu-gap-8"},yl={key:0,class:"wu-flex wu-items-center wu-w-fit wu-justify-center wu-h-0"},bl=["src"],kl={key:1,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-screen-page",props:{rule:{},edges:{}},emits:["edge-click"],setup(t,{emit:o}){const n=t,i=o,{history:a}=Se(),r=e.computed(()=>a.value.length>0),s=e.computed(()=>n.edges??[]),l=e.computed(()=>n.rule.settings?.body),u=e.computed(()=>s.value.slice(0,3)),c=e.computed(()=>s.value.slice(3));return(f,d)=>(e.openBlock(),e.createElementBlock("div",vl,[r.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",yl)),e.createVNode(z,{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,bl)):e.createCommentVNode("",!0),l.value?.eyebrow?(e.openBlock(),e.createBlock(V,{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(V,{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(V,{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(a).length>0?(e.openBlock(),e.createBlock(z,{key:4,class:"wu-rounded-full wu-px-2 wu-h-6 wu-bg-primary-500","padding-sm":"","gap-sm":"",center:""},{default:e.withCtx(()=>[e.createVNode(_,{class:"!wu-text-[var(--wu-primary-fg)]",small:""},{default:e.withCtx(()=>[...d[2]||(d[2]=[e.createTextVNode("check",-1)])]),_:1}),e.createVNode(V,{class:"!wu-text-[var(--wu-primary-fg)]",semibold:"","extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.rule?.name),1)]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1}),s.value.length?(e.openBlock(),e.createElementBlock("div",kl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,p=>(e.openBlock(),e.createBlock(Oe,{key:p.id,edge:p,onClick:d[0]||(d[0]=m=>i("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(Oe,{key:p.id,edge:p,icon:"",onClick:d[1]||(d[1]=m=>i("edge-click",m))},null,8,["edge"]))),128))],2)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))}}),xl="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=",Cl={class:"wu-flex wu-flex-col wu-h-full wu-w-full wu-bg-white wu-overflow-hidden dark:wu-bg-neutral-800"},Tl={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)]"},Bl={class:"wu-flex wu-items-center wu-gap-3 wu-min-w-0 wu-flex-1"},Nl=["src"],Al={class:"wu-flex wu-flex-col wu-justify-center wu-min-w-0 wu-overflow-hidden"},Sl={class:"wu-flex wu-flex-col wu-w-full wu-flex-1 wu-min-h-0"},El={key:0,class:"wu-flex wu-shrink-0 wu-items-center wu-w-fit wu-justify-center wu-px-6 wu-py-4"},_l={class:"wu-flex wu-flex-col wu-w-full wu-flex-1 wu-min-h-0 wu-overflow-y-auto wu-gap-8"},$l={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"},Vl=["src"],Dl=e.defineComponent({inheritAttrs:!1,__name:"app-widget-view",props:{workflow:{},config:{},fullscreen:{type:Boolean}},emits:["chat-service-action","edge-click","chat-service-message-action","submit","close","back"],setup(t,{emit:o}){const n=t,i=o,{history:a,currentRule:r,currentHeader:s,edges:l,setWorkflow:u,setConfig:c}=Se(),{appearanceStyle:f,themeClass:d}=Aa(()=>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&&r.value?.action!=="widget-identification-screen"),h=e.computed(()=>n.config.configurations.general.isClosable),g={"widget-identification-screen":en,"widget-article-screen":on,"widget-service-screen":mn,"widget-base-screen":hn},v=e.computed(()=>{const w=r.value?.action;return w&&w in g?g[w]:void 0}),b=e.computed(()=>n.fullscreen?"wu-w-full wu-h-[100dvh] wu-max-h-full":"wu-w-[24.4rem] wu-h-[38rem] widget-shadow wu-rounded-2xl");return(w,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yunique wu-overflow-hidden wu-relative",[b.value,e.unref(d)]]),"data-testid":"app-widget-view",style:e.normalizeStyle(e.unref(f))},[e.createElementVNode("div",Cl,[e.createElementVNode("div",Tl,[e.createElementVNode("div",Bl,[e.unref(s)?.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(s).logo,alt:""},null,8,Nl)):e.createCommentVNode("",!0),e.createElementVNode("div",Al,[e.unref(s)?.title?(e.openBlock(),e.createBlock(V,{key:0,class:"wu-w-full wu-truncate !wu-text-inherit",bold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s).title),1)]),_:1})):e.createCommentVNode("",!0),e.unref(s)?.subtitle?(e.openBlock(),e.createBlock(V,{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(s).subtitle),1)]),_:1})):e.createCommentVNode("",!0)])]),h.value?(e.openBlock(),e.createBlock(F,{key:0,class:"wu-shrink-0 !wu-bg-transparent hover:!wu-bg-[color-mix(in_srgb,var(--wu-primary-fg)_12%,transparent)]",onClick:y[0]||(y[0]=x=>i("close")),"data-testid":"app-widget-close",small:"",icon:""},{default:e.withCtx(()=>[e.createVNode(_,null,{default:e.withCtx(()=>[...y[7]||(y[7]=[e.createTextVNode("close",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",Sl,[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(r)?.id},[m.value?(e.openBlock(),e.createElementBlock("div",El,[e.createElementVNode("div",{class:"wu-flex wu-items-center wu-w-fit wu-justify-center wu-cursor-pointer wu-group",onClick:y[1]||(y[1]=x=>i("back"))},[e.createVNode(_,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200",small:"",gray:""},{default:e.withCtx(()=>[...y[8]||(y[8]=[e.createTextVNode("chevron_left",-1)])]),_:1}),e.createVNode(V,{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[9]||(y[9]=[e.createTextVNode("Voltar",-1)])]),_:1})])])):e.createCommentVNode("",!0),e.createElementVNode("div",_l,[v.value&&e.unref(r)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v.value),{key:0,rule:e.unref(r),edges:e.unref(l),onSubmit:y[2]||(y[2]=x=>i("submit",x)),onBack:y[3]||(y[3]=x=>i("back")),onEdgeClick:y[4]||(y[4]=x=>i("edge-click",x)),onChatServiceAction:y[5]||(y[5]=x=>i("chat-service-action",x)),onChatServiceMessageAction:y[6]||(y[6]=x=>i("chat-service-message-action",x))},null,40,["rule","edges"])):e.createCommentVNode("",!0)])]))]),_:1})]),e.createElementVNode("div",$l,[e.createElementVNode("img",{class:"wu-w-3 wu-h-2",src:e.unref(xl),alt:"Opens"},null,8,Vl),e.createVNode(V,{class:"!wu-text-xxs",gray:""},{default:e.withCtx(()=>[...y[10]||(y[10]=[e.createTextVNode("Powered By",-1),e.createElementVNode("b",{class:"wu-ml-1"},"Opens",-1)])]),_:1})])])],6))}}),wn=ze(Dl,[["__scopeId","data-v-700b6585"]]),Ll={class:"wu-flex wu-h-full wu-pl-3 wu-gap-2 wu-z-10 wu-pointer-events-none"},Pl={class:"wu-h-full wu-flex wu-items-center wu-justify-center"},Rl=["value","type","disabled","maxlength"],Ol={class:"wu-absolute wu-right-2 wu-z-10 wu-flex wu-items-center wu-gap-1 wu-text-gray-500"},Sa=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 i=t,a=n,r=e.computed(()=>e.useSlots());function s($){return!!r.value[$]}const l=e.ref(""),u=e.ref(!1),c=e.ref(!1);function f($){if(!i.maskFunction)return $;try{const D=i.maskFunction($);return typeof D=="string"?D:$}catch{return $}}e.watch(()=>i.modelValue,$=>{if($==null){l.value="";return}l.value=i.maskFunction?f($):$},{immediate:!0});function d(){return!(u.value||l.value)}const{height:p,textSize:m,width:h}=fa(i),g=e.computed(()=>i.invalid?"wu-border-red-500 focus-within:wu-border-red-500":i.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"),v=e.computed(()=>i.invalid?"wu-text-red-500":i.valid?"wu-text-green-500":"wu-text-gray-500"),b=e.computed(()=>i.small&&d()?"wu-translate-y-[7px]":i.small&&!d()?"wu-translate-y-0":d()?"wu-translate-y-[11px]":"wu-translate-y-0"),w=e.computed(()=>s("icon")||i.loading?"wu-pl-[34px]":"wu-pl-3"),y=e.computed(()=>i.block?"wu-rounded-none":i.round?"wu-rounded-full":"wu-rounded-lg"),x=e.computed(()=>i.disabled||i.loading?"wu-opacity-50 wu-pointer-events-none":"");function T($){const S=$.target.value;l.value=i.maskFunction?f(S):S,a("update:modelValue",l.value)}return o({focus:u,content:l}),($,D)=>(e.openBlock(),e.createBlock(z,{class:e.normalizeClass([e.unref(h)]),col:"","gap-none":""},{default:e.withCtx(()=>[e.createVNode(z,{col:"","gap-sm":""},{default:e.withCtx(()=>[s("label")?(e.openBlock(),e.createBlock(V,{key:0,small:"",medium:""},{default:e.withCtx(()=>[e.renderSlot($.$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",[y.value,x.value,e.unref(p),g.value]]),"data-testid":"app-text-input"},[e.createElementVNode("div",Ll,[e.createElementVNode("div",Pl,[!t.loading&&s("icon")?(e.openBlock(),e.createBlock(_,{key:0,small:""},{default:e.withCtx(()=>[e.renderSlot($.$slots,"icon")]),_:3})):e.createCommentVNode("",!0),t.loading?(e.openBlock(),e.createBlock(_,{key:1,class:"wu-animate-spin",small:"",outlined:""},{default:e.withCtx(()=>[...D[4]||(D[4]=[e.createTextVNode("progress_activity",-1)])]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(V,{class:e.normalizeClass(["wu-py-1 wu-transition",[b.value]]),small:"",medium:"",gray:""},{default:e.withCtx(()=>[e.renderSlot($.$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,y.value]]),value:l.value,type:t.passwordToggle&&c.value?"text":t.type,disabled:t.disabled||t.loading,maxlength:t.maxLength,onInput:T,onFocus:D[0]||(D[0]=S=>u.value=!0),onBlur:D[1]||(D[1]=S=>u.value=!1),onKeyup:D[2]||(D[2]=e.withKeys(S=>a("keyup-enter"),["enter"]))},null,42,Rl),e.createElementVNode("div",Ol,[t.maxLength?(e.openBlock(),e.createBlock(V,{key:0,small:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(`${l.value.length} / ${t.maxLength}`),1)]),_:1})):e.createCommentVNode("",!0),t.type==="password"&&t.passwordToggle?(e.openBlock(),e.createElementBlock("button",{key:1,class:"wu-bg-transparent wu-border-0 wu-p-0 wu-cursor-pointer wu-flex wu-items-center",type:"button",tabindex:"-1",onClick:D[3]||(D[3]=S=>c.value=!c.value)},[e.createVNode(_,{small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value?"visibility_off":"visibility"),1)]),_:1})])):e.createCommentVNode("",!0),e.renderSlot($.$slots,"suffix")])],2)]),_:3}),s("feedback")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["wu-mt-1",[v.value]])},[e.renderSlot($.$slots,"feedback")],2)):e.createCommentVNode("",!0)]),_:3},8,["class"]))}}),Il=()=>{const{isLightHex:t,normalizeHex:o}=Na();return{getOffset:(r,s)=>{const l=`${s.x}px`,u=`${s.y}px`;switch(r){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:r=>{switch(r){case"bottom-left":return"bottom left";case"top-left":return"top left";case"top-right":return"top right";default:return"bottom right"}},getTone:r=>{const s=o(r);return{backgroundImage:"none",backgroundColor:s,color:t(s)?"#1c1917":"#ffffff"}}}},zl={key:0,class:"wu-flex wu-relative"},Ml=e.defineComponent({__name:"app-widget",props:{workflow:{},config:{},fullscreen:{type:Boolean}},emits:["chat-service-message-action","chat-service-action","edge-click","submit","close","back","open"],setup(t,{emit:o}){const n=t,i=o,{isOpen:a,config:r,chat:s,open:l,close:u,setWorkflow:c,setConfig:f}=Se(),{getOffset:d,getPosition:p,getTone:m}=Il(),{appearanceStyle:h,themeClass:g}=Aa(()=>n.config.configurations.appearance),v=e.computed(()=>n.config.configurations.notifications?.enabled??!0),b=e.computed(()=>v.value&&s.unreadMessagesCount.value>0),w=n.config.configurations.general.defaultBehavior==="active",y=e.ref(!w);w?l():u();const x=e.computed(()=>n.config.configurations.anchor),T=e.computed(()=>n.config.configurations.appearance),$=e.computed(()=>{if(!(a.value&&n.fullscreen))return d(x.value.position,x.value.offset)}),D=e.computed(()=>p(x.value.position)),S=e.computed(()=>({workflow:n.workflow,config:n.config,fullscreen:n.fullscreen})),A=e.computed(()=>({style:m(T.value.primaryColor),small:x.value.size==="small",large:x.value.size==="large",logo:x.value.logo??"",label:x.value.label??""})),E=async()=>{a.value||(y.value=!1,await e.nextTick(),l(),i("open"))},R=()=>{a.value&&(u(),i("close"))},N=()=>{y.value=!0};return c(n.workflow),f(n.config),e.watch(()=>n.workflow,L=>c(L)),e.watch(()=>n.config,L=>f(L)),e.watch(()=>r.value?.configurations.general.defaultBehavior,L=>{L==="active"?E():R()},{immediate:!0}),e.watch(a,L=>{L&&(y.value=!1)}),(L,P)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-fixed yunique wu-z-[99999]",[e.unref(g),e.unref(a)&&t.fullscreen?"wu-inset-0 wu-overflow-hidden":""]]),"data-testid":"app-widget",style:e.normalizeStyle([{"--widget-origin":D.value},$.value,e.unref(h)])},[e.createVNode(e.Transition,{name:"widget",onAfterLeave:N},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(wn,e.mergeProps({key:0},S.value,{onClose:R,onBack:P[0]||(P[0]=M=>i("back")),onSubmit:P[1]||(P[1]=M=>i("submit",M)),onEdgeClick:P[2]||(P[2]=M=>i("edge-click",M)),onChatServiceAction:P[3]||(P[3]=M=>i("chat-service-action",M)),onChatServiceMessageAction:P[4]||(P[4]=M=>i("chat-service-message-action",M))}),null,16)):e.createCommentVNode("",!0)]),_:1}),y.value?(e.openBlock(),e.createElementBlock("div",zl,[e.createVNode(tn,{style:e.normalizeStyle(A.value.style),small:A.value.small,large:A.value.large,logo:A.value.logo,label:A.value.label,onClick:E},null,8,["style","small","large","logo","label"]),b.value?(e.openBlock(),e.createBlock(z,{key:0,class:"wu-rounded-full wu-absolute -wu-top-2 -wu-right-1 wu-h-5 wu-w-5 wu-bg-red-600","data-testid":"app-widget-unread-badge",center:""},{default:e.withCtx(()=>[e.createVNode(V,{small:"",bold:"",white:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s).unreadMessagesCount>9?"9+":e.unref(s).unreadMessagesCount),1)]),_:1})]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],6))}}),Ea=ze(Ml,[["__scopeId","data-v-877709ba"]]),Hl=["top","right","bottom","left"],On=["start","end"],In=Hl.reduce((t,o)=>t.concat(o,o+"-"+On[0],o+"-"+On[1]),[]),nt=Math.min,Te=Math.max,Fl={left:"right",right:"left",bottom:"top",top:"bottom"},jl={start:"end",end:"start"};function qo(t,o,n){return Te(t,nt(o,n))}function Ee(t,o){return typeof t=="function"?t(o):t}function le(t){return t.split("-")[0]}function oe(t){return t.split("-")[1]}function _a(t){return t==="x"?"y":"x"}function gn(t){return t==="y"?"height":"width"}const Ul=new Set(["top","bottom"]);function pe(t){return Ul.has(le(t))?"y":"x"}function vn(t){return _a(pe(t))}function $a(t,o,n){n===void 0&&(n=!1);const i=oe(t),a=vn(t),r=gn(a);let s=a==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return o.reference[r]>o.floating[r]&&(s=Zt(s)),[s,Zt(s)]}function Wl(t){const o=Zt(t);return[Qt(t),o,Qt(o)]}function Qt(t){return t.replace(/start|end/g,o=>jl[o])}const zn=["left","right"],Mn=["right","left"],ql=["top","bottom"],Gl=["bottom","top"];function Kl(t,o,n){switch(t){case"top":case"bottom":return n?o?Mn:zn:o?zn:Mn;case"left":case"right":return o?ql:Gl;default:return[]}}function Ql(t,o,n,i){const a=oe(t);let r=Kl(le(t),n==="start",i);return a&&(r=r.map(s=>s+"-"+a),o&&(r=r.concat(r.map(Qt)))),r}function Zt(t){return t.replace(/left|right|bottom|top/g,o=>Fl[o])}function Zl(t){return{top:0,right:0,bottom:0,left:0,...t}}function Va(t){return typeof t!="number"?Zl(t):{top:t,right:t,bottom:t,left:t}}function Ye(t){const{x:o,y:n,width:i,height:a}=t;return{width:i,height:a,top:n,left:o,right:o+i,bottom:n+a,x:o,y:n}}function Hn(t,o,n){let{reference:i,floating:a}=t;const r=pe(o),s=vn(o),l=gn(s),u=le(o),c=r==="y",f=i.x+i.width/2-a.width/2,d=i.y+i.height/2-a.height/2,p=i[l]/2-a[l]/2;let m;switch(u){case"top":m={x:f,y:i.y-a.height};break;case"bottom":m={x:f,y:i.y+i.height};break;case"right":m={x:i.x+i.width,y:d};break;case"left":m={x:i.x-a.width,y:d};break;default:m={x:i.x,y:i.y}}switch(oe(o)){case"start":m[s]-=p*(n&&c?-1:1);break;case"end":m[s]+=p*(n&&c?-1:1);break}return m}const Yl=async(t,o,n)=>{const{placement:i="bottom",strategy:a="absolute",middleware:r=[],platform:s}=n,l=r.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(o));let c=await s.getElementRects({reference:t,floating:o,strategy:a}),{x:f,y:d}=Hn(c,i,u),p=i,m={},h=0;for(let g=0;g<l.length;g++){const{name:v,fn:b}=l[g],{x:w,y,data:x,reset:T}=await b({x:f,y:d,initialPlacement:i,placement:p,strategy:a,middlewareData:m,rects:c,platform:s,elements:{reference:t,floating:o}});f=w??f,d=y??d,m={...m,[v]:{...m[v],...x}},T&&h<=50&&(h++,typeof T=="object"&&(T.placement&&(p=T.placement),T.rects&&(c=T.rects===!0?await s.getElementRects({reference:t,floating:o,strategy:a}):T.rects),{x:f,y:d}=Hn(c,p,u)),g=-1)}return{x:f,y:d,placement:p,strategy:a,middlewareData:m}};async function io(t,o){var n;o===void 0&&(o={});const{x:i,y:a,platform:r,rects:s,elements:l,strategy:u}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:m=0}=Ee(o,t),h=Va(m),v=l[p?d==="floating"?"reference":"floating":d],b=Ye(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(v)))==null||n?v:v.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(l.floating)),boundary:c,rootBoundary:f,strategy:u})),w=d==="floating"?{x:i,y:a,width:s.floating.width,height:s.floating.height}:s.reference,y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l.floating)),x=await(r.isElement==null?void 0:r.isElement(y))?await(r.getScale==null?void 0:r.getScale(y))||{x:1,y:1}:{x:1,y:1},T=Ye(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:y,strategy:u}):w);return{top:(b.top-T.top+h.top)/x.y,bottom:(T.bottom-b.bottom+h.bottom)/x.y,left:(b.left-T.left+h.left)/x.x,right:(T.right-b.right+h.right)/x.x}}const Jl=t=>({name:"arrow",options:t,async fn(o){const{x:n,y:i,placement:a,rects:r,platform:s,elements:l,middlewareData:u}=o,{element:c,padding:f=0}=Ee(t,o)||{};if(c==null)return{};const d=Va(f),p={x:n,y:i},m=vn(a),h=gn(m),g=await s.getDimensions(c),v=m==="y",b=v?"top":"left",w=v?"bottom":"right",y=v?"clientHeight":"clientWidth",x=r.reference[h]+r.reference[m]-p[m]-r.floating[h],T=p[m]-r.reference[m],$=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let D=$?$[y]:0;(!D||!await(s.isElement==null?void 0:s.isElement($)))&&(D=l.floating[y]||r.floating[h]);const S=x/2-T/2,A=D/2-g[h]/2-1,E=nt(d[b],A),R=nt(d[w],A),N=E,L=D-g[h]-R,P=D/2-g[h]/2+S,M=qo(N,P,L),j=!u.arrow&&oe(a)!=null&&P!==M&&r.reference[h]/2-(P<N?E:R)-g[h]/2<0,q=j?P<N?P-N:P-L:0;return{[m]:p[m]+q,data:{[m]:M,centerOffset:P-M-q,...j&&{alignmentOffset:q}},reset:j}}});function Xl(t,o,n){return(t?[...n.filter(a=>oe(a)===t),...n.filter(a=>oe(a)!==t)]:n.filter(a=>le(a)===a)).filter(a=>t?oe(a)===t||(o?Qt(a)!==a:!1):!0)}const eu=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(o){var n,i,a;const{rects:r,middlewareData:s,placement:l,platform:u,elements:c}=o,{crossAxis:f=!1,alignment:d,allowedPlacements:p=In,autoAlignment:m=!0,...h}=Ee(t,o),g=d!==void 0||p===In?Xl(d||null,m,p):p,v=await io(o,h),b=((n=s.autoPlacement)==null?void 0:n.index)||0,w=g[b];if(w==null)return{};const y=$a(w,r,await(u.isRTL==null?void 0:u.isRTL(c.floating)));if(l!==w)return{reset:{placement:g[0]}};const x=[v[le(w)],v[y[0]],v[y[1]]],T=[...((i=s.autoPlacement)==null?void 0:i.overflows)||[],{placement:w,overflows:x}],$=g[b+1];if($)return{data:{index:b+1,overflows:T},reset:{placement:$}};const D=T.map(E=>{const R=oe(E.placement);return[E.placement,R&&f?E.overflows.slice(0,2).reduce((N,L)=>N+L,0):E.overflows[0],E.overflows]}).sort((E,R)=>E[1]-R[1]),A=((a=D.filter(E=>E[2].slice(0,oe(E[0])?2:3).every(R=>R<=0))[0])==null?void 0:a[0])||D[0][0];return A!==l?{data:{index:b+1,overflows:T},reset:{placement:A}}:{}}}},tu=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(o){var n,i;const{placement:a,middlewareData:r,rects:s,initialPlacement:l,platform:u,elements:c}=o,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...v}=Ee(t,o);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const b=le(a),w=pe(l),y=le(l)===l,x=await(u.isRTL==null?void 0:u.isRTL(c.floating)),T=p||(y||!g?[Zt(l)]:Wl(l)),$=h!=="none";!p&&$&&T.push(...Ql(l,g,h,x));const D=[l,...T],S=await io(o,v),A=[];let E=((i=r.flip)==null?void 0:i.overflows)||[];if(f&&A.push(S[b]),d){const P=$a(a,s,x);A.push(S[P[0]],S[P[1]])}if(E=[...E,{placement:a,overflows:A}],!A.every(P=>P<=0)){var R,N;const P=(((R=r.flip)==null?void 0:R.index)||0)+1,M=D[P];if(M&&(!(d==="alignment"?w!==pe(M):!1)||E.every(U=>pe(U.placement)===w?U.overflows[0]>0:!0)))return{data:{index:P,overflows:E},reset:{placement:M}};let j=(N=E.filter(q=>q.overflows[0]<=0).sort((q,U)=>q.overflows[1]-U.overflows[1])[0])==null?void 0:N.placement;if(!j)switch(m){case"bestFit":{var L;const q=(L=E.filter(U=>{if($){const G=pe(U.placement);return G===w||G==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(G=>G>0).reduce((G,ut)=>G+ut,0)]).sort((U,G)=>U[1]-G[1])[0])==null?void 0:L[0];q&&(j=q);break}case"initialPlacement":j=l;break}if(a!==j)return{reset:{placement:j}}}return{}}}},ou=new Set(["left","top"]);async function nu(t,o){const{placement:n,platform:i,elements:a}=t,r=await(i.isRTL==null?void 0:i.isRTL(a.floating)),s=le(n),l=oe(n),u=pe(n)==="y",c=ou.has(s)?-1:1,f=r&&u?-1:1,d=Ee(o,t);let{mainAxis:p,crossAxis:m,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof h=="number"&&(m=l==="end"?h*-1:h),u?{x:m*f,y:p*c}:{x:p*c,y:m*f}}const au=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(o){var n,i;const{x:a,y:r,placement:s,middlewareData:l}=o,u=await nu(o,t);return s===((n=l.offset)==null?void 0:n.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:a+u.x,y:r+u.y,data:{...u,placement:s}}}}},iu=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(o){const{x:n,y:i,placement:a}=o,{mainAxis:r=!0,crossAxis:s=!1,limiter:l={fn:v=>{let{x:b,y:w}=v;return{x:b,y:w}}},...u}=Ee(t,o),c={x:n,y:i},f=await io(o,u),d=pe(le(a)),p=_a(d);let m=c[p],h=c[d];if(r){const v=p==="y"?"top":"left",b=p==="y"?"bottom":"right",w=m+f[v],y=m-f[b];m=qo(w,m,y)}if(s){const v=d==="y"?"top":"left",b=d==="y"?"bottom":"right",w=h+f[v],y=h-f[b];h=qo(w,h,y)}const g=l.fn({...o,[p]:m,[d]:h});return{...g,data:{x:g.x-n,y:g.y-i,enabled:{[p]:r,[d]:s}}}}}},ru=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(o){var n,i;const{placement:a,rects:r,platform:s,elements:l}=o,{apply:u=()=>{},...c}=Ee(t,o),f=await io(o,c),d=le(a),p=oe(a),m=pe(a)==="y",{width:h,height:g}=r.floating;let v,b;d==="top"||d==="bottom"?(v=d,b=p===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(b=d,v=p==="end"?"top":"bottom");const w=g-f.top-f.bottom,y=h-f.left-f.right,x=nt(g-f[v],w),T=nt(h-f[b],y),$=!o.middlewareData.shift;let D=x,S=T;if((n=o.middlewareData.shift)!=null&&n.enabled.x&&(S=y),(i=o.middlewareData.shift)!=null&&i.enabled.y&&(D=w),$&&!p){const E=Te(f.left,0),R=Te(f.right,0),N=Te(f.top,0),L=Te(f.bottom,0);m?S=h-2*(E!==0||R!==0?E+R:Te(f.left,f.right)):D=g-2*(N!==0||L!==0?N+L:Te(f.top,f.bottom))}await u({...o,availableWidth:S,availableHeight:D});const A=await s.getDimensions(l.floating);return h!==A.width||g!==A.height?{reset:{rects:!0}}:{}}}};function X(t){var o;return((o=t.ownerDocument)==null?void 0:o.defaultView)||window}function re(t){return X(t).getComputedStyle(t)}const Fn=Math.min,Je=Math.max,Yt=Math.round;function Da(t){const o=re(t);let n=parseFloat(o.width),i=parseFloat(o.height);const a=t.offsetWidth,r=t.offsetHeight,s=Yt(n)!==a||Yt(i)!==r;return s&&(n=a,i=r),{width:n,height:i,fallback:s}}function ke(t){return Pa(t)?(t.nodeName||"").toLowerCase():""}let ht;function La(){if(ht)return ht;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(ht=t.brands.map((o=>o.brand+"/"+o.version)).join(" "),ht):navigator.userAgent}function se(t){return t instanceof X(t).HTMLElement}function ye(t){return t instanceof X(t).Element}function Pa(t){return t instanceof X(t).Node}function jn(t){return typeof ShadowRoot>"u"?!1:t instanceof X(t).ShadowRoot||t instanceof ShadowRoot}function ro(t){const{overflow:o,overflowX:n,overflowY:i,display:a}=re(t);return/auto|scroll|overlay|hidden|clip/.test(o+i+n)&&!["inline","contents"].includes(a)}function su(t){return["table","td","th"].includes(ke(t))}function Go(t){const o=/firefox/i.test(La()),n=re(t),i=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!=="none"||n.perspective!=="none"||!!i&&i!=="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 r=n.contain;return r!=null&&r.includes(a)}))}function Ra(){return!/^((?!chrome|android).)*safari/i.test(La())}function yn(t){return["html","body","#document"].includes(ke(t))}function Oa(t){return ye(t)?t:t.contextElement}const Ia={x:1,y:1};function Pe(t){const o=Oa(t);if(!se(o))return Ia;const n=o.getBoundingClientRect(),{width:i,height:a,fallback:r}=Da(o);let s=(r?Yt(n.width):n.width)/i,l=(r?Yt(n.height):n.height)/a;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}function at(t,o,n,i){var a,r;o===void 0&&(o=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),l=Oa(t);let u=Ia;o&&(i?ye(i)&&(u=Pe(i)):u=Pe(t));const c=l?X(l):window,f=!Ra()&&n;let d=(s.left+(f&&((a=c.visualViewport)==null?void 0:a.offsetLeft)||0))/u.x,p=(s.top+(f&&((r=c.visualViewport)==null?void 0:r.offsetTop)||0))/u.y,m=s.width/u.x,h=s.height/u.y;if(l){const g=X(l),v=i&&ye(i)?X(i):i;let b=g.frameElement;for(;b&&i&&v!==g;){const w=Pe(b),y=b.getBoundingClientRect(),x=getComputedStyle(b);y.x+=(b.clientLeft+parseFloat(x.paddingLeft))*w.x,y.y+=(b.clientTop+parseFloat(x.paddingTop))*w.y,d*=w.x,p*=w.y,m*=w.x,h*=w.y,d+=y.x,p+=y.y,b=X(b).frameElement}}return{width:m,height:h,top:p,right:d+m,bottom:p+h,left:d,x:d,y:p}}function be(t){return((Pa(t)?t.ownerDocument:t.document)||window.document).documentElement}function so(t){return ye(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function za(t){return at(be(t)).left+so(t).scrollLeft}function it(t){if(ke(t)==="html")return t;const o=t.assignedSlot||t.parentNode||jn(t)&&t.host||be(t);return jn(o)?o.host:o}function Ma(t){const o=it(t);return yn(o)?o.ownerDocument.body:se(o)&&ro(o)?o:Ma(o)}function Jt(t,o){var n;o===void 0&&(o=[]);const i=Ma(t),a=i===((n=t.ownerDocument)==null?void 0:n.body),r=X(i);return a?o.concat(r,r.visualViewport||[],ro(i)?i:[]):o.concat(i,Jt(i))}function Un(t,o,n){return o==="viewport"?Ye((function(i,a){const r=X(i),s=be(i),l=r.visualViewport;let u=s.clientWidth,c=s.clientHeight,f=0,d=0;if(l){u=l.width,c=l.height;const p=Ra();(p||!p&&a==="fixed")&&(f=l.offsetLeft,d=l.offsetTop)}return{width:u,height:c,x:f,y:d}})(t,n)):ye(o)?Ye((function(i,a){const r=at(i,!0,a==="fixed"),s=r.top+i.clientTop,l=r.left+i.clientLeft,u=se(i)?Pe(i):{x:1,y:1};return{width:i.clientWidth*u.x,height:i.clientHeight*u.y,x:l*u.x,y:s*u.y}})(o,n)):Ye((function(i){const a=be(i),r=so(i),s=i.ownerDocument.body,l=Je(a.scrollWidth,a.clientWidth,s.scrollWidth,s.clientWidth),u=Je(a.scrollHeight,a.clientHeight,s.scrollHeight,s.clientHeight);let c=-r.scrollLeft+za(i);const f=-r.scrollTop;return re(s).direction==="rtl"&&(c+=Je(a.clientWidth,s.clientWidth)-l),{width:l,height:u,x:c,y:f}})(be(t)))}function Wn(t){return se(t)&&re(t).position!=="fixed"?t.offsetParent:null}function qn(t){const o=X(t);let n=Wn(t);for(;n&&su(n)&&re(n).position==="static";)n=Wn(n);return n&&(ke(n)==="html"||ke(n)==="body"&&re(n).position==="static"&&!Go(n))?o:n||(function(i){let a=it(i);for(;se(a)&&!yn(a);){if(Go(a))return a;a=it(a)}return null})(t)||o}function lu(t,o,n){const i=se(o),a=be(o),r=at(t,!0,n==="fixed",o);let s={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(i||!i&&n!=="fixed")if((ke(o)!=="body"||ro(a))&&(s=so(o)),se(o)){const u=at(o,!0);l.x=u.x+o.clientLeft,l.y=u.y+o.clientTop}else a&&(l.x=za(a));return{x:r.left+s.scrollLeft-l.x,y:r.top+s.scrollTop-l.y,width:r.width,height:r.height}}const uu={getClippingRect:function(t){let{element:o,boundary:n,rootBoundary:i,strategy:a}=t;const r=n==="clippingAncestors"?(function(c,f){const d=f.get(c);if(d)return d;let p=Jt(c).filter((v=>ye(v)&&ke(v)!=="body")),m=null;const h=re(c).position==="fixed";let g=h?it(c):c;for(;ye(g)&&!yn(g);){const v=re(g),b=Go(g);(h?b||m:b||v.position!=="static"||!m||!["absolute","fixed"].includes(m.position))?m=v:p=p.filter((w=>w!==g)),g=it(g)}return f.set(c,p),p})(o,this._c):[].concat(n),s=[...r,i],l=s[0],u=s.reduce(((c,f)=>{const d=Un(o,f,a);return c.top=Je(d.top,c.top),c.right=Fn(d.right,c.right),c.bottom=Fn(d.bottom,c.bottom),c.left=Je(d.left,c.left),c}),Un(o,l,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:i}=t;const a=se(n),r=be(n);if(n===r)return o;let s={scrollLeft:0,scrollTop:0},l={x:1,y:1};const u={x:0,y:0};if((a||!a&&i!=="fixed")&&((ke(n)!=="body"||ro(r))&&(s=so(n)),se(n))){const c=at(n);l=Pe(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-s.scrollLeft*l.x+u.x,y:o.y*l.y-s.scrollTop*l.y+u.y}},isElement:ye,getDimensions:function(t){return se(t)?Da(t):t.getBoundingClientRect()},getOffsetParent:qn,getDocumentElement:be,getScale:Pe,async getElementRects(t){let{reference:o,floating:n,strategy:i}=t;const a=this.getOffsetParent||qn,r=this.getDimensions;return{reference:lu(o,await a(n),i),floating:{x:0,y:0,...await r(n)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>re(t).direction==="rtl"},cu=(t,o,n)=>{const i=new Map,a={platform:uu,...n},r={...a.platform,_c:i};return Yl(t,o,{...a,platform:r})};function Ha(t,o){for(const n in o)Object.prototype.hasOwnProperty.call(o,n)&&(typeof o[n]=="object"&&t[n]?Ha(t[n],o[n]):t[n]=o[n])}const ne={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 rt(t,o){let n=ne.themes[t]||{},i;do i=n[o],typeof i>"u"?n.$extend?n=ne.themes[n.$extend]||{}:(n=null,i=ne[o]):n=null;while(n);return i}function du(t){const o=[t];let n=ne.themes[t]||{};do n.$extend&&!n.$resetCss?(o.push(n.$extend),n=ne.themes[n.$extend]||{}):n=null;while(n);return o.map(i=>`v-popper--theme-${i}`)}function Gn(t){const o=[t];let n=ne.themes[t]||{};do n.$extend?(o.push(n.$extend),n=ne.themes[n.$extend]||{}):n=null;while(n);return o}let Ie=!1;if(typeof window<"u"){Ie=!1;try{const t=Object.defineProperty({},"passive",{get(){Ie=!0}});window.addEventListener("test",null,t)}catch{}}let Fa=!1;typeof window<"u"&&typeof navigator<"u"&&(Fa=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const ja=["auto","top","bottom","left","right"].reduce((t,o)=>t.concat([o,`${o}-start`,`${o}-end`]),[]),Kn={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},Qn={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function Zn(t,o){const n=t.indexOf(o);n!==-1&&t.splice(n,1)}function No(){return new Promise(t=>requestAnimationFrame(()=>{requestAnimationFrame(t)}))}const te=[];let xe=null;const Yn={};function Jn(t){let o=Yn[t];return o||(o=Yn[t]=[]),o}let Ko=function(){};typeof window<"u"&&(Ko=window.Element);function H(t){return function(o){return rt(o.theme,t)}}const Ao="__floating-vue__popper",Ua=()=>e.defineComponent({name:"VPopper",provide(){return{[Ao]:{parentPopper:this}}},inject:{[Ao]:{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:H("disabled")},positioningDisabled:{type:Boolean,default:H("positioningDisabled")},placement:{type:String,default:H("placement"),validator:t=>ja.includes(t)},delay:{type:[String,Number,Object],default:H("delay")},distance:{type:[Number,String],default:H("distance")},skidding:{type:[Number,String],default:H("skidding")},triggers:{type:Array,default:H("triggers")},showTriggers:{type:[Array,Function],default:H("showTriggers")},hideTriggers:{type:[Array,Function],default:H("hideTriggers")},popperTriggers:{type:Array,default:H("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:H("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:H("popperHideTriggers")},container:{type:[String,Object,Ko,Boolean],default:H("container")},boundary:{type:[String,Ko],default:H("boundary")},strategy:{type:String,validator:t=>["absolute","fixed"].includes(t),default:H("strategy")},autoHide:{type:[Boolean,Function],default:H("autoHide")},handleResize:{type:Boolean,default:H("handleResize")},instantMove:{type:Boolean,default:H("instantMove")},eagerMount:{type:Boolean,default:H("eagerMount")},popperClass:{type:[String,Array,Object],default:H("popperClass")},computeTransformOrigin:{type:Boolean,default:H("computeTransformOrigin")},autoMinSize:{type:Boolean,default:H("autoMinSize")},autoSize:{type:[Boolean,String],default:H("autoSize")},autoMaxSize:{type:Boolean,default:H("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:H("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:H("preventOverflow")},overflowPadding:{type:[Number,String],default:H("overflowPadding")},arrowPadding:{type:[Number,String],default:H("arrowPadding")},arrowOverflow:{type:Boolean,default:H("arrowOverflow")},flip:{type:Boolean,default:H("flip")},shift:{type:Boolean,default:H("shift")},shiftCrossAxis:{type:Boolean,default:H("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:H("noAutoFocus")},disposeTimeout:{type:Number,default:H("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[Ao])==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 i,a;(i=this.parentPopper)!=null&&i.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(au({mainAxis:this.distance,crossAxis:this.skidding}));const o=this.placement.startsWith("auto");if(o?t.middleware.push(eu({alignment:this.placement.split("-")[1]??""})):t.placement=this.placement,this.preventOverflow&&(this.shift&&t.middleware.push(iu({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!o&&this.flip&&t.middleware.push(tu({padding:this.overflowPadding,boundary:this.boundary}))),t.middleware.push(Jl({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&t.middleware.push({name:"arrowOverflow",fn:({placement:i,rects:a,middlewareData:r})=>{let s;const{centerOffset:l}=r.arrow;return i.startsWith("top")||i.startsWith("bottom")?s=Math.abs(l)>a.reference.width/2:s=Math.abs(l)>a.reference.height/2,{data:{overflow:s}}}}),this.autoMinSize||this.autoSize){const i=this.autoSize?this.autoSize:this.autoMinSize?"min":null;t.middleware.push({name:"autoSize",fn:({rects:a,placement:r,middlewareData:s})=>{var l;if((l=s.autoSize)!=null&&l.skip)return{};let u,c;return r.startsWith("top")||r.startsWith("bottom")?u=a.reference.width:c=a.reference.height,this.$_innerNode.style[i==="min"?"minWidth":i==="max"?"maxWidth":"width"]=u!=null?`${u}px`:null,this.$_innerNode.style[i==="min"?"minHeight":i==="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(ru({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:i,availableHeight:a})=>{this.$_innerNode.style.maxWidth=i!=null?`${i}px`:null,this.$_innerNode.style.maxHeight=a!=null?`${a}px`:null}})));const n=await cu(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),xe&&this.instantMove&&xe.instantMove&&xe!==this.parentPopper){xe.$_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&&(xe=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 No(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Jt(this.$_referenceNode),...Jt(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"),i=n.parentNode.getBoundingClientRect(),a=o.x+o.width/2-(i.left+n.offsetLeft),r=o.y+o.height/2-(i.top+n.offsetTop);this.result.transformOrigin=`${a}px ${r}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<te.length;n++)o=te[n],o.showGroup!==t&&(o.hide(),o.$emit("close-group"))}te.push(this),document.body.classList.add("v-popper--some-open");for(const o of Gn(this.theme))Jn(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 No(),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,Zn(te,this),te.length===0&&document.body.classList.remove("v-popper--some-open");for(const n of Gn(this.theme)){const i=Jn(n);Zn(i,this),i.length===0&&document.body.classList.remove(`v-popper--some-open--${n}`)}xe===this&&(xe=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 No(),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,Kn,this.triggers,this.showTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],Kn,this.popperTriggers,this.popperShowTriggers,t);const o=n=>{n.usedByTooltip||this.hide({event:n})};this.$_registerTriggerListeners(this.$_targetNodes,Qn,this.triggers,this.hideTriggers,o),this.$_registerTriggerListeners([this.$_popperNode],Qn,this.popperTriggers,this.popperHideTriggers,o)},$_registerEventListeners(t,o,n){this.$_events.push({targetNodes:t,eventType:o,handler:n}),t.forEach(i=>i.addEventListener(o,n,Ie?{passive:!0}:void 0))},$_registerTriggerListeners(t,o,n,i,a){let r=n;i!=null&&(r=typeof i=="function"?i(r):i),r.forEach(s=>{const l=o[s];l&&this.$_registerEventListeners(t,l,a)})},$_removeEventListeners(t){const o=[];this.$_events.forEach(n=>{const{targetNodes:i,eventType:a,handler:r}=n;!t||t===a?i.forEach(s=>s.removeEventListener(a,r)):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 i=n.getAttribute(t);i&&(n.removeAttribute(t),n.setAttribute(o,i))}},$_applyAttrsToTarget(t){for(const o of this.$_targetNodes)for(const n in t){const i=t[n];i==null?o.removeAttribute(n):o.setAttribute(n,i)}},$_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(Xe>=t.left&&Xe<=t.right&&et>=t.top&&et<=t.bottom){const o=this.$_popperNode.getBoundingClientRect(),n=Xe-he,i=et-we,a=o.left+o.width/2-he+(o.top+o.height/2)-we+o.width+o.height,r=he+n*a,s=we+i*a;return wt(he,we,r,s,o.left,o.top,o.left,o.bottom)||wt(he,we,r,s,o.left,o.top,o.right,o.top)||wt(he,we,r,s,o.right,o.top,o.right,o.bottom)||wt(he,we,r,s,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(Fa){const t=Ie?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",o=>Xn(o,!0),t),document.addEventListener("touchend",o=>ea(o,!0),t)}else window.addEventListener("mousedown",t=>Xn(t,!1),!0),window.addEventListener("click",t=>ea(t,!1),!0);window.addEventListener("resize",fu)}function Xn(t,o){if(ne.autoHideOnMousedown)Wa(t,o);else for(let n=0;n<te.length;n++){const i=te[n];try{i.mouseDownContains=i.popperNode().contains(t.target)}catch{}}}function ea(t,o){ne.autoHideOnMousedown||Wa(t,o)}function Wa(t,o){const n={};for(let i=te.length-1;i>=0;i--){const a=te[i];try{const r=a.containsGlobalTarget=a.mouseDownContains||a.popperNode().contains(t.target);a.pendingHide=!1,requestAnimationFrame(()=>{if(a.pendingHide=!1,!n[a.randomId]&&ta(a,r,t)){if(a.$_handleGlobalClose(t,o),!t.closeAllPopover&&t.closePopover&&r){let l=a.parentPopper;for(;l;)n[l.randomId]=!0,l=l.parentPopper;return}let s=a.parentPopper;for(;s&&ta(s,s.containsGlobalTarget,t);)s.$_handleGlobalClose(t,o),s=s.parentPopper}})}catch{}}}function ta(t,o,n){return n.closeAllPopover||n.closePopover&&o||pu(t,n)&&!o}function pu(t,o){if(typeof t.autoHide=="function"){const n=t.autoHide(o);return t.lastAutoHide=n,n}return t.autoHide}function fu(){for(let t=0;t<te.length;t++)te[t].$_computePosition()}let he=0,we=0,Xe=0,et=0;typeof window<"u"&&window.addEventListener("mousemove",t=>{he=Xe,we=et,Xe=t.clientX,et=t.clientY},Ie?{passive:!0}:void 0);function wt(t,o,n,i,a,r,s,l){const u=((s-a)*(o-r)-(l-r)*(t-a))/((l-r)*(n-t)-(s-a)*(i-o)),c=((n-t)*(o-r)-(i-o)*(t-a))/((l-r)*(n-t)-(s-a)*(i-o));return u>=0&&u<=1&&c>=0&&c<=1}const mu={extends:Ua()},lo=(t,o)=>{const n=t.__vccOpts||t;for(const[i,a]of o)n[i]=a;return n};function hu(t,o,n,i,a,r){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 wu=lo(mu,[["render",hu]]);function gu(){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 i=t.indexOf("rv:");return parseInt(t.substring(i+3,t.indexOf(".",i)),10)}var a=t.indexOf("Edge/");return a>0?parseInt(t.substring(a+5,t.indexOf(".",a)),10):-1}let yt;function Qo(){Qo.init||(Qo.init=!0,yt=gu()!==-1)}var uo={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Qo(),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",yt&&this.$el.appendChild(t),t.data="about:blank",yt||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&&(!yt&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const vu=e.withScopeId("data-v-b329ee4c");e.pushScopeId("data-v-b329ee4c");const yu={class:"resize-observer",tabindex:"-1"};e.popScopeId();const bu=vu((t,o,n,i,a,r)=>(e.openBlock(),e.createBlock("div",yu)));uo.render=bu;uo.__scopeId="data-v-b329ee4c";uo.__file="src/components/ResizeObserver.vue";const qa=(t="theme")=>({computed:{themeClass(){return du(this[t])}}}),ku=e.defineComponent({name:"VPopperContent",components:{ResizeObserver:uo},mixins:[qa()],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}}}),xu=["id","aria-hidden","tabindex","data-popper-placement"],Cu={ref:"inner",class:"v-popper__inner"},Tu=e.createElementVNode("div",{class:"v-popper__arrow-outer"},null,-1),Bu=e.createElementVNode("div",{class:"v-popper__arrow-inner"},null,-1),Nu=[Tu,Bu];function Au(t,o,n,i,a,r){const s=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",Cu,[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(s,{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)},Nu,4)],4)],46,xu)}const Ga=lo(ku,[["render",Au]]),Ka={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 Zo=function(){};typeof window<"u"&&(Zo=window.Element);const Su=e.defineComponent({name:"VPopperWrapper",components:{Popper:wu,PopperContent:Ga},mixins:[Ka,qa("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,Zo,Boolean],default:void 0},boundary:{type:[String,Zo],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 Eu(t,o,n,i,a,r){const s=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:h,handleResize:g,onResize:v,classes:b,result:w})=>[e.renderSlot(t.$slots,"default",{shown:c,show:m,hide:h}),e.createVNode(s,{ref:"popperContent","popper-id":u,theme:t.finalTheme,shown:c,mounted:f,"skip-transition":d,"auto-hide":p,"handle-resize":g,classes:b,result:w,onHide:h,onResize:v},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"popper",{shown:c,hide:h})]),_: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 bn=lo(Su,[["render",Eu]]),_u={...bn,name:"VDropdown",vPopperTheme:"dropdown"},$u={...bn,name:"VMenu",vPopperTheme:"menu"},Vu={...bn,name:"VTooltip",vPopperTheme:"tooltip"},Du=e.defineComponent({name:"VTooltipDirective",components:{Popper:Ua(),PopperContent:Ga},mixins:[Ka],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:t=>rt(t.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:t=>rt(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(i=>this.onResult(o,i)):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}}}),Lu=["innerHTML"],Pu=["textContent"];function Ru(t,o,n,i,a,r){const s=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:h,onResize:g,classes:v,result:b})=>[e.createVNode(s,{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":h,classes:v,result:b,onHide:m,onResize:g},{default:e.withCtx(()=>[t.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:t.finalContent},null,8,Lu)):(e.openBlock(),e.createElementBlock("div",{key:1,textContent:e.toDisplayString(t.finalContent)},null,8,Pu))]),_: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 Ou=lo(Du,[["render",Ru]]),Qa="v-popper--has-tooltip";function Iu(t,o){let n=t.placement;if(!n&&o)for(const i of ja)o[i]&&(n=i);return n||(n=rt(t.theme||"tooltip","placement")),n}function Za(t,o,n){let i;const a=typeof o;return a==="string"?i={content:o}:o&&a==="object"?i=o:i={content:!1},i.placement=Iu(i,n),i.targetNodes=()=>[t],i.referenceNode=()=>t,i}let So,st,zu=0;function Mu(){if(So)return;st=e.ref([]),So=e.createApp({name:"VTooltipDirectiveApp",setup(){return{directives:st}},render(){return this.directives.map(o=>e.h(Ou,{...o.options,shown:o.shown||o.options.shown,key:o.id}))},devtools:{hide:!0}});const t=document.createElement("div");document.body.appendChild(t),So.mount(t)}function Hu(t,o,n){Mu();const i=e.ref(Za(t,o,n)),a=e.ref(!1),r={id:zu++,options:i,shown:a};return st.value.push(r),t.classList&&t.classList.add(Qa),t.$_popper={options:i,item:r,show(){a.value=!0},hide(){a.value=!1}}}function Ya(t){if(t.$_popper){const o=st.value.indexOf(t.$_popper.item);o!==-1&&st.value.splice(o,1),delete t.$_popper,delete t.$_popperOldShown,delete t.$_popperMountTarget}t.classList&&t.classList.remove(Qa)}function oa(t,{value:o,modifiers:n}){const i=Za(t,o,n);if(!i.content||rt(i.theme||"tooltip","disabled"))Ya(t);else{let a;t.$_popper?(a=t.$_popper,a.options.value=i):a=Hu(t,o,n),typeof o.shown<"u"&&o.shown!==t.$_popperOldShown&&(t.$_popperOldShown=o.shown,o.shown?a.show():a.hide())}}const Fu={beforeMount:oa,updated:oa,beforeUnmount(t){Ya(t)}};function na(t){t.addEventListener("mousedown",Xt),t.addEventListener("click",Xt),t.addEventListener("touchstart",Ja,Ie?{passive:!0}:!1)}function aa(t){t.removeEventListener("mousedown",Xt),t.removeEventListener("click",Xt),t.removeEventListener("touchstart",Ja),t.removeEventListener("touchend",Xa),t.removeEventListener("touchcancel",ei)}function Xt(t){const o=t.currentTarget;t.closePopover=!o.$_vclosepopover_touch,t.closeAllPopover=o.$_closePopoverModifiers&&!!o.$_closePopoverModifiers.all}function Ja(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",Xa),o.addEventListener("touchcancel",ei)}}function Xa(t){const o=t.currentTarget;if(o.$_vclosepopover_touch=!1,t.changedTouches.length===1){const n=t.changedTouches[0],i=o.$_vclosepopover_touchPoint;t.closePopover=Math.abs(n.screenY-i.screenY)<20&&Math.abs(n.screenX-i.screenX)<20,t.closeAllPopover=o.$_closePopoverModifiers&&!!o.$_closePopoverModifiers.all}}function ei(t){const o=t.currentTarget;o.$_vclosepopover_touch=!1}const ju={beforeMount(t,{value:o,modifiers:n}){t.$_closePopoverModifiers=n,(typeof o>"u"||o)&&na(t)},updated(t,{value:o,oldValue:n,modifiers:i}){t.$_closePopoverModifiers=i,o!==n&&(typeof o>"u"||o?na(t):aa(t))},beforeUnmount(t){aa(t)}};function Uu(t,o={}){t.$_vTooltipInstalled||(t.$_vTooltipInstalled=!0,Ha(ne,o),t.directive("tooltip",Fu),t.directive("close-popper",ju),t.component("VTooltip",Vu),t.component("VDropdown",_u),t.component("VMenu",$u))}const Wu={version:"5.2.2",install:Uu,options:ne},qu="c3fd21c9-c91a-4c66-baa5-c3e050c2cc74",ia="2026-10-30T16:35:31.633Z",Gu="da3cbfd7-4cdc-481b-a30e-314a9ce96b92",Ku="https://svgl.app/library/slack.svg",Me=t=>({id:t.id,companyId:qu,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:ia,updatedAt:ia}),Ce=(t,o)=>({id:t,nextRuleId:o}),Yo=Me({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:Ku,title:"Slack",subtitle:"Retire todas suas dúvidas no nosso Widget"}}}),Eo=Me({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"}]}}}),_o=Me({id:"f230e458-bfe3-461f-b971-00ff2e99ac77",name:"Falar com vendas (Ligação)",action:"widget-service-screen",settings:{behavior:"voice",features:{sendMessage:!1,sendAttachment:!1}}}),$o=Me({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"}]}}}),ra=Me({id:"12bf98e7-1c99-4971-a4a8-23d039f2d730",name:"Nova tela",action:"widget-base-screen",settings:null}),bt=Me({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
6
|
</h3>
|
|
3
7
|
|
|
4
8
|
<p>
|
|
@@ -867,4 +871,4 @@
|
|
|
867
871
|
</p>
|
|
868
872
|
|
|
869
873
|
<p><strong>¡Estamos aquí para ayudarte!</strong></p>
|
|
870
|
-
`}}}}),
|
|
874
|
+
`}}}}),ti={id:Gu,rules:[Eo,_o,$o,ra,bt,Yo],edges:{[Yo.id]:[Ce("a4d9ac3b-2212-46f6-afba-467b884b238d",Eo.id),Ce("83c40bab-2126-450d-8556-a1c052a8efdb",_o.id),Ce("88435327-78cd-49bc-9f9d-37c764bc2091",$o.id),Ce("c1e8f4a2-9b7d-4e6a-8f3c-2d5a1b0e7c94",bt.id)],[bt.id]:[Ce("d4a2b9c1-6e8f-4a7b-9c2d-1f0e5a8b3c76",Eo.id),Ce("e5b3c0d2-7f9a-4b8c-0d3e-2a1f6b9c4d87",_o.id)],[$o.id]:[Ce("27af113a-047e-4410-8d90-2f024c7a7fc5",ra.id)]}},Qu=bt,Zu=Yo,Yu=t=>ti.rules.find(o=>o.id===t),Ju={configurations:{alias:"Slack Suporte",general:{defaultBehavior:"inactive",language:"pt-BR",isClosable:!0},appearance:{theme:"dark",primaryColor:"#5c7d1e"},anchor:{label:"Fale conosco",size:"medium",logo:"https://svgl.app/library/slack.svg",position:"bottom-right",offset:{x:16,y:16}}}},Xu={install:t=>{t.use(Wu),t.component("AppIdentificationPage",en),t.component("AppFormTextInput",Xo),t.component("AppWidgetAnchor",tn),t.component("AppArticlePage",on),t.component("AppServicePage",mn),t.component("AppScreenPage",hn),t.component("AppWidgetView",wn),t.component("AppTextInput",Sa),t.component("AppCarousel",oo),t.component("AppAudioPlayer",lt),t.component("AppSkeleton",dn),t.component("AppTyping",pn),t.component("AppMessage",Ze),t.component("AppWidget",Ea),t.component("AppButton",F),t.component("AppEmpty",fn),t.component("AppGroup",z),t.component("AppEdge",Oe),t.component("AppIcon",_),t.component("AppText",V)}};exports.AppArticlePage=on;exports.AppAudioPlayer=lt;exports.AppButton=F;exports.AppCarousel=oo;exports.AppEdge=Oe;exports.AppEmpty=fn;exports.AppFormTextInput=Xo;exports.AppGroup=z;exports.AppIcon=_;exports.AppIdentificationPage=en;exports.AppMessage=Ze;exports.AppScreenPage=hn;exports.AppServicePage=mn;exports.AppSkeleton=dn;exports.AppText=V;exports.AppTextInput=Sa;exports.AppTyping=pn;exports.AppWidget=Ea;exports.AppWidgetAnchor=tn;exports.AppWidgetView=wn;exports.ServiceChatMessageBuilder=Jo;exports.ServiceChatMessageVO=Re;exports.default=Xu;exports.demoArticleRule=Qu;exports.demoRootRule=Zu;exports.demoWidgetConfig=Ju;exports.demoWorkflow=ti;exports.findDemoRuleById=Yu;exports.resolveMessageFrom=eo;exports.useAppWidget=Se;exports.useChatService=ca;exports.useServicePage=da;exports.useVoiceService=sa;
|