@kvass/widgets 1.7.13 → 1.7.14
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/finn.js +1 -1
- package/package.json +1 -1
package/dist/finn.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import{Q as inject,q as defineComponent,r as ref,c as createElementBlock,o as openBlock,j as createVNode,w as withCtx,v as unref,a as createBaseVNode,m as mergeProps,t as toDisplayString,e as createBlock,d as createCommentVNode,F as Fragment,_ as _export_sfc,b as computed,i as onMounted,l as renderList,C as createTextVNode,H as mergeModels,I as useModel,a7 as pushScopeId,a8 as popScopeId,Y as resolveComponent,g as renderSlot,y as normalizeStyle,a9 as withKeys,n as normalizeClass,a1 as nextTick,aa as createApp,s as h$3,ab as withScopeId,J as normalizeProps,K as guardReactiveProps,z as withDirectives,ac as useId,ad as toRef,E as watch,D as onBeforeUnmount,f as resolveDynamicComponent,a0 as provide,p as defineCustomElement}from"./_plugin-vue_export-helper.js";import{B as Be,z as zr,V as Ve,T as Th,s as sa,c as cV,i as eV,j as sh,t as tC,C as CV,J as JB,h as hV,G as GS,b as By,E as EV,x as xV,v as vV,Z as ZB,w as wV,e as Bd,o as oV}from"./index.es2.js";import{u as useCurrentElement}from"./index2.js";import{g as getDefaultExportFromCjs$1,t as toCurrency,C as Clone,h as hasDiff,u as uploadFunction,D as Diff}from"./index.js";const PropsInjectionKey=Symbol("props");function _isPlaceholder(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function _curry1(e){return function t(M){return arguments.length===0||_isPlaceholder(M)?t:e.apply(this,arguments)}}function _curry2(e){return function t(M,I){switch(arguments.length){case 0:return t;case 1:return _isPlaceholder(M)?t:_curry1(function(V){return e(M,V)});default:return _isPlaceholder(M)&&_isPlaceholder(I)?t:_isPlaceholder(M)?_curry1(function(V){return e(V,I)}):_isPlaceholder(I)?_curry1(function(V){return e(M,V)}):e(M,I)}}}function _curry3(e){return function t(M,I,V){switch(arguments.length){case 0:return t;case 1:return _isPlaceholder(M)?t:_curry2(function(N,j){return e(M,N,j)});case 2:return _isPlaceholder(M)&&_isPlaceholder(I)?t:_isPlaceholder(M)?_curry2(function(N,j){return e(N,I,j)}):_isPlaceholder(I)?_curry2(function(N,j){return e(M,N,j)}):_curry1(function(N){return e(M,I,N)});default:return _isPlaceholder(M)&&_isPlaceholder(I)&&_isPlaceholder(V)?t:_isPlaceholder(M)&&_isPlaceholder(I)?_curry2(function(N,j){return e(N,j,V)}):_isPlaceholder(M)&&_isPlaceholder(V)?_curry2(function(N,j){return e(N,I,j)}):_isPlaceholder(I)&&_isPlaceholder(V)?_curry2(function(N,j){return e(M,N,j)}):_isPlaceholder(M)?_curry1(function(N){return e(N,I,V)}):_isPlaceholder(I)?_curry1(function(N){return e(M,N,V)}):_isPlaceholder(V)?_curry1(function(N){return e(M,I,N)}):e(M,I,V)}}}function _has(e,t){return Object.prototype.hasOwnProperty.call(t,e)}function _isObject(e){return Object.prototype.toString.call(e)==="[object Object]"}var mergeWithKey=_curry3(function(t,M,I){var V={},N;M=M||{},I=I||{};for(N in M)_has(N,M)&&(V[N]=_has(N,I)?t(N,M[N],I[N]):M[N]);for(N in I)_has(N,I)&&!_has(N,V)&&(V[N]=I[N]);return V}),mergeDeepWithKey=_curry3(function e(t,M,I){return mergeWithKey(function(V,N,j){return _isObject(N)&&_isObject(j)?e(t,N,j):t(V,N,j)},M,I)}),mergeDeepRight=_curry2(function(t,M){return mergeDeepWithKey(function(I,V,N){return N},t,M)});async function fetch$1(e,t={}){return fetch(e,mergeDeepRight({headers:{Accept:"application/json","Content-Type":"application/json"},credentials:"include"},t)).then(I=>{if(!I.ok)throw I;return I})}function SSE(e){const t=new TextDecoder,M=[],I=j=>t.decode(j).split(`
|
|
2
|
-
`).map(J=>{if(J)return JSON.parse(J.replace("data: ",""))}).filter(Boolean),V=e.body.getReader(),N=(j,J)=>M.filter(U=>U.event===j).forEach(U=>U.callback(J));return V.read().then(function j({done:J,value:U}){return J?N("finished"):(I(U).forEach(ne=>N(ne.event,ne.payload)),V.read().then(j))}),{on:(j,J)=>{M.push({event:j,callback:J})},cancel:()=>{V.cancel()}}}function useAPI(e){const t=inject(PropsInjectionKey),M=be=>new URL(`${t.tenant}/api/integration/${t.integrationId}/callbacks/${be}`);return{getAds:be=>{const se=M("ads");return be&&se.searchParams.append("id",be),fetch$1(se.toString(),{method:"GET",headers:{authorization:`Bearer ${t.token}`}}).then(Se=>Se.json())},navigateView:(be,se)=>{const Se=M(be);Se.searchParams.append("token",t.token),Se.searchParams.append("project",t.project),se&&Se.searchParams.append("id",se),e.value.dispatchEvent(new CustomEvent("action",{detail:{type:"navigate",value:{name:"form",query:{target:Se.toString()}}},bubbles:!0,composed:!0}))},remove:be=>{const se=M("unpublish");return se.searchParams.append("id",be),fetch$1(se.toString(),{method:"DELETE",headers:{authorization:`Bearer ${t.token}`}})},publish:async(be,se={})=>{const{preview:Se=!1}=se,xe=M("publish"),ye=await fetch$1(xe.toString(),{method:"POST",cache:"no-cache",keepalive:!0,headers:{Authorization:`Bearer ${t.token}`,"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify({data:be,preview:Se})});return SSE(ye)},unpublish:be=>{const se=M("unpublish");return se.searchParams.append("id",be),fetch$1(se.toString(),{method:"POST",headers:{authorization:`Bearer ${t.token}`}})},navigateProjectStep:be=>{e.value.dispatchEvent(new CustomEvent("action",{detail:{type:"navigate",value:{name:"project-edit",params:{id:t.project,step:be}}},bubbles:!0,composed:!0}))},getUnits:()=>{const be=M("units");return fetch$1(be.toString(),{method:"GET",headers:{authorization:`Bearer ${t.token}`}}).then(se=>se.json())},fields:be=>{const se=M("fields");return fetch$1(se.toString(),{method:"POST",headers:{authorization:`Bearer ${t.token}`},body:JSON.stringify({type:be.type,units:be.units.map(Se=>Se.id)})}).then(Se=>Se.json())}}}const _sfc_main$i=defineComponent({__name:"Options.ce",props:{item:{type:null}},emits:["refetch"],setup(e,{emit:t}){const M=useCurrentElement(),I=useAPI(M),V=t,N=ref(),j=ref();return(J,U)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(Th),{teleport:!1,closeOnOutsideClick:!0,ref_key:"removedialog",ref:j,class:"remove-dialog"},{trigger:withCtx(({triggerProps:ne})=>[createVNode(unref(Be),mergeProps({style:{display:"none"}},ne),null,16)]),header:withCtx(({titleProps:ne,descriptionProps:ve,closeTriggerProps:be})=>[createVNode(unref(zr),{class:"remove-dialog__header",justify:"center",align:"center",direction:"column",gap:"0.25rem"},{default:withCtx(()=>[createVNode(unref(Ve),{icon:"fa-pro-light:triangle-exclamation",class:"remove-dialog__icon"}),createBaseVNode("div",mergeProps(ve,{class:"remove-dialog__subtitle"})," Du holder på å slette Finn-annonsen: ",16),createBaseVNode("div",mergeProps(ne,{class:"remove-dialog__title"}),toDisplayString(J.item.name),17),createVNode(unref(Be),mergeProps({class:"k-dialog__close-trigger",variant:"tertiary",icon:"fa-pro-light:times",size:"small"},be),null,16)]),_:2},1024)]),actions:withCtx(({close:ne})=>[createVNode(unref(Be),{label:"Avbryt",onClick:ne},null,8,["onClick"]),createVNode(unref(Be),{label:"Bekreft",variant:"primary",promise:N.value,onSuccess:()=>{ne(),V("refetch")},onClick:U[0]||(U[0]=()=>N.value=unref(I).remove(J.item.id))},null,8,["promise","onSuccess"])]),_:1},512),createVNode(unref(sa),{label:"Endre",keepOpen:"",teleport:!1,class:"options"},{default:withCtx(()=>[createVNode(unref(Be),{iconRight:"fa-pro-light:pen",label:"Rediger",onClick:U[1]||(U[1]=()=>unref(I).navigateView("mutate",J.item.id)),variant:"tertiary"}),J.item.publishedAt?(openBlock(),createBlock(unref(Be),{key:0,iconRight:"fa-pro-light:play-pause",label:"Avpubliser",promise:N.value,onSuccess:U[2]||(U[2]=()=>{V("refetch")}),onClick:U[3]||(U[3]=()=>N.value=unref(I).unpublish(J.item.id)),variant:"tertiary"},null,8,["promise"])):createCommentVNode("",!0),createVNode(unref(Be),{"data-type":"delete",class:"options__delete",variant:"danger",label:"Slett",iconRight:"fa-pro-light:trash-xmark",onClick:U[4]||(U[4]=()=>{j.value.open()})})]),_:1})],64))}}),_style_0$d=".k-button.options__delete{color:var(--k-button-danger-background, var(--k-ui-color-danger));background-color:var(--k-button-danger-text, white)}.k-button.options__delete:focus,.k-button.options__delete:active,.k-button.options__delete:hover{color:var(--k-button-danger-text, white)}.remove-dialog{--k-dialog-min-width: 400px}.remove-dialog__title{font-weight:700;font-size:1.25rem}.remove-dialog__icon{font-size:2rem}.remove-dialog .k-dialog__card .k-card__header{color:var(--k-ui-color-danger);background-color:var(--k-ui-color-danger-lightest);--k-button-tertiary-text: var(--k-ui-color-danger-darkest);--k-button-tertiary-background-hover: var(--k-ui-color-danger-lightest);--k-button-tertiary-background-active: var(--k-ui-color-danger-light)}",Options=_export_sfc(_sfc_main$i,[["styles",[_style_0$d]]]),_sfc_main$h=defineComponent({__name:"Dashboard.ce",setup(e){const t=useCurrentElement(),M=useAPI(t),I=ref([]),V=ref(!1),N=computed(()=>[{id:"name",label:"Kampanjenavn"},{id:"status",label:"Status"},{id:"published",label:"Publisert"},{id:"insight",label:""},{id:"url",label:""},{id:"edit",label:""}]),j=ne=>ne.publishedAt?ne.preview?{label:"Forhåndsvisning",variant:"info"}:{label:"Aktiv",variant:"success"}:{label:"Avpublisert",variant:"danger"},J=ne=>{if(!ne.publishedAt||ne.preview)return"-";const ve={year:"numeric",month:"numeric",day:"numeric"};return new Date(ne.publishedAt).toLocaleString("nb-NO",ve)};ref();const U=()=>{V.value=!0,M.getAds().then(ne=>{I.value=ne}).finally(()=>{V.value=!1})};return onMounted(U),(ne,ve)=>(openBlock(),createBlock(unref(tC),{class:"ads",title:"Dine Finn-annonser",subtitle:"Her får du en oversikt over dine Finn-annonser.",variant:"prompt",appearance:"shadow"},{default:withCtx(()=>[I.value.length&&!V.value?(openBlock(),createBlock(unref(cV),{key:0,items:I.value,columns:N.value},{name:withCtx(({item:be})=>[createTextVNode(toDisplayString(be.name),1)]),status:withCtx(({item:be})=>[createVNode(unref(eV),mergeProps(j(be),{appearance:"filled"}),null,16)]),published:withCtx(({item:be})=>[createTextVNode(toDisplayString(J(be)),1)]),url:withCtx(({item:be})=>[be.units.some(se=>se.url)?(openBlock(),createBlock(unref(sa),{key:0,label:"Se annonser"},{default:withCtx(()=>[createVNode(unref(Be),{variant:"tertiary",iconRight:"fa-pro-light:arrow-up-right-from-square",label:"Prosjektannonse",target:"_blank",is:"a",href:be.url},null,8,["href"]),(openBlock(!0),createElementBlock(Fragment,null,renderList(be.units,se=>(openBlock(),createBlock(unref(Be),{variant:"tertiary",label:`${se.name}`,target:"_blank",is:"a",href:se.url,iconRight:"fa-pro-light:arrow-up-right-from-square"},null,8,["label","href"]))),256))]),_:2},1024)):(openBlock(),createBlock(unref(Be),{key:1,iconRight:"fa-pro-light:arrow-up-right-from-square",label:"Se annonse",target:"_blank",is:"a",href:be.url},null,8,["href"]))]),insight:withCtx(({item:be})=>[be.preview?createCommentVNode("",!0):(openBlock(),createBlock(unref(Be),{key:0,iconRight:"fa-pro-light:arrow-up-right-from-square",label:"Se innsikt",target:"_blank",is:"a",href:be.statistics},null,8,["href"]))]),edit:withCtx(({item:be})=>[(openBlock(),createBlock(Options,{item:be,onRefetch:ve[0]||(ve[0]=()=>U()),key:be.id},null,8,["item"]))]),_:1},8,["items","columns"])):createCommentVNode("",!0),V.value?(openBlock(),createBlock(unref(zr),{key:1,direction:"column",align:"center"},{default:withCtx(()=>[createVNode(unref(sh),{size:"large"})]),_:1})):createCommentVNode("",!0),!V.value&&!I.value.length?(openBlock(),createBlock(unref(zr),{key:2,direction:"column",align:"center",class:"ads__empty"},{default:withCtx(()=>[createVNode(unref(Ve),{icon:"fa-pro-thin:face-sleeping"}),ve[1]||(ve[1]=createBaseVNode("div",null,"Fant ingen annonser",-1))]),_:1})):createCommentVNode("",!0)]),_:1}))}}),_style_0$c=".ads__empty{font-size:1rem}.ads__empty svg{padding-block:var(--k-ui-spacing);opacity:var(--k-ui-opacity-faded);font-size:5rem}",Dashboard=_export_sfc(_sfc_main$h,[["styles",[_style_0$c]]]),Categories=[{type:"ESTATE_PLANNED",label:"Nye boliger, kommer for salg"},{type:"ESTATE_PROJECT",label:"Nye boliger til salgs"},{label:"Nye boliger til salgs hytte",type:"ESTATE_PROJECT_LEISURE"},{type:"ESTATE_PROJECT_SINGLE",label:"Nye boliger til salgs enkel enhet"},{type:"ESTATE_BUSINESS_SALE",label:"Næringseiendommer til salgs"},{label:"Næringseiendommer til leie",type:"ESTATE_BUSINESS_RENT"},{label:"Boligtomt/Fritidstomt til salgs",type:"PLOT_SALE"},{label:"Bolig til leie",type:"ESTATE_RENT"}];var nb_NO={accepted:":attribute må være akseptert.",alpha:":attribute feltet kan kun inneholde alfabetiske tegn.",alpha_dash:":attribute feltet kan kun inneholde alfanumeriske tegn, i tillegg til bindestreker og understreker.",alpha_num:":attribute feltet må være alfanumerisk.",between:":attribute feltet må være mellom :min og :max.",confirmed:":attribute feltet stemmer ikke overens med bekreftelsen.",email:":attribute formatet er ugyldig.",date:":attribute er et ugyldig datoformat.",def:":attribute attributtet har feil.",digits:":attribute må være på :digits siffer.",digits_between:":attribute må være mellom :min og :max siffer.",different:":attribute og :different må være forskjellige.",in:"Den oppgitte verdien for :attribute er ugyldig.",integer:":attribute må være et heltall.",hex:"The :attribute should have hexadecimal format",min:{numeric:":attribute må minst være :min.",string:":attribute må være på minst :min tegn."},max:{numeric:":attribute kan ikke være større enn :max.",string:":attribute kan maks ha :max tegn."},not_in:"Den oppgitte verdien for :attribute er ugyldig.",numeric:":attribute må være et tall.",present:"The :attribute field must be present (but can be empty).",required:":attribute feltet er påkrevd.",required_if:":attribute er påkrevd når :other er :value.",same:":attribute og :same må være like.",size:{numeric:":attribute må ha størrelsen :size.",string:":attribute må ha :size tegn."},string:":attribute må være tekst.",url:":attribute formatet er ugyldig.",regex:":attribute formatet er ugyldig.",attributes:{}};const nb=getDefaultExportFromCjs$1(nb_NO);CV.setLabels(nb);const _sfc_main$g=defineComponent({__name:"Type.ce",props:mergeModels({onNext:{type:null},onPrev:{type:null},units:{type:Array}},{modelValue:{default:{}},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=useCurrentElement(),M=useAPI(t),I=inject(PropsInjectionKey),V=e,N=useModel(e,"modelValue"),j=computed(()=>Categories.find(Me=>Me.type===N.value.type)),J=computed(()=>[{id:"name",label:"Navn"},{id:"type",label:"Enhetstype"},{id:"status",label:"Status"},{id:"price",label:"Pris"}]),U=Me=>{switch(Me){case"upcoming":return"info";case"sale":return"success";case"reserved":return"warning";case"sold":return"danger";default:return"neutral"}},ne=Me=>Me.disabled,ve=()=>{V.onNext()},be=computed({get(){return V.units.filter(Me=>N.value.units.some(ge=>ge.id===Me.id))},set(Me){N.value.units=Me.map(ge=>{const{price:ie,propertyType:ke,status:Ee,disabled:Ce,...Le}=ge;return{fields:{},...Le}})}}),se=computed(()=>({name:"required",type:"required"})),Se=computed(()=>({name:"Navn"})),xe=JB({rules:se,labels:Se,data:N}),{bind:ye}=xe;return(Me,ge)=>(openBlock(),createBlock(unref(tC),{class:"type",title:"Grunnlag for Finn-annonsen",variant:"prompt",appearance:"shadow",subtitle:"Definer annonsen sitt interne navn, boligtypen annonsen skal ligge under på Finn og hvilke enheter du skal ha på din annonse."},{default:withCtx(()=>[createVNode(unref(hV),{columns:"2",gap:"4rem 2rem"},{default:withCtx(()=>[createVNode(unref(GS),mergeProps({label:"Internt navn på Finn annonse"},unref(ye)("name")),{default:withCtx(()=>[createVNode(unref(By),{modelValue:N.value.name,"onUpdate:modelValue":ge[0]||(ge[0]=ie=>N.value.name=ie)},null,8,["modelValue"])]),_:1},16),createVNode(unref(GS),mergeProps(unref(ye)("type"),{label:"Velg annonse-kategori",help:"Dette legger annonsen på riktig boligtype på Finn"}),{default:withCtx(()=>[createVNode(unref(sa),{disabled:!!unref(I).id,items:unref(Categories).map(ie=>({...ie,action:()=>N.value.type=ie.type})),label:j.value?.label||"Velg..."},null,8,["disabled","items","label"])]),_:1},16),createVNode(unref(GS),{label:"Velg enheter som skal være på Finn-annonsen",class:"k-grid-span-full"},{default:withCtx(()=>[createVNode(unref(cV),{columns:J.value,items:Me.units,selected:be.value,"onUpdate:selected":ge[1]||(ge[1]=ie=>be.value=ie),isDisabled:ne},{name:withCtx(({item:ie})=>[createTextVNode(toDisplayString(ie.name),1)]),type:withCtx(({item:ie})=>[createTextVNode(toDisplayString(ie.propertyType.label),1)]),status:withCtx(({item:ie})=>[createVNode(unref(eV),{appearance:"filled",variant:U(ie.status.value),rounded:!0},{default:withCtx(()=>[createTextVNode(toDisplayString(ie.status.label),1)]),_:2},1032,["variant"])]),price:withCtx(({item:ie})=>[createTextVNode(toDisplayString(unref(toCurrency)(ie.price)),1)]),_:1},8,["columns","items","selected"])]),_:1})]),_:1})]),actions:withCtx(()=>[createVNode(unref(Be),{label:"Avbryt",variant:"secondary",onClick:ge[2]||(ge[2]=()=>unref(M).navigateView("dashboard"))}),createVNode(unref(Be),{label:"Neste",variant:"primary","icon-right":"fa-pro-solid:arrow-right",disabled:!unref(xe).passes.value,onClick:ge[3]||(ge[3]=()=>ve())},null,8,["disabled"])]),_:1}))}}),_style_0$b="",StepType=_export_sfc(_sfc_main$g,[["styles",[_style_0$b]]]),sides=["top","right","bottom","left"],alignments=["start","end"],placements=sides.reduce((e,t)=>e.concat(t,t+"-"+alignments[0],t+"-"+alignments[1]),[]),min=Math.min,max=Math.max,oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp(e,t,M){return max(e,min(t,M))}function evaluate(e,t){return typeof e=="function"?e(t):e}function getSide(e){return e.split("-")[0]}function getAlignment(e){return e.split("-")[1]}function getOppositeAxis(e){return e==="x"?"y":"x"}function getAxisLength(e){return e==="y"?"height":"width"}function getSideAxis(e){return["top","bottom"].includes(getSide(e))?"y":"x"}function getAlignmentAxis(e){return getOppositeAxis(getSideAxis(e))}function getAlignmentSides(e,t,M){M===void 0&&(M=!1);const I=getAlignment(e),V=getAlignmentAxis(e),N=getAxisLength(V);let j=V==="x"?I===(M?"end":"start")?"right":"left":I==="start"?"bottom":"top";return t.reference[N]>t.floating[N]&&(j=getOppositePlacement(j)),[j,getOppositePlacement(j)]}function getExpandedPlacements(e){const t=getOppositePlacement(e);return[getOppositeAlignmentPlacement(e),t,getOppositeAlignmentPlacement(t)]}function getOppositeAlignmentPlacement(e){return e.replace(/start|end/g,t=>oppositeAlignmentMap[t])}function getSideList(e,t,M){const I=["left","right"],V=["right","left"],N=["top","bottom"],j=["bottom","top"];switch(e){case"top":case"bottom":return M?t?V:I:t?I:V;case"left":case"right":return t?N:j;default:return[]}}function getOppositeAxisPlacements(e,t,M,I){const V=getAlignment(e);let N=getSideList(getSide(e),M==="start",I);return V&&(N=N.map(j=>j+"-"+V),t&&(N=N.concat(N.map(getOppositeAlignmentPlacement)))),N}function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,t=>oppositeSideMap[t])}function expandPaddingObject(e){return{top:0,right:0,bottom:0,left:0,...e}}function getPaddingObject(e){return typeof e!="number"?expandPaddingObject(e):{top:e,right:e,bottom:e,left:e}}function rectToClientRect(e){const{x:t,y:M,width:I,height:V}=e;return{width:I,height:V,top:M,left:t,right:t+I,bottom:M+V,x:t,y:M}}function computeCoordsFromPlacement(e,t,M){let{reference:I,floating:V}=e;const N=getSideAxis(t),j=getAlignmentAxis(t),J=getAxisLength(j),U=getSide(t),ne=N==="y",ve=I.x+I.width/2-V.width/2,be=I.y+I.height/2-V.height/2,se=I[J]/2-V[J]/2;let Se;switch(U){case"top":Se={x:ve,y:I.y-V.height};break;case"bottom":Se={x:ve,y:I.y+I.height};break;case"right":Se={x:I.x+I.width,y:be};break;case"left":Se={x:I.x-V.width,y:be};break;default:Se={x:I.x,y:I.y}}switch(getAlignment(t)){case"start":Se[j]-=se*(M&&ne?-1:1);break;case"end":Se[j]+=se*(M&&ne?-1:1);break}return Se}const computePosition=async(e,t,M)=>{const{placement:I="bottom",strategy:V="absolute",middleware:N=[],platform:j}=M,J=N.filter(Boolean),U=await(j.isRTL==null?void 0:j.isRTL(t));let ne=await j.getElementRects({reference:e,floating:t,strategy:V}),{x:ve,y:be}=computeCoordsFromPlacement(ne,I,U),se=I,Se={},xe=0;for(let ye=0;ye<J.length;ye++){const{name:Me,fn:ge}=J[ye],{x:ie,y:ke,data:Ee,reset:Ce}=await ge({x:ve,y:be,initialPlacement:I,placement:se,strategy:V,middlewareData:Se,rects:ne,platform:j,elements:{reference:e,floating:t}});ve=ie??ve,be=ke??be,Se={...Se,[Me]:{...Se[Me],...Ee}},Ce&&xe<=50&&(xe++,typeof Ce=="object"&&(Ce.placement&&(se=Ce.placement),Ce.rects&&(ne=Ce.rects===!0?await j.getElementRects({reference:e,floating:t,strategy:V}):Ce.rects),{x:ve,y:be}=computeCoordsFromPlacement(ne,se,U)),ye=-1)}return{x:ve,y:be,placement:se,strategy:V,middlewareData:Se}};async function detectOverflow(e,t){var M;t===void 0&&(t={});const{x:I,y:V,platform:N,rects:j,elements:J,strategy:U}=e,{boundary:ne="clippingAncestors",rootBoundary:ve="viewport",elementContext:be="floating",altBoundary:se=!1,padding:Se=0}=evaluate(t,e),xe=getPaddingObject(Se),Me=J[se?be==="floating"?"reference":"floating":be],ge=rectToClientRect(await N.getClippingRect({element:(M=await(N.isElement==null?void 0:N.isElement(Me)))==null||M?Me:Me.contextElement||await(N.getDocumentElement==null?void 0:N.getDocumentElement(J.floating)),boundary:ne,rootBoundary:ve,strategy:U})),ie=be==="floating"?{x:I,y:V,width:j.floating.width,height:j.floating.height}:j.reference,ke=await(N.getOffsetParent==null?void 0:N.getOffsetParent(J.floating)),Ee=await(N.isElement==null?void 0:N.isElement(ke))?await(N.getScale==null?void 0:N.getScale(ke))||{x:1,y:1}:{x:1,y:1},Ce=rectToClientRect(N.convertOffsetParentRelativeRectToViewportRelativeRect?await N.convertOffsetParentRelativeRectToViewportRelativeRect({elements:J,rect:ie,offsetParent:ke,strategy:U}):ie);return{top:(ge.top-Ce.top+xe.top)/Ee.y,bottom:(Ce.bottom-ge.bottom+xe.bottom)/Ee.y,left:(ge.left-Ce.left+xe.left)/Ee.x,right:(Ce.right-ge.right+xe.right)/Ee.x}}const arrow=e=>({name:"arrow",options:e,async fn(t){const{x:M,y:I,placement:V,rects:N,platform:j,elements:J,middlewareData:U}=t,{element:ne,padding:ve=0}=evaluate(e,t)||{};if(ne==null)return{};const be=getPaddingObject(ve),se={x:M,y:I},Se=getAlignmentAxis(V),xe=getAxisLength(Se),ye=await j.getDimensions(ne),Me=Se==="y",ge=Me?"top":"left",ie=Me?"bottom":"right",ke=Me?"clientHeight":"clientWidth",Ee=N.reference[xe]+N.reference[Se]-se[Se]-N.floating[xe],Ce=se[Se]-N.reference[Se],Le=await(j.getOffsetParent==null?void 0:j.getOffsetParent(ne));let Oe=Le?Le[ke]:0;(!Oe||!await(j.isElement==null?void 0:j.isElement(Le)))&&(Oe=J.floating[ke]||N.floating[xe]);const Re=Ee/2-Ce/2,Ge=Oe/2-ye[xe]/2-1,qe=min(be[ge],Ge),Je=min(be[ie],Ge),We=qe,Ke=Oe-ye[xe]-Je,Ue=Oe/2-ye[xe]/2+Re,Ye=clamp(We,Ue,Ke),De=!U.arrow&&getAlignment(V)!=null&&Ue!==Ye&&N.reference[xe]/2-(Ue<We?qe:Je)-ye[xe]/2<0,Ie=De?Ue<We?Ue-We:Ue-Ke:0;return{[Se]:se[Se]+Ie,data:{[Se]:Ye,centerOffset:Ue-Ye-Ie,...De&&{alignmentOffset:Ie}},reset:De}}});function getPlacementList(e,t,M){return(e?[...M.filter(V=>getAlignment(V)===e),...M.filter(V=>getAlignment(V)!==e)]:M.filter(V=>getSide(V)===V)).filter(V=>e?getAlignment(V)===e||(t?getOppositeAlignmentPlacement(V)!==V:!1):!0)}const autoPlacement=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var M,I,V;const{rects:N,middlewareData:j,placement:J,platform:U,elements:ne}=t,{crossAxis:ve=!1,alignment:be,allowedPlacements:se=placements,autoAlignment:Se=!0,...xe}=evaluate(e,t),ye=be!==void 0||se===placements?getPlacementList(be||null,Se,se):se,Me=await detectOverflow(t,xe),ge=((M=j.autoPlacement)==null?void 0:M.index)||0,ie=ye[ge];if(ie==null)return{};const ke=getAlignmentSides(ie,N,await(U.isRTL==null?void 0:U.isRTL(ne.floating)));if(J!==ie)return{reset:{placement:ye[0]}};const Ee=[Me[getSide(ie)],Me[ke[0]],Me[ke[1]]],Ce=[...((I=j.autoPlacement)==null?void 0:I.overflows)||[],{placement:ie,overflows:Ee}],Le=ye[ge+1];if(Le)return{data:{index:ge+1,overflows:Ce},reset:{placement:Le}};const Oe=Ce.map(qe=>{const Je=getAlignment(qe.placement);return[qe.placement,Je&&ve?qe.overflows.slice(0,2).reduce((We,Ke)=>We+Ke,0):qe.overflows[0],qe.overflows]}).sort((qe,Je)=>qe[1]-Je[1]),Ge=((V=Oe.filter(qe=>qe[2].slice(0,getAlignment(qe[0])?2:3).every(Je=>Je<=0))[0])==null?void 0:V[0])||Oe[0][0];return Ge!==J?{data:{index:ge+1,overflows:Ce},reset:{placement:Ge}}:{}}}},flip=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var M,I;const{placement:V,middlewareData:N,rects:j,initialPlacement:J,platform:U,elements:ne}=t,{mainAxis:ve=!0,crossAxis:be=!0,fallbackPlacements:se,fallbackStrategy:Se="bestFit",fallbackAxisSideDirection:xe="none",flipAlignment:ye=!0,...Me}=evaluate(e,t);if((M=N.arrow)!=null&&M.alignmentOffset)return{};const ge=getSide(V),ie=getSideAxis(J),ke=getSide(J)===J,Ee=await(U.isRTL==null?void 0:U.isRTL(ne.floating)),Ce=se||(ke||!ye?[getOppositePlacement(J)]:getExpandedPlacements(J)),Le=xe!=="none";!se&&Le&&Ce.push(...getOppositeAxisPlacements(J,ye,xe,Ee));const Oe=[J,...Ce],Re=await detectOverflow(t,Me),Ge=[];let qe=((I=N.flip)==null?void 0:I.overflows)||[];if(ve&&Ge.push(Re[ge]),be){const Ue=getAlignmentSides(V,j,Ee);Ge.push(Re[Ue[0]],Re[Ue[1]])}if(qe=[...qe,{placement:V,overflows:Ge}],!Ge.every(Ue=>Ue<=0)){var Je,We;const Ue=(((Je=N.flip)==null?void 0:Je.index)||0)+1,Ye=Oe[Ue];if(Ye)return{data:{index:Ue,overflows:qe},reset:{placement:Ye}};let De=(We=qe.filter(Ie=>Ie.overflows[0]<=0).sort((Ie,we)=>Ie.overflows[1]-we.overflows[1])[0])==null?void 0:We.placement;if(!De)switch(Se){case"bestFit":{var Ke;const Ie=(Ke=qe.filter(we=>{if(Le){const Fe=getSideAxis(we.placement);return Fe===ie||Fe==="y"}return!0}).map(we=>[we.placement,we.overflows.filter(Fe=>Fe>0).reduce((Fe,je)=>Fe+je,0)]).sort((we,Fe)=>we[1]-Fe[1])[0])==null?void 0:Ke[0];Ie&&(De=Ie);break}case"initialPlacement":De=J;break}if(V!==De)return{reset:{placement:De}}}return{}}}};async function convertValueToCoords(e,t){const{placement:M,platform:I,elements:V}=e,N=await(I.isRTL==null?void 0:I.isRTL(V.floating)),j=getSide(M),J=getAlignment(M),U=getSideAxis(M)==="y",ne=["left","top"].includes(j)?-1:1,ve=N&&U?-1:1,be=evaluate(t,e);let{mainAxis:se,crossAxis:Se,alignmentAxis:xe}=typeof be=="number"?{mainAxis:be,crossAxis:0,alignmentAxis:null}:{mainAxis:be.mainAxis||0,crossAxis:be.crossAxis||0,alignmentAxis:be.alignmentAxis};return J&&typeof xe=="number"&&(Se=J==="end"?xe*-1:xe),U?{x:Se*ve,y:se*ne}:{x:se*ne,y:Se*ve}}const offset=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var M,I;const{x:V,y:N,placement:j,middlewareData:J}=t,U=await convertValueToCoords(t,e);return j===((M=J.offset)==null?void 0:M.placement)&&(I=J.arrow)!=null&&I.alignmentOffset?{}:{x:V+U.x,y:N+U.y,data:{...U,placement:j}}}}},shift=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:M,y:I,placement:V}=t,{mainAxis:N=!0,crossAxis:j=!1,limiter:J={fn:Me=>{let{x:ge,y:ie}=Me;return{x:ge,y:ie}}},...U}=evaluate(e,t),ne={x:M,y:I},ve=await detectOverflow(t,U),be=getSideAxis(getSide(V)),se=getOppositeAxis(be);let Se=ne[se],xe=ne[be];if(N){const Me=se==="y"?"top":"left",ge=se==="y"?"bottom":"right",ie=Se+ve[Me],ke=Se-ve[ge];Se=clamp(ie,Se,ke)}if(j){const Me=be==="y"?"top":"left",ge=be==="y"?"bottom":"right",ie=xe+ve[Me],ke=xe-ve[ge];xe=clamp(ie,xe,ke)}const ye=J.fn({...t,[se]:Se,[be]:xe});return{...ye,data:{x:ye.x-M,y:ye.y-I,enabled:{[se]:N,[be]:j}}}}}},size=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var M,I;const{placement:V,rects:N,platform:j,elements:J}=t,{apply:U=()=>{},...ne}=evaluate(e,t),ve=await detectOverflow(t,ne),be=getSide(V),se=getAlignment(V),Se=getSideAxis(V)==="y",{width:xe,height:ye}=N.floating;let Me,ge;be==="top"||be==="bottom"?(Me=be,ge=se===(await(j.isRTL==null?void 0:j.isRTL(J.floating))?"start":"end")?"left":"right"):(ge=be,Me=se==="end"?"top":"bottom");const ie=ye-ve.top-ve.bottom,ke=xe-ve.left-ve.right,Ee=min(ye-ve[Me],ie),Ce=min(xe-ve[ge],ke),Le=!t.middlewareData.shift;let Oe=Ee,Re=Ce;if((M=t.middlewareData.shift)!=null&&M.enabled.x&&(Re=ke),(I=t.middlewareData.shift)!=null&&I.enabled.y&&(Oe=ie),Le&&!se){const qe=max(ve.left,0),Je=max(ve.right,0),We=max(ve.top,0),Ke=max(ve.bottom,0);Se?Re=xe-2*(qe!==0||Je!==0?qe+Je:max(ve.left,ve.right)):Oe=ye-2*(We!==0||Ke!==0?We+Ke:max(ve.top,ve.bottom))}await U({...t,availableWidth:Re,availableHeight:Oe});const Ge=await j.getDimensions(J.floating);return xe!==Ge.width||ye!==Ge.height?{reset:{rects:!0}}:{}}}};function n$1(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function o(e){return n$1(e).getComputedStyle(e)}const i=Math.min,r=Math.max,l=Math.round;function c$1(e){const t=o(e);let M=parseFloat(t.width),I=parseFloat(t.height);const V=e.offsetWidth,N=e.offsetHeight,j=l(M)!==V||l(I)!==N;return j&&(M=V,I=N),{width:M,height:I,fallback:j}}function s(e){return h$2(e)?(e.nodeName||"").toLowerCase():""}let f;function u(){if(f)return f;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(f=e.brands.map(t=>t.brand+"/"+t.version).join(" "),f):navigator.userAgent}function a(e){return e instanceof n$1(e).HTMLElement}function d$1(e){return e instanceof n$1(e).Element}function h$2(e){return e instanceof n$1(e).Node}function p(e){return typeof ShadowRoot>"u"?!1:e instanceof n$1(e).ShadowRoot||e instanceof ShadowRoot}function g$1(e){const{overflow:t,overflowX:M,overflowY:I,display:V}=o(e);return/auto|scroll|overlay|hidden|clip/.test(t+I+M)&&!["inline","contents"].includes(V)}function m$1(e){return["table","td","th"].includes(s(e))}function y$1(e){const t=/firefox/i.test(u()),M=o(e),I=M.backdropFilter||M.WebkitBackdropFilter;return M.transform!=="none"||M.perspective!=="none"||!!I&&I!=="none"||t&&M.willChange==="filter"||t&&!!M.filter&&M.filter!=="none"||["transform","perspective"].some(V=>M.willChange.includes(V))||["paint","layout","strict","content"].some(V=>{const N=M.contain;return N!=null&&N.includes(V)})}function x$1(){return!/^((?!chrome|android).)*safari/i.test(u())}function w$1(e){return["html","body","#document"].includes(s(e))}function v$1(e){return d$1(e)?e:e.contextElement}const b$1={x:1,y:1};function L(e){const t=v$1(e);if(!a(t))return b$1;const M=t.getBoundingClientRect(),{width:I,height:V,fallback:N}=c$1(t);let j=(N?l(M.width):M.width)/I,J=(N?l(M.height):M.height)/V;return j&&Number.isFinite(j)||(j=1),J&&Number.isFinite(J)||(J=1),{x:j,y:J}}function E$1(e,t,M,I){var V,N;t===void 0&&(t=!1),M===void 0&&(M=!1);const j=e.getBoundingClientRect(),J=v$1(e);let U=b$1;t&&(I?d$1(I)&&(U=L(I)):U=L(e));const ne=J?n$1(J):window,ve=!x$1()&&M;let be=(j.left+(ve&&((V=ne.visualViewport)==null?void 0:V.offsetLeft)||0))/U.x,se=(j.top+(ve&&((N=ne.visualViewport)==null?void 0:N.offsetTop)||0))/U.y,Se=j.width/U.x,xe=j.height/U.y;if(J){const ye=n$1(J),Me=I&&d$1(I)?n$1(I):I;let ge=ye.frameElement;for(;ge&&I&&Me!==ye;){const ie=L(ge),ke=ge.getBoundingClientRect(),Ee=getComputedStyle(ge);ke.x+=(ge.clientLeft+parseFloat(Ee.paddingLeft))*ie.x,ke.y+=(ge.clientTop+parseFloat(Ee.paddingTop))*ie.y,be*=ie.x,se*=ie.y,Se*=ie.x,xe*=ie.y,be+=ke.x,se+=ke.y,ge=n$1(ge).frameElement}}return{width:Se,height:xe,top:se,right:be+Se,bottom:se+xe,left:be,x:be,y:se}}function R(e){return((h$2(e)?e.ownerDocument:e.document)||window.document).documentElement}function T(e){return d$1(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function C$1(e){return E$1(R(e)).left+T(e).scrollLeft}function F(e){if(s(e)==="html")return e;const t=e.assignedSlot||e.parentNode||p(e)&&e.host||R(e);return p(t)?t.host:t}function W(e){const t=F(e);return w$1(t)?t.ownerDocument.body:a(t)&&g$1(t)?t:W(t)}function D(e,t){var M;t===void 0&&(t=[]);const I=W(e),V=I===((M=e.ownerDocument)==null?void 0:M.body),N=n$1(I);return V?t.concat(N,N.visualViewport||[],g$1(I)?I:[]):t.concat(I,D(I))}function S$1(e,t,M){return t==="viewport"?rectToClientRect(function(I,V){const N=n$1(I),j=R(I),J=N.visualViewport;let U=j.clientWidth,ne=j.clientHeight,ve=0,be=0;if(J){U=J.width,ne=J.height;const se=x$1();(se||!se&&V==="fixed")&&(ve=J.offsetLeft,be=J.offsetTop)}return{width:U,height:ne,x:ve,y:be}}(e,M)):d$1(t)?rectToClientRect(function(I,V){const N=E$1(I,!0,V==="fixed"),j=N.top+I.clientTop,J=N.left+I.clientLeft,U=a(I)?L(I):{x:1,y:1};return{width:I.clientWidth*U.x,height:I.clientHeight*U.y,x:J*U.x,y:j*U.y}}(t,M)):rectToClientRect(function(I){const V=R(I),N=T(I),j=I.ownerDocument.body,J=r(V.scrollWidth,V.clientWidth,j.scrollWidth,j.clientWidth),U=r(V.scrollHeight,V.clientHeight,j.scrollHeight,j.clientHeight);let ne=-N.scrollLeft+C$1(I);const ve=-N.scrollTop;return o(j).direction==="rtl"&&(ne+=r(V.clientWidth,j.clientWidth)-J),{width:J,height:U,x:ne,y:ve}}(R(e)))}function A(e){return a(e)&&o(e).position!=="fixed"?e.offsetParent:null}function H(e){const t=n$1(e);let M=A(e);for(;M&&m$1(M)&&o(M).position==="static";)M=A(M);return M&&(s(M)==="html"||s(M)==="body"&&o(M).position==="static"&&!y$1(M))?t:M||function(I){let V=F(I);for(;a(V)&&!w$1(V);){if(y$1(V))return V;V=F(V)}return null}(e)||t}function O(e,t,M){const I=a(t),V=R(t),N=E$1(e,!0,M==="fixed",t);let j={scrollLeft:0,scrollTop:0};const J={x:0,y:0};if(I||!I&&M!=="fixed")if((s(t)!=="body"||g$1(V))&&(j=T(t)),a(t)){const U=E$1(t,!0);J.x=U.x+t.clientLeft,J.y=U.y+t.clientTop}else V&&(J.x=C$1(V));return{x:N.left+j.scrollLeft-J.x,y:N.top+j.scrollTop-J.y,width:N.width,height:N.height}}const P={getClippingRect:function(e){let{element:t,boundary:M,rootBoundary:I,strategy:V}=e;const N=M==="clippingAncestors"?function(ne,ve){const be=ve.get(ne);if(be)return be;let se=D(ne).filter(Me=>d$1(Me)&&s(Me)!=="body"),Se=null;const xe=o(ne).position==="fixed";let ye=xe?F(ne):ne;for(;d$1(ye)&&!w$1(ye);){const Me=o(ye),ge=y$1(ye);(xe?ge||Se:ge||Me.position!=="static"||!Se||!["absolute","fixed"].includes(Se.position))?Se=Me:se=se.filter(ie=>ie!==ye),ye=F(ye)}return ve.set(ne,se),se}(t,this._c):[].concat(M),j=[...N,I],J=j[0],U=j.reduce((ne,ve)=>{const be=S$1(t,ve,V);return ne.top=r(be.top,ne.top),ne.right=i(be.right,ne.right),ne.bottom=i(be.bottom,ne.bottom),ne.left=r(be.left,ne.left),ne},S$1(t,J,V));return{width:U.right-U.left,height:U.bottom-U.top,x:U.left,y:U.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:M,strategy:I}=e;const V=a(M),N=R(M);if(M===N)return t;let j={scrollLeft:0,scrollTop:0},J={x:1,y:1};const U={x:0,y:0};if((V||!V&&I!=="fixed")&&((s(M)!=="body"||g$1(N))&&(j=T(M)),a(M))){const ne=E$1(M);J=L(M),U.x=ne.x+M.clientLeft,U.y=ne.y+M.clientTop}return{width:t.width*J.x,height:t.height*J.y,x:t.x*J.x-j.scrollLeft*J.x+U.x,y:t.y*J.y-j.scrollTop*J.y+U.y}},isElement:d$1,getDimensions:function(e){return a(e)?c$1(e):e.getBoundingClientRect()},getOffsetParent:H,getDocumentElement:R,getScale:L,async getElementRects(e){let{reference:t,floating:M,strategy:I}=e;const V=this.getOffsetParent||H,N=this.getDimensions;return{reference:O(t,await V(M),I),floating:{x:0,y:0,...await N(M)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>o(e).direction==="rtl"},B$1=(e,t,M)=>{const I=new Map,V={platform:P,...M},N={...V.platform,_c:I};return computePosition(e,t,{...V,platform:N})},h$1={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:e=>[...e,"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 S(e,t){let M=h$1.themes[e]||{},I;do I=M[t],typeof I>"u"?M.$extend?M=h$1.themes[M.$extend]||{}:(M=null,I=h$1[t]):M=null;while(M);return I}function Ze(e){const t=[e];let M=h$1.themes[e]||{};do M.$extend&&!M.$resetCss?(t.push(M.$extend),M=h$1.themes[M.$extend]||{}):M=null;while(M);return t.map(I=>`v-popper--theme-${I}`)}function re(e){const t=[e];let M=h$1.themes[e]||{};do M.$extend?(t.push(M.$extend),M=h$1.themes[M.$extend]||{}):M=null;while(M);return t}let $=!1;if(typeof window<"u"){$=!1;try{const e=Object.defineProperty({},"passive",{get(){$=!0}});window.addEventListener("test",null,e)}catch{}}let _e=!1;typeof window<"u"&&typeof navigator<"u"&&(_e=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const Te=["auto","top","bottom","left","right"].reduce((e,t)=>e.concat([t,`${t}-start`,`${t}-end`]),[]),pe={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},ae={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function de(e,t){const M=e.indexOf(t);M!==-1&&e.splice(M,1)}function G(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}const d=[];let g=null;const le={};function he(e){let t=le[e];return t||(t=le[e]=[]),t}let Y=function(){};typeof window<"u"&&(Y=window.Element);function n(e){return function(t){return S(t.theme,e)}}const q="__floating-vue__popper",Q=()=>defineComponent({name:"VPopper",provide(){return{[q]:{parentPopper:this}}},inject:{[q]:{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:n("disabled")},positioningDisabled:{type:Boolean,default:n("positioningDisabled")},placement:{type:String,default:n("placement"),validator:e=>Te.includes(e)},delay:{type:[String,Number,Object],default:n("delay")},distance:{type:[Number,String],default:n("distance")},skidding:{type:[Number,String],default:n("skidding")},triggers:{type:Array,default:n("triggers")},showTriggers:{type:[Array,Function],default:n("showTriggers")},hideTriggers:{type:[Array,Function],default:n("hideTriggers")},popperTriggers:{type:Array,default:n("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:n("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:n("popperHideTriggers")},container:{type:[String,Object,Y,Boolean],default:n("container")},boundary:{type:[String,Y],default:n("boundary")},strategy:{type:String,validator:e=>["absolute","fixed"].includes(e),default:n("strategy")},autoHide:{type:[Boolean,Function],default:n("autoHide")},handleResize:{type:Boolean,default:n("handleResize")},instantMove:{type:Boolean,default:n("instantMove")},eagerMount:{type:Boolean,default:n("eagerMount")},popperClass:{type:[String,Array,Object],default:n("popperClass")},computeTransformOrigin:{type:Boolean,default:n("computeTransformOrigin")},autoMinSize:{type:Boolean,default:n("autoMinSize")},autoSize:{type:[Boolean,String],default:n("autoSize")},autoMaxSize:{type:Boolean,default:n("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:n("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:n("preventOverflow")},overflowPadding:{type:[Number,String],default:n("overflowPadding")},arrowPadding:{type:[Number,String],default:n("arrowPadding")},arrowOverflow:{type:Boolean,default:n("arrowOverflow")},flip:{type:Boolean,default:n("flip")},shift:{type:Boolean,default:n("shift")},shiftCrossAxis:{type:Boolean,default:n("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:n("noAutoFocus")},disposeTimeout:{type:Number,default:n("disposeTimeout")}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!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(e=>e.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 e;return(e=this[q])==null?void 0:e.parentPopper},hasPopperShowTriggerHover(){var e,t;return((e=this.popperTriggers)==null?void 0:e.includes("hover"))||((t=this.popperShowTriggers)==null?void 0:t.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(e){e?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((e,t)=>(e[t]="$_computePosition",e),{})},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:e=null,skipDelay:t=!1,force:M=!1}={}){var I,V;(I=this.parentPopper)!=null&&I.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(M||!this.disabled)&&(((V=this.parentPopper)==null?void 0:V.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,t),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:e=null,skipDelay:t=!1}={}){var M;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:t}),this.parentPopper.lockedChild=null)},1e3));return}((M=this.parentPopper)==null?void 0:M.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(e,t),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var e;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=((e=this.referenceNode)==null?void 0:e.call(this))??this.$el,this.$_targetNodes=this.targetNodes().filter(t=>t.nodeType===t.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 e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(offset({mainAxis:this.distance,crossAxis:this.skidding}));const t=this.placement.startsWith("auto");if(t?e.middleware.push(autoPlacement({alignment:this.placement.split("-")[1]??""})):e.placement=this.placement,this.preventOverflow&&(this.shift&&e.middleware.push(shift({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!t&&this.flip&&e.middleware.push(flip({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push(arrow({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:"arrowOverflow",fn:({placement:I,rects:V,middlewareData:N})=>{let j;const{centerOffset:J}=N.arrow;return I.startsWith("top")||I.startsWith("bottom")?j=Math.abs(J)>V.reference.width/2:j=Math.abs(J)>V.reference.height/2,{data:{overflow:j}}}}),this.autoMinSize||this.autoSize){const I=this.autoSize?this.autoSize:this.autoMinSize?"min":null;e.middleware.push({name:"autoSize",fn:({rects:V,placement:N,middlewareData:j})=>{var J;if((J=j.autoSize)!=null&&J.skip)return{};let U,ne;return N.startsWith("top")||N.startsWith("bottom")?U=V.reference.width:ne=V.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"]=ne!=null?`${ne}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push(size({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:I,availableHeight:V})=>{this.$_innerNode.style.maxWidth=I!=null?`${I}px`:null,this.$_innerNode.style.maxHeight=V!=null?`${V}px`:null}})));const M=await B$1(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:M.x,y:M.y,placement:M.placement,strategy:M.strategy,arrow:{...M.middlewareData.arrow,...M.middlewareData.arrowOverflow}})},$_scheduleShow(e,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),g&&this.instantMove&&g.instantMove&&g!==this.parentPopper){g.$_applyHide(!0),this.$_applyShow(!0);return}t?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(e,t=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(g=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(e){const t=this.delay;return parseInt(t&&t[e]||t||0)},async $_applyShow(e=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await G(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...D(this.$_referenceNode),...D(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const t=this.$_referenceNode.getBoundingClientRect(),M=this.$_popperNode.querySelector(".v-popper__wrapper"),I=M.parentNode.getBoundingClientRect(),V=t.x+t.width/2-(I.left+M.offsetLeft),N=t.y+t.height/2-(I.top+M.offsetTop);this.result.transformOrigin=`${V}px ${N}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const e=this.showGroup;if(e){let t;for(let M=0;M<d.length;M++)t=d[M],t.showGroup!==e&&(t.hide(),t.$emit("close-group"))}d.push(this),document.body.classList.add("v-popper--some-open");for(const t of re(this.theme))he(t).push(this),document.body.classList.add(`v-popper--some-open--${t}`);this.$emit("apply-show"),this.classes.showFrom=!0,this.classes.showTo=!1,this.classes.hideFrom=!1,this.classes.hideTo=!1,await G(),this.classes.showFrom=!1,this.classes.showTo=!0,this.noAutoFocus||this.$_popperNode.focus()},async $_applyHide(e=!1){if(this.shownChildren.size>0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,de(d,this),d.length===0&&document.body.classList.remove("v-popper--some-open");for(const M of re(this.theme)){const I=he(M);de(I,this),I.length===0&&document.body.classList.remove(`v-popper--some-open--${M}`)}g===this&&(g=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const t=this.disposeTimeout;t!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},t)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await G(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let e=this.container;if(typeof e=="string"?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw new Error("No container for popover: "+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const e=M=>{this.isShown&&!this.$_hideInProgress||(M.usedByTooltip=!0,!this.$_preventShow&&this.show({event:M}))};this.$_registerTriggerListeners(this.$_targetNodes,pe,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],pe,this.popperTriggers,this.popperShowTriggers,e);const t=M=>{M.usedByTooltip||this.hide({event:M})};this.$_registerTriggerListeners(this.$_targetNodes,ae,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],ae,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e,t,M){this.$_events.push({targetNodes:e,eventType:t,handler:M}),e.forEach(I=>I.addEventListener(t,M,$?{passive:!0}:void 0))},$_registerTriggerListeners(e,t,M,I,V){let N=M;I!=null&&(N=typeof I=="function"?I(N):I),N.forEach(j=>{const J=t[j];J&&this.$_registerEventListeners(e,J,V)})},$_removeEventListeners(e){const t=[];this.$_events.forEach(M=>{const{targetNodes:I,eventType:V,handler:N}=M;!e||e===V?I.forEach(j=>j.removeEventListener(V,N)):t.push(M)}),this.$_events=t},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,t=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),t&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,t){for(const M of this.$_targetNodes){const I=M.getAttribute(e);I&&(M.removeAttribute(e),M.setAttribute(t,I))}},$_applyAttrsToTarget(e){for(const t of this.$_targetNodes)for(const M in e){const I=e[M];I==null?t.removeAttribute(M):t.setAttribute(M,I)}},$_updateParentShownChildren(e){let t=this.parentPopper;for(;t;)e?t.shownChildren.add(this.randomId):(t.shownChildren.delete(this.randomId),t.pendingHide&&t.hide()),t=t.parentPopper},$_isAimingPopper(){const e=this.$_referenceNode.getBoundingClientRect();if(y>=e.left&&y<=e.right&&_>=e.top&&_<=e.bottom){const t=this.$_popperNode.getBoundingClientRect(),M=y-c,I=_-m,V=t.left+t.width/2-c+(t.top+t.height/2)-m+t.width+t.height,N=c+M*V,j=m+I*V;return C(c,m,N,j,t.left,t.top,t.left,t.bottom)||C(c,m,N,j,t.left,t.top,t.right,t.top)||C(c,m,N,j,t.right,t.top,t.right,t.bottom)||C(c,m,N,j,t.left,t.bottom,t.right,t.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<"u"&&typeof window<"u"){if(_e){const e=$?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",t=>ue(t),e),document.addEventListener("touchend",t=>fe(t,!0),e)}else window.addEventListener("mousedown",e=>ue(e),!0),window.addEventListener("click",e=>fe(e,!1),!0);window.addEventListener("resize",tt)}function ue(e,t){for(let M=0;M<d.length;M++){const I=d[M];try{I.mouseDownContains=I.popperNode().contains(e.target)}catch{}}}function fe(e,t){Pe(e,t)}function Pe(e,t){const M={};for(let I=d.length-1;I>=0;I--){const V=d[I];try{const N=V.containsGlobalTarget=V.mouseDownContains||V.popperNode().contains(e.target);V.pendingHide=!1,requestAnimationFrame(()=>{if(V.pendingHide=!1,!M[V.randomId]&&ce(V,N,e)){if(V.$_handleGlobalClose(e,t),!e.closeAllPopover&&e.closePopover&&N){let J=V.parentPopper;for(;J;)M[J.randomId]=!0,J=J.parentPopper;return}let j=V.parentPopper;for(;j&&ce(j,j.containsGlobalTarget,e);)j.$_handleGlobalClose(e,t),j=j.parentPopper}})}catch{}}}function ce(e,t,M){return M.closeAllPopover||M.closePopover&&t||et(e,M)&&!t}function et(e,t){if(typeof e.autoHide=="function"){const M=e.autoHide(t);return e.lastAutoHide=M,M}return e.autoHide}function tt(){for(let e=0;e<d.length;e++)d[e].$_computePosition()}let c=0,m=0,y=0,_=0;typeof window<"u"&&window.addEventListener("mousemove",e=>{c=y,m=_,y=e.clientX,_=e.clientY},$?{passive:!0}:void 0);function C(e,t,M,I,V,N,j,J){const U=((j-V)*(t-N)-(J-N)*(e-V))/((J-N)*(M-e)-(j-V)*(I-t)),ne=((M-e)*(t-N)-(I-t)*(e-V))/((J-N)*(M-e)-(j-V)*(I-t));return U>=0&&U<=1&&ne>=0&&ne<=1}const ot={extends:Q()},B=(e,t)=>{const M=e.__vccOpts||e;for(const[I,V]of t)M[I]=V;return M};function it(e,t,M,I,V,N){return openBlock(),createElementBlock("div",{ref:"reference",class:normalizeClass(["v-popper",{"v-popper--shown":e.slotData.isShown}])},[renderSlot(e.$slots,"default",normalizeProps(guardReactiveProps(e.slotData)))],2)}const st=B(ot,[["render",it]]);function nt(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var M=e.indexOf("Trident/");if(M>0){var I=e.indexOf("rv:");return parseInt(e.substring(I+3,e.indexOf(".",I)),10)}var V=e.indexOf("Edge/");return V>0?parseInt(e.substring(V+5,e.indexOf(".",V)),10):-1}let z;function X(){X.init||(X.init=!0,z=nt()!==-1)}var E={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){X(),nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",z&&this.$el.appendChild(e),e.data="about:blank",z||this.$el.appendChild(e)},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&&(!z&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const rt=withScopeId();pushScopeId("data-v-b329ee4c");const pt={class:"resize-observer",tabindex:"-1"};popScopeId();const at=rt((e,t,M,I,V,N)=>(openBlock(),createBlock("div",pt)));E.render=at;E.__scopeId="data-v-b329ee4c";E.__file="src/components/ResizeObserver.vue";const Z=(e="theme")=>({computed:{themeClass(){return Ze(this[e])}}}),dt=defineComponent({name:"VPopperContent",components:{ResizeObserver:E},mixins:[Z()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(e){return e!=null&&!isNaN(e)?`${e}px`:null}}}),lt=["id","aria-hidden","tabindex","data-popper-placement"],ht={ref:"inner",class:"v-popper__inner"},ut=createBaseVNode("div",{class:"v-popper__arrow-outer"},null,-1),ft=createBaseVNode("div",{class:"v-popper__arrow-inner"},null,-1),ct=[ut,ft];function mt(e,t,M,I,V,N){const j=resolveComponent("ResizeObserver");return openBlock(),createElementBlock("div",{id:e.popperId,ref:"popover",class:normalizeClass(["v-popper__popper",[e.themeClass,e.classes.popperClass,{"v-popper__popper--shown":e.shown,"v-popper__popper--hidden":!e.shown,"v-popper__popper--show-from":e.classes.showFrom,"v-popper__popper--show-to":e.classes.showTo,"v-popper__popper--hide-from":e.classes.hideFrom,"v-popper__popper--hide-to":e.classes.hideTo,"v-popper__popper--skip-transition":e.skipTransition,"v-popper__popper--arrow-overflow":e.result&&e.result.arrow.overflow,"v-popper__popper--no-positioning":!e.result}]]),style:normalizeStyle(e.result?{position:e.result.strategy,transform:`translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`}:void 0),"aria-hidden":e.shown?"false":"true",tabindex:e.autoHide?0:void 0,"data-popper-placement":e.result?e.result.placement:void 0,onKeyup:t[2]||(t[2]=withKeys(J=>e.autoHide&&e.$emit("hide"),["esc"]))},[createBaseVNode("div",{class:"v-popper__backdrop",onClick:t[0]||(t[0]=J=>e.autoHide&&e.$emit("hide"))}),createBaseVNode("div",{class:"v-popper__wrapper",style:normalizeStyle(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[createBaseVNode("div",ht,[e.mounted?(openBlock(),createElementBlock(Fragment,{key:0},[createBaseVNode("div",null,[renderSlot(e.$slots,"default")]),e.handleResize?(openBlock(),createBlock(j,{key:0,onNotify:t[1]||(t[1]=J=>e.$emit("resize",J))})):createCommentVNode("",!0)],64)):createCommentVNode("",!0)],512),createBaseVNode("div",{ref:"arrow",class:"v-popper__arrow-container",style:normalizeStyle(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},ct,4)],4)],46,lt)}const ee=B(dt,[["render",mt]]),te={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}};let K=function(){};typeof window<"u"&&(K=window.Element);const gt=defineComponent({name:"VPopperWrapper",components:{Popper:st,PopperContent:ee},mixins:[te,Z("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,K,Boolean],default:void 0},boundary:{type:[String,K],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":e=>!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(e=>e!==this.$refs.popperContent.$el)}}});function wt(e,t,M,I,V,N){const j=resolveComponent("PopperContent"),J=resolveComponent("Popper");return openBlock(),createBlock(J,mergeProps({ref:"popper"},e.$props,{theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:[e.themeClass],onShow:t[0]||(t[0]=()=>e.$emit("show")),onHide:t[1]||(t[1]=()=>e.$emit("hide")),"onUpdate:shown":t[2]||(t[2]=U=>e.$emit("update:shown",U)),onApplyShow:t[3]||(t[3]=()=>e.$emit("apply-show")),onApplyHide:t[4]||(t[4]=()=>e.$emit("apply-hide")),onCloseGroup:t[5]||(t[5]=()=>e.$emit("close-group")),onCloseDirective:t[6]||(t[6]=()=>e.$emit("close-directive")),onAutoHide:t[7]||(t[7]=()=>e.$emit("auto-hide")),onResize:t[8]||(t[8]=()=>e.$emit("resize"))}),{default:withCtx(({popperId:U,isShown:ne,shouldMountContent:ve,skipTransition:be,autoHide:se,show:Se,hide:xe,handleResize:ye,onResize:Me,classes:ge,result:ie})=>[renderSlot(e.$slots,"default",{shown:ne,show:Se,hide:xe}),createVNode(j,{ref:"popperContent","popper-id":U,theme:e.finalTheme,shown:ne,mounted:ve,"skip-transition":be,"auto-hide":se,"handle-resize":ye,classes:ge,result:ie,onHide:xe,onResize:Me},{default:withCtx(()=>[renderSlot(e.$slots,"popper",{shown:ne,hide:xe})]),_: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 k=B(gt,[["render",wt]]);({...k});({...k});({...k});const $t=defineComponent({name:"VTooltipDirective",components:{Popper:Q(),PopperContent:ee},mixins:[te],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:e=>S(e.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>S(e.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(e){if(typeof this.content=="function"&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const t=++this.$_fetchId,M=this.content(this);M.then?M.then(I=>this.onResult(t,I)):this.onResult(t,M)}},onResult(e,t){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),vt=["innerHTML"],yt=["textContent"];function _t(e,t,M,I,V,N){const j=resolveComponent("PopperContent"),J=resolveComponent("Popper");return openBlock(),createBlock(J,mergeProps({ref:"popper"},e.$attrs,{theme:e.theme,"target-nodes":e.targetNodes,"popper-node":()=>e.$refs.popperContent.$el,onApplyShow:e.onShow,onApplyHide:e.onHide}),{default:withCtx(({popperId:U,isShown:ne,shouldMountContent:ve,skipTransition:be,autoHide:se,hide:Se,handleResize:xe,onResize:ye,classes:Me,result:ge})=>[createVNode(j,{ref:"popperContent",class:normalizeClass({"v-popper--tooltip-loading":e.loading}),"popper-id":U,theme:e.theme,shown:ne,mounted:ve,"skip-transition":be,"auto-hide":se,"handle-resize":xe,classes:Me,result:ge,onHide:Se,onResize:ye},{default:withCtx(()=>[e.html?(openBlock(),createElementBlock("div",{key:0,innerHTML:e.finalContent},null,8,vt)):(openBlock(),createElementBlock("div",{key:1,textContent:toDisplayString(e.finalContent)},null,8,yt))]),_: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 ze=B($t,[["render",_t]]),Ae="v-popper--has-tooltip";function Tt(e,t){let M=e.placement;if(!M&&t)for(const I of Te)t[I]&&(M=I);return M||(M=S(e.theme||"tooltip","placement")),M}function Ne(e,t,M){let I;const V=typeof t;return V==="string"?I={content:t}:t&&V==="object"?I=t:I={content:!1},I.placement=Tt(I,M),I.targetNodes=()=>[e],I.referenceNode=()=>e,I}let x,b,Pt=0;function St(){if(x)return;b=ref([]),x=createApp({name:"VTooltipDirectiveApp",setup(){return{directives:b}},render(){return this.directives.map(t=>h$3(ze,{...t.options,shown:t.shown||t.options.shown,key:t.id}))},devtools:{hide:!0}});const e=document.createElement("div");document.body.appendChild(e),x.mount(e)}function bt(e,t,M){St();const I=ref(Ne(e,t,M)),V=ref(!1),N={id:Pt++,options:I,shown:V};return b.value.push(N),e.classList&&e.classList.add(Ae),e.$_popper={options:I,item:N,show(){V.value=!0},hide(){V.value=!1}}}function He(e){if(e.$_popper){const t=b.value.indexOf(e.$_popper.item);t!==-1&&b.value.splice(t,1),delete e.$_popper,delete e.$_popperOldShown,delete e.$_popperMountTarget}e.classList&&e.classList.remove(Ae)}function me(e,{value:t,modifiers:M}){const I=Ne(e,t,M);if(!I.content||S(I.theme||"tooltip","disabled"))He(e);else{let V;e.$_popper?(V=e.$_popper,V.options.value=I):V=bt(e,t,M),typeof t.shown<"u"&&t.shown!==e.$_popperOldShown&&(e.$_popperOldShown=t.shown,t.shown?V.show():V.hide())}}const oe={beforeMount:me,updated:me,beforeUnmount(e){He(e)}},Mt=oe,_hoisted_1$1={style:{"margin-left":"auto"}},_sfc_main$f=defineComponent({__name:"ExpandableList.ce",props:mergeModels({title:{default:"",type:String},subtitle:{default:"",type:String},limit:{type:Number},template:{type:null}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=useModel(e,"modelValue"),M=e,I=ref([]),V=U=>(I.value[U]||(I.value[U]=useId()),I.value[U]),N=()=>{t.value=[...t.value,Clone(M.template)]},j=U=>{I.value.splice(U,1),t.value=[...t.value.splice(U,1)]},J=(U,ne)=>{const ve=I.value.splice(U,1)[0];I.value.splice(U+ne,0,ve);const be=[...t.value],se=be.splice(U,1)[0];be.splice(U+ne,0,se),t.value=be};return onMounted(()=>{t.value.length||N()}),(U,ne)=>(openBlock(),createBlock(unref(EV),{class:"expandable-list",title:U.title,subtitle:U.subtitle},{actions:withCtx(()=>[renderSlot(U.$slots,"actions",{},()=>[createBaseVNode("span",_hoisted_1$1,toDisplayString(t.value.length)+toDisplayString(U.limit?` / ${U.limit}`:"")+" "+toDisplayString(t.value.length>=2||U.limit?"felter":"felt"),1)])]),default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(t.value,(ve,be)=>(openBlock(),createElementBlock(Fragment,{key:V(be)},[createVNode(unref(zr),{justify:"end",gap:"4px"},{default:withCtx(()=>[withDirectives(createVNode(unref(Be),{size:"small",icon:"fa-pro-light:trash",disabled:t.value.length<=1,onClick:se=>j(be)},null,8,["disabled","onClick"]),[[unref(Mt),{content:"Fjern"}]]),withDirectives(createVNode(unref(Be),{size:"small",icon:"fa-pro-light:arrow-up",disabled:be===0,onClick:se=>J(be,-1)},null,8,["disabled","onClick"]),[[unref(Mt),{content:"Flytt opp"}]]),withDirectives(createVNode(unref(Be),{size:"small",icon:"fa-pro-light:arrow-down",disabled:be===t.value.length-1,onClick:se=>J(be,1)},null,8,["disabled","onClick"]),[[unref(Mt),{content:"Flytt ned"}]])]),_:2},1024),renderSlot(U.$slots,"default",{item:ve,index:be})],64))),128))]),footer:withCtx(()=>[withDirectives(createVNode(unref(Be),{variant:"tertiary",disabled:U.limit&&t.value.length>=U.limit,onClick:N,icon:"fa-pro-solid:plus",label:"Opprett nytt felt"},null,8,["disabled"]),[[unref(Mt),{content:"Maks antall felter lagt til",disabled:!(U.limit&&t.value.length>=U.limit)}]])]),_:3},8,["title","subtitle"]))}}),_style_0$a=".expandable-list .k-expandable__footer{--k-expandable-spacing: 0rem}.expandable-list .k-expandable__footer .k-button{width:100%;--k-button-tertiary-background: #eaeaea;padding:1rem}.expandable-list .k-expandable__footer .k-button__content{flex-direction:column}.expandable-list .k-expandable__footer .k-button__icon{padding:.5rem;color:#fff;background-color:var(--k-ui-color-primary);border-radius:var(--k-ui-rounding-full)}.expandable-list .k-expandable__footer .k-button__icon svg{height:1em;width:1em}",ExpandableList=_export_sfc(_sfc_main$f,[["styles",[_style_0$a]]]),_sfc_main$e=defineComponent({__name:"UnitLinks.ce",props:{modelValue:{type:Object},hasFields:{type:Function},hasField:{type:Function},getIsEditedIcon:{type:Function},isEdited:{type:Function}},emits:["update:modelValue"],setup(e,{expose:t,emit:M}){const I=e,V=M,N=ref(Clone(I.modelValue)),j=ref(),J=be=>hasDiff({value:N.value[be]},{value:I.modelValue[be]})||I.isEdited(be),U=(...be)=>I.getIsEditedIcon(J(...be)),ne=()=>{N.value=Clone(I.modelValue)},ve=()=>{V("update:modelValue",Clone(N.value))};return t({open:()=>{j.value.open()},close:()=>{j.value.close()}}),(be,se)=>(openBlock(),createBlock(unref(Th),{ref_key:"linkDialog",ref:j,variant:"prompt",title:"Tilpass enhetens nyttige lenker i Finn-annonsen",subtitle:"Lenker vil være synlig under kontakt informasjon på enhetsannonsen",teleport:!1,closeOnOutsideClick:!1},{trigger:withCtx(({triggerProps:Se})=>[createVNode(unref(Be),{style:{display:"none"}})]),default:withCtx(()=>[be.hasFields("MOREINFO")?(openBlock(),createBlock(ExpandableList,{key:0,title:"Nyttige lenker i Finn-annonsen",limit:4,template:{URL:"",URLTEXT:""},expanded:!0,modelValue:N.value.MOREINFO,"onUpdate:modelValue":se[0]||(se[0]=Se=>N.value.MOREINFO=Se)},{actions:withCtx(()=>[createVNode(unref(Ve),{icon:U("MOREINFO"),class:normalizeClass(["ad__expandable-list-field",{"ad__expandable-list-field--edited":J("MOREINFO")}])},null,8,["icon","class"])]),default:withCtx(({item:Se})=>[createVNode(unref(hV),{columns:"2"},{default:withCtx(()=>[createVNode(unref(GS),{label:"URL til nyttig lenke"},{default:withCtx(()=>[createVNode(unref(By),{modelValue:Se.URL,"onUpdate:modelValue":xe=>Se.URL=xe,suffix:"URL"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),createVNode(unref(GS),{label:"Visningsnavn på lenken på Finn-annonsen"},{default:withCtx(()=>[createVNode(unref(By),{modelValue:Se.URLTEXT,"onUpdate:modelValue":xe=>Se.URLTEXT=xe},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024)]),_:1},8,["modelValue"])):createCommentVNode("",!0)]),actions:withCtx(({close:Se})=>[createVNode(unref(Be),{label:"Avbryt",onClick:()=>{ne(),Se()},variant:"secondary"},null,8,["onClick"]),createVNode(unref(Be),{label:"Bekreft",onClick:()=>{ve(),Se()},variant:"primary"},null,8,["onClick"])]),_:1},512))}}),_sfc_main$d=defineComponent({__name:"RichTextMultiple.ce",props:mergeModels({expanded:{type:Boolean},title:{type:String},subtitle:{type:String}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=useModel(e,"modelValue");function M(N){const J=new DOMParser().parseFromString(N,"text/html"),U=[];return J.querySelectorAll("h3").forEach((ve,be)=>{const se=ve.textContent||"";let Se="",xe=ve.nextElementSibling;for(;xe&&xe.tagName!=="H3";)Se+=xe.outerHTML,xe=xe.nextElementSibling;U.push({title:se,content:Se})}),U}const I=computed({get:()=>M(t.value).map(N=>({title:N.title,content:N.content})),set:N=>{t.value=N.map(j=>`<h3>${j.title}</h3>${j.content}`).join("")}}),V=(N,j,J)=>{const U=I.value;U[j]&&(U[j]={...U[j],[J]:N}),t.value=U.map(({title:ne,content:ve})=>`<h3>${ne}</h3>${ve}`).join("")};return(N,j)=>(openBlock(),createBlock(ExpandableList,{expanded:N.expanded,title:N.title,subtitle:N.subtitle,template:{title:"",content:""},modelValue:I.value,"onUpdate:modelValue":j[0]||(j[0]=J=>I.value=J)},{actions:withCtx(()=>[renderSlot(N.$slots,"actions")]),default:withCtx(({item:J,index:U})=>[createVNode(unref(GS),{label:"Tittel"},{default:withCtx(()=>[createVNode(unref(By),{modelValue:J.title,"onUpdate:modelValue":ne=>V(ne,U,"title")},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),createVNode(unref(GS),{label:"Tekst"},{default:withCtx(()=>[createVNode(unref(xV),{actions:["bold","italic","orderedList","bulletList"],modelValue:J.content,"onUpdate:modelValue":ne=>V(ne,U,"content")},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:3},8,["expanded","title","subtitle","modelValue"]))}}),_sfc_main$c=defineComponent({__name:"UnitDescription.ce",props:{modelValue:{type:Object},hasFields:{type:Function},hasField:{type:Function},getIsEditedIcon:{type:Function},isEdited:{type:Function},rules:{type:Object},labels:{type:Object}},emits:["update:modelValue"],setup(e,{expose:t,emit:M}){const I=e,V=M,N=ref(Clone(I.modelValue)),j=ref(),J=Me=>{const ge=["HEADING"];return Object.fromEntries(Object.entries(Me).filter(([ie,ke])=>ge.includes(ie)))},U=computed(()=>J(I.rules)),ne=computed(()=>J(I.labels)),ve=JB({rules:U,labels:ne,data:N}),{bind:be}=ve,se=Me=>hasDiff({value:N.value[Me]},{value:I.modelValue[Me]})||I.isEdited(Me),Se=(...Me)=>I.getIsEditedIcon(se(...Me)),xe=()=>{N.value=Clone(I.modelValue)},ye=()=>{V("update:modelValue",Clone(N.value))};return t({open:()=>{j.value.open()},close:()=>j.value.close()}),(Me,ge)=>(openBlock(),createBlock(unref(Th),{variant:"prompt",title:"Rediger enhet",subtitle:"Rediger beskrivelser og bilder",teleport:!1,closeOnOutsideClick:!1,ref_key:"descriptionDialog",ref:j},{trigger:withCtx(({triggerProps:ie})=>[createVNode(unref(Be),mergeProps({style:{display:"none"}},ie),null,16)]),default:withCtx(()=>[createVNode(unref(zr),{direction:"column",gap:"2rem"},{default:withCtx(()=>[Me.hasFields("HEADING")?(openBlock(),createBlock(unref(EV),{key:0,expanded:!0,title:"Hovedtittel",subtitle:"Teksten som formuleres her vil bli synlig som hovedtittel på enhetsannonsen"},{default:withCtx(()=>[createVNode(unref(GS),mergeProps(unref(be)("HEADING"),{label:"Hovedtittel for enhetsannonsen",class:["ad__field",{"ad__field--edited":se("HEADING")}]}),{default:withCtx(()=>[createVNode(unref(By),{modelValue:N.value.HEADING,"onUpdate:modelValue":ge[0]||(ge[0]=ie=>N.value.HEADING=ie)},{suffix:withCtx(()=>[createVNode(unref(Ve),{icon:Se("HEADING")},null,8,["icon"])]),_:1},8,["modelValue"])]),_:1},16,["class"])]),_:1})):createCommentVNode("",!0),Me.hasFields("MEDIA")?(openBlock(),createBlock(unref(EV),{key:1,expanded:!0,title:"Media",subtitle:"Disse hentes fra enhetssiden. Det første bilde vil være forsidebildet på enhetsannonsen."},{actions:withCtx(()=>[createVNode(unref(Ve),{icon:Se("MEDIA"),class:normalizeClass(["ad__expandable-list-field",{"ad__expandable-list-field--edited":se("MEDIA")}])},null,8,["icon","class"])]),default:withCtx(()=>[Me.hasField("MEDIA")?(openBlock(),createBlock(unref(vV),{key:0,modelValue:N.value.MEDIA,"onUpdate:modelValue":ge[1]||(ge[1]=ie=>N.value.MEDIA=ie),label:"Bilder i Finn-annonsen",dropMessage:"Dra en fil hit eller <b>velg</b> for å laste opp",accept:["image/jpeg","image/png","image/jpg"],upload:unref(uploadFunction),types:["Image"],multiple:!0,sortable:!0,description:!0,placement:"outside",size:"contain",labels:{selectMessage:"Trykk på knappen nedenfor for å laste opp andre filtyper",select:"Velg",cancel:"Avbryt",save:"Bekreft",descriptionPlaceholder:"",image:{createLabel:"Bilde",preview:"",inputLabel:"",error:""}}},null,8,["modelValue","upload"])):createCommentVNode("",!0)]),_:1})):createCommentVNode("",!0),Me.hasFields("GENERAL_DESCRIPTION")?(openBlock(),createBlock(_sfc_main$d,{key:2,expanded:!0,title:"Beskrivelse",subtitle:"Teksten som formuleres her vil bli synlig under beskrivelse på enhetsannonsen.",modelValue:N.value.GENERAL_DESCRIPTION,"onUpdate:modelValue":ge[2]||(ge[2]=ie=>N.value.GENERAL_DESCRIPTION=ie)},{actions:withCtx(()=>[createVNode(unref(Ve),{icon:Se("GENERAL_DESCRIPTION"),class:normalizeClass(["ad__expandable-list-field",{"ad__expandable-list-field--edited":se("GENERAL_DESCRIPTION")}])},null,8,["icon","class"])]),_:1},8,["modelValue"])):createCommentVNode("",!0)]),_:1})]),actions:withCtx(({close:ie})=>[createVNode(unref(Be),{label:"Avbryt",onClick:()=>{xe(),ie()},variant:"secondary"},null,8,["onClick"]),withDirectives(createVNode(unref(Be),{label:"Bekreft",disabled:!unref(ve).passes.value,onClick:()=>{unref(ve).passes&&(ye(),ie())},variant:"primary"},null,8,["disabled","onClick"]),[[unref(Mt),{content:Object.entries(unref(ve).errors.value.errors).map(([ke,Ee])=>Ee).flat().join(`
|
|
2
|
+
`).map(J=>{if(J)return JSON.parse(J.replace("data: ",""))}).filter(Boolean),V=e.body.getReader(),N=(j,J)=>M.filter(U=>U.event===j).forEach(U=>U.callback(J));return V.read().then(function j({done:J,value:U}){return J?N("finished"):(I(U).forEach(ne=>N(ne.event,ne.payload)),V.read().then(j))}),{on:(j,J)=>{M.push({event:j,callback:J})},cancel:()=>{V.cancel()}}}function useAPI(e){const t=inject(PropsInjectionKey),M=be=>new URL(`${t.tenant}/api/integration/${t.integrationId}/callbacks/${be}`);return{getAds:be=>{const se=M("data");return be&&se.searchParams.append("id",be),fetch$1(se.toString(),{method:"GET",headers:{authorization:`Bearer ${t.token}`}}).then(Se=>Se.json())},navigateView:(be,se)=>{const Se=M(be);Se.searchParams.append("token",t.token),Se.searchParams.append("project",t.project),se&&Se.searchParams.append("id",se),e.value.dispatchEvent(new CustomEvent("action",{detail:{type:"navigate",value:{name:"form",query:{target:Se.toString()}}},bubbles:!0,composed:!0}))},remove:be=>{const se=M("unpublish");return se.searchParams.append("id",be),fetch$1(se.toString(),{method:"DELETE",headers:{authorization:`Bearer ${t.token}`}})},publish:async(be,se={})=>{const{preview:Se=!1}=se,xe=M("publish"),ye=await fetch$1(xe.toString(),{method:"POST",cache:"no-cache",keepalive:!0,headers:{Authorization:`Bearer ${t.token}`,"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify({data:be,preview:Se})});return SSE(ye)},unpublish:be=>{const se=M("unpublish");return se.searchParams.append("id",be),fetch$1(se.toString(),{method:"POST",headers:{authorization:`Bearer ${t.token}`}})},navigateProjectStep:be=>{e.value.dispatchEvent(new CustomEvent("action",{detail:{type:"navigate",value:{name:"project-edit",params:{id:t.project,step:be}}},bubbles:!0,composed:!0}))},getUnits:()=>{const be=M("units");return fetch$1(be.toString(),{method:"GET",headers:{authorization:`Bearer ${t.token}`}}).then(se=>se.json())},fields:be=>{const se=M("fields");return fetch$1(se.toString(),{method:"POST",headers:{authorization:`Bearer ${t.token}`},body:JSON.stringify({type:be.type,units:be.units.map(Se=>Se.id)})}).then(Se=>Se.json())}}}const _sfc_main$i=defineComponent({__name:"Options.ce",props:{item:{type:null}},emits:["refetch"],setup(e,{emit:t}){const M=useCurrentElement(),I=useAPI(M),V=t,N=ref(),j=ref();return(J,U)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(Th),{teleport:!1,closeOnOutsideClick:!0,ref_key:"removedialog",ref:j,class:"remove-dialog"},{trigger:withCtx(({triggerProps:ne})=>[createVNode(unref(Be),mergeProps({style:{display:"none"}},ne),null,16)]),header:withCtx(({titleProps:ne,descriptionProps:ve,closeTriggerProps:be})=>[createVNode(unref(zr),{class:"remove-dialog__header",justify:"center",align:"center",direction:"column",gap:"0.25rem"},{default:withCtx(()=>[createVNode(unref(Ve),{icon:"fa-pro-light:triangle-exclamation",class:"remove-dialog__icon"}),createBaseVNode("div",mergeProps(ve,{class:"remove-dialog__subtitle"})," Du holder på å slette Finn-annonsen: ",16),createBaseVNode("div",mergeProps(ne,{class:"remove-dialog__title"}),toDisplayString(J.item.name),17),createVNode(unref(Be),mergeProps({class:"k-dialog__close-trigger",variant:"tertiary",icon:"fa-pro-light:times",size:"small"},be),null,16)]),_:2},1024)]),actions:withCtx(({close:ne})=>[createVNode(unref(Be),{label:"Avbryt",onClick:ne},null,8,["onClick"]),createVNode(unref(Be),{label:"Bekreft",variant:"primary",promise:N.value,onSuccess:()=>{ne(),V("refetch")},onClick:U[0]||(U[0]=()=>N.value=unref(I).remove(J.item.id))},null,8,["promise","onSuccess"])]),_:1},512),createVNode(unref(sa),{label:"Endre",keepOpen:"",teleport:!1,class:"options"},{default:withCtx(()=>[createVNode(unref(Be),{iconRight:"fa-pro-light:pen",label:"Rediger",onClick:U[1]||(U[1]=()=>unref(I).navigateView("mutate",J.item.id)),variant:"tertiary"}),J.item.publishedAt?(openBlock(),createBlock(unref(Be),{key:0,iconRight:"fa-pro-light:play-pause",label:"Avpubliser",promise:N.value,onSuccess:U[2]||(U[2]=()=>{V("refetch")}),onClick:U[3]||(U[3]=()=>N.value=unref(I).unpublish(J.item.id)),variant:"tertiary"},null,8,["promise"])):createCommentVNode("",!0),createVNode(unref(Be),{"data-type":"delete",class:"options__delete",variant:"danger",label:"Slett",iconRight:"fa-pro-light:trash-xmark",onClick:U[4]||(U[4]=()=>{j.value.open()})})]),_:1})],64))}}),_style_0$d=".k-button.options__delete{color:var(--k-button-danger-background, var(--k-ui-color-danger));background-color:var(--k-button-danger-text, white)}.k-button.options__delete:focus,.k-button.options__delete:active,.k-button.options__delete:hover{color:var(--k-button-danger-text, white)}.remove-dialog{--k-dialog-min-width: 400px}.remove-dialog__title{font-weight:700;font-size:1.25rem}.remove-dialog__icon{font-size:2rem}.remove-dialog .k-dialog__card .k-card__header{color:var(--k-ui-color-danger);background-color:var(--k-ui-color-danger-lightest);--k-button-tertiary-text: var(--k-ui-color-danger-darkest);--k-button-tertiary-background-hover: var(--k-ui-color-danger-lightest);--k-button-tertiary-background-active: var(--k-ui-color-danger-light)}",Options=_export_sfc(_sfc_main$i,[["styles",[_style_0$d]]]),_sfc_main$h=defineComponent({__name:"Dashboard.ce",setup(e){const t=useCurrentElement(),M=useAPI(t),I=ref([]),V=ref(!1),N=computed(()=>[{id:"name",label:"Kampanjenavn"},{id:"status",label:"Status"},{id:"published",label:"Publisert"},{id:"insight",label:""},{id:"url",label:""},{id:"edit",label:""}]),j=ne=>ne.publishedAt?ne.preview?{label:"Forhåndsvisning",variant:"info"}:{label:"Aktiv",variant:"success"}:{label:"Avpublisert",variant:"danger"},J=ne=>{if(!ne.publishedAt||ne.preview)return"-";const ve={year:"numeric",month:"numeric",day:"numeric"};return new Date(ne.publishedAt).toLocaleString("nb-NO",ve)};ref();const U=()=>{V.value=!0,M.getAds().then(ne=>{I.value=ne}).finally(()=>{V.value=!1})};return onMounted(U),(ne,ve)=>(openBlock(),createBlock(unref(tC),{class:"ads",title:"Dine Finn-annonser",subtitle:"Her får du en oversikt over dine Finn-annonser.",variant:"prompt",appearance:"shadow"},{default:withCtx(()=>[I.value.length&&!V.value?(openBlock(),createBlock(unref(cV),{key:0,items:I.value,columns:N.value},{name:withCtx(({item:be})=>[createTextVNode(toDisplayString(be.name),1)]),status:withCtx(({item:be})=>[createVNode(unref(eV),mergeProps(j(be),{appearance:"filled"}),null,16)]),published:withCtx(({item:be})=>[createTextVNode(toDisplayString(J(be)),1)]),url:withCtx(({item:be})=>[be.units.some(se=>se.url)?(openBlock(),createBlock(unref(sa),{key:0,label:"Se annonser"},{default:withCtx(()=>[createVNode(unref(Be),{variant:"tertiary",iconRight:"fa-pro-light:arrow-up-right-from-square",label:"Prosjektannonse",target:"_blank",is:"a",href:be.url},null,8,["href"]),(openBlock(!0),createElementBlock(Fragment,null,renderList(be.units,se=>(openBlock(),createBlock(unref(Be),{variant:"tertiary",label:`${se.name}`,target:"_blank",is:"a",href:se.url,iconRight:"fa-pro-light:arrow-up-right-from-square"},null,8,["label","href"]))),256))]),_:2},1024)):(openBlock(),createBlock(unref(Be),{key:1,iconRight:"fa-pro-light:arrow-up-right-from-square",label:"Se annonse",target:"_blank",is:"a",href:be.url},null,8,["href"]))]),insight:withCtx(({item:be})=>[be.preview?createCommentVNode("",!0):(openBlock(),createBlock(unref(Be),{key:0,iconRight:"fa-pro-light:arrow-up-right-from-square",label:"Se innsikt",target:"_blank",is:"a",href:be.statistics},null,8,["href"]))]),edit:withCtx(({item:be})=>[(openBlock(),createBlock(Options,{item:be,onRefetch:ve[0]||(ve[0]=()=>U()),key:be.id},null,8,["item"]))]),_:1},8,["items","columns"])):createCommentVNode("",!0),V.value?(openBlock(),createBlock(unref(zr),{key:1,direction:"column",align:"center"},{default:withCtx(()=>[createVNode(unref(sh),{size:"large"})]),_:1})):createCommentVNode("",!0),!V.value&&!I.value.length?(openBlock(),createBlock(unref(zr),{key:2,direction:"column",align:"center",class:"ads__empty"},{default:withCtx(()=>[createVNode(unref(Ve),{icon:"fa-pro-thin:face-sleeping"}),ve[1]||(ve[1]=createBaseVNode("div",null,"Fant ingen annonser",-1))]),_:1})):createCommentVNode("",!0)]),_:1}))}}),_style_0$c=".ads__empty{font-size:1rem}.ads__empty svg{padding-block:var(--k-ui-spacing);opacity:var(--k-ui-opacity-faded);font-size:5rem}",Dashboard=_export_sfc(_sfc_main$h,[["styles",[_style_0$c]]]),Categories=[{type:"ESTATE_PLANNED",label:"Nye boliger, kommer for salg"},{type:"ESTATE_PROJECT",label:"Nye boliger til salgs"},{label:"Nye boliger til salgs hytte",type:"ESTATE_PROJECT_LEISURE"},{type:"ESTATE_PROJECT_SINGLE",label:"Nye boliger til salgs enkel enhet"},{type:"ESTATE_BUSINESS_SALE",label:"Næringseiendommer til salgs"},{label:"Næringseiendommer til leie",type:"ESTATE_BUSINESS_RENT"},{label:"Boligtomt/Fritidstomt til salgs",type:"PLOT_SALE"},{label:"Bolig til leie",type:"ESTATE_RENT"}];var nb_NO={accepted:":attribute må være akseptert.",alpha:":attribute feltet kan kun inneholde alfabetiske tegn.",alpha_dash:":attribute feltet kan kun inneholde alfanumeriske tegn, i tillegg til bindestreker og understreker.",alpha_num:":attribute feltet må være alfanumerisk.",between:":attribute feltet må være mellom :min og :max.",confirmed:":attribute feltet stemmer ikke overens med bekreftelsen.",email:":attribute formatet er ugyldig.",date:":attribute er et ugyldig datoformat.",def:":attribute attributtet har feil.",digits:":attribute må være på :digits siffer.",digits_between:":attribute må være mellom :min og :max siffer.",different:":attribute og :different må være forskjellige.",in:"Den oppgitte verdien for :attribute er ugyldig.",integer:":attribute må være et heltall.",hex:"The :attribute should have hexadecimal format",min:{numeric:":attribute må minst være :min.",string:":attribute må være på minst :min tegn."},max:{numeric:":attribute kan ikke være større enn :max.",string:":attribute kan maks ha :max tegn."},not_in:"Den oppgitte verdien for :attribute er ugyldig.",numeric:":attribute må være et tall.",present:"The :attribute field must be present (but can be empty).",required:":attribute feltet er påkrevd.",required_if:":attribute er påkrevd når :other er :value.",same:":attribute og :same må være like.",size:{numeric:":attribute må ha størrelsen :size.",string:":attribute må ha :size tegn."},string:":attribute må være tekst.",url:":attribute formatet er ugyldig.",regex:":attribute formatet er ugyldig.",attributes:{}};const nb=getDefaultExportFromCjs$1(nb_NO);CV.setLabels(nb);const _sfc_main$g=defineComponent({__name:"Type.ce",props:mergeModels({onNext:{type:null},onPrev:{type:null},units:{type:Array}},{modelValue:{default:{}},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=useCurrentElement(),M=useAPI(t),I=inject(PropsInjectionKey),V=e,N=useModel(e,"modelValue"),j=computed(()=>Categories.find(Me=>Me.type===N.value.type)),J=computed(()=>[{id:"name",label:"Navn"},{id:"type",label:"Enhetstype"},{id:"status",label:"Status"},{id:"price",label:"Pris"}]),U=Me=>{switch(Me){case"upcoming":return"info";case"sale":return"success";case"reserved":return"warning";case"sold":return"danger";default:return"neutral"}},ne=Me=>Me.disabled,ve=()=>{V.onNext()},be=computed({get(){return V.units.filter(Me=>N.value.units.some(ge=>ge.id===Me.id))},set(Me){N.value.units=Me.map(ge=>{const{price:ie,propertyType:ke,status:Ee,disabled:Ce,...Le}=ge;return{fields:{},...Le}})}}),se=computed(()=>({name:"required",type:"required"})),Se=computed(()=>({name:"Navn"})),xe=JB({rules:se,labels:Se,data:N}),{bind:ye}=xe;return(Me,ge)=>(openBlock(),createBlock(unref(tC),{class:"type",title:"Grunnlag for Finn-annonsen",variant:"prompt",appearance:"shadow",subtitle:"Definer annonsen sitt interne navn, boligtypen annonsen skal ligge under på Finn og hvilke enheter du skal ha på din annonse."},{default:withCtx(()=>[createVNode(unref(hV),{columns:"2",gap:"4rem 2rem"},{default:withCtx(()=>[createVNode(unref(GS),mergeProps({label:"Internt navn på Finn annonse"},unref(ye)("name")),{default:withCtx(()=>[createVNode(unref(By),{modelValue:N.value.name,"onUpdate:modelValue":ge[0]||(ge[0]=ie=>N.value.name=ie)},null,8,["modelValue"])]),_:1},16),createVNode(unref(GS),mergeProps(unref(ye)("type"),{label:"Velg annonse-kategori",help:"Dette legger annonsen på riktig boligtype på Finn"}),{default:withCtx(()=>[createVNode(unref(sa),{disabled:!!unref(I).id,items:unref(Categories).map(ie=>({...ie,action:()=>N.value.type=ie.type})),label:j.value?.label||"Velg..."},null,8,["disabled","items","label"])]),_:1},16),createVNode(unref(GS),{label:"Velg enheter som skal være på Finn-annonsen",class:"k-grid-span-full"},{default:withCtx(()=>[createVNode(unref(cV),{columns:J.value,items:Me.units,selected:be.value,"onUpdate:selected":ge[1]||(ge[1]=ie=>be.value=ie),isDisabled:ne},{name:withCtx(({item:ie})=>[createTextVNode(toDisplayString(ie.name),1)]),type:withCtx(({item:ie})=>[createTextVNode(toDisplayString(ie.propertyType.label),1)]),status:withCtx(({item:ie})=>[createVNode(unref(eV),{appearance:"filled",variant:U(ie.status.value),rounded:!0},{default:withCtx(()=>[createTextVNode(toDisplayString(ie.status.label),1)]),_:2},1032,["variant"])]),price:withCtx(({item:ie})=>[createTextVNode(toDisplayString(unref(toCurrency)(ie.price)),1)]),_:1},8,["columns","items","selected"])]),_:1})]),_:1})]),actions:withCtx(()=>[createVNode(unref(Be),{label:"Avbryt",variant:"secondary",onClick:ge[2]||(ge[2]=()=>unref(M).navigateView("dashboard"))}),createVNode(unref(Be),{label:"Neste",variant:"primary","icon-right":"fa-pro-solid:arrow-right",disabled:!unref(xe).passes.value,onClick:ge[3]||(ge[3]=()=>ve())},null,8,["disabled"])]),_:1}))}}),_style_0$b="",StepType=_export_sfc(_sfc_main$g,[["styles",[_style_0$b]]]),sides=["top","right","bottom","left"],alignments=["start","end"],placements=sides.reduce((e,t)=>e.concat(t,t+"-"+alignments[0],t+"-"+alignments[1]),[]),min=Math.min,max=Math.max,oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp(e,t,M){return max(e,min(t,M))}function evaluate(e,t){return typeof e=="function"?e(t):e}function getSide(e){return e.split("-")[0]}function getAlignment(e){return e.split("-")[1]}function getOppositeAxis(e){return e==="x"?"y":"x"}function getAxisLength(e){return e==="y"?"height":"width"}function getSideAxis(e){return["top","bottom"].includes(getSide(e))?"y":"x"}function getAlignmentAxis(e){return getOppositeAxis(getSideAxis(e))}function getAlignmentSides(e,t,M){M===void 0&&(M=!1);const I=getAlignment(e),V=getAlignmentAxis(e),N=getAxisLength(V);let j=V==="x"?I===(M?"end":"start")?"right":"left":I==="start"?"bottom":"top";return t.reference[N]>t.floating[N]&&(j=getOppositePlacement(j)),[j,getOppositePlacement(j)]}function getExpandedPlacements(e){const t=getOppositePlacement(e);return[getOppositeAlignmentPlacement(e),t,getOppositeAlignmentPlacement(t)]}function getOppositeAlignmentPlacement(e){return e.replace(/start|end/g,t=>oppositeAlignmentMap[t])}function getSideList(e,t,M){const I=["left","right"],V=["right","left"],N=["top","bottom"],j=["bottom","top"];switch(e){case"top":case"bottom":return M?t?V:I:t?I:V;case"left":case"right":return t?N:j;default:return[]}}function getOppositeAxisPlacements(e,t,M,I){const V=getAlignment(e);let N=getSideList(getSide(e),M==="start",I);return V&&(N=N.map(j=>j+"-"+V),t&&(N=N.concat(N.map(getOppositeAlignmentPlacement)))),N}function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,t=>oppositeSideMap[t])}function expandPaddingObject(e){return{top:0,right:0,bottom:0,left:0,...e}}function getPaddingObject(e){return typeof e!="number"?expandPaddingObject(e):{top:e,right:e,bottom:e,left:e}}function rectToClientRect(e){const{x:t,y:M,width:I,height:V}=e;return{width:I,height:V,top:M,left:t,right:t+I,bottom:M+V,x:t,y:M}}function computeCoordsFromPlacement(e,t,M){let{reference:I,floating:V}=e;const N=getSideAxis(t),j=getAlignmentAxis(t),J=getAxisLength(j),U=getSide(t),ne=N==="y",ve=I.x+I.width/2-V.width/2,be=I.y+I.height/2-V.height/2,se=I[J]/2-V[J]/2;let Se;switch(U){case"top":Se={x:ve,y:I.y-V.height};break;case"bottom":Se={x:ve,y:I.y+I.height};break;case"right":Se={x:I.x+I.width,y:be};break;case"left":Se={x:I.x-V.width,y:be};break;default:Se={x:I.x,y:I.y}}switch(getAlignment(t)){case"start":Se[j]-=se*(M&&ne?-1:1);break;case"end":Se[j]+=se*(M&&ne?-1:1);break}return Se}const computePosition=async(e,t,M)=>{const{placement:I="bottom",strategy:V="absolute",middleware:N=[],platform:j}=M,J=N.filter(Boolean),U=await(j.isRTL==null?void 0:j.isRTL(t));let ne=await j.getElementRects({reference:e,floating:t,strategy:V}),{x:ve,y:be}=computeCoordsFromPlacement(ne,I,U),se=I,Se={},xe=0;for(let ye=0;ye<J.length;ye++){const{name:Me,fn:ge}=J[ye],{x:ie,y:ke,data:Ee,reset:Ce}=await ge({x:ve,y:be,initialPlacement:I,placement:se,strategy:V,middlewareData:Se,rects:ne,platform:j,elements:{reference:e,floating:t}});ve=ie??ve,be=ke??be,Se={...Se,[Me]:{...Se[Me],...Ee}},Ce&&xe<=50&&(xe++,typeof Ce=="object"&&(Ce.placement&&(se=Ce.placement),Ce.rects&&(ne=Ce.rects===!0?await j.getElementRects({reference:e,floating:t,strategy:V}):Ce.rects),{x:ve,y:be}=computeCoordsFromPlacement(ne,se,U)),ye=-1)}return{x:ve,y:be,placement:se,strategy:V,middlewareData:Se}};async function detectOverflow(e,t){var M;t===void 0&&(t={});const{x:I,y:V,platform:N,rects:j,elements:J,strategy:U}=e,{boundary:ne="clippingAncestors",rootBoundary:ve="viewport",elementContext:be="floating",altBoundary:se=!1,padding:Se=0}=evaluate(t,e),xe=getPaddingObject(Se),Me=J[se?be==="floating"?"reference":"floating":be],ge=rectToClientRect(await N.getClippingRect({element:(M=await(N.isElement==null?void 0:N.isElement(Me)))==null||M?Me:Me.contextElement||await(N.getDocumentElement==null?void 0:N.getDocumentElement(J.floating)),boundary:ne,rootBoundary:ve,strategy:U})),ie=be==="floating"?{x:I,y:V,width:j.floating.width,height:j.floating.height}:j.reference,ke=await(N.getOffsetParent==null?void 0:N.getOffsetParent(J.floating)),Ee=await(N.isElement==null?void 0:N.isElement(ke))?await(N.getScale==null?void 0:N.getScale(ke))||{x:1,y:1}:{x:1,y:1},Ce=rectToClientRect(N.convertOffsetParentRelativeRectToViewportRelativeRect?await N.convertOffsetParentRelativeRectToViewportRelativeRect({elements:J,rect:ie,offsetParent:ke,strategy:U}):ie);return{top:(ge.top-Ce.top+xe.top)/Ee.y,bottom:(Ce.bottom-ge.bottom+xe.bottom)/Ee.y,left:(ge.left-Ce.left+xe.left)/Ee.x,right:(Ce.right-ge.right+xe.right)/Ee.x}}const arrow=e=>({name:"arrow",options:e,async fn(t){const{x:M,y:I,placement:V,rects:N,platform:j,elements:J,middlewareData:U}=t,{element:ne,padding:ve=0}=evaluate(e,t)||{};if(ne==null)return{};const be=getPaddingObject(ve),se={x:M,y:I},Se=getAlignmentAxis(V),xe=getAxisLength(Se),ye=await j.getDimensions(ne),Me=Se==="y",ge=Me?"top":"left",ie=Me?"bottom":"right",ke=Me?"clientHeight":"clientWidth",Ee=N.reference[xe]+N.reference[Se]-se[Se]-N.floating[xe],Ce=se[Se]-N.reference[Se],Le=await(j.getOffsetParent==null?void 0:j.getOffsetParent(ne));let Oe=Le?Le[ke]:0;(!Oe||!await(j.isElement==null?void 0:j.isElement(Le)))&&(Oe=J.floating[ke]||N.floating[xe]);const Re=Ee/2-Ce/2,Ge=Oe/2-ye[xe]/2-1,qe=min(be[ge],Ge),Je=min(be[ie],Ge),We=qe,Ke=Oe-ye[xe]-Je,Ue=Oe/2-ye[xe]/2+Re,Ye=clamp(We,Ue,Ke),De=!U.arrow&&getAlignment(V)!=null&&Ue!==Ye&&N.reference[xe]/2-(Ue<We?qe:Je)-ye[xe]/2<0,Ie=De?Ue<We?Ue-We:Ue-Ke:0;return{[Se]:se[Se]+Ie,data:{[Se]:Ye,centerOffset:Ue-Ye-Ie,...De&&{alignmentOffset:Ie}},reset:De}}});function getPlacementList(e,t,M){return(e?[...M.filter(V=>getAlignment(V)===e),...M.filter(V=>getAlignment(V)!==e)]:M.filter(V=>getSide(V)===V)).filter(V=>e?getAlignment(V)===e||(t?getOppositeAlignmentPlacement(V)!==V:!1):!0)}const autoPlacement=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var M,I,V;const{rects:N,middlewareData:j,placement:J,platform:U,elements:ne}=t,{crossAxis:ve=!1,alignment:be,allowedPlacements:se=placements,autoAlignment:Se=!0,...xe}=evaluate(e,t),ye=be!==void 0||se===placements?getPlacementList(be||null,Se,se):se,Me=await detectOverflow(t,xe),ge=((M=j.autoPlacement)==null?void 0:M.index)||0,ie=ye[ge];if(ie==null)return{};const ke=getAlignmentSides(ie,N,await(U.isRTL==null?void 0:U.isRTL(ne.floating)));if(J!==ie)return{reset:{placement:ye[0]}};const Ee=[Me[getSide(ie)],Me[ke[0]],Me[ke[1]]],Ce=[...((I=j.autoPlacement)==null?void 0:I.overflows)||[],{placement:ie,overflows:Ee}],Le=ye[ge+1];if(Le)return{data:{index:ge+1,overflows:Ce},reset:{placement:Le}};const Oe=Ce.map(qe=>{const Je=getAlignment(qe.placement);return[qe.placement,Je&&ve?qe.overflows.slice(0,2).reduce((We,Ke)=>We+Ke,0):qe.overflows[0],qe.overflows]}).sort((qe,Je)=>qe[1]-Je[1]),Ge=((V=Oe.filter(qe=>qe[2].slice(0,getAlignment(qe[0])?2:3).every(Je=>Je<=0))[0])==null?void 0:V[0])||Oe[0][0];return Ge!==J?{data:{index:ge+1,overflows:Ce},reset:{placement:Ge}}:{}}}},flip=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var M,I;const{placement:V,middlewareData:N,rects:j,initialPlacement:J,platform:U,elements:ne}=t,{mainAxis:ve=!0,crossAxis:be=!0,fallbackPlacements:se,fallbackStrategy:Se="bestFit",fallbackAxisSideDirection:xe="none",flipAlignment:ye=!0,...Me}=evaluate(e,t);if((M=N.arrow)!=null&&M.alignmentOffset)return{};const ge=getSide(V),ie=getSideAxis(J),ke=getSide(J)===J,Ee=await(U.isRTL==null?void 0:U.isRTL(ne.floating)),Ce=se||(ke||!ye?[getOppositePlacement(J)]:getExpandedPlacements(J)),Le=xe!=="none";!se&&Le&&Ce.push(...getOppositeAxisPlacements(J,ye,xe,Ee));const Oe=[J,...Ce],Re=await detectOverflow(t,Me),Ge=[];let qe=((I=N.flip)==null?void 0:I.overflows)||[];if(ve&&Ge.push(Re[ge]),be){const Ue=getAlignmentSides(V,j,Ee);Ge.push(Re[Ue[0]],Re[Ue[1]])}if(qe=[...qe,{placement:V,overflows:Ge}],!Ge.every(Ue=>Ue<=0)){var Je,We;const Ue=(((Je=N.flip)==null?void 0:Je.index)||0)+1,Ye=Oe[Ue];if(Ye)return{data:{index:Ue,overflows:qe},reset:{placement:Ye}};let De=(We=qe.filter(Ie=>Ie.overflows[0]<=0).sort((Ie,we)=>Ie.overflows[1]-we.overflows[1])[0])==null?void 0:We.placement;if(!De)switch(Se){case"bestFit":{var Ke;const Ie=(Ke=qe.filter(we=>{if(Le){const Fe=getSideAxis(we.placement);return Fe===ie||Fe==="y"}return!0}).map(we=>[we.placement,we.overflows.filter(Fe=>Fe>0).reduce((Fe,je)=>Fe+je,0)]).sort((we,Fe)=>we[1]-Fe[1])[0])==null?void 0:Ke[0];Ie&&(De=Ie);break}case"initialPlacement":De=J;break}if(V!==De)return{reset:{placement:De}}}return{}}}};async function convertValueToCoords(e,t){const{placement:M,platform:I,elements:V}=e,N=await(I.isRTL==null?void 0:I.isRTL(V.floating)),j=getSide(M),J=getAlignment(M),U=getSideAxis(M)==="y",ne=["left","top"].includes(j)?-1:1,ve=N&&U?-1:1,be=evaluate(t,e);let{mainAxis:se,crossAxis:Se,alignmentAxis:xe}=typeof be=="number"?{mainAxis:be,crossAxis:0,alignmentAxis:null}:{mainAxis:be.mainAxis||0,crossAxis:be.crossAxis||0,alignmentAxis:be.alignmentAxis};return J&&typeof xe=="number"&&(Se=J==="end"?xe*-1:xe),U?{x:Se*ve,y:se*ne}:{x:se*ne,y:Se*ve}}const offset=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var M,I;const{x:V,y:N,placement:j,middlewareData:J}=t,U=await convertValueToCoords(t,e);return j===((M=J.offset)==null?void 0:M.placement)&&(I=J.arrow)!=null&&I.alignmentOffset?{}:{x:V+U.x,y:N+U.y,data:{...U,placement:j}}}}},shift=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:M,y:I,placement:V}=t,{mainAxis:N=!0,crossAxis:j=!1,limiter:J={fn:Me=>{let{x:ge,y:ie}=Me;return{x:ge,y:ie}}},...U}=evaluate(e,t),ne={x:M,y:I},ve=await detectOverflow(t,U),be=getSideAxis(getSide(V)),se=getOppositeAxis(be);let Se=ne[se],xe=ne[be];if(N){const Me=se==="y"?"top":"left",ge=se==="y"?"bottom":"right",ie=Se+ve[Me],ke=Se-ve[ge];Se=clamp(ie,Se,ke)}if(j){const Me=be==="y"?"top":"left",ge=be==="y"?"bottom":"right",ie=xe+ve[Me],ke=xe-ve[ge];xe=clamp(ie,xe,ke)}const ye=J.fn({...t,[se]:Se,[be]:xe});return{...ye,data:{x:ye.x-M,y:ye.y-I,enabled:{[se]:N,[be]:j}}}}}},size=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var M,I;const{placement:V,rects:N,platform:j,elements:J}=t,{apply:U=()=>{},...ne}=evaluate(e,t),ve=await detectOverflow(t,ne),be=getSide(V),se=getAlignment(V),Se=getSideAxis(V)==="y",{width:xe,height:ye}=N.floating;let Me,ge;be==="top"||be==="bottom"?(Me=be,ge=se===(await(j.isRTL==null?void 0:j.isRTL(J.floating))?"start":"end")?"left":"right"):(ge=be,Me=se==="end"?"top":"bottom");const ie=ye-ve.top-ve.bottom,ke=xe-ve.left-ve.right,Ee=min(ye-ve[Me],ie),Ce=min(xe-ve[ge],ke),Le=!t.middlewareData.shift;let Oe=Ee,Re=Ce;if((M=t.middlewareData.shift)!=null&&M.enabled.x&&(Re=ke),(I=t.middlewareData.shift)!=null&&I.enabled.y&&(Oe=ie),Le&&!se){const qe=max(ve.left,0),Je=max(ve.right,0),We=max(ve.top,0),Ke=max(ve.bottom,0);Se?Re=xe-2*(qe!==0||Je!==0?qe+Je:max(ve.left,ve.right)):Oe=ye-2*(We!==0||Ke!==0?We+Ke:max(ve.top,ve.bottom))}await U({...t,availableWidth:Re,availableHeight:Oe});const Ge=await j.getDimensions(J.floating);return xe!==Ge.width||ye!==Ge.height?{reset:{rects:!0}}:{}}}};function n$1(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function o(e){return n$1(e).getComputedStyle(e)}const i=Math.min,r=Math.max,l=Math.round;function c$1(e){const t=o(e);let M=parseFloat(t.width),I=parseFloat(t.height);const V=e.offsetWidth,N=e.offsetHeight,j=l(M)!==V||l(I)!==N;return j&&(M=V,I=N),{width:M,height:I,fallback:j}}function s(e){return h$2(e)?(e.nodeName||"").toLowerCase():""}let f;function u(){if(f)return f;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(f=e.brands.map(t=>t.brand+"/"+t.version).join(" "),f):navigator.userAgent}function a(e){return e instanceof n$1(e).HTMLElement}function d$1(e){return e instanceof n$1(e).Element}function h$2(e){return e instanceof n$1(e).Node}function p(e){return typeof ShadowRoot>"u"?!1:e instanceof n$1(e).ShadowRoot||e instanceof ShadowRoot}function g$1(e){const{overflow:t,overflowX:M,overflowY:I,display:V}=o(e);return/auto|scroll|overlay|hidden|clip/.test(t+I+M)&&!["inline","contents"].includes(V)}function m$1(e){return["table","td","th"].includes(s(e))}function y$1(e){const t=/firefox/i.test(u()),M=o(e),I=M.backdropFilter||M.WebkitBackdropFilter;return M.transform!=="none"||M.perspective!=="none"||!!I&&I!=="none"||t&&M.willChange==="filter"||t&&!!M.filter&&M.filter!=="none"||["transform","perspective"].some(V=>M.willChange.includes(V))||["paint","layout","strict","content"].some(V=>{const N=M.contain;return N!=null&&N.includes(V)})}function x$1(){return!/^((?!chrome|android).)*safari/i.test(u())}function w$1(e){return["html","body","#document"].includes(s(e))}function v$1(e){return d$1(e)?e:e.contextElement}const b$1={x:1,y:1};function L(e){const t=v$1(e);if(!a(t))return b$1;const M=t.getBoundingClientRect(),{width:I,height:V,fallback:N}=c$1(t);let j=(N?l(M.width):M.width)/I,J=(N?l(M.height):M.height)/V;return j&&Number.isFinite(j)||(j=1),J&&Number.isFinite(J)||(J=1),{x:j,y:J}}function E$1(e,t,M,I){var V,N;t===void 0&&(t=!1),M===void 0&&(M=!1);const j=e.getBoundingClientRect(),J=v$1(e);let U=b$1;t&&(I?d$1(I)&&(U=L(I)):U=L(e));const ne=J?n$1(J):window,ve=!x$1()&&M;let be=(j.left+(ve&&((V=ne.visualViewport)==null?void 0:V.offsetLeft)||0))/U.x,se=(j.top+(ve&&((N=ne.visualViewport)==null?void 0:N.offsetTop)||0))/U.y,Se=j.width/U.x,xe=j.height/U.y;if(J){const ye=n$1(J),Me=I&&d$1(I)?n$1(I):I;let ge=ye.frameElement;for(;ge&&I&&Me!==ye;){const ie=L(ge),ke=ge.getBoundingClientRect(),Ee=getComputedStyle(ge);ke.x+=(ge.clientLeft+parseFloat(Ee.paddingLeft))*ie.x,ke.y+=(ge.clientTop+parseFloat(Ee.paddingTop))*ie.y,be*=ie.x,se*=ie.y,Se*=ie.x,xe*=ie.y,be+=ke.x,se+=ke.y,ge=n$1(ge).frameElement}}return{width:Se,height:xe,top:se,right:be+Se,bottom:se+xe,left:be,x:be,y:se}}function R(e){return((h$2(e)?e.ownerDocument:e.document)||window.document).documentElement}function T(e){return d$1(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function C$1(e){return E$1(R(e)).left+T(e).scrollLeft}function F(e){if(s(e)==="html")return e;const t=e.assignedSlot||e.parentNode||p(e)&&e.host||R(e);return p(t)?t.host:t}function W(e){const t=F(e);return w$1(t)?t.ownerDocument.body:a(t)&&g$1(t)?t:W(t)}function D(e,t){var M;t===void 0&&(t=[]);const I=W(e),V=I===((M=e.ownerDocument)==null?void 0:M.body),N=n$1(I);return V?t.concat(N,N.visualViewport||[],g$1(I)?I:[]):t.concat(I,D(I))}function S$1(e,t,M){return t==="viewport"?rectToClientRect(function(I,V){const N=n$1(I),j=R(I),J=N.visualViewport;let U=j.clientWidth,ne=j.clientHeight,ve=0,be=0;if(J){U=J.width,ne=J.height;const se=x$1();(se||!se&&V==="fixed")&&(ve=J.offsetLeft,be=J.offsetTop)}return{width:U,height:ne,x:ve,y:be}}(e,M)):d$1(t)?rectToClientRect(function(I,V){const N=E$1(I,!0,V==="fixed"),j=N.top+I.clientTop,J=N.left+I.clientLeft,U=a(I)?L(I):{x:1,y:1};return{width:I.clientWidth*U.x,height:I.clientHeight*U.y,x:J*U.x,y:j*U.y}}(t,M)):rectToClientRect(function(I){const V=R(I),N=T(I),j=I.ownerDocument.body,J=r(V.scrollWidth,V.clientWidth,j.scrollWidth,j.clientWidth),U=r(V.scrollHeight,V.clientHeight,j.scrollHeight,j.clientHeight);let ne=-N.scrollLeft+C$1(I);const ve=-N.scrollTop;return o(j).direction==="rtl"&&(ne+=r(V.clientWidth,j.clientWidth)-J),{width:J,height:U,x:ne,y:ve}}(R(e)))}function A(e){return a(e)&&o(e).position!=="fixed"?e.offsetParent:null}function H(e){const t=n$1(e);let M=A(e);for(;M&&m$1(M)&&o(M).position==="static";)M=A(M);return M&&(s(M)==="html"||s(M)==="body"&&o(M).position==="static"&&!y$1(M))?t:M||function(I){let V=F(I);for(;a(V)&&!w$1(V);){if(y$1(V))return V;V=F(V)}return null}(e)||t}function O(e,t,M){const I=a(t),V=R(t),N=E$1(e,!0,M==="fixed",t);let j={scrollLeft:0,scrollTop:0};const J={x:0,y:0};if(I||!I&&M!=="fixed")if((s(t)!=="body"||g$1(V))&&(j=T(t)),a(t)){const U=E$1(t,!0);J.x=U.x+t.clientLeft,J.y=U.y+t.clientTop}else V&&(J.x=C$1(V));return{x:N.left+j.scrollLeft-J.x,y:N.top+j.scrollTop-J.y,width:N.width,height:N.height}}const P={getClippingRect:function(e){let{element:t,boundary:M,rootBoundary:I,strategy:V}=e;const N=M==="clippingAncestors"?function(ne,ve){const be=ve.get(ne);if(be)return be;let se=D(ne).filter(Me=>d$1(Me)&&s(Me)!=="body"),Se=null;const xe=o(ne).position==="fixed";let ye=xe?F(ne):ne;for(;d$1(ye)&&!w$1(ye);){const Me=o(ye),ge=y$1(ye);(xe?ge||Se:ge||Me.position!=="static"||!Se||!["absolute","fixed"].includes(Se.position))?Se=Me:se=se.filter(ie=>ie!==ye),ye=F(ye)}return ve.set(ne,se),se}(t,this._c):[].concat(M),j=[...N,I],J=j[0],U=j.reduce((ne,ve)=>{const be=S$1(t,ve,V);return ne.top=r(be.top,ne.top),ne.right=i(be.right,ne.right),ne.bottom=i(be.bottom,ne.bottom),ne.left=r(be.left,ne.left),ne},S$1(t,J,V));return{width:U.right-U.left,height:U.bottom-U.top,x:U.left,y:U.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:M,strategy:I}=e;const V=a(M),N=R(M);if(M===N)return t;let j={scrollLeft:0,scrollTop:0},J={x:1,y:1};const U={x:0,y:0};if((V||!V&&I!=="fixed")&&((s(M)!=="body"||g$1(N))&&(j=T(M)),a(M))){const ne=E$1(M);J=L(M),U.x=ne.x+M.clientLeft,U.y=ne.y+M.clientTop}return{width:t.width*J.x,height:t.height*J.y,x:t.x*J.x-j.scrollLeft*J.x+U.x,y:t.y*J.y-j.scrollTop*J.y+U.y}},isElement:d$1,getDimensions:function(e){return a(e)?c$1(e):e.getBoundingClientRect()},getOffsetParent:H,getDocumentElement:R,getScale:L,async getElementRects(e){let{reference:t,floating:M,strategy:I}=e;const V=this.getOffsetParent||H,N=this.getDimensions;return{reference:O(t,await V(M),I),floating:{x:0,y:0,...await N(M)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>o(e).direction==="rtl"},B$1=(e,t,M)=>{const I=new Map,V={platform:P,...M},N={...V.platform,_c:I};return computePosition(e,t,{...V,platform:N})},h$1={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:e=>[...e,"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 S(e,t){let M=h$1.themes[e]||{},I;do I=M[t],typeof I>"u"?M.$extend?M=h$1.themes[M.$extend]||{}:(M=null,I=h$1[t]):M=null;while(M);return I}function Ze(e){const t=[e];let M=h$1.themes[e]||{};do M.$extend&&!M.$resetCss?(t.push(M.$extend),M=h$1.themes[M.$extend]||{}):M=null;while(M);return t.map(I=>`v-popper--theme-${I}`)}function re(e){const t=[e];let M=h$1.themes[e]||{};do M.$extend?(t.push(M.$extend),M=h$1.themes[M.$extend]||{}):M=null;while(M);return t}let $=!1;if(typeof window<"u"){$=!1;try{const e=Object.defineProperty({},"passive",{get(){$=!0}});window.addEventListener("test",null,e)}catch{}}let _e=!1;typeof window<"u"&&typeof navigator<"u"&&(_e=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const Te=["auto","top","bottom","left","right"].reduce((e,t)=>e.concat([t,`${t}-start`,`${t}-end`]),[]),pe={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},ae={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function de(e,t){const M=e.indexOf(t);M!==-1&&e.splice(M,1)}function G(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}const d=[];let g=null;const le={};function he(e){let t=le[e];return t||(t=le[e]=[]),t}let Y=function(){};typeof window<"u"&&(Y=window.Element);function n(e){return function(t){return S(t.theme,e)}}const q="__floating-vue__popper",Q=()=>defineComponent({name:"VPopper",provide(){return{[q]:{parentPopper:this}}},inject:{[q]:{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:n("disabled")},positioningDisabled:{type:Boolean,default:n("positioningDisabled")},placement:{type:String,default:n("placement"),validator:e=>Te.includes(e)},delay:{type:[String,Number,Object],default:n("delay")},distance:{type:[Number,String],default:n("distance")},skidding:{type:[Number,String],default:n("skidding")},triggers:{type:Array,default:n("triggers")},showTriggers:{type:[Array,Function],default:n("showTriggers")},hideTriggers:{type:[Array,Function],default:n("hideTriggers")},popperTriggers:{type:Array,default:n("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:n("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:n("popperHideTriggers")},container:{type:[String,Object,Y,Boolean],default:n("container")},boundary:{type:[String,Y],default:n("boundary")},strategy:{type:String,validator:e=>["absolute","fixed"].includes(e),default:n("strategy")},autoHide:{type:[Boolean,Function],default:n("autoHide")},handleResize:{type:Boolean,default:n("handleResize")},instantMove:{type:Boolean,default:n("instantMove")},eagerMount:{type:Boolean,default:n("eagerMount")},popperClass:{type:[String,Array,Object],default:n("popperClass")},computeTransformOrigin:{type:Boolean,default:n("computeTransformOrigin")},autoMinSize:{type:Boolean,default:n("autoMinSize")},autoSize:{type:[Boolean,String],default:n("autoSize")},autoMaxSize:{type:Boolean,default:n("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:n("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:n("preventOverflow")},overflowPadding:{type:[Number,String],default:n("overflowPadding")},arrowPadding:{type:[Number,String],default:n("arrowPadding")},arrowOverflow:{type:Boolean,default:n("arrowOverflow")},flip:{type:Boolean,default:n("flip")},shift:{type:Boolean,default:n("shift")},shiftCrossAxis:{type:Boolean,default:n("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:n("noAutoFocus")},disposeTimeout:{type:Number,default:n("disposeTimeout")}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!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(e=>e.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 e;return(e=this[q])==null?void 0:e.parentPopper},hasPopperShowTriggerHover(){var e,t;return((e=this.popperTriggers)==null?void 0:e.includes("hover"))||((t=this.popperShowTriggers)==null?void 0:t.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(e){e?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((e,t)=>(e[t]="$_computePosition",e),{})},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:e=null,skipDelay:t=!1,force:M=!1}={}){var I,V;(I=this.parentPopper)!=null&&I.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(M||!this.disabled)&&(((V=this.parentPopper)==null?void 0:V.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,t),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:e=null,skipDelay:t=!1}={}){var M;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:t}),this.parentPopper.lockedChild=null)},1e3));return}((M=this.parentPopper)==null?void 0:M.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(e,t),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var e;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=((e=this.referenceNode)==null?void 0:e.call(this))??this.$el,this.$_targetNodes=this.targetNodes().filter(t=>t.nodeType===t.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 e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(offset({mainAxis:this.distance,crossAxis:this.skidding}));const t=this.placement.startsWith("auto");if(t?e.middleware.push(autoPlacement({alignment:this.placement.split("-")[1]??""})):e.placement=this.placement,this.preventOverflow&&(this.shift&&e.middleware.push(shift({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!t&&this.flip&&e.middleware.push(flip({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push(arrow({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:"arrowOverflow",fn:({placement:I,rects:V,middlewareData:N})=>{let j;const{centerOffset:J}=N.arrow;return I.startsWith("top")||I.startsWith("bottom")?j=Math.abs(J)>V.reference.width/2:j=Math.abs(J)>V.reference.height/2,{data:{overflow:j}}}}),this.autoMinSize||this.autoSize){const I=this.autoSize?this.autoSize:this.autoMinSize?"min":null;e.middleware.push({name:"autoSize",fn:({rects:V,placement:N,middlewareData:j})=>{var J;if((J=j.autoSize)!=null&&J.skip)return{};let U,ne;return N.startsWith("top")||N.startsWith("bottom")?U=V.reference.width:ne=V.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"]=ne!=null?`${ne}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push(size({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:I,availableHeight:V})=>{this.$_innerNode.style.maxWidth=I!=null?`${I}px`:null,this.$_innerNode.style.maxHeight=V!=null?`${V}px`:null}})));const M=await B$1(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:M.x,y:M.y,placement:M.placement,strategy:M.strategy,arrow:{...M.middlewareData.arrow,...M.middlewareData.arrowOverflow}})},$_scheduleShow(e,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),g&&this.instantMove&&g.instantMove&&g!==this.parentPopper){g.$_applyHide(!0),this.$_applyShow(!0);return}t?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(e,t=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(g=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(e){const t=this.delay;return parseInt(t&&t[e]||t||0)},async $_applyShow(e=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await G(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...D(this.$_referenceNode),...D(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const t=this.$_referenceNode.getBoundingClientRect(),M=this.$_popperNode.querySelector(".v-popper__wrapper"),I=M.parentNode.getBoundingClientRect(),V=t.x+t.width/2-(I.left+M.offsetLeft),N=t.y+t.height/2-(I.top+M.offsetTop);this.result.transformOrigin=`${V}px ${N}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const e=this.showGroup;if(e){let t;for(let M=0;M<d.length;M++)t=d[M],t.showGroup!==e&&(t.hide(),t.$emit("close-group"))}d.push(this),document.body.classList.add("v-popper--some-open");for(const t of re(this.theme))he(t).push(this),document.body.classList.add(`v-popper--some-open--${t}`);this.$emit("apply-show"),this.classes.showFrom=!0,this.classes.showTo=!1,this.classes.hideFrom=!1,this.classes.hideTo=!1,await G(),this.classes.showFrom=!1,this.classes.showTo=!0,this.noAutoFocus||this.$_popperNode.focus()},async $_applyHide(e=!1){if(this.shownChildren.size>0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,de(d,this),d.length===0&&document.body.classList.remove("v-popper--some-open");for(const M of re(this.theme)){const I=he(M);de(I,this),I.length===0&&document.body.classList.remove(`v-popper--some-open--${M}`)}g===this&&(g=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const t=this.disposeTimeout;t!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},t)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await G(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let e=this.container;if(typeof e=="string"?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw new Error("No container for popover: "+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const e=M=>{this.isShown&&!this.$_hideInProgress||(M.usedByTooltip=!0,!this.$_preventShow&&this.show({event:M}))};this.$_registerTriggerListeners(this.$_targetNodes,pe,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],pe,this.popperTriggers,this.popperShowTriggers,e);const t=M=>{M.usedByTooltip||this.hide({event:M})};this.$_registerTriggerListeners(this.$_targetNodes,ae,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],ae,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e,t,M){this.$_events.push({targetNodes:e,eventType:t,handler:M}),e.forEach(I=>I.addEventListener(t,M,$?{passive:!0}:void 0))},$_registerTriggerListeners(e,t,M,I,V){let N=M;I!=null&&(N=typeof I=="function"?I(N):I),N.forEach(j=>{const J=t[j];J&&this.$_registerEventListeners(e,J,V)})},$_removeEventListeners(e){const t=[];this.$_events.forEach(M=>{const{targetNodes:I,eventType:V,handler:N}=M;!e||e===V?I.forEach(j=>j.removeEventListener(V,N)):t.push(M)}),this.$_events=t},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,t=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),t&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,t){for(const M of this.$_targetNodes){const I=M.getAttribute(e);I&&(M.removeAttribute(e),M.setAttribute(t,I))}},$_applyAttrsToTarget(e){for(const t of this.$_targetNodes)for(const M in e){const I=e[M];I==null?t.removeAttribute(M):t.setAttribute(M,I)}},$_updateParentShownChildren(e){let t=this.parentPopper;for(;t;)e?t.shownChildren.add(this.randomId):(t.shownChildren.delete(this.randomId),t.pendingHide&&t.hide()),t=t.parentPopper},$_isAimingPopper(){const e=this.$_referenceNode.getBoundingClientRect();if(y>=e.left&&y<=e.right&&_>=e.top&&_<=e.bottom){const t=this.$_popperNode.getBoundingClientRect(),M=y-c,I=_-m,V=t.left+t.width/2-c+(t.top+t.height/2)-m+t.width+t.height,N=c+M*V,j=m+I*V;return C(c,m,N,j,t.left,t.top,t.left,t.bottom)||C(c,m,N,j,t.left,t.top,t.right,t.top)||C(c,m,N,j,t.right,t.top,t.right,t.bottom)||C(c,m,N,j,t.left,t.bottom,t.right,t.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<"u"&&typeof window<"u"){if(_e){const e=$?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",t=>ue(t),e),document.addEventListener("touchend",t=>fe(t,!0),e)}else window.addEventListener("mousedown",e=>ue(e),!0),window.addEventListener("click",e=>fe(e,!1),!0);window.addEventListener("resize",tt)}function ue(e,t){for(let M=0;M<d.length;M++){const I=d[M];try{I.mouseDownContains=I.popperNode().contains(e.target)}catch{}}}function fe(e,t){Pe(e,t)}function Pe(e,t){const M={};for(let I=d.length-1;I>=0;I--){const V=d[I];try{const N=V.containsGlobalTarget=V.mouseDownContains||V.popperNode().contains(e.target);V.pendingHide=!1,requestAnimationFrame(()=>{if(V.pendingHide=!1,!M[V.randomId]&&ce(V,N,e)){if(V.$_handleGlobalClose(e,t),!e.closeAllPopover&&e.closePopover&&N){let J=V.parentPopper;for(;J;)M[J.randomId]=!0,J=J.parentPopper;return}let j=V.parentPopper;for(;j&&ce(j,j.containsGlobalTarget,e);)j.$_handleGlobalClose(e,t),j=j.parentPopper}})}catch{}}}function ce(e,t,M){return M.closeAllPopover||M.closePopover&&t||et(e,M)&&!t}function et(e,t){if(typeof e.autoHide=="function"){const M=e.autoHide(t);return e.lastAutoHide=M,M}return e.autoHide}function tt(){for(let e=0;e<d.length;e++)d[e].$_computePosition()}let c=0,m=0,y=0,_=0;typeof window<"u"&&window.addEventListener("mousemove",e=>{c=y,m=_,y=e.clientX,_=e.clientY},$?{passive:!0}:void 0);function C(e,t,M,I,V,N,j,J){const U=((j-V)*(t-N)-(J-N)*(e-V))/((J-N)*(M-e)-(j-V)*(I-t)),ne=((M-e)*(t-N)-(I-t)*(e-V))/((J-N)*(M-e)-(j-V)*(I-t));return U>=0&&U<=1&&ne>=0&&ne<=1}const ot={extends:Q()},B=(e,t)=>{const M=e.__vccOpts||e;for(const[I,V]of t)M[I]=V;return M};function it(e,t,M,I,V,N){return openBlock(),createElementBlock("div",{ref:"reference",class:normalizeClass(["v-popper",{"v-popper--shown":e.slotData.isShown}])},[renderSlot(e.$slots,"default",normalizeProps(guardReactiveProps(e.slotData)))],2)}const st=B(ot,[["render",it]]);function nt(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var M=e.indexOf("Trident/");if(M>0){var I=e.indexOf("rv:");return parseInt(e.substring(I+3,e.indexOf(".",I)),10)}var V=e.indexOf("Edge/");return V>0?parseInt(e.substring(V+5,e.indexOf(".",V)),10):-1}let z;function X(){X.init||(X.init=!0,z=nt()!==-1)}var E={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){X(),nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",z&&this.$el.appendChild(e),e.data="about:blank",z||this.$el.appendChild(e)},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&&(!z&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const rt=withScopeId();pushScopeId("data-v-b329ee4c");const pt={class:"resize-observer",tabindex:"-1"};popScopeId();const at=rt((e,t,M,I,V,N)=>(openBlock(),createBlock("div",pt)));E.render=at;E.__scopeId="data-v-b329ee4c";E.__file="src/components/ResizeObserver.vue";const Z=(e="theme")=>({computed:{themeClass(){return Ze(this[e])}}}),dt=defineComponent({name:"VPopperContent",components:{ResizeObserver:E},mixins:[Z()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(e){return e!=null&&!isNaN(e)?`${e}px`:null}}}),lt=["id","aria-hidden","tabindex","data-popper-placement"],ht={ref:"inner",class:"v-popper__inner"},ut=createBaseVNode("div",{class:"v-popper__arrow-outer"},null,-1),ft=createBaseVNode("div",{class:"v-popper__arrow-inner"},null,-1),ct=[ut,ft];function mt(e,t,M,I,V,N){const j=resolveComponent("ResizeObserver");return openBlock(),createElementBlock("div",{id:e.popperId,ref:"popover",class:normalizeClass(["v-popper__popper",[e.themeClass,e.classes.popperClass,{"v-popper__popper--shown":e.shown,"v-popper__popper--hidden":!e.shown,"v-popper__popper--show-from":e.classes.showFrom,"v-popper__popper--show-to":e.classes.showTo,"v-popper__popper--hide-from":e.classes.hideFrom,"v-popper__popper--hide-to":e.classes.hideTo,"v-popper__popper--skip-transition":e.skipTransition,"v-popper__popper--arrow-overflow":e.result&&e.result.arrow.overflow,"v-popper__popper--no-positioning":!e.result}]]),style:normalizeStyle(e.result?{position:e.result.strategy,transform:`translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`}:void 0),"aria-hidden":e.shown?"false":"true",tabindex:e.autoHide?0:void 0,"data-popper-placement":e.result?e.result.placement:void 0,onKeyup:t[2]||(t[2]=withKeys(J=>e.autoHide&&e.$emit("hide"),["esc"]))},[createBaseVNode("div",{class:"v-popper__backdrop",onClick:t[0]||(t[0]=J=>e.autoHide&&e.$emit("hide"))}),createBaseVNode("div",{class:"v-popper__wrapper",style:normalizeStyle(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[createBaseVNode("div",ht,[e.mounted?(openBlock(),createElementBlock(Fragment,{key:0},[createBaseVNode("div",null,[renderSlot(e.$slots,"default")]),e.handleResize?(openBlock(),createBlock(j,{key:0,onNotify:t[1]||(t[1]=J=>e.$emit("resize",J))})):createCommentVNode("",!0)],64)):createCommentVNode("",!0)],512),createBaseVNode("div",{ref:"arrow",class:"v-popper__arrow-container",style:normalizeStyle(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},ct,4)],4)],46,lt)}const ee=B(dt,[["render",mt]]),te={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}};let K=function(){};typeof window<"u"&&(K=window.Element);const gt=defineComponent({name:"VPopperWrapper",components:{Popper:st,PopperContent:ee},mixins:[te,Z("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,K,Boolean],default:void 0},boundary:{type:[String,K],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":e=>!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(e=>e!==this.$refs.popperContent.$el)}}});function wt(e,t,M,I,V,N){const j=resolveComponent("PopperContent"),J=resolveComponent("Popper");return openBlock(),createBlock(J,mergeProps({ref:"popper"},e.$props,{theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:[e.themeClass],onShow:t[0]||(t[0]=()=>e.$emit("show")),onHide:t[1]||(t[1]=()=>e.$emit("hide")),"onUpdate:shown":t[2]||(t[2]=U=>e.$emit("update:shown",U)),onApplyShow:t[3]||(t[3]=()=>e.$emit("apply-show")),onApplyHide:t[4]||(t[4]=()=>e.$emit("apply-hide")),onCloseGroup:t[5]||(t[5]=()=>e.$emit("close-group")),onCloseDirective:t[6]||(t[6]=()=>e.$emit("close-directive")),onAutoHide:t[7]||(t[7]=()=>e.$emit("auto-hide")),onResize:t[8]||(t[8]=()=>e.$emit("resize"))}),{default:withCtx(({popperId:U,isShown:ne,shouldMountContent:ve,skipTransition:be,autoHide:se,show:Se,hide:xe,handleResize:ye,onResize:Me,classes:ge,result:ie})=>[renderSlot(e.$slots,"default",{shown:ne,show:Se,hide:xe}),createVNode(j,{ref:"popperContent","popper-id":U,theme:e.finalTheme,shown:ne,mounted:ve,"skip-transition":be,"auto-hide":se,"handle-resize":ye,classes:ge,result:ie,onHide:xe,onResize:Me},{default:withCtx(()=>[renderSlot(e.$slots,"popper",{shown:ne,hide:xe})]),_: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 k=B(gt,[["render",wt]]);({...k});({...k});({...k});const $t=defineComponent({name:"VTooltipDirective",components:{Popper:Q(),PopperContent:ee},mixins:[te],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:e=>S(e.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>S(e.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(e){if(typeof this.content=="function"&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const t=++this.$_fetchId,M=this.content(this);M.then?M.then(I=>this.onResult(t,I)):this.onResult(t,M)}},onResult(e,t){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),vt=["innerHTML"],yt=["textContent"];function _t(e,t,M,I,V,N){const j=resolveComponent("PopperContent"),J=resolveComponent("Popper");return openBlock(),createBlock(J,mergeProps({ref:"popper"},e.$attrs,{theme:e.theme,"target-nodes":e.targetNodes,"popper-node":()=>e.$refs.popperContent.$el,onApplyShow:e.onShow,onApplyHide:e.onHide}),{default:withCtx(({popperId:U,isShown:ne,shouldMountContent:ve,skipTransition:be,autoHide:se,hide:Se,handleResize:xe,onResize:ye,classes:Me,result:ge})=>[createVNode(j,{ref:"popperContent",class:normalizeClass({"v-popper--tooltip-loading":e.loading}),"popper-id":U,theme:e.theme,shown:ne,mounted:ve,"skip-transition":be,"auto-hide":se,"handle-resize":xe,classes:Me,result:ge,onHide:Se,onResize:ye},{default:withCtx(()=>[e.html?(openBlock(),createElementBlock("div",{key:0,innerHTML:e.finalContent},null,8,vt)):(openBlock(),createElementBlock("div",{key:1,textContent:toDisplayString(e.finalContent)},null,8,yt))]),_: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 ze=B($t,[["render",_t]]),Ae="v-popper--has-tooltip";function Tt(e,t){let M=e.placement;if(!M&&t)for(const I of Te)t[I]&&(M=I);return M||(M=S(e.theme||"tooltip","placement")),M}function Ne(e,t,M){let I;const V=typeof t;return V==="string"?I={content:t}:t&&V==="object"?I=t:I={content:!1},I.placement=Tt(I,M),I.targetNodes=()=>[e],I.referenceNode=()=>e,I}let x,b,Pt=0;function St(){if(x)return;b=ref([]),x=createApp({name:"VTooltipDirectiveApp",setup(){return{directives:b}},render(){return this.directives.map(t=>h$3(ze,{...t.options,shown:t.shown||t.options.shown,key:t.id}))},devtools:{hide:!0}});const e=document.createElement("div");document.body.appendChild(e),x.mount(e)}function bt(e,t,M){St();const I=ref(Ne(e,t,M)),V=ref(!1),N={id:Pt++,options:I,shown:V};return b.value.push(N),e.classList&&e.classList.add(Ae),e.$_popper={options:I,item:N,show(){V.value=!0},hide(){V.value=!1}}}function He(e){if(e.$_popper){const t=b.value.indexOf(e.$_popper.item);t!==-1&&b.value.splice(t,1),delete e.$_popper,delete e.$_popperOldShown,delete e.$_popperMountTarget}e.classList&&e.classList.remove(Ae)}function me(e,{value:t,modifiers:M}){const I=Ne(e,t,M);if(!I.content||S(I.theme||"tooltip","disabled"))He(e);else{let V;e.$_popper?(V=e.$_popper,V.options.value=I):V=bt(e,t,M),typeof t.shown<"u"&&t.shown!==e.$_popperOldShown&&(e.$_popperOldShown=t.shown,t.shown?V.show():V.hide())}}const oe={beforeMount:me,updated:me,beforeUnmount(e){He(e)}},Mt=oe,_hoisted_1$1={style:{"margin-left":"auto"}},_sfc_main$f=defineComponent({__name:"ExpandableList.ce",props:mergeModels({title:{default:"",type:String},subtitle:{default:"",type:String},limit:{type:Number},template:{type:null}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=useModel(e,"modelValue"),M=e,I=ref([]),V=U=>(I.value[U]||(I.value[U]=useId()),I.value[U]),N=()=>{t.value=[...t.value,Clone(M.template)]},j=U=>{I.value.splice(U,1),t.value=[...t.value.splice(U,1)]},J=(U,ne)=>{const ve=I.value.splice(U,1)[0];I.value.splice(U+ne,0,ve);const be=[...t.value],se=be.splice(U,1)[0];be.splice(U+ne,0,se),t.value=be};return onMounted(()=>{t.value.length||N()}),(U,ne)=>(openBlock(),createBlock(unref(EV),{class:"expandable-list",title:U.title,subtitle:U.subtitle},{actions:withCtx(()=>[renderSlot(U.$slots,"actions",{},()=>[createBaseVNode("span",_hoisted_1$1,toDisplayString(t.value.length)+toDisplayString(U.limit?` / ${U.limit}`:"")+" "+toDisplayString(t.value.length>=2||U.limit?"felter":"felt"),1)])]),default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(t.value,(ve,be)=>(openBlock(),createElementBlock(Fragment,{key:V(be)},[createVNode(unref(zr),{justify:"end",gap:"4px"},{default:withCtx(()=>[withDirectives(createVNode(unref(Be),{size:"small",icon:"fa-pro-light:trash",disabled:t.value.length<=1,onClick:se=>j(be)},null,8,["disabled","onClick"]),[[unref(Mt),{content:"Fjern"}]]),withDirectives(createVNode(unref(Be),{size:"small",icon:"fa-pro-light:arrow-up",disabled:be===0,onClick:se=>J(be,-1)},null,8,["disabled","onClick"]),[[unref(Mt),{content:"Flytt opp"}]]),withDirectives(createVNode(unref(Be),{size:"small",icon:"fa-pro-light:arrow-down",disabled:be===t.value.length-1,onClick:se=>J(be,1)},null,8,["disabled","onClick"]),[[unref(Mt),{content:"Flytt ned"}]])]),_:2},1024),renderSlot(U.$slots,"default",{item:ve,index:be})],64))),128))]),footer:withCtx(()=>[withDirectives(createVNode(unref(Be),{variant:"tertiary",disabled:U.limit&&t.value.length>=U.limit,onClick:N,icon:"fa-pro-solid:plus",label:"Opprett nytt felt"},null,8,["disabled"]),[[unref(Mt),{content:"Maks antall felter lagt til",disabled:!(U.limit&&t.value.length>=U.limit)}]])]),_:3},8,["title","subtitle"]))}}),_style_0$a=".expandable-list .k-expandable__footer{--k-expandable-spacing: 0rem}.expandable-list .k-expandable__footer .k-button{width:100%;--k-button-tertiary-background: #eaeaea;padding:1rem}.expandable-list .k-expandable__footer .k-button__content{flex-direction:column}.expandable-list .k-expandable__footer .k-button__icon{padding:.5rem;color:#fff;background-color:var(--k-ui-color-primary);border-radius:var(--k-ui-rounding-full)}.expandable-list .k-expandable__footer .k-button__icon svg{height:1em;width:1em}",ExpandableList=_export_sfc(_sfc_main$f,[["styles",[_style_0$a]]]),_sfc_main$e=defineComponent({__name:"UnitLinks.ce",props:{modelValue:{type:Object},hasFields:{type:Function},hasField:{type:Function},getIsEditedIcon:{type:Function},isEdited:{type:Function}},emits:["update:modelValue"],setup(e,{expose:t,emit:M}){const I=e,V=M,N=ref(Clone(I.modelValue)),j=ref(),J=be=>hasDiff({value:N.value[be]},{value:I.modelValue[be]})||I.isEdited(be),U=(...be)=>I.getIsEditedIcon(J(...be)),ne=()=>{N.value=Clone(I.modelValue)},ve=()=>{V("update:modelValue",Clone(N.value))};return t({open:()=>{j.value.open()},close:()=>{j.value.close()}}),(be,se)=>(openBlock(),createBlock(unref(Th),{ref_key:"linkDialog",ref:j,variant:"prompt",title:"Tilpass enhetens nyttige lenker i Finn-annonsen",subtitle:"Lenker vil være synlig under kontakt informasjon på enhetsannonsen",teleport:!1,closeOnOutsideClick:!1},{trigger:withCtx(({triggerProps:Se})=>[createVNode(unref(Be),{style:{display:"none"}})]),default:withCtx(()=>[be.hasFields("MOREINFO")?(openBlock(),createBlock(ExpandableList,{key:0,title:"Nyttige lenker i Finn-annonsen",limit:4,template:{URL:"",URLTEXT:""},expanded:!0,modelValue:N.value.MOREINFO,"onUpdate:modelValue":se[0]||(se[0]=Se=>N.value.MOREINFO=Se)},{actions:withCtx(()=>[createVNode(unref(Ve),{icon:U("MOREINFO"),class:normalizeClass(["ad__expandable-list-field",{"ad__expandable-list-field--edited":J("MOREINFO")}])},null,8,["icon","class"])]),default:withCtx(({item:Se})=>[createVNode(unref(hV),{columns:"2"},{default:withCtx(()=>[createVNode(unref(GS),{label:"URL til nyttig lenke"},{default:withCtx(()=>[createVNode(unref(By),{modelValue:Se.URL,"onUpdate:modelValue":xe=>Se.URL=xe,suffix:"URL"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),createVNode(unref(GS),{label:"Visningsnavn på lenken på Finn-annonsen"},{default:withCtx(()=>[createVNode(unref(By),{modelValue:Se.URLTEXT,"onUpdate:modelValue":xe=>Se.URLTEXT=xe},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024)]),_:1},8,["modelValue"])):createCommentVNode("",!0)]),actions:withCtx(({close:Se})=>[createVNode(unref(Be),{label:"Avbryt",onClick:()=>{ne(),Se()},variant:"secondary"},null,8,["onClick"]),createVNode(unref(Be),{label:"Bekreft",onClick:()=>{ve(),Se()},variant:"primary"},null,8,["onClick"])]),_:1},512))}}),_sfc_main$d=defineComponent({__name:"RichTextMultiple.ce",props:mergeModels({expanded:{type:Boolean},title:{type:String},subtitle:{type:String}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=useModel(e,"modelValue");function M(N){const J=new DOMParser().parseFromString(N,"text/html"),U=[];return J.querySelectorAll("h3").forEach((ve,be)=>{const se=ve.textContent||"";let Se="",xe=ve.nextElementSibling;for(;xe&&xe.tagName!=="H3";)Se+=xe.outerHTML,xe=xe.nextElementSibling;U.push({title:se,content:Se})}),U}const I=computed({get:()=>M(t.value).map(N=>({title:N.title,content:N.content})),set:N=>{t.value=N.map(j=>`<h3>${j.title}</h3>${j.content}`).join("")}}),V=(N,j,J)=>{const U=I.value;U[j]&&(U[j]={...U[j],[J]:N}),t.value=U.map(({title:ne,content:ve})=>`<h3>${ne}</h3>${ve}`).join("")};return(N,j)=>(openBlock(),createBlock(ExpandableList,{expanded:N.expanded,title:N.title,subtitle:N.subtitle,template:{title:"",content:""},modelValue:I.value,"onUpdate:modelValue":j[0]||(j[0]=J=>I.value=J)},{actions:withCtx(()=>[renderSlot(N.$slots,"actions")]),default:withCtx(({item:J,index:U})=>[createVNode(unref(GS),{label:"Tittel"},{default:withCtx(()=>[createVNode(unref(By),{modelValue:J.title,"onUpdate:modelValue":ne=>V(ne,U,"title")},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),createVNode(unref(GS),{label:"Tekst"},{default:withCtx(()=>[createVNode(unref(xV),{actions:["bold","italic","orderedList","bulletList"],modelValue:J.content,"onUpdate:modelValue":ne=>V(ne,U,"content")},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:3},8,["expanded","title","subtitle","modelValue"]))}}),_sfc_main$c=defineComponent({__name:"UnitDescription.ce",props:{modelValue:{type:Object},hasFields:{type:Function},hasField:{type:Function},getIsEditedIcon:{type:Function},isEdited:{type:Function},rules:{type:Object},labels:{type:Object}},emits:["update:modelValue"],setup(e,{expose:t,emit:M}){const I=e,V=M,N=ref(Clone(I.modelValue)),j=ref(),J=Me=>{const ge=["HEADING"];return Object.fromEntries(Object.entries(Me).filter(([ie,ke])=>ge.includes(ie)))},U=computed(()=>J(I.rules)),ne=computed(()=>J(I.labels)),ve=JB({rules:U,labels:ne,data:N}),{bind:be}=ve,se=Me=>hasDiff({value:N.value[Me]},{value:I.modelValue[Me]})||I.isEdited(Me),Se=(...Me)=>I.getIsEditedIcon(se(...Me)),xe=()=>{N.value=Clone(I.modelValue)},ye=()=>{V("update:modelValue",Clone(N.value))};return t({open:()=>{j.value.open()},close:()=>j.value.close()}),(Me,ge)=>(openBlock(),createBlock(unref(Th),{variant:"prompt",title:"Rediger enhet",subtitle:"Rediger beskrivelser og bilder",teleport:!1,closeOnOutsideClick:!1,ref_key:"descriptionDialog",ref:j},{trigger:withCtx(({triggerProps:ie})=>[createVNode(unref(Be),mergeProps({style:{display:"none"}},ie),null,16)]),default:withCtx(()=>[createVNode(unref(zr),{direction:"column",gap:"2rem"},{default:withCtx(()=>[Me.hasFields("HEADING")?(openBlock(),createBlock(unref(EV),{key:0,expanded:!0,title:"Hovedtittel",subtitle:"Teksten som formuleres her vil bli synlig som hovedtittel på enhetsannonsen"},{default:withCtx(()=>[createVNode(unref(GS),mergeProps(unref(be)("HEADING"),{label:"Hovedtittel for enhetsannonsen",class:["ad__field",{"ad__field--edited":se("HEADING")}]}),{default:withCtx(()=>[createVNode(unref(By),{modelValue:N.value.HEADING,"onUpdate:modelValue":ge[0]||(ge[0]=ie=>N.value.HEADING=ie)},{suffix:withCtx(()=>[createVNode(unref(Ve),{icon:Se("HEADING")},null,8,["icon"])]),_:1},8,["modelValue"])]),_:1},16,["class"])]),_:1})):createCommentVNode("",!0),Me.hasFields("MEDIA")?(openBlock(),createBlock(unref(EV),{key:1,expanded:!0,title:"Media",subtitle:"Disse hentes fra enhetssiden. Det første bilde vil være forsidebildet på enhetsannonsen."},{actions:withCtx(()=>[createVNode(unref(Ve),{icon:Se("MEDIA"),class:normalizeClass(["ad__expandable-list-field",{"ad__expandable-list-field--edited":se("MEDIA")}])},null,8,["icon","class"])]),default:withCtx(()=>[Me.hasField("MEDIA")?(openBlock(),createBlock(unref(vV),{key:0,modelValue:N.value.MEDIA,"onUpdate:modelValue":ge[1]||(ge[1]=ie=>N.value.MEDIA=ie),label:"Bilder i Finn-annonsen",dropMessage:"Dra en fil hit eller <b>velg</b> for å laste opp",accept:["image/jpeg","image/png","image/jpg"],upload:unref(uploadFunction),types:["Image"],multiple:!0,sortable:!0,description:!0,placement:"outside",size:"contain",labels:{selectMessage:"Trykk på knappen nedenfor for å laste opp andre filtyper",select:"Velg",cancel:"Avbryt",save:"Bekreft",descriptionPlaceholder:"",image:{createLabel:"Bilde",preview:"",inputLabel:"",error:""}}},null,8,["modelValue","upload"])):createCommentVNode("",!0)]),_:1})):createCommentVNode("",!0),Me.hasFields("GENERAL_DESCRIPTION")?(openBlock(),createBlock(_sfc_main$d,{key:2,expanded:!0,title:"Beskrivelse",subtitle:"Teksten som formuleres her vil bli synlig under beskrivelse på enhetsannonsen.",modelValue:N.value.GENERAL_DESCRIPTION,"onUpdate:modelValue":ge[2]||(ge[2]=ie=>N.value.GENERAL_DESCRIPTION=ie)},{actions:withCtx(()=>[createVNode(unref(Ve),{icon:Se("GENERAL_DESCRIPTION"),class:normalizeClass(["ad__expandable-list-field",{"ad__expandable-list-field--edited":se("GENERAL_DESCRIPTION")}])},null,8,["icon","class"])]),_:1},8,["modelValue"])):createCommentVNode("",!0)]),_:1})]),actions:withCtx(({close:ie})=>[createVNode(unref(Be),{label:"Avbryt",onClick:()=>{xe(),ie()},variant:"secondary"},null,8,["onClick"]),withDirectives(createVNode(unref(Be),{label:"Bekreft",disabled:!unref(ve).passes.value,onClick:()=>{unref(ve).passes&&(ye(),ie())},variant:"primary"},null,8,["disabled","onClick"]),[[unref(Mt),{content:Object.entries(unref(ve).errors.value.errors).map(([ke,Ee])=>Ee).flat().join(`
|
|
3
3
|
`),disabled:unref(ve).passes.value}]])]),_:1},512))}}),_sfc_main$b=defineComponent({__name:"UnitSettings.ce",setup(e){const t=ref(),M=ref();return(I,V)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(_sfc_main$c,mergeProps({ref_key:"description",ref:t},I.$attrs),null,16),createVNode(_sfc_main$e,mergeProps({ref_key:"links",ref:M},I.$attrs),null,16),createVNode(unref(sa),{class:"unit-table__actions",label:"",theme:"shadow",variant:"secondary",keepOpen:!0,teleport:!1},{default:withCtx(({close:N})=>[createVNode(unref(Be),{variant:"tertiary",label:"Rediger enhet",iconRight:"fa-pro-solid:caret-right",onClick:V[0]||(V[0]=()=>t.value.open())}),createVNode(unref(Be),{variant:"tertiary",label:"Rediger lenker",iconRight:"fa-pro-solid:caret-right",onClick:V[1]||(V[1]=()=>M.value.open())})]),_:1})],64))}}),_sfc_main$a=defineComponent({__name:"UnitTable.ce",props:mergeModels({units:{type:Array},initialUnitFields:{type:Array}},{modelValue:{default:{}},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,M=useModel(e,"modelValue"),I=ref(t.units.map((ne,ve)=>ne.fields)),V=computed(()=>t.units.map((ne,ve)=>{const be=JB({rules:toRef(ne.rules),labels:toRef(ne.labels),data:toRef(ne.fields)}),se=be.passes.value,Se=Object.entries(be.errors.value.errors).map(([xe,ye])=>ye).flat().join(`
|
|
4
4
|
`);return{errors:be.errors.value,validate:be.bind,passes:se,error:Se}})),N=(ne,ve)=>!!ne.hasOwnProperty(ve),j=(ne,...ve)=>!!ve.map(be=>N(ne,be)).find(Boolean),J=(ne,ve)=>M.value.units[ne]?M.value.units[ne].fields.hasOwnProperty(ve):!1,U=ne=>ne?"fa-pro-regular:link-slash":"fa-pro-regular:link";return(ne,ve)=>(openBlock(),createBlock(unref(cV),{class:"unit-table",columns:[{id:"unit",label:"Enhet",size:"1fr"},{id:"highlight",label:"Fremhev enhet",align:"center",size:"150px"},{id:"settings",label:"Instillinger",align:"center",size:"150px"}],items:I.value},{unit:withCtx(({item:be,rowIndex:se})=>[createBaseVNode("span",null,toDisplayString(be.HOUSING_UNIT_REF),1),V.value[se].error?withDirectives((openBlock(),createBlock(unref(Ve),{key:0,class:"unit-table__error",icon:"fa-pro-light:exclamation-triangle"},null,512)),[[unref(Mt),{content:V.value[se].error}]]):createCommentVNode("",!0)]),highlight:withCtx(({item:be,rowIndex:se})=>[createVNode(unref(Ve),{class:normalizeClass(["unit-table__highlight",{"unit-table__highlight--selected":be.IS_HIGHLIGHTED==="true"}]),icon:"fa-pro-solid:star",onClick:()=>{be.IS_HIGHLIGHTED=be.IS_HIGHLIGHTED==="true"?"false":"true",M.value.units[se].fields.IS_HIGHLIGHTED=be.IS_HIGHLIGHTED}},null,8,["class","onClick"])]),settings:withCtx(({item:be,rowIndex:se})=>[(openBlock(),createBlock(_sfc_main$b,{units:ne.units,key:be.id,modelValue:be,"onUpdate:modelValue":Se=>{Object.entries(unref(Diff)(be,Se)).map(([xe,ye])=>{be[xe]=ye,M.value.units[se].fields[xe]=ye,unref(hasDiff)({value:ye},{value:ne.initialUnitFields[se][xe]})||delete M.value.units[se].fields[xe]})},hasFields:(...Se)=>j(be,...Se),hasField:(...Se)=>N(be,...Se),getIsEditedIcon:(...Se)=>U(...Se),isEdited:(...Se)=>J(se,...Se),rules:ne.units.map(Se=>Se.rules)[se],labels:ne.units.map(Se=>Se.labels)[se]},null,8,["units","modelValue","onUpdate:modelValue","hasFields","hasField","getIsEditedIcon","isEdited","rules","labels"]))]),_:1},8,["items"]))}}),_style_0$9=".unit-table{box-sizing:border-box;padding:var(--k-ui-spacing);border-radius:var(--k-ui-rounding);background-color:#fff;--k-datatable-cell-size: 1rem;--k-datatable-odd-color: transparent;--k-datatable-even-color: var(--k-ui-color-neutral-lightest)}.unit-table__actions{--k-button-secondary-background: white}.unit-table__error{padding-left:.5rem;color:var(--k-ui-color-danger-dark)}.unit-table__highlight{font-size:2rem;color:var(--k-ui-color-neutral)}.unit-table__highlight:hover{cursor:pointer}.unit-table__highlight:hover:not(.unit-table__highlight--selected){color:var(--k-ui-color-neutral-dark)}.unit-table__highlight--selected{color:var(--k-ui-color-primary)}",UnitTable=_export_sfc(_sfc_main$a,[["styles",[_style_0$9]]]),ProjectFacilities=[{value:"AIRCONDITIONING",label:"Aircondition"},{value:"ALARM",label:"Alarm"},{value:"VENTILATION",label:"Balansert ventilasjon"},{value:"BALCONY",label:"Balkong/Terrasse"},{value:"BROADBAND",label:"Bredbåndstilknytning"},{value:"RECEPTION",label:"Felles resepsjon"},{value:"COMMONWASHROOM",label:"Fellesvaskeri"},{value:"GARAGE",label:"Garasje/P-plass"},{value:"GARDEN",label:"Hage"},{value:"LIFT",label:"Heis"},{value:"CABLE-TV",label:"Kabel-TV"},{value:"CHARGING",label:"Lademulighet"},{value:"FIREPLACE",label:"Peis/Ildsted"},{value:"CENTRAL",label:"Sentralt"},{value:"ROOF_TERRACE",label:"Takterrasse"},{value:"VIEW",label:"Utsikt"},{value:"JANITORSERVICE",label:"Vaktmester-/vektertjeneste"},{value:"SHORELINE",label:"Strandlinje"},{value:"HIKING",label:"Turterreng"}],Facilities=[{value:"AIRCONDITIONING",label:"Aircondition"},{value:"ALARM",label:"Alarm"},{value:"DOWNHILL_SKIING",label:"Alpinanlegg"},{value:"SAUNA",label:"Badstue"},{value:"VENTILATION",label:"Balansert ventilasjon"},{value:"BALCONY",label:"Balkong/Terrasse"},{value:"CHILDRENSBED",label:"Barneseng"},{value:"CHILDRENSCHAIR",label:"Barnestol"},{value:"CHILD-FRIENDLY",label:"Barnevennlig"},{value:"ROAD_ACCESS",label:"Bilvei frem"},{value:"HOTTUB",label:"Boblebad"},{value:"BROADBAND",label:"Bredbåndstilknytning"},{value:"BOAT_MOORING",label:"Båtplass"},{value:"DVD",label:"DVD"},{value:"RECEPTION",label:"Felles resepsjon"},{value:"COMMONWASHROOM",label:"Fellesvaskeri"},{value:"FREEZER",label:"Fryser"},{value:"GARAGE",label:"Garasje/P-plass"},{value:"GOLF",label:"Golfbane"},{value:"GRILL",label:"Grill"},{value:"GARDEN",label:"Hage"},{value:"GARDENFURNITURE",label:"Hagemøbler"},{value:"LIFT",label:"Heis"},{value:"PETSALLOWED",label:"Husdyr tillatt"},{value:"NONSMOKING",label:"Ikke-røyk"},{value:"NO-NEIGHBOURS-OP",label:"Ingen gjenboere"},{value:"INDOORPOOL",label:"Innendørs svømmebasseng"},{value:"INTERNETAVAILABLE",label:"Internettilgang - finns"},{value:"CABLE-TV",label:"Kabel-TV"},{value:"COFFEMACHINE",label:"Kaffetrakter"},{value:"CANTEEN",label:"Kantine"},{value:"FRIDGE",label:"Kjøleskap"},{value:"DRIVEIN",label:"Kjøreport"},{value:"CHARGING",label:"Lademulighet"},{value:"LOADING",label:"Lasterampe"},{value:"ACCESSIBILITY_LEVEL",label:"Livsløpsstandard"},{value:"MICROWAVEOVEN",label:"Mikrobølgeovn"},{value:"MODERN",label:"Moderne"},{value:"PUBLIC_SEWER",label:"Offentlig vann/kloakk"},{value:"DISHWASHER",label:"Oppvaskmaskin"},{value:"SATELLITETV",label:"Parabol"},{value:"PARQUETT",label:"Parkett"},{value:"FIREPLACE",label:"Peis/Ildsted"},{value:"QUIET-AREA",label:"Rolig"},{value:"CENTRAL",label:"Sentralt"},{value:"SHADING",label:"Solavskjerming"},{value:"SUNBEDS",label:"Solsenger"},{value:"HIFI",label:"Stereoannlegg"},{value:"VACUUMCLEANER",label:"Støvsuger"},{value:"ROOF_TERRACE",label:"Takterrasse"},{value:"TUMBLEDRYER",label:"Tørketrommel"},{value:"VIEW",label:"Utsikt"},{value:"EXPANDABLE",label:"Utvidelsesmuligheter"},{value:"JANITORSERVICE",label:"Vaktmester-/vektertjeneste"},{value:"WASHINGMACHINE",label:"Vaskemaskin"},{value:"SWIMMING",label:"Bademulighet"},{value:"ANGLING",label:"Fiskemulighet"},{value:"MAINS_ELECTRICITY",label:"Innlagt strøm"},{value:"MAINS_WATER",label:"Innlagt vann"},{value:"SHORELINE",label:"Strandlinje"},{value:"HIKING",label:"Turterreng"},{value:"PARTLY_FURNISHED",label:"Delvis møblert"},{value:"FURNISHED",label:"Møblert"},{value:"UNFURNISHED",label:"Umøblert"}],Properties=[{value:"flat",label:"Leilighet",categories:["ESTATE_PLANNED","ESTATE_PROJECT","ESTATE_PROJECT_LEISURE","ESTATE_PROJECT_SINGLE"]},{value:"detached",label:"Enebolig",categories:["ESTATE_PLANNED","ESTATE_PROJECT","ESTATE_PROJECT_LEISURE","ESTATE_PROJECT_SINGLE"]},{value:"terraced",label:"Rekkehus",categories:["ESTATE_PLANNED","ESTATE_PROJECT","ESTATE_PROJECT_LEISURE","ESTATE_PROJECT_SINGLE"]},{value:"semidetached",label:"Tomannsbolig",categories:["ESTATE_PLANNED","ESTATE_PROJECT","ESTATE_PROJECT_LEISURE","ESTATE_PROJECT_SINGLE"]},{value:"bedsit",label:"Hybel",categories:[]},{value:"cottage",label:"Hytte",categories:["ESTATE_PROJECT_LEISURE"]},{value:"leisure_plot",label:"Hyttetomt",categories:[]},{value:"office",label:"Kontor",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"businessplot",label:"Næringstomt",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"houseshare",label:"Rom i bofellesskap",categories:[]},{value:"plot",label:"Tomter",categories:[]},{value:"business",label:"Butikk/Handel",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"industrial",label:"Produksjon/Industri",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"warehouse",label:"Lager/Logistikk",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"multipurposearea",label:"Kombinasjonslokaler",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"farm",label:"Gårdsbruk/Småbruk",categories:["ESTATE_PROJECT_LEISURE","ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"multiunits",label:"Bygård/Flermannsbolig",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"shoppingmall",label:"Kjøpesenter",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"mechshop",label:"Verksted",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"garage",label:"Garasje/Parkering",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"hotel",label:"Hotell/Overnatting",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"restaurant",label:"Serveringslokale/Kantine",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"learningfacility",label:"Undervisning/Arrangement",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"project",label:"Prosjekt",categories:[]},{value:"other_leisure",label:"Annet fritid",categories:["ESTATE_PROJECT_LEISURE"]},{value:"other",label:"Andre",categories:["ESTATE_PLANNED","ESTATE_PROJECT","ESTATE_PROJECT_LEISURE","ESTATE_PROJECT_SINGLE","ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]}],OwnershipTypes=[{value:"LEASEHOLD",label:"Obligasjon"},{value:"COLLECTIVE_OWNERSHIP",label:"Aksje"},{value:"FREEHOLD",label:"Eier (Selveier)"},{value:"PART_OWNERSHIP",label:"Andel"},{value:"OTHER",label:"Annet"}],LeisureSituation=[{value:"coast",label:"Ved sjøen"},{value:"mountains",label:"På fjellet"},{value:"inland",label:"Innlandet"}],energyLabel=[{value:"A",label:"A"},{value:"B",label:"B"},{value:"C",label:"C"},{value:"D",label:"D"},{value:"E",label:"E"},{value:"F",label:"F"},{value:"G",label:"G"}],energyLabelColor=[{value:"dark_Green",label:"Mørkegrønn"},{value:"light_Green",label:"Lysegrønn"},{value:"yellow",label:"Gul"},{value:"orange",label:"Oransje"},{value:"red",label:"Rød"}],_hoisted_1={key:0},_hoisted_2={key:1,class:"ad"},_sfc_main$9=defineComponent({__name:"Ad.ce",props:mergeModels({onNext:{type:null},onPrev:{type:null}},{modelValue:{default:{}},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=useCurrentElement(),M=useAPI(t);inject(PropsInjectionKey);const I=e,V=useModel(e,"modelValue"),N=computed(()=>Properties.filter(Oe=>Oe.categories.includes(V.value.type))),j=ref({}),J=ref({}),U=ref([]),ne=ref([]),ve=ref(!1),be=ref({}),se=ref({}),Se=computed(()=>({...j.value,units:U.value.map(Oe=>Oe.fields)})),xe=JB({rules:be,labels:se,data:Se}),{bind:ye}=xe,Me=computed(()=>{const Oe=(j.value.BROKER||[]).length;return Oe?Array.from({length:Oe},(Re,Ge)=>xe.errors.value.errors[`BROKER.${Ge}.PHONE`]).filter(Boolean).flat().join(""):"Kundebehandler er påkrevd"}),ge=Oe=>!!j.value.hasOwnProperty(Oe),ie=(...Oe)=>Oe.map(ge).find(Boolean),ke=Oe=>V.value.fields.hasOwnProperty(Oe),Ee=Oe=>ke(Oe)?"fa-pro-regular:link-slash":"fa-pro-regular:link",Ce=()=>(ve.value=!0,M.fields(V.value).then(Oe=>{J.value=Clone(Oe.fields),j.value=Clone({...Oe.fields,...V.value.fields}),Object.keys(Oe.fields).forEach(Ge=>{watch(()=>j.value[Ge],(qe,Je)=>{V.value.fields[Ge]=qe,hasDiff({value:qe},{value:J.value[Ge]})||delete V.value.fields[Ge]},{deep:!0})}),ne.value=Clone(Oe.units.map(Ge=>Ge.fields)),U.value=Clone(Oe.units.map((Ge,qe)=>({...Ge,fields:{...Ge.fields,...V.value.units[qe].fields}})));const Re=Oe.units.map(Ge=>Ge.rules).map(Ge=>Object.fromEntries(Object.entries(Ge).map(([qe,Je])=>[`units.*.${qe}`,Je])));be.value=Object.assign({},Oe.rules,...Re),se.value=Object.assign({},Oe.labels)}).catch(Oe=>{I.onPrev()}).finally(()=>ve.value=!1)),Le=()=>!V.value.id||V.value.preview?"Generer forhåndsvisning":"Neste";return onMounted(Ce),(Oe,Re)=>ve.value?(openBlock(),createElementBlock("div",_hoisted_1,[createVNode(unref(zr),{justify:"center",style:{"background-color":"whitesmoke"},class:"k-py-3xl"},{default:withCtx(()=>[createVNode(unref(sh),{size:"large"})]),_:1})])):(openBlock(),createElementBlock("div",_hoisted_2,[createVNode(unref(ZB),{title:"Tilpasset annonse eller automatisert annonse",variant:"info",class:"ad__alert",icon:"fa-pro-regular:exclamation-triangle"},{default:withCtx(()=>Re[25]||(Re[25]=[createBaseVNode("p",{style:{"margin-top":"0"}}," Basert på informasjon du har fylt ut til prosjektsiden har vi opprettet en Finn-annonse basert på dette. ",-1),createBaseVNode("p",null," Dersom du ønsker å tilpasse prosjektet med nye bilder og tekster, vær klar over at prosjektsiden og Finn-annonsen ikke lengre vil synkroniseres. Det betyr at dersom du endrer tekst under prosjektsiden, for eksempel under steget presentasjon, vil det ikke automatisk oppdateres på Finn.no. ",-1),createBaseVNode("p",null,' Om du ønsker å benytte den ferdigutfylte Finn-annonsen vi tilbyr trenger du ikke gjøre endringer på denne siden. Dersom du tidligere har gjort endringer og ønsker å tilbakestille til vår ferdig utfylte annonse kan du gjøre dette under knappen "Handlinger" og "Tilbakestill innhold" ',-1)])),_:1}),createVNode(unref(tC),{variant:"prompt",appearance:"shadow",title:"Innhold i Finn-annonsen",subtitle:"Her kan du få et overblikk over informasjonen som sendes til Finn, og hvor den finnes i løsningen. Her kan du også justere detaljer tilknyttet din annonse."},{default:withCtx(()=>[createVNode(unref(zr),{direction:"column",gap:"2rem"},{default:withCtx(()=>[ie("PROJECT_NAME","HOUSING_UNIT_REF","HEADING","BOLIGNUMMER")?(openBlock(),createBlock(unref(EV),{key:0,expanded:!0,title:"Hovedtittel og undertittel",subtitle:"Teksten som formuleres her vil bli synlig som hovedtittel og undertittel på Finn-annonsen"},{default:withCtx(()=>[ge("HOUSING_UNIT_REF")?(openBlock(),createBlock(unref(GS),mergeProps({key:0},unref(ye)("HOUSING_UNIT_REF"),{label:"Hovedtittel for annonsen",class:["ad__field",{"ad__field--edited":ke("HOUSING_UNIT_REF")}]}),{default:withCtx(()=>[createVNode(unref(By),{modelValue:j.value.HOUSING_UNIT_REF,"onUpdate:modelValue":Re[0]||(Re[0]=Ge=>j.value.HOUSING_UNIT_REF=Ge)},{suffix:withCtx(()=>[createVNode(unref(Ve),{icon:Ee("HOUSING_UNIT_REF")},null,8,["icon"])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),ge("PROJECT_NAME")?(openBlock(),createBlock(unref(GS),mergeProps({key:1},unref(ye)("PROJECT_NAME"),{label:"Hovedtittel for annonsen",class:["ad__field",{"ad__field--edited":ke("PROJECT_NAME")}]}),{default:withCtx(()=>[createVNode(unref(By),{modelValue:j.value.PROJECT_NAME,"onUpdate:modelValue":Re[1]||(Re[1]=Ge=>j.value.PROJECT_NAME=Ge)},{suffix:withCtx(()=>[createVNode(unref(Ve),{icon:Ee("PROJECT_NAME")},null,8,["icon"])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),ge("BOLIGNUMMER")?(openBlock(),createBlock(unref(GS),mergeProps({key:2},unref(ye)("BOLIGNUMMER"),{label:"Hovedtittel for annonsen",class:["ad__field",{"ad__field--edited":ke("BOLIGNUMMER")}]}),{default:withCtx(()=>[createVNode(unref(By),{modelValue:j.value.BOLIGNUMMER,"onUpdate:modelValue":Re[2]||(Re[2]=Ge=>j.value.BOLIGNUMMER=Ge)},{suffix:withCtx(()=>[createVNode(unref(Ve),{icon:Ee("BOLIGNUMMER")},null,8,["icon"])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),ge("HEADING")?(openBlock(),createBlock(unref(GS),mergeProps({key:3},unref(ye)("HEADING"),{label:"Undertittel",class:["ad__field",{"ad__field--edited":ke("HEADING")}]}),{default:withCtx(()=>[createVNode(unref(By),{modelValue:j.value.HEADING,"onUpdate:modelValue":Re[3]||(Re[3]=Ge=>j.value.HEADING=Ge)},{suffix:withCtx(()=>[createVNode(unref(Ve),{icon:Ee("HEADING")},null,8,["icon"])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0)]),_:1})):createCommentVNode("",!0),ie("MEDIA")?(openBlock(),createBlock(unref(EV),{key:1,expanded:!0,title:"Bilder",subtitle:"Disse hentes fra prosjektsiden. Det første bilde vil være forsidebildet på Finn-annonsen."},{actions:withCtx(()=>[createVNode(unref(Ve),{icon:Ee("MEDIA"),class:normalizeClass(["ad__expandable-list-field",{"ad__expandable-list-field--edited":ke("MEDIA")}])},null,8,["icon","class"])]),default:withCtx(()=>[ie("MEDIA")?(openBlock(),createBlock(unref(vV),{key:0,modelValue:j.value.MEDIA,"onUpdate:modelValue":Re[4]||(Re[4]=Ge=>j.value.MEDIA=Ge),label:"Bilder i Finn-annonsen",dropMessage:"Dra en fil hit eller <b>velg</b> for å laste opp",accept:["image/jpeg","image/png","image/jpg"],upload:unref(uploadFunction),types:["Image"],multiple:!0,sortable:!0,description:!0,placement:"outside",size:"contain",labels:{selectMessage:"Trykk på knappen nedenfor for å laste opp andre filtyper",select:"Velg",cancel:"Avbryt",save:"Bekreft",descriptionPlaceholder:"",image:{createLabel:"Bilde",preview:"",inputLabel:"",error:""}}},null,8,["modelValue","upload"])):createCommentVNode("",!0)]),_:1})):createCommentVNode("",!0),ie("FLOORPLAN_MEDIA")?(openBlock(),createBlock(unref(EV),{key:2,expanded:!0,title:"Plantegninger",subtitle:"Disse hentes fra enhetssidene"},{actions:withCtx(()=>[createVNode(unref(Ve),{icon:Ee("FLOORPLAN_MEDIA"),class:normalizeClass(["ad__expandable-list-field",{"ad__expandable-list-field--edited":ke("FLOORPLAN_MEDIA")}])},null,8,["icon","class"])]),default:withCtx(()=>[ie("FLOORPLAN_MEDIA")?(openBlock(),createBlock(unref(wV),{key:0,modelValue:j.value.FLOORPLAN_MEDIA,"onUpdate:modelValue":Re[5]||(Re[5]=Ge=>j.value.FLOORPLAN_MEDIA=Ge),label:"Plantegninger i Finn-annonsen",dropMessage:"Dra en fil hit eller <b>velg</b> for å laste opp",accept:["image/jpeg","image/png","image/jpg"],upload:unref(uploadFunction),multiple:!0,sortable:!0,labels:{delete:"Slett",download:"Last ned"}},null,8,["modelValue","upload"])):createCommentVNode("",!0)]),_:1})):createCommentVNode("",!0),ie("GENERAL_DESCRIPTION")?(openBlock(),createBlock(_sfc_main$d,{key:3,expanded:!0,title:"Beskrivelse",subtitle:"Teksten som formuleres her vil bli synlig under beskrivelse på Finn-annonsen.",modelValue:j.value.GENERAL_DESCRIPTION,"onUpdate:modelValue":Re[6]||(Re[6]=Ge=>j.value.GENERAL_DESCRIPTION=Ge)},{actions:withCtx(()=>[createVNode(unref(Ve),{icon:Ee("GENERAL_DESCRIPTION"),class:normalizeClass(["ad__expandable-list-field",{"ad__expandable-list-field--edited":ke("GENERAL_DESCRIPTION")}])},null,8,["icon","class"])]),_:1},8,["modelValue"])):createCommentVNode("",!0),ie("GENERAL_TEXT_REALESTATE")?(openBlock(),createBlock(ExpandableList,{key:4,expanded:!0,title:"Beskrivelse",subtitle:"Teksten som formuleres her vil bli synlig under beskrivelse på Finn-annonsen.",template:{GENERAL_HEADING:"",GENERAL_TEXT:""},modelValue:j.value.GENERAL_TEXT_REALESTATE,"onUpdate:modelValue":Re[7]||(Re[7]=Ge=>j.value.GENERAL_TEXT_REALESTATE=Ge)},{actions:withCtx(()=>[createVNode(unref(Ve),{icon:Ee("GENERAL_TEXT_REALESTATE"),class:normalizeClass(["ad__expandable-list-field",{"ad__expandable-list-field--edited":ke("GENERAL_TEXT_REALESTATE")}])},null,8,["icon","class"])]),default:withCtx(({item:Ge})=>[createVNode(unref(GS),{label:"Tittel"},{default:withCtx(()=>[createVNode(unref(By),{modelValue:Ge.GENERAL_HEADING,"onUpdate:modelValue":qe=>Ge.GENERAL_HEADING=qe},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),createVNode(unref(GS),{label:"Tekst"},{default:withCtx(()=>[createVNode(unref(xV),{actions:["bold","italic","orderedList","bulletList"],modelValue:Ge.GENERAL_TEXT,"onUpdate:modelValue":qe=>Ge.GENERAL_TEXT=qe},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:1},8,["modelValue"])):createCommentVNode("",!0),ie("PROJECT_PREFERENCE")?(openBlock(),createBlock(unref(EV),{key:5,expanded:!0,title:"Fasiliteter for prosjektannonsen",subtitle:"Velg fasiliteter for prosjektannonsen"},{actions:withCtx(()=>[createVNode(unref(Ve),{icon:Ee("PROJECT_PREFERENCE"),class:normalizeClass(["ad__expandable-list-field",{"ad__expandable-list-field--edited":ke("PROJECT_PREFERENCE")}])},null,8,["icon","class"])]),default:withCtx(()=>[ge("PROJECT_PREFERENCE")?(openBlock(),createBlock(unref(GS),{key:0,label:"Tilgjengelige fasiliteter"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(ProjectFacilities),Ge=>(openBlock(),createBlock(unref(Bd),{modelValue:j.value.PROJECT_PREFERENCE,"onUpdate:modelValue":Re[8]||(Re[8]=qe=>j.value.PROJECT_PREFERENCE=qe),value:Ge.value,label:Ge.label},null,8,["modelValue","value","label"]))),256))]),_:1})):createCommentVNode("",!0)]),_:1})):createCommentVNode("",!0),ie("PROPERTY_TYPE")&&Array.isArray(j.value.PROPERTY_TYPE)?(openBlock(),createBlock(unref(EV),{key:6,expanded:!0,title:"Enhetstyper for annonsen",subtitle:"Velg enhetstyper for annonsen"},{actions:withCtx(()=>[createVNode(unref(Ve),{icon:Ee("PROPERTY_TYPE"),class:normalizeClass(["ad__expandable-list-field",{"ad__expandable-list-field--edited":ke("PROPERTY_TYPE")}])},null,8,["icon","class"])]),default:withCtx(()=>[ge("PROPERTY_TYPE")?(openBlock(),createBlock(unref(GS),{key:0,label:"Tilgjengelige lokaler"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(N.value,Ge=>(openBlock(),createBlock(unref(Bd),{modelValue:j.value.PROPERTY_TYPE,"onUpdate:modelValue":Re[9]||(Re[9]=qe=>j.value.PROPERTY_TYPE=qe),value:Ge.value,label:Ge.label},null,8,["modelValue","value","label"]))),256))]),_:1})):createCommentVNode("",!0)]),_:1})):createCommentVNode("",!0),createVNode(unref(EV),{expanded:!0,title:"Nøkkelinformasjon",subtitle:""},{default:withCtx(()=>[createVNode(unref(hV),{columns:"2"},{default:withCtx(()=>[ie("PROPERTY_TYPE")&&!Array.isArray(j.value.PROPERTY_TYPE)?(openBlock(),createBlock(unref(GS),mergeProps({key:0},unref(ye)("PROPERTY_TYPE"),{label:"Boligtype",class:["ad__dropdown",{"ad__dropdown--edited":ke("PROPERTY_TYPE")}]}),{default:withCtx(()=>[createVNode(unref(sa),{label:N.value.find(Ge=>Ge.value===j.value.PROPERTY_TYPE)?.label||"Velg...",items:N.value.map(Ge=>({...Ge,action:()=>{j.value.PROPERTY_TYPE=Ge.value}}))},{"icon-right":withCtx(()=>[createVNode(unref(Ve),{icon:"fa-pro-regular:angle-down",class:"k-mr-sm"}),createVNode(unref(Ve),{icon:Ee("PROPERTY_TYPE")},null,8,["icon"])]),_:1},8,["label","items"])]),_:1},16,["class"])):createCommentVNode("",!0),ge("AREA_FROM")?(openBlock(),createBlock(unref(GS),mergeProps({key:1},unref(ye)("AREA_FROM"),{label:"Areal fra",class:["ad__field",{"ad__field--edited":ke("AREA_FROM")}]}),{default:withCtx(()=>[createVNode(unref(By),{modelValue:j.value.AREA_FROM,"onUpdate:modelValue":Re[10]||(Re[10]=Ge=>j.value.AREA_FROM=Ge),mask:{mask:Number,min:0,scale:0}},{suffix:withCtx(()=>[createVNode(unref(Ve),{icon:Ee("AREA_FROM")},null,8,["icon"])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),ge("AREA_TO")?(openBlock(),createBlock(unref(GS),mergeProps({key:2},unref(ye)("AREA_TO"),{label:"Areal til",class:["ad__field",{"ad__field--edited":ke("AREA_TO")}]}),{default:withCtx(()=>[createVNode(unref(By),{modelValue:j.value.AREA_TO,"onUpdate:modelValue":Re[11]||(Re[11]=Ge=>j.value.AREA_TO=Ge),mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[createVNode(unref(Ve),{icon:Ee("AREA_TO")},null,8,["icon"])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),ge("NO_OF_PARKING_SPOTS")?(openBlock(),createBlock(unref(GS),mergeProps({key:3},unref(ye)("NO_OF_PARKING_SPOTS"),{label:"Antall parkeringsplasser",class:["ad__field",{"ad__field--edited":ke("NO_OF_PARKING_SPOTS")}]}),{default:withCtx(()=>[createVNode(unref(By),{modelValue:j.value.NO_OF_PARKING_SPOTS,"onUpdate:modelValue":Re[12]||(Re[12]=Ge=>j.value.NO_OF_PARKING_SPOTS=Ge),mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[createVNode(unref(Ve),{icon:Ee("NO_OF_PARKING_SPOTS")},null,8,["icon"])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),ge("FLOOR")?(openBlock(),createBlock(unref(GS),mergeProps({key:4},unref(ye)("FLOOR"),{label:"Etasje",class:["ad__field",{"ad__field--edited":ke("FLOOR")}]}),{default:withCtx(()=>[createVNode(unref(By),{modelValue:j.value.FLOOR,"onUpdate:modelValue":Re[13]||(Re[13]=Ge=>j.value.FLOOR=Ge),mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[createVNode(unref(Ve),{icon:Ee("FLOOR")},null,8,["icon"])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),ge("CONSTRUCTION_YEAR")?(openBlock(),createBlock(unref(GS),mergeProps({key:5},unref(ye)("CONSTRUCTION_YEAR"),{label:"Byggeår",class:["ad__field",{"ad__field--edited":ke("CONSTRUCTION_YEAR")}]}),{default:withCtx(()=>[createVNode(unref(By),{modelValue:j.value.CONSTRUCTION_YEAR,"onUpdate:modelValue":Re[14]||(Re[14]=Ge=>j.value.CONSTRUCTION_YEAR=Ge),mask:{mask:Number,unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[createVNode(unref(Ve),{icon:Ee("CONSTRUCTION_YEAR")},null,8,["icon"])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),ge("RENOVATED_YEAR")?(openBlock(),createBlock(unref(GS),mergeProps({key:6},unref(ye)("RENOVATED_YEAR"),{label:"Renoveringsår",class:["ad__field",{"ad__field--edited":ke("RENOVATED_YEAR")}]}),{default:withCtx(()=>[createVNode(unref(By),{modelValue:j.value.RENOVATED_YEAR,"onUpdate:modelValue":Re[15]||(Re[15]=Ge=>j.value.RENOVATED_YEAR=Ge),mask:{mask:Number,unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[createVNode(unref(Ve),{icon:Ee("RENOVATED_YEAR")},null,8,["icon"])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),ge("ENERGY_LABEL")?(openBlock(),createBlock(unref(GS),{key:7,label:"Energimerking"},{default:withCtx(()=>[createVNode(unref(sa),{class:normalizeClass(["ad__dropdown",{"ad__dropdown--edited":ke("ENERGY_LABEL")}]),label:unref(energyLabel).find(Ge=>Ge.value===j.value.ENERGY_LABEL)?.label||"Velg...",items:unref(energyLabel).map(Ge=>({...Ge,action:()=>{j.value.ENERGY_LABEL=Ge.value}}))},{"icon-right":withCtx(()=>[createVNode(unref(Ve),{icon:"fa-pro-regular:angle-down",class:"k-mr-sm"}),createVNode(unref(Ve),{icon:Ee("ENERGY_LABEL")},null,8,["icon"])]),_:1},8,["class","label","items"])]),_:1})):createCommentVNode("",!0),ge("ENERGY_LABEL_COLOR_CODE")?(openBlock(),createBlock(unref(GS),{key:8,label:"Energimerking (farge)"},{default:withCtx(()=>[createVNode(unref(sa),{class:normalizeClass(["ad__dropdown",{"ad__dropdown--edited":ke("ENERGY_LABEL_COLOR_CODE")}]),label:unref(energyLabelColor).find(Ge=>Ge.value===j.value.ENERGY_LABEL_COLOR_CODE)?.label||"Velg...",items:unref(energyLabelColor).map(Ge=>({...Ge,action:()=>{j.value.ENERGY_LABEL_COLOR_CODE=Ge.value}}))},{"icon-right":withCtx(()=>[createVNode(unref(Ve),{icon:"fa-pro-regular:angle-down",class:"k-mr-sm"}),createVNode(unref(Ve),{icon:Ee("ENERGY_LABEL_COLOR_CODE")},null,8,["icon"])]),_:1},8,["class","label","items"])]),_:1})):createCommentVNode("",!0),ge("OWNERSHIP_TYPE")?(openBlock(),createBlock(unref(GS),{key:9,label:"Eiertype"},{default:withCtx(()=>[createVNode(unref(sa),{class:normalizeClass(["ad__dropdown",{"ad__dropdown--edited":ke("OWNERSHIP_TYPE")}]),suffix:"test",prefix:"test",keepOpen:!0,label:unref(OwnershipTypes).find(Ge=>Ge.value===j.value.OWNERSHIP_TYPE)?.label||"Velg...",items:unref(OwnershipTypes).map(Ge=>({...Ge,action:()=>{j.value.OWNERSHIP_TYPE=Ge.value}}))},{"icon-right":withCtx(()=>[createVNode(unref(Ve),{icon:"fa-pro-regular:angle-down",class:"k-mr-sm"}),createVNode(unref(Ve),{icon:Ee("OWNERSHIP_TYPE")},null,8,["icon"])]),_:1},8,["class","label","items"])]),_:1})):createCommentVNode("",!0),ge("BEDROOMS_FROM")?(openBlock(),createBlock(unref(GS),mergeProps({key:10},unref(ye)("BEDROOMS_FROM"),{label:"Soverom fra",class:["ad__field",{"ad__field--edited":ke("BEDROOMS_FROM")}]}),{default:withCtx(()=>[createVNode(unref(By),{mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0},modelValue:j.value.BEDROOMS_FROM,"onUpdate:modelValue":Re[16]||(Re[16]=Ge=>j.value.BEDROOMS_FROM=Ge)},{suffix:withCtx(()=>[createVNode(unref(Ve),{icon:Ee("BEDROOMS_FROM")},null,8,["icon"])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),ge("BEDROOMS_TO")?(openBlock(),createBlock(unref(GS),mergeProps({key:11},unref(ye)("BEDROOMS_TO"),{label:"Soverom til",class:["ad__field",{"ad__field--edited":ke("BEDROOMS_TO")}]}),{default:withCtx(()=>[createVNode(unref(By),{mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0},modelValue:j.value.BEDROOMS_TO,"onUpdate:modelValue":Re[17]||(Re[17]=Ge=>j.value.BEDROOMS_TO=Ge)},{suffix:withCtx(()=>[createVNode(unref(Ve),{icon:Ee("BEDROOMS_TO")},null,8,["icon"])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),ge("IS_LEISURE")?(openBlock(),createBlock(unref(GS),{key:12,label:"Er hytte"},{default:withCtx(()=>[createVNode(unref(Bd),{modelValue:j.value.IS_LEISURE,"onUpdate:modelValue":Re[18]||(Re[18]=Ge=>j.value.IS_LEISURE=Ge)},null,8,["modelValue"])]),_:1})):createCommentVNode("",!0),(ge("IS_LEISURE")?j.value.IS_LEISURE:ge("LEISURE_SITUATION"))?(openBlock(),createBlock(unref(GS),mergeProps({key:13,label:"Beliggenhet"},unref(ye)("LEISURE_SITUATION")),{default:withCtx(()=>[createVNode(unref(sa),{class:normalizeClass(["ad__dropdown",{"ad__dropdown--edited":ke("LEISURE_SITUATION")}]),label:unref(LeisureSituation).find(Ge=>Ge.value===j.value.LEISURE_SITUATION)?.label||"Velg...",items:unref(LeisureSituation).map(Ge=>({...Ge,action:()=>{j.value.LEISURE_SITUATION=Ge.value}}))},{"icon-right":withCtx(()=>[createVNode(unref(Ve),{icon:"fa-pro-regular:angle-down",class:"k-mr-sm"}),createVNode(unref(Ve),{icon:Ee("LEISURE_SITUATION")},null,8,["icon"])]),_:1},8,["class","label","items"])]),_:1},16)):createCommentVNode("",!0)]),_:1})]),_:1}),ie("ESTATE_PREFERENCE")?(openBlock(),createBlock(unref(EV),{key:7,expanded:!0,title:"Fasiliteter for annonsen",subtitle:"Velg fasiliteter for annonsen"},{actions:withCtx(()=>[createVNode(unref(Ve),{icon:Ee("ESTATE_PREFERENCE"),class:normalizeClass(["ad__expandable-list-field",{"ad__expandable-list-field--edited":ke("ESTATE_PREFERENCE")}])},null,8,["icon","class"])]),default:withCtx(()=>[ge("ESTATE_PREFERENCE")?(openBlock(),createBlock(unref(GS),{key:0,label:"Tilgjengelige fasiliteter"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(Facilities),Ge=>(openBlock(),createBlock(unref(Bd),{modelValue:j.value.ESTATE_PREFERENCE,"onUpdate:modelValue":Re[19]||(Re[19]=qe=>j.value.ESTATE_PREFERENCE=qe),value:Ge.value,label:Ge.label},null,8,["modelValue","value","label"]))),256))]),_:1})):createCommentVNode("",!0)]),_:1})):createCommentVNode("",!0),U.value.length?(openBlock(),createBlock(unref(EV),{key:8,expanded:!0,title:"Valgte enheter til Finn-annonsen",subtitle:"Fremhev enheten på prosjektannonsen, eller gjør andre tilpasninger."},{default:withCtx(()=>[createVNode(UnitTable,{ref:"unitTable",initialUnitFields:ne.value,units:U.value,modelValue:V.value,"onUpdate:modelValue":Re[20]||(Re[20]=Ge=>V.value=Ge)},null,8,["initialUnitFields","units","modelValue"])]),_:1})):createCommentVNode("",!0),createVNode(unref(EV),{title:"Prosjektstatus",subtitle:"Prosjektstatus påvirker hele prosjektet. Derfor er det ikke mulig å tilpasse denne her.",expandable:!1,expanded:!1},{actions:withCtx(()=>[createVNode(unref(Be),{class:"ad__navigate-button",variant:"primary",label:"Gå til Presentasjon",onClick:Re[21]||(Re[21]=()=>unref(M).navigateProjectStep("presentation"))})]),_:1}),createVNode(unref(EV),{title:"Kontaktperson",subtitle:"Kontaktperson påvirker hele prosjektet. Derfor er det ikke mulig å tilpasse denne her.",expandable:!1,expanded:!1},{actions:withCtx(()=>[createVNode(unref(Be),{class:"ad__navigate-button",variant:"primary",label:"Gå til Roller",onClick:Re[22]||(Re[22]=()=>unref(M).navigateProjectStep("roles"))})]),_:1}),Me.value?(openBlock(),createBlock(unref(ZB),{key:9,variant:"danger",content:Me.value,icon:"fa-pro-light:exclamation-triangle"},null,8,["content"])):createCommentVNode("",!0),ie("MOREINFO")?(openBlock(),createBlock(ExpandableList,{key:10,expanded:!0,title:"Nyttige lenker i Finn-annonsen",limit:4,template:{URL:"",URLTEXT:""},modelValue:j.value.MOREINFO,"onUpdate:modelValue":Re[23]||(Re[23]=Ge=>j.value.MOREINFO=Ge)},{actions:withCtx(()=>[createVNode(unref(Ve),{icon:Ee("MOREINFO"),class:normalizeClass(["ad__expandable-list-field",{"ad__expandable-list-field--edited":ke("MOREINFO")}])},null,8,["icon","class"])]),default:withCtx(({item:Ge})=>[createVNode(unref(hV),{columns:"2"},{default:withCtx(()=>[createVNode(unref(GS),{label:"URL til nyttig lenke"},{default:withCtx(()=>[createVNode(unref(By),{modelValue:Ge.URL,"onUpdate:modelValue":qe=>Ge.URL=qe,suffix:"URL"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),createVNode(unref(GS),{label:"Visningsnavn på lenken på Finn-annonsen"},{default:withCtx(()=>[createVNode(unref(By),{modelValue:Ge.URLTEXT,"onUpdate:modelValue":qe=>Ge.URLTEXT=qe},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024)]),_:1},8,["modelValue"])):createCommentVNode("",!0)]),_:1})]),actions:withCtx(()=>[createVNode(unref(Be),{label:"Tilbake",variant:"secondary",onClick:Oe.onPrev},null,8,["onClick"]),withDirectives(createVNode(unref(Be),{label:Le(),variant:"primary","icon-right":"fa-pro-solid:arrow-right",onClick:Re[24]||(Re[24]=()=>{unref(xe).passes&&Oe.onNext()}),disabled:!unref(xe).passes.value},null,8,["label","disabled"]),[[unref(Mt),{content:Object.entries(unref(xe).errors.value.errors).map(([Ge,qe])=>qe).flat().join(`
|
|
5
5
|
`),disabled:unref(xe).passes.value}]])]),_:1})]))}}),_style_0$8=".ad__alert{margin-bottom:2rem}.ad__alert .k-alert__icon{padding:var(--k-ui-spacing-lg)}.ad__field{--k-input-prefix-background: white;--k-input-prefix-text: var(--k-ui-color-neutral-dark)}.ad__field .k-input__input{color:var(--k-ui-color-neutral-dark)}.ad__field--edited{--k-input-prefix-text: var(--k-ui-color-neutral-darkest)}.ad__field--edited .k-input__input{color:var(--k-ui-color-neutral-darkest)}.ad__dropdown{--k-button-secondary-background: white;--k-button-secondary-text: var(--k-ui-color-neutral-dark);--k-button-secondary-background-hover: var(--k-ui-color-neutral-lightest);--k-button-secondary-background-active: var(--k-ui-color-neutral-light)}.ad__dropdown--edited{--k-button-secondary-text: var(--k-ui-color-neutral-darkest)}.ad__expandable-list-field{background:#fff;border-radius:var(--k-ui-rounding-full);padding:var(--k-ui-spacing-xs);line-height:1;color:var(--k-ui-color-neutral-dark)}.ad__expandable-list-field--edited{color:var(--k-ui-color-neutral-darkest)}.ad__navigate-button{--k-button-medium-font-size: 1rem}",StepAd=_export_sfc(_sfc_main$9,[["styles",[_style_0$8]]]),_sfc_main$8=defineComponent({__name:"Error.ce",props:{modelValue:{default:{}},modelModifiers:{}},emits:["update:modelValue"],setup(e){return useModel(e,"modelValue"),(t,M)=>(openBlock(),createBlock(unref(tC),{class:"publish-error",appearence:"border",variant:"default",title:"Obs! Noe gikk galt",subtitle:"Det oppsto et problem."},{thumbnail:withCtx(()=>[createVNode(unref(Ve),{icon:"fa-pro-light:circle-exclamation"})]),_:1}))}}),_style_0$7=".publish-error .k-card__thumbnail{display:flex;justify-content:center;background-color:#e7201b33;padding-block:7rem;font-size:7rem}.publish-error .k-card__thumbnail svg{color:#e7201b}",StepError=_export_sfc(_sfc_main$8,[["styles",[_style_0$7]]]);var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lottie={exports:{}};(function(module,exports){typeof navigator<"u"&&function(e,t){module.exports=t()}(commonjsGlobal,function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(e){_useWebWorker=!!e},getWebWorker=function(){return _useWebWorker},setLocationHref=function(e){locationHref=e},getLocationHref=function(){return locationHref};function createTag(e){return document.createElement(e)}function extendPrototype(e,t){var M,I=e.length,V;for(M=0;M<I;M+=1){V=e[M].prototype;for(var N in V)Object.prototype.hasOwnProperty.call(V,N)&&(t.prototype[N]=V[N])}}function getDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)}function createProxyFunction(e){function t(){}return t.prototype=e,t}var audioControllerFactory=function(){function e(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return e.prototype={addAudio:function(t){this.audios.push(t)},pause:function(){var t,M=this.audios.length;for(t=0;t<M;t+=1)this.audios[t].pause()},resume:function(){var t,M=this.audios.length;for(t=0;t<M;t+=1)this.audios[t].resume()},setRate:function(t){var M,I=this.audios.length;for(M=0;M<I;M+=1)this.audios[M].setRate(t)},createAudio:function(t){return this.audioFactory?this.audioFactory(t):window.Howl?new window.Howl({src:[t]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(t){this.audioFactory=t},setVolume:function(t){this._volume=t,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var t,M=this.audios.length;for(t=0;t<M;t+=1)this.audios[t].volume(this._volume*(this._isMuted?0:1))}},function(){return new e}}(),createTypedArray=function(){function e(M,I){var V=0,N=[],j;switch(M){case"int16":case"uint8c":j=1;break;default:j=1.1;break}for(V=0;V<I;V+=1)N.push(j);return N}function t(M,I){return M==="float32"?new Float32Array(I):M==="int16"?new Int16Array(I):M==="uint8c"?new Uint8ClampedArray(I):e(M,I)}return typeof Uint8ClampedArray=="function"&&typeof Float32Array=="function"?t:e}();function createSizedArray(e){return Array.apply(null,{length:e})}function _typeof$6(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$6=function(t){return typeof t}:_typeof$6=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$6(e)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};(function(){var e=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],t,M=e.length;for(t=0;t<M;t+=1)BMMath[e[t]]=Math[e[t]]})(),BMMath.random=Math.random,BMMath.abs=function(e){var t=_typeof$6(e);if(t==="object"&&e.length){var M=createSizedArray(e.length),I,V=e.length;for(I=0;I<V;I+=1)M[I]=Math.abs(e[I]);return M}return Math.abs(e)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function styleDiv(e){e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.display="block",e.style.transformOrigin="0 0",e.style.webkitTransformOrigin="0 0",e.style.backfaceVisibility="visible",e.style.webkitBackfaceVisibility="visible",e.style.transformStyle="preserve-3d",e.style.webkitTransformStyle="preserve-3d",e.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(e,t,M,I){this.type=e,this.currentTime=t,this.totalTime=M,this.direction=I<0?-1:1}function BMCompleteEvent(e,t){this.type=e,this.direction=t<0?-1:1}function BMCompleteLoopEvent(e,t,M,I){this.type=e,this.currentLoop=M,this.totalLoops=t,this.direction=I<0?-1:1}function BMSegmentStartEvent(e,t,M){this.type=e,this.firstFrame=t,this.totalFrames=M}function BMDestroyEvent(e,t){this.type=e,this.target=t}function BMRenderFrameErrorEvent(e,t){this.type="renderFrameError",this.nativeError=e,this.currentTime=t}function BMConfigErrorEvent(e){this.type="configError",this.nativeError=e}var createElementID=function(){var e=0;return function(){return e+=1,idPrefix$1+"__lottie_element_"+e}}();function HSVtoRGB(e,t,M){var I,V,N,j,J,U,ne,ve;switch(j=Math.floor(e*6),J=e*6-j,U=M*(1-t),ne=M*(1-J*t),ve=M*(1-(1-J)*t),j%6){case 0:I=M,V=ve,N=U;break;case 1:I=ne,V=M,N=U;break;case 2:I=U,V=M,N=ve;break;case 3:I=U,V=ne,N=M;break;case 4:I=ve,V=U,N=M;break;case 5:I=M,V=U,N=ne;break}return[I,V,N]}function RGBtoHSV(e,t,M){var I=Math.max(e,t,M),V=Math.min(e,t,M),N=I-V,j,J=I===0?0:N/I,U=I/255;switch(I){case V:j=0;break;case e:j=t-M+N*(t<M?6:0),j/=6*N;break;case t:j=M-e+N*2,j/=6*N;break;case M:j=e-t+N*4,j/=6*N;break}return[j,J,U]}function addSaturationToRGB(e,t){var M=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return M[1]+=t,M[1]>1?M[1]=1:M[1]<=0&&(M[1]=0),HSVtoRGB(M[0],M[1],M[2])}function addBrightnessToRGB(e,t){var M=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return M[2]+=t,M[2]>1?M[2]=1:M[2]<0&&(M[2]=0),HSVtoRGB(M[0],M[1],M[2])}function addHueToRGB(e,t){var M=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return M[0]+=t/360,M[0]>1?M[0]-=1:M[0]<0&&(M[0]+=1),HSVtoRGB(M[0],M[1],M[2])}var rgbToHex=function(){var e=[],t,M;for(t=0;t<256;t+=1)M=t.toString(16),e[t]=M.length===1?"0"+M:M;return function(I,V,N){return I<0&&(I=0),V<0&&(V=0),N<0&&(N=0),"#"+e[I]+e[V]+e[N]}}(),setSubframeEnabled=function(e){subframeEnabled=!!e},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(e){expressionsPlugin=e},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(e){expressionsInterfaces=e},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(e){defaultCurveSegments=e},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(e){idPrefix$1=e};function createNS(e){return document.createElementNS(svgNS,e)}function _typeof$5(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$5=function(t){return typeof t}:_typeof$5=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$5(e)}var dataManager=function(){var e=1,t=[],M,I,V={onmessage:function(){},postMessage:function(se){M({data:se})}},N={postMessage:function(se){V.onmessage({data:se})}};function j(se){if(window.Worker&&window.Blob&&getWebWorker()){var Se=new Blob(["var _workerSelf = self; self.onmessage = ",se.toString()],{type:"text/javascript"}),xe=URL.createObjectURL(Se);return new Worker(xe)}return M=se,V}function J(){I||(I=j(function(se){function Se(){function ye(Ue,Ye){var De,Ie,we=Ue.length,Fe,je,$e,kt;for(Ie=0;Ie<we;Ie+=1)if(De=Ue[Ie],"ks"in De&&!De.completed){if(De.completed=!0,De.hasMask){var Xe=De.masksProperties;for(je=Xe.length,Fe=0;Fe<je;Fe+=1)if(Xe[Fe].pt.k.i)Ee(Xe[Fe].pt.k);else for(kt=Xe[Fe].pt.k.length,$e=0;$e<kt;$e+=1)Xe[Fe].pt.k[$e].s&&Ee(Xe[Fe].pt.k[$e].s[0]),Xe[Fe].pt.k[$e].e&&Ee(Xe[Fe].pt.k[$e].e[0])}De.ty===0?(De.layers=ie(De.refId,Ye),ye(De.layers,Ye)):De.ty===4?ke(De.shapes):De.ty===5&&We(De)}}function Me(Ue,Ye){if(Ue){var De=0,Ie=Ue.length;for(De=0;De<Ie;De+=1)Ue[De].t===1&&(Ue[De].data.layers=ie(Ue[De].data.refId,Ye),ye(Ue[De].data.layers,Ye))}}function ge(Ue,Ye){for(var De=0,Ie=Ye.length;De<Ie;){if(Ye[De].id===Ue)return Ye[De];De+=1}return null}function ie(Ue,Ye){var De=ge(Ue,Ye);return De?De.layers.__used?JSON.parse(JSON.stringify(De.layers)):(De.layers.__used=!0,De.layers):null}function ke(Ue){var Ye,De=Ue.length,Ie,we;for(Ye=De-1;Ye>=0;Ye-=1)if(Ue[Ye].ty==="sh")if(Ue[Ye].ks.k.i)Ee(Ue[Ye].ks.k);else for(we=Ue[Ye].ks.k.length,Ie=0;Ie<we;Ie+=1)Ue[Ye].ks.k[Ie].s&&Ee(Ue[Ye].ks.k[Ie].s[0]),Ue[Ye].ks.k[Ie].e&&Ee(Ue[Ye].ks.k[Ie].e[0]);else Ue[Ye].ty==="gr"&&ke(Ue[Ye].it)}function Ee(Ue){var Ye,De=Ue.i.length;for(Ye=0;Ye<De;Ye+=1)Ue.i[Ye][0]+=Ue.v[Ye][0],Ue.i[Ye][1]+=Ue.v[Ye][1],Ue.o[Ye][0]+=Ue.v[Ye][0],Ue.o[Ye][1]+=Ue.v[Ye][1]}function Ce(Ue,Ye){var De=Ye?Ye.split("."):[100,100,100];return Ue[0]>De[0]?!0:De[0]>Ue[0]?!1:Ue[1]>De[1]?!0:De[1]>Ue[1]?!1:Ue[2]>De[2]?!0:De[2]>Ue[2]?!1:null}var Le=function(){var Ue=[4,4,14];function Ye(Ie){var we=Ie.t.d;Ie.t.d={k:[{s:we,t:0}]}}function De(Ie){var we,Fe=Ie.length;for(we=0;we<Fe;we+=1)Ie[we].ty===5&&Ye(Ie[we])}return function(Ie){if(Ce(Ue,Ie.v)&&(De(Ie.layers),Ie.assets)){var we,Fe=Ie.assets.length;for(we=0;we<Fe;we+=1)Ie.assets[we].layers&&De(Ie.assets[we].layers)}}}(),Oe=function(){var Ue=[4,7,99];return function(Ye){if(Ye.chars&&!Ce(Ue,Ye.v)){var De,Ie=Ye.chars.length;for(De=0;De<Ie;De+=1){var we=Ye.chars[De];we.data&&we.data.shapes&&(ke(we.data.shapes),we.data.ip=0,we.data.op=99999,we.data.st=0,we.data.sr=1,we.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},Ye.chars[De].t||(we.data.shapes.push({ty:"no"}),we.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}}(),Re=function(){var Ue=[5,7,15];function Ye(Ie){var we=Ie.t.p;typeof we.a=="number"&&(we.a={a:0,k:we.a}),typeof we.p=="number"&&(we.p={a:0,k:we.p}),typeof we.r=="number"&&(we.r={a:0,k:we.r})}function De(Ie){var we,Fe=Ie.length;for(we=0;we<Fe;we+=1)Ie[we].ty===5&&Ye(Ie[we])}return function(Ie){if(Ce(Ue,Ie.v)&&(De(Ie.layers),Ie.assets)){var we,Fe=Ie.assets.length;for(we=0;we<Fe;we+=1)Ie.assets[we].layers&&De(Ie.assets[we].layers)}}}(),Ge=function(){var Ue=[4,1,9];function Ye(Ie){var we,Fe=Ie.length,je,$e;for(we=0;we<Fe;we+=1)if(Ie[we].ty==="gr")Ye(Ie[we].it);else if(Ie[we].ty==="fl"||Ie[we].ty==="st")if(Ie[we].c.k&&Ie[we].c.k[0].i)for($e=Ie[we].c.k.length,je=0;je<$e;je+=1)Ie[we].c.k[je].s&&(Ie[we].c.k[je].s[0]/=255,Ie[we].c.k[je].s[1]/=255,Ie[we].c.k[je].s[2]/=255,Ie[we].c.k[je].s[3]/=255),Ie[we].c.k[je].e&&(Ie[we].c.k[je].e[0]/=255,Ie[we].c.k[je].e[1]/=255,Ie[we].c.k[je].e[2]/=255,Ie[we].c.k[je].e[3]/=255);else Ie[we].c.k[0]/=255,Ie[we].c.k[1]/=255,Ie[we].c.k[2]/=255,Ie[we].c.k[3]/=255}function De(Ie){var we,Fe=Ie.length;for(we=0;we<Fe;we+=1)Ie[we].ty===4&&Ye(Ie[we].shapes)}return function(Ie){if(Ce(Ue,Ie.v)&&(De(Ie.layers),Ie.assets)){var we,Fe=Ie.assets.length;for(we=0;we<Fe;we+=1)Ie.assets[we].layers&&De(Ie.assets[we].layers)}}}(),qe=function(){var Ue=[4,4,18];function Ye(Ie){var we,Fe=Ie.length,je,$e;for(we=Fe-1;we>=0;we-=1)if(Ie[we].ty==="sh")if(Ie[we].ks.k.i)Ie[we].ks.k.c=Ie[we].closed;else for($e=Ie[we].ks.k.length,je=0;je<$e;je+=1)Ie[we].ks.k[je].s&&(Ie[we].ks.k[je].s[0].c=Ie[we].closed),Ie[we].ks.k[je].e&&(Ie[we].ks.k[je].e[0].c=Ie[we].closed);else Ie[we].ty==="gr"&&Ye(Ie[we].it)}function De(Ie){var we,Fe,je=Ie.length,$e,kt,Xe,Et;for(Fe=0;Fe<je;Fe+=1){if(we=Ie[Fe],we.hasMask){var xt=we.masksProperties;for(kt=xt.length,$e=0;$e<kt;$e+=1)if(xt[$e].pt.k.i)xt[$e].pt.k.c=xt[$e].cl;else for(Et=xt[$e].pt.k.length,Xe=0;Xe<Et;Xe+=1)xt[$e].pt.k[Xe].s&&(xt[$e].pt.k[Xe].s[0].c=xt[$e].cl),xt[$e].pt.k[Xe].e&&(xt[$e].pt.k[Xe].e[0].c=xt[$e].cl)}we.ty===4&&Ye(we.shapes)}}return function(Ie){if(Ce(Ue,Ie.v)&&(De(Ie.layers),Ie.assets)){var we,Fe=Ie.assets.length;for(we=0;we<Fe;we+=1)Ie.assets[we].layers&&De(Ie.assets[we].layers)}}}();function Je(Ue){Ue.__complete||(Ge(Ue),Le(Ue),Oe(Ue),Re(Ue),qe(Ue),ye(Ue.layers,Ue.assets),Me(Ue.chars,Ue.assets),Ue.__complete=!0)}function We(Ue){Ue.t.a.length===0&&"m"in Ue.t.p}var Ke={};return Ke.completeData=Je,Ke.checkColors=Ge,Ke.checkChars=Oe,Ke.checkPathProperties=Re,Ke.checkShapes=qe,Ke.completeLayers=ye,Ke}if(N.dataManager||(N.dataManager=Se()),N.assetLoader||(N.assetLoader=function(){function ye(ge){var ie=ge.getResponseHeader("content-type");return ie&&ge.responseType==="json"&&ie.indexOf("json")!==-1||ge.response&&_typeof$5(ge.response)==="object"?ge.response:ge.response&&typeof ge.response=="string"?JSON.parse(ge.response):ge.responseText?JSON.parse(ge.responseText):null}function Me(ge,ie,ke,Ee){var Ce,Le=new XMLHttpRequest;try{Le.responseType="json"}catch{}Le.onreadystatechange=function(){if(Le.readyState===4)if(Le.status===200)Ce=ye(Le),ke(Ce);else try{Ce=ye(Le),ke(Ce)}catch(Oe){Ee&&Ee(Oe)}};try{Le.open(["G","E","T"].join(""),ge,!0)}catch{Le.open(["G","E","T"].join(""),ie+"/"+ge,!0)}Le.send()}return{load:Me}}()),se.data.type==="loadAnimation")N.assetLoader.load(se.data.path,se.data.fullPath,function(ye){N.dataManager.completeData(ye),N.postMessage({id:se.data.id,payload:ye,status:"success"})},function(){N.postMessage({id:se.data.id,status:"error"})});else if(se.data.type==="complete"){var xe=se.data.animation;N.dataManager.completeData(xe),N.postMessage({id:se.data.id,payload:xe,status:"success"})}else se.data.type==="loadData"&&N.assetLoader.load(se.data.path,se.data.fullPath,function(ye){N.postMessage({id:se.data.id,payload:ye,status:"success"})},function(){N.postMessage({id:se.data.id,status:"error"})})}),I.onmessage=function(se){var Se=se.data,xe=Se.id,ye=t[xe];t[xe]=null,Se.status==="success"?ye.onComplete(Se.payload):ye.onError&&ye.onError()})}function U(se,Se){e+=1;var xe="processId_"+e;return t[xe]={onComplete:se,onError:Se},xe}function ne(se,Se,xe){J();var ye=U(Se,xe);I.postMessage({type:"loadAnimation",path:se,fullPath:window.location.origin+window.location.pathname,id:ye})}function ve(se,Se,xe){J();var ye=U(Se,xe);I.postMessage({type:"loadData",path:se,fullPath:window.location.origin+window.location.pathname,id:ye})}function be(se,Se,xe){J();var ye=U(Se,xe);I.postMessage({type:"complete",animation:se,id:ye})}return{loadAnimation:ne,loadData:ve,completeAnimation:be}}(),ImagePreloader=function(){var e=function(){var ge=createTag("canvas");ge.width=1,ge.height=1;var ie=ge.getContext("2d");return ie.fillStyle="rgba(0,0,0,0)",ie.fillRect(0,0,1,1),ge}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function M(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function I(ge,ie,ke){var Ee="";if(ge.e)Ee=ge.p;else if(ie){var Ce=ge.p;Ce.indexOf("images/")!==-1&&(Ce=Ce.split("/")[1]),Ee=ie+Ce}else Ee=ke,Ee+=ge.u?ge.u:"",Ee+=ge.p;return Ee}function V(ge){var ie=0,ke=setInterval(function(){var Ee=ge.getBBox();(Ee.width||ie>500)&&(this._imageLoaded(),clearInterval(ke)),ie+=1}.bind(this),50)}function N(ge){var ie=I(ge,this.assetsPath,this.path),ke=createNS("image");isSafari?this.testImageLoaded(ke):ke.addEventListener("load",this._imageLoaded,!1),ke.addEventListener("error",function(){Ee.img=e,this._imageLoaded()}.bind(this),!1),ke.setAttributeNS("http://www.w3.org/1999/xlink","href",ie),this._elementHelper.append?this._elementHelper.append(ke):this._elementHelper.appendChild(ke);var Ee={img:ke,assetData:ge};return Ee}function j(ge){var ie=I(ge,this.assetsPath,this.path),ke=createTag("img");ke.crossOrigin="anonymous",ke.addEventListener("load",this._imageLoaded,!1),ke.addEventListener("error",function(){Ee.img=e,this._imageLoaded()}.bind(this),!1),ke.src=ie;var Ee={img:ke,assetData:ge};return Ee}function J(ge){var ie={assetData:ge},ke=I(ge,this.assetsPath,this.path);return dataManager.loadData(ke,function(Ee){ie.img=Ee,this._footageLoaded()}.bind(this),function(){ie.img={},this._footageLoaded()}.bind(this)),ie}function U(ge,ie){this.imagesLoadedCb=ie;var ke,Ee=ge.length;for(ke=0;ke<Ee;ke+=1)ge[ke].layers||(!ge[ke].t||ge[ke].t==="seq"?(this.totalImages+=1,this.images.push(this._createImageData(ge[ke]))):ge[ke].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(ge[ke]))))}function ne(ge){this.path=ge||""}function ve(ge){this.assetsPath=ge||""}function be(ge){for(var ie=0,ke=this.images.length;ie<ke;){if(this.images[ie].assetData===ge)return this.images[ie].img;ie+=1}return null}function se(){this.imagesLoadedCb=null,this.images.length=0}function Se(){return this.totalImages===this.loadedAssets}function xe(){return this.totalFootages===this.loadedFootagesCount}function ye(ge,ie){ge==="svg"?(this._elementHelper=ie,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}function Me(){this._imageLoaded=t.bind(this),this._footageLoaded=M.bind(this),this.testImageLoaded=V.bind(this),this.createFootageData=J.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return Me.prototype={loadAssets:U,setAssetsPath:ve,setPath:ne,loadedImages:Se,loadedFootages:xe,destroy:se,getAsset:be,createImgData:j,createImageData:N,imageLoaded:t,footageLoaded:M,setCacheType:ye},Me}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(e,t){if(this._cbs[e])for(var M=this._cbs[e],I=0;I<M.length;I+=1)M[I](t)},addEventListener:function(e,t){return this._cbs[e]||(this._cbs[e]=[]),this._cbs[e].push(t),function(){this.removeEventListener(e,t)}.bind(this)},removeEventListener:function(e,t){if(!t)this._cbs[e]=null;else if(this._cbs[e]){for(var M=0,I=this._cbs[e].length;M<I;)this._cbs[e][M]===t&&(this._cbs[e].splice(M,1),M-=1,I-=1),M+=1;this._cbs[e].length||(this._cbs[e]=null)}}};var markerParser=function(){function e(t){for(var M=t.split(`\r
|