@snabcentr/vue-ui-lib 4.4.1 → 4.4.2

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.
@@ -1,4 +1,4 @@
1
- (function(j,O){typeof exports=="object"&&typeof module<"u"?O(exports,require("lodash-es"),require("vue"),require("naive-ui"),require("@snabcentr/common-lib"),require("date-fns"),require("libphonenumber-js"),require("ts-case-convert"),require("vue-tel-input")):typeof define=="function"&&define.amd?define(["exports","lodash-es","vue","naive-ui","@snabcentr/common-lib","date-fns","libphonenumber-js","ts-case-convert","vue-tel-input"],O):(j=typeof globalThis<"u"?globalThis:j||self,O(j.SC_VueUiLib={},j["lodash-es"],j.Vue,j["naive-ui"],j["@snabcentr/common-lib"],j["date-fns"],j["libphonenumber-js"],j["ts-case-convert"],j["vue-tel-input"]))})(this,(function(j,O,i,D,Y,un,sr,Lo,Qh){"use strict";var kB=Object.defineProperty;var Uh=j=>{throw TypeError(j)};var vB=(j,O,i)=>O in j?kB(j,O,{enumerable:!0,configurable:!0,writable:!0,value:i}):j[O]=i;var B=(j,O,i)=>vB(j,typeof O!="symbol"?O+"":O,i),Kh=(j,O,i)=>O.has(j)||Uh("Cannot "+i);var Pt=(j,O,i)=>(Kh(j,O,"read from private field"),i?i.call(j):O.get(j)),qa=(j,O,i)=>O.has(j)?Uh("Cannot add the same private member more than once"):O instanceof WeakSet?O.add(j):O.set(j,i),Gh=(j,O,i,D)=>(Kh(j,O,"write to private field"),D?D.call(j,i):O.set(j,i),i);var Bi,ft,Ao;var Pe=(t=>(t.AttachedUser="attached_user",t.ClientInfo="client_info",t.ClientInfoShort="client_info_short",t.CreatedAt="created_at",t.ClientCity="client_city",t.DeliveryInfo="delivery_info",t.DeliveryDate="delivery_date",t.Id="id",t.PaymentType="payment_type",t.SalesDirections="sales_directions",t.Status="status",t.actions="actions",t))(Pe||{}),Qe=(t=>(t.phone="phone",t.tablet="tablet",t.laptop="laptop",t))(Qe||{});class ai{static isVnodeEmpty(e){return e.every(n=>n.type===i.Comment||n.type===i.Text&&O.isString(n.children)&&!n.children.trim()?!0:n.type===i.Fragment&&ai.isVnodeEmpty(n.children))}static hasSlotContent(e){return e?!ai.isVnodeEmpty(e()):!1}}const nt=(t,e=!1)=>{const{key:n}=t;if(!["Backspace","Delete","Tab","Escape","Enter","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(n)&&!((t.ctrlKey||t.metaKey)&&["a","c","v","x","z","ф","с","м","ч","я"].includes(n.toLowerCase()))){if(e&&n==="-"){const r=t.target;if((r.selectionStart??0)===0&&!r.value.includes("-"))return}/^\d$/.test(n)||t.preventDefault()}},Oi=(t,e=".",n=!1)=>{const{key:r}=t,o=t.target;["Backspace","Delete","Tab","Escape","Enter","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(r)||(t.ctrlKey||t.metaKey)&&["a","c","v","x","z","ф","с","м","ч","я"].includes(r.toLowerCase())||n&&r==="-"&&!o.value.includes("-")&&((o.selectionStart??0)===0||o.value.length===0)||(r===e||r===(e==="."?",":"."))&&!o.value.includes(e)&&!o.value.includes(e==="."?",":".")||/^\d$/.test(r)||t.preventDefault()},et=t=>t?Number.parseFloat(t.replace(",",".")):null,tt=(t,e)=>{t[e]={}},Me=t=>{const e=t.target;setTimeout(()=>{e.select()},100)};class Ft{static convertReferencesToOptionsList(e,n=!1,r=!1,o=!1,s=void 0,a=void 0){let l=e.map(c=>({label:s?s(c):c.name,value:c.id,item:c,disabled:a?a(c):!1}));return n&&(l=l.map(c=>`${c.label}-[${c.value}]`).sort().map(c=>l.find(d=>c===`${d.label}-[${d.value}]`))),r===!1?[...o?[{label:"",value:-1,disabled:!0}]:[],...l]:[...o?[{type:"group",label:"-",key:"default_group",children:[{label:"-- Отсутствует --",value:-1,disabled:!0}]}]:[],...Object.values(O.groupBy(l,r.key)).filter(c=>c.length>0).map(c=>{const d=c[0],u=O.isString(r.key)?O.get(d,r.key):r.key(c),h=O.isString(r.label)?O.get(d,r.label):r.label(c);return{type:"group",label:O.isEmpty(h)?"- Не определено -":h,key:`group_${u}`,children:c}})]}static convertReferencesToSelectOptionsList(e,n=!1,r=!1,o=!1,s=void 0,a=void 0){return Ft.convertReferencesToOptionsList(e,n,r,o,s,a)}static convertReferencesToAutocompleteOptionsList(e,n=!1,r=!1,o=!1,s=void 0,a=void 0){return Ft.convertReferencesToOptionsList(e,n,r,o,s,a)}}const Jh={required:{required:!0,type:"any",trigger:["blur","input"],message:"Это поле обязательно для заполнения"}},ae={required:{type:"number",required:!0,trigger:["blur","input"],message:"Это поле обязательно для заполнения"},min(t){return{type:"number",min:t,trigger:["blur","input"],message:`Минимальное значение: ${t}`}},max(t){return{type:"number",max:t,trigger:["blur","input"],message:`Максимальное значение: ${t}`}},step(t){return{type:"number",trigger:["blur","input"],validator:(e,n)=>n===null||Math.abs(n/t-Math.round(n/t))<1e-10?!0:new Error(`Значение должно быть кратно ${t}`)}}},ef={required:{required:!0,type:"date",trigger:["blur","input"],message:"Это поле обязательно для заполнения"}},We={serverValidation(t){return{validator:(e,n)=>n===null?!0:t?new Error(t):!0}}},tf={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function nf(t,e){return i.openBlock(),i.createElementBlock("svg",tf,[...e[0]||(e[0]=[i.createElementVNode("circle",{cx:"256",cy:"256",r:"48",fill:"currentColor"},null,-1),i.createElementVNode("circle",{cx:"256",cy:"416",r:"48",fill:"currentColor"},null,-1),i.createElementVNode("circle",{cx:"256",cy:"96",r:"48",fill:"currentColor"},null,-1)])])}const Ho=i.markRaw({name:"ion-ellipsis-vertical-sharp",render:nf}),rf={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function of(t,e){return i.openBlock(),i.createElementBlock("svg",rf,[...e[0]||(e[0]=[i.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[i.createElementVNode("path",{d:"M7 7H6a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2-2v-1"}),i.createElementVNode("path",{d:"M20.385 6.585a2.1 2.1 0 0 0-2.97-2.97L9 12v3h3zM16 5l3 3"})],-1)])])}const Ya=i.markRaw({name:"tabler-edit",render:of}),sf={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function af(t,e){return i.openBlock(),i.createElementBlock("svg",sf,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M258.9 48C141.92 46.42 46.42 141.92 48 258.9c1.56 112.19 92.91 203.54 205.1 205.1c117 1.6 212.48-93.9 210.88-210.88C462.44 140.91 371.09 49.56 258.9 48m-16.79 192.47l51.55-59a16 16 0 0 1 24.1 21.06l-51.55 59a16 16 0 1 1-24.1-21.06m-38.86 90.85a16 16 0 0 1-22.62 0l-47.95-48a16 16 0 1 1 22.64-22.62l48 48a16 16 0 0 1-.07 22.62m176.8-128.79l-111.88 128a16 16 0 0 1-11.51 5.47h-.54a16 16 0 0 1-11.32-4.69l-47.94-48a16 16 0 1 1 22.64-22.62l29.8 29.83a8 8 0 0 0 11.68-.39l95-108.66a16 16 0 0 1 24.1 21.06Z"},null,-1)])])}const Ua=i.markRaw({name:"ion-checkmark-done-circle",render:af}),lf={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function cf(t,e){return i.openBlock(),i.createElementBlock("svg",lf,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32",d:"M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192s192-86 192-192Z"},null,-1),i.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 192L256.13 320l-47.95-48m-16.23 48L144 272m161.71-80l-51.55 59"},null,-1)])])}const Ka=i.markRaw({name:"ion-checkmark-done-circle-outline",render:cf}),df={viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"};function uf(t,e){return i.openBlock(),i.createElementBlock("svg",df,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M22.15 3.237c-1.93-1.93-5.185-1.403-6.406 1.04l-3.175 6.35a1.5 1.5 0 0 1-.868.752L6.72 13.04a2 2 0 0 0-.782 3.312l4.149 4.149L4 26.586v1.415h1.414l6.086-6.086l4.149 4.149a2 2 0 0 0 3.311-.782l1.661-4.983a1.5 1.5 0 0 1 .752-.867l6.351-3.175c2.442-1.222 2.97-4.476 1.04-6.407zM17.533 5.17a2 2 0 0 1 3.203-.52l6.614 6.614a2 2 0 0 1-.52 3.203l-6.351 3.175a3.5 3.5 0 0 0-1.755 2.024l-1.661 4.982l-9.712-9.711l4.983-1.661a3.5 3.5 0 0 0 2.024-1.755z"},null,-1)])])}const hf=i.markRaw({name:"fluent-pin32-regular",render:uf}),ff={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function mf(t,e){return i.openBlock(),i.createElementBlock("svg",ff,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112"},null,-1),i.createElementVNode("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1)])])}const gf=i.markRaw({name:"ion-eye-outline",render:mf}),pf={viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"};function yf(t,e){return i.openBlock(),i.createElementBlock("svg",pf,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M15.744 4.276c1.221-2.442 4.476-2.97 6.406-1.04l6.614 6.614c1.93 1.93 1.402 5.186-1.04 6.406l-6.35 3.176a1.5 1.5 0 0 0-.753.867l-1.66 4.983a2 2 0 0 1-3.312.782l-4.149-4.15l-6.086 6.087H4v-1.415l6.086-6.085l-4.149-4.15a2 2 0 0 1 .782-3.31l4.982-1.662a1.5 1.5 0 0 0 .868-.752z"},null,-1)])])}const bf=i.markRaw({name:"fluent-pin32-filled",render:yf}),_f={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function wf(t,e){return i.openBlock(),i.createElementBlock("svg",_f,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M352 48H160a48 48 0 0 0-48 48v368l144-128l144 128V96a48 48 0 0 0-48-48"},null,-1)])])}const xf=i.markRaw({name:"ion-bookmark-outline",render:wf}),kf={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function vf(t,e){return i.openBlock(),i.createElementBlock("svg",kf,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"m63.998 86.005l21.998-21.998L447.999 426.01l-21.998 21.998zM259.34 192.09l60.57 60.57a64.07 64.07 0 0 0-60.57-60.57m-6.68 127.82l-60.57-60.57a64.07 64.07 0 0 0 60.57 60.57"},null,-1),i.createElementVNode("path",{fill:"currentColor",d:"M256 352a96 96 0 0 1-92.6-121.34l-69.07-69.08C66.12 187.42 39.24 221.14 16 256c26.42 44 62.56 89.24 100.2 115.18C159.38 400.92 206.33 416 255.76 416A233.5 233.5 0 0 0 335 402.2l-53.61-53.6A95.8 95.8 0 0 1 256 352m0-192a96 96 0 0 1 92.6 121.34L419.26 352c29.15-26.25 56.07-61.56 76.74-96c-26.38-43.43-62.9-88.56-101.18-114.82C351.1 111.2 304.31 96 255.76 96a222.9 222.9 0 0 0-78.21 14.29l53.11 53.11A95.8 95.8 0 0 1 256 160"},null,-1)])])}const Cf=i.markRaw({name:"ion-eye-off-sharp",render:vf}),Sf={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function Bf(t,e){return i.openBlock(),i.createElementBlock("svg",Sf,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"48",d:"m184 112l144 144l-144 144"},null,-1)])])}const Tf=i.markRaw({name:"ion-chevron-forward-outline",render:Bf}),Nf=["data-name"],$f={class:"sc-collapse-item-header flex flex-row gap-2.5"},Rf={class:"sc-collapse-item-arrow flex-none cursor-pointer pt-1.5"},Ef={key:0},Pf={class:"sc-collapse-item-pre-arrow flex flex-none flex-row gap-1"},Ff={class:"flex flex-1 flex-col"},Vf={key:0,class:"sc-collapse-item-sub-title flex-1"},If={key:1,class:"sc-collapse-item-title-extra flex-none"},Mf={key:0,class:"sc-collapse-item-content"},Af={},Of=i.defineComponent({...Af,__name:"collapse-item",props:{name:{default:""},title:{default:""},disabled:{type:Boolean,default:!1}},emits:["header:click"],setup(t,{expose:e,emit:n}){const r=t,o=n,s=i.inject("itemHeaderClickHandler",O.noop),a=i.inject("defaultExpandedNames",[]),l=i.inject("expandedNames",[]),c=O.some(a,p=>p===r.name),d=i.computed(()=>O.some(l,p=>p===r.name)),u=i.ref(c),h=()=>{r.disabled||(u.value=d.value||!u.value,o("header:click",r.name,u.value),s(r.name,u.value))};return e({expand:()=>{!r.disabled&&!u.value&&(u.value=!0,o("header:click",r.name,u.value),s(r.name,u.value))},toggle:()=>{r.disabled||h()},collapse:()=>{!r.disabled&&u.value&&!d.value&&(u.value=!1,o("header:click",r.name,u.value),s(r.name,u.value))},expanded:i.readonly(u)}),(p,y)=>{const b=Tf;return i.openBlock(),i.createElementBlock("div",{"data-name":t.name,class:i.normalizeClass([{"cursor-not-allowed text-gray-400":t.disabled},"sc-collapse-item flex flex-col p-2"])},[i.createElementVNode("div",$f,[i.createElementVNode("div",Rf,[i.createElementVNode("div",{class:i.normalizeClass({"rotate-90":u.value}),onClick:h},[i.renderSlot(p.$slots,"arrow",{},()=>[i.createVNode(b)],!0)],2)]),i.unref(ai).hasSlotContent(p.$slots["pre-arrow"])?(i.openBlock(),i.createElementBlock("div",Ef,[i.createElementVNode("div",Pf,[i.renderSlot(p.$slots,"pre-arrow",{},void 0,!0)])])):i.createCommentVNode("",!0),i.createElementVNode("div",Ff,[i.createElementVNode("div",{class:"sc-collapse-item-title flex flex-1 cursor-pointer flex-col text-lg font-semibold",onClick:h},[i.renderSlot(p.$slots,"header",{},()=>[i.createTextVNode(i.toDisplayString(t.title),1)],!0)]),i.unref(ai).hasSlotContent(p.$slots["sub-header"])?(i.openBlock(),i.createElementBlock("div",Vf,[i.renderSlot(p.$slots,"sub-header",{},void 0,!0)])):i.createCommentVNode("",!0)]),i.unref(ai).hasSlotContent(p.$slots["header-extra"])?(i.openBlock(),i.createElementBlock("div",If,[i.renderSlot(p.$slots,"header-extra",{},void 0,!0)])):i.createCommentVNode("",!0)]),i.createVNode(i.Transition,{name:"fade"},{default:i.withCtx(()=>[d.value||u.value?(i.openBlock(),i.createElementBlock("div",Mf,[i.renderSlot(p.$slots,"default",{},void 0,!0)])):i.createCommentVNode("",!0)]),_:3})],10,Nf)}}}),Wn=(t,e)=>{const n=t.__vccOpts||t;for(const[r,o]of e)n[r]=o;return n},Ga=Wn(Of,[["__scopeId","data-v-f1311d1c"]]),zf={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function Df(t,e){return i.openBlock(),i.createElementBlock("svg",zf,[...e[0]||(e[0]=[i.createElementVNode("circle",{cx:"176",cy:"416",r:"16",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),i.createElementVNode("circle",{cx:"400",cy:"416",r:"16",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),i.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M48 80h64l48 272h256"},null,-1),i.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M160 288h249.44a8 8 0 0 0 7.85-6.43l28.8-144a8 8 0 0 0-7.85-9.57H128"},null,-1)])])}const Za=i.markRaw({name:"ion-cart-outline",render:Df}),ar=Symbol(),Lf={Button:{border:"1px solid grey"},Card:{paddingMedium:"1rem"},Checkbox:{border:"1px solid rgb(12, 88, 32)"},Common:{borderRadius:"0.5rem",borderRadiusSmall:"0.25rem",fontWeight:"500",fontWeightStrong:"600",fontSize:"0.75rem",fontSizeMedium:"0.75rem",fontSizeLarge:"0.8125rem",lineHeight:"1.25rem",heightSmall:"24px",heightMedium:"30px",heightTiny:"20px",heightLarge:"36px",heightHuge:"42px",primaryColor:"#FFCC40FF",primaryColorHover:"#FFE49BFF",primaryColorPressed:"#FFBB00FF",primaryColorSuppl:"#FCC42AFF",successColor:"#4AC99BFF",successColorHover:"#4AC99BBF",successColorPressed:"#21AA78FF",errorColor:"#F45725FF",errorColorHover:"#F4572599",textColorBase:"#191C30E5",textColorDisabled:"#191C30E5"},DataTable:{borderColor:"rgb(207, 207, 207)",lineHeight:1.4,tdColorHover:"rgb(250,250,250)",thColor:"rgb(231, 231, 231)",thFontWeight:400,thPaddingMedium:"8px",tdPaddingMedium:"8px",thTextColor:"rgb(22, 0, 108)"},Drawer:{closeIconColor:"rgba(31, 34, 37, 1)",closeIconColorHover:"rgba(10, 157, 5, 1)"},Form:{marginBottom:0,lineHeight:1,labelFontSizeTopMedium:"0.75rem",labelHeightMedium:"20px",labelFontWeight:500,labelTextColor:"rgba(27, 31, 59, 0.65)",labelPaddingVertical:"0",labelPaddingHorizontal:"0"},Input:{paddingMedium:"0.5rem",fontSizeMedium:"0.9125rem",lineHeight:"1.25rem",lineHeightTextarea:"1.25rem",border:"1px solid #E0E0E0",borderRadius:"0.5rem",iconSize:"1,125rem"},Tabs:{tabFontSizeMedium:"0.9375rem",tabColorSegment:"#FFCC40FF",tabBorderColor:"#CCCCCCFF"}},Hf={class:"flex flex-col-reverse gap-2.5 sm:flex-row"},Wf={},Qa=i.defineComponent({...Wf,__name:"product-actions",props:{eventEmitter:{},showProductAddToCartButton:{type:[Boolean,String,Function],default:!1},showProductEditButton:{type:[Boolean,String,Function],default:!1},showProductRequiredButton:{type:[Boolean,String,Function],default:!1},productContextButtonsConfig:{type:Function,default:void 0},product:{}},setup(t){const e=t,n=i.inject(ar,"medium"),r=i.computed(()=>O.isFunction(e.showProductAddToCartButton)?e.showProductAddToCartButton(e.product):e.showProductAddToCartButton),o=i.computed(()=>O.isFunction(e.showProductEditButton)?e.showProductEditButton(e.product):e.showProductEditButton),s=i.computed(()=>O.isFunction(e.showProductRequiredButton)?e.showProductRequiredButton(e.product):e.showProductRequiredButton),a=i.computed(()=>O.isNil(e.productContextButtonsConfig)?[]:O.isFunction(e.productContextButtonsConfig)?e.productContextButtonsConfig(e.product):e.productContextButtonsConfig),l=()=>{e.eventEmitter.emit("product:add-to-cart",{product:e.product})},c=()=>{e.eventEmitter.emit("product:edit",{product:e.product})},d=()=>{e.eventEmitter.emit("product:required",{product:e.product})},u=h=>{e.eventEmitter.emit("product:context-select",{product:e.product,key:h})};return(h,f)=>{var R;const g=Ka,m=Ua,p=D.NButton,y=D.NTooltip,b=Ya,_=Za,S=Ho,k=D.NDropdown;return i.openBlock(),i.createElementBlock("div",Hf,[s.value?(i.openBlock(),i.createBlock(y,{key:0,placement:"bottom",trigger:"hover"},{trigger:i.withCtx(()=>[i.createVNode(p,{ghost:!0,size:i.unref(n),disabled:s.value==="disabled",type:t.product.isRequired?"primary":"default",onClick:d},{default:i.withCtx(()=>[t.product.isRequired?(i.openBlock(),i.createBlock(m,{key:1})):(i.openBlock(),i.createBlock(g,{key:0}))]),_:1},8,["size","disabled","type"])]),default:i.withCtx(()=>[f[0]||(f[0]=i.createTextVNode(" Товар, который нужно предлагать клиенту ",-1))]),_:1})):i.createCommentVNode("",!0),o.value?(i.openBlock(),i.createBlock(y,{key:1,placement:"bottom",trigger:"hover"},{trigger:i.withCtx(()=>[i.createVNode(p,{ghost:!0,size:i.unref(n),type:"primary",disabled:o.value==="disabled",onClick:c},{default:i.withCtx(()=>[i.createVNode(b)]),_:1},8,["size","disabled"])]),default:i.withCtx(()=>[f[1]||(f[1]=i.createTextVNode(" Редактировать ",-1))]),_:1})):i.createCommentVNode("",!0),r.value?(i.openBlock(),i.createBlock(y,{key:2,placement:"bottom",trigger:"hover"},{trigger:i.withCtx(()=>[i.createVNode(p,{ghost:!0,size:i.unref(n),disabled:r.value==="disabled",type:"primary",onClick:l},{default:i.withCtx(()=>[i.createVNode(_)]),_:1},8,["size","disabled"])]),default:i.withCtx(()=>[f[2]||(f[2]=i.createTextVNode(" Добавить в корзину ",-1))]),_:1})):i.createCommentVNode("",!0),((R=a.value)==null?void 0:R.length)>0?(i.openBlock(),i.createBlock(k,{key:3,options:a.value,size:i.unref(n),trigger:"click",onSelect:u},{default:i.withCtx(()=>[i.createVNode(p,{ghost:!0,size:i.unref(n),type:"primary"},{default:i.withCtx(()=>[i.createVNode(S)]),_:1},8,["size"])]),_:1},8,["options","size"])):i.createCommentVNode("",!0)])}}}),jf={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function qf(t,e){return i.openBlock(),i.createElementBlock("svg",jf,[...e[0]||(e[0]=[i.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[i.createElementVNode("path",{d:"M12 8v4l2 2"}),i.createElementVNode("path",{d:"M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5"})],-1)])])}const Xf=i.markRaw({name:"tabler-history",render:qf}),Yf={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Uf(t,e){return i.openBlock(),i.createElementBlock("svg",Yf,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"m18.5 3.5l2 2l-15 15l-2-2zM7 4c1.66 0 3 1.34 3 3s-1.34 3-3 3s-3-1.34-3-3s1.34-3 3-3m10 10c1.66 0 3 1.34 3 3s-1.34 3-3 3s-3-1.34-3-3s1.34-3 3-3M7 6c-.55 0-1 .45-1 1s.45 1 1 1s1-.45 1-1s-.45-1-1-1m10 10c-.55 0-1 .45-1 1s.45 1 1 1s1-.45 1-1s-.45-1-1-1"},null,-1)])])}const Kf=i.markRaw({name:"mdi-percent-outline",render:Uf}),Gf={class:"flex flex-row gap-1"},Zf={key:0,class:"flex gap-1"},Qf={key:0,class:"flex text-nowrap text-sm line-through"},Jf={key:1,class:"flex flex-row text-nowrap text-sm"},em={key:2,class:"flex flex-row gap-1 text-nowrap text-sm text-gray-600"},tm={},jn=i.defineComponent({...tm,__name:"product-cost",props:{product:{},additionalThroughFieldName:{},costFieldName:{},eventEmitter:{},allowPriceClick:{type:[Boolean,Function],default:!1},showTag:{type:Boolean,default:!1},showQuantityUnit:{type:Boolean,default:!1},showCostDate:{type:Boolean,default:!1},showPriceHistory:{type:Boolean,default:!1},currencyRates:{default:void 0}},setup(t){var y;const e=t,n=i.computed(()=>"product"in e.product),r=i.computed(()=>"product"in e.product?e.product.product:e.product),o=i.computed(()=>O.find(r.value.priceCoefficients,["coefficient.slug",e.costFieldName])),s=i.computed(()=>{const b=O.find(r.value.priceCoefficients,["coefficient.slug","k0"]);return o.value||!b||O.isNil(l.value)||O.isNil(b.cost)?!1:l.value<b.cost}),a=((y=Y.useBaseConfigStateStore().getConfig())==null?void 0:y.defaultCurrency)??"RUB",l=i.computed(()=>o.value?o.value.cost:O.get(e.product,e.costFieldName)),c=i.computed(()=>e.additionalThroughFieldName?O.get(e.product,e.additionalThroughFieldName):void 0),d=i.computed(()=>r.value.costDate?un.format(r.value.costDate,Y.useBaseConfigStateStore().config.dateFormats.uiDate):void 0),u=i.computed(()=>e.currencyRates||r.value.currency.signature===a?e.currencyRates:{[r.value.currency.signature]:r.value.costRub/r.value.cost}),h=i.computed(()=>(O.isFunction(e.allowPriceClick)?e.allowPriceClick(r.value):e.allowPriceClick)&&!O.isNil(l.value)),f=i.computed(()=>O.isNil(l.value)?"-":new Intl.NumberFormat("ru-RU",{style:"decimal",minimumFractionDigits:2}).format(Number.parseFloat(l.value))),g=i.computed(()=>{if(r.value.currency.signature===a||!u.value||!u.value[r.value.currency.signature])return null;const b=u.value[r.value.currency.signature];return new Intl.NumberFormat("ru-RU",{style:"decimal",minimumFractionDigits:2}).format(Number.parseFloat(l.value)*b)}),m=i.computed(()=>O.isNil(c.value)?null:new Intl.NumberFormat("ru-RU",{style:"decimal",minimumFractionDigits:2}).format(c.value)),p=i.computed(()=>{if(!c.value||!l.value||c.value===l.value||l.value===0)return null;const b=(l.value-c.value)/c.value*100;return new Intl.NumberFormat("ru-RU",{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}).format(b)});return(b,_)=>{var x;const S=D.NTag,k=D.NTooltip,R=Kf,$=Xf;return i.openBlock(),i.createElementBlock("div",Gf,[t.showTag?(i.openBlock(),i.createBlock(k,{key:0},{trigger:i.withCtx(()=>[i.createVNode(S,{round:"",bordered:!1,size:"small",class:i.normalizeClass(["text-slate-600",{"font-bold":!o.value}])},{default:i.withCtx(()=>{var C;return[i.createTextVNode(i.toDisplayString(((C=o.value)==null?void 0:C.coefficient.slug)??"Ц"),1)]}),_:1},8,["class"])]),default:i.withCtx(()=>{var C;return[i.createTextVNode(" "+i.toDisplayString(((C=o.value)==null?void 0:C.coefficient.name)??"Розничная цена"),1)]}),_:1})):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass({"!text-red-600":s.value})},[c.value&&c.value!==l.value||p.value?(i.openBlock(),i.createElementBlock("div",Zf,[c.value&&c.value!==l.value?(i.openBlock(),i.createElementBlock("span",Qf,i.toDisplayString(m.value)+" "+i.toDisplayString(t.showQuantityUnit?` ${r.value.currency.symbol}/${r.value.unit.name}`:""),1)):i.createCommentVNode("",!0),p.value?(i.openBlock(),i.createElementBlock("span",{key:1,class:i.normalizeClass(["flex text-nowrap text-sm text-gray-600",{"!text-red-600":s.value}])}," ("+i.toDisplayString(p.value)+"%) ",3)):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),i.createElementVNode("span",{class:i.normalizeClass(["whitespace-nowrap text-base flex items-center gap-1",{"text-gray-600":(x=o.value)==null?void 0:x.readOnly,"font-bold":!o.value&&!n.value}])},[i.createElementVNode("span",{class:i.normalizeClass({"text-nowrap":!0,"cursor-pointer underline decoration-dashed":h.value&&t.eventEmitter}),onClick:_[0]||(_[0]=()=>{var C;h.value&&((C=t.eventEmitter)==null||C.emit("cost:click",{product:r.value,cost:l.value}))})},i.toDisplayString(f.value),3),i.createTextVNode(" "+i.toDisplayString(t.showQuantityUnit?` ${r.value.currency.symbol}/${r.value.unit.name}`:"")+" ",1),l.value&&!o.value&&"discount"in t.product&&t.product.discount?(i.openBlock(),i.createBlock(k,{key:0},{trigger:i.withCtx(()=>[i.createVNode(R,{class:"text-sm text-black bg-amber-400 rounded p-px"})]),default:i.withCtx(()=>[i.createElementVNode("span",null,' На продукт действует скидка "'+i.toDisplayString(t.product.discount.name)+'"; ',1)]),_:1})):i.createCommentVNode("",!0)],2),g.value?(i.openBlock(),i.createElementBlock("span",Jf," ~ "+i.toDisplayString(g.value)+" "+i.toDisplayString(t.showQuantityUnit?`₽/${r.value.unit.name}`:""),1)):i.createCommentVNode("",!0),t.showCostDate&&!i.unref(O.isNil)(d.value)?(i.openBlock(),i.createElementBlock("span",em,[i.createTextVNode(i.toDisplayString(d.value)+" ",1),t.showPriceHistory&&t.eventEmitter?(i.openBlock(),i.createBlock(k,{key:0,placement:"top-end"},{trigger:i.withCtx(()=>[i.createVNode($,{class:"cursor-pointer",onClick:_[1]||(_[1]=C=>{var w;return(w=t.eventEmitter)==null?void 0:w.emit("cost:show-price-history",{product:r.value})})})]),default:i.withCtx(()=>[_[2]||(_[2]=i.createTextVNode(" История цен ",-1))]),_:1})):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)],2)])}}}),nm={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function im(t,e){return i.openBlock(),i.createElementBlock("svg",nm,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32",d:"M248 64C146.39 64 64 146.39 64 248s82.39 184 184 184s184-82.39 184-184S349.61 64 248 64Z"},null,-1),i.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M220 220h32v116"},null,-1),i.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32",d:"M208 340h88"},null,-1),i.createElementVNode("path",{fill:"currentColor",d:"M248 130a26 26 0 1 0 26 26a26 26 0 0 0-26-26"},null,-1)])])}const Wo=i.markRaw({name:"ion-information-circle-outline",render:im}),rm={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function om(t,e){return i.openBlock(),i.createElementBlock("svg",rm,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M450.29 112H142c-34 0-62 27.51-62 61.33v245.34c0 33.82 28 61.33 62 61.33h308c34 0 62-26.18 62-60V173.33c0-33.82-27.68-61.33-61.71-61.33m-77.15 61.34a46 46 0 1 1-46.28 46a46.19 46.19 0 0 1 46.28-46.01Zm-231.55 276c-17 0-29.86-13.75-29.86-30.66v-64.83l90.46-80.79a46.54 46.54 0 0 1 63.44 1.83L328.27 337l-113 112.33ZM480 418.67a30.67 30.67 0 0 1-30.71 30.66H259L376.08 333a46.24 46.24 0 0 1 59.44-.16L480 370.59Z"},null,-1),i.createElementVNode("path",{fill:"currentColor",d:"M384 32H64A64 64 0 0 0 0 96v256a64.11 64.11 0 0 0 48 62V152a72 72 0 0 1 72-72h326a64.11 64.11 0 0 0-62-48"},null,-1)])])}const Ja=i.markRaw({name:"ion-images",render:om}),sm={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function am(t,e){return i.openBlock(),i.createElementBlock("svg",sm,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M256 56C145.72 56 56 145.72 56 256s89.72 200 200 200s200-89.72 200-200S366.28 56 256 56m0 82a26 26 0 1 1-26 26a26 26 0 0 1 26-26m48 226h-88a16 16 0 0 1 0-32h28v-88h-16a16 16 0 0 1 0-32h32a16 16 0 0 1 16 16v104h28a16 16 0 0 1 0 32"},null,-1)])])}const lm=i.markRaw({name:"ion-information-circle",render:am}),cm={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function dm(t,e){return i.openBlock(),i.createElementBlock("svg",cm,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M400 480a16 16 0 0 1-10.63-4L256 357.41L122.63 476A16 16 0 0 1 96 464V96a64.07 64.07 0 0 1 64-64h192a64.07 64.07 0 0 1 64 64v368a16 16 0 0 1-16 16"},null,-1)])])}const um=i.markRaw({name:"ion-bookmark",render:dm});/*!
1
+ (function(j,O){typeof exports=="object"&&typeof module<"u"?O(exports,require("lodash-es"),require("vue"),require("naive-ui"),require("@snabcentr/common-lib"),require("date-fns"),require("libphonenumber-js"),require("ts-case-convert"),require("vue-tel-input")):typeof define=="function"&&define.amd?define(["exports","lodash-es","vue","naive-ui","@snabcentr/common-lib","date-fns","libphonenumber-js","ts-case-convert","vue-tel-input"],O):(j=typeof globalThis<"u"?globalThis:j||self,O(j.SC_VueUiLib={},j["lodash-es"],j.Vue,j["naive-ui"],j["@snabcentr/common-lib"],j["date-fns"],j["libphonenumber-js"],j["ts-case-convert"],j["vue-tel-input"]))})(this,(function(j,O,i,D,Y,un,sr,Lo,Qh){"use strict";var SB=Object.defineProperty;var Uh=j=>{throw TypeError(j)};var BB=(j,O,i)=>O in j?SB(j,O,{enumerable:!0,configurable:!0,writable:!0,value:i}):j[O]=i;var B=(j,O,i)=>BB(j,typeof O!="symbol"?O+"":O,i),Kh=(j,O,i)=>O.has(j)||Uh("Cannot "+i);var Pt=(j,O,i)=>(Kh(j,O,"read from private field"),i?i.call(j):O.get(j)),qa=(j,O,i)=>O.has(j)?Uh("Cannot add the same private member more than once"):O instanceof WeakSet?O.add(j):O.set(j,i),Gh=(j,O,i,D)=>(Kh(j,O,"write to private field"),D?D.call(j,i):O.set(j,i),i);var Bi,ft,Ao;var Pe=(t=>(t.AttachedUser="attached_user",t.ClientInfo="client_info",t.ClientInfoShort="client_info_short",t.CreatedAt="created_at",t.ClientCity="client_city",t.DeliveryInfo="delivery_info",t.DeliveryDate="delivery_date",t.Id="id",t.PaymentType="payment_type",t.SalesDirections="sales_directions",t.Status="status",t.actions="actions",t))(Pe||{}),Qe=(t=>(t.phone="phone",t.tablet="tablet",t.laptop="laptop",t))(Qe||{});class ai{static isVnodeEmpty(e){return e.every(n=>n.type===i.Comment||n.type===i.Text&&O.isString(n.children)&&!n.children.trim()?!0:n.type===i.Fragment&&ai.isVnodeEmpty(n.children))}static hasSlotContent(e){return e?!ai.isVnodeEmpty(e()):!1}}const nt=(t,e=!1)=>{const{key:n}=t;if(!["Backspace","Delete","Tab","Escape","Enter","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(n)&&!((t.ctrlKey||t.metaKey)&&["a","c","v","x","z","ф","с","м","ч","я"].includes(n.toLowerCase()))){if(e&&n==="-"){const r=t.target;if((r.selectionStart??0)===0&&!r.value.includes("-"))return}/^\d$/.test(n)||t.preventDefault()}},Oi=(t,e=".",n=!1)=>{const{key:r}=t,o=t.target;["Backspace","Delete","Tab","Escape","Enter","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(r)||(t.ctrlKey||t.metaKey)&&["a","c","v","x","z","ф","с","м","ч","я"].includes(r.toLowerCase())||n&&r==="-"&&!o.value.includes("-")&&((o.selectionStart??0)===0||o.value.length===0)||(r===e||r===(e==="."?",":"."))&&!o.value.includes(e)&&!o.value.includes(e==="."?",":".")||/^\d$/.test(r)||t.preventDefault()},et=t=>t?Number.parseFloat(t.replace(",",".")):null,tt=(t,e)=>{t[e]={}},Me=t=>{const e=t.target;setTimeout(()=>{e.select()},100)};class Ft{static convertReferencesToOptionsList(e,n=!1,r=!1,o=!1,s=void 0,a=void 0){let l=e.map(c=>({label:s?s(c):c.name,value:c.id,item:c,disabled:a?a(c):!1}));return n&&(l=l.map(c=>`${c.label}-[${c.value}]`).sort().map(c=>l.find(d=>c===`${d.label}-[${d.value}]`))),r===!1?[...o?[{label:"",value:-1,disabled:!0}]:[],...l]:[...o?[{type:"group",label:"-",key:"default_group",children:[{label:"-- Отсутствует --",value:-1,disabled:!0}]}]:[],...Object.values(O.groupBy(l,r.key)).filter(c=>c.length>0).map(c=>{const d=c[0],u=O.isString(r.key)?O.get(d,r.key):r.key(c),h=O.isString(r.label)?O.get(d,r.label):r.label(c);return{type:"group",label:O.isEmpty(h)?"- Не определено -":h,key:`group_${u}`,children:c}})]}static convertReferencesToSelectOptionsList(e,n=!1,r=!1,o=!1,s=void 0,a=void 0){return Ft.convertReferencesToOptionsList(e,n,r,o,s,a)}static convertReferencesToAutocompleteOptionsList(e,n=!1,r=!1,o=!1,s=void 0,a=void 0){return Ft.convertReferencesToOptionsList(e,n,r,o,s,a)}}const Jh={required:{required:!0,type:"any",trigger:["blur","input"],message:"Это поле обязательно для заполнения"}},ae={required:{type:"number",required:!0,trigger:["blur","input"],message:"Это поле обязательно для заполнения"},min(t){return{type:"number",min:t,trigger:["blur","input"],message:`Минимальное значение: ${t}`}},max(t){return{type:"number",max:t,trigger:["blur","input"],message:`Максимальное значение: ${t}`}},step(t){return{type:"number",trigger:["blur","input"],validator:(e,n)=>n===null||Math.abs(n/t-Math.round(n/t))<1e-10?!0:new Error(`Значение должно быть кратно ${t}`)}}},ef={required:{required:!0,type:"date",trigger:["blur","input"],message:"Это поле обязательно для заполнения"}},We={serverValidation(t){return{validator:(e,n)=>n===null?!0:t?new Error(t):!0}}},tf={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function nf(t,e){return i.openBlock(),i.createElementBlock("svg",tf,[...e[0]||(e[0]=[i.createElementVNode("circle",{cx:"256",cy:"256",r:"48",fill:"currentColor"},null,-1),i.createElementVNode("circle",{cx:"256",cy:"416",r:"48",fill:"currentColor"},null,-1),i.createElementVNode("circle",{cx:"256",cy:"96",r:"48",fill:"currentColor"},null,-1)])])}const Ho=i.markRaw({name:"ion-ellipsis-vertical-sharp",render:nf}),rf={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function of(t,e){return i.openBlock(),i.createElementBlock("svg",rf,[...e[0]||(e[0]=[i.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[i.createElementVNode("path",{d:"M7 7H6a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2-2v-1"}),i.createElementVNode("path",{d:"M20.385 6.585a2.1 2.1 0 0 0-2.97-2.97L9 12v3h3zM16 5l3 3"})],-1)])])}const Ya=i.markRaw({name:"tabler-edit",render:of}),sf={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function af(t,e){return i.openBlock(),i.createElementBlock("svg",sf,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M258.9 48C141.92 46.42 46.42 141.92 48 258.9c1.56 112.19 92.91 203.54 205.1 205.1c117 1.6 212.48-93.9 210.88-210.88C462.44 140.91 371.09 49.56 258.9 48m-16.79 192.47l51.55-59a16 16 0 0 1 24.1 21.06l-51.55 59a16 16 0 1 1-24.1-21.06m-38.86 90.85a16 16 0 0 1-22.62 0l-47.95-48a16 16 0 1 1 22.64-22.62l48 48a16 16 0 0 1-.07 22.62m176.8-128.79l-111.88 128a16 16 0 0 1-11.51 5.47h-.54a16 16 0 0 1-11.32-4.69l-47.94-48a16 16 0 1 1 22.64-22.62l29.8 29.83a8 8 0 0 0 11.68-.39l95-108.66a16 16 0 0 1 24.1 21.06Z"},null,-1)])])}const Ua=i.markRaw({name:"ion-checkmark-done-circle",render:af}),lf={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function cf(t,e){return i.openBlock(),i.createElementBlock("svg",lf,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32",d:"M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192s192-86 192-192Z"},null,-1),i.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 192L256.13 320l-47.95-48m-16.23 48L144 272m161.71-80l-51.55 59"},null,-1)])])}const Ka=i.markRaw({name:"ion-checkmark-done-circle-outline",render:cf}),df={viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"};function uf(t,e){return i.openBlock(),i.createElementBlock("svg",df,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M22.15 3.237c-1.93-1.93-5.185-1.403-6.406 1.04l-3.175 6.35a1.5 1.5 0 0 1-.868.752L6.72 13.04a2 2 0 0 0-.782 3.312l4.149 4.149L4 26.586v1.415h1.414l6.086-6.086l4.149 4.149a2 2 0 0 0 3.311-.782l1.661-4.983a1.5 1.5 0 0 1 .752-.867l6.351-3.175c2.442-1.222 2.97-4.476 1.04-6.407zM17.533 5.17a2 2 0 0 1 3.203-.52l6.614 6.614a2 2 0 0 1-.52 3.203l-6.351 3.175a3.5 3.5 0 0 0-1.755 2.024l-1.661 4.982l-9.712-9.711l4.983-1.661a3.5 3.5 0 0 0 2.024-1.755z"},null,-1)])])}const hf=i.markRaw({name:"fluent-pin32-regular",render:uf}),ff={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function mf(t,e){return i.openBlock(),i.createElementBlock("svg",ff,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112"},null,-1),i.createElementVNode("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1)])])}const gf=i.markRaw({name:"ion-eye-outline",render:mf}),pf={viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"};function yf(t,e){return i.openBlock(),i.createElementBlock("svg",pf,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M15.744 4.276c1.221-2.442 4.476-2.97 6.406-1.04l6.614 6.614c1.93 1.93 1.402 5.186-1.04 6.406l-6.35 3.176a1.5 1.5 0 0 0-.753.867l-1.66 4.983a2 2 0 0 1-3.312.782l-4.149-4.15l-6.086 6.087H4v-1.415l6.086-6.085l-4.149-4.15a2 2 0 0 1 .782-3.31l4.982-1.662a1.5 1.5 0 0 0 .868-.752z"},null,-1)])])}const bf=i.markRaw({name:"fluent-pin32-filled",render:yf}),_f={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function wf(t,e){return i.openBlock(),i.createElementBlock("svg",_f,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M352 48H160a48 48 0 0 0-48 48v368l144-128l144 128V96a48 48 0 0 0-48-48"},null,-1)])])}const xf=i.markRaw({name:"ion-bookmark-outline",render:wf}),kf={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function vf(t,e){return i.openBlock(),i.createElementBlock("svg",kf,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"m63.998 86.005l21.998-21.998L447.999 426.01l-21.998 21.998zM259.34 192.09l60.57 60.57a64.07 64.07 0 0 0-60.57-60.57m-6.68 127.82l-60.57-60.57a64.07 64.07 0 0 0 60.57 60.57"},null,-1),i.createElementVNode("path",{fill:"currentColor",d:"M256 352a96 96 0 0 1-92.6-121.34l-69.07-69.08C66.12 187.42 39.24 221.14 16 256c26.42 44 62.56 89.24 100.2 115.18C159.38 400.92 206.33 416 255.76 416A233.5 233.5 0 0 0 335 402.2l-53.61-53.6A95.8 95.8 0 0 1 256 352m0-192a96 96 0 0 1 92.6 121.34L419.26 352c29.15-26.25 56.07-61.56 76.74-96c-26.38-43.43-62.9-88.56-101.18-114.82C351.1 111.2 304.31 96 255.76 96a222.9 222.9 0 0 0-78.21 14.29l53.11 53.11A95.8 95.8 0 0 1 256 160"},null,-1)])])}const Cf=i.markRaw({name:"ion-eye-off-sharp",render:vf}),Sf={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function Bf(t,e){return i.openBlock(),i.createElementBlock("svg",Sf,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"48",d:"m184 112l144 144l-144 144"},null,-1)])])}const Tf=i.markRaw({name:"ion-chevron-forward-outline",render:Bf}),Nf=["data-name"],$f={class:"sc-collapse-item-header flex flex-row gap-2.5"},Rf={class:"sc-collapse-item-arrow flex-none cursor-pointer pt-1.5"},Ef={key:0},Pf={class:"sc-collapse-item-pre-arrow flex flex-none flex-row gap-1"},Ff={class:"flex flex-1 flex-col"},Vf={key:0,class:"sc-collapse-item-sub-title flex-1"},If={key:1,class:"sc-collapse-item-title-extra flex-none"},Mf={key:0,class:"sc-collapse-item-content"},Af={},Of=i.defineComponent({...Af,__name:"collapse-item",props:{name:{default:""},title:{default:""},disabled:{type:Boolean,default:!1}},emits:["header:click"],setup(t,{expose:e,emit:n}){const r=t,o=n,s=i.inject("itemHeaderClickHandler",O.noop),a=i.inject("defaultExpandedNames",[]),l=i.inject("expandedNames",[]),c=O.some(a,p=>p===r.name),d=i.computed(()=>O.some(l,p=>p===r.name)),u=i.ref(c),h=()=>{r.disabled||(u.value=d.value||!u.value,o("header:click",r.name,u.value),s(r.name,u.value))};return e({expand:()=>{!r.disabled&&!u.value&&(u.value=!0,o("header:click",r.name,u.value),s(r.name,u.value))},toggle:()=>{r.disabled||h()},collapse:()=>{!r.disabled&&u.value&&!d.value&&(u.value=!1,o("header:click",r.name,u.value),s(r.name,u.value))},expanded:i.readonly(u)}),(p,y)=>{const b=Tf;return i.openBlock(),i.createElementBlock("div",{"data-name":t.name,class:i.normalizeClass([{"cursor-not-allowed text-gray-400":t.disabled},"sc-collapse-item flex flex-col p-2"])},[i.createElementVNode("div",$f,[i.createElementVNode("div",Rf,[i.createElementVNode("div",{class:i.normalizeClass({"rotate-90":u.value}),onClick:h},[i.renderSlot(p.$slots,"arrow",{},()=>[i.createVNode(b)],!0)],2)]),i.unref(ai).hasSlotContent(p.$slots["pre-arrow"])?(i.openBlock(),i.createElementBlock("div",Ef,[i.createElementVNode("div",Pf,[i.renderSlot(p.$slots,"pre-arrow",{},void 0,!0)])])):i.createCommentVNode("",!0),i.createElementVNode("div",Ff,[i.createElementVNode("div",{class:"sc-collapse-item-title flex flex-1 cursor-pointer flex-col text-lg font-semibold",onClick:h},[i.renderSlot(p.$slots,"header",{},()=>[i.createTextVNode(i.toDisplayString(t.title),1)],!0)]),i.unref(ai).hasSlotContent(p.$slots["sub-header"])?(i.openBlock(),i.createElementBlock("div",Vf,[i.renderSlot(p.$slots,"sub-header",{},void 0,!0)])):i.createCommentVNode("",!0)]),i.unref(ai).hasSlotContent(p.$slots["header-extra"])?(i.openBlock(),i.createElementBlock("div",If,[i.renderSlot(p.$slots,"header-extra",{},void 0,!0)])):i.createCommentVNode("",!0)]),i.createVNode(i.Transition,{name:"fade"},{default:i.withCtx(()=>[d.value||u.value?(i.openBlock(),i.createElementBlock("div",Mf,[i.renderSlot(p.$slots,"default",{},void 0,!0)])):i.createCommentVNode("",!0)]),_:3})],10,Nf)}}}),Wn=(t,e)=>{const n=t.__vccOpts||t;for(const[r,o]of e)n[r]=o;return n},Ga=Wn(Of,[["__scopeId","data-v-f1311d1c"]]),zf={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function Df(t,e){return i.openBlock(),i.createElementBlock("svg",zf,[...e[0]||(e[0]=[i.createElementVNode("circle",{cx:"176",cy:"416",r:"16",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),i.createElementVNode("circle",{cx:"400",cy:"416",r:"16",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),i.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M48 80h64l48 272h256"},null,-1),i.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M160 288h249.44a8 8 0 0 0 7.85-6.43l28.8-144a8 8 0 0 0-7.85-9.57H128"},null,-1)])])}const Za=i.markRaw({name:"ion-cart-outline",render:Df}),ar=Symbol(),Lf={Button:{border:"1px solid grey"},Card:{paddingMedium:"1rem"},Checkbox:{border:"1px solid rgb(12, 88, 32)"},Common:{borderRadius:"0.5rem",borderRadiusSmall:"0.25rem",fontWeight:"500",fontWeightStrong:"600",fontSize:"0.75rem",fontSizeMedium:"0.75rem",fontSizeLarge:"0.8125rem",lineHeight:"1.25rem",heightSmall:"24px",heightMedium:"30px",heightTiny:"20px",heightLarge:"36px",heightHuge:"42px",primaryColor:"#FFCC40FF",primaryColorHover:"#FFE49BFF",primaryColorPressed:"#FFBB00FF",primaryColorSuppl:"#FCC42AFF",successColor:"#4AC99BFF",successColorHover:"#4AC99BBF",successColorPressed:"#21AA78FF",errorColor:"#F45725FF",errorColorHover:"#F4572599",textColorBase:"#191C30E5",textColorDisabled:"#191C30E5"},DataTable:{borderColor:"rgb(207, 207, 207)",lineHeight:1.4,tdColorHover:"rgb(250,250,250)",thColor:"rgb(231, 231, 231)",thFontWeight:400,thPaddingMedium:"8px",tdPaddingMedium:"8px",thTextColor:"rgb(22, 0, 108)"},Drawer:{closeIconColor:"rgba(31, 34, 37, 1)",closeIconColorHover:"rgba(10, 157, 5, 1)"},Form:{marginBottom:0,lineHeight:1,labelFontSizeTopMedium:"0.75rem",labelHeightMedium:"20px",labelFontWeight:500,labelTextColor:"rgba(27, 31, 59, 0.65)",labelPaddingVertical:"0",labelPaddingHorizontal:"0"},Input:{paddingMedium:"0.5rem",fontSizeMedium:"0.9125rem",lineHeight:"1.25rem",lineHeightTextarea:"1.25rem",border:"1px solid #E0E0E0",borderRadius:"0.5rem",iconSize:"1,125rem"},Tabs:{tabFontSizeMedium:"0.9375rem",tabColorSegment:"#FFCC40FF",tabBorderColor:"#CCCCCCFF"}},Hf={class:"flex flex-col-reverse gap-2.5 sm:flex-row"},Wf={},Qa=i.defineComponent({...Wf,__name:"product-actions",props:{eventEmitter:{},showProductAddToCartButton:{type:[Boolean,String,Function],default:!1},showProductEditButton:{type:[Boolean,String,Function],default:!1},showProductRequiredButton:{type:[Boolean,String,Function],default:!1},productContextButtonsConfig:{type:Function,default:void 0},product:{}},setup(t){const e=t,n=i.inject(ar,"medium"),r=i.computed(()=>O.isFunction(e.showProductAddToCartButton)?e.showProductAddToCartButton(e.product):e.showProductAddToCartButton),o=i.computed(()=>O.isFunction(e.showProductEditButton)?e.showProductEditButton(e.product):e.showProductEditButton),s=i.computed(()=>O.isFunction(e.showProductRequiredButton)?e.showProductRequiredButton(e.product):e.showProductRequiredButton),a=i.computed(()=>O.isNil(e.productContextButtonsConfig)?[]:O.isFunction(e.productContextButtonsConfig)?e.productContextButtonsConfig(e.product):e.productContextButtonsConfig),l=()=>{e.eventEmitter.emit("product:add-to-cart",{product:e.product})},c=()=>{e.eventEmitter.emit("product:edit",{product:e.product})},d=()=>{e.eventEmitter.emit("product:required",{product:e.product})},u=h=>{e.eventEmitter.emit("product:context-select",{product:e.product,key:h})};return(h,f)=>{var R;const g=Ka,m=Ua,p=D.NButton,y=D.NTooltip,b=Ya,_=Za,S=Ho,k=D.NDropdown;return i.openBlock(),i.createElementBlock("div",Hf,[s.value?(i.openBlock(),i.createBlock(y,{key:0,placement:"bottom",trigger:"hover"},{trigger:i.withCtx(()=>[i.createVNode(p,{ghost:!0,size:i.unref(n),disabled:s.value==="disabled",type:t.product.isRequired?"primary":"default",onClick:d},{default:i.withCtx(()=>[t.product.isRequired?(i.openBlock(),i.createBlock(m,{key:1})):(i.openBlock(),i.createBlock(g,{key:0}))]),_:1},8,["size","disabled","type"])]),default:i.withCtx(()=>[f[0]||(f[0]=i.createTextVNode(" Товар, который нужно предлагать клиенту ",-1))]),_:1})):i.createCommentVNode("",!0),o.value?(i.openBlock(),i.createBlock(y,{key:1,placement:"bottom",trigger:"hover"},{trigger:i.withCtx(()=>[i.createVNode(p,{ghost:!0,size:i.unref(n),type:"primary",disabled:o.value==="disabled",onClick:c},{default:i.withCtx(()=>[i.createVNode(b)]),_:1},8,["size","disabled"])]),default:i.withCtx(()=>[f[1]||(f[1]=i.createTextVNode(" Редактировать ",-1))]),_:1})):i.createCommentVNode("",!0),r.value?(i.openBlock(),i.createBlock(y,{key:2,placement:"bottom",trigger:"hover"},{trigger:i.withCtx(()=>[i.createVNode(p,{ghost:!0,size:i.unref(n),disabled:r.value==="disabled",type:"primary",onClick:l},{default:i.withCtx(()=>[i.createVNode(_)]),_:1},8,["size","disabled"])]),default:i.withCtx(()=>[f[2]||(f[2]=i.createTextVNode(" Добавить в корзину ",-1))]),_:1})):i.createCommentVNode("",!0),((R=a.value)==null?void 0:R.length)>0?(i.openBlock(),i.createBlock(k,{key:3,options:a.value,size:i.unref(n),trigger:"click",onSelect:u},{default:i.withCtx(()=>[i.createVNode(p,{ghost:!0,size:i.unref(n),type:"primary"},{default:i.withCtx(()=>[i.createVNode(S)]),_:1},8,["size"])]),_:1},8,["options","size"])):i.createCommentVNode("",!0)])}}}),jf={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function qf(t,e){return i.openBlock(),i.createElementBlock("svg",jf,[...e[0]||(e[0]=[i.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[i.createElementVNode("path",{d:"M12 8v4l2 2"}),i.createElementVNode("path",{d:"M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5"})],-1)])])}const Xf=i.markRaw({name:"tabler-history",render:qf}),Yf={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Uf(t,e){return i.openBlock(),i.createElementBlock("svg",Yf,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"m18.5 3.5l2 2l-15 15l-2-2zM7 4c1.66 0 3 1.34 3 3s-1.34 3-3 3s-3-1.34-3-3s1.34-3 3-3m10 10c1.66 0 3 1.34 3 3s-1.34 3-3 3s-3-1.34-3-3s1.34-3 3-3M7 6c-.55 0-1 .45-1 1s.45 1 1 1s1-.45 1-1s-.45-1-1-1m10 10c-.55 0-1 .45-1 1s.45 1 1 1s1-.45 1-1s-.45-1-1-1"},null,-1)])])}const Kf=i.markRaw({name:"mdi-percent-outline",render:Uf}),Gf={class:"flex flex-row gap-1"},Zf={key:0,class:"flex gap-1"},Qf={key:0,class:"flex text-nowrap text-sm line-through"},Jf={key:1,class:"flex flex-row text-nowrap text-sm"},em={key:2,class:"flex flex-row gap-1 text-nowrap text-sm text-gray-600"},tm={},jn=i.defineComponent({...tm,__name:"product-cost",props:{product:{},additionalThroughFieldName:{},costFieldName:{},eventEmitter:{},allowPriceClick:{type:[Boolean,Function],default:!1},showTag:{type:Boolean,default:!1},showQuantityUnit:{type:Boolean,default:!1},showCostDate:{type:Boolean,default:!1},showPriceHistory:{type:Boolean,default:!1},currencyRates:{default:void 0}},setup(t){var y;const e=t,n=i.computed(()=>"product"in e.product),r=i.computed(()=>"product"in e.product?e.product.product:e.product),o=i.computed(()=>O.find(r.value.priceCoefficients,["coefficient.slug",e.costFieldName])),s=i.computed(()=>{const b=O.find(r.value.priceCoefficients,["coefficient.slug","k0"]);return o.value||!b||O.isNil(l.value)||O.isNil(b.cost)?!1:l.value<b.cost}),a=((y=Y.useBaseConfigStateStore().getConfig())==null?void 0:y.defaultCurrency)??"RUB",l=i.computed(()=>o.value?o.value.cost:O.get(e.product,e.costFieldName)),c=i.computed(()=>e.additionalThroughFieldName?O.get(e.product,e.additionalThroughFieldName):void 0),d=i.computed(()=>r.value.costDate?un.format(r.value.costDate,Y.useBaseConfigStateStore().config.dateFormats.uiDate):void 0),u=i.computed(()=>e.currencyRates||r.value.currency.signature===a?e.currencyRates:{[r.value.currency.signature]:r.value.costRub/r.value.cost}),h=i.computed(()=>(O.isFunction(e.allowPriceClick)?e.allowPriceClick(r.value):e.allowPriceClick)&&!O.isNil(l.value)),f=i.computed(()=>O.isNil(l.value)?"-":new Intl.NumberFormat("ru-RU",{style:"decimal",minimumFractionDigits:2}).format(Number.parseFloat(l.value))),g=i.computed(()=>{if(r.value.currency.signature===a||!u.value||!u.value[r.value.currency.signature])return null;const b=u.value[r.value.currency.signature];return new Intl.NumberFormat("ru-RU",{style:"decimal",minimumFractionDigits:2}).format(Number.parseFloat(l.value)*b)}),m=i.computed(()=>O.isNil(c.value)?null:new Intl.NumberFormat("ru-RU",{style:"decimal",minimumFractionDigits:2}).format(c.value)),p=i.computed(()=>{if(!c.value||!l.value||c.value===l.value||l.value===0)return null;const b=(l.value-c.value)/c.value*100;return new Intl.NumberFormat("ru-RU",{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}).format(b)});return(b,_)=>{var x;const S=D.NTag,k=D.NTooltip,R=Kf,$=Xf;return i.openBlock(),i.createElementBlock("div",Gf,[t.showTag?(i.openBlock(),i.createBlock(k,{key:0},{trigger:i.withCtx(()=>[i.createVNode(S,{round:"",bordered:!1,size:"small",class:i.normalizeClass(["text-slate-600",{"font-bold":!o.value}])},{default:i.withCtx(()=>{var C;return[i.createTextVNode(i.toDisplayString(((C=o.value)==null?void 0:C.coefficient.slug)??"Ц"),1)]}),_:1},8,["class"])]),default:i.withCtx(()=>{var C;return[i.createTextVNode(" "+i.toDisplayString(((C=o.value)==null?void 0:C.coefficient.name)??"Розничная цена"),1)]}),_:1})):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass({"!text-red-600":s.value})},[c.value&&c.value!==l.value||p.value?(i.openBlock(),i.createElementBlock("div",Zf,[c.value&&c.value!==l.value?(i.openBlock(),i.createElementBlock("span",Qf,i.toDisplayString(m.value)+" "+i.toDisplayString(t.showQuantityUnit?` ${r.value.currency.symbol}/${r.value.unit.name}`:""),1)):i.createCommentVNode("",!0),p.value?(i.openBlock(),i.createElementBlock("span",{key:1,class:i.normalizeClass(["flex text-nowrap text-sm text-gray-600",{"!text-red-600":s.value}])}," ("+i.toDisplayString(p.value)+"%) ",3)):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),i.createElementVNode("span",{class:i.normalizeClass(["whitespace-nowrap text-base flex items-center gap-1",{"text-gray-600":(x=o.value)==null?void 0:x.readOnly,"font-bold":!o.value&&!n.value}])},[i.createElementVNode("span",{class:i.normalizeClass({"text-nowrap":!0,"cursor-pointer underline decoration-dashed":h.value&&t.eventEmitter}),onClick:_[0]||(_[0]=()=>{var C;h.value&&((C=t.eventEmitter)==null||C.emit("cost:click",{product:r.value,cost:l.value}))})},i.toDisplayString(f.value),3),i.createTextVNode(" "+i.toDisplayString(t.showQuantityUnit?` ${r.value.currency.symbol}/${r.value.unit.name}`:"")+" ",1),l.value&&!o.value&&"discount"in t.product&&t.product.discount?(i.openBlock(),i.createBlock(k,{key:0},{trigger:i.withCtx(()=>[i.createVNode(R,{class:"text-sm text-black bg-amber-400 rounded p-px"})]),default:i.withCtx(()=>[i.createElementVNode("span",null,' На продукт действует скидка "'+i.toDisplayString(t.product.discount.name)+'"; ',1)]),_:1})):i.createCommentVNode("",!0)],2),g.value?(i.openBlock(),i.createElementBlock("span",Jf," ~ "+i.toDisplayString(g.value)+" "+i.toDisplayString(t.showQuantityUnit?`₽/${r.value.unit.name}`:""),1)):i.createCommentVNode("",!0),t.showCostDate&&!i.unref(O.isNil)(d.value)?(i.openBlock(),i.createElementBlock("span",em,[i.createTextVNode(i.toDisplayString(d.value)+" ",1),t.showPriceHistory&&t.eventEmitter?(i.openBlock(),i.createBlock(k,{key:0,placement:"top-end"},{trigger:i.withCtx(()=>[i.createVNode($,{class:"cursor-pointer",onClick:_[1]||(_[1]=C=>{var w;return(w=t.eventEmitter)==null?void 0:w.emit("cost:show-price-history",{product:r.value})})})]),default:i.withCtx(()=>[_[2]||(_[2]=i.createTextVNode(" История цен ",-1))]),_:1})):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)],2)])}}}),nm={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function im(t,e){return i.openBlock(),i.createElementBlock("svg",nm,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32",d:"M248 64C146.39 64 64 146.39 64 248s82.39 184 184 184s184-82.39 184-184S349.61 64 248 64Z"},null,-1),i.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M220 220h32v116"},null,-1),i.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32",d:"M208 340h88"},null,-1),i.createElementVNode("path",{fill:"currentColor",d:"M248 130a26 26 0 1 0 26 26a26 26 0 0 0-26-26"},null,-1)])])}const Wo=i.markRaw({name:"ion-information-circle-outline",render:im}),rm={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function om(t,e){return i.openBlock(),i.createElementBlock("svg",rm,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M450.29 112H142c-34 0-62 27.51-62 61.33v245.34c0 33.82 28 61.33 62 61.33h308c34 0 62-26.18 62-60V173.33c0-33.82-27.68-61.33-61.71-61.33m-77.15 61.34a46 46 0 1 1-46.28 46a46.19 46.19 0 0 1 46.28-46.01Zm-231.55 276c-17 0-29.86-13.75-29.86-30.66v-64.83l90.46-80.79a46.54 46.54 0 0 1 63.44 1.83L328.27 337l-113 112.33ZM480 418.67a30.67 30.67 0 0 1-30.71 30.66H259L376.08 333a46.24 46.24 0 0 1 59.44-.16L480 370.59Z"},null,-1),i.createElementVNode("path",{fill:"currentColor",d:"M384 32H64A64 64 0 0 0 0 96v256a64.11 64.11 0 0 0 48 62V152a72 72 0 0 1 72-72h326a64.11 64.11 0 0 0-62-48"},null,-1)])])}const Ja=i.markRaw({name:"ion-images",render:om}),sm={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function am(t,e){return i.openBlock(),i.createElementBlock("svg",sm,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M256 56C145.72 56 56 145.72 56 256s89.72 200 200 200s200-89.72 200-200S366.28 56 256 56m0 82a26 26 0 1 1-26 26a26 26 0 0 1 26-26m48 226h-88a16 16 0 0 1 0-32h28v-88h-16a16 16 0 0 1 0-32h32a16 16 0 0 1 16 16v104h28a16 16 0 0 1 0 32"},null,-1)])])}const lm=i.markRaw({name:"ion-information-circle",render:am}),cm={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function dm(t,e){return i.openBlock(),i.createElementBlock("svg",cm,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M400 480a16 16 0 0 1-10.63-4L256 357.41L122.63 476A16 16 0 0 1 96 464V96a64.07 64.07 0 0 1 64-64h192a64.07 64.07 0 0 1 64 64v368a16 16 0 0 1-16 16"},null,-1)])])}const um=i.markRaw({name:"ion-bookmark",render:dm});/*!
2
2
  * lightgallery | 2.9.0 | October 1st 2025
3
3
  * http://www.lightgalleryjs.com/
4
4
  * Copyright (c) 2020 Sachin Neravath;
@@ -113,7 +113,7 @@ ${o}
113
113
  `);return}l=gu(l),c!=null&&a.push(` ${l}${Kw(c)}`)}),t&&a.push("}"),a.join(`
114
114
  `)}function ea(t,e,n){t&&t.forEach(r=>{if(Array.isArray(r))ea(r,e,n);else if(typeof r=="function"){const o=r(e);Array.isArray(o)?ea(o,e,n):o&&n(o)}else r&&n(r)})}function yu(t,e,n,r,o){const s=t.$;let a="";if(!s||typeof s=="string")Co(s)?a=s:e.push(s);else if(typeof s=="function"){const d=s({context:r.context,props:o});Co(d)?a=d:e.push(d)}else if(s.before&&s.before(r.context),!s.$||typeof s.$=="string")Co(s.$)?a=s.$:e.push(s.$);else if(s.$){const d=s.$({context:r.context,props:o});Co(d)?a=d:e.push(d)}const l=Xw(e),c=pu(l,t.props,r,o);a?n.push(`${a} {`):c.length&&n.push(c),t.children&&ea(t.children,{context:r.context,props:o},d=>{if(typeof d=="string"){const u=pu(l,{raw:d},r,o);n.push(u)}else yu(d,e,n,r,o)}),e.pop(),a&&n.push("}"),s&&s.after&&s.after(r.context)}function Zw(t,e,n){const r=[];return yu(t,[],r,e,n),r.join(`
115
115
 
116
- `)}function ta(t){for(var e=0,n,r=0,o=t.length;o>=4;++r,o-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(o){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}typeof window<"u"&&(window.__cssrContext={});function Qw(t,e,n,r){const{els:o}=e;if(n===void 0)o.forEach(mu),e.els=[];else{const s=vo(n,r);s&&o.includes(s)&&(mu(s),e.els=o.filter(a=>a!==s))}}function bu(t,e){t.push(e)}function Jw(t,e,n,r,o,s,a,l,c){let d;if(n===void 0&&(d=e.render(r),n=ta(d)),c){c.adapter(n,d??e.render(r));return}l===void 0&&(l=document.head);const u=vo(n,l);if(u!==null&&!s)return u;const h=u??Yw(n);if(d===void 0&&(d=e.render(r)),h.textContent=d,u!==null)return u;if(a){const f=l.querySelector(`meta[name="${a}"]`);if(f)return l.insertBefore(h,f),bu(e.els,h),h}return o?l.insertBefore(h,l.querySelector("style, link")):l.appendChild(h),bu(e.els,h),h}function ex(t){return Zw(this,this.instance,t)}function tx(t={}){const{id:e,ssr:n,props:r,head:o=!1,force:s=!1,anchorMetaName:a,parent:l}=t;return Jw(this.instance,this,e,r,o,s,a,l,n)}function nx(t={}){const{id:e,parent:n}=t;Qw(this.instance,this,e,n)}const So=function(t,e,n,r){return{instance:t,$:e,props:n,children:r,els:[],render:ex,mount:tx,unmount:nx}},ix=function(t,e,n,r){return Array.isArray(e)?So(t,{$:null},null,e):Array.isArray(n)?So(t,e,null,n):Array.isArray(r)?So(t,e,n,r):So(t,e,n,null)};function _u(t={}){const e={c:((...n)=>ix(e,...n)),use:(n,...r)=>n.install(e,...r),find:vo,context:{},config:t};return e}function rx(t,e){if(t===void 0)return!1;if(e){const{context:{ids:n}}=e;return n.has(t)}return vo(t)!==null}const{c:Jn}=_u(),na="vueuc-style";function wu(t){return t&-t}class xu{constructor(e,n){this.l=e,this.min=n;const r=new Array(e+1);for(let o=0;o<e+1;++o)r[o]=0;this.ft=r}add(e,n){if(n===0)return;const{l:r,ft:o}=this;for(e+=1;e<=r;)o[e]+=n,e+=wu(e)}get(e){return this.sum(e+1)-this.sum(e)}sum(e){if(e===void 0&&(e=this.l),e<=0)return 0;const{ft:n,min:r,l:o}=this;if(e>o)throw new Error("[FinweckTree.sum]: `i` is larger than length.");let s=e*r;for(;e>0;)s+=n[e],e-=wu(e);return s}getBound(e){let n=0,r=this.l;for(;r>n;){const o=Math.floor((n+r)/2),s=this.sum(o);if(s>e){r=o;continue}else if(s<e){if(n===o)return this.sum(n+1)<=e?n+1:o;n=o}else return o}return n}}function ku(t){return typeof t=="string"?document.querySelector(t):t()||null}const ox=i.defineComponent({name:"LazyTeleport",props:{to:{type:[String,Object],default:void 0},disabled:Boolean,show:{type:Boolean,required:!0}},setup(t){return{showTeleport:Ew(i.toRef(t,"show")),mergedTo:i.computed(()=>{const{to:e}=t;return e??"body"})}},render(){return this.showTeleport?this.disabled?Zs("lazy-teleport",this.$slots):i.h(i.Teleport,{disabled:this.disabled,to:this.mergedTo},Zs("lazy-teleport",this.$slots)):null}}),Bo={top:"bottom",bottom:"top",left:"right",right:"left"},vu={start:"end",center:"center",end:"start"},ia={top:"height",bottom:"height",left:"width",right:"width"},sx={"bottom-start":"top left",bottom:"top center","bottom-end":"top right","top-start":"bottom left",top:"bottom center","top-end":"bottom right","right-start":"top left",right:"center left","right-end":"bottom left","left-start":"top right",left:"center right","left-end":"bottom right"},ax={"bottom-start":"bottom left",bottom:"bottom center","bottom-end":"bottom right","top-start":"top left",top:"top center","top-end":"top right","right-start":"top right",right:"center right","right-end":"bottom right","left-start":"top left",left:"center left","left-end":"bottom left"},lx={"bottom-start":"right","bottom-end":"left","top-start":"right","top-end":"left","right-start":"bottom","right-end":"top","left-start":"bottom","left-end":"top"},Cu={top:!0,bottom:!1,left:!0,right:!1},Su={top:"end",bottom:"start",left:"end",right:"start"};function cx(t,e,n,r,o,s){if(!o||s)return{placement:t,top:0,left:0};const[a,l]=t.split("-");let c=l??"center",d={top:0,left:0};const u=(g,m,p)=>{let y=0,b=0;const _=n[g]-e[m]-e[g];return _>0&&r&&(p?b=Cu[m]?_:-_:y=Cu[m]?_:-_),{left:y,top:b}},h=a==="left"||a==="right";if(c!=="center"){const g=lx[t],m=Bo[g],p=ia[g];if(n[p]>e[p]){if(e[g]+e[p]<n[p]){const y=(n[p]-e[p])/2;e[g]<y||e[m]<y?e[g]<e[m]?(c=vu[l],d=u(p,m,h)):d=u(p,g,h):c="center"}}else n[p]<e[p]&&e[m]<0&&e[g]>e[m]&&(c=vu[l])}else{const g=a==="bottom"||a==="top"?"left":"top",m=Bo[g],p=ia[g],y=(n[p]-e[p])/2;(e[g]<y||e[m]<y)&&(e[g]>e[m]?(c=Su[g],d=u(p,g,h)):(c=Su[m],d=u(p,m,h)))}let f=a;return e[a]<n[ia[a]]&&e[a]<e[Bo[a]]&&(f=Bo[a]),{placement:c!=="center"?`${f}-${c}`:f,left:d.left,top:d.top}}function dx(t,e){return e?ax[t]:sx[t]}function ux(t,e,n,r,o,s){if(s)switch(t){case"bottom-start":return{top:`${Math.round(n.top-e.top+n.height)}px`,left:`${Math.round(n.left-e.left)}px`,transform:"translateY(-100%)"};case"bottom-end":return{top:`${Math.round(n.top-e.top+n.height)}px`,left:`${Math.round(n.left-e.left+n.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top-start":return{top:`${Math.round(n.top-e.top)}px`,left:`${Math.round(n.left-e.left)}px`,transform:""};case"top-end":return{top:`${Math.round(n.top-e.top)}px`,left:`${Math.round(n.left-e.left+n.width)}px`,transform:"translateX(-100%)"};case"right-start":return{top:`${Math.round(n.top-e.top)}px`,left:`${Math.round(n.left-e.left+n.width)}px`,transform:"translateX(-100%)"};case"right-end":return{top:`${Math.round(n.top-e.top+n.height)}px`,left:`${Math.round(n.left-e.left+n.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"left-start":return{top:`${Math.round(n.top-e.top)}px`,left:`${Math.round(n.left-e.left)}px`,transform:""};case"left-end":return{top:`${Math.round(n.top-e.top+n.height)}px`,left:`${Math.round(n.left-e.left)}px`,transform:"translateY(-100%)"};case"top":return{top:`${Math.round(n.top-e.top)}px`,left:`${Math.round(n.left-e.left+n.width/2)}px`,transform:"translateX(-50%)"};case"right":return{top:`${Math.round(n.top-e.top+n.height/2)}px`,left:`${Math.round(n.left-e.left+n.width)}px`,transform:"translateX(-100%) translateY(-50%)"};case"left":return{top:`${Math.round(n.top-e.top+n.height/2)}px`,left:`${Math.round(n.left-e.left)}px`,transform:"translateY(-50%)"};case"bottom":default:return{top:`${Math.round(n.top-e.top+n.height)}px`,left:`${Math.round(n.left-e.left+n.width/2)}px`,transform:"translateX(-50%) translateY(-100%)"}}switch(t){case"bottom-start":return{top:`${Math.round(n.top-e.top+n.height+r)}px`,left:`${Math.round(n.left-e.left+o)}px`,transform:""};case"bottom-end":return{top:`${Math.round(n.top-e.top+n.height+r)}px`,left:`${Math.round(n.left-e.left+n.width+o)}px`,transform:"translateX(-100%)"};case"top-start":return{top:`${Math.round(n.top-e.top+r)}px`,left:`${Math.round(n.left-e.left+o)}px`,transform:"translateY(-100%)"};case"top-end":return{top:`${Math.round(n.top-e.top+r)}px`,left:`${Math.round(n.left-e.left+n.width+o)}px`,transform:"translateX(-100%) translateY(-100%)"};case"right-start":return{top:`${Math.round(n.top-e.top+r)}px`,left:`${Math.round(n.left-e.left+n.width+o)}px`,transform:""};case"right-end":return{top:`${Math.round(n.top-e.top+n.height+r)}px`,left:`${Math.round(n.left-e.left+n.width+o)}px`,transform:"translateY(-100%)"};case"left-start":return{top:`${Math.round(n.top-e.top+r)}px`,left:`${Math.round(n.left-e.left+o)}px`,transform:"translateX(-100%)"};case"left-end":return{top:`${Math.round(n.top-e.top+n.height+r)}px`,left:`${Math.round(n.left-e.left+o)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top":return{top:`${Math.round(n.top-e.top+r)}px`,left:`${Math.round(n.left-e.left+n.width/2+o)}px`,transform:"translateY(-100%) translateX(-50%)"};case"right":return{top:`${Math.round(n.top-e.top+n.height/2+r)}px`,left:`${Math.round(n.left-e.left+n.width+o)}px`,transform:"translateY(-50%)"};case"left":return{top:`${Math.round(n.top-e.top+n.height/2+r)}px`,left:`${Math.round(n.left-e.left+o)}px`,transform:"translateY(-50%) translateX(-100%)"};case"bottom":default:return{top:`${Math.round(n.top-e.top+n.height+r)}px`,left:`${Math.round(n.left-e.left+n.width/2+o)}px`,transform:"translateX(-50%)"}}}const hx=Jn([Jn(".v-binder-follower-container",{position:"absolute",left:"0",right:"0",top:"0",height:"0",pointerEvents:"none",zIndex:"auto"}),Jn(".v-binder-follower-content",{position:"absolute",zIndex:"auto"},[Jn("> *",{pointerEvents:"all"})])]),Bu=i.defineComponent({name:"Follower",inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:"bottom"},syncTrigger:{type:Array,default:["resize","scroll"]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(t){const e=i.inject("VBinder"),n=Gt(()=>t.enabled!==void 0?t.enabled:t.show),r=i.ref(null),o=i.ref(null),s=()=>{const{syncTrigger:f}=t;f.includes("scroll")&&e.addScrollListener(c),f.includes("resize")&&e.addResizeListener(c)},a=()=>{e.removeScrollListener(c),e.removeResizeListener(c)};i.onMounted(()=>{n.value&&(c(),s())});const l=bi();hx.mount({id:"vueuc/binder",head:!0,anchorMetaName:na,ssr:l}),i.onBeforeUnmount(()=>{a()}),Fw(()=>{n.value&&c()});const c=()=>{if(!n.value)return;const f=r.value;if(f===null)return;const g=e.targetRef,{x:m,y:p,overlap:y}=t,b=m!==void 0&&p!==void 0?Mw(m,p):Js(g);f.style.setProperty("--v-target-width",`${Math.round(b.width)}px`),f.style.setProperty("--v-target-height",`${Math.round(b.height)}px`);const{width:_,minWidth:S,placement:k,internalShift:R,flip:$}=t;f.setAttribute("v-placement",k),y?f.setAttribute("v-overlap",""):f.removeAttribute("v-overlap");const{style:x}=f;_==="target"?x.width=`${b.width}px`:_!==void 0?x.width=_:x.width="",S==="target"?x.minWidth=`${b.width}px`:S!==void 0?x.minWidth=S:x.minWidth="";const C=Js(f),w=Js(o.value),{left:T,top:N,placement:A}=cx(k,b,C,R,$,y),I=dx(A,y),{left:z,top:L,transform:ee}=ux(A,w,b,N,T,y);f.setAttribute("v-placement",A),f.style.setProperty("--v-offset-left",`${Math.round(T)}px`),f.style.setProperty("--v-offset-top",`${Math.round(N)}px`),f.style.transform=`translateX(${z}) translateY(${L}) ${ee}`,f.style.setProperty("--v-transform-origin",I),f.style.transformOrigin=I};i.watch(n,f=>{f?(s(),d()):a()});const d=()=>{i.nextTick().then(c).catch(f=>console.error(f))};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(f=>{i.watch(i.toRef(t,f),c)}),["teleportDisabled"].forEach(f=>{i.watch(i.toRef(t,f),d)}),i.watch(i.toRef(t,"syncTrigger"),f=>{f.includes("resize")?e.addResizeListener(c):e.removeResizeListener(c),f.includes("scroll")?e.addScrollListener(c):e.removeScrollListener(c)});const u=ko(),h=Gt(()=>{const{to:f}=t;if(f!==void 0)return f;u.value});return{VBinder:e,mergedEnabled:n,offsetContainerRef:o,followerRef:r,mergedTo:h,syncPosition:c}},render(){return i.h(ox,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var t,e;const n=i.h("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[i.h("div",{class:"v-binder-follower-content",ref:"followerRef"},(e=(t=this.$slots).default)===null||e===void 0?void 0:e.call(t))]);return this.zindexable?i.withDirectives(n,[[ou,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):n}})}});var _i=[],fx=function(){return _i.some(function(t){return t.activeTargets.length>0})},mx=function(){return _i.some(function(t){return t.skippedTargets.length>0})},Tu="ResizeObserver loop completed with undelivered notifications.",gx=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:Tu}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=Tu),window.dispatchEvent(t)},vr;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(vr||(vr={}));var wi=function(t){return Object.freeze(t)},px=(function(){function t(e,n){this.inlineSize=e,this.blockSize=n,wi(this)}return t})(),Nu=(function(){function t(e,n,r,o){return this.x=e,this.y=n,this.width=r,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,wi(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,r=e.y,o=e.top,s=e.right,a=e.bottom,l=e.left,c=e.width,d=e.height;return{x:n,y:r,top:o,right:s,bottom:a,left:l,width:c,height:d}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t})(),ra=function(t){return t instanceof SVGElement&&"getBBox"in t},$u=function(t){if(ra(t)){var e=t.getBBox(),n=e.width,r=e.height;return!n&&!r}var o=t,s=o.offsetWidth,a=o.offsetHeight;return!(s||a||t.getClientRects().length)},Ru=function(t){var e;if(t instanceof Element)return!0;var n=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},yx=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Cr=typeof window<"u"?window:{},To=new WeakMap,Eu=/auto|scroll/,bx=/^tb|vertical/,_x=/msie|trident/i.test(Cr.navigator&&Cr.navigator.userAgent),kn=function(t){return parseFloat(t||"0")},er=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new px((n?e:t)||0,(n?t:e)||0)},Pu=wi({devicePixelContentBoxSize:er(),borderBoxSize:er(),contentBoxSize:er(),contentRect:new Nu(0,0,0,0)}),Fu=function(t,e){if(e===void 0&&(e=!1),To.has(t)&&!e)return To.get(t);if($u(t))return To.set(t,Pu),Pu;var n=getComputedStyle(t),r=ra(t)&&t.ownerSVGElement&&t.getBBox(),o=!_x&&n.boxSizing==="border-box",s=bx.test(n.writingMode||""),a=!r&&Eu.test(n.overflowY||""),l=!r&&Eu.test(n.overflowX||""),c=r?0:kn(n.paddingTop),d=r?0:kn(n.paddingRight),u=r?0:kn(n.paddingBottom),h=r?0:kn(n.paddingLeft),f=r?0:kn(n.borderTopWidth),g=r?0:kn(n.borderRightWidth),m=r?0:kn(n.borderBottomWidth),p=r?0:kn(n.borderLeftWidth),y=h+d,b=c+u,_=p+g,S=f+m,k=l?t.offsetHeight-S-t.clientHeight:0,R=a?t.offsetWidth-_-t.clientWidth:0,$=o?y+_:0,x=o?b+S:0,C=r?r.width:kn(n.width)-$-R,w=r?r.height:kn(n.height)-x-k,T=C+y+R+_,N=w+b+k+S,A=wi({devicePixelContentBoxSize:er(Math.round(C*devicePixelRatio),Math.round(w*devicePixelRatio),s),borderBoxSize:er(T,N,s),contentBoxSize:er(C,w,s),contentRect:new Nu(h,c,C,w)});return To.set(t,A),A},Vu=function(t,e,n){var r=Fu(t,n),o=r.borderBoxSize,s=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(e){case vr.DEVICE_PIXEL_CONTENT_BOX:return a;case vr.BORDER_BOX:return o;default:return s}},wx=(function(){function t(e){var n=Fu(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=wi([n.borderBoxSize]),this.contentBoxSize=wi([n.contentBoxSize]),this.devicePixelContentBoxSize=wi([n.devicePixelContentBoxSize])}return t})(),Iu=function(t){if($u(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},xx=function(){var t=1/0,e=[];_i.forEach(function(a){if(a.activeTargets.length!==0){var l=[];a.activeTargets.forEach(function(d){var u=new wx(d.target),h=Iu(d.target);l.push(u),d.lastReportedSize=Vu(d.target,d.observedBox),h<t&&(t=h)}),e.push(function(){a.callback.call(a.observer,l,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var n=0,r=e;n<r.length;n++){var o=r[n];o()}return t},Mu=function(t){_i.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(o){o.isActive()&&(Iu(o.target)>t?n.activeTargets.push(o):n.skippedTargets.push(o))})})},kx=function(){var t=0;for(Mu(t);fx();)t=xx(),Mu(t);return mx()&&gx(),t>0},oa,Au=[],vx=function(){return Au.splice(0).forEach(function(t){return t()})},Cx=function(t){if(!oa){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return vx()}).observe(n,r),oa=function(){n.textContent="".concat(e?e--:e++)}}Au.push(t),oa()},Sx=function(t){Cx(function(){requestAnimationFrame(t)})},No=0,Bx=function(){return!!No},Tx=250,Nx={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ou=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],zu=function(t){return t===void 0&&(t=0),Date.now()+t},sa=!1,$x=(function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=Tx),!sa){sa=!0;var r=zu(e);Sx(function(){var o=!1;try{o=kx()}finally{if(sa=!1,e=r-zu(),!Bx())return;o?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,Nx)};document.body?n():Cr.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ou.forEach(function(n){return Cr.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Ou.forEach(function(n){return Cr.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t})(),aa=new $x,Du=function(t){!No&&t>0&&aa.start(),No+=t,!No&&aa.stop()},Rx=function(t){return!ra(t)&&!yx(t)&&getComputedStyle(t).display==="inline"},Ex=(function(){function t(e,n){this.target=e,this.observedBox=n||vr.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Vu(this.target,this.observedBox,!0);return Rx(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t})(),Px=(function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t})(),$o=new WeakMap,Lu=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},Ro=(function(){function t(){}return t.connect=function(e,n){var r=new Px(e,n);$o.set(e,r)},t.observe=function(e,n,r){var o=$o.get(e),s=o.observationTargets.length===0;Lu(o.observationTargets,n)<0&&(s&&_i.push(o),o.observationTargets.push(new Ex(n,r&&r.box)),Du(1),aa.schedule())},t.unobserve=function(e,n){var r=$o.get(e),o=Lu(r.observationTargets,n),s=r.observationTargets.length===1;o>=0&&(s&&_i.splice(_i.indexOf(r),1),r.observationTargets.splice(o,1),Du(-1))},t.disconnect=function(e){var n=this,r=$o.get(e);r.observationTargets.slice().forEach(function(o){return n.unobserve(e,o.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t})(),Fx=(function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Ro.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ru(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ro.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ru(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ro.unobserve(this,e)},t.prototype.disconnect=function(){Ro.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t})();class Vx{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<"u"&&window.ResizeObserver||Fx)(this.handleResize),this.elHandlersMap=new Map}handleResize(e){for(const n of e){const r=this.elHandlersMap.get(n.target);r!==void 0&&r(n)}}registerHandler(e,n){this.elHandlersMap.set(e,n),this.observer.observe(e)}unregisterHandler(e){this.elHandlersMap.has(e)&&(this.elHandlersMap.delete(e),this.observer.unobserve(e))}}const Sr=new Vx,Eo=i.defineComponent({name:"ResizeObserver",props:{onResize:Function},setup(t){let e=!1;const n=i.getCurrentInstance().proxy;function r(o){const{onResize:s}=t;s!==void 0&&s(o)}i.onMounted(()=>{const o=n.$el;if(o===void 0){hu("resize-observer","$el does not exist.");return}if(o.nextElementSibling!==o.nextSibling&&o.nodeType===3&&o.nodeValue!==""){hu("resize-observer","$el can not be observed (it may be a text node).");return}o.nextElementSibling!==null&&(Sr.registerHandler(o.nextElementSibling,r),e=!0)}),i.onBeforeUnmount(()=>{e&&Sr.unregisterHandler(n.$el.nextElementSibling)})},render(){return i.renderSlot(this.$slots,"default")}});let Po;function Ix(){return typeof document>"u"?!1:(Po===void 0&&("matchMedia"in window?Po=window.matchMedia("(pointer:coarse)").matches:Po=!1),Po)}let la;function Hu(){return typeof document>"u"?1:(la===void 0&&(la="chrome"in window?window.devicePixelRatio:1),la)}const Wu="VVirtualListXScroll";function Mx({columnsRef:t,renderColRef:e,renderItemWithColsRef:n}){const r=i.ref(0),o=i.ref(0),s=i.computed(()=>{const d=t.value;if(d.length===0)return null;const u=new xu(d.length,0);return d.forEach((h,f)=>{u.add(f,h.width)}),u}),a=Gt(()=>{const d=s.value;return d!==null?Math.max(d.getBound(o.value)-1,0):0}),l=d=>{const u=s.value;return u!==null?u.sum(d):0},c=Gt(()=>{const d=s.value;return d!==null?Math.min(d.getBound(o.value+r.value)+1,t.value.length-1):0});return i.provide(Wu,{startIndexRef:a,endIndexRef:c,columnsRef:t,renderColRef:e,renderItemWithColsRef:n,getLeft:l}),{listWidthRef:r,scrollLeftRef:o}}const ju=i.defineComponent({name:"VirtualListRow",props:{index:{type:Number,required:!0},item:{type:Object,required:!0}},setup(){const{startIndexRef:t,endIndexRef:e,columnsRef:n,getLeft:r,renderColRef:o,renderItemWithColsRef:s}=i.inject(Wu);return{startIndex:t,endIndex:e,columns:n,renderCol:o,renderItemWithCols:s,getLeft:r}},render(){const{startIndex:t,endIndex:e,columns:n,renderCol:r,renderItemWithCols:o,getLeft:s,item:a}=this;if(o!=null)return o({itemIndex:this.index,startColIndex:t,endColIndex:e,allColumns:n,item:a,getLeft:s});if(r!=null){const l=[];for(let c=t;c<=e;++c){const d=n[c];l.push(r({column:d,left:s(c),item:a}))}return l}return null}}),Ax=Jn(".v-vl",{maxHeight:"inherit",height:"100%",overflow:"auto",minWidth:"1px"},[Jn("&:not(.v-vl--show-scrollbar)",{scrollbarWidth:"none"},[Jn("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",{width:0,height:0,display:"none"})])]),Ox=i.defineComponent({name:"VirtualList",inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},columns:{type:Array,default:()=>[]},renderCol:Function,renderItemWithCols:Function,items:{type:Array,default:()=>[]},itemSize:{type:Number,required:!0},itemResizable:Boolean,itemsStyle:[String,Object],visibleItemsTag:{type:[String,Object],default:"div"},visibleItemsProps:Object,ignoreItemResize:Boolean,onScroll:Function,onWheel:Function,onResize:Function,defaultScrollKey:[Number,String],defaultScrollIndex:Number,keyField:{type:String,default:"key"},paddingTop:{type:[Number,String],default:0},paddingBottom:{type:[Number,String],default:0}},setup(t){const e=bi();Ax.mount({id:"vueuc/virtual-list",head:!0,anchorMetaName:na,ssr:e}),i.onMounted(()=>{const{defaultScrollIndex:I,defaultScrollKey:z}=t;I!=null?y({index:I}):z!=null&&y({key:z})});let n=!1,r=!1;i.onActivated(()=>{if(n=!1,!r){r=!0;return}y({top:g.value,left:a.value})}),i.onDeactivated(()=>{n=!0,r||(r=!0)});const o=Gt(()=>{if(t.renderCol==null&&t.renderItemWithCols==null||t.columns.length===0)return;let I=0;return t.columns.forEach(z=>{I+=z.width}),I}),s=i.computed(()=>{const I=new Map,{keyField:z}=t;return t.items.forEach((L,ee)=>{I.set(L[z],ee)}),I}),{scrollLeftRef:a,listWidthRef:l}=Mx({columnsRef:i.toRef(t,"columns"),renderColRef:i.toRef(t,"renderCol"),renderItemWithColsRef:i.toRef(t,"renderItemWithCols")}),c=i.ref(null),d=i.ref(void 0),u=new Map,h=i.computed(()=>{const{items:I,itemSize:z,keyField:L}=t,ee=new xu(I.length,z);return I.forEach((ne,P)=>{const E=ne[L],W=u.get(E);W!==void 0&&ee.add(P,W)}),ee}),f=i.ref(0),g=i.ref(0),m=Gt(()=>Math.max(h.value.getBound(g.value-wr(t.paddingTop))-1,0)),p=i.computed(()=>{const{value:I}=d;if(I===void 0)return[];const{items:z,itemSize:L}=t,ee=m.value,ne=Math.min(ee+Math.ceil(I/L+1),z.length-1),P=[];for(let E=ee;E<=ne;++E)P.push(z[E]);return P}),y=(I,z)=>{if(typeof I=="number"){k(I,z,"auto");return}const{left:L,top:ee,index:ne,key:P,position:E,behavior:W,debounce:X=!0}=I;if(L!==void 0||ee!==void 0)k(L,ee,W);else if(ne!==void 0)S(ne,W,X);else if(P!==void 0){const H=s.value.get(P);H!==void 0&&S(H,W,X)}else E==="bottom"?k(0,Number.MAX_SAFE_INTEGER,W):E==="top"&&k(0,0,W)};let b,_=null;function S(I,z,L){const{value:ee}=h,ne=ee.sum(I)+wr(t.paddingTop);if(!L)c.value.scrollTo({left:0,top:ne,behavior:z});else{b=I,_!==null&&window.clearTimeout(_),_=window.setTimeout(()=>{b=void 0,_=null},16);const{scrollTop:P,offsetHeight:E}=c.value;if(ne>P){const W=ee.get(I);ne+W<=P+E||c.value.scrollTo({left:0,top:ne+W-E,behavior:z})}else c.value.scrollTo({left:0,top:ne,behavior:z})}}function k(I,z,L){c.value.scrollTo({left:I,top:z,behavior:L})}function R(I,z){var L,ee,ne;if(n||t.ignoreItemResize||A(z.target))return;const{value:P}=h,E=s.value.get(I),W=P.get(E),X=(ne=(ee=(L=z.borderBoxSize)===null||L===void 0?void 0:L[0])===null||ee===void 0?void 0:ee.blockSize)!==null&&ne!==void 0?ne:z.contentRect.height;if(X===W)return;X-t.itemSize===0?u.delete(I):u.set(I,X-t.itemSize);const q=X-W;if(q===0)return;P.add(E,q);const F=c.value;if(F!=null){if(b===void 0){const V=P.sum(E);F.scrollTop>V&&F.scrollBy(0,q)}else if(E<b)F.scrollBy(0,q);else if(E===b){const V=P.sum(E);X+V>F.scrollTop+F.offsetHeight&&F.scrollBy(0,q)}N()}f.value++}const $=!Ix();let x=!1;function C(I){var z;(z=t.onScroll)===null||z===void 0||z.call(t,I),(!$||!x)&&N()}function w(I){var z;if((z=t.onWheel)===null||z===void 0||z.call(t,I),$){const L=c.value;if(L!=null){if(I.deltaX===0&&(L.scrollTop===0&&I.deltaY<=0||L.scrollTop+L.offsetHeight>=L.scrollHeight&&I.deltaY>=0))return;I.preventDefault(),L.scrollTop+=I.deltaY/Hu(),L.scrollLeft+=I.deltaX/Hu(),N(),x=!0,Ud(()=>{x=!1})}}}function T(I){if(n||A(I.target))return;if(t.renderCol==null&&t.renderItemWithCols==null){if(I.contentRect.height===d.value)return}else if(I.contentRect.height===d.value&&I.contentRect.width===l.value)return;d.value=I.contentRect.height,l.value=I.contentRect.width;const{onResize:z}=t;z!==void 0&&z(I)}function N(){const{value:I}=c;I!=null&&(g.value=I.scrollTop,a.value=I.scrollLeft)}function A(I){let z=I;for(;z!==null;){if(z.style.display==="none")return!0;z=z.parentElement}return!1}return{listHeight:d,listStyle:{overflow:"auto"},keyToIndex:s,itemsStyle:i.computed(()=>{const{itemResizable:I}=t,z=xr(h.value.sum());return f.value,[t.itemsStyle,{boxSizing:"content-box",width:xr(o.value),height:I?"":z,minHeight:I?z:"",paddingTop:xr(t.paddingTop),paddingBottom:xr(t.paddingBottom)}]}),visibleItemsStyle:i.computed(()=>(f.value,{transform:`translateY(${xr(h.value.sum(m.value))})`})),viewportItems:p,listElRef:c,itemsElRef:i.ref(null),scrollTo:y,handleListResize:T,handleListScroll:C,handleListWheel:w,handleItemResize:R}},render(){const{itemResizable:t,keyField:e,keyToIndex:n,visibleItemsTag:r}=this;return i.h(Eo,{onResize:this.handleListResize},{default:()=>{var o,s;return i.h("div",i.mergeProps(this.$attrs,{class:["v-vl",this.showScrollbar&&"v-vl--show-scrollbar"],onScroll:this.handleListScroll,onWheel:this.handleListWheel,ref:"listElRef"}),[this.items.length!==0?i.h("div",{ref:"itemsElRef",class:"v-vl-items",style:this.itemsStyle},[i.h(r,Object.assign({class:"v-vl-visible-items",style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>{const{renderCol:a,renderItemWithCols:l}=this;return this.viewportItems.map(c=>{const d=c[e],u=n.get(d),h=a!=null?i.h(ju,{index:u,item:c}):void 0,f=l!=null?i.h(ju,{index:u,item:c}):void 0,g=this.$slots.default({item:c,renderedCols:h,renderedItemWithCols:f,index:u})[0];return t?i.h(Eo,{key:d,onResize:m=>this.handleItemResize(d,m)},{default:()=>g}):(g.key=d,g)})}})]):(s=(o=this.$slots).empty)===null||s===void 0?void 0:s.call(o)])}})}}),En="v-hidden",zx=Jn("[v-hidden]",{display:"none!important"}),qu=i.defineComponent({name:"Overflow",props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateCount:Function,onUpdateOverflow:Function},setup(t,{slots:e}){const n=i.ref(null),r=i.ref(null);function o(a){const{value:l}=n,{getCounter:c,getTail:d}=t;let u;if(c!==void 0?u=c():u=r.value,!l||!u)return;u.hasAttribute(En)&&u.removeAttribute(En);const{children:h}=l;if(a.showAllItemsBeforeCalculate)for(const S of h)S.hasAttribute(En)&&S.removeAttribute(En);const f=l.offsetWidth,g=[],m=e.tail?d==null?void 0:d():null;let p=m?m.offsetWidth:0,y=!1;const b=l.children.length-(e.tail?1:0);for(let S=0;S<b-1;++S){if(S<0)continue;const k=h[S];if(y){k.hasAttribute(En)||k.setAttribute(En,"");continue}else k.hasAttribute(En)&&k.removeAttribute(En);const R=k.offsetWidth;if(p+=R,g[S]=R,p>f){const{updateCounter:$}=t;for(let x=S;x>=0;--x){const C=b-1-x;$!==void 0?$(C):u.textContent=`${C}`;const w=u.offsetWidth;if(p-=g[x],p+w<=f||x===0){y=!0,S=x-1,m&&(S===-1?(m.style.maxWidth=`${f-w}px`,m.style.boxSizing="border-box"):m.style.maxWidth="");const{onUpdateCount:T}=t;T&&T(C);break}}}}const{onUpdateOverflow:_}=t;y?_!==void 0&&_(!0):(_!==void 0&&_(!1),u.setAttribute(En,""))}const s=bi();return zx.mount({id:"vueuc/overflow",head:!0,anchorMetaName:na,ssr:s}),i.onMounted(()=>o({showAllItemsBeforeCalculate:!1})),{selfRef:n,counterRef:r,sync:o}},render(){const{$slots:t}=this;return i.nextTick(()=>this.sync({showAllItemsBeforeCalculate:!1})),i.h("div",{class:"v-overflow",ref:"selfRef"},[i.renderSlot(t,"default"),t.counter?t.counter():i.h("span",{style:{display:"inline-block"},ref:"counterRef"}),t.tail?t.tail():null])}});function Xu(t){return t instanceof HTMLElement}function Yu(t){for(let e=0;e<t.childNodes.length;e++){const n=t.childNodes[e];if(Xu(n)&&(Ku(n)||Yu(n)))return!0}return!1}function Uu(t){for(let e=t.childNodes.length-1;e>=0;e--){const n=t.childNodes[e];if(Xu(n)&&(Ku(n)||Uu(n)))return!0}return!1}function Ku(t){if(!Dx(t))return!1;try{t.focus({preventScroll:!0})}catch{}return document.activeElement===t}function Dx(t){if(t.tabIndex>0||t.tabIndex===0&&t.getAttribute("tabIndex")!==null)return!0;if(t.getAttribute("disabled"))return!1;switch(t.nodeName){case"A":return!!t.href&&t.rel!=="ignore";case"INPUT":return t.type!=="hidden"&&t.type!=="file";case"SELECT":case"TEXTAREA":return!0;default:return!1}}let Br=[];const Lx=i.defineComponent({name:"FocusTrap",props:{disabled:Boolean,active:Boolean,autoFocus:{type:Boolean,default:!0},onEsc:Function,initialFocusTo:[String,Function],finalFocusTo:[String,Function],returnFocusOnDeactivated:{type:Boolean,default:!0}},setup(t){const e=K1(),n=i.ref(null),r=i.ref(null);let o=!1,s=!1;const a=typeof document>"u"?null:document.activeElement;function l(){return Br[Br.length-1]===e}function c(y){var b;y.code==="Escape"&&l()&&((b=t.onEsc)===null||b===void 0||b.call(t,y))}i.onMounted(()=>{i.watch(()=>t.active,y=>{y?(h(),$t("keydown",document,c)):(at("keydown",document,c),o&&f())},{immediate:!0})}),i.onBeforeUnmount(()=>{at("keydown",document,c),o&&f()});function d(y){if(!s&&l()){const b=u();if(b===null||b.contains(_r(y)))return;g("first")}}function u(){const y=n.value;if(y===null)return null;let b=y;for(;b=b.nextSibling,!(b===null||b instanceof Element&&b.tagName==="DIV"););return b}function h(){var y;if(!t.disabled){if(Br.push(e),t.autoFocus){const{initialFocusTo:b}=t;b===void 0?g("first"):(y=ku(b))===null||y===void 0||y.focus({preventScroll:!0})}o=!0,document.addEventListener("focus",d,!0)}}function f(){var y;if(t.disabled||(document.removeEventListener("focus",d,!0),Br=Br.filter(_=>_!==e),l()))return;const{finalFocusTo:b}=t;b!==void 0?(y=ku(b))===null||y===void 0||y.focus({preventScroll:!0}):t.returnFocusOnDeactivated&&a instanceof HTMLElement&&(s=!0,a.focus({preventScroll:!0}),s=!1)}function g(y){if(l()&&t.active){const b=n.value,_=r.value;if(b!==null&&_!==null){const S=u();if(S==null||S===_){s=!0,b.focus({preventScroll:!0}),s=!1;return}s=!0;const k=y==="first"?Yu(S):Uu(S);s=!1,k||(s=!0,b.focus({preventScroll:!0}),s=!1)}}}function m(y){if(s)return;const b=u();b!==null&&(y.relatedTarget!==null&&b.contains(y.relatedTarget)?g("last"):g("first"))}function p(y){s||(y.relatedTarget!==null&&y.relatedTarget===n.value?g("last"):g("first"))}return{focusableStartRef:n,focusableEndRef:r,focusableStyle:"position: absolute; height: 0; width: 0;",handleStartFocus:m,handleEndFocus:p}},render(){const{default:t}=this.$slots;if(t===void 0)return null;if(this.disabled)return t();const{active:e,focusableStyle:n}=this;return i.h(i.Fragment,null,[i.h("div",{"aria-hidden":"true",tabindex:e?"0":"-1",ref:"focusableStartRef",style:n,onFocus:this.handleStartFocus}),t(),i.h("div",{"aria-hidden":"true",style:n,ref:"focusableEndRef",tabindex:e?"0":"-1",onFocus:this.handleEndFocus})])}});function SB(t){return t}const ca="n-internal-select-menu",Gu="n-internal-select-menu-body",Zu="n-drawer-body",Qu="n-modal-body",Ju="n-popover-body",eh="__disabled__";function Pn(t){const e=i.inject(Qu,null),n=i.inject(Zu,null),r=i.inject(Ju,null),o=i.inject(Gu,null),s=i.ref();if(typeof document<"u"){s.value=document.fullscreenElement;const a=()=>{s.value=document.fullscreenElement};i.onMounted(()=>{$t("fullscreenchange",document,a)}),i.onBeforeUnmount(()=>{at("fullscreenchange",document,a)})}return Gt(()=>{var a;const{to:l}=t;return l!==void 0?l===!1?eh:l===!0?s.value||"body":l:e!=null&&e.value?(a=e.value.$el)!==null&&a!==void 0?a:e.value:n!=null&&n.value?n.value:r!=null&&r.value?r.value:o!=null&&o.value?o.value:l??(s.value||"body")})}Pn.tdkey=eh,Pn.propTo={type:[String,Object,Boolean],default:void 0};function Hx(t){const e={isDeactivated:!1};let n=!1;return i.onActivated(()=>{if(e.isDeactivated=!1,!n){n=!0;return}t()}),i.onDeactivated(()=>{e.isDeactivated=!0,n||(n=!0)}),e}function th(t,e){e&&(i.onMounted(()=>{const{value:n}=t;n&&Sr.registerHandler(n,e)}),i.watch(t,(n,r)=>{r&&Sr.unregisterHandler(r)},{deep:!1}),i.onBeforeUnmount(()=>{const{value:n}=t;n&&Sr.unregisterHandler(n)}))}function nh(t){return t.replace(/#|\(|\)|,|\s|\./g,"_")}const Wx=/^(\d|\.)+$/,ih=/(\d|\.)+/;function da(t,{c:e=1,offset:n=0,attachPx:r=!0}={}){if(typeof t=="number"){const o=(t+n)*e;return o===0?"0":`${o}px`}else if(typeof t=="string")if(Wx.test(t)){const o=(Number(t)+n)*e;return r?o===0?"0":`${o}px`:`${o}`}else{const o=ih.exec(t);return o?t.replace(ih,String((Number(o[0])+n)*e)):t}return t}function rh(t){const{left:e,right:n,top:r,bottom:o}=tn(t);return`${r} ${e} ${o} ${n}`}var oh={};function jx(t){let e=".",n="__",r="--",o;if(t){let m=t.blockPrefix;m&&(e=m),m=t.elementPrefix,m&&(n=m),m=t.modifierPrefix,m&&(r=m)}const s={install(m){o=m.c;const p=m.context;p.bem={},p.bem.b=null,p.bem.els=null}};function a(m){let p,y;return{before(b){p=b.bem.b,y=b.bem.els,b.bem.els=null},after(b){b.bem.b=p,b.bem.els=y},$({context:b,props:_}){return m=typeof m=="string"?m:m({context:b,props:_}),b.bem.b=m,`${(_==null?void 0:_.bPrefix)||e}${b.bem.b}`}}}function l(m){let p;return{before(y){p=y.bem.els},after(y){y.bem.els=p},$({context:y,props:b}){return m=typeof m=="string"?m:m({context:y,props:b}),y.bem.els=m.split(",").map(_=>_.trim()),y.bem.els.map(_=>`${(b==null?void 0:b.bPrefix)||e}${y.bem.b}${n}${_}`).join(", ")}}}function c(m){return{$({context:p,props:y}){m=typeof m=="string"?m:m({context:p,props:y});const b=m.split(",").map(k=>k.trim());function _(k){return b.map(R=>`&${(y==null?void 0:y.bPrefix)||e}${p.bem.b}${k!==void 0?`${n}${k}`:""}${r}${R}`).join(", ")}const S=p.bem.els;if(S!==null){if(oh.NODE_ENV!=="production"&&S.length>=2)throw Error(`[css-render/plugin-bem]: m(${m}) is invalid, using modifier inside multiple elements is not allowed`);return _(S[0])}else return _()}}}function d(m){return{$({context:p,props:y}){m=typeof m=="string"?m:m({context:p,props:y});const b=p.bem.els;if(oh.NODE_ENV!=="production"&&b!==null&&b.length>=2)throw Error(`[css-render/plugin-bem]: notM(${m}) is invalid, using modifier inside multiple elements is not allowed`);return`&:not(${(y==null?void 0:y.bPrefix)||e}${p.bem.b}${b!==null&&b.length>0?`${n}${b[0]}`:""}${r}${m})`}}}return Object.assign(s,{cB:((...m)=>o(a(m[0]),m[1],m[2])),cE:((...m)=>o(l(m[0]),m[1],m[2])),cM:((...m)=>o(c(m[0]),m[1],m[2])),cNotM:((...m)=>o(d(m[0]),m[1],m[2]))}),s}const qx=".n-",Xx="__",Yx="--",sh=_u(),ah=jx({blockPrefix:qx,elementPrefix:Xx,modifierPrefix:Yx});sh.use(ah);const{c:de,find:TB}=sh,{cB:ge,cE:we,cM:Re,cNotM:nn}=ah,Ux=(...t)=>de(">",[ge(...t)]);function Je(t,e){return t+(e==="default"?"":e.replace(/^[a-z]/,n=>n.toUpperCase()))}let ua;function Kx(){return ua===void 0&&(ua=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),ua}const Gx=new WeakSet;function Zx(t){Gx.add(t)}function lh(t){switch(typeof t){case"string":return t||void 0;case"number":return String(t);default:return}}const ch=new Set;function ei(t,e){const n=`[naive/${t}]: ${e}`;ch.has(n)||(ch.add(n),console.error(n))}function dh(t,e){console.error(`[naive/${t}]: ${e}`)}function uh(t,e){throw new Error(`[naive/${t}]: ${e}`)}function bt(t,...e){if(Array.isArray(t))t.forEach(n=>bt(n,...e));else return t(...e)}function ha(t,e=!0,n=[]){return t.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push(i.createTextVNode(String(r)));return}if(Array.isArray(r)){ha(r,e,n);return}if(r.type===i.Fragment){if(r.children===null)return;Array.isArray(r.children)&&ha(r.children,e,n)}else{if(r.type===i.Comment&&e)return;n.push(r)}}}),n}function Qx(t,e="default",n=void 0){const r=t[e];if(!r)return dh("getFirstSlotVNode",`slot[${e}] is empty`),null;const o=ha(r(n));return o.length===1?o[0]:(dh("getFirstSlotVNode",`slot[${e}] should have exactly one child`),null)}function Jx(t,e=[],n){const r={};return e.forEach(o=>{r[o]=t[o]}),Object.assign(r,n)}function fa(t){const e=t.filter(n=>n!==void 0);if(e.length!==0)return e.length===1?e[0]:n=>{t.forEach(r=>{r&&r(n)})}}function tr(t,...e){return typeof t=="function"?t(...e):typeof t=="string"?i.createTextVNode(t):typeof t=="number"?i.createTextVNode(String(t)):null}function Fo(t){return t.some(e=>i.isVNode(e)?!(e.type===i.Comment||e.type===i.Fragment&&!Fo(e.children)):!0)?t:null}function ma(t,e){return t&&Fo(t())||e()}function xi(t,e){const n=t&&Fo(t());return e(n||null)}function hh(t){return!(t&&Fo(t()))}const ga=i.defineComponent({render(){var t,e;return(e=(t=this.$slots).default)===null||e===void 0?void 0:e.call(t)}}),ki="n-config-provider",ek="n";function vi(t={},e={defaultBordered:!0}){const n=i.inject(ki,null);return{inlineThemeDisabled:n==null?void 0:n.inlineThemeDisabled,mergedRtlRef:n==null?void 0:n.mergedRtlRef,mergedComponentPropsRef:n==null?void 0:n.mergedComponentPropsRef,mergedBreakpointsRef:n==null?void 0:n.mergedBreakpointsRef,mergedBorderedRef:i.computed(()=>{var r,o;const{bordered:s}=t;return s!==void 0?s:(o=(r=n==null?void 0:n.mergedBorderedRef.value)!==null&&r!==void 0?r:e.defaultBordered)!==null&&o!==void 0?o:!0}),mergedClsPrefixRef:n?n.mergedClsPrefixRef:i.shallowRef(ek),namespaceRef:i.computed(()=>n==null?void 0:n.mergedNamespaceRef.value)}}function Ci(t,e,n,r){n||uh("useThemeClass","cssVarsRef is not passed");const o=i.inject(ki,null),s=o==null?void 0:o.mergedThemeHashRef,a=o==null?void 0:o.styleMountTarget,l=i.ref(""),c=bi();let d;const u=`__${t}`,h=()=>{let f=u;const g=e?e.value:void 0,m=s==null?void 0:s.value;m&&(f+=`-${m}`),g&&(f+=`-${g}`);const{themeOverrides:p,builtinThemeOverrides:y}=r;p&&(f+=`-${ta(JSON.stringify(p))}`),y&&(f+=`-${ta(JSON.stringify(y))}`),l.value=f,d=()=>{const b=n.value;let _="";for(const S in b)_+=`${S}: ${b[S]};`;de(`.${f}`,_).mount({id:f,ssr:c,parent:a}),d=void 0}};return i.watchEffect(()=>{h()}),{themeClass:l,onRender:()=>{d==null||d()}}}const fh="n-form-item";function tk(t,{defaultSize:e="medium",mergedSize:n,mergedDisabled:r}={}){const o=i.inject(fh,null);i.provide(fh,null);const s=i.computed(n?()=>n(o):()=>{const{size:c}=t;if(c)return c;if(o){const{mergedSize:d}=o;if(d.value!==void 0)return d.value}return e}),a=i.computed(r?()=>r(o):()=>{const{disabled:c}=t;return c!==void 0?c:o?o.disabled.value:!1}),l=i.computed(()=>{const{status:c}=t;return c||(o==null?void 0:o.mergedValidationStatus.value)});return i.onBeforeUnmount(()=>{o&&o.restoreValidation()}),{mergedSizeRef:s,mergedDisabledRef:a,mergedStatusRef:l,nTriggerFormBlur(){o&&o.handleContentBlur()},nTriggerFormChange(){o&&o.handleContentChange()},nTriggerFormFocus(){o&&o.handleContentFocus()},nTriggerFormInput(){o&&o.handleContentInput()}}}const nk={name:"en-US",global:{undo:"Undo",redo:"Redo",confirm:"Confirm",clear:"Clear"},Popconfirm:{positiveText:"Confirm",negativeText:"Cancel"},Cascader:{placeholder:"Please Select",loading:"Loading",loadingRequiredMessage:t=>`Please load all ${t}'s descendants before checking it.`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",weekFormat:"YYYY-w",clear:"Clear",now:"Now",confirm:"Confirm",selectTime:"Select Time",selectDate:"Select Date",datePlaceholder:"Select Date",datetimePlaceholder:"Select Date and Time",monthPlaceholder:"Select Month",yearPlaceholder:"Select Year",quarterPlaceholder:"Select Quarter",weekPlaceholder:"Select Week",startDatePlaceholder:"Start Date",endDatePlaceholder:"End Date",startDatetimePlaceholder:"Start Date and Time",endDatetimePlaceholder:"End Date and Time",startMonthPlaceholder:"Start Month",endMonthPlaceholder:"End Month",monthBeforeYear:!0,firstDayOfWeek:6,today:"Today"},DataTable:{checkTableAll:"Select all in the table",uncheckTableAll:"Unselect all in the table",confirm:"Confirm",clear:"Clear"},LegacyTransfer:{sourceTitle:"Source",targetTitle:"Target"},Transfer:{selectAll:"Select all",unselectAll:"Unselect all",clearAll:"Clear",total:t=>`Total ${t} items`,selected:t=>`${t} items selected`},Empty:{description:"No Data"},Select:{placeholder:"Please Select"},TimePicker:{placeholder:"Select Time",positiveText:"OK",negativeText:"Cancel",now:"Now",clear:"Clear"},Pagination:{goto:"Goto",selectionSuffix:"page"},DynamicTags:{add:"Add"},Log:{loading:"Loading"},Input:{placeholder:"Please Input"},InputNumber:{placeholder:"Please Input"},DynamicInput:{create:"Create"},ThemeEditor:{title:"Theme Editor",clearAllVars:"Clear All Variables",clearSearch:"Clear Search",filterCompName:"Filter Component Name",filterVarName:"Filter Variable Name",import:"Import",export:"Export",restore:"Reset to Default"},Image:{tipPrevious:"Previous picture (←)",tipNext:"Next picture (→)",tipCounterclockwise:"Counterclockwise",tipClockwise:"Clockwise",tipZoomOut:"Zoom out",tipZoomIn:"Zoom in",tipDownload:"Download",tipClose:"Close (Esc)",tipOriginalSize:"Zoom to original size"},Heatmap:{less:"less",more:"more",monthFormat:"MMM",weekdayFormat:"eee"}};function pa(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}function Tr(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&t.formattingValues){const a=t.defaultFormattingWidth||t.defaultWidth,l=n!=null&&n.width?String(n.width):a;o=t.formattingValues[l]||t.formattingValues[a]}else{const a=t.defaultWidth,l=n!=null&&n.width?String(n.width):t.defaultWidth;o=t.values[l]||t.values[a]}const s=t.argumentCallback?t.argumentCallback(e):e;return o[s]}}function Nr(t){return(e,n={})=>{const r=n.width,o=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],s=e.match(o);if(!s)return null;const a=s[0],l=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(l)?rk(l,h=>h.test(a)):ik(l,h=>h.test(a));let d;d=t.valueCallback?t.valueCallback(c):c,d=n.valueCallback?n.valueCallback(d):d;const u=e.slice(a.length);return{value:d,rest:u}}}function ik(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function rk(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function ok(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const o=r[0],s=e.match(t.parsePattern);if(!s)return null;let a=t.valueCallback?t.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;const l=e.slice(o.length);return{value:a,rest:l}}}const sk={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ak=(t,e,n)=>{let r;const o=sk[t];return typeof o=="string"?r=o:e===1?r=o.one:r=o.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},lk={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ck=(t,e,n,r)=>lk[t],dk={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},uk={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},hk={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},fk={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},mk={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},gk={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},pk={ordinalNumber:(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Tr({values:dk,defaultWidth:"wide"}),quarter:Tr({values:uk,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Tr({values:hk,defaultWidth:"wide"}),day:Tr({values:fk,defaultWidth:"wide"}),dayPeriod:Tr({values:mk,defaultWidth:"wide",formattingValues:gk,defaultFormattingWidth:"wide"})},yk=/^(\d+)(th|st|nd|rd)?/i,bk=/\d+/i,_k={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},wk={any:[/^b/i,/^(a|c)/i]},xk={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},kk={any:[/1/i,/2/i,/3/i,/4/i]},vk={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Ck={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Sk={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Bk={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Tk={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Nk={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},$k={ordinalNumber:ok({matchPattern:yk,parsePattern:bk,valueCallback:t=>parseInt(t,10)}),era:Nr({matchPatterns:_k,defaultMatchWidth:"wide",parsePatterns:wk,defaultParseWidth:"any"}),quarter:Nr({matchPatterns:xk,defaultMatchWidth:"wide",parsePatterns:kk,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Nr({matchPatterns:vk,defaultMatchWidth:"wide",parsePatterns:Ck,defaultParseWidth:"any"}),day:Nr({matchPatterns:Sk,defaultMatchWidth:"wide",parsePatterns:Bk,defaultParseWidth:"any"}),dayPeriod:Nr({matchPatterns:Tk,defaultMatchWidth:"any",parsePatterns:Nk,defaultParseWidth:"any"})},Rk={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ek={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Pk={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Fk={date:pa({formats:Rk,defaultWidth:"full"}),time:pa({formats:Ek,defaultWidth:"full"}),dateTime:pa({formats:Pk,defaultWidth:"full"})},Vk={name:"en-US",locale:{code:"en-US",formatDistance:ak,formatLong:Fk,formatRelative:ck,localize:pk,match:$k,options:{weekStartsOn:0,firstWeekContainsDate:1}}};function mh(t){const{mergedLocaleRef:e,mergedDateLocaleRef:n}=i.inject(ki,null)||{},r=i.computed(()=>{var s,a;return(a=(s=e==null?void 0:e.value)===null||s===void 0?void 0:s[t])!==null&&a!==void 0?a:nk[t]});return{dateLocaleRef:i.computed(()=>{var s;return(s=n==null?void 0:n.value)!==null&&s!==void 0?s:Vk}),localeRef:r}}const $r="naive-ui-style";function Rr(t,e,n){if(!e)return;const r=bi(),o=i.computed(()=>{const{value:l}=e;if(!l)return;const c=l[t];if(c)return c}),s=i.inject(ki,null),a=()=>{i.watchEffect(()=>{const{value:l}=n,c=`${l}${t}Rtl`;if(rx(c,r))return;const{value:d}=o;d&&d.style.mount({id:c,head:!0,anchorMetaName:$r,props:{bPrefix:l?`.${l}-`:void 0},ssr:r,parent:s==null?void 0:s.styleMountTarget})})};return r?a():i.onBeforeMount(a),o}const Er={fontFamily:'v-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontFamilyMono:"v-mono, SFMono-Regular, Menlo, Consolas, Courier, monospace",fontWeight:"400",fontWeightStrong:"500",cubicBezierEaseInOut:"cubic-bezier(.4, 0, .2, 1)",cubicBezierEaseOut:"cubic-bezier(0, 0, .2, 1)",cubicBezierEaseIn:"cubic-bezier(.4, 0, 1, 1)",borderRadius:"3px",borderRadiusSmall:"2px",fontSize:"14px",fontSizeMini:"12px",fontSizeTiny:"12px",fontSizeSmall:"14px",fontSizeMedium:"14px",fontSizeLarge:"15px",fontSizeHuge:"16px",lineHeight:"1.6",heightMini:"16px",heightTiny:"22px",heightSmall:"28px",heightMedium:"34px",heightLarge:"40px",heightHuge:"46px"},{fontSize:Ik,fontFamily:Mk,lineHeight:Ak}=Er,gh=de("body",`
116
+ `)}function ta(t){for(var e=0,n,r=0,o=t.length;o>=4;++r,o-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(o){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}typeof window<"u"&&(window.__cssrContext={});function Qw(t,e,n,r){const{els:o}=e;if(n===void 0)o.forEach(mu),e.els=[];else{const s=vo(n,r);s&&o.includes(s)&&(mu(s),e.els=o.filter(a=>a!==s))}}function bu(t,e){t.push(e)}function Jw(t,e,n,r,o,s,a,l,c){let d;if(n===void 0&&(d=e.render(r),n=ta(d)),c){c.adapter(n,d??e.render(r));return}l===void 0&&(l=document.head);const u=vo(n,l);if(u!==null&&!s)return u;const h=u??Yw(n);if(d===void 0&&(d=e.render(r)),h.textContent=d,u!==null)return u;if(a){const f=l.querySelector(`meta[name="${a}"]`);if(f)return l.insertBefore(h,f),bu(e.els,h),h}return o?l.insertBefore(h,l.querySelector("style, link")):l.appendChild(h),bu(e.els,h),h}function ex(t){return Zw(this,this.instance,t)}function tx(t={}){const{id:e,ssr:n,props:r,head:o=!1,force:s=!1,anchorMetaName:a,parent:l}=t;return Jw(this.instance,this,e,r,o,s,a,l,n)}function nx(t={}){const{id:e,parent:n}=t;Qw(this.instance,this,e,n)}const So=function(t,e,n,r){return{instance:t,$:e,props:n,children:r,els:[],render:ex,mount:tx,unmount:nx}},ix=function(t,e,n,r){return Array.isArray(e)?So(t,{$:null},null,e):Array.isArray(n)?So(t,e,null,n):Array.isArray(r)?So(t,e,n,r):So(t,e,n,null)};function _u(t={}){const e={c:((...n)=>ix(e,...n)),use:(n,...r)=>n.install(e,...r),find:vo,context:{},config:t};return e}function rx(t,e){if(t===void 0)return!1;if(e){const{context:{ids:n}}=e;return n.has(t)}return vo(t)!==null}const{c:Jn}=_u(),na="vueuc-style";function wu(t){return t&-t}class xu{constructor(e,n){this.l=e,this.min=n;const r=new Array(e+1);for(let o=0;o<e+1;++o)r[o]=0;this.ft=r}add(e,n){if(n===0)return;const{l:r,ft:o}=this;for(e+=1;e<=r;)o[e]+=n,e+=wu(e)}get(e){return this.sum(e+1)-this.sum(e)}sum(e){if(e===void 0&&(e=this.l),e<=0)return 0;const{ft:n,min:r,l:o}=this;if(e>o)throw new Error("[FinweckTree.sum]: `i` is larger than length.");let s=e*r;for(;e>0;)s+=n[e],e-=wu(e);return s}getBound(e){let n=0,r=this.l;for(;r>n;){const o=Math.floor((n+r)/2),s=this.sum(o);if(s>e){r=o;continue}else if(s<e){if(n===o)return this.sum(n+1)<=e?n+1:o;n=o}else return o}return n}}function ku(t){return typeof t=="string"?document.querySelector(t):t()||null}const ox=i.defineComponent({name:"LazyTeleport",props:{to:{type:[String,Object],default:void 0},disabled:Boolean,show:{type:Boolean,required:!0}},setup(t){return{showTeleport:Ew(i.toRef(t,"show")),mergedTo:i.computed(()=>{const{to:e}=t;return e??"body"})}},render(){return this.showTeleport?this.disabled?Zs("lazy-teleport",this.$slots):i.h(i.Teleport,{disabled:this.disabled,to:this.mergedTo},Zs("lazy-teleport",this.$slots)):null}}),Bo={top:"bottom",bottom:"top",left:"right",right:"left"},vu={start:"end",center:"center",end:"start"},ia={top:"height",bottom:"height",left:"width",right:"width"},sx={"bottom-start":"top left",bottom:"top center","bottom-end":"top right","top-start":"bottom left",top:"bottom center","top-end":"bottom right","right-start":"top left",right:"center left","right-end":"bottom left","left-start":"top right",left:"center right","left-end":"bottom right"},ax={"bottom-start":"bottom left",bottom:"bottom center","bottom-end":"bottom right","top-start":"top left",top:"top center","top-end":"top right","right-start":"top right",right:"center right","right-end":"bottom right","left-start":"top left",left:"center left","left-end":"bottom left"},lx={"bottom-start":"right","bottom-end":"left","top-start":"right","top-end":"left","right-start":"bottom","right-end":"top","left-start":"bottom","left-end":"top"},Cu={top:!0,bottom:!1,left:!0,right:!1},Su={top:"end",bottom:"start",left:"end",right:"start"};function cx(t,e,n,r,o,s){if(!o||s)return{placement:t,top:0,left:0};const[a,l]=t.split("-");let c=l??"center",d={top:0,left:0};const u=(g,m,p)=>{let y=0,b=0;const _=n[g]-e[m]-e[g];return _>0&&r&&(p?b=Cu[m]?_:-_:y=Cu[m]?_:-_),{left:y,top:b}},h=a==="left"||a==="right";if(c!=="center"){const g=lx[t],m=Bo[g],p=ia[g];if(n[p]>e[p]){if(e[g]+e[p]<n[p]){const y=(n[p]-e[p])/2;e[g]<y||e[m]<y?e[g]<e[m]?(c=vu[l],d=u(p,m,h)):d=u(p,g,h):c="center"}}else n[p]<e[p]&&e[m]<0&&e[g]>e[m]&&(c=vu[l])}else{const g=a==="bottom"||a==="top"?"left":"top",m=Bo[g],p=ia[g],y=(n[p]-e[p])/2;(e[g]<y||e[m]<y)&&(e[g]>e[m]?(c=Su[g],d=u(p,g,h)):(c=Su[m],d=u(p,m,h)))}let f=a;return e[a]<n[ia[a]]&&e[a]<e[Bo[a]]&&(f=Bo[a]),{placement:c!=="center"?`${f}-${c}`:f,left:d.left,top:d.top}}function dx(t,e){return e?ax[t]:sx[t]}function ux(t,e,n,r,o,s){if(s)switch(t){case"bottom-start":return{top:`${Math.round(n.top-e.top+n.height)}px`,left:`${Math.round(n.left-e.left)}px`,transform:"translateY(-100%)"};case"bottom-end":return{top:`${Math.round(n.top-e.top+n.height)}px`,left:`${Math.round(n.left-e.left+n.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top-start":return{top:`${Math.round(n.top-e.top)}px`,left:`${Math.round(n.left-e.left)}px`,transform:""};case"top-end":return{top:`${Math.round(n.top-e.top)}px`,left:`${Math.round(n.left-e.left+n.width)}px`,transform:"translateX(-100%)"};case"right-start":return{top:`${Math.round(n.top-e.top)}px`,left:`${Math.round(n.left-e.left+n.width)}px`,transform:"translateX(-100%)"};case"right-end":return{top:`${Math.round(n.top-e.top+n.height)}px`,left:`${Math.round(n.left-e.left+n.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"left-start":return{top:`${Math.round(n.top-e.top)}px`,left:`${Math.round(n.left-e.left)}px`,transform:""};case"left-end":return{top:`${Math.round(n.top-e.top+n.height)}px`,left:`${Math.round(n.left-e.left)}px`,transform:"translateY(-100%)"};case"top":return{top:`${Math.round(n.top-e.top)}px`,left:`${Math.round(n.left-e.left+n.width/2)}px`,transform:"translateX(-50%)"};case"right":return{top:`${Math.round(n.top-e.top+n.height/2)}px`,left:`${Math.round(n.left-e.left+n.width)}px`,transform:"translateX(-100%) translateY(-50%)"};case"left":return{top:`${Math.round(n.top-e.top+n.height/2)}px`,left:`${Math.round(n.left-e.left)}px`,transform:"translateY(-50%)"};case"bottom":default:return{top:`${Math.round(n.top-e.top+n.height)}px`,left:`${Math.round(n.left-e.left+n.width/2)}px`,transform:"translateX(-50%) translateY(-100%)"}}switch(t){case"bottom-start":return{top:`${Math.round(n.top-e.top+n.height+r)}px`,left:`${Math.round(n.left-e.left+o)}px`,transform:""};case"bottom-end":return{top:`${Math.round(n.top-e.top+n.height+r)}px`,left:`${Math.round(n.left-e.left+n.width+o)}px`,transform:"translateX(-100%)"};case"top-start":return{top:`${Math.round(n.top-e.top+r)}px`,left:`${Math.round(n.left-e.left+o)}px`,transform:"translateY(-100%)"};case"top-end":return{top:`${Math.round(n.top-e.top+r)}px`,left:`${Math.round(n.left-e.left+n.width+o)}px`,transform:"translateX(-100%) translateY(-100%)"};case"right-start":return{top:`${Math.round(n.top-e.top+r)}px`,left:`${Math.round(n.left-e.left+n.width+o)}px`,transform:""};case"right-end":return{top:`${Math.round(n.top-e.top+n.height+r)}px`,left:`${Math.round(n.left-e.left+n.width+o)}px`,transform:"translateY(-100%)"};case"left-start":return{top:`${Math.round(n.top-e.top+r)}px`,left:`${Math.round(n.left-e.left+o)}px`,transform:"translateX(-100%)"};case"left-end":return{top:`${Math.round(n.top-e.top+n.height+r)}px`,left:`${Math.round(n.left-e.left+o)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top":return{top:`${Math.round(n.top-e.top+r)}px`,left:`${Math.round(n.left-e.left+n.width/2+o)}px`,transform:"translateY(-100%) translateX(-50%)"};case"right":return{top:`${Math.round(n.top-e.top+n.height/2+r)}px`,left:`${Math.round(n.left-e.left+n.width+o)}px`,transform:"translateY(-50%)"};case"left":return{top:`${Math.round(n.top-e.top+n.height/2+r)}px`,left:`${Math.round(n.left-e.left+o)}px`,transform:"translateY(-50%) translateX(-100%)"};case"bottom":default:return{top:`${Math.round(n.top-e.top+n.height+r)}px`,left:`${Math.round(n.left-e.left+n.width/2+o)}px`,transform:"translateX(-50%)"}}}const hx=Jn([Jn(".v-binder-follower-container",{position:"absolute",left:"0",right:"0",top:"0",height:"0",pointerEvents:"none",zIndex:"auto"}),Jn(".v-binder-follower-content",{position:"absolute",zIndex:"auto"},[Jn("> *",{pointerEvents:"all"})])]),Bu=i.defineComponent({name:"Follower",inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:"bottom"},syncTrigger:{type:Array,default:["resize","scroll"]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(t){const e=i.inject("VBinder"),n=Gt(()=>t.enabled!==void 0?t.enabled:t.show),r=i.ref(null),o=i.ref(null),s=()=>{const{syncTrigger:f}=t;f.includes("scroll")&&e.addScrollListener(c),f.includes("resize")&&e.addResizeListener(c)},a=()=>{e.removeScrollListener(c),e.removeResizeListener(c)};i.onMounted(()=>{n.value&&(c(),s())});const l=bi();hx.mount({id:"vueuc/binder",head:!0,anchorMetaName:na,ssr:l}),i.onBeforeUnmount(()=>{a()}),Fw(()=>{n.value&&c()});const c=()=>{if(!n.value)return;const f=r.value;if(f===null)return;const g=e.targetRef,{x:m,y:p,overlap:y}=t,b=m!==void 0&&p!==void 0?Mw(m,p):Js(g);f.style.setProperty("--v-target-width",`${Math.round(b.width)}px`),f.style.setProperty("--v-target-height",`${Math.round(b.height)}px`);const{width:_,minWidth:S,placement:k,internalShift:R,flip:$}=t;f.setAttribute("v-placement",k),y?f.setAttribute("v-overlap",""):f.removeAttribute("v-overlap");const{style:x}=f;_==="target"?x.width=`${b.width}px`:_!==void 0?x.width=_:x.width="",S==="target"?x.minWidth=`${b.width}px`:S!==void 0?x.minWidth=S:x.minWidth="";const C=Js(f),w=Js(o.value),{left:T,top:N,placement:A}=cx(k,b,C,R,$,y),I=dx(A,y),{left:z,top:L,transform:ee}=ux(A,w,b,N,T,y);f.setAttribute("v-placement",A),f.style.setProperty("--v-offset-left",`${Math.round(T)}px`),f.style.setProperty("--v-offset-top",`${Math.round(N)}px`),f.style.transform=`translateX(${z}) translateY(${L}) ${ee}`,f.style.setProperty("--v-transform-origin",I),f.style.transformOrigin=I};i.watch(n,f=>{f?(s(),d()):a()});const d=()=>{i.nextTick().then(c).catch(f=>console.error(f))};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(f=>{i.watch(i.toRef(t,f),c)}),["teleportDisabled"].forEach(f=>{i.watch(i.toRef(t,f),d)}),i.watch(i.toRef(t,"syncTrigger"),f=>{f.includes("resize")?e.addResizeListener(c):e.removeResizeListener(c),f.includes("scroll")?e.addScrollListener(c):e.removeScrollListener(c)});const u=ko(),h=Gt(()=>{const{to:f}=t;if(f!==void 0)return f;u.value});return{VBinder:e,mergedEnabled:n,offsetContainerRef:o,followerRef:r,mergedTo:h,syncPosition:c}},render(){return i.h(ox,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var t,e;const n=i.h("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[i.h("div",{class:"v-binder-follower-content",ref:"followerRef"},(e=(t=this.$slots).default)===null||e===void 0?void 0:e.call(t))]);return this.zindexable?i.withDirectives(n,[[ou,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):n}})}});var _i=[],fx=function(){return _i.some(function(t){return t.activeTargets.length>0})},mx=function(){return _i.some(function(t){return t.skippedTargets.length>0})},Tu="ResizeObserver loop completed with undelivered notifications.",gx=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:Tu}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=Tu),window.dispatchEvent(t)},vr;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(vr||(vr={}));var wi=function(t){return Object.freeze(t)},px=(function(){function t(e,n){this.inlineSize=e,this.blockSize=n,wi(this)}return t})(),Nu=(function(){function t(e,n,r,o){return this.x=e,this.y=n,this.width=r,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,wi(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,r=e.y,o=e.top,s=e.right,a=e.bottom,l=e.left,c=e.width,d=e.height;return{x:n,y:r,top:o,right:s,bottom:a,left:l,width:c,height:d}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t})(),ra=function(t){return t instanceof SVGElement&&"getBBox"in t},$u=function(t){if(ra(t)){var e=t.getBBox(),n=e.width,r=e.height;return!n&&!r}var o=t,s=o.offsetWidth,a=o.offsetHeight;return!(s||a||t.getClientRects().length)},Ru=function(t){var e;if(t instanceof Element)return!0;var n=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},yx=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Cr=typeof window<"u"?window:{},To=new WeakMap,Eu=/auto|scroll/,bx=/^tb|vertical/,_x=/msie|trident/i.test(Cr.navigator&&Cr.navigator.userAgent),kn=function(t){return parseFloat(t||"0")},er=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new px((n?e:t)||0,(n?t:e)||0)},Pu=wi({devicePixelContentBoxSize:er(),borderBoxSize:er(),contentBoxSize:er(),contentRect:new Nu(0,0,0,0)}),Fu=function(t,e){if(e===void 0&&(e=!1),To.has(t)&&!e)return To.get(t);if($u(t))return To.set(t,Pu),Pu;var n=getComputedStyle(t),r=ra(t)&&t.ownerSVGElement&&t.getBBox(),o=!_x&&n.boxSizing==="border-box",s=bx.test(n.writingMode||""),a=!r&&Eu.test(n.overflowY||""),l=!r&&Eu.test(n.overflowX||""),c=r?0:kn(n.paddingTop),d=r?0:kn(n.paddingRight),u=r?0:kn(n.paddingBottom),h=r?0:kn(n.paddingLeft),f=r?0:kn(n.borderTopWidth),g=r?0:kn(n.borderRightWidth),m=r?0:kn(n.borderBottomWidth),p=r?0:kn(n.borderLeftWidth),y=h+d,b=c+u,_=p+g,S=f+m,k=l?t.offsetHeight-S-t.clientHeight:0,R=a?t.offsetWidth-_-t.clientWidth:0,$=o?y+_:0,x=o?b+S:0,C=r?r.width:kn(n.width)-$-R,w=r?r.height:kn(n.height)-x-k,T=C+y+R+_,N=w+b+k+S,A=wi({devicePixelContentBoxSize:er(Math.round(C*devicePixelRatio),Math.round(w*devicePixelRatio),s),borderBoxSize:er(T,N,s),contentBoxSize:er(C,w,s),contentRect:new Nu(h,c,C,w)});return To.set(t,A),A},Vu=function(t,e,n){var r=Fu(t,n),o=r.borderBoxSize,s=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(e){case vr.DEVICE_PIXEL_CONTENT_BOX:return a;case vr.BORDER_BOX:return o;default:return s}},wx=(function(){function t(e){var n=Fu(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=wi([n.borderBoxSize]),this.contentBoxSize=wi([n.contentBoxSize]),this.devicePixelContentBoxSize=wi([n.devicePixelContentBoxSize])}return t})(),Iu=function(t){if($u(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},xx=function(){var t=1/0,e=[];_i.forEach(function(a){if(a.activeTargets.length!==0){var l=[];a.activeTargets.forEach(function(d){var u=new wx(d.target),h=Iu(d.target);l.push(u),d.lastReportedSize=Vu(d.target,d.observedBox),h<t&&(t=h)}),e.push(function(){a.callback.call(a.observer,l,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var n=0,r=e;n<r.length;n++){var o=r[n];o()}return t},Mu=function(t){_i.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(o){o.isActive()&&(Iu(o.target)>t?n.activeTargets.push(o):n.skippedTargets.push(o))})})},kx=function(){var t=0;for(Mu(t);fx();)t=xx(),Mu(t);return mx()&&gx(),t>0},oa,Au=[],vx=function(){return Au.splice(0).forEach(function(t){return t()})},Cx=function(t){if(!oa){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return vx()}).observe(n,r),oa=function(){n.textContent="".concat(e?e--:e++)}}Au.push(t),oa()},Sx=function(t){Cx(function(){requestAnimationFrame(t)})},No=0,Bx=function(){return!!No},Tx=250,Nx={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ou=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],zu=function(t){return t===void 0&&(t=0),Date.now()+t},sa=!1,$x=(function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=Tx),!sa){sa=!0;var r=zu(e);Sx(function(){var o=!1;try{o=kx()}finally{if(sa=!1,e=r-zu(),!Bx())return;o?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,Nx)};document.body?n():Cr.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ou.forEach(function(n){return Cr.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Ou.forEach(function(n){return Cr.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t})(),aa=new $x,Du=function(t){!No&&t>0&&aa.start(),No+=t,!No&&aa.stop()},Rx=function(t){return!ra(t)&&!yx(t)&&getComputedStyle(t).display==="inline"},Ex=(function(){function t(e,n){this.target=e,this.observedBox=n||vr.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Vu(this.target,this.observedBox,!0);return Rx(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t})(),Px=(function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t})(),$o=new WeakMap,Lu=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},Ro=(function(){function t(){}return t.connect=function(e,n){var r=new Px(e,n);$o.set(e,r)},t.observe=function(e,n,r){var o=$o.get(e),s=o.observationTargets.length===0;Lu(o.observationTargets,n)<0&&(s&&_i.push(o),o.observationTargets.push(new Ex(n,r&&r.box)),Du(1),aa.schedule())},t.unobserve=function(e,n){var r=$o.get(e),o=Lu(r.observationTargets,n),s=r.observationTargets.length===1;o>=0&&(s&&_i.splice(_i.indexOf(r),1),r.observationTargets.splice(o,1),Du(-1))},t.disconnect=function(e){var n=this,r=$o.get(e);r.observationTargets.slice().forEach(function(o){return n.unobserve(e,o.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t})(),Fx=(function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Ro.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ru(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ro.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ru(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ro.unobserve(this,e)},t.prototype.disconnect=function(){Ro.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t})();class Vx{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<"u"&&window.ResizeObserver||Fx)(this.handleResize),this.elHandlersMap=new Map}handleResize(e){for(const n of e){const r=this.elHandlersMap.get(n.target);r!==void 0&&r(n)}}registerHandler(e,n){this.elHandlersMap.set(e,n),this.observer.observe(e)}unregisterHandler(e){this.elHandlersMap.has(e)&&(this.elHandlersMap.delete(e),this.observer.unobserve(e))}}const Sr=new Vx,Eo=i.defineComponent({name:"ResizeObserver",props:{onResize:Function},setup(t){let e=!1;const n=i.getCurrentInstance().proxy;function r(o){const{onResize:s}=t;s!==void 0&&s(o)}i.onMounted(()=>{const o=n.$el;if(o===void 0){hu("resize-observer","$el does not exist.");return}if(o.nextElementSibling!==o.nextSibling&&o.nodeType===3&&o.nodeValue!==""){hu("resize-observer","$el can not be observed (it may be a text node).");return}o.nextElementSibling!==null&&(Sr.registerHandler(o.nextElementSibling,r),e=!0)}),i.onBeforeUnmount(()=>{e&&Sr.unregisterHandler(n.$el.nextElementSibling)})},render(){return i.renderSlot(this.$slots,"default")}});let Po;function Ix(){return typeof document>"u"?!1:(Po===void 0&&("matchMedia"in window?Po=window.matchMedia("(pointer:coarse)").matches:Po=!1),Po)}let la;function Hu(){return typeof document>"u"?1:(la===void 0&&(la="chrome"in window?window.devicePixelRatio:1),la)}const Wu="VVirtualListXScroll";function Mx({columnsRef:t,renderColRef:e,renderItemWithColsRef:n}){const r=i.ref(0),o=i.ref(0),s=i.computed(()=>{const d=t.value;if(d.length===0)return null;const u=new xu(d.length,0);return d.forEach((h,f)=>{u.add(f,h.width)}),u}),a=Gt(()=>{const d=s.value;return d!==null?Math.max(d.getBound(o.value)-1,0):0}),l=d=>{const u=s.value;return u!==null?u.sum(d):0},c=Gt(()=>{const d=s.value;return d!==null?Math.min(d.getBound(o.value+r.value)+1,t.value.length-1):0});return i.provide(Wu,{startIndexRef:a,endIndexRef:c,columnsRef:t,renderColRef:e,renderItemWithColsRef:n,getLeft:l}),{listWidthRef:r,scrollLeftRef:o}}const ju=i.defineComponent({name:"VirtualListRow",props:{index:{type:Number,required:!0},item:{type:Object,required:!0}},setup(){const{startIndexRef:t,endIndexRef:e,columnsRef:n,getLeft:r,renderColRef:o,renderItemWithColsRef:s}=i.inject(Wu);return{startIndex:t,endIndex:e,columns:n,renderCol:o,renderItemWithCols:s,getLeft:r}},render(){const{startIndex:t,endIndex:e,columns:n,renderCol:r,renderItemWithCols:o,getLeft:s,item:a}=this;if(o!=null)return o({itemIndex:this.index,startColIndex:t,endColIndex:e,allColumns:n,item:a,getLeft:s});if(r!=null){const l=[];for(let c=t;c<=e;++c){const d=n[c];l.push(r({column:d,left:s(c),item:a}))}return l}return null}}),Ax=Jn(".v-vl",{maxHeight:"inherit",height:"100%",overflow:"auto",minWidth:"1px"},[Jn("&:not(.v-vl--show-scrollbar)",{scrollbarWidth:"none"},[Jn("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",{width:0,height:0,display:"none"})])]),Ox=i.defineComponent({name:"VirtualList",inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},columns:{type:Array,default:()=>[]},renderCol:Function,renderItemWithCols:Function,items:{type:Array,default:()=>[]},itemSize:{type:Number,required:!0},itemResizable:Boolean,itemsStyle:[String,Object],visibleItemsTag:{type:[String,Object],default:"div"},visibleItemsProps:Object,ignoreItemResize:Boolean,onScroll:Function,onWheel:Function,onResize:Function,defaultScrollKey:[Number,String],defaultScrollIndex:Number,keyField:{type:String,default:"key"},paddingTop:{type:[Number,String],default:0},paddingBottom:{type:[Number,String],default:0}},setup(t){const e=bi();Ax.mount({id:"vueuc/virtual-list",head:!0,anchorMetaName:na,ssr:e}),i.onMounted(()=>{const{defaultScrollIndex:I,defaultScrollKey:z}=t;I!=null?y({index:I}):z!=null&&y({key:z})});let n=!1,r=!1;i.onActivated(()=>{if(n=!1,!r){r=!0;return}y({top:g.value,left:a.value})}),i.onDeactivated(()=>{n=!0,r||(r=!0)});const o=Gt(()=>{if(t.renderCol==null&&t.renderItemWithCols==null||t.columns.length===0)return;let I=0;return t.columns.forEach(z=>{I+=z.width}),I}),s=i.computed(()=>{const I=new Map,{keyField:z}=t;return t.items.forEach((L,ee)=>{I.set(L[z],ee)}),I}),{scrollLeftRef:a,listWidthRef:l}=Mx({columnsRef:i.toRef(t,"columns"),renderColRef:i.toRef(t,"renderCol"),renderItemWithColsRef:i.toRef(t,"renderItemWithCols")}),c=i.ref(null),d=i.ref(void 0),u=new Map,h=i.computed(()=>{const{items:I,itemSize:z,keyField:L}=t,ee=new xu(I.length,z);return I.forEach((ne,P)=>{const E=ne[L],W=u.get(E);W!==void 0&&ee.add(P,W)}),ee}),f=i.ref(0),g=i.ref(0),m=Gt(()=>Math.max(h.value.getBound(g.value-wr(t.paddingTop))-1,0)),p=i.computed(()=>{const{value:I}=d;if(I===void 0)return[];const{items:z,itemSize:L}=t,ee=m.value,ne=Math.min(ee+Math.ceil(I/L+1),z.length-1),P=[];for(let E=ee;E<=ne;++E)P.push(z[E]);return P}),y=(I,z)=>{if(typeof I=="number"){k(I,z,"auto");return}const{left:L,top:ee,index:ne,key:P,position:E,behavior:W,debounce:X=!0}=I;if(L!==void 0||ee!==void 0)k(L,ee,W);else if(ne!==void 0)S(ne,W,X);else if(P!==void 0){const H=s.value.get(P);H!==void 0&&S(H,W,X)}else E==="bottom"?k(0,Number.MAX_SAFE_INTEGER,W):E==="top"&&k(0,0,W)};let b,_=null;function S(I,z,L){const{value:ee}=h,ne=ee.sum(I)+wr(t.paddingTop);if(!L)c.value.scrollTo({left:0,top:ne,behavior:z});else{b=I,_!==null&&window.clearTimeout(_),_=window.setTimeout(()=>{b=void 0,_=null},16);const{scrollTop:P,offsetHeight:E}=c.value;if(ne>P){const W=ee.get(I);ne+W<=P+E||c.value.scrollTo({left:0,top:ne+W-E,behavior:z})}else c.value.scrollTo({left:0,top:ne,behavior:z})}}function k(I,z,L){c.value.scrollTo({left:I,top:z,behavior:L})}function R(I,z){var L,ee,ne;if(n||t.ignoreItemResize||A(z.target))return;const{value:P}=h,E=s.value.get(I),W=P.get(E),X=(ne=(ee=(L=z.borderBoxSize)===null||L===void 0?void 0:L[0])===null||ee===void 0?void 0:ee.blockSize)!==null&&ne!==void 0?ne:z.contentRect.height;if(X===W)return;X-t.itemSize===0?u.delete(I):u.set(I,X-t.itemSize);const q=X-W;if(q===0)return;P.add(E,q);const F=c.value;if(F!=null){if(b===void 0){const V=P.sum(E);F.scrollTop>V&&F.scrollBy(0,q)}else if(E<b)F.scrollBy(0,q);else if(E===b){const V=P.sum(E);X+V>F.scrollTop+F.offsetHeight&&F.scrollBy(0,q)}N()}f.value++}const $=!Ix();let x=!1;function C(I){var z;(z=t.onScroll)===null||z===void 0||z.call(t,I),(!$||!x)&&N()}function w(I){var z;if((z=t.onWheel)===null||z===void 0||z.call(t,I),$){const L=c.value;if(L!=null){if(I.deltaX===0&&(L.scrollTop===0&&I.deltaY<=0||L.scrollTop+L.offsetHeight>=L.scrollHeight&&I.deltaY>=0))return;I.preventDefault(),L.scrollTop+=I.deltaY/Hu(),L.scrollLeft+=I.deltaX/Hu(),N(),x=!0,Ud(()=>{x=!1})}}}function T(I){if(n||A(I.target))return;if(t.renderCol==null&&t.renderItemWithCols==null){if(I.contentRect.height===d.value)return}else if(I.contentRect.height===d.value&&I.contentRect.width===l.value)return;d.value=I.contentRect.height,l.value=I.contentRect.width;const{onResize:z}=t;z!==void 0&&z(I)}function N(){const{value:I}=c;I!=null&&(g.value=I.scrollTop,a.value=I.scrollLeft)}function A(I){let z=I;for(;z!==null;){if(z.style.display==="none")return!0;z=z.parentElement}return!1}return{listHeight:d,listStyle:{overflow:"auto"},keyToIndex:s,itemsStyle:i.computed(()=>{const{itemResizable:I}=t,z=xr(h.value.sum());return f.value,[t.itemsStyle,{boxSizing:"content-box",width:xr(o.value),height:I?"":z,minHeight:I?z:"",paddingTop:xr(t.paddingTop),paddingBottom:xr(t.paddingBottom)}]}),visibleItemsStyle:i.computed(()=>(f.value,{transform:`translateY(${xr(h.value.sum(m.value))})`})),viewportItems:p,listElRef:c,itemsElRef:i.ref(null),scrollTo:y,handleListResize:T,handleListScroll:C,handleListWheel:w,handleItemResize:R}},render(){const{itemResizable:t,keyField:e,keyToIndex:n,visibleItemsTag:r}=this;return i.h(Eo,{onResize:this.handleListResize},{default:()=>{var o,s;return i.h("div",i.mergeProps(this.$attrs,{class:["v-vl",this.showScrollbar&&"v-vl--show-scrollbar"],onScroll:this.handleListScroll,onWheel:this.handleListWheel,ref:"listElRef"}),[this.items.length!==0?i.h("div",{ref:"itemsElRef",class:"v-vl-items",style:this.itemsStyle},[i.h(r,Object.assign({class:"v-vl-visible-items",style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>{const{renderCol:a,renderItemWithCols:l}=this;return this.viewportItems.map(c=>{const d=c[e],u=n.get(d),h=a!=null?i.h(ju,{index:u,item:c}):void 0,f=l!=null?i.h(ju,{index:u,item:c}):void 0,g=this.$slots.default({item:c,renderedCols:h,renderedItemWithCols:f,index:u})[0];return t?i.h(Eo,{key:d,onResize:m=>this.handleItemResize(d,m)},{default:()=>g}):(g.key=d,g)})}})]):(s=(o=this.$slots).empty)===null||s===void 0?void 0:s.call(o)])}})}}),En="v-hidden",zx=Jn("[v-hidden]",{display:"none!important"}),qu=i.defineComponent({name:"Overflow",props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateCount:Function,onUpdateOverflow:Function},setup(t,{slots:e}){const n=i.ref(null),r=i.ref(null);function o(a){const{value:l}=n,{getCounter:c,getTail:d}=t;let u;if(c!==void 0?u=c():u=r.value,!l||!u)return;u.hasAttribute(En)&&u.removeAttribute(En);const{children:h}=l;if(a.showAllItemsBeforeCalculate)for(const S of h)S.hasAttribute(En)&&S.removeAttribute(En);const f=l.offsetWidth,g=[],m=e.tail?d==null?void 0:d():null;let p=m?m.offsetWidth:0,y=!1;const b=l.children.length-(e.tail?1:0);for(let S=0;S<b-1;++S){if(S<0)continue;const k=h[S];if(y){k.hasAttribute(En)||k.setAttribute(En,"");continue}else k.hasAttribute(En)&&k.removeAttribute(En);const R=k.offsetWidth;if(p+=R,g[S]=R,p>f){const{updateCounter:$}=t;for(let x=S;x>=0;--x){const C=b-1-x;$!==void 0?$(C):u.textContent=`${C}`;const w=u.offsetWidth;if(p-=g[x],p+w<=f||x===0){y=!0,S=x-1,m&&(S===-1?(m.style.maxWidth=`${f-w}px`,m.style.boxSizing="border-box"):m.style.maxWidth="");const{onUpdateCount:T}=t;T&&T(C);break}}}}const{onUpdateOverflow:_}=t;y?_!==void 0&&_(!0):(_!==void 0&&_(!1),u.setAttribute(En,""))}const s=bi();return zx.mount({id:"vueuc/overflow",head:!0,anchorMetaName:na,ssr:s}),i.onMounted(()=>o({showAllItemsBeforeCalculate:!1})),{selfRef:n,counterRef:r,sync:o}},render(){const{$slots:t}=this;return i.nextTick(()=>this.sync({showAllItemsBeforeCalculate:!1})),i.h("div",{class:"v-overflow",ref:"selfRef"},[i.renderSlot(t,"default"),t.counter?t.counter():i.h("span",{style:{display:"inline-block"},ref:"counterRef"}),t.tail?t.tail():null])}});function Xu(t){return t instanceof HTMLElement}function Yu(t){for(let e=0;e<t.childNodes.length;e++){const n=t.childNodes[e];if(Xu(n)&&(Ku(n)||Yu(n)))return!0}return!1}function Uu(t){for(let e=t.childNodes.length-1;e>=0;e--){const n=t.childNodes[e];if(Xu(n)&&(Ku(n)||Uu(n)))return!0}return!1}function Ku(t){if(!Dx(t))return!1;try{t.focus({preventScroll:!0})}catch{}return document.activeElement===t}function Dx(t){if(t.tabIndex>0||t.tabIndex===0&&t.getAttribute("tabIndex")!==null)return!0;if(t.getAttribute("disabled"))return!1;switch(t.nodeName){case"A":return!!t.href&&t.rel!=="ignore";case"INPUT":return t.type!=="hidden"&&t.type!=="file";case"SELECT":case"TEXTAREA":return!0;default:return!1}}let Br=[];const Lx=i.defineComponent({name:"FocusTrap",props:{disabled:Boolean,active:Boolean,autoFocus:{type:Boolean,default:!0},onEsc:Function,initialFocusTo:[String,Function],finalFocusTo:[String,Function],returnFocusOnDeactivated:{type:Boolean,default:!0}},setup(t){const e=K1(),n=i.ref(null),r=i.ref(null);let o=!1,s=!1;const a=typeof document>"u"?null:document.activeElement;function l(){return Br[Br.length-1]===e}function c(y){var b;y.code==="Escape"&&l()&&((b=t.onEsc)===null||b===void 0||b.call(t,y))}i.onMounted(()=>{i.watch(()=>t.active,y=>{y?(h(),$t("keydown",document,c)):(at("keydown",document,c),o&&f())},{immediate:!0})}),i.onBeforeUnmount(()=>{at("keydown",document,c),o&&f()});function d(y){if(!s&&l()){const b=u();if(b===null||b.contains(_r(y)))return;g("first")}}function u(){const y=n.value;if(y===null)return null;let b=y;for(;b=b.nextSibling,!(b===null||b instanceof Element&&b.tagName==="DIV"););return b}function h(){var y;if(!t.disabled){if(Br.push(e),t.autoFocus){const{initialFocusTo:b}=t;b===void 0?g("first"):(y=ku(b))===null||y===void 0||y.focus({preventScroll:!0})}o=!0,document.addEventListener("focus",d,!0)}}function f(){var y;if(t.disabled||(document.removeEventListener("focus",d,!0),Br=Br.filter(_=>_!==e),l()))return;const{finalFocusTo:b}=t;b!==void 0?(y=ku(b))===null||y===void 0||y.focus({preventScroll:!0}):t.returnFocusOnDeactivated&&a instanceof HTMLElement&&(s=!0,a.focus({preventScroll:!0}),s=!1)}function g(y){if(l()&&t.active){const b=n.value,_=r.value;if(b!==null&&_!==null){const S=u();if(S==null||S===_){s=!0,b.focus({preventScroll:!0}),s=!1;return}s=!0;const k=y==="first"?Yu(S):Uu(S);s=!1,k||(s=!0,b.focus({preventScroll:!0}),s=!1)}}}function m(y){if(s)return;const b=u();b!==null&&(y.relatedTarget!==null&&b.contains(y.relatedTarget)?g("last"):g("first"))}function p(y){s||(y.relatedTarget!==null&&y.relatedTarget===n.value?g("last"):g("first"))}return{focusableStartRef:n,focusableEndRef:r,focusableStyle:"position: absolute; height: 0; width: 0;",handleStartFocus:m,handleEndFocus:p}},render(){const{default:t}=this.$slots;if(t===void 0)return null;if(this.disabled)return t();const{active:e,focusableStyle:n}=this;return i.h(i.Fragment,null,[i.h("div",{"aria-hidden":"true",tabindex:e?"0":"-1",ref:"focusableStartRef",style:n,onFocus:this.handleStartFocus}),t(),i.h("div",{"aria-hidden":"true",style:n,ref:"focusableEndRef",tabindex:e?"0":"-1",onFocus:this.handleEndFocus})])}});function NB(t){return t}const ca="n-internal-select-menu",Gu="n-internal-select-menu-body",Zu="n-drawer-body",Qu="n-modal-body",Ju="n-popover-body",eh="__disabled__";function Pn(t){const e=i.inject(Qu,null),n=i.inject(Zu,null),r=i.inject(Ju,null),o=i.inject(Gu,null),s=i.ref();if(typeof document<"u"){s.value=document.fullscreenElement;const a=()=>{s.value=document.fullscreenElement};i.onMounted(()=>{$t("fullscreenchange",document,a)}),i.onBeforeUnmount(()=>{at("fullscreenchange",document,a)})}return Gt(()=>{var a;const{to:l}=t;return l!==void 0?l===!1?eh:l===!0?s.value||"body":l:e!=null&&e.value?(a=e.value.$el)!==null&&a!==void 0?a:e.value:n!=null&&n.value?n.value:r!=null&&r.value?r.value:o!=null&&o.value?o.value:l??(s.value||"body")})}Pn.tdkey=eh,Pn.propTo={type:[String,Object,Boolean],default:void 0};function Hx(t){const e={isDeactivated:!1};let n=!1;return i.onActivated(()=>{if(e.isDeactivated=!1,!n){n=!0;return}t()}),i.onDeactivated(()=>{e.isDeactivated=!0,n||(n=!0)}),e}function th(t,e){e&&(i.onMounted(()=>{const{value:n}=t;n&&Sr.registerHandler(n,e)}),i.watch(t,(n,r)=>{r&&Sr.unregisterHandler(r)},{deep:!1}),i.onBeforeUnmount(()=>{const{value:n}=t;n&&Sr.unregisterHandler(n)}))}function nh(t){return t.replace(/#|\(|\)|,|\s|\./g,"_")}const Wx=/^(\d|\.)+$/,ih=/(\d|\.)+/;function da(t,{c:e=1,offset:n=0,attachPx:r=!0}={}){if(typeof t=="number"){const o=(t+n)*e;return o===0?"0":`${o}px`}else if(typeof t=="string")if(Wx.test(t)){const o=(Number(t)+n)*e;return r?o===0?"0":`${o}px`:`${o}`}else{const o=ih.exec(t);return o?t.replace(ih,String((Number(o[0])+n)*e)):t}return t}function rh(t){const{left:e,right:n,top:r,bottom:o}=tn(t);return`${r} ${e} ${o} ${n}`}var oh={};function jx(t){let e=".",n="__",r="--",o;if(t){let m=t.blockPrefix;m&&(e=m),m=t.elementPrefix,m&&(n=m),m=t.modifierPrefix,m&&(r=m)}const s={install(m){o=m.c;const p=m.context;p.bem={},p.bem.b=null,p.bem.els=null}};function a(m){let p,y;return{before(b){p=b.bem.b,y=b.bem.els,b.bem.els=null},after(b){b.bem.b=p,b.bem.els=y},$({context:b,props:_}){return m=typeof m=="string"?m:m({context:b,props:_}),b.bem.b=m,`${(_==null?void 0:_.bPrefix)||e}${b.bem.b}`}}}function l(m){let p;return{before(y){p=y.bem.els},after(y){y.bem.els=p},$({context:y,props:b}){return m=typeof m=="string"?m:m({context:y,props:b}),y.bem.els=m.split(",").map(_=>_.trim()),y.bem.els.map(_=>`${(b==null?void 0:b.bPrefix)||e}${y.bem.b}${n}${_}`).join(", ")}}}function c(m){return{$({context:p,props:y}){m=typeof m=="string"?m:m({context:p,props:y});const b=m.split(",").map(k=>k.trim());function _(k){return b.map(R=>`&${(y==null?void 0:y.bPrefix)||e}${p.bem.b}${k!==void 0?`${n}${k}`:""}${r}${R}`).join(", ")}const S=p.bem.els;if(S!==null){if(oh.NODE_ENV!=="production"&&S.length>=2)throw Error(`[css-render/plugin-bem]: m(${m}) is invalid, using modifier inside multiple elements is not allowed`);return _(S[0])}else return _()}}}function d(m){return{$({context:p,props:y}){m=typeof m=="string"?m:m({context:p,props:y});const b=p.bem.els;if(oh.NODE_ENV!=="production"&&b!==null&&b.length>=2)throw Error(`[css-render/plugin-bem]: notM(${m}) is invalid, using modifier inside multiple elements is not allowed`);return`&:not(${(y==null?void 0:y.bPrefix)||e}${p.bem.b}${b!==null&&b.length>0?`${n}${b[0]}`:""}${r}${m})`}}}return Object.assign(s,{cB:((...m)=>o(a(m[0]),m[1],m[2])),cE:((...m)=>o(l(m[0]),m[1],m[2])),cM:((...m)=>o(c(m[0]),m[1],m[2])),cNotM:((...m)=>o(d(m[0]),m[1],m[2]))}),s}const qx=".n-",Xx="__",Yx="--",sh=_u(),ah=jx({blockPrefix:qx,elementPrefix:Xx,modifierPrefix:Yx});sh.use(ah);const{c:de,find:RB}=sh,{cB:ge,cE:we,cM:Re,cNotM:nn}=ah,Ux=(...t)=>de(">",[ge(...t)]);function Je(t,e){return t+(e==="default"?"":e.replace(/^[a-z]/,n=>n.toUpperCase()))}let ua;function Kx(){return ua===void 0&&(ua=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),ua}const Gx=new WeakSet;function Zx(t){Gx.add(t)}function lh(t){switch(typeof t){case"string":return t||void 0;case"number":return String(t);default:return}}const ch=new Set;function ei(t,e){const n=`[naive/${t}]: ${e}`;ch.has(n)||(ch.add(n),console.error(n))}function dh(t,e){console.error(`[naive/${t}]: ${e}`)}function uh(t,e){throw new Error(`[naive/${t}]: ${e}`)}function bt(t,...e){if(Array.isArray(t))t.forEach(n=>bt(n,...e));else return t(...e)}function ha(t,e=!0,n=[]){return t.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push(i.createTextVNode(String(r)));return}if(Array.isArray(r)){ha(r,e,n);return}if(r.type===i.Fragment){if(r.children===null)return;Array.isArray(r.children)&&ha(r.children,e,n)}else{if(r.type===i.Comment&&e)return;n.push(r)}}}),n}function Qx(t,e="default",n=void 0){const r=t[e];if(!r)return dh("getFirstSlotVNode",`slot[${e}] is empty`),null;const o=ha(r(n));return o.length===1?o[0]:(dh("getFirstSlotVNode",`slot[${e}] should have exactly one child`),null)}function Jx(t,e=[],n){const r={};return e.forEach(o=>{r[o]=t[o]}),Object.assign(r,n)}function fa(t){const e=t.filter(n=>n!==void 0);if(e.length!==0)return e.length===1?e[0]:n=>{t.forEach(r=>{r&&r(n)})}}function tr(t,...e){return typeof t=="function"?t(...e):typeof t=="string"?i.createTextVNode(t):typeof t=="number"?i.createTextVNode(String(t)):null}function Fo(t){return t.some(e=>i.isVNode(e)?!(e.type===i.Comment||e.type===i.Fragment&&!Fo(e.children)):!0)?t:null}function ma(t,e){return t&&Fo(t())||e()}function xi(t,e){const n=t&&Fo(t());return e(n||null)}function hh(t){return!(t&&Fo(t()))}const ga=i.defineComponent({render(){var t,e;return(e=(t=this.$slots).default)===null||e===void 0?void 0:e.call(t)}}),ki="n-config-provider",ek="n";function vi(t={},e={defaultBordered:!0}){const n=i.inject(ki,null);return{inlineThemeDisabled:n==null?void 0:n.inlineThemeDisabled,mergedRtlRef:n==null?void 0:n.mergedRtlRef,mergedComponentPropsRef:n==null?void 0:n.mergedComponentPropsRef,mergedBreakpointsRef:n==null?void 0:n.mergedBreakpointsRef,mergedBorderedRef:i.computed(()=>{var r,o;const{bordered:s}=t;return s!==void 0?s:(o=(r=n==null?void 0:n.mergedBorderedRef.value)!==null&&r!==void 0?r:e.defaultBordered)!==null&&o!==void 0?o:!0}),mergedClsPrefixRef:n?n.mergedClsPrefixRef:i.shallowRef(ek),namespaceRef:i.computed(()=>n==null?void 0:n.mergedNamespaceRef.value)}}function Ci(t,e,n,r){n||uh("useThemeClass","cssVarsRef is not passed");const o=i.inject(ki,null),s=o==null?void 0:o.mergedThemeHashRef,a=o==null?void 0:o.styleMountTarget,l=i.ref(""),c=bi();let d;const u=`__${t}`,h=()=>{let f=u;const g=e?e.value:void 0,m=s==null?void 0:s.value;m&&(f+=`-${m}`),g&&(f+=`-${g}`);const{themeOverrides:p,builtinThemeOverrides:y}=r;p&&(f+=`-${ta(JSON.stringify(p))}`),y&&(f+=`-${ta(JSON.stringify(y))}`),l.value=f,d=()=>{const b=n.value;let _="";for(const S in b)_+=`${S}: ${b[S]};`;de(`.${f}`,_).mount({id:f,ssr:c,parent:a}),d=void 0}};return i.watchEffect(()=>{h()}),{themeClass:l,onRender:()=>{d==null||d()}}}const fh="n-form-item";function tk(t,{defaultSize:e="medium",mergedSize:n,mergedDisabled:r}={}){const o=i.inject(fh,null);i.provide(fh,null);const s=i.computed(n?()=>n(o):()=>{const{size:c}=t;if(c)return c;if(o){const{mergedSize:d}=o;if(d.value!==void 0)return d.value}return e}),a=i.computed(r?()=>r(o):()=>{const{disabled:c}=t;return c!==void 0?c:o?o.disabled.value:!1}),l=i.computed(()=>{const{status:c}=t;return c||(o==null?void 0:o.mergedValidationStatus.value)});return i.onBeforeUnmount(()=>{o&&o.restoreValidation()}),{mergedSizeRef:s,mergedDisabledRef:a,mergedStatusRef:l,nTriggerFormBlur(){o&&o.handleContentBlur()},nTriggerFormChange(){o&&o.handleContentChange()},nTriggerFormFocus(){o&&o.handleContentFocus()},nTriggerFormInput(){o&&o.handleContentInput()}}}const nk={name:"en-US",global:{undo:"Undo",redo:"Redo",confirm:"Confirm",clear:"Clear"},Popconfirm:{positiveText:"Confirm",negativeText:"Cancel"},Cascader:{placeholder:"Please Select",loading:"Loading",loadingRequiredMessage:t=>`Please load all ${t}'s descendants before checking it.`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",weekFormat:"YYYY-w",clear:"Clear",now:"Now",confirm:"Confirm",selectTime:"Select Time",selectDate:"Select Date",datePlaceholder:"Select Date",datetimePlaceholder:"Select Date and Time",monthPlaceholder:"Select Month",yearPlaceholder:"Select Year",quarterPlaceholder:"Select Quarter",weekPlaceholder:"Select Week",startDatePlaceholder:"Start Date",endDatePlaceholder:"End Date",startDatetimePlaceholder:"Start Date and Time",endDatetimePlaceholder:"End Date and Time",startMonthPlaceholder:"Start Month",endMonthPlaceholder:"End Month",monthBeforeYear:!0,firstDayOfWeek:6,today:"Today"},DataTable:{checkTableAll:"Select all in the table",uncheckTableAll:"Unselect all in the table",confirm:"Confirm",clear:"Clear"},LegacyTransfer:{sourceTitle:"Source",targetTitle:"Target"},Transfer:{selectAll:"Select all",unselectAll:"Unselect all",clearAll:"Clear",total:t=>`Total ${t} items`,selected:t=>`${t} items selected`},Empty:{description:"No Data"},Select:{placeholder:"Please Select"},TimePicker:{placeholder:"Select Time",positiveText:"OK",negativeText:"Cancel",now:"Now",clear:"Clear"},Pagination:{goto:"Goto",selectionSuffix:"page"},DynamicTags:{add:"Add"},Log:{loading:"Loading"},Input:{placeholder:"Please Input"},InputNumber:{placeholder:"Please Input"},DynamicInput:{create:"Create"},ThemeEditor:{title:"Theme Editor",clearAllVars:"Clear All Variables",clearSearch:"Clear Search",filterCompName:"Filter Component Name",filterVarName:"Filter Variable Name",import:"Import",export:"Export",restore:"Reset to Default"},Image:{tipPrevious:"Previous picture (←)",tipNext:"Next picture (→)",tipCounterclockwise:"Counterclockwise",tipClockwise:"Clockwise",tipZoomOut:"Zoom out",tipZoomIn:"Zoom in",tipDownload:"Download",tipClose:"Close (Esc)",tipOriginalSize:"Zoom to original size"},Heatmap:{less:"less",more:"more",monthFormat:"MMM",weekdayFormat:"eee"}};function pa(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}function Tr(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&t.formattingValues){const a=t.defaultFormattingWidth||t.defaultWidth,l=n!=null&&n.width?String(n.width):a;o=t.formattingValues[l]||t.formattingValues[a]}else{const a=t.defaultWidth,l=n!=null&&n.width?String(n.width):t.defaultWidth;o=t.values[l]||t.values[a]}const s=t.argumentCallback?t.argumentCallback(e):e;return o[s]}}function Nr(t){return(e,n={})=>{const r=n.width,o=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],s=e.match(o);if(!s)return null;const a=s[0],l=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(l)?rk(l,h=>h.test(a)):ik(l,h=>h.test(a));let d;d=t.valueCallback?t.valueCallback(c):c,d=n.valueCallback?n.valueCallback(d):d;const u=e.slice(a.length);return{value:d,rest:u}}}function ik(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function rk(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function ok(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const o=r[0],s=e.match(t.parsePattern);if(!s)return null;let a=t.valueCallback?t.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;const l=e.slice(o.length);return{value:a,rest:l}}}const sk={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ak=(t,e,n)=>{let r;const o=sk[t];return typeof o=="string"?r=o:e===1?r=o.one:r=o.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},lk={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ck=(t,e,n,r)=>lk[t],dk={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},uk={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},hk={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},fk={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},mk={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},gk={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},pk={ordinalNumber:(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Tr({values:dk,defaultWidth:"wide"}),quarter:Tr({values:uk,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Tr({values:hk,defaultWidth:"wide"}),day:Tr({values:fk,defaultWidth:"wide"}),dayPeriod:Tr({values:mk,defaultWidth:"wide",formattingValues:gk,defaultFormattingWidth:"wide"})},yk=/^(\d+)(th|st|nd|rd)?/i,bk=/\d+/i,_k={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},wk={any:[/^b/i,/^(a|c)/i]},xk={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},kk={any:[/1/i,/2/i,/3/i,/4/i]},vk={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Ck={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Sk={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Bk={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Tk={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Nk={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},$k={ordinalNumber:ok({matchPattern:yk,parsePattern:bk,valueCallback:t=>parseInt(t,10)}),era:Nr({matchPatterns:_k,defaultMatchWidth:"wide",parsePatterns:wk,defaultParseWidth:"any"}),quarter:Nr({matchPatterns:xk,defaultMatchWidth:"wide",parsePatterns:kk,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Nr({matchPatterns:vk,defaultMatchWidth:"wide",parsePatterns:Ck,defaultParseWidth:"any"}),day:Nr({matchPatterns:Sk,defaultMatchWidth:"wide",parsePatterns:Bk,defaultParseWidth:"any"}),dayPeriod:Nr({matchPatterns:Tk,defaultMatchWidth:"any",parsePatterns:Nk,defaultParseWidth:"any"})},Rk={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ek={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Pk={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Fk={date:pa({formats:Rk,defaultWidth:"full"}),time:pa({formats:Ek,defaultWidth:"full"}),dateTime:pa({formats:Pk,defaultWidth:"full"})},Vk={name:"en-US",locale:{code:"en-US",formatDistance:ak,formatLong:Fk,formatRelative:ck,localize:pk,match:$k,options:{weekStartsOn:0,firstWeekContainsDate:1}}};function mh(t){const{mergedLocaleRef:e,mergedDateLocaleRef:n}=i.inject(ki,null)||{},r=i.computed(()=>{var s,a;return(a=(s=e==null?void 0:e.value)===null||s===void 0?void 0:s[t])!==null&&a!==void 0?a:nk[t]});return{dateLocaleRef:i.computed(()=>{var s;return(s=n==null?void 0:n.value)!==null&&s!==void 0?s:Vk}),localeRef:r}}const $r="naive-ui-style";function Rr(t,e,n){if(!e)return;const r=bi(),o=i.computed(()=>{const{value:l}=e;if(!l)return;const c=l[t];if(c)return c}),s=i.inject(ki,null),a=()=>{i.watchEffect(()=>{const{value:l}=n,c=`${l}${t}Rtl`;if(rx(c,r))return;const{value:d}=o;d&&d.style.mount({id:c,head:!0,anchorMetaName:$r,props:{bPrefix:l?`.${l}-`:void 0},ssr:r,parent:s==null?void 0:s.styleMountTarget})})};return r?a():i.onBeforeMount(a),o}const Er={fontFamily:'v-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontFamilyMono:"v-mono, SFMono-Regular, Menlo, Consolas, Courier, monospace",fontWeight:"400",fontWeightStrong:"500",cubicBezierEaseInOut:"cubic-bezier(.4, 0, .2, 1)",cubicBezierEaseOut:"cubic-bezier(0, 0, .2, 1)",cubicBezierEaseIn:"cubic-bezier(.4, 0, 1, 1)",borderRadius:"3px",borderRadiusSmall:"2px",fontSize:"14px",fontSizeMini:"12px",fontSizeTiny:"12px",fontSizeSmall:"14px",fontSizeMedium:"14px",fontSizeLarge:"15px",fontSizeHuge:"16px",lineHeight:"1.6",heightMini:"16px",heightTiny:"22px",heightSmall:"28px",heightMedium:"34px",heightLarge:"40px",heightHuge:"46px"},{fontSize:Ik,fontFamily:Mk,lineHeight:Ak}=Er,gh=de("body",`
117
117
  margin: 0;
118
118
  font-size: ${Ik};
119
119
  font-family: ${Mk};
@@ -123,7 +123,7 @@ ${o}
123
123
  `,[de("input",`
124
124
  font-family: inherit;
125
125
  font-size: inherit;
126
- `)]);var Ok={};function Vo(t,e,n){if(!e){Ok.NODE_ENV!=="production"&&uh("use-style","No style is specified.");return}const r=bi(),o=i.inject(ki,null),s=()=>{const a=n.value;e.mount({id:a===void 0?t:a+t,head:!0,anchorMetaName:$r,props:{bPrefix:a?`.${a}-`:void 0},ssr:r,parent:o==null?void 0:o.styleMountTarget}),o!=null&&o.preflightStyleDisabled||gh.mount({id:"n-global",head:!0,anchorMetaName:$r,ssr:r,parent:o==null?void 0:o.styleMountTarget})};r?s():i.onBeforeMount(s)}function RB(t){return t}function _t(t,e,n,r,o,s){const a=bi(),l=i.inject(ki,null);if(n){const d=()=>{const u=s==null?void 0:s.value;n.mount({id:u===void 0?e:u+e,head:!0,props:{bPrefix:u?`.${u}-`:void 0},anchorMetaName:$r,ssr:a,parent:l==null?void 0:l.styleMountTarget}),l!=null&&l.preflightStyleDisabled||gh.mount({id:"n-global",head:!0,anchorMetaName:$r,ssr:a,parent:l==null?void 0:l.styleMountTarget})};a?d():i.onBeforeMount(d)}return i.computed(()=>{var d;const{theme:{common:u,self:h,peers:f={}}={},themeOverrides:g={},builtinThemeOverrides:m={}}=o,{common:p,peers:y}=g,{common:b=void 0,[t]:{common:_=void 0,self:S=void 0,peers:k={}}={}}=(l==null?void 0:l.mergedThemeRef.value)||{},{common:R=void 0,[t]:$={}}=(l==null?void 0:l.mergedThemeOverridesRef.value)||{},{common:x,peers:C={}}=$,w=O.merge({},u||_||b||r.common,R,x,p),T=O.merge((d=h||S||r.self)===null||d===void 0?void 0:d(w),m,$,g);return{common:w,self:T,peers:O.merge({},r.peers,k,f),peerOverrides:O.merge({},m.peers,C,y)}})}_t.props={theme:Object,themeOverrides:Object,builtinThemeOverrides:Object};const zk=ge("base-icon",`
126
+ `)]);var Ok={};function Vo(t,e,n){if(!e){Ok.NODE_ENV!=="production"&&uh("use-style","No style is specified.");return}const r=bi(),o=i.inject(ki,null),s=()=>{const a=n.value;e.mount({id:a===void 0?t:a+t,head:!0,anchorMetaName:$r,props:{bPrefix:a?`.${a}-`:void 0},ssr:r,parent:o==null?void 0:o.styleMountTarget}),o!=null&&o.preflightStyleDisabled||gh.mount({id:"n-global",head:!0,anchorMetaName:$r,ssr:r,parent:o==null?void 0:o.styleMountTarget})};r?s():i.onBeforeMount(s)}function FB(t){return t}function _t(t,e,n,r,o,s){const a=bi(),l=i.inject(ki,null);if(n){const d=()=>{const u=s==null?void 0:s.value;n.mount({id:u===void 0?e:u+e,head:!0,props:{bPrefix:u?`.${u}-`:void 0},anchorMetaName:$r,ssr:a,parent:l==null?void 0:l.styleMountTarget}),l!=null&&l.preflightStyleDisabled||gh.mount({id:"n-global",head:!0,anchorMetaName:$r,ssr:a,parent:l==null?void 0:l.styleMountTarget})};a?d():i.onBeforeMount(d)}return i.computed(()=>{var d;const{theme:{common:u,self:h,peers:f={}}={},themeOverrides:g={},builtinThemeOverrides:m={}}=o,{common:p,peers:y}=g,{common:b=void 0,[t]:{common:_=void 0,self:S=void 0,peers:k={}}={}}=(l==null?void 0:l.mergedThemeRef.value)||{},{common:R=void 0,[t]:$={}}=(l==null?void 0:l.mergedThemeOverridesRef.value)||{},{common:x,peers:C={}}=$,w=O.merge({},u||_||b||r.common,R,x,p),T=O.merge((d=h||S||r.self)===null||d===void 0?void 0:d(w),m,$,g);return{common:w,self:T,peers:O.merge({},r.peers,k,f),peerOverrides:O.merge({},m.peers,C,y)}})}_t.props={theme:Object,themeOverrides:Object,builtinThemeOverrides:Object};const zk=ge("base-icon",`
127
127
  height: 1em;
128
128
  width: 1em;
129
129
  line-height: 1em;
@@ -810,7 +810,7 @@ ${o}
810
810
  line-height: 1.25;
811
811
  text-overflow: ellipsis;
812
812
  overflow: hidden;
813
- `)])])]),Lv=i.defineComponent({name:"InternalSelection",props:Object.assign(Object.assign({},_t.props),{clsPrefix:{type:String,required:!0},bordered:{type:Boolean,default:void 0},active:Boolean,pattern:{type:String,default:""},placeholder:String,selectedOption:{type:Object,default:null},selectedOptions:{type:Array,default:null},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},multiple:Boolean,filterable:Boolean,clearable:Boolean,disabled:Boolean,size:{type:String,default:"medium"},loading:Boolean,autofocus:Boolean,showArrow:{type:Boolean,default:!0},inputProps:Object,focused:Boolean,renderTag:Function,onKeydown:Function,onClick:Function,onBlur:Function,onFocus:Function,onDeleteOption:Function,maxTagCount:[String,Number],ellipsisTagPopoverProps:Object,onClear:Function,onPatternInput:Function,onPatternFocus:Function,onPatternBlur:Function,renderLabel:Function,status:String,inlineThemeDisabled:Boolean,ignoreComposition:{type:Boolean,default:!0},onResize:Function}),setup(t){const{mergedClsPrefixRef:e,mergedRtlRef:n}=vi(t),r=Rr("InternalSelection",n,e),o=i.ref(null),s=i.ref(null),a=i.ref(null),l=i.ref(null),c=i.ref(null),d=i.ref(null),u=i.ref(null),h=i.ref(null),f=i.ref(null),g=i.ref(null),m=i.ref(!1),p=i.ref(!1),y=i.ref(!1),b=_t("InternalSelection","-internal-selection",Dv,Ph,t,i.toRef(t,"clsPrefix")),_=i.computed(()=>t.clearable&&!t.disabled&&(y.value||t.active)),S=i.computed(()=>t.selectedOption?t.renderTag?t.renderTag({option:t.selectedOption,handleClose:()=>{}}):t.renderLabel?t.renderLabel(t.selectedOption,!0):tr(t.selectedOption[t.labelField],t.selectedOption,!0):t.placeholder),k=i.computed(()=>{const Z=t.selectedOption;if(Z)return Z[t.labelField]}),R=i.computed(()=>t.multiple?!!(Array.isArray(t.selectedOptions)&&t.selectedOptions.length):t.selectedOption!==null);function $(){var Z;const{value:le}=o;if(le){const{value:He}=s;He&&(He.style.width=`${le.offsetWidth}px`,t.maxTagCount!=="responsive"&&((Z=f.value)===null||Z===void 0||Z.sync({showAllItemsBeforeCalculate:!1})))}}function x(){const{value:Z}=g;Z&&(Z.style.display="none")}function C(){const{value:Z}=g;Z&&(Z.style.display="inline-block")}i.watch(i.toRef(t,"active"),Z=>{Z||x()}),i.watch(i.toRef(t,"pattern"),()=>{t.multiple&&i.nextTick($)});function w(Z){const{onFocus:le}=t;le&&le(Z)}function T(Z){const{onBlur:le}=t;le&&le(Z)}function N(Z){const{onDeleteOption:le}=t;le&&le(Z)}function A(Z){const{onClear:le}=t;le&&le(Z)}function I(Z){const{onPatternInput:le}=t;le&&le(Z)}function z(Z){var le;(!Z.relatedTarget||!(!((le=a.value)===null||le===void 0)&&le.contains(Z.relatedTarget)))&&w(Z)}function L(Z){var le;!((le=a.value)===null||le===void 0)&&le.contains(Z.relatedTarget)||T(Z)}function ee(Z){A(Z)}function ne(){y.value=!0}function P(){y.value=!1}function E(Z){!t.active||!t.filterable||Z.target!==s.value&&Z.preventDefault()}function W(Z){N(Z)}const X=i.ref(!1);function H(Z){if(Z.key==="Backspace"&&!X.value&&!t.pattern.length){const{selectedOptions:le}=t;le!=null&&le.length&&W(le[le.length-1])}}let q=null;function F(Z){const{value:le}=o;if(le){const He=Z.target.value;le.textContent=He,$()}t.ignoreComposition&&X.value?q=Z:I(Z)}function V(){X.value=!0}function K(){X.value=!1,t.ignoreComposition&&I(q),q=null}function ie(Z){var le;p.value=!0,(le=t.onPatternFocus)===null||le===void 0||le.call(t,Z)}function Q(Z){var le;p.value=!1,(le=t.onPatternBlur)===null||le===void 0||le.call(t,Z)}function be(){var Z,le;if(t.filterable)p.value=!1,(Z=d.value)===null||Z===void 0||Z.blur(),(le=s.value)===null||le===void 0||le.blur();else if(t.multiple){const{value:He}=l;He==null||He.blur()}else{const{value:He}=c;He==null||He.blur()}}function Ve(){var Z,le,He;t.filterable?(p.value=!1,(Z=d.value)===null||Z===void 0||Z.focus()):t.multiple?(le=l.value)===null||le===void 0||le.focus():(He=c.value)===null||He===void 0||He.focus()}function xe(){const{value:Z}=s;Z&&(C(),Z.focus())}function pe(){const{value:Z}=s;Z&&Z.blur()}function Te(Z){const{value:le}=u;le&&le.setTextContent(`+${Z}`)}function Ne(){const{value:Z}=h;return Z}function sn(){return s.value}let Et=null;function Ht(){Et!==null&&window.clearTimeout(Et)}function an(){t.active||(Ht(),Et=window.setTimeout(()=>{R.value&&(m.value=!0)},100))}function vt(){Ht()}function Ln(Z){Z||(Ht(),m.value=!1)}i.watch(R,Z=>{Z||(m.value=!1)}),i.onMounted(()=>{i.watchEffect(()=>{const Z=d.value;Z&&(t.disabled?Z.removeAttribute("tabindex"):Z.tabIndex=p.value?-1:0)})}),th(a,t.onResize);const{inlineThemeDisabled:ln}=t,Qt=i.computed(()=>{const{size:Z}=t,{common:{cubicBezierEaseInOut:le},self:{fontWeight:He,borderRadius:ni,color:it,placeholderColor:Wt,textColor:nr,paddingSingle:ii,paddingMultiple:$i,caretColor:ir,colorDisabled:cn,textColorDisabled:Hn,placeholderColorDisabled:M,colorActive:U,boxShadowFocus:se,boxShadowActive:ue,boxShadowHover:he,border:_e,borderFocus:ve,borderHover:Se,borderActive:Ze,arrowColor:Bn,arrowColorDisabled:Na,loadingColor:$a,colorActiveWarning:Ra,boxShadowFocusWarning:Ea,boxShadowActiveWarning:Pa,boxShadowHoverWarning:Fa,borderWarning:Va,borderFocusWarning:Ia,borderHoverWarning:Ma,borderActiveWarning:Aa,colorActiveError:Oa,boxShadowFocusError:za,boxShadowActiveError:Da,boxShadowHoverError:La,borderError:Ha,borderFocusError:Wa,borderHoverError:ja,borderActiveError:mB,clearColor:gB,clearColorHover:pB,clearColorPressed:yB,clearSize:bB,arrowSize:_B,[Je("height",Z)]:wB,[Je("fontSize",Z)]:xB}}=b.value,Oo=tn(ii),zo=tn($i);return{"--n-bezier":le,"--n-border":_e,"--n-border-active":Ze,"--n-border-focus":ve,"--n-border-hover":Se,"--n-border-radius":ni,"--n-box-shadow-active":ue,"--n-box-shadow-focus":se,"--n-box-shadow-hover":he,"--n-caret-color":ir,"--n-color":it,"--n-color-active":U,"--n-color-disabled":cn,"--n-font-size":xB,"--n-height":wB,"--n-padding-single-top":Oo.top,"--n-padding-multiple-top":zo.top,"--n-padding-single-right":Oo.right,"--n-padding-multiple-right":zo.right,"--n-padding-single-left":Oo.left,"--n-padding-multiple-left":zo.left,"--n-padding-single-bottom":Oo.bottom,"--n-padding-multiple-bottom":zo.bottom,"--n-placeholder-color":Wt,"--n-placeholder-color-disabled":M,"--n-text-color":nr,"--n-text-color-disabled":Hn,"--n-arrow-color":Bn,"--n-arrow-color-disabled":Na,"--n-loading-color":$a,"--n-color-active-warning":Ra,"--n-box-shadow-focus-warning":Ea,"--n-box-shadow-active-warning":Pa,"--n-box-shadow-hover-warning":Fa,"--n-border-warning":Va,"--n-border-focus-warning":Ia,"--n-border-hover-warning":Ma,"--n-border-active-warning":Aa,"--n-color-active-error":Oa,"--n-box-shadow-focus-error":za,"--n-box-shadow-active-error":Da,"--n-box-shadow-hover-error":La,"--n-border-error":Ha,"--n-border-focus-error":Wa,"--n-border-hover-error":ja,"--n-border-active-error":mB,"--n-clear-size":bB,"--n-clear-color":gB,"--n-clear-color-hover":pB,"--n-clear-color-pressed":yB,"--n-arrow-size":_B,"--n-font-weight":He}}),Ie=ln?Ci("internal-selection",i.computed(()=>t.size[0]),Qt,t):void 0;return{mergedTheme:b,mergedClearable:_,mergedClsPrefix:e,rtlEnabled:r,patternInputFocused:p,filterablePlaceholder:S,label:k,selected:R,showTagsPanel:m,isComposing:X,counterRef:u,counterWrapperRef:h,patternInputMirrorRef:o,patternInputRef:s,selfRef:a,multipleElRef:l,singleElRef:c,patternInputWrapperRef:d,overflowRef:f,inputTagElRef:g,handleMouseDown:E,handleFocusin:z,handleClear:ee,handleMouseEnter:ne,handleMouseLeave:P,handleDeleteOption:W,handlePatternKeyDown:H,handlePatternInputInput:F,handlePatternInputBlur:Q,handlePatternInputFocus:ie,handleMouseEnterCounter:an,handleMouseLeaveCounter:vt,handleFocusout:L,handleCompositionEnd:K,handleCompositionStart:V,onPopoverUpdateShow:Ln,focus:Ve,focusInput:xe,blur:be,blurInput:pe,updateCounter:Te,getCounter:Ne,getTail:sn,renderLabel:t.renderLabel,cssVars:ln?void 0:Qt,themeClass:Ie==null?void 0:Ie.themeClass,onRender:Ie==null?void 0:Ie.onRender}},render(){const{status:t,multiple:e,size:n,disabled:r,filterable:o,maxTagCount:s,bordered:a,clsPrefix:l,ellipsisTagPopoverProps:c,onRender:d,renderTag:u,renderLabel:h}=this;d==null||d();const f=s==="responsive",g=typeof s=="number",m=f||g,p=i.h(ga,null,{default:()=>i.h(Av,{clsPrefix:l,loading:this.loading,showArrow:this.showArrow,showClear:this.mergedClearable&&this.selected,onClear:this.handleClear},{default:()=>{var b,_;return(_=(b=this.$slots).arrow)===null||_===void 0?void 0:_.call(b)}})});let y;if(e){const{labelField:b}=this,_=I=>i.h("div",{class:`${l}-base-selection-tag-wrapper`,key:I.value},u?u({option:I,handleClose:()=>{this.handleDeleteOption(I)}}):i.h(xa,{size:n,closable:!I.disabled,disabled:r,onClose:()=>{this.handleDeleteOption(I)},internalCloseIsButtonTag:!1,internalCloseFocusable:!1},{default:()=>h?h(I,!0):tr(I[b],I,!0)})),S=()=>(g?this.selectedOptions.slice(0,s):this.selectedOptions).map(_),k=o?i.h("div",{class:`${l}-base-selection-input-tag`,ref:"inputTagElRef",key:"__input-tag__"},i.h("input",Object.assign({},this.inputProps,{ref:"patternInputRef",tabindex:-1,disabled:r,value:this.pattern,autofocus:this.autofocus,class:`${l}-base-selection-input-tag__input`,onBlur:this.handlePatternInputBlur,onFocus:this.handlePatternInputFocus,onKeydown:this.handlePatternKeyDown,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),i.h("span",{ref:"patternInputMirrorRef",class:`${l}-base-selection-input-tag__mirror`},this.pattern)):null,R=f?()=>i.h("div",{class:`${l}-base-selection-tag-wrapper`,ref:"counterWrapperRef"},i.h(xa,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,onMouseleave:this.handleMouseLeaveCounter,disabled:r})):void 0;let $;if(g){const I=this.selectedOptions.length-s;I>0&&($=i.h("div",{class:`${l}-base-selection-tag-wrapper`,key:"__counter__"},i.h(xa,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,disabled:r},{default:()=>`+${I}`})))}const x=f?o?i.h(qu,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,getTail:this.getTail,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:S,counter:R,tail:()=>k}):i.h(qu,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:S,counter:R}):g&&$?S().concat($):S(),C=m?()=>i.h("div",{class:`${l}-base-selection-popover`},f?S():this.selectedOptions.map(_)):void 0,w=m?Object.assign({show:this.showTagsPanel,trigger:"hover",overlap:!0,placement:"top",width:"trigger",onUpdateShow:this.onPopoverUpdateShow,theme:this.mergedTheme.peers.Popover,themeOverrides:this.mergedTheme.peerOverrides.Popover},c):null,N=(this.selected?!1:this.active?!this.pattern&&!this.isComposing:!0)?i.h("div",{class:`${l}-base-selection-placeholder ${l}-base-selection-overlay`},i.h("div",{class:`${l}-base-selection-placeholder__inner`},this.placeholder)):null,A=o?i.h("div",{ref:"patternInputWrapperRef",class:`${l}-base-selection-tags`},x,f?null:k,p):i.h("div",{ref:"multipleElRef",class:`${l}-base-selection-tags`,tabindex:r?void 0:0},x,p);y=i.h(i.Fragment,null,m?i.h(Nv,Object.assign({},w,{scrollable:!0,style:"max-height: calc(var(--v-target-height) * 6.6);"}),{trigger:()=>A,default:C}):A,N)}else if(o){const b=this.pattern||this.isComposing,_=this.active?!b:!this.selected,S=this.active?!1:this.selected;y=i.h("div",{ref:"patternInputWrapperRef",class:`${l}-base-selection-label`,title:this.patternInputFocused?void 0:lh(this.label)},i.h("input",Object.assign({},this.inputProps,{ref:"patternInputRef",class:`${l}-base-selection-input`,value:this.active?this.pattern:"",placeholder:"",readonly:r,disabled:r,tabindex:-1,autofocus:this.autofocus,onFocus:this.handlePatternInputFocus,onBlur:this.handlePatternInputBlur,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),S?i.h("div",{class:`${l}-base-selection-label__render-label ${l}-base-selection-overlay`,key:"input"},i.h("div",{class:`${l}-base-selection-overlay__wrapper`},u?u({option:this.selectedOption,handleClose:()=>{}}):h?h(this.selectedOption,!0):tr(this.label,this.selectedOption,!0))):null,_?i.h("div",{class:`${l}-base-selection-placeholder ${l}-base-selection-overlay`,key:"placeholder"},i.h("div",{class:`${l}-base-selection-overlay__wrapper`},this.filterablePlaceholder)):null,p)}else y=i.h("div",{ref:"singleElRef",class:`${l}-base-selection-label`,tabindex:this.disabled?void 0:0},this.label!==void 0?i.h("div",{class:`${l}-base-selection-input`,title:lh(this.label),key:"input"},i.h("div",{class:`${l}-base-selection-input__content`},u?u({option:this.selectedOption,handleClose:()=>{}}):h?h(this.selectedOption,!0):tr(this.label,this.selectedOption,!0))):i.h("div",{class:`${l}-base-selection-placeholder ${l}-base-selection-overlay`,key:"placeholder"},i.h("div",{class:`${l}-base-selection-placeholder__inner`},this.placeholder)),p);return i.h("div",{ref:"selfRef",class:[`${l}-base-selection`,this.rtlEnabled&&`${l}-base-selection--rtl`,this.themeClass,t&&`${l}-base-selection--${t}-status`,{[`${l}-base-selection--active`]:this.active,[`${l}-base-selection--selected`]:this.selected||this.active&&this.pattern,[`${l}-base-selection--disabled`]:this.disabled,[`${l}-base-selection--multiple`]:this.multiple,[`${l}-base-selection--focus`]:this.focused}],style:this.cssVars,onClick:this.onClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onKeydown:this.onKeydown,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onMousedown:this.handleMouseDown},y,a?i.h("div",{class:`${l}-base-selection__border`}):null,a?i.h("div",{class:`${l}-base-selection__state-border`}):null)}});function Hv(t){const{boxShadow2:e}=t;return{menuBoxShadow:e}}const Wv={name:"Select",common:Si,peers:{InternalSelection:Ph,InternalSelectMenu:Ch},self:Hv},jv=de([ge("select",`
813
+ `)])])]),Lv=i.defineComponent({name:"InternalSelection",props:Object.assign(Object.assign({},_t.props),{clsPrefix:{type:String,required:!0},bordered:{type:Boolean,default:void 0},active:Boolean,pattern:{type:String,default:""},placeholder:String,selectedOption:{type:Object,default:null},selectedOptions:{type:Array,default:null},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},multiple:Boolean,filterable:Boolean,clearable:Boolean,disabled:Boolean,size:{type:String,default:"medium"},loading:Boolean,autofocus:Boolean,showArrow:{type:Boolean,default:!0},inputProps:Object,focused:Boolean,renderTag:Function,onKeydown:Function,onClick:Function,onBlur:Function,onFocus:Function,onDeleteOption:Function,maxTagCount:[String,Number],ellipsisTagPopoverProps:Object,onClear:Function,onPatternInput:Function,onPatternFocus:Function,onPatternBlur:Function,renderLabel:Function,status:String,inlineThemeDisabled:Boolean,ignoreComposition:{type:Boolean,default:!0},onResize:Function}),setup(t){const{mergedClsPrefixRef:e,mergedRtlRef:n}=vi(t),r=Rr("InternalSelection",n,e),o=i.ref(null),s=i.ref(null),a=i.ref(null),l=i.ref(null),c=i.ref(null),d=i.ref(null),u=i.ref(null),h=i.ref(null),f=i.ref(null),g=i.ref(null),m=i.ref(!1),p=i.ref(!1),y=i.ref(!1),b=_t("InternalSelection","-internal-selection",Dv,Ph,t,i.toRef(t,"clsPrefix")),_=i.computed(()=>t.clearable&&!t.disabled&&(y.value||t.active)),S=i.computed(()=>t.selectedOption?t.renderTag?t.renderTag({option:t.selectedOption,handleClose:()=>{}}):t.renderLabel?t.renderLabel(t.selectedOption,!0):tr(t.selectedOption[t.labelField],t.selectedOption,!0):t.placeholder),k=i.computed(()=>{const Z=t.selectedOption;if(Z)return Z[t.labelField]}),R=i.computed(()=>t.multiple?!!(Array.isArray(t.selectedOptions)&&t.selectedOptions.length):t.selectedOption!==null);function $(){var Z;const{value:le}=o;if(le){const{value:He}=s;He&&(He.style.width=`${le.offsetWidth}px`,t.maxTagCount!=="responsive"&&((Z=f.value)===null||Z===void 0||Z.sync({showAllItemsBeforeCalculate:!1})))}}function x(){const{value:Z}=g;Z&&(Z.style.display="none")}function C(){const{value:Z}=g;Z&&(Z.style.display="inline-block")}i.watch(i.toRef(t,"active"),Z=>{Z||x()}),i.watch(i.toRef(t,"pattern"),()=>{t.multiple&&i.nextTick($)});function w(Z){const{onFocus:le}=t;le&&le(Z)}function T(Z){const{onBlur:le}=t;le&&le(Z)}function N(Z){const{onDeleteOption:le}=t;le&&le(Z)}function A(Z){const{onClear:le}=t;le&&le(Z)}function I(Z){const{onPatternInput:le}=t;le&&le(Z)}function z(Z){var le;(!Z.relatedTarget||!(!((le=a.value)===null||le===void 0)&&le.contains(Z.relatedTarget)))&&w(Z)}function L(Z){var le;!((le=a.value)===null||le===void 0)&&le.contains(Z.relatedTarget)||T(Z)}function ee(Z){A(Z)}function ne(){y.value=!0}function P(){y.value=!1}function E(Z){!t.active||!t.filterable||Z.target!==s.value&&Z.preventDefault()}function W(Z){N(Z)}const X=i.ref(!1);function H(Z){if(Z.key==="Backspace"&&!X.value&&!t.pattern.length){const{selectedOptions:le}=t;le!=null&&le.length&&W(le[le.length-1])}}let q=null;function F(Z){const{value:le}=o;if(le){const He=Z.target.value;le.textContent=He,$()}t.ignoreComposition&&X.value?q=Z:I(Z)}function V(){X.value=!0}function K(){X.value=!1,t.ignoreComposition&&I(q),q=null}function ie(Z){var le;p.value=!0,(le=t.onPatternFocus)===null||le===void 0||le.call(t,Z)}function Q(Z){var le;p.value=!1,(le=t.onPatternBlur)===null||le===void 0||le.call(t,Z)}function be(){var Z,le;if(t.filterable)p.value=!1,(Z=d.value)===null||Z===void 0||Z.blur(),(le=s.value)===null||le===void 0||le.blur();else if(t.multiple){const{value:He}=l;He==null||He.blur()}else{const{value:He}=c;He==null||He.blur()}}function Ve(){var Z,le,He;t.filterable?(p.value=!1,(Z=d.value)===null||Z===void 0||Z.focus()):t.multiple?(le=l.value)===null||le===void 0||le.focus():(He=c.value)===null||He===void 0||He.focus()}function xe(){const{value:Z}=s;Z&&(C(),Z.focus())}function pe(){const{value:Z}=s;Z&&Z.blur()}function Te(Z){const{value:le}=u;le&&le.setTextContent(`+${Z}`)}function Ne(){const{value:Z}=h;return Z}function sn(){return s.value}let Et=null;function Ht(){Et!==null&&window.clearTimeout(Et)}function an(){t.active||(Ht(),Et=window.setTimeout(()=>{R.value&&(m.value=!0)},100))}function vt(){Ht()}function Ln(Z){Z||(Ht(),m.value=!1)}i.watch(R,Z=>{Z||(m.value=!1)}),i.onMounted(()=>{i.watchEffect(()=>{const Z=d.value;Z&&(t.disabled?Z.removeAttribute("tabindex"):Z.tabIndex=p.value?-1:0)})}),th(a,t.onResize);const{inlineThemeDisabled:ln}=t,Qt=i.computed(()=>{const{size:Z}=t,{common:{cubicBezierEaseInOut:le},self:{fontWeight:He,borderRadius:ni,color:it,placeholderColor:Wt,textColor:nr,paddingSingle:ii,paddingMultiple:$i,caretColor:ir,colorDisabled:cn,textColorDisabled:Hn,placeholderColorDisabled:M,colorActive:U,boxShadowFocus:se,boxShadowActive:ue,boxShadowHover:he,border:_e,borderFocus:ve,borderHover:Se,borderActive:Ze,arrowColor:Bn,arrowColorDisabled:Na,loadingColor:$a,colorActiveWarning:Ra,boxShadowFocusWarning:Ea,boxShadowActiveWarning:Pa,boxShadowHoverWarning:Fa,borderWarning:Va,borderFocusWarning:Ia,borderHoverWarning:Ma,borderActiveWarning:Aa,colorActiveError:Oa,boxShadowFocusError:za,boxShadowActiveError:Da,boxShadowHoverError:La,borderError:Ha,borderFocusError:Wa,borderHoverError:ja,borderActiveError:yB,clearColor:bB,clearColorHover:_B,clearColorPressed:wB,clearSize:xB,arrowSize:kB,[Je("height",Z)]:vB,[Je("fontSize",Z)]:CB}}=b.value,Oo=tn(ii),zo=tn($i);return{"--n-bezier":le,"--n-border":_e,"--n-border-active":Ze,"--n-border-focus":ve,"--n-border-hover":Se,"--n-border-radius":ni,"--n-box-shadow-active":ue,"--n-box-shadow-focus":se,"--n-box-shadow-hover":he,"--n-caret-color":ir,"--n-color":it,"--n-color-active":U,"--n-color-disabled":cn,"--n-font-size":CB,"--n-height":vB,"--n-padding-single-top":Oo.top,"--n-padding-multiple-top":zo.top,"--n-padding-single-right":Oo.right,"--n-padding-multiple-right":zo.right,"--n-padding-single-left":Oo.left,"--n-padding-multiple-left":zo.left,"--n-padding-single-bottom":Oo.bottom,"--n-padding-multiple-bottom":zo.bottom,"--n-placeholder-color":Wt,"--n-placeholder-color-disabled":M,"--n-text-color":nr,"--n-text-color-disabled":Hn,"--n-arrow-color":Bn,"--n-arrow-color-disabled":Na,"--n-loading-color":$a,"--n-color-active-warning":Ra,"--n-box-shadow-focus-warning":Ea,"--n-box-shadow-active-warning":Pa,"--n-box-shadow-hover-warning":Fa,"--n-border-warning":Va,"--n-border-focus-warning":Ia,"--n-border-hover-warning":Ma,"--n-border-active-warning":Aa,"--n-color-active-error":Oa,"--n-box-shadow-focus-error":za,"--n-box-shadow-active-error":Da,"--n-box-shadow-hover-error":La,"--n-border-error":Ha,"--n-border-focus-error":Wa,"--n-border-hover-error":ja,"--n-border-active-error":yB,"--n-clear-size":xB,"--n-clear-color":bB,"--n-clear-color-hover":_B,"--n-clear-color-pressed":wB,"--n-arrow-size":kB,"--n-font-weight":He}}),Ie=ln?Ci("internal-selection",i.computed(()=>t.size[0]),Qt,t):void 0;return{mergedTheme:b,mergedClearable:_,mergedClsPrefix:e,rtlEnabled:r,patternInputFocused:p,filterablePlaceholder:S,label:k,selected:R,showTagsPanel:m,isComposing:X,counterRef:u,counterWrapperRef:h,patternInputMirrorRef:o,patternInputRef:s,selfRef:a,multipleElRef:l,singleElRef:c,patternInputWrapperRef:d,overflowRef:f,inputTagElRef:g,handleMouseDown:E,handleFocusin:z,handleClear:ee,handleMouseEnter:ne,handleMouseLeave:P,handleDeleteOption:W,handlePatternKeyDown:H,handlePatternInputInput:F,handlePatternInputBlur:Q,handlePatternInputFocus:ie,handleMouseEnterCounter:an,handleMouseLeaveCounter:vt,handleFocusout:L,handleCompositionEnd:K,handleCompositionStart:V,onPopoverUpdateShow:Ln,focus:Ve,focusInput:xe,blur:be,blurInput:pe,updateCounter:Te,getCounter:Ne,getTail:sn,renderLabel:t.renderLabel,cssVars:ln?void 0:Qt,themeClass:Ie==null?void 0:Ie.themeClass,onRender:Ie==null?void 0:Ie.onRender}},render(){const{status:t,multiple:e,size:n,disabled:r,filterable:o,maxTagCount:s,bordered:a,clsPrefix:l,ellipsisTagPopoverProps:c,onRender:d,renderTag:u,renderLabel:h}=this;d==null||d();const f=s==="responsive",g=typeof s=="number",m=f||g,p=i.h(ga,null,{default:()=>i.h(Av,{clsPrefix:l,loading:this.loading,showArrow:this.showArrow,showClear:this.mergedClearable&&this.selected,onClear:this.handleClear},{default:()=>{var b,_;return(_=(b=this.$slots).arrow)===null||_===void 0?void 0:_.call(b)}})});let y;if(e){const{labelField:b}=this,_=I=>i.h("div",{class:`${l}-base-selection-tag-wrapper`,key:I.value},u?u({option:I,handleClose:()=>{this.handleDeleteOption(I)}}):i.h(xa,{size:n,closable:!I.disabled,disabled:r,onClose:()=>{this.handleDeleteOption(I)},internalCloseIsButtonTag:!1,internalCloseFocusable:!1},{default:()=>h?h(I,!0):tr(I[b],I,!0)})),S=()=>(g?this.selectedOptions.slice(0,s):this.selectedOptions).map(_),k=o?i.h("div",{class:`${l}-base-selection-input-tag`,ref:"inputTagElRef",key:"__input-tag__"},i.h("input",Object.assign({},this.inputProps,{ref:"patternInputRef",tabindex:-1,disabled:r,value:this.pattern,autofocus:this.autofocus,class:`${l}-base-selection-input-tag__input`,onBlur:this.handlePatternInputBlur,onFocus:this.handlePatternInputFocus,onKeydown:this.handlePatternKeyDown,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),i.h("span",{ref:"patternInputMirrorRef",class:`${l}-base-selection-input-tag__mirror`},this.pattern)):null,R=f?()=>i.h("div",{class:`${l}-base-selection-tag-wrapper`,ref:"counterWrapperRef"},i.h(xa,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,onMouseleave:this.handleMouseLeaveCounter,disabled:r})):void 0;let $;if(g){const I=this.selectedOptions.length-s;I>0&&($=i.h("div",{class:`${l}-base-selection-tag-wrapper`,key:"__counter__"},i.h(xa,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,disabled:r},{default:()=>`+${I}`})))}const x=f?o?i.h(qu,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,getTail:this.getTail,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:S,counter:R,tail:()=>k}):i.h(qu,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:S,counter:R}):g&&$?S().concat($):S(),C=m?()=>i.h("div",{class:`${l}-base-selection-popover`},f?S():this.selectedOptions.map(_)):void 0,w=m?Object.assign({show:this.showTagsPanel,trigger:"hover",overlap:!0,placement:"top",width:"trigger",onUpdateShow:this.onPopoverUpdateShow,theme:this.mergedTheme.peers.Popover,themeOverrides:this.mergedTheme.peerOverrides.Popover},c):null,N=(this.selected?!1:this.active?!this.pattern&&!this.isComposing:!0)?i.h("div",{class:`${l}-base-selection-placeholder ${l}-base-selection-overlay`},i.h("div",{class:`${l}-base-selection-placeholder__inner`},this.placeholder)):null,A=o?i.h("div",{ref:"patternInputWrapperRef",class:`${l}-base-selection-tags`},x,f?null:k,p):i.h("div",{ref:"multipleElRef",class:`${l}-base-selection-tags`,tabindex:r?void 0:0},x,p);y=i.h(i.Fragment,null,m?i.h(Nv,Object.assign({},w,{scrollable:!0,style:"max-height: calc(var(--v-target-height) * 6.6);"}),{trigger:()=>A,default:C}):A,N)}else if(o){const b=this.pattern||this.isComposing,_=this.active?!b:!this.selected,S=this.active?!1:this.selected;y=i.h("div",{ref:"patternInputWrapperRef",class:`${l}-base-selection-label`,title:this.patternInputFocused?void 0:lh(this.label)},i.h("input",Object.assign({},this.inputProps,{ref:"patternInputRef",class:`${l}-base-selection-input`,value:this.active?this.pattern:"",placeholder:"",readonly:r,disabled:r,tabindex:-1,autofocus:this.autofocus,onFocus:this.handlePatternInputFocus,onBlur:this.handlePatternInputBlur,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),S?i.h("div",{class:`${l}-base-selection-label__render-label ${l}-base-selection-overlay`,key:"input"},i.h("div",{class:`${l}-base-selection-overlay__wrapper`},u?u({option:this.selectedOption,handleClose:()=>{}}):h?h(this.selectedOption,!0):tr(this.label,this.selectedOption,!0))):null,_?i.h("div",{class:`${l}-base-selection-placeholder ${l}-base-selection-overlay`,key:"placeholder"},i.h("div",{class:`${l}-base-selection-overlay__wrapper`},this.filterablePlaceholder)):null,p)}else y=i.h("div",{ref:"singleElRef",class:`${l}-base-selection-label`,tabindex:this.disabled?void 0:0},this.label!==void 0?i.h("div",{class:`${l}-base-selection-input`,title:lh(this.label),key:"input"},i.h("div",{class:`${l}-base-selection-input__content`},u?u({option:this.selectedOption,handleClose:()=>{}}):h?h(this.selectedOption,!0):tr(this.label,this.selectedOption,!0))):i.h("div",{class:`${l}-base-selection-placeholder ${l}-base-selection-overlay`,key:"placeholder"},i.h("div",{class:`${l}-base-selection-placeholder__inner`},this.placeholder)),p);return i.h("div",{ref:"selfRef",class:[`${l}-base-selection`,this.rtlEnabled&&`${l}-base-selection--rtl`,this.themeClass,t&&`${l}-base-selection--${t}-status`,{[`${l}-base-selection--active`]:this.active,[`${l}-base-selection--selected`]:this.selected||this.active&&this.pattern,[`${l}-base-selection--disabled`]:this.disabled,[`${l}-base-selection--multiple`]:this.multiple,[`${l}-base-selection--focus`]:this.focused}],style:this.cssVars,onClick:this.onClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onKeydown:this.onKeydown,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onMousedown:this.handleMouseDown},y,a?i.h("div",{class:`${l}-base-selection__border`}):null,a?i.h("div",{class:`${l}-base-selection__state-border`}):null)}});function Hv(t){const{boxShadow2:e}=t;return{menuBoxShadow:e}}const Wv={name:"Select",common:Si,peers:{InternalSelection:Ph,InternalSelectMenu:Ch},self:Hv},jv=de([ge("select",`
814
814
  z-index: auto;
815
815
  outline: none;
816
816
  width: 100%;
@@ -819,4 +819,4 @@ ${o}
819
819
  `),ge("select-menu",`
820
820
  margin: 4px 0;
821
821
  box-shadow: var(--n-menu-box-shadow);
822
- `,[$h({originalTransition:"background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)"})])]);function Io(t){return t.type==="group"}function Fh(t){return t.type==="ignored"}function ka(t,e){try{return!!(1+e.toString().toLowerCase().indexOf(t.trim().toLowerCase()))}catch{return!1}}function qv(t,e){return{getIsGroup:Io,getIgnored:Fh,getKey(r){return Io(r)?r.name||r.key||"key-required":r[t]},getChildren(r){return r[e]}}}function Xv(t,e,n,r){if(!e)return t;function o(s){if(!Array.isArray(s))return[];const a=[];for(const l of s)if(Io(l)){const c=o(l[r]);c.length&&a.push(Object.assign({},l,{[r]:c}))}else{if(Fh(l))continue;e(n,l)&&a.push(l)}return a}return o(t)}function Yv(t,e,n){const r=new Map;return t.forEach(o=>{Io(o)?o[n].forEach(s=>{r.set(s[e],s)}):r.set(o[e],o)}),r}var Uv={};const Kv=Object.assign(Object.assign({},_t.props),{to:Pn.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,clearFilterAfterSelect:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},defaultValue:{type:[String,Number,Array],default:null},keyboard:{type:Boolean,default:!0},value:[String,Number,Array],placeholder:String,menuProps:Object,multiple:Boolean,size:String,menuSize:{type:String},filterable:Boolean,disabled:{type:Boolean,default:void 0},remote:Boolean,loading:Boolean,filter:Function,placement:{type:String,default:"bottom-start"},widthMode:{type:String,default:"trigger"},tag:Boolean,onCreate:Function,fallbackOption:{type:[Function,Boolean],default:void 0},show:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:!0},maxTagCount:[Number,String],ellipsisTagPopoverProps:Object,consistentMenuWidth:{type:Boolean,default:!0},virtualScroll:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},childrenField:{type:String,default:"children"},renderLabel:Function,renderOption:Function,renderTag:Function,"onUpdate:value":[Function,Array],inputProps:Object,nodeProps:Function,ignoreComposition:{type:Boolean,default:!0},showOnFocus:Boolean,onUpdateValue:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onFocus:[Function,Array],onScroll:[Function,Array],onSearch:[Function,Array],onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],displayDirective:{type:String,default:"show"},resetMenuOnOptionsChange:{type:Boolean,default:!0},status:String,showCheckmark:{type:Boolean,default:!0},onChange:[Function,Array],items:Array}),Gv=i.defineComponent({name:"Select",props:Kv,slots:Object,setup(t){Uv.NODE_ENV!=="production"&&i.watchEffect(()=>{t.items!==void 0&&ei("select","`items` is deprecated, please use `options` instead."),t.onChange!==void 0&&ei("select","`on-change` is deprecated, please use `on-update:value` instead.")});const{mergedClsPrefixRef:e,mergedBorderedRef:n,namespaceRef:r,inlineThemeDisabled:o}=vi(t),s=_t("Select","-select",jv,Wv,t,e),a=i.ref(t.defaultValue),l=i.toRef(t,"value"),c=Gs(l,a),d=i.ref(!1),u=i.ref(""),h=su(t,["items","options"]),f=i.ref([]),g=i.ref([]),m=i.computed(()=>g.value.concat(f.value).concat(h.value)),p=i.computed(()=>{const{filter:M}=t;if(M)return M;const{labelField:U,valueField:se}=t;return(ue,he)=>{if(!he)return!1;const _e=he[U];if(typeof _e=="string")return ka(ue,_e);const ve=he[se];return typeof ve=="string"?ka(ue,ve):typeof ve=="number"?ka(ue,String(ve)):!1}}),y=i.computed(()=>{if(t.remote)return h.value;{const{value:M}=m,{value:U}=u;return!U.length||!t.filterable?M:Xv(M,p.value,U,t.childrenField)}}),b=i.computed(()=>{const{valueField:M,childrenField:U}=t,se=qv(M,U);return kw(y.value,se)}),_=i.computed(()=>Yv(m.value,t.valueField,t.childrenField)),S=i.ref(!1),k=Gs(i.toRef(t,"show"),S),R=i.ref(null),$=i.ref(null),x=i.ref(null),{localeRef:C}=mh("Select"),w=i.computed(()=>{var M;return(M=t.placeholder)!==null&&M!==void 0?M:C.value.placeholder}),T=[],N=i.ref(new Map),A=i.computed(()=>{const{fallbackOption:M}=t;if(M===void 0){const{labelField:U,valueField:se}=t;return ue=>({[U]:String(ue),[se]:ue})}return M===!1?!1:U=>Object.assign(M(U),{value:U})});function I(M){const U=t.remote,{value:se}=N,{value:ue}=_,{value:he}=A,_e=[];return M.forEach(ve=>{if(ue.has(ve))_e.push(ue.get(ve));else if(U&&se.has(ve))_e.push(se.get(ve));else if(he){const Se=he(ve);Se&&_e.push(Se)}}),_e}const z=i.computed(()=>{if(t.multiple){const{value:M}=c;return Array.isArray(M)?I(M):[]}return null}),L=i.computed(()=>{const{value:M}=c;return!t.multiple&&!Array.isArray(M)?M===null?null:I([M])[0]||null:null}),ee=tk(t),{mergedSizeRef:ne,mergedDisabledRef:P,mergedStatusRef:E}=ee;function W(M,U){const{onChange:se,"onUpdate:value":ue,onUpdateValue:he}=t,{nTriggerFormChange:_e,nTriggerFormInput:ve}=ee;se&&bt(se,M,U),he&&bt(he,M,U),ue&&bt(ue,M,U),a.value=M,_e(),ve()}function X(M){const{onBlur:U}=t,{nTriggerFormBlur:se}=ee;U&&bt(U,M),se()}function H(){const{onClear:M}=t;M&&bt(M)}function q(M){const{onFocus:U,showOnFocus:se}=t,{nTriggerFormFocus:ue}=ee;U&&bt(U,M),ue(),se&&Q()}function F(M){const{onSearch:U}=t;U&&bt(U,M)}function V(M){const{onScroll:U}=t;U&&bt(U,M)}function K(){var M;const{remote:U,multiple:se}=t;if(U){const{value:ue}=N;if(se){const{valueField:he}=t;(M=z.value)===null||M===void 0||M.forEach(_e=>{ue.set(_e[he],_e)})}else{const he=L.value;he&&ue.set(he[t.valueField],he)}}}function ie(M){const{onUpdateShow:U,"onUpdate:show":se}=t;U&&bt(U,M),se&&bt(se,M),S.value=M}function Q(){P.value||(ie(!0),S.value=!0,t.filterable&&ii())}function be(){ie(!1)}function Ve(){u.value="",g.value=T}const xe=i.ref(!1);function pe(){t.filterable&&(xe.value=!0)}function Te(){t.filterable&&(xe.value=!1,k.value||Ve())}function Ne(){P.value||(k.value?t.filterable?ii():be():Q())}function sn(M){var U,se;!((se=(U=x.value)===null||U===void 0?void 0:U.selfRef)===null||se===void 0)&&se.contains(M.relatedTarget)||(d.value=!1,X(M),be())}function Et(M){q(M),d.value=!0}function Ht(){d.value=!0}function an(M){var U;!((U=R.value)===null||U===void 0)&&U.$el.contains(M.relatedTarget)||(d.value=!1,X(M),be())}function vt(){var M;(M=R.value)===null||M===void 0||M.focus(),be()}function Ln(M){var U;k.value&&(!((U=R.value)===null||U===void 0)&&U.$el.contains(_r(M))||be())}function ln(M){if(!Array.isArray(M))return[];if(A.value)return Array.from(M);{const{remote:U}=t,{value:se}=_;if(U){const{value:ue}=N;return M.filter(he=>se.has(he)||ue.has(he))}else return M.filter(ue=>se.has(ue))}}function Qt(M){Ie(M.rawNode)}function Ie(M){if(P.value)return;const{tag:U,remote:se,clearFilterAfterSelect:ue,valueField:he}=t;if(U&&!se){const{value:_e}=g,ve=_e[0]||null;if(ve){const Se=f.value;Se.length?Se.push(ve):f.value=[ve],g.value=T}}if(se&&N.value.set(M[he],M),t.multiple){const _e=ln(c.value),ve=_e.findIndex(Se=>Se===M[he]);if(~ve){if(_e.splice(ve,1),U&&!se){const Se=Z(M[he]);~Se&&(f.value.splice(Se,1),ue&&(u.value=""))}}else _e.push(M[he]),ue&&(u.value="");W(_e,I(_e))}else{if(U&&!se){const _e=Z(M[he]);~_e?f.value=[f.value[_e]]:f.value=T}nr(),be(),W(M[he],M)}}function Z(M){return f.value.findIndex(se=>se[t.valueField]===M)}function le(M){k.value||Q();const{value:U}=M.target;u.value=U;const{tag:se,remote:ue}=t;if(F(U),se&&!ue){if(!U){g.value=T;return}const{onCreate:he}=t,_e=he?he(U):{[t.labelField]:U,[t.valueField]:U},{valueField:ve,labelField:Se}=t;h.value.some(Ze=>Ze[ve]===_e[ve]||Ze[Se]===_e[Se])||f.value.some(Ze=>Ze[ve]===_e[ve]||Ze[Se]===_e[Se])?g.value=T:g.value=[_e]}}function He(M){M.stopPropagation();const{multiple:U}=t;!U&&t.filterable&&be(),H(),U?W([],[]):W(null,null)}function ni(M){!br(M,"action")&&!br(M,"empty")&&!br(M,"header")&&M.preventDefault()}function it(M){V(M)}function Wt(M){var U,se,ue,he,_e;if(!t.keyboard){M.preventDefault();return}switch(M.key){case" ":if(t.filterable)break;M.preventDefault();case"Enter":if(!(!((U=R.value)===null||U===void 0)&&U.isComposing)){if(k.value){const ve=(se=x.value)===null||se===void 0?void 0:se.getPendingTmNode();ve?Qt(ve):t.filterable||(be(),nr())}else if(Q(),t.tag&&xe.value){const ve=g.value[0];if(ve){const Se=ve[t.valueField],{value:Ze}=c;t.multiple&&Array.isArray(Ze)&&Ze.includes(Se)||Ie(ve)}}}M.preventDefault();break;case"ArrowUp":if(M.preventDefault(),t.loading)return;k.value&&((ue=x.value)===null||ue===void 0||ue.prev());break;case"ArrowDown":if(M.preventDefault(),t.loading)return;k.value?(he=x.value)===null||he===void 0||he.next():Q();break;case"Escape":k.value&&(Zx(M),be()),(_e=R.value)===null||_e===void 0||_e.focus();break}}function nr(){var M;(M=R.value)===null||M===void 0||M.focus()}function ii(){var M;(M=R.value)===null||M===void 0||M.focusInput()}function $i(){var M;k.value&&((M=$.value)===null||M===void 0||M.syncPosition())}K(),i.watch(i.toRef(t,"options"),K);const ir={focus:()=>{var M;(M=R.value)===null||M===void 0||M.focus()},focusInput:()=>{var M;(M=R.value)===null||M===void 0||M.focusInput()},blur:()=>{var M;(M=R.value)===null||M===void 0||M.blur()},blurInput:()=>{var M;(M=R.value)===null||M===void 0||M.blurInput()}},cn=i.computed(()=>{const{self:{menuBoxShadow:M}}=s.value;return{"--n-menu-box-shadow":M}}),Hn=o?Ci("select",void 0,cn,t):void 0;return Object.assign(Object.assign({},ir),{mergedStatus:E,mergedClsPrefix:e,mergedBordered:n,namespace:r,treeMate:b,isMounted:ko(),triggerRef:R,menuRef:x,pattern:u,uncontrolledShow:S,mergedShow:k,adjustedTo:Pn(t),uncontrolledValue:a,mergedValue:c,followerRef:$,localizedPlaceholder:w,selectedOption:L,selectedOptions:z,mergedSize:ne,mergedDisabled:P,focused:d,activeWithoutMenuOpen:xe,inlineThemeDisabled:o,onTriggerInputFocus:pe,onTriggerInputBlur:Te,handleTriggerOrMenuResize:$i,handleMenuFocus:Ht,handleMenuBlur:an,handleMenuTabOut:vt,handleTriggerClick:Ne,handleToggle:Qt,handleDeleteOption:Ie,handlePatternInput:le,handleClear:He,handleTriggerBlur:sn,handleTriggerFocus:Et,handleKeydown:Wt,handleMenuAfterLeave:Ve,handleMenuClickOutside:Ln,handleMenuScroll:it,handleMenuKeydown:Wt,handleMenuMousedown:ni,mergedTheme:s,cssVars:o?void 0:cn,themeClass:Hn==null?void 0:Hn.themeClass,onRender:Hn==null?void 0:Hn.onRender})},render(){return i.h("div",{class:`${this.mergedClsPrefix}-select`},i.h(du,null,{default:()=>[i.h(uu,null,{default:()=>i.h(Lv,{ref:"triggerRef",inlineThemeDisabled:this.inlineThemeDisabled,status:this.mergedStatus,inputProps:this.inputProps,clsPrefix:this.mergedClsPrefix,showArrow:this.showArrow,maxTagCount:this.maxTagCount,ellipsisTagPopoverProps:this.ellipsisTagPopoverProps,bordered:this.mergedBordered,active:this.activeWithoutMenuOpen||this.mergedShow,pattern:this.pattern,placeholder:this.localizedPlaceholder,selectedOption:this.selectedOption,selectedOptions:this.selectedOptions,multiple:this.multiple,renderTag:this.renderTag,renderLabel:this.renderLabel,filterable:this.filterable,clearable:this.clearable,disabled:this.mergedDisabled,size:this.mergedSize,theme:this.mergedTheme.peers.InternalSelection,labelField:this.labelField,valueField:this.valueField,themeOverrides:this.mergedTheme.peerOverrides.InternalSelection,loading:this.loading,focused:this.focused,onClick:this.handleTriggerClick,onDeleteOption:this.handleDeleteOption,onPatternInput:this.handlePatternInput,onClear:this.handleClear,onBlur:this.handleTriggerBlur,onFocus:this.handleTriggerFocus,onKeydown:this.handleKeydown,onPatternBlur:this.onTriggerInputBlur,onPatternFocus:this.onTriggerInputFocus,onResize:this.handleTriggerOrMenuResize,ignoreComposition:this.ignoreComposition},{arrow:()=>{var t,e;return[(e=(t=this.$slots).arrow)===null||e===void 0?void 0:e.call(t)]}})}),i.h(Bu,{ref:"followerRef",show:this.mergedShow,to:this.adjustedTo,teleportDisabled:this.adjustedTo===Pn.tdkey,containerClass:this.namespace,width:this.consistentMenuWidth?"target":void 0,minWidth:"target",placement:this.placement},{default:()=>i.h(i.Transition,{name:"fade-in-scale-up-transition",appear:this.isMounted,onAfterLeave:this.handleMenuAfterLeave},{default:()=>{var t,e,n;return this.mergedShow||this.displayDirective==="show"?((t=this.onRender)===null||t===void 0||t.call(this),i.withDirectives(i.h(pv,Object.assign({},this.menuProps,{ref:"menuRef",onResize:this.handleTriggerOrMenuResize,inlineThemeDisabled:this.inlineThemeDisabled,virtualScroll:this.consistentMenuWidth&&this.virtualScroll,class:[`${this.mergedClsPrefix}-select-menu`,this.themeClass,(e=this.menuProps)===null||e===void 0?void 0:e.class],clsPrefix:this.mergedClsPrefix,focusable:!0,labelField:this.labelField,valueField:this.valueField,autoPending:!0,nodeProps:this.nodeProps,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,treeMate:this.treeMate,multiple:this.multiple,size:this.menuSize,renderOption:this.renderOption,renderLabel:this.renderLabel,value:this.mergedValue,style:[(n=this.menuProps)===null||n===void 0?void 0:n.style,this.cssVars],onToggle:this.handleToggle,onScroll:this.handleMenuScroll,onFocus:this.handleMenuFocus,onBlur:this.handleMenuBlur,onKeydown:this.handleMenuKeydown,onTabOut:this.handleMenuTabOut,onMousedown:this.handleMenuMousedown,show:this.mergedShow,showCheckmark:this.showCheckmark,resetMenuOnOptionsChange:this.resetMenuOnOptionsChange}),{empty:()=>{var r,o;return[(o=(r=this.$slots).empty)===null||o===void 0?void 0:o.call(r)]},header:()=>{var r,o;return[(o=(r=this.$slots).header)===null||o===void 0?void 0:o.call(r)]},action:()=>{var r,o;return[(o=(r=this.$slots).action)===null||o===void 0?void 0:o.call(r)]}}),this.displayDirective==="show"?[[i.vShow,this.mergedShow],[xo,this.handleMenuClickOutside,void 0,{capture:!0}]]:[[xo,this.handleMenuClickOutside,void 0,{capture:!0}]])):null}})})]}))}}),Zv={},Vh=i.defineComponent({...Zv,__name:"searchable-reference-select",props:{searchDataHandler:{},optionsListConverter:{},renderLabel:{},renderTag:{},value:{},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},minTermLength:{default:()=>{var t,e;return((e=(t=Y.useBaseConfigStateStore().getConfig())==null?void 0:t.minLength)==null?void 0:e.searchTerm)??3}},consistentMenuWidth:{type:Boolean,default:!1},wrapContent:{type:Boolean,default:!1},placeholder:{default:""}},emits:["update:value"],setup(t,{expose:e,emit:n}){const r=t,o=n,s=i.computed(()=>O.isArray(r.value)),a=i.computed(()=>s.value?r.value.map(_=>_.id):r.value?r.value.id:null),l=i.ref(s.value?r.optionsListConverter(r.value):r.value?r.optionsListConverter([r.value]):[]),c=i.computed(()=>l.value.map(_=>({..._,class:r.wrapContent?`${_.class} consistent-menu-width`:_.class}))),d=i.ref(!1),u=i.useTemplateRef("select-component"),h=_=>{_.length<r.minTermLength||(d.value=!0,r.searchDataHandler(_,d).then(S=>{if(O.isEmpty(S))return;const k=s.value?r.value:r.value?[r.value]:[],R=S.filter($=>!k.some(x=>x.id===$.id));l.value=r.optionsListConverter([...k,...R])}).finally(()=>{d.value=!1}))};let f="";const g=O.debounce(()=>h(f),800),m=_=>{f=_,g()},p=_=>{var S;if(O.isArray(_)){const k=_.length>0?_.map(R=>{var $;return i.toRaw(($=l.value.find(x=>x.value===R))==null?void 0:$.item)}):[];o("update:value",k)}else if(_>0){const k=i.toRaw((S=l.value.find(R=>R.value===_))==null?void 0:S.item);o("update:value",k)}else o("update:value",null)};return e({focus:()=>{var _;return(_=u.value)==null?void 0:_.focusInput()},blur:()=>{var _;return(_=u.value)==null?void 0:_.blurInput()}}),(_,S)=>(i.openBlock(),i.createBlock(i.unref(Gv),{ref:"select-component","clear-filter-after-select":!0,clearable:t.clearable,"consistent-menu-width":t.consistentMenuWidth,disabled:t.disabled,filterable:!0,loading:d.value,multiple:s.value,options:c.value,placeholder:t.placeholder,remote:!0,value:a.value,"render-label":t.renderLabel,"render-tag":t.renderTag,onSearch:m,"onUpdate:value":p},null,8,["clearable","consistent-menu-width","disabled","loading","multiple","options","placeholder","value","render-label","render-tag"]))}}),Qv={},Ih=i.defineComponent({...Qv,__name:"searchable-product-select",props:{renderLabel:{},renderTag:{},value:{},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},minTermLength:{default:()=>{var t,e;return((e=(t=Y.useBaseConfigStateStore().getConfig())==null?void 0:t.minLength)==null?void 0:e.searchTerm)??3}},consistentMenuWidth:{type:Boolean,default:!1},wrapContent:{type:Boolean,default:!1},placeholder:{default:""},searchType:{}},emits:["update:value"],setup(t,{expose:e,emit:n}){const r=t,o=n,s=i.useTemplateRef("select-component"),a=async h=>r.searchType==="categories"?Y.HttpRequester.getInstance(Y.ProductCategoryDataProvider).publicSimpleSearch(h):r.searchType==="products"?Y.HttpRequester.getInstance(Y.ProductDataProvider).publicSimpleSearch(h):new Promise(f=>{f([])}),l=h=>r.searchType==="categories"?Ft.convertReferencesToSelectOptionsList(h,!0,!1,!1,f=>f!=null&&f.isNewRec()?"-":f.name):r.searchType==="products"?Ft.convertReferencesToSelectOptionsList(h,!0,!1,!1,f=>f!=null&&f.isNewRec()?"-":`[${f.code}] ${f.name}`):[],c=(h,f)=>{if(r.renderLabel)return r.renderLabel(h,f);if(r.searchType==="products"){const g=h.item;return i.h("div",{},[i.h("span",{class:"text-sc-grey mr-2.5"},g.code),i.h("span",{},[g.name])])}if(r.searchType==="categories"){const g=h.item;return i.h("div",{},[g.name])}};return e({focus:()=>{var h;return(h=s.value)==null?void 0:h.focus()},blur:()=>{var h;return(h=s.value)==null?void 0:h.blur()}}),(h,f)=>(i.openBlock(),i.createBlock(Vh,{ref:"select-component",value:t.value,clearable:t.clearable,disabled:t.disabled,placeholder:t.placeholder,"search-data-handler":a,"options-list-converter":l,"consistent-menu-width":t.consistentMenuWidth,"wrap-content":t.wrapContent,"min-term-length":t.minTermLength,"render-label":c,"render-tag":t.renderTag,"onUpdate:value":f[0]||(f[0]=g=>o("update:value",g))},null,8,["value","clearable","disabled","placeholder","consistent-menu-width","wrap-content","min-term-length","render-tag"]))}}),Jv={class:"col-span-2 flex flex-row gap-2.5"},e2={class:"flex-1"},t2={class:"text-sc-grey"},n2={class:"ml-2.5"},i2={key:0,class:"flex-none"},r2={},o2=i.defineComponent({...r2,__name:"products-list",props:{value:{},searchType:{},minTermLength:{default:()=>{var t,e;return((e=(t=Y.useBaseConfigStateStore().getConfig())==null?void 0:t.minLength)==null?void 0:e.searchTerm)??3}},disabled:{type:Boolean}},emits:["update:value"],setup(t,{emit:e}){const n=t,r=e,o=i.ref(null),s=()=>structuredClone(i.toRaw(n.value)),a=i.ref(s()),l=()=>{r("update:value",a.value.map(h=>i.toRaw(h)))},c=h=>{h&&(a.value=[...a.value.map(f=>i.toRaw(f)),...(O.isArray(h)?h:[h]).filter(f=>!a.value.some(g=>g.id===f.id))],i.nextTick(()=>{o.value=null}),l())},d=h=>{h&&(a.value=a.value.map(f=>f.id===h.id?h:i.toRaw(f)),l())},u=h=>{a.value=a.value.filter(f=>f.id!==h.id),l()};return i.watch(()=>n.value,()=>{a.value=s()}),(h,f)=>{const g=D.NListItem,m=V1,p=D.NButton,y=D.NList;return i.openBlock(),i.createBlock(y,{"show-divider":!1,hoverable:!0},{header:i.withCtx(()=>[i.renderSlot(h.$slots,"header")]),footer:i.withCtx(()=>[i.createVNode(Ih,{value:o.value,"onUpdate:value":[f[0]||(f[0]=b=>o.value=b),c],clearable:!0,disabled:t.disabled,"min-term-length":t.minTermLength,"search-type":t.searchType,placeholder:"Введите название"},null,8,["value","disabled","min-term-length","search-type"])]),default:i.withCtx(()=>[a.value.length===0?(i.openBlock(),i.createBlock(g,{key:0,class:"text-center text-sm text-gray-600"},{default:i.withCtx(()=>[...f[1]||(f[1]=[i.createTextVNode(" --- Список пуст --- ",-1)])]),_:1})):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value,b=>(i.openBlock(),i.createBlock(g,{key:b.id},{suffix:i.withCtx(()=>[i.createVNode(p,{disabled:t.disabled,quaternary:"",type:"error",onClick:_=>u(b)},{default:i.withCtx(()=>[i.createVNode(m)]),_:1},8,["disabled","onClick"])]),default:i.withCtx(()=>[i.createElementVNode("div",Jv,[i.createElementVNode("span",e2,[i.createElementVNode("span",t2,i.toDisplayString(b.code),1),i.createElementVNode("span",n2,i.toDisplayString(b.name),1)]),h.$slots["item-extra"]?(i.openBlock(),i.createElementBlock("div",i2,[i.renderSlot(h.$slots,"item-extra",{item:b,updateItemCallback:d})])):i.createCommentVNode("",!0)])]),_:2},1024))),128))]),_:3})}}}),s2={class:"flex flex-col gap-0.5"},a2={class:"flex gap-0.5"},l2={key:0,class:"text-base basis-1/2 shrink-0 flex flex-col gap-0.5 text-nowrap"},c2={class:"font-medium"},d2={key:0},u2={class:"font-medium"},h2={class:"font-medium"},f2={class:"font-medium"},m2={class:"font-medium"},g2={class:"font-medium"},p2={class:"font-medium"},y2={key:1,class:"flex flex-col gap-1.5 grow"},b2={key:0,class:"flex flex-wrap items-center gap-1"},_2={key:1,class:"flex flex-col gap-0.5"},w2={class:"text-nowrap text-base"},x2={key:0,class:"text-nowrap text-base"},k2={},Mh=i.defineComponent({...k2,__name:"order-item-params",props:{item:{},eventEmitter:{default:void 0},allowEdit:{type:Boolean,default:!1}},setup(t){const e=[Y.ConfiguratorsEnum.Kozyrek,Y.ConfiguratorsEnum.Mosquitto,Y.ConfiguratorsEnum.Strip,Y.ConfiguratorsEnum.MetalForDoors],n=t,r=i.ref(!1),o=i.ref({quantity:n.item.quantity,length:n.item.length});i.watch(()=>n.item,c=>{o.value={quantity:c.quantity,length:c.length}});const s=c=>{var d;c!==null&&(o.value.length=c,(d=n.eventEmitter)==null||d.emit("order-item:edit-length",{item:n.item,length:c,loaderRef:r}))},a=c=>{var d;c!==null&&(o.value.quantity=c,(d=n.eventEmitter)==null||d.emit("order-item:edit-quantity",{item:n.item,quantity:c,loaderRef:r}))},l=()=>{var c;(c=n.eventEmitter)==null||c.emit("order-item:open-configurator",{item:n.item})};return(c,d)=>{const u=D.NInputNumber;return i.openBlock(),i.createElementBlock("div",s2,[i.createElementVNode("div",a2,[t.item.configurator&&t.item.configuratorParams&&e.includes(t.item.configurator)?(i.openBlock(),i.createElementBlock("div",l2,[i.createElementVNode("span",null,[d[3]||(d[3]=i.createTextVNode(" Количество ",-1)),i.createElementVNode("span",c2,i.toDisplayString(t.item.quantity)+" шт.",1)]),t.item.configurator==="kozyrek"?(i.openBlock(),i.createElementBlock("span",d2,[d[4]||(d[4]=i.createTextVNode(" Длина: ",-1)),i.createElementVNode("span",u2,i.toDisplayString(Math.round(t.item.length*1e3))+" мм.",1)])):i.createCommentVNode("",!0),t.item.configurator==="mosquitto"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createElementVNode("span",null,[d[5]||(d[5]=i.createTextVNode(" Ширина: ",-1)),i.createElementVNode("span",h2,i.toDisplayString(Math.round(t.item.width*1e3))+" мм.",1)]),i.createElementVNode("span",null,[d[6]||(d[6]=i.createTextVNode(" Высота: ",-1)),i.createElementVNode("span",f2,i.toDisplayString(Math.round(t.item.height*1e3))+" мм.",1)])],64)):i.createCommentVNode("",!0),t.item.configurator==="strip"?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:2},i.renderList(t.item.configuratorParams.linesWidths,(h,f)=>(i.openBlock(),i.createElementBlock("span",{key:f},[i.createTextVNode(" Полоса №"+i.toDisplayString(Number(f)+1)+": ",1),i.createElementVNode("span",m2,i.toDisplayString(h)+" мм.",1)]))),128)):i.createCommentVNode("",!0),t.item.configurator==="metal_for_doors"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:3},[i.createElementVNode("span",null,[d[7]||(d[7]=i.createTextVNode(" Ширина: ",-1)),i.createElementVNode("span",g2,i.toDisplayString(t.item.width)+" мм.",1)]),i.createElementVNode("span",null,[d[8]||(d[8]=i.createTextVNode(" Длина: ",-1)),i.createElementVNode("span",p2,i.toDisplayString(Math.round(t.item.length*1e3))+" мм.",1)])],64)):i.createCommentVNode("",!0)])):t.item.configurator?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",y2,[t.allowEdit?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[t.item.product.getIsMeasurable()&&!t.item.configurator?(i.openBlock(),i.createElementBlock("div",b2,[i.createVNode(u,{value:o.value.length,parse:i.unref(et),"show-button":!1,disabled:!!t.item.configurator||r.value,loading:r.value,placeholder:"Длина",size:"small",class:"min-w-28 flex-1",onKeydown:d[0]||(d[0]=h=>i.unref(Oi)(h,".",!1)),onFocus:i.unref(Me),"onUpdate:value":s},{suffix:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(t.item.product.unit.name),1)]),_:1},8,["value","parse","disabled","loading","onFocus"]),i.createVNode(u,{value:o.value.quantity,parse:i.unref(et),"show-button":!1,disabled:!!t.item.configurator||r.value,loading:r.value,placeholder:"Кол-во",size:"small",class:"min-w-28 flex-1",onKeydown:d[1]||(d[1]=h=>i.unref(Oi)(h,".",!1)),onFocus:i.unref(Me),"onUpdate:value":a},{suffix:i.withCtx(()=>[...d[9]||(d[9]=[i.createTextVNode(" шт. ",-1)])]),_:1},8,["value","parse","disabled","loading","onFocus"])])):(i.openBlock(),i.createBlock(u,{key:1,value:o.value.quantity,parse:i.unref(et),"show-button":!1,disabled:!!r.value,loading:!!r.value,placeholder:"Кол-во",size:"small",class:"min-w-16 grow",onKeydown:d[2]||(d[2]=h=>i.unref(Oi)(h,".",!1)),onFocus:i.unref(Me),"onUpdate:value":a},{suffix:i.withCtx(()=>[...d[10]||(d[10]=[i.createTextVNode(" шт. ",-1)])]),_:1},8,["value","parse","disabled","loading","onFocus"]))],64)):(i.openBlock(),i.createElementBlock("div",_2,[i.createElementVNode("span",w2,[t.item.product.getIsMeasurable()?(i.openBlock(),i.createElementBlock("span",x2,i.toDisplayString(t.item.length??t.item.width)+" "+i.toDisplayString(t.item.product.unit.name)+" × ",1)):i.createCommentVNode("",!0),i.createTextVNode(" "+i.toDisplayString(t.item.quantity)+" шт. ",1)])]))]))]),t.item.configurator&&t.allowEdit?(i.openBlock(),i.createElementBlock("a",{key:0,href:"#",class:"text-xs text-blue-500 hover:text-blue-700 self-center",onClick:i.withModifiers(l,["prevent"])}," Изменить конфигурацию ")):i.createCommentVNode("",!0)])}}}),v2={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function C2(t,e){return i.openBlock(),i.createElementBlock("svg",v2,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M13 4a1 1 0 0 1 1 1h4a1 1 0 0 1 .783.378l.074.108l3 5l.055.103l.04.107l.029.109l.016.11L22 11v6a1 1 0 0 1-1 1h-1.171a3.001 3.001 0 0 1-5.658 0H9.829a3.001 3.001 0 0 1-5.658 0H3a1 1 0 0 1-1-1V6a2 2 0 0 1 2-2zM7 16a1 1 0 1 0 0 2a1 1 0 0 0 0-2m10 0a1 1 0 1 0 0 2a1 1 0 0 0 0-2m.434-9H14v3h5.234z"},null,-1)])])}const S2=i.markRaw({name:"tabler-truck-filled",render:C2}),B2={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function T2(t,e){return i.openBlock(),i.createElementBlock("svg",B2,[...e[0]||(e[0]=[i.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[i.createElementVNode("path",{d:"M5 17a2 2 0 1 0 4 0a2 2 0 1 0-4 0m10 0a2 2 0 1 0 4 0a2 2 0 1 0-4 0"}),i.createElementVNode("path",{d:"M5 17H3v-4M2 5h11v12m-4 0h6m4 0h2v-6h-8m0-5h5l3 5M3 9h4"})],-1)])])}const N2=i.markRaw({name:"tabler-truck-delivery",render:T2}),$2={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function R2(t,e){return i.openBlock(),i.createElementBlock("svg",$2,[...e[0]||(e[0]=[i.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[i.createElementVNode("path",{d:"M2 3h1a2 2 0 0 1 2 2v10a2 2 0 0 0 2 2h15"}),i.createElementVNode("path",{d:"M9 9a3 3 0 0 1 3-3h4a3 3 0 0 1 3 3v2a3 3 0 0 1-3 3h-4a3 3 0 0 1-3-3zM7 19a2 2 0 1 0 4 0a2 2 0 1 0-4 0m9 0a2 2 0 1 0 4 0a2 2 0 1 0-4 0"})],-1)])])}const E2=i.markRaw({name:"tabler-truck-loading",render:R2}),P2={class:"flex flex-col gap-1"},F2={key:0,class:"flex flex-row gap-1 text-sm text-sc-grey"},V2={key:1,class:"text-base"},I2={class:"text-sc-dark-grey mr-1.5"},M2={key:0},A2={key:1},O2={},Mo=i.defineComponent({...O2,__name:"order-delivery-label",props:{delivery:{},showType:{type:Boolean,default:!0},showDetails:{type:Boolean,default:!0}},setup(t){const e=i.computed(()=>{var o;return(o=Y.useReferencesStore().deliveryTypeReference)==null?void 0:o.find(s=>s.id===r.delivery.type)}),n=i.computed(()=>un.format(r.delivery.date,"dd.MM.yyyy")),r=t;return(o,s)=>{var d,u,h,f,g,m,p,y;const a=E2,l=N2,c=S2;return i.openBlock(),i.createElementBlock("div",P2,[t.showType?(i.openBlock(),i.createElementBlock("span",F2,[((d=e.value)==null?void 0:d.slug)==="self_delivery"?(i.openBlock(),i.createBlock(a,{key:0})):i.createCommentVNode("",!0),((u=e.value)==null?void 0:u.slug)==="delivery"?(i.openBlock(),i.createBlock(l,{key:1})):i.createCommentVNode("",!0),((h=e.value)==null?void 0:h.slug)==="transport_company_delivery"?(i.openBlock(),i.createBlock(c,{key:2})):i.createCommentVNode("",!0),i.createElementVNode("span",null,i.toDisplayString((f=e.value)==null?void 0:f.name),1)])):i.createCommentVNode("",!0),t.showDetails?(i.openBlock(),i.createElementBlock("span",V2,[i.createElementVNode("span",I2,i.toDisplayString(n.value),1),(m=(g=t.delivery)==null?void 0:g.address)!=null&&m.address?(i.openBlock(),i.createElementBlock("span",M2,i.toDisplayString(t.delivery.address.address),1)):i.createCommentVNode("",!0),(y=(p=t.delivery)==null?void 0:p.warehouse)!=null&&y.address?(i.openBlock(),i.createElementBlock("span",A2," со склада "+i.toDisplayString(t.delivery.warehouse.address),1)):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)])}}}),z2={class:"flex flex-col gap-2.5"},D2={class:"text-base"},L2=["href"],H2={class:"text-sc-grey"},W2={},Ah=i.defineComponent({...W2,__name:"order-common-info",props:{order:{},eventEmitter:{},allowEdit:{type:Boolean},fields:{},showAttachedUserColumn:{type:Boolean},orderContextButtonsConfig:{type:Function},onOrderContextSelect:{type:Function},orderUrl:{}},setup(t){const e=t,n=i.computed(()=>e.fields.includes(Pe.Id)?e.order.id:void 0),r=i.computed(()=>{var l,c;return e.fields.includes(Pe.Status)?(c=(l=Y.useReferencesStore().orderStatusReference)==null?void 0:l.find(d=>{var u;return d.id===(((u=e.order.status)==null?void 0:u.id)??-1)}))==null?void 0:c.name:void 0}),o=i.computed(()=>e.fields.includes(Pe.CreatedAt)),s=i.computed(()=>e.fields.includes(Pe.ClientInfo)||e.fields.includes(Pe.ClientInfoShort)?e.order.client:void 0),a=i.computed(()=>e.fields.includes(Pe.DeliveryInfo)?e.order.delivery:void 0);return(l,c)=>(i.openBlock(),i.createElementBlock("div",z2,[i.createElementVNode("span",D2,[n.value?(i.openBlock(),i.createElementBlock("a",{key:0,href:t.orderUrl.replace(":id",t.order.id.toString()),target:"_blank",class:"text-sc-dark-grey"}," #"+i.toDisplayString(n.value),9,L2)):i.createCommentVNode("",!0),o.value?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[c[0]||(c[0]=i.createTextVNode(" от ",-1)),i.createVNode(go,{date:t.order.createdAt,"is-time-secondary":!0},null,8,["date"])],64)):i.createCommentVNode("",!0),r.value?(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[c[1]||(c[1]=i.createTextVNode(" - ",-1)),i.createElementVNode("span",H2,i.toDisplayString(r.value),1)],64)):i.createCommentVNode("",!0)]),s.value?(i.openBlock(),i.createBlock(yr,{key:0,client:s.value,class:"ml-3"},null,8,["client"])):i.createCommentVNode("",!0),a.value?(i.openBlock(),i.createBlock(Mo,{key:1,delivery:a.value,class:"ml-3"},null,8,["delivery"])):i.createCommentVNode("",!0)]))}}),j2={},va=i.defineComponent({...j2,__name:"order-payment",props:{payment:{}},setup(t){const e=t,n=i.computed(()=>{var r;return(r=Y.useReferencesStore().paymentTypeReference)==null?void 0:r.find(o=>o.id===e.payment.type)});return(r,o)=>{var s;return i.openBlock(),i.createElementBlock("span",null,i.toDisplayString(((s=n.value)==null?void 0:s.name)??"-"),1)}}}),q2={class:"inline-block py-[0.0625rem] px-1.5 text-xs font-bold text-center whitespace-nowrap rounded text-white bg-[#17a2b8]"},X2={},Ca=i.defineComponent({...X2,__name:"creator-user-type-tag",props:{userType:{},prefixText:{default:"Добавлено"}},setup(t){const e=(n,r)=>{const o={[Y.UserTypeEnum.Manager]:"менеджером",[Y.UserTypeEnum.Operator]:"оператором",[Y.UserTypeEnum.Client]:"клиентом",[Y.UserTypeEnum.Admin]:"администратором"};return`${r} ${o[n]}`};return(n,r)=>(i.openBlock(),i.createElementBlock("small",q2,i.toDisplayString(e(t.userType,t.prefixText)),1))}}),Y2={class:"flex flex-row gap-1.5"},U2={class:"flex-none text-nowrap"},K2={class:"flex flex-1 flex-col"},G2={class:"mt-2.5 grid grid-flow-col grid-rows-2 gap-1 text-base"},Z2={key:0},Q2={key:1},J2={},Oh=i.defineComponent({...J2,__name:"order-product-info",props:{product:{},index:{}},setup(t){return(e,n)=>{const r=Ca;return i.openBlock(),i.createElementBlock("div",Y2,[i.createElementVNode("span",U2,i.toDisplayString(t.index+1)+".",1),i.createElementVNode("div",K2,[i.createVNode(cr,{product:t.product.product,"show-planning-dates":!1},null,8,["product"]),t.product.creator&&t.product.creator.type?(i.openBlock(),i.createBlock(r,{key:0,"user-type":t.product.creator.type,class:"mt-1 self-start"},null,8,["user-type"])):i.createCommentVNode("",!0),i.createElementVNode("div",G2,[n[0]||(n[0]=i.createElementVNode("span",null,"Кол-во",-1)),t.product.product.getIsMeasurable()?(i.openBlock(),i.createElementBlock("span",Z2,i.toDisplayString(`${t.product.length} ${t.product.product.unit.name} x ${t.product.quantity} шт.`),1)):(i.openBlock(),i.createElementBlock("span",Q2,i.toDisplayString(`${t.product.quantity} ${t.product.product.unit.name}`),1)),n[1]||(n[1]=i.createElementVNode("span",null,"Цена за ед.",-1)),i.createVNode(jn,{product:t.product,"cost-field-name":"costOneRub"},null,8,["product"]),n[2]||(n[2]=i.createElementVNode("span",null,"Сумма",-1)),i.createVNode(jn,{product:t.product,"cost-field-name":"cost"},null,8,["product"])])])])}}}),eC={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function tC(t,e){return i.openBlock(),i.createElementBlock("svg",eC,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"m112 112l20 320c.95 18.49 14.4 32 32 32h184c17.67 0 30.87-13.51 32-32l20-320"},null,-1),i.createElementVNode("path",{fill:"currentColor",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32",d:"M80 112h352"},null,-1),i.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M192 112V72h0a23.93 23.93 0 0 1 24-24h80a23.93 23.93 0 0 1 24 24h0v40m-64 64v224m-72-224l8 224m136-224l-8 224"},null,-1)])])}const nC=i.markRaw({name:"ion-trash-outline",render:tC}),iC={},rC=i.defineComponent({...iC,__name:"order-item-specification",props:{src:{}},setup(t){const e=i.useTemplateRef("image-reference");return(n,r)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("a",{class:"text-blue-500 hover:underline text-sm mt-1 block cursor-pointer",onClick:r[0]||(r[0]=o=>{var s;return(s=e.value)==null?void 0:s.showPreview()})}," Спецификация "),i.withDirectives(i.createVNode(i.unref(D.NImage),{ref:"image-reference",src:t.src,"previewed-img-props":{style:"max-width: 80vw; max-height: 80vh; object-fit: contain; border: 12px solid white;"}},null,8,["src"]),[[i.vShow,!1]])],64))}}),oC={},sC=i.defineComponent({...oC,__name:"order-items-list",props:{products:{},maxHeight:{default:void 0},eventEmitter:{default:void 0},allowEdit:{type:Boolean,default:!1}},setup(t){const e=t,n=(a,l)=>{const c=e.products,d=a.logicGroupId;if(!d)return 1;const u=c.at(l-1);return u&&u.logicGroupId===d?0:c.filter(h=>h.logicGroupId===d).length},r=()=>{const a=[{title:"№ п.п.",key:"id",resizable:!0,width:50,render:(l,c)=>i.h("span",{class:"text-base"},[c+1,"."])},{title:"Артикул",key:"codeNumber",resizable:!0,minWidth:120,render:l=>i.h("span",{class:"text-base"},[l.product.code])},{title:"Наименование",key:"name",resizable:!0,width:"45%",render:l=>i.h("div",{},[i.h(cr,{product:l.product,showCode:!1,showPlanningDates:!1,showAdditionalSaleIcon:l.isAdditionalSale??!1}),...l.marker?[i.h("span",{},["Маркировка: ",i.h("span",{class:"text-gray-600"},l.marker)])]:[],..."creator"in l&&l.creator&&l.creator.type?[i.h(Ca,{class:"mt-1",userType:l.creator.type,prefixText:"Добавлено"})]:[],...l.specificationImgUrl?[i.h(rC,{src:l.specificationImgUrl})]:[]])},{title:"Кол-во",key:"quantity",resizable:!0,minWidth:100,rowSpan:n,render:l=>i.h(Mh,{item:l,eventEmitter:e.eventEmitter,allowEdit:e.allowEdit})},{title:"Цена за ед.",key:"costOneRub",resizable:!0,minWidth:100,render:l=>i.h(jn,{product:l,costFieldName:"costOne",showQuantityUnit:!0})},{title:"Сумма",key:"cost",resizable:!0,minWidth:100,render:l=>i.h(jn,{product:l,costFieldName:"cost",showQuantityUnit:!0})},...e.allowEdit?[{title:"",key:"delete",width:44,render:l=>i.h(D.NButton,{quaternary:!0,type:"error",onClick:()=>{var c;(c=e.eventEmitter)==null||c.emit("order-item:delete",{item:l})}},()=>i.h(nC))}]:[]];switch(Ct.getDeviceTypeByResolution()){case Qe.phone:case Qe.tablet:return[{title:"",key:"items",resizable:!0,render:(l,c)=>i.h(Oh,{product:l,index:c})}];case Qe.laptop:return a;default:return a}},o=i.ref(r()),s=()=>{o.value=r()};return i.onMounted(()=>{s(),window.addEventListener("resize",s)}),i.onUnmounted(()=>{window.removeEventListener("resize",s)}),(a,l)=>{const c=D.NDataTable;return i.openBlock(),i.createElementBlock(i.Fragment,null,[l[0]||(l[0]=i.createElementVNode("h3",null,"Список позиций",-1)),i.createVNode(c,{columns:o.value,data:t.products,"row-key":d=>d.id,"bottom-bordered":!1,bordered:!1,"max-height":t.maxHeight},null,8,["columns","data","row-key","max-height"])],64)}}}),zh=Wn(sC,[["__scopeId","data-v-5a933cba"]]),aC={class:"ml-4 text-base"},lC={key:0,class:"text-sc-dark-grey my-2 text-center"},cC={key:1,class:"text-sc-dark-grey my-2"},dC={key:2,class:"grid grid-cols-3 gap-1.5"},uC={class:"text-sc-dark-grey"},hC={class:"col-span-2"},fC={class:"font-medium"},mC={key:0,class:"text-sc-dark-grey"},gC={class:"text-sc-dark-grey text-sm"},pC={},Dh=i.defineComponent({...pC,__name:"order-status-history",props:{order:{}},setup(t){const e=t,n=i.ref(!1),r=i.ref([]),o=a=>un.format(a,Y.useBaseConfigStateStore().config.dateFormats.uiDateWithTime),s=(a=!0)=>{a&&(n.value=!0),Y.HttpRequester.getInstance(Y.OrdersDataProvider).getOrderStatusHistory(e.order.id).then(l=>{r.value=l}).finally(()=>{a&&(n.value=!1)})};return i.watch(()=>e.order,()=>{s(!1)}),i.onMounted(()=>{s()}),(a,l)=>{const c=D.NSpin;return i.openBlock(),i.createElementBlock("div",null,[l[1]||(l[1]=i.createElementVNode("h3",null,"История статусов",-1)),i.createElementVNode("div",aC,[n.value?(i.openBlock(),i.createElementBlock("div",lC,[i.createVNode(c,{size:"small",class:"mb-1 align-middle"}),l[0]||(l[0]=i.createElementVNode("span",{class:"ml-2"},"Загрузка истории ...",-1))])):r.value.length===0?(i.openBlock(),i.createElementBlock("div",cC," История статусов отсутствует. ")):(i.openBlock(),i.createElementBlock("div",dC,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.value,(d,u)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:u},[i.createElementVNode("span",uC,i.toDisplayString(o(d.createdAt)),1),i.createElementVNode("div",hC,[i.createElementVNode("span",fC,i.toDisplayString(d.status.name),1),d.statusDetail?(i.openBlock(),i.createElementBlock("span",mC,"  ("+i.toDisplayString(d.statusDetail.name)+") ",1)):i.createCommentVNode("",!0),i.createElementVNode("div",gC,i.toDisplayString(d.user.name),1)])],64))),128))]))])])}}}),yC={class:"text-base"},bC={},Sa=i.defineComponent({...bC,__name:"user-short-info",props:{user:{},showUserType:{type:Boolean,default:!0},extraInfoOnSecondLine:{type:Boolean,default:!0}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass({"flex flex-col":t.showUserType&&t.extraInfoOnSecondLine})},[i.createElementVNode("span",yC,i.toDisplayString(t.user.name),1),t.showUserType?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass([{"ml-1":!t.extraInfoOnSecondLine},"text-sc-grey"])}," ["+i.toDisplayString(t.user.type)+"] ",3)):i.createCommentVNode("",!0)],2))}}),_C={class:"ml-4 grid grid-cols-3 gap-1.5 text-base"},wC={class:"col-span-2"},xC=["href"],kC={class:"col-span-2"},vC=["href"],CC={class:"btn btn-primary",href:"{{ invoice }}"},SC={},Lh=i.defineComponent({...SC,__name:"order-details",props:{order:{}},emits:["click:client-name"],setup(t,{emit:e}){const n=e;return(r,o)=>{var s;return i.openBlock(),i.createElementBlock("div",null,[o[14]||(o[14]=i.createElementVNode("h3",null,"Детали заказа",-1)),i.createElementVNode("div",_C,[t.order.creator.id!==t.order.client.id?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[o[1]||(o[1]=i.createElementVNode("span",null,"Создал",-1)),i.createVNode(Sa,{user:t.order.creator,class:"col-span-2"},null,8,["user"])],64)):i.createCommentVNode("",!0),o[13]||(o[13]=i.createElementVNode("span",null,"Клиент",-1)),i.createVNode(yr,{client:t.order.client,class:"col-span-2","onClick:clientName":o[0]||(o[0]=a=>n("click:client-name",t.order.client,a))},null,8,["client"]),t.order.contragent?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[o[2]||(o[2]=i.createElementVNode("span",null,"Контрагент",-1)),i.createVNode(Ld,{contragent:t.order.contragent,class:"col-span-2"},null,8,["contragent"])],64)):i.createCommentVNode("",!0),t.order.image?(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[o[3]||(o[3]=i.createElementVNode("span",null,"Графический файл клиента",-1)),o[4]||(o[4]=i.createElementVNode("a",{class:"fancybox col-span-2",href:"{{ order.image }}"}," Посмотреть ",-1))],64)):i.createCommentVNode("",!0),t.order.barcode?(i.openBlock(),i.createElementBlock(i.Fragment,{key:3},[o[5]||(o[5]=i.createElementVNode("span",null,"Штрих-код",-1)),i.createElementVNode("span",wC,i.toDisplayString(t.order.barcode),1)],64)):i.createCommentVNode("",!0),t.order.payment?(i.openBlock(),i.createElementBlock(i.Fragment,{key:4},[o[6]||(o[6]=i.createElementVNode("span",null,"Оплата",-1)),i.createVNode(va,{payment:t.order.payment,class:"col-span-2"},null,8,["payment"])],64)):i.createCommentVNode("",!0),(s=t.order.payment)!=null&&s.onlinePaymentLink?(i.openBlock(),i.createElementBlock(i.Fragment,{key:5},[o[7]||(o[7]=i.createElementVNode("span",null,"Онлайн-оплата",-1)),i.createElementVNode("a",{href:t.order.payment.onlinePaymentLink,target:"_blank",class:"col-span-2"}," Оплатить заказ ",8,xC)],64)):i.createCommentVNode("",!0),t.order.delivery?(i.openBlock(),i.createElementBlock(i.Fragment,{key:6},[o[8]||(o[8]=i.createElementVNode("span",null,"Доставка",-1)),i.createVNode(Mo,{delivery:t.order.delivery,class:"col-span-2"},null,8,["delivery"])],64)):i.createCommentVNode("",!0),t.order.comment?(i.openBlock(),i.createElementBlock(i.Fragment,{key:7},[o[9]||(o[9]=i.createElementVNode("span",null,"Комментарий",-1)),i.createElementVNode("span",kC,i.toDisplayString(t.order.comment),1)],64)):i.createCommentVNode("",!0),t.order.attachedUser?(i.openBlock(),i.createElementBlock(i.Fragment,{key:8},[o[10]||(o[10]=i.createElementVNode("span",null,"Закреплен за",-1)),i.createVNode(Sa,{user:t.order.attachedUser,class:"col-span-2"},null,8,["user"])],64)):i.createCommentVNode("",!0),t.order.erpOrderUrl?(i.openBlock(),i.createElementBlock(i.Fragment,{key:9},[o[11]||(o[11]=i.createElementVNode("span",null,"Открыть в ERP",-1)),i.createElementVNode("a",{href:t.order.erpOrderUrl,target:"_blank",class:"col-span-2"}," Открыть заявку в ERP ",8,vC)],64)):i.createCommentVNode("",!0),t.order.invoices&&t.order.invoices.length>0?(i.openBlock(),i.createElementBlock(i.Fragment,{key:10},[o[12]||(o[12]=i.createElementVNode("span",null,"Прикрепленные счета",-1)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.order.invoices,(a,l)=>(i.openBlock(),i.createElementBlock("div",{key:l,class:"col-span-2"},[i.createElementVNode("a",CC," Скачать счет №"+i.toDisplayString(l+1),1)]))),128))],64)):i.createCommentVNode("",!0)])])}}}),BC={key:0},TC={class:"text-sc-dark-grey my-2 text-center"},NC={key:1,class:"text-sc-dark-grey my-2 text-center"},$C={key:2},RC={class:"text-sc-dark-grey mt-4 text-right font-bold"},EC={class:"text-sc-primary"},PC={},Hh=i.defineComponent({...PC,__name:"order-info",props:{order:{},eventEmitter:{default:void 0},allowEdit:{type:Boolean,default:!1}},emits:["click:client-name"],setup(t,{emit:e}){const n=t,r=e,o=i.ref(!1),s=i.ref(),a=(c=!0)=>{if("products"in n.order){s.value=new Y.Order(n.order);return}c&&(o.value=!0),Y.HttpRequester.getInstance(Y.OrdersDataProvider).getOrder(n.order.id).then(d=>{s.value=d}).finally(()=>{c&&(o.value=!1)})},l=i.computed(()=>{var c;return(((c=s.value)==null?void 0:c.products)??[]).reduce((d,u)=>d+u.costRub,0).toLocaleString("ru-ru",{minimumFractionDigits:2})});return i.watch(()=>n.order,()=>{a(!1)}),i.onMounted(()=>{a()}),(c,d)=>{const u=D.NSpin;return o.value?(i.openBlock(),i.createElementBlock("div",BC,[i.createElementVNode("div",TC,[i.createVNode(u,{size:"small",class:"mb-2.5 align-middle"}),d[1]||(d[1]=i.createElementVNode("div",null,[i.createElementVNode("span",null,"Загрузка данных ...")],-1))])])):!s.value||s.value.products.length===0?(i.openBlock(),i.createElementBlock("div",NC," --- Не удалось загрузить данные о заказе --- ")):(i.openBlock(),i.createElementBlock("div",$C,[i.createVNode(zh,{products:s.value.products,"event-emitter":t.eventEmitter,"allow-edit":t.allowEdit},null,8,["products","event-emitter","allow-edit"]),i.createElementVNode("div",RC,[d[2]||(d[2]=i.createTextVNode(" ИТОГО: ",-1)),i.createElementVNode("span",EC,i.toDisplayString(l.value)+" ₽",1)]),i.createVNode(Lh,{order:s.value,"onClick:clientName":d[0]||(d[0]=h=>r("click:client-name",s.value.client,h))},null,8,["order"]),i.createVNode(Dh,{order:s.value},null,8,["order"])]))}}}),FC={},VC=i.defineComponent({...FC,__name:"order-actions",props:{orderContextButtonsConfig:{type:Function,default:void 0},onOrderContextSelect:{type:Function,default:void 0},order:{}},setup(t){const e=t,n=i.inject(ar,"small"),r=i.computed(()=>O.isNil(e.orderContextButtonsConfig)?[]:O.isFunction(e.orderContextButtonsConfig)?e.orderContextButtonsConfig(e.order):e.orderContextButtonsConfig),o=s=>{var a;(a=e.onOrderContextSelect)==null||a.call(e,e.order,s)};return(s,a)=>{var u;const l=Ho,c=D.NButton,d=D.NDropdown;return((u=r.value)==null?void 0:u.length)>0?(i.openBlock(),i.createBlock(d,{key:0,options:r.value,size:i.unref(n),trigger:"click",onSelect:o},{default:i.withCtx(()=>[i.createVNode(c,{ghost:!0,size:i.unref(n),type:"primary"},{default:i.withCtx(()=>[i.createVNode(l)]),_:1},8,["size"])]),_:1},8,["options","size"])):i.createCommentVNode("",!0)}}}),IC={},MC=i.defineComponent({...IC,__name:"orders-list",props:{fields:{},showAttachedUserColumn:{type:Boolean,default:!1},orderContextButtonsConfig:{},onOrderContextSelect:{},orderUrl:{},tableMinWidth:{default:1/0},filters:{default:void 0},sort:{default:void 0},pagination:{default:void 0},useCellIndication:{type:Boolean,default:!1},enableSorting:{type:Boolean,default:!1},refreshInterval:{default:0}},emits:["click:client-name","dblclick:row","update:pagination","update:sort"],setup(t,{emit:e}){const n=t,r=e,o=()=>O.cloneDeep(n.sort??[{field:"id",direction:"desc"}]),s=i.ref(o()),a=i.ref([]),l=i.ref(!1),c=i.ref(700),d=w=>{const T={onDblclick:()=>r("dblclick:row",w)};if(!n.useCellIndication)return T;const N=[];return w.isOnOrder&&N.push("on-order"),w.isLargeOrder&&N.push("large-order"),w.isNotInStock&&N.push("not-in-stock"),N.push("order-status",w.status.slug),w.delivery.date&&un.isTomorrow(new Date(w.delivery.date))&&N.push("next-day-order"),N.length>0&&(T.class=N.join(" ")),T},u=()=>{const w=[Pe.CreatedAt,Pe.Id,Pe.ClientInfo,Pe.ClientCity,Pe.DeliveryDate,Pe.PaymentType,Pe.SalesDirections,Pe.Status,...n.showAttachedUserColumn?[Pe.AttachedUser]:[],Pe.actions],T=n.fields.length>0?n.fields:w,N={title:"???",key:"undefined",render:()=>i.h("span",{},["--- unknown ---"])},A={type:"expand",expandable:O.constant(!0),renderExpand:z=>i.h(Hh,{order:z,class:"pl-10 pt-3 pb-10","onClick:client-name":()=>{r("click:client-name",z.client,null)}}),width:"30"};let I=[{title:"Дата заказа",key:Pe.CreatedAt,resizable:!0,width:100,render:z=>i.h(go,{date:z.createdAt,isTimeSecondary:!0,isTimeOnSecondLine:!0,class:"text-base"})},{title:"№ заказа",key:Pe.Id,resizable:!0,width:75,className:"order-id",render:z=>i.h("a",{href:n.orderUrl.replace(":id",z.id.toString()),class:"text-base"},z.id)},{title:"Дата доставки / самовывоза",key:Pe.DeliveryDate,resizable:!0,width:100,className:"delivery-date",render:z=>i.h(go,{date:z.delivery.date,isShowTime:!1,class:"text-base"})},{title:"Клиент",key:Pe.ClientInfo,resizable:!0,minWidth:320,render:z=>i.h(yr,{client:z.client,"onClick:client-name":()=>{r("click:client-name",z.client,null)}})},{title:"Тип доставки",key:Pe.DeliveryInfo,resizable:!0,minWidth:320,render:z=>i.h(Mo,{delivery:z.delivery})},{title:"Клиент",key:Pe.ClientInfoShort,resizable:!0,minWidth:320,render:z=>i.h(yr,{client:z.client,showCityAndRegion:!1,"onClick:client-name":()=>{r("click:client-name",z.client,null)}})},{title:"Город клиента",key:Pe.ClientCity,resizable:!0,minWidth:90,width:120,render:z=>{var L;return i.h("span",{class:"text-base"},((L=z.client)==null?void 0:L.city.name)??"—")}},{title:"Статус",key:Pe.Status,resizable:!0,width:150,minWidth:115,className:"order-status",render:z=>i.h("span",{class:"text-base"},[z.status.name])},{title:"Тип оплаты",key:Pe.PaymentType,resizable:!0,width:115,minWidth:95,render:z=>z.payment?i.h(va,{payment:z.payment}):i.h("span",{class:"text-base"},"—")},{title:"Напр. продаж",key:Pe.SalesDirections,resizable:!0,width:70,render:z=>{var L;return i.h("span",{class:"text-base"},[((L=z.salesDirection)==null?void 0:L.name)??""])}},...n.showAttachedUserColumn?[{title:"Закреплено за",key:Pe.AttachedUser,resizable:!0,minWidth:120,render:z=>{var L;return i.h("span",{class:"text-base"},[((L=z==null?void 0:z.attachedUser)==null?void 0:L.name)??""])}}]:[]];switch(n.orderContextButtonsConfig&&I.push({key:"actions",title:"",className:"align-top",width:50,render:z=>i.h(VC,{order:z,orderContextButtonsConfig:n.orderContextButtonsConfig,onOrderContextSelect:n.onOrderContextSelect})}),n.enableSorting&&(I=I.map(z=>[Pe.Id,Pe.CreatedAt,Pe.DeliveryDate].includes(z.key)?{...z,sorter:!0,sortOrder:!1,...z.width===void 0?{}:{width:z.width+16}}:z)),Ct.getDeviceTypeByResolution()){case Qe.phone:case Qe.tablet:return[A,{key:"order",title:"Заказ",resizable:!0,render:z=>i.h(Ah,{order:z,fields:T,orderUrl:n.orderUrl})}];case Qe.laptop:{const z=n.showAttachedUserColumn?T:T.filter(L=>L!==Pe.AttachedUser);return[A,...z.map(L=>I.find(ee=>ee.key===L)??N)]}default:return[N]}},h=i.ref(u()),f=i.ref(new Y.DataTablePagination(n.pagination??{page:1,pageSize:10,itemCount:0,pageCount:1,pageSlot:5,pageSizes:[10,15,25],showSizePicker:!0})),g=i.computed(()=>({...f.value,prefix({itemCount:w}){return`Всего заказов: ${w}`}})),m=i.ref(null),p=i.ref(null),y=i.ref(null),b=()=>{y.value!==null&&(clearInterval(y.value),y.value=null)},_=()=>{b(),n.refreshInterval&&(y.value=setInterval(()=>{k()},n.refreshInterval))},S=()=>{var w,T;n.filters&&((w=p.value)==null||w.abort(),p.value=null,(T=m.value)==null||T.abort(),m.value=new AbortController,l.value=!0,Y.HttpRequester.getInstance(Y.OrdersDataProvider).getOrders(n.filters,s.value,{page:f.value.page,pageSize:f.value.pageSize},m.value.signal).then(N=>{f.value.itemCount!==N.meta.total&&(f.value.itemCount=N.meta.total),f.value.page!==N.meta.currentPage&&(f.value.page=N.meta.currentPage),f.value.pageCount!==N.meta.lastPage&&(f.value.pageCount=N.meta.lastPage),f.value.pageSize!==N.meta.perPage&&(f.value.pageSize=N.meta.perPage),a.value=N.data,l.value=!1}).catch(N=>{if((N==null?void 0:N.name)!=="CanceledError")throw l.value=!1,N}))},k=()=>{var w;!n.filters||l.value||((w=p.value)==null||w.abort(),p.value=new AbortController,Y.HttpRequester.getInstance(Y.OrdersDataProvider).getOrders(n.filters,s.value,{page:f.value.page,pageSize:f.value.pageSize},p.value.signal).then(T=>{a.value=a.value.map(N=>T.data.find(I=>I.id===N.id)??N),f.value.itemCount!==T.meta.total&&(f.value.itemCount=T.meta.total),f.value.pageCount!==T.meta.lastPage&&(f.value.pageCount=T.meta.lastPage)}).catch(T=>{if((T==null?void 0:T.name)!=="CanceledError")throw T}))},R=w=>{f.value.page=w,S(),r("update:pagination",f.value)},$=w=>{f.value.pageSize=w,f.value.page=1,S(),r("update:pagination",f.value)},x=w=>{if(O.isNull(w))s.value=o();else{const[T]=s.value;T.field=w.columnKey.toString(),T.direction=w.order==="ascend"?"asc":"desc",s.value=[T]}h.value.forEach(T=>{if(Object.hasOwn(T,"sortOrder")){const N=T;N.sortOrder=N.key===(w==null?void 0:w.columnKey)&&(w!=null&&w.sorter)&&w.order!==!1?w.order:!1}}),S(),r("update:sort",s.value)},C=()=>{h.value=u(),c.value=window.innerHeight};return i.watch(()=>n.filters,()=>{f.value.page=1,S(),_()}),i.watch(()=>n.sort,()=>{s.value=o(),f.value.page=1,S(),_()}),i.onMounted(()=>{C(),window.addEventListener("resize",C),i.nextTick(()=>{S(),_()})}),i.onUnmounted(()=>{var w,T;window.removeEventListener("resize",C),(w=m.value)==null||w.abort(),(T=p.value)==null||T.abort(),b()}),(w,T)=>{const N=D.NDataTable;return i.openBlock(),i.createBlock(N,{columns:h.value,data:a.value,"row-key":A=>A.id,"row-props":d,"scroll-x":t.tableMinWidth,pagination:g.value,loading:l.value,remote:!0,bordered:!1,"bottom-bordered":!1,"sticky-expanded-rows":!0,"max-height":c.value*(i.unref(Y.useBaseConfigStateStore)().config.tableDefaultHeightCoefficient??.6),"pagination-behavior-on-filter":"first","onUpdate:page":R,"onUpdate:pageSize":$,"onUpdate:sorter":x},null,8,["columns","data","row-key","scroll-x","pagination","loading","max-height"])}}}),AC=Wn(MC,[["__scopeId","data-v-2a162c0c"]]),OC=["href"],zC={class:"text-sc-dark-grey"},DC={},LC=i.defineComponent({...DC,__name:"short-text-order-info",props:{order:{},orderLink:{}},emits:["click:order-id"],setup(t,{emit:e}){const n=t,r=e,o=i.computed(()=>un.format(n.order.createdAt,Y.useBaseConfigStateStore().config.dateFormats.uiDateWithTime)),s=a=>{O.isNil(n.orderLink)&&(a.preventDefault(),a.stopPropagation()),r("click:order-id",n.order,a)};return(a,l)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("span",null,[l[1]||(l[1]=i.createTextVNode(" #",-1)),i.createElementVNode("a",{href:t.orderLink??"#",onClick:l[0]||(l[0]=c=>s(c))},i.toDisplayString(t.order.id),9,OC),i.createTextVNode(" от "+i.toDisplayString(o.value),1)]),l[2]||(l[2]=i.createTextVNode(", ",-1)),i.createElementVNode("span",zC,"автор: "+i.toDisplayString(t.order.creator.name)+" ["+i.toDisplayString(t.order.creator.type)+"]",1)],64))}}),HC={class:"sc-page flex flex-col bg-inherit"},WC={class:"my-2 flex flex-row items-end"},jC={class:"sc-title grow"},qC={key:0,class:"sc-title-buttons flex-1 grow-0"},XC={class:"flex flex-col justify-end gap-1 sm:mt-0 sm:flex-row"},YC={key:0,class:"sc-title-extra mt-2 sm:mt-4"},UC={},Wh=i.defineComponent({...UC,__name:"page",props:{title:{},stickyHeader:{type:Boolean},stickyTopOffset:{}},setup(t){return(e,n)=>{const r=D.NH1;return i.openBlock(),i.createElementBlock("div",HC,[i.createElementVNode("div",{class:i.normalizeClass(t.stickyHeader?"sticky z-10 bg-inherit":void 0),style:i.normalizeStyle(t.stickyHeader?{top:`${t.stickyTopOffset??0}px`}:void 0)},[i.createElementVNode("div",WC,[i.createElementVNode("div",jC,[i.renderSlot(e.$slots,"title",{},()=>[i.createVNode(r,{class:"m-0 leading-none lg:mb-3 lg:leading-normal"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(t.title??""),1)]),_:1})])]),e.$slots["title-buttons"]?(i.openBlock(),i.createElementBlock("div",qC,[i.createElementVNode("div",XC,[i.renderSlot(e.$slots,"title-buttons")])])):i.createCommentVNode("",!0)]),e.$slots["title-extra"]?(i.openBlock(),i.createElementBlock("div",YC,[i.renderSlot(e.$slots,"title-extra")])):i.createCommentVNode("",!0),i.renderSlot(e.$slots,"sticky-extra")],6),i.renderSlot(e.$slots,"default")])}}}),KC={class:"overflow-hidden transition-all duration-300"},GC={class:"text-lg font-medium leading-none"},ZC={},jh=i.defineComponent({...ZC,__name:"sliding-content-with-drawer",props:{drawerWidth:{type:[Number,Function],default:void 0},showDrawer:{type:Boolean,default:!1},title:{default:""}},emits:["update:show-drawer"],setup(t,{emit:e}){const n=t,r=e,o=i.ref(0),s=i.ref(n.showDrawer),a=()=>{switch(Ct.getDeviceTypeByResolution()){case Qe.phone:return window.innerWidth*.8;case Qe.tablet:return window.innerWidth*.5;default:return window.innerWidth*.33}},l=()=>{s.value?O.isUndefined(n.drawerWidth)?o.value=a():o.value=O.isFunction(n.drawerWidth)?n.drawerWidth():n.drawerWidth:o.value=0};return i.watch(()=>n.drawerWidth,()=>{l()}),i.watch(()=>s.value,()=>{l(),r("update:show-drawer",s.value)}),i.watch(()=>n.showDrawer,c=>{s.value=c}),i.onUnmounted(()=>{window.removeEventListener("resize",l)}),l(),window.addEventListener("resize",l),(c,d)=>{const u=D.NDrawerContent,h=D.NDrawer;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",KC,[i.createElementVNode("div",{style:i.normalizeStyle(`margin-left: ${o.value}px;`),class:"w-full"},[i.renderSlot(c.$slots,"default")],4)]),i.createVNode(h,{show:s.value,"onUpdate:show":d[0]||(d[0]=f=>s.value=f),resizable:!0,width:o.value,placement:"left"},{default:i.withCtx(()=>[i.createVNode(u,{closable:""},{header:i.withCtx(()=>[i.renderSlot(c.$slots,"drawer-header",{},()=>[i.createElementVNode("div",GC,i.toDisplayString(t.title),1)])]),default:i.withCtx(()=>[i.renderSlot(c.$slots,"drawer-content")]),footer:i.withCtx(()=>[i.renderSlot(c.$slots,"drawer-footer")]),_:3})]),_:3},8,["show","width"])],64)}}}),QC={ref:"panel-component-ref",class:"sc-page-panel flex flex-row gap-2.5 bg-inherit sm:gap-8"},JC={key:0},eS={class:"sc-page-preview-panel grow"},tS={key:1,class:"sc-page-preview-panel-extra flex-none"},nS={},iS=i.defineComponent({...nS,__name:"page-with-sliding-panel",props:{title:{},isShowPanelButtonVisible:{type:Boolean,default:!0},showPanelButtonText:{default:""},panelTitle:{default:""},stickyHeader:{type:Boolean,default:!1},stickyTopOffset:{default:0}},setup(t,{expose:e}){const n=i.ref(!1),r=()=>{n.value=!0},o=()=>{n.value=!1},s=i.useTemplateRef("panel-component-ref");return e({scrollToTopOfPanel:l=>{var c;(c=s.value)==null||c.scrollIntoView({behavior:"smooth"}),l&&i.nextTick(()=>{var d,u;window.scrollTo({top:(((u=(d=s.value)==null?void 0:d.getBoundingClientRect())==null?void 0:u.top)??0)+window.pageYOffset+l,behavior:"smooth"})})},showPanel:r,closePanel:o}),(l,c)=>{const d=D.NButton;return i.openBlock(),i.createBlock(Wh,{title:t.title,"sticky-header":t.stickyHeader,"sticky-top-offset":t.stickyTopOffset},i.createSlots({default:i.withCtx(()=>[i.createVNode(jh,{"show-drawer":n.value,"onUpdate:showDrawer":c[1]||(c[1]=u=>n.value=u),title:t.panelTitle},i.createSlots({"drawer-content":i.withCtx(()=>[i.renderSlot(l.$slots,"panel-content")]),default:i.withCtx(()=>[i.renderSlot(l.$slots,"default")]),_:2},[l.$slots["panel-header"]?{name:"drawer-header",fn:i.withCtx(()=>[i.renderSlot(l.$slots,"panel-header")]),key:"0"}:void 0,l.$slots["panel-bottom"]?{name:"drawer-footer",fn:i.withCtx(()=>[i.renderSlot(l.$slots,"panel-bottom")]),key:"1"}:void 0]),1032,["show-drawer","title"])]),_:2},[l.$slots.title?{name:"title",fn:i.withCtx(()=>[i.renderSlot(l.$slots,"title")]),key:"0"}:void 0,l.$slots["title-buttons"]?{name:"title-buttons",fn:i.withCtx(()=>[i.renderSlot(l.$slots,"title-buttons")]),key:"1"}:void 0,l.$slots["title-extra"]?{name:"title-extra",fn:i.withCtx(()=>[i.renderSlot(l.$slots,"title-extra")]),key:"2"}:void 0,l.$slots["preview-panel"]||l.$slots["preview-panel-extra"]||t.isShowPanelButtonVisible?{name:"sticky-extra",fn:i.withCtx(()=>[i.createElementVNode("div",QC,[t.isShowPanelButtonVisible?(i.openBlock(),i.createElementBlock("div",JC,[i.renderSlot(l.$slots,"show-panel-button",{onClickHandler:()=>{n.value=!0}},()=>[i.createVNode(d,{class:"flex-none sm:px-10 sm:py-4",onClick:c[0]||(c[0]=u=>n.value=!0)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(t.showPanelButtonText),1)]),_:1})])])):i.createCommentVNode("",!0),i.createElementVNode("div",eS,[i.renderSlot(l.$slots,"preview-panel")]),l.$slots["preview-panel-extra"]?(i.openBlock(),i.createElementBlock("div",tS,[i.renderSlot(l.$slots,"preview-panel-extra")])):i.createCommentVNode("",!0)],512)]),key:"3"}:void 0]),1032,["title","sticky-header","sticky-top-offset"])}}}),rS={},oS=i.defineComponent({...rS,__name:"curator-select",props:{value:{default:null},clearable:{type:Boolean,default:!1},consistentMenuWidth:{type:Boolean},wrapContent:{type:Boolean},managerReferenceList:{default:()=>[]},showEmptyValue:{type:Boolean,default:!1}},emits:["update:value"],setup(t,{expose:e,emit:n}){const r=t,o=n,s=i.computed(()=>O.isArray(r.value)),a=i.computed(()=>{var m;return O.isArray(r.value)?r.value.map(p=>p.id):((m=r.value)==null?void 0:m.id)??null}),l=i.computed(()=>{const m=new Y.Curator({id:-1,name:"",contacts:{},curatedDirection:new Y.CuratedDirection({id:-1,name:"",guid:""}),guid:""}),p=r.showEmptyValue?[m]:[];return r.managerReferenceList.filter(y=>{var b;return(((b=y==null?void 0:y.curatedDirections)==null?void 0:b.length)??0)>0}).forEach(y=>{((y==null?void 0:y.curatedDirections)??[]).forEach(b=>{p.push(new Y.Curator({id:y.id,guid:y.guid,name:y.name,photo:y.photo,contacts:y.contacts??{},curatedDirection:b}))})}),p}),c=i.computed(()=>Ft.convertReferencesToSelectOptionsList(l.value,!0,{key:"item.curatedDirection.id",label:"item.curatedDirection.name"},!1,m=>{const p=O.some(s.value?r.value:[r.value],["id",m.id])?` (${m.curatedDirection.name}) `:"";return m.curatedDirection.isNewRec()?m.name:`${m.name}${p}`})),d=i.computed(()=>c.value.map(m=>({...m,class:r.wrapContent?`${m.class} consistent-menu-width`:m.class}))),u=i.useTemplateRef("select-component"),h=m=>{if(O.isArray(m)){const p=m.length>0?m.map(y=>l.value.find(b=>b.id===y)).filter(y=>!O.isNil(y)):[];o("update:value",p)}else{const p=m>0?l.value.find(y=>y.id===m):null;o("update:value",p??null)}};return i.watch(()=>r.value,()=>{var m,p;(p=(m=u.value)==null?void 0:m.$forceUpdate)==null||p.call(m)},{deep:!0}),e({focus:()=>{var m;return(m=u.value)==null?void 0:m.focusInput()},blur:()=>{var m;return(m=u.value)==null?void 0:m.blurInput()}}),(m,p)=>(i.openBlock(),i.createBlock(i.unref(D.NSelect),{ref:"select-component",value:a.value,clearable:t.clearable,disabled:c.value.length===0,"consistent-menu-width":t.consistentMenuWidth,multiple:s.value,options:d.value,placeholder:"","onUpdate:value":h},null,8,["value","clearable","disabled","consistent-menu-width","multiple","options"]))}}),sS={},aS=i.defineComponent({...sS,__name:"manager-select",props:{value:{default:null},clearable:{type:Boolean,default:!1},consistentMenuWidth:{type:Boolean,default:!0},wrapContent:{type:Boolean,default:!0},managerReferenceList:{default:()=>[]},disabledManagerReferenceList:{default:()=>[]},showActualOnly:{type:Boolean,default:!1},showEmptyValue:{type:Boolean,default:!1},groupBySalesDirection:{type:Boolean,default:!1}},emits:["update:value"],setup(t,{expose:e,emit:n}){const r=t,o=n,s=i.computed(()=>O.isArray(r.value)),a=i.computed(()=>{var m;return O.isArray(r.value)?r.value.map(p=>p.id):((m=r.value)==null?void 0:m.id)??null}),l=i.computed(()=>r.showEmptyValue?[Y.ManagerDataFactory.generateUndefinedManagerInstance(),...r.managerReferenceList]:r.managerReferenceList),c=i.computed(()=>{var y;let m=l.value,p=r.disabledManagerReferenceList.map(b=>b.id);if(r.showActualOnly){const b=O.isArray(r.value)?r.value.map(_=>_.id):[(y=r.value)==null?void 0:y.id];p=O.union(p,l.value.filter(_=>!_.isActive).map(_=>_.id)),m=m.filter(_=>(r.showEmptyValue?Y.ManagerDataFactory.isUndefinedManagerInstance(_):!1)||_.isActive||b.includes(_.id))}return Ft.convertReferencesToSelectOptionsList(m,!0,r.groupBySalesDirection?{key:"item.salesDirection.id",label:"item.salesDirection.name"}:!1,!1,b=>{const _=!r.groupBySalesDirection||r.groupBySalesDirection&&O.some(s.value?r.value:[r.value],["id",b.id])?` (${b.salesDirection.name}) `:"";return b.salesDirection.isNewRec()?b.name:`${b.name}${_}${b.isActive?"":" [Не активен]"}`},b=>p.includes(b.id)&&b.isActive)}),d=i.computed(()=>c.value.map(m=>({...m,class:r.wrapContent?`${m.class} consistent-menu-width`:m.class}))),u=i.useTemplateRef("select-component"),h=m=>{if(O.isArray(m)){const p=m.length>0?m.filter(y=>!O.some(r.disabledManagerReferenceList,["id",y])).map(y=>l.value.find(b=>b.id===y)).filter(y=>!O.isNil(y)):[];o("update:value",p)}else{const p=m>0&&!O.some(r.disabledManagerReferenceList,["id",m])?l.value.find(y=>y.id===m):new Y.Manager;o("update:value",p??new Y.Manager)}};return i.watch(()=>r.value,()=>{var m,p;(p=(m=u.value)==null?void 0:m.$forceUpdate)==null||p.call(m)},{deep:!0}),i.watch(()=>r.disabledManagerReferenceList,m=>{if(m.length>0&&r.value)if(s.value){const p=r.value;O.some(p,y=>O.some(m,["id",y.id]))&&o("update:value",p.filter(y=>!O.some(m,["id",y.id])))}else{const p=r.value;O.some(m,["id",p.id])&&o("update:value",new Y.Manager)}}),e({focus:()=>{var m;return(m=u.value)==null?void 0:m.focusInput()},blur:()=>{var m;return(m=u.value)==null?void 0:m.blurInput()}}),(m,p)=>(i.openBlock(),i.createBlock(i.unref(D.NSelect),{ref:"select-component",value:a.value,clearable:t.clearable,disabled:c.value.length===0,"consistent-menu-width":t.consistentMenuWidth,multiple:s.value,options:d.value,placeholder:"","onUpdate:value":h},null,8,["value","clearable","disabled","consistent-menu-width","multiple","options"]))}}),lS={class:"m-0.5 flex flex-col p-0.5"},cS={class:"flex flex-row gap-1"},dS={key:0},uS={key:1},hS={key:2},fS={key:3},mS={class:"flex flex-row gap-1"},gS={key:0},pS={key:1},yS={key:2},bS={key:3},_S={},qh=i.defineComponent({..._S,__name:"address-suggestion-label",props:{addr:{},selected:{type:Boolean}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",lS,[i.createElementVNode("span",cS,[t.addr.postIndex?(i.openBlock(),i.createElementBlock("span",dS,i.toDisplayString(t.addr.postIndex)+", ",1)):i.createCommentVNode("",!0),t.addr.city?(i.openBlock(),i.createElementBlock("span",uS,i.toDisplayString(t.addr.city)+", ",1)):i.createCommentVNode("",!0),t.addr.locality?(i.openBlock(),i.createElementBlock("span",hS,i.toDisplayString(t.addr.locality)+", ",1)):i.createCommentVNode("",!0),t.addr.region?(i.openBlock(),i.createElementBlock("span",fS,i.toDisplayString(t.addr.region)+", ",1)):i.createCommentVNode("",!0)]),i.createElementVNode("span",mS,[t.addr.street?(i.openBlock(),i.createElementBlock("span",gS,i.toDisplayString(t.addr.street)+", ",1)):i.createCommentVNode("",!0),t.addr.building?(i.openBlock(),i.createElementBlock("span",pS,i.toDisplayString(t.addr.building)+", ",1)):i.createCommentVNode("",!0),t.addr.buildingPart?(i.openBlock(),i.createElementBlock("span",yS,i.toDisplayString(t.addr.buildingPart)+", ",1)):i.createCommentVNode("",!0),t.addr.apartments?(i.openBlock(),i.createElementBlock("span",bS,i.toDisplayString(t.addr.apartments)+", ",1)):i.createCommentVNode("",!0)])]))}}),Ba={clearable:!1,value:"",field:void 0,disabled:!1},wS={},xS=i.defineComponent({...wS,__name:"address-suggestion",props:i.mergeDefaults({disabled:{type:Boolean},value:{},clearable:{type:Boolean},field:{},minTermLength:{},searchDataHandler:{type:Function}},{...Ba,minTermLength:()=>{var t,e;return((e=(t=Y.useBaseConfigStateStore().getConfig())==null?void 0:t.minLength)==null?void 0:e.searchTerm)??3},searchDataHandler:void 0}),emits:["select","update:value"],setup(t,{expose:e,emit:n}){const r=t,o=n,s=i.ref(r.value),a=i.ref(!1),l=i.ref([]),c=i.computed(()=>l.value.map(p=>({label:p[r.field??"addressString"]??"-",value:p.id})));i.watch(()=>r.value,p=>{s.value=p}),i.watch(s,()=>{o("update:value",s.value)});const d=O.debounce(()=>u(),800),u=async()=>{!s.value||s.value.length<r.minTermLength||(a.value=!0,l.value=await(r.searchDataHandler?r.searchDataHandler(s.value,a):Y.HttpRequester.getInstance(Y.DataSuggestionProvider).searchAddresses(s.value)).finally(()=>{a.value=!1}))},h=(p,y)=>{const b=l.value.find(_=>_.id===p.value)||{};return i.h(qh,{addr:b,selected:y},{default:O.constant("-")})},f=p=>{d.cancel();const y=l.value.find(b=>b.id===p)||{};o("select",y)},g=i.ref(null);function m(){g.value.focus()}return e({focus:m}),(p,y)=>{const b=D.NAutoComplete;return i.openBlock(),i.createBlock(b,{ref_key:"autoCompleteElement",ref:g,value:s.value,"onUpdate:value":[y[0]||(y[0]=_=>s.value=_),i.unref(d)],clearable:t.clearable,disabled:t.disabled,loading:a.value,options:c.value,"render-label":h,placeholder:"",onSelect:f},null,8,["value","clearable","disabled","loading","options","onUpdate:value"])}}}),kS={class:"m-0.5 flex flex-col p-0.5"},vS={class:"font-medium"},CS={class:"flex flex-row gap-1 text-xs font-light text-blue-800"},SS={key:0},BS={key:1},TS={},Xh=i.defineComponent({...TS,__name:"bank-suggestion-label",props:{bank:{},selected:{type:Boolean}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",kS,[i.createElementVNode("span",vS,i.toDisplayString(t.bank.name),1),i.createElementVNode("span",CS,[t.bank.bic?(i.openBlock(),i.createElementBlock("span",SS," БИК: "+i.toDisplayString(t.bank.bic),1)):i.createCommentVNode("",!0),t.bank.inn?(i.openBlock(),i.createElementBlock("span",BS," ИНН: "+i.toDisplayString(t.bank.inn),1)):i.createCommentVNode("",!0)])]))}}),NS={},$S=i.defineComponent({...NS,__name:"bank-suggestion",props:i.mergeDefaults({disabled:{type:Boolean},value:{},clearable:{type:Boolean},field:{},minTermLength:{}},{...Ba,minTermLength:()=>{var t,e;return((e=(t=Y.useBaseConfigStateStore().getConfig())==null?void 0:t.minLength)==null?void 0:e.searchTerm)??3}}),emits:["select","update:value"],setup(t,{expose:e,emit:n}){const r=t,o=n,s=i.ref(r.value),a=i.ref(!1),l=i.ref([]),c=i.computed(()=>l.value.map(p=>({label:p[r.field??"_"]??"-",value:p.id})));i.watch(()=>r.value,p=>{s.value=p}),i.watch(s,()=>{o("update:value",s.value)});const d=O.debounce(()=>u(),800),u=async()=>{if(!(!s.value||s.value.length<r.minTermLength)){a.value=!0;try{l.value=await Y.HttpRequester.getInstance(Y.DataSuggestionProvider).searchBank(s.value)}finally{a.value=!1}}},h=(p,y)=>{const b=l.value.find(_=>_.id===p.value)||{};return i.h(Xh,{bank:b,selected:y},{default:O.constant("-")})},f=p=>{d.cancel();const y=l.value.find(b=>b.id===p)||{};o("select",y)},g=i.ref(null);function m(){g.value.focus()}return e({focus:m}),(p,y)=>{const b=D.NAutoComplete;return i.openBlock(),i.createBlock(b,{ref_key:"autoCompleteElement",ref:g,value:s.value,"onUpdate:value":[y[0]||(y[0]=_=>s.value=_),i.unref(d)],clearable:t.clearable,disabled:t.disabled,loading:a.value,options:c.value,"render-label":h,placeholder:"",onSelect:f},null,8,["value","clearable","disabled","loading","options","onUpdate:value"])}}}),RS={class:"font-medium"},ES={key:0,class:"flex flex-row gap-2"},PS={key:0,class:"text-xs font-light text-blue-800"},FS={key:1,class:"text-sc-dark-grey text-xs font-light"},VS={},Yh=i.defineComponent({...VS,__name:"org-suggestion-label",props:{org:{},selected:{type:Boolean}},setup(t){const e=t,n=i.computed(()=>{var o,s;return((s=(o=e.org.rawData)==null?void 0:o.state)==null?void 0:s.liquidationDate)??!1}),r=i.computed(()=>{var o,s;return((s=(o=e.org.rawData)==null?void 0:o.address)==null?void 0:s.value)??""});return(o,s)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(`m-0.5 flex flex-col p-0.5 ${n.value?"line-through":""}`)},[i.createElementVNode("span",RS,i.toDisplayString(t.org.name),1),t.org.inn||r.value?(i.openBlock(),i.createElementBlock("div",ES,[t.org.inn?(i.openBlock(),i.createElementBlock("span",PS,i.toDisplayString(t.org.inn),1)):i.createCommentVNode("",!0),r.value?(i.openBlock(),i.createElementBlock("span",FS,i.toDisplayString(r.value),1)):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)],2))}}),IS={},MS=i.defineComponent({...IS,__name:"org-suggestion",props:i.mergeDefaults({disabled:{type:Boolean},value:{},clearable:{type:Boolean},field:{},minTermLength:{},allowSelectTerminated:{type:Boolean}},{...Ba,minTermLength:()=>{var t,e;return((e=(t=Y.useBaseConfigStateStore().getConfig())==null?void 0:t.minLength)==null?void 0:e.searchTerm)??3}}),emits:["select","update:value"],setup(t,{expose:e,emit:n}){const r=t,o=n,s=i.ref(r.value),a=i.ref(!1),l=i.ref([]),c=y=>{var b,_;return!!(((_=(b=y.rawData)==null?void 0:b.state)==null?void 0:_.liquidationDate)??!1)},d=i.computed(()=>Ft.convertReferencesToSelectOptionsList(l.value,!1,!1,!1,y=>y[r.field??"_"]??"-",y=>!r.allowSelectTerminated&&c(y)));i.watch(()=>r.value,y=>{s.value=y}),i.watch(s,()=>{o("update:value",s.value)});const u=O.debounce(()=>h(),800),h=async()=>{if(!(!s.value||s.value.length<r.minTermLength)){a.value=!0;try{l.value=await Y.HttpRequester.getInstance(Y.DataSuggestionProvider).searchOrganization(s.value)}finally{a.value=!1}}},f=(y,b)=>{const _=l.value.find(S=>S.id===y.value)||{};return i.h(Yh,{org:_,selected:b},{default:O.constant("-")})},g=y=>{u.cancel();const b=l.value.find(_=>_.id===y)||{};(r.allowSelectTerminated||!c(b))&&o("select",b)},m=i.ref(null);function p(){m.value.focus()}return e({focus:p}),(y,b)=>{const _=D.NAutoComplete;return i.openBlock(),i.createBlock(_,{ref_key:"autoCompleteElement",ref:m,value:s.value,"onUpdate:value":[b[0]||(b[0]=S=>s.value=S),i.unref(u)],clearable:t.clearable,disabled:t.disabled,loading:a.value,options:d.value,"render-label":f,placeholder:"",onSelect:g},null,8,["value","clearable","disabled","loading","options","onUpdate:value"])}}}),AS={},OS=i.defineComponent({...AS,__name:"button-with-confirm-action",props:{disabled:{type:Boolean,default:!1},dialogTitle:{default:""},dialogContent:{default:""},disableConfirm:{type:Boolean,default:!1},popoverText:{default:""},type:{default:"default"},size:{default:"small"},quaternary:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},ghost:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},emits:["accept"],setup(t,{emit:e}){const n=t,r=e,o=i.ref(!1),s=()=>{r("accept",()=>{o.value=!1})},a=()=>{n.disableConfirm?s():o.value=!0};return(l,c)=>{const d=D.NButton,u=D.NPopover,h=D.NModal;return i.openBlock(),i.createElementBlock("div",null,[i.createVNode(u,{disabled:t.popoverText.length===0,placement:"bottom"},{trigger:i.withCtx(()=>[i.createVNode(d,{disabled:t.disabled,ghost:t.ghost,loading:t.loading,size:t.size,type:t.type,quaternary:t.quaternary,circle:t.circle,onClick:a},{default:i.withCtx(()=>[i.renderSlot(l.$slots,"default")]),_:3},8,["disabled","ghost","loading","size","type","quaternary","circle"])]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(t.popoverText),1)]),_:3},8,["disabled"]),i.createVNode(h,{show:o.value,"onUpdate:show":c[1]||(c[1]=f=>o.value=f),content:t.dialogContent,closable:!1,"mask-closable":!1,"show-icon":!1,title:t.dialogTitle,"action-class":"",preset:"dialog"},{action:i.withCtx(()=>[i.createVNode(d,{type:"primary",class:"px-8",onClick:s},{default:i.withCtx(()=>[...c[2]||(c[2]=[i.createTextVNode(" Да ",-1)])]),_:1}),i.createVNode(d,{type:"default",onClick:c[0]||(c[0]=f=>o.value=!1)},{default:i.withCtx(()=>[...c[3]||(c[3]=[i.createTextVNode(" Отмена ",-1)])]),_:1})]),_:1},8,["show","content","title"])])}}}),zS={key:0,class:"whitespace-pre-line"},DS={key:1,class:"text-sc-dark-grey"},LS={},HS=i.defineComponent({...LS,__name:"comment-editor",props:{disabled:{type:Boolean,default:!1},comment:{default:""}},emits:["update:comment"],setup(t,{emit:e}){const n=t,r=e,o=i.ref(n.comment);i.watch(()=>o.value,l=>{o.value=l});const s=l=>{r("update:comment",o.value,l)},a=()=>{o.value=n.comment};return(l,c)=>{const d=D.NInput;return i.openBlock(),i.createBlock(Xd,{disabled:t.disabled,"onEditor:apply":s,"onEditor:cancel":a},{viewer:i.withCtx(()=>[i.createElementVNode("div",null,[t.comment?(i.openBlock(),i.createElementBlock("span",zS,i.toDisplayString(t.comment),1)):(i.openBlock(),i.createElementBlock("span",DS," - Комментарий отсутствует - "))])]),editor:i.withCtx(()=>[i.createVNode(d,{value:o.value,"onUpdate:value":c[0]||(c[0]=u=>o.value=u),clearable:!0,type:"textarea"},null,8,["value"])]),_:1},8,["disabled"])}}}),WS={},jS=i.defineComponent({...WS,__name:"debt",props:{debt:{default:0},showLabel:{type:Boolean,default:!1},wrapAsSmall:{type:Boolean,default:!1}},setup(t){const e=t,n=i.computed(()=>{let r="";return(e.showLabel??!1)&&(e.debt>0?r="Переплата: ":e.debt<0&&(r="Задолженность: ")),r});return(r,o)=>t.debt!==0?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass({"text-sm":t.wrapAsSmall})},[i.createTextVNode(i.toDisplayString(n.value)+" ",1),i.createElementVNode("span",{class:i.normalizeClass({"text-green-700":t.debt>0,"text-red-700":t.debt<0})},i.toDisplayString(t.debt)+" ₽ ",3)],2)):i.createCommentVNode("",!0)}}),qS={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function XS(t,e){return i.openBlock(),i.createElementBlock("svg",qS,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M449.07 399.08L278.64 82.58c-12.08-22.44-44.26-22.44-56.35 0L51.87 399.08A32 32 0 0 0 80 446.25h340.89a32 32 0 0 0 28.18-47.17m-198.6-1.83a20 20 0 1 1 20-20a20 20 0 0 1-20 20m21.72-201.15l-5.74 122a16 16 0 0 1-32 0l-5.74-121.95a21.73 21.73 0 0 1 21.5-22.69h.21a21.74 21.74 0 0 1 21.73 22.7Z"},null,-1)])])}const YS=i.markRaw({name:"ion-warning",render:XS}),US={},KS=i.defineComponent({...US,__name:"warning-icon",props:{popoverText:{default:""},iconClass:{default:"text-sc-warning"}},setup(t){return(e,n)=>{const r=YS,o=D.NPopover;return i.openBlock(),i.createBlock(o,{disabled:t.popoverText.length===0,placement:"bottom"},{trigger:i.withCtx(()=>[i.createVNode(r,{class:i.normalizeClass(`ml-0.5 ${t.iconClass}`)},null,8,["class"])]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(t.popoverText),1)]),_:1},8,["disabled"])}}}),kt=class kt{static init(e,n){kt.messagesService&&kt.notificationsService||(kt.messagesService=e,kt.notificationsService=n)}static getMessagesService(){if(!kt.messagesService)throw new Error("UI provider is not initialized.");return kt.messagesService}static getNotificationsService(){if(!kt.notificationsService)throw new Error("UI provider is not initialized.");return kt.notificationsService}static showNotificationsForErrorResponseData(e,n={}){var r,o;if(O.isEmpty(e.errors)){const s=(o=(r=e.rawError)==null?void 0:r.config)==null?void 0:o.url,a=s?` [ ${s} ]`:"";kt.notificationsService?kt.notificationsService.error({title:"Ошибка выполнения/обработки запроса",content:e.message,meta:`#${e.status}${a}: ${e.statusText}`,duration:3e3}):console.log("Show notification error response data: UI provider is not initialized.",e)}else for(const s in e.errors)Object.prototype.hasOwnProperty.call(n,s)?n[s]=new Y.FieldValidationResultData(e.errors[s].toString(),"error"):kt.messagesService?kt.messagesService.error(e.errors[s].toString()):console.log("Show notification error response data: UI provider is not initialized.",e.errors[s])}};B(kt,"messagesService"),B(kt,"notificationsService");let Ta=kt;const GS=i.computed(()=>Y.useReferencesStore().deliveryTypeReference??[]),ZS=i.computed(()=>Y.useReferencesStore().managersList??[]),QS=i.computed(()=>Y.useReferencesStore().opfReference??[]),JS=i.computed(()=>Y.useReferencesStore().partnerGroupsReference??[]),eB=i.computed(()=>Y.useReferencesStore().priceCoefficientsReference??[]),tB=i.computed(()=>Y.useReferencesStore().productFilesTypesReference??[]),nB=i.computed(()=>Y.useReferencesStore().resourceTypesReference),iB=i.computed(()=>Y.useReferencesStore().salesDirectionsReference??[]),rB=i.computed(()=>Y.useReferencesStore().warehousesReference??[]),oB=i.computed(()=>Y.useReferencesStore().paymentTypeReference??[]),sB=i.computed(()=>Y.useReferencesStore().orderStatusReference??[]),aB=i.computed(()=>Y.useReferencesStore().operatorReference??[]),lB=i.computed(()=>Ft.convertReferencesToSelectOptionsList(Y.useReferencesStore().channelPrimaryInterestsReference??[],!0,!1,!0)),cB=i.computed(()=>Ft.convertReferencesToSelectOptionsList(Y.useReferencesStore().sourcePrimaryInterestsReference??[],!0,!1,!0)),dB=t=>Y.HttpRequester.getInstance(Y.ReferenceDataProvider).searchCity(t),uB=t=>Ft.convertReferencesToSelectOptionsList(t,!0,!1,!1,e=>{var n,r,o;return e!=null&&e.isNewRec()?"-":`${e.name}, ${(n=e==null?void 0:e.region)==null?void 0:n.name}, ${(o=(r=e==null?void 0:e.region)==null?void 0:r.country)==null?void 0:o.name}`},e=>e==null?void 0:e.isNewRec()),hB=t=>Y.HttpRequester.getInstance(Y.ClientDataProvider).searchClient(t),fB=t=>Ft.convertReferencesToSelectOptionsList(t,!0,!1,!1,e=>e.isNewRec()?"-":[e.name,e.salesDirection.name?`(${e.salesDirection.name})`:void 0,e.city.name?`г. ${e.city.name}${e.city.region.name?`, ${e.city.region.name}`:""}`:void 0,e.isActive?void 0:"[ Деактивирован ]"].filter(Boolean).join(" "),e=>e==null?void 0:e.isNewRec());j.AddProductToCartDialog=Fb,j.CommonValidators=Jh,j.ConfiguratorSettingsKozyrek=bd,j.ConfiguratorSettingsMosquito=D_,j.ContentHelper=ai,j.DateValidators=ef,j.KozyrekLine=_n,j.KozyrekTailTemplate=zs,j.KozyrekTemplate=Ki,j.NumericValidators=ae,j.OrdersTableFields=Pe,j.Point=Os,j.ScAddressSuggestion=xS,j.ScAddressSuggestionLabel=qh,j.ScBankSuggestion=$S,j.ScBankSuggestionLabel=Xh,j.ScBaseDialog=Dd,j.ScButtonWithConfirmAction=OS,j.ScCategoryCollapse=Od,j.ScClientNameWithShortInfo=yr,j.ScCollapse=Ad,j.ScCollapseItem=Ga,j.ScCommentEditor=HS,j.ScConfiguratorsProductInfo=dr,j.ScContragentWithShortInfo=Ld,j.ScCreatorUserTypeTag=Ca,j.ScCuratorSelect=oS,j.ScDateRange=X_,j.ScDateTimeLabel=go,j.ScDebouncedInput=_1,j.ScDebouncedInputNumber=x1,j.ScDebt=jS,j.ScDialogHeader=e1,j.ScDynamicConfigurator=Vd,j.ScEmail=Kb,j.ScExternalLink=E1,j.ScImageGallery=tl,j.ScInlineEditableItem=Xd,j.ScInlineView=Ls,j.ScKozyrekConfigurator=_d,j.ScKozyrekConfiguratorParamsForm=il,j.ScKozyrekConfiguratorPreview=yd,j.ScKozyrekConfiguratorTemplates=pd,j.ScLightGallery=el,j.ScManagerSelect=aS,j.ScMetalForDoorsConfigurator=Nd,j.ScMetalForDoorsConfiguratorForm=Td,j.ScMosquitoConfigurator=kd,j.ScMosquitoConfiguratorForm=wd,j.ScMosquitoConfiguratorMeasurementInstructions=xd,j.ScMosquitoConfiguratorPreview=Ds,j.ScOrderCommonInfo=Ah,j.ScOrderDeliveryLabel=Mo,j.ScOrderDetails=Lh,j.ScOrderInfo=Hh,j.ScOrderItemParams=Mh,j.ScOrderItemsList=zh,j.ScOrderPayment=va,j.ScOrderProductInfo=Oh,j.ScOrderStatusHistory=Dh,j.ScOrdersList=AC,j.ScOrgSuggestion=MS,j.ScOrgSuggestionLabel=Yh,j.ScPage=Wh,j.ScPageWithSlidingPanel=iS,j.ScPersonContactsBlock=z_,j.ScPhone=__,j.ScPhoneInput=C1,j.ScProductName=cr,j.ScProductsList=o2,j.ScReferenceSelect=zd,j.ScSandwichConfigurator=Ed,j.ScSandwichConfiguratorForm=Rd,j.ScSandwichM2Configurator=Fd,j.ScSandwichM2ConfiguratorForm=Pd,j.ScSearchableProductSelect=Ih,j.ScSearchableReferenceSelect=Vh,j.ScSetClientPriceFormItem=Tb,j.ScShortTextOrderInfo=LC,j.ScSingleFileUploadSelector=o1,j.ScSlidingContentWithDrawer=jh,j.ScStripConfigurator=Bd,j.ScStripConfiguratorForm=Cd,j.ScStripConfiguratorLineItem=vd,j.ScStripConfiguratorPreview=Sd,j.ScUserShortInfo=Sa,j.ScWarningIcon=KS,j.SelectOptionHelper=Ft,j.UiNotificationProvider=Ta,j.Validators=We,j.WindowResolutionEnum=Qe,j.WindowResolutionProvider=Ct,j.channelPrimaryInterestOptionsList=lB,j.componentSizeInjectionKey=ar,j.deliveryTypeReferenceList=GS,j.handleFloatInput=Oi,j.handleIntegerInput=nt,j.isCanSandwichM2Show=L_,j.isCanSandwichShow=Md,j.isConfiguratorType=Id,j.managersReferenceList=ZS,j.naiveUiTheme=Lf,j.operatorReferenceList=aB,j.opfReferenceList=QS,j.orderStatusReferenceList=sB,j.parse=et,j.partnerGroupReferenceList=JS,j.paymentTypeReferenceList=oB,j.priceCoefficientsReferenceList=eB,j.productFilesTypesReferenceList=tB,j.renderConfig=je,j.resetInputValidation=tt,j.resourceReferencesList=nB,j.salesDirectionsReferenceList=iB,j.searchCityReferenceDataHandler=dB,j.searchCityReferenceLabelRenderer=uB,j.searchClientReferenceDataHandler=hB,j.searchClientReferenceLabelRenderer=fB,j.selectAllTextOnFocus=Me,j.sourcePrimaryInterestOptionsList=cB,j.warehousesReferenceList=rB,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"})}));
822
+ `,[$h({originalTransition:"background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)"})])]);function Io(t){return t.type==="group"}function Fh(t){return t.type==="ignored"}function ka(t,e){try{return!!(1+e.toString().toLowerCase().indexOf(t.trim().toLowerCase()))}catch{return!1}}function qv(t,e){return{getIsGroup:Io,getIgnored:Fh,getKey(r){return Io(r)?r.name||r.key||"key-required":r[t]},getChildren(r){return r[e]}}}function Xv(t,e,n,r){if(!e)return t;function o(s){if(!Array.isArray(s))return[];const a=[];for(const l of s)if(Io(l)){const c=o(l[r]);c.length&&a.push(Object.assign({},l,{[r]:c}))}else{if(Fh(l))continue;e(n,l)&&a.push(l)}return a}return o(t)}function Yv(t,e,n){const r=new Map;return t.forEach(o=>{Io(o)?o[n].forEach(s=>{r.set(s[e],s)}):r.set(o[e],o)}),r}var Uv={};const Kv=Object.assign(Object.assign({},_t.props),{to:Pn.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,clearFilterAfterSelect:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},defaultValue:{type:[String,Number,Array],default:null},keyboard:{type:Boolean,default:!0},value:[String,Number,Array],placeholder:String,menuProps:Object,multiple:Boolean,size:String,menuSize:{type:String},filterable:Boolean,disabled:{type:Boolean,default:void 0},remote:Boolean,loading:Boolean,filter:Function,placement:{type:String,default:"bottom-start"},widthMode:{type:String,default:"trigger"},tag:Boolean,onCreate:Function,fallbackOption:{type:[Function,Boolean],default:void 0},show:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:!0},maxTagCount:[Number,String],ellipsisTagPopoverProps:Object,consistentMenuWidth:{type:Boolean,default:!0},virtualScroll:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},childrenField:{type:String,default:"children"},renderLabel:Function,renderOption:Function,renderTag:Function,"onUpdate:value":[Function,Array],inputProps:Object,nodeProps:Function,ignoreComposition:{type:Boolean,default:!0},showOnFocus:Boolean,onUpdateValue:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onFocus:[Function,Array],onScroll:[Function,Array],onSearch:[Function,Array],onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],displayDirective:{type:String,default:"show"},resetMenuOnOptionsChange:{type:Boolean,default:!0},status:String,showCheckmark:{type:Boolean,default:!0},onChange:[Function,Array],items:Array}),Gv=i.defineComponent({name:"Select",props:Kv,slots:Object,setup(t){Uv.NODE_ENV!=="production"&&i.watchEffect(()=>{t.items!==void 0&&ei("select","`items` is deprecated, please use `options` instead."),t.onChange!==void 0&&ei("select","`on-change` is deprecated, please use `on-update:value` instead.")});const{mergedClsPrefixRef:e,mergedBorderedRef:n,namespaceRef:r,inlineThemeDisabled:o}=vi(t),s=_t("Select","-select",jv,Wv,t,e),a=i.ref(t.defaultValue),l=i.toRef(t,"value"),c=Gs(l,a),d=i.ref(!1),u=i.ref(""),h=su(t,["items","options"]),f=i.ref([]),g=i.ref([]),m=i.computed(()=>g.value.concat(f.value).concat(h.value)),p=i.computed(()=>{const{filter:M}=t;if(M)return M;const{labelField:U,valueField:se}=t;return(ue,he)=>{if(!he)return!1;const _e=he[U];if(typeof _e=="string")return ka(ue,_e);const ve=he[se];return typeof ve=="string"?ka(ue,ve):typeof ve=="number"?ka(ue,String(ve)):!1}}),y=i.computed(()=>{if(t.remote)return h.value;{const{value:M}=m,{value:U}=u;return!U.length||!t.filterable?M:Xv(M,p.value,U,t.childrenField)}}),b=i.computed(()=>{const{valueField:M,childrenField:U}=t,se=qv(M,U);return kw(y.value,se)}),_=i.computed(()=>Yv(m.value,t.valueField,t.childrenField)),S=i.ref(!1),k=Gs(i.toRef(t,"show"),S),R=i.ref(null),$=i.ref(null),x=i.ref(null),{localeRef:C}=mh("Select"),w=i.computed(()=>{var M;return(M=t.placeholder)!==null&&M!==void 0?M:C.value.placeholder}),T=[],N=i.ref(new Map),A=i.computed(()=>{const{fallbackOption:M}=t;if(M===void 0){const{labelField:U,valueField:se}=t;return ue=>({[U]:String(ue),[se]:ue})}return M===!1?!1:U=>Object.assign(M(U),{value:U})});function I(M){const U=t.remote,{value:se}=N,{value:ue}=_,{value:he}=A,_e=[];return M.forEach(ve=>{if(ue.has(ve))_e.push(ue.get(ve));else if(U&&se.has(ve))_e.push(se.get(ve));else if(he){const Se=he(ve);Se&&_e.push(Se)}}),_e}const z=i.computed(()=>{if(t.multiple){const{value:M}=c;return Array.isArray(M)?I(M):[]}return null}),L=i.computed(()=>{const{value:M}=c;return!t.multiple&&!Array.isArray(M)?M===null?null:I([M])[0]||null:null}),ee=tk(t),{mergedSizeRef:ne,mergedDisabledRef:P,mergedStatusRef:E}=ee;function W(M,U){const{onChange:se,"onUpdate:value":ue,onUpdateValue:he}=t,{nTriggerFormChange:_e,nTriggerFormInput:ve}=ee;se&&bt(se,M,U),he&&bt(he,M,U),ue&&bt(ue,M,U),a.value=M,_e(),ve()}function X(M){const{onBlur:U}=t,{nTriggerFormBlur:se}=ee;U&&bt(U,M),se()}function H(){const{onClear:M}=t;M&&bt(M)}function q(M){const{onFocus:U,showOnFocus:se}=t,{nTriggerFormFocus:ue}=ee;U&&bt(U,M),ue(),se&&Q()}function F(M){const{onSearch:U}=t;U&&bt(U,M)}function V(M){const{onScroll:U}=t;U&&bt(U,M)}function K(){var M;const{remote:U,multiple:se}=t;if(U){const{value:ue}=N;if(se){const{valueField:he}=t;(M=z.value)===null||M===void 0||M.forEach(_e=>{ue.set(_e[he],_e)})}else{const he=L.value;he&&ue.set(he[t.valueField],he)}}}function ie(M){const{onUpdateShow:U,"onUpdate:show":se}=t;U&&bt(U,M),se&&bt(se,M),S.value=M}function Q(){P.value||(ie(!0),S.value=!0,t.filterable&&ii())}function be(){ie(!1)}function Ve(){u.value="",g.value=T}const xe=i.ref(!1);function pe(){t.filterable&&(xe.value=!0)}function Te(){t.filterable&&(xe.value=!1,k.value||Ve())}function Ne(){P.value||(k.value?t.filterable?ii():be():Q())}function sn(M){var U,se;!((se=(U=x.value)===null||U===void 0?void 0:U.selfRef)===null||se===void 0)&&se.contains(M.relatedTarget)||(d.value=!1,X(M),be())}function Et(M){q(M),d.value=!0}function Ht(){d.value=!0}function an(M){var U;!((U=R.value)===null||U===void 0)&&U.$el.contains(M.relatedTarget)||(d.value=!1,X(M),be())}function vt(){var M;(M=R.value)===null||M===void 0||M.focus(),be()}function Ln(M){var U;k.value&&(!((U=R.value)===null||U===void 0)&&U.$el.contains(_r(M))||be())}function ln(M){if(!Array.isArray(M))return[];if(A.value)return Array.from(M);{const{remote:U}=t,{value:se}=_;if(U){const{value:ue}=N;return M.filter(he=>se.has(he)||ue.has(he))}else return M.filter(ue=>se.has(ue))}}function Qt(M){Ie(M.rawNode)}function Ie(M){if(P.value)return;const{tag:U,remote:se,clearFilterAfterSelect:ue,valueField:he}=t;if(U&&!se){const{value:_e}=g,ve=_e[0]||null;if(ve){const Se=f.value;Se.length?Se.push(ve):f.value=[ve],g.value=T}}if(se&&N.value.set(M[he],M),t.multiple){const _e=ln(c.value),ve=_e.findIndex(Se=>Se===M[he]);if(~ve){if(_e.splice(ve,1),U&&!se){const Se=Z(M[he]);~Se&&(f.value.splice(Se,1),ue&&(u.value=""))}}else _e.push(M[he]),ue&&(u.value="");W(_e,I(_e))}else{if(U&&!se){const _e=Z(M[he]);~_e?f.value=[f.value[_e]]:f.value=T}nr(),be(),W(M[he],M)}}function Z(M){return f.value.findIndex(se=>se[t.valueField]===M)}function le(M){k.value||Q();const{value:U}=M.target;u.value=U;const{tag:se,remote:ue}=t;if(F(U),se&&!ue){if(!U){g.value=T;return}const{onCreate:he}=t,_e=he?he(U):{[t.labelField]:U,[t.valueField]:U},{valueField:ve,labelField:Se}=t;h.value.some(Ze=>Ze[ve]===_e[ve]||Ze[Se]===_e[Se])||f.value.some(Ze=>Ze[ve]===_e[ve]||Ze[Se]===_e[Se])?g.value=T:g.value=[_e]}}function He(M){M.stopPropagation();const{multiple:U}=t;!U&&t.filterable&&be(),H(),U?W([],[]):W(null,null)}function ni(M){!br(M,"action")&&!br(M,"empty")&&!br(M,"header")&&M.preventDefault()}function it(M){V(M)}function Wt(M){var U,se,ue,he,_e;if(!t.keyboard){M.preventDefault();return}switch(M.key){case" ":if(t.filterable)break;M.preventDefault();case"Enter":if(!(!((U=R.value)===null||U===void 0)&&U.isComposing)){if(k.value){const ve=(se=x.value)===null||se===void 0?void 0:se.getPendingTmNode();ve?Qt(ve):t.filterable||(be(),nr())}else if(Q(),t.tag&&xe.value){const ve=g.value[0];if(ve){const Se=ve[t.valueField],{value:Ze}=c;t.multiple&&Array.isArray(Ze)&&Ze.includes(Se)||Ie(ve)}}}M.preventDefault();break;case"ArrowUp":if(M.preventDefault(),t.loading)return;k.value&&((ue=x.value)===null||ue===void 0||ue.prev());break;case"ArrowDown":if(M.preventDefault(),t.loading)return;k.value?(he=x.value)===null||he===void 0||he.next():Q();break;case"Escape":k.value&&(Zx(M),be()),(_e=R.value)===null||_e===void 0||_e.focus();break}}function nr(){var M;(M=R.value)===null||M===void 0||M.focus()}function ii(){var M;(M=R.value)===null||M===void 0||M.focusInput()}function $i(){var M;k.value&&((M=$.value)===null||M===void 0||M.syncPosition())}K(),i.watch(i.toRef(t,"options"),K);const ir={focus:()=>{var M;(M=R.value)===null||M===void 0||M.focus()},focusInput:()=>{var M;(M=R.value)===null||M===void 0||M.focusInput()},blur:()=>{var M;(M=R.value)===null||M===void 0||M.blur()},blurInput:()=>{var M;(M=R.value)===null||M===void 0||M.blurInput()}},cn=i.computed(()=>{const{self:{menuBoxShadow:M}}=s.value;return{"--n-menu-box-shadow":M}}),Hn=o?Ci("select",void 0,cn,t):void 0;return Object.assign(Object.assign({},ir),{mergedStatus:E,mergedClsPrefix:e,mergedBordered:n,namespace:r,treeMate:b,isMounted:ko(),triggerRef:R,menuRef:x,pattern:u,uncontrolledShow:S,mergedShow:k,adjustedTo:Pn(t),uncontrolledValue:a,mergedValue:c,followerRef:$,localizedPlaceholder:w,selectedOption:L,selectedOptions:z,mergedSize:ne,mergedDisabled:P,focused:d,activeWithoutMenuOpen:xe,inlineThemeDisabled:o,onTriggerInputFocus:pe,onTriggerInputBlur:Te,handleTriggerOrMenuResize:$i,handleMenuFocus:Ht,handleMenuBlur:an,handleMenuTabOut:vt,handleTriggerClick:Ne,handleToggle:Qt,handleDeleteOption:Ie,handlePatternInput:le,handleClear:He,handleTriggerBlur:sn,handleTriggerFocus:Et,handleKeydown:Wt,handleMenuAfterLeave:Ve,handleMenuClickOutside:Ln,handleMenuScroll:it,handleMenuKeydown:Wt,handleMenuMousedown:ni,mergedTheme:s,cssVars:o?void 0:cn,themeClass:Hn==null?void 0:Hn.themeClass,onRender:Hn==null?void 0:Hn.onRender})},render(){return i.h("div",{class:`${this.mergedClsPrefix}-select`},i.h(du,null,{default:()=>[i.h(uu,null,{default:()=>i.h(Lv,{ref:"triggerRef",inlineThemeDisabled:this.inlineThemeDisabled,status:this.mergedStatus,inputProps:this.inputProps,clsPrefix:this.mergedClsPrefix,showArrow:this.showArrow,maxTagCount:this.maxTagCount,ellipsisTagPopoverProps:this.ellipsisTagPopoverProps,bordered:this.mergedBordered,active:this.activeWithoutMenuOpen||this.mergedShow,pattern:this.pattern,placeholder:this.localizedPlaceholder,selectedOption:this.selectedOption,selectedOptions:this.selectedOptions,multiple:this.multiple,renderTag:this.renderTag,renderLabel:this.renderLabel,filterable:this.filterable,clearable:this.clearable,disabled:this.mergedDisabled,size:this.mergedSize,theme:this.mergedTheme.peers.InternalSelection,labelField:this.labelField,valueField:this.valueField,themeOverrides:this.mergedTheme.peerOverrides.InternalSelection,loading:this.loading,focused:this.focused,onClick:this.handleTriggerClick,onDeleteOption:this.handleDeleteOption,onPatternInput:this.handlePatternInput,onClear:this.handleClear,onBlur:this.handleTriggerBlur,onFocus:this.handleTriggerFocus,onKeydown:this.handleKeydown,onPatternBlur:this.onTriggerInputBlur,onPatternFocus:this.onTriggerInputFocus,onResize:this.handleTriggerOrMenuResize,ignoreComposition:this.ignoreComposition},{arrow:()=>{var t,e;return[(e=(t=this.$slots).arrow)===null||e===void 0?void 0:e.call(t)]}})}),i.h(Bu,{ref:"followerRef",show:this.mergedShow,to:this.adjustedTo,teleportDisabled:this.adjustedTo===Pn.tdkey,containerClass:this.namespace,width:this.consistentMenuWidth?"target":void 0,minWidth:"target",placement:this.placement},{default:()=>i.h(i.Transition,{name:"fade-in-scale-up-transition",appear:this.isMounted,onAfterLeave:this.handleMenuAfterLeave},{default:()=>{var t,e,n;return this.mergedShow||this.displayDirective==="show"?((t=this.onRender)===null||t===void 0||t.call(this),i.withDirectives(i.h(pv,Object.assign({},this.menuProps,{ref:"menuRef",onResize:this.handleTriggerOrMenuResize,inlineThemeDisabled:this.inlineThemeDisabled,virtualScroll:this.consistentMenuWidth&&this.virtualScroll,class:[`${this.mergedClsPrefix}-select-menu`,this.themeClass,(e=this.menuProps)===null||e===void 0?void 0:e.class],clsPrefix:this.mergedClsPrefix,focusable:!0,labelField:this.labelField,valueField:this.valueField,autoPending:!0,nodeProps:this.nodeProps,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,treeMate:this.treeMate,multiple:this.multiple,size:this.menuSize,renderOption:this.renderOption,renderLabel:this.renderLabel,value:this.mergedValue,style:[(n=this.menuProps)===null||n===void 0?void 0:n.style,this.cssVars],onToggle:this.handleToggle,onScroll:this.handleMenuScroll,onFocus:this.handleMenuFocus,onBlur:this.handleMenuBlur,onKeydown:this.handleMenuKeydown,onTabOut:this.handleMenuTabOut,onMousedown:this.handleMenuMousedown,show:this.mergedShow,showCheckmark:this.showCheckmark,resetMenuOnOptionsChange:this.resetMenuOnOptionsChange}),{empty:()=>{var r,o;return[(o=(r=this.$slots).empty)===null||o===void 0?void 0:o.call(r)]},header:()=>{var r,o;return[(o=(r=this.$slots).header)===null||o===void 0?void 0:o.call(r)]},action:()=>{var r,o;return[(o=(r=this.$slots).action)===null||o===void 0?void 0:o.call(r)]}}),this.displayDirective==="show"?[[i.vShow,this.mergedShow],[xo,this.handleMenuClickOutside,void 0,{capture:!0}]]:[[xo,this.handleMenuClickOutside,void 0,{capture:!0}]])):null}})})]}))}}),Zv={},Vh=i.defineComponent({...Zv,__name:"searchable-reference-select",props:{searchDataHandler:{},optionsListConverter:{},renderLabel:{},renderTag:{},value:{},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},minTermLength:{default:()=>{var t,e;return((e=(t=Y.useBaseConfigStateStore().getConfig())==null?void 0:t.minLength)==null?void 0:e.searchTerm)??3}},consistentMenuWidth:{type:Boolean,default:!1},wrapContent:{type:Boolean,default:!1},placeholder:{default:""}},emits:["update:value"],setup(t,{expose:e,emit:n}){const r=t,o=n,s=i.computed(()=>O.isArray(r.value)),a=i.computed(()=>s.value?r.value.map(_=>_.id):r.value?r.value.id:null),l=i.ref(s.value?r.optionsListConverter(r.value):r.value?r.optionsListConverter([r.value]):[]),c=i.computed(()=>l.value.map(_=>({..._,class:r.wrapContent?`${_.class} consistent-menu-width`:_.class}))),d=i.ref(!1),u=i.useTemplateRef("select-component"),h=_=>{_.length<r.minTermLength||(d.value=!0,r.searchDataHandler(_,d).then(S=>{if(O.isEmpty(S))return;const k=s.value?r.value:r.value?[r.value]:[],R=S.filter($=>!k.some(x=>x.id===$.id));l.value=r.optionsListConverter([...k,...R])}).finally(()=>{d.value=!1}))};let f="";const g=O.debounce(()=>h(f),800),m=_=>{f=_,g()},p=_=>{var S;if(O.isArray(_)){const k=_.length>0?_.map(R=>{var $;return i.toRaw(($=l.value.find(x=>x.value===R))==null?void 0:$.item)}):[];o("update:value",k)}else if(_>0){const k=i.toRaw((S=l.value.find(R=>R.value===_))==null?void 0:S.item);o("update:value",k)}else o("update:value",null)};return e({focus:()=>{var _;return(_=u.value)==null?void 0:_.focusInput()},blur:()=>{var _;return(_=u.value)==null?void 0:_.blurInput()}}),(_,S)=>(i.openBlock(),i.createBlock(i.unref(Gv),{ref:"select-component","clear-filter-after-select":!0,clearable:t.clearable,"consistent-menu-width":t.consistentMenuWidth,disabled:t.disabled,filterable:!0,loading:d.value,multiple:s.value,options:c.value,placeholder:t.placeholder,remote:!0,value:a.value,"render-label":t.renderLabel,"render-tag":t.renderTag,onSearch:m,"onUpdate:value":p},null,8,["clearable","consistent-menu-width","disabled","loading","multiple","options","placeholder","value","render-label","render-tag"]))}}),Qv={},Ih=i.defineComponent({...Qv,__name:"searchable-product-select",props:{renderLabel:{},renderTag:{},value:{},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},minTermLength:{default:()=>{var t,e;return((e=(t=Y.useBaseConfigStateStore().getConfig())==null?void 0:t.minLength)==null?void 0:e.searchTerm)??3}},consistentMenuWidth:{type:Boolean,default:!1},wrapContent:{type:Boolean,default:!1},placeholder:{default:""},searchType:{}},emits:["update:value"],setup(t,{expose:e,emit:n}){const r=t,o=n,s=i.useTemplateRef("select-component"),a=async h=>r.searchType==="categories"?Y.HttpRequester.getInstance(Y.ProductCategoryDataProvider).publicSimpleSearch(h):r.searchType==="products"?Y.HttpRequester.getInstance(Y.ProductDataProvider).publicSimpleSearch(h):new Promise(f=>{f([])}),l=h=>r.searchType==="categories"?Ft.convertReferencesToSelectOptionsList(h,!0,!1,!1,f=>f!=null&&f.isNewRec()?"-":f.name):r.searchType==="products"?Ft.convertReferencesToSelectOptionsList(h,!0,!1,!1,f=>f!=null&&f.isNewRec()?"-":`[${f.code}] ${f.name}`):[],c=(h,f)=>{if(r.renderLabel)return r.renderLabel(h,f);if(r.searchType==="products"){const g=h.item;return i.h("div",{},[i.h("span",{class:"text-sc-grey mr-2.5"},g.code),i.h("span",{},[g.name])])}if(r.searchType==="categories"){const g=h.item;return i.h("div",{},[g.name])}};return e({focus:()=>{var h;return(h=s.value)==null?void 0:h.focus()},blur:()=>{var h;return(h=s.value)==null?void 0:h.blur()}}),(h,f)=>(i.openBlock(),i.createBlock(Vh,{ref:"select-component",value:t.value,clearable:t.clearable,disabled:t.disabled,placeholder:t.placeholder,"search-data-handler":a,"options-list-converter":l,"consistent-menu-width":t.consistentMenuWidth,"wrap-content":t.wrapContent,"min-term-length":t.minTermLength,"render-label":c,"render-tag":t.renderTag,"onUpdate:value":f[0]||(f[0]=g=>o("update:value",g))},null,8,["value","clearable","disabled","placeholder","consistent-menu-width","wrap-content","min-term-length","render-tag"]))}}),Jv={class:"col-span-2 flex flex-row gap-2.5"},e2={class:"flex-1"},t2={class:"text-sc-grey"},n2={class:"ml-2.5"},i2={key:0,class:"flex-none"},r2={},o2=i.defineComponent({...r2,__name:"products-list",props:{value:{},searchType:{},minTermLength:{default:()=>{var t,e;return((e=(t=Y.useBaseConfigStateStore().getConfig())==null?void 0:t.minLength)==null?void 0:e.searchTerm)??3}},disabled:{type:Boolean}},emits:["update:value"],setup(t,{emit:e}){const n=t,r=e,o=i.ref(null),s=()=>structuredClone(i.toRaw(n.value)),a=i.ref(s()),l=()=>{r("update:value",a.value.map(h=>i.toRaw(h)))},c=h=>{h&&(a.value=[...a.value.map(f=>i.toRaw(f)),...(O.isArray(h)?h:[h]).filter(f=>!a.value.some(g=>g.id===f.id))],i.nextTick(()=>{o.value=null}),l())},d=h=>{h&&(a.value=a.value.map(f=>f.id===h.id?h:i.toRaw(f)),l())},u=h=>{a.value=a.value.filter(f=>f.id!==h.id),l()};return i.watch(()=>n.value,()=>{a.value=s()}),(h,f)=>{const g=D.NListItem,m=V1,p=D.NButton,y=D.NList;return i.openBlock(),i.createBlock(y,{"show-divider":!1,hoverable:!0},{header:i.withCtx(()=>[i.renderSlot(h.$slots,"header")]),footer:i.withCtx(()=>[i.createVNode(Ih,{value:o.value,"onUpdate:value":[f[0]||(f[0]=b=>o.value=b),c],clearable:!0,disabled:t.disabled,"min-term-length":t.minTermLength,"search-type":t.searchType,placeholder:"Введите название"},null,8,["value","disabled","min-term-length","search-type"])]),default:i.withCtx(()=>[a.value.length===0?(i.openBlock(),i.createBlock(g,{key:0,class:"text-center text-sm text-gray-600"},{default:i.withCtx(()=>[...f[1]||(f[1]=[i.createTextVNode(" --- Список пуст --- ",-1)])]),_:1})):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value,b=>(i.openBlock(),i.createBlock(g,{key:b.id},{suffix:i.withCtx(()=>[i.createVNode(p,{disabled:t.disabled,quaternary:"",type:"error",onClick:_=>u(b)},{default:i.withCtx(()=>[i.createVNode(m)]),_:1},8,["disabled","onClick"])]),default:i.withCtx(()=>[i.createElementVNode("div",Jv,[i.createElementVNode("span",e2,[i.createElementVNode("span",t2,i.toDisplayString(b.code),1),i.createElementVNode("span",n2,i.toDisplayString(b.name),1)]),h.$slots["item-extra"]?(i.openBlock(),i.createElementBlock("div",i2,[i.renderSlot(h.$slots,"item-extra",{item:b,updateItemCallback:d})])):i.createCommentVNode("",!0)])]),_:2},1024))),128))]),_:3})}}}),s2={class:"flex flex-col gap-0.5"},a2={class:"flex gap-0.5"},l2={key:0,class:"text-base basis-1/2 shrink-0 flex flex-col gap-0.5 text-nowrap"},c2={class:"font-medium"},d2={key:0},u2={class:"font-medium"},h2={class:"font-medium"},f2={class:"font-medium"},m2={class:"font-medium"},g2={class:"font-medium"},p2={class:"font-medium"},y2={class:"font-medium"},b2={class:"font-medium"},_2={class:"font-medium"},w2={key:1,class:"flex flex-col gap-1.5 grow"},x2={key:0,class:"flex flex-wrap items-center gap-1"},k2={key:1,class:"flex flex-col gap-0.5"},v2={class:"text-nowrap text-base"},C2={key:0,class:"text-nowrap text-base"},S2={},Mh=i.defineComponent({...S2,__name:"order-item-params",props:{item:{},eventEmitter:{default:void 0},allowEdit:{type:Boolean,default:!1}},setup(t){const e=[Y.ConfiguratorsEnum.Kozyrek,Y.ConfiguratorsEnum.Mosquitto,Y.ConfiguratorsEnum.Strip,Y.ConfiguratorsEnum.MetalForDoors,Y.ConfiguratorsEnum.Sandwich,Y.ConfiguratorsEnum.SandwichM2],n=t,r=i.ref(!1),o=i.ref({quantity:n.item.quantity,length:n.item.length});i.watch(()=>n.item,c=>{o.value={quantity:c.quantity,length:c.length}});const s=c=>{var d;c!==null&&(o.value.length=c,(d=n.eventEmitter)==null||d.emit("order-item:edit-length",{item:n.item,length:c,loaderRef:r}))},a=c=>{var d;c!==null&&(o.value.quantity=c,(d=n.eventEmitter)==null||d.emit("order-item:edit-quantity",{item:n.item,quantity:c,loaderRef:r}))},l=()=>{var c;(c=n.eventEmitter)==null||c.emit("order-item:open-configurator",{item:n.item})};return(c,d)=>{const u=D.NInputNumber;return i.openBlock(),i.createElementBlock("div",s2,[i.createElementVNode("div",a2,[t.item.configurator&&t.item.configuratorParams&&e.includes(t.item.configurator)?(i.openBlock(),i.createElementBlock("div",l2,[i.createElementVNode("span",null,[d[3]||(d[3]=i.createTextVNode(" Количество ",-1)),i.createElementVNode("span",c2,i.toDisplayString(t.item.quantity)+" шт.",1)]),t.item.configurator==="kozyrek"?(i.openBlock(),i.createElementBlock("span",d2,[d[4]||(d[4]=i.createTextVNode(" Длина: ",-1)),i.createElementVNode("span",u2,i.toDisplayString(Math.round(t.item.length*1e3))+" мм.",1)])):i.createCommentVNode("",!0),t.item.configurator==="mosquitto"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createElementVNode("span",null,[d[5]||(d[5]=i.createTextVNode(" Ширина: ",-1)),i.createElementVNode("span",h2,i.toDisplayString(Math.round(t.item.width*1e3))+" мм.",1)]),i.createElementVNode("span",null,[d[6]||(d[6]=i.createTextVNode(" Высота: ",-1)),i.createElementVNode("span",f2,i.toDisplayString(Math.round(t.item.height*1e3))+" мм.",1)])],64)):i.createCommentVNode("",!0),t.item.configurator==="strip"?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:2},i.renderList(t.item.configuratorParams.linesWidths,(h,f)=>(i.openBlock(),i.createElementBlock("span",{key:f},[i.createTextVNode(" Полоса №"+i.toDisplayString(Number(f)+1)+": ",1),i.createElementVNode("span",m2,i.toDisplayString(h)+" мм.",1)]))),128)):i.createCommentVNode("",!0),t.item.configurator==="metal_for_doors"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:3},[i.createElementVNode("span",null,[d[7]||(d[7]=i.createTextVNode(" Ширина: ",-1)),i.createElementVNode("span",g2,i.toDisplayString(t.item.width)+" мм.",1)]),i.createElementVNode("span",null,[d[8]||(d[8]=i.createTextVNode(" Длина: ",-1)),i.createElementVNode("span",p2,i.toDisplayString(Math.round(t.item.length*1e3))+" мм.",1)])],64)):i.createCommentVNode("",!0),t.item.configurator==="sandwich"?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:4},i.renderList(t.item.configuratorParams.items??[],(h,f)=>(i.openBlock(),i.createElementBlock("span",{key:f},[i.createTextVNode(" Изделие №"+i.toDisplayString(Number(f)+1)+": ",1),i.createElementVNode("span",y2,i.toDisplayString(h.width)+"×"+i.toDisplayString(h.length)+" мм, "+i.toDisplayString(h.count)+" шт.",1)]))),128)):i.createCommentVNode("",!0),t.item.configurator==="sandwich_m2"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:5},[i.createElementVNode("span",null,[d[9]||(d[9]=i.createTextVNode(" Ширина: ",-1)),i.createElementVNode("span",b2,i.toDisplayString(Math.round(t.item.width*1e3))+" мм.",1)]),i.createElementVNode("span",null,[d[10]||(d[10]=i.createTextVNode(" Длина: ",-1)),i.createElementVNode("span",_2,i.toDisplayString(Math.round(t.item.length*1e3))+" мм.",1)])],64)):i.createCommentVNode("",!0)])):t.item.configurator?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",w2,[t.allowEdit?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[t.item.product.getIsMeasurable()&&!t.item.configurator?(i.openBlock(),i.createElementBlock("div",x2,[i.createVNode(u,{value:o.value.length,parse:i.unref(et),"show-button":!1,disabled:!!t.item.configurator||r.value,loading:r.value,placeholder:"Длина",size:"small",class:"min-w-28 flex-1",onKeydown:d[0]||(d[0]=h=>i.unref(Oi)(h,".",!1)),onFocus:i.unref(Me),"onUpdate:value":s},{suffix:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(t.item.product.unit.name),1)]),_:1},8,["value","parse","disabled","loading","onFocus"]),i.createVNode(u,{value:o.value.quantity,parse:i.unref(et),"show-button":!1,disabled:!!t.item.configurator||r.value,loading:r.value,placeholder:"Кол-во",size:"small",class:"min-w-28 flex-1",onKeydown:d[1]||(d[1]=h=>i.unref(Oi)(h,".",!1)),onFocus:i.unref(Me),"onUpdate:value":a},{suffix:i.withCtx(()=>[...d[11]||(d[11]=[i.createTextVNode(" шт. ",-1)])]),_:1},8,["value","parse","disabled","loading","onFocus"])])):(i.openBlock(),i.createBlock(u,{key:1,value:o.value.quantity,parse:i.unref(et),"show-button":!1,disabled:!!r.value,loading:!!r.value,placeholder:"Кол-во",size:"small",class:"min-w-16 grow",onKeydown:d[2]||(d[2]=h=>i.unref(Oi)(h,".",!1)),onFocus:i.unref(Me),"onUpdate:value":a},{suffix:i.withCtx(()=>[...d[12]||(d[12]=[i.createTextVNode(" шт. ",-1)])]),_:1},8,["value","parse","disabled","loading","onFocus"]))],64)):(i.openBlock(),i.createElementBlock("div",k2,[i.createElementVNode("span",v2,[t.item.product.getIsMeasurable()?(i.openBlock(),i.createElementBlock("span",C2,i.toDisplayString(t.item.length??t.item.width)+" "+i.toDisplayString(t.item.product.unit.name)+" × ",1)):i.createCommentVNode("",!0),i.createTextVNode(" "+i.toDisplayString(t.item.quantity)+" шт. ",1)])]))]))]),t.item.configurator&&t.allowEdit?(i.openBlock(),i.createElementBlock("a",{key:0,href:"#",class:"text-xs text-blue-500 hover:text-blue-700 self-center",onClick:i.withModifiers(l,["prevent"])}," Изменить конфигурацию ")):i.createCommentVNode("",!0)])}}}),B2={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function T2(t,e){return i.openBlock(),i.createElementBlock("svg",B2,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M13 4a1 1 0 0 1 1 1h4a1 1 0 0 1 .783.378l.074.108l3 5l.055.103l.04.107l.029.109l.016.11L22 11v6a1 1 0 0 1-1 1h-1.171a3.001 3.001 0 0 1-5.658 0H9.829a3.001 3.001 0 0 1-5.658 0H3a1 1 0 0 1-1-1V6a2 2 0 0 1 2-2zM7 16a1 1 0 1 0 0 2a1 1 0 0 0 0-2m10 0a1 1 0 1 0 0 2a1 1 0 0 0 0-2m.434-9H14v3h5.234z"},null,-1)])])}const N2=i.markRaw({name:"tabler-truck-filled",render:T2}),$2={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function R2(t,e){return i.openBlock(),i.createElementBlock("svg",$2,[...e[0]||(e[0]=[i.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[i.createElementVNode("path",{d:"M5 17a2 2 0 1 0 4 0a2 2 0 1 0-4 0m10 0a2 2 0 1 0 4 0a2 2 0 1 0-4 0"}),i.createElementVNode("path",{d:"M5 17H3v-4M2 5h11v12m-4 0h6m4 0h2v-6h-8m0-5h5l3 5M3 9h4"})],-1)])])}const E2=i.markRaw({name:"tabler-truck-delivery",render:R2}),P2={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function F2(t,e){return i.openBlock(),i.createElementBlock("svg",P2,[...e[0]||(e[0]=[i.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[i.createElementVNode("path",{d:"M2 3h1a2 2 0 0 1 2 2v10a2 2 0 0 0 2 2h15"}),i.createElementVNode("path",{d:"M9 9a3 3 0 0 1 3-3h4a3 3 0 0 1 3 3v2a3 3 0 0 1-3 3h-4a3 3 0 0 1-3-3zM7 19a2 2 0 1 0 4 0a2 2 0 1 0-4 0m9 0a2 2 0 1 0 4 0a2 2 0 1 0-4 0"})],-1)])])}const V2=i.markRaw({name:"tabler-truck-loading",render:F2}),I2={class:"flex flex-col gap-1"},M2={key:0,class:"flex flex-row gap-1 text-sm text-sc-grey"},A2={key:1,class:"text-base"},O2={class:"text-sc-dark-grey mr-1.5"},z2={key:0},D2={key:1},L2={},Mo=i.defineComponent({...L2,__name:"order-delivery-label",props:{delivery:{},showType:{type:Boolean,default:!0},showDetails:{type:Boolean,default:!0}},setup(t){const e=i.computed(()=>{var o;return(o=Y.useReferencesStore().deliveryTypeReference)==null?void 0:o.find(s=>s.id===r.delivery.type)}),n=i.computed(()=>un.format(r.delivery.date,"dd.MM.yyyy")),r=t;return(o,s)=>{var d,u,h,f,g,m,p,y;const a=V2,l=E2,c=N2;return i.openBlock(),i.createElementBlock("div",I2,[t.showType?(i.openBlock(),i.createElementBlock("span",M2,[((d=e.value)==null?void 0:d.slug)==="self_delivery"?(i.openBlock(),i.createBlock(a,{key:0})):i.createCommentVNode("",!0),((u=e.value)==null?void 0:u.slug)==="delivery"?(i.openBlock(),i.createBlock(l,{key:1})):i.createCommentVNode("",!0),((h=e.value)==null?void 0:h.slug)==="transport_company_delivery"?(i.openBlock(),i.createBlock(c,{key:2})):i.createCommentVNode("",!0),i.createElementVNode("span",null,i.toDisplayString((f=e.value)==null?void 0:f.name),1)])):i.createCommentVNode("",!0),t.showDetails?(i.openBlock(),i.createElementBlock("span",A2,[i.createElementVNode("span",O2,i.toDisplayString(n.value),1),(m=(g=t.delivery)==null?void 0:g.address)!=null&&m.address?(i.openBlock(),i.createElementBlock("span",z2,i.toDisplayString(t.delivery.address.address),1)):i.createCommentVNode("",!0),(y=(p=t.delivery)==null?void 0:p.warehouse)!=null&&y.address?(i.openBlock(),i.createElementBlock("span",D2," со склада "+i.toDisplayString(t.delivery.warehouse.address),1)):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)])}}}),H2={class:"flex flex-col gap-2.5"},W2={class:"text-base"},j2=["href"],q2={class:"text-sc-grey"},X2={},Ah=i.defineComponent({...X2,__name:"order-common-info",props:{order:{},eventEmitter:{},allowEdit:{type:Boolean},fields:{},showAttachedUserColumn:{type:Boolean},orderContextButtonsConfig:{type:Function},onOrderContextSelect:{type:Function},orderUrl:{}},setup(t){const e=t,n=i.computed(()=>e.fields.includes(Pe.Id)?e.order.id:void 0),r=i.computed(()=>{var l,c;return e.fields.includes(Pe.Status)?(c=(l=Y.useReferencesStore().orderStatusReference)==null?void 0:l.find(d=>{var u;return d.id===(((u=e.order.status)==null?void 0:u.id)??-1)}))==null?void 0:c.name:void 0}),o=i.computed(()=>e.fields.includes(Pe.CreatedAt)),s=i.computed(()=>e.fields.includes(Pe.ClientInfo)||e.fields.includes(Pe.ClientInfoShort)?e.order.client:void 0),a=i.computed(()=>e.fields.includes(Pe.DeliveryInfo)?e.order.delivery:void 0);return(l,c)=>(i.openBlock(),i.createElementBlock("div",H2,[i.createElementVNode("span",W2,[n.value?(i.openBlock(),i.createElementBlock("a",{key:0,href:t.orderUrl.replace(":id",t.order.id.toString()),target:"_blank",class:"text-sc-dark-grey"}," #"+i.toDisplayString(n.value),9,j2)):i.createCommentVNode("",!0),o.value?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[c[0]||(c[0]=i.createTextVNode(" от ",-1)),i.createVNode(go,{date:t.order.createdAt,"is-time-secondary":!0},null,8,["date"])],64)):i.createCommentVNode("",!0),r.value?(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[c[1]||(c[1]=i.createTextVNode(" - ",-1)),i.createElementVNode("span",q2,i.toDisplayString(r.value),1)],64)):i.createCommentVNode("",!0)]),s.value?(i.openBlock(),i.createBlock(yr,{key:0,client:s.value,class:"ml-3"},null,8,["client"])):i.createCommentVNode("",!0),a.value?(i.openBlock(),i.createBlock(Mo,{key:1,delivery:a.value,class:"ml-3"},null,8,["delivery"])):i.createCommentVNode("",!0)]))}}),Y2={},va=i.defineComponent({...Y2,__name:"order-payment",props:{payment:{}},setup(t){const e=t,n=i.computed(()=>{var r;return(r=Y.useReferencesStore().paymentTypeReference)==null?void 0:r.find(o=>o.id===e.payment.type)});return(r,o)=>{var s;return i.openBlock(),i.createElementBlock("span",null,i.toDisplayString(((s=n.value)==null?void 0:s.name)??"-"),1)}}}),U2={class:"inline-block py-[0.0625rem] px-1.5 text-xs font-bold text-center whitespace-nowrap rounded text-white bg-[#17a2b8]"},K2={},Ca=i.defineComponent({...K2,__name:"creator-user-type-tag",props:{userType:{},prefixText:{default:"Добавлено"}},setup(t){const e=(n,r)=>{const o={[Y.UserTypeEnum.Manager]:"менеджером",[Y.UserTypeEnum.Operator]:"оператором",[Y.UserTypeEnum.Client]:"клиентом",[Y.UserTypeEnum.Admin]:"администратором"};return`${r} ${o[n]}`};return(n,r)=>(i.openBlock(),i.createElementBlock("small",U2,i.toDisplayString(e(t.userType,t.prefixText)),1))}}),G2={class:"flex flex-row gap-1.5"},Z2={class:"flex-none text-nowrap"},Q2={class:"flex flex-1 flex-col"},J2={class:"mt-2.5 grid grid-flow-col grid-rows-2 gap-1 text-base"},eC={key:0},tC={key:1},nC={},Oh=i.defineComponent({...nC,__name:"order-product-info",props:{product:{},index:{}},setup(t){return(e,n)=>{const r=Ca;return i.openBlock(),i.createElementBlock("div",G2,[i.createElementVNode("span",Z2,i.toDisplayString(t.index+1)+".",1),i.createElementVNode("div",Q2,[i.createVNode(cr,{product:t.product.product,"show-planning-dates":!1},null,8,["product"]),t.product.creator&&t.product.creator.type?(i.openBlock(),i.createBlock(r,{key:0,"user-type":t.product.creator.type,class:"mt-1 self-start"},null,8,["user-type"])):i.createCommentVNode("",!0),i.createElementVNode("div",J2,[n[0]||(n[0]=i.createElementVNode("span",null,"Кол-во",-1)),t.product.product.getIsMeasurable()?(i.openBlock(),i.createElementBlock("span",eC,i.toDisplayString(`${t.product.length} ${t.product.product.unit.name} x ${t.product.quantity} шт.`),1)):(i.openBlock(),i.createElementBlock("span",tC,i.toDisplayString(`${t.product.quantity} ${t.product.product.unit.name}`),1)),n[1]||(n[1]=i.createElementVNode("span",null,"Цена за ед.",-1)),i.createVNode(jn,{product:t.product,"cost-field-name":"costOneRub"},null,8,["product"]),n[2]||(n[2]=i.createElementVNode("span",null,"Сумма",-1)),i.createVNode(jn,{product:t.product,"cost-field-name":"cost"},null,8,["product"])])])])}}}),iC={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function rC(t,e){return i.openBlock(),i.createElementBlock("svg",iC,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"m112 112l20 320c.95 18.49 14.4 32 32 32h184c17.67 0 30.87-13.51 32-32l20-320"},null,-1),i.createElementVNode("path",{fill:"currentColor",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32",d:"M80 112h352"},null,-1),i.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M192 112V72h0a23.93 23.93 0 0 1 24-24h80a23.93 23.93 0 0 1 24 24h0v40m-64 64v224m-72-224l8 224m136-224l-8 224"},null,-1)])])}const oC=i.markRaw({name:"ion-trash-outline",render:rC}),sC={},aC=i.defineComponent({...sC,__name:"order-item-specification",props:{src:{}},setup(t){const e=i.useTemplateRef("image-reference");return(n,r)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("a",{class:"text-blue-500 hover:underline text-sm mt-1 block cursor-pointer",onClick:r[0]||(r[0]=o=>{var s;return(s=e.value)==null?void 0:s.showPreview()})}," Спецификация "),i.withDirectives(i.createVNode(i.unref(D.NImage),{ref:"image-reference",src:t.src,"previewed-img-props":{style:"max-width: 80vw; max-height: 80vh; object-fit: contain; border: 12px solid white;"}},null,8,["src"]),[[i.vShow,!1]])],64))}}),lC={},cC=i.defineComponent({...lC,__name:"order-items-list",props:{products:{},maxHeight:{default:void 0},eventEmitter:{default:void 0},allowEdit:{type:Boolean,default:!1}},setup(t){const e=t,n=(a,l)=>{const c=e.products,d=a.logicGroupId;if(!d)return 1;const u=c.at(l-1);return u&&u.logicGroupId===d?0:c.filter(h=>h.logicGroupId===d).length},r=()=>{const a=[{title:"№ п.п.",key:"id",resizable:!0,width:50,render:(l,c)=>i.h("span",{class:"text-base"},[c+1,"."])},{title:"Артикул",key:"codeNumber",resizable:!0,minWidth:120,render:l=>i.h("span",{class:"text-base"},[l.product.code])},{title:"Наименование",key:"name",resizable:!0,width:"45%",render:l=>i.h("div",{},[i.h(cr,{product:l.product,showCode:!1,showPlanningDates:!1,showAdditionalSaleIcon:l.isAdditionalSale??!1}),...l.marker?[i.h("span",{},["Маркировка: ",i.h("span",{class:"text-gray-600"},l.marker)])]:[],..."creator"in l&&l.creator&&l.creator.type?[i.h(Ca,{class:"mt-1",userType:l.creator.type,prefixText:"Добавлено"})]:[],...l.specificationImgUrl?[i.h(aC,{src:l.specificationImgUrl})]:[]])},{title:"Кол-во",key:"quantity",resizable:!0,minWidth:100,rowSpan:n,render:l=>i.h(Mh,{item:l,eventEmitter:e.eventEmitter,allowEdit:e.allowEdit})},{title:"Цена за ед.",key:"costOneRub",resizable:!0,minWidth:100,render:l=>i.h(jn,{product:l,costFieldName:"costOne",showQuantityUnit:!0})},{title:"Сумма",key:"cost",resizable:!0,minWidth:100,render:l=>i.h(jn,{product:l,costFieldName:"cost",showQuantityUnit:!0})},...e.allowEdit?[{title:"",key:"delete",width:44,render:l=>i.h(D.NButton,{quaternary:!0,type:"error",onClick:()=>{var c;(c=e.eventEmitter)==null||c.emit("order-item:delete",{item:l})}},()=>i.h(oC))}]:[]];switch(Ct.getDeviceTypeByResolution()){case Qe.phone:case Qe.tablet:return[{title:"",key:"items",resizable:!0,render:(l,c)=>i.h(Oh,{product:l,index:c})}];case Qe.laptop:return a;default:return a}},o=i.ref(r()),s=()=>{o.value=r()};return i.onMounted(()=>{s(),window.addEventListener("resize",s)}),i.onUnmounted(()=>{window.removeEventListener("resize",s)}),(a,l)=>{const c=D.NDataTable;return i.openBlock(),i.createElementBlock(i.Fragment,null,[l[0]||(l[0]=i.createElementVNode("h3",null,"Список позиций",-1)),i.createVNode(c,{columns:o.value,data:t.products,"row-key":d=>d.id,"bottom-bordered":!1,bordered:!1,"max-height":t.maxHeight},null,8,["columns","data","row-key","max-height"])],64)}}}),zh=Wn(cC,[["__scopeId","data-v-5a933cba"]]),dC={class:"ml-4 text-base"},uC={key:0,class:"text-sc-dark-grey my-2 text-center"},hC={key:1,class:"text-sc-dark-grey my-2"},fC={key:2,class:"grid grid-cols-3 gap-1.5"},mC={class:"text-sc-dark-grey"},gC={class:"col-span-2"},pC={class:"font-medium"},yC={key:0,class:"text-sc-dark-grey"},bC={class:"text-sc-dark-grey text-sm"},_C={},Dh=i.defineComponent({..._C,__name:"order-status-history",props:{order:{}},setup(t){const e=t,n=i.ref(!1),r=i.ref([]),o=a=>un.format(a,Y.useBaseConfigStateStore().config.dateFormats.uiDateWithTime),s=(a=!0)=>{a&&(n.value=!0),Y.HttpRequester.getInstance(Y.OrdersDataProvider).getOrderStatusHistory(e.order.id).then(l=>{r.value=l}).finally(()=>{a&&(n.value=!1)})};return i.watch(()=>e.order,()=>{s(!1)}),i.onMounted(()=>{s()}),(a,l)=>{const c=D.NSpin;return i.openBlock(),i.createElementBlock("div",null,[l[1]||(l[1]=i.createElementVNode("h3",null,"История статусов",-1)),i.createElementVNode("div",dC,[n.value?(i.openBlock(),i.createElementBlock("div",uC,[i.createVNode(c,{size:"small",class:"mb-1 align-middle"}),l[0]||(l[0]=i.createElementVNode("span",{class:"ml-2"},"Загрузка истории ...",-1))])):r.value.length===0?(i.openBlock(),i.createElementBlock("div",hC," История статусов отсутствует. ")):(i.openBlock(),i.createElementBlock("div",fC,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.value,(d,u)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:u},[i.createElementVNode("span",mC,i.toDisplayString(o(d.createdAt)),1),i.createElementVNode("div",gC,[i.createElementVNode("span",pC,i.toDisplayString(d.status.name),1),d.statusDetail?(i.openBlock(),i.createElementBlock("span",yC,"  ("+i.toDisplayString(d.statusDetail.name)+") ",1)):i.createCommentVNode("",!0),i.createElementVNode("div",bC,i.toDisplayString(d.user.name),1)])],64))),128))]))])])}}}),wC={class:"text-base"},xC={},Sa=i.defineComponent({...xC,__name:"user-short-info",props:{user:{},showUserType:{type:Boolean,default:!0},extraInfoOnSecondLine:{type:Boolean,default:!0}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass({"flex flex-col":t.showUserType&&t.extraInfoOnSecondLine})},[i.createElementVNode("span",wC,i.toDisplayString(t.user.name),1),t.showUserType?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass([{"ml-1":!t.extraInfoOnSecondLine},"text-sc-grey"])}," ["+i.toDisplayString(t.user.type)+"] ",3)):i.createCommentVNode("",!0)],2))}}),kC={class:"ml-4 grid grid-cols-3 gap-1.5 text-base"},vC={class:"col-span-2"},CC=["href"],SC={class:"col-span-2"},BC=["href"],TC={class:"btn btn-primary",href:"{{ invoice }}"},NC={},Lh=i.defineComponent({...NC,__name:"order-details",props:{order:{}},emits:["click:client-name"],setup(t,{emit:e}){const n=e;return(r,o)=>{var s;return i.openBlock(),i.createElementBlock("div",null,[o[14]||(o[14]=i.createElementVNode("h3",null,"Детали заказа",-1)),i.createElementVNode("div",kC,[t.order.creator.id!==t.order.client.id?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[o[1]||(o[1]=i.createElementVNode("span",null,"Создал",-1)),i.createVNode(Sa,{user:t.order.creator,class:"col-span-2"},null,8,["user"])],64)):i.createCommentVNode("",!0),o[13]||(o[13]=i.createElementVNode("span",null,"Клиент",-1)),i.createVNode(yr,{client:t.order.client,class:"col-span-2","onClick:clientName":o[0]||(o[0]=a=>n("click:client-name",t.order.client,a))},null,8,["client"]),t.order.contragent?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[o[2]||(o[2]=i.createElementVNode("span",null,"Контрагент",-1)),i.createVNode(Ld,{contragent:t.order.contragent,class:"col-span-2"},null,8,["contragent"])],64)):i.createCommentVNode("",!0),t.order.image?(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[o[3]||(o[3]=i.createElementVNode("span",null,"Графический файл клиента",-1)),o[4]||(o[4]=i.createElementVNode("a",{class:"fancybox col-span-2",href:"{{ order.image }}"}," Посмотреть ",-1))],64)):i.createCommentVNode("",!0),t.order.barcode?(i.openBlock(),i.createElementBlock(i.Fragment,{key:3},[o[5]||(o[5]=i.createElementVNode("span",null,"Штрих-код",-1)),i.createElementVNode("span",vC,i.toDisplayString(t.order.barcode),1)],64)):i.createCommentVNode("",!0),t.order.payment?(i.openBlock(),i.createElementBlock(i.Fragment,{key:4},[o[6]||(o[6]=i.createElementVNode("span",null,"Оплата",-1)),i.createVNode(va,{payment:t.order.payment,class:"col-span-2"},null,8,["payment"])],64)):i.createCommentVNode("",!0),(s=t.order.payment)!=null&&s.onlinePaymentLink?(i.openBlock(),i.createElementBlock(i.Fragment,{key:5},[o[7]||(o[7]=i.createElementVNode("span",null,"Онлайн-оплата",-1)),i.createElementVNode("a",{href:t.order.payment.onlinePaymentLink,target:"_blank",class:"col-span-2"}," Оплатить заказ ",8,CC)],64)):i.createCommentVNode("",!0),t.order.delivery?(i.openBlock(),i.createElementBlock(i.Fragment,{key:6},[o[8]||(o[8]=i.createElementVNode("span",null,"Доставка",-1)),i.createVNode(Mo,{delivery:t.order.delivery,class:"col-span-2"},null,8,["delivery"])],64)):i.createCommentVNode("",!0),t.order.comment?(i.openBlock(),i.createElementBlock(i.Fragment,{key:7},[o[9]||(o[9]=i.createElementVNode("span",null,"Комментарий",-1)),i.createElementVNode("span",SC,i.toDisplayString(t.order.comment),1)],64)):i.createCommentVNode("",!0),t.order.attachedUser?(i.openBlock(),i.createElementBlock(i.Fragment,{key:8},[o[10]||(o[10]=i.createElementVNode("span",null,"Закреплен за",-1)),i.createVNode(Sa,{user:t.order.attachedUser,class:"col-span-2"},null,8,["user"])],64)):i.createCommentVNode("",!0),t.order.erpOrderUrl?(i.openBlock(),i.createElementBlock(i.Fragment,{key:9},[o[11]||(o[11]=i.createElementVNode("span",null,"Открыть в ERP",-1)),i.createElementVNode("a",{href:t.order.erpOrderUrl,target:"_blank",class:"col-span-2"}," Открыть заявку в ERP ",8,BC)],64)):i.createCommentVNode("",!0),t.order.invoices&&t.order.invoices.length>0?(i.openBlock(),i.createElementBlock(i.Fragment,{key:10},[o[12]||(o[12]=i.createElementVNode("span",null,"Прикрепленные счета",-1)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.order.invoices,(a,l)=>(i.openBlock(),i.createElementBlock("div",{key:l,class:"col-span-2"},[i.createElementVNode("a",TC," Скачать счет №"+i.toDisplayString(l+1),1)]))),128))],64)):i.createCommentVNode("",!0)])])}}}),$C={key:0},RC={class:"text-sc-dark-grey my-2 text-center"},EC={key:1,class:"text-sc-dark-grey my-2 text-center"},PC={key:2},FC={class:"text-sc-dark-grey mt-4 text-right font-bold"},VC={class:"text-sc-primary"},IC={},Hh=i.defineComponent({...IC,__name:"order-info",props:{order:{},eventEmitter:{default:void 0},allowEdit:{type:Boolean,default:!1}},emits:["click:client-name"],setup(t,{emit:e}){const n=t,r=e,o=i.ref(!1),s=i.ref(),a=(c=!0)=>{if("products"in n.order){s.value=new Y.Order(n.order);return}c&&(o.value=!0),Y.HttpRequester.getInstance(Y.OrdersDataProvider).getOrder(n.order.id).then(d=>{s.value=d}).finally(()=>{c&&(o.value=!1)})},l=i.computed(()=>{var c;return(((c=s.value)==null?void 0:c.products)??[]).reduce((d,u)=>d+u.costRub,0).toLocaleString("ru-ru",{minimumFractionDigits:2})});return i.watch(()=>n.order,()=>{a(!1)}),i.onMounted(()=>{a()}),(c,d)=>{const u=D.NSpin;return o.value?(i.openBlock(),i.createElementBlock("div",$C,[i.createElementVNode("div",RC,[i.createVNode(u,{size:"small",class:"mb-2.5 align-middle"}),d[1]||(d[1]=i.createElementVNode("div",null,[i.createElementVNode("span",null,"Загрузка данных ...")],-1))])])):!s.value||s.value.products.length===0?(i.openBlock(),i.createElementBlock("div",EC," --- Не удалось загрузить данные о заказе --- ")):(i.openBlock(),i.createElementBlock("div",PC,[i.createVNode(zh,{products:s.value.products,"event-emitter":t.eventEmitter,"allow-edit":t.allowEdit},null,8,["products","event-emitter","allow-edit"]),i.createElementVNode("div",FC,[d[2]||(d[2]=i.createTextVNode(" ИТОГО: ",-1)),i.createElementVNode("span",VC,i.toDisplayString(l.value)+" ₽",1)]),i.createVNode(Lh,{order:s.value,"onClick:clientName":d[0]||(d[0]=h=>r("click:client-name",s.value.client,h))},null,8,["order"]),i.createVNode(Dh,{order:s.value},null,8,["order"])]))}}}),MC={},AC=i.defineComponent({...MC,__name:"order-actions",props:{orderContextButtonsConfig:{type:Function,default:void 0},onOrderContextSelect:{type:Function,default:void 0},order:{}},setup(t){const e=t,n=i.inject(ar,"small"),r=i.computed(()=>O.isNil(e.orderContextButtonsConfig)?[]:O.isFunction(e.orderContextButtonsConfig)?e.orderContextButtonsConfig(e.order):e.orderContextButtonsConfig),o=s=>{var a;(a=e.onOrderContextSelect)==null||a.call(e,e.order,s)};return(s,a)=>{var u;const l=Ho,c=D.NButton,d=D.NDropdown;return((u=r.value)==null?void 0:u.length)>0?(i.openBlock(),i.createBlock(d,{key:0,options:r.value,size:i.unref(n),trigger:"click",onSelect:o},{default:i.withCtx(()=>[i.createVNode(c,{ghost:!0,size:i.unref(n),type:"primary"},{default:i.withCtx(()=>[i.createVNode(l)]),_:1},8,["size"])]),_:1},8,["options","size"])):i.createCommentVNode("",!0)}}}),OC={},zC=i.defineComponent({...OC,__name:"orders-list",props:{fields:{},showAttachedUserColumn:{type:Boolean,default:!1},orderContextButtonsConfig:{},onOrderContextSelect:{},orderUrl:{},tableMinWidth:{default:1/0},filters:{default:void 0},sort:{default:void 0},pagination:{default:void 0},useCellIndication:{type:Boolean,default:!1},enableSorting:{type:Boolean,default:!1},refreshInterval:{default:0}},emits:["click:client-name","dblclick:row","update:pagination","update:sort"],setup(t,{emit:e}){const n=t,r=e,o=()=>O.cloneDeep(n.sort??[{field:"id",direction:"desc"}]),s=i.ref(o()),a=i.ref([]),l=i.ref(!1),c=i.ref(700),d=w=>{const T={onDblclick:()=>r("dblclick:row",w)};if(!n.useCellIndication)return T;const N=[];return w.isOnOrder&&N.push("on-order"),w.isLargeOrder&&N.push("large-order"),w.isNotInStock&&N.push("not-in-stock"),N.push("order-status",w.status.slug),w.delivery.date&&un.isTomorrow(new Date(w.delivery.date))&&N.push("next-day-order"),N.length>0&&(T.class=N.join(" ")),T},u=()=>{const w=[Pe.CreatedAt,Pe.Id,Pe.ClientInfo,Pe.ClientCity,Pe.DeliveryDate,Pe.PaymentType,Pe.SalesDirections,Pe.Status,...n.showAttachedUserColumn?[Pe.AttachedUser]:[],Pe.actions],T=n.fields.length>0?n.fields:w,N={title:"???",key:"undefined",render:()=>i.h("span",{},["--- unknown ---"])},A={type:"expand",expandable:O.constant(!0),renderExpand:z=>i.h(Hh,{order:z,class:"pl-10 pt-3 pb-10","onClick:client-name":()=>{r("click:client-name",z.client,null)}}),width:"30"};let I=[{title:"Дата заказа",key:Pe.CreatedAt,resizable:!0,width:100,render:z=>i.h(go,{date:z.createdAt,isTimeSecondary:!0,isTimeOnSecondLine:!0,class:"text-base"})},{title:"№ заказа",key:Pe.Id,resizable:!0,width:75,className:"order-id",render:z=>i.h("a",{href:n.orderUrl.replace(":id",z.id.toString()),class:"text-base"},z.id)},{title:"Дата доставки / самовывоза",key:Pe.DeliveryDate,resizable:!0,width:100,className:"delivery-date",render:z=>i.h(go,{date:z.delivery.date,isShowTime:!1,class:"text-base"})},{title:"Клиент",key:Pe.ClientInfo,resizable:!0,minWidth:320,render:z=>i.h(yr,{client:z.client,"onClick:client-name":()=>{r("click:client-name",z.client,null)}})},{title:"Тип доставки",key:Pe.DeliveryInfo,resizable:!0,minWidth:320,render:z=>i.h(Mo,{delivery:z.delivery})},{title:"Клиент",key:Pe.ClientInfoShort,resizable:!0,minWidth:320,render:z=>i.h(yr,{client:z.client,showCityAndRegion:!1,"onClick:client-name":()=>{r("click:client-name",z.client,null)}})},{title:"Город клиента",key:Pe.ClientCity,resizable:!0,minWidth:90,width:120,render:z=>{var L;return i.h("span",{class:"text-base"},((L=z.client)==null?void 0:L.city.name)??"—")}},{title:"Статус",key:Pe.Status,resizable:!0,width:150,minWidth:115,className:"order-status",render:z=>i.h("span",{class:"text-base"},[z.status.name])},{title:"Тип оплаты",key:Pe.PaymentType,resizable:!0,width:115,minWidth:95,render:z=>z.payment?i.h(va,{payment:z.payment}):i.h("span",{class:"text-base"},"—")},{title:"Напр. продаж",key:Pe.SalesDirections,resizable:!0,width:70,render:z=>{var L;return i.h("span",{class:"text-base"},[((L=z.salesDirection)==null?void 0:L.name)??""])}},...n.showAttachedUserColumn?[{title:"Закреплено за",key:Pe.AttachedUser,resizable:!0,minWidth:120,render:z=>{var L;return i.h("span",{class:"text-base"},[((L=z==null?void 0:z.attachedUser)==null?void 0:L.name)??""])}}]:[]];switch(n.orderContextButtonsConfig&&I.push({key:"actions",title:"",className:"align-top",width:50,render:z=>i.h(AC,{order:z,orderContextButtonsConfig:n.orderContextButtonsConfig,onOrderContextSelect:n.onOrderContextSelect})}),n.enableSorting&&(I=I.map(z=>[Pe.Id,Pe.CreatedAt,Pe.DeliveryDate].includes(z.key)?{...z,sorter:!0,sortOrder:!1,...z.width===void 0?{}:{width:z.width+16}}:z)),Ct.getDeviceTypeByResolution()){case Qe.phone:case Qe.tablet:return[A,{key:"order",title:"Заказ",resizable:!0,render:z=>i.h(Ah,{order:z,fields:T,orderUrl:n.orderUrl})}];case Qe.laptop:{const z=n.showAttachedUserColumn?T:T.filter(L=>L!==Pe.AttachedUser);return[A,...z.map(L=>I.find(ee=>ee.key===L)??N)]}default:return[N]}},h=i.ref(u()),f=i.ref(new Y.DataTablePagination(n.pagination??{page:1,pageSize:10,itemCount:0,pageCount:1,pageSlot:5,pageSizes:[10,15,25],showSizePicker:!0})),g=i.computed(()=>({...f.value,prefix({itemCount:w}){return`Всего заказов: ${w}`}})),m=i.ref(null),p=i.ref(null),y=i.ref(null),b=()=>{y.value!==null&&(clearInterval(y.value),y.value=null)},_=()=>{b(),n.refreshInterval&&(y.value=setInterval(()=>{k()},n.refreshInterval))},S=()=>{var w,T;n.filters&&((w=p.value)==null||w.abort(),p.value=null,(T=m.value)==null||T.abort(),m.value=new AbortController,l.value=!0,Y.HttpRequester.getInstance(Y.OrdersDataProvider).getOrders(n.filters,s.value,{page:f.value.page,pageSize:f.value.pageSize},m.value.signal).then(N=>{f.value.itemCount!==N.meta.total&&(f.value.itemCount=N.meta.total),f.value.page!==N.meta.currentPage&&(f.value.page=N.meta.currentPage),f.value.pageCount!==N.meta.lastPage&&(f.value.pageCount=N.meta.lastPage),f.value.pageSize!==N.meta.perPage&&(f.value.pageSize=N.meta.perPage),a.value=N.data,l.value=!1}).catch(N=>{if((N==null?void 0:N.name)!=="CanceledError")throw l.value=!1,N}))},k=()=>{var w;!n.filters||l.value||((w=p.value)==null||w.abort(),p.value=new AbortController,Y.HttpRequester.getInstance(Y.OrdersDataProvider).getOrders(n.filters,s.value,{page:f.value.page,pageSize:f.value.pageSize},p.value.signal).then(T=>{a.value=a.value.map(N=>T.data.find(I=>I.id===N.id)??N),f.value.itemCount!==T.meta.total&&(f.value.itemCount=T.meta.total),f.value.pageCount!==T.meta.lastPage&&(f.value.pageCount=T.meta.lastPage)}).catch(T=>{if((T==null?void 0:T.name)!=="CanceledError")throw T}))},R=w=>{f.value.page=w,S(),r("update:pagination",f.value)},$=w=>{f.value.pageSize=w,f.value.page=1,S(),r("update:pagination",f.value)},x=w=>{if(O.isNull(w))s.value=o();else{const[T]=s.value;T.field=w.columnKey.toString(),T.direction=w.order==="ascend"?"asc":"desc",s.value=[T]}h.value.forEach(T=>{if(Object.hasOwn(T,"sortOrder")){const N=T;N.sortOrder=N.key===(w==null?void 0:w.columnKey)&&(w!=null&&w.sorter)&&w.order!==!1?w.order:!1}}),S(),r("update:sort",s.value)},C=()=>{h.value=u(),c.value=window.innerHeight};return i.watch(()=>n.filters,()=>{f.value.page=1,S(),_()}),i.watch(()=>n.sort,()=>{s.value=o(),f.value.page=1,S(),_()}),i.onMounted(()=>{C(),window.addEventListener("resize",C),i.nextTick(()=>{S(),_()})}),i.onUnmounted(()=>{var w,T;window.removeEventListener("resize",C),(w=m.value)==null||w.abort(),(T=p.value)==null||T.abort(),b()}),(w,T)=>{const N=D.NDataTable;return i.openBlock(),i.createBlock(N,{columns:h.value,data:a.value,"row-key":A=>A.id,"row-props":d,"scroll-x":t.tableMinWidth,pagination:g.value,loading:l.value,remote:!0,bordered:!1,"bottom-bordered":!1,"sticky-expanded-rows":!0,"max-height":c.value*(i.unref(Y.useBaseConfigStateStore)().config.tableDefaultHeightCoefficient??.6),"pagination-behavior-on-filter":"first","onUpdate:page":R,"onUpdate:pageSize":$,"onUpdate:sorter":x},null,8,["columns","data","row-key","scroll-x","pagination","loading","max-height"])}}}),DC=Wn(zC,[["__scopeId","data-v-2a162c0c"]]),LC=["href"],HC={class:"text-sc-dark-grey"},WC={},jC=i.defineComponent({...WC,__name:"short-text-order-info",props:{order:{},orderLink:{}},emits:["click:order-id"],setup(t,{emit:e}){const n=t,r=e,o=i.computed(()=>un.format(n.order.createdAt,Y.useBaseConfigStateStore().config.dateFormats.uiDateWithTime)),s=a=>{O.isNil(n.orderLink)&&(a.preventDefault(),a.stopPropagation()),r("click:order-id",n.order,a)};return(a,l)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("span",null,[l[1]||(l[1]=i.createTextVNode(" #",-1)),i.createElementVNode("a",{href:t.orderLink??"#",onClick:l[0]||(l[0]=c=>s(c))},i.toDisplayString(t.order.id),9,LC),i.createTextVNode(" от "+i.toDisplayString(o.value),1)]),l[2]||(l[2]=i.createTextVNode(", ",-1)),i.createElementVNode("span",HC,"автор: "+i.toDisplayString(t.order.creator.name)+" ["+i.toDisplayString(t.order.creator.type)+"]",1)],64))}}),qC={class:"sc-page flex flex-col bg-inherit"},XC={class:"my-2 flex flex-row items-end"},YC={class:"sc-title grow"},UC={key:0,class:"sc-title-buttons flex-1 grow-0"},KC={class:"flex flex-col justify-end gap-1 sm:mt-0 sm:flex-row"},GC={key:0,class:"sc-title-extra mt-2 sm:mt-4"},ZC={},Wh=i.defineComponent({...ZC,__name:"page",props:{title:{},stickyHeader:{type:Boolean},stickyTopOffset:{}},setup(t){return(e,n)=>{const r=D.NH1;return i.openBlock(),i.createElementBlock("div",qC,[i.createElementVNode("div",{class:i.normalizeClass(t.stickyHeader?"sticky z-10 bg-inherit":void 0),style:i.normalizeStyle(t.stickyHeader?{top:`${t.stickyTopOffset??0}px`}:void 0)},[i.createElementVNode("div",XC,[i.createElementVNode("div",YC,[i.renderSlot(e.$slots,"title",{},()=>[i.createVNode(r,{class:"m-0 leading-none lg:mb-3 lg:leading-normal"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(t.title??""),1)]),_:1})])]),e.$slots["title-buttons"]?(i.openBlock(),i.createElementBlock("div",UC,[i.createElementVNode("div",KC,[i.renderSlot(e.$slots,"title-buttons")])])):i.createCommentVNode("",!0)]),e.$slots["title-extra"]?(i.openBlock(),i.createElementBlock("div",GC,[i.renderSlot(e.$slots,"title-extra")])):i.createCommentVNode("",!0),i.renderSlot(e.$slots,"sticky-extra")],6),i.renderSlot(e.$slots,"default")])}}}),QC={class:"overflow-hidden transition-all duration-300"},JC={class:"text-lg font-medium leading-none"},eS={},jh=i.defineComponent({...eS,__name:"sliding-content-with-drawer",props:{drawerWidth:{type:[Number,Function],default:void 0},showDrawer:{type:Boolean,default:!1},title:{default:""}},emits:["update:show-drawer"],setup(t,{emit:e}){const n=t,r=e,o=i.ref(0),s=i.ref(n.showDrawer),a=()=>{switch(Ct.getDeviceTypeByResolution()){case Qe.phone:return window.innerWidth*.8;case Qe.tablet:return window.innerWidth*.5;default:return window.innerWidth*.33}},l=()=>{s.value?O.isUndefined(n.drawerWidth)?o.value=a():o.value=O.isFunction(n.drawerWidth)?n.drawerWidth():n.drawerWidth:o.value=0};return i.watch(()=>n.drawerWidth,()=>{l()}),i.watch(()=>s.value,()=>{l(),r("update:show-drawer",s.value)}),i.watch(()=>n.showDrawer,c=>{s.value=c}),i.onUnmounted(()=>{window.removeEventListener("resize",l)}),l(),window.addEventListener("resize",l),(c,d)=>{const u=D.NDrawerContent,h=D.NDrawer;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",QC,[i.createElementVNode("div",{style:i.normalizeStyle(`margin-left: ${o.value}px;`),class:"w-full"},[i.renderSlot(c.$slots,"default")],4)]),i.createVNode(h,{show:s.value,"onUpdate:show":d[0]||(d[0]=f=>s.value=f),resizable:!0,width:o.value,placement:"left"},{default:i.withCtx(()=>[i.createVNode(u,{closable:""},{header:i.withCtx(()=>[i.renderSlot(c.$slots,"drawer-header",{},()=>[i.createElementVNode("div",JC,i.toDisplayString(t.title),1)])]),default:i.withCtx(()=>[i.renderSlot(c.$slots,"drawer-content")]),footer:i.withCtx(()=>[i.renderSlot(c.$slots,"drawer-footer")]),_:3})]),_:3},8,["show","width"])],64)}}}),tS={ref:"panel-component-ref",class:"sc-page-panel flex flex-row gap-2.5 bg-inherit sm:gap-8"},nS={key:0},iS={class:"sc-page-preview-panel grow"},rS={key:1,class:"sc-page-preview-panel-extra flex-none"},oS={},sS=i.defineComponent({...oS,__name:"page-with-sliding-panel",props:{title:{},isShowPanelButtonVisible:{type:Boolean,default:!0},showPanelButtonText:{default:""},panelTitle:{default:""},stickyHeader:{type:Boolean,default:!1},stickyTopOffset:{default:0}},setup(t,{expose:e}){const n=i.ref(!1),r=()=>{n.value=!0},o=()=>{n.value=!1},s=i.useTemplateRef("panel-component-ref");return e({scrollToTopOfPanel:l=>{var c;(c=s.value)==null||c.scrollIntoView({behavior:"smooth"}),l&&i.nextTick(()=>{var d,u;window.scrollTo({top:(((u=(d=s.value)==null?void 0:d.getBoundingClientRect())==null?void 0:u.top)??0)+window.pageYOffset+l,behavior:"smooth"})})},showPanel:r,closePanel:o}),(l,c)=>{const d=D.NButton;return i.openBlock(),i.createBlock(Wh,{title:t.title,"sticky-header":t.stickyHeader,"sticky-top-offset":t.stickyTopOffset},i.createSlots({default:i.withCtx(()=>[i.createVNode(jh,{"show-drawer":n.value,"onUpdate:showDrawer":c[1]||(c[1]=u=>n.value=u),title:t.panelTitle},i.createSlots({"drawer-content":i.withCtx(()=>[i.renderSlot(l.$slots,"panel-content")]),default:i.withCtx(()=>[i.renderSlot(l.$slots,"default")]),_:2},[l.$slots["panel-header"]?{name:"drawer-header",fn:i.withCtx(()=>[i.renderSlot(l.$slots,"panel-header")]),key:"0"}:void 0,l.$slots["panel-bottom"]?{name:"drawer-footer",fn:i.withCtx(()=>[i.renderSlot(l.$slots,"panel-bottom")]),key:"1"}:void 0]),1032,["show-drawer","title"])]),_:2},[l.$slots.title?{name:"title",fn:i.withCtx(()=>[i.renderSlot(l.$slots,"title")]),key:"0"}:void 0,l.$slots["title-buttons"]?{name:"title-buttons",fn:i.withCtx(()=>[i.renderSlot(l.$slots,"title-buttons")]),key:"1"}:void 0,l.$slots["title-extra"]?{name:"title-extra",fn:i.withCtx(()=>[i.renderSlot(l.$slots,"title-extra")]),key:"2"}:void 0,l.$slots["preview-panel"]||l.$slots["preview-panel-extra"]||t.isShowPanelButtonVisible?{name:"sticky-extra",fn:i.withCtx(()=>[i.createElementVNode("div",tS,[t.isShowPanelButtonVisible?(i.openBlock(),i.createElementBlock("div",nS,[i.renderSlot(l.$slots,"show-panel-button",{onClickHandler:()=>{n.value=!0}},()=>[i.createVNode(d,{class:"flex-none sm:px-10 sm:py-4",onClick:c[0]||(c[0]=u=>n.value=!0)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(t.showPanelButtonText),1)]),_:1})])])):i.createCommentVNode("",!0),i.createElementVNode("div",iS,[i.renderSlot(l.$slots,"preview-panel")]),l.$slots["preview-panel-extra"]?(i.openBlock(),i.createElementBlock("div",rS,[i.renderSlot(l.$slots,"preview-panel-extra")])):i.createCommentVNode("",!0)],512)]),key:"3"}:void 0]),1032,["title","sticky-header","sticky-top-offset"])}}}),aS={},lS=i.defineComponent({...aS,__name:"curator-select",props:{value:{default:null},clearable:{type:Boolean,default:!1},consistentMenuWidth:{type:Boolean},wrapContent:{type:Boolean},managerReferenceList:{default:()=>[]},showEmptyValue:{type:Boolean,default:!1}},emits:["update:value"],setup(t,{expose:e,emit:n}){const r=t,o=n,s=i.computed(()=>O.isArray(r.value)),a=i.computed(()=>{var m;return O.isArray(r.value)?r.value.map(p=>p.id):((m=r.value)==null?void 0:m.id)??null}),l=i.computed(()=>{const m=new Y.Curator({id:-1,name:"",contacts:{},curatedDirection:new Y.CuratedDirection({id:-1,name:"",guid:""}),guid:""}),p=r.showEmptyValue?[m]:[];return r.managerReferenceList.filter(y=>{var b;return(((b=y==null?void 0:y.curatedDirections)==null?void 0:b.length)??0)>0}).forEach(y=>{((y==null?void 0:y.curatedDirections)??[]).forEach(b=>{p.push(new Y.Curator({id:y.id,guid:y.guid,name:y.name,photo:y.photo,contacts:y.contacts??{},curatedDirection:b}))})}),p}),c=i.computed(()=>Ft.convertReferencesToSelectOptionsList(l.value,!0,{key:"item.curatedDirection.id",label:"item.curatedDirection.name"},!1,m=>{const p=O.some(s.value?r.value:[r.value],["id",m.id])?` (${m.curatedDirection.name}) `:"";return m.curatedDirection.isNewRec()?m.name:`${m.name}${p}`})),d=i.computed(()=>c.value.map(m=>({...m,class:r.wrapContent?`${m.class} consistent-menu-width`:m.class}))),u=i.useTemplateRef("select-component"),h=m=>{if(O.isArray(m)){const p=m.length>0?m.map(y=>l.value.find(b=>b.id===y)).filter(y=>!O.isNil(y)):[];o("update:value",p)}else{const p=m>0?l.value.find(y=>y.id===m):null;o("update:value",p??null)}};return i.watch(()=>r.value,()=>{var m,p;(p=(m=u.value)==null?void 0:m.$forceUpdate)==null||p.call(m)},{deep:!0}),e({focus:()=>{var m;return(m=u.value)==null?void 0:m.focusInput()},blur:()=>{var m;return(m=u.value)==null?void 0:m.blurInput()}}),(m,p)=>(i.openBlock(),i.createBlock(i.unref(D.NSelect),{ref:"select-component",value:a.value,clearable:t.clearable,disabled:c.value.length===0,"consistent-menu-width":t.consistentMenuWidth,multiple:s.value,options:d.value,placeholder:"","onUpdate:value":h},null,8,["value","clearable","disabled","consistent-menu-width","multiple","options"]))}}),cS={},dS=i.defineComponent({...cS,__name:"manager-select",props:{value:{default:null},clearable:{type:Boolean,default:!1},consistentMenuWidth:{type:Boolean,default:!0},wrapContent:{type:Boolean,default:!0},managerReferenceList:{default:()=>[]},disabledManagerReferenceList:{default:()=>[]},showActualOnly:{type:Boolean,default:!1},showEmptyValue:{type:Boolean,default:!1},groupBySalesDirection:{type:Boolean,default:!1}},emits:["update:value"],setup(t,{expose:e,emit:n}){const r=t,o=n,s=i.computed(()=>O.isArray(r.value)),a=i.computed(()=>{var m;return O.isArray(r.value)?r.value.map(p=>p.id):((m=r.value)==null?void 0:m.id)??null}),l=i.computed(()=>r.showEmptyValue?[Y.ManagerDataFactory.generateUndefinedManagerInstance(),...r.managerReferenceList]:r.managerReferenceList),c=i.computed(()=>{var y;let m=l.value,p=r.disabledManagerReferenceList.map(b=>b.id);if(r.showActualOnly){const b=O.isArray(r.value)?r.value.map(_=>_.id):[(y=r.value)==null?void 0:y.id];p=O.union(p,l.value.filter(_=>!_.isActive).map(_=>_.id)),m=m.filter(_=>(r.showEmptyValue?Y.ManagerDataFactory.isUndefinedManagerInstance(_):!1)||_.isActive||b.includes(_.id))}return Ft.convertReferencesToSelectOptionsList(m,!0,r.groupBySalesDirection?{key:"item.salesDirection.id",label:"item.salesDirection.name"}:!1,!1,b=>{const _=!r.groupBySalesDirection||r.groupBySalesDirection&&O.some(s.value?r.value:[r.value],["id",b.id])?` (${b.salesDirection.name}) `:"";return b.salesDirection.isNewRec()?b.name:`${b.name}${_}${b.isActive?"":" [Не активен]"}`},b=>p.includes(b.id)&&b.isActive)}),d=i.computed(()=>c.value.map(m=>({...m,class:r.wrapContent?`${m.class} consistent-menu-width`:m.class}))),u=i.useTemplateRef("select-component"),h=m=>{if(O.isArray(m)){const p=m.length>0?m.filter(y=>!O.some(r.disabledManagerReferenceList,["id",y])).map(y=>l.value.find(b=>b.id===y)).filter(y=>!O.isNil(y)):[];o("update:value",p)}else{const p=m>0&&!O.some(r.disabledManagerReferenceList,["id",m])?l.value.find(y=>y.id===m):new Y.Manager;o("update:value",p??new Y.Manager)}};return i.watch(()=>r.value,()=>{var m,p;(p=(m=u.value)==null?void 0:m.$forceUpdate)==null||p.call(m)},{deep:!0}),i.watch(()=>r.disabledManagerReferenceList,m=>{if(m.length>0&&r.value)if(s.value){const p=r.value;O.some(p,y=>O.some(m,["id",y.id]))&&o("update:value",p.filter(y=>!O.some(m,["id",y.id])))}else{const p=r.value;O.some(m,["id",p.id])&&o("update:value",new Y.Manager)}}),e({focus:()=>{var m;return(m=u.value)==null?void 0:m.focusInput()},blur:()=>{var m;return(m=u.value)==null?void 0:m.blurInput()}}),(m,p)=>(i.openBlock(),i.createBlock(i.unref(D.NSelect),{ref:"select-component",value:a.value,clearable:t.clearable,disabled:c.value.length===0,"consistent-menu-width":t.consistentMenuWidth,multiple:s.value,options:d.value,placeholder:"","onUpdate:value":h},null,8,["value","clearable","disabled","consistent-menu-width","multiple","options"]))}}),uS={class:"m-0.5 flex flex-col p-0.5"},hS={class:"flex flex-row gap-1"},fS={key:0},mS={key:1},gS={key:2},pS={key:3},yS={class:"flex flex-row gap-1"},bS={key:0},_S={key:1},wS={key:2},xS={key:3},kS={},qh=i.defineComponent({...kS,__name:"address-suggestion-label",props:{addr:{},selected:{type:Boolean}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",uS,[i.createElementVNode("span",hS,[t.addr.postIndex?(i.openBlock(),i.createElementBlock("span",fS,i.toDisplayString(t.addr.postIndex)+", ",1)):i.createCommentVNode("",!0),t.addr.city?(i.openBlock(),i.createElementBlock("span",mS,i.toDisplayString(t.addr.city)+", ",1)):i.createCommentVNode("",!0),t.addr.locality?(i.openBlock(),i.createElementBlock("span",gS,i.toDisplayString(t.addr.locality)+", ",1)):i.createCommentVNode("",!0),t.addr.region?(i.openBlock(),i.createElementBlock("span",pS,i.toDisplayString(t.addr.region)+", ",1)):i.createCommentVNode("",!0)]),i.createElementVNode("span",yS,[t.addr.street?(i.openBlock(),i.createElementBlock("span",bS,i.toDisplayString(t.addr.street)+", ",1)):i.createCommentVNode("",!0),t.addr.building?(i.openBlock(),i.createElementBlock("span",_S,i.toDisplayString(t.addr.building)+", ",1)):i.createCommentVNode("",!0),t.addr.buildingPart?(i.openBlock(),i.createElementBlock("span",wS,i.toDisplayString(t.addr.buildingPart)+", ",1)):i.createCommentVNode("",!0),t.addr.apartments?(i.openBlock(),i.createElementBlock("span",xS,i.toDisplayString(t.addr.apartments)+", ",1)):i.createCommentVNode("",!0)])]))}}),Ba={clearable:!1,value:"",field:void 0,disabled:!1},vS={},CS=i.defineComponent({...vS,__name:"address-suggestion",props:i.mergeDefaults({disabled:{type:Boolean},value:{},clearable:{type:Boolean},field:{},minTermLength:{},searchDataHandler:{type:Function}},{...Ba,minTermLength:()=>{var t,e;return((e=(t=Y.useBaseConfigStateStore().getConfig())==null?void 0:t.minLength)==null?void 0:e.searchTerm)??3},searchDataHandler:void 0}),emits:["select","update:value"],setup(t,{expose:e,emit:n}){const r=t,o=n,s=i.ref(r.value),a=i.ref(!1),l=i.ref([]),c=i.computed(()=>l.value.map(p=>({label:p[r.field??"addressString"]??"-",value:p.id})));i.watch(()=>r.value,p=>{s.value=p}),i.watch(s,()=>{o("update:value",s.value)});const d=O.debounce(()=>u(),800),u=async()=>{!s.value||s.value.length<r.minTermLength||(a.value=!0,l.value=await(r.searchDataHandler?r.searchDataHandler(s.value,a):Y.HttpRequester.getInstance(Y.DataSuggestionProvider).searchAddresses(s.value)).finally(()=>{a.value=!1}))},h=(p,y)=>{const b=l.value.find(_=>_.id===p.value)||{};return i.h(qh,{addr:b,selected:y},{default:O.constant("-")})},f=p=>{d.cancel();const y=l.value.find(b=>b.id===p)||{};o("select",y)},g=i.ref(null);function m(){g.value.focus()}return e({focus:m}),(p,y)=>{const b=D.NAutoComplete;return i.openBlock(),i.createBlock(b,{ref_key:"autoCompleteElement",ref:g,value:s.value,"onUpdate:value":[y[0]||(y[0]=_=>s.value=_),i.unref(d)],clearable:t.clearable,disabled:t.disabled,loading:a.value,options:c.value,"render-label":h,placeholder:"",onSelect:f},null,8,["value","clearable","disabled","loading","options","onUpdate:value"])}}}),SS={class:"m-0.5 flex flex-col p-0.5"},BS={class:"font-medium"},TS={class:"flex flex-row gap-1 text-xs font-light text-blue-800"},NS={key:0},$S={key:1},RS={},Xh=i.defineComponent({...RS,__name:"bank-suggestion-label",props:{bank:{},selected:{type:Boolean}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",SS,[i.createElementVNode("span",BS,i.toDisplayString(t.bank.name),1),i.createElementVNode("span",TS,[t.bank.bic?(i.openBlock(),i.createElementBlock("span",NS," БИК: "+i.toDisplayString(t.bank.bic),1)):i.createCommentVNode("",!0),t.bank.inn?(i.openBlock(),i.createElementBlock("span",$S," ИНН: "+i.toDisplayString(t.bank.inn),1)):i.createCommentVNode("",!0)])]))}}),ES={},PS=i.defineComponent({...ES,__name:"bank-suggestion",props:i.mergeDefaults({disabled:{type:Boolean},value:{},clearable:{type:Boolean},field:{},minTermLength:{}},{...Ba,minTermLength:()=>{var t,e;return((e=(t=Y.useBaseConfigStateStore().getConfig())==null?void 0:t.minLength)==null?void 0:e.searchTerm)??3}}),emits:["select","update:value"],setup(t,{expose:e,emit:n}){const r=t,o=n,s=i.ref(r.value),a=i.ref(!1),l=i.ref([]),c=i.computed(()=>l.value.map(p=>({label:p[r.field??"_"]??"-",value:p.id})));i.watch(()=>r.value,p=>{s.value=p}),i.watch(s,()=>{o("update:value",s.value)});const d=O.debounce(()=>u(),800),u=async()=>{if(!(!s.value||s.value.length<r.minTermLength)){a.value=!0;try{l.value=await Y.HttpRequester.getInstance(Y.DataSuggestionProvider).searchBank(s.value)}finally{a.value=!1}}},h=(p,y)=>{const b=l.value.find(_=>_.id===p.value)||{};return i.h(Xh,{bank:b,selected:y},{default:O.constant("-")})},f=p=>{d.cancel();const y=l.value.find(b=>b.id===p)||{};o("select",y)},g=i.ref(null);function m(){g.value.focus()}return e({focus:m}),(p,y)=>{const b=D.NAutoComplete;return i.openBlock(),i.createBlock(b,{ref_key:"autoCompleteElement",ref:g,value:s.value,"onUpdate:value":[y[0]||(y[0]=_=>s.value=_),i.unref(d)],clearable:t.clearable,disabled:t.disabled,loading:a.value,options:c.value,"render-label":h,placeholder:"",onSelect:f},null,8,["value","clearable","disabled","loading","options","onUpdate:value"])}}}),FS={class:"font-medium"},VS={key:0,class:"flex flex-row gap-2"},IS={key:0,class:"text-xs font-light text-blue-800"},MS={key:1,class:"text-sc-dark-grey text-xs font-light"},AS={},Yh=i.defineComponent({...AS,__name:"org-suggestion-label",props:{org:{},selected:{type:Boolean}},setup(t){const e=t,n=i.computed(()=>{var o,s;return((s=(o=e.org.rawData)==null?void 0:o.state)==null?void 0:s.liquidationDate)??!1}),r=i.computed(()=>{var o,s;return((s=(o=e.org.rawData)==null?void 0:o.address)==null?void 0:s.value)??""});return(o,s)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(`m-0.5 flex flex-col p-0.5 ${n.value?"line-through":""}`)},[i.createElementVNode("span",FS,i.toDisplayString(t.org.name),1),t.org.inn||r.value?(i.openBlock(),i.createElementBlock("div",VS,[t.org.inn?(i.openBlock(),i.createElementBlock("span",IS,i.toDisplayString(t.org.inn),1)):i.createCommentVNode("",!0),r.value?(i.openBlock(),i.createElementBlock("span",MS,i.toDisplayString(r.value),1)):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)],2))}}),OS={},zS=i.defineComponent({...OS,__name:"org-suggestion",props:i.mergeDefaults({disabled:{type:Boolean},value:{},clearable:{type:Boolean},field:{},minTermLength:{},allowSelectTerminated:{type:Boolean}},{...Ba,minTermLength:()=>{var t,e;return((e=(t=Y.useBaseConfigStateStore().getConfig())==null?void 0:t.minLength)==null?void 0:e.searchTerm)??3}}),emits:["select","update:value"],setup(t,{expose:e,emit:n}){const r=t,o=n,s=i.ref(r.value),a=i.ref(!1),l=i.ref([]),c=y=>{var b,_;return!!(((_=(b=y.rawData)==null?void 0:b.state)==null?void 0:_.liquidationDate)??!1)},d=i.computed(()=>Ft.convertReferencesToSelectOptionsList(l.value,!1,!1,!1,y=>y[r.field??"_"]??"-",y=>!r.allowSelectTerminated&&c(y)));i.watch(()=>r.value,y=>{s.value=y}),i.watch(s,()=>{o("update:value",s.value)});const u=O.debounce(()=>h(),800),h=async()=>{if(!(!s.value||s.value.length<r.minTermLength)){a.value=!0;try{l.value=await Y.HttpRequester.getInstance(Y.DataSuggestionProvider).searchOrganization(s.value)}finally{a.value=!1}}},f=(y,b)=>{const _=l.value.find(S=>S.id===y.value)||{};return i.h(Yh,{org:_,selected:b},{default:O.constant("-")})},g=y=>{u.cancel();const b=l.value.find(_=>_.id===y)||{};(r.allowSelectTerminated||!c(b))&&o("select",b)},m=i.ref(null);function p(){m.value.focus()}return e({focus:p}),(y,b)=>{const _=D.NAutoComplete;return i.openBlock(),i.createBlock(_,{ref_key:"autoCompleteElement",ref:m,value:s.value,"onUpdate:value":[b[0]||(b[0]=S=>s.value=S),i.unref(u)],clearable:t.clearable,disabled:t.disabled,loading:a.value,options:d.value,"render-label":f,placeholder:"",onSelect:g},null,8,["value","clearable","disabled","loading","options","onUpdate:value"])}}}),DS={},LS=i.defineComponent({...DS,__name:"button-with-confirm-action",props:{disabled:{type:Boolean,default:!1},dialogTitle:{default:""},dialogContent:{default:""},disableConfirm:{type:Boolean,default:!1},popoverText:{default:""},type:{default:"default"},size:{default:"small"},quaternary:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},ghost:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},emits:["accept"],setup(t,{emit:e}){const n=t,r=e,o=i.ref(!1),s=()=>{r("accept",()=>{o.value=!1})},a=()=>{n.disableConfirm?s():o.value=!0};return(l,c)=>{const d=D.NButton,u=D.NPopover,h=D.NModal;return i.openBlock(),i.createElementBlock("div",null,[i.createVNode(u,{disabled:t.popoverText.length===0,placement:"bottom"},{trigger:i.withCtx(()=>[i.createVNode(d,{disabled:t.disabled,ghost:t.ghost,loading:t.loading,size:t.size,type:t.type,quaternary:t.quaternary,circle:t.circle,onClick:a},{default:i.withCtx(()=>[i.renderSlot(l.$slots,"default")]),_:3},8,["disabled","ghost","loading","size","type","quaternary","circle"])]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(t.popoverText),1)]),_:3},8,["disabled"]),i.createVNode(h,{show:o.value,"onUpdate:show":c[1]||(c[1]=f=>o.value=f),content:t.dialogContent,closable:!1,"mask-closable":!1,"show-icon":!1,title:t.dialogTitle,"action-class":"",preset:"dialog"},{action:i.withCtx(()=>[i.createVNode(d,{type:"primary",class:"px-8",onClick:s},{default:i.withCtx(()=>[...c[2]||(c[2]=[i.createTextVNode(" Да ",-1)])]),_:1}),i.createVNode(d,{type:"default",onClick:c[0]||(c[0]=f=>o.value=!1)},{default:i.withCtx(()=>[...c[3]||(c[3]=[i.createTextVNode(" Отмена ",-1)])]),_:1})]),_:1},8,["show","content","title"])])}}}),HS={key:0,class:"whitespace-pre-line"},WS={key:1,class:"text-sc-dark-grey"},jS={},qS=i.defineComponent({...jS,__name:"comment-editor",props:{disabled:{type:Boolean,default:!1},comment:{default:""}},emits:["update:comment"],setup(t,{emit:e}){const n=t,r=e,o=i.ref(n.comment);i.watch(()=>o.value,l=>{o.value=l});const s=l=>{r("update:comment",o.value,l)},a=()=>{o.value=n.comment};return(l,c)=>{const d=D.NInput;return i.openBlock(),i.createBlock(Xd,{disabled:t.disabled,"onEditor:apply":s,"onEditor:cancel":a},{viewer:i.withCtx(()=>[i.createElementVNode("div",null,[t.comment?(i.openBlock(),i.createElementBlock("span",HS,i.toDisplayString(t.comment),1)):(i.openBlock(),i.createElementBlock("span",WS," - Комментарий отсутствует - "))])]),editor:i.withCtx(()=>[i.createVNode(d,{value:o.value,"onUpdate:value":c[0]||(c[0]=u=>o.value=u),clearable:!0,type:"textarea"},null,8,["value"])]),_:1},8,["disabled"])}}}),XS={},YS=i.defineComponent({...XS,__name:"debt",props:{debt:{default:0},showLabel:{type:Boolean,default:!1},wrapAsSmall:{type:Boolean,default:!1}},setup(t){const e=t,n=i.computed(()=>{let r="";return(e.showLabel??!1)&&(e.debt>0?r="Переплата: ":e.debt<0&&(r="Задолженность: ")),r});return(r,o)=>t.debt!==0?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass({"text-sm":t.wrapAsSmall})},[i.createTextVNode(i.toDisplayString(n.value)+" ",1),i.createElementVNode("span",{class:i.normalizeClass({"text-green-700":t.debt>0,"text-red-700":t.debt<0})},i.toDisplayString(t.debt)+" ₽ ",3)],2)):i.createCommentVNode("",!0)}}),US={viewBox:"0 0 512 512",width:"1.2em",height:"1.2em"};function KS(t,e){return i.openBlock(),i.createElementBlock("svg",US,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M449.07 399.08L278.64 82.58c-12.08-22.44-44.26-22.44-56.35 0L51.87 399.08A32 32 0 0 0 80 446.25h340.89a32 32 0 0 0 28.18-47.17m-198.6-1.83a20 20 0 1 1 20-20a20 20 0 0 1-20 20m21.72-201.15l-5.74 122a16 16 0 0 1-32 0l-5.74-121.95a21.73 21.73 0 0 1 21.5-22.69h.21a21.74 21.74 0 0 1 21.73 22.7Z"},null,-1)])])}const GS=i.markRaw({name:"ion-warning",render:KS}),ZS={},QS=i.defineComponent({...ZS,__name:"warning-icon",props:{popoverText:{default:""},iconClass:{default:"text-sc-warning"}},setup(t){return(e,n)=>{const r=GS,o=D.NPopover;return i.openBlock(),i.createBlock(o,{disabled:t.popoverText.length===0,placement:"bottom"},{trigger:i.withCtx(()=>[i.createVNode(r,{class:i.normalizeClass(`ml-0.5 ${t.iconClass}`)},null,8,["class"])]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(t.popoverText),1)]),_:1},8,["disabled"])}}}),kt=class kt{static init(e,n){kt.messagesService&&kt.notificationsService||(kt.messagesService=e,kt.notificationsService=n)}static getMessagesService(){if(!kt.messagesService)throw new Error("UI provider is not initialized.");return kt.messagesService}static getNotificationsService(){if(!kt.notificationsService)throw new Error("UI provider is not initialized.");return kt.notificationsService}static showNotificationsForErrorResponseData(e,n={}){var r,o;if(O.isEmpty(e.errors)){const s=(o=(r=e.rawError)==null?void 0:r.config)==null?void 0:o.url,a=s?` [ ${s} ]`:"";kt.notificationsService?kt.notificationsService.error({title:"Ошибка выполнения/обработки запроса",content:e.message,meta:`#${e.status}${a}: ${e.statusText}`,duration:3e3}):console.log("Show notification error response data: UI provider is not initialized.",e)}else for(const s in e.errors)Object.prototype.hasOwnProperty.call(n,s)?n[s]=new Y.FieldValidationResultData(e.errors[s].toString(),"error"):kt.messagesService?kt.messagesService.error(e.errors[s].toString()):console.log("Show notification error response data: UI provider is not initialized.",e.errors[s])}};B(kt,"messagesService"),B(kt,"notificationsService");let Ta=kt;const JS=i.computed(()=>Y.useReferencesStore().deliveryTypeReference??[]),eB=i.computed(()=>Y.useReferencesStore().managersList??[]),tB=i.computed(()=>Y.useReferencesStore().opfReference??[]),nB=i.computed(()=>Y.useReferencesStore().partnerGroupsReference??[]),iB=i.computed(()=>Y.useReferencesStore().priceCoefficientsReference??[]),rB=i.computed(()=>Y.useReferencesStore().productFilesTypesReference??[]),oB=i.computed(()=>Y.useReferencesStore().resourceTypesReference),sB=i.computed(()=>Y.useReferencesStore().salesDirectionsReference??[]),aB=i.computed(()=>Y.useReferencesStore().warehousesReference??[]),lB=i.computed(()=>Y.useReferencesStore().paymentTypeReference??[]),cB=i.computed(()=>Y.useReferencesStore().orderStatusReference??[]),dB=i.computed(()=>Y.useReferencesStore().operatorReference??[]),uB=i.computed(()=>Ft.convertReferencesToSelectOptionsList(Y.useReferencesStore().channelPrimaryInterestsReference??[],!0,!1,!0)),hB=i.computed(()=>Ft.convertReferencesToSelectOptionsList(Y.useReferencesStore().sourcePrimaryInterestsReference??[],!0,!1,!0)),fB=t=>Y.HttpRequester.getInstance(Y.ReferenceDataProvider).searchCity(t),mB=t=>Ft.convertReferencesToSelectOptionsList(t,!0,!1,!1,e=>{var n,r,o;return e!=null&&e.isNewRec()?"-":`${e.name}, ${(n=e==null?void 0:e.region)==null?void 0:n.name}, ${(o=(r=e==null?void 0:e.region)==null?void 0:r.country)==null?void 0:o.name}`},e=>e==null?void 0:e.isNewRec()),gB=t=>Y.HttpRequester.getInstance(Y.ClientDataProvider).searchClient(t),pB=t=>Ft.convertReferencesToSelectOptionsList(t,!0,!1,!1,e=>e.isNewRec()?"-":[e.name,e.salesDirection.name?`(${e.salesDirection.name})`:void 0,e.city.name?`г. ${e.city.name}${e.city.region.name?`, ${e.city.region.name}`:""}`:void 0,e.isActive?void 0:"[ Деактивирован ]"].filter(Boolean).join(" "),e=>e==null?void 0:e.isNewRec());j.AddProductToCartDialog=Fb,j.CommonValidators=Jh,j.ConfiguratorSettingsKozyrek=bd,j.ConfiguratorSettingsMosquito=D_,j.ContentHelper=ai,j.DateValidators=ef,j.KozyrekLine=_n,j.KozyrekTailTemplate=zs,j.KozyrekTemplate=Ki,j.NumericValidators=ae,j.OrdersTableFields=Pe,j.Point=Os,j.ScAddressSuggestion=CS,j.ScAddressSuggestionLabel=qh,j.ScBankSuggestion=PS,j.ScBankSuggestionLabel=Xh,j.ScBaseDialog=Dd,j.ScButtonWithConfirmAction=LS,j.ScCategoryCollapse=Od,j.ScClientNameWithShortInfo=yr,j.ScCollapse=Ad,j.ScCollapseItem=Ga,j.ScCommentEditor=qS,j.ScConfiguratorsProductInfo=dr,j.ScContragentWithShortInfo=Ld,j.ScCreatorUserTypeTag=Ca,j.ScCuratorSelect=lS,j.ScDateRange=X_,j.ScDateTimeLabel=go,j.ScDebouncedInput=_1,j.ScDebouncedInputNumber=x1,j.ScDebt=YS,j.ScDialogHeader=e1,j.ScDynamicConfigurator=Vd,j.ScEmail=Kb,j.ScExternalLink=E1,j.ScImageGallery=tl,j.ScInlineEditableItem=Xd,j.ScInlineView=Ls,j.ScKozyrekConfigurator=_d,j.ScKozyrekConfiguratorParamsForm=il,j.ScKozyrekConfiguratorPreview=yd,j.ScKozyrekConfiguratorTemplates=pd,j.ScLightGallery=el,j.ScManagerSelect=dS,j.ScMetalForDoorsConfigurator=Nd,j.ScMetalForDoorsConfiguratorForm=Td,j.ScMosquitoConfigurator=kd,j.ScMosquitoConfiguratorForm=wd,j.ScMosquitoConfiguratorMeasurementInstructions=xd,j.ScMosquitoConfiguratorPreview=Ds,j.ScOrderCommonInfo=Ah,j.ScOrderDeliveryLabel=Mo,j.ScOrderDetails=Lh,j.ScOrderInfo=Hh,j.ScOrderItemParams=Mh,j.ScOrderItemsList=zh,j.ScOrderPayment=va,j.ScOrderProductInfo=Oh,j.ScOrderStatusHistory=Dh,j.ScOrdersList=DC,j.ScOrgSuggestion=zS,j.ScOrgSuggestionLabel=Yh,j.ScPage=Wh,j.ScPageWithSlidingPanel=sS,j.ScPersonContactsBlock=z_,j.ScPhone=__,j.ScPhoneInput=C1,j.ScProductName=cr,j.ScProductsList=o2,j.ScReferenceSelect=zd,j.ScSandwichConfigurator=Ed,j.ScSandwichConfiguratorForm=Rd,j.ScSandwichM2Configurator=Fd,j.ScSandwichM2ConfiguratorForm=Pd,j.ScSearchableProductSelect=Ih,j.ScSearchableReferenceSelect=Vh,j.ScSetClientPriceFormItem=Tb,j.ScShortTextOrderInfo=jC,j.ScSingleFileUploadSelector=o1,j.ScSlidingContentWithDrawer=jh,j.ScStripConfigurator=Bd,j.ScStripConfiguratorForm=Cd,j.ScStripConfiguratorLineItem=vd,j.ScStripConfiguratorPreview=Sd,j.ScUserShortInfo=Sa,j.ScWarningIcon=QS,j.SelectOptionHelper=Ft,j.UiNotificationProvider=Ta,j.Validators=We,j.WindowResolutionEnum=Qe,j.WindowResolutionProvider=Ct,j.channelPrimaryInterestOptionsList=uB,j.componentSizeInjectionKey=ar,j.deliveryTypeReferenceList=JS,j.handleFloatInput=Oi,j.handleIntegerInput=nt,j.isCanSandwichM2Show=L_,j.isCanSandwichShow=Md,j.isConfiguratorType=Id,j.managersReferenceList=eB,j.naiveUiTheme=Lf,j.operatorReferenceList=dB,j.opfReferenceList=tB,j.orderStatusReferenceList=cB,j.parse=et,j.partnerGroupReferenceList=nB,j.paymentTypeReferenceList=lB,j.priceCoefficientsReferenceList=iB,j.productFilesTypesReferenceList=rB,j.renderConfig=je,j.resetInputValidation=tt,j.resourceReferencesList=oB,j.salesDirectionsReferenceList=sB,j.searchCityReferenceDataHandler=fB,j.searchCityReferenceLabelRenderer=mB,j.searchClientReferenceDataHandler=gB,j.searchClientReferenceLabelRenderer=pB,j.selectAllTextOnFocus=Me,j.sourcePrimaryInterestOptionsList=hB,j.warehousesReferenceList=aB,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"})}));