@namba_one/ui-kit-2 1.0.238 → 1.0.240
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +3 -1
- package/dist/index.es.js +991 -977
- package/dist/index.umd.js +14 -14
- package/dist/namba-one-uikit.css +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(X,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(X=typeof globalThis<"u"?globalThis:X||self,o(X.NambaOneUIKit={},X.Vue))})(this,function(X,o){"use strict";var TT=Object.defineProperty;var $T=(X,o,Vo)=>o in X?TT(X,o,{enumerable:!0,configurable:!0,writable:!0,value:Vo}):X[o]=Vo;var pe=(X,o,Vo)=>$T(X,typeof o!="symbol"?o+"":o,Vo);const Vo=o.defineComponent({__name:"TheText",props:{tag:{default:"p"},size:{default:"body"},align:{default:"left"},weight:{default:"regular"},color:{default:"text-common-base-primary-default"},numberOfLines:{},isMono:{type:Boolean,default:!1}},setup(n){const e=o.useCssModule(),t=o.computed(()=>[e.root,e[`font_${n.size}`],e.color,n.color,e[`align_${n.align}`],e[`weight_${n.weight}`],n.isMono&&e["is-mono"]]),r=o.computed(()=>Number(n.numberOfLines)?{style:{"-webkit-line-clamp":n.numberOfLines,display:"-webkit-box","-webkit-box-orient":"vertical","line-clamp":n.numberOfLines,overflow:"hidden","text-overflow":"ellipsis",...Number(n.numberOfLines)===1&&{wordBreak:"break-word"}}}:null);return(a,s)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(a.tag),o.mergeProps({class:t.value},r.value),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),sg={root:"text__root_b04d0","is-mono":"text__is-mono_e76dd",font_title120:"text__font_title120_7bd06",font_title1:"text__font_title1_dde8f",font_title2:"text__font_title2_89154",font_title3:"text__font_title3_16958",font_headline:"text__font_headline_36d5b",font_body:"text__font_body_fe479",font_subhead:"text__font_subhead_389f6",font_caption:"text__font_caption_b0726",color:"text__color_d9872",align_left:"text__align_left_fe6ad",align_center:"text__align_center_8ae03",align_right:"text__align_right_a4211",weight_regular:"text__weight_regular_1f87a",weight_medium:"text__weight_medium_6ec29",weight_semibold:"text__weight_semibold_8cc7f",weight_bold:"text__weight_bold_da49f","is-ellipsis":"text__is-ellipsis_fbdd5"},re=(n,e)=>{const t=n.__vccOpts||n;for(const[r,a]of e)t[r]=a;return t},me=re(Vo,[["__cssModules",{$style:sg}]]),ya=n=>`${Number(n/12).toFixed(3)}rem`,ig=["xlink:href"],$e=re(o.defineComponent({__name:"Icon",props:{name:{},color:{},size:{},height:{}},emits:["click"],setup(n,{emit:e}){const t=e,r=o.useCssModule(),a=o.computed(()=>[r.root,r.color,{[n.color]:n.color!=="inherit"},r[n.name]]),s=o.computed(()=>n.size?{width:ya(Number(n.size)),height:ya(Number(n.height??n.size))}:{});return(i,l)=>(o.openBlock(),o.createElementBlock("i",{class:o.normalizeClass(i.$style.wrapper),onClick:l[0]||(l[0]=c=>t("click",c))},[(o.openBlock(),o.createElementBlock("svg",{class:o.normalizeClass(a.value),style:o.normalizeStyle(s.value)},[o.createElementVNode("use",{"xlink:href":`#${i.name}`},null,8,ig)],6))],2))}}),[["__cssModules",{$style:{wrapper:"Icon__wrapper_036c4",root:"Icon__root_c66c8",color:"Icon__color_4a130"}}]]),lg=["filed-nambaLogo","filled-cross","filled-rpLogo","filled-sort-default","filled-sort-down","filled-sort-up","filled-success","filled-warning","outline-agreement","outline-airplane","outline-alert","outline-api","outline-arrow-down","outline-arrow-left","outline-arrow-right","outline-arrow-up-down","outline-arrow-up-line","outline-arrow-up","outline-balance-scale","outline-bank","outline-beach","outline-bookmark","outline-box","outline-briefcase","outline-browser","outline-brush","outline-building","outline-bulb","outline-calendar","outline-call","outline-carousel","outline-cash","outline-chart-bar-line","outline-check","outline-checkmark-badge","outline-chevron-down-huge","outline-chevron-down","outline-chevron-left","outline-chevron-right","outline-chevron-up","outline-code","outline-coins-stacks","outline-computer","outline-connect","outline-copy","outline-coupon-percent","outline-coupon","outline-credit-card-pos","outline-credit-card","outline-cross","outline-csv-list","outline-currency_bold","outline-currency_medium","outline-currency_regular","outline-currency_semibold","outline-cursor-add","outline-customer-service","outline-delete","outline-delivery-tracking","outline-delivery-truck","outline-distribute-horizontal-center","outline-download","outline-drag-drop-vertical","outline-edit","outline-euro","outline-export","outline-eye-close","outline-eye-open","outline-file","outline-files","outline-filter-horizontal","outline-filter-vertical","outline-flash","outline-h2","outline-help-circle","outline-image","outline-link-square","outline-link","outline-list","outline-lock-password","outline-logout","outline-magic-wand","outline-mail-at-sign","outline-megaphone","outline-menu-dots","outline-messenger","outline-money-bag","outline-money-safe","outline-moon","outline-more-horizontal","outline-more-vertical","outline-mortarboard","outline-move","outline-paint-board","outline-percent","outline-phone-check","outline-placeholder","outline-plus","outline-promo","outline-qr","outline-rocket","outline-search","outline-settings","outline-share","outline-shop-1","outline-shop","outline-sidebar-hide","outline-sidebar-show","outline-snow","outline-sort-by-down","outline-sort-by-up","outline-star","outline-store-add","outline-store-remove","outline-success","outline-sun","outline-table","outline-tag","outline-text-bold","outline-text","outline-time-quarter-pass","outline-time","outline-traffic-jam","outline-transaction-history","outline-trash","outline-two-users","outline-unavailable","outline-unlink","outline-upload","outline-user","outline-wallet-stack","outline-wallet","outline-warning","static-nambaLogo","static-rpLogo","static-telegram","static-whats-app"],cg=o.defineComponent({__name:"Badge",props:{view:{default:"base"},size:{default:"subhead"},weight:{default:"regular"},isRounded:{type:Boolean},iconLeft:{},iconRight:{}},setup(n){const e=o.computed(()=>{switch(n.size){case"subhead":return 16;case"caption":return 14;default:return 14}});return(t,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([t.$style.root,t.$style[`view_${t.view}`],{[t.$style["is-rounded"]]:t.isRounded}])},[t.iconLeft?(o.openBlock(),o.createBlock(o.unref($e),{key:0,name:t.iconLeft,color:"inherit",size:e.value},null,8,["name","size"])):o.createCommentVNode("",!0),o.createVNode(o.unref(me),{color:"inherit",size:t.size,weight:t.weight},{default:o.withCtx(()=>[o.renderSlot(t.$slots,"default")]),_:3},8,["size","weight"]),t.iconRight?(o.openBlock(),o.createBlock(o.unref($e),{key:1,name:t.iconRight,color:"inherit",size:e.value},null,8,["name","size"])):o.createCommentVNode("",!0)],2))}}),Zd={root:"Badge__root_1f7e1","root-skeleton":"Badge__root-skeleton_c8882",size_subhead:"Badge__size_subhead_4a495",size_caption:"Badge__size_caption_73850","is-rounded":"Badge__is-rounded_724ca",view_base:"Badge__view_base_06dcc",view_brand:"Badge__view_brand_2f366",view_secondary:"Badge__view_secondary_f2d5c",view_success:"Badge__view_success_8d08c",view_critical:"Badge__view_critical_1d99a"},ni=re(cg,[["__cssModules",{$style:Zd}]]),dg=re(o.defineComponent({__name:"BadgeSkeleton",props:{isRounded:{type:Boolean},size:{default:"subhead"}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([e.$style.root,e.$style["root-skeleton"],e.$style[`size_${e.size}`],{[e.$style["is-rounded"]]:e.isRounded}])},null,2))}}),[["__cssModules",{$style:Zd}]]),ug="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.75%2010.25C9.42915%2010.25%2010.0804%2010.5199%2010.5605%2011L14%2014.4395L15.4395%2013C15.9196%2012.5199%2016.5709%2012.25%2017.25%2012.25C17.9291%2012.25%2018.5804%2012.5199%2019.0605%2013L20.7324%2014.6719C20.7483%2013.9005%2020.75%2013.0188%2020.75%2012C20.75%209.8662%2020.7484%208.33328%2020.6055%207.15625C20.4646%205.99702%2020.1958%205.28391%2019.7314%204.74023C19.5869%204.57095%2019.4291%204.41313%2019.2598%204.26855C18.7161%203.80424%2018.003%203.5354%2016.8438%203.39453C15.6667%203.25156%2014.1338%203.25%2012%203.25C9.8662%203.25%208.33328%203.25156%207.15625%203.39453C5.99701%203.53539%205.28391%203.80425%204.74023%204.26855C4.57094%204.41314%204.41314%204.57094%204.26855%204.74023C3.80425%205.28391%203.53539%205.99701%203.39453%207.15625C3.25156%208.33328%203.25%209.8662%203.25%2012C3.25%2013.0188%203.25073%2013.9005%203.2666%2014.6719L6.93945%2011C7.41963%2010.5199%208.07084%2010.25%208.75%2010.25ZM8.75%2011.75C8.50397%2011.75%208.26686%2011.8357%208.07813%2011.9902L8%2012.0605L3.53027%2016.5303C3.48275%2016.5778%203.4286%2016.6144%203.37305%2016.6465C3.38005%2016.7132%203.3867%2016.7793%203.39453%2016.8438C3.5354%2018.003%203.80424%2018.7161%204.26855%2019.2598C4.41313%2019.4291%204.57095%2019.5869%204.74023%2019.7314C5.28391%2020.1958%205.99702%2020.4646%207.15625%2020.6055C8.33328%2020.7484%209.8662%2020.75%2012%2020.75C14.1338%2020.75%2015.6667%2020.7484%2016.8438%2020.6055C18.003%2020.4646%2018.7161%2020.1958%2019.2598%2019.7314C19.4291%2019.5869%2019.5869%2019.4291%2019.7314%2019.2598C20.1958%2018.7161%2020.4646%2018.003%2020.6055%2016.8438C20.6133%2016.7793%2020.619%2016.7131%2020.626%2016.6465C20.5921%2016.6268%2020.5575%2016.6074%2020.5264%2016.582L20.4697%2016.5303L18%2014.0605C17.8012%2013.8617%2017.5313%2013.75%2017.25%2013.75C16.9687%2013.75%2016.6988%2013.8617%2016.5%2014.0605L15.0605%2015.5L16.0303%2016.4697L16.082%2016.5264C16.3223%2016.8209%2016.3049%2017.2557%2016.0303%2017.5303C15.7557%2017.8049%2015.3209%2017.8223%2015.0264%2017.582L14.9697%2017.5303L9.5%2012.0605C9.3011%2011.8617%209.03126%2011.75%208.75%2011.75ZM15.5%206.25C16.1903%206.25%2016.75%206.80961%2016.75%207.5C16.75%208.19039%2016.1903%208.75%2015.5%208.75C14.8097%208.75%2014.25%208.19039%2014.25%207.5C14.25%206.80961%2014.8097%206.25%2015.5%206.25ZM22.25%2012C22.25%2014.0959%2022.2512%2015.7359%2022.0947%2017.0244C21.9361%2018.3303%2021.6056%2019.3756%2020.8721%2020.2344C20.6765%2020.4633%2020.4633%2020.6765%2020.2344%2020.8721C19.3756%2021.6056%2018.3303%2021.9361%2017.0244%2022.0947C15.7359%2022.2512%2014.0959%2022.25%2012%2022.25C9.90407%2022.25%208.26408%2022.2512%206.97559%2022.0947C5.66971%2021.9361%204.62447%2021.6056%203.76563%2020.8721C3.53669%2020.6765%203.32348%2020.4633%203.12793%2020.2344C2.3944%2019.3756%202.06392%2018.3303%201.90527%2017.0244C1.74876%2015.7359%201.75%2014.0959%201.75%2012C1.75%209.90407%201.74876%208.26408%201.90527%206.97559C2.06392%205.66971%202.39441%204.62447%203.12793%203.76563C3.32347%203.53668%203.53668%203.32347%203.76563%203.12793C4.62447%202.39441%205.66971%202.06392%206.97559%201.90527C8.26408%201.74876%209.90407%201.75%2012%201.75C14.0959%201.75%2015.7359%201.74876%2017.0244%201.90527C18.3303%202.06392%2019.3756%202.3944%2020.2344%203.12793C20.4633%203.32348%2020.6765%203.53669%2020.8721%203.76563C21.6056%204.62447%2021.9361%205.66971%2022.0947%206.97559C22.2512%208.26408%2022.25%209.90407%2022.25%2012Z'%20fill='currentColor'/%3e%3c/svg%3e",hg=["src"],pg=["width","height","src","alt"],Ho=re(o.defineComponent({__name:"TheImage",props:{src:{},alt:{},width:{},height:{},objectFit:{},hasPlaceholder:{type:Boolean,default:!0},hasPriority:{type:Boolean,default:!1},isLayoutFill:{type:Boolean,default:!1},hasBlendMode:{type:Boolean,default:!1}},setup(n){const e=o.useTemplateRef("image");o.watch(e,l=>{l&&(l.complete?t.value="idle":t.value="loading",l.addEventListener("error",()=>{t.value="error"}))});const t=o.ref("idle"),r=o.computed(()=>({...n.hasPriority&&{fetchpriority:"high"}})),a=o.computed(()=>({opacity:t.value==="idle"?1:0,...n.isLayoutFill&&{width:"100%",height:"100%"}}));function s(){t.value="idle"}function i(){n.hasPlaceholder&&(t.value="error")}return(l,c)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([l.$style.root,l.hasBlendMode&&l.$style.blendMode])},[l.hasPlaceholder&&t.value!=="idle"?(o.openBlock(),o.createElementBlock("div",{key:"placeholder",class:o.normalizeClass([l.$style.placeholder,t.value==="loading"&&l.$style.hasPulse])},null,2)):o.createCommentVNode("",!0),t.value==="error"?(o.openBlock(),o.createElementBlock("div",{key:"fallback",class:o.normalizeClass(l.$style.fallback)},[o.renderSlot(l.$slots,"fallback",{},()=>[o.createElementVNode("img",{src:o.unref(ug),alt:"image placeholder"},null,8,hg)])],2)):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("img",o.mergeProps({key:"image"},r.value,{class:[l.$style.image,l.$style[`objectFit_${l.objectFit}`]],style:a.value,width:l.width,height:l.height,src:l.src,alt:l.alt,ref:"image",onLoad:s,onError:i}),null,16,pg),[[o.vShow,t.value!=="error"]])],2))}}),[["__cssModules",{$style:{root:"TheImage__root_bfa93",blendMode:"TheImage__blendMode_3fd56",image:"TheImage__image_6e6cc",objectFit_cover:"TheImage__objectFit_cover_c1c21",objectFit_contain:"TheImage__objectFit_contain_6fbe6",error:"TheImage__error_ca8b1",placeholder:"TheImage__placeholder_c096b",fallback:"TheImage__fallback_25ba8",hasPulse:"TheImage__hasPulse_e0312",pulse:"TheImage__pulse_6ec00"}}]]),fg=o.defineComponent({__name:"BannerOffer",props:{src:{},alt:{}},setup(n){return(e,t)=>(o.openBlock(),o.createBlock(o.unref(Ho),{class:o.normalizeClass(e.$style.root),src:e.src,alt:e.alt,width:248,height:136,objectFit:"cover",hasPlaceholder:""},null,8,["class","src","alt"]))}}),Jd={root:"BannerOffer__root_b2fc8"},mg=re(fg,[["__cssModules",{$style:Jd}]]),gg={};function yg(n,e){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(n.$style.root)},null,2)}const bg=re(gg,[["render",yg],["__cssModules",{$style:Jd}]]);function eu({tag:n,emits:e}){return n==="button"?{click:t=>e("click",t)}:{}}const _r=re(o.defineComponent({__name:"Loader",props:{color:{},size:{}},setup(n){const e=o.useCssModule(),t=o.computed(()=>[e.root,n.color]),r=o.computed(()=>({width:ya(Number(n.size)),height:ya(Number(n.size))}));return(a,s)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(t.value),style:o.normalizeStyle(r.value)},s[0]||(s[0]=[o.createElementVNode("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o.createElementVNode("path",{d:"M47.7766 27.2672C47.1217 32.0334 45.0494 36.4927 41.8287 40.0666C38.6081 43.6405 34.3876 46.164 29.715 47.3096C25.0424 48.4552 20.1334 48.1701 15.6248 46.4913C11.1163 44.8124 7.21636 41.8173 4.4311 37.8945C1.64583 33.9718 0.103788 29.3025 0.00505465 24.4925C-0.0936792 19.6826 1.25545 14.9539 3.8774 10.9202C6.49934 6.88648 10.2731 3.73385 14.7089 1.87138C19.1448 0.00891139 24.038 -0.477421 28.7537 0.475486L28.0406 4.00416C24.0323 3.19419 19.8731 3.60757 16.1026 5.19067C12.3321 6.77377 9.12444 9.45351 6.89579 12.8822C4.66713 16.3109 3.52037 20.3302 3.6043 24.4187C3.68822 28.5071 4.99895 32.476 7.36643 35.8104C9.73391 39.1447 13.0488 41.6905 16.8811 43.1176C20.7134 44.5446 24.8861 44.787 28.8578 43.8132C32.8295 42.8394 36.4168 40.6945 39.1544 37.6566C41.892 34.6188 43.6534 30.8284 44.2101 26.7771L47.7766 27.2672Z"})],-1)]),6))}}),[["__cssModules",{$style:{root:"Loader__root_98d6a",rotate360:"Loader__rotate360_a505d"}}]]);function oi({tag:n,href:e,isDisabled:t}){switch(n){case"button":return{role:"button",type:"button",disabled:t};case"router-link":return{to:e??{}};case"a":return{href:e,...!((e==null?void 0:e.indexOf("tel:"))!==-1||(e==null?void 0:e.indexOf("mailto:"))!==-1)&&{rel:"noopener noreferrer",target:"_blank"}};default:return{}}}const ba={"fade-enter-active":"TransitionFadeBlur__fade-enter-active_2a3b9","fade-leave-active":"TransitionFadeBlur__fade-leave-active_b3dd4","fade-enter-from":"TransitionFadeBlur__fade-enter-from_1eed6","fade-leave-to":"TransitionFadeBlur__fade-leave-to_9518f"},$t=o.defineComponent({name:"TransitionFadeBlur",props:{appear:{type:Boolean,default:!1},mode:{type:String,default:"out-in"},duration:{type:Number,default:300}},setup(n,{slots:e}){return()=>{var r;const t=(r=e.default)==null?void 0:r.call(e);return o.h(o.Transition,{name:"fade",appear:n.appear,mode:n.mode,duration:n.duration,enterFromClass:ba["fade-enter-from"],enterActiveClass:ba["fade-enter-active"],leaveActiveClass:ba["fade-leave-active"],leaveToClass:ba["fade-leave-to"]},{default:()=>t})}}});function kg(n){switch(n){case"base-primary":case"critical-primary":return"foreground-interactive-button-base-primary";case"critical":return"foreground-interactive-button-critical";case"secondary":return"icon-button-base-primary";case"brand-flat":return"foreground-interactive-button-brand-flat";default:return"foreground-interactive-button-base"}}function vg(n){switch(n){case"50":case"58":return"22";case"44":case"40":return"20";case"34":return"18";default:return"16"}}function wg(n){switch(n){case"58":case"50":return"22";case"44":return"20";case"40":case"34":return"18";default:return"16"}}function tu({isDisabled:n,view:e}){if(n)switch(e){case"critical-primary":return"foreground-interactive-button-critical-primary-disabled";case"critical":return"foreground-interactive-button-critical";case"base-primary":return"foreground-interactive-button-base-primary-disabled";case"base":return"foreground-interactive-button-base-disabled";case"base-flat":return"foreground-interactive-button-base-flat-disabled";case"brand-flat":return"foreground-interactive-button-brand-flat-disabled";case"product-surface":return"foreground-interactive-button-product-surface-primary";case"surface-shadow":return"foreground-interactive-button-surface-primary-disabled";case"surface":return"foreground-interactive-button-surface-primary-disabled";default:return"text-disable-default"}switch(e){case"critical-primary":return"foreground-interactive-button-critical-primary";case"critical":return"foreground-interactive-button-critical";case"base-primary":return"foreground-interactive-button-base-primary";case"base":return"foreground-interactive-button-base";case"base-flat":return"foreground-interactive-button-base-flat";case"brand-flat":return"foreground-interactive-button-brand-flat";case"product-surface":return"foreground-interactive-button-product-surface-primary";case"surface-shadow":return"foreground-interactive-button-surface-primary";case"secondary":return"text-button-base-primary";case"surface":return"foreground-interactive-button-surface-primary";default:return"text-disable-default"}}const _g=o.defineComponent({__name:"Button",props:{tag:{default:"button"},href:{},isLoading:{type:Boolean},isDisabled:{type:Boolean},view:{default:"base-primary"},size:{},isWide:{type:Boolean},iconLeft:{},iconRight:{}},emits:["click"],setup(n,{emit:e}){const t=o.useCssModule(),r=e,a=o.useSlots(),s=o.computed(()=>oi({isDisabled:n.isDisabled,href:n.href,tag:n.tag})),i=o.computed(()=>eu({tag:n.tag,emits:r})),l=o.computed(()=>[t.root,t[`size_${n.size}`],t[`view_${n.view}`],{[t["is-wide"]]:n.isWide,[t["is-loading"]]:n.isLoading,[t["is-disabled"]]:n.isDisabled}]),c=o.computed(()=>kg(n.view)),d=o.computed(()=>vg(n.size)),u=o.computed(()=>{switch(n.size){case"58":case"50":return"headline";case"44":case"40":case"34":return"subhead";default:return"caption"}}),h=o.computed(()=>{var g;return(((g=a.default)==null?void 0:g.call(a)[0].children)??"")+(n.iconLeft??"")+(n.iconRight??"")}),p=o.computed(()=>wg(n.size)),m=o.computed(()=>tu({isDisabled:n.isDisabled,view:n.view})),f=o.computed(()=>tu({isDisabled:n.isDisabled,view:n.view}));return(g,x)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(g.tag),o.mergeProps({class:l.value},s.value,o.toHandlers(i.value)),{default:o.withCtx(()=>[o.createVNode(o.unref($t),null,{default:o.withCtx(()=>[(o.openBlock(),o.createElementBlock("div",{key:h.value},[o.createElementVNode("div",{class:o.normalizeClass(g.$style.content)},[g.iconLeft?(o.openBlock(),o.createBlock(o.unref($e),{key:0,class:o.normalizeClass(g.$style.icon),name:g.iconLeft,size:p.value,color:m.value},null,8,["class","name","size","color"])):o.createCommentVNode("",!0),o.createVNode(o.unref(me),{class:o.normalizeClass(g.$style.text),color:f.value,size:u.value,tag:"span"},{default:o.withCtx(()=>[o.renderSlot(g.$slots,"default")]),_:3},8,["class","color","size"]),g.iconRight?(o.openBlock(),o.createBlock(o.unref($e),{key:1,class:o.normalizeClass(g.$style.icon),name:g.iconRight,size:p.value,color:m.value},null,8,["class","name","size","color"])):o.createCommentVNode("",!0)],2)]))]),_:3}),o.createVNode(o.unref($t),null,{default:o.withCtx(()=>[g.isLoading?(o.openBlock(),o.createBlock(o.unref(_r),{key:0,size:d.value,class:o.normalizeClass(o.unref(t).loader),color:c.value},null,8,["size","class","color"])):o.createCommentVNode("",!0)]),_:1})]),_:3},16,["class"]))}}),nu={"is-disabled":"Button__is-disabled_0753a","is-loading":"Button__is-loading_49015",content:"Button__content_e1019",loader:"Button__loader_cb046",root:"Button__root_6d1bc","view_critical-primary":"Button__view_critical-primary_99ca7",view_critical:"Button__view_critical_5dcc3","view_base-primary":"Button__view_base-primary_be639",view_base:"Button__view_base_99112","view_base-flat":"Button__view_base-flat_abd37",icon:"Button__icon_6011d",text:"Button__text_c0761","view_brand-flat":"Button__view_brand-flat_e7e1f","view_product-surface":"Button__view_product-surface_33e5c","view_surface-shadow":"Button__view_surface-shadow_63320",view_surface:"Button__view_surface_807f4",view_secondary:"Button__view_secondary_4e966",size_28:"Button__size_28_c2c84",size_34:"Button__size_34_ae72c",size_40:"Button__size_40_ada0b",size_44:"Button__size_44_00a50",size_50:"Button__size_50_1528d",size_58:"Button__size_58_91d17","is-wide":"Button__is-wide_d2d8a"},tn=re(_g,[["__cssModules",{$style:nu}]]),Cg=re(o.defineComponent({__name:"ButtonSkeleton",props:{view:{default:"base-primary"},size:{default:"50"},isWide:{type:Boolean,default:!0}},setup(n){const e=o.useCssModule(),t=o.computed(()=>[e.root,e[`size_${n.size}`],e[`view_${n.view}`],{[e["is-wide"]]:n.isWide}]);return(r,a)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(t.value)},null,2))}}),[["__cssModules",{$style:nu}]]);function Eg(n){switch(n){case"secondary":return"icon-button-base-primary";case"critical":return"icon-button-critical-primary";case"primary":return"icon-button-base-inverse";case"surface":return"foreground-interactive-button-surface-primary";case"base":return"foreground-interactive-button-base";case"product-surface":return"foreground-interactive-button-product-surface-primary";case"primary-flat":return"foreground-interactive-button-base-flat";case"base-flat":return"foreground-interactive-button-base-flat";default:return"foreground-interactive-button-base"}}function Sg(n){switch(n){case"58":case"50":return"22";case"44":return"20";case"44_s":case"34":return"18";default:return"16"}}function xg(n){switch(n){case"58":case"50":return"22";case"44":case"44_s":case"34":return"18";default:return"16"}}function Bg({isDisabled:n,view:e}){if(n)switch(e){case"secondary":return"text-disable-default";case"critical":case"primary":return"icon-disable-primary";case"surface":case"surface-shadow":return"foreground-interactive-button-surface-primary";case"base":case"base-shadow":return"foreground-interactive-button-base";case"product-surface":return"foreground-interactive-button-product-surface-primary-disabled";case"primary-flat":return"foreground-interactive-button-base-flat";case"base-flat":return"foreground-interactive-button-base-flat";default:return"text-disable-default"}switch(e){case"primary":return"icon-button-base-inverse";case"secondary":return"icon-button-base-primary";case"critical":return"icon-button-critical-primary";case"surface":case"surface-shadow":return"foreground-interactive-button-surface-primary";case"base":case"base-shadow":return"foreground-interactive-button-base";case"product-surface":return"foreground-interactive-button-product-surface-primary";case"primary-flat":return"foreground-interactive-button-base-flat";case"base-flat":return"foreground-interactive-button-base-flat";default:return"text-disable-default"}}function ou(n,e,t){const r=n;let a;const s=(r.ownerDocument||document).defaultView;if(s&&s.getComputedStyle)return e=e.replace(/([A-Z])/g,"-$1").toLowerCase(),s.getComputedStyle(r,null).getPropertyValue(e);if(r.currentStyle)return e=e.replace(/\-(\w)/g,function(i,l){return l.toUpperCase()}),a=r.currentStyle[e],/^\d+(em|pt|%|ex)?$/i.test(a)?function(i){const l=r.style.left,c=r.runtimeStyle.left;return r.runtimeStyle.left=r.currentStyle.left,r.style.left=i||"0",i=r.style.pixelLeft+"px",r.style.left=l,r.runtimeStyle.left=c,i}(a):a}const ru=new Set,Pt=new WeakMap,jo=new WeakMap,ko=new WeakMap,ri=new WeakMap,Tg=new WeakMap,Yo=new WeakMap,ka=new WeakMap,Cr=new WeakSet;let Wn,ai=0,si=0;const Tn="__aa_tgt",Er="__aa_del",va="__aa_new",$g=n=>{const e=Ig(n);e&&e.forEach(t=>Ng(t))},Mg=n=>{n.forEach(e=>{e.target===Wn&&Og(),Pt.has(e.target)&&vo(e.target)})};function Dg(n){const e=ri.get(n);e==null||e.disconnect();let t=Pt.get(n),r=0;const a=5;t||(t=Wo(n),Pt.set(n,t));const{offsetWidth:s,offsetHeight:i}=Wn,c=[t.top-a,s-(t.left+a+t.width),i-(t.top+a+t.height),t.left-a].map(u=>`${-1*Math.floor(u)}px`).join(" "),d=new IntersectionObserver(()=>{++r>1&&vo(n)},{root:Wn,threshold:1,rootMargin:c});d.observe(n),ri.set(n,d)}function vo(n){clearTimeout(ka.get(n));const e=wa(n),t=Sr(e)?500:e.duration;ka.set(n,setTimeout(async()=>{const r=ko.get(n);try{await(r==null?void 0:r.finished),Pt.set(n,Wo(n)),Dg(n)}catch{}},t))}function Og(){clearTimeout(ka.get(Wn)),ka.set(Wn,setTimeout(()=>{ru.forEach(n=>iu(n,e=>au(()=>vo(e))))},100))}function Ag(n){setTimeout(()=>{Tg.set(n,setInterval(()=>au(vo.bind(null,n)),2e3))},Math.round(2e3*Math.random()))}function au(n){typeof requestIdleCallback=="function"?requestIdleCallback(()=>n()):requestAnimationFrame(()=>n())}let ii,Uo;typeof window<"u"&&"ResizeObserver"in window&&(Wn=document.documentElement,ii=new MutationObserver($g),Uo=new ResizeObserver(Mg),window.addEventListener("scroll",()=>{si=window.scrollY,ai=window.scrollX}),Uo.observe(Wn));function Ig(n){return n.reduce((r,a)=>[...r,...Array.from(a.addedNodes),...Array.from(a.removedNodes)],[]).every(r=>r.nodeName==="#comment")?!1:n.reduce((r,a)=>{if(r===!1)return!1;if(a.target instanceof Element){if(li(a.target),!r.has(a.target)){r.add(a.target);for(let s=0;s<a.target.children.length;s++){const i=a.target.children.item(s);if(i){if(Er in i)return!1;li(a.target,i),r.add(i)}}}if(a.removedNodes.length)for(let s=0;s<a.removedNodes.length;s++){const i=a.removedNodes[s];if(Er in i)return!1;i instanceof Element&&(r.add(i),li(a.target,i),jo.set(i,[a.previousSibling,a.nextSibling]))}}return r},new Set)}function li(n,e){!e&&!(Tn in n)?Object.defineProperty(n,Tn,{value:n}):e&&!(Tn in e)&&Object.defineProperty(e,Tn,{value:n})}function Ng(n){var e;const t=n.isConnected,r=Pt.has(n);t&&jo.has(n)&&jo.delete(n),ko.has(n)&&((e=ko.get(n))===null||e===void 0||e.cancel()),va in n?lu(n):r&&t?Lg(n):r&&!t?zg(n):lu(n)}function pn(n){return Number(n.replace(/[^0-9.\-]/g,""))}function Pg(n){let e=n.parentElement;for(;e;){if(e.scrollLeft||e.scrollTop)return{x:e.scrollLeft,y:e.scrollTop};e=e.parentElement}return{x:0,y:0}}function Wo(n){const e=n.getBoundingClientRect(),{x:t,y:r}=Pg(n);return{top:e.top+r,left:e.left+t,width:e.width,height:e.height}}function ci(n,e,t){let r=e.width,a=e.height,s=t.width,i=t.height;const l=getComputedStyle(n);if(l.getPropertyValue("box-sizing")==="content-box"){const d=pn(l.paddingTop)+pn(l.paddingBottom)+pn(l.borderTopWidth)+pn(l.borderBottomWidth),u=pn(l.paddingLeft)+pn(l.paddingRight)+pn(l.borderRightWidth)+pn(l.borderLeftWidth);r-=u,s-=u,a-=d,i-=d}return[r,s,a,i].map(Math.round)}function wa(n){return Tn in n&&Yo.has(n[Tn])?Yo.get(n[Tn]):{duration:250,easing:"ease-in-out"}}function su(n){if(Tn in n)return n[Tn]}function di(n){const e=su(n);return e?Cr.has(e):!1}function iu(n,...e){e.forEach(t=>t(n,Yo.has(n)));for(let t=0;t<n.children.length;t++){const r=n.children.item(t);r&&e.forEach(a=>a(r,Yo.has(r)))}}function ui(n){return Array.isArray(n)?n:[n]}function Sr(n){return typeof n=="function"}function Lg(n){const e=Pt.get(n),t=Wo(n);if(!di(n))return Pt.set(n,t);let r;if(!e)return;const a=wa(n);if(typeof a!="function"){const s=e.left-t.left,i=e.top-t.top,[l,c,d,u]=ci(n,e,t),h={transform:`translate(${s}px, ${i}px)`},p={transform:"translate(0, 0)"};l!==c&&(h.width=`${l}px`,p.width=`${c}px`),d!==u&&(h.height=`${d}px`,p.height=`${u}px`),r=n.animate([h,p],{duration:a.duration,easing:a.easing})}else{const[s]=ui(a(n,"remain",e,t));r=new Animation(s),r.play()}ko.set(n,r),Pt.set(n,t),r.addEventListener("finish",vo.bind(null,n))}function lu(n){va in n&&delete n[va];const e=Wo(n);Pt.set(n,e);const t=wa(n);if(!di(n))return;let r;if(typeof t!="function")r=n.animate([{transform:"scale(.98)",opacity:0},{transform:"scale(0.98)",opacity:0,offset:.5},{transform:"scale(1)",opacity:1}],{duration:t.duration*1.5,easing:"ease-in"});else{const[a]=ui(t(n,"add",e));r=new Animation(a),r.play()}ko.set(n,r),r.addEventListener("finish",vo.bind(null,n))}function cu(n,e){var t;n.remove(),Pt.delete(n),jo.delete(n),ko.delete(n),(t=ri.get(n))===null||t===void 0||t.disconnect(),setTimeout(()=>{if(Er in n&&delete n[Er],Object.defineProperty(n,va,{value:!0,configurable:!0}),e&&n instanceof HTMLElement)for(const r in e)n.style[r]=""},0)}function zg(n){var e;if(!jo.has(n)||!Pt.has(n))return;const[t,r]=jo.get(n);Object.defineProperty(n,Er,{value:!0,configurable:!0});const a=window.scrollX,s=window.scrollY;if(r&&r.parentNode&&r.parentNode instanceof Element?r.parentNode.insertBefore(n,r):t&&t.parentNode?t.parentNode.appendChild(n):(e=su(n))===null||e===void 0||e.appendChild(n),!di(n))return cu(n);const[i,l,c,d]=Rg(n),u=wa(n),h=Pt.get(n);(a!==ai||s!==si)&&Fg(n,a,s,u);let p,m={position:"absolute",top:`${i}px`,left:`${l}px`,width:`${c}px`,height:`${d}px`,margin:"0",pointerEvents:"none",transformOrigin:"center",zIndex:"100"};if(!Sr(u))Object.assign(n.style,m),p=n.animate([{transform:"scale(1)",opacity:1},{transform:"scale(.98)",opacity:0}],{duration:u.duration,easing:"ease-out"});else{const[f,g]=ui(u(n,"remove",h));(g==null?void 0:g.styleReset)!==!1&&(m=(g==null?void 0:g.styleReset)||m,Object.assign(n.style,m)),p=new Animation(f),p.play()}ko.set(n,p),p.addEventListener("finish",cu.bind(null,n,m))}function Fg(n,e,t,r){const a=ai-e,s=si-t,i=document.documentElement.style.scrollBehavior;if(getComputedStyle(Wn).scrollBehavior==="smooth"&&(document.documentElement.style.scrollBehavior="auto"),window.scrollTo(window.scrollX+a,window.scrollY+s),!n.parentElement)return;const c=n.parentElement;let d=c.clientHeight,u=c.clientWidth;const h=performance.now();function p(){requestAnimationFrame(()=>{if(!Sr(r)){const m=d-c.clientHeight,f=u-c.clientWidth;h+r.duration>performance.now()?(window.scrollTo({left:window.scrollX-f,top:window.scrollY-m}),d=c.clientHeight,u=c.clientWidth,p()):document.documentElement.style.scrollBehavior=i}})}p()}function Rg(n){const e=Pt.get(n),[t,,r]=ci(n,e,Wo(n));let a=n.parentElement;for(;a&&(getComputedStyle(a).position==="static"||a instanceof HTMLBodyElement);)a=a.parentElement;a||(a=document.body);const s=getComputedStyle(a),i=Pt.get(a)||Wo(a),l=Math.round(e.top-i.top)-pn(s.borderTopWidth),c=Math.round(e.left-i.left)-pn(s.borderLeftWidth);return[l,c,t,r]}function Vg(n,e={}){return ii&&Uo&&(window.matchMedia("(prefers-reduced-motion: reduce)").matches&&!Sr(e)&&!e.disrespectUserMotionPreference||(Cr.add(n),getComputedStyle(n).position==="static"&&Object.assign(n.style,{position:"relative"}),iu(n,vo,Ag,a=>Uo==null?void 0:Uo.observe(a)),Sr(e)?Yo.set(n,e):Yo.set(n,{duration:250,easing:"ease-in-out",...e}),ii.observe(n,{childList:!0}),ru.add(n))),Object.freeze({parent:n,enable:()=>{Cr.add(n)},disable:()=>{Cr.delete(n)},isEnabled:()=>Cr.has(n)})}const qn=o.defineComponent({__name:"AnimationFadeBlur",props:{isHeight:{type:Boolean,default:!1},duration:{default:300},delay:{default:0}},setup(n){const e=o.ref(null);return o.onMounted(()=>Vg(e.value,(t,r,a,s)=>{let i;if(r==="add"&&(i=[{opacity:0,filter:null},{opacity:1,filter:"blur(0px)"}]),r==="remove"&&(i=[{opacity:1,filter:null},{opacity:0,filter:"blur(5px)"}]),r==="remain"){const l=a.left-s.left,c=a.top-s.top,[,,d,u]=ci(t,a,s),h={...n.isHeight&&{transform:`translate(${l}px, ${c}px)`},filter:"blur(5px)"},p={...n.isHeight&&{transform:"translate(0, 0)"},filter:null};n.isHeight&&d!==u&&(h.height=`${d}px`,p.height=`${u}px`),i=[h,p]}return new KeyframeEffect(t,i,{duration:Number(n.duration),easing:"ease-out",fill:"both",delay:Number(n.delay)})})),(t,r)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"containerRef",ref:e},[o.renderSlot(t.$slots,"default")],512))}}),Hg=o.defineComponent({__name:"ButtonIcon",props:{tag:{default:"button"},href:{},isLoading:{type:Boolean},isDisabled:{type:Boolean},view:{default:"primary"},size:{},icon:{},isRound:{type:Boolean}},emits:["click"],setup(n,{emit:e}){const t=o.useCssModule(),r=e,a=o.computed(()=>oi({isDisabled:n.isDisabled,href:n.href,tag:n.tag})),s=o.computed(()=>eu({tag:n.tag,emits:r})),i=o.computed(()=>[t.root,t[`size_${n.size}`],t[`view_${n.view}`],{[t["is-loading"]]:n.isLoading,[t["is-disabled"]]:n.isDisabled,[t["is-round"]]:n.isRound}]),l=o.computed(()=>Eg(n.view)),c=o.computed(()=>Sg(n.size)),d=o.computed(()=>xg(n.size)),u=o.computed(()=>Bg({isDisabled:n.isDisabled,view:n.view}));return(h,p)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(h.tag),o.mergeProps({class:i.value},a.value,o.toHandlers(s.value)),{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(h.$style.content)},[o.createVNode(o.unref(qn),null,{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.unref($e),{key:h.icon,class:o.normalizeClass(h.$style.icon),name:h.icon,size:d.value,color:u.value},null,8,["class","name","size","color"]))]),_:1})],2),o.createVNode(o.unref($t),null,{default:o.withCtx(()=>[h.isLoading?(o.openBlock(),o.createBlock(o.unref(_r),{key:0,size:c.value,class:o.normalizeClass(o.unref(t).loader),color:l.value},null,8,["size","class","color"])):o.createCommentVNode("",!0)]),_:1})]),_:1},16,["class"]))}}),du={"is-disabled":"ButtonIcon__is-disabled_400c6","is-loading":"ButtonIcon__is-loading_041c5",content:"ButtonIcon__content_5ae8f",loader:"ButtonIcon__loader_d5e82",root:"ButtonIcon__root_d5d4b",view_secondary:"ButtonIcon__view_secondary_925c2",view_critical:"ButtonIcon__view_critical_394e7",view_primary:"ButtonIcon__view_primary_a492c",view_surface:"ButtonIcon__view_surface_905e9",icon:"ButtonIcon__icon_7326a",view_base:"ButtonIcon__view_base_280bf","view_product-surface":"ButtonIcon__view_product-surface_94ca6","view_primary-flat":"ButtonIcon__view_primary-flat_e55d0","view_base-shadow":"ButtonIcon__view_base-shadow_64711","view_surface-shadow":"ButtonIcon__view_surface-shadow_6e652","view_base-flat":"ButtonIcon__view_base-flat_2071f",size_28:"ButtonIcon__size_28_009dd",size_34:"ButtonIcon__size_34_a65bc",size_44:"ButtonIcon__size_44_6bb97",size_50:"ButtonIcon__size_50_8fcdb",size_58:"ButtonIcon__size_58_38db6","is-round":"ButtonIcon__is-round_b75bb"},wo=re(Hg,[["__cssModules",{$style:du}]]),jg=re(o.defineComponent({__name:"ButtonIconSkeleton",props:{view:{default:"base-primary"},size:{default:"50"},isRound:{type:Boolean}},setup(n){const e=o.useCssModule(),t=o.computed(()=>[e.root,e[`size_${n.size}`],e[`view_${n.view}`],{[e["is-round"]]:n.isRound}]);return(r,a)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(t.value)},null,2))}}),[["__cssModules",{$style:du}]]),hi=re(o.defineComponent({__name:"Toggle",props:{value:{type:Boolean,required:!0},valueModifiers:{}},emits:["update:value"],setup(n){const e=o.useModel(n,"value"),t=o.useCssModule(),r=o.computed(()=>[t.root,e.value&&t["is-active"]]);return(a,s)=>(o.openBlock(),o.createElementBlock("button",{class:o.normalizeClass(r.value),onClick:s[0]||(s[0]=i=>e.value=!e.value)},null,2))}}),[["__cssModules",{$style:{root:"Toggle__root_67f2c","is-active":"Toggle__is-active_8c262"}}]]),Yg=o.defineComponent({__name:"CardContent",props:o.mergeModels({title:{},value:{type:Boolean},isSortable:{type:Boolean},isChosen:{type:Boolean},isLoading:{type:Boolean},description:{},image:{},href:{}},{value:{type:Boolean,required:!0},valueModifiers:{}}),emits:o.mergeModels(["clickMoveUp","clickMoveDown"],["update:value"]),setup(n,{emit:e}){const t=o.useModel(n,"value"),r=e;return(a,s)=>(o.openBlock(),o.createElementBlock("article",{class:o.normalizeClass([a.$style.root,{[a.$style["is-chosen"]]:a.isChosen}])},[o.createElementVNode("div",{class:o.normalizeClass(a.$style.card)},[a.isSortable?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(hi),{key:0,value:t.value,"onUpdate:value":s[0]||(s[0]=i=>t.value=i),class:o.normalizeClass({[a.$style.disabled]:a.isLoading})},null,8,["value","class"])),o.createElementVNode("div",{class:o.normalizeClass(a.$style.content)},[a.image?(o.openBlock(),o.createBlock(o.unref(Ho),{key:0,class:o.normalizeClass(a.$style.image),src:a.image,hasPlaceholder:"",alt:"Баннер",width:"80",height:"44",objectFit:"cover"},null,8,["class","src"])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(a.$style.text)},[o.createVNode(o.unref(me),{size:"body",color:"text-common-base-primary-default"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.title),1)]),_:1}),a.description?(o.openBlock(),o.createBlock(o.unref(me),{key:0,size:"subhead",color:"text-common-base-secondary-default"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.description),1)]),_:1})):o.createCommentVNode("",!0)],2)],2),!a.isSortable&&a.href?(o.openBlock(),o.createBlock(o.unref(wo),{key:1,tag:"router-link",size:"44",view:"surface",icon:"outline-edit",href:a.href},null,8,["href"])):o.createCommentVNode("",!0)],2),a.isSortable?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(a.$style.controls)},[o.createVNode(o.unref(wo),{isRound:"",size:"28",view:"surface",icon:"outline-chevron-up",onClick:s[1]||(s[1]=o.withModifiers(i=>r("clickMoveUp"),["stop"]))}),o.createVNode(o.unref(wo),{isRound:"",size:"28",view:"surface",icon:"outline-chevron-down",onClick:s[2]||(s[2]=o.withModifiers(i=>r("clickMoveDown"),["stop"]))})],2)):o.createCommentVNode("",!0)],2))}}),uu={root:"CardContent__root_92dfb",card:"CardContent__card_7836e",content:"CardContent__content_8524f","content-skeleton":"CardContent__content-skeleton_c2a22",text:"CardContent__text_294d6","text-skeleton":"CardContent__text-skeleton_5d6f7",image:"CardContent__image_93233","image-skeleton":"CardContent__image-skeleton_043a1",controls:"CardContent__controls_8537c",disabled:"CardContent__disabled_8204a"},hu=re(Yg,[["__cssModules",{$style:uu}]]),$n=re(o.defineComponent({__name:"TheTextSkeleton",props:{size:{},widthRange:{},color:{}},setup(n){const e=o.useCssModule(),t=o.ref(),r=o.ref(""),a=o.computed(()=>[e.root,e[`size_${n.size}`],e.view,n.color]);function s(){if(n.widthRange&&n.widthRange[0]&&n.widthRange[1]&&t.value){const i=ou(t.value,"max-width");if(i){const l=~i.toString().indexOf("%")?parseInt(i.toString().replace("%",""),10):100,c=parseFloat((Math.abs(n.widthRange[1]-n.widthRange[0])*Math.random()*100).toFixed(2)),d=(n.widthRange[0]>=n.widthRange[1]?n.widthRange[0]:n.widthRange[1])*100;r.value=`${(d-c)*l/100}%`}}}return o.onMounted(s),(i,l)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"skeleton",ref:t,key:r.value,class:o.normalizeClass(a.value),style:o.normalizeStyle({width:r.value})},l[0]||(l[0]=[o.createElementVNode("span",null,null,-1)]),6))}}),[["__cssModules",{$style:{root:"TheTextSkeleton__root_a9bc7",size_title1:"TheTextSkeleton__size_title1_44c2b",size_title2:"TheTextSkeleton__size_title2_18c6c",size_title3:"TheTextSkeleton__size_title3_227a9",size_headline:"TheTextSkeleton__size_headline_02137",size_body:"TheTextSkeleton__size_body_863b5",size_subhead:"TheTextSkeleton__size_subhead_31ae4",size_caption:"TheTextSkeleton__size_caption_50e03"}}]]),pu=re(o.defineComponent({__name:"CardContentSkeleton",props:{isShowImage:{type:Boolean}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("article",{class:o.normalizeClass(e.$style.root)},[o.createElementVNode("div",{class:o.normalizeClass(e.$style.card)},[o.createVNode(o.unref(hi),{value:!1}),o.createElementVNode("div",{class:o.normalizeClass([e.$style.content,e.$style["content-skeleton"]])},[e.isShowImage?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass([e.$style.image,e.$style["image-skeleton"]])},null,2)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass([e.$style.text,e.$style["text-skeleton"]])},[o.createVNode(o.unref($n),{color:"foreground-layout-layout-1-primary",size:"body",widthRange:[.5,.7]}),o.createVNode(o.unref($n),{color:"foreground-layout-layout-1-secondary",size:"subhead",widthRange:[.7,.9]})],2)],2)],2)],2))}}),[["__cssModules",{$style:uu}]]);/*!
|
|
1
|
+
(function(X,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(X=typeof globalThis<"u"?globalThis:X||self,o(X.NambaOneUIKit={},X.Vue))})(this,function(X,o){"use strict";var TT=Object.defineProperty;var $T=(X,o,Vo)=>o in X?TT(X,o,{enumerable:!0,configurable:!0,writable:!0,value:Vo}):X[o]=Vo;var pe=(X,o,Vo)=>$T(X,typeof o!="symbol"?o+"":o,Vo);const Vo=o.defineComponent({__name:"TheText",props:{tag:{default:"p"},size:{default:"body"},align:{default:"left"},weight:{default:"regular"},color:{default:"text-common-base-primary-default"},numberOfLines:{},isMono:{type:Boolean,default:!1}},setup(n){const e=o.useCssModule(),t=o.computed(()=>[e.root,e[`font_${n.size}`],e.color,n.color,e[`align_${n.align}`],e[`weight_${n.weight}`],n.isMono&&e["is-mono"]]),r=o.computed(()=>Number(n.numberOfLines)?{style:{"-webkit-line-clamp":n.numberOfLines,display:"-webkit-box","-webkit-box-orient":"vertical","line-clamp":n.numberOfLines,overflow:"hidden","text-overflow":"ellipsis",...Number(n.numberOfLines)===1&&{wordBreak:"break-word"}}}:null);return(a,s)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(a.tag),o.mergeProps({class:t.value},r.value),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),sg={root:"text__root_b04d0","is-mono":"text__is-mono_e76dd",font_title120:"text__font_title120_7bd06",font_title1:"text__font_title1_dde8f",font_title2:"text__font_title2_89154",font_title3:"text__font_title3_16958",font_headline:"text__font_headline_36d5b",font_body:"text__font_body_fe479",font_subhead:"text__font_subhead_389f6",font_caption:"text__font_caption_b0726",color:"text__color_d9872",align_left:"text__align_left_fe6ad",align_center:"text__align_center_8ae03",align_right:"text__align_right_a4211",weight_regular:"text__weight_regular_1f87a",weight_medium:"text__weight_medium_6ec29",weight_semibold:"text__weight_semibold_8cc7f",weight_bold:"text__weight_bold_da49f","is-ellipsis":"text__is-ellipsis_fbdd5"},re=(n,e)=>{const t=n.__vccOpts||n;for(const[r,a]of e)t[r]=a;return t},me=re(Vo,[["__cssModules",{$style:sg}]]),ya=n=>`${Number(n/12).toFixed(3)}rem`,ig=["xlink:href"],$e=re(o.defineComponent({__name:"Icon",props:{name:{},color:{},size:{},height:{}},emits:["click"],setup(n,{emit:e}){const t=e,r=o.useCssModule(),a=o.computed(()=>[r.root,r.color,{[n.color]:n.color!=="inherit"},r[n.name]]),s=o.computed(()=>n.size?{width:ya(Number(n.size)),height:ya(Number(n.height??n.size))}:{});return(i,l)=>(o.openBlock(),o.createElementBlock("i",{class:o.normalizeClass(i.$style.wrapper),onClick:l[0]||(l[0]=c=>t("click",c))},[(o.openBlock(),o.createElementBlock("svg",{class:o.normalizeClass(a.value),style:o.normalizeStyle(s.value)},[o.createElementVNode("use",{"xlink:href":`#${i.name}`},null,8,ig)],6))],2))}}),[["__cssModules",{$style:{wrapper:"Icon__wrapper_036c4",root:"Icon__root_c66c8",color:"Icon__color_4a130"}}]]),lg=["filed-nambaLogo","filled-cross","filled-rpLogo","filled-sort-default","filled-sort-down","filled-sort-up","filled-success","filled-warning","outline-agreement","outline-airplane","outline-alert","outline-api","outline-arrow-down","outline-arrow-left","outline-arrow-right","outline-arrow-up-down","outline-arrow-up-line","outline-arrow-up","outline-balance-scale","outline-bank","outline-beach","outline-bookmark","outline-box","outline-briefcase","outline-browser","outline-brush","outline-building","outline-bulb","outline-calendar","outline-call","outline-carousel","outline-cash","outline-chart-bar-line","outline-check","outline-checkmark-badge","outline-chevron-down-huge","outline-chevron-down","outline-chevron-left","outline-chevron-right","outline-chevron-up","outline-code","outline-coins-stacks","outline-computer","outline-connect","outline-copy","outline-coupon-percent","outline-coupon","outline-credit-card-pos","outline-credit-card","outline-cross","outline-csv-list","outline-currency_bold","outline-currency_medium","outline-currency_regular","outline-currency_semibold","outline-cursor-add","outline-customer-service","outline-delete","outline-delivery-tracking","outline-delivery-truck","outline-distribute-horizontal-center","outline-download","outline-drag-drop-vertical","outline-edit","outline-euro","outline-export","outline-eye-close","outline-eye-open","outline-file","outline-files","outline-filter-horizontal","outline-filter-vertical","outline-flash","outline-h2","outline-help-circle","outline-image","outline-link-square","outline-link","outline-list","outline-lock-password","outline-logout","outline-magic-wand","outline-mail-at-sign","outline-megaphone","outline-menu-dots","outline-messenger","outline-money-bag","outline-money-safe","outline-moon","outline-more-horizontal","outline-more-vertical","outline-mortarboard","outline-move","outline-paint-board","outline-percent","outline-phone-check","outline-placeholder","outline-plus","outline-promo","outline-qr","outline-rocket","outline-search","outline-settings","outline-share","outline-shop-1","outline-shop","outline-sidebar-hide","outline-sidebar-show","outline-snow","outline-sort-by-down","outline-sort-by-up","outline-star","outline-store-add","outline-store-remove","outline-success","outline-sun","outline-table","outline-tag","outline-text-bold","outline-text","outline-time-quarter-pass","outline-time","outline-traffic-jam","outline-transaction-history","outline-trash","outline-two-users","outline-unavailable","outline-unlink","outline-upload","outline-user","outline-wallet-stack","outline-wallet","outline-warning","static-nambaLogo","static-rpLogo","static-telegram","static-whats-app"],cg=o.defineComponent({__name:"Badge",props:{view:{default:"base"},size:{default:"subhead"},weight:{default:"regular"},isRounded:{type:Boolean},iconLeft:{},iconRight:{}},setup(n){const e=o.computed(()=>{switch(n.size){case"subhead":return 16;case"caption":return 14;default:return 14}});return(t,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([t.$style.root,t.$style[`view_${t.view}`],{[t.$style["is-rounded"]]:t.isRounded}])},[t.iconLeft?(o.openBlock(),o.createBlock(o.unref($e),{key:0,name:t.iconLeft,color:"inherit",size:e.value},null,8,["name","size"])):o.createCommentVNode("",!0),o.createVNode(o.unref(me),{color:"inherit",size:t.size,weight:t.weight},{default:o.withCtx(()=>[o.renderSlot(t.$slots,"default")]),_:3},8,["size","weight"]),t.iconRight?(o.openBlock(),o.createBlock(o.unref($e),{key:1,name:t.iconRight,color:"inherit",size:e.value},null,8,["name","size"])):o.createCommentVNode("",!0)],2))}}),Jd={root:"Badge__root_1f7e1","root-skeleton":"Badge__root-skeleton_c8882",size_subhead:"Badge__size_subhead_4a495",size_caption:"Badge__size_caption_73850","is-rounded":"Badge__is-rounded_724ca",view_base:"Badge__view_base_06dcc",view_brand:"Badge__view_brand_2f366",view_secondary:"Badge__view_secondary_f2d5c",view_success:"Badge__view_success_8d08c",view_critical:"Badge__view_critical_1d99a"},ni=re(cg,[["__cssModules",{$style:Jd}]]),dg=re(o.defineComponent({__name:"BadgeSkeleton",props:{isRounded:{type:Boolean},size:{default:"subhead"}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([e.$style.root,e.$style["root-skeleton"],e.$style[`size_${e.size}`],{[e.$style["is-rounded"]]:e.isRounded}])},null,2))}}),[["__cssModules",{$style:Jd}]]),ug="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.75%2010.25C9.42915%2010.25%2010.0804%2010.5199%2010.5605%2011L14%2014.4395L15.4395%2013C15.9196%2012.5199%2016.5709%2012.25%2017.25%2012.25C17.9291%2012.25%2018.5804%2012.5199%2019.0605%2013L20.7324%2014.6719C20.7483%2013.9005%2020.75%2013.0188%2020.75%2012C20.75%209.8662%2020.7484%208.33328%2020.6055%207.15625C20.4646%205.99702%2020.1958%205.28391%2019.7314%204.74023C19.5869%204.57095%2019.4291%204.41313%2019.2598%204.26855C18.7161%203.80424%2018.003%203.5354%2016.8438%203.39453C15.6667%203.25156%2014.1338%203.25%2012%203.25C9.8662%203.25%208.33328%203.25156%207.15625%203.39453C5.99701%203.53539%205.28391%203.80425%204.74023%204.26855C4.57094%204.41314%204.41314%204.57094%204.26855%204.74023C3.80425%205.28391%203.53539%205.99701%203.39453%207.15625C3.25156%208.33328%203.25%209.8662%203.25%2012C3.25%2013.0188%203.25073%2013.9005%203.2666%2014.6719L6.93945%2011C7.41963%2010.5199%208.07084%2010.25%208.75%2010.25ZM8.75%2011.75C8.50397%2011.75%208.26686%2011.8357%208.07813%2011.9902L8%2012.0605L3.53027%2016.5303C3.48275%2016.5778%203.4286%2016.6144%203.37305%2016.6465C3.38005%2016.7132%203.3867%2016.7793%203.39453%2016.8438C3.5354%2018.003%203.80424%2018.7161%204.26855%2019.2598C4.41313%2019.4291%204.57095%2019.5869%204.74023%2019.7314C5.28391%2020.1958%205.99702%2020.4646%207.15625%2020.6055C8.33328%2020.7484%209.8662%2020.75%2012%2020.75C14.1338%2020.75%2015.6667%2020.7484%2016.8438%2020.6055C18.003%2020.4646%2018.7161%2020.1958%2019.2598%2019.7314C19.4291%2019.5869%2019.5869%2019.4291%2019.7314%2019.2598C20.1958%2018.7161%2020.4646%2018.003%2020.6055%2016.8438C20.6133%2016.7793%2020.619%2016.7131%2020.626%2016.6465C20.5921%2016.6268%2020.5575%2016.6074%2020.5264%2016.582L20.4697%2016.5303L18%2014.0605C17.8012%2013.8617%2017.5313%2013.75%2017.25%2013.75C16.9687%2013.75%2016.6988%2013.8617%2016.5%2014.0605L15.0605%2015.5L16.0303%2016.4697L16.082%2016.5264C16.3223%2016.8209%2016.3049%2017.2557%2016.0303%2017.5303C15.7557%2017.8049%2015.3209%2017.8223%2015.0264%2017.582L14.9697%2017.5303L9.5%2012.0605C9.3011%2011.8617%209.03126%2011.75%208.75%2011.75ZM15.5%206.25C16.1903%206.25%2016.75%206.80961%2016.75%207.5C16.75%208.19039%2016.1903%208.75%2015.5%208.75C14.8097%208.75%2014.25%208.19039%2014.25%207.5C14.25%206.80961%2014.8097%206.25%2015.5%206.25ZM22.25%2012C22.25%2014.0959%2022.2512%2015.7359%2022.0947%2017.0244C21.9361%2018.3303%2021.6056%2019.3756%2020.8721%2020.2344C20.6765%2020.4633%2020.4633%2020.6765%2020.2344%2020.8721C19.3756%2021.6056%2018.3303%2021.9361%2017.0244%2022.0947C15.7359%2022.2512%2014.0959%2022.25%2012%2022.25C9.90407%2022.25%208.26408%2022.2512%206.97559%2022.0947C5.66971%2021.9361%204.62447%2021.6056%203.76563%2020.8721C3.53669%2020.6765%203.32348%2020.4633%203.12793%2020.2344C2.3944%2019.3756%202.06392%2018.3303%201.90527%2017.0244C1.74876%2015.7359%201.75%2014.0959%201.75%2012C1.75%209.90407%201.74876%208.26408%201.90527%206.97559C2.06392%205.66971%202.39441%204.62447%203.12793%203.76563C3.32347%203.53668%203.53668%203.32347%203.76563%203.12793C4.62447%202.39441%205.66971%202.06392%206.97559%201.90527C8.26408%201.74876%209.90407%201.75%2012%201.75C14.0959%201.75%2015.7359%201.74876%2017.0244%201.90527C18.3303%202.06392%2019.3756%202.3944%2020.2344%203.12793C20.4633%203.32348%2020.6765%203.53669%2020.8721%203.76563C21.6056%204.62447%2021.9361%205.66971%2022.0947%206.97559C22.2512%208.26408%2022.25%209.90407%2022.25%2012Z'%20fill='currentColor'/%3e%3c/svg%3e",hg=["src"],pg=["width","height","src","alt"],Ho=re(o.defineComponent({__name:"TheImage",props:{src:{},alt:{},width:{},height:{},objectFit:{},hasPlaceholder:{type:Boolean,default:!0},hasPriority:{type:Boolean,default:!1},isLayoutFill:{type:Boolean,default:!1},hasBlendMode:{type:Boolean,default:!1}},setup(n){const e=o.useTemplateRef("image");o.watch(e,l=>{l&&(l.complete?t.value="idle":t.value="loading",l.addEventListener("error",()=>{t.value="error"}))});const t=o.ref("idle"),r=o.computed(()=>({...n.hasPriority&&{fetchpriority:"high"}})),a=o.computed(()=>({opacity:t.value==="idle"?1:0,...n.isLayoutFill&&{width:"100%",height:"100%"}}));function s(){t.value="idle"}function i(){n.hasPlaceholder&&(t.value="error")}return(l,c)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([l.$style.root,l.hasBlendMode&&l.$style.blendMode])},[l.hasPlaceholder&&t.value!=="idle"?(o.openBlock(),o.createElementBlock("div",{key:"placeholder",class:o.normalizeClass([l.$style.placeholder,t.value==="loading"&&l.$style.hasPulse])},null,2)):o.createCommentVNode("",!0),t.value==="error"?(o.openBlock(),o.createElementBlock("div",{key:"fallback",class:o.normalizeClass(l.$style.fallback)},[o.renderSlot(l.$slots,"fallback",{},()=>[o.createElementVNode("img",{src:o.unref(ug),alt:"image placeholder"},null,8,hg)])],2)):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("img",o.mergeProps({key:"image"},r.value,{class:[l.$style.image,l.$style[`objectFit_${l.objectFit}`]],style:a.value,width:l.width,height:l.height,src:l.src,alt:l.alt,ref:"image",onLoad:s,onError:i}),null,16,pg),[[o.vShow,t.value!=="error"]])],2))}}),[["__cssModules",{$style:{root:"TheImage__root_bfa93",blendMode:"TheImage__blendMode_3fd56",image:"TheImage__image_6e6cc",objectFit_cover:"TheImage__objectFit_cover_c1c21",objectFit_contain:"TheImage__objectFit_contain_6fbe6",error:"TheImage__error_ca8b1",placeholder:"TheImage__placeholder_c096b",fallback:"TheImage__fallback_25ba8",hasPulse:"TheImage__hasPulse_e0312",pulse:"TheImage__pulse_6ec00"}}]]),fg=o.defineComponent({__name:"BannerOffer",props:{src:{},alt:{}},setup(n){return(e,t)=>(o.openBlock(),o.createBlock(o.unref(Ho),{class:o.normalizeClass(e.$style.root),src:e.src,alt:e.alt,width:248,height:136,objectFit:"cover",hasPlaceholder:""},null,8,["class","src","alt"]))}}),eu={root:"BannerOffer__root_b2fc8"},mg=re(fg,[["__cssModules",{$style:eu}]]),gg={};function yg(n,e){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(n.$style.root)},null,2)}const bg=re(gg,[["render",yg],["__cssModules",{$style:eu}]]);function tu({tag:n,emits:e}){return n==="button"?{click:t=>e("click",t)}:{}}const _r=re(o.defineComponent({__name:"Loader",props:{color:{},size:{}},setup(n){const e=o.useCssModule(),t=o.computed(()=>[e.root,n.color]),r=o.computed(()=>({width:ya(Number(n.size)),height:ya(Number(n.size))}));return(a,s)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(t.value),style:o.normalizeStyle(r.value)},s[0]||(s[0]=[o.createElementVNode("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o.createElementVNode("path",{d:"M47.7766 27.2672C47.1217 32.0334 45.0494 36.4927 41.8287 40.0666C38.6081 43.6405 34.3876 46.164 29.715 47.3096C25.0424 48.4552 20.1334 48.1701 15.6248 46.4913C11.1163 44.8124 7.21636 41.8173 4.4311 37.8945C1.64583 33.9718 0.103788 29.3025 0.00505465 24.4925C-0.0936792 19.6826 1.25545 14.9539 3.8774 10.9202C6.49934 6.88648 10.2731 3.73385 14.7089 1.87138C19.1448 0.00891139 24.038 -0.477421 28.7537 0.475486L28.0406 4.00416C24.0323 3.19419 19.8731 3.60757 16.1026 5.19067C12.3321 6.77377 9.12444 9.45351 6.89579 12.8822C4.66713 16.3109 3.52037 20.3302 3.6043 24.4187C3.68822 28.5071 4.99895 32.476 7.36643 35.8104C9.73391 39.1447 13.0488 41.6905 16.8811 43.1176C20.7134 44.5446 24.8861 44.787 28.8578 43.8132C32.8295 42.8394 36.4168 40.6945 39.1544 37.6566C41.892 34.6188 43.6534 30.8284 44.2101 26.7771L47.7766 27.2672Z"})],-1)]),6))}}),[["__cssModules",{$style:{root:"Loader__root_98d6a",rotate360:"Loader__rotate360_a505d"}}]]);function oi({tag:n,href:e,isDisabled:t}){switch(n){case"button":return{role:"button",type:"button",disabled:t};case"router-link":return{to:e??{}};case"a":return{href:e,...!((e==null?void 0:e.indexOf("tel:"))!==-1||(e==null?void 0:e.indexOf("mailto:"))!==-1)&&{rel:"noopener noreferrer",target:"_blank"}};default:return{}}}const ba={"fade-enter-active":"TransitionFadeBlur__fade-enter-active_2a3b9","fade-leave-active":"TransitionFadeBlur__fade-leave-active_b3dd4","fade-enter-from":"TransitionFadeBlur__fade-enter-from_1eed6","fade-leave-to":"TransitionFadeBlur__fade-leave-to_9518f"},$t=o.defineComponent({name:"TransitionFadeBlur",props:{appear:{type:Boolean,default:!1},mode:{type:String,default:"out-in"},duration:{type:Number,default:300}},setup(n,{slots:e}){return()=>{var r;const t=(r=e.default)==null?void 0:r.call(e);return o.h(o.Transition,{name:"fade",appear:n.appear,mode:n.mode,duration:n.duration,enterFromClass:ba["fade-enter-from"],enterActiveClass:ba["fade-enter-active"],leaveActiveClass:ba["fade-leave-active"],leaveToClass:ba["fade-leave-to"]},{default:()=>t})}}});function kg(n){switch(n){case"base-primary":case"critical-primary":return"foreground-interactive-button-base-primary";case"critical":return"foreground-interactive-button-critical";case"secondary":return"icon-button-base-primary";case"brand-flat":return"foreground-interactive-button-brand-flat";default:return"foreground-interactive-button-base"}}function vg(n){switch(n){case"50":case"58":return"22";case"44":case"40":return"20";case"34":return"18";default:return"16"}}function wg(n){switch(n){case"58":case"50":return"22";case"44":return"20";case"40":case"34":return"18";default:return"16"}}function nu({isDisabled:n,view:e}){if(n)switch(e){case"critical-primary":return"foreground-interactive-button-critical-primary-disabled";case"critical":return"foreground-interactive-button-critical";case"base-primary":return"foreground-interactive-button-base-primary-disabled";case"base":return"foreground-interactive-button-base-disabled";case"base-flat":return"foreground-interactive-button-base-flat-disabled";case"brand-flat":return"foreground-interactive-button-brand-flat-disabled";case"product-surface":return"foreground-interactive-button-product-surface-primary";case"surface-shadow":return"foreground-interactive-button-surface-primary-disabled";case"surface":return"foreground-interactive-button-surface-primary-disabled";default:return"text-disable-default"}switch(e){case"critical-primary":return"foreground-interactive-button-critical-primary";case"critical":return"foreground-interactive-button-critical";case"base-primary":return"foreground-interactive-button-base-primary";case"base":return"foreground-interactive-button-base";case"base-flat":return"foreground-interactive-button-base-flat";case"brand-flat":return"foreground-interactive-button-brand-flat";case"product-surface":return"foreground-interactive-button-product-surface-primary";case"surface-shadow":return"foreground-interactive-button-surface-primary";case"secondary":return"text-button-base-primary";case"surface":return"foreground-interactive-button-surface-primary";default:return"text-disable-default"}}const _g=o.defineComponent({__name:"Button",props:{tag:{default:"button"},href:{},isLoading:{type:Boolean},isDisabled:{type:Boolean},view:{default:"base-primary"},size:{},isWide:{type:Boolean},iconLeft:{},iconRight:{}},emits:["click"],setup(n,{emit:e}){const t=o.useCssModule(),r=e,a=o.useSlots(),s=o.computed(()=>oi({isDisabled:n.isDisabled,href:n.href,tag:n.tag})),i=o.computed(()=>tu({tag:n.tag,emits:r})),l=o.computed(()=>[t.root,t[`size_${n.size}`],t[`view_${n.view}`],{[t["is-wide"]]:n.isWide,[t["is-loading"]]:n.isLoading,[t["is-disabled"]]:n.isDisabled}]),c=o.computed(()=>kg(n.view)),d=o.computed(()=>vg(n.size)),u=o.computed(()=>{switch(n.size){case"58":case"50":return"headline";case"44":case"40":case"34":return"subhead";default:return"caption"}}),h=o.computed(()=>{var g;return(((g=a.default)==null?void 0:g.call(a)[0].children)??"")+(n.iconLeft??"")+(n.iconRight??"")}),p=o.computed(()=>wg(n.size)),m=o.computed(()=>nu({isDisabled:n.isDisabled,view:n.view})),f=o.computed(()=>nu({isDisabled:n.isDisabled,view:n.view}));return(g,x)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(g.tag),o.mergeProps({class:l.value},s.value,o.toHandlers(i.value)),{default:o.withCtx(()=>[o.createVNode(o.unref($t),null,{default:o.withCtx(()=>[(o.openBlock(),o.createElementBlock("div",{key:h.value},[o.createElementVNode("div",{class:o.normalizeClass(g.$style.content)},[g.iconLeft?(o.openBlock(),o.createBlock(o.unref($e),{key:0,class:o.normalizeClass(g.$style.icon),name:g.iconLeft,size:p.value,color:m.value},null,8,["class","name","size","color"])):o.createCommentVNode("",!0),o.createVNode(o.unref(me),{class:o.normalizeClass(g.$style.text),color:f.value,size:u.value,tag:"span"},{default:o.withCtx(()=>[o.renderSlot(g.$slots,"default")]),_:3},8,["class","color","size"]),g.iconRight?(o.openBlock(),o.createBlock(o.unref($e),{key:1,class:o.normalizeClass(g.$style.icon),name:g.iconRight,size:p.value,color:m.value},null,8,["class","name","size","color"])):o.createCommentVNode("",!0)],2)]))]),_:3}),o.createVNode(o.unref($t),null,{default:o.withCtx(()=>[g.isLoading?(o.openBlock(),o.createBlock(o.unref(_r),{key:0,size:d.value,class:o.normalizeClass(o.unref(t).loader),color:c.value},null,8,["size","class","color"])):o.createCommentVNode("",!0)]),_:1})]),_:3},16,["class"]))}}),ou={"is-disabled":"Button__is-disabled_0753a","is-loading":"Button__is-loading_49015",content:"Button__content_e1019",loader:"Button__loader_cb046",root:"Button__root_6d1bc","view_critical-primary":"Button__view_critical-primary_99ca7",view_critical:"Button__view_critical_5dcc3","view_base-primary":"Button__view_base-primary_be639",view_base:"Button__view_base_99112","view_base-flat":"Button__view_base-flat_abd37",icon:"Button__icon_6011d",text:"Button__text_c0761","view_brand-flat":"Button__view_brand-flat_e7e1f","view_product-surface":"Button__view_product-surface_33e5c","view_surface-shadow":"Button__view_surface-shadow_63320",view_surface:"Button__view_surface_807f4",view_secondary:"Button__view_secondary_4e966",size_28:"Button__size_28_c2c84",size_34:"Button__size_34_ae72c",size_40:"Button__size_40_ada0b",size_44:"Button__size_44_00a50",size_50:"Button__size_50_1528d",size_58:"Button__size_58_91d17","is-wide":"Button__is-wide_d2d8a"},tn=re(_g,[["__cssModules",{$style:ou}]]),Cg=re(o.defineComponent({__name:"ButtonSkeleton",props:{view:{default:"base-primary"},size:{default:"50"},isWide:{type:Boolean,default:!0}},setup(n){const e=o.useCssModule(),t=o.computed(()=>[e.root,e[`size_${n.size}`],e[`view_${n.view}`],{[e["is-wide"]]:n.isWide}]);return(r,a)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(t.value)},null,2))}}),[["__cssModules",{$style:ou}]]);function Eg(n){switch(n){case"secondary":return"icon-button-base-primary";case"critical":return"icon-button-critical-primary";case"primary":return"icon-button-base-inverse";case"surface":return"foreground-interactive-button-surface-primary";case"base":return"foreground-interactive-button-base";case"product-surface":return"foreground-interactive-button-product-surface-primary";case"primary-flat":return"foreground-interactive-button-base-flat";case"base-flat":return"foreground-interactive-button-base-flat";default:return"foreground-interactive-button-base"}}function Sg(n){switch(n){case"58":case"50":return"22";case"44":return"20";case"44_s":case"34":return"18";default:return"16"}}function xg(n){switch(n){case"58":case"50":return"22";case"44":case"44_s":case"34":return"18";default:return"16"}}function Bg({isDisabled:n,view:e}){if(n)switch(e){case"secondary":return"text-disable-default";case"critical":case"primary":return"icon-disable-primary";case"surface":case"surface-shadow":return"foreground-interactive-button-surface-primary";case"base":case"base-shadow":return"foreground-interactive-button-base";case"product-surface":return"foreground-interactive-button-product-surface-primary-disabled";case"primary-flat":return"foreground-interactive-button-base-flat";case"base-flat":return"foreground-interactive-button-base-flat";default:return"text-disable-default"}switch(e){case"primary":return"icon-button-base-inverse";case"secondary":return"icon-button-base-primary";case"critical":return"icon-button-critical-primary";case"surface":case"surface-shadow":return"foreground-interactive-button-surface-primary";case"base":case"base-shadow":return"foreground-interactive-button-base";case"product-surface":return"foreground-interactive-button-product-surface-primary";case"primary-flat":return"foreground-interactive-button-base-flat";case"base-flat":return"foreground-interactive-button-base-flat";default:return"text-disable-default"}}function ru(n,e,t){const r=n;let a;const s=(r.ownerDocument||document).defaultView;if(s&&s.getComputedStyle)return e=e.replace(/([A-Z])/g,"-$1").toLowerCase(),s.getComputedStyle(r,null).getPropertyValue(e);if(r.currentStyle)return e=e.replace(/\-(\w)/g,function(i,l){return l.toUpperCase()}),a=r.currentStyle[e],/^\d+(em|pt|%|ex)?$/i.test(a)?function(i){const l=r.style.left,c=r.runtimeStyle.left;return r.runtimeStyle.left=r.currentStyle.left,r.style.left=i||"0",i=r.style.pixelLeft+"px",r.style.left=l,r.runtimeStyle.left=c,i}(a):a}const au=new Set,Pt=new WeakMap,jo=new WeakMap,ko=new WeakMap,ri=new WeakMap,Tg=new WeakMap,Yo=new WeakMap,ka=new WeakMap,Cr=new WeakSet;let Wn,ai=0,si=0;const Tn="__aa_tgt",Er="__aa_del",va="__aa_new",$g=n=>{const e=Ig(n);e&&e.forEach(t=>Ng(t))},Mg=n=>{n.forEach(e=>{e.target===Wn&&Og(),Pt.has(e.target)&&vo(e.target)})};function Dg(n){const e=ri.get(n);e==null||e.disconnect();let t=Pt.get(n),r=0;const a=5;t||(t=Wo(n),Pt.set(n,t));const{offsetWidth:s,offsetHeight:i}=Wn,c=[t.top-a,s-(t.left+a+t.width),i-(t.top+a+t.height),t.left-a].map(u=>`${-1*Math.floor(u)}px`).join(" "),d=new IntersectionObserver(()=>{++r>1&&vo(n)},{root:Wn,threshold:1,rootMargin:c});d.observe(n),ri.set(n,d)}function vo(n){clearTimeout(ka.get(n));const e=wa(n),t=Sr(e)?500:e.duration;ka.set(n,setTimeout(async()=>{const r=ko.get(n);try{await(r==null?void 0:r.finished),Pt.set(n,Wo(n)),Dg(n)}catch{}},t))}function Og(){clearTimeout(ka.get(Wn)),ka.set(Wn,setTimeout(()=>{au.forEach(n=>lu(n,e=>su(()=>vo(e))))},100))}function Ag(n){setTimeout(()=>{Tg.set(n,setInterval(()=>su(vo.bind(null,n)),2e3))},Math.round(2e3*Math.random()))}function su(n){typeof requestIdleCallback=="function"?requestIdleCallback(()=>n()):requestAnimationFrame(()=>n())}let ii,Uo;typeof window<"u"&&"ResizeObserver"in window&&(Wn=document.documentElement,ii=new MutationObserver($g),Uo=new ResizeObserver(Mg),window.addEventListener("scroll",()=>{si=window.scrollY,ai=window.scrollX}),Uo.observe(Wn));function Ig(n){return n.reduce((r,a)=>[...r,...Array.from(a.addedNodes),...Array.from(a.removedNodes)],[]).every(r=>r.nodeName==="#comment")?!1:n.reduce((r,a)=>{if(r===!1)return!1;if(a.target instanceof Element){if(li(a.target),!r.has(a.target)){r.add(a.target);for(let s=0;s<a.target.children.length;s++){const i=a.target.children.item(s);if(i){if(Er in i)return!1;li(a.target,i),r.add(i)}}}if(a.removedNodes.length)for(let s=0;s<a.removedNodes.length;s++){const i=a.removedNodes[s];if(Er in i)return!1;i instanceof Element&&(r.add(i),li(a.target,i),jo.set(i,[a.previousSibling,a.nextSibling]))}}return r},new Set)}function li(n,e){!e&&!(Tn in n)?Object.defineProperty(n,Tn,{value:n}):e&&!(Tn in e)&&Object.defineProperty(e,Tn,{value:n})}function Ng(n){var e;const t=n.isConnected,r=Pt.has(n);t&&jo.has(n)&&jo.delete(n),ko.has(n)&&((e=ko.get(n))===null||e===void 0||e.cancel()),va in n?cu(n):r&&t?Lg(n):r&&!t?zg(n):cu(n)}function pn(n){return Number(n.replace(/[^0-9.\-]/g,""))}function Pg(n){let e=n.parentElement;for(;e;){if(e.scrollLeft||e.scrollTop)return{x:e.scrollLeft,y:e.scrollTop};e=e.parentElement}return{x:0,y:0}}function Wo(n){const e=n.getBoundingClientRect(),{x:t,y:r}=Pg(n);return{top:e.top+r,left:e.left+t,width:e.width,height:e.height}}function ci(n,e,t){let r=e.width,a=e.height,s=t.width,i=t.height;const l=getComputedStyle(n);if(l.getPropertyValue("box-sizing")==="content-box"){const d=pn(l.paddingTop)+pn(l.paddingBottom)+pn(l.borderTopWidth)+pn(l.borderBottomWidth),u=pn(l.paddingLeft)+pn(l.paddingRight)+pn(l.borderRightWidth)+pn(l.borderLeftWidth);r-=u,s-=u,a-=d,i-=d}return[r,s,a,i].map(Math.round)}function wa(n){return Tn in n&&Yo.has(n[Tn])?Yo.get(n[Tn]):{duration:250,easing:"ease-in-out"}}function iu(n){if(Tn in n)return n[Tn]}function di(n){const e=iu(n);return e?Cr.has(e):!1}function lu(n,...e){e.forEach(t=>t(n,Yo.has(n)));for(let t=0;t<n.children.length;t++){const r=n.children.item(t);r&&e.forEach(a=>a(r,Yo.has(r)))}}function ui(n){return Array.isArray(n)?n:[n]}function Sr(n){return typeof n=="function"}function Lg(n){const e=Pt.get(n),t=Wo(n);if(!di(n))return Pt.set(n,t);let r;if(!e)return;const a=wa(n);if(typeof a!="function"){const s=e.left-t.left,i=e.top-t.top,[l,c,d,u]=ci(n,e,t),h={transform:`translate(${s}px, ${i}px)`},p={transform:"translate(0, 0)"};l!==c&&(h.width=`${l}px`,p.width=`${c}px`),d!==u&&(h.height=`${d}px`,p.height=`${u}px`),r=n.animate([h,p],{duration:a.duration,easing:a.easing})}else{const[s]=ui(a(n,"remain",e,t));r=new Animation(s),r.play()}ko.set(n,r),Pt.set(n,t),r.addEventListener("finish",vo.bind(null,n))}function cu(n){va in n&&delete n[va];const e=Wo(n);Pt.set(n,e);const t=wa(n);if(!di(n))return;let r;if(typeof t!="function")r=n.animate([{transform:"scale(.98)",opacity:0},{transform:"scale(0.98)",opacity:0,offset:.5},{transform:"scale(1)",opacity:1}],{duration:t.duration*1.5,easing:"ease-in"});else{const[a]=ui(t(n,"add",e));r=new Animation(a),r.play()}ko.set(n,r),r.addEventListener("finish",vo.bind(null,n))}function du(n,e){var t;n.remove(),Pt.delete(n),jo.delete(n),ko.delete(n),(t=ri.get(n))===null||t===void 0||t.disconnect(),setTimeout(()=>{if(Er in n&&delete n[Er],Object.defineProperty(n,va,{value:!0,configurable:!0}),e&&n instanceof HTMLElement)for(const r in e)n.style[r]=""},0)}function zg(n){var e;if(!jo.has(n)||!Pt.has(n))return;const[t,r]=jo.get(n);Object.defineProperty(n,Er,{value:!0,configurable:!0});const a=window.scrollX,s=window.scrollY;if(r&&r.parentNode&&r.parentNode instanceof Element?r.parentNode.insertBefore(n,r):t&&t.parentNode?t.parentNode.appendChild(n):(e=iu(n))===null||e===void 0||e.appendChild(n),!di(n))return du(n);const[i,l,c,d]=Rg(n),u=wa(n),h=Pt.get(n);(a!==ai||s!==si)&&Fg(n,a,s,u);let p,m={position:"absolute",top:`${i}px`,left:`${l}px`,width:`${c}px`,height:`${d}px`,margin:"0",pointerEvents:"none",transformOrigin:"center",zIndex:"100"};if(!Sr(u))Object.assign(n.style,m),p=n.animate([{transform:"scale(1)",opacity:1},{transform:"scale(.98)",opacity:0}],{duration:u.duration,easing:"ease-out"});else{const[f,g]=ui(u(n,"remove",h));(g==null?void 0:g.styleReset)!==!1&&(m=(g==null?void 0:g.styleReset)||m,Object.assign(n.style,m)),p=new Animation(f),p.play()}ko.set(n,p),p.addEventListener("finish",du.bind(null,n,m))}function Fg(n,e,t,r){const a=ai-e,s=si-t,i=document.documentElement.style.scrollBehavior;if(getComputedStyle(Wn).scrollBehavior==="smooth"&&(document.documentElement.style.scrollBehavior="auto"),window.scrollTo(window.scrollX+a,window.scrollY+s),!n.parentElement)return;const c=n.parentElement;let d=c.clientHeight,u=c.clientWidth;const h=performance.now();function p(){requestAnimationFrame(()=>{if(!Sr(r)){const m=d-c.clientHeight,f=u-c.clientWidth;h+r.duration>performance.now()?(window.scrollTo({left:window.scrollX-f,top:window.scrollY-m}),d=c.clientHeight,u=c.clientWidth,p()):document.documentElement.style.scrollBehavior=i}})}p()}function Rg(n){const e=Pt.get(n),[t,,r]=ci(n,e,Wo(n));let a=n.parentElement;for(;a&&(getComputedStyle(a).position==="static"||a instanceof HTMLBodyElement);)a=a.parentElement;a||(a=document.body);const s=getComputedStyle(a),i=Pt.get(a)||Wo(a),l=Math.round(e.top-i.top)-pn(s.borderTopWidth),c=Math.round(e.left-i.left)-pn(s.borderLeftWidth);return[l,c,t,r]}function Vg(n,e={}){return ii&&Uo&&(window.matchMedia("(prefers-reduced-motion: reduce)").matches&&!Sr(e)&&!e.disrespectUserMotionPreference||(Cr.add(n),getComputedStyle(n).position==="static"&&Object.assign(n.style,{position:"relative"}),lu(n,vo,Ag,a=>Uo==null?void 0:Uo.observe(a)),Sr(e)?Yo.set(n,e):Yo.set(n,{duration:250,easing:"ease-in-out",...e}),ii.observe(n,{childList:!0}),au.add(n))),Object.freeze({parent:n,enable:()=>{Cr.add(n)},disable:()=>{Cr.delete(n)},isEnabled:()=>Cr.has(n)})}const qn=o.defineComponent({__name:"AnimationFadeBlur",props:{isHeight:{type:Boolean,default:!1},duration:{default:300},delay:{default:0}},setup(n){const e=o.ref(null);return o.onMounted(()=>Vg(e.value,(t,r,a,s)=>{let i;if(r==="add"&&(i=[{opacity:0,filter:null},{opacity:1,filter:"blur(0px)"}]),r==="remove"&&(i=[{opacity:1,filter:null},{opacity:0,filter:"blur(5px)"}]),r==="remain"){const l=a.left-s.left,c=a.top-s.top,[,,d,u]=ci(t,a,s),h={...n.isHeight&&{transform:`translate(${l}px, ${c}px)`},filter:"blur(5px)"},p={...n.isHeight&&{transform:"translate(0, 0)"},filter:null};n.isHeight&&d!==u&&(h.height=`${d}px`,p.height=`${u}px`),i=[h,p]}return new KeyframeEffect(t,i,{duration:Number(n.duration),easing:"ease-out",fill:"both",delay:Number(n.delay)})})),(t,r)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"containerRef",ref:e},[o.renderSlot(t.$slots,"default")],512))}}),Hg=o.defineComponent({__name:"ButtonIcon",props:{tag:{default:"button"},href:{},isLoading:{type:Boolean},isDisabled:{type:Boolean},view:{default:"primary"},size:{},icon:{},isRound:{type:Boolean}},emits:["click"],setup(n,{emit:e}){const t=o.useCssModule(),r=e,a=o.computed(()=>oi({isDisabled:n.isDisabled,href:n.href,tag:n.tag})),s=o.computed(()=>tu({tag:n.tag,emits:r})),i=o.computed(()=>[t.root,t[`size_${n.size}`],t[`view_${n.view}`],{[t["is-loading"]]:n.isLoading,[t["is-disabled"]]:n.isDisabled,[t["is-round"]]:n.isRound}]),l=o.computed(()=>Eg(n.view)),c=o.computed(()=>Sg(n.size)),d=o.computed(()=>xg(n.size)),u=o.computed(()=>Bg({isDisabled:n.isDisabled,view:n.view}));return(h,p)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(h.tag),o.mergeProps({class:i.value},a.value,o.toHandlers(s.value)),{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(h.$style.content)},[o.createVNode(o.unref(qn),null,{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.unref($e),{key:h.icon,class:o.normalizeClass(h.$style.icon),name:h.icon,size:d.value,color:u.value},null,8,["class","name","size","color"]))]),_:1})],2),o.createVNode(o.unref($t),null,{default:o.withCtx(()=>[h.isLoading?(o.openBlock(),o.createBlock(o.unref(_r),{key:0,size:c.value,class:o.normalizeClass(o.unref(t).loader),color:l.value},null,8,["size","class","color"])):o.createCommentVNode("",!0)]),_:1})]),_:1},16,["class"]))}}),uu={"is-disabled":"ButtonIcon__is-disabled_400c6","is-loading":"ButtonIcon__is-loading_041c5",content:"ButtonIcon__content_5ae8f",loader:"ButtonIcon__loader_d5e82",root:"ButtonIcon__root_d5d4b",view_secondary:"ButtonIcon__view_secondary_925c2",view_critical:"ButtonIcon__view_critical_394e7",view_primary:"ButtonIcon__view_primary_a492c",view_surface:"ButtonIcon__view_surface_905e9",icon:"ButtonIcon__icon_7326a",view_base:"ButtonIcon__view_base_280bf","view_product-surface":"ButtonIcon__view_product-surface_94ca6","view_primary-flat":"ButtonIcon__view_primary-flat_e55d0","view_base-shadow":"ButtonIcon__view_base-shadow_64711","view_surface-shadow":"ButtonIcon__view_surface-shadow_6e652","view_base-flat":"ButtonIcon__view_base-flat_2071f",size_28:"ButtonIcon__size_28_009dd",size_34:"ButtonIcon__size_34_a65bc",size_44:"ButtonIcon__size_44_6bb97",size_50:"ButtonIcon__size_50_8fcdb",size_58:"ButtonIcon__size_58_38db6","is-round":"ButtonIcon__is-round_b75bb"},wo=re(Hg,[["__cssModules",{$style:uu}]]),jg=re(o.defineComponent({__name:"ButtonIconSkeleton",props:{view:{default:"base-primary"},size:{default:"50"},isRound:{type:Boolean}},setup(n){const e=o.useCssModule(),t=o.computed(()=>[e.root,e[`size_${n.size}`],e[`view_${n.view}`],{[e["is-round"]]:n.isRound}]);return(r,a)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(t.value)},null,2))}}),[["__cssModules",{$style:uu}]]),hi=re(o.defineComponent({__name:"Toggle",props:{value:{type:Boolean,required:!0},valueModifiers:{}},emits:["update:value"],setup(n){const e=o.useModel(n,"value"),t=o.useCssModule(),r=o.computed(()=>[t.root,e.value&&t["is-active"]]);return(a,s)=>(o.openBlock(),o.createElementBlock("button",{class:o.normalizeClass(r.value),onClick:s[0]||(s[0]=i=>e.value=!e.value)},null,2))}}),[["__cssModules",{$style:{root:"Toggle__root_67f2c","is-active":"Toggle__is-active_8c262"}}]]),Yg=o.defineComponent({__name:"CardContent",props:o.mergeModels({title:{},value:{type:Boolean},isSortable:{type:Boolean},isChosen:{type:Boolean},isLoading:{type:Boolean},description:{},image:{},href:{}},{value:{type:Boolean,required:!0},valueModifiers:{}}),emits:o.mergeModels(["clickMoveUp","clickMoveDown"],["update:value"]),setup(n,{emit:e}){const t=o.useModel(n,"value"),r=e;return(a,s)=>(o.openBlock(),o.createElementBlock("article",{class:o.normalizeClass([a.$style.root,{[a.$style["is-chosen"]]:a.isChosen}])},[o.createElementVNode("div",{class:o.normalizeClass(a.$style.card)},[a.isSortable?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(hi),{key:0,value:t.value,"onUpdate:value":s[0]||(s[0]=i=>t.value=i),class:o.normalizeClass({[a.$style.disabled]:a.isLoading})},null,8,["value","class"])),o.createElementVNode("div",{class:o.normalizeClass(a.$style.content)},[a.image?(o.openBlock(),o.createBlock(o.unref(Ho),{key:0,class:o.normalizeClass(a.$style.image),src:a.image,hasPlaceholder:"",alt:"Баннер",width:"80",height:"44",objectFit:"cover"},null,8,["class","src"])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(a.$style.text)},[o.createVNode(o.unref(me),{size:"body",color:"text-common-base-primary-default"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.title),1)]),_:1}),a.description?(o.openBlock(),o.createBlock(o.unref(me),{key:0,size:"subhead",color:"text-common-base-secondary-default"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.description),1)]),_:1})):o.createCommentVNode("",!0)],2)],2),!a.isSortable&&a.href?(o.openBlock(),o.createBlock(o.unref(wo),{key:1,tag:"router-link",size:"44",view:"surface",icon:"outline-edit",href:a.href},null,8,["href"])):o.createCommentVNode("",!0)],2),a.isSortable?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(a.$style.controls)},[o.createVNode(o.unref(wo),{isRound:"",size:"28",view:"surface",icon:"outline-chevron-up",onClick:s[1]||(s[1]=o.withModifiers(i=>r("clickMoveUp"),["stop"]))}),o.createVNode(o.unref(wo),{isRound:"",size:"28",view:"surface",icon:"outline-chevron-down",onClick:s[2]||(s[2]=o.withModifiers(i=>r("clickMoveDown"),["stop"]))})],2)):o.createCommentVNode("",!0)],2))}}),hu={root:"CardContent__root_92dfb",card:"CardContent__card_7836e",content:"CardContent__content_8524f","content-skeleton":"CardContent__content-skeleton_c2a22",text:"CardContent__text_294d6","text-skeleton":"CardContent__text-skeleton_5d6f7",image:"CardContent__image_93233","image-skeleton":"CardContent__image-skeleton_043a1",controls:"CardContent__controls_8537c",disabled:"CardContent__disabled_8204a"},pu=re(Yg,[["__cssModules",{$style:hu}]]),$n=re(o.defineComponent({__name:"TheTextSkeleton",props:{size:{},widthRange:{},color:{}},setup(n){const e=o.useCssModule(),t=o.ref(),r=o.ref(""),a=o.computed(()=>[e.root,e[`size_${n.size}`],e.view,n.color]);function s(){if(n.widthRange&&n.widthRange[0]&&n.widthRange[1]&&t.value){const i=ru(t.value,"max-width");if(i){const l=~i.toString().indexOf("%")?parseInt(i.toString().replace("%",""),10):100,c=parseFloat((Math.abs(n.widthRange[1]-n.widthRange[0])*Math.random()*100).toFixed(2)),d=(n.widthRange[0]>=n.widthRange[1]?n.widthRange[0]:n.widthRange[1])*100;r.value=`${(d-c)*l/100}%`}}}return o.onMounted(s),(i,l)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"skeleton",ref:t,key:r.value,class:o.normalizeClass(a.value),style:o.normalizeStyle({width:r.value})},l[0]||(l[0]=[o.createElementVNode("span",null,null,-1)]),6))}}),[["__cssModules",{$style:{root:"TheTextSkeleton__root_a9bc7",size_title1:"TheTextSkeleton__size_title1_44c2b",size_title2:"TheTextSkeleton__size_title2_18c6c",size_title3:"TheTextSkeleton__size_title3_227a9",size_headline:"TheTextSkeleton__size_headline_02137",size_body:"TheTextSkeleton__size_body_863b5",size_subhead:"TheTextSkeleton__size_subhead_31ae4",size_caption:"TheTextSkeleton__size_caption_50e03"}}]]),fu=re(o.defineComponent({__name:"CardContentSkeleton",props:{isShowImage:{type:Boolean}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("article",{class:o.normalizeClass(e.$style.root)},[o.createElementVNode("div",{class:o.normalizeClass(e.$style.card)},[o.createVNode(o.unref(hi),{value:!1}),o.createElementVNode("div",{class:o.normalizeClass([e.$style.content,e.$style["content-skeleton"]])},[e.isShowImage?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass([e.$style.image,e.$style["image-skeleton"]])},null,2)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass([e.$style.text,e.$style["text-skeleton"]])},[o.createVNode(o.unref($n),{color:"foreground-layout-layout-1-primary",size:"body",widthRange:[.5,.7]}),o.createVNode(o.unref($n),{color:"foreground-layout-layout-1-secondary",size:"subhead",widthRange:[.7,.9]})],2)],2)],2)],2))}}),[["__cssModules",{$style:hu}]]);/*!
|
|
2
2
|
* vue-draggable-next v2.2.0
|
|
3
3
|
* (c) 2023 Anish George
|
|
4
4
|
* @license MIT
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @author RubaXa <trash@rubaxa.org>
|
|
8
8
|
* @author owenm <owen23355@gmail.com>
|
|
9
9
|
* @license MIT
|
|
10
|
-
*/function fu(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable})),t.push.apply(t,r)}return t}function fn(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?fu(Object(t),!0).forEach(function(r){Ug(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):fu(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function _a(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_a=function(e){return typeof e}:_a=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_a(n)}function Ug(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Mn(){return Mn=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Mn.apply(this,arguments)}function Wg(n,e){if(n==null)return{};var t={},r=Object.keys(n),a,s;for(s=0;s<r.length;s++)a=r[s],!(e.indexOf(a)>=0)&&(t[a]=n[a]);return t}function qg(n,e){if(n==null)return{};var t=Wg(n,e),r,a;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(a=0;a<s.length;a++)r=s[a],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(n,r)&&(t[r]=n[r])}return t}var Gg="1.14.0";function Dn(n){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(n)}var On=Dn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),xr=Dn(/Edge/i),mu=Dn(/firefox/i),Br=Dn(/safari/i)&&!Dn(/chrome/i)&&!Dn(/android/i),gu=Dn(/iP(ad|od|hone)/i),Kg=Dn(/chrome/i)&&Dn(/android/i),yu={capture:!1,passive:!1};function He(n,e,t){n.addEventListener(e,t,!On&&yu)}function Re(n,e,t){n.removeEventListener(e,t,!On&&yu)}function Ca(n,e){if(e){if(e[0]===">"&&(e=e.substring(1)),n)try{if(n.matches)return n.matches(e);if(n.msMatchesSelector)return n.msMatchesSelector(e);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(e)}catch{return!1}return!1}}function Xg(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function mn(n,e,t,r){if(n){t=t||document;do{if(e!=null&&(e[0]===">"?n.parentNode===t&&Ca(n,e):Ca(n,e))||r&&n===t)return n;if(n===t)break}while(n=Xg(n))}return null}var bu=/\s+/g;function Rt(n,e,t){if(n&&e)if(n.classList)n.classList[t?"add":"remove"](e);else{var r=(" "+n.className+" ").replace(bu," ").replace(" "+e+" "," ");n.className=(r+(t?" "+e:"")).replace(bu," ")}}function Ce(n,e,t){var r=n&&n.style;if(r){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(t=n.currentStyle),e===void 0?t:t[e];!(e in r)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),r[e]=t+(typeof t=="string"?"":"px")}}function qo(n,e){var t="";if(typeof n=="string")t=n;else do{var r=Ce(n,"transform");r&&r!=="none"&&(t=r+" "+t)}while(!e&&(n=n.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(t)}function ku(n,e,t){if(n){var r=n.getElementsByTagName(e),a=0,s=r.length;if(t)for(;a<s;a++)t(r[a],a);return r}return[]}function gn(){var n=document.scrollingElement;return n||document.documentElement}function gt(n,e,t,r,a){if(!(!n.getBoundingClientRect&&n!==window)){var s,i,l,c,d,u,h;if(n!==window&&n.parentNode&&n!==gn()?(s=n.getBoundingClientRect(),i=s.top,l=s.left,c=s.bottom,d=s.right,u=s.height,h=s.width):(i=0,l=0,c=window.innerHeight,d=window.innerWidth,u=window.innerHeight,h=window.innerWidth),(e||t)&&n!==window&&(a=a||n.parentNode,!On))do if(a&&a.getBoundingClientRect&&(Ce(a,"transform")!=="none"||t&&Ce(a,"position")!=="static")){var p=a.getBoundingClientRect();i-=p.top+parseInt(Ce(a,"border-top-width")),l-=p.left+parseInt(Ce(a,"border-left-width")),c=i+s.height,d=l+s.width;break}while(a=a.parentNode);if(r&&n!==window){var m=qo(a||n),f=m&&m.a,g=m&&m.d;m&&(i/=g,l/=f,h/=f,u/=g,c=i+u,d=l+h)}return{top:i,left:l,bottom:c,right:d,width:h,height:u}}}function vu(n,e,t){for(var r=Gn(n,!0),a=gt(n)[e];r;){var s=gt(r)[t],i=void 0;if(i=a>=s,!i)return r;if(r===gn())break;r=Gn(r,!1)}return!1}function Go(n,e,t,r){for(var a=0,s=0,i=n.children;s<i.length;){if(i[s].style.display!=="none"&&i[s]!==Ee.ghost&&(r||i[s]!==Ee.dragged)&&mn(i[s],t.draggable,n,!1)){if(a===e)return i[s];a++}s++}return null}function pi(n,e){for(var t=n.lastElementChild;t&&(t===Ee.ghost||Ce(t,"display")==="none"||e&&!Ca(t,e));)t=t.previousElementSibling;return t||null}function Kt(n,e){var t=0;if(!n||!n.parentNode)return-1;for(;n=n.previousElementSibling;)n.nodeName.toUpperCase()!=="TEMPLATE"&&n!==Ee.clone&&(!e||Ca(n,e))&&t++;return t}function wu(n){var e=0,t=0,r=gn();if(n)do{var a=qo(n),s=a.a,i=a.d;e+=n.scrollLeft*s,t+=n.scrollTop*i}while(n!==r&&(n=n.parentNode));return[e,t]}function Qg(n,e){for(var t in n)if(n.hasOwnProperty(t)){for(var r in e)if(e.hasOwnProperty(r)&&e[r]===n[t][r])return Number(t)}return-1}function Gn(n,e){if(!n||!n.getBoundingClientRect)return gn();var t=n,r=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var a=Ce(t);if(t.clientWidth<t.scrollWidth&&(a.overflowX=="auto"||a.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(a.overflowY=="auto"||a.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return gn();if(r||e)return t;r=!0}}while(t=t.parentNode);return gn()}function Zg(n,e){if(n&&e)for(var t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function fi(n,e){return Math.round(n.top)===Math.round(e.top)&&Math.round(n.left)===Math.round(e.left)&&Math.round(n.height)===Math.round(e.height)&&Math.round(n.width)===Math.round(e.width)}var Tr;function _u(n,e){return function(){if(!Tr){var t=arguments,r=this;t.length===1?n.call(r,t[0]):n.apply(r,t),Tr=setTimeout(function(){Tr=void 0},e)}}}function Jg(){clearTimeout(Tr),Tr=void 0}function Cu(n,e,t){n.scrollLeft+=e,n.scrollTop+=t}function Eu(n){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(n).cloneNode(!0):t?t(n).clone(!0)[0]:n.cloneNode(!0)}var Vt="Sortable"+new Date().getTime();function ey(){var n=[],e;return{captureAnimationState:function(){if(n=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(a){if(!(Ce(a,"display")==="none"||a===Ee.ghost)){n.push({target:a,rect:gt(a)});var s=fn({},n[n.length-1].rect);if(a.thisAnimationDuration){var i=qo(a,!0);i&&(s.top-=i.f,s.left-=i.e)}a.fromRect=s}})}},addAnimationState:function(r){n.push(r)},removeAnimationState:function(r){n.splice(Qg(n,{target:r}),1)},animateAll:function(r){var a=this;if(!this.options.animation){clearTimeout(e),typeof r=="function"&&r();return}var s=!1,i=0;n.forEach(function(l){var c=0,d=l.target,u=d.fromRect,h=gt(d),p=d.prevFromRect,m=d.prevToRect,f=l.rect,g=qo(d,!0);g&&(h.top-=g.f,h.left-=g.e),d.toRect=h,d.thisAnimationDuration&&fi(p,h)&&!fi(u,h)&&(f.top-h.top)/(f.left-h.left)===(u.top-h.top)/(u.left-h.left)&&(c=ny(f,p,m,a.options)),fi(h,u)||(d.prevFromRect=u,d.prevToRect=h,c||(c=a.options.animation),a.animate(d,f,h,c)),c&&(s=!0,i=Math.max(i,c),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},c),d.thisAnimationDuration=c)}),clearTimeout(e),s?e=setTimeout(function(){typeof r=="function"&&r()},i):typeof r=="function"&&r(),n=[]},animate:function(r,a,s,i){if(i){Ce(r,"transition",""),Ce(r,"transform","");var l=qo(this.el),c=l&&l.a,d=l&&l.d,u=(a.left-s.left)/(c||1),h=(a.top-s.top)/(d||1);r.animatingX=!!u,r.animatingY=!!h,Ce(r,"transform","translate3d("+u+"px,"+h+"px,0)"),this.forRepaintDummy=ty(r),Ce(r,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),Ce(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){Ce(r,"transition",""),Ce(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},i)}}}}function ty(n){return n.offsetWidth}function ny(n,e,t,r){return Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*r.animation}var Ko=[],mi={initializeByDefault:!0},$r={mount:function(e){for(var t in mi)mi.hasOwnProperty(t)&&!(t in e)&&(e[t]=mi[t]);Ko.forEach(function(r){if(r.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),Ko.push(e)},pluginEvent:function(e,t,r){var a=this;this.eventCanceled=!1,r.cancel=function(){a.eventCanceled=!0};var s=e+"Global";Ko.forEach(function(i){t[i.pluginName]&&(t[i.pluginName][s]&&t[i.pluginName][s](fn({sortable:t},r)),t.options[i.pluginName]&&t[i.pluginName][e]&&t[i.pluginName][e](fn({sortable:t},r)))})},initializePlugins:function(e,t,r,a){Ko.forEach(function(l){var c=l.pluginName;if(!(!e.options[c]&&!l.initializeByDefault)){var d=new l(e,t,e.options);d.sortable=e,d.options=e.options,e[c]=d,Mn(r,d.defaults)}});for(var s in e.options)if(e.options.hasOwnProperty(s)){var i=this.modifyOption(e,s,e.options[s]);typeof i<"u"&&(e.options[s]=i)}},getEventProperties:function(e,t){var r={};return Ko.forEach(function(a){typeof a.eventProperties=="function"&&Mn(r,a.eventProperties.call(t[a.pluginName],e))}),r},modifyOption:function(e,t,r){var a;return Ko.forEach(function(s){e[s.pluginName]&&s.optionListeners&&typeof s.optionListeners[t]=="function"&&(a=s.optionListeners[t].call(e[s.pluginName],r))}),a}};function oy(n){var e=n.sortable,t=n.rootEl,r=n.name,a=n.targetEl,s=n.cloneEl,i=n.toEl,l=n.fromEl,c=n.oldIndex,d=n.newIndex,u=n.oldDraggableIndex,h=n.newDraggableIndex,p=n.originalEvent,m=n.putSortable,f=n.extraEventProperties;if(e=e||t&&t[Vt],!!e){var g,x=e.options,E="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!On&&!xr?g=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(g=document.createEvent("Event"),g.initEvent(r,!0,!0)),g.to=i||t,g.from=l||t,g.item=a||t,g.clone=s,g.oldIndex=c,g.newIndex=d,g.oldDraggableIndex=u,g.newDraggableIndex=h,g.originalEvent=p,g.pullMode=m?m.lastPutMode:void 0;var C=fn(fn({},f),$r.getEventProperties(r,e));for(var T in C)g[T]=C[T];t&&t.dispatchEvent(g),x[E]&&x[E].call(e,g)}}var ry=["evt"],Lt=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=r.evt,s=qg(r,ry);$r.pluginEvent.bind(Ee)(e,t,fn({dragEl:ue,parentEl:ot,ghostEl:Oe,rootEl:Qe,nextEl:_o,lastDownEl:Ea,cloneEl:rt,cloneHidden:Kn,dragStarted:Dr,putSortable:vt,activeSortable:Ee.active,originalEvent:a,oldIndex:Xo,oldDraggableIndex:Mr,newIndex:Ht,newDraggableIndex:Xn,hideGhostForTarget:Du,unhideGhostForTarget:Ou,cloneNowHidden:function(){Kn=!0},cloneNowShown:function(){Kn=!1},dispatchSortableEvent:function(l){Mt({sortable:t,name:l,originalEvent:a})}},s))};function Mt(n){oy(fn({putSortable:vt,cloneEl:rt,targetEl:ue,rootEl:Qe,oldIndex:Xo,oldDraggableIndex:Mr,newIndex:Ht,newDraggableIndex:Xn},n))}var ue,ot,Oe,Qe,_o,Ea,rt,Kn,Xo,Ht,Mr,Xn,Sa,vt,Qo=!1,xa=!1,Ba=[],Co,nn,gi,yi,Su,xu,Dr,Zo,Or,Ar=!1,Ta=!1,$a,Ct,bi=[],ki=!1,Ma=[],Da=typeof document<"u",Oa=gu,Bu=xr||On?"cssFloat":"float",ay=Da&&!Kg&&!gu&&"draggable"in document.createElement("div"),Tu=function(){if(Da){if(On)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}}(),$u=function(e,t){var r=Ce(e),a=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),s=Go(e,0,t),i=Go(e,1,t),l=s&&Ce(s),c=i&&Ce(i),d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+gt(s).width,u=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+gt(i).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&l.float&&l.float!=="none"){var h=l.float==="left"?"left":"right";return i&&(c.clear==="both"||c.clear===h)?"vertical":"horizontal"}return s&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||d>=a&&r[Bu]==="none"||i&&r[Bu]==="none"&&d+u>a)?"vertical":"horizontal"},sy=function(e,t,r){var a=r?e.left:e.top,s=r?e.right:e.bottom,i=r?e.width:e.height,l=r?t.left:t.top,c=r?t.right:t.bottom,d=r?t.width:t.height;return a===l||s===c||a+i/2===l+d/2},iy=function(e,t){var r;return Ba.some(function(a){var s=a[Vt].options.emptyInsertThreshold;if(!(!s||pi(a))){var i=gt(a),l=e>=i.left-s&&e<=i.right+s,c=t>=i.top-s&&t<=i.bottom+s;if(l&&c)return r=a}}),r},Mu=function(e){function t(s,i){return function(l,c,d,u){var h=l.options.group.name&&c.options.group.name&&l.options.group.name===c.options.group.name;if(s==null&&(i||h))return!0;if(s==null||s===!1)return!1;if(i&&s==="clone")return s;if(typeof s=="function")return t(s(l,c,d,u),i)(l,c,d,u);var p=(i?l:c).options.group.name;return s===!0||typeof s=="string"&&s===p||s.join&&s.indexOf(p)>-1}}var r={},a=e.group;(!a||_a(a)!="object")&&(a={name:a}),r.name=a.name,r.checkPull=t(a.pull,!0),r.checkPut=t(a.put),r.revertClone=a.revertClone,e.group=r},Du=function(){!Tu&&Oe&&Ce(Oe,"display","none")},Ou=function(){!Tu&&Oe&&Ce(Oe,"display","")};Da&&document.addEventListener("click",function(n){if(xa)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),xa=!1,!1},!0);var Eo=function(e){if(ue){e=e.touches?e.touches[0]:e;var t=iy(e.clientX,e.clientY);if(t){var r={};for(var a in e)e.hasOwnProperty(a)&&(r[a]=e[a]);r.target=r.rootEl=t,r.preventDefault=void 0,r.stopPropagation=void 0,t[Vt]._onDragOver(r)}}},ly=function(e){ue&&ue.parentNode[Vt]._isOutsideThisEl(e.target)};function Ee(n,e){if(!(n&&n.nodeType&&n.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));this.el=n,this.options=e=Mn({},e),n[Vt]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(n.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return $u(n,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(i,l){i.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Ee.supportPointer!==!1&&"PointerEvent"in window&&!Br,emptyInsertThreshold:5};$r.initializePlugins(this,n,t);for(var r in t)!(r in e)&&(e[r]=t[r]);Mu(e);for(var a in this)a.charAt(0)==="_"&&typeof this[a]=="function"&&(this[a]=this[a].bind(this));this.nativeDraggable=e.forceFallback?!1:ay,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?He(n,"pointerdown",this._onTapStart):(He(n,"mousedown",this._onTapStart),He(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(He(n,"dragover",this),He(n,"dragenter",this)),Ba.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Mn(this,ey())}Ee.prototype={constructor:Ee,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Zo=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,ue):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,r=this.el,a=this.options,s=a.preventOnFilter,i=e.type,l=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,c=(l||e).target,d=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||c,u=a.filter;if(gy(r),!ue&&!(/mousedown|pointerdown/.test(i)&&e.button!==0||a.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&Br&&c&&c.tagName.toUpperCase()==="SELECT")&&(c=mn(c,a.draggable,r,!1),!(c&&c.animated)&&Ea!==c)){if(Xo=Kt(c),Mr=Kt(c,a.draggable),typeof u=="function"){if(u.call(this,e,c,this)){Mt({sortable:t,rootEl:d,name:"filter",targetEl:c,toEl:r,fromEl:r}),Lt("filter",t,{evt:e}),s&&e.cancelable&&e.preventDefault();return}}else if(u&&(u=u.split(",").some(function(h){if(h=mn(d,h.trim(),r,!1),h)return Mt({sortable:t,rootEl:h,name:"filter",targetEl:c,fromEl:r,toEl:r}),Lt("filter",t,{evt:e}),!0}),u)){s&&e.cancelable&&e.preventDefault();return}a.handle&&!mn(d,a.handle,r,!1)||this._prepareDragStart(e,l,c)}}},_prepareDragStart:function(e,t,r){var a=this,s=a.el,i=a.options,l=s.ownerDocument,c;if(r&&!ue&&r.parentNode===s){var d=gt(r);if(Qe=s,ue=r,ot=ue.parentNode,_o=ue.nextSibling,Ea=r,Sa=i.group,Ee.dragged=ue,Co={target:ue,clientX:(t||e).clientX,clientY:(t||e).clientY},Su=Co.clientX-d.left,xu=Co.clientY-d.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,ue.style["will-change"]="all",c=function(){if(Lt("delayEnded",a,{evt:e}),Ee.eventCanceled){a._onDrop();return}a._disableDelayedDragEvents(),!mu&&a.nativeDraggable&&(ue.draggable=!0),a._triggerDragStart(e,t),Mt({sortable:a,name:"choose",originalEvent:e}),Rt(ue,i.chosenClass,!0)},i.ignore.split(",").forEach(function(u){ku(ue,u.trim(),vi)}),He(l,"dragover",Eo),He(l,"mousemove",Eo),He(l,"touchmove",Eo),He(l,"mouseup",a._onDrop),He(l,"touchend",a._onDrop),He(l,"touchcancel",a._onDrop),mu&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ue.draggable=!0),Lt("delayStart",this,{evt:e}),i.delay&&(!i.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(xr||On))){if(Ee.eventCanceled){this._onDrop();return}He(l,"mouseup",a._disableDelayedDrag),He(l,"touchend",a._disableDelayedDrag),He(l,"touchcancel",a._disableDelayedDrag),He(l,"mousemove",a._delayedDragTouchMoveHandler),He(l,"touchmove",a._delayedDragTouchMoveHandler),i.supportPointer&&He(l,"pointermove",a._delayedDragTouchMoveHandler),a._dragStartTimer=setTimeout(c,i.delay)}else c()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ue&&vi(ue),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Re(e,"mouseup",this._disableDelayedDrag),Re(e,"touchend",this._disableDelayedDrag),Re(e,"touchcancel",this._disableDelayedDrag),Re(e,"mousemove",this._delayedDragTouchMoveHandler),Re(e,"touchmove",this._delayedDragTouchMoveHandler),Re(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?He(document,"pointermove",this._onTouchMove):t?He(document,"touchmove",this._onTouchMove):He(document,"mousemove",this._onTouchMove):(He(ue,"dragend",this),He(Qe,"dragstart",this._onDragStart));try{document.selection?Ia(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(Qo=!1,Qe&&ue){Lt("dragStarted",this,{evt:t}),this.nativeDraggable&&He(document,"dragover",ly);var r=this.options;!e&&Rt(ue,r.dragClass,!1),Rt(ue,r.ghostClass,!0),Ee.active=this,e&&this._appendGhost(),Mt({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(nn){this._lastX=nn.clientX,this._lastY=nn.clientY,Du();for(var e=document.elementFromPoint(nn.clientX,nn.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(nn.clientX,nn.clientY),e!==t);)t=e;if(ue.parentNode[Vt]._isOutsideThisEl(e),t)do{if(t[Vt]){var r=void 0;if(r=t[Vt]._onDragOver({clientX:nn.clientX,clientY:nn.clientY,target:e,rootEl:t}),r&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);Ou()}},_onTouchMove:function(e){if(Co){var t=this.options,r=t.fallbackTolerance,a=t.fallbackOffset,s=e.touches?e.touches[0]:e,i=Oe&&qo(Oe,!0),l=Oe&&i&&i.a,c=Oe&&i&&i.d,d=Oa&&Ct&&wu(Ct),u=(s.clientX-Co.clientX+a.x)/(l||1)+(d?d[0]-bi[0]:0)/(l||1),h=(s.clientY-Co.clientY+a.y)/(c||1)+(d?d[1]-bi[1]:0)/(c||1);if(!Ee.active&&!Qo){if(r&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<r)return;this._onDragStart(e,!0)}if(Oe){i?(i.e+=u-(gi||0),i.f+=h-(yi||0)):i={a:1,b:0,c:0,d:1,e:u,f:h};var p="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");Ce(Oe,"webkitTransform",p),Ce(Oe,"mozTransform",p),Ce(Oe,"msTransform",p),Ce(Oe,"transform",p),gi=u,yi=h,nn=s}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Oe){var e=this.options.fallbackOnBody?document.body:Qe,t=gt(ue,!0,Oa,!0,e),r=this.options;if(Oa){for(Ct=e;Ce(Ct,"position")==="static"&&Ce(Ct,"transform")==="none"&&Ct!==document;)Ct=Ct.parentNode;Ct!==document.body&&Ct!==document.documentElement?(Ct===document&&(Ct=gn()),t.top+=Ct.scrollTop,t.left+=Ct.scrollLeft):Ct=gn(),bi=wu(Ct)}Oe=ue.cloneNode(!0),Rt(Oe,r.ghostClass,!1),Rt(Oe,r.fallbackClass,!0),Rt(Oe,r.dragClass,!0),Ce(Oe,"transition",""),Ce(Oe,"transform",""),Ce(Oe,"box-sizing","border-box"),Ce(Oe,"margin",0),Ce(Oe,"top",t.top),Ce(Oe,"left",t.left),Ce(Oe,"width",t.width),Ce(Oe,"height",t.height),Ce(Oe,"opacity","0.8"),Ce(Oe,"position",Oa?"absolute":"fixed"),Ce(Oe,"zIndex","100000"),Ce(Oe,"pointerEvents","none"),Ee.ghost=Oe,e.appendChild(Oe),Ce(Oe,"transform-origin",Su/parseInt(Oe.style.width)*100+"% "+xu/parseInt(Oe.style.height)*100+"%")}},_onDragStart:function(e,t){var r=this,a=e.dataTransfer,s=r.options;if(Lt("dragStart",this,{evt:e}),Ee.eventCanceled){this._onDrop();return}Lt("setupClone",this),Ee.eventCanceled||(rt=Eu(ue),rt.draggable=!1,rt.style["will-change"]="",this._hideClone(),Rt(rt,this.options.chosenClass,!1),Ee.clone=rt),r.cloneId=Ia(function(){Lt("clone",r),!Ee.eventCanceled&&(r.options.removeCloneOnHide||Qe.insertBefore(rt,ue),r._hideClone(),Mt({sortable:r,name:"clone"}))}),!t&&Rt(ue,s.dragClass,!0),t?(xa=!0,r._loopId=setInterval(r._emulateDragOver,50)):(Re(document,"mouseup",r._onDrop),Re(document,"touchend",r._onDrop),Re(document,"touchcancel",r._onDrop),a&&(a.effectAllowed="move",s.setData&&s.setData.call(r,a,ue)),He(document,"drop",r),Ce(ue,"transform","translateZ(0)")),Qo=!0,r._dragStartId=Ia(r._dragStarted.bind(r,t,e)),He(document,"selectstart",r),Dr=!0,Br&&Ce(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,r=e.target,a,s,i,l=this.options,c=l.group,d=Ee.active,u=Sa===c,h=l.sort,p=vt||d,m,f=this,g=!1;if(ki)return;function x(N,L){Lt(N,f,fn({evt:e,isOwner:u,axis:m?"vertical":"horizontal",revert:i,dragRect:a,targetRect:s,canSort:h,fromSortable:p,target:r,completed:C,onMove:function(z,oe){return Aa(Qe,t,ue,a,z,gt(z),e,oe)},changed:T},L))}function E(){x("dragOverAnimationCapture"),f.captureAnimationState(),f!==p&&p.captureAnimationState()}function C(N){return x("dragOverCompleted",{insertion:N}),N&&(u?d._hideClone():d._showClone(f),f!==p&&(Rt(ue,vt?vt.options.ghostClass:d.options.ghostClass,!1),Rt(ue,l.ghostClass,!0)),vt!==f&&f!==Ee.active?vt=f:f===Ee.active&&vt&&(vt=null),p===f&&(f._ignoreWhileAnimating=r),f.animateAll(function(){x("dragOverAnimationComplete"),f._ignoreWhileAnimating=null}),f!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(r===ue&&!ue.animated||r===t&&!r.animated)&&(Zo=null),!l.dragoverBubble&&!e.rootEl&&r!==document&&(ue.parentNode[Vt]._isOutsideThisEl(e.target),!N&&Eo(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),g=!0}function T(){Ht=Kt(ue),Xn=Kt(ue,l.draggable),Mt({sortable:f,name:"change",toEl:t,newIndex:Ht,newDraggableIndex:Xn,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),r=mn(r,l.draggable,t,!0),x("dragOver"),Ee.eventCanceled)return g;if(ue.contains(e.target)||r.animated&&r.animatingX&&r.animatingY||f._ignoreWhileAnimating===r)return C(!1);if(xa=!1,d&&!l.disabled&&(u?h||(i=ot!==Qe):vt===this||(this.lastPutMode=Sa.checkPull(this,d,ue,e))&&c.checkPut(this,d,ue,e))){if(m=this._getDirection(e,r)==="vertical",a=gt(ue),x("dragOverValid"),Ee.eventCanceled)return g;if(i)return ot=Qe,E(),this._hideClone(),x("revert"),Ee.eventCanceled||(_o?Qe.insertBefore(ue,_o):Qe.appendChild(ue)),C(!0);var F=pi(t,l.draggable);if(!F||hy(e,m,this)&&!F.animated){if(F===ue)return C(!1);if(F&&t===e.target&&(r=F),r&&(s=gt(r)),Aa(Qe,t,ue,a,r,s,e,!!r)!==!1)return E(),t.appendChild(ue),ot=t,T(),C(!0)}else if(F&&uy(e,m,this)){var I=Go(t,0,l,!0);if(I===ue)return C(!1);if(r=I,s=gt(r),Aa(Qe,t,ue,a,r,s,e,!1)!==!1)return E(),t.insertBefore(ue,I),ot=t,T(),C(!0)}else if(r.parentNode===t){s=gt(r);var O=0,P,M=ue.parentNode!==t,v=!sy(ue.animated&&ue.toRect||a,r.animated&&r.toRect||s,m),b=m?"top":"left",D=vu(r,"top","top")||vu(ue,"top","top"),Y=D?D.scrollTop:void 0;Zo!==r&&(P=s[b],Ar=!1,Ta=!v&&l.invertSwap||M),O=py(e,r,s,m,v?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,Ta,Zo===r);var K;if(O!==0){var w=Kt(ue);do w-=O,K=ot.children[w];while(K&&(Ce(K,"display")==="none"||K===Oe))}if(O===0||K===r)return C(!1);Zo=r,Or=O;var k=r.nextElementSibling,_=!1;_=O===1;var A=Aa(Qe,t,ue,a,r,s,e,_);if(A!==!1)return(A===1||A===-1)&&(_=A===1),ki=!0,setTimeout(dy,30),E(),_&&!k?t.appendChild(ue):r.parentNode.insertBefore(ue,_?k:r),D&&Cu(D,0,Y-D.scrollTop),ot=ue.parentNode,P!==void 0&&!Ta&&($a=Math.abs(P-gt(r)[b])),T(),C(!0)}if(t.contains(ue))return C(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Re(document,"mousemove",this._onTouchMove),Re(document,"touchmove",this._onTouchMove),Re(document,"pointermove",this._onTouchMove),Re(document,"dragover",Eo),Re(document,"mousemove",Eo),Re(document,"touchmove",Eo)},_offUpEvents:function(){var e=this.el.ownerDocument;Re(e,"mouseup",this._onDrop),Re(e,"touchend",this._onDrop),Re(e,"pointerup",this._onDrop),Re(e,"touchcancel",this._onDrop),Re(document,"selectstart",this)},_onDrop:function(e){var t=this.el,r=this.options;if(Ht=Kt(ue),Xn=Kt(ue,r.draggable),Lt("drop",this,{evt:e}),ot=ue&&ue.parentNode,Ht=Kt(ue),Xn=Kt(ue,r.draggable),Ee.eventCanceled){this._nulling();return}Qo=!1,Ta=!1,Ar=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),wi(this.cloneId),wi(this._dragStartId),this.nativeDraggable&&(Re(document,"drop",this),Re(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Br&&Ce(document.body,"user-select",""),Ce(ue,"transform",""),e&&(Dr&&(e.cancelable&&e.preventDefault(),!r.dropBubble&&e.stopPropagation()),Oe&&Oe.parentNode&&Oe.parentNode.removeChild(Oe),(Qe===ot||vt&&vt.lastPutMode!=="clone")&&rt&&rt.parentNode&&rt.parentNode.removeChild(rt),ue&&(this.nativeDraggable&&Re(ue,"dragend",this),vi(ue),ue.style["will-change"]="",Dr&&!Qo&&Rt(ue,vt?vt.options.ghostClass:this.options.ghostClass,!1),Rt(ue,this.options.chosenClass,!1),Mt({sortable:this,name:"unchoose",toEl:ot,newIndex:null,newDraggableIndex:null,originalEvent:e}),Qe!==ot?(Ht>=0&&(Mt({rootEl:ot,name:"add",toEl:ot,fromEl:Qe,originalEvent:e}),Mt({sortable:this,name:"remove",toEl:ot,originalEvent:e}),Mt({rootEl:ot,name:"sort",toEl:ot,fromEl:Qe,originalEvent:e}),Mt({sortable:this,name:"sort",toEl:ot,originalEvent:e})),vt&&vt.save()):Ht!==Xo&&Ht>=0&&(Mt({sortable:this,name:"update",toEl:ot,originalEvent:e}),Mt({sortable:this,name:"sort",toEl:ot,originalEvent:e})),Ee.active&&((Ht==null||Ht===-1)&&(Ht=Xo,Xn=Mr),Mt({sortable:this,name:"end",toEl:ot,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Lt("nulling",this),Qe=ue=ot=Oe=_o=rt=Ea=Kn=Co=nn=Dr=Ht=Xn=Xo=Mr=Zo=Or=vt=Sa=Ee.dragged=Ee.ghost=Ee.clone=Ee.active=null,Ma.forEach(function(e){e.checked=!0}),Ma.length=gi=yi=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":ue&&(this._onDragOver(e),cy(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,r=this.el.children,a=0,s=r.length,i=this.options;a<s;a++)t=r[a],mn(t,i.draggable,this.el,!1)&&e.push(t.getAttribute(i.dataIdAttr)||my(t));return e},sort:function(e,t){var r={},a=this.el;this.toArray().forEach(function(s,i){var l=a.children[i];mn(l,this.options.draggable,a,!1)&&(r[s]=l)},this),t&&this.captureAnimationState(),e.forEach(function(s){r[s]&&(a.removeChild(r[s]),a.appendChild(r[s]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return mn(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var r=this.options;if(t===void 0)return r[e];var a=$r.modifyOption(this,e,t);typeof a<"u"?r[e]=a:r[e]=t,e==="group"&&Mu(r)},destroy:function(){Lt("destroy",this);var e=this.el;e[Vt]=null,Re(e,"mousedown",this._onTapStart),Re(e,"touchstart",this._onTapStart),Re(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(Re(e,"dragover",this),Re(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Ba.splice(Ba.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Kn){if(Lt("hideClone",this),Ee.eventCanceled)return;Ce(rt,"display","none"),this.options.removeCloneOnHide&&rt.parentNode&&rt.parentNode.removeChild(rt),Kn=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Kn){if(Lt("showClone",this),Ee.eventCanceled)return;ue.parentNode==Qe&&!this.options.group.revertClone?Qe.insertBefore(rt,ue):_o?Qe.insertBefore(rt,_o):Qe.appendChild(rt),this.options.group.revertClone&&this.animate(ue,rt),Ce(rt,"display",""),Kn=!1}}};function cy(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function Aa(n,e,t,r,a,s,i,l){var c,d=n[Vt],u=d.options.onMove,h;return window.CustomEvent&&!On&&!xr?c=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(c=document.createEvent("Event"),c.initEvent("move",!0,!0)),c.to=e,c.from=n,c.dragged=t,c.draggedRect=r,c.related=a||e,c.relatedRect=s||gt(e),c.willInsertAfter=l,c.originalEvent=i,n.dispatchEvent(c),u&&(h=u.call(d,c,i)),h}function vi(n){n.draggable=!1}function dy(){ki=!1}function uy(n,e,t){var r=gt(Go(t.el,0,t.options,!0)),a=10;return e?n.clientX<r.left-a||n.clientY<r.top&&n.clientX<r.right:n.clientY<r.top-a||n.clientY<r.bottom&&n.clientX<r.left}function hy(n,e,t){var r=gt(pi(t.el,t.options.draggable)),a=10;return e?n.clientX>r.right+a||n.clientX<=r.right&&n.clientY>r.bottom&&n.clientX>=r.left:n.clientX>r.right&&n.clientY>r.top||n.clientX<=r.right&&n.clientY>r.bottom+a}function py(n,e,t,r,a,s,i,l){var c=r?n.clientY:n.clientX,d=r?t.height:t.width,u=r?t.top:t.left,h=r?t.bottom:t.right,p=!1;if(!i){if(l&&$a<d*a){if(!Ar&&(Or===1?c>u+d*s/2:c<h-d*s/2)&&(Ar=!0),Ar)p=!0;else if(Or===1?c<u+$a:c>h-$a)return-Or}else if(c>u+d*(1-a)/2&&c<h-d*(1-a)/2)return fy(e)}return p=p||i,p&&(c<u+d*s/2||c>h-d*s/2)?c>u+d/2?1:-1:0}function fy(n){return Kt(ue)<Kt(n)?1:-1}function my(n){for(var e=n.tagName+n.className+n.src+n.href+n.textContent,t=e.length,r=0;t--;)r+=e.charCodeAt(t);return r.toString(36)}function gy(n){Ma.length=0;for(var e=n.getElementsByTagName("input"),t=e.length;t--;){var r=e[t];r.checked&&Ma.push(r)}}function Ia(n){return setTimeout(n,0)}function wi(n){return clearTimeout(n)}Da&&He(document,"touchmove",function(n){(Ee.active||Qo)&&n.cancelable&&n.preventDefault()}),Ee.utils={on:He,off:Re,css:Ce,find:ku,is:function(e,t){return!!mn(e,t,e,!1)},extend:Zg,throttle:_u,closest:mn,toggleClass:Rt,clone:Eu,index:Kt,nextTick:Ia,cancelNextTick:wi,detectDirection:$u,getChild:Go},Ee.get=function(n){return n[Vt]},Ee.mount=function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(Ee.utils=fn(fn({},Ee.utils),r.utils)),$r.mount(r)})},Ee.create=function(n,e){return new Ee(n,e)},Ee.version=Gg;var ft=[],Ir,_i,Ci=!1,Ei,Si,Na,Nr;function yy(){function n(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return n.prototype={dragStarted:function(t){var r=t.originalEvent;this.sortable.nativeDraggable?He(document,"dragover",this._handleAutoScroll):this.options.supportPointer?He(document,"pointermove",this._handleFallbackAutoScroll):r.touches?He(document,"touchmove",this._handleFallbackAutoScroll):He(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var r=t.originalEvent;!this.options.dragOverBubble&&!r.rootEl&&this._handleAutoScroll(r)},drop:function(){this.sortable.nativeDraggable?Re(document,"dragover",this._handleAutoScroll):(Re(document,"pointermove",this._handleFallbackAutoScroll),Re(document,"touchmove",this._handleFallbackAutoScroll),Re(document,"mousemove",this._handleFallbackAutoScroll)),Au(),Pa(),Jg()},nulling:function(){Na=_i=Ir=Ci=Nr=Ei=Si=null,ft.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,r){var a=this,s=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,l=document.elementFromPoint(s,i);if(Na=t,r||this.options.forceAutoScrollFallback||xr||On||Br){xi(t,this.options,l,r);var c=Gn(l,!0);Ci&&(!Nr||s!==Ei||i!==Si)&&(Nr&&Au(),Nr=setInterval(function(){var d=Gn(document.elementFromPoint(s,i),!0);d!==c&&(c=d,Pa()),xi(t,a.options,d,r)},10),Ei=s,Si=i)}else{if(!this.options.bubbleScroll||Gn(l,!0)===gn()){Pa();return}xi(t,this.options,Gn(l,!1),!1)}}},Mn(n,{pluginName:"scroll",initializeByDefault:!0})}function Pa(){ft.forEach(function(n){clearInterval(n.pid)}),ft=[]}function Au(){clearInterval(Nr)}var xi=_u(function(n,e,t,r){if(e.scroll){var a=(n.touches?n.touches[0]:n).clientX,s=(n.touches?n.touches[0]:n).clientY,i=e.scrollSensitivity,l=e.scrollSpeed,c=gn(),d=!1,u;_i!==t&&(_i=t,Pa(),Ir=e.scroll,u=e.scrollFn,Ir===!0&&(Ir=Gn(t,!0)));var h=0,p=Ir;do{var m=p,f=gt(m),g=f.top,x=f.bottom,E=f.left,C=f.right,T=f.width,F=f.height,I=void 0,O=void 0,P=m.scrollWidth,M=m.scrollHeight,v=Ce(m),b=m.scrollLeft,D=m.scrollTop;m===c?(I=T<P&&(v.overflowX==="auto"||v.overflowX==="scroll"||v.overflowX==="visible"),O=F<M&&(v.overflowY==="auto"||v.overflowY==="scroll"||v.overflowY==="visible")):(I=T<P&&(v.overflowX==="auto"||v.overflowX==="scroll"),O=F<M&&(v.overflowY==="auto"||v.overflowY==="scroll"));var Y=I&&(Math.abs(C-a)<=i&&b+T<P)-(Math.abs(E-a)<=i&&!!b),K=O&&(Math.abs(x-s)<=i&&D+F<M)-(Math.abs(g-s)<=i&&!!D);if(!ft[h])for(var w=0;w<=h;w++)ft[w]||(ft[w]={});(ft[h].vx!=Y||ft[h].vy!=K||ft[h].el!==m)&&(ft[h].el=m,ft[h].vx=Y,ft[h].vy=K,clearInterval(ft[h].pid),(Y!=0||K!=0)&&(d=!0,ft[h].pid=setInterval((function(){r&&this.layer===0&&Ee.active._onTouchMove(Na);var k=ft[this.layer].vy?ft[this.layer].vy*l:0,_=ft[this.layer].vx?ft[this.layer].vx*l:0;typeof u=="function"&&u.call(Ee.dragged.parentNode[Vt],_,k,n,Na,ft[this.layer].el)!=="continue"||Cu(ft[this.layer].el,_,k)}).bind({layer:h}),24))),h++}while(e.bubbleScroll&&p!==c&&(p=Gn(p,!1)));Ci=d}},30),Iu=function(e){var t=e.originalEvent,r=e.putSortable,a=e.dragEl,s=e.activeSortable,i=e.dispatchSortableEvent,l=e.hideGhostForTarget,c=e.unhideGhostForTarget;if(t){var d=r||s;l();var u=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,h=document.elementFromPoint(u.clientX,u.clientY);c(),d&&!d.el.contains(h)&&(i("spill"),this.onSpill({dragEl:a,putSortable:r}))}};function Bi(){}Bi.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,r=e.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var a=Go(this.sortable.el,this.startIndex,this.options);a?this.sortable.el.insertBefore(t,a):this.sortable.el.appendChild(t),this.sortable.animateAll(),r&&r.animateAll()},drop:Iu},Mn(Bi,{pluginName:"revertOnSpill"});function Ti(){}Ti.prototype={onSpill:function(e){var t=e.dragEl,r=e.putSortable,a=r||this.sortable;a.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),a.animateAll()},drop:Iu},Mn(Ti,{pluginName:"removeOnSpill"}),Ee.mount(new yy),Ee.mount(Ti,Bi);function by(){return typeof window<"u"?window.console:global.console}const ky=by();function vy(n){const e=Object.create(null);return function(r){return e[r]||(e[r]=n(r))}}const wy=/-(\w)/g,Nu=vy(n=>n.replace(wy,(e,t)=>t?t.toUpperCase():""));function $i(n){n.parentElement!==null&&n.parentElement.removeChild(n)}function Pu(n,e,t){const r=t===0?n.children[0]:n.children[t-1].nextSibling;n.insertBefore(e,r)}function _y(n,e){return Object.values(n).indexOf(e)}function Cy(n,e,t,r){if(!n)return[];const a=Object.values(n),s=e.length-r;return[...e].map((l,c)=>c>=s?a.length:a.indexOf(l))}function Lu(n,e){this.$nextTick(()=>this.$emit(n.toLowerCase(),e))}function Ey(n){return e=>{this.realList!==null&&this["onDrag"+n](e),Lu.call(this,n,e)}}function Sy(n){return["transition-group","TransitionGroup"].includes(n)}function xy(n){if(!n||n.length!==1)return!1;const[{type:e}]=n;return e?Sy(e.name):!1}function By(n,e){return e?{...e.props,...e.attrs}:n}const Mi=["Start","Add","Remove","Update","End"],Di=["Choose","Unchoose","Sort","Filter","Clone"],Ty=["Move",...Mi,...Di].map(n=>"on"+n);let Oi=null;const $y={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:n=>n},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},My=o.defineComponent({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...Mi.map(n=>n.toLowerCase()),...Di.map(n=>n.toLowerCase())],props:$y,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const n=this.$slots.default?this.$slots.default():null,e=By(this.$attrs,this.componentData);return n?(this.transitionMode=xy(n),o.h(this.getTag(),e,n)):o.h(this.getTag(),e,[])},created(){this.list!==null&&this.modelValue!==null&&ky.error("list props are mutually exclusive! Please set one.")},mounted(){const n={};Mi.forEach(a=>{n["on"+a]=Ey.call(this,a)}),Di.forEach(a=>{n["on"+a]=Lu.bind(this,a)});const e=Object.keys(this.$attrs).reduce((a,s)=>(a[Nu(s)]=this.$attrs[s],a),{}),t=Object.assign({},e,n,{onMove:(a,s)=>this.onDragMove(a,s)});!("draggable"in t)&&(t.draggable=">*");const r=this.$el.nodeType===1?this.$el:this.$el.parentElement;this._sortable=new Ee(r,t),r.__draggable_component__=this,this.computeIndexes()},beforeUnmount(){try{this._sortable!==void 0&&this._sortable.destroy()}catch{}},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(n){this.updateOptions(n)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?o.resolveComponent(this.component):this.tag},updateOptions(n){for(var e in n){const t=Nu(e);Ty.indexOf(t)===-1&&this._sortable.option(t,n[e])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=Cy(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(n){const e=_y(this.getChildrenNodes()||[],n);if(e===-1)return null;const t=this.realList[e];return{index:e,element:t}},emitChanges(n){this.$nextTick(()=>{this.$emit("change",n)})},alterList(n){if(this.list){n(this.list);return}const e=[...this.modelValue];n(e),this.$emit("update:modelValue",e)},spliceList(){const n=e=>e.splice(...arguments);this.alterList(n)},updatePosition(n,e){const t=r=>r.splice(e,0,r.splice(n,1)[0]);this.alterList(t)},getVmIndex(n){const e=this.visibleIndexes,t=e.length;return n>t-1?t:e[n]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(n){if(!this.noTransitionOnDrag||!this.transitionMode)return;var e=this.getChildrenNodes();e[n].data=null;const t=this.getComponent();t.children=[],t.kept=void 0},onDragStart(n){this.computeIndexes(),this.context=this.getUnderlyingVm(n.item),this.context&&(n.item._underlying_vm_=this.clone(this.context.element),Oi=n.item)},onDragAdd(n){const e=n.item._underlying_vm_;if(e===void 0)return;$i(n.item);const t=this.getVmIndex(n.newIndex);this.spliceList(t,0,e),this.computeIndexes();const r={element:e,newIndex:t};this.emitChanges({added:r})},onDragRemove(n){if(Pu(this.$el,n.item,n.oldIndex),n.pullMode==="clone"){$i(n.clone);return}if(!this.context)return;const e=this.context.index;this.spliceList(e,1);const t={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:t})},onDragUpdate(n){$i(n.item),Pu(n.from,n.item,n.oldIndex);const e=this.context.index,t=this.getVmIndex(n.newIndex);this.updatePosition(e,t);const r={element:this.context.element,oldIndex:e,newIndex:t};this.emitChanges({moved:r})},updateProperty(n,e){n.hasOwnProperty(e)&&(n[e]+=this.headerOffset)},onDragMove(n,e){const t=this.move;if(!t||!this.realList)return!0;const r=this.getRelatedContextFromMoveEvent(n),a=this.context,s=this.computeFutureIndex(r,n);Object.assign(a,{futureIndex:s});const i=Object.assign({},n,{relatedContext:r,draggedContext:a});return t(i,e)},onDragEnd(){this.computeIndexes(),Oi=null},getTrargetedComponent(n){return n.__draggable_component__},getRelatedContextFromMoveEvent({to:n,related:e}){const t=this.getTrargetedComponent(n);if(!t)return{component:t};const r=t.realList,a={list:r,component:t};if(n!==e&&r&&t.getUnderlyingVm){const s=t.getUnderlyingVm(e);if(s)return Object.assign(s,a)}return a},computeFutureIndex(n,e){const t=[...e.to.children].filter(i=>i.style.display!=="none");if(t.length===0)return 0;const r=t.indexOf(e.related),a=n.component.getVmIndex(r);return t.indexOf(Oi)!==-1||!e.willInsertAfter?a:a+1}}}),Dy=o.defineComponent({__name:"CardContentList",props:o.mergeModels({list:{},isSortable:{type:Boolean}},{list:{required:!0},listModifiers:{}}),emits:["update:list"],setup(n){const e=o.useModel(n,"list"),t=o.ref(),r=o.ref(!0);function a(d,u){const h=[...e.value],p={...h[d]};p.value=u,h[d]=p,e.value=h}function s(d,u){const h=u==="up"?d-1:d+1;if(h<0||h>=e.value.length)return;const p=[...e.value],m={...p[d]};p[d]=p[h],p[h]=m,e.value=p}function i(d){t.value=d.oldIndex}function l(){return n.isSortable}function c(){r.value=!1}return(d,u)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(d.$style.root)},[o.createVNode(o.unref(My),{modelValue:e.value,"onUpdate:modelValue":u[0]||(u[0]=h=>e.value=h),filter:`.${d.$style["is-disabled"]}`,move:l,class:o.normalizeClass(d.$style.list),transitionMode:"",noTransitionOnDrag:!1,onStart:c,onEnd:u[1]||(u[1]=h=>r.value=!0),onChoose:i,onUnchoose:u[2]||(u[2]=h=>t.value=null)},{default:o.withCtx(()=>[o.createVNode(o.TransitionGroup,{type:"transition",name:r.value?"flip-list":void 0},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.value,(h,p)=>(o.openBlock(),o.createBlock(o.unref(hu),{key:h.title+h.description+h.image,isSortable:d.isSortable,isChosen:p===t.value,title:h.title,description:h.description,image:h.image,value:h.value,class:o.normalizeClass({[d.$style["is-disabled"]]:!d.isSortable}),"onUpdate:value":m=>a(p,m),onClickMoveUp:m=>s(p,"up"),onClickMoveDown:m=>s(p,"down")},null,8,["isSortable","isChosen","title","description","image","value","class","onUpdate:value","onClickMoveUp","onClickMoveDown"]))),128))]),_:1},8,["name"])]),_:1},8,["modelValue","filter","class"])],2))}}),zu={"is-disabled":"CardContentList__is-disabled_f57bc",list:"CardContentList__list_df4a5"},Oy=re(Dy,[["__cssModules",{$style:zu}]]),Ay=re(o.defineComponent({__name:"CardContentListSkeleton",setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.$style.root)},[o.createElementVNode("div",{class:o.normalizeClass(e.$style.list)},[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(4,r=>o.createVNode(o.unref(pu),{key:r})),64))],2)],2))}}),[["__cssModules",{$style:zu}]]),La={"fade-enter-active":"TransitionFade__fade-enter-active_b9e5e","fade-leave-active":"TransitionFade__fade-leave-active_95a44","fade-enter-from":"TransitionFade__fade-enter-from_edaa1","fade-leave-to":"TransitionFade__fade-leave-to_013a6"},Jo=o.defineComponent({name:"TransitionFade",props:{appear:{type:Boolean,default:!1},mode:{type:String,default:"out-in"},duration:{type:Number,default:450}},setup(n,{slots:e}){return()=>o.h(o.Transition,{name:"fade",appear:n.appear,mode:n.mode,duration:n.duration,enterFromClass:La["fade-enter-from"],enterActiveClass:La["fade-enter-active"],leaveActiveClass:La["fade-leave-active"],leaveToClass:La["fade-leave-to"]},()=>e.default?e.default():[])}}),Iy=["value"],Fu=re(o.defineComponent({__name:"Checkbox",props:{value:{type:Boolean},size:{},isIndeterminate:{type:Boolean,default:!1},isDisabled:{type:Boolean}},emits:["update:value","click"],setup(n,{emit:e}){const t=e;return(r,a)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([r.$style.root,r.$style[`size-${r.size}`],(r.value||r.value===null)&&r.$style.checked]),onClick:a[1]||(a[1]=s=>t("click",s))},[o.createElementVNode("input",{class:o.normalizeClass(r.$style.input),hidden:"",type:"checkbox",value:r.value,onChange:a[0]||(a[0]=s=>t("update:value",!r.value))},null,42,Iy),o.createVNode(o.unref(Jo),null,{default:o.withCtx(()=>[!r.isIndeterminate&&r.value?(o.openBlock(),o.createBlock(o.unref($e),{key:0,name:"outline-check",size:+r.size-4,color:"foreground-interactive-button-base-primary",class:o.normalizeClass(r.$style.icon)},null,8,["size","class"])):r.value?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(r.$style.indeterminate)},null,2)):o.createCommentVNode("",!0)]),_:1})],2))}}),[["__cssModules",{$style:{root:"Checkbox__root_f45d5",input:"Checkbox__input_620bc",checked:"Checkbox__checked_3839a","size-16":"Checkbox__size-16_94879",indeterminate:"Checkbox__indeterminate_1896f","size-20":"Checkbox__size-20_51064",icon:"Checkbox__icon_c8204"}}]]),Ai=re(o.defineComponent({__name:"CheckboxCell",props:{value:{type:Boolean},title:{},description:{},isIndeterminate:{type:Boolean,default:!1},size:{default:"16"}},emits:["update:value"],setup(n,{emit:e}){const t=e;return(r,a)=>(o.openBlock(),o.createElementBlock("label",{class:o.normalizeClass(r.$style.root)},[o.createVNode(o.unref(Fu),{size:r.size,"is-indeterminate":r.isIndeterminate,value:r.value,"onUpdate:value":a[0]||(a[0]=s=>t("update:value",s))},null,8,["size","is-indeterminate","value"]),o.renderSlot(r.$slots,"leftItem"),o.createElementVNode("div",{class:o.normalizeClass(r.$style.content)},[o.createVNode(o.unref(me),{size:r.size==="16"?"caption":"subhead",weight:"regular",color:"foreground-layout-layout-1-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(r.title),1)]),_:1},8,["size"]),r.description?(o.openBlock(),o.createBlock(o.unref(me),{key:0,size:"caption",weight:"regular",color:"foreground-layout-layout-1-secondary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(r.description),1)]),_:1})):o.createCommentVNode("",!0)],2)],2))}}),[["__cssModules",{$style:{root:"CheckboxCell__root_9478c",content:"CheckboxCell__content_7fd78"}}]]),za=re(o.defineComponent({__name:"Chip",props:{count:{},view:{default:"base-primary"}},emits:["click","delete"],setup(n,{emit:e}){const t=e,r=o.computed(()=>n.view==="base-secondary"?"foreground-interactive-button-base-secondary":"foreground-interactive-button-base-primary");return(a,s)=>(o.openBlock(),o.createElementBlock("button",{class:o.normalizeClass([a.$style.root,a.$style[`view_${a.view}`]]),onClick:s[1]||(s[1]=i=>t("click"))},[o.createVNode(o.unref(me),{class:o.normalizeClass(a.$style.text),size:"caption",color:r.value},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},8,["class","color"]),a.count?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(a.$style.counter)},[o.createVNode(o.unref(me),{class:o.normalizeClass(a.$style.value),size:"caption",color:r.value},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.count),1)]),_:1},8,["class","color"])],2)):o.createCommentVNode("",!0),o.createVNode(o.unref($e),{class:o.normalizeClass(a.$style.delete),color:r.value,size:"18",name:"outline-cross",onClick:s[0]||(s[0]=o.withModifiers(i=>t("delete"),["stop"]))},null,8,["class","color"])],2))}}),[["__cssModules",{$style:{root:"Chip__root_f8f48","view_base-primary":"Chip__view_base-primary_e9bb2","view_base-secondary":"Chip__view_base-secondary_63f45",counter:"Chip__counter_0bf18",delete:"Chip__delete_7a4b5",text:"Chip__text_78294"}}]]),An=re(o.defineComponent({__name:"Divider",props:{size:{},opacity:{default:1}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([e.$style.root,e.$style[`size_${e.size}`]]),style:o.normalizeStyle({...Number(e.opacity)!==1&&{opacity:Number(e.opacity)}})},null,6))}}),[["__cssModules",{$style:{root:"Divider__root_08288",size_s:"Divider__size_s_0e343",size_m:"Divider__size_m_73f73"}}]]),Ru=()=>{function n(i){i.style.height="0px",i.style.opacity="0",i.style.overflow="hidden"}function e(i,l){i.style.transition="height 0.3s ease",i.style.height=i.scrollHeight+"px",i.addEventListener("transitionend",()=>{i.style.transition="opacity 0.2s ease",i.style.opacity="1",i.addEventListener("transitionend",l,{once:!0})},{once:!0})}function t(i){i.style.height="",i.style.overflow=""}function r(i){i.style.height=i.scrollHeight+"px",i.style.opacity="1",i.style.overflow="hidden"}function a(i,l){i.style.transition="opacity 0.3s ease",i.style.opacity="0",i.addEventListener("transitionend",()=>{i.style.transition="all 0.3s ease",i.style.height="0px",i.style.paddingTop="0px",i.addEventListener("transitionend",l,{once:!0})},{once:!0})}function s(i){i.style.height="0px"}return{beforeEnter:n,enter:e,afterEnter:t,beforeLeave:r,leave:a,afterLeave:s}},Ny=re(o.defineComponent({__name:"Dropdown",props:{title:{},isActive:{type:Boolean}},emits:["click"],setup(n,{emit:e}){const t=e,r=o.useCssModule(),a=Ru(),s=o.ref(n.isActive??!1),i=o.computed(()=>[s.value&&r["is-open"]]);function l(){s.value=!s.value,t("click",s.value)}return o.watch(()=>n.isActive,c=>{s.value=c}),(c,d)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(i.value)},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(r).header),"data-test":"DropdownTextHeader",onClick:l},[o.createVNode(o.unref(me),{size:"subhead",color:"text-common-base-secondary-default"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(c.title),1)]),_:1}),o.createVNode(o.unref($e),{class:o.normalizeClass(o.unref(r).icon),name:"outline-chevron-down",size:"18",color:"icon-common-base-secondary-default"},null,8,["class"])],2),o.createVNode(o.Transition,o.toHandlers(o.unref(a)),{default:o.withCtx(()=>[s.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(r).content)},[o.renderSlot(c.$slots,"default")],2)):o.createCommentVNode("",!0)]),_:3},16)],2))}}),[["__cssModules",{$style:{header:"Dropdown__header_4b67e",icon:"Dropdown__icon_d8b38",content:"Dropdown__content_1f45b","is-open":"Dropdown__is-open_47cb6"}}]]);function Py(n,e){if((!n||n.length===0)&&!e)return"";const t=(n==null?void 0:n.map(i=>{if(i.includes("/")){const l=i.split("/"),c=l[1];return c==="*"?l[0].toUpperCase():c.includes("+")?c.split("+")[0].toUpperCase():c.toUpperCase()}else return i.toUpperCase()}))||[],a=Array.from(new Set(t)).join(", ");let s="";if(e){const i=e.match(/^(\d+(?:\.\d+)?)(B|KB|MB|GB)$/i);if(i){const l=i[1],c=i[2].toUpperCase();s=`до ${l} ${{B:"б",KB:"Кб",MB:"Мб",GB:"Гб"}[c]||c}.`}}return a&&s?`${a} ${s}`:a||s}function Ly(n){if(!n)return 0;const e={B:1,KB:1024,MB:1024**2,GB:1024**3},t=/^(\d+(?:\.\d+)?)(B|KB|MB|GB)$/i,r=n.replace(/\s+/g,"").match(t);if(r){const a=parseFloat(r[1]),s=r[2].toUpperCase(),i=e[s];if(!i)throw new Error(`Неизвестная единица измерения: "${s}"`);return Math.round(a*i)}return 0}function zy({format:n,size:e,fileSize:t,fileExtension:r,fileType:a}){const s=Ly(e);let i=!1,l=!1;if(t>s&&(i=!0),n&&n.length>0){const c=n.map(h=>h.toLowerCase()),d=r&&c.includes(r),u=c.includes(a.toLowerCase());!d&&!u&&(l=!0)}return{size:i,format:l}}function Fy({errors:n,format:e,size:t}){if(n.format&&(e!=null&&e.length)){const r=e.map(i=>{if(i.includes("/")){const l=i.split("/")[1];return l==="*"?i.split("/")[0].toUpperCase():l.includes("+")?l.split("+")[0].toUpperCase():l.toUpperCase()}else return i.toUpperCase()}),a=Array.from(new Set(r));let s="";if(a.length===1)s=a[0];else if(a.length===2)s=`${a[0]} или ${a[1]}`;else{const i=a.pop();s=`${a.join(", ")} или ${i}`}return`Файл должен иметь расширение ${s}`}if(n.size&&t){const r=t.match(/^(\d+(?:\.\d+)?)(B|KB|MB|GB)$/i);if(r){const a=r[1],s=r[2].toUpperCase();return`Размер файла не должен превышать ${a} ${{B:"Б",KB:"Кб",MB:"Мб",GB:"Гб"}[s]||s}.`}}return""}function Vu(n){const e=o.ref(n);function t(r){e.value=r}return[e,t]}function Ry(n){const[e,t]=Vu(!1);function r(){n.value||t(!0)}function a(){n.value||t(!1)}function s(){n.value||t(!1)}return{isDropping:e,onDragEnter:r,onDragLeave:a,onDrop:s}}function Vy(n,e){const t=o.computed(()=>n?"text-disable-default":"text-common-base-primary-default"),r=o.computed(()=>n?"text-disable-default":"text-common-base-primary-default"),a=o.computed(()=>n?"icon-disable-primary":e.value?"icon-common-critical-primary-default":"icon-common-success-primary-default"),s=o.computed(()=>e.value?n?"outline-warning":"filled-warning":n?"outline-success":"filled-success"),i=o.computed(()=>e.value?"text-common-critical-primary-default":n?"text-disable-default":"text-common-base-secondary-default");return{labelColor:t,fileNameColor:r,fileIconColor:a,fileIconName:s,descriptionColor:i}}const Hy=["accept","disabled"],jy=re(o.defineComponent({__name:"Dropzone",props:o.mergeModels({value:{},label:{},placeholder:{},isLoading:{type:Boolean},description:{},errorText:{},isError:{type:Boolean},isDisabled:{type:Boolean},format:{},size:{}},{value:{required:!0},valueModifiers:{},isError:{type:Boolean},isErrorModifiers:{}}),emits:o.mergeModels(["update:value"],["update:value","update:isError"]),setup(n,{emit:e}){const t=e,r=o.useModel(n,"value"),a=o.useModel(n,"isError"),s=o.useCssModule(),i=o.ref(),l=o.ref(""),c=o.ref(""),d=o.ref({format:!1,size:!1}),u=o.computed(()=>l.value?"file":"empty"),{labelColor:h,fileNameColor:p,fileIconColor:m,fileIconName:f,descriptionColor:g}=Vy(n.isDisabled,a),{isDropping:x,onDragEnter:E,onDragLeave:C,onDrop:T}=Ry(r);async function F(w){const{files:k}=w.target;if(a.value=!1,t("update:value",!1),d.value={format:!1,size:!1},i.value&&(k!=null&&k.length)){const _=k[0],{name:A,extension:N}=M(_);l.value=A,c.value=N,d.value=zy({size:n.size,format:n.format,fileSize:_.size,fileExtension:c.value,fileType:_.type}),a.value=d.value.size||d.value.format,!d.value.size&&!d.value.format&&(r.value=await O(_)),i.value.value=""}}function I(){r.value=null,a.value=!1,i.value.value="",l.value=""}function O(w){return new Promise((k,_)=>{const A=new FileReader;A.readAsDataURL(w),A.onload=()=>{const N=A.result,[L,q]=N.split(","),z=L.match(/data:(.*);base64/),oe=z?z[1]:"";k({mime:oe,content:q})},A.onerror=N=>_(N)})}function P(w){return{"image/png":"png","image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","application/pdf":"pdf","text/plain":"txt"}[w]||"bin"}function M(w){const k=w.name.lastIndexOf(".");return{name:k!==-1?w.name.slice(0,k):w.name,extension:k!==-1?w.name.slice(k+1).toLowerCase():""}}const v=o.computed(()=>a.value&&n.errorText?n.errorText:a.value||d.value.size||d.value.format?Fy({errors:d.value,format:n.format,size:n.size}):n.description?n.description:Py(n.format,n.size)),b=o.computed(()=>n.format?n.format.map(w=>w.indexOf("/")!==-1?`${w}`:`.${w}`).join(","):""),D=o.computed(()=>[s.root,{[s["is-disabled"]]:n.isDisabled}]),Y=o.computed(()=>[s.input,{[s["input-hidden"]]:u.value==="file"}]),K=o.computed(()=>[s.area,{[s["is-empty"]]:u.value==="empty",[s["is-file"]]:u.value==="file",[s["is-dropping"]]:x.value,[s["is-disabled"]]:n.isDisabled,[s["is-error"]]:a.value}]);return o.onMounted(()=>{r.value&&(l.value="file",c.value=P(r.value.mime))}),(w,k)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(D.value)},[o.createVNode(o.unref(me),{size:"subhead",color:o.unref(h)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(w.label),1)]),_:1},8,["color"]),o.createElementVNode("div",{class:o.normalizeClass(K.value)},[o.createVNode(o.unref($t),null,{default:o.withCtx(()=>[u.value==="empty"?(o.openBlock(),o.createElementBlock("div",{key:"empty",class:o.normalizeClass(o.unref(s).empty)},[o.createVNode(o.unref($t),null,{default:o.withCtx(()=>[o.unref(x)?(o.openBlock(),o.createElementBlock("div",{key:"empty-drop",class:o.normalizeClass(o.unref(s)["drop-text"])},[o.createVNode(o.unref(me),{class:o.normalizeClass(o.unref(s).placeholder),align:"center",size:"subhead",color:"text-input-base-secondary"},{default:o.withCtx(()=>k[3]||(k[3]=[o.createTextVNode(" Отпустите файл для загрузки ")])),_:1,__:[3]},8,["class"])],2)):(o.openBlock(),o.createElementBlock("div",{key:"empty-start",class:o.normalizeClass(o.unref(s).row)},[o.createVNode(o.unref($e),{class:o.normalizeClass(o.unref(s)["icon-upload"]),color:"icon-input-base-primary",name:"outline-upload",size:"18"},null,8,["class"]),o.createVNode(o.unref(me),{class:o.normalizeClass(o.unref(s).placeholder),size:"subhead",color:"text-input-base-secondary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(w.placeholder),1)]),_:1},8,["class"])],2))]),_:1})],2)):(o.openBlock(),o.createElementBlock("div",{key:"file",class:o.normalizeClass(o.unref(s)["file-data"])},[o.createVNode(o.unref(Jo),null,{default:o.withCtx(()=>[w.isLoading?(o.openBlock(),o.createBlock(o.unref(_r),{key:0,color:"icon-button-base-primary",size:"18"})):(o.openBlock(),o.createBlock(o.unref($e),{key:1,class:o.normalizeClass(o.unref(s).icon),color:o.unref(m),name:o.unref(f),size:"18"},null,8,["class","color","name"]))]),_:1}),o.createVNode(o.unref(me),{class:o.normalizeClass(o.unref(s)["file-name"]),size:"subhead",numberOfLines:"1",color:o.unref(p)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(l.value),1)]),_:1},8,["class","color"]),o.createVNode(o.unref(me),{class:o.normalizeClass(o.unref(s)["file-extension"]),size:"subhead",color:o.unref(p)},{default:o.withCtx(()=>[o.createTextVNode(" ."+o.toDisplayString(c.value),1)]),_:1},8,["class","color"]),o.createElementVNode("button",{class:o.normalizeClass(o.unref(s)["button-clear"]),onClick:I},[o.createVNode(o.unref($e),{color:"icon-input-base-primary",name:"outline-trash",size:"18"})],2)],2))]),_:1})],2),o.createVNode(o.unref($t),null,{default:o.withCtx(()=>[v.value?(o.openBlock(),o.createBlock(o.unref(me),{key:v.value,color:o.unref(g)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(v.value),1)]),_:1},8,["color"])):o.createCommentVNode("",!0)]),_:1}),o.createElementVNode("input",{ref_key:"refInput",ref:i,title:"Добавить файл",type:"file",class:o.normalizeClass(Y.value),accept:b.value,disabled:w.isLoading||w.isDisabled,onDragenter:k[0]||(k[0]=(..._)=>o.unref(E)&&o.unref(E)(..._)),onDragleave:k[1]||(k[1]=(..._)=>o.unref(C)&&o.unref(C)(..._)),onDrop:k[2]||(k[2]=(..._)=>o.unref(T)&&o.unref(T)(..._)),onInput:F},null,42,Hy)],2))}}),[["__cssModules",{$style:{root:"Dropzone__root_8c6b8","is-disabled":"Dropzone__is-disabled_a174c",input:"Dropzone__input_47a31","input-hidden":"Dropzone__input-hidden_d4ad8",area:"Dropzone__area_668a4","is-file":"Dropzone__is-file_d3781","is-dropping":"Dropzone__is-dropping_01108","is-error":"Dropzone__is-error_d3922",empty:"Dropzone__empty_7ee21",row:"Dropzone__row_19908","file-data":"Dropzone__file-data_29711","file-name":"Dropzone__file-name_84c4b","file-extension":"Dropzone__file-extension_f001e","button-clear":"Dropzone__button-clear_6a354"}}]]),Ii=Symbol();function Yy(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Fa={exports:{}},Uy=Fa.exports,Hu;function Wy(){return Hu||(Hu=1,function(n,e){(function(r,a){n.exports=a()})(Uy,function(){return function(t){var r={};function a(s){if(r[s])return r[s].exports;var i=r[s]={i:s,l:!1,exports:{}};return t[s].call(i.exports,i,i.exports,a),i.l=!0,i.exports}return a.m=t,a.c=r,a.d=function(s,i,l){a.o(s,i)||Object.defineProperty(s,i,{enumerable:!0,get:l})},a.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},a.t=function(s,i){if(i&1&&(s=a(s)),i&8||i&4&&typeof s=="object"&&s&&s.__esModule)return s;var l=Object.create(null);if(a.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:s}),i&2&&typeof s!="string")for(var c in s)a.d(l,c,(function(d){return s[d]}).bind(null,c));return l},a.n=function(s){var i=s&&s.__esModule?function(){return s.default}:function(){return s};return a.d(i,"a",i),i},a.o=function(s,i){return Object.prototype.hasOwnProperty.call(s,i)},a.p="",a(a.s=0)}([function(t,r,a){a.r(r);var s=function(B){return Array.isArray(B)?B:[B]},i=function(B){return B instanceof Node},l=function(B){return B instanceof NodeList},c=function(B,ae){if(B&&ae){B=l(B)?B:[B];for(var ge=0;ge<B.length&&ae(B[ge],ge,B.length)!==!0;ge++);}},d=function(B){return console.error("[scroll-lock] ".concat(B))},u=function(B){if(Array.isArray(B)){var ae=B.join(", ");return ae}},h=function(B){var ae=[];return c(B,function(ge){return ae.push(ge)}),ae},p=function(B,ae){var ge=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,ye=arguments.length>3&&arguments[3]!==void 0?arguments[3]:document;if(ge&&h(ye.querySelectorAll(ae)).indexOf(B)!==-1)return B;for(;(B=B.parentElement)&&h(ye.querySelectorAll(ae)).indexOf(B)===-1;);return B},m=function(B,ae){var ge=arguments.length>2&&arguments[2]!==void 0?arguments[2]:document,ye=h(ge.querySelectorAll(ae)).indexOf(B)!==-1;return ye},f=function(B){if(B){var ae=getComputedStyle(B),ge=ae.overflow==="hidden";return ge}},g=function(B){if(B){if(f(B))return!0;var ae=B.scrollTop;return ae<=0}},x=function(B){if(B){if(f(B))return!0;var ae=B.scrollTop,ge=B.scrollHeight,ye=ae+B.offsetHeight;return ye>=ge}},E=function(B){if(B){if(f(B))return!0;var ae=B.scrollLeft;return ae<=0}},C=function(B){if(B){if(f(B))return!0;var ae=B.scrollLeft,ge=B.scrollWidth,ye=ae+B.offsetWidth;return ye>=ge}},T=function(B){var ae='textarea, [contenteditable="true"]';return m(B,ae)},F=function(B){var ae='input[type="range"]';return m(B,ae)};a.d(r,"disablePageScroll",function(){return b}),a.d(r,"enablePageScroll",function(){return D}),a.d(r,"getScrollState",function(){return Y}),a.d(r,"clearQueueScrollLocks",function(){return K}),a.d(r,"getTargetScrollBarWidth",function(){return w}),a.d(r,"getCurrentTargetScrollBarWidth",function(){return k}),a.d(r,"getPageScrollBarWidth",function(){return _}),a.d(r,"getCurrentPageScrollBarWidth",function(){return A}),a.d(r,"addScrollableTarget",function(){return N}),a.d(r,"removeScrollableTarget",function(){return L}),a.d(r,"addScrollableSelector",function(){return q}),a.d(r,"removeScrollableSelector",function(){return z}),a.d(r,"addLockableTarget",function(){return oe}),a.d(r,"addLockableSelector",function(){return $}),a.d(r,"setFillGapMethod",function(){return R}),a.d(r,"addFillGapTarget",function(){return W}),a.d(r,"removeFillGapTarget",function(){return J}),a.d(r,"addFillGapSelector",function(){return y}),a.d(r,"removeFillGapSelector",function(){return j}),a.d(r,"refillGaps",function(){return se});function I(G){for(var B=1;B<arguments.length;B++){var ae=arguments[B]!=null?arguments[B]:{},ge=Object.keys(ae);typeof Object.getOwnPropertySymbols=="function"&&(ge=ge.concat(Object.getOwnPropertySymbols(ae).filter(function(ye){return Object.getOwnPropertyDescriptor(ae,ye).enumerable}))),ge.forEach(function(ye){O(G,ye,ae[ye])})}return G}function O(G,B,ae){return B in G?Object.defineProperty(G,B,{value:ae,enumerable:!0,configurable:!0,writable:!0}):G[B]=ae,G}var P=["padding","margin","width","max-width","none"],M=3,v={scroll:!0,queue:0,scrollableSelectors:["[data-scroll-lock-scrollable]"],lockableSelectors:["body","[data-scroll-lock-lockable]"],fillGapSelectors:["body","[data-scroll-lock-fill-gap]","[data-scroll-lock-lockable]"],fillGapMethod:P[0],startTouchY:0,startTouchX:0},b=function(B){v.queue<=0&&(v.scroll=!1,_e(),ie()),N(B),v.queue++},D=function(B){v.queue>0&&v.queue--,v.queue<=0&&(v.scroll=!0,U(),ce()),L(B)},Y=function(){return v.scroll},K=function(){v.queue=0},w=function(B){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(i(B)){var ge=B.style.overflowY;ae?Y()||(B.style.overflowY=B.getAttribute("data-scroll-lock-saved-overflow-y-property")):B.style.overflowY="scroll";var ye=k(B);return B.style.overflowY=ge,ye}else return 0},k=function(B){if(i(B))if(B===document.body){var ae=document.documentElement.clientWidth,ge=window.innerWidth,ye=ge-ae;return ye}else{var Gt=B.style.borderLeftWidth,hn=B.style.borderRightWidth;B.style.borderLeftWidth="0px",B.style.borderRightWidth="0px";var en=B.offsetWidth-B.clientWidth;return B.style.borderLeftWidth=Gt,B.style.borderRightWidth=hn,en}else return 0},_=function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return w(document.body,B)},A=function(){return k(document.body)},N=function(B){if(B){var ae=s(B);ae.map(function(ge){c(ge,function(ye){i(ye)?ye.setAttribute("data-scroll-lock-scrollable",""):d('"'.concat(ye,'" is not a Element.'))})})}},L=function(B){if(B){var ae=s(B);ae.map(function(ge){c(ge,function(ye){i(ye)?ye.removeAttribute("data-scroll-lock-scrollable"):d('"'.concat(ye,'" is not a Element.'))})})}},q=function(B){if(B){var ae=s(B);ae.map(function(ge){v.scrollableSelectors.push(ge)})}},z=function(B){if(B){var ae=s(B);ae.map(function(ge){v.scrollableSelectors=v.scrollableSelectors.filter(function(ye){return ye!==ge})})}},oe=function(B){if(B){var ae=s(B);ae.map(function(ge){c(ge,function(ye){i(ye)?ye.setAttribute("data-scroll-lock-lockable",""):d('"'.concat(ye,'" is not a Element.'))})}),Y()||_e()}},$=function(B){if(B){var ae=s(B);ae.map(function(ge){v.lockableSelectors.push(ge)}),Y()||_e(),y(B)}},R=function(B){if(B)if(P.indexOf(B)!==-1)v.fillGapMethod=B,se();else{var ae=P.join(", ");d('"'.concat(B,`" method is not available!
|
|
10
|
+
*/function mu(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable})),t.push.apply(t,r)}return t}function fn(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?mu(Object(t),!0).forEach(function(r){Ug(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):mu(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function _a(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_a=function(e){return typeof e}:_a=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_a(n)}function Ug(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Mn(){return Mn=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Mn.apply(this,arguments)}function Wg(n,e){if(n==null)return{};var t={},r=Object.keys(n),a,s;for(s=0;s<r.length;s++)a=r[s],!(e.indexOf(a)>=0)&&(t[a]=n[a]);return t}function qg(n,e){if(n==null)return{};var t=Wg(n,e),r,a;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(a=0;a<s.length;a++)r=s[a],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(n,r)&&(t[r]=n[r])}return t}var Gg="1.14.0";function Dn(n){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(n)}var On=Dn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),xr=Dn(/Edge/i),gu=Dn(/firefox/i),Br=Dn(/safari/i)&&!Dn(/chrome/i)&&!Dn(/android/i),yu=Dn(/iP(ad|od|hone)/i),Kg=Dn(/chrome/i)&&Dn(/android/i),bu={capture:!1,passive:!1};function He(n,e,t){n.addEventListener(e,t,!On&&bu)}function Re(n,e,t){n.removeEventListener(e,t,!On&&bu)}function Ca(n,e){if(e){if(e[0]===">"&&(e=e.substring(1)),n)try{if(n.matches)return n.matches(e);if(n.msMatchesSelector)return n.msMatchesSelector(e);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(e)}catch{return!1}return!1}}function Xg(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function mn(n,e,t,r){if(n){t=t||document;do{if(e!=null&&(e[0]===">"?n.parentNode===t&&Ca(n,e):Ca(n,e))||r&&n===t)return n;if(n===t)break}while(n=Xg(n))}return null}var ku=/\s+/g;function Rt(n,e,t){if(n&&e)if(n.classList)n.classList[t?"add":"remove"](e);else{var r=(" "+n.className+" ").replace(ku," ").replace(" "+e+" "," ");n.className=(r+(t?" "+e:"")).replace(ku," ")}}function Ce(n,e,t){var r=n&&n.style;if(r){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(t=n.currentStyle),e===void 0?t:t[e];!(e in r)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),r[e]=t+(typeof t=="string"?"":"px")}}function qo(n,e){var t="";if(typeof n=="string")t=n;else do{var r=Ce(n,"transform");r&&r!=="none"&&(t=r+" "+t)}while(!e&&(n=n.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(t)}function vu(n,e,t){if(n){var r=n.getElementsByTagName(e),a=0,s=r.length;if(t)for(;a<s;a++)t(r[a],a);return r}return[]}function gn(){var n=document.scrollingElement;return n||document.documentElement}function gt(n,e,t,r,a){if(!(!n.getBoundingClientRect&&n!==window)){var s,i,l,c,d,u,h;if(n!==window&&n.parentNode&&n!==gn()?(s=n.getBoundingClientRect(),i=s.top,l=s.left,c=s.bottom,d=s.right,u=s.height,h=s.width):(i=0,l=0,c=window.innerHeight,d=window.innerWidth,u=window.innerHeight,h=window.innerWidth),(e||t)&&n!==window&&(a=a||n.parentNode,!On))do if(a&&a.getBoundingClientRect&&(Ce(a,"transform")!=="none"||t&&Ce(a,"position")!=="static")){var p=a.getBoundingClientRect();i-=p.top+parseInt(Ce(a,"border-top-width")),l-=p.left+parseInt(Ce(a,"border-left-width")),c=i+s.height,d=l+s.width;break}while(a=a.parentNode);if(r&&n!==window){var m=qo(a||n),f=m&&m.a,g=m&&m.d;m&&(i/=g,l/=f,h/=f,u/=g,c=i+u,d=l+h)}return{top:i,left:l,bottom:c,right:d,width:h,height:u}}}function wu(n,e,t){for(var r=Gn(n,!0),a=gt(n)[e];r;){var s=gt(r)[t],i=void 0;if(i=a>=s,!i)return r;if(r===gn())break;r=Gn(r,!1)}return!1}function Go(n,e,t,r){for(var a=0,s=0,i=n.children;s<i.length;){if(i[s].style.display!=="none"&&i[s]!==Ee.ghost&&(r||i[s]!==Ee.dragged)&&mn(i[s],t.draggable,n,!1)){if(a===e)return i[s];a++}s++}return null}function pi(n,e){for(var t=n.lastElementChild;t&&(t===Ee.ghost||Ce(t,"display")==="none"||e&&!Ca(t,e));)t=t.previousElementSibling;return t||null}function Kt(n,e){var t=0;if(!n||!n.parentNode)return-1;for(;n=n.previousElementSibling;)n.nodeName.toUpperCase()!=="TEMPLATE"&&n!==Ee.clone&&(!e||Ca(n,e))&&t++;return t}function _u(n){var e=0,t=0,r=gn();if(n)do{var a=qo(n),s=a.a,i=a.d;e+=n.scrollLeft*s,t+=n.scrollTop*i}while(n!==r&&(n=n.parentNode));return[e,t]}function Qg(n,e){for(var t in n)if(n.hasOwnProperty(t)){for(var r in e)if(e.hasOwnProperty(r)&&e[r]===n[t][r])return Number(t)}return-1}function Gn(n,e){if(!n||!n.getBoundingClientRect)return gn();var t=n,r=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var a=Ce(t);if(t.clientWidth<t.scrollWidth&&(a.overflowX=="auto"||a.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(a.overflowY=="auto"||a.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return gn();if(r||e)return t;r=!0}}while(t=t.parentNode);return gn()}function Zg(n,e){if(n&&e)for(var t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function fi(n,e){return Math.round(n.top)===Math.round(e.top)&&Math.round(n.left)===Math.round(e.left)&&Math.round(n.height)===Math.round(e.height)&&Math.round(n.width)===Math.round(e.width)}var Tr;function Cu(n,e){return function(){if(!Tr){var t=arguments,r=this;t.length===1?n.call(r,t[0]):n.apply(r,t),Tr=setTimeout(function(){Tr=void 0},e)}}}function Jg(){clearTimeout(Tr),Tr=void 0}function Eu(n,e,t){n.scrollLeft+=e,n.scrollTop+=t}function Su(n){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(n).cloneNode(!0):t?t(n).clone(!0)[0]:n.cloneNode(!0)}var Vt="Sortable"+new Date().getTime();function ey(){var n=[],e;return{captureAnimationState:function(){if(n=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(a){if(!(Ce(a,"display")==="none"||a===Ee.ghost)){n.push({target:a,rect:gt(a)});var s=fn({},n[n.length-1].rect);if(a.thisAnimationDuration){var i=qo(a,!0);i&&(s.top-=i.f,s.left-=i.e)}a.fromRect=s}})}},addAnimationState:function(r){n.push(r)},removeAnimationState:function(r){n.splice(Qg(n,{target:r}),1)},animateAll:function(r){var a=this;if(!this.options.animation){clearTimeout(e),typeof r=="function"&&r();return}var s=!1,i=0;n.forEach(function(l){var c=0,d=l.target,u=d.fromRect,h=gt(d),p=d.prevFromRect,m=d.prevToRect,f=l.rect,g=qo(d,!0);g&&(h.top-=g.f,h.left-=g.e),d.toRect=h,d.thisAnimationDuration&&fi(p,h)&&!fi(u,h)&&(f.top-h.top)/(f.left-h.left)===(u.top-h.top)/(u.left-h.left)&&(c=ny(f,p,m,a.options)),fi(h,u)||(d.prevFromRect=u,d.prevToRect=h,c||(c=a.options.animation),a.animate(d,f,h,c)),c&&(s=!0,i=Math.max(i,c),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},c),d.thisAnimationDuration=c)}),clearTimeout(e),s?e=setTimeout(function(){typeof r=="function"&&r()},i):typeof r=="function"&&r(),n=[]},animate:function(r,a,s,i){if(i){Ce(r,"transition",""),Ce(r,"transform","");var l=qo(this.el),c=l&&l.a,d=l&&l.d,u=(a.left-s.left)/(c||1),h=(a.top-s.top)/(d||1);r.animatingX=!!u,r.animatingY=!!h,Ce(r,"transform","translate3d("+u+"px,"+h+"px,0)"),this.forRepaintDummy=ty(r),Ce(r,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),Ce(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){Ce(r,"transition",""),Ce(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},i)}}}}function ty(n){return n.offsetWidth}function ny(n,e,t,r){return Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*r.animation}var Ko=[],mi={initializeByDefault:!0},$r={mount:function(e){for(var t in mi)mi.hasOwnProperty(t)&&!(t in e)&&(e[t]=mi[t]);Ko.forEach(function(r){if(r.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),Ko.push(e)},pluginEvent:function(e,t,r){var a=this;this.eventCanceled=!1,r.cancel=function(){a.eventCanceled=!0};var s=e+"Global";Ko.forEach(function(i){t[i.pluginName]&&(t[i.pluginName][s]&&t[i.pluginName][s](fn({sortable:t},r)),t.options[i.pluginName]&&t[i.pluginName][e]&&t[i.pluginName][e](fn({sortable:t},r)))})},initializePlugins:function(e,t,r,a){Ko.forEach(function(l){var c=l.pluginName;if(!(!e.options[c]&&!l.initializeByDefault)){var d=new l(e,t,e.options);d.sortable=e,d.options=e.options,e[c]=d,Mn(r,d.defaults)}});for(var s in e.options)if(e.options.hasOwnProperty(s)){var i=this.modifyOption(e,s,e.options[s]);typeof i<"u"&&(e.options[s]=i)}},getEventProperties:function(e,t){var r={};return Ko.forEach(function(a){typeof a.eventProperties=="function"&&Mn(r,a.eventProperties.call(t[a.pluginName],e))}),r},modifyOption:function(e,t,r){var a;return Ko.forEach(function(s){e[s.pluginName]&&s.optionListeners&&typeof s.optionListeners[t]=="function"&&(a=s.optionListeners[t].call(e[s.pluginName],r))}),a}};function oy(n){var e=n.sortable,t=n.rootEl,r=n.name,a=n.targetEl,s=n.cloneEl,i=n.toEl,l=n.fromEl,c=n.oldIndex,d=n.newIndex,u=n.oldDraggableIndex,h=n.newDraggableIndex,p=n.originalEvent,m=n.putSortable,f=n.extraEventProperties;if(e=e||t&&t[Vt],!!e){var g,x=e.options,E="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!On&&!xr?g=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(g=document.createEvent("Event"),g.initEvent(r,!0,!0)),g.to=i||t,g.from=l||t,g.item=a||t,g.clone=s,g.oldIndex=c,g.newIndex=d,g.oldDraggableIndex=u,g.newDraggableIndex=h,g.originalEvent=p,g.pullMode=m?m.lastPutMode:void 0;var C=fn(fn({},f),$r.getEventProperties(r,e));for(var T in C)g[T]=C[T];t&&t.dispatchEvent(g),x[E]&&x[E].call(e,g)}}var ry=["evt"],Lt=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=r.evt,s=qg(r,ry);$r.pluginEvent.bind(Ee)(e,t,fn({dragEl:ue,parentEl:ot,ghostEl:Oe,rootEl:Qe,nextEl:_o,lastDownEl:Ea,cloneEl:rt,cloneHidden:Kn,dragStarted:Dr,putSortable:vt,activeSortable:Ee.active,originalEvent:a,oldIndex:Xo,oldDraggableIndex:Mr,newIndex:Ht,newDraggableIndex:Xn,hideGhostForTarget:Ou,unhideGhostForTarget:Au,cloneNowHidden:function(){Kn=!0},cloneNowShown:function(){Kn=!1},dispatchSortableEvent:function(l){Mt({sortable:t,name:l,originalEvent:a})}},s))};function Mt(n){oy(fn({putSortable:vt,cloneEl:rt,targetEl:ue,rootEl:Qe,oldIndex:Xo,oldDraggableIndex:Mr,newIndex:Ht,newDraggableIndex:Xn},n))}var ue,ot,Oe,Qe,_o,Ea,rt,Kn,Xo,Ht,Mr,Xn,Sa,vt,Qo=!1,xa=!1,Ba=[],Co,nn,gi,yi,xu,Bu,Dr,Zo,Or,Ar=!1,Ta=!1,$a,Ct,bi=[],ki=!1,Ma=[],Da=typeof document<"u",Oa=yu,Tu=xr||On?"cssFloat":"float",ay=Da&&!Kg&&!yu&&"draggable"in document.createElement("div"),$u=function(){if(Da){if(On)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}}(),Mu=function(e,t){var r=Ce(e),a=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),s=Go(e,0,t),i=Go(e,1,t),l=s&&Ce(s),c=i&&Ce(i),d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+gt(s).width,u=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+gt(i).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&l.float&&l.float!=="none"){var h=l.float==="left"?"left":"right";return i&&(c.clear==="both"||c.clear===h)?"vertical":"horizontal"}return s&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||d>=a&&r[Tu]==="none"||i&&r[Tu]==="none"&&d+u>a)?"vertical":"horizontal"},sy=function(e,t,r){var a=r?e.left:e.top,s=r?e.right:e.bottom,i=r?e.width:e.height,l=r?t.left:t.top,c=r?t.right:t.bottom,d=r?t.width:t.height;return a===l||s===c||a+i/2===l+d/2},iy=function(e,t){var r;return Ba.some(function(a){var s=a[Vt].options.emptyInsertThreshold;if(!(!s||pi(a))){var i=gt(a),l=e>=i.left-s&&e<=i.right+s,c=t>=i.top-s&&t<=i.bottom+s;if(l&&c)return r=a}}),r},Du=function(e){function t(s,i){return function(l,c,d,u){var h=l.options.group.name&&c.options.group.name&&l.options.group.name===c.options.group.name;if(s==null&&(i||h))return!0;if(s==null||s===!1)return!1;if(i&&s==="clone")return s;if(typeof s=="function")return t(s(l,c,d,u),i)(l,c,d,u);var p=(i?l:c).options.group.name;return s===!0||typeof s=="string"&&s===p||s.join&&s.indexOf(p)>-1}}var r={},a=e.group;(!a||_a(a)!="object")&&(a={name:a}),r.name=a.name,r.checkPull=t(a.pull,!0),r.checkPut=t(a.put),r.revertClone=a.revertClone,e.group=r},Ou=function(){!$u&&Oe&&Ce(Oe,"display","none")},Au=function(){!$u&&Oe&&Ce(Oe,"display","")};Da&&document.addEventListener("click",function(n){if(xa)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),xa=!1,!1},!0);var Eo=function(e){if(ue){e=e.touches?e.touches[0]:e;var t=iy(e.clientX,e.clientY);if(t){var r={};for(var a in e)e.hasOwnProperty(a)&&(r[a]=e[a]);r.target=r.rootEl=t,r.preventDefault=void 0,r.stopPropagation=void 0,t[Vt]._onDragOver(r)}}},ly=function(e){ue&&ue.parentNode[Vt]._isOutsideThisEl(e.target)};function Ee(n,e){if(!(n&&n.nodeType&&n.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));this.el=n,this.options=e=Mn({},e),n[Vt]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(n.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Mu(n,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(i,l){i.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Ee.supportPointer!==!1&&"PointerEvent"in window&&!Br,emptyInsertThreshold:5};$r.initializePlugins(this,n,t);for(var r in t)!(r in e)&&(e[r]=t[r]);Du(e);for(var a in this)a.charAt(0)==="_"&&typeof this[a]=="function"&&(this[a]=this[a].bind(this));this.nativeDraggable=e.forceFallback?!1:ay,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?He(n,"pointerdown",this._onTapStart):(He(n,"mousedown",this._onTapStart),He(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(He(n,"dragover",this),He(n,"dragenter",this)),Ba.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Mn(this,ey())}Ee.prototype={constructor:Ee,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Zo=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,ue):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,r=this.el,a=this.options,s=a.preventOnFilter,i=e.type,l=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,c=(l||e).target,d=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||c,u=a.filter;if(gy(r),!ue&&!(/mousedown|pointerdown/.test(i)&&e.button!==0||a.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&Br&&c&&c.tagName.toUpperCase()==="SELECT")&&(c=mn(c,a.draggable,r,!1),!(c&&c.animated)&&Ea!==c)){if(Xo=Kt(c),Mr=Kt(c,a.draggable),typeof u=="function"){if(u.call(this,e,c,this)){Mt({sortable:t,rootEl:d,name:"filter",targetEl:c,toEl:r,fromEl:r}),Lt("filter",t,{evt:e}),s&&e.cancelable&&e.preventDefault();return}}else if(u&&(u=u.split(",").some(function(h){if(h=mn(d,h.trim(),r,!1),h)return Mt({sortable:t,rootEl:h,name:"filter",targetEl:c,fromEl:r,toEl:r}),Lt("filter",t,{evt:e}),!0}),u)){s&&e.cancelable&&e.preventDefault();return}a.handle&&!mn(d,a.handle,r,!1)||this._prepareDragStart(e,l,c)}}},_prepareDragStart:function(e,t,r){var a=this,s=a.el,i=a.options,l=s.ownerDocument,c;if(r&&!ue&&r.parentNode===s){var d=gt(r);if(Qe=s,ue=r,ot=ue.parentNode,_o=ue.nextSibling,Ea=r,Sa=i.group,Ee.dragged=ue,Co={target:ue,clientX:(t||e).clientX,clientY:(t||e).clientY},xu=Co.clientX-d.left,Bu=Co.clientY-d.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,ue.style["will-change"]="all",c=function(){if(Lt("delayEnded",a,{evt:e}),Ee.eventCanceled){a._onDrop();return}a._disableDelayedDragEvents(),!gu&&a.nativeDraggable&&(ue.draggable=!0),a._triggerDragStart(e,t),Mt({sortable:a,name:"choose",originalEvent:e}),Rt(ue,i.chosenClass,!0)},i.ignore.split(",").forEach(function(u){vu(ue,u.trim(),vi)}),He(l,"dragover",Eo),He(l,"mousemove",Eo),He(l,"touchmove",Eo),He(l,"mouseup",a._onDrop),He(l,"touchend",a._onDrop),He(l,"touchcancel",a._onDrop),gu&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ue.draggable=!0),Lt("delayStart",this,{evt:e}),i.delay&&(!i.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(xr||On))){if(Ee.eventCanceled){this._onDrop();return}He(l,"mouseup",a._disableDelayedDrag),He(l,"touchend",a._disableDelayedDrag),He(l,"touchcancel",a._disableDelayedDrag),He(l,"mousemove",a._delayedDragTouchMoveHandler),He(l,"touchmove",a._delayedDragTouchMoveHandler),i.supportPointer&&He(l,"pointermove",a._delayedDragTouchMoveHandler),a._dragStartTimer=setTimeout(c,i.delay)}else c()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ue&&vi(ue),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Re(e,"mouseup",this._disableDelayedDrag),Re(e,"touchend",this._disableDelayedDrag),Re(e,"touchcancel",this._disableDelayedDrag),Re(e,"mousemove",this._delayedDragTouchMoveHandler),Re(e,"touchmove",this._delayedDragTouchMoveHandler),Re(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?He(document,"pointermove",this._onTouchMove):t?He(document,"touchmove",this._onTouchMove):He(document,"mousemove",this._onTouchMove):(He(ue,"dragend",this),He(Qe,"dragstart",this._onDragStart));try{document.selection?Ia(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(Qo=!1,Qe&&ue){Lt("dragStarted",this,{evt:t}),this.nativeDraggable&&He(document,"dragover",ly);var r=this.options;!e&&Rt(ue,r.dragClass,!1),Rt(ue,r.ghostClass,!0),Ee.active=this,e&&this._appendGhost(),Mt({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(nn){this._lastX=nn.clientX,this._lastY=nn.clientY,Ou();for(var e=document.elementFromPoint(nn.clientX,nn.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(nn.clientX,nn.clientY),e!==t);)t=e;if(ue.parentNode[Vt]._isOutsideThisEl(e),t)do{if(t[Vt]){var r=void 0;if(r=t[Vt]._onDragOver({clientX:nn.clientX,clientY:nn.clientY,target:e,rootEl:t}),r&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);Au()}},_onTouchMove:function(e){if(Co){var t=this.options,r=t.fallbackTolerance,a=t.fallbackOffset,s=e.touches?e.touches[0]:e,i=Oe&&qo(Oe,!0),l=Oe&&i&&i.a,c=Oe&&i&&i.d,d=Oa&&Ct&&_u(Ct),u=(s.clientX-Co.clientX+a.x)/(l||1)+(d?d[0]-bi[0]:0)/(l||1),h=(s.clientY-Co.clientY+a.y)/(c||1)+(d?d[1]-bi[1]:0)/(c||1);if(!Ee.active&&!Qo){if(r&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<r)return;this._onDragStart(e,!0)}if(Oe){i?(i.e+=u-(gi||0),i.f+=h-(yi||0)):i={a:1,b:0,c:0,d:1,e:u,f:h};var p="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");Ce(Oe,"webkitTransform",p),Ce(Oe,"mozTransform",p),Ce(Oe,"msTransform",p),Ce(Oe,"transform",p),gi=u,yi=h,nn=s}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Oe){var e=this.options.fallbackOnBody?document.body:Qe,t=gt(ue,!0,Oa,!0,e),r=this.options;if(Oa){for(Ct=e;Ce(Ct,"position")==="static"&&Ce(Ct,"transform")==="none"&&Ct!==document;)Ct=Ct.parentNode;Ct!==document.body&&Ct!==document.documentElement?(Ct===document&&(Ct=gn()),t.top+=Ct.scrollTop,t.left+=Ct.scrollLeft):Ct=gn(),bi=_u(Ct)}Oe=ue.cloneNode(!0),Rt(Oe,r.ghostClass,!1),Rt(Oe,r.fallbackClass,!0),Rt(Oe,r.dragClass,!0),Ce(Oe,"transition",""),Ce(Oe,"transform",""),Ce(Oe,"box-sizing","border-box"),Ce(Oe,"margin",0),Ce(Oe,"top",t.top),Ce(Oe,"left",t.left),Ce(Oe,"width",t.width),Ce(Oe,"height",t.height),Ce(Oe,"opacity","0.8"),Ce(Oe,"position",Oa?"absolute":"fixed"),Ce(Oe,"zIndex","100000"),Ce(Oe,"pointerEvents","none"),Ee.ghost=Oe,e.appendChild(Oe),Ce(Oe,"transform-origin",xu/parseInt(Oe.style.width)*100+"% "+Bu/parseInt(Oe.style.height)*100+"%")}},_onDragStart:function(e,t){var r=this,a=e.dataTransfer,s=r.options;if(Lt("dragStart",this,{evt:e}),Ee.eventCanceled){this._onDrop();return}Lt("setupClone",this),Ee.eventCanceled||(rt=Su(ue),rt.draggable=!1,rt.style["will-change"]="",this._hideClone(),Rt(rt,this.options.chosenClass,!1),Ee.clone=rt),r.cloneId=Ia(function(){Lt("clone",r),!Ee.eventCanceled&&(r.options.removeCloneOnHide||Qe.insertBefore(rt,ue),r._hideClone(),Mt({sortable:r,name:"clone"}))}),!t&&Rt(ue,s.dragClass,!0),t?(xa=!0,r._loopId=setInterval(r._emulateDragOver,50)):(Re(document,"mouseup",r._onDrop),Re(document,"touchend",r._onDrop),Re(document,"touchcancel",r._onDrop),a&&(a.effectAllowed="move",s.setData&&s.setData.call(r,a,ue)),He(document,"drop",r),Ce(ue,"transform","translateZ(0)")),Qo=!0,r._dragStartId=Ia(r._dragStarted.bind(r,t,e)),He(document,"selectstart",r),Dr=!0,Br&&Ce(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,r=e.target,a,s,i,l=this.options,c=l.group,d=Ee.active,u=Sa===c,h=l.sort,p=vt||d,m,f=this,g=!1;if(ki)return;function x(N,L){Lt(N,f,fn({evt:e,isOwner:u,axis:m?"vertical":"horizontal",revert:i,dragRect:a,targetRect:s,canSort:h,fromSortable:p,target:r,completed:C,onMove:function(z,oe){return Aa(Qe,t,ue,a,z,gt(z),e,oe)},changed:T},L))}function E(){x("dragOverAnimationCapture"),f.captureAnimationState(),f!==p&&p.captureAnimationState()}function C(N){return x("dragOverCompleted",{insertion:N}),N&&(u?d._hideClone():d._showClone(f),f!==p&&(Rt(ue,vt?vt.options.ghostClass:d.options.ghostClass,!1),Rt(ue,l.ghostClass,!0)),vt!==f&&f!==Ee.active?vt=f:f===Ee.active&&vt&&(vt=null),p===f&&(f._ignoreWhileAnimating=r),f.animateAll(function(){x("dragOverAnimationComplete"),f._ignoreWhileAnimating=null}),f!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(r===ue&&!ue.animated||r===t&&!r.animated)&&(Zo=null),!l.dragoverBubble&&!e.rootEl&&r!==document&&(ue.parentNode[Vt]._isOutsideThisEl(e.target),!N&&Eo(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),g=!0}function T(){Ht=Kt(ue),Xn=Kt(ue,l.draggable),Mt({sortable:f,name:"change",toEl:t,newIndex:Ht,newDraggableIndex:Xn,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),r=mn(r,l.draggable,t,!0),x("dragOver"),Ee.eventCanceled)return g;if(ue.contains(e.target)||r.animated&&r.animatingX&&r.animatingY||f._ignoreWhileAnimating===r)return C(!1);if(xa=!1,d&&!l.disabled&&(u?h||(i=ot!==Qe):vt===this||(this.lastPutMode=Sa.checkPull(this,d,ue,e))&&c.checkPut(this,d,ue,e))){if(m=this._getDirection(e,r)==="vertical",a=gt(ue),x("dragOverValid"),Ee.eventCanceled)return g;if(i)return ot=Qe,E(),this._hideClone(),x("revert"),Ee.eventCanceled||(_o?Qe.insertBefore(ue,_o):Qe.appendChild(ue)),C(!0);var F=pi(t,l.draggable);if(!F||hy(e,m,this)&&!F.animated){if(F===ue)return C(!1);if(F&&t===e.target&&(r=F),r&&(s=gt(r)),Aa(Qe,t,ue,a,r,s,e,!!r)!==!1)return E(),t.appendChild(ue),ot=t,T(),C(!0)}else if(F&&uy(e,m,this)){var I=Go(t,0,l,!0);if(I===ue)return C(!1);if(r=I,s=gt(r),Aa(Qe,t,ue,a,r,s,e,!1)!==!1)return E(),t.insertBefore(ue,I),ot=t,T(),C(!0)}else if(r.parentNode===t){s=gt(r);var O=0,P,M=ue.parentNode!==t,v=!sy(ue.animated&&ue.toRect||a,r.animated&&r.toRect||s,m),b=m?"top":"left",D=wu(r,"top","top")||wu(ue,"top","top"),Y=D?D.scrollTop:void 0;Zo!==r&&(P=s[b],Ar=!1,Ta=!v&&l.invertSwap||M),O=py(e,r,s,m,v?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,Ta,Zo===r);var K;if(O!==0){var w=Kt(ue);do w-=O,K=ot.children[w];while(K&&(Ce(K,"display")==="none"||K===Oe))}if(O===0||K===r)return C(!1);Zo=r,Or=O;var k=r.nextElementSibling,_=!1;_=O===1;var A=Aa(Qe,t,ue,a,r,s,e,_);if(A!==!1)return(A===1||A===-1)&&(_=A===1),ki=!0,setTimeout(dy,30),E(),_&&!k?t.appendChild(ue):r.parentNode.insertBefore(ue,_?k:r),D&&Eu(D,0,Y-D.scrollTop),ot=ue.parentNode,P!==void 0&&!Ta&&($a=Math.abs(P-gt(r)[b])),T(),C(!0)}if(t.contains(ue))return C(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Re(document,"mousemove",this._onTouchMove),Re(document,"touchmove",this._onTouchMove),Re(document,"pointermove",this._onTouchMove),Re(document,"dragover",Eo),Re(document,"mousemove",Eo),Re(document,"touchmove",Eo)},_offUpEvents:function(){var e=this.el.ownerDocument;Re(e,"mouseup",this._onDrop),Re(e,"touchend",this._onDrop),Re(e,"pointerup",this._onDrop),Re(e,"touchcancel",this._onDrop),Re(document,"selectstart",this)},_onDrop:function(e){var t=this.el,r=this.options;if(Ht=Kt(ue),Xn=Kt(ue,r.draggable),Lt("drop",this,{evt:e}),ot=ue&&ue.parentNode,Ht=Kt(ue),Xn=Kt(ue,r.draggable),Ee.eventCanceled){this._nulling();return}Qo=!1,Ta=!1,Ar=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),wi(this.cloneId),wi(this._dragStartId),this.nativeDraggable&&(Re(document,"drop",this),Re(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Br&&Ce(document.body,"user-select",""),Ce(ue,"transform",""),e&&(Dr&&(e.cancelable&&e.preventDefault(),!r.dropBubble&&e.stopPropagation()),Oe&&Oe.parentNode&&Oe.parentNode.removeChild(Oe),(Qe===ot||vt&&vt.lastPutMode!=="clone")&&rt&&rt.parentNode&&rt.parentNode.removeChild(rt),ue&&(this.nativeDraggable&&Re(ue,"dragend",this),vi(ue),ue.style["will-change"]="",Dr&&!Qo&&Rt(ue,vt?vt.options.ghostClass:this.options.ghostClass,!1),Rt(ue,this.options.chosenClass,!1),Mt({sortable:this,name:"unchoose",toEl:ot,newIndex:null,newDraggableIndex:null,originalEvent:e}),Qe!==ot?(Ht>=0&&(Mt({rootEl:ot,name:"add",toEl:ot,fromEl:Qe,originalEvent:e}),Mt({sortable:this,name:"remove",toEl:ot,originalEvent:e}),Mt({rootEl:ot,name:"sort",toEl:ot,fromEl:Qe,originalEvent:e}),Mt({sortable:this,name:"sort",toEl:ot,originalEvent:e})),vt&&vt.save()):Ht!==Xo&&Ht>=0&&(Mt({sortable:this,name:"update",toEl:ot,originalEvent:e}),Mt({sortable:this,name:"sort",toEl:ot,originalEvent:e})),Ee.active&&((Ht==null||Ht===-1)&&(Ht=Xo,Xn=Mr),Mt({sortable:this,name:"end",toEl:ot,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Lt("nulling",this),Qe=ue=ot=Oe=_o=rt=Ea=Kn=Co=nn=Dr=Ht=Xn=Xo=Mr=Zo=Or=vt=Sa=Ee.dragged=Ee.ghost=Ee.clone=Ee.active=null,Ma.forEach(function(e){e.checked=!0}),Ma.length=gi=yi=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":ue&&(this._onDragOver(e),cy(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,r=this.el.children,a=0,s=r.length,i=this.options;a<s;a++)t=r[a],mn(t,i.draggable,this.el,!1)&&e.push(t.getAttribute(i.dataIdAttr)||my(t));return e},sort:function(e,t){var r={},a=this.el;this.toArray().forEach(function(s,i){var l=a.children[i];mn(l,this.options.draggable,a,!1)&&(r[s]=l)},this),t&&this.captureAnimationState(),e.forEach(function(s){r[s]&&(a.removeChild(r[s]),a.appendChild(r[s]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return mn(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var r=this.options;if(t===void 0)return r[e];var a=$r.modifyOption(this,e,t);typeof a<"u"?r[e]=a:r[e]=t,e==="group"&&Du(r)},destroy:function(){Lt("destroy",this);var e=this.el;e[Vt]=null,Re(e,"mousedown",this._onTapStart),Re(e,"touchstart",this._onTapStart),Re(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(Re(e,"dragover",this),Re(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Ba.splice(Ba.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Kn){if(Lt("hideClone",this),Ee.eventCanceled)return;Ce(rt,"display","none"),this.options.removeCloneOnHide&&rt.parentNode&&rt.parentNode.removeChild(rt),Kn=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Kn){if(Lt("showClone",this),Ee.eventCanceled)return;ue.parentNode==Qe&&!this.options.group.revertClone?Qe.insertBefore(rt,ue):_o?Qe.insertBefore(rt,_o):Qe.appendChild(rt),this.options.group.revertClone&&this.animate(ue,rt),Ce(rt,"display",""),Kn=!1}}};function cy(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function Aa(n,e,t,r,a,s,i,l){var c,d=n[Vt],u=d.options.onMove,h;return window.CustomEvent&&!On&&!xr?c=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(c=document.createEvent("Event"),c.initEvent("move",!0,!0)),c.to=e,c.from=n,c.dragged=t,c.draggedRect=r,c.related=a||e,c.relatedRect=s||gt(e),c.willInsertAfter=l,c.originalEvent=i,n.dispatchEvent(c),u&&(h=u.call(d,c,i)),h}function vi(n){n.draggable=!1}function dy(){ki=!1}function uy(n,e,t){var r=gt(Go(t.el,0,t.options,!0)),a=10;return e?n.clientX<r.left-a||n.clientY<r.top&&n.clientX<r.right:n.clientY<r.top-a||n.clientY<r.bottom&&n.clientX<r.left}function hy(n,e,t){var r=gt(pi(t.el,t.options.draggable)),a=10;return e?n.clientX>r.right+a||n.clientX<=r.right&&n.clientY>r.bottom&&n.clientX>=r.left:n.clientX>r.right&&n.clientY>r.top||n.clientX<=r.right&&n.clientY>r.bottom+a}function py(n,e,t,r,a,s,i,l){var c=r?n.clientY:n.clientX,d=r?t.height:t.width,u=r?t.top:t.left,h=r?t.bottom:t.right,p=!1;if(!i){if(l&&$a<d*a){if(!Ar&&(Or===1?c>u+d*s/2:c<h-d*s/2)&&(Ar=!0),Ar)p=!0;else if(Or===1?c<u+$a:c>h-$a)return-Or}else if(c>u+d*(1-a)/2&&c<h-d*(1-a)/2)return fy(e)}return p=p||i,p&&(c<u+d*s/2||c>h-d*s/2)?c>u+d/2?1:-1:0}function fy(n){return Kt(ue)<Kt(n)?1:-1}function my(n){for(var e=n.tagName+n.className+n.src+n.href+n.textContent,t=e.length,r=0;t--;)r+=e.charCodeAt(t);return r.toString(36)}function gy(n){Ma.length=0;for(var e=n.getElementsByTagName("input"),t=e.length;t--;){var r=e[t];r.checked&&Ma.push(r)}}function Ia(n){return setTimeout(n,0)}function wi(n){return clearTimeout(n)}Da&&He(document,"touchmove",function(n){(Ee.active||Qo)&&n.cancelable&&n.preventDefault()}),Ee.utils={on:He,off:Re,css:Ce,find:vu,is:function(e,t){return!!mn(e,t,e,!1)},extend:Zg,throttle:Cu,closest:mn,toggleClass:Rt,clone:Su,index:Kt,nextTick:Ia,cancelNextTick:wi,detectDirection:Mu,getChild:Go},Ee.get=function(n){return n[Vt]},Ee.mount=function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(Ee.utils=fn(fn({},Ee.utils),r.utils)),$r.mount(r)})},Ee.create=function(n,e){return new Ee(n,e)},Ee.version=Gg;var ft=[],Ir,_i,Ci=!1,Ei,Si,Na,Nr;function yy(){function n(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return n.prototype={dragStarted:function(t){var r=t.originalEvent;this.sortable.nativeDraggable?He(document,"dragover",this._handleAutoScroll):this.options.supportPointer?He(document,"pointermove",this._handleFallbackAutoScroll):r.touches?He(document,"touchmove",this._handleFallbackAutoScroll):He(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var r=t.originalEvent;!this.options.dragOverBubble&&!r.rootEl&&this._handleAutoScroll(r)},drop:function(){this.sortable.nativeDraggable?Re(document,"dragover",this._handleAutoScroll):(Re(document,"pointermove",this._handleFallbackAutoScroll),Re(document,"touchmove",this._handleFallbackAutoScroll),Re(document,"mousemove",this._handleFallbackAutoScroll)),Iu(),Pa(),Jg()},nulling:function(){Na=_i=Ir=Ci=Nr=Ei=Si=null,ft.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,r){var a=this,s=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,l=document.elementFromPoint(s,i);if(Na=t,r||this.options.forceAutoScrollFallback||xr||On||Br){xi(t,this.options,l,r);var c=Gn(l,!0);Ci&&(!Nr||s!==Ei||i!==Si)&&(Nr&&Iu(),Nr=setInterval(function(){var d=Gn(document.elementFromPoint(s,i),!0);d!==c&&(c=d,Pa()),xi(t,a.options,d,r)},10),Ei=s,Si=i)}else{if(!this.options.bubbleScroll||Gn(l,!0)===gn()){Pa();return}xi(t,this.options,Gn(l,!1),!1)}}},Mn(n,{pluginName:"scroll",initializeByDefault:!0})}function Pa(){ft.forEach(function(n){clearInterval(n.pid)}),ft=[]}function Iu(){clearInterval(Nr)}var xi=Cu(function(n,e,t,r){if(e.scroll){var a=(n.touches?n.touches[0]:n).clientX,s=(n.touches?n.touches[0]:n).clientY,i=e.scrollSensitivity,l=e.scrollSpeed,c=gn(),d=!1,u;_i!==t&&(_i=t,Pa(),Ir=e.scroll,u=e.scrollFn,Ir===!0&&(Ir=Gn(t,!0)));var h=0,p=Ir;do{var m=p,f=gt(m),g=f.top,x=f.bottom,E=f.left,C=f.right,T=f.width,F=f.height,I=void 0,O=void 0,P=m.scrollWidth,M=m.scrollHeight,v=Ce(m),b=m.scrollLeft,D=m.scrollTop;m===c?(I=T<P&&(v.overflowX==="auto"||v.overflowX==="scroll"||v.overflowX==="visible"),O=F<M&&(v.overflowY==="auto"||v.overflowY==="scroll"||v.overflowY==="visible")):(I=T<P&&(v.overflowX==="auto"||v.overflowX==="scroll"),O=F<M&&(v.overflowY==="auto"||v.overflowY==="scroll"));var Y=I&&(Math.abs(C-a)<=i&&b+T<P)-(Math.abs(E-a)<=i&&!!b),K=O&&(Math.abs(x-s)<=i&&D+F<M)-(Math.abs(g-s)<=i&&!!D);if(!ft[h])for(var w=0;w<=h;w++)ft[w]||(ft[w]={});(ft[h].vx!=Y||ft[h].vy!=K||ft[h].el!==m)&&(ft[h].el=m,ft[h].vx=Y,ft[h].vy=K,clearInterval(ft[h].pid),(Y!=0||K!=0)&&(d=!0,ft[h].pid=setInterval((function(){r&&this.layer===0&&Ee.active._onTouchMove(Na);var k=ft[this.layer].vy?ft[this.layer].vy*l:0,_=ft[this.layer].vx?ft[this.layer].vx*l:0;typeof u=="function"&&u.call(Ee.dragged.parentNode[Vt],_,k,n,Na,ft[this.layer].el)!=="continue"||Eu(ft[this.layer].el,_,k)}).bind({layer:h}),24))),h++}while(e.bubbleScroll&&p!==c&&(p=Gn(p,!1)));Ci=d}},30),Nu=function(e){var t=e.originalEvent,r=e.putSortable,a=e.dragEl,s=e.activeSortable,i=e.dispatchSortableEvent,l=e.hideGhostForTarget,c=e.unhideGhostForTarget;if(t){var d=r||s;l();var u=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,h=document.elementFromPoint(u.clientX,u.clientY);c(),d&&!d.el.contains(h)&&(i("spill"),this.onSpill({dragEl:a,putSortable:r}))}};function Bi(){}Bi.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,r=e.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var a=Go(this.sortable.el,this.startIndex,this.options);a?this.sortable.el.insertBefore(t,a):this.sortable.el.appendChild(t),this.sortable.animateAll(),r&&r.animateAll()},drop:Nu},Mn(Bi,{pluginName:"revertOnSpill"});function Ti(){}Ti.prototype={onSpill:function(e){var t=e.dragEl,r=e.putSortable,a=r||this.sortable;a.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),a.animateAll()},drop:Nu},Mn(Ti,{pluginName:"removeOnSpill"}),Ee.mount(new yy),Ee.mount(Ti,Bi);function by(){return typeof window<"u"?window.console:global.console}const ky=by();function vy(n){const e=Object.create(null);return function(r){return e[r]||(e[r]=n(r))}}const wy=/-(\w)/g,Pu=vy(n=>n.replace(wy,(e,t)=>t?t.toUpperCase():""));function $i(n){n.parentElement!==null&&n.parentElement.removeChild(n)}function Lu(n,e,t){const r=t===0?n.children[0]:n.children[t-1].nextSibling;n.insertBefore(e,r)}function _y(n,e){return Object.values(n).indexOf(e)}function Cy(n,e,t,r){if(!n)return[];const a=Object.values(n),s=e.length-r;return[...e].map((l,c)=>c>=s?a.length:a.indexOf(l))}function zu(n,e){this.$nextTick(()=>this.$emit(n.toLowerCase(),e))}function Ey(n){return e=>{this.realList!==null&&this["onDrag"+n](e),zu.call(this,n,e)}}function Sy(n){return["transition-group","TransitionGroup"].includes(n)}function xy(n){if(!n||n.length!==1)return!1;const[{type:e}]=n;return e?Sy(e.name):!1}function By(n,e){return e?{...e.props,...e.attrs}:n}const Mi=["Start","Add","Remove","Update","End"],Di=["Choose","Unchoose","Sort","Filter","Clone"],Ty=["Move",...Mi,...Di].map(n=>"on"+n);let Oi=null;const $y={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:n=>n},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},My=o.defineComponent({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...Mi.map(n=>n.toLowerCase()),...Di.map(n=>n.toLowerCase())],props:$y,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const n=this.$slots.default?this.$slots.default():null,e=By(this.$attrs,this.componentData);return n?(this.transitionMode=xy(n),o.h(this.getTag(),e,n)):o.h(this.getTag(),e,[])},created(){this.list!==null&&this.modelValue!==null&&ky.error("list props are mutually exclusive! Please set one.")},mounted(){const n={};Mi.forEach(a=>{n["on"+a]=Ey.call(this,a)}),Di.forEach(a=>{n["on"+a]=zu.bind(this,a)});const e=Object.keys(this.$attrs).reduce((a,s)=>(a[Pu(s)]=this.$attrs[s],a),{}),t=Object.assign({},e,n,{onMove:(a,s)=>this.onDragMove(a,s)});!("draggable"in t)&&(t.draggable=">*");const r=this.$el.nodeType===1?this.$el:this.$el.parentElement;this._sortable=new Ee(r,t),r.__draggable_component__=this,this.computeIndexes()},beforeUnmount(){try{this._sortable!==void 0&&this._sortable.destroy()}catch{}},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(n){this.updateOptions(n)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?o.resolveComponent(this.component):this.tag},updateOptions(n){for(var e in n){const t=Pu(e);Ty.indexOf(t)===-1&&this._sortable.option(t,n[e])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=Cy(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(n){const e=_y(this.getChildrenNodes()||[],n);if(e===-1)return null;const t=this.realList[e];return{index:e,element:t}},emitChanges(n){this.$nextTick(()=>{this.$emit("change",n)})},alterList(n){if(this.list){n(this.list);return}const e=[...this.modelValue];n(e),this.$emit("update:modelValue",e)},spliceList(){const n=e=>e.splice(...arguments);this.alterList(n)},updatePosition(n,e){const t=r=>r.splice(e,0,r.splice(n,1)[0]);this.alterList(t)},getVmIndex(n){const e=this.visibleIndexes,t=e.length;return n>t-1?t:e[n]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(n){if(!this.noTransitionOnDrag||!this.transitionMode)return;var e=this.getChildrenNodes();e[n].data=null;const t=this.getComponent();t.children=[],t.kept=void 0},onDragStart(n){this.computeIndexes(),this.context=this.getUnderlyingVm(n.item),this.context&&(n.item._underlying_vm_=this.clone(this.context.element),Oi=n.item)},onDragAdd(n){const e=n.item._underlying_vm_;if(e===void 0)return;$i(n.item);const t=this.getVmIndex(n.newIndex);this.spliceList(t,0,e),this.computeIndexes();const r={element:e,newIndex:t};this.emitChanges({added:r})},onDragRemove(n){if(Lu(this.$el,n.item,n.oldIndex),n.pullMode==="clone"){$i(n.clone);return}if(!this.context)return;const e=this.context.index;this.spliceList(e,1);const t={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:t})},onDragUpdate(n){$i(n.item),Lu(n.from,n.item,n.oldIndex);const e=this.context.index,t=this.getVmIndex(n.newIndex);this.updatePosition(e,t);const r={element:this.context.element,oldIndex:e,newIndex:t};this.emitChanges({moved:r})},updateProperty(n,e){n.hasOwnProperty(e)&&(n[e]+=this.headerOffset)},onDragMove(n,e){const t=this.move;if(!t||!this.realList)return!0;const r=this.getRelatedContextFromMoveEvent(n),a=this.context,s=this.computeFutureIndex(r,n);Object.assign(a,{futureIndex:s});const i=Object.assign({},n,{relatedContext:r,draggedContext:a});return t(i,e)},onDragEnd(){this.computeIndexes(),Oi=null},getTrargetedComponent(n){return n.__draggable_component__},getRelatedContextFromMoveEvent({to:n,related:e}){const t=this.getTrargetedComponent(n);if(!t)return{component:t};const r=t.realList,a={list:r,component:t};if(n!==e&&r&&t.getUnderlyingVm){const s=t.getUnderlyingVm(e);if(s)return Object.assign(s,a)}return a},computeFutureIndex(n,e){const t=[...e.to.children].filter(i=>i.style.display!=="none");if(t.length===0)return 0;const r=t.indexOf(e.related),a=n.component.getVmIndex(r);return t.indexOf(Oi)!==-1||!e.willInsertAfter?a:a+1}}}),Dy=o.defineComponent({__name:"CardContentList",props:o.mergeModels({list:{},isSortable:{type:Boolean}},{list:{required:!0},listModifiers:{}}),emits:["update:list"],setup(n){const e=o.useModel(n,"list"),t=o.ref(),r=o.ref(!0);function a(d,u){const h=[...e.value],p={...h[d]};p.value=u,h[d]=p,e.value=h}function s(d,u){const h=u==="up"?d-1:d+1;if(h<0||h>=e.value.length)return;const p=[...e.value],m={...p[d]};p[d]=p[h],p[h]=m,e.value=p}function i(d){t.value=d.oldIndex}function l(){return n.isSortable}function c(){r.value=!1}return(d,u)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(d.$style.root)},[o.createVNode(o.unref(My),{modelValue:e.value,"onUpdate:modelValue":u[0]||(u[0]=h=>e.value=h),filter:`.${d.$style["is-disabled"]}`,move:l,class:o.normalizeClass(d.$style.list),transitionMode:"",noTransitionOnDrag:!1,onStart:c,onEnd:u[1]||(u[1]=h=>r.value=!0),onChoose:i,onUnchoose:u[2]||(u[2]=h=>t.value=null)},{default:o.withCtx(()=>[o.createVNode(o.TransitionGroup,{type:"transition",name:r.value?"flip-list":void 0},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.value,(h,p)=>(o.openBlock(),o.createBlock(o.unref(pu),{key:h.title+h.description+h.image,isSortable:d.isSortable,isChosen:p===t.value,title:h.title,description:h.description,image:h.image,value:h.value,class:o.normalizeClass({[d.$style["is-disabled"]]:!d.isSortable}),"onUpdate:value":m=>a(p,m),onClickMoveUp:m=>s(p,"up"),onClickMoveDown:m=>s(p,"down")},null,8,["isSortable","isChosen","title","description","image","value","class","onUpdate:value","onClickMoveUp","onClickMoveDown"]))),128))]),_:1},8,["name"])]),_:1},8,["modelValue","filter","class"])],2))}}),Fu={"is-disabled":"CardContentList__is-disabled_f57bc",list:"CardContentList__list_df4a5"},Oy=re(Dy,[["__cssModules",{$style:Fu}]]),Ay=re(o.defineComponent({__name:"CardContentListSkeleton",setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.$style.root)},[o.createElementVNode("div",{class:o.normalizeClass(e.$style.list)},[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(4,r=>o.createVNode(o.unref(fu),{key:r})),64))],2)],2))}}),[["__cssModules",{$style:Fu}]]),La={"fade-enter-active":"TransitionFade__fade-enter-active_b9e5e","fade-leave-active":"TransitionFade__fade-leave-active_95a44","fade-enter-from":"TransitionFade__fade-enter-from_edaa1","fade-leave-to":"TransitionFade__fade-leave-to_013a6"},Jo=o.defineComponent({name:"TransitionFade",props:{appear:{type:Boolean,default:!1},mode:{type:String,default:"out-in"},duration:{type:Number,default:450}},setup(n,{slots:e}){return()=>o.h(o.Transition,{name:"fade",appear:n.appear,mode:n.mode,duration:n.duration,enterFromClass:La["fade-enter-from"],enterActiveClass:La["fade-enter-active"],leaveActiveClass:La["fade-leave-active"],leaveToClass:La["fade-leave-to"]},()=>e.default?e.default():[])}}),Iy=["value"],Ru=re(o.defineComponent({__name:"Checkbox",props:{value:{type:Boolean},size:{},isIndeterminate:{type:Boolean,default:!1},isDisabled:{type:Boolean}},emits:["update:value","click"],setup(n,{emit:e}){const t=e;return(r,a)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([r.$style.root,r.$style[`size-${r.size}`],(r.value||r.value===null)&&r.$style.checked]),onClick:a[1]||(a[1]=s=>t("click",s))},[o.createElementVNode("input",{class:o.normalizeClass(r.$style.input),hidden:"",type:"checkbox",value:r.value,onChange:a[0]||(a[0]=s=>t("update:value",!r.value))},null,42,Iy),o.createVNode(o.unref(Jo),null,{default:o.withCtx(()=>[!r.isIndeterminate&&r.value?(o.openBlock(),o.createBlock(o.unref($e),{key:0,name:"outline-check",size:+r.size-4,color:"foreground-interactive-button-base-primary",class:o.normalizeClass(r.$style.icon)},null,8,["size","class"])):r.value?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(r.$style.indeterminate)},null,2)):o.createCommentVNode("",!0)]),_:1})],2))}}),[["__cssModules",{$style:{root:"Checkbox__root_f45d5",input:"Checkbox__input_620bc",checked:"Checkbox__checked_3839a","size-16":"Checkbox__size-16_94879",indeterminate:"Checkbox__indeterminate_1896f","size-20":"Checkbox__size-20_51064",icon:"Checkbox__icon_c8204"}}]]),Ai=re(o.defineComponent({__name:"CheckboxCell",props:{value:{type:Boolean},title:{},description:{},isIndeterminate:{type:Boolean,default:!1},size:{default:"16"}},emits:["update:value"],setup(n,{emit:e}){const t=e;return(r,a)=>(o.openBlock(),o.createElementBlock("label",{class:o.normalizeClass(r.$style.root)},[o.createVNode(o.unref(Ru),{size:r.size,"is-indeterminate":r.isIndeterminate,value:r.value,"onUpdate:value":a[0]||(a[0]=s=>t("update:value",s))},null,8,["size","is-indeterminate","value"]),o.renderSlot(r.$slots,"leftItem"),o.createElementVNode("div",{class:o.normalizeClass(r.$style.content)},[o.createVNode(o.unref(me),{size:r.size==="16"?"caption":"subhead",weight:"regular",color:"foreground-layout-layout-1-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(r.title),1)]),_:1},8,["size"]),r.description?(o.openBlock(),o.createBlock(o.unref(me),{key:0,size:"caption",weight:"regular",color:"foreground-layout-layout-1-secondary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(r.description),1)]),_:1})):o.createCommentVNode("",!0)],2)],2))}}),[["__cssModules",{$style:{root:"CheckboxCell__root_9478c",content:"CheckboxCell__content_7fd78"}}]]),za=re(o.defineComponent({__name:"Chip",props:{count:{},view:{default:"base-primary"}},emits:["click","delete"],setup(n,{emit:e}){const t=e,r=o.computed(()=>n.view==="base-secondary"?"foreground-interactive-button-base-secondary":"foreground-interactive-button-base-primary");return(a,s)=>(o.openBlock(),o.createElementBlock("button",{class:o.normalizeClass([a.$style.root,a.$style[`view_${a.view}`]]),onClick:s[1]||(s[1]=i=>t("click"))},[o.createVNode(o.unref(me),{class:o.normalizeClass(a.$style.text),size:"caption",color:r.value},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},8,["class","color"]),a.count?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(a.$style.counter)},[o.createVNode(o.unref(me),{class:o.normalizeClass(a.$style.value),size:"caption",color:r.value},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.count),1)]),_:1},8,["class","color"])],2)):o.createCommentVNode("",!0),o.createVNode(o.unref($e),{class:o.normalizeClass(a.$style.delete),color:r.value,size:"18",name:"outline-cross",onClick:s[0]||(s[0]=o.withModifiers(i=>t("delete"),["stop"]))},null,8,["class","color"])],2))}}),[["__cssModules",{$style:{root:"Chip__root_f8f48","view_base-primary":"Chip__view_base-primary_e9bb2","view_base-secondary":"Chip__view_base-secondary_63f45",counter:"Chip__counter_0bf18",delete:"Chip__delete_7a4b5",text:"Chip__text_78294"}}]]),An=re(o.defineComponent({__name:"Divider",props:{size:{},opacity:{default:1}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([e.$style.root,e.$style[`size_${e.size}`]]),style:o.normalizeStyle({...Number(e.opacity)!==1&&{opacity:Number(e.opacity)}})},null,6))}}),[["__cssModules",{$style:{root:"Divider__root_08288",size_s:"Divider__size_s_0e343",size_m:"Divider__size_m_73f73"}}]]),Vu=()=>{function n(i){i.style.height="0px",i.style.opacity="0",i.style.overflow="hidden"}function e(i,l){i.style.transition="height 0.3s ease",i.style.height=i.scrollHeight+"px",i.addEventListener("transitionend",()=>{i.style.transition="opacity 0.2s ease",i.style.opacity="1",i.addEventListener("transitionend",l,{once:!0})},{once:!0})}function t(i){i.style.height="",i.style.overflow=""}function r(i){i.style.height=i.scrollHeight+"px",i.style.opacity="1",i.style.overflow="hidden"}function a(i,l){i.style.transition="opacity 0.3s ease",i.style.opacity="0",i.addEventListener("transitionend",()=>{i.style.transition="all 0.3s ease",i.style.height="0px",i.style.paddingTop="0px",i.addEventListener("transitionend",l,{once:!0})},{once:!0})}function s(i){i.style.height="0px"}return{beforeEnter:n,enter:e,afterEnter:t,beforeLeave:r,leave:a,afterLeave:s}},Ny=re(o.defineComponent({__name:"Dropdown",props:{title:{},isActive:{type:Boolean}},emits:["click"],setup(n,{emit:e}){const t=e,r=o.useCssModule(),a=Vu(),s=o.ref(n.isActive??!1),i=o.computed(()=>[s.value&&r["is-open"]]);function l(){s.value=!s.value,t("click",s.value)}return o.watch(()=>n.isActive,c=>{s.value=c}),(c,d)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(i.value)},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(r).header),"data-test":"DropdownTextHeader",onClick:l},[o.createVNode(o.unref(me),{size:"subhead",color:"text-common-base-secondary-default"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(c.title),1)]),_:1}),o.createVNode(o.unref($e),{class:o.normalizeClass(o.unref(r).icon),name:"outline-chevron-down",size:"18",color:"icon-common-base-secondary-default"},null,8,["class"])],2),o.createVNode(o.Transition,o.toHandlers(o.unref(a)),{default:o.withCtx(()=>[s.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(r).content)},[o.renderSlot(c.$slots,"default")],2)):o.createCommentVNode("",!0)]),_:3},16)],2))}}),[["__cssModules",{$style:{header:"Dropdown__header_4b67e",icon:"Dropdown__icon_d8b38",content:"Dropdown__content_1f45b","is-open":"Dropdown__is-open_47cb6"}}]]);function Py(n,e){if((!n||n.length===0)&&!e)return"";const t=(n==null?void 0:n.map(i=>{if(i.includes("/")){const l=i.split("/"),c=l[1];return c==="*"?l[0].toUpperCase():c.includes("+")?c.split("+")[0].toUpperCase():c.toUpperCase()}else return i.toUpperCase()}))||[],a=Array.from(new Set(t)).join(", ");let s="";if(e){const i=e.match(/^(\d+(?:\.\d+)?)(B|KB|MB|GB)$/i);if(i){const l=i[1],c=i[2].toUpperCase();s=`до ${l} ${{B:"б",KB:"Кб",MB:"Мб",GB:"Гб"}[c]||c}.`}}return a&&s?`${a} ${s}`:a||s}function Ly(n){if(!n)return 0;const e={B:1,KB:1024,MB:1024**2,GB:1024**3},t=/^(\d+(?:\.\d+)?)(B|KB|MB|GB)$/i,r=n.replace(/\s+/g,"").match(t);if(r){const a=parseFloat(r[1]),s=r[2].toUpperCase(),i=e[s];if(!i)throw new Error(`Неизвестная единица измерения: "${s}"`);return Math.round(a*i)}return 0}function zy({format:n,size:e,fileSize:t,fileExtension:r,fileType:a}){const s=Ly(e);let i=!1,l=!1;if(t>s&&(i=!0),n&&n.length>0){const c=n.map(h=>h.toLowerCase()),d=r&&c.includes(r),u=c.includes(a.toLowerCase());!d&&!u&&(l=!0)}return{size:i,format:l}}function Fy({errors:n,format:e,size:t}){if(n.format&&(e!=null&&e.length)){const r=e.map(i=>{if(i.includes("/")){const l=i.split("/")[1];return l==="*"?i.split("/")[0].toUpperCase():l.includes("+")?l.split("+")[0].toUpperCase():l.toUpperCase()}else return i.toUpperCase()}),a=Array.from(new Set(r));let s="";if(a.length===1)s=a[0];else if(a.length===2)s=`${a[0]} или ${a[1]}`;else{const i=a.pop();s=`${a.join(", ")} или ${i}`}return`Файл должен иметь расширение ${s}`}if(n.size&&t){const r=t.match(/^(\d+(?:\.\d+)?)(B|KB|MB|GB)$/i);if(r){const a=r[1],s=r[2].toUpperCase();return`Размер файла не должен превышать ${a} ${{B:"Б",KB:"Кб",MB:"Мб",GB:"Гб"}[s]||s}.`}}return""}function Hu(n){const e=o.ref(n);function t(r){e.value=r}return[e,t]}function Ry(n){const[e,t]=Hu(!1);function r(){n.value||t(!0)}function a(){n.value||t(!1)}function s(){n.value||t(!1)}return{isDropping:e,onDragEnter:r,onDragLeave:a,onDrop:s}}function Vy(n,e){const t=o.computed(()=>n?"text-disable-default":"text-common-base-primary-default"),r=o.computed(()=>n?"text-disable-default":"text-common-base-primary-default"),a=o.computed(()=>n?"icon-disable-primary":e.value?"icon-common-critical-primary-default":"icon-common-success-primary-default"),s=o.computed(()=>e.value?n?"outline-warning":"filled-warning":n?"outline-success":"filled-success"),i=o.computed(()=>e.value?"text-common-critical-primary-default":n?"text-disable-default":"text-common-base-secondary-default");return{labelColor:t,fileNameColor:r,fileIconColor:a,fileIconName:s,descriptionColor:i}}const Hy=["accept","disabled"],jy=re(o.defineComponent({__name:"Dropzone",props:o.mergeModels({value:{},label:{},placeholder:{},isLoading:{type:Boolean},description:{},errorText:{},isError:{type:Boolean},isDisabled:{type:Boolean},format:{},size:{}},{value:{required:!0},valueModifiers:{},isError:{type:Boolean},isErrorModifiers:{}}),emits:o.mergeModels(["update:value"],["update:value","update:isError"]),setup(n,{emit:e}){const t=e,r=o.useModel(n,"value"),a=o.useModel(n,"isError"),s=o.useCssModule(),i=o.ref(),l=o.ref(""),c=o.ref(""),d=o.ref({format:!1,size:!1}),u=o.computed(()=>l.value?"file":"empty"),{labelColor:h,fileNameColor:p,fileIconColor:m,fileIconName:f,descriptionColor:g}=Vy(n.isDisabled,a),{isDropping:x,onDragEnter:E,onDragLeave:C,onDrop:T}=Ry(r);async function F(w){const{files:k}=w.target;if(a.value=!1,t("update:value",!1),d.value={format:!1,size:!1},i.value&&(k!=null&&k.length)){const _=k[0],{name:A,extension:N}=M(_);l.value=A,c.value=N,d.value=zy({size:n.size,format:n.format,fileSize:_.size,fileExtension:c.value,fileType:_.type}),a.value=d.value.size||d.value.format,!d.value.size&&!d.value.format&&(r.value=await O(_)),i.value.value=""}}function I(){r.value=null,a.value=!1,i.value.value="",l.value=""}function O(w){return new Promise((k,_)=>{const A=new FileReader;A.readAsDataURL(w),A.onload=()=>{const N=A.result,[L,q]=N.split(","),z=L.match(/data:(.*);base64/),oe=z?z[1]:"";k({mime:oe,content:q})},A.onerror=N=>_(N)})}function P(w){return{"image/png":"png","image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","application/pdf":"pdf","text/plain":"txt"}[w]||"bin"}function M(w){const k=w.name.lastIndexOf(".");return{name:k!==-1?w.name.slice(0,k):w.name,extension:k!==-1?w.name.slice(k+1).toLowerCase():""}}const v=o.computed(()=>a.value&&n.errorText?n.errorText:a.value||d.value.size||d.value.format?Fy({errors:d.value,format:n.format,size:n.size}):n.description?n.description:Py(n.format,n.size)),b=o.computed(()=>n.format?n.format.map(w=>w.indexOf("/")!==-1?`${w}`:`.${w}`).join(","):""),D=o.computed(()=>[s.root,{[s["is-disabled"]]:n.isDisabled}]),Y=o.computed(()=>[s.input,{[s["input-hidden"]]:u.value==="file"}]),K=o.computed(()=>[s.area,{[s["is-empty"]]:u.value==="empty",[s["is-file"]]:u.value==="file",[s["is-dropping"]]:x.value,[s["is-disabled"]]:n.isDisabled,[s["is-error"]]:a.value}]);return o.onMounted(()=>{r.value&&(l.value="file",c.value=P(r.value.mime))}),(w,k)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(D.value)},[o.createVNode(o.unref(me),{size:"subhead",color:o.unref(h)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(w.label),1)]),_:1},8,["color"]),o.createElementVNode("div",{class:o.normalizeClass(K.value)},[o.createVNode(o.unref($t),null,{default:o.withCtx(()=>[u.value==="empty"?(o.openBlock(),o.createElementBlock("div",{key:"empty",class:o.normalizeClass(o.unref(s).empty)},[o.createVNode(o.unref($t),null,{default:o.withCtx(()=>[o.unref(x)?(o.openBlock(),o.createElementBlock("div",{key:"empty-drop",class:o.normalizeClass(o.unref(s)["drop-text"])},[o.createVNode(o.unref(me),{class:o.normalizeClass(o.unref(s).placeholder),align:"center",size:"subhead",color:"text-input-base-secondary"},{default:o.withCtx(()=>k[3]||(k[3]=[o.createTextVNode(" Отпустите файл для загрузки ")])),_:1,__:[3]},8,["class"])],2)):(o.openBlock(),o.createElementBlock("div",{key:"empty-start",class:o.normalizeClass(o.unref(s).row)},[o.createVNode(o.unref($e),{class:o.normalizeClass(o.unref(s)["icon-upload"]),color:"icon-input-base-primary",name:"outline-upload",size:"18"},null,8,["class"]),o.createVNode(o.unref(me),{class:o.normalizeClass(o.unref(s).placeholder),size:"subhead",color:"text-input-base-secondary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(w.placeholder),1)]),_:1},8,["class"])],2))]),_:1})],2)):(o.openBlock(),o.createElementBlock("div",{key:"file",class:o.normalizeClass(o.unref(s)["file-data"])},[o.createVNode(o.unref(Jo),null,{default:o.withCtx(()=>[w.isLoading?(o.openBlock(),o.createBlock(o.unref(_r),{key:0,color:"icon-button-base-primary",size:"18"})):(o.openBlock(),o.createBlock(o.unref($e),{key:1,class:o.normalizeClass(o.unref(s).icon),color:o.unref(m),name:o.unref(f),size:"18"},null,8,["class","color","name"]))]),_:1}),o.createVNode(o.unref(me),{class:o.normalizeClass(o.unref(s)["file-name"]),size:"subhead",numberOfLines:"1",color:o.unref(p)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(l.value),1)]),_:1},8,["class","color"]),o.createVNode(o.unref(me),{class:o.normalizeClass(o.unref(s)["file-extension"]),size:"subhead",color:o.unref(p)},{default:o.withCtx(()=>[o.createTextVNode(" ."+o.toDisplayString(c.value),1)]),_:1},8,["class","color"]),o.createElementVNode("button",{class:o.normalizeClass(o.unref(s)["button-clear"]),onClick:I},[o.createVNode(o.unref($e),{color:"icon-input-base-primary",name:"outline-trash",size:"18"})],2)],2))]),_:1})],2),o.createVNode(o.unref($t),null,{default:o.withCtx(()=>[v.value?(o.openBlock(),o.createBlock(o.unref(me),{key:v.value,color:o.unref(g)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(v.value),1)]),_:1},8,["color"])):o.createCommentVNode("",!0)]),_:1}),o.createElementVNode("input",{ref_key:"refInput",ref:i,title:"Добавить файл",type:"file",class:o.normalizeClass(Y.value),accept:b.value,disabled:w.isLoading||w.isDisabled,onDragenter:k[0]||(k[0]=(..._)=>o.unref(E)&&o.unref(E)(..._)),onDragleave:k[1]||(k[1]=(..._)=>o.unref(C)&&o.unref(C)(..._)),onDrop:k[2]||(k[2]=(..._)=>o.unref(T)&&o.unref(T)(..._)),onInput:F},null,42,Hy)],2))}}),[["__cssModules",{$style:{root:"Dropzone__root_8c6b8","is-disabled":"Dropzone__is-disabled_a174c",input:"Dropzone__input_47a31","input-hidden":"Dropzone__input-hidden_d4ad8",area:"Dropzone__area_668a4","is-file":"Dropzone__is-file_d3781","is-dropping":"Dropzone__is-dropping_01108","is-error":"Dropzone__is-error_d3922",empty:"Dropzone__empty_7ee21",row:"Dropzone__row_19908","file-data":"Dropzone__file-data_29711","file-name":"Dropzone__file-name_84c4b","file-extension":"Dropzone__file-extension_f001e","button-clear":"Dropzone__button-clear_6a354"}}]]),Ii=Symbol();function Yy(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Fa={exports:{}},Uy=Fa.exports,ju;function Wy(){return ju||(ju=1,function(n,e){(function(r,a){n.exports=a()})(Uy,function(){return function(t){var r={};function a(s){if(r[s])return r[s].exports;var i=r[s]={i:s,l:!1,exports:{}};return t[s].call(i.exports,i,i.exports,a),i.l=!0,i.exports}return a.m=t,a.c=r,a.d=function(s,i,l){a.o(s,i)||Object.defineProperty(s,i,{enumerable:!0,get:l})},a.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},a.t=function(s,i){if(i&1&&(s=a(s)),i&8||i&4&&typeof s=="object"&&s&&s.__esModule)return s;var l=Object.create(null);if(a.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:s}),i&2&&typeof s!="string")for(var c in s)a.d(l,c,(function(d){return s[d]}).bind(null,c));return l},a.n=function(s){var i=s&&s.__esModule?function(){return s.default}:function(){return s};return a.d(i,"a",i),i},a.o=function(s,i){return Object.prototype.hasOwnProperty.call(s,i)},a.p="",a(a.s=0)}([function(t,r,a){a.r(r);var s=function(B){return Array.isArray(B)?B:[B]},i=function(B){return B instanceof Node},l=function(B){return B instanceof NodeList},c=function(B,ae){if(B&&ae){B=l(B)?B:[B];for(var ge=0;ge<B.length&&ae(B[ge],ge,B.length)!==!0;ge++);}},d=function(B){return console.error("[scroll-lock] ".concat(B))},u=function(B){if(Array.isArray(B)){var ae=B.join(", ");return ae}},h=function(B){var ae=[];return c(B,function(ge){return ae.push(ge)}),ae},p=function(B,ae){var ge=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,ye=arguments.length>3&&arguments[3]!==void 0?arguments[3]:document;if(ge&&h(ye.querySelectorAll(ae)).indexOf(B)!==-1)return B;for(;(B=B.parentElement)&&h(ye.querySelectorAll(ae)).indexOf(B)===-1;);return B},m=function(B,ae){var ge=arguments.length>2&&arguments[2]!==void 0?arguments[2]:document,ye=h(ge.querySelectorAll(ae)).indexOf(B)!==-1;return ye},f=function(B){if(B){var ae=getComputedStyle(B),ge=ae.overflow==="hidden";return ge}},g=function(B){if(B){if(f(B))return!0;var ae=B.scrollTop;return ae<=0}},x=function(B){if(B){if(f(B))return!0;var ae=B.scrollTop,ge=B.scrollHeight,ye=ae+B.offsetHeight;return ye>=ge}},E=function(B){if(B){if(f(B))return!0;var ae=B.scrollLeft;return ae<=0}},C=function(B){if(B){if(f(B))return!0;var ae=B.scrollLeft,ge=B.scrollWidth,ye=ae+B.offsetWidth;return ye>=ge}},T=function(B){var ae='textarea, [contenteditable="true"]';return m(B,ae)},F=function(B){var ae='input[type="range"]';return m(B,ae)};a.d(r,"disablePageScroll",function(){return b}),a.d(r,"enablePageScroll",function(){return D}),a.d(r,"getScrollState",function(){return Y}),a.d(r,"clearQueueScrollLocks",function(){return K}),a.d(r,"getTargetScrollBarWidth",function(){return w}),a.d(r,"getCurrentTargetScrollBarWidth",function(){return k}),a.d(r,"getPageScrollBarWidth",function(){return _}),a.d(r,"getCurrentPageScrollBarWidth",function(){return A}),a.d(r,"addScrollableTarget",function(){return N}),a.d(r,"removeScrollableTarget",function(){return L}),a.d(r,"addScrollableSelector",function(){return q}),a.d(r,"removeScrollableSelector",function(){return z}),a.d(r,"addLockableTarget",function(){return oe}),a.d(r,"addLockableSelector",function(){return $}),a.d(r,"setFillGapMethod",function(){return R}),a.d(r,"addFillGapTarget",function(){return W}),a.d(r,"removeFillGapTarget",function(){return J}),a.d(r,"addFillGapSelector",function(){return y}),a.d(r,"removeFillGapSelector",function(){return j}),a.d(r,"refillGaps",function(){return se});function I(G){for(var B=1;B<arguments.length;B++){var ae=arguments[B]!=null?arguments[B]:{},ge=Object.keys(ae);typeof Object.getOwnPropertySymbols=="function"&&(ge=ge.concat(Object.getOwnPropertySymbols(ae).filter(function(ye){return Object.getOwnPropertyDescriptor(ae,ye).enumerable}))),ge.forEach(function(ye){O(G,ye,ae[ye])})}return G}function O(G,B,ae){return B in G?Object.defineProperty(G,B,{value:ae,enumerable:!0,configurable:!0,writable:!0}):G[B]=ae,G}var P=["padding","margin","width","max-width","none"],M=3,v={scroll:!0,queue:0,scrollableSelectors:["[data-scroll-lock-scrollable]"],lockableSelectors:["body","[data-scroll-lock-lockable]"],fillGapSelectors:["body","[data-scroll-lock-fill-gap]","[data-scroll-lock-lockable]"],fillGapMethod:P[0],startTouchY:0,startTouchX:0},b=function(B){v.queue<=0&&(v.scroll=!1,_e(),ie()),N(B),v.queue++},D=function(B){v.queue>0&&v.queue--,v.queue<=0&&(v.scroll=!0,U(),ce()),L(B)},Y=function(){return v.scroll},K=function(){v.queue=0},w=function(B){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(i(B)){var ge=B.style.overflowY;ae?Y()||(B.style.overflowY=B.getAttribute("data-scroll-lock-saved-overflow-y-property")):B.style.overflowY="scroll";var ye=k(B);return B.style.overflowY=ge,ye}else return 0},k=function(B){if(i(B))if(B===document.body){var ae=document.documentElement.clientWidth,ge=window.innerWidth,ye=ge-ae;return ye}else{var Gt=B.style.borderLeftWidth,hn=B.style.borderRightWidth;B.style.borderLeftWidth="0px",B.style.borderRightWidth="0px";var en=B.offsetWidth-B.clientWidth;return B.style.borderLeftWidth=Gt,B.style.borderRightWidth=hn,en}else return 0},_=function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return w(document.body,B)},A=function(){return k(document.body)},N=function(B){if(B){var ae=s(B);ae.map(function(ge){c(ge,function(ye){i(ye)?ye.setAttribute("data-scroll-lock-scrollable",""):d('"'.concat(ye,'" is not a Element.'))})})}},L=function(B){if(B){var ae=s(B);ae.map(function(ge){c(ge,function(ye){i(ye)?ye.removeAttribute("data-scroll-lock-scrollable"):d('"'.concat(ye,'" is not a Element.'))})})}},q=function(B){if(B){var ae=s(B);ae.map(function(ge){v.scrollableSelectors.push(ge)})}},z=function(B){if(B){var ae=s(B);ae.map(function(ge){v.scrollableSelectors=v.scrollableSelectors.filter(function(ye){return ye!==ge})})}},oe=function(B){if(B){var ae=s(B);ae.map(function(ge){c(ge,function(ye){i(ye)?ye.setAttribute("data-scroll-lock-lockable",""):d('"'.concat(ye,'" is not a Element.'))})}),Y()||_e()}},$=function(B){if(B){var ae=s(B);ae.map(function(ge){v.lockableSelectors.push(ge)}),Y()||_e(),y(B)}},R=function(B){if(B)if(P.indexOf(B)!==-1)v.fillGapMethod=B,se();else{var ae=P.join(", ");d('"'.concat(B,`" method is not available!
|
|
11
11
|
Available fill gap methods: `).concat(ae,"."))}},W=function(B){if(B){var ae=s(B);ae.map(function(ge){c(ge,function(ye){i(ye)?(ye.setAttribute("data-scroll-lock-fill-gap",""),v.scroll||Ne(ye)):d('"'.concat(ye,'" is not a Element.'))})})}},J=function(B){if(B){var ae=s(B);ae.map(function(ge){c(ge,function(ye){i(ye)?(ye.removeAttribute("data-scroll-lock-fill-gap"),v.scroll||Ve(ye)):d('"'.concat(ye,'" is not a Element.'))})})}},y=function(B){if(B){var ae=s(B);ae.map(function(ge){v.fillGapSelectors.indexOf(ge)===-1&&(v.fillGapSelectors.push(ge),v.scroll||de(ge))})}},j=function(B){if(B){var ae=s(B);ae.map(function(ge){v.fillGapSelectors=v.fillGapSelectors.filter(function(ye){return ye!==ge}),v.scroll||Ae(ge)})}},se=function(){v.scroll||ie()},_e=function(){var B=u(v.lockableSelectors);xe(B)},U=function(){var B=u(v.lockableSelectors);te(B)},xe=function(B){var ae=document.querySelectorAll(B);c(ae,function(ge){le(ge)})},te=function(B){var ae=document.querySelectorAll(B);c(ae,function(ge){S(ge)})},le=function(B){if(i(B)&&B.getAttribute("data-scroll-lock-locked")!=="true"){var ae=window.getComputedStyle(B);B.setAttribute("data-scroll-lock-saved-overflow-y-property",ae.overflowY),B.setAttribute("data-scroll-lock-saved-inline-overflow-property",B.style.overflow),B.setAttribute("data-scroll-lock-saved-inline-overflow-y-property",B.style.overflowY),B.style.overflow="hidden",B.setAttribute("data-scroll-lock-locked","true")}},S=function(B){i(B)&&B.getAttribute("data-scroll-lock-locked")==="true"&&(B.style.overflow=B.getAttribute("data-scroll-lock-saved-inline-overflow-property"),B.style.overflowY=B.getAttribute("data-scroll-lock-saved-inline-overflow-y-property"),B.removeAttribute("data-scroll-lock-saved-overflow-property"),B.removeAttribute("data-scroll-lock-saved-inline-overflow-property"),B.removeAttribute("data-scroll-lock-saved-inline-overflow-y-property"),B.removeAttribute("data-scroll-lock-locked"))},ie=function(){v.fillGapSelectors.map(function(B){de(B)})},ce=function(){v.fillGapSelectors.map(function(B){Ae(B)})},de=function(B){var ae=document.querySelectorAll(B),ge=v.lockableSelectors.indexOf(B)!==-1;c(ae,function(ye){Ne(ye,ge)})},Ne=function(B){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(i(B)){var ge;if(B.getAttribute("data-scroll-lock-lockable")===""||ae)ge=w(B,!0);else{var ye=p(B,u(v.lockableSelectors));ge=w(ye,!0)}B.getAttribute("data-scroll-lock-filled-gap")==="true"&&Ve(B);var Gt=window.getComputedStyle(B);if(B.setAttribute("data-scroll-lock-filled-gap","true"),B.setAttribute("data-scroll-lock-current-fill-gap-method",v.fillGapMethod),v.fillGapMethod==="margin"){var hn=parseFloat(Gt.marginRight);B.style.marginRight="".concat(hn+ge,"px")}else if(v.fillGapMethod==="width")B.style.width="calc(100% - ".concat(ge,"px)");else if(v.fillGapMethod==="max-width")B.style.maxWidth="calc(100% - ".concat(ge,"px)");else if(v.fillGapMethod==="padding"){var en=parseFloat(Gt.paddingRight);B.style.paddingRight="".concat(en+ge,"px")}}},Ae=function(B){var ae=document.querySelectorAll(B);c(ae,function(ge){Ve(ge)})},Ve=function(B){if(i(B)&&B.getAttribute("data-scroll-lock-filled-gap")==="true"){var ae=B.getAttribute("data-scroll-lock-current-fill-gap-method");B.removeAttribute("data-scroll-lock-filled-gap"),B.removeAttribute("data-scroll-lock-current-fill-gap-method"),ae==="margin"?B.style.marginRight="":ae==="width"?B.style.width="":ae==="max-width"?B.style.maxWidth="":ae==="padding"&&(B.style.paddingRight="")}},nt=function(B){se()},V=function(B){v.scroll||(v.startTouchY=B.touches[0].clientY,v.startTouchX=B.touches[0].clientX)},he=function(B){if(!v.scroll){var ae=v.startTouchY,ge=v.startTouchX,ye=B.touches[0].clientY,Gt=B.touches[0].clientX;if(B.touches.length<2){var hn=u(v.scrollableSelectors),en={up:ae<ye,down:ae>ye,left:ge<Gt,right:ge>Gt},mo={up:ae+M<ye,down:ae-M>ye,left:ge+M<Gt,right:ge-M>Gt},fa=function H(ee){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(ee){var De=p(ee,hn,!1);if(F(ee))return!1;if(ve||T(ee)&&p(ee,hn)||m(ee,hn)){var Z=!1;E(ee)&&C(ee)?(en.up&&g(ee)||en.down&&x(ee))&&(Z=!0):g(ee)&&x(ee)?(en.left&&E(ee)||en.right&&C(ee))&&(Z=!0):(mo.up&&g(ee)||mo.down&&x(ee)||mo.left&&E(ee)||mo.right&&C(ee))&&(Z=!0),Z&&(De?H(De,!0):B.cancelable&&B.preventDefault())}else H(De)}else B.cancelable&&B.preventDefault()};fa(B.target)}}},Fe=function(B){v.scroll||(v.startTouchY=0,v.startTouchX=0)};typeof window<"u"&&window.addEventListener("resize",nt),typeof document<"u"&&(document.addEventListener("touchstart",V),document.addEventListener("touchmove",he,{passive:!1}),document.addEventListener("touchend",Fe));var pt={hide:function(B){d(`"hide" is deprecated! Use "disablePageScroll" instead.
|
|
12
12
|
https://github.com/FL3NKEY/scroll-lock#disablepagescrollscrollabletarget`),b(B)},show:function(B){d(`"show" is deprecated! Use "enablePageScroll" instead.
|
|
13
13
|
https://github.com/FL3NKEY/scroll-lock#enablepagescrollscrollabletarget`),D(B)},toggle:function(B){d('"toggle" is deprecated! Do not use it.'),Y()?b():D(B)},getState:function(){return d(`"getState" is deprecated! Use "getScrollState" instead.
|
|
@@ -17,7 +17,7 @@ Available fill gap methods: `).concat(ae,"."))}},W=function(B){if(B){var ae=s(B)
|
|
|
17
17
|
https://github.com/FL3NKEY/scroll-lock#addscrollabletargetscrollabletarget`),N(B)},setFillGapSelectors:function(B){d(`"setFillGapSelectors" is deprecated! Use "addFillGapSelector" instead.
|
|
18
18
|
https://github.com/FL3NKEY/scroll-lock#addfillgapselectorfillgapselector`),y(B)},setFillGapTargets:function(B){d(`"setFillGapTargets" is deprecated! Use "addFillGapTarget" instead.
|
|
19
19
|
https://github.com/FL3NKEY/scroll-lock#addfillgaptargetfillgaptarget`),W(B)},clearQueue:function(){d(`"clearQueue" is deprecated! Use "clearQueueScrollLocks" instead.
|
|
20
|
-
https://github.com/FL3NKEY/scroll-lock#clearqueuescrolllocks`),K()}},Jt=I({disablePageScroll:b,enablePageScroll:D,getScrollState:Y,clearQueueScrollLocks:K,getTargetScrollBarWidth:w,getCurrentTargetScrollBarWidth:k,getPageScrollBarWidth:_,getCurrentPageScrollBarWidth:A,addScrollableSelector:q,removeScrollableSelector:z,addScrollableTarget:N,removeScrollableTarget:L,addLockableSelector:$,addLockableTarget:oe,addFillGapSelector:y,removeFillGapSelector:j,addFillGapTarget:W,removeFillGapTarget:J,setFillGapMethod:R,refillGaps:se,_state:v},pt);r.default=Jt}]).default})}(Fa)),Fa.exports}var ju=Wy();const qy=["id"],Yu=re(o.defineComponent({inheritAttrs:!1,__name:"DynamicVisibleArea",props:{isShowOverlay:{type:Boolean,default:!0}},emits:["close"],setup(n,{expose:e,emit:t}){o.provide(Ii,u);const r=t,a=o.useId(),s=o.ref(!1);o.watch(s,()=>{s.value?c():d()});const i=o.useCssModule();function l(m){var g;const f=document.querySelectorAll(`.${i.root}`);((g=f[f.length-1])==null?void 0:g.id)===a&&m.key==="Escape"&&u()}function c(){ju.disablePageScroll(),window.addEventListener("keydown",l,{passive:!0})}function d(){ju.enablePageScroll(),window.removeEventListener("keydown",l)}o.onBeforeUnmount(d);function u(){s.value=!1,r("close")}function h(){s.value=!0}function p(){s.value=!s.value}return e({close:u,toggle:p,open:h}),(m,f)=>(o.openBlock(),o.createBlock(o.Teleport,{to:"#teleports"},[s.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass([m.$style.root,m.$attrs.class]),id:o.unref(a)},[o.createVNode(o.unref($t),{appear:""},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass([m.$style.overlay,{[m.$style["is-show-overlay"]]:m.isShowOverlay}]),onClick:u},null,2)]),_:1}),o.renderSlot(m.$slots,"default")],10,qy)):o.createCommentVNode("",!0)]))}}),[["__cssModules",{$style:{root:"DynamicVisibleArea__root_4ca5d",overlay:"DynamicVisibleArea__overlay_01f51","is-show-overlay":"DynamicVisibleArea__is-show-overlay_c353d"}}]]);function Uu(n){const e=o.useTemplateRef(n);o.onMounted(()=>{e.value||console.error("Ref DynamicVisibleArea не передан или не корректно задан")});function t(){var s;(s=e.value)==null||s.close()}function r(){var s;(s=e.value)==null||s.open()}function a(){var s;(s=e.value)==null||s.toggle()}return{open:r,close:t,toggle:a}}const Gy=()=>o.inject(Ii,()=>0),Wu=re(o.defineComponent({__name:"HeaderText",props:{title:{},description:{}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.$style.root)},[o.createVNode(o.unref(me),{class:o.normalizeClass(e.$style.title),tag:"h1",size:"title2",weight:"semibold"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.title),1)]),_:1},8,["class"]),o.createVNode(o.unref(me),{class:o.normalizeClass(e.$style.description),color:"text-common-base-secondary-default",size:"subhead"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.description),1)]),_:1},8,["class"])],2))}}),[["__cssModules",{$style:{title:"HeaderText__title_3b5e4"}}]]),Ky={120:48,58:22,56:22,50:22,44:20,40:20,34:18,28:16},Xy={base:"foreground-surface-layout-1-surface-2-primary",critical:"foreground-surface-layout-1-surface-2-critical"},qu=re(o.defineComponent({__name:"IconView",props:{icon:{},view:{default:"base"},size:{},isRounded:{type:Boolean}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([e.$style.root,e.$style[`size_${e.size}`],e.$style[`view_${e.view}`],{[e.$style["is-rounded"]]:e.isRounded}])},[o.createVNode(o.unref($e),{name:e.icon,size:o.unref(Ky)[e.size],color:o.unref(Xy)[e.view]},null,8,["name","size","color"])],2))}}),[["__cssModules",{$style:{root:"IconView__root_b4f8a",size_58:"IconView__size_58_253d8",size_56:"IconView__size_56_873a1",size_50:"IconView__size_50_ebace",size_44:"IconView__size_44_67f2e",size_40:"IconView__size_40_c5ff0",size_34:"IconView__size_34_c7672",size_28:"IconView__size_28_970bf",view_base:"IconView__view_base_8bd1f",view_critical:"IconView__view_critical_c4d66","is-rounded":"IconView__is-rounded_aee46"}}]]),Qy=o.defineComponent({__name:"ImageRow",props:{list:{},hasBlendMode:{type:Boolean}},setup(n){const e=o.computed(()=>n.list.length-5);return(t,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(t.$style.root)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.list.slice(0,5),(a,s)=>(o.openBlock(),o.createElementBlock("div",{key:s+a,class:o.normalizeClass(t.$style.item)},[o.createElementVNode("div",{class:o.normalizeClass(t.$style.border)},null,2),o.createVNode(o.unref(Ho),{class:o.normalizeClass([t.$style.image,{[t.$style.overlay]:s===4&&e.value>0}]),src:a,alt:`Изображение ${s+1}`,width:"44",height:"44",objectFit:"cover",hasBlendMode:t.hasBlendMode},null,8,["class","src","alt","hasBlendMode"]),e.value>0&&s===4?(o.openBlock(),o.createBlock(o.unref(me),{key:0,class:o.normalizeClass(t.$style.count),size:"body",weight:"bold",color:"text-common-base-inverse-default"},{default:o.withCtx(()=>[o.createTextVNode(" +"+o.toDisplayString(e.value),1)]),_:1},8,["class"])):o.createCommentVNode("",!0)],2))),128))],2))}}),Gu={root:"ImageRow__root_37d54",item:"ImageRow__item_5bf4f",border:"ImageRow__border_422af",overlay:"ImageRow__overlay_1790a",image:"ImageRow__image_f7037",count:"ImageRow__count_1240d"},Zy=re(Qy,[["__cssModules",{$style:Gu}]]),Jy=re(o.defineComponent({__name:"ImageRowSkeleton",setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.$style.root)},[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(5,r=>o.createElementVNode("div",{key:r,class:o.normalizeClass(e.$style.item)},[o.createElementVNode("div",{class:o.normalizeClass(e.$style.border)},null,2)],2)),64))],2))}}),[["__cssModules",{$style:Gu}]]);function Qn(n){return typeof n=="string"||n instanceof String}function Ku(n){var e;return typeof n=="object"&&n!=null&&(n==null||(e=n.constructor)==null?void 0:e.name)==="Object"}function Xu(n,e){return Array.isArray(e)?Xu(n,(t,r)=>e.includes(r)):Object.entries(n).reduce((t,r)=>{let[a,s]=r;return e(s,a)&&(t[a]=s),t},{})}const ke={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function eb(n){switch(n){case ke.LEFT:return ke.FORCE_LEFT;case ke.RIGHT:return ke.FORCE_RIGHT;default:return n}}function Ni(n){return n.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Ra(n,e){if(e===n)return!0;const t=Array.isArray(e),r=Array.isArray(n);let a;if(t&&r){if(e.length!=n.length)return!1;for(a=0;a<e.length;a++)if(!Ra(e[a],n[a]))return!1;return!0}if(t!=r)return!1;if(e&&n&&typeof e=="object"&&typeof n=="object"){const s=e instanceof Date,i=n instanceof Date;if(s&&i)return e.getTime()==n.getTime();if(s!=i)return!1;const l=e instanceof RegExp,c=n instanceof RegExp;if(l&&c)return e.toString()==n.toString();if(l!=c)return!1;const d=Object.keys(e);for(a=0;a<d.length;a++)if(!Object.prototype.hasOwnProperty.call(n,d[a]))return!1;for(a=0;a<d.length;a++)if(!Ra(n[d[a]],e[d[a]]))return!1;return!0}else if(e&&n&&typeof e=="function"&&typeof n=="function")return e.toString()===n.toString();return!1}class tb{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?ke.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?ke.RIGHT:ke.LEFT}}function Be(n,e){return new Be.InputMask(n,e)}function Qu(n){if(n==null)throw new Error("mask property should be defined");return n instanceof RegExp?Be.MaskedRegExp:Qn(n)?Be.MaskedPattern:n===Date?Be.MaskedDate:n===Number?Be.MaskedNumber:Array.isArray(n)||n===Array?Be.MaskedDynamic:Be.Masked&&n.prototype instanceof Be.Masked?n:Be.Masked&&n instanceof Be.Masked?n.constructor:n instanceof Function?Be.MaskedFunction:(console.warn("Mask not found for mask",n),Be.Masked)}function Pr(n){if(!n)throw new Error("Options in not defined");if(Be.Masked){if(n.prototype instanceof Be.Masked)return{mask:n};const{mask:e=void 0,...t}=n instanceof Be.Masked?{mask:n}:Ku(n)&&n.mask instanceof Be.Masked?n:{};if(e){const r=e.mask;return{...Xu(e,(a,s)=>!s.startsWith("_")),mask:e.constructor,_mask:r,...t}}}return Ku(n)?{...n}:{mask:n}}function In(n){if(Be.Masked&&n instanceof Be.Masked)return n;const e=Pr(n),t=Qu(e.mask);if(!t)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===t&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new t(e)}Be.createMask=In;class Pi{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,t){if(!(e==null||t==null||e===this.selectionStart&&t===this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}Be.MaskElement=Pi;const Zu=90,nb=89;class Va extends Pi{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,r;return(e=(t=(r=this.input).getRootNode)==null?void 0:t.call(r))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===Zu&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===nb&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===Zu&&(e.metaKey||e.ctrlKey))return e.preventDefault(),this._handlers.undo(e);e.isComposing||this._handlers.selectionChange(e)}_onBeforeinput(e){if(e.inputType==="historyUndo"&&this._handlers.undo)return e.preventDefault(),this._handlers.undo(e);if(e.inputType==="historyRedo"&&this._handlers.redo)return e.preventDefault(),this._handlers.redo(e)}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}Be.HTMLMaskElement=Va;class ob extends Va{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}Be.HTMLMaskElement=Va;class Ju extends Va{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),r=t&&t.anchorOffset,a=t&&t.focusOffset;return a==null||r==null||r<a?r:a}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),r=t&&t.anchorOffset,a=t&&t.focusOffset;return a==null||r==null||r>a?r:a}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const r=this.rootElement.createRange();r.setStart(this.input.firstChild||this.input,e),r.setEnd(this.input.lastChild||this.input,t);const a=this.rootElement,s=a.getSelection&&a.getSelection();s&&(s.removeAllRanges(),s.addRange(r))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}Be.HTMLContenteditableMaskElement=Ju;class Ha{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>Ha.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}Ha.MAX_LENGTH=100;class rb{constructor(e,t){this.el=e instanceof Pi?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new Ju(e):new ob(e),this.masked=In(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new Ha,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var t;return e==null||((t=this.masked)==null?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof Be.Masked)&&this.masked.constructor===Qu(e)){this.masked.updateOptions({mask:e});return}const t=e instanceof Be.Masked?e:In({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const r=this._listeners[e];r&&r.forEach(a=>a(t))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,r=this.masked.value,a=this.masked.rawInputValue,s=this.displayValue,i=this.unmaskedValue!==t||this.value!==r||this._rawInputValue!==a;this._unmaskedValue=t,this._value=r,this._rawInputValue=a,this.el.value!==s&&(this.el.value=s),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),i&&this._fireChangeEvents(),!this._historyChanging&&(i||this.history.isEmpty)&&this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...r}=e,a=!this.maskEquals(t),s=this.masked.optionsIsChanged(r);a&&(this.mask=t),s&&this.masked.updateOptions(r),(a||s)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,ke.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const r=this._listeners[e].indexOf(t);return r>=0&&this._listeners[e].splice(r,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const t=new tb({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),r=this.masked.rawInputValue,a=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,s=r===this.masked.rawInputValue?t.removeDirection:ke.NONE;let i=this.masked.nearestInputPos(t.startChangePos+a,s);s!==ke.NONE&&(i=this.masked.nearestInputPos(i,ke.NONE)),this.updateControl(i),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}Be.InputMask=rb;class Ie{static normalize(e){return Array.isArray(e)?e:[e,new Ie]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}Be.ChangeDetails=Ie;class yn{constructor(e,t,r){e===void 0&&(e=""),t===void 0&&(t=0),this.value=e,this.from=t,this.stop=r}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class Et{constructor(e){this._value="",this._update({...Et.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){t===void 0&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new yn(this.extractInput(e,t),e)}appendTail(e){return Qn(e)&&(e=new yn(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new Ie({inserted:e,rawInserted:e})):new Ie}_appendChar(e,t,r){t===void 0&&(t={});const a=this.state;let s;if([e,s]=this.doPrepareChar(e,t),e&&(s=s.aggregate(this._appendCharRaw(e,t)),!s.rawInserted&&this.autofix==="pad")){const i=this.state;this.state=a;let l=this.pad(t);const c=this._appendCharRaw(e,t);l=l.aggregate(c),c.rawInserted||l.equals(s)?s=l:this.state=i}if(s.inserted){let i,l=this.doValidate(t)!==!1;if(l&&r!=null){const c=this.state;if(this.overwrite===!0){i=r.state;for(let u=0;u<s.rawInserted.length;++u)r.unshift(this.displayValue.length-s.tailShift)}let d=this.appendTail(r);if(l=d.rawInserted.length===r.toString().length,!(l&&d.inserted)&&this.overwrite==="shift"){this.state=c,i=r.state;for(let u=0;u<s.rawInserted.length;++u)r.shift();d=this.appendTail(r),l=d.rawInserted.length===r.toString().length}l&&d.inserted&&(this.state=c)}l||(s=new Ie,this.state=a,r&&i&&(r.state=i))}return s}_appendPlaceholder(){return new Ie}_appendEager(){return new Ie}append(e,t,r){if(!Qn(e))throw new Error("value should be string");const a=Qn(r)?new yn(String(r)):r;t!=null&&t.tail&&(t._beforeTailState=this.state);let s;[e,s]=this.doPrepare(e,t);for(let i=0;i<e.length;++i){const l=this._appendChar(e[i],t,a);if(!l.rawInserted&&!this.doSkipInvalid(e[i],t,a))break;s.aggregate(l)}return(this.eager===!0||this.eager==="append")&&t!=null&&t.input&&e&&s.aggregate(this._appendEager()),a!=null&&(s.tailShift+=this.appendTail(a).tailShift),s}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new Ie}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,r=this.value,a=e();return this.rawInputValue=t,this.value&&this.value!==r&&r.indexOf(this.value)===0&&(this.append(r.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,a}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,r=e(this);return this.state=t,delete this._isolated,r}doSkipInvalid(e,t,r){return!!this.skipInvalid}doPrepare(e,t){return t===void 0&&(t={}),Ie.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return t===void 0&&(t={}),Ie.normalize(this.prepareChar?this.prepareChar(e,this,t):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,t,r,a,s){r===void 0&&(r=""),a===void 0&&(a=ke.NONE),s===void 0&&(s={input:!0});const i=e+t,l=this.extractTail(i),c=this.eager===!0||this.eager==="remove";let d;c&&(a=eb(a),d=this.extractInput(0,i,{raw:!0}));let u=e;const h=new Ie;if(a!==ke.NONE&&(u=this.nearestInputPos(e,t>1&&e!==0&&!c?ke.NONE:a),h.tailShift=u-e),h.aggregate(this.remove(u)),c&&a!==ke.NONE&&d===this.rawInputValue)if(a===ke.FORCE_LEFT){let p;for(;d===this.rawInputValue&&(p=this.displayValue.length);)h.aggregate(new Ie({tailShift:-1})).aggregate(this.remove(p-1))}else a===ke.FORCE_RIGHT&&l.unshift();return h.aggregate(this.append(r,s,l))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!Ra(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||Et.EMPTY_VALUES.includes(e)&&Et.EMPTY_VALUES.includes(t)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new Ie}}Et.DEFAULTS={skipInvalid:!0},Et.EMPTY_VALUES=[void 0,null,""],Be.Masked=Et;class So{constructor(e,t){e===void 0&&(e=[]),t===void 0&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Qn(e)?new yn(String(e)):e;const t=this.chunks[this.chunks.length-1],r=t&&(t.stop===e.stop||e.stop==null)&&e.from===t.from+t.toString().length;if(e instanceof yn)r?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof So){if(e.stop==null){let a;for(;e.chunks.length&&e.chunks[0].stop==null;)a=e.chunks.shift(),a.from+=e.from,this.extend(a)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof Be.MaskedPattern))return new yn(this.toString()).appendTo(e);const t=new Ie;for(let r=0;r<this.chunks.length;++r){const a=this.chunks[r],s=e._mapPosToBlock(e.displayValue.length),i=a.stop;let l;if(i!=null&&(!s||s.index<=i)&&((a instanceof So||e._stops.indexOf(i)>=0)&&t.aggregate(e._appendPlaceholder(i)),l=a instanceof So&&e._blocks[i]),l){const c=l.appendTail(a);t.aggregate(c);const d=a.toString().slice(c.rawInserted.length);d&&t.aggregate(e.append(d,{tail:!0}))}else t.aggregate(e.append(a.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...r}=e;Object.assign(this,r),this.chunks=t.map(a=>{const s="chunks"in a?new So:new yn;return s.state=a,s})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const t=e!=null?e-this.from:e;let r=0;for(;r<this.chunks.length;){const a=this.chunks[r],s=a.unshift(t);if(a.toString()){if(!s)break;++r}else this.chunks.splice(r,1);if(s)return s}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],r=t.shift();if(t.toString()){if(!r)break;--e}else this.chunks.splice(e,1);if(r)return r}return""}}class ab{constructor(e,t){this.masked=e,this._log=[];const{offset:r,index:a}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=r,this.index=a,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((t=this.block)==null?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,ke.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,ke.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ke.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,ke.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,ke.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ke.NONE),!0})}}class eh{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new Ie}nearestInputPos(e,t){t===void 0&&(t=ke.NONE);const r=0,a=this._value.length;switch(t){case ke.LEFT:case ke.FORCE_LEFT:return r;case ke.NONE:case ke.RIGHT:case ke.FORCE_RIGHT:default:return a}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),r===void 0&&(r={}),r.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new Ie;const r=this.eager===!0||this.eager==="append",s=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!r)&&!t.tail,i=new Ie({inserted:this.char,rawInserted:s?this.char:""});return this._value=this.char,this._isRawInput=s&&(t.raw||t.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new Ie;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new yn("")}appendTail(e){return Qn(e)&&(e=new yn(String(e))),e.appendTo(this)}append(e,t,r){const a=this._appendChar(e[0],t);return r!=null&&(a.tailShift+=this.appendTail(r).tailShift),a}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}}class ja{constructor(e){const{parent:t,isOptional:r,placeholderChar:a,displayChar:s,lazy:i,eager:l,...c}=e;this.masked=In(c),Object.assign(this,{parent:t,isOptional:r,placeholderChar:a,displayChar:s,lazy:i,eager:l})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),e===0&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new Ie}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new Ie;const r=this.masked.state;let a=this.masked._appendChar(e,this.currentMaskFlags(t));return a.inserted&&this.doValidate(t)===!1&&(a=new Ie,this.masked.state=r),!a.inserted&&!this.isOptional&&!this.lazy&&!t.input&&(a.inserted=this.placeholderChar),a.skip=!a.inserted&&!this.isOptional,this.isFilled=!!a.inserted,a}append(e,t,r){return this.masked.append(e,this.currentMaskFlags(t),r)}_appendPlaceholder(){return this.isFilled||this.isOptional?new Ie:(this.isFilled=!0,new Ie({inserted:this.placeholderChar}))}_appendEager(){return new Ie}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.masked.extractInput(e,t,r)}nearestInputPos(e,t){t===void 0&&(t=ke.NONE);const r=0,a=this.value.length,s=Math.min(Math.max(e,r),a);switch(t){case ke.LEFT:case ke.FORCE_LEFT:return this.isComplete?s:r;case ke.RIGHT:case ke.FORCE_RIGHT:return this.isComplete?s:a;case ke.NONE:default:return s}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(e==null||(t=e._beforeTailState)==null?void 0:t.masked)||(e==null?void 0:e._beforeTailState)}}pad(e){return new Ie}}ja.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class sb extends Et{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=r=>r.search(t)>=0),super._update(e)}}Be.MaskedRegExp=sb;class St extends Et{constructor(e){super({...St.DEFAULTS,...e,definitions:Object.assign({},ja.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let r=!1,a=!1;for(let s=0;s<t.length;++s){if(this.blocks){const d=t.slice(s),u=Object.keys(this.blocks).filter(p=>d.indexOf(p)===0);u.sort((p,m)=>m.length-p.length);const h=u[0];if(h){const{expose:p,repeat:m,...f}=Pr(this.blocks[h]),g={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...f,repeat:m,parent:this},x=m!=null?new Be.RepeatBlock(g):In(g);x&&(this._blocks.push(x),p&&(this.exposeBlock=x),this._maskedBlocks[h]||(this._maskedBlocks[h]=[]),this._maskedBlocks[h].push(this._blocks.length-1)),s+=h.length-1;continue}}let i=t[s],l=i in e;if(i===St.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(i==="{"||i==="}"){r=!r;continue}if(i==="["||i==="]"){a=!a;continue}if(i===St.ESCAPE_CHAR){if(++s,i=t[s],!i)break;l=!1}const c=l?new ja({isOptional:a,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...Pr(e[i]),parent:this}):new eh({char:i,eager:this.eager,isUnmasking:r});this._blocks.push(c)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:t,...r}=e;this._blocks.forEach((a,s)=>a.state=t[s]),super.state=r}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,t)=>e+=t.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,t)=>e+=t.value,"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,t)=>e+=t.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new Ie;let r=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(r==null)return t;this._blocks[r].isFilled&&++r;for(let a=r;a<this._blocks.length;++a){const s=this._blocks[a]._appendEager();if(!s.inserted)break;t.aggregate(s)}return t}_appendCharRaw(e,t){t===void 0&&(t={});const r=this._mapPosToBlock(this.displayValue.length),a=new Ie;if(!r)return a;for(let i=r.index,l;l=this._blocks[i];++i){var s;const c=l._appendChar(e,{...t,_beforeTailState:(s=t._beforeTailState)==null||(s=s._blocks)==null?void 0:s[i]});if(a.aggregate(c),c.consumed)break}return a}extractTail(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const r=new So;return e===t||this._forEachBlocksInRange(e,t,(a,s,i,l)=>{const c=a.extractTail(i,l);c.stop=this._findStopBefore(s),c.from=this._blockStartPos(s),c instanceof So&&(c.blockIndex=s),r.extend(c)}),r}extractInput(e,t,r){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),r===void 0&&(r={}),e===t)return"";let a="";return this._forEachBlocksInRange(e,t,(s,i,l,c)=>{a+=s.extractInput(l,c,r)}),a}_findStopBefore(e){let t;for(let r=0;r<this._stops.length;++r){const a=this._stops[r];if(a<=e)t=a;else break}return t}_appendPlaceholder(e){const t=new Ie;if(this.lazy&&e==null)return t;const r=this._mapPosToBlock(this.displayValue.length);if(!r)return t;const a=r.index,s=e??this._blocks.length;return this._blocks.slice(a,s).forEach(i=>{if(!i.lazy||e!=null){var l;t.aggregate(i._appendPlaceholder((l=i._blocks)==null?void 0:l.length))}}),t}_mapPosToBlock(e){let t="";for(let r=0;r<this._blocks.length;++r){const a=this._blocks[r],s=t.length;if(t+=a.displayValue,e<=t.length)return{index:r,offset:e-s}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((t,r)=>t+=r.displayValue.length,0)}_forEachBlocksInRange(e,t,r){t===void 0&&(t=this.displayValue.length);const a=this._mapPosToBlock(e);if(a){const s=this._mapPosToBlock(t),i=s&&a.index===s.index,l=a.offset,c=s&&i?s.offset:this._blocks[a.index].displayValue.length;if(r(this._blocks[a.index],a.index,l,c),s&&!i){for(let d=a.index+1;d<s.index;++d)r(this._blocks[d],d,0,this._blocks[d].displayValue.length);r(this._blocks[s.index],s.index,0,s.offset)}}}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const r=super.remove(e,t);return this._forEachBlocksInRange(e,t,(a,s,i,l)=>{r.aggregate(a.remove(i,l))}),r}nearestInputPos(e,t){if(t===void 0&&(t=ke.NONE),!this._blocks.length)return 0;const r=new ab(this,e);if(t===ke.NONE)return r.pushRightBeforeInput()||(r.popState(),r.pushLeftBeforeInput())?r.pos:this.displayValue.length;if(t===ke.LEFT||t===ke.FORCE_LEFT){if(t===ke.LEFT){if(r.pushRightBeforeFilled(),r.ok&&r.pos===e)return e;r.popState()}if(r.pushLeftBeforeInput(),r.pushLeftBeforeRequired(),r.pushLeftBeforeFilled(),t===ke.LEFT){if(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.ok&&r.pos<=e||(r.popState(),r.ok&&r.pos<=e))return r.pos;r.popState()}return r.ok?r.pos:t===ke.FORCE_LEFT?0:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:0)}return t===ke.RIGHT||t===ke.FORCE_RIGHT?(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.pushRightBeforeFilled()?r.pos:t===ke.FORCE_RIGHT?this.displayValue.length:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:this.nearestInputPos(e,ke.LEFT))):e}totalInputPositions(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);let r=0;return this._forEachBlocksInRange(e,t,(a,s,i,l)=>{r+=a.totalInputPositions(i,l)}),r}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map(r=>this._blocks[r]):[]}pad(e){const t=new Ie;return this._forEachBlocksInRange(0,this.displayValue.length,r=>t.aggregate(r.pad(e))),t}}St.DEFAULTS={...Et.DEFAULTS,lazy:!0,placeholderChar:"_"},St.STOP_CHAR="`",St.ESCAPE_CHAR="\\",St.InputDefinition=ja,St.FixedDefinition=eh,Be.MaskedPattern=St;class Ya extends St{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:r=this.from||0,maxLength:a=this.maxLength||0,autofix:s=this.autofix,...i}=e;this.to=t,this.from=r,this.maxLength=Math.max(String(t).length,a),this.autofix=s;const l=String(this.from).padStart(this.maxLength,"0"),c=String(this.to).padStart(this.maxLength,"0");let d=0;for(;d<c.length&&c[d]===l[d];)++d;i.mask=c.slice(0,d).replace(/0/g,"\\0")+"0".repeat(this.maxLength-d),super._update(i)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let t="",r="";const[,a,s]=e.match(/^(\D*)(\d*)(\D*)/)||[];return s&&(t="0".repeat(a.length)+s,r="9".repeat(a.length)+s),t=t.padEnd(this.maxLength,"0"),r=r.padEnd(this.maxLength,"9"),[t,r]}doPrepareChar(e,t){t===void 0&&(t={});let r;return[e,r]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(r.skip=!this.isComplete),[e,r]}_appendCharRaw(e,t){if(t===void 0&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const r=String(this.from).padStart(this.maxLength,"0"),a=String(this.to).padStart(this.maxLength,"0"),[s,i]=this.boundaries(this.value+e);return Number(i)<this.from?super._appendCharRaw(r[this.value.length],t):Number(s)>this.to?!t.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(r[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(a[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(t.search(/[^0]/)===-1&&t.length<=this._matchFrom)return!0;const[a,s]=this.boundaries(t);return this.from<=Number(s)&&Number(a)<=this.to&&super.doValidate(e)}pad(e){const t=new Ie;if(this.value.length===this.maxLength)return t;const r=this.value,a=this.maxLength-this.value.length;if(a){this.reset();for(let s=0;s<a;++s)t.aggregate(super._appendCharRaw("0",e));r.split("").forEach(s=>this._appendCharRaw(s))}return t}}Be.MaskedRange=Ya;const ib="d{.}`m{.}`Y";class Nn extends St{static extractPatternOptions(e){const{mask:t,pattern:r,...a}=e;return{...a,mask:Qn(t)?t:r}}constructor(e){super(Nn.extractPatternOptions({...Nn.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:r,blocks:a,...s}={...Nn.DEFAULTS,...e},i=Object.assign({},Nn.GET_DEFAULT_BLOCKS());e.min&&(i.Y.from=e.min.getFullYear()),e.max&&(i.Y.to=e.max.getFullYear()),e.min&&e.max&&i.Y.from===i.Y.to&&(i.m.from=e.min.getMonth()+1,i.m.to=e.max.getMonth()+1,i.m.from===i.m.to&&(i.d.from=e.min.getDate(),i.d.to=e.max.getDate())),Object.assign(i,this.blocks,a),super._update({...s,mask:Qn(t)?t:r,blocks:i})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&t!=null&&(this.min==null||this.min<=t)&&(this.max==null||t<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(Nn.extractPatternOptions(e))}}Nn.GET_DEFAULT_BLOCKS=()=>({d:{mask:Ya,from:1,to:31,maxLength:2},m:{mask:Ya,from:1,to:12,maxLength:2},Y:{mask:Ya,from:1900,to:9999}}),Nn.DEFAULTS={...St.DEFAULTS,mask:Date,pattern:ib,format:(n,e)=>{if(!n)return"";const t=String(n.getDate()).padStart(2,"0"),r=String(n.getMonth()+1).padStart(2,"0"),a=n.getFullYear();return[t,r,a].join(".")},parse:(n,e)=>{const[t,r,a]=n.split(".").map(Number);return new Date(a,r-1,t)}},Be.MaskedDate=Nn;class Ua extends Et{constructor(e){super({...Ua.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(t=>{const{expose:r,...a}=Pr(t),s=In({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...a});return r&&(this.exposeMask=s),s}):[])}_appendCharRaw(e,t){t===void 0&&(t={});const r=this._applyDispatch(e,t);return this.currentMask&&r.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),r}_applyDispatch(e,t,r){e===void 0&&(e=""),t===void 0&&(t={}),r===void 0&&(r="");const a=t.tail&&t._beforeTailState!=null?t._beforeTailState._value:this.value,s=this.rawInputValue,i=t.tail&&t._beforeTailState!=null?t._beforeTailState._rawInputValue:s,l=s.slice(i.length),c=this.currentMask,d=new Ie,u=c==null?void 0:c.state;return this.currentMask=this.doDispatch(e,{...t},r),this.currentMask&&(this.currentMask!==c?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),d.tailShift=this.currentMask.value.length-a.length),l&&(d.tailShift+=this.currentMask.append(l,{raw:!0,tail:!0}).tailShift)):u&&(this.currentMask.state=u)),d}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new Ie;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,r;return{...e,_beforeTailState:((t=e._beforeTailState)==null?void 0:t.currentMaskRef)===this.currentMask&&((r=e._beforeTailState)==null?void 0:r.currentMask)||e._beforeTailState}}doDispatch(e,t,r){return t===void 0&&(t={}),r===void 0&&(r=""),this.dispatch(e,this,t,r)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){t===void 0&&(t={});let[r,a]=super.doPrepare(e,t);if(this.currentMask){let s;[r,s]=super.doPrepare(r,this.currentMaskFlags(t)),a=a.aggregate(s)}return[r,a]}doPrepareChar(e,t){t===void 0&&(t={});let[r,a]=super.doPrepareChar(e,t);if(this.currentMask){let s;[r,s]=super.doPrepareChar(r,this.currentMaskFlags(t)),a=a.aggregate(s)}return[r,a]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(t=>t.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,t){const r=new Ie;return this.currentMask&&r.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),r}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(t=>t.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:r,currentMask:a,...s}=e;t&&this.compiledMasks.forEach((i,l)=>i.state=t[l]),r!=null&&(this.currentMask=r,this.currentMask.state=a),super.state=s}extractInput(e,t,r){return this.currentMask?this.currentMask.extractInput(e,t,r):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((t,r)=>{if(!e[r])return;const{mask:a,...s}=e[r];return Ra(t,s)&&t.maskEquals(a)}):super.maskEquals(e)}typedValueEquals(e){var t;return!!((t=this.currentMask)!=null&&t.typedValueEquals(e))}}Ua.DEFAULTS={...Et.DEFAULTS,dispatch:(n,e,t,r)=>{if(!e.compiledMasks.length)return;const a=e.rawInputValue,s=e.compiledMasks.map((i,l)=>{const c=e.currentMask===i,d=c?i.displayValue.length:i.nearestInputPos(i.displayValue.length,ke.FORCE_LEFT);return i.rawInputValue!==a?(i.reset(),i.append(a,{raw:!0})):c||i.remove(d),i.append(n,e.currentMaskFlags(t)),i.appendTail(r),{index:l,weight:i.rawInputValue.length,totalInputPositions:i.totalInputPositions(0,Math.max(d,i.nearestInputPos(i.displayValue.length,ke.FORCE_LEFT)))}});return s.sort((i,l)=>l.weight-i.weight||l.totalInputPositions-i.totalInputPositions),e.compiledMasks[s[0].index]}},Be.MaskedDynamic=Ua;class Wa extends St{constructor(e){super({...Wa.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...r}=e;if(t){const a=t.map(l=>l.length),s=Math.min(...a),i=Math.max(...a)-s;r.mask="*".repeat(s),i&&(r.mask+="["+"*".repeat(i)+"]"),this.enum=t}super._update(r)}_appendCharRaw(e,t){t===void 0&&(t={});const r=Math.min(this.nearestInputPos(0,ke.FORCE_RIGHT),this.value.length),a=this.enum.filter(s=>this.matchValue(s,this.unmaskedValue+e,r));if(a.length){a.length===1&&this._forEachBlocksInRange(0,this.value.length,(i,l)=>{const c=a[0][l];l>=this.value.length||c===i.value||(i.reset(),i._appendChar(c,t))});const s=super._appendCharRaw(a[0][this.value.length],t);return a.length===1&&a[0].slice(this.unmaskedValue.length).split("").forEach(i=>s.aggregate(super._appendCharRaw(i))),s}return new Ie({skip:!this.isComplete})}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new yn("",e)}remove(e,t){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),e===t)return new Ie;const r=Math.min(super.nearestInputPos(0,ke.FORCE_RIGHT),this.value.length);let a;for(a=e;a>=0&&!(this.enum.filter(l=>this.matchValue(l,this.value.slice(r,a),r)).length>1);--a);const s=super.remove(a,t);return s.tailShift+=a-e,s}get isComplete(){return this.enum.indexOf(this.value)>=0}}Wa.DEFAULTS={...St.DEFAULTS,matchValue:(n,e,t)=>n.indexOf(e,t)===t},Be.MaskedEnum=Wa;class lb extends Et{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}Be.MaskedFunction=lb;var th;class jt extends Et{constructor(e){super({...jt.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t="\\d*",r=(this.scale?"("+Ni(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+t+r),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(Ni).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Ni(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){t===void 0&&(t={});const[r,a]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!r&&(a.skip=!0),r&&!this.allowPositive&&!this.value&&r!=="-"&&a.aggregate(this._appendChar("-")),[r,a]}_separatorsCount(e,t){t===void 0&&(t=!1);let r=0;for(let a=0;a<e;++a)this._value.indexOf(this.thousandsSeparator,a)===a&&(++r,t&&(e+=this.thousandsSeparator.length));return r}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,r))}_appendCharRaw(e,t){t===void 0&&(t={});const r=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,a=this._separatorsCountFromSlice(r);this._value=this._removeThousandsSeparators(this.value);const s=this._value;this._value+=e;const i=this.number;let l=!isNaN(i),c=!1;if(l){let p;this.min!=null&&this.min<0&&this.number<this.min&&(p=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(p=this.max),p!=null&&(this.autofix?(this._value=this.format(p,this).replace(jt.UNMASKED_RADIX,this.radix),c||(c=s===this._value&&!t.tail)):l=!1),l&&(l=!!this._value.match(this._numberRegExp))}let d;l?d=new Ie({inserted:this._value.slice(s.length),rawInserted:c?"":e,skip:c}):(this._value=s,d=new Ie),this._value=this._insertThousandsSeparators(this._value);const u=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,h=this._separatorsCountFromSlice(u);return d.tailShift+=(h-a)*this.thousandsSeparator.length,d}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,r=this.value.indexOf(this.thousandsSeparator,t);if(r<=e)return r}return-1}_adjustRangeWithSeparators(e,t){const r=this._findSeparatorAround(e);r>=0&&(e=r);const a=this._findSeparatorAround(t);return a>=0&&(t=a+this.thousandsSeparator.length),[e,t]}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const r=this.value.slice(0,e),a=this.value.slice(t),s=this._separatorsCount(r.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(r+a));const i=this._separatorsCountFromSlice(r);return new Ie({tailShift:(i-s)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case ke.NONE:case ke.LEFT:case ke.FORCE_LEFT:{const r=this._findSeparatorAround(e-1);if(r>=0){const a=r+this.thousandsSeparator.length;if(e<a||this.value.length<=a||t===ke.FORCE_LEFT)return r}break}case ke.RIGHT:case ke.FORCE_RIGHT:{const r=this._findSeparatorAround(e);if(r>=0)return r+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;this.min!=null&&(t=Math.max(t,this.min)),this.max!=null&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let r=this.value;this.normalizeZeros&&(r=this._normalizeZeros(r)),this.padFractionalZeros&&this.scale>0&&(r=this._padFractionalZeros(r)),this._value=r}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,(r,a,s,i)=>a+i),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,r){t===void 0&&(t={});const a=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===jt.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,r)&&!a}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,jt.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(jt.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||jt.EMPTY_VALUES.includes(e)&&jt.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}th=jt,jt.UNMASKED_RADIX=".",jt.EMPTY_VALUES=[...Et.EMPTY_VALUES,0],jt.DEFAULTS={...Et.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[th.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:n=>n.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},Be.MaskedNumber=jt;const Li={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function nh(n,e,t){e===void 0&&(e=Li.MASKED),t===void 0&&(t=Li.MASKED);const r=In(n);return a=>r.runIsolated(s=>(s[e]=a,s[t]))}function cb(n,e,t,r){return nh(e,t,r)(n)}Be.PIPE_TYPE=Li,Be.createPipe=nh,Be.pipe=cb;class db extends St{get repeatFrom(){var e;return(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?e:0}get repeatTo(){var e;return(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,r,a;const{repeat:s,...i}=Pr(e);this._blockOpts=Object.assign({},this._blockOpts,i);const l=In(this._blockOpts);this.repeat=(t=(r=s??l.repeat)!=null?r:this.repeat)!=null?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((a=this._blocks)==null?void 0:a.length)||0,this.repeatFrom)),blocks:{m:l},eager:l.eager,overwrite:l.overwrite,skipInvalid:l.skipInvalid,lazy:l.lazy,placeholderChar:l.placeholderChar,displayChar:l.displayChar})}_allocateBlock(e){if(e<this._blocks.length)return this._blocks[e];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(In(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,t){t===void 0&&(t={});const r=new Ie;for(let c=(a=(s=this._mapPosToBlock(this.displayValue.length))==null?void 0:s.index)!=null?a:Math.max(this._blocks.length-1,0),d,u;d=(i=this._blocks[c])!=null?i:u=!u&&this._allocateBlock(c);++c){var a,s,i,l;const h=d._appendChar(e,{...t,_beforeTailState:(l=t._beforeTailState)==null||(l=l._blocks)==null?void 0:l[c]});if(h.skip&&u){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(r.aggregate(h),h.consumed)break}return r}_trimEmptyTail(e,t){var r,a;e===void 0&&(e=0);const s=Math.max(((r=this._mapPosToBlock(e))==null?void 0:r.index)||0,this.repeatFrom,0);let i;t!=null&&(i=(a=this._mapPosToBlock(t))==null?void 0:a.index),i==null&&(i=this._blocks.length-1);let l=0;for(let c=i;s<=c&&!this._blocks[c].unmaskedValue;--c,++l);l&&(this._blocks.splice(i-l+1,l),this.mask=this.mask.slice(l))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const r=super.remove(e,t);return this._trimEmptyTail(e,t),r}totalInputPositions(e,t){return e===void 0&&(e=0),t==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}Be.RepeatBlock=db;try{globalThis.IMask=Be}catch{}var ub={mask:void 0,prepare:Function,prepareChar:Function,validate:Function,commit:Function,overwrite:{type:Boolean,required:!1,default:void 0},eager:{required:!1,default:void 0,validator:n=>["append","remove"].includes(n)||typeof n=="boolean"},skipInvalid:{type:Boolean,required:!1,default:void 0},placeholderChar:String,displayChar:String,lazy:{type:Boolean,required:!1,default:void 0},definitions:Object,blocks:Object,enum:Array,maxLength:Number,from:Number,to:Number,pattern:String,format:Function,parse:Function,autofix:{required:!1,default:void 0,validator:n=>n==="pad"||typeof n=="boolean"},radix:String,thousandsSeparator:String,mapToRadix:Array,scale:Number,normalizeZeros:{type:Boolean,required:!1,default:void 0},padFractionalZeros:{type:Boolean,required:!1,default:void 0},min:[Number,Date],max:[Number,Date],dispatch:Function};function hb(n,e){let{emit:t,onAccept:r,onComplete:a,defaultValue:s,defaultUnmaskedValue:i,defaultTypedValue:l}=e===void 0?{}:e;const c=o.isRef(n)?n:o.ref(n),d=o.ref(),u=o.ref(),h=o.ref(""),p=o.ref(""),m=o.ref();let f,g=h.value,x=p.value,E=m.value;function C(){E=m.value=u.value.typedValue,x=p.value=u.value.unmaskedValue,g=h.value=u.value.value}function T(b){C(),t&&(t("accept",h.value,b),t("accept:masked",h.value,b),t("accept:typed",m.value,b),t("accept:unmasked",p.value,b)),r==null||r(b)}function F(b){t&&(t("complete",u.value.value,b),t("complete:masked",u.value.value,b),t("complete:typed",u.value.typedValue,b),t("complete:unmasked",u.value.unmaskedValue,b)),a==null||a(b)}const I=()=>{!u.value||p.value===void 0||(x!==p.value&&(u.value.unmaskedValue=p.value,u.value.unmaskedValue!==p.value&&T()),x=void 0)};o.watch(p,I);const O=()=>{!u.value||h.value===void 0||(g!==h.value&&(u.value.value=h.value,u.value.value!==h.value&&T()),g=void 0)};o.watch(h,O);const P=()=>{!u.value||m.value===void 0||(E!==m.value&&(u.value.typedValue=m.value,u.value.masked.typedValueEquals(m.value)||T()),E=void 0)};o.watch(m,P);function M(){f=d.value;const b=c.value;!f||!(b!=null&&b.mask)||(u.value=Be(f,b),s!==void 0&&(h.value=s),i!==void 0&&(p.value=i),l!==void 0&&(m.value=l),I(),O(),P(),C(),u.value.on("accept",T).on("complete",F))}function v(){var b;(b=u.value)==null||b.destroy(),u.value=void 0}return o.onMounted(M),o.onUnmounted(v),o.watch([d,c],()=>{const b=d.value,D=c.value;(!(D!=null&&D.mask)||b!==f)&&v(),b&&(u.value?u.value.updateOptions(D):M())}),{el:d,mask:o.readonly(u),masked:h,unmasked:p,typed:m}}function pb(n,e){return n={...n},Object.keys(n).forEach(t=>{(n[t]===void 0||e.includes(t))&&delete n[t]}),n}const fb=["typed","unmasked","value","modelValue"];var mb=o.defineComponent({name:"imask-input",inheritAttrs:!1,props:{modelValue:String,value:String,unmasked:String,typed:{validator:()=>!0},...ub},emits:["update:modelValue","update:masked","update:value","update:unmasked","update:typed","accept","accept:value","accept:masked","accept:unmasked","accept:typed","complete","complete:value","complete:masked","complete:unmasked","complete:typed"],setup(n,e){let{attrs:t,emit:r}=e;const{el:a,mask:s,masked:i,unmasked:l,typed:c}=hb(pb(n,fb),{emit:r,onAccept:m=>{const f=i.value;r("accept:value",f,m),r("update:value",f,m),r("update:masked",f,m),r("update:modelValue",f,m),r("update:unmasked",l.value,m),r("update:typed",c.value,m)},onComplete:m=>{r("complete:value",i.value,m)}}),d=o.toRef(n,"value"),u=o.toRef(n,"modelValue"),h=o.toRef(n,"unmasked"),p=o.toRef(n,"typed");return i.value=u.value||d.value||"",l.value=h.value||"",c.value=p.value,o.watch(d,m=>i.value=m),o.watch(u,m=>i.value=m),o.watch(h,m=>l.value=m),o.watch(p,m=>c.value=m),()=>{const m={...t,value:n.value!=null?n.value:n.modelValue!=null?n.modelValue:s.value?s.value.displayValue:"",ref:a};return n.mask||(m.onInput=f=>{r("update:modelValue",f.target.value),r("update:value",f.target.value)}),o.h("input",m)}}}),zi=mb;const gb={phone:{mask:"+{996} 000 000 000"},rubles:{mask:[{mask:"",lazy:!0},{mask:"num ₽",lazy:!1,blocks:{num:{mask:Number,min:0,thousandsSeparator:" ",radix:",",mapToRadix:["."]}}}]},money:{mask:[{mask:"",lazy:!0},{mask:"num",lazy:!1,blocks:{num:{mask:Number,min:0,thousandsSeparator:" ",radix:",",mapToRadix:["."]}}}]},number:{mask:Number},any:{mask:String},date:{mask:Date,lazy:!0},time:{mask:"HH:MM",blocks:{HH:{mask:Be.MaskedRange,from:0,to:23,maxLength:2},MM:{mask:Be.MaskedRange,from:0,to:59,maxLength:2}},lazy:!0}},yb=re(o.defineComponent({__name:"TransitionExpand",props:{className:{},isShow:{type:Boolean},hasHeightDelay:{type:Boolean}},setup(n){const e=n;function t(l,c){const d=()=>{l.removeEventListener("transitionend",d),c()};l.addEventListener("transitionend",d)}const r=l=>{const c=l;c.style.height="0",c.style.opacity="0",c.style.overflow="hidden"},a=async(l,c)=>{const d=l;await o.nextTick(),d.style.transition="height 0.3s ease, opacity 0.3s ease",d.style.height=d.scrollHeight+"px",d.style.opacity="1",t(d,()=>{d.style.transition="",d.style.height="auto",c()})},s=l=>{const c=l;c.style.overflow="hidden",c.style.height=c.scrollHeight+"px",c.style.opacity="1",c.offsetHeight},i=(l,c)=>{const d=l,u=e.hasHeightDelay?"opacity 0.3s ease, height 0.3s ease 0.3s":"opacity 0.3s ease, height 0.3s ease";d.style.transition=u,d.style.opacity="0",d.style.height="0",t(d,()=>{d.style.transition="",c()})};return(l,c)=>(o.openBlock(),o.createBlock(o.Transition,{css:!1,onBeforeEnter:r,onEnter:a,onBeforeLeave:s,onLeave:i},{default:o.withCtx(()=>[l.isShow?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass([l.className,l.$style.container])},[o.createVNode(o.Transition,{appear:"","enter-active-class":l.$style.fadeEnterActive,"leave-active-class":l.$style.fadeLeaveActive,"enter-from-class":l.$style.fadeEnterFrom,"enter-to-class":l.$style.fadeEnterTo,"leave-from-class":l.$style.fadeLeaveFrom,"leave-to-class":l.$style.fadeLeaveTo},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("div",null,[o.renderSlot(l.$slots,"default")],512),[[o.vShow,l.isShow]])]),_:3},8,["enter-active-class","leave-active-class","enter-from-class","enter-to-class","leave-from-class","leave-to-class"])],2)):o.createCommentVNode("",!0)]),_:3}))}}),[["__cssModules",{$style:{container:"TransitionExpand__container_a32b9",fadeEnterActive:"TransitionExpand__fadeEnterActive_72809",fadeLeaveActive:"TransitionExpand__fadeLeaveActive_d7434",fadeEnterFrom:"TransitionExpand__fadeEnterFrom_48f96",fadeLeaveTo:"TransitionExpand__fadeLeaveTo_10d4a",fadeEnterTo:"TransitionExpand__fadeEnterTo_6736b",fadeLeaveFrom:"TransitionExpand__fadeLeaveFrom_e10bd"}}]]),Lr=n=>{const e=Object.entries(n).map(([t,r])=>[t.toString(),r]);return new Map(e)},bb=o.defineComponent({__name:"Input",props:o.mergeModels({value:{},type:{},label:{},description:{},placeholder:{},placeholderOnFocus:{},errorText:{},isError:{type:Boolean},isDisabled:{type:Boolean},mask:{},inputmode:{},autocomplete:{},maxLength:{},autofocus:{type:Boolean},size:{default:"44"},iconLeft:{},iconRight:{}},{value:{},valueModifiers:{}}),emits:o.mergeModels(["update:error","blur","click-icon-left","click-icon-right"],["update:value"]),setup(n,{emit:e}){const t=o.useModel(n,"value"),r=o.ref(!1),a=o.ref(),s=e,i=Lr({34:"caption",44:"subhead"}),l=o.computed(()=>i.get(n.size.toString())??"caption"),c=o.computed(()=>n.placeholderOnFocus&&r.value?n.placeholderOnFocus:n.placeholder);function d(){r.value=!1,s("blur")}const u=p=>{if(!n.maxLength)return;const m=p.target;m.value.length>Number(n.maxLength)&&(m.value=m.value.slice(0,Number(n.maxLength)),t.value=m.value)},h=()=>{var p;(p=a.value)==null||p.$el.focus()};return o.onMounted(()=>{var p;n.autofocus&&((p=a.value)==null||p.$el.focus())}),(p,m)=>{var f;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([p.$style.root,p.$style[`size_${p.size}`],{[p.$style["is-disabled"]]:p.isDisabled,[p.$style["is-error"]]:p.isError,[p.$style["is-focused"]]:r.value,[p.$style["is-has-placeholder-on-focus"]]:!!p.placeholderOnFocus}])},[p.label?(o.openBlock(),o.createBlock(o.unref(me),{key:0,class:o.normalizeClass(p.$style.label),size:l.value,color:"text-common-base-primary-default"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(p.label),1)]),_:1},8,["class","size"])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(p.$style.wrapper),onClick:h},[p.iconLeft?(o.openBlock(),o.createBlock(o.unref($e),{key:0,name:p.iconLeft,size:18,color:"icon-input-base-primary",onClick:m[0]||(m[0]=g=>s("click-icon-left"))},null,8,["name"])):o.createCommentVNode("",!0),o.createVNode(o.unref(zi),o.mergeProps({unmasked:t.value,"onUpdate:unmasked":m[1]||(m[1]=g=>t.value=g),class:p.$style.field,type:p.type,ref_key:"inputRef",ref:a},o.unref(gb)[p.mask??"any"],{unmask:!1,autofocus:p.autofocus,placeholder:c.value,autocomplete:p.autocomplete,inputmode:p.inputmode,onFocus:m[2]||(m[2]=()=>r.value=!0),onBlur:d,onAccept:m[3]||(m[3]=g=>s("update:error",!1)),onInput:u}),null,16,["unmasked","class","type","autofocus","placeholder","autocomplete","inputmode"]),p.iconRight?(o.openBlock(),o.createBlock(o.unref($e),{key:1,name:p.iconRight,size:18,color:"icon-input-base-primary",onClick:m[4]||(m[4]=g=>s("click-icon-right"))},null,8,["name"])):o.createCommentVNode("",!0),p.$slots.default?(o.openBlock(),o.createElementBlock("div",{key:2,class:o.normalizeClass(p.$style.action)},[o.renderSlot(p.$slots,"default")],2)):o.createCommentVNode("",!0),p.maxLength?(o.openBlock(),o.createElementBlock("span",{key:3,class:o.normalizeClass(p.$style.badge)},o.toDisplayString(Number(p.maxLength)-(((f=t.value)==null?void 0:f.length)??0)),3)):o.createCommentVNode("",!0)],2),o.createVNode(o.unref(yb),{"is-show":p.errorText&&p.isError||!!p.description&&!p.isError},{default:o.withCtx(()=>[o.createVNode(o.unref($t),null,{default:o.withCtx(()=>[p.description&&!p.isError?(o.openBlock(),o.createBlock(o.unref(me),{class:o.normalizeClass(p.$style.bottom),key:"description",size:"subhead",color:"text-common-base-secondary-default"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(p.description),1)]),_:1},8,["class"])):o.createCommentVNode("",!0),p.errorText&&p.isError?(o.openBlock(),o.createBlock(o.unref(me),{class:o.normalizeClass(p.$style.bottom),key:"error",size:"subhead",color:"text-common-critical-primary-default"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(p.errorText),1)]),_:1},8,["class"])):o.createCommentVNode("",!0)]),_:1})]),_:1},8,["is-show"])],2)}}}),oh={root:"Input__root_becdb","is-has-placeholder-on-focus":"Input__is-has-placeholder-on-focus_173d6",field:"Input__field_cc212","is-disabled":"Input__is-disabled_a39c6",wrapper:"Input__wrapper_082db","is-error":"Input__is-error_d306d","is-focused":"Input__is-focused_ed996",label:"Input__label_5f75c",bottom:"Input__bottom_e8028",badge:"Input__badge_f872a",action:"Input__action_c7dce",size_34:"Input__size_34_f9266",size_44:"Input__size_44_69c00"},Fi=re(bb,[["__cssModules",{$style:oh}]]),kb=re(o.defineComponent({__name:"InputSkeleton",props:{isShowLabel:{type:Boolean}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.$style.root)},[e.isShowLabel?(o.openBlock(),o.createBlock(o.unref($n),{key:0,widthRange:[.2,.4],class:o.normalizeClass(e.$style.label),size:"subhead",color:"foreground-layout-layout-1-primary"},null,8,["class"])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(e.$style.wrapper)},null,2)],2))}}),[["__cssModules",{$style:oh}]]),vb={subhead:"subhead",caption:"caption"},wb=re(o.defineComponent({__name:"Link",props:{tag:{default:"a"},href:{},view:{default:"base"},size:{default:"subhead"},weight:{default:"regular"},iconLeft:{},iconRight:{}},emits:["click"],setup(n,{emit:e}){const t=e,r=o.useCssModule(),a=o.computed(()=>[r.root,r[`view_${n.view}`]]),s=o.computed(()=>oi({tag:n.tag,href:n.href})),i=o.computed(()=>n.tag==="button"?{click:()=>t("click")}:{});return(l,c)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(l.tag),o.mergeProps(s.value,{class:a.value},o.toHandlers(i.value)),{default:o.withCtx(()=>[l.iconLeft?(o.openBlock(),o.createBlock(o.unref($e),{key:0,class:o.normalizeClass(o.unref(r).icon),name:l.iconLeft,color:"inherit",size:"18"},null,8,["class","name"])):o.createCommentVNode("",!0),o.createVNode(o.unref(me),{class:o.normalizeClass(o.unref(r).text),tag:"span",weight:l.weight,size:o.unref(vb)[l.size],color:"inherit"},{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},8,["class","weight","size"]),l.iconRight?(o.openBlock(),o.createBlock(o.unref($e),{key:1,class:o.normalizeClass(o.unref(r).icon),name:l.iconRight,color:"inherit",size:"18"},null,8,["class","name"])):o.createCommentVNode("",!0)]),_:3},16,["class"]))}}),[["__cssModules",{$style:{root:"Link__root_42958",icon:"Link__icon_dfe86",view_base:"Link__view_base_58365",text:"Link__text_0cdd6",view_secondary:"Link__view_secondary_759d7",view_brand:"Link__view_brand_c967f"}}]]),_b=re(o.defineComponent({__name:"ListHeader",props:o.mergeModels({isSortable:{type:Boolean},title:{},description:{},route:{},href:{},buttonText:{},hasAddButton:{type:Boolean,default:!0},save:{type:Function},cancel:{type:Function}},{isSortable:{type:Boolean,required:!0},isSortableModifiers:{}}),emits:["update:isSortable"],setup(n){const e=o.useModel(n,"isSortable"),t=o.ref(!1);function r(){e.value&&n.cancel(),e.value=!e.value}const a=o.computed(()=>e.value?"Сохранить порядок":n.buttonText),s=o.computed(()=>({size:"44",view:"base-primary",isLoading:t.value,...e.value?null:{iconLeft:"outline-plus",href:n.href??n.route},tag:e.value?"button":"router-link"})),i=o.computed(()=>e.value?{click:async()=>{try{t.value=!0,await n.save(),e.value=!1}finally{t.value=!1}}}:{});return(l,c)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(l.$style.root)},[o.createVNode(o.unref(Wu),{class:o.normalizeClass(l.$style.text),title:l.title,description:l.description},null,8,["class","title","description"]),o.createElementVNode("div",{class:o.normalizeClass(l.$style.buttons)},[o.createVNode(o.unref(wo),{icon:e.value?"outline-cross":"outline-move",view:"surface",size:"44",onClick:r},null,8,["icon"]),l.hasAddButton||e.value?(o.openBlock(),o.createBlock(o.unref(tn),o.mergeProps({key:0},s.value,o.toHandlers(i.value)),{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.value),1)]),_:1},16)):o.createCommentVNode("",!0)],2)],2))}}),[["__cssModules",{$style:{root:"ListHeader__root_55574",title:"ListHeader__title_56f16",buttons:"ListHeader__buttons_723a5"}}]]),Cb=re(o.defineComponent({__name:"ModalConfirmation",props:{view:{},title:{},description:{},buttonText:{},isLoading:{type:Boolean}},emits:["cancel","confirm"],setup(n,{expose:e,emit:t}){const r=t;function a(){i(),r("cancel")}const{open:s,close:i,toggle:l}=Uu("ModalConfirmation");return e({close:i,toggle:l,open:s}),(c,d)=>(o.openBlock(),o.createBlock(o.unref(Yu),{ref:"ModalConfirmation"},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(c.$style.root)},[o.createVNode(o.unref(me),{size:"headline",weight:"medium",align:"center",class:o.normalizeClass(c.$style.title)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(c.title),1)]),_:1},8,["class"]),o.createVNode(o.unref(me),{size:"subhead",align:"center",class:o.normalizeClass(c.$style.description)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(c.description),1)]),_:1},8,["class"]),o.createElementVNode("div",{class:o.normalizeClass(c.$style.buttons)},[o.createVNode(o.unref(tn),{class:o.normalizeClass(c.$style.button),size:"44",view:"base",onClick:a},{default:o.withCtx(()=>d[1]||(d[1]=[o.createTextVNode(" Отмена ")])),_:1,__:[1]},8,["class"]),o.createVNode(o.unref(tn),{size:"44",class:o.normalizeClass(c.$style.button),isLoading:c.isLoading,isDisabled:c.isLoading,view:c.view==="base"?"base-primary":"critical",onClick:d[0]||(d[0]=u=>r("confirm"))},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(c.buttonText),1)]),_:1},8,["class","isLoading","isDisabled","view"])],2)],2)]),_:1},512))}}),[["__cssModules",{$style:{root:"ModalConfirmation__root_98f5a",title:"ModalConfirmation__title_74fe8",description:"ModalConfirmation__description_c885e",buttons:"ModalConfirmation__buttons_2b449",button:"ModalConfirmation__button_e5ac4"}}]]),rh=re(o.defineComponent({__name:"Price",props:{value:{},size:{default:"body"},weight:{default:"regular"},color:{},isShowPlusSign:{type:Boolean,default:!1},align:{default:"left"}},setup(n){const e=o.useCssModule(),t=o.computed(()=>Number(n.value)>0&&n.isShowPlusSign?"+":Number(n.value)<0?"-":""),r=o.computed(()=>Intl.NumberFormat("ru",{maximumFractionDigits:2}).format(parseFloat(n.value.toString().replace("/ /g","").replace("/,/g",".").replace("-","")))),a=o.computed(()=>`outline-currency_${n.weight}`),s=o.computed(()=>({caption:7,subhead:8,body:8,headline:10,title3:11,title2:12,title1:15,title120:56})[n.size]),i=o.computed(()=>({caption:14,subhead:17,body:18,headline:21,title3:24,title2:25,title1:32,title120:56})[n.size]),l=o.computed(()=>[e.root,e[`size_${n.size}`],e[`align_${n.align}`]]);return(c,d)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(l.value)},[t.value?(o.openBlock(),o.createBlock(o.unref(me),{key:0,class:o.normalizeClass(o.unref(e).sign),size:c.size,color:c.color,weight:c.weight},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(t.value),1)]),_:1},8,["class","size","color","weight"])):o.createCommentVNode("",!0),o.createVNode(o.unref(me),{size:c.size,color:c.color,weight:c.weight},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(r.value),1)]),_:1},8,["size","color","weight"]),o.createVNode(o.unref($e),{class:o.normalizeClass(o.unref(e).currency),name:a.value,size:s.value,height:i.value,color:c.color},null,8,["class","name","size","height","color"])],2))}}),[["__cssModules",{$style:{root:"Price__root_65fbf",size_caption:"Price__size_caption_ba7cc",currency:"Price__currency_8c491",size_subhead:"Price__size_subhead_65554",size_body:"Price__size_body_6fdc3",sign:"Price__sign_2f6c9",size_headline:"Price__size_headline_5ae76",size_title3:"Price__size_title3_1b860",size_title2:"Price__size_title2_c0aef",size_title1:"Price__size_title1_ca830",align_center:"Price__align_center_d7c51",align_right:"Price__align_right_a8e44"}}]]),Eb={large:{size:"headline",weight:"semibold"},base:{size:"subhead",weight:"regular"},small:{size:"subhead",weight:"regular"}},Sb={large:{size:"subhead",weight:"regular"},base:{size:"subhead",weight:"regular"},small:{size:"caption",weight:"regular"}},ah=re(o.defineComponent({__name:"ResponseBase",props:{img:{},title:{},size:{default:"base"},description:{}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([e.$style.root,e.$style[`size_${e.size}`]])},[e.img?(o.openBlock(),o.createBlock(o.unref(Ho),{key:0,class:o.normalizeClass(e.$style.image),src:e.img,alt:e.title??"response",width:"110",height:"110",objectFit:"cover"},null,8,["class","src","alt"])):o.createCommentVNode("",!0),e.title?(o.openBlock(),o.createBlock(o.unref(me),o.mergeProps({key:1,class:e.$style.title,color:"text-common-base-primary-default",align:"center"},o.unref(Eb)[e.size]),{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.title),1)]),_:1},16,["class"])):o.createCommentVNode("",!0),e.description?(o.openBlock(),o.createBlock(o.unref(me),o.mergeProps({key:2,color:"text-common-base-primary-default",align:"center"},o.unref(Sb)[e.size]),{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.description),1)]),_:1},16)):o.createCommentVNode("",!0),e.$slots.default?(o.openBlock(),o.createElementBlock("div",{key:3,class:o.normalizeClass(e.$style.bottom)},[o.renderSlot(e.$slots,"default")],2)):o.createCommentVNode("",!0)],2))}}),[["__cssModules",{$style:{root:"Response__root_52dcc",image:"Response__image_525a2",size_large:"Response__size_large_1efba",description:"Response__description_50921",bottom:"Response__bottom_17cc0",size_base:"Response__size_base_0b1a8",size_small:"Response__size_small_b40a7"}}]]),xb=o.defineComponent({__name:"EmptyResponse",props:{img:{},title:{},size:{},description:{},buttonIconLeft:{},buttonIconRight:{},buttonText:{},route:{}},setup(n){return(e,t)=>(o.openBlock(),o.createBlock(ah,{img:e.img,title:e.title,description:e.description,size:e.size},{default:o.withCtx(()=>[o.renderSlot(e.$slots,"default",{},()=>[e.buttonText&&e.route?(o.openBlock(),o.createBlock(o.unref(tn),{key:0,tag:"router-link",href:e.route,view:"base-primary",size:"44",iconLeft:e.buttonIconLeft,iconRight:e.buttonIconRight},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.buttonText),1)]),_:1},8,["href","iconLeft","iconRight"])):o.createCommentVNode("",!0)])]),_:3},8,["img","title","description","size"]))}}),Bb=re(o.defineComponent({__name:"Section",setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("article",{class:o.normalizeClass(e.$style.root)},[o.renderSlot(e.$slots,"default")],2))}}),[["__cssModules",{$style:{root:"Section__root_bdbfe"}}]]);function Tb(n){return o.getCurrentScope()?(o.onScopeDispose(n),!0):!1}function sh(n){return typeof n=="function"?n():o.unref(n)}const ih=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const $b=Object.prototype.toString,Mb=n=>$b.call(n)==="[object Object]",qa=()=>{},Db=Ob();function Ob(){var n,e;return ih&&((n=window==null?void 0:window.navigator)==null?void 0:n.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function zr(n){var e;const t=sh(n);return(e=t==null?void 0:t.$el)!=null?e:t}const lh=ih?window:void 0;function Ri(...n){let e,t,r,a;if(typeof n[0]=="string"||Array.isArray(n[0])?([t,r,a]=n,e=lh):[e,t,r,a]=n,!e)return qa;Array.isArray(t)||(t=[t]),Array.isArray(r)||(r=[r]);const s=[],i=()=>{s.forEach(u=>u()),s.length=0},l=(u,h,p,m)=>(u.addEventListener(h,p,m),()=>u.removeEventListener(h,p,m)),c=o.watch(()=>[zr(e),sh(a)],([u,h])=>{if(i(),!u)return;const p=Mb(h)?{...h}:h;s.push(...t.flatMap(m=>r.map(f=>l(u,m,f,p))))},{immediate:!0,flush:"post"}),d=()=>{c(),i()};return Tb(d),d}let ch=!1;function Ab(n,e,t={}){const{window:r=lh,ignore:a=[],capture:s=!0,detectIframe:i=!1}=t;if(!r)return qa;Db&&!ch&&(ch=!0,Array.from(r.document.body.children).forEach(p=>p.addEventListener("click",qa)),r.document.documentElement.addEventListener("click",qa));let l=!0;const c=p=>a.some(m=>{if(typeof m=="string")return Array.from(r.document.querySelectorAll(m)).some(f=>f===p.target||p.composedPath().includes(f));{const f=zr(m);return f&&(p.target===f||p.composedPath().includes(f))}}),u=[Ri(r,"click",p=>{const m=zr(n);if(!(!m||m===p.target||p.composedPath().includes(m))){if(p.detail===0&&(l=!c(p)),!l){l=!0;return}e(p)}},{passive:!0,capture:s}),Ri(r,"pointerdown",p=>{const m=zr(n);l=!c(p)&&!!(m&&!p.composedPath().includes(m))},{passive:!0}),i&&Ri(r,"blur",p=>{setTimeout(()=>{var m;const f=zr(n);((m=r.document.activeElement)==null?void 0:m.tagName)==="IFRAME"&&!(f!=null&&f.contains(r.document.activeElement))&&e(p)},0)})].filter(Boolean);return()=>u.forEach(p=>p())}function Zn(){const[n,e]=Vu(!1),t=o.ref(null),r=o.ref(null),a=o.computed(()=>{var l;return(l=r.value)!=null&&l.$el?r.value.$el:r.value}),s=o.computed(()=>{var l;return(l=t.value)!=null&&l.$el?t.value.$el:t.value});function i(){e(!n.value)}return Ab(a,()=>e(!1),{ignore:["[data-ignore-click-outside]",s.value]}),{isShowDropdown:n,setIsShowDropdown:e,toggleIsShowDropdown:i,triggerElementRef:r,parentElementRef:t}}const dh=Symbol(),uh=()=>o.inject(dh,()=>0);function Vi(n){return n/12}function Hi(n){if(window){const t=Math.min(Math.max(window.innerWidth,1200),1440)/100;return Number((n*t/12).toFixed(2))}return 0}function Ib({parent:n,element:e,startHorizontalAlign:t,startVerticalAlign:r,horizontalOffset:a=0,verticalOffset:s=0,isCenterByParent:i=!1}){const l=n==null?void 0:n.getBoundingClientRect(),c=e;if(!l||!c)return;const{innerWidth:d,innerHeight:u}=window,h=c.getBoundingClientRect(),p=Hi(Number(a)),m=Hi(Number(s)),f=l.left+(l.width+p)-h.width>0,g=l.left+h.width+p<=d,x=l.bottom+h.height+m<u,E=l.top>h.height+m,{coordinates:C,align:T}=Lb({isCanPositionRight:f,isCanPositionLeft:g,parentElementRect:l,horizontalOffset:p,fixedElementRect:h,startAlign:t,isCenterByParent:i}),{coordinates:F,align:I}=Rb({isCanPositionBottom:x,isCanPositionTop:E,verticalOffset:m,parentElementRect:l,fixedElementRect:h,startAlign:r,isCenterByParent:i}),{left:O,right:P}=C,{top:M}=F;return{styles:{top:M&&M!==0?`${M}px`:void 0,left:O&&O!==0?`${O}px`:void 0,right:P&&P!==0?`${P}px`:void 0},align:{horizontal:T,vertical:I}}}function Nb({isCanPositionRight:n,isCanPositionLeft:e,parentElementRect:t,horizontalOffset:r,fixedElementRect:a,isCenterByParent:s=!1}){let i,l,c;return n?(l=ph(t,r),c="right"):e?(i=hh(t,r),c="left"):(i=ji({fixedElementRect:a,horizontalOffset:r,parentElementRect:t,isCenterByParent:s}),c="center"),{coordinates:{left:i,right:l},align:c}}function Pb({isCanPositionRight:n,isCanPositionLeft:e,parentElementRect:t,horizontalOffset:r,fixedElementRect:a,isCenterByParent:s=!1}){let i,l,c;return e?(i=hh(t,r),c="left"):n?(l=ph(t,r),c="right"):(i=ji({fixedElementRect:a,horizontalOffset:r,parentElementRect:t,isCenterByParent:s}),c="center"),{coordinates:{left:i,right:l},align:c}}function hh(n,e){return n.left+e}function ph(n,e){return window.innerWidth-n.right+e}function ji({fixedElementRect:n,isCenterByParent:e,horizontalOffset:t,parentElementRect:r}){const a=r.left-(n.width-r.width)/2+t,s=a>0&&a+n.width<window.innerWidth;return e||s?a:(window.innerWidth-n.width)/2+t}function Lb({isCanPositionRight:n,isCanPositionLeft:e,parentElementRect:t,horizontalOffset:r,fixedElementRect:a,startAlign:s,isCenterByParent:i=!1}){return s==="right"?Nb({isCanPositionRight:n,isCanPositionLeft:e,parentElementRect:t,horizontalOffset:r,fixedElementRect:a,isCenterByParent:i}):s==="left"?Pb({isCanPositionRight:n,isCanPositionLeft:e,parentElementRect:t,horizontalOffset:r,fixedElementRect:a,isCenterByParent:i}):{coordinates:{left:ji({fixedElementRect:a,parentElementRect:t,horizontalOffset:r,isCenterByParent:i}),right:void 0},align:"center"}}function zb({isCanPositionBottom:n,isCanPositionTop:e,verticalOffset:t,parentElementRect:r,fixedElementRect:a,isCenterByParent:s=!1}){let i,l;return n?(i=r.bottom+t,l="bottom"):e?(i=fh(r,a,t),l="top"):(i=Yi({fixedElementRect:a,verticalOffset:t,parentElementRect:r,isCenterByParent:s}),l="center"),{coordinates:{top:i},align:l}}function Fb({isCanPositionBottom:n,isCanPositionTop:e,verticalOffset:t,parentElementRect:r,fixedElementRect:a,isCenterByParent:s=!1}){let i,l;return e?(i=fh(r,a,t),l="top"):n?(i=Vb(r,t),l="bottom"):(i=Yi({fixedElementRect:a,parentElementRect:r,verticalOffset:t,isCenterByParent:s}),l="center"),{coordinates:{top:i},align:l}}function Rb({isCanPositionBottom:n,isCanPositionTop:e,verticalOffset:t,parentElementRect:r,fixedElementRect:a,startAlign:s,isCenterByParent:i=!1}){return s==="top"?Fb({isCanPositionBottom:n,isCanPositionTop:e,verticalOffset:t,parentElementRect:r,fixedElementRect:a,isCenterByParent:i}):s==="bottom"?zb({isCanPositionBottom:n,isCanPositionTop:e,verticalOffset:t,parentElementRect:r,fixedElementRect:a,isCenterByParent:i}):{coordinates:{top:Yi({fixedElementRect:a,parentElementRect:r,verticalOffset:t,isCenterByParent:i})},align:"center"}}function fh(n,e,t){return n.top-e.height-t}function Vb(n,e){return n.bottom+e}function Yi({fixedElementRect:n,parentElementRect:e,verticalOffset:t,isCenterByParent:r}){const a=e.top-(n.height-e.height)/2+t,s=a>0&&a+n.height<window.innerHeight;return r||s?a:(window.innerHeight-n.height)/2+t}const Hb=re(o.defineComponent({__name:"Wrapper",props:{isShowDropdown:{type:Boolean},verticalOffset:{default:0},horizontalOffset:{default:0},horizontalAlign:{default:"right"},verticalAlign:{default:"bottom"},isStretchToParent:{type:Boolean,default:!1},minWidth:{},isCenterByParent:{type:Boolean},isCloseOnScrollParent:{type:Boolean,default:!0},parentElement:{}},setup(n){const e=o.ref(null),t=uh(),r=o.ref({minWidth:n.minWidth?`${Vi(Number(n.minWidth))}rem`:void 0,width:void 0}),a=o.ref({top:void 0,left:void 0,right:void 0}),s=o.ref({horizontal:void 0,vertical:void 0});function i(){const f=Ib({parent:n.parentElement,element:e.value,startHorizontalAlign:n.horizontalAlign,startVerticalAlign:n.verticalAlign,horizontalOffset:Number(n.horizontalOffset),verticalOffset:Number(n.verticalOffset),isCenterByParent:n.isCenterByParent});f&&(a.value=f.styles,s.value=f.align)}function l(){t()}function c(f){f.key==="Escape"&&t()}const d=o.computed(()=>u(n.parentElement));function u(f){return f?f instanceof HTMLElement&&(f.scrollHeight>f.clientHeight||f.scrollWidth>f.clientWidth)?f:u(f.parentNode):null}let h;const p=()=>{clearTimeout(h),h=setTimeout(()=>{i()},10)},m=new ResizeObserver(p);return o.onUnmounted(()=>{var f;window.removeEventListener("resize",i),window.removeEventListener("scroll",l),document.removeEventListener("keydown",c),(f=d.value)==null||f.removeEventListener("scroll",l),m.disconnect()}),o.onMounted(()=>{var f,g;n.isStretchToParent&&(r.value.width=`${(f=n.parentElement)==null?void 0:f.clientWidth}px`),n.isCloseOnScrollParent&&((g=d.value)==null||g.addEventListener("scroll",l,{passive:!0})),window.addEventListener("scroll",l,{passive:!0}),document.addEventListener("keydown",c,{passive:!0}),window.addEventListener("resize",i),o.nextTick(i),m.observe(e.value)}),(f,g)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"fixedElementRef",ref:e,class:o.normalizeClass(f.$style.root),style:o.normalizeStyle({...a.value,...r.value})},[o.renderSlot(f.$slots,"default",{align:s.value})],6))}}),[["__cssModules",{$style:{root:"Wrapper__root_0f67c"}}]]),Jn=re(o.defineComponent({__name:"DropdownElement",props:o.mergeModels({isShowDropdown:{type:Boolean},verticalOffset:{},horizontalOffset:{},horizontalAlign:{},verticalAlign:{},isStretchToParent:{type:Boolean},minWidth:{},isCenterByParent:{type:Boolean},isCloseOnScrollParent:{type:Boolean},parentElement:{}},{isShowDropdown:{type:Boolean,required:!0},isShowDropdownModifiers:{}}),emits:o.mergeModels(["close"],["update:isShowDropdown"]),setup(n,{emit:e}){const t=o.getCurrentInstance(),r=o.ref();function a(f){const g=s(f);return g||i(f)}function s(f){var g;if(f)return f.refs.parentElementRef?(f.refs.parentElementRef instanceof HTMLElement?f.refs.parentElementRef:(g=f.refs.parentElementRef)==null?void 0:g.$el)??f.vnode.el:s(f.parent)}function i(f){if(!f)return;const g=f.ctx;return(g==null?void 0:g.$el)instanceof HTMLElement?g.$el:f.vnode.el instanceof HTMLElement?f.vnode.el:i(f.parent)}o.onMounted(()=>{r.value=a(t),r.value||console.warn(`Для использования DropdownElement нужен корневой элемент. Ошибка в компоненте ${c(t)}`)});const l=[];function c(f){return d(f),l.reverse().join(" > ")}function d(f){f!=null&&f.type.__name&&(l.push(f.type.__name??""),d(f.parent))}o.provide(dh,u);function u(){m.value=!1,p("close")}const h=n,p=e,m=o.useModel(n,"isShowDropdown");return(f,g)=>(o.openBlock(),o.createBlock(o.Teleport,{to:"#teleports"},[o.createVNode(o.unref($t),null,{default:o.withCtx(()=>[m.value&&r.value?(o.openBlock(),o.createBlock(o.unref(Hb),o.mergeProps({key:0},h,{parentElement:r.value}),{default:o.withCtx(({align:x})=>[o.renderSlot(f.$slots,"default",{align:x})]),_:3},16,["parentElement"])):o.createCommentVNode("",!0)]),_:3})]))}}),[["__cssModules",{$style:{}}]]),Ui=re(o.defineComponent({__name:"SelectBase",props:o.mergeModels({isOpen:{type:Boolean},label:{},description:{},errorText:{},isDisabled:{type:Boolean},isError:{type:Boolean},dropdownMaxHeight:{}},{isOpen:{type:Boolean,required:!0},isOpenModifiers:{}}),emits:o.mergeModels(["clickField","clickOutside","clickOutsideDropdown","close"],["update:isOpen"]),setup(n,{emit:e}){const t=o.useModel(n,"isOpen"),r=e,a=o.ref(null),s=o.ref(null),i=o.ref({...n.dropdownMaxHeight&&{height:`${n.dropdownMaxHeight}px`}}),{isShowDropdown:l,setIsShowDropdown:c,triggerElementRef:d,parentElementRef:u}=Zn();return o.watch(t,h=>{c(h)},{immediate:!0}),o.watch(l,h=>{t.value=h,h||r("close")}),o.watch(t,h=>{h&&o.nextTick(()=>{const p=s.value,m=document.querySelectorAll('[data-select-base-is-active-item = "true"]')[0];!p||!m||(p.scrollTop=m.offsetTop-p.getBoundingClientRect().height/2+m.getBoundingClientRect().height/2)})}),(h,p)=>(o.openBlock(),o.createElementBlock("div",{"data-ignore-click-outside":"",class:o.normalizeClass([h.$style.root,{[h.$style["is-disabled"]]:h.isDisabled,[h.$style["is-error"]]:h.isError,[h.$style["is-focused"]]:n.isOpen}])},[h.label?(o.openBlock(),o.createBlock(o.unref(me),{key:0,size:"subhead",color:"foreground-layout-layout-1-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(h.label),1)]),_:1})):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"wrapperRef",ref:a,class:o.normalizeClass(h.$style.wrapper),onClick:p[0]||(p[0]=m=>r("clickField"))},[o.renderSlot(h.$slots,"field")],2),o.createVNode(o.unref(Jn),{isShowDropdown:o.unref(l),"vertical-offset":"10",isCloseOnScrollParent:!0,"is-stretch-to-parent":"","horizontal-align":"left"},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(h.$style.dropdown),style:o.normalizeStyle(i.value),ref_key:"triggerElementRef",ref:d},[o.renderSlot(h.$slots,"dropdown")],6)]),_:3},8,["isShowDropdown"]),h.description||h.errorText?(o.openBlock(),o.createBlock(o.unref(qn),{key:1},{default:o.withCtx(()=>[h.description&&!h.isError?(o.openBlock(),o.createBlock(o.unref(me),{key:"description",size:"caption",color:"foreground-layout-layout-1-secondary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(h.description),1)]),_:1})):o.createCommentVNode("",!0),h.errorText&&h.isError?(o.openBlock(),o.createBlock(o.unref(me),{key:"error",size:"caption",color:"foreground-layout-layout-1-critical"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(h.errorText),1)]),_:1})):o.createCommentVNode("",!0)]),_:1})):o.createCommentVNode("",!0)],2))}}),[["__cssModules",{$style:{root:"SelectBase__root_95848",wrapper:"SelectBase__wrapper_32d76",dropdown:"SelectBase__dropdown_cdc0a","is-disabled":"SelectBase__is-disabled_4524f","is-error":"SelectBase__is-error_5c4d2","is-focused":"SelectBase__is-focused_c29c9"}}]]),jb=["data-select-base-is-active-item","onClick"],Yb={key:0},Ub=re(o.defineComponent({__name:"Select",props:o.mergeModels({label:{},description:{},errorText:{},isError:{type:Boolean},isDisabled:{type:Boolean},iconLeft:{},placeholder:{},data:{}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(n){const e=o.useModel(n,"value"),t=o.ref(!1),r=o.computed(()=>{const s=n.data.find(i=>i.id===e.value);return s?s.text:null});function a(s){t.value=!1,s===e.value?e.value=null:e.value=s}return(s,i)=>(o.openBlock(),o.createBlock(o.unref(Ui),{isOpen:t.value,"onUpdate:isOpen":i[0]||(i[0]=l=>t.value=l),label:s.label,description:s.description,errorText:s.errorText,isError:s.isError,isDisabled:s.isDisabled,"dropdown-max-height":215,onClickField:i[1]||(i[1]=()=>t.value=!t.value),onClickOutside:i[2]||(i[2]=()=>t.value=!1)},{field:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(s.$style.field)},[s.iconLeft?(o.openBlock(),o.createBlock(o.unref($e),{key:0,name:s.iconLeft,size:18,color:"foreground-interactive-select-base-secondary"},null,8,["name"])):o.createCommentVNode("",!0),o.createVNode(o.unref(qn),{class:o.normalizeClass(s.$style["field-inner"])},{default:o.withCtx(()=>[!r.value&&s.placeholder?(o.openBlock(),o.createBlock(o.unref(me),{key:s.placeholder,size:"subhead",color:"foreground-interactive-select-base-placeholder"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(s.placeholder),1)]),_:1})):o.createCommentVNode("",!0),r.value?(o.openBlock(),o.createBlock(o.unref(me),{key:r.value,size:"subhead",color:"foreground-interactive-select-base-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(r.value),1)]),_:1})):o.createCommentVNode("",!0)]),_:1},8,["class"]),o.createVNode(o.unref($e),{class:o.normalizeClass([s.$style["icon-right"],{[s.$style["is-open"]]:t.value}]),name:"outline-chevron-down",size:"18",color:"icon-common-base-secondary-default"},null,8,["class"])],2)]),dropdown:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(s.$style.list)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.data,l=>(o.openBlock(),o.createElementBlock("div",{key:l.id,"data-select-base-is-active-item":l.id===e.value,class:o.normalizeClass([s.$style.item,{[s.$style["is-active"]]:l.id===e.value}]),onClick:()=>a(l.id)},[l.icon?(o.openBlock(),o.createBlock(o.unref($e),{key:0,name:l.icon,size:18,color:"icon-input-base-primary"},null,8,["name"])):o.createCommentVNode("",!0),o.createVNode(o.unref(me),{size:"subhead",color:"text-common-base-primary-default"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(l.text),1)]),_:2},1024),o.createVNode(o.unref(qn),null,{default:o.withCtx(()=>[l.id===e.value?(o.openBlock(),o.createElementBlock("div",Yb,[o.createVNode(o.unref($e),{class:o.normalizeClass(s.$style.check),name:"outline-check",size:18,color:"foreground-surface-popover-base"},null,8,["class"])])):o.createCommentVNode("",!0)]),_:2},1024)],10,jb))),128))],2)]),_:1},8,["isOpen","label","description","errorText","isError","isDisabled"]))}}),[["__cssModules",{$style:{field:"Select__field_5e4de","field-inner":"Select__field-inner_addbf",list:"Select__list_818fa",item:"Select__item_4cc42","is-active":"Select__is-active_1c44e","icon-right":"Select__icon-right_434be","is-open":"Select__is-open_000d1",check:"Select__check_00c5c"}}]]),Wb="";function Ga(n,e){e===void 0&&(e={});var t=e.insertAt;if(!(!n||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",t==="top"&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=n:a.appendChild(document.createTextNode(n))}}const Ka=function(n,e){const{componentPrefix:t=Wb}=e||{};n.component(`${t}${this.name}`,this)};function wt(n,e){qb(n)&&(n="100%");var t=Gb(n);return n=e===360?n:Math.min(e,Math.max(0,parseFloat(n))),t&&(n=parseInt(String(n*e),10)/100),Math.abs(n-e)<1e-6?1:(e===360?n=(n<0?n%e+e:n%e)/parseFloat(String(e)):n=n%e/parseFloat(String(e)),n)}function Xa(n){return Math.min(1,Math.max(0,n))}function qb(n){return typeof n=="string"&&n.indexOf(".")!==-1&&parseFloat(n)===1}function Gb(n){return typeof n=="string"&&n.indexOf("%")!==-1}function mh(n){return n=parseFloat(n),(isNaN(n)||n<0||n>1)&&(n=1),n}function Qa(n){return n<=1?"".concat(Number(n)*100,"%"):n}function xo(n){return n.length===1?"0"+n:String(n)}function Kb(n,e,t){return{r:wt(n,255)*255,g:wt(e,255)*255,b:wt(t,255)*255}}function gh(n,e,t){n=wt(n,255),e=wt(e,255),t=wt(t,255);var r=Math.max(n,e,t),a=Math.min(n,e,t),s=0,i=0,l=(r+a)/2;if(r===a)i=0,s=0;else{var c=r-a;switch(i=l>.5?c/(2-r-a):c/(r+a),r){case n:s=(e-t)/c+(e<t?6:0);break;case e:s=(t-n)/c+2;break;case t:s=(n-e)/c+4;break}s/=6}return{h:s,s:i,l}}function Wi(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*(6*t):t<1/2?e:t<2/3?n+(e-n)*(2/3-t)*6:n}function Xb(n,e,t){var r,a,s;if(n=wt(n,360),e=wt(e,100),t=wt(t,100),e===0)a=t,s=t,r=t;else{var i=t<.5?t*(1+e):t+e-t*e,l=2*t-i;r=Wi(l,i,n+1/3),a=Wi(l,i,n),s=Wi(l,i,n-1/3)}return{r:r*255,g:a*255,b:s*255}}function yh(n,e,t){n=wt(n,255),e=wt(e,255),t=wt(t,255);var r=Math.max(n,e,t),a=Math.min(n,e,t),s=0,i=r,l=r-a,c=r===0?0:l/r;if(r===a)s=0;else{switch(r){case n:s=(e-t)/l+(e<t?6:0);break;case e:s=(t-n)/l+2;break;case t:s=(n-e)/l+4;break}s/=6}return{h:s,s:c,v:i}}function Qb(n,e,t){n=wt(n,360)*6,e=wt(e,100),t=wt(t,100);var r=Math.floor(n),a=n-r,s=t*(1-e),i=t*(1-a*e),l=t*(1-(1-a)*e),c=r%6,d=[t,i,s,s,l,t][c],u=[l,t,t,i,s,s][c],h=[s,s,l,t,t,i][c];return{r:d*255,g:u*255,b:h*255}}function bh(n,e,t,r){var a=[xo(Math.round(n).toString(16)),xo(Math.round(e).toString(16)),xo(Math.round(t).toString(16))];return r&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function Zb(n,e,t,r,a){var s=[xo(Math.round(n).toString(16)),xo(Math.round(e).toString(16)),xo(Math.round(t).toString(16)),xo(Jb(r))];return a&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))&&s[3].startsWith(s[3].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function Jb(n){return Math.round(parseFloat(n)*255).toString(16)}function kh(n){return Yt(n)/255}function Yt(n){return parseInt(n,16)}function e0(n){return{r:n>>16,g:(n&65280)>>8,b:n&255}}var qi={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function t0(n){var e={r:0,g:0,b:0},t=1,r=null,a=null,s=null,i=!1,l=!1;return typeof n=="string"&&(n=r0(n)),typeof n=="object"&&(Pn(n.r)&&Pn(n.g)&&Pn(n.b)?(e=Kb(n.r,n.g,n.b),i=!0,l=String(n.r).substr(-1)==="%"?"prgb":"rgb"):Pn(n.h)&&Pn(n.s)&&Pn(n.v)?(r=Qa(n.s),a=Qa(n.v),e=Qb(n.h,r,a),i=!0,l="hsv"):Pn(n.h)&&Pn(n.s)&&Pn(n.l)&&(r=Qa(n.s),s=Qa(n.l),e=Xb(n.h,r,s),i=!0,l="hsl"),Object.prototype.hasOwnProperty.call(n,"a")&&(t=n.a)),t=mh(t),{ok:i,format:n.format||l,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:t}}var n0="[-\\+]?\\d+%?",o0="[-\\+]?\\d*\\.\\d+%?",eo="(?:".concat(o0,")|(?:").concat(n0,")"),Gi="[\\s|\\(]+(".concat(eo,")[,|\\s]+(").concat(eo,")[,|\\s]+(").concat(eo,")\\s*\\)?"),Ki="[\\s|\\(]+(".concat(eo,")[,|\\s]+(").concat(eo,")[,|\\s]+(").concat(eo,")[,|\\s]+(").concat(eo,")\\s*\\)?"),on={CSS_UNIT:new RegExp(eo),rgb:new RegExp("rgb"+Gi),rgba:new RegExp("rgba"+Ki),hsl:new RegExp("hsl"+Gi),hsla:new RegExp("hsla"+Ki),hsv:new RegExp("hsv"+Gi),hsva:new RegExp("hsva"+Ki),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function r0(n){if(n=n.trim().toLowerCase(),n.length===0)return!1;var e=!1;if(qi[n])n=qi[n],e=!0;else if(n==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t=on.rgb.exec(n);return t?{r:t[1],g:t[2],b:t[3]}:(t=on.rgba.exec(n),t?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=on.hsl.exec(n),t?{h:t[1],s:t[2],l:t[3]}:(t=on.hsla.exec(n),t?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=on.hsv.exec(n),t?{h:t[1],s:t[2],v:t[3]}:(t=on.hsva.exec(n),t?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=on.hex8.exec(n),t?{r:Yt(t[1]),g:Yt(t[2]),b:Yt(t[3]),a:kh(t[4]),format:e?"name":"hex8"}:(t=on.hex6.exec(n),t?{r:Yt(t[1]),g:Yt(t[2]),b:Yt(t[3]),format:e?"name":"hex"}:(t=on.hex4.exec(n),t?{r:Yt(t[1]+t[1]),g:Yt(t[2]+t[2]),b:Yt(t[3]+t[3]),a:kh(t[4]+t[4]),format:e?"name":"hex8"}:(t=on.hex3.exec(n),t?{r:Yt(t[1]+t[1]),g:Yt(t[2]+t[2]),b:Yt(t[3]+t[3]),format:e?"name":"hex"}:!1)))))))))}function Pn(n){return!!on.CSS_UNIT.exec(String(n))}var a0=function(){function n(e,t){e===void 0&&(e=""),t===void 0&&(t={});var r;if(e instanceof n)return e;typeof e=="number"&&(e=e0(e)),this.originalInput=e;var a=t0(e);this.originalInput=e,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=t.format)!==null&&r!==void 0?r:a.format,this.gradientType=t.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return n.prototype.isDark=function(){return this.getBrightness()<128},n.prototype.isLight=function(){return!this.isDark()},n.prototype.getBrightness=function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},n.prototype.getLuminance=function(){var e=this.toRgb(),t,r,a,s=e.r/255,i=e.g/255,l=e.b/255;return s<=.03928?t=s/12.92:t=Math.pow((s+.055)/1.055,2.4),i<=.03928?r=i/12.92:r=Math.pow((i+.055)/1.055,2.4),l<=.03928?a=l/12.92:a=Math.pow((l+.055)/1.055,2.4),.2126*t+.7152*r+.0722*a},n.prototype.getAlpha=function(){return this.a},n.prototype.setAlpha=function(e){return this.a=mh(e),this.roundA=Math.round(100*this.a)/100,this},n.prototype.isMonochrome=function(){var e=this.toHsl().s;return e===0},n.prototype.toHsv=function(){var e=yh(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}},n.prototype.toHsvString=function(){var e=yh(this.r,this.g,this.b),t=Math.round(e.h*360),r=Math.round(e.s*100),a=Math.round(e.v*100);return this.a===1?"hsv(".concat(t,", ").concat(r,"%, ").concat(a,"%)"):"hsva(".concat(t,", ").concat(r,"%, ").concat(a,"%, ").concat(this.roundA,")")},n.prototype.toHsl=function(){var e=gh(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}},n.prototype.toHslString=function(){var e=gh(this.r,this.g,this.b),t=Math.round(e.h*360),r=Math.round(e.s*100),a=Math.round(e.l*100);return this.a===1?"hsl(".concat(t,", ").concat(r,"%, ").concat(a,"%)"):"hsla(".concat(t,", ").concat(r,"%, ").concat(a,"%, ").concat(this.roundA,")")},n.prototype.toHex=function(e){return e===void 0&&(e=!1),bh(this.r,this.g,this.b,e)},n.prototype.toHexString=function(e){return e===void 0&&(e=!1),"#"+this.toHex(e)},n.prototype.toHex8=function(e){return e===void 0&&(e=!1),Zb(this.r,this.g,this.b,this.a,e)},n.prototype.toHex8String=function(e){return e===void 0&&(e=!1),"#"+this.toHex8(e)},n.prototype.toHexShortString=function(e){return e===void 0&&(e=!1),this.a===1?this.toHexString(e):this.toHex8String(e)},n.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},n.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(e,", ").concat(t,", ").concat(r,")"):"rgba(".concat(e,", ").concat(t,", ").concat(r,", ").concat(this.roundA,")")},n.prototype.toPercentageRgb=function(){var e=function(t){return"".concat(Math.round(wt(t,255)*100),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},n.prototype.toPercentageRgbString=function(){var e=function(t){return Math.round(wt(t,255)*100)};return this.a===1?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},n.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var e="#"+bh(this.r,this.g,this.b,!1),t=0,r=Object.entries(qi);t<r.length;t++){var a=r[t],s=a[0],i=a[1];if(e===i)return s}return!1},n.prototype.toString=function(e){var t=!!e;e=e??this.format;var r=!1,a=this.a<1&&this.a>=0,s=!t&&a&&(e.startsWith("hex")||e==="name");return s?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},n.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},n.prototype.clone=function(){return new n(this.toString())},n.prototype.lighten=function(e){e===void 0&&(e=10);var t=this.toHsl();return t.l+=e/100,t.l=Xa(t.l),new n(t)},n.prototype.brighten=function(e){e===void 0&&(e=10);var t=this.toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(e/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(e/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(e/100)))),new n(t)},n.prototype.darken=function(e){e===void 0&&(e=10);var t=this.toHsl();return t.l-=e/100,t.l=Xa(t.l),new n(t)},n.prototype.tint=function(e){return e===void 0&&(e=10),this.mix("white",e)},n.prototype.shade=function(e){return e===void 0&&(e=10),this.mix("black",e)},n.prototype.desaturate=function(e){e===void 0&&(e=10);var t=this.toHsl();return t.s-=e/100,t.s=Xa(t.s),new n(t)},n.prototype.saturate=function(e){e===void 0&&(e=10);var t=this.toHsl();return t.s+=e/100,t.s=Xa(t.s),new n(t)},n.prototype.greyscale=function(){return this.desaturate(100)},n.prototype.spin=function(e){var t=this.toHsl(),r=(t.h+e)%360;return t.h=r<0?360+r:r,new n(t)},n.prototype.mix=function(e,t){t===void 0&&(t=50);var r=this.toRgb(),a=new n(e).toRgb(),s=t/100,i={r:(a.r-r.r)*s+r.r,g:(a.g-r.g)*s+r.g,b:(a.b-r.b)*s+r.b,a:(a.a-r.a)*s+r.a};return new n(i)},n.prototype.analogous=function(e,t){e===void 0&&(e=6),t===void 0&&(t=30);var r=this.toHsl(),a=360/t,s=[this];for(r.h=(r.h-(a*e>>1)+720)%360;--e;)r.h=(r.h+a)%360,s.push(new n(r));return s},n.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new n(e)},n.prototype.monochromatic=function(e){e===void 0&&(e=6);for(var t=this.toHsv(),r=t.h,a=t.s,s=t.v,i=[],l=1/e;e--;)i.push(new n({h:r,s:a,v:s})),s=(s+l)%1;return i},n.prototype.splitcomplement=function(){var e=this.toHsl(),t=e.h;return[this,new n({h:(t+72)%360,s:e.s,l:e.l}),new n({h:(t+216)%360,s:e.s,l:e.l})]},n.prototype.onBackground=function(e){var t=this.toRgb(),r=new n(e).toRgb(),a=t.a+r.a*(1-t.a);return new n({r:(t.r*t.a+r.r*r.a*(1-t.a))/a,g:(t.g*t.a+r.g*r.a*(1-t.a))/a,b:(t.b*t.a+r.b*r.a*(1-t.a))/a,a})},n.prototype.triad=function(){return this.polyad(3)},n.prototype.tetrad=function(){return this.polyad(4)},n.prototype.polyad=function(e){for(var t=this.toHsl(),r=t.h,a=[this],s=360/e,i=1;i<e;i++)a.push(new n({h:(r+i*s)%360,s:t.s,l:t.l}));return a},n.prototype.equals=function(e){return this.toRgbString()===new n(e).toRgbString()},n}();function to(...n){return new a0(...n)}function Xi(n,e){const t=n&&n.a;let r;n&&n.hsl?r=to(n.hsl):n&&n.hex&&n.hex.length>0?r=to(n.hex):n&&n.hsv?r=to(n.hsv):n&&n.rgba?r=to(n.rgba):n&&n.rgb?r=to(n.rgb):r=to(n),r&&(r._a===void 0||r._a===null)&&r.setAlpha(t||r.getAlpha());const a=r.toHsl(),s=r.toHsv();return a.s===0&&(s.h=a.h=n.h||n.hsl&&n.hsl.h||e||0),s.v<.0164&&(s.h=n.h||n.hsv&&n.hsv.h||0,s.s=n.s||n.hsv&&n.hsv.s||0),a.l<.01&&(a.h=n.h||n.hsl&&n.hsl.h||0,a.s=n.s||n.hsl&&n.hsl.s||0),{hsl:a,hex:r.toHexString().toUpperCase(),hex8:r.toHex8String().toUpperCase(),rgba:r.toRgb(),hsv:s,oldHue:n.h||e||a.h,source:n.source,a:r.getAlpha()}}var s0={model:{prop:"modelValue",event:"update:modelValue"},props:["modelValue"],data(){return{val:Xi(this.modelValue)}},computed:{colors:{get(){return this.val},set(n){this.val=n,this.$emit("update:modelValue",n)}}},watch:{modelValue(n){this.val=Xi(n)}},methods:{colorChange(n,e){this.oldHue=this.colors.hsl.h,this.colors=Xi(n,e||this.oldHue)},isValidHex(n){return to(n).isValid},simpleCheckForValidColor(n){const e=["r","g","b","a","h","s","l","v"];let t=0,r=0;for(let a=0;a<e.length;a++){const s=e[a];n[s]&&(t++,isNaN(n[s])||r++)}if(t===r)return n},paletteUpperCase(n){return n.map(e=>e.toUpperCase())},isTransparent(n){return to(n).getAlpha()===0}}},Za={name:"EditableInput",props:{label:String,labelText:String,desc:String,value:[String,Number],max:Number,min:Number,arrowOffset:{type:Number,default:1}},computed:{val:{get(){return this.value},set(n){if(this.max!==void 0&&+n>this.max)this.$refs.input.value=this.max;else return n}},labelId(){return`input__label__${this.label}__${Math.random().toString().slice(2,5)}`},labelSpanText(){return this.labelText||this.label}},methods:{update(n){this.handleChange(n.target.value)},handleChange(n){const e={};e[this.label]=n,e.hex===void 0&&e["#"]===void 0?this.$emit("change",e):n.length>5&&this.$emit("change",e)},handleKeyDown(n){let{val:e}=this;const t=Number(e);if(t){const r=this.arrowOffset||1;n.keyCode===38&&(e=t+r,this.handleChange(e),n.preventDefault()),n.keyCode===40&&(e=t-r,this.handleChange(e),n.preventDefault())}}}};const i0={class:"vc-editable-input"},l0=["aria-labelledby"],c0=["id","for"],d0={class:"vc-input__desc"};function u0(n,e,t,r,a,s){return o.openBlock(),o.createElementBlock("div",i0,[o.withDirectives(o.createElementVNode("input",{ref:"input","onUpdate:modelValue":e[0]||(e[0]=i=>s.val=i),"aria-labelledby":s.labelId,class:"vc-input__input",onKeydown:e[1]||(e[1]=(...i)=>s.handleKeyDown&&s.handleKeyDown(...i)),onInput:e[2]||(e[2]=(...i)=>s.update&&s.update(...i))},null,40,l0),[[o.vModelText,s.val]]),o.createElementVNode("span",{id:s.labelId,for:t.label,class:"vc-input__label"},o.toDisplayString(s.labelSpanText),9,c0),o.createElementVNode("span",d0,o.toDisplayString(t.desc),1)])}var h0=".vc-editable-input{position:relative}.vc-input__input{border:0;outline:none;padding:0}.vc-input__label{text-transform:capitalize}";Ga(h0),Za.render=u0,Za.__file="src/components/editable-input/editable-input.vue",Za.install=Ka;function Qi(n,e,t){return e<t?n<e?e:n>t?t:n:n<t?t:n>e?e:n}var Ja={name:"Saturation",props:{value:Object},computed:{colors(){return this.value},bgColor(){return`hsl(${this.colors.hsv.h}, 100%, 50%)`},pointerTop(){return`${-(this.colors.hsv.v*100)+1+100}%`},pointerLeft(){return`${this.colors.hsv.s*100}%`}},methods:{handleChange(n,e){!e&&n.preventDefault();const{container:t}=this.$refs;if(!t)return;const r=t.clientWidth,a=t.clientHeight,s=t.getBoundingClientRect().left+window.pageXOffset,i=t.getBoundingClientRect().top+window.pageYOffset,l=n.pageX||(n.touches?n.touches[0].pageX:0),c=n.pageY||(n.touches?n.touches[0].pageY:0),d=Qi(l-s,0,r),u=Qi(c-i,0,a),h=d/r,p=Qi(-(u/a)+1,0,1);this.onChange({h:this.colors.hsv.h,s:h,v:p,a:this.colors.hsv.a,source:"hsva"})},onChange(n){this.$emit("change",n)},handleMouseDown(n){window.addEventListener("mousemove",this.handleChange),window.addEventListener("mouseup",this.handleChange),window.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp(n){this.unbindEventListeners()},unbindEventListeners(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}}};const p0=o.createElementVNode("div",{class:"vc-saturation--white"},null,-1),f0=o.createElementVNode("div",{class:"vc-saturation--black"},null,-1),m0=[o.createElementVNode("div",{class:"vc-saturation-circle"},null,-1)];function g0(n,e,t,r,a,s){return o.openBlock(),o.createElementBlock("div",{ref:"container",class:"vc-saturation",style:o.normalizeStyle({background:s.bgColor}),onMousedown:e[0]||(e[0]=(...i)=>s.handleMouseDown&&s.handleMouseDown(...i)),onTouchmove:e[1]||(e[1]=(...i)=>s.handleChange&&s.handleChange(...i)),onTouchstart:e[2]||(e[2]=(...i)=>s.handleChange&&s.handleChange(...i))},[p0,f0,o.createElementVNode("div",{class:"vc-saturation-pointer",style:o.normalizeStyle({top:s.pointerTop,left:s.pointerLeft})},m0,4)],36)}var y0=".vc-saturation,.vc-saturation--black,.vc-saturation--white{bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0}.vc-saturation--white{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.vc-saturation--black{background:linear-gradient(0deg,#000,transparent)}.vc-saturation-pointer{cursor:pointer;position:absolute}.vc-saturation-circle{border-radius:50%;box-shadow:0 0 0 1.5px #fff,inset 0 0 1px 1px rgba(0,0,0,.3),0 0 1px 2px rgba(0,0,0,.4);cursor:head;height:4px;transform:translate(-2px,-2px);width:4px}";Ga(y0),Ja.render=g0,Ja.__file="src/components/saturation/saturation.vue",Ja.install=Ka;var es={name:"Hue",props:{value:Object,direction:{type:String,default:"horizontal"}},data(){return{oldHue:0,pullDirection:""}},computed:{colors(){return this.value},directionClass(){return{"vc-hue--horizontal":this.direction==="horizontal","vc-hue--vertical":this.direction==="vertical"}},pointerTop(){return this.direction==="vertical"?this.colors.hsl.h===0&&this.pullDirection==="right"?0:`${-(this.colors.hsl.h*100/360)+100}%`:0},pointerLeft(){return this.direction==="vertical"?0:this.colors.hsl.h===0&&this.pullDirection==="right"?"100%":`${this.colors.hsl.h*100/360}%`}},watch:{value:{handler(n,e){const{h:t}=n.hsl;t!==0&&t-this.oldHue>0&&(this.pullDirection="right"),t!==0&&t-this.oldHue<0&&(this.pullDirection="left"),this.oldHue=t},deep:!0,immediate:!0}},methods:{handleChange(n,e){!e&&n.preventDefault();const{container:t}=this.$refs;if(!t)return;const r=t.clientWidth,a=t.clientHeight,s=t.getBoundingClientRect().left+window.pageXOffset,i=t.getBoundingClientRect().top+window.pageYOffset,l=n.pageX||(n.touches?n.touches[0].pageX:0),c=n.pageY||(n.touches?n.touches[0].pageY:0),d=l-s,u=c-i;let h,p;this.direction==="vertical"?(u<0?h=360:u>a?h=0:(p=-(u*100/a)+100,h=360*p/100),this.colors.hsl.h!==h&&this.$emit("change",{h,s:this.colors.hsl.s,l:this.colors.hsl.l,a:this.colors.hsl.a,source:"hsl"})):(d<0?h=0:d>r?h=360:(p=d*100/r,h=360*p/100),this.colors.hsl.h!==h&&this.$emit("change",{h,s:this.colors.hsl.s,l:this.colors.hsl.l,a:this.colors.hsl.a,source:"hsl"}))},handleMouseDown(n){this.handleChange(n,!0),window.addEventListener("mousemove",this.handleChange),window.addEventListener("mouseup",this.handleChange),window.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp(n){this.unbindEventListeners()},unbindEventListeners(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}}};const b0=["aria-valuenow"],k0=[o.createElementVNode("div",{class:"vc-hue-picker"},null,-1)];function v0(n,e,t,r,a,s){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["vc-hue",[s.directionClass]])},[o.createElementVNode("div",{ref:"container",class:"vc-hue-container",role:"slider","aria-valuenow":s.colors.hsl.h,"aria-valuemin":"0","aria-valuemax":"360",onMousedown:e[0]||(e[0]=(...i)=>s.handleMouseDown&&s.handleMouseDown(...i)),onTouchmove:e[1]||(e[1]=(...i)=>s.handleChange&&s.handleChange(...i)),onTouchstart:e[2]||(e[2]=(...i)=>s.handleChange&&s.handleChange(...i))},[o.createElementVNode("div",{class:"vc-hue-pointer",style:o.normalizeStyle({top:s.pointerTop,left:s.pointerLeft}),role:"presentation"},k0,4)],40,b0)],2)}var w0=".vc-hue{border-radius:2px;bottom:0;left:0;position:absolute;right:0;top:0}.vc-hue--horizontal{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.vc-hue--vertical{background:linear-gradient(0deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.vc-hue-container{cursor:pointer;height:100%;margin:0 2px;position:relative}.vc-hue-pointer{position:absolute;z-index:2}.vc-hue-picker{background:#fff;border-radius:1px;box-shadow:0 0 2px rgba(0,0,0,.6);cursor:pointer;height:8px;margin-top:1px;transform:translateX(-2px);width:4px}";Ga(w0),es.render=v0,es.__file="src/components/hue/hue.vue",es.install=Ka;var ts={name:"Photoshop",components:{Saturation:Ja,Hue:es,EdIn:Za},mixins:[s0],props:{head:{type:String,default:"Color Picker"},disableFields:{type:Boolean,default:!1},hasResetButton:{type:Boolean,default:!1},acceptLabel:{type:String,default:"OK"},cancelLabel:{type:String,default:"Cancel"},resetLabel:{type:String,default:"Reset"},newLabel:{type:String,default:"new"},currentLabel:{type:String,default:"current"}},data(){return{currentColor:"#FFF"}},computed:{hsv(){const{hsv:n}=this.colors;return{h:n.h.toFixed(),s:(n.s*100).toFixed(),v:(n.v*100).toFixed()}},hex(){const{hex:n}=this.colors;return n&&n.replace("#","")}},created(){this.currentColor=this.colors.hex},methods:{childChange(n){this.colorChange(n)},inputChange(n){n&&(n["#"]?this.isValidHex(n["#"])&&this.colorChange({hex:n["#"],source:"hex"}):n.r||n.g||n.b||n.a?this.colorChange({r:n.r||this.colors.rgba.r,g:n.g||this.colors.rgba.g,b:n.b||this.colors.rgba.b,a:n.a||this.colors.rgba.a,source:"rgba"}):(n.h||n.s||n.v)&&this.colorChange({h:n.h||this.colors.hsv.h,s:n.s/100||this.colors.hsv.s,v:n.v/100||this.colors.hsv.v,source:"hsv"}))},clickCurrentColor(){this.colorChange({hex:this.currentColor,source:"hex"})},handleAccept(){this.$emit("ok")},handleCancel(){this.$emit("cancel")},handleReset(){this.$emit("reset")}}};const _0={role:"heading",class:"vc-ps-head"},C0={class:"vc-ps-body"},E0={class:"vc-ps-saturation-wrap"},S0={class:"vc-ps-hue-wrap"},x0=o.createElementVNode("div",{class:"vc-ps-hue-pointer"},[o.createElementVNode("i",{class:"vc-ps-hue-pointer--left"}),o.createElementVNode("i",{class:"vc-ps-hue-pointer--right"})],-1),B0={class:"vc-ps-previews"},T0={class:"vc-ps-previews__label"},$0={class:"vc-ps-previews__swatches"},M0=["aria-label"],D0=["aria-label"],O0={class:"vc-ps-previews__label"},A0={key:0,class:"vc-ps-actions"},I0=["aria-label"],N0=["aria-label"],P0={class:"vc-ps-fields"},L0=o.createElementVNode("div",{class:"vc-ps-fields__divider"},null,-1),z0=o.createElementVNode("div",{class:"vc-ps-fields__divider"},null,-1);function F0(n,e,t,r,a,s){const i=o.resolveComponent("Saturation"),l=o.resolveComponent("Hue"),c=o.resolveComponent("EdIn");return o.openBlock(),o.createElementBlock("div",{role:"application","aria-label":"PhotoShop color picker",class:o.normalizeClass(["vc-photoshop",[t.disableFields?"vc-photoshop__disable-fields":""]])},[o.createElementVNode("div",_0,o.toDisplayString(t.head),1),o.createElementVNode("div",C0,[o.createElementVNode("div",E0,[o.createVNode(i,{value:n.colors,onChange:s.childChange},null,8,["value","onChange"])]),o.createElementVNode("div",S0,[o.createVNode(l,{value:n.colors,direction:"vertical",onChange:s.childChange},{default:o.withCtx(()=>[x0]),_:1},8,["value","onChange"])]),o.createElementVNode("div",{class:o.normalizeClass(["vc-ps-controls",[t.disableFields?"vc-ps-controls__disable-fields":""]])},[o.createElementVNode("div",B0,[o.createElementVNode("div",T0,o.toDisplayString(t.newLabel),1),o.createElementVNode("div",$0,[o.createElementVNode("div",{class:"vc-ps-previews__pr-color","aria-label":`New color is ${n.colors.hex}`,style:o.normalizeStyle({background:n.colors.hex})},null,12,M0),o.createElementVNode("div",{class:"vc-ps-previews__pr-color","aria-label":`Current color is ${a.currentColor}`,style:o.normalizeStyle({background:a.currentColor}),onClick:e[0]||(e[0]=(...d)=>s.clickCurrentColor&&s.clickCurrentColor(...d))},null,12,D0)]),o.createElementVNode("div",O0,o.toDisplayString(t.currentLabel),1)]),t.disableFields?o.createCommentVNode("v-if",!0):(o.openBlock(),o.createElementBlock("div",A0,[o.createElementVNode("div",{class:"vc-ps-ac-btn",role:"button","aria-label":t.acceptLabel,onClick:e[1]||(e[1]=(...d)=>s.handleAccept&&s.handleAccept(...d))},o.toDisplayString(t.acceptLabel),9,I0),o.createElementVNode("div",{class:"vc-ps-ac-btn",role:"button","aria-label":t.cancelLabel,onClick:e[2]||(e[2]=(...d)=>s.handleCancel&&s.handleCancel(...d))},o.toDisplayString(t.cancelLabel),9,N0),o.createElementVNode("div",P0,[o.createCommentVNode(" hsla "),o.createVNode(c,{label:"h",desc:"°",value:s.hsv.h,onChange:s.inputChange},null,8,["value","onChange"]),o.createVNode(c,{label:"s",desc:"%",value:s.hsv.s,max:100,onChange:s.inputChange},null,8,["value","onChange"]),o.createVNode(c,{label:"v",desc:"%",value:s.hsv.v,max:100,onChange:s.inputChange},null,8,["value","onChange"]),L0,o.createCommentVNode(" rgba "),o.createVNode(c,{label:"r",value:n.colors.rgba.r,onChange:s.inputChange},null,8,["value","onChange"]),o.createVNode(c,{label:"g",value:n.colors.rgba.g,onChange:s.inputChange},null,8,["value","onChange"]),o.createVNode(c,{label:"b",value:n.colors.rgba.b,onChange:s.inputChange},null,8,["value","onChange"]),z0,o.createCommentVNode(" hex "),o.createVNode(c,{label:"#",class:"vc-ps-fields__hex",value:s.hex,onChange:s.inputChange},null,8,["value","onChange"])]),t.hasResetButton?(o.openBlock(),o.createElementBlock("div",{key:0,class:"vc-ps-ac-btn","aria-label":"reset",onClick:e[3]||(e[3]=(...d)=>s.handleReset&&s.handleReset(...d))},o.toDisplayString(t.resetLabel),1)):o.createCommentVNode("v-if",!0)]))],2)])],2)}var R0='.vc-photoshop{background:#dcdcdc;border-radius:4px;box-shadow:0 0 0 1px rgba(0,0,0,.25),0 8px 16px rgba(0,0,0,.15);box-sizing:initial;font-family:Roboto;width:513px}.vc-photoshop__disable-fields{width:390px}.vc-ps-head{background-image:linear-gradient(-180deg,#f0f0f0,#d4d4d4);border-bottom:1px solid #b1b1b1;border-radius:4px 4px 0 0;box-shadow:inset 0 1px 0 0 hsla(0,0%,100%,.2),inset 0 -1px 0 0 rgba(0,0,0,.02);color:#4d4d4d;font-size:13px;height:23px;line-height:24px;text-align:center}.vc-ps-body{display:flex;padding:15px}.vc-ps-saturation-wrap{border:2px solid #b3b3b3;border-bottom-color:#f0f0f0;height:256px;overflow:hidden;position:relative;width:256px}.vc-ps-saturation-wrap .vc-saturation-circle{height:12px;width:12px}.vc-ps-hue-wrap{border:2px solid #b3b3b3;border-bottom-color:#f0f0f0;height:256px;margin-left:10px;width:19px}.vc-ps-hue-pointer,.vc-ps-hue-wrap{position:relative}.vc-ps-hue-pointer--left,.vc-ps-hue-pointer--right{border-color:transparent transparent transparent #555;border-style:solid;border-width:5px 0 5px 8px;height:0;position:absolute;width:0}.vc-ps-hue-pointer--left:after,.vc-ps-hue-pointer--right:after{border-color:transparent transparent transparent #fff;border-style:solid;border-width:4px 0 4px 6px;content:"";height:0;left:1px;position:absolute;top:1px;transform:translate(-8px,-5px);width:0}.vc-ps-hue-pointer--left{transform:translate(-13px,-4px)}.vc-ps-hue-pointer--right{transform:translate(20px,-4px) rotate(180deg)}.vc-ps-controls{display:flex;margin-left:10px;width:180px}.vc-ps-controls__disable-fields{width:auto}.vc-ps-actions{flex:1;margin-left:20px}.vc-ps-ac-btn{background-image:linear-gradient(-180deg,#fff,#e6e6e6);border:1px solid #878787;border-radius:2px;box-shadow:0 1px 0 0 #eaeaea;color:#000;cursor:pointer;font-size:14px;height:20px;line-height:20px;margin-bottom:10px;text-align:center}.vc-ps-previews{width:60px}.vc-ps-previews__swatches{border:1px solid #b3b3b3;border-bottom-color:#f0f0f0;margin-bottom:2px;margin-top:1px}.vc-ps-previews__pr-color{box-shadow:inset 1px 0 0 #000,inset -1px 0 0 #000,inset 0 1px 0 #000;height:34px}.vc-ps-previews__label{color:#000;font-size:14px;text-align:center}.vc-ps-fields{padding-bottom:9px;padding-top:5px;position:relative;width:80px}.vc-ps-fields .vc-input__input{border:1px solid #888;box-shadow:inset 0 1px 1px rgba(0,0,0,.1),0 1px 0 0 #ececec;font-size:13px;height:18px;margin-bottom:5px;margin-left:40%;margin-right:10px;padding-left:3px;width:40%}.vc-ps-fields .vc-input__desc,.vc-ps-fields .vc-input__label{font-size:13px;height:18px;line-height:22px;position:absolute;text-transform:uppercase;top:0}.vc-ps-fields .vc-input__label{left:0;width:34px}.vc-ps-fields .vc-input__desc{right:0;width:0}.vc-ps-fields__divider{height:5px}.vc-ps-fields__hex .vc-input__input{border:1px solid #888;box-shadow:inset 0 1px 1px rgba(0,0,0,.1),0 1px 0 0 #ececec;font-size:13px;height:18px;margin-bottom:6px;margin-left:20%;padding-left:3px;width:80%}.vc-ps-fields__hex .vc-input__label{font-size:13px;height:18px;left:0;line-height:22px;position:absolute;text-transform:uppercase;top:0;width:14px}';Ga(R0),ts.render=F0,ts.__file="src/components/photoshop/photoshop.vue",ts.install=Ka;const V0=re(o.defineComponent({__name:"ColorPicker",props:o.mergeModels({label:{},description:{},errorText:{},isError:{type:Boolean},isDisabled:{type:Boolean}},{value:{required:!0},valueModifiers:{}}),emits:["update:value"],setup(n){const e=n,t=o.useModel(n,"value"),r=o.ref(!1),a=o.ref();function s(u){const h=(u||"").replace("#","").toLowerCase();return/^[0-9a-f]{3}$/.test(h)?`#${h[0]}${h[0]}${h[1]}${h[1]}${h[2]}${h[2]}`:/^[0-9a-f]{6}$/.test(h)?`#${h}`:"#000000"}function i(u){const h=(u||"").replace("#","").toLowerCase();return/^[0-9a-f]{3}$/.test(h)||/^[0-9a-f]{6}$/.test(h)}function l(){r.value=!1,t.value=s(t.value)}const c={mask:/^[0-9A-Fa-f]{0,6}$/,lazy:!1,overwrite:!0,prepare:u=>u.toUpperCase()};function d(u){var p;const h=`#${u.toUpperCase()}`;h!==((p=t.value)==null?void 0:p.toUpperCase())&&(t.value=h)}return(u,h)=>(o.openBlock(),o.createBlock(o.unref(Ui),o.mergeProps(e,{isOpen:r.value,"onUpdate:isOpen":h[1]||(h[1]=p=>r.value=p),"dropdown-max-height":192,onClose:l,onClickField:h[2]||(h[2]=()=>r.value=!0),onClickOutsideDropdown:l}),{field:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(u.$style.wrapper)},[o.createVNode(o.unref(zi),o.mergeProps({ref_key:"inputRef",ref:a,value:(t.value??"").replace("#",""),class:u.$style.field},c,{unmask:!0,inputmode:"decimal","onUpdate:masked":d}),null,16,["value","class"]),o.createElementVNode("div",{class:o.normalizeClass(u.$style["color-box-wrapper"])},[o.createVNode(o.unref(Jo),{class:o.normalizeClass(u.$style["color-box"])},{default:o.withCtx(()=>[i(t.value)?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(u.$style["color-box"]),style:o.normalizeStyle({backgroundColor:t.value??""})},null,6)):o.createCommentVNode("",!0)]),_:1},8,["class"]),o.createElementVNode("div",{class:o.normalizeClass(u.$style["color-placeholder"])},null,2)],2)],2)]),dropdown:o.withCtx(()=>[o.createVNode(o.unref(ts),{class:o.normalizeClass(u.$style.picker),modelValue:t.value??"",disableAlpha:!0,disableFields:!0,hasResetButton:!1,"onUpdate:modelValue":h[0]||(h[0]=p=>t.value=p.hex)},null,8,["class","modelValue"])]),_:1},16,["isOpen"]))}}),[["__cssModules",{$style:{picker:"ColorPicker__picker_ec626",wrapper:"ColorPicker__wrapper_87582",field:"ColorPicker__field_825c5","color-box-wrapper":"ColorPicker__color-box-wrapper_79fbe","color-box":"ColorPicker__color-box_0f970","color-placeholder":"ColorPicker__color-placeholder_5b585"}}]]),Zi=re(o.defineComponent({__name:"SkeletonWrapper",props:{isLoading:{type:Boolean,default:!0}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([e.$style.root,{[e.$style["is-loading"]]:e.isLoading}])},[o.renderSlot(e.$slots,"default")],2))}}),[["__cssModules",{$style:{root:"SkeletonWrapper__root_bd4da","is-loading":"SkeletonWrapper__is-loading_848cc",pulse:"SkeletonWrapper__pulse_ab6d7"}}]]),Fr=300,H0=o.defineComponent({__name:"TransitionHeight",setup(n){const e=o.ref(""),t=o.ref("1"),r=o.ref("blur(0px)");let a;function s(){t.value="0",r.value="blur(5px)"}function i(h,p){t.value="1",r.value="blur(0px)",e.value=`${h.scrollHeight}px`,a=setTimeout(p,Fr)}function l(){t.value="",e.value="",r.value=""}function c(h){e.value=`${h.scrollHeight}px`}function d(h,p){t.value="0",t.value="0",a=setTimeout(p,Fr)}const u=o.computed(()=>({height:e.value,opacity:t.value,filter:r.value,overflow:"hidden",transition:`height ${Fr}ms ease, opacity ${Fr}ms ease, filter ${Fr}ms ease`}));return o.onBeforeUnmount(()=>clearTimeout(a)),(h,p)=>(o.openBlock(),o.createElementBlock("div",{style:o.normalizeStyle(u.value)},[o.createVNode(o.Transition,{mode:"out-in",name:"fade-height",onBeforeEnter:s,onEnter:i,onAfterEnter:l,onBeforeLeave:c,onLeave:d},{default:o.withCtx(()=>[o.renderSlot(h.$slots,"default")]),_:3})],4))}}),j0=o.defineComponent({__name:"UserRow",props:{name:{}},emits:["click"],setup(n,{emit:e}){const t=e;return(r,a)=>(o.openBlock(),o.createElementBlock("button",{class:o.normalizeClass(r.$style.root),onClick:a[0]||(a[0]=s=>t("click",s))},[o.createVNode(o.unref(me),{class:o.normalizeClass(r.$style.name),color:"text-common-base-primary-default",size:"subhead"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(r.name),1)]),_:1},8,["class"]),o.createVNode(o.unref($e),{name:"outline-logout",size:"18",color:"icon-button-base-primary"})],2))}}),vh={root:"UserRow__root_4ea1d",name:"UserRow__name_d7172"},Y0=re(j0,[["__cssModules",{$style:vh}]]),U0=re(o.defineComponent({__name:"UserRowSkeleton",setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.$style.root)},[o.createVNode(o.unref($n),{color:"foreground-layout-layout-1-primary",size:"subhead",widthRange:[.6,.8]})],2))}}),[["__cssModules",{$style:vh}]]),W0=re(o.defineComponent({__name:"Container",props:{width:{}},setup(n){const e=o.computed(()=>({...n.width?{maxWidth:`${Vi(Number(n.width))}rem`}:null}));return(t,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(t.$style.root),style:o.normalizeStyle(e.value)},[o.renderSlot(t.$slots,"default")],6))}}),[["__cssModules",{$style:{root:"Container__root_dbd63"}}]]),q0={active:"TransitionSlideRight__active_9b5da","enter-to":"TransitionSlideRight__enter-to_bb3b3","enter-from":"TransitionSlideRight__enter-from_ff31d","leave-from":"TransitionSlideRight__leave-from_d6ba6","leave-to":"TransitionSlideRight__leave-to_32566"},G0={};function K0(n,e){return o.openBlock(),o.createBlock(o.Transition,{name:"slide-right",enterActiveClass:n.$style.active,leaveActiveClass:n.$style.active,enterToClass:n.$style["enter-to"],enterFromClass:n.$style["enter-from"],leaveToClass:n.$style["leave-to"],leaveFromClass:n.$style["leave-from"],appear:""},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},8,["enterActiveClass","leaveActiveClass","enterToClass","enterFromClass","leaveToClass","leaveFromClass"])}const X0=re(G0,[["render",K0],["__cssModules",{$style:q0}]]),Q0={active:"TransitionSlideDown__active_9cd47","enter-to":"TransitionSlideDown__enter-to_291c9","enter-from":"TransitionSlideDown__enter-from_1d067","leave-from":"TransitionSlideDown__leave-from_7c0c5","leave-to":"TransitionSlideDown__leave-to_922c2"},Z0={};function J0(n,e){return o.openBlock(),o.createBlock(o.Transition,{name:"slide-down",enterActiveClass:n.$style.active,leaveActiveClass:n.$style.active,enterToClass:n.$style["enter-to"],enterFromClass:n.$style["enter-from"],leaveToClass:n.$style["leave-to"],leaveFromClass:n.$style["leave-from"],appear:""},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},8,["enterActiveClass","leaveActiveClass","enterToClass","enterFromClass","leaveToClass","leaveFromClass"])}const ek=re(Z0,[["render",J0],["__cssModules",{$style:Q0}]]),tk=re(o.defineComponent({__name:"ToastItem",props:{toast:{}},setup(n){const e=o.computed(()=>n.toast.view??"base"),t=o.computed(()=>n.toast.fontWeight??"regular"),r=o.computed(()=>{if(t.value==="regular")switch(e.value){case"danger":return"outline-warning";default:return"outline-check"}switch(e.value){case"danger":return"filled-warning";default:return"filled-success"}}),a=o.computed(()=>{switch(e.value){case"primary":return"foreground-interactive-button-base-primary";case"base":return"foreground-interactive-button-success-primary";case"danger":return"foreground-interactive-button-critical-primary";default:return"foreground-interactive-button-base-primary"}}),s=o.computed(()=>{switch(e.value){case"primary":return"foreground-interactive-button-base-primary";case"base":return"foreground-interactive-button-success-primary";case"danger":return"foreground-interactive-button-critical-primary";default:return"foreground-interactive-button-base-primary"}});return(i,l)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([i.$style.root,i.$style[`view_${e.value}`]]),onClick:l[0]||(l[0]=c=>i.$emit("click"))},[o.createVNode(o.unref($e),{size:18,name:r.value,color:s.value},null,8,["name","color"]),o.createVNode(o.unref(me),{class:o.normalizeClass(i.$style.title),size:"subhead",color:a.value,align:"left"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(i.toast.title),1)]),_:1},8,["class","color"]),o.createVNode(o.unref($e),{size:18,name:"outline-cross",color:s.value},null,8,["color"])],2))}}),[["__cssModules",{$style:{root:"ToastItem__root_28b92",view_base:"ToastItem__view_base_9bdf3",view_danger:"ToastItem__view_danger_a3871",view_primary:"ToastItem__view_primary_4e69c",title:"ToastItem__title_044bf"}}]]),wh=Symbol("ToasterService"),_h=()=>o.inject(wh,{show:()=>{},showError:()=>{}}),Ji=5e3,nk=()=>{const n=o.ref([]),e=o.ref({});function t(u,h=Ji){e.value[u]=setTimeout(()=>{s(u),clearTimeout(e.value[u])},h)}function r(){Object.keys(e.value).forEach((u,h)=>{e.value[u]=setTimeout(()=>{s(+u),clearTimeout(e.value[u])},Ji+h*300)})}function a(){Object.keys(e.value).forEach(u=>{clearTimeout(e.value[u])})}function s(u){n.value=n.value.filter(h=>h.id!==u)}function i(u){const h=n.value[0]?n.value[0].id+1:1,p={...u,title:u.title,id:h};n.value.length===3&&n.value.pop(),n.value.unshift(p),t(h)}function l(u){clearTimeout(e.value[u]),t(u)}function c(u){i({title:u,view:"base"})}function d(u="Что-то пошло не так"){i({title:u,view:"danger"})}return{list:n,pauseTimeouts:a,restartTimeouts:r,remove:s,show:i,refresh:l,showError:d,showInfo:c}},ok=["id"],rk=re(o.defineComponent({__name:"ToasterProvider",setup(n){let e;const t=nk(),r=o.ref(),a=o.ref([]),s=o.ref(!1),i=o.ref(I()),l=o.ref(I()),c=o.ref(I()),d=o.ref(I());function u(b){const D=document.getElementById(`${b}`);if(!D)return;const Y=getComputedStyle(D).transform,K=Y==="none"?"":Y;D.style.transformOrigin="50% 50%",D.animate([{transform:`${K} scale(1)`},{transform:`${K} scale(1.05)`,offset:.3},{transform:`${K} scale(1)`}],{duration:300,easing:"cubic-bezier(0.22, 1, 0.36, 1)"})}function h(b){return typeof b=="string"?{title:b,view:"base",fontWeight:"regular"}:b}function p(b){return typeof b=="string"?{title:b,view:"danger",fontWeight:"regular"}:b}function m(b){const D=h(b),Y=t.list.value[0];if(Y&&Y.title===D.title&&Y.view===D.view){u(Y.id),s.value||t.refresh(Y.id);return}t.show(D)}function f(b){const D=p(b),Y=t.list.value[0];if(Y&&Y.title===D.title&&Y.view===D.view){u(Y.id),s.value||t.refresh(Y.id);return}t.showError(b)}o.provide(wh,{show:m,showError:f});function g(b){const D=O(b);return{toaster:{transform:i.value[D]},body:{transform:l.value[D]},left:{transform:c.value[D]},right:{transform:d.value[D]}}}function x(b,D){(D!=="main"||i.value.main.length)&&(i.value[D]=b.mainTranslate),l.value[D]=b.scale,c.value[D]=b.leftTranslate,d.value[D]=b.rightTranslate}function E(){let D=0,Y=0;a.value.sort(P).forEach((K,w)=>{const k=O(w),_=v(`${D}px`);x(_,k),D+=K.clientHeight+12,Y=Math.max(Y,K.clientWidth)}),r.value.style.height=`${D}px`,r.value.style.width=`${Y}px`}function C(){o.nextTick(()=>{const[b,D,Y]=a.value.sort(P),K=v("0");if(x(K,"main"),D){const w=M({mainElement:b,element:D,translateY:"-15%",index:1});x(w,"second")}if(Y){const w=M({mainElement:b,element:Y,translateY:"-30%",index:2});x(w,"third"),o.nextTick(()=>{var _;const k=(_=r.value)==null?void 0:_.querySelector(".toaster-leave-active");if(k){const A=M({mainElement:b,element:k,translateY:"45%",index:3});k.setAttribute("style",`transform: ${A.mainTranslate};`),k.children[1].setAttribute("style",`transform: ${A.scale};`),k.children[0].setAttribute("style",`transform: ${A.leftTranslate};`),k.children[2].setAttribute("style",`transform: ${A.rightTranslate};`),k.children[4].setAttribute("style",`transform: ${A.scale};`),k.children[3].setAttribute("style",`transform: ${A.leftTranslate};`),k.children[5].setAttribute("style",`transform: ${A.rightTranslate};`)}})}})}function T(b){s.value&&(t==null||t.remove(b),E())}function F(){!s.value&&(t!=null&&t.list.value)&&t.list.value.length>1?(s.value=!0,t==null||t.pauseTimeouts(),E(),e=setTimeout(()=>{s.value=!1,C(),r.value.style.height="auto",r.value.style.width="auto",t==null||t.restartTimeouts(),clearTimeout(e)},Ji)):t!=null&&t.list.value[0]&&!s.value&&(t==null||t.remove(t==null?void 0:t.list.value[0].id))}o.watch(t==null?void 0:t.list,()=>{s.value?E():C()},{deep:!0});function I(){return{main:"",second:"",third:""}}function O(b){switch(b){case 0:return"main";case 1:return"second";default:return"third"}}function P(b,D){return Number(D.id)-Number(b.id)}function M({mainElement:b,element:D,translateY:Y,index:K}){const w=D.getBoundingClientRect(),k=b.getBoundingClientRect(),_=k.height/w.height,A=(k.width-10*K)/w.width,N=(w.width-A*w.width)/2;return{mainTranslate:`translateY(${Y}) translateX(-50%)`,scale:`scale(${A}, ${_})`,leftTranslate:`translateX(${N-16}px)`,rightTranslate:`translateX(${-N+16}px)`}}function v(b){return{mainTranslate:`translateY(${b}) translateX(-50%)`,scale:"scale(1, 1)",leftTranslate:"translateX(-16px)",rightTranslate:"translateX(16px)"}}return(b,D)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",{ref_key:"rootRef",ref:r,class:o.normalizeClass([b.$style.root,s.value&&b.$style["is-expand"]]),onClick:F},[o.createVNode(o.TransitionGroup,{tag:"div",enterFromClass:b.$style["toaster-enter-from"],enterToClass:b.$style["toaster-enter-to"],enterActiveClass:b.$style["toaster-enter-active"],leaveFromClass:b.$style["toaster-leave-from"],leaveToClass:b.$style["toaster-leave-to"],leaveActiveClass:b.$style["toaster-leave-active"]},{default:o.withCtx(()=>{var Y;return[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList((Y=o.unref(t))==null?void 0:Y.list.value,(K,w)=>(o.openBlock(),o.createElementBlock("div",{key:K.id,id:`${K.id}`,ref_for:!0,ref_key:"toastersRef",ref:a,class:o.normalizeClass([b.$style.toaster,b.$style[`view_${K.view??"success"}`],s.value?"is-expand":""]),style:o.normalizeStyle(g(w).toaster)},[o.createElementVNode("div",{class:o.normalizeClass(b.$style.left),style:o.normalizeStyle(g(w).left)},null,6),o.createElementVNode("div",{class:o.normalizeClass(b.$style.body),style:o.normalizeStyle(g(w).body)},[o.createVNode(tk,{toast:K,onClick:()=>T(K.id)},null,8,["toast","onClick"])],6),o.createElementVNode("div",{class:o.normalizeClass(b.$style.right),style:o.normalizeStyle(g(w).right)},null,6),o.createElementVNode("div",{class:o.normalizeClass([b.$style.left,b.$style.shadow]),style:o.normalizeStyle(g(w).left)},null,6),o.createElementVNode("div",{class:o.normalizeClass([b.$style.body,b.$style.shadow]),style:o.normalizeStyle(g(w).body)},null,6),o.createElementVNode("div",{class:o.normalizeClass([b.$style.right,b.$style.shadow]),style:o.normalizeStyle(g(w).right)},null,6)],14,ok))),128))]}),_:1},8,["enterFromClass","enterToClass","enterActiveClass","leaveFromClass","leaveToClass","leaveActiveClass"])],2),o.renderSlot(b.$slots,"default")],64))}}),[["__cssModules",{$style:{"toaster-enter-from":"Toaster__toaster-enter-from_17da7","toaster-enter":"Toaster__toaster-enter_e581f","toaster-enter-to":"Toaster__toaster-enter-to_16982","toaster-enter-active":"Toaster__toaster-enter-active_1379d","toaster-leave-active":"Toaster__toaster-leave-active_67be8","toaster-leave-from":"Toaster__toaster-leave-from_3a609","toaster-leave":"Toaster__toaster-leave_73bfe","toaster-leave-to":"Toaster__toaster-leave-to_40e38",root:"Toaster__root_0fa74","is-expand":"Toaster__is-expand_fa3c7",toaster:"Toaster__toaster_4393e",body:"Toaster__body_a5423",view_base:"Toaster__view_base_dd200",left:"Toaster__left_8ebe2",right:"Toaster__right_54317",view_danger:"Toaster__view_danger_3f3ca",view_primary:"Toaster__view_primary_26e5e",shadow:"Toaster__shadow_be9a8"}}]]),Ch=6048e5,ak=864e5,sk=6e4,Eh=36e5,ik=1e3,Sh=Symbol.for("constructDateFrom");function Ue(n,e){return typeof n=="function"?n(e):n&&typeof n=="object"&&Sh in n?n[Sh](e):n instanceof Date?new n.constructor(e):new Date(e)}function we(n,e){return Ue(e||n,n)}function Xt(n,e,t){const r=we(n,t==null?void 0:t.in);return isNaN(e)?Ue((t==null?void 0:t.in)||n,NaN):(e&&r.setDate(r.getDate()+e),r)}function rn(n,e,t){const r=we(n,t==null?void 0:t.in);if(isNaN(e))return Ue(n,NaN);if(!e)return r;const a=r.getDate(),s=Ue(n,r.getTime());s.setMonth(r.getMonth()+e+1,0);const i=s.getDate();return a>=i?s:(r.setFullYear(s.getFullYear(),s.getMonth(),a),r)}function xh(n,e,t){const{years:r=0,months:a=0,weeks:s=0,days:i=0,hours:l=0,minutes:c=0,seconds:d=0}=e,u=we(n,t==null?void 0:t.in),h=a||r?rn(u,a+r*12):u,p=i||s?Xt(h,i+s*7):h,m=c+l*60,g=(d+m*60)*1e3;return Ue(n,+p+g)}function lk(n,e,t){return Ue(n,+we(n)+e)}function ck(n,e,t){return lk(n,e*Eh)}let dk={};function Bo(){return dk}function an(n,e){var l,c,d,u;const t=Bo(),r=(e==null?void 0:e.weekStartsOn)??((c=(l=e==null?void 0:e.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??t.weekStartsOn??((u=(d=t.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??0,a=we(n,e==null?void 0:e.in),s=a.getDay(),i=(s<r?7:0)+s-r;return a.setDate(a.getDate()-i),a.setHours(0,0,0,0),a}function er(n,e){return an(n,{...e,weekStartsOn:1})}function Bh(n,e){const t=we(n,e==null?void 0:e.in),r=t.getFullYear(),a=Ue(t,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const s=er(a),i=Ue(t,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const l=er(i);return t.getTime()>=s.getTime()?r+1:t.getTime()>=l.getTime()?r:r-1}function ns(n){const e=we(n),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+n-+t}function Rr(n,...e){const t=Ue.bind(null,e.find(r=>typeof r=="object"));return e.map(t)}function Th(n,e){const t=we(n,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}function $h(n,e,t){const[r,a]=Rr(t==null?void 0:t.in,n,e),s=Th(r),i=Th(a),l=+s-ns(s),c=+i-ns(i);return Math.round((l-c)/ak)}function uk(n,e){const t=Bh(n,e),r=Ue(n,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),er(r)}function hk(n,e,t){return rn(n,e*3,t)}function el(n,e,t){return rn(n,e*12,t)}function Mh(n,e){const t=+we(n)-+we(e);return t<0?-1:t>0?1:t}function Dh(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function Vr(n){return!(!Dh(n)&&typeof n!="number"||isNaN(+we(n)))}function Oh(n,e){const t=we(n,e==null?void 0:e.in);return Math.trunc(t.getMonth()/3)+1}function pk(n,e,t){const[r,a]=Rr(t==null?void 0:t.in,n,e);return r.getFullYear()-a.getFullYear()}function fk(n,e,t){const[r,a]=Rr(t==null?void 0:t.in,n,e),s=Mh(r,a),i=Math.abs(pk(r,a));r.setFullYear(1584),a.setFullYear(1584);const l=Mh(r,a)===-s,c=s*(i-+l);return c===0?0:c}function Ah(n,e){const[t,r]=Rr(n,e.start,e.end);return{start:t,end:r}}function Ih(n,e){const{start:t,end:r}=Ah(e==null?void 0:e.in,n);let a=+t>+r;const s=a?+t:+r,i=a?r:t;i.setHours(0,0,0,0);let l=1;const c=[];for(;+i<=s;)c.push(Ue(t,i)),i.setDate(i.getDate()+l),i.setHours(0,0,0,0);return a?c.reverse():c}function To(n,e){const t=we(n,e==null?void 0:e.in),r=t.getMonth(),a=r-r%3;return t.setMonth(a,1),t.setHours(0,0,0,0),t}function mk(n,e){const{start:t,end:r}=Ah(e==null?void 0:e.in,n);let a=+t>+r;const s=a?+To(t):+To(r);let i=To(a?r:t),l=1;const c=[];for(;+i<=s;)c.push(Ue(t,i)),i=hk(i,l);return a?c.reverse():c}function gk(n,e){const t=we(n,e==null?void 0:e.in);return t.setDate(1),t.setHours(0,0,0,0),t}function Nh(n,e){const t=we(n,e==null?void 0:e.in),r=t.getFullYear();return t.setFullYear(r+1,0,0),t.setHours(23,59,59,999),t}function Hr(n,e){const t=we(n,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}function Ph(n,e){var l,c,d,u;const t=Bo(),r=(e==null?void 0:e.weekStartsOn)??((c=(l=e==null?void 0:e.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??t.weekStartsOn??((u=(d=t.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??0,a=we(n,e==null?void 0:e.in),s=a.getDay(),i=(s<r?-7:0)+6-(s-r);return a.setDate(a.getDate()+i),a.setHours(23,59,59,999),a}function Lh(n,e){const t=we(n,e==null?void 0:e.in),r=t.getMonth(),a=r-r%3+3;return t.setMonth(a,0),t.setHours(23,59,59,999),t}const yk={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"}},bk=(n,e,t)=>{let r;const a=yk[n];return typeof a=="string"?r=a:e===1?r=a.one:r=a.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+r:r+" ago":r};function tl(n){return(e={})=>{const t=e.width?String(e.width):n.defaultWidth;return n.formats[t]||n.formats[n.defaultWidth]}}const kk={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},vk={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},wk={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},_k={date:tl({formats:kk,defaultWidth:"full"}),time:tl({formats:vk,defaultWidth:"full"}),dateTime:tl({formats:wk,defaultWidth:"full"})},Ck={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ek=(n,e,t,r)=>Ck[n];function jr(n){return(e,t)=>{const r=t!=null&&t.context?String(t.context):"standalone";let a;if(r==="formatting"&&n.formattingValues){const i=n.defaultFormattingWidth||n.defaultWidth,l=t!=null&&t.width?String(t.width):i;a=n.formattingValues[l]||n.formattingValues[i]}else{const i=n.defaultWidth,l=t!=null&&t.width?String(t.width):n.defaultWidth;a=n.values[l]||n.values[i]}const s=n.argumentCallback?n.argumentCallback(e):e;return a[s]}}const Sk={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},xk={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Bk={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"]},Tk={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"]},$k={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"}},Mk={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"}},Dk={ordinalNumber:(n,e)=>{const t=Number(n),r=t%100;if(r>20||r<10)switch(r%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},era:jr({values:Sk,defaultWidth:"wide"}),quarter:jr({values:xk,defaultWidth:"wide",argumentCallback:n=>n-1}),month:jr({values:Bk,defaultWidth:"wide"}),day:jr({values:Tk,defaultWidth:"wide"}),dayPeriod:jr({values:$k,defaultWidth:"wide",formattingValues:Mk,defaultFormattingWidth:"wide"})};function Yr(n){return(e,t={})=>{const r=t.width,a=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],s=e.match(a);if(!s)return null;const i=s[0],l=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],c=Array.isArray(l)?Ak(l,h=>h.test(i)):Ok(l,h=>h.test(i));let d;d=n.valueCallback?n.valueCallback(c):c,d=t.valueCallback?t.valueCallback(d):d;const u=e.slice(i.length);return{value:d,rest:u}}}function Ok(n,e){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&e(n[t]))return t}function Ak(n,e){for(let t=0;t<n.length;t++)if(e(n[t]))return t}function Ik(n){return(e,t={})=>{const r=e.match(n.matchPattern);if(!r)return null;const a=r[0],s=e.match(n.parsePattern);if(!s)return null;let i=n.valueCallback?n.valueCallback(s[0]):s[0];i=t.valueCallback?t.valueCallback(i):i;const l=e.slice(a.length);return{value:i,rest:l}}}const Nk=/^(\d+)(th|st|nd|rd)?/i,Pk=/\d+/i,Lk={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},zk={any:[/^b/i,/^(a|c)/i]},Fk={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Rk={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},Hk={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]},jk={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},Yk={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]},Uk={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},Wk={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}},qk={ordinalNumber:Ik({matchPattern:Nk,parsePattern:Pk,valueCallback:n=>parseInt(n,10)}),era:Yr({matchPatterns:Lk,defaultMatchWidth:"wide",parsePatterns:zk,defaultParseWidth:"any"}),quarter:Yr({matchPatterns:Fk,defaultMatchWidth:"wide",parsePatterns:Rk,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Yr({matchPatterns:Vk,defaultMatchWidth:"wide",parsePatterns:Hk,defaultParseWidth:"any"}),day:Yr({matchPatterns:jk,defaultMatchWidth:"wide",parsePatterns:Yk,defaultParseWidth:"any"}),dayPeriod:Yr({matchPatterns:Uk,defaultMatchWidth:"any",parsePatterns:Wk,defaultParseWidth:"any"})},zh={code:"en-US",formatDistance:bk,formatLong:_k,formatRelative:Ek,localize:Dk,match:qk,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Gk(n,e){const t=we(n,e==null?void 0:e.in);return $h(t,Hr(t))+1}function nl(n,e){const t=we(n,e==null?void 0:e.in),r=+er(t)-+uk(t);return Math.round(r/Ch)+1}function ol(n,e){var u,h,p,m;const t=we(n,e==null?void 0:e.in),r=t.getFullYear(),a=Bo(),s=(e==null?void 0:e.firstWeekContainsDate)??((h=(u=e==null?void 0:e.locale)==null?void 0:u.options)==null?void 0:h.firstWeekContainsDate)??a.firstWeekContainsDate??((m=(p=a.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)??1,i=Ue((e==null?void 0:e.in)||n,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const l=an(i,e),c=Ue((e==null?void 0:e.in)||n,0);c.setFullYear(r,0,s),c.setHours(0,0,0,0);const d=an(c,e);return+t>=+l?r+1:+t>=+d?r:r-1}function Kk(n,e){var l,c,d,u;const t=Bo(),r=(e==null?void 0:e.firstWeekContainsDate)??((c=(l=e==null?void 0:e.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??t.firstWeekContainsDate??((u=(d=t.locale)==null?void 0:d.options)==null?void 0:u.firstWeekContainsDate)??1,a=ol(n,e),s=Ue((e==null?void 0:e.in)||n,0);return s.setFullYear(a,0,r),s.setHours(0,0,0,0),an(s,e)}function rl(n,e){const t=we(n,e==null?void 0:e.in),r=+an(t,e)-+Kk(t,e);return Math.round(r/Ch)+1}function We(n,e){const t=n<0?"-":"",r=Math.abs(n).toString().padStart(e,"0");return t+r}const no={y(n,e){const t=n.getFullYear(),r=t>0?t:1-t;return We(e==="yy"?r%100:r,e.length)},M(n,e){const t=n.getMonth();return e==="M"?String(t+1):We(t+1,2)},d(n,e){return We(n.getDate(),e.length)},a(n,e){const t=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(n,e){return We(n.getHours()%12||12,e.length)},H(n,e){return We(n.getHours(),e.length)},m(n,e){return We(n.getMinutes(),e.length)},s(n,e){return We(n.getSeconds(),e.length)},S(n,e){const t=e.length,r=n.getMilliseconds(),a=Math.trunc(r*Math.pow(10,t-3));return We(a,e.length)}},tr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Fh={G:function(n,e,t){const r=n.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(r,{width:"abbreviated"});case"GGGGG":return t.era(r,{width:"narrow"});case"GGGG":default:return t.era(r,{width:"wide"})}},y:function(n,e,t){if(e==="yo"){const r=n.getFullYear(),a=r>0?r:1-r;return t.ordinalNumber(a,{unit:"year"})}return no.y(n,e)},Y:function(n,e,t,r){const a=ol(n,r),s=a>0?a:1-a;if(e==="YY"){const i=s%100;return We(i,2)}return e==="Yo"?t.ordinalNumber(s,{unit:"year"}):We(s,e.length)},R:function(n,e){const t=Bh(n);return We(t,e.length)},u:function(n,e){const t=n.getFullYear();return We(t,e.length)},Q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return We(r,2);case"Qo":return t.ordinalNumber(r,{unit:"quarter"});case"QQQ":return t.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return We(r,2);case"qo":return t.ordinalNumber(r,{unit:"quarter"});case"qqq":return t.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,e,t){const r=n.getMonth();switch(e){case"M":case"MM":return no.M(n,e);case"Mo":return t.ordinalNumber(r+1,{unit:"month"});case"MMM":return t.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(r,{width:"wide",context:"formatting"})}},L:function(n,e,t){const r=n.getMonth();switch(e){case"L":return String(r+1);case"LL":return We(r+1,2);case"Lo":return t.ordinalNumber(r+1,{unit:"month"});case"LLL":return t.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(r,{width:"wide",context:"standalone"})}},w:function(n,e,t,r){const a=rl(n,r);return e==="wo"?t.ordinalNumber(a,{unit:"week"}):We(a,e.length)},I:function(n,e,t){const r=nl(n);return e==="Io"?t.ordinalNumber(r,{unit:"week"}):We(r,e.length)},d:function(n,e,t){return e==="do"?t.ordinalNumber(n.getDate(),{unit:"date"}):no.d(n,e)},D:function(n,e,t){const r=Gk(n);return e==="Do"?t.ordinalNumber(r,{unit:"dayOfYear"}):We(r,e.length)},E:function(n,e,t){const r=n.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(r,{width:"short",context:"formatting"});case"EEEE":default:return t.day(r,{width:"wide",context:"formatting"})}},e:function(n,e,t,r){const a=n.getDay(),s=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return We(s,2);case"eo":return t.ordinalNumber(s,{unit:"day"});case"eee":return t.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(a,{width:"short",context:"formatting"});case"eeee":default:return t.day(a,{width:"wide",context:"formatting"})}},c:function(n,e,t,r){const a=n.getDay(),s=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return We(s,e.length);case"co":return t.ordinalNumber(s,{unit:"day"});case"ccc":return t.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(a,{width:"narrow",context:"standalone"});case"cccccc":return t.day(a,{width:"short",context:"standalone"});case"cccc":default:return t.day(a,{width:"wide",context:"standalone"})}},i:function(n,e,t){const r=n.getDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return We(a,e.length);case"io":return t.ordinalNumber(a,{unit:"day"});case"iii":return t.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(r,{width:"short",context:"formatting"});case"iiii":default:return t.day(r,{width:"wide",context:"formatting"})}},a:function(n,e,t){const a=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(n,e,t){const r=n.getHours();let a;switch(r===12?a=tr.noon:r===0?a=tr.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(n,e,t){const r=n.getHours();let a;switch(r>=17?a=tr.evening:r>=12?a=tr.afternoon:r>=4?a=tr.morning:a=tr.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(n,e,t){if(e==="ho"){let r=n.getHours()%12;return r===0&&(r=12),t.ordinalNumber(r,{unit:"hour"})}return no.h(n,e)},H:function(n,e,t){return e==="Ho"?t.ordinalNumber(n.getHours(),{unit:"hour"}):no.H(n,e)},K:function(n,e,t){const r=n.getHours()%12;return e==="Ko"?t.ordinalNumber(r,{unit:"hour"}):We(r,e.length)},k:function(n,e,t){let r=n.getHours();return r===0&&(r=24),e==="ko"?t.ordinalNumber(r,{unit:"hour"}):We(r,e.length)},m:function(n,e,t){return e==="mo"?t.ordinalNumber(n.getMinutes(),{unit:"minute"}):no.m(n,e)},s:function(n,e,t){return e==="so"?t.ordinalNumber(n.getSeconds(),{unit:"second"}):no.s(n,e)},S:function(n,e){return no.S(n,e)},X:function(n,e,t){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return Vh(r);case"XXXX":case"XX":return $o(r);case"XXXXX":case"XXX":default:return $o(r,":")}},x:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"x":return Vh(r);case"xxxx":case"xx":return $o(r);case"xxxxx":case"xxx":default:return $o(r,":")}},O:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Rh(r,":");case"OOOO":default:return"GMT"+$o(r,":")}},z:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Rh(r,":");case"zzzz":default:return"GMT"+$o(r,":")}},t:function(n,e,t){const r=Math.trunc(+n/1e3);return We(r,e.length)},T:function(n,e,t){return We(+n,e.length)}};function Rh(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),a=Math.trunc(r/60),s=r%60;return s===0?t+String(a):t+String(a)+e+We(s,2)}function Vh(n,e){return n%60===0?(n>0?"-":"+")+We(Math.abs(n)/60,2):$o(n,e)}function $o(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),a=We(Math.trunc(r/60),2),s=We(r%60,2);return t+a+e+s}const Hh=(n,e)=>{switch(n){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},jh=(n,e)=>{switch(n){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},al={p:jh,P:(n,e)=>{const t=n.match(/(P+)(p+)?/)||[],r=t[1],a=t[2];if(!a)return Hh(n,e);let s;switch(r){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",Hh(r,e)).replace("{{time}}",jh(a,e))}},Xk=/^D+$/,Qk=/^Y+$/,Zk=["D","DD","YY","YYYY"];function Yh(n){return Xk.test(n)}function Uh(n){return Qk.test(n)}function sl(n,e,t){const r=Jk(n,e,t);if(console.warn(r),Zk.includes(n))throw new RangeError(r)}function Jk(n,e,t){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${e}\`) for formatting ${r} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const ev=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tv=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,nv=/^'([^]*?)'?$/,ov=/''/g,rv=/[a-zA-Z]/;function bn(n,e,t){var u,h,p,m,f,g,x,E;const r=Bo(),a=(t==null?void 0:t.locale)??r.locale??zh,s=(t==null?void 0:t.firstWeekContainsDate)??((h=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:h.firstWeekContainsDate)??r.firstWeekContainsDate??((m=(p=r.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)??1,i=(t==null?void 0:t.weekStartsOn)??((g=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((E=(x=r.locale)==null?void 0:x.options)==null?void 0:E.weekStartsOn)??0,l=we(n,t==null?void 0:t.in);if(!Vr(l))throw new RangeError("Invalid time value");let c=e.match(tv).map(C=>{const T=C[0];if(T==="p"||T==="P"){const F=al[T];return F(C,a.formatLong)}return C}).join("").match(ev).map(C=>{if(C==="''")return{isToken:!1,value:"'"};const T=C[0];if(T==="'")return{isToken:!1,value:av(C)};if(Fh[T])return{isToken:!0,value:C};if(T.match(rv))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");return{isToken:!1,value:C}});a.localize.preprocessor&&(c=a.localize.preprocessor(l,c));const d={firstWeekContainsDate:s,weekStartsOn:i,locale:a};return c.map(C=>{if(!C.isToken)return C.value;const T=C.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&Uh(T)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&Yh(T))&&sl(T,e,String(n));const F=Fh[T[0]];return F(l,T,a.localize,d)}).join("")}function av(n){const e=n.match(nv);return e?e[1].replace(ov,"'"):n}function sv(n,e){return we(n,e==null?void 0:e.in).getDay()}function iv(n,e){const t=we(n,e==null?void 0:e.in),r=t.getFullYear(),a=t.getMonth(),s=Ue(t,0);return s.setFullYear(r,a+1,0),s.setHours(0,0,0,0),s.getDate()}function lv(){return Object.assign({},Bo())}function Ln(n,e){return we(n,e==null?void 0:e.in).getHours()}function cv(n,e){const t=we(n,e==null?void 0:e.in).getDay();return t===0?7:t}function oo(n,e){return we(n,e==null?void 0:e.in).getMinutes()}function Pe(n,e){return we(n,e==null?void 0:e.in).getMonth()}function nr(n){return we(n).getSeconds()}function Te(n,e){return we(n,e==null?void 0:e.in).getFullYear()}function Mo(n,e){return+we(n)>+we(e)}function or(n,e){return+we(n)<+we(e)}function rr(n,e){return+we(n)==+we(e)}function dv(n,e){const t=uv(e)?new e(0):Ue(e,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),t}function uv(n){var e;return typeof n=="function"&&((e=n.prototype)==null?void 0:e.constructor)===n}const hv=10;class Wh{constructor(){pe(this,"subPriority",0)}validate(e,t){return!0}}class pv extends Wh{constructor(e,t,r,a,s){super(),this.value=e,this.validateValue=t,this.setValue=r,this.priority=a,s&&(this.subPriority=s)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,r){return this.setValue(e,t,this.value,r)}}class fv extends Wh{constructor(t,r){super();pe(this,"priority",hv);pe(this,"subPriority",-1);this.context=t||(a=>Ue(r,a))}set(t,r){return r.timestampIsSet?t:Ue(t,dv(t,this.context))}}class je{run(e,t,r,a){const s=this.parse(e,t,r,a);return s?{setter:new pv(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(e,t,r){return!0}}class mv extends je{constructor(){super(...arguments);pe(this,"priority",140);pe(this,"incompatibleTokens",["R","u","t","T"])}parse(t,r,a){switch(r){case"G":case"GG":case"GGG":return a.era(t,{width:"abbreviated"})||a.era(t,{width:"narrow"});case"GGGGG":return a.era(t,{width:"narrow"});case"GGGG":default:return a.era(t,{width:"wide"})||a.era(t,{width:"abbreviated"})||a.era(t,{width:"narrow"})}}set(t,r,a){return r.era=a,t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}}const lt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},kn={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function ct(n,e){return n&&{value:e(n.value),rest:n.rest}}function et(n,e){const t=e.match(n);return t?{value:parseInt(t[0],10),rest:e.slice(t[0].length)}:null}function vn(n,e){const t=e.match(n);if(!t)return null;if(t[0]==="Z")return{value:0,rest:e.slice(1)};const r=t[1]==="+"?1:-1,a=t[2]?parseInt(t[2],10):0,s=t[3]?parseInt(t[3],10):0,i=t[5]?parseInt(t[5],10):0;return{value:r*(a*Eh+s*sk+i*ik),rest:e.slice(t[0].length)}}function qh(n){return et(lt.anyDigitsSigned,n)}function at(n,e){switch(n){case 1:return et(lt.singleDigit,e);case 2:return et(lt.twoDigits,e);case 3:return et(lt.threeDigits,e);case 4:return et(lt.fourDigits,e);default:return et(new RegExp("^\\d{1,"+n+"}"),e)}}function os(n,e){switch(n){case 1:return et(lt.singleDigitSigned,e);case 2:return et(lt.twoDigitsSigned,e);case 3:return et(lt.threeDigitsSigned,e);case 4:return et(lt.fourDigitsSigned,e);default:return et(new RegExp("^-?\\d{1,"+n+"}"),e)}}function il(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Gh(n,e){const t=e>0,r=t?e:1-e;let a;if(r<=50)a=n||100;else{const s=r+50,i=Math.trunc(s/100)*100,l=n>=s%100;a=n+i-(l?100:0)}return t?a:1-a}function Kh(n){return n%400===0||n%4===0&&n%100!==0}class gv extends je{constructor(){super(...arguments);pe(this,"priority",130);pe(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,r,a){const s=i=>({year:i,isTwoDigitYear:r==="yy"});switch(r){case"y":return ct(at(4,t),s);case"yo":return ct(a.ordinalNumber(t,{unit:"year"}),s);default:return ct(at(r.length,t),s)}}validate(t,r){return r.isTwoDigitYear||r.year>0}set(t,r,a){const s=t.getFullYear();if(a.isTwoDigitYear){const l=Gh(a.year,s);return t.setFullYear(l,0,1),t.setHours(0,0,0,0),t}const i=!("era"in r)||r.era===1?a.year:1-a.year;return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}class yv extends je{constructor(){super(...arguments);pe(this,"priority",130);pe(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,r,a){const s=i=>({year:i,isTwoDigitYear:r==="YY"});switch(r){case"Y":return ct(at(4,t),s);case"Yo":return ct(a.ordinalNumber(t,{unit:"year"}),s);default:return ct(at(r.length,t),s)}}validate(t,r){return r.isTwoDigitYear||r.year>0}set(t,r,a,s){const i=ol(t,s);if(a.isTwoDigitYear){const c=Gh(a.year,i);return t.setFullYear(c,0,s.firstWeekContainsDate),t.setHours(0,0,0,0),an(t,s)}const l=!("era"in r)||r.era===1?a.year:1-a.year;return t.setFullYear(l,0,s.firstWeekContainsDate),t.setHours(0,0,0,0),an(t,s)}}class bv extends je{constructor(){super(...arguments);pe(this,"priority",130);pe(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,r){return os(r==="R"?4:r.length,t)}set(t,r,a){const s=Ue(t,0);return s.setFullYear(a,0,4),s.setHours(0,0,0,0),er(s)}}class kv extends je{constructor(){super(...arguments);pe(this,"priority",130);pe(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,r){return os(r==="u"?4:r.length,t)}set(t,r,a){return t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}}class vv extends je{constructor(){super(...arguments);pe(this,"priority",120);pe(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,r,a){switch(r){case"Q":case"QQ":return at(r.length,t);case"Qo":return a.ordinalNumber(t,{unit:"quarter"});case"QQQ":return a.quarter(t,{width:"abbreviated",context:"formatting"})||a.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return a.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(t,{width:"wide",context:"formatting"})||a.quarter(t,{width:"abbreviated",context:"formatting"})||a.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,r){return r>=1&&r<=4}set(t,r,a){return t.setMonth((a-1)*3,1),t.setHours(0,0,0,0),t}}class wv extends je{constructor(){super(...arguments);pe(this,"priority",120);pe(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,r,a){switch(r){case"q":case"qq":return at(r.length,t);case"qo":return a.ordinalNumber(t,{unit:"quarter"});case"qqq":return a.quarter(t,{width:"abbreviated",context:"standalone"})||a.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return a.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(t,{width:"wide",context:"standalone"})||a.quarter(t,{width:"abbreviated",context:"standalone"})||a.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,r){return r>=1&&r<=4}set(t,r,a){return t.setMonth((a-1)*3,1),t.setHours(0,0,0,0),t}}class _v extends je{constructor(){super(...arguments);pe(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);pe(this,"priority",110)}parse(t,r,a){const s=i=>i-1;switch(r){case"M":return ct(et(lt.month,t),s);case"MM":return ct(at(2,t),s);case"Mo":return ct(a.ordinalNumber(t,{unit:"month"}),s);case"MMM":return a.month(t,{width:"abbreviated",context:"formatting"})||a.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return a.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(t,{width:"wide",context:"formatting"})||a.month(t,{width:"abbreviated",context:"formatting"})||a.month(t,{width:"narrow",context:"formatting"})}}validate(t,r){return r>=0&&r<=11}set(t,r,a){return t.setMonth(a,1),t.setHours(0,0,0,0),t}}class Cv extends je{constructor(){super(...arguments);pe(this,"priority",110);pe(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,r,a){const s=i=>i-1;switch(r){case"L":return ct(et(lt.month,t),s);case"LL":return ct(at(2,t),s);case"Lo":return ct(a.ordinalNumber(t,{unit:"month"}),s);case"LLL":return a.month(t,{width:"abbreviated",context:"standalone"})||a.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return a.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(t,{width:"wide",context:"standalone"})||a.month(t,{width:"abbreviated",context:"standalone"})||a.month(t,{width:"narrow",context:"standalone"})}}validate(t,r){return r>=0&&r<=11}set(t,r,a){return t.setMonth(a,1),t.setHours(0,0,0,0),t}}function Ev(n,e,t){const r=we(n,t==null?void 0:t.in),a=rl(r,t)-e;return r.setDate(r.getDate()-a*7),we(r,t==null?void 0:t.in)}class Sv extends je{constructor(){super(...arguments);pe(this,"priority",100);pe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,r,a){switch(r){case"w":return et(lt.week,t);case"wo":return a.ordinalNumber(t,{unit:"week"});default:return at(r.length,t)}}validate(t,r){return r>=1&&r<=53}set(t,r,a,s){return an(Ev(t,a,s),s)}}function xv(n,e,t){const r=we(n,t==null?void 0:t.in),a=nl(r,t)-e;return r.setDate(r.getDate()-a*7),r}class Bv extends je{constructor(){super(...arguments);pe(this,"priority",100);pe(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,r,a){switch(r){case"I":return et(lt.week,t);case"Io":return a.ordinalNumber(t,{unit:"week"});default:return at(r.length,t)}}validate(t,r){return r>=1&&r<=53}set(t,r,a){return er(xv(t,a))}}const Tv=[31,28,31,30,31,30,31,31,30,31,30,31],$v=[31,29,31,30,31,30,31,31,30,31,30,31];class Mv extends je{constructor(){super(...arguments);pe(this,"priority",90);pe(this,"subPriority",1);pe(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,r,a){switch(r){case"d":return et(lt.date,t);case"do":return a.ordinalNumber(t,{unit:"date"});default:return at(r.length,t)}}validate(t,r){const a=t.getFullYear(),s=Kh(a),i=t.getMonth();return s?r>=1&&r<=$v[i]:r>=1&&r<=Tv[i]}set(t,r,a){return t.setDate(a),t.setHours(0,0,0,0),t}}class Dv extends je{constructor(){super(...arguments);pe(this,"priority",90);pe(this,"subpriority",1);pe(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,r,a){switch(r){case"D":case"DD":return et(lt.dayOfYear,t);case"Do":return a.ordinalNumber(t,{unit:"date"});default:return at(r.length,t)}}validate(t,r){const a=t.getFullYear();return Kh(a)?r>=1&&r<=366:r>=1&&r<=365}set(t,r,a){return t.setMonth(0,a),t.setHours(0,0,0,0),t}}function ll(n,e,t){var h,p,m,f;const r=Bo(),a=(t==null?void 0:t.weekStartsOn)??((p=(h=t==null?void 0:t.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??r.weekStartsOn??((f=(m=r.locale)==null?void 0:m.options)==null?void 0:f.weekStartsOn)??0,s=we(n,t==null?void 0:t.in),i=s.getDay(),c=(e%7+7)%7,d=7-a,u=e<0||e>6?e-(i+d)%7:(c+d)%7-(i+d)%7;return Xt(s,u,t)}class Ov extends je{constructor(){super(...arguments);pe(this,"priority",90);pe(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,r,a){switch(r){case"E":case"EE":case"EEE":return a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return a.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return a.day(t,{width:"wide",context:"formatting"})||a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"})}}validate(t,r){return r>=0&&r<=6}set(t,r,a,s){return t=ll(t,a,s),t.setHours(0,0,0,0),t}}class Av extends je{constructor(){super(...arguments);pe(this,"priority",90);pe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,r,a,s){const i=l=>{const c=Math.floor((l-1)/7)*7;return(l+s.weekStartsOn+6)%7+c};switch(r){case"e":case"ee":return ct(at(r.length,t),i);case"eo":return ct(a.ordinalNumber(t,{unit:"day"}),i);case"eee":return a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"eeeee":return a.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return a.day(t,{width:"wide",context:"formatting"})||a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"})}}validate(t,r){return r>=0&&r<=6}set(t,r,a,s){return t=ll(t,a,s),t.setHours(0,0,0,0),t}}class Iv extends je{constructor(){super(...arguments);pe(this,"priority",90);pe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,r,a,s){const i=l=>{const c=Math.floor((l-1)/7)*7;return(l+s.weekStartsOn+6)%7+c};switch(r){case"c":case"cc":return ct(at(r.length,t),i);case"co":return ct(a.ordinalNumber(t,{unit:"day"}),i);case"ccc":return a.day(t,{width:"abbreviated",context:"standalone"})||a.day(t,{width:"short",context:"standalone"})||a.day(t,{width:"narrow",context:"standalone"});case"ccccc":return a.day(t,{width:"narrow",context:"standalone"});case"cccccc":return a.day(t,{width:"short",context:"standalone"})||a.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return a.day(t,{width:"wide",context:"standalone"})||a.day(t,{width:"abbreviated",context:"standalone"})||a.day(t,{width:"short",context:"standalone"})||a.day(t,{width:"narrow",context:"standalone"})}}validate(t,r){return r>=0&&r<=6}set(t,r,a,s){return t=ll(t,a,s),t.setHours(0,0,0,0),t}}function Nv(n,e,t){const r=we(n,t==null?void 0:t.in),a=cv(r,t),s=e-a;return Xt(r,s,t)}class Pv extends je{constructor(){super(...arguments);pe(this,"priority",90);pe(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,r,a){const s=i=>i===0?7:i;switch(r){case"i":case"ii":return at(r.length,t);case"io":return a.ordinalNumber(t,{unit:"day"});case"iii":return ct(a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"}),s);case"iiiii":return ct(a.day(t,{width:"narrow",context:"formatting"}),s);case"iiiiii":return ct(a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"}),s);case"iiii":default:return ct(a.day(t,{width:"wide",context:"formatting"})||a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"}),s)}}validate(t,r){return r>=1&&r<=7}set(t,r,a){return t=Nv(t,a),t.setHours(0,0,0,0),t}}class Lv extends je{constructor(){super(...arguments);pe(this,"priority",80);pe(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(t,r,a){switch(r){case"a":case"aa":case"aaa":return a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return a.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(t,{width:"wide",context:"formatting"})||a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,r,a){return t.setHours(il(a),0,0,0),t}}class zv extends je{constructor(){super(...arguments);pe(this,"priority",80);pe(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(t,r,a){switch(r){case"b":case"bb":case"bbb":return a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return a.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(t,{width:"wide",context:"formatting"})||a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,r,a){return t.setHours(il(a),0,0,0),t}}class Fv extends je{constructor(){super(...arguments);pe(this,"priority",80);pe(this,"incompatibleTokens",["a","b","t","T"])}parse(t,r,a){switch(r){case"B":case"BB":case"BBB":return a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return a.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(t,{width:"wide",context:"formatting"})||a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,r,a){return t.setHours(il(a),0,0,0),t}}class Rv extends je{constructor(){super(...arguments);pe(this,"priority",70);pe(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,r,a){switch(r){case"h":return et(lt.hour12h,t);case"ho":return a.ordinalNumber(t,{unit:"hour"});default:return at(r.length,t)}}validate(t,r){return r>=1&&r<=12}set(t,r,a){const s=t.getHours()>=12;return s&&a<12?t.setHours(a+12,0,0,0):!s&&a===12?t.setHours(0,0,0,0):t.setHours(a,0,0,0),t}}class Vv extends je{constructor(){super(...arguments);pe(this,"priority",70);pe(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,r,a){switch(r){case"H":return et(lt.hour23h,t);case"Ho":return a.ordinalNumber(t,{unit:"hour"});default:return at(r.length,t)}}validate(t,r){return r>=0&&r<=23}set(t,r,a){return t.setHours(a,0,0,0),t}}class Hv extends je{constructor(){super(...arguments);pe(this,"priority",70);pe(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,r,a){switch(r){case"K":return et(lt.hour11h,t);case"Ko":return a.ordinalNumber(t,{unit:"hour"});default:return at(r.length,t)}}validate(t,r){return r>=0&&r<=11}set(t,r,a){return t.getHours()>=12&&a<12?t.setHours(a+12,0,0,0):t.setHours(a,0,0,0),t}}class jv extends je{constructor(){super(...arguments);pe(this,"priority",70);pe(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,r,a){switch(r){case"k":return et(lt.hour24h,t);case"ko":return a.ordinalNumber(t,{unit:"hour"});default:return at(r.length,t)}}validate(t,r){return r>=1&&r<=24}set(t,r,a){const s=a<=24?a%24:a;return t.setHours(s,0,0,0),t}}class Yv extends je{constructor(){super(...arguments);pe(this,"priority",60);pe(this,"incompatibleTokens",["t","T"])}parse(t,r,a){switch(r){case"m":return et(lt.minute,t);case"mo":return a.ordinalNumber(t,{unit:"minute"});default:return at(r.length,t)}}validate(t,r){return r>=0&&r<=59}set(t,r,a){return t.setMinutes(a,0,0),t}}class Uv extends je{constructor(){super(...arguments);pe(this,"priority",50);pe(this,"incompatibleTokens",["t","T"])}parse(t,r,a){switch(r){case"s":return et(lt.second,t);case"so":return a.ordinalNumber(t,{unit:"second"});default:return at(r.length,t)}}validate(t,r){return r>=0&&r<=59}set(t,r,a){return t.setSeconds(a,0),t}}class Wv extends je{constructor(){super(...arguments);pe(this,"priority",30);pe(this,"incompatibleTokens",["t","T"])}parse(t,r){const a=s=>Math.trunc(s*Math.pow(10,-r.length+3));return ct(at(r.length,t),a)}set(t,r,a){return t.setMilliseconds(a),t}}class qv extends je{constructor(){super(...arguments);pe(this,"priority",10);pe(this,"incompatibleTokens",["t","T","x"])}parse(t,r){switch(r){case"X":return vn(kn.basicOptionalMinutes,t);case"XX":return vn(kn.basic,t);case"XXXX":return vn(kn.basicOptionalSeconds,t);case"XXXXX":return vn(kn.extendedOptionalSeconds,t);case"XXX":default:return vn(kn.extended,t)}}set(t,r,a){return r.timestampIsSet?t:Ue(t,t.getTime()-ns(t)-a)}}class Gv extends je{constructor(){super(...arguments);pe(this,"priority",10);pe(this,"incompatibleTokens",["t","T","X"])}parse(t,r){switch(r){case"x":return vn(kn.basicOptionalMinutes,t);case"xx":return vn(kn.basic,t);case"xxxx":return vn(kn.basicOptionalSeconds,t);case"xxxxx":return vn(kn.extendedOptionalSeconds,t);case"xxx":default:return vn(kn.extended,t)}}set(t,r,a){return r.timestampIsSet?t:Ue(t,t.getTime()-ns(t)-a)}}class Kv extends je{constructor(){super(...arguments);pe(this,"priority",40);pe(this,"incompatibleTokens","*")}parse(t){return qh(t)}set(t,r,a){return[Ue(t,a*1e3),{timestampIsSet:!0}]}}class Xv extends je{constructor(){super(...arguments);pe(this,"priority",20);pe(this,"incompatibleTokens","*")}parse(t){return qh(t)}set(t,r,a){return[Ue(t,a),{timestampIsSet:!0}]}}const Qv={G:new mv,y:new gv,Y:new yv,R:new bv,u:new kv,Q:new vv,q:new wv,M:new _v,L:new Cv,w:new Sv,I:new Bv,d:new Mv,D:new Dv,E:new Ov,e:new Av,c:new Iv,i:new Pv,a:new Lv,b:new zv,B:new Fv,h:new Rv,H:new Vv,K:new Hv,k:new jv,m:new Yv,s:new Uv,S:new Wv,X:new qv,x:new Gv,t:new Kv,T:new Xv},Zv=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jv=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,e1=/^'([^]*?)'?$/,t1=/''/g,n1=/\S/,o1=/[a-zA-Z]/;function cl(n,e,t,r){var x,E,C,T,F,I,O,P;const a=()=>Ue((r==null?void 0:r.in)||t,NaN),s=lv(),i=(r==null?void 0:r.locale)??s.locale??zh,l=(r==null?void 0:r.firstWeekContainsDate)??((E=(x=r==null?void 0:r.locale)==null?void 0:x.options)==null?void 0:E.firstWeekContainsDate)??s.firstWeekContainsDate??((T=(C=s.locale)==null?void 0:C.options)==null?void 0:T.firstWeekContainsDate)??1,c=(r==null?void 0:r.weekStartsOn)??((I=(F=r==null?void 0:r.locale)==null?void 0:F.options)==null?void 0:I.weekStartsOn)??s.weekStartsOn??((P=(O=s.locale)==null?void 0:O.options)==null?void 0:P.weekStartsOn)??0;if(!e)return n?a():we(t,r==null?void 0:r.in);const d={firstWeekContainsDate:l,weekStartsOn:c,locale:i},u=[new fv(r==null?void 0:r.in,t)],h=e.match(Jv).map(M=>{const v=M[0];if(v in al){const b=al[v];return b(M,i.formatLong)}return M}).join("").match(Zv),p=[];for(let M of h){!(r!=null&&r.useAdditionalWeekYearTokens)&&Uh(M)&&sl(M,e,n),!(r!=null&&r.useAdditionalDayOfYearTokens)&&Yh(M)&&sl(M,e,n);const v=M[0],b=Qv[v];if(b){const{incompatibleTokens:D}=b;if(Array.isArray(D)){const K=p.find(w=>D.includes(w.token)||w.token===v);if(K)throw new RangeError(`The format string mustn't contain \`${K.fullToken}\` and \`${M}\` at the same time`)}else if(b.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${M}\` and any other token at the same time`);p.push({token:v,fullToken:M});const Y=b.run(n,M,i.match,d);if(!Y)return a();u.push(Y.setter),n=Y.rest}else{if(v.match(o1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");if(M==="''"?M="'":v==="'"&&(M=r1(M)),n.indexOf(M)===0)n=n.slice(M.length);else return a()}}if(n.length>0&&n1.test(n))return a();const m=u.map(M=>M.priority).sort((M,v)=>v-M).filter((M,v,b)=>b.indexOf(M)===v).map(M=>u.filter(v=>v.priority===M).sort((v,b)=>b.subPriority-v.subPriority)).map(M=>M[0]);let f=we(t,r==null?void 0:r.in);if(isNaN(+f))return a();const g={};for(const M of m){if(!M.validate(f,d))return a();const v=M.set(f,g,d);Array.isArray(v)?(f=v[0],Object.assign(g,v[1])):f=v}return f}function r1(n){return n.match(e1)[1].replace(t1,"'")}function Xh(n,e,t){const[r,a]=Rr(t==null?void 0:t.in,n,e);return+To(r)==+To(a)}function Qh(n,e,t){return Xt(n,-e,t)}function Zh(n,e,t){const r=we(n,t==null?void 0:t.in),a=r.getFullYear(),s=r.getDate(),i=Ue(n,0);i.setFullYear(a,e,15),i.setHours(0,0,0,0);const l=iv(i);return r.setMonth(e,Math.min(s,l)),r}function qe(n,e,t){let r=we(n,t==null?void 0:t.in);return isNaN(+r)?Ue(n,NaN):(e.year!=null&&r.setFullYear(e.year),e.month!=null&&(r=Zh(r,e.month)),e.date!=null&&r.setDate(e.date),e.hours!=null&&r.setHours(e.hours),e.minutes!=null&&r.setMinutes(e.minutes),e.seconds!=null&&r.setSeconds(e.seconds),e.milliseconds!=null&&r.setMilliseconds(e.milliseconds),r)}function a1(n,e,t){const r=we(n,t==null?void 0:t.in);return r.setHours(e),r}function Jh(n,e,t){const r=we(n,t==null?void 0:t.in);return r.setMilliseconds(e),r}function s1(n,e,t){const r=we(n,t==null?void 0:t.in);return r.setMinutes(e),r}function ep(n,e,t){const r=we(n,t==null?void 0:t.in);return r.setSeconds(e),r}function wn(n,e,t){const r=we(n,t==null?void 0:t.in);return isNaN(+r)?Ue(n,NaN):(r.setFullYear(e),r)}function ar(n,e,t){return rn(n,-e,t)}function i1(n,e,t){const{years:r=0,months:a=0,weeks:s=0,days:i=0,hours:l=0,minutes:c=0,seconds:d=0}=e,u=ar(n,a+r*12,t),h=Qh(u,i+s*7,t),p=c+l*60,f=(d+p*60)*1e3;return Ue(n,+h-f)}function tp(n,e,t){return el(n,-e,t)}function sr(){const n=o.useAttrs();return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img",...n},[o.createElementVNode("path",{d:"M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z"}),o.createElementVNode("path",{d:"M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),o.createElementVNode("path",{d:"M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),o.createElementVNode("path",{d:"M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"})])}sr.compatConfig={MODE:3};function np(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[o.createElementVNode("path",{d:"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z"}),o.createElementVNode("path",{d:"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}np.compatConfig={MODE:3};function dl(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[o.createElementVNode("path",{d:"M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}dl.compatConfig={MODE:3};function ul(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[o.createElementVNode("path",{d:"M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z"})])}ul.compatConfig={MODE:3};function hl(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[o.createElementVNode("path",{d:"M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z"}),o.createElementVNode("path",{d:"M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"})])}hl.compatConfig={MODE:3};function pl(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[o.createElementVNode("path",{d:"M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}pl.compatConfig={MODE:3};function fl(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[o.createElementVNode("path",{d:"M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}fl.compatConfig={MODE:3};const zt=(n,e)=>e?new Date(n.toLocaleString("en-US",{timeZone:e})):new Date(n),ml=(n,e,t)=>gl(n,e,t)||ne(),l1=(n,e,t)=>{const r=e.dateInTz?zt(new Date(n),e.dateInTz):ne(n);return t?kt(r,!0):r},gl=(n,e,t)=>{if(!n)return null;const r=t?kt(ne(n),!0):ne(n);return e?e.exactMatch?l1(n,e,t):zt(r,e.timezone):r},c1=n=>{const e=new Date(n.getFullYear(),0,1).getTimezoneOffset();return n.getTimezoneOffset()<e},d1=(n,e)=>{if(!n)return 0;const t=new Date,r=new Date(t.toLocaleString("en-US",{timeZone:"UTC"})),a=new Date(t.toLocaleString("en-US",{timeZone:n})),s=(c1(e??a)?a:e??a).getTimezoneOffset()/60;return(+r-+a)/(1e3*60*60)-s};var sn=(n=>(n.month="month",n.year="year",n))(sn||{}),ln=(n=>(n.top="top",n.bottom="bottom",n))(ln||{}),Do=(n=>(n.header="header",n.calendar="calendar",n.timePicker="timePicker",n))(Do||{}),xt=(n=>(n.month="month",n.year="year",n.calendar="calendar",n.time="time",n.minutes="minutes",n.hours="hours",n.seconds="seconds",n))(xt||{});const u1=["timestamp","date","iso"];var Dt=(n=>(n.up="up",n.down="down",n.left="left",n.right="right",n))(Dt||{}),Ke=(n=>(n.arrowUp="ArrowUp",n.arrowDown="ArrowDown",n.arrowLeft="ArrowLeft",n.arrowRight="ArrowRight",n.enter="Enter",n.space=" ",n.esc="Escape",n.tab="Tab",n.home="Home",n.end="End",n.pageUp="PageUp",n.pageDown="PageDown",n))(Ke||{}),ir=(n=>(n.MONTH_AND_YEAR="MM-yyyy",n.YEAR="yyyy",n.DATE="dd-MM-yyyy",n))(ir||{});function op(n){return e=>{const t=new Intl.DateTimeFormat(n,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${e}T00:00:00+00:00`));return n==="ar"?t.slice(2,5):t.slice(0,2)}}function h1(n){return e=>bn(zt(new Date(`2017-01-0${e}T00:00:00+00:00`),"UTC"),"EEEEEE",{locale:n})}const p1=(n,e,t)=>{const r=[1,2,3,4,5,6,7];let a;if(n!==null)try{a=r.map(h1(n))}catch{a=r.map(op(e))}else a=r.map(op(e));const s=a.slice(0,t),i=a.slice(t+1,a.length);return[a[t]].concat(...i).concat(...s)},yl=(n,e,t)=>{const r=[];for(let a=+n[0];a<=+n[1];a++)r.push({value:+a,text:cp(a,e)});return t?r.reverse():r},rp=(n,e,t)=>{const r=[1,2,3,4,5,6,7,8,9,10,11,12].map(s=>{const i=s<10?`0${s}`:s;return new Date(`2017-${i}-01T00:00:00+00:00`)});if(n!==null)try{const s=t==="long"?"LLLL":"LLL";return r.map((i,l)=>{const c=bn(zt(i,"UTC"),s,{locale:n});return{text:c.charAt(0).toUpperCase()+c.substring(1),value:l}})}catch{}const a=new Intl.DateTimeFormat(e,{month:t,timeZone:"UTC"});return r.map((s,i)=>{const l=a.format(s);return{text:l.charAt(0).toUpperCase()+l.substring(1),value:i}})},f1=n=>[12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11][n],mt=n=>{const e=o.unref(n);return e!=null&&e.$el?e==null?void 0:e.$el:e},m1=n=>({type:"dot",...n??{}}),ap=n=>Array.isArray(n)?!!n[0]&&!!n[1]:!1,bl={prop:n=>`"${n}" prop must be enabled!`,dateArr:n=>`You need to use array as "model-value" binding in order to support "${n}"`},bt=n=>n,sp=n=>n===0?n:!n||isNaN(+n)?null:+n,ip=n=>n===null,lp=n=>{if(n)return[...n.querySelectorAll("input, button, select, textarea, a[href]")][0]},g1=n=>{const e=[],t=r=>r.filter(a=>a);for(let r=0;r<n.length;r+=3){const a=[n[r],n[r+1],n[r+2]];e.push(t(a))}return e},Ur=(n,e,t)=>{const r=t!=null,a=e!=null;if(!r&&!a)return!1;const s=+t,i=+e;return r&&a?+n>s||+n<i:r?+n>s:a?+n<i:!1},lr=(n,e)=>g1(n).map(t=>t.map(r=>{const{active:a,disabled:s,isBetween:i,highlighted:l}=e(r);return{...r,active:a,disabled:s,className:{dp__overlay_cell_active:a,dp__overlay_cell:!a,dp__overlay_cell_disabled:s,dp__overlay_cell_pad:!0,dp__overlay_cell_active_disabled:s&&a,dp__cell_in_between:i,"dp--highlighted":l}}})),ro=(n,e,t=!1)=>{n&&e.allowStopPropagation&&(t&&n.stopImmediatePropagation(),n.stopPropagation())},y1=()=>["a[href]","area[href]","input:not([disabled]):not([type='hidden'])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","[tabindex]:not([tabindex='-1'])","[data-datepicker-instance]"].join(", ");function b1(n,e){let t=[...document.querySelectorAll(y1())];t=t.filter(a=>!n.contains(a)||a.hasAttribute("data-datepicker-instance"));const r=t.indexOf(n);if(r>=0&&(e?r-1>=0:r+1<=t.length))return t[r+(e?-1:1)]}const kl=(n,e)=>n==null?void 0:n.querySelector(`[data-dp-element="${e}"]`),cp=(n,e)=>new Intl.NumberFormat(e,{useGrouping:!1,style:"decimal"}).format(n),vl=(n,e)=>bn(n,e??ir.DATE),wl=n=>Array.isArray(n),rs=(n,e,t)=>e.get(vl(n,t)),k1=(n,e)=>n?e?e instanceof Map?!!rs(n,e):e(ne(n)):!1:!0,Ot=(n,e,t=!1,r)=>{if(n.key===Ke.enter||n.key===Ke.space)return t&&n.preventDefault(),e();if(r)return r(n)},v1=()=>"ontouchstart"in window||navigator.maxTouchPoints>0,dp=(n,e)=>n?ir.MONTH_AND_YEAR:e?ir.YEAR:ir.DATE,up=n=>n<10?`0${n}`:n,hp=(n,e,t,r,a,s)=>{const i=cl(n,e.slice(0,n.length),new Date,{locale:s});return Vr(i)&&Dh(i)?r||a?i:qe(i,{hours:+t.hours,minutes:+(t==null?void 0:t.minutes),seconds:+(t==null?void 0:t.seconds),milliseconds:0}):null},w1=(n,e,t,r,a,s)=>{const i=Array.isArray(t)?t[0]:t;if(typeof e=="string")return hp(n,e,i,r,a,s);if(Array.isArray(e)){let l=null;for(const c of e)if(l=hp(n,c,i,r,a,s),l)break;return l}return typeof e=="function"?e(n):null},ne=n=>n?new Date(n):new Date,_1=(n,e,t)=>{if(e){const a=(n.getMonth()+1).toString().padStart(2,"0"),s=n.getDate().toString().padStart(2,"0"),i=n.getHours().toString().padStart(2,"0"),l=n.getMinutes().toString().padStart(2,"0"),c=t?n.getSeconds().toString().padStart(2,"0"):"00";return`${n.getFullYear()}-${a}-${s}T${i}:${l}:${c}.000Z`}const r=Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds());return new Date(r).toISOString()},kt=(n,e)=>{const t=ne(JSON.parse(JSON.stringify(n))),r=qe(t,{hours:0,minutes:0,seconds:0,milliseconds:0});return e?gk(r):r},ao=(n,e,t,r)=>{let a=n?ne(n):ne();return(e||e===0)&&(a=a1(a,+e)),(t||t===0)&&(a=s1(a,+t)),(r||r===0)&&(a=ep(a,+r)),Jh(a,0)},st=(n,e)=>!n||!e?!1:or(kt(n),kt(e)),Le=(n,e)=>!n||!e?!1:rr(kt(n),kt(e)),dt=(n,e)=>!n||!e?!1:Mo(kt(n),kt(e)),Wr=(n,e,t)=>n!=null&&n[0]&&n!=null&&n[1]?dt(t,n[0])&&st(t,n[1]):n!=null&&n[0]&&e?dt(t,n[0])&&st(t,e)||st(t,n[0])&&dt(t,e):!1,cn=n=>{const e=qe(new Date(n),{date:1});return kt(e)},_l=(n,e,t)=>e&&(t||t===0)?Object.fromEntries(["hours","minutes","seconds"].map(r=>r===e?[r,t]:[r,isNaN(+n[r])?void 0:+n[r]])):{hours:isNaN(+n.hours)?void 0:+n.hours,minutes:isNaN(+n.minutes)?void 0:+n.minutes,seconds:isNaN(+n.seconds)?void 0:+n.seconds},Oo=n=>({hours:Ln(n),minutes:oo(n),seconds:nr(n)}),pp=(n,e)=>{if(e){const t=Te(ne(e));if(t>n)return 12;if(t===n)return Pe(ne(e))}},fp=(n,e)=>{if(e){const t=Te(ne(e));return t<n?-1:t===n?Pe(ne(e)):void 0}},cr=n=>{if(n)return Te(ne(n))},mp=(n,e)=>{const t=dt(n,e)?e:n,r=dt(e,n)?e:n;return Ih({start:t,end:r})},C1=n=>{const e=rn(n,1);return{month:Pe(e),year:Te(e)}},zn=(n,e)=>{const t=an(n,{weekStartsOn:+e}),r=Ph(n,{weekStartsOn:+e});return[t,r]},gp=(n,e)=>{const t={hours:Ln(ne()),minutes:oo(ne()),seconds:e?nr(ne()):0};return Object.assign(t,n)},so=(n,e,t)=>[qe(ne(n),{date:1}),qe(ne(),{month:e,year:t,date:1})],Fn=(n,e,t)=>{let r=n?ne(n):ne();return(e||e===0)&&(r=Zh(r,e)),t&&(r=wn(r,t)),r},yp=(n,e,t,r,a)=>{if(!r||a&&!e||!a&&!t)return!1;const s=a?rn(n,1):ar(n,1),i=[Pe(s),Te(s)];return a?!S1(...i,e):!E1(...i,t)},E1=(n,e,t)=>st(...so(t,n,e))||Le(...so(t,n,e)),S1=(n,e,t)=>dt(...so(t,n,e))||Le(...so(t,n,e)),bp=(n,e,t,r,a,s,i)=>{if(typeof e=="function"&&!i)return e(n);const l=t?{locale:t}:void 0;return Array.isArray(n)?`${bn(n[0],s,l)}${a&&!n[1]?"":r}${n[1]?bn(n[1],s,l):""}`:bn(n,s,l)},dr=n=>{if(n)return null;throw new Error(bl.prop("partial-range"))},as=(n,e)=>{if(e)return n();throw new Error(bl.prop("range"))},Cl=n=>Array.isArray(n)?Vr(n[0])&&(n[1]?Vr(n[1]):!0):n?Vr(n):!1,x1=(n,e)=>qe(e??ne(),{hours:+n.hours||0,minutes:+n.minutes||0,seconds:+n.seconds||0}),El=(n,e,t,r)=>{if(!n)return!0;if(r){const a=t==="max"?or(n,e):Mo(n,e),s={seconds:0,milliseconds:0};return a||rr(qe(n,s),qe(e,s))}return t==="max"?n.getTime()<=e.getTime():n.getTime()>=e.getTime()},Sl=(n,e,t)=>n?x1(n,e):ne(t??e),kp=(n,e,t,r,a)=>{if(Array.isArray(r)){const i=Sl(n,r[0],e),l=Sl(n,r[1],e);return El(r[0],i,t,!!e)&&El(r[1],l,t,!!e)&&a}const s=Sl(n,r,e);return El(r,s,t,!!e)&&a},xl=n=>qe(ne(),Oo(n)),B1=(n,e,t)=>{if(n instanceof Map){const r=`${up(t+1)}-${e}`;return n.size?n.has(r):!1}return typeof n=="function"?n(kt(qe(ne(),{month:t,year:e}),!0)):!1},T1=(n,e,t)=>{if(n instanceof Map){const r=`${up(t+1)}-${e}`;return n.size?n.has(r):!0}return!0},vp=(n,e,t)=>typeof n=="function"?n({month:e,year:t}):!!n.months.find(r=>r.month===e&&r.year===t),Bl=(n,e)=>typeof n=="function"?n(e):n.years.includes(e),Tl=n=>`dp-${bn(n,"yyyy-MM-dd")}`,wp=(n,e)=>{const t=Qh(kt(e),n),r=Xt(kt(e),n);return{before:t,after:r}},qr=o.reactive({menuFocused:!1,shiftKeyInMenu:!1}),_p=()=>{const n=t=>{qr.menuFocused=t},e=t=>{qr.shiftKeyInMenu!==t&&(qr.shiftKeyInMenu=t)};return{control:o.computed(()=>({shiftKeyInMenu:qr.shiftKeyInMenu,menuFocused:qr.menuFocused})),setMenuFocused:n,setShiftKey:e}},Xe=o.reactive({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),$l=o.ref(null),ss=o.ref(!1),Ml=o.ref(!1),Dl=o.ref(!1),Ol=o.ref(!1),Bt=o.ref(0),ut=o.ref(0),io=()=>{const n=o.computed(()=>ss.value?[...Xe.selectionGrid,Xe.actionRow].filter(h=>h.length):Ml.value?[...Xe.timePicker[0],...Xe.timePicker[1],Ol.value?[]:[$l.value],Xe.actionRow].filter(h=>h.length):Dl.value?[...Xe.monthPicker,Xe.actionRow]:[Xe.monthYear,...Xe.calendar,Xe.time,Xe.actionRow].filter(h=>h.length)),e=h=>{Bt.value=h?Bt.value+1:Bt.value-1;let p=null;n.value[ut.value]&&(p=n.value[ut.value][Bt.value]),!p&&n.value[ut.value+(h?1:-1)]?(ut.value=ut.value+(h?1:-1),Bt.value=h?0:n.value[ut.value].length-1):p||(Bt.value=h?Bt.value-1:Bt.value+1)},t=h=>{ut.value===0&&!h||ut.value===n.value.length&&h||(ut.value=h?ut.value+1:ut.value-1,n.value[ut.value]?n.value[ut.value]&&!n.value[ut.value][Bt.value]&&Bt.value!==0&&(Bt.value=n.value[ut.value].length-1):ut.value=h?ut.value-1:ut.value+1)},r=h=>{let p=null;n.value[ut.value]&&(p=n.value[ut.value][Bt.value]),p?p.focus({preventScroll:!ss.value}):Bt.value=h?Bt.value-1:Bt.value+1},a=()=>{e(!0),r(!0)},s=()=>{e(!1),r(!1)},i=()=>{t(!1),r(!0)},l=()=>{t(!0),r(!0)},c=(h,p)=>{Xe[p]=h},d=(h,p)=>{Xe[p]=h},u=()=>{Bt.value=0,ut.value=0};return{buildMatrix:c,buildMultiLevelMatrix:d,setTimePickerBackRef:h=>{$l.value=h},setSelectionGrid:h=>{ss.value=h,u(),h||(Xe.selectionGrid=[])},setTimePicker:(h,p=!1)=>{Ml.value=h,Ol.value=p,u(),h||(Xe.timePicker[0]=[],Xe.timePicker[1]=[])},setTimePickerElements:(h,p=0)=>{Xe.timePicker[p]=h},arrowRight:a,arrowLeft:s,arrowUp:i,arrowDown:l,clearArrowNav:()=>{Xe.monthYear=[],Xe.calendar=[],Xe.time=[],Xe.actionRow=[],Xe.selectionGrid=[],Xe.timePicker[0]=[],Xe.timePicker[1]=[],ss.value=!1,Ml.value=!1,Ol.value=!1,Dl.value=!1,u(),$l.value=null},setMonthPicker:h=>{Dl.value=h,u()},refSets:Xe}},Cp=n=>({menuAppearTop:"dp-menu-appear-top",menuAppearBottom:"dp-menu-appear-bottom",open:"dp-slide-down",close:"dp-slide-up",next:"calendar-next",previous:"calendar-prev",vNext:"dp-slide-up",vPrevious:"dp-slide-down",...n??{}}),$1=n=>({toggleOverlay:"Toggle overlay",menu:"Datepicker menu",input:"Datepicker input",openTimePicker:"Open time picker",closeTimePicker:"Close time Picker",incrementValue:e=>`Increment ${e}`,decrementValue:e=>`Decrement ${e}`,openTpOverlay:e=>`Open ${e} overlay`,amPmButton:"Switch AM/PM mode",openYearsOverlay:"Open years overlay",openMonthsOverlay:"Open months overlay",nextMonth:"Next month",prevMonth:"Previous month",nextYear:"Next year",prevYear:"Previous year",day:void 0,weekDay:void 0,clearInput:"Clear value",calendarIcon:"Calendar icon",timePicker:"Time picker",monthPicker:e=>`Month picker${e?" overlay":""}`,yearPicker:e=>`Year picker${e?" overlay":""}`,timeOverlay:e=>`${e} overlay`,...n??{}}),Ep=n=>n?typeof n=="boolean"?n?2:0:+n>=2?+n:2:0,M1=n=>{const e=typeof n=="object"&&n,t={static:!0,solo:!1};if(!n)return{...t,count:Ep(!1)};const r=e?n:{},a=e?r.count??!0:n,s=Ep(a);return Object.assign(t,r,{count:s})},D1=(n,e,t)=>n||(typeof t=="string"?t:e),O1=n=>typeof n=="boolean"?n?Cp({}):!1:Cp(n),A1=n=>{const e={enterSubmit:!0,tabSubmit:!0,openMenu:"open",selectOnFocus:!1,rangeSeparator:" - ",escClose:!0};return typeof n=="object"?{...e,...n??{},enabled:!0}:{...e,enabled:n}},I1=n=>({months:[],years:[],times:{hours:[],minutes:[],seconds:[]},...n??{}}),N1=n=>({showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0,...n??{}}),P1=n=>{const e={input:!1};return typeof n=="object"?{...e,...n??{},enabled:!0}:{enabled:n,...e}},L1=n=>({allowStopPropagation:!0,closeOnScroll:!1,modeHeight:255,allowPreventDefault:!1,closeOnClearValue:!0,closeOnAutoApply:!0,noSwipe:!1,keepActionRow:!1,onClickOutside:void 0,tabOutClosesMenu:!0,arrowLeft:void 0,keepViewOnOffsetClick:!1,timeArrowHoldThreshold:0,shadowDom:!1,mobileBreakpoint:600,setDateOnMenuClose:!1,...n??{}}),z1=n=>{const e={dates:Array.isArray(n)?n.map(t=>ne(t)):[],years:[],months:[],quarters:[],weeks:[],weekdays:[],options:{highlightDisabled:!1}};return typeof n=="function"?n:{...e,...n??{}}},F1=n=>typeof n=="object"?{type:(n==null?void 0:n.type)??"local",hideOnOffsetDates:(n==null?void 0:n.hideOnOffsetDates)??!1}:{type:n,hideOnOffsetDates:!1},R1=n=>{const e={noDisabledRange:!1,showLastInRange:!0,minMaxRawRange:!1,partialRange:!0,disableTimeRangeValidation:!1,maxRange:void 0,minRange:void 0,autoRange:void 0,fixedStart:!1,fixedEnd:!1};return typeof n=="object"?{enabled:!0,...e,...n}:{enabled:n,...e}},V1=n=>n?typeof n=="string"?{timezone:n,exactMatch:!1,dateInTz:void 0,emitTimezone:void 0,convertModel:!0}:{timezone:n.timezone,exactMatch:n.exactMatch??!1,dateInTz:n.dateInTz??void 0,emitTimezone:n.emitTimezone??void 0,convertModel:n.convertModel??!0}:{timezone:void 0,exactMatch:!1,emitTimezone:void 0},Al=(n,e,t,r)=>new Map(n.map(a=>{const s=ml(a,e,r);return[vl(s,t),s]})),H1=(n,e)=>n.length?new Map(n.map(t=>{const r=ml(t.date,e);return[vl(r,ir.DATE),t]})):null,j1=n=>{var e;const t=dp(n.isMonthPicker,n.isYearPicker);return{minDate:gl(n.minDate,n.timezone,n.isSpecific),maxDate:gl(n.maxDate,n.timezone,n.isSpecific),disabledDates:wl(n.disabledDates)?Al(n.disabledDates,n.timezone,t,n.isSpecific):n.disabledDates,allowedDates:wl(n.allowedDates)?Al(n.allowedDates,n.timezone,t,n.isSpecific):null,highlight:typeof n.highlight=="object"&&wl((e=n.highlight)==null?void 0:e.dates)?Al(n.highlight.dates,n.timezone,t):n.highlight,markers:H1(n.markers,n.timezone)}},Y1=n=>typeof n=="boolean"?{enabled:n,dragSelect:!0,limit:null}:{enabled:!!n,limit:n.limit?+n.limit:null,dragSelect:n.dragSelect??!0},U1=n=>({...Object.fromEntries(Object.keys(n).map(e=>{const t=e,r=n[t],a=typeof n[t]=="string"?{[r]:!0}:Object.fromEntries(r.map(s=>[s,!0]));return[e,a]}))}),Ze=n=>{const e=()=>{const O=n.enableSeconds?":ss":"",P=n.enableMinutes?":mm":"";return n.is24?`HH${P}${O}`:`hh${P}${O} aa`},t=()=>{var O;return n.format?n.format:n.monthPicker?"MM/yyyy":n.timePicker?e():n.weekPicker?`${((O=x.value)==null?void 0:O.type)==="iso"?"II":"ww"}-RR`:n.yearPicker?"yyyy":n.quarterPicker?"QQQ/yyyy":n.enableTimePicker?`MM/dd/yyyy, ${e()}`:"MM/dd/yyyy"},r=O=>gp(O,n.enableSeconds),a=()=>F.value.enabled?n.startTime&&Array.isArray(n.startTime)?[r(n.startTime[0]),r(n.startTime[1])]:null:n.startTime&&!Array.isArray(n.startTime)?r(n.startTime):null,s=o.computed(()=>M1(n.multiCalendars)),i=o.computed(()=>a()),l=o.computed(()=>$1(n.ariaLabels)),c=o.computed(()=>I1(n.filters)),d=o.computed(()=>O1(n.transitions)),u=o.computed(()=>N1(n.actionRow)),h=o.computed(()=>D1(n.previewFormat,n.format,t())),p=o.computed(()=>A1(n.textInput)),m=o.computed(()=>P1(n.inline)),f=o.computed(()=>L1(n.config)),g=o.computed(()=>z1(n.highlight)),x=o.computed(()=>F1(n.weekNumbers)),E=o.computed(()=>V1(n.timezone)),C=o.computed(()=>Y1(n.multiDates)),T=o.computed(()=>j1({minDate:n.minDate,maxDate:n.maxDate,disabledDates:n.disabledDates,allowedDates:n.allowedDates,highlight:g.value,markers:n.markers,timezone:E.value,isSpecific:n.monthPicker||n.yearPicker||n.quarterPicker,isMonthPicker:n.monthPicker,isYearPicker:n.yearPicker})),F=o.computed(()=>R1(n.range)),I=o.computed(()=>U1(n.ui));return{defaultedTransitions:d,defaultedMultiCalendars:s,defaultedStartTime:i,defaultedAriaLabels:l,defaultedFilters:c,defaultedActionRow:u,defaultedPreviewFormat:h,defaultedTextInput:p,defaultedInline:m,defaultedConfig:f,defaultedHighlight:g,defaultedWeekNumbers:x,defaultedRange:F,propDates:T,defaultedTz:E,defaultedMultiDates:C,defaultedUI:I,getDefaultPattern:t,getDefaultStartTime:a,handleEventPropagation:O=>{f.value.allowStopPropagation&&O.stopPropagation(),f.value.allowPreventDefault&&O.preventDefault()}}},W1=(n,e,t)=>{const r=o.ref(),{defaultedTextInput:a,defaultedRange:s,defaultedTz:i,defaultedMultiDates:l,getDefaultPattern:c}=Ze(e),d=o.ref(""),u=o.toRef(e,"format"),h=o.toRef(e,"formatLocale");o.watch(r,()=>{typeof e.onInternalModelChange=="function"&&n("internal-model-change",r.value,J(!0))},{deep:!0}),o.watch(s,(y,j)=>{y.enabled!==j.enabled&&(r.value=null)}),o.watch(u,()=>{N()});const p=y=>i.value.timezone&&i.value.convertModel?zt(y,i.value.timezone):y,m=y=>{if(i.value.timezone&&i.value.convertModel){const j=d1(i.value.timezone,y);return ck(y,j)}return y},f=(y,j,se=!1)=>bp(y,e.format,e.formatLocale,a.value.rangeSeparator,e.modelAuto,j??c(),se),g=y=>y?e.modelType?q(y):{hours:Ln(y),minutes:oo(y),seconds:e.enableSeconds?nr(y):0}:null,x=y=>e.modelType?q(y):{month:Pe(y),year:Te(y)},E=y=>Array.isArray(y)?l.value.enabled?y.map(j=>C(j,wn(ne(),j))):as(()=>[wn(ne(),y[0]),y[1]?wn(ne(),y[1]):dr(s.value.partialRange)],s.value.enabled):wn(ne(),+y),C=(y,j)=>(typeof y=="string"||typeof y=="number")&&e.modelType?L(y):j,T=y=>Array.isArray(y)?[C(y[0],ao(null,+y[0].hours,+y[0].minutes,y[0].seconds)),C(y[1],ao(null,+y[1].hours,+y[1].minutes,y[1].seconds))]:C(y,ao(null,y.hours,y.minutes,y.seconds)),F=y=>{const j=qe(ne(),{date:1});return Array.isArray(y)?l.value.enabled?y.map(se=>C(se,Fn(j,+se.month,+se.year))):as(()=>[C(y[0],Fn(j,+y[0].month,+y[0].year)),C(y[1],y[1]?Fn(j,+y[1].month,+y[1].year):dr(s.value.partialRange))],s.value.enabled):C(y,Fn(j,+y.month,+y.year))},I=y=>{if(Array.isArray(y))return y.map(j=>L(j));throw new Error(bl.dateArr("multi-dates"))},O=y=>{if(Array.isArray(y)&&s.value.enabled){const j=y[0],se=y[1];return[ne(Array.isArray(j)?j[0]:null),Array.isArray(se)&&se.length?ne(se[0]):null]}return ne(y[0])},P=y=>e.modelAuto?Array.isArray(y)?[L(y[0]),L(y[1])]:e.autoApply?[L(y)]:[L(y),null]:Array.isArray(y)?as(()=>y[1]?[L(y[0]),y[1]?L(y[1]):dr(s.value.partialRange)]:[L(y[0])],s.value.enabled):L(y),M=()=>{Array.isArray(r.value)&&s.value.enabled&&r.value.length===1&&r.value.push(dr(s.value.partialRange))},v=()=>{const y=r.value;return[q(y[0]),y[1]?q(y[1]):dr(s.value.partialRange)]},b=()=>Array.isArray(r.value)?r.value[1]?v():q(bt(r.value[0])):[],D=()=>(r.value||[]).map(y=>q(y)),Y=(y=!1)=>(y||M(),e.modelAuto?b():l.value.enabled?D():Array.isArray(r.value)?as(()=>v(),s.value.enabled):q(bt(r.value))),K=y=>!y||Array.isArray(y)&&!y.length?null:e.timePicker?T(bt(y)):e.monthPicker?F(bt(y)):e.yearPicker?E(bt(y)):l.value.enabled?I(bt(y)):e.weekPicker?O(bt(y)):P(bt(y)),w=y=>{const j=K(y);Cl(bt(j))?(r.value=bt(j),N()):(r.value=null,d.value="")},k=()=>{const y=j=>bn(j,a.value.format);return`${y(r.value[0])} ${a.value.rangeSeparator} ${r.value[1]?y(r.value[1]):""}`},_=()=>t.value&&r.value?Array.isArray(r.value)?k():bn(r.value,a.value.format):f(r.value),A=()=>r.value?l.value.enabled?r.value.map(y=>f(y)).join("; "):a.value.enabled&&typeof a.value.format=="string"?_():f(r.value):"",N=()=>{!e.format||typeof e.format=="string"||a.value.enabled&&typeof a.value.format=="string"?d.value=A():d.value=e.format(r.value)},L=y=>{if(e.utc){const j=new Date(y);return e.utc==="preserve"?new Date(j.getTime()+j.getTimezoneOffset()*6e4):j}return e.modelType?u1.includes(e.modelType)?p(new Date(y)):e.modelType==="format"&&(typeof e.format=="string"||!e.format)?p(cl(y,c(),new Date,{locale:h.value})):p(cl(y,e.modelType,new Date,{locale:h.value})):p(new Date(y))},q=y=>y?e.utc?_1(y,e.utc==="preserve",e.enableSeconds):e.modelType?e.modelType==="timestamp"?+m(y):e.modelType==="iso"?m(y).toISOString():e.modelType==="format"&&(typeof e.format=="string"||!e.format)?f(m(y)):f(m(y),e.modelType,!0):m(y):"",z=(y,j=!1,se=!1)=>{if(se)return y;if(n("update:model-value",y),i.value.emitTimezone&&j){const _e=Array.isArray(y)?y.map(U=>zt(bt(U),i.value.emitTimezone)):zt(bt(y),i.value.emitTimezone);n("update:model-timezone-value",_e)}},oe=y=>Array.isArray(r.value)?l.value.enabled?r.value.map(j=>y(j)):[y(r.value[0]),r.value[1]?y(r.value[1]):dr(s.value.partialRange)]:y(bt(r.value)),$=()=>{if(Array.isArray(r.value)){const y=zn(r.value[0],e.weekStart),j=r.value[1]?zn(r.value[1],e.weekStart):[];return[y.map(se=>ne(se)),j.map(se=>ne(se))]}return zn(r.value,e.weekStart).map(y=>ne(y))},R=(y,j)=>z(bt(oe(y)),!1,j),W=y=>{const j=$();return y?j:n("update:model-value",$())},J=(y=!1)=>(y||N(),e.monthPicker?R(x,y):e.timePicker?R(g,y):e.yearPicker?R(Te,y):e.weekPicker?W(y):z(Y(y),!0,y));return{inputValue:d,internalModelValue:r,checkBeforeEmit:()=>r.value?s.value.enabled?s.value.partialRange?r.value.length>=1:r.value.length===2:!!r.value:!1,parseExternalModelValue:w,formatInputValue:N,emitModelValue:J}},q1=(n,e)=>{const{defaultedFilters:t,propDates:r}=Ze(n),{validateMonthYearInRange:a}=co(n),s=(u,h)=>{let p=u;return t.value.months.includes(Pe(p))?(p=h?rn(u,1):ar(u,1),s(p,h)):p},i=(u,h)=>{let p=u;return t.value.years.includes(Te(p))?(p=h?el(u,1):tp(u,1),i(p,h)):p},l=(u,h=!1)=>{const p=qe(ne(),{month:n.month,year:n.year});let m=u?rn(p,1):ar(p,1);n.disableYearSelect&&(m=wn(m,n.year));let f=Pe(m),g=Te(m);t.value.months.includes(f)&&(m=s(m,u),f=Pe(m),g=Te(m)),t.value.years.includes(g)&&(m=i(m,u),g=Te(m)),a(f,g,u,n.preventMinMaxNavigation)&&c(f,g,h)},c=(u,h,p)=>{e("update-month-year",{month:u,year:h,fromNav:p})},d=o.computed(()=>u=>yp(qe(ne(),{month:n.month,year:n.year}),r.value.maxDate,r.value.minDate,n.preventMinMaxNavigation,u));return{handleMonthYearChange:l,isDisabled:d,updateMonthYear:c}},is={multiCalendars:{type:[Boolean,Number,String,Object],default:void 0},modelValue:{type:[String,Date,Array,Object,Number],default:null},modelType:{type:String,default:null},position:{type:String,default:"center"},dark:{type:Boolean,default:!1},format:{type:[String,Function],default:()=>null},autoPosition:{type:[Boolean,String],default:!0},altPosition:{type:Function,default:null},transitions:{type:[Boolean,Object],default:!0},formatLocale:{type:Object,default:null},utc:{type:[Boolean,String],default:!1},ariaLabels:{type:Object,default:()=>({})},offset:{type:[Number,String],default:10},hideNavigation:{type:Array,default:()=>[]},timezone:{type:[String,Object],default:null},vertical:{type:Boolean,default:!1},disableMonthYearSelect:{type:Boolean,default:!1},disableYearSelect:{type:Boolean,default:!1},dayClass:{type:Function,default:null},yearRange:{type:Array,default:()=>[1900,2100]},enableTimePicker:{type:Boolean,default:!0},autoApply:{type:Boolean,default:!1},disabledDates:{type:[Array,Function],default:()=>[]},monthNameFormat:{type:String,default:"short"},startDate:{type:[Date,String],default:null},startTime:{type:[Object,Array],default:null},hideOffsetDates:{type:Boolean,default:!1},noToday:{type:Boolean,default:!1},disabledWeekDays:{type:Array,default:()=>[]},allowedDates:{type:Array,default:null},nowButtonLabel:{type:String,default:"Now"},markers:{type:Array,default:()=>[]},escClose:{type:Boolean,default:!0},spaceConfirm:{type:Boolean,default:!0},monthChangeOnArrows:{type:Boolean,default:!0},presetDates:{type:Array,default:()=>[]},flow:{type:Array,default:()=>[]},partialFlow:{type:Boolean,default:!1},preventMinMaxNavigation:{type:Boolean,default:!1},reverseYears:{type:Boolean,default:!1},weekPicker:{type:Boolean,default:!1},filters:{type:Object,default:()=>({})},arrowNavigation:{type:Boolean,default:!1},highlight:{type:[Function,Object],default:null},teleport:{type:[Boolean,String,Object],default:null},teleportCenter:{type:Boolean,default:!1},locale:{type:String,default:"en-Us"},weekNumName:{type:String,default:"W"},weekStart:{type:[Number,String],default:1},weekNumbers:{type:[String,Function,Object],default:null},monthChangeOnScroll:{type:[Boolean,String],default:!0},dayNames:{type:[Function,Array],default:null},monthPicker:{type:Boolean,default:!1},customProps:{type:Object,default:null},yearPicker:{type:Boolean,default:!1},modelAuto:{type:Boolean,default:!1},selectText:{type:String,default:"Select"},cancelText:{type:String,default:"Cancel"},previewFormat:{type:[String,Function],default:()=>""},multiDates:{type:[Object,Boolean],default:!1},ignoreTimeValidation:{type:Boolean,default:!1},minDate:{type:[Date,String],default:null},maxDate:{type:[Date,String],default:null},minTime:{type:Object,default:null},maxTime:{type:Object,default:null},name:{type:String,default:null},placeholder:{type:String,default:""},hideInputIcon:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},alwaysClearable:{type:Boolean,default:!1},state:{type:Boolean,default:null},required:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},timePicker:{type:Boolean,default:!1},enableSeconds:{type:Boolean,default:!1},is24:{type:Boolean,default:!0},noHoursOverlay:{type:Boolean,default:!1},noMinutesOverlay:{type:Boolean,default:!1},noSecondsOverlay:{type:Boolean,default:!1},hoursGridIncrement:{type:[String,Number],default:1},minutesGridIncrement:{type:[String,Number],default:5},secondsGridIncrement:{type:[String,Number],default:5},hoursIncrement:{type:[Number,String],default:1},minutesIncrement:{type:[Number,String],default:1},secondsIncrement:{type:[Number,String],default:1},range:{type:[Boolean,Object],default:!1},uid:{type:String,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inline:{type:[Boolean,Object],default:!1},textInput:{type:[Boolean,Object],default:!1},sixWeeks:{type:[Boolean,String],default:!1},actionRow:{type:Object,default:()=>({})},focusStartDate:{type:Boolean,default:!1},disabledTimes:{type:[Function,Array],default:void 0},timePickerInline:{type:Boolean,default:!1},calendar:{type:Function,default:null},config:{type:Object,default:void 0},quarterPicker:{type:Boolean,default:!1},yearFirst:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},onInternalModelChange:{type:[Function,Object],default:null},enableMinutes:{type:Boolean,default:!0},ui:{type:Object,default:()=>({})}},dn={...is,shadow:{type:Boolean,default:!1},flowStep:{type:Number,default:0},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},menuWrapRef:{type:Object,default:null},getInputRect:{type:Function,default:()=>({})},isTextInputDate:{type:Boolean,default:!1},isMobile:{type:Boolean,default:void 0}},G1=["title"],K1=["disabled"],X1=o.defineComponent({compatConfig:{MODE:3},__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},...dn},emits:["close-picker","select-date","select-now","invalid-select"],setup(n,{emit:e}){const t=e,r=n,{defaultedActionRow:a,defaultedPreviewFormat:s,defaultedMultiCalendars:i,defaultedTextInput:l,defaultedInline:c,defaultedRange:d,defaultedMultiDates:u}=Ze(r),{isTimeValid:h,isMonthValid:p}=co(r),{buildMatrix:m}=io(),f=o.ref(null),g=o.ref(null),x=o.ref(!1),E=o.ref({}),C=o.ref(null),T=o.ref(null);o.onMounted(()=>{r.arrowNavigation&&m([mt(f),mt(g)],"actionRow"),F(),window.addEventListener("resize",F)}),o.onUnmounted(()=>{window.removeEventListener("resize",F)});const F=()=>{x.value=!1,setTimeout(()=>{var w,k;const _=(w=C.value)==null?void 0:w.getBoundingClientRect(),A=(k=T.value)==null?void 0:k.getBoundingClientRect();_&&A&&(E.value.maxWidth=`${A.width-_.width-20}px`),x.value=!0},0)},I=o.computed(()=>d.value.enabled&&!d.value.partialRange&&r.internalModelValue?r.internalModelValue.length===2:!0),O=o.computed(()=>!h.value(r.internalModelValue)||!p.value(r.internalModelValue)||!I.value),P=()=>{const w=s.value;return r.timePicker||r.monthPicker,w(bt(r.internalModelValue))},M=()=>{const w=r.internalModelValue;return i.value.count>0?`${v(w[0])} - ${v(w[1])}`:[v(w[0]),v(w[1])]},v=w=>bp(w,s.value,r.formatLocale,l.value.rangeSeparator,r.modelAuto,s.value),b=o.computed(()=>!r.internalModelValue||!r.menuMount?"":typeof s.value=="string"?Array.isArray(r.internalModelValue)?r.internalModelValue.length===2&&r.internalModelValue[1]?M():u.value.enabled?r.internalModelValue.map(w=>`${v(w)}`):r.modelAuto?`${v(r.internalModelValue[0])}`:`${v(r.internalModelValue[0])} -`:v(r.internalModelValue):P()),D=()=>u.value.enabled?"; ":" - ",Y=o.computed(()=>Array.isArray(b.value)?b.value.join(D()):b.value),K=()=>{h.value(r.internalModelValue)&&p.value(r.internalModelValue)&&I.value?t("select-date"):t("invalid-select")};return(w,k)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"actionRowRef",ref:T,class:"dp__action_row"},[w.$slots["action-row"]?o.renderSlot(w.$slots,"action-row",o.normalizeProps(o.mergeProps({key:0},{internalModelValue:w.internalModelValue,disabled:O.value,selectDate:()=>w.$emit("select-date"),closePicker:()=>w.$emit("close-picker")}))):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.unref(a).showPreview?(o.openBlock(),o.createElementBlock("div",{key:0,class:"dp__selection_preview",title:Y.value,style:o.normalizeStyle(E.value)},[w.$slots["action-preview"]&&x.value?o.renderSlot(w.$slots,"action-preview",{key:0,value:w.internalModelValue}):o.createCommentVNode("",!0),!w.$slots["action-preview"]&&x.value?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(Y.value),1)],64)):o.createCommentVNode("",!0)],12,G1)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"actionBtnContainer",ref:C,class:"dp__action_buttons","data-dp-element":"action-row"},[w.$slots["action-buttons"]?o.renderSlot(w.$slots,"action-buttons",{key:0,value:w.internalModelValue}):o.createCommentVNode("",!0),w.$slots["action-buttons"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[!o.unref(c).enabled&&o.unref(a).showCancel?(o.openBlock(),o.createElementBlock("button",{key:0,ref_key:"cancelButtonRef",ref:f,type:"button",class:"dp__action_button dp__action_cancel",onClick:k[0]||(k[0]=_=>w.$emit("close-picker")),onKeydown:k[1]||(k[1]=_=>o.unref(Ot)(_,()=>w.$emit("close-picker")))},o.toDisplayString(w.cancelText),545)):o.createCommentVNode("",!0),o.unref(a).showNow?(o.openBlock(),o.createElementBlock("button",{key:1,type:"button",class:"dp__action_button dp__action_cancel",onClick:k[2]||(k[2]=_=>w.$emit("select-now")),onKeydown:k[3]||(k[3]=_=>o.unref(Ot)(_,()=>w.$emit("select-now")))},o.toDisplayString(w.nowButtonLabel),33)):o.createCommentVNode("",!0),o.unref(a).showSelect?(o.openBlock(),o.createElementBlock("button",{key:2,ref_key:"selectButtonRef",ref:g,type:"button",class:"dp__action_button dp__action_select",disabled:O.value,"data-test-id":"select-button",onKeydown:k[4]||(k[4]=_=>o.unref(Ot)(_,()=>K())),onClick:K},o.toDisplayString(w.selectText),41,K1)):o.createCommentVNode("",!0)],64))],512)],64))],512))}}),Q1=["role","aria-label","tabindex"],Z1={class:"dp__selection_grid_header"},J1=["aria-selected","aria-disabled","data-test-id","onClick","onKeydown","onMouseover"],ew=["aria-label"],Gr=o.defineComponent({__name:"SelectionOverlay",props:{items:{},type:{},isLast:{type:Boolean},arrowNavigation:{type:Boolean},skipButtonRef:{type:Boolean},headerRefs:{},hideNavigation:{},escClose:{type:Boolean},useRelative:{type:Boolean},height:{},textInput:{type:[Boolean,Object]},config:{},noOverlayFocus:{type:Boolean},focusValue:{},menuWrapRef:{},ariaLabels:{},overlayLabel:{}},emits:["selected","toggle","reset-flow","hover-value"],setup(n,{expose:e,emit:t}){const{setSelectionGrid:r,buildMultiLevelMatrix:a,setMonthPicker:s}=io(),i=t,l=n,{defaultedAriaLabels:c,defaultedTextInput:d,defaultedConfig:u,handleEventPropagation:h}=Ze(l),{hideNavigationButtons:p}=ds(),m=o.ref(!1),f=o.ref(null),g=o.ref(null),x=o.ref([]),E=o.ref(),C=o.ref(null),T=o.ref(0),F=o.ref(null);o.onBeforeUpdate(()=>{f.value=null}),o.onMounted(()=>{o.nextTick().then(()=>Y()),l.noOverlayFocus||O(),I(!0)}),o.onUnmounted(()=>I(!1));const I=$=>{var R;l.arrowNavigation&&((R=l.headerRefs)!=null&&R.length?s($):r($))},O=()=>{var $;const R=mt(g);R&&(d.value.enabled||(f.value?($=f.value)==null||$.focus({preventScroll:!0}):R.focus({preventScroll:!0})),m.value=R.clientHeight<R.scrollHeight)},P=o.computed(()=>({dp__overlay:!0,"dp--overlay-absolute":!l.useRelative,"dp--overlay-relative":l.useRelative})),M=o.computed(()=>l.useRelative?{height:`${l.height}px`,width:"var(--dp-menu-min-width)"}:void 0),v=o.computed(()=>({dp__overlay_col:!0})),b=o.computed(()=>({dp__btn:!0,dp__button:!0,dp__overlay_action:!0,dp__over_action_scroll:m.value,dp__button_bottom:l.isLast})),D=o.computed(()=>{var $,R;return{dp__overlay_container:!0,dp__container_flex:(($=l.items)==null?void 0:$.length)<=6,dp__container_block:((R=l.items)==null?void 0:R.length)>6}});o.watch(()=>l.items,()=>Y(!1),{deep:!0});const Y=($=!0)=>{o.nextTick().then(()=>{const R=mt(f),W=mt(g),J=mt(C),y=mt(F),j=J?J.getBoundingClientRect().height:0;W&&(W.getBoundingClientRect().height?T.value=W.getBoundingClientRect().height-j:T.value=u.value.modeHeight-j),R&&y&&$&&(y.scrollTop=R.offsetTop-y.offsetTop-(T.value/2-R.getBoundingClientRect().height)-j)})},K=$=>{$.disabled||i("selected",$.value)},w=()=>{i("toggle"),i("reset-flow")},k=$=>{l.escClose&&(w(),h($))},_=($,R,W,J)=>{$&&((R.active||R.value===l.focusValue)&&(f.value=$),l.arrowNavigation&&(Array.isArray(x.value[W])?x.value[W][J]=$:x.value[W]=[$],A()))},A=()=>{var $,R;const W=($=l.headerRefs)!=null&&$.length?[l.headerRefs].concat(x.value):x.value.concat([l.skipButtonRef?[]:[C.value]]);a(bt(W),(R=l.headerRefs)!=null&&R.length?"monthPicker":"selectionGrid")},N=$=>{l.arrowNavigation||ro($,u.value,!0)},L=$=>{E.value=$,i("hover-value",$)},q=()=>{if(w(),!l.isLast){const $=kl(l.menuWrapRef??null,"action-row");if($){const R=lp($);R==null||R.focus()}}},z=$=>{switch($.key){case Ke.esc:return k($);case Ke.arrowLeft:return N($);case Ke.arrowRight:return N($);case Ke.arrowUp:return N($);case Ke.arrowDown:return N($);default:return}},oe=$=>{if($.key===Ke.enter)return w();if($.key===Ke.tab)return q()};return e({focusGrid:O}),($,R)=>{var W;return o.openBlock(),o.createElementBlock("div",{ref_key:"gridWrapRef",ref:g,class:o.normalizeClass(P.value),style:o.normalizeStyle(M.value),role:$.useRelative?void 0:"dialog","aria-label":$.overlayLabel,tabindex:$.useRelative?void 0:"0",onKeydown:z,onClick:R[0]||(R[0]=o.withModifiers(()=>{},["prevent"]))},[o.createElementVNode("div",{ref_key:"containerRef",ref:F,class:o.normalizeClass(D.value),style:o.normalizeStyle({"--dp-overlay-height":`${T.value}px`}),role:"grid"},[o.createElementVNode("div",Z1,[o.renderSlot($.$slots,"header")]),$.$slots.overlay?o.renderSlot($.$slots,"overlay",{key:0}):(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:1},o.renderList($.items,(J,y)=>(o.openBlock(),o.createElementBlock("div",{key:y,class:o.normalizeClass(["dp__overlay_row",{dp__flex_row:$.items.length>=3}]),role:"row"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(J,(j,se)=>(o.openBlock(),o.createElementBlock("div",{key:j.value,ref_for:!0,ref:_e=>_(_e,j,y,se),role:"gridcell",class:o.normalizeClass(v.value),"aria-selected":j.active||void 0,"aria-disabled":j.disabled||void 0,tabindex:"0","data-test-id":j.text,onClick:o.withModifiers(_e=>K(j),["prevent"]),onKeydown:_e=>o.unref(Ot)(_e,()=>K(j),!0),onMouseover:_e=>L(j.value)},[o.createElementVNode("div",{class:o.normalizeClass(j.className)},[$.$slots.item?o.renderSlot($.$slots,"item",{key:0,item:j}):o.createCommentVNode("",!0),$.$slots.item?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(j.text),1)],64))],2)],42,J1))),128))],2))),128))],6),$.$slots["button-icon"]?o.withDirectives((o.openBlock(),o.createElementBlock("button",{key:0,ref_key:"toggleButton",ref:C,type:"button","aria-label":(W=o.unref(c))==null?void 0:W.toggleOverlay,class:o.normalizeClass(b.value),tabindex:"0",onClick:w,onKeydown:oe},[o.renderSlot($.$slots,"button-icon")],42,ew)),[[o.vShow,!o.unref(p)($.hideNavigation,$.type)]]):o.createCommentVNode("",!0)],46,Q1)}}}),tw=["data-dp-mobile"],ls=o.defineComponent({__name:"InstanceWrap",props:{multiCalendars:{},stretch:{type:Boolean},collapse:{type:Boolean},isMobile:{type:Boolean}},setup(n){const e=n,t=o.computed(()=>e.multiCalendars>0?[...Array(e.multiCalendars).keys()]:[0]),r=o.computed(()=>({dp__instance_calendar:e.multiCalendars>0}));return(a,s)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass({dp__menu_inner:!a.stretch,"dp--menu--inner-stretched":a.stretch,dp__flex_display:a.multiCalendars>0,"dp--flex-display-collapsed":a.collapse}),"data-dp-mobile":a.isMobile},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.value,(i,l)=>(o.openBlock(),o.createElementBlock("div",{key:i,class:o.normalizeClass(r.value)},[o.renderSlot(a.$slots,"default",{instance:i,index:l})],2))),128))],10,tw))}}),nw=["data-dp-element","aria-label","aria-disabled"],Kr=o.defineComponent({compatConfig:{MODE:3},__name:"ArrowBtn",props:{ariaLabel:{},elName:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(n,{emit:e}){const t=e,r=o.ref(null);return o.onMounted(()=>t("set-ref",r)),(a,s)=>(o.openBlock(),o.createElementBlock("button",{ref_key:"elRef",ref:r,type:"button","data-dp-element":a.elName,class:"dp__btn dp--arrow-btn-nav",tabindex:"0","aria-label":a.ariaLabel,"aria-disabled":a.disabled||void 0,onClick:s[0]||(s[0]=i=>a.$emit("activate")),onKeydown:s[1]||(s[1]=i=>o.unref(Ot)(i,()=>a.$emit("activate"),!0))},[o.createElementVNode("span",{class:o.normalizeClass(["dp__inner_nav",{dp__inner_nav_disabled:a.disabled}])},[o.renderSlot(a.$slots,"default")],2)],40,nw))}}),ow=["aria-label","data-test-id"],Sp=o.defineComponent({__name:"YearModePicker",props:{...dn,showYearPicker:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},instance:{type:Number,default:0},year:{type:Number,default:0},isDisabled:{type:Function,default:()=>!1}},emits:["toggle-year-picker","year-select","handle-year"],setup(n,{emit:e}){const t=e,r=n,{showRightIcon:a,showLeftIcon:s}=ds(),{defaultedConfig:i,defaultedMultiCalendars:l,defaultedAriaLabels:c,defaultedTransitions:d,defaultedUI:u}=Ze(r),{showTransition:h,transitionName:p}=Xr(d),m=o.ref(!1),f=(E=!1,C)=>{m.value=!m.value,t("toggle-year-picker",{flow:E,show:C})},g=E=>{m.value=!1,t("year-select",E)},x=(E=!1)=>{t("handle-year",E)};return(E,C)=>{var T,F,I,O,P;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",{class:o.normalizeClass(["dp--year-mode-picker",{"dp--hidden-el":m.value}])},[o.unref(s)(o.unref(l),n.instance)?(o.openBlock(),o.createBlock(Kr,{key:0,ref:"mpPrevIconRef","aria-label":(T=o.unref(c))==null?void 0:T.prevYear,disabled:n.isDisabled(!1),class:o.normalizeClass((F=o.unref(u))==null?void 0:F.navBtnPrev),onActivate:C[0]||(C[0]=M=>x(!1))},{default:o.withCtx(()=>[E.$slots["arrow-left"]?o.renderSlot(E.$slots,"arrow-left",{key:0}):o.createCommentVNode("",!0),E.$slots["arrow-left"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(dl),{key:1}))]),_:3},8,["aria-label","disabled","class"])):o.createCommentVNode("",!0),o.createElementVNode("button",{ref:"mpYearButtonRef",class:"dp__btn dp--year-select",type:"button","aria-label":`${n.year}-${(I=o.unref(c))==null?void 0:I.openYearsOverlay}`,"data-test-id":`year-mode-btn-${n.instance}`,onClick:C[1]||(C[1]=()=>f(!1)),onKeydown:C[2]||(C[2]=o.withKeys(()=>f(!1),["enter"]))},[E.$slots.year?o.renderSlot(E.$slots,"year",{key:0,year:n.year}):o.createCommentVNode("",!0),E.$slots.year?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(n.year),1)],64))],40,ow),o.unref(a)(o.unref(l),n.instance)?(o.openBlock(),o.createBlock(Kr,{key:1,ref:"mpNextIconRef","aria-label":(O=o.unref(c))==null?void 0:O.nextYear,disabled:n.isDisabled(!0),class:o.normalizeClass((P=o.unref(u))==null?void 0:P.navBtnNext),onActivate:C[3]||(C[3]=M=>x(!0))},{default:o.withCtx(()=>[E.$slots["arrow-right"]?o.renderSlot(E.$slots,"arrow-right",{key:0}):o.createCommentVNode("",!0),E.$slots["arrow-right"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(ul),{key:1}))]),_:3},8,["aria-label","disabled","class"])):o.createCommentVNode("",!0)],2),o.createVNode(o.Transition,{name:o.unref(p)(n.showYearPicker),css:o.unref(h)},{default:o.withCtx(()=>{var M,v;return[n.showYearPicker?(o.openBlock(),o.createBlock(Gr,{key:0,items:n.items,"text-input":E.textInput,"esc-close":E.escClose,config:E.config,"is-last":E.autoApply&&!o.unref(i).keepActionRow,"hide-navigation":E.hideNavigation,"aria-labels":E.ariaLabels,"overlay-label":(v=(M=o.unref(c))==null?void 0:M.yearPicker)==null?void 0:v.call(M,!0),type:"year",onToggle:f,onSelected:C[4]||(C[4]=b=>g(b))},o.createSlots({"button-icon":o.withCtx(()=>[E.$slots["calendar-icon"]?o.renderSlot(E.$slots,"calendar-icon",{key:0}):o.createCommentVNode("",!0),E.$slots["calendar-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(sr),{key:1}))]),_:2},[E.$slots["year-overlay-value"]?{name:"item",fn:o.withCtx(({item:b})=>[o.renderSlot(E.$slots,"year-overlay-value",{text:b.text,value:b.value})]),key:"0"}:void 0]),1032,["items","text-input","esc-close","config","is-last","hide-navigation","aria-labels","overlay-label"])):o.createCommentVNode("",!0)]}),_:3},8,["name","css"])],64)}}}),Il=(n,e,t)=>{if(e.value&&Array.isArray(e.value))if(e.value.some(r=>Le(n,r))){const r=e.value.filter(a=>!Le(a,n));e.value=r.length?r:null}else(t&&+t>e.value.length||!t)&&e.value.push(n);else e.value=[n]},Nl=(n,e,t)=>{let r=n.value?n.value.slice():[];return r.length===2&&r[1]!==null&&(r=[]),r.length?(st(e,r[0])?r.unshift(e):r[1]=e,t("range-end",e)):(r=[e],t("range-start",e)),r},cs=(n,e,t,r)=>{n&&(n[0]&&n[1]&&t&&e("auto-apply"),n[0]&&!n[1]&&r&&t&&e("auto-apply"))},xp=n=>{Array.isArray(n.value)&&n.value.length<=2&&n.range?n.modelValue.value=n.value.map(e=>zt(ne(e),n.timezone)):Array.isArray(n.value)||(n.modelValue.value=zt(ne(n.value),n.timezone))},Bp=(n,e,t,r)=>Array.isArray(e.value)&&(e.value.length===2||e.value.length===1&&r.value.partialRange)?r.value.fixedStart&&(dt(n,e.value[0])||Le(n,e.value[0]))?[e.value[0],n]:r.value.fixedEnd&&(st(n,e.value[1])||Le(n,e.value[1]))?[n,e.value[1]]:(t("invalid-fixed-range",n),e.value):[],Tp=({multiCalendars:n,range:e,highlight:t,propDates:r,calendars:a,modelValue:s,props:i,filters:l,year:c,month:d,emit:u})=>{const h=o.computed(()=>yl(i.yearRange,i.locale,i.reverseYears)),p=o.ref([!1]),m=o.computed(()=>(b,D)=>{const Y=qe(cn(new Date),{month:d.value(b),year:c.value(b)}),K=D?Nh(Y):Hr(Y);return yp(K,r.value.maxDate,r.value.minDate,i.preventMinMaxNavigation,D)}),f=()=>Array.isArray(s.value)&&n.value.solo&&s.value[1],g=()=>{for(let b=0;b<n.value.count;b++)if(b===0)a.value[b]=a.value[0];else if(b===n.value.count-1&&f())a.value[b]={month:Pe(s.value[1]),year:Te(s.value[1])};else{const D=qe(ne(),a.value[b-1]);a.value[b]={month:Pe(D),year:Te(el(D,1))}}},x=b=>{if(!b)return g();const D=qe(ne(),a.value[b]);return a.value[0].year=Te(tp(D,n.value.count-1)),g()},E=(b,D)=>{const Y=fk(D,b);return e.value.showLastInRange&&Y>1?D:b},C=b=>i.focusStartDate||n.value.solo?b[0]:b[1]?E(b[0],b[1]):b[0],T=()=>{if(s.value){const b=Array.isArray(s.value)?C(s.value):s.value;a.value[0]={month:Pe(b),year:Te(b)}}},F=()=>{T(),n.value.count&&g()};o.watch(s,(b,D)=>{i.isTextInputDate&&JSON.stringify(b??{})!==JSON.stringify(D??{})&&F()}),o.onMounted(()=>{F()});const I=(b,D)=>{a.value[D].year=b,u("update-month-year",{instance:D,year:b,month:a.value[D].month}),n.value.count&&!n.value.solo&&x(D)},O=o.computed(()=>b=>lr(h.value,D=>{var Y;const K=c.value(b)===D.value,w=Ur(D.value,cr(r.value.minDate),cr(r.value.maxDate))||((Y=l.value.years)==null?void 0:Y.includes(c.value(b))),k=Bl(t.value,D.value);return{active:K,disabled:w,highlighted:k}})),P=(b,D)=>{I(b,D),v(D)},M=(b,D=!1)=>{if(!m.value(b,D)){const Y=D?c.value(b)+1:c.value(b)-1;I(Y,b)}},v=(b,D=!1,Y)=>{D||u("reset-flow"),Y!==void 0?p.value[b]=Y:p.value[b]=!p.value[b],p.value[b]?u("overlay-toggle",{open:!0,overlay:xt.year}):(u("overlay-closed"),u("overlay-toggle",{open:!1,overlay:xt.year}))};return{isDisabled:m,groupedYears:O,showYearPicker:p,selectYear:I,toggleYearPicker:v,handleYearSelect:P,handleYear:M}},rw=(n,e)=>{const{defaultedMultiCalendars:t,defaultedAriaLabels:r,defaultedTransitions:a,defaultedConfig:s,defaultedRange:i,defaultedHighlight:l,propDates:c,defaultedTz:d,defaultedFilters:u,defaultedMultiDates:h}=Ze(n),p=()=>{n.isTextInputDate&&F(Te(ne(n.startDate)),0)},{modelValue:m,year:f,month:g,calendars:x}=Qr(n,e,p),E=o.computed(()=>rp(n.formatLocale,n.locale,n.monthNameFormat)),C=o.ref(null),{checkMinMaxRange:T}=co(n),{selectYear:F,groupedYears:I,showYearPicker:O,toggleYearPicker:P,handleYearSelect:M,handleYear:v,isDisabled:b}=Tp({modelValue:m,multiCalendars:t,range:i,highlight:l,calendars:x,year:f,propDates:c,month:g,filters:u,props:n,emit:e});o.onMounted(()=>{n.startDate&&(m.value&&n.focusStartDate||!m.value)&&F(Te(ne(n.startDate)),0)});const D=R=>R?{month:Pe(R),year:Te(R)}:{month:null,year:null},Y=()=>m.value?Array.isArray(m.value)?m.value.map(R=>D(R)):D(m.value):D(),K=(R,W)=>{const J=x.value[R],y=Y();return Array.isArray(y)?y.some(j=>j.year===(J==null?void 0:J.year)&&j.month===W):(J==null?void 0:J.year)===y.year&&W===y.month},w=(R,W,J)=>{var y,j;const se=Y();return Array.isArray(se)?f.value(W)===((y=se[J])==null?void 0:y.year)&&R===((j=se[J])==null?void 0:j.month):!1},k=(R,W)=>{if(i.value.enabled){const J=Y();if(Array.isArray(m.value)&&Array.isArray(J)){const y=w(R,W,0)||w(R,W,1),j=Fn(cn(ne()),R,f.value(W));return Wr(m.value,C.value,j)&&!y}return!1}return!1},_=o.computed(()=>R=>lr(E.value,W=>{var J;const y=K(R,W.value),j=Ur(W.value,pp(f.value(R),c.value.minDate),fp(f.value(R),c.value.maxDate))||B1(c.value.disabledDates,f.value(R),W.value)||((J=u.value.months)==null?void 0:J.includes(W.value))||!T1(c.value.allowedDates,f.value(R),W.value),se=k(W.value,R),_e=vp(l.value,W.value,f.value(R));return{active:y,disabled:j,isBetween:se,highlighted:_e}})),A=(R,W)=>Fn(cn(ne()),R,f.value(W)),N=(R,W)=>{const J=m.value?m.value:cn(new Date);m.value=Fn(J,R,f.value(W)),e("auto-apply"),e("update-flow-step")},L=(R,W)=>{const J=A(R,W);i.value.fixedEnd||i.value.fixedStart?m.value=Bp(J,m,e,i):m.value?T(J,m.value)&&(m.value=Nl(m,A(R,W),e)):m.value=[A(R,W)],o.nextTick().then(()=>{cs(m.value,e,n.autoApply,n.modelAuto)})},q=(R,W)=>{Il(A(R,W),m,h.value.limit),e("auto-apply",!0)},z=(R,W)=>(x.value[W].month=R,$(W,x.value[W].year,R),h.value.enabled?q(R,W):i.value.enabled?L(R,W):N(R,W)),oe=(R,W)=>{F(R,W),$(W,R,null)},$=(R,W,J)=>{let y=J;if(!y&&y!==0){const j=Y();y=Array.isArray(j)?j[R].month:j.month}e("update-month-year",{instance:R,year:W,month:y})};return{groupedMonths:_,groupedYears:I,year:f,isDisabled:b,defaultedMultiCalendars:t,defaultedAriaLabels:r,defaultedTransitions:a,defaultedConfig:s,showYearPicker:O,modelValue:m,presetDate:(R,W)=>{xp({value:R,modelValue:m,range:i.value.enabled,timezone:W?void 0:d.value.timezone}),e("auto-apply")},setHoverDate:(R,W)=>{C.value=A(R,W)},selectMonth:z,selectYear:oe,toggleYearPicker:P,handleYearSelect:M,handleYear:v,getModelMonthYear:Y}},aw=o.defineComponent({compatConfig:{MODE:3},__name:"MonthPicker",props:{...dn},emits:["update:internal-model-value","overlay-closed","reset-flow","range-start","range-end","auto-apply","update-month-year","update-flow-step","mount","invalid-fixed-range","overlay-toggle"],setup(n,{expose:e,emit:t}){const r=t,a=o.useSlots(),s=Ut(a,"yearMode"),i=n;o.onMounted(()=>{i.shadow||r("mount",null)});const{groupedMonths:l,groupedYears:c,year:d,isDisabled:u,defaultedMultiCalendars:h,defaultedConfig:p,showYearPicker:m,modelValue:f,presetDate:g,setHoverDate:x,selectMonth:E,selectYear:C,toggleYearPicker:T,handleYearSelect:F,handleYear:I,getModelMonthYear:O}=rw(i,r);return e({getSidebarProps:()=>({modelValue:f,year:d,getModelMonthYear:O,selectMonth:E,selectYear:C,handleYear:I}),presetDate:g,toggleYearPicker:P=>T(0,P)}),(P,M)=>(o.openBlock(),o.createBlock(ls,{"multi-calendars":o.unref(h).count,collapse:P.collapse,stretch:"","is-mobile":P.isMobile},{default:o.withCtx(({instance:v})=>[P.$slots["top-extra"]?o.renderSlot(P.$slots,"top-extra",{key:0,value:P.internalModelValue}):o.createCommentVNode("",!0),P.$slots["month-year"]?o.renderSlot(P.$slots,"month-year",o.normalizeProps(o.mergeProps({key:1},{year:o.unref(d),months:o.unref(l)(v),years:o.unref(c)(v),selectMonth:o.unref(E),selectYear:o.unref(C),instance:v}))):(o.openBlock(),o.createBlock(Gr,{key:2,items:o.unref(l)(v),"arrow-navigation":P.arrowNavigation,"is-last":P.autoApply&&!o.unref(p).keepActionRow,"esc-close":P.escClose,height:o.unref(p).modeHeight,config:P.config,"no-overlay-focus":!!(P.noOverlayFocus||P.textInput),"use-relative":"",type:"month",onSelected:b=>o.unref(E)(b,v),onHoverValue:b=>o.unref(x)(b,v)},o.createSlots({header:o.withCtx(()=>[o.createVNode(Sp,o.mergeProps(P.$props,{items:o.unref(c)(v),instance:v,"show-year-picker":o.unref(m)[v],year:o.unref(d)(v),"is-disabled":b=>o.unref(u)(v,b),onHandleYear:b=>o.unref(I)(v,b),onYearSelect:b=>o.unref(F)(b,v),onToggleYearPicker:b=>o.unref(T)(v,b==null?void 0:b.flow,b==null?void 0:b.show)}),o.createSlots({_:2},[o.renderList(o.unref(s),(b,D)=>({name:b,fn:o.withCtx(Y=>[o.renderSlot(P.$slots,b,o.normalizeProps(o.guardReactiveProps(Y)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),_:2},[P.$slots["month-overlay-value"]?{name:"item",fn:o.withCtx(({item:b})=>[o.renderSlot(P.$slots,"month-overlay-value",{text:b.text,value:b.value})]),key:"0"}:void 0]),1032,["items","arrow-navigation","is-last","esc-close","height","config","no-overlay-focus","onSelected","onHoverValue"]))]),_:3},8,["multi-calendars","collapse","is-mobile"]))}}),sw=(n,e)=>{const t=()=>{n.isTextInputDate&&(u.value=Te(ne(n.startDate)))},{modelValue:r}=Qr(n,e,t),a=o.ref(null),{defaultedHighlight:s,defaultedMultiDates:i,defaultedFilters:l,defaultedRange:c,propDates:d}=Ze(n),u=o.ref();o.onMounted(()=>{n.startDate&&(r.value&&n.focusStartDate||!r.value)&&(u.value=Te(ne(n.startDate)))});const h=E=>Array.isArray(r.value)?r.value.some(C=>Te(C)===E):r.value?Te(r.value)===E:!1,p=E=>c.value.enabled&&Array.isArray(r.value)?Wr(r.value,a.value,x(E)):!1,m=E=>d.value.allowedDates instanceof Map?d.value.allowedDates.size?d.value.allowedDates.has(`${E}`):!1:!0,f=E=>d.value.disabledDates instanceof Map?d.value.disabledDates.size?d.value.disabledDates.has(`${E}`):!1:!0,g=o.computed(()=>lr(yl(n.yearRange,n.locale,n.reverseYears),E=>{const C=h(E.value),T=Ur(E.value,cr(d.value.minDate),cr(d.value.maxDate))||l.value.years.includes(E.value)||!m(E.value)||f(E.value),F=p(E.value)&&!C,I=Bl(s.value,E.value);return{active:C,disabled:T,isBetween:F,highlighted:I}})),x=E=>wn(cn(Hr(new Date)),E);return{groupedYears:g,modelValue:r,focusYear:u,setHoverValue:E=>{a.value=wn(cn(new Date),E)},selectYear:E=>{var C;if(e("update-month-year",{instance:0,year:E}),i.value.enabled)return r.value?Array.isArray(r.value)&&(((C=r.value)==null?void 0:C.map(T=>Te(T))).includes(E)?r.value=r.value.filter(T=>Te(T)!==E):r.value.push(wn(kt(ne()),E))):r.value=[wn(kt(Hr(ne())),E)],e("auto-apply",!0);c.value.enabled?(r.value=Nl(r,x(E),e),o.nextTick().then(()=>{cs(r.value,e,n.autoApply,n.modelAuto)})):(r.value=x(E),e("auto-apply"))}}},iw=o.defineComponent({compatConfig:{MODE:3},__name:"YearPicker",props:{...dn},emits:["update:internal-model-value","reset-flow","range-start","range-end","auto-apply","update-month-year"],setup(n,{expose:e,emit:t}){const r=t,a=n,{groupedYears:s,modelValue:i,focusYear:l,selectYear:c,setHoverValue:d}=sw(a,r),{defaultedConfig:u}=Ze(a);return e({getSidebarProps:()=>({modelValue:i,selectYear:c})}),(h,p)=>(o.openBlock(),o.createElementBlock("div",null,[h.$slots["top-extra"]?o.renderSlot(h.$slots,"top-extra",{key:0,value:h.internalModelValue}):o.createCommentVNode("",!0),h.$slots["month-year"]?o.renderSlot(h.$slots,"month-year",o.normalizeProps(o.mergeProps({key:1},{years:o.unref(s),selectYear:o.unref(c)}))):(o.openBlock(),o.createBlock(Gr,{key:2,items:o.unref(s),"is-last":h.autoApply&&!o.unref(u).keepActionRow,height:o.unref(u).modeHeight,config:h.config,"no-overlay-focus":!!(h.noOverlayFocus||h.textInput),"focus-value":o.unref(l),type:"year","use-relative":"",onSelected:o.unref(c),onHoverValue:o.unref(d)},o.createSlots({_:2},[h.$slots["year-overlay-value"]?{name:"item",fn:o.withCtx(({item:m})=>[o.renderSlot(h.$slots,"year-overlay-value",{text:m.text,value:m.value})]),key:"0"}:void 0]),1032,["items","is-last","height","config","no-overlay-focus","focus-value","onSelected","onHoverValue"]))]))}}),lw={key:0,class:"dp__time_input"},cw=["data-compact","data-collapsed"],dw=["data-test-id","aria-label","onKeydown","onClick","onMousedown"],uw=["aria-label","disabled","data-test-id","onKeydown","onClick"],hw=["data-test-id","aria-label","onKeydown","onClick","onMousedown"],pw={key:0},fw=["aria-label","data-compact"],mw=o.defineComponent({compatConfig:{MODE:3},__name:"TimeInput",props:{hours:{type:Number,default:0},minutes:{type:Number,default:0},seconds:{type:Number,default:0},closeTimePickerBtn:{type:Object,default:null},order:{type:Number,default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...dn},emits:["set-hours","set-minutes","update:hours","update:minutes","update:seconds","reset-flow","mounted","overlay-closed","overlay-opened","am-pm-change"],setup(n,{expose:e,emit:t}){const r=t,a=n,{setTimePickerElements:s,setTimePickerBackRef:i}=io(),{defaultedAriaLabels:l,defaultedTransitions:c,defaultedFilters:d,defaultedConfig:u,defaultedRange:h,defaultedMultiCalendars:p}=Ze(a),{transitionName:m,showTransition:f}=Xr(c),g=o.reactive({hours:!1,minutes:!1,seconds:!1}),x=o.ref("AM"),E=o.ref(null),C=o.ref([]),T=o.ref(),F=o.ref(!1);o.onMounted(()=>{r("mounted")});const I=S=>qe(new Date,{hours:S.hours,minutes:S.minutes,seconds:a.enableSeconds?S.seconds:0,milliseconds:0}),O=o.computed(()=>S=>L(S,a[S])||M(S,a[S])),P=o.computed(()=>({hours:a.hours,minutes:a.minutes,seconds:a.seconds})),M=(S,ie)=>h.value.enabled&&!h.value.disableTimeRangeValidation?!a.validateTime(S,ie):!1,v=(S,ie)=>{if(h.value.enabled&&!h.value.disableTimeRangeValidation){const ce=ie?+a[`${S}Increment`]:-+a[`${S}Increment`],de=a[S]+ce;return!a.validateTime(S,de)}return!1},b=o.computed(()=>S=>!R(+a[S]+ +a[`${S}Increment`],S)||v(S,!0)),D=o.computed(()=>S=>!R(+a[S]-+a[`${S}Increment`],S)||v(S,!1)),Y=(S,ie)=>xh(qe(ne(),S),ie),K=(S,ie)=>i1(qe(ne(),S),ie),w=o.computed(()=>({dp__time_col:!0,dp__time_col_block:!a.timePickerInline,dp__time_col_reg_block:!a.enableSeconds&&a.is24&&!a.timePickerInline,dp__time_col_reg_inline:!a.enableSeconds&&a.is24&&a.timePickerInline,dp__time_col_reg_with_button:!a.enableSeconds&&!a.is24,dp__time_col_sec:a.enableSeconds&&a.is24,dp__time_col_sec_with_button:a.enableSeconds&&!a.is24})),k=o.computed(()=>a.timePickerInline&&h.value.enabled&&!p.value.count),_=o.computed(()=>{const S=[{type:"hours"}];return a.enableMinutes&&S.push({type:"",separator:!0},{type:"minutes"}),a.enableSeconds&&S.push({type:"",separator:!0},{type:"seconds"}),S}),A=o.computed(()=>_.value.filter(S=>!S.separator)),N=o.computed(()=>S=>{if(S==="hours"){const ie=_e(+a.hours);return{text:ie<10?`0${ie}`:`${ie}`,value:ie}}return{text:a[S]<10?`0${a[S]}`:`${a[S]}`,value:a[S]}}),L=(S,ie)=>{var ce;if(!a.disabledTimesConfig)return!1;const de=a.disabledTimesConfig(a.order,S==="hours"?ie:void 0);return de[S]?!!((ce=de[S])!=null&&ce.includes(ie)):!0},q=(S,ie)=>ie!=="hours"||x.value==="AM"?S:S+12,z=S=>{const ie=a.is24?24:12,ce=S==="hours"?ie:60,de=+a[`${S}GridIncrement`],Ne=S==="hours"&&!a.is24?de:0,Ae=[];for(let Ve=Ne;Ve<ce;Ve+=de)Ae.push({value:a.is24?Ve:q(Ve,S),text:Ve<10?`0${Ve}`:`${Ve}`});return S==="hours"&&!a.is24&&Ae.unshift({value:x.value==="PM"?12:0,text:"12"}),lr(Ae,Ve=>({active:!1,disabled:d.value.times[S].includes(Ve.value)||!R(Ve.value,S)||L(S,Ve.value)||M(S,Ve.value)}))},oe=S=>S>=0?S:59,$=S=>S>=0?S:23,R=(S,ie)=>{const ce=a.minTime?I(_l(a.minTime)):null,de=a.maxTime?I(_l(a.maxTime)):null,Ne=I(_l(P.value,ie,ie==="minutes"||ie==="seconds"?oe(S):$(S)));return ce&&de?(or(Ne,de)||rr(Ne,de))&&(Mo(Ne,ce)||rr(Ne,ce)):ce?Mo(Ne,ce)||rr(Ne,ce):de?or(Ne,de)||rr(Ne,de):!0},W=S=>a[`no${S[0].toUpperCase()+S.slice(1)}Overlay`],J=S=>{W(S)||(g[S]=!g[S],g[S]?(F.value=!0,r("overlay-opened",S)):(F.value=!1,r("overlay-closed",S)))},y=S=>S==="hours"?Ln:S==="minutes"?oo:nr,j=()=>{T.value&&clearTimeout(T.value)},se=(S,ie=!0,ce)=>{const de=ie?Y:K,Ne=ie?+a[`${S}Increment`]:-+a[`${S}Increment`];R(+a[S]+Ne,S)&&r(`update:${S}`,y(S)(de({[S]:+a[S]},{[S]:+a[`${S}Increment`]}))),!(ce!=null&&ce.keyboard)&&u.value.timeArrowHoldThreshold&&(T.value=setTimeout(()=>{se(S,ie)},u.value.timeArrowHoldThreshold))},_e=S=>a.is24?S:(S>=12?x.value="PM":x.value="AM",f1(S)),U=()=>{x.value==="PM"?(x.value="AM",r("update:hours",a.hours-12)):(x.value="PM",r("update:hours",a.hours+12)),r("am-pm-change",x.value)},xe=S=>{g[S]=!0},te=(S,ie,ce)=>{if(S&&a.arrowNavigation){Array.isArray(C.value[ie])?C.value[ie][ce]=S:C.value[ie]=[S];const de=C.value.reduce((Ne,Ae)=>Ae.map((Ve,nt)=>[...Ne[nt]||[],Ae[nt]]),[]);i(a.closeTimePickerBtn),E.value&&(de[1]=de[1].concat(E.value)),s(de,a.order)}},le=(S,ie)=>(J(S),r(`update:${S}`,ie));return e({openChildCmp:xe}),(S,ie)=>{var ce;return S.disabled?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",lw,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(_.value,(de,Ne)=>{var Ae,Ve,nt;return o.openBlock(),o.createElementBlock("div",{key:Ne,class:o.normalizeClass(w.value),"data-compact":k.value&&!S.enableSeconds,"data-collapsed":k.value&&S.enableSeconds},[de.separator?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[F.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createTextVNode(":")],64))],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("button",{ref_for:!0,ref:V=>te(V,Ne,0),type:"button",class:o.normalizeClass({dp__btn:!0,dp__inc_dec_button:!S.timePickerInline,dp__inc_dec_button_inline:S.timePickerInline,dp__tp_inline_btn_top:S.timePickerInline,dp__inc_dec_button_disabled:b.value(de.type),"dp--hidden-el":F.value}),"data-test-id":`${de.type}-time-inc-btn-${a.order}`,"aria-label":(Ae=o.unref(l))==null?void 0:Ae.incrementValue(de.type),tabindex:"0",onKeydown:V=>o.unref(Ot)(V,()=>se(de.type,!0,{keyboard:!0}),!0),onClick:V=>o.unref(u).timeArrowHoldThreshold?void 0:se(de.type,!0),onMousedown:V=>o.unref(u).timeArrowHoldThreshold?se(de.type,!0):void 0,onMouseup:j},[a.timePickerInline?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[S.$slots["tp-inline-arrow-up"]?o.renderSlot(S.$slots,"tp-inline-arrow-up",{key:0}):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[ie[2]||(ie[2]=o.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1)),ie[3]||(ie[3]=o.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1))],64))],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[S.$slots["arrow-up"]?o.renderSlot(S.$slots,"arrow-up",{key:0}):o.createCommentVNode("",!0),S.$slots["arrow-up"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(pl),{key:1}))],64))],42,dw),o.createElementVNode("button",{ref_for:!0,ref:V=>te(V,Ne,1),type:"button","aria-label":`${N.value(de.type).text}-${(Ve=o.unref(l))==null?void 0:Ve.openTpOverlay(de.type)}`,class:o.normalizeClass({dp__time_display:!0,dp__time_display_block:!S.timePickerInline,dp__time_display_inline:S.timePickerInline,"dp--time-invalid":O.value(de.type),"dp--time-overlay-btn":!O.value(de.type),"dp--hidden-el":F.value}),disabled:W(de.type),tabindex:"0","data-test-id":`${de.type}-toggle-overlay-btn-${a.order}`,onKeydown:V=>o.unref(Ot)(V,()=>J(de.type),!0),onClick:V=>J(de.type)},[S.$slots[de.type]?o.renderSlot(S.$slots,de.type,{key:0,text:N.value(de.type).text,value:N.value(de.type).value}):o.createCommentVNode("",!0),S.$slots[de.type]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(N.value(de.type).text),1)],64))],42,uw),o.createElementVNode("button",{ref_for:!0,ref:V=>te(V,Ne,2),type:"button",class:o.normalizeClass({dp__btn:!0,dp__inc_dec_button:!S.timePickerInline,dp__inc_dec_button_inline:S.timePickerInline,dp__tp_inline_btn_bottom:S.timePickerInline,dp__inc_dec_button_disabled:D.value(de.type),"dp--hidden-el":F.value}),"data-test-id":`${de.type}-time-dec-btn-${a.order}`,"aria-label":(nt=o.unref(l))==null?void 0:nt.decrementValue(de.type),tabindex:"0",onKeydown:V=>o.unref(Ot)(V,()=>se(de.type,!1,{keyboard:!0}),!0),onClick:V=>o.unref(u).timeArrowHoldThreshold?void 0:se(de.type,!1),onMousedown:V=>o.unref(u).timeArrowHoldThreshold?se(de.type,!1):void 0,onMouseup:j},[a.timePickerInline?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[S.$slots["tp-inline-arrow-down"]?o.renderSlot(S.$slots,"tp-inline-arrow-down",{key:0}):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[ie[4]||(ie[4]=o.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1)),ie[5]||(ie[5]=o.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1))],64))],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[S.$slots["arrow-down"]?o.renderSlot(S.$slots,"arrow-down",{key:0}):o.createCommentVNode("",!0),S.$slots["arrow-down"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(fl),{key:1}))],64))],42,hw)],64))],10,cw)}),128)),S.is24?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",pw,[S.$slots["am-pm-button"]?o.renderSlot(S.$slots,"am-pm-button",{key:0,toggle:U,value:x.value}):o.createCommentVNode("",!0),S.$slots["am-pm-button"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("button",{key:1,ref_key:"amPmButton",ref:E,type:"button",class:"dp__pm_am_button",role:"button","aria-label":(ce=o.unref(l))==null?void 0:ce.amPmButton,tabindex:"0","data-compact":k.value,onClick:U,onKeydown:ie[0]||(ie[0]=de=>o.unref(Ot)(de,()=>U(),!0))},o.toDisplayString(x.value),41,fw))])),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.value,(de,Ne)=>(o.openBlock(),o.createBlock(o.Transition,{key:Ne,name:o.unref(m)(g[de.type]),css:o.unref(f)},{default:o.withCtx(()=>{var Ae,Ve;return[g[de.type]?(o.openBlock(),o.createBlock(Gr,{key:0,items:z(de.type),"is-last":S.autoApply&&!o.unref(u).keepActionRow,"esc-close":S.escClose,type:de.type,"text-input":S.textInput,config:S.config,"arrow-navigation":S.arrowNavigation,"aria-labels":S.ariaLabels,"overlay-label":(Ve=(Ae=o.unref(l)).timeOverlay)==null?void 0:Ve.call(Ae,de.type),onSelected:nt=>le(de.type,nt),onToggle:nt=>J(de.type),onResetFlow:ie[1]||(ie[1]=nt=>S.$emit("reset-flow"))},o.createSlots({"button-icon":o.withCtx(()=>[S.$slots["clock-icon"]?o.renderSlot(S.$slots,"clock-icon",{key:0}):o.createCommentVNode("",!0),S.$slots["clock-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.resolveDynamicComponent(S.timePickerInline?o.unref(sr):o.unref(hl)),{key:1}))]),_:2},[S.$slots[`${de.type}-overlay-value`]?{name:"item",fn:o.withCtx(({item:nt})=>[o.renderSlot(S.$slots,`${de.type}-overlay-value`,{text:nt.text,value:nt.value})]),key:"0"}:void 0,S.$slots[`${de.type}-overlay-header`]?{name:"header",fn:o.withCtx(()=>[o.renderSlot(S.$slots,`${de.type}-overlay-header`,{toggle:()=>J(de.type)})]),key:"1"}:void 0]),1032,["items","is-last","esc-close","type","text-input","config","arrow-navigation","aria-labels","overlay-label","onSelected","onToggle"])):o.createCommentVNode("",!0)]}),_:2},1032,["name","css"]))),128))]))}}}),gw=["data-dp-mobile"],yw=["aria-label","tabindex"],bw=["role","aria-label","tabindex"],kw=["aria-label"],$p=o.defineComponent({compatConfig:{MODE:3},__name:"TimePicker",props:{hours:{type:[Number,Array],default:0},minutes:{type:[Number,Array],default:0},seconds:{type:[Number,Array],default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...dn},emits:["update:hours","update:minutes","update:seconds","mount","reset-flow","overlay-opened","overlay-closed","am-pm-change"],setup(n,{expose:e,emit:t}){const r=t,a=n,{buildMatrix:s,setTimePicker:i}=io(),l=o.useSlots(),{defaultedTransitions:c,defaultedAriaLabels:d,defaultedTextInput:u,defaultedConfig:h,defaultedRange:p}=Ze(a),{transitionName:m,showTransition:f}=Xr(c),{hideNavigationButtons:g}=ds(),x=o.ref(null),E=o.ref(null),C=o.ref([]),T=o.ref(null),F=o.ref(!1);o.onMounted(()=>{r("mount"),!a.timePicker&&a.arrowNavigation?s([mt(x.value)],"time"):i(!0,a.timePicker)});const I=o.computed(()=>p.value.enabled&&a.modelAuto?ap(a.internalModelValue):!0),O=o.ref(!1),P=L=>({hours:Array.isArray(a.hours)?a.hours[L]:a.hours,minutes:Array.isArray(a.minutes)?a.minutes[L]:a.minutes,seconds:Array.isArray(a.seconds)?a.seconds[L]:a.seconds}),M=o.computed(()=>{const L=[];if(p.value.enabled)for(let q=0;q<2;q++)L.push(P(q));else L.push(P(0));return L}),v=(L,q=!1,z="")=>{q||r("reset-flow"),O.value=L,r(L?"overlay-opened":"overlay-closed",xt.time),a.arrowNavigation&&i(L),o.nextTick(()=>{z!==""&&C.value[0]&&C.value[0].openChildCmp(z)})},b=o.computed(()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:a.autoApply&&!h.value.keepActionRow})),D=Ut(l,"timePicker"),Y=(L,q,z)=>p.value.enabled?q===0?[L,M.value[1][z]]:[M.value[0][z],L]:L,K=L=>{r("update:hours",L)},w=L=>{r("update:minutes",L)},k=L=>{r("update:seconds",L)},_=()=>{if(T.value&&!u.value.enabled&&!a.noOverlayFocus){const L=lp(T.value);L&&L.focus({preventScroll:!0})}},A=L=>{F.value=!1,r("overlay-closed",L)},N=L=>{F.value=!0,r("overlay-opened",L)};return e({toggleTimePicker:v}),(L,q)=>{var z;return o.openBlock(),o.createElementBlock("div",{class:"dp--tp-wrap","data-dp-mobile":L.isMobile},[!L.timePicker&&!L.timePickerInline?o.withDirectives((o.openBlock(),o.createElementBlock("button",{key:0,ref_key:"openTimePickerBtn",ref:x,type:"button",class:o.normalizeClass({...b.value,"dp--hidden-el":O.value}),"aria-label":(z=o.unref(d))==null?void 0:z.openTimePicker,tabindex:L.noOverlayFocus?void 0:0,"data-test-id":"open-time-picker-btn",onKeydown:q[0]||(q[0]=oe=>o.unref(Ot)(oe,()=>v(!0))),onClick:q[1]||(q[1]=oe=>v(!0))},[L.$slots["clock-icon"]?o.renderSlot(L.$slots,"clock-icon",{key:0}):o.createCommentVNode("",!0),L.$slots["clock-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(hl),{key:1}))],42,yw)),[[o.vShow,!o.unref(g)(L.hideNavigation,"time")]]):o.createCommentVNode("",!0),o.createVNode(o.Transition,{name:o.unref(m)(O.value),css:o.unref(f)&&!L.timePickerInline},{default:o.withCtx(()=>{var oe,$;return[O.value||L.timePicker||L.timePickerInline?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:T,role:L.timePickerInline?void 0:"dialog",class:o.normalizeClass({dp__overlay:!L.timePickerInline,"dp--overlay-absolute":!a.timePicker&&!L.timePickerInline,"dp--overlay-relative":a.timePicker}),style:o.normalizeStyle(L.timePicker?{height:`${o.unref(h).modeHeight}px`}:void 0),"aria-label":(oe=o.unref(d))==null?void 0:oe.timePicker,tabindex:L.timePickerInline?void 0:0},[o.createElementVNode("div",{class:o.normalizeClass(L.timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[L.$slots["time-picker-overlay"]?o.renderSlot(L.$slots,"time-picker-overlay",{key:0,hours:n.hours,minutes:n.minutes,seconds:n.seconds,setHours:K,setMinutes:w,setSeconds:k}):o.createCommentVNode("",!0),L.$slots["time-picker-overlay"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(L.timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(M.value,(R,W)=>o.withDirectives((o.openBlock(),o.createBlock(mw,o.mergeProps({key:W,ref_for:!0},{...L.$props,order:W,hours:R.hours,minutes:R.minutes,seconds:R.seconds,closeTimePickerBtn:E.value,disabledTimesConfig:n.disabledTimesConfig,disabled:W===0?o.unref(p).fixedStart:o.unref(p).fixedEnd},{ref_for:!0,ref_key:"timeInputRefs",ref:C,"validate-time":(J,y)=>n.validateTime(J,Y(y,W,J)),"onUpdate:hours":J=>K(Y(J,W,"hours")),"onUpdate:minutes":J=>w(Y(J,W,"minutes")),"onUpdate:seconds":J=>k(Y(J,W,"seconds")),onMounted:_,onOverlayClosed:A,onOverlayOpened:N,onAmPmChange:q[2]||(q[2]=J=>L.$emit("am-pm-change",J))}),o.createSlots({_:2},[o.renderList(o.unref(D),(J,y)=>({name:J,fn:o.withCtx(j=>[o.renderSlot(L.$slots,J,o.mergeProps({ref_for:!0},j))])}))]),1040,["validate-time","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[o.vShow,W===0?!0:I.value]])),128))],2)),!L.timePicker&&!L.timePickerInline?o.withDirectives((o.openBlock(),o.createElementBlock("button",{key:2,ref_key:"closeTimePickerBtn",ref:E,type:"button",class:o.normalizeClass({...b.value,"dp--hidden-el":F.value}),"aria-label":($=o.unref(d))==null?void 0:$.closeTimePicker,tabindex:"0",onKeydown:q[3]||(q[3]=R=>o.unref(Ot)(R,()=>v(!1))),onClick:q[4]||(q[4]=R=>v(!1))},[L.$slots["calendar-icon"]?o.renderSlot(L.$slots,"calendar-icon",{key:0}):o.createCommentVNode("",!0),L.$slots["calendar-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(sr),{key:1}))],42,kw)),[[o.vShow,!o.unref(g)(L.hideNavigation,"time")]]):o.createCommentVNode("",!0)],2)],14,bw)):o.createCommentVNode("",!0)]}),_:3},8,["name","css"])],8,gw)}}}),Mp=(n,e,t,r)=>{const{defaultedRange:a}=Ze(n),s=(T,F)=>Array.isArray(e[T])?e[T][F]:e[T],i=T=>n.enableSeconds?Array.isArray(e.seconds)?e.seconds[T]:e.seconds:0,l=(T,F)=>T?F!==void 0?ao(T,s("hours",F),s("minutes",F),i(F)):ao(T,e.hours,e.minutes,i()):ep(ne(),i(F)),c=(T,F)=>{e[T]=F},d=o.computed(()=>n.modelAuto&&a.value.enabled?Array.isArray(t.value)?t.value.length>1:!1:a.value.enabled),u=(T,F)=>{const I=Object.fromEntries(Object.keys(e).map(O=>O===T?[O,F]:[O,e[O]].slice()));if(d.value&&!a.value.disableTimeRangeValidation){const O=M=>t.value?ao(t.value[M],I.hours[M],I.minutes[M],I.seconds[M]):null,P=M=>Jh(t.value[M],0);return!(Le(O(0),O(1))&&(Mo(O(0),P(1))||or(O(1),P(0))))}return!0},h=(T,F)=>{u(T,F)&&(c(T,F),r&&r())},p=T=>{h("hours",T)},m=T=>{h("minutes",T)},f=T=>{h("seconds",T)},g=(T,F,I,O)=>{F&&p(T),!F&&!I&&m(T),I&&f(T),t.value&&O(t.value)},x=T=>{if(T){const F=Array.isArray(T),I=F?[+T[0].hours,+T[1].hours]:+T.hours,O=F?[+T[0].minutes,+T[1].minutes]:+T.minutes,P=F?[+T[0].seconds,+T[1].seconds]:+T.seconds;c("hours",I),c("minutes",O),n.enableSeconds&&c("seconds",P)}},E=(T,F)=>{const I={hours:Array.isArray(e.hours)?e.hours[T]:e.hours,disabledArr:[]};return(F||F===0)&&(I.hours=F),Array.isArray(n.disabledTimes)&&(I.disabledArr=a.value.enabled&&Array.isArray(n.disabledTimes[T])?n.disabledTimes[T]:n.disabledTimes),I},C=o.computed(()=>(T,F)=>{var I;if(Array.isArray(n.disabledTimes)){const{disabledArr:O,hours:P}=E(T,F),M=O.filter(v=>+v.hours===P);return((I=M[0])==null?void 0:I.minutes)==="*"?{hours:[P],minutes:void 0,seconds:void 0}:{hours:[],minutes:(M==null?void 0:M.map(v=>+v.minutes))??[],seconds:(M==null?void 0:M.map(v=>v.seconds?+v.seconds:void 0))??[]}}return{hours:[],minutes:[],seconds:[]}});return{setTime:c,updateHours:p,updateMinutes:m,updateSeconds:f,getSetDateTime:l,updateTimeValues:g,getSecondsValue:i,assignStartTime:x,validateTime:u,disabledTimesConfig:C}},vw=(n,e)=>{const t=()=>{n.isTextInputDate&&F()},{modelValue:r,time:a}=Qr(n,e,t),{defaultedStartTime:s,defaultedRange:i,defaultedTz:l}=Ze(n),{updateTimeValues:c,getSetDateTime:d,setTime:u,assignStartTime:h,disabledTimesConfig:p,validateTime:m}=Mp(n,a,r,f);function f(){e("update-flow-step")}const g=O=>{const{hours:P,minutes:M,seconds:v}=O;return{hours:+P,minutes:+M,seconds:v?+v:0}},x=()=>{if(n.startTime){if(Array.isArray(n.startTime)){const P=g(n.startTime[0]),M=g(n.startTime[1]);return[qe(ne(),P),qe(ne(),M)]}const O=g(n.startTime);return qe(ne(),O)}return i.value.enabled?[null,null]:null},E=()=>{if(i.value.enabled){const[O,P]=x();r.value=[zt(d(O,0),l.value.timezone),zt(d(P,1),l.value.timezone)]}else r.value=zt(d(x()),l.value.timezone)},C=O=>Array.isArray(O)?[Oo(ne(O[0])),Oo(ne(O[1]))]:[Oo(O??ne())],T=(O,P,M)=>{u("hours",O),u("minutes",P),u("seconds",n.enableSeconds?M:0)},F=()=>{const[O,P]=C(r.value);return i.value.enabled?T([O.hours,P.hours],[O.minutes,P.minutes],[O.seconds,P.seconds]):T(O.hours,O.minutes,O.seconds)};o.onMounted(()=>{if(!n.shadow)return h(s.value),r.value?F():E()});const I=()=>{Array.isArray(r.value)?r.value=r.value.map((O,P)=>O&&d(O,P)):r.value=d(r.value),e("time-update")};return{modelValue:r,time:a,disabledTimesConfig:p,updateTime:(O,P=!0,M=!1)=>{c(O,P,M,I)},validateTime:m}},ww=o.defineComponent({compatConfig:{MODE:3},__name:"TimePickerSolo",props:{...dn},emits:["update:internal-model-value","time-update","am-pm-change","mount","reset-flow","update-flow-step","overlay-toggle"],setup(n,{expose:e,emit:t}){const r=t,a=n,s=o.useSlots(),i=Ut(s,"timePicker"),l=o.ref(null),{time:c,modelValue:d,disabledTimesConfig:u,updateTime:h,validateTime:p}=vw(a,r);return o.onMounted(()=>{a.shadow||r("mount",null)}),e({getSidebarProps:()=>({modelValue:d,time:c,updateTime:h}),toggleTimePicker:(m,f=!1,g="")=>{var x;(x=l.value)==null||x.toggleTimePicker(m,f,g)}}),(m,f)=>(o.openBlock(),o.createBlock(ls,{"multi-calendars":0,stretch:"","is-mobile":m.isMobile},{default:o.withCtx(()=>[o.createVNode($p,o.mergeProps({ref_key:"tpRef",ref:l},m.$props,{hours:o.unref(c).hours,minutes:o.unref(c).minutes,seconds:o.unref(c).seconds,"internal-model-value":m.internalModelValue,"disabled-times-config":o.unref(u),"validate-time":o.unref(p),"onUpdate:hours":f[0]||(f[0]=g=>o.unref(h)(g)),"onUpdate:minutes":f[1]||(f[1]=g=>o.unref(h)(g,!1)),"onUpdate:seconds":f[2]||(f[2]=g=>o.unref(h)(g,!1,!0)),onAmPmChange:f[3]||(f[3]=g=>m.$emit("am-pm-change",g)),onResetFlow:f[4]||(f[4]=g=>m.$emit("reset-flow")),onOverlayClosed:f[5]||(f[5]=g=>m.$emit("overlay-toggle",{open:!1,overlay:g})),onOverlayOpened:f[6]||(f[6]=g=>m.$emit("overlay-toggle",{open:!0,overlay:g}))}),o.createSlots({_:2},[o.renderList(o.unref(i),(g,x)=>({name:g,fn:o.withCtx(E=>[o.renderSlot(m.$slots,g,o.normalizeProps(o.guardReactiveProps(E)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"])]),_:3},8,["is-mobile"]))}}),_w={class:"dp--header-wrap"},Cw={key:0,class:"dp__month_year_wrap"},Ew={key:0},Sw={class:"dp__month_year_wrap"},xw=["data-dp-element","aria-label","data-test-id","onClick","onKeydown"],Bw=o.defineComponent({compatConfig:{MODE:3},__name:"DpHeader",props:{month:{type:Number,default:0},year:{type:Number,default:0},instance:{type:Number,default:0},years:{type:Array,default:()=>[]},months:{type:Array,default:()=>[]},...dn},emits:["update-month-year","mount","reset-flow","overlay-closed","overlay-opened"],setup(n,{expose:e,emit:t}){const r=t,a=n,{defaultedTransitions:s,defaultedAriaLabels:i,defaultedMultiCalendars:l,defaultedFilters:c,defaultedConfig:d,defaultedHighlight:u,propDates:h,defaultedUI:p}=Ze(a),{transitionName:m,showTransition:f}=Xr(s),{buildMatrix:g}=io(),{handleMonthYearChange:x,isDisabled:E,updateMonthYear:C}=q1(a,r),{showLeftIcon:T,showRightIcon:F}=ds(),I=o.ref(!1),O=o.ref(!1),P=o.ref(!1),M=o.ref([null,null,null,null]);o.onMounted(()=>{r("mount")});const v=$=>({get:()=>a[$],set:R=>{const W=$===sn.month?sn.year:sn.month;r("update-month-year",{[$]:R,[W]:a[W]}),$===sn.month?A(!0):N(!0)}}),b=o.computed(v(sn.month)),D=o.computed(v(sn.year)),Y=o.computed(()=>$=>({month:a.month,year:a.year,items:$===sn.month?a.months:a.years,instance:a.instance,updateMonthYear:C,toggle:$===sn.month?A:N})),K=o.computed(()=>a.months.find(R=>R.value===a.month)||{text:"",value:0}),w=o.computed(()=>lr(a.months,$=>{const R=a.month===$.value,W=Ur($.value,pp(a.year,h.value.minDate),fp(a.year,h.value.maxDate))||c.value.months.includes($.value),J=vp(u.value,$.value,a.year);return{active:R,disabled:W,highlighted:J}})),k=o.computed(()=>lr(a.years,$=>{const R=a.year===$.value,W=Ur($.value,cr(h.value.minDate),cr(h.value.maxDate))||c.value.years.includes($.value),J=Bl(u.value,$.value);return{active:R,disabled:W,highlighted:J}})),_=($,R,W)=>{W!==void 0?$.value=W:$.value=!$.value,$.value?(P.value=!0,r("overlay-opened",R)):(P.value=!1,r("overlay-closed",R))},A=($=!1,R)=>{L($),_(I,xt.month,R)},N=($=!1,R)=>{L($),_(O,xt.year,R)},L=$=>{$||r("reset-flow")},q=($,R)=>{a.arrowNavigation&&(M.value[R]=mt($),g(M.value,"monthYear"))},z=o.computed(()=>{var $,R,W,J,y,j;return[{type:sn.month,index:1,toggle:A,modelValue:b.value,updateModelValue:se=>b.value=se,text:K.value.text,showSelectionGrid:I.value,items:w.value,ariaLabel:($=i.value)==null?void 0:$.openMonthsOverlay,overlayLabel:((W=(R=i.value).monthPicker)==null?void 0:W.call(R,!0))??void 0},{type:sn.year,index:2,toggle:N,modelValue:D.value,updateModelValue:se=>D.value=se,text:cp(a.year,a.locale),showSelectionGrid:O.value,items:k.value,ariaLabel:(J=i.value)==null?void 0:J.openYearsOverlay,overlayLabel:((j=(y=i.value).yearPicker)==null?void 0:j.call(y,!0))??void 0}]}),oe=o.computed(()=>a.disableYearSelect?[z.value[0]]:a.yearFirst?[...z.value].reverse():z.value);return e({toggleMonthPicker:A,toggleYearPicker:N,handleMonthYearChange:x}),($,R)=>{var W,J,y,j,se,_e;return o.openBlock(),o.createElementBlock("div",_w,[$.$slots["month-year"]?(o.openBlock(),o.createElementBlock("div",Cw,[o.renderSlot($.$slots,"month-year",o.normalizeProps(o.guardReactiveProps({month:n.month,year:n.year,months:n.months,years:n.years,updateMonthYear:o.unref(C),handleMonthYearChange:o.unref(x),instance:n.instance,isDisabled:o.unref(E)})))])):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[$.$slots["top-extra"]?(o.openBlock(),o.createElementBlock("div",Ew,[o.renderSlot($.$slots,"top-extra",{value:$.internalModelValue})])):o.createCommentVNode("",!0),o.createElementVNode("div",Sw,[o.unref(T)(o.unref(l),n.instance)&&!$.vertical?(o.openBlock(),o.createBlock(Kr,{key:0,"aria-label":(W=o.unref(i))==null?void 0:W.prevMonth,disabled:o.unref(E)(!1),class:o.normalizeClass((J=o.unref(p))==null?void 0:J.navBtnPrev),"el-name":"action-prev",onActivate:R[0]||(R[0]=U=>o.unref(x)(!1,!0)),onSetRef:R[1]||(R[1]=U=>q(U,0))},{default:o.withCtx(()=>[$.$slots["arrow-left"]?o.renderSlot($.$slots,"arrow-left",{key:0}):o.createCommentVNode("",!0),$.$slots["arrow-left"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(dl),{key:1}))]),_:3},8,["aria-label","disabled","class"])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(["dp__month_year_wrap",{dp__year_disable_select:$.disableYearSelect}])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(oe.value,(U,xe)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:U.type},[o.createElementVNode("button",{ref_for:!0,ref:te=>q(te,xe+1),type:"button","data-dp-element":`overlay-${U.type}`,class:o.normalizeClass(["dp__btn dp__month_year_select",{"dp--hidden-el":P.value}]),"aria-label":`${U.text}-${U.ariaLabel}`,"data-test-id":`${U.type}-toggle-overlay-${n.instance}`,onClick:U.toggle,onKeydown:te=>o.unref(Ot)(te,()=>U.toggle(),!0)},[$.$slots[U.type]?o.renderSlot($.$slots,U.type,{key:0,text:U.text,value:a[U.type]}):o.createCommentVNode("",!0),$.$slots[U.type]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(U.text),1)],64))],42,xw),o.createVNode(o.Transition,{name:o.unref(m)(U.showSelectionGrid),css:o.unref(f)},{default:o.withCtx(()=>[U.showSelectionGrid?(o.openBlock(),o.createBlock(Gr,{key:0,items:U.items,"arrow-navigation":$.arrowNavigation,"hide-navigation":$.hideNavigation,"is-last":$.autoApply&&!o.unref(d).keepActionRow,"skip-button-ref":!1,config:$.config,type:U.type,"header-refs":[],"esc-close":$.escClose,"menu-wrap-ref":$.menuWrapRef,"text-input":$.textInput,"aria-labels":$.ariaLabels,"overlay-label":U.overlayLabel,onSelected:U.updateModelValue,onToggle:U.toggle},o.createSlots({"button-icon":o.withCtx(()=>[$.$slots["calendar-icon"]?o.renderSlot($.$slots,"calendar-icon",{key:0}):o.createCommentVNode("",!0),$.$slots["calendar-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(sr),{key:1}))]),_:2},[$.$slots[`${U.type}-overlay-value`]?{name:"item",fn:o.withCtx(({item:te})=>[o.renderSlot($.$slots,`${U.type}-overlay-value`,{text:te.text,value:te.value})]),key:"0"}:void 0,$.$slots[`${U.type}-overlay`]?{name:"overlay",fn:o.withCtx(()=>[o.renderSlot($.$slots,`${U.type}-overlay`,o.mergeProps({ref_for:!0},Y.value(U.type)))]),key:"1"}:void 0,$.$slots[`${U.type}-overlay-header`]?{name:"header",fn:o.withCtx(()=>[o.renderSlot($.$slots,`${U.type}-overlay-header`,{toggle:U.toggle})]),key:"2"}:void 0]),1032,["items","arrow-navigation","hide-navigation","is-last","config","type","esc-close","menu-wrap-ref","text-input","aria-labels","overlay-label","onSelected","onToggle"])):o.createCommentVNode("",!0)]),_:2},1032,["name","css"])],64))),128))],2),o.unref(T)(o.unref(l),n.instance)&&$.vertical?(o.openBlock(),o.createBlock(Kr,{key:1,"aria-label":(y=o.unref(i))==null?void 0:y.prevMonth,"el-name":"action-prev",disabled:o.unref(E)(!1),class:o.normalizeClass((j=o.unref(p))==null?void 0:j.navBtnPrev),onActivate:R[2]||(R[2]=U=>o.unref(x)(!1,!0))},{default:o.withCtx(()=>[$.$slots["arrow-up"]?o.renderSlot($.$slots,"arrow-up",{key:0}):o.createCommentVNode("",!0),$.$slots["arrow-up"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(pl),{key:1}))]),_:3},8,["aria-label","disabled","class"])):o.createCommentVNode("",!0),o.unref(F)(o.unref(l),n.instance)?(o.openBlock(),o.createBlock(Kr,{key:2,ref:"rightIcon","el-name":"action-next",disabled:o.unref(E)(!0),"aria-label":(se=o.unref(i))==null?void 0:se.nextMonth,class:o.normalizeClass((_e=o.unref(p))==null?void 0:_e.navBtnNext),onActivate:R[3]||(R[3]=U=>o.unref(x)(!0,!0)),onSetRef:R[4]||(R[4]=U=>q(U,$.disableYearSelect?2:3))},{default:o.withCtx(()=>[$.$slots[$.vertical?"arrow-down":"arrow-right"]?o.renderSlot($.$slots,$.vertical?"arrow-down":"arrow-right",{key:0}):o.createCommentVNode("",!0),$.$slots[$.vertical?"arrow-down":"arrow-right"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.resolveDynamicComponent($.vertical?o.unref(fl):o.unref(ul)),{key:1}))]),_:3},8,["disabled","aria-label","class"])):o.createCommentVNode("",!0)])],64))])}}}),Tw={class:"dp__calendar_header",role:"row"},$w={key:0,class:"dp__calendar_header_item",role:"gridcell"},Mw=["aria-label"],Dw={key:0,class:"dp__calendar_item dp__week_num",role:"gridcell"},Ow={class:"dp__cell_inner"},Aw=["id","aria-pressed","aria-disabled","aria-label","tabindex","data-test-id","onClick","onTouchend","onKeydown","onMouseenter","onMouseleave","onMousedown"],Iw=o.defineComponent({compatConfig:{MODE:3},__name:"DpCalendar",props:{mappedDates:{type:Array,default:()=>[]},instance:{type:Number,default:0},month:{type:Number,default:0},year:{type:Number,default:0},...dn},emits:["select-date","set-hover-date","handle-scroll","mount","handle-swipe","handle-space","tooltip-open","tooltip-close"],setup(n,{expose:e,emit:t}){const r=t,a=n,{buildMultiLevelMatrix:s}=io(),{defaultedTransitions:i,defaultedConfig:l,defaultedAriaLabels:c,defaultedMultiCalendars:d,defaultedWeekNumbers:u,defaultedMultiDates:h,defaultedUI:p}=Ze(a),m=o.ref(null),f=o.ref({bottom:"",left:"",transform:""}),g=o.ref([]),x=o.ref(null),E=o.ref(!0),C=o.ref(""),T=o.ref({startX:0,endX:0,startY:0,endY:0}),F=o.ref([]),I=o.ref({left:"50%"}),O=o.ref(!1),P=o.computed(()=>a.calendar?a.calendar(a.mappedDates):a.mappedDates),M=o.computed(()=>a.dayNames?Array.isArray(a.dayNames)?a.dayNames:a.dayNames(a.locale,+a.weekStart):p1(a.formatLocale,a.locale,+a.weekStart));o.onMounted(()=>{r("mount",{cmp:"calendar",refs:g}),l.value.noSwipe||x.value&&(x.value.addEventListener("touchstart",q,{passive:!1}),x.value.addEventListener("touchend",z,{passive:!1}),x.value.addEventListener("touchmove",oe,{passive:!1})),a.monthChangeOnScroll&&x.value&&x.value.addEventListener("wheel",W,{passive:!1})}),o.onUnmounted(()=>{l.value.noSwipe||x.value&&(x.value.removeEventListener("touchstart",q),x.value.removeEventListener("touchend",z),x.value.removeEventListener("touchmove",oe)),a.monthChangeOnScroll&&x.value&&x.value.removeEventListener("wheel",W)});const v=U=>U?a.vertical?"vNext":"next":a.vertical?"vPrevious":"previous",b=(U,xe)=>{if(a.transitions){const te=kt(Fn(ne(),a.month,a.year));C.value=dt(kt(Fn(ne(),U,xe)),te)?i.value[v(!0)]:i.value[v(!1)],E.value=!1,o.nextTick(()=>{E.value=!0})}},D=o.computed(()=>({...p.value.calendar??{}})),Y=o.computed(()=>U=>{const xe=m1(U);return{dp__marker_dot:xe.type==="dot",dp__marker_line:xe.type==="line"}}),K=o.computed(()=>U=>Le(U,m.value)),w=o.computed(()=>({dp__calendar:!0,dp__calendar_next:d.value.count>0&&a.instance!==0})),k=o.computed(()=>U=>a.hideOffsetDates?U.current:!0),_=async(U,xe)=>{const{width:te,height:le}=U.getBoundingClientRect();m.value=xe.value;let S={left:`${te/2}px`},ie=-50;if(await o.nextTick(),F.value[0]){const{left:ce,width:de}=F.value[0].getBoundingClientRect();ce<0&&(S={left:"0"},ie=0,I.value.left=`${te/2}px`),window.innerWidth<ce+de&&(S={right:"0"},ie=0,I.value.left=`${de-te/2}px`)}f.value={bottom:`${le}px`,...S,transform:`translateX(${ie}%)`}},A=async(U,xe,te)=>{var le,S,ie;const ce=mt(g.value[xe][te]);ce&&((le=U.marker)!=null&&le.customPosition&&(ie=(S=U.marker)==null?void 0:S.tooltip)!=null&&ie.length?f.value=U.marker.customPosition(ce):await _(ce,U),r("tooltip-open",U.marker))},N=async(U,xe,te)=>{var le,S;if(O.value&&h.value.enabled&&h.value.dragSelect)return r("select-date",U);if(r("set-hover-date",U),(S=(le=U.marker)==null?void 0:le.tooltip)!=null&&S.length){if(a.hideOffsetDates&&!U.current)return;await A(U,xe,te)}},L=U=>{m.value&&(m.value=null,f.value=JSON.parse(JSON.stringify({bottom:"",left:"",transform:""})),r("tooltip-close",U.marker))},q=U=>{T.value.startX=U.changedTouches[0].screenX,T.value.startY=U.changedTouches[0].screenY},z=U=>{T.value.endX=U.changedTouches[0].screenX,T.value.endY=U.changedTouches[0].screenY,$()},oe=U=>{a.vertical&&!a.inline&&U.preventDefault()},$=()=>{const U=a.vertical?"Y":"X";Math.abs(T.value[`start${U}`]-T.value[`end${U}`])>10&&r("handle-swipe",T.value[`start${U}`]>T.value[`end${U}`]?"right":"left")},R=(U,xe,te)=>{U&&(Array.isArray(g.value[xe])?g.value[xe][te]=U:g.value[xe]=[U]),a.arrowNavigation&&s(g.value,"calendar")},W=U=>{a.monthChangeOnScroll&&(U.preventDefault(),r("handle-scroll",U))},J=U=>u.value.type==="local"?rl(U.value,{weekStartsOn:+a.weekStart}):u.value.type==="iso"?nl(U.value):typeof u.value.type=="function"?u.value.type(U.value):"",y=U=>{const xe=U[0];return u.value.hideOnOffsetDates?U.some(te=>te.current)?J(xe):"":J(xe)},j=(U,xe,te=!0)=>{!te&&v1()||(!h.value.enabled||l.value.allowPreventDefault)&&(ro(U,l.value),r("select-date",xe))},se=U=>{ro(U,l.value)},_e=U=>{h.value.enabled&&h.value.dragSelect?(O.value=!0,r("select-date",U)):h.value.enabled&&r("select-date",U)};return e({triggerTransition:b}),(U,xe)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(w.value)},[o.createElementVNode("div",{ref_key:"calendarWrapRef",ref:x,class:o.normalizeClass(D.value),role:"grid"},[o.createElementVNode("div",Tw,[U.weekNumbers?(o.openBlock(),o.createElementBlock("div",$w,o.toDisplayString(U.weekNumName),1)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(M.value,(te,le)=>{var S,ie;return o.openBlock(),o.createElementBlock("div",{key:le,class:"dp__calendar_header_item",role:"gridcell","data-test-id":"calendar-header","aria-label":(ie=(S=o.unref(c))==null?void 0:S.weekDay)==null?void 0:ie.call(S,le)},[U.$slots["calendar-header"]?o.renderSlot(U.$slots,"calendar-header",{key:0,day:te,index:le}):o.createCommentVNode("",!0),U.$slots["calendar-header"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(te),1)],64))],8,Mw)}),128))]),xe[2]||(xe[2]=o.createElementVNode("div",{class:"dp__calendar_header_separator"},null,-1)),o.createVNode(o.Transition,{name:C.value,css:!!U.transitions},{default:o.withCtx(()=>[E.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"dp__calendar",role:"rowgroup",onMouseleave:xe[1]||(xe[1]=te=>O.value=!1)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(P.value,(te,le)=>(o.openBlock(),o.createElementBlock("div",{key:le,class:"dp__calendar_row",role:"row"},[U.weekNumbers?(o.openBlock(),o.createElementBlock("div",Dw,[o.createElementVNode("div",Ow,o.toDisplayString(y(te.days)),1)])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(te.days,(S,ie)=>{var ce,de,Ne;return o.openBlock(),o.createElementBlock("div",{id:o.unref(Tl)(S.value),ref_for:!0,ref:Ae=>R(Ae,le,ie),key:ie+le,role:"gridcell",class:"dp__calendar_item","aria-pressed":(S.classData.dp__active_date||S.classData.dp__range_start||S.classData.dp__range_start)??void 0,"aria-disabled":S.classData.dp__cell_disabled||void 0,"aria-label":(de=(ce=o.unref(c))==null?void 0:ce.day)==null?void 0:de.call(ce,S),tabindex:!S.current&&U.hideOffsetDates?void 0:0,"data-test-id":o.unref(Tl)(S.value),onClick:o.withModifiers(Ae=>j(Ae,S),["prevent"]),onTouchend:Ae=>j(Ae,S,!1),onKeydown:Ae=>o.unref(Ot)(Ae,()=>U.$emit("select-date",S)),onMouseenter:Ae=>N(S,le,ie),onMouseleave:Ae=>L(S),onMousedown:Ae=>_e(S),onMouseup:xe[0]||(xe[0]=Ae=>O.value=!1)},[o.createElementVNode("div",{class:o.normalizeClass(["dp__cell_inner",S.classData])},[U.$slots.day&&k.value(S)?o.renderSlot(U.$slots,"day",{key:0,day:+S.text,date:S.value}):o.createCommentVNode("",!0),U.$slots.day?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(S.text),1)],64)),S.marker&&k.value(S)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:2},[U.$slots.marker?o.renderSlot(U.$slots,"marker",{key:0,marker:S.marker,day:+S.text,date:S.value}):(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(Y.value(S.marker)),style:o.normalizeStyle(S.marker.color?{backgroundColor:S.marker.color}:{})},null,6))],64)):o.createCommentVNode("",!0),K.value(S.value)?(o.openBlock(),o.createElementBlock("div",{key:3,ref_for:!0,ref_key:"activeTooltip",ref:F,class:"dp__marker_tooltip",style:o.normalizeStyle(f.value)},[(Ne=S.marker)!=null&&Ne.tooltip?(o.openBlock(),o.createElementBlock("div",{key:0,class:"dp__tooltip_content",onClick:se},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(S.marker.tooltip,(Ae,Ve)=>(o.openBlock(),o.createElementBlock("div",{key:Ve,class:"dp__tooltip_text"},[U.$slots["marker-tooltip"]?o.renderSlot(U.$slots,"marker-tooltip",{key:0,tooltip:Ae,day:S.value}):o.createCommentVNode("",!0),U.$slots["marker-tooltip"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("div",{class:"dp__tooltip_mark",style:o.normalizeStyle(Ae.color?{backgroundColor:Ae.color}:{})},null,4),o.createElementVNode("div",null,o.toDisplayString(Ae.text),1)],64))]))),128)),o.createElementVNode("div",{class:"dp__arrow_bottom_tp",style:o.normalizeStyle(I.value)},null,4)])):o.createCommentVNode("",!0)],4)):o.createCommentVNode("",!0)],2)],40,Aw)}),128))]))),128))],32)):o.createCommentVNode("",!0)]),_:3},8,["name","css"])],2)],2))}}),Dp=n=>Array.isArray(n),Nw=(n,e,t,r)=>{const a=o.ref([]),s=o.ref(new Date),i=o.ref(),l=()=>z(n.isTextInputDate),{modelValue:c,calendars:d,time:u,today:h}=Qr(n,e,l),{defaultedMultiCalendars:p,defaultedStartTime:m,defaultedRange:f,defaultedConfig:g,defaultedTz:x,propDates:E,defaultedMultiDates:C}=Ze(n),{validateMonthYearInRange:T,isDisabled:F,isDateRangeAllowed:I,checkMinMaxRange:O}=co(n),{updateTimeValues:P,getSetDateTime:M,setTime:v,assignStartTime:b,validateTime:D,disabledTimesConfig:Y}=Mp(n,u,c,r),K=o.computed(()=>H=>d.value[H]?d.value[H].month:0),w=o.computed(()=>H=>d.value[H]?d.value[H].year:0),k=H=>!g.value.keepViewOnOffsetClick||H?!0:!i.value,_=(H,ee,ve,De=!1)=>{var Z,fe;k(De)&&(d.value[H]||(d.value[H]={month:0,year:0}),d.value[H].month=ip(ee)?(Z=d.value[H])==null?void 0:Z.month:ee,d.value[H].year=ip(ve)?(fe=d.value[H])==null?void 0:fe.year:ve)},A=()=>{n.autoApply&&e("select-date")},N=()=>{m.value&&b(m.value)};o.onMounted(()=>{n.shadow||(c.value||(xe(),N()),z(!0),n.focusStartDate&&n.startDate&&xe())});const L=o.computed(()=>{var H;return(H=n.flow)!=null&&H.length&&!n.partialFlow?n.flowStep===n.flow.length:!0}),q=()=>{n.autoApply&&L.value&&e("auto-apply",n.partialFlow?n.flowStep!==n.flow.length:!1)},z=(H=!1)=>{if(c.value)return Array.isArray(c.value)?(a.value=c.value,j(H)):R(c.value,H);if(p.value.count&&H&&!n.startDate)return $(ne(),H)},oe=()=>Array.isArray(c.value)&&f.value.enabled?Pe(c.value[0])===Pe(c.value[1]??c.value[0]):!1,$=(H=new Date,ee=!1)=>{if((!p.value.count||!p.value.static||ee)&&_(0,Pe(H),Te(H)),p.value.count&&(!c.value||oe()||!p.value.solo)&&(!p.value.solo||ee))for(let ve=1;ve<p.value.count;ve++){const De=qe(ne(),{month:K.value(ve-1),year:w.value(ve-1)}),Z=xh(De,{months:1});d.value[ve]={month:Pe(Z),year:Te(Z)}}},R=(H,ee)=>{$(H),v("hours",Ln(H)),v("minutes",oo(H)),v("seconds",nr(H)),p.value.count&&ee&&U()},W=H=>{if(p.value.count){if(p.value.solo)return 0;const ee=Pe(H[0]),ve=Pe(H[1]);return Math.abs(ve-ee)<p.value.count?0:1}return 1},J=(H,ee)=>{H[1]&&f.value.showLastInRange?$(H[W(H)],ee):$(H[0],ee);const ve=(De,Z)=>[De(H[0]),H[1]?De(H[1]):u[Z][1]];v("hours",ve(Ln,"hours")),v("minutes",ve(oo,"minutes")),v("seconds",ve(nr,"seconds"))},y=(H,ee)=>{if((f.value.enabled||n.weekPicker)&&!C.value.enabled)return J(H,ee);if(C.value.enabled&&ee){const ve=H[H.length-1];return R(ve,ee)}},j=H=>{const ee=c.value;y(ee,H),p.value.count&&p.value.solo&&U()},se=(H,ee)=>{const ve=qe(ne(),{month:K.value(ee),year:w.value(ee)}),De=H<0?rn(ve,1):ar(ve,1);T(Pe(De),Te(De),H<0,n.preventMinMaxNavigation)&&(_(ee,Pe(De),Te(De)),e("update-month-year",{instance:ee,month:Pe(De),year:Te(De)}),p.value.count&&!p.value.solo&&_e(ee),t())},_e=H=>{for(let ee=H-1;ee>=0;ee--){const ve=ar(qe(ne(),{month:K.value(ee+1),year:w.value(ee+1)}),1);_(ee,Pe(ve),Te(ve))}for(let ee=H+1;ee<=p.value.count-1;ee++){const ve=rn(qe(ne(),{month:K.value(ee-1),year:w.value(ee-1)}),1);_(ee,Pe(ve),Te(ve))}},U=()=>{if(Array.isArray(c.value)&&c.value.length===2){const H=ne(ne(c.value[1]?c.value[1]:rn(c.value[0],1))),[ee,ve]=[Pe(c.value[0]),Te(c.value[0])],[De,Z]=[Pe(c.value[1]),Te(c.value[1])];(ee!==De||ee===De&&ve!==Z)&&p.value.solo&&_(1,Pe(H),Te(H))}else c.value&&!Array.isArray(c.value)&&(_(0,Pe(c.value),Te(c.value)),$(ne()))},xe=()=>{n.startDate&&(_(0,Pe(ne(n.startDate)),Te(ne(n.startDate))),p.value.count&&_e(0))},te=(H,ee)=>{if(n.monthChangeOnScroll){const ve=new Date().getTime()-s.value.getTime(),De=Math.abs(H.deltaY);let Z=500;De>1&&(Z=100),De>100&&(Z=0),ve>Z&&(s.value=new Date,se(n.monthChangeOnScroll!=="inverse"?-H.deltaY:H.deltaY,ee))}},le=(H,ee,ve=!1)=>{n.monthChangeOnArrows&&n.vertical===ve&&S(H,ee)},S=(H,ee)=>{se(H==="right"?-1:1,ee)},ie=H=>{if(E.value.markers)return rs(H.value,E.value.markers)},ce=(H,ee)=>{switch(n.sixWeeks===!0?"append":n.sixWeeks){case"prepend":return[!0,!1];case"center":return[H==0,!0];case"fair":return[H==0||ee>H,!0];case"append":return[!1,!1];default:return[!1,!1]}},de=(H,ee,ve,De)=>{if(n.sixWeeks&&H.length<6){const Z=6-H.length,fe=(ee.getDay()+7-De)%7,be=6-(ve.getDay()+7-De)%7,[Un,Bn]=ce(fe,be);for(let Ro=1;Ro<=Z;Ro++)if(Bn?!!(Ro%2)==Un:Un){const go=H[0].days[0],Kd=Ne(Xt(go.value,-7),Pe(ee));H.unshift({days:Kd})}else{const go=H[H.length-1],Kd=go.days[go.days.length-1],BT=Ne(Xt(Kd.value,1),Pe(ee));H.push({days:BT})}}return H},Ne=(H,ee)=>{const ve=ne(H),De=[];for(let Z=0;Z<7;Z++){const fe=Xt(ve,Z),be=Pe(fe)!==ee;De.push({text:n.hideOffsetDates&&be?"":fe.getDate(),value:fe,current:!be,classData:{}})}return De},Ae=(H,ee)=>{const ve=[],De=new Date(ee,H),Z=new Date(ee,H+1,0),fe=n.weekStart,be=an(De,{weekStartsOn:fe}),Un=Bn=>{const Ro=Ne(Bn,H);if(ve.push({days:Ro}),!ve[ve.length-1].days.some(go=>Le(kt(go.value),kt(Z)))){const go=Xt(Bn,7);Un(go)}};return Un(be),de(ve,De,Z,fe)},Ve=H=>{const ee=ao(ne(H.value),u.hours,u.minutes,G());e("date-update",ee),C.value.enabled?Il(ee,c,C.value.limit):c.value=ee,r(),o.nextTick().then(()=>{q()})},nt=H=>f.value.noDisabledRange?mp(a.value[0],H).some(ee=>F(ee)):!1,V=()=>{a.value=c.value?c.value.slice():[],a.value.length===2&&!(f.value.fixedStart||f.value.fixedEnd)&&(a.value=[])},he=(H,ee)=>{const ve=[ne(H.value),Xt(ne(H.value),+f.value.autoRange)];I(ve)?(ee&&Fe(H.value),a.value=ve):e("invalid-date",H.value)},Fe=H=>{const ee=Pe(ne(H)),ve=Te(ne(H));if(_(0,ee,ve),p.value.count>0)for(let De=1;De<p.value.count;De++){const Z=C1(qe(ne(H),{year:w.value(De-1),month:K.value(De-1)}));_(De,Z.month,Z.year)}},pt=H=>{if(nt(H.value)||!O(H.value,c.value,f.value.fixedStart?0:1))return e("invalid-date",H.value);a.value=Bp(ne(H.value),c,e,f)},Jt=(H,ee)=>{if(V(),f.value.autoRange)return he(H,ee);if(f.value.fixedStart||f.value.fixedEnd)return pt(H);a.value[0]?O(ne(H.value),c.value)&&!nt(H.value)?st(ne(H.value),ne(a.value[0]))?(a.value.unshift(ne(H.value)),e("range-end",a.value[0])):(a.value[1]=ne(H.value),e("range-end",a.value[1])):(n.autoApply&&e("auto-apply-invalid",H.value),e("invalid-date",H.value)):(a.value[0]=ne(H.value),e("range-start",a.value[0]))},G=(H=!0)=>n.enableSeconds?Array.isArray(u.seconds)?H?u.seconds[0]:u.seconds[1]:u.seconds:0,B=H=>{a.value[H]=ao(a.value[H],u.hours[H],u.minutes[H],G(H!==1))},ae=()=>{var H,ee;a.value[0]&&a.value[1]&&+((H=a.value)==null?void 0:H[0])>+((ee=a.value)==null?void 0:ee[1])&&(a.value.reverse(),e("range-start",a.value[0]),e("range-end",a.value[1]))},ge=()=>{a.value.length&&(a.value[0]&&!a.value[1]?B(0):(B(0),B(1),r()),ae(),c.value=a.value.slice(),cs(a.value,e,n.autoApply,n.modelAuto))},ye=(H,ee=!1)=>{if(F(H.value)||!H.current&&n.hideOffsetDates)return e("invalid-date",H.value);if(i.value=JSON.parse(JSON.stringify(H)),!f.value.enabled)return Ve(H);Dp(u.hours)&&Dp(u.minutes)&&!C.value.enabled&&(Jt(H,ee),ge())},Gt=(H,ee)=>{var ve;_(H,ee.month,ee.year,!0),p.value.count&&!p.value.solo&&_e(H),e("update-month-year",{instance:H,month:ee.month,year:ee.year}),t(p.value.solo?H:void 0);const De=(ve=n.flow)!=null&&ve.length?n.flow[n.flowStep]:void 0;!ee.fromNav&&(De===xt.month||De===xt.year)&&r()},hn=(H,ee)=>{xp({value:H,modelValue:c,range:f.value.enabled,timezone:ee?void 0:x.value.timezone}),A(),n.multiCalendars&&o.nextTick().then(()=>z(!0))},en=()=>{const H=ml(ne(),x.value);!f.value.enabled&&!C.value.enabled?c.value=H:c.value&&Array.isArray(c.value)&&c.value[0]?C.value.enabled?c.value=[...c.value,H]:c.value=st(H,c.value[0])?[H,c.value[0]]:[c.value[0],H]:c.value=[H],A()},mo=()=>{if(Array.isArray(c.value))if(C.value.enabled){const H=fa();c.value[c.value.length-1]=M(H)}else c.value=c.value.map((H,ee)=>H&&M(H,ee));else c.value=M(c.value);e("time-update")},fa=()=>Array.isArray(c.value)&&c.value.length?c.value[c.value.length-1]:null;return{calendars:d,modelValue:c,month:K,year:w,time:u,disabledTimesConfig:Y,today:h,validateTime:D,getCalendarDays:Ae,getMarker:ie,handleScroll:te,handleSwipe:S,handleArrow:le,selectDate:ye,updateMonthYear:Gt,presetDate:hn,selectCurrentDate:en,updateTime:(H,ee=!0,ve=!1)=>{P(H,ee,ve,mo)},assignMonthAndYear:$,setStartTime:N}},Pw={key:0},Lw=o.defineComponent({__name:"DatePicker",props:{...dn},emits:["tooltip-open","tooltip-close","mount","update:internal-model-value","update-flow-step","reset-flow","auto-apply","focus-menu","select-date","range-start","range-end","invalid-fixed-range","time-update","am-pm-change","time-picker-open","time-picker-close","recalculate-position","update-month-year","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(n,{expose:e,emit:t}){const r=t,a=n,{calendars:s,month:i,year:l,modelValue:c,time:d,disabledTimesConfig:u,today:h,validateTime:p,getCalendarDays:m,getMarker:f,handleArrow:g,handleScroll:x,handleSwipe:E,selectDate:C,updateMonthYear:T,presetDate:F,selectCurrentDate:I,updateTime:O,assignMonthAndYear:P,setStartTime:M}=Nw(a,r,oe,$),v=o.useSlots(),{setHoverDate:b,getDayClassData:D,clearHoverDate:Y}=e_(c,a),{defaultedMultiCalendars:K}=Ze(a),w=o.ref([]),k=o.ref([]),_=o.ref(null),A=Ut(v,"calendar"),N=Ut(v,"monthYear"),L=Ut(v,"timePicker"),q=te=>{a.shadow||r("mount",te)};o.watch(s,()=>{a.shadow||setTimeout(()=>{r("recalculate-position")},0)},{deep:!0}),o.watch(K,(te,le)=>{te.count-le.count>0&&P()},{deep:!0});const z=o.computed(()=>te=>m(i.value(te),l.value(te)).map(le=>({...le,days:le.days.map(S=>(S.marker=f(S),S.classData=D(S),S))})));function oe(te){var le;te||te===0?(le=k.value[te])==null||le.triggerTransition(i.value(te),l.value(te)):k.value.forEach((S,ie)=>S.triggerTransition(i.value(ie),l.value(ie)))}function $(){r("update-flow-step")}const R=(te,le=!1)=>{C(te,le),a.spaceConfirm&&r("select-date")},W=(te,le,S=0)=>{var ie;(ie=w.value[S])==null||ie.toggleMonthPicker(te,le)},J=(te,le,S=0)=>{var ie;(ie=w.value[S])==null||ie.toggleYearPicker(te,le)},y=(te,le,S)=>{var ie;(ie=_.value)==null||ie.toggleTimePicker(te,le,S)},j=(te,le)=>{var S;if(!a.range){const ie=c.value?c.value:h,ce=le?new Date(le):ie,de=te?an(ce,{weekStartsOn:1}):Ph(ce,{weekStartsOn:1});C({value:de,current:Pe(ce)===i.value(0),text:"",classData:{}}),(S=document.getElementById(Tl(de)))==null||S.focus()}},se=te=>{var le;(le=w.value[0])==null||le.handleMonthYearChange(te,!0)},_e=te=>{T(0,{month:i.value(0),year:l.value(0)+(te?1:-1),fromNav:!0})},U=(te,le)=>{te===xt.time&&r(`time-picker-${le?"open":"close"}`),r("overlay-toggle",{open:le,overlay:te})},xe=te=>{r("overlay-toggle",{open:!1,overlay:te}),r("focus-menu")};return e({clearHoverDate:Y,presetDate:F,selectCurrentDate:I,toggleMonthPicker:W,toggleYearPicker:J,toggleTimePicker:y,handleArrow:g,updateMonthYear:T,getSidebarProps:()=>({modelValue:c,month:i,year:l,time:d,updateTime:O,updateMonthYear:T,selectDate:C,presetDate:F}),changeMonth:se,changeYear:_e,selectWeekDate:j,setStartTime:M}),(te,le)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(ls,{"multi-calendars":o.unref(K).count,collapse:te.collapse,"is-mobile":te.isMobile},{default:o.withCtx(({instance:S,index:ie})=>[te.disableMonthYearSelect?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(Bw,o.mergeProps({key:0,ref:ce=>{ce&&(w.value[ie]=ce)},months:o.unref(rp)(te.formatLocale,te.locale,te.monthNameFormat),years:o.unref(yl)(te.yearRange,te.locale,te.reverseYears),month:o.unref(i)(S),year:o.unref(l)(S),instance:S},te.$props,{onMount:le[0]||(le[0]=ce=>q(o.unref(Do).header)),onResetFlow:le[1]||(le[1]=ce=>te.$emit("reset-flow")),onUpdateMonthYear:ce=>o.unref(T)(S,ce),onOverlayClosed:xe,onOverlayOpened:le[2]||(le[2]=ce=>te.$emit("overlay-toggle",{open:!0,overlay:ce}))}),o.createSlots({_:2},[o.renderList(o.unref(N),(ce,de)=>({name:ce,fn:o.withCtx(Ne=>[o.renderSlot(te.$slots,ce,o.normalizeProps(o.guardReactiveProps(Ne)))])}))]),1040,["months","years","month","year","instance","onUpdateMonthYear"])),o.createVNode(Iw,o.mergeProps({ref:ce=>{ce&&(k.value[ie]=ce)},"mapped-dates":z.value(S),month:o.unref(i)(S),year:o.unref(l)(S),instance:S},te.$props,{onSelectDate:ce=>o.unref(C)(ce,S!==1),onHandleSpace:ce=>R(ce,S!==1),onSetHoverDate:le[3]||(le[3]=ce=>o.unref(b)(ce)),onHandleScroll:ce=>o.unref(x)(ce,S),onHandleSwipe:ce=>o.unref(E)(ce,S),onMount:le[4]||(le[4]=ce=>q(o.unref(Do).calendar)),onResetFlow:le[5]||(le[5]=ce=>te.$emit("reset-flow")),onTooltipOpen:le[6]||(le[6]=ce=>te.$emit("tooltip-open",ce)),onTooltipClose:le[7]||(le[7]=ce=>te.$emit("tooltip-close",ce))}),o.createSlots({_:2},[o.renderList(o.unref(A),(ce,de)=>({name:ce,fn:o.withCtx(Ne=>[o.renderSlot(te.$slots,ce,o.normalizeProps(o.guardReactiveProps({...Ne})))])}))]),1040,["mapped-dates","month","year","instance","onSelectDate","onHandleSpace","onHandleScroll","onHandleSwipe"])]),_:3},8,["multi-calendars","collapse","is-mobile"]),te.enableTimePicker?(o.openBlock(),o.createElementBlock("div",Pw,[te.$slots["time-picker"]?o.renderSlot(te.$slots,"time-picker",o.normalizeProps(o.mergeProps({key:0},{time:o.unref(d),updateTime:o.unref(O)}))):(o.openBlock(),o.createBlock($p,o.mergeProps({key:1,ref_key:"timePickerRef",ref:_},te.$props,{hours:o.unref(d).hours,minutes:o.unref(d).minutes,seconds:o.unref(d).seconds,"internal-model-value":te.internalModelValue,"disabled-times-config":o.unref(u),"validate-time":o.unref(p),onMount:le[8]||(le[8]=S=>q(o.unref(Do).timePicker)),"onUpdate:hours":le[9]||(le[9]=S=>o.unref(O)(S)),"onUpdate:minutes":le[10]||(le[10]=S=>o.unref(O)(S,!1)),"onUpdate:seconds":le[11]||(le[11]=S=>o.unref(O)(S,!1,!0)),onResetFlow:le[12]||(le[12]=S=>te.$emit("reset-flow")),onOverlayClosed:le[13]||(le[13]=S=>U(S,!1)),onOverlayOpened:le[14]||(le[14]=S=>U(S,!0)),onAmPmChange:le[15]||(le[15]=S=>te.$emit("am-pm-change",S))}),o.createSlots({_:2},[o.renderList(o.unref(L),(S,ie)=>({name:S,fn:o.withCtx(ce=>[o.renderSlot(te.$slots,S,o.normalizeProps(o.guardReactiveProps(ce)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"]))])):o.createCommentVNode("",!0)],64))}}),zw=(n,e)=>{const t=o.ref(),{defaultedMultiCalendars:r,defaultedConfig:a,defaultedHighlight:s,defaultedRange:i,propDates:l,defaultedFilters:c,defaultedMultiDates:d}=Ze(n),{modelValue:u,year:h,month:p,calendars:m}=Qr(n,e),{isDisabled:f}=co(n),{selectYear:g,groupedYears:x,showYearPicker:E,isDisabled:C,toggleYearPicker:T,handleYearSelect:F,handleYear:I}=Tp({modelValue:u,multiCalendars:r,range:i,highlight:s,calendars:m,propDates:l,month:p,year:h,filters:c,props:n,emit:e}),O=(k,_)=>[k,_].map(A=>bn(A,"MMMM",{locale:n.formatLocale})).join("-"),P=o.computed(()=>k=>u.value?Array.isArray(u.value)?u.value.some(_=>Xh(k,_)):Xh(u.value,k):!1),M=k=>{if(i.value.enabled){if(Array.isArray(u.value)){const _=Le(k,u.value[0])||Le(k,u.value[1]);return Wr(u.value,t.value,k)&&!_}return!1}return!1},v=(k,_)=>k.quarter===Oh(_)&&k.year===Te(_),b=k=>typeof s.value=="function"?s.value({quarter:Oh(k),year:Te(k)}):!!s.value.quarters.find(_=>v(_,k)),D=o.computed(()=>k=>{const _=qe(new Date,{year:h.value(k)});return mk({start:Hr(_),end:Nh(_)}).map(A=>{const N=To(A),L=Lh(A),q=f(A),z=M(N),oe=b(N);return{text:O(N,L),value:N,active:P.value(N),highlighted:oe,disabled:q,isBetween:z}})}),Y=k=>{Il(k,u,d.value.limit),e("auto-apply",!0)},K=k=>{u.value=Nl(u,k,e),cs(u.value,e,n.autoApply,n.modelAuto)},w=k=>{u.value=k,e("auto-apply")};return{defaultedConfig:a,defaultedMultiCalendars:r,groupedYears:x,year:h,isDisabled:C,quarters:D,showYearPicker:E,modelValue:u,setHoverDate:k=>{t.value=k},selectYear:g,selectQuarter:(k,_,A)=>{if(!A)return m.value[_].month=Pe(Lh(k)),d.value.enabled?Y(k):i.value.enabled?K(k):w(k)},toggleYearPicker:T,handleYearSelect:F,handleYear:I}},Fw={class:"dp--quarter-items"},Rw=["data-test-id","disabled","onClick","onMouseover"],Vw=o.defineComponent({compatConfig:{MODE:3},__name:"QuarterPicker",props:{...dn},emits:["update:internal-model-value","reset-flow","overlay-closed","auto-apply","range-start","range-end","overlay-toggle","update-month-year"],setup(n,{expose:e,emit:t}){const r=t,a=n,s=o.useSlots(),i=Ut(s,"yearMode"),{defaultedMultiCalendars:l,defaultedConfig:c,groupedYears:d,year:u,isDisabled:h,quarters:p,modelValue:m,showYearPicker:f,setHoverDate:g,selectQuarter:x,toggleYearPicker:E,handleYearSelect:C,handleYear:T}=zw(a,r);return e({getSidebarProps:()=>({modelValue:m,year:u,selectQuarter:x,handleYearSelect:C,handleYear:T})}),(F,I)=>(o.openBlock(),o.createBlock(ls,{"multi-calendars":o.unref(l).count,collapse:F.collapse,stretch:"","is-mobile":F.isMobile},{default:o.withCtx(({instance:O})=>[o.createElementVNode("div",{class:"dp-quarter-picker-wrap",style:o.normalizeStyle({minHeight:`${o.unref(c).modeHeight}px`})},[F.$slots["top-extra"]?o.renderSlot(F.$slots,"top-extra",{key:0,value:F.internalModelValue}):o.createCommentVNode("",!0),o.createElementVNode("div",null,[o.createVNode(Sp,o.mergeProps(F.$props,{items:o.unref(d)(O),instance:O,"show-year-picker":o.unref(f)[O],year:o.unref(u)(O),"is-disabled":P=>o.unref(h)(O,P),onHandleYear:P=>o.unref(T)(O,P),onYearSelect:P=>o.unref(C)(P,O),onToggleYearPicker:P=>o.unref(E)(O,P==null?void 0:P.flow,P==null?void 0:P.show)}),o.createSlots({_:2},[o.renderList(o.unref(i),(P,M)=>({name:P,fn:o.withCtx(v=>[o.renderSlot(F.$slots,P,o.normalizeProps(o.guardReactiveProps(v)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),o.createElementVNode("div",Fw,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(p)(O),(P,M)=>(o.openBlock(),o.createElementBlock("div",{key:M},[o.createElementVNode("button",{type:"button",class:o.normalizeClass(["dp--qr-btn",{"dp--qr-btn-active":P.active,"dp--qr-btn-between":P.isBetween,"dp--qr-btn-disabled":P.disabled,"dp--highlighted":P.highlighted}]),"data-test-id":P.value,disabled:P.disabled,onClick:v=>o.unref(x)(P.value,O,P.disabled),onMouseover:v=>o.unref(g)(P.value)},[F.$slots.quarter?o.renderSlot(F.$slots,"quarter",{key:0,value:P.value,text:P.text}):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(P.text),1)],64))],42,Rw)]))),128))])],4)]),_:3},8,["multi-calendars","collapse","is-mobile"]))}}),Op=(n,e)=>{const t=o.ref(0);o.onMounted(()=>{r(),window.addEventListener("resize",r,{passive:!0})}),o.onUnmounted(()=>{window.removeEventListener("resize",r)});const r=()=>{t.value=window.document.documentElement.clientWidth};return{isMobile:o.computed(()=>t.value<=n.value.mobileBreakpoint&&!e?!0:void 0)}},Hw=["id","tabindex","role","aria-label"],jw={key:0,class:"dp--menu-load-container"},Yw={key:1,class:"dp--menu-header"},Uw=["data-dp-mobile"],Ww={key:0,class:"dp__sidebar_left"},qw=["data-dp-mobile"],Gw=["data-test-id","data-dp-mobile","onClick","onKeydown"],Kw={key:2,class:"dp__sidebar_right"},Xw={key:3,class:"dp__action_extra"},Ap=o.defineComponent({compatConfig:{MODE:3},__name:"DatepickerMenu",props:{...is,shadow:{type:Boolean,default:!1},openOnTop:{type:Boolean,default:!1},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},getInputRect:{type:Function,default:()=>({})},isTextInputDate:{type:Boolean,default:!1}},emits:["close-picker","select-date","auto-apply","time-update","flow-step","update-month-year","invalid-select","update:internal-model-value","recalculate-position","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","auto-apply-invalid","date-update","invalid-date","overlay-toggle","menu-blur"],setup(n,{expose:e,emit:t}){const r=t,a=n,s=o.ref(null),i=o.computed(()=>{const{openOnTop:V,...he}=a;return{...he,isMobile:x.value,flowStep:K.value,menuWrapRef:s.value}}),{setMenuFocused:l,setShiftKey:c,control:d}=_p(),u=o.useSlots(),{defaultedTextInput:h,defaultedInline:p,defaultedConfig:m,defaultedUI:f,handleEventPropagation:g}=Ze(a),{isMobile:x}=Op(m,a.shadow),E=o.ref(null),C=o.ref(0),T=o.ref(null),F=o.ref(!1),I=o.ref(null),O=o.ref(!1),P=V=>{O.value=!0,m.value.allowPreventDefault&&V.preventDefault(),ro(V,m.value,!0)};o.onMounted(()=>{if(!a.shadow){F.value=!0,M(),window.addEventListener("resize",M);const V=mt(s);V&&!h.value.enabled&&!p.value.enabled&&(l(!0),q()),V&&(V.addEventListener("pointerdown",P),V.addEventListener("mousedown",P))}document.addEventListener("mousedown",nt)}),o.onUnmounted(()=>{window.removeEventListener("resize",M),document.removeEventListener("mousedown",nt);const V=mt(s);V&&(V.removeEventListener("pointerdown",P),V.removeEventListener("mousedown",P))});const M=()=>{const V=mt(T);V&&(C.value=V.getBoundingClientRect().width)},{arrowRight:v,arrowLeft:b,arrowDown:D,arrowUp:Y}=io(),{flowStep:K,updateFlowStep:w,childMount:k,resetFlow:_,handleFlow:A}=t_(a,r,I),N=o.computed(()=>a.monthPicker?aw:a.yearPicker?iw:a.timePicker?ww:a.quarterPicker?Vw:Lw),L=o.computed(()=>{var V;if(m.value.arrowLeft)return m.value.arrowLeft;const he=(V=s.value)==null?void 0:V.getBoundingClientRect(),Fe=a.getInputRect();return(Fe==null?void 0:Fe.width)<(C==null?void 0:C.value)&&(Fe==null?void 0:Fe.left)<=((he==null?void 0:he.left)??0)?`${(Fe==null?void 0:Fe.width)/2}px`:(Fe==null?void 0:Fe.right)>=((he==null?void 0:he.right)??0)&&(Fe==null?void 0:Fe.width)<(C==null?void 0:C.value)?`${(C==null?void 0:C.value)-(Fe==null?void 0:Fe.width)/2}px`:"50%"}),q=()=>{const V=mt(s);V&&V.focus({preventScroll:!0})},z=o.computed(()=>{var V;return((V=I.value)==null?void 0:V.getSidebarProps())||{}}),oe=()=>{a.openOnTop&&r("recalculate-position")},$=Ut(u,"action"),R=o.computed(()=>a.monthPicker||a.yearPicker?Ut(u,"monthYear"):a.timePicker?Ut(u,"timePicker"):Ut(u,"shared")),W=o.computed(()=>a.openOnTop?"dp__arrow_bottom":"dp__arrow_top"),J=o.computed(()=>({dp__menu_disabled:a.disabled,dp__menu_readonly:a.readonly,"dp-menu-loading":a.loading})),y=o.computed(()=>({dp__menu:!0,dp__menu_index:!p.value.enabled,dp__relative:p.value.enabled,...f.value.menu??{}})),j=V=>{ro(V,m.value,!0)},se=V=>{a.escClose&&(r("close-picker"),g(V))},_e=V=>{if(a.arrowNavigation){if(V===Dt.up)return Y();if(V===Dt.down)return D();if(V===Dt.left)return b();if(V===Dt.right)return v()}else V===Dt.left||V===Dt.up?S("handleArrow",Dt.left,0,V===Dt.up):S("handleArrow",Dt.right,0,V===Dt.down)},U=V=>{c(V.shiftKey),!a.disableMonthYearSelect&&V.code===Ke.tab&&V.target.classList.contains("dp__menu")&&d.value.shiftKeyInMenu&&(V.preventDefault(),ro(V,m.value,!0),r("close-picker"))},xe=()=>{q(),r("time-picker-close")},te=V=>{var he,Fe,pt;(he=I.value)==null||he.toggleTimePicker(!1,!1),(Fe=I.value)==null||Fe.toggleMonthPicker(!1,!1,V),(pt=I.value)==null||pt.toggleYearPicker(!1,!1,V)},le=(V,he=0)=>{var Fe,pt,Jt;return V==="month"?(Fe=I.value)==null?void 0:Fe.toggleMonthPicker(!1,!0,he):V==="year"?(pt=I.value)==null?void 0:pt.toggleYearPicker(!1,!0,he):V==="time"?(Jt=I.value)==null?void 0:Jt.toggleTimePicker(!0,!1):te(he)},S=(V,...he)=>{var Fe,pt;(Fe=I.value)!=null&&Fe[V]&&((pt=I.value)==null||pt[V](...he))},ie=()=>{S("selectCurrentDate")},ce=(V,he)=>{S("presetDate",o.toValue(V),he)},de=()=>{S("clearHoverDate")},Ne=(V,he)=>{S("updateMonthYear",V,he)},Ae=(V,he)=>{V.preventDefault(),_e(he)},Ve=V=>{var he,Fe,pt;if(U(V),V.key===Ke.home||V.key===Ke.end)return S("selectWeekDate",V.key===Ke.home,V.target.getAttribute("id"));switch((V.key===Ke.pageUp||V.key===Ke.pageDown)&&(V.shiftKey?(S("changeYear",V.key===Ke.pageUp),(he=kl(s.value,"overlay-year"))==null||he.focus()):(S("changeMonth",V.key===Ke.pageUp),(Fe=kl(s.value,V.key===Ke.pageUp?"action-prev":"action-next"))==null||Fe.focus()),V.target.getAttribute("id")&&((pt=s.value)==null||pt.focus({preventScroll:!0}))),V.key){case Ke.esc:return se(V);case Ke.arrowLeft:return Ae(V,Dt.left);case Ke.arrowRight:return Ae(V,Dt.right);case Ke.arrowUp:return Ae(V,Dt.up);case Ke.arrowDown:return Ae(V,Dt.down);default:return}},nt=V=>{var he;p.value.enabled&&!p.value.input&&!((he=s.value)!=null&&he.contains(V.target))&&O.value&&(O.value=!1,r("menu-blur"))};return e({updateMonthYear:Ne,switchView:le,handleFlow:A,onValueCleared:()=>{var V,he;(he=(V=I.value)==null?void 0:V.setStartTime)==null||he.call(V)}}),(V,he)=>{var Fe,pt,Jt;return o.openBlock(),o.createElementBlock("div",{id:V.uid?`dp-menu-${V.uid}`:void 0,ref_key:"dpMenuRef",ref:s,tabindex:o.unref(p).enabled?void 0:"0",role:o.unref(p).enabled?void 0:"dialog","aria-label":(Fe=V.ariaLabels)==null?void 0:Fe.menu,class:o.normalizeClass(y.value),style:o.normalizeStyle({"--dp-arrow-left":L.value}),onMouseleave:de,onClick:j,onKeydown:Ve},[(V.disabled||V.readonly)&&o.unref(p).enabled||V.loading?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(J.value)},[V.loading?(o.openBlock(),o.createElementBlock("div",jw,he[19]||(he[19]=[o.createElementVNode("span",{class:"dp--menu-loader"},null,-1)]))):o.createCommentVNode("",!0)],2)):o.createCommentVNode("",!0),V.$slots["menu-header"]?(o.openBlock(),o.createElementBlock("div",Yw,[o.renderSlot(V.$slots,"menu-header")])):o.createCommentVNode("",!0),!o.unref(p).enabled&&!V.teleportCenter?(o.openBlock(),o.createElementBlock("div",{key:2,class:o.normalizeClass(W.value)},null,2)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"innerMenuRef",ref:T,class:o.normalizeClass({dp__menu_content_wrapper:((pt=V.presetDates)==null?void 0:pt.length)||!!V.$slots["left-sidebar"]||!!V.$slots["right-sidebar"],"dp--menu-content-wrapper-collapsed":n.collapse&&(((Jt=V.presetDates)==null?void 0:Jt.length)||!!V.$slots["left-sidebar"]||!!V.$slots["right-sidebar"])}),"data-dp-mobile":o.unref(x),style:o.normalizeStyle({"--dp-menu-width":`${C.value}px`})},[V.$slots["left-sidebar"]?(o.openBlock(),o.createElementBlock("div",Ww,[o.renderSlot(V.$slots,"left-sidebar",o.normalizeProps(o.guardReactiveProps(z.value)))])):o.createCommentVNode("",!0),V.presetDates.length?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass({"dp--preset-dates-collapsed":n.collapse,"dp--preset-dates":!0}),"data-dp-mobile":o.unref(x)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(V.presetDates,(G,B)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:B},[G.slot?o.renderSlot(V.$slots,G.slot,{key:0,presetDate:ce,label:G.label,value:G.value}):(o.openBlock(),o.createElementBlock("button",{key:1,type:"button",style:o.normalizeStyle(G.style||{}),class:o.normalizeClass(["dp__btn dp--preset-range",{"dp--preset-range-collapsed":n.collapse}]),"data-test-id":G.testId??void 0,"data-dp-mobile":o.unref(x),onClick:o.withModifiers(ae=>ce(G.value,G.noTz),["prevent"]),onKeydown:ae=>o.unref(Ot)(ae,()=>ce(G.value,G.noTz),!0)},o.toDisplayString(G.label),47,Gw))],64))),128))],10,qw)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"calendarWrapperRef",ref:E,class:"dp__instance_calendar",role:"document"},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(N.value),o.mergeProps({ref_key:"dynCmpRef",ref:I},i.value,{"flow-step":o.unref(K),onMount:o.unref(k),onUpdateFlowStep:o.unref(w),onResetFlow:o.unref(_),onFocusMenu:q,onSelectDate:he[0]||(he[0]=G=>V.$emit("select-date")),onDateUpdate:he[1]||(he[1]=G=>V.$emit("date-update",G)),onTooltipOpen:he[2]||(he[2]=G=>V.$emit("tooltip-open",G)),onTooltipClose:he[3]||(he[3]=G=>V.$emit("tooltip-close",G)),onAutoApply:he[4]||(he[4]=G=>V.$emit("auto-apply",G)),onRangeStart:he[5]||(he[5]=G=>V.$emit("range-start",G)),onRangeEnd:he[6]||(he[6]=G=>V.$emit("range-end",G)),onInvalidFixedRange:he[7]||(he[7]=G=>V.$emit("invalid-fixed-range",G)),onTimeUpdate:he[8]||(he[8]=G=>V.$emit("time-update")),onAmPmChange:he[9]||(he[9]=G=>V.$emit("am-pm-change",G)),onTimePickerOpen:he[10]||(he[10]=G=>V.$emit("time-picker-open",G)),onTimePickerClose:xe,onRecalculatePosition:oe,onUpdateMonthYear:he[11]||(he[11]=G=>V.$emit("update-month-year",G)),onAutoApplyInvalid:he[12]||(he[12]=G=>V.$emit("auto-apply-invalid",G)),onInvalidDate:he[13]||(he[13]=G=>V.$emit("invalid-date",G)),onOverlayToggle:he[14]||(he[14]=G=>V.$emit("overlay-toggle",G)),"onUpdate:internalModelValue":he[15]||(he[15]=G=>V.$emit("update:internal-model-value",G))}),o.createSlots({_:2},[o.renderList(R.value,(G,B)=>({name:G,fn:o.withCtx(ae=>[o.renderSlot(V.$slots,G,o.normalizeProps(o.guardReactiveProps({...ae})))])}))]),1040,["flow-step","onMount","onUpdateFlowStep","onResetFlow"]))],512),V.$slots["right-sidebar"]?(o.openBlock(),o.createElementBlock("div",Kw,[o.renderSlot(V.$slots,"right-sidebar",o.normalizeProps(o.guardReactiveProps(z.value)))])):o.createCommentVNode("",!0),V.$slots["action-extra"]?(o.openBlock(),o.createElementBlock("div",Xw,[V.$slots["action-extra"]?o.renderSlot(V.$slots,"action-extra",{key:0,selectCurrentDate:ie}):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)],14,Uw),!V.autoApply||o.unref(m).keepActionRow?(o.openBlock(),o.createBlock(X1,o.mergeProps({key:3,"menu-mount":F.value},i.value,{"calendar-width":C.value,onClosePicker:he[16]||(he[16]=G=>V.$emit("close-picker")),onSelectDate:he[17]||(he[17]=G=>V.$emit("select-date")),onInvalidSelect:he[18]||(he[18]=G=>V.$emit("invalid-select")),onSelectNow:ie}),o.createSlots({_:2},[o.renderList(o.unref($),(G,B)=>({name:G,fn:o.withCtx(ae=>[o.renderSlot(V.$slots,G,o.normalizeProps(o.guardReactiveProps({...ae})))])}))]),1040,["menu-mount","calendar-width"])):o.createCommentVNode("",!0)],46,Hw)}}});var ur=(n=>(n.center="center",n.left="left",n.right="right",n))(ur||{});const Qw=({menuRef:n,menuRefInner:e,inputRef:t,pickerWrapperRef:r,inline:a,emit:s,props:i,slots:l})=>{const{defaultedConfig:c}=Ze(i),d=o.ref({}),u=o.ref(!1),h=o.ref({top:"0",left:"0"}),p=o.ref(!1),m=o.toRef(i,"teleportCenter");o.watch(m,()=>{h.value=JSON.parse(JSON.stringify({})),I()});const f=_=>{if(i.teleport){const A=_.getBoundingClientRect();return{left:A.left+window.scrollX,top:A.top+window.scrollY}}return{top:0,left:0}},g=(_,A)=>{h.value.left=`${_+A-d.value.width}px`},x=_=>{h.value.left=`${_}px`},E=(_,A)=>{i.position===ur.left&&x(_),i.position===ur.right&&g(_,A),i.position===ur.center&&(h.value.left=`${_+A/2-d.value.width/2}px`)},C=_=>{const{width:A,height:N}=_.getBoundingClientRect(),{top:L,left:q}=f(_);return{top:+L,left:+q,width:A,height:N}},T=()=>{h.value.left="50%",h.value.top="50%",h.value.transform="translate(-50%, -50%)",h.value.position="fixed",delete h.value.opacity},F=()=>{const _=mt(t);h.value=i.altPosition(_)},I=(_=!0)=>{var A;if(!a.value.enabled){if(m.value)return T();if(i.altPosition!==null)return F();if(_){const N=i.teleport?(A=e.value)==null?void 0:A.$el:n.value;N&&(d.value=N.getBoundingClientRect()),s("recalculate-position")}return Y()}},O=({inputEl:_,left:A,width:N})=>{window.screen.width>768&&!u.value&&E(A,N),v(_)},P=_=>{const{top:A,left:N,height:L,width:q}=C(_);h.value.top=`${L+A+ +i.offset}px`,p.value=!1,u.value||(h.value.left=`${N+q/2-d.value.width/2}px`),O({inputEl:_,left:N,width:q})},M=_=>{const{top:A,left:N,width:L}=C(_);h.value.top=`${A-+i.offset-d.value.height}px`,p.value=!0,O({inputEl:_,left:N,width:L})},v=_=>{if(i.autoPosition){const{left:A,width:N}=C(_),{left:L,right:q}=d.value;if(!u.value){if(Math.abs(L)!==Math.abs(q)){if(L<=0)return u.value=!0,x(A);if(q>=document.documentElement.clientWidth)return u.value=!0,g(A,N)}return E(A,N)}}},b=()=>{const _=mt(t);if(_){if(i.autoPosition===ln.top)return ln.top;if(i.autoPosition===ln.bottom)return ln.bottom;const{height:A}=d.value,{top:N,height:L}=_.getBoundingClientRect(),q=window.innerHeight-N-L,z=N;return A<=q?ln.bottom:A>q&&A<=z?ln.top:q>=z?ln.bottom:ln.top}return ln.bottom},D=_=>b()===ln.bottom?P(_):M(_),Y=()=>{const _=mt(t);if(_)return i.autoPosition?D(_):P(_)},K=function(_){if(_){const A=_.scrollHeight>_.clientHeight,N=window.getComputedStyle(_).overflowY.indexOf("hidden")!==-1;return A&&!N}return!0},w=function(_){return!_||_===document.body||_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?window:K(_)?_:w(_.assignedSlot&&c.value.shadowDom?_.assignedSlot.parentNode:_.parentNode)},k=_=>{if(_)switch(i.position){case ur.left:return{left:0,transform:"translateX(0)"};case ur.right:return{left:`${_.width}px`,transform:"translateX(-100%)"};default:return{left:`${_.width/2}px`,transform:"translateX(-50%)"}}return{}};return{openOnTop:p,menuStyle:h,xCorrect:u,setMenuPosition:I,getScrollableParent:w,shadowRender:(_,A,N)=>{var L,q,z;const oe=document.createElement("div"),$=(L=mt(t))==null?void 0:L.getBoundingClientRect();oe.setAttribute("id","dp--temp-container");const R=(q=r.value)!=null&&q.clientWidth?r.value:document.body;R.append(oe);const W=k($),J=c.value.shadowDom?Object.keys(l).filter(j=>["right-sidebar","left-sidebar","top-extra","action-extra"].includes(j)):Object.keys(l),y=o.h(A,{...N,shadow:!0,style:{opacity:0,position:"absolute",...W}},Object.fromEntries(J.map(j=>[j,l[j]])));_!=null&&(y.appContext=_.appContext),o.render(y,oe),d.value=(z=y.el)==null?void 0:z.getBoundingClientRect(),o.render(null,oe),R.removeChild(oe)}}},lo=[{name:"clock-icon",use:["time","calendar","shared"]},{name:"arrow-left",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-right",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-up",use:["time","calendar","month-year","shared"]},{name:"arrow-down",use:["time","calendar","month-year","shared"]},{name:"calendar-icon",use:["month-year","time","calendar","shared","year-mode"]},{name:"day",use:["calendar","shared"]},{name:"month-overlay-value",use:["calendar","month-year","shared"]},{name:"year-overlay-value",use:["calendar","month-year","shared","year-mode"]},{name:"year-overlay",use:["month-year","shared"]},{name:"month-overlay",use:["month-year","shared"]},{name:"month-overlay-header",use:["month-year","shared"]},{name:"year-overlay-header",use:["month-year","shared"]},{name:"hours-overlay-value",use:["calendar","time","shared"]},{name:"hours-overlay-header",use:["calendar","time","shared"]},{name:"minutes-overlay-value",use:["calendar","time","shared"]},{name:"minutes-overlay-header",use:["calendar","time","shared"]},{name:"seconds-overlay-value",use:["calendar","time","shared"]},{name:"seconds-overlay-header",use:["calendar","time","shared"]},{name:"hours",use:["calendar","time","shared"]},{name:"minutes",use:["calendar","time","shared"]},{name:"month",use:["calendar","month-year","shared"]},{name:"year",use:["calendar","month-year","shared","year-mode"]},{name:"action-buttons",use:["action"]},{name:"action-preview",use:["action"]},{name:"calendar-header",use:["calendar","shared"]},{name:"marker-tooltip",use:["calendar","shared"]},{name:"action-extra",use:["menu"]},{name:"time-picker-overlay",use:["calendar","time","shared"]},{name:"am-pm-button",use:["calendar","time","shared"]},{name:"left-sidebar",use:["menu"]},{name:"right-sidebar",use:["menu"]},{name:"month-year",use:["month-year","shared"]},{name:"time-picker",use:["menu","shared"]},{name:"action-row",use:["action"]},{name:"marker",use:["calendar","shared"]},{name:"quarter",use:["shared"]},{name:"top-extra",use:["shared","month-year"]},{name:"tp-inline-arrow-up",use:["shared","time"]},{name:"tp-inline-arrow-down",use:["shared","time"]},{name:"menu-header",use:["menu"]}],Zw=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],Jw={all:()=>lo,monthYear:()=>lo.filter(n=>n.use.includes("month-year")),input:()=>Zw,timePicker:()=>lo.filter(n=>n.use.includes("time")),action:()=>lo.filter(n=>n.use.includes("action")),calendar:()=>lo.filter(n=>n.use.includes("calendar")),menu:()=>lo.filter(n=>n.use.includes("menu")),shared:()=>lo.filter(n=>n.use.includes("shared")),yearMode:()=>lo.filter(n=>n.use.includes("year-mode"))},Ut=(n,e,t)=>{const r=[];return Jw[e]().forEach(a=>{n[a.name]&&r.push(a.name)}),t!=null&&t.length&&t.forEach(a=>{a.slot&&r.push(a.slot)}),r},Xr=n=>{const e=o.computed(()=>r=>n.value?r?n.value.open:n.value.close:""),t=o.computed(()=>r=>n.value?r?n.value.menuAppearTop:n.value.menuAppearBottom:"");return{transitionName:e,showTransition:!!n.value,menuTransition:t}},Qr=(n,e,t)=>{const{defaultedRange:r,defaultedTz:a}=Ze(n),s=ne(zt(ne(),a.value.timezone)),i=o.ref([{month:Pe(s),year:Te(s)}]),l=p=>{const m={hours:Ln(s),minutes:oo(s),seconds:0};return r.value.enabled?[m[p],m[p]]:m[p]},c=o.reactive({hours:l("hours"),minutes:l("minutes"),seconds:l("seconds")});o.watch(r,(p,m)=>{p.enabled!==m.enabled&&(c.hours=l("hours"),c.minutes=l("minutes"),c.seconds=l("seconds"))},{deep:!0});const d=o.computed({get:()=>n.internalModelValue,set:p=>{!n.readonly&&!n.disabled&&e("update:internal-model-value",p)}}),u=o.computed(()=>p=>i.value[p]?i.value[p].month:0),h=o.computed(()=>p=>i.value[p]?i.value[p].year:0);return o.watch(d,(p,m)=>{t&&JSON.stringify(p??{})!==JSON.stringify(m??{})&&t()},{deep:!0}),{calendars:i,time:c,modelValue:d,month:u,year:h,today:s}},e_=(n,e)=>{const{defaultedMultiCalendars:t,defaultedMultiDates:r,defaultedUI:a,defaultedHighlight:s,defaultedTz:i,propDates:l,defaultedRange:c}=Ze(e),{isDisabled:d}=co(e),u=o.ref(null),h=o.ref(zt(new Date,i.value.timezone)),p=y=>{!y.current&&e.hideOffsetDates||(u.value=y.value)},m=()=>{u.value=null},f=y=>Array.isArray(n.value)&&c.value.enabled&&n.value[0]&&u.value?y?dt(u.value,n.value[0]):st(u.value,n.value[0]):!0,g=(y,j)=>{const se=()=>n.value?j?n.value[0]||null:n.value[1]:null,_e=n.value&&Array.isArray(n.value)?se():null;return Le(ne(y.value),_e)},x=y=>{const j=Array.isArray(n.value)?n.value[0]:null;return y?!st(u.value??null,j):!0},E=(y,j=!0)=>(c.value.enabled||e.weekPicker)&&Array.isArray(n.value)&&n.value.length===2?e.hideOffsetDates&&!y.current?!1:Le(ne(y.value),n.value[j?0:1]):c.value.enabled?g(y,j)&&x(j)||Le(y.value,Array.isArray(n.value)?n.value[0]:null)&&f(j):!1,C=(y,j)=>{if(Array.isArray(n.value)&&n.value[0]&&n.value.length===1){const se=Le(y.value,u.value);return j?dt(n.value[0],y.value)&&se:st(n.value[0],y.value)&&se}return!1},T=y=>!n.value||e.hideOffsetDates&&!y.current?!1:c.value.enabled?e.modelAuto&&Array.isArray(n.value)?Le(y.value,n.value[0]?n.value[0]:h.value):!1:r.value.enabled&&Array.isArray(n.value)?n.value.some(j=>Le(j,y.value)):Le(y.value,n.value?n.value:h.value),F=y=>{if(c.value.autoRange||e.weekPicker){if(u.value){if(e.hideOffsetDates&&!y.current)return!1;const j=Xt(u.value,+c.value.autoRange),se=zn(ne(u.value),e.weekStart);return e.weekPicker?Le(se[1],ne(y.value)):Le(j,ne(y.value))}return!1}return!1},I=y=>{if(c.value.autoRange||e.weekPicker){if(u.value){const j=Xt(u.value,+c.value.autoRange);if(e.hideOffsetDates&&!y.current)return!1;const se=zn(ne(u.value),e.weekStart);return e.weekPicker?dt(y.value,se[0])&&st(y.value,se[1]):dt(y.value,u.value)&&st(y.value,j)}return!1}return!1},O=y=>{if(c.value.autoRange||e.weekPicker){if(u.value){if(e.hideOffsetDates&&!y.current)return!1;const j=zn(ne(u.value),e.weekStart);return e.weekPicker?Le(j[0],y.value):Le(u.value,y.value)}return!1}return!1},P=y=>Wr(n.value,u.value,y.value),M=()=>e.modelAuto&&Array.isArray(e.internalModelValue)?!!e.internalModelValue[0]:!1,v=()=>e.modelAuto?ap(e.internalModelValue):!0,b=y=>{if(e.weekPicker)return!1;const j=c.value.enabled?!E(y)&&!E(y,!1):!0;return!d(y.value)&&!T(y)&&!(!y.current&&e.hideOffsetDates)&&j},D=y=>c.value.enabled?e.modelAuto?M()&&T(y):!1:T(y),Y=y=>s.value?k1(y.value,l.value.highlight):!1,K=y=>{const j=d(y.value);return j&&(typeof s.value=="function"?!s.value(y.value,j):!s.value.options.highlightDisabled)},w=y=>{var j;return typeof s.value=="function"?s.value(y.value):(j=s.value.weekdays)==null?void 0:j.includes(y.value.getDay())},k=y=>(c.value.enabled||e.weekPicker)&&(!(t.value.count>0)||y.current)&&v()&&!(!y.current&&e.hideOffsetDates)&&!T(y)?P(y):!1,_=y=>{if(Array.isArray(n.value)&&n.value.length===1){const{before:j,after:se}=wp(+c.value.maxRange,n.value[0]);return or(y.value,j)||Mo(y.value,se)}return!1},A=y=>{if(Array.isArray(n.value)&&n.value.length===1){const{before:j,after:se}=wp(+c.value.minRange,n.value[0]);return Wr([j,se],n.value[0],y.value)}return!1},N=y=>c.value.enabled&&(c.value.maxRange||c.value.minRange)?c.value.maxRange&&c.value.minRange?_(y)||A(y):c.value.maxRange?_(y):A(y):!1,L=y=>{const{isRangeStart:j,isRangeEnd:se}=$(y),_e=c.value.enabled?j||se:!1;return{dp__cell_offset:!y.current,dp__pointer:!e.disabled&&!(!y.current&&e.hideOffsetDates)&&!d(y.value)&&!N(y),dp__cell_disabled:d(y.value)||N(y),dp__cell_highlight:!K(y)&&(Y(y)||w(y))&&!D(y)&&!_e&&!O(y)&&!(k(y)&&e.weekPicker)&&!se,dp__cell_highlight_active:!K(y)&&(Y(y)||w(y))&&D(y),dp__today:!e.noToday&&Le(y.value,h.value)&&y.current,"dp--past":st(y.value,h.value),"dp--future":dt(y.value,h.value)}},q=y=>({dp__active_date:D(y),dp__date_hover:b(y)}),z=y=>{if(n.value&&!Array.isArray(n.value)){const j=zn(n.value,e.weekStart);return{...W(y),dp__range_start:Le(j[0],y.value),dp__range_end:Le(j[1],y.value),dp__range_between_week:dt(y.value,j[0])&&st(y.value,j[1])}}return{...W(y)}},oe=y=>{if(n.value&&Array.isArray(n.value)){const j=zn(n.value[0],e.weekStart),se=n.value[1]?zn(n.value[1],e.weekStart):[];return{...W(y),dp__range_start:Le(j[0],y.value)||Le(se[0],y.value),dp__range_end:Le(j[1],y.value)||Le(se[1],y.value),dp__range_between_week:dt(y.value,j[0])&&st(y.value,j[1])||dt(y.value,se[0])&&st(y.value,se[1]),dp__range_between:dt(y.value,j[1])&&st(y.value,se[0])}}return{...W(y)}},$=y=>{const j=t.value.count>0?y.current&&E(y)&&v():E(y)&&v(),se=t.value.count>0?y.current&&E(y,!1)&&v():E(y,!1)&&v();return{isRangeStart:j,isRangeEnd:se}},R=y=>{const{isRangeStart:j,isRangeEnd:se}=$(y);return{dp__range_start:j,dp__range_end:se,dp__range_between:k(y),dp__date_hover:Le(y.value,u.value)&&!j&&!se&&!e.weekPicker,dp__date_hover_start:C(y,!0),dp__date_hover_end:C(y,!1)}},W=y=>({...R(y),dp__cell_auto_range:I(y),dp__cell_auto_range_start:O(y),dp__cell_auto_range_end:F(y)}),J=y=>c.value.enabled?c.value.autoRange?W(y):e.modelAuto?{...q(y),...R(y)}:e.weekPicker?oe(y):R(y):e.weekPicker?z(y):q(y);return{setHoverDate:p,clearHoverDate:m,getDayClassData:y=>e.hideOffsetDates&&!y.current?{}:{...L(y),...J(y),[e.dayClass?e.dayClass(y.value,e.internalModelValue):""]:!0,...a.value.calendarCell??{}}}},co=n=>{const{defaultedFilters:e,defaultedRange:t,propDates:r,defaultedMultiDates:a}=Ze(n),s=w=>r.value.disabledDates?typeof r.value.disabledDates=="function"?r.value.disabledDates(ne(w)):!!rs(w,r.value.disabledDates):!1,i=w=>r.value.maxDate?n.yearPicker?Te(w)>Te(r.value.maxDate):dt(w,r.value.maxDate):!1,l=w=>r.value.minDate?n.yearPicker?Te(w)<Te(r.value.minDate):st(w,r.value.minDate):!1,c=w=>{const k=i(w),_=l(w),A=s(w),N=e.value.months.map($=>+$).includes(Pe(w)),L=n.disabledWeekDays.length?n.disabledWeekDays.some($=>+$===sv(w)):!1,q=m(w),z=Te(w),oe=z<+n.yearRange[0]||z>+n.yearRange[1];return!(k||_||A||N||oe||L||q)},d=(w,k)=>st(...so(r.value.minDate,w,k))||Le(...so(r.value.minDate,w,k)),u=(w,k)=>dt(...so(r.value.maxDate,w,k))||Le(...so(r.value.maxDate,w,k)),h=(w,k,_)=>{let A=!1;return r.value.maxDate&&_&&u(w,k)&&(A=!0),r.value.minDate&&!_&&d(w,k)&&(A=!0),A},p=(w,k,_,A)=>{let N=!1;return A&&(r.value.minDate||r.value.maxDate)?r.value.minDate&&r.value.maxDate?N=h(w,k,_):(r.value.minDate&&d(w,k)||r.value.maxDate&&u(w,k))&&(N=!0):N=!0,N},m=w=>Array.isArray(r.value.allowedDates)&&!r.value.allowedDates.length?!0:r.value.allowedDates?!rs(w,r.value.allowedDates,dp(n.monthPicker,n.yearPicker)):!1,f=w=>!c(w),g=w=>t.value.noDisabledRange?!Ih({start:w[0],end:w[1]}).some(k=>f(k)):!0,x=w=>{if(w){const k=Te(w);return k>=+n.yearRange[0]&&k<=n.yearRange[1]}return!0},E=(w,k)=>!!(Array.isArray(w)&&w[k]&&(t.value.maxRange||t.value.minRange)&&x(w[k])),C=(w,k,_=0)=>{if(E(k,_)&&x(w)){const A=$h(w,k[_]),N=mp(k[_],w),L=N.length===1?0:N.filter(z=>f(z)).length,q=Math.abs(A)-(t.value.minMaxRawRange?0:L);if(t.value.minRange&&t.value.maxRange)return q>=+t.value.minRange&&q<=+t.value.maxRange;if(t.value.minRange)return q>=+t.value.minRange;if(t.value.maxRange)return q<=+t.value.maxRange}return!0},T=()=>!n.enableTimePicker||n.monthPicker||n.yearPicker||n.ignoreTimeValidation,F=w=>Array.isArray(w)?[w[0]?xl(w[0]):null,w[1]?xl(w[1]):null]:xl(w),I=(w,k,_)=>w.find(A=>+A.hours===Ln(k)&&A.minutes==="*"?!0:+A.minutes===oo(k)&&+A.hours===Ln(k))&&_,O=(w,k,_)=>{const[A,N]=w,[L,q]=k;return!I(A,L,_)&&!I(N,q,_)&&_},P=(w,k)=>{const _=Array.isArray(k)?k:[k];return Array.isArray(n.disabledTimes)?Array.isArray(n.disabledTimes[0])?O(n.disabledTimes,_,w):!_.some(A=>I(n.disabledTimes,A,w)):w},M=(w,k)=>{const _=Array.isArray(k)?[Oo(k[0]),k[1]?Oo(k[1]):void 0]:Oo(k),A=!n.disabledTimes(_);return w&&A},v=(w,k)=>n.disabledTimes?Array.isArray(n.disabledTimes)?P(k,w):M(k,w):k,b=w=>{let k=!0;if(!w||T())return!0;const _=!r.value.minDate&&!r.value.maxDate?F(w):w;return(n.maxTime||r.value.maxDate)&&(k=kp(n.maxTime,r.value.maxDate,"max",bt(_),k)),(n.minTime||r.value.minDate)&&(k=kp(n.minTime,r.value.minDate,"min",bt(_),k)),v(w,k)},D=w=>{if(!n.monthPicker)return!0;let k=!0;const _=ne(cn(w));if(r.value.minDate&&r.value.maxDate){const A=ne(cn(r.value.minDate)),N=ne(cn(r.value.maxDate));return dt(_,A)&&st(_,N)||Le(_,A)||Le(_,N)}if(r.value.minDate){const A=ne(cn(r.value.minDate));k=dt(_,A)||Le(_,A)}if(r.value.maxDate){const A=ne(cn(r.value.maxDate));k=st(_,A)||Le(_,A)}return k},Y=o.computed(()=>w=>!n.enableTimePicker||n.ignoreTimeValidation?!0:b(w)),K=o.computed(()=>w=>n.monthPicker?Array.isArray(w)&&(t.value.enabled||a.value.enabled)?!w.filter(k=>!D(k)).length:D(w):!0);return{isDisabled:f,validateDate:c,validateMonthYearInRange:p,isDateRangeAllowed:g,checkMinMaxRange:C,isValidTime:b,isTimeValid:Y,isMonthValid:K}},ds=()=>{const n=o.computed(()=>(r,a)=>r==null?void 0:r.includes(a)),e=o.computed(()=>(r,a)=>r.count?r.solo?!0:a===0:!0),t=o.computed(()=>(r,a)=>r.count?r.solo?!0:a===r.count-1:!0);return{hideNavigationButtons:n,showLeftIcon:e,showRightIcon:t}},t_=(n,e,t)=>{const r=o.ref(0),a=o.reactive({[Do.timePicker]:!n.enableTimePicker||n.timePicker||n.monthPicker,[Do.calendar]:!1,[Do.header]:!1}),s=o.computed(()=>n.monthPicker||n.timePicker),i=h=>{var p;if((p=n.flow)!=null&&p.length){if(!h&&s.value)return u();a[h]=!0,Object.keys(a).filter(m=>!a[m]).length||u()}},l=()=>{var h,p;(h=n.flow)!=null&&h.length&&r.value!==-1&&(r.value+=1,e("flow-step",r.value),u()),((p=n.flow)==null?void 0:p.length)===r.value&&o.nextTick().then(()=>c())},c=()=>{r.value=-1},d=(h,p,...m)=>{var f,g;n.flow[r.value]===h&&t.value&&((g=(f=t.value)[p])==null||g.call(f,...m))},u=(h=0)=>{h&&(r.value+=h),d(xt.month,"toggleMonthPicker",!0),d(xt.year,"toggleYearPicker",!0),d(xt.calendar,"toggleTimePicker",!1,!0),d(xt.time,"toggleTimePicker",!0,!0);const p=n.flow[r.value];(p===xt.hours||p===xt.minutes||p===xt.seconds)&&d(p,"toggleTimePicker",!0,!0,p)};return{childMount:i,updateFlowStep:l,resetFlow:c,handleFlow:u,flowStep:r}},n_={key:1,class:"dp__input_wrap"},o_=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-label","aria-disabled","aria-invalid"],r_={key:2,class:"dp--clear-btn"},a_=["aria-label"],s_=o.defineComponent({compatConfig:{MODE:3},__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1},inputValue:{type:String,default:""},...is},emits:["clear","open","update:input-value","set-input-date","close","select-date","set-empty-date","toggle","focus-prev","focus","blur","real-blur","text-input"],setup(n,{expose:e,emit:t}){const r=t,a=n,{defaultedTextInput:s,defaultedAriaLabels:i,defaultedInline:l,defaultedConfig:c,defaultedRange:d,defaultedMultiDates:u,defaultedUI:h,getDefaultPattern:p,getDefaultStartTime:m}=Ze(a),{checkMinMaxRange:f}=co(a),g=o.ref(),x=o.ref(null),E=o.ref(!1),C=o.ref(!1),T=o.computed(()=>({dp__pointer:!a.disabled&&!a.readonly&&!s.value.enabled,dp__disabled:a.disabled,dp__input_readonly:!s.value.enabled,dp__input:!0,dp__input_icon_pad:!a.hideInputIcon,dp__input_valid:typeof a.state=="boolean"?a.state:!1,dp__input_invalid:typeof a.state=="boolean"?!a.state:!1,dp__input_focus:E.value||a.isMenuOpen,dp__input_reg:!s.value.enabled,...h.value.input??{}})),F=()=>{r("set-input-date",null),a.clearable&&a.autoApply&&(r("set-empty-date"),g.value=null)},I=z=>{const oe=m();return w1(z,s.value.format??p(),oe??gp({},a.enableSeconds),a.inputValue,C.value,a.formatLocale)},O=z=>{const{rangeSeparator:oe}=s.value,[$,R]=z.split(`${oe}`);if($){const W=I($.trim()),J=R?I(R.trim()):void 0;if(Mo(W,J))return;const y=W&&J?[W,J]:[W];f(J,y,0)&&(g.value=W?y:null)}},P=()=>{C.value=!0},M=z=>{if(d.value.enabled)O(z);else if(u.value.enabled){const oe=z.split(";");g.value=oe.map($=>I($.trim())).filter($=>$)}else g.value=I(z)},v=z=>{var oe;const $=typeof z=="string"?z:(oe=z.target)==null?void 0:oe.value;$!==""?(s.value.openMenu&&!a.isMenuOpen&&r("open"),M($),r("set-input-date",g.value)):F(),C.value=!1,r("update:input-value",$),r("text-input",z,g.value)},b=z=>{s.value.enabled?(M(z.target.value),s.value.enterSubmit&&Cl(g.value)&&a.inputValue!==""?(r("set-input-date",g.value,!0),g.value=null):s.value.enterSubmit&&a.inputValue===""&&(g.value=null,r("clear"))):K(z)},D=(z,oe)=>{s.value.enabled&&s.value.tabSubmit&&!oe&&M(z.target.value),s.value.tabSubmit&&Cl(g.value)&&a.inputValue!==""?(r("set-input-date",g.value,!0,!0),g.value=null):s.value.tabSubmit&&a.inputValue===""&&(g.value=null,r("clear",!0))},Y=()=>{E.value=!0,r("focus"),o.nextTick().then(()=>{var z;s.value.enabled&&s.value.selectOnFocus&&((z=x.value)==null||z.select())})},K=z=>{if(ro(z,c.value,!0),s.value.enabled&&s.value.openMenu&&!l.value.input){if(s.value.openMenu==="open"&&!a.isMenuOpen)return r("open");if(s.value.openMenu==="toggle")return r("toggle")}else s.value.enabled||r("toggle")},w=()=>{r("real-blur"),E.value=!1,(!a.isMenuOpen||l.value.enabled&&l.value.input)&&r("blur"),a.autoApply&&s.value.enabled&&g.value&&!a.isMenuOpen&&(r("set-input-date",g.value),r("select-date"),g.value=null)},k=z=>{ro(z,c.value,!0),r("clear")},_=()=>{r("close")},A=z=>{if(z.key==="Tab"&&D(z),z.key==="Enter"&&b(z),z.key==="Escape"&&s.value.escClose&&_(),!s.value.enabled){if(z.code==="Tab")return;z.preventDefault()}},N=()=>{var z;(z=x.value)==null||z.focus({preventScroll:!0})},L=z=>{g.value=z},q=z=>{z.key===Ke.tab&&D(z,!0)};return e({focusInput:N,setParsedDate:L}),(z,oe)=>{var $,R,W;return o.openBlock(),o.createElementBlock("div",{onClick:K},[z.$slots.trigger&&!z.$slots["dp-input"]&&!o.unref(l).enabled?o.renderSlot(z.$slots,"trigger",{key:0}):o.createCommentVNode("",!0),!z.$slots.trigger&&(!o.unref(l).enabled||o.unref(l).input)?(o.openBlock(),o.createElementBlock("div",n_,[z.$slots["dp-input"]&&!z.$slots.trigger&&(!o.unref(l).enabled||o.unref(l).enabled&&o.unref(l).input)?o.renderSlot(z.$slots,"dp-input",{key:0,value:n.inputValue,isMenuOpen:n.isMenuOpen,onInput:v,onEnter:b,onTab:D,onClear:k,onBlur:w,onKeypress:A,onPaste:P,onFocus:Y,openMenu:()=>z.$emit("open"),closeMenu:()=>z.$emit("close"),toggleMenu:()=>z.$emit("toggle")}):o.createCommentVNode("",!0),z.$slots["dp-input"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("input",{key:1,id:z.uid?`dp-input-${z.uid}`:void 0,ref_key:"inputRef",ref:x,"data-test-id":"dp-input",name:z.name,class:o.normalizeClass(T.value),inputmode:o.unref(s).enabled?"text":"none",placeholder:z.placeholder,disabled:z.disabled,readonly:z.readonly,required:z.required,value:n.inputValue,autocomplete:z.autocomplete,"aria-label":($=o.unref(i))==null?void 0:$.input,"aria-disabled":z.disabled||void 0,"aria-invalid":z.state===!1?!0:void 0,onInput:v,onBlur:w,onFocus:Y,onKeypress:A,onKeydown:oe[0]||(oe[0]=J=>A(J)),onPaste:P},null,42,o_)),o.createElementVNode("div",{onClick:oe[3]||(oe[3]=J=>r("toggle"))},[z.$slots["input-icon"]&&!z.hideInputIcon?(o.openBlock(),o.createElementBlock("span",{key:0,class:"dp__input_icon",onClick:oe[1]||(oe[1]=J=>r("toggle"))},[o.renderSlot(z.$slots,"input-icon")])):o.createCommentVNode("",!0),!z.$slots["input-icon"]&&!z.hideInputIcon&&!z.$slots["dp-input"]?(o.openBlock(),o.createBlock(o.unref(sr),{key:1,"aria-label":(R=o.unref(i))==null?void 0:R.calendarIcon,class:"dp__input_icon dp__input_icons",onClick:oe[2]||(oe[2]=J=>r("toggle"))},null,8,["aria-label"])):o.createCommentVNode("",!0)]),z.$slots["clear-icon"]&&(z.alwaysClearable||n.inputValue&&z.clearable&&!z.disabled&&!z.readonly)?(o.openBlock(),o.createElementBlock("span",r_,[o.renderSlot(z.$slots,"clear-icon",{clear:k})])):o.createCommentVNode("",!0),!z.$slots["clear-icon"]&&(z.alwaysClearable||z.clearable&&n.inputValue&&!z.disabled&&!z.readonly)?(o.openBlock(),o.createElementBlock("button",{key:3,"aria-label":(W=o.unref(i))==null?void 0:W.clearInput,class:"dp--clear-btn",type:"button",onKeydown:oe[4]||(oe[4]=J=>o.unref(Ot)(J,()=>k(J),!0,q)),onClick:oe[5]||(oe[5]=o.withModifiers(J=>k(J),["prevent"]))},[o.createVNode(o.unref(np),{class:"dp__input_icons","data-test-id":"clear-icon"})],40,a_)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)])}}}),i_=typeof window<"u"?window:void 0,Pl=()=>{},l_=n=>o.getCurrentScope()?(o.onScopeDispose(n),!0):!1,c_=(n,e,t,r)=>{if(!n)return Pl;let a=Pl;const s=o.watch(()=>o.unref(n),l=>{a(),l&&(l.removeEventListener(e,t),l.addEventListener(e,t,r),a=()=>{l.removeEventListener(e,t,r),a=Pl})},{immediate:!0,flush:"post"}),i=()=>{s(),a()};return l_(i),i},d_=(n,e,t,r={})=>{const{window:a=i_,event:s="pointerdown"}=r;return a?c_(a,s,i=>{const l=mt(n),c=mt(e);!l||!c||l===i.target||i.composedPath().includes(l)||i.composedPath().includes(c)||t(i)},{passive:!0}):void 0},u_=["data-dp-mobile"],h_=o.defineComponent({compatConfig:{MODE:3},__name:"VueDatePicker",props:{...is},emits:["update:model-value","update:model-timezone-value","text-submit","closed","cleared","open","focus","blur","internal-model-change","recalculate-position","flow-step","update-month-year","invalid-select","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","date-update","invalid-date","overlay-toggle","text-input"],setup(n,{expose:e,emit:t}){const r=t,a=n,s=o.useSlots(),i=o.ref(!1),l=o.toRef(a,"modelValue"),c=o.toRef(a,"timezone"),d=o.ref(null),u=o.ref(null),h=o.ref(null),p=o.ref(!1),m=o.ref(null),f=o.ref(!1),g=o.ref(!1),x=o.ref(!1),E=o.ref(!1),{setMenuFocused:C,setShiftKey:T}=_p(),{clearArrowNav:F}=io(),{validateDate:I,isValidTime:O}=co(a),{defaultedTransitions:P,defaultedTextInput:M,defaultedInline:v,defaultedConfig:b,defaultedRange:D,defaultedMultiDates:Y}=Ze(a),{menuTransition:K,showTransition:w}=Xr(P),{isMobile:k}=Op(b),_=o.getCurrentInstance();o.onMounted(()=>{y(a.modelValue),o.nextTick().then(()=>{if(!v.value.enabled){const Z=$(m.value);Z==null||Z.addEventListener("scroll",ce),window==null||window.addEventListener("resize",de)}}),v.value.enabled&&(i.value=!0),window==null||window.addEventListener("keyup",Ne),window==null||window.addEventListener("keydown",Ae)}),o.onUnmounted(()=>{if(!v.value.enabled){const Z=$(m.value);Z==null||Z.removeEventListener("scroll",ce),window==null||window.removeEventListener("resize",de)}window==null||window.removeEventListener("keyup",Ne),window==null||window.removeEventListener("keydown",Ae)});const A=Ut(s,"all",a.presetDates),N=Ut(s,"input");o.watch([l,c],()=>{y(l.value)},{deep:!0});const{openOnTop:L,menuStyle:q,xCorrect:z,setMenuPosition:oe,getScrollableParent:$,shadowRender:R}=Qw({menuRef:d,menuRefInner:u,inputRef:h,pickerWrapperRef:m,inline:v,emit:r,props:a,slots:s}),{inputValue:W,internalModelValue:J,parseExternalModelValue:y,emitModelValue:j,formatInputValue:se,checkBeforeEmit:_e}=W1(r,a,p),U=o.computed(()=>({dp__main:!0,dp__theme_dark:a.dark,dp__theme_light:!a.dark,dp__flex_display:v.value.enabled,"dp--flex-display-collapsed":x.value,dp__flex_display_with_input:v.value.input})),xe=o.computed(()=>a.dark?"dp__theme_dark":"dp__theme_light"),te=o.computed(()=>a.teleport?{to:typeof a.teleport=="boolean"?"body":a.teleport,disabled:!a.teleport||v.value.enabled}:{}),le=o.computed(()=>({class:"dp__outer_menu_wrap"})),S=o.computed(()=>v.value.enabled&&(a.timePicker||a.monthPicker||a.yearPicker||a.quarterPicker)),ie=()=>{var Z,fe;return((fe=(Z=h.value)==null?void 0:Z.$el)==null?void 0:fe.getBoundingClientRect())??{width:0,left:0,right:0}},ce=()=>{i.value&&(b.value.closeOnScroll?B():oe())},de=()=>{var Z;i.value&&oe();const fe=((Z=u.value)==null?void 0:Z.$el.getBoundingClientRect().width)??0;x.value=document.body.offsetWidth<=fe},Ne=Z=>{Z.key==="Tab"&&!v.value.enabled&&!a.teleport&&b.value.tabOutClosesMenu&&(m.value.contains(document.activeElement)||B()),g.value=Z.shiftKey},Ae=Z=>{g.value=Z.shiftKey},Ve=()=>{!a.disabled&&!a.readonly&&(R(_,Ap,a),oe(!1),i.value=!0,i.value&&r("open"),i.value||G(),y(a.modelValue))},nt=()=>{var Z,fe;W.value="",G(),(Z=u.value)==null||Z.onValueCleared(),(fe=h.value)==null||fe.setParsedDate(null),r("update:model-value",null),r("update:model-timezone-value",null),r("cleared"),b.value.closeOnClearValue&&B()},V=()=>{const Z=J.value;return!Z||!Array.isArray(Z)&&I(Z)?!0:Array.isArray(Z)?Y.value.enabled||Z.length===2&&I(Z[0])&&I(Z[1])?!0:D.value.partialRange&&!a.timePicker?I(Z[0]):!1:!1},he=()=>{_e()&&V()?(j(),B()):r("invalid-select",J.value)},Fe=Z=>{pt(),j(),b.value.closeOnAutoApply&&!Z&&B()},pt=()=>{h.value&&M.value.enabled&&h.value.setParsedDate(J.value)},Jt=(Z=!1)=>{a.autoApply&&O(J.value)&&V()&&(D.value.enabled&&Array.isArray(J.value)?(D.value.partialRange||J.value.length===2)&&Fe(Z):Fe(Z))},G=()=>{M.value.enabled||(J.value=null)},B=(Z=!1)=>{var fe,be;Z&&J.value&&b.value.setDateOnMenuClose&&he(),v.value.enabled||(i.value&&(i.value=!1,z.value=!1,C(!1),T(!1),F(),r("closed"),W.value&&y(l.value)),G(),r("blur"),(be=(fe=u.value)==null?void 0:fe.$el)==null||be.remove())},ae=(Z,fe,be=!1)=>{if(!Z){J.value=null;return}const Un=Array.isArray(Z)?!Z.some(Ro=>!I(Ro)):I(Z),Bn=O(Z);Un&&Bn?(E.value=!0,J.value=Z,fe?(f.value=be,he(),r("text-submit")):a.autoApply&&Jt(),o.nextTick().then(()=>{E.value=!1})):r("invalid-date",Z)},ge=()=>{a.autoApply&&O(J.value)&&j(),pt()},ye=()=>i.value?B():Ve(),Gt=Z=>{J.value=Z},hn=()=>{M.value.enabled&&(p.value=!0,se()),r("focus")},en=()=>{if(M.value.enabled&&(p.value=!1,y(a.modelValue),f.value)){const Z=b1(m.value,g.value);Z==null||Z.focus()}r("blur")},mo=Z=>{u.value&&u.value.updateMonthYear(0,{month:sp(Z.month),year:sp(Z.year)})},fa=Z=>{y(Z??a.modelValue)},H=(Z,fe)=>{var be;(be=u.value)==null||be.switchView(Z,fe)},ee=(Z,fe)=>b.value.onClickOutside?b.value.onClickOutside(Z,fe):B(!0),ve=(Z=0)=>{var fe;(fe=u.value)==null||fe.handleFlow(Z)},De=()=>d;return d_(d,h,Z=>ee(V,Z)),e({closeMenu:B,selectDate:he,clearValue:nt,openMenu:Ve,onScroll:ce,formatInputValue:se,updateInternalModelValue:Gt,setMonthYear:mo,parseModel:fa,switchView:H,toggleMenu:ye,handleFlow:ve,getDpWrapMenuRef:De}),(Z,fe)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"pickerWrapperRef",ref:m,class:o.normalizeClass(U.value),"data-datepicker-instance":"","data-dp-mobile":o.unref(k)},[o.createVNode(s_,o.mergeProps({ref_key:"inputRef",ref:h,"input-value":o.unref(W),"onUpdate:inputValue":fe[0]||(fe[0]=be=>o.isRef(W)?W.value=be:null),"is-menu-open":i.value},Z.$props,{onClear:nt,onOpen:Ve,onSetInputDate:ae,onSetEmptyDate:o.unref(j),onSelectDate:he,onToggle:ye,onClose:B,onFocus:hn,onBlur:en,onRealBlur:fe[1]||(fe[1]=be=>p.value=!1),onTextInput:fe[2]||(fe[2]=be=>Z.$emit("text-input",be))}),o.createSlots({_:2},[o.renderList(o.unref(N),(be,Un)=>({name:be,fn:o.withCtx(Bn=>[o.renderSlot(Z.$slots,be,o.normalizeProps(o.guardReactiveProps(Bn)))])}))]),1040,["input-value","is-menu-open","onSetEmptyDate"]),(o.openBlock(),o.createBlock(o.resolveDynamicComponent(Z.teleport?o.Teleport:"div"),o.normalizeProps(o.guardReactiveProps(te.value)),{default:o.withCtx(()=>[o.createVNode(o.Transition,{name:o.unref(K)(o.unref(L)),css:o.unref(w)&&!o.unref(v).enabled},{default:o.withCtx(()=>[i.value?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,ref_key:"dpWrapMenuRef",ref:d},le.value,{class:{"dp--menu-wrapper":!o.unref(v).enabled},style:o.unref(v).enabled?void 0:o.unref(q)}),[o.createVNode(Ap,o.mergeProps({ref_key:"dpMenuRef",ref:u},Z.$props,{"internal-model-value":o.unref(J),"onUpdate:internalModelValue":fe[3]||(fe[3]=be=>o.isRef(J)?J.value=be:null),class:{[xe.value]:!0,"dp--menu-wrapper":Z.teleport},"open-on-top":o.unref(L),"no-overlay-focus":S.value,collapse:x.value,"get-input-rect":ie,"is-text-input-date":E.value,onClosePicker:B,onSelectDate:he,onAutoApply:Jt,onTimeUpdate:ge,onFlowStep:fe[4]||(fe[4]=be=>Z.$emit("flow-step",be)),onUpdateMonthYear:fe[5]||(fe[5]=be=>Z.$emit("update-month-year",be)),onInvalidSelect:fe[6]||(fe[6]=be=>Z.$emit("invalid-select",o.unref(J))),onAutoApplyInvalid:fe[7]||(fe[7]=be=>Z.$emit("invalid-select",be)),onInvalidFixedRange:fe[8]||(fe[8]=be=>Z.$emit("invalid-fixed-range",be)),onRecalculatePosition:o.unref(oe),onTooltipOpen:fe[9]||(fe[9]=be=>Z.$emit("tooltip-open",be)),onTooltipClose:fe[10]||(fe[10]=be=>Z.$emit("tooltip-close",be)),onTimePickerOpen:fe[11]||(fe[11]=be=>Z.$emit("time-picker-open",be)),onTimePickerClose:fe[12]||(fe[12]=be=>Z.$emit("time-picker-close",be)),onAmPmChange:fe[13]||(fe[13]=be=>Z.$emit("am-pm-change",be)),onRangeStart:fe[14]||(fe[14]=be=>Z.$emit("range-start",be)),onRangeEnd:fe[15]||(fe[15]=be=>Z.$emit("range-end",be)),onDateUpdate:fe[16]||(fe[16]=be=>Z.$emit("date-update",be)),onInvalidDate:fe[17]||(fe[17]=be=>Z.$emit("invalid-date",be)),onOverlayToggle:fe[18]||(fe[18]=be=>Z.$emit("overlay-toggle",be)),onMenuBlur:fe[19]||(fe[19]=be=>Z.$emit("blur"))}),o.createSlots({_:2},[o.renderList(o.unref(A),(be,Un)=>({name:be,fn:o.withCtx(Bn=>[o.renderSlot(Z.$slots,be,o.normalizeProps(o.guardReactiveProps({...Bn})))])}))]),1040,["internal-model-value","class","open-on-top","no-overlay-focus","collapse","is-text-input-date","onRecalculatePosition"])],16)):o.createCommentVNode("",!0)]),_:3},8,["name","css"])]),_:3},16))],10,u_))}}),Ll=(()=>{const n=h_;return n.install=e=>{e.component("Vue3DatePicker",n)},n})();Object.entries(Object.freeze(Object.defineProperty({__proto__:null,default:Ll},Symbol.toStringTag,{value:"Module"}))).forEach(([n,e])=>{n!=="default"&&(Ll[n]=e)});const Ip=re(o.defineComponent({__name:"Datepicker",props:o.mergeModels({value:{},disabledDates:{type:[Array,Function]}},{value:{required:!0},valueModifiers:{}}),emits:["update:value"],setup(n){const e=o.useModel(n,"value"),t={locale:"ru",sixWeeks:"append",enableTimePicker:!1,autoApply:!0,inline:!0,monthNameFormat:"long"};return(r,a)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(r.$style.root)},[o.createVNode(o.unref(Ll),o.mergeProps({modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=s=>e.value=s),disabledDates:r.disabledDates,range:Array.isArray(e.value)},t,{onClick:a[1]||(a[1]=o.withModifiers(()=>{},["stop"]))}),{"arrow-left":o.withCtx(()=>[o.createVNode(o.unref(wo),{icon:"outline-chevron-left",size:"34",view:"base-flat"})]),"arrow-right":o.withCtx(()=>[o.createVNode(o.unref(wo),{icon:"outline-chevron-right",size:"34",view:"base-flat"})]),_:1},16,["modelValue","disabledDates","range"])],2))}}),[["__cssModules",{$style:{}}]]);var us={exports:{}},p_=us.exports,Np;function Pp(){return Np||(Np=1,function(n,e){(function(t,r){n.exports=r()})(p_,function(){var t=1e3,r=6e4,a=36e5,s="millisecond",i="second",l="minute",c="hour",d="day",u="week",h="month",p="quarter",m="year",f="date",g="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,E=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(w){var k=["th","st","nd","rd"],_=w%100;return"["+w+(k[(_-20)%10]||k[_]||k[0])+"]"}},T=function(w,k,_){var A=String(w);return!A||A.length>=k?w:""+Array(k+1-A.length).join(_)+w},F={s:T,z:function(w){var k=-w.utcOffset(),_=Math.abs(k),A=Math.floor(_/60),N=_%60;return(k<=0?"+":"-")+T(A,2,"0")+":"+T(N,2,"0")},m:function w(k,_){if(k.date()<_.date())return-w(_,k);var A=12*(_.year()-k.year())+(_.month()-k.month()),N=k.clone().add(A,h),L=_-N<0,q=k.clone().add(A+(L?-1:1),h);return+(-(A+(_-N)/(L?N-q:q-N))||0)},a:function(w){return w<0?Math.ceil(w)||0:Math.floor(w)},p:function(w){return{M:h,y:m,w:u,d,D:f,h:c,m:l,s:i,ms:s,Q:p}[w]||String(w||"").toLowerCase().replace(/s$/,"")},u:function(w){return w===void 0}},I="en",O={};O[I]=C;var P="$isDayjsObject",M=function(w){return w instanceof Y||!(!w||!w[P])},v=function w(k,_,A){var N;if(!k)return I;if(typeof k=="string"){var L=k.toLowerCase();O[L]&&(N=L),_&&(O[L]=_,N=L);var q=k.split("-");if(!N&&q.length>1)return w(q[0])}else{var z=k.name;O[z]=k,N=z}return!A&&N&&(I=N),N||!A&&I},b=function(w,k){if(M(w))return w.clone();var _=typeof k=="object"?k:{};return _.date=w,_.args=arguments,new Y(_)},D=F;D.l=v,D.i=M,D.w=function(w,k){return b(w,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var Y=function(){function w(_){this.$L=v(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[P]=!0}var k=w.prototype;return k.parse=function(_){this.$d=function(A){var N=A.date,L=A.utc;if(N===null)return new Date(NaN);if(D.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var q=N.match(x);if(q){var z=q[2]-1||0,oe=(q[7]||"0").substring(0,3);return L?new Date(Date.UTC(q[1],z,q[3]||1,q[4]||0,q[5]||0,q[6]||0,oe)):new Date(q[1],z,q[3]||1,q[4]||0,q[5]||0,q[6]||0,oe)}}return new Date(N)}(_),this.init()},k.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},k.$utils=function(){return D},k.isValid=function(){return this.$d.toString()!==g},k.isSame=function(_,A){var N=b(_);return this.startOf(A)<=N&&N<=this.endOf(A)},k.isAfter=function(_,A){return b(_)<this.startOf(A)},k.isBefore=function(_,A){return this.endOf(A)<b(_)},k.$g=function(_,A,N){return D.u(_)?this[A]:this.set(N,_)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(_,A){var N=this,L=!!D.u(A)||A,q=D.p(_),z=function(se,_e){var U=D.w(N.$u?Date.UTC(N.$y,_e,se):new Date(N.$y,_e,se),N);return L?U:U.endOf(d)},oe=function(se,_e){return D.w(N.toDate()[se].apply(N.toDate("s"),(L?[0,0,0,0]:[23,59,59,999]).slice(_e)),N)},$=this.$W,R=this.$M,W=this.$D,J="set"+(this.$u?"UTC":"");switch(q){case m:return L?z(1,0):z(31,11);case h:return L?z(1,R):z(0,R+1);case u:var y=this.$locale().weekStart||0,j=($<y?$+7:$)-y;return z(L?W-j:W+(6-j),R);case d:case f:return oe(J+"Hours",0);case c:return oe(J+"Minutes",1);case l:return oe(J+"Seconds",2);case i:return oe(J+"Milliseconds",3);default:return this.clone()}},k.endOf=function(_){return this.startOf(_,!1)},k.$set=function(_,A){var N,L=D.p(_),q="set"+(this.$u?"UTC":""),z=(N={},N[d]=q+"Date",N[f]=q+"Date",N[h]=q+"Month",N[m]=q+"FullYear",N[c]=q+"Hours",N[l]=q+"Minutes",N[i]=q+"Seconds",N[s]=q+"Milliseconds",N)[L],oe=L===d?this.$D+(A-this.$W):A;if(L===h||L===m){var $=this.clone().set(f,1);$.$d[z](oe),$.init(),this.$d=$.set(f,Math.min(this.$D,$.daysInMonth())).$d}else z&&this.$d[z](oe);return this.init(),this},k.set=function(_,A){return this.clone().$set(_,A)},k.get=function(_){return this[D.p(_)]()},k.add=function(_,A){var N,L=this;_=Number(_);var q=D.p(A),z=function(R){var W=b(L);return D.w(W.date(W.date()+Math.round(R*_)),L)};if(q===h)return this.set(h,this.$M+_);if(q===m)return this.set(m,this.$y+_);if(q===d)return z(1);if(q===u)return z(7);var oe=(N={},N[l]=r,N[c]=a,N[i]=t,N)[q]||1,$=this.$d.getTime()+_*oe;return D.w($,this)},k.subtract=function(_,A){return this.add(-1*_,A)},k.format=function(_){var A=this,N=this.$locale();if(!this.isValid())return N.invalidDate||g;var L=_||"YYYY-MM-DDTHH:mm:ssZ",q=D.z(this),z=this.$H,oe=this.$m,$=this.$M,R=N.weekdays,W=N.months,J=N.meridiem,y=function(_e,U,xe,te){return _e&&(_e[U]||_e(A,L))||xe[U].slice(0,te)},j=function(_e){return D.s(z%12||12,_e,"0")},se=J||function(_e,U,xe){var te=_e<12?"AM":"PM";return xe?te.toLowerCase():te};return L.replace(E,function(_e,U){return U||function(xe){switch(xe){case"YY":return String(A.$y).slice(-2);case"YYYY":return D.s(A.$y,4,"0");case"M":return $+1;case"MM":return D.s($+1,2,"0");case"MMM":return y(N.monthsShort,$,W,3);case"MMMM":return y(W,$);case"D":return A.$D;case"DD":return D.s(A.$D,2,"0");case"d":return String(A.$W);case"dd":return y(N.weekdaysMin,A.$W,R,2);case"ddd":return y(N.weekdaysShort,A.$W,R,3);case"dddd":return R[A.$W];case"H":return String(z);case"HH":return D.s(z,2,"0");case"h":return j(1);case"hh":return j(2);case"a":return se(z,oe,!0);case"A":return se(z,oe,!1);case"m":return String(oe);case"mm":return D.s(oe,2,"0");case"s":return String(A.$s);case"ss":return D.s(A.$s,2,"0");case"SSS":return D.s(A.$ms,3,"0");case"Z":return q}return null}(_e)||q.replace(":","")})},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(_,A,N){var L,q=this,z=D.p(A),oe=b(_),$=(oe.utcOffset()-this.utcOffset())*r,R=this-oe,W=function(){return D.m(q,oe)};switch(z){case m:L=W()/12;break;case h:L=W();break;case p:L=W()/3;break;case u:L=(R-$)/6048e5;break;case d:L=(R-$)/864e5;break;case c:L=R/a;break;case l:L=R/r;break;case i:L=R/t;break;default:L=R}return N?L:D.a(L)},k.daysInMonth=function(){return this.endOf(h).$D},k.$locale=function(){return O[this.$L]},k.locale=function(_,A){if(!_)return this.$L;var N=this.clone(),L=v(_,A,!0);return L&&(N.$L=L),N},k.clone=function(){return D.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},w}(),K=Y.prototype;return b.prototype=K,[["$ms",s],["$s",i],["$m",l],["$H",c],["$W",d],["$M",h],["$y",m],["$D",f]].forEach(function(w){K[w[1]]=function(k){return this.$g(k,w[0],w[1])}}),b.extend=function(w,k){return w.$i||(w(k,Y,b),w.$i=!0),b},b.locale=v,b.isDayjs=M,b.unix=function(w){return b(1e3*w)},b.en=O[I],b.Ls=O,b.p={},b})}(us)),us.exports}var f_=Pp();const hr=Yy(f_),hs=re(o.defineComponent({__name:"DatepickerFilter",props:{value:{},disabledDates:{type:[Array,Function]},action:{default:"clear"},title:{default:"Укажите период"}},emits:["update:value","close","clear"],setup(n,{emit:e}){const t=o.ref(),r=o.ref(),a=o.ref(n.value.map(f=>hr(f).format("DD.MM.YYYY"))),s=e;function i(f,g){var x,E;if((g==null?void 0:g.length)===10){if(f==="start"){const C=a.value[1]??null;a.value=[g,C],C||(x=r.value)==null||x.$el.getElementsByTagName("input")[0].focus()}if(f==="end"){const C=a.value[0]??null;a.value=[C,g],C||(E=t.value)==null||E.$el.getElementsByTagName("input")[0].focus()}}}function l(f){a.value=f.map(g=>hr(g).format("DD.MM.YYYY"))}function c(){n.action==="close"?s("close"):d()}function d(){a.value=[],s("update:value",[]),s("clear")}function u(){s("update:value",p(a.value))}function h(f){if(!f)return null;const[g,x,E]=f.split(".");return!g||!x||!E?null:hr(`${E}-${x}-${g}`)}function p(f){var T;const[g,x]=f,E=h(g),C=h(x);return!E||!C?[]:[E.toDate(),(T=C.endOf("day"))==null?void 0:T.toDate()]}const m=o.computed(()=>p(a.value));return(f,g)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(f.$style.root)},[o.createVNode(o.unref(me),{size:"subhead",weight:"medium"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(f.title),1)]),_:1}),o.createElementVNode("div",{class:o.normalizeClass(f.$style.inputs)},[o.createVNode(o.unref(Fi),{ref_key:"inputStartRef",ref:t,value:a.value[0]??"",class:o.normalizeClass(f.$style.input),size:"34",autofocus:"",inputmode:"numeric",placeholder:"дд.мм.гггг",mask:"date","onUpdate:value":g[0]||(g[0]=x=>i("start",x))},null,8,["value","class"]),o.createElementVNode("span",{class:o.normalizeClass(f.$style.separator)},null,2),o.createVNode(o.unref(Fi),{ref_key:"inputEndRef",ref:r,value:a.value[1]??"",class:o.normalizeClass(f.$style.input),size:"34",inputmode:"numeric",placeholder:"дд.мм.гггг",mask:"date","onUpdate:value":g[1]||(g[1]=x=>i("end",x))},null,8,["value","class"])],2),o.createVNode(o.unref(Ip),{value:m.value,disabledDates:f.disabledDates,"onUpdate:value":l},null,8,["value","disabledDates"]),o.createElementVNode("div",{class:o.normalizeClass(f.$style.buttons)},[o.createVNode(o.unref(tn),{class:o.normalizeClass(f.$style.button),size:"28",view:"base",onClick:c},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(f.action==="close"?"Отменить":"Сбросить"),1)]),_:1},8,["class"]),o.createVNode(o.unref(tn),{class:o.normalizeClass(f.$style.button),size:"28",view:"base-primary",onClick:u},{default:o.withCtx(()=>g[2]||(g[2]=[o.createTextVNode(" Применить ")])),_:1,__:[2]},8,["class"])],2)],2))}}),[["__cssModules",{$style:{root:"DatepickerFilter__root_3fb46",inputs:"DatepickerFilter__inputs_566d1",separator:"DatepickerFilter__separator_bb391",input:"DatepickerFilter__input_2f6ad",buttons:"DatepickerFilter__buttons_b9700",button:"DatepickerFilter__button_c67bd"}}]]),Lp=n=>n.filter.kind!=="checkbox-group"?!1:n.value.key===n.filter.key,zp=n=>n.filter.kind!=="datepicker"?!1:n.value.key===n.filter.key,ps=re(o.defineComponent({__name:"CheckboxGroupFilter",props:{list:{},initialValue:{},selectAllButtonText:{}},emits:["apply"],setup(n,{emit:e}){const t=o.ref(!1),r=o.ref(n.initialValue),a=e,s=o.computed(()=>{var h;return((h=r.value)==null?void 0:h.length)||0}),i=h=>r.value.includes(h)??!1,l=(h,p)=>{t.value=!1,p?r.value=[...r.value,h.key]:r.value=r.value.filter(m=>m!==h.key)},c=()=>{r.value=n.list.map(h=>h.key)},d=()=>{r.value=[]},u=()=>{t.value=!1,a("apply",r.value.length>0?r.value:null)};return o.watch(r,()=>{t.value=!0}),(h,p)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(h.$style.root)},[o.createElementVNode("div",{class:o.normalizeClass(h.$style.header)},[o.createVNode(o.unref(me),{size:"caption",weight:"regular",color:"foreground-layout-layout-1-primary"},{default:o.withCtx(()=>[o.createTextVNode(" Выбрано: "+o.toDisplayString(s.value),1)]),_:1}),o.createVNode(o.unref(Jo),null,{default:o.withCtx(()=>[s.value>0?(o.openBlock(),o.createBlock(o.unref(tn),{key:0,view:"base",size:"28","icon-right":"outline-trash",onClick:d},{default:o.withCtx(()=>p[0]||(p[0]=[o.createTextVNode(" Очистить ")])),_:1,__:[0]})):o.createCommentVNode("",!0)]),_:1})],2),o.createVNode(o.unref(An),{size:"s",class:o.normalizeClass(h.$style.divider)},null,8,["class"]),o.createElementVNode("div",{class:o.normalizeClass([h.$style.content,t.value&&h.$style.spacing])},[h.selectAllButtonText?(o.openBlock(),o.createBlock(o.unref(tn),{key:0,class:o.normalizeClass(h.$style["select-all-button"]),view:"brand-flat",isWide:!1,size:"28",onClick:c},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(h.selectAllButtonText),1)]),_:1},8,["class"])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(h.list,m=>(o.openBlock(),o.createElementBlock("label",{key:m.key,class:o.normalizeClass(h.$style["checkbox-wrapper"])},[o.renderSlot(h.$slots,"renderItem",{item:m,isSelected:i(m.key),toggleItem:l},()=>[o.createVNode(o.unref(Ai),{value:i(m.key),title:m.label,size:"16","onUpdate:value":f=>l(m,f)},null,8,["value","title","onUpdate:value"])])],2))),128))],2),o.createVNode(o.unref(Jo),null,{default:o.withCtx(()=>[t.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(h.$style.action)},[o.createVNode(o.unref(tn),{view:"base-primary",size:"44","is-wide":"",onClick:u},{default:o.withCtx(()=>p[1]||(p[1]=[o.createTextVNode(" Применить ")])),_:1,__:[1]})],2)):o.createCommentVNode("",!0)]),_:1})],2))}}),[["__cssModules",{$style:{root:"CheckboxGroupFilter__root_90870",header:"CheckboxGroupFilter__header_a0ec1",divider:"CheckboxGroupFilter__divider_07d3a",content:"CheckboxGroupFilter__content_7f67e",spacing:"CheckboxGroupFilter__spacing_3e02d","checkbox-wrapper":"CheckboxGroupFilter__checkbox-wrapper_cf1f6",action:"CheckboxGroupFilter__action_507ea","select-all-button":"CheckboxGroupFilter__select-all-button_ff85a"}}]]),Fp=re(o.defineComponent({__name:"FilterChip",props:{count:{},view:{}},emits:["click","delete"],setup(n,{expose:e,emit:t}){const{isShowDropdown:r,triggerElementRef:a,parentElementRef:s,toggleIsShowDropdown:i}=Zn(),l=t;return e({toggleDropdown:i}),(c,d)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(za),{ref_key:"parentElementRef",ref:s,count:c.count,onClick:o.unref(i),onDelete:d[0]||(d[0]=u=>l("delete"))},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},8,["count","onClick"]),o.createVNode(o.unref(Jn),{isShowDropdown:o.unref(r),"onUpdate:isShowDropdown":d[1]||(d[1]=u=>o.isRef(r)?r.value=u:null),verticalOffset:4,"horizontal-align":"left"},{default:o.withCtx(()=>[o.createElementVNode("div",{ref_key:"triggerElementRef",ref:a,class:o.normalizeClass(c.$style.dropdown)},[o.renderSlot(c.$slots,"dropdown")],2)]),_:3},8,["isShowDropdown"])],64))}}),[["__cssModules",{$style:{root:"FilterChip__root_cfd7c",dropdown:"FilterChip__dropdown_88223"}}]]),Rp=re(o.defineComponent({__name:"CheckboxGroupFilterChip",props:{filter:{},value:{}},emits:["apply","drop"],setup(n,{emit:e}){const t=o.useTemplateRef("root"),r=o.computed(()=>n.value.value.length),a=e;function s(){a("drop",n.value)}function i(l){var d;const c={key:n.filter.key,value:l??[]};a(l?"apply":"drop",c),(d=t.value)==null||d.toggleDropdown()}return(l,c)=>(o.openBlock(),o.createBlock(o.unref(Fp),{ref:"root",count:r.value,onDelete:s},{dropdown:o.withCtx(()=>[o.createVNode(o.unref(ps),{ref:"triggerElementRef",list:l.filter.options,initialValue:l.value.value,onApply:i},{renderItem:o.withCtx(({item:d,isSelected:u,toggleItem:h})=>[o.renderSlot(l.$slots,"renderItem",{item:d,isSelected:u,toggleItem:h},()=>[o.createVNode(o.unref(Ai),{value:u,title:d.label,size:"16","onUpdate:value":p=>h(d,p)},null,8,["value","title","onUpdate:value"])])]),_:3},8,["list","initialValue"])]),default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(l.filter.label)+" ",1)]),_:3},8,["count"]))}}),[["__cssModules",{$style:{root:"CheckboxGroupFilterChip__root_17272"}}]]);var fs={exports:{}},m_=fs.exports,Vp;function g_(){return Vp||(Vp=1,function(n,e){(function(t,r){n.exports=r(Pp())})(m_,function(t){function r(f){return f&&typeof f=="object"&&"default"in f?f:{default:f}}var a=r(t),s="января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),i="январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),l="янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),c="янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_"),d=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function u(f,g,x){var E,C;return x==="m"?g?"минута":"минуту":f+" "+(E=+f,C={mm:g?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[x].split("_"),E%10==1&&E%100!=11?C[0]:E%10>=2&&E%10<=4&&(E%100<10||E%100>=20)?C[1]:C[2])}var h=function(f,g){return d.test(g)?s[f.month()]:i[f.month()]};h.s=i,h.f=s;var p=function(f,g){return d.test(g)?l[f.month()]:c[f.month()]};p.s=c,p.f=l;var m={name:"ru",weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_сбт".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),months:h,monthsShort:p,weekStart:1,yearStart:4,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:u,mm:u,h:"час",hh:u,d:"день",dd:u,M:"месяц",MM:u,y:"год",yy:u},ordinal:function(f){return f},meridiem:function(f){return f<4?"ночи":f<12?"утра":f<17?"дня":"вечера"}};return a.default.locale(m,null,!0),m})}(fs)),fs.exports}g_();const Hp=re(o.defineComponent({__name:"DatepickerFilterChip",props:{filter:{},value:{}},emits:["apply","drop"],setup(n,{emit:e}){hr.locale("ru");const t=o.useTemplateRef("root");function r(l){const[c,d]=l.value.map(hr),u=hr(),h=c.year()===u.year(),p=m=>h?m:`${m} YYYY`;return c.isSame(d,"day")?c.format(p("D MMMM")):c.isSame(d,"month")?c.format("D")+" - "+d.format(p("D MMMM")):c.isSame(d,"year")?c.format("D MMMM")+" - "+d.format(p("D MMMM")):c.format("DD.MM.YYYY")+" - "+d.format("DD.MM.YYYY")}const a=o.computed({get(){return n.value.value},set(l){var d;const c={key:n.filter.key,value:l??[]};l!=null&&l.length?s("apply",c):s("drop",c),(d=t.value)==null||d.toggleDropdown()}}),s=e;function i(){s("drop",n.value)}return(l,c)=>(o.openBlock(),o.createBlock(o.unref(Fp),{ref:"root",onDelete:i},{dropdown:o.withCtx(()=>[o.createVNode(o.unref(hs),{value:a.value,"onUpdate:value":c[0]||(c[0]=d=>a.value=d)},null,8,["value"])]),default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(r(l.value))+" ",1)]),_:1},512))}}),[["__cssModules",{$style:{root:"DatepickerFilterChip__root_79c23"}}]]),y_=["onClick"],b_=re(o.defineComponent({__name:"FilterHub",props:o.mergeModels({list:{}},{values:{required:!0},valuesModifiers:{}}),emits:["update:values"],setup(n){const e=o.useModel(n,"values");function t(f){const g=e.value.filter(x=>x.key!==f.key);f.value===null?e.value=g:e.value=[...g,{key:f.key,value:f.value}],l(!1)}function r(f,g){var E;const x=((E=e.value)==null?void 0:E.find(C=>C.key===f.key))??null;return x?x.value:g}const{triggerElementRef:a,isShowDropdown:s,toggleIsShowDropdown:i,setIsShowDropdown:l,parentElementRef:c}=Zn(),d=o.ref(n.list[0].key);o.watch(s,f=>{f&&(d.value=n.list[0].key??"")},{immediate:!0});const u=o.computed(()=>{const f=n.list.find(g=>g.key===d.value);return f||null}),h=o.computed(()=>e.value.map(f=>{const g=n.list.find(x=>x.key===f.key);if(!g)throw new Error(`Filter with key ${f.key} not found`);return{kind:g.kind,filter:g,value:f}}));function p(f){d.value=f.key}function m(f){e.value=e.value.filter(g=>g.key!==f.key)}return(f,g)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(f.$style.root)},[o.renderSlot(f.$slots,"before"),o.createElementVNode("div",null,[o.createVNode(o.unref(tn),{ref_key:"parentElementRef",ref:c,"data-ignore-click-outside":"",class:o.normalizeClass(f.$style.button),view:"base",size:"28",onClick:o.unref(i),"icon-right":"outline-plus"},{default:o.withCtx(()=>g[3]||(g[3]=[o.createTextVNode(" Добавить фильтр ")])),_:1,__:[3]},8,["class","onClick"]),o.createVNode(o.unref(Jn),{"is-show-dropdown":o.unref(s),"onUpdate:isShowDropdown":g[2]||(g[2]=x=>o.isRef(s)?s.value=x:null),verticalOffset:"4",horizontalAlign:"left"},{default:o.withCtx(()=>[o.createElementVNode("div",{ref_key:"triggerElementRef",ref:a,class:o.normalizeClass(f.$style.panel)},[o.createElementVNode("div",{class:o.normalizeClass(f.$style.left)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.list,x=>(o.openBlock(),o.createElementBlock("div",{key:`${x.key}-filter`,class:o.normalizeClass([f.$style.filter,{[f.$style.active]:d.value===x.key,[f.$style.disabled]:x.isDisabled}]),onClick:E=>p(x)},[o.createElementVNode("div",{class:o.normalizeClass(f.$style["filter-inner"])},[x.icon?(o.openBlock(),o.createBlock(o.unref($e),{key:0,name:x.icon,size:16,color:d.value===x.key?"foreground-surface-layout-1-surface-2-primary":"foreground-surface-layout-1-surface-2-secondary"},null,8,["name","color"])):o.createCommentVNode("",!0),o.createVNode(o.unref(me),{size:"caption",weight:"regular",color:"foreground-surface-layout-1-surface-2-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(x.label),1)]),_:2},1024)],2),o.createVNode(o.unref($e),{name:"outline-chevron-right",size:"16",color:"text-common-base-primary-default"})],10,y_))),128))],2),o.createVNode(o.unref(qn),{class:o.normalizeClass(f.$style.right)},{default:o.withCtx(()=>[u.value?o.renderSlot(f.$slots,"renderItem",{key:0,activeFilter:u.value,onApply:t,getFilterValue:r},()=>[u.value.kind==="checkbox-group"?(o.openBlock(),o.createBlock(o.unref(ps),{key:`${u.value.key}-checkbox-group`,class:o.normalizeClass(f.$style.grow),list:u.value.options,initialValue:r(u.value,[]),onApply:g[0]||(g[0]=x=>t({key:u.value.key,value:x}))},null,8,["class","list","initialValue"])):u.value.kind==="datepicker"?(o.openBlock(),o.createBlock(o.unref(hs),{key:`${u.value.key}-datepicker`,class:o.normalizeClass(f.$style.grow),value:r(u.value,[]),"onUpdate:value":g[1]||(g[1]=x=>t({key:u.value.key,value:x}))},null,8,["class","value"])):o.createCommentVNode("",!0)]):o.createCommentVNode("",!0)]),_:3},8,["class"])],2)]),_:3},8,["is-show-dropdown"])]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(h.value,x=>o.renderSlot(f.$slots,"renderChip",{item:x,apply:t,drop:m},()=>[o.unref(Lp)(x)?(o.openBlock(),o.createBlock(o.unref(Rp),{key:`${x.filter.key}-chip`,filter:x.filter,value:x.value,onApply:t,onDrop:m},null,8,["filter","value"])):o.unref(zp)(x)?(o.openBlock(),o.createBlock(o.unref(Hp),{key:1,filter:x.filter,value:x.value,onApply:t,onDrop:m},null,8,["filter","value"])):o.createCommentVNode("",!0)])),256))],2))}}),[["__cssModules",{$style:{root:"FilterHub__root_c1f46",panel:"FilterHub__panel_1d02f",left:"FilterHub__left_b52ce",right:"FilterHub__right_f5d99",filter:"FilterHub__filter_e17a3",active:"FilterHub__active_1a02e",disabled:"FilterHub__disabled_3f21a","filter-inner":"FilterHub__filter-inner_c748b",grow:"FilterHub__grow_adf33"}}]]),k_=re(o.defineComponent({__name:"ToastItem",props:{title:{},view:{default:"base"},fontWeight:{default:"regular"}},setup(n){const e=o.computed(()=>{if(n.fontWeight==="regular")switch(n.view){case"danger":return"outline-warning";default:return"outline-check"}switch(n.view){case"danger":return"filled-warning";default:return"filled-success"}}),t=o.computed(()=>{switch(n.view){case"primary":return"foreground-element-tooltip-primary";default:return"text-common-base-inverse-default"}}),r=o.computed(()=>{switch(n.view){case"primary":return"foreground-element-tooltip-primary";default:return"icon-common-base-tertiary-default"}});return(a,s)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([a.$style.root,a.$style[`view_${a.view}`]]),onClick:s[0]||(s[0]=i=>a.$emit("click"))},[o.createVNode(o.unref($e),{size:18,name:e.value,color:r.value},null,8,["name","color"]),o.createVNode(o.unref(me),{class:o.normalizeClass(a.$style.title),size:"subhead",weight:a.fontWeight,color:t.value,align:"left"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.title),1)]),_:1},8,["class","weight","color"]),o.createVNode(o.unref($e),{size:18,name:"outline-cross",color:r.value},null,8,["color"])],2))}}),[["__cssModules",{$style:{root:"ToastItem__root_8d069",view_base:"ToastItem__view_base_44eac",view_danger:"ToastItem__view_danger_833b2",view_primary:"ToastItem__view_primary_d308a",title:"ToastItem__title_00905"}}]]);class v_{constructor(){pe(this,"list",o.ref([]));pe(this,"timeouts",o.ref({}))}restartTimeouts(){Object.keys(this.timeouts.value).forEach((e,t)=>{this.timeouts.value[e]=setTimeout(()=>{this.remove(+e),clearTimeout(this.timeouts.value[e])},4e3+t*300)})}pauseTimeouts(){Object.keys(this.timeouts.value).forEach(e=>{clearTimeout(this.timeouts.value[e])})}remove(e){this.list.value=this.list.value.filter(t=>t.id!==e)}show(e){let t;const r=this.list.value[0]?this.list.value[0].id+1:1,a=5e3;typeof e=="string"?t={id:r,title:e,view:"base"}:t={...e,title:e.title,id:r},this.list.value.length===3&&this.list.value.pop(),this.list.value.unshift(t),this.timeouts.value[r]=setTimeout(()=>{this.remove(t.id),clearTimeout(this.timeouts.value[r])},a)}showError(e="Упс, что-то пошло не так :("){this.show({title:e,view:"danger"})}install(e){e.provide(zl,this)}}const zl=Symbol("ToastService"),w_=new v_,__=["id"],C_=re(o.defineComponent({__name:"Toaster",setup(n){let e;const t=o.inject(zl),r=o.ref(),a=o.ref([]),s=o.ref(!1),i=o.ref(x()),l=o.ref(x()),c=o.ref(x()),d=o.ref(x());function u(I){const O=E(I);return{toaster:{transform:i.value[O]},body:{transform:l.value[O]},left:{transform:c.value[O]},right:{transform:d.value[O]}}}function h(I,O){(O!=="main"||i.value.main.length)&&(i.value[O]=I.mainTranslate),l.value[O]=I.scale,c.value[O]=I.leftTranslate,d.value[O]=I.rightTranslate}function p(){let O=0,P=0;a.value.sort(C).forEach((M,v)=>{const b=E(v),D=F(`${O}px`);h(D,b),O+=M.clientHeight+12,P=Math.max(P,M.clientWidth)}),r.value.style.height=`${O}px`,r.value.style.width=`${P}px`}function m(){o.nextTick(()=>{const[I,O,P]=a.value.sort(C),M=F("0");if(h(M,"main"),O){const v=T({mainElement:I,element:O,translateY:"-15%",index:1});h(v,"second")}if(P){const v=T({mainElement:I,element:P,translateY:"-30%",index:2});h(v,"third"),o.nextTick(()=>{var D;const b=(D=r.value)==null?void 0:D.querySelector(".toaster-leave-active");if(b){const Y=T({mainElement:I,element:b,translateY:"45%",index:3});b.setAttribute("style",`transform: ${Y.mainTranslate};`),b.children[1].setAttribute("style",`transform: ${Y.scale};`),b.children[0].setAttribute("style",`transform: ${Y.leftTranslate};`),b.children[2].setAttribute("style",`transform: ${Y.rightTranslate};`),b.children[4].setAttribute("style",`transform: ${Y.scale};`),b.children[3].setAttribute("style",`transform: ${Y.leftTranslate};`),b.children[5].setAttribute("style",`transform: ${Y.rightTranslate};`)}})}})}function f(I){s.value&&(t==null||t.remove(I),p())}function g(){!s.value&&(t!=null&&t.list.value)&&t.list.value.length>1?(s.value=!0,t==null||t.pauseTimeouts(),p(),e=setTimeout(()=>{s.value=!1,m(),r.value.style.height="auto",r.value.style.width="auto",t==null||t.restartTimeouts(),clearTimeout(e)},5e3)):t!=null&&t.list.value[0]&&!s.value&&(t==null||t.remove(t==null?void 0:t.list.value[0].id))}o.watch(()=>t==null?void 0:t.list,()=>{s.value?p():m()},{deep:!0});function x(){return{main:"",second:"",third:""}}function E(I){switch(I){case 0:return"main";case 1:return"second";default:return"third"}}function C(I,O){return Number(O.id)-Number(I.id)}function T({mainElement:I,element:O,translateY:P,index:M}){const v=O.getBoundingClientRect(),b=I.getBoundingClientRect(),D=b.height/v.height,Y=(b.width-10*M)/v.width,K=(v.width-Y*v.width)/2;return{mainTranslate:`translateY(${P}) translateX(-50%)`,scale:`scale(${Y}, ${D})`,leftTranslate:`translateX(${K-12}px)`,rightTranslate:`translateX(${-K+12}px)`}}function F(I){return{mainTranslate:`translateY(${I}) translateX(-50%)`,scale:"scale(1, 1)",leftTranslate:"translateX(-12px)",rightTranslate:"translateX(12px)"}}return(I,O)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"rootRef",ref:r,class:o.normalizeClass([I.$style.root,s.value&&I.$style["is-expand"]]),onClick:g},[o.createVNode(o.TransitionGroup,{tag:"div",enterFromClass:I.$style["toaster-enter-from"],enterToClass:I.$style["toaster-enter-to"],enterActiveClass:I.$style["toaster-enter-active"],leaveFromClass:I.$style["toaster-leave-from"],leaveToClass:I.$style["toaster-leave-to"],leaveActiveClass:I.$style["toaster-leave-active"]},{default:o.withCtx(()=>{var P;return[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList((P=o.unref(t))==null?void 0:P.list.value,(M,v)=>(o.openBlock(),o.createElementBlock("div",{key:M.id,id:`${M.id}`,ref_for:!0,ref_key:"toastersRef",ref:a,class:o.normalizeClass([I.$style.toaster,I.$style[`view_${M.view??"success"}`],s.value?"is-expand":""]),style:o.normalizeStyle(u(v).toaster)},[o.createElementVNode("div",{class:o.normalizeClass(I.$style.left),style:o.normalizeStyle(u(v).left)},null,6),o.createElementVNode("div",{class:o.normalizeClass(I.$style.body),style:o.normalizeStyle(u(v).body)},[o.createVNode(k_,o.mergeProps({ref_for:!0},M,{onClick:()=>f(M.id)}),null,16,["onClick"])],6),o.createElementVNode("div",{class:o.normalizeClass(I.$style.right),style:o.normalizeStyle(u(v).right)},null,6),o.createElementVNode("div",{class:o.normalizeClass([I.$style.left,I.$style.shadow]),style:o.normalizeStyle(u(v).left)},null,6),o.createElementVNode("div",{class:o.normalizeClass([I.$style.body,I.$style.shadow]),style:o.normalizeStyle(u(v).body)},null,6),o.createElementVNode("div",{class:o.normalizeClass([I.$style.right,I.$style.shadow]),style:o.normalizeStyle(u(v).right)},null,6)],14,__))),128))]}),_:1},8,["enterFromClass","enterToClass","enterActiveClass","leaveFromClass","leaveToClass","leaveActiveClass"])],2))}}),[["__cssModules",{$style:{"toaster-enter-from":"Toaster__toaster-enter-from_8a179","toaster-enter":"Toaster__toaster-enter_2cb2e","toaster-enter-to":"Toaster__toaster-enter-to_22319","toaster-enter-active":"Toaster__toaster-enter-active_af352","toaster-leave-active":"Toaster__toaster-leave-active_8020d","toaster-leave-from":"Toaster__toaster-leave-from_3ccc0","toaster-leave":"Toaster__toaster-leave_ab1a5","toaster-leave-to":"Toaster__toaster-leave-to_7f821",root:"Toaster__root_6a9fa","is-expand":"Toaster__is-expand_e6c4c",toaster:"Toaster__toaster_e01d3",body:"Toaster__body_aebdf",view_base:"Toaster__view_base_bb27b",left:"Toaster__left_1299a",right:"Toaster__right_9f93f",view_danger:"Toaster__view_danger_184da",view_primary:"Toaster__view_primary_439f6",shadow:"Toaster__shadow_b92b5"}}]]);class E_{async install(){if(!document.getElementById("svg-sprite"))try{const t=await(await fetch("/sprite/sprite.svg")).text(),r=document.createElement("div");r.id="svg-sprite",r.style.display="none",r.innerHTML=t,document.body.insertBefore(r,document.body.firstChild)}catch(e){console.error("Failed to load SVG sprite:",e)}}}const S_=new E_,x_=["disabled"],B_=["onClick"],T_=o.defineComponent({__name:"StatusSelect",props:o.mergeModels({value:{},list:{},isLoading:{type:Boolean},isDisabled:{type:Boolean}},{value:{required:!0},valueModifiers:{}}),emits:["update:value"],setup(n){const{isShowDropdown:e,setIsShowDropdown:t,toggleIsShowDropdown:r,triggerElementRef:a,parentElementRef:s}=Zn(),i=o.useModel(n,"value");function l(f){i.value=f,t(!1)}const c=Lr({secondary:"text-button-base-secondary",success:"text-button-success-primary",brand:"text-button-brand-primary",critical:"text-button-critical-primary"}),d=Lr({secondary:"icon-button-base-secondary",success:"icon-button-success-primary",brand:"icon-button-brand-primary",critical:"icon-button-critical-primary"}),u=o.computed(()=>{var f;return c.get(((f=p.value)==null?void 0:f.view)??"secondary")}),h=o.computed(()=>{var f;return d.get(((f=p.value)==null?void 0:f.view)??"secondary")}),p=o.computed(()=>n.list.find(f=>f.id===i.value)),m=()=>{n.isDisabled||r()};return(f,g)=>{var x;return o.openBlock(),o.createElementBlock("button",{ref_key:"triggerElementRef",ref:a,disabled:f.isLoading,class:o.normalizeClass([f.$style.root,f.$style[`view_${(x=p.value)==null?void 0:x.view}`],{[f.$style["is-loading"]]:f.isLoading,[f.$style["is-disabled"]]:f.isDisabled}]),onClick:o.withModifiers(m,["stop"])},[o.createElementVNode("div",{ref_key:"parentElementRef",ref:s,class:o.normalizeClass(f.$style.wrapper)},[o.createVNode(o.unref($t),null,{default:o.withCtx(()=>{var E;return[(o.openBlock(),o.createBlock(o.unref(me),{class:o.normalizeClass(f.$style.text),key:(E=p.value)==null?void 0:E.text,"number-of-lines":"1",size:"caption",weight:"bold",color:u.value},{default:o.withCtx(()=>{var C;return[o.createTextVNode(o.toDisplayString((C=p.value)==null?void 0:C.text),1)]}),_:1},8,["class","color"]))]}),_:1}),o.createElementVNode("div",{class:o.normalizeClass(f.$style["icon-wrapper"])},[f.isDisabled?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref($e),{key:0,class:o.normalizeClass(f.$style.icon),name:"outline-chevron-down",size:"16",color:h.value},null,8,["class","color"])),o.createVNode(o.unref($t),null,{default:o.withCtx(()=>[f.isLoading?(o.openBlock(),o.createBlock(o.unref(_r),{key:0,color:h.value,size:"14",class:o.normalizeClass(f.$style.loader)},null,8,["color","class"])):o.createCommentVNode("",!0)]),_:1})],2)],2),o.createVNode(o.unref(Jn),{isShowDropdown:o.unref(e),"onUpdate:isShowDropdown":g[0]||(g[0]=E=>o.isRef(e)?e.value=E:null),verticalOffset:"4"},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(f.$style.scroller)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.list,E=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([f.$style.item,{[f.$style["is-active"]]:E.id===i.value}]),key:E.id,onClick:o.withModifiers(C=>l(E.id),["stop"])},[o.createVNode(o.unref(me),{size:"subhead"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(E.text),1)]),_:2},1024),o.createVNode(o.unref($t),null,{default:o.withCtx(()=>[E.id===i.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(f.$style.checkbox)},[o.createVNode(o.unref($e),{name:"outline-check",color:"icon-common-base-primary-default",size:"18"})],2)):o.createCommentVNode("",!0)]),_:2},1024)],10,B_))),128))],2)]),_:1},8,["isShowDropdown"])],10,x_)}}}),jp={root:"StatusSelect__root_9bfa0","is-disabled":"StatusSelect__is-disabled_9b1d9",wrapper:"StatusSelect__wrapper_8cabc","wrapper-skeleton":"StatusSelect__wrapper-skeleton_9c265",text:"StatusSelect__text_b4d1c","icon-wrapper":"StatusSelect__icon-wrapper_97b83",icon:"StatusSelect__icon_c49fe",item:"StatusSelect__item_37c1b","is-active":"StatusSelect__is-active_299a0",loader:"StatusSelect__loader_aa2c1","is-loading":"StatusSelect__is-loading_7ec4e",view_secondary:"StatusSelect__view_secondary_e4022",view_success:"StatusSelect__view_success_aa0c9",view_critical:"StatusSelect__view_critical_54f77",view_brand:"StatusSelect__view_brand_1759a",scroller:"StatusSelect__scroller_c12db",checkbox:"StatusSelect__checkbox_0c502"},$_=re(T_,[["__cssModules",{$style:jp}]]),M_=re(o.defineComponent({__name:"StatusSelectSkeleton",props:{widthRange:{}},setup(n){const e=o.ref(),t=o.ref("");function r(){if(n.widthRange&&n.widthRange[0]&&n.widthRange[1]&&e.value){const a=ou(e.value,"max-width");if(a){const s=~a.toString().indexOf("%")?parseInt(a.toString().replace("%",""),10):100,i=parseFloat((Math.abs(n.widthRange[1]-n.widthRange[0])*Math.random()*100).toFixed(2)),l=(n.widthRange[0]>=n.widthRange[1]?n.widthRange[0]:n.widthRange[1])*100;t.value=`${(l-i)*s/100}%`}}}return o.onMounted(()=>r()),(a,s)=>(o.openBlock(),o.createElementBlock("button",{ref_key:"skeleton",ref:e,key:t.value,style:o.normalizeStyle({width:t.value}),class:o.normalizeClass([a.$style.root,a.$style.view_secondary])},[o.createElementVNode("div",{class:o.normalizeClass([a.$style.wrapper,a.$style["wrapper-skeleton"]])},null,2)],6))}}),[["__cssModules",{$style:jp}]]),Yp={interactionType:"web"},Up=Symbol("GlobalConfig"),D_=n=>{o.provide(Up,{...Yp,...n})},O_=()=>o.inject(Up,Yp),A_=["onClick"],I_=o.defineComponent({__name:"ThemePicker",props:o.mergeModels({value:{},list:{}},{value:{required:!0},valueModifiers:{}}),emits:["update:value"],setup(n){const e=o.useModel(n,"value");return(t,r)=>(o.openBlock(),o.createElementBlock("article",{class:o.normalizeClass(t.$style.root)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.list,a=>(o.openBlock(),o.createElementBlock("button",{key:a.id,class:o.normalizeClass([t.$style.item,a.color,{[t.$style["is-active"]]:e.value===a.id}]),onClick:s=>e.value=a.id},[o.createElementVNode("div",{class:o.normalizeClass(t.$style.theme)},null,2)],10,A_))),128))],2))}}),Wp={root:"ThemePicker__root_42aa5",item:"ThemePicker__item_a750e","item-skeleton":"ThemePicker__item-skeleton_17dde",theme:"ThemePicker__theme_6765b","is-active":"ThemePicker__is-active_54a2a"},N_=re(I_,[["__cssModules",{$style:Wp}]]),P_=re(o.defineComponent({__name:"ThemePickerSkeleton",setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("article",{class:o.normalizeClass(e.$style.root)},[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(9,r=>o.createElementVNode("button",{key:r,class:o.normalizeClass([e.$style.item,e.$style["item-skeleton"]])},[o.createElementVNode("div",{class:o.normalizeClass(e.$style.theme)},null,2)],2)),64))],2))}}),[["__cssModules",{$style:Wp}]]),L_=re(o.defineComponent({__name:"Breadcrumbs",props:{list:{},color:{default:"foreground-layout-layout-1-primary"},tag:{default:"a"}},setup(n){function e(t){return n.tag==="router-link"?{to:t.href}:{href:t.href,target:"_blank",rel:"noopener noreferrer"}}return(t,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(t.$style.root)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.list,a=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(t.tag),o.mergeProps({class:t.$style.breadcrumb,key:a.text+a.href,ref_for:!0},e(a)),{default:o.withCtx(()=>[o.createVNode(o.unref(me),{class:o.normalizeClass(t.$style.text),color:t.color,tag:"span",size:"caption"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.text),1)]),_:2},1032,["class","color"]),o.createVNode(o.unref($e),{class:o.normalizeClass(t.$style.icon),name:"outline-chevron-right",color:t.color,size:"16"},null,8,["class","color"])]),_:2},1040,["class"]))),128))],2))}}),[["__cssModules",{$style:{root:"Breadcrumbs__root_d903b",breadcrumb:"Breadcrumbs__breadcrumb_75c26",text:"Breadcrumbs__text_92d91",icon:"Breadcrumbs__icon_42802"}}]]),z_=re(o.defineComponent({__name:"VerificationInfoCell",props:{icon:{},title:{},description:{}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.$style.root)},[o.createVNode(o.unref(qu),{icon:e.icon,isRounded:"",size:40},null,8,["icon"]),o.createElementVNode("div",{class:o.normalizeClass(e.$style.content)},[o.createVNode(me,{class:o.normalizeClass(e.$style.title),size:"subhead",weight:"regular",color:"foreground-layout-layout-1-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.title),1)]),_:1},8,["class"]),e.description?(o.openBlock(),o.createBlock(me,{key:0,class:o.normalizeClass(e.$style.description),size:"subhead",weight:"regular",color:"foreground-layout-layout-1-secondary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.description),1)]),_:1},8,["class"])):o.createCommentVNode("",!0)],2),o.createElementVNode("div",{class:o.normalizeClass(e.$style.actions)},[o.renderSlot(e.$slots,"default")],2)],2))}}),[["__cssModules",{$style:{root:"VerificationInfoCell__root_526a7",content:"VerificationInfoCell__content_f9a78",actions:"VerificationInfoCell__actions_a1daf"}}]]),F_=re(o.defineComponent({__name:"Avatar",props:{image:{},initials:{},size:{default:40},mode:{default:"default"}},setup(n){o.ref("idle");const e=Lr({28:"body",36:"title3",40:"title3",56:"title1",120:"title120"}),t=Lr({28:14,36:18,40:18,56:24,120:48}),r=o.computed(()=>e.get(n.size.toString())),a=o.computed(()=>t.get(n.size.toString()));return(s,i)=>s.mode==="initials"?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass([s.$style.root,s.$style[`size_${s.size}`]])},[o.createVNode(o.unref(me),{class:o.normalizeClass(s.$style.initials),size:r.value,color:"foreground-element-avatar-base-t",weight:"medium"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(s.initials),1)]),_:1},8,["class","size"])],2)):(o.openBlock(),o.createBlock(o.unref(Ho),{class:o.normalizeClass([s.$style.root,s.$style[`size_${s.size}`]]),src:s.image??"",key:"image",alt:"Аватар",width:s.size,height:s.size,objectFit:"cover"},{fallback:o.withCtx(()=>[s.initials?(o.openBlock(),o.createBlock(o.unref(me),{key:0,class:o.normalizeClass(s.$style.initials),size:r.value,color:"foreground-element-avatar-base-t",weight:"medium"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(s.initials),1)]),_:1},8,["class","size"])):(o.openBlock(),o.createBlock(o.unref($e),{key:1,size:a.value,name:"outline-user",color:"foreground-element-avatar-base-t"},null,8,["size"]))]),_:1},8,["class","src","width","height"]))}}),[["__cssModules",{$style:{root:"Avatar__root_5ff11",image:"Avatar__image_0b5c9",initials:"Avatar__initials_311ca",size_28:"Avatar__size_28_38212",size_36:"Avatar__size_36_cfcf4",size_40:"Avatar__size_40_fa607",size_56:"Avatar__size_56_1f15d",size_120:"Avatar__size_120_fece6"}}]]),R_={key:0},ms=re(o.defineComponent({__name:"MenuBarItem",props:{onClick:{type:Function},text:{},icon:{},view:{default:"base"},badgeText:{},isActive:{type:Boolean},isChecked:{type:Boolean}},setup(n){const e=o.computed(()=>n.view==="base"?{icon:"foreground-surface-popover-base",text:"foreground-surface-popover-base"}:n.view==="secondary"?{icon:"foreground-surface-popover-base-secondary",text:"foreground-surface-popover-base-secondary"}:{icon:"foreground-surface-popover-base-critical",text:"foreground-surface-popover-base-critical"});return(t,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([t.$style.root,t.$style[`view_${t.view}`],{[t.$style.active]:t.isActive}]),onClick:r[0]||(r[0]=(...a)=>t.onClick&&t.onClick(...a))},[t.icon?(o.openBlock(),o.createBlock(o.unref($e),{key:0,class:o.normalizeClass(t.$style.icon),size:"18",name:t.icon,color:e.value.icon},null,8,["class","name","color"])):t.badgeText?(o.openBlock(),o.createBlock(o.unref(ni),{key:1,view:"base",isRounded:!0},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(t.badgeText),1)]),_:1})):o.createCommentVNode("",!0),o.createVNode(o.unref(me),{size:"subhead",color:e.value.text,weight:"regular",class:o.normalizeClass(t.$style.text)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(t.text),1)]),_:1},8,["color","class"]),o.createVNode(o.unref($t),null,{default:o.withCtx(()=>[t.isChecked?(o.openBlock(),o.createElementBlock("div",R_,[o.createVNode(o.unref($e),{class:o.normalizeClass(t.$style.checkbox),size:"18",name:"outline-check",color:"foreground-surface-popover-base"},null,8,["class"])])):o.createCommentVNode("",!0)]),_:1}),o.renderSlot(t.$slots,"default")],2))}}),[["__cssModules",{$style:{root:"MenuBarItem__root_f3c96",icon:"MenuBarItem__icon_8930b",view_base:"MenuBarItem__view_base_16bad",view_critical:"MenuBarItem__view_critical_02c76",active:"MenuBarItem__active_fed92",text:"MenuBarItem__text_11d41",checkbox:"MenuBarItem__checkbox_1f026"}}]]),V_=re(o.defineComponent({__name:"MenuBar",props:{list:{}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("article",{class:o.normalizeClass(e.$style.root)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.list,(r,a)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:a},[a!==0?(o.openBlock(),o.createBlock(o.unref(An),{key:0,size:"s",class:o.normalizeClass(e.$style.divider)},null,8,["class"])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(e.$style.group)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r,s=>(o.openBlock(),o.createBlock(o.unref(ms),o.mergeProps({key:s.text,class:e.$style.item,ref_for:!0},s),null,16,["class"]))),128))],2)],64))),128))],2))}}),[["__cssModules",{$style:{root:"MenuBar__root_33172",divider:"MenuBar__divider_5912e",group:"MenuBar__group_62cf2"}}]]),qp=re(o.defineComponent({__name:"StepItem",props:{count:{},text:{}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.$style.root)},[o.createElementVNode("div",{class:o.normalizeClass(e.$style.count)},[o.createVNode(o.unref(me),{size:"subhead",color:"foreground-layout-layout-1-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.count),1)]),_:1})],2),o.createVNode(o.unref(me),{size:"subhead",color:"foreground-layout-layout-1-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.text),1)]),_:1})],2))}}),[["__cssModules",{$style:{root:"StepItem__root_66261",count:"StepItem__count_47dec"}}]]),H_=re(o.defineComponent({__name:"Steps",props:{list:{}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.$style.root)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.list,(r,a)=>(o.openBlock(),o.createBlock(o.unref(qp),{count:a+1,text:r},null,8,["count","text"]))),256))],2))}}),[["__cssModules",{$style:{root:"Steps__root_705db"}}]]);function j_(n){const e=document.createElement("textarea");e.value=n,e.setAttribute("readonly",""),e.style.position="absolute",e.style.left="-9999px",document.body.appendChild(e);let t=!1;const r=document.getSelection();r&&(t=r.rangeCount>0?r.getRangeAt(0):!1),e.select(),document.execCommand("copy"),document.body.removeChild(e),t&&r&&(r.removeAllRanges(),r.addRange(t))}function Gp(n){const e=_h();function t(r){j_(r),e.show({title:(n==null?void 0:n.toasterText)??"Скопировано",view:"primary"})}return{copy:t}}const Kp=re(o.defineComponent({__name:"Tooltip",props:{text:{},verticalAlign:{default:"top"},verticalOffset:{default:4},behavior:{default:"hover"},width:{},alignText:{}},setup(n,{expose:e}){const{isShowDropdown:t,setIsShowDropdown:r,triggerElementRef:a}=Zn(),s=o.computed(()=>typeof n.width>"u"?{}:{width:`${Hi(Number(n.width))}px`});function i(){n.behavior==="hover"&&r(!0)}function l(){n.behavior==="hover"&&r(!1)}function c(){n.behavior==="click"&&d()}function d(u=1e3){r(!0),setTimeout(()=>{r(!1)},u)}return e({open:d}),(u,h)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"triggerElementRef",ref:a,class:o.normalizeClass(u.$style.root),onMouseenter:i,onMouseleave:l,onClick:c},[o.renderSlot(u.$slots,"default"),o.createVNode(o.unref(Jn),{isShowDropdown:o.unref(t),"onUpdate:isShowDropdown":h[0]||(h[0]=p=>o.isRef(t)?t.value=p:null),"vertical-offset":u.verticalOffset,"horizontal-align":"center","vertical-align":u.verticalAlign},{default:o.withCtx(({align:p})=>[o.createElementVNode("div",null,[o.createElementVNode("div",{class:o.normalizeClass([u.$style.wrapper,u.$style[`position_${p.vertical}`]]),style:o.normalizeStyle(s.value)},[o.createElementVNode("div",{class:o.normalizeClass(u.$style.balloon)},[o.createVNode(o.unref(me),{class:o.normalizeClass(u.$style.text),align:u.alignText,size:"caption",color:"foreground-element-tooltip-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(u.text),1)]),_:1},8,["class","align"])],2),(o.openBlock(),o.createElementBlock("svg",{class:o.normalizeClass(u.$style.shape),width:"12",height:"4",viewBox:"0 0 12 4",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h[1]||(h[1]=[o.createElementVNode("path",{d:"M4.58579 2.58579C5.36684 3.36684 6.63317 3.36683 7.41421 2.58579L8.82843 1.17157C9.57857 0.421426 10.596 0 11.6569 0H12H0H0.343146C1.40401 0 2.42143 0.421427 3.17157 1.17157L4.58579 2.58579Z","fill-opacity":"0.9"},null,-1)]),2))],6)])]),_:1},8,["isShowDropdown","vertical-offset","vertical-align"])],34))}}),[["__cssModules",{$style:{root:"Tooltip__root_32cc0",balloon:"Tooltip__balloon_3d49f",wrapper:"Tooltip__wrapper_81d05",shape:"Tooltip__shape_d4585",position_top:"Tooltip__position_top_54246",position_bottom:"Tooltip__position_bottom_7e186"}}]]),Y_=re(o.defineComponent({__name:"CellInfo",props:{label:{},value:{}},setup(n){const{copy:e}=Gp();return(t,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(t.$style.root),onClick:r[0]||(r[0]=a=>o.unref(e)(t.value))},[o.createVNode(o.unref(Kp),{class:o.normalizeClass(t.$style.tooltip),text:"Нажмите, чтобы скопировать","vertical-align":"bottom","vertical-offset":"12"},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(t.$style.text)},[o.createVNode(o.unref(me),{size:"subhead",color:"foreground-layout-layout-1-secondary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(t.label),1)]),_:1}),o.createVNode(o.unref(me),{size:"body",color:"foreground-layout-layout-1-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(t.value),1)]),_:1})],2),o.createVNode(o.unref($e),{class:o.normalizeClass(t.$style.icon),size:"18",name:"outline-copy",color:"foreground-layout-layout-1-secondary"},null,8,["class"])]),_:1},8,["class"])],2))}}),[["__cssModules",{$style:{root:"CellInfo__root_834a5",tooltip:"CellInfo__tooltip_24d8f",text:"CellInfo__text_2f5c6",icon:"CellInfo__icon_70c88"}}]]),U_=o.defineComponent({__name:"Table",props:{headers:{},gridTemplateColumns:{default:"repeat(3, 1fr)"},gap:{default:12},list:{},isLoading:{type:Boolean,default:!1},extractKey:{type:Function},reRenderKey:{}},setup(n){const e=o.computed(()=>JSON.stringify(n.list));return(t,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(t.$style.root),style:o.normalizeStyle({"--grid-template-columns":t.gridTemplateColumns,"--gap":o.unref(Vi)(+t.gap)})},[o.createElementVNode("div",{class:o.normalizeClass(t.$style.header)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.headers,a=>(o.openBlock(),o.createElementBlock("div",{key:a},[o.createVNode(o.unref(me),{class:o.normalizeClass(t.$style.headerText),size:"caption",weight:"regular",color:"foreground-layout-layout-1-secondary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a),1)]),_:2},1032,["class"])]))),128)),o.createVNode(o.unref(An),{size:"s",opacity:"0.5",class:o.normalizeClass(t.$style.divider)},null,8,["class"])],2),o.createVNode(o.unref(qn),null,{default:o.withCtx(()=>[t.isLoading?(o.openBlock(),o.createElementBlock("div",{key:"skeleton",class:o.normalizeClass([t.$style.body,t.$style.skeleton])},[o.createVNode(o.unref(Zi),null,{default:o.withCtx(()=>[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(6,a=>o.renderSlot(t.$slots,"renderSkeletonRow",{key:a})),64))]),_:3})],2)):t.list.length?(o.openBlock(),o.createElementBlock("div",{key:`content-${e.value}-${t.reRenderKey}`,class:o.normalizeClass(t.$style.body)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.list,(a,s)=>o.renderSlot(t.$slots,"renderTableRow",{item:a,index:s})),256))],2)):(o.openBlock(),o.createElementBlock("div",{key:2,class:o.normalizeClass(t.$style.empty)},[o.renderSlot(t.$slots,"renderEmpty")],2))]),_:3})],6))}}),Xp={root:"Table__root_597c1",header:"Table__header_9967a",row:"Table__row_1749f",divider:"Table__divider_fe573",skeleton:"Table__skeleton_bdbfb",empty:"Table__empty_24f80"},W_=re(U_,[["__cssModules",{$style:Xp}]]),q_=re(o.defineComponent({__name:"TableRow",props:{align:{default:"center"}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.$style.row),style:o.normalizeStyle({"align-items":e.align})},[o.renderSlot(e.$slots,"default")],6))}}),[["__cssModules",{$style:Xp}]]),Fl=re(o.defineComponent({__name:"Popover",props:{borderRadius:{default:16}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("article",{class:o.normalizeClass(e.$style.root),style:o.normalizeStyle({borderRadius:`var(--border-radius-${e.borderRadius.toString()})`})},[o.renderSlot(e.$slots,"default")],6))}}),[["__cssModules",{$style:{root:"Popover__root_f9956"}}]]);(function(){try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode(".ce-hint--align-start{text-align:left}.ce-hint--align-center{text-align:center}.ce-hint__description{opacity:.6;margin-top:3px}")),document.head.appendChild(n)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();var Zr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gs(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function G_(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var a=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return n[r]}})}),t}function Rl(){}Object.assign(Rl,{default:Rl,register:Rl,revert:function(){},__esModule:!0}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(n){const e=(this.document||this.ownerDocument).querySelectorAll(n);let t=e.length;for(;--t>=0&&e.item(t)!==this;);return t>-1}),Element.prototype.closest||(Element.prototype.closest=function(n){let e=this;if(!document.documentElement.contains(e))return null;do{if(e.matches(n))return e;e=e.parentElement||e.parentNode}while(e!==null);return null}),Element.prototype.prepend||(Element.prototype.prepend=function(n){const e=document.createDocumentFragment();Array.isArray(n)||(n=[n]),n.forEach(t=>{const r=t instanceof Node;e.appendChild(r?t:document.createTextNode(t))}),this.insertBefore(e,this.firstChild)}),Element.prototype.scrollIntoViewIfNeeded||(Element.prototype.scrollIntoViewIfNeeded=function(n){n=arguments.length===0?!0:!!n;const e=this.parentNode,t=window.getComputedStyle(e,null),r=parseInt(t.getPropertyValue("border-top-width")),a=parseInt(t.getPropertyValue("border-left-width")),s=this.offsetTop-e.offsetTop<e.scrollTop,i=this.offsetTop-e.offsetTop+this.clientHeight-r>e.scrollTop+e.clientHeight,l=this.offsetLeft-e.offsetLeft<e.scrollLeft,c=this.offsetLeft-e.offsetLeft+this.clientWidth-a>e.scrollLeft+e.clientWidth,d=s&&!i;(s||i)&&n&&(e.scrollTop=this.offsetTop-e.offsetTop-e.clientHeight/2-r+this.clientHeight/2),(l||c)&&n&&(e.scrollLeft=this.offsetLeft-e.offsetLeft-e.clientWidth/2-a+this.clientWidth/2),(s||i||l||c)&&!n&&this.scrollIntoView(d)}),window.requestIdleCallback=window.requestIdleCallback||function(n){const e=Date.now();return setTimeout(function(){n({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})},1)},window.cancelIdleCallback=window.cancelIdleCallback||function(n){clearTimeout(n)};let K_=(n=21)=>crypto.getRandomValues(new Uint8Array(n)).reduce((e,t)=>(t&=63,t<36?e+=t.toString(36):t<62?e+=(t-26).toString(36).toUpperCase():t>62?e+="-":e+="_",e),"");var Qp=(n=>(n.VERBOSE="VERBOSE",n.INFO="INFO",n.WARN="WARN",n.ERROR="ERROR",n))(Qp||{});const Me={BACKSPACE:8,TAB:9,ENTER:13,ESC:27,LEFT:37,UP:38,DOWN:40,RIGHT:39,DELETE:46},X_={LEFT:0};function Jr(n,e,t="log",r,a="color: inherit"){if(!("console"in window)||!window.console[t])return;const s=["info","log","warn","error"].includes(t),i=[];switch(Jr.logLevel){case"ERROR":if(t!=="error")return;break;case"WARN":if(!["error","warn"].includes(t))return;break;case"INFO":if(!s||n)return;break}r&&i.push(r);const l="Editor.js 2.31.0";n&&(s?(i.unshift(`line-height: 1em;
|
|
20
|
+
https://github.com/FL3NKEY/scroll-lock#clearqueuescrolllocks`),K()}},Jt=I({disablePageScroll:b,enablePageScroll:D,getScrollState:Y,clearQueueScrollLocks:K,getTargetScrollBarWidth:w,getCurrentTargetScrollBarWidth:k,getPageScrollBarWidth:_,getCurrentPageScrollBarWidth:A,addScrollableSelector:q,removeScrollableSelector:z,addScrollableTarget:N,removeScrollableTarget:L,addLockableSelector:$,addLockableTarget:oe,addFillGapSelector:y,removeFillGapSelector:j,addFillGapTarget:W,removeFillGapTarget:J,setFillGapMethod:R,refillGaps:se,_state:v},pt);r.default=Jt}]).default})}(Fa)),Fa.exports}var Yu=Wy();const qy=["id"],Uu=re(o.defineComponent({inheritAttrs:!1,__name:"DynamicVisibleArea",props:{isShowOverlay:{type:Boolean,default:!0}},emits:["close"],setup(n,{expose:e,emit:t}){o.provide(Ii,u);const r=t,a=o.useId(),s=o.ref(!1);o.watch(s,()=>{s.value?c():d()});const i=o.useCssModule();function l(m){var g;const f=document.querySelectorAll(`.${i.root}`);((g=f[f.length-1])==null?void 0:g.id)===a&&m.key==="Escape"&&u()}function c(){Yu.disablePageScroll(),window.addEventListener("keydown",l,{passive:!0})}function d(){Yu.enablePageScroll(),window.removeEventListener("keydown",l)}o.onBeforeUnmount(d);function u(){s.value=!1,r("close")}function h(){s.value=!0}function p(){s.value=!s.value}return e({close:u,toggle:p,open:h}),(m,f)=>(o.openBlock(),o.createBlock(o.Teleport,{to:"#teleports"},[s.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass([m.$style.root,m.$attrs.class]),id:o.unref(a)},[o.createVNode(o.unref($t),{appear:""},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass([m.$style.overlay,{[m.$style["is-show-overlay"]]:m.isShowOverlay}]),onClick:u},null,2)]),_:1}),o.renderSlot(m.$slots,"default")],10,qy)):o.createCommentVNode("",!0)]))}}),[["__cssModules",{$style:{root:"DynamicVisibleArea__root_4ca5d",overlay:"DynamicVisibleArea__overlay_01f51","is-show-overlay":"DynamicVisibleArea__is-show-overlay_c353d"}}]]);function Wu(n){const e=o.useTemplateRef(n);o.onMounted(()=>{e.value||console.error("Ref DynamicVisibleArea не передан или не корректно задан")});function t(){var s;(s=e.value)==null||s.close()}function r(){var s;(s=e.value)==null||s.open()}function a(){var s;(s=e.value)==null||s.toggle()}return{open:r,close:t,toggle:a}}const Gy=()=>o.inject(Ii,()=>0),qu=re(o.defineComponent({__name:"HeaderText",props:{title:{},description:{}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.$style.root)},[o.createVNode(o.unref(me),{class:o.normalizeClass(e.$style.title),tag:"h1",size:"title2",weight:"semibold"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.title),1)]),_:1},8,["class"]),o.createVNode(o.unref(me),{class:o.normalizeClass(e.$style.description),color:"text-common-base-secondary-default",size:"subhead"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.description),1)]),_:1},8,["class"])],2))}}),[["__cssModules",{$style:{title:"HeaderText__title_3b5e4"}}]]),Ky={120:48,58:22,56:22,50:22,44:20,40:20,34:18,28:16},Xy={base:"foreground-surface-layout-1-surface-2-primary",critical:"foreground-surface-layout-1-surface-2-critical"},Gu=re(o.defineComponent({__name:"IconView",props:{icon:{},view:{default:"base"},size:{},isRounded:{type:Boolean}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([e.$style.root,e.$style[`size_${e.size}`],e.$style[`view_${e.view}`],{[e.$style["is-rounded"]]:e.isRounded}])},[o.createVNode(o.unref($e),{name:e.icon,size:o.unref(Ky)[e.size],color:o.unref(Xy)[e.view]},null,8,["name","size","color"])],2))}}),[["__cssModules",{$style:{root:"IconView__root_b4f8a",size_58:"IconView__size_58_253d8",size_56:"IconView__size_56_873a1",size_50:"IconView__size_50_ebace",size_44:"IconView__size_44_67f2e",size_40:"IconView__size_40_c5ff0",size_34:"IconView__size_34_c7672",size_28:"IconView__size_28_970bf",view_base:"IconView__view_base_8bd1f",view_critical:"IconView__view_critical_c4d66","is-rounded":"IconView__is-rounded_aee46"}}]]),Qy=o.defineComponent({__name:"ImageRow",props:{list:{},hasBlendMode:{type:Boolean}},setup(n){const e=o.computed(()=>n.list.length-5);return(t,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(t.$style.root)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.list.slice(0,5),(a,s)=>(o.openBlock(),o.createElementBlock("div",{key:s+a,class:o.normalizeClass(t.$style.item)},[o.createElementVNode("div",{class:o.normalizeClass(t.$style.border)},null,2),o.createVNode(o.unref(Ho),{class:o.normalizeClass([t.$style.image,{[t.$style.overlay]:s===4&&e.value>0}]),src:a,alt:`Изображение ${s+1}`,width:"44",height:"44",objectFit:"cover",hasBlendMode:t.hasBlendMode},null,8,["class","src","alt","hasBlendMode"]),e.value>0&&s===4?(o.openBlock(),o.createBlock(o.unref(me),{key:0,class:o.normalizeClass(t.$style.count),size:"body",weight:"bold",color:"text-common-base-inverse-default"},{default:o.withCtx(()=>[o.createTextVNode(" +"+o.toDisplayString(e.value),1)]),_:1},8,["class"])):o.createCommentVNode("",!0)],2))),128))],2))}}),Ku={root:"ImageRow__root_37d54",item:"ImageRow__item_5bf4f",border:"ImageRow__border_422af",overlay:"ImageRow__overlay_1790a",image:"ImageRow__image_f7037",count:"ImageRow__count_1240d"},Zy=re(Qy,[["__cssModules",{$style:Ku}]]),Jy=re(o.defineComponent({__name:"ImageRowSkeleton",setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.$style.root)},[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(5,r=>o.createElementVNode("div",{key:r,class:o.normalizeClass(e.$style.item)},[o.createElementVNode("div",{class:o.normalizeClass(e.$style.border)},null,2)],2)),64))],2))}}),[["__cssModules",{$style:Ku}]]);function Qn(n){return typeof n=="string"||n instanceof String}function Xu(n){var e;return typeof n=="object"&&n!=null&&(n==null||(e=n.constructor)==null?void 0:e.name)==="Object"}function Qu(n,e){return Array.isArray(e)?Qu(n,(t,r)=>e.includes(r)):Object.entries(n).reduce((t,r)=>{let[a,s]=r;return e(s,a)&&(t[a]=s),t},{})}const ke={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function eb(n){switch(n){case ke.LEFT:return ke.FORCE_LEFT;case ke.RIGHT:return ke.FORCE_RIGHT;default:return n}}function Ni(n){return n.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Ra(n,e){if(e===n)return!0;const t=Array.isArray(e),r=Array.isArray(n);let a;if(t&&r){if(e.length!=n.length)return!1;for(a=0;a<e.length;a++)if(!Ra(e[a],n[a]))return!1;return!0}if(t!=r)return!1;if(e&&n&&typeof e=="object"&&typeof n=="object"){const s=e instanceof Date,i=n instanceof Date;if(s&&i)return e.getTime()==n.getTime();if(s!=i)return!1;const l=e instanceof RegExp,c=n instanceof RegExp;if(l&&c)return e.toString()==n.toString();if(l!=c)return!1;const d=Object.keys(e);for(a=0;a<d.length;a++)if(!Object.prototype.hasOwnProperty.call(n,d[a]))return!1;for(a=0;a<d.length;a++)if(!Ra(n[d[a]],e[d[a]]))return!1;return!0}else if(e&&n&&typeof e=="function"&&typeof n=="function")return e.toString()===n.toString();return!1}class tb{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?ke.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?ke.RIGHT:ke.LEFT}}function Be(n,e){return new Be.InputMask(n,e)}function Zu(n){if(n==null)throw new Error("mask property should be defined");return n instanceof RegExp?Be.MaskedRegExp:Qn(n)?Be.MaskedPattern:n===Date?Be.MaskedDate:n===Number?Be.MaskedNumber:Array.isArray(n)||n===Array?Be.MaskedDynamic:Be.Masked&&n.prototype instanceof Be.Masked?n:Be.Masked&&n instanceof Be.Masked?n.constructor:n instanceof Function?Be.MaskedFunction:(console.warn("Mask not found for mask",n),Be.Masked)}function Pr(n){if(!n)throw new Error("Options in not defined");if(Be.Masked){if(n.prototype instanceof Be.Masked)return{mask:n};const{mask:e=void 0,...t}=n instanceof Be.Masked?{mask:n}:Xu(n)&&n.mask instanceof Be.Masked?n:{};if(e){const r=e.mask;return{...Qu(e,(a,s)=>!s.startsWith("_")),mask:e.constructor,_mask:r,...t}}}return Xu(n)?{...n}:{mask:n}}function In(n){if(Be.Masked&&n instanceof Be.Masked)return n;const e=Pr(n),t=Zu(e.mask);if(!t)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===t&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new t(e)}Be.createMask=In;class Pi{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,t){if(!(e==null||t==null||e===this.selectionStart&&t===this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}Be.MaskElement=Pi;const Ju=90,nb=89;class Va extends Pi{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,r;return(e=(t=(r=this.input).getRootNode)==null?void 0:t.call(r))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===Ju&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===nb&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===Ju&&(e.metaKey||e.ctrlKey))return e.preventDefault(),this._handlers.undo(e);e.isComposing||this._handlers.selectionChange(e)}_onBeforeinput(e){if(e.inputType==="historyUndo"&&this._handlers.undo)return e.preventDefault(),this._handlers.undo(e);if(e.inputType==="historyRedo"&&this._handlers.redo)return e.preventDefault(),this._handlers.redo(e)}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}Be.HTMLMaskElement=Va;class ob extends Va{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}Be.HTMLMaskElement=Va;class eh extends Va{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),r=t&&t.anchorOffset,a=t&&t.focusOffset;return a==null||r==null||r<a?r:a}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),r=t&&t.anchorOffset,a=t&&t.focusOffset;return a==null||r==null||r>a?r:a}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const r=this.rootElement.createRange();r.setStart(this.input.firstChild||this.input,e),r.setEnd(this.input.lastChild||this.input,t);const a=this.rootElement,s=a.getSelection&&a.getSelection();s&&(s.removeAllRanges(),s.addRange(r))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}Be.HTMLContenteditableMaskElement=eh;class Ha{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>Ha.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}Ha.MAX_LENGTH=100;class rb{constructor(e,t){this.el=e instanceof Pi?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new eh(e):new ob(e),this.masked=In(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new Ha,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var t;return e==null||((t=this.masked)==null?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof Be.Masked)&&this.masked.constructor===Zu(e)){this.masked.updateOptions({mask:e});return}const t=e instanceof Be.Masked?e:In({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const r=this._listeners[e];r&&r.forEach(a=>a(t))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,r=this.masked.value,a=this.masked.rawInputValue,s=this.displayValue,i=this.unmaskedValue!==t||this.value!==r||this._rawInputValue!==a;this._unmaskedValue=t,this._value=r,this._rawInputValue=a,this.el.value!==s&&(this.el.value=s),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),i&&this._fireChangeEvents(),!this._historyChanging&&(i||this.history.isEmpty)&&this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...r}=e,a=!this.maskEquals(t),s=this.masked.optionsIsChanged(r);a&&(this.mask=t),s&&this.masked.updateOptions(r),(a||s)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,ke.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const r=this._listeners[e].indexOf(t);return r>=0&&this._listeners[e].splice(r,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const t=new tb({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),r=this.masked.rawInputValue,a=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,s=r===this.masked.rawInputValue?t.removeDirection:ke.NONE;let i=this.masked.nearestInputPos(t.startChangePos+a,s);s!==ke.NONE&&(i=this.masked.nearestInputPos(i,ke.NONE)),this.updateControl(i),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}Be.InputMask=rb;class Ie{static normalize(e){return Array.isArray(e)?e:[e,new Ie]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}Be.ChangeDetails=Ie;class yn{constructor(e,t,r){e===void 0&&(e=""),t===void 0&&(t=0),this.value=e,this.from=t,this.stop=r}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class Et{constructor(e){this._value="",this._update({...Et.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){t===void 0&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new yn(this.extractInput(e,t),e)}appendTail(e){return Qn(e)&&(e=new yn(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new Ie({inserted:e,rawInserted:e})):new Ie}_appendChar(e,t,r){t===void 0&&(t={});const a=this.state;let s;if([e,s]=this.doPrepareChar(e,t),e&&(s=s.aggregate(this._appendCharRaw(e,t)),!s.rawInserted&&this.autofix==="pad")){const i=this.state;this.state=a;let l=this.pad(t);const c=this._appendCharRaw(e,t);l=l.aggregate(c),c.rawInserted||l.equals(s)?s=l:this.state=i}if(s.inserted){let i,l=this.doValidate(t)!==!1;if(l&&r!=null){const c=this.state;if(this.overwrite===!0){i=r.state;for(let u=0;u<s.rawInserted.length;++u)r.unshift(this.displayValue.length-s.tailShift)}let d=this.appendTail(r);if(l=d.rawInserted.length===r.toString().length,!(l&&d.inserted)&&this.overwrite==="shift"){this.state=c,i=r.state;for(let u=0;u<s.rawInserted.length;++u)r.shift();d=this.appendTail(r),l=d.rawInserted.length===r.toString().length}l&&d.inserted&&(this.state=c)}l||(s=new Ie,this.state=a,r&&i&&(r.state=i))}return s}_appendPlaceholder(){return new Ie}_appendEager(){return new Ie}append(e,t,r){if(!Qn(e))throw new Error("value should be string");const a=Qn(r)?new yn(String(r)):r;t!=null&&t.tail&&(t._beforeTailState=this.state);let s;[e,s]=this.doPrepare(e,t);for(let i=0;i<e.length;++i){const l=this._appendChar(e[i],t,a);if(!l.rawInserted&&!this.doSkipInvalid(e[i],t,a))break;s.aggregate(l)}return(this.eager===!0||this.eager==="append")&&t!=null&&t.input&&e&&s.aggregate(this._appendEager()),a!=null&&(s.tailShift+=this.appendTail(a).tailShift),s}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new Ie}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,r=this.value,a=e();return this.rawInputValue=t,this.value&&this.value!==r&&r.indexOf(this.value)===0&&(this.append(r.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,a}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,r=e(this);return this.state=t,delete this._isolated,r}doSkipInvalid(e,t,r){return!!this.skipInvalid}doPrepare(e,t){return t===void 0&&(t={}),Ie.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return t===void 0&&(t={}),Ie.normalize(this.prepareChar?this.prepareChar(e,this,t):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,t,r,a,s){r===void 0&&(r=""),a===void 0&&(a=ke.NONE),s===void 0&&(s={input:!0});const i=e+t,l=this.extractTail(i),c=this.eager===!0||this.eager==="remove";let d;c&&(a=eb(a),d=this.extractInput(0,i,{raw:!0}));let u=e;const h=new Ie;if(a!==ke.NONE&&(u=this.nearestInputPos(e,t>1&&e!==0&&!c?ke.NONE:a),h.tailShift=u-e),h.aggregate(this.remove(u)),c&&a!==ke.NONE&&d===this.rawInputValue)if(a===ke.FORCE_LEFT){let p;for(;d===this.rawInputValue&&(p=this.displayValue.length);)h.aggregate(new Ie({tailShift:-1})).aggregate(this.remove(p-1))}else a===ke.FORCE_RIGHT&&l.unshift();return h.aggregate(this.append(r,s,l))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!Ra(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||Et.EMPTY_VALUES.includes(e)&&Et.EMPTY_VALUES.includes(t)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new Ie}}Et.DEFAULTS={skipInvalid:!0},Et.EMPTY_VALUES=[void 0,null,""],Be.Masked=Et;class So{constructor(e,t){e===void 0&&(e=[]),t===void 0&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Qn(e)?new yn(String(e)):e;const t=this.chunks[this.chunks.length-1],r=t&&(t.stop===e.stop||e.stop==null)&&e.from===t.from+t.toString().length;if(e instanceof yn)r?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof So){if(e.stop==null){let a;for(;e.chunks.length&&e.chunks[0].stop==null;)a=e.chunks.shift(),a.from+=e.from,this.extend(a)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof Be.MaskedPattern))return new yn(this.toString()).appendTo(e);const t=new Ie;for(let r=0;r<this.chunks.length;++r){const a=this.chunks[r],s=e._mapPosToBlock(e.displayValue.length),i=a.stop;let l;if(i!=null&&(!s||s.index<=i)&&((a instanceof So||e._stops.indexOf(i)>=0)&&t.aggregate(e._appendPlaceholder(i)),l=a instanceof So&&e._blocks[i]),l){const c=l.appendTail(a);t.aggregate(c);const d=a.toString().slice(c.rawInserted.length);d&&t.aggregate(e.append(d,{tail:!0}))}else t.aggregate(e.append(a.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...r}=e;Object.assign(this,r),this.chunks=t.map(a=>{const s="chunks"in a?new So:new yn;return s.state=a,s})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const t=e!=null?e-this.from:e;let r=0;for(;r<this.chunks.length;){const a=this.chunks[r],s=a.unshift(t);if(a.toString()){if(!s)break;++r}else this.chunks.splice(r,1);if(s)return s}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],r=t.shift();if(t.toString()){if(!r)break;--e}else this.chunks.splice(e,1);if(r)return r}return""}}class ab{constructor(e,t){this.masked=e,this._log=[];const{offset:r,index:a}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=r,this.index=a,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((t=this.block)==null?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,ke.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,ke.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ke.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,ke.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,ke.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ke.NONE),!0})}}class th{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new Ie}nearestInputPos(e,t){t===void 0&&(t=ke.NONE);const r=0,a=this._value.length;switch(t){case ke.LEFT:case ke.FORCE_LEFT:return r;case ke.NONE:case ke.RIGHT:case ke.FORCE_RIGHT:default:return a}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),r===void 0&&(r={}),r.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new Ie;const r=this.eager===!0||this.eager==="append",s=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!r)&&!t.tail,i=new Ie({inserted:this.char,rawInserted:s?this.char:""});return this._value=this.char,this._isRawInput=s&&(t.raw||t.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new Ie;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new yn("")}appendTail(e){return Qn(e)&&(e=new yn(String(e))),e.appendTo(this)}append(e,t,r){const a=this._appendChar(e[0],t);return r!=null&&(a.tailShift+=this.appendTail(r).tailShift),a}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}}class ja{constructor(e){const{parent:t,isOptional:r,placeholderChar:a,displayChar:s,lazy:i,eager:l,...c}=e;this.masked=In(c),Object.assign(this,{parent:t,isOptional:r,placeholderChar:a,displayChar:s,lazy:i,eager:l})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),e===0&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new Ie}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new Ie;const r=this.masked.state;let a=this.masked._appendChar(e,this.currentMaskFlags(t));return a.inserted&&this.doValidate(t)===!1&&(a=new Ie,this.masked.state=r),!a.inserted&&!this.isOptional&&!this.lazy&&!t.input&&(a.inserted=this.placeholderChar),a.skip=!a.inserted&&!this.isOptional,this.isFilled=!!a.inserted,a}append(e,t,r){return this.masked.append(e,this.currentMaskFlags(t),r)}_appendPlaceholder(){return this.isFilled||this.isOptional?new Ie:(this.isFilled=!0,new Ie({inserted:this.placeholderChar}))}_appendEager(){return new Ie}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.masked.extractInput(e,t,r)}nearestInputPos(e,t){t===void 0&&(t=ke.NONE);const r=0,a=this.value.length,s=Math.min(Math.max(e,r),a);switch(t){case ke.LEFT:case ke.FORCE_LEFT:return this.isComplete?s:r;case ke.RIGHT:case ke.FORCE_RIGHT:return this.isComplete?s:a;case ke.NONE:default:return s}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(e==null||(t=e._beforeTailState)==null?void 0:t.masked)||(e==null?void 0:e._beforeTailState)}}pad(e){return new Ie}}ja.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class sb extends Et{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=r=>r.search(t)>=0),super._update(e)}}Be.MaskedRegExp=sb;class St extends Et{constructor(e){super({...St.DEFAULTS,...e,definitions:Object.assign({},ja.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let r=!1,a=!1;for(let s=0;s<t.length;++s){if(this.blocks){const d=t.slice(s),u=Object.keys(this.blocks).filter(p=>d.indexOf(p)===0);u.sort((p,m)=>m.length-p.length);const h=u[0];if(h){const{expose:p,repeat:m,...f}=Pr(this.blocks[h]),g={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...f,repeat:m,parent:this},x=m!=null?new Be.RepeatBlock(g):In(g);x&&(this._blocks.push(x),p&&(this.exposeBlock=x),this._maskedBlocks[h]||(this._maskedBlocks[h]=[]),this._maskedBlocks[h].push(this._blocks.length-1)),s+=h.length-1;continue}}let i=t[s],l=i in e;if(i===St.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(i==="{"||i==="}"){r=!r;continue}if(i==="["||i==="]"){a=!a;continue}if(i===St.ESCAPE_CHAR){if(++s,i=t[s],!i)break;l=!1}const c=l?new ja({isOptional:a,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...Pr(e[i]),parent:this}):new th({char:i,eager:this.eager,isUnmasking:r});this._blocks.push(c)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:t,...r}=e;this._blocks.forEach((a,s)=>a.state=t[s]),super.state=r}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,t)=>e+=t.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,t)=>e+=t.value,"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,t)=>e+=t.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new Ie;let r=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(r==null)return t;this._blocks[r].isFilled&&++r;for(let a=r;a<this._blocks.length;++a){const s=this._blocks[a]._appendEager();if(!s.inserted)break;t.aggregate(s)}return t}_appendCharRaw(e,t){t===void 0&&(t={});const r=this._mapPosToBlock(this.displayValue.length),a=new Ie;if(!r)return a;for(let i=r.index,l;l=this._blocks[i];++i){var s;const c=l._appendChar(e,{...t,_beforeTailState:(s=t._beforeTailState)==null||(s=s._blocks)==null?void 0:s[i]});if(a.aggregate(c),c.consumed)break}return a}extractTail(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const r=new So;return e===t||this._forEachBlocksInRange(e,t,(a,s,i,l)=>{const c=a.extractTail(i,l);c.stop=this._findStopBefore(s),c.from=this._blockStartPos(s),c instanceof So&&(c.blockIndex=s),r.extend(c)}),r}extractInput(e,t,r){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),r===void 0&&(r={}),e===t)return"";let a="";return this._forEachBlocksInRange(e,t,(s,i,l,c)=>{a+=s.extractInput(l,c,r)}),a}_findStopBefore(e){let t;for(let r=0;r<this._stops.length;++r){const a=this._stops[r];if(a<=e)t=a;else break}return t}_appendPlaceholder(e){const t=new Ie;if(this.lazy&&e==null)return t;const r=this._mapPosToBlock(this.displayValue.length);if(!r)return t;const a=r.index,s=e??this._blocks.length;return this._blocks.slice(a,s).forEach(i=>{if(!i.lazy||e!=null){var l;t.aggregate(i._appendPlaceholder((l=i._blocks)==null?void 0:l.length))}}),t}_mapPosToBlock(e){let t="";for(let r=0;r<this._blocks.length;++r){const a=this._blocks[r],s=t.length;if(t+=a.displayValue,e<=t.length)return{index:r,offset:e-s}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((t,r)=>t+=r.displayValue.length,0)}_forEachBlocksInRange(e,t,r){t===void 0&&(t=this.displayValue.length);const a=this._mapPosToBlock(e);if(a){const s=this._mapPosToBlock(t),i=s&&a.index===s.index,l=a.offset,c=s&&i?s.offset:this._blocks[a.index].displayValue.length;if(r(this._blocks[a.index],a.index,l,c),s&&!i){for(let d=a.index+1;d<s.index;++d)r(this._blocks[d],d,0,this._blocks[d].displayValue.length);r(this._blocks[s.index],s.index,0,s.offset)}}}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const r=super.remove(e,t);return this._forEachBlocksInRange(e,t,(a,s,i,l)=>{r.aggregate(a.remove(i,l))}),r}nearestInputPos(e,t){if(t===void 0&&(t=ke.NONE),!this._blocks.length)return 0;const r=new ab(this,e);if(t===ke.NONE)return r.pushRightBeforeInput()||(r.popState(),r.pushLeftBeforeInput())?r.pos:this.displayValue.length;if(t===ke.LEFT||t===ke.FORCE_LEFT){if(t===ke.LEFT){if(r.pushRightBeforeFilled(),r.ok&&r.pos===e)return e;r.popState()}if(r.pushLeftBeforeInput(),r.pushLeftBeforeRequired(),r.pushLeftBeforeFilled(),t===ke.LEFT){if(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.ok&&r.pos<=e||(r.popState(),r.ok&&r.pos<=e))return r.pos;r.popState()}return r.ok?r.pos:t===ke.FORCE_LEFT?0:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:0)}return t===ke.RIGHT||t===ke.FORCE_RIGHT?(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.pushRightBeforeFilled()?r.pos:t===ke.FORCE_RIGHT?this.displayValue.length:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:this.nearestInputPos(e,ke.LEFT))):e}totalInputPositions(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);let r=0;return this._forEachBlocksInRange(e,t,(a,s,i,l)=>{r+=a.totalInputPositions(i,l)}),r}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map(r=>this._blocks[r]):[]}pad(e){const t=new Ie;return this._forEachBlocksInRange(0,this.displayValue.length,r=>t.aggregate(r.pad(e))),t}}St.DEFAULTS={...Et.DEFAULTS,lazy:!0,placeholderChar:"_"},St.STOP_CHAR="`",St.ESCAPE_CHAR="\\",St.InputDefinition=ja,St.FixedDefinition=th,Be.MaskedPattern=St;class Ya extends St{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:r=this.from||0,maxLength:a=this.maxLength||0,autofix:s=this.autofix,...i}=e;this.to=t,this.from=r,this.maxLength=Math.max(String(t).length,a),this.autofix=s;const l=String(this.from).padStart(this.maxLength,"0"),c=String(this.to).padStart(this.maxLength,"0");let d=0;for(;d<c.length&&c[d]===l[d];)++d;i.mask=c.slice(0,d).replace(/0/g,"\\0")+"0".repeat(this.maxLength-d),super._update(i)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let t="",r="";const[,a,s]=e.match(/^(\D*)(\d*)(\D*)/)||[];return s&&(t="0".repeat(a.length)+s,r="9".repeat(a.length)+s),t=t.padEnd(this.maxLength,"0"),r=r.padEnd(this.maxLength,"9"),[t,r]}doPrepareChar(e,t){t===void 0&&(t={});let r;return[e,r]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(r.skip=!this.isComplete),[e,r]}_appendCharRaw(e,t){if(t===void 0&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const r=String(this.from).padStart(this.maxLength,"0"),a=String(this.to).padStart(this.maxLength,"0"),[s,i]=this.boundaries(this.value+e);return Number(i)<this.from?super._appendCharRaw(r[this.value.length],t):Number(s)>this.to?!t.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(r[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(a[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(t.search(/[^0]/)===-1&&t.length<=this._matchFrom)return!0;const[a,s]=this.boundaries(t);return this.from<=Number(s)&&Number(a)<=this.to&&super.doValidate(e)}pad(e){const t=new Ie;if(this.value.length===this.maxLength)return t;const r=this.value,a=this.maxLength-this.value.length;if(a){this.reset();for(let s=0;s<a;++s)t.aggregate(super._appendCharRaw("0",e));r.split("").forEach(s=>this._appendCharRaw(s))}return t}}Be.MaskedRange=Ya;const ib="d{.}`m{.}`Y";class Nn extends St{static extractPatternOptions(e){const{mask:t,pattern:r,...a}=e;return{...a,mask:Qn(t)?t:r}}constructor(e){super(Nn.extractPatternOptions({...Nn.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:r,blocks:a,...s}={...Nn.DEFAULTS,...e},i=Object.assign({},Nn.GET_DEFAULT_BLOCKS());e.min&&(i.Y.from=e.min.getFullYear()),e.max&&(i.Y.to=e.max.getFullYear()),e.min&&e.max&&i.Y.from===i.Y.to&&(i.m.from=e.min.getMonth()+1,i.m.to=e.max.getMonth()+1,i.m.from===i.m.to&&(i.d.from=e.min.getDate(),i.d.to=e.max.getDate())),Object.assign(i,this.blocks,a),super._update({...s,mask:Qn(t)?t:r,blocks:i})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&t!=null&&(this.min==null||this.min<=t)&&(this.max==null||t<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(Nn.extractPatternOptions(e))}}Nn.GET_DEFAULT_BLOCKS=()=>({d:{mask:Ya,from:1,to:31,maxLength:2},m:{mask:Ya,from:1,to:12,maxLength:2},Y:{mask:Ya,from:1900,to:9999}}),Nn.DEFAULTS={...St.DEFAULTS,mask:Date,pattern:ib,format:(n,e)=>{if(!n)return"";const t=String(n.getDate()).padStart(2,"0"),r=String(n.getMonth()+1).padStart(2,"0"),a=n.getFullYear();return[t,r,a].join(".")},parse:(n,e)=>{const[t,r,a]=n.split(".").map(Number);return new Date(a,r-1,t)}},Be.MaskedDate=Nn;class Ua extends Et{constructor(e){super({...Ua.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(t=>{const{expose:r,...a}=Pr(t),s=In({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...a});return r&&(this.exposeMask=s),s}):[])}_appendCharRaw(e,t){t===void 0&&(t={});const r=this._applyDispatch(e,t);return this.currentMask&&r.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),r}_applyDispatch(e,t,r){e===void 0&&(e=""),t===void 0&&(t={}),r===void 0&&(r="");const a=t.tail&&t._beforeTailState!=null?t._beforeTailState._value:this.value,s=this.rawInputValue,i=t.tail&&t._beforeTailState!=null?t._beforeTailState._rawInputValue:s,l=s.slice(i.length),c=this.currentMask,d=new Ie,u=c==null?void 0:c.state;return this.currentMask=this.doDispatch(e,{...t},r),this.currentMask&&(this.currentMask!==c?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),d.tailShift=this.currentMask.value.length-a.length),l&&(d.tailShift+=this.currentMask.append(l,{raw:!0,tail:!0}).tailShift)):u&&(this.currentMask.state=u)),d}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new Ie;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,r;return{...e,_beforeTailState:((t=e._beforeTailState)==null?void 0:t.currentMaskRef)===this.currentMask&&((r=e._beforeTailState)==null?void 0:r.currentMask)||e._beforeTailState}}doDispatch(e,t,r){return t===void 0&&(t={}),r===void 0&&(r=""),this.dispatch(e,this,t,r)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){t===void 0&&(t={});let[r,a]=super.doPrepare(e,t);if(this.currentMask){let s;[r,s]=super.doPrepare(r,this.currentMaskFlags(t)),a=a.aggregate(s)}return[r,a]}doPrepareChar(e,t){t===void 0&&(t={});let[r,a]=super.doPrepareChar(e,t);if(this.currentMask){let s;[r,s]=super.doPrepareChar(r,this.currentMaskFlags(t)),a=a.aggregate(s)}return[r,a]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(t=>t.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,t){const r=new Ie;return this.currentMask&&r.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),r}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(t=>t.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:r,currentMask:a,...s}=e;t&&this.compiledMasks.forEach((i,l)=>i.state=t[l]),r!=null&&(this.currentMask=r,this.currentMask.state=a),super.state=s}extractInput(e,t,r){return this.currentMask?this.currentMask.extractInput(e,t,r):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((t,r)=>{if(!e[r])return;const{mask:a,...s}=e[r];return Ra(t,s)&&t.maskEquals(a)}):super.maskEquals(e)}typedValueEquals(e){var t;return!!((t=this.currentMask)!=null&&t.typedValueEquals(e))}}Ua.DEFAULTS={...Et.DEFAULTS,dispatch:(n,e,t,r)=>{if(!e.compiledMasks.length)return;const a=e.rawInputValue,s=e.compiledMasks.map((i,l)=>{const c=e.currentMask===i,d=c?i.displayValue.length:i.nearestInputPos(i.displayValue.length,ke.FORCE_LEFT);return i.rawInputValue!==a?(i.reset(),i.append(a,{raw:!0})):c||i.remove(d),i.append(n,e.currentMaskFlags(t)),i.appendTail(r),{index:l,weight:i.rawInputValue.length,totalInputPositions:i.totalInputPositions(0,Math.max(d,i.nearestInputPos(i.displayValue.length,ke.FORCE_LEFT)))}});return s.sort((i,l)=>l.weight-i.weight||l.totalInputPositions-i.totalInputPositions),e.compiledMasks[s[0].index]}},Be.MaskedDynamic=Ua;class Wa extends St{constructor(e){super({...Wa.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...r}=e;if(t){const a=t.map(l=>l.length),s=Math.min(...a),i=Math.max(...a)-s;r.mask="*".repeat(s),i&&(r.mask+="["+"*".repeat(i)+"]"),this.enum=t}super._update(r)}_appendCharRaw(e,t){t===void 0&&(t={});const r=Math.min(this.nearestInputPos(0,ke.FORCE_RIGHT),this.value.length),a=this.enum.filter(s=>this.matchValue(s,this.unmaskedValue+e,r));if(a.length){a.length===1&&this._forEachBlocksInRange(0,this.value.length,(i,l)=>{const c=a[0][l];l>=this.value.length||c===i.value||(i.reset(),i._appendChar(c,t))});const s=super._appendCharRaw(a[0][this.value.length],t);return a.length===1&&a[0].slice(this.unmaskedValue.length).split("").forEach(i=>s.aggregate(super._appendCharRaw(i))),s}return new Ie({skip:!this.isComplete})}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new yn("",e)}remove(e,t){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),e===t)return new Ie;const r=Math.min(super.nearestInputPos(0,ke.FORCE_RIGHT),this.value.length);let a;for(a=e;a>=0&&!(this.enum.filter(l=>this.matchValue(l,this.value.slice(r,a),r)).length>1);--a);const s=super.remove(a,t);return s.tailShift+=a-e,s}get isComplete(){return this.enum.indexOf(this.value)>=0}}Wa.DEFAULTS={...St.DEFAULTS,matchValue:(n,e,t)=>n.indexOf(e,t)===t},Be.MaskedEnum=Wa;class lb extends Et{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}Be.MaskedFunction=lb;var nh;class jt extends Et{constructor(e){super({...jt.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t="\\d*",r=(this.scale?"("+Ni(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+t+r),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(Ni).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Ni(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){t===void 0&&(t={});const[r,a]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!r&&(a.skip=!0),r&&!this.allowPositive&&!this.value&&r!=="-"&&a.aggregate(this._appendChar("-")),[r,a]}_separatorsCount(e,t){t===void 0&&(t=!1);let r=0;for(let a=0;a<e;++a)this._value.indexOf(this.thousandsSeparator,a)===a&&(++r,t&&(e+=this.thousandsSeparator.length));return r}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,r))}_appendCharRaw(e,t){t===void 0&&(t={});const r=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,a=this._separatorsCountFromSlice(r);this._value=this._removeThousandsSeparators(this.value);const s=this._value;this._value+=e;const i=this.number;let l=!isNaN(i),c=!1;if(l){let p;this.min!=null&&this.min<0&&this.number<this.min&&(p=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(p=this.max),p!=null&&(this.autofix?(this._value=this.format(p,this).replace(jt.UNMASKED_RADIX,this.radix),c||(c=s===this._value&&!t.tail)):l=!1),l&&(l=!!this._value.match(this._numberRegExp))}let d;l?d=new Ie({inserted:this._value.slice(s.length),rawInserted:c?"":e,skip:c}):(this._value=s,d=new Ie),this._value=this._insertThousandsSeparators(this._value);const u=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,h=this._separatorsCountFromSlice(u);return d.tailShift+=(h-a)*this.thousandsSeparator.length,d}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,r=this.value.indexOf(this.thousandsSeparator,t);if(r<=e)return r}return-1}_adjustRangeWithSeparators(e,t){const r=this._findSeparatorAround(e);r>=0&&(e=r);const a=this._findSeparatorAround(t);return a>=0&&(t=a+this.thousandsSeparator.length),[e,t]}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const r=this.value.slice(0,e),a=this.value.slice(t),s=this._separatorsCount(r.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(r+a));const i=this._separatorsCountFromSlice(r);return new Ie({tailShift:(i-s)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case ke.NONE:case ke.LEFT:case ke.FORCE_LEFT:{const r=this._findSeparatorAround(e-1);if(r>=0){const a=r+this.thousandsSeparator.length;if(e<a||this.value.length<=a||t===ke.FORCE_LEFT)return r}break}case ke.RIGHT:case ke.FORCE_RIGHT:{const r=this._findSeparatorAround(e);if(r>=0)return r+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;this.min!=null&&(t=Math.max(t,this.min)),this.max!=null&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let r=this.value;this.normalizeZeros&&(r=this._normalizeZeros(r)),this.padFractionalZeros&&this.scale>0&&(r=this._padFractionalZeros(r)),this._value=r}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,(r,a,s,i)=>a+i),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,r){t===void 0&&(t={});const a=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===jt.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,r)&&!a}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,jt.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(jt.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||jt.EMPTY_VALUES.includes(e)&&jt.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}nh=jt,jt.UNMASKED_RADIX=".",jt.EMPTY_VALUES=[...Et.EMPTY_VALUES,0],jt.DEFAULTS={...Et.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[nh.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:n=>n.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},Be.MaskedNumber=jt;const Li={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function oh(n,e,t){e===void 0&&(e=Li.MASKED),t===void 0&&(t=Li.MASKED);const r=In(n);return a=>r.runIsolated(s=>(s[e]=a,s[t]))}function cb(n,e,t,r){return oh(e,t,r)(n)}Be.PIPE_TYPE=Li,Be.createPipe=oh,Be.pipe=cb;class db extends St{get repeatFrom(){var e;return(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?e:0}get repeatTo(){var e;return(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,r,a;const{repeat:s,...i}=Pr(e);this._blockOpts=Object.assign({},this._blockOpts,i);const l=In(this._blockOpts);this.repeat=(t=(r=s??l.repeat)!=null?r:this.repeat)!=null?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((a=this._blocks)==null?void 0:a.length)||0,this.repeatFrom)),blocks:{m:l},eager:l.eager,overwrite:l.overwrite,skipInvalid:l.skipInvalid,lazy:l.lazy,placeholderChar:l.placeholderChar,displayChar:l.displayChar})}_allocateBlock(e){if(e<this._blocks.length)return this._blocks[e];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(In(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,t){t===void 0&&(t={});const r=new Ie;for(let c=(a=(s=this._mapPosToBlock(this.displayValue.length))==null?void 0:s.index)!=null?a:Math.max(this._blocks.length-1,0),d,u;d=(i=this._blocks[c])!=null?i:u=!u&&this._allocateBlock(c);++c){var a,s,i,l;const h=d._appendChar(e,{...t,_beforeTailState:(l=t._beforeTailState)==null||(l=l._blocks)==null?void 0:l[c]});if(h.skip&&u){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(r.aggregate(h),h.consumed)break}return r}_trimEmptyTail(e,t){var r,a;e===void 0&&(e=0);const s=Math.max(((r=this._mapPosToBlock(e))==null?void 0:r.index)||0,this.repeatFrom,0);let i;t!=null&&(i=(a=this._mapPosToBlock(t))==null?void 0:a.index),i==null&&(i=this._blocks.length-1);let l=0;for(let c=i;s<=c&&!this._blocks[c].unmaskedValue;--c,++l);l&&(this._blocks.splice(i-l+1,l),this.mask=this.mask.slice(l))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const r=super.remove(e,t);return this._trimEmptyTail(e,t),r}totalInputPositions(e,t){return e===void 0&&(e=0),t==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}Be.RepeatBlock=db;try{globalThis.IMask=Be}catch{}var ub={mask:void 0,prepare:Function,prepareChar:Function,validate:Function,commit:Function,overwrite:{type:Boolean,required:!1,default:void 0},eager:{required:!1,default:void 0,validator:n=>["append","remove"].includes(n)||typeof n=="boolean"},skipInvalid:{type:Boolean,required:!1,default:void 0},placeholderChar:String,displayChar:String,lazy:{type:Boolean,required:!1,default:void 0},definitions:Object,blocks:Object,enum:Array,maxLength:Number,from:Number,to:Number,pattern:String,format:Function,parse:Function,autofix:{required:!1,default:void 0,validator:n=>n==="pad"||typeof n=="boolean"},radix:String,thousandsSeparator:String,mapToRadix:Array,scale:Number,normalizeZeros:{type:Boolean,required:!1,default:void 0},padFractionalZeros:{type:Boolean,required:!1,default:void 0},min:[Number,Date],max:[Number,Date],dispatch:Function};function hb(n,e){let{emit:t,onAccept:r,onComplete:a,defaultValue:s,defaultUnmaskedValue:i,defaultTypedValue:l}=e===void 0?{}:e;const c=o.isRef(n)?n:o.ref(n),d=o.ref(),u=o.ref(),h=o.ref(""),p=o.ref(""),m=o.ref();let f,g=h.value,x=p.value,E=m.value;function C(){E=m.value=u.value.typedValue,x=p.value=u.value.unmaskedValue,g=h.value=u.value.value}function T(b){C(),t&&(t("accept",h.value,b),t("accept:masked",h.value,b),t("accept:typed",m.value,b),t("accept:unmasked",p.value,b)),r==null||r(b)}function F(b){t&&(t("complete",u.value.value,b),t("complete:masked",u.value.value,b),t("complete:typed",u.value.typedValue,b),t("complete:unmasked",u.value.unmaskedValue,b)),a==null||a(b)}const I=()=>{!u.value||p.value===void 0||(x!==p.value&&(u.value.unmaskedValue=p.value,u.value.unmaskedValue!==p.value&&T()),x=void 0)};o.watch(p,I);const O=()=>{!u.value||h.value===void 0||(g!==h.value&&(u.value.value=h.value,u.value.value!==h.value&&T()),g=void 0)};o.watch(h,O);const P=()=>{!u.value||m.value===void 0||(E!==m.value&&(u.value.typedValue=m.value,u.value.masked.typedValueEquals(m.value)||T()),E=void 0)};o.watch(m,P);function M(){f=d.value;const b=c.value;!f||!(b!=null&&b.mask)||(u.value=Be(f,b),s!==void 0&&(h.value=s),i!==void 0&&(p.value=i),l!==void 0&&(m.value=l),I(),O(),P(),C(),u.value.on("accept",T).on("complete",F))}function v(){var b;(b=u.value)==null||b.destroy(),u.value=void 0}return o.onMounted(M),o.onUnmounted(v),o.watch([d,c],()=>{const b=d.value,D=c.value;(!(D!=null&&D.mask)||b!==f)&&v(),b&&(u.value?u.value.updateOptions(D):M())}),{el:d,mask:o.readonly(u),masked:h,unmasked:p,typed:m}}function pb(n,e){return n={...n},Object.keys(n).forEach(t=>{(n[t]===void 0||e.includes(t))&&delete n[t]}),n}const fb=["typed","unmasked","value","modelValue"];var mb=o.defineComponent({name:"imask-input",inheritAttrs:!1,props:{modelValue:String,value:String,unmasked:String,typed:{validator:()=>!0},...ub},emits:["update:modelValue","update:masked","update:value","update:unmasked","update:typed","accept","accept:value","accept:masked","accept:unmasked","accept:typed","complete","complete:value","complete:masked","complete:unmasked","complete:typed"],setup(n,e){let{attrs:t,emit:r}=e;const{el:a,mask:s,masked:i,unmasked:l,typed:c}=hb(pb(n,fb),{emit:r,onAccept:m=>{const f=i.value;r("accept:value",f,m),r("update:value",f,m),r("update:masked",f,m),r("update:modelValue",f,m),r("update:unmasked",l.value,m),r("update:typed",c.value,m)},onComplete:m=>{r("complete:value",i.value,m)}}),d=o.toRef(n,"value"),u=o.toRef(n,"modelValue"),h=o.toRef(n,"unmasked"),p=o.toRef(n,"typed");return i.value=u.value||d.value||"",l.value=h.value||"",c.value=p.value,o.watch(d,m=>i.value=m),o.watch(u,m=>i.value=m),o.watch(h,m=>l.value=m),o.watch(p,m=>c.value=m),()=>{const m={...t,value:n.value!=null?n.value:n.modelValue!=null?n.modelValue:s.value?s.value.displayValue:"",ref:a};return n.mask||(m.onInput=f=>{r("update:modelValue",f.target.value),r("update:value",f.target.value)}),o.h("input",m)}}}),zi=mb;const gb={phone:{mask:"+{996} 000 000 000"},rubles:{mask:[{mask:"",lazy:!0},{mask:"num ₽",lazy:!1,blocks:{num:{mask:Number,min:0,thousandsSeparator:" ",radix:",",mapToRadix:["."]}}}]},money:{mask:[{mask:"",lazy:!0},{mask:"num",lazy:!1,blocks:{num:{mask:Number,min:0,thousandsSeparator:" ",radix:",",mapToRadix:["."]}}}]},number:{mask:Number},any:{mask:String},date:{mask:Date,lazy:!0},time:{mask:"HH:MM",blocks:{HH:{mask:Be.MaskedRange,from:0,to:23,maxLength:2},MM:{mask:Be.MaskedRange,from:0,to:59,maxLength:2}},lazy:!0}},yb=re(o.defineComponent({__name:"TransitionExpand",props:{className:{},isShow:{type:Boolean},hasHeightDelay:{type:Boolean}},setup(n){const e=n;function t(l,c){const d=()=>{l.removeEventListener("transitionend",d),c()};l.addEventListener("transitionend",d)}const r=l=>{const c=l;c.style.height="0",c.style.opacity="0",c.style.overflow="hidden"},a=async(l,c)=>{const d=l;await o.nextTick(),d.style.transition="height 0.3s ease, opacity 0.3s ease",d.style.height=d.scrollHeight+"px",d.style.opacity="1",t(d,()=>{d.style.transition="",d.style.height="auto",c()})},s=l=>{const c=l;c.style.overflow="hidden",c.style.height=c.scrollHeight+"px",c.style.opacity="1",c.offsetHeight},i=(l,c)=>{const d=l,u=e.hasHeightDelay?"opacity 0.3s ease, height 0.3s ease 0.3s":"opacity 0.3s ease, height 0.3s ease";d.style.transition=u,d.style.opacity="0",d.style.height="0",t(d,()=>{d.style.transition="",c()})};return(l,c)=>(o.openBlock(),o.createBlock(o.Transition,{css:!1,onBeforeEnter:r,onEnter:a,onBeforeLeave:s,onLeave:i},{default:o.withCtx(()=>[l.isShow?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass([l.className,l.$style.container])},[o.createVNode(o.Transition,{appear:"","enter-active-class":l.$style.fadeEnterActive,"leave-active-class":l.$style.fadeLeaveActive,"enter-from-class":l.$style.fadeEnterFrom,"enter-to-class":l.$style.fadeEnterTo,"leave-from-class":l.$style.fadeLeaveFrom,"leave-to-class":l.$style.fadeLeaveTo},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("div",null,[o.renderSlot(l.$slots,"default")],512),[[o.vShow,l.isShow]])]),_:3},8,["enter-active-class","leave-active-class","enter-from-class","enter-to-class","leave-from-class","leave-to-class"])],2)):o.createCommentVNode("",!0)]),_:3}))}}),[["__cssModules",{$style:{container:"TransitionExpand__container_a32b9",fadeEnterActive:"TransitionExpand__fadeEnterActive_72809",fadeLeaveActive:"TransitionExpand__fadeLeaveActive_d7434",fadeEnterFrom:"TransitionExpand__fadeEnterFrom_48f96",fadeLeaveTo:"TransitionExpand__fadeLeaveTo_10d4a",fadeEnterTo:"TransitionExpand__fadeEnterTo_6736b",fadeLeaveFrom:"TransitionExpand__fadeLeaveFrom_e10bd"}}]]),Lr=n=>{const e=Object.entries(n).map(([t,r])=>[t.toString(),r]);return new Map(e)},bb=o.defineComponent({__name:"Input",props:o.mergeModels({value:{},type:{},label:{},description:{},placeholder:{},placeholderOnFocus:{},errorText:{},isError:{type:Boolean},isDisabled:{type:Boolean},mask:{},inputmode:{},autocomplete:{},maxLength:{},autofocus:{type:Boolean},size:{default:"44"},iconLeft:{},iconRight:{}},{value:{},valueModifiers:{}}),emits:o.mergeModels(["update:error","blur","click-icon-left","click-icon-right"],["update:value"]),setup(n,{emit:e}){const t=o.useModel(n,"value"),r=o.ref(!1),a=o.ref(),s=e,i=Lr({34:"caption",44:"subhead"}),l=o.computed(()=>i.get(n.size.toString())??"caption"),c=o.computed(()=>n.placeholderOnFocus&&r.value?n.placeholderOnFocus:n.placeholder);function d(){r.value=!1,s("blur")}const u=p=>{if(!n.maxLength)return;const m=p.target;m.value.length>Number(n.maxLength)&&(m.value=m.value.slice(0,Number(n.maxLength)),t.value=m.value)},h=()=>{var p;(p=a.value)==null||p.$el.focus()};return o.onMounted(()=>{var p;n.autofocus&&((p=a.value)==null||p.$el.focus())}),(p,m)=>{var f;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([p.$style.root,p.$style[`size_${p.size}`],{[p.$style["is-disabled"]]:p.isDisabled,[p.$style["is-error"]]:p.isError,[p.$style["is-focused"]]:r.value,[p.$style["is-has-placeholder-on-focus"]]:!!p.placeholderOnFocus}])},[p.label?(o.openBlock(),o.createBlock(o.unref(me),{key:0,class:o.normalizeClass(p.$style.label),size:l.value,color:"text-common-base-primary-default"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(p.label),1)]),_:1},8,["class","size"])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(p.$style.wrapper),onClick:h},[p.iconLeft?(o.openBlock(),o.createBlock(o.unref($e),{key:0,name:p.iconLeft,size:18,color:"icon-input-base-primary",onClick:m[0]||(m[0]=g=>s("click-icon-left"))},null,8,["name"])):o.createCommentVNode("",!0),o.createVNode(o.unref(zi),o.mergeProps({unmasked:t.value,"onUpdate:unmasked":m[1]||(m[1]=g=>t.value=g),class:p.$style.field,type:p.type,ref_key:"inputRef",ref:a},o.unref(gb)[p.mask??"any"],{unmask:!1,autofocus:p.autofocus,placeholder:c.value,autocomplete:p.autocomplete,inputmode:p.inputmode,onFocus:m[2]||(m[2]=()=>r.value=!0),onBlur:d,onAccept:m[3]||(m[3]=g=>s("update:error",!1)),onInput:u}),null,16,["unmasked","class","type","autofocus","placeholder","autocomplete","inputmode"]),p.iconRight?(o.openBlock(),o.createBlock(o.unref($e),{key:1,name:p.iconRight,size:18,color:"icon-input-base-primary",onClick:m[4]||(m[4]=g=>s("click-icon-right"))},null,8,["name"])):o.createCommentVNode("",!0),p.$slots.default?(o.openBlock(),o.createElementBlock("div",{key:2,class:o.normalizeClass(p.$style.action)},[o.renderSlot(p.$slots,"default")],2)):o.createCommentVNode("",!0),p.maxLength?(o.openBlock(),o.createElementBlock("span",{key:3,class:o.normalizeClass(p.$style.badge)},o.toDisplayString(Number(p.maxLength)-(((f=t.value)==null?void 0:f.length)??0)),3)):o.createCommentVNode("",!0)],2),o.createVNode(o.unref(yb),{"is-show":p.errorText&&p.isError||!!p.description&&!p.isError},{default:o.withCtx(()=>[o.createVNode(o.unref($t),null,{default:o.withCtx(()=>[p.description&&!p.isError?(o.openBlock(),o.createBlock(o.unref(me),{class:o.normalizeClass(p.$style.bottom),key:"description",size:"subhead",color:"text-common-base-secondary-default"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(p.description),1)]),_:1},8,["class"])):o.createCommentVNode("",!0),p.errorText&&p.isError?(o.openBlock(),o.createBlock(o.unref(me),{class:o.normalizeClass(p.$style.bottom),key:"error",size:"subhead",color:"text-common-critical-primary-default"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(p.errorText),1)]),_:1},8,["class"])):o.createCommentVNode("",!0)]),_:1})]),_:1},8,["is-show"])],2)}}}),rh={root:"Input__root_becdb","is-has-placeholder-on-focus":"Input__is-has-placeholder-on-focus_173d6",field:"Input__field_cc212","is-disabled":"Input__is-disabled_a39c6",wrapper:"Input__wrapper_082db","is-error":"Input__is-error_d306d","is-focused":"Input__is-focused_ed996",label:"Input__label_5f75c",bottom:"Input__bottom_e8028",badge:"Input__badge_f872a",action:"Input__action_c7dce",size_34:"Input__size_34_f9266",size_44:"Input__size_44_69c00"},Fi=re(bb,[["__cssModules",{$style:rh}]]),kb=re(o.defineComponent({__name:"InputSkeleton",props:{isShowLabel:{type:Boolean}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.$style.root)},[e.isShowLabel?(o.openBlock(),o.createBlock(o.unref($n),{key:0,widthRange:[.2,.4],class:o.normalizeClass(e.$style.label),size:"subhead",color:"foreground-layout-layout-1-primary"},null,8,["class"])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(e.$style.wrapper)},null,2)],2))}}),[["__cssModules",{$style:rh}]]),vb={subhead:"subhead",caption:"caption"},wb=re(o.defineComponent({__name:"Link",props:{tag:{default:"a"},href:{},view:{default:"base"},size:{default:"subhead"},weight:{default:"regular"},iconLeft:{},iconRight:{}},emits:["click"],setup(n,{emit:e}){const t=e,r=o.useCssModule(),a=o.computed(()=>[r.root,r[`view_${n.view}`]]),s=o.computed(()=>oi({tag:n.tag,href:n.href})),i=o.computed(()=>n.tag==="button"?{click:()=>t("click")}:{});return(l,c)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(l.tag),o.mergeProps(s.value,{class:a.value},o.toHandlers(i.value)),{default:o.withCtx(()=>[l.iconLeft?(o.openBlock(),o.createBlock(o.unref($e),{key:0,class:o.normalizeClass(o.unref(r).icon),name:l.iconLeft,color:"inherit",size:"18"},null,8,["class","name"])):o.createCommentVNode("",!0),o.createVNode(o.unref(me),{class:o.normalizeClass(o.unref(r).text),tag:"span",weight:l.weight,size:o.unref(vb)[l.size],color:"inherit"},{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},8,["class","weight","size"]),l.iconRight?(o.openBlock(),o.createBlock(o.unref($e),{key:1,class:o.normalizeClass(o.unref(r).icon),name:l.iconRight,color:"inherit",size:"18"},null,8,["class","name"])):o.createCommentVNode("",!0)]),_:3},16,["class"]))}}),[["__cssModules",{$style:{root:"Link__root_42958",icon:"Link__icon_dfe86",view_base:"Link__view_base_58365",text:"Link__text_0cdd6",view_secondary:"Link__view_secondary_759d7",view_brand:"Link__view_brand_c967f"}}]]),_b=re(o.defineComponent({__name:"ListHeader",props:o.mergeModels({isSortable:{type:Boolean},title:{},description:{},route:{},href:{},buttonText:{},hasAddButton:{type:Boolean,default:!0},save:{type:Function},cancel:{type:Function}},{isSortable:{type:Boolean,required:!0},isSortableModifiers:{}}),emits:["update:isSortable"],setup(n){const e=o.useModel(n,"isSortable"),t=o.ref(!1);function r(){e.value&&n.cancel(),e.value=!e.value}const a=o.computed(()=>e.value?"Сохранить порядок":n.buttonText),s=o.computed(()=>({size:"44",view:"base-primary",isLoading:t.value,...e.value?null:{iconLeft:"outline-plus",href:n.href??n.route},tag:e.value?"button":"router-link"})),i=o.computed(()=>e.value?{click:async()=>{try{t.value=!0,await n.save(),e.value=!1}finally{t.value=!1}}}:{});return(l,c)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(l.$style.root)},[o.createVNode(o.unref(qu),{class:o.normalizeClass(l.$style.text),title:l.title,description:l.description},null,8,["class","title","description"]),o.createElementVNode("div",{class:o.normalizeClass(l.$style.buttons)},[o.createVNode(o.unref(wo),{icon:e.value?"outline-cross":"outline-move",view:"surface",size:"44",onClick:r},null,8,["icon"]),l.hasAddButton||e.value?(o.openBlock(),o.createBlock(o.unref(tn),o.mergeProps({key:0},s.value,o.toHandlers(i.value)),{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.value),1)]),_:1},16)):o.createCommentVNode("",!0)],2)],2))}}),[["__cssModules",{$style:{root:"ListHeader__root_55574",title:"ListHeader__title_56f16",buttons:"ListHeader__buttons_723a5"}}]]),Cb=re(o.defineComponent({__name:"ModalConfirmation",props:{view:{},title:{},description:{},buttonText:{},isLoading:{type:Boolean}},emits:["cancel","confirm"],setup(n,{expose:e,emit:t}){const r=t;function a(){i(),r("cancel")}const{open:s,close:i,toggle:l}=Wu("ModalConfirmation");return e({close:i,toggle:l,open:s}),(c,d)=>(o.openBlock(),o.createBlock(o.unref(Uu),{ref:"ModalConfirmation"},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(c.$style.root)},[o.createVNode(o.unref(me),{size:"headline",weight:"medium",align:"center",class:o.normalizeClass(c.$style.title)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(c.title),1)]),_:1},8,["class"]),o.createVNode(o.unref(me),{size:"subhead",align:"center",class:o.normalizeClass(c.$style.description)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(c.description),1)]),_:1},8,["class"]),o.createElementVNode("div",{class:o.normalizeClass(c.$style.buttons)},[o.createVNode(o.unref(tn),{class:o.normalizeClass(c.$style.button),size:"44",view:"base",onClick:a},{default:o.withCtx(()=>d[1]||(d[1]=[o.createTextVNode(" Отмена ")])),_:1,__:[1]},8,["class"]),o.createVNode(o.unref(tn),{size:"44",class:o.normalizeClass(c.$style.button),isLoading:c.isLoading,isDisabled:c.isLoading,view:c.view==="base"?"base-primary":"critical",onClick:d[0]||(d[0]=u=>r("confirm"))},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(c.buttonText),1)]),_:1},8,["class","isLoading","isDisabled","view"])],2)],2)]),_:1},512))}}),[["__cssModules",{$style:{root:"ModalConfirmation__root_98f5a",title:"ModalConfirmation__title_74fe8",description:"ModalConfirmation__description_c885e",buttons:"ModalConfirmation__buttons_2b449",button:"ModalConfirmation__button_e5ac4"}}]]),Ri=re(o.defineComponent({__name:"Price",props:{value:{},size:{default:"body"},weight:{default:"regular"},color:{},isShowPlusSign:{type:Boolean,default:!1},align:{default:"left"},isMono:{type:Boolean}},setup(n){const e=o.useCssModule(),t=o.computed(()=>Number(n.value)>0&&n.isShowPlusSign?"+":Number(n.value)<0?"-":""),r=o.computed(()=>Intl.NumberFormat("ru",{maximumFractionDigits:2}).format(parseFloat(n.value.toString().replace("/ /g","").replace("/,/g",".").replace("-","")))),a=o.computed(()=>`outline-currency_${n.weight}`),s=o.computed(()=>({caption:7,subhead:8,body:8,headline:10,title3:11,title2:12,title1:15,title120:56})[n.size]),i=o.computed(()=>({caption:14,subhead:17,body:18,headline:21,title3:24,title2:25,title1:32,title120:56})[n.size]),l=o.computed(()=>[e.root,e[`size_${n.size}`],e[`align_${n.align}`]]);return(c,d)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(l.value)},[t.value?(o.openBlock(),o.createBlock(o.unref(me),{key:0,class:o.normalizeClass(o.unref(e).sign),size:c.size,color:c.color,weight:c.weight},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(t.value),1)]),_:1},8,["class","size","color","weight"])):o.createCommentVNode("",!0),o.createVNode(o.unref(me),{size:c.size,color:c.color,weight:c.weight,"is-mono":c.isMono},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(r.value),1)]),_:1},8,["size","color","weight","is-mono"]),o.createVNode(o.unref($e),{class:o.normalizeClass(o.unref(e).currency),name:a.value,size:s.value,height:i.value,color:c.color},null,8,["class","name","size","height","color"])],2))}}),[["__cssModules",{$style:{root:"Price__root_65fbf",size_caption:"Price__size_caption_ba7cc",currency:"Price__currency_8c491",size_subhead:"Price__size_subhead_65554",size_body:"Price__size_body_6fdc3",sign:"Price__sign_2f6c9",size_headline:"Price__size_headline_5ae76",size_title3:"Price__size_title3_1b860",size_title2:"Price__size_title2_c0aef",size_title1:"Price__size_title1_ca830",align_center:"Price__align_center_d7c51",align_right:"Price__align_right_a8e44"}}]]),Eb={large:{size:"headline",weight:"semibold"},base:{size:"subhead",weight:"regular"},small:{size:"subhead",weight:"regular"}},Sb={large:{size:"subhead",weight:"regular"},base:{size:"subhead",weight:"regular"},small:{size:"caption",weight:"regular"}},ah=re(o.defineComponent({__name:"ResponseBase",props:{img:{},title:{},size:{default:"base"},description:{}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([e.$style.root,e.$style[`size_${e.size}`]])},[e.img?(o.openBlock(),o.createBlock(o.unref(Ho),{key:0,class:o.normalizeClass(e.$style.image),src:e.img,alt:e.title??"response",width:"110",height:"110",objectFit:"cover"},null,8,["class","src","alt"])):o.createCommentVNode("",!0),e.title?(o.openBlock(),o.createBlock(o.unref(me),o.mergeProps({key:1,class:e.$style.title,color:"text-common-base-primary-default",align:"center"},o.unref(Eb)[e.size]),{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.title),1)]),_:1},16,["class"])):o.createCommentVNode("",!0),e.description?(o.openBlock(),o.createBlock(o.unref(me),o.mergeProps({key:2,color:"text-common-base-primary-default",align:"center"},o.unref(Sb)[e.size]),{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.description),1)]),_:1},16)):o.createCommentVNode("",!0),e.$slots.default?(o.openBlock(),o.createElementBlock("div",{key:3,class:o.normalizeClass(e.$style.bottom)},[o.renderSlot(e.$slots,"default")],2)):o.createCommentVNode("",!0)],2))}}),[["__cssModules",{$style:{root:"Response__root_52dcc",image:"Response__image_525a2",size_large:"Response__size_large_1efba",description:"Response__description_50921",bottom:"Response__bottom_17cc0",size_base:"Response__size_base_0b1a8",size_small:"Response__size_small_b40a7"}}]]),xb=o.defineComponent({__name:"EmptyResponse",props:{img:{},title:{},size:{},description:{},buttonIconLeft:{},buttonIconRight:{},buttonText:{},route:{}},setup(n){return(e,t)=>(o.openBlock(),o.createBlock(ah,{img:e.img,title:e.title,description:e.description,size:e.size},{default:o.withCtx(()=>[o.renderSlot(e.$slots,"default",{},()=>[e.buttonText&&e.route?(o.openBlock(),o.createBlock(o.unref(tn),{key:0,tag:"router-link",href:e.route,view:"base-primary",size:"44",iconLeft:e.buttonIconLeft,iconRight:e.buttonIconRight},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.buttonText),1)]),_:1},8,["href","iconLeft","iconRight"])):o.createCommentVNode("",!0)])]),_:3},8,["img","title","description","size"]))}}),Bb=re(o.defineComponent({__name:"Section",setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("article",{class:o.normalizeClass(e.$style.root)},[o.renderSlot(e.$slots,"default")],2))}}),[["__cssModules",{$style:{root:"Section__root_bdbfe"}}]]);function Tb(n){return o.getCurrentScope()?(o.onScopeDispose(n),!0):!1}function sh(n){return typeof n=="function"?n():o.unref(n)}const ih=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const $b=Object.prototype.toString,Mb=n=>$b.call(n)==="[object Object]",qa=()=>{},Db=Ob();function Ob(){var n,e;return ih&&((n=window==null?void 0:window.navigator)==null?void 0:n.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function zr(n){var e;const t=sh(n);return(e=t==null?void 0:t.$el)!=null?e:t}const lh=ih?window:void 0;function Vi(...n){let e,t,r,a;if(typeof n[0]=="string"||Array.isArray(n[0])?([t,r,a]=n,e=lh):[e,t,r,a]=n,!e)return qa;Array.isArray(t)||(t=[t]),Array.isArray(r)||(r=[r]);const s=[],i=()=>{s.forEach(u=>u()),s.length=0},l=(u,h,p,m)=>(u.addEventListener(h,p,m),()=>u.removeEventListener(h,p,m)),c=o.watch(()=>[zr(e),sh(a)],([u,h])=>{if(i(),!u)return;const p=Mb(h)?{...h}:h;s.push(...t.flatMap(m=>r.map(f=>l(u,m,f,p))))},{immediate:!0,flush:"post"}),d=()=>{c(),i()};return Tb(d),d}let ch=!1;function Ab(n,e,t={}){const{window:r=lh,ignore:a=[],capture:s=!0,detectIframe:i=!1}=t;if(!r)return qa;Db&&!ch&&(ch=!0,Array.from(r.document.body.children).forEach(p=>p.addEventListener("click",qa)),r.document.documentElement.addEventListener("click",qa));let l=!0;const c=p=>a.some(m=>{if(typeof m=="string")return Array.from(r.document.querySelectorAll(m)).some(f=>f===p.target||p.composedPath().includes(f));{const f=zr(m);return f&&(p.target===f||p.composedPath().includes(f))}}),u=[Vi(r,"click",p=>{const m=zr(n);if(!(!m||m===p.target||p.composedPath().includes(m))){if(p.detail===0&&(l=!c(p)),!l){l=!0;return}e(p)}},{passive:!0,capture:s}),Vi(r,"pointerdown",p=>{const m=zr(n);l=!c(p)&&!!(m&&!p.composedPath().includes(m))},{passive:!0}),i&&Vi(r,"blur",p=>{setTimeout(()=>{var m;const f=zr(n);((m=r.document.activeElement)==null?void 0:m.tagName)==="IFRAME"&&!(f!=null&&f.contains(r.document.activeElement))&&e(p)},0)})].filter(Boolean);return()=>u.forEach(p=>p())}function Zn(){const[n,e]=Hu(!1),t=o.ref(null),r=o.ref(null),a=o.computed(()=>{var l;return(l=r.value)!=null&&l.$el?r.value.$el:r.value}),s=o.computed(()=>{var l;return(l=t.value)!=null&&l.$el?t.value.$el:t.value});function i(){e(!n.value)}return Ab(a,()=>e(!1),{ignore:["[data-ignore-click-outside]",s.value]}),{isShowDropdown:n,setIsShowDropdown:e,toggleIsShowDropdown:i,triggerElementRef:r,parentElementRef:t}}const dh=Symbol(),uh=()=>o.inject(dh,()=>0);function Hi(n){return n/12}function ji(n){if(window){const t=Math.min(Math.max(window.innerWidth,1200),1440)/100;return Number((n*t/12).toFixed(2))}return 0}function Ib({parent:n,element:e,startHorizontalAlign:t,startVerticalAlign:r,horizontalOffset:a=0,verticalOffset:s=0,isCenterByParent:i=!1}){const l=n==null?void 0:n.getBoundingClientRect(),c=e;if(!l||!c)return;const{innerWidth:d,innerHeight:u}=window,h=c.getBoundingClientRect(),p=ji(Number(a)),m=ji(Number(s)),f=l.left+(l.width+p)-h.width>0,g=l.left+h.width+p<=d,x=l.bottom+h.height+m<u,E=l.top>h.height+m,{coordinates:C,align:T}=Lb({isCanPositionRight:f,isCanPositionLeft:g,parentElementRect:l,horizontalOffset:p,fixedElementRect:h,startAlign:t,isCenterByParent:i}),{coordinates:F,align:I}=Rb({isCanPositionBottom:x,isCanPositionTop:E,verticalOffset:m,parentElementRect:l,fixedElementRect:h,startAlign:r,isCenterByParent:i}),{left:O,right:P}=C,{top:M}=F;return{styles:{top:M&&M!==0?`${M}px`:void 0,left:O&&O!==0?`${O}px`:void 0,right:P&&P!==0?`${P}px`:void 0},align:{horizontal:T,vertical:I}}}function Nb({isCanPositionRight:n,isCanPositionLeft:e,parentElementRect:t,horizontalOffset:r,fixedElementRect:a,isCenterByParent:s=!1}){let i,l,c;return n?(l=ph(t,r),c="right"):e?(i=hh(t,r),c="left"):(i=Yi({fixedElementRect:a,horizontalOffset:r,parentElementRect:t,isCenterByParent:s}),c="center"),{coordinates:{left:i,right:l},align:c}}function Pb({isCanPositionRight:n,isCanPositionLeft:e,parentElementRect:t,horizontalOffset:r,fixedElementRect:a,isCenterByParent:s=!1}){let i,l,c;return e?(i=hh(t,r),c="left"):n?(l=ph(t,r),c="right"):(i=Yi({fixedElementRect:a,horizontalOffset:r,parentElementRect:t,isCenterByParent:s}),c="center"),{coordinates:{left:i,right:l},align:c}}function hh(n,e){return n.left+e}function ph(n,e){return window.innerWidth-n.right+e}function Yi({fixedElementRect:n,isCenterByParent:e,horizontalOffset:t,parentElementRect:r}){const a=r.left-(n.width-r.width)/2+t,s=a>0&&a+n.width<window.innerWidth;return e||s?a:(window.innerWidth-n.width)/2+t}function Lb({isCanPositionRight:n,isCanPositionLeft:e,parentElementRect:t,horizontalOffset:r,fixedElementRect:a,startAlign:s,isCenterByParent:i=!1}){return s==="right"?Nb({isCanPositionRight:n,isCanPositionLeft:e,parentElementRect:t,horizontalOffset:r,fixedElementRect:a,isCenterByParent:i}):s==="left"?Pb({isCanPositionRight:n,isCanPositionLeft:e,parentElementRect:t,horizontalOffset:r,fixedElementRect:a,isCenterByParent:i}):{coordinates:{left:Yi({fixedElementRect:a,parentElementRect:t,horizontalOffset:r,isCenterByParent:i}),right:void 0},align:"center"}}function zb({isCanPositionBottom:n,isCanPositionTop:e,verticalOffset:t,parentElementRect:r,fixedElementRect:a,isCenterByParent:s=!1}){let i,l;return n?(i=r.bottom+t,l="bottom"):e?(i=fh(r,a,t),l="top"):(i=Ui({fixedElementRect:a,verticalOffset:t,parentElementRect:r,isCenterByParent:s}),l="center"),{coordinates:{top:i},align:l}}function Fb({isCanPositionBottom:n,isCanPositionTop:e,verticalOffset:t,parentElementRect:r,fixedElementRect:a,isCenterByParent:s=!1}){let i,l;return e?(i=fh(r,a,t),l="top"):n?(i=Vb(r,t),l="bottom"):(i=Ui({fixedElementRect:a,parentElementRect:r,verticalOffset:t,isCenterByParent:s}),l="center"),{coordinates:{top:i},align:l}}function Rb({isCanPositionBottom:n,isCanPositionTop:e,verticalOffset:t,parentElementRect:r,fixedElementRect:a,startAlign:s,isCenterByParent:i=!1}){return s==="top"?Fb({isCanPositionBottom:n,isCanPositionTop:e,verticalOffset:t,parentElementRect:r,fixedElementRect:a,isCenterByParent:i}):s==="bottom"?zb({isCanPositionBottom:n,isCanPositionTop:e,verticalOffset:t,parentElementRect:r,fixedElementRect:a,isCenterByParent:i}):{coordinates:{top:Ui({fixedElementRect:a,parentElementRect:r,verticalOffset:t,isCenterByParent:i})},align:"center"}}function fh(n,e,t){return n.top-e.height-t}function Vb(n,e){return n.bottom+e}function Ui({fixedElementRect:n,parentElementRect:e,verticalOffset:t,isCenterByParent:r}){const a=e.top-(n.height-e.height)/2+t,s=a>0&&a+n.height<window.innerHeight;return r||s?a:(window.innerHeight-n.height)/2+t}const Hb=re(o.defineComponent({__name:"Wrapper",props:{isShowDropdown:{type:Boolean},verticalOffset:{default:0},horizontalOffset:{default:0},horizontalAlign:{default:"right"},verticalAlign:{default:"bottom"},isStretchToParent:{type:Boolean,default:!1},minWidth:{},isCenterByParent:{type:Boolean},isCloseOnScrollParent:{type:Boolean,default:!0},parentElement:{}},setup(n){const e=o.ref(null),t=uh(),r=o.ref({minWidth:n.minWidth?`${Hi(Number(n.minWidth))}rem`:void 0,width:void 0}),a=o.ref({top:void 0,left:void 0,right:void 0}),s=o.ref({horizontal:void 0,vertical:void 0});function i(){const f=Ib({parent:n.parentElement,element:e.value,startHorizontalAlign:n.horizontalAlign,startVerticalAlign:n.verticalAlign,horizontalOffset:Number(n.horizontalOffset),verticalOffset:Number(n.verticalOffset),isCenterByParent:n.isCenterByParent});f&&(a.value=f.styles,s.value=f.align)}function l(){t()}function c(f){f.key==="Escape"&&t()}const d=o.computed(()=>u(n.parentElement));function u(f){return f?f instanceof HTMLElement&&(f.scrollHeight>f.clientHeight||f.scrollWidth>f.clientWidth)?f:u(f.parentNode):null}let h;const p=()=>{clearTimeout(h),h=setTimeout(()=>{i()},10)},m=new ResizeObserver(p);return o.onUnmounted(()=>{var f;window.removeEventListener("resize",i),window.removeEventListener("scroll",l),document.removeEventListener("keydown",c),(f=d.value)==null||f.removeEventListener("scroll",l),m.disconnect()}),o.onMounted(()=>{var f,g;n.isStretchToParent&&(r.value.width=`${(f=n.parentElement)==null?void 0:f.clientWidth}px`),n.isCloseOnScrollParent&&((g=d.value)==null||g.addEventListener("scroll",l,{passive:!0})),window.addEventListener("scroll",l,{passive:!0}),document.addEventListener("keydown",c,{passive:!0}),window.addEventListener("resize",i),o.nextTick(i),m.observe(e.value)}),(f,g)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"fixedElementRef",ref:e,class:o.normalizeClass(f.$style.root),style:o.normalizeStyle({...a.value,...r.value})},[o.renderSlot(f.$slots,"default",{align:s.value})],6))}}),[["__cssModules",{$style:{root:"Wrapper__root_0f67c"}}]]),Jn=re(o.defineComponent({__name:"DropdownElement",props:o.mergeModels({isShowDropdown:{type:Boolean},verticalOffset:{},horizontalOffset:{},horizontalAlign:{},verticalAlign:{},isStretchToParent:{type:Boolean},minWidth:{},isCenterByParent:{type:Boolean},isCloseOnScrollParent:{type:Boolean},parentElement:{}},{isShowDropdown:{type:Boolean,required:!0},isShowDropdownModifiers:{}}),emits:o.mergeModels(["close"],["update:isShowDropdown"]),setup(n,{emit:e}){const t=o.getCurrentInstance(),r=o.ref();function a(f){const g=s(f);return g||i(f)}function s(f){var g;if(f)return f.refs.parentElementRef?(f.refs.parentElementRef instanceof HTMLElement?f.refs.parentElementRef:(g=f.refs.parentElementRef)==null?void 0:g.$el)??f.vnode.el:s(f.parent)}function i(f){if(!f)return;const g=f.ctx;return(g==null?void 0:g.$el)instanceof HTMLElement?g.$el:f.vnode.el instanceof HTMLElement?f.vnode.el:i(f.parent)}o.onMounted(()=>{r.value=a(t),r.value||console.warn(`Для использования DropdownElement нужен корневой элемент. Ошибка в компоненте ${c(t)}`)});const l=[];function c(f){return d(f),l.reverse().join(" > ")}function d(f){f!=null&&f.type.__name&&(l.push(f.type.__name??""),d(f.parent))}o.provide(dh,u);function u(){m.value=!1,p("close")}const h=n,p=e,m=o.useModel(n,"isShowDropdown");return(f,g)=>(o.openBlock(),o.createBlock(o.Teleport,{to:"#teleports"},[o.createVNode(o.unref($t),null,{default:o.withCtx(()=>[m.value&&r.value?(o.openBlock(),o.createBlock(o.unref(Hb),o.mergeProps({key:0},h,{parentElement:r.value}),{default:o.withCtx(({align:x})=>[o.renderSlot(f.$slots,"default",{align:x})]),_:3},16,["parentElement"])):o.createCommentVNode("",!0)]),_:3})]))}}),[["__cssModules",{$style:{}}]]),Wi=re(o.defineComponent({__name:"SelectBase",props:o.mergeModels({isOpen:{type:Boolean},label:{},description:{},errorText:{},isDisabled:{type:Boolean},isError:{type:Boolean},dropdownMaxHeight:{}},{isOpen:{type:Boolean,required:!0},isOpenModifiers:{}}),emits:o.mergeModels(["clickField","clickOutside","clickOutsideDropdown","close"],["update:isOpen"]),setup(n,{emit:e}){const t=o.useModel(n,"isOpen"),r=e,a=o.ref(null),s=o.ref(null),i=o.ref({...n.dropdownMaxHeight&&{height:`${n.dropdownMaxHeight}px`}}),{isShowDropdown:l,setIsShowDropdown:c,triggerElementRef:d,parentElementRef:u}=Zn();return o.watch(t,h=>{c(h)},{immediate:!0}),o.watch(l,h=>{t.value=h,h||r("close")}),o.watch(t,h=>{h&&o.nextTick(()=>{const p=s.value,m=document.querySelectorAll('[data-select-base-is-active-item = "true"]')[0];!p||!m||(p.scrollTop=m.offsetTop-p.getBoundingClientRect().height/2+m.getBoundingClientRect().height/2)})}),(h,p)=>(o.openBlock(),o.createElementBlock("div",{"data-ignore-click-outside":"",class:o.normalizeClass([h.$style.root,{[h.$style["is-disabled"]]:h.isDisabled,[h.$style["is-error"]]:h.isError,[h.$style["is-focused"]]:n.isOpen}])},[h.label?(o.openBlock(),o.createBlock(o.unref(me),{key:0,size:"subhead",color:"foreground-layout-layout-1-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(h.label),1)]),_:1})):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"wrapperRef",ref:a,class:o.normalizeClass(h.$style.wrapper),onClick:p[0]||(p[0]=m=>r("clickField"))},[o.renderSlot(h.$slots,"field")],2),o.createVNode(o.unref(Jn),{isShowDropdown:o.unref(l),"vertical-offset":"10",isCloseOnScrollParent:!0,"is-stretch-to-parent":"","horizontal-align":"left"},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(h.$style.dropdown),style:o.normalizeStyle(i.value),ref_key:"triggerElementRef",ref:d},[o.renderSlot(h.$slots,"dropdown")],6)]),_:3},8,["isShowDropdown"]),h.description||h.errorText?(o.openBlock(),o.createBlock(o.unref(qn),{key:1},{default:o.withCtx(()=>[h.description&&!h.isError?(o.openBlock(),o.createBlock(o.unref(me),{key:"description",size:"caption",color:"foreground-layout-layout-1-secondary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(h.description),1)]),_:1})):o.createCommentVNode("",!0),h.errorText&&h.isError?(o.openBlock(),o.createBlock(o.unref(me),{key:"error",size:"caption",color:"foreground-layout-layout-1-critical"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(h.errorText),1)]),_:1})):o.createCommentVNode("",!0)]),_:1})):o.createCommentVNode("",!0)],2))}}),[["__cssModules",{$style:{root:"SelectBase__root_95848",wrapper:"SelectBase__wrapper_32d76",dropdown:"SelectBase__dropdown_cdc0a","is-disabled":"SelectBase__is-disabled_4524f","is-error":"SelectBase__is-error_5c4d2","is-focused":"SelectBase__is-focused_c29c9"}}]]),jb=["data-select-base-is-active-item","onClick"],Yb={key:0},Ub=re(o.defineComponent({__name:"Select",props:o.mergeModels({label:{},description:{},errorText:{},isError:{type:Boolean},isDisabled:{type:Boolean},iconLeft:{},placeholder:{},data:{}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(n){const e=o.useModel(n,"value"),t=o.ref(!1),r=o.computed(()=>{const s=n.data.find(i=>i.id===e.value);return s?s.text:null});function a(s){t.value=!1,s===e.value?e.value=null:e.value=s}return(s,i)=>(o.openBlock(),o.createBlock(o.unref(Wi),{isOpen:t.value,"onUpdate:isOpen":i[0]||(i[0]=l=>t.value=l),label:s.label,description:s.description,errorText:s.errorText,isError:s.isError,isDisabled:s.isDisabled,"dropdown-max-height":215,onClickField:i[1]||(i[1]=()=>t.value=!t.value),onClickOutside:i[2]||(i[2]=()=>t.value=!1)},{field:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(s.$style.field)},[s.iconLeft?(o.openBlock(),o.createBlock(o.unref($e),{key:0,name:s.iconLeft,size:18,color:"foreground-interactive-select-base-secondary"},null,8,["name"])):o.createCommentVNode("",!0),o.createVNode(o.unref(qn),{class:o.normalizeClass(s.$style["field-inner"])},{default:o.withCtx(()=>[!r.value&&s.placeholder?(o.openBlock(),o.createBlock(o.unref(me),{key:s.placeholder,size:"subhead",color:"foreground-interactive-select-base-placeholder"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(s.placeholder),1)]),_:1})):o.createCommentVNode("",!0),r.value?(o.openBlock(),o.createBlock(o.unref(me),{key:r.value,size:"subhead",color:"foreground-interactive-select-base-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(r.value),1)]),_:1})):o.createCommentVNode("",!0)]),_:1},8,["class"]),o.createVNode(o.unref($e),{class:o.normalizeClass([s.$style["icon-right"],{[s.$style["is-open"]]:t.value}]),name:"outline-chevron-down",size:"18",color:"icon-common-base-secondary-default"},null,8,["class"])],2)]),dropdown:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(s.$style.list)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.data,l=>(o.openBlock(),o.createElementBlock("div",{key:l.id,"data-select-base-is-active-item":l.id===e.value,class:o.normalizeClass([s.$style.item,{[s.$style["is-active"]]:l.id===e.value}]),onClick:()=>a(l.id)},[l.icon?(o.openBlock(),o.createBlock(o.unref($e),{key:0,name:l.icon,size:18,color:"icon-input-base-primary"},null,8,["name"])):o.createCommentVNode("",!0),o.createVNode(o.unref(me),{size:"subhead",color:"text-common-base-primary-default"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(l.text),1)]),_:2},1024),o.createVNode(o.unref(qn),null,{default:o.withCtx(()=>[l.id===e.value?(o.openBlock(),o.createElementBlock("div",Yb,[o.createVNode(o.unref($e),{class:o.normalizeClass(s.$style.check),name:"outline-check",size:18,color:"foreground-surface-popover-base"},null,8,["class"])])):o.createCommentVNode("",!0)]),_:2},1024)],10,jb))),128))],2)]),_:1},8,["isOpen","label","description","errorText","isError","isDisabled"]))}}),[["__cssModules",{$style:{field:"Select__field_5e4de","field-inner":"Select__field-inner_addbf",list:"Select__list_818fa",item:"Select__item_4cc42","is-active":"Select__is-active_1c44e","icon-right":"Select__icon-right_434be","is-open":"Select__is-open_000d1",check:"Select__check_00c5c"}}]]),Wb="";function Ga(n,e){e===void 0&&(e={});var t=e.insertAt;if(!(!n||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",t==="top"&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=n:a.appendChild(document.createTextNode(n))}}const Ka=function(n,e){const{componentPrefix:t=Wb}=e||{};n.component(`${t}${this.name}`,this)};function wt(n,e){qb(n)&&(n="100%");var t=Gb(n);return n=e===360?n:Math.min(e,Math.max(0,parseFloat(n))),t&&(n=parseInt(String(n*e),10)/100),Math.abs(n-e)<1e-6?1:(e===360?n=(n<0?n%e+e:n%e)/parseFloat(String(e)):n=n%e/parseFloat(String(e)),n)}function Xa(n){return Math.min(1,Math.max(0,n))}function qb(n){return typeof n=="string"&&n.indexOf(".")!==-1&&parseFloat(n)===1}function Gb(n){return typeof n=="string"&&n.indexOf("%")!==-1}function mh(n){return n=parseFloat(n),(isNaN(n)||n<0||n>1)&&(n=1),n}function Qa(n){return n<=1?"".concat(Number(n)*100,"%"):n}function xo(n){return n.length===1?"0"+n:String(n)}function Kb(n,e,t){return{r:wt(n,255)*255,g:wt(e,255)*255,b:wt(t,255)*255}}function gh(n,e,t){n=wt(n,255),e=wt(e,255),t=wt(t,255);var r=Math.max(n,e,t),a=Math.min(n,e,t),s=0,i=0,l=(r+a)/2;if(r===a)i=0,s=0;else{var c=r-a;switch(i=l>.5?c/(2-r-a):c/(r+a),r){case n:s=(e-t)/c+(e<t?6:0);break;case e:s=(t-n)/c+2;break;case t:s=(n-e)/c+4;break}s/=6}return{h:s,s:i,l}}function qi(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*(6*t):t<1/2?e:t<2/3?n+(e-n)*(2/3-t)*6:n}function Xb(n,e,t){var r,a,s;if(n=wt(n,360),e=wt(e,100),t=wt(t,100),e===0)a=t,s=t,r=t;else{var i=t<.5?t*(1+e):t+e-t*e,l=2*t-i;r=qi(l,i,n+1/3),a=qi(l,i,n),s=qi(l,i,n-1/3)}return{r:r*255,g:a*255,b:s*255}}function yh(n,e,t){n=wt(n,255),e=wt(e,255),t=wt(t,255);var r=Math.max(n,e,t),a=Math.min(n,e,t),s=0,i=r,l=r-a,c=r===0?0:l/r;if(r===a)s=0;else{switch(r){case n:s=(e-t)/l+(e<t?6:0);break;case e:s=(t-n)/l+2;break;case t:s=(n-e)/l+4;break}s/=6}return{h:s,s:c,v:i}}function Qb(n,e,t){n=wt(n,360)*6,e=wt(e,100),t=wt(t,100);var r=Math.floor(n),a=n-r,s=t*(1-e),i=t*(1-a*e),l=t*(1-(1-a)*e),c=r%6,d=[t,i,s,s,l,t][c],u=[l,t,t,i,s,s][c],h=[s,s,l,t,t,i][c];return{r:d*255,g:u*255,b:h*255}}function bh(n,e,t,r){var a=[xo(Math.round(n).toString(16)),xo(Math.round(e).toString(16)),xo(Math.round(t).toString(16))];return r&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function Zb(n,e,t,r,a){var s=[xo(Math.round(n).toString(16)),xo(Math.round(e).toString(16)),xo(Math.round(t).toString(16)),xo(Jb(r))];return a&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))&&s[3].startsWith(s[3].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function Jb(n){return Math.round(parseFloat(n)*255).toString(16)}function kh(n){return Yt(n)/255}function Yt(n){return parseInt(n,16)}function e0(n){return{r:n>>16,g:(n&65280)>>8,b:n&255}}var Gi={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function t0(n){var e={r:0,g:0,b:0},t=1,r=null,a=null,s=null,i=!1,l=!1;return typeof n=="string"&&(n=r0(n)),typeof n=="object"&&(Pn(n.r)&&Pn(n.g)&&Pn(n.b)?(e=Kb(n.r,n.g,n.b),i=!0,l=String(n.r).substr(-1)==="%"?"prgb":"rgb"):Pn(n.h)&&Pn(n.s)&&Pn(n.v)?(r=Qa(n.s),a=Qa(n.v),e=Qb(n.h,r,a),i=!0,l="hsv"):Pn(n.h)&&Pn(n.s)&&Pn(n.l)&&(r=Qa(n.s),s=Qa(n.l),e=Xb(n.h,r,s),i=!0,l="hsl"),Object.prototype.hasOwnProperty.call(n,"a")&&(t=n.a)),t=mh(t),{ok:i,format:n.format||l,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:t}}var n0="[-\\+]?\\d+%?",o0="[-\\+]?\\d*\\.\\d+%?",eo="(?:".concat(o0,")|(?:").concat(n0,")"),Ki="[\\s|\\(]+(".concat(eo,")[,|\\s]+(").concat(eo,")[,|\\s]+(").concat(eo,")\\s*\\)?"),Xi="[\\s|\\(]+(".concat(eo,")[,|\\s]+(").concat(eo,")[,|\\s]+(").concat(eo,")[,|\\s]+(").concat(eo,")\\s*\\)?"),on={CSS_UNIT:new RegExp(eo),rgb:new RegExp("rgb"+Ki),rgba:new RegExp("rgba"+Xi),hsl:new RegExp("hsl"+Ki),hsla:new RegExp("hsla"+Xi),hsv:new RegExp("hsv"+Ki),hsva:new RegExp("hsva"+Xi),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function r0(n){if(n=n.trim().toLowerCase(),n.length===0)return!1;var e=!1;if(Gi[n])n=Gi[n],e=!0;else if(n==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t=on.rgb.exec(n);return t?{r:t[1],g:t[2],b:t[3]}:(t=on.rgba.exec(n),t?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=on.hsl.exec(n),t?{h:t[1],s:t[2],l:t[3]}:(t=on.hsla.exec(n),t?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=on.hsv.exec(n),t?{h:t[1],s:t[2],v:t[3]}:(t=on.hsva.exec(n),t?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=on.hex8.exec(n),t?{r:Yt(t[1]),g:Yt(t[2]),b:Yt(t[3]),a:kh(t[4]),format:e?"name":"hex8"}:(t=on.hex6.exec(n),t?{r:Yt(t[1]),g:Yt(t[2]),b:Yt(t[3]),format:e?"name":"hex"}:(t=on.hex4.exec(n),t?{r:Yt(t[1]+t[1]),g:Yt(t[2]+t[2]),b:Yt(t[3]+t[3]),a:kh(t[4]+t[4]),format:e?"name":"hex8"}:(t=on.hex3.exec(n),t?{r:Yt(t[1]+t[1]),g:Yt(t[2]+t[2]),b:Yt(t[3]+t[3]),format:e?"name":"hex"}:!1)))))))))}function Pn(n){return!!on.CSS_UNIT.exec(String(n))}var a0=function(){function n(e,t){e===void 0&&(e=""),t===void 0&&(t={});var r;if(e instanceof n)return e;typeof e=="number"&&(e=e0(e)),this.originalInput=e;var a=t0(e);this.originalInput=e,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=t.format)!==null&&r!==void 0?r:a.format,this.gradientType=t.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return n.prototype.isDark=function(){return this.getBrightness()<128},n.prototype.isLight=function(){return!this.isDark()},n.prototype.getBrightness=function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},n.prototype.getLuminance=function(){var e=this.toRgb(),t,r,a,s=e.r/255,i=e.g/255,l=e.b/255;return s<=.03928?t=s/12.92:t=Math.pow((s+.055)/1.055,2.4),i<=.03928?r=i/12.92:r=Math.pow((i+.055)/1.055,2.4),l<=.03928?a=l/12.92:a=Math.pow((l+.055)/1.055,2.4),.2126*t+.7152*r+.0722*a},n.prototype.getAlpha=function(){return this.a},n.prototype.setAlpha=function(e){return this.a=mh(e),this.roundA=Math.round(100*this.a)/100,this},n.prototype.isMonochrome=function(){var e=this.toHsl().s;return e===0},n.prototype.toHsv=function(){var e=yh(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}},n.prototype.toHsvString=function(){var e=yh(this.r,this.g,this.b),t=Math.round(e.h*360),r=Math.round(e.s*100),a=Math.round(e.v*100);return this.a===1?"hsv(".concat(t,", ").concat(r,"%, ").concat(a,"%)"):"hsva(".concat(t,", ").concat(r,"%, ").concat(a,"%, ").concat(this.roundA,")")},n.prototype.toHsl=function(){var e=gh(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}},n.prototype.toHslString=function(){var e=gh(this.r,this.g,this.b),t=Math.round(e.h*360),r=Math.round(e.s*100),a=Math.round(e.l*100);return this.a===1?"hsl(".concat(t,", ").concat(r,"%, ").concat(a,"%)"):"hsla(".concat(t,", ").concat(r,"%, ").concat(a,"%, ").concat(this.roundA,")")},n.prototype.toHex=function(e){return e===void 0&&(e=!1),bh(this.r,this.g,this.b,e)},n.prototype.toHexString=function(e){return e===void 0&&(e=!1),"#"+this.toHex(e)},n.prototype.toHex8=function(e){return e===void 0&&(e=!1),Zb(this.r,this.g,this.b,this.a,e)},n.prototype.toHex8String=function(e){return e===void 0&&(e=!1),"#"+this.toHex8(e)},n.prototype.toHexShortString=function(e){return e===void 0&&(e=!1),this.a===1?this.toHexString(e):this.toHex8String(e)},n.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},n.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(e,", ").concat(t,", ").concat(r,")"):"rgba(".concat(e,", ").concat(t,", ").concat(r,", ").concat(this.roundA,")")},n.prototype.toPercentageRgb=function(){var e=function(t){return"".concat(Math.round(wt(t,255)*100),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},n.prototype.toPercentageRgbString=function(){var e=function(t){return Math.round(wt(t,255)*100)};return this.a===1?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},n.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var e="#"+bh(this.r,this.g,this.b,!1),t=0,r=Object.entries(Gi);t<r.length;t++){var a=r[t],s=a[0],i=a[1];if(e===i)return s}return!1},n.prototype.toString=function(e){var t=!!e;e=e??this.format;var r=!1,a=this.a<1&&this.a>=0,s=!t&&a&&(e.startsWith("hex")||e==="name");return s?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},n.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},n.prototype.clone=function(){return new n(this.toString())},n.prototype.lighten=function(e){e===void 0&&(e=10);var t=this.toHsl();return t.l+=e/100,t.l=Xa(t.l),new n(t)},n.prototype.brighten=function(e){e===void 0&&(e=10);var t=this.toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(e/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(e/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(e/100)))),new n(t)},n.prototype.darken=function(e){e===void 0&&(e=10);var t=this.toHsl();return t.l-=e/100,t.l=Xa(t.l),new n(t)},n.prototype.tint=function(e){return e===void 0&&(e=10),this.mix("white",e)},n.prototype.shade=function(e){return e===void 0&&(e=10),this.mix("black",e)},n.prototype.desaturate=function(e){e===void 0&&(e=10);var t=this.toHsl();return t.s-=e/100,t.s=Xa(t.s),new n(t)},n.prototype.saturate=function(e){e===void 0&&(e=10);var t=this.toHsl();return t.s+=e/100,t.s=Xa(t.s),new n(t)},n.prototype.greyscale=function(){return this.desaturate(100)},n.prototype.spin=function(e){var t=this.toHsl(),r=(t.h+e)%360;return t.h=r<0?360+r:r,new n(t)},n.prototype.mix=function(e,t){t===void 0&&(t=50);var r=this.toRgb(),a=new n(e).toRgb(),s=t/100,i={r:(a.r-r.r)*s+r.r,g:(a.g-r.g)*s+r.g,b:(a.b-r.b)*s+r.b,a:(a.a-r.a)*s+r.a};return new n(i)},n.prototype.analogous=function(e,t){e===void 0&&(e=6),t===void 0&&(t=30);var r=this.toHsl(),a=360/t,s=[this];for(r.h=(r.h-(a*e>>1)+720)%360;--e;)r.h=(r.h+a)%360,s.push(new n(r));return s},n.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new n(e)},n.prototype.monochromatic=function(e){e===void 0&&(e=6);for(var t=this.toHsv(),r=t.h,a=t.s,s=t.v,i=[],l=1/e;e--;)i.push(new n({h:r,s:a,v:s})),s=(s+l)%1;return i},n.prototype.splitcomplement=function(){var e=this.toHsl(),t=e.h;return[this,new n({h:(t+72)%360,s:e.s,l:e.l}),new n({h:(t+216)%360,s:e.s,l:e.l})]},n.prototype.onBackground=function(e){var t=this.toRgb(),r=new n(e).toRgb(),a=t.a+r.a*(1-t.a);return new n({r:(t.r*t.a+r.r*r.a*(1-t.a))/a,g:(t.g*t.a+r.g*r.a*(1-t.a))/a,b:(t.b*t.a+r.b*r.a*(1-t.a))/a,a})},n.prototype.triad=function(){return this.polyad(3)},n.prototype.tetrad=function(){return this.polyad(4)},n.prototype.polyad=function(e){for(var t=this.toHsl(),r=t.h,a=[this],s=360/e,i=1;i<e;i++)a.push(new n({h:(r+i*s)%360,s:t.s,l:t.l}));return a},n.prototype.equals=function(e){return this.toRgbString()===new n(e).toRgbString()},n}();function to(...n){return new a0(...n)}function Qi(n,e){const t=n&&n.a;let r;n&&n.hsl?r=to(n.hsl):n&&n.hex&&n.hex.length>0?r=to(n.hex):n&&n.hsv?r=to(n.hsv):n&&n.rgba?r=to(n.rgba):n&&n.rgb?r=to(n.rgb):r=to(n),r&&(r._a===void 0||r._a===null)&&r.setAlpha(t||r.getAlpha());const a=r.toHsl(),s=r.toHsv();return a.s===0&&(s.h=a.h=n.h||n.hsl&&n.hsl.h||e||0),s.v<.0164&&(s.h=n.h||n.hsv&&n.hsv.h||0,s.s=n.s||n.hsv&&n.hsv.s||0),a.l<.01&&(a.h=n.h||n.hsl&&n.hsl.h||0,a.s=n.s||n.hsl&&n.hsl.s||0),{hsl:a,hex:r.toHexString().toUpperCase(),hex8:r.toHex8String().toUpperCase(),rgba:r.toRgb(),hsv:s,oldHue:n.h||e||a.h,source:n.source,a:r.getAlpha()}}var s0={model:{prop:"modelValue",event:"update:modelValue"},props:["modelValue"],data(){return{val:Qi(this.modelValue)}},computed:{colors:{get(){return this.val},set(n){this.val=n,this.$emit("update:modelValue",n)}}},watch:{modelValue(n){this.val=Qi(n)}},methods:{colorChange(n,e){this.oldHue=this.colors.hsl.h,this.colors=Qi(n,e||this.oldHue)},isValidHex(n){return to(n).isValid},simpleCheckForValidColor(n){const e=["r","g","b","a","h","s","l","v"];let t=0,r=0;for(let a=0;a<e.length;a++){const s=e[a];n[s]&&(t++,isNaN(n[s])||r++)}if(t===r)return n},paletteUpperCase(n){return n.map(e=>e.toUpperCase())},isTransparent(n){return to(n).getAlpha()===0}}},Za={name:"EditableInput",props:{label:String,labelText:String,desc:String,value:[String,Number],max:Number,min:Number,arrowOffset:{type:Number,default:1}},computed:{val:{get(){return this.value},set(n){if(this.max!==void 0&&+n>this.max)this.$refs.input.value=this.max;else return n}},labelId(){return`input__label__${this.label}__${Math.random().toString().slice(2,5)}`},labelSpanText(){return this.labelText||this.label}},methods:{update(n){this.handleChange(n.target.value)},handleChange(n){const e={};e[this.label]=n,e.hex===void 0&&e["#"]===void 0?this.$emit("change",e):n.length>5&&this.$emit("change",e)},handleKeyDown(n){let{val:e}=this;const t=Number(e);if(t){const r=this.arrowOffset||1;n.keyCode===38&&(e=t+r,this.handleChange(e),n.preventDefault()),n.keyCode===40&&(e=t-r,this.handleChange(e),n.preventDefault())}}}};const i0={class:"vc-editable-input"},l0=["aria-labelledby"],c0=["id","for"],d0={class:"vc-input__desc"};function u0(n,e,t,r,a,s){return o.openBlock(),o.createElementBlock("div",i0,[o.withDirectives(o.createElementVNode("input",{ref:"input","onUpdate:modelValue":e[0]||(e[0]=i=>s.val=i),"aria-labelledby":s.labelId,class:"vc-input__input",onKeydown:e[1]||(e[1]=(...i)=>s.handleKeyDown&&s.handleKeyDown(...i)),onInput:e[2]||(e[2]=(...i)=>s.update&&s.update(...i))},null,40,l0),[[o.vModelText,s.val]]),o.createElementVNode("span",{id:s.labelId,for:t.label,class:"vc-input__label"},o.toDisplayString(s.labelSpanText),9,c0),o.createElementVNode("span",d0,o.toDisplayString(t.desc),1)])}var h0=".vc-editable-input{position:relative}.vc-input__input{border:0;outline:none;padding:0}.vc-input__label{text-transform:capitalize}";Ga(h0),Za.render=u0,Za.__file="src/components/editable-input/editable-input.vue",Za.install=Ka;function Zi(n,e,t){return e<t?n<e?e:n>t?t:n:n<t?t:n>e?e:n}var Ja={name:"Saturation",props:{value:Object},computed:{colors(){return this.value},bgColor(){return`hsl(${this.colors.hsv.h}, 100%, 50%)`},pointerTop(){return`${-(this.colors.hsv.v*100)+1+100}%`},pointerLeft(){return`${this.colors.hsv.s*100}%`}},methods:{handleChange(n,e){!e&&n.preventDefault();const{container:t}=this.$refs;if(!t)return;const r=t.clientWidth,a=t.clientHeight,s=t.getBoundingClientRect().left+window.pageXOffset,i=t.getBoundingClientRect().top+window.pageYOffset,l=n.pageX||(n.touches?n.touches[0].pageX:0),c=n.pageY||(n.touches?n.touches[0].pageY:0),d=Zi(l-s,0,r),u=Zi(c-i,0,a),h=d/r,p=Zi(-(u/a)+1,0,1);this.onChange({h:this.colors.hsv.h,s:h,v:p,a:this.colors.hsv.a,source:"hsva"})},onChange(n){this.$emit("change",n)},handleMouseDown(n){window.addEventListener("mousemove",this.handleChange),window.addEventListener("mouseup",this.handleChange),window.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp(n){this.unbindEventListeners()},unbindEventListeners(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}}};const p0=o.createElementVNode("div",{class:"vc-saturation--white"},null,-1),f0=o.createElementVNode("div",{class:"vc-saturation--black"},null,-1),m0=[o.createElementVNode("div",{class:"vc-saturation-circle"},null,-1)];function g0(n,e,t,r,a,s){return o.openBlock(),o.createElementBlock("div",{ref:"container",class:"vc-saturation",style:o.normalizeStyle({background:s.bgColor}),onMousedown:e[0]||(e[0]=(...i)=>s.handleMouseDown&&s.handleMouseDown(...i)),onTouchmove:e[1]||(e[1]=(...i)=>s.handleChange&&s.handleChange(...i)),onTouchstart:e[2]||(e[2]=(...i)=>s.handleChange&&s.handleChange(...i))},[p0,f0,o.createElementVNode("div",{class:"vc-saturation-pointer",style:o.normalizeStyle({top:s.pointerTop,left:s.pointerLeft})},m0,4)],36)}var y0=".vc-saturation,.vc-saturation--black,.vc-saturation--white{bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0}.vc-saturation--white{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.vc-saturation--black{background:linear-gradient(0deg,#000,transparent)}.vc-saturation-pointer{cursor:pointer;position:absolute}.vc-saturation-circle{border-radius:50%;box-shadow:0 0 0 1.5px #fff,inset 0 0 1px 1px rgba(0,0,0,.3),0 0 1px 2px rgba(0,0,0,.4);cursor:head;height:4px;transform:translate(-2px,-2px);width:4px}";Ga(y0),Ja.render=g0,Ja.__file="src/components/saturation/saturation.vue",Ja.install=Ka;var es={name:"Hue",props:{value:Object,direction:{type:String,default:"horizontal"}},data(){return{oldHue:0,pullDirection:""}},computed:{colors(){return this.value},directionClass(){return{"vc-hue--horizontal":this.direction==="horizontal","vc-hue--vertical":this.direction==="vertical"}},pointerTop(){return this.direction==="vertical"?this.colors.hsl.h===0&&this.pullDirection==="right"?0:`${-(this.colors.hsl.h*100/360)+100}%`:0},pointerLeft(){return this.direction==="vertical"?0:this.colors.hsl.h===0&&this.pullDirection==="right"?"100%":`${this.colors.hsl.h*100/360}%`}},watch:{value:{handler(n,e){const{h:t}=n.hsl;t!==0&&t-this.oldHue>0&&(this.pullDirection="right"),t!==0&&t-this.oldHue<0&&(this.pullDirection="left"),this.oldHue=t},deep:!0,immediate:!0}},methods:{handleChange(n,e){!e&&n.preventDefault();const{container:t}=this.$refs;if(!t)return;const r=t.clientWidth,a=t.clientHeight,s=t.getBoundingClientRect().left+window.pageXOffset,i=t.getBoundingClientRect().top+window.pageYOffset,l=n.pageX||(n.touches?n.touches[0].pageX:0),c=n.pageY||(n.touches?n.touches[0].pageY:0),d=l-s,u=c-i;let h,p;this.direction==="vertical"?(u<0?h=360:u>a?h=0:(p=-(u*100/a)+100,h=360*p/100),this.colors.hsl.h!==h&&this.$emit("change",{h,s:this.colors.hsl.s,l:this.colors.hsl.l,a:this.colors.hsl.a,source:"hsl"})):(d<0?h=0:d>r?h=360:(p=d*100/r,h=360*p/100),this.colors.hsl.h!==h&&this.$emit("change",{h,s:this.colors.hsl.s,l:this.colors.hsl.l,a:this.colors.hsl.a,source:"hsl"}))},handleMouseDown(n){this.handleChange(n,!0),window.addEventListener("mousemove",this.handleChange),window.addEventListener("mouseup",this.handleChange),window.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp(n){this.unbindEventListeners()},unbindEventListeners(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}}};const b0=["aria-valuenow"],k0=[o.createElementVNode("div",{class:"vc-hue-picker"},null,-1)];function v0(n,e,t,r,a,s){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["vc-hue",[s.directionClass]])},[o.createElementVNode("div",{ref:"container",class:"vc-hue-container",role:"slider","aria-valuenow":s.colors.hsl.h,"aria-valuemin":"0","aria-valuemax":"360",onMousedown:e[0]||(e[0]=(...i)=>s.handleMouseDown&&s.handleMouseDown(...i)),onTouchmove:e[1]||(e[1]=(...i)=>s.handleChange&&s.handleChange(...i)),onTouchstart:e[2]||(e[2]=(...i)=>s.handleChange&&s.handleChange(...i))},[o.createElementVNode("div",{class:"vc-hue-pointer",style:o.normalizeStyle({top:s.pointerTop,left:s.pointerLeft}),role:"presentation"},k0,4)],40,b0)],2)}var w0=".vc-hue{border-radius:2px;bottom:0;left:0;position:absolute;right:0;top:0}.vc-hue--horizontal{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.vc-hue--vertical{background:linear-gradient(0deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.vc-hue-container{cursor:pointer;height:100%;margin:0 2px;position:relative}.vc-hue-pointer{position:absolute;z-index:2}.vc-hue-picker{background:#fff;border-radius:1px;box-shadow:0 0 2px rgba(0,0,0,.6);cursor:pointer;height:8px;margin-top:1px;transform:translateX(-2px);width:4px}";Ga(w0),es.render=v0,es.__file="src/components/hue/hue.vue",es.install=Ka;var ts={name:"Photoshop",components:{Saturation:Ja,Hue:es,EdIn:Za},mixins:[s0],props:{head:{type:String,default:"Color Picker"},disableFields:{type:Boolean,default:!1},hasResetButton:{type:Boolean,default:!1},acceptLabel:{type:String,default:"OK"},cancelLabel:{type:String,default:"Cancel"},resetLabel:{type:String,default:"Reset"},newLabel:{type:String,default:"new"},currentLabel:{type:String,default:"current"}},data(){return{currentColor:"#FFF"}},computed:{hsv(){const{hsv:n}=this.colors;return{h:n.h.toFixed(),s:(n.s*100).toFixed(),v:(n.v*100).toFixed()}},hex(){const{hex:n}=this.colors;return n&&n.replace("#","")}},created(){this.currentColor=this.colors.hex},methods:{childChange(n){this.colorChange(n)},inputChange(n){n&&(n["#"]?this.isValidHex(n["#"])&&this.colorChange({hex:n["#"],source:"hex"}):n.r||n.g||n.b||n.a?this.colorChange({r:n.r||this.colors.rgba.r,g:n.g||this.colors.rgba.g,b:n.b||this.colors.rgba.b,a:n.a||this.colors.rgba.a,source:"rgba"}):(n.h||n.s||n.v)&&this.colorChange({h:n.h||this.colors.hsv.h,s:n.s/100||this.colors.hsv.s,v:n.v/100||this.colors.hsv.v,source:"hsv"}))},clickCurrentColor(){this.colorChange({hex:this.currentColor,source:"hex"})},handleAccept(){this.$emit("ok")},handleCancel(){this.$emit("cancel")},handleReset(){this.$emit("reset")}}};const _0={role:"heading",class:"vc-ps-head"},C0={class:"vc-ps-body"},E0={class:"vc-ps-saturation-wrap"},S0={class:"vc-ps-hue-wrap"},x0=o.createElementVNode("div",{class:"vc-ps-hue-pointer"},[o.createElementVNode("i",{class:"vc-ps-hue-pointer--left"}),o.createElementVNode("i",{class:"vc-ps-hue-pointer--right"})],-1),B0={class:"vc-ps-previews"},T0={class:"vc-ps-previews__label"},$0={class:"vc-ps-previews__swatches"},M0=["aria-label"],D0=["aria-label"],O0={class:"vc-ps-previews__label"},A0={key:0,class:"vc-ps-actions"},I0=["aria-label"],N0=["aria-label"],P0={class:"vc-ps-fields"},L0=o.createElementVNode("div",{class:"vc-ps-fields__divider"},null,-1),z0=o.createElementVNode("div",{class:"vc-ps-fields__divider"},null,-1);function F0(n,e,t,r,a,s){const i=o.resolveComponent("Saturation"),l=o.resolveComponent("Hue"),c=o.resolveComponent("EdIn");return o.openBlock(),o.createElementBlock("div",{role:"application","aria-label":"PhotoShop color picker",class:o.normalizeClass(["vc-photoshop",[t.disableFields?"vc-photoshop__disable-fields":""]])},[o.createElementVNode("div",_0,o.toDisplayString(t.head),1),o.createElementVNode("div",C0,[o.createElementVNode("div",E0,[o.createVNode(i,{value:n.colors,onChange:s.childChange},null,8,["value","onChange"])]),o.createElementVNode("div",S0,[o.createVNode(l,{value:n.colors,direction:"vertical",onChange:s.childChange},{default:o.withCtx(()=>[x0]),_:1},8,["value","onChange"])]),o.createElementVNode("div",{class:o.normalizeClass(["vc-ps-controls",[t.disableFields?"vc-ps-controls__disable-fields":""]])},[o.createElementVNode("div",B0,[o.createElementVNode("div",T0,o.toDisplayString(t.newLabel),1),o.createElementVNode("div",$0,[o.createElementVNode("div",{class:"vc-ps-previews__pr-color","aria-label":`New color is ${n.colors.hex}`,style:o.normalizeStyle({background:n.colors.hex})},null,12,M0),o.createElementVNode("div",{class:"vc-ps-previews__pr-color","aria-label":`Current color is ${a.currentColor}`,style:o.normalizeStyle({background:a.currentColor}),onClick:e[0]||(e[0]=(...d)=>s.clickCurrentColor&&s.clickCurrentColor(...d))},null,12,D0)]),o.createElementVNode("div",O0,o.toDisplayString(t.currentLabel),1)]),t.disableFields?o.createCommentVNode("v-if",!0):(o.openBlock(),o.createElementBlock("div",A0,[o.createElementVNode("div",{class:"vc-ps-ac-btn",role:"button","aria-label":t.acceptLabel,onClick:e[1]||(e[1]=(...d)=>s.handleAccept&&s.handleAccept(...d))},o.toDisplayString(t.acceptLabel),9,I0),o.createElementVNode("div",{class:"vc-ps-ac-btn",role:"button","aria-label":t.cancelLabel,onClick:e[2]||(e[2]=(...d)=>s.handleCancel&&s.handleCancel(...d))},o.toDisplayString(t.cancelLabel),9,N0),o.createElementVNode("div",P0,[o.createCommentVNode(" hsla "),o.createVNode(c,{label:"h",desc:"°",value:s.hsv.h,onChange:s.inputChange},null,8,["value","onChange"]),o.createVNode(c,{label:"s",desc:"%",value:s.hsv.s,max:100,onChange:s.inputChange},null,8,["value","onChange"]),o.createVNode(c,{label:"v",desc:"%",value:s.hsv.v,max:100,onChange:s.inputChange},null,8,["value","onChange"]),L0,o.createCommentVNode(" rgba "),o.createVNode(c,{label:"r",value:n.colors.rgba.r,onChange:s.inputChange},null,8,["value","onChange"]),o.createVNode(c,{label:"g",value:n.colors.rgba.g,onChange:s.inputChange},null,8,["value","onChange"]),o.createVNode(c,{label:"b",value:n.colors.rgba.b,onChange:s.inputChange},null,8,["value","onChange"]),z0,o.createCommentVNode(" hex "),o.createVNode(c,{label:"#",class:"vc-ps-fields__hex",value:s.hex,onChange:s.inputChange},null,8,["value","onChange"])]),t.hasResetButton?(o.openBlock(),o.createElementBlock("div",{key:0,class:"vc-ps-ac-btn","aria-label":"reset",onClick:e[3]||(e[3]=(...d)=>s.handleReset&&s.handleReset(...d))},o.toDisplayString(t.resetLabel),1)):o.createCommentVNode("v-if",!0)]))],2)])],2)}var R0='.vc-photoshop{background:#dcdcdc;border-radius:4px;box-shadow:0 0 0 1px rgba(0,0,0,.25),0 8px 16px rgba(0,0,0,.15);box-sizing:initial;font-family:Roboto;width:513px}.vc-photoshop__disable-fields{width:390px}.vc-ps-head{background-image:linear-gradient(-180deg,#f0f0f0,#d4d4d4);border-bottom:1px solid #b1b1b1;border-radius:4px 4px 0 0;box-shadow:inset 0 1px 0 0 hsla(0,0%,100%,.2),inset 0 -1px 0 0 rgba(0,0,0,.02);color:#4d4d4d;font-size:13px;height:23px;line-height:24px;text-align:center}.vc-ps-body{display:flex;padding:15px}.vc-ps-saturation-wrap{border:2px solid #b3b3b3;border-bottom-color:#f0f0f0;height:256px;overflow:hidden;position:relative;width:256px}.vc-ps-saturation-wrap .vc-saturation-circle{height:12px;width:12px}.vc-ps-hue-wrap{border:2px solid #b3b3b3;border-bottom-color:#f0f0f0;height:256px;margin-left:10px;width:19px}.vc-ps-hue-pointer,.vc-ps-hue-wrap{position:relative}.vc-ps-hue-pointer--left,.vc-ps-hue-pointer--right{border-color:transparent transparent transparent #555;border-style:solid;border-width:5px 0 5px 8px;height:0;position:absolute;width:0}.vc-ps-hue-pointer--left:after,.vc-ps-hue-pointer--right:after{border-color:transparent transparent transparent #fff;border-style:solid;border-width:4px 0 4px 6px;content:"";height:0;left:1px;position:absolute;top:1px;transform:translate(-8px,-5px);width:0}.vc-ps-hue-pointer--left{transform:translate(-13px,-4px)}.vc-ps-hue-pointer--right{transform:translate(20px,-4px) rotate(180deg)}.vc-ps-controls{display:flex;margin-left:10px;width:180px}.vc-ps-controls__disable-fields{width:auto}.vc-ps-actions{flex:1;margin-left:20px}.vc-ps-ac-btn{background-image:linear-gradient(-180deg,#fff,#e6e6e6);border:1px solid #878787;border-radius:2px;box-shadow:0 1px 0 0 #eaeaea;color:#000;cursor:pointer;font-size:14px;height:20px;line-height:20px;margin-bottom:10px;text-align:center}.vc-ps-previews{width:60px}.vc-ps-previews__swatches{border:1px solid #b3b3b3;border-bottom-color:#f0f0f0;margin-bottom:2px;margin-top:1px}.vc-ps-previews__pr-color{box-shadow:inset 1px 0 0 #000,inset -1px 0 0 #000,inset 0 1px 0 #000;height:34px}.vc-ps-previews__label{color:#000;font-size:14px;text-align:center}.vc-ps-fields{padding-bottom:9px;padding-top:5px;position:relative;width:80px}.vc-ps-fields .vc-input__input{border:1px solid #888;box-shadow:inset 0 1px 1px rgba(0,0,0,.1),0 1px 0 0 #ececec;font-size:13px;height:18px;margin-bottom:5px;margin-left:40%;margin-right:10px;padding-left:3px;width:40%}.vc-ps-fields .vc-input__desc,.vc-ps-fields .vc-input__label{font-size:13px;height:18px;line-height:22px;position:absolute;text-transform:uppercase;top:0}.vc-ps-fields .vc-input__label{left:0;width:34px}.vc-ps-fields .vc-input__desc{right:0;width:0}.vc-ps-fields__divider{height:5px}.vc-ps-fields__hex .vc-input__input{border:1px solid #888;box-shadow:inset 0 1px 1px rgba(0,0,0,.1),0 1px 0 0 #ececec;font-size:13px;height:18px;margin-bottom:6px;margin-left:20%;padding-left:3px;width:80%}.vc-ps-fields__hex .vc-input__label{font-size:13px;height:18px;left:0;line-height:22px;position:absolute;text-transform:uppercase;top:0;width:14px}';Ga(R0),ts.render=F0,ts.__file="src/components/photoshop/photoshop.vue",ts.install=Ka;const V0=re(o.defineComponent({__name:"ColorPicker",props:o.mergeModels({label:{},description:{},errorText:{},isError:{type:Boolean},isDisabled:{type:Boolean}},{value:{required:!0},valueModifiers:{}}),emits:["update:value"],setup(n){const e=n,t=o.useModel(n,"value"),r=o.ref(!1),a=o.ref();function s(u){const h=(u||"").replace("#","").toLowerCase();return/^[0-9a-f]{3}$/.test(h)?`#${h[0]}${h[0]}${h[1]}${h[1]}${h[2]}${h[2]}`:/^[0-9a-f]{6}$/.test(h)?`#${h}`:"#000000"}function i(u){const h=(u||"").replace("#","").toLowerCase();return/^[0-9a-f]{3}$/.test(h)||/^[0-9a-f]{6}$/.test(h)}function l(){r.value=!1,t.value=s(t.value)}const c={mask:/^[0-9A-Fa-f]{0,6}$/,lazy:!1,overwrite:!0,prepare:u=>u.toUpperCase()};function d(u){var p;const h=`#${u.toUpperCase()}`;h!==((p=t.value)==null?void 0:p.toUpperCase())&&(t.value=h)}return(u,h)=>(o.openBlock(),o.createBlock(o.unref(Wi),o.mergeProps(e,{isOpen:r.value,"onUpdate:isOpen":h[1]||(h[1]=p=>r.value=p),"dropdown-max-height":192,onClose:l,onClickField:h[2]||(h[2]=()=>r.value=!0),onClickOutsideDropdown:l}),{field:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(u.$style.wrapper)},[o.createVNode(o.unref(zi),o.mergeProps({ref_key:"inputRef",ref:a,value:(t.value??"").replace("#",""),class:u.$style.field},c,{unmask:!0,inputmode:"decimal","onUpdate:masked":d}),null,16,["value","class"]),o.createElementVNode("div",{class:o.normalizeClass(u.$style["color-box-wrapper"])},[o.createVNode(o.unref(Jo),{class:o.normalizeClass(u.$style["color-box"])},{default:o.withCtx(()=>[i(t.value)?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(u.$style["color-box"]),style:o.normalizeStyle({backgroundColor:t.value??""})},null,6)):o.createCommentVNode("",!0)]),_:1},8,["class"]),o.createElementVNode("div",{class:o.normalizeClass(u.$style["color-placeholder"])},null,2)],2)],2)]),dropdown:o.withCtx(()=>[o.createVNode(o.unref(ts),{class:o.normalizeClass(u.$style.picker),modelValue:t.value??"",disableAlpha:!0,disableFields:!0,hasResetButton:!1,"onUpdate:modelValue":h[0]||(h[0]=p=>t.value=p.hex)},null,8,["class","modelValue"])]),_:1},16,["isOpen"]))}}),[["__cssModules",{$style:{picker:"ColorPicker__picker_ec626",wrapper:"ColorPicker__wrapper_87582",field:"ColorPicker__field_825c5","color-box-wrapper":"ColorPicker__color-box-wrapper_79fbe","color-box":"ColorPicker__color-box_0f970","color-placeholder":"ColorPicker__color-placeholder_5b585"}}]]),Ji=re(o.defineComponent({__name:"SkeletonWrapper",props:{isLoading:{type:Boolean,default:!0}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([e.$style.root,{[e.$style["is-loading"]]:e.isLoading}])},[o.renderSlot(e.$slots,"default")],2))}}),[["__cssModules",{$style:{root:"SkeletonWrapper__root_bd4da","is-loading":"SkeletonWrapper__is-loading_848cc",pulse:"SkeletonWrapper__pulse_ab6d7"}}]]),Fr=300,H0=o.defineComponent({__name:"TransitionHeight",setup(n){const e=o.ref(""),t=o.ref("1"),r=o.ref("blur(0px)");let a;function s(){t.value="0",r.value="blur(5px)"}function i(h,p){t.value="1",r.value="blur(0px)",e.value=`${h.scrollHeight}px`,a=setTimeout(p,Fr)}function l(){t.value="",e.value="",r.value=""}function c(h){e.value=`${h.scrollHeight}px`}function d(h,p){t.value="0",t.value="0",a=setTimeout(p,Fr)}const u=o.computed(()=>({height:e.value,opacity:t.value,filter:r.value,overflow:"hidden",transition:`height ${Fr}ms ease, opacity ${Fr}ms ease, filter ${Fr}ms ease`}));return o.onBeforeUnmount(()=>clearTimeout(a)),(h,p)=>(o.openBlock(),o.createElementBlock("div",{style:o.normalizeStyle(u.value)},[o.createVNode(o.Transition,{mode:"out-in",name:"fade-height",onBeforeEnter:s,onEnter:i,onAfterEnter:l,onBeforeLeave:c,onLeave:d},{default:o.withCtx(()=>[o.renderSlot(h.$slots,"default")]),_:3})],4))}}),j0=o.defineComponent({__name:"UserRow",props:{name:{}},emits:["click"],setup(n,{emit:e}){const t=e;return(r,a)=>(o.openBlock(),o.createElementBlock("button",{class:o.normalizeClass(r.$style.root),onClick:a[0]||(a[0]=s=>t("click",s))},[o.createVNode(o.unref(me),{class:o.normalizeClass(r.$style.name),color:"text-common-base-primary-default",size:"subhead"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(r.name),1)]),_:1},8,["class"]),o.createVNode(o.unref($e),{name:"outline-logout",size:"18",color:"icon-button-base-primary"})],2))}}),vh={root:"UserRow__root_4ea1d",name:"UserRow__name_d7172"},Y0=re(j0,[["__cssModules",{$style:vh}]]),U0=re(o.defineComponent({__name:"UserRowSkeleton",setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.$style.root)},[o.createVNode(o.unref($n),{color:"foreground-layout-layout-1-primary",size:"subhead",widthRange:[.6,.8]})],2))}}),[["__cssModules",{$style:vh}]]),W0=re(o.defineComponent({__name:"Container",props:{width:{}},setup(n){const e=o.computed(()=>({...n.width?{maxWidth:`${Hi(Number(n.width))}rem`}:null}));return(t,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(t.$style.root),style:o.normalizeStyle(e.value)},[o.renderSlot(t.$slots,"default")],6))}}),[["__cssModules",{$style:{root:"Container__root_dbd63"}}]]),q0={active:"TransitionSlideRight__active_9b5da","enter-to":"TransitionSlideRight__enter-to_bb3b3","enter-from":"TransitionSlideRight__enter-from_ff31d","leave-from":"TransitionSlideRight__leave-from_d6ba6","leave-to":"TransitionSlideRight__leave-to_32566"},G0={};function K0(n,e){return o.openBlock(),o.createBlock(o.Transition,{name:"slide-right",enterActiveClass:n.$style.active,leaveActiveClass:n.$style.active,enterToClass:n.$style["enter-to"],enterFromClass:n.$style["enter-from"],leaveToClass:n.$style["leave-to"],leaveFromClass:n.$style["leave-from"],appear:""},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},8,["enterActiveClass","leaveActiveClass","enterToClass","enterFromClass","leaveToClass","leaveFromClass"])}const X0=re(G0,[["render",K0],["__cssModules",{$style:q0}]]),Q0={active:"TransitionSlideDown__active_9cd47","enter-to":"TransitionSlideDown__enter-to_291c9","enter-from":"TransitionSlideDown__enter-from_1d067","leave-from":"TransitionSlideDown__leave-from_7c0c5","leave-to":"TransitionSlideDown__leave-to_922c2"},Z0={};function J0(n,e){return o.openBlock(),o.createBlock(o.Transition,{name:"slide-down",enterActiveClass:n.$style.active,leaveActiveClass:n.$style.active,enterToClass:n.$style["enter-to"],enterFromClass:n.$style["enter-from"],leaveToClass:n.$style["leave-to"],leaveFromClass:n.$style["leave-from"],appear:""},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},8,["enterActiveClass","leaveActiveClass","enterToClass","enterFromClass","leaveToClass","leaveFromClass"])}const ek=re(Z0,[["render",J0],["__cssModules",{$style:Q0}]]),tk=re(o.defineComponent({__name:"ToastItem",props:{toast:{}},setup(n){const e=o.computed(()=>n.toast.view??"base"),t=o.computed(()=>n.toast.fontWeight??"regular"),r=o.computed(()=>{if(t.value==="regular")switch(e.value){case"danger":return"outline-warning";default:return"outline-check"}switch(e.value){case"danger":return"filled-warning";default:return"filled-success"}}),a=o.computed(()=>{switch(e.value){case"primary":return"foreground-interactive-button-base-primary";case"base":return"foreground-interactive-button-success-primary";case"danger":return"foreground-interactive-button-critical-primary";default:return"foreground-interactive-button-base-primary"}}),s=o.computed(()=>{switch(e.value){case"primary":return"foreground-interactive-button-base-primary";case"base":return"foreground-interactive-button-success-primary";case"danger":return"foreground-interactive-button-critical-primary";default:return"foreground-interactive-button-base-primary"}});return(i,l)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([i.$style.root,i.$style[`view_${e.value}`]]),onClick:l[0]||(l[0]=c=>i.$emit("click"))},[o.createVNode(o.unref($e),{size:18,name:r.value,color:s.value},null,8,["name","color"]),o.createVNode(o.unref(me),{class:o.normalizeClass(i.$style.title),size:"subhead",color:a.value,align:"left"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(i.toast.title),1)]),_:1},8,["class","color"]),o.createVNode(o.unref($e),{size:18,name:"outline-cross",color:s.value},null,8,["color"])],2))}}),[["__cssModules",{$style:{root:"ToastItem__root_28b92",view_base:"ToastItem__view_base_9bdf3",view_danger:"ToastItem__view_danger_a3871",view_primary:"ToastItem__view_primary_4e69c",title:"ToastItem__title_044bf"}}]]),wh=Symbol("ToasterService"),_h=()=>o.inject(wh,{show:()=>{},showError:()=>{}}),el=5e3,nk=()=>{const n=o.ref([]),e=o.ref({});function t(u,h=el){e.value[u]=setTimeout(()=>{s(u),clearTimeout(e.value[u])},h)}function r(){Object.keys(e.value).forEach((u,h)=>{e.value[u]=setTimeout(()=>{s(+u),clearTimeout(e.value[u])},el+h*300)})}function a(){Object.keys(e.value).forEach(u=>{clearTimeout(e.value[u])})}function s(u){n.value=n.value.filter(h=>h.id!==u)}function i(u){const h=n.value[0]?n.value[0].id+1:1,p={...u,title:u.title,id:h};n.value.length===3&&n.value.pop(),n.value.unshift(p),t(h)}function l(u){clearTimeout(e.value[u]),t(u)}function c(u){i({title:u,view:"base"})}function d(u="Что-то пошло не так"){i({title:u,view:"danger"})}return{list:n,pauseTimeouts:a,restartTimeouts:r,remove:s,show:i,refresh:l,showError:d,showInfo:c}},ok=["id"],rk=re(o.defineComponent({__name:"ToasterProvider",setup(n){let e;const t=nk(),r=o.ref(),a=o.ref([]),s=o.ref(!1),i=o.ref(I()),l=o.ref(I()),c=o.ref(I()),d=o.ref(I());function u(b){const D=document.getElementById(`${b}`);if(!D)return;const Y=getComputedStyle(D).transform,K=Y==="none"?"":Y;D.style.transformOrigin="50% 50%",D.animate([{transform:`${K} scale(1)`},{transform:`${K} scale(1.05)`,offset:.3},{transform:`${K} scale(1)`}],{duration:300,easing:"cubic-bezier(0.22, 1, 0.36, 1)"})}function h(b){return typeof b=="string"?{title:b,view:"base",fontWeight:"regular"}:b}function p(b){return typeof b=="string"?{title:b,view:"danger",fontWeight:"regular"}:b}function m(b){const D=h(b),Y=t.list.value[0];if(Y&&Y.title===D.title&&Y.view===D.view){u(Y.id),s.value||t.refresh(Y.id);return}t.show(D)}function f(b){const D=p(b),Y=t.list.value[0];if(Y&&Y.title===D.title&&Y.view===D.view){u(Y.id),s.value||t.refresh(Y.id);return}t.showError(b)}o.provide(wh,{show:m,showError:f});function g(b){const D=O(b);return{toaster:{transform:i.value[D]},body:{transform:l.value[D]},left:{transform:c.value[D]},right:{transform:d.value[D]}}}function x(b,D){(D!=="main"||i.value.main.length)&&(i.value[D]=b.mainTranslate),l.value[D]=b.scale,c.value[D]=b.leftTranslate,d.value[D]=b.rightTranslate}function E(){let D=0,Y=0;a.value.sort(P).forEach((K,w)=>{const k=O(w),_=v(`${D}px`);x(_,k),D+=K.clientHeight+12,Y=Math.max(Y,K.clientWidth)}),r.value.style.height=`${D}px`,r.value.style.width=`${Y}px`}function C(){o.nextTick(()=>{const[b,D,Y]=a.value.sort(P),K=v("0");if(x(K,"main"),D){const w=M({mainElement:b,element:D,translateY:"-15%",index:1});x(w,"second")}if(Y){const w=M({mainElement:b,element:Y,translateY:"-30%",index:2});x(w,"third"),o.nextTick(()=>{var _;const k=(_=r.value)==null?void 0:_.querySelector(".toaster-leave-active");if(k){const A=M({mainElement:b,element:k,translateY:"45%",index:3});k.setAttribute("style",`transform: ${A.mainTranslate};`),k.children[1].setAttribute("style",`transform: ${A.scale};`),k.children[0].setAttribute("style",`transform: ${A.leftTranslate};`),k.children[2].setAttribute("style",`transform: ${A.rightTranslate};`),k.children[4].setAttribute("style",`transform: ${A.scale};`),k.children[3].setAttribute("style",`transform: ${A.leftTranslate};`),k.children[5].setAttribute("style",`transform: ${A.rightTranslate};`)}})}})}function T(b){s.value&&(t==null||t.remove(b),E())}function F(){!s.value&&(t!=null&&t.list.value)&&t.list.value.length>1?(s.value=!0,t==null||t.pauseTimeouts(),E(),e=setTimeout(()=>{s.value=!1,C(),r.value.style.height="auto",r.value.style.width="auto",t==null||t.restartTimeouts(),clearTimeout(e)},el)):t!=null&&t.list.value[0]&&!s.value&&(t==null||t.remove(t==null?void 0:t.list.value[0].id))}o.watch(t==null?void 0:t.list,()=>{s.value?E():C()},{deep:!0});function I(){return{main:"",second:"",third:""}}function O(b){switch(b){case 0:return"main";case 1:return"second";default:return"third"}}function P(b,D){return Number(D.id)-Number(b.id)}function M({mainElement:b,element:D,translateY:Y,index:K}){const w=D.getBoundingClientRect(),k=b.getBoundingClientRect(),_=k.height/w.height,A=(k.width-10*K)/w.width,N=(w.width-A*w.width)/2;return{mainTranslate:`translateY(${Y}) translateX(-50%)`,scale:`scale(${A}, ${_})`,leftTranslate:`translateX(${N-16}px)`,rightTranslate:`translateX(${-N+16}px)`}}function v(b){return{mainTranslate:`translateY(${b}) translateX(-50%)`,scale:"scale(1, 1)",leftTranslate:"translateX(-16px)",rightTranslate:"translateX(16px)"}}return(b,D)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",{ref_key:"rootRef",ref:r,class:o.normalizeClass([b.$style.root,s.value&&b.$style["is-expand"]]),onClick:F},[o.createVNode(o.TransitionGroup,{tag:"div",enterFromClass:b.$style["toaster-enter-from"],enterToClass:b.$style["toaster-enter-to"],enterActiveClass:b.$style["toaster-enter-active"],leaveFromClass:b.$style["toaster-leave-from"],leaveToClass:b.$style["toaster-leave-to"],leaveActiveClass:b.$style["toaster-leave-active"]},{default:o.withCtx(()=>{var Y;return[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList((Y=o.unref(t))==null?void 0:Y.list.value,(K,w)=>(o.openBlock(),o.createElementBlock("div",{key:K.id,id:`${K.id}`,ref_for:!0,ref_key:"toastersRef",ref:a,class:o.normalizeClass([b.$style.toaster,b.$style[`view_${K.view??"success"}`],s.value?"is-expand":""]),style:o.normalizeStyle(g(w).toaster)},[o.createElementVNode("div",{class:o.normalizeClass(b.$style.left),style:o.normalizeStyle(g(w).left)},null,6),o.createElementVNode("div",{class:o.normalizeClass(b.$style.body),style:o.normalizeStyle(g(w).body)},[o.createVNode(tk,{toast:K,onClick:()=>T(K.id)},null,8,["toast","onClick"])],6),o.createElementVNode("div",{class:o.normalizeClass(b.$style.right),style:o.normalizeStyle(g(w).right)},null,6),o.createElementVNode("div",{class:o.normalizeClass([b.$style.left,b.$style.shadow]),style:o.normalizeStyle(g(w).left)},null,6),o.createElementVNode("div",{class:o.normalizeClass([b.$style.body,b.$style.shadow]),style:o.normalizeStyle(g(w).body)},null,6),o.createElementVNode("div",{class:o.normalizeClass([b.$style.right,b.$style.shadow]),style:o.normalizeStyle(g(w).right)},null,6)],14,ok))),128))]}),_:1},8,["enterFromClass","enterToClass","enterActiveClass","leaveFromClass","leaveToClass","leaveActiveClass"])],2),o.renderSlot(b.$slots,"default")],64))}}),[["__cssModules",{$style:{"toaster-enter-from":"Toaster__toaster-enter-from_17da7","toaster-enter":"Toaster__toaster-enter_e581f","toaster-enter-to":"Toaster__toaster-enter-to_16982","toaster-enter-active":"Toaster__toaster-enter-active_1379d","toaster-leave-active":"Toaster__toaster-leave-active_67be8","toaster-leave-from":"Toaster__toaster-leave-from_3a609","toaster-leave":"Toaster__toaster-leave_73bfe","toaster-leave-to":"Toaster__toaster-leave-to_40e38",root:"Toaster__root_0fa74","is-expand":"Toaster__is-expand_fa3c7",toaster:"Toaster__toaster_4393e",body:"Toaster__body_a5423",view_base:"Toaster__view_base_dd200",left:"Toaster__left_8ebe2",right:"Toaster__right_54317",view_danger:"Toaster__view_danger_3f3ca",view_primary:"Toaster__view_primary_26e5e",shadow:"Toaster__shadow_be9a8"}}]]),Ch=6048e5,ak=864e5,sk=6e4,Eh=36e5,ik=1e3,Sh=Symbol.for("constructDateFrom");function Ue(n,e){return typeof n=="function"?n(e):n&&typeof n=="object"&&Sh in n?n[Sh](e):n instanceof Date?new n.constructor(e):new Date(e)}function we(n,e){return Ue(e||n,n)}function Xt(n,e,t){const r=we(n,t==null?void 0:t.in);return isNaN(e)?Ue((t==null?void 0:t.in)||n,NaN):(e&&r.setDate(r.getDate()+e),r)}function rn(n,e,t){const r=we(n,t==null?void 0:t.in);if(isNaN(e))return Ue(n,NaN);if(!e)return r;const a=r.getDate(),s=Ue(n,r.getTime());s.setMonth(r.getMonth()+e+1,0);const i=s.getDate();return a>=i?s:(r.setFullYear(s.getFullYear(),s.getMonth(),a),r)}function xh(n,e,t){const{years:r=0,months:a=0,weeks:s=0,days:i=0,hours:l=0,minutes:c=0,seconds:d=0}=e,u=we(n,t==null?void 0:t.in),h=a||r?rn(u,a+r*12):u,p=i||s?Xt(h,i+s*7):h,m=c+l*60,g=(d+m*60)*1e3;return Ue(n,+p+g)}function lk(n,e,t){return Ue(n,+we(n)+e)}function ck(n,e,t){return lk(n,e*Eh)}let dk={};function Bo(){return dk}function an(n,e){var l,c,d,u;const t=Bo(),r=(e==null?void 0:e.weekStartsOn)??((c=(l=e==null?void 0:e.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??t.weekStartsOn??((u=(d=t.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??0,a=we(n,e==null?void 0:e.in),s=a.getDay(),i=(s<r?7:0)+s-r;return a.setDate(a.getDate()-i),a.setHours(0,0,0,0),a}function er(n,e){return an(n,{...e,weekStartsOn:1})}function Bh(n,e){const t=we(n,e==null?void 0:e.in),r=t.getFullYear(),a=Ue(t,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const s=er(a),i=Ue(t,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const l=er(i);return t.getTime()>=s.getTime()?r+1:t.getTime()>=l.getTime()?r:r-1}function ns(n){const e=we(n),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+n-+t}function Rr(n,...e){const t=Ue.bind(null,e.find(r=>typeof r=="object"));return e.map(t)}function Th(n,e){const t=we(n,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}function $h(n,e,t){const[r,a]=Rr(t==null?void 0:t.in,n,e),s=Th(r),i=Th(a),l=+s-ns(s),c=+i-ns(i);return Math.round((l-c)/ak)}function uk(n,e){const t=Bh(n,e),r=Ue(n,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),er(r)}function hk(n,e,t){return rn(n,e*3,t)}function tl(n,e,t){return rn(n,e*12,t)}function Mh(n,e){const t=+we(n)-+we(e);return t<0?-1:t>0?1:t}function Dh(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function Vr(n){return!(!Dh(n)&&typeof n!="number"||isNaN(+we(n)))}function Oh(n,e){const t=we(n,e==null?void 0:e.in);return Math.trunc(t.getMonth()/3)+1}function pk(n,e,t){const[r,a]=Rr(t==null?void 0:t.in,n,e);return r.getFullYear()-a.getFullYear()}function fk(n,e,t){const[r,a]=Rr(t==null?void 0:t.in,n,e),s=Mh(r,a),i=Math.abs(pk(r,a));r.setFullYear(1584),a.setFullYear(1584);const l=Mh(r,a)===-s,c=s*(i-+l);return c===0?0:c}function Ah(n,e){const[t,r]=Rr(n,e.start,e.end);return{start:t,end:r}}function Ih(n,e){const{start:t,end:r}=Ah(e==null?void 0:e.in,n);let a=+t>+r;const s=a?+t:+r,i=a?r:t;i.setHours(0,0,0,0);let l=1;const c=[];for(;+i<=s;)c.push(Ue(t,i)),i.setDate(i.getDate()+l),i.setHours(0,0,0,0);return a?c.reverse():c}function To(n,e){const t=we(n,e==null?void 0:e.in),r=t.getMonth(),a=r-r%3;return t.setMonth(a,1),t.setHours(0,0,0,0),t}function mk(n,e){const{start:t,end:r}=Ah(e==null?void 0:e.in,n);let a=+t>+r;const s=a?+To(t):+To(r);let i=To(a?r:t),l=1;const c=[];for(;+i<=s;)c.push(Ue(t,i)),i=hk(i,l);return a?c.reverse():c}function gk(n,e){const t=we(n,e==null?void 0:e.in);return t.setDate(1),t.setHours(0,0,0,0),t}function Nh(n,e){const t=we(n,e==null?void 0:e.in),r=t.getFullYear();return t.setFullYear(r+1,0,0),t.setHours(23,59,59,999),t}function Hr(n,e){const t=we(n,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}function Ph(n,e){var l,c,d,u;const t=Bo(),r=(e==null?void 0:e.weekStartsOn)??((c=(l=e==null?void 0:e.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??t.weekStartsOn??((u=(d=t.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??0,a=we(n,e==null?void 0:e.in),s=a.getDay(),i=(s<r?-7:0)+6-(s-r);return a.setDate(a.getDate()+i),a.setHours(23,59,59,999),a}function Lh(n,e){const t=we(n,e==null?void 0:e.in),r=t.getMonth(),a=r-r%3+3;return t.setMonth(a,0),t.setHours(23,59,59,999),t}const yk={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"}},bk=(n,e,t)=>{let r;const a=yk[n];return typeof a=="string"?r=a:e===1?r=a.one:r=a.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+r:r+" ago":r};function nl(n){return(e={})=>{const t=e.width?String(e.width):n.defaultWidth;return n.formats[t]||n.formats[n.defaultWidth]}}const kk={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},vk={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},wk={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},_k={date:nl({formats:kk,defaultWidth:"full"}),time:nl({formats:vk,defaultWidth:"full"}),dateTime:nl({formats:wk,defaultWidth:"full"})},Ck={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ek=(n,e,t,r)=>Ck[n];function jr(n){return(e,t)=>{const r=t!=null&&t.context?String(t.context):"standalone";let a;if(r==="formatting"&&n.formattingValues){const i=n.defaultFormattingWidth||n.defaultWidth,l=t!=null&&t.width?String(t.width):i;a=n.formattingValues[l]||n.formattingValues[i]}else{const i=n.defaultWidth,l=t!=null&&t.width?String(t.width):n.defaultWidth;a=n.values[l]||n.values[i]}const s=n.argumentCallback?n.argumentCallback(e):e;return a[s]}}const Sk={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},xk={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Bk={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"]},Tk={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"]},$k={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"}},Mk={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"}},Dk={ordinalNumber:(n,e)=>{const t=Number(n),r=t%100;if(r>20||r<10)switch(r%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},era:jr({values:Sk,defaultWidth:"wide"}),quarter:jr({values:xk,defaultWidth:"wide",argumentCallback:n=>n-1}),month:jr({values:Bk,defaultWidth:"wide"}),day:jr({values:Tk,defaultWidth:"wide"}),dayPeriod:jr({values:$k,defaultWidth:"wide",formattingValues:Mk,defaultFormattingWidth:"wide"})};function Yr(n){return(e,t={})=>{const r=t.width,a=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],s=e.match(a);if(!s)return null;const i=s[0],l=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],c=Array.isArray(l)?Ak(l,h=>h.test(i)):Ok(l,h=>h.test(i));let d;d=n.valueCallback?n.valueCallback(c):c,d=t.valueCallback?t.valueCallback(d):d;const u=e.slice(i.length);return{value:d,rest:u}}}function Ok(n,e){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&e(n[t]))return t}function Ak(n,e){for(let t=0;t<n.length;t++)if(e(n[t]))return t}function Ik(n){return(e,t={})=>{const r=e.match(n.matchPattern);if(!r)return null;const a=r[0],s=e.match(n.parsePattern);if(!s)return null;let i=n.valueCallback?n.valueCallback(s[0]):s[0];i=t.valueCallback?t.valueCallback(i):i;const l=e.slice(a.length);return{value:i,rest:l}}}const Nk=/^(\d+)(th|st|nd|rd)?/i,Pk=/\d+/i,Lk={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},zk={any:[/^b/i,/^(a|c)/i]},Fk={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Rk={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},Hk={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]},jk={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},Yk={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]},Uk={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},Wk={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}},qk={ordinalNumber:Ik({matchPattern:Nk,parsePattern:Pk,valueCallback:n=>parseInt(n,10)}),era:Yr({matchPatterns:Lk,defaultMatchWidth:"wide",parsePatterns:zk,defaultParseWidth:"any"}),quarter:Yr({matchPatterns:Fk,defaultMatchWidth:"wide",parsePatterns:Rk,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Yr({matchPatterns:Vk,defaultMatchWidth:"wide",parsePatterns:Hk,defaultParseWidth:"any"}),day:Yr({matchPatterns:jk,defaultMatchWidth:"wide",parsePatterns:Yk,defaultParseWidth:"any"}),dayPeriod:Yr({matchPatterns:Uk,defaultMatchWidth:"any",parsePatterns:Wk,defaultParseWidth:"any"})},zh={code:"en-US",formatDistance:bk,formatLong:_k,formatRelative:Ek,localize:Dk,match:qk,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Gk(n,e){const t=we(n,e==null?void 0:e.in);return $h(t,Hr(t))+1}function ol(n,e){const t=we(n,e==null?void 0:e.in),r=+er(t)-+uk(t);return Math.round(r/Ch)+1}function rl(n,e){var u,h,p,m;const t=we(n,e==null?void 0:e.in),r=t.getFullYear(),a=Bo(),s=(e==null?void 0:e.firstWeekContainsDate)??((h=(u=e==null?void 0:e.locale)==null?void 0:u.options)==null?void 0:h.firstWeekContainsDate)??a.firstWeekContainsDate??((m=(p=a.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)??1,i=Ue((e==null?void 0:e.in)||n,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const l=an(i,e),c=Ue((e==null?void 0:e.in)||n,0);c.setFullYear(r,0,s),c.setHours(0,0,0,0);const d=an(c,e);return+t>=+l?r+1:+t>=+d?r:r-1}function Kk(n,e){var l,c,d,u;const t=Bo(),r=(e==null?void 0:e.firstWeekContainsDate)??((c=(l=e==null?void 0:e.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??t.firstWeekContainsDate??((u=(d=t.locale)==null?void 0:d.options)==null?void 0:u.firstWeekContainsDate)??1,a=rl(n,e),s=Ue((e==null?void 0:e.in)||n,0);return s.setFullYear(a,0,r),s.setHours(0,0,0,0),an(s,e)}function al(n,e){const t=we(n,e==null?void 0:e.in),r=+an(t,e)-+Kk(t,e);return Math.round(r/Ch)+1}function We(n,e){const t=n<0?"-":"",r=Math.abs(n).toString().padStart(e,"0");return t+r}const no={y(n,e){const t=n.getFullYear(),r=t>0?t:1-t;return We(e==="yy"?r%100:r,e.length)},M(n,e){const t=n.getMonth();return e==="M"?String(t+1):We(t+1,2)},d(n,e){return We(n.getDate(),e.length)},a(n,e){const t=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(n,e){return We(n.getHours()%12||12,e.length)},H(n,e){return We(n.getHours(),e.length)},m(n,e){return We(n.getMinutes(),e.length)},s(n,e){return We(n.getSeconds(),e.length)},S(n,e){const t=e.length,r=n.getMilliseconds(),a=Math.trunc(r*Math.pow(10,t-3));return We(a,e.length)}},tr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Fh={G:function(n,e,t){const r=n.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(r,{width:"abbreviated"});case"GGGGG":return t.era(r,{width:"narrow"});case"GGGG":default:return t.era(r,{width:"wide"})}},y:function(n,e,t){if(e==="yo"){const r=n.getFullYear(),a=r>0?r:1-r;return t.ordinalNumber(a,{unit:"year"})}return no.y(n,e)},Y:function(n,e,t,r){const a=rl(n,r),s=a>0?a:1-a;if(e==="YY"){const i=s%100;return We(i,2)}return e==="Yo"?t.ordinalNumber(s,{unit:"year"}):We(s,e.length)},R:function(n,e){const t=Bh(n);return We(t,e.length)},u:function(n,e){const t=n.getFullYear();return We(t,e.length)},Q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return We(r,2);case"Qo":return t.ordinalNumber(r,{unit:"quarter"});case"QQQ":return t.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return We(r,2);case"qo":return t.ordinalNumber(r,{unit:"quarter"});case"qqq":return t.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,e,t){const r=n.getMonth();switch(e){case"M":case"MM":return no.M(n,e);case"Mo":return t.ordinalNumber(r+1,{unit:"month"});case"MMM":return t.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(r,{width:"wide",context:"formatting"})}},L:function(n,e,t){const r=n.getMonth();switch(e){case"L":return String(r+1);case"LL":return We(r+1,2);case"Lo":return t.ordinalNumber(r+1,{unit:"month"});case"LLL":return t.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(r,{width:"wide",context:"standalone"})}},w:function(n,e,t,r){const a=al(n,r);return e==="wo"?t.ordinalNumber(a,{unit:"week"}):We(a,e.length)},I:function(n,e,t){const r=ol(n);return e==="Io"?t.ordinalNumber(r,{unit:"week"}):We(r,e.length)},d:function(n,e,t){return e==="do"?t.ordinalNumber(n.getDate(),{unit:"date"}):no.d(n,e)},D:function(n,e,t){const r=Gk(n);return e==="Do"?t.ordinalNumber(r,{unit:"dayOfYear"}):We(r,e.length)},E:function(n,e,t){const r=n.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(r,{width:"short",context:"formatting"});case"EEEE":default:return t.day(r,{width:"wide",context:"formatting"})}},e:function(n,e,t,r){const a=n.getDay(),s=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return We(s,2);case"eo":return t.ordinalNumber(s,{unit:"day"});case"eee":return t.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(a,{width:"short",context:"formatting"});case"eeee":default:return t.day(a,{width:"wide",context:"formatting"})}},c:function(n,e,t,r){const a=n.getDay(),s=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return We(s,e.length);case"co":return t.ordinalNumber(s,{unit:"day"});case"ccc":return t.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(a,{width:"narrow",context:"standalone"});case"cccccc":return t.day(a,{width:"short",context:"standalone"});case"cccc":default:return t.day(a,{width:"wide",context:"standalone"})}},i:function(n,e,t){const r=n.getDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return We(a,e.length);case"io":return t.ordinalNumber(a,{unit:"day"});case"iii":return t.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(r,{width:"short",context:"formatting"});case"iiii":default:return t.day(r,{width:"wide",context:"formatting"})}},a:function(n,e,t){const a=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(n,e,t){const r=n.getHours();let a;switch(r===12?a=tr.noon:r===0?a=tr.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(n,e,t){const r=n.getHours();let a;switch(r>=17?a=tr.evening:r>=12?a=tr.afternoon:r>=4?a=tr.morning:a=tr.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(n,e,t){if(e==="ho"){let r=n.getHours()%12;return r===0&&(r=12),t.ordinalNumber(r,{unit:"hour"})}return no.h(n,e)},H:function(n,e,t){return e==="Ho"?t.ordinalNumber(n.getHours(),{unit:"hour"}):no.H(n,e)},K:function(n,e,t){const r=n.getHours()%12;return e==="Ko"?t.ordinalNumber(r,{unit:"hour"}):We(r,e.length)},k:function(n,e,t){let r=n.getHours();return r===0&&(r=24),e==="ko"?t.ordinalNumber(r,{unit:"hour"}):We(r,e.length)},m:function(n,e,t){return e==="mo"?t.ordinalNumber(n.getMinutes(),{unit:"minute"}):no.m(n,e)},s:function(n,e,t){return e==="so"?t.ordinalNumber(n.getSeconds(),{unit:"second"}):no.s(n,e)},S:function(n,e){return no.S(n,e)},X:function(n,e,t){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return Vh(r);case"XXXX":case"XX":return $o(r);case"XXXXX":case"XXX":default:return $o(r,":")}},x:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"x":return Vh(r);case"xxxx":case"xx":return $o(r);case"xxxxx":case"xxx":default:return $o(r,":")}},O:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Rh(r,":");case"OOOO":default:return"GMT"+$o(r,":")}},z:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Rh(r,":");case"zzzz":default:return"GMT"+$o(r,":")}},t:function(n,e,t){const r=Math.trunc(+n/1e3);return We(r,e.length)},T:function(n,e,t){return We(+n,e.length)}};function Rh(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),a=Math.trunc(r/60),s=r%60;return s===0?t+String(a):t+String(a)+e+We(s,2)}function Vh(n,e){return n%60===0?(n>0?"-":"+")+We(Math.abs(n)/60,2):$o(n,e)}function $o(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),a=We(Math.trunc(r/60),2),s=We(r%60,2);return t+a+e+s}const Hh=(n,e)=>{switch(n){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},jh=(n,e)=>{switch(n){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},sl={p:jh,P:(n,e)=>{const t=n.match(/(P+)(p+)?/)||[],r=t[1],a=t[2];if(!a)return Hh(n,e);let s;switch(r){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",Hh(r,e)).replace("{{time}}",jh(a,e))}},Xk=/^D+$/,Qk=/^Y+$/,Zk=["D","DD","YY","YYYY"];function Yh(n){return Xk.test(n)}function Uh(n){return Qk.test(n)}function il(n,e,t){const r=Jk(n,e,t);if(console.warn(r),Zk.includes(n))throw new RangeError(r)}function Jk(n,e,t){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${e}\`) for formatting ${r} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const ev=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tv=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,nv=/^'([^]*?)'?$/,ov=/''/g,rv=/[a-zA-Z]/;function bn(n,e,t){var u,h,p,m,f,g,x,E;const r=Bo(),a=(t==null?void 0:t.locale)??r.locale??zh,s=(t==null?void 0:t.firstWeekContainsDate)??((h=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:h.firstWeekContainsDate)??r.firstWeekContainsDate??((m=(p=r.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)??1,i=(t==null?void 0:t.weekStartsOn)??((g=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((E=(x=r.locale)==null?void 0:x.options)==null?void 0:E.weekStartsOn)??0,l=we(n,t==null?void 0:t.in);if(!Vr(l))throw new RangeError("Invalid time value");let c=e.match(tv).map(C=>{const T=C[0];if(T==="p"||T==="P"){const F=sl[T];return F(C,a.formatLong)}return C}).join("").match(ev).map(C=>{if(C==="''")return{isToken:!1,value:"'"};const T=C[0];if(T==="'")return{isToken:!1,value:av(C)};if(Fh[T])return{isToken:!0,value:C};if(T.match(rv))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");return{isToken:!1,value:C}});a.localize.preprocessor&&(c=a.localize.preprocessor(l,c));const d={firstWeekContainsDate:s,weekStartsOn:i,locale:a};return c.map(C=>{if(!C.isToken)return C.value;const T=C.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&Uh(T)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&Yh(T))&&il(T,e,String(n));const F=Fh[T[0]];return F(l,T,a.localize,d)}).join("")}function av(n){const e=n.match(nv);return e?e[1].replace(ov,"'"):n}function sv(n,e){return we(n,e==null?void 0:e.in).getDay()}function iv(n,e){const t=we(n,e==null?void 0:e.in),r=t.getFullYear(),a=t.getMonth(),s=Ue(t,0);return s.setFullYear(r,a+1,0),s.setHours(0,0,0,0),s.getDate()}function lv(){return Object.assign({},Bo())}function Ln(n,e){return we(n,e==null?void 0:e.in).getHours()}function cv(n,e){const t=we(n,e==null?void 0:e.in).getDay();return t===0?7:t}function oo(n,e){return we(n,e==null?void 0:e.in).getMinutes()}function Pe(n,e){return we(n,e==null?void 0:e.in).getMonth()}function nr(n){return we(n).getSeconds()}function Te(n,e){return we(n,e==null?void 0:e.in).getFullYear()}function Mo(n,e){return+we(n)>+we(e)}function or(n,e){return+we(n)<+we(e)}function rr(n,e){return+we(n)==+we(e)}function dv(n,e){const t=uv(e)?new e(0):Ue(e,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),t}function uv(n){var e;return typeof n=="function"&&((e=n.prototype)==null?void 0:e.constructor)===n}const hv=10;class Wh{constructor(){pe(this,"subPriority",0)}validate(e,t){return!0}}class pv extends Wh{constructor(e,t,r,a,s){super(),this.value=e,this.validateValue=t,this.setValue=r,this.priority=a,s&&(this.subPriority=s)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,r){return this.setValue(e,t,this.value,r)}}class fv extends Wh{constructor(t,r){super();pe(this,"priority",hv);pe(this,"subPriority",-1);this.context=t||(a=>Ue(r,a))}set(t,r){return r.timestampIsSet?t:Ue(t,dv(t,this.context))}}class je{run(e,t,r,a){const s=this.parse(e,t,r,a);return s?{setter:new pv(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(e,t,r){return!0}}class mv extends je{constructor(){super(...arguments);pe(this,"priority",140);pe(this,"incompatibleTokens",["R","u","t","T"])}parse(t,r,a){switch(r){case"G":case"GG":case"GGG":return a.era(t,{width:"abbreviated"})||a.era(t,{width:"narrow"});case"GGGGG":return a.era(t,{width:"narrow"});case"GGGG":default:return a.era(t,{width:"wide"})||a.era(t,{width:"abbreviated"})||a.era(t,{width:"narrow"})}}set(t,r,a){return r.era=a,t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}}const lt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},kn={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function ct(n,e){return n&&{value:e(n.value),rest:n.rest}}function et(n,e){const t=e.match(n);return t?{value:parseInt(t[0],10),rest:e.slice(t[0].length)}:null}function vn(n,e){const t=e.match(n);if(!t)return null;if(t[0]==="Z")return{value:0,rest:e.slice(1)};const r=t[1]==="+"?1:-1,a=t[2]?parseInt(t[2],10):0,s=t[3]?parseInt(t[3],10):0,i=t[5]?parseInt(t[5],10):0;return{value:r*(a*Eh+s*sk+i*ik),rest:e.slice(t[0].length)}}function qh(n){return et(lt.anyDigitsSigned,n)}function at(n,e){switch(n){case 1:return et(lt.singleDigit,e);case 2:return et(lt.twoDigits,e);case 3:return et(lt.threeDigits,e);case 4:return et(lt.fourDigits,e);default:return et(new RegExp("^\\d{1,"+n+"}"),e)}}function os(n,e){switch(n){case 1:return et(lt.singleDigitSigned,e);case 2:return et(lt.twoDigitsSigned,e);case 3:return et(lt.threeDigitsSigned,e);case 4:return et(lt.fourDigitsSigned,e);default:return et(new RegExp("^-?\\d{1,"+n+"}"),e)}}function ll(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Gh(n,e){const t=e>0,r=t?e:1-e;let a;if(r<=50)a=n||100;else{const s=r+50,i=Math.trunc(s/100)*100,l=n>=s%100;a=n+i-(l?100:0)}return t?a:1-a}function Kh(n){return n%400===0||n%4===0&&n%100!==0}class gv extends je{constructor(){super(...arguments);pe(this,"priority",130);pe(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,r,a){const s=i=>({year:i,isTwoDigitYear:r==="yy"});switch(r){case"y":return ct(at(4,t),s);case"yo":return ct(a.ordinalNumber(t,{unit:"year"}),s);default:return ct(at(r.length,t),s)}}validate(t,r){return r.isTwoDigitYear||r.year>0}set(t,r,a){const s=t.getFullYear();if(a.isTwoDigitYear){const l=Gh(a.year,s);return t.setFullYear(l,0,1),t.setHours(0,0,0,0),t}const i=!("era"in r)||r.era===1?a.year:1-a.year;return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}class yv extends je{constructor(){super(...arguments);pe(this,"priority",130);pe(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,r,a){const s=i=>({year:i,isTwoDigitYear:r==="YY"});switch(r){case"Y":return ct(at(4,t),s);case"Yo":return ct(a.ordinalNumber(t,{unit:"year"}),s);default:return ct(at(r.length,t),s)}}validate(t,r){return r.isTwoDigitYear||r.year>0}set(t,r,a,s){const i=rl(t,s);if(a.isTwoDigitYear){const c=Gh(a.year,i);return t.setFullYear(c,0,s.firstWeekContainsDate),t.setHours(0,0,0,0),an(t,s)}const l=!("era"in r)||r.era===1?a.year:1-a.year;return t.setFullYear(l,0,s.firstWeekContainsDate),t.setHours(0,0,0,0),an(t,s)}}class bv extends je{constructor(){super(...arguments);pe(this,"priority",130);pe(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,r){return os(r==="R"?4:r.length,t)}set(t,r,a){const s=Ue(t,0);return s.setFullYear(a,0,4),s.setHours(0,0,0,0),er(s)}}class kv extends je{constructor(){super(...arguments);pe(this,"priority",130);pe(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,r){return os(r==="u"?4:r.length,t)}set(t,r,a){return t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}}class vv extends je{constructor(){super(...arguments);pe(this,"priority",120);pe(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,r,a){switch(r){case"Q":case"QQ":return at(r.length,t);case"Qo":return a.ordinalNumber(t,{unit:"quarter"});case"QQQ":return a.quarter(t,{width:"abbreviated",context:"formatting"})||a.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return a.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(t,{width:"wide",context:"formatting"})||a.quarter(t,{width:"abbreviated",context:"formatting"})||a.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,r){return r>=1&&r<=4}set(t,r,a){return t.setMonth((a-1)*3,1),t.setHours(0,0,0,0),t}}class wv extends je{constructor(){super(...arguments);pe(this,"priority",120);pe(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,r,a){switch(r){case"q":case"qq":return at(r.length,t);case"qo":return a.ordinalNumber(t,{unit:"quarter"});case"qqq":return a.quarter(t,{width:"abbreviated",context:"standalone"})||a.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return a.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(t,{width:"wide",context:"standalone"})||a.quarter(t,{width:"abbreviated",context:"standalone"})||a.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,r){return r>=1&&r<=4}set(t,r,a){return t.setMonth((a-1)*3,1),t.setHours(0,0,0,0),t}}class _v extends je{constructor(){super(...arguments);pe(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);pe(this,"priority",110)}parse(t,r,a){const s=i=>i-1;switch(r){case"M":return ct(et(lt.month,t),s);case"MM":return ct(at(2,t),s);case"Mo":return ct(a.ordinalNumber(t,{unit:"month"}),s);case"MMM":return a.month(t,{width:"abbreviated",context:"formatting"})||a.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return a.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(t,{width:"wide",context:"formatting"})||a.month(t,{width:"abbreviated",context:"formatting"})||a.month(t,{width:"narrow",context:"formatting"})}}validate(t,r){return r>=0&&r<=11}set(t,r,a){return t.setMonth(a,1),t.setHours(0,0,0,0),t}}class Cv extends je{constructor(){super(...arguments);pe(this,"priority",110);pe(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,r,a){const s=i=>i-1;switch(r){case"L":return ct(et(lt.month,t),s);case"LL":return ct(at(2,t),s);case"Lo":return ct(a.ordinalNumber(t,{unit:"month"}),s);case"LLL":return a.month(t,{width:"abbreviated",context:"standalone"})||a.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return a.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(t,{width:"wide",context:"standalone"})||a.month(t,{width:"abbreviated",context:"standalone"})||a.month(t,{width:"narrow",context:"standalone"})}}validate(t,r){return r>=0&&r<=11}set(t,r,a){return t.setMonth(a,1),t.setHours(0,0,0,0),t}}function Ev(n,e,t){const r=we(n,t==null?void 0:t.in),a=al(r,t)-e;return r.setDate(r.getDate()-a*7),we(r,t==null?void 0:t.in)}class Sv extends je{constructor(){super(...arguments);pe(this,"priority",100);pe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,r,a){switch(r){case"w":return et(lt.week,t);case"wo":return a.ordinalNumber(t,{unit:"week"});default:return at(r.length,t)}}validate(t,r){return r>=1&&r<=53}set(t,r,a,s){return an(Ev(t,a,s),s)}}function xv(n,e,t){const r=we(n,t==null?void 0:t.in),a=ol(r,t)-e;return r.setDate(r.getDate()-a*7),r}class Bv extends je{constructor(){super(...arguments);pe(this,"priority",100);pe(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,r,a){switch(r){case"I":return et(lt.week,t);case"Io":return a.ordinalNumber(t,{unit:"week"});default:return at(r.length,t)}}validate(t,r){return r>=1&&r<=53}set(t,r,a){return er(xv(t,a))}}const Tv=[31,28,31,30,31,30,31,31,30,31,30,31],$v=[31,29,31,30,31,30,31,31,30,31,30,31];class Mv extends je{constructor(){super(...arguments);pe(this,"priority",90);pe(this,"subPriority",1);pe(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,r,a){switch(r){case"d":return et(lt.date,t);case"do":return a.ordinalNumber(t,{unit:"date"});default:return at(r.length,t)}}validate(t,r){const a=t.getFullYear(),s=Kh(a),i=t.getMonth();return s?r>=1&&r<=$v[i]:r>=1&&r<=Tv[i]}set(t,r,a){return t.setDate(a),t.setHours(0,0,0,0),t}}class Dv extends je{constructor(){super(...arguments);pe(this,"priority",90);pe(this,"subpriority",1);pe(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,r,a){switch(r){case"D":case"DD":return et(lt.dayOfYear,t);case"Do":return a.ordinalNumber(t,{unit:"date"});default:return at(r.length,t)}}validate(t,r){const a=t.getFullYear();return Kh(a)?r>=1&&r<=366:r>=1&&r<=365}set(t,r,a){return t.setMonth(0,a),t.setHours(0,0,0,0),t}}function cl(n,e,t){var h,p,m,f;const r=Bo(),a=(t==null?void 0:t.weekStartsOn)??((p=(h=t==null?void 0:t.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??r.weekStartsOn??((f=(m=r.locale)==null?void 0:m.options)==null?void 0:f.weekStartsOn)??0,s=we(n,t==null?void 0:t.in),i=s.getDay(),c=(e%7+7)%7,d=7-a,u=e<0||e>6?e-(i+d)%7:(c+d)%7-(i+d)%7;return Xt(s,u,t)}class Ov extends je{constructor(){super(...arguments);pe(this,"priority",90);pe(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,r,a){switch(r){case"E":case"EE":case"EEE":return a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return a.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return a.day(t,{width:"wide",context:"formatting"})||a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"})}}validate(t,r){return r>=0&&r<=6}set(t,r,a,s){return t=cl(t,a,s),t.setHours(0,0,0,0),t}}class Av extends je{constructor(){super(...arguments);pe(this,"priority",90);pe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,r,a,s){const i=l=>{const c=Math.floor((l-1)/7)*7;return(l+s.weekStartsOn+6)%7+c};switch(r){case"e":case"ee":return ct(at(r.length,t),i);case"eo":return ct(a.ordinalNumber(t,{unit:"day"}),i);case"eee":return a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"eeeee":return a.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return a.day(t,{width:"wide",context:"formatting"})||a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"})}}validate(t,r){return r>=0&&r<=6}set(t,r,a,s){return t=cl(t,a,s),t.setHours(0,0,0,0),t}}class Iv extends je{constructor(){super(...arguments);pe(this,"priority",90);pe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,r,a,s){const i=l=>{const c=Math.floor((l-1)/7)*7;return(l+s.weekStartsOn+6)%7+c};switch(r){case"c":case"cc":return ct(at(r.length,t),i);case"co":return ct(a.ordinalNumber(t,{unit:"day"}),i);case"ccc":return a.day(t,{width:"abbreviated",context:"standalone"})||a.day(t,{width:"short",context:"standalone"})||a.day(t,{width:"narrow",context:"standalone"});case"ccccc":return a.day(t,{width:"narrow",context:"standalone"});case"cccccc":return a.day(t,{width:"short",context:"standalone"})||a.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return a.day(t,{width:"wide",context:"standalone"})||a.day(t,{width:"abbreviated",context:"standalone"})||a.day(t,{width:"short",context:"standalone"})||a.day(t,{width:"narrow",context:"standalone"})}}validate(t,r){return r>=0&&r<=6}set(t,r,a,s){return t=cl(t,a,s),t.setHours(0,0,0,0),t}}function Nv(n,e,t){const r=we(n,t==null?void 0:t.in),a=cv(r,t),s=e-a;return Xt(r,s,t)}class Pv extends je{constructor(){super(...arguments);pe(this,"priority",90);pe(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,r,a){const s=i=>i===0?7:i;switch(r){case"i":case"ii":return at(r.length,t);case"io":return a.ordinalNumber(t,{unit:"day"});case"iii":return ct(a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"}),s);case"iiiii":return ct(a.day(t,{width:"narrow",context:"formatting"}),s);case"iiiiii":return ct(a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"}),s);case"iiii":default:return ct(a.day(t,{width:"wide",context:"formatting"})||a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"}),s)}}validate(t,r){return r>=1&&r<=7}set(t,r,a){return t=Nv(t,a),t.setHours(0,0,0,0),t}}class Lv extends je{constructor(){super(...arguments);pe(this,"priority",80);pe(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(t,r,a){switch(r){case"a":case"aa":case"aaa":return a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return a.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(t,{width:"wide",context:"formatting"})||a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,r,a){return t.setHours(ll(a),0,0,0),t}}class zv extends je{constructor(){super(...arguments);pe(this,"priority",80);pe(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(t,r,a){switch(r){case"b":case"bb":case"bbb":return a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return a.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(t,{width:"wide",context:"formatting"})||a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,r,a){return t.setHours(ll(a),0,0,0),t}}class Fv extends je{constructor(){super(...arguments);pe(this,"priority",80);pe(this,"incompatibleTokens",["a","b","t","T"])}parse(t,r,a){switch(r){case"B":case"BB":case"BBB":return a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return a.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(t,{width:"wide",context:"formatting"})||a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,r,a){return t.setHours(ll(a),0,0,0),t}}class Rv extends je{constructor(){super(...arguments);pe(this,"priority",70);pe(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,r,a){switch(r){case"h":return et(lt.hour12h,t);case"ho":return a.ordinalNumber(t,{unit:"hour"});default:return at(r.length,t)}}validate(t,r){return r>=1&&r<=12}set(t,r,a){const s=t.getHours()>=12;return s&&a<12?t.setHours(a+12,0,0,0):!s&&a===12?t.setHours(0,0,0,0):t.setHours(a,0,0,0),t}}class Vv extends je{constructor(){super(...arguments);pe(this,"priority",70);pe(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,r,a){switch(r){case"H":return et(lt.hour23h,t);case"Ho":return a.ordinalNumber(t,{unit:"hour"});default:return at(r.length,t)}}validate(t,r){return r>=0&&r<=23}set(t,r,a){return t.setHours(a,0,0,0),t}}class Hv extends je{constructor(){super(...arguments);pe(this,"priority",70);pe(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,r,a){switch(r){case"K":return et(lt.hour11h,t);case"Ko":return a.ordinalNumber(t,{unit:"hour"});default:return at(r.length,t)}}validate(t,r){return r>=0&&r<=11}set(t,r,a){return t.getHours()>=12&&a<12?t.setHours(a+12,0,0,0):t.setHours(a,0,0,0),t}}class jv extends je{constructor(){super(...arguments);pe(this,"priority",70);pe(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,r,a){switch(r){case"k":return et(lt.hour24h,t);case"ko":return a.ordinalNumber(t,{unit:"hour"});default:return at(r.length,t)}}validate(t,r){return r>=1&&r<=24}set(t,r,a){const s=a<=24?a%24:a;return t.setHours(s,0,0,0),t}}class Yv extends je{constructor(){super(...arguments);pe(this,"priority",60);pe(this,"incompatibleTokens",["t","T"])}parse(t,r,a){switch(r){case"m":return et(lt.minute,t);case"mo":return a.ordinalNumber(t,{unit:"minute"});default:return at(r.length,t)}}validate(t,r){return r>=0&&r<=59}set(t,r,a){return t.setMinutes(a,0,0),t}}class Uv extends je{constructor(){super(...arguments);pe(this,"priority",50);pe(this,"incompatibleTokens",["t","T"])}parse(t,r,a){switch(r){case"s":return et(lt.second,t);case"so":return a.ordinalNumber(t,{unit:"second"});default:return at(r.length,t)}}validate(t,r){return r>=0&&r<=59}set(t,r,a){return t.setSeconds(a,0),t}}class Wv extends je{constructor(){super(...arguments);pe(this,"priority",30);pe(this,"incompatibleTokens",["t","T"])}parse(t,r){const a=s=>Math.trunc(s*Math.pow(10,-r.length+3));return ct(at(r.length,t),a)}set(t,r,a){return t.setMilliseconds(a),t}}class qv extends je{constructor(){super(...arguments);pe(this,"priority",10);pe(this,"incompatibleTokens",["t","T","x"])}parse(t,r){switch(r){case"X":return vn(kn.basicOptionalMinutes,t);case"XX":return vn(kn.basic,t);case"XXXX":return vn(kn.basicOptionalSeconds,t);case"XXXXX":return vn(kn.extendedOptionalSeconds,t);case"XXX":default:return vn(kn.extended,t)}}set(t,r,a){return r.timestampIsSet?t:Ue(t,t.getTime()-ns(t)-a)}}class Gv extends je{constructor(){super(...arguments);pe(this,"priority",10);pe(this,"incompatibleTokens",["t","T","X"])}parse(t,r){switch(r){case"x":return vn(kn.basicOptionalMinutes,t);case"xx":return vn(kn.basic,t);case"xxxx":return vn(kn.basicOptionalSeconds,t);case"xxxxx":return vn(kn.extendedOptionalSeconds,t);case"xxx":default:return vn(kn.extended,t)}}set(t,r,a){return r.timestampIsSet?t:Ue(t,t.getTime()-ns(t)-a)}}class Kv extends je{constructor(){super(...arguments);pe(this,"priority",40);pe(this,"incompatibleTokens","*")}parse(t){return qh(t)}set(t,r,a){return[Ue(t,a*1e3),{timestampIsSet:!0}]}}class Xv extends je{constructor(){super(...arguments);pe(this,"priority",20);pe(this,"incompatibleTokens","*")}parse(t){return qh(t)}set(t,r,a){return[Ue(t,a),{timestampIsSet:!0}]}}const Qv={G:new mv,y:new gv,Y:new yv,R:new bv,u:new kv,Q:new vv,q:new wv,M:new _v,L:new Cv,w:new Sv,I:new Bv,d:new Mv,D:new Dv,E:new Ov,e:new Av,c:new Iv,i:new Pv,a:new Lv,b:new zv,B:new Fv,h:new Rv,H:new Vv,K:new Hv,k:new jv,m:new Yv,s:new Uv,S:new Wv,X:new qv,x:new Gv,t:new Kv,T:new Xv},Zv=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jv=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,e1=/^'([^]*?)'?$/,t1=/''/g,n1=/\S/,o1=/[a-zA-Z]/;function dl(n,e,t,r){var x,E,C,T,F,I,O,P;const a=()=>Ue((r==null?void 0:r.in)||t,NaN),s=lv(),i=(r==null?void 0:r.locale)??s.locale??zh,l=(r==null?void 0:r.firstWeekContainsDate)??((E=(x=r==null?void 0:r.locale)==null?void 0:x.options)==null?void 0:E.firstWeekContainsDate)??s.firstWeekContainsDate??((T=(C=s.locale)==null?void 0:C.options)==null?void 0:T.firstWeekContainsDate)??1,c=(r==null?void 0:r.weekStartsOn)??((I=(F=r==null?void 0:r.locale)==null?void 0:F.options)==null?void 0:I.weekStartsOn)??s.weekStartsOn??((P=(O=s.locale)==null?void 0:O.options)==null?void 0:P.weekStartsOn)??0;if(!e)return n?a():we(t,r==null?void 0:r.in);const d={firstWeekContainsDate:l,weekStartsOn:c,locale:i},u=[new fv(r==null?void 0:r.in,t)],h=e.match(Jv).map(M=>{const v=M[0];if(v in sl){const b=sl[v];return b(M,i.formatLong)}return M}).join("").match(Zv),p=[];for(let M of h){!(r!=null&&r.useAdditionalWeekYearTokens)&&Uh(M)&&il(M,e,n),!(r!=null&&r.useAdditionalDayOfYearTokens)&&Yh(M)&&il(M,e,n);const v=M[0],b=Qv[v];if(b){const{incompatibleTokens:D}=b;if(Array.isArray(D)){const K=p.find(w=>D.includes(w.token)||w.token===v);if(K)throw new RangeError(`The format string mustn't contain \`${K.fullToken}\` and \`${M}\` at the same time`)}else if(b.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${M}\` and any other token at the same time`);p.push({token:v,fullToken:M});const Y=b.run(n,M,i.match,d);if(!Y)return a();u.push(Y.setter),n=Y.rest}else{if(v.match(o1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");if(M==="''"?M="'":v==="'"&&(M=r1(M)),n.indexOf(M)===0)n=n.slice(M.length);else return a()}}if(n.length>0&&n1.test(n))return a();const m=u.map(M=>M.priority).sort((M,v)=>v-M).filter((M,v,b)=>b.indexOf(M)===v).map(M=>u.filter(v=>v.priority===M).sort((v,b)=>b.subPriority-v.subPriority)).map(M=>M[0]);let f=we(t,r==null?void 0:r.in);if(isNaN(+f))return a();const g={};for(const M of m){if(!M.validate(f,d))return a();const v=M.set(f,g,d);Array.isArray(v)?(f=v[0],Object.assign(g,v[1])):f=v}return f}function r1(n){return n.match(e1)[1].replace(t1,"'")}function Xh(n,e,t){const[r,a]=Rr(t==null?void 0:t.in,n,e);return+To(r)==+To(a)}function Qh(n,e,t){return Xt(n,-e,t)}function Zh(n,e,t){const r=we(n,t==null?void 0:t.in),a=r.getFullYear(),s=r.getDate(),i=Ue(n,0);i.setFullYear(a,e,15),i.setHours(0,0,0,0);const l=iv(i);return r.setMonth(e,Math.min(s,l)),r}function qe(n,e,t){let r=we(n,t==null?void 0:t.in);return isNaN(+r)?Ue(n,NaN):(e.year!=null&&r.setFullYear(e.year),e.month!=null&&(r=Zh(r,e.month)),e.date!=null&&r.setDate(e.date),e.hours!=null&&r.setHours(e.hours),e.minutes!=null&&r.setMinutes(e.minutes),e.seconds!=null&&r.setSeconds(e.seconds),e.milliseconds!=null&&r.setMilliseconds(e.milliseconds),r)}function a1(n,e,t){const r=we(n,t==null?void 0:t.in);return r.setHours(e),r}function Jh(n,e,t){const r=we(n,t==null?void 0:t.in);return r.setMilliseconds(e),r}function s1(n,e,t){const r=we(n,t==null?void 0:t.in);return r.setMinutes(e),r}function ep(n,e,t){const r=we(n,t==null?void 0:t.in);return r.setSeconds(e),r}function wn(n,e,t){const r=we(n,t==null?void 0:t.in);return isNaN(+r)?Ue(n,NaN):(r.setFullYear(e),r)}function ar(n,e,t){return rn(n,-e,t)}function i1(n,e,t){const{years:r=0,months:a=0,weeks:s=0,days:i=0,hours:l=0,minutes:c=0,seconds:d=0}=e,u=ar(n,a+r*12,t),h=Qh(u,i+s*7,t),p=c+l*60,f=(d+p*60)*1e3;return Ue(n,+h-f)}function tp(n,e,t){return tl(n,-e,t)}function sr(){const n=o.useAttrs();return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img",...n},[o.createElementVNode("path",{d:"M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z"}),o.createElementVNode("path",{d:"M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),o.createElementVNode("path",{d:"M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),o.createElementVNode("path",{d:"M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"})])}sr.compatConfig={MODE:3};function np(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[o.createElementVNode("path",{d:"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z"}),o.createElementVNode("path",{d:"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}np.compatConfig={MODE:3};function ul(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[o.createElementVNode("path",{d:"M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}ul.compatConfig={MODE:3};function hl(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[o.createElementVNode("path",{d:"M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z"})])}hl.compatConfig={MODE:3};function pl(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[o.createElementVNode("path",{d:"M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z"}),o.createElementVNode("path",{d:"M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"})])}pl.compatConfig={MODE:3};function fl(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[o.createElementVNode("path",{d:"M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}fl.compatConfig={MODE:3};function ml(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[o.createElementVNode("path",{d:"M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}ml.compatConfig={MODE:3};const zt=(n,e)=>e?new Date(n.toLocaleString("en-US",{timeZone:e})):new Date(n),gl=(n,e,t)=>yl(n,e,t)||ne(),l1=(n,e,t)=>{const r=e.dateInTz?zt(new Date(n),e.dateInTz):ne(n);return t?kt(r,!0):r},yl=(n,e,t)=>{if(!n)return null;const r=t?kt(ne(n),!0):ne(n);return e?e.exactMatch?l1(n,e,t):zt(r,e.timezone):r},c1=n=>{const e=new Date(n.getFullYear(),0,1).getTimezoneOffset();return n.getTimezoneOffset()<e},d1=(n,e)=>{if(!n)return 0;const t=new Date,r=new Date(t.toLocaleString("en-US",{timeZone:"UTC"})),a=new Date(t.toLocaleString("en-US",{timeZone:n})),s=(c1(e??a)?a:e??a).getTimezoneOffset()/60;return(+r-+a)/(1e3*60*60)-s};var sn=(n=>(n.month="month",n.year="year",n))(sn||{}),ln=(n=>(n.top="top",n.bottom="bottom",n))(ln||{}),Do=(n=>(n.header="header",n.calendar="calendar",n.timePicker="timePicker",n))(Do||{}),xt=(n=>(n.month="month",n.year="year",n.calendar="calendar",n.time="time",n.minutes="minutes",n.hours="hours",n.seconds="seconds",n))(xt||{});const u1=["timestamp","date","iso"];var Dt=(n=>(n.up="up",n.down="down",n.left="left",n.right="right",n))(Dt||{}),Ke=(n=>(n.arrowUp="ArrowUp",n.arrowDown="ArrowDown",n.arrowLeft="ArrowLeft",n.arrowRight="ArrowRight",n.enter="Enter",n.space=" ",n.esc="Escape",n.tab="Tab",n.home="Home",n.end="End",n.pageUp="PageUp",n.pageDown="PageDown",n))(Ke||{}),ir=(n=>(n.MONTH_AND_YEAR="MM-yyyy",n.YEAR="yyyy",n.DATE="dd-MM-yyyy",n))(ir||{});function op(n){return e=>{const t=new Intl.DateTimeFormat(n,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${e}T00:00:00+00:00`));return n==="ar"?t.slice(2,5):t.slice(0,2)}}function h1(n){return e=>bn(zt(new Date(`2017-01-0${e}T00:00:00+00:00`),"UTC"),"EEEEEE",{locale:n})}const p1=(n,e,t)=>{const r=[1,2,3,4,5,6,7];let a;if(n!==null)try{a=r.map(h1(n))}catch{a=r.map(op(e))}else a=r.map(op(e));const s=a.slice(0,t),i=a.slice(t+1,a.length);return[a[t]].concat(...i).concat(...s)},bl=(n,e,t)=>{const r=[];for(let a=+n[0];a<=+n[1];a++)r.push({value:+a,text:cp(a,e)});return t?r.reverse():r},rp=(n,e,t)=>{const r=[1,2,3,4,5,6,7,8,9,10,11,12].map(s=>{const i=s<10?`0${s}`:s;return new Date(`2017-${i}-01T00:00:00+00:00`)});if(n!==null)try{const s=t==="long"?"LLLL":"LLL";return r.map((i,l)=>{const c=bn(zt(i,"UTC"),s,{locale:n});return{text:c.charAt(0).toUpperCase()+c.substring(1),value:l}})}catch{}const a=new Intl.DateTimeFormat(e,{month:t,timeZone:"UTC"});return r.map((s,i)=>{const l=a.format(s);return{text:l.charAt(0).toUpperCase()+l.substring(1),value:i}})},f1=n=>[12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11][n],mt=n=>{const e=o.unref(n);return e!=null&&e.$el?e==null?void 0:e.$el:e},m1=n=>({type:"dot",...n??{}}),ap=n=>Array.isArray(n)?!!n[0]&&!!n[1]:!1,kl={prop:n=>`"${n}" prop must be enabled!`,dateArr:n=>`You need to use array as "model-value" binding in order to support "${n}"`},bt=n=>n,sp=n=>n===0?n:!n||isNaN(+n)?null:+n,ip=n=>n===null,lp=n=>{if(n)return[...n.querySelectorAll("input, button, select, textarea, a[href]")][0]},g1=n=>{const e=[],t=r=>r.filter(a=>a);for(let r=0;r<n.length;r+=3){const a=[n[r],n[r+1],n[r+2]];e.push(t(a))}return e},Ur=(n,e,t)=>{const r=t!=null,a=e!=null;if(!r&&!a)return!1;const s=+t,i=+e;return r&&a?+n>s||+n<i:r?+n>s:a?+n<i:!1},lr=(n,e)=>g1(n).map(t=>t.map(r=>{const{active:a,disabled:s,isBetween:i,highlighted:l}=e(r);return{...r,active:a,disabled:s,className:{dp__overlay_cell_active:a,dp__overlay_cell:!a,dp__overlay_cell_disabled:s,dp__overlay_cell_pad:!0,dp__overlay_cell_active_disabled:s&&a,dp__cell_in_between:i,"dp--highlighted":l}}})),ro=(n,e,t=!1)=>{n&&e.allowStopPropagation&&(t&&n.stopImmediatePropagation(),n.stopPropagation())},y1=()=>["a[href]","area[href]","input:not([disabled]):not([type='hidden'])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","[tabindex]:not([tabindex='-1'])","[data-datepicker-instance]"].join(", ");function b1(n,e){let t=[...document.querySelectorAll(y1())];t=t.filter(a=>!n.contains(a)||a.hasAttribute("data-datepicker-instance"));const r=t.indexOf(n);if(r>=0&&(e?r-1>=0:r+1<=t.length))return t[r+(e?-1:1)]}const vl=(n,e)=>n==null?void 0:n.querySelector(`[data-dp-element="${e}"]`),cp=(n,e)=>new Intl.NumberFormat(e,{useGrouping:!1,style:"decimal"}).format(n),wl=(n,e)=>bn(n,e??ir.DATE),_l=n=>Array.isArray(n),rs=(n,e,t)=>e.get(wl(n,t)),k1=(n,e)=>n?e?e instanceof Map?!!rs(n,e):e(ne(n)):!1:!0,Ot=(n,e,t=!1,r)=>{if(n.key===Ke.enter||n.key===Ke.space)return t&&n.preventDefault(),e();if(r)return r(n)},v1=()=>"ontouchstart"in window||navigator.maxTouchPoints>0,dp=(n,e)=>n?ir.MONTH_AND_YEAR:e?ir.YEAR:ir.DATE,up=n=>n<10?`0${n}`:n,hp=(n,e,t,r,a,s)=>{const i=dl(n,e.slice(0,n.length),new Date,{locale:s});return Vr(i)&&Dh(i)?r||a?i:qe(i,{hours:+t.hours,minutes:+(t==null?void 0:t.minutes),seconds:+(t==null?void 0:t.seconds),milliseconds:0}):null},w1=(n,e,t,r,a,s)=>{const i=Array.isArray(t)?t[0]:t;if(typeof e=="string")return hp(n,e,i,r,a,s);if(Array.isArray(e)){let l=null;for(const c of e)if(l=hp(n,c,i,r,a,s),l)break;return l}return typeof e=="function"?e(n):null},ne=n=>n?new Date(n):new Date,_1=(n,e,t)=>{if(e){const a=(n.getMonth()+1).toString().padStart(2,"0"),s=n.getDate().toString().padStart(2,"0"),i=n.getHours().toString().padStart(2,"0"),l=n.getMinutes().toString().padStart(2,"0"),c=t?n.getSeconds().toString().padStart(2,"0"):"00";return`${n.getFullYear()}-${a}-${s}T${i}:${l}:${c}.000Z`}const r=Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds());return new Date(r).toISOString()},kt=(n,e)=>{const t=ne(JSON.parse(JSON.stringify(n))),r=qe(t,{hours:0,minutes:0,seconds:0,milliseconds:0});return e?gk(r):r},ao=(n,e,t,r)=>{let a=n?ne(n):ne();return(e||e===0)&&(a=a1(a,+e)),(t||t===0)&&(a=s1(a,+t)),(r||r===0)&&(a=ep(a,+r)),Jh(a,0)},st=(n,e)=>!n||!e?!1:or(kt(n),kt(e)),Le=(n,e)=>!n||!e?!1:rr(kt(n),kt(e)),dt=(n,e)=>!n||!e?!1:Mo(kt(n),kt(e)),Wr=(n,e,t)=>n!=null&&n[0]&&n!=null&&n[1]?dt(t,n[0])&&st(t,n[1]):n!=null&&n[0]&&e?dt(t,n[0])&&st(t,e)||st(t,n[0])&&dt(t,e):!1,cn=n=>{const e=qe(new Date(n),{date:1});return kt(e)},Cl=(n,e,t)=>e&&(t||t===0)?Object.fromEntries(["hours","minutes","seconds"].map(r=>r===e?[r,t]:[r,isNaN(+n[r])?void 0:+n[r]])):{hours:isNaN(+n.hours)?void 0:+n.hours,minutes:isNaN(+n.minutes)?void 0:+n.minutes,seconds:isNaN(+n.seconds)?void 0:+n.seconds},Oo=n=>({hours:Ln(n),minutes:oo(n),seconds:nr(n)}),pp=(n,e)=>{if(e){const t=Te(ne(e));if(t>n)return 12;if(t===n)return Pe(ne(e))}},fp=(n,e)=>{if(e){const t=Te(ne(e));return t<n?-1:t===n?Pe(ne(e)):void 0}},cr=n=>{if(n)return Te(ne(n))},mp=(n,e)=>{const t=dt(n,e)?e:n,r=dt(e,n)?e:n;return Ih({start:t,end:r})},C1=n=>{const e=rn(n,1);return{month:Pe(e),year:Te(e)}},zn=(n,e)=>{const t=an(n,{weekStartsOn:+e}),r=Ph(n,{weekStartsOn:+e});return[t,r]},gp=(n,e)=>{const t={hours:Ln(ne()),minutes:oo(ne()),seconds:e?nr(ne()):0};return Object.assign(t,n)},so=(n,e,t)=>[qe(ne(n),{date:1}),qe(ne(),{month:e,year:t,date:1})],Fn=(n,e,t)=>{let r=n?ne(n):ne();return(e||e===0)&&(r=Zh(r,e)),t&&(r=wn(r,t)),r},yp=(n,e,t,r,a)=>{if(!r||a&&!e||!a&&!t)return!1;const s=a?rn(n,1):ar(n,1),i=[Pe(s),Te(s)];return a?!S1(...i,e):!E1(...i,t)},E1=(n,e,t)=>st(...so(t,n,e))||Le(...so(t,n,e)),S1=(n,e,t)=>dt(...so(t,n,e))||Le(...so(t,n,e)),bp=(n,e,t,r,a,s,i)=>{if(typeof e=="function"&&!i)return e(n);const l=t?{locale:t}:void 0;return Array.isArray(n)?`${bn(n[0],s,l)}${a&&!n[1]?"":r}${n[1]?bn(n[1],s,l):""}`:bn(n,s,l)},dr=n=>{if(n)return null;throw new Error(kl.prop("partial-range"))},as=(n,e)=>{if(e)return n();throw new Error(kl.prop("range"))},El=n=>Array.isArray(n)?Vr(n[0])&&(n[1]?Vr(n[1]):!0):n?Vr(n):!1,x1=(n,e)=>qe(e??ne(),{hours:+n.hours||0,minutes:+n.minutes||0,seconds:+n.seconds||0}),Sl=(n,e,t,r)=>{if(!n)return!0;if(r){const a=t==="max"?or(n,e):Mo(n,e),s={seconds:0,milliseconds:0};return a||rr(qe(n,s),qe(e,s))}return t==="max"?n.getTime()<=e.getTime():n.getTime()>=e.getTime()},xl=(n,e,t)=>n?x1(n,e):ne(t??e),kp=(n,e,t,r,a)=>{if(Array.isArray(r)){const i=xl(n,r[0],e),l=xl(n,r[1],e);return Sl(r[0],i,t,!!e)&&Sl(r[1],l,t,!!e)&&a}const s=xl(n,r,e);return Sl(r,s,t,!!e)&&a},Bl=n=>qe(ne(),Oo(n)),B1=(n,e,t)=>{if(n instanceof Map){const r=`${up(t+1)}-${e}`;return n.size?n.has(r):!1}return typeof n=="function"?n(kt(qe(ne(),{month:t,year:e}),!0)):!1},T1=(n,e,t)=>{if(n instanceof Map){const r=`${up(t+1)}-${e}`;return n.size?n.has(r):!0}return!0},vp=(n,e,t)=>typeof n=="function"?n({month:e,year:t}):!!n.months.find(r=>r.month===e&&r.year===t),Tl=(n,e)=>typeof n=="function"?n(e):n.years.includes(e),$l=n=>`dp-${bn(n,"yyyy-MM-dd")}`,wp=(n,e)=>{const t=Qh(kt(e),n),r=Xt(kt(e),n);return{before:t,after:r}},qr=o.reactive({menuFocused:!1,shiftKeyInMenu:!1}),_p=()=>{const n=t=>{qr.menuFocused=t},e=t=>{qr.shiftKeyInMenu!==t&&(qr.shiftKeyInMenu=t)};return{control:o.computed(()=>({shiftKeyInMenu:qr.shiftKeyInMenu,menuFocused:qr.menuFocused})),setMenuFocused:n,setShiftKey:e}},Xe=o.reactive({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),Ml=o.ref(null),ss=o.ref(!1),Dl=o.ref(!1),Ol=o.ref(!1),Al=o.ref(!1),Bt=o.ref(0),ut=o.ref(0),io=()=>{const n=o.computed(()=>ss.value?[...Xe.selectionGrid,Xe.actionRow].filter(h=>h.length):Dl.value?[...Xe.timePicker[0],...Xe.timePicker[1],Al.value?[]:[Ml.value],Xe.actionRow].filter(h=>h.length):Ol.value?[...Xe.monthPicker,Xe.actionRow]:[Xe.monthYear,...Xe.calendar,Xe.time,Xe.actionRow].filter(h=>h.length)),e=h=>{Bt.value=h?Bt.value+1:Bt.value-1;let p=null;n.value[ut.value]&&(p=n.value[ut.value][Bt.value]),!p&&n.value[ut.value+(h?1:-1)]?(ut.value=ut.value+(h?1:-1),Bt.value=h?0:n.value[ut.value].length-1):p||(Bt.value=h?Bt.value-1:Bt.value+1)},t=h=>{ut.value===0&&!h||ut.value===n.value.length&&h||(ut.value=h?ut.value+1:ut.value-1,n.value[ut.value]?n.value[ut.value]&&!n.value[ut.value][Bt.value]&&Bt.value!==0&&(Bt.value=n.value[ut.value].length-1):ut.value=h?ut.value-1:ut.value+1)},r=h=>{let p=null;n.value[ut.value]&&(p=n.value[ut.value][Bt.value]),p?p.focus({preventScroll:!ss.value}):Bt.value=h?Bt.value-1:Bt.value+1},a=()=>{e(!0),r(!0)},s=()=>{e(!1),r(!1)},i=()=>{t(!1),r(!0)},l=()=>{t(!0),r(!0)},c=(h,p)=>{Xe[p]=h},d=(h,p)=>{Xe[p]=h},u=()=>{Bt.value=0,ut.value=0};return{buildMatrix:c,buildMultiLevelMatrix:d,setTimePickerBackRef:h=>{Ml.value=h},setSelectionGrid:h=>{ss.value=h,u(),h||(Xe.selectionGrid=[])},setTimePicker:(h,p=!1)=>{Dl.value=h,Al.value=p,u(),h||(Xe.timePicker[0]=[],Xe.timePicker[1]=[])},setTimePickerElements:(h,p=0)=>{Xe.timePicker[p]=h},arrowRight:a,arrowLeft:s,arrowUp:i,arrowDown:l,clearArrowNav:()=>{Xe.monthYear=[],Xe.calendar=[],Xe.time=[],Xe.actionRow=[],Xe.selectionGrid=[],Xe.timePicker[0]=[],Xe.timePicker[1]=[],ss.value=!1,Dl.value=!1,Al.value=!1,Ol.value=!1,u(),Ml.value=null},setMonthPicker:h=>{Ol.value=h,u()},refSets:Xe}},Cp=n=>({menuAppearTop:"dp-menu-appear-top",menuAppearBottom:"dp-menu-appear-bottom",open:"dp-slide-down",close:"dp-slide-up",next:"calendar-next",previous:"calendar-prev",vNext:"dp-slide-up",vPrevious:"dp-slide-down",...n??{}}),$1=n=>({toggleOverlay:"Toggle overlay",menu:"Datepicker menu",input:"Datepicker input",openTimePicker:"Open time picker",closeTimePicker:"Close time Picker",incrementValue:e=>`Increment ${e}`,decrementValue:e=>`Decrement ${e}`,openTpOverlay:e=>`Open ${e} overlay`,amPmButton:"Switch AM/PM mode",openYearsOverlay:"Open years overlay",openMonthsOverlay:"Open months overlay",nextMonth:"Next month",prevMonth:"Previous month",nextYear:"Next year",prevYear:"Previous year",day:void 0,weekDay:void 0,clearInput:"Clear value",calendarIcon:"Calendar icon",timePicker:"Time picker",monthPicker:e=>`Month picker${e?" overlay":""}`,yearPicker:e=>`Year picker${e?" overlay":""}`,timeOverlay:e=>`${e} overlay`,...n??{}}),Ep=n=>n?typeof n=="boolean"?n?2:0:+n>=2?+n:2:0,M1=n=>{const e=typeof n=="object"&&n,t={static:!0,solo:!1};if(!n)return{...t,count:Ep(!1)};const r=e?n:{},a=e?r.count??!0:n,s=Ep(a);return Object.assign(t,r,{count:s})},D1=(n,e,t)=>n||(typeof t=="string"?t:e),O1=n=>typeof n=="boolean"?n?Cp({}):!1:Cp(n),A1=n=>{const e={enterSubmit:!0,tabSubmit:!0,openMenu:"open",selectOnFocus:!1,rangeSeparator:" - ",escClose:!0};return typeof n=="object"?{...e,...n??{},enabled:!0}:{...e,enabled:n}},I1=n=>({months:[],years:[],times:{hours:[],minutes:[],seconds:[]},...n??{}}),N1=n=>({showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0,...n??{}}),P1=n=>{const e={input:!1};return typeof n=="object"?{...e,...n??{},enabled:!0}:{enabled:n,...e}},L1=n=>({allowStopPropagation:!0,closeOnScroll:!1,modeHeight:255,allowPreventDefault:!1,closeOnClearValue:!0,closeOnAutoApply:!0,noSwipe:!1,keepActionRow:!1,onClickOutside:void 0,tabOutClosesMenu:!0,arrowLeft:void 0,keepViewOnOffsetClick:!1,timeArrowHoldThreshold:0,shadowDom:!1,mobileBreakpoint:600,setDateOnMenuClose:!1,...n??{}}),z1=n=>{const e={dates:Array.isArray(n)?n.map(t=>ne(t)):[],years:[],months:[],quarters:[],weeks:[],weekdays:[],options:{highlightDisabled:!1}};return typeof n=="function"?n:{...e,...n??{}}},F1=n=>typeof n=="object"?{type:(n==null?void 0:n.type)??"local",hideOnOffsetDates:(n==null?void 0:n.hideOnOffsetDates)??!1}:{type:n,hideOnOffsetDates:!1},R1=n=>{const e={noDisabledRange:!1,showLastInRange:!0,minMaxRawRange:!1,partialRange:!0,disableTimeRangeValidation:!1,maxRange:void 0,minRange:void 0,autoRange:void 0,fixedStart:!1,fixedEnd:!1};return typeof n=="object"?{enabled:!0,...e,...n}:{enabled:n,...e}},V1=n=>n?typeof n=="string"?{timezone:n,exactMatch:!1,dateInTz:void 0,emitTimezone:void 0,convertModel:!0}:{timezone:n.timezone,exactMatch:n.exactMatch??!1,dateInTz:n.dateInTz??void 0,emitTimezone:n.emitTimezone??void 0,convertModel:n.convertModel??!0}:{timezone:void 0,exactMatch:!1,emitTimezone:void 0},Il=(n,e,t,r)=>new Map(n.map(a=>{const s=gl(a,e,r);return[wl(s,t),s]})),H1=(n,e)=>n.length?new Map(n.map(t=>{const r=gl(t.date,e);return[wl(r,ir.DATE),t]})):null,j1=n=>{var e;const t=dp(n.isMonthPicker,n.isYearPicker);return{minDate:yl(n.minDate,n.timezone,n.isSpecific),maxDate:yl(n.maxDate,n.timezone,n.isSpecific),disabledDates:_l(n.disabledDates)?Il(n.disabledDates,n.timezone,t,n.isSpecific):n.disabledDates,allowedDates:_l(n.allowedDates)?Il(n.allowedDates,n.timezone,t,n.isSpecific):null,highlight:typeof n.highlight=="object"&&_l((e=n.highlight)==null?void 0:e.dates)?Il(n.highlight.dates,n.timezone,t):n.highlight,markers:H1(n.markers,n.timezone)}},Y1=n=>typeof n=="boolean"?{enabled:n,dragSelect:!0,limit:null}:{enabled:!!n,limit:n.limit?+n.limit:null,dragSelect:n.dragSelect??!0},U1=n=>({...Object.fromEntries(Object.keys(n).map(e=>{const t=e,r=n[t],a=typeof n[t]=="string"?{[r]:!0}:Object.fromEntries(r.map(s=>[s,!0]));return[e,a]}))}),Ze=n=>{const e=()=>{const O=n.enableSeconds?":ss":"",P=n.enableMinutes?":mm":"";return n.is24?`HH${P}${O}`:`hh${P}${O} aa`},t=()=>{var O;return n.format?n.format:n.monthPicker?"MM/yyyy":n.timePicker?e():n.weekPicker?`${((O=x.value)==null?void 0:O.type)==="iso"?"II":"ww"}-RR`:n.yearPicker?"yyyy":n.quarterPicker?"QQQ/yyyy":n.enableTimePicker?`MM/dd/yyyy, ${e()}`:"MM/dd/yyyy"},r=O=>gp(O,n.enableSeconds),a=()=>F.value.enabled?n.startTime&&Array.isArray(n.startTime)?[r(n.startTime[0]),r(n.startTime[1])]:null:n.startTime&&!Array.isArray(n.startTime)?r(n.startTime):null,s=o.computed(()=>M1(n.multiCalendars)),i=o.computed(()=>a()),l=o.computed(()=>$1(n.ariaLabels)),c=o.computed(()=>I1(n.filters)),d=o.computed(()=>O1(n.transitions)),u=o.computed(()=>N1(n.actionRow)),h=o.computed(()=>D1(n.previewFormat,n.format,t())),p=o.computed(()=>A1(n.textInput)),m=o.computed(()=>P1(n.inline)),f=o.computed(()=>L1(n.config)),g=o.computed(()=>z1(n.highlight)),x=o.computed(()=>F1(n.weekNumbers)),E=o.computed(()=>V1(n.timezone)),C=o.computed(()=>Y1(n.multiDates)),T=o.computed(()=>j1({minDate:n.minDate,maxDate:n.maxDate,disabledDates:n.disabledDates,allowedDates:n.allowedDates,highlight:g.value,markers:n.markers,timezone:E.value,isSpecific:n.monthPicker||n.yearPicker||n.quarterPicker,isMonthPicker:n.monthPicker,isYearPicker:n.yearPicker})),F=o.computed(()=>R1(n.range)),I=o.computed(()=>U1(n.ui));return{defaultedTransitions:d,defaultedMultiCalendars:s,defaultedStartTime:i,defaultedAriaLabels:l,defaultedFilters:c,defaultedActionRow:u,defaultedPreviewFormat:h,defaultedTextInput:p,defaultedInline:m,defaultedConfig:f,defaultedHighlight:g,defaultedWeekNumbers:x,defaultedRange:F,propDates:T,defaultedTz:E,defaultedMultiDates:C,defaultedUI:I,getDefaultPattern:t,getDefaultStartTime:a,handleEventPropagation:O=>{f.value.allowStopPropagation&&O.stopPropagation(),f.value.allowPreventDefault&&O.preventDefault()}}},W1=(n,e,t)=>{const r=o.ref(),{defaultedTextInput:a,defaultedRange:s,defaultedTz:i,defaultedMultiDates:l,getDefaultPattern:c}=Ze(e),d=o.ref(""),u=o.toRef(e,"format"),h=o.toRef(e,"formatLocale");o.watch(r,()=>{typeof e.onInternalModelChange=="function"&&n("internal-model-change",r.value,J(!0))},{deep:!0}),o.watch(s,(y,j)=>{y.enabled!==j.enabled&&(r.value=null)}),o.watch(u,()=>{N()});const p=y=>i.value.timezone&&i.value.convertModel?zt(y,i.value.timezone):y,m=y=>{if(i.value.timezone&&i.value.convertModel){const j=d1(i.value.timezone,y);return ck(y,j)}return y},f=(y,j,se=!1)=>bp(y,e.format,e.formatLocale,a.value.rangeSeparator,e.modelAuto,j??c(),se),g=y=>y?e.modelType?q(y):{hours:Ln(y),minutes:oo(y),seconds:e.enableSeconds?nr(y):0}:null,x=y=>e.modelType?q(y):{month:Pe(y),year:Te(y)},E=y=>Array.isArray(y)?l.value.enabled?y.map(j=>C(j,wn(ne(),j))):as(()=>[wn(ne(),y[0]),y[1]?wn(ne(),y[1]):dr(s.value.partialRange)],s.value.enabled):wn(ne(),+y),C=(y,j)=>(typeof y=="string"||typeof y=="number")&&e.modelType?L(y):j,T=y=>Array.isArray(y)?[C(y[0],ao(null,+y[0].hours,+y[0].minutes,y[0].seconds)),C(y[1],ao(null,+y[1].hours,+y[1].minutes,y[1].seconds))]:C(y,ao(null,y.hours,y.minutes,y.seconds)),F=y=>{const j=qe(ne(),{date:1});return Array.isArray(y)?l.value.enabled?y.map(se=>C(se,Fn(j,+se.month,+se.year))):as(()=>[C(y[0],Fn(j,+y[0].month,+y[0].year)),C(y[1],y[1]?Fn(j,+y[1].month,+y[1].year):dr(s.value.partialRange))],s.value.enabled):C(y,Fn(j,+y.month,+y.year))},I=y=>{if(Array.isArray(y))return y.map(j=>L(j));throw new Error(kl.dateArr("multi-dates"))},O=y=>{if(Array.isArray(y)&&s.value.enabled){const j=y[0],se=y[1];return[ne(Array.isArray(j)?j[0]:null),Array.isArray(se)&&se.length?ne(se[0]):null]}return ne(y[0])},P=y=>e.modelAuto?Array.isArray(y)?[L(y[0]),L(y[1])]:e.autoApply?[L(y)]:[L(y),null]:Array.isArray(y)?as(()=>y[1]?[L(y[0]),y[1]?L(y[1]):dr(s.value.partialRange)]:[L(y[0])],s.value.enabled):L(y),M=()=>{Array.isArray(r.value)&&s.value.enabled&&r.value.length===1&&r.value.push(dr(s.value.partialRange))},v=()=>{const y=r.value;return[q(y[0]),y[1]?q(y[1]):dr(s.value.partialRange)]},b=()=>Array.isArray(r.value)?r.value[1]?v():q(bt(r.value[0])):[],D=()=>(r.value||[]).map(y=>q(y)),Y=(y=!1)=>(y||M(),e.modelAuto?b():l.value.enabled?D():Array.isArray(r.value)?as(()=>v(),s.value.enabled):q(bt(r.value))),K=y=>!y||Array.isArray(y)&&!y.length?null:e.timePicker?T(bt(y)):e.monthPicker?F(bt(y)):e.yearPicker?E(bt(y)):l.value.enabled?I(bt(y)):e.weekPicker?O(bt(y)):P(bt(y)),w=y=>{const j=K(y);El(bt(j))?(r.value=bt(j),N()):(r.value=null,d.value="")},k=()=>{const y=j=>bn(j,a.value.format);return`${y(r.value[0])} ${a.value.rangeSeparator} ${r.value[1]?y(r.value[1]):""}`},_=()=>t.value&&r.value?Array.isArray(r.value)?k():bn(r.value,a.value.format):f(r.value),A=()=>r.value?l.value.enabled?r.value.map(y=>f(y)).join("; "):a.value.enabled&&typeof a.value.format=="string"?_():f(r.value):"",N=()=>{!e.format||typeof e.format=="string"||a.value.enabled&&typeof a.value.format=="string"?d.value=A():d.value=e.format(r.value)},L=y=>{if(e.utc){const j=new Date(y);return e.utc==="preserve"?new Date(j.getTime()+j.getTimezoneOffset()*6e4):j}return e.modelType?u1.includes(e.modelType)?p(new Date(y)):e.modelType==="format"&&(typeof e.format=="string"||!e.format)?p(dl(y,c(),new Date,{locale:h.value})):p(dl(y,e.modelType,new Date,{locale:h.value})):p(new Date(y))},q=y=>y?e.utc?_1(y,e.utc==="preserve",e.enableSeconds):e.modelType?e.modelType==="timestamp"?+m(y):e.modelType==="iso"?m(y).toISOString():e.modelType==="format"&&(typeof e.format=="string"||!e.format)?f(m(y)):f(m(y),e.modelType,!0):m(y):"",z=(y,j=!1,se=!1)=>{if(se)return y;if(n("update:model-value",y),i.value.emitTimezone&&j){const _e=Array.isArray(y)?y.map(U=>zt(bt(U),i.value.emitTimezone)):zt(bt(y),i.value.emitTimezone);n("update:model-timezone-value",_e)}},oe=y=>Array.isArray(r.value)?l.value.enabled?r.value.map(j=>y(j)):[y(r.value[0]),r.value[1]?y(r.value[1]):dr(s.value.partialRange)]:y(bt(r.value)),$=()=>{if(Array.isArray(r.value)){const y=zn(r.value[0],e.weekStart),j=r.value[1]?zn(r.value[1],e.weekStart):[];return[y.map(se=>ne(se)),j.map(se=>ne(se))]}return zn(r.value,e.weekStart).map(y=>ne(y))},R=(y,j)=>z(bt(oe(y)),!1,j),W=y=>{const j=$();return y?j:n("update:model-value",$())},J=(y=!1)=>(y||N(),e.monthPicker?R(x,y):e.timePicker?R(g,y):e.yearPicker?R(Te,y):e.weekPicker?W(y):z(Y(y),!0,y));return{inputValue:d,internalModelValue:r,checkBeforeEmit:()=>r.value?s.value.enabled?s.value.partialRange?r.value.length>=1:r.value.length===2:!!r.value:!1,parseExternalModelValue:w,formatInputValue:N,emitModelValue:J}},q1=(n,e)=>{const{defaultedFilters:t,propDates:r}=Ze(n),{validateMonthYearInRange:a}=co(n),s=(u,h)=>{let p=u;return t.value.months.includes(Pe(p))?(p=h?rn(u,1):ar(u,1),s(p,h)):p},i=(u,h)=>{let p=u;return t.value.years.includes(Te(p))?(p=h?tl(u,1):tp(u,1),i(p,h)):p},l=(u,h=!1)=>{const p=qe(ne(),{month:n.month,year:n.year});let m=u?rn(p,1):ar(p,1);n.disableYearSelect&&(m=wn(m,n.year));let f=Pe(m),g=Te(m);t.value.months.includes(f)&&(m=s(m,u),f=Pe(m),g=Te(m)),t.value.years.includes(g)&&(m=i(m,u),g=Te(m)),a(f,g,u,n.preventMinMaxNavigation)&&c(f,g,h)},c=(u,h,p)=>{e("update-month-year",{month:u,year:h,fromNav:p})},d=o.computed(()=>u=>yp(qe(ne(),{month:n.month,year:n.year}),r.value.maxDate,r.value.minDate,n.preventMinMaxNavigation,u));return{handleMonthYearChange:l,isDisabled:d,updateMonthYear:c}},is={multiCalendars:{type:[Boolean,Number,String,Object],default:void 0},modelValue:{type:[String,Date,Array,Object,Number],default:null},modelType:{type:String,default:null},position:{type:String,default:"center"},dark:{type:Boolean,default:!1},format:{type:[String,Function],default:()=>null},autoPosition:{type:[Boolean,String],default:!0},altPosition:{type:Function,default:null},transitions:{type:[Boolean,Object],default:!0},formatLocale:{type:Object,default:null},utc:{type:[Boolean,String],default:!1},ariaLabels:{type:Object,default:()=>({})},offset:{type:[Number,String],default:10},hideNavigation:{type:Array,default:()=>[]},timezone:{type:[String,Object],default:null},vertical:{type:Boolean,default:!1},disableMonthYearSelect:{type:Boolean,default:!1},disableYearSelect:{type:Boolean,default:!1},dayClass:{type:Function,default:null},yearRange:{type:Array,default:()=>[1900,2100]},enableTimePicker:{type:Boolean,default:!0},autoApply:{type:Boolean,default:!1},disabledDates:{type:[Array,Function],default:()=>[]},monthNameFormat:{type:String,default:"short"},startDate:{type:[Date,String],default:null},startTime:{type:[Object,Array],default:null},hideOffsetDates:{type:Boolean,default:!1},noToday:{type:Boolean,default:!1},disabledWeekDays:{type:Array,default:()=>[]},allowedDates:{type:Array,default:null},nowButtonLabel:{type:String,default:"Now"},markers:{type:Array,default:()=>[]},escClose:{type:Boolean,default:!0},spaceConfirm:{type:Boolean,default:!0},monthChangeOnArrows:{type:Boolean,default:!0},presetDates:{type:Array,default:()=>[]},flow:{type:Array,default:()=>[]},partialFlow:{type:Boolean,default:!1},preventMinMaxNavigation:{type:Boolean,default:!1},reverseYears:{type:Boolean,default:!1},weekPicker:{type:Boolean,default:!1},filters:{type:Object,default:()=>({})},arrowNavigation:{type:Boolean,default:!1},highlight:{type:[Function,Object],default:null},teleport:{type:[Boolean,String,Object],default:null},teleportCenter:{type:Boolean,default:!1},locale:{type:String,default:"en-Us"},weekNumName:{type:String,default:"W"},weekStart:{type:[Number,String],default:1},weekNumbers:{type:[String,Function,Object],default:null},monthChangeOnScroll:{type:[Boolean,String],default:!0},dayNames:{type:[Function,Array],default:null},monthPicker:{type:Boolean,default:!1},customProps:{type:Object,default:null},yearPicker:{type:Boolean,default:!1},modelAuto:{type:Boolean,default:!1},selectText:{type:String,default:"Select"},cancelText:{type:String,default:"Cancel"},previewFormat:{type:[String,Function],default:()=>""},multiDates:{type:[Object,Boolean],default:!1},ignoreTimeValidation:{type:Boolean,default:!1},minDate:{type:[Date,String],default:null},maxDate:{type:[Date,String],default:null},minTime:{type:Object,default:null},maxTime:{type:Object,default:null},name:{type:String,default:null},placeholder:{type:String,default:""},hideInputIcon:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},alwaysClearable:{type:Boolean,default:!1},state:{type:Boolean,default:null},required:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},timePicker:{type:Boolean,default:!1},enableSeconds:{type:Boolean,default:!1},is24:{type:Boolean,default:!0},noHoursOverlay:{type:Boolean,default:!1},noMinutesOverlay:{type:Boolean,default:!1},noSecondsOverlay:{type:Boolean,default:!1},hoursGridIncrement:{type:[String,Number],default:1},minutesGridIncrement:{type:[String,Number],default:5},secondsGridIncrement:{type:[String,Number],default:5},hoursIncrement:{type:[Number,String],default:1},minutesIncrement:{type:[Number,String],default:1},secondsIncrement:{type:[Number,String],default:1},range:{type:[Boolean,Object],default:!1},uid:{type:String,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inline:{type:[Boolean,Object],default:!1},textInput:{type:[Boolean,Object],default:!1},sixWeeks:{type:[Boolean,String],default:!1},actionRow:{type:Object,default:()=>({})},focusStartDate:{type:Boolean,default:!1},disabledTimes:{type:[Function,Array],default:void 0},timePickerInline:{type:Boolean,default:!1},calendar:{type:Function,default:null},config:{type:Object,default:void 0},quarterPicker:{type:Boolean,default:!1},yearFirst:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},onInternalModelChange:{type:[Function,Object],default:null},enableMinutes:{type:Boolean,default:!0},ui:{type:Object,default:()=>({})}},dn={...is,shadow:{type:Boolean,default:!1},flowStep:{type:Number,default:0},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},menuWrapRef:{type:Object,default:null},getInputRect:{type:Function,default:()=>({})},isTextInputDate:{type:Boolean,default:!1},isMobile:{type:Boolean,default:void 0}},G1=["title"],K1=["disabled"],X1=o.defineComponent({compatConfig:{MODE:3},__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},...dn},emits:["close-picker","select-date","select-now","invalid-select"],setup(n,{emit:e}){const t=e,r=n,{defaultedActionRow:a,defaultedPreviewFormat:s,defaultedMultiCalendars:i,defaultedTextInput:l,defaultedInline:c,defaultedRange:d,defaultedMultiDates:u}=Ze(r),{isTimeValid:h,isMonthValid:p}=co(r),{buildMatrix:m}=io(),f=o.ref(null),g=o.ref(null),x=o.ref(!1),E=o.ref({}),C=o.ref(null),T=o.ref(null);o.onMounted(()=>{r.arrowNavigation&&m([mt(f),mt(g)],"actionRow"),F(),window.addEventListener("resize",F)}),o.onUnmounted(()=>{window.removeEventListener("resize",F)});const F=()=>{x.value=!1,setTimeout(()=>{var w,k;const _=(w=C.value)==null?void 0:w.getBoundingClientRect(),A=(k=T.value)==null?void 0:k.getBoundingClientRect();_&&A&&(E.value.maxWidth=`${A.width-_.width-20}px`),x.value=!0},0)},I=o.computed(()=>d.value.enabled&&!d.value.partialRange&&r.internalModelValue?r.internalModelValue.length===2:!0),O=o.computed(()=>!h.value(r.internalModelValue)||!p.value(r.internalModelValue)||!I.value),P=()=>{const w=s.value;return r.timePicker||r.monthPicker,w(bt(r.internalModelValue))},M=()=>{const w=r.internalModelValue;return i.value.count>0?`${v(w[0])} - ${v(w[1])}`:[v(w[0]),v(w[1])]},v=w=>bp(w,s.value,r.formatLocale,l.value.rangeSeparator,r.modelAuto,s.value),b=o.computed(()=>!r.internalModelValue||!r.menuMount?"":typeof s.value=="string"?Array.isArray(r.internalModelValue)?r.internalModelValue.length===2&&r.internalModelValue[1]?M():u.value.enabled?r.internalModelValue.map(w=>`${v(w)}`):r.modelAuto?`${v(r.internalModelValue[0])}`:`${v(r.internalModelValue[0])} -`:v(r.internalModelValue):P()),D=()=>u.value.enabled?"; ":" - ",Y=o.computed(()=>Array.isArray(b.value)?b.value.join(D()):b.value),K=()=>{h.value(r.internalModelValue)&&p.value(r.internalModelValue)&&I.value?t("select-date"):t("invalid-select")};return(w,k)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"actionRowRef",ref:T,class:"dp__action_row"},[w.$slots["action-row"]?o.renderSlot(w.$slots,"action-row",o.normalizeProps(o.mergeProps({key:0},{internalModelValue:w.internalModelValue,disabled:O.value,selectDate:()=>w.$emit("select-date"),closePicker:()=>w.$emit("close-picker")}))):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.unref(a).showPreview?(o.openBlock(),o.createElementBlock("div",{key:0,class:"dp__selection_preview",title:Y.value,style:o.normalizeStyle(E.value)},[w.$slots["action-preview"]&&x.value?o.renderSlot(w.$slots,"action-preview",{key:0,value:w.internalModelValue}):o.createCommentVNode("",!0),!w.$slots["action-preview"]&&x.value?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(Y.value),1)],64)):o.createCommentVNode("",!0)],12,G1)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"actionBtnContainer",ref:C,class:"dp__action_buttons","data-dp-element":"action-row"},[w.$slots["action-buttons"]?o.renderSlot(w.$slots,"action-buttons",{key:0,value:w.internalModelValue}):o.createCommentVNode("",!0),w.$slots["action-buttons"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[!o.unref(c).enabled&&o.unref(a).showCancel?(o.openBlock(),o.createElementBlock("button",{key:0,ref_key:"cancelButtonRef",ref:f,type:"button",class:"dp__action_button dp__action_cancel",onClick:k[0]||(k[0]=_=>w.$emit("close-picker")),onKeydown:k[1]||(k[1]=_=>o.unref(Ot)(_,()=>w.$emit("close-picker")))},o.toDisplayString(w.cancelText),545)):o.createCommentVNode("",!0),o.unref(a).showNow?(o.openBlock(),o.createElementBlock("button",{key:1,type:"button",class:"dp__action_button dp__action_cancel",onClick:k[2]||(k[2]=_=>w.$emit("select-now")),onKeydown:k[3]||(k[3]=_=>o.unref(Ot)(_,()=>w.$emit("select-now")))},o.toDisplayString(w.nowButtonLabel),33)):o.createCommentVNode("",!0),o.unref(a).showSelect?(o.openBlock(),o.createElementBlock("button",{key:2,ref_key:"selectButtonRef",ref:g,type:"button",class:"dp__action_button dp__action_select",disabled:O.value,"data-test-id":"select-button",onKeydown:k[4]||(k[4]=_=>o.unref(Ot)(_,()=>K())),onClick:K},o.toDisplayString(w.selectText),41,K1)):o.createCommentVNode("",!0)],64))],512)],64))],512))}}),Q1=["role","aria-label","tabindex"],Z1={class:"dp__selection_grid_header"},J1=["aria-selected","aria-disabled","data-test-id","onClick","onKeydown","onMouseover"],ew=["aria-label"],Gr=o.defineComponent({__name:"SelectionOverlay",props:{items:{},type:{},isLast:{type:Boolean},arrowNavigation:{type:Boolean},skipButtonRef:{type:Boolean},headerRefs:{},hideNavigation:{},escClose:{type:Boolean},useRelative:{type:Boolean},height:{},textInput:{type:[Boolean,Object]},config:{},noOverlayFocus:{type:Boolean},focusValue:{},menuWrapRef:{},ariaLabels:{},overlayLabel:{}},emits:["selected","toggle","reset-flow","hover-value"],setup(n,{expose:e,emit:t}){const{setSelectionGrid:r,buildMultiLevelMatrix:a,setMonthPicker:s}=io(),i=t,l=n,{defaultedAriaLabels:c,defaultedTextInput:d,defaultedConfig:u,handleEventPropagation:h}=Ze(l),{hideNavigationButtons:p}=ds(),m=o.ref(!1),f=o.ref(null),g=o.ref(null),x=o.ref([]),E=o.ref(),C=o.ref(null),T=o.ref(0),F=o.ref(null);o.onBeforeUpdate(()=>{f.value=null}),o.onMounted(()=>{o.nextTick().then(()=>Y()),l.noOverlayFocus||O(),I(!0)}),o.onUnmounted(()=>I(!1));const I=$=>{var R;l.arrowNavigation&&((R=l.headerRefs)!=null&&R.length?s($):r($))},O=()=>{var $;const R=mt(g);R&&(d.value.enabled||(f.value?($=f.value)==null||$.focus({preventScroll:!0}):R.focus({preventScroll:!0})),m.value=R.clientHeight<R.scrollHeight)},P=o.computed(()=>({dp__overlay:!0,"dp--overlay-absolute":!l.useRelative,"dp--overlay-relative":l.useRelative})),M=o.computed(()=>l.useRelative?{height:`${l.height}px`,width:"var(--dp-menu-min-width)"}:void 0),v=o.computed(()=>({dp__overlay_col:!0})),b=o.computed(()=>({dp__btn:!0,dp__button:!0,dp__overlay_action:!0,dp__over_action_scroll:m.value,dp__button_bottom:l.isLast})),D=o.computed(()=>{var $,R;return{dp__overlay_container:!0,dp__container_flex:(($=l.items)==null?void 0:$.length)<=6,dp__container_block:((R=l.items)==null?void 0:R.length)>6}});o.watch(()=>l.items,()=>Y(!1),{deep:!0});const Y=($=!0)=>{o.nextTick().then(()=>{const R=mt(f),W=mt(g),J=mt(C),y=mt(F),j=J?J.getBoundingClientRect().height:0;W&&(W.getBoundingClientRect().height?T.value=W.getBoundingClientRect().height-j:T.value=u.value.modeHeight-j),R&&y&&$&&(y.scrollTop=R.offsetTop-y.offsetTop-(T.value/2-R.getBoundingClientRect().height)-j)})},K=$=>{$.disabled||i("selected",$.value)},w=()=>{i("toggle"),i("reset-flow")},k=$=>{l.escClose&&(w(),h($))},_=($,R,W,J)=>{$&&((R.active||R.value===l.focusValue)&&(f.value=$),l.arrowNavigation&&(Array.isArray(x.value[W])?x.value[W][J]=$:x.value[W]=[$],A()))},A=()=>{var $,R;const W=($=l.headerRefs)!=null&&$.length?[l.headerRefs].concat(x.value):x.value.concat([l.skipButtonRef?[]:[C.value]]);a(bt(W),(R=l.headerRefs)!=null&&R.length?"monthPicker":"selectionGrid")},N=$=>{l.arrowNavigation||ro($,u.value,!0)},L=$=>{E.value=$,i("hover-value",$)},q=()=>{if(w(),!l.isLast){const $=vl(l.menuWrapRef??null,"action-row");if($){const R=lp($);R==null||R.focus()}}},z=$=>{switch($.key){case Ke.esc:return k($);case Ke.arrowLeft:return N($);case Ke.arrowRight:return N($);case Ke.arrowUp:return N($);case Ke.arrowDown:return N($);default:return}},oe=$=>{if($.key===Ke.enter)return w();if($.key===Ke.tab)return q()};return e({focusGrid:O}),($,R)=>{var W;return o.openBlock(),o.createElementBlock("div",{ref_key:"gridWrapRef",ref:g,class:o.normalizeClass(P.value),style:o.normalizeStyle(M.value),role:$.useRelative?void 0:"dialog","aria-label":$.overlayLabel,tabindex:$.useRelative?void 0:"0",onKeydown:z,onClick:R[0]||(R[0]=o.withModifiers(()=>{},["prevent"]))},[o.createElementVNode("div",{ref_key:"containerRef",ref:F,class:o.normalizeClass(D.value),style:o.normalizeStyle({"--dp-overlay-height":`${T.value}px`}),role:"grid"},[o.createElementVNode("div",Z1,[o.renderSlot($.$slots,"header")]),$.$slots.overlay?o.renderSlot($.$slots,"overlay",{key:0}):(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:1},o.renderList($.items,(J,y)=>(o.openBlock(),o.createElementBlock("div",{key:y,class:o.normalizeClass(["dp__overlay_row",{dp__flex_row:$.items.length>=3}]),role:"row"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(J,(j,se)=>(o.openBlock(),o.createElementBlock("div",{key:j.value,ref_for:!0,ref:_e=>_(_e,j,y,se),role:"gridcell",class:o.normalizeClass(v.value),"aria-selected":j.active||void 0,"aria-disabled":j.disabled||void 0,tabindex:"0","data-test-id":j.text,onClick:o.withModifiers(_e=>K(j),["prevent"]),onKeydown:_e=>o.unref(Ot)(_e,()=>K(j),!0),onMouseover:_e=>L(j.value)},[o.createElementVNode("div",{class:o.normalizeClass(j.className)},[$.$slots.item?o.renderSlot($.$slots,"item",{key:0,item:j}):o.createCommentVNode("",!0),$.$slots.item?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(j.text),1)],64))],2)],42,J1))),128))],2))),128))],6),$.$slots["button-icon"]?o.withDirectives((o.openBlock(),o.createElementBlock("button",{key:0,ref_key:"toggleButton",ref:C,type:"button","aria-label":(W=o.unref(c))==null?void 0:W.toggleOverlay,class:o.normalizeClass(b.value),tabindex:"0",onClick:w,onKeydown:oe},[o.renderSlot($.$slots,"button-icon")],42,ew)),[[o.vShow,!o.unref(p)($.hideNavigation,$.type)]]):o.createCommentVNode("",!0)],46,Q1)}}}),tw=["data-dp-mobile"],ls=o.defineComponent({__name:"InstanceWrap",props:{multiCalendars:{},stretch:{type:Boolean},collapse:{type:Boolean},isMobile:{type:Boolean}},setup(n){const e=n,t=o.computed(()=>e.multiCalendars>0?[...Array(e.multiCalendars).keys()]:[0]),r=o.computed(()=>({dp__instance_calendar:e.multiCalendars>0}));return(a,s)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass({dp__menu_inner:!a.stretch,"dp--menu--inner-stretched":a.stretch,dp__flex_display:a.multiCalendars>0,"dp--flex-display-collapsed":a.collapse}),"data-dp-mobile":a.isMobile},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.value,(i,l)=>(o.openBlock(),o.createElementBlock("div",{key:i,class:o.normalizeClass(r.value)},[o.renderSlot(a.$slots,"default",{instance:i,index:l})],2))),128))],10,tw))}}),nw=["data-dp-element","aria-label","aria-disabled"],Kr=o.defineComponent({compatConfig:{MODE:3},__name:"ArrowBtn",props:{ariaLabel:{},elName:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(n,{emit:e}){const t=e,r=o.ref(null);return o.onMounted(()=>t("set-ref",r)),(a,s)=>(o.openBlock(),o.createElementBlock("button",{ref_key:"elRef",ref:r,type:"button","data-dp-element":a.elName,class:"dp__btn dp--arrow-btn-nav",tabindex:"0","aria-label":a.ariaLabel,"aria-disabled":a.disabled||void 0,onClick:s[0]||(s[0]=i=>a.$emit("activate")),onKeydown:s[1]||(s[1]=i=>o.unref(Ot)(i,()=>a.$emit("activate"),!0))},[o.createElementVNode("span",{class:o.normalizeClass(["dp__inner_nav",{dp__inner_nav_disabled:a.disabled}])},[o.renderSlot(a.$slots,"default")],2)],40,nw))}}),ow=["aria-label","data-test-id"],Sp=o.defineComponent({__name:"YearModePicker",props:{...dn,showYearPicker:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},instance:{type:Number,default:0},year:{type:Number,default:0},isDisabled:{type:Function,default:()=>!1}},emits:["toggle-year-picker","year-select","handle-year"],setup(n,{emit:e}){const t=e,r=n,{showRightIcon:a,showLeftIcon:s}=ds(),{defaultedConfig:i,defaultedMultiCalendars:l,defaultedAriaLabels:c,defaultedTransitions:d,defaultedUI:u}=Ze(r),{showTransition:h,transitionName:p}=Xr(d),m=o.ref(!1),f=(E=!1,C)=>{m.value=!m.value,t("toggle-year-picker",{flow:E,show:C})},g=E=>{m.value=!1,t("year-select",E)},x=(E=!1)=>{t("handle-year",E)};return(E,C)=>{var T,F,I,O,P;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",{class:o.normalizeClass(["dp--year-mode-picker",{"dp--hidden-el":m.value}])},[o.unref(s)(o.unref(l),n.instance)?(o.openBlock(),o.createBlock(Kr,{key:0,ref:"mpPrevIconRef","aria-label":(T=o.unref(c))==null?void 0:T.prevYear,disabled:n.isDisabled(!1),class:o.normalizeClass((F=o.unref(u))==null?void 0:F.navBtnPrev),onActivate:C[0]||(C[0]=M=>x(!1))},{default:o.withCtx(()=>[E.$slots["arrow-left"]?o.renderSlot(E.$slots,"arrow-left",{key:0}):o.createCommentVNode("",!0),E.$slots["arrow-left"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(ul),{key:1}))]),_:3},8,["aria-label","disabled","class"])):o.createCommentVNode("",!0),o.createElementVNode("button",{ref:"mpYearButtonRef",class:"dp__btn dp--year-select",type:"button","aria-label":`${n.year}-${(I=o.unref(c))==null?void 0:I.openYearsOverlay}`,"data-test-id":`year-mode-btn-${n.instance}`,onClick:C[1]||(C[1]=()=>f(!1)),onKeydown:C[2]||(C[2]=o.withKeys(()=>f(!1),["enter"]))},[E.$slots.year?o.renderSlot(E.$slots,"year",{key:0,year:n.year}):o.createCommentVNode("",!0),E.$slots.year?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(n.year),1)],64))],40,ow),o.unref(a)(o.unref(l),n.instance)?(o.openBlock(),o.createBlock(Kr,{key:1,ref:"mpNextIconRef","aria-label":(O=o.unref(c))==null?void 0:O.nextYear,disabled:n.isDisabled(!0),class:o.normalizeClass((P=o.unref(u))==null?void 0:P.navBtnNext),onActivate:C[3]||(C[3]=M=>x(!0))},{default:o.withCtx(()=>[E.$slots["arrow-right"]?o.renderSlot(E.$slots,"arrow-right",{key:0}):o.createCommentVNode("",!0),E.$slots["arrow-right"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(hl),{key:1}))]),_:3},8,["aria-label","disabled","class"])):o.createCommentVNode("",!0)],2),o.createVNode(o.Transition,{name:o.unref(p)(n.showYearPicker),css:o.unref(h)},{default:o.withCtx(()=>{var M,v;return[n.showYearPicker?(o.openBlock(),o.createBlock(Gr,{key:0,items:n.items,"text-input":E.textInput,"esc-close":E.escClose,config:E.config,"is-last":E.autoApply&&!o.unref(i).keepActionRow,"hide-navigation":E.hideNavigation,"aria-labels":E.ariaLabels,"overlay-label":(v=(M=o.unref(c))==null?void 0:M.yearPicker)==null?void 0:v.call(M,!0),type:"year",onToggle:f,onSelected:C[4]||(C[4]=b=>g(b))},o.createSlots({"button-icon":o.withCtx(()=>[E.$slots["calendar-icon"]?o.renderSlot(E.$slots,"calendar-icon",{key:0}):o.createCommentVNode("",!0),E.$slots["calendar-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(sr),{key:1}))]),_:2},[E.$slots["year-overlay-value"]?{name:"item",fn:o.withCtx(({item:b})=>[o.renderSlot(E.$slots,"year-overlay-value",{text:b.text,value:b.value})]),key:"0"}:void 0]),1032,["items","text-input","esc-close","config","is-last","hide-navigation","aria-labels","overlay-label"])):o.createCommentVNode("",!0)]}),_:3},8,["name","css"])],64)}}}),Nl=(n,e,t)=>{if(e.value&&Array.isArray(e.value))if(e.value.some(r=>Le(n,r))){const r=e.value.filter(a=>!Le(a,n));e.value=r.length?r:null}else(t&&+t>e.value.length||!t)&&e.value.push(n);else e.value=[n]},Pl=(n,e,t)=>{let r=n.value?n.value.slice():[];return r.length===2&&r[1]!==null&&(r=[]),r.length?(st(e,r[0])?r.unshift(e):r[1]=e,t("range-end",e)):(r=[e],t("range-start",e)),r},cs=(n,e,t,r)=>{n&&(n[0]&&n[1]&&t&&e("auto-apply"),n[0]&&!n[1]&&r&&t&&e("auto-apply"))},xp=n=>{Array.isArray(n.value)&&n.value.length<=2&&n.range?n.modelValue.value=n.value.map(e=>zt(ne(e),n.timezone)):Array.isArray(n.value)||(n.modelValue.value=zt(ne(n.value),n.timezone))},Bp=(n,e,t,r)=>Array.isArray(e.value)&&(e.value.length===2||e.value.length===1&&r.value.partialRange)?r.value.fixedStart&&(dt(n,e.value[0])||Le(n,e.value[0]))?[e.value[0],n]:r.value.fixedEnd&&(st(n,e.value[1])||Le(n,e.value[1]))?[n,e.value[1]]:(t("invalid-fixed-range",n),e.value):[],Tp=({multiCalendars:n,range:e,highlight:t,propDates:r,calendars:a,modelValue:s,props:i,filters:l,year:c,month:d,emit:u})=>{const h=o.computed(()=>bl(i.yearRange,i.locale,i.reverseYears)),p=o.ref([!1]),m=o.computed(()=>(b,D)=>{const Y=qe(cn(new Date),{month:d.value(b),year:c.value(b)}),K=D?Nh(Y):Hr(Y);return yp(K,r.value.maxDate,r.value.minDate,i.preventMinMaxNavigation,D)}),f=()=>Array.isArray(s.value)&&n.value.solo&&s.value[1],g=()=>{for(let b=0;b<n.value.count;b++)if(b===0)a.value[b]=a.value[0];else if(b===n.value.count-1&&f())a.value[b]={month:Pe(s.value[1]),year:Te(s.value[1])};else{const D=qe(ne(),a.value[b-1]);a.value[b]={month:Pe(D),year:Te(tl(D,1))}}},x=b=>{if(!b)return g();const D=qe(ne(),a.value[b]);return a.value[0].year=Te(tp(D,n.value.count-1)),g()},E=(b,D)=>{const Y=fk(D,b);return e.value.showLastInRange&&Y>1?D:b},C=b=>i.focusStartDate||n.value.solo?b[0]:b[1]?E(b[0],b[1]):b[0],T=()=>{if(s.value){const b=Array.isArray(s.value)?C(s.value):s.value;a.value[0]={month:Pe(b),year:Te(b)}}},F=()=>{T(),n.value.count&&g()};o.watch(s,(b,D)=>{i.isTextInputDate&&JSON.stringify(b??{})!==JSON.stringify(D??{})&&F()}),o.onMounted(()=>{F()});const I=(b,D)=>{a.value[D].year=b,u("update-month-year",{instance:D,year:b,month:a.value[D].month}),n.value.count&&!n.value.solo&&x(D)},O=o.computed(()=>b=>lr(h.value,D=>{var Y;const K=c.value(b)===D.value,w=Ur(D.value,cr(r.value.minDate),cr(r.value.maxDate))||((Y=l.value.years)==null?void 0:Y.includes(c.value(b))),k=Tl(t.value,D.value);return{active:K,disabled:w,highlighted:k}})),P=(b,D)=>{I(b,D),v(D)},M=(b,D=!1)=>{if(!m.value(b,D)){const Y=D?c.value(b)+1:c.value(b)-1;I(Y,b)}},v=(b,D=!1,Y)=>{D||u("reset-flow"),Y!==void 0?p.value[b]=Y:p.value[b]=!p.value[b],p.value[b]?u("overlay-toggle",{open:!0,overlay:xt.year}):(u("overlay-closed"),u("overlay-toggle",{open:!1,overlay:xt.year}))};return{isDisabled:m,groupedYears:O,showYearPicker:p,selectYear:I,toggleYearPicker:v,handleYearSelect:P,handleYear:M}},rw=(n,e)=>{const{defaultedMultiCalendars:t,defaultedAriaLabels:r,defaultedTransitions:a,defaultedConfig:s,defaultedRange:i,defaultedHighlight:l,propDates:c,defaultedTz:d,defaultedFilters:u,defaultedMultiDates:h}=Ze(n),p=()=>{n.isTextInputDate&&F(Te(ne(n.startDate)),0)},{modelValue:m,year:f,month:g,calendars:x}=Qr(n,e,p),E=o.computed(()=>rp(n.formatLocale,n.locale,n.monthNameFormat)),C=o.ref(null),{checkMinMaxRange:T}=co(n),{selectYear:F,groupedYears:I,showYearPicker:O,toggleYearPicker:P,handleYearSelect:M,handleYear:v,isDisabled:b}=Tp({modelValue:m,multiCalendars:t,range:i,highlight:l,calendars:x,year:f,propDates:c,month:g,filters:u,props:n,emit:e});o.onMounted(()=>{n.startDate&&(m.value&&n.focusStartDate||!m.value)&&F(Te(ne(n.startDate)),0)});const D=R=>R?{month:Pe(R),year:Te(R)}:{month:null,year:null},Y=()=>m.value?Array.isArray(m.value)?m.value.map(R=>D(R)):D(m.value):D(),K=(R,W)=>{const J=x.value[R],y=Y();return Array.isArray(y)?y.some(j=>j.year===(J==null?void 0:J.year)&&j.month===W):(J==null?void 0:J.year)===y.year&&W===y.month},w=(R,W,J)=>{var y,j;const se=Y();return Array.isArray(se)?f.value(W)===((y=se[J])==null?void 0:y.year)&&R===((j=se[J])==null?void 0:j.month):!1},k=(R,W)=>{if(i.value.enabled){const J=Y();if(Array.isArray(m.value)&&Array.isArray(J)){const y=w(R,W,0)||w(R,W,1),j=Fn(cn(ne()),R,f.value(W));return Wr(m.value,C.value,j)&&!y}return!1}return!1},_=o.computed(()=>R=>lr(E.value,W=>{var J;const y=K(R,W.value),j=Ur(W.value,pp(f.value(R),c.value.minDate),fp(f.value(R),c.value.maxDate))||B1(c.value.disabledDates,f.value(R),W.value)||((J=u.value.months)==null?void 0:J.includes(W.value))||!T1(c.value.allowedDates,f.value(R),W.value),se=k(W.value,R),_e=vp(l.value,W.value,f.value(R));return{active:y,disabled:j,isBetween:se,highlighted:_e}})),A=(R,W)=>Fn(cn(ne()),R,f.value(W)),N=(R,W)=>{const J=m.value?m.value:cn(new Date);m.value=Fn(J,R,f.value(W)),e("auto-apply"),e("update-flow-step")},L=(R,W)=>{const J=A(R,W);i.value.fixedEnd||i.value.fixedStart?m.value=Bp(J,m,e,i):m.value?T(J,m.value)&&(m.value=Pl(m,A(R,W),e)):m.value=[A(R,W)],o.nextTick().then(()=>{cs(m.value,e,n.autoApply,n.modelAuto)})},q=(R,W)=>{Nl(A(R,W),m,h.value.limit),e("auto-apply",!0)},z=(R,W)=>(x.value[W].month=R,$(W,x.value[W].year,R),h.value.enabled?q(R,W):i.value.enabled?L(R,W):N(R,W)),oe=(R,W)=>{F(R,W),$(W,R,null)},$=(R,W,J)=>{let y=J;if(!y&&y!==0){const j=Y();y=Array.isArray(j)?j[R].month:j.month}e("update-month-year",{instance:R,year:W,month:y})};return{groupedMonths:_,groupedYears:I,year:f,isDisabled:b,defaultedMultiCalendars:t,defaultedAriaLabels:r,defaultedTransitions:a,defaultedConfig:s,showYearPicker:O,modelValue:m,presetDate:(R,W)=>{xp({value:R,modelValue:m,range:i.value.enabled,timezone:W?void 0:d.value.timezone}),e("auto-apply")},setHoverDate:(R,W)=>{C.value=A(R,W)},selectMonth:z,selectYear:oe,toggleYearPicker:P,handleYearSelect:M,handleYear:v,getModelMonthYear:Y}},aw=o.defineComponent({compatConfig:{MODE:3},__name:"MonthPicker",props:{...dn},emits:["update:internal-model-value","overlay-closed","reset-flow","range-start","range-end","auto-apply","update-month-year","update-flow-step","mount","invalid-fixed-range","overlay-toggle"],setup(n,{expose:e,emit:t}){const r=t,a=o.useSlots(),s=Ut(a,"yearMode"),i=n;o.onMounted(()=>{i.shadow||r("mount",null)});const{groupedMonths:l,groupedYears:c,year:d,isDisabled:u,defaultedMultiCalendars:h,defaultedConfig:p,showYearPicker:m,modelValue:f,presetDate:g,setHoverDate:x,selectMonth:E,selectYear:C,toggleYearPicker:T,handleYearSelect:F,handleYear:I,getModelMonthYear:O}=rw(i,r);return e({getSidebarProps:()=>({modelValue:f,year:d,getModelMonthYear:O,selectMonth:E,selectYear:C,handleYear:I}),presetDate:g,toggleYearPicker:P=>T(0,P)}),(P,M)=>(o.openBlock(),o.createBlock(ls,{"multi-calendars":o.unref(h).count,collapse:P.collapse,stretch:"","is-mobile":P.isMobile},{default:o.withCtx(({instance:v})=>[P.$slots["top-extra"]?o.renderSlot(P.$slots,"top-extra",{key:0,value:P.internalModelValue}):o.createCommentVNode("",!0),P.$slots["month-year"]?o.renderSlot(P.$slots,"month-year",o.normalizeProps(o.mergeProps({key:1},{year:o.unref(d),months:o.unref(l)(v),years:o.unref(c)(v),selectMonth:o.unref(E),selectYear:o.unref(C),instance:v}))):(o.openBlock(),o.createBlock(Gr,{key:2,items:o.unref(l)(v),"arrow-navigation":P.arrowNavigation,"is-last":P.autoApply&&!o.unref(p).keepActionRow,"esc-close":P.escClose,height:o.unref(p).modeHeight,config:P.config,"no-overlay-focus":!!(P.noOverlayFocus||P.textInput),"use-relative":"",type:"month",onSelected:b=>o.unref(E)(b,v),onHoverValue:b=>o.unref(x)(b,v)},o.createSlots({header:o.withCtx(()=>[o.createVNode(Sp,o.mergeProps(P.$props,{items:o.unref(c)(v),instance:v,"show-year-picker":o.unref(m)[v],year:o.unref(d)(v),"is-disabled":b=>o.unref(u)(v,b),onHandleYear:b=>o.unref(I)(v,b),onYearSelect:b=>o.unref(F)(b,v),onToggleYearPicker:b=>o.unref(T)(v,b==null?void 0:b.flow,b==null?void 0:b.show)}),o.createSlots({_:2},[o.renderList(o.unref(s),(b,D)=>({name:b,fn:o.withCtx(Y=>[o.renderSlot(P.$slots,b,o.normalizeProps(o.guardReactiveProps(Y)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),_:2},[P.$slots["month-overlay-value"]?{name:"item",fn:o.withCtx(({item:b})=>[o.renderSlot(P.$slots,"month-overlay-value",{text:b.text,value:b.value})]),key:"0"}:void 0]),1032,["items","arrow-navigation","is-last","esc-close","height","config","no-overlay-focus","onSelected","onHoverValue"]))]),_:3},8,["multi-calendars","collapse","is-mobile"]))}}),sw=(n,e)=>{const t=()=>{n.isTextInputDate&&(u.value=Te(ne(n.startDate)))},{modelValue:r}=Qr(n,e,t),a=o.ref(null),{defaultedHighlight:s,defaultedMultiDates:i,defaultedFilters:l,defaultedRange:c,propDates:d}=Ze(n),u=o.ref();o.onMounted(()=>{n.startDate&&(r.value&&n.focusStartDate||!r.value)&&(u.value=Te(ne(n.startDate)))});const h=E=>Array.isArray(r.value)?r.value.some(C=>Te(C)===E):r.value?Te(r.value)===E:!1,p=E=>c.value.enabled&&Array.isArray(r.value)?Wr(r.value,a.value,x(E)):!1,m=E=>d.value.allowedDates instanceof Map?d.value.allowedDates.size?d.value.allowedDates.has(`${E}`):!1:!0,f=E=>d.value.disabledDates instanceof Map?d.value.disabledDates.size?d.value.disabledDates.has(`${E}`):!1:!0,g=o.computed(()=>lr(bl(n.yearRange,n.locale,n.reverseYears),E=>{const C=h(E.value),T=Ur(E.value,cr(d.value.minDate),cr(d.value.maxDate))||l.value.years.includes(E.value)||!m(E.value)||f(E.value),F=p(E.value)&&!C,I=Tl(s.value,E.value);return{active:C,disabled:T,isBetween:F,highlighted:I}})),x=E=>wn(cn(Hr(new Date)),E);return{groupedYears:g,modelValue:r,focusYear:u,setHoverValue:E=>{a.value=wn(cn(new Date),E)},selectYear:E=>{var C;if(e("update-month-year",{instance:0,year:E}),i.value.enabled)return r.value?Array.isArray(r.value)&&(((C=r.value)==null?void 0:C.map(T=>Te(T))).includes(E)?r.value=r.value.filter(T=>Te(T)!==E):r.value.push(wn(kt(ne()),E))):r.value=[wn(kt(Hr(ne())),E)],e("auto-apply",!0);c.value.enabled?(r.value=Pl(r,x(E),e),o.nextTick().then(()=>{cs(r.value,e,n.autoApply,n.modelAuto)})):(r.value=x(E),e("auto-apply"))}}},iw=o.defineComponent({compatConfig:{MODE:3},__name:"YearPicker",props:{...dn},emits:["update:internal-model-value","reset-flow","range-start","range-end","auto-apply","update-month-year"],setup(n,{expose:e,emit:t}){const r=t,a=n,{groupedYears:s,modelValue:i,focusYear:l,selectYear:c,setHoverValue:d}=sw(a,r),{defaultedConfig:u}=Ze(a);return e({getSidebarProps:()=>({modelValue:i,selectYear:c})}),(h,p)=>(o.openBlock(),o.createElementBlock("div",null,[h.$slots["top-extra"]?o.renderSlot(h.$slots,"top-extra",{key:0,value:h.internalModelValue}):o.createCommentVNode("",!0),h.$slots["month-year"]?o.renderSlot(h.$slots,"month-year",o.normalizeProps(o.mergeProps({key:1},{years:o.unref(s),selectYear:o.unref(c)}))):(o.openBlock(),o.createBlock(Gr,{key:2,items:o.unref(s),"is-last":h.autoApply&&!o.unref(u).keepActionRow,height:o.unref(u).modeHeight,config:h.config,"no-overlay-focus":!!(h.noOverlayFocus||h.textInput),"focus-value":o.unref(l),type:"year","use-relative":"",onSelected:o.unref(c),onHoverValue:o.unref(d)},o.createSlots({_:2},[h.$slots["year-overlay-value"]?{name:"item",fn:o.withCtx(({item:m})=>[o.renderSlot(h.$slots,"year-overlay-value",{text:m.text,value:m.value})]),key:"0"}:void 0]),1032,["items","is-last","height","config","no-overlay-focus","focus-value","onSelected","onHoverValue"]))]))}}),lw={key:0,class:"dp__time_input"},cw=["data-compact","data-collapsed"],dw=["data-test-id","aria-label","onKeydown","onClick","onMousedown"],uw=["aria-label","disabled","data-test-id","onKeydown","onClick"],hw=["data-test-id","aria-label","onKeydown","onClick","onMousedown"],pw={key:0},fw=["aria-label","data-compact"],mw=o.defineComponent({compatConfig:{MODE:3},__name:"TimeInput",props:{hours:{type:Number,default:0},minutes:{type:Number,default:0},seconds:{type:Number,default:0},closeTimePickerBtn:{type:Object,default:null},order:{type:Number,default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...dn},emits:["set-hours","set-minutes","update:hours","update:minutes","update:seconds","reset-flow","mounted","overlay-closed","overlay-opened","am-pm-change"],setup(n,{expose:e,emit:t}){const r=t,a=n,{setTimePickerElements:s,setTimePickerBackRef:i}=io(),{defaultedAriaLabels:l,defaultedTransitions:c,defaultedFilters:d,defaultedConfig:u,defaultedRange:h,defaultedMultiCalendars:p}=Ze(a),{transitionName:m,showTransition:f}=Xr(c),g=o.reactive({hours:!1,minutes:!1,seconds:!1}),x=o.ref("AM"),E=o.ref(null),C=o.ref([]),T=o.ref(),F=o.ref(!1);o.onMounted(()=>{r("mounted")});const I=S=>qe(new Date,{hours:S.hours,minutes:S.minutes,seconds:a.enableSeconds?S.seconds:0,milliseconds:0}),O=o.computed(()=>S=>L(S,a[S])||M(S,a[S])),P=o.computed(()=>({hours:a.hours,minutes:a.minutes,seconds:a.seconds})),M=(S,ie)=>h.value.enabled&&!h.value.disableTimeRangeValidation?!a.validateTime(S,ie):!1,v=(S,ie)=>{if(h.value.enabled&&!h.value.disableTimeRangeValidation){const ce=ie?+a[`${S}Increment`]:-+a[`${S}Increment`],de=a[S]+ce;return!a.validateTime(S,de)}return!1},b=o.computed(()=>S=>!R(+a[S]+ +a[`${S}Increment`],S)||v(S,!0)),D=o.computed(()=>S=>!R(+a[S]-+a[`${S}Increment`],S)||v(S,!1)),Y=(S,ie)=>xh(qe(ne(),S),ie),K=(S,ie)=>i1(qe(ne(),S),ie),w=o.computed(()=>({dp__time_col:!0,dp__time_col_block:!a.timePickerInline,dp__time_col_reg_block:!a.enableSeconds&&a.is24&&!a.timePickerInline,dp__time_col_reg_inline:!a.enableSeconds&&a.is24&&a.timePickerInline,dp__time_col_reg_with_button:!a.enableSeconds&&!a.is24,dp__time_col_sec:a.enableSeconds&&a.is24,dp__time_col_sec_with_button:a.enableSeconds&&!a.is24})),k=o.computed(()=>a.timePickerInline&&h.value.enabled&&!p.value.count),_=o.computed(()=>{const S=[{type:"hours"}];return a.enableMinutes&&S.push({type:"",separator:!0},{type:"minutes"}),a.enableSeconds&&S.push({type:"",separator:!0},{type:"seconds"}),S}),A=o.computed(()=>_.value.filter(S=>!S.separator)),N=o.computed(()=>S=>{if(S==="hours"){const ie=_e(+a.hours);return{text:ie<10?`0${ie}`:`${ie}`,value:ie}}return{text:a[S]<10?`0${a[S]}`:`${a[S]}`,value:a[S]}}),L=(S,ie)=>{var ce;if(!a.disabledTimesConfig)return!1;const de=a.disabledTimesConfig(a.order,S==="hours"?ie:void 0);return de[S]?!!((ce=de[S])!=null&&ce.includes(ie)):!0},q=(S,ie)=>ie!=="hours"||x.value==="AM"?S:S+12,z=S=>{const ie=a.is24?24:12,ce=S==="hours"?ie:60,de=+a[`${S}GridIncrement`],Ne=S==="hours"&&!a.is24?de:0,Ae=[];for(let Ve=Ne;Ve<ce;Ve+=de)Ae.push({value:a.is24?Ve:q(Ve,S),text:Ve<10?`0${Ve}`:`${Ve}`});return S==="hours"&&!a.is24&&Ae.unshift({value:x.value==="PM"?12:0,text:"12"}),lr(Ae,Ve=>({active:!1,disabled:d.value.times[S].includes(Ve.value)||!R(Ve.value,S)||L(S,Ve.value)||M(S,Ve.value)}))},oe=S=>S>=0?S:59,$=S=>S>=0?S:23,R=(S,ie)=>{const ce=a.minTime?I(Cl(a.minTime)):null,de=a.maxTime?I(Cl(a.maxTime)):null,Ne=I(Cl(P.value,ie,ie==="minutes"||ie==="seconds"?oe(S):$(S)));return ce&&de?(or(Ne,de)||rr(Ne,de))&&(Mo(Ne,ce)||rr(Ne,ce)):ce?Mo(Ne,ce)||rr(Ne,ce):de?or(Ne,de)||rr(Ne,de):!0},W=S=>a[`no${S[0].toUpperCase()+S.slice(1)}Overlay`],J=S=>{W(S)||(g[S]=!g[S],g[S]?(F.value=!0,r("overlay-opened",S)):(F.value=!1,r("overlay-closed",S)))},y=S=>S==="hours"?Ln:S==="minutes"?oo:nr,j=()=>{T.value&&clearTimeout(T.value)},se=(S,ie=!0,ce)=>{const de=ie?Y:K,Ne=ie?+a[`${S}Increment`]:-+a[`${S}Increment`];R(+a[S]+Ne,S)&&r(`update:${S}`,y(S)(de({[S]:+a[S]},{[S]:+a[`${S}Increment`]}))),!(ce!=null&&ce.keyboard)&&u.value.timeArrowHoldThreshold&&(T.value=setTimeout(()=>{se(S,ie)},u.value.timeArrowHoldThreshold))},_e=S=>a.is24?S:(S>=12?x.value="PM":x.value="AM",f1(S)),U=()=>{x.value==="PM"?(x.value="AM",r("update:hours",a.hours-12)):(x.value="PM",r("update:hours",a.hours+12)),r("am-pm-change",x.value)},xe=S=>{g[S]=!0},te=(S,ie,ce)=>{if(S&&a.arrowNavigation){Array.isArray(C.value[ie])?C.value[ie][ce]=S:C.value[ie]=[S];const de=C.value.reduce((Ne,Ae)=>Ae.map((Ve,nt)=>[...Ne[nt]||[],Ae[nt]]),[]);i(a.closeTimePickerBtn),E.value&&(de[1]=de[1].concat(E.value)),s(de,a.order)}},le=(S,ie)=>(J(S),r(`update:${S}`,ie));return e({openChildCmp:xe}),(S,ie)=>{var ce;return S.disabled?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",lw,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(_.value,(de,Ne)=>{var Ae,Ve,nt;return o.openBlock(),o.createElementBlock("div",{key:Ne,class:o.normalizeClass(w.value),"data-compact":k.value&&!S.enableSeconds,"data-collapsed":k.value&&S.enableSeconds},[de.separator?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[F.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createTextVNode(":")],64))],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("button",{ref_for:!0,ref:V=>te(V,Ne,0),type:"button",class:o.normalizeClass({dp__btn:!0,dp__inc_dec_button:!S.timePickerInline,dp__inc_dec_button_inline:S.timePickerInline,dp__tp_inline_btn_top:S.timePickerInline,dp__inc_dec_button_disabled:b.value(de.type),"dp--hidden-el":F.value}),"data-test-id":`${de.type}-time-inc-btn-${a.order}`,"aria-label":(Ae=o.unref(l))==null?void 0:Ae.incrementValue(de.type),tabindex:"0",onKeydown:V=>o.unref(Ot)(V,()=>se(de.type,!0,{keyboard:!0}),!0),onClick:V=>o.unref(u).timeArrowHoldThreshold?void 0:se(de.type,!0),onMousedown:V=>o.unref(u).timeArrowHoldThreshold?se(de.type,!0):void 0,onMouseup:j},[a.timePickerInline?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[S.$slots["tp-inline-arrow-up"]?o.renderSlot(S.$slots,"tp-inline-arrow-up",{key:0}):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[ie[2]||(ie[2]=o.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1)),ie[3]||(ie[3]=o.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1))],64))],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[S.$slots["arrow-up"]?o.renderSlot(S.$slots,"arrow-up",{key:0}):o.createCommentVNode("",!0),S.$slots["arrow-up"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(fl),{key:1}))],64))],42,dw),o.createElementVNode("button",{ref_for:!0,ref:V=>te(V,Ne,1),type:"button","aria-label":`${N.value(de.type).text}-${(Ve=o.unref(l))==null?void 0:Ve.openTpOverlay(de.type)}`,class:o.normalizeClass({dp__time_display:!0,dp__time_display_block:!S.timePickerInline,dp__time_display_inline:S.timePickerInline,"dp--time-invalid":O.value(de.type),"dp--time-overlay-btn":!O.value(de.type),"dp--hidden-el":F.value}),disabled:W(de.type),tabindex:"0","data-test-id":`${de.type}-toggle-overlay-btn-${a.order}`,onKeydown:V=>o.unref(Ot)(V,()=>J(de.type),!0),onClick:V=>J(de.type)},[S.$slots[de.type]?o.renderSlot(S.$slots,de.type,{key:0,text:N.value(de.type).text,value:N.value(de.type).value}):o.createCommentVNode("",!0),S.$slots[de.type]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(N.value(de.type).text),1)],64))],42,uw),o.createElementVNode("button",{ref_for:!0,ref:V=>te(V,Ne,2),type:"button",class:o.normalizeClass({dp__btn:!0,dp__inc_dec_button:!S.timePickerInline,dp__inc_dec_button_inline:S.timePickerInline,dp__tp_inline_btn_bottom:S.timePickerInline,dp__inc_dec_button_disabled:D.value(de.type),"dp--hidden-el":F.value}),"data-test-id":`${de.type}-time-dec-btn-${a.order}`,"aria-label":(nt=o.unref(l))==null?void 0:nt.decrementValue(de.type),tabindex:"0",onKeydown:V=>o.unref(Ot)(V,()=>se(de.type,!1,{keyboard:!0}),!0),onClick:V=>o.unref(u).timeArrowHoldThreshold?void 0:se(de.type,!1),onMousedown:V=>o.unref(u).timeArrowHoldThreshold?se(de.type,!1):void 0,onMouseup:j},[a.timePickerInline?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[S.$slots["tp-inline-arrow-down"]?o.renderSlot(S.$slots,"tp-inline-arrow-down",{key:0}):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[ie[4]||(ie[4]=o.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1)),ie[5]||(ie[5]=o.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1))],64))],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[S.$slots["arrow-down"]?o.renderSlot(S.$slots,"arrow-down",{key:0}):o.createCommentVNode("",!0),S.$slots["arrow-down"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(ml),{key:1}))],64))],42,hw)],64))],10,cw)}),128)),S.is24?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",pw,[S.$slots["am-pm-button"]?o.renderSlot(S.$slots,"am-pm-button",{key:0,toggle:U,value:x.value}):o.createCommentVNode("",!0),S.$slots["am-pm-button"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("button",{key:1,ref_key:"amPmButton",ref:E,type:"button",class:"dp__pm_am_button",role:"button","aria-label":(ce=o.unref(l))==null?void 0:ce.amPmButton,tabindex:"0","data-compact":k.value,onClick:U,onKeydown:ie[0]||(ie[0]=de=>o.unref(Ot)(de,()=>U(),!0))},o.toDisplayString(x.value),41,fw))])),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.value,(de,Ne)=>(o.openBlock(),o.createBlock(o.Transition,{key:Ne,name:o.unref(m)(g[de.type]),css:o.unref(f)},{default:o.withCtx(()=>{var Ae,Ve;return[g[de.type]?(o.openBlock(),o.createBlock(Gr,{key:0,items:z(de.type),"is-last":S.autoApply&&!o.unref(u).keepActionRow,"esc-close":S.escClose,type:de.type,"text-input":S.textInput,config:S.config,"arrow-navigation":S.arrowNavigation,"aria-labels":S.ariaLabels,"overlay-label":(Ve=(Ae=o.unref(l)).timeOverlay)==null?void 0:Ve.call(Ae,de.type),onSelected:nt=>le(de.type,nt),onToggle:nt=>J(de.type),onResetFlow:ie[1]||(ie[1]=nt=>S.$emit("reset-flow"))},o.createSlots({"button-icon":o.withCtx(()=>[S.$slots["clock-icon"]?o.renderSlot(S.$slots,"clock-icon",{key:0}):o.createCommentVNode("",!0),S.$slots["clock-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.resolveDynamicComponent(S.timePickerInline?o.unref(sr):o.unref(pl)),{key:1}))]),_:2},[S.$slots[`${de.type}-overlay-value`]?{name:"item",fn:o.withCtx(({item:nt})=>[o.renderSlot(S.$slots,`${de.type}-overlay-value`,{text:nt.text,value:nt.value})]),key:"0"}:void 0,S.$slots[`${de.type}-overlay-header`]?{name:"header",fn:o.withCtx(()=>[o.renderSlot(S.$slots,`${de.type}-overlay-header`,{toggle:()=>J(de.type)})]),key:"1"}:void 0]),1032,["items","is-last","esc-close","type","text-input","config","arrow-navigation","aria-labels","overlay-label","onSelected","onToggle"])):o.createCommentVNode("",!0)]}),_:2},1032,["name","css"]))),128))]))}}}),gw=["data-dp-mobile"],yw=["aria-label","tabindex"],bw=["role","aria-label","tabindex"],kw=["aria-label"],$p=o.defineComponent({compatConfig:{MODE:3},__name:"TimePicker",props:{hours:{type:[Number,Array],default:0},minutes:{type:[Number,Array],default:0},seconds:{type:[Number,Array],default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...dn},emits:["update:hours","update:minutes","update:seconds","mount","reset-flow","overlay-opened","overlay-closed","am-pm-change"],setup(n,{expose:e,emit:t}){const r=t,a=n,{buildMatrix:s,setTimePicker:i}=io(),l=o.useSlots(),{defaultedTransitions:c,defaultedAriaLabels:d,defaultedTextInput:u,defaultedConfig:h,defaultedRange:p}=Ze(a),{transitionName:m,showTransition:f}=Xr(c),{hideNavigationButtons:g}=ds(),x=o.ref(null),E=o.ref(null),C=o.ref([]),T=o.ref(null),F=o.ref(!1);o.onMounted(()=>{r("mount"),!a.timePicker&&a.arrowNavigation?s([mt(x.value)],"time"):i(!0,a.timePicker)});const I=o.computed(()=>p.value.enabled&&a.modelAuto?ap(a.internalModelValue):!0),O=o.ref(!1),P=L=>({hours:Array.isArray(a.hours)?a.hours[L]:a.hours,minutes:Array.isArray(a.minutes)?a.minutes[L]:a.minutes,seconds:Array.isArray(a.seconds)?a.seconds[L]:a.seconds}),M=o.computed(()=>{const L=[];if(p.value.enabled)for(let q=0;q<2;q++)L.push(P(q));else L.push(P(0));return L}),v=(L,q=!1,z="")=>{q||r("reset-flow"),O.value=L,r(L?"overlay-opened":"overlay-closed",xt.time),a.arrowNavigation&&i(L),o.nextTick(()=>{z!==""&&C.value[0]&&C.value[0].openChildCmp(z)})},b=o.computed(()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:a.autoApply&&!h.value.keepActionRow})),D=Ut(l,"timePicker"),Y=(L,q,z)=>p.value.enabled?q===0?[L,M.value[1][z]]:[M.value[0][z],L]:L,K=L=>{r("update:hours",L)},w=L=>{r("update:minutes",L)},k=L=>{r("update:seconds",L)},_=()=>{if(T.value&&!u.value.enabled&&!a.noOverlayFocus){const L=lp(T.value);L&&L.focus({preventScroll:!0})}},A=L=>{F.value=!1,r("overlay-closed",L)},N=L=>{F.value=!0,r("overlay-opened",L)};return e({toggleTimePicker:v}),(L,q)=>{var z;return o.openBlock(),o.createElementBlock("div",{class:"dp--tp-wrap","data-dp-mobile":L.isMobile},[!L.timePicker&&!L.timePickerInline?o.withDirectives((o.openBlock(),o.createElementBlock("button",{key:0,ref_key:"openTimePickerBtn",ref:x,type:"button",class:o.normalizeClass({...b.value,"dp--hidden-el":O.value}),"aria-label":(z=o.unref(d))==null?void 0:z.openTimePicker,tabindex:L.noOverlayFocus?void 0:0,"data-test-id":"open-time-picker-btn",onKeydown:q[0]||(q[0]=oe=>o.unref(Ot)(oe,()=>v(!0))),onClick:q[1]||(q[1]=oe=>v(!0))},[L.$slots["clock-icon"]?o.renderSlot(L.$slots,"clock-icon",{key:0}):o.createCommentVNode("",!0),L.$slots["clock-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(pl),{key:1}))],42,yw)),[[o.vShow,!o.unref(g)(L.hideNavigation,"time")]]):o.createCommentVNode("",!0),o.createVNode(o.Transition,{name:o.unref(m)(O.value),css:o.unref(f)&&!L.timePickerInline},{default:o.withCtx(()=>{var oe,$;return[O.value||L.timePicker||L.timePickerInline?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:T,role:L.timePickerInline?void 0:"dialog",class:o.normalizeClass({dp__overlay:!L.timePickerInline,"dp--overlay-absolute":!a.timePicker&&!L.timePickerInline,"dp--overlay-relative":a.timePicker}),style:o.normalizeStyle(L.timePicker?{height:`${o.unref(h).modeHeight}px`}:void 0),"aria-label":(oe=o.unref(d))==null?void 0:oe.timePicker,tabindex:L.timePickerInline?void 0:0},[o.createElementVNode("div",{class:o.normalizeClass(L.timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[L.$slots["time-picker-overlay"]?o.renderSlot(L.$slots,"time-picker-overlay",{key:0,hours:n.hours,minutes:n.minutes,seconds:n.seconds,setHours:K,setMinutes:w,setSeconds:k}):o.createCommentVNode("",!0),L.$slots["time-picker-overlay"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(L.timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(M.value,(R,W)=>o.withDirectives((o.openBlock(),o.createBlock(mw,o.mergeProps({key:W,ref_for:!0},{...L.$props,order:W,hours:R.hours,minutes:R.minutes,seconds:R.seconds,closeTimePickerBtn:E.value,disabledTimesConfig:n.disabledTimesConfig,disabled:W===0?o.unref(p).fixedStart:o.unref(p).fixedEnd},{ref_for:!0,ref_key:"timeInputRefs",ref:C,"validate-time":(J,y)=>n.validateTime(J,Y(y,W,J)),"onUpdate:hours":J=>K(Y(J,W,"hours")),"onUpdate:minutes":J=>w(Y(J,W,"minutes")),"onUpdate:seconds":J=>k(Y(J,W,"seconds")),onMounted:_,onOverlayClosed:A,onOverlayOpened:N,onAmPmChange:q[2]||(q[2]=J=>L.$emit("am-pm-change",J))}),o.createSlots({_:2},[o.renderList(o.unref(D),(J,y)=>({name:J,fn:o.withCtx(j=>[o.renderSlot(L.$slots,J,o.mergeProps({ref_for:!0},j))])}))]),1040,["validate-time","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[o.vShow,W===0?!0:I.value]])),128))],2)),!L.timePicker&&!L.timePickerInline?o.withDirectives((o.openBlock(),o.createElementBlock("button",{key:2,ref_key:"closeTimePickerBtn",ref:E,type:"button",class:o.normalizeClass({...b.value,"dp--hidden-el":F.value}),"aria-label":($=o.unref(d))==null?void 0:$.closeTimePicker,tabindex:"0",onKeydown:q[3]||(q[3]=R=>o.unref(Ot)(R,()=>v(!1))),onClick:q[4]||(q[4]=R=>v(!1))},[L.$slots["calendar-icon"]?o.renderSlot(L.$slots,"calendar-icon",{key:0}):o.createCommentVNode("",!0),L.$slots["calendar-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(sr),{key:1}))],42,kw)),[[o.vShow,!o.unref(g)(L.hideNavigation,"time")]]):o.createCommentVNode("",!0)],2)],14,bw)):o.createCommentVNode("",!0)]}),_:3},8,["name","css"])],8,gw)}}}),Mp=(n,e,t,r)=>{const{defaultedRange:a}=Ze(n),s=(T,F)=>Array.isArray(e[T])?e[T][F]:e[T],i=T=>n.enableSeconds?Array.isArray(e.seconds)?e.seconds[T]:e.seconds:0,l=(T,F)=>T?F!==void 0?ao(T,s("hours",F),s("minutes",F),i(F)):ao(T,e.hours,e.minutes,i()):ep(ne(),i(F)),c=(T,F)=>{e[T]=F},d=o.computed(()=>n.modelAuto&&a.value.enabled?Array.isArray(t.value)?t.value.length>1:!1:a.value.enabled),u=(T,F)=>{const I=Object.fromEntries(Object.keys(e).map(O=>O===T?[O,F]:[O,e[O]].slice()));if(d.value&&!a.value.disableTimeRangeValidation){const O=M=>t.value?ao(t.value[M],I.hours[M],I.minutes[M],I.seconds[M]):null,P=M=>Jh(t.value[M],0);return!(Le(O(0),O(1))&&(Mo(O(0),P(1))||or(O(1),P(0))))}return!0},h=(T,F)=>{u(T,F)&&(c(T,F),r&&r())},p=T=>{h("hours",T)},m=T=>{h("minutes",T)},f=T=>{h("seconds",T)},g=(T,F,I,O)=>{F&&p(T),!F&&!I&&m(T),I&&f(T),t.value&&O(t.value)},x=T=>{if(T){const F=Array.isArray(T),I=F?[+T[0].hours,+T[1].hours]:+T.hours,O=F?[+T[0].minutes,+T[1].minutes]:+T.minutes,P=F?[+T[0].seconds,+T[1].seconds]:+T.seconds;c("hours",I),c("minutes",O),n.enableSeconds&&c("seconds",P)}},E=(T,F)=>{const I={hours:Array.isArray(e.hours)?e.hours[T]:e.hours,disabledArr:[]};return(F||F===0)&&(I.hours=F),Array.isArray(n.disabledTimes)&&(I.disabledArr=a.value.enabled&&Array.isArray(n.disabledTimes[T])?n.disabledTimes[T]:n.disabledTimes),I},C=o.computed(()=>(T,F)=>{var I;if(Array.isArray(n.disabledTimes)){const{disabledArr:O,hours:P}=E(T,F),M=O.filter(v=>+v.hours===P);return((I=M[0])==null?void 0:I.minutes)==="*"?{hours:[P],minutes:void 0,seconds:void 0}:{hours:[],minutes:(M==null?void 0:M.map(v=>+v.minutes))??[],seconds:(M==null?void 0:M.map(v=>v.seconds?+v.seconds:void 0))??[]}}return{hours:[],minutes:[],seconds:[]}});return{setTime:c,updateHours:p,updateMinutes:m,updateSeconds:f,getSetDateTime:l,updateTimeValues:g,getSecondsValue:i,assignStartTime:x,validateTime:u,disabledTimesConfig:C}},vw=(n,e)=>{const t=()=>{n.isTextInputDate&&F()},{modelValue:r,time:a}=Qr(n,e,t),{defaultedStartTime:s,defaultedRange:i,defaultedTz:l}=Ze(n),{updateTimeValues:c,getSetDateTime:d,setTime:u,assignStartTime:h,disabledTimesConfig:p,validateTime:m}=Mp(n,a,r,f);function f(){e("update-flow-step")}const g=O=>{const{hours:P,minutes:M,seconds:v}=O;return{hours:+P,minutes:+M,seconds:v?+v:0}},x=()=>{if(n.startTime){if(Array.isArray(n.startTime)){const P=g(n.startTime[0]),M=g(n.startTime[1]);return[qe(ne(),P),qe(ne(),M)]}const O=g(n.startTime);return qe(ne(),O)}return i.value.enabled?[null,null]:null},E=()=>{if(i.value.enabled){const[O,P]=x();r.value=[zt(d(O,0),l.value.timezone),zt(d(P,1),l.value.timezone)]}else r.value=zt(d(x()),l.value.timezone)},C=O=>Array.isArray(O)?[Oo(ne(O[0])),Oo(ne(O[1]))]:[Oo(O??ne())],T=(O,P,M)=>{u("hours",O),u("minutes",P),u("seconds",n.enableSeconds?M:0)},F=()=>{const[O,P]=C(r.value);return i.value.enabled?T([O.hours,P.hours],[O.minutes,P.minutes],[O.seconds,P.seconds]):T(O.hours,O.minutes,O.seconds)};o.onMounted(()=>{if(!n.shadow)return h(s.value),r.value?F():E()});const I=()=>{Array.isArray(r.value)?r.value=r.value.map((O,P)=>O&&d(O,P)):r.value=d(r.value),e("time-update")};return{modelValue:r,time:a,disabledTimesConfig:p,updateTime:(O,P=!0,M=!1)=>{c(O,P,M,I)},validateTime:m}},ww=o.defineComponent({compatConfig:{MODE:3},__name:"TimePickerSolo",props:{...dn},emits:["update:internal-model-value","time-update","am-pm-change","mount","reset-flow","update-flow-step","overlay-toggle"],setup(n,{expose:e,emit:t}){const r=t,a=n,s=o.useSlots(),i=Ut(s,"timePicker"),l=o.ref(null),{time:c,modelValue:d,disabledTimesConfig:u,updateTime:h,validateTime:p}=vw(a,r);return o.onMounted(()=>{a.shadow||r("mount",null)}),e({getSidebarProps:()=>({modelValue:d,time:c,updateTime:h}),toggleTimePicker:(m,f=!1,g="")=>{var x;(x=l.value)==null||x.toggleTimePicker(m,f,g)}}),(m,f)=>(o.openBlock(),o.createBlock(ls,{"multi-calendars":0,stretch:"","is-mobile":m.isMobile},{default:o.withCtx(()=>[o.createVNode($p,o.mergeProps({ref_key:"tpRef",ref:l},m.$props,{hours:o.unref(c).hours,minutes:o.unref(c).minutes,seconds:o.unref(c).seconds,"internal-model-value":m.internalModelValue,"disabled-times-config":o.unref(u),"validate-time":o.unref(p),"onUpdate:hours":f[0]||(f[0]=g=>o.unref(h)(g)),"onUpdate:minutes":f[1]||(f[1]=g=>o.unref(h)(g,!1)),"onUpdate:seconds":f[2]||(f[2]=g=>o.unref(h)(g,!1,!0)),onAmPmChange:f[3]||(f[3]=g=>m.$emit("am-pm-change",g)),onResetFlow:f[4]||(f[4]=g=>m.$emit("reset-flow")),onOverlayClosed:f[5]||(f[5]=g=>m.$emit("overlay-toggle",{open:!1,overlay:g})),onOverlayOpened:f[6]||(f[6]=g=>m.$emit("overlay-toggle",{open:!0,overlay:g}))}),o.createSlots({_:2},[o.renderList(o.unref(i),(g,x)=>({name:g,fn:o.withCtx(E=>[o.renderSlot(m.$slots,g,o.normalizeProps(o.guardReactiveProps(E)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"])]),_:3},8,["is-mobile"]))}}),_w={class:"dp--header-wrap"},Cw={key:0,class:"dp__month_year_wrap"},Ew={key:0},Sw={class:"dp__month_year_wrap"},xw=["data-dp-element","aria-label","data-test-id","onClick","onKeydown"],Bw=o.defineComponent({compatConfig:{MODE:3},__name:"DpHeader",props:{month:{type:Number,default:0},year:{type:Number,default:0},instance:{type:Number,default:0},years:{type:Array,default:()=>[]},months:{type:Array,default:()=>[]},...dn},emits:["update-month-year","mount","reset-flow","overlay-closed","overlay-opened"],setup(n,{expose:e,emit:t}){const r=t,a=n,{defaultedTransitions:s,defaultedAriaLabels:i,defaultedMultiCalendars:l,defaultedFilters:c,defaultedConfig:d,defaultedHighlight:u,propDates:h,defaultedUI:p}=Ze(a),{transitionName:m,showTransition:f}=Xr(s),{buildMatrix:g}=io(),{handleMonthYearChange:x,isDisabled:E,updateMonthYear:C}=q1(a,r),{showLeftIcon:T,showRightIcon:F}=ds(),I=o.ref(!1),O=o.ref(!1),P=o.ref(!1),M=o.ref([null,null,null,null]);o.onMounted(()=>{r("mount")});const v=$=>({get:()=>a[$],set:R=>{const W=$===sn.month?sn.year:sn.month;r("update-month-year",{[$]:R,[W]:a[W]}),$===sn.month?A(!0):N(!0)}}),b=o.computed(v(sn.month)),D=o.computed(v(sn.year)),Y=o.computed(()=>$=>({month:a.month,year:a.year,items:$===sn.month?a.months:a.years,instance:a.instance,updateMonthYear:C,toggle:$===sn.month?A:N})),K=o.computed(()=>a.months.find(R=>R.value===a.month)||{text:"",value:0}),w=o.computed(()=>lr(a.months,$=>{const R=a.month===$.value,W=Ur($.value,pp(a.year,h.value.minDate),fp(a.year,h.value.maxDate))||c.value.months.includes($.value),J=vp(u.value,$.value,a.year);return{active:R,disabled:W,highlighted:J}})),k=o.computed(()=>lr(a.years,$=>{const R=a.year===$.value,W=Ur($.value,cr(h.value.minDate),cr(h.value.maxDate))||c.value.years.includes($.value),J=Tl(u.value,$.value);return{active:R,disabled:W,highlighted:J}})),_=($,R,W)=>{W!==void 0?$.value=W:$.value=!$.value,$.value?(P.value=!0,r("overlay-opened",R)):(P.value=!1,r("overlay-closed",R))},A=($=!1,R)=>{L($),_(I,xt.month,R)},N=($=!1,R)=>{L($),_(O,xt.year,R)},L=$=>{$||r("reset-flow")},q=($,R)=>{a.arrowNavigation&&(M.value[R]=mt($),g(M.value,"monthYear"))},z=o.computed(()=>{var $,R,W,J,y,j;return[{type:sn.month,index:1,toggle:A,modelValue:b.value,updateModelValue:se=>b.value=se,text:K.value.text,showSelectionGrid:I.value,items:w.value,ariaLabel:($=i.value)==null?void 0:$.openMonthsOverlay,overlayLabel:((W=(R=i.value).monthPicker)==null?void 0:W.call(R,!0))??void 0},{type:sn.year,index:2,toggle:N,modelValue:D.value,updateModelValue:se=>D.value=se,text:cp(a.year,a.locale),showSelectionGrid:O.value,items:k.value,ariaLabel:(J=i.value)==null?void 0:J.openYearsOverlay,overlayLabel:((j=(y=i.value).yearPicker)==null?void 0:j.call(y,!0))??void 0}]}),oe=o.computed(()=>a.disableYearSelect?[z.value[0]]:a.yearFirst?[...z.value].reverse():z.value);return e({toggleMonthPicker:A,toggleYearPicker:N,handleMonthYearChange:x}),($,R)=>{var W,J,y,j,se,_e;return o.openBlock(),o.createElementBlock("div",_w,[$.$slots["month-year"]?(o.openBlock(),o.createElementBlock("div",Cw,[o.renderSlot($.$slots,"month-year",o.normalizeProps(o.guardReactiveProps({month:n.month,year:n.year,months:n.months,years:n.years,updateMonthYear:o.unref(C),handleMonthYearChange:o.unref(x),instance:n.instance,isDisabled:o.unref(E)})))])):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[$.$slots["top-extra"]?(o.openBlock(),o.createElementBlock("div",Ew,[o.renderSlot($.$slots,"top-extra",{value:$.internalModelValue})])):o.createCommentVNode("",!0),o.createElementVNode("div",Sw,[o.unref(T)(o.unref(l),n.instance)&&!$.vertical?(o.openBlock(),o.createBlock(Kr,{key:0,"aria-label":(W=o.unref(i))==null?void 0:W.prevMonth,disabled:o.unref(E)(!1),class:o.normalizeClass((J=o.unref(p))==null?void 0:J.navBtnPrev),"el-name":"action-prev",onActivate:R[0]||(R[0]=U=>o.unref(x)(!1,!0)),onSetRef:R[1]||(R[1]=U=>q(U,0))},{default:o.withCtx(()=>[$.$slots["arrow-left"]?o.renderSlot($.$slots,"arrow-left",{key:0}):o.createCommentVNode("",!0),$.$slots["arrow-left"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(ul),{key:1}))]),_:3},8,["aria-label","disabled","class"])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(["dp__month_year_wrap",{dp__year_disable_select:$.disableYearSelect}])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(oe.value,(U,xe)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:U.type},[o.createElementVNode("button",{ref_for:!0,ref:te=>q(te,xe+1),type:"button","data-dp-element":`overlay-${U.type}`,class:o.normalizeClass(["dp__btn dp__month_year_select",{"dp--hidden-el":P.value}]),"aria-label":`${U.text}-${U.ariaLabel}`,"data-test-id":`${U.type}-toggle-overlay-${n.instance}`,onClick:U.toggle,onKeydown:te=>o.unref(Ot)(te,()=>U.toggle(),!0)},[$.$slots[U.type]?o.renderSlot($.$slots,U.type,{key:0,text:U.text,value:a[U.type]}):o.createCommentVNode("",!0),$.$slots[U.type]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(U.text),1)],64))],42,xw),o.createVNode(o.Transition,{name:o.unref(m)(U.showSelectionGrid),css:o.unref(f)},{default:o.withCtx(()=>[U.showSelectionGrid?(o.openBlock(),o.createBlock(Gr,{key:0,items:U.items,"arrow-navigation":$.arrowNavigation,"hide-navigation":$.hideNavigation,"is-last":$.autoApply&&!o.unref(d).keepActionRow,"skip-button-ref":!1,config:$.config,type:U.type,"header-refs":[],"esc-close":$.escClose,"menu-wrap-ref":$.menuWrapRef,"text-input":$.textInput,"aria-labels":$.ariaLabels,"overlay-label":U.overlayLabel,onSelected:U.updateModelValue,onToggle:U.toggle},o.createSlots({"button-icon":o.withCtx(()=>[$.$slots["calendar-icon"]?o.renderSlot($.$slots,"calendar-icon",{key:0}):o.createCommentVNode("",!0),$.$slots["calendar-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(sr),{key:1}))]),_:2},[$.$slots[`${U.type}-overlay-value`]?{name:"item",fn:o.withCtx(({item:te})=>[o.renderSlot($.$slots,`${U.type}-overlay-value`,{text:te.text,value:te.value})]),key:"0"}:void 0,$.$slots[`${U.type}-overlay`]?{name:"overlay",fn:o.withCtx(()=>[o.renderSlot($.$slots,`${U.type}-overlay`,o.mergeProps({ref_for:!0},Y.value(U.type)))]),key:"1"}:void 0,$.$slots[`${U.type}-overlay-header`]?{name:"header",fn:o.withCtx(()=>[o.renderSlot($.$slots,`${U.type}-overlay-header`,{toggle:U.toggle})]),key:"2"}:void 0]),1032,["items","arrow-navigation","hide-navigation","is-last","config","type","esc-close","menu-wrap-ref","text-input","aria-labels","overlay-label","onSelected","onToggle"])):o.createCommentVNode("",!0)]),_:2},1032,["name","css"])],64))),128))],2),o.unref(T)(o.unref(l),n.instance)&&$.vertical?(o.openBlock(),o.createBlock(Kr,{key:1,"aria-label":(y=o.unref(i))==null?void 0:y.prevMonth,"el-name":"action-prev",disabled:o.unref(E)(!1),class:o.normalizeClass((j=o.unref(p))==null?void 0:j.navBtnPrev),onActivate:R[2]||(R[2]=U=>o.unref(x)(!1,!0))},{default:o.withCtx(()=>[$.$slots["arrow-up"]?o.renderSlot($.$slots,"arrow-up",{key:0}):o.createCommentVNode("",!0),$.$slots["arrow-up"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(fl),{key:1}))]),_:3},8,["aria-label","disabled","class"])):o.createCommentVNode("",!0),o.unref(F)(o.unref(l),n.instance)?(o.openBlock(),o.createBlock(Kr,{key:2,ref:"rightIcon","el-name":"action-next",disabled:o.unref(E)(!0),"aria-label":(se=o.unref(i))==null?void 0:se.nextMonth,class:o.normalizeClass((_e=o.unref(p))==null?void 0:_e.navBtnNext),onActivate:R[3]||(R[3]=U=>o.unref(x)(!0,!0)),onSetRef:R[4]||(R[4]=U=>q(U,$.disableYearSelect?2:3))},{default:o.withCtx(()=>[$.$slots[$.vertical?"arrow-down":"arrow-right"]?o.renderSlot($.$slots,$.vertical?"arrow-down":"arrow-right",{key:0}):o.createCommentVNode("",!0),$.$slots[$.vertical?"arrow-down":"arrow-right"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.resolveDynamicComponent($.vertical?o.unref(ml):o.unref(hl)),{key:1}))]),_:3},8,["disabled","aria-label","class"])):o.createCommentVNode("",!0)])],64))])}}}),Tw={class:"dp__calendar_header",role:"row"},$w={key:0,class:"dp__calendar_header_item",role:"gridcell"},Mw=["aria-label"],Dw={key:0,class:"dp__calendar_item dp__week_num",role:"gridcell"},Ow={class:"dp__cell_inner"},Aw=["id","aria-pressed","aria-disabled","aria-label","tabindex","data-test-id","onClick","onTouchend","onKeydown","onMouseenter","onMouseleave","onMousedown"],Iw=o.defineComponent({compatConfig:{MODE:3},__name:"DpCalendar",props:{mappedDates:{type:Array,default:()=>[]},instance:{type:Number,default:0},month:{type:Number,default:0},year:{type:Number,default:0},...dn},emits:["select-date","set-hover-date","handle-scroll","mount","handle-swipe","handle-space","tooltip-open","tooltip-close"],setup(n,{expose:e,emit:t}){const r=t,a=n,{buildMultiLevelMatrix:s}=io(),{defaultedTransitions:i,defaultedConfig:l,defaultedAriaLabels:c,defaultedMultiCalendars:d,defaultedWeekNumbers:u,defaultedMultiDates:h,defaultedUI:p}=Ze(a),m=o.ref(null),f=o.ref({bottom:"",left:"",transform:""}),g=o.ref([]),x=o.ref(null),E=o.ref(!0),C=o.ref(""),T=o.ref({startX:0,endX:0,startY:0,endY:0}),F=o.ref([]),I=o.ref({left:"50%"}),O=o.ref(!1),P=o.computed(()=>a.calendar?a.calendar(a.mappedDates):a.mappedDates),M=o.computed(()=>a.dayNames?Array.isArray(a.dayNames)?a.dayNames:a.dayNames(a.locale,+a.weekStart):p1(a.formatLocale,a.locale,+a.weekStart));o.onMounted(()=>{r("mount",{cmp:"calendar",refs:g}),l.value.noSwipe||x.value&&(x.value.addEventListener("touchstart",q,{passive:!1}),x.value.addEventListener("touchend",z,{passive:!1}),x.value.addEventListener("touchmove",oe,{passive:!1})),a.monthChangeOnScroll&&x.value&&x.value.addEventListener("wheel",W,{passive:!1})}),o.onUnmounted(()=>{l.value.noSwipe||x.value&&(x.value.removeEventListener("touchstart",q),x.value.removeEventListener("touchend",z),x.value.removeEventListener("touchmove",oe)),a.monthChangeOnScroll&&x.value&&x.value.removeEventListener("wheel",W)});const v=U=>U?a.vertical?"vNext":"next":a.vertical?"vPrevious":"previous",b=(U,xe)=>{if(a.transitions){const te=kt(Fn(ne(),a.month,a.year));C.value=dt(kt(Fn(ne(),U,xe)),te)?i.value[v(!0)]:i.value[v(!1)],E.value=!1,o.nextTick(()=>{E.value=!0})}},D=o.computed(()=>({...p.value.calendar??{}})),Y=o.computed(()=>U=>{const xe=m1(U);return{dp__marker_dot:xe.type==="dot",dp__marker_line:xe.type==="line"}}),K=o.computed(()=>U=>Le(U,m.value)),w=o.computed(()=>({dp__calendar:!0,dp__calendar_next:d.value.count>0&&a.instance!==0})),k=o.computed(()=>U=>a.hideOffsetDates?U.current:!0),_=async(U,xe)=>{const{width:te,height:le}=U.getBoundingClientRect();m.value=xe.value;let S={left:`${te/2}px`},ie=-50;if(await o.nextTick(),F.value[0]){const{left:ce,width:de}=F.value[0].getBoundingClientRect();ce<0&&(S={left:"0"},ie=0,I.value.left=`${te/2}px`),window.innerWidth<ce+de&&(S={right:"0"},ie=0,I.value.left=`${de-te/2}px`)}f.value={bottom:`${le}px`,...S,transform:`translateX(${ie}%)`}},A=async(U,xe,te)=>{var le,S,ie;const ce=mt(g.value[xe][te]);ce&&((le=U.marker)!=null&&le.customPosition&&(ie=(S=U.marker)==null?void 0:S.tooltip)!=null&&ie.length?f.value=U.marker.customPosition(ce):await _(ce,U),r("tooltip-open",U.marker))},N=async(U,xe,te)=>{var le,S;if(O.value&&h.value.enabled&&h.value.dragSelect)return r("select-date",U);if(r("set-hover-date",U),(S=(le=U.marker)==null?void 0:le.tooltip)!=null&&S.length){if(a.hideOffsetDates&&!U.current)return;await A(U,xe,te)}},L=U=>{m.value&&(m.value=null,f.value=JSON.parse(JSON.stringify({bottom:"",left:"",transform:""})),r("tooltip-close",U.marker))},q=U=>{T.value.startX=U.changedTouches[0].screenX,T.value.startY=U.changedTouches[0].screenY},z=U=>{T.value.endX=U.changedTouches[0].screenX,T.value.endY=U.changedTouches[0].screenY,$()},oe=U=>{a.vertical&&!a.inline&&U.preventDefault()},$=()=>{const U=a.vertical?"Y":"X";Math.abs(T.value[`start${U}`]-T.value[`end${U}`])>10&&r("handle-swipe",T.value[`start${U}`]>T.value[`end${U}`]?"right":"left")},R=(U,xe,te)=>{U&&(Array.isArray(g.value[xe])?g.value[xe][te]=U:g.value[xe]=[U]),a.arrowNavigation&&s(g.value,"calendar")},W=U=>{a.monthChangeOnScroll&&(U.preventDefault(),r("handle-scroll",U))},J=U=>u.value.type==="local"?al(U.value,{weekStartsOn:+a.weekStart}):u.value.type==="iso"?ol(U.value):typeof u.value.type=="function"?u.value.type(U.value):"",y=U=>{const xe=U[0];return u.value.hideOnOffsetDates?U.some(te=>te.current)?J(xe):"":J(xe)},j=(U,xe,te=!0)=>{!te&&v1()||(!h.value.enabled||l.value.allowPreventDefault)&&(ro(U,l.value),r("select-date",xe))},se=U=>{ro(U,l.value)},_e=U=>{h.value.enabled&&h.value.dragSelect?(O.value=!0,r("select-date",U)):h.value.enabled&&r("select-date",U)};return e({triggerTransition:b}),(U,xe)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(w.value)},[o.createElementVNode("div",{ref_key:"calendarWrapRef",ref:x,class:o.normalizeClass(D.value),role:"grid"},[o.createElementVNode("div",Tw,[U.weekNumbers?(o.openBlock(),o.createElementBlock("div",$w,o.toDisplayString(U.weekNumName),1)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(M.value,(te,le)=>{var S,ie;return o.openBlock(),o.createElementBlock("div",{key:le,class:"dp__calendar_header_item",role:"gridcell","data-test-id":"calendar-header","aria-label":(ie=(S=o.unref(c))==null?void 0:S.weekDay)==null?void 0:ie.call(S,le)},[U.$slots["calendar-header"]?o.renderSlot(U.$slots,"calendar-header",{key:0,day:te,index:le}):o.createCommentVNode("",!0),U.$slots["calendar-header"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(te),1)],64))],8,Mw)}),128))]),xe[2]||(xe[2]=o.createElementVNode("div",{class:"dp__calendar_header_separator"},null,-1)),o.createVNode(o.Transition,{name:C.value,css:!!U.transitions},{default:o.withCtx(()=>[E.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"dp__calendar",role:"rowgroup",onMouseleave:xe[1]||(xe[1]=te=>O.value=!1)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(P.value,(te,le)=>(o.openBlock(),o.createElementBlock("div",{key:le,class:"dp__calendar_row",role:"row"},[U.weekNumbers?(o.openBlock(),o.createElementBlock("div",Dw,[o.createElementVNode("div",Ow,o.toDisplayString(y(te.days)),1)])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(te.days,(S,ie)=>{var ce,de,Ne;return o.openBlock(),o.createElementBlock("div",{id:o.unref($l)(S.value),ref_for:!0,ref:Ae=>R(Ae,le,ie),key:ie+le,role:"gridcell",class:"dp__calendar_item","aria-pressed":(S.classData.dp__active_date||S.classData.dp__range_start||S.classData.dp__range_start)??void 0,"aria-disabled":S.classData.dp__cell_disabled||void 0,"aria-label":(de=(ce=o.unref(c))==null?void 0:ce.day)==null?void 0:de.call(ce,S),tabindex:!S.current&&U.hideOffsetDates?void 0:0,"data-test-id":o.unref($l)(S.value),onClick:o.withModifiers(Ae=>j(Ae,S),["prevent"]),onTouchend:Ae=>j(Ae,S,!1),onKeydown:Ae=>o.unref(Ot)(Ae,()=>U.$emit("select-date",S)),onMouseenter:Ae=>N(S,le,ie),onMouseleave:Ae=>L(S),onMousedown:Ae=>_e(S),onMouseup:xe[0]||(xe[0]=Ae=>O.value=!1)},[o.createElementVNode("div",{class:o.normalizeClass(["dp__cell_inner",S.classData])},[U.$slots.day&&k.value(S)?o.renderSlot(U.$slots,"day",{key:0,day:+S.text,date:S.value}):o.createCommentVNode("",!0),U.$slots.day?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(S.text),1)],64)),S.marker&&k.value(S)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:2},[U.$slots.marker?o.renderSlot(U.$slots,"marker",{key:0,marker:S.marker,day:+S.text,date:S.value}):(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(Y.value(S.marker)),style:o.normalizeStyle(S.marker.color?{backgroundColor:S.marker.color}:{})},null,6))],64)):o.createCommentVNode("",!0),K.value(S.value)?(o.openBlock(),o.createElementBlock("div",{key:3,ref_for:!0,ref_key:"activeTooltip",ref:F,class:"dp__marker_tooltip",style:o.normalizeStyle(f.value)},[(Ne=S.marker)!=null&&Ne.tooltip?(o.openBlock(),o.createElementBlock("div",{key:0,class:"dp__tooltip_content",onClick:se},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(S.marker.tooltip,(Ae,Ve)=>(o.openBlock(),o.createElementBlock("div",{key:Ve,class:"dp__tooltip_text"},[U.$slots["marker-tooltip"]?o.renderSlot(U.$slots,"marker-tooltip",{key:0,tooltip:Ae,day:S.value}):o.createCommentVNode("",!0),U.$slots["marker-tooltip"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("div",{class:"dp__tooltip_mark",style:o.normalizeStyle(Ae.color?{backgroundColor:Ae.color}:{})},null,4),o.createElementVNode("div",null,o.toDisplayString(Ae.text),1)],64))]))),128)),o.createElementVNode("div",{class:"dp__arrow_bottom_tp",style:o.normalizeStyle(I.value)},null,4)])):o.createCommentVNode("",!0)],4)):o.createCommentVNode("",!0)],2)],40,Aw)}),128))]))),128))],32)):o.createCommentVNode("",!0)]),_:3},8,["name","css"])],2)],2))}}),Dp=n=>Array.isArray(n),Nw=(n,e,t,r)=>{const a=o.ref([]),s=o.ref(new Date),i=o.ref(),l=()=>z(n.isTextInputDate),{modelValue:c,calendars:d,time:u,today:h}=Qr(n,e,l),{defaultedMultiCalendars:p,defaultedStartTime:m,defaultedRange:f,defaultedConfig:g,defaultedTz:x,propDates:E,defaultedMultiDates:C}=Ze(n),{validateMonthYearInRange:T,isDisabled:F,isDateRangeAllowed:I,checkMinMaxRange:O}=co(n),{updateTimeValues:P,getSetDateTime:M,setTime:v,assignStartTime:b,validateTime:D,disabledTimesConfig:Y}=Mp(n,u,c,r),K=o.computed(()=>H=>d.value[H]?d.value[H].month:0),w=o.computed(()=>H=>d.value[H]?d.value[H].year:0),k=H=>!g.value.keepViewOnOffsetClick||H?!0:!i.value,_=(H,ee,ve,De=!1)=>{var Z,fe;k(De)&&(d.value[H]||(d.value[H]={month:0,year:0}),d.value[H].month=ip(ee)?(Z=d.value[H])==null?void 0:Z.month:ee,d.value[H].year=ip(ve)?(fe=d.value[H])==null?void 0:fe.year:ve)},A=()=>{n.autoApply&&e("select-date")},N=()=>{m.value&&b(m.value)};o.onMounted(()=>{n.shadow||(c.value||(xe(),N()),z(!0),n.focusStartDate&&n.startDate&&xe())});const L=o.computed(()=>{var H;return(H=n.flow)!=null&&H.length&&!n.partialFlow?n.flowStep===n.flow.length:!0}),q=()=>{n.autoApply&&L.value&&e("auto-apply",n.partialFlow?n.flowStep!==n.flow.length:!1)},z=(H=!1)=>{if(c.value)return Array.isArray(c.value)?(a.value=c.value,j(H)):R(c.value,H);if(p.value.count&&H&&!n.startDate)return $(ne(),H)},oe=()=>Array.isArray(c.value)&&f.value.enabled?Pe(c.value[0])===Pe(c.value[1]??c.value[0]):!1,$=(H=new Date,ee=!1)=>{if((!p.value.count||!p.value.static||ee)&&_(0,Pe(H),Te(H)),p.value.count&&(!c.value||oe()||!p.value.solo)&&(!p.value.solo||ee))for(let ve=1;ve<p.value.count;ve++){const De=qe(ne(),{month:K.value(ve-1),year:w.value(ve-1)}),Z=xh(De,{months:1});d.value[ve]={month:Pe(Z),year:Te(Z)}}},R=(H,ee)=>{$(H),v("hours",Ln(H)),v("minutes",oo(H)),v("seconds",nr(H)),p.value.count&&ee&&U()},W=H=>{if(p.value.count){if(p.value.solo)return 0;const ee=Pe(H[0]),ve=Pe(H[1]);return Math.abs(ve-ee)<p.value.count?0:1}return 1},J=(H,ee)=>{H[1]&&f.value.showLastInRange?$(H[W(H)],ee):$(H[0],ee);const ve=(De,Z)=>[De(H[0]),H[1]?De(H[1]):u[Z][1]];v("hours",ve(Ln,"hours")),v("minutes",ve(oo,"minutes")),v("seconds",ve(nr,"seconds"))},y=(H,ee)=>{if((f.value.enabled||n.weekPicker)&&!C.value.enabled)return J(H,ee);if(C.value.enabled&&ee){const ve=H[H.length-1];return R(ve,ee)}},j=H=>{const ee=c.value;y(ee,H),p.value.count&&p.value.solo&&U()},se=(H,ee)=>{const ve=qe(ne(),{month:K.value(ee),year:w.value(ee)}),De=H<0?rn(ve,1):ar(ve,1);T(Pe(De),Te(De),H<0,n.preventMinMaxNavigation)&&(_(ee,Pe(De),Te(De)),e("update-month-year",{instance:ee,month:Pe(De),year:Te(De)}),p.value.count&&!p.value.solo&&_e(ee),t())},_e=H=>{for(let ee=H-1;ee>=0;ee--){const ve=ar(qe(ne(),{month:K.value(ee+1),year:w.value(ee+1)}),1);_(ee,Pe(ve),Te(ve))}for(let ee=H+1;ee<=p.value.count-1;ee++){const ve=rn(qe(ne(),{month:K.value(ee-1),year:w.value(ee-1)}),1);_(ee,Pe(ve),Te(ve))}},U=()=>{if(Array.isArray(c.value)&&c.value.length===2){const H=ne(ne(c.value[1]?c.value[1]:rn(c.value[0],1))),[ee,ve]=[Pe(c.value[0]),Te(c.value[0])],[De,Z]=[Pe(c.value[1]),Te(c.value[1])];(ee!==De||ee===De&&ve!==Z)&&p.value.solo&&_(1,Pe(H),Te(H))}else c.value&&!Array.isArray(c.value)&&(_(0,Pe(c.value),Te(c.value)),$(ne()))},xe=()=>{n.startDate&&(_(0,Pe(ne(n.startDate)),Te(ne(n.startDate))),p.value.count&&_e(0))},te=(H,ee)=>{if(n.monthChangeOnScroll){const ve=new Date().getTime()-s.value.getTime(),De=Math.abs(H.deltaY);let Z=500;De>1&&(Z=100),De>100&&(Z=0),ve>Z&&(s.value=new Date,se(n.monthChangeOnScroll!=="inverse"?-H.deltaY:H.deltaY,ee))}},le=(H,ee,ve=!1)=>{n.monthChangeOnArrows&&n.vertical===ve&&S(H,ee)},S=(H,ee)=>{se(H==="right"?-1:1,ee)},ie=H=>{if(E.value.markers)return rs(H.value,E.value.markers)},ce=(H,ee)=>{switch(n.sixWeeks===!0?"append":n.sixWeeks){case"prepend":return[!0,!1];case"center":return[H==0,!0];case"fair":return[H==0||ee>H,!0];case"append":return[!1,!1];default:return[!1,!1]}},de=(H,ee,ve,De)=>{if(n.sixWeeks&&H.length<6){const Z=6-H.length,fe=(ee.getDay()+7-De)%7,be=6-(ve.getDay()+7-De)%7,[Un,Bn]=ce(fe,be);for(let Ro=1;Ro<=Z;Ro++)if(Bn?!!(Ro%2)==Un:Un){const go=H[0].days[0],Xd=Ne(Xt(go.value,-7),Pe(ee));H.unshift({days:Xd})}else{const go=H[H.length-1],Xd=go.days[go.days.length-1],BT=Ne(Xt(Xd.value,1),Pe(ee));H.push({days:BT})}}return H},Ne=(H,ee)=>{const ve=ne(H),De=[];for(let Z=0;Z<7;Z++){const fe=Xt(ve,Z),be=Pe(fe)!==ee;De.push({text:n.hideOffsetDates&&be?"":fe.getDate(),value:fe,current:!be,classData:{}})}return De},Ae=(H,ee)=>{const ve=[],De=new Date(ee,H),Z=new Date(ee,H+1,0),fe=n.weekStart,be=an(De,{weekStartsOn:fe}),Un=Bn=>{const Ro=Ne(Bn,H);if(ve.push({days:Ro}),!ve[ve.length-1].days.some(go=>Le(kt(go.value),kt(Z)))){const go=Xt(Bn,7);Un(go)}};return Un(be),de(ve,De,Z,fe)},Ve=H=>{const ee=ao(ne(H.value),u.hours,u.minutes,G());e("date-update",ee),C.value.enabled?Nl(ee,c,C.value.limit):c.value=ee,r(),o.nextTick().then(()=>{q()})},nt=H=>f.value.noDisabledRange?mp(a.value[0],H).some(ee=>F(ee)):!1,V=()=>{a.value=c.value?c.value.slice():[],a.value.length===2&&!(f.value.fixedStart||f.value.fixedEnd)&&(a.value=[])},he=(H,ee)=>{const ve=[ne(H.value),Xt(ne(H.value),+f.value.autoRange)];I(ve)?(ee&&Fe(H.value),a.value=ve):e("invalid-date",H.value)},Fe=H=>{const ee=Pe(ne(H)),ve=Te(ne(H));if(_(0,ee,ve),p.value.count>0)for(let De=1;De<p.value.count;De++){const Z=C1(qe(ne(H),{year:w.value(De-1),month:K.value(De-1)}));_(De,Z.month,Z.year)}},pt=H=>{if(nt(H.value)||!O(H.value,c.value,f.value.fixedStart?0:1))return e("invalid-date",H.value);a.value=Bp(ne(H.value),c,e,f)},Jt=(H,ee)=>{if(V(),f.value.autoRange)return he(H,ee);if(f.value.fixedStart||f.value.fixedEnd)return pt(H);a.value[0]?O(ne(H.value),c.value)&&!nt(H.value)?st(ne(H.value),ne(a.value[0]))?(a.value.unshift(ne(H.value)),e("range-end",a.value[0])):(a.value[1]=ne(H.value),e("range-end",a.value[1])):(n.autoApply&&e("auto-apply-invalid",H.value),e("invalid-date",H.value)):(a.value[0]=ne(H.value),e("range-start",a.value[0]))},G=(H=!0)=>n.enableSeconds?Array.isArray(u.seconds)?H?u.seconds[0]:u.seconds[1]:u.seconds:0,B=H=>{a.value[H]=ao(a.value[H],u.hours[H],u.minutes[H],G(H!==1))},ae=()=>{var H,ee;a.value[0]&&a.value[1]&&+((H=a.value)==null?void 0:H[0])>+((ee=a.value)==null?void 0:ee[1])&&(a.value.reverse(),e("range-start",a.value[0]),e("range-end",a.value[1]))},ge=()=>{a.value.length&&(a.value[0]&&!a.value[1]?B(0):(B(0),B(1),r()),ae(),c.value=a.value.slice(),cs(a.value,e,n.autoApply,n.modelAuto))},ye=(H,ee=!1)=>{if(F(H.value)||!H.current&&n.hideOffsetDates)return e("invalid-date",H.value);if(i.value=JSON.parse(JSON.stringify(H)),!f.value.enabled)return Ve(H);Dp(u.hours)&&Dp(u.minutes)&&!C.value.enabled&&(Jt(H,ee),ge())},Gt=(H,ee)=>{var ve;_(H,ee.month,ee.year,!0),p.value.count&&!p.value.solo&&_e(H),e("update-month-year",{instance:H,month:ee.month,year:ee.year}),t(p.value.solo?H:void 0);const De=(ve=n.flow)!=null&&ve.length?n.flow[n.flowStep]:void 0;!ee.fromNav&&(De===xt.month||De===xt.year)&&r()},hn=(H,ee)=>{xp({value:H,modelValue:c,range:f.value.enabled,timezone:ee?void 0:x.value.timezone}),A(),n.multiCalendars&&o.nextTick().then(()=>z(!0))},en=()=>{const H=gl(ne(),x.value);!f.value.enabled&&!C.value.enabled?c.value=H:c.value&&Array.isArray(c.value)&&c.value[0]?C.value.enabled?c.value=[...c.value,H]:c.value=st(H,c.value[0])?[H,c.value[0]]:[c.value[0],H]:c.value=[H],A()},mo=()=>{if(Array.isArray(c.value))if(C.value.enabled){const H=fa();c.value[c.value.length-1]=M(H)}else c.value=c.value.map((H,ee)=>H&&M(H,ee));else c.value=M(c.value);e("time-update")},fa=()=>Array.isArray(c.value)&&c.value.length?c.value[c.value.length-1]:null;return{calendars:d,modelValue:c,month:K,year:w,time:u,disabledTimesConfig:Y,today:h,validateTime:D,getCalendarDays:Ae,getMarker:ie,handleScroll:te,handleSwipe:S,handleArrow:le,selectDate:ye,updateMonthYear:Gt,presetDate:hn,selectCurrentDate:en,updateTime:(H,ee=!0,ve=!1)=>{P(H,ee,ve,mo)},assignMonthAndYear:$,setStartTime:N}},Pw={key:0},Lw=o.defineComponent({__name:"DatePicker",props:{...dn},emits:["tooltip-open","tooltip-close","mount","update:internal-model-value","update-flow-step","reset-flow","auto-apply","focus-menu","select-date","range-start","range-end","invalid-fixed-range","time-update","am-pm-change","time-picker-open","time-picker-close","recalculate-position","update-month-year","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(n,{expose:e,emit:t}){const r=t,a=n,{calendars:s,month:i,year:l,modelValue:c,time:d,disabledTimesConfig:u,today:h,validateTime:p,getCalendarDays:m,getMarker:f,handleArrow:g,handleScroll:x,handleSwipe:E,selectDate:C,updateMonthYear:T,presetDate:F,selectCurrentDate:I,updateTime:O,assignMonthAndYear:P,setStartTime:M}=Nw(a,r,oe,$),v=o.useSlots(),{setHoverDate:b,getDayClassData:D,clearHoverDate:Y}=e_(c,a),{defaultedMultiCalendars:K}=Ze(a),w=o.ref([]),k=o.ref([]),_=o.ref(null),A=Ut(v,"calendar"),N=Ut(v,"monthYear"),L=Ut(v,"timePicker"),q=te=>{a.shadow||r("mount",te)};o.watch(s,()=>{a.shadow||setTimeout(()=>{r("recalculate-position")},0)},{deep:!0}),o.watch(K,(te,le)=>{te.count-le.count>0&&P()},{deep:!0});const z=o.computed(()=>te=>m(i.value(te),l.value(te)).map(le=>({...le,days:le.days.map(S=>(S.marker=f(S),S.classData=D(S),S))})));function oe(te){var le;te||te===0?(le=k.value[te])==null||le.triggerTransition(i.value(te),l.value(te)):k.value.forEach((S,ie)=>S.triggerTransition(i.value(ie),l.value(ie)))}function $(){r("update-flow-step")}const R=(te,le=!1)=>{C(te,le),a.spaceConfirm&&r("select-date")},W=(te,le,S=0)=>{var ie;(ie=w.value[S])==null||ie.toggleMonthPicker(te,le)},J=(te,le,S=0)=>{var ie;(ie=w.value[S])==null||ie.toggleYearPicker(te,le)},y=(te,le,S)=>{var ie;(ie=_.value)==null||ie.toggleTimePicker(te,le,S)},j=(te,le)=>{var S;if(!a.range){const ie=c.value?c.value:h,ce=le?new Date(le):ie,de=te?an(ce,{weekStartsOn:1}):Ph(ce,{weekStartsOn:1});C({value:de,current:Pe(ce)===i.value(0),text:"",classData:{}}),(S=document.getElementById($l(de)))==null||S.focus()}},se=te=>{var le;(le=w.value[0])==null||le.handleMonthYearChange(te,!0)},_e=te=>{T(0,{month:i.value(0),year:l.value(0)+(te?1:-1),fromNav:!0})},U=(te,le)=>{te===xt.time&&r(`time-picker-${le?"open":"close"}`),r("overlay-toggle",{open:le,overlay:te})},xe=te=>{r("overlay-toggle",{open:!1,overlay:te}),r("focus-menu")};return e({clearHoverDate:Y,presetDate:F,selectCurrentDate:I,toggleMonthPicker:W,toggleYearPicker:J,toggleTimePicker:y,handleArrow:g,updateMonthYear:T,getSidebarProps:()=>({modelValue:c,month:i,year:l,time:d,updateTime:O,updateMonthYear:T,selectDate:C,presetDate:F}),changeMonth:se,changeYear:_e,selectWeekDate:j,setStartTime:M}),(te,le)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(ls,{"multi-calendars":o.unref(K).count,collapse:te.collapse,"is-mobile":te.isMobile},{default:o.withCtx(({instance:S,index:ie})=>[te.disableMonthYearSelect?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(Bw,o.mergeProps({key:0,ref:ce=>{ce&&(w.value[ie]=ce)},months:o.unref(rp)(te.formatLocale,te.locale,te.monthNameFormat),years:o.unref(bl)(te.yearRange,te.locale,te.reverseYears),month:o.unref(i)(S),year:o.unref(l)(S),instance:S},te.$props,{onMount:le[0]||(le[0]=ce=>q(o.unref(Do).header)),onResetFlow:le[1]||(le[1]=ce=>te.$emit("reset-flow")),onUpdateMonthYear:ce=>o.unref(T)(S,ce),onOverlayClosed:xe,onOverlayOpened:le[2]||(le[2]=ce=>te.$emit("overlay-toggle",{open:!0,overlay:ce}))}),o.createSlots({_:2},[o.renderList(o.unref(N),(ce,de)=>({name:ce,fn:o.withCtx(Ne=>[o.renderSlot(te.$slots,ce,o.normalizeProps(o.guardReactiveProps(Ne)))])}))]),1040,["months","years","month","year","instance","onUpdateMonthYear"])),o.createVNode(Iw,o.mergeProps({ref:ce=>{ce&&(k.value[ie]=ce)},"mapped-dates":z.value(S),month:o.unref(i)(S),year:o.unref(l)(S),instance:S},te.$props,{onSelectDate:ce=>o.unref(C)(ce,S!==1),onHandleSpace:ce=>R(ce,S!==1),onSetHoverDate:le[3]||(le[3]=ce=>o.unref(b)(ce)),onHandleScroll:ce=>o.unref(x)(ce,S),onHandleSwipe:ce=>o.unref(E)(ce,S),onMount:le[4]||(le[4]=ce=>q(o.unref(Do).calendar)),onResetFlow:le[5]||(le[5]=ce=>te.$emit("reset-flow")),onTooltipOpen:le[6]||(le[6]=ce=>te.$emit("tooltip-open",ce)),onTooltipClose:le[7]||(le[7]=ce=>te.$emit("tooltip-close",ce))}),o.createSlots({_:2},[o.renderList(o.unref(A),(ce,de)=>({name:ce,fn:o.withCtx(Ne=>[o.renderSlot(te.$slots,ce,o.normalizeProps(o.guardReactiveProps({...Ne})))])}))]),1040,["mapped-dates","month","year","instance","onSelectDate","onHandleSpace","onHandleScroll","onHandleSwipe"])]),_:3},8,["multi-calendars","collapse","is-mobile"]),te.enableTimePicker?(o.openBlock(),o.createElementBlock("div",Pw,[te.$slots["time-picker"]?o.renderSlot(te.$slots,"time-picker",o.normalizeProps(o.mergeProps({key:0},{time:o.unref(d),updateTime:o.unref(O)}))):(o.openBlock(),o.createBlock($p,o.mergeProps({key:1,ref_key:"timePickerRef",ref:_},te.$props,{hours:o.unref(d).hours,minutes:o.unref(d).minutes,seconds:o.unref(d).seconds,"internal-model-value":te.internalModelValue,"disabled-times-config":o.unref(u),"validate-time":o.unref(p),onMount:le[8]||(le[8]=S=>q(o.unref(Do).timePicker)),"onUpdate:hours":le[9]||(le[9]=S=>o.unref(O)(S)),"onUpdate:minutes":le[10]||(le[10]=S=>o.unref(O)(S,!1)),"onUpdate:seconds":le[11]||(le[11]=S=>o.unref(O)(S,!1,!0)),onResetFlow:le[12]||(le[12]=S=>te.$emit("reset-flow")),onOverlayClosed:le[13]||(le[13]=S=>U(S,!1)),onOverlayOpened:le[14]||(le[14]=S=>U(S,!0)),onAmPmChange:le[15]||(le[15]=S=>te.$emit("am-pm-change",S))}),o.createSlots({_:2},[o.renderList(o.unref(L),(S,ie)=>({name:S,fn:o.withCtx(ce=>[o.renderSlot(te.$slots,S,o.normalizeProps(o.guardReactiveProps(ce)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"]))])):o.createCommentVNode("",!0)],64))}}),zw=(n,e)=>{const t=o.ref(),{defaultedMultiCalendars:r,defaultedConfig:a,defaultedHighlight:s,defaultedRange:i,propDates:l,defaultedFilters:c,defaultedMultiDates:d}=Ze(n),{modelValue:u,year:h,month:p,calendars:m}=Qr(n,e),{isDisabled:f}=co(n),{selectYear:g,groupedYears:x,showYearPicker:E,isDisabled:C,toggleYearPicker:T,handleYearSelect:F,handleYear:I}=Tp({modelValue:u,multiCalendars:r,range:i,highlight:s,calendars:m,propDates:l,month:p,year:h,filters:c,props:n,emit:e}),O=(k,_)=>[k,_].map(A=>bn(A,"MMMM",{locale:n.formatLocale})).join("-"),P=o.computed(()=>k=>u.value?Array.isArray(u.value)?u.value.some(_=>Xh(k,_)):Xh(u.value,k):!1),M=k=>{if(i.value.enabled){if(Array.isArray(u.value)){const _=Le(k,u.value[0])||Le(k,u.value[1]);return Wr(u.value,t.value,k)&&!_}return!1}return!1},v=(k,_)=>k.quarter===Oh(_)&&k.year===Te(_),b=k=>typeof s.value=="function"?s.value({quarter:Oh(k),year:Te(k)}):!!s.value.quarters.find(_=>v(_,k)),D=o.computed(()=>k=>{const _=qe(new Date,{year:h.value(k)});return mk({start:Hr(_),end:Nh(_)}).map(A=>{const N=To(A),L=Lh(A),q=f(A),z=M(N),oe=b(N);return{text:O(N,L),value:N,active:P.value(N),highlighted:oe,disabled:q,isBetween:z}})}),Y=k=>{Nl(k,u,d.value.limit),e("auto-apply",!0)},K=k=>{u.value=Pl(u,k,e),cs(u.value,e,n.autoApply,n.modelAuto)},w=k=>{u.value=k,e("auto-apply")};return{defaultedConfig:a,defaultedMultiCalendars:r,groupedYears:x,year:h,isDisabled:C,quarters:D,showYearPicker:E,modelValue:u,setHoverDate:k=>{t.value=k},selectYear:g,selectQuarter:(k,_,A)=>{if(!A)return m.value[_].month=Pe(Lh(k)),d.value.enabled?Y(k):i.value.enabled?K(k):w(k)},toggleYearPicker:T,handleYearSelect:F,handleYear:I}},Fw={class:"dp--quarter-items"},Rw=["data-test-id","disabled","onClick","onMouseover"],Vw=o.defineComponent({compatConfig:{MODE:3},__name:"QuarterPicker",props:{...dn},emits:["update:internal-model-value","reset-flow","overlay-closed","auto-apply","range-start","range-end","overlay-toggle","update-month-year"],setup(n,{expose:e,emit:t}){const r=t,a=n,s=o.useSlots(),i=Ut(s,"yearMode"),{defaultedMultiCalendars:l,defaultedConfig:c,groupedYears:d,year:u,isDisabled:h,quarters:p,modelValue:m,showYearPicker:f,setHoverDate:g,selectQuarter:x,toggleYearPicker:E,handleYearSelect:C,handleYear:T}=zw(a,r);return e({getSidebarProps:()=>({modelValue:m,year:u,selectQuarter:x,handleYearSelect:C,handleYear:T})}),(F,I)=>(o.openBlock(),o.createBlock(ls,{"multi-calendars":o.unref(l).count,collapse:F.collapse,stretch:"","is-mobile":F.isMobile},{default:o.withCtx(({instance:O})=>[o.createElementVNode("div",{class:"dp-quarter-picker-wrap",style:o.normalizeStyle({minHeight:`${o.unref(c).modeHeight}px`})},[F.$slots["top-extra"]?o.renderSlot(F.$slots,"top-extra",{key:0,value:F.internalModelValue}):o.createCommentVNode("",!0),o.createElementVNode("div",null,[o.createVNode(Sp,o.mergeProps(F.$props,{items:o.unref(d)(O),instance:O,"show-year-picker":o.unref(f)[O],year:o.unref(u)(O),"is-disabled":P=>o.unref(h)(O,P),onHandleYear:P=>o.unref(T)(O,P),onYearSelect:P=>o.unref(C)(P,O),onToggleYearPicker:P=>o.unref(E)(O,P==null?void 0:P.flow,P==null?void 0:P.show)}),o.createSlots({_:2},[o.renderList(o.unref(i),(P,M)=>({name:P,fn:o.withCtx(v=>[o.renderSlot(F.$slots,P,o.normalizeProps(o.guardReactiveProps(v)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),o.createElementVNode("div",Fw,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(p)(O),(P,M)=>(o.openBlock(),o.createElementBlock("div",{key:M},[o.createElementVNode("button",{type:"button",class:o.normalizeClass(["dp--qr-btn",{"dp--qr-btn-active":P.active,"dp--qr-btn-between":P.isBetween,"dp--qr-btn-disabled":P.disabled,"dp--highlighted":P.highlighted}]),"data-test-id":P.value,disabled:P.disabled,onClick:v=>o.unref(x)(P.value,O,P.disabled),onMouseover:v=>o.unref(g)(P.value)},[F.$slots.quarter?o.renderSlot(F.$slots,"quarter",{key:0,value:P.value,text:P.text}):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(P.text),1)],64))],42,Rw)]))),128))])],4)]),_:3},8,["multi-calendars","collapse","is-mobile"]))}}),Op=(n,e)=>{const t=o.ref(0);o.onMounted(()=>{r(),window.addEventListener("resize",r,{passive:!0})}),o.onUnmounted(()=>{window.removeEventListener("resize",r)});const r=()=>{t.value=window.document.documentElement.clientWidth};return{isMobile:o.computed(()=>t.value<=n.value.mobileBreakpoint&&!e?!0:void 0)}},Hw=["id","tabindex","role","aria-label"],jw={key:0,class:"dp--menu-load-container"},Yw={key:1,class:"dp--menu-header"},Uw=["data-dp-mobile"],Ww={key:0,class:"dp__sidebar_left"},qw=["data-dp-mobile"],Gw=["data-test-id","data-dp-mobile","onClick","onKeydown"],Kw={key:2,class:"dp__sidebar_right"},Xw={key:3,class:"dp__action_extra"},Ap=o.defineComponent({compatConfig:{MODE:3},__name:"DatepickerMenu",props:{...is,shadow:{type:Boolean,default:!1},openOnTop:{type:Boolean,default:!1},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},getInputRect:{type:Function,default:()=>({})},isTextInputDate:{type:Boolean,default:!1}},emits:["close-picker","select-date","auto-apply","time-update","flow-step","update-month-year","invalid-select","update:internal-model-value","recalculate-position","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","auto-apply-invalid","date-update","invalid-date","overlay-toggle","menu-blur"],setup(n,{expose:e,emit:t}){const r=t,a=n,s=o.ref(null),i=o.computed(()=>{const{openOnTop:V,...he}=a;return{...he,isMobile:x.value,flowStep:K.value,menuWrapRef:s.value}}),{setMenuFocused:l,setShiftKey:c,control:d}=_p(),u=o.useSlots(),{defaultedTextInput:h,defaultedInline:p,defaultedConfig:m,defaultedUI:f,handleEventPropagation:g}=Ze(a),{isMobile:x}=Op(m,a.shadow),E=o.ref(null),C=o.ref(0),T=o.ref(null),F=o.ref(!1),I=o.ref(null),O=o.ref(!1),P=V=>{O.value=!0,m.value.allowPreventDefault&&V.preventDefault(),ro(V,m.value,!0)};o.onMounted(()=>{if(!a.shadow){F.value=!0,M(),window.addEventListener("resize",M);const V=mt(s);V&&!h.value.enabled&&!p.value.enabled&&(l(!0),q()),V&&(V.addEventListener("pointerdown",P),V.addEventListener("mousedown",P))}document.addEventListener("mousedown",nt)}),o.onUnmounted(()=>{window.removeEventListener("resize",M),document.removeEventListener("mousedown",nt);const V=mt(s);V&&(V.removeEventListener("pointerdown",P),V.removeEventListener("mousedown",P))});const M=()=>{const V=mt(T);V&&(C.value=V.getBoundingClientRect().width)},{arrowRight:v,arrowLeft:b,arrowDown:D,arrowUp:Y}=io(),{flowStep:K,updateFlowStep:w,childMount:k,resetFlow:_,handleFlow:A}=t_(a,r,I),N=o.computed(()=>a.monthPicker?aw:a.yearPicker?iw:a.timePicker?ww:a.quarterPicker?Vw:Lw),L=o.computed(()=>{var V;if(m.value.arrowLeft)return m.value.arrowLeft;const he=(V=s.value)==null?void 0:V.getBoundingClientRect(),Fe=a.getInputRect();return(Fe==null?void 0:Fe.width)<(C==null?void 0:C.value)&&(Fe==null?void 0:Fe.left)<=((he==null?void 0:he.left)??0)?`${(Fe==null?void 0:Fe.width)/2}px`:(Fe==null?void 0:Fe.right)>=((he==null?void 0:he.right)??0)&&(Fe==null?void 0:Fe.width)<(C==null?void 0:C.value)?`${(C==null?void 0:C.value)-(Fe==null?void 0:Fe.width)/2}px`:"50%"}),q=()=>{const V=mt(s);V&&V.focus({preventScroll:!0})},z=o.computed(()=>{var V;return((V=I.value)==null?void 0:V.getSidebarProps())||{}}),oe=()=>{a.openOnTop&&r("recalculate-position")},$=Ut(u,"action"),R=o.computed(()=>a.monthPicker||a.yearPicker?Ut(u,"monthYear"):a.timePicker?Ut(u,"timePicker"):Ut(u,"shared")),W=o.computed(()=>a.openOnTop?"dp__arrow_bottom":"dp__arrow_top"),J=o.computed(()=>({dp__menu_disabled:a.disabled,dp__menu_readonly:a.readonly,"dp-menu-loading":a.loading})),y=o.computed(()=>({dp__menu:!0,dp__menu_index:!p.value.enabled,dp__relative:p.value.enabled,...f.value.menu??{}})),j=V=>{ro(V,m.value,!0)},se=V=>{a.escClose&&(r("close-picker"),g(V))},_e=V=>{if(a.arrowNavigation){if(V===Dt.up)return Y();if(V===Dt.down)return D();if(V===Dt.left)return b();if(V===Dt.right)return v()}else V===Dt.left||V===Dt.up?S("handleArrow",Dt.left,0,V===Dt.up):S("handleArrow",Dt.right,0,V===Dt.down)},U=V=>{c(V.shiftKey),!a.disableMonthYearSelect&&V.code===Ke.tab&&V.target.classList.contains("dp__menu")&&d.value.shiftKeyInMenu&&(V.preventDefault(),ro(V,m.value,!0),r("close-picker"))},xe=()=>{q(),r("time-picker-close")},te=V=>{var he,Fe,pt;(he=I.value)==null||he.toggleTimePicker(!1,!1),(Fe=I.value)==null||Fe.toggleMonthPicker(!1,!1,V),(pt=I.value)==null||pt.toggleYearPicker(!1,!1,V)},le=(V,he=0)=>{var Fe,pt,Jt;return V==="month"?(Fe=I.value)==null?void 0:Fe.toggleMonthPicker(!1,!0,he):V==="year"?(pt=I.value)==null?void 0:pt.toggleYearPicker(!1,!0,he):V==="time"?(Jt=I.value)==null?void 0:Jt.toggleTimePicker(!0,!1):te(he)},S=(V,...he)=>{var Fe,pt;(Fe=I.value)!=null&&Fe[V]&&((pt=I.value)==null||pt[V](...he))},ie=()=>{S("selectCurrentDate")},ce=(V,he)=>{S("presetDate",o.toValue(V),he)},de=()=>{S("clearHoverDate")},Ne=(V,he)=>{S("updateMonthYear",V,he)},Ae=(V,he)=>{V.preventDefault(),_e(he)},Ve=V=>{var he,Fe,pt;if(U(V),V.key===Ke.home||V.key===Ke.end)return S("selectWeekDate",V.key===Ke.home,V.target.getAttribute("id"));switch((V.key===Ke.pageUp||V.key===Ke.pageDown)&&(V.shiftKey?(S("changeYear",V.key===Ke.pageUp),(he=vl(s.value,"overlay-year"))==null||he.focus()):(S("changeMonth",V.key===Ke.pageUp),(Fe=vl(s.value,V.key===Ke.pageUp?"action-prev":"action-next"))==null||Fe.focus()),V.target.getAttribute("id")&&((pt=s.value)==null||pt.focus({preventScroll:!0}))),V.key){case Ke.esc:return se(V);case Ke.arrowLeft:return Ae(V,Dt.left);case Ke.arrowRight:return Ae(V,Dt.right);case Ke.arrowUp:return Ae(V,Dt.up);case Ke.arrowDown:return Ae(V,Dt.down);default:return}},nt=V=>{var he;p.value.enabled&&!p.value.input&&!((he=s.value)!=null&&he.contains(V.target))&&O.value&&(O.value=!1,r("menu-blur"))};return e({updateMonthYear:Ne,switchView:le,handleFlow:A,onValueCleared:()=>{var V,he;(he=(V=I.value)==null?void 0:V.setStartTime)==null||he.call(V)}}),(V,he)=>{var Fe,pt,Jt;return o.openBlock(),o.createElementBlock("div",{id:V.uid?`dp-menu-${V.uid}`:void 0,ref_key:"dpMenuRef",ref:s,tabindex:o.unref(p).enabled?void 0:"0",role:o.unref(p).enabled?void 0:"dialog","aria-label":(Fe=V.ariaLabels)==null?void 0:Fe.menu,class:o.normalizeClass(y.value),style:o.normalizeStyle({"--dp-arrow-left":L.value}),onMouseleave:de,onClick:j,onKeydown:Ve},[(V.disabled||V.readonly)&&o.unref(p).enabled||V.loading?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(J.value)},[V.loading?(o.openBlock(),o.createElementBlock("div",jw,he[19]||(he[19]=[o.createElementVNode("span",{class:"dp--menu-loader"},null,-1)]))):o.createCommentVNode("",!0)],2)):o.createCommentVNode("",!0),V.$slots["menu-header"]?(o.openBlock(),o.createElementBlock("div",Yw,[o.renderSlot(V.$slots,"menu-header")])):o.createCommentVNode("",!0),!o.unref(p).enabled&&!V.teleportCenter?(o.openBlock(),o.createElementBlock("div",{key:2,class:o.normalizeClass(W.value)},null,2)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"innerMenuRef",ref:T,class:o.normalizeClass({dp__menu_content_wrapper:((pt=V.presetDates)==null?void 0:pt.length)||!!V.$slots["left-sidebar"]||!!V.$slots["right-sidebar"],"dp--menu-content-wrapper-collapsed":n.collapse&&(((Jt=V.presetDates)==null?void 0:Jt.length)||!!V.$slots["left-sidebar"]||!!V.$slots["right-sidebar"])}),"data-dp-mobile":o.unref(x),style:o.normalizeStyle({"--dp-menu-width":`${C.value}px`})},[V.$slots["left-sidebar"]?(o.openBlock(),o.createElementBlock("div",Ww,[o.renderSlot(V.$slots,"left-sidebar",o.normalizeProps(o.guardReactiveProps(z.value)))])):o.createCommentVNode("",!0),V.presetDates.length?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass({"dp--preset-dates-collapsed":n.collapse,"dp--preset-dates":!0}),"data-dp-mobile":o.unref(x)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(V.presetDates,(G,B)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:B},[G.slot?o.renderSlot(V.$slots,G.slot,{key:0,presetDate:ce,label:G.label,value:G.value}):(o.openBlock(),o.createElementBlock("button",{key:1,type:"button",style:o.normalizeStyle(G.style||{}),class:o.normalizeClass(["dp__btn dp--preset-range",{"dp--preset-range-collapsed":n.collapse}]),"data-test-id":G.testId??void 0,"data-dp-mobile":o.unref(x),onClick:o.withModifiers(ae=>ce(G.value,G.noTz),["prevent"]),onKeydown:ae=>o.unref(Ot)(ae,()=>ce(G.value,G.noTz),!0)},o.toDisplayString(G.label),47,Gw))],64))),128))],10,qw)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"calendarWrapperRef",ref:E,class:"dp__instance_calendar",role:"document"},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(N.value),o.mergeProps({ref_key:"dynCmpRef",ref:I},i.value,{"flow-step":o.unref(K),onMount:o.unref(k),onUpdateFlowStep:o.unref(w),onResetFlow:o.unref(_),onFocusMenu:q,onSelectDate:he[0]||(he[0]=G=>V.$emit("select-date")),onDateUpdate:he[1]||(he[1]=G=>V.$emit("date-update",G)),onTooltipOpen:he[2]||(he[2]=G=>V.$emit("tooltip-open",G)),onTooltipClose:he[3]||(he[3]=G=>V.$emit("tooltip-close",G)),onAutoApply:he[4]||(he[4]=G=>V.$emit("auto-apply",G)),onRangeStart:he[5]||(he[5]=G=>V.$emit("range-start",G)),onRangeEnd:he[6]||(he[6]=G=>V.$emit("range-end",G)),onInvalidFixedRange:he[7]||(he[7]=G=>V.$emit("invalid-fixed-range",G)),onTimeUpdate:he[8]||(he[8]=G=>V.$emit("time-update")),onAmPmChange:he[9]||(he[9]=G=>V.$emit("am-pm-change",G)),onTimePickerOpen:he[10]||(he[10]=G=>V.$emit("time-picker-open",G)),onTimePickerClose:xe,onRecalculatePosition:oe,onUpdateMonthYear:he[11]||(he[11]=G=>V.$emit("update-month-year",G)),onAutoApplyInvalid:he[12]||(he[12]=G=>V.$emit("auto-apply-invalid",G)),onInvalidDate:he[13]||(he[13]=G=>V.$emit("invalid-date",G)),onOverlayToggle:he[14]||(he[14]=G=>V.$emit("overlay-toggle",G)),"onUpdate:internalModelValue":he[15]||(he[15]=G=>V.$emit("update:internal-model-value",G))}),o.createSlots({_:2},[o.renderList(R.value,(G,B)=>({name:G,fn:o.withCtx(ae=>[o.renderSlot(V.$slots,G,o.normalizeProps(o.guardReactiveProps({...ae})))])}))]),1040,["flow-step","onMount","onUpdateFlowStep","onResetFlow"]))],512),V.$slots["right-sidebar"]?(o.openBlock(),o.createElementBlock("div",Kw,[o.renderSlot(V.$slots,"right-sidebar",o.normalizeProps(o.guardReactiveProps(z.value)))])):o.createCommentVNode("",!0),V.$slots["action-extra"]?(o.openBlock(),o.createElementBlock("div",Xw,[V.$slots["action-extra"]?o.renderSlot(V.$slots,"action-extra",{key:0,selectCurrentDate:ie}):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)],14,Uw),!V.autoApply||o.unref(m).keepActionRow?(o.openBlock(),o.createBlock(X1,o.mergeProps({key:3,"menu-mount":F.value},i.value,{"calendar-width":C.value,onClosePicker:he[16]||(he[16]=G=>V.$emit("close-picker")),onSelectDate:he[17]||(he[17]=G=>V.$emit("select-date")),onInvalidSelect:he[18]||(he[18]=G=>V.$emit("invalid-select")),onSelectNow:ie}),o.createSlots({_:2},[o.renderList(o.unref($),(G,B)=>({name:G,fn:o.withCtx(ae=>[o.renderSlot(V.$slots,G,o.normalizeProps(o.guardReactiveProps({...ae})))])}))]),1040,["menu-mount","calendar-width"])):o.createCommentVNode("",!0)],46,Hw)}}});var ur=(n=>(n.center="center",n.left="left",n.right="right",n))(ur||{});const Qw=({menuRef:n,menuRefInner:e,inputRef:t,pickerWrapperRef:r,inline:a,emit:s,props:i,slots:l})=>{const{defaultedConfig:c}=Ze(i),d=o.ref({}),u=o.ref(!1),h=o.ref({top:"0",left:"0"}),p=o.ref(!1),m=o.toRef(i,"teleportCenter");o.watch(m,()=>{h.value=JSON.parse(JSON.stringify({})),I()});const f=_=>{if(i.teleport){const A=_.getBoundingClientRect();return{left:A.left+window.scrollX,top:A.top+window.scrollY}}return{top:0,left:0}},g=(_,A)=>{h.value.left=`${_+A-d.value.width}px`},x=_=>{h.value.left=`${_}px`},E=(_,A)=>{i.position===ur.left&&x(_),i.position===ur.right&&g(_,A),i.position===ur.center&&(h.value.left=`${_+A/2-d.value.width/2}px`)},C=_=>{const{width:A,height:N}=_.getBoundingClientRect(),{top:L,left:q}=f(_);return{top:+L,left:+q,width:A,height:N}},T=()=>{h.value.left="50%",h.value.top="50%",h.value.transform="translate(-50%, -50%)",h.value.position="fixed",delete h.value.opacity},F=()=>{const _=mt(t);h.value=i.altPosition(_)},I=(_=!0)=>{var A;if(!a.value.enabled){if(m.value)return T();if(i.altPosition!==null)return F();if(_){const N=i.teleport?(A=e.value)==null?void 0:A.$el:n.value;N&&(d.value=N.getBoundingClientRect()),s("recalculate-position")}return Y()}},O=({inputEl:_,left:A,width:N})=>{window.screen.width>768&&!u.value&&E(A,N),v(_)},P=_=>{const{top:A,left:N,height:L,width:q}=C(_);h.value.top=`${L+A+ +i.offset}px`,p.value=!1,u.value||(h.value.left=`${N+q/2-d.value.width/2}px`),O({inputEl:_,left:N,width:q})},M=_=>{const{top:A,left:N,width:L}=C(_);h.value.top=`${A-+i.offset-d.value.height}px`,p.value=!0,O({inputEl:_,left:N,width:L})},v=_=>{if(i.autoPosition){const{left:A,width:N}=C(_),{left:L,right:q}=d.value;if(!u.value){if(Math.abs(L)!==Math.abs(q)){if(L<=0)return u.value=!0,x(A);if(q>=document.documentElement.clientWidth)return u.value=!0,g(A,N)}return E(A,N)}}},b=()=>{const _=mt(t);if(_){if(i.autoPosition===ln.top)return ln.top;if(i.autoPosition===ln.bottom)return ln.bottom;const{height:A}=d.value,{top:N,height:L}=_.getBoundingClientRect(),q=window.innerHeight-N-L,z=N;return A<=q?ln.bottom:A>q&&A<=z?ln.top:q>=z?ln.bottom:ln.top}return ln.bottom},D=_=>b()===ln.bottom?P(_):M(_),Y=()=>{const _=mt(t);if(_)return i.autoPosition?D(_):P(_)},K=function(_){if(_){const A=_.scrollHeight>_.clientHeight,N=window.getComputedStyle(_).overflowY.indexOf("hidden")!==-1;return A&&!N}return!0},w=function(_){return!_||_===document.body||_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?window:K(_)?_:w(_.assignedSlot&&c.value.shadowDom?_.assignedSlot.parentNode:_.parentNode)},k=_=>{if(_)switch(i.position){case ur.left:return{left:0,transform:"translateX(0)"};case ur.right:return{left:`${_.width}px`,transform:"translateX(-100%)"};default:return{left:`${_.width/2}px`,transform:"translateX(-50%)"}}return{}};return{openOnTop:p,menuStyle:h,xCorrect:u,setMenuPosition:I,getScrollableParent:w,shadowRender:(_,A,N)=>{var L,q,z;const oe=document.createElement("div"),$=(L=mt(t))==null?void 0:L.getBoundingClientRect();oe.setAttribute("id","dp--temp-container");const R=(q=r.value)!=null&&q.clientWidth?r.value:document.body;R.append(oe);const W=k($),J=c.value.shadowDom?Object.keys(l).filter(j=>["right-sidebar","left-sidebar","top-extra","action-extra"].includes(j)):Object.keys(l),y=o.h(A,{...N,shadow:!0,style:{opacity:0,position:"absolute",...W}},Object.fromEntries(J.map(j=>[j,l[j]])));_!=null&&(y.appContext=_.appContext),o.render(y,oe),d.value=(z=y.el)==null?void 0:z.getBoundingClientRect(),o.render(null,oe),R.removeChild(oe)}}},lo=[{name:"clock-icon",use:["time","calendar","shared"]},{name:"arrow-left",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-right",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-up",use:["time","calendar","month-year","shared"]},{name:"arrow-down",use:["time","calendar","month-year","shared"]},{name:"calendar-icon",use:["month-year","time","calendar","shared","year-mode"]},{name:"day",use:["calendar","shared"]},{name:"month-overlay-value",use:["calendar","month-year","shared"]},{name:"year-overlay-value",use:["calendar","month-year","shared","year-mode"]},{name:"year-overlay",use:["month-year","shared"]},{name:"month-overlay",use:["month-year","shared"]},{name:"month-overlay-header",use:["month-year","shared"]},{name:"year-overlay-header",use:["month-year","shared"]},{name:"hours-overlay-value",use:["calendar","time","shared"]},{name:"hours-overlay-header",use:["calendar","time","shared"]},{name:"minutes-overlay-value",use:["calendar","time","shared"]},{name:"minutes-overlay-header",use:["calendar","time","shared"]},{name:"seconds-overlay-value",use:["calendar","time","shared"]},{name:"seconds-overlay-header",use:["calendar","time","shared"]},{name:"hours",use:["calendar","time","shared"]},{name:"minutes",use:["calendar","time","shared"]},{name:"month",use:["calendar","month-year","shared"]},{name:"year",use:["calendar","month-year","shared","year-mode"]},{name:"action-buttons",use:["action"]},{name:"action-preview",use:["action"]},{name:"calendar-header",use:["calendar","shared"]},{name:"marker-tooltip",use:["calendar","shared"]},{name:"action-extra",use:["menu"]},{name:"time-picker-overlay",use:["calendar","time","shared"]},{name:"am-pm-button",use:["calendar","time","shared"]},{name:"left-sidebar",use:["menu"]},{name:"right-sidebar",use:["menu"]},{name:"month-year",use:["month-year","shared"]},{name:"time-picker",use:["menu","shared"]},{name:"action-row",use:["action"]},{name:"marker",use:["calendar","shared"]},{name:"quarter",use:["shared"]},{name:"top-extra",use:["shared","month-year"]},{name:"tp-inline-arrow-up",use:["shared","time"]},{name:"tp-inline-arrow-down",use:["shared","time"]},{name:"menu-header",use:["menu"]}],Zw=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],Jw={all:()=>lo,monthYear:()=>lo.filter(n=>n.use.includes("month-year")),input:()=>Zw,timePicker:()=>lo.filter(n=>n.use.includes("time")),action:()=>lo.filter(n=>n.use.includes("action")),calendar:()=>lo.filter(n=>n.use.includes("calendar")),menu:()=>lo.filter(n=>n.use.includes("menu")),shared:()=>lo.filter(n=>n.use.includes("shared")),yearMode:()=>lo.filter(n=>n.use.includes("year-mode"))},Ut=(n,e,t)=>{const r=[];return Jw[e]().forEach(a=>{n[a.name]&&r.push(a.name)}),t!=null&&t.length&&t.forEach(a=>{a.slot&&r.push(a.slot)}),r},Xr=n=>{const e=o.computed(()=>r=>n.value?r?n.value.open:n.value.close:""),t=o.computed(()=>r=>n.value?r?n.value.menuAppearTop:n.value.menuAppearBottom:"");return{transitionName:e,showTransition:!!n.value,menuTransition:t}},Qr=(n,e,t)=>{const{defaultedRange:r,defaultedTz:a}=Ze(n),s=ne(zt(ne(),a.value.timezone)),i=o.ref([{month:Pe(s),year:Te(s)}]),l=p=>{const m={hours:Ln(s),minutes:oo(s),seconds:0};return r.value.enabled?[m[p],m[p]]:m[p]},c=o.reactive({hours:l("hours"),minutes:l("minutes"),seconds:l("seconds")});o.watch(r,(p,m)=>{p.enabled!==m.enabled&&(c.hours=l("hours"),c.minutes=l("minutes"),c.seconds=l("seconds"))},{deep:!0});const d=o.computed({get:()=>n.internalModelValue,set:p=>{!n.readonly&&!n.disabled&&e("update:internal-model-value",p)}}),u=o.computed(()=>p=>i.value[p]?i.value[p].month:0),h=o.computed(()=>p=>i.value[p]?i.value[p].year:0);return o.watch(d,(p,m)=>{t&&JSON.stringify(p??{})!==JSON.stringify(m??{})&&t()},{deep:!0}),{calendars:i,time:c,modelValue:d,month:u,year:h,today:s}},e_=(n,e)=>{const{defaultedMultiCalendars:t,defaultedMultiDates:r,defaultedUI:a,defaultedHighlight:s,defaultedTz:i,propDates:l,defaultedRange:c}=Ze(e),{isDisabled:d}=co(e),u=o.ref(null),h=o.ref(zt(new Date,i.value.timezone)),p=y=>{!y.current&&e.hideOffsetDates||(u.value=y.value)},m=()=>{u.value=null},f=y=>Array.isArray(n.value)&&c.value.enabled&&n.value[0]&&u.value?y?dt(u.value,n.value[0]):st(u.value,n.value[0]):!0,g=(y,j)=>{const se=()=>n.value?j?n.value[0]||null:n.value[1]:null,_e=n.value&&Array.isArray(n.value)?se():null;return Le(ne(y.value),_e)},x=y=>{const j=Array.isArray(n.value)?n.value[0]:null;return y?!st(u.value??null,j):!0},E=(y,j=!0)=>(c.value.enabled||e.weekPicker)&&Array.isArray(n.value)&&n.value.length===2?e.hideOffsetDates&&!y.current?!1:Le(ne(y.value),n.value[j?0:1]):c.value.enabled?g(y,j)&&x(j)||Le(y.value,Array.isArray(n.value)?n.value[0]:null)&&f(j):!1,C=(y,j)=>{if(Array.isArray(n.value)&&n.value[0]&&n.value.length===1){const se=Le(y.value,u.value);return j?dt(n.value[0],y.value)&&se:st(n.value[0],y.value)&&se}return!1},T=y=>!n.value||e.hideOffsetDates&&!y.current?!1:c.value.enabled?e.modelAuto&&Array.isArray(n.value)?Le(y.value,n.value[0]?n.value[0]:h.value):!1:r.value.enabled&&Array.isArray(n.value)?n.value.some(j=>Le(j,y.value)):Le(y.value,n.value?n.value:h.value),F=y=>{if(c.value.autoRange||e.weekPicker){if(u.value){if(e.hideOffsetDates&&!y.current)return!1;const j=Xt(u.value,+c.value.autoRange),se=zn(ne(u.value),e.weekStart);return e.weekPicker?Le(se[1],ne(y.value)):Le(j,ne(y.value))}return!1}return!1},I=y=>{if(c.value.autoRange||e.weekPicker){if(u.value){const j=Xt(u.value,+c.value.autoRange);if(e.hideOffsetDates&&!y.current)return!1;const se=zn(ne(u.value),e.weekStart);return e.weekPicker?dt(y.value,se[0])&&st(y.value,se[1]):dt(y.value,u.value)&&st(y.value,j)}return!1}return!1},O=y=>{if(c.value.autoRange||e.weekPicker){if(u.value){if(e.hideOffsetDates&&!y.current)return!1;const j=zn(ne(u.value),e.weekStart);return e.weekPicker?Le(j[0],y.value):Le(u.value,y.value)}return!1}return!1},P=y=>Wr(n.value,u.value,y.value),M=()=>e.modelAuto&&Array.isArray(e.internalModelValue)?!!e.internalModelValue[0]:!1,v=()=>e.modelAuto?ap(e.internalModelValue):!0,b=y=>{if(e.weekPicker)return!1;const j=c.value.enabled?!E(y)&&!E(y,!1):!0;return!d(y.value)&&!T(y)&&!(!y.current&&e.hideOffsetDates)&&j},D=y=>c.value.enabled?e.modelAuto?M()&&T(y):!1:T(y),Y=y=>s.value?k1(y.value,l.value.highlight):!1,K=y=>{const j=d(y.value);return j&&(typeof s.value=="function"?!s.value(y.value,j):!s.value.options.highlightDisabled)},w=y=>{var j;return typeof s.value=="function"?s.value(y.value):(j=s.value.weekdays)==null?void 0:j.includes(y.value.getDay())},k=y=>(c.value.enabled||e.weekPicker)&&(!(t.value.count>0)||y.current)&&v()&&!(!y.current&&e.hideOffsetDates)&&!T(y)?P(y):!1,_=y=>{if(Array.isArray(n.value)&&n.value.length===1){const{before:j,after:se}=wp(+c.value.maxRange,n.value[0]);return or(y.value,j)||Mo(y.value,se)}return!1},A=y=>{if(Array.isArray(n.value)&&n.value.length===1){const{before:j,after:se}=wp(+c.value.minRange,n.value[0]);return Wr([j,se],n.value[0],y.value)}return!1},N=y=>c.value.enabled&&(c.value.maxRange||c.value.minRange)?c.value.maxRange&&c.value.minRange?_(y)||A(y):c.value.maxRange?_(y):A(y):!1,L=y=>{const{isRangeStart:j,isRangeEnd:se}=$(y),_e=c.value.enabled?j||se:!1;return{dp__cell_offset:!y.current,dp__pointer:!e.disabled&&!(!y.current&&e.hideOffsetDates)&&!d(y.value)&&!N(y),dp__cell_disabled:d(y.value)||N(y),dp__cell_highlight:!K(y)&&(Y(y)||w(y))&&!D(y)&&!_e&&!O(y)&&!(k(y)&&e.weekPicker)&&!se,dp__cell_highlight_active:!K(y)&&(Y(y)||w(y))&&D(y),dp__today:!e.noToday&&Le(y.value,h.value)&&y.current,"dp--past":st(y.value,h.value),"dp--future":dt(y.value,h.value)}},q=y=>({dp__active_date:D(y),dp__date_hover:b(y)}),z=y=>{if(n.value&&!Array.isArray(n.value)){const j=zn(n.value,e.weekStart);return{...W(y),dp__range_start:Le(j[0],y.value),dp__range_end:Le(j[1],y.value),dp__range_between_week:dt(y.value,j[0])&&st(y.value,j[1])}}return{...W(y)}},oe=y=>{if(n.value&&Array.isArray(n.value)){const j=zn(n.value[0],e.weekStart),se=n.value[1]?zn(n.value[1],e.weekStart):[];return{...W(y),dp__range_start:Le(j[0],y.value)||Le(se[0],y.value),dp__range_end:Le(j[1],y.value)||Le(se[1],y.value),dp__range_between_week:dt(y.value,j[0])&&st(y.value,j[1])||dt(y.value,se[0])&&st(y.value,se[1]),dp__range_between:dt(y.value,j[1])&&st(y.value,se[0])}}return{...W(y)}},$=y=>{const j=t.value.count>0?y.current&&E(y)&&v():E(y)&&v(),se=t.value.count>0?y.current&&E(y,!1)&&v():E(y,!1)&&v();return{isRangeStart:j,isRangeEnd:se}},R=y=>{const{isRangeStart:j,isRangeEnd:se}=$(y);return{dp__range_start:j,dp__range_end:se,dp__range_between:k(y),dp__date_hover:Le(y.value,u.value)&&!j&&!se&&!e.weekPicker,dp__date_hover_start:C(y,!0),dp__date_hover_end:C(y,!1)}},W=y=>({...R(y),dp__cell_auto_range:I(y),dp__cell_auto_range_start:O(y),dp__cell_auto_range_end:F(y)}),J=y=>c.value.enabled?c.value.autoRange?W(y):e.modelAuto?{...q(y),...R(y)}:e.weekPicker?oe(y):R(y):e.weekPicker?z(y):q(y);return{setHoverDate:p,clearHoverDate:m,getDayClassData:y=>e.hideOffsetDates&&!y.current?{}:{...L(y),...J(y),[e.dayClass?e.dayClass(y.value,e.internalModelValue):""]:!0,...a.value.calendarCell??{}}}},co=n=>{const{defaultedFilters:e,defaultedRange:t,propDates:r,defaultedMultiDates:a}=Ze(n),s=w=>r.value.disabledDates?typeof r.value.disabledDates=="function"?r.value.disabledDates(ne(w)):!!rs(w,r.value.disabledDates):!1,i=w=>r.value.maxDate?n.yearPicker?Te(w)>Te(r.value.maxDate):dt(w,r.value.maxDate):!1,l=w=>r.value.minDate?n.yearPicker?Te(w)<Te(r.value.minDate):st(w,r.value.minDate):!1,c=w=>{const k=i(w),_=l(w),A=s(w),N=e.value.months.map($=>+$).includes(Pe(w)),L=n.disabledWeekDays.length?n.disabledWeekDays.some($=>+$===sv(w)):!1,q=m(w),z=Te(w),oe=z<+n.yearRange[0]||z>+n.yearRange[1];return!(k||_||A||N||oe||L||q)},d=(w,k)=>st(...so(r.value.minDate,w,k))||Le(...so(r.value.minDate,w,k)),u=(w,k)=>dt(...so(r.value.maxDate,w,k))||Le(...so(r.value.maxDate,w,k)),h=(w,k,_)=>{let A=!1;return r.value.maxDate&&_&&u(w,k)&&(A=!0),r.value.minDate&&!_&&d(w,k)&&(A=!0),A},p=(w,k,_,A)=>{let N=!1;return A&&(r.value.minDate||r.value.maxDate)?r.value.minDate&&r.value.maxDate?N=h(w,k,_):(r.value.minDate&&d(w,k)||r.value.maxDate&&u(w,k))&&(N=!0):N=!0,N},m=w=>Array.isArray(r.value.allowedDates)&&!r.value.allowedDates.length?!0:r.value.allowedDates?!rs(w,r.value.allowedDates,dp(n.monthPicker,n.yearPicker)):!1,f=w=>!c(w),g=w=>t.value.noDisabledRange?!Ih({start:w[0],end:w[1]}).some(k=>f(k)):!0,x=w=>{if(w){const k=Te(w);return k>=+n.yearRange[0]&&k<=n.yearRange[1]}return!0},E=(w,k)=>!!(Array.isArray(w)&&w[k]&&(t.value.maxRange||t.value.minRange)&&x(w[k])),C=(w,k,_=0)=>{if(E(k,_)&&x(w)){const A=$h(w,k[_]),N=mp(k[_],w),L=N.length===1?0:N.filter(z=>f(z)).length,q=Math.abs(A)-(t.value.minMaxRawRange?0:L);if(t.value.minRange&&t.value.maxRange)return q>=+t.value.minRange&&q<=+t.value.maxRange;if(t.value.minRange)return q>=+t.value.minRange;if(t.value.maxRange)return q<=+t.value.maxRange}return!0},T=()=>!n.enableTimePicker||n.monthPicker||n.yearPicker||n.ignoreTimeValidation,F=w=>Array.isArray(w)?[w[0]?Bl(w[0]):null,w[1]?Bl(w[1]):null]:Bl(w),I=(w,k,_)=>w.find(A=>+A.hours===Ln(k)&&A.minutes==="*"?!0:+A.minutes===oo(k)&&+A.hours===Ln(k))&&_,O=(w,k,_)=>{const[A,N]=w,[L,q]=k;return!I(A,L,_)&&!I(N,q,_)&&_},P=(w,k)=>{const _=Array.isArray(k)?k:[k];return Array.isArray(n.disabledTimes)?Array.isArray(n.disabledTimes[0])?O(n.disabledTimes,_,w):!_.some(A=>I(n.disabledTimes,A,w)):w},M=(w,k)=>{const _=Array.isArray(k)?[Oo(k[0]),k[1]?Oo(k[1]):void 0]:Oo(k),A=!n.disabledTimes(_);return w&&A},v=(w,k)=>n.disabledTimes?Array.isArray(n.disabledTimes)?P(k,w):M(k,w):k,b=w=>{let k=!0;if(!w||T())return!0;const _=!r.value.minDate&&!r.value.maxDate?F(w):w;return(n.maxTime||r.value.maxDate)&&(k=kp(n.maxTime,r.value.maxDate,"max",bt(_),k)),(n.minTime||r.value.minDate)&&(k=kp(n.minTime,r.value.minDate,"min",bt(_),k)),v(w,k)},D=w=>{if(!n.monthPicker)return!0;let k=!0;const _=ne(cn(w));if(r.value.minDate&&r.value.maxDate){const A=ne(cn(r.value.minDate)),N=ne(cn(r.value.maxDate));return dt(_,A)&&st(_,N)||Le(_,A)||Le(_,N)}if(r.value.minDate){const A=ne(cn(r.value.minDate));k=dt(_,A)||Le(_,A)}if(r.value.maxDate){const A=ne(cn(r.value.maxDate));k=st(_,A)||Le(_,A)}return k},Y=o.computed(()=>w=>!n.enableTimePicker||n.ignoreTimeValidation?!0:b(w)),K=o.computed(()=>w=>n.monthPicker?Array.isArray(w)&&(t.value.enabled||a.value.enabled)?!w.filter(k=>!D(k)).length:D(w):!0);return{isDisabled:f,validateDate:c,validateMonthYearInRange:p,isDateRangeAllowed:g,checkMinMaxRange:C,isValidTime:b,isTimeValid:Y,isMonthValid:K}},ds=()=>{const n=o.computed(()=>(r,a)=>r==null?void 0:r.includes(a)),e=o.computed(()=>(r,a)=>r.count?r.solo?!0:a===0:!0),t=o.computed(()=>(r,a)=>r.count?r.solo?!0:a===r.count-1:!0);return{hideNavigationButtons:n,showLeftIcon:e,showRightIcon:t}},t_=(n,e,t)=>{const r=o.ref(0),a=o.reactive({[Do.timePicker]:!n.enableTimePicker||n.timePicker||n.monthPicker,[Do.calendar]:!1,[Do.header]:!1}),s=o.computed(()=>n.monthPicker||n.timePicker),i=h=>{var p;if((p=n.flow)!=null&&p.length){if(!h&&s.value)return u();a[h]=!0,Object.keys(a).filter(m=>!a[m]).length||u()}},l=()=>{var h,p;(h=n.flow)!=null&&h.length&&r.value!==-1&&(r.value+=1,e("flow-step",r.value),u()),((p=n.flow)==null?void 0:p.length)===r.value&&o.nextTick().then(()=>c())},c=()=>{r.value=-1},d=(h,p,...m)=>{var f,g;n.flow[r.value]===h&&t.value&&((g=(f=t.value)[p])==null||g.call(f,...m))},u=(h=0)=>{h&&(r.value+=h),d(xt.month,"toggleMonthPicker",!0),d(xt.year,"toggleYearPicker",!0),d(xt.calendar,"toggleTimePicker",!1,!0),d(xt.time,"toggleTimePicker",!0,!0);const p=n.flow[r.value];(p===xt.hours||p===xt.minutes||p===xt.seconds)&&d(p,"toggleTimePicker",!0,!0,p)};return{childMount:i,updateFlowStep:l,resetFlow:c,handleFlow:u,flowStep:r}},n_={key:1,class:"dp__input_wrap"},o_=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-label","aria-disabled","aria-invalid"],r_={key:2,class:"dp--clear-btn"},a_=["aria-label"],s_=o.defineComponent({compatConfig:{MODE:3},__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1},inputValue:{type:String,default:""},...is},emits:["clear","open","update:input-value","set-input-date","close","select-date","set-empty-date","toggle","focus-prev","focus","blur","real-blur","text-input"],setup(n,{expose:e,emit:t}){const r=t,a=n,{defaultedTextInput:s,defaultedAriaLabels:i,defaultedInline:l,defaultedConfig:c,defaultedRange:d,defaultedMultiDates:u,defaultedUI:h,getDefaultPattern:p,getDefaultStartTime:m}=Ze(a),{checkMinMaxRange:f}=co(a),g=o.ref(),x=o.ref(null),E=o.ref(!1),C=o.ref(!1),T=o.computed(()=>({dp__pointer:!a.disabled&&!a.readonly&&!s.value.enabled,dp__disabled:a.disabled,dp__input_readonly:!s.value.enabled,dp__input:!0,dp__input_icon_pad:!a.hideInputIcon,dp__input_valid:typeof a.state=="boolean"?a.state:!1,dp__input_invalid:typeof a.state=="boolean"?!a.state:!1,dp__input_focus:E.value||a.isMenuOpen,dp__input_reg:!s.value.enabled,...h.value.input??{}})),F=()=>{r("set-input-date",null),a.clearable&&a.autoApply&&(r("set-empty-date"),g.value=null)},I=z=>{const oe=m();return w1(z,s.value.format??p(),oe??gp({},a.enableSeconds),a.inputValue,C.value,a.formatLocale)},O=z=>{const{rangeSeparator:oe}=s.value,[$,R]=z.split(`${oe}`);if($){const W=I($.trim()),J=R?I(R.trim()):void 0;if(Mo(W,J))return;const y=W&&J?[W,J]:[W];f(J,y,0)&&(g.value=W?y:null)}},P=()=>{C.value=!0},M=z=>{if(d.value.enabled)O(z);else if(u.value.enabled){const oe=z.split(";");g.value=oe.map($=>I($.trim())).filter($=>$)}else g.value=I(z)},v=z=>{var oe;const $=typeof z=="string"?z:(oe=z.target)==null?void 0:oe.value;$!==""?(s.value.openMenu&&!a.isMenuOpen&&r("open"),M($),r("set-input-date",g.value)):F(),C.value=!1,r("update:input-value",$),r("text-input",z,g.value)},b=z=>{s.value.enabled?(M(z.target.value),s.value.enterSubmit&&El(g.value)&&a.inputValue!==""?(r("set-input-date",g.value,!0),g.value=null):s.value.enterSubmit&&a.inputValue===""&&(g.value=null,r("clear"))):K(z)},D=(z,oe)=>{s.value.enabled&&s.value.tabSubmit&&!oe&&M(z.target.value),s.value.tabSubmit&&El(g.value)&&a.inputValue!==""?(r("set-input-date",g.value,!0,!0),g.value=null):s.value.tabSubmit&&a.inputValue===""&&(g.value=null,r("clear",!0))},Y=()=>{E.value=!0,r("focus"),o.nextTick().then(()=>{var z;s.value.enabled&&s.value.selectOnFocus&&((z=x.value)==null||z.select())})},K=z=>{if(ro(z,c.value,!0),s.value.enabled&&s.value.openMenu&&!l.value.input){if(s.value.openMenu==="open"&&!a.isMenuOpen)return r("open");if(s.value.openMenu==="toggle")return r("toggle")}else s.value.enabled||r("toggle")},w=()=>{r("real-blur"),E.value=!1,(!a.isMenuOpen||l.value.enabled&&l.value.input)&&r("blur"),a.autoApply&&s.value.enabled&&g.value&&!a.isMenuOpen&&(r("set-input-date",g.value),r("select-date"),g.value=null)},k=z=>{ro(z,c.value,!0),r("clear")},_=()=>{r("close")},A=z=>{if(z.key==="Tab"&&D(z),z.key==="Enter"&&b(z),z.key==="Escape"&&s.value.escClose&&_(),!s.value.enabled){if(z.code==="Tab")return;z.preventDefault()}},N=()=>{var z;(z=x.value)==null||z.focus({preventScroll:!0})},L=z=>{g.value=z},q=z=>{z.key===Ke.tab&&D(z,!0)};return e({focusInput:N,setParsedDate:L}),(z,oe)=>{var $,R,W;return o.openBlock(),o.createElementBlock("div",{onClick:K},[z.$slots.trigger&&!z.$slots["dp-input"]&&!o.unref(l).enabled?o.renderSlot(z.$slots,"trigger",{key:0}):o.createCommentVNode("",!0),!z.$slots.trigger&&(!o.unref(l).enabled||o.unref(l).input)?(o.openBlock(),o.createElementBlock("div",n_,[z.$slots["dp-input"]&&!z.$slots.trigger&&(!o.unref(l).enabled||o.unref(l).enabled&&o.unref(l).input)?o.renderSlot(z.$slots,"dp-input",{key:0,value:n.inputValue,isMenuOpen:n.isMenuOpen,onInput:v,onEnter:b,onTab:D,onClear:k,onBlur:w,onKeypress:A,onPaste:P,onFocus:Y,openMenu:()=>z.$emit("open"),closeMenu:()=>z.$emit("close"),toggleMenu:()=>z.$emit("toggle")}):o.createCommentVNode("",!0),z.$slots["dp-input"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("input",{key:1,id:z.uid?`dp-input-${z.uid}`:void 0,ref_key:"inputRef",ref:x,"data-test-id":"dp-input",name:z.name,class:o.normalizeClass(T.value),inputmode:o.unref(s).enabled?"text":"none",placeholder:z.placeholder,disabled:z.disabled,readonly:z.readonly,required:z.required,value:n.inputValue,autocomplete:z.autocomplete,"aria-label":($=o.unref(i))==null?void 0:$.input,"aria-disabled":z.disabled||void 0,"aria-invalid":z.state===!1?!0:void 0,onInput:v,onBlur:w,onFocus:Y,onKeypress:A,onKeydown:oe[0]||(oe[0]=J=>A(J)),onPaste:P},null,42,o_)),o.createElementVNode("div",{onClick:oe[3]||(oe[3]=J=>r("toggle"))},[z.$slots["input-icon"]&&!z.hideInputIcon?(o.openBlock(),o.createElementBlock("span",{key:0,class:"dp__input_icon",onClick:oe[1]||(oe[1]=J=>r("toggle"))},[o.renderSlot(z.$slots,"input-icon")])):o.createCommentVNode("",!0),!z.$slots["input-icon"]&&!z.hideInputIcon&&!z.$slots["dp-input"]?(o.openBlock(),o.createBlock(o.unref(sr),{key:1,"aria-label":(R=o.unref(i))==null?void 0:R.calendarIcon,class:"dp__input_icon dp__input_icons",onClick:oe[2]||(oe[2]=J=>r("toggle"))},null,8,["aria-label"])):o.createCommentVNode("",!0)]),z.$slots["clear-icon"]&&(z.alwaysClearable||n.inputValue&&z.clearable&&!z.disabled&&!z.readonly)?(o.openBlock(),o.createElementBlock("span",r_,[o.renderSlot(z.$slots,"clear-icon",{clear:k})])):o.createCommentVNode("",!0),!z.$slots["clear-icon"]&&(z.alwaysClearable||z.clearable&&n.inputValue&&!z.disabled&&!z.readonly)?(o.openBlock(),o.createElementBlock("button",{key:3,"aria-label":(W=o.unref(i))==null?void 0:W.clearInput,class:"dp--clear-btn",type:"button",onKeydown:oe[4]||(oe[4]=J=>o.unref(Ot)(J,()=>k(J),!0,q)),onClick:oe[5]||(oe[5]=o.withModifiers(J=>k(J),["prevent"]))},[o.createVNode(o.unref(np),{class:"dp__input_icons","data-test-id":"clear-icon"})],40,a_)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)])}}}),i_=typeof window<"u"?window:void 0,Ll=()=>{},l_=n=>o.getCurrentScope()?(o.onScopeDispose(n),!0):!1,c_=(n,e,t,r)=>{if(!n)return Ll;let a=Ll;const s=o.watch(()=>o.unref(n),l=>{a(),l&&(l.removeEventListener(e,t),l.addEventListener(e,t,r),a=()=>{l.removeEventListener(e,t,r),a=Ll})},{immediate:!0,flush:"post"}),i=()=>{s(),a()};return l_(i),i},d_=(n,e,t,r={})=>{const{window:a=i_,event:s="pointerdown"}=r;return a?c_(a,s,i=>{const l=mt(n),c=mt(e);!l||!c||l===i.target||i.composedPath().includes(l)||i.composedPath().includes(c)||t(i)},{passive:!0}):void 0},u_=["data-dp-mobile"],h_=o.defineComponent({compatConfig:{MODE:3},__name:"VueDatePicker",props:{...is},emits:["update:model-value","update:model-timezone-value","text-submit","closed","cleared","open","focus","blur","internal-model-change","recalculate-position","flow-step","update-month-year","invalid-select","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","date-update","invalid-date","overlay-toggle","text-input"],setup(n,{expose:e,emit:t}){const r=t,a=n,s=o.useSlots(),i=o.ref(!1),l=o.toRef(a,"modelValue"),c=o.toRef(a,"timezone"),d=o.ref(null),u=o.ref(null),h=o.ref(null),p=o.ref(!1),m=o.ref(null),f=o.ref(!1),g=o.ref(!1),x=o.ref(!1),E=o.ref(!1),{setMenuFocused:C,setShiftKey:T}=_p(),{clearArrowNav:F}=io(),{validateDate:I,isValidTime:O}=co(a),{defaultedTransitions:P,defaultedTextInput:M,defaultedInline:v,defaultedConfig:b,defaultedRange:D,defaultedMultiDates:Y}=Ze(a),{menuTransition:K,showTransition:w}=Xr(P),{isMobile:k}=Op(b),_=o.getCurrentInstance();o.onMounted(()=>{y(a.modelValue),o.nextTick().then(()=>{if(!v.value.enabled){const Z=$(m.value);Z==null||Z.addEventListener("scroll",ce),window==null||window.addEventListener("resize",de)}}),v.value.enabled&&(i.value=!0),window==null||window.addEventListener("keyup",Ne),window==null||window.addEventListener("keydown",Ae)}),o.onUnmounted(()=>{if(!v.value.enabled){const Z=$(m.value);Z==null||Z.removeEventListener("scroll",ce),window==null||window.removeEventListener("resize",de)}window==null||window.removeEventListener("keyup",Ne),window==null||window.removeEventListener("keydown",Ae)});const A=Ut(s,"all",a.presetDates),N=Ut(s,"input");o.watch([l,c],()=>{y(l.value)},{deep:!0});const{openOnTop:L,menuStyle:q,xCorrect:z,setMenuPosition:oe,getScrollableParent:$,shadowRender:R}=Qw({menuRef:d,menuRefInner:u,inputRef:h,pickerWrapperRef:m,inline:v,emit:r,props:a,slots:s}),{inputValue:W,internalModelValue:J,parseExternalModelValue:y,emitModelValue:j,formatInputValue:se,checkBeforeEmit:_e}=W1(r,a,p),U=o.computed(()=>({dp__main:!0,dp__theme_dark:a.dark,dp__theme_light:!a.dark,dp__flex_display:v.value.enabled,"dp--flex-display-collapsed":x.value,dp__flex_display_with_input:v.value.input})),xe=o.computed(()=>a.dark?"dp__theme_dark":"dp__theme_light"),te=o.computed(()=>a.teleport?{to:typeof a.teleport=="boolean"?"body":a.teleport,disabled:!a.teleport||v.value.enabled}:{}),le=o.computed(()=>({class:"dp__outer_menu_wrap"})),S=o.computed(()=>v.value.enabled&&(a.timePicker||a.monthPicker||a.yearPicker||a.quarterPicker)),ie=()=>{var Z,fe;return((fe=(Z=h.value)==null?void 0:Z.$el)==null?void 0:fe.getBoundingClientRect())??{width:0,left:0,right:0}},ce=()=>{i.value&&(b.value.closeOnScroll?B():oe())},de=()=>{var Z;i.value&&oe();const fe=((Z=u.value)==null?void 0:Z.$el.getBoundingClientRect().width)??0;x.value=document.body.offsetWidth<=fe},Ne=Z=>{Z.key==="Tab"&&!v.value.enabled&&!a.teleport&&b.value.tabOutClosesMenu&&(m.value.contains(document.activeElement)||B()),g.value=Z.shiftKey},Ae=Z=>{g.value=Z.shiftKey},Ve=()=>{!a.disabled&&!a.readonly&&(R(_,Ap,a),oe(!1),i.value=!0,i.value&&r("open"),i.value||G(),y(a.modelValue))},nt=()=>{var Z,fe;W.value="",G(),(Z=u.value)==null||Z.onValueCleared(),(fe=h.value)==null||fe.setParsedDate(null),r("update:model-value",null),r("update:model-timezone-value",null),r("cleared"),b.value.closeOnClearValue&&B()},V=()=>{const Z=J.value;return!Z||!Array.isArray(Z)&&I(Z)?!0:Array.isArray(Z)?Y.value.enabled||Z.length===2&&I(Z[0])&&I(Z[1])?!0:D.value.partialRange&&!a.timePicker?I(Z[0]):!1:!1},he=()=>{_e()&&V()?(j(),B()):r("invalid-select",J.value)},Fe=Z=>{pt(),j(),b.value.closeOnAutoApply&&!Z&&B()},pt=()=>{h.value&&M.value.enabled&&h.value.setParsedDate(J.value)},Jt=(Z=!1)=>{a.autoApply&&O(J.value)&&V()&&(D.value.enabled&&Array.isArray(J.value)?(D.value.partialRange||J.value.length===2)&&Fe(Z):Fe(Z))},G=()=>{M.value.enabled||(J.value=null)},B=(Z=!1)=>{var fe,be;Z&&J.value&&b.value.setDateOnMenuClose&&he(),v.value.enabled||(i.value&&(i.value=!1,z.value=!1,C(!1),T(!1),F(),r("closed"),W.value&&y(l.value)),G(),r("blur"),(be=(fe=u.value)==null?void 0:fe.$el)==null||be.remove())},ae=(Z,fe,be=!1)=>{if(!Z){J.value=null;return}const Un=Array.isArray(Z)?!Z.some(Ro=>!I(Ro)):I(Z),Bn=O(Z);Un&&Bn?(E.value=!0,J.value=Z,fe?(f.value=be,he(),r("text-submit")):a.autoApply&&Jt(),o.nextTick().then(()=>{E.value=!1})):r("invalid-date",Z)},ge=()=>{a.autoApply&&O(J.value)&&j(),pt()},ye=()=>i.value?B():Ve(),Gt=Z=>{J.value=Z},hn=()=>{M.value.enabled&&(p.value=!0,se()),r("focus")},en=()=>{if(M.value.enabled&&(p.value=!1,y(a.modelValue),f.value)){const Z=b1(m.value,g.value);Z==null||Z.focus()}r("blur")},mo=Z=>{u.value&&u.value.updateMonthYear(0,{month:sp(Z.month),year:sp(Z.year)})},fa=Z=>{y(Z??a.modelValue)},H=(Z,fe)=>{var be;(be=u.value)==null||be.switchView(Z,fe)},ee=(Z,fe)=>b.value.onClickOutside?b.value.onClickOutside(Z,fe):B(!0),ve=(Z=0)=>{var fe;(fe=u.value)==null||fe.handleFlow(Z)},De=()=>d;return d_(d,h,Z=>ee(V,Z)),e({closeMenu:B,selectDate:he,clearValue:nt,openMenu:Ve,onScroll:ce,formatInputValue:se,updateInternalModelValue:Gt,setMonthYear:mo,parseModel:fa,switchView:H,toggleMenu:ye,handleFlow:ve,getDpWrapMenuRef:De}),(Z,fe)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"pickerWrapperRef",ref:m,class:o.normalizeClass(U.value),"data-datepicker-instance":"","data-dp-mobile":o.unref(k)},[o.createVNode(s_,o.mergeProps({ref_key:"inputRef",ref:h,"input-value":o.unref(W),"onUpdate:inputValue":fe[0]||(fe[0]=be=>o.isRef(W)?W.value=be:null),"is-menu-open":i.value},Z.$props,{onClear:nt,onOpen:Ve,onSetInputDate:ae,onSetEmptyDate:o.unref(j),onSelectDate:he,onToggle:ye,onClose:B,onFocus:hn,onBlur:en,onRealBlur:fe[1]||(fe[1]=be=>p.value=!1),onTextInput:fe[2]||(fe[2]=be=>Z.$emit("text-input",be))}),o.createSlots({_:2},[o.renderList(o.unref(N),(be,Un)=>({name:be,fn:o.withCtx(Bn=>[o.renderSlot(Z.$slots,be,o.normalizeProps(o.guardReactiveProps(Bn)))])}))]),1040,["input-value","is-menu-open","onSetEmptyDate"]),(o.openBlock(),o.createBlock(o.resolveDynamicComponent(Z.teleport?o.Teleport:"div"),o.normalizeProps(o.guardReactiveProps(te.value)),{default:o.withCtx(()=>[o.createVNode(o.Transition,{name:o.unref(K)(o.unref(L)),css:o.unref(w)&&!o.unref(v).enabled},{default:o.withCtx(()=>[i.value?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,ref_key:"dpWrapMenuRef",ref:d},le.value,{class:{"dp--menu-wrapper":!o.unref(v).enabled},style:o.unref(v).enabled?void 0:o.unref(q)}),[o.createVNode(Ap,o.mergeProps({ref_key:"dpMenuRef",ref:u},Z.$props,{"internal-model-value":o.unref(J),"onUpdate:internalModelValue":fe[3]||(fe[3]=be=>o.isRef(J)?J.value=be:null),class:{[xe.value]:!0,"dp--menu-wrapper":Z.teleport},"open-on-top":o.unref(L),"no-overlay-focus":S.value,collapse:x.value,"get-input-rect":ie,"is-text-input-date":E.value,onClosePicker:B,onSelectDate:he,onAutoApply:Jt,onTimeUpdate:ge,onFlowStep:fe[4]||(fe[4]=be=>Z.$emit("flow-step",be)),onUpdateMonthYear:fe[5]||(fe[5]=be=>Z.$emit("update-month-year",be)),onInvalidSelect:fe[6]||(fe[6]=be=>Z.$emit("invalid-select",o.unref(J))),onAutoApplyInvalid:fe[7]||(fe[7]=be=>Z.$emit("invalid-select",be)),onInvalidFixedRange:fe[8]||(fe[8]=be=>Z.$emit("invalid-fixed-range",be)),onRecalculatePosition:o.unref(oe),onTooltipOpen:fe[9]||(fe[9]=be=>Z.$emit("tooltip-open",be)),onTooltipClose:fe[10]||(fe[10]=be=>Z.$emit("tooltip-close",be)),onTimePickerOpen:fe[11]||(fe[11]=be=>Z.$emit("time-picker-open",be)),onTimePickerClose:fe[12]||(fe[12]=be=>Z.$emit("time-picker-close",be)),onAmPmChange:fe[13]||(fe[13]=be=>Z.$emit("am-pm-change",be)),onRangeStart:fe[14]||(fe[14]=be=>Z.$emit("range-start",be)),onRangeEnd:fe[15]||(fe[15]=be=>Z.$emit("range-end",be)),onDateUpdate:fe[16]||(fe[16]=be=>Z.$emit("date-update",be)),onInvalidDate:fe[17]||(fe[17]=be=>Z.$emit("invalid-date",be)),onOverlayToggle:fe[18]||(fe[18]=be=>Z.$emit("overlay-toggle",be)),onMenuBlur:fe[19]||(fe[19]=be=>Z.$emit("blur"))}),o.createSlots({_:2},[o.renderList(o.unref(A),(be,Un)=>({name:be,fn:o.withCtx(Bn=>[o.renderSlot(Z.$slots,be,o.normalizeProps(o.guardReactiveProps({...Bn})))])}))]),1040,["internal-model-value","class","open-on-top","no-overlay-focus","collapse","is-text-input-date","onRecalculatePosition"])],16)):o.createCommentVNode("",!0)]),_:3},8,["name","css"])]),_:3},16))],10,u_))}}),zl=(()=>{const n=h_;return n.install=e=>{e.component("Vue3DatePicker",n)},n})();Object.entries(Object.freeze(Object.defineProperty({__proto__:null,default:zl},Symbol.toStringTag,{value:"Module"}))).forEach(([n,e])=>{n!=="default"&&(zl[n]=e)});const Ip=re(o.defineComponent({__name:"Datepicker",props:o.mergeModels({value:{},disabledDates:{type:[Array,Function]}},{value:{required:!0},valueModifiers:{}}),emits:["update:value"],setup(n){const e=o.useModel(n,"value"),t={locale:"ru",sixWeeks:"append",enableTimePicker:!1,autoApply:!0,inline:!0,monthNameFormat:"long"};return(r,a)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(r.$style.root)},[o.createVNode(o.unref(zl),o.mergeProps({modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=s=>e.value=s),disabledDates:r.disabledDates,range:Array.isArray(e.value)},t,{onClick:a[1]||(a[1]=o.withModifiers(()=>{},["stop"]))}),{"arrow-left":o.withCtx(()=>[o.createVNode(o.unref(wo),{icon:"outline-chevron-left",size:"34",view:"base-flat"})]),"arrow-right":o.withCtx(()=>[o.createVNode(o.unref(wo),{icon:"outline-chevron-right",size:"34",view:"base-flat"})]),_:1},16,["modelValue","disabledDates","range"])],2))}}),[["__cssModules",{$style:{}}]]);var us={exports:{}},p_=us.exports,Np;function Pp(){return Np||(Np=1,function(n,e){(function(t,r){n.exports=r()})(p_,function(){var t=1e3,r=6e4,a=36e5,s="millisecond",i="second",l="minute",c="hour",d="day",u="week",h="month",p="quarter",m="year",f="date",g="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,E=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(w){var k=["th","st","nd","rd"],_=w%100;return"["+w+(k[(_-20)%10]||k[_]||k[0])+"]"}},T=function(w,k,_){var A=String(w);return!A||A.length>=k?w:""+Array(k+1-A.length).join(_)+w},F={s:T,z:function(w){var k=-w.utcOffset(),_=Math.abs(k),A=Math.floor(_/60),N=_%60;return(k<=0?"+":"-")+T(A,2,"0")+":"+T(N,2,"0")},m:function w(k,_){if(k.date()<_.date())return-w(_,k);var A=12*(_.year()-k.year())+(_.month()-k.month()),N=k.clone().add(A,h),L=_-N<0,q=k.clone().add(A+(L?-1:1),h);return+(-(A+(_-N)/(L?N-q:q-N))||0)},a:function(w){return w<0?Math.ceil(w)||0:Math.floor(w)},p:function(w){return{M:h,y:m,w:u,d,D:f,h:c,m:l,s:i,ms:s,Q:p}[w]||String(w||"").toLowerCase().replace(/s$/,"")},u:function(w){return w===void 0}},I="en",O={};O[I]=C;var P="$isDayjsObject",M=function(w){return w instanceof Y||!(!w||!w[P])},v=function w(k,_,A){var N;if(!k)return I;if(typeof k=="string"){var L=k.toLowerCase();O[L]&&(N=L),_&&(O[L]=_,N=L);var q=k.split("-");if(!N&&q.length>1)return w(q[0])}else{var z=k.name;O[z]=k,N=z}return!A&&N&&(I=N),N||!A&&I},b=function(w,k){if(M(w))return w.clone();var _=typeof k=="object"?k:{};return _.date=w,_.args=arguments,new Y(_)},D=F;D.l=v,D.i=M,D.w=function(w,k){return b(w,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var Y=function(){function w(_){this.$L=v(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[P]=!0}var k=w.prototype;return k.parse=function(_){this.$d=function(A){var N=A.date,L=A.utc;if(N===null)return new Date(NaN);if(D.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var q=N.match(x);if(q){var z=q[2]-1||0,oe=(q[7]||"0").substring(0,3);return L?new Date(Date.UTC(q[1],z,q[3]||1,q[4]||0,q[5]||0,q[6]||0,oe)):new Date(q[1],z,q[3]||1,q[4]||0,q[5]||0,q[6]||0,oe)}}return new Date(N)}(_),this.init()},k.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},k.$utils=function(){return D},k.isValid=function(){return this.$d.toString()!==g},k.isSame=function(_,A){var N=b(_);return this.startOf(A)<=N&&N<=this.endOf(A)},k.isAfter=function(_,A){return b(_)<this.startOf(A)},k.isBefore=function(_,A){return this.endOf(A)<b(_)},k.$g=function(_,A,N){return D.u(_)?this[A]:this.set(N,_)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(_,A){var N=this,L=!!D.u(A)||A,q=D.p(_),z=function(se,_e){var U=D.w(N.$u?Date.UTC(N.$y,_e,se):new Date(N.$y,_e,se),N);return L?U:U.endOf(d)},oe=function(se,_e){return D.w(N.toDate()[se].apply(N.toDate("s"),(L?[0,0,0,0]:[23,59,59,999]).slice(_e)),N)},$=this.$W,R=this.$M,W=this.$D,J="set"+(this.$u?"UTC":"");switch(q){case m:return L?z(1,0):z(31,11);case h:return L?z(1,R):z(0,R+1);case u:var y=this.$locale().weekStart||0,j=($<y?$+7:$)-y;return z(L?W-j:W+(6-j),R);case d:case f:return oe(J+"Hours",0);case c:return oe(J+"Minutes",1);case l:return oe(J+"Seconds",2);case i:return oe(J+"Milliseconds",3);default:return this.clone()}},k.endOf=function(_){return this.startOf(_,!1)},k.$set=function(_,A){var N,L=D.p(_),q="set"+(this.$u?"UTC":""),z=(N={},N[d]=q+"Date",N[f]=q+"Date",N[h]=q+"Month",N[m]=q+"FullYear",N[c]=q+"Hours",N[l]=q+"Minutes",N[i]=q+"Seconds",N[s]=q+"Milliseconds",N)[L],oe=L===d?this.$D+(A-this.$W):A;if(L===h||L===m){var $=this.clone().set(f,1);$.$d[z](oe),$.init(),this.$d=$.set(f,Math.min(this.$D,$.daysInMonth())).$d}else z&&this.$d[z](oe);return this.init(),this},k.set=function(_,A){return this.clone().$set(_,A)},k.get=function(_){return this[D.p(_)]()},k.add=function(_,A){var N,L=this;_=Number(_);var q=D.p(A),z=function(R){var W=b(L);return D.w(W.date(W.date()+Math.round(R*_)),L)};if(q===h)return this.set(h,this.$M+_);if(q===m)return this.set(m,this.$y+_);if(q===d)return z(1);if(q===u)return z(7);var oe=(N={},N[l]=r,N[c]=a,N[i]=t,N)[q]||1,$=this.$d.getTime()+_*oe;return D.w($,this)},k.subtract=function(_,A){return this.add(-1*_,A)},k.format=function(_){var A=this,N=this.$locale();if(!this.isValid())return N.invalidDate||g;var L=_||"YYYY-MM-DDTHH:mm:ssZ",q=D.z(this),z=this.$H,oe=this.$m,$=this.$M,R=N.weekdays,W=N.months,J=N.meridiem,y=function(_e,U,xe,te){return _e&&(_e[U]||_e(A,L))||xe[U].slice(0,te)},j=function(_e){return D.s(z%12||12,_e,"0")},se=J||function(_e,U,xe){var te=_e<12?"AM":"PM";return xe?te.toLowerCase():te};return L.replace(E,function(_e,U){return U||function(xe){switch(xe){case"YY":return String(A.$y).slice(-2);case"YYYY":return D.s(A.$y,4,"0");case"M":return $+1;case"MM":return D.s($+1,2,"0");case"MMM":return y(N.monthsShort,$,W,3);case"MMMM":return y(W,$);case"D":return A.$D;case"DD":return D.s(A.$D,2,"0");case"d":return String(A.$W);case"dd":return y(N.weekdaysMin,A.$W,R,2);case"ddd":return y(N.weekdaysShort,A.$W,R,3);case"dddd":return R[A.$W];case"H":return String(z);case"HH":return D.s(z,2,"0");case"h":return j(1);case"hh":return j(2);case"a":return se(z,oe,!0);case"A":return se(z,oe,!1);case"m":return String(oe);case"mm":return D.s(oe,2,"0");case"s":return String(A.$s);case"ss":return D.s(A.$s,2,"0");case"SSS":return D.s(A.$ms,3,"0");case"Z":return q}return null}(_e)||q.replace(":","")})},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(_,A,N){var L,q=this,z=D.p(A),oe=b(_),$=(oe.utcOffset()-this.utcOffset())*r,R=this-oe,W=function(){return D.m(q,oe)};switch(z){case m:L=W()/12;break;case h:L=W();break;case p:L=W()/3;break;case u:L=(R-$)/6048e5;break;case d:L=(R-$)/864e5;break;case c:L=R/a;break;case l:L=R/r;break;case i:L=R/t;break;default:L=R}return N?L:D.a(L)},k.daysInMonth=function(){return this.endOf(h).$D},k.$locale=function(){return O[this.$L]},k.locale=function(_,A){if(!_)return this.$L;var N=this.clone(),L=v(_,A,!0);return L&&(N.$L=L),N},k.clone=function(){return D.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},w}(),K=Y.prototype;return b.prototype=K,[["$ms",s],["$s",i],["$m",l],["$H",c],["$W",d],["$M",h],["$y",m],["$D",f]].forEach(function(w){K[w[1]]=function(k){return this.$g(k,w[0],w[1])}}),b.extend=function(w,k){return w.$i||(w(k,Y,b),w.$i=!0),b},b.locale=v,b.isDayjs=M,b.unix=function(w){return b(1e3*w)},b.en=O[I],b.Ls=O,b.p={},b})}(us)),us.exports}var f_=Pp();const hr=Yy(f_),hs=re(o.defineComponent({__name:"DatepickerFilter",props:{value:{},disabledDates:{type:[Array,Function]},action:{default:"clear"},title:{default:"Укажите период"}},emits:["update:value","close","clear"],setup(n,{emit:e}){const t=o.ref(),r=o.ref(),a=o.ref(n.value.map(f=>hr(f).format("DD.MM.YYYY"))),s=e;function i(f,g){var x,E;if((g==null?void 0:g.length)===10){if(f==="start"){const C=a.value[1]??null;a.value=[g,C],C||(x=r.value)==null||x.$el.getElementsByTagName("input")[0].focus()}if(f==="end"){const C=a.value[0]??null;a.value=[C,g],C||(E=t.value)==null||E.$el.getElementsByTagName("input")[0].focus()}}}function l(f){a.value=f.map(g=>hr(g).format("DD.MM.YYYY"))}function c(){n.action==="close"?s("close"):d()}function d(){a.value=[],s("update:value",[]),s("clear")}function u(){s("update:value",p(a.value))}function h(f){if(!f)return null;const[g,x,E]=f.split(".");return!g||!x||!E?null:hr(`${E}-${x}-${g}`)}function p(f){var T;const[g,x]=f,E=h(g),C=h(x);return!E||!C?[]:[E.toDate(),(T=C.endOf("day"))==null?void 0:T.toDate()]}const m=o.computed(()=>p(a.value));return(f,g)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(f.$style.root)},[o.createVNode(o.unref(me),{size:"subhead",weight:"medium"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(f.title),1)]),_:1}),o.createElementVNode("div",{class:o.normalizeClass(f.$style.inputs)},[o.createVNode(o.unref(Fi),{ref_key:"inputStartRef",ref:t,value:a.value[0]??"",class:o.normalizeClass(f.$style.input),size:"34",autofocus:"",inputmode:"numeric",placeholder:"дд.мм.гггг",mask:"date","onUpdate:value":g[0]||(g[0]=x=>i("start",x))},null,8,["value","class"]),o.createElementVNode("span",{class:o.normalizeClass(f.$style.separator)},null,2),o.createVNode(o.unref(Fi),{ref_key:"inputEndRef",ref:r,value:a.value[1]??"",class:o.normalizeClass(f.$style.input),size:"34",inputmode:"numeric",placeholder:"дд.мм.гггг",mask:"date","onUpdate:value":g[1]||(g[1]=x=>i("end",x))},null,8,["value","class"])],2),o.createVNode(o.unref(Ip),{value:m.value,disabledDates:f.disabledDates,"onUpdate:value":l},null,8,["value","disabledDates"]),o.createElementVNode("div",{class:o.normalizeClass(f.$style.buttons)},[o.createVNode(o.unref(tn),{class:o.normalizeClass(f.$style.button),size:"28",view:"base",onClick:c},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(f.action==="close"?"Отменить":"Сбросить"),1)]),_:1},8,["class"]),o.createVNode(o.unref(tn),{class:o.normalizeClass(f.$style.button),size:"28",view:"base-primary",onClick:u},{default:o.withCtx(()=>g[2]||(g[2]=[o.createTextVNode(" Применить ")])),_:1,__:[2]},8,["class"])],2)],2))}}),[["__cssModules",{$style:{root:"DatepickerFilter__root_3fb46",inputs:"DatepickerFilter__inputs_566d1",separator:"DatepickerFilter__separator_bb391",input:"DatepickerFilter__input_2f6ad",buttons:"DatepickerFilter__buttons_b9700",button:"DatepickerFilter__button_c67bd"}}]]),Lp=n=>n.filter.kind!=="checkbox-group"?!1:n.value.key===n.filter.key,zp=n=>n.filter.kind!=="datepicker"?!1:n.value.key===n.filter.key,ps=re(o.defineComponent({__name:"CheckboxGroupFilter",props:{list:{},initialValue:{},selectAllButtonText:{}},emits:["apply"],setup(n,{emit:e}){const t=o.ref(!1),r=o.ref(n.initialValue),a=e,s=o.computed(()=>{var h;return((h=r.value)==null?void 0:h.length)||0}),i=h=>r.value.includes(h)??!1,l=(h,p)=>{t.value=!1,p?r.value=[...r.value,h.key]:r.value=r.value.filter(m=>m!==h.key)},c=()=>{r.value=n.list.map(h=>h.key)},d=()=>{r.value=[]},u=()=>{t.value=!1,a("apply",r.value.length>0?r.value:null)};return o.watch(r,()=>{t.value=!0}),(h,p)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(h.$style.root)},[o.createElementVNode("div",{class:o.normalizeClass(h.$style.header)},[o.createVNode(o.unref(me),{size:"caption",weight:"regular",color:"foreground-layout-layout-1-primary"},{default:o.withCtx(()=>[o.createTextVNode(" Выбрано: "+o.toDisplayString(s.value),1)]),_:1}),o.createVNode(o.unref(Jo),null,{default:o.withCtx(()=>[s.value>0?(o.openBlock(),o.createBlock(o.unref(tn),{key:0,view:"base",size:"28","icon-right":"outline-trash",onClick:d},{default:o.withCtx(()=>p[0]||(p[0]=[o.createTextVNode(" Очистить ")])),_:1,__:[0]})):o.createCommentVNode("",!0)]),_:1})],2),o.createVNode(o.unref(An),{size:"s",class:o.normalizeClass(h.$style.divider)},null,8,["class"]),o.createElementVNode("div",{class:o.normalizeClass([h.$style.content,t.value&&h.$style.spacing])},[h.selectAllButtonText?(o.openBlock(),o.createBlock(o.unref(tn),{key:0,class:o.normalizeClass(h.$style["select-all-button"]),view:"brand-flat",isWide:!1,size:"28",onClick:c},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(h.selectAllButtonText),1)]),_:1},8,["class"])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(h.list,m=>(o.openBlock(),o.createElementBlock("label",{key:m.key,class:o.normalizeClass(h.$style["checkbox-wrapper"])},[o.renderSlot(h.$slots,"renderItem",{item:m,isSelected:i(m.key),toggleItem:l},()=>[o.createVNode(o.unref(Ai),{value:i(m.key),title:m.label,size:"16","onUpdate:value":f=>l(m,f)},null,8,["value","title","onUpdate:value"])])],2))),128))],2),o.createVNode(o.unref(Jo),null,{default:o.withCtx(()=>[t.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(h.$style.action)},[o.createVNode(o.unref(tn),{view:"base-primary",size:"44","is-wide":"",onClick:u},{default:o.withCtx(()=>p[1]||(p[1]=[o.createTextVNode(" Применить ")])),_:1,__:[1]})],2)):o.createCommentVNode("",!0)]),_:1})],2))}}),[["__cssModules",{$style:{root:"CheckboxGroupFilter__root_90870",header:"CheckboxGroupFilter__header_a0ec1",divider:"CheckboxGroupFilter__divider_07d3a",content:"CheckboxGroupFilter__content_7f67e",spacing:"CheckboxGroupFilter__spacing_3e02d","checkbox-wrapper":"CheckboxGroupFilter__checkbox-wrapper_cf1f6",action:"CheckboxGroupFilter__action_507ea","select-all-button":"CheckboxGroupFilter__select-all-button_ff85a"}}]]),Fp=re(o.defineComponent({__name:"FilterChip",props:{count:{},view:{}},emits:["click","delete"],setup(n,{expose:e,emit:t}){const{isShowDropdown:r,triggerElementRef:a,parentElementRef:s,toggleIsShowDropdown:i}=Zn(),l=t;return e({toggleDropdown:i}),(c,d)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(za),{ref_key:"parentElementRef",ref:s,count:c.count,onClick:o.unref(i),onDelete:d[0]||(d[0]=u=>l("delete"))},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},8,["count","onClick"]),o.createVNode(o.unref(Jn),{isShowDropdown:o.unref(r),"onUpdate:isShowDropdown":d[1]||(d[1]=u=>o.isRef(r)?r.value=u:null),verticalOffset:4,"horizontal-align":"left"},{default:o.withCtx(()=>[o.createElementVNode("div",{ref_key:"triggerElementRef",ref:a,class:o.normalizeClass(c.$style.dropdown)},[o.renderSlot(c.$slots,"dropdown")],2)]),_:3},8,["isShowDropdown"])],64))}}),[["__cssModules",{$style:{root:"FilterChip__root_cfd7c",dropdown:"FilterChip__dropdown_88223"}}]]),Rp=re(o.defineComponent({__name:"CheckboxGroupFilterChip",props:{filter:{},value:{}},emits:["apply","drop"],setup(n,{emit:e}){const t=o.useTemplateRef("root"),r=o.computed(()=>n.value.value.length),a=e;function s(){a("drop",n.value)}function i(l){var d;const c={key:n.filter.key,value:l??[]};a(l?"apply":"drop",c),(d=t.value)==null||d.toggleDropdown()}return(l,c)=>(o.openBlock(),o.createBlock(o.unref(Fp),{ref:"root",count:r.value,onDelete:s},{dropdown:o.withCtx(()=>[o.createVNode(o.unref(ps),{ref:"triggerElementRef",list:l.filter.options,initialValue:l.value.value,onApply:i},{renderItem:o.withCtx(({item:d,isSelected:u,toggleItem:h})=>[o.renderSlot(l.$slots,"renderItem",{item:d,isSelected:u,toggleItem:h},()=>[o.createVNode(o.unref(Ai),{value:u,title:d.label,size:"16","onUpdate:value":p=>h(d,p)},null,8,["value","title","onUpdate:value"])])]),_:3},8,["list","initialValue"])]),default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(l.filter.label)+" ",1)]),_:3},8,["count"]))}}),[["__cssModules",{$style:{root:"CheckboxGroupFilterChip__root_17272"}}]]);var fs={exports:{}},m_=fs.exports,Vp;function g_(){return Vp||(Vp=1,function(n,e){(function(t,r){n.exports=r(Pp())})(m_,function(t){function r(f){return f&&typeof f=="object"&&"default"in f?f:{default:f}}var a=r(t),s="января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),i="январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),l="янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),c="янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_"),d=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function u(f,g,x){var E,C;return x==="m"?g?"минута":"минуту":f+" "+(E=+f,C={mm:g?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[x].split("_"),E%10==1&&E%100!=11?C[0]:E%10>=2&&E%10<=4&&(E%100<10||E%100>=20)?C[1]:C[2])}var h=function(f,g){return d.test(g)?s[f.month()]:i[f.month()]};h.s=i,h.f=s;var p=function(f,g){return d.test(g)?l[f.month()]:c[f.month()]};p.s=c,p.f=l;var m={name:"ru",weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_сбт".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),months:h,monthsShort:p,weekStart:1,yearStart:4,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:u,mm:u,h:"час",hh:u,d:"день",dd:u,M:"месяц",MM:u,y:"год",yy:u},ordinal:function(f){return f},meridiem:function(f){return f<4?"ночи":f<12?"утра":f<17?"дня":"вечера"}};return a.default.locale(m,null,!0),m})}(fs)),fs.exports}g_();const Hp=re(o.defineComponent({__name:"DatepickerFilterChip",props:{filter:{},value:{}},emits:["apply","drop"],setup(n,{emit:e}){hr.locale("ru");const t=o.useTemplateRef("root");function r(l){const[c,d]=l.value.map(hr),u=hr(),h=c.year()===u.year(),p=m=>h?m:`${m} YYYY`;return c.isSame(d,"day")?c.format(p("D MMMM")):c.isSame(d,"month")?c.format("D")+" - "+d.format(p("D MMMM")):c.isSame(d,"year")?c.format("D MMMM")+" - "+d.format(p("D MMMM")):c.format("DD.MM.YYYY")+" - "+d.format("DD.MM.YYYY")}const a=o.computed({get(){return n.value.value},set(l){var d;const c={key:n.filter.key,value:l??[]};l!=null&&l.length?s("apply",c):s("drop",c),(d=t.value)==null||d.toggleDropdown()}}),s=e;function i(){s("drop",n.value)}return(l,c)=>(o.openBlock(),o.createBlock(o.unref(Fp),{ref:"root",onDelete:i},{dropdown:o.withCtx(()=>[o.createVNode(o.unref(hs),{value:a.value,"onUpdate:value":c[0]||(c[0]=d=>a.value=d)},null,8,["value"])]),default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(r(l.value))+" ",1)]),_:1},512))}}),[["__cssModules",{$style:{root:"DatepickerFilterChip__root_79c23"}}]]),y_=["onClick"],b_=re(o.defineComponent({__name:"FilterHub",props:o.mergeModels({list:{}},{values:{required:!0},valuesModifiers:{}}),emits:["update:values"],setup(n){const e=o.useModel(n,"values");function t(f){const g=e.value.filter(x=>x.key!==f.key);f.value===null?e.value=g:e.value=[...g,{key:f.key,value:f.value}],l(!1)}function r(f,g){var E;const x=((E=e.value)==null?void 0:E.find(C=>C.key===f.key))??null;return x?x.value:g}const{triggerElementRef:a,isShowDropdown:s,toggleIsShowDropdown:i,setIsShowDropdown:l,parentElementRef:c}=Zn(),d=o.ref(n.list[0].key);o.watch(s,f=>{f&&(d.value=n.list[0].key??"")},{immediate:!0});const u=o.computed(()=>{const f=n.list.find(g=>g.key===d.value);return f||null}),h=o.computed(()=>e.value.map(f=>{const g=n.list.find(x=>x.key===f.key);if(!g)throw new Error(`Filter with key ${f.key} not found`);return{kind:g.kind,filter:g,value:f}}));function p(f){d.value=f.key}function m(f){e.value=e.value.filter(g=>g.key!==f.key)}return(f,g)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(f.$style.root)},[o.renderSlot(f.$slots,"before"),o.createElementVNode("div",null,[o.createVNode(o.unref(tn),{ref_key:"parentElementRef",ref:c,"data-ignore-click-outside":"",class:o.normalizeClass(f.$style.button),view:"base",size:"28",onClick:o.unref(i),"icon-right":"outline-plus"},{default:o.withCtx(()=>g[3]||(g[3]=[o.createTextVNode(" Добавить фильтр ")])),_:1,__:[3]},8,["class","onClick"]),o.createVNode(o.unref(Jn),{"is-show-dropdown":o.unref(s),"onUpdate:isShowDropdown":g[2]||(g[2]=x=>o.isRef(s)?s.value=x:null),verticalOffset:"4",horizontalAlign:"left"},{default:o.withCtx(()=>[o.createElementVNode("div",{ref_key:"triggerElementRef",ref:a,class:o.normalizeClass(f.$style.panel)},[o.createElementVNode("div",{class:o.normalizeClass(f.$style.left)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.list,x=>(o.openBlock(),o.createElementBlock("div",{key:`${x.key}-filter`,class:o.normalizeClass([f.$style.filter,{[f.$style.active]:d.value===x.key,[f.$style.disabled]:x.isDisabled}]),onClick:E=>p(x)},[o.createElementVNode("div",{class:o.normalizeClass(f.$style["filter-inner"])},[x.icon?(o.openBlock(),o.createBlock(o.unref($e),{key:0,name:x.icon,size:16,color:d.value===x.key?"foreground-surface-layout-1-surface-2-primary":"foreground-surface-layout-1-surface-2-secondary"},null,8,["name","color"])):o.createCommentVNode("",!0),o.createVNode(o.unref(me),{size:"caption",weight:"regular",color:"foreground-surface-layout-1-surface-2-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(x.label),1)]),_:2},1024)],2),o.createVNode(o.unref($e),{name:"outline-chevron-right",size:"16",color:"text-common-base-primary-default"})],10,y_))),128))],2),o.createVNode(o.unref(qn),{class:o.normalizeClass(f.$style.right)},{default:o.withCtx(()=>[u.value?o.renderSlot(f.$slots,"renderItem",{key:0,activeFilter:u.value,onApply:t,getFilterValue:r},()=>[u.value.kind==="checkbox-group"?(o.openBlock(),o.createBlock(o.unref(ps),{key:`${u.value.key}-checkbox-group`,class:o.normalizeClass(f.$style.grow),list:u.value.options,initialValue:r(u.value,[]),onApply:g[0]||(g[0]=x=>t({key:u.value.key,value:x}))},null,8,["class","list","initialValue"])):u.value.kind==="datepicker"?(o.openBlock(),o.createBlock(o.unref(hs),{key:`${u.value.key}-datepicker`,class:o.normalizeClass(f.$style.grow),value:r(u.value,[]),"onUpdate:value":g[1]||(g[1]=x=>t({key:u.value.key,value:x}))},null,8,["class","value"])):o.createCommentVNode("",!0)]):o.createCommentVNode("",!0)]),_:3},8,["class"])],2)]),_:3},8,["is-show-dropdown"])]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(h.value,x=>o.renderSlot(f.$slots,"renderChip",{item:x,apply:t,drop:m},()=>[o.unref(Lp)(x)?(o.openBlock(),o.createBlock(o.unref(Rp),{key:`${x.filter.key}-chip`,filter:x.filter,value:x.value,onApply:t,onDrop:m},null,8,["filter","value"])):o.unref(zp)(x)?(o.openBlock(),o.createBlock(o.unref(Hp),{key:1,filter:x.filter,value:x.value,onApply:t,onDrop:m},null,8,["filter","value"])):o.createCommentVNode("",!0)])),256))],2))}}),[["__cssModules",{$style:{root:"FilterHub__root_c1f46",panel:"FilterHub__panel_1d02f",left:"FilterHub__left_b52ce",right:"FilterHub__right_f5d99",filter:"FilterHub__filter_e17a3",active:"FilterHub__active_1a02e",disabled:"FilterHub__disabled_3f21a","filter-inner":"FilterHub__filter-inner_c748b",grow:"FilterHub__grow_adf33"}}]]),k_=re(o.defineComponent({__name:"ToastItem",props:{title:{},view:{default:"base"},fontWeight:{default:"regular"}},setup(n){const e=o.computed(()=>{if(n.fontWeight==="regular")switch(n.view){case"danger":return"outline-warning";default:return"outline-check"}switch(n.view){case"danger":return"filled-warning";default:return"filled-success"}}),t=o.computed(()=>{switch(n.view){case"primary":return"foreground-element-tooltip-primary";default:return"text-common-base-inverse-default"}}),r=o.computed(()=>{switch(n.view){case"primary":return"foreground-element-tooltip-primary";default:return"icon-common-base-tertiary-default"}});return(a,s)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([a.$style.root,a.$style[`view_${a.view}`]]),onClick:s[0]||(s[0]=i=>a.$emit("click"))},[o.createVNode(o.unref($e),{size:18,name:e.value,color:r.value},null,8,["name","color"]),o.createVNode(o.unref(me),{class:o.normalizeClass(a.$style.title),size:"subhead",weight:a.fontWeight,color:t.value,align:"left"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.title),1)]),_:1},8,["class","weight","color"]),o.createVNode(o.unref($e),{size:18,name:"outline-cross",color:r.value},null,8,["color"])],2))}}),[["__cssModules",{$style:{root:"ToastItem__root_8d069",view_base:"ToastItem__view_base_44eac",view_danger:"ToastItem__view_danger_833b2",view_primary:"ToastItem__view_primary_d308a",title:"ToastItem__title_00905"}}]]);class v_{constructor(){pe(this,"list",o.ref([]));pe(this,"timeouts",o.ref({}))}restartTimeouts(){Object.keys(this.timeouts.value).forEach((e,t)=>{this.timeouts.value[e]=setTimeout(()=>{this.remove(+e),clearTimeout(this.timeouts.value[e])},4e3+t*300)})}pauseTimeouts(){Object.keys(this.timeouts.value).forEach(e=>{clearTimeout(this.timeouts.value[e])})}remove(e){this.list.value=this.list.value.filter(t=>t.id!==e)}show(e){let t;const r=this.list.value[0]?this.list.value[0].id+1:1,a=5e3;typeof e=="string"?t={id:r,title:e,view:"base"}:t={...e,title:e.title,id:r},this.list.value.length===3&&this.list.value.pop(),this.list.value.unshift(t),this.timeouts.value[r]=setTimeout(()=>{this.remove(t.id),clearTimeout(this.timeouts.value[r])},a)}showError(e="Упс, что-то пошло не так :("){this.show({title:e,view:"danger"})}install(e){e.provide(Fl,this)}}const Fl=Symbol("ToastService"),w_=new v_,__=["id"],C_=re(o.defineComponent({__name:"Toaster",setup(n){let e;const t=o.inject(Fl),r=o.ref(),a=o.ref([]),s=o.ref(!1),i=o.ref(x()),l=o.ref(x()),c=o.ref(x()),d=o.ref(x());function u(I){const O=E(I);return{toaster:{transform:i.value[O]},body:{transform:l.value[O]},left:{transform:c.value[O]},right:{transform:d.value[O]}}}function h(I,O){(O!=="main"||i.value.main.length)&&(i.value[O]=I.mainTranslate),l.value[O]=I.scale,c.value[O]=I.leftTranslate,d.value[O]=I.rightTranslate}function p(){let O=0,P=0;a.value.sort(C).forEach((M,v)=>{const b=E(v),D=F(`${O}px`);h(D,b),O+=M.clientHeight+12,P=Math.max(P,M.clientWidth)}),r.value.style.height=`${O}px`,r.value.style.width=`${P}px`}function m(){o.nextTick(()=>{const[I,O,P]=a.value.sort(C),M=F("0");if(h(M,"main"),O){const v=T({mainElement:I,element:O,translateY:"-15%",index:1});h(v,"second")}if(P){const v=T({mainElement:I,element:P,translateY:"-30%",index:2});h(v,"third"),o.nextTick(()=>{var D;const b=(D=r.value)==null?void 0:D.querySelector(".toaster-leave-active");if(b){const Y=T({mainElement:I,element:b,translateY:"45%",index:3});b.setAttribute("style",`transform: ${Y.mainTranslate};`),b.children[1].setAttribute("style",`transform: ${Y.scale};`),b.children[0].setAttribute("style",`transform: ${Y.leftTranslate};`),b.children[2].setAttribute("style",`transform: ${Y.rightTranslate};`),b.children[4].setAttribute("style",`transform: ${Y.scale};`),b.children[3].setAttribute("style",`transform: ${Y.leftTranslate};`),b.children[5].setAttribute("style",`transform: ${Y.rightTranslate};`)}})}})}function f(I){s.value&&(t==null||t.remove(I),p())}function g(){!s.value&&(t!=null&&t.list.value)&&t.list.value.length>1?(s.value=!0,t==null||t.pauseTimeouts(),p(),e=setTimeout(()=>{s.value=!1,m(),r.value.style.height="auto",r.value.style.width="auto",t==null||t.restartTimeouts(),clearTimeout(e)},5e3)):t!=null&&t.list.value[0]&&!s.value&&(t==null||t.remove(t==null?void 0:t.list.value[0].id))}o.watch(()=>t==null?void 0:t.list,()=>{s.value?p():m()},{deep:!0});function x(){return{main:"",second:"",third:""}}function E(I){switch(I){case 0:return"main";case 1:return"second";default:return"third"}}function C(I,O){return Number(O.id)-Number(I.id)}function T({mainElement:I,element:O,translateY:P,index:M}){const v=O.getBoundingClientRect(),b=I.getBoundingClientRect(),D=b.height/v.height,Y=(b.width-10*M)/v.width,K=(v.width-Y*v.width)/2;return{mainTranslate:`translateY(${P}) translateX(-50%)`,scale:`scale(${Y}, ${D})`,leftTranslate:`translateX(${K-12}px)`,rightTranslate:`translateX(${-K+12}px)`}}function F(I){return{mainTranslate:`translateY(${I}) translateX(-50%)`,scale:"scale(1, 1)",leftTranslate:"translateX(-12px)",rightTranslate:"translateX(12px)"}}return(I,O)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"rootRef",ref:r,class:o.normalizeClass([I.$style.root,s.value&&I.$style["is-expand"]]),onClick:g},[o.createVNode(o.TransitionGroup,{tag:"div",enterFromClass:I.$style["toaster-enter-from"],enterToClass:I.$style["toaster-enter-to"],enterActiveClass:I.$style["toaster-enter-active"],leaveFromClass:I.$style["toaster-leave-from"],leaveToClass:I.$style["toaster-leave-to"],leaveActiveClass:I.$style["toaster-leave-active"]},{default:o.withCtx(()=>{var P;return[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList((P=o.unref(t))==null?void 0:P.list.value,(M,v)=>(o.openBlock(),o.createElementBlock("div",{key:M.id,id:`${M.id}`,ref_for:!0,ref_key:"toastersRef",ref:a,class:o.normalizeClass([I.$style.toaster,I.$style[`view_${M.view??"success"}`],s.value?"is-expand":""]),style:o.normalizeStyle(u(v).toaster)},[o.createElementVNode("div",{class:o.normalizeClass(I.$style.left),style:o.normalizeStyle(u(v).left)},null,6),o.createElementVNode("div",{class:o.normalizeClass(I.$style.body),style:o.normalizeStyle(u(v).body)},[o.createVNode(k_,o.mergeProps({ref_for:!0},M,{onClick:()=>f(M.id)}),null,16,["onClick"])],6),o.createElementVNode("div",{class:o.normalizeClass(I.$style.right),style:o.normalizeStyle(u(v).right)},null,6),o.createElementVNode("div",{class:o.normalizeClass([I.$style.left,I.$style.shadow]),style:o.normalizeStyle(u(v).left)},null,6),o.createElementVNode("div",{class:o.normalizeClass([I.$style.body,I.$style.shadow]),style:o.normalizeStyle(u(v).body)},null,6),o.createElementVNode("div",{class:o.normalizeClass([I.$style.right,I.$style.shadow]),style:o.normalizeStyle(u(v).right)},null,6)],14,__))),128))]}),_:1},8,["enterFromClass","enterToClass","enterActiveClass","leaveFromClass","leaveToClass","leaveActiveClass"])],2))}}),[["__cssModules",{$style:{"toaster-enter-from":"Toaster__toaster-enter-from_8a179","toaster-enter":"Toaster__toaster-enter_2cb2e","toaster-enter-to":"Toaster__toaster-enter-to_22319","toaster-enter-active":"Toaster__toaster-enter-active_af352","toaster-leave-active":"Toaster__toaster-leave-active_8020d","toaster-leave-from":"Toaster__toaster-leave-from_3ccc0","toaster-leave":"Toaster__toaster-leave_ab1a5","toaster-leave-to":"Toaster__toaster-leave-to_7f821",root:"Toaster__root_6a9fa","is-expand":"Toaster__is-expand_e6c4c",toaster:"Toaster__toaster_e01d3",body:"Toaster__body_aebdf",view_base:"Toaster__view_base_bb27b",left:"Toaster__left_1299a",right:"Toaster__right_9f93f",view_danger:"Toaster__view_danger_184da",view_primary:"Toaster__view_primary_439f6",shadow:"Toaster__shadow_b92b5"}}]]);class E_{async install(){if(!document.getElementById("svg-sprite"))try{const t=await(await fetch("/sprite/sprite.svg")).text(),r=document.createElement("div");r.id="svg-sprite",r.style.display="none",r.innerHTML=t,document.body.insertBefore(r,document.body.firstChild)}catch(e){console.error("Failed to load SVG sprite:",e)}}}const S_=new E_,x_=["disabled"],B_=["onClick"],T_=o.defineComponent({__name:"StatusSelect",props:o.mergeModels({value:{},list:{},isLoading:{type:Boolean},isDisabled:{type:Boolean}},{value:{required:!0},valueModifiers:{}}),emits:["update:value"],setup(n){const{isShowDropdown:e,setIsShowDropdown:t,toggleIsShowDropdown:r,triggerElementRef:a,parentElementRef:s}=Zn(),i=o.useModel(n,"value");function l(f){i.value=f,t(!1)}const c=Lr({secondary:"text-button-base-secondary",success:"text-button-success-primary",brand:"text-button-brand-primary",critical:"text-button-critical-primary"}),d=Lr({secondary:"icon-button-base-secondary",success:"icon-button-success-primary",brand:"icon-button-brand-primary",critical:"icon-button-critical-primary"}),u=o.computed(()=>{var f;return c.get(((f=p.value)==null?void 0:f.view)??"secondary")}),h=o.computed(()=>{var f;return d.get(((f=p.value)==null?void 0:f.view)??"secondary")}),p=o.computed(()=>n.list.find(f=>f.id===i.value)),m=()=>{n.isDisabled||r()};return(f,g)=>{var x;return o.openBlock(),o.createElementBlock("button",{ref_key:"triggerElementRef",ref:a,disabled:f.isLoading,class:o.normalizeClass([f.$style.root,f.$style[`view_${(x=p.value)==null?void 0:x.view}`],{[f.$style["is-loading"]]:f.isLoading,[f.$style["is-disabled"]]:f.isDisabled}]),onClick:o.withModifiers(m,["stop"])},[o.createElementVNode("div",{ref_key:"parentElementRef",ref:s,class:o.normalizeClass(f.$style.wrapper)},[o.createVNode(o.unref($t),null,{default:o.withCtx(()=>{var E;return[(o.openBlock(),o.createBlock(o.unref(me),{class:o.normalizeClass(f.$style.text),key:(E=p.value)==null?void 0:E.text,"number-of-lines":"1",size:"caption",weight:"bold",color:u.value},{default:o.withCtx(()=>{var C;return[o.createTextVNode(o.toDisplayString((C=p.value)==null?void 0:C.text),1)]}),_:1},8,["class","color"]))]}),_:1}),o.createElementVNode("div",{class:o.normalizeClass(f.$style["icon-wrapper"])},[f.isDisabled?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref($e),{key:0,class:o.normalizeClass(f.$style.icon),name:"outline-chevron-down",size:"16",color:h.value},null,8,["class","color"])),o.createVNode(o.unref($t),null,{default:o.withCtx(()=>[f.isLoading?(o.openBlock(),o.createBlock(o.unref(_r),{key:0,color:h.value,size:"14",class:o.normalizeClass(f.$style.loader)},null,8,["color","class"])):o.createCommentVNode("",!0)]),_:1})],2)],2),o.createVNode(o.unref(Jn),{isShowDropdown:o.unref(e),"onUpdate:isShowDropdown":g[0]||(g[0]=E=>o.isRef(e)?e.value=E:null),verticalOffset:"4"},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(f.$style.scroller)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.list,E=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([f.$style.item,{[f.$style["is-active"]]:E.id===i.value}]),key:E.id,onClick:o.withModifiers(C=>l(E.id),["stop"])},[o.createVNode(o.unref(me),{size:"subhead"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(E.text),1)]),_:2},1024),o.createVNode(o.unref($t),null,{default:o.withCtx(()=>[E.id===i.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(f.$style.checkbox)},[o.createVNode(o.unref($e),{name:"outline-check",color:"icon-common-base-primary-default",size:"18"})],2)):o.createCommentVNode("",!0)]),_:2},1024)],10,B_))),128))],2)]),_:1},8,["isShowDropdown"])],10,x_)}}}),jp={root:"StatusSelect__root_9bfa0","is-disabled":"StatusSelect__is-disabled_9b1d9",wrapper:"StatusSelect__wrapper_8cabc","wrapper-skeleton":"StatusSelect__wrapper-skeleton_9c265",text:"StatusSelect__text_b4d1c","icon-wrapper":"StatusSelect__icon-wrapper_97b83",icon:"StatusSelect__icon_c49fe",item:"StatusSelect__item_37c1b","is-active":"StatusSelect__is-active_299a0",loader:"StatusSelect__loader_aa2c1","is-loading":"StatusSelect__is-loading_7ec4e",view_secondary:"StatusSelect__view_secondary_e4022",view_success:"StatusSelect__view_success_aa0c9",view_critical:"StatusSelect__view_critical_54f77",view_brand:"StatusSelect__view_brand_1759a",scroller:"StatusSelect__scroller_c12db",checkbox:"StatusSelect__checkbox_0c502"},$_=re(T_,[["__cssModules",{$style:jp}]]),M_=re(o.defineComponent({__name:"StatusSelectSkeleton",props:{widthRange:{}},setup(n){const e=o.ref(),t=o.ref("");function r(){if(n.widthRange&&n.widthRange[0]&&n.widthRange[1]&&e.value){const a=ru(e.value,"max-width");if(a){const s=~a.toString().indexOf("%")?parseInt(a.toString().replace("%",""),10):100,i=parseFloat((Math.abs(n.widthRange[1]-n.widthRange[0])*Math.random()*100).toFixed(2)),l=(n.widthRange[0]>=n.widthRange[1]?n.widthRange[0]:n.widthRange[1])*100;t.value=`${(l-i)*s/100}%`}}}return o.onMounted(()=>r()),(a,s)=>(o.openBlock(),o.createElementBlock("button",{ref_key:"skeleton",ref:e,key:t.value,style:o.normalizeStyle({width:t.value}),class:o.normalizeClass([a.$style.root,a.$style.view_secondary])},[o.createElementVNode("div",{class:o.normalizeClass([a.$style.wrapper,a.$style["wrapper-skeleton"]])},null,2)],6))}}),[["__cssModules",{$style:jp}]]),Yp={interactionType:"web"},Up=Symbol("GlobalConfig"),D_=n=>{o.provide(Up,{...Yp,...n})},O_=()=>o.inject(Up,Yp),A_=["onClick"],I_=o.defineComponent({__name:"ThemePicker",props:o.mergeModels({value:{},list:{}},{value:{required:!0},valueModifiers:{}}),emits:["update:value"],setup(n){const e=o.useModel(n,"value");return(t,r)=>(o.openBlock(),o.createElementBlock("article",{class:o.normalizeClass(t.$style.root)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.list,a=>(o.openBlock(),o.createElementBlock("button",{key:a.id,class:o.normalizeClass([t.$style.item,a.color,{[t.$style["is-active"]]:e.value===a.id}]),onClick:s=>e.value=a.id},[o.createElementVNode("div",{class:o.normalizeClass(t.$style.theme)},null,2)],10,A_))),128))],2))}}),Wp={root:"ThemePicker__root_42aa5",item:"ThemePicker__item_a750e","item-skeleton":"ThemePicker__item-skeleton_17dde",theme:"ThemePicker__theme_6765b","is-active":"ThemePicker__is-active_54a2a"},N_=re(I_,[["__cssModules",{$style:Wp}]]),P_=re(o.defineComponent({__name:"ThemePickerSkeleton",setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("article",{class:o.normalizeClass(e.$style.root)},[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(9,r=>o.createElementVNode("button",{key:r,class:o.normalizeClass([e.$style.item,e.$style["item-skeleton"]])},[o.createElementVNode("div",{class:o.normalizeClass(e.$style.theme)},null,2)],2)),64))],2))}}),[["__cssModules",{$style:Wp}]]),L_=re(o.defineComponent({__name:"Breadcrumbs",props:{list:{},color:{default:"foreground-layout-layout-1-primary"},tag:{default:"a"}},setup(n){function e(t){return n.tag==="router-link"?{to:t.href}:{href:t.href,target:"_blank",rel:"noopener noreferrer"}}return(t,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(t.$style.root)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.list,a=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(t.tag),o.mergeProps({class:t.$style.breadcrumb,key:a.text+a.href,ref_for:!0},e(a)),{default:o.withCtx(()=>[o.createVNode(o.unref(me),{class:o.normalizeClass(t.$style.text),color:t.color,tag:"span",size:"caption"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.text),1)]),_:2},1032,["class","color"]),o.createVNode(o.unref($e),{class:o.normalizeClass(t.$style.icon),name:"outline-chevron-right",color:t.color,size:"16"},null,8,["class","color"])]),_:2},1040,["class"]))),128))],2))}}),[["__cssModules",{$style:{root:"Breadcrumbs__root_d903b",breadcrumb:"Breadcrumbs__breadcrumb_75c26",text:"Breadcrumbs__text_92d91",icon:"Breadcrumbs__icon_42802"}}]]),z_=re(o.defineComponent({__name:"VerificationInfoCell",props:{icon:{},title:{},description:{}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.$style.root)},[o.createVNode(o.unref(Gu),{icon:e.icon,isRounded:"",size:40},null,8,["icon"]),o.createElementVNode("div",{class:o.normalizeClass(e.$style.content)},[o.createVNode(me,{class:o.normalizeClass(e.$style.title),size:"subhead",weight:"regular",color:"foreground-layout-layout-1-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.title),1)]),_:1},8,["class"]),e.description?(o.openBlock(),o.createBlock(me,{key:0,class:o.normalizeClass(e.$style.description),size:"subhead",weight:"regular",color:"foreground-layout-layout-1-secondary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.description),1)]),_:1},8,["class"])):o.createCommentVNode("",!0)],2),o.createElementVNode("div",{class:o.normalizeClass(e.$style.actions)},[o.renderSlot(e.$slots,"default")],2)],2))}}),[["__cssModules",{$style:{root:"VerificationInfoCell__root_526a7",content:"VerificationInfoCell__content_f9a78",actions:"VerificationInfoCell__actions_a1daf"}}]]),F_=re(o.defineComponent({__name:"Avatar",props:{image:{},initials:{},size:{default:40},mode:{default:"default"}},setup(n){o.ref("idle");const e=Lr({28:"body",36:"title3",40:"title3",56:"title1",120:"title120"}),t=Lr({28:14,36:18,40:18,56:24,120:48}),r=o.computed(()=>e.get(n.size.toString())),a=o.computed(()=>t.get(n.size.toString()));return(s,i)=>s.mode==="initials"?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass([s.$style.root,s.$style[`size_${s.size}`]])},[o.createVNode(o.unref(me),{class:o.normalizeClass(s.$style.initials),size:r.value,color:"foreground-element-avatar-base-t",weight:"medium"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(s.initials),1)]),_:1},8,["class","size"])],2)):(o.openBlock(),o.createBlock(o.unref(Ho),{class:o.normalizeClass([s.$style.root,s.$style[`size_${s.size}`]]),src:s.image??"",key:"image",alt:"Аватар",width:s.size,height:s.size,objectFit:"cover"},{fallback:o.withCtx(()=>[s.initials?(o.openBlock(),o.createBlock(o.unref(me),{key:0,class:o.normalizeClass(s.$style.initials),size:r.value,color:"foreground-element-avatar-base-t",weight:"medium"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(s.initials),1)]),_:1},8,["class","size"])):(o.openBlock(),o.createBlock(o.unref($e),{key:1,size:a.value,name:"outline-user",color:"foreground-element-avatar-base-t"},null,8,["size"]))]),_:1},8,["class","src","width","height"]))}}),[["__cssModules",{$style:{root:"Avatar__root_5ff11",image:"Avatar__image_0b5c9",initials:"Avatar__initials_311ca",size_28:"Avatar__size_28_38212",size_36:"Avatar__size_36_cfcf4",size_40:"Avatar__size_40_fa607",size_56:"Avatar__size_56_1f15d",size_120:"Avatar__size_120_fece6"}}]]),R_={key:0},ms=re(o.defineComponent({__name:"MenuBarItem",props:{onClick:{type:Function},text:{},icon:{},view:{default:"base"},badgeText:{},isActive:{type:Boolean},isChecked:{type:Boolean}},setup(n){const e=o.computed(()=>n.view==="base"?{icon:"foreground-surface-popover-base",text:"foreground-surface-popover-base"}:n.view==="secondary"?{icon:"foreground-surface-popover-base-secondary",text:"foreground-surface-popover-base-secondary"}:{icon:"foreground-surface-popover-base-critical",text:"foreground-surface-popover-base-critical"});return(t,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([t.$style.root,t.$style[`view_${t.view}`],{[t.$style.active]:t.isActive}]),onClick:r[0]||(r[0]=(...a)=>t.onClick&&t.onClick(...a))},[t.icon?(o.openBlock(),o.createBlock(o.unref($e),{key:0,class:o.normalizeClass(t.$style.icon),size:"18",name:t.icon,color:e.value.icon},null,8,["class","name","color"])):t.badgeText?(o.openBlock(),o.createBlock(o.unref(ni),{key:1,view:"base",isRounded:!0},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(t.badgeText),1)]),_:1})):o.createCommentVNode("",!0),o.createVNode(o.unref(me),{size:"subhead",color:e.value.text,weight:"regular",class:o.normalizeClass(t.$style.text)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(t.text),1)]),_:1},8,["color","class"]),o.createVNode(o.unref($t),null,{default:o.withCtx(()=>[t.isChecked?(o.openBlock(),o.createElementBlock("div",R_,[o.createVNode(o.unref($e),{class:o.normalizeClass(t.$style.checkbox),size:"18",name:"outline-check",color:"foreground-surface-popover-base"},null,8,["class"])])):o.createCommentVNode("",!0)]),_:1}),o.renderSlot(t.$slots,"default")],2))}}),[["__cssModules",{$style:{root:"MenuBarItem__root_f3c96",icon:"MenuBarItem__icon_8930b",view_base:"MenuBarItem__view_base_16bad",view_critical:"MenuBarItem__view_critical_02c76",active:"MenuBarItem__active_fed92",text:"MenuBarItem__text_11d41",checkbox:"MenuBarItem__checkbox_1f026"}}]]),V_=re(o.defineComponent({__name:"MenuBar",props:{list:{}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("article",{class:o.normalizeClass(e.$style.root)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.list,(r,a)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:a},[a!==0?(o.openBlock(),o.createBlock(o.unref(An),{key:0,size:"s",class:o.normalizeClass(e.$style.divider)},null,8,["class"])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(e.$style.group)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r,s=>(o.openBlock(),o.createBlock(o.unref(ms),o.mergeProps({key:s.text,class:e.$style.item,ref_for:!0},s),null,16,["class"]))),128))],2)],64))),128))],2))}}),[["__cssModules",{$style:{root:"MenuBar__root_33172",divider:"MenuBar__divider_5912e",group:"MenuBar__group_62cf2"}}]]),qp=re(o.defineComponent({__name:"StepItem",props:{count:{},text:{}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.$style.root)},[o.createElementVNode("div",{class:o.normalizeClass(e.$style.count)},[o.createVNode(o.unref(me),{size:"subhead",color:"foreground-layout-layout-1-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.count),1)]),_:1})],2),o.createVNode(o.unref(me),{size:"subhead",color:"foreground-layout-layout-1-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.text),1)]),_:1})],2))}}),[["__cssModules",{$style:{root:"StepItem__root_66261",count:"StepItem__count_47dec"}}]]),H_=re(o.defineComponent({__name:"Steps",props:{list:{}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.$style.root)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.list,(r,a)=>(o.openBlock(),o.createBlock(o.unref(qp),{count:a+1,text:r},null,8,["count","text"]))),256))],2))}}),[["__cssModules",{$style:{root:"Steps__root_705db"}}]]);function j_(n){const e=document.createElement("textarea");e.value=n,e.setAttribute("readonly",""),e.style.position="absolute",e.style.left="-9999px",document.body.appendChild(e);let t=!1;const r=document.getSelection();r&&(t=r.rangeCount>0?r.getRangeAt(0):!1),e.select(),document.execCommand("copy"),document.body.removeChild(e),t&&r&&(r.removeAllRanges(),r.addRange(t))}function Gp(n){const e=_h();function t(r){j_(r),e.show({title:(n==null?void 0:n.toasterText)??"Скопировано",view:"primary"})}return{copy:t}}const Kp=re(o.defineComponent({__name:"Tooltip",props:{text:{},verticalAlign:{default:"top"},verticalOffset:{default:4},behavior:{default:"hover"},width:{},alignText:{}},setup(n,{expose:e}){const{isShowDropdown:t,setIsShowDropdown:r,triggerElementRef:a}=Zn(),s=o.computed(()=>typeof n.width>"u"?{}:{width:`${ji(Number(n.width))}px`});function i(){n.behavior==="hover"&&r(!0)}function l(){n.behavior==="hover"&&r(!1)}function c(){n.behavior==="click"&&d()}function d(u=1e3){r(!0),setTimeout(()=>{r(!1)},u)}return e({open:d}),(u,h)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"triggerElementRef",ref:a,class:o.normalizeClass(u.$style.root),onMouseenter:i,onMouseleave:l,onClick:c},[o.renderSlot(u.$slots,"default"),o.createVNode(o.unref(Jn),{isShowDropdown:o.unref(t),"onUpdate:isShowDropdown":h[0]||(h[0]=p=>o.isRef(t)?t.value=p:null),"vertical-offset":u.verticalOffset,"horizontal-align":"center","vertical-align":u.verticalAlign},{default:o.withCtx(({align:p})=>[o.createElementVNode("div",null,[o.createElementVNode("div",{class:o.normalizeClass([u.$style.wrapper,u.$style[`position_${p.vertical}`]]),style:o.normalizeStyle(s.value)},[o.createElementVNode("div",{class:o.normalizeClass(u.$style.balloon)},[o.createVNode(o.unref(me),{class:o.normalizeClass(u.$style.text),align:u.alignText,size:"caption",color:"foreground-element-tooltip-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(u.text),1)]),_:1},8,["class","align"])],2),(o.openBlock(),o.createElementBlock("svg",{class:o.normalizeClass(u.$style.shape),width:"12",height:"4",viewBox:"0 0 12 4",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h[1]||(h[1]=[o.createElementVNode("path",{d:"M4.58579 2.58579C5.36684 3.36684 6.63317 3.36683 7.41421 2.58579L8.82843 1.17157C9.57857 0.421426 10.596 0 11.6569 0H12H0H0.343146C1.40401 0 2.42143 0.421427 3.17157 1.17157L4.58579 2.58579Z","fill-opacity":"0.9"},null,-1)]),2))],6)])]),_:1},8,["isShowDropdown","vertical-offset","vertical-align"])],34))}}),[["__cssModules",{$style:{root:"Tooltip__root_32cc0",balloon:"Tooltip__balloon_3d49f",wrapper:"Tooltip__wrapper_81d05",shape:"Tooltip__shape_d4585",position_top:"Tooltip__position_top_54246",position_bottom:"Tooltip__position_bottom_7e186"}}]]),Y_=re(o.defineComponent({__name:"CellInfo",props:{label:{},value:{}},setup(n){const{copy:e}=Gp();return(t,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(t.$style.root),onClick:r[0]||(r[0]=a=>o.unref(e)(t.value))},[o.createVNode(o.unref(Kp),{class:o.normalizeClass(t.$style.tooltip),text:"Нажмите, чтобы скопировать","vertical-align":"bottom","vertical-offset":"12"},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(t.$style.text)},[o.createVNode(o.unref(me),{size:"subhead",color:"foreground-layout-layout-1-secondary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(t.label),1)]),_:1}),o.createVNode(o.unref(me),{size:"body",color:"foreground-layout-layout-1-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(t.value),1)]),_:1})],2),o.createVNode(o.unref($e),{class:o.normalizeClass(t.$style.icon),size:"18",name:"outline-copy",color:"foreground-layout-layout-1-secondary"},null,8,["class"])]),_:1},8,["class"])],2))}}),[["__cssModules",{$style:{root:"CellInfo__root_834a5",tooltip:"CellInfo__tooltip_24d8f",text:"CellInfo__text_2f5c6",icon:"CellInfo__icon_70c88"}}]]),U_=o.defineComponent({__name:"Table",props:{headers:{},gridTemplateColumns:{default:"repeat(3, 1fr)"},gap:{default:12},list:{},isLoading:{type:Boolean,default:!1},extractKey:{type:Function},reRenderKey:{}},setup(n){const e=o.computed(()=>JSON.stringify(n.list));return(t,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(t.$style.root),style:o.normalizeStyle({"--grid-template-columns":t.gridTemplateColumns,"--gap":o.unref(Hi)(+t.gap)})},[o.createElementVNode("div",{class:o.normalizeClass(t.$style.header)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.headers,a=>(o.openBlock(),o.createElementBlock("div",{key:a},[o.createVNode(o.unref(me),{class:o.normalizeClass(t.$style.headerText),size:"caption",weight:"regular",color:"foreground-layout-layout-1-secondary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a),1)]),_:2},1032,["class"])]))),128)),o.createVNode(o.unref(An),{size:"s",opacity:"0.5",class:o.normalizeClass(t.$style.divider)},null,8,["class"])],2),o.createVNode(o.unref(qn),null,{default:o.withCtx(()=>[t.isLoading?(o.openBlock(),o.createElementBlock("div",{key:"skeleton",class:o.normalizeClass([t.$style.body,t.$style.skeleton])},[o.createVNode(o.unref(Ji),null,{default:o.withCtx(()=>[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(6,a=>o.renderSlot(t.$slots,"renderSkeletonRow",{key:a})),64))]),_:3})],2)):t.list.length?(o.openBlock(),o.createElementBlock("div",{key:`content-${e.value}-${t.reRenderKey}`,class:o.normalizeClass(t.$style.body)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.list,(a,s)=>o.renderSlot(t.$slots,"renderTableRow",{item:a,index:s})),256))],2)):(o.openBlock(),o.createElementBlock("div",{key:2,class:o.normalizeClass(t.$style.empty)},[o.renderSlot(t.$slots,"renderEmpty")],2))]),_:3})],6))}}),Xp={root:"Table__root_597c1",header:"Table__header_9967a",row:"Table__row_1749f",divider:"Table__divider_fe573",skeleton:"Table__skeleton_bdbfb",empty:"Table__empty_24f80"},W_=re(U_,[["__cssModules",{$style:Xp}]]),q_=re(o.defineComponent({__name:"TableRow",props:{align:{default:"center"}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.$style.row),style:o.normalizeStyle({"align-items":e.align})},[o.renderSlot(e.$slots,"default")],6))}}),[["__cssModules",{$style:Xp}]]),Rl=re(o.defineComponent({__name:"Popover",props:{borderRadius:{default:16}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("article",{class:o.normalizeClass(e.$style.root),style:o.normalizeStyle({borderRadius:`var(--border-radius-${e.borderRadius.toString()})`})},[o.renderSlot(e.$slots,"default")],6))}}),[["__cssModules",{$style:{root:"Popover__root_f9956"}}]]);(function(){try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode(".ce-hint--align-start{text-align:left}.ce-hint--align-center{text-align:center}.ce-hint__description{opacity:.6;margin-top:3px}")),document.head.appendChild(n)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();var Zr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gs(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function G_(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var a=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return n[r]}})}),t}function Vl(){}Object.assign(Vl,{default:Vl,register:Vl,revert:function(){},__esModule:!0}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(n){const e=(this.document||this.ownerDocument).querySelectorAll(n);let t=e.length;for(;--t>=0&&e.item(t)!==this;);return t>-1}),Element.prototype.closest||(Element.prototype.closest=function(n){let e=this;if(!document.documentElement.contains(e))return null;do{if(e.matches(n))return e;e=e.parentElement||e.parentNode}while(e!==null);return null}),Element.prototype.prepend||(Element.prototype.prepend=function(n){const e=document.createDocumentFragment();Array.isArray(n)||(n=[n]),n.forEach(t=>{const r=t instanceof Node;e.appendChild(r?t:document.createTextNode(t))}),this.insertBefore(e,this.firstChild)}),Element.prototype.scrollIntoViewIfNeeded||(Element.prototype.scrollIntoViewIfNeeded=function(n){n=arguments.length===0?!0:!!n;const e=this.parentNode,t=window.getComputedStyle(e,null),r=parseInt(t.getPropertyValue("border-top-width")),a=parseInt(t.getPropertyValue("border-left-width")),s=this.offsetTop-e.offsetTop<e.scrollTop,i=this.offsetTop-e.offsetTop+this.clientHeight-r>e.scrollTop+e.clientHeight,l=this.offsetLeft-e.offsetLeft<e.scrollLeft,c=this.offsetLeft-e.offsetLeft+this.clientWidth-a>e.scrollLeft+e.clientWidth,d=s&&!i;(s||i)&&n&&(e.scrollTop=this.offsetTop-e.offsetTop-e.clientHeight/2-r+this.clientHeight/2),(l||c)&&n&&(e.scrollLeft=this.offsetLeft-e.offsetLeft-e.clientWidth/2-a+this.clientWidth/2),(s||i||l||c)&&!n&&this.scrollIntoView(d)}),window.requestIdleCallback=window.requestIdleCallback||function(n){const e=Date.now();return setTimeout(function(){n({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})},1)},window.cancelIdleCallback=window.cancelIdleCallback||function(n){clearTimeout(n)};let K_=(n=21)=>crypto.getRandomValues(new Uint8Array(n)).reduce((e,t)=>(t&=63,t<36?e+=t.toString(36):t<62?e+=(t-26).toString(36).toUpperCase():t>62?e+="-":e+="_",e),"");var Qp=(n=>(n.VERBOSE="VERBOSE",n.INFO="INFO",n.WARN="WARN",n.ERROR="ERROR",n))(Qp||{});const Me={BACKSPACE:8,TAB:9,ENTER:13,ESC:27,LEFT:37,UP:38,DOWN:40,RIGHT:39,DELETE:46},X_={LEFT:0};function Jr(n,e,t="log",r,a="color: inherit"){if(!("console"in window)||!window.console[t])return;const s=["info","log","warn","error"].includes(t),i=[];switch(Jr.logLevel){case"ERROR":if(t!=="error")return;break;case"WARN":if(!["error","warn"].includes(t))return;break;case"INFO":if(!s||n)return;break}r&&i.push(r);const l="Editor.js 2.31.0";n&&(s?(i.unshift(`line-height: 1em;
|
|
21
21
|
color: #006FEA;
|
|
22
22
|
display: inline-block;
|
|
23
23
|
font-size: 11px;
|
|
@@ -26,7 +26,7 @@ Available fill gap methods: `).concat(ae,"."))}},W=function(B){if(B){var ae=s(B)
|
|
|
26
26
|
padding: 4px 9px;
|
|
27
27
|
border-radius: 30px;
|
|
28
28
|
border: 1px solid rgba(56, 138, 229, 0.16);
|
|
29
|
-
margin: 4px 5px 4px 0;`,a),e=`%c${l}%c ${e}`):e=`( ${l} )${e}`);try{s?r?console[t](`${e} %o`,...i):console[t](e,...i):console[t](e)}catch{}}Jr.logLevel="VERBOSE";function Q_(n){Jr.logLevel=n}const Ye=Jr.bind(window,!1),Qt=Jr.bind(window,!0);function Ao(n){return Object.prototype.toString.call(n).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function tt(n){return Ao(n)==="function"||Ao(n)==="asyncfunction"}function _t(n){return Ao(n)==="object"}function Rn(n){return Ao(n)==="string"}function Z_(n){return Ao(n)==="boolean"}function Zp(n){return Ao(n)==="number"}function Jp(n){return Ao(n)==="undefined"}function Zt(n){return n?Object.keys(n).length===0&&n.constructor===Object:!0}function ef(n){return n>47&&n<58||n===32||n===13||n===229||n>64&&n<91||n>95&&n<112||n>185&&n<193||n>218&&n<223}async function J_(n,e=()=>{},t=()=>{}){async function r(a,s,i){try{await a.function(a.data),await s(Jp(a.data)?{}:a.data)}catch{i(Jp(a.data)?{}:a.data)}}return n.reduce(async(a,s)=>(await a,r(s,e,t)),Promise.resolve())}function tf(n){return Array.prototype.slice.call(n)}function ys(n,e){return function(){const t=this,r=arguments;window.setTimeout(()=>n.apply(t,r),e)}}function eC(n){return n.name.split(".").pop()}function tC(n){return/^[-\w]+\/([-+\w]+|\*)$/.test(n)}function nf(n,e,t){let r;return(...a)=>{const s=this,i=()=>{r=null,n.apply(s,a)};window.clearTimeout(r),r=window.setTimeout(i,e)}}function Vl(n,e,t=void 0){let r,a,s,i=null,l=0;t||(t={});const c=function(){l=t.leading===!1?0:Date.now(),i=null,s=n.apply(r,a),i||(r=a=null)};return function(){const d=Date.now();!l&&t.leading===!1&&(l=d);const u=e-(d-l);return r=this,a=arguments,u<=0||u>e?(i&&(clearTimeout(i),i=null),l=d,s=n.apply(r,a),i||(r=a=null)):!i&&t.trailing!==!1&&(i=setTimeout(c,u)),s}}function nC(){const n={win:!1,mac:!1,x11:!1,linux:!1},e=Object.keys(n).find(t=>window.navigator.appVersion.toLowerCase().indexOf(t)!==-1);return e&&(n[e]=!0),n}function bs(n){return n[0].toUpperCase()+n.slice(1)}function Hl(n,...e){if(!e.length)return n;const t=e.shift();if(_t(n)&&_t(t))for(const r in t)_t(t[r])?(n[r]||Object.assign(n,{[r]:{}}),Hl(n[r],t[r])):Object.assign(n,{[r]:t[r]});return Hl(n,...e)}function jl(n){const e=nC();return n=n.replace(/shift/gi,"⇧").replace(/backspace/gi,"⌫").replace(/enter/gi,"⏎").replace(/up/gi,"↑").replace(/left/gi,"→").replace(/down/gi,"↓").replace(/right/gi,"←").replace(/escape/gi,"⎋").replace(/insert/gi,"Ins").replace(/delete/gi,"␡").replace(/\+/gi," + "),e.mac?n=n.replace(/ctrl|cmd/gi,"⌘").replace(/alt/gi,"⌥"):n=n.replace(/cmd/gi,"Ctrl").replace(/windows/gi,"WIN"),n}function oC(n){try{return new URL(n).href}catch{}return n.substring(0,2)==="//"?window.location.protocol+n:window.location.origin+n}function rC(){return K_(10)}function aC(n){window.open(n,"_blank")}function sC(n=""){return`${n}${Math.floor(Math.random()*1e8).toString(16)}`}function Yl(n,e,t){const r=`«${e}» is deprecated and will be removed in the next major release. Please use the «${t}» instead.`;n&&Qt(r,"warn")}function pr(n,e,t){const r=t.value?"value":"get",a=t[r],s=`#${e}Cache`;if(t[r]=function(...i){return this[s]===void 0&&(this[s]=a.apply(this,...i)),this[s]},r==="get"&&t.set){const i=t.set;t.set=function(l){delete n[s],i.apply(this,l)}}return t}const of=650;function fr(){return window.matchMedia(`(max-width: ${of}px)`).matches}const Ul=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1);function iC(n,e){const t=Array.isArray(n)||_t(n),r=Array.isArray(e)||_t(e);return t||r?JSON.stringify(n)===JSON.stringify(e):n===e}let Q=class Nt{static isSingleTag(e){return e.tagName&&["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"].includes(e.tagName)}static isLineBreakTag(e){return e&&e.tagName&&["BR","WBR"].includes(e.tagName)}static make(e,t=null,r={}){const a=document.createElement(e);if(Array.isArray(t)){const s=t.filter(i=>i!==void 0);a.classList.add(...s)}else t&&a.classList.add(t);for(const s in r)Object.prototype.hasOwnProperty.call(r,s)&&(a[s]=r[s]);return a}static text(e){return document.createTextNode(e)}static append(e,t){Array.isArray(t)?t.forEach(r=>e.appendChild(r)):e.appendChild(t)}static prepend(e,t){Array.isArray(t)?(t=t.reverse(),t.forEach(r=>e.prepend(r))):e.prepend(t)}static swap(e,t){const r=document.createElement("div"),a=e.parentNode;a.insertBefore(r,e),a.insertBefore(e,t),a.insertBefore(t,r),a.removeChild(r)}static find(e=document,t){return e.querySelector(t)}static get(e){return document.getElementById(e)}static findAll(e=document,t){return e.querySelectorAll(t)}static get allInputsSelector(){return"[contenteditable=true], textarea, input:not([type]), "+["text","password","email","number","search","tel","url"].map(e=>`input[type="${e}"]`).join(", ")}static findAllInputs(e){return tf(e.querySelectorAll(Nt.allInputsSelector)).reduce((t,r)=>Nt.isNativeInput(r)||Nt.containsOnlyInlineElements(r)?[...t,r]:[...t,...Nt.getDeepestBlockElements(r)],[])}static getDeepestNode(e,t=!1){const r=t?"lastChild":"firstChild",a=t?"previousSibling":"nextSibling";if(e&&e.nodeType===Node.ELEMENT_NODE&&e[r]){let s=e[r];if(Nt.isSingleTag(s)&&!Nt.isNativeInput(s)&&!Nt.isLineBreakTag(s))if(s[a])s=s[a];else if(s.parentNode[a])s=s.parentNode[a];else return s.parentNode;return this.getDeepestNode(s,t)}return e}static isElement(e){return Zp(e)?!1:e&&e.nodeType&&e.nodeType===Node.ELEMENT_NODE}static isFragment(e){return Zp(e)?!1:e&&e.nodeType&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}static isContentEditable(e){return e.contentEditable==="true"}static isNativeInput(e){const t=["INPUT","TEXTAREA"];return e&&e.tagName?t.includes(e.tagName):!1}static canSetCaret(e){let t=!0;if(Nt.isNativeInput(e))switch(e.type){case"file":case"checkbox":case"radio":case"hidden":case"submit":case"button":case"image":case"reset":t=!1;break}else t=Nt.isContentEditable(e);return t}static isNodeEmpty(e,t){let r;return this.isSingleTag(e)&&!this.isLineBreakTag(e)?!1:(this.isElement(e)&&this.isNativeInput(e)?r=e.value:r=e.textContent.replace("",""),t&&(r=r.replace(new RegExp(t,"g"),"")),r.length===0)}static isLeaf(e){return e?e.childNodes.length===0:!1}static isEmpty(e,t){const r=[e];for(;r.length>0;)if(e=r.shift(),!!e){if(this.isLeaf(e)&&!this.isNodeEmpty(e,t))return!1;e.childNodes&&r.push(...Array.from(e.childNodes))}return!0}static isHTMLString(e){const t=Nt.make("div");return t.innerHTML=e,t.childElementCount>0}static getContentLength(e){return Nt.isNativeInput(e)?e.value.length:e.nodeType===Node.TEXT_NODE?e.length:e.textContent.length}static get blockElements(){return["address","article","aside","blockquote","canvas","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","ruby","section","table","tbody","thead","tr","tfoot","ul","video"]}static containsOnlyInlineElements(e){let t;Rn(e)?(t=document.createElement("div"),t.innerHTML=e):t=e;const r=a=>!Nt.blockElements.includes(a.tagName.toLowerCase())&&Array.from(a.children).every(r);return Array.from(t.children).every(r)}static getDeepestBlockElements(e){return Nt.containsOnlyInlineElements(e)?[e]:Array.from(e.children).reduce((t,r)=>[...t,...Nt.getDeepestBlockElements(r)],[])}static getHolder(e){return Rn(e)?document.getElementById(e):e}static isAnchor(e){return e.tagName.toLowerCase()==="a"}static offset(e){const t=e.getBoundingClientRect(),r=window.pageXOffset||document.documentElement.scrollLeft,a=window.pageYOffset||document.documentElement.scrollTop,s=t.top+a,i=t.left+r;return{top:s,left:i,bottom:s+t.height,right:i+t.width}}static getNodeByOffset(e,t){let r=0,a=null;const s=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null);let i=s.nextNode();for(;i;){const d=i.textContent,u=d===null?0:d.length;if(a=i,r+u>=t)break;r+=u,i=s.nextNode()}if(!a)return{node:null,offset:0};const l=a.textContent;if(l===null||l.length===0)return{node:null,offset:0};const c=Math.min(t-r,l.length);return{node:a,offset:c}}};function lC(n){return!/[^\t\n\r ]/.test(n)}function cC(n){const e=window.getComputedStyle(n),t=parseFloat(e.fontSize),r=parseFloat(e.lineHeight)||t*1.2,a=parseFloat(e.paddingTop),s=parseFloat(e.borderTopWidth),i=parseFloat(e.marginTop),l=t*.8,c=(r-t)/2;return i+s+a+c+l}function rf(n){n.dataset.empty=Q.isEmpty(n)?"true":"false"}const dC={blockTunes:{toggler:{"Click to tune":"","or drag to move":""}},inlineToolbar:{converter:{"Convert to":""}},toolbar:{toolbox:{Add:""}},popover:{Filter:"","Nothing found":"","Convert to":""}},uC={Text:"",Link:"",Bold:"",Italic:""},hC={link:{"Add a link":""},stub:{"The block can not be displayed correctly.":""}},pC={delete:{Delete:"","Click to delete":""},moveUp:{"Move up":""},moveDown:{"Move down":""}},af={ui:dC,toolNames:uC,tools:hC,blockTunes:pC},sf=class vr{static ui(e,t){return vr._t(e,t)}static t(e,t){return vr._t(e,t)}static setDictionary(e){vr.currentDictionary=e}static _t(e,t){const r=vr.getNamespace(e);return!r||!r[t]?t:r[t]}static getNamespace(e){return e.split(".").reduce((t,r)=>!t||!Object.keys(t).length?{}:t[r],vr.currentDictionary)}};sf.currentDictionary=af;let At=sf;class lf extends Error{}let ea=class{constructor(){this.subscribers={}}on(e,t){e in this.subscribers||(this.subscribers[e]=[]),this.subscribers[e].push(t)}once(e,t){e in this.subscribers||(this.subscribers[e]=[]);const r=a=>{const s=t(a),i=this.subscribers[e].indexOf(r);return i!==-1&&this.subscribers[e].splice(i,1),s};this.subscribers[e].push(r)}emit(e,t){Zt(this.subscribers)||!this.subscribers[e]||this.subscribers[e].reduce((r,a)=>{const s=a(r);return s!==void 0?s:r},t)}off(e,t){if(this.subscribers[e]===void 0){console.warn(`EventDispatcher .off(): there is no subscribers for event "${e.toString()}". Probably, .off() called before .on()`);return}for(let r=0;r<this.subscribers[e].length;r++)if(this.subscribers[e][r]===t){delete this.subscribers[e][r];break}}destroy(){this.subscribers={}}};function Vn(n){Object.setPrototypeOf(this,{get id(){return n.id},get name(){return n.name},get config(){return n.config},get holder(){return n.holder},get isEmpty(){return n.isEmpty},get selected(){return n.selected},set stretched(e){n.stretched=e},get stretched(){return n.stretched},get focusable(){return n.focusable},call(e,t){return n.call(e,t)},save(){return n.save()},validate(e){return n.validate(e)},dispatchChange(){n.dispatchChange()},getActiveToolboxEntry(){return n.getActiveToolboxEntry()}})}let ta=class{constructor(){this.allListeners=[]}on(e,t,r,a=!1){const s=sC("l"),i={id:s,element:e,eventType:t,handler:r,options:a};if(!this.findOne(e,t,r))return this.allListeners.push(i),e.addEventListener(t,r,a),s}off(e,t,r,a){const s=this.findAll(e,t,r);s.forEach((i,l)=>{const c=this.allListeners.indexOf(s[l]);c>-1&&(this.allListeners.splice(c,1),i.element.removeEventListener(i.eventType,i.handler,i.options))})}offById(e){const t=this.findById(e);t&&t.element.removeEventListener(t.eventType,t.handler,t.options)}findOne(e,t,r){const a=this.findAll(e,t,r);return a.length>0?a[0]:null}findAll(e,t,r){let a;const s=e?this.findByEventTarget(e):[];return e&&t&&r?a=s.filter(i=>i.eventType===t&&i.handler===r):e&&t?a=s.filter(i=>i.eventType===t):a=s,a}removeAll(){this.allListeners.map(e=>{e.element.removeEventListener(e.eventType,e.handler,e.options)}),this.allListeners=[]}destroy(){this.removeAll()}findByEventTarget(e){return this.allListeners.filter(t=>{if(t.element===e)return t})}findByType(e){return this.allListeners.filter(t=>{if(t.eventType===e)return t})}findByHandler(e){return this.allListeners.filter(t=>{if(t.handler===e)return t})}findById(e){return this.allListeners.find(t=>t.id===e)}},ze=class tg{constructor({config:e,eventsDispatcher:t}){if(this.nodes={},this.listeners=new ta,this.readOnlyMutableListeners={on:(r,a,s,i=!1)=>{this.mutableListenerIds.push(this.listeners.on(r,a,s,i))},clearAll:()=>{for(const r of this.mutableListenerIds)this.listeners.offById(r);this.mutableListenerIds=[]}},this.mutableListenerIds=[],new.target===tg)throw new TypeError("Constructors for abstract class Module are not allowed.");this.config=e,this.eventsDispatcher=t}set state(e){this.Editor=e}removeAllNodes(){for(const e in this.nodes){const t=this.nodes[e];t instanceof HTMLElement&&t.remove()}}get isRtl(){return this.config.i18n.direction==="rtl"}},Se=class yo{constructor(){this.instance=null,this.selection=null,this.savedSelectionRange=null,this.isFakeBackgroundEnabled=!1,this.commandBackground="backColor",this.commandRemoveFormat="removeFormat"}static get CSS(){return{editorWrapper:"codex-editor",editorZone:"codex-editor__redactor"}}static get anchorNode(){const e=window.getSelection();return e?e.anchorNode:null}static get anchorElement(){const e=window.getSelection();if(!e)return null;const t=e.anchorNode;return t?Q.isElement(t)?t:t.parentElement:null}static get anchorOffset(){const e=window.getSelection();return e?e.anchorOffset:null}static get isCollapsed(){const e=window.getSelection();return e?e.isCollapsed:null}static get isAtEditor(){return this.isSelectionAtEditor(yo.get())}static isSelectionAtEditor(e){if(!e)return!1;let t=e.anchorNode||e.focusNode;t&&t.nodeType===Node.TEXT_NODE&&(t=t.parentNode);let r=null;return t&&t instanceof Element&&(r=t.closest(`.${yo.CSS.editorZone}`)),r?r.nodeType===Node.ELEMENT_NODE:!1}static isRangeAtEditor(e){if(!e)return;let t=e.startContainer;t&&t.nodeType===Node.TEXT_NODE&&(t=t.parentNode);let r=null;return t&&t instanceof Element&&(r=t.closest(`.${yo.CSS.editorZone}`)),r?r.nodeType===Node.ELEMENT_NODE:!1}static get isSelectionExists(){return!!yo.get().anchorNode}static get range(){return this.getRangeFromSelection(this.get())}static getRangeFromSelection(e){return e&&e.rangeCount?e.getRangeAt(0):null}static get rect(){let e=document.selection,t,r={x:0,y:0,width:0,height:0};if(e&&e.type!=="Control")return e=e,t=e.createRange(),r.x=t.boundingLeft,r.y=t.boundingTop,r.width=t.boundingWidth,r.height=t.boundingHeight,r;if(!window.getSelection)return Ye("Method window.getSelection is not supported","warn"),r;if(e=window.getSelection(),e.rangeCount===null||isNaN(e.rangeCount))return Ye("Method SelectionUtils.rangeCount is not supported","warn"),r;if(e.rangeCount===0)return r;if(t=e.getRangeAt(0).cloneRange(),t.getBoundingClientRect&&(r=t.getBoundingClientRect()),r.x===0&&r.y===0){const a=document.createElement("span");if(a.getBoundingClientRect){a.appendChild(document.createTextNode("")),t.insertNode(a),r=a.getBoundingClientRect();const s=a.parentNode;s.removeChild(a),s.normalize()}}return r}static get text(){return window.getSelection?window.getSelection().toString():""}static get(){return window.getSelection()}static setCursor(e,t=0){const r=document.createRange(),a=window.getSelection();return Q.isNativeInput(e)?Q.canSetCaret(e)?(e.focus(),e.selectionStart=e.selectionEnd=t,e.getBoundingClientRect()):void 0:(r.setStart(e,t),r.setEnd(e,t),a.removeAllRanges(),a.addRange(r),r.getBoundingClientRect())}static isRangeInsideContainer(e){const t=yo.range;return t===null?!1:e.contains(t.startContainer)}static addFakeCursor(){const e=yo.range;if(e===null)return;const t=Q.make("span","codex-editor__fake-cursor");t.dataset.mutationFree="true",e.collapse(),e.insertNode(t)}static isFakeCursorInsideContainer(e){return Q.find(e,".codex-editor__fake-cursor")!==null}static removeFakeCursor(e=document.body){const t=Q.find(e,".codex-editor__fake-cursor");t&&t.remove()}removeFakeBackground(){this.isFakeBackgroundEnabled&&(this.isFakeBackgroundEnabled=!1,document.execCommand(this.commandRemoveFormat))}setFakeBackground(){document.execCommand(this.commandBackground,!1,"#a8d6ff"),this.isFakeBackgroundEnabled=!0}save(){this.savedSelectionRange=yo.range}restore(){if(!this.savedSelectionRange)return;const e=window.getSelection();e.removeAllRanges(),e.addRange(this.savedSelectionRange)}clearSaved(){this.savedSelectionRange=null}collapseToEnd(){const e=window.getSelection(),t=document.createRange();t.selectNodeContents(e.focusNode),t.collapse(!1),e.removeAllRanges(),e.addRange(t)}findParentTag(e,t,r=10){const a=window.getSelection();let s=null;return!a||!a.anchorNode||!a.focusNode?null:([a.anchorNode,a.focusNode].forEach(i=>{let l=r;for(;l>0&&i.parentNode&&!(i.tagName===e&&(s=i,t&&i.classList&&!i.classList.contains(t)&&(s=null),s));)i=i.parentNode,l--}),s)}expandToTag(e){const t=window.getSelection();t.removeAllRanges();const r=document.createRange();r.selectNodeContents(e),t.addRange(r)}};function fC(n,e){const{type:t,target:r,addedNodes:a,removedNodes:s}=n;return n.type==="attributes"&&n.attributeName==="data-empty"?!1:!!(e.contains(r)||t==="childList"&&(Array.from(a).some(i=>i===e)||Array.from(s).some(i=>i===e)))}const Wl="redactor dom changed",cf="block changed",df="fake cursor is about to be toggled",uf="fake cursor have been set",na="editor mobile layout toggled";function ql(n,e){if(!n.conversionConfig)return!1;const t=n.conversionConfig[e];return tt(t)||Rn(t)}function ks(n,e){return ql(n.tool,e)}function hf(n,e){return Object.entries(n).some(([t,r])=>e[t]&&iC(e[t],r))}async function pf(n,e){const t=(await n.save()).data,r=e.find(a=>a.name===n.name);return r!==void 0&&!ql(r,"export")?[]:e.reduce((a,s)=>{if(!ql(s,"import")||s.toolbox===void 0)return a;const i=s.toolbox.filter(l=>{if(Zt(l)||l.icon===void 0)return!1;if(l.data!==void 0){if(hf(l.data,t))return!1}else if(s.name===n.name)return!1;return!0});return a.push({...s,toolbox:i}),a},[])}function ff(n,e){return n.mergeable?n.name===e.name?!0:ks(e,"export")&&ks(n,"import"):!1}function mC(n,e){const t=e==null?void 0:e.export;return tt(t)?t(n):Rn(t)?n[t]:(t!==void 0&&Ye("Conversion «export» property must be a string or function. String means key of saved data object to export. Function should export processed string to export."),"")}function mf(n,e,t){const r=e==null?void 0:e.import;return tt(r)?r(n,t):Rn(r)?{[r]:n}:(r!==void 0&&Ye("Conversion «import» property must be a string or function. String means key of tool data to import. Function accepts a imported string and return composed tool data."),{})}var Je=(n=>(n.Default="default",n.Separator="separator",n.Html="html",n))(Je||{}),Hn=(n=>(n.APPEND_CALLBACK="appendCallback",n.RENDERED="rendered",n.MOVED="moved",n.UPDATED="updated",n.REMOVED="removed",n.ON_PASTE="onPaste",n))(Hn||{});let jn=class bo extends ea{constructor({id:e=rC(),data:t,tool:r,readOnly:a,tunesData:s},i){super(),this.cachedInputs=[],this.toolRenderedElement=null,this.tunesInstances=new Map,this.defaultTunesInstances=new Map,this.unavailableTunesData={},this.inputIndex=0,this.editorEventBus=null,this.handleFocus=()=>{this.dropInputsCache(),this.updateCurrentInput()},this.didMutated=(l=void 0)=>{const c=l===void 0,d=l instanceof InputEvent;!c&&!d&&this.detectToolRootChange(l);let u;c||d?u=!0:u=!(l.length>0&&l.every(h=>{const{addedNodes:p,removedNodes:m,target:f}=h;return[...Array.from(p),...Array.from(m),f].some(g=>(Q.isElement(g)||(g=g.parentElement),g&&g.closest('[data-mutation-free="true"]')!==null))})),u&&(this.dropInputsCache(),this.updateCurrentInput(),this.toggleInputsEmptyMark(),this.call("updated"),this.emit("didMutated",this))},this.name=r.name,this.id=e,this.settings=r.settings,this.config=r.settings.config||{},this.editorEventBus=i||null,this.blockAPI=new Vn(this),this.tool=r,this.toolInstance=r.create(t,this.blockAPI,a),this.tunes=r.tunes,this.composeTunes(s),this.holder=this.compose(),window.requestIdleCallback(()=>{this.watchBlockMutations(),this.addInputEvents(),this.toggleInputsEmptyMark()})}static get CSS(){return{wrapper:"ce-block",wrapperStretched:"ce-block--stretched",content:"ce-block__content",selected:"ce-block--selected",dropTarget:"ce-block--drop-target"}}get inputs(){if(this.cachedInputs.length!==0)return this.cachedInputs;const e=Q.findAllInputs(this.holder);return this.inputIndex>e.length-1&&(this.inputIndex=e.length-1),this.cachedInputs=e,e}get currentInput(){return this.inputs[this.inputIndex]}set currentInput(e){const t=this.inputs.findIndex(r=>r===e||r.contains(e));t!==-1&&(this.inputIndex=t)}get firstInput(){return this.inputs[0]}get lastInput(){const e=this.inputs;return e[e.length-1]}get nextInput(){return this.inputs[this.inputIndex+1]}get previousInput(){return this.inputs[this.inputIndex-1]}get data(){return this.save().then(e=>e&&!Zt(e.data)?e.data:{})}get sanitize(){return this.tool.sanitizeConfig}get mergeable(){return tt(this.toolInstance.merge)}get focusable(){return this.inputs.length!==0}get isEmpty(){const e=Q.isEmpty(this.pluginsContent,"/"),t=!this.hasMedia;return e&&t}get hasMedia(){const e=["img","iframe","video","audio","source","input","textarea","twitterwidget"];return!!this.holder.querySelector(e.join(","))}set selected(e){var t,r;this.holder.classList.toggle(bo.CSS.selected,e);const a=e===!0&&Se.isRangeInsideContainer(this.holder),s=e===!1&&Se.isFakeCursorInsideContainer(this.holder);(a||s)&&((t=this.editorEventBus)==null||t.emit(df,{state:e}),a?Se.addFakeCursor():Se.removeFakeCursor(this.holder),(r=this.editorEventBus)==null||r.emit(uf,{state:e}))}get selected(){return this.holder.classList.contains(bo.CSS.selected)}set stretched(e){this.holder.classList.toggle(bo.CSS.wrapperStretched,e)}get stretched(){return this.holder.classList.contains(bo.CSS.wrapperStretched)}set dropTarget(e){this.holder.classList.toggle(bo.CSS.dropTarget,e)}get pluginsContent(){return this.toolRenderedElement}call(e,t){if(tt(this.toolInstance[e])){e==="appendCallback"&&Ye("`appendCallback` hook is deprecated and will be removed in the next major release. Use `rendered` hook instead","warn");try{this.toolInstance[e].call(this.toolInstance,t)}catch(r){Ye(`Error during '${e}' call: ${r.message}`,"error")}}}async mergeWith(e){await this.toolInstance.merge(e)}async save(){const e=await this.toolInstance.save(this.pluginsContent),t=this.unavailableTunesData;[...this.tunesInstances.entries(),...this.defaultTunesInstances.entries()].forEach(([s,i])=>{if(tt(i.save))try{t[s]=i.save()}catch(l){Ye(`Tune ${i.constructor.name} save method throws an Error %o`,"warn",l)}});const r=window.performance.now();let a;return Promise.resolve(e).then(s=>(a=window.performance.now(),{id:this.id,tool:this.name,data:s,tunes:t,time:a-r})).catch(s=>{Ye(`Saving process for ${this.name} tool failed due to the ${s}`,"log","red")})}async validate(e){let t=!0;return this.toolInstance.validate instanceof Function&&(t=await this.toolInstance.validate(e)),t}getTunes(){const e=[],t=[],r=typeof this.toolInstance.renderSettings=="function"?this.toolInstance.renderSettings():[];return Q.isElement(r)?e.push({type:Je.Html,element:r}):Array.isArray(r)?e.push(...r):e.push(r),[...this.tunesInstances.values(),...this.defaultTunesInstances.values()].map(a=>a.render()).forEach(a=>{Q.isElement(a)?t.push({type:Je.Html,element:a}):Array.isArray(a)?t.push(...a):t.push(a)}),{toolTunes:e,commonTunes:t}}updateCurrentInput(){this.currentInput=Q.isNativeInput(document.activeElement)||!Se.anchorNode?document.activeElement:Se.anchorNode}dispatchChange(){this.didMutated()}destroy(){this.unwatchBlockMutations(),this.removeInputEvents(),super.destroy(),tt(this.toolInstance.destroy)&&this.toolInstance.destroy()}async getActiveToolboxEntry(){const e=this.tool.toolbox;if(e.length===1)return Promise.resolve(this.tool.toolbox[0]);const t=await this.data,r=e;return r==null?void 0:r.find(a=>hf(a.data,t))}async exportDataAsString(){const e=await this.data;return mC(e,this.tool.conversionConfig)}compose(){const e=Q.make("div",bo.CSS.wrapper),t=Q.make("div",bo.CSS.content),r=this.toolInstance.render();e.dataset.id=this.id,this.toolRenderedElement=r,t.appendChild(this.toolRenderedElement);let a=t;return[...this.tunesInstances.values(),...this.defaultTunesInstances.values()].forEach(s=>{if(tt(s.wrap))try{a=s.wrap(a)}catch(i){Ye(`Tune ${s.constructor.name} wrap method throws an Error %o`,"warn",i)}}),e.appendChild(a),e}composeTunes(e){Array.from(this.tunes.values()).forEach(t=>{(t.isInternal?this.defaultTunesInstances:this.tunesInstances).set(t.name,t.create(e[t.name],this.blockAPI))}),Object.entries(e).forEach(([t,r])=>{this.tunesInstances.has(t)||(this.unavailableTunesData[t]=r)})}addInputEvents(){this.inputs.forEach(e=>{e.addEventListener("focus",this.handleFocus),Q.isNativeInput(e)&&e.addEventListener("input",this.didMutated)})}removeInputEvents(){this.inputs.forEach(e=>{e.removeEventListener("focus",this.handleFocus),Q.isNativeInput(e)&&e.removeEventListener("input",this.didMutated)})}watchBlockMutations(){var e;this.redactorDomChangedCallback=t=>{const{mutations:r}=t;r.some(a=>fC(a,this.toolRenderedElement))&&this.didMutated(r)},(e=this.editorEventBus)==null||e.on(Wl,this.redactorDomChangedCallback)}unwatchBlockMutations(){var e;(e=this.editorEventBus)==null||e.off(Wl,this.redactorDomChangedCallback)}detectToolRootChange(e){e.forEach(t=>{if(Array.from(t.removedNodes).includes(this.toolRenderedElement)){const r=t.addedNodes[t.addedNodes.length-1];this.toolRenderedElement=r}})}dropInputsCache(){this.cachedInputs=[]}toggleInputsEmptyMark(){this.inputs.forEach(rf)}};class gC extends ze{constructor(){super(...arguments),this.insert=(e=this.config.defaultBlock,t={},r={},a,s,i,l)=>{const c=this.Editor.BlockManager.insert({id:l,tool:e,data:t,index:a,needToFocus:s,replace:i});return new Vn(c)},this.composeBlockData=async e=>{const t=this.Editor.Tools.blockTools.get(e);return new jn({tool:t,api:this.Editor.API,readOnly:!0,data:{},tunesData:{}}).data},this.update=async(e,t,r)=>{const{BlockManager:a}=this.Editor,s=a.getBlockById(e);if(s===void 0)throw new Error(`Block with id "${e}" not found`);const i=await a.update(s,t,r);return new Vn(i)},this.convert=async(e,t,r)=>{var a,s;const{BlockManager:i,Tools:l}=this.Editor,c=i.getBlockById(e);if(!c)throw new Error(`Block with id "${e}" not found`);const d=l.blockTools.get(c.name),u=l.blockTools.get(t);if(!u)throw new Error(`Block Tool with type "${t}" not found`);const h=((a=d==null?void 0:d.conversionConfig)==null?void 0:a.export)!==void 0,p=((s=u.conversionConfig)==null?void 0:s.import)!==void 0;if(h&&p){const m=await i.convert(c,t,r);return new Vn(m)}else{const m=[h?!1:bs(c.name),p?!1:bs(t)].filter(Boolean).join(" and ");throw new Error(`Conversion from "${c.name}" to "${t}" is not possible. ${m} tool(s) should provide a "conversionConfig"`)}},this.insertMany=(e,t=this.Editor.BlockManager.blocks.length-1)=>{this.validateIndex(t);const r=e.map(({id:a,type:s,data:i})=>this.Editor.BlockManager.composeBlock({id:a,tool:s||this.config.defaultBlock,data:i}));return this.Editor.BlockManager.insertMany(r,t),r.map(a=>new Vn(a))}}get methods(){return{clear:()=>this.clear(),render:e=>this.render(e),renderFromHTML:e=>this.renderFromHTML(e),delete:e=>this.delete(e),swap:(e,t)=>this.swap(e,t),move:(e,t)=>this.move(e,t),getBlockByIndex:e=>this.getBlockByIndex(e),getById:e=>this.getById(e),getCurrentBlockIndex:()=>this.getCurrentBlockIndex(),getBlockIndex:e=>this.getBlockIndex(e),getBlocksCount:()=>this.getBlocksCount(),getBlockByElement:e=>this.getBlockByElement(e),stretchBlock:(e,t=!0)=>this.stretchBlock(e,t),insertNewBlock:()=>this.insertNewBlock(),insert:this.insert,insertMany:this.insertMany,update:this.update,composeBlockData:this.composeBlockData,convert:this.convert}}getBlocksCount(){return this.Editor.BlockManager.blocks.length}getCurrentBlockIndex(){return this.Editor.BlockManager.currentBlockIndex}getBlockIndex(e){const t=this.Editor.BlockManager.getBlockById(e);if(!t){Qt("There is no block with id `"+e+"`","warn");return}return this.Editor.BlockManager.getBlockIndex(t)}getBlockByIndex(e){const t=this.Editor.BlockManager.getBlockByIndex(e);if(t===void 0){Qt("There is no block at index `"+e+"`","warn");return}return new Vn(t)}getById(e){const t=this.Editor.BlockManager.getBlockById(e);return t===void 0?(Qt("There is no block with id `"+e+"`","warn"),null):new Vn(t)}getBlockByElement(e){const t=this.Editor.BlockManager.getBlock(e);if(t===void 0){Qt("There is no block corresponding to element `"+e+"`","warn");return}return new Vn(t)}swap(e,t){Ye("`blocks.swap()` method is deprecated and will be removed in the next major release. Use `block.move()` method instead","info"),this.Editor.BlockManager.swap(e,t)}move(e,t){this.Editor.BlockManager.move(e,t)}delete(e=this.Editor.BlockManager.currentBlockIndex){try{const t=this.Editor.BlockManager.getBlockByIndex(e);this.Editor.BlockManager.removeBlock(t)}catch(t){Qt(t,"warn");return}this.Editor.BlockManager.blocks.length===0&&this.Editor.BlockManager.insert(),this.Editor.BlockManager.currentBlock&&this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock,this.Editor.Caret.positions.END),this.Editor.Toolbar.close()}async clear(){await this.Editor.BlockManager.clear(!0),this.Editor.InlineToolbar.close()}async render(e){if(e===void 0||e.blocks===void 0)throw new Error("Incorrect data passed to the render() method");this.Editor.ModificationsObserver.disable(),await this.Editor.BlockManager.clear(),await this.Editor.Renderer.render(e.blocks),this.Editor.ModificationsObserver.enable()}async renderFromHTML(e){return await this.Editor.BlockManager.clear(),this.Editor.Paste.processText(e,!0)}stretchBlock(e,t=!0){Yl(!0,"blocks.stretchBlock()","BlockAPI");const r=this.Editor.BlockManager.getBlockByIndex(e);r&&(r.stretched=t)}insertNewBlock(){Ye("Method blocks.insertNewBlock() is deprecated and it will be removed in the next major release. Use blocks.insert() instead.","warn"),this.insert()}validateIndex(e){if(typeof e!="number")throw new Error("Index should be a number");if(e<0)throw new Error("Index should be greater than or equal to 0");if(e===null)throw new Error("Index should be greater than or equal to 0")}}function yC(n,e){return typeof n=="number"?e.BlockManager.getBlockByIndex(n):typeof n=="string"?e.BlockManager.getBlockById(n):e.BlockManager.getBlockById(n.id)}class bC extends ze{constructor(){super(...arguments),this.setToFirstBlock=(e=this.Editor.Caret.positions.DEFAULT,t=0)=>this.Editor.BlockManager.firstBlock?(this.Editor.Caret.setToBlock(this.Editor.BlockManager.firstBlock,e,t),!0):!1,this.setToLastBlock=(e=this.Editor.Caret.positions.DEFAULT,t=0)=>this.Editor.BlockManager.lastBlock?(this.Editor.Caret.setToBlock(this.Editor.BlockManager.lastBlock,e,t),!0):!1,this.setToPreviousBlock=(e=this.Editor.Caret.positions.DEFAULT,t=0)=>this.Editor.BlockManager.previousBlock?(this.Editor.Caret.setToBlock(this.Editor.BlockManager.previousBlock,e,t),!0):!1,this.setToNextBlock=(e=this.Editor.Caret.positions.DEFAULT,t=0)=>this.Editor.BlockManager.nextBlock?(this.Editor.Caret.setToBlock(this.Editor.BlockManager.nextBlock,e,t),!0):!1,this.setToBlock=(e,t=this.Editor.Caret.positions.DEFAULT,r=0)=>{const a=yC(e,this.Editor);return a===void 0?!1:(this.Editor.Caret.setToBlock(a,t,r),!0)},this.focus=(e=!1)=>e?this.setToLastBlock(this.Editor.Caret.positions.END):this.setToFirstBlock(this.Editor.Caret.positions.START)}get methods(){return{setToFirstBlock:this.setToFirstBlock,setToLastBlock:this.setToLastBlock,setToPreviousBlock:this.setToPreviousBlock,setToNextBlock:this.setToNextBlock,setToBlock:this.setToBlock,focus:this.focus}}}class kC extends ze{get methods(){return{emit:(e,t)=>this.emit(e,t),off:(e,t)=>this.off(e,t),on:(e,t)=>this.on(e,t)}}on(e,t){this.eventsDispatcher.on(e,t)}emit(e,t){this.eventsDispatcher.emit(e,t)}off(e,t){this.eventsDispatcher.off(e,t)}}let vC=class ng extends ze{static getNamespace(e,t){return t?`blockTunes.${e}`:`tools.${e}`}get methods(){return{t:()=>{Qt("I18n.t() method can be accessed only from Tools","warn")}}}getMethodsForTool(e,t){return Object.assign(this.methods,{t:r=>At.t(ng.getNamespace(e,t),r)})}};class wC extends ze{get methods(){return{blocks:this.Editor.BlocksAPI.methods,caret:this.Editor.CaretAPI.methods,tools:this.Editor.ToolsAPI.methods,events:this.Editor.EventsAPI.methods,listeners:this.Editor.ListenersAPI.methods,notifier:this.Editor.NotifierAPI.methods,sanitizer:this.Editor.SanitizerAPI.methods,saver:this.Editor.SaverAPI.methods,selection:this.Editor.SelectionAPI.methods,styles:this.Editor.StylesAPI.classes,toolbar:this.Editor.ToolbarAPI.methods,inlineToolbar:this.Editor.InlineToolbarAPI.methods,tooltip:this.Editor.TooltipAPI.methods,i18n:this.Editor.I18nAPI.methods,readOnly:this.Editor.ReadOnlyAPI.methods,ui:this.Editor.UiAPI.methods}}getMethodsForTool(e,t){return Object.assign(this.methods,{i18n:this.Editor.I18nAPI.getMethodsForTool(e,t)})}}class _C extends ze{get methods(){return{close:()=>this.close(),open:()=>this.open()}}open(){this.Editor.InlineToolbar.tryToShow()}close(){this.Editor.InlineToolbar.close()}}class CC extends ze{get methods(){return{on:(e,t,r,a)=>this.on(e,t,r,a),off:(e,t,r,a)=>this.off(e,t,r,a),offById:e=>this.offById(e)}}on(e,t,r,a){return this.listeners.on(e,t,r,a)}off(e,t,r,a){this.listeners.off(e,t,r,a)}offById(e){this.listeners.offById(e)}}var gf={exports:{}};(function(n,e){(function(t,r){n.exports=r()})(window,function(){return function(t){var r={};function a(s){if(r[s])return r[s].exports;var i=r[s]={i:s,l:!1,exports:{}};return t[s].call(i.exports,i,i.exports,a),i.l=!0,i.exports}return a.m=t,a.c=r,a.d=function(s,i,l){a.o(s,i)||Object.defineProperty(s,i,{enumerable:!0,get:l})},a.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},a.t=function(s,i){if(1&i&&(s=a(s)),8&i||4&i&&typeof s=="object"&&s&&s.__esModule)return s;var l=Object.create(null);if(a.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:s}),2&i&&typeof s!="string")for(var c in s)a.d(l,c,(function(d){return s[d]}).bind(null,c));return l},a.n=function(s){var i=s&&s.__esModule?function(){return s.default}:function(){return s};return a.d(i,"a",i),i},a.o=function(s,i){return Object.prototype.hasOwnProperty.call(s,i)},a.p="/",a(a.s=0)}([function(t,r,a){a(1),t.exports=function(){var s=a(6),i="cdx-notify--bounce-in",l=null;return{show:function(c){if(c.message){(function(){if(l)return!0;l=s.getWrapper(),document.body.appendChild(l)})();var d=null,u=c.time||8e3;switch(c.type){case"confirm":d=s.confirm(c);break;case"prompt":d=s.prompt(c);break;default:d=s.alert(c),window.setTimeout(function(){d.remove()},u)}l.appendChild(d),d.classList.add(i)}}}}()},function(t,r,a){var s=a(2);typeof s=="string"&&(s=[[t.i,s,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};a(4)(s,i),s.locals&&(t.exports=s.locals)},function(t,r,a){(t.exports=a(3)(!1)).push([t.i,`.cdx-notify--error{background:#fffbfb!important}.cdx-notify--error::before{background:#fb5d5d!important}.cdx-notify__input{max-width:130px;padding:5px 10px;background:#f7f7f7;border:0;border-radius:3px;font-size:13px;color:#656b7c;outline:0}.cdx-notify__input:-ms-input-placeholder{color:#656b7c}.cdx-notify__input::placeholder{color:#656b7c}.cdx-notify__input:focus:-ms-input-placeholder{color:rgba(101,107,124,.3)}.cdx-notify__input:focus::placeholder{color:rgba(101,107,124,.3)}.cdx-notify__button{border:none;border-radius:3px;font-size:13px;padding:5px 10px;cursor:pointer}.cdx-notify__button:last-child{margin-left:10px}.cdx-notify__button--cancel{background:#f2f5f7;box-shadow:0 2px 1px 0 rgba(16,19,29,0);color:#656b7c}.cdx-notify__button--cancel:hover{background:#eee}.cdx-notify__button--confirm{background:#34c992;box-shadow:0 1px 1px 0 rgba(18,49,35,.05);color:#fff}.cdx-notify__button--confirm:hover{background:#33b082}.cdx-notify__btns-wrapper{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;margin-top:5px}.cdx-notify__cross{position:absolute;top:5px;right:5px;width:10px;height:10px;padding:5px;opacity:.54;cursor:pointer}.cdx-notify__cross::after,.cdx-notify__cross::before{content:'';position:absolute;left:9px;top:5px;height:12px;width:2px;background:#575d67}.cdx-notify__cross::before{transform:rotate(-45deg)}.cdx-notify__cross::after{transform:rotate(45deg)}.cdx-notify__cross:hover{opacity:1}.cdx-notifies{position:fixed;z-index:2;bottom:20px;left:20px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif}.cdx-notify{position:relative;width:220px;margin-top:15px;padding:13px 16px;background:#fff;box-shadow:0 11px 17px 0 rgba(23,32,61,.13);border-radius:5px;font-size:14px;line-height:1.4em;word-wrap:break-word}.cdx-notify::before{content:'';position:absolute;display:block;top:0;left:0;width:3px;height:calc(100% - 6px);margin:3px;border-radius:5px;background:0 0}@keyframes bounceIn{0%{opacity:0;transform:scale(.3)}50%{opacity:1;transform:scale(1.05)}70%{transform:scale(.9)}100%{transform:scale(1)}}.cdx-notify--bounce-in{animation-name:bounceIn;animation-duration:.6s;animation-iteration-count:1}.cdx-notify--success{background:#fafffe!important}.cdx-notify--success::before{background:#41ffb1!important}`,""])},function(t,r){t.exports=function(a){var s=[];return s.toString=function(){return this.map(function(i){var l=function(c,d){var u=c[1]||"",h=c[3];if(!h)return u;if(d&&typeof btoa=="function"){var p=(f=h,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(f))))+" */"),m=h.sources.map(function(g){return"/*# sourceURL="+h.sourceRoot+g+" */"});return[u].concat(m).concat([p]).join(`
|
|
29
|
+
margin: 4px 5px 4px 0;`,a),e=`%c${l}%c ${e}`):e=`( ${l} )${e}`);try{s?r?console[t](`${e} %o`,...i):console[t](e,...i):console[t](e)}catch{}}Jr.logLevel="VERBOSE";function Q_(n){Jr.logLevel=n}const Ye=Jr.bind(window,!1),Qt=Jr.bind(window,!0);function Ao(n){return Object.prototype.toString.call(n).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function tt(n){return Ao(n)==="function"||Ao(n)==="asyncfunction"}function _t(n){return Ao(n)==="object"}function Rn(n){return Ao(n)==="string"}function Z_(n){return Ao(n)==="boolean"}function Zp(n){return Ao(n)==="number"}function Jp(n){return Ao(n)==="undefined"}function Zt(n){return n?Object.keys(n).length===0&&n.constructor===Object:!0}function ef(n){return n>47&&n<58||n===32||n===13||n===229||n>64&&n<91||n>95&&n<112||n>185&&n<193||n>218&&n<223}async function J_(n,e=()=>{},t=()=>{}){async function r(a,s,i){try{await a.function(a.data),await s(Jp(a.data)?{}:a.data)}catch{i(Jp(a.data)?{}:a.data)}}return n.reduce(async(a,s)=>(await a,r(s,e,t)),Promise.resolve())}function tf(n){return Array.prototype.slice.call(n)}function ys(n,e){return function(){const t=this,r=arguments;window.setTimeout(()=>n.apply(t,r),e)}}function eC(n){return n.name.split(".").pop()}function tC(n){return/^[-\w]+\/([-+\w]+|\*)$/.test(n)}function nf(n,e,t){let r;return(...a)=>{const s=this,i=()=>{r=null,n.apply(s,a)};window.clearTimeout(r),r=window.setTimeout(i,e)}}function Hl(n,e,t=void 0){let r,a,s,i=null,l=0;t||(t={});const c=function(){l=t.leading===!1?0:Date.now(),i=null,s=n.apply(r,a),i||(r=a=null)};return function(){const d=Date.now();!l&&t.leading===!1&&(l=d);const u=e-(d-l);return r=this,a=arguments,u<=0||u>e?(i&&(clearTimeout(i),i=null),l=d,s=n.apply(r,a),i||(r=a=null)):!i&&t.trailing!==!1&&(i=setTimeout(c,u)),s}}function nC(){const n={win:!1,mac:!1,x11:!1,linux:!1},e=Object.keys(n).find(t=>window.navigator.appVersion.toLowerCase().indexOf(t)!==-1);return e&&(n[e]=!0),n}function bs(n){return n[0].toUpperCase()+n.slice(1)}function jl(n,...e){if(!e.length)return n;const t=e.shift();if(_t(n)&&_t(t))for(const r in t)_t(t[r])?(n[r]||Object.assign(n,{[r]:{}}),jl(n[r],t[r])):Object.assign(n,{[r]:t[r]});return jl(n,...e)}function Yl(n){const e=nC();return n=n.replace(/shift/gi,"⇧").replace(/backspace/gi,"⌫").replace(/enter/gi,"⏎").replace(/up/gi,"↑").replace(/left/gi,"→").replace(/down/gi,"↓").replace(/right/gi,"←").replace(/escape/gi,"⎋").replace(/insert/gi,"Ins").replace(/delete/gi,"␡").replace(/\+/gi," + "),e.mac?n=n.replace(/ctrl|cmd/gi,"⌘").replace(/alt/gi,"⌥"):n=n.replace(/cmd/gi,"Ctrl").replace(/windows/gi,"WIN"),n}function oC(n){try{return new URL(n).href}catch{}return n.substring(0,2)==="//"?window.location.protocol+n:window.location.origin+n}function rC(){return K_(10)}function aC(n){window.open(n,"_blank")}function sC(n=""){return`${n}${Math.floor(Math.random()*1e8).toString(16)}`}function Ul(n,e,t){const r=`«${e}» is deprecated and will be removed in the next major release. Please use the «${t}» instead.`;n&&Qt(r,"warn")}function pr(n,e,t){const r=t.value?"value":"get",a=t[r],s=`#${e}Cache`;if(t[r]=function(...i){return this[s]===void 0&&(this[s]=a.apply(this,...i)),this[s]},r==="get"&&t.set){const i=t.set;t.set=function(l){delete n[s],i.apply(this,l)}}return t}const of=650;function fr(){return window.matchMedia(`(max-width: ${of}px)`).matches}const Wl=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1);function iC(n,e){const t=Array.isArray(n)||_t(n),r=Array.isArray(e)||_t(e);return t||r?JSON.stringify(n)===JSON.stringify(e):n===e}let Q=class Nt{static isSingleTag(e){return e.tagName&&["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"].includes(e.tagName)}static isLineBreakTag(e){return e&&e.tagName&&["BR","WBR"].includes(e.tagName)}static make(e,t=null,r={}){const a=document.createElement(e);if(Array.isArray(t)){const s=t.filter(i=>i!==void 0);a.classList.add(...s)}else t&&a.classList.add(t);for(const s in r)Object.prototype.hasOwnProperty.call(r,s)&&(a[s]=r[s]);return a}static text(e){return document.createTextNode(e)}static append(e,t){Array.isArray(t)?t.forEach(r=>e.appendChild(r)):e.appendChild(t)}static prepend(e,t){Array.isArray(t)?(t=t.reverse(),t.forEach(r=>e.prepend(r))):e.prepend(t)}static swap(e,t){const r=document.createElement("div"),a=e.parentNode;a.insertBefore(r,e),a.insertBefore(e,t),a.insertBefore(t,r),a.removeChild(r)}static find(e=document,t){return e.querySelector(t)}static get(e){return document.getElementById(e)}static findAll(e=document,t){return e.querySelectorAll(t)}static get allInputsSelector(){return"[contenteditable=true], textarea, input:not([type]), "+["text","password","email","number","search","tel","url"].map(e=>`input[type="${e}"]`).join(", ")}static findAllInputs(e){return tf(e.querySelectorAll(Nt.allInputsSelector)).reduce((t,r)=>Nt.isNativeInput(r)||Nt.containsOnlyInlineElements(r)?[...t,r]:[...t,...Nt.getDeepestBlockElements(r)],[])}static getDeepestNode(e,t=!1){const r=t?"lastChild":"firstChild",a=t?"previousSibling":"nextSibling";if(e&&e.nodeType===Node.ELEMENT_NODE&&e[r]){let s=e[r];if(Nt.isSingleTag(s)&&!Nt.isNativeInput(s)&&!Nt.isLineBreakTag(s))if(s[a])s=s[a];else if(s.parentNode[a])s=s.parentNode[a];else return s.parentNode;return this.getDeepestNode(s,t)}return e}static isElement(e){return Zp(e)?!1:e&&e.nodeType&&e.nodeType===Node.ELEMENT_NODE}static isFragment(e){return Zp(e)?!1:e&&e.nodeType&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}static isContentEditable(e){return e.contentEditable==="true"}static isNativeInput(e){const t=["INPUT","TEXTAREA"];return e&&e.tagName?t.includes(e.tagName):!1}static canSetCaret(e){let t=!0;if(Nt.isNativeInput(e))switch(e.type){case"file":case"checkbox":case"radio":case"hidden":case"submit":case"button":case"image":case"reset":t=!1;break}else t=Nt.isContentEditable(e);return t}static isNodeEmpty(e,t){let r;return this.isSingleTag(e)&&!this.isLineBreakTag(e)?!1:(this.isElement(e)&&this.isNativeInput(e)?r=e.value:r=e.textContent.replace("",""),t&&(r=r.replace(new RegExp(t,"g"),"")),r.length===0)}static isLeaf(e){return e?e.childNodes.length===0:!1}static isEmpty(e,t){const r=[e];for(;r.length>0;)if(e=r.shift(),!!e){if(this.isLeaf(e)&&!this.isNodeEmpty(e,t))return!1;e.childNodes&&r.push(...Array.from(e.childNodes))}return!0}static isHTMLString(e){const t=Nt.make("div");return t.innerHTML=e,t.childElementCount>0}static getContentLength(e){return Nt.isNativeInput(e)?e.value.length:e.nodeType===Node.TEXT_NODE?e.length:e.textContent.length}static get blockElements(){return["address","article","aside","blockquote","canvas","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","ruby","section","table","tbody","thead","tr","tfoot","ul","video"]}static containsOnlyInlineElements(e){let t;Rn(e)?(t=document.createElement("div"),t.innerHTML=e):t=e;const r=a=>!Nt.blockElements.includes(a.tagName.toLowerCase())&&Array.from(a.children).every(r);return Array.from(t.children).every(r)}static getDeepestBlockElements(e){return Nt.containsOnlyInlineElements(e)?[e]:Array.from(e.children).reduce((t,r)=>[...t,...Nt.getDeepestBlockElements(r)],[])}static getHolder(e){return Rn(e)?document.getElementById(e):e}static isAnchor(e){return e.tagName.toLowerCase()==="a"}static offset(e){const t=e.getBoundingClientRect(),r=window.pageXOffset||document.documentElement.scrollLeft,a=window.pageYOffset||document.documentElement.scrollTop,s=t.top+a,i=t.left+r;return{top:s,left:i,bottom:s+t.height,right:i+t.width}}static getNodeByOffset(e,t){let r=0,a=null;const s=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null);let i=s.nextNode();for(;i;){const d=i.textContent,u=d===null?0:d.length;if(a=i,r+u>=t)break;r+=u,i=s.nextNode()}if(!a)return{node:null,offset:0};const l=a.textContent;if(l===null||l.length===0)return{node:null,offset:0};const c=Math.min(t-r,l.length);return{node:a,offset:c}}};function lC(n){return!/[^\t\n\r ]/.test(n)}function cC(n){const e=window.getComputedStyle(n),t=parseFloat(e.fontSize),r=parseFloat(e.lineHeight)||t*1.2,a=parseFloat(e.paddingTop),s=parseFloat(e.borderTopWidth),i=parseFloat(e.marginTop),l=t*.8,c=(r-t)/2;return i+s+a+c+l}function rf(n){n.dataset.empty=Q.isEmpty(n)?"true":"false"}const dC={blockTunes:{toggler:{"Click to tune":"","or drag to move":""}},inlineToolbar:{converter:{"Convert to":""}},toolbar:{toolbox:{Add:""}},popover:{Filter:"","Nothing found":"","Convert to":""}},uC={Text:"",Link:"",Bold:"",Italic:""},hC={link:{"Add a link":""},stub:{"The block can not be displayed correctly.":""}},pC={delete:{Delete:"","Click to delete":""},moveUp:{"Move up":""},moveDown:{"Move down":""}},af={ui:dC,toolNames:uC,tools:hC,blockTunes:pC},sf=class vr{static ui(e,t){return vr._t(e,t)}static t(e,t){return vr._t(e,t)}static setDictionary(e){vr.currentDictionary=e}static _t(e,t){const r=vr.getNamespace(e);return!r||!r[t]?t:r[t]}static getNamespace(e){return e.split(".").reduce((t,r)=>!t||!Object.keys(t).length?{}:t[r],vr.currentDictionary)}};sf.currentDictionary=af;let At=sf;class lf extends Error{}let ea=class{constructor(){this.subscribers={}}on(e,t){e in this.subscribers||(this.subscribers[e]=[]),this.subscribers[e].push(t)}once(e,t){e in this.subscribers||(this.subscribers[e]=[]);const r=a=>{const s=t(a),i=this.subscribers[e].indexOf(r);return i!==-1&&this.subscribers[e].splice(i,1),s};this.subscribers[e].push(r)}emit(e,t){Zt(this.subscribers)||!this.subscribers[e]||this.subscribers[e].reduce((r,a)=>{const s=a(r);return s!==void 0?s:r},t)}off(e,t){if(this.subscribers[e]===void 0){console.warn(`EventDispatcher .off(): there is no subscribers for event "${e.toString()}". Probably, .off() called before .on()`);return}for(let r=0;r<this.subscribers[e].length;r++)if(this.subscribers[e][r]===t){delete this.subscribers[e][r];break}}destroy(){this.subscribers={}}};function Vn(n){Object.setPrototypeOf(this,{get id(){return n.id},get name(){return n.name},get config(){return n.config},get holder(){return n.holder},get isEmpty(){return n.isEmpty},get selected(){return n.selected},set stretched(e){n.stretched=e},get stretched(){return n.stretched},get focusable(){return n.focusable},call(e,t){return n.call(e,t)},save(){return n.save()},validate(e){return n.validate(e)},dispatchChange(){n.dispatchChange()},getActiveToolboxEntry(){return n.getActiveToolboxEntry()}})}let ta=class{constructor(){this.allListeners=[]}on(e,t,r,a=!1){const s=sC("l"),i={id:s,element:e,eventType:t,handler:r,options:a};if(!this.findOne(e,t,r))return this.allListeners.push(i),e.addEventListener(t,r,a),s}off(e,t,r,a){const s=this.findAll(e,t,r);s.forEach((i,l)=>{const c=this.allListeners.indexOf(s[l]);c>-1&&(this.allListeners.splice(c,1),i.element.removeEventListener(i.eventType,i.handler,i.options))})}offById(e){const t=this.findById(e);t&&t.element.removeEventListener(t.eventType,t.handler,t.options)}findOne(e,t,r){const a=this.findAll(e,t,r);return a.length>0?a[0]:null}findAll(e,t,r){let a;const s=e?this.findByEventTarget(e):[];return e&&t&&r?a=s.filter(i=>i.eventType===t&&i.handler===r):e&&t?a=s.filter(i=>i.eventType===t):a=s,a}removeAll(){this.allListeners.map(e=>{e.element.removeEventListener(e.eventType,e.handler,e.options)}),this.allListeners=[]}destroy(){this.removeAll()}findByEventTarget(e){return this.allListeners.filter(t=>{if(t.element===e)return t})}findByType(e){return this.allListeners.filter(t=>{if(t.eventType===e)return t})}findByHandler(e){return this.allListeners.filter(t=>{if(t.handler===e)return t})}findById(e){return this.allListeners.find(t=>t.id===e)}},ze=class tg{constructor({config:e,eventsDispatcher:t}){if(this.nodes={},this.listeners=new ta,this.readOnlyMutableListeners={on:(r,a,s,i=!1)=>{this.mutableListenerIds.push(this.listeners.on(r,a,s,i))},clearAll:()=>{for(const r of this.mutableListenerIds)this.listeners.offById(r);this.mutableListenerIds=[]}},this.mutableListenerIds=[],new.target===tg)throw new TypeError("Constructors for abstract class Module are not allowed.");this.config=e,this.eventsDispatcher=t}set state(e){this.Editor=e}removeAllNodes(){for(const e in this.nodes){const t=this.nodes[e];t instanceof HTMLElement&&t.remove()}}get isRtl(){return this.config.i18n.direction==="rtl"}},Se=class yo{constructor(){this.instance=null,this.selection=null,this.savedSelectionRange=null,this.isFakeBackgroundEnabled=!1,this.commandBackground="backColor",this.commandRemoveFormat="removeFormat"}static get CSS(){return{editorWrapper:"codex-editor",editorZone:"codex-editor__redactor"}}static get anchorNode(){const e=window.getSelection();return e?e.anchorNode:null}static get anchorElement(){const e=window.getSelection();if(!e)return null;const t=e.anchorNode;return t?Q.isElement(t)?t:t.parentElement:null}static get anchorOffset(){const e=window.getSelection();return e?e.anchorOffset:null}static get isCollapsed(){const e=window.getSelection();return e?e.isCollapsed:null}static get isAtEditor(){return this.isSelectionAtEditor(yo.get())}static isSelectionAtEditor(e){if(!e)return!1;let t=e.anchorNode||e.focusNode;t&&t.nodeType===Node.TEXT_NODE&&(t=t.parentNode);let r=null;return t&&t instanceof Element&&(r=t.closest(`.${yo.CSS.editorZone}`)),r?r.nodeType===Node.ELEMENT_NODE:!1}static isRangeAtEditor(e){if(!e)return;let t=e.startContainer;t&&t.nodeType===Node.TEXT_NODE&&(t=t.parentNode);let r=null;return t&&t instanceof Element&&(r=t.closest(`.${yo.CSS.editorZone}`)),r?r.nodeType===Node.ELEMENT_NODE:!1}static get isSelectionExists(){return!!yo.get().anchorNode}static get range(){return this.getRangeFromSelection(this.get())}static getRangeFromSelection(e){return e&&e.rangeCount?e.getRangeAt(0):null}static get rect(){let e=document.selection,t,r={x:0,y:0,width:0,height:0};if(e&&e.type!=="Control")return e=e,t=e.createRange(),r.x=t.boundingLeft,r.y=t.boundingTop,r.width=t.boundingWidth,r.height=t.boundingHeight,r;if(!window.getSelection)return Ye("Method window.getSelection is not supported","warn"),r;if(e=window.getSelection(),e.rangeCount===null||isNaN(e.rangeCount))return Ye("Method SelectionUtils.rangeCount is not supported","warn"),r;if(e.rangeCount===0)return r;if(t=e.getRangeAt(0).cloneRange(),t.getBoundingClientRect&&(r=t.getBoundingClientRect()),r.x===0&&r.y===0){const a=document.createElement("span");if(a.getBoundingClientRect){a.appendChild(document.createTextNode("")),t.insertNode(a),r=a.getBoundingClientRect();const s=a.parentNode;s.removeChild(a),s.normalize()}}return r}static get text(){return window.getSelection?window.getSelection().toString():""}static get(){return window.getSelection()}static setCursor(e,t=0){const r=document.createRange(),a=window.getSelection();return Q.isNativeInput(e)?Q.canSetCaret(e)?(e.focus(),e.selectionStart=e.selectionEnd=t,e.getBoundingClientRect()):void 0:(r.setStart(e,t),r.setEnd(e,t),a.removeAllRanges(),a.addRange(r),r.getBoundingClientRect())}static isRangeInsideContainer(e){const t=yo.range;return t===null?!1:e.contains(t.startContainer)}static addFakeCursor(){const e=yo.range;if(e===null)return;const t=Q.make("span","codex-editor__fake-cursor");t.dataset.mutationFree="true",e.collapse(),e.insertNode(t)}static isFakeCursorInsideContainer(e){return Q.find(e,".codex-editor__fake-cursor")!==null}static removeFakeCursor(e=document.body){const t=Q.find(e,".codex-editor__fake-cursor");t&&t.remove()}removeFakeBackground(){this.isFakeBackgroundEnabled&&(this.isFakeBackgroundEnabled=!1,document.execCommand(this.commandRemoveFormat))}setFakeBackground(){document.execCommand(this.commandBackground,!1,"#a8d6ff"),this.isFakeBackgroundEnabled=!0}save(){this.savedSelectionRange=yo.range}restore(){if(!this.savedSelectionRange)return;const e=window.getSelection();e.removeAllRanges(),e.addRange(this.savedSelectionRange)}clearSaved(){this.savedSelectionRange=null}collapseToEnd(){const e=window.getSelection(),t=document.createRange();t.selectNodeContents(e.focusNode),t.collapse(!1),e.removeAllRanges(),e.addRange(t)}findParentTag(e,t,r=10){const a=window.getSelection();let s=null;return!a||!a.anchorNode||!a.focusNode?null:([a.anchorNode,a.focusNode].forEach(i=>{let l=r;for(;l>0&&i.parentNode&&!(i.tagName===e&&(s=i,t&&i.classList&&!i.classList.contains(t)&&(s=null),s));)i=i.parentNode,l--}),s)}expandToTag(e){const t=window.getSelection();t.removeAllRanges();const r=document.createRange();r.selectNodeContents(e),t.addRange(r)}};function fC(n,e){const{type:t,target:r,addedNodes:a,removedNodes:s}=n;return n.type==="attributes"&&n.attributeName==="data-empty"?!1:!!(e.contains(r)||t==="childList"&&(Array.from(a).some(i=>i===e)||Array.from(s).some(i=>i===e)))}const ql="redactor dom changed",cf="block changed",df="fake cursor is about to be toggled",uf="fake cursor have been set",na="editor mobile layout toggled";function Gl(n,e){if(!n.conversionConfig)return!1;const t=n.conversionConfig[e];return tt(t)||Rn(t)}function ks(n,e){return Gl(n.tool,e)}function hf(n,e){return Object.entries(n).some(([t,r])=>e[t]&&iC(e[t],r))}async function pf(n,e){const t=(await n.save()).data,r=e.find(a=>a.name===n.name);return r!==void 0&&!Gl(r,"export")?[]:e.reduce((a,s)=>{if(!Gl(s,"import")||s.toolbox===void 0)return a;const i=s.toolbox.filter(l=>{if(Zt(l)||l.icon===void 0)return!1;if(l.data!==void 0){if(hf(l.data,t))return!1}else if(s.name===n.name)return!1;return!0});return a.push({...s,toolbox:i}),a},[])}function ff(n,e){return n.mergeable?n.name===e.name?!0:ks(e,"export")&&ks(n,"import"):!1}function mC(n,e){const t=e==null?void 0:e.export;return tt(t)?t(n):Rn(t)?n[t]:(t!==void 0&&Ye("Conversion «export» property must be a string or function. String means key of saved data object to export. Function should export processed string to export."),"")}function mf(n,e,t){const r=e==null?void 0:e.import;return tt(r)?r(n,t):Rn(r)?{[r]:n}:(r!==void 0&&Ye("Conversion «import» property must be a string or function. String means key of tool data to import. Function accepts a imported string and return composed tool data."),{})}var Je=(n=>(n.Default="default",n.Separator="separator",n.Html="html",n))(Je||{}),Hn=(n=>(n.APPEND_CALLBACK="appendCallback",n.RENDERED="rendered",n.MOVED="moved",n.UPDATED="updated",n.REMOVED="removed",n.ON_PASTE="onPaste",n))(Hn||{});let jn=class bo extends ea{constructor({id:e=rC(),data:t,tool:r,readOnly:a,tunesData:s},i){super(),this.cachedInputs=[],this.toolRenderedElement=null,this.tunesInstances=new Map,this.defaultTunesInstances=new Map,this.unavailableTunesData={},this.inputIndex=0,this.editorEventBus=null,this.handleFocus=()=>{this.dropInputsCache(),this.updateCurrentInput()},this.didMutated=(l=void 0)=>{const c=l===void 0,d=l instanceof InputEvent;!c&&!d&&this.detectToolRootChange(l);let u;c||d?u=!0:u=!(l.length>0&&l.every(h=>{const{addedNodes:p,removedNodes:m,target:f}=h;return[...Array.from(p),...Array.from(m),f].some(g=>(Q.isElement(g)||(g=g.parentElement),g&&g.closest('[data-mutation-free="true"]')!==null))})),u&&(this.dropInputsCache(),this.updateCurrentInput(),this.toggleInputsEmptyMark(),this.call("updated"),this.emit("didMutated",this))},this.name=r.name,this.id=e,this.settings=r.settings,this.config=r.settings.config||{},this.editorEventBus=i||null,this.blockAPI=new Vn(this),this.tool=r,this.toolInstance=r.create(t,this.blockAPI,a),this.tunes=r.tunes,this.composeTunes(s),this.holder=this.compose(),window.requestIdleCallback(()=>{this.watchBlockMutations(),this.addInputEvents(),this.toggleInputsEmptyMark()})}static get CSS(){return{wrapper:"ce-block",wrapperStretched:"ce-block--stretched",content:"ce-block__content",selected:"ce-block--selected",dropTarget:"ce-block--drop-target"}}get inputs(){if(this.cachedInputs.length!==0)return this.cachedInputs;const e=Q.findAllInputs(this.holder);return this.inputIndex>e.length-1&&(this.inputIndex=e.length-1),this.cachedInputs=e,e}get currentInput(){return this.inputs[this.inputIndex]}set currentInput(e){const t=this.inputs.findIndex(r=>r===e||r.contains(e));t!==-1&&(this.inputIndex=t)}get firstInput(){return this.inputs[0]}get lastInput(){const e=this.inputs;return e[e.length-1]}get nextInput(){return this.inputs[this.inputIndex+1]}get previousInput(){return this.inputs[this.inputIndex-1]}get data(){return this.save().then(e=>e&&!Zt(e.data)?e.data:{})}get sanitize(){return this.tool.sanitizeConfig}get mergeable(){return tt(this.toolInstance.merge)}get focusable(){return this.inputs.length!==0}get isEmpty(){const e=Q.isEmpty(this.pluginsContent,"/"),t=!this.hasMedia;return e&&t}get hasMedia(){const e=["img","iframe","video","audio","source","input","textarea","twitterwidget"];return!!this.holder.querySelector(e.join(","))}set selected(e){var t,r;this.holder.classList.toggle(bo.CSS.selected,e);const a=e===!0&&Se.isRangeInsideContainer(this.holder),s=e===!1&&Se.isFakeCursorInsideContainer(this.holder);(a||s)&&((t=this.editorEventBus)==null||t.emit(df,{state:e}),a?Se.addFakeCursor():Se.removeFakeCursor(this.holder),(r=this.editorEventBus)==null||r.emit(uf,{state:e}))}get selected(){return this.holder.classList.contains(bo.CSS.selected)}set stretched(e){this.holder.classList.toggle(bo.CSS.wrapperStretched,e)}get stretched(){return this.holder.classList.contains(bo.CSS.wrapperStretched)}set dropTarget(e){this.holder.classList.toggle(bo.CSS.dropTarget,e)}get pluginsContent(){return this.toolRenderedElement}call(e,t){if(tt(this.toolInstance[e])){e==="appendCallback"&&Ye("`appendCallback` hook is deprecated and will be removed in the next major release. Use `rendered` hook instead","warn");try{this.toolInstance[e].call(this.toolInstance,t)}catch(r){Ye(`Error during '${e}' call: ${r.message}`,"error")}}}async mergeWith(e){await this.toolInstance.merge(e)}async save(){const e=await this.toolInstance.save(this.pluginsContent),t=this.unavailableTunesData;[...this.tunesInstances.entries(),...this.defaultTunesInstances.entries()].forEach(([s,i])=>{if(tt(i.save))try{t[s]=i.save()}catch(l){Ye(`Tune ${i.constructor.name} save method throws an Error %o`,"warn",l)}});const r=window.performance.now();let a;return Promise.resolve(e).then(s=>(a=window.performance.now(),{id:this.id,tool:this.name,data:s,tunes:t,time:a-r})).catch(s=>{Ye(`Saving process for ${this.name} tool failed due to the ${s}`,"log","red")})}async validate(e){let t=!0;return this.toolInstance.validate instanceof Function&&(t=await this.toolInstance.validate(e)),t}getTunes(){const e=[],t=[],r=typeof this.toolInstance.renderSettings=="function"?this.toolInstance.renderSettings():[];return Q.isElement(r)?e.push({type:Je.Html,element:r}):Array.isArray(r)?e.push(...r):e.push(r),[...this.tunesInstances.values(),...this.defaultTunesInstances.values()].map(a=>a.render()).forEach(a=>{Q.isElement(a)?t.push({type:Je.Html,element:a}):Array.isArray(a)?t.push(...a):t.push(a)}),{toolTunes:e,commonTunes:t}}updateCurrentInput(){this.currentInput=Q.isNativeInput(document.activeElement)||!Se.anchorNode?document.activeElement:Se.anchorNode}dispatchChange(){this.didMutated()}destroy(){this.unwatchBlockMutations(),this.removeInputEvents(),super.destroy(),tt(this.toolInstance.destroy)&&this.toolInstance.destroy()}async getActiveToolboxEntry(){const e=this.tool.toolbox;if(e.length===1)return Promise.resolve(this.tool.toolbox[0]);const t=await this.data,r=e;return r==null?void 0:r.find(a=>hf(a.data,t))}async exportDataAsString(){const e=await this.data;return mC(e,this.tool.conversionConfig)}compose(){const e=Q.make("div",bo.CSS.wrapper),t=Q.make("div",bo.CSS.content),r=this.toolInstance.render();e.dataset.id=this.id,this.toolRenderedElement=r,t.appendChild(this.toolRenderedElement);let a=t;return[...this.tunesInstances.values(),...this.defaultTunesInstances.values()].forEach(s=>{if(tt(s.wrap))try{a=s.wrap(a)}catch(i){Ye(`Tune ${s.constructor.name} wrap method throws an Error %o`,"warn",i)}}),e.appendChild(a),e}composeTunes(e){Array.from(this.tunes.values()).forEach(t=>{(t.isInternal?this.defaultTunesInstances:this.tunesInstances).set(t.name,t.create(e[t.name],this.blockAPI))}),Object.entries(e).forEach(([t,r])=>{this.tunesInstances.has(t)||(this.unavailableTunesData[t]=r)})}addInputEvents(){this.inputs.forEach(e=>{e.addEventListener("focus",this.handleFocus),Q.isNativeInput(e)&&e.addEventListener("input",this.didMutated)})}removeInputEvents(){this.inputs.forEach(e=>{e.removeEventListener("focus",this.handleFocus),Q.isNativeInput(e)&&e.removeEventListener("input",this.didMutated)})}watchBlockMutations(){var e;this.redactorDomChangedCallback=t=>{const{mutations:r}=t;r.some(a=>fC(a,this.toolRenderedElement))&&this.didMutated(r)},(e=this.editorEventBus)==null||e.on(ql,this.redactorDomChangedCallback)}unwatchBlockMutations(){var e;(e=this.editorEventBus)==null||e.off(ql,this.redactorDomChangedCallback)}detectToolRootChange(e){e.forEach(t=>{if(Array.from(t.removedNodes).includes(this.toolRenderedElement)){const r=t.addedNodes[t.addedNodes.length-1];this.toolRenderedElement=r}})}dropInputsCache(){this.cachedInputs=[]}toggleInputsEmptyMark(){this.inputs.forEach(rf)}};class gC extends ze{constructor(){super(...arguments),this.insert=(e=this.config.defaultBlock,t={},r={},a,s,i,l)=>{const c=this.Editor.BlockManager.insert({id:l,tool:e,data:t,index:a,needToFocus:s,replace:i});return new Vn(c)},this.composeBlockData=async e=>{const t=this.Editor.Tools.blockTools.get(e);return new jn({tool:t,api:this.Editor.API,readOnly:!0,data:{},tunesData:{}}).data},this.update=async(e,t,r)=>{const{BlockManager:a}=this.Editor,s=a.getBlockById(e);if(s===void 0)throw new Error(`Block with id "${e}" not found`);const i=await a.update(s,t,r);return new Vn(i)},this.convert=async(e,t,r)=>{var a,s;const{BlockManager:i,Tools:l}=this.Editor,c=i.getBlockById(e);if(!c)throw new Error(`Block with id "${e}" not found`);const d=l.blockTools.get(c.name),u=l.blockTools.get(t);if(!u)throw new Error(`Block Tool with type "${t}" not found`);const h=((a=d==null?void 0:d.conversionConfig)==null?void 0:a.export)!==void 0,p=((s=u.conversionConfig)==null?void 0:s.import)!==void 0;if(h&&p){const m=await i.convert(c,t,r);return new Vn(m)}else{const m=[h?!1:bs(c.name),p?!1:bs(t)].filter(Boolean).join(" and ");throw new Error(`Conversion from "${c.name}" to "${t}" is not possible. ${m} tool(s) should provide a "conversionConfig"`)}},this.insertMany=(e,t=this.Editor.BlockManager.blocks.length-1)=>{this.validateIndex(t);const r=e.map(({id:a,type:s,data:i})=>this.Editor.BlockManager.composeBlock({id:a,tool:s||this.config.defaultBlock,data:i}));return this.Editor.BlockManager.insertMany(r,t),r.map(a=>new Vn(a))}}get methods(){return{clear:()=>this.clear(),render:e=>this.render(e),renderFromHTML:e=>this.renderFromHTML(e),delete:e=>this.delete(e),swap:(e,t)=>this.swap(e,t),move:(e,t)=>this.move(e,t),getBlockByIndex:e=>this.getBlockByIndex(e),getById:e=>this.getById(e),getCurrentBlockIndex:()=>this.getCurrentBlockIndex(),getBlockIndex:e=>this.getBlockIndex(e),getBlocksCount:()=>this.getBlocksCount(),getBlockByElement:e=>this.getBlockByElement(e),stretchBlock:(e,t=!0)=>this.stretchBlock(e,t),insertNewBlock:()=>this.insertNewBlock(),insert:this.insert,insertMany:this.insertMany,update:this.update,composeBlockData:this.composeBlockData,convert:this.convert}}getBlocksCount(){return this.Editor.BlockManager.blocks.length}getCurrentBlockIndex(){return this.Editor.BlockManager.currentBlockIndex}getBlockIndex(e){const t=this.Editor.BlockManager.getBlockById(e);if(!t){Qt("There is no block with id `"+e+"`","warn");return}return this.Editor.BlockManager.getBlockIndex(t)}getBlockByIndex(e){const t=this.Editor.BlockManager.getBlockByIndex(e);if(t===void 0){Qt("There is no block at index `"+e+"`","warn");return}return new Vn(t)}getById(e){const t=this.Editor.BlockManager.getBlockById(e);return t===void 0?(Qt("There is no block with id `"+e+"`","warn"),null):new Vn(t)}getBlockByElement(e){const t=this.Editor.BlockManager.getBlock(e);if(t===void 0){Qt("There is no block corresponding to element `"+e+"`","warn");return}return new Vn(t)}swap(e,t){Ye("`blocks.swap()` method is deprecated and will be removed in the next major release. Use `block.move()` method instead","info"),this.Editor.BlockManager.swap(e,t)}move(e,t){this.Editor.BlockManager.move(e,t)}delete(e=this.Editor.BlockManager.currentBlockIndex){try{const t=this.Editor.BlockManager.getBlockByIndex(e);this.Editor.BlockManager.removeBlock(t)}catch(t){Qt(t,"warn");return}this.Editor.BlockManager.blocks.length===0&&this.Editor.BlockManager.insert(),this.Editor.BlockManager.currentBlock&&this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock,this.Editor.Caret.positions.END),this.Editor.Toolbar.close()}async clear(){await this.Editor.BlockManager.clear(!0),this.Editor.InlineToolbar.close()}async render(e){if(e===void 0||e.blocks===void 0)throw new Error("Incorrect data passed to the render() method");this.Editor.ModificationsObserver.disable(),await this.Editor.BlockManager.clear(),await this.Editor.Renderer.render(e.blocks),this.Editor.ModificationsObserver.enable()}async renderFromHTML(e){return await this.Editor.BlockManager.clear(),this.Editor.Paste.processText(e,!0)}stretchBlock(e,t=!0){Ul(!0,"blocks.stretchBlock()","BlockAPI");const r=this.Editor.BlockManager.getBlockByIndex(e);r&&(r.stretched=t)}insertNewBlock(){Ye("Method blocks.insertNewBlock() is deprecated and it will be removed in the next major release. Use blocks.insert() instead.","warn"),this.insert()}validateIndex(e){if(typeof e!="number")throw new Error("Index should be a number");if(e<0)throw new Error("Index should be greater than or equal to 0");if(e===null)throw new Error("Index should be greater than or equal to 0")}}function yC(n,e){return typeof n=="number"?e.BlockManager.getBlockByIndex(n):typeof n=="string"?e.BlockManager.getBlockById(n):e.BlockManager.getBlockById(n.id)}class bC extends ze{constructor(){super(...arguments),this.setToFirstBlock=(e=this.Editor.Caret.positions.DEFAULT,t=0)=>this.Editor.BlockManager.firstBlock?(this.Editor.Caret.setToBlock(this.Editor.BlockManager.firstBlock,e,t),!0):!1,this.setToLastBlock=(e=this.Editor.Caret.positions.DEFAULT,t=0)=>this.Editor.BlockManager.lastBlock?(this.Editor.Caret.setToBlock(this.Editor.BlockManager.lastBlock,e,t),!0):!1,this.setToPreviousBlock=(e=this.Editor.Caret.positions.DEFAULT,t=0)=>this.Editor.BlockManager.previousBlock?(this.Editor.Caret.setToBlock(this.Editor.BlockManager.previousBlock,e,t),!0):!1,this.setToNextBlock=(e=this.Editor.Caret.positions.DEFAULT,t=0)=>this.Editor.BlockManager.nextBlock?(this.Editor.Caret.setToBlock(this.Editor.BlockManager.nextBlock,e,t),!0):!1,this.setToBlock=(e,t=this.Editor.Caret.positions.DEFAULT,r=0)=>{const a=yC(e,this.Editor);return a===void 0?!1:(this.Editor.Caret.setToBlock(a,t,r),!0)},this.focus=(e=!1)=>e?this.setToLastBlock(this.Editor.Caret.positions.END):this.setToFirstBlock(this.Editor.Caret.positions.START)}get methods(){return{setToFirstBlock:this.setToFirstBlock,setToLastBlock:this.setToLastBlock,setToPreviousBlock:this.setToPreviousBlock,setToNextBlock:this.setToNextBlock,setToBlock:this.setToBlock,focus:this.focus}}}class kC extends ze{get methods(){return{emit:(e,t)=>this.emit(e,t),off:(e,t)=>this.off(e,t),on:(e,t)=>this.on(e,t)}}on(e,t){this.eventsDispatcher.on(e,t)}emit(e,t){this.eventsDispatcher.emit(e,t)}off(e,t){this.eventsDispatcher.off(e,t)}}let vC=class ng extends ze{static getNamespace(e,t){return t?`blockTunes.${e}`:`tools.${e}`}get methods(){return{t:()=>{Qt("I18n.t() method can be accessed only from Tools","warn")}}}getMethodsForTool(e,t){return Object.assign(this.methods,{t:r=>At.t(ng.getNamespace(e,t),r)})}};class wC extends ze{get methods(){return{blocks:this.Editor.BlocksAPI.methods,caret:this.Editor.CaretAPI.methods,tools:this.Editor.ToolsAPI.methods,events:this.Editor.EventsAPI.methods,listeners:this.Editor.ListenersAPI.methods,notifier:this.Editor.NotifierAPI.methods,sanitizer:this.Editor.SanitizerAPI.methods,saver:this.Editor.SaverAPI.methods,selection:this.Editor.SelectionAPI.methods,styles:this.Editor.StylesAPI.classes,toolbar:this.Editor.ToolbarAPI.methods,inlineToolbar:this.Editor.InlineToolbarAPI.methods,tooltip:this.Editor.TooltipAPI.methods,i18n:this.Editor.I18nAPI.methods,readOnly:this.Editor.ReadOnlyAPI.methods,ui:this.Editor.UiAPI.methods}}getMethodsForTool(e,t){return Object.assign(this.methods,{i18n:this.Editor.I18nAPI.getMethodsForTool(e,t)})}}class _C extends ze{get methods(){return{close:()=>this.close(),open:()=>this.open()}}open(){this.Editor.InlineToolbar.tryToShow()}close(){this.Editor.InlineToolbar.close()}}class CC extends ze{get methods(){return{on:(e,t,r,a)=>this.on(e,t,r,a),off:(e,t,r,a)=>this.off(e,t,r,a),offById:e=>this.offById(e)}}on(e,t,r,a){return this.listeners.on(e,t,r,a)}off(e,t,r,a){this.listeners.off(e,t,r,a)}offById(e){this.listeners.offById(e)}}var gf={exports:{}};(function(n,e){(function(t,r){n.exports=r()})(window,function(){return function(t){var r={};function a(s){if(r[s])return r[s].exports;var i=r[s]={i:s,l:!1,exports:{}};return t[s].call(i.exports,i,i.exports,a),i.l=!0,i.exports}return a.m=t,a.c=r,a.d=function(s,i,l){a.o(s,i)||Object.defineProperty(s,i,{enumerable:!0,get:l})},a.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},a.t=function(s,i){if(1&i&&(s=a(s)),8&i||4&i&&typeof s=="object"&&s&&s.__esModule)return s;var l=Object.create(null);if(a.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:s}),2&i&&typeof s!="string")for(var c in s)a.d(l,c,(function(d){return s[d]}).bind(null,c));return l},a.n=function(s){var i=s&&s.__esModule?function(){return s.default}:function(){return s};return a.d(i,"a",i),i},a.o=function(s,i){return Object.prototype.hasOwnProperty.call(s,i)},a.p="/",a(a.s=0)}([function(t,r,a){a(1),t.exports=function(){var s=a(6),i="cdx-notify--bounce-in",l=null;return{show:function(c){if(c.message){(function(){if(l)return!0;l=s.getWrapper(),document.body.appendChild(l)})();var d=null,u=c.time||8e3;switch(c.type){case"confirm":d=s.confirm(c);break;case"prompt":d=s.prompt(c);break;default:d=s.alert(c),window.setTimeout(function(){d.remove()},u)}l.appendChild(d),d.classList.add(i)}}}}()},function(t,r,a){var s=a(2);typeof s=="string"&&(s=[[t.i,s,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};a(4)(s,i),s.locals&&(t.exports=s.locals)},function(t,r,a){(t.exports=a(3)(!1)).push([t.i,`.cdx-notify--error{background:#fffbfb!important}.cdx-notify--error::before{background:#fb5d5d!important}.cdx-notify__input{max-width:130px;padding:5px 10px;background:#f7f7f7;border:0;border-radius:3px;font-size:13px;color:#656b7c;outline:0}.cdx-notify__input:-ms-input-placeholder{color:#656b7c}.cdx-notify__input::placeholder{color:#656b7c}.cdx-notify__input:focus:-ms-input-placeholder{color:rgba(101,107,124,.3)}.cdx-notify__input:focus::placeholder{color:rgba(101,107,124,.3)}.cdx-notify__button{border:none;border-radius:3px;font-size:13px;padding:5px 10px;cursor:pointer}.cdx-notify__button:last-child{margin-left:10px}.cdx-notify__button--cancel{background:#f2f5f7;box-shadow:0 2px 1px 0 rgba(16,19,29,0);color:#656b7c}.cdx-notify__button--cancel:hover{background:#eee}.cdx-notify__button--confirm{background:#34c992;box-shadow:0 1px 1px 0 rgba(18,49,35,.05);color:#fff}.cdx-notify__button--confirm:hover{background:#33b082}.cdx-notify__btns-wrapper{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;margin-top:5px}.cdx-notify__cross{position:absolute;top:5px;right:5px;width:10px;height:10px;padding:5px;opacity:.54;cursor:pointer}.cdx-notify__cross::after,.cdx-notify__cross::before{content:'';position:absolute;left:9px;top:5px;height:12px;width:2px;background:#575d67}.cdx-notify__cross::before{transform:rotate(-45deg)}.cdx-notify__cross::after{transform:rotate(45deg)}.cdx-notify__cross:hover{opacity:1}.cdx-notifies{position:fixed;z-index:2;bottom:20px;left:20px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif}.cdx-notify{position:relative;width:220px;margin-top:15px;padding:13px 16px;background:#fff;box-shadow:0 11px 17px 0 rgba(23,32,61,.13);border-radius:5px;font-size:14px;line-height:1.4em;word-wrap:break-word}.cdx-notify::before{content:'';position:absolute;display:block;top:0;left:0;width:3px;height:calc(100% - 6px);margin:3px;border-radius:5px;background:0 0}@keyframes bounceIn{0%{opacity:0;transform:scale(.3)}50%{opacity:1;transform:scale(1.05)}70%{transform:scale(.9)}100%{transform:scale(1)}}.cdx-notify--bounce-in{animation-name:bounceIn;animation-duration:.6s;animation-iteration-count:1}.cdx-notify--success{background:#fafffe!important}.cdx-notify--success::before{background:#41ffb1!important}`,""])},function(t,r){t.exports=function(a){var s=[];return s.toString=function(){return this.map(function(i){var l=function(c,d){var u=c[1]||"",h=c[3];if(!h)return u;if(d&&typeof btoa=="function"){var p=(f=h,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(f))))+" */"),m=h.sources.map(function(g){return"/*# sourceURL="+h.sourceRoot+g+" */"});return[u].concat(m).concat([p]).join(`
|
|
30
30
|
`)}var f;return[u].join(`
|
|
31
31
|
`)}(i,a);return i[2]?"@media "+i[2]+"{"+l+"}":l}).join("")},s.i=function(i,l){typeof i=="string"&&(i=[[null,i,""]]);for(var c={},d=0;d<this.length;d++){var u=this[d][0];typeof u=="number"&&(c[u]=!0)}for(d=0;d<i.length;d++){var h=i[d];typeof h[0]=="number"&&c[h[0]]||(l&&!h[2]?h[2]=l:l&&(h[2]="("+h[2]+") and ("+l+")"),s.push(h))}},s}},function(t,r,a){var s,i,l={},c=(s=function(){return window&&document&&document.all&&!window.atob},function(){return i===void 0&&(i=s.apply(this,arguments)),i}),d=function(M){var v={};return function(b){if(typeof b=="function")return b();if(v[b]===void 0){var D=(function(Y){return document.querySelector(Y)}).call(this,b);if(window.HTMLIFrameElement&&D instanceof window.HTMLIFrameElement)try{D=D.contentDocument.head}catch{D=null}v[b]=D}return v[b]}}(),u=null,h=0,p=[],m=a(5);function f(M,v){for(var b=0;b<M.length;b++){var D=M[b],Y=l[D.id];if(Y){Y.refs++;for(var K=0;K<Y.parts.length;K++)Y.parts[K](D.parts[K]);for(;K<D.parts.length;K++)Y.parts.push(F(D.parts[K],v))}else{var w=[];for(K=0;K<D.parts.length;K++)w.push(F(D.parts[K],v));l[D.id]={id:D.id,refs:1,parts:w}}}}function g(M,v){for(var b=[],D={},Y=0;Y<M.length;Y++){var K=M[Y],w=v.base?K[0]+v.base:K[0],k={css:K[1],media:K[2],sourceMap:K[3]};D[w]?D[w].parts.push(k):b.push(D[w]={id:w,parts:[k]})}return b}function x(M,v){var b=d(M.insertInto);if(!b)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var D=p[p.length-1];if(M.insertAt==="top")D?D.nextSibling?b.insertBefore(v,D.nextSibling):b.appendChild(v):b.insertBefore(v,b.firstChild),p.push(v);else if(M.insertAt==="bottom")b.appendChild(v);else{if(typeof M.insertAt!="object"||!M.insertAt.before)throw new Error(`[Style Loader]
|
|
32
32
|
|
|
@@ -35,7 +35,7 @@ Available fill gap methods: `).concat(ae,"."))}},W=function(B){if(B){var ae=s(B)
|
|
|
35
35
|
(https://github.com/webpack-contrib/style-loader#insertat)
|
|
36
36
|
`);var Y=d(M.insertInto+" "+M.insertAt.before);b.insertBefore(v,Y)}}function E(M){if(M.parentNode===null)return!1;M.parentNode.removeChild(M);var v=p.indexOf(M);v>=0&&p.splice(v,1)}function C(M){var v=document.createElement("style");return M.attrs.type===void 0&&(M.attrs.type="text/css"),T(v,M.attrs),x(M,v),v}function T(M,v){Object.keys(v).forEach(function(b){M.setAttribute(b,v[b])})}function F(M,v){var b,D,Y,K;if(v.transform&&M.css){if(!(K=v.transform(M.css)))return function(){};M.css=K}if(v.singleton){var w=h++;b=u||(u=C(v)),D=P.bind(null,b,w,!1),Y=P.bind(null,b,w,!0)}else M.sourceMap&&typeof URL=="function"&&typeof URL.createObjectURL=="function"&&typeof URL.revokeObjectURL=="function"&&typeof Blob=="function"&&typeof btoa=="function"?(b=function(k){var _=document.createElement("link");return k.attrs.type===void 0&&(k.attrs.type="text/css"),k.attrs.rel="stylesheet",T(_,k.attrs),x(k,_),_}(v),D=(function(k,_,A){var N=A.css,L=A.sourceMap,q=_.convertToAbsoluteUrls===void 0&&L;(_.convertToAbsoluteUrls||q)&&(N=m(N)),L&&(N+=`
|
|
37
37
|
/*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(L))))+" */");var z=new Blob([N],{type:"text/css"}),oe=k.href;k.href=URL.createObjectURL(z),oe&&URL.revokeObjectURL(oe)}).bind(null,b,v),Y=function(){E(b),b.href&&URL.revokeObjectURL(b.href)}):(b=C(v),D=(function(k,_){var A=_.css,N=_.media;if(N&&k.setAttribute("media",N),k.styleSheet)k.styleSheet.cssText=A;else{for(;k.firstChild;)k.removeChild(k.firstChild);k.appendChild(document.createTextNode(A))}}).bind(null,b),Y=function(){E(b)});return D(M),function(k){if(k){if(k.css===M.css&&k.media===M.media&&k.sourceMap===M.sourceMap)return;D(M=k)}else Y()}}t.exports=function(M,v){if(typeof DEBUG<"u"&&DEBUG&&typeof document!="object")throw new Error("The style-loader cannot be used in a non-browser environment");(v=v||{}).attrs=typeof v.attrs=="object"?v.attrs:{},v.singleton||typeof v.singleton=="boolean"||(v.singleton=c()),v.insertInto||(v.insertInto="head"),v.insertAt||(v.insertAt="bottom");var b=g(M,v);return f(b,v),function(D){for(var Y=[],K=0;K<b.length;K++){var w=b[K];(k=l[w.id]).refs--,Y.push(k)}for(D&&f(g(D,v),v),K=0;K<Y.length;K++){var k;if((k=Y[K]).refs===0){for(var _=0;_<k.parts.length;_++)k.parts[_]();delete l[k.id]}}}};var I,O=(I=[],function(M,v){return I[M]=v,I.filter(Boolean).join(`
|
|
38
|
-
`)});function P(M,v,b,D){var Y=b?"":D.css;if(M.styleSheet)M.styleSheet.cssText=O(v,Y);else{var K=document.createTextNode(Y),w=M.childNodes;w[v]&&M.removeChild(w[v]),w.length?M.insertBefore(K,w[v]):M.appendChild(K)}}},function(t,r){t.exports=function(a){var s=typeof window<"u"&&window.location;if(!s)throw new Error("fixUrls requires window.location");if(!a||typeof a!="string")return a;var i=s.protocol+"//"+s.host,l=i+s.pathname.replace(/\/[^\/]*$/,"/");return a.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(c,d){var u,h=d.trim().replace(/^"(.*)"$/,function(p,m){return m}).replace(/^'(.*)'$/,function(p,m){return m});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(h)?c:(u=h.indexOf("//")===0?h:h.indexOf("/")===0?i+h:l+h.replace(/^\.\//,""),"url("+JSON.stringify(u)+")")})}},function(t,r,a){var s,i,l,c,d,u,h,p,m;t.exports=(s="cdx-notifies",i="cdx-notify",l="cdx-notify__cross",c="cdx-notify__button--confirm",d="cdx-notify__button--cancel",u="cdx-notify__input",h="cdx-notify__button",p="cdx-notify__btns-wrapper",{alert:m=function(f){var g=document.createElement("DIV"),x=document.createElement("DIV"),E=f.message,C=f.style;return g.classList.add(i),C&&g.classList.add(i+"--"+C),g.innerHTML=E,x.classList.add(l),x.addEventListener("click",g.remove.bind(g)),g.appendChild(x),g},confirm:function(f){var g=m(f),x=document.createElement("div"),E=document.createElement("button"),C=document.createElement("button"),T=g.querySelector("."+l),F=f.cancelHandler,I=f.okHandler;return x.classList.add(p),E.innerHTML=f.okText||"Confirm",C.innerHTML=f.cancelText||"Cancel",E.classList.add(h),C.classList.add(h),E.classList.add(c),C.classList.add(d),F&&typeof F=="function"&&(C.addEventListener("click",F),T.addEventListener("click",F)),I&&typeof I=="function"&&E.addEventListener("click",I),E.addEventListener("click",g.remove.bind(g)),C.addEventListener("click",g.remove.bind(g)),x.appendChild(E),x.appendChild(C),g.appendChild(x),g},prompt:function(f){var g=m(f),x=document.createElement("div"),E=document.createElement("button"),C=document.createElement("input"),T=g.querySelector("."+l),F=f.cancelHandler,I=f.okHandler;return x.classList.add(p),E.innerHTML=f.okText||"Ok",E.classList.add(h),E.classList.add(c),C.classList.add(u),f.placeholder&&C.setAttribute("placeholder",f.placeholder),f.default&&(C.value=f.default),f.inputType&&(C.type=f.inputType),F&&typeof F=="function"&&T.addEventListener("click",F),I&&typeof I=="function"&&E.addEventListener("click",function(){I(C.value)}),E.addEventListener("click",g.remove.bind(g)),x.appendChild(C),x.appendChild(E),g.appendChild(x),g},getWrapper:function(){var f=document.createElement("DIV");return f.classList.add(s),f}})}])})})(gf);var EC=gf.exports;const SC=gs(EC);class xC{show(e){SC.show(e)}}class BC extends ze{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.notifier=new xC}get methods(){return{show:e=>this.show(e)}}show(e){return this.notifier.show(e)}}class TC extends ze{get methods(){const e=()=>this.isEnabled;return{toggle:t=>this.toggle(t),get isEnabled(){return e()}}}toggle(e){return this.Editor.ReadOnly.toggle(e)}get isEnabled(){return this.Editor.ReadOnly.isEnabled}}var yf={exports:{}};(function(n,e){(function(t,r){n.exports=r()})(Zr,function(){function t(h){var p=h.tags,m=Object.keys(p),f=m.map(function(g){return typeof p[g]}).every(function(g){return g==="object"||g==="boolean"||g==="function"});if(!f)throw new Error("The configuration was invalid");this.config=h}var r=["P","LI","TD","TH","DIV","H1","H2","H3","H4","H5","H6","PRE"];function a(h){return r.indexOf(h.nodeName)!==-1}var s=["A","B","STRONG","I","EM","SUB","SUP","U","STRIKE"];function i(h){return s.indexOf(h.nodeName)!==-1}t.prototype.clean=function(h){const p=document.implementation.createHTMLDocument(),m=p.createElement("div");return m.innerHTML=h,this._sanitize(p,m),m.innerHTML},t.prototype._sanitize=function(h,p){var m=l(h,p),f=m.firstChild();if(f)do{if(f.nodeType===Node.TEXT_NODE)if(f.data.trim()===""&&(f.previousElementSibling&&a(f.previousElementSibling)||f.nextElementSibling&&a(f.nextElementSibling))){p.removeChild(f),this._sanitize(h,p);break}else continue;if(f.nodeType===Node.COMMENT_NODE){p.removeChild(f),this._sanitize(h,p);break}var g=i(f),x;g&&(x=Array.prototype.some.call(f.childNodes,a));var E=!!p.parentNode,C=a(p)&&a(f)&&E,T=f.nodeName.toLowerCase(),F=c(this.config,T,f),I=g&&x;if(I||d(f,F)||!this.config.keepNestedBlockElements&&C){if(!(f.nodeName==="SCRIPT"||f.nodeName==="STYLE"))for(;f.childNodes.length>0;)p.insertBefore(f.childNodes[0],f);p.removeChild(f),this._sanitize(h,p);break}for(var O=0;O<f.attributes.length;O+=1){var P=f.attributes[O];u(P,F,f)&&(f.removeAttribute(P.name),O=O-1)}this._sanitize(h,f)}while(f=m.nextSibling())};function l(h,p){return h.createTreeWalker(p,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT,null,!1)}function c(h,p,m){return typeof h.tags[p]=="function"?h.tags[p](m):h.tags[p]}function d(h,p){return typeof p>"u"?!0:typeof p=="boolean"?!p:!1}function u(h,p,m){var f=h.name.toLowerCase();return p===!0?!1:typeof p[f]=="function"?!p[f](h.value,m):typeof p[f]>"u"||p[f]===!1?!0:typeof p[f]=="string"?p[f]!==h.value:!1}return t})})(yf);var $C=yf.exports;const MC=gs($C);function
|
|
38
|
+
`)});function P(M,v,b,D){var Y=b?"":D.css;if(M.styleSheet)M.styleSheet.cssText=O(v,Y);else{var K=document.createTextNode(Y),w=M.childNodes;w[v]&&M.removeChild(w[v]),w.length?M.insertBefore(K,w[v]):M.appendChild(K)}}},function(t,r){t.exports=function(a){var s=typeof window<"u"&&window.location;if(!s)throw new Error("fixUrls requires window.location");if(!a||typeof a!="string")return a;var i=s.protocol+"//"+s.host,l=i+s.pathname.replace(/\/[^\/]*$/,"/");return a.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(c,d){var u,h=d.trim().replace(/^"(.*)"$/,function(p,m){return m}).replace(/^'(.*)'$/,function(p,m){return m});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(h)?c:(u=h.indexOf("//")===0?h:h.indexOf("/")===0?i+h:l+h.replace(/^\.\//,""),"url("+JSON.stringify(u)+")")})}},function(t,r,a){var s,i,l,c,d,u,h,p,m;t.exports=(s="cdx-notifies",i="cdx-notify",l="cdx-notify__cross",c="cdx-notify__button--confirm",d="cdx-notify__button--cancel",u="cdx-notify__input",h="cdx-notify__button",p="cdx-notify__btns-wrapper",{alert:m=function(f){var g=document.createElement("DIV"),x=document.createElement("DIV"),E=f.message,C=f.style;return g.classList.add(i),C&&g.classList.add(i+"--"+C),g.innerHTML=E,x.classList.add(l),x.addEventListener("click",g.remove.bind(g)),g.appendChild(x),g},confirm:function(f){var g=m(f),x=document.createElement("div"),E=document.createElement("button"),C=document.createElement("button"),T=g.querySelector("."+l),F=f.cancelHandler,I=f.okHandler;return x.classList.add(p),E.innerHTML=f.okText||"Confirm",C.innerHTML=f.cancelText||"Cancel",E.classList.add(h),C.classList.add(h),E.classList.add(c),C.classList.add(d),F&&typeof F=="function"&&(C.addEventListener("click",F),T.addEventListener("click",F)),I&&typeof I=="function"&&E.addEventListener("click",I),E.addEventListener("click",g.remove.bind(g)),C.addEventListener("click",g.remove.bind(g)),x.appendChild(E),x.appendChild(C),g.appendChild(x),g},prompt:function(f){var g=m(f),x=document.createElement("div"),E=document.createElement("button"),C=document.createElement("input"),T=g.querySelector("."+l),F=f.cancelHandler,I=f.okHandler;return x.classList.add(p),E.innerHTML=f.okText||"Ok",E.classList.add(h),E.classList.add(c),C.classList.add(u),f.placeholder&&C.setAttribute("placeholder",f.placeholder),f.default&&(C.value=f.default),f.inputType&&(C.type=f.inputType),F&&typeof F=="function"&&T.addEventListener("click",F),I&&typeof I=="function"&&E.addEventListener("click",function(){I(C.value)}),E.addEventListener("click",g.remove.bind(g)),x.appendChild(C),x.appendChild(E),g.appendChild(x),g},getWrapper:function(){var f=document.createElement("DIV");return f.classList.add(s),f}})}])})})(gf);var EC=gf.exports;const SC=gs(EC);class xC{show(e){SC.show(e)}}class BC extends ze{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.notifier=new xC}get methods(){return{show:e=>this.show(e)}}show(e){return this.notifier.show(e)}}class TC extends ze{get methods(){const e=()=>this.isEnabled;return{toggle:t=>this.toggle(t),get isEnabled(){return e()}}}toggle(e){return this.Editor.ReadOnly.toggle(e)}get isEnabled(){return this.Editor.ReadOnly.isEnabled}}var yf={exports:{}};(function(n,e){(function(t,r){n.exports=r()})(Zr,function(){function t(h){var p=h.tags,m=Object.keys(p),f=m.map(function(g){return typeof p[g]}).every(function(g){return g==="object"||g==="boolean"||g==="function"});if(!f)throw new Error("The configuration was invalid");this.config=h}var r=["P","LI","TD","TH","DIV","H1","H2","H3","H4","H5","H6","PRE"];function a(h){return r.indexOf(h.nodeName)!==-1}var s=["A","B","STRONG","I","EM","SUB","SUP","U","STRIKE"];function i(h){return s.indexOf(h.nodeName)!==-1}t.prototype.clean=function(h){const p=document.implementation.createHTMLDocument(),m=p.createElement("div");return m.innerHTML=h,this._sanitize(p,m),m.innerHTML},t.prototype._sanitize=function(h,p){var m=l(h,p),f=m.firstChild();if(f)do{if(f.nodeType===Node.TEXT_NODE)if(f.data.trim()===""&&(f.previousElementSibling&&a(f.previousElementSibling)||f.nextElementSibling&&a(f.nextElementSibling))){p.removeChild(f),this._sanitize(h,p);break}else continue;if(f.nodeType===Node.COMMENT_NODE){p.removeChild(f),this._sanitize(h,p);break}var g=i(f),x;g&&(x=Array.prototype.some.call(f.childNodes,a));var E=!!p.parentNode,C=a(p)&&a(f)&&E,T=f.nodeName.toLowerCase(),F=c(this.config,T,f),I=g&&x;if(I||d(f,F)||!this.config.keepNestedBlockElements&&C){if(!(f.nodeName==="SCRIPT"||f.nodeName==="STYLE"))for(;f.childNodes.length>0;)p.insertBefore(f.childNodes[0],f);p.removeChild(f),this._sanitize(h,p);break}for(var O=0;O<f.attributes.length;O+=1){var P=f.attributes[O];u(P,F,f)&&(f.removeAttribute(P.name),O=O-1)}this._sanitize(h,f)}while(f=m.nextSibling())};function l(h,p){return h.createTreeWalker(p,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT,null,!1)}function c(h,p,m){return typeof h.tags[p]=="function"?h.tags[p](m):h.tags[p]}function d(h,p){return typeof p>"u"?!0:typeof p=="boolean"?!p:!1}function u(h,p,m){var f=h.name.toLowerCase();return p===!0?!1:typeof p[f]=="function"?!p[f](h.value,m):typeof p[f]>"u"||p[f]===!1?!0:typeof p[f]=="string"?p[f]!==h.value:!1}return t})})(yf);var $C=yf.exports;const MC=gs($C);function Kl(n,e){return n.map(t=>{const r=tt(e)?e(t.tool):e;return Zt(r)||(t.data=Xl(t.data,r)),t})}function _n(n,e={}){const t={tags:e};return new MC(t).clean(n)}function Xl(n,e){return Array.isArray(n)?DC(n,e):_t(n)?OC(n,e):Rn(n)?AC(n,e):n}function DC(n,e){return n.map(t=>Xl(t,e))}function OC(n,e){const t={};for(const r in n){if(!Object.prototype.hasOwnProperty.call(n,r))continue;const a=n[r],s=IC(e[r])?e[r]:e;t[r]=Xl(a,s)}return t}function AC(n,e){return _t(e)?_n(n,e):e===!1?_n(n,{}):n}function IC(n){return _t(n)||Z_(n)||tt(n)}class NC extends ze{get methods(){return{clean:(e,t)=>this.clean(e,t)}}clean(e,t){return _n(e,t)}}class PC extends ze{get methods(){return{save:()=>this.save()}}save(){const e="Editor's content can not be saved in read-only mode";return this.Editor.ReadOnly.isEnabled?(Qt(e,"warn"),Promise.reject(new Error(e))):this.Editor.Saver.save()}}class LC extends ze{constructor(){super(...arguments),this.selectionUtils=new Se}get methods(){return{findParentTag:(e,t)=>this.findParentTag(e,t),expandToTag:e=>this.expandToTag(e),save:()=>this.selectionUtils.save(),restore:()=>this.selectionUtils.restore(),setFakeBackground:()=>this.selectionUtils.setFakeBackground(),removeFakeBackground:()=>this.selectionUtils.removeFakeBackground()}}findParentTag(e,t){return this.selectionUtils.findParentTag(e,t)}expandToTag(e){this.selectionUtils.expandToTag(e)}}class zC extends ze{get methods(){return{getBlockTools:()=>Array.from(this.Editor.Tools.blockTools.values())}}}class FC extends ze{get classes(){return{block:"cdx-block",inlineToolButton:"ce-inline-tool",inlineToolButtonActive:"ce-inline-tool--active",input:"cdx-input",loader:"cdx-loader",button:"cdx-button",settingsButton:"cdx-settings-button",settingsButtonActive:"cdx-settings-button--active"}}}class RC extends ze{get methods(){return{close:()=>this.close(),open:()=>this.open(),toggleBlockSettings:e=>this.toggleBlockSettings(e),toggleToolbox:e=>this.toggleToolbox(e)}}open(){this.Editor.Toolbar.moveAndOpen()}close(){this.Editor.Toolbar.close()}toggleBlockSettings(e){if(this.Editor.BlockManager.currentBlockIndex===-1){Qt("Could't toggle the Toolbar because there is no block selected ","warn");return}e??!this.Editor.BlockSettings.opened?(this.Editor.Toolbar.moveAndOpen(),this.Editor.BlockSettings.open()):this.Editor.BlockSettings.close()}toggleToolbox(e){if(this.Editor.BlockManager.currentBlockIndex===-1){Qt("Could't toggle the Toolbox because there is no block selected ","warn");return}e??!this.Editor.Toolbar.toolbox.opened?(this.Editor.Toolbar.moveAndOpen(),this.Editor.Toolbar.toolbox.open()):this.Editor.Toolbar.toolbox.close()}}var bf={exports:{}};/*!
|
|
39
39
|
* CodeX.Tooltips
|
|
40
40
|
*
|
|
41
41
|
* @version 1.0.5
|
|
@@ -44,29 +44,29 @@ Available fill gap methods: `).concat(ae,"."))}},W=function(B){if(B){var ae=s(B)
|
|
|
44
44
|
* @author CodeX <https://codex.so>
|
|
45
45
|
*
|
|
46
46
|
*
|
|
47
|
-
*/(function(n,e){(function(t,r){n.exports=r()})(window,function(){return function(t){var r={};function a(s){if(r[s])return r[s].exports;var i=r[s]={i:s,l:!1,exports:{}};return t[s].call(i.exports,i,i.exports,a),i.l=!0,i.exports}return a.m=t,a.c=r,a.d=function(s,i,l){a.o(s,i)||Object.defineProperty(s,i,{enumerable:!0,get:l})},a.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},a.t=function(s,i){if(1&i&&(s=a(s)),8&i||4&i&&typeof s=="object"&&s&&s.__esModule)return s;var l=Object.create(null);if(a.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:s}),2&i&&typeof s!="string")for(var c in s)a.d(l,c,(function(d){return s[d]}).bind(null,c));return l},a.n=function(s){var i=s&&s.__esModule?function(){return s.default}:function(){return s};return a.d(i,"a",i),i},a.o=function(s,i){return Object.prototype.hasOwnProperty.call(s,i)},a.p="",a(a.s=0)}([function(t,r,a){t.exports=a(1)},function(t,r,a){a.r(r),a.d(r,"default",function(){return s});class s{constructor(){this.nodes={wrapper:null,content:null},this.showed=!1,this.offsetTop=10,this.offsetLeft=10,this.offsetRight=10,this.hidingDelay=0,this.handleWindowScroll=()=>{this.showed&&this.hide(!0)},this.loadStyles(),this.prepare(),window.addEventListener("scroll",this.handleWindowScroll,{passive:!0})}get CSS(){return{tooltip:"ct",tooltipContent:"ct__content",tooltipShown:"ct--shown",placement:{left:"ct--left",bottom:"ct--bottom",right:"ct--right",top:"ct--top"}}}show(l,c,d){this.nodes.wrapper||this.prepare(),this.hidingTimeout&&clearTimeout(this.hidingTimeout);const u=Object.assign({placement:"bottom",marginTop:0,marginLeft:0,marginRight:0,marginBottom:0,delay:70,hidingDelay:0},d);if(u.hidingDelay&&(this.hidingDelay=u.hidingDelay),this.nodes.content.innerHTML="",typeof c=="string")this.nodes.content.appendChild(document.createTextNode(c));else{if(!(c instanceof Node))throw Error("[CodeX Tooltip] Wrong type of «content» passed. It should be an instance of Node or String. But "+typeof c+" given.");this.nodes.content.appendChild(c)}switch(this.nodes.wrapper.classList.remove(...Object.values(this.CSS.placement)),u.placement){case"top":this.placeTop(l,u);break;case"left":this.placeLeft(l,u);break;case"right":this.placeRight(l,u);break;case"bottom":default:this.placeBottom(l,u)}u&&u.delay?this.showingTimeout=setTimeout(()=>{this.nodes.wrapper.classList.add(this.CSS.tooltipShown),this.showed=!0},u.delay):(this.nodes.wrapper.classList.add(this.CSS.tooltipShown),this.showed=!0)}hide(l=!1){if(this.hidingDelay&&!l)return this.hidingTimeout&&clearTimeout(this.hidingTimeout),void(this.hidingTimeout=setTimeout(()=>{this.hide(!0)},this.hidingDelay));this.nodes.wrapper.classList.remove(this.CSS.tooltipShown),this.showed=!1,this.showingTimeout&&clearTimeout(this.showingTimeout)}onHover(l,c,d){l.addEventListener("mouseenter",()=>{this.show(l,c,d)}),l.addEventListener("mouseleave",()=>{this.hide()})}destroy(){this.nodes.wrapper.remove(),window.removeEventListener("scroll",this.handleWindowScroll)}prepare(){this.nodes.wrapper=this.make("div",this.CSS.tooltip),this.nodes.content=this.make("div",this.CSS.tooltipContent),this.append(this.nodes.wrapper,this.nodes.content),this.append(document.body,this.nodes.wrapper)}loadStyles(){const l="codex-tooltips-style";if(document.getElementById(l))return;const c=a(2),d=this.make("style",null,{textContent:c.toString(),id:l});this.prepend(document.head,d)}placeBottom(l,c){const d=l.getBoundingClientRect(),u=d.left+l.clientWidth/2-this.nodes.wrapper.offsetWidth/2,h=d.bottom+window.pageYOffset+this.offsetTop+c.marginTop;this.applyPlacement("bottom",u,h)}placeTop(l,c){const d=l.getBoundingClientRect(),u=d.left+l.clientWidth/2-this.nodes.wrapper.offsetWidth/2,h=d.top+window.pageYOffset-this.nodes.wrapper.clientHeight-this.offsetTop;this.applyPlacement("top",u,h)}placeLeft(l,c){const d=l.getBoundingClientRect(),u=d.left-this.nodes.wrapper.offsetWidth-this.offsetLeft-c.marginLeft,h=d.top+window.pageYOffset+l.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement("left",u,h)}placeRight(l,c){const d=l.getBoundingClientRect(),u=d.right+this.offsetRight+c.marginRight,h=d.top+window.pageYOffset+l.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement("right",u,h)}applyPlacement(l,c,d){this.nodes.wrapper.classList.add(this.CSS.placement[l]),this.nodes.wrapper.style.left=c+"px",this.nodes.wrapper.style.top=d+"px"}make(l,c=null,d={}){const u=document.createElement(l);Array.isArray(c)?u.classList.add(...c):c&&u.classList.add(c);for(const h in d)d.hasOwnProperty(h)&&(u[h]=d[h]);return u}append(l,c){Array.isArray(c)?c.forEach(d=>l.appendChild(d)):l.appendChild(c)}prepend(l,c){Array.isArray(c)?(c=c.reverse()).forEach(d=>l.prepend(d)):l.prepend(c)}}},function(t,r){t.exports=`.ct{z-index:999;opacity:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;-webkit-transition:opacity 50ms ease-in,-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,transform 70ms cubic-bezier(.215,.61,.355,1),-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);will-change:opacity,top,left;-webkit-box-shadow:0 8px 12px 0 rgba(29,32,43,.17),0 4px 5px -3px rgba(5,6,12,.49);box-shadow:0 8px 12px 0 rgba(29,32,43,.17),0 4px 5px -3px rgba(5,6,12,.49);border-radius:9px}.ct,.ct:before{position:absolute;top:0;left:0}.ct:before{content:"";bottom:0;right:0;background-color:#1d202b;z-index:-1;border-radius:4px}@supports(-webkit-mask-box-image:url("")){.ct:before{border-radius:0;-webkit-mask-box-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M10.71 0h2.58c3.02 0 4.64.42 6.1 1.2a8.18 8.18 0 013.4 3.4C23.6 6.07 24 7.7 24 10.71v2.58c0 3.02-.42 4.64-1.2 6.1a8.18 8.18 0 01-3.4 3.4c-1.47.8-3.1 1.21-6.11 1.21H10.7c-3.02 0-4.64-.42-6.1-1.2a8.18 8.18 0 01-3.4-3.4C.4 17.93 0 16.3 0 13.29V10.7c0-3.02.42-4.64 1.2-6.1a8.18 8.18 0 013.4-3.4C6.07.4 7.7 0 10.71 0z"/></svg>') 48% 41% 37.9% 53.3%}}@media (--mobile){.ct{display:none}}.ct__content{padding:6px 10px;color:#cdd1e0;font-size:12px;text-align:center;letter-spacing:.02em;line-height:1em}.ct:after{content:"";width:8px;height:8px;position:absolute;background-color:#1d202b;z-index:-1}.ct--bottom{-webkit-transform:translateY(5px);transform:translateY(5px)}.ct--bottom:after{top:-3px;left:50%;-webkit-transform:translateX(-50%) rotate(-45deg);transform:translateX(-50%) rotate(-45deg)}.ct--top{-webkit-transform:translateY(-5px);transform:translateY(-5px)}.ct--top:after{top:auto;bottom:-3px;left:50%;-webkit-transform:translateX(-50%) rotate(-45deg);transform:translateX(-50%) rotate(-45deg)}.ct--left{-webkit-transform:translateX(-5px);transform:translateX(-5px)}.ct--left:after{top:50%;left:auto;right:0;-webkit-transform:translate(41.6%,-50%) rotate(-45deg);transform:translate(41.6%,-50%) rotate(-45deg)}.ct--right{-webkit-transform:translateX(5px);transform:translateX(5px)}.ct--right:after{top:50%;left:0;-webkit-transform:translate(-41.6%,-50%) rotate(-45deg);transform:translate(-41.6%,-50%) rotate(-45deg)}.ct--shown{opacity:1;-webkit-transform:none;transform:none}`}]).default})})(bf);var VC=bf.exports;const HC=gs(VC);let un=null;function Xl(){un||(un=new HC)}function jC(n,e,t){Xl(),un==null||un.show(n,e,t)}function vs(n=!1){Xl(),un==null||un.hide(n)}function ws(n,e,t){Xl(),un==null||un.onHover(n,e,t)}function YC(){un==null||un.destroy(),un=null}class UC extends ze{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t})}get methods(){return{show:(e,t,r)=>this.show(e,t,r),hide:()=>this.hide(),onHover:(e,t,r)=>this.onHover(e,t,r)}}show(e,t,r){jC(e,t,r)}hide(){vs()}onHover(e,t,r){ws(e,t,r)}}class WC extends ze{get methods(){return{nodes:this.editorNodes}}get editorNodes(){return{wrapper:this.Editor.UI.nodes.wrapper,redactor:this.Editor.UI.nodes.redactor}}}function kf(n,e){const t={};return Object.entries(n).forEach(([r,a])=>{if(_t(a)){const s=e?`${e}.${r}`:r;Object.values(a).every(i=>Rn(i))?t[r]=s:t[r]=kf(a,s);return}t[r]=a}),t}const Wt=kf(af);function qC(n,e){const t={};return Object.keys(n).forEach(r=>{const a=e[r];a!==void 0?t[a]=n[r]:t[r]=n[r]}),t}const vf=class ma{constructor(e,t){this.cursor=-1,this.items=[],this.items=e||[],this.focusedCssClass=t}get currentItem(){return this.cursor===-1?null:this.items[this.cursor]}setCursor(e){e<this.items.length&&e>=-1&&(this.dropCursor(),this.cursor=e,this.items[this.cursor].classList.add(this.focusedCssClass))}setItems(e){this.items=e}next(){this.cursor=this.leafNodesAndReturnIndex(ma.directions.RIGHT)}previous(){this.cursor=this.leafNodesAndReturnIndex(ma.directions.LEFT)}dropCursor(){this.cursor!==-1&&(this.items[this.cursor].classList.remove(this.focusedCssClass),this.cursor=-1)}leafNodesAndReturnIndex(e){if(this.items.length===0)return this.cursor;let t=this.cursor;return t===-1?t=e===ma.directions.RIGHT?-1:0:this.items[t].classList.remove(this.focusedCssClass),e===ma.directions.RIGHT?t=(t+1)%this.items.length:t=(this.items.length+t-1)%this.items.length,Q.canSetCaret(this.items[t])&&ys(()=>Se.setCursor(this.items[t]),50)(),this.items[t].classList.add(this.focusedCssClass),t}};vf.directions={RIGHT:"right",LEFT:"left"};let oa=vf,_s=class Xd{constructor(e){this.iterator=null,this.activated=!1,this.flipCallbacks=[],this.onKeyDown=t=>{if(!(!this.isEventReadyForHandling(t)||t.shiftKey===!0))switch(Xd.usedKeys.includes(t.keyCode)&&t.preventDefault(),t.keyCode){case Me.TAB:this.handleTabPress(t);break;case Me.LEFT:case Me.UP:this.flipLeft();break;case Me.RIGHT:case Me.DOWN:this.flipRight();break;case Me.ENTER:this.handleEnterPress(t);break}},this.iterator=new oa(e.items,e.focusedItemClass),this.activateCallback=e.activateCallback,this.allowedKeys=e.allowedKeys||Xd.usedKeys}get isActivated(){return this.activated}static get usedKeys(){return[Me.TAB,Me.LEFT,Me.RIGHT,Me.ENTER,Me.UP,Me.DOWN]}activate(e,t){this.activated=!0,e&&this.iterator.setItems(e),t!==void 0&&this.iterator.setCursor(t),document.addEventListener("keydown",this.onKeyDown,!0)}deactivate(){this.activated=!1,this.dropCursor(),document.removeEventListener("keydown",this.onKeyDown)}focusFirst(){this.dropCursor(),this.flipRight()}flipLeft(){this.iterator.previous(),this.flipCallback()}flipRight(){this.iterator.next(),this.flipCallback()}hasFocus(){return!!this.iterator.currentItem}onFlip(e){this.flipCallbacks.push(e)}removeOnFlip(e){this.flipCallbacks=this.flipCallbacks.filter(t=>t!==e)}dropCursor(){this.iterator.dropCursor()}isEventReadyForHandling(e){return this.activated&&this.allowedKeys.includes(e.keyCode)}handleTabPress(e){switch(e.shiftKey?oa.directions.LEFT:oa.directions.RIGHT){case oa.directions.RIGHT:this.flipRight();break;case oa.directions.LEFT:this.flipLeft();break}}handleEnterPress(e){this.activated&&(this.iterator.currentItem&&(e.stopPropagation(),e.preventDefault(),this.iterator.currentItem.click()),tt(this.activateCallback)&&this.activateCallback(this.iterator.currentItem))}flipCallback(){this.iterator.currentItem&&this.iterator.currentItem.scrollIntoViewIfNeeded(),this.flipCallbacks.forEach(e=>e())}};const GC='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M9 12L9 7.1C9 7.04477 9.04477 7 9.1 7H10.4C11.5 7 14 7.1 14 9.5C14 9.5 14 12 11 12M9 12V16.8C9 16.9105 9.08954 17 9.2 17H12.5C14 17 15 16 15 14.5C15 11.7046 11 12 11 12M9 12H11"/></svg>',KC='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7 10L11.8586 14.8586C11.9367 14.9367 12.0633 14.9367 12.1414 14.8586L17 10"/></svg>',XC='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M14.5 17.5L9.64142 12.6414C9.56331 12.5633 9.56331 12.4367 9.64142 12.3586L14.5 7.5"/></svg>',QC='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M9.58284 17.5L14.4414 12.6414C14.5195 12.5633 14.5195 12.4367 14.4414 12.3586L9.58284 7.5"/></svg>',ZC='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7 15L11.8586 10.1414C11.9367 10.0633 12.0633 10.0633 12.1414 10.1414L17 15"/></svg>',JC='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M8 8L12 12M12 12L16 16M12 12L16 8M12 12L8 16"/></svg>',e2='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4" stroke="currentColor" stroke-width="2"/></svg>',t2='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M13.34 10C12.4223 12.7337 11 17 11 17"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M14.21 7H14.2"/></svg>',wf='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7.69998 12.6L7.67896 12.62C6.53993 13.7048 6.52012 15.5155 7.63516 16.625V16.625C8.72293 17.7073 10.4799 17.7102 11.5712 16.6314L13.0263 15.193C14.0703 14.1609 14.2141 12.525 13.3662 11.3266L13.22 11.12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16.22 11.12L16.3564 10.9805C17.2895 10.0265 17.3478 8.5207 16.4914 7.49733V7.49733C15.5691 6.39509 13.9269 6.25143 12.8271 7.17675L11.3901 8.38588C10.0935 9.47674 9.95706 11.4241 11.0888 12.6852L11.12 12.72"/></svg>',n2='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M9.40999 7.29999H9.4"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M14.6 7.29999H14.59"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M9.30999 12H9.3"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M14.6 12H14.59"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M9.40999 16.7H9.4"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M14.6 16.7H14.59"/></svg>',o2='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M12 7V12M12 17V12M17 12H12M12 12H7"/></svg>',_f='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M11.5 17.5L5 11M5 11V15.5M5 11H9.5"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M12.5 6.5L19 13M19 13V8.5M19 13H14.5"/></svg>',r2='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><circle cx="10.5" cy="10.5" r="5.5" stroke="currentColor" stroke-width="2"/><line x1="15.4142" x2="19" y1="15" y2="18.5858" stroke="currentColor" stroke-linecap="round" stroke-width="2"/></svg>',a2='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M15.7795 11.5C15.7795 11.5 16.053 11.1962 16.5497 10.6722C17.4442 9.72856 17.4701 8.2475 16.5781 7.30145V7.30145C15.6482 6.31522 14.0873 6.29227 13.1288 7.25073L11.8796 8.49999"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M8.24517 12.3883C8.24517 12.3883 7.97171 12.6922 7.47504 13.2161C6.58051 14.1598 6.55467 15.6408 7.44666 16.5869V16.5869C8.37653 17.5731 9.93744 17.5961 10.8959 16.6376L12.1452 15.3883"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M17.7802 15.1032L16.597 14.9422C16.0109 14.8624 15.4841 15.3059 15.4627 15.8969L15.4199 17.0818"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6.39064 9.03238L7.58432 9.06668C8.17551 9.08366 8.6522 8.58665 8.61056 7.99669L8.5271 6.81397"/><line x1="12.1142" x2="11.7" y1="12.2" y2="11.7858" stroke="currentColor" stroke-linecap="round" stroke-width="2"/></svg>',s2='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><rect width="14" height="14" x="5" y="5" stroke="currentColor" stroke-width="2" rx="4"/><line x1="12" x2="12" y1="9" y2="12" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M12 15.02V15.01"/></svg>',i2="__",l2="--";function uo(n){return(e,t)=>[[n,e].filter(r=>!!r).join(i2),t].filter(r=>!!r).join(l2)}const ra=uo("ce-hint"),aa={root:ra(),alignedStart:ra(null,"align-left"),alignedCenter:ra(null,"align-center"),title:ra("title"),description:ra("description")};class c2{constructor(e){this.nodes={root:Q.make("div",[aa.root,e.alignment==="center"?aa.alignedCenter:aa.alignedStart]),title:Q.make("div",aa.title,{textContent:e.title})},this.nodes.root.appendChild(this.nodes.title),e.description!==void 0&&(this.nodes.description=Q.make("div",aa.description,{textContent:e.description}),this.nodes.root.appendChild(this.nodes.description))}getElement(){return this.nodes.root}}let Ql=class{constructor(e){this.params=e}get name(){if(this.params!==void 0&&"name"in this.params)return this.params.name}destroy(){vs()}onChildrenOpen(){var e;this.params!==void 0&&"children"in this.params&&typeof((e=this.params.children)==null?void 0:e.onOpen)=="function"&&this.params.children.onOpen()}onChildrenClose(){var e;this.params!==void 0&&"children"in this.params&&typeof((e=this.params.children)==null?void 0:e.onClose)=="function"&&this.params.children.onClose()}handleClick(){var e,t;this.params!==void 0&&"onActivate"in this.params&&((t=(e=this.params).onActivate)==null||t.call(e,this.params))}addHint(e,t){const r=new c2(t);ws(e,r.getElement(),{placement:t.position,hidingDelay:100})}get children(){var e;return this.params!==void 0&&"children"in this.params&&((e=this.params.children)==null?void 0:e.items)!==void 0?this.params.children.items:[]}get hasChildren(){return this.children.length>0}get isChildrenOpen(){var e;return this.params!==void 0&&"children"in this.params&&((e=this.params.children)==null?void 0:e.isOpen)===!0}get isChildrenFlippable(){var e;return!(this.params===void 0||!("children"in this.params)||((e=this.params.children)==null?void 0:e.isFlippable)===!1)}get isChildrenSearchable(){var e;return this.params!==void 0&&"children"in this.params&&((e=this.params.children)==null?void 0:e.searchable)===!0}get closeOnActivate(){return this.params!==void 0&&"closeOnActivate"in this.params&&this.params.closeOnActivate}get isActive(){return this.params===void 0||!("isActive"in this.params)?!1:typeof this.params.isActive=="function"?this.params.isActive():this.params.isActive===!0}};const qt=uo("ce-popover-item"),it={container:qt(),active:qt(null,"active"),disabled:qt(null,"disabled"),focused:qt(null,"focused"),hidden:qt(null,"hidden"),confirmationState:qt(null,"confirmation"),noHover:qt(null,"no-hover"),noFocus:qt(null,"no-focus"),title:qt("title"),secondaryTitle:qt("secondary-title"),icon:qt("icon"),iconTool:qt("icon","tool"),iconChevronRight:qt("icon","chevron-right"),wobbleAnimation:uo("wobble")()};let Io=class extends Ql{constructor(e,t){super(e),this.params=e,this.nodes={root:null,icon:null},this.confirmationState=null,this.removeSpecialFocusBehavior=()=>{var r;(r=this.nodes.root)==null||r.classList.remove(it.noFocus)},this.removeSpecialHoverBehavior=()=>{var r;(r=this.nodes.root)==null||r.classList.remove(it.noHover)},this.onErrorAnimationEnd=()=>{var r,a;(r=this.nodes.icon)==null||r.classList.remove(it.wobbleAnimation),(a=this.nodes.icon)==null||a.removeEventListener("animationend",this.onErrorAnimationEnd)},this.nodes.root=this.make(e,t)}get isDisabled(){return this.params.isDisabled===!0}get toggle(){return this.params.toggle}get title(){return this.params.title}get isConfirmationStateEnabled(){return this.confirmationState!==null}get isFocused(){return this.nodes.root===null?!1:this.nodes.root.classList.contains(it.focused)}getElement(){return this.nodes.root}handleClick(){if(this.isConfirmationStateEnabled&&this.confirmationState!==null){this.activateOrEnableConfirmationMode(this.confirmationState);return}this.activateOrEnableConfirmationMode(this.params)}toggleActive(e){var t;(t=this.nodes.root)==null||t.classList.toggle(it.active,e)}toggleHidden(e){var t;(t=this.nodes.root)==null||t.classList.toggle(it.hidden,e)}reset(){this.isConfirmationStateEnabled&&this.disableConfirmationMode()}onFocus(){this.disableSpecialHoverAndFocusBehavior()}make(e,t){var r,a;const s=(t==null?void 0:t.wrapperTag)||"div",i=Q.make(s,it.container,{type:s==="button"?"button":void 0});return e.name&&(i.dataset.itemName=e.name),this.nodes.icon=Q.make("div",[it.icon,it.iconTool],{innerHTML:e.icon||e2}),i.appendChild(this.nodes.icon),e.title!==void 0&&i.appendChild(Q.make("div",it.title,{innerHTML:e.title||""})),e.secondaryLabel&&i.appendChild(Q.make("div",it.secondaryTitle,{textContent:e.secondaryLabel})),this.hasChildren&&i.appendChild(Q.make("div",[it.icon,it.iconChevronRight],{innerHTML:QC})),this.isActive&&i.classList.add(it.active),e.isDisabled&&i.classList.add(it.disabled),e.hint!==void 0&&((r=t==null?void 0:t.hint)==null?void 0:r.enabled)!==!1&&this.addHint(i,{...e.hint,position:((a=t==null?void 0:t.hint)==null?void 0:a.position)||"right"}),i}enableConfirmationMode(e){if(this.nodes.root===null)return;const t={...this.params,...e,confirmation:"confirmation"in e?e.confirmation:void 0},r=this.make(t);this.nodes.root.innerHTML=r.innerHTML,this.nodes.root.classList.add(it.confirmationState),this.confirmationState=e,this.enableSpecialHoverAndFocusBehavior()}disableConfirmationMode(){if(this.nodes.root===null)return;const e=this.make(this.params);this.nodes.root.innerHTML=e.innerHTML,this.nodes.root.classList.remove(it.confirmationState),this.confirmationState=null,this.disableSpecialHoverAndFocusBehavior()}enableSpecialHoverAndFocusBehavior(){var e,t,r;(e=this.nodes.root)==null||e.classList.add(it.noHover),(t=this.nodes.root)==null||t.classList.add(it.noFocus),(r=this.nodes.root)==null||r.addEventListener("mouseleave",this.removeSpecialHoverBehavior,{once:!0})}disableSpecialHoverAndFocusBehavior(){var e;this.removeSpecialFocusBehavior(),this.removeSpecialHoverBehavior(),(e=this.nodes.root)==null||e.removeEventListener("mouseleave",this.removeSpecialHoverBehavior)}activateOrEnableConfirmationMode(e){var t;if(!("confirmation"in e)||e.confirmation===void 0)try{(t=e.onActivate)==null||t.call(e,e),this.disableConfirmationMode()}catch{this.animateError()}else this.enableConfirmationMode(e.confirmation)}animateError(){var e,t,r;(e=this.nodes.icon)!=null&&e.classList.contains(it.wobbleAnimation)||((t=this.nodes.icon)==null||t.classList.add(it.wobbleAnimation),(r=this.nodes.icon)==null||r.addEventListener("animationend",this.onErrorAnimationEnd))}};const Zl=uo("ce-popover-item-separator"),Jl={container:Zl(),line:Zl("line"),hidden:Zl(null,"hidden")};class Cf extends Ql{constructor(){super(),this.nodes={root:Q.make("div",Jl.container),line:Q.make("div",Jl.line)},this.nodes.root.appendChild(this.nodes.line)}getElement(){return this.nodes.root}toggleHidden(e){var t;(t=this.nodes.root)==null||t.classList.toggle(Jl.hidden,e)}}var Cn=(n=>(n.Closed="closed",n.ClosedOnActivate="closed-on-activate",n))(Cn||{});const It=uo("ce-popover"),ht={popover:It(),popoverContainer:It("container"),popoverOpenTop:It(null,"open-top"),popoverOpenLeft:It(null,"open-left"),popoverOpened:It(null,"opened"),search:It("search"),nothingFoundMessage:It("nothing-found-message"),nothingFoundMessageDisplayed:It("nothing-found-message","displayed"),items:It("items"),overlay:It("overlay"),overlayHidden:It("overlay","hidden"),popoverNested:It(null,"nested"),getPopoverNestedClass:n=>It(null,`nested-level-${n.toString()}`),popoverInline:It(null,"inline"),popoverHeader:It("header")};var mr=(n=>(n.NestingLevel="--nesting-level",n.PopoverHeight="--popover-height",n.InlinePopoverWidth="--inline-popover-width",n.TriggerItemLeft="--trigger-item-left",n.TriggerItemTop="--trigger-item-top",n))(mr||{});const Ef=uo("ce-popover-item-html"),Sf={root:Ef(),hidden:Ef(null,"hidden")};let sa=class extends Ql{constructor(e,t){var r,a;super(e),this.nodes={root:Q.make("div",Sf.root)},this.nodes.root.appendChild(e.element),e.name&&(this.nodes.root.dataset.itemName=e.name),e.hint!==void 0&&((r=t==null?void 0:t.hint)==null?void 0:r.enabled)!==!1&&this.addHint(this.nodes.root,{...e.hint,position:((a=t==null?void 0:t.hint)==null?void 0:a.position)||"right"})}getElement(){return this.nodes.root}toggleHidden(e){var t;(t=this.nodes.root)==null||t.classList.toggle(Sf.hidden,e)}getControls(){const e=this.nodes.root.querySelectorAll(`button, ${Q.allInputsSelector}`);return Array.from(e)}};class xf extends ea{constructor(e,t={}){super(),this.params=e,this.itemsRenderParams=t,this.listeners=new ta,this.messages={nothingFound:"Nothing found",search:"Search"},this.items=this.buildItems(e.items),e.messages&&(this.messages={...this.messages,...e.messages}),this.nodes={},this.nodes.popoverContainer=Q.make("div",[ht.popoverContainer]),this.nodes.nothingFoundMessage=Q.make("div",[ht.nothingFoundMessage],{textContent:this.messages.nothingFound}),this.nodes.popoverContainer.appendChild(this.nodes.nothingFoundMessage),this.nodes.items=Q.make("div",[ht.items]),this.items.forEach(r=>{const a=r.getElement();a!==null&&this.nodes.items.appendChild(a)}),this.nodes.popoverContainer.appendChild(this.nodes.items),this.listeners.on(this.nodes.popoverContainer,"click",r=>this.handleClick(r)),this.nodes.popover=Q.make("div",[ht.popover,this.params.class]),this.nodes.popover.appendChild(this.nodes.popoverContainer)}get itemsDefault(){return this.items.filter(e=>e instanceof Io)}getElement(){return this.nodes.popover}show(){this.nodes.popover.classList.add(ht.popoverOpened),this.search!==void 0&&this.search.focus()}hide(){this.nodes.popover.classList.remove(ht.popoverOpened),this.nodes.popover.classList.remove(ht.popoverOpenTop),this.itemsDefault.forEach(e=>e.reset()),this.search!==void 0&&this.search.clear(),this.emit(Cn.Closed)}destroy(){var e;this.items.forEach(t=>t.destroy()),this.nodes.popover.remove(),this.listeners.removeAll(),(e=this.search)==null||e.destroy()}activateItemByName(e){const t=this.items.find(r=>r.name===e);this.handleItemClick(t)}buildItems(e){return e.map(t=>{switch(t.type){case Je.Separator:return new Cf;case Je.Html:return new sa(t,this.itemsRenderParams[Je.Html]);default:return new Io(t,this.itemsRenderParams[Je.Default])}})}getTargetItem(e){return this.items.filter(t=>t instanceof Io||t instanceof sa).find(t=>{const r=t.getElement();return r===null?!1:e.composedPath().includes(r)})}handleItemClick(e){if(!("isDisabled"in e&&e.isDisabled)){if(e.hasChildren){this.showNestedItems(e),"handleClick"in e&&typeof e.handleClick=="function"&&e.handleClick();return}this.itemsDefault.filter(t=>t!==e).forEach(t=>t.reset()),"handleClick"in e&&typeof e.handleClick=="function"&&e.handleClick(),this.toggleItemActivenessIfNeeded(e),e.closeOnActivate&&(this.hide(),this.emit(Cn.ClosedOnActivate))}}handleClick(e){const t=this.getTargetItem(e);t!==void 0&&this.handleItemClick(t)}toggleItemActivenessIfNeeded(e){if(e instanceof Io&&(e.toggle===!0&&e.toggleActive(),typeof e.toggle=="string")){const t=this.itemsDefault.filter(r=>r.toggle===e.toggle);if(t.length===1){e.toggleActive();return}t.forEach(r=>{r.toggleActive(r===e)})}}}var Cs=(n=>(n.Search="search",n))(Cs||{});const ec=uo("cdx-search-field"),tc={wrapper:ec(),icon:ec("icon"),input:ec("input")};class d2 extends ea{constructor({items:e,placeholder:t}){super(),this.listeners=new ta,this.items=e,this.wrapper=Q.make("div",tc.wrapper);const r=Q.make("div",tc.icon,{innerHTML:r2});this.input=Q.make("input",tc.input,{placeholder:t,tabIndex:-1}),this.wrapper.appendChild(r),this.wrapper.appendChild(this.input),this.listeners.on(this.input,"input",()=>{this.searchQuery=this.input.value,this.emit(Cs.Search,{query:this.searchQuery,items:this.foundItems})})}getElement(){return this.wrapper}focus(){this.input.focus()}clear(){this.input.value="",this.searchQuery="",this.emit(Cs.Search,{query:"",items:this.foundItems})}destroy(){this.listeners.removeAll()}get foundItems(){return this.items.filter(e=>this.checkItem(e))}checkItem(e){var t,r;const a=((t=e.title)==null?void 0:t.toLowerCase())||"",s=(r=this.searchQuery)==null?void 0:r.toLowerCase();return s!==void 0?a.includes(s):!1}}var u2=Object.defineProperty,h2=Object.getOwnPropertyDescriptor,p2=(n,e,t,r)=>{for(var a=h2(e,t),s=n.length-1,i;s>=0;s--)(i=n[s])&&(a=i(e,t,a)||a);return a&&u2(e,t,a),a};const Bf=class og extends xf{constructor(e,t){super(e,t),this.nestingLevel=0,this.nestedPopoverTriggerItem=null,this.previouslyHoveredItem=null,this.scopeElement=document.body,this.hide=()=>{var r;super.hide(),this.destroyNestedPopoverIfExists(),(r=this.flipper)==null||r.deactivate(),this.previouslyHoveredItem=null},this.onFlip=()=>{const r=this.itemsDefault.find(a=>a.isFocused);r==null||r.onFocus()},this.onSearch=r=>{var a;const s=r.query==="",i=r.items.length===0;this.items.forEach(c=>{let d=!1;c instanceof Io?d=!r.items.includes(c):(c instanceof Cf||c instanceof sa)&&(d=i||!s),c.toggleHidden(d)}),this.toggleNothingFoundMessage(i);const l=r.query===""?this.flippableElements:r.items.map(c=>c.getElement());(a=this.flipper)!=null&&a.isActivated&&(this.flipper.deactivate(),this.flipper.activate(l))},e.nestingLevel!==void 0&&(this.nestingLevel=e.nestingLevel),this.nestingLevel>0&&this.nodes.popover.classList.add(ht.popoverNested),e.scopeElement!==void 0&&(this.scopeElement=e.scopeElement),this.nodes.popoverContainer!==null&&this.listeners.on(this.nodes.popoverContainer,"mouseover",r=>this.handleHover(r)),e.searchable&&this.addSearch(),e.flippable!==!1&&(this.flipper=new _s({items:this.flippableElements,focusedItemClass:it.focused,allowedKeys:[Me.TAB,Me.UP,Me.DOWN,Me.ENTER]}),this.flipper.onFlip(this.onFlip))}hasFocus(){return this.flipper===void 0?!1:this.flipper.hasFocus()}get scrollTop(){return this.nodes.items===null?0:this.nodes.items.scrollTop}get offsetTop(){return this.nodes.popoverContainer===null?0:this.nodes.popoverContainer.offsetTop}show(){var e;this.nodes.popover.style.setProperty(mr.PopoverHeight,this.size.height+"px"),this.shouldOpenBottom||this.nodes.popover.classList.add(ht.popoverOpenTop),this.shouldOpenRight||this.nodes.popover.classList.add(ht.popoverOpenLeft),super.show(),(e=this.flipper)==null||e.activate(this.flippableElements)}destroy(){this.hide(),super.destroy()}showNestedItems(e){this.nestedPopover!==null&&this.nestedPopover!==void 0||(this.nestedPopoverTriggerItem=e,this.showNestedPopoverForItem(e))}handleHover(e){const t=this.getTargetItem(e);t!==void 0&&this.previouslyHoveredItem!==t&&(this.destroyNestedPopoverIfExists(),this.previouslyHoveredItem=t,t.hasChildren&&this.showNestedPopoverForItem(t))}setTriggerItemPosition(e,t){const r=t.getElement(),a=(r?r.offsetTop:0)-this.scrollTop,s=this.offsetTop+a;e.style.setProperty(mr.TriggerItemTop,s+"px")}destroyNestedPopoverIfExists(){var e,t;this.nestedPopover===void 0||this.nestedPopover===null||(this.nestedPopover.off(Cn.ClosedOnActivate,this.hide),this.nestedPopover.hide(),this.nestedPopover.destroy(),this.nestedPopover.getElement().remove(),this.nestedPopover=null,(e=this.flipper)==null||e.activate(this.flippableElements),(t=this.nestedPopoverTriggerItem)==null||t.onChildrenClose())}showNestedPopoverForItem(e){var t;this.nestedPopover=new og({searchable:e.isChildrenSearchable,items:e.children,nestingLevel:this.nestingLevel+1,flippable:e.isChildrenFlippable,messages:this.messages}),e.onChildrenOpen(),this.nestedPopover.on(Cn.ClosedOnActivate,this.hide);const r=this.nestedPopover.getElement();return this.nodes.popover.appendChild(r),this.setTriggerItemPosition(r,e),r.style.setProperty(mr.NestingLevel,this.nestedPopover.nestingLevel.toString()),this.nestedPopover.show(),(t=this.flipper)==null||t.deactivate(),this.nestedPopover}get shouldOpenBottom(){if(this.nodes.popover===void 0||this.nodes.popover===null)return!1;const e=this.nodes.popoverContainer.getBoundingClientRect(),t=this.scopeElement.getBoundingClientRect(),r=this.size.height,a=e.top+r,s=e.top-r,i=Math.min(window.innerHeight,t.bottom);return s<t.top||a<=i}get shouldOpenRight(){if(this.nodes.popover===void 0||this.nodes.popover===null)return!1;const e=this.nodes.popover.getBoundingClientRect(),t=this.scopeElement.getBoundingClientRect(),r=this.size.width,a=e.right+r,s=e.left-r,i=Math.min(window.innerWidth,t.right);return s<t.left||a<=i}get size(){var e;const t={height:0,width:0};if(this.nodes.popover===null)return t;const r=this.nodes.popover.cloneNode(!0);r.style.visibility="hidden",r.style.position="absolute",r.style.top="-1000px",r.classList.add(ht.popoverOpened),(e=r.querySelector("."+ht.popoverNested))==null||e.remove(),document.body.appendChild(r);const a=r.querySelector("."+ht.popoverContainer);return t.height=a.offsetHeight,t.width=a.offsetWidth,r.remove(),t}get flippableElements(){return this.items.map(e=>{if(e instanceof Io)return e.getElement();if(e instanceof sa)return e.getControls()}).flat().filter(e=>e!=null)}addSearch(){this.search=new d2({items:this.itemsDefault,placeholder:this.messages.search}),this.search.on(Cs.Search,this.onSearch);const e=this.search.getElement();e.classList.add(ht.search),this.nodes.popoverContainer.insertBefore(e,this.nodes.popoverContainer.firstChild)}toggleNothingFoundMessage(e){this.nodes.nothingFoundMessage.classList.toggle(ht.nothingFoundMessageDisplayed,e)}};p2([pr],Bf.prototype,"size");let nc=Bf;class f2 extends nc{constructor(e){const t=!fr();super({...e,class:ht.popoverInline},{[Je.Default]:{wrapperTag:"button",hint:{position:"top",alignment:"center",enabled:t}},[Je.Html]:{hint:{position:"top",alignment:"center",enabled:t}}}),this.items.forEach(r=>{!(r instanceof Io)&&!(r instanceof sa)||r.hasChildren&&r.isChildrenOpen&&this.showNestedItems(r)})}get offsetLeft(){return this.nodes.popoverContainer===null?0:this.nodes.popoverContainer.offsetLeft}show(){this.nestingLevel===0&&this.nodes.popover.style.setProperty(mr.InlinePopoverWidth,this.size.width+"px"),super.show()}handleHover(){}setTriggerItemPosition(e,t){const r=t.getElement(),a=r?r.offsetLeft:0,s=this.offsetLeft+a;e.style.setProperty(mr.TriggerItemLeft,s+"px")}showNestedItems(e){if(this.nestedPopoverTriggerItem===e){this.destroyNestedPopoverIfExists(),this.nestedPopoverTriggerItem=null;return}super.showNestedItems(e)}showNestedPopoverForItem(e){const t=super.showNestedPopoverForItem(e);return t.getElement().classList.add(ht.getPopoverNestedClass(t.nestingLevel)),t}handleItemClick(e){var t;e!==this.nestedPopoverTriggerItem&&((t=this.nestedPopoverTriggerItem)==null||t.handleClick(),super.destroyNestedPopoverIfExists()),super.handleItemClick(e)}}const Tf=class ga{constructor(){this.scrollPosition=null}lock(){Ul?this.lockHard():document.body.classList.add(ga.CSS.scrollLocked)}unlock(){Ul?this.unlockHard():document.body.classList.remove(ga.CSS.scrollLocked)}lockHard(){this.scrollPosition=window.pageYOffset,document.documentElement.style.setProperty("--window-scroll-offset",`${this.scrollPosition}px`),document.body.classList.add(ga.CSS.scrollLockedHard)}unlockHard(){document.body.classList.remove(ga.CSS.scrollLockedHard),this.scrollPosition!==null&&window.scrollTo(0,this.scrollPosition),this.scrollPosition=null}};Tf.CSS={scrollLocked:"ce-scroll-locked",scrollLockedHard:"ce-scroll-locked--hard"};let m2=Tf;const oc=uo("ce-popover-header"),rc={root:oc(),text:oc("text"),backButton:oc("back-button")};class g2{constructor({text:e,onBackButtonClick:t}){this.listeners=new ta,this.text=e,this.onBackButtonClick=t,this.nodes={root:Q.make("div",[rc.root]),backButton:Q.make("button",[rc.backButton]),text:Q.make("div",[rc.text])},this.nodes.backButton.innerHTML=XC,this.nodes.root.appendChild(this.nodes.backButton),this.listeners.on(this.nodes.backButton,"click",this.onBackButtonClick),this.nodes.text.innerText=this.text,this.nodes.root.appendChild(this.nodes.text)}getElement(){return this.nodes.root}destroy(){this.nodes.root.remove(),this.listeners.destroy()}}class y2{constructor(){this.history=[]}push(e){this.history.push(e)}pop(){return this.history.pop()}get currentTitle(){return this.history.length===0?"":this.history[this.history.length-1].title}get currentItems(){return this.history.length===0?[]:this.history[this.history.length-1].items}reset(){for(;this.history.length>1;)this.pop()}}let $f=class extends xf{constructor(e){super(e,{[Je.Default]:{hint:{enabled:!1}},[Je.Html]:{hint:{enabled:!1}}}),this.scrollLocker=new m2,this.history=new y2,this.isHidden=!0,this.nodes.overlay=Q.make("div",[ht.overlay,ht.overlayHidden]),this.nodes.popover.insertBefore(this.nodes.overlay,this.nodes.popover.firstChild),this.listeners.on(this.nodes.overlay,"click",()=>{this.hide()}),this.history.push({items:e.items})}show(){this.nodes.overlay.classList.remove(ht.overlayHidden),super.show(),this.scrollLocker.lock(),this.isHidden=!1}hide(){this.isHidden||(super.hide(),this.nodes.overlay.classList.add(ht.overlayHidden),this.scrollLocker.unlock(),this.history.reset(),this.isHidden=!0)}destroy(){super.destroy(),this.scrollLocker.unlock()}showNestedItems(e){this.updateItemsAndHeader(e.children,e.title),this.history.push({title:e.title,items:e.children})}updateItemsAndHeader(e,t){if(this.header!==null&&this.header!==void 0&&(this.header.destroy(),this.header=null),t!==void 0){this.header=new g2({text:t,onBackButtonClick:()=>{this.history.pop(),this.updateItemsAndHeader(this.history.currentItems,this.history.currentTitle)}});const r=this.header.getElement();r!==null&&this.nodes.popoverContainer.insertBefore(r,this.nodes.popoverContainer.firstChild)}this.items.forEach(r=>{var a;return(a=r.getElement())==null?void 0:a.remove()}),this.items=this.buildItems(e),this.items.forEach(r=>{var a;const s=r.getElement();s!==null&&((a=this.nodes.items)==null||a.appendChild(s))})}};class b2 extends ze{constructor(){super(...arguments),this.opened=!1,this.selection=new Se,this.popover=null,this.close=()=>{this.opened&&(this.opened=!1,Se.isAtEditor||this.selection.restore(),this.selection.clearSaved(),!this.Editor.CrossBlockSelection.isCrossBlockSelectionStarted&&this.Editor.BlockManager.currentBlock&&this.Editor.BlockSelection.unselectBlock(this.Editor.BlockManager.currentBlock),this.eventsDispatcher.emit(this.events.closed),this.popover&&(this.popover.off(Cn.Closed,this.onPopoverClose),this.popover.destroy(),this.popover.getElement().remove(),this.popover=null))},this.onPopoverClose=()=>{this.close()}}get events(){return{opened:"block-settings-opened",closed:"block-settings-closed"}}get CSS(){return{settings:"ce-settings"}}get flipper(){var e;if(this.popover!==null)return"flipper"in this.popover?(e=this.popover)==null?void 0:e.flipper:void 0}make(){this.nodes.wrapper=Q.make("div",[this.CSS.settings]),this.eventsDispatcher.on(na,this.close)}destroy(){this.removeAllNodes(),this.listeners.destroy(),this.eventsDispatcher.off(na,this.close)}async open(e=this.Editor.BlockManager.currentBlock){var t;this.opened=!0,this.selection.save(),this.Editor.BlockSelection.selectBlock(e),this.Editor.BlockSelection.clearCache();const{toolTunes:r,commonTunes:a}=e.getTunes();this.eventsDispatcher.emit(this.events.opened);const s=fr()?$f:nc;this.popover=new s({searchable:!0,items:await this.getTunesItems(e,a,r),scopeElement:this.Editor.API.methods.ui.nodes.redactor,messages:{nothingFound:At.ui(Wt.ui.popover,"Nothing found"),search:At.ui(Wt.ui.popover,"Filter")}}),this.popover.on(Cn.Closed,this.onPopoverClose),(t=this.nodes.wrapper)==null||t.append(this.popover.getElement()),this.popover.show()}getElement(){return this.nodes.wrapper}async getTunesItems(e,t,r){const a=[];r!==void 0&&r.length>0&&(a.push(...r),a.push({type:Je.Separator}));const s=Array.from(this.Editor.Tools.blockTools.values()),i=(await pf(e,s)).reduce((l,c)=>(c.toolbox.forEach(d=>{l.push({icon:d.icon,title:At.t(Wt.toolNames,d.title),name:c.name,closeOnActivate:!0,onActivate:async()=>{const{BlockManager:u,Caret:h,Toolbar:p}=this.Editor,m=await u.convert(e,c.name,d.data);p.close(),h.setToBlock(m,h.positions.END)}})}),l),[]);return i.length>0&&(a.push({icon:_f,name:"convert-to",title:At.ui(Wt.ui.popover,"Convert to"),children:{searchable:!0,items:i}}),a.push({type:Je.Separator})),a.push(...t),a.map(l=>this.resolveTuneAliases(l))}resolveTuneAliases(e){if(e.type===Je.Separator||e.type===Je.Html)return e;const t=qC(e,{label:"title"});return e.confirmation&&(t.confirmation=this.resolveTuneAliases(e.confirmation)),t}}var Mf={exports:{}};/*!
|
|
47
|
+
*/(function(n,e){(function(t,r){n.exports=r()})(window,function(){return function(t){var r={};function a(s){if(r[s])return r[s].exports;var i=r[s]={i:s,l:!1,exports:{}};return t[s].call(i.exports,i,i.exports,a),i.l=!0,i.exports}return a.m=t,a.c=r,a.d=function(s,i,l){a.o(s,i)||Object.defineProperty(s,i,{enumerable:!0,get:l})},a.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},a.t=function(s,i){if(1&i&&(s=a(s)),8&i||4&i&&typeof s=="object"&&s&&s.__esModule)return s;var l=Object.create(null);if(a.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:s}),2&i&&typeof s!="string")for(var c in s)a.d(l,c,(function(d){return s[d]}).bind(null,c));return l},a.n=function(s){var i=s&&s.__esModule?function(){return s.default}:function(){return s};return a.d(i,"a",i),i},a.o=function(s,i){return Object.prototype.hasOwnProperty.call(s,i)},a.p="",a(a.s=0)}([function(t,r,a){t.exports=a(1)},function(t,r,a){a.r(r),a.d(r,"default",function(){return s});class s{constructor(){this.nodes={wrapper:null,content:null},this.showed=!1,this.offsetTop=10,this.offsetLeft=10,this.offsetRight=10,this.hidingDelay=0,this.handleWindowScroll=()=>{this.showed&&this.hide(!0)},this.loadStyles(),this.prepare(),window.addEventListener("scroll",this.handleWindowScroll,{passive:!0})}get CSS(){return{tooltip:"ct",tooltipContent:"ct__content",tooltipShown:"ct--shown",placement:{left:"ct--left",bottom:"ct--bottom",right:"ct--right",top:"ct--top"}}}show(l,c,d){this.nodes.wrapper||this.prepare(),this.hidingTimeout&&clearTimeout(this.hidingTimeout);const u=Object.assign({placement:"bottom",marginTop:0,marginLeft:0,marginRight:0,marginBottom:0,delay:70,hidingDelay:0},d);if(u.hidingDelay&&(this.hidingDelay=u.hidingDelay),this.nodes.content.innerHTML="",typeof c=="string")this.nodes.content.appendChild(document.createTextNode(c));else{if(!(c instanceof Node))throw Error("[CodeX Tooltip] Wrong type of «content» passed. It should be an instance of Node or String. But "+typeof c+" given.");this.nodes.content.appendChild(c)}switch(this.nodes.wrapper.classList.remove(...Object.values(this.CSS.placement)),u.placement){case"top":this.placeTop(l,u);break;case"left":this.placeLeft(l,u);break;case"right":this.placeRight(l,u);break;case"bottom":default:this.placeBottom(l,u)}u&&u.delay?this.showingTimeout=setTimeout(()=>{this.nodes.wrapper.classList.add(this.CSS.tooltipShown),this.showed=!0},u.delay):(this.nodes.wrapper.classList.add(this.CSS.tooltipShown),this.showed=!0)}hide(l=!1){if(this.hidingDelay&&!l)return this.hidingTimeout&&clearTimeout(this.hidingTimeout),void(this.hidingTimeout=setTimeout(()=>{this.hide(!0)},this.hidingDelay));this.nodes.wrapper.classList.remove(this.CSS.tooltipShown),this.showed=!1,this.showingTimeout&&clearTimeout(this.showingTimeout)}onHover(l,c,d){l.addEventListener("mouseenter",()=>{this.show(l,c,d)}),l.addEventListener("mouseleave",()=>{this.hide()})}destroy(){this.nodes.wrapper.remove(),window.removeEventListener("scroll",this.handleWindowScroll)}prepare(){this.nodes.wrapper=this.make("div",this.CSS.tooltip),this.nodes.content=this.make("div",this.CSS.tooltipContent),this.append(this.nodes.wrapper,this.nodes.content),this.append(document.body,this.nodes.wrapper)}loadStyles(){const l="codex-tooltips-style";if(document.getElementById(l))return;const c=a(2),d=this.make("style",null,{textContent:c.toString(),id:l});this.prepend(document.head,d)}placeBottom(l,c){const d=l.getBoundingClientRect(),u=d.left+l.clientWidth/2-this.nodes.wrapper.offsetWidth/2,h=d.bottom+window.pageYOffset+this.offsetTop+c.marginTop;this.applyPlacement("bottom",u,h)}placeTop(l,c){const d=l.getBoundingClientRect(),u=d.left+l.clientWidth/2-this.nodes.wrapper.offsetWidth/2,h=d.top+window.pageYOffset-this.nodes.wrapper.clientHeight-this.offsetTop;this.applyPlacement("top",u,h)}placeLeft(l,c){const d=l.getBoundingClientRect(),u=d.left-this.nodes.wrapper.offsetWidth-this.offsetLeft-c.marginLeft,h=d.top+window.pageYOffset+l.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement("left",u,h)}placeRight(l,c){const d=l.getBoundingClientRect(),u=d.right+this.offsetRight+c.marginRight,h=d.top+window.pageYOffset+l.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement("right",u,h)}applyPlacement(l,c,d){this.nodes.wrapper.classList.add(this.CSS.placement[l]),this.nodes.wrapper.style.left=c+"px",this.nodes.wrapper.style.top=d+"px"}make(l,c=null,d={}){const u=document.createElement(l);Array.isArray(c)?u.classList.add(...c):c&&u.classList.add(c);for(const h in d)d.hasOwnProperty(h)&&(u[h]=d[h]);return u}append(l,c){Array.isArray(c)?c.forEach(d=>l.appendChild(d)):l.appendChild(c)}prepend(l,c){Array.isArray(c)?(c=c.reverse()).forEach(d=>l.prepend(d)):l.prepend(c)}}},function(t,r){t.exports=`.ct{z-index:999;opacity:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;-webkit-transition:opacity 50ms ease-in,-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,transform 70ms cubic-bezier(.215,.61,.355,1),-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);will-change:opacity,top,left;-webkit-box-shadow:0 8px 12px 0 rgba(29,32,43,.17),0 4px 5px -3px rgba(5,6,12,.49);box-shadow:0 8px 12px 0 rgba(29,32,43,.17),0 4px 5px -3px rgba(5,6,12,.49);border-radius:9px}.ct,.ct:before{position:absolute;top:0;left:0}.ct:before{content:"";bottom:0;right:0;background-color:#1d202b;z-index:-1;border-radius:4px}@supports(-webkit-mask-box-image:url("")){.ct:before{border-radius:0;-webkit-mask-box-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M10.71 0h2.58c3.02 0 4.64.42 6.1 1.2a8.18 8.18 0 013.4 3.4C23.6 6.07 24 7.7 24 10.71v2.58c0 3.02-.42 4.64-1.2 6.1a8.18 8.18 0 01-3.4 3.4c-1.47.8-3.1 1.21-6.11 1.21H10.7c-3.02 0-4.64-.42-6.1-1.2a8.18 8.18 0 01-3.4-3.4C.4 17.93 0 16.3 0 13.29V10.7c0-3.02.42-4.64 1.2-6.1a8.18 8.18 0 013.4-3.4C6.07.4 7.7 0 10.71 0z"/></svg>') 48% 41% 37.9% 53.3%}}@media (--mobile){.ct{display:none}}.ct__content{padding:6px 10px;color:#cdd1e0;font-size:12px;text-align:center;letter-spacing:.02em;line-height:1em}.ct:after{content:"";width:8px;height:8px;position:absolute;background-color:#1d202b;z-index:-1}.ct--bottom{-webkit-transform:translateY(5px);transform:translateY(5px)}.ct--bottom:after{top:-3px;left:50%;-webkit-transform:translateX(-50%) rotate(-45deg);transform:translateX(-50%) rotate(-45deg)}.ct--top{-webkit-transform:translateY(-5px);transform:translateY(-5px)}.ct--top:after{top:auto;bottom:-3px;left:50%;-webkit-transform:translateX(-50%) rotate(-45deg);transform:translateX(-50%) rotate(-45deg)}.ct--left{-webkit-transform:translateX(-5px);transform:translateX(-5px)}.ct--left:after{top:50%;left:auto;right:0;-webkit-transform:translate(41.6%,-50%) rotate(-45deg);transform:translate(41.6%,-50%) rotate(-45deg)}.ct--right{-webkit-transform:translateX(5px);transform:translateX(5px)}.ct--right:after{top:50%;left:0;-webkit-transform:translate(-41.6%,-50%) rotate(-45deg);transform:translate(-41.6%,-50%) rotate(-45deg)}.ct--shown{opacity:1;-webkit-transform:none;transform:none}`}]).default})})(bf);var VC=bf.exports;const HC=gs(VC);let un=null;function Ql(){un||(un=new HC)}function jC(n,e,t){Ql(),un==null||un.show(n,e,t)}function vs(n=!1){Ql(),un==null||un.hide(n)}function ws(n,e,t){Ql(),un==null||un.onHover(n,e,t)}function YC(){un==null||un.destroy(),un=null}class UC extends ze{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t})}get methods(){return{show:(e,t,r)=>this.show(e,t,r),hide:()=>this.hide(),onHover:(e,t,r)=>this.onHover(e,t,r)}}show(e,t,r){jC(e,t,r)}hide(){vs()}onHover(e,t,r){ws(e,t,r)}}class WC extends ze{get methods(){return{nodes:this.editorNodes}}get editorNodes(){return{wrapper:this.Editor.UI.nodes.wrapper,redactor:this.Editor.UI.nodes.redactor}}}function kf(n,e){const t={};return Object.entries(n).forEach(([r,a])=>{if(_t(a)){const s=e?`${e}.${r}`:r;Object.values(a).every(i=>Rn(i))?t[r]=s:t[r]=kf(a,s);return}t[r]=a}),t}const Wt=kf(af);function qC(n,e){const t={};return Object.keys(n).forEach(r=>{const a=e[r];a!==void 0?t[a]=n[r]:t[r]=n[r]}),t}const vf=class ma{constructor(e,t){this.cursor=-1,this.items=[],this.items=e||[],this.focusedCssClass=t}get currentItem(){return this.cursor===-1?null:this.items[this.cursor]}setCursor(e){e<this.items.length&&e>=-1&&(this.dropCursor(),this.cursor=e,this.items[this.cursor].classList.add(this.focusedCssClass))}setItems(e){this.items=e}next(){this.cursor=this.leafNodesAndReturnIndex(ma.directions.RIGHT)}previous(){this.cursor=this.leafNodesAndReturnIndex(ma.directions.LEFT)}dropCursor(){this.cursor!==-1&&(this.items[this.cursor].classList.remove(this.focusedCssClass),this.cursor=-1)}leafNodesAndReturnIndex(e){if(this.items.length===0)return this.cursor;let t=this.cursor;return t===-1?t=e===ma.directions.RIGHT?-1:0:this.items[t].classList.remove(this.focusedCssClass),e===ma.directions.RIGHT?t=(t+1)%this.items.length:t=(this.items.length+t-1)%this.items.length,Q.canSetCaret(this.items[t])&&ys(()=>Se.setCursor(this.items[t]),50)(),this.items[t].classList.add(this.focusedCssClass),t}};vf.directions={RIGHT:"right",LEFT:"left"};let oa=vf,_s=class Qd{constructor(e){this.iterator=null,this.activated=!1,this.flipCallbacks=[],this.onKeyDown=t=>{if(!(!this.isEventReadyForHandling(t)||t.shiftKey===!0))switch(Qd.usedKeys.includes(t.keyCode)&&t.preventDefault(),t.keyCode){case Me.TAB:this.handleTabPress(t);break;case Me.LEFT:case Me.UP:this.flipLeft();break;case Me.RIGHT:case Me.DOWN:this.flipRight();break;case Me.ENTER:this.handleEnterPress(t);break}},this.iterator=new oa(e.items,e.focusedItemClass),this.activateCallback=e.activateCallback,this.allowedKeys=e.allowedKeys||Qd.usedKeys}get isActivated(){return this.activated}static get usedKeys(){return[Me.TAB,Me.LEFT,Me.RIGHT,Me.ENTER,Me.UP,Me.DOWN]}activate(e,t){this.activated=!0,e&&this.iterator.setItems(e),t!==void 0&&this.iterator.setCursor(t),document.addEventListener("keydown",this.onKeyDown,!0)}deactivate(){this.activated=!1,this.dropCursor(),document.removeEventListener("keydown",this.onKeyDown)}focusFirst(){this.dropCursor(),this.flipRight()}flipLeft(){this.iterator.previous(),this.flipCallback()}flipRight(){this.iterator.next(),this.flipCallback()}hasFocus(){return!!this.iterator.currentItem}onFlip(e){this.flipCallbacks.push(e)}removeOnFlip(e){this.flipCallbacks=this.flipCallbacks.filter(t=>t!==e)}dropCursor(){this.iterator.dropCursor()}isEventReadyForHandling(e){return this.activated&&this.allowedKeys.includes(e.keyCode)}handleTabPress(e){switch(e.shiftKey?oa.directions.LEFT:oa.directions.RIGHT){case oa.directions.RIGHT:this.flipRight();break;case oa.directions.LEFT:this.flipLeft();break}}handleEnterPress(e){this.activated&&(this.iterator.currentItem&&(e.stopPropagation(),e.preventDefault(),this.iterator.currentItem.click()),tt(this.activateCallback)&&this.activateCallback(this.iterator.currentItem))}flipCallback(){this.iterator.currentItem&&this.iterator.currentItem.scrollIntoViewIfNeeded(),this.flipCallbacks.forEach(e=>e())}};const GC='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M9 12L9 7.1C9 7.04477 9.04477 7 9.1 7H10.4C11.5 7 14 7.1 14 9.5C14 9.5 14 12 11 12M9 12V16.8C9 16.9105 9.08954 17 9.2 17H12.5C14 17 15 16 15 14.5C15 11.7046 11 12 11 12M9 12H11"/></svg>',KC='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7 10L11.8586 14.8586C11.9367 14.9367 12.0633 14.9367 12.1414 14.8586L17 10"/></svg>',XC='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M14.5 17.5L9.64142 12.6414C9.56331 12.5633 9.56331 12.4367 9.64142 12.3586L14.5 7.5"/></svg>',QC='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M9.58284 17.5L14.4414 12.6414C14.5195 12.5633 14.5195 12.4367 14.4414 12.3586L9.58284 7.5"/></svg>',ZC='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7 15L11.8586 10.1414C11.9367 10.0633 12.0633 10.0633 12.1414 10.1414L17 15"/></svg>',JC='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M8 8L12 12M12 12L16 16M12 12L16 8M12 12L8 16"/></svg>',e2='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4" stroke="currentColor" stroke-width="2"/></svg>',t2='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M13.34 10C12.4223 12.7337 11 17 11 17"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M14.21 7H14.2"/></svg>',wf='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7.69998 12.6L7.67896 12.62C6.53993 13.7048 6.52012 15.5155 7.63516 16.625V16.625C8.72293 17.7073 10.4799 17.7102 11.5712 16.6314L13.0263 15.193C14.0703 14.1609 14.2141 12.525 13.3662 11.3266L13.22 11.12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16.22 11.12L16.3564 10.9805C17.2895 10.0265 17.3478 8.5207 16.4914 7.49733V7.49733C15.5691 6.39509 13.9269 6.25143 12.8271 7.17675L11.3901 8.38588C10.0935 9.47674 9.95706 11.4241 11.0888 12.6852L11.12 12.72"/></svg>',n2='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M9.40999 7.29999H9.4"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M14.6 7.29999H14.59"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M9.30999 12H9.3"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M14.6 12H14.59"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M9.40999 16.7H9.4"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M14.6 16.7H14.59"/></svg>',o2='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M12 7V12M12 17V12M17 12H12M12 12H7"/></svg>',_f='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M11.5 17.5L5 11M5 11V15.5M5 11H9.5"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M12.5 6.5L19 13M19 13V8.5M19 13H14.5"/></svg>',r2='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><circle cx="10.5" cy="10.5" r="5.5" stroke="currentColor" stroke-width="2"/><line x1="15.4142" x2="19" y1="15" y2="18.5858" stroke="currentColor" stroke-linecap="round" stroke-width="2"/></svg>',a2='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M15.7795 11.5C15.7795 11.5 16.053 11.1962 16.5497 10.6722C17.4442 9.72856 17.4701 8.2475 16.5781 7.30145V7.30145C15.6482 6.31522 14.0873 6.29227 13.1288 7.25073L11.8796 8.49999"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M8.24517 12.3883C8.24517 12.3883 7.97171 12.6922 7.47504 13.2161C6.58051 14.1598 6.55467 15.6408 7.44666 16.5869V16.5869C8.37653 17.5731 9.93744 17.5961 10.8959 16.6376L12.1452 15.3883"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M17.7802 15.1032L16.597 14.9422C16.0109 14.8624 15.4841 15.3059 15.4627 15.8969L15.4199 17.0818"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6.39064 9.03238L7.58432 9.06668C8.17551 9.08366 8.6522 8.58665 8.61056 7.99669L8.5271 6.81397"/><line x1="12.1142" x2="11.7" y1="12.2" y2="11.7858" stroke="currentColor" stroke-linecap="round" stroke-width="2"/></svg>',s2='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><rect width="14" height="14" x="5" y="5" stroke="currentColor" stroke-width="2" rx="4"/><line x1="12" x2="12" y1="9" y2="12" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M12 15.02V15.01"/></svg>',i2="__",l2="--";function uo(n){return(e,t)=>[[n,e].filter(r=>!!r).join(i2),t].filter(r=>!!r).join(l2)}const ra=uo("ce-hint"),aa={root:ra(),alignedStart:ra(null,"align-left"),alignedCenter:ra(null,"align-center"),title:ra("title"),description:ra("description")};class c2{constructor(e){this.nodes={root:Q.make("div",[aa.root,e.alignment==="center"?aa.alignedCenter:aa.alignedStart]),title:Q.make("div",aa.title,{textContent:e.title})},this.nodes.root.appendChild(this.nodes.title),e.description!==void 0&&(this.nodes.description=Q.make("div",aa.description,{textContent:e.description}),this.nodes.root.appendChild(this.nodes.description))}getElement(){return this.nodes.root}}let Zl=class{constructor(e){this.params=e}get name(){if(this.params!==void 0&&"name"in this.params)return this.params.name}destroy(){vs()}onChildrenOpen(){var e;this.params!==void 0&&"children"in this.params&&typeof((e=this.params.children)==null?void 0:e.onOpen)=="function"&&this.params.children.onOpen()}onChildrenClose(){var e;this.params!==void 0&&"children"in this.params&&typeof((e=this.params.children)==null?void 0:e.onClose)=="function"&&this.params.children.onClose()}handleClick(){var e,t;this.params!==void 0&&"onActivate"in this.params&&((t=(e=this.params).onActivate)==null||t.call(e,this.params))}addHint(e,t){const r=new c2(t);ws(e,r.getElement(),{placement:t.position,hidingDelay:100})}get children(){var e;return this.params!==void 0&&"children"in this.params&&((e=this.params.children)==null?void 0:e.items)!==void 0?this.params.children.items:[]}get hasChildren(){return this.children.length>0}get isChildrenOpen(){var e;return this.params!==void 0&&"children"in this.params&&((e=this.params.children)==null?void 0:e.isOpen)===!0}get isChildrenFlippable(){var e;return!(this.params===void 0||!("children"in this.params)||((e=this.params.children)==null?void 0:e.isFlippable)===!1)}get isChildrenSearchable(){var e;return this.params!==void 0&&"children"in this.params&&((e=this.params.children)==null?void 0:e.searchable)===!0}get closeOnActivate(){return this.params!==void 0&&"closeOnActivate"in this.params&&this.params.closeOnActivate}get isActive(){return this.params===void 0||!("isActive"in this.params)?!1:typeof this.params.isActive=="function"?this.params.isActive():this.params.isActive===!0}};const qt=uo("ce-popover-item"),it={container:qt(),active:qt(null,"active"),disabled:qt(null,"disabled"),focused:qt(null,"focused"),hidden:qt(null,"hidden"),confirmationState:qt(null,"confirmation"),noHover:qt(null,"no-hover"),noFocus:qt(null,"no-focus"),title:qt("title"),secondaryTitle:qt("secondary-title"),icon:qt("icon"),iconTool:qt("icon","tool"),iconChevronRight:qt("icon","chevron-right"),wobbleAnimation:uo("wobble")()};let Io=class extends Zl{constructor(e,t){super(e),this.params=e,this.nodes={root:null,icon:null},this.confirmationState=null,this.removeSpecialFocusBehavior=()=>{var r;(r=this.nodes.root)==null||r.classList.remove(it.noFocus)},this.removeSpecialHoverBehavior=()=>{var r;(r=this.nodes.root)==null||r.classList.remove(it.noHover)},this.onErrorAnimationEnd=()=>{var r,a;(r=this.nodes.icon)==null||r.classList.remove(it.wobbleAnimation),(a=this.nodes.icon)==null||a.removeEventListener("animationend",this.onErrorAnimationEnd)},this.nodes.root=this.make(e,t)}get isDisabled(){return this.params.isDisabled===!0}get toggle(){return this.params.toggle}get title(){return this.params.title}get isConfirmationStateEnabled(){return this.confirmationState!==null}get isFocused(){return this.nodes.root===null?!1:this.nodes.root.classList.contains(it.focused)}getElement(){return this.nodes.root}handleClick(){if(this.isConfirmationStateEnabled&&this.confirmationState!==null){this.activateOrEnableConfirmationMode(this.confirmationState);return}this.activateOrEnableConfirmationMode(this.params)}toggleActive(e){var t;(t=this.nodes.root)==null||t.classList.toggle(it.active,e)}toggleHidden(e){var t;(t=this.nodes.root)==null||t.classList.toggle(it.hidden,e)}reset(){this.isConfirmationStateEnabled&&this.disableConfirmationMode()}onFocus(){this.disableSpecialHoverAndFocusBehavior()}make(e,t){var r,a;const s=(t==null?void 0:t.wrapperTag)||"div",i=Q.make(s,it.container,{type:s==="button"?"button":void 0});return e.name&&(i.dataset.itemName=e.name),this.nodes.icon=Q.make("div",[it.icon,it.iconTool],{innerHTML:e.icon||e2}),i.appendChild(this.nodes.icon),e.title!==void 0&&i.appendChild(Q.make("div",it.title,{innerHTML:e.title||""})),e.secondaryLabel&&i.appendChild(Q.make("div",it.secondaryTitle,{textContent:e.secondaryLabel})),this.hasChildren&&i.appendChild(Q.make("div",[it.icon,it.iconChevronRight],{innerHTML:QC})),this.isActive&&i.classList.add(it.active),e.isDisabled&&i.classList.add(it.disabled),e.hint!==void 0&&((r=t==null?void 0:t.hint)==null?void 0:r.enabled)!==!1&&this.addHint(i,{...e.hint,position:((a=t==null?void 0:t.hint)==null?void 0:a.position)||"right"}),i}enableConfirmationMode(e){if(this.nodes.root===null)return;const t={...this.params,...e,confirmation:"confirmation"in e?e.confirmation:void 0},r=this.make(t);this.nodes.root.innerHTML=r.innerHTML,this.nodes.root.classList.add(it.confirmationState),this.confirmationState=e,this.enableSpecialHoverAndFocusBehavior()}disableConfirmationMode(){if(this.nodes.root===null)return;const e=this.make(this.params);this.nodes.root.innerHTML=e.innerHTML,this.nodes.root.classList.remove(it.confirmationState),this.confirmationState=null,this.disableSpecialHoverAndFocusBehavior()}enableSpecialHoverAndFocusBehavior(){var e,t,r;(e=this.nodes.root)==null||e.classList.add(it.noHover),(t=this.nodes.root)==null||t.classList.add(it.noFocus),(r=this.nodes.root)==null||r.addEventListener("mouseleave",this.removeSpecialHoverBehavior,{once:!0})}disableSpecialHoverAndFocusBehavior(){var e;this.removeSpecialFocusBehavior(),this.removeSpecialHoverBehavior(),(e=this.nodes.root)==null||e.removeEventListener("mouseleave",this.removeSpecialHoverBehavior)}activateOrEnableConfirmationMode(e){var t;if(!("confirmation"in e)||e.confirmation===void 0)try{(t=e.onActivate)==null||t.call(e,e),this.disableConfirmationMode()}catch{this.animateError()}else this.enableConfirmationMode(e.confirmation)}animateError(){var e,t,r;(e=this.nodes.icon)!=null&&e.classList.contains(it.wobbleAnimation)||((t=this.nodes.icon)==null||t.classList.add(it.wobbleAnimation),(r=this.nodes.icon)==null||r.addEventListener("animationend",this.onErrorAnimationEnd))}};const Jl=uo("ce-popover-item-separator"),ec={container:Jl(),line:Jl("line"),hidden:Jl(null,"hidden")};class Cf extends Zl{constructor(){super(),this.nodes={root:Q.make("div",ec.container),line:Q.make("div",ec.line)},this.nodes.root.appendChild(this.nodes.line)}getElement(){return this.nodes.root}toggleHidden(e){var t;(t=this.nodes.root)==null||t.classList.toggle(ec.hidden,e)}}var Cn=(n=>(n.Closed="closed",n.ClosedOnActivate="closed-on-activate",n))(Cn||{});const It=uo("ce-popover"),ht={popover:It(),popoverContainer:It("container"),popoverOpenTop:It(null,"open-top"),popoverOpenLeft:It(null,"open-left"),popoverOpened:It(null,"opened"),search:It("search"),nothingFoundMessage:It("nothing-found-message"),nothingFoundMessageDisplayed:It("nothing-found-message","displayed"),items:It("items"),overlay:It("overlay"),overlayHidden:It("overlay","hidden"),popoverNested:It(null,"nested"),getPopoverNestedClass:n=>It(null,`nested-level-${n.toString()}`),popoverInline:It(null,"inline"),popoverHeader:It("header")};var mr=(n=>(n.NestingLevel="--nesting-level",n.PopoverHeight="--popover-height",n.InlinePopoverWidth="--inline-popover-width",n.TriggerItemLeft="--trigger-item-left",n.TriggerItemTop="--trigger-item-top",n))(mr||{});const Ef=uo("ce-popover-item-html"),Sf={root:Ef(),hidden:Ef(null,"hidden")};let sa=class extends Zl{constructor(e,t){var r,a;super(e),this.nodes={root:Q.make("div",Sf.root)},this.nodes.root.appendChild(e.element),e.name&&(this.nodes.root.dataset.itemName=e.name),e.hint!==void 0&&((r=t==null?void 0:t.hint)==null?void 0:r.enabled)!==!1&&this.addHint(this.nodes.root,{...e.hint,position:((a=t==null?void 0:t.hint)==null?void 0:a.position)||"right"})}getElement(){return this.nodes.root}toggleHidden(e){var t;(t=this.nodes.root)==null||t.classList.toggle(Sf.hidden,e)}getControls(){const e=this.nodes.root.querySelectorAll(`button, ${Q.allInputsSelector}`);return Array.from(e)}};class xf extends ea{constructor(e,t={}){super(),this.params=e,this.itemsRenderParams=t,this.listeners=new ta,this.messages={nothingFound:"Nothing found",search:"Search"},this.items=this.buildItems(e.items),e.messages&&(this.messages={...this.messages,...e.messages}),this.nodes={},this.nodes.popoverContainer=Q.make("div",[ht.popoverContainer]),this.nodes.nothingFoundMessage=Q.make("div",[ht.nothingFoundMessage],{textContent:this.messages.nothingFound}),this.nodes.popoverContainer.appendChild(this.nodes.nothingFoundMessage),this.nodes.items=Q.make("div",[ht.items]),this.items.forEach(r=>{const a=r.getElement();a!==null&&this.nodes.items.appendChild(a)}),this.nodes.popoverContainer.appendChild(this.nodes.items),this.listeners.on(this.nodes.popoverContainer,"click",r=>this.handleClick(r)),this.nodes.popover=Q.make("div",[ht.popover,this.params.class]),this.nodes.popover.appendChild(this.nodes.popoverContainer)}get itemsDefault(){return this.items.filter(e=>e instanceof Io)}getElement(){return this.nodes.popover}show(){this.nodes.popover.classList.add(ht.popoverOpened),this.search!==void 0&&this.search.focus()}hide(){this.nodes.popover.classList.remove(ht.popoverOpened),this.nodes.popover.classList.remove(ht.popoverOpenTop),this.itemsDefault.forEach(e=>e.reset()),this.search!==void 0&&this.search.clear(),this.emit(Cn.Closed)}destroy(){var e;this.items.forEach(t=>t.destroy()),this.nodes.popover.remove(),this.listeners.removeAll(),(e=this.search)==null||e.destroy()}activateItemByName(e){const t=this.items.find(r=>r.name===e);this.handleItemClick(t)}buildItems(e){return e.map(t=>{switch(t.type){case Je.Separator:return new Cf;case Je.Html:return new sa(t,this.itemsRenderParams[Je.Html]);default:return new Io(t,this.itemsRenderParams[Je.Default])}})}getTargetItem(e){return this.items.filter(t=>t instanceof Io||t instanceof sa).find(t=>{const r=t.getElement();return r===null?!1:e.composedPath().includes(r)})}handleItemClick(e){if(!("isDisabled"in e&&e.isDisabled)){if(e.hasChildren){this.showNestedItems(e),"handleClick"in e&&typeof e.handleClick=="function"&&e.handleClick();return}this.itemsDefault.filter(t=>t!==e).forEach(t=>t.reset()),"handleClick"in e&&typeof e.handleClick=="function"&&e.handleClick(),this.toggleItemActivenessIfNeeded(e),e.closeOnActivate&&(this.hide(),this.emit(Cn.ClosedOnActivate))}}handleClick(e){const t=this.getTargetItem(e);t!==void 0&&this.handleItemClick(t)}toggleItemActivenessIfNeeded(e){if(e instanceof Io&&(e.toggle===!0&&e.toggleActive(),typeof e.toggle=="string")){const t=this.itemsDefault.filter(r=>r.toggle===e.toggle);if(t.length===1){e.toggleActive();return}t.forEach(r=>{r.toggleActive(r===e)})}}}var Cs=(n=>(n.Search="search",n))(Cs||{});const tc=uo("cdx-search-field"),nc={wrapper:tc(),icon:tc("icon"),input:tc("input")};class d2 extends ea{constructor({items:e,placeholder:t}){super(),this.listeners=new ta,this.items=e,this.wrapper=Q.make("div",nc.wrapper);const r=Q.make("div",nc.icon,{innerHTML:r2});this.input=Q.make("input",nc.input,{placeholder:t,tabIndex:-1}),this.wrapper.appendChild(r),this.wrapper.appendChild(this.input),this.listeners.on(this.input,"input",()=>{this.searchQuery=this.input.value,this.emit(Cs.Search,{query:this.searchQuery,items:this.foundItems})})}getElement(){return this.wrapper}focus(){this.input.focus()}clear(){this.input.value="",this.searchQuery="",this.emit(Cs.Search,{query:"",items:this.foundItems})}destroy(){this.listeners.removeAll()}get foundItems(){return this.items.filter(e=>this.checkItem(e))}checkItem(e){var t,r;const a=((t=e.title)==null?void 0:t.toLowerCase())||"",s=(r=this.searchQuery)==null?void 0:r.toLowerCase();return s!==void 0?a.includes(s):!1}}var u2=Object.defineProperty,h2=Object.getOwnPropertyDescriptor,p2=(n,e,t,r)=>{for(var a=h2(e,t),s=n.length-1,i;s>=0;s--)(i=n[s])&&(a=i(e,t,a)||a);return a&&u2(e,t,a),a};const Bf=class og extends xf{constructor(e,t){super(e,t),this.nestingLevel=0,this.nestedPopoverTriggerItem=null,this.previouslyHoveredItem=null,this.scopeElement=document.body,this.hide=()=>{var r;super.hide(),this.destroyNestedPopoverIfExists(),(r=this.flipper)==null||r.deactivate(),this.previouslyHoveredItem=null},this.onFlip=()=>{const r=this.itemsDefault.find(a=>a.isFocused);r==null||r.onFocus()},this.onSearch=r=>{var a;const s=r.query==="",i=r.items.length===0;this.items.forEach(c=>{let d=!1;c instanceof Io?d=!r.items.includes(c):(c instanceof Cf||c instanceof sa)&&(d=i||!s),c.toggleHidden(d)}),this.toggleNothingFoundMessage(i);const l=r.query===""?this.flippableElements:r.items.map(c=>c.getElement());(a=this.flipper)!=null&&a.isActivated&&(this.flipper.deactivate(),this.flipper.activate(l))},e.nestingLevel!==void 0&&(this.nestingLevel=e.nestingLevel),this.nestingLevel>0&&this.nodes.popover.classList.add(ht.popoverNested),e.scopeElement!==void 0&&(this.scopeElement=e.scopeElement),this.nodes.popoverContainer!==null&&this.listeners.on(this.nodes.popoverContainer,"mouseover",r=>this.handleHover(r)),e.searchable&&this.addSearch(),e.flippable!==!1&&(this.flipper=new _s({items:this.flippableElements,focusedItemClass:it.focused,allowedKeys:[Me.TAB,Me.UP,Me.DOWN,Me.ENTER]}),this.flipper.onFlip(this.onFlip))}hasFocus(){return this.flipper===void 0?!1:this.flipper.hasFocus()}get scrollTop(){return this.nodes.items===null?0:this.nodes.items.scrollTop}get offsetTop(){return this.nodes.popoverContainer===null?0:this.nodes.popoverContainer.offsetTop}show(){var e;this.nodes.popover.style.setProperty(mr.PopoverHeight,this.size.height+"px"),this.shouldOpenBottom||this.nodes.popover.classList.add(ht.popoverOpenTop),this.shouldOpenRight||this.nodes.popover.classList.add(ht.popoverOpenLeft),super.show(),(e=this.flipper)==null||e.activate(this.flippableElements)}destroy(){this.hide(),super.destroy()}showNestedItems(e){this.nestedPopover!==null&&this.nestedPopover!==void 0||(this.nestedPopoverTriggerItem=e,this.showNestedPopoverForItem(e))}handleHover(e){const t=this.getTargetItem(e);t!==void 0&&this.previouslyHoveredItem!==t&&(this.destroyNestedPopoverIfExists(),this.previouslyHoveredItem=t,t.hasChildren&&this.showNestedPopoverForItem(t))}setTriggerItemPosition(e,t){const r=t.getElement(),a=(r?r.offsetTop:0)-this.scrollTop,s=this.offsetTop+a;e.style.setProperty(mr.TriggerItemTop,s+"px")}destroyNestedPopoverIfExists(){var e,t;this.nestedPopover===void 0||this.nestedPopover===null||(this.nestedPopover.off(Cn.ClosedOnActivate,this.hide),this.nestedPopover.hide(),this.nestedPopover.destroy(),this.nestedPopover.getElement().remove(),this.nestedPopover=null,(e=this.flipper)==null||e.activate(this.flippableElements),(t=this.nestedPopoverTriggerItem)==null||t.onChildrenClose())}showNestedPopoverForItem(e){var t;this.nestedPopover=new og({searchable:e.isChildrenSearchable,items:e.children,nestingLevel:this.nestingLevel+1,flippable:e.isChildrenFlippable,messages:this.messages}),e.onChildrenOpen(),this.nestedPopover.on(Cn.ClosedOnActivate,this.hide);const r=this.nestedPopover.getElement();return this.nodes.popover.appendChild(r),this.setTriggerItemPosition(r,e),r.style.setProperty(mr.NestingLevel,this.nestedPopover.nestingLevel.toString()),this.nestedPopover.show(),(t=this.flipper)==null||t.deactivate(),this.nestedPopover}get shouldOpenBottom(){if(this.nodes.popover===void 0||this.nodes.popover===null)return!1;const e=this.nodes.popoverContainer.getBoundingClientRect(),t=this.scopeElement.getBoundingClientRect(),r=this.size.height,a=e.top+r,s=e.top-r,i=Math.min(window.innerHeight,t.bottom);return s<t.top||a<=i}get shouldOpenRight(){if(this.nodes.popover===void 0||this.nodes.popover===null)return!1;const e=this.nodes.popover.getBoundingClientRect(),t=this.scopeElement.getBoundingClientRect(),r=this.size.width,a=e.right+r,s=e.left-r,i=Math.min(window.innerWidth,t.right);return s<t.left||a<=i}get size(){var e;const t={height:0,width:0};if(this.nodes.popover===null)return t;const r=this.nodes.popover.cloneNode(!0);r.style.visibility="hidden",r.style.position="absolute",r.style.top="-1000px",r.classList.add(ht.popoverOpened),(e=r.querySelector("."+ht.popoverNested))==null||e.remove(),document.body.appendChild(r);const a=r.querySelector("."+ht.popoverContainer);return t.height=a.offsetHeight,t.width=a.offsetWidth,r.remove(),t}get flippableElements(){return this.items.map(e=>{if(e instanceof Io)return e.getElement();if(e instanceof sa)return e.getControls()}).flat().filter(e=>e!=null)}addSearch(){this.search=new d2({items:this.itemsDefault,placeholder:this.messages.search}),this.search.on(Cs.Search,this.onSearch);const e=this.search.getElement();e.classList.add(ht.search),this.nodes.popoverContainer.insertBefore(e,this.nodes.popoverContainer.firstChild)}toggleNothingFoundMessage(e){this.nodes.nothingFoundMessage.classList.toggle(ht.nothingFoundMessageDisplayed,e)}};p2([pr],Bf.prototype,"size");let oc=Bf;class f2 extends oc{constructor(e){const t=!fr();super({...e,class:ht.popoverInline},{[Je.Default]:{wrapperTag:"button",hint:{position:"top",alignment:"center",enabled:t}},[Je.Html]:{hint:{position:"top",alignment:"center",enabled:t}}}),this.items.forEach(r=>{!(r instanceof Io)&&!(r instanceof sa)||r.hasChildren&&r.isChildrenOpen&&this.showNestedItems(r)})}get offsetLeft(){return this.nodes.popoverContainer===null?0:this.nodes.popoverContainer.offsetLeft}show(){this.nestingLevel===0&&this.nodes.popover.style.setProperty(mr.InlinePopoverWidth,this.size.width+"px"),super.show()}handleHover(){}setTriggerItemPosition(e,t){const r=t.getElement(),a=r?r.offsetLeft:0,s=this.offsetLeft+a;e.style.setProperty(mr.TriggerItemLeft,s+"px")}showNestedItems(e){if(this.nestedPopoverTriggerItem===e){this.destroyNestedPopoverIfExists(),this.nestedPopoverTriggerItem=null;return}super.showNestedItems(e)}showNestedPopoverForItem(e){const t=super.showNestedPopoverForItem(e);return t.getElement().classList.add(ht.getPopoverNestedClass(t.nestingLevel)),t}handleItemClick(e){var t;e!==this.nestedPopoverTriggerItem&&((t=this.nestedPopoverTriggerItem)==null||t.handleClick(),super.destroyNestedPopoverIfExists()),super.handleItemClick(e)}}const Tf=class ga{constructor(){this.scrollPosition=null}lock(){Wl?this.lockHard():document.body.classList.add(ga.CSS.scrollLocked)}unlock(){Wl?this.unlockHard():document.body.classList.remove(ga.CSS.scrollLocked)}lockHard(){this.scrollPosition=window.pageYOffset,document.documentElement.style.setProperty("--window-scroll-offset",`${this.scrollPosition}px`),document.body.classList.add(ga.CSS.scrollLockedHard)}unlockHard(){document.body.classList.remove(ga.CSS.scrollLockedHard),this.scrollPosition!==null&&window.scrollTo(0,this.scrollPosition),this.scrollPosition=null}};Tf.CSS={scrollLocked:"ce-scroll-locked",scrollLockedHard:"ce-scroll-locked--hard"};let m2=Tf;const rc=uo("ce-popover-header"),ac={root:rc(),text:rc("text"),backButton:rc("back-button")};class g2{constructor({text:e,onBackButtonClick:t}){this.listeners=new ta,this.text=e,this.onBackButtonClick=t,this.nodes={root:Q.make("div",[ac.root]),backButton:Q.make("button",[ac.backButton]),text:Q.make("div",[ac.text])},this.nodes.backButton.innerHTML=XC,this.nodes.root.appendChild(this.nodes.backButton),this.listeners.on(this.nodes.backButton,"click",this.onBackButtonClick),this.nodes.text.innerText=this.text,this.nodes.root.appendChild(this.nodes.text)}getElement(){return this.nodes.root}destroy(){this.nodes.root.remove(),this.listeners.destroy()}}class y2{constructor(){this.history=[]}push(e){this.history.push(e)}pop(){return this.history.pop()}get currentTitle(){return this.history.length===0?"":this.history[this.history.length-1].title}get currentItems(){return this.history.length===0?[]:this.history[this.history.length-1].items}reset(){for(;this.history.length>1;)this.pop()}}let $f=class extends xf{constructor(e){super(e,{[Je.Default]:{hint:{enabled:!1}},[Je.Html]:{hint:{enabled:!1}}}),this.scrollLocker=new m2,this.history=new y2,this.isHidden=!0,this.nodes.overlay=Q.make("div",[ht.overlay,ht.overlayHidden]),this.nodes.popover.insertBefore(this.nodes.overlay,this.nodes.popover.firstChild),this.listeners.on(this.nodes.overlay,"click",()=>{this.hide()}),this.history.push({items:e.items})}show(){this.nodes.overlay.classList.remove(ht.overlayHidden),super.show(),this.scrollLocker.lock(),this.isHidden=!1}hide(){this.isHidden||(super.hide(),this.nodes.overlay.classList.add(ht.overlayHidden),this.scrollLocker.unlock(),this.history.reset(),this.isHidden=!0)}destroy(){super.destroy(),this.scrollLocker.unlock()}showNestedItems(e){this.updateItemsAndHeader(e.children,e.title),this.history.push({title:e.title,items:e.children})}updateItemsAndHeader(e,t){if(this.header!==null&&this.header!==void 0&&(this.header.destroy(),this.header=null),t!==void 0){this.header=new g2({text:t,onBackButtonClick:()=>{this.history.pop(),this.updateItemsAndHeader(this.history.currentItems,this.history.currentTitle)}});const r=this.header.getElement();r!==null&&this.nodes.popoverContainer.insertBefore(r,this.nodes.popoverContainer.firstChild)}this.items.forEach(r=>{var a;return(a=r.getElement())==null?void 0:a.remove()}),this.items=this.buildItems(e),this.items.forEach(r=>{var a;const s=r.getElement();s!==null&&((a=this.nodes.items)==null||a.appendChild(s))})}};class b2 extends ze{constructor(){super(...arguments),this.opened=!1,this.selection=new Se,this.popover=null,this.close=()=>{this.opened&&(this.opened=!1,Se.isAtEditor||this.selection.restore(),this.selection.clearSaved(),!this.Editor.CrossBlockSelection.isCrossBlockSelectionStarted&&this.Editor.BlockManager.currentBlock&&this.Editor.BlockSelection.unselectBlock(this.Editor.BlockManager.currentBlock),this.eventsDispatcher.emit(this.events.closed),this.popover&&(this.popover.off(Cn.Closed,this.onPopoverClose),this.popover.destroy(),this.popover.getElement().remove(),this.popover=null))},this.onPopoverClose=()=>{this.close()}}get events(){return{opened:"block-settings-opened",closed:"block-settings-closed"}}get CSS(){return{settings:"ce-settings"}}get flipper(){var e;if(this.popover!==null)return"flipper"in this.popover?(e=this.popover)==null?void 0:e.flipper:void 0}make(){this.nodes.wrapper=Q.make("div",[this.CSS.settings]),this.eventsDispatcher.on(na,this.close)}destroy(){this.removeAllNodes(),this.listeners.destroy(),this.eventsDispatcher.off(na,this.close)}async open(e=this.Editor.BlockManager.currentBlock){var t;this.opened=!0,this.selection.save(),this.Editor.BlockSelection.selectBlock(e),this.Editor.BlockSelection.clearCache();const{toolTunes:r,commonTunes:a}=e.getTunes();this.eventsDispatcher.emit(this.events.opened);const s=fr()?$f:oc;this.popover=new s({searchable:!0,items:await this.getTunesItems(e,a,r),scopeElement:this.Editor.API.methods.ui.nodes.redactor,messages:{nothingFound:At.ui(Wt.ui.popover,"Nothing found"),search:At.ui(Wt.ui.popover,"Filter")}}),this.popover.on(Cn.Closed,this.onPopoverClose),(t=this.nodes.wrapper)==null||t.append(this.popover.getElement()),this.popover.show()}getElement(){return this.nodes.wrapper}async getTunesItems(e,t,r){const a=[];r!==void 0&&r.length>0&&(a.push(...r),a.push({type:Je.Separator}));const s=Array.from(this.Editor.Tools.blockTools.values()),i=(await pf(e,s)).reduce((l,c)=>(c.toolbox.forEach(d=>{l.push({icon:d.icon,title:At.t(Wt.toolNames,d.title),name:c.name,closeOnActivate:!0,onActivate:async()=>{const{BlockManager:u,Caret:h,Toolbar:p}=this.Editor,m=await u.convert(e,c.name,d.data);p.close(),h.setToBlock(m,h.positions.END)}})}),l),[]);return i.length>0&&(a.push({icon:_f,name:"convert-to",title:At.ui(Wt.ui.popover,"Convert to"),children:{searchable:!0,items:i}}),a.push({type:Je.Separator})),a.push(...t),a.map(l=>this.resolveTuneAliases(l))}resolveTuneAliases(e){if(e.type===Je.Separator||e.type===Je.Html)return e;const t=qC(e,{label:"title"});return e.confirmation&&(t.confirmation=this.resolveTuneAliases(e.confirmation)),t}}var Mf={exports:{}};/*!
|
|
48
48
|
* Library for handling keyboard shortcuts
|
|
49
49
|
* @copyright CodeX (https://codex.so)
|
|
50
50
|
* @license MIT
|
|
51
51
|
* @author CodeX (https://codex.so)
|
|
52
52
|
* @version 1.2.0
|
|
53
|
-
*/(function(n,e){(function(t,r){n.exports=r()})(window,function(){return function(t){var r={};function a(s){if(r[s])return r[s].exports;var i=r[s]={i:s,l:!1,exports:{}};return t[s].call(i.exports,i,i.exports,a),i.l=!0,i.exports}return a.m=t,a.c=r,a.d=function(s,i,l){a.o(s,i)||Object.defineProperty(s,i,{enumerable:!0,get:l})},a.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},a.t=function(s,i){if(1&i&&(s=a(s)),8&i||4&i&&typeof s=="object"&&s&&s.__esModule)return s;var l=Object.create(null);if(a.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:s}),2&i&&typeof s!="string")for(var c in s)a.d(l,c,(function(d){return s[d]}).bind(null,c));return l},a.n=function(s){var i=s&&s.__esModule?function(){return s.default}:function(){return s};return a.d(i,"a",i),i},a.o=function(s,i){return Object.prototype.hasOwnProperty.call(s,i)},a.p="",a(a.s=0)}([function(t,r,a){function s(c,d){for(var u=0;u<d.length;u++){var h=d[u];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(c,h.key,h)}}function i(c,d,u){return d&&s(c.prototype,d),u&&s(c,u),c}a.r(r);var l=function(){function c(d){var u=this;(function(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")})(this,c),this.commands={},this.keys={},this.name=d.name,this.parseShortcutName(d.name),this.element=d.on,this.callback=d.callback,this.executeShortcut=function(h){u.execute(h)},this.element.addEventListener("keydown",this.executeShortcut,!1)}return i(c,null,[{key:"supportedCommands",get:function(){return{SHIFT:["SHIFT"],CMD:["CMD","CONTROL","COMMAND","WINDOWS","CTRL"],ALT:["ALT","OPTION"]}}},{key:"keyCodes",get:function(){return{0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,BACKSPACE:8,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,DELETE:46,".":190}}}]),i(c,[{key:"parseShortcutName",value:function(d){d=d.split("+");for(var u=0;u<d.length;u++){d[u]=d[u].toUpperCase();var h=!1;for(var p in c.supportedCommands)if(c.supportedCommands[p].includes(d[u])){h=this.commands[p]=!0;break}h||(this.keys[d[u]]=!0)}for(var m in c.supportedCommands)this.commands[m]||(this.commands[m]=!1)}},{key:"execute",value:function(d){var u,h={CMD:d.ctrlKey||d.metaKey,SHIFT:d.shiftKey,ALT:d.altKey},p=!0;for(u in this.commands)this.commands[u]!==h[u]&&(p=!1);var m,f=!0;for(m in this.keys)f=f&&d.keyCode===c.keyCodes[m];p&&f&&this.callback(d)}},{key:"remove",value:function(){this.element.removeEventListener("keydown",this.executeShortcut)}}]),c}();r.default=l}]).default})})(Mf);var k2=Mf.exports;const v2=gs(k2);class w2{constructor(){this.registeredShortcuts=new Map}add(e){if(this.findShortcut(e.on,e.name))throw Error(`Shortcut ${e.name} is already registered for ${e.on}. Please remove it before add a new handler.`);const t=new v2({name:e.name,on:e.on,callback:e.handler}),r=this.registeredShortcuts.get(e.on)||[];this.registeredShortcuts.set(e.on,[...r,t])}remove(e,t){const r=this.findShortcut(e,t);if(!r)return;r.remove();const a=this.registeredShortcuts.get(e).filter(s=>s!==r);if(a.length===0){this.registeredShortcuts.delete(e);return}this.registeredShortcuts.set(e,a)}findShortcut(e,t){return(this.registeredShortcuts.get(e)||[]).find(({name:r})=>r===t)}}const gr=new w2;var _2=Object.defineProperty,C2=Object.getOwnPropertyDescriptor,Df=(n,e,t,r)=>{for(var a=C2(e,t),s=n.length-1,i;s>=0;s--)(i=n[s])&&(a=i(e,t,a)||a);return a&&_2(e,t,a),a},Es=(n=>(n.Opened="toolbox-opened",n.Closed="toolbox-closed",n.BlockAdded="toolbox-block-added",n))(Es||{});const ac=class rg extends ea{constructor({api:e,tools:t,i18nLabels:r}){super(),this.opened=!1,this.listeners=new ta,this.popover=null,this.handleMobileLayoutToggle=()=>{this.destroyPopover(),this.initPopover()},this.onPopoverClose=()=>{this.opened=!1,this.emit("toolbox-closed")},this.api=e,this.tools=t,this.i18nLabels=r,this.enableShortcuts(),this.nodes={toolbox:Q.make("div",rg.CSS.toolbox)},this.initPopover(),this.api.events.on(na,this.handleMobileLayoutToggle)}get isEmpty(){return this.toolsToBeDisplayed.length===0}static get CSS(){return{toolbox:"ce-toolbox"}}getElement(){return this.nodes.toolbox}hasFocus(){if(this.popover!==null)return"hasFocus"in this.popover?this.popover.hasFocus():void 0}destroy(){var e;super.destroy(),this.nodes&&this.nodes.toolbox&&this.nodes.toolbox.remove(),this.removeAllShortcuts(),(e=this.popover)==null||e.off(Cn.Closed,this.onPopoverClose),this.listeners.destroy(),this.api.events.off(na,this.handleMobileLayoutToggle)}toolButtonActivated(e,t){this.insertNewBlock(e,t)}open(){var e;this.isEmpty||((e=this.popover)==null||e.show(),this.opened=!0,this.emit("toolbox-opened"))}close(){var e;(e=this.popover)==null||e.hide(),this.opened=!1,this.emit("toolbox-closed")}toggle(){this.opened?this.close():this.open()}initPopover(){var e;const t=fr()?$f:nc;this.popover=new t({scopeElement:this.api.ui.nodes.redactor,searchable:!0,messages:{nothingFound:this.i18nLabels.nothingFound,search:this.i18nLabels.filter},items:this.toolboxItemsToBeDisplayed}),this.popover.on(Cn.Closed,this.onPopoverClose),(e=this.nodes.toolbox)==null||e.append(this.popover.getElement())}destroyPopover(){this.popover!==null&&(this.popover.hide(),this.popover.off(Cn.Closed,this.onPopoverClose),this.popover.destroy(),this.popover=null),this.nodes.toolbox!==null&&(this.nodes.toolbox.innerHTML="")}get toolsToBeDisplayed(){const e=[];return this.tools.forEach(t=>{t.toolbox&&e.push(t)}),e}get toolboxItemsToBeDisplayed(){const e=(t,r,a=!0)=>({icon:t.icon,title:At.t(Wt.toolNames,t.title||bs(r.name)),name:r.name,onActivate:()=>{this.toolButtonActivated(r.name,t.data)},secondaryLabel:r.shortcut&&a?jl(r.shortcut):""});return this.toolsToBeDisplayed.reduce((t,r)=>(Array.isArray(r.toolbox)?r.toolbox.forEach((a,s)=>{t.push(e(a,r,s===0))}):r.toolbox!==void 0&&t.push(e(r.toolbox,r)),t),[])}enableShortcuts(){this.toolsToBeDisplayed.forEach(e=>{const t=e.shortcut;t&&this.enableShortcutForTool(e.name,t)})}enableShortcutForTool(e,t){gr.add({name:t,on:this.api.ui.nodes.redactor,handler:async r=>{r.preventDefault();const a=this.api.blocks.getCurrentBlockIndex(),s=this.api.blocks.getBlockByIndex(a);if(s)try{const i=await this.api.blocks.convert(s.id,e);this.api.caret.setToBlock(i,"end");return}catch{}this.insertNewBlock(e)}})}removeAllShortcuts(){this.toolsToBeDisplayed.forEach(e=>{const t=e.shortcut;t&&gr.remove(this.api.ui.nodes.redactor,t)})}async insertNewBlock(e,t){const r=this.api.blocks.getCurrentBlockIndex(),a=this.api.blocks.getBlockByIndex(r);if(!a)return;const s=a.isEmpty?r:r+1;let i;if(t){const c=await this.api.blocks.composeBlockData(e);i=Object.assign(c,t)}const l=this.api.blocks.insert(e,i,void 0,s,void 0,a.isEmpty);l.call(Hn.APPEND_CALLBACK),this.api.caret.setToBlock(s),this.emit("toolbox-block-added",{block:l}),this.api.toolbar.close()}};Df([pr],ac.prototype,"toolsToBeDisplayed"),Df([pr],ac.prototype,"toolboxItemsToBeDisplayed");let E2=ac;const Of="block hovered";async function S2(n,e){const t=navigator.keyboard;if(!t)return e;try{return(await t.getLayoutMap()).get(n)||e}catch(r){return console.error(r),e}}class x2 extends ze{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.toolboxInstance=null}get CSS(){return{toolbar:"ce-toolbar",content:"ce-toolbar__content",actions:"ce-toolbar__actions",actionsOpened:"ce-toolbar__actions--opened",toolbarOpened:"ce-toolbar--opened",openedToolboxHolderModifier:"codex-editor--toolbox-opened",plusButton:"ce-toolbar__plus",plusButtonShortcut:"ce-toolbar__plus-shortcut",settingsToggler:"ce-toolbar__settings-btn",settingsTogglerHidden:"ce-toolbar__settings-btn--hidden"}}get opened(){return this.nodes.wrapper.classList.contains(this.CSS.toolbarOpened)}get toolbox(){var e;return{opened:(e=this.toolboxInstance)==null?void 0:e.opened,close:()=>{var t;(t=this.toolboxInstance)==null||t.close()},open:()=>{if(this.toolboxInstance===null){Ye("toolbox.open() called before initialization is finished","warn");return}this.Editor.BlockManager.currentBlock=this.hoveredBlock,this.toolboxInstance.open()},toggle:()=>{if(this.toolboxInstance===null){Ye("toolbox.toggle() called before initialization is finished","warn");return}this.toolboxInstance.toggle()},hasFocus:()=>{var t;return(t=this.toolboxInstance)==null?void 0:t.hasFocus()}}}get blockActions(){return{hide:()=>{this.nodes.actions.classList.remove(this.CSS.actionsOpened)},show:()=>{this.nodes.actions.classList.add(this.CSS.actionsOpened)}}}get blockTunesToggler(){return{hide:()=>this.nodes.settingsToggler.classList.add(this.CSS.settingsTogglerHidden),show:()=>this.nodes.settingsToggler.classList.remove(this.CSS.settingsTogglerHidden)}}toggleReadOnly(e){e?(this.destroy(),this.Editor.BlockSettings.destroy(),this.disableModuleBindings()):window.requestIdleCallback(()=>{this.drawUI(),this.enableModuleBindings()},{timeout:2e3})}moveAndOpen(e=this.Editor.BlockManager.currentBlock){if(this.toolboxInstance===null){Ye("Can't open Toolbar since Editor initialization is not finished yet","warn");return}if(this.toolboxInstance.opened&&this.toolboxInstance.close(),this.Editor.BlockSettings.opened&&this.Editor.BlockSettings.close(),!e)return;this.hoveredBlock=e;const t=e.holder,{isMobile:r}=this.Editor.UI;let a;const s=20,i=e.firstInput,l=t.getBoundingClientRect(),c=i!==void 0?i.getBoundingClientRect():null,d=c!==null?c.top-l.top:null,u=d!==null?d>s:void 0;if(r)a=t.offsetTop+t.offsetHeight;else if(i===void 0||u){const h=parseInt(window.getComputedStyle(e.pluginsContent).paddingTop);a=t.offsetTop+h}else{const h=cC(i),p=parseInt(window.getComputedStyle(this.nodes.plusButton).height,10);a=t.offsetTop+h-p+8+d}this.nodes.wrapper.style.top=`${Math.floor(a)}px`,this.Editor.BlockManager.blocks.length===1&&e.isEmpty?this.blockTunesToggler.hide():this.blockTunesToggler.show(),this.open()}close(){var e,t;this.Editor.ReadOnly.isEnabled||((e=this.nodes.wrapper)==null||e.classList.remove(this.CSS.toolbarOpened),this.blockActions.hide(),(t=this.toolboxInstance)==null||t.close(),this.Editor.BlockSettings.close(),this.reset())}reset(){this.nodes.wrapper.style.top="unset"}open(e=!0){this.nodes.wrapper.classList.add(this.CSS.toolbarOpened),e?this.blockActions.show():this.blockActions.hide()}async make(){this.nodes.wrapper=Q.make("div",this.CSS.toolbar),["content","actions"].forEach(s=>{this.nodes[s]=Q.make("div",this.CSS[s])}),Q.append(this.nodes.wrapper,this.nodes.content),Q.append(this.nodes.content,this.nodes.actions),this.nodes.plusButton=Q.make("div",this.CSS.plusButton,{innerHTML:o2}),Q.append(this.nodes.actions,this.nodes.plusButton),this.readOnlyMutableListeners.on(this.nodes.plusButton,"click",()=>{vs(!0),this.plusButtonClicked()},!1);const e=Q.make("div");e.appendChild(document.createTextNode(At.ui(Wt.ui.toolbar.toolbox,"Add"))),e.appendChild(Q.make("div",this.CSS.plusButtonShortcut,{textContent:"/"})),ws(this.nodes.plusButton,e,{hidingDelay:400}),this.nodes.settingsToggler=Q.make("span",this.CSS.settingsToggler,{innerHTML:n2}),Q.append(this.nodes.actions,this.nodes.settingsToggler);const t=Q.make("div"),r=Q.text(At.ui(Wt.ui.blockTunes.toggler,"Click to tune")),a=await S2("Slash","/");t.appendChild(r),t.appendChild(Q.make("div",this.CSS.plusButtonShortcut,{textContent:jl(`CMD + ${a}`)})),ws(this.nodes.settingsToggler,t,{hidingDelay:400}),Q.append(this.nodes.actions,this.makeToolbox()),Q.append(this.nodes.actions,this.Editor.BlockSettings.getElement()),Q.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper)}makeToolbox(){return this.toolboxInstance=new E2({api:this.Editor.API.methods,tools:this.Editor.Tools.blockTools,i18nLabels:{filter:At.ui(Wt.ui.popover,"Filter"),nothingFound:At.ui(Wt.ui.popover,"Nothing found")}}),this.toolboxInstance.on(Es.Opened,()=>{this.Editor.UI.nodes.wrapper.classList.add(this.CSS.openedToolboxHolderModifier)}),this.toolboxInstance.on(Es.Closed,()=>{this.Editor.UI.nodes.wrapper.classList.remove(this.CSS.openedToolboxHolderModifier)}),this.toolboxInstance.on(Es.BlockAdded,({block:e})=>{const{BlockManager:t,Caret:r}=this.Editor,a=t.getBlockById(e.id);a.inputs.length===0&&(a===t.lastBlock?(t.insertAtEnd(),r.setToBlock(t.lastBlock)):r.setToBlock(t.nextBlock))}),this.toolboxInstance.getElement()}plusButtonClicked(){var e;this.Editor.BlockManager.currentBlock=this.hoveredBlock,(e=this.toolboxInstance)==null||e.toggle()}enableModuleBindings(){this.readOnlyMutableListeners.on(this.nodes.settingsToggler,"mousedown",e=>{var t;e.stopPropagation(),this.settingsTogglerClicked(),(t=this.toolboxInstance)!=null&&t.opened&&this.toolboxInstance.close(),vs(!0)},!0),fr()||this.eventsDispatcher.on(Of,e=>{var t;this.Editor.BlockSettings.opened||(t=this.toolboxInstance)!=null&&t.opened||this.moveAndOpen(e.block)})}disableModuleBindings(){this.readOnlyMutableListeners.clearAll()}settingsTogglerClicked(){this.Editor.BlockManager.currentBlock=this.hoveredBlock,this.Editor.BlockSettings.opened?this.Editor.BlockSettings.close():this.Editor.BlockSettings.open(this.hoveredBlock)}drawUI(){this.Editor.BlockSettings.make(),this.make()}destroy(){this.removeAllNodes(),this.toolboxInstance&&this.toolboxInstance.destroy()}}var No=(n=>(n[n.Block=0]="Block",n[n.Inline=1]="Inline",n[n.Tune=2]="Tune",n))(No||{}),Ss=(n=>(n.Shortcut="shortcut",n.Toolbox="toolbox",n.EnabledInlineTools="inlineToolbar",n.EnabledBlockTunes="tunes",n.Config="config",n))(Ss||{}),Af=(n=>(n.Shortcut="shortcut",n.SanitizeConfig="sanitize",n))(Af||{}),yr=(n=>(n.IsEnabledLineBreaks="enableLineBreaks",n.Toolbox="toolbox",n.ConversionConfig="conversionConfig",n.IsReadOnlySupported="isReadOnlySupported",n.PasteConfig="pasteConfig",n))(yr||{}),xs=(n=>(n.IsInline="isInline",n.Title="title",n.IsReadOnlySupported="isReadOnlySupported",n))(xs||{}),sc=(n=>(n.IsTune="isTune",n))(sc||{});let ic=class{constructor({name:e,constructable:t,config:r,api:a,isDefault:s,isInternal:i=!1,defaultPlaceholder:l}){this.api=a,this.name=e,this.constructable=t,this.config=r,this.isDefault=s,this.isInternal=i,this.defaultPlaceholder=l}get settings(){const e=this.config.config||{};return this.isDefault&&!("placeholder"in e)&&this.defaultPlaceholder&&(e.placeholder=this.defaultPlaceholder),e}reset(){if(tt(this.constructable.reset))return this.constructable.reset()}prepare(){if(tt(this.constructable.prepare))return this.constructable.prepare({toolName:this.name,config:this.settings})}get shortcut(){const e=this.constructable.shortcut;return this.config.shortcut||e}get sanitizeConfig(){return this.constructable.sanitize||{}}isInline(){return this.type===No.Inline}isBlock(){return this.type===No.Block}isTune(){return this.type===No.Tune}};class B2 extends ze{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.CSS={inlineToolbar:"ce-inline-toolbar"},this.opened=!1,this.popover=null,this.toolbarVerticalMargin=fr()?20:6,this.tools=new Map,window.requestIdleCallback(()=>{this.make()},{timeout:2e3})}async tryToShow(e=!1){e&&this.close(),this.allowedToShow()&&(await this.open(),this.Editor.Toolbar.close())}close(){var e,t;if(this.opened){for(const[r,a]of this.tools){const s=this.getToolShortcut(r.name);s!==void 0&&gr.remove(this.Editor.UI.nodes.redactor,s),tt(a.clear)&&a.clear()}this.tools=new Map,this.reset(),this.opened=!1,(e=this.popover)==null||e.hide(),(t=this.popover)==null||t.destroy(),this.popover=null}}containsNode(e){return this.nodes.wrapper===void 0?!1:this.nodes.wrapper.contains(e)}destroy(){var e;this.removeAllNodes(),(e=this.popover)==null||e.destroy(),this.popover=null}make(){this.nodes.wrapper=Q.make("div",[this.CSS.inlineToolbar,...this.isRtl?[this.Editor.UI.CSS.editorRtlFix]:[]]),Q.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper)}async open(){var e;if(this.opened)return;this.opened=!0,this.popover!==null&&this.popover.destroy(),this.createToolsInstances();const t=await this.getPopoverItems();this.popover=new f2({items:t,scopeElement:this.Editor.API.methods.ui.nodes.redactor,messages:{nothingFound:At.ui(Wt.ui.popover,"Nothing found"),search:At.ui(Wt.ui.popover,"Filter")}}),this.move(this.popover.size.width),(e=this.nodes.wrapper)==null||e.append(this.popover.getElement()),this.popover.show()}move(e){const t=Se.rect,r=this.Editor.UI.nodes.wrapper.getBoundingClientRect(),a={x:t.x-r.x,y:t.y+t.height-r.top+this.toolbarVerticalMargin};a.x+e+r.x>this.Editor.UI.contentRect.right&&(a.x=this.Editor.UI.contentRect.right-e-r.x),this.nodes.wrapper.style.left=Math.floor(a.x)+"px",this.nodes.wrapper.style.top=Math.floor(a.y)+"px"}reset(){this.nodes.wrapper.style.left="0",this.nodes.wrapper.style.top="0"}allowedToShow(){const e=["IMG","INPUT"],t=Se.get(),r=Se.text;if(!t||!t.anchorNode||t.isCollapsed||r.length<1)return!1;const a=Q.isElement(t.anchorNode)?t.anchorNode:t.anchorNode.parentElement;if(a===null||t!==null&&e.includes(a.tagName))return!1;const s=this.Editor.BlockManager.getBlock(t.anchorNode);return!s||this.getTools().some(i=>s.tool.inlineTools.has(i.name))===!1?!1:a.closest("[contenteditable]")!==null}getTools(){const e=this.Editor.BlockManager.currentBlock;return e?Array.from(e.tool.inlineTools.values()).filter(t=>!(this.Editor.ReadOnly.isEnabled&&t.isReadOnlySupported!==!0)):[]}createToolsInstances(){this.tools=new Map,this.getTools().forEach(e=>{const t=e.create();this.tools.set(e,t)})}async getPopoverItems(){const e=[];let t=0;for(const[r,a]of this.tools){const s=await a.render(),i=this.getToolShortcut(r.name);if(i!==void 0)try{this.enableShortcuts(r.name,i)}catch{}const l=i!==void 0?jl(i):void 0,c=At.t(Wt.toolNames,r.title||bs(r.name));[s].flat().forEach(d=>{var u,h;const p={name:r.name,onActivate:()=>{this.toolClicked(a)},hint:{title:c,description:l}};if(Q.isElement(d)){const m={...p,element:d,type:Je.Html};if(tt(a.renderActions)){const f=a.renderActions();m.children={isOpen:(u=a.checkState)==null?void 0:u.call(a,Se.get()),isFlippable:!1,items:[{type:Je.Html,element:f}]}}else(h=a.checkState)==null||h.call(a,Se.get());e.push(m)}else if(d.type===Je.Html)e.push({...p,...d,type:Je.Html});else if(d.type===Je.Separator)e.push({type:Je.Separator});else{const m={...p,...d,type:Je.Default};"children"in m&&t!==0&&e.push({type:Je.Separator}),e.push(m),"children"in m&&t<this.tools.size-1&&e.push({type:Je.Separator})}}),t++}return e}getToolShortcut(e){const{Tools:t}=this.Editor,r=t.inlineTools.get(e),a=t.internal.inlineTools;return Array.from(a.keys()).includes(e)?this.inlineTools[e][Af.Shortcut]:r==null?void 0:r.shortcut}enableShortcuts(e,t){gr.add({name:t,handler:r=>{var a;const{currentBlock:s}=this.Editor.BlockManager;s&&s.tool.enabledInlineTools&&(r.preventDefault(),(a=this.popover)==null||a.activateItemByName(e))},on:document})}toolClicked(e){var t;const r=Se.range;(t=e.surround)==null||t.call(e,r),this.checkToolsState()}checkToolsState(){var e;(e=this.tools)==null||e.forEach(t=>{var r;(r=t.checkState)==null||r.call(t,Se.get())})}get inlineTools(){const e={};return Array.from(this.Editor.Tools.inlineTools.entries()).forEach(([t,r])=>{e[t]=r.create()}),e}}function If(){const n=window.getSelection();if(n===null)return[null,0];let e=n.focusNode,t=n.focusOffset;return e===null?[null,0]:(e.nodeType!==Node.TEXT_NODE&&e.childNodes.length>0&&(e.childNodes[t]?(e=e.childNodes[t],t=0):(e=e.childNodes[t-1],t=e.textContent.length)),[e,t])}function Nf(n,e,t,r){const a=document.createRange();r==="left"?(a.setStart(n,0),a.setEnd(e,t)):(a.setStart(e,t),a.setEnd(n,n.childNodes.length));const s=a.cloneContents(),i=document.createElement("div");i.appendChild(s);const l=i.textContent||"";return lC(l)}function Bs(n){const e=Q.getDeepestNode(n);if(e===null||Q.isEmpty(n))return!0;if(Q.isNativeInput(e))return e.selectionEnd===0;if(Q.isEmpty(n))return!0;const[t,r]=If();return t===null?!1:Nf(n,t,r,"left")}function Ts(n){const e=Q.getDeepestNode(n,!0);if(e===null)return!0;if(Q.isNativeInput(e))return e.selectionEnd===e.value.length;const[t,r]=If();return t===null?!1:Nf(n,t,r,"right")}var Pf={},lc={},$s={},Po={},cc={},dc={};Object.defineProperty(dc,"__esModule",{value:!0}),dc.allInputsSelector=T2;function T2(){var n=["text","password","email","number","search","tel","url"];return"[contenteditable=true], textarea, input:not([type]), "+n.map(function(e){return'input[type="'.concat(e,'"]')}).join(", ")}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.allInputsSelector=void 0;var e=dc;Object.defineProperty(n,"allInputsSelector",{enumerable:!0,get:function(){return e.allInputsSelector}})})(cc);var Lo={},uc={};Object.defineProperty(uc,"__esModule",{value:!0}),uc.isNativeInput=$2;function $2(n){var e=["INPUT","TEXTAREA"];return n&&n.tagName?e.includes(n.tagName):!1}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isNativeInput=void 0;var e=uc;Object.defineProperty(n,"isNativeInput",{enumerable:!0,get:function(){return e.isNativeInput}})})(Lo);var Lf={},hc={};Object.defineProperty(hc,"__esModule",{value:!0}),hc.append=M2;function M2(n,e){Array.isArray(e)?e.forEach(function(t){n.appendChild(t)}):n.appendChild(e)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.append=void 0;var e=hc;Object.defineProperty(n,"append",{enumerable:!0,get:function(){return e.append}})})(Lf);var pc={},fc={};Object.defineProperty(fc,"__esModule",{value:!0}),fc.blockElements=D2;function D2(){return["address","article","aside","blockquote","canvas","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","ruby","section","table","tbody","thead","tr","tfoot","ul","video"]}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.blockElements=void 0;var e=fc;Object.defineProperty(n,"blockElements",{enumerable:!0,get:function(){return e.blockElements}})})(pc);var zf={},mc={};Object.defineProperty(mc,"__esModule",{value:!0}),mc.calculateBaseline=O2;function O2(n){var e=window.getComputedStyle(n),t=parseFloat(e.fontSize),r=parseFloat(e.lineHeight)||t*1.2,a=parseFloat(e.paddingTop),s=parseFloat(e.borderTopWidth),i=parseFloat(e.marginTop),l=t*.8,c=(r-t)/2,d=i+s+a+c+l;return d}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.calculateBaseline=void 0;var e=mc;Object.defineProperty(n,"calculateBaseline",{enumerable:!0,get:function(){return e.calculateBaseline}})})(zf);var Ff={},gc={},yc={},bc={};Object.defineProperty(bc,"__esModule",{value:!0}),bc.isContentEditable=A2;function A2(n){return n.contentEditable==="true"}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isContentEditable=void 0;var e=bc;Object.defineProperty(n,"isContentEditable",{enumerable:!0,get:function(){return e.isContentEditable}})})(yc),Object.defineProperty(gc,"__esModule",{value:!0}),gc.canSetCaret=P2;var I2=Lo,N2=yc;function P2(n){var e=!0;if((0,I2.isNativeInput)(n))switch(n.type){case"file":case"checkbox":case"radio":case"hidden":case"submit":case"button":case"image":case"reset":e=!1;break}else e=(0,N2.isContentEditable)(n);return e}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.canSetCaret=void 0;var e=gc;Object.defineProperty(n,"canSetCaret",{enumerable:!0,get:function(){return e.canSetCaret}})})(Ff);var Ms={},kc={};function L2(n,e,t){const r=t.value!==void 0?"value":"get",a=t[r],s=`#${e}Cache`;if(t[r]=function(...i){return this[s]===void 0&&(this[s]=a.apply(this,i)),this[s]},r==="get"&&t.set){const i=t.set;t.set=function(l){delete n[s],i.apply(this,l)}}return t}function Rf(){const n={win:!1,mac:!1,x11:!1,linux:!1},e=Object.keys(n).find(t=>window.navigator.appVersion.toLowerCase().indexOf(t)!==-1);return e!==void 0&&(n[e]=!0),n}function vc(n){return n!=null&&n!==""&&(typeof n!="object"||Object.keys(n).length>0)}function z2(n){return!vc(n)}const F2=()=>typeof window<"u"&&window.navigator!==null&&vc(window.navigator.platform)&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1);function R2(n){const e=Rf();return n=n.replace(/shift/gi,"⇧").replace(/backspace/gi,"⌫").replace(/enter/gi,"⏎").replace(/up/gi,"↑").replace(/left/gi,"→").replace(/down/gi,"↓").replace(/right/gi,"←").replace(/escape/gi,"⎋").replace(/insert/gi,"Ins").replace(/delete/gi,"␡").replace(/\+/gi,"+"),e.mac?n=n.replace(/ctrl|cmd/gi,"⌘").replace(/alt/gi,"⌥"):n=n.replace(/cmd/gi,"Ctrl").replace(/windows/gi,"WIN"),n}function V2(n){return n[0].toUpperCase()+n.slice(1)}function H2(n){const e=document.createElement("div");e.style.position="absolute",e.style.left="-999px",e.style.bottom="-999px",e.innerHTML=n,document.body.appendChild(e);const t=window.getSelection(),r=document.createRange();if(r.selectNode(e),t===null)throw new Error("Cannot copy text to clipboard");t.removeAllRanges(),t.addRange(r),document.execCommand("copy"),document.body.removeChild(e)}function j2(n,e,t){let r;return(...a)=>{const s=this,i=()=>{r=void 0,t!==!0&&n.apply(s,a)},l=t===!0&&r!==void 0;window.clearTimeout(r),r=window.setTimeout(i,e),l&&n.apply(s,a)}}function ho(n){return Object.prototype.toString.call(n).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function Y2(n){return ho(n)==="boolean"}function Vf(n){return ho(n)==="function"||ho(n)==="asyncfunction"}function U2(n){return Vf(n)&&/^\s*class\s+/.test(n.toString())}function W2(n){return ho(n)==="number"}function Ds(n){return ho(n)==="object"}function q2(n){return Promise.resolve(n)===n}function G2(n){return ho(n)==="string"}function K2(n){return ho(n)==="undefined"}function wc(n,...e){if(!e.length)return n;const t=e.shift();if(Ds(n)&&Ds(t))for(const r in t)Ds(t[r])?(n[r]===void 0&&Object.assign(n,{[r]:{}}),wc(n[r],t[r])):Object.assign(n,{[r]:t[r]});return wc(n,...e)}function X2(n,e,t){const r=`«${e}» is deprecated and will be removed in the next major release. Please use the «${t}» instead.`;n&&console.warn(r)}function Q2(n){try{return new URL(n).href}catch{}return n.substring(0,2)==="//"?window.location.protocol+n:window.location.origin+n}function Z2(n){return n>47&&n<58||n===32||n===13||n===229||n>64&&n<91||n>95&&n<112||n>185&&n<193||n>218&&n<223}const J2={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,LEFT:37,UP:38,DOWN:40,RIGHT:39,DELETE:46,META:91,SLASH:191},eE={LEFT:0,WHEEL:1,RIGHT:2,BACKWARD:3,FORWARD:4};let tE=class{constructor(){this.completed=Promise.resolve()}add(n){return new Promise((e,t)=>{this.completed=this.completed.then(n).then(e).catch(t)})}};function nE(n,e,t=void 0){let r,a,s,i=null,l=0;t||(t={});const c=function(){l=t.leading===!1?0:Date.now(),i=null,s=n.apply(r,a),i===null&&(r=a=null)};return function(){const d=Date.now();!l&&t.leading===!1&&(l=d);const u=e-(d-l);return r=this,a=arguments,u<=0||u>e?(i&&(clearTimeout(i),i=null),l=d,s=n.apply(r,a),i===null&&(r=a=null)):!i&&t.trailing!==!1&&(i=setTimeout(c,u)),s}}const oE=Object.freeze(Object.defineProperty({__proto__:null,PromiseQueue:tE,beautifyShortcut:R2,cacheable:L2,capitalize:V2,copyTextToClipboard:H2,debounce:j2,deepMerge:wc,deprecationAssert:X2,getUserOS:Rf,getValidUrl:Q2,isBoolean:Y2,isClass:U2,isEmpty:z2,isFunction:Vf,isIosDevice:F2,isNumber:W2,isObject:Ds,isPrintableKey:Z2,isPromise:q2,isString:G2,isUndefined:K2,keyCodes:J2,mouseButtons:eE,notEmpty:vc,throttle:nE,typeOf:ho},Symbol.toStringTag,{value:"Module"})),_c=G_(oE);Object.defineProperty(kc,"__esModule",{value:!0}),kc.containsOnlyInlineElements=sE;var rE=_c,aE=pc;function sE(n){var e;(0,rE.isString)(n)?(e=document.createElement("div"),e.innerHTML=n):e=n;var t=function(r){return!(0,aE.blockElements)().includes(r.tagName.toLowerCase())&&Array.from(r.children).every(t)};return Array.from(e.children).every(t)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.containsOnlyInlineElements=void 0;var e=kc;Object.defineProperty(n,"containsOnlyInlineElements",{enumerable:!0,get:function(){return e.containsOnlyInlineElements}})})(Ms);var Hf={},Cc={},Os={},Ec={};Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.make=iE;function iE(n,e,t){var r;e===void 0&&(e=null),t===void 0&&(t={});var a=document.createElement(n);if(Array.isArray(e)){var s=e.filter(function(l){return l!==void 0});(r=a.classList).add.apply(r,s)}else e!==null&&a.classList.add(e);for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(a[i]=t[i]);return a}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.make=void 0;var e=Ec;Object.defineProperty(n,"make",{enumerable:!0,get:function(){return e.make}})})(Os),Object.defineProperty(Cc,"__esModule",{value:!0}),Cc.fragmentToString=cE;var lE=Os;function cE(n){var e=(0,lE.make)("div");return e.appendChild(n),e.innerHTML}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.fragmentToString=void 0;var e=Cc;Object.defineProperty(n,"fragmentToString",{enumerable:!0,get:function(){return e.fragmentToString}})})(Hf);var jf={},Sc={};Object.defineProperty(Sc,"__esModule",{value:!0}),Sc.getContentLength=uE;var dE=Lo;function uE(n){var e,t;return(0,dE.isNativeInput)(n)?n.value.length:n.nodeType===Node.TEXT_NODE?n.length:(t=(e=n.textContent)===null||e===void 0?void 0:e.length)!==null&&t!==void 0?t:0}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getContentLength=void 0;var e=Sc;Object.defineProperty(n,"getContentLength",{enumerable:!0,get:function(){return e.getContentLength}})})(jf);var xc={},Bc={},Yf=Zr&&Zr.__spreadArray||function(n,e,t){if(t||arguments.length===2)for(var r=0,a=e.length,s;r<a;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return n.concat(s||Array.prototype.slice.call(e))};Object.defineProperty(Bc,"__esModule",{value:!0}),Bc.getDeepestBlockElements=Uf;var hE=Ms;function Uf(n){return(0,hE.containsOnlyInlineElements)(n)?[n]:Array.from(n.children).reduce(function(e,t){return Yf(Yf([],e,!0),Uf(t),!0)},[])}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getDeepestBlockElements=void 0;var e=Bc;Object.defineProperty(n,"getDeepestBlockElements",{enumerable:!0,get:function(){return e.getDeepestBlockElements}})})(xc);var Wf={},Tc={},As={},$c={};Object.defineProperty($c,"__esModule",{value:!0}),$c.isLineBreakTag=pE;function pE(n){return["BR","WBR"].includes(n.tagName)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isLineBreakTag=void 0;var e=$c;Object.defineProperty(n,"isLineBreakTag",{enumerable:!0,get:function(){return e.isLineBreakTag}})})(As);var Is={},Mc={};Object.defineProperty(Mc,"__esModule",{value:!0}),Mc.isSingleTag=fE;function fE(n){return["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"].includes(n.tagName)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isSingleTag=void 0;var e=Mc;Object.defineProperty(n,"isSingleTag",{enumerable:!0,get:function(){return e.isSingleTag}})})(Is),Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.getDeepestNode=qf;var mE=Lo,gE=As,yE=Is;function qf(n,e){e===void 0&&(e=!1);var t=e?"lastChild":"firstChild",r=e?"previousSibling":"nextSibling";if(n.nodeType===Node.ELEMENT_NODE&&n[t]){var a=n[t];if((0,yE.isSingleTag)(a)&&!(0,mE.isNativeInput)(a)&&!(0,gE.isLineBreakTag)(a))if(a[r])a=a[r];else if(a.parentNode!==null&&a.parentNode[r])a=a.parentNode[r];else return a.parentNode;return qf(a,e)}return n}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getDeepestNode=void 0;var e=Tc;Object.defineProperty(n,"getDeepestNode",{enumerable:!0,get:function(){return e.getDeepestNode}})})(Wf);var Gf={},Dc={},Ns=Zr&&Zr.__spreadArray||function(n,e,t){if(t||arguments.length===2)for(var r=0,a=e.length,s;r<a;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return n.concat(s||Array.prototype.slice.call(e))};Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.findAllInputs=_E;var bE=Ms,kE=xc,vE=cc,wE=Lo;function _E(n){return Array.from(n.querySelectorAll((0,vE.allInputsSelector)())).reduce(function(e,t){return(0,wE.isNativeInput)(t)||(0,bE.containsOnlyInlineElements)(t)?Ns(Ns([],e,!0),[t],!1):Ns(Ns([],e,!0),(0,kE.getDeepestBlockElements)(t),!0)},[])}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.findAllInputs=void 0;var e=Dc;Object.defineProperty(n,"findAllInputs",{enumerable:!0,get:function(){return e.findAllInputs}})})(Gf);var Kf={},Oc={};Object.defineProperty(Oc,"__esModule",{value:!0}),Oc.isCollapsedWhitespaces=CE;function CE(n){return!/[^\t\n\r ]/.test(n)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isCollapsedWhitespaces=void 0;var e=Oc;Object.defineProperty(n,"isCollapsedWhitespaces",{enumerable:!0,get:function(){return e.isCollapsedWhitespaces}})})(Kf);var Ac={},Ic={};Object.defineProperty(Ic,"__esModule",{value:!0}),Ic.isElement=SE;var EE=_c;function SE(n){return(0,EE.isNumber)(n)?!1:!!n&&!!n.nodeType&&n.nodeType===Node.ELEMENT_NODE}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isElement=void 0;var e=Ic;Object.defineProperty(n,"isElement",{enumerable:!0,get:function(){return e.isElement}})})(Ac);var Xf={},Nc={},Pc={},Lc={};Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.isLeaf=xE;function xE(n){return n===null?!1:n.childNodes.length===0}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isLeaf=void 0;var e=Lc;Object.defineProperty(n,"isLeaf",{enumerable:!0,get:function(){return e.isLeaf}})})(Pc);var zc={},Fc={};Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.isNodeEmpty=DE;var BE=As,TE=Ac,$E=Lo,ME=Is;function DE(n,e){var t="";return(0,ME.isSingleTag)(n)&&!(0,BE.isLineBreakTag)(n)?!1:((0,TE.isElement)(n)&&(0,$E.isNativeInput)(n)?t=n.value:n.textContent!==null&&(t=n.textContent.replace("","")),e!==void 0&&(t=t.replace(new RegExp(e,"g"),"")),t.trim().length===0)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isNodeEmpty=void 0;var e=Fc;Object.defineProperty(n,"isNodeEmpty",{enumerable:!0,get:function(){return e.isNodeEmpty}})})(zc),Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.isEmpty=IE;var OE=Pc,AE=zc;function IE(n,e){n.normalize();for(var t=[n];t.length>0;){var r=t.shift();if(r){if(n=r,(0,OE.isLeaf)(n)&&!(0,AE.isNodeEmpty)(n,e))return!1;t.push.apply(t,Array.from(n.childNodes))}}return!0}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isEmpty=void 0;var e=Nc;Object.defineProperty(n,"isEmpty",{enumerable:!0,get:function(){return e.isEmpty}})})(Xf);var Qf={},Rc={};Object.defineProperty(Rc,"__esModule",{value:!0}),Rc.isFragment=PE;var NE=_c;function PE(n){return(0,NE.isNumber)(n)?!1:!!n&&!!n.nodeType&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isFragment=void 0;var e=Rc;Object.defineProperty(n,"isFragment",{enumerable:!0,get:function(){return e.isFragment}})})(Qf);var Zf={},Vc={};Object.defineProperty(Vc,"__esModule",{value:!0}),Vc.isHTMLString=zE;var LE=Os;function zE(n){var e=(0,LE.make)("div");return e.innerHTML=n,e.childElementCount>0}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isHTMLString=void 0;var e=Vc;Object.defineProperty(n,"isHTMLString",{enumerable:!0,get:function(){return e.isHTMLString}})})(Zf);var Jf={},Hc={};Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.offset=FE;function FE(n){var e=n.getBoundingClientRect(),t=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop,a=e.top+r,s=e.left+t;return{top:a,left:s,bottom:a+e.height,right:s+e.width}}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.offset=void 0;var e=Hc;Object.defineProperty(n,"offset",{enumerable:!0,get:function(){return e.offset}})})(Jf);var em={},jc={};Object.defineProperty(jc,"__esModule",{value:!0}),jc.prepend=RE;function RE(n,e){Array.isArray(e)?(e=e.reverse(),e.forEach(function(t){return n.prepend(t)})):n.prepend(e)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.prepend=void 0;var e=jc;Object.defineProperty(n,"prepend",{enumerable:!0,get:function(){return e.prepend}})})(em),function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.prepend=n.offset=n.make=n.isLineBreakTag=n.isSingleTag=n.isNodeEmpty=n.isLeaf=n.isHTMLString=n.isFragment=n.isEmpty=n.isElement=n.isContentEditable=n.isCollapsedWhitespaces=n.findAllInputs=n.isNativeInput=n.allInputsSelector=n.getDeepestNode=n.getDeepestBlockElements=n.getContentLength=n.fragmentToString=n.containsOnlyInlineElements=n.canSetCaret=n.calculateBaseline=n.blockElements=n.append=void 0;var e=cc;Object.defineProperty(n,"allInputsSelector",{enumerable:!0,get:function(){return e.allInputsSelector}});var t=Lo;Object.defineProperty(n,"isNativeInput",{enumerable:!0,get:function(){return t.isNativeInput}});var r=Lf;Object.defineProperty(n,"append",{enumerable:!0,get:function(){return r.append}});var a=pc;Object.defineProperty(n,"blockElements",{enumerable:!0,get:function(){return a.blockElements}});var s=zf;Object.defineProperty(n,"calculateBaseline",{enumerable:!0,get:function(){return s.calculateBaseline}});var i=Ff;Object.defineProperty(n,"canSetCaret",{enumerable:!0,get:function(){return i.canSetCaret}});var l=Ms;Object.defineProperty(n,"containsOnlyInlineElements",{enumerable:!0,get:function(){return l.containsOnlyInlineElements}});var c=Hf;Object.defineProperty(n,"fragmentToString",{enumerable:!0,get:function(){return c.fragmentToString}});var d=jf;Object.defineProperty(n,"getContentLength",{enumerable:!0,get:function(){return d.getContentLength}});var u=xc;Object.defineProperty(n,"getDeepestBlockElements",{enumerable:!0,get:function(){return u.getDeepestBlockElements}});var h=Wf;Object.defineProperty(n,"getDeepestNode",{enumerable:!0,get:function(){return h.getDeepestNode}});var p=Gf;Object.defineProperty(n,"findAllInputs",{enumerable:!0,get:function(){return p.findAllInputs}});var m=Kf;Object.defineProperty(n,"isCollapsedWhitespaces",{enumerable:!0,get:function(){return m.isCollapsedWhitespaces}});var f=yc;Object.defineProperty(n,"isContentEditable",{enumerable:!0,get:function(){return f.isContentEditable}});var g=Ac;Object.defineProperty(n,"isElement",{enumerable:!0,get:function(){return g.isElement}});var x=Xf;Object.defineProperty(n,"isEmpty",{enumerable:!0,get:function(){return x.isEmpty}});var E=Qf;Object.defineProperty(n,"isFragment",{enumerable:!0,get:function(){return E.isFragment}});var C=Zf;Object.defineProperty(n,"isHTMLString",{enumerable:!0,get:function(){return C.isHTMLString}});var T=Pc;Object.defineProperty(n,"isLeaf",{enumerable:!0,get:function(){return T.isLeaf}});var F=zc;Object.defineProperty(n,"isNodeEmpty",{enumerable:!0,get:function(){return F.isNodeEmpty}});var I=As;Object.defineProperty(n,"isLineBreakTag",{enumerable:!0,get:function(){return I.isLineBreakTag}});var O=Is;Object.defineProperty(n,"isSingleTag",{enumerable:!0,get:function(){return O.isSingleTag}});var P=Os;Object.defineProperty(n,"make",{enumerable:!0,get:function(){return P.make}});var M=Jf;Object.defineProperty(n,"offset",{enumerable:!0,get:function(){return M.offset}});var v=em;Object.defineProperty(n,"prepend",{enumerable:!0,get:function(){return v.prepend}})}(Po);var Ps={};Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.getContenteditableSlice=HE;var VE=Po;function HE(n,e,t,r,a){var s;a===void 0&&(a=!1);var i=document.createRange();if(r==="left"?(i.setStart(n,0),i.setEnd(e,t)):(i.setStart(e,t),i.setEnd(n,n.childNodes.length)),a===!0){var l=i.extractContents();return(0,VE.fragmentToString)(l)}var c=i.cloneContents(),d=document.createElement("div");d.appendChild(c);var u=(s=d.textContent)!==null&&s!==void 0?s:"";return u}Object.defineProperty($s,"__esModule",{value:!0}),$s.checkContenteditableSliceForEmptiness=UE;var jE=Po,YE=Ps;function UE(n,e,t,r){var a=(0,YE.getContenteditableSlice)(n,e,t,r);return(0,jE.isCollapsedWhitespaces)(a)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.checkContenteditableSliceForEmptiness=void 0;var e=$s;Object.defineProperty(n,"checkContenteditableSliceForEmptiness",{enumerable:!0,get:function(){return e.checkContenteditableSliceForEmptiness}})})(lc);var tm={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getContenteditableSlice=void 0;var e=Ps;Object.defineProperty(n,"getContenteditableSlice",{enumerable:!0,get:function(){return e.getContenteditableSlice}})})(tm);var nm={},Yc={};Object.defineProperty(Yc,"__esModule",{value:!0}),Yc.focus=qE;var WE=Po;function qE(n,e){var t,r;if(e===void 0&&(e=!0),(0,WE.isNativeInput)(n)){n.focus();var a=e?0:n.value.length;n.setSelectionRange(a,a)}else{var s=document.createRange(),i=window.getSelection();if(!i)return;var l=function(p){var m=document.createTextNode("");p.appendChild(m),s.setStart(m,0),s.setEnd(m,0)},c=function(p){return p!=null},d=n.childNodes,u=e?d[0]:d[d.length-1];if(c(u)){for(;c(u)&&u.nodeType!==Node.TEXT_NODE;)u=e?u.firstChild:u.lastChild;if(c(u)&&u.nodeType===Node.TEXT_NODE){var h=(r=(t=u.textContent)===null||t===void 0?void 0:t.length)!==null&&r!==void 0?r:0,a=e?0:h;s.setStart(u,a),s.setEnd(u,a)}else l(n)}else l(n);i.removeAllRanges(),i.addRange(s)}}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.focus=void 0;var e=Yc;Object.defineProperty(n,"focus",{enumerable:!0,get:function(){return e.focus}})})(nm);var Uc={},Ls={};Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.getCaretNodeAndOffset=GE;function GE(){var n=window.getSelection();if(n===null)return[null,0];var e=n.focusNode,t=n.focusOffset;return e===null?[null,0]:(e.nodeType!==Node.TEXT_NODE&&e.childNodes.length>0&&(e.childNodes[t]!==void 0?(e=e.childNodes[t],t=0):(e=e.childNodes[t-1],e.textContent!==null&&(t=e.textContent.length))),[e,t])}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getCaretNodeAndOffset=void 0;var e=Ls;Object.defineProperty(n,"getCaretNodeAndOffset",{enumerable:!0,get:function(){return e.getCaretNodeAndOffset}})})(Uc);var om={},zs={};Object.defineProperty(zs,"__esModule",{value:!0}),zs.getRange=KE;function KE(){var n=window.getSelection();return n&&n.rangeCount?n.getRangeAt(0):null}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getRange=void 0;var e=zs;Object.defineProperty(n,"getRange",{enumerable:!0,get:function(){return e.getRange}})})(om);var rm={},Wc={};Object.defineProperty(Wc,"__esModule",{value:!0}),Wc.isCaretAtEndOfInput=ZE;var am=Po,XE=Uc,QE=lc;function ZE(n){var e=(0,am.getDeepestNode)(n,!0);if(e===null)return!0;if((0,am.isNativeInput)(e))return e.selectionEnd===e.value.length;var t=(0,XE.getCaretNodeAndOffset)(),r=t[0],a=t[1];return r===null?!1:(0,QE.checkContenteditableSliceForEmptiness)(n,r,a,"right")}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isCaretAtEndOfInput=void 0;var e=Wc;Object.defineProperty(n,"isCaretAtEndOfInput",{enumerable:!0,get:function(){return e.isCaretAtEndOfInput}})})(rm);var sm={},qc={};Object.defineProperty(qc,"__esModule",{value:!0}),qc.isCaretAtStartOfInput=tS;var Fs=Po,JE=Ls,eS=$s;function tS(n){var e=(0,Fs.getDeepestNode)(n);if(e===null||(0,Fs.isEmpty)(n))return!0;if((0,Fs.isNativeInput)(e))return e.selectionEnd===0;if((0,Fs.isEmpty)(n))return!0;var t=(0,JE.getCaretNodeAndOffset)(),r=t[0],a=t[1];return r===null?!1:(0,eS.checkContenteditableSliceForEmptiness)(n,r,a,"left")}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isCaretAtStartOfInput=void 0;var e=qc;Object.defineProperty(n,"isCaretAtStartOfInput",{enumerable:!0,get:function(){return e.isCaretAtStartOfInput}})})(sm);var im={},Gc={};Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.save=rS;var nS=Po,oS=zs;function rS(){var n=(0,oS.getRange)(),e=(0,nS.make)("span");if(e.id="cursor",e.hidden=!0,!!n)return n.insertNode(e),function(){var t=window.getSelection();t&&(n.setStartAfter(e),n.setEndAfter(e),t.removeAllRanges(),t.addRange(n),setTimeout(function(){e.remove()},150))}}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.save=void 0;var e=Gc;Object.defineProperty(n,"save",{enumerable:!0,get:function(){return e.save}})})(im),function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.save=n.isCaretAtStartOfInput=n.isCaretAtEndOfInput=n.getRange=n.getCaretNodeAndOffset=n.focus=n.getContenteditableSlice=n.checkContenteditableSliceForEmptiness=void 0;var e=lc;Object.defineProperty(n,"checkContenteditableSliceForEmptiness",{enumerable:!0,get:function(){return e.checkContenteditableSliceForEmptiness}});var t=tm;Object.defineProperty(n,"getContenteditableSlice",{enumerable:!0,get:function(){return t.getContenteditableSlice}});var r=nm;Object.defineProperty(n,"focus",{enumerable:!0,get:function(){return r.focus}});var a=Uc;Object.defineProperty(n,"getCaretNodeAndOffset",{enumerable:!0,get:function(){return a.getCaretNodeAndOffset}});var s=om;Object.defineProperty(n,"getRange",{enumerable:!0,get:function(){return s.getRange}});var i=rm;Object.defineProperty(n,"isCaretAtEndOfInput",{enumerable:!0,get:function(){return i.isCaretAtEndOfInput}});var l=sm;Object.defineProperty(n,"isCaretAtStartOfInput",{enumerable:!0,get:function(){return l.isCaretAtStartOfInput}});var c=im;Object.defineProperty(n,"save",{enumerable:!0,get:function(){return c.save}})}(Pf);class aS extends ze{keydown(e){switch(this.beforeKeydownProcessing(e),e.keyCode){case Me.BACKSPACE:this.backspace(e);break;case Me.DELETE:this.delete(e);break;case Me.ENTER:this.enter(e);break;case Me.DOWN:case Me.RIGHT:this.arrowRightAndDown(e);break;case Me.UP:case Me.LEFT:this.arrowLeftAndUp(e);break;case Me.TAB:this.tabPressed(e);break}e.key==="/"&&!e.ctrlKey&&!e.metaKey&&this.slashPressed(e),e.code==="Slash"&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),this.commandSlashPressed())}beforeKeydownProcessing(e){this.needToolbarClosing(e)&&ef(e.keyCode)&&(this.Editor.Toolbar.close(),e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||this.Editor.BlockSelection.clearSelection(e))}keyup(e){e.shiftKey||this.Editor.UI.checkEmptiness()}dragOver(e){const t=this.Editor.BlockManager.getBlockByChildNode(e.target);t.dropTarget=!0}dragLeave(e){const t=this.Editor.BlockManager.getBlockByChildNode(e.target);t.dropTarget=!1}handleCommandC(e){const{BlockSelection:t}=this.Editor;t.anyBlockSelected&&t.copySelectedBlocks(e)}handleCommandX(e){const{BlockSelection:t,BlockManager:r,Caret:a}=this.Editor;t.anyBlockSelected&&t.copySelectedBlocks(e).then(()=>{const s=r.removeSelectedBlocks(),i=r.insertDefaultBlockAtIndex(s,!0);a.setToBlock(i,a.positions.START),t.clearSelection(e)})}tabPressed(e){const{InlineToolbar:t,Caret:r}=this.Editor;t.opened||(e.shiftKey?r.navigatePrevious(!0):r.navigateNext(!0))&&e.preventDefault()}commandSlashPressed(){this.Editor.BlockSelection.selectedBlocks.length>1||this.activateBlockSettings()}slashPressed(e){!this.Editor.UI.nodes.wrapper.contains(e.target)||!this.Editor.BlockManager.currentBlock.isEmpty||(e.preventDefault(),this.Editor.Caret.insertContentAtCaretPosition("/"),this.activateToolbox())}enter(e){const{BlockManager:t,UI:r}=this.Editor,a=t.currentBlock;if(a===void 0||a.tool.isLineBreaksEnabled||r.someToolbarOpened&&r.someFlipperButtonFocused||e.shiftKey&&!Ul)return;let s=a;a.currentInput!==void 0&&Bs(a.currentInput)&&!a.hasMedia?this.Editor.BlockManager.insertDefaultBlockAtIndex(this.Editor.BlockManager.currentBlockIndex):a.currentInput&&Ts(a.currentInput)?s=this.Editor.BlockManager.insertDefaultBlockAtIndex(this.Editor.BlockManager.currentBlockIndex+1):s=this.Editor.BlockManager.split(),this.Editor.Caret.setToBlock(s),this.Editor.Toolbar.moveAndOpen(s),e.preventDefault()}backspace(e){const{BlockManager:t,Caret:r}=this.Editor,{currentBlock:a,previousBlock:s}=t;if(!(a===void 0||!Se.isCollapsed||!a.currentInput||!Bs(a.currentInput))){if(e.preventDefault(),this.Editor.Toolbar.close(),a.currentInput!==a.firstInput){r.navigatePrevious();return}if(s!==null){if(s.isEmpty){t.removeBlock(s);return}if(a.isEmpty){t.removeBlock(a);const i=t.currentBlock;r.setToBlock(i,r.positions.END);return}ff(s,a)?this.mergeBlocks(s,a):r.setToBlock(s,r.positions.END)}}}delete(e){const{BlockManager:t,Caret:r}=this.Editor,{currentBlock:a,nextBlock:s}=t;if(!(!Se.isCollapsed||!Ts(a.currentInput))){if(e.preventDefault(),this.Editor.Toolbar.close(),a.currentInput!==a.lastInput){r.navigateNext();return}if(s!==null){if(s.isEmpty){t.removeBlock(s);return}if(a.isEmpty){t.removeBlock(a),r.setToBlock(s,r.positions.START);return}ff(a,s)?this.mergeBlocks(a,s):r.setToBlock(s,r.positions.START)}}}mergeBlocks(e,t){const{BlockManager:r,Toolbar:a}=this.Editor;e.lastInput!==void 0&&(Pf.focus(e.lastInput,!1),r.mergeBlocks(e,t).then(()=>{a.close()}))}arrowRightAndDown(e){const t=_s.usedKeys.includes(e.keyCode)&&(!e.shiftKey||e.keyCode===Me.TAB);if(this.Editor.UI.someToolbarOpened&&t)return;this.Editor.Toolbar.close();const{currentBlock:r}=this.Editor.BlockManager,a=((r==null?void 0:r.currentInput)!==void 0?Ts(r.currentInput):void 0)||this.Editor.BlockSelection.anyBlockSelected;if(e.shiftKey&&e.keyCode===Me.DOWN&&a){this.Editor.CrossBlockSelection.toggleBlockSelectedState();return}if(e.keyCode===Me.DOWN||e.keyCode===Me.RIGHT&&!this.isRtl?this.Editor.Caret.navigateNext():this.Editor.Caret.navigatePrevious()){e.preventDefault();return}ys(()=>{this.Editor.BlockManager.currentBlock&&this.Editor.BlockManager.currentBlock.updateCurrentInput()},20)(),this.Editor.BlockSelection.clearSelection(e)}arrowLeftAndUp(e){if(this.Editor.UI.someToolbarOpened){if(_s.usedKeys.includes(e.keyCode)&&(!e.shiftKey||e.keyCode===Me.TAB))return;this.Editor.UI.closeAllToolbars()}this.Editor.Toolbar.close();const{currentBlock:t}=this.Editor.BlockManager,r=((t==null?void 0:t.currentInput)!==void 0?Bs(t.currentInput):void 0)||this.Editor.BlockSelection.anyBlockSelected;if(e.shiftKey&&e.keyCode===Me.UP&&r){this.Editor.CrossBlockSelection.toggleBlockSelectedState(!1);return}if(e.keyCode===Me.UP||e.keyCode===Me.LEFT&&!this.isRtl?this.Editor.Caret.navigatePrevious():this.Editor.Caret.navigateNext()){e.preventDefault();return}ys(()=>{this.Editor.BlockManager.currentBlock&&this.Editor.BlockManager.currentBlock.updateCurrentInput()},20)(),this.Editor.BlockSelection.clearSelection(e)}needToolbarClosing(e){const t=e.keyCode===Me.ENTER&&this.Editor.Toolbar.toolbox.opened,r=e.keyCode===Me.ENTER&&this.Editor.BlockSettings.opened,a=e.keyCode===Me.ENTER&&this.Editor.InlineToolbar.opened,s=e.keyCode===Me.TAB;return!(e.shiftKey||s||t||r||a)}activateToolbox(){this.Editor.Toolbar.opened||this.Editor.Toolbar.moveAndOpen(),this.Editor.Toolbar.toolbox.open()}activateBlockSettings(){this.Editor.Toolbar.opened||this.Editor.Toolbar.moveAndOpen(),this.Editor.BlockSettings.opened||this.Editor.BlockSettings.open()}}class Kc{constructor(e){this.blocks=[],this.workingArea=e}get length(){return this.blocks.length}get array(){return this.blocks}get nodes(){return tf(this.workingArea.children)}static set(e,t,r){return isNaN(Number(t))?(Reflect.set(e,t,r),!0):(e.insert(+t,r),!0)}static get(e,t){return isNaN(Number(t))?Reflect.get(e,t):e.get(+t)}push(e){this.blocks.push(e),this.insertToDOM(e)}swap(e,t){const r=this.blocks[t];Q.swap(this.blocks[e].holder,r.holder),this.blocks[t]=this.blocks[e],this.blocks[e]=r}move(e,t){const r=this.blocks.splice(t,1)[0],a=e-1,s=Math.max(0,a),i=this.blocks[s];e>0?this.insertToDOM(r,"afterend",i):this.insertToDOM(r,"beforebegin",i),this.blocks.splice(e,0,r);const l=this.composeBlockEvent("move",{fromIndex:t,toIndex:e});r.call(Hn.MOVED,l)}insert(e,t,r=!1){if(!this.length){this.push(t);return}e>this.length&&(e=this.length),r&&(this.blocks[e].holder.remove(),this.blocks[e].call(Hn.REMOVED));const a=r?1:0;if(this.blocks.splice(e,a,t),e>0){const s=this.blocks[e-1];this.insertToDOM(t,"afterend",s)}else{const s=this.blocks[e+1];s?this.insertToDOM(t,"beforebegin",s):this.insertToDOM(t)}}replace(e,t){if(this.blocks[e]===void 0)throw Error("Incorrect index");this.blocks[e].holder.replaceWith(t.holder),this.blocks[e]=t}insertMany(e,t){const r=new DocumentFragment;for(const a of e)r.appendChild(a.holder);if(this.length>0){if(t>0){const a=Math.min(t-1,this.length-1);this.blocks[a].holder.after(r)}else t===0&&this.workingArea.prepend(r);this.blocks.splice(t,0,...e)}else this.blocks.push(...e),this.workingArea.appendChild(r);e.forEach(a=>a.call(Hn.RENDERED))}remove(e){isNaN(e)&&(e=this.length-1),this.blocks[e].holder.remove(),this.blocks[e].call(Hn.REMOVED),this.blocks.splice(e,1)}removeAll(){this.workingArea.innerHTML="",this.blocks.forEach(e=>e.call(Hn.REMOVED)),this.blocks.length=0}insertAfter(e,t){const r=this.blocks.indexOf(e);this.insert(r+1,t)}get(e){return this.blocks[e]}indexOf(e){return this.blocks.indexOf(e)}insertToDOM(e,t,r){t?r.holder.insertAdjacentElement(t,e.holder):this.workingArea.appendChild(e.holder),e.call(Hn.RENDERED)}composeBlockEvent(e,t){return new CustomEvent(e,{detail:t})}}const lm="block-removed",cm="block-added",sS="block-moved",dm="block-changed";class iS{constructor(){this.completed=Promise.resolve()}add(e){return new Promise((t,r)=>{this.completed=this.completed.then(e).then(t).catch(r)})}}class lS extends ze{constructor(){super(...arguments),this._currentBlockIndex=-1,this._blocks=null}get currentBlockIndex(){return this._currentBlockIndex}set currentBlockIndex(e){this._currentBlockIndex=e}get firstBlock(){return this._blocks[0]}get lastBlock(){return this._blocks[this._blocks.length-1]}get currentBlock(){return this._blocks[this.currentBlockIndex]}set currentBlock(e){this.currentBlockIndex=this.getBlockIndex(e)}get nextBlock(){return this.currentBlockIndex===this._blocks.length-1?null:this._blocks[this.currentBlockIndex+1]}get nextContentfulBlock(){return this.blocks.slice(this.currentBlockIndex+1).find(e=>!!e.inputs.length)}get previousContentfulBlock(){return this.blocks.slice(0,this.currentBlockIndex).reverse().find(e=>!!e.inputs.length)}get previousBlock(){return this.currentBlockIndex===0?null:this._blocks[this.currentBlockIndex-1]}get blocks(){return this._blocks.array}get isEditorEmpty(){return this.blocks.every(e=>e.isEmpty)}prepare(){const e=new Kc(this.Editor.UI.nodes.redactor);this._blocks=new Proxy(e,{set:Kc.set,get:Kc.get}),this.listeners.on(document,"copy",t=>this.Editor.BlockEvents.handleCommandC(t))}toggleReadOnly(e){e?this.disableModuleBindings():this.enableModuleBindings()}composeBlock({tool:e,data:t={},id:r=void 0,tunes:a={}}){const s=this.Editor.ReadOnly.isEnabled,i=this.Editor.Tools.blockTools.get(e),l=new jn({id:r,data:t,tool:i,api:this.Editor.API,readOnly:s,tunesData:a},this.eventsDispatcher);return s||window.requestIdleCallback(()=>{this.bindBlockEvents(l)},{timeout:2e3}),l}insert({id:e=void 0,tool:t=this.config.defaultBlock,data:r={},index:a,needToFocus:s=!0,replace:i=!1,tunes:l={}}={}){let c=a;c===void 0&&(c=this.currentBlockIndex+(i?0:1));const d=this.composeBlock({id:e,tool:t,data:r,tunes:l});return i&&this.blockDidMutated(lm,this.getBlockByIndex(c),{index:c}),this._blocks.insert(c,d,i),this.blockDidMutated(cm,d,{index:c}),s?this.currentBlockIndex=c:c<=this.currentBlockIndex&&this.currentBlockIndex++,d}insertMany(e,t=0){this._blocks.insertMany(e,t)}async update(e,t,r){if(!t&&!r)return e;const a=await e.data,s=this.composeBlock({id:e.id,tool:e.name,data:Object.assign({},a,t??{}),tunes:r??e.tunes}),i=this.getBlockIndex(e);return this._blocks.replace(i,s),this.blockDidMutated(dm,s,{index:i}),s}replace(e,t,r){const a=this.getBlockIndex(e);return this.insert({tool:t,data:r,index:a,replace:!0})}paste(e,t,r=!1){const a=this.insert({tool:e,replace:r});try{window.requestIdleCallback(()=>{a.call(Hn.ON_PASTE,t)})}catch(s){Ye(`${e}: onPaste callback call is failed`,"error",s)}return a}insertDefaultBlockAtIndex(e,t=!1){const r=this.composeBlock({tool:this.config.defaultBlock});return this._blocks[e]=r,this.blockDidMutated(cm,r,{index:e}),t?this.currentBlockIndex=e:e<=this.currentBlockIndex&&this.currentBlockIndex++,r}insertAtEnd(){return this.currentBlockIndex=this.blocks.length-1,this.insert()}async mergeBlocks(e,t){let r;if(e.name===t.name&&e.mergeable){const a=await t.data;if(Zt(a)){console.error("Could not merge Block. Failed to extract original Block data.");return}const[s]=Gl([a],e.tool.sanitizeConfig);r=s}else if(e.mergeable&&ks(t,"export")&&ks(e,"import")){const a=await t.exportDataAsString(),s=_n(a,e.tool.sanitizeConfig);r=mf(s,e.tool.conversionConfig)}r!==void 0&&(await e.mergeWith(r),this.removeBlock(t),this.currentBlockIndex=this._blocks.indexOf(e))}removeBlock(e,t=!0){return new Promise(r=>{const a=this._blocks.indexOf(e);if(!this.validateIndex(a))throw new Error("Can't find a Block to remove");this._blocks.remove(a),e.destroy(),this.blockDidMutated(lm,e,{index:a}),this.currentBlockIndex>=a&&this.currentBlockIndex--,this.blocks.length?a===0&&(this.currentBlockIndex=0):(this.unsetCurrentBlock(),t&&this.insert()),r()})}removeSelectedBlocks(){let e;for(let t=this.blocks.length-1;t>=0;t--)this.blocks[t].selected&&(this.removeBlock(this.blocks[t]),e=t);return e}removeAllBlocks(){for(let e=this.blocks.length-1;e>=0;e--)this._blocks.remove(e);this.unsetCurrentBlock(),this.insert(),this.currentBlock.firstInput.focus()}split(){const e=this.Editor.Caret.extractFragmentFromCaretPosition(),t=Q.make("div");t.appendChild(e);const r={text:Q.isEmpty(t)?"":t.innerHTML};return this.insert({data:r})}getBlockByIndex(e){return e===-1&&(e=this._blocks.length-1),this._blocks[e]}getBlockIndex(e){return this._blocks.indexOf(e)}getBlockById(e){return this._blocks.array.find(t=>t.id===e)}getBlock(e){Q.isElement(e)||(e=e.parentNode);const t=this._blocks.nodes,r=e.closest(`.${jn.CSS.wrapper}`),a=t.indexOf(r);if(a>=0)return this._blocks[a]}setCurrentBlockByChildNode(e){Q.isElement(e)||(e=e.parentNode);const t=e.closest(`.${jn.CSS.wrapper}`);if(!t)return;const r=t.closest(`.${this.Editor.UI.CSS.editorWrapper}`);if(r!=null&&r.isEqualNode(this.Editor.UI.nodes.wrapper))return this.currentBlockIndex=this._blocks.nodes.indexOf(t),this.currentBlock.updateCurrentInput(),this.currentBlock}getBlockByChildNode(e){if(!e||!(e instanceof Node))return;Q.isElement(e)||(e=e.parentNode);const t=e.closest(`.${jn.CSS.wrapper}`);return this.blocks.find(r=>r.holder===t)}swap(e,t){this._blocks.swap(e,t),this.currentBlockIndex=t}move(e,t=this.currentBlockIndex){if(isNaN(e)||isNaN(t)){Ye("Warning during 'move' call: incorrect indices provided.","warn");return}if(!this.validateIndex(e)||!this.validateIndex(t)){Ye("Warning during 'move' call: indices cannot be lower than 0 or greater than the amount of blocks.","warn");return}this._blocks.move(e,t),this.currentBlockIndex=e,this.blockDidMutated(sS,this.currentBlock,{fromIndex:t,toIndex:e})}async convert(e,t,r){if(!await e.save())throw new Error("Could not convert Block. Failed to extract original Block data.");const a=this.Editor.Tools.blockTools.get(t);if(!a)throw new Error(`Could not convert Block. Tool «${t}» not found.`);const s=await e.exportDataAsString(),i=_n(s,a.sanitizeConfig);let l=mf(i,a.conversionConfig,a.settings);return r&&(l=Object.assign(l,r)),this.replace(e,a.name,l)}unsetCurrentBlock(){this.currentBlockIndex=-1}async clear(e=!1){const t=new iS;[...this.blocks].forEach(r=>{t.add(async()=>{await this.removeBlock(r,!1)})}),await t.completed,this.unsetCurrentBlock(),e&&this.insert(),this.Editor.UI.checkEmptiness()}async destroy(){await Promise.all(this.blocks.map(e=>e.destroy()))}bindBlockEvents(e){const{BlockEvents:t}=this.Editor;this.readOnlyMutableListeners.on(e.holder,"keydown",r=>{t.keydown(r)}),this.readOnlyMutableListeners.on(e.holder,"keyup",r=>{t.keyup(r)}),this.readOnlyMutableListeners.on(e.holder,"dragover",r=>{t.dragOver(r)}),this.readOnlyMutableListeners.on(e.holder,"dragleave",r=>{t.dragLeave(r)}),e.on("didMutated",r=>this.blockDidMutated(dm,r,{index:this.getBlockIndex(r)}))}disableModuleBindings(){this.readOnlyMutableListeners.clearAll()}enableModuleBindings(){this.readOnlyMutableListeners.on(document,"cut",e=>this.Editor.BlockEvents.handleCommandX(e)),this.blocks.forEach(e=>{this.bindBlockEvents(e)})}validateIndex(e){return!(e<0||e>=this._blocks.length)}blockDidMutated(e,t,r){const a=new CustomEvent(e,{detail:{target:new Vn(t),...r}});return this.eventsDispatcher.emit(cf,{event:a}),t}}class cS extends ze{constructor(){super(...arguments),this.anyBlockSelectedCache=null,this.needToSelectAll=!1,this.nativeInputSelected=!1,this.readyToBlockSelection=!1}get sanitizerConfig(){return{p:{},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},ol:{},ul:{},li:{},br:!0,img:{src:!0,width:!0,height:!0},a:{href:!0},b:{},i:{},u:{}}}get allBlocksSelected(){const{BlockManager:e}=this.Editor;return e.blocks.every(t=>t.selected===!0)}set allBlocksSelected(e){const{BlockManager:t}=this.Editor;t.blocks.forEach(r=>{r.selected=e}),this.clearCache()}get anyBlockSelected(){const{BlockManager:e}=this.Editor;return this.anyBlockSelectedCache===null&&(this.anyBlockSelectedCache=e.blocks.some(t=>t.selected===!0)),this.anyBlockSelectedCache}get selectedBlocks(){return this.Editor.BlockManager.blocks.filter(e=>e.selected)}prepare(){this.selection=new Se,gr.add({name:"CMD+A",handler:e=>{const{BlockManager:t,ReadOnly:r}=this.Editor;if(r.isEnabled){e.preventDefault(),this.selectAllBlocks();return}t.currentBlock&&this.handleCommandA(e)},on:this.Editor.UI.nodes.redactor})}toggleReadOnly(){Se.get().removeAllRanges(),this.allBlocksSelected=!1}unSelectBlockByIndex(e){const{BlockManager:t}=this.Editor;let r;isNaN(e)?r=t.currentBlock:r=t.getBlockByIndex(e),r.selected=!1,this.clearCache()}clearSelection(e,t=!1){const{BlockManager:r,Caret:a,RectangleSelection:s}=this.Editor;this.needToSelectAll=!1,this.nativeInputSelected=!1,this.readyToBlockSelection=!1;const i=e&&e instanceof KeyboardEvent,l=i&&ef(e.keyCode);if(this.anyBlockSelected&&i&&l&&!Se.isSelectionExists){const c=r.removeSelectedBlocks();r.insertDefaultBlockAtIndex(c,!0),a.setToBlock(r.currentBlock),ys(()=>{const d=e.key;a.insertContentAtCaretPosition(d.length>1?"":d)},20)()}if(this.Editor.CrossBlockSelection.clear(e),!this.anyBlockSelected||s.isRectActivated()){this.Editor.RectangleSelection.clearSelection();return}t&&this.selection.restore(),this.allBlocksSelected=!1}copySelectedBlocks(e){e.preventDefault();const t=Q.make("div");this.selectedBlocks.forEach(s=>{const i=_n(s.holder.innerHTML,this.sanitizerConfig),l=Q.make("p");l.innerHTML=i,t.appendChild(l)});const r=Array.from(t.childNodes).map(s=>s.textContent).join(`
|
|
53
|
+
*/(function(n,e){(function(t,r){n.exports=r()})(window,function(){return function(t){var r={};function a(s){if(r[s])return r[s].exports;var i=r[s]={i:s,l:!1,exports:{}};return t[s].call(i.exports,i,i.exports,a),i.l=!0,i.exports}return a.m=t,a.c=r,a.d=function(s,i,l){a.o(s,i)||Object.defineProperty(s,i,{enumerable:!0,get:l})},a.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},a.t=function(s,i){if(1&i&&(s=a(s)),8&i||4&i&&typeof s=="object"&&s&&s.__esModule)return s;var l=Object.create(null);if(a.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:s}),2&i&&typeof s!="string")for(var c in s)a.d(l,c,(function(d){return s[d]}).bind(null,c));return l},a.n=function(s){var i=s&&s.__esModule?function(){return s.default}:function(){return s};return a.d(i,"a",i),i},a.o=function(s,i){return Object.prototype.hasOwnProperty.call(s,i)},a.p="",a(a.s=0)}([function(t,r,a){function s(c,d){for(var u=0;u<d.length;u++){var h=d[u];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(c,h.key,h)}}function i(c,d,u){return d&&s(c.prototype,d),u&&s(c,u),c}a.r(r);var l=function(){function c(d){var u=this;(function(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")})(this,c),this.commands={},this.keys={},this.name=d.name,this.parseShortcutName(d.name),this.element=d.on,this.callback=d.callback,this.executeShortcut=function(h){u.execute(h)},this.element.addEventListener("keydown",this.executeShortcut,!1)}return i(c,null,[{key:"supportedCommands",get:function(){return{SHIFT:["SHIFT"],CMD:["CMD","CONTROL","COMMAND","WINDOWS","CTRL"],ALT:["ALT","OPTION"]}}},{key:"keyCodes",get:function(){return{0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,BACKSPACE:8,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,DELETE:46,".":190}}}]),i(c,[{key:"parseShortcutName",value:function(d){d=d.split("+");for(var u=0;u<d.length;u++){d[u]=d[u].toUpperCase();var h=!1;for(var p in c.supportedCommands)if(c.supportedCommands[p].includes(d[u])){h=this.commands[p]=!0;break}h||(this.keys[d[u]]=!0)}for(var m in c.supportedCommands)this.commands[m]||(this.commands[m]=!1)}},{key:"execute",value:function(d){var u,h={CMD:d.ctrlKey||d.metaKey,SHIFT:d.shiftKey,ALT:d.altKey},p=!0;for(u in this.commands)this.commands[u]!==h[u]&&(p=!1);var m,f=!0;for(m in this.keys)f=f&&d.keyCode===c.keyCodes[m];p&&f&&this.callback(d)}},{key:"remove",value:function(){this.element.removeEventListener("keydown",this.executeShortcut)}}]),c}();r.default=l}]).default})})(Mf);var k2=Mf.exports;const v2=gs(k2);class w2{constructor(){this.registeredShortcuts=new Map}add(e){if(this.findShortcut(e.on,e.name))throw Error(`Shortcut ${e.name} is already registered for ${e.on}. Please remove it before add a new handler.`);const t=new v2({name:e.name,on:e.on,callback:e.handler}),r=this.registeredShortcuts.get(e.on)||[];this.registeredShortcuts.set(e.on,[...r,t])}remove(e,t){const r=this.findShortcut(e,t);if(!r)return;r.remove();const a=this.registeredShortcuts.get(e).filter(s=>s!==r);if(a.length===0){this.registeredShortcuts.delete(e);return}this.registeredShortcuts.set(e,a)}findShortcut(e,t){return(this.registeredShortcuts.get(e)||[]).find(({name:r})=>r===t)}}const gr=new w2;var _2=Object.defineProperty,C2=Object.getOwnPropertyDescriptor,Df=(n,e,t,r)=>{for(var a=C2(e,t),s=n.length-1,i;s>=0;s--)(i=n[s])&&(a=i(e,t,a)||a);return a&&_2(e,t,a),a},Es=(n=>(n.Opened="toolbox-opened",n.Closed="toolbox-closed",n.BlockAdded="toolbox-block-added",n))(Es||{});const sc=class rg extends ea{constructor({api:e,tools:t,i18nLabels:r}){super(),this.opened=!1,this.listeners=new ta,this.popover=null,this.handleMobileLayoutToggle=()=>{this.destroyPopover(),this.initPopover()},this.onPopoverClose=()=>{this.opened=!1,this.emit("toolbox-closed")},this.api=e,this.tools=t,this.i18nLabels=r,this.enableShortcuts(),this.nodes={toolbox:Q.make("div",rg.CSS.toolbox)},this.initPopover(),this.api.events.on(na,this.handleMobileLayoutToggle)}get isEmpty(){return this.toolsToBeDisplayed.length===0}static get CSS(){return{toolbox:"ce-toolbox"}}getElement(){return this.nodes.toolbox}hasFocus(){if(this.popover!==null)return"hasFocus"in this.popover?this.popover.hasFocus():void 0}destroy(){var e;super.destroy(),this.nodes&&this.nodes.toolbox&&this.nodes.toolbox.remove(),this.removeAllShortcuts(),(e=this.popover)==null||e.off(Cn.Closed,this.onPopoverClose),this.listeners.destroy(),this.api.events.off(na,this.handleMobileLayoutToggle)}toolButtonActivated(e,t){this.insertNewBlock(e,t)}open(){var e;this.isEmpty||((e=this.popover)==null||e.show(),this.opened=!0,this.emit("toolbox-opened"))}close(){var e;(e=this.popover)==null||e.hide(),this.opened=!1,this.emit("toolbox-closed")}toggle(){this.opened?this.close():this.open()}initPopover(){var e;const t=fr()?$f:oc;this.popover=new t({scopeElement:this.api.ui.nodes.redactor,searchable:!0,messages:{nothingFound:this.i18nLabels.nothingFound,search:this.i18nLabels.filter},items:this.toolboxItemsToBeDisplayed}),this.popover.on(Cn.Closed,this.onPopoverClose),(e=this.nodes.toolbox)==null||e.append(this.popover.getElement())}destroyPopover(){this.popover!==null&&(this.popover.hide(),this.popover.off(Cn.Closed,this.onPopoverClose),this.popover.destroy(),this.popover=null),this.nodes.toolbox!==null&&(this.nodes.toolbox.innerHTML="")}get toolsToBeDisplayed(){const e=[];return this.tools.forEach(t=>{t.toolbox&&e.push(t)}),e}get toolboxItemsToBeDisplayed(){const e=(t,r,a=!0)=>({icon:t.icon,title:At.t(Wt.toolNames,t.title||bs(r.name)),name:r.name,onActivate:()=>{this.toolButtonActivated(r.name,t.data)},secondaryLabel:r.shortcut&&a?Yl(r.shortcut):""});return this.toolsToBeDisplayed.reduce((t,r)=>(Array.isArray(r.toolbox)?r.toolbox.forEach((a,s)=>{t.push(e(a,r,s===0))}):r.toolbox!==void 0&&t.push(e(r.toolbox,r)),t),[])}enableShortcuts(){this.toolsToBeDisplayed.forEach(e=>{const t=e.shortcut;t&&this.enableShortcutForTool(e.name,t)})}enableShortcutForTool(e,t){gr.add({name:t,on:this.api.ui.nodes.redactor,handler:async r=>{r.preventDefault();const a=this.api.blocks.getCurrentBlockIndex(),s=this.api.blocks.getBlockByIndex(a);if(s)try{const i=await this.api.blocks.convert(s.id,e);this.api.caret.setToBlock(i,"end");return}catch{}this.insertNewBlock(e)}})}removeAllShortcuts(){this.toolsToBeDisplayed.forEach(e=>{const t=e.shortcut;t&&gr.remove(this.api.ui.nodes.redactor,t)})}async insertNewBlock(e,t){const r=this.api.blocks.getCurrentBlockIndex(),a=this.api.blocks.getBlockByIndex(r);if(!a)return;const s=a.isEmpty?r:r+1;let i;if(t){const c=await this.api.blocks.composeBlockData(e);i=Object.assign(c,t)}const l=this.api.blocks.insert(e,i,void 0,s,void 0,a.isEmpty);l.call(Hn.APPEND_CALLBACK),this.api.caret.setToBlock(s),this.emit("toolbox-block-added",{block:l}),this.api.toolbar.close()}};Df([pr],sc.prototype,"toolsToBeDisplayed"),Df([pr],sc.prototype,"toolboxItemsToBeDisplayed");let E2=sc;const Of="block hovered";async function S2(n,e){const t=navigator.keyboard;if(!t)return e;try{return(await t.getLayoutMap()).get(n)||e}catch(r){return console.error(r),e}}class x2 extends ze{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.toolboxInstance=null}get CSS(){return{toolbar:"ce-toolbar",content:"ce-toolbar__content",actions:"ce-toolbar__actions",actionsOpened:"ce-toolbar__actions--opened",toolbarOpened:"ce-toolbar--opened",openedToolboxHolderModifier:"codex-editor--toolbox-opened",plusButton:"ce-toolbar__plus",plusButtonShortcut:"ce-toolbar__plus-shortcut",settingsToggler:"ce-toolbar__settings-btn",settingsTogglerHidden:"ce-toolbar__settings-btn--hidden"}}get opened(){return this.nodes.wrapper.classList.contains(this.CSS.toolbarOpened)}get toolbox(){var e;return{opened:(e=this.toolboxInstance)==null?void 0:e.opened,close:()=>{var t;(t=this.toolboxInstance)==null||t.close()},open:()=>{if(this.toolboxInstance===null){Ye("toolbox.open() called before initialization is finished","warn");return}this.Editor.BlockManager.currentBlock=this.hoveredBlock,this.toolboxInstance.open()},toggle:()=>{if(this.toolboxInstance===null){Ye("toolbox.toggle() called before initialization is finished","warn");return}this.toolboxInstance.toggle()},hasFocus:()=>{var t;return(t=this.toolboxInstance)==null?void 0:t.hasFocus()}}}get blockActions(){return{hide:()=>{this.nodes.actions.classList.remove(this.CSS.actionsOpened)},show:()=>{this.nodes.actions.classList.add(this.CSS.actionsOpened)}}}get blockTunesToggler(){return{hide:()=>this.nodes.settingsToggler.classList.add(this.CSS.settingsTogglerHidden),show:()=>this.nodes.settingsToggler.classList.remove(this.CSS.settingsTogglerHidden)}}toggleReadOnly(e){e?(this.destroy(),this.Editor.BlockSettings.destroy(),this.disableModuleBindings()):window.requestIdleCallback(()=>{this.drawUI(),this.enableModuleBindings()},{timeout:2e3})}moveAndOpen(e=this.Editor.BlockManager.currentBlock){if(this.toolboxInstance===null){Ye("Can't open Toolbar since Editor initialization is not finished yet","warn");return}if(this.toolboxInstance.opened&&this.toolboxInstance.close(),this.Editor.BlockSettings.opened&&this.Editor.BlockSettings.close(),!e)return;this.hoveredBlock=e;const t=e.holder,{isMobile:r}=this.Editor.UI;let a;const s=20,i=e.firstInput,l=t.getBoundingClientRect(),c=i!==void 0?i.getBoundingClientRect():null,d=c!==null?c.top-l.top:null,u=d!==null?d>s:void 0;if(r)a=t.offsetTop+t.offsetHeight;else if(i===void 0||u){const h=parseInt(window.getComputedStyle(e.pluginsContent).paddingTop);a=t.offsetTop+h}else{const h=cC(i),p=parseInt(window.getComputedStyle(this.nodes.plusButton).height,10);a=t.offsetTop+h-p+8+d}this.nodes.wrapper.style.top=`${Math.floor(a)}px`,this.Editor.BlockManager.blocks.length===1&&e.isEmpty?this.blockTunesToggler.hide():this.blockTunesToggler.show(),this.open()}close(){var e,t;this.Editor.ReadOnly.isEnabled||((e=this.nodes.wrapper)==null||e.classList.remove(this.CSS.toolbarOpened),this.blockActions.hide(),(t=this.toolboxInstance)==null||t.close(),this.Editor.BlockSettings.close(),this.reset())}reset(){this.nodes.wrapper.style.top="unset"}open(e=!0){this.nodes.wrapper.classList.add(this.CSS.toolbarOpened),e?this.blockActions.show():this.blockActions.hide()}async make(){this.nodes.wrapper=Q.make("div",this.CSS.toolbar),["content","actions"].forEach(s=>{this.nodes[s]=Q.make("div",this.CSS[s])}),Q.append(this.nodes.wrapper,this.nodes.content),Q.append(this.nodes.content,this.nodes.actions),this.nodes.plusButton=Q.make("div",this.CSS.plusButton,{innerHTML:o2}),Q.append(this.nodes.actions,this.nodes.plusButton),this.readOnlyMutableListeners.on(this.nodes.plusButton,"click",()=>{vs(!0),this.plusButtonClicked()},!1);const e=Q.make("div");e.appendChild(document.createTextNode(At.ui(Wt.ui.toolbar.toolbox,"Add"))),e.appendChild(Q.make("div",this.CSS.plusButtonShortcut,{textContent:"/"})),ws(this.nodes.plusButton,e,{hidingDelay:400}),this.nodes.settingsToggler=Q.make("span",this.CSS.settingsToggler,{innerHTML:n2}),Q.append(this.nodes.actions,this.nodes.settingsToggler);const t=Q.make("div"),r=Q.text(At.ui(Wt.ui.blockTunes.toggler,"Click to tune")),a=await S2("Slash","/");t.appendChild(r),t.appendChild(Q.make("div",this.CSS.plusButtonShortcut,{textContent:Yl(`CMD + ${a}`)})),ws(this.nodes.settingsToggler,t,{hidingDelay:400}),Q.append(this.nodes.actions,this.makeToolbox()),Q.append(this.nodes.actions,this.Editor.BlockSettings.getElement()),Q.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper)}makeToolbox(){return this.toolboxInstance=new E2({api:this.Editor.API.methods,tools:this.Editor.Tools.blockTools,i18nLabels:{filter:At.ui(Wt.ui.popover,"Filter"),nothingFound:At.ui(Wt.ui.popover,"Nothing found")}}),this.toolboxInstance.on(Es.Opened,()=>{this.Editor.UI.nodes.wrapper.classList.add(this.CSS.openedToolboxHolderModifier)}),this.toolboxInstance.on(Es.Closed,()=>{this.Editor.UI.nodes.wrapper.classList.remove(this.CSS.openedToolboxHolderModifier)}),this.toolboxInstance.on(Es.BlockAdded,({block:e})=>{const{BlockManager:t,Caret:r}=this.Editor,a=t.getBlockById(e.id);a.inputs.length===0&&(a===t.lastBlock?(t.insertAtEnd(),r.setToBlock(t.lastBlock)):r.setToBlock(t.nextBlock))}),this.toolboxInstance.getElement()}plusButtonClicked(){var e;this.Editor.BlockManager.currentBlock=this.hoveredBlock,(e=this.toolboxInstance)==null||e.toggle()}enableModuleBindings(){this.readOnlyMutableListeners.on(this.nodes.settingsToggler,"mousedown",e=>{var t;e.stopPropagation(),this.settingsTogglerClicked(),(t=this.toolboxInstance)!=null&&t.opened&&this.toolboxInstance.close(),vs(!0)},!0),fr()||this.eventsDispatcher.on(Of,e=>{var t;this.Editor.BlockSettings.opened||(t=this.toolboxInstance)!=null&&t.opened||this.moveAndOpen(e.block)})}disableModuleBindings(){this.readOnlyMutableListeners.clearAll()}settingsTogglerClicked(){this.Editor.BlockManager.currentBlock=this.hoveredBlock,this.Editor.BlockSettings.opened?this.Editor.BlockSettings.close():this.Editor.BlockSettings.open(this.hoveredBlock)}drawUI(){this.Editor.BlockSettings.make(),this.make()}destroy(){this.removeAllNodes(),this.toolboxInstance&&this.toolboxInstance.destroy()}}var No=(n=>(n[n.Block=0]="Block",n[n.Inline=1]="Inline",n[n.Tune=2]="Tune",n))(No||{}),Ss=(n=>(n.Shortcut="shortcut",n.Toolbox="toolbox",n.EnabledInlineTools="inlineToolbar",n.EnabledBlockTunes="tunes",n.Config="config",n))(Ss||{}),Af=(n=>(n.Shortcut="shortcut",n.SanitizeConfig="sanitize",n))(Af||{}),yr=(n=>(n.IsEnabledLineBreaks="enableLineBreaks",n.Toolbox="toolbox",n.ConversionConfig="conversionConfig",n.IsReadOnlySupported="isReadOnlySupported",n.PasteConfig="pasteConfig",n))(yr||{}),xs=(n=>(n.IsInline="isInline",n.Title="title",n.IsReadOnlySupported="isReadOnlySupported",n))(xs||{}),ic=(n=>(n.IsTune="isTune",n))(ic||{});let lc=class{constructor({name:e,constructable:t,config:r,api:a,isDefault:s,isInternal:i=!1,defaultPlaceholder:l}){this.api=a,this.name=e,this.constructable=t,this.config=r,this.isDefault=s,this.isInternal=i,this.defaultPlaceholder=l}get settings(){const e=this.config.config||{};return this.isDefault&&!("placeholder"in e)&&this.defaultPlaceholder&&(e.placeholder=this.defaultPlaceholder),e}reset(){if(tt(this.constructable.reset))return this.constructable.reset()}prepare(){if(tt(this.constructable.prepare))return this.constructable.prepare({toolName:this.name,config:this.settings})}get shortcut(){const e=this.constructable.shortcut;return this.config.shortcut||e}get sanitizeConfig(){return this.constructable.sanitize||{}}isInline(){return this.type===No.Inline}isBlock(){return this.type===No.Block}isTune(){return this.type===No.Tune}};class B2 extends ze{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.CSS={inlineToolbar:"ce-inline-toolbar"},this.opened=!1,this.popover=null,this.toolbarVerticalMargin=fr()?20:6,this.tools=new Map,window.requestIdleCallback(()=>{this.make()},{timeout:2e3})}async tryToShow(e=!1){e&&this.close(),this.allowedToShow()&&(await this.open(),this.Editor.Toolbar.close())}close(){var e,t;if(this.opened){for(const[r,a]of this.tools){const s=this.getToolShortcut(r.name);s!==void 0&&gr.remove(this.Editor.UI.nodes.redactor,s),tt(a.clear)&&a.clear()}this.tools=new Map,this.reset(),this.opened=!1,(e=this.popover)==null||e.hide(),(t=this.popover)==null||t.destroy(),this.popover=null}}containsNode(e){return this.nodes.wrapper===void 0?!1:this.nodes.wrapper.contains(e)}destroy(){var e;this.removeAllNodes(),(e=this.popover)==null||e.destroy(),this.popover=null}make(){this.nodes.wrapper=Q.make("div",[this.CSS.inlineToolbar,...this.isRtl?[this.Editor.UI.CSS.editorRtlFix]:[]]),Q.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper)}async open(){var e;if(this.opened)return;this.opened=!0,this.popover!==null&&this.popover.destroy(),this.createToolsInstances();const t=await this.getPopoverItems();this.popover=new f2({items:t,scopeElement:this.Editor.API.methods.ui.nodes.redactor,messages:{nothingFound:At.ui(Wt.ui.popover,"Nothing found"),search:At.ui(Wt.ui.popover,"Filter")}}),this.move(this.popover.size.width),(e=this.nodes.wrapper)==null||e.append(this.popover.getElement()),this.popover.show()}move(e){const t=Se.rect,r=this.Editor.UI.nodes.wrapper.getBoundingClientRect(),a={x:t.x-r.x,y:t.y+t.height-r.top+this.toolbarVerticalMargin};a.x+e+r.x>this.Editor.UI.contentRect.right&&(a.x=this.Editor.UI.contentRect.right-e-r.x),this.nodes.wrapper.style.left=Math.floor(a.x)+"px",this.nodes.wrapper.style.top=Math.floor(a.y)+"px"}reset(){this.nodes.wrapper.style.left="0",this.nodes.wrapper.style.top="0"}allowedToShow(){const e=["IMG","INPUT"],t=Se.get(),r=Se.text;if(!t||!t.anchorNode||t.isCollapsed||r.length<1)return!1;const a=Q.isElement(t.anchorNode)?t.anchorNode:t.anchorNode.parentElement;if(a===null||t!==null&&e.includes(a.tagName))return!1;const s=this.Editor.BlockManager.getBlock(t.anchorNode);return!s||this.getTools().some(i=>s.tool.inlineTools.has(i.name))===!1?!1:a.closest("[contenteditable]")!==null}getTools(){const e=this.Editor.BlockManager.currentBlock;return e?Array.from(e.tool.inlineTools.values()).filter(t=>!(this.Editor.ReadOnly.isEnabled&&t.isReadOnlySupported!==!0)):[]}createToolsInstances(){this.tools=new Map,this.getTools().forEach(e=>{const t=e.create();this.tools.set(e,t)})}async getPopoverItems(){const e=[];let t=0;for(const[r,a]of this.tools){const s=await a.render(),i=this.getToolShortcut(r.name);if(i!==void 0)try{this.enableShortcuts(r.name,i)}catch{}const l=i!==void 0?Yl(i):void 0,c=At.t(Wt.toolNames,r.title||bs(r.name));[s].flat().forEach(d=>{var u,h;const p={name:r.name,onActivate:()=>{this.toolClicked(a)},hint:{title:c,description:l}};if(Q.isElement(d)){const m={...p,element:d,type:Je.Html};if(tt(a.renderActions)){const f=a.renderActions();m.children={isOpen:(u=a.checkState)==null?void 0:u.call(a,Se.get()),isFlippable:!1,items:[{type:Je.Html,element:f}]}}else(h=a.checkState)==null||h.call(a,Se.get());e.push(m)}else if(d.type===Je.Html)e.push({...p,...d,type:Je.Html});else if(d.type===Je.Separator)e.push({type:Je.Separator});else{const m={...p,...d,type:Je.Default};"children"in m&&t!==0&&e.push({type:Je.Separator}),e.push(m),"children"in m&&t<this.tools.size-1&&e.push({type:Je.Separator})}}),t++}return e}getToolShortcut(e){const{Tools:t}=this.Editor,r=t.inlineTools.get(e),a=t.internal.inlineTools;return Array.from(a.keys()).includes(e)?this.inlineTools[e][Af.Shortcut]:r==null?void 0:r.shortcut}enableShortcuts(e,t){gr.add({name:t,handler:r=>{var a;const{currentBlock:s}=this.Editor.BlockManager;s&&s.tool.enabledInlineTools&&(r.preventDefault(),(a=this.popover)==null||a.activateItemByName(e))},on:document})}toolClicked(e){var t;const r=Se.range;(t=e.surround)==null||t.call(e,r),this.checkToolsState()}checkToolsState(){var e;(e=this.tools)==null||e.forEach(t=>{var r;(r=t.checkState)==null||r.call(t,Se.get())})}get inlineTools(){const e={};return Array.from(this.Editor.Tools.inlineTools.entries()).forEach(([t,r])=>{e[t]=r.create()}),e}}function If(){const n=window.getSelection();if(n===null)return[null,0];let e=n.focusNode,t=n.focusOffset;return e===null?[null,0]:(e.nodeType!==Node.TEXT_NODE&&e.childNodes.length>0&&(e.childNodes[t]?(e=e.childNodes[t],t=0):(e=e.childNodes[t-1],t=e.textContent.length)),[e,t])}function Nf(n,e,t,r){const a=document.createRange();r==="left"?(a.setStart(n,0),a.setEnd(e,t)):(a.setStart(e,t),a.setEnd(n,n.childNodes.length));const s=a.cloneContents(),i=document.createElement("div");i.appendChild(s);const l=i.textContent||"";return lC(l)}function Bs(n){const e=Q.getDeepestNode(n);if(e===null||Q.isEmpty(n))return!0;if(Q.isNativeInput(e))return e.selectionEnd===0;if(Q.isEmpty(n))return!0;const[t,r]=If();return t===null?!1:Nf(n,t,r,"left")}function Ts(n){const e=Q.getDeepestNode(n,!0);if(e===null)return!0;if(Q.isNativeInput(e))return e.selectionEnd===e.value.length;const[t,r]=If();return t===null?!1:Nf(n,t,r,"right")}var Pf={},cc={},$s={},Po={},dc={},uc={};Object.defineProperty(uc,"__esModule",{value:!0}),uc.allInputsSelector=T2;function T2(){var n=["text","password","email","number","search","tel","url"];return"[contenteditable=true], textarea, input:not([type]), "+n.map(function(e){return'input[type="'.concat(e,'"]')}).join(", ")}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.allInputsSelector=void 0;var e=uc;Object.defineProperty(n,"allInputsSelector",{enumerable:!0,get:function(){return e.allInputsSelector}})})(dc);var Lo={},hc={};Object.defineProperty(hc,"__esModule",{value:!0}),hc.isNativeInput=$2;function $2(n){var e=["INPUT","TEXTAREA"];return n&&n.tagName?e.includes(n.tagName):!1}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isNativeInput=void 0;var e=hc;Object.defineProperty(n,"isNativeInput",{enumerable:!0,get:function(){return e.isNativeInput}})})(Lo);var Lf={},pc={};Object.defineProperty(pc,"__esModule",{value:!0}),pc.append=M2;function M2(n,e){Array.isArray(e)?e.forEach(function(t){n.appendChild(t)}):n.appendChild(e)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.append=void 0;var e=pc;Object.defineProperty(n,"append",{enumerable:!0,get:function(){return e.append}})})(Lf);var fc={},mc={};Object.defineProperty(mc,"__esModule",{value:!0}),mc.blockElements=D2;function D2(){return["address","article","aside","blockquote","canvas","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","ruby","section","table","tbody","thead","tr","tfoot","ul","video"]}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.blockElements=void 0;var e=mc;Object.defineProperty(n,"blockElements",{enumerable:!0,get:function(){return e.blockElements}})})(fc);var zf={},gc={};Object.defineProperty(gc,"__esModule",{value:!0}),gc.calculateBaseline=O2;function O2(n){var e=window.getComputedStyle(n),t=parseFloat(e.fontSize),r=parseFloat(e.lineHeight)||t*1.2,a=parseFloat(e.paddingTop),s=parseFloat(e.borderTopWidth),i=parseFloat(e.marginTop),l=t*.8,c=(r-t)/2,d=i+s+a+c+l;return d}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.calculateBaseline=void 0;var e=gc;Object.defineProperty(n,"calculateBaseline",{enumerable:!0,get:function(){return e.calculateBaseline}})})(zf);var Ff={},yc={},bc={},kc={};Object.defineProperty(kc,"__esModule",{value:!0}),kc.isContentEditable=A2;function A2(n){return n.contentEditable==="true"}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isContentEditable=void 0;var e=kc;Object.defineProperty(n,"isContentEditable",{enumerable:!0,get:function(){return e.isContentEditable}})})(bc),Object.defineProperty(yc,"__esModule",{value:!0}),yc.canSetCaret=P2;var I2=Lo,N2=bc;function P2(n){var e=!0;if((0,I2.isNativeInput)(n))switch(n.type){case"file":case"checkbox":case"radio":case"hidden":case"submit":case"button":case"image":case"reset":e=!1;break}else e=(0,N2.isContentEditable)(n);return e}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.canSetCaret=void 0;var e=yc;Object.defineProperty(n,"canSetCaret",{enumerable:!0,get:function(){return e.canSetCaret}})})(Ff);var Ms={},vc={};function L2(n,e,t){const r=t.value!==void 0?"value":"get",a=t[r],s=`#${e}Cache`;if(t[r]=function(...i){return this[s]===void 0&&(this[s]=a.apply(this,i)),this[s]},r==="get"&&t.set){const i=t.set;t.set=function(l){delete n[s],i.apply(this,l)}}return t}function Rf(){const n={win:!1,mac:!1,x11:!1,linux:!1},e=Object.keys(n).find(t=>window.navigator.appVersion.toLowerCase().indexOf(t)!==-1);return e!==void 0&&(n[e]=!0),n}function wc(n){return n!=null&&n!==""&&(typeof n!="object"||Object.keys(n).length>0)}function z2(n){return!wc(n)}const F2=()=>typeof window<"u"&&window.navigator!==null&&wc(window.navigator.platform)&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1);function R2(n){const e=Rf();return n=n.replace(/shift/gi,"⇧").replace(/backspace/gi,"⌫").replace(/enter/gi,"⏎").replace(/up/gi,"↑").replace(/left/gi,"→").replace(/down/gi,"↓").replace(/right/gi,"←").replace(/escape/gi,"⎋").replace(/insert/gi,"Ins").replace(/delete/gi,"␡").replace(/\+/gi,"+"),e.mac?n=n.replace(/ctrl|cmd/gi,"⌘").replace(/alt/gi,"⌥"):n=n.replace(/cmd/gi,"Ctrl").replace(/windows/gi,"WIN"),n}function V2(n){return n[0].toUpperCase()+n.slice(1)}function H2(n){const e=document.createElement("div");e.style.position="absolute",e.style.left="-999px",e.style.bottom="-999px",e.innerHTML=n,document.body.appendChild(e);const t=window.getSelection(),r=document.createRange();if(r.selectNode(e),t===null)throw new Error("Cannot copy text to clipboard");t.removeAllRanges(),t.addRange(r),document.execCommand("copy"),document.body.removeChild(e)}function j2(n,e,t){let r;return(...a)=>{const s=this,i=()=>{r=void 0,t!==!0&&n.apply(s,a)},l=t===!0&&r!==void 0;window.clearTimeout(r),r=window.setTimeout(i,e),l&&n.apply(s,a)}}function ho(n){return Object.prototype.toString.call(n).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function Y2(n){return ho(n)==="boolean"}function Vf(n){return ho(n)==="function"||ho(n)==="asyncfunction"}function U2(n){return Vf(n)&&/^\s*class\s+/.test(n.toString())}function W2(n){return ho(n)==="number"}function Ds(n){return ho(n)==="object"}function q2(n){return Promise.resolve(n)===n}function G2(n){return ho(n)==="string"}function K2(n){return ho(n)==="undefined"}function _c(n,...e){if(!e.length)return n;const t=e.shift();if(Ds(n)&&Ds(t))for(const r in t)Ds(t[r])?(n[r]===void 0&&Object.assign(n,{[r]:{}}),_c(n[r],t[r])):Object.assign(n,{[r]:t[r]});return _c(n,...e)}function X2(n,e,t){const r=`«${e}» is deprecated and will be removed in the next major release. Please use the «${t}» instead.`;n&&console.warn(r)}function Q2(n){try{return new URL(n).href}catch{}return n.substring(0,2)==="//"?window.location.protocol+n:window.location.origin+n}function Z2(n){return n>47&&n<58||n===32||n===13||n===229||n>64&&n<91||n>95&&n<112||n>185&&n<193||n>218&&n<223}const J2={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,LEFT:37,UP:38,DOWN:40,RIGHT:39,DELETE:46,META:91,SLASH:191},eE={LEFT:0,WHEEL:1,RIGHT:2,BACKWARD:3,FORWARD:4};let tE=class{constructor(){this.completed=Promise.resolve()}add(n){return new Promise((e,t)=>{this.completed=this.completed.then(n).then(e).catch(t)})}};function nE(n,e,t=void 0){let r,a,s,i=null,l=0;t||(t={});const c=function(){l=t.leading===!1?0:Date.now(),i=null,s=n.apply(r,a),i===null&&(r=a=null)};return function(){const d=Date.now();!l&&t.leading===!1&&(l=d);const u=e-(d-l);return r=this,a=arguments,u<=0||u>e?(i&&(clearTimeout(i),i=null),l=d,s=n.apply(r,a),i===null&&(r=a=null)):!i&&t.trailing!==!1&&(i=setTimeout(c,u)),s}}const oE=Object.freeze(Object.defineProperty({__proto__:null,PromiseQueue:tE,beautifyShortcut:R2,cacheable:L2,capitalize:V2,copyTextToClipboard:H2,debounce:j2,deepMerge:_c,deprecationAssert:X2,getUserOS:Rf,getValidUrl:Q2,isBoolean:Y2,isClass:U2,isEmpty:z2,isFunction:Vf,isIosDevice:F2,isNumber:W2,isObject:Ds,isPrintableKey:Z2,isPromise:q2,isString:G2,isUndefined:K2,keyCodes:J2,mouseButtons:eE,notEmpty:wc,throttle:nE,typeOf:ho},Symbol.toStringTag,{value:"Module"})),Cc=G_(oE);Object.defineProperty(vc,"__esModule",{value:!0}),vc.containsOnlyInlineElements=sE;var rE=Cc,aE=fc;function sE(n){var e;(0,rE.isString)(n)?(e=document.createElement("div"),e.innerHTML=n):e=n;var t=function(r){return!(0,aE.blockElements)().includes(r.tagName.toLowerCase())&&Array.from(r.children).every(t)};return Array.from(e.children).every(t)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.containsOnlyInlineElements=void 0;var e=vc;Object.defineProperty(n,"containsOnlyInlineElements",{enumerable:!0,get:function(){return e.containsOnlyInlineElements}})})(Ms);var Hf={},Ec={},Os={},Sc={};Object.defineProperty(Sc,"__esModule",{value:!0}),Sc.make=iE;function iE(n,e,t){var r;e===void 0&&(e=null),t===void 0&&(t={});var a=document.createElement(n);if(Array.isArray(e)){var s=e.filter(function(l){return l!==void 0});(r=a.classList).add.apply(r,s)}else e!==null&&a.classList.add(e);for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(a[i]=t[i]);return a}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.make=void 0;var e=Sc;Object.defineProperty(n,"make",{enumerable:!0,get:function(){return e.make}})})(Os),Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.fragmentToString=cE;var lE=Os;function cE(n){var e=(0,lE.make)("div");return e.appendChild(n),e.innerHTML}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.fragmentToString=void 0;var e=Ec;Object.defineProperty(n,"fragmentToString",{enumerable:!0,get:function(){return e.fragmentToString}})})(Hf);var jf={},xc={};Object.defineProperty(xc,"__esModule",{value:!0}),xc.getContentLength=uE;var dE=Lo;function uE(n){var e,t;return(0,dE.isNativeInput)(n)?n.value.length:n.nodeType===Node.TEXT_NODE?n.length:(t=(e=n.textContent)===null||e===void 0?void 0:e.length)!==null&&t!==void 0?t:0}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getContentLength=void 0;var e=xc;Object.defineProperty(n,"getContentLength",{enumerable:!0,get:function(){return e.getContentLength}})})(jf);var Bc={},Tc={},Yf=Zr&&Zr.__spreadArray||function(n,e,t){if(t||arguments.length===2)for(var r=0,a=e.length,s;r<a;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return n.concat(s||Array.prototype.slice.call(e))};Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.getDeepestBlockElements=Uf;var hE=Ms;function Uf(n){return(0,hE.containsOnlyInlineElements)(n)?[n]:Array.from(n.children).reduce(function(e,t){return Yf(Yf([],e,!0),Uf(t),!0)},[])}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getDeepestBlockElements=void 0;var e=Tc;Object.defineProperty(n,"getDeepestBlockElements",{enumerable:!0,get:function(){return e.getDeepestBlockElements}})})(Bc);var Wf={},$c={},As={},Mc={};Object.defineProperty(Mc,"__esModule",{value:!0}),Mc.isLineBreakTag=pE;function pE(n){return["BR","WBR"].includes(n.tagName)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isLineBreakTag=void 0;var e=Mc;Object.defineProperty(n,"isLineBreakTag",{enumerable:!0,get:function(){return e.isLineBreakTag}})})(As);var Is={},Dc={};Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.isSingleTag=fE;function fE(n){return["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"].includes(n.tagName)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isSingleTag=void 0;var e=Dc;Object.defineProperty(n,"isSingleTag",{enumerable:!0,get:function(){return e.isSingleTag}})})(Is),Object.defineProperty($c,"__esModule",{value:!0}),$c.getDeepestNode=qf;var mE=Lo,gE=As,yE=Is;function qf(n,e){e===void 0&&(e=!1);var t=e?"lastChild":"firstChild",r=e?"previousSibling":"nextSibling";if(n.nodeType===Node.ELEMENT_NODE&&n[t]){var a=n[t];if((0,yE.isSingleTag)(a)&&!(0,mE.isNativeInput)(a)&&!(0,gE.isLineBreakTag)(a))if(a[r])a=a[r];else if(a.parentNode!==null&&a.parentNode[r])a=a.parentNode[r];else return a.parentNode;return qf(a,e)}return n}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getDeepestNode=void 0;var e=$c;Object.defineProperty(n,"getDeepestNode",{enumerable:!0,get:function(){return e.getDeepestNode}})})(Wf);var Gf={},Oc={},Ns=Zr&&Zr.__spreadArray||function(n,e,t){if(t||arguments.length===2)for(var r=0,a=e.length,s;r<a;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return n.concat(s||Array.prototype.slice.call(e))};Object.defineProperty(Oc,"__esModule",{value:!0}),Oc.findAllInputs=_E;var bE=Ms,kE=Bc,vE=dc,wE=Lo;function _E(n){return Array.from(n.querySelectorAll((0,vE.allInputsSelector)())).reduce(function(e,t){return(0,wE.isNativeInput)(t)||(0,bE.containsOnlyInlineElements)(t)?Ns(Ns([],e,!0),[t],!1):Ns(Ns([],e,!0),(0,kE.getDeepestBlockElements)(t),!0)},[])}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.findAllInputs=void 0;var e=Oc;Object.defineProperty(n,"findAllInputs",{enumerable:!0,get:function(){return e.findAllInputs}})})(Gf);var Kf={},Ac={};Object.defineProperty(Ac,"__esModule",{value:!0}),Ac.isCollapsedWhitespaces=CE;function CE(n){return!/[^\t\n\r ]/.test(n)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isCollapsedWhitespaces=void 0;var e=Ac;Object.defineProperty(n,"isCollapsedWhitespaces",{enumerable:!0,get:function(){return e.isCollapsedWhitespaces}})})(Kf);var Ic={},Nc={};Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.isElement=SE;var EE=Cc;function SE(n){return(0,EE.isNumber)(n)?!1:!!n&&!!n.nodeType&&n.nodeType===Node.ELEMENT_NODE}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isElement=void 0;var e=Nc;Object.defineProperty(n,"isElement",{enumerable:!0,get:function(){return e.isElement}})})(Ic);var Xf={},Pc={},Lc={},zc={};Object.defineProperty(zc,"__esModule",{value:!0}),zc.isLeaf=xE;function xE(n){return n===null?!1:n.childNodes.length===0}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isLeaf=void 0;var e=zc;Object.defineProperty(n,"isLeaf",{enumerable:!0,get:function(){return e.isLeaf}})})(Lc);var Fc={},Rc={};Object.defineProperty(Rc,"__esModule",{value:!0}),Rc.isNodeEmpty=DE;var BE=As,TE=Ic,$E=Lo,ME=Is;function DE(n,e){var t="";return(0,ME.isSingleTag)(n)&&!(0,BE.isLineBreakTag)(n)?!1:((0,TE.isElement)(n)&&(0,$E.isNativeInput)(n)?t=n.value:n.textContent!==null&&(t=n.textContent.replace("","")),e!==void 0&&(t=t.replace(new RegExp(e,"g"),"")),t.trim().length===0)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isNodeEmpty=void 0;var e=Rc;Object.defineProperty(n,"isNodeEmpty",{enumerable:!0,get:function(){return e.isNodeEmpty}})})(Fc),Object.defineProperty(Pc,"__esModule",{value:!0}),Pc.isEmpty=IE;var OE=Lc,AE=Fc;function IE(n,e){n.normalize();for(var t=[n];t.length>0;){var r=t.shift();if(r){if(n=r,(0,OE.isLeaf)(n)&&!(0,AE.isNodeEmpty)(n,e))return!1;t.push.apply(t,Array.from(n.childNodes))}}return!0}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isEmpty=void 0;var e=Pc;Object.defineProperty(n,"isEmpty",{enumerable:!0,get:function(){return e.isEmpty}})})(Xf);var Qf={},Vc={};Object.defineProperty(Vc,"__esModule",{value:!0}),Vc.isFragment=PE;var NE=Cc;function PE(n){return(0,NE.isNumber)(n)?!1:!!n&&!!n.nodeType&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isFragment=void 0;var e=Vc;Object.defineProperty(n,"isFragment",{enumerable:!0,get:function(){return e.isFragment}})})(Qf);var Zf={},Hc={};Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.isHTMLString=zE;var LE=Os;function zE(n){var e=(0,LE.make)("div");return e.innerHTML=n,e.childElementCount>0}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isHTMLString=void 0;var e=Hc;Object.defineProperty(n,"isHTMLString",{enumerable:!0,get:function(){return e.isHTMLString}})})(Zf);var Jf={},jc={};Object.defineProperty(jc,"__esModule",{value:!0}),jc.offset=FE;function FE(n){var e=n.getBoundingClientRect(),t=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop,a=e.top+r,s=e.left+t;return{top:a,left:s,bottom:a+e.height,right:s+e.width}}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.offset=void 0;var e=jc;Object.defineProperty(n,"offset",{enumerable:!0,get:function(){return e.offset}})})(Jf);var em={},Yc={};Object.defineProperty(Yc,"__esModule",{value:!0}),Yc.prepend=RE;function RE(n,e){Array.isArray(e)?(e=e.reverse(),e.forEach(function(t){return n.prepend(t)})):n.prepend(e)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.prepend=void 0;var e=Yc;Object.defineProperty(n,"prepend",{enumerable:!0,get:function(){return e.prepend}})})(em),function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.prepend=n.offset=n.make=n.isLineBreakTag=n.isSingleTag=n.isNodeEmpty=n.isLeaf=n.isHTMLString=n.isFragment=n.isEmpty=n.isElement=n.isContentEditable=n.isCollapsedWhitespaces=n.findAllInputs=n.isNativeInput=n.allInputsSelector=n.getDeepestNode=n.getDeepestBlockElements=n.getContentLength=n.fragmentToString=n.containsOnlyInlineElements=n.canSetCaret=n.calculateBaseline=n.blockElements=n.append=void 0;var e=dc;Object.defineProperty(n,"allInputsSelector",{enumerable:!0,get:function(){return e.allInputsSelector}});var t=Lo;Object.defineProperty(n,"isNativeInput",{enumerable:!0,get:function(){return t.isNativeInput}});var r=Lf;Object.defineProperty(n,"append",{enumerable:!0,get:function(){return r.append}});var a=fc;Object.defineProperty(n,"blockElements",{enumerable:!0,get:function(){return a.blockElements}});var s=zf;Object.defineProperty(n,"calculateBaseline",{enumerable:!0,get:function(){return s.calculateBaseline}});var i=Ff;Object.defineProperty(n,"canSetCaret",{enumerable:!0,get:function(){return i.canSetCaret}});var l=Ms;Object.defineProperty(n,"containsOnlyInlineElements",{enumerable:!0,get:function(){return l.containsOnlyInlineElements}});var c=Hf;Object.defineProperty(n,"fragmentToString",{enumerable:!0,get:function(){return c.fragmentToString}});var d=jf;Object.defineProperty(n,"getContentLength",{enumerable:!0,get:function(){return d.getContentLength}});var u=Bc;Object.defineProperty(n,"getDeepestBlockElements",{enumerable:!0,get:function(){return u.getDeepestBlockElements}});var h=Wf;Object.defineProperty(n,"getDeepestNode",{enumerable:!0,get:function(){return h.getDeepestNode}});var p=Gf;Object.defineProperty(n,"findAllInputs",{enumerable:!0,get:function(){return p.findAllInputs}});var m=Kf;Object.defineProperty(n,"isCollapsedWhitespaces",{enumerable:!0,get:function(){return m.isCollapsedWhitespaces}});var f=bc;Object.defineProperty(n,"isContentEditable",{enumerable:!0,get:function(){return f.isContentEditable}});var g=Ic;Object.defineProperty(n,"isElement",{enumerable:!0,get:function(){return g.isElement}});var x=Xf;Object.defineProperty(n,"isEmpty",{enumerable:!0,get:function(){return x.isEmpty}});var E=Qf;Object.defineProperty(n,"isFragment",{enumerable:!0,get:function(){return E.isFragment}});var C=Zf;Object.defineProperty(n,"isHTMLString",{enumerable:!0,get:function(){return C.isHTMLString}});var T=Lc;Object.defineProperty(n,"isLeaf",{enumerable:!0,get:function(){return T.isLeaf}});var F=Fc;Object.defineProperty(n,"isNodeEmpty",{enumerable:!0,get:function(){return F.isNodeEmpty}});var I=As;Object.defineProperty(n,"isLineBreakTag",{enumerable:!0,get:function(){return I.isLineBreakTag}});var O=Is;Object.defineProperty(n,"isSingleTag",{enumerable:!0,get:function(){return O.isSingleTag}});var P=Os;Object.defineProperty(n,"make",{enumerable:!0,get:function(){return P.make}});var M=Jf;Object.defineProperty(n,"offset",{enumerable:!0,get:function(){return M.offset}});var v=em;Object.defineProperty(n,"prepend",{enumerable:!0,get:function(){return v.prepend}})}(Po);var Ps={};Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.getContenteditableSlice=HE;var VE=Po;function HE(n,e,t,r,a){var s;a===void 0&&(a=!1);var i=document.createRange();if(r==="left"?(i.setStart(n,0),i.setEnd(e,t)):(i.setStart(e,t),i.setEnd(n,n.childNodes.length)),a===!0){var l=i.extractContents();return(0,VE.fragmentToString)(l)}var c=i.cloneContents(),d=document.createElement("div");d.appendChild(c);var u=(s=d.textContent)!==null&&s!==void 0?s:"";return u}Object.defineProperty($s,"__esModule",{value:!0}),$s.checkContenteditableSliceForEmptiness=UE;var jE=Po,YE=Ps;function UE(n,e,t,r){var a=(0,YE.getContenteditableSlice)(n,e,t,r);return(0,jE.isCollapsedWhitespaces)(a)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.checkContenteditableSliceForEmptiness=void 0;var e=$s;Object.defineProperty(n,"checkContenteditableSliceForEmptiness",{enumerable:!0,get:function(){return e.checkContenteditableSliceForEmptiness}})})(cc);var tm={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getContenteditableSlice=void 0;var e=Ps;Object.defineProperty(n,"getContenteditableSlice",{enumerable:!0,get:function(){return e.getContenteditableSlice}})})(tm);var nm={},Uc={};Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.focus=qE;var WE=Po;function qE(n,e){var t,r;if(e===void 0&&(e=!0),(0,WE.isNativeInput)(n)){n.focus();var a=e?0:n.value.length;n.setSelectionRange(a,a)}else{var s=document.createRange(),i=window.getSelection();if(!i)return;var l=function(p){var m=document.createTextNode("");p.appendChild(m),s.setStart(m,0),s.setEnd(m,0)},c=function(p){return p!=null},d=n.childNodes,u=e?d[0]:d[d.length-1];if(c(u)){for(;c(u)&&u.nodeType!==Node.TEXT_NODE;)u=e?u.firstChild:u.lastChild;if(c(u)&&u.nodeType===Node.TEXT_NODE){var h=(r=(t=u.textContent)===null||t===void 0?void 0:t.length)!==null&&r!==void 0?r:0,a=e?0:h;s.setStart(u,a),s.setEnd(u,a)}else l(n)}else l(n);i.removeAllRanges(),i.addRange(s)}}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.focus=void 0;var e=Uc;Object.defineProperty(n,"focus",{enumerable:!0,get:function(){return e.focus}})})(nm);var Wc={},Ls={};Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.getCaretNodeAndOffset=GE;function GE(){var n=window.getSelection();if(n===null)return[null,0];var e=n.focusNode,t=n.focusOffset;return e===null?[null,0]:(e.nodeType!==Node.TEXT_NODE&&e.childNodes.length>0&&(e.childNodes[t]!==void 0?(e=e.childNodes[t],t=0):(e=e.childNodes[t-1],e.textContent!==null&&(t=e.textContent.length))),[e,t])}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getCaretNodeAndOffset=void 0;var e=Ls;Object.defineProperty(n,"getCaretNodeAndOffset",{enumerable:!0,get:function(){return e.getCaretNodeAndOffset}})})(Wc);var om={},zs={};Object.defineProperty(zs,"__esModule",{value:!0}),zs.getRange=KE;function KE(){var n=window.getSelection();return n&&n.rangeCount?n.getRangeAt(0):null}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getRange=void 0;var e=zs;Object.defineProperty(n,"getRange",{enumerable:!0,get:function(){return e.getRange}})})(om);var rm={},qc={};Object.defineProperty(qc,"__esModule",{value:!0}),qc.isCaretAtEndOfInput=ZE;var am=Po,XE=Wc,QE=cc;function ZE(n){var e=(0,am.getDeepestNode)(n,!0);if(e===null)return!0;if((0,am.isNativeInput)(e))return e.selectionEnd===e.value.length;var t=(0,XE.getCaretNodeAndOffset)(),r=t[0],a=t[1];return r===null?!1:(0,QE.checkContenteditableSliceForEmptiness)(n,r,a,"right")}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isCaretAtEndOfInput=void 0;var e=qc;Object.defineProperty(n,"isCaretAtEndOfInput",{enumerable:!0,get:function(){return e.isCaretAtEndOfInput}})})(rm);var sm={},Gc={};Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.isCaretAtStartOfInput=tS;var Fs=Po,JE=Ls,eS=$s;function tS(n){var e=(0,Fs.getDeepestNode)(n);if(e===null||(0,Fs.isEmpty)(n))return!0;if((0,Fs.isNativeInput)(e))return e.selectionEnd===0;if((0,Fs.isEmpty)(n))return!0;var t=(0,JE.getCaretNodeAndOffset)(),r=t[0],a=t[1];return r===null?!1:(0,eS.checkContenteditableSliceForEmptiness)(n,r,a,"left")}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isCaretAtStartOfInput=void 0;var e=Gc;Object.defineProperty(n,"isCaretAtStartOfInput",{enumerable:!0,get:function(){return e.isCaretAtStartOfInput}})})(sm);var im={},Kc={};Object.defineProperty(Kc,"__esModule",{value:!0}),Kc.save=rS;var nS=Po,oS=zs;function rS(){var n=(0,oS.getRange)(),e=(0,nS.make)("span");if(e.id="cursor",e.hidden=!0,!!n)return n.insertNode(e),function(){var t=window.getSelection();t&&(n.setStartAfter(e),n.setEndAfter(e),t.removeAllRanges(),t.addRange(n),setTimeout(function(){e.remove()},150))}}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.save=void 0;var e=Kc;Object.defineProperty(n,"save",{enumerable:!0,get:function(){return e.save}})})(im),function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.save=n.isCaretAtStartOfInput=n.isCaretAtEndOfInput=n.getRange=n.getCaretNodeAndOffset=n.focus=n.getContenteditableSlice=n.checkContenteditableSliceForEmptiness=void 0;var e=cc;Object.defineProperty(n,"checkContenteditableSliceForEmptiness",{enumerable:!0,get:function(){return e.checkContenteditableSliceForEmptiness}});var t=tm;Object.defineProperty(n,"getContenteditableSlice",{enumerable:!0,get:function(){return t.getContenteditableSlice}});var r=nm;Object.defineProperty(n,"focus",{enumerable:!0,get:function(){return r.focus}});var a=Wc;Object.defineProperty(n,"getCaretNodeAndOffset",{enumerable:!0,get:function(){return a.getCaretNodeAndOffset}});var s=om;Object.defineProperty(n,"getRange",{enumerable:!0,get:function(){return s.getRange}});var i=rm;Object.defineProperty(n,"isCaretAtEndOfInput",{enumerable:!0,get:function(){return i.isCaretAtEndOfInput}});var l=sm;Object.defineProperty(n,"isCaretAtStartOfInput",{enumerable:!0,get:function(){return l.isCaretAtStartOfInput}});var c=im;Object.defineProperty(n,"save",{enumerable:!0,get:function(){return c.save}})}(Pf);class aS extends ze{keydown(e){switch(this.beforeKeydownProcessing(e),e.keyCode){case Me.BACKSPACE:this.backspace(e);break;case Me.DELETE:this.delete(e);break;case Me.ENTER:this.enter(e);break;case Me.DOWN:case Me.RIGHT:this.arrowRightAndDown(e);break;case Me.UP:case Me.LEFT:this.arrowLeftAndUp(e);break;case Me.TAB:this.tabPressed(e);break}e.key==="/"&&!e.ctrlKey&&!e.metaKey&&this.slashPressed(e),e.code==="Slash"&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),this.commandSlashPressed())}beforeKeydownProcessing(e){this.needToolbarClosing(e)&&ef(e.keyCode)&&(this.Editor.Toolbar.close(),e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||this.Editor.BlockSelection.clearSelection(e))}keyup(e){e.shiftKey||this.Editor.UI.checkEmptiness()}dragOver(e){const t=this.Editor.BlockManager.getBlockByChildNode(e.target);t.dropTarget=!0}dragLeave(e){const t=this.Editor.BlockManager.getBlockByChildNode(e.target);t.dropTarget=!1}handleCommandC(e){const{BlockSelection:t}=this.Editor;t.anyBlockSelected&&t.copySelectedBlocks(e)}handleCommandX(e){const{BlockSelection:t,BlockManager:r,Caret:a}=this.Editor;t.anyBlockSelected&&t.copySelectedBlocks(e).then(()=>{const s=r.removeSelectedBlocks(),i=r.insertDefaultBlockAtIndex(s,!0);a.setToBlock(i,a.positions.START),t.clearSelection(e)})}tabPressed(e){const{InlineToolbar:t,Caret:r}=this.Editor;t.opened||(e.shiftKey?r.navigatePrevious(!0):r.navigateNext(!0))&&e.preventDefault()}commandSlashPressed(){this.Editor.BlockSelection.selectedBlocks.length>1||this.activateBlockSettings()}slashPressed(e){!this.Editor.UI.nodes.wrapper.contains(e.target)||!this.Editor.BlockManager.currentBlock.isEmpty||(e.preventDefault(),this.Editor.Caret.insertContentAtCaretPosition("/"),this.activateToolbox())}enter(e){const{BlockManager:t,UI:r}=this.Editor,a=t.currentBlock;if(a===void 0||a.tool.isLineBreaksEnabled||r.someToolbarOpened&&r.someFlipperButtonFocused||e.shiftKey&&!Wl)return;let s=a;a.currentInput!==void 0&&Bs(a.currentInput)&&!a.hasMedia?this.Editor.BlockManager.insertDefaultBlockAtIndex(this.Editor.BlockManager.currentBlockIndex):a.currentInput&&Ts(a.currentInput)?s=this.Editor.BlockManager.insertDefaultBlockAtIndex(this.Editor.BlockManager.currentBlockIndex+1):s=this.Editor.BlockManager.split(),this.Editor.Caret.setToBlock(s),this.Editor.Toolbar.moveAndOpen(s),e.preventDefault()}backspace(e){const{BlockManager:t,Caret:r}=this.Editor,{currentBlock:a,previousBlock:s}=t;if(!(a===void 0||!Se.isCollapsed||!a.currentInput||!Bs(a.currentInput))){if(e.preventDefault(),this.Editor.Toolbar.close(),a.currentInput!==a.firstInput){r.navigatePrevious();return}if(s!==null){if(s.isEmpty){t.removeBlock(s);return}if(a.isEmpty){t.removeBlock(a);const i=t.currentBlock;r.setToBlock(i,r.positions.END);return}ff(s,a)?this.mergeBlocks(s,a):r.setToBlock(s,r.positions.END)}}}delete(e){const{BlockManager:t,Caret:r}=this.Editor,{currentBlock:a,nextBlock:s}=t;if(!(!Se.isCollapsed||!Ts(a.currentInput))){if(e.preventDefault(),this.Editor.Toolbar.close(),a.currentInput!==a.lastInput){r.navigateNext();return}if(s!==null){if(s.isEmpty){t.removeBlock(s);return}if(a.isEmpty){t.removeBlock(a),r.setToBlock(s,r.positions.START);return}ff(a,s)?this.mergeBlocks(a,s):r.setToBlock(s,r.positions.START)}}}mergeBlocks(e,t){const{BlockManager:r,Toolbar:a}=this.Editor;e.lastInput!==void 0&&(Pf.focus(e.lastInput,!1),r.mergeBlocks(e,t).then(()=>{a.close()}))}arrowRightAndDown(e){const t=_s.usedKeys.includes(e.keyCode)&&(!e.shiftKey||e.keyCode===Me.TAB);if(this.Editor.UI.someToolbarOpened&&t)return;this.Editor.Toolbar.close();const{currentBlock:r}=this.Editor.BlockManager,a=((r==null?void 0:r.currentInput)!==void 0?Ts(r.currentInput):void 0)||this.Editor.BlockSelection.anyBlockSelected;if(e.shiftKey&&e.keyCode===Me.DOWN&&a){this.Editor.CrossBlockSelection.toggleBlockSelectedState();return}if(e.keyCode===Me.DOWN||e.keyCode===Me.RIGHT&&!this.isRtl?this.Editor.Caret.navigateNext():this.Editor.Caret.navigatePrevious()){e.preventDefault();return}ys(()=>{this.Editor.BlockManager.currentBlock&&this.Editor.BlockManager.currentBlock.updateCurrentInput()},20)(),this.Editor.BlockSelection.clearSelection(e)}arrowLeftAndUp(e){if(this.Editor.UI.someToolbarOpened){if(_s.usedKeys.includes(e.keyCode)&&(!e.shiftKey||e.keyCode===Me.TAB))return;this.Editor.UI.closeAllToolbars()}this.Editor.Toolbar.close();const{currentBlock:t}=this.Editor.BlockManager,r=((t==null?void 0:t.currentInput)!==void 0?Bs(t.currentInput):void 0)||this.Editor.BlockSelection.anyBlockSelected;if(e.shiftKey&&e.keyCode===Me.UP&&r){this.Editor.CrossBlockSelection.toggleBlockSelectedState(!1);return}if(e.keyCode===Me.UP||e.keyCode===Me.LEFT&&!this.isRtl?this.Editor.Caret.navigatePrevious():this.Editor.Caret.navigateNext()){e.preventDefault();return}ys(()=>{this.Editor.BlockManager.currentBlock&&this.Editor.BlockManager.currentBlock.updateCurrentInput()},20)(),this.Editor.BlockSelection.clearSelection(e)}needToolbarClosing(e){const t=e.keyCode===Me.ENTER&&this.Editor.Toolbar.toolbox.opened,r=e.keyCode===Me.ENTER&&this.Editor.BlockSettings.opened,a=e.keyCode===Me.ENTER&&this.Editor.InlineToolbar.opened,s=e.keyCode===Me.TAB;return!(e.shiftKey||s||t||r||a)}activateToolbox(){this.Editor.Toolbar.opened||this.Editor.Toolbar.moveAndOpen(),this.Editor.Toolbar.toolbox.open()}activateBlockSettings(){this.Editor.Toolbar.opened||this.Editor.Toolbar.moveAndOpen(),this.Editor.BlockSettings.opened||this.Editor.BlockSettings.open()}}class Xc{constructor(e){this.blocks=[],this.workingArea=e}get length(){return this.blocks.length}get array(){return this.blocks}get nodes(){return tf(this.workingArea.children)}static set(e,t,r){return isNaN(Number(t))?(Reflect.set(e,t,r),!0):(e.insert(+t,r),!0)}static get(e,t){return isNaN(Number(t))?Reflect.get(e,t):e.get(+t)}push(e){this.blocks.push(e),this.insertToDOM(e)}swap(e,t){const r=this.blocks[t];Q.swap(this.blocks[e].holder,r.holder),this.blocks[t]=this.blocks[e],this.blocks[e]=r}move(e,t){const r=this.blocks.splice(t,1)[0],a=e-1,s=Math.max(0,a),i=this.blocks[s];e>0?this.insertToDOM(r,"afterend",i):this.insertToDOM(r,"beforebegin",i),this.blocks.splice(e,0,r);const l=this.composeBlockEvent("move",{fromIndex:t,toIndex:e});r.call(Hn.MOVED,l)}insert(e,t,r=!1){if(!this.length){this.push(t);return}e>this.length&&(e=this.length),r&&(this.blocks[e].holder.remove(),this.blocks[e].call(Hn.REMOVED));const a=r?1:0;if(this.blocks.splice(e,a,t),e>0){const s=this.blocks[e-1];this.insertToDOM(t,"afterend",s)}else{const s=this.blocks[e+1];s?this.insertToDOM(t,"beforebegin",s):this.insertToDOM(t)}}replace(e,t){if(this.blocks[e]===void 0)throw Error("Incorrect index");this.blocks[e].holder.replaceWith(t.holder),this.blocks[e]=t}insertMany(e,t){const r=new DocumentFragment;for(const a of e)r.appendChild(a.holder);if(this.length>0){if(t>0){const a=Math.min(t-1,this.length-1);this.blocks[a].holder.after(r)}else t===0&&this.workingArea.prepend(r);this.blocks.splice(t,0,...e)}else this.blocks.push(...e),this.workingArea.appendChild(r);e.forEach(a=>a.call(Hn.RENDERED))}remove(e){isNaN(e)&&(e=this.length-1),this.blocks[e].holder.remove(),this.blocks[e].call(Hn.REMOVED),this.blocks.splice(e,1)}removeAll(){this.workingArea.innerHTML="",this.blocks.forEach(e=>e.call(Hn.REMOVED)),this.blocks.length=0}insertAfter(e,t){const r=this.blocks.indexOf(e);this.insert(r+1,t)}get(e){return this.blocks[e]}indexOf(e){return this.blocks.indexOf(e)}insertToDOM(e,t,r){t?r.holder.insertAdjacentElement(t,e.holder):this.workingArea.appendChild(e.holder),e.call(Hn.RENDERED)}composeBlockEvent(e,t){return new CustomEvent(e,{detail:t})}}const lm="block-removed",cm="block-added",sS="block-moved",dm="block-changed";class iS{constructor(){this.completed=Promise.resolve()}add(e){return new Promise((t,r)=>{this.completed=this.completed.then(e).then(t).catch(r)})}}class lS extends ze{constructor(){super(...arguments),this._currentBlockIndex=-1,this._blocks=null}get currentBlockIndex(){return this._currentBlockIndex}set currentBlockIndex(e){this._currentBlockIndex=e}get firstBlock(){return this._blocks[0]}get lastBlock(){return this._blocks[this._blocks.length-1]}get currentBlock(){return this._blocks[this.currentBlockIndex]}set currentBlock(e){this.currentBlockIndex=this.getBlockIndex(e)}get nextBlock(){return this.currentBlockIndex===this._blocks.length-1?null:this._blocks[this.currentBlockIndex+1]}get nextContentfulBlock(){return this.blocks.slice(this.currentBlockIndex+1).find(e=>!!e.inputs.length)}get previousContentfulBlock(){return this.blocks.slice(0,this.currentBlockIndex).reverse().find(e=>!!e.inputs.length)}get previousBlock(){return this.currentBlockIndex===0?null:this._blocks[this.currentBlockIndex-1]}get blocks(){return this._blocks.array}get isEditorEmpty(){return this.blocks.every(e=>e.isEmpty)}prepare(){const e=new Xc(this.Editor.UI.nodes.redactor);this._blocks=new Proxy(e,{set:Xc.set,get:Xc.get}),this.listeners.on(document,"copy",t=>this.Editor.BlockEvents.handleCommandC(t))}toggleReadOnly(e){e?this.disableModuleBindings():this.enableModuleBindings()}composeBlock({tool:e,data:t={},id:r=void 0,tunes:a={}}){const s=this.Editor.ReadOnly.isEnabled,i=this.Editor.Tools.blockTools.get(e),l=new jn({id:r,data:t,tool:i,api:this.Editor.API,readOnly:s,tunesData:a},this.eventsDispatcher);return s||window.requestIdleCallback(()=>{this.bindBlockEvents(l)},{timeout:2e3}),l}insert({id:e=void 0,tool:t=this.config.defaultBlock,data:r={},index:a,needToFocus:s=!0,replace:i=!1,tunes:l={}}={}){let c=a;c===void 0&&(c=this.currentBlockIndex+(i?0:1));const d=this.composeBlock({id:e,tool:t,data:r,tunes:l});return i&&this.blockDidMutated(lm,this.getBlockByIndex(c),{index:c}),this._blocks.insert(c,d,i),this.blockDidMutated(cm,d,{index:c}),s?this.currentBlockIndex=c:c<=this.currentBlockIndex&&this.currentBlockIndex++,d}insertMany(e,t=0){this._blocks.insertMany(e,t)}async update(e,t,r){if(!t&&!r)return e;const a=await e.data,s=this.composeBlock({id:e.id,tool:e.name,data:Object.assign({},a,t??{}),tunes:r??e.tunes}),i=this.getBlockIndex(e);return this._blocks.replace(i,s),this.blockDidMutated(dm,s,{index:i}),s}replace(e,t,r){const a=this.getBlockIndex(e);return this.insert({tool:t,data:r,index:a,replace:!0})}paste(e,t,r=!1){const a=this.insert({tool:e,replace:r});try{window.requestIdleCallback(()=>{a.call(Hn.ON_PASTE,t)})}catch(s){Ye(`${e}: onPaste callback call is failed`,"error",s)}return a}insertDefaultBlockAtIndex(e,t=!1){const r=this.composeBlock({tool:this.config.defaultBlock});return this._blocks[e]=r,this.blockDidMutated(cm,r,{index:e}),t?this.currentBlockIndex=e:e<=this.currentBlockIndex&&this.currentBlockIndex++,r}insertAtEnd(){return this.currentBlockIndex=this.blocks.length-1,this.insert()}async mergeBlocks(e,t){let r;if(e.name===t.name&&e.mergeable){const a=await t.data;if(Zt(a)){console.error("Could not merge Block. Failed to extract original Block data.");return}const[s]=Kl([a],e.tool.sanitizeConfig);r=s}else if(e.mergeable&&ks(t,"export")&&ks(e,"import")){const a=await t.exportDataAsString(),s=_n(a,e.tool.sanitizeConfig);r=mf(s,e.tool.conversionConfig)}r!==void 0&&(await e.mergeWith(r),this.removeBlock(t),this.currentBlockIndex=this._blocks.indexOf(e))}removeBlock(e,t=!0){return new Promise(r=>{const a=this._blocks.indexOf(e);if(!this.validateIndex(a))throw new Error("Can't find a Block to remove");this._blocks.remove(a),e.destroy(),this.blockDidMutated(lm,e,{index:a}),this.currentBlockIndex>=a&&this.currentBlockIndex--,this.blocks.length?a===0&&(this.currentBlockIndex=0):(this.unsetCurrentBlock(),t&&this.insert()),r()})}removeSelectedBlocks(){let e;for(let t=this.blocks.length-1;t>=0;t--)this.blocks[t].selected&&(this.removeBlock(this.blocks[t]),e=t);return e}removeAllBlocks(){for(let e=this.blocks.length-1;e>=0;e--)this._blocks.remove(e);this.unsetCurrentBlock(),this.insert(),this.currentBlock.firstInput.focus()}split(){const e=this.Editor.Caret.extractFragmentFromCaretPosition(),t=Q.make("div");t.appendChild(e);const r={text:Q.isEmpty(t)?"":t.innerHTML};return this.insert({data:r})}getBlockByIndex(e){return e===-1&&(e=this._blocks.length-1),this._blocks[e]}getBlockIndex(e){return this._blocks.indexOf(e)}getBlockById(e){return this._blocks.array.find(t=>t.id===e)}getBlock(e){Q.isElement(e)||(e=e.parentNode);const t=this._blocks.nodes,r=e.closest(`.${jn.CSS.wrapper}`),a=t.indexOf(r);if(a>=0)return this._blocks[a]}setCurrentBlockByChildNode(e){Q.isElement(e)||(e=e.parentNode);const t=e.closest(`.${jn.CSS.wrapper}`);if(!t)return;const r=t.closest(`.${this.Editor.UI.CSS.editorWrapper}`);if(r!=null&&r.isEqualNode(this.Editor.UI.nodes.wrapper))return this.currentBlockIndex=this._blocks.nodes.indexOf(t),this.currentBlock.updateCurrentInput(),this.currentBlock}getBlockByChildNode(e){if(!e||!(e instanceof Node))return;Q.isElement(e)||(e=e.parentNode);const t=e.closest(`.${jn.CSS.wrapper}`);return this.blocks.find(r=>r.holder===t)}swap(e,t){this._blocks.swap(e,t),this.currentBlockIndex=t}move(e,t=this.currentBlockIndex){if(isNaN(e)||isNaN(t)){Ye("Warning during 'move' call: incorrect indices provided.","warn");return}if(!this.validateIndex(e)||!this.validateIndex(t)){Ye("Warning during 'move' call: indices cannot be lower than 0 or greater than the amount of blocks.","warn");return}this._blocks.move(e,t),this.currentBlockIndex=e,this.blockDidMutated(sS,this.currentBlock,{fromIndex:t,toIndex:e})}async convert(e,t,r){if(!await e.save())throw new Error("Could not convert Block. Failed to extract original Block data.");const a=this.Editor.Tools.blockTools.get(t);if(!a)throw new Error(`Could not convert Block. Tool «${t}» not found.`);const s=await e.exportDataAsString(),i=_n(s,a.sanitizeConfig);let l=mf(i,a.conversionConfig,a.settings);return r&&(l=Object.assign(l,r)),this.replace(e,a.name,l)}unsetCurrentBlock(){this.currentBlockIndex=-1}async clear(e=!1){const t=new iS;[...this.blocks].forEach(r=>{t.add(async()=>{await this.removeBlock(r,!1)})}),await t.completed,this.unsetCurrentBlock(),e&&this.insert(),this.Editor.UI.checkEmptiness()}async destroy(){await Promise.all(this.blocks.map(e=>e.destroy()))}bindBlockEvents(e){const{BlockEvents:t}=this.Editor;this.readOnlyMutableListeners.on(e.holder,"keydown",r=>{t.keydown(r)}),this.readOnlyMutableListeners.on(e.holder,"keyup",r=>{t.keyup(r)}),this.readOnlyMutableListeners.on(e.holder,"dragover",r=>{t.dragOver(r)}),this.readOnlyMutableListeners.on(e.holder,"dragleave",r=>{t.dragLeave(r)}),e.on("didMutated",r=>this.blockDidMutated(dm,r,{index:this.getBlockIndex(r)}))}disableModuleBindings(){this.readOnlyMutableListeners.clearAll()}enableModuleBindings(){this.readOnlyMutableListeners.on(document,"cut",e=>this.Editor.BlockEvents.handleCommandX(e)),this.blocks.forEach(e=>{this.bindBlockEvents(e)})}validateIndex(e){return!(e<0||e>=this._blocks.length)}blockDidMutated(e,t,r){const a=new CustomEvent(e,{detail:{target:new Vn(t),...r}});return this.eventsDispatcher.emit(cf,{event:a}),t}}class cS extends ze{constructor(){super(...arguments),this.anyBlockSelectedCache=null,this.needToSelectAll=!1,this.nativeInputSelected=!1,this.readyToBlockSelection=!1}get sanitizerConfig(){return{p:{},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},ol:{},ul:{},li:{},br:!0,img:{src:!0,width:!0,height:!0},a:{href:!0},b:{},i:{},u:{}}}get allBlocksSelected(){const{BlockManager:e}=this.Editor;return e.blocks.every(t=>t.selected===!0)}set allBlocksSelected(e){const{BlockManager:t}=this.Editor;t.blocks.forEach(r=>{r.selected=e}),this.clearCache()}get anyBlockSelected(){const{BlockManager:e}=this.Editor;return this.anyBlockSelectedCache===null&&(this.anyBlockSelectedCache=e.blocks.some(t=>t.selected===!0)),this.anyBlockSelectedCache}get selectedBlocks(){return this.Editor.BlockManager.blocks.filter(e=>e.selected)}prepare(){this.selection=new Se,gr.add({name:"CMD+A",handler:e=>{const{BlockManager:t,ReadOnly:r}=this.Editor;if(r.isEnabled){e.preventDefault(),this.selectAllBlocks();return}t.currentBlock&&this.handleCommandA(e)},on:this.Editor.UI.nodes.redactor})}toggleReadOnly(){Se.get().removeAllRanges(),this.allBlocksSelected=!1}unSelectBlockByIndex(e){const{BlockManager:t}=this.Editor;let r;isNaN(e)?r=t.currentBlock:r=t.getBlockByIndex(e),r.selected=!1,this.clearCache()}clearSelection(e,t=!1){const{BlockManager:r,Caret:a,RectangleSelection:s}=this.Editor;this.needToSelectAll=!1,this.nativeInputSelected=!1,this.readyToBlockSelection=!1;const i=e&&e instanceof KeyboardEvent,l=i&&ef(e.keyCode);if(this.anyBlockSelected&&i&&l&&!Se.isSelectionExists){const c=r.removeSelectedBlocks();r.insertDefaultBlockAtIndex(c,!0),a.setToBlock(r.currentBlock),ys(()=>{const d=e.key;a.insertContentAtCaretPosition(d.length>1?"":d)},20)()}if(this.Editor.CrossBlockSelection.clear(e),!this.anyBlockSelected||s.isRectActivated()){this.Editor.RectangleSelection.clearSelection();return}t&&this.selection.restore(),this.allBlocksSelected=!1}copySelectedBlocks(e){e.preventDefault();const t=Q.make("div");this.selectedBlocks.forEach(s=>{const i=_n(s.holder.innerHTML,this.sanitizerConfig),l=Q.make("p");l.innerHTML=i,t.appendChild(l)});const r=Array.from(t.childNodes).map(s=>s.textContent).join(`
|
|
54
54
|
|
|
55
|
-
`),a=t.innerHTML;return e.clipboardData.setData("text/plain",r),e.clipboardData.setData("text/html",a),Promise.all(this.selectedBlocks.map(s=>s.save())).then(s=>{try{e.clipboardData.setData(this.Editor.Paste.MIME_TYPE,JSON.stringify(s))}catch{}})}selectBlockByIndex(e){const{BlockManager:t}=this.Editor,r=t.getBlockByIndex(e);r!==void 0&&this.selectBlock(r)}selectBlock(e){this.selection.save(),Se.get().removeAllRanges(),e.selected=!0,this.clearCache(),this.Editor.InlineToolbar.close()}unselectBlock(e){e.selected=!1,this.clearCache()}clearCache(){this.anyBlockSelectedCache=null}destroy(){gr.remove(this.Editor.UI.nodes.redactor,"CMD+A")}handleCommandA(e){if(this.Editor.RectangleSelection.clearSelection(),Q.isNativeInput(e.target)&&!this.readyToBlockSelection){this.readyToBlockSelection=!0;return}const t=this.Editor.BlockManager.getBlock(e.target),r=t.inputs;if(r.length>1&&!this.readyToBlockSelection){this.readyToBlockSelection=!0;return}if(r.length===1&&!this.needToSelectAll){this.needToSelectAll=!0;return}this.needToSelectAll?(e.preventDefault(),this.selectAllBlocks(),this.needToSelectAll=!1,this.readyToBlockSelection=!1):this.readyToBlockSelection&&(e.preventDefault(),this.selectBlock(t),this.needToSelectAll=!0)}selectAllBlocks(){this.selection.save(),Se.get().removeAllRanges(),this.allBlocksSelected=!0,this.Editor.InlineToolbar.close()}}let dS=class Qd extends ze{get positions(){return{START:"start",END:"end",DEFAULT:"default"}}static get CSS(){return{shadowCaret:"cdx-shadow-caret"}}setToBlock(e,t=this.positions.DEFAULT,r=0){var a;const{BlockManager:s,BlockSelection:i}=this.Editor;if(i.clearSelection(),!e.focusable){(a=window.getSelection())==null||a.removeAllRanges(),i.selectBlock(e),s.currentBlock=e;return}let l;switch(t){case this.positions.START:l=e.firstInput;break;case this.positions.END:l=e.lastInput;break;default:l=e.currentInput}if(!l)return;let c,d=r;if(t===this.positions.START)c=Q.getDeepestNode(l,!1),d=0;else if(t===this.positions.END)c=Q.getDeepestNode(l,!0),d=Q.getContentLength(c);else{const{node:u,offset:h}=Q.getNodeByOffset(l,r);u?(c=u,d=h):(c=Q.getDeepestNode(l,!1),d=0)}this.set(c,d),s.setCurrentBlockByChildNode(e.holder),s.currentBlock.currentInput=l}setToInput(e,t=this.positions.DEFAULT,r=0){const{currentBlock:a}=this.Editor.BlockManager,s=Q.getDeepestNode(e);switch(t){case this.positions.START:this.set(s,0);break;case this.positions.END:this.set(s,Q.getContentLength(s));break;default:r&&this.set(s,r)}a.currentInput=e}set(e,t=0){const{top:r,bottom:a}=Se.setCursor(e,t),{innerHeight:s}=window;r<0?window.scrollBy(0,r-30):a>s&&window.scrollBy(0,a-s+30)}setToTheLastBlock(){const e=this.Editor.BlockManager.lastBlock;if(e)if(e.tool.isDefault&&e.isEmpty)this.setToBlock(e);else{const t=this.Editor.BlockManager.insertAtEnd();this.setToBlock(t)}}extractFragmentFromCaretPosition(){const e=Se.get();if(e.rangeCount){const t=e.getRangeAt(0),r=this.Editor.BlockManager.currentBlock.currentInput;if(t.deleteContents(),r)if(Q.isNativeInput(r)){const a=r,s=document.createDocumentFragment(),i=a.value.substring(0,a.selectionStart),l=a.value.substring(a.selectionStart);return s.textContent=l,a.value=i,s}else{const a=t.cloneRange();return a.selectNodeContents(r),a.setStart(t.endContainer,t.endOffset),a.extractContents()}}}navigateNext(e=!1){const{BlockManager:t}=this.Editor,{currentBlock:r,nextBlock:a}=t;if(r===void 0)return!1;const{nextInput:s,currentInput:i}=r,l=i!==void 0?Ts(i):void 0;let c=a;const d=e||l||!r.focusable;if(s&&d)return this.setToInput(s,this.positions.START),!0;if(c===null){if(r.tool.isDefault||!d)return!1;c=t.insertAtEnd()}return d?(this.setToBlock(c,this.positions.START),!0):!1}navigatePrevious(e=!1){const{currentBlock:t,previousBlock:r}=this.Editor.BlockManager;if(!t)return!1;const{previousInput:a,currentInput:s}=t,i=s!==void 0?Bs(s):void 0,l=e||i||!t.focusable;return a&&l?(this.setToInput(a,this.positions.END),!0):r!==null&&l?(this.setToBlock(r,this.positions.END),!0):!1}createShadow(e){const t=document.createElement("span");t.classList.add(Qd.CSS.shadowCaret),e.insertAdjacentElement("beforeend",t)}restoreCaret(e){const t=e.querySelector(`.${Qd.CSS.shadowCaret}`);if(!t)return;new Se().expandToTag(t);const r=document.createRange();r.selectNode(t),r.extractContents()}insertContentAtCaretPosition(e){const t=document.createDocumentFragment(),r=document.createElement("div"),a=Se.get(),s=Se.range;r.innerHTML=e,Array.from(r.childNodes).forEach(d=>t.appendChild(d)),t.childNodes.length===0&&t.appendChild(new Text);const i=t.lastChild;s.deleteContents(),s.insertNode(t);const l=document.createRange(),c=i.nodeType===Node.TEXT_NODE?i:i.firstChild;c!==null&&c.textContent!==null&&l.setStart(c,c.textContent.length),a.removeAllRanges(),a.addRange(l)}};class uS extends ze{constructor(){super(...arguments),this.onMouseUp=()=>{this.listeners.off(document,"mouseover",this.onMouseOver),this.listeners.off(document,"mouseup",this.onMouseUp)},this.onMouseOver=e=>{const{BlockManager:t,BlockSelection:r}=this.Editor;if(e.relatedTarget===null&&e.target===null)return;const a=t.getBlockByChildNode(e.relatedTarget)||this.lastSelectedBlock,s=t.getBlockByChildNode(e.target);if(!(!a||!s)&&s!==a){if(a===this.firstSelectedBlock){Se.get().removeAllRanges(),a.selected=!0,s.selected=!0,r.clearCache();return}if(s===this.firstSelectedBlock){a.selected=!1,s.selected=!1,r.clearCache();return}this.Editor.InlineToolbar.close(),this.toggleBlocksSelectedState(a,s),this.lastSelectedBlock=s}}}async prepare(){this.listeners.on(document,"mousedown",e=>{this.enableCrossBlockSelection(e)})}watchSelection(e){if(e.button!==X_.LEFT)return;const{BlockManager:t}=this.Editor;this.firstSelectedBlock=t.getBlock(e.target),this.lastSelectedBlock=this.firstSelectedBlock,this.listeners.on(document,"mouseover",this.onMouseOver),this.listeners.on(document,"mouseup",this.onMouseUp)}get isCrossBlockSelectionStarted(){return!!this.firstSelectedBlock&&!!this.lastSelectedBlock&&this.firstSelectedBlock!==this.lastSelectedBlock}toggleBlockSelectedState(e=!0){const{BlockManager:t,BlockSelection:r}=this.Editor;this.lastSelectedBlock||(this.lastSelectedBlock=this.firstSelectedBlock=t.currentBlock),this.firstSelectedBlock===this.lastSelectedBlock&&(this.firstSelectedBlock.selected=!0,r.clearCache(),Se.get().removeAllRanges());const a=t.blocks.indexOf(this.lastSelectedBlock)+(e?1:-1),s=t.blocks[a];s&&(this.lastSelectedBlock.selected!==s.selected?(s.selected=!0,r.clearCache()):(this.lastSelectedBlock.selected=!1,r.clearCache()),this.lastSelectedBlock=s,this.Editor.InlineToolbar.close(),s.holder.scrollIntoView({block:"nearest"}))}clear(e){const{BlockManager:t,BlockSelection:r,Caret:a}=this.Editor,s=t.blocks.indexOf(this.firstSelectedBlock),i=t.blocks.indexOf(this.lastSelectedBlock);if(r.anyBlockSelected&&s>-1&&i>-1&&e&&e instanceof KeyboardEvent)switch(e.keyCode){case Me.DOWN:case Me.RIGHT:a.setToBlock(t.blocks[Math.max(s,i)],a.positions.END);break;case Me.UP:case Me.LEFT:a.setToBlock(t.blocks[Math.min(s,i)],a.positions.START);break;default:a.setToBlock(t.blocks[Math.max(s,i)],a.positions.END)}this.firstSelectedBlock=this.lastSelectedBlock=null}enableCrossBlockSelection(e){const{UI:t}=this.Editor;Se.isCollapsed||this.Editor.BlockSelection.clearSelection(e),t.nodes.redactor.contains(e.target)?this.watchSelection(e):this.Editor.BlockSelection.clearSelection(e)}toggleBlocksSelectedState(e,t){const{BlockManager:r,BlockSelection:a}=this.Editor,s=r.blocks.indexOf(e),i=r.blocks.indexOf(t),l=e.selected!==t.selected;for(let c=Math.min(s,i);c<=Math.max(s,i);c++){const d=r.blocks[c];d!==this.firstSelectedBlock&&d!==(l?e:t)&&(r.blocks[c].selected=!r.blocks[c].selected,a.clearCache())}}}class hS extends ze{constructor(){super(...arguments),this.isStartedAtEditor=!1}toggleReadOnly(e){e?this.disableModuleBindings():this.enableModuleBindings()}enableModuleBindings(){const{UI:e}=this.Editor;this.readOnlyMutableListeners.on(e.nodes.holder,"drop",async t=>{await this.processDrop(t)},!0),this.readOnlyMutableListeners.on(e.nodes.holder,"dragstart",()=>{this.processDragStart()}),this.readOnlyMutableListeners.on(e.nodes.holder,"dragover",t=>{this.processDragOver(t)},!0)}disableModuleBindings(){this.readOnlyMutableListeners.clearAll()}async processDrop(e){const{BlockManager:t,Paste:r,Caret:a}=this.Editor;e.preventDefault(),t.blocks.forEach(i=>{i.dropTarget=!1}),Se.isAtEditor&&!Se.isCollapsed&&this.isStartedAtEditor&&document.execCommand("delete"),this.isStartedAtEditor=!1;const s=t.setCurrentBlockByChildNode(e.target);if(s)this.Editor.Caret.setToBlock(s,a.positions.END);else{const i=t.setCurrentBlockByChildNode(t.lastBlock.holder);this.Editor.Caret.setToBlock(i,a.positions.END)}await r.processDataTransfer(e.dataTransfer,!0)}processDragStart(){Se.isAtEditor&&!Se.isCollapsed&&(this.isStartedAtEditor=!0),this.Editor.InlineToolbar.close()}processDragOver(e){e.preventDefault()}}const pS=180,fS=400;class mS extends ze{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.disabled=!1,this.batchingTimeout=null,this.batchingOnChangeQueue=new Map,this.batchTime=fS,this.mutationObserver=new MutationObserver(r=>{this.redactorChanged(r)}),this.eventsDispatcher.on(cf,r=>{this.particularBlockChanged(r.event)}),this.eventsDispatcher.on(df,()=>{this.disable()}),this.eventsDispatcher.on(uf,()=>{this.enable()})}enable(){this.mutationObserver.observe(this.Editor.UI.nodes.redactor,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),this.disabled=!1}disable(){this.mutationObserver.disconnect(),this.disabled=!0}particularBlockChanged(e){this.disabled||!tt(this.config.onChange)||(this.batchingOnChangeQueue.set(`block:${e.detail.target.id}:event:${e.type}`,e),this.batchingTimeout&&clearTimeout(this.batchingTimeout),this.batchingTimeout=setTimeout(()=>{let t;this.batchingOnChangeQueue.size===1?t=this.batchingOnChangeQueue.values().next().value:t=Array.from(this.batchingOnChangeQueue.values()),this.config.onChange&&this.config.onChange(this.Editor.API.methods,t),this.batchingOnChangeQueue.clear()},this.batchTime))}redactorChanged(e){this.eventsDispatcher.emit(Wl,{mutations:e})}}const um=class ag extends ze{constructor(){super(...arguments),this.MIME_TYPE="application/x-editor-js",this.toolsTags={},this.tagsByTool={},this.toolsPatterns=[],this.toolsFiles={},this.exceptionList=[],this.processTool=e=>{try{const t=e.create({},{},!1);if(e.pasteConfig===!1){this.exceptionList.push(e.name);return}if(!tt(t.onPaste))return;this.getTagsConfig(e),this.getFilesConfig(e),this.getPatternsConfig(e)}catch(t){Ye(`Paste handling for «${e.name}» Tool hasn't been set up because of the error`,"warn",t)}},this.handlePasteEvent=async e=>{const{BlockManager:t,Toolbar:r}=this.Editor,a=t.setCurrentBlockByChildNode(e.target);!a||this.isNativeBehaviour(e.target)&&!e.clipboardData.types.includes("Files")||a&&this.exceptionList.includes(a.name)||(e.preventDefault(),this.processDataTransfer(e.clipboardData),r.close())}}async prepare(){this.processTools()}toggleReadOnly(e){e?this.unsetCallback():this.setCallback()}async processDataTransfer(e,t=!1){const{Tools:r}=this.Editor,a=e.types;if((a.includes?a.includes("Files"):a.contains("Files"))&&!Zt(this.toolsFiles)){await this.processFiles(e.files);return}const s=e.getData(this.MIME_TYPE),i=e.getData("text/plain");let l=e.getData("text/html");if(s)try{this.insertEditorJSData(JSON.parse(s));return}catch{}t&&i.trim()&&l.trim()&&(l="<p>"+(l.trim()?l:i)+"</p>");const c=Object.keys(this.toolsTags).reduce((h,p)=>(h[p.toLowerCase()]=this.toolsTags[p].sanitizationConfig??{},h),{}),d=Object.assign({},c,r.getAllInlineToolsSanitizeConfig(),{br:{}}),u=_n(l,d);!u.trim()||u.trim()===i||!Q.isHTMLString(u)?await this.processText(i):await this.processText(u,!0)}async processText(e,t=!1){const{Caret:r,BlockManager:a}=this.Editor,s=t?this.processHTML(e):this.processPlain(e);if(!s.length)return;if(s.length===1){s[0].isBlock?this.processSingleBlock(s.pop()):this.processInlinePaste(s.pop());return}const i=a.currentBlock&&a.currentBlock.tool.isDefault&&a.currentBlock.isEmpty;s.map(async(l,c)=>this.insertBlock(l,c===0&&i)),a.currentBlock&&r.setToBlock(a.currentBlock,r.positions.END)}setCallback(){this.listeners.on(this.Editor.UI.nodes.holder,"paste",this.handlePasteEvent)}unsetCallback(){this.listeners.off(this.Editor.UI.nodes.holder,"paste",this.handlePasteEvent)}processTools(){const e=this.Editor.Tools.blockTools;Array.from(e.values()).forEach(this.processTool)}collectTagNames(e){return Rn(e)?[e]:_t(e)?Object.keys(e):[]}getTagsConfig(e){if(e.pasteConfig===!1)return;const t=e.pasteConfig.tags||[],r=[];t.forEach(a=>{const s=this.collectTagNames(a);r.push(...s),s.forEach(i=>{if(Object.prototype.hasOwnProperty.call(this.toolsTags,i)){Ye(`Paste handler for «${e.name}» Tool on «${i}» tag is skipped because it is already used by «${this.toolsTags[i].tool.name}» Tool.`,"warn");return}const l=_t(a)?a[i]:null;this.toolsTags[i.toUpperCase()]={tool:e,sanitizationConfig:l}})}),this.tagsByTool[e.name]=r.map(a=>a.toUpperCase())}getFilesConfig(e){if(e.pasteConfig===!1)return;const{files:t={}}=e.pasteConfig;let{extensions:r,mimeTypes:a}=t;!r&&!a||(r&&!Array.isArray(r)&&(Ye(`«extensions» property of the onDrop config for «${e.name}» Tool should be an array`),r=[]),a&&!Array.isArray(a)&&(Ye(`«mimeTypes» property of the onDrop config for «${e.name}» Tool should be an array`),a=[]),a&&(a=a.filter(s=>tC(s)?!0:(Ye(`MIME type value «${s}» for the «${e.name}» Tool is not a valid MIME type`,"warn"),!1))),this.toolsFiles[e.name]={extensions:r||[],mimeTypes:a||[]})}getPatternsConfig(e){e.pasteConfig===!1||!e.pasteConfig.patterns||Zt(e.pasteConfig.patterns)||Object.entries(e.pasteConfig.patterns).forEach(([t,r])=>{r instanceof RegExp||Ye(`Pattern ${r} for «${e.name}» Tool is skipped because it should be a Regexp instance.`,"warn"),this.toolsPatterns.push({key:t,pattern:r,tool:e})})}isNativeBehaviour(e){return Q.isNativeInput(e)}async processFiles(e){const{BlockManager:t}=this.Editor;let r;r=await Promise.all(Array.from(e).map(s=>this.processFile(s))),r=r.filter(s=>!!s);const a=t.currentBlock.tool.isDefault&&t.currentBlock.isEmpty;r.forEach((s,i)=>{t.paste(s.type,s.event,i===0&&a)})}async processFile(e){const t=eC(e),r=Object.entries(this.toolsFiles).find(([s,{mimeTypes:i,extensions:l}])=>{const[c,d]=e.type.split("/"),u=l.find(p=>p.toLowerCase()===t.toLowerCase()),h=i.find(p=>{const[m,f]=p.split("/");return m===c&&(f===d||f==="*")});return!!u||!!h});if(!r)return;const[a]=r;return{event:this.composePasteEvent("file",{file:e}),type:a}}processHTML(e){const{Tools:t}=this.Editor,r=Q.make("DIV");return r.innerHTML=e,this.getNodes(r).map(a=>{let s,i=t.defaultTool,l=!1;switch(a.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:s=Q.make("div"),s.appendChild(a);break;case Node.ELEMENT_NODE:s=a,l=!0,this.toolsTags[s.tagName]&&(i=this.toolsTags[s.tagName].tool);break}const{tags:c}=i.pasteConfig||{tags:[]},d=c.reduce((p,m)=>(this.collectTagNames(m).forEach(f=>{const g=_t(m)?m[f]:null;p[f.toLowerCase()]=g||{}}),p),{}),u=Object.assign({},d,i.baseSanitizeConfig);if(s.tagName.toLowerCase()==="table"){const p=_n(s.outerHTML,u);s=Q.make("div",void 0,{innerHTML:p}).firstChild}else s.innerHTML=_n(s.innerHTML,u);const h=this.composePasteEvent("tag",{data:s});return{content:s,isBlock:l,tool:i.name,event:h}}).filter(a=>{const s=Q.isEmpty(a.content),i=Q.isSingleTag(a.content);return!s||i})}processPlain(e){const{defaultBlock:t}=this.config;if(!e)return[];const r=t;return e.split(/\r?\n/).filter(a=>a.trim()).map(a=>{const s=Q.make("div");s.textContent=a;const i=this.composePasteEvent("tag",{data:s});return{content:s,tool:r,isBlock:!1,event:i}})}async processSingleBlock(e){const{Caret:t,BlockManager:r}=this.Editor,{currentBlock:a}=r;if(!a||e.tool!==a.name||!Q.containsOnlyInlineElements(e.content.innerHTML)){this.insertBlock(e,(a==null?void 0:a.tool.isDefault)&&a.isEmpty);return}t.insertContentAtCaretPosition(e.content.innerHTML)}async processInlinePaste(e){const{BlockManager:t,Caret:r}=this.Editor,{content:a}=e;if(t.currentBlock&&t.currentBlock.tool.isDefault&&a.textContent.length<ag.PATTERN_PROCESSING_MAX_LENGTH){const s=await this.processPattern(a.textContent);if(s){const i=t.currentBlock&&t.currentBlock.tool.isDefault&&t.currentBlock.isEmpty,l=t.paste(s.tool,s.event,i);r.setToBlock(l,r.positions.END);return}}if(t.currentBlock&&t.currentBlock.currentInput){const s=t.currentBlock.tool.baseSanitizeConfig;document.execCommand("insertHTML",!1,_n(a.innerHTML,s))}else this.insertBlock(e)}async processPattern(e){const t=this.toolsPatterns.find(r=>{const a=r.pattern.exec(e);return a?e===a.shift():!1});return t?{event:this.composePasteEvent("pattern",{key:t.key,data:e}),tool:t.tool.name}:void 0}insertBlock(e,t=!1){const{BlockManager:r,Caret:a}=this.Editor,{currentBlock:s}=r;let i;if(t&&s&&s.isEmpty){i=r.paste(e.tool,e.event,!0),a.setToBlock(i,a.positions.END);return}i=r.paste(e.tool,e.event),a.setToBlock(i,a.positions.END)}insertEditorJSData(e){const{BlockManager:t,Caret:r,Tools:a}=this.Editor;Gl(e,s=>a.blockTools.get(s).sanitizeConfig).forEach(({tool:s,data:i},l)=>{let c=!1;l===0&&(c=t.currentBlock&&t.currentBlock.tool.isDefault&&t.currentBlock.isEmpty);const d=t.insert({tool:s,data:i,replace:c});r.setToBlock(d,r.positions.END)})}processElementNode(e,t,r){const a=Object.keys(this.toolsTags),s=e,{tool:i}=this.toolsTags[s.tagName]||{},l=this.tagsByTool[i==null?void 0:i.name]||[],c=a.includes(s.tagName),d=Q.blockElements.includes(s.tagName.toLowerCase()),u=Array.from(s.children).some(({tagName:p})=>a.includes(p)&&!l.includes(p)),h=Array.from(s.children).some(({tagName:p})=>Q.blockElements.includes(p.toLowerCase()));if(!d&&!c&&!u)return r.appendChild(s),[...t,r];if(c&&!u||d&&!h&&!u)return[...t,r,s]}getNodes(e){const t=Array.from(e.childNodes);let r;const a=(s,i)=>{if(Q.isEmpty(i)&&!Q.isSingleTag(i))return s;const l=s[s.length-1];let c=new DocumentFragment;switch(l&&Q.isFragment(l)&&(c=s.pop()),i.nodeType){case Node.ELEMENT_NODE:if(r=this.processElementNode(i,s,c),r)return r;break;case Node.TEXT_NODE:return c.appendChild(i),[...s,c];default:return[...s,c]}return[...s,...Array.from(i.childNodes).reduce(a,[])]};return t.reduce(a,[])}composePasteEvent(e,t){return new CustomEvent(e,{detail:t})}};um.PATTERN_PROCESSING_MAX_LENGTH=450;let gS=um;class yS extends ze{constructor(){super(...arguments),this.toolsDontSupportReadOnly=[],this.readOnlyEnabled=!1}get isEnabled(){return this.readOnlyEnabled}async prepare(){const{Tools:e}=this.Editor,{blockTools:t}=e,r=[];Array.from(t.entries()).forEach(([a,s])=>{s.isReadOnlySupported||r.push(a)}),this.toolsDontSupportReadOnly=r,this.config.readOnly&&r.length>0&&this.throwCriticalError(),this.toggle(this.config.readOnly,!0)}async toggle(e=!this.readOnlyEnabled,t=!1){e&&this.toolsDontSupportReadOnly.length>0&&this.throwCriticalError();const r=this.readOnlyEnabled;this.readOnlyEnabled=e;for(const s in this.Editor)this.Editor[s].toggleReadOnly&&this.Editor[s].toggleReadOnly(e);if(r===e)return this.readOnlyEnabled;if(t)return this.readOnlyEnabled;this.Editor.ModificationsObserver.disable();const a=await this.Editor.Saver.save();return await this.Editor.BlockManager.clear(),await this.Editor.Renderer.render(a.blocks),this.Editor.ModificationsObserver.enable(),this.readOnlyEnabled}throwCriticalError(){throw new lf(`To enable read-only mode all connected tools should support it. Tools ${this.toolsDontSupportReadOnly.join(", ")} don't support read-only mode.`)}}let bS=class ti extends ze{constructor(){super(...arguments),this.isRectSelectionActivated=!1,this.SCROLL_SPEED=3,this.HEIGHT_OF_SCROLL_ZONE=40,this.BOTTOM_SCROLL_ZONE=1,this.TOP_SCROLL_ZONE=2,this.MAIN_MOUSE_BUTTON=0,this.mousedown=!1,this.isScrolling=!1,this.inScrollZone=null,this.startX=0,this.startY=0,this.mouseX=0,this.mouseY=0,this.stackOfSelected=[],this.listenerIds=[]}static get CSS(){return{overlay:"codex-editor-overlay",overlayContainer:"codex-editor-overlay__container",rect:"codex-editor-overlay__rectangle",topScrollZone:"codex-editor-overlay__scroll-zone--top",bottomScrollZone:"codex-editor-overlay__scroll-zone--bottom"}}prepare(){this.enableModuleBindings()}startSelection(e,t){const r=document.elementFromPoint(e-window.pageXOffset,t-window.pageYOffset);r.closest(`.${this.Editor.Toolbar.CSS.toolbar}`)||(this.Editor.BlockSelection.allBlocksSelected=!1,this.clearSelection(),this.stackOfSelected=[]);const a=[`.${jn.CSS.content}`,`.${this.Editor.Toolbar.CSS.toolbar}`,`.${this.Editor.InlineToolbar.CSS.inlineToolbar}`],s=r.closest("."+this.Editor.UI.CSS.editorWrapper),i=a.some(l=>!!r.closest(l));!s||i||(this.mousedown=!0,this.startX=e,this.startY=t)}endSelection(){this.mousedown=!1,this.startX=0,this.startY=0,this.overlayRectangle.style.display="none"}isRectActivated(){return this.isRectSelectionActivated}clearSelection(){this.isRectSelectionActivated=!1}enableModuleBindings(){const{container:e}=this.genHTML();this.listeners.on(e,"mousedown",t=>{this.processMouseDown(t)},!1),this.listeners.on(document.body,"mousemove",Vl(t=>{this.processMouseMove(t)},10),{passive:!0}),this.listeners.on(document.body,"mouseleave",()=>{this.processMouseLeave()}),this.listeners.on(window,"scroll",Vl(t=>{this.processScroll(t)},10),{passive:!0}),this.listeners.on(document.body,"mouseup",()=>{this.processMouseUp()},!1)}processMouseDown(e){e.button===this.MAIN_MOUSE_BUTTON&&(e.target.closest(Q.allInputsSelector)!==null||this.startSelection(e.pageX,e.pageY))}processMouseMove(e){this.changingRectangle(e),this.scrollByZones(e.clientY)}processMouseLeave(){this.clearSelection(),this.endSelection()}processScroll(e){this.changingRectangle(e)}processMouseUp(){this.clearSelection(),this.endSelection()}scrollByZones(e){if(this.inScrollZone=null,e<=this.HEIGHT_OF_SCROLL_ZONE&&(this.inScrollZone=this.TOP_SCROLL_ZONE),document.documentElement.clientHeight-e<=this.HEIGHT_OF_SCROLL_ZONE&&(this.inScrollZone=this.BOTTOM_SCROLL_ZONE),!this.inScrollZone){this.isScrolling=!1;return}this.isScrolling||(this.scrollVertical(this.inScrollZone===this.TOP_SCROLL_ZONE?-this.SCROLL_SPEED:this.SCROLL_SPEED),this.isScrolling=!0)}genHTML(){const{UI:e}=this.Editor,t=e.nodes.holder.querySelector("."+e.CSS.editorWrapper),r=Q.make("div",ti.CSS.overlay,{}),a=Q.make("div",ti.CSS.overlayContainer,{}),s=Q.make("div",ti.CSS.rect,{});return a.appendChild(s),r.appendChild(a),t.appendChild(r),this.overlayRectangle=s,{container:t,overlay:r}}scrollVertical(e){if(!(this.inScrollZone&&this.mousedown))return;const t=window.pageYOffset;window.scrollBy(0,e),this.mouseY+=window.pageYOffset-t,setTimeout(()=>{this.scrollVertical(e)},0)}changingRectangle(e){if(!this.mousedown)return;e.pageY!==void 0&&(this.mouseX=e.pageX,this.mouseY=e.pageY);const{rightPos:t,leftPos:r,index:a}=this.genInfoForMouseSelection(),s=this.startX>t&&this.mouseX>t,i=this.startX<r&&this.mouseX<r;this.rectCrossesBlocks=!(s||i),this.isRectSelectionActivated||(this.rectCrossesBlocks=!1,this.isRectSelectionActivated=!0,this.shrinkRectangleToPoint(),this.overlayRectangle.style.display="block"),this.updateRectangleSize(),this.Editor.Toolbar.close(),a!==void 0&&(this.trySelectNextBlock(a),this.inverseSelection(),Se.get().removeAllRanges())}shrinkRectangleToPoint(){this.overlayRectangle.style.left=`${this.startX-window.pageXOffset}px`,this.overlayRectangle.style.top=`${this.startY-window.pageYOffset}px`,this.overlayRectangle.style.bottom=`calc(100% - ${this.startY-window.pageYOffset}px`,this.overlayRectangle.style.right=`calc(100% - ${this.startX-window.pageXOffset}px`}inverseSelection(){const e=this.Editor.BlockManager.getBlockByIndex(this.stackOfSelected[0]).selected;if(this.rectCrossesBlocks&&!e)for(const t of this.stackOfSelected)this.Editor.BlockSelection.selectBlockByIndex(t);if(!this.rectCrossesBlocks&&e)for(const t of this.stackOfSelected)this.Editor.BlockSelection.unSelectBlockByIndex(t)}updateRectangleSize(){this.mouseY>=this.startY?(this.overlayRectangle.style.top=`${this.startY-window.pageYOffset}px`,this.overlayRectangle.style.bottom=`calc(100% - ${this.mouseY-window.pageYOffset}px`):(this.overlayRectangle.style.bottom=`calc(100% - ${this.startY-window.pageYOffset}px`,this.overlayRectangle.style.top=`${this.mouseY-window.pageYOffset}px`),this.mouseX>=this.startX?(this.overlayRectangle.style.left=`${this.startX-window.pageXOffset}px`,this.overlayRectangle.style.right=`calc(100% - ${this.mouseX-window.pageXOffset}px`):(this.overlayRectangle.style.right=`calc(100% - ${this.startX-window.pageXOffset}px`,this.overlayRectangle.style.left=`${this.mouseX-window.pageXOffset}px`)}genInfoForMouseSelection(){const e=document.body.offsetWidth/2,t=this.mouseY-window.pageYOffset,r=document.elementFromPoint(e,t),a=this.Editor.BlockManager.getBlockByChildNode(r);let s;a!==void 0&&(s=this.Editor.BlockManager.blocks.findIndex(u=>u.holder===a.holder));const i=this.Editor.BlockManager.lastBlock.holder.querySelector("."+jn.CSS.content),l=Number.parseInt(window.getComputedStyle(i).width,10)/2,c=e-l,d=e+l;return{index:s,leftPos:c,rightPos:d}}addBlockInSelection(e){this.rectCrossesBlocks&&this.Editor.BlockSelection.selectBlockByIndex(e),this.stackOfSelected.push(e)}trySelectNextBlock(e){const t=this.stackOfSelected[this.stackOfSelected.length-1]===e,r=this.stackOfSelected.length,a=1,s=-1,i=0;if(t)return;const l=this.stackOfSelected[r-1]-this.stackOfSelected[r-2]>0;let c=i;r>1&&(c=l?a:s);const d=e>this.stackOfSelected[r-1]&&c===a,u=e<this.stackOfSelected[r-1]&&c===s,h=!(d||u||c===i);if(!h&&(e>this.stackOfSelected[r-1]||this.stackOfSelected[r-1]===void 0)){let f=this.stackOfSelected[r-1]+1||e;for(f;f<=e;f++)this.addBlockInSelection(f);return}if(!h&&e<this.stackOfSelected[r-1]){for(let f=this.stackOfSelected[r-1]-1;f>=e;f--)this.addBlockInSelection(f);return}if(!h)return;let p=r-1,m;for(e>this.stackOfSelected[r-1]?m=()=>e>this.stackOfSelected[p]:m=()=>e<this.stackOfSelected[p];m();)this.rectCrossesBlocks&&this.Editor.BlockSelection.unSelectBlockByIndex(this.stackOfSelected[p]),this.stackOfSelected.pop(),p--}};class kS extends ze{async render(e){return new Promise(t=>{const{Tools:r,BlockManager:a}=this.Editor;if(e.length===0)a.insert();else{const s=e.map(({type:i,data:l,tunes:c,id:d})=>{r.available.has(i)===!1&&(Qt(`Tool «${i}» is not found. Check 'tools' property at the Editor.js config.`,"warn"),l=this.composeStubDataForTool(i,l,d),i=r.stubTool);let u;try{u=a.composeBlock({id:d,tool:i,data:l,tunes:c})}catch(h){Ye(`Block «${i}» skipped because of plugins error`,"error",{data:l,error:h}),l=this.composeStubDataForTool(i,l,d),i=r.stubTool,u=a.composeBlock({id:d,tool:i,data:l,tunes:c})}return u});a.insertMany(s)}window.requestIdleCallback(()=>{t()},{timeout:2e3})})}composeStubDataForTool(e,t,r){const{Tools:a}=this.Editor;let s=e;if(a.unavailable.has(e)){const i=a.unavailable.get(e).toolbox;i!==void 0&&i[0].title!==void 0&&(s=i[0].title)}return{savedData:{id:r,type:e,data:t},title:s}}}class vS extends ze{async save(){const{BlockManager:e,Tools:t}=this.Editor,r=e.blocks,a=[];try{r.forEach(l=>{a.push(this.getSavedData(l))});const s=await Promise.all(a),i=await Gl(s,l=>t.blockTools.get(l).sanitizeConfig);return this.makeOutput(i)}catch(s){Qt("Saving failed due to the Error %o","error",s)}}async getSavedData(e){const t=await e.save(),r=t&&await e.validate(t.data);return{...t,isValid:r}}makeOutput(e){const t=[];return e.forEach(({id:r,tool:a,data:s,tunes:i,isValid:l})=>{if(!l){Ye(`Block «${a}» skipped because saved data is invalid`);return}if(a===this.Editor.Tools.stubTool){t.push(s);return}const c={id:r,type:a,data:s,...!Zt(i)&&{tunes:i}};t.push(c)}),{time:+new Date,blocks:t,version:"2.31.0"}}}(function(){try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode(".ce-paragraph{line-height:1.6em;outline:none}.ce-block:only-of-type .ce-paragraph[data-placeholder-active]:empty:before,.ce-block:only-of-type .ce-paragraph[data-placeholder-active][data-empty=true]:before{content:attr(data-placeholder-active)}.ce-paragraph p:first-of-type{margin-top:0}.ce-paragraph p:last-of-type{margin-bottom:0}")),document.head.appendChild(n)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();const wS='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M8 9V7.2C8 7.08954 8.08954 7 8.2 7L12 7M16 9V7.2C16 7.08954 15.9105 7 15.8 7L12 7M12 7L12 17M12 17H10M12 17H14"/></svg>';function _S(n){const e=document.createElement("div");e.innerHTML=n.trim();const t=document.createDocumentFragment();return t.append(...Array.from(e.childNodes)),t}/**
|
|
55
|
+
`),a=t.innerHTML;return e.clipboardData.setData("text/plain",r),e.clipboardData.setData("text/html",a),Promise.all(this.selectedBlocks.map(s=>s.save())).then(s=>{try{e.clipboardData.setData(this.Editor.Paste.MIME_TYPE,JSON.stringify(s))}catch{}})}selectBlockByIndex(e){const{BlockManager:t}=this.Editor,r=t.getBlockByIndex(e);r!==void 0&&this.selectBlock(r)}selectBlock(e){this.selection.save(),Se.get().removeAllRanges(),e.selected=!0,this.clearCache(),this.Editor.InlineToolbar.close()}unselectBlock(e){e.selected=!1,this.clearCache()}clearCache(){this.anyBlockSelectedCache=null}destroy(){gr.remove(this.Editor.UI.nodes.redactor,"CMD+A")}handleCommandA(e){if(this.Editor.RectangleSelection.clearSelection(),Q.isNativeInput(e.target)&&!this.readyToBlockSelection){this.readyToBlockSelection=!0;return}const t=this.Editor.BlockManager.getBlock(e.target),r=t.inputs;if(r.length>1&&!this.readyToBlockSelection){this.readyToBlockSelection=!0;return}if(r.length===1&&!this.needToSelectAll){this.needToSelectAll=!0;return}this.needToSelectAll?(e.preventDefault(),this.selectAllBlocks(),this.needToSelectAll=!1,this.readyToBlockSelection=!1):this.readyToBlockSelection&&(e.preventDefault(),this.selectBlock(t),this.needToSelectAll=!0)}selectAllBlocks(){this.selection.save(),Se.get().removeAllRanges(),this.allBlocksSelected=!0,this.Editor.InlineToolbar.close()}}let dS=class Zd extends ze{get positions(){return{START:"start",END:"end",DEFAULT:"default"}}static get CSS(){return{shadowCaret:"cdx-shadow-caret"}}setToBlock(e,t=this.positions.DEFAULT,r=0){var a;const{BlockManager:s,BlockSelection:i}=this.Editor;if(i.clearSelection(),!e.focusable){(a=window.getSelection())==null||a.removeAllRanges(),i.selectBlock(e),s.currentBlock=e;return}let l;switch(t){case this.positions.START:l=e.firstInput;break;case this.positions.END:l=e.lastInput;break;default:l=e.currentInput}if(!l)return;let c,d=r;if(t===this.positions.START)c=Q.getDeepestNode(l,!1),d=0;else if(t===this.positions.END)c=Q.getDeepestNode(l,!0),d=Q.getContentLength(c);else{const{node:u,offset:h}=Q.getNodeByOffset(l,r);u?(c=u,d=h):(c=Q.getDeepestNode(l,!1),d=0)}this.set(c,d),s.setCurrentBlockByChildNode(e.holder),s.currentBlock.currentInput=l}setToInput(e,t=this.positions.DEFAULT,r=0){const{currentBlock:a}=this.Editor.BlockManager,s=Q.getDeepestNode(e);switch(t){case this.positions.START:this.set(s,0);break;case this.positions.END:this.set(s,Q.getContentLength(s));break;default:r&&this.set(s,r)}a.currentInput=e}set(e,t=0){const{top:r,bottom:a}=Se.setCursor(e,t),{innerHeight:s}=window;r<0?window.scrollBy(0,r-30):a>s&&window.scrollBy(0,a-s+30)}setToTheLastBlock(){const e=this.Editor.BlockManager.lastBlock;if(e)if(e.tool.isDefault&&e.isEmpty)this.setToBlock(e);else{const t=this.Editor.BlockManager.insertAtEnd();this.setToBlock(t)}}extractFragmentFromCaretPosition(){const e=Se.get();if(e.rangeCount){const t=e.getRangeAt(0),r=this.Editor.BlockManager.currentBlock.currentInput;if(t.deleteContents(),r)if(Q.isNativeInput(r)){const a=r,s=document.createDocumentFragment(),i=a.value.substring(0,a.selectionStart),l=a.value.substring(a.selectionStart);return s.textContent=l,a.value=i,s}else{const a=t.cloneRange();return a.selectNodeContents(r),a.setStart(t.endContainer,t.endOffset),a.extractContents()}}}navigateNext(e=!1){const{BlockManager:t}=this.Editor,{currentBlock:r,nextBlock:a}=t;if(r===void 0)return!1;const{nextInput:s,currentInput:i}=r,l=i!==void 0?Ts(i):void 0;let c=a;const d=e||l||!r.focusable;if(s&&d)return this.setToInput(s,this.positions.START),!0;if(c===null){if(r.tool.isDefault||!d)return!1;c=t.insertAtEnd()}return d?(this.setToBlock(c,this.positions.START),!0):!1}navigatePrevious(e=!1){const{currentBlock:t,previousBlock:r}=this.Editor.BlockManager;if(!t)return!1;const{previousInput:a,currentInput:s}=t,i=s!==void 0?Bs(s):void 0,l=e||i||!t.focusable;return a&&l?(this.setToInput(a,this.positions.END),!0):r!==null&&l?(this.setToBlock(r,this.positions.END),!0):!1}createShadow(e){const t=document.createElement("span");t.classList.add(Zd.CSS.shadowCaret),e.insertAdjacentElement("beforeend",t)}restoreCaret(e){const t=e.querySelector(`.${Zd.CSS.shadowCaret}`);if(!t)return;new Se().expandToTag(t);const r=document.createRange();r.selectNode(t),r.extractContents()}insertContentAtCaretPosition(e){const t=document.createDocumentFragment(),r=document.createElement("div"),a=Se.get(),s=Se.range;r.innerHTML=e,Array.from(r.childNodes).forEach(d=>t.appendChild(d)),t.childNodes.length===0&&t.appendChild(new Text);const i=t.lastChild;s.deleteContents(),s.insertNode(t);const l=document.createRange(),c=i.nodeType===Node.TEXT_NODE?i:i.firstChild;c!==null&&c.textContent!==null&&l.setStart(c,c.textContent.length),a.removeAllRanges(),a.addRange(l)}};class uS extends ze{constructor(){super(...arguments),this.onMouseUp=()=>{this.listeners.off(document,"mouseover",this.onMouseOver),this.listeners.off(document,"mouseup",this.onMouseUp)},this.onMouseOver=e=>{const{BlockManager:t,BlockSelection:r}=this.Editor;if(e.relatedTarget===null&&e.target===null)return;const a=t.getBlockByChildNode(e.relatedTarget)||this.lastSelectedBlock,s=t.getBlockByChildNode(e.target);if(!(!a||!s)&&s!==a){if(a===this.firstSelectedBlock){Se.get().removeAllRanges(),a.selected=!0,s.selected=!0,r.clearCache();return}if(s===this.firstSelectedBlock){a.selected=!1,s.selected=!1,r.clearCache();return}this.Editor.InlineToolbar.close(),this.toggleBlocksSelectedState(a,s),this.lastSelectedBlock=s}}}async prepare(){this.listeners.on(document,"mousedown",e=>{this.enableCrossBlockSelection(e)})}watchSelection(e){if(e.button!==X_.LEFT)return;const{BlockManager:t}=this.Editor;this.firstSelectedBlock=t.getBlock(e.target),this.lastSelectedBlock=this.firstSelectedBlock,this.listeners.on(document,"mouseover",this.onMouseOver),this.listeners.on(document,"mouseup",this.onMouseUp)}get isCrossBlockSelectionStarted(){return!!this.firstSelectedBlock&&!!this.lastSelectedBlock&&this.firstSelectedBlock!==this.lastSelectedBlock}toggleBlockSelectedState(e=!0){const{BlockManager:t,BlockSelection:r}=this.Editor;this.lastSelectedBlock||(this.lastSelectedBlock=this.firstSelectedBlock=t.currentBlock),this.firstSelectedBlock===this.lastSelectedBlock&&(this.firstSelectedBlock.selected=!0,r.clearCache(),Se.get().removeAllRanges());const a=t.blocks.indexOf(this.lastSelectedBlock)+(e?1:-1),s=t.blocks[a];s&&(this.lastSelectedBlock.selected!==s.selected?(s.selected=!0,r.clearCache()):(this.lastSelectedBlock.selected=!1,r.clearCache()),this.lastSelectedBlock=s,this.Editor.InlineToolbar.close(),s.holder.scrollIntoView({block:"nearest"}))}clear(e){const{BlockManager:t,BlockSelection:r,Caret:a}=this.Editor,s=t.blocks.indexOf(this.firstSelectedBlock),i=t.blocks.indexOf(this.lastSelectedBlock);if(r.anyBlockSelected&&s>-1&&i>-1&&e&&e instanceof KeyboardEvent)switch(e.keyCode){case Me.DOWN:case Me.RIGHT:a.setToBlock(t.blocks[Math.max(s,i)],a.positions.END);break;case Me.UP:case Me.LEFT:a.setToBlock(t.blocks[Math.min(s,i)],a.positions.START);break;default:a.setToBlock(t.blocks[Math.max(s,i)],a.positions.END)}this.firstSelectedBlock=this.lastSelectedBlock=null}enableCrossBlockSelection(e){const{UI:t}=this.Editor;Se.isCollapsed||this.Editor.BlockSelection.clearSelection(e),t.nodes.redactor.contains(e.target)?this.watchSelection(e):this.Editor.BlockSelection.clearSelection(e)}toggleBlocksSelectedState(e,t){const{BlockManager:r,BlockSelection:a}=this.Editor,s=r.blocks.indexOf(e),i=r.blocks.indexOf(t),l=e.selected!==t.selected;for(let c=Math.min(s,i);c<=Math.max(s,i);c++){const d=r.blocks[c];d!==this.firstSelectedBlock&&d!==(l?e:t)&&(r.blocks[c].selected=!r.blocks[c].selected,a.clearCache())}}}class hS extends ze{constructor(){super(...arguments),this.isStartedAtEditor=!1}toggleReadOnly(e){e?this.disableModuleBindings():this.enableModuleBindings()}enableModuleBindings(){const{UI:e}=this.Editor;this.readOnlyMutableListeners.on(e.nodes.holder,"drop",async t=>{await this.processDrop(t)},!0),this.readOnlyMutableListeners.on(e.nodes.holder,"dragstart",()=>{this.processDragStart()}),this.readOnlyMutableListeners.on(e.nodes.holder,"dragover",t=>{this.processDragOver(t)},!0)}disableModuleBindings(){this.readOnlyMutableListeners.clearAll()}async processDrop(e){const{BlockManager:t,Paste:r,Caret:a}=this.Editor;e.preventDefault(),t.blocks.forEach(i=>{i.dropTarget=!1}),Se.isAtEditor&&!Se.isCollapsed&&this.isStartedAtEditor&&document.execCommand("delete"),this.isStartedAtEditor=!1;const s=t.setCurrentBlockByChildNode(e.target);if(s)this.Editor.Caret.setToBlock(s,a.positions.END);else{const i=t.setCurrentBlockByChildNode(t.lastBlock.holder);this.Editor.Caret.setToBlock(i,a.positions.END)}await r.processDataTransfer(e.dataTransfer,!0)}processDragStart(){Se.isAtEditor&&!Se.isCollapsed&&(this.isStartedAtEditor=!0),this.Editor.InlineToolbar.close()}processDragOver(e){e.preventDefault()}}const pS=180,fS=400;class mS extends ze{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.disabled=!1,this.batchingTimeout=null,this.batchingOnChangeQueue=new Map,this.batchTime=fS,this.mutationObserver=new MutationObserver(r=>{this.redactorChanged(r)}),this.eventsDispatcher.on(cf,r=>{this.particularBlockChanged(r.event)}),this.eventsDispatcher.on(df,()=>{this.disable()}),this.eventsDispatcher.on(uf,()=>{this.enable()})}enable(){this.mutationObserver.observe(this.Editor.UI.nodes.redactor,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),this.disabled=!1}disable(){this.mutationObserver.disconnect(),this.disabled=!0}particularBlockChanged(e){this.disabled||!tt(this.config.onChange)||(this.batchingOnChangeQueue.set(`block:${e.detail.target.id}:event:${e.type}`,e),this.batchingTimeout&&clearTimeout(this.batchingTimeout),this.batchingTimeout=setTimeout(()=>{let t;this.batchingOnChangeQueue.size===1?t=this.batchingOnChangeQueue.values().next().value:t=Array.from(this.batchingOnChangeQueue.values()),this.config.onChange&&this.config.onChange(this.Editor.API.methods,t),this.batchingOnChangeQueue.clear()},this.batchTime))}redactorChanged(e){this.eventsDispatcher.emit(ql,{mutations:e})}}const um=class ag extends ze{constructor(){super(...arguments),this.MIME_TYPE="application/x-editor-js",this.toolsTags={},this.tagsByTool={},this.toolsPatterns=[],this.toolsFiles={},this.exceptionList=[],this.processTool=e=>{try{const t=e.create({},{},!1);if(e.pasteConfig===!1){this.exceptionList.push(e.name);return}if(!tt(t.onPaste))return;this.getTagsConfig(e),this.getFilesConfig(e),this.getPatternsConfig(e)}catch(t){Ye(`Paste handling for «${e.name}» Tool hasn't been set up because of the error`,"warn",t)}},this.handlePasteEvent=async e=>{const{BlockManager:t,Toolbar:r}=this.Editor,a=t.setCurrentBlockByChildNode(e.target);!a||this.isNativeBehaviour(e.target)&&!e.clipboardData.types.includes("Files")||a&&this.exceptionList.includes(a.name)||(e.preventDefault(),this.processDataTransfer(e.clipboardData),r.close())}}async prepare(){this.processTools()}toggleReadOnly(e){e?this.unsetCallback():this.setCallback()}async processDataTransfer(e,t=!1){const{Tools:r}=this.Editor,a=e.types;if((a.includes?a.includes("Files"):a.contains("Files"))&&!Zt(this.toolsFiles)){await this.processFiles(e.files);return}const s=e.getData(this.MIME_TYPE),i=e.getData("text/plain");let l=e.getData("text/html");if(s)try{this.insertEditorJSData(JSON.parse(s));return}catch{}t&&i.trim()&&l.trim()&&(l="<p>"+(l.trim()?l:i)+"</p>");const c=Object.keys(this.toolsTags).reduce((h,p)=>(h[p.toLowerCase()]=this.toolsTags[p].sanitizationConfig??{},h),{}),d=Object.assign({},c,r.getAllInlineToolsSanitizeConfig(),{br:{}}),u=_n(l,d);!u.trim()||u.trim()===i||!Q.isHTMLString(u)?await this.processText(i):await this.processText(u,!0)}async processText(e,t=!1){const{Caret:r,BlockManager:a}=this.Editor,s=t?this.processHTML(e):this.processPlain(e);if(!s.length)return;if(s.length===1){s[0].isBlock?this.processSingleBlock(s.pop()):this.processInlinePaste(s.pop());return}const i=a.currentBlock&&a.currentBlock.tool.isDefault&&a.currentBlock.isEmpty;s.map(async(l,c)=>this.insertBlock(l,c===0&&i)),a.currentBlock&&r.setToBlock(a.currentBlock,r.positions.END)}setCallback(){this.listeners.on(this.Editor.UI.nodes.holder,"paste",this.handlePasteEvent)}unsetCallback(){this.listeners.off(this.Editor.UI.nodes.holder,"paste",this.handlePasteEvent)}processTools(){const e=this.Editor.Tools.blockTools;Array.from(e.values()).forEach(this.processTool)}collectTagNames(e){return Rn(e)?[e]:_t(e)?Object.keys(e):[]}getTagsConfig(e){if(e.pasteConfig===!1)return;const t=e.pasteConfig.tags||[],r=[];t.forEach(a=>{const s=this.collectTagNames(a);r.push(...s),s.forEach(i=>{if(Object.prototype.hasOwnProperty.call(this.toolsTags,i)){Ye(`Paste handler for «${e.name}» Tool on «${i}» tag is skipped because it is already used by «${this.toolsTags[i].tool.name}» Tool.`,"warn");return}const l=_t(a)?a[i]:null;this.toolsTags[i.toUpperCase()]={tool:e,sanitizationConfig:l}})}),this.tagsByTool[e.name]=r.map(a=>a.toUpperCase())}getFilesConfig(e){if(e.pasteConfig===!1)return;const{files:t={}}=e.pasteConfig;let{extensions:r,mimeTypes:a}=t;!r&&!a||(r&&!Array.isArray(r)&&(Ye(`«extensions» property of the onDrop config for «${e.name}» Tool should be an array`),r=[]),a&&!Array.isArray(a)&&(Ye(`«mimeTypes» property of the onDrop config for «${e.name}» Tool should be an array`),a=[]),a&&(a=a.filter(s=>tC(s)?!0:(Ye(`MIME type value «${s}» for the «${e.name}» Tool is not a valid MIME type`,"warn"),!1))),this.toolsFiles[e.name]={extensions:r||[],mimeTypes:a||[]})}getPatternsConfig(e){e.pasteConfig===!1||!e.pasteConfig.patterns||Zt(e.pasteConfig.patterns)||Object.entries(e.pasteConfig.patterns).forEach(([t,r])=>{r instanceof RegExp||Ye(`Pattern ${r} for «${e.name}» Tool is skipped because it should be a Regexp instance.`,"warn"),this.toolsPatterns.push({key:t,pattern:r,tool:e})})}isNativeBehaviour(e){return Q.isNativeInput(e)}async processFiles(e){const{BlockManager:t}=this.Editor;let r;r=await Promise.all(Array.from(e).map(s=>this.processFile(s))),r=r.filter(s=>!!s);const a=t.currentBlock.tool.isDefault&&t.currentBlock.isEmpty;r.forEach((s,i)=>{t.paste(s.type,s.event,i===0&&a)})}async processFile(e){const t=eC(e),r=Object.entries(this.toolsFiles).find(([s,{mimeTypes:i,extensions:l}])=>{const[c,d]=e.type.split("/"),u=l.find(p=>p.toLowerCase()===t.toLowerCase()),h=i.find(p=>{const[m,f]=p.split("/");return m===c&&(f===d||f==="*")});return!!u||!!h});if(!r)return;const[a]=r;return{event:this.composePasteEvent("file",{file:e}),type:a}}processHTML(e){const{Tools:t}=this.Editor,r=Q.make("DIV");return r.innerHTML=e,this.getNodes(r).map(a=>{let s,i=t.defaultTool,l=!1;switch(a.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:s=Q.make("div"),s.appendChild(a);break;case Node.ELEMENT_NODE:s=a,l=!0,this.toolsTags[s.tagName]&&(i=this.toolsTags[s.tagName].tool);break}const{tags:c}=i.pasteConfig||{tags:[]},d=c.reduce((p,m)=>(this.collectTagNames(m).forEach(f=>{const g=_t(m)?m[f]:null;p[f.toLowerCase()]=g||{}}),p),{}),u=Object.assign({},d,i.baseSanitizeConfig);if(s.tagName.toLowerCase()==="table"){const p=_n(s.outerHTML,u);s=Q.make("div",void 0,{innerHTML:p}).firstChild}else s.innerHTML=_n(s.innerHTML,u);const h=this.composePasteEvent("tag",{data:s});return{content:s,isBlock:l,tool:i.name,event:h}}).filter(a=>{const s=Q.isEmpty(a.content),i=Q.isSingleTag(a.content);return!s||i})}processPlain(e){const{defaultBlock:t}=this.config;if(!e)return[];const r=t;return e.split(/\r?\n/).filter(a=>a.trim()).map(a=>{const s=Q.make("div");s.textContent=a;const i=this.composePasteEvent("tag",{data:s});return{content:s,tool:r,isBlock:!1,event:i}})}async processSingleBlock(e){const{Caret:t,BlockManager:r}=this.Editor,{currentBlock:a}=r;if(!a||e.tool!==a.name||!Q.containsOnlyInlineElements(e.content.innerHTML)){this.insertBlock(e,(a==null?void 0:a.tool.isDefault)&&a.isEmpty);return}t.insertContentAtCaretPosition(e.content.innerHTML)}async processInlinePaste(e){const{BlockManager:t,Caret:r}=this.Editor,{content:a}=e;if(t.currentBlock&&t.currentBlock.tool.isDefault&&a.textContent.length<ag.PATTERN_PROCESSING_MAX_LENGTH){const s=await this.processPattern(a.textContent);if(s){const i=t.currentBlock&&t.currentBlock.tool.isDefault&&t.currentBlock.isEmpty,l=t.paste(s.tool,s.event,i);r.setToBlock(l,r.positions.END);return}}if(t.currentBlock&&t.currentBlock.currentInput){const s=t.currentBlock.tool.baseSanitizeConfig;document.execCommand("insertHTML",!1,_n(a.innerHTML,s))}else this.insertBlock(e)}async processPattern(e){const t=this.toolsPatterns.find(r=>{const a=r.pattern.exec(e);return a?e===a.shift():!1});return t?{event:this.composePasteEvent("pattern",{key:t.key,data:e}),tool:t.tool.name}:void 0}insertBlock(e,t=!1){const{BlockManager:r,Caret:a}=this.Editor,{currentBlock:s}=r;let i;if(t&&s&&s.isEmpty){i=r.paste(e.tool,e.event,!0),a.setToBlock(i,a.positions.END);return}i=r.paste(e.tool,e.event),a.setToBlock(i,a.positions.END)}insertEditorJSData(e){const{BlockManager:t,Caret:r,Tools:a}=this.Editor;Kl(e,s=>a.blockTools.get(s).sanitizeConfig).forEach(({tool:s,data:i},l)=>{let c=!1;l===0&&(c=t.currentBlock&&t.currentBlock.tool.isDefault&&t.currentBlock.isEmpty);const d=t.insert({tool:s,data:i,replace:c});r.setToBlock(d,r.positions.END)})}processElementNode(e,t,r){const a=Object.keys(this.toolsTags),s=e,{tool:i}=this.toolsTags[s.tagName]||{},l=this.tagsByTool[i==null?void 0:i.name]||[],c=a.includes(s.tagName),d=Q.blockElements.includes(s.tagName.toLowerCase()),u=Array.from(s.children).some(({tagName:p})=>a.includes(p)&&!l.includes(p)),h=Array.from(s.children).some(({tagName:p})=>Q.blockElements.includes(p.toLowerCase()));if(!d&&!c&&!u)return r.appendChild(s),[...t,r];if(c&&!u||d&&!h&&!u)return[...t,r,s]}getNodes(e){const t=Array.from(e.childNodes);let r;const a=(s,i)=>{if(Q.isEmpty(i)&&!Q.isSingleTag(i))return s;const l=s[s.length-1];let c=new DocumentFragment;switch(l&&Q.isFragment(l)&&(c=s.pop()),i.nodeType){case Node.ELEMENT_NODE:if(r=this.processElementNode(i,s,c),r)return r;break;case Node.TEXT_NODE:return c.appendChild(i),[...s,c];default:return[...s,c]}return[...s,...Array.from(i.childNodes).reduce(a,[])]};return t.reduce(a,[])}composePasteEvent(e,t){return new CustomEvent(e,{detail:t})}};um.PATTERN_PROCESSING_MAX_LENGTH=450;let gS=um;class yS extends ze{constructor(){super(...arguments),this.toolsDontSupportReadOnly=[],this.readOnlyEnabled=!1}get isEnabled(){return this.readOnlyEnabled}async prepare(){const{Tools:e}=this.Editor,{blockTools:t}=e,r=[];Array.from(t.entries()).forEach(([a,s])=>{s.isReadOnlySupported||r.push(a)}),this.toolsDontSupportReadOnly=r,this.config.readOnly&&r.length>0&&this.throwCriticalError(),this.toggle(this.config.readOnly,!0)}async toggle(e=!this.readOnlyEnabled,t=!1){e&&this.toolsDontSupportReadOnly.length>0&&this.throwCriticalError();const r=this.readOnlyEnabled;this.readOnlyEnabled=e;for(const s in this.Editor)this.Editor[s].toggleReadOnly&&this.Editor[s].toggleReadOnly(e);if(r===e)return this.readOnlyEnabled;if(t)return this.readOnlyEnabled;this.Editor.ModificationsObserver.disable();const a=await this.Editor.Saver.save();return await this.Editor.BlockManager.clear(),await this.Editor.Renderer.render(a.blocks),this.Editor.ModificationsObserver.enable(),this.readOnlyEnabled}throwCriticalError(){throw new lf(`To enable read-only mode all connected tools should support it. Tools ${this.toolsDontSupportReadOnly.join(", ")} don't support read-only mode.`)}}let bS=class ti extends ze{constructor(){super(...arguments),this.isRectSelectionActivated=!1,this.SCROLL_SPEED=3,this.HEIGHT_OF_SCROLL_ZONE=40,this.BOTTOM_SCROLL_ZONE=1,this.TOP_SCROLL_ZONE=2,this.MAIN_MOUSE_BUTTON=0,this.mousedown=!1,this.isScrolling=!1,this.inScrollZone=null,this.startX=0,this.startY=0,this.mouseX=0,this.mouseY=0,this.stackOfSelected=[],this.listenerIds=[]}static get CSS(){return{overlay:"codex-editor-overlay",overlayContainer:"codex-editor-overlay__container",rect:"codex-editor-overlay__rectangle",topScrollZone:"codex-editor-overlay__scroll-zone--top",bottomScrollZone:"codex-editor-overlay__scroll-zone--bottom"}}prepare(){this.enableModuleBindings()}startSelection(e,t){const r=document.elementFromPoint(e-window.pageXOffset,t-window.pageYOffset);r.closest(`.${this.Editor.Toolbar.CSS.toolbar}`)||(this.Editor.BlockSelection.allBlocksSelected=!1,this.clearSelection(),this.stackOfSelected=[]);const a=[`.${jn.CSS.content}`,`.${this.Editor.Toolbar.CSS.toolbar}`,`.${this.Editor.InlineToolbar.CSS.inlineToolbar}`],s=r.closest("."+this.Editor.UI.CSS.editorWrapper),i=a.some(l=>!!r.closest(l));!s||i||(this.mousedown=!0,this.startX=e,this.startY=t)}endSelection(){this.mousedown=!1,this.startX=0,this.startY=0,this.overlayRectangle.style.display="none"}isRectActivated(){return this.isRectSelectionActivated}clearSelection(){this.isRectSelectionActivated=!1}enableModuleBindings(){const{container:e}=this.genHTML();this.listeners.on(e,"mousedown",t=>{this.processMouseDown(t)},!1),this.listeners.on(document.body,"mousemove",Hl(t=>{this.processMouseMove(t)},10),{passive:!0}),this.listeners.on(document.body,"mouseleave",()=>{this.processMouseLeave()}),this.listeners.on(window,"scroll",Hl(t=>{this.processScroll(t)},10),{passive:!0}),this.listeners.on(document.body,"mouseup",()=>{this.processMouseUp()},!1)}processMouseDown(e){e.button===this.MAIN_MOUSE_BUTTON&&(e.target.closest(Q.allInputsSelector)!==null||this.startSelection(e.pageX,e.pageY))}processMouseMove(e){this.changingRectangle(e),this.scrollByZones(e.clientY)}processMouseLeave(){this.clearSelection(),this.endSelection()}processScroll(e){this.changingRectangle(e)}processMouseUp(){this.clearSelection(),this.endSelection()}scrollByZones(e){if(this.inScrollZone=null,e<=this.HEIGHT_OF_SCROLL_ZONE&&(this.inScrollZone=this.TOP_SCROLL_ZONE),document.documentElement.clientHeight-e<=this.HEIGHT_OF_SCROLL_ZONE&&(this.inScrollZone=this.BOTTOM_SCROLL_ZONE),!this.inScrollZone){this.isScrolling=!1;return}this.isScrolling||(this.scrollVertical(this.inScrollZone===this.TOP_SCROLL_ZONE?-this.SCROLL_SPEED:this.SCROLL_SPEED),this.isScrolling=!0)}genHTML(){const{UI:e}=this.Editor,t=e.nodes.holder.querySelector("."+e.CSS.editorWrapper),r=Q.make("div",ti.CSS.overlay,{}),a=Q.make("div",ti.CSS.overlayContainer,{}),s=Q.make("div",ti.CSS.rect,{});return a.appendChild(s),r.appendChild(a),t.appendChild(r),this.overlayRectangle=s,{container:t,overlay:r}}scrollVertical(e){if(!(this.inScrollZone&&this.mousedown))return;const t=window.pageYOffset;window.scrollBy(0,e),this.mouseY+=window.pageYOffset-t,setTimeout(()=>{this.scrollVertical(e)},0)}changingRectangle(e){if(!this.mousedown)return;e.pageY!==void 0&&(this.mouseX=e.pageX,this.mouseY=e.pageY);const{rightPos:t,leftPos:r,index:a}=this.genInfoForMouseSelection(),s=this.startX>t&&this.mouseX>t,i=this.startX<r&&this.mouseX<r;this.rectCrossesBlocks=!(s||i),this.isRectSelectionActivated||(this.rectCrossesBlocks=!1,this.isRectSelectionActivated=!0,this.shrinkRectangleToPoint(),this.overlayRectangle.style.display="block"),this.updateRectangleSize(),this.Editor.Toolbar.close(),a!==void 0&&(this.trySelectNextBlock(a),this.inverseSelection(),Se.get().removeAllRanges())}shrinkRectangleToPoint(){this.overlayRectangle.style.left=`${this.startX-window.pageXOffset}px`,this.overlayRectangle.style.top=`${this.startY-window.pageYOffset}px`,this.overlayRectangle.style.bottom=`calc(100% - ${this.startY-window.pageYOffset}px`,this.overlayRectangle.style.right=`calc(100% - ${this.startX-window.pageXOffset}px`}inverseSelection(){const e=this.Editor.BlockManager.getBlockByIndex(this.stackOfSelected[0]).selected;if(this.rectCrossesBlocks&&!e)for(const t of this.stackOfSelected)this.Editor.BlockSelection.selectBlockByIndex(t);if(!this.rectCrossesBlocks&&e)for(const t of this.stackOfSelected)this.Editor.BlockSelection.unSelectBlockByIndex(t)}updateRectangleSize(){this.mouseY>=this.startY?(this.overlayRectangle.style.top=`${this.startY-window.pageYOffset}px`,this.overlayRectangle.style.bottom=`calc(100% - ${this.mouseY-window.pageYOffset}px`):(this.overlayRectangle.style.bottom=`calc(100% - ${this.startY-window.pageYOffset}px`,this.overlayRectangle.style.top=`${this.mouseY-window.pageYOffset}px`),this.mouseX>=this.startX?(this.overlayRectangle.style.left=`${this.startX-window.pageXOffset}px`,this.overlayRectangle.style.right=`calc(100% - ${this.mouseX-window.pageXOffset}px`):(this.overlayRectangle.style.right=`calc(100% - ${this.startX-window.pageXOffset}px`,this.overlayRectangle.style.left=`${this.mouseX-window.pageXOffset}px`)}genInfoForMouseSelection(){const e=document.body.offsetWidth/2,t=this.mouseY-window.pageYOffset,r=document.elementFromPoint(e,t),a=this.Editor.BlockManager.getBlockByChildNode(r);let s;a!==void 0&&(s=this.Editor.BlockManager.blocks.findIndex(u=>u.holder===a.holder));const i=this.Editor.BlockManager.lastBlock.holder.querySelector("."+jn.CSS.content),l=Number.parseInt(window.getComputedStyle(i).width,10)/2,c=e-l,d=e+l;return{index:s,leftPos:c,rightPos:d}}addBlockInSelection(e){this.rectCrossesBlocks&&this.Editor.BlockSelection.selectBlockByIndex(e),this.stackOfSelected.push(e)}trySelectNextBlock(e){const t=this.stackOfSelected[this.stackOfSelected.length-1]===e,r=this.stackOfSelected.length,a=1,s=-1,i=0;if(t)return;const l=this.stackOfSelected[r-1]-this.stackOfSelected[r-2]>0;let c=i;r>1&&(c=l?a:s);const d=e>this.stackOfSelected[r-1]&&c===a,u=e<this.stackOfSelected[r-1]&&c===s,h=!(d||u||c===i);if(!h&&(e>this.stackOfSelected[r-1]||this.stackOfSelected[r-1]===void 0)){let f=this.stackOfSelected[r-1]+1||e;for(f;f<=e;f++)this.addBlockInSelection(f);return}if(!h&&e<this.stackOfSelected[r-1]){for(let f=this.stackOfSelected[r-1]-1;f>=e;f--)this.addBlockInSelection(f);return}if(!h)return;let p=r-1,m;for(e>this.stackOfSelected[r-1]?m=()=>e>this.stackOfSelected[p]:m=()=>e<this.stackOfSelected[p];m();)this.rectCrossesBlocks&&this.Editor.BlockSelection.unSelectBlockByIndex(this.stackOfSelected[p]),this.stackOfSelected.pop(),p--}};class kS extends ze{async render(e){return new Promise(t=>{const{Tools:r,BlockManager:a}=this.Editor;if(e.length===0)a.insert();else{const s=e.map(({type:i,data:l,tunes:c,id:d})=>{r.available.has(i)===!1&&(Qt(`Tool «${i}» is not found. Check 'tools' property at the Editor.js config.`,"warn"),l=this.composeStubDataForTool(i,l,d),i=r.stubTool);let u;try{u=a.composeBlock({id:d,tool:i,data:l,tunes:c})}catch(h){Ye(`Block «${i}» skipped because of plugins error`,"error",{data:l,error:h}),l=this.composeStubDataForTool(i,l,d),i=r.stubTool,u=a.composeBlock({id:d,tool:i,data:l,tunes:c})}return u});a.insertMany(s)}window.requestIdleCallback(()=>{t()},{timeout:2e3})})}composeStubDataForTool(e,t,r){const{Tools:a}=this.Editor;let s=e;if(a.unavailable.has(e)){const i=a.unavailable.get(e).toolbox;i!==void 0&&i[0].title!==void 0&&(s=i[0].title)}return{savedData:{id:r,type:e,data:t},title:s}}}class vS extends ze{async save(){const{BlockManager:e,Tools:t}=this.Editor,r=e.blocks,a=[];try{r.forEach(l=>{a.push(this.getSavedData(l))});const s=await Promise.all(a),i=await Kl(s,l=>t.blockTools.get(l).sanitizeConfig);return this.makeOutput(i)}catch(s){Qt("Saving failed due to the Error %o","error",s)}}async getSavedData(e){const t=await e.save(),r=t&&await e.validate(t.data);return{...t,isValid:r}}makeOutput(e){const t=[];return e.forEach(({id:r,tool:a,data:s,tunes:i,isValid:l})=>{if(!l){Ye(`Block «${a}» skipped because saved data is invalid`);return}if(a===this.Editor.Tools.stubTool){t.push(s);return}const c={id:r,type:a,data:s,...!Zt(i)&&{tunes:i}};t.push(c)}),{time:+new Date,blocks:t,version:"2.31.0"}}}(function(){try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode(".ce-paragraph{line-height:1.6em;outline:none}.ce-block:only-of-type .ce-paragraph[data-placeholder-active]:empty:before,.ce-block:only-of-type .ce-paragraph[data-placeholder-active][data-empty=true]:before{content:attr(data-placeholder-active)}.ce-paragraph p:first-of-type{margin-top:0}.ce-paragraph p:last-of-type{margin-bottom:0}")),document.head.appendChild(n)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();const wS='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M8 9V7.2C8 7.08954 8.08954 7 8.2 7L12 7M16 9V7.2C16 7.08954 15.9105 7 15.8 7L12 7M12 7L12 17M12 17H10M12 17H14"/></svg>';function _S(n){const e=document.createElement("div");e.innerHTML=n.trim();const t=document.createDocumentFragment();return t.append(...Array.from(e.childNodes)),t}/**
|
|
56
56
|
* Base Paragraph Block for the Editor.js.
|
|
57
57
|
* Represents a regular text block
|
|
58
58
|
*
|
|
59
59
|
* @author CodeX (team@codex.so)
|
|
60
60
|
* @copyright CodeX 2018
|
|
61
61
|
* @license The MIT License (MIT)
|
|
62
|
-
*/class Xc{static get DEFAULT_PLACEHOLDER(){return""}constructor({data:e,config:t,api:r,readOnly:a}){this.api=r,this.readOnly=a,this._CSS={block:this.api.styles.block,wrapper:"ce-paragraph"},this.readOnly||(this.onKeyUp=this.onKeyUp.bind(this)),this._placeholder=t.placeholder?t.placeholder:Xc.DEFAULT_PLACEHOLDER,this._data=e??{},this._element=null,this._preserveBlank=t.preserveBlank??!1}onKeyUp(e){if(e.code!=="Backspace"&&e.code!=="Delete"||!this._element)return;const{textContent:t}=this._element;t===""&&(this._element.innerHTML="")}drawView(){const e=document.createElement("DIV");return e.classList.add(this._CSS.wrapper,this._CSS.block),e.contentEditable="false",e.dataset.placeholderActive=this.api.i18n.t(this._placeholder),this._data.text&&(e.innerHTML=this._data.text),this.readOnly||(e.contentEditable="true",e.addEventListener("keyup",this.onKeyUp)),e}render(){return this._element=this.drawView(),this._element}merge(e){if(!this._element)return;this._data.text+=e.text;const t=_S(e.text);this._element.appendChild(t),this._element.normalize()}validate(e){return!(e.text.trim()===""&&!this._preserveBlank)}save(e){return{text:e.innerHTML}}onPaste(e){const t={text:e.detail.data.innerHTML};this._data=t,window.requestAnimationFrame(()=>{this._element&&(this._element.innerHTML=this._data.text||"")})}static get conversionConfig(){return{export:"text",import:"text"}}static get sanitize(){return{text:{br:!0}}}static get isReadOnlySupported(){return!0}static get pasteConfig(){return{tags:["P"]}}static get toolbox(){return{icon:wS,title:"Text"}}}class Qc{constructor(){this.commandName="bold"}static get sanitize(){return{b:{}}}render(){return{icon:GC,name:"bold",onActivate:()=>{document.execCommand(this.commandName)},isActive:()=>document.queryCommandState(this.commandName)}}get shortcut(){return"CMD+B"}}Qc.isInline=!0,Qc.title="Bold";class Zc{constructor(){this.commandName="italic",this.CSS={button:"ce-inline-tool",buttonActive:"ce-inline-tool--active",buttonModifier:"ce-inline-tool--italic"},this.nodes={button:null}}static get sanitize(){return{i:{}}}render(){return this.nodes.button=document.createElement("button"),this.nodes.button.type="button",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.innerHTML=t2,this.nodes.button}surround(){document.execCommand(this.commandName)}checkState(){const e=document.queryCommandState(this.commandName);return this.nodes.button.classList.toggle(this.CSS.buttonActive,e),e}get shortcut(){return"CMD+I"}}Zc.isInline=!0,Zc.title="Italic";class Jc{constructor({api:e}){this.commandLink="createLink",this.commandUnlink="unlink",this.ENTER_KEY=13,this.CSS={button:"ce-inline-tool",buttonActive:"ce-inline-tool--active",buttonModifier:"ce-inline-tool--link",buttonUnlink:"ce-inline-tool--unlink",input:"ce-inline-tool-input",inputShowed:"ce-inline-tool-input--showed"},this.nodes={button:null,input:null},this.inputOpened=!1,this.toolbar=e.toolbar,this.inlineToolbar=e.inlineToolbar,this.notifier=e.notifier,this.i18n=e.i18n,this.selection=new Se}static get sanitize(){return{a:{href:!0,target:"_blank",rel:"nofollow"}}}render(){return this.nodes.button=document.createElement("button"),this.nodes.button.type="button",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.innerHTML=wf,this.nodes.button}renderActions(){return this.nodes.input=document.createElement("input"),this.nodes.input.placeholder=this.i18n.t("Add a link"),this.nodes.input.enterKeyHint="done",this.nodes.input.classList.add(this.CSS.input),this.nodes.input.addEventListener("keydown",e=>{e.keyCode===this.ENTER_KEY&&this.enterPressed(e)}),this.nodes.input}surround(e){if(e){this.inputOpened?(this.selection.restore(),this.selection.removeFakeBackground()):(this.selection.setFakeBackground(),this.selection.save());const t=this.selection.findParentTag("A");if(t){this.selection.expandToTag(t),this.unlink(),this.closeActions(),this.checkState(),this.toolbar.close();return}}this.toggleActions()}checkState(){const e=this.selection.findParentTag("A");if(e){this.nodes.button.innerHTML=a2,this.nodes.button.classList.add(this.CSS.buttonUnlink),this.nodes.button.classList.add(this.CSS.buttonActive),this.openActions();const t=e.getAttribute("href");this.nodes.input.value=t!=="null"?t:"",this.selection.save()}else this.nodes.button.innerHTML=wf,this.nodes.button.classList.remove(this.CSS.buttonUnlink),this.nodes.button.classList.remove(this.CSS.buttonActive);return!!e}clear(){this.closeActions()}get shortcut(){return"CMD+K"}toggleActions(){this.inputOpened?this.closeActions(!1):this.openActions(!0)}openActions(e=!1){this.nodes.input.classList.add(this.CSS.inputShowed),e&&this.nodes.input.focus(),this.inputOpened=!0}closeActions(e=!0){if(this.selection.isFakeBackgroundEnabled){const t=new Se;t.save(),this.selection.restore(),this.selection.removeFakeBackground(),t.restore()}this.nodes.input.classList.remove(this.CSS.inputShowed),this.nodes.input.value="",e&&this.selection.clearSaved(),this.inputOpened=!1}enterPressed(e){let t=this.nodes.input.value||"";if(!t.trim()){this.selection.restore(),this.unlink(),e.preventDefault(),this.closeActions();return}if(!this.validateURL(t)){this.notifier.show({message:"Pasted link is not valid.",style:"error"}),Ye("Incorrect Link pasted","warn",t);return}t=this.prepareLink(t),this.selection.restore(),this.selection.removeFakeBackground(),this.insertLink(t),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),this.selection.collapseToEnd(),this.inlineToolbar.close()}validateURL(e){return!/\s/.test(e)}prepareLink(e){return e=e.trim(),e=this.addProtocol(e),e}addProtocol(e){if(/^(\w+):(\/\/)?/.test(e))return e;const t=/^\/[^/\s]/.test(e),r=e.substring(0,1)==="#",a=/^\/\/[^/\s]/.test(e);return!t&&!r&&!a&&(e="http://"+e),e}insertLink(e){const t=this.selection.findParentTag("A");t&&this.selection.expandToTag(t),document.execCommand(this.commandLink,!1,e)}unlink(){document.execCommand(this.commandUnlink)}}Jc.isInline=!0,Jc.title="Link";let hm=class{constructor({api:e}){this.i18nAPI=e.i18n,this.blocksAPI=e.blocks,this.selectionAPI=e.selection,this.toolsAPI=e.tools,this.caretAPI=e.caret}async render(){const e=Se.get(),t=this.blocksAPI.getBlockByElement(e.anchorNode);if(t===void 0)return[];const r=this.toolsAPI.getBlockTools(),a=await pf(t,r);if(a.length===0)return[];const s=a.reduce((d,u)=>{var h;return(h=u.toolbox)==null||h.forEach(p=>{d.push({icon:p.icon,title:At.t(Wt.toolNames,p.title),name:u.name,closeOnActivate:!0,onActivate:async()=>{const m=await this.blocksAPI.convert(t.id,u.name,p.data);this.caretAPI.setToBlock(m,"end")}})}),d},[]),i=await t.getActiveToolboxEntry(),l=i!==void 0?i.icon:_f,c=!fr();return{icon:l,name:"convert-to",hint:{title:this.i18nAPI.t("Convert to")},children:{searchable:c,items:s,onOpen:()=>{c&&(this.selectionAPI.setFakeBackground(),this.selectionAPI.save())},onClose:()=>{c&&(this.selectionAPI.restore(),this.selectionAPI.removeFakeBackground())}}}}};hm.isInline=!0;let pm=class{constructor({data:e,api:t}){this.CSS={wrapper:"ce-stub",info:"ce-stub__info",title:"ce-stub__title",subtitle:"ce-stub__subtitle"},this.api=t,this.title=e.title||this.api.i18n.t("Error"),this.subtitle=this.api.i18n.t("The block can not be displayed correctly."),this.savedData=e.savedData,this.wrapper=this.make()}render(){return this.wrapper}save(){return this.savedData}make(){const e=Q.make("div",this.CSS.wrapper),t=s2,r=Q.make("div",this.CSS.info),a=Q.make("div",this.CSS.title,{textContent:this.title}),s=Q.make("div",this.CSS.subtitle,{textContent:this.subtitle});return e.innerHTML=t,r.appendChild(a),r.appendChild(s),e.appendChild(r),e}};pm.isReadOnlySupported=!0;class CS extends ic{constructor(){super(...arguments),this.type=No.Inline}get title(){return this.constructable[xs.Title]}create(){return new this.constructable({api:this.api,config:this.settings})}get isReadOnlySupported(){return this.constructable[xs.IsReadOnlySupported]??!1}}class ES extends ic{constructor(){super(...arguments),this.type=No.Tune}create(e,t){return new this.constructable({api:this.api,config:this.settings,block:t,data:e})}}let En=class wr extends Map{get blockTools(){const e=Array.from(this.entries()).filter(([,t])=>t.isBlock());return new wr(e)}get inlineTools(){const e=Array.from(this.entries()).filter(([,t])=>t.isInline());return new wr(e)}get blockTunes(){const e=Array.from(this.entries()).filter(([,t])=>t.isTune());return new wr(e)}get internalTools(){const e=Array.from(this.entries()).filter(([,t])=>t.isInternal);return new wr(e)}get externalTools(){const e=Array.from(this.entries()).filter(([,t])=>!t.isInternal);return new wr(e)}};var SS=Object.defineProperty,xS=Object.getOwnPropertyDescriptor,fm=(n,e,t,r)=>{for(var a=xS(e,t),s=n.length-1,i;s>=0;s--)(i=n[s])&&(a=i(e,t,a)||a);return a&&SS(e,t,a),a};class ed extends ic{constructor(){super(...arguments),this.type=No.Block,this.inlineTools=new En,this.tunes=new En}create(e,t,r){return new this.constructable({data:e,block:t,readOnly:r,api:this.api,config:this.settings})}get isReadOnlySupported(){return this.constructable[yr.IsReadOnlySupported]===!0}get isLineBreaksEnabled(){return this.constructable[yr.IsEnabledLineBreaks]}get toolbox(){const e=this.constructable[yr.Toolbox],t=this.config[Ss.Toolbox];if(!Zt(e)&&t!==!1)return t?Array.isArray(e)?Array.isArray(t)?t.map((r,a)=>{const s=e[a];return s?{...s,...r}:r}):[t]:Array.isArray(t)?t:[{...e,...t}]:Array.isArray(e)?e:[e]}get conversionConfig(){return this.constructable[yr.ConversionConfig]}get enabledInlineTools(){return this.config[Ss.EnabledInlineTools]||!1}get enabledBlockTunes(){return this.config[Ss.EnabledBlockTunes]}get pasteConfig(){return this.constructable[yr.PasteConfig]??{}}get sanitizeConfig(){const e=super.sanitizeConfig,t=this.baseSanitizeConfig;if(Zt(e))return t;const r={};for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){const s=e[a];_t(s)?r[a]=Object.assign({},t,s):r[a]=s}return r}get baseSanitizeConfig(){const e={};return Array.from(this.inlineTools.values()).forEach(t=>Object.assign(e,t.sanitizeConfig)),Array.from(this.tunes.values()).forEach(t=>Object.assign(e,t.sanitizeConfig)),e}}fm([pr],ed.prototype,"sanitizeConfig"),fm([pr],ed.prototype,"baseSanitizeConfig");class BS{constructor(e,t,r){this.api=r,this.config=e,this.editorConfig=t}get(e){const{class:t,isInternal:r=!1,...a}=this.config[e],s=this.getConstructor(t),i=t[sc.IsTune];return new s({name:e,constructable:t,config:a,api:this.api.getMethodsForTool(e,i),isDefault:e===this.editorConfig.defaultBlock,defaultPlaceholder:this.editorConfig.placeholder,isInternal:r})}getConstructor(e){switch(!0){case e[xs.IsInline]:return CS;case e[sc.IsTune]:return ES;default:return ed}}}let mm=class{constructor({api:e}){this.CSS={animation:"wobble"},this.api=e}render(){return{icon:KC,title:this.api.i18n.t("Move down"),onActivate:()=>this.handleClick(),name:"move-down"}}handleClick(){const e=this.api.blocks.getCurrentBlockIndex(),t=this.api.blocks.getBlockByIndex(e+1);if(!t)throw new Error("Unable to move Block down since it is already the last");const r=t.holder,a=r.getBoundingClientRect();let s=Math.abs(window.innerHeight-r.offsetHeight);a.top<window.innerHeight&&(s=window.scrollY+r.offsetHeight),window.scrollTo(0,s),this.api.blocks.move(e+1),this.api.toolbar.toggleBlockSettings(!0)}};mm.isTune=!0;let gm=class{constructor({api:e}){this.api=e}render(){return{icon:JC,title:this.api.i18n.t("Delete"),name:"delete",confirmation:{title:this.api.i18n.t("Click to delete"),onActivate:()=>this.handleClick()}}}handleClick(){this.api.blocks.delete()}};gm.isTune=!0;let ym=class{constructor({api:e}){this.CSS={animation:"wobble"},this.api=e}render(){return{icon:ZC,title:this.api.i18n.t("Move up"),onActivate:()=>this.handleClick(),name:"move-up"}}handleClick(){const e=this.api.blocks.getCurrentBlockIndex(),t=this.api.blocks.getBlockByIndex(e),r=this.api.blocks.getBlockByIndex(e-1);if(e===0||!t||!r)throw new Error("Unable to move Block up since it is already the first");const a=t.holder,s=r.holder,i=a.getBoundingClientRect(),l=s.getBoundingClientRect();let c;l.top>0?c=Math.abs(i.top)-Math.abs(l.top):c=Math.abs(i.top)+l.height,window.scrollBy(0,-1*c),this.api.blocks.move(e-1),this.api.toolbar.toggleBlockSettings(!0)}};ym.isTune=!0;var TS=Object.defineProperty,$S=Object.getOwnPropertyDescriptor,MS=(n,e,t,r)=>{for(var a=$S(e,t),s=n.length-1,i;s>=0;s--)(i=n[s])&&(a=i(e,t,a)||a);return a&&TS(e,t,a),a};let bm=class extends ze{constructor(){super(...arguments),this.stubTool="stub",this.toolsAvailable=new En,this.toolsUnavailable=new En}get available(){return this.toolsAvailable}get unavailable(){return this.toolsUnavailable}get inlineTools(){return this.available.inlineTools}get blockTools(){return this.available.blockTools}get blockTunes(){return this.available.blockTunes}get defaultTool(){return this.blockTools.get(this.config.defaultBlock)}get internal(){return this.available.internalTools}async prepare(){if(this.validateTools(),this.config.tools=Hl({},this.internalTools,this.config.tools),!Object.prototype.hasOwnProperty.call(this.config,"tools")||Object.keys(this.config.tools).length===0)throw Error("Can't start without tools");const e=this.prepareConfig();this.factory=new BS(e,this.config,this.Editor.API);const t=this.getListOfPrepareFunctions(e);if(t.length===0)return Promise.resolve();await J_(t,r=>{this.toolPrepareMethodSuccess(r)},r=>{this.toolPrepareMethodFallback(r)}),this.prepareBlockTools()}getAllInlineToolsSanitizeConfig(){const e={};return Array.from(this.inlineTools.values()).forEach(t=>{Object.assign(e,t.sanitizeConfig)}),e}destroy(){Object.values(this.available).forEach(async e=>{tt(e.reset)&&await e.reset()})}get internalTools(){return{convertTo:{class:hm,isInternal:!0},link:{class:Jc,isInternal:!0},bold:{class:Qc,isInternal:!0},italic:{class:Zc,isInternal:!0},paragraph:{class:Xc,inlineToolbar:!0,isInternal:!0},stub:{class:pm,isInternal:!0},moveUp:{class:ym,isInternal:!0},delete:{class:gm,isInternal:!0},moveDown:{class:mm,isInternal:!0}}}toolPrepareMethodSuccess(e){const t=this.factory.get(e.toolName);if(t.isInline()){const r=["render"].filter(a=>!t.create()[a]);if(r.length){Ye(`Incorrect Inline Tool: ${t.name}. Some of required methods is not implemented %o`,"warn",r),this.toolsUnavailable.set(t.name,t);return}}this.toolsAvailable.set(t.name,t)}toolPrepareMethodFallback(e){this.toolsUnavailable.set(e.toolName,this.factory.get(e.toolName))}getListOfPrepareFunctions(e){const t=[];return Object.entries(e).forEach(([r,a])=>{t.push({function:tt(a.class.prepare)?a.class.prepare:()=>{},data:{toolName:r,config:a.config}})}),t}prepareBlockTools(){Array.from(this.blockTools.values()).forEach(e=>{this.assignInlineToolsToBlockTool(e),this.assignBlockTunesToBlockTool(e)})}assignInlineToolsToBlockTool(e){if(this.config.inlineToolbar!==!1){if(e.enabledInlineTools===!0){e.inlineTools=new En(Array.isArray(this.config.inlineToolbar)?this.config.inlineToolbar.map(t=>[t,this.inlineTools.get(t)]):Array.from(this.inlineTools.entries()));return}Array.isArray(e.enabledInlineTools)&&(e.inlineTools=new En(["convertTo",...e.enabledInlineTools].map(t=>[t,this.inlineTools.get(t)])))}}assignBlockTunesToBlockTool(e){if(e.enabledBlockTunes!==!1){if(Array.isArray(e.enabledBlockTunes)){const t=new En(e.enabledBlockTunes.map(r=>[r,this.blockTunes.get(r)]));e.tunes=new En([...t,...this.blockTunes.internalTools]);return}if(Array.isArray(this.config.tunes)){const t=new En(this.config.tunes.map(r=>[r,this.blockTunes.get(r)]));e.tunes=new En([...t,...this.blockTunes.internalTools]);return}e.tunes=this.blockTunes.internalTools}}validateTools(){for(const e in this.config.tools)if(Object.prototype.hasOwnProperty.call(this.config.tools,e)){if(e in this.internalTools)return;const t=this.config.tools[e];if(!tt(t)&&!tt(t.class))throw Error(`Tool «${e}» must be a constructor function or an object with function in the «class» property`)}}prepareConfig(){const e={};for(const t in this.config.tools)_t(this.config.tools[t])?e[t]=this.config.tools[t]:e[t]={class:this.config.tools[t]};return e}};MS([pr],bm.prototype,"getAllInlineToolsSanitizeConfig");const DS=`:root{--selectionColor: #e1f2ff;--inlineSelectionColor: #d4ecff;--bg-light: #eff2f5;--grayText: #707684;--color-dark: #1D202B;--color-active-icon: #388AE5;--color-gray-border: rgba(201, 201, 204, .48);--content-width: 650px;--narrow-mode-right-padding: 50px;--toolbox-buttons-size: 26px;--toolbox-buttons-size--mobile: 36px;--icon-size: 20px;--icon-size--mobile: 28px;--block-padding-vertical: .4em;--color-line-gray: #EFF0F1 }.codex-editor{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:1}.codex-editor .hide{display:none}.codex-editor__redactor [contenteditable]:empty:after{content:"\\feff"}@media (min-width: 651px){.codex-editor--narrow .codex-editor__redactor{margin-right:50px}}@media (min-width: 651px){.codex-editor--narrow.codex-editor--rtl .codex-editor__redactor{margin-left:50px;margin-right:0}}@media (min-width: 651px){.codex-editor--narrow .ce-toolbar__actions{right:-5px}}.codex-editor-copyable{position:absolute;height:1px;width:1px;top:-400%;opacity:.001}.codex-editor-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:999;pointer-events:none;overflow:hidden}.codex-editor-overlay__container{position:relative;pointer-events:auto;z-index:0}.codex-editor-overlay__rectangle{position:absolute;pointer-events:none;background-color:#2eaadc33;border:1px solid transparent}.codex-editor svg{max-height:100%}.codex-editor path{stroke:currentColor}.codex-editor ::-moz-selection{background-color:#d4ecff}.codex-editor ::selection{background-color:#d4ecff}.codex-editor--toolbox-opened [contentEditable=true][data-placeholder]:focus:before{opacity:0!important}.ce-scroll-locked{overflow:hidden}.ce-scroll-locked--hard{overflow:hidden;top:calc(-1 * var(--window-scroll-offset));position:fixed;width:100%}.ce-toolbar{position:absolute;left:0;right:0;top:0;-webkit-transition:opacity .1s ease;transition:opacity .1s ease;will-change:opacity,top;display:none}.ce-toolbar--opened{display:block}.ce-toolbar__content{max-width:650px;margin:0 auto;position:relative}.ce-toolbar__plus{color:#1d202b;cursor:pointer;width:26px;height:26px;border-radius:7px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-flex-negative:0;flex-shrink:0}@media (max-width: 650px){.ce-toolbar__plus{width:36px;height:36px}}@media (hover: hover){.ce-toolbar__plus:hover{background-color:#eff2f5}}.ce-toolbar__plus--active{background-color:#eff2f5;-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-toolbar__plus-shortcut{opacity:.6;word-spacing:-2px;margin-top:5px}@media (max-width: 650px){.ce-toolbar__plus{position:absolute;background-color:#fff;border:1px solid #E8E8EB;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;z-index:2;position:static}.ce-toolbar__plus--left-oriented:before{left:15px;margin-left:0}.ce-toolbar__plus--right-oriented:before{left:auto;right:15px;margin-left:0}}.ce-toolbar__actions{position:absolute;right:100%;opacity:0;display:-webkit-box;display:-ms-flexbox;display:flex;padding-right:5px}.ce-toolbar__actions--opened{opacity:1}@media (max-width: 650px){.ce-toolbar__actions{right:auto}}.ce-toolbar__settings-btn{color:#1d202b;width:26px;height:26px;border-radius:7px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;margin-left:3px;cursor:pointer;user-select:none}@media (max-width: 650px){.ce-toolbar__settings-btn{width:36px;height:36px}}@media (hover: hover){.ce-toolbar__settings-btn:hover{background-color:#eff2f5}}.ce-toolbar__settings-btn--active{background-color:#eff2f5;-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@media (min-width: 651px){.ce-toolbar__settings-btn{width:24px}}.ce-toolbar__settings-btn--hidden{display:none}@media (max-width: 650px){.ce-toolbar__settings-btn{position:absolute;background-color:#fff;border:1px solid #E8E8EB;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;z-index:2;position:static}.ce-toolbar__settings-btn--left-oriented:before{left:15px;margin-left:0}.ce-toolbar__settings-btn--right-oriented:before{left:auto;right:15px;margin-left:0}}.ce-toolbar__plus svg,.ce-toolbar__settings-btn svg{width:24px;height:24px}@media (min-width: 651px){.codex-editor--narrow .ce-toolbar__plus{left:5px}}@media (min-width: 651px){.codex-editor--narrow .ce-toolbox .ce-popover{right:0;left:auto;left:initial}}.ce-inline-toolbar{--y-offset: 8px;--color-background-icon-active: rgba(56, 138, 229, .1);--color-text-icon-active: #388AE5;--color-text-primary: black;position:absolute;visibility:hidden;-webkit-transition:opacity .25s ease;transition:opacity .25s ease;will-change:opacity,left,top;top:0;left:0;z-index:3;opacity:1;visibility:visible}.ce-inline-toolbar [hidden]{display:none!important}.ce-inline-toolbar__toggler-and-button-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;padding:0 6px}.ce-inline-toolbar__buttons{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-inline-toolbar__dropdown{display:-webkit-box;display:-ms-flexbox;display:flex;padding:6px;margin:0 6px 0 -6px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;border-right:1px solid rgba(201,201,204,.48);-webkit-box-sizing:border-box;box-sizing:border-box}@media (hover: hover){.ce-inline-toolbar__dropdown:hover{background:#eff2f5}}.ce-inline-toolbar__dropdown--hidden{display:none}.ce-inline-toolbar__dropdown-content,.ce-inline-toolbar__dropdown-arrow{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-inline-toolbar__dropdown-content svg,.ce-inline-toolbar__dropdown-arrow svg{width:20px;height:20px}.ce-inline-toolbar__shortcut{opacity:.6;word-spacing:-3px;margin-top:3px}.ce-inline-tool{color:var(--color-text-primary);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:0;border-radius:4px;line-height:normal;height:100%;padding:0;width:28px;background-color:transparent;cursor:pointer}@media (max-width: 650px){.ce-inline-tool{width:36px;height:36px}}@media (hover: hover){.ce-inline-tool:hover{background-color:#f8f8f8}}.ce-inline-tool svg{display:block;width:20px;height:20px}@media (max-width: 650px){.ce-inline-tool svg{width:28px;height:28px}}.ce-inline-tool--link .icon--unlink,.ce-inline-tool--unlink .icon--link{display:none}.ce-inline-tool--unlink .icon--unlink{display:inline-block;margin-bottom:-1px}.ce-inline-tool-input{background:#F8F8F8;border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:4px 8px;font-size:14px;line-height:22px;outline:none;margin:0;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;display:none;font-weight:500;-webkit-appearance:none;font-family:inherit}@media (max-width: 650px){.ce-inline-tool-input{font-size:15px;font-weight:500}}.ce-inline-tool-input::-webkit-input-placeholder{color:#707684}.ce-inline-tool-input::-moz-placeholder{color:#707684}.ce-inline-tool-input:-ms-input-placeholder{color:#707684}.ce-inline-tool-input::-ms-input-placeholder{color:#707684}.ce-inline-tool-input::placeholder{color:#707684}.ce-inline-tool-input--showed{display:block}.ce-inline-tool--active{background:var(--color-background-icon-active);color:var(--color-text-icon-active)}@-webkit-keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.ce-block{-webkit-animation:fade-in .3s ease;animation:fade-in .3s ease;-webkit-animation-fill-mode:none;animation-fill-mode:none;-webkit-animation-fill-mode:initial;animation-fill-mode:initial}.ce-block:first-of-type{margin-top:0}.ce-block--selected .ce-block__content{background:#e1f2ff}.ce-block--selected .ce-block__content [contenteditable]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ce-block--selected .ce-block__content img,.ce-block--selected .ce-block__content .ce-stub{opacity:.55}.ce-block--stretched .ce-block__content{max-width:none}.ce-block__content{position:relative;max-width:650px;margin:0 auto;-webkit-transition:background-color .15s ease;transition:background-color .15s ease}.ce-block--drop-target .ce-block__content:before{content:"";position:absolute;top:100%;left:-20px;margin-top:-1px;height:8px;width:8px;border:solid #388AE5;border-width:1px 1px 0 0;-webkit-transform-origin:right;transform-origin:right;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ce-block--drop-target .ce-block__content:after{content:"";position:absolute;top:100%;height:1px;width:100%;color:#388ae5;background:repeating-linear-gradient(90deg,#388AE5,#388AE5 1px,#fff 1px,#fff 6px)}.ce-block a{cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline}.ce-block b{font-weight:700}.ce-block i{font-style:italic}@-webkit-keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}20%{-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}20%{-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@-webkit-keyframes selectionBounce{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}50%{-webkit-transform:scale3d(1.01,1.01,1.01);transform:scale3d(1.01,1.01,1.01)}70%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes selectionBounce{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}50%{-webkit-transform:scale3d(1.01,1.01,1.01);transform:scale3d(1.01,1.01,1.01)}70%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@-webkit-keyframes buttonClicked{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.95,.95,.95);transform:scale3d(.95,.95,.95)}60%{-webkit-transform:scale3d(1.02,1.02,1.02);transform:scale3d(1.02,1.02,1.02)}80%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes buttonClicked{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.95,.95,.95);transform:scale3d(.95,.95,.95)}60%{-webkit-transform:scale3d(1.02,1.02,1.02);transform:scale3d(1.02,1.02,1.02)}80%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.cdx-block{padding:.4em 0}.cdx-block::-webkit-input-placeholder{line-height:normal!important}.cdx-input{border:1px solid rgba(201,201,204,.48);-webkit-box-shadow:inset 0 1px 2px 0 rgba(35,44,72,.06);box-shadow:inset 0 1px 2px #232c480f;border-radius:3px;padding:10px 12px;outline:none;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.cdx-input[data-placeholder]:before{position:static!important}.cdx-input[data-placeholder]:before{display:inline-block;width:0;white-space:nowrap;pointer-events:none}.cdx-settings-button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:inherit;margin:0;min-width:26px;min-height:26px}.cdx-settings-button--focused{background:rgba(34,186,255,.08)!important}.cdx-settings-button--focused{-webkit-box-shadow:inset 0 0 0px 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px #07a1e314}.cdx-settings-button--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.cdx-settings-button--active{color:#388ae5}.cdx-settings-button svg{width:auto;height:auto}@media (max-width: 650px){.cdx-settings-button svg{width:28px;height:28px}}@media (max-width: 650px){.cdx-settings-button{width:36px;height:36px;border-radius:8px}}@media (hover: hover){.cdx-settings-button:hover{background-color:#eff2f5}}.cdx-loader{position:relative;border:1px solid rgba(201,201,204,.48)}.cdx-loader:before{content:"";position:absolute;left:50%;top:50%;width:18px;height:18px;margin:-11px 0 0 -11px;border:2px solid rgba(201,201,204,.48);border-left-color:#388ae5;border-radius:50%;-webkit-animation:cdxRotation 1.2s infinite linear;animation:cdxRotation 1.2s infinite linear}@-webkit-keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.cdx-button{padding:13px;border-radius:3px;border:1px solid rgba(201,201,204,.48);font-size:14.9px;background:#fff;-webkit-box-shadow:0 2px 2px 0 rgba(18,30,57,.04);box-shadow:0 2px 2px #121e390a;color:#707684;text-align:center;cursor:pointer}@media (hover: hover){.cdx-button:hover{background:#FBFCFE;-webkit-box-shadow:0 1px 3px 0 rgba(18,30,57,.08);box-shadow:0 1px 3px #121e3914}}.cdx-button svg{height:20px;margin-right:.2em;margin-top:-2px}.ce-stub{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:12px 18px;margin:10px 0;border-radius:10px;background:#eff2f5;border:1px solid #EFF0F1;color:#707684;font-size:14px}.ce-stub svg{width:20px;height:20px}.ce-stub__info{margin-left:14px}.ce-stub__title{font-weight:500;text-transform:capitalize}.codex-editor.codex-editor--rtl{direction:rtl}.codex-editor.codex-editor--rtl .cdx-list{padding-left:0;padding-right:40px}.codex-editor.codex-editor--rtl .ce-toolbar__plus{right:-26px;left:auto}.codex-editor.codex-editor--rtl .ce-toolbar__actions{right:auto;left:-26px}@media (max-width: 650px){.codex-editor.codex-editor--rtl .ce-toolbar__actions{margin-left:0;margin-right:auto;padding-right:0;padding-left:10px}}.codex-editor.codex-editor--rtl .ce-settings{left:5px;right:auto}.codex-editor.codex-editor--rtl .ce-settings:before{right:auto;left:25px}.codex-editor.codex-editor--rtl .ce-settings__button:not(:nth-child(3n+3)){margin-left:3px;margin-right:0}.codex-editor.codex-editor--rtl .ce-conversion-tool__icon{margin-right:0;margin-left:10px}.codex-editor.codex-editor--rtl .ce-inline-toolbar__dropdown{border-right:0px solid transparent;border-left:1px solid rgba(201,201,204,.48);margin:0 -6px 0 6px}.codex-editor.codex-editor--rtl .ce-inline-toolbar__dropdown .icon--toggler-down{margin-left:0;margin-right:4px}@media (min-width: 651px){.codex-editor--narrow.codex-editor--rtl .ce-toolbar__plus{left:0;right:5px}}@media (min-width: 651px){.codex-editor--narrow.codex-editor--rtl .ce-toolbar__actions{left:-5px}}.cdx-search-field{--icon-margin-right: 10px;background:#F8F8F8;border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:2px;display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:auto}.cdx-search-field__icon{width:26px;height:26px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:var(--icon-margin-right)}.cdx-search-field__icon svg{width:20px;height:20px;color:#707684}.cdx-search-field__input{font-size:14px;outline:none;font-weight:500;font-family:inherit;border:0;background:transparent;margin:0;padding:0;line-height:22px;min-width:calc(100% - 26px - var(--icon-margin-right))}.cdx-search-field__input::-webkit-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::-moz-placeholder{color:#707684;font-weight:500}.cdx-search-field__input:-ms-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::-ms-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::placeholder{color:#707684;font-weight:500}.ce-popover{--border-radius: 6px;--width: 200px;--max-height: 270px;--padding: 6px;--offset-from-target: 8px;--color-border: #EFF0F1;--color-shadow: rgba(13, 20, 33, .1);--color-background: white;--color-text-primary: black;--color-text-secondary: #707684;--color-border-icon: rgba(201, 201, 204, .48);--color-border-icon-disabled: #EFF0F1;--color-text-icon-active: #388AE5;--color-background-icon-active: rgba(56, 138, 229, .1);--color-background-item-focus: rgba(34, 186, 255, .08);--color-shadow-item-focus: rgba(7, 161, 227, .08);--color-background-item-hover: #F8F8F8;--color-background-item-confirm: #E24A4A;--color-background-item-confirm-hover: #CE4343;--popover-top: calc(100% + var(--offset-from-target));--popover-left: 0;--nested-popover-overlap: 4px;--icon-size: 20px;--item-padding: 3px;--item-height: calc(var(--icon-size) + 2 * var(--item-padding))}.ce-popover__container{min-width:var(--width);width:var(--width);max-height:var(--max-height);border-radius:var(--border-radius);overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0px 3px 15px -3px var(--color-shadow);box-shadow:0 3px 15px -3px var(--color-shadow);position:absolute;left:var(--popover-left);top:var(--popover-top);background:var(--color-background);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;z-index:4;opacity:0;max-height:0;pointer-events:none;padding:0;border:none}.ce-popover--opened>.ce-popover__container{opacity:1;padding:var(--padding);max-height:var(--max-height);pointer-events:auto;-webkit-animation:panelShowing .1s ease;animation:panelShowing .1s ease;border:1px solid var(--color-border)}@media (max-width: 650px){.ce-popover--opened>.ce-popover__container{-webkit-animation:panelShowingMobile .25s ease;animation:panelShowingMobile .25s ease}}.ce-popover--open-top .ce-popover__container{--popover-top: calc(-1 * (var(--offset-from-target) + var(--popover-height)))}.ce-popover--open-left .ce-popover__container{--popover-left: calc(-1 * var(--width) + 100%)}.ce-popover__items{overflow-y:auto;-ms-scroll-chaining:none;overscroll-behavior:contain}@media (max-width: 650px){.ce-popover__overlay{position:fixed;top:0;bottom:0;left:0;right:0;background:#1D202B;z-index:3;opacity:.5;-webkit-transition:opacity .12s ease-in;transition:opacity .12s ease-in;will-change:opacity;visibility:visible}}.ce-popover__overlay--hidden{display:none}@media (max-width: 650px){.ce-popover .ce-popover__container{--offset: 5px;position:fixed;max-width:none;min-width:calc(100% - var(--offset) * 2);left:var(--offset);right:var(--offset);bottom:calc(var(--offset) + env(safe-area-inset-bottom));top:auto;border-radius:10px}}.ce-popover__search{margin-bottom:5px}.ce-popover__nothing-found-message{color:#707684;display:none;cursor:default;padding:3px;font-size:14px;line-height:20px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ce-popover__nothing-found-message--displayed{display:block}.ce-popover--nested .ce-popover__container{--popover-left: calc(var(--nesting-level) * (var(--width) - var(--nested-popover-overlap)));top:calc(var(--trigger-item-top) - var(--nested-popover-overlap));position:absolute}.ce-popover--open-top.ce-popover--nested .ce-popover__container{top:calc(var(--trigger-item-top) - var(--popover-height) + var(--item-height) + var(--offset-from-target) + var(--nested-popover-overlap))}.ce-popover--open-left .ce-popover--nested .ce-popover__container{--popover-left: calc(-1 * (var(--nesting-level) + 1) * var(--width) + 100%)}.ce-popover-item-separator{padding:4px 3px}.ce-popover-item-separator--hidden{display:none}.ce-popover-item-separator__line{height:1px;background:var(--color-border);width:100%}.ce-popover-item-html--hidden{display:none}.ce-popover-item{--border-radius: 6px;border-radius:var(--border-radius);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:var(--item-padding);color:var(--color-text-primary);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:none;background:transparent}@media (max-width: 650px){.ce-popover-item{padding:4px}}.ce-popover-item:not(:last-of-type){margin-bottom:1px}.ce-popover-item__icon{width:26px;height:26px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.ce-popover-item__icon svg{width:20px;height:20px}@media (max-width: 650px){.ce-popover-item__icon{width:36px;height:36px;border-radius:8px}.ce-popover-item__icon svg{width:28px;height:28px}}.ce-popover-item__icon--tool{margin-right:4px}.ce-popover-item__title{font-size:14px;line-height:20px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:auto}@media (max-width: 650px){.ce-popover-item__title{font-size:16px}}.ce-popover-item__secondary-title{color:var(--color-text-secondary);font-size:12px;white-space:nowrap;letter-spacing:-.1em;padding-right:5px;opacity:.6}@media (max-width: 650px){.ce-popover-item__secondary-title{display:none}}.ce-popover-item--active{background:var(--color-background-icon-active);color:var(--color-text-icon-active)}.ce-popover-item--disabled{color:var(--color-text-secondary);cursor:default;pointer-events:none}.ce-popover-item--focused:not(.ce-popover-item--no-focus){background:var(--color-background-item-focus)!important}.ce-popover-item--hidden{display:none}@media (hover: hover){.ce-popover-item:hover{cursor:pointer}.ce-popover-item:hover:not(.ce-popover-item--no-hover){background-color:var(--color-background-item-hover)}}.ce-popover-item--confirmation{background:var(--color-background-item-confirm)}.ce-popover-item--confirmation .ce-popover-item__title,.ce-popover-item--confirmation .ce-popover-item__icon{color:#fff}@media (hover: hover){.ce-popover-item--confirmation:not(.ce-popover-item--no-hover):hover{background:var(--color-background-item-confirm-hover)}}.ce-popover-item--confirmation:not(.ce-popover-item--no-focus).ce-popover-item--focused{background:var(--color-background-item-confirm-hover)!important}@-webkit-keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes panelShowingMobile{0%{opacity:0;-webkit-transform:translateY(14px) scale(.98);transform:translateY(14px) scale(.98)}70%{opacity:1;-webkit-transform:translateY(-4px);transform:translateY(-4px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes panelShowingMobile{0%{opacity:0;-webkit-transform:translateY(14px) scale(.98);transform:translateY(14px) scale(.98)}70%{opacity:1;-webkit-transform:translateY(-4px);transform:translateY(-4px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}.wobble{-webkit-animation-name:wobble;animation-name:wobble;-webkit-animation-duration:.4s;animation-duration:.4s}@-webkit-keyframes wobble{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-9%,0,0);transform:translate3d(-9%,0,0)}30%{-webkit-transform:translate3d(9%,0,0);transform:translate3d(9%,0,0)}45%{-webkit-transform:translate3d(-4%,0,0);transform:translate3d(-4%,0,0)}60%{-webkit-transform:translate3d(4%,0,0);transform:translate3d(4%,0,0)}75%{-webkit-transform:translate3d(-1%,0,0);transform:translate3d(-1%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes wobble{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-9%,0,0);transform:translate3d(-9%,0,0)}30%{-webkit-transform:translate3d(9%,0,0);transform:translate3d(9%,0,0)}45%{-webkit-transform:translate3d(-4%,0,0);transform:translate3d(-4%,0,0)}60%{-webkit-transform:translate3d(4%,0,0);transform:translate3d(4%,0,0)}75%{-webkit-transform:translate3d(-1%,0,0);transform:translate3d(-1%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.ce-popover-header{margin-bottom:8px;margin-top:4px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ce-popover-header__text{font-size:18px;font-weight:600}.ce-popover-header__back-button{border:0;background:transparent;width:36px;height:36px;color:var(--color-text-primary)}.ce-popover-header__back-button svg{display:block;width:28px;height:28px}.ce-popover--inline{--height: 38px;--height-mobile: 46px;--container-padding: 4px;position:relative}.ce-popover--inline .ce-popover__custom-content{margin-bottom:0}.ce-popover--inline .ce-popover__items{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-popover--inline .ce-popover__container{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;padding:var(--container-padding);height:var(--height);top:0;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content;width:-webkit-max-content;width:-moz-max-content;width:max-content;-webkit-animation:none;animation:none}@media (max-width: 650px){.ce-popover--inline .ce-popover__container{height:var(--height-mobile);position:absolute}}.ce-popover--inline .ce-popover-item-separator{padding:0 4px}.ce-popover--inline .ce-popover-item-separator__line{height:100%;width:1px}.ce-popover--inline .ce-popover-item{border-radius:4px;padding:4px}.ce-popover--inline .ce-popover-item__icon--tool{-webkit-box-shadow:none;box-shadow:none;background:transparent;margin-right:0}.ce-popover--inline .ce-popover-item__icon{width:auto;width:initial;height:auto;height:initial}.ce-popover--inline .ce-popover-item__icon svg{width:20px;height:20px}@media (max-width: 650px){.ce-popover--inline .ce-popover-item__icon svg{width:28px;height:28px}}.ce-popover--inline .ce-popover-item:not(:last-of-type){margin-bottom:0;margin-bottom:initial}.ce-popover--inline .ce-popover-item-html{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ce-popover--inline .ce-popover-item__icon--chevron-right{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.ce-popover--inline .ce-popover--nested-level-1 .ce-popover__container{--offset: 3px;left:0;top:calc(var(--height) + var(--offset))}@media (max-width: 650px){.ce-popover--inline .ce-popover--nested-level-1 .ce-popover__container{top:calc(var(--height-mobile) + var(--offset))}}.ce-popover--inline .ce-popover--nested .ce-popover__container{min-width:var(--width);width:var(--width);height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;padding:6px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.ce-popover--inline .ce-popover--nested .ce-popover__items{display:block;width:100%}.ce-popover--inline .ce-popover--nested .ce-popover-item{border-radius:6px;padding:3px}@media (max-width: 650px){.ce-popover--inline .ce-popover--nested .ce-popover-item{padding:4px}}.ce-popover--inline .ce-popover--nested .ce-popover-item__icon--tool{margin-right:4px}.ce-popover--inline .ce-popover--nested .ce-popover-item__icon{width:26px;height:26px}.ce-popover--inline .ce-popover--nested .ce-popover-item-separator{padding:4px 3px}.ce-popover--inline .ce-popover--nested .ce-popover-item-separator__line{width:100%;height:1px}.codex-editor [data-placeholder]:empty:before,.codex-editor [data-placeholder][data-empty=true]:before{pointer-events:none;color:#707684;cursor:text;content:attr(data-placeholder)}.codex-editor [data-placeholder-active]:empty:before,.codex-editor [data-placeholder-active][data-empty=true]:before{pointer-events:none;color:#707684;cursor:text}.codex-editor [data-placeholder-active]:empty:focus:before,.codex-editor [data-placeholder-active][data-empty=true]:focus:before{content:attr(data-placeholder-active)}
|
|
63
|
-
`;class OS extends ze{constructor(){super(...arguments),this.isMobile=!1,this.contentRectCache=null,this.resizeDebouncer=nf(()=>{this.windowResize()},200),this.selectionChangeDebounced=nf(()=>{this.selectionChanged()},pS),this.documentTouchedListener=e=>{this.documentTouched(e)}}get CSS(){return{editorWrapper:"codex-editor",editorWrapperNarrow:"codex-editor--narrow",editorZone:"codex-editor__redactor",editorZoneHidden:"codex-editor__redactor--hidden",editorEmpty:"codex-editor--empty",editorRtlFix:"codex-editor--rtl"}}get contentRect(){if(this.contentRectCache!==null)return this.contentRectCache;const e=this.nodes.wrapper.querySelector(`.${jn.CSS.content}`);return e?(this.contentRectCache=e.getBoundingClientRect(),this.contentRectCache):{width:650,left:0,right:0}}async prepare(){this.setIsMobile(),this.make(),this.loadStyles()}toggleReadOnly(e){e?this.unbindReadOnlySensitiveListeners():window.requestIdleCallback(()=>{this.bindReadOnlySensitiveListeners()},{timeout:2e3})}checkEmptiness(){const{BlockManager:e}=this.Editor;this.nodes.wrapper.classList.toggle(this.CSS.editorEmpty,e.isEditorEmpty)}get someToolbarOpened(){const{Toolbar:e,BlockSettings:t,InlineToolbar:r}=this.Editor;return!!(t.opened||r.opened||e.toolbox.opened)}get someFlipperButtonFocused(){return this.Editor.Toolbar.toolbox.hasFocus()?!0:Object.entries(this.Editor).filter(([e,t])=>t.flipper instanceof _s).some(([e,t])=>t.flipper.hasFocus())}destroy(){this.nodes.holder.innerHTML="",this.unbindReadOnlyInsensitiveListeners()}closeAllToolbars(){const{Toolbar:e,BlockSettings:t,InlineToolbar:r}=this.Editor;t.close(),r.close(),e.toolbox.close()}setIsMobile(){const e=window.innerWidth<of;e!==this.isMobile&&this.eventsDispatcher.emit(na,{isEnabled:this.isMobile}),this.isMobile=e}make(){this.nodes.holder=Q.getHolder(this.config.holder),this.nodes.wrapper=Q.make("div",[this.CSS.editorWrapper,...this.isRtl?[this.CSS.editorRtlFix]:[]]),this.nodes.redactor=Q.make("div",this.CSS.editorZone),this.nodes.holder.offsetWidth<this.contentRect.width&&this.nodes.wrapper.classList.add(this.CSS.editorWrapperNarrow),this.nodes.redactor.style.paddingBottom=this.config.minHeight+"px",this.nodes.wrapper.appendChild(this.nodes.redactor),this.nodes.holder.appendChild(this.nodes.wrapper),this.bindReadOnlyInsensitiveListeners()}loadStyles(){const e="editor-js-styles";if(Q.get(e))return;const t=Q.make("style",null,{id:e,textContent:DS.toString()});this.config.style&&!Zt(this.config.style)&&this.config.style.nonce&&t.setAttribute("nonce",this.config.style.nonce),Q.prepend(document.head,t)}bindReadOnlyInsensitiveListeners(){this.listeners.on(document,"selectionchange",this.selectionChangeDebounced),this.listeners.on(window,"resize",this.resizeDebouncer,{passive:!0}),this.listeners.on(this.nodes.redactor,"mousedown",this.documentTouchedListener,{capture:!0,passive:!0}),this.listeners.on(this.nodes.redactor,"touchstart",this.documentTouchedListener,{capture:!0,passive:!0})}unbindReadOnlyInsensitiveListeners(){this.listeners.off(document,"selectionchange",this.selectionChangeDebounced),this.listeners.off(window,"resize",this.resizeDebouncer),this.listeners.off(this.nodes.redactor,"mousedown",this.documentTouchedListener),this.listeners.off(this.nodes.redactor,"touchstart",this.documentTouchedListener)}bindReadOnlySensitiveListeners(){this.readOnlyMutableListeners.on(this.nodes.redactor,"click",e=>{this.redactorClicked(e)},!1),this.readOnlyMutableListeners.on(document,"keydown",e=>{this.documentKeydown(e)},!0),this.readOnlyMutableListeners.on(document,"mousedown",e=>{this.documentClicked(e)},!0),this.watchBlockHoveredEvents(),this.enableInputsEmptyMark()}watchBlockHoveredEvents(){let e;this.readOnlyMutableListeners.on(this.nodes.redactor,"mousemove",Vl(t=>{const r=t.target.closest(".ce-block");this.Editor.BlockSelection.anyBlockSelected||r&&e!==r&&(e=r,this.eventsDispatcher.emit(Of,{block:this.Editor.BlockManager.getBlockByChildNode(r)}))},20),{passive:!0})}unbindReadOnlySensitiveListeners(){this.readOnlyMutableListeners.clearAll()}windowResize(){this.contentRectCache=null,this.setIsMobile()}documentKeydown(e){switch(e.keyCode){case Me.ENTER:this.enterPressed(e);break;case Me.BACKSPACE:case Me.DELETE:this.backspacePressed(e);break;case Me.ESC:this.escapePressed(e);break;default:this.defaultBehaviour(e);break}}defaultBehaviour(e){const{currentBlock:t}=this.Editor.BlockManager,r=e.target.closest(`.${this.CSS.editorWrapper}`),a=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;if(t!==void 0&&r===null){this.Editor.BlockEvents.keydown(e);return}r||t&&a||(this.Editor.BlockManager.unsetCurrentBlock(),this.Editor.Toolbar.close())}backspacePressed(e){const{BlockManager:t,BlockSelection:r,Caret:a}=this.Editor;if(r.anyBlockSelected&&!Se.isSelectionExists){const s=t.removeSelectedBlocks(),i=t.insertDefaultBlockAtIndex(s,!0);a.setToBlock(i,a.positions.START),r.clearSelection(e),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()}}escapePressed(e){this.Editor.BlockSelection.clearSelection(e),this.Editor.Toolbar.toolbox.opened?(this.Editor.Toolbar.toolbox.close(),this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock,this.Editor.Caret.positions.END)):this.Editor.BlockSettings.opened?this.Editor.BlockSettings.close():this.Editor.InlineToolbar.opened?this.Editor.InlineToolbar.close():this.Editor.Toolbar.close()}enterPressed(e){const{BlockManager:t,BlockSelection:r}=this.Editor;if(this.someToolbarOpened)return;const a=t.currentBlockIndex>=0;if(r.anyBlockSelected&&!Se.isSelectionExists){r.clearSelection(e),e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation();return}if(!this.someToolbarOpened&&a&&e.target.tagName==="BODY"){const s=this.Editor.BlockManager.insert();e.preventDefault(),this.Editor.Caret.setToBlock(s),this.Editor.Toolbar.moveAndOpen(s)}this.Editor.BlockSelection.clearSelection(e)}documentClicked(e){var t,r;if(!e.isTrusted)return;const a=e.target;this.nodes.holder.contains(a)||Se.isAtEditor||(this.Editor.BlockManager.unsetCurrentBlock(),this.Editor.Toolbar.close());const s=(t=this.Editor.BlockSettings.nodes.wrapper)==null?void 0:t.contains(a),i=(r=this.Editor.Toolbar.nodes.settingsToggler)==null?void 0:r.contains(a),l=s||i;if(this.Editor.BlockSettings.opened&&!l){this.Editor.BlockSettings.close();const c=this.Editor.BlockManager.getBlockByChildNode(a);this.Editor.Toolbar.moveAndOpen(c)}this.Editor.BlockSelection.clearSelection(e)}documentTouched(e){let t=e.target;if(t===this.nodes.redactor){const r=e instanceof MouseEvent?e.clientX:e.touches[0].clientX,a=e instanceof MouseEvent?e.clientY:e.touches[0].clientY;t=document.elementFromPoint(r,a)}try{this.Editor.BlockManager.setCurrentBlockByChildNode(t)}catch{this.Editor.RectangleSelection.isRectActivated()||this.Editor.Caret.setToTheLastBlock()}this.Editor.ReadOnly.isEnabled||this.Editor.Toolbar.moveAndOpen()}redactorClicked(e){if(!Se.isCollapsed)return;const t=e.target,r=e.metaKey||e.ctrlKey;if(Q.isAnchor(t)&&r){e.stopImmediatePropagation(),e.stopPropagation();const a=t.getAttribute("href"),s=oC(a);aC(s);return}this.processBottomZoneClick(e)}processBottomZoneClick(e){const t=this.Editor.BlockManager.getBlockByIndex(-1),r=Q.offset(t.holder).bottom,a=e.pageY,{BlockSelection:s}=this.Editor;if(e.target instanceof Element&&e.target.isEqualNode(this.nodes.redactor)&&!s.anyBlockSelected&&r<a){e.stopImmediatePropagation(),e.stopPropagation();const{BlockManager:i,Caret:l,Toolbar:c}=this.Editor;(!i.lastBlock.tool.isDefault||!i.lastBlock.isEmpty)&&i.insertAtEnd(),l.setToTheLastBlock(),c.moveAndOpen(i.lastBlock)}}selectionChanged(){const{CrossBlockSelection:e,BlockSelection:t}=this.Editor,r=Se.anchorElement;if(e.isCrossBlockSelectionStarted&&t.anyBlockSelected&&Se.get().removeAllRanges(),!r){Se.range||this.Editor.InlineToolbar.close();return}const a=r.closest(`.${jn.CSS.content}`);(a===null||a.closest(`.${Se.CSS.editorWrapper}`)!==this.nodes.wrapper)&&(this.Editor.InlineToolbar.containsNode(r)||this.Editor.InlineToolbar.close(),r.dataset.inlineToolbar!=="true")||(this.Editor.BlockManager.currentBlock||this.Editor.BlockManager.setCurrentBlockByChildNode(r),this.Editor.InlineToolbar.tryToShow(!0))}enableInputsEmptyMark(){function e(t){const r=t.target;rf(r)}this.readOnlyMutableListeners.on(this.nodes.wrapper,"input",e),this.readOnlyMutableListeners.on(this.nodes.wrapper,"focusin",e),this.readOnlyMutableListeners.on(this.nodes.wrapper,"focusout",e)}}const AS={BlocksAPI:gC,CaretAPI:bC,EventsAPI:kC,I18nAPI:vC,API:wC,InlineToolbarAPI:_C,ListenersAPI:CC,NotifierAPI:BC,ReadOnlyAPI:TC,SanitizerAPI:NC,SaverAPI:PC,SelectionAPI:LC,ToolsAPI:zC,StylesAPI:FC,ToolbarAPI:RC,TooltipAPI:UC,UiAPI:WC,BlockSettings:b2,Toolbar:x2,InlineToolbar:B2,BlockEvents:aS,BlockManager:lS,BlockSelection:cS,Caret:dS,CrossBlockSelection:uS,DragNDrop:hS,ModificationsObserver:mS,Paste:gS,ReadOnly:yS,RectangleSelection:bS,Renderer:kS,Saver:vS,Tools:bm,UI:OS};class IS{constructor(e){this.moduleInstances={},this.eventsDispatcher=new ea;let t,r;this.isReady=new Promise((a,s)=>{t=a,r=s}),Promise.resolve().then(async()=>{this.configuration=e,this.validate(),this.init(),await this.start(),await this.render();const{BlockManager:a,Caret:s,UI:i,ModificationsObserver:l}=this.moduleInstances;i.checkEmptiness(),l.enable(),this.configuration.autofocus===!0&&this.configuration.readOnly!==!0&&s.setToBlock(a.blocks[0],s.positions.START),t()}).catch(a=>{Ye(`Editor.js is not ready because of ${a}`,"error"),r(a)})}set configuration(e){var t,r;_t(e)?this.config={...e}:this.config={holder:e},Yl(!!this.config.holderId,"config.holderId","config.holder"),this.config.holderId&&!this.config.holder&&(this.config.holder=this.config.holderId,this.config.holderId=null),this.config.holder==null&&(this.config.holder="editorjs"),this.config.logLevel||(this.config.logLevel=Qp.VERBOSE),Q_(this.config.logLevel),Yl(!!this.config.initialBlock,"config.initialBlock","config.defaultBlock"),this.config.defaultBlock=this.config.defaultBlock||this.config.initialBlock||"paragraph",this.config.minHeight=this.config.minHeight!==void 0?this.config.minHeight:300;const a={type:this.config.defaultBlock,data:{}};this.config.placeholder=this.config.placeholder||!1,this.config.sanitizer=this.config.sanitizer||{p:!0,b:!0,a:!0},this.config.hideToolbar=this.config.hideToolbar?this.config.hideToolbar:!1,this.config.tools=this.config.tools||{},this.config.i18n=this.config.i18n||{},this.config.data=this.config.data||{blocks:[]},this.config.onReady=this.config.onReady||(()=>{}),this.config.onChange=this.config.onChange||(()=>{}),this.config.inlineToolbar=this.config.inlineToolbar!==void 0?this.config.inlineToolbar:!0,(Zt(this.config.data)||!this.config.data.blocks||this.config.data.blocks.length===0)&&(this.config.data={blocks:[a]}),this.config.readOnly=this.config.readOnly||!1,(t=this.config.i18n)!=null&&t.messages&&At.setDictionary(this.config.i18n.messages),this.config.i18n.direction=((r=this.config.i18n)==null?void 0:r.direction)||"ltr"}get configuration(){return this.config}validate(){const{holderId:e,holder:t}=this.config;if(e&&t)throw Error("«holderId» and «holder» param can't assign at the same time.");if(Rn(t)&&!Q.get(t))throw Error(`element with ID «${t}» is missing. Pass correct holder's ID.`);if(t&&_t(t)&&!Q.isElement(t))throw Error("«holder» value must be an Element node")}init(){this.constructModules(),this.configureModules()}async start(){await["Tools","UI","BlockManager","Paste","BlockSelection","RectangleSelection","CrossBlockSelection","ReadOnly"].reduce((e,t)=>e.then(async()=>{try{await this.moduleInstances[t].prepare()}catch(r){if(r instanceof lf)throw new Error(r.message);Ye(`Module ${t} was skipped because of %o`,"warn",r)}}),Promise.resolve())}render(){return this.moduleInstances.Renderer.render(this.config.data.blocks)}constructModules(){Object.entries(AS).forEach(([e,t])=>{try{this.moduleInstances[e]=new t({config:this.configuration,eventsDispatcher:this.eventsDispatcher})}catch(r){Ye("[constructModules]",`Module ${e} skipped because`,"error",r)}})}configureModules(){for(const e in this.moduleInstances)Object.prototype.hasOwnProperty.call(this.moduleInstances,e)&&(this.moduleInstances[e].state=this.getModulesDiff(e))}getModulesDiff(e){const t={};for(const r in this.moduleInstances)r!==e&&(t[r]=this.moduleInstances[r]);return t}}/**
|
|
62
|
+
*/class Qc{static get DEFAULT_PLACEHOLDER(){return""}constructor({data:e,config:t,api:r,readOnly:a}){this.api=r,this.readOnly=a,this._CSS={block:this.api.styles.block,wrapper:"ce-paragraph"},this.readOnly||(this.onKeyUp=this.onKeyUp.bind(this)),this._placeholder=t.placeholder?t.placeholder:Qc.DEFAULT_PLACEHOLDER,this._data=e??{},this._element=null,this._preserveBlank=t.preserveBlank??!1}onKeyUp(e){if(e.code!=="Backspace"&&e.code!=="Delete"||!this._element)return;const{textContent:t}=this._element;t===""&&(this._element.innerHTML="")}drawView(){const e=document.createElement("DIV");return e.classList.add(this._CSS.wrapper,this._CSS.block),e.contentEditable="false",e.dataset.placeholderActive=this.api.i18n.t(this._placeholder),this._data.text&&(e.innerHTML=this._data.text),this.readOnly||(e.contentEditable="true",e.addEventListener("keyup",this.onKeyUp)),e}render(){return this._element=this.drawView(),this._element}merge(e){if(!this._element)return;this._data.text+=e.text;const t=_S(e.text);this._element.appendChild(t),this._element.normalize()}validate(e){return!(e.text.trim()===""&&!this._preserveBlank)}save(e){return{text:e.innerHTML}}onPaste(e){const t={text:e.detail.data.innerHTML};this._data=t,window.requestAnimationFrame(()=>{this._element&&(this._element.innerHTML=this._data.text||"")})}static get conversionConfig(){return{export:"text",import:"text"}}static get sanitize(){return{text:{br:!0}}}static get isReadOnlySupported(){return!0}static get pasteConfig(){return{tags:["P"]}}static get toolbox(){return{icon:wS,title:"Text"}}}class Zc{constructor(){this.commandName="bold"}static get sanitize(){return{b:{}}}render(){return{icon:GC,name:"bold",onActivate:()=>{document.execCommand(this.commandName)},isActive:()=>document.queryCommandState(this.commandName)}}get shortcut(){return"CMD+B"}}Zc.isInline=!0,Zc.title="Bold";class Jc{constructor(){this.commandName="italic",this.CSS={button:"ce-inline-tool",buttonActive:"ce-inline-tool--active",buttonModifier:"ce-inline-tool--italic"},this.nodes={button:null}}static get sanitize(){return{i:{}}}render(){return this.nodes.button=document.createElement("button"),this.nodes.button.type="button",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.innerHTML=t2,this.nodes.button}surround(){document.execCommand(this.commandName)}checkState(){const e=document.queryCommandState(this.commandName);return this.nodes.button.classList.toggle(this.CSS.buttonActive,e),e}get shortcut(){return"CMD+I"}}Jc.isInline=!0,Jc.title="Italic";class ed{constructor({api:e}){this.commandLink="createLink",this.commandUnlink="unlink",this.ENTER_KEY=13,this.CSS={button:"ce-inline-tool",buttonActive:"ce-inline-tool--active",buttonModifier:"ce-inline-tool--link",buttonUnlink:"ce-inline-tool--unlink",input:"ce-inline-tool-input",inputShowed:"ce-inline-tool-input--showed"},this.nodes={button:null,input:null},this.inputOpened=!1,this.toolbar=e.toolbar,this.inlineToolbar=e.inlineToolbar,this.notifier=e.notifier,this.i18n=e.i18n,this.selection=new Se}static get sanitize(){return{a:{href:!0,target:"_blank",rel:"nofollow"}}}render(){return this.nodes.button=document.createElement("button"),this.nodes.button.type="button",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.innerHTML=wf,this.nodes.button}renderActions(){return this.nodes.input=document.createElement("input"),this.nodes.input.placeholder=this.i18n.t("Add a link"),this.nodes.input.enterKeyHint="done",this.nodes.input.classList.add(this.CSS.input),this.nodes.input.addEventListener("keydown",e=>{e.keyCode===this.ENTER_KEY&&this.enterPressed(e)}),this.nodes.input}surround(e){if(e){this.inputOpened?(this.selection.restore(),this.selection.removeFakeBackground()):(this.selection.setFakeBackground(),this.selection.save());const t=this.selection.findParentTag("A");if(t){this.selection.expandToTag(t),this.unlink(),this.closeActions(),this.checkState(),this.toolbar.close();return}}this.toggleActions()}checkState(){const e=this.selection.findParentTag("A");if(e){this.nodes.button.innerHTML=a2,this.nodes.button.classList.add(this.CSS.buttonUnlink),this.nodes.button.classList.add(this.CSS.buttonActive),this.openActions();const t=e.getAttribute("href");this.nodes.input.value=t!=="null"?t:"",this.selection.save()}else this.nodes.button.innerHTML=wf,this.nodes.button.classList.remove(this.CSS.buttonUnlink),this.nodes.button.classList.remove(this.CSS.buttonActive);return!!e}clear(){this.closeActions()}get shortcut(){return"CMD+K"}toggleActions(){this.inputOpened?this.closeActions(!1):this.openActions(!0)}openActions(e=!1){this.nodes.input.classList.add(this.CSS.inputShowed),e&&this.nodes.input.focus(),this.inputOpened=!0}closeActions(e=!0){if(this.selection.isFakeBackgroundEnabled){const t=new Se;t.save(),this.selection.restore(),this.selection.removeFakeBackground(),t.restore()}this.nodes.input.classList.remove(this.CSS.inputShowed),this.nodes.input.value="",e&&this.selection.clearSaved(),this.inputOpened=!1}enterPressed(e){let t=this.nodes.input.value||"";if(!t.trim()){this.selection.restore(),this.unlink(),e.preventDefault(),this.closeActions();return}if(!this.validateURL(t)){this.notifier.show({message:"Pasted link is not valid.",style:"error"}),Ye("Incorrect Link pasted","warn",t);return}t=this.prepareLink(t),this.selection.restore(),this.selection.removeFakeBackground(),this.insertLink(t),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),this.selection.collapseToEnd(),this.inlineToolbar.close()}validateURL(e){return!/\s/.test(e)}prepareLink(e){return e=e.trim(),e=this.addProtocol(e),e}addProtocol(e){if(/^(\w+):(\/\/)?/.test(e))return e;const t=/^\/[^/\s]/.test(e),r=e.substring(0,1)==="#",a=/^\/\/[^/\s]/.test(e);return!t&&!r&&!a&&(e="http://"+e),e}insertLink(e){const t=this.selection.findParentTag("A");t&&this.selection.expandToTag(t),document.execCommand(this.commandLink,!1,e)}unlink(){document.execCommand(this.commandUnlink)}}ed.isInline=!0,ed.title="Link";let hm=class{constructor({api:e}){this.i18nAPI=e.i18n,this.blocksAPI=e.blocks,this.selectionAPI=e.selection,this.toolsAPI=e.tools,this.caretAPI=e.caret}async render(){const e=Se.get(),t=this.blocksAPI.getBlockByElement(e.anchorNode);if(t===void 0)return[];const r=this.toolsAPI.getBlockTools(),a=await pf(t,r);if(a.length===0)return[];const s=a.reduce((d,u)=>{var h;return(h=u.toolbox)==null||h.forEach(p=>{d.push({icon:p.icon,title:At.t(Wt.toolNames,p.title),name:u.name,closeOnActivate:!0,onActivate:async()=>{const m=await this.blocksAPI.convert(t.id,u.name,p.data);this.caretAPI.setToBlock(m,"end")}})}),d},[]),i=await t.getActiveToolboxEntry(),l=i!==void 0?i.icon:_f,c=!fr();return{icon:l,name:"convert-to",hint:{title:this.i18nAPI.t("Convert to")},children:{searchable:c,items:s,onOpen:()=>{c&&(this.selectionAPI.setFakeBackground(),this.selectionAPI.save())},onClose:()=>{c&&(this.selectionAPI.restore(),this.selectionAPI.removeFakeBackground())}}}}};hm.isInline=!0;let pm=class{constructor({data:e,api:t}){this.CSS={wrapper:"ce-stub",info:"ce-stub__info",title:"ce-stub__title",subtitle:"ce-stub__subtitle"},this.api=t,this.title=e.title||this.api.i18n.t("Error"),this.subtitle=this.api.i18n.t("The block can not be displayed correctly."),this.savedData=e.savedData,this.wrapper=this.make()}render(){return this.wrapper}save(){return this.savedData}make(){const e=Q.make("div",this.CSS.wrapper),t=s2,r=Q.make("div",this.CSS.info),a=Q.make("div",this.CSS.title,{textContent:this.title}),s=Q.make("div",this.CSS.subtitle,{textContent:this.subtitle});return e.innerHTML=t,r.appendChild(a),r.appendChild(s),e.appendChild(r),e}};pm.isReadOnlySupported=!0;class CS extends lc{constructor(){super(...arguments),this.type=No.Inline}get title(){return this.constructable[xs.Title]}create(){return new this.constructable({api:this.api,config:this.settings})}get isReadOnlySupported(){return this.constructable[xs.IsReadOnlySupported]??!1}}class ES extends lc{constructor(){super(...arguments),this.type=No.Tune}create(e,t){return new this.constructable({api:this.api,config:this.settings,block:t,data:e})}}let En=class wr extends Map{get blockTools(){const e=Array.from(this.entries()).filter(([,t])=>t.isBlock());return new wr(e)}get inlineTools(){const e=Array.from(this.entries()).filter(([,t])=>t.isInline());return new wr(e)}get blockTunes(){const e=Array.from(this.entries()).filter(([,t])=>t.isTune());return new wr(e)}get internalTools(){const e=Array.from(this.entries()).filter(([,t])=>t.isInternal);return new wr(e)}get externalTools(){const e=Array.from(this.entries()).filter(([,t])=>!t.isInternal);return new wr(e)}};var SS=Object.defineProperty,xS=Object.getOwnPropertyDescriptor,fm=(n,e,t,r)=>{for(var a=xS(e,t),s=n.length-1,i;s>=0;s--)(i=n[s])&&(a=i(e,t,a)||a);return a&&SS(e,t,a),a};class td extends lc{constructor(){super(...arguments),this.type=No.Block,this.inlineTools=new En,this.tunes=new En}create(e,t,r){return new this.constructable({data:e,block:t,readOnly:r,api:this.api,config:this.settings})}get isReadOnlySupported(){return this.constructable[yr.IsReadOnlySupported]===!0}get isLineBreaksEnabled(){return this.constructable[yr.IsEnabledLineBreaks]}get toolbox(){const e=this.constructable[yr.Toolbox],t=this.config[Ss.Toolbox];if(!Zt(e)&&t!==!1)return t?Array.isArray(e)?Array.isArray(t)?t.map((r,a)=>{const s=e[a];return s?{...s,...r}:r}):[t]:Array.isArray(t)?t:[{...e,...t}]:Array.isArray(e)?e:[e]}get conversionConfig(){return this.constructable[yr.ConversionConfig]}get enabledInlineTools(){return this.config[Ss.EnabledInlineTools]||!1}get enabledBlockTunes(){return this.config[Ss.EnabledBlockTunes]}get pasteConfig(){return this.constructable[yr.PasteConfig]??{}}get sanitizeConfig(){const e=super.sanitizeConfig,t=this.baseSanitizeConfig;if(Zt(e))return t;const r={};for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){const s=e[a];_t(s)?r[a]=Object.assign({},t,s):r[a]=s}return r}get baseSanitizeConfig(){const e={};return Array.from(this.inlineTools.values()).forEach(t=>Object.assign(e,t.sanitizeConfig)),Array.from(this.tunes.values()).forEach(t=>Object.assign(e,t.sanitizeConfig)),e}}fm([pr],td.prototype,"sanitizeConfig"),fm([pr],td.prototype,"baseSanitizeConfig");class BS{constructor(e,t,r){this.api=r,this.config=e,this.editorConfig=t}get(e){const{class:t,isInternal:r=!1,...a}=this.config[e],s=this.getConstructor(t),i=t[ic.IsTune];return new s({name:e,constructable:t,config:a,api:this.api.getMethodsForTool(e,i),isDefault:e===this.editorConfig.defaultBlock,defaultPlaceholder:this.editorConfig.placeholder,isInternal:r})}getConstructor(e){switch(!0){case e[xs.IsInline]:return CS;case e[ic.IsTune]:return ES;default:return td}}}let mm=class{constructor({api:e}){this.CSS={animation:"wobble"},this.api=e}render(){return{icon:KC,title:this.api.i18n.t("Move down"),onActivate:()=>this.handleClick(),name:"move-down"}}handleClick(){const e=this.api.blocks.getCurrentBlockIndex(),t=this.api.blocks.getBlockByIndex(e+1);if(!t)throw new Error("Unable to move Block down since it is already the last");const r=t.holder,a=r.getBoundingClientRect();let s=Math.abs(window.innerHeight-r.offsetHeight);a.top<window.innerHeight&&(s=window.scrollY+r.offsetHeight),window.scrollTo(0,s),this.api.blocks.move(e+1),this.api.toolbar.toggleBlockSettings(!0)}};mm.isTune=!0;let gm=class{constructor({api:e}){this.api=e}render(){return{icon:JC,title:this.api.i18n.t("Delete"),name:"delete",confirmation:{title:this.api.i18n.t("Click to delete"),onActivate:()=>this.handleClick()}}}handleClick(){this.api.blocks.delete()}};gm.isTune=!0;let ym=class{constructor({api:e}){this.CSS={animation:"wobble"},this.api=e}render(){return{icon:ZC,title:this.api.i18n.t("Move up"),onActivate:()=>this.handleClick(),name:"move-up"}}handleClick(){const e=this.api.blocks.getCurrentBlockIndex(),t=this.api.blocks.getBlockByIndex(e),r=this.api.blocks.getBlockByIndex(e-1);if(e===0||!t||!r)throw new Error("Unable to move Block up since it is already the first");const a=t.holder,s=r.holder,i=a.getBoundingClientRect(),l=s.getBoundingClientRect();let c;l.top>0?c=Math.abs(i.top)-Math.abs(l.top):c=Math.abs(i.top)+l.height,window.scrollBy(0,-1*c),this.api.blocks.move(e-1),this.api.toolbar.toggleBlockSettings(!0)}};ym.isTune=!0;var TS=Object.defineProperty,$S=Object.getOwnPropertyDescriptor,MS=(n,e,t,r)=>{for(var a=$S(e,t),s=n.length-1,i;s>=0;s--)(i=n[s])&&(a=i(e,t,a)||a);return a&&TS(e,t,a),a};let bm=class extends ze{constructor(){super(...arguments),this.stubTool="stub",this.toolsAvailable=new En,this.toolsUnavailable=new En}get available(){return this.toolsAvailable}get unavailable(){return this.toolsUnavailable}get inlineTools(){return this.available.inlineTools}get blockTools(){return this.available.blockTools}get blockTunes(){return this.available.blockTunes}get defaultTool(){return this.blockTools.get(this.config.defaultBlock)}get internal(){return this.available.internalTools}async prepare(){if(this.validateTools(),this.config.tools=jl({},this.internalTools,this.config.tools),!Object.prototype.hasOwnProperty.call(this.config,"tools")||Object.keys(this.config.tools).length===0)throw Error("Can't start without tools");const e=this.prepareConfig();this.factory=new BS(e,this.config,this.Editor.API);const t=this.getListOfPrepareFunctions(e);if(t.length===0)return Promise.resolve();await J_(t,r=>{this.toolPrepareMethodSuccess(r)},r=>{this.toolPrepareMethodFallback(r)}),this.prepareBlockTools()}getAllInlineToolsSanitizeConfig(){const e={};return Array.from(this.inlineTools.values()).forEach(t=>{Object.assign(e,t.sanitizeConfig)}),e}destroy(){Object.values(this.available).forEach(async e=>{tt(e.reset)&&await e.reset()})}get internalTools(){return{convertTo:{class:hm,isInternal:!0},link:{class:ed,isInternal:!0},bold:{class:Zc,isInternal:!0},italic:{class:Jc,isInternal:!0},paragraph:{class:Qc,inlineToolbar:!0,isInternal:!0},stub:{class:pm,isInternal:!0},moveUp:{class:ym,isInternal:!0},delete:{class:gm,isInternal:!0},moveDown:{class:mm,isInternal:!0}}}toolPrepareMethodSuccess(e){const t=this.factory.get(e.toolName);if(t.isInline()){const r=["render"].filter(a=>!t.create()[a]);if(r.length){Ye(`Incorrect Inline Tool: ${t.name}. Some of required methods is not implemented %o`,"warn",r),this.toolsUnavailable.set(t.name,t);return}}this.toolsAvailable.set(t.name,t)}toolPrepareMethodFallback(e){this.toolsUnavailable.set(e.toolName,this.factory.get(e.toolName))}getListOfPrepareFunctions(e){const t=[];return Object.entries(e).forEach(([r,a])=>{t.push({function:tt(a.class.prepare)?a.class.prepare:()=>{},data:{toolName:r,config:a.config}})}),t}prepareBlockTools(){Array.from(this.blockTools.values()).forEach(e=>{this.assignInlineToolsToBlockTool(e),this.assignBlockTunesToBlockTool(e)})}assignInlineToolsToBlockTool(e){if(this.config.inlineToolbar!==!1){if(e.enabledInlineTools===!0){e.inlineTools=new En(Array.isArray(this.config.inlineToolbar)?this.config.inlineToolbar.map(t=>[t,this.inlineTools.get(t)]):Array.from(this.inlineTools.entries()));return}Array.isArray(e.enabledInlineTools)&&(e.inlineTools=new En(["convertTo",...e.enabledInlineTools].map(t=>[t,this.inlineTools.get(t)])))}}assignBlockTunesToBlockTool(e){if(e.enabledBlockTunes!==!1){if(Array.isArray(e.enabledBlockTunes)){const t=new En(e.enabledBlockTunes.map(r=>[r,this.blockTunes.get(r)]));e.tunes=new En([...t,...this.blockTunes.internalTools]);return}if(Array.isArray(this.config.tunes)){const t=new En(this.config.tunes.map(r=>[r,this.blockTunes.get(r)]));e.tunes=new En([...t,...this.blockTunes.internalTools]);return}e.tunes=this.blockTunes.internalTools}}validateTools(){for(const e in this.config.tools)if(Object.prototype.hasOwnProperty.call(this.config.tools,e)){if(e in this.internalTools)return;const t=this.config.tools[e];if(!tt(t)&&!tt(t.class))throw Error(`Tool «${e}» must be a constructor function or an object with function in the «class» property`)}}prepareConfig(){const e={};for(const t in this.config.tools)_t(this.config.tools[t])?e[t]=this.config.tools[t]:e[t]={class:this.config.tools[t]};return e}};MS([pr],bm.prototype,"getAllInlineToolsSanitizeConfig");const DS=`:root{--selectionColor: #e1f2ff;--inlineSelectionColor: #d4ecff;--bg-light: #eff2f5;--grayText: #707684;--color-dark: #1D202B;--color-active-icon: #388AE5;--color-gray-border: rgba(201, 201, 204, .48);--content-width: 650px;--narrow-mode-right-padding: 50px;--toolbox-buttons-size: 26px;--toolbox-buttons-size--mobile: 36px;--icon-size: 20px;--icon-size--mobile: 28px;--block-padding-vertical: .4em;--color-line-gray: #EFF0F1 }.codex-editor{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:1}.codex-editor .hide{display:none}.codex-editor__redactor [contenteditable]:empty:after{content:"\\feff"}@media (min-width: 651px){.codex-editor--narrow .codex-editor__redactor{margin-right:50px}}@media (min-width: 651px){.codex-editor--narrow.codex-editor--rtl .codex-editor__redactor{margin-left:50px;margin-right:0}}@media (min-width: 651px){.codex-editor--narrow .ce-toolbar__actions{right:-5px}}.codex-editor-copyable{position:absolute;height:1px;width:1px;top:-400%;opacity:.001}.codex-editor-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:999;pointer-events:none;overflow:hidden}.codex-editor-overlay__container{position:relative;pointer-events:auto;z-index:0}.codex-editor-overlay__rectangle{position:absolute;pointer-events:none;background-color:#2eaadc33;border:1px solid transparent}.codex-editor svg{max-height:100%}.codex-editor path{stroke:currentColor}.codex-editor ::-moz-selection{background-color:#d4ecff}.codex-editor ::selection{background-color:#d4ecff}.codex-editor--toolbox-opened [contentEditable=true][data-placeholder]:focus:before{opacity:0!important}.ce-scroll-locked{overflow:hidden}.ce-scroll-locked--hard{overflow:hidden;top:calc(-1 * var(--window-scroll-offset));position:fixed;width:100%}.ce-toolbar{position:absolute;left:0;right:0;top:0;-webkit-transition:opacity .1s ease;transition:opacity .1s ease;will-change:opacity,top;display:none}.ce-toolbar--opened{display:block}.ce-toolbar__content{max-width:650px;margin:0 auto;position:relative}.ce-toolbar__plus{color:#1d202b;cursor:pointer;width:26px;height:26px;border-radius:7px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-flex-negative:0;flex-shrink:0}@media (max-width: 650px){.ce-toolbar__plus{width:36px;height:36px}}@media (hover: hover){.ce-toolbar__plus:hover{background-color:#eff2f5}}.ce-toolbar__plus--active{background-color:#eff2f5;-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-toolbar__plus-shortcut{opacity:.6;word-spacing:-2px;margin-top:5px}@media (max-width: 650px){.ce-toolbar__plus{position:absolute;background-color:#fff;border:1px solid #E8E8EB;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;z-index:2;position:static}.ce-toolbar__plus--left-oriented:before{left:15px;margin-left:0}.ce-toolbar__plus--right-oriented:before{left:auto;right:15px;margin-left:0}}.ce-toolbar__actions{position:absolute;right:100%;opacity:0;display:-webkit-box;display:-ms-flexbox;display:flex;padding-right:5px}.ce-toolbar__actions--opened{opacity:1}@media (max-width: 650px){.ce-toolbar__actions{right:auto}}.ce-toolbar__settings-btn{color:#1d202b;width:26px;height:26px;border-radius:7px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;margin-left:3px;cursor:pointer;user-select:none}@media (max-width: 650px){.ce-toolbar__settings-btn{width:36px;height:36px}}@media (hover: hover){.ce-toolbar__settings-btn:hover{background-color:#eff2f5}}.ce-toolbar__settings-btn--active{background-color:#eff2f5;-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@media (min-width: 651px){.ce-toolbar__settings-btn{width:24px}}.ce-toolbar__settings-btn--hidden{display:none}@media (max-width: 650px){.ce-toolbar__settings-btn{position:absolute;background-color:#fff;border:1px solid #E8E8EB;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;z-index:2;position:static}.ce-toolbar__settings-btn--left-oriented:before{left:15px;margin-left:0}.ce-toolbar__settings-btn--right-oriented:before{left:auto;right:15px;margin-left:0}}.ce-toolbar__plus svg,.ce-toolbar__settings-btn svg{width:24px;height:24px}@media (min-width: 651px){.codex-editor--narrow .ce-toolbar__plus{left:5px}}@media (min-width: 651px){.codex-editor--narrow .ce-toolbox .ce-popover{right:0;left:auto;left:initial}}.ce-inline-toolbar{--y-offset: 8px;--color-background-icon-active: rgba(56, 138, 229, .1);--color-text-icon-active: #388AE5;--color-text-primary: black;position:absolute;visibility:hidden;-webkit-transition:opacity .25s ease;transition:opacity .25s ease;will-change:opacity,left,top;top:0;left:0;z-index:3;opacity:1;visibility:visible}.ce-inline-toolbar [hidden]{display:none!important}.ce-inline-toolbar__toggler-and-button-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;padding:0 6px}.ce-inline-toolbar__buttons{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-inline-toolbar__dropdown{display:-webkit-box;display:-ms-flexbox;display:flex;padding:6px;margin:0 6px 0 -6px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;border-right:1px solid rgba(201,201,204,.48);-webkit-box-sizing:border-box;box-sizing:border-box}@media (hover: hover){.ce-inline-toolbar__dropdown:hover{background:#eff2f5}}.ce-inline-toolbar__dropdown--hidden{display:none}.ce-inline-toolbar__dropdown-content,.ce-inline-toolbar__dropdown-arrow{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-inline-toolbar__dropdown-content svg,.ce-inline-toolbar__dropdown-arrow svg{width:20px;height:20px}.ce-inline-toolbar__shortcut{opacity:.6;word-spacing:-3px;margin-top:3px}.ce-inline-tool{color:var(--color-text-primary);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:0;border-radius:4px;line-height:normal;height:100%;padding:0;width:28px;background-color:transparent;cursor:pointer}@media (max-width: 650px){.ce-inline-tool{width:36px;height:36px}}@media (hover: hover){.ce-inline-tool:hover{background-color:#f8f8f8}}.ce-inline-tool svg{display:block;width:20px;height:20px}@media (max-width: 650px){.ce-inline-tool svg{width:28px;height:28px}}.ce-inline-tool--link .icon--unlink,.ce-inline-tool--unlink .icon--link{display:none}.ce-inline-tool--unlink .icon--unlink{display:inline-block;margin-bottom:-1px}.ce-inline-tool-input{background:#F8F8F8;border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:4px 8px;font-size:14px;line-height:22px;outline:none;margin:0;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;display:none;font-weight:500;-webkit-appearance:none;font-family:inherit}@media (max-width: 650px){.ce-inline-tool-input{font-size:15px;font-weight:500}}.ce-inline-tool-input::-webkit-input-placeholder{color:#707684}.ce-inline-tool-input::-moz-placeholder{color:#707684}.ce-inline-tool-input:-ms-input-placeholder{color:#707684}.ce-inline-tool-input::-ms-input-placeholder{color:#707684}.ce-inline-tool-input::placeholder{color:#707684}.ce-inline-tool-input--showed{display:block}.ce-inline-tool--active{background:var(--color-background-icon-active);color:var(--color-text-icon-active)}@-webkit-keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.ce-block{-webkit-animation:fade-in .3s ease;animation:fade-in .3s ease;-webkit-animation-fill-mode:none;animation-fill-mode:none;-webkit-animation-fill-mode:initial;animation-fill-mode:initial}.ce-block:first-of-type{margin-top:0}.ce-block--selected .ce-block__content{background:#e1f2ff}.ce-block--selected .ce-block__content [contenteditable]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ce-block--selected .ce-block__content img,.ce-block--selected .ce-block__content .ce-stub{opacity:.55}.ce-block--stretched .ce-block__content{max-width:none}.ce-block__content{position:relative;max-width:650px;margin:0 auto;-webkit-transition:background-color .15s ease;transition:background-color .15s ease}.ce-block--drop-target .ce-block__content:before{content:"";position:absolute;top:100%;left:-20px;margin-top:-1px;height:8px;width:8px;border:solid #388AE5;border-width:1px 1px 0 0;-webkit-transform-origin:right;transform-origin:right;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ce-block--drop-target .ce-block__content:after{content:"";position:absolute;top:100%;height:1px;width:100%;color:#388ae5;background:repeating-linear-gradient(90deg,#388AE5,#388AE5 1px,#fff 1px,#fff 6px)}.ce-block a{cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline}.ce-block b{font-weight:700}.ce-block i{font-style:italic}@-webkit-keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}20%{-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}20%{-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@-webkit-keyframes selectionBounce{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}50%{-webkit-transform:scale3d(1.01,1.01,1.01);transform:scale3d(1.01,1.01,1.01)}70%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes selectionBounce{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}50%{-webkit-transform:scale3d(1.01,1.01,1.01);transform:scale3d(1.01,1.01,1.01)}70%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@-webkit-keyframes buttonClicked{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.95,.95,.95);transform:scale3d(.95,.95,.95)}60%{-webkit-transform:scale3d(1.02,1.02,1.02);transform:scale3d(1.02,1.02,1.02)}80%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes buttonClicked{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.95,.95,.95);transform:scale3d(.95,.95,.95)}60%{-webkit-transform:scale3d(1.02,1.02,1.02);transform:scale3d(1.02,1.02,1.02)}80%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.cdx-block{padding:.4em 0}.cdx-block::-webkit-input-placeholder{line-height:normal!important}.cdx-input{border:1px solid rgba(201,201,204,.48);-webkit-box-shadow:inset 0 1px 2px 0 rgba(35,44,72,.06);box-shadow:inset 0 1px 2px #232c480f;border-radius:3px;padding:10px 12px;outline:none;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.cdx-input[data-placeholder]:before{position:static!important}.cdx-input[data-placeholder]:before{display:inline-block;width:0;white-space:nowrap;pointer-events:none}.cdx-settings-button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:inherit;margin:0;min-width:26px;min-height:26px}.cdx-settings-button--focused{background:rgba(34,186,255,.08)!important}.cdx-settings-button--focused{-webkit-box-shadow:inset 0 0 0px 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px #07a1e314}.cdx-settings-button--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.cdx-settings-button--active{color:#388ae5}.cdx-settings-button svg{width:auto;height:auto}@media (max-width: 650px){.cdx-settings-button svg{width:28px;height:28px}}@media (max-width: 650px){.cdx-settings-button{width:36px;height:36px;border-radius:8px}}@media (hover: hover){.cdx-settings-button:hover{background-color:#eff2f5}}.cdx-loader{position:relative;border:1px solid rgba(201,201,204,.48)}.cdx-loader:before{content:"";position:absolute;left:50%;top:50%;width:18px;height:18px;margin:-11px 0 0 -11px;border:2px solid rgba(201,201,204,.48);border-left-color:#388ae5;border-radius:50%;-webkit-animation:cdxRotation 1.2s infinite linear;animation:cdxRotation 1.2s infinite linear}@-webkit-keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.cdx-button{padding:13px;border-radius:3px;border:1px solid rgba(201,201,204,.48);font-size:14.9px;background:#fff;-webkit-box-shadow:0 2px 2px 0 rgba(18,30,57,.04);box-shadow:0 2px 2px #121e390a;color:#707684;text-align:center;cursor:pointer}@media (hover: hover){.cdx-button:hover{background:#FBFCFE;-webkit-box-shadow:0 1px 3px 0 rgba(18,30,57,.08);box-shadow:0 1px 3px #121e3914}}.cdx-button svg{height:20px;margin-right:.2em;margin-top:-2px}.ce-stub{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:12px 18px;margin:10px 0;border-radius:10px;background:#eff2f5;border:1px solid #EFF0F1;color:#707684;font-size:14px}.ce-stub svg{width:20px;height:20px}.ce-stub__info{margin-left:14px}.ce-stub__title{font-weight:500;text-transform:capitalize}.codex-editor.codex-editor--rtl{direction:rtl}.codex-editor.codex-editor--rtl .cdx-list{padding-left:0;padding-right:40px}.codex-editor.codex-editor--rtl .ce-toolbar__plus{right:-26px;left:auto}.codex-editor.codex-editor--rtl .ce-toolbar__actions{right:auto;left:-26px}@media (max-width: 650px){.codex-editor.codex-editor--rtl .ce-toolbar__actions{margin-left:0;margin-right:auto;padding-right:0;padding-left:10px}}.codex-editor.codex-editor--rtl .ce-settings{left:5px;right:auto}.codex-editor.codex-editor--rtl .ce-settings:before{right:auto;left:25px}.codex-editor.codex-editor--rtl .ce-settings__button:not(:nth-child(3n+3)){margin-left:3px;margin-right:0}.codex-editor.codex-editor--rtl .ce-conversion-tool__icon{margin-right:0;margin-left:10px}.codex-editor.codex-editor--rtl .ce-inline-toolbar__dropdown{border-right:0px solid transparent;border-left:1px solid rgba(201,201,204,.48);margin:0 -6px 0 6px}.codex-editor.codex-editor--rtl .ce-inline-toolbar__dropdown .icon--toggler-down{margin-left:0;margin-right:4px}@media (min-width: 651px){.codex-editor--narrow.codex-editor--rtl .ce-toolbar__plus{left:0;right:5px}}@media (min-width: 651px){.codex-editor--narrow.codex-editor--rtl .ce-toolbar__actions{left:-5px}}.cdx-search-field{--icon-margin-right: 10px;background:#F8F8F8;border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:2px;display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:auto}.cdx-search-field__icon{width:26px;height:26px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:var(--icon-margin-right)}.cdx-search-field__icon svg{width:20px;height:20px;color:#707684}.cdx-search-field__input{font-size:14px;outline:none;font-weight:500;font-family:inherit;border:0;background:transparent;margin:0;padding:0;line-height:22px;min-width:calc(100% - 26px - var(--icon-margin-right))}.cdx-search-field__input::-webkit-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::-moz-placeholder{color:#707684;font-weight:500}.cdx-search-field__input:-ms-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::-ms-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::placeholder{color:#707684;font-weight:500}.ce-popover{--border-radius: 6px;--width: 200px;--max-height: 270px;--padding: 6px;--offset-from-target: 8px;--color-border: #EFF0F1;--color-shadow: rgba(13, 20, 33, .1);--color-background: white;--color-text-primary: black;--color-text-secondary: #707684;--color-border-icon: rgba(201, 201, 204, .48);--color-border-icon-disabled: #EFF0F1;--color-text-icon-active: #388AE5;--color-background-icon-active: rgba(56, 138, 229, .1);--color-background-item-focus: rgba(34, 186, 255, .08);--color-shadow-item-focus: rgba(7, 161, 227, .08);--color-background-item-hover: #F8F8F8;--color-background-item-confirm: #E24A4A;--color-background-item-confirm-hover: #CE4343;--popover-top: calc(100% + var(--offset-from-target));--popover-left: 0;--nested-popover-overlap: 4px;--icon-size: 20px;--item-padding: 3px;--item-height: calc(var(--icon-size) + 2 * var(--item-padding))}.ce-popover__container{min-width:var(--width);width:var(--width);max-height:var(--max-height);border-radius:var(--border-radius);overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0px 3px 15px -3px var(--color-shadow);box-shadow:0 3px 15px -3px var(--color-shadow);position:absolute;left:var(--popover-left);top:var(--popover-top);background:var(--color-background);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;z-index:4;opacity:0;max-height:0;pointer-events:none;padding:0;border:none}.ce-popover--opened>.ce-popover__container{opacity:1;padding:var(--padding);max-height:var(--max-height);pointer-events:auto;-webkit-animation:panelShowing .1s ease;animation:panelShowing .1s ease;border:1px solid var(--color-border)}@media (max-width: 650px){.ce-popover--opened>.ce-popover__container{-webkit-animation:panelShowingMobile .25s ease;animation:panelShowingMobile .25s ease}}.ce-popover--open-top .ce-popover__container{--popover-top: calc(-1 * (var(--offset-from-target) + var(--popover-height)))}.ce-popover--open-left .ce-popover__container{--popover-left: calc(-1 * var(--width) + 100%)}.ce-popover__items{overflow-y:auto;-ms-scroll-chaining:none;overscroll-behavior:contain}@media (max-width: 650px){.ce-popover__overlay{position:fixed;top:0;bottom:0;left:0;right:0;background:#1D202B;z-index:3;opacity:.5;-webkit-transition:opacity .12s ease-in;transition:opacity .12s ease-in;will-change:opacity;visibility:visible}}.ce-popover__overlay--hidden{display:none}@media (max-width: 650px){.ce-popover .ce-popover__container{--offset: 5px;position:fixed;max-width:none;min-width:calc(100% - var(--offset) * 2);left:var(--offset);right:var(--offset);bottom:calc(var(--offset) + env(safe-area-inset-bottom));top:auto;border-radius:10px}}.ce-popover__search{margin-bottom:5px}.ce-popover__nothing-found-message{color:#707684;display:none;cursor:default;padding:3px;font-size:14px;line-height:20px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ce-popover__nothing-found-message--displayed{display:block}.ce-popover--nested .ce-popover__container{--popover-left: calc(var(--nesting-level) * (var(--width) - var(--nested-popover-overlap)));top:calc(var(--trigger-item-top) - var(--nested-popover-overlap));position:absolute}.ce-popover--open-top.ce-popover--nested .ce-popover__container{top:calc(var(--trigger-item-top) - var(--popover-height) + var(--item-height) + var(--offset-from-target) + var(--nested-popover-overlap))}.ce-popover--open-left .ce-popover--nested .ce-popover__container{--popover-left: calc(-1 * (var(--nesting-level) + 1) * var(--width) + 100%)}.ce-popover-item-separator{padding:4px 3px}.ce-popover-item-separator--hidden{display:none}.ce-popover-item-separator__line{height:1px;background:var(--color-border);width:100%}.ce-popover-item-html--hidden{display:none}.ce-popover-item{--border-radius: 6px;border-radius:var(--border-radius);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:var(--item-padding);color:var(--color-text-primary);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:none;background:transparent}@media (max-width: 650px){.ce-popover-item{padding:4px}}.ce-popover-item:not(:last-of-type){margin-bottom:1px}.ce-popover-item__icon{width:26px;height:26px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.ce-popover-item__icon svg{width:20px;height:20px}@media (max-width: 650px){.ce-popover-item__icon{width:36px;height:36px;border-radius:8px}.ce-popover-item__icon svg{width:28px;height:28px}}.ce-popover-item__icon--tool{margin-right:4px}.ce-popover-item__title{font-size:14px;line-height:20px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:auto}@media (max-width: 650px){.ce-popover-item__title{font-size:16px}}.ce-popover-item__secondary-title{color:var(--color-text-secondary);font-size:12px;white-space:nowrap;letter-spacing:-.1em;padding-right:5px;opacity:.6}@media (max-width: 650px){.ce-popover-item__secondary-title{display:none}}.ce-popover-item--active{background:var(--color-background-icon-active);color:var(--color-text-icon-active)}.ce-popover-item--disabled{color:var(--color-text-secondary);cursor:default;pointer-events:none}.ce-popover-item--focused:not(.ce-popover-item--no-focus){background:var(--color-background-item-focus)!important}.ce-popover-item--hidden{display:none}@media (hover: hover){.ce-popover-item:hover{cursor:pointer}.ce-popover-item:hover:not(.ce-popover-item--no-hover){background-color:var(--color-background-item-hover)}}.ce-popover-item--confirmation{background:var(--color-background-item-confirm)}.ce-popover-item--confirmation .ce-popover-item__title,.ce-popover-item--confirmation .ce-popover-item__icon{color:#fff}@media (hover: hover){.ce-popover-item--confirmation:not(.ce-popover-item--no-hover):hover{background:var(--color-background-item-confirm-hover)}}.ce-popover-item--confirmation:not(.ce-popover-item--no-focus).ce-popover-item--focused{background:var(--color-background-item-confirm-hover)!important}@-webkit-keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes panelShowingMobile{0%{opacity:0;-webkit-transform:translateY(14px) scale(.98);transform:translateY(14px) scale(.98)}70%{opacity:1;-webkit-transform:translateY(-4px);transform:translateY(-4px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes panelShowingMobile{0%{opacity:0;-webkit-transform:translateY(14px) scale(.98);transform:translateY(14px) scale(.98)}70%{opacity:1;-webkit-transform:translateY(-4px);transform:translateY(-4px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}.wobble{-webkit-animation-name:wobble;animation-name:wobble;-webkit-animation-duration:.4s;animation-duration:.4s}@-webkit-keyframes wobble{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-9%,0,0);transform:translate3d(-9%,0,0)}30%{-webkit-transform:translate3d(9%,0,0);transform:translate3d(9%,0,0)}45%{-webkit-transform:translate3d(-4%,0,0);transform:translate3d(-4%,0,0)}60%{-webkit-transform:translate3d(4%,0,0);transform:translate3d(4%,0,0)}75%{-webkit-transform:translate3d(-1%,0,0);transform:translate3d(-1%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes wobble{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-9%,0,0);transform:translate3d(-9%,0,0)}30%{-webkit-transform:translate3d(9%,0,0);transform:translate3d(9%,0,0)}45%{-webkit-transform:translate3d(-4%,0,0);transform:translate3d(-4%,0,0)}60%{-webkit-transform:translate3d(4%,0,0);transform:translate3d(4%,0,0)}75%{-webkit-transform:translate3d(-1%,0,0);transform:translate3d(-1%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.ce-popover-header{margin-bottom:8px;margin-top:4px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ce-popover-header__text{font-size:18px;font-weight:600}.ce-popover-header__back-button{border:0;background:transparent;width:36px;height:36px;color:var(--color-text-primary)}.ce-popover-header__back-button svg{display:block;width:28px;height:28px}.ce-popover--inline{--height: 38px;--height-mobile: 46px;--container-padding: 4px;position:relative}.ce-popover--inline .ce-popover__custom-content{margin-bottom:0}.ce-popover--inline .ce-popover__items{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-popover--inline .ce-popover__container{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;padding:var(--container-padding);height:var(--height);top:0;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content;width:-webkit-max-content;width:-moz-max-content;width:max-content;-webkit-animation:none;animation:none}@media (max-width: 650px){.ce-popover--inline .ce-popover__container{height:var(--height-mobile);position:absolute}}.ce-popover--inline .ce-popover-item-separator{padding:0 4px}.ce-popover--inline .ce-popover-item-separator__line{height:100%;width:1px}.ce-popover--inline .ce-popover-item{border-radius:4px;padding:4px}.ce-popover--inline .ce-popover-item__icon--tool{-webkit-box-shadow:none;box-shadow:none;background:transparent;margin-right:0}.ce-popover--inline .ce-popover-item__icon{width:auto;width:initial;height:auto;height:initial}.ce-popover--inline .ce-popover-item__icon svg{width:20px;height:20px}@media (max-width: 650px){.ce-popover--inline .ce-popover-item__icon svg{width:28px;height:28px}}.ce-popover--inline .ce-popover-item:not(:last-of-type){margin-bottom:0;margin-bottom:initial}.ce-popover--inline .ce-popover-item-html{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ce-popover--inline .ce-popover-item__icon--chevron-right{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.ce-popover--inline .ce-popover--nested-level-1 .ce-popover__container{--offset: 3px;left:0;top:calc(var(--height) + var(--offset))}@media (max-width: 650px){.ce-popover--inline .ce-popover--nested-level-1 .ce-popover__container{top:calc(var(--height-mobile) + var(--offset))}}.ce-popover--inline .ce-popover--nested .ce-popover__container{min-width:var(--width);width:var(--width);height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;padding:6px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.ce-popover--inline .ce-popover--nested .ce-popover__items{display:block;width:100%}.ce-popover--inline .ce-popover--nested .ce-popover-item{border-radius:6px;padding:3px}@media (max-width: 650px){.ce-popover--inline .ce-popover--nested .ce-popover-item{padding:4px}}.ce-popover--inline .ce-popover--nested .ce-popover-item__icon--tool{margin-right:4px}.ce-popover--inline .ce-popover--nested .ce-popover-item__icon{width:26px;height:26px}.ce-popover--inline .ce-popover--nested .ce-popover-item-separator{padding:4px 3px}.ce-popover--inline .ce-popover--nested .ce-popover-item-separator__line{width:100%;height:1px}.codex-editor [data-placeholder]:empty:before,.codex-editor [data-placeholder][data-empty=true]:before{pointer-events:none;color:#707684;cursor:text;content:attr(data-placeholder)}.codex-editor [data-placeholder-active]:empty:before,.codex-editor [data-placeholder-active][data-empty=true]:before{pointer-events:none;color:#707684;cursor:text}.codex-editor [data-placeholder-active]:empty:focus:before,.codex-editor [data-placeholder-active][data-empty=true]:focus:before{content:attr(data-placeholder-active)}
|
|
63
|
+
`;class OS extends ze{constructor(){super(...arguments),this.isMobile=!1,this.contentRectCache=null,this.resizeDebouncer=nf(()=>{this.windowResize()},200),this.selectionChangeDebounced=nf(()=>{this.selectionChanged()},pS),this.documentTouchedListener=e=>{this.documentTouched(e)}}get CSS(){return{editorWrapper:"codex-editor",editorWrapperNarrow:"codex-editor--narrow",editorZone:"codex-editor__redactor",editorZoneHidden:"codex-editor__redactor--hidden",editorEmpty:"codex-editor--empty",editorRtlFix:"codex-editor--rtl"}}get contentRect(){if(this.contentRectCache!==null)return this.contentRectCache;const e=this.nodes.wrapper.querySelector(`.${jn.CSS.content}`);return e?(this.contentRectCache=e.getBoundingClientRect(),this.contentRectCache):{width:650,left:0,right:0}}async prepare(){this.setIsMobile(),this.make(),this.loadStyles()}toggleReadOnly(e){e?this.unbindReadOnlySensitiveListeners():window.requestIdleCallback(()=>{this.bindReadOnlySensitiveListeners()},{timeout:2e3})}checkEmptiness(){const{BlockManager:e}=this.Editor;this.nodes.wrapper.classList.toggle(this.CSS.editorEmpty,e.isEditorEmpty)}get someToolbarOpened(){const{Toolbar:e,BlockSettings:t,InlineToolbar:r}=this.Editor;return!!(t.opened||r.opened||e.toolbox.opened)}get someFlipperButtonFocused(){return this.Editor.Toolbar.toolbox.hasFocus()?!0:Object.entries(this.Editor).filter(([e,t])=>t.flipper instanceof _s).some(([e,t])=>t.flipper.hasFocus())}destroy(){this.nodes.holder.innerHTML="",this.unbindReadOnlyInsensitiveListeners()}closeAllToolbars(){const{Toolbar:e,BlockSettings:t,InlineToolbar:r}=this.Editor;t.close(),r.close(),e.toolbox.close()}setIsMobile(){const e=window.innerWidth<of;e!==this.isMobile&&this.eventsDispatcher.emit(na,{isEnabled:this.isMobile}),this.isMobile=e}make(){this.nodes.holder=Q.getHolder(this.config.holder),this.nodes.wrapper=Q.make("div",[this.CSS.editorWrapper,...this.isRtl?[this.CSS.editorRtlFix]:[]]),this.nodes.redactor=Q.make("div",this.CSS.editorZone),this.nodes.holder.offsetWidth<this.contentRect.width&&this.nodes.wrapper.classList.add(this.CSS.editorWrapperNarrow),this.nodes.redactor.style.paddingBottom=this.config.minHeight+"px",this.nodes.wrapper.appendChild(this.nodes.redactor),this.nodes.holder.appendChild(this.nodes.wrapper),this.bindReadOnlyInsensitiveListeners()}loadStyles(){const e="editor-js-styles";if(Q.get(e))return;const t=Q.make("style",null,{id:e,textContent:DS.toString()});this.config.style&&!Zt(this.config.style)&&this.config.style.nonce&&t.setAttribute("nonce",this.config.style.nonce),Q.prepend(document.head,t)}bindReadOnlyInsensitiveListeners(){this.listeners.on(document,"selectionchange",this.selectionChangeDebounced),this.listeners.on(window,"resize",this.resizeDebouncer,{passive:!0}),this.listeners.on(this.nodes.redactor,"mousedown",this.documentTouchedListener,{capture:!0,passive:!0}),this.listeners.on(this.nodes.redactor,"touchstart",this.documentTouchedListener,{capture:!0,passive:!0})}unbindReadOnlyInsensitiveListeners(){this.listeners.off(document,"selectionchange",this.selectionChangeDebounced),this.listeners.off(window,"resize",this.resizeDebouncer),this.listeners.off(this.nodes.redactor,"mousedown",this.documentTouchedListener),this.listeners.off(this.nodes.redactor,"touchstart",this.documentTouchedListener)}bindReadOnlySensitiveListeners(){this.readOnlyMutableListeners.on(this.nodes.redactor,"click",e=>{this.redactorClicked(e)},!1),this.readOnlyMutableListeners.on(document,"keydown",e=>{this.documentKeydown(e)},!0),this.readOnlyMutableListeners.on(document,"mousedown",e=>{this.documentClicked(e)},!0),this.watchBlockHoveredEvents(),this.enableInputsEmptyMark()}watchBlockHoveredEvents(){let e;this.readOnlyMutableListeners.on(this.nodes.redactor,"mousemove",Hl(t=>{const r=t.target.closest(".ce-block");this.Editor.BlockSelection.anyBlockSelected||r&&e!==r&&(e=r,this.eventsDispatcher.emit(Of,{block:this.Editor.BlockManager.getBlockByChildNode(r)}))},20),{passive:!0})}unbindReadOnlySensitiveListeners(){this.readOnlyMutableListeners.clearAll()}windowResize(){this.contentRectCache=null,this.setIsMobile()}documentKeydown(e){switch(e.keyCode){case Me.ENTER:this.enterPressed(e);break;case Me.BACKSPACE:case Me.DELETE:this.backspacePressed(e);break;case Me.ESC:this.escapePressed(e);break;default:this.defaultBehaviour(e);break}}defaultBehaviour(e){const{currentBlock:t}=this.Editor.BlockManager,r=e.target.closest(`.${this.CSS.editorWrapper}`),a=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;if(t!==void 0&&r===null){this.Editor.BlockEvents.keydown(e);return}r||t&&a||(this.Editor.BlockManager.unsetCurrentBlock(),this.Editor.Toolbar.close())}backspacePressed(e){const{BlockManager:t,BlockSelection:r,Caret:a}=this.Editor;if(r.anyBlockSelected&&!Se.isSelectionExists){const s=t.removeSelectedBlocks(),i=t.insertDefaultBlockAtIndex(s,!0);a.setToBlock(i,a.positions.START),r.clearSelection(e),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()}}escapePressed(e){this.Editor.BlockSelection.clearSelection(e),this.Editor.Toolbar.toolbox.opened?(this.Editor.Toolbar.toolbox.close(),this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock,this.Editor.Caret.positions.END)):this.Editor.BlockSettings.opened?this.Editor.BlockSettings.close():this.Editor.InlineToolbar.opened?this.Editor.InlineToolbar.close():this.Editor.Toolbar.close()}enterPressed(e){const{BlockManager:t,BlockSelection:r}=this.Editor;if(this.someToolbarOpened)return;const a=t.currentBlockIndex>=0;if(r.anyBlockSelected&&!Se.isSelectionExists){r.clearSelection(e),e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation();return}if(!this.someToolbarOpened&&a&&e.target.tagName==="BODY"){const s=this.Editor.BlockManager.insert();e.preventDefault(),this.Editor.Caret.setToBlock(s),this.Editor.Toolbar.moveAndOpen(s)}this.Editor.BlockSelection.clearSelection(e)}documentClicked(e){var t,r;if(!e.isTrusted)return;const a=e.target;this.nodes.holder.contains(a)||Se.isAtEditor||(this.Editor.BlockManager.unsetCurrentBlock(),this.Editor.Toolbar.close());const s=(t=this.Editor.BlockSettings.nodes.wrapper)==null?void 0:t.contains(a),i=(r=this.Editor.Toolbar.nodes.settingsToggler)==null?void 0:r.contains(a),l=s||i;if(this.Editor.BlockSettings.opened&&!l){this.Editor.BlockSettings.close();const c=this.Editor.BlockManager.getBlockByChildNode(a);this.Editor.Toolbar.moveAndOpen(c)}this.Editor.BlockSelection.clearSelection(e)}documentTouched(e){let t=e.target;if(t===this.nodes.redactor){const r=e instanceof MouseEvent?e.clientX:e.touches[0].clientX,a=e instanceof MouseEvent?e.clientY:e.touches[0].clientY;t=document.elementFromPoint(r,a)}try{this.Editor.BlockManager.setCurrentBlockByChildNode(t)}catch{this.Editor.RectangleSelection.isRectActivated()||this.Editor.Caret.setToTheLastBlock()}this.Editor.ReadOnly.isEnabled||this.Editor.Toolbar.moveAndOpen()}redactorClicked(e){if(!Se.isCollapsed)return;const t=e.target,r=e.metaKey||e.ctrlKey;if(Q.isAnchor(t)&&r){e.stopImmediatePropagation(),e.stopPropagation();const a=t.getAttribute("href"),s=oC(a);aC(s);return}this.processBottomZoneClick(e)}processBottomZoneClick(e){const t=this.Editor.BlockManager.getBlockByIndex(-1),r=Q.offset(t.holder).bottom,a=e.pageY,{BlockSelection:s}=this.Editor;if(e.target instanceof Element&&e.target.isEqualNode(this.nodes.redactor)&&!s.anyBlockSelected&&r<a){e.stopImmediatePropagation(),e.stopPropagation();const{BlockManager:i,Caret:l,Toolbar:c}=this.Editor;(!i.lastBlock.tool.isDefault||!i.lastBlock.isEmpty)&&i.insertAtEnd(),l.setToTheLastBlock(),c.moveAndOpen(i.lastBlock)}}selectionChanged(){const{CrossBlockSelection:e,BlockSelection:t}=this.Editor,r=Se.anchorElement;if(e.isCrossBlockSelectionStarted&&t.anyBlockSelected&&Se.get().removeAllRanges(),!r){Se.range||this.Editor.InlineToolbar.close();return}const a=r.closest(`.${jn.CSS.content}`);(a===null||a.closest(`.${Se.CSS.editorWrapper}`)!==this.nodes.wrapper)&&(this.Editor.InlineToolbar.containsNode(r)||this.Editor.InlineToolbar.close(),r.dataset.inlineToolbar!=="true")||(this.Editor.BlockManager.currentBlock||this.Editor.BlockManager.setCurrentBlockByChildNode(r),this.Editor.InlineToolbar.tryToShow(!0))}enableInputsEmptyMark(){function e(t){const r=t.target;rf(r)}this.readOnlyMutableListeners.on(this.nodes.wrapper,"input",e),this.readOnlyMutableListeners.on(this.nodes.wrapper,"focusin",e),this.readOnlyMutableListeners.on(this.nodes.wrapper,"focusout",e)}}const AS={BlocksAPI:gC,CaretAPI:bC,EventsAPI:kC,I18nAPI:vC,API:wC,InlineToolbarAPI:_C,ListenersAPI:CC,NotifierAPI:BC,ReadOnlyAPI:TC,SanitizerAPI:NC,SaverAPI:PC,SelectionAPI:LC,ToolsAPI:zC,StylesAPI:FC,ToolbarAPI:RC,TooltipAPI:UC,UiAPI:WC,BlockSettings:b2,Toolbar:x2,InlineToolbar:B2,BlockEvents:aS,BlockManager:lS,BlockSelection:cS,Caret:dS,CrossBlockSelection:uS,DragNDrop:hS,ModificationsObserver:mS,Paste:gS,ReadOnly:yS,RectangleSelection:bS,Renderer:kS,Saver:vS,Tools:bm,UI:OS};class IS{constructor(e){this.moduleInstances={},this.eventsDispatcher=new ea;let t,r;this.isReady=new Promise((a,s)=>{t=a,r=s}),Promise.resolve().then(async()=>{this.configuration=e,this.validate(),this.init(),await this.start(),await this.render();const{BlockManager:a,Caret:s,UI:i,ModificationsObserver:l}=this.moduleInstances;i.checkEmptiness(),l.enable(),this.configuration.autofocus===!0&&this.configuration.readOnly!==!0&&s.setToBlock(a.blocks[0],s.positions.START),t()}).catch(a=>{Ye(`Editor.js is not ready because of ${a}`,"error"),r(a)})}set configuration(e){var t,r;_t(e)?this.config={...e}:this.config={holder:e},Ul(!!this.config.holderId,"config.holderId","config.holder"),this.config.holderId&&!this.config.holder&&(this.config.holder=this.config.holderId,this.config.holderId=null),this.config.holder==null&&(this.config.holder="editorjs"),this.config.logLevel||(this.config.logLevel=Qp.VERBOSE),Q_(this.config.logLevel),Ul(!!this.config.initialBlock,"config.initialBlock","config.defaultBlock"),this.config.defaultBlock=this.config.defaultBlock||this.config.initialBlock||"paragraph",this.config.minHeight=this.config.minHeight!==void 0?this.config.minHeight:300;const a={type:this.config.defaultBlock,data:{}};this.config.placeholder=this.config.placeholder||!1,this.config.sanitizer=this.config.sanitizer||{p:!0,b:!0,a:!0},this.config.hideToolbar=this.config.hideToolbar?this.config.hideToolbar:!1,this.config.tools=this.config.tools||{},this.config.i18n=this.config.i18n||{},this.config.data=this.config.data||{blocks:[]},this.config.onReady=this.config.onReady||(()=>{}),this.config.onChange=this.config.onChange||(()=>{}),this.config.inlineToolbar=this.config.inlineToolbar!==void 0?this.config.inlineToolbar:!0,(Zt(this.config.data)||!this.config.data.blocks||this.config.data.blocks.length===0)&&(this.config.data={blocks:[a]}),this.config.readOnly=this.config.readOnly||!1,(t=this.config.i18n)!=null&&t.messages&&At.setDictionary(this.config.i18n.messages),this.config.i18n.direction=((r=this.config.i18n)==null?void 0:r.direction)||"ltr"}get configuration(){return this.config}validate(){const{holderId:e,holder:t}=this.config;if(e&&t)throw Error("«holderId» and «holder» param can't assign at the same time.");if(Rn(t)&&!Q.get(t))throw Error(`element with ID «${t}» is missing. Pass correct holder's ID.`);if(t&&_t(t)&&!Q.isElement(t))throw Error("«holder» value must be an Element node")}init(){this.constructModules(),this.configureModules()}async start(){await["Tools","UI","BlockManager","Paste","BlockSelection","RectangleSelection","CrossBlockSelection","ReadOnly"].reduce((e,t)=>e.then(async()=>{try{await this.moduleInstances[t].prepare()}catch(r){if(r instanceof lf)throw new Error(r.message);Ye(`Module ${t} was skipped because of %o`,"warn",r)}}),Promise.resolve())}render(){return this.moduleInstances.Renderer.render(this.config.data.blocks)}constructModules(){Object.entries(AS).forEach(([e,t])=>{try{this.moduleInstances[e]=new t({config:this.configuration,eventsDispatcher:this.eventsDispatcher})}catch(r){Ye("[constructModules]",`Module ${e} skipped because`,"error",r)}})}configureModules(){for(const e in this.moduleInstances)Object.prototype.hasOwnProperty.call(this.moduleInstances,e)&&(this.moduleInstances[e].state=this.getModulesDiff(e))}getModulesDiff(e){const t={};for(const r in this.moduleInstances)r!==e&&(t[r]=this.moduleInstances[r]);return t}}/**
|
|
64
64
|
* Editor.js
|
|
65
65
|
*
|
|
66
66
|
* @license Apache-2.0
|
|
67
67
|
* @see Editor.js <https://editorjs.io>
|
|
68
68
|
* @author CodeX Team <https://codex.so>
|
|
69
|
-
*/class NS{static get version(){return"2.31.0"}constructor(e){let t=()=>{};_t(e)&&tt(e.onReady)&&(t=e.onReady);const r=new IS(e);this.isReady=r.isReady.then(()=>{this.exportAPI(r),t()})}exportAPI(e){const t=["configuration"],r=()=>{Object.values(e.moduleInstances).forEach(a=>{tt(a.destroy)&&a.destroy(),a.listeners.removeAll()}),YC(),e=null;for(const a in this)Object.prototype.hasOwnProperty.call(this,a)&&delete this[a];Object.setPrototypeOf(this,null)};t.forEach(a=>{this[a]=e[a]}),this.destroy=r,Object.setPrototypeOf(this,e.moduleInstances.API.methods),delete this.exportAPI,Object.entries({blocks:{clear:"clear",render:"render"},caret:{focus:"focus"},events:{on:"on",off:"off",emit:"emit"},saver:{save:"save"}}).forEach(([a,s])=>{Object.entries(s).forEach(([i,l])=>{this[l]=e.moduleInstances.API.methods[a][i]})})}}const ia=n=>(n==null?void 0:n.data)&&typeof n.data=="object"&&"text"in n.data,la=n=>(n==null?void 0:n.type)==="list"&&(n==null?void 0:n.data)&&typeof n.data=="object";function PS(n){const e=n==null?void 0:n.items;if(!Array.isArray(e))return 0;const t=r=>r.reduce((a,s)=>{if(typeof s=="string")return a+s.length;if(s&&typeof s=="object"){const i=String(s.content??""),l=Array.isArray(s.items)?s.items:[];return a+i.length+t(l)}return a},0);return t(e)}function km(n,e){const t=[];let r=0;for(const a of n){if(r>=e)break;if(typeof a=="string"){const s=Math.min(a.length,e-r);if(t.push(a.slice(0,s)),r+=s,s<a.length)break;continue}if(a&&typeof a=="object"){const s=String(a.content??""),i=Math.min(s.length,e-r),l={content:s.slice(0,i),meta:a.meta??{},items:[]};if(r+=i,i===s.length&&Array.isArray(a.items)&&r<e){const c=km(a.items,e-r);l.items=c.items,r+=c.used}if(t.push(l),r>=e)break;continue}}return{items:t,used:r}}function
|
|
69
|
+
*/class NS{static get version(){return"2.31.0"}constructor(e){let t=()=>{};_t(e)&&tt(e.onReady)&&(t=e.onReady);const r=new IS(e);this.isReady=r.isReady.then(()=>{this.exportAPI(r),t()})}exportAPI(e){const t=["configuration"],r=()=>{Object.values(e.moduleInstances).forEach(a=>{tt(a.destroy)&&a.destroy(),a.listeners.removeAll()}),YC(),e=null;for(const a in this)Object.prototype.hasOwnProperty.call(this,a)&&delete this[a];Object.setPrototypeOf(this,null)};t.forEach(a=>{this[a]=e[a]}),this.destroy=r,Object.setPrototypeOf(this,e.moduleInstances.API.methods),delete this.exportAPI,Object.entries({blocks:{clear:"clear",render:"render"},caret:{focus:"focus"},events:{on:"on",off:"off",emit:"emit"},saver:{save:"save"}}).forEach(([a,s])=>{Object.entries(s).forEach(([i,l])=>{this[l]=e.moduleInstances.API.methods[a][i]})})}}const ia=n=>(n==null?void 0:n.data)&&typeof n.data=="object"&&"text"in n.data,la=n=>(n==null?void 0:n.type)==="list"&&(n==null?void 0:n.data)&&typeof n.data=="object";function PS(n){const e=n==null?void 0:n.items;if(!Array.isArray(e))return 0;const t=r=>r.reduce((a,s)=>{if(typeof s=="string")return a+s.length;if(s&&typeof s=="object"){const i=String(s.content??""),l=Array.isArray(s.items)?s.items:[];return a+i.length+t(l)}return a},0);return t(e)}function km(n,e){const t=[];let r=0;for(const a of n){if(r>=e)break;if(typeof a=="string"){const s=Math.min(a.length,e-r);if(t.push(a.slice(0,s)),r+=s,s<a.length)break;continue}if(a&&typeof a=="object"){const s=String(a.content??""),i=Math.min(s.length,e-r),l={content:s.slice(0,i),meta:a.meta??{},items:[]};if(r+=i,i===s.length&&Array.isArray(a.items)&&r<e){const c=km(a.items,e-r);l.items=c.items,r+=c.used}if(t.push(l),r>=e)break;continue}}return{items:t,used:r}}function nd(n,e){const t=(n==null?void 0:n.style)??"unordered",r=(n==null?void 0:n.meta)??{},a=Array.isArray(n==null?void 0:n.items)?n.items:[],{items:s}=km(a,Math.max(0,e));return{style:t,meta:r,items:s}}function LS(n){return ia(n)?String(n.data.text??"").length:la(n)?PS(n.data):0}function ca(n){return n.reduce((e,t)=>e+LS(t),0)}async function zS({api:n,limit:e,event:t}){var h;const r=await n.saver.save(),a=ca(r.blocks);if(!t.detail)return Math.min(a,e);if(a<=e)return a;const s=t.detail.target,i=t.detail.index,l=r.blocks.filter(p=>p.id===s.id).pop()??s,c=r.blocks.filter(p=>p.id!==s.id),d=ca(c),u=Math.max(0,e-d);if(la(l)){const p=nd(l.data,u);await n.blocks.update(s.id,p),n.caret.setToBlock(i,"end")}if(ia(l)){const m=String(((h=l==null?void 0:l.data)==null?void 0:h.text)??"").slice(0,u);await n.blocks.update(s.id,{text:m}),n.caret.setToBlock(i,"end")}return n.caret.setToBlock(i,"end"),Math.min(a,e)}async function FS({editor:n,limit:e}){var s,i;let{blocks:t}=await n.saver.save(),r=ca(t);if(r<=e)return r;const a=t.map((l,c)=>({b:l,i:c})).filter(({b:l})=>ia(l)||la(l)).map(({i:l})=>l);for(let l=a.length-1;l>=0&&r>e;l--){const c=a[l],d=t[c],u=t.filter((f,g)=>g!==c),h=ca(u),p=Math.max(0,e-h);if(p<=0)la(d)?await n.blocks.update(d.id,nd(d.data,0)):ia(d)&&await n.blocks.update(d.id,{text:""});else if(la(d)){const f=nd(d.data,p);await n.blocks.update(d.id,f)}else if(ia(d)){const f=String(((s=d.data)==null?void 0:s.text)??"");await n.blocks.update(d.id,{text:f.slice(0,p)})}else continue;t=(await n.saver.save()).blocks,r=ca(t),(i=n.caret)==null||i.setToBlock(c,"end")}return r}async function od(n,e){var i,l;const t=n.blocks.getCurrentBlockIndex(),{blocks:r}=await n.saver.save(),a=r[t];let s="";if(typeof((i=a==null?void 0:a.data)==null?void 0:i.text)=="string"?s=a.data.text:Array.isArray((l=a==null?void 0:a.data)==null?void 0:l.items)&&(s=a.data.items.join(" ")),e==="header")n.blocks.insert("header",{text:s,level:2},void 0,t,!0);else if(e==="list"){const c=s?[s]:[""];n.blocks.insert("list",{items:c,style:"unordered"},void 0,t,!0)}else e==="bold"?n.blocks.insert("paragraph",{text:s,bold:!0},void 0,t,!0):n.blocks.insert("paragraph",{text:s},void 0,t,!0);n.blocks.delete(t+1),n.caret.setToBlock(t)}const vm="http://www.w3.org/2000/svg",RS="http://www.w3.org/1999/xlink";function VS(n){return n===void 0?[]:Array.isArray(n)?n:[n]}function rd(n,e){const t=VS(e).flatMap(r=>r.split(" ").filter(Boolean));t.length&&n.classList.add(...t)}function HS(n,e){e&&(typeof e=="string"?n.setAttribute("style",e):Object.assign(n.style,e))}function Rs(n){var d;const{api:e,text:t,iconName:r}=n,a=document.createElement("button");a.type="button",rd(a,[(d=e==null?void 0:e.styles)==null?void 0:d.inlineToolButton,"editor-tool"].filter(Boolean)),a.setAttribute("aria-label",t);const s=document.createElement("i");rd(s,"editor-tool__icon");const i=document.createElementNS(vm,"svg");rd(i,["foreground-surface-popover-base","editor-tool__svg"]),HS(i,{width:"1.5rem",height:"1.5rem"});const l=document.createElementNS(vm,"use");l.setAttributeNS(null,"href",`#${r}`),l.setAttributeNS(RS,"xlink:href",`#${r}`),i.appendChild(l);const c=document.createElement("p");return c.textContent=t,s.appendChild(i),a.append(s,c),a}function jS(n){const e=(r,a,s)=>Math.max(a,Math.min(s,r)),t=(r,a="unordered")=>{const s=a==="ordered"?"ol":"ul",i=(r||[]).map(l=>{const c=(l==null?void 0:l.content)??"",d=l!=null&&l.items&&l.items.length?t(l.items,a):"";return`<li>${c}${d}</li>`}).join("");return`<${s}>${i}</${s}>`};return(n.blocks||[]).map(r=>{var a;switch(r.type){case"paragraph":return`<p>${((a=r.data)==null?void 0:a.text)??""}</p>`;case"header":{const s=r.data||{},i=e(Number(s.level||2),1,6),l=s.text??"";return`<h${i}>${l}</h${i}>`}case"list":{const s=r.data||{},i=s.style==="ordered"||s.style==="unordered"?s.style:"unordered",l=(s.items||[]).map(c=>typeof c=="string"?{content:c,items:[]}:{content:(c==null?void 0:c.content)??"",items:(c==null?void 0:c.items)??[]});return t(l,i)}default:return""}}).filter(Boolean).join(`
|
|
70
70
|
`)}(function(){try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode(".ce-paragraph{line-height:1.6em;outline:none}.ce-block:only-of-type .ce-paragraph[data-placeholder-active]:empty:before,.ce-block:only-of-type .ce-paragraph[data-placeholder-active][data-empty=true]:before{content:attr(data-placeholder-active)}.ce-paragraph p:first-of-type{margin-top:0}.ce-paragraph p:last-of-type{margin-bottom:0}")),document.head.appendChild(n)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();const YS='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M8 9V7.2C8 7.08954 8.08954 7 8.2 7L12 7M16 9V7.2C16 7.08954 15.9105 7 15.8 7L12 7M12 7L12 17M12 17H10M12 17H14"/></svg>';function US(n){const e=document.createElement("div");e.innerHTML=n.trim();const t=document.createDocumentFragment();return t.append(...Array.from(e.childNodes)),t}/**
|
|
71
71
|
* Base Paragraph Block for the Editor.js.
|
|
72
72
|
* Represents a regular text block
|
|
@@ -74,16 +74,16 @@ Available fill gap methods: `).concat(ae,"."))}},W=function(B){if(B){var ae=s(B)
|
|
|
74
74
|
* @author CodeX (team@codex.so)
|
|
75
75
|
* @copyright CodeX 2018
|
|
76
76
|
* @license The MIT License (MIT)
|
|
77
|
-
*/class
|
|
77
|
+
*/class ad{static get DEFAULT_PLACEHOLDER(){return""}constructor({data:e,config:t,api:r,readOnly:a}){this.api=r,this.readOnly=a,this._CSS={block:this.api.styles.block,wrapper:"ce-paragraph"},this.readOnly||(this.onKeyUp=this.onKeyUp.bind(this)),this._placeholder=t.placeholder?t.placeholder:ad.DEFAULT_PLACEHOLDER,this._data=e??{},this._element=null,this._preserveBlank=t.preserveBlank??!1}onKeyUp(e){if(e.code!=="Backspace"&&e.code!=="Delete"||!this._element)return;const{textContent:t}=this._element;t===""&&(this._element.innerHTML="")}drawView(){const e=document.createElement("DIV");return e.classList.add(this._CSS.wrapper,this._CSS.block),e.contentEditable="false",e.dataset.placeholderActive=this.api.i18n.t(this._placeholder),this._data.text&&(e.innerHTML=this._data.text),this.readOnly||(e.contentEditable="true",e.addEventListener("keyup",this.onKeyUp)),e}render(){return this._element=this.drawView(),this._element}merge(e){if(!this._element)return;this._data.text+=e.text;const t=US(e.text);this._element.appendChild(t),this._element.normalize()}validate(e){return!(e.text.trim()===""&&!this._preserveBlank)}save(e){return{text:e.innerHTML}}onPaste(e){const t={text:e.detail.data.innerHTML};this._data=t,window.requestAnimationFrame(()=>{this._element&&(this._element.innerHTML=this._data.text||"")})}static get conversionConfig(){return{export:"text",import:"text"}}static get sanitize(){return{text:{br:!0}}}static get isReadOnlySupported(){return!0}static get pasteConfig(){return{tags:["P"]}}static get toolbox(){return{icon:YS,title:"Text"}}}class WS extends ad{save(e){return{text:e.innerHTML}}static get sanitize(){return{text:{b:!0,strong:!0,i:!0,em:!0,u:!0,s:!0,a:{href:!0,target:!0,rel:!0},br:!0,span:{class:!0,style:!0}}}}}class qS{constructor({api:e}){pe(this,"button");pe(this,"api");this.api=e}static get isInline(){return!0}static get title(){return"Сделать заголовок"}render(){return this.button=Rs({api:this.api,text:"Заголовок",iconName:"outline-h2"}),this.button}async surround(){await od(this.api,"header")}}class GS{constructor({api:e}){pe(this,"button");pe(this,"api");this.api=e}static get isInline(){return!0}static get title(){return"Сделать список"}render(){return this.button=Rs({api:this.api,text:"Список",iconName:"outline-list"}),this.button}async surround(){await od(this.api,"list")}}class KS{constructor({api:e}){pe(this,"button");pe(this,"api");this.api=e}static get isInline(){return!0}static get title(){return"Сделать параграф"}render(){return this.button=Rs({api:this.api,text:"Текст",iconName:"outline-text"}),this.button}async surround(){await od(this.api,"paragraph")}}class XS{constructor({api:e}){pe(this,"api");pe(this,"button");this.api=e}static get isInline(){return!0}static get title(){return"Выделить текст"}render(){return this.button=Rs({api:this.api,text:"Жирный текст",iconName:"outline-text-bold"}),this.button}toggleBoldManually(e){const t=this.api.selection.findParentTag("STRONG")||this.api.selection.findParentTag("B");if(t){this.unwrap(t);return}this.wrap(e)}normalizeBoldIn(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{var l;if(!(a instanceof HTMLElement))return NodeFilter.FILTER_SKIP;const s=a.tagName;if(s==="STRONG"||s==="B")return NodeFilter.FILTER_SKIP;const i=(((l=a.style)==null?void 0:l.fontWeight)||"").toLowerCase();return i==="bold"||i==="bolder"||parseInt(i)>=600?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),r=[];for(;t.nextNode();)r.push(t.currentNode);for(const a of r){const s=document.createElement("strong");for(;a.firstChild;)s.appendChild(a.firstChild);a.replaceWith(s)}}surround(){var s;const e=window.getSelection();if(!e||e.rangeCount===0)return;const t=e.getRangeAt(0);if(t.collapsed)return;let r=!1;try{document.execCommand("bold"),r=!0}catch{r=!1}if(!r)try{this.toggleBoldManually(t)}catch{}const a=(s=this.api.blocks.getBlockByIndex(this.api.blocks.getCurrentBlockIndex()))==null?void 0:s.holder;a&&this.normalizeBoldIn(a)}wrap(e){const t=document.createElement("strong");try{e.surroundContents(t),this.api.selection.expandToTag(t)}catch{}}unwrap(e){this.api.selection.expandToTag(e);const t=window.getSelection();if(!t||t.rangeCount===0)return;const a=t.getRangeAt(0).extractContents();e.replaceWith(a)}}(function(){try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode(".ce-header{padding:.6em 0 3px;margin:0;line-height:1.25em;outline:none}.ce-header p,.ce-header div{padding:0!important;margin:0!important}")),document.head.appendChild(n)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();const QS='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M19 17V10.2135C19 10.1287 18.9011 10.0824 18.836 10.1367L16 12.5"/></svg>',ZS='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16 11C16 10 19 9.5 19 12C19 13.9771 16.0684 13.9997 16.0012 16.8981C15.9999 16.9533 16.0448 17 16.1 17L19.3 17"/></svg>',JS='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16 11C16 10.5 16.8323 10 17.6 10C18.3677 10 19.5 10.311 19.5 11.5C19.5 12.5315 18.7474 12.9022 18.548 12.9823C18.5378 12.9864 18.5395 13.0047 18.5503 13.0063C18.8115 13.0456 20 13.3065 20 14.8C20 16 19.5 17 17.8 17C17.8 17 16 17 16 16.3"/></svg>',ex='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M18 10L15.2834 14.8511C15.246 14.9178 15.294 15 15.3704 15C16.8489 15 18.7561 15 20.2 15M19 17C19 15.7187 19 14.8813 19 13.6"/></svg>',tx='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16 15.9C16 15.9 16.3768 17 17.8 17C19.5 17 20 15.6199 20 14.7C20 12.7323 17.6745 12.0486 16.1635 12.9894C16.094 13.0327 16 12.9846 16 12.9027V10.1C16 10.0448 16.0448 10 16.1 10H19.8"/></svg>',nx='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M19.5 10C16.5 10.5 16 13.3285 16 15M16 15V15C16 16.1046 16.8954 17 18 17H18.3246C19.3251 17 20.3191 16.3492 20.2522 15.3509C20.0612 12.4958 16 12.6611 16 15Z"/></svg>',ox='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M9 7L9 12M9 17V12M9 12L15 12M15 7V12M15 17L15 12"/></svg>';/**
|
|
78
78
|
* Header block for the Editor.js.
|
|
79
79
|
*
|
|
80
80
|
* @author CodeX (team@ifmo.su)
|
|
81
81
|
* @copyright CodeX 2018
|
|
82
82
|
* @license MIT
|
|
83
83
|
* @version 2.0.0
|
|
84
|
-
*/let rx=class{constructor({data:e,config:t,api:r,readOnly:a}){this.api=r,this.readOnly=a,this._settings=t,this._data=this.normalizeData(e),this._element=this.getTag()}get _CSS(){return{block:this.api.styles.block,wrapper:"ce-header"}}isHeaderData(e){return e.text!==void 0}normalizeData(e){const t={text:"",level:this.defaultLevel.number};return this.isHeaderData(e)&&(t.text=e.text||"",e.level!==void 0&&!isNaN(parseInt(e.level.toString()))&&(t.level=parseInt(e.level.toString()))),t}render(){return this._element}renderSettings(){return this.levels.map(e=>({icon:e.svg,label:this.api.i18n.t(`Heading ${e.number}`),onActivate:()=>this.setLevel(e.number),closeOnActivate:!0,isActive:this.currentLevel.number===e.number,render:()=>document.createElement("div")}))}setLevel(e){this.data={level:e,text:this.data.text}}merge(e){this._element.insertAdjacentHTML("beforeend",e.text)}validate(e){return e.text.trim()!==""}save(e){return{text:e.innerHTML,level:this.currentLevel.number}}static get conversionConfig(){return{export:"text",import:"text"}}static get sanitize(){return{level:!1,text:{}}}static get isReadOnlySupported(){return!0}get data(){return this._data.text=this._element.innerHTML,this._data.level=this.currentLevel.number,this._data}set data(e){if(this._data=this.normalizeData(e),e.level!==void 0&&this._element.parentNode){const t=this.getTag();t.innerHTML=this._element.innerHTML,this._element.parentNode.replaceChild(t,this._element),this._element=t}e.text!==void 0&&(this._element.innerHTML=this._data.text||"")}getTag(){const e=document.createElement(this.currentLevel.tag);return e.innerHTML=this._data.text||"",e.classList.add(this._CSS.wrapper),e.contentEditable=this.readOnly?"false":"true",e.dataset.placeholder=this.api.i18n.t(this._settings.placeholder||""),e}get currentLevel(){let e=this.levels.find(t=>t.number===this._data.level);return e||(e=this.defaultLevel),e}get defaultLevel(){if(this._settings.defaultLevel){const e=this.levels.find(t=>t.number===this._settings.defaultLevel);if(e)return e;console.warn("(ง'̀-'́)ง Heading Tool: the default level specified was not found in available levels")}return this.levels[1]}get levels(){const e=[{number:1,tag:"H1",svg:QS},{number:2,tag:"H2",svg:ZS},{number:3,tag:"H3",svg:JS},{number:4,tag:"H4",svg:ex},{number:5,tag:"H5",svg:tx},{number:6,tag:"H6",svg:nx}];return this._settings.levels?e.filter(t=>this._settings.levels.includes(t.number)):e}onPaste(e){const t=e.detail;if("data"in t){const r=t.data;let a=this.defaultLevel.number;switch(r.tagName){case"H1":a=1;break;case"H2":a=2;break;case"H3":a=3;break;case"H4":a=4;break;case"H5":a=5;break;case"H6":a=6;break}this._settings.levels&&(a=this._settings.levels.reduce((s,i)=>Math.abs(i-a)<Math.abs(s-a)?i:s)),this.data={level:a,text:r.innerHTML}}}static get pasteConfig(){return{tags:["H1","H2","H3","H4","H5","H6"]}}static get toolbox(){return{icon:ox,title:"Heading"}}};(function(){try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode('.cdx-list{margin:0;padding:0;outline:none;display:grid;counter-reset:item;gap:var(--spacing-s);padding:var(--spacing-xs);--spacing-s: 8px;--spacing-xs: 6px;--list-counter-type: numeric;--radius-border: 5px;--checkbox-background: #fff;--color-border: #C9C9C9;--color-bg-checked: #369FFF;--line-height: 1.45em;--color-bg-checked-hover: #0059AB;--color-tick: #fff;--size-checkbox: 1.2em}.cdx-list__item{line-height:var(--line-height);display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;grid-template-areas:"checkbox content" ". child"}.cdx-list__item-children{display:grid;grid-area:child;gap:var(--spacing-s);padding-top:var(--spacing-s)}.cdx-list__item [contenteditable]{outline:none}.cdx-list__item-content{word-break:break-word;white-space:pre-wrap;grid-area:content;padding-left:var(--spacing-s)}.cdx-list__item:before{counter-increment:item;white-space:nowrap}.cdx-list-ordered .cdx-list__item:before{content:counters(item,".",var(--list-counter-type)) "."}.cdx-list-ordered{counter-reset:item}.cdx-list-unordered .cdx-list__item:before{content:"•"}.cdx-list-checklist .cdx-list__item:before{content:""}.cdx-list__settings .cdx-settings-button{width:50%}.cdx-list__checkbox{padding-top:calc((var(--line-height) - var(--size-checkbox)) / 2);grid-area:checkbox;width:var(--size-checkbox);height:var(--size-checkbox);display:flex;cursor:pointer}.cdx-list__checkbox svg{opacity:0;height:var(--size-checkbox);width:var(--size-checkbox);left:-1px;top:-1px;position:absolute}@media (hover: hover){.cdx-list__checkbox:not(.cdx-list__checkbox--no-hover):hover .cdx-list__checkbox-check svg{opacity:1}}.cdx-list__checkbox--checked{line-height:var(--line-height)}@media (hover: hover){.cdx-list__checkbox--checked:not(.cdx-list__checkbox--checked--no-hover):hover .cdx-checklist__checkbox-check{background:var(--color-bg-checked-hover);border-color:var(--color-bg-checked-hover)}}.cdx-list__checkbox--checked .cdx-list__checkbox-check{background:var(--color-bg-checked);border-color:var(--color-bg-checked)}.cdx-list__checkbox--checked .cdx-list__checkbox-check svg{opacity:1}.cdx-list__checkbox--checked .cdx-list__checkbox-check svg path{stroke:var(--color-tick)}.cdx-list__checkbox--checked .cdx-list__checkbox-check:before{opacity:0;visibility:visible;transform:scale(2.5)}.cdx-list__checkbox-check{cursor:pointer;display:inline-block;position:relative;margin:0 auto;width:var(--size-checkbox);height:var(--size-checkbox);box-sizing:border-box;border-radius:var(--radius-border);border:1px solid var(--color-border);background:var(--checkbox-background)}.cdx-list__checkbox-check:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:100%;background-color:var(--color-bg-checked);visibility:hidden;pointer-events:none;transform:scale(1);transition:transform .4s ease-out,opacity .4s}.cdx-list-start-with-field{background:#F8F8F8;border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:2px;display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:auto}.cdx-list-start-with-field--invalid{background:#FFECED;border:1px solid #E13F3F}.cdx-list-start-with-field--invalid .cdx-list-start-with-field__input{color:#e13f3f}.cdx-list-start-with-field__input{font-size:14px;outline:none;font-weight:500;font-family:inherit;border:0;background:transparent;margin:0;padding:0;line-height:22px;min-width:calc(100% - var(--toolbox-buttons-size) - var(--icon-margin-right))}.cdx-list-start-with-field__input::placeholder{color:var(--grayText);font-weight:500}')),document.head.appendChild(n)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();const ax='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7 12L10.4884 15.8372C10.5677 15.9245 10.705 15.9245 10.7844 15.8372L17 9"/></svg>',wm='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M9.2 12L11.0586 13.8586C11.1367 13.9367 11.2633 13.9367 11.3414 13.8586L14.7 10.5"/><rect width="14" height="14" x="5" y="5" stroke="currentColor" stroke-width="2" rx="4"/></svg>',_m='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><line x1="9" x2="19" y1="7" y2="7" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><line x1="9" x2="19" y1="12" y2="12" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><line x1="9" x2="19" y1="17" y2="17" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M5.00001 17H4.99002"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M5.00001 12H4.99002"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M5.00001 7H4.99002"/></svg>',Cm='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><line x1="12" x2="19" y1="7" y2="7" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><line x1="12" x2="19" y1="12" y2="12" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><line x1="12" x2="19" y1="17" y2="17" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7.79999 14L7.79999 7.2135C7.79999 7.12872 7.7011 7.0824 7.63597 7.13668L4.79999 9.5"/></svg>',sx='<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 14.2L10 7.4135C10 7.32872 9.90111 7.28241 9.83598 7.33668L7 9.7" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M13.2087 14.2H13.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>',ix='<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.2087 14.2H13.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M10 14.2L10 9.5" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M10 7.01L10 7" stroke="black" stroke-width="1.8" stroke-linecap="round"/></svg>',lx='<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.2087 14.2H13.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M10 14.2L10 7.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>',cx='<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.0087 14.2H16" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M7 14.2L7.78865 12M13 14.2L12.1377 12M7.78865 12C7.78865 12 9.68362 7 10 7C10.3065 7 12.1377 12 12.1377 12M7.78865 12L12.1377 12" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>',dx='<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.2087 14.2H14.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M11.5 14.5C11.5 14.5 11 13.281 11 12.5M7 9.5C7 9.5 7.5 8.5 9 8.5C10.5 8.5 11 9.5 11 10.5L11 11.5M11 11.5L11 12.5M11 11.5C11 11.5 7 11 7 13C7 15.3031 11 15 11 12.5" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>',ux='<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8 14.2L8 7.4135C8 7.32872 7.90111 7.28241 7.83598 7.33668L5 9.7" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M14 13L16.4167 10.7778M16.4167 10.7778L14 8.5M16.4167 10.7778H11.6562" stroke="black" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>';var Vs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hx(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var a=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return n[r]}})}),t}var Ge={},ad={},sd={};Object.defineProperty(sd,"__esModule",{value:!0}),sd.allInputsSelector=px;function px(){var n=["text","password","email","number","search","tel","url"];return"[contenteditable=true], textarea, input:not([type]), "+n.map(function(e){return'input[type="'.concat(e,'"]')}).join(", ")}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.allInputsSelector=void 0;var e=sd;Object.defineProperty(n,"allInputsSelector",{enumerable:!0,get:function(){return e.allInputsSelector}})})(ad);var zo={},id={};Object.defineProperty(id,"__esModule",{value:!0}),id.isNativeInput=fx;function fx(n){var e=["INPUT","TEXTAREA"];return n&&n.tagName?e.includes(n.tagName):!1}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isNativeInput=void 0;var e=id;Object.defineProperty(n,"isNativeInput",{enumerable:!0,get:function(){return e.isNativeInput}})})(zo);var Em={},ld={};Object.defineProperty(ld,"__esModule",{value:!0}),ld.append=mx;function mx(n,e){Array.isArray(e)?e.forEach(function(t){n.appendChild(t)}):n.appendChild(e)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.append=void 0;var e=ld;Object.defineProperty(n,"append",{enumerable:!0,get:function(){return e.append}})})(Em);var cd={},dd={};Object.defineProperty(dd,"__esModule",{value:!0}),dd.blockElements=gx;function gx(){return["address","article","aside","blockquote","canvas","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","ruby","section","table","tbody","thead","tr","tfoot","ul","video"]}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.blockElements=void 0;var e=dd;Object.defineProperty(n,"blockElements",{enumerable:!0,get:function(){return e.blockElements}})})(cd);var Sm={},ud={};Object.defineProperty(ud,"__esModule",{value:!0}),ud.calculateBaseline=yx;function yx(n){var e=window.getComputedStyle(n),t=parseFloat(e.fontSize),r=parseFloat(e.lineHeight)||t*1.2,a=parseFloat(e.paddingTop),s=parseFloat(e.borderTopWidth),i=parseFloat(e.marginTop),l=t*.8,c=(r-t)/2,d=i+s+a+c+l;return d}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.calculateBaseline=void 0;var e=ud;Object.defineProperty(n,"calculateBaseline",{enumerable:!0,get:function(){return e.calculateBaseline}})})(Sm);var xm={},hd={},pd={},fd={};Object.defineProperty(fd,"__esModule",{value:!0}),fd.isContentEditable=bx;function bx(n){return n.contentEditable==="true"}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isContentEditable=void 0;var e=fd;Object.defineProperty(n,"isContentEditable",{enumerable:!0,get:function(){return e.isContentEditable}})})(pd),Object.defineProperty(hd,"__esModule",{value:!0}),hd.canSetCaret=wx;var kx=zo,vx=pd;function wx(n){var e=!0;if((0,kx.isNativeInput)(n))switch(n.type){case"file":case"checkbox":case"radio":case"hidden":case"submit":case"button":case"image":case"reset":e=!1;break}else e=(0,vx.isContentEditable)(n);return e}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.canSetCaret=void 0;var e=hd;Object.defineProperty(n,"canSetCaret",{enumerable:!0,get:function(){return e.canSetCaret}})})(xm);var Hs={},md={};function _x(n,e,t){const r=t.value!==void 0?"value":"get",a=t[r],s=`#${e}Cache`;if(t[r]=function(...i){return this[s]===void 0&&(this[s]=a.apply(this,i)),this[s]},r==="get"&&t.set){const i=t.set;t.set=function(l){delete n[s],i.apply(this,l)}}return t}function Bm(){const n={win:!1,mac:!1,x11:!1,linux:!1},e=Object.keys(n).find(t=>window.navigator.appVersion.toLowerCase().indexOf(t)!==-1);return e!==void 0&&(n[e]=!0),n}function gd(n){return n!=null&&n!==""&&(typeof n!="object"||Object.keys(n).length>0)}function Cx(n){return!gd(n)}const Ex=()=>typeof window<"u"&&window.navigator!==null&&gd(window.navigator.platform)&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1);function Sx(n){const e=Bm();return n=n.replace(/shift/gi,"⇧").replace(/backspace/gi,"⌫").replace(/enter/gi,"⏎").replace(/up/gi,"↑").replace(/left/gi,"→").replace(/down/gi,"↓").replace(/right/gi,"←").replace(/escape/gi,"⎋").replace(/insert/gi,"Ins").replace(/delete/gi,"␡").replace(/\+/gi,"+"),e.mac?n=n.replace(/ctrl|cmd/gi,"⌘").replace(/alt/gi,"⌥"):n=n.replace(/cmd/gi,"Ctrl").replace(/windows/gi,"WIN"),n}function xx(n){return n[0].toUpperCase()+n.slice(1)}function Bx(n){const e=document.createElement("div");e.style.position="absolute",e.style.left="-999px",e.style.bottom="-999px",e.innerHTML=n,document.body.appendChild(e);const t=window.getSelection(),r=document.createRange();if(r.selectNode(e),t===null)throw new Error("Cannot copy text to clipboard");t.removeAllRanges(),t.addRange(r),document.execCommand("copy"),document.body.removeChild(e)}function Tx(n,e,t){let r;return(...a)=>{const s=this,i=()=>{r=void 0,t!==!0&&n.apply(s,a)},l=t===!0&&r!==void 0;window.clearTimeout(r),r=window.setTimeout(i,e),l&&n.apply(s,a)}}function po(n){return Object.prototype.toString.call(n).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function $x(n){return po(n)==="boolean"}function Tm(n){return po(n)==="function"||po(n)==="asyncfunction"}function Mx(n){return Tm(n)&&/^\s*class\s+/.test(n.toString())}function Dx(n){return po(n)==="number"}function js(n){return po(n)==="object"}function Ox(n){return Promise.resolve(n)===n}function Ax(n){return po(n)==="string"}function Ix(n){return po(n)==="undefined"}function yd(n,...e){if(!e.length)return n;const t=e.shift();if(js(n)&&js(t))for(const r in t)js(t[r])?(n[r]===void 0&&Object.assign(n,{[r]:{}}),yd(n[r],t[r])):Object.assign(n,{[r]:t[r]});return yd(n,...e)}function Nx(n,e,t){const r=`«${e}» is deprecated and will be removed in the next major release. Please use the «${t}» instead.`;n&&console.warn(r)}function Px(n){try{return new URL(n).href}catch{}return n.substring(0,2)==="//"?window.location.protocol+n:window.location.origin+n}function Lx(n){return n>47&&n<58||n===32||n===13||n===229||n>64&&n<91||n>95&&n<112||n>185&&n<193||n>218&&n<223}const zx={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,LEFT:37,UP:38,DOWN:40,RIGHT:39,DELETE:46,META:91,SLASH:191},Fx={LEFT:0,WHEEL:1,RIGHT:2,BACKWARD:3,FORWARD:4};class Rx{constructor(){this.completed=Promise.resolve()}add(e){return new Promise((t,r)=>{this.completed=this.completed.then(e).then(t).catch(r)})}}function Vx(n,e,t=void 0){let r,a,s,i=null,l=0;t||(t={});const c=function(){l=t.leading===!1?0:Date.now(),i=null,s=n.apply(r,a),i===null&&(r=a=null)};return function(){const d=Date.now();!l&&t.leading===!1&&(l=d);const u=e-(d-l);return r=this,a=arguments,u<=0||u>e?(i&&(clearTimeout(i),i=null),l=d,s=n.apply(r,a),i===null&&(r=a=null)):!i&&t.trailing!==!1&&(i=setTimeout(c,u)),s}}const Hx=Object.freeze(Object.defineProperty({__proto__:null,PromiseQueue:Rx,beautifyShortcut:Sx,cacheable:_x,capitalize:xx,copyTextToClipboard:Bx,debounce:Tx,deepMerge:yd,deprecationAssert:Nx,getUserOS:Bm,getValidUrl:Px,isBoolean:$x,isClass:Mx,isEmpty:Cx,isFunction:Tm,isIosDevice:Ex,isNumber:Dx,isObject:js,isPrintableKey:Lx,isPromise:Ox,isString:Ax,isUndefined:Ix,keyCodes:zx,mouseButtons:Fx,notEmpty:gd,throttle:Vx,typeOf:po},Symbol.toStringTag,{value:"Module"})),bd=hx(Hx);Object.defineProperty(md,"__esModule",{value:!0}),md.containsOnlyInlineElements=Ux;var jx=bd,Yx=cd;function Ux(n){var e;(0,jx.isString)(n)?(e=document.createElement("div"),e.innerHTML=n):e=n;var t=function(r){return!(0,Yx.blockElements)().includes(r.tagName.toLowerCase())&&Array.from(r.children).every(t)};return Array.from(e.children).every(t)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.containsOnlyInlineElements=void 0;var e=md;Object.defineProperty(n,"containsOnlyInlineElements",{enumerable:!0,get:function(){return e.containsOnlyInlineElements}})})(Hs);var $m={},kd={},Ys={},vd={};Object.defineProperty(vd,"__esModule",{value:!0}),vd.make=Wx;function Wx(n,e,t){var r;e===void 0&&(e=null),t===void 0&&(t={});var a=document.createElement(n);if(Array.isArray(e)){var s=e.filter(function(l){return l!==void 0});(r=a.classList).add.apply(r,s)}else e!==null&&a.classList.add(e);for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(a[i]=t[i]);return a}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.make=void 0;var e=vd;Object.defineProperty(n,"make",{enumerable:!0,get:function(){return e.make}})})(Ys),Object.defineProperty(kd,"__esModule",{value:!0}),kd.fragmentToString=Gx;var qx=Ys;function Gx(n){var e=(0,qx.make)("div");return e.appendChild(n),e.innerHTML}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.fragmentToString=void 0;var e=kd;Object.defineProperty(n,"fragmentToString",{enumerable:!0,get:function(){return e.fragmentToString}})})($m);var Mm={},wd={};Object.defineProperty(wd,"__esModule",{value:!0}),wd.getContentLength=Xx;var Kx=zo;function Xx(n){var e,t;return(0,Kx.isNativeInput)(n)?n.value.length:n.nodeType===Node.TEXT_NODE?n.length:(t=(e=n.textContent)===null||e===void 0?void 0:e.length)!==null&&t!==void 0?t:0}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getContentLength=void 0;var e=wd;Object.defineProperty(n,"getContentLength",{enumerable:!0,get:function(){return e.getContentLength}})})(Mm);var _d={},Cd={},Dm=Vs&&Vs.__spreadArray||function(n,e,t){if(t||arguments.length===2)for(var r=0,a=e.length,s;r<a;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return n.concat(s||Array.prototype.slice.call(e))};Object.defineProperty(Cd,"__esModule",{value:!0}),Cd.getDeepestBlockElements=Om;var Qx=Hs;function Om(n){return(0,Qx.containsOnlyInlineElements)(n)?[n]:Array.from(n.children).reduce(function(e,t){return Dm(Dm([],e,!0),Om(t),!0)},[])}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getDeepestBlockElements=void 0;var e=Cd;Object.defineProperty(n,"getDeepestBlockElements",{enumerable:!0,get:function(){return e.getDeepestBlockElements}})})(_d);var Am={},Ed={},Us={},Sd={};Object.defineProperty(Sd,"__esModule",{value:!0}),Sd.isLineBreakTag=Zx;function Zx(n){return["BR","WBR"].includes(n.tagName)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isLineBreakTag=void 0;var e=Sd;Object.defineProperty(n,"isLineBreakTag",{enumerable:!0,get:function(){return e.isLineBreakTag}})})(Us);var Ws={},xd={};Object.defineProperty(xd,"__esModule",{value:!0}),xd.isSingleTag=Jx;function Jx(n){return["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"].includes(n.tagName)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isSingleTag=void 0;var e=xd;Object.defineProperty(n,"isSingleTag",{enumerable:!0,get:function(){return e.isSingleTag}})})(Ws),Object.defineProperty(Ed,"__esModule",{value:!0}),Ed.getDeepestNode=Im;var eB=zo,tB=Us,nB=Ws;function Im(n,e){e===void 0&&(e=!1);var t=e?"lastChild":"firstChild",r=e?"previousSibling":"nextSibling";if(n.nodeType===Node.ELEMENT_NODE&&n[t]){var a=n[t];if((0,nB.isSingleTag)(a)&&!(0,eB.isNativeInput)(a)&&!(0,tB.isLineBreakTag)(a))if(a[r])a=a[r];else if(a.parentNode!==null&&a.parentNode[r])a=a.parentNode[r];else return a.parentNode;return Im(a,e)}return n}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getDeepestNode=void 0;var e=Ed;Object.defineProperty(n,"getDeepestNode",{enumerable:!0,get:function(){return e.getDeepestNode}})})(Am);var Nm={},Bd={},qs=Vs&&Vs.__spreadArray||function(n,e,t){if(t||arguments.length===2)for(var r=0,a=e.length,s;r<a;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return n.concat(s||Array.prototype.slice.call(e))};Object.defineProperty(Bd,"__esModule",{value:!0}),Bd.findAllInputs=iB;var oB=Hs,rB=_d,aB=ad,sB=zo;function iB(n){return Array.from(n.querySelectorAll((0,aB.allInputsSelector)())).reduce(function(e,t){return(0,sB.isNativeInput)(t)||(0,oB.containsOnlyInlineElements)(t)?qs(qs([],e,!0),[t],!1):qs(qs([],e,!0),(0,rB.getDeepestBlockElements)(t),!0)},[])}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.findAllInputs=void 0;var e=Bd;Object.defineProperty(n,"findAllInputs",{enumerable:!0,get:function(){return e.findAllInputs}})})(Nm);var Pm={},Td={};Object.defineProperty(Td,"__esModule",{value:!0}),Td.isCollapsedWhitespaces=lB;function lB(n){return!/[^\t\n\r ]/.test(n)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isCollapsedWhitespaces=void 0;var e=Td;Object.defineProperty(n,"isCollapsedWhitespaces",{enumerable:!0,get:function(){return e.isCollapsedWhitespaces}})})(Pm);var $d={},Md={};Object.defineProperty(Md,"__esModule",{value:!0}),Md.isElement=dB;var cB=bd;function dB(n){return(0,cB.isNumber)(n)?!1:!!n&&!!n.nodeType&&n.nodeType===Node.ELEMENT_NODE}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isElement=void 0;var e=Md;Object.defineProperty(n,"isElement",{enumerable:!0,get:function(){return e.isElement}})})($d);var Lm={},Dd={},Od={},Ad={};Object.defineProperty(Ad,"__esModule",{value:!0}),Ad.isLeaf=uB;function uB(n){return n===null?!1:n.childNodes.length===0}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isLeaf=void 0;var e=Ad;Object.defineProperty(n,"isLeaf",{enumerable:!0,get:function(){return e.isLeaf}})})(Od);var Id={},Nd={};Object.defineProperty(Nd,"__esModule",{value:!0}),Nd.isNodeEmpty=gB;var hB=Us,pB=$d,fB=zo,mB=Ws;function gB(n,e){var t="";return(0,mB.isSingleTag)(n)&&!(0,hB.isLineBreakTag)(n)?!1:((0,pB.isElement)(n)&&(0,fB.isNativeInput)(n)?t=n.value:n.textContent!==null&&(t=n.textContent.replace("","")),e!==void 0&&(t=t.replace(new RegExp(e,"g"),"")),t.trim().length===0)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isNodeEmpty=void 0;var e=Nd;Object.defineProperty(n,"isNodeEmpty",{enumerable:!0,get:function(){return e.isNodeEmpty}})})(Id),Object.defineProperty(Dd,"__esModule",{value:!0}),Dd.isEmpty=kB;var yB=Od,bB=Id;function kB(n,e){n.normalize();for(var t=[n];t.length>0;){var r=t.shift();if(r){if(n=r,(0,yB.isLeaf)(n)&&!(0,bB.isNodeEmpty)(n,e))return!1;t.push.apply(t,Array.from(n.childNodes))}}return!0}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isEmpty=void 0;var e=Dd;Object.defineProperty(n,"isEmpty",{enumerable:!0,get:function(){return e.isEmpty}})})(Lm);var zm={},Pd={};Object.defineProperty(Pd,"__esModule",{value:!0}),Pd.isFragment=wB;var vB=bd;function wB(n){return(0,vB.isNumber)(n)?!1:!!n&&!!n.nodeType&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isFragment=void 0;var e=Pd;Object.defineProperty(n,"isFragment",{enumerable:!0,get:function(){return e.isFragment}})})(zm);var Fm={},Ld={};Object.defineProperty(Ld,"__esModule",{value:!0}),Ld.isHTMLString=CB;var _B=Ys;function CB(n){var e=(0,_B.make)("div");return e.innerHTML=n,e.childElementCount>0}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isHTMLString=void 0;var e=Ld;Object.defineProperty(n,"isHTMLString",{enumerable:!0,get:function(){return e.isHTMLString}})})(Fm);var Rm={},zd={};Object.defineProperty(zd,"__esModule",{value:!0}),zd.offset=EB;function EB(n){var e=n.getBoundingClientRect(),t=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop,a=e.top+r,s=e.left+t;return{top:a,left:s,bottom:a+e.height,right:s+e.width}}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.offset=void 0;var e=zd;Object.defineProperty(n,"offset",{enumerable:!0,get:function(){return e.offset}})})(Rm);var Vm={},Fd={};Object.defineProperty(Fd,"__esModule",{value:!0}),Fd.prepend=SB;function SB(n,e){Array.isArray(e)?(e=e.reverse(),e.forEach(function(t){return n.prepend(t)})):n.prepend(e)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.prepend=void 0;var e=Fd;Object.defineProperty(n,"prepend",{enumerable:!0,get:function(){return e.prepend}})})(Vm),function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.prepend=n.offset=n.make=n.isLineBreakTag=n.isSingleTag=n.isNodeEmpty=n.isLeaf=n.isHTMLString=n.isFragment=n.isEmpty=n.isElement=n.isContentEditable=n.isCollapsedWhitespaces=n.findAllInputs=n.isNativeInput=n.allInputsSelector=n.getDeepestNode=n.getDeepestBlockElements=n.getContentLength=n.fragmentToString=n.containsOnlyInlineElements=n.canSetCaret=n.calculateBaseline=n.blockElements=n.append=void 0;var e=ad;Object.defineProperty(n,"allInputsSelector",{enumerable:!0,get:function(){return e.allInputsSelector}});var t=zo;Object.defineProperty(n,"isNativeInput",{enumerable:!0,get:function(){return t.isNativeInput}});var r=Em;Object.defineProperty(n,"append",{enumerable:!0,get:function(){return r.append}});var a=cd;Object.defineProperty(n,"blockElements",{enumerable:!0,get:function(){return a.blockElements}});var s=Sm;Object.defineProperty(n,"calculateBaseline",{enumerable:!0,get:function(){return s.calculateBaseline}});var i=xm;Object.defineProperty(n,"canSetCaret",{enumerable:!0,get:function(){return i.canSetCaret}});var l=Hs;Object.defineProperty(n,"containsOnlyInlineElements",{enumerable:!0,get:function(){return l.containsOnlyInlineElements}});var c=$m;Object.defineProperty(n,"fragmentToString",{enumerable:!0,get:function(){return c.fragmentToString}});var d=Mm;Object.defineProperty(n,"getContentLength",{enumerable:!0,get:function(){return d.getContentLength}});var u=_d;Object.defineProperty(n,"getDeepestBlockElements",{enumerable:!0,get:function(){return u.getDeepestBlockElements}});var h=Am;Object.defineProperty(n,"getDeepestNode",{enumerable:!0,get:function(){return h.getDeepestNode}});var p=Nm;Object.defineProperty(n,"findAllInputs",{enumerable:!0,get:function(){return p.findAllInputs}});var m=Pm;Object.defineProperty(n,"isCollapsedWhitespaces",{enumerable:!0,get:function(){return m.isCollapsedWhitespaces}});var f=pd;Object.defineProperty(n,"isContentEditable",{enumerable:!0,get:function(){return f.isContentEditable}});var g=$d;Object.defineProperty(n,"isElement",{enumerable:!0,get:function(){return g.isElement}});var x=Lm;Object.defineProperty(n,"isEmpty",{enumerable:!0,get:function(){return x.isEmpty}});var E=zm;Object.defineProperty(n,"isFragment",{enumerable:!0,get:function(){return E.isFragment}});var C=Fm;Object.defineProperty(n,"isHTMLString",{enumerable:!0,get:function(){return C.isHTMLString}});var T=Od;Object.defineProperty(n,"isLeaf",{enumerable:!0,get:function(){return T.isLeaf}});var F=Id;Object.defineProperty(n,"isNodeEmpty",{enumerable:!0,get:function(){return F.isNodeEmpty}});var I=Us;Object.defineProperty(n,"isLineBreakTag",{enumerable:!0,get:function(){return I.isLineBreakTag}});var O=Ws;Object.defineProperty(n,"isSingleTag",{enumerable:!0,get:function(){return O.isSingleTag}});var P=Ys;Object.defineProperty(n,"make",{enumerable:!0,get:function(){return P.make}});var M=Rm;Object.defineProperty(n,"offset",{enumerable:!0,get:function(){return M.offset}});var v=Vm;Object.defineProperty(n,"prepend",{enumerable:!0,get:function(){return v.prepend}})}(Ge);const Ft="cdx-list",Tt={wrapper:Ft,item:`${Ft}__item`,itemContent:`${Ft}__item-content`,itemChildren:`${Ft}__item-children`};class Sn{static get CSS(){return{...Tt,orderedList:`${Ft}-ordered`}}constructor(e,t){this.config=t,this.readOnly=e}renderWrapper(e){let t;return e===!0?t=Ge.make("ol",[Sn.CSS.wrapper,Sn.CSS.orderedList]):t=Ge.make("ol",[Sn.CSS.orderedList,Sn.CSS.itemChildren]),t}renderItem(e,t){const r=Ge.make("li",Sn.CSS.item),a=Ge.make("div",Sn.CSS.itemContent,{innerHTML:e,contentEditable:(!this.readOnly).toString()});return r.appendChild(a),r}getItemContent(e){const t=e.querySelector(`.${Sn.CSS.itemContent}`);return!t||Ge.isEmpty(t)?"":t.innerHTML}getItemMeta(){return{}}composeDefaultMeta(){return{}}}class xn{static get CSS(){return{...Tt,unorderedList:`${Ft}-unordered`}}constructor(e,t){this.config=t,this.readOnly=e}renderWrapper(e){let t;return e===!0?t=Ge.make("ul",[xn.CSS.wrapper,xn.CSS.unorderedList]):t=Ge.make("ul",[xn.CSS.unorderedList,xn.CSS.itemChildren]),t}renderItem(e,t){const r=Ge.make("li",xn.CSS.item),a=Ge.make("div",xn.CSS.itemContent,{innerHTML:e,contentEditable:(!this.readOnly).toString()});return r.appendChild(a),r}getItemContent(e){const t=e.querySelector(`.${xn.CSS.itemContent}`);return!t||Ge.isEmpty(t)?"":t.innerHTML}getItemMeta(){return{}}composeDefaultMeta(){return{}}}function Fo(n){return n.nodeType===Node.ELEMENT_NODE}var da={},Rd={},Gs={},Ks={};Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.getContenteditableSlice=BB;var xB=Ge;function BB(n,e,t,r,a){var s;a===void 0&&(a=!1);var i=document.createRange();if(r==="left"?(i.setStart(n,0),i.setEnd(e,t)):(i.setStart(e,t),i.setEnd(n,n.childNodes.length)),a===!0){var l=i.extractContents();return(0,xB.fragmentToString)(l)}var c=i.cloneContents(),d=document.createElement("div");d.appendChild(c);var u=(s=d.textContent)!==null&&s!==void 0?s:"";return u}Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.checkContenteditableSliceForEmptiness=MB;var TB=Ge,$B=Ks;function MB(n,e,t,r){var a=(0,$B.getContenteditableSlice)(n,e,t,r);return(0,TB.isCollapsedWhitespaces)(a)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.checkContenteditableSliceForEmptiness=void 0;var e=Gs;Object.defineProperty(n,"checkContenteditableSliceForEmptiness",{enumerable:!0,get:function(){return e.checkContenteditableSliceForEmptiness}})})(Rd);var Hm={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getContenteditableSlice=void 0;var e=Ks;Object.defineProperty(n,"getContenteditableSlice",{enumerable:!0,get:function(){return e.getContenteditableSlice}})})(Hm);var jm={},Vd={};Object.defineProperty(Vd,"__esModule",{value:!0}),Vd.focus=OB;var DB=Ge;function OB(n,e){var t,r;if(e===void 0&&(e=!0),(0,DB.isNativeInput)(n)){n.focus();var a=e?0:n.value.length;n.setSelectionRange(a,a)}else{var s=document.createRange(),i=window.getSelection();if(!i)return;var l=function(p,m){m===void 0&&(m=!1);var f=document.createTextNode("");m?p.insertBefore(f,p.firstChild):p.appendChild(f),s.setStart(f,0),s.setEnd(f,0)},c=function(p){return p!=null},d=n.childNodes,u=e?d[0]:d[d.length-1];if(c(u)){for(;c(u)&&u.nodeType!==Node.TEXT_NODE;)u=e?u.firstChild:u.lastChild;if(c(u)&&u.nodeType===Node.TEXT_NODE){var h=(r=(t=u.textContent)===null||t===void 0?void 0:t.length)!==null&&r!==void 0?r:0,a=e?0:h;s.setStart(u,a),s.setEnd(u,a)}else l(n,e)}else l(n);i.removeAllRanges(),i.addRange(s)}}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.focus=void 0;var e=Vd;Object.defineProperty(n,"focus",{enumerable:!0,get:function(){return e.focus}})})(jm);var Hd={},Xs={};Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.getCaretNodeAndOffset=AB;function AB(){var n=window.getSelection();if(n===null)return[null,0];var e=n.focusNode,t=n.focusOffset;return e===null?[null,0]:(e.nodeType!==Node.TEXT_NODE&&e.childNodes.length>0&&(e.childNodes[t]!==void 0?(e=e.childNodes[t],t=0):(e=e.childNodes[t-1],e.textContent!==null&&(t=e.textContent.length))),[e,t])}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getCaretNodeAndOffset=void 0;var e=Xs;Object.defineProperty(n,"getCaretNodeAndOffset",{enumerable:!0,get:function(){return e.getCaretNodeAndOffset}})})(Hd);var Ym={},Qs={};Object.defineProperty(Qs,"__esModule",{value:!0}),Qs.getRange=IB;function IB(){var n=window.getSelection();return n&&n.rangeCount?n.getRangeAt(0):null}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getRange=void 0;var e=Qs;Object.defineProperty(n,"getRange",{enumerable:!0,get:function(){return e.getRange}})})(Ym);var Um={},jd={};Object.defineProperty(jd,"__esModule",{value:!0}),jd.isCaretAtEndOfInput=LB;var Wm=Ge,NB=Hd,PB=Rd;function LB(n){var e=(0,Wm.getDeepestNode)(n,!0);if(e===null)return!0;if((0,Wm.isNativeInput)(e))return e.selectionEnd===e.value.length;var t=(0,NB.getCaretNodeAndOffset)(),r=t[0],a=t[1];return r===null?!1:(0,PB.checkContenteditableSliceForEmptiness)(n,r,a,"right")}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isCaretAtEndOfInput=void 0;var e=jd;Object.defineProperty(n,"isCaretAtEndOfInput",{enumerable:!0,get:function(){return e.isCaretAtEndOfInput}})})(Um);var qm={},Yd={};Object.defineProperty(Yd,"__esModule",{value:!0}),Yd.isCaretAtStartOfInput=RB;var Zs=Ge,zB=Xs,FB=Gs;function RB(n){var e=(0,Zs.getDeepestNode)(n);if(e===null||(0,Zs.isEmpty)(n))return!0;if((0,Zs.isNativeInput)(e))return e.selectionEnd===0;if((0,Zs.isEmpty)(n))return!0;var t=(0,zB.getCaretNodeAndOffset)(),r=t[0],a=t[1];return r===null?!1:(0,FB.checkContenteditableSliceForEmptiness)(n,r,a,"left")}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isCaretAtStartOfInput=void 0;var e=Yd;Object.defineProperty(n,"isCaretAtStartOfInput",{enumerable:!0,get:function(){return e.isCaretAtStartOfInput}})})(qm);var Gm={},Ud={};Object.defineProperty(Ud,"__esModule",{value:!0}),Ud.save=jB;var VB=Ge,HB=Qs;function jB(){var n=(0,HB.getRange)(),e=(0,VB.make)("span");if(e.id="cursor",e.hidden=!0,!!n)return n.insertNode(e),function(){var t=window.getSelection();t&&(n.setStartAfter(e),n.setEndAfter(e),t.removeAllRanges(),t.addRange(n),setTimeout(function(){e.remove()},150))}}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.save=void 0;var e=Ud;Object.defineProperty(n,"save",{enumerable:!0,get:function(){return e.save}})})(Gm),function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.save=n.isCaretAtStartOfInput=n.isCaretAtEndOfInput=n.getRange=n.getCaretNodeAndOffset=n.focus=n.getContenteditableSlice=n.checkContenteditableSliceForEmptiness=void 0;var e=Rd;Object.defineProperty(n,"checkContenteditableSliceForEmptiness",{enumerable:!0,get:function(){return e.checkContenteditableSliceForEmptiness}});var t=Hm;Object.defineProperty(n,"getContenteditableSlice",{enumerable:!0,get:function(){return t.getContenteditableSlice}});var r=jm;Object.defineProperty(n,"focus",{enumerable:!0,get:function(){return r.focus}});var a=Hd;Object.defineProperty(n,"getCaretNodeAndOffset",{enumerable:!0,get:function(){return a.getCaretNodeAndOffset}});var s=Ym;Object.defineProperty(n,"getRange",{enumerable:!0,get:function(){return s.getRange}});var i=Um;Object.defineProperty(n,"isCaretAtEndOfInput",{enumerable:!0,get:function(){return i.isCaretAtEndOfInput}});var l=qm;Object.defineProperty(n,"isCaretAtStartOfInput",{enumerable:!0,get:function(){return l.isCaretAtStartOfInput}});var c=Gm;Object.defineProperty(n,"save",{enumerable:!0,get:function(){return c.save}})}(da);class yt{static get CSS(){return{...Tt,checklist:`${Ft}-checklist`,itemChecked:`${Ft}__checkbox--checked`,noHover:`${Ft}__checkbox--no-hover`,checkbox:`${Ft}__checkbox-check`,checkboxContainer:`${Ft}__checkbox`}}constructor(e,t){this.config=t,this.readOnly=e}renderWrapper(e){let t;return e===!0?(t=Ge.make("ul",[yt.CSS.wrapper,yt.CSS.checklist]),t.addEventListener("click",r=>{const a=r.target;if(a){const s=a.closest(`.${yt.CSS.checkboxContainer}`);s&&s.contains(a)&&this.toggleCheckbox(s)}})):t=Ge.make("ul",[yt.CSS.checklist,yt.CSS.itemChildren]),t}renderItem(e,t){const r=Ge.make("li",[yt.CSS.item,yt.CSS.item]),a=Ge.make("div",yt.CSS.itemContent,{innerHTML:e,contentEditable:(!this.readOnly).toString()}),s=Ge.make("span",yt.CSS.checkbox),i=Ge.make("div",yt.CSS.checkboxContainer);return t.checked===!0&&i.classList.add(yt.CSS.itemChecked),s.innerHTML=ax,i.appendChild(s),r.appendChild(i),r.appendChild(a),r}getItemContent(e){const t=e.querySelector(`.${yt.CSS.itemContent}`);return!t||Ge.isEmpty(t)?"":t.innerHTML}getItemMeta(e){const t=e.querySelector(`.${yt.CSS.checkboxContainer}`);return{checked:t?t.classList.contains(yt.CSS.itemChecked):!1}}composeDefaultMeta(){return{checked:!1}}toggleCheckbox(e){e.classList.toggle(yt.CSS.itemChecked),e.classList.add(yt.CSS.noHover),e.addEventListener("mouseleave",()=>this.removeSpecialHoverBehavior(e),{once:!0})}removeSpecialHoverBehavior(e){e.classList.remove(yt.CSS.noHover)}}function Wd(n,e="after"){const t=[];let r;function a(s){switch(e){case"after":return s.nextElementSibling;case"before":return s.previousElementSibling}}for(r=a(n);r!==null;)t.push(r),r=a(r);return t.length!==0?t:null}function Yn(n,e=!0){let t=n;return n.classList.contains(Tt.item)&&(t=n.querySelector(`.${Tt.itemChildren}`)),t===null?[]:e?Array.from(t.querySelectorAll(`:scope > .${Tt.item}`)):Array.from(t.querySelectorAll(`.${Tt.item}`))}function YB(n){return n.nextElementSibling===null}function UB(n){return n.querySelector(`.${Tt.itemChildren}`)!==null}function fo(n){return n.querySelector(`.${Tt.itemChildren}`)}function qd(n){let e=n;n.classList.contains(Tt.item)&&(e=fo(n)),e!==null&&Yn(e).length===0&&e.remove()}function Js(n){return n.querySelector(`.${Tt.itemContent}`)}function br(n,e=!0){const t=Js(n);t&&da.focus(t,e)}class Gd{get currentItem(){const e=window.getSelection();if(!e)return null;let t=e.anchorNode;return!t||(Fo(t)||(t=t.parentNode),!t)||!Fo(t)?null:t.closest(`.${Tt.item}`)}get currentItemLevel(){const e=this.currentItem;if(e===null)return null;let t=e.parentNode,r=0;for(;t!==null&&t!==this.listWrapper;)Fo(t)&&t.classList.contains(Tt.item)&&(r+=1),t=t.parentNode;return r+1}constructor({data:e,config:t,api:r,readOnly:a,block:s},i){this.config=t,this.data=e,this.readOnly=a,this.api=r,this.block=s,this.renderer=i}render(){return this.listWrapper=this.renderer.renderWrapper(!0),this.data.items.length?this.appendItems(this.data.items,this.listWrapper):this.appendItems([{content:"",meta:{},items:[]}],this.listWrapper),this.readOnly||this.listWrapper.addEventListener("keydown",e=>{switch(e.key){case"Enter":e.shiftKey||this.enterPressed(e);break;case"Backspace":this.backspace(e);break;case"Tab":e.shiftKey?this.shiftTab(e):this.addTab(e);break}},!1),"start"in this.data.meta&&this.data.meta.start!==void 0&&this.changeStartWith(this.data.meta.start),"counterType"in this.data.meta&&this.data.meta.counterType!==void 0&&this.changeCounters(this.data.meta.counterType),this.listWrapper}save(e){const t=e??this.listWrapper,r=i=>Yn(i).map(l=>{const c=fo(l),d=this.renderer.getItemContent(l),u=this.renderer.getItemMeta(l),h=c?r(c):[];return{content:d,meta:u,items:h}}),a=t?r(t):[];let s={style:this.data.style,meta:{},items:a};return this.data.style==="ordered"&&(s.meta={start:this.data.meta.start,counterType:this.data.meta.counterType}),s}static get pasteConfig(){return{tags:["OL","UL","LI"]}}merge(e){const t=this.block.holder.querySelectorAll(`.${Tt.item}`),r=t[t.length-1],a=Js(r);if(r===null||a===null||(a.insertAdjacentHTML("beforeend",e.items[0].content),this.listWrapper===void 0))return;const s=Yn(this.listWrapper);if(s.length===0)return;const i=s[s.length-1];let l=fo(i);const c=e.items.shift();c!==void 0&&(c.items.length!==0&&(l===null&&(l=this.renderer.renderWrapper(!1)),this.appendItems(c.items,l)),e.items.length>0&&this.appendItems(e.items,this.listWrapper))}onPaste(e){const t=e.detail.data;this.data=this.pasteHandler(t);const r=this.listWrapper;r&&r.parentNode&&r.parentNode.replaceChild(this.render(),r)}pasteHandler(e){const{tagName:t}=e;let r="unordered",a;switch(t){case"OL":r="ordered",a="ol";break;case"UL":case"LI":r="unordered",a="ul"}const s={style:r,meta:{},items:[]};r==="ordered"&&(this.data.meta.counterType="numeric",this.data.meta.start=1);const i=l=>Array.from(l.querySelectorAll(":scope > li")).map(c=>{const d=c.querySelector(`:scope > ${a}`),u=d?i(d):[];return{content:c.innerHTML??"",meta:{},items:u}});return s.items=i(e),s}changeStartWith(e){this.listWrapper.style.setProperty("counter-reset",`item ${e-1}`),this.data.meta.start=e}changeCounters(e){this.listWrapper.style.setProperty("--list-counter-type",e),this.data.meta.counterType=e}enterPressed(e){var t;const r=this.currentItem;if(e.stopPropagation(),e.preventDefault(),e.isComposing||r===null)return;const a=((t=this.renderer)==null?void 0:t.getItemContent(r).trim().length)===0,s=r.parentNode===this.listWrapper,i=r.previousElementSibling===null,l=this.api.blocks.getCurrentBlockIndex();if(s&&a)if(YB(r)&&!UB(r)){i?this.convertItemToDefaultBlock(l,!0):this.convertItemToDefaultBlock();return}else{this.splitList(r);return}else if(a){this.unshiftItem(r);return}else this.splitItem(r)}backspace(e){var t;const r=this.currentItem;if(r!==null&&da.isCaretAtStartOfInput(r)&&((t=window.getSelection())==null?void 0:t.isCollapsed)!==!1){if(e.stopPropagation(),r.parentNode===this.listWrapper&&r.previousElementSibling===null){this.convertFirstItemToDefaultBlock();return}e.preventDefault(),this.mergeItemWithPrevious(r)}}shiftTab(e){e.stopPropagation(),e.preventDefault(),this.currentItem!==null&&this.unshiftItem(this.currentItem)}unshiftItem(e){if(!e.parentNode||!Fo(e.parentNode))return;const t=e.parentNode.closest(`.${Tt.item}`);if(!t)return;let r=fo(e);if(e.parentElement===null)return;const a=Wd(e);a!==null&&(r===null&&(r=this.renderer.renderWrapper(!1)),a.forEach(s=>{r.appendChild(s)}),e.appendChild(r)),t.after(e),br(e,!1),qd(t)}splitList(e){const t=Yn(e),r=this.block,a=this.api.blocks.getCurrentBlockIndex();if(t.length!==0){const c=t[0];this.unshiftItem(c),br(e,!1)}if(e.previousElementSibling===null&&e.parentNode===this.listWrapper){this.convertItemToDefaultBlock(a);return}const s=Wd(e);if(s===null)return;const i=this.renderer.renderWrapper(!0);s.forEach(c=>{i.appendChild(c)});const l=this.save(i);l.meta.start=this.data.style=="ordered"?1:void 0,this.api.blocks.insert(r==null?void 0:r.name,l,this.config,a+1),this.convertItemToDefaultBlock(a+1),i.remove()}splitItem(e){const[t,r]=da.getCaretNodeAndOffset();if(t===null)return;const a=Js(e);let s;a===null?s="":s=da.getContenteditableSlice(a,t,r,"right",!0);const i=fo(e),l=this.renderItem(s);e==null||e.after(l),i&&l.appendChild(i),br(l)}mergeItemWithPrevious(e){const t=e.previousElementSibling,r=e.parentNode;if(r===null||!Fo(r))return;const a=r.closest(`.${Tt.item}`);if(!t&&!a||t&&!Fo(t))return;let s;if(t){const h=Yn(t,!1);h.length!==0&&h.length!==0?s=h[h.length-1]:s=t}else s=a;const i=this.renderer.getItemContent(e);if(!s)return;br(s,!1);const l=Js(s);if(l===null)return;l.insertAdjacentHTML("beforeend",i);const c=Yn(e);if(c.length===0){e.remove(),qd(s);return}const d=t||a,u=fo(d)??this.renderer.renderWrapper(!1);t?c.forEach(h=>{u.appendChild(h)}):c.forEach(h=>{u.prepend(h)}),fo(d)===null&&s.appendChild(u),e.remove()}addTab(e){var t;e.stopPropagation(),e.preventDefault();const r=this.currentItem;if(!r)return;if(((t=this.config)==null?void 0:t.maxLevel)!==void 0){const i=this.currentItemLevel;if(i!==null&&i===this.config.maxLevel)return}const a=r.previousSibling;if(a===null||!Fo(a))return;const s=fo(a);if(s)s.appendChild(r),Yn(r).forEach(i=>{s.appendChild(i)});else{const i=this.renderer.renderWrapper(!1);i.appendChild(r),Yn(r).forEach(l=>{i.appendChild(l)}),a.appendChild(i)}qd(r),br(r,!1)}convertItemToDefaultBlock(e,t){let r;const a=this.currentItem,s=a!==null?this.renderer.getItemContent(a):"";t===!0&&this.api.blocks.delete(),e!==void 0?r=this.api.blocks.insert(void 0,{text:s},void 0,e):r=this.api.blocks.insert(),a==null||a.remove(),this.api.caret.setToBlock(r,"start")}convertFirstItemToDefaultBlock(){const e=this.currentItem;if(e===null)return;const t=Yn(e);if(t.length!==0){const i=t[0];this.unshiftItem(i),br(e)}const r=Wd(e),a=this.api.blocks.getCurrentBlockIndex(),s=r===null;this.convertItemToDefaultBlock(a,s)}renderItem(e,t){const r=t??this.renderer.composeDefaultMeta();switch(!0){case this.renderer instanceof Sn:return this.renderer.renderItem(e,r);case this.renderer instanceof xn:return this.renderer.renderItem(e,r);default:return this.renderer.renderItem(e,r)}}appendItems(e,t){e.forEach(r=>{var a;const s=this.renderItem(r.content,r.meta);if(t.appendChild(s),r.items.length){const i=(a=this.renderer)==null?void 0:a.renderWrapper(!1);this.appendItems(r.items,i),s.appendChild(i)}})}}const kr={wrapper:`${Ft}-start-with-field`,input:`${Ft}-start-with-field__input`,startWithElementWrapperInvalid:`${Ft}-start-with-field--invalid`};function WB(n,{value:e,placeholder:t,attributes:r,sanitize:a}){const s=Ge.make("div",kr.wrapper),i=Ge.make("input",kr.input,{placeholder:t,tabIndex:-1,value:e});for(const l in r)i.setAttribute(l,r[l]);return s.appendChild(i),i.addEventListener("input",()=>{a!==void 0&&(i.value=a(i.value));const l=i.checkValidity();!l&&!s.classList.contains(kr.startWithElementWrapperInvalid)&&s.classList.add(kr.startWithElementWrapperInvalid),l&&s.classList.contains(kr.startWithElementWrapperInvalid)&&s.classList.remove(kr.startWithElementWrapperInvalid),l&&n(i.value)}),s}const ua=new Map([["Numeric","numeric"],["Lower Roman","lower-roman"],["Upper Roman","upper-roman"],["Lower Alpha","lower-alpha"],["Upper Alpha","upper-alpha"]]),Km=new Map([["numeric",sx],["lower-roman",ix],["upper-roman",lx],["lower-alpha",dx],["upper-alpha",cx]]);function qB(n){return n.replace(/\D+/g,"")}function GB(n){return typeof n.items[0]=="string"}function KB(n){return!("meta"in n)}function XB(n){return typeof n.items[0]!="string"&&"text"in n.items[0]&&"checked"in n.items[0]&&typeof n.items[0].text=="string"&&typeof n.items[0].checked=="boolean"}function QB(n){const e=[];return GB(n)?(n.items.forEach(t=>{e.push({content:t,meta:{},items:[]})}),{style:n.style,meta:{},items:e}):XB(n)?(n.items.forEach(t=>{e.push({content:t.text,meta:{checked:t.checked},items:[]})}),{style:"checklist",meta:{},items:e}):KB(n)?{style:n.style,meta:{},items:n.items}:structuredClone(n)}class ei{static get isReadOnlySupported(){return!0}static get enableLineBreaks(){return!0}static get toolbox(){return[{icon:_m,title:"Unordered List",data:{style:"unordered"}},{icon:Cm,title:"Ordered List",data:{style:"ordered"}},{icon:wm,title:"Checklist",data:{style:"checklist"}}]}static get pasteConfig(){return{tags:["OL","UL","LI"]}}static get conversionConfig(){return{export:e=>ei.joinRecursive(e),import:(e,t)=>({meta:{},items:[{content:e,meta:{},items:[]}],style:(t==null?void 0:t.defaultStyle)!==void 0?t.defaultStyle:"unordered"})}}get listStyle(){return this.data.style||this.defaultListStyle}set listStyle(e){var t;this.data.style=e,this.changeTabulatorByStyle();const r=this.list.render();(t=this.listElement)==null||t.replaceWith(r),this.listElement=r}constructor({data:e,config:t,api:r,readOnly:a,block:s}){var i;this.api=r,this.readOnly=a,this.config=t,this.block=s,this.defaultListStyle=((i=this.config)==null?void 0:i.defaultStyle)||"unordered",this.defaultCounterTypes=this.config.counterTypes||Array.from(ua.values());const l={style:this.defaultListStyle,meta:{},items:[]};this.data=Object.keys(e).length?QB(e):l,this.listStyle==="ordered"&&this.data.meta.counterType===void 0&&(this.data.meta.counterType="numeric"),this.changeTabulatorByStyle()}static joinRecursive(e){return e.items.map(t=>`${t.content} ${ei.joinRecursive(t)}`).join("")}render(){return this.listElement=this.list.render(),this.listElement}save(){return this.data=this.list.save(),this.data}merge(e){this.list.merge(e)}renderSettings(){const e=[{label:this.api.i18n.t("Unordered"),icon:_m,closeOnActivate:!0,isActive:this.listStyle=="unordered",onActivate:()=>{this.listStyle="unordered"}},{label:this.api.i18n.t("Ordered"),icon:Cm,closeOnActivate:!0,isActive:this.listStyle=="ordered",onActivate:()=>{this.listStyle="ordered"}},{label:this.api.i18n.t("Checklist"),icon:wm,closeOnActivate:!0,isActive:this.listStyle=="checklist",onActivate:()=>{this.listStyle="checklist"}}];if(this.listStyle==="ordered"){const t=WB(s=>this.changeStartWith(Number(s)),{value:String(this.data.meta.start??1),placeholder:"",attributes:{required:"true"},sanitize:s=>qB(s)}),r=[{label:this.api.i18n.t("Start with"),icon:ux,children:{items:[{element:t,type:"html"}]}}],a={label:this.api.i18n.t("Counter type"),icon:Km.get(this.data.meta.counterType),children:{items:[]}};ua.forEach((s,i)=>{const l=ua.get(i);this.defaultCounterTypes.includes(l)&&a.children.items.push({title:this.api.i18n.t(i),icon:Km.get(l),isActive:this.data.meta.counterType===ua.get(i),closeOnActivate:!0,onActivate:()=>{this.changeCounters(ua.get(i))}})}),a.children.items.length>1&&r.push(a),e.push({type:"separator"},...r)}return e}onPaste(e){const{tagName:t}=e.detail.data;switch(t){case"OL":this.listStyle="ordered";break;case"UL":case"LI":this.listStyle="unordered"}this.list.onPaste(e)}pasteHandler(e){return this.list.pasteHandler(e)}changeCounters(e){var t;(t=this.list)==null||t.changeCounters(e),this.data.meta.counterType=e}changeStartWith(e){var t;(t=this.list)==null||t.changeStartWith(e),this.data.meta.start=e}changeTabulatorByStyle(){switch(this.listStyle){case"ordered":this.list=new Gd({data:this.data,readOnly:this.readOnly,api:this.api,config:this.config,block:this.block},new Sn(this.readOnly,this.config));break;case"unordered":this.list=new Gd({data:this.data,readOnly:this.readOnly,api:this.api,config:this.config,block:this.block},new xn(this.readOnly,this.config));break;case"checklist":this.list=new Gd({data:this.data,readOnly:this.readOnly,api:this.api,config:this.config,block:this.block},new yt(this.readOnly,this.config));break}}}const ZB=["id"],JB=re(o.defineComponent({__name:"Editor",props:o.mergeModels({value:{},label:{},maxLength:{default:()=>1/0},isDisabled:{type:Boolean},isError:{type:Boolean},isRequired:{type:Boolean},isBorder:{type:Boolean},placeholder:{}},{value:{required:!0},valueModifiers:{}}),emits:o.mergeModels(["update:isError"],["update:value"]),setup(n,{emit:e}){const t=o.useModel(n,"value"),r=e,a=o.useId(),s=o.computed(()=>`editor-content-${a}`),i=o.ref(),l=o.ref(!1),c=o.ref(0);let d=null,u,h;const p=o.computed(()=>n.maxLength===1/0?null:n.maxLength-c.value);function m(){d=document.getElementById(s.value),d&&(u=()=>{l.value||(l.value=!0)},h=C=>{const T=C.relatedTarget??document.activeElement;!!!(T&&(d!=null&&d.contains(T)))&&l.value&&(l.value=!1)},d.addEventListener("focusin",u,!0),d.addEventListener("focusout",h,!0))}function f(){d&&(d.removeEventListener("focusin",u,!0),d.removeEventListener("focusout",h,!0),d=null)}o.onMounted(()=>{i.value=new NS({holder:s.value,onReady:x,onChange:E,placeholder:n.placeholder,readOnly:n.isDisabled,inlineToolbar:["toParagraph","toHeader","toList","toBold"],tools:{paragraph:{class:WS,config:{preserveBlank:!0}},header:{class:rx,config:{preserveBlank:!0}},list:{class:ei,config:{defaultStyle:"unordered"}},toHeader:{class:qS},toList:{class:GS},toParagraph:{class:KS},toBold:{class:XS}},data:JSON.parse(t.value||"{}")})});let g=!1;async function x(){var C,T;if(t.value){if(typeof t.value=="string"){(C=i.value)==null||C.blocks.render(JSON.parse(t.value));return}(T=i.value)==null||T.render(t.value),await o.nextTick(),m(),c.value=await FS({editor:i.value,limit:n.maxLength})}}async function E(C,T){var F;try{g=!0;const I=await((F=i.value)==null?void 0:F.save());t.value=JSON.stringify(I),r("update:isError",!1),c.value=await zS({api:C,limit:n.maxLength,event:T})}finally{g=!1}}return o.watch(()=>t.value,()=>{g||x()}),o.onUnmounted(()=>{var C;(C=i.value)==null||C.destroy()}),o.onBeforeUnmount(()=>{var C;f(),(C=i.value)==null||C.destroy(),i.value=void 0}),o.watch(()=>n.isDisabled,C=>{var T;(T=i.value)==null||T.readOnly.toggle(C)}),(C,T)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([C.$style.root,{[C.$style["is-border"]]:C.isBorder,[C.$style["is-focused"]]:l.value,[C.$style["is-disabled"]]:C.isDisabled,[C.$style["is-error"]]:C.isError}])},[C.label?(o.openBlock(),o.createBlock(o.unref(me),{key:0,class:o.normalizeClass(C.$style.label),size:"subhead",color:"foreground-layout-layout-1-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(C.label)+" ",1),C.isRequired?(o.openBlock(),o.createBlock(o.unref(me),{key:0,tag:"span",size:"subhead",color:"foreground-layout-layout-1-critical"},{default:o.withCtx(()=>T[0]||(T[0]=[o.createTextVNode(" * ")])),_:1,__:[0]})):o.createCommentVNode("",!0)]),_:1},8,["class"])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(C.$style.wrapper)},[o.createElementVNode("div",{id:s.value,class:o.normalizeClass(C.$style.editor)},null,10,ZB),p.value!==null?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(C.$style.count)},[o.createVNode(o.unref(me),{size:"caption",color:"inherit"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(p.value),1)]),_:1})],2)):o.createCommentVNode("",!0)],2)],2))}}),[["__cssModules",{$style:{root:"Editor__root_870b2","is-border":"Editor__is-border_7bbc0",editor:"Editor__editor_b5509","is-focused":"Editor__is-focused_a21ed","is-error":"Editor__is-error_38ed6","is-disabled":"Editor__is-disabled_3e958",label:"Editor__label_ca5ff",wrapper:"Editor__wrapper_46333",count:"Editor__count_8d0a2"}}]]),eT=["innerHTML"],tT=re(o.defineComponent({__name:"EditorText",props:{value:{}},setup(n){const e=o.computed(()=>jS(JSON.parse(n.value||"{}")));return(t,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(t.$style.root)},[o.createElementVNode("div",{innerHTML:e.value,class:o.normalizeClass(t.$style.text)},null,10,eT)],2))}}),[["__cssModules",{$style:{text:"EditorText__text_a6dbc"}}]]),nT=o.defineComponent({__name:"PageInfoCellSkeleton",props:{isShowDivider:{type:Boolean},labelColor:{default:"foreground-layout-layout-1-primary"}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.$style.root)},[o.createElementVNode("div",{class:o.normalizeClass(e.$style.content)},[o.createElementVNode("div",{class:o.normalizeClass(e.$style.section)},[o.createVNode(o.unref($n),{widthRange:[.3,.6],size:"subhead",color:e.labelColor},null,8,["color"])],2),o.createElementVNode("div",{class:o.normalizeClass(e.$style.section)},[o.createVNode(o.unref($n),{widthRange:[.3,.6],size:"subhead",color:"foreground-layout-layout-1-primary"})],2)],2),e.isShowDivider?(o.openBlock(),o.createBlock(o.unref(An),{key:0,size:"s"})):o.createCommentVNode("",!0)],2))}}),Xm={content:"PageInfoCell__content_1589e",section:"PageInfoCell__section_e2b06","section-label":"PageInfoCell__section-label_857be","section-value":"PageInfoCell__section-value_bd8ff"},Qm=re(nT,[["__cssModules",{$style:Xm}]]),Zm=re(o.defineComponent({__name:"PageInfoCell",props:{label:{},value:{},labelColor:{default:"foreground-layout-layout-1-primary"},isShowDivider:{type:Boolean}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.$style.root)},[o.createElementVNode("div",{class:o.normalizeClass(e.$style.content)},[e.label?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass([e.$style.section,e.$style["section-label"]])},[o.renderSlot(e.$slots,"label",{},()=>[o.createVNode(o.unref(me),{size:"subhead",color:e.labelColor},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.label),1)]),_:1},8,["color"])])],2)):o.createCommentVNode("",!0),e.value?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass([e.$style.section,e.$style["section-value"]])},[o.renderSlot(e.$slots,"value",{},()=>[o.createVNode(o.unref(me),{size:"subhead",color:"foreground-layout-layout-1-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.value),1)]),_:1})])],2)):o.createCommentVNode("",!0)],2),e.isShowDivider?(o.openBlock(),o.createBlock(o.unref(An),{key:0,size:"s"})):o.createCommentVNode("",!0)],2))}}),[["__cssModules",{$style:Xm}]]),oT=o.defineComponent({__name:"PageInfoCellTable",props:{data:{},labelColor:{}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.$style.root)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.data,(r,a)=>(o.openBlock(),o.createBlock(o.unref(Zm),{key:`${a}-row`,isShowDivider:a!==e.data.length-1||e.data.length===1,class:o.normalizeClass(e.$style.row),value:r.value,label:r.label,labelColor:e.labelColor},o.createSlots({_:2},[r.isBadge?{name:"value",fn:o.withCtx(()=>[o.createVNode(o.unref(ni),null,{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(r.value),1)]),_:2},1024)]),key:"0"}:void 0]),1032,["isShowDivider","class","value","label","labelColor"]))),128))],2))}}),Jm={root:"PageInfoCellTable__root_73c7c"},rT=re(oT,[["__cssModules",{$style:Jm}]]),aT=re(o.defineComponent({__name:"PageInfoCellTableSkeleton",props:{size:{default:4},labelColor:{default:"foreground-layout-layout-1-primary"}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.$style.root)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Number(e.size),(r,a)=>(o.openBlock(),o.createBlock(o.unref(Qm),{key:`${a}-row`,isShowDivider:a!==Number(e.size)-1,labelColor:e.labelColor,class:o.normalizeClass(e.$style.row)},null,8,["isShowDivider","labelColor","class"]))),128))],2))}}),[["__cssModules",{$style:Jm}]]),sT=re(o.defineComponent({__name:"Summary",props:{data:{},isLoading:{type:Boolean}},setup(n){const e=o.computed(()=>{var t;return(t=n.data)==null?void 0:t.reduce((r,a)=>r+a.type+a.value+a.label,"")});return(t,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(t.$style.root)},[o.createVNode(o.unref(An),{size:"s",opacity:"0.5"}),o.createVNode(o.unref(qn),{class:o.normalizeClass(t.$style.wrapper)},{default:o.withCtx(()=>[t.isLoading?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(t.$style.wrapper)},[o.createVNode(o.unref(Zi),{class:o.normalizeClass(t.$style.list)},{default:o.withCtx(()=>[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(5,(a,s)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:a},[s!==0?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(t.$style["item-divider"])},null,2)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(t.$style.item)},[o.createVNode(o.unref($n),{widthRange:[.5,.8],size:"caption",color:"foreground-layout-layout-1-secondary"}),o.createVNode(o.unref($n),{widthRange:[.3,.5],size:"subhead",color:"foreground-layout-layout-1-primary"})],2)],64))),64))]),_:1},8,["class"])],2)):(o.openBlock(),o.createElementBlock("div",{key:e.value,class:o.normalizeClass(t.$style.wrapper)},[o.createElementVNode("div",{class:o.normalizeClass(t.$style.list)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.data,(a,s)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:a.label+s},[s!==0?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(t.$style["item-divider"])},null,2)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(t.$style.item)},[o.createVNode(o.unref(me),{size:"caption",color:"foreground-layout-layout-1-secondary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.label),1)]),_:2},1024),a.type==="text"?(o.openBlock(),o.createBlock(o.unref(me),{key:0,class:o.normalizeClass(t.$style.value),numberOfLines:"1",size:"subhead",color:"foreground-layout-layout-1-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.value),1)]),_:2},1032,["class"])):(o.openBlock(),o.createBlock(o.unref(rh),{key:1,value:a.value?a.value:"0",size:"subhead",weight:"regular",color:"foreground-layout-layout-1-primary"},null,8,["value"]))],2)],64))),128))],2)],2))]),_:1},8,["class"]),o.createVNode(o.unref(An),{size:"s"})],2))}}),[["__cssModules",{$style:{list:"Summary__list_d1481",item:"Summary__item_1ed72",value:"Summary__value_1c547","item-divider":"Summary__item-divider_d5721"}}]]),iT={KGS:"KGS"},lT=["inert"],ha=re(o.defineComponent({__name:"FieldBase",props:o.mergeModels({size:{},iconLeft:{},iconRight:{},hasCounter:{type:Boolean},counter:{},isDisabled:{type:Boolean},hasBorder:{type:Boolean}},{isError:{type:Boolean,default:!1},isErrorModifiers:{}}),emits:o.mergeModels(["click"],["update:isError"]),setup(n,{emit:e}){const t=o.useModel(n,"isError"),r=e;return(a,s)=>(o.openBlock(),o.createElementBlock("div",{inert:a.isDisabled,class:o.normalizeClass([a.$style.root,a.$style[`size_${a.size}`],{[a.$style["is-error"]]:t.value,[a.$style["is-disabled"]]:a.isDisabled,[a.$style["has-border"]]:a.hasBorder}]),onClick:s[0]||(s[0]=i=>r("click"))},[a.iconLeft?(o.openBlock(),o.createBlock(o.unref($e),{key:0,name:a.iconLeft,size:"20",color:"icon-input-base-primary"},null,8,["name"])):o.createCommentVNode("",!0),o.renderSlot(a.$slots,"before"),o.createElementVNode("div",{class:o.normalizeClass(a.$style.content)},[o.renderSlot(a.$slots,"default")],2),o.renderSlot(a.$slots,"after"),a.iconRight?(o.openBlock(),o.createBlock(o.unref($e),{key:1,name:a.iconRight,size:"20",color:"icon-input-base-primary"},null,8,["name"])):o.createCommentVNode("",!0),a.hasCounter?(o.openBlock(),o.createBlock(o.unref(me),{key:2,size:"caption",weight:"regular",color:"foreground-layout-layout-1-surface",class:o.normalizeClass(a.$style.counter)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.counter),1)]),_:1},8,["class"])):o.createCommentVNode("",!0)],10,lT))}}),[["__cssModules",{$style:{root:"FieldBase__root_020d6","has-border":"FieldBase__has-border_c2dbe","is-error":"FieldBase__is-error_81680",content:"FieldBase__content_78377","is-disabled":"FieldBase__is-disabled_459b8",size_34:"FieldBase__size_34_22bbd",size_44:"FieldBase__size_44_a875f",counter:"FieldBase__counter_ea907"}}]]),pa=re(o.defineComponent({__name:"FieldWrapper",props:o.mergeModels({label:{},description:{},errorText:{},isDisabled:{type:Boolean}},{isError:{type:Boolean,default:!1},isErrorModifiers:{}}),emits:["update:isError"],setup(n){const e=o.useModel(n,"isError");return(t,r)=>{const a=o.resolveDirective("auto-animate");return o.withDirectives((o.openBlock(),o.createElementBlock("label",{class:o.normalizeClass(t.$style.root)},[t.label?(o.openBlock(),o.createBlock(o.unref(me),{key:0,class:o.normalizeClass(t.$style.label),size:"subhead",weight:"regular",color:"foreground-layout-layout-1-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(t.label),1)]),_:1},8,["class"])):o.createCommentVNode("",!0),o.renderSlot(t.$slots,"default"),t.description||e.value&&t.errorText?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(t.$style.bottom)},[o.createVNode(o.unref($t),null,{default:o.withCtx(()=>[e.value&&t.errorText?(o.openBlock(),o.createBlock(o.unref(me),{key:0,size:"caption",weight:"regular",color:"foreground-layout-layout-1-critical"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(t.errorText),1)]),_:1})):t.description?(o.openBlock(),o.createBlock(o.unref(me),{key:1,size:"caption",weight:"regular",color:"foreground-layout-layout-1-secondary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(t.description),1)]),_:1})):o.createCommentVNode("",!0)]),_:1})],2)):o.createCommentVNode("",!0)],2)),[[a]])}}}),[["__cssModules",{$style:{root:"FieldWrapper__root_d4f25",label:"FieldWrapper__label_53361",bottom:"FieldWrapper__bottom_3c7b2"}}]]),cT=["type","inputmode","autocomplete","maxlength","placeholder"],eg=re(o.defineComponent({__name:"InputField",props:o.mergeModels({autocomplete:{default:"off"},inputmode:{default:"text"},type:{default:"text"},label:{},description:{},errorText:{},isDisabled:{type:Boolean},name:{},placeholder:{},size:{},iconLeft:{},iconRight:{},hasBorder:{type:Boolean},maxLength:{}},{isError:{type:Boolean,default:!1},isErrorModifiers:{},value:{default:""},valueModifiers:{}}),emits:["update:isError","update:value"],setup(n){const e=o.useModel(n,"isError"),t=o.computed(()=>n.maxLength?Number(n.maxLength)-(r.value.length??0):0),r=o.useModel(n,"value");return(a,s)=>(o.openBlock(),o.createBlock(o.unref(pa),{"is-error":e.value,"onUpdate:isError":s[1]||(s[1]=i=>e.value=i),label:a.label,description:a.description,errorText:a.errorText,isDisabled:a.isDisabled},{default:o.withCtx(()=>[o.createVNode(o.unref(ha),{size:a.size,isError:e.value,isDisabled:a.isDisabled,iconLeft:a.iconLeft,iconRight:a.iconRight,hasBorder:a.hasBorder,hasCounter:!!a.maxLength,counter:t.value},{after:o.withCtx(()=>[o.renderSlot(a.$slots,"after")]),default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("input",{type:a.type,inputmode:a.inputmode,autocomplete:a.autocomplete,maxlength:a.maxLength,"onUpdate:modelValue":s[0]||(s[0]=i=>r.value=i),placeholder:a.placeholder,class:o.normalizeClass([a.$style.input,a.$style[`input-size_${a.size}`]])},null,10,cT),[[o.vModelDynamic,r.value]])]),_:3},8,["size","isError","isDisabled","iconLeft","iconRight","hasBorder","hasCounter","counter"])]),_:3},8,["is-error","label","description","errorText","isDisabled"]))}}),[["__cssModules",{$style:{root:"InputField__root_6129f",input:"InputField__input_df4a0","input-size_34":"InputField__input-size_34_993f4","input-size_44":"InputField__input-size_44_6faed"}}]]),dT={phone:{mask:"+{996} 000 000 000"},rubles:{mask:[{mask:"",lazy:!0},{mask:"num ₽",lazy:!1,blocks:{num:{mask:Number,min:0,thousandsSeparator:" ",radix:",",mapToRadix:["."]}}}]},money:{mask:[{mask:"",lazy:!0},{mask:"num",lazy:!1,blocks:{num:{mask:Number,min:0,thousandsSeparator:" ",radix:",",mapToRadix:["."]}}}]},number:{mask:Number},any:{mask:String},date:{mask:Date,lazy:!0}},uT=re(o.defineComponent({__name:"InputMaskField",props:o.mergeModels({autofocus:{type:Boolean},autocomplete:{default:"off"},inputmode:{default:"text"},type:{default:"text"},label:{},description:{},errorText:{},isDisabled:{type:Boolean},name:{},placeholder:{},size:{},iconLeft:{},iconRight:{},hasBorder:{type:Boolean},maxLength:{},mask:{}},{isError:{type:Boolean,default:!1},isErrorModifiers:{},value:{default:""},valueModifiers:{}}),emits:["update:isError","update:value"],setup(n){const e=o.useModel(n,"isError"),t=o.computed(()=>n.maxLength?Number(n.maxLength)-(r.value.length??0):0),r=o.useModel(n,"value"),a=s=>{if(!n.maxLength)return;const i=s.target;i.value.length>Number(n.maxLength)&&(i.value=i.value.slice(0,Number(n.maxLength)),r.value=i.value)};return(s,i)=>(o.openBlock(),o.createBlock(o.unref(pa),{"is-error":e.value,"onUpdate:isError":i[2]||(i[2]=l=>e.value=l),label:s.label,description:s.description,errorText:s.errorText,isDisabled:s.isDisabled},{default:o.withCtx(()=>[o.createVNode(o.unref(ha),{size:s.size,isError:e.value,isDisabled:s.isDisabled,iconLeft:s.iconLeft,iconRight:s.iconRight,hasBorder:s.hasBorder,hasCounter:!!s.maxLength,counter:t.value},{after:o.withCtx(()=>[o.renderSlot(s.$slots,"after")]),default:o.withCtx(()=>[o.createVNode(o.unref(zi),o.mergeProps({unmasked:r.value,"onUpdate:unmasked":i[0]||(i[0]=l=>r.value=l),class:[s.$style.input,s.$style[`input-size_${s.size}`]],type:s.type,ref:"inputRef"},o.unref(dT)[s.mask??"any"],{unmask:!1,autofocus:s.autofocus,placeholder:s.placeholder,autocomplete:s.autocomplete,inputmode:s.inputmode,onAccept:i[1]||(i[1]=l=>e.value=!1),onInput:a}),null,16,["unmasked","class","type","autofocus","placeholder","autocomplete","inputmode"])]),_:3},8,["size","isError","isDisabled","iconLeft","iconRight","hasBorder","hasCounter","counter"])]),_:3},8,["is-error","label","description","errorText","isDisabled"]))}}),[["__cssModules",{$style:{root:"InputMaskField__root_9b1de",input:"InputMaskField__input_d4474","input-size_34":"InputMaskField__input-size_34_96fa0","input-size_44":"InputMaskField__input-size_44_f3144"}}]]),hT=re(o.defineComponent({__name:"InputPassword",props:{autocomplete:{},inputmode:{},label:{},description:{},errorText:{},isDisabled:{type:Boolean},name:{},placeholder:{},size:{},iconLeft:{},hasBorder:{type:Boolean},maxLength:{}},setup(n){const e=o.ref(!0);function t(){e.value=!e.value}const r=n;return(a,s)=>(o.openBlock(),o.createBlock(o.unref(eg),o.mergeProps(r,{type:e.value?"password":"text"}),{after:o.withCtx(()=>[o.createVNode(o.unref($e),{class:o.normalizeClass(a.$style.icon),name:e.value?"outline-eye-open":"outline-eye-close",color:"icon-input-base-primary",size:"18",onClick:t},null,8,["class","name"])]),_:1},16,["type"]))}}),[["__cssModules",{$style:{root:"InputPassword__root_f2045",icon:"InputPassword__icon_2a0a5"}}]]),pT=["id","readonly"],fT=re(o.defineComponent({__name:"MultiSelectField",props:o.mergeModels({list:{},label:{},description:{},errorText:{},isDisabled:{type:Boolean},name:{},placeholder:{},hasBorder:{type:Boolean},hasSearch:{type:Boolean}},{isError:{type:Boolean,default:!1},isErrorModifiers:{},value:{required:!0,default:[]},valueModifiers:{}}),emits:["update:isError","update:value"],setup(n){const e=o.ref(!1),t=o.ref(""),r=o.useId(),a=o.useModel(n,"isError"),s=o.useModel(n,"value"),i=o.useTemplateRef("input"),{isShowDropdown:l,triggerElementRef:c,parentElementRef:d,setIsShowDropdown:u}=Zn(),h=o.computed(()=>!n.hasSearch||!t.value||!e.value?n.list:n.list.filter(E=>E.text.includes(t.value??"")));o.watch(l,E=>{E===!1&&(e.value=!1)});function p(E){n.list.find(C=>C.id===C.id),s.value.includes(E.id)?s.value=s.value.filter(C=>C!==E.id):s.value.push(E.id),o.nextTick(()=>{var C;(C=i.value)==null||C.focus()})}function m(){t.value&&h.value.length===1&&(s.value.push(h.value[0].id),t.value="")}function f(E){if(E.key==="Enter")return m()}function g(E){s.value.includes(E)&&(s.value=s.value.filter(C=>C!==E))}function x(){l.value||u(!0)}return(E,C)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(pa),{for:o.unref(r),"data-ignore-click-outside":"","is-error":a.value,"onUpdate:isError":C[2]||(C[2]=T=>a.value=T),class:o.normalizeClass(E.$style.root),label:E.label,description:E.description,errorText:E.errorText,isDisabled:E.isDisabled,onClick:x},{default:o.withCtx(()=>[o.createVNode(o.unref(ha),{ref_key:"parentElementRef",ref:d,size:"44",isError:a.value,isDisabled:E.isDisabled,hasBorder:E.hasBorder},{before:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.value,(T,F)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(E.$style["chip-wrapper"]),key:F},[o.createVNode(o.unref(za),{view:"base-secondary",onDelete:I=>g(T)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(T),1)]),_:2},1032,["onDelete"])],2))),128))]),after:o.withCtx(()=>[o.createVNode(o.unref($e),{class:o.normalizeClass([E.$style.icon,{[E.$style["is-open"]]:o.unref(l)}]),size:"18",name:"outline-chevron-down",color:"icon-input-base-primary"},null,8,["class"])]),default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("input",{id:o.unref(r),ref:"input",class:o.normalizeClass(E.$style.field),readonly:!E.hasSearch,"onUpdate:modelValue":C[0]||(C[0]=T=>t.value=T),onKeydown:f,onInput:C[1]||(C[1]=T=>e.value=!0)},null,42,pT),[[o.vModelText,t.value]])]),_:1},8,["isError","isDisabled","hasBorder"])]),_:1},8,["for","is-error","class","label","description","errorText","isDisabled"]),o.createVNode(o.unref(Jn),{isShowDropdown:o.unref(l),"onUpdate:isShowDropdown":C[3]||(C[3]=T=>o.isRef(l)?l.value=T:null),verticalOffset:"4",isStretchToParent:!0},{default:o.withCtx(()=>[o.createVNode(o.unref(Fl),{class:o.normalizeClass(E.$style.popover),borderRadius:12,ref_key:"triggerElementRef",ref:c},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(h.value,T=>(o.openBlock(),o.createBlock(o.unref(ms),{key:T.id,text:T.text,view:"base",isActive:s.value.includes(T.id),onClick:()=>p(T)},{default:o.withCtx(()=>[s.value.includes(T.id)?(o.openBlock(),o.createBlock(o.unref($e),{key:0,name:"outline-check",size:"18",color:"icon-common-base-primary-default"})):o.createCommentVNode("",!0)]),_:2},1032,["text","isActive","onClick"]))),128))]),_:1},8,["class"])]),_:1},8,["isShowDropdown"])],64))}}),[["__cssModules",{$style:{root:"MultiSelectField__root_23a3e",icon:"MultiSelectField__icon_368be","is-open":"MultiSelectField__is-open_6e643",field:"MultiSelectField__field_c2201",popover:"MultiSelectField__popover_d5f47","chip-wrapper":"MultiSelectField__chip-wrapper_5bc66"}}]]),mT=["readonly"],gT=re(o.defineComponent({__name:"SelectField",props:o.mergeModels({list:{},label:{},description:{},errorText:{},isDisabled:{type:Boolean},name:{},placeholder:{},iconLeft:{},iconRight:{},hasBorder:{type:Boolean},hasSearch:{type:Boolean}},{isError:{type:Boolean,default:!1},isErrorModifiers:{},value:{default:""},valueModifiers:{}}),emits:["update:isError","update:value"],setup(n){const e=o.ref(!1),t=o.ref(""),r=o.useModel(n,"isError"),a=o.useModel(n,"value"),{isShowDropdown:s,triggerElementRef:i,parentElementRef:l}=Zn(),c=o.computed(()=>!n.hasSearch||!t.value||!e.value?n.list:n.list.filter(d=>d.text.includes(t.value??"")));return o.watch(a,d=>{var u;t.value=((u=n.list.find(h=>h.id===d))==null?void 0:u.text)??""},{immediate:!0}),o.watch(s,d=>{d===!1&&(e.value=!1)}),(d,u)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(pa),{"is-error":r.value,"onUpdate:isError":u[3]||(u[3]=h=>r.value=h),class:o.normalizeClass(d.$style.root),label:d.label,description:d.description,errorText:d.errorText,isDisabled:d.isDisabled},{default:o.withCtx(()=>[o.createVNode(o.unref(ha),{ref_key:"parentElementRef",ref:l,size:"44",isError:r.value,isDisabled:d.isDisabled,iconLeft:d.iconLeft,iconRight:d.iconRight,hasBorder:d.hasBorder,onClick:u[2]||(u[2]=h=>s.value=!o.unref(s))},{after:o.withCtx(()=>[o.createVNode(o.unref($e),{class:o.normalizeClass([d.$style.icon,{[d.$style["is-open"]]:o.unref(s)}]),size:"18",name:"outline-chevron-down",color:"icon-input-base-primary"},null,8,["class"])]),default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("input",{class:o.normalizeClass(d.$style.field),readonly:!d.hasSearch,"onUpdate:modelValue":u[0]||(u[0]=h=>t.value=h),onInput:u[1]||(u[1]=h=>e.value=!0)},null,42,mT),[[o.vModelText,t.value]])]),_:1},8,["isError","isDisabled","iconLeft","iconRight","hasBorder"])]),_:1},8,["is-error","class","label","description","errorText","isDisabled"]),o.createVNode(o.unref(Jn),{isShowDropdown:o.unref(s),"onUpdate:isShowDropdown":u[4]||(u[4]=h=>o.isRef(s)?s.value=h:null),verticalOffset:"4",isStretchToParent:!0},{default:o.withCtx(()=>[o.createVNode(o.unref(Fl),{class:o.normalizeClass(d.$style.popover),borderRadius:12,ref_key:"triggerElementRef",ref:i},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.value,h=>(o.openBlock(),o.createBlock(o.unref(ms),{key:h.id,text:h.text,view:"base",isActive:h.id===a.value,onClick:()=>{a.value=h.id,s.value=!1,t.value=h.text}},{default:o.withCtx(()=>[h.id===a.value?(o.openBlock(),o.createBlock(o.unref($e),{key:0,name:"outline-check",size:"18",color:"icon-common-base-primary-default"})):o.createCommentVNode("",!0)]),_:2},1032,["text","isActive","onClick"]))),128))]),_:1},8,["class"])]),_:1},8,["isShowDropdown"])],64))}}),[["__cssModules",{$style:{root:"SelectField__root_62305",icon:"SelectField__icon_161d0","is-open":"SelectField__is-open_c25f4",field:"SelectField__field_71d4e",popover:"SelectField__popover_078de"}}]]),yT=["placeholder"],bT=re(o.defineComponent({__name:"MultiInputField",props:o.mergeModels({label:{},description:{},errorText:{},isDisabled:{type:Boolean},name:{},placeholder:{},hasBorder:{type:Boolean},maxLength:{}},{isError:{type:Boolean,default:!1},isErrorModifiers:{},value:{required:!0,default:new Set},valueModifiers:{}}),emits:["update:isError","update:value"],setup(n){const e=o.ref(""),t=o.useModel(n,"isError"),r=o.useModel(n,"value");function a(c){e.value&&i.value&&c.key==="Enter"&&(r.value.add(e.value),e.value="")}function s(c){r.value.has(c)&&r.value.delete(c)}const i=o.computed(()=>n.maxLength?r.value.size<Number(n.maxLength):!0),l=o.computed(()=>n.maxLength?`${r.value.size}/${n.maxLength}`:void 0);return(c,d)=>(o.openBlock(),o.createBlock(o.unref(pa),{"is-error":t.value,"onUpdate:isError":d[1]||(d[1]=u=>t.value=u),label:c.label,description:c.description,errorText:c.errorText,isDisabled:c.isDisabled},{default:o.withCtx(()=>[o.createVNode(o.unref(ha),{ref:"parentElementRef",size:"44",class:o.normalizeClass(c.$style.wrapper),isError:t.value,isDisabled:c.isDisabled,hasBorder:c.hasBorder,hasCounter:!!c.maxLength,counter:l.value},{before:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,(u,h)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(c.$style["chip-wrapper"]),key:h},[o.createVNode(o.unref(za),{onDelete:p=>s(u)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(u),1)]),_:2},1032,["onDelete"])],2))),128))]),default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("input",{class:o.normalizeClass(c.$style.field),placeholder:c.placeholder,"onUpdate:modelValue":d[0]||(d[0]=u=>e.value=u),onKeydown:a},null,42,yT),[[o.vModelText,e.value]])]),_:1},8,["class","isError","isDisabled","hasBorder","hasCounter","counter"])]),_:1},8,["is-error","label","description","errorText","isDisabled"]))}}),[["__cssModules",{$style:{root:"MultiInputField__root_32acd",wrapper:"MultiInputField__wrapper_ac300","chip-wrapper":"MultiInputField__chip-wrapper_64b92",input:"MultiInputField__input_2ad8e"}}]]),kT=["onClick"],vT=re(o.defineComponent({__name:"Tabs",props:o.mergeModels({value:{},label:{},view:{},size:{},isDisabled:{type:Boolean},data:{}},{value:{required:!0},valueModifiers:{}}),emits:["update:value"],setup(n){const e=o.useModel(n,"value"),t=o.useCssModule(),r=o.ref([]),a=o.ref({transform:"translateX(0)",width:"0",height:"0"}),s=o.ref(!1);function i(g,x){g&&(r.value[x]=g)}function l(g){const x=r.value[g];if(x){const{offsetLeft:E,offsetWidth:C,offsetHeight:T}=x,F={transform:`translateX(${E}px)`,width:`${C}px`,height:n.view==="flat"?"1px":`${T}px`};a.value=F,s.value&&(a.value={...F,transition:"transform 0.3s ease, width 0.3s ease"})}}function c(g){return n.data.findIndex(x=>x.id===g)}function d(g){n.isDisabled||(e.value=n.data[g].id)}function u(){const g=c(e.value);g!==-1&&o.nextTick(()=>l(g))}o.onMounted(()=>{o.nextTick(()=>{const g=c(e.value);g!==-1&&l(g),s.value=!0}),window.addEventListener("resize",u,{passive:!0})}),o.onBeforeUnmount(()=>{window.removeEventListener("resize",u)}),o.watch(e,g=>{const x=c(g);x!==-1&&o.nextTick(()=>l(x))});const h=o.computed(()=>({default:"text-common-base-primary-default",flat:"foreground-layout-layout-1-secondary","flat-secondary":"text-common-base-secondary-default"})[n.view]),p=o.computed(()=>{switch(n.view){case"default":return n.size==="28_caption"?"caption":"subhead";case"flat":return n.size==="subhead"?"subhead":"body";case"flat-secondary":return"subhead";default:return"subhead"}}),m=o.computed(()=>n.size==="28_caption"?16:18);function f(){n.view==="flat-secondary"&&console.warn(`[Tabs] 'view="${n.view}"' не поддерживает props size "${n.size}"
|
|
84
|
+
*/let rx=class{constructor({data:e,config:t,api:r,readOnly:a}){this.api=r,this.readOnly=a,this._settings=t,this._data=this.normalizeData(e),this._element=this.getTag()}get _CSS(){return{block:this.api.styles.block,wrapper:"ce-header"}}isHeaderData(e){return e.text!==void 0}normalizeData(e){const t={text:"",level:this.defaultLevel.number};return this.isHeaderData(e)&&(t.text=e.text||"",e.level!==void 0&&!isNaN(parseInt(e.level.toString()))&&(t.level=parseInt(e.level.toString()))),t}render(){return this._element}renderSettings(){return this.levels.map(e=>({icon:e.svg,label:this.api.i18n.t(`Heading ${e.number}`),onActivate:()=>this.setLevel(e.number),closeOnActivate:!0,isActive:this.currentLevel.number===e.number,render:()=>document.createElement("div")}))}setLevel(e){this.data={level:e,text:this.data.text}}merge(e){this._element.insertAdjacentHTML("beforeend",e.text)}validate(e){return e.text.trim()!==""}save(e){return{text:e.innerHTML,level:this.currentLevel.number}}static get conversionConfig(){return{export:"text",import:"text"}}static get sanitize(){return{level:!1,text:{}}}static get isReadOnlySupported(){return!0}get data(){return this._data.text=this._element.innerHTML,this._data.level=this.currentLevel.number,this._data}set data(e){if(this._data=this.normalizeData(e),e.level!==void 0&&this._element.parentNode){const t=this.getTag();t.innerHTML=this._element.innerHTML,this._element.parentNode.replaceChild(t,this._element),this._element=t}e.text!==void 0&&(this._element.innerHTML=this._data.text||"")}getTag(){const e=document.createElement(this.currentLevel.tag);return e.innerHTML=this._data.text||"",e.classList.add(this._CSS.wrapper),e.contentEditable=this.readOnly?"false":"true",e.dataset.placeholder=this.api.i18n.t(this._settings.placeholder||""),e}get currentLevel(){let e=this.levels.find(t=>t.number===this._data.level);return e||(e=this.defaultLevel),e}get defaultLevel(){if(this._settings.defaultLevel){const e=this.levels.find(t=>t.number===this._settings.defaultLevel);if(e)return e;console.warn("(ง'̀-'́)ง Heading Tool: the default level specified was not found in available levels")}return this.levels[1]}get levels(){const e=[{number:1,tag:"H1",svg:QS},{number:2,tag:"H2",svg:ZS},{number:3,tag:"H3",svg:JS},{number:4,tag:"H4",svg:ex},{number:5,tag:"H5",svg:tx},{number:6,tag:"H6",svg:nx}];return this._settings.levels?e.filter(t=>this._settings.levels.includes(t.number)):e}onPaste(e){const t=e.detail;if("data"in t){const r=t.data;let a=this.defaultLevel.number;switch(r.tagName){case"H1":a=1;break;case"H2":a=2;break;case"H3":a=3;break;case"H4":a=4;break;case"H5":a=5;break;case"H6":a=6;break}this._settings.levels&&(a=this._settings.levels.reduce((s,i)=>Math.abs(i-a)<Math.abs(s-a)?i:s)),this.data={level:a,text:r.innerHTML}}}static get pasteConfig(){return{tags:["H1","H2","H3","H4","H5","H6"]}}static get toolbox(){return{icon:ox,title:"Heading"}}};(function(){try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode('.cdx-list{margin:0;padding:0;outline:none;display:grid;counter-reset:item;gap:var(--spacing-s);padding:var(--spacing-xs);--spacing-s: 8px;--spacing-xs: 6px;--list-counter-type: numeric;--radius-border: 5px;--checkbox-background: #fff;--color-border: #C9C9C9;--color-bg-checked: #369FFF;--line-height: 1.45em;--color-bg-checked-hover: #0059AB;--color-tick: #fff;--size-checkbox: 1.2em}.cdx-list__item{line-height:var(--line-height);display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;grid-template-areas:"checkbox content" ". child"}.cdx-list__item-children{display:grid;grid-area:child;gap:var(--spacing-s);padding-top:var(--spacing-s)}.cdx-list__item [contenteditable]{outline:none}.cdx-list__item-content{word-break:break-word;white-space:pre-wrap;grid-area:content;padding-left:var(--spacing-s)}.cdx-list__item:before{counter-increment:item;white-space:nowrap}.cdx-list-ordered .cdx-list__item:before{content:counters(item,".",var(--list-counter-type)) "."}.cdx-list-ordered{counter-reset:item}.cdx-list-unordered .cdx-list__item:before{content:"•"}.cdx-list-checklist .cdx-list__item:before{content:""}.cdx-list__settings .cdx-settings-button{width:50%}.cdx-list__checkbox{padding-top:calc((var(--line-height) - var(--size-checkbox)) / 2);grid-area:checkbox;width:var(--size-checkbox);height:var(--size-checkbox);display:flex;cursor:pointer}.cdx-list__checkbox svg{opacity:0;height:var(--size-checkbox);width:var(--size-checkbox);left:-1px;top:-1px;position:absolute}@media (hover: hover){.cdx-list__checkbox:not(.cdx-list__checkbox--no-hover):hover .cdx-list__checkbox-check svg{opacity:1}}.cdx-list__checkbox--checked{line-height:var(--line-height)}@media (hover: hover){.cdx-list__checkbox--checked:not(.cdx-list__checkbox--checked--no-hover):hover .cdx-checklist__checkbox-check{background:var(--color-bg-checked-hover);border-color:var(--color-bg-checked-hover)}}.cdx-list__checkbox--checked .cdx-list__checkbox-check{background:var(--color-bg-checked);border-color:var(--color-bg-checked)}.cdx-list__checkbox--checked .cdx-list__checkbox-check svg{opacity:1}.cdx-list__checkbox--checked .cdx-list__checkbox-check svg path{stroke:var(--color-tick)}.cdx-list__checkbox--checked .cdx-list__checkbox-check:before{opacity:0;visibility:visible;transform:scale(2.5)}.cdx-list__checkbox-check{cursor:pointer;display:inline-block;position:relative;margin:0 auto;width:var(--size-checkbox);height:var(--size-checkbox);box-sizing:border-box;border-radius:var(--radius-border);border:1px solid var(--color-border);background:var(--checkbox-background)}.cdx-list__checkbox-check:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:100%;background-color:var(--color-bg-checked);visibility:hidden;pointer-events:none;transform:scale(1);transition:transform .4s ease-out,opacity .4s}.cdx-list-start-with-field{background:#F8F8F8;border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:2px;display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:auto}.cdx-list-start-with-field--invalid{background:#FFECED;border:1px solid #E13F3F}.cdx-list-start-with-field--invalid .cdx-list-start-with-field__input{color:#e13f3f}.cdx-list-start-with-field__input{font-size:14px;outline:none;font-weight:500;font-family:inherit;border:0;background:transparent;margin:0;padding:0;line-height:22px;min-width:calc(100% - var(--toolbox-buttons-size) - var(--icon-margin-right))}.cdx-list-start-with-field__input::placeholder{color:var(--grayText);font-weight:500}')),document.head.appendChild(n)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();const ax='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7 12L10.4884 15.8372C10.5677 15.9245 10.705 15.9245 10.7844 15.8372L17 9"/></svg>',wm='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M9.2 12L11.0586 13.8586C11.1367 13.9367 11.2633 13.9367 11.3414 13.8586L14.7 10.5"/><rect width="14" height="14" x="5" y="5" stroke="currentColor" stroke-width="2" rx="4"/></svg>',_m='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><line x1="9" x2="19" y1="7" y2="7" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><line x1="9" x2="19" y1="12" y2="12" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><line x1="9" x2="19" y1="17" y2="17" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M5.00001 17H4.99002"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M5.00001 12H4.99002"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M5.00001 7H4.99002"/></svg>',Cm='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><line x1="12" x2="19" y1="7" y2="7" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><line x1="12" x2="19" y1="12" y2="12" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><line x1="12" x2="19" y1="17" y2="17" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7.79999 14L7.79999 7.2135C7.79999 7.12872 7.7011 7.0824 7.63597 7.13668L4.79999 9.5"/></svg>',sx='<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 14.2L10 7.4135C10 7.32872 9.90111 7.28241 9.83598 7.33668L7 9.7" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M13.2087 14.2H13.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>',ix='<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.2087 14.2H13.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M10 14.2L10 9.5" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M10 7.01L10 7" stroke="black" stroke-width="1.8" stroke-linecap="round"/></svg>',lx='<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.2087 14.2H13.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M10 14.2L10 7.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>',cx='<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.0087 14.2H16" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M7 14.2L7.78865 12M13 14.2L12.1377 12M7.78865 12C7.78865 12 9.68362 7 10 7C10.3065 7 12.1377 12 12.1377 12M7.78865 12L12.1377 12" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>',dx='<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.2087 14.2H14.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M11.5 14.5C11.5 14.5 11 13.281 11 12.5M7 9.5C7 9.5 7.5 8.5 9 8.5C10.5 8.5 11 9.5 11 10.5L11 11.5M11 11.5L11 12.5M11 11.5C11 11.5 7 11 7 13C7 15.3031 11 15 11 12.5" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>',ux='<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8 14.2L8 7.4135C8 7.32872 7.90111 7.28241 7.83598 7.33668L5 9.7" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M14 13L16.4167 10.7778M16.4167 10.7778L14 8.5M16.4167 10.7778H11.6562" stroke="black" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>';var Vs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hx(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var a=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return n[r]}})}),t}var Ge={},sd={},id={};Object.defineProperty(id,"__esModule",{value:!0}),id.allInputsSelector=px;function px(){var n=["text","password","email","number","search","tel","url"];return"[contenteditable=true], textarea, input:not([type]), "+n.map(function(e){return'input[type="'.concat(e,'"]')}).join(", ")}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.allInputsSelector=void 0;var e=id;Object.defineProperty(n,"allInputsSelector",{enumerable:!0,get:function(){return e.allInputsSelector}})})(sd);var zo={},ld={};Object.defineProperty(ld,"__esModule",{value:!0}),ld.isNativeInput=fx;function fx(n){var e=["INPUT","TEXTAREA"];return n&&n.tagName?e.includes(n.tagName):!1}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isNativeInput=void 0;var e=ld;Object.defineProperty(n,"isNativeInput",{enumerable:!0,get:function(){return e.isNativeInput}})})(zo);var Em={},cd={};Object.defineProperty(cd,"__esModule",{value:!0}),cd.append=mx;function mx(n,e){Array.isArray(e)?e.forEach(function(t){n.appendChild(t)}):n.appendChild(e)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.append=void 0;var e=cd;Object.defineProperty(n,"append",{enumerable:!0,get:function(){return e.append}})})(Em);var dd={},ud={};Object.defineProperty(ud,"__esModule",{value:!0}),ud.blockElements=gx;function gx(){return["address","article","aside","blockquote","canvas","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","ruby","section","table","tbody","thead","tr","tfoot","ul","video"]}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.blockElements=void 0;var e=ud;Object.defineProperty(n,"blockElements",{enumerable:!0,get:function(){return e.blockElements}})})(dd);var Sm={},hd={};Object.defineProperty(hd,"__esModule",{value:!0}),hd.calculateBaseline=yx;function yx(n){var e=window.getComputedStyle(n),t=parseFloat(e.fontSize),r=parseFloat(e.lineHeight)||t*1.2,a=parseFloat(e.paddingTop),s=parseFloat(e.borderTopWidth),i=parseFloat(e.marginTop),l=t*.8,c=(r-t)/2,d=i+s+a+c+l;return d}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.calculateBaseline=void 0;var e=hd;Object.defineProperty(n,"calculateBaseline",{enumerable:!0,get:function(){return e.calculateBaseline}})})(Sm);var xm={},pd={},fd={},md={};Object.defineProperty(md,"__esModule",{value:!0}),md.isContentEditable=bx;function bx(n){return n.contentEditable==="true"}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isContentEditable=void 0;var e=md;Object.defineProperty(n,"isContentEditable",{enumerable:!0,get:function(){return e.isContentEditable}})})(fd),Object.defineProperty(pd,"__esModule",{value:!0}),pd.canSetCaret=wx;var kx=zo,vx=fd;function wx(n){var e=!0;if((0,kx.isNativeInput)(n))switch(n.type){case"file":case"checkbox":case"radio":case"hidden":case"submit":case"button":case"image":case"reset":e=!1;break}else e=(0,vx.isContentEditable)(n);return e}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.canSetCaret=void 0;var e=pd;Object.defineProperty(n,"canSetCaret",{enumerable:!0,get:function(){return e.canSetCaret}})})(xm);var Hs={},gd={};function _x(n,e,t){const r=t.value!==void 0?"value":"get",a=t[r],s=`#${e}Cache`;if(t[r]=function(...i){return this[s]===void 0&&(this[s]=a.apply(this,i)),this[s]},r==="get"&&t.set){const i=t.set;t.set=function(l){delete n[s],i.apply(this,l)}}return t}function Bm(){const n={win:!1,mac:!1,x11:!1,linux:!1},e=Object.keys(n).find(t=>window.navigator.appVersion.toLowerCase().indexOf(t)!==-1);return e!==void 0&&(n[e]=!0),n}function yd(n){return n!=null&&n!==""&&(typeof n!="object"||Object.keys(n).length>0)}function Cx(n){return!yd(n)}const Ex=()=>typeof window<"u"&&window.navigator!==null&&yd(window.navigator.platform)&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1);function Sx(n){const e=Bm();return n=n.replace(/shift/gi,"⇧").replace(/backspace/gi,"⌫").replace(/enter/gi,"⏎").replace(/up/gi,"↑").replace(/left/gi,"→").replace(/down/gi,"↓").replace(/right/gi,"←").replace(/escape/gi,"⎋").replace(/insert/gi,"Ins").replace(/delete/gi,"␡").replace(/\+/gi,"+"),e.mac?n=n.replace(/ctrl|cmd/gi,"⌘").replace(/alt/gi,"⌥"):n=n.replace(/cmd/gi,"Ctrl").replace(/windows/gi,"WIN"),n}function xx(n){return n[0].toUpperCase()+n.slice(1)}function Bx(n){const e=document.createElement("div");e.style.position="absolute",e.style.left="-999px",e.style.bottom="-999px",e.innerHTML=n,document.body.appendChild(e);const t=window.getSelection(),r=document.createRange();if(r.selectNode(e),t===null)throw new Error("Cannot copy text to clipboard");t.removeAllRanges(),t.addRange(r),document.execCommand("copy"),document.body.removeChild(e)}function Tx(n,e,t){let r;return(...a)=>{const s=this,i=()=>{r=void 0,t!==!0&&n.apply(s,a)},l=t===!0&&r!==void 0;window.clearTimeout(r),r=window.setTimeout(i,e),l&&n.apply(s,a)}}function po(n){return Object.prototype.toString.call(n).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function $x(n){return po(n)==="boolean"}function Tm(n){return po(n)==="function"||po(n)==="asyncfunction"}function Mx(n){return Tm(n)&&/^\s*class\s+/.test(n.toString())}function Dx(n){return po(n)==="number"}function js(n){return po(n)==="object"}function Ox(n){return Promise.resolve(n)===n}function Ax(n){return po(n)==="string"}function Ix(n){return po(n)==="undefined"}function bd(n,...e){if(!e.length)return n;const t=e.shift();if(js(n)&&js(t))for(const r in t)js(t[r])?(n[r]===void 0&&Object.assign(n,{[r]:{}}),bd(n[r],t[r])):Object.assign(n,{[r]:t[r]});return bd(n,...e)}function Nx(n,e,t){const r=`«${e}» is deprecated and will be removed in the next major release. Please use the «${t}» instead.`;n&&console.warn(r)}function Px(n){try{return new URL(n).href}catch{}return n.substring(0,2)==="//"?window.location.protocol+n:window.location.origin+n}function Lx(n){return n>47&&n<58||n===32||n===13||n===229||n>64&&n<91||n>95&&n<112||n>185&&n<193||n>218&&n<223}const zx={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,LEFT:37,UP:38,DOWN:40,RIGHT:39,DELETE:46,META:91,SLASH:191},Fx={LEFT:0,WHEEL:1,RIGHT:2,BACKWARD:3,FORWARD:4};class Rx{constructor(){this.completed=Promise.resolve()}add(e){return new Promise((t,r)=>{this.completed=this.completed.then(e).then(t).catch(r)})}}function Vx(n,e,t=void 0){let r,a,s,i=null,l=0;t||(t={});const c=function(){l=t.leading===!1?0:Date.now(),i=null,s=n.apply(r,a),i===null&&(r=a=null)};return function(){const d=Date.now();!l&&t.leading===!1&&(l=d);const u=e-(d-l);return r=this,a=arguments,u<=0||u>e?(i&&(clearTimeout(i),i=null),l=d,s=n.apply(r,a),i===null&&(r=a=null)):!i&&t.trailing!==!1&&(i=setTimeout(c,u)),s}}const Hx=Object.freeze(Object.defineProperty({__proto__:null,PromiseQueue:Rx,beautifyShortcut:Sx,cacheable:_x,capitalize:xx,copyTextToClipboard:Bx,debounce:Tx,deepMerge:bd,deprecationAssert:Nx,getUserOS:Bm,getValidUrl:Px,isBoolean:$x,isClass:Mx,isEmpty:Cx,isFunction:Tm,isIosDevice:Ex,isNumber:Dx,isObject:js,isPrintableKey:Lx,isPromise:Ox,isString:Ax,isUndefined:Ix,keyCodes:zx,mouseButtons:Fx,notEmpty:yd,throttle:Vx,typeOf:po},Symbol.toStringTag,{value:"Module"})),kd=hx(Hx);Object.defineProperty(gd,"__esModule",{value:!0}),gd.containsOnlyInlineElements=Ux;var jx=kd,Yx=dd;function Ux(n){var e;(0,jx.isString)(n)?(e=document.createElement("div"),e.innerHTML=n):e=n;var t=function(r){return!(0,Yx.blockElements)().includes(r.tagName.toLowerCase())&&Array.from(r.children).every(t)};return Array.from(e.children).every(t)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.containsOnlyInlineElements=void 0;var e=gd;Object.defineProperty(n,"containsOnlyInlineElements",{enumerable:!0,get:function(){return e.containsOnlyInlineElements}})})(Hs);var $m={},vd={},Ys={},wd={};Object.defineProperty(wd,"__esModule",{value:!0}),wd.make=Wx;function Wx(n,e,t){var r;e===void 0&&(e=null),t===void 0&&(t={});var a=document.createElement(n);if(Array.isArray(e)){var s=e.filter(function(l){return l!==void 0});(r=a.classList).add.apply(r,s)}else e!==null&&a.classList.add(e);for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(a[i]=t[i]);return a}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.make=void 0;var e=wd;Object.defineProperty(n,"make",{enumerable:!0,get:function(){return e.make}})})(Ys),Object.defineProperty(vd,"__esModule",{value:!0}),vd.fragmentToString=Gx;var qx=Ys;function Gx(n){var e=(0,qx.make)("div");return e.appendChild(n),e.innerHTML}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.fragmentToString=void 0;var e=vd;Object.defineProperty(n,"fragmentToString",{enumerable:!0,get:function(){return e.fragmentToString}})})($m);var Mm={},_d={};Object.defineProperty(_d,"__esModule",{value:!0}),_d.getContentLength=Xx;var Kx=zo;function Xx(n){var e,t;return(0,Kx.isNativeInput)(n)?n.value.length:n.nodeType===Node.TEXT_NODE?n.length:(t=(e=n.textContent)===null||e===void 0?void 0:e.length)!==null&&t!==void 0?t:0}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getContentLength=void 0;var e=_d;Object.defineProperty(n,"getContentLength",{enumerable:!0,get:function(){return e.getContentLength}})})(Mm);var Cd={},Ed={},Dm=Vs&&Vs.__spreadArray||function(n,e,t){if(t||arguments.length===2)for(var r=0,a=e.length,s;r<a;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return n.concat(s||Array.prototype.slice.call(e))};Object.defineProperty(Ed,"__esModule",{value:!0}),Ed.getDeepestBlockElements=Om;var Qx=Hs;function Om(n){return(0,Qx.containsOnlyInlineElements)(n)?[n]:Array.from(n.children).reduce(function(e,t){return Dm(Dm([],e,!0),Om(t),!0)},[])}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getDeepestBlockElements=void 0;var e=Ed;Object.defineProperty(n,"getDeepestBlockElements",{enumerable:!0,get:function(){return e.getDeepestBlockElements}})})(Cd);var Am={},Sd={},Us={},xd={};Object.defineProperty(xd,"__esModule",{value:!0}),xd.isLineBreakTag=Zx;function Zx(n){return["BR","WBR"].includes(n.tagName)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isLineBreakTag=void 0;var e=xd;Object.defineProperty(n,"isLineBreakTag",{enumerable:!0,get:function(){return e.isLineBreakTag}})})(Us);var Ws={},Bd={};Object.defineProperty(Bd,"__esModule",{value:!0}),Bd.isSingleTag=Jx;function Jx(n){return["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"].includes(n.tagName)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isSingleTag=void 0;var e=Bd;Object.defineProperty(n,"isSingleTag",{enumerable:!0,get:function(){return e.isSingleTag}})})(Ws),Object.defineProperty(Sd,"__esModule",{value:!0}),Sd.getDeepestNode=Im;var eB=zo,tB=Us,nB=Ws;function Im(n,e){e===void 0&&(e=!1);var t=e?"lastChild":"firstChild",r=e?"previousSibling":"nextSibling";if(n.nodeType===Node.ELEMENT_NODE&&n[t]){var a=n[t];if((0,nB.isSingleTag)(a)&&!(0,eB.isNativeInput)(a)&&!(0,tB.isLineBreakTag)(a))if(a[r])a=a[r];else if(a.parentNode!==null&&a.parentNode[r])a=a.parentNode[r];else return a.parentNode;return Im(a,e)}return n}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getDeepestNode=void 0;var e=Sd;Object.defineProperty(n,"getDeepestNode",{enumerable:!0,get:function(){return e.getDeepestNode}})})(Am);var Nm={},Td={},qs=Vs&&Vs.__spreadArray||function(n,e,t){if(t||arguments.length===2)for(var r=0,a=e.length,s;r<a;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return n.concat(s||Array.prototype.slice.call(e))};Object.defineProperty(Td,"__esModule",{value:!0}),Td.findAllInputs=iB;var oB=Hs,rB=Cd,aB=sd,sB=zo;function iB(n){return Array.from(n.querySelectorAll((0,aB.allInputsSelector)())).reduce(function(e,t){return(0,sB.isNativeInput)(t)||(0,oB.containsOnlyInlineElements)(t)?qs(qs([],e,!0),[t],!1):qs(qs([],e,!0),(0,rB.getDeepestBlockElements)(t),!0)},[])}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.findAllInputs=void 0;var e=Td;Object.defineProperty(n,"findAllInputs",{enumerable:!0,get:function(){return e.findAllInputs}})})(Nm);var Pm={},$d={};Object.defineProperty($d,"__esModule",{value:!0}),$d.isCollapsedWhitespaces=lB;function lB(n){return!/[^\t\n\r ]/.test(n)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isCollapsedWhitespaces=void 0;var e=$d;Object.defineProperty(n,"isCollapsedWhitespaces",{enumerable:!0,get:function(){return e.isCollapsedWhitespaces}})})(Pm);var Md={},Dd={};Object.defineProperty(Dd,"__esModule",{value:!0}),Dd.isElement=dB;var cB=kd;function dB(n){return(0,cB.isNumber)(n)?!1:!!n&&!!n.nodeType&&n.nodeType===Node.ELEMENT_NODE}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isElement=void 0;var e=Dd;Object.defineProperty(n,"isElement",{enumerable:!0,get:function(){return e.isElement}})})(Md);var Lm={},Od={},Ad={},Id={};Object.defineProperty(Id,"__esModule",{value:!0}),Id.isLeaf=uB;function uB(n){return n===null?!1:n.childNodes.length===0}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isLeaf=void 0;var e=Id;Object.defineProperty(n,"isLeaf",{enumerable:!0,get:function(){return e.isLeaf}})})(Ad);var Nd={},Pd={};Object.defineProperty(Pd,"__esModule",{value:!0}),Pd.isNodeEmpty=gB;var hB=Us,pB=Md,fB=zo,mB=Ws;function gB(n,e){var t="";return(0,mB.isSingleTag)(n)&&!(0,hB.isLineBreakTag)(n)?!1:((0,pB.isElement)(n)&&(0,fB.isNativeInput)(n)?t=n.value:n.textContent!==null&&(t=n.textContent.replace("","")),e!==void 0&&(t=t.replace(new RegExp(e,"g"),"")),t.trim().length===0)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isNodeEmpty=void 0;var e=Pd;Object.defineProperty(n,"isNodeEmpty",{enumerable:!0,get:function(){return e.isNodeEmpty}})})(Nd),Object.defineProperty(Od,"__esModule",{value:!0}),Od.isEmpty=kB;var yB=Ad,bB=Nd;function kB(n,e){n.normalize();for(var t=[n];t.length>0;){var r=t.shift();if(r){if(n=r,(0,yB.isLeaf)(n)&&!(0,bB.isNodeEmpty)(n,e))return!1;t.push.apply(t,Array.from(n.childNodes))}}return!0}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isEmpty=void 0;var e=Od;Object.defineProperty(n,"isEmpty",{enumerable:!0,get:function(){return e.isEmpty}})})(Lm);var zm={},Ld={};Object.defineProperty(Ld,"__esModule",{value:!0}),Ld.isFragment=wB;var vB=kd;function wB(n){return(0,vB.isNumber)(n)?!1:!!n&&!!n.nodeType&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isFragment=void 0;var e=Ld;Object.defineProperty(n,"isFragment",{enumerable:!0,get:function(){return e.isFragment}})})(zm);var Fm={},zd={};Object.defineProperty(zd,"__esModule",{value:!0}),zd.isHTMLString=CB;var _B=Ys;function CB(n){var e=(0,_B.make)("div");return e.innerHTML=n,e.childElementCount>0}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isHTMLString=void 0;var e=zd;Object.defineProperty(n,"isHTMLString",{enumerable:!0,get:function(){return e.isHTMLString}})})(Fm);var Rm={},Fd={};Object.defineProperty(Fd,"__esModule",{value:!0}),Fd.offset=EB;function EB(n){var e=n.getBoundingClientRect(),t=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop,a=e.top+r,s=e.left+t;return{top:a,left:s,bottom:a+e.height,right:s+e.width}}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.offset=void 0;var e=Fd;Object.defineProperty(n,"offset",{enumerable:!0,get:function(){return e.offset}})})(Rm);var Vm={},Rd={};Object.defineProperty(Rd,"__esModule",{value:!0}),Rd.prepend=SB;function SB(n,e){Array.isArray(e)?(e=e.reverse(),e.forEach(function(t){return n.prepend(t)})):n.prepend(e)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.prepend=void 0;var e=Rd;Object.defineProperty(n,"prepend",{enumerable:!0,get:function(){return e.prepend}})})(Vm),function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.prepend=n.offset=n.make=n.isLineBreakTag=n.isSingleTag=n.isNodeEmpty=n.isLeaf=n.isHTMLString=n.isFragment=n.isEmpty=n.isElement=n.isContentEditable=n.isCollapsedWhitespaces=n.findAllInputs=n.isNativeInput=n.allInputsSelector=n.getDeepestNode=n.getDeepestBlockElements=n.getContentLength=n.fragmentToString=n.containsOnlyInlineElements=n.canSetCaret=n.calculateBaseline=n.blockElements=n.append=void 0;var e=sd;Object.defineProperty(n,"allInputsSelector",{enumerable:!0,get:function(){return e.allInputsSelector}});var t=zo;Object.defineProperty(n,"isNativeInput",{enumerable:!0,get:function(){return t.isNativeInput}});var r=Em;Object.defineProperty(n,"append",{enumerable:!0,get:function(){return r.append}});var a=dd;Object.defineProperty(n,"blockElements",{enumerable:!0,get:function(){return a.blockElements}});var s=Sm;Object.defineProperty(n,"calculateBaseline",{enumerable:!0,get:function(){return s.calculateBaseline}});var i=xm;Object.defineProperty(n,"canSetCaret",{enumerable:!0,get:function(){return i.canSetCaret}});var l=Hs;Object.defineProperty(n,"containsOnlyInlineElements",{enumerable:!0,get:function(){return l.containsOnlyInlineElements}});var c=$m;Object.defineProperty(n,"fragmentToString",{enumerable:!0,get:function(){return c.fragmentToString}});var d=Mm;Object.defineProperty(n,"getContentLength",{enumerable:!0,get:function(){return d.getContentLength}});var u=Cd;Object.defineProperty(n,"getDeepestBlockElements",{enumerable:!0,get:function(){return u.getDeepestBlockElements}});var h=Am;Object.defineProperty(n,"getDeepestNode",{enumerable:!0,get:function(){return h.getDeepestNode}});var p=Nm;Object.defineProperty(n,"findAllInputs",{enumerable:!0,get:function(){return p.findAllInputs}});var m=Pm;Object.defineProperty(n,"isCollapsedWhitespaces",{enumerable:!0,get:function(){return m.isCollapsedWhitespaces}});var f=fd;Object.defineProperty(n,"isContentEditable",{enumerable:!0,get:function(){return f.isContentEditable}});var g=Md;Object.defineProperty(n,"isElement",{enumerable:!0,get:function(){return g.isElement}});var x=Lm;Object.defineProperty(n,"isEmpty",{enumerable:!0,get:function(){return x.isEmpty}});var E=zm;Object.defineProperty(n,"isFragment",{enumerable:!0,get:function(){return E.isFragment}});var C=Fm;Object.defineProperty(n,"isHTMLString",{enumerable:!0,get:function(){return C.isHTMLString}});var T=Ad;Object.defineProperty(n,"isLeaf",{enumerable:!0,get:function(){return T.isLeaf}});var F=Nd;Object.defineProperty(n,"isNodeEmpty",{enumerable:!0,get:function(){return F.isNodeEmpty}});var I=Us;Object.defineProperty(n,"isLineBreakTag",{enumerable:!0,get:function(){return I.isLineBreakTag}});var O=Ws;Object.defineProperty(n,"isSingleTag",{enumerable:!0,get:function(){return O.isSingleTag}});var P=Ys;Object.defineProperty(n,"make",{enumerable:!0,get:function(){return P.make}});var M=Rm;Object.defineProperty(n,"offset",{enumerable:!0,get:function(){return M.offset}});var v=Vm;Object.defineProperty(n,"prepend",{enumerable:!0,get:function(){return v.prepend}})}(Ge);const Ft="cdx-list",Tt={wrapper:Ft,item:`${Ft}__item`,itemContent:`${Ft}__item-content`,itemChildren:`${Ft}__item-children`};class Sn{static get CSS(){return{...Tt,orderedList:`${Ft}-ordered`}}constructor(e,t){this.config=t,this.readOnly=e}renderWrapper(e){let t;return e===!0?t=Ge.make("ol",[Sn.CSS.wrapper,Sn.CSS.orderedList]):t=Ge.make("ol",[Sn.CSS.orderedList,Sn.CSS.itemChildren]),t}renderItem(e,t){const r=Ge.make("li",Sn.CSS.item),a=Ge.make("div",Sn.CSS.itemContent,{innerHTML:e,contentEditable:(!this.readOnly).toString()});return r.appendChild(a),r}getItemContent(e){const t=e.querySelector(`.${Sn.CSS.itemContent}`);return!t||Ge.isEmpty(t)?"":t.innerHTML}getItemMeta(){return{}}composeDefaultMeta(){return{}}}class xn{static get CSS(){return{...Tt,unorderedList:`${Ft}-unordered`}}constructor(e,t){this.config=t,this.readOnly=e}renderWrapper(e){let t;return e===!0?t=Ge.make("ul",[xn.CSS.wrapper,xn.CSS.unorderedList]):t=Ge.make("ul",[xn.CSS.unorderedList,xn.CSS.itemChildren]),t}renderItem(e,t){const r=Ge.make("li",xn.CSS.item),a=Ge.make("div",xn.CSS.itemContent,{innerHTML:e,contentEditable:(!this.readOnly).toString()});return r.appendChild(a),r}getItemContent(e){const t=e.querySelector(`.${xn.CSS.itemContent}`);return!t||Ge.isEmpty(t)?"":t.innerHTML}getItemMeta(){return{}}composeDefaultMeta(){return{}}}function Fo(n){return n.nodeType===Node.ELEMENT_NODE}var da={},Vd={},Gs={},Ks={};Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.getContenteditableSlice=BB;var xB=Ge;function BB(n,e,t,r,a){var s;a===void 0&&(a=!1);var i=document.createRange();if(r==="left"?(i.setStart(n,0),i.setEnd(e,t)):(i.setStart(e,t),i.setEnd(n,n.childNodes.length)),a===!0){var l=i.extractContents();return(0,xB.fragmentToString)(l)}var c=i.cloneContents(),d=document.createElement("div");d.appendChild(c);var u=(s=d.textContent)!==null&&s!==void 0?s:"";return u}Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.checkContenteditableSliceForEmptiness=MB;var TB=Ge,$B=Ks;function MB(n,e,t,r){var a=(0,$B.getContenteditableSlice)(n,e,t,r);return(0,TB.isCollapsedWhitespaces)(a)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.checkContenteditableSliceForEmptiness=void 0;var e=Gs;Object.defineProperty(n,"checkContenteditableSliceForEmptiness",{enumerable:!0,get:function(){return e.checkContenteditableSliceForEmptiness}})})(Vd);var Hm={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getContenteditableSlice=void 0;var e=Ks;Object.defineProperty(n,"getContenteditableSlice",{enumerable:!0,get:function(){return e.getContenteditableSlice}})})(Hm);var jm={},Hd={};Object.defineProperty(Hd,"__esModule",{value:!0}),Hd.focus=OB;var DB=Ge;function OB(n,e){var t,r;if(e===void 0&&(e=!0),(0,DB.isNativeInput)(n)){n.focus();var a=e?0:n.value.length;n.setSelectionRange(a,a)}else{var s=document.createRange(),i=window.getSelection();if(!i)return;var l=function(p,m){m===void 0&&(m=!1);var f=document.createTextNode("");m?p.insertBefore(f,p.firstChild):p.appendChild(f),s.setStart(f,0),s.setEnd(f,0)},c=function(p){return p!=null},d=n.childNodes,u=e?d[0]:d[d.length-1];if(c(u)){for(;c(u)&&u.nodeType!==Node.TEXT_NODE;)u=e?u.firstChild:u.lastChild;if(c(u)&&u.nodeType===Node.TEXT_NODE){var h=(r=(t=u.textContent)===null||t===void 0?void 0:t.length)!==null&&r!==void 0?r:0,a=e?0:h;s.setStart(u,a),s.setEnd(u,a)}else l(n,e)}else l(n);i.removeAllRanges(),i.addRange(s)}}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.focus=void 0;var e=Hd;Object.defineProperty(n,"focus",{enumerable:!0,get:function(){return e.focus}})})(jm);var jd={},Xs={};Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.getCaretNodeAndOffset=AB;function AB(){var n=window.getSelection();if(n===null)return[null,0];var e=n.focusNode,t=n.focusOffset;return e===null?[null,0]:(e.nodeType!==Node.TEXT_NODE&&e.childNodes.length>0&&(e.childNodes[t]!==void 0?(e=e.childNodes[t],t=0):(e=e.childNodes[t-1],e.textContent!==null&&(t=e.textContent.length))),[e,t])}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getCaretNodeAndOffset=void 0;var e=Xs;Object.defineProperty(n,"getCaretNodeAndOffset",{enumerable:!0,get:function(){return e.getCaretNodeAndOffset}})})(jd);var Ym={},Qs={};Object.defineProperty(Qs,"__esModule",{value:!0}),Qs.getRange=IB;function IB(){var n=window.getSelection();return n&&n.rangeCount?n.getRangeAt(0):null}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getRange=void 0;var e=Qs;Object.defineProperty(n,"getRange",{enumerable:!0,get:function(){return e.getRange}})})(Ym);var Um={},Yd={};Object.defineProperty(Yd,"__esModule",{value:!0}),Yd.isCaretAtEndOfInput=LB;var Wm=Ge,NB=jd,PB=Vd;function LB(n){var e=(0,Wm.getDeepestNode)(n,!0);if(e===null)return!0;if((0,Wm.isNativeInput)(e))return e.selectionEnd===e.value.length;var t=(0,NB.getCaretNodeAndOffset)(),r=t[0],a=t[1];return r===null?!1:(0,PB.checkContenteditableSliceForEmptiness)(n,r,a,"right")}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isCaretAtEndOfInput=void 0;var e=Yd;Object.defineProperty(n,"isCaretAtEndOfInput",{enumerable:!0,get:function(){return e.isCaretAtEndOfInput}})})(Um);var qm={},Ud={};Object.defineProperty(Ud,"__esModule",{value:!0}),Ud.isCaretAtStartOfInput=RB;var Zs=Ge,zB=Xs,FB=Gs;function RB(n){var e=(0,Zs.getDeepestNode)(n);if(e===null||(0,Zs.isEmpty)(n))return!0;if((0,Zs.isNativeInput)(e))return e.selectionEnd===0;if((0,Zs.isEmpty)(n))return!0;var t=(0,zB.getCaretNodeAndOffset)(),r=t[0],a=t[1];return r===null?!1:(0,FB.checkContenteditableSliceForEmptiness)(n,r,a,"left")}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isCaretAtStartOfInput=void 0;var e=Ud;Object.defineProperty(n,"isCaretAtStartOfInput",{enumerable:!0,get:function(){return e.isCaretAtStartOfInput}})})(qm);var Gm={},Wd={};Object.defineProperty(Wd,"__esModule",{value:!0}),Wd.save=jB;var VB=Ge,HB=Qs;function jB(){var n=(0,HB.getRange)(),e=(0,VB.make)("span");if(e.id="cursor",e.hidden=!0,!!n)return n.insertNode(e),function(){var t=window.getSelection();t&&(n.setStartAfter(e),n.setEndAfter(e),t.removeAllRanges(),t.addRange(n),setTimeout(function(){e.remove()},150))}}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.save=void 0;var e=Wd;Object.defineProperty(n,"save",{enumerable:!0,get:function(){return e.save}})})(Gm),function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.save=n.isCaretAtStartOfInput=n.isCaretAtEndOfInput=n.getRange=n.getCaretNodeAndOffset=n.focus=n.getContenteditableSlice=n.checkContenteditableSliceForEmptiness=void 0;var e=Vd;Object.defineProperty(n,"checkContenteditableSliceForEmptiness",{enumerable:!0,get:function(){return e.checkContenteditableSliceForEmptiness}});var t=Hm;Object.defineProperty(n,"getContenteditableSlice",{enumerable:!0,get:function(){return t.getContenteditableSlice}});var r=jm;Object.defineProperty(n,"focus",{enumerable:!0,get:function(){return r.focus}});var a=jd;Object.defineProperty(n,"getCaretNodeAndOffset",{enumerable:!0,get:function(){return a.getCaretNodeAndOffset}});var s=Ym;Object.defineProperty(n,"getRange",{enumerable:!0,get:function(){return s.getRange}});var i=Um;Object.defineProperty(n,"isCaretAtEndOfInput",{enumerable:!0,get:function(){return i.isCaretAtEndOfInput}});var l=qm;Object.defineProperty(n,"isCaretAtStartOfInput",{enumerable:!0,get:function(){return l.isCaretAtStartOfInput}});var c=Gm;Object.defineProperty(n,"save",{enumerable:!0,get:function(){return c.save}})}(da);class yt{static get CSS(){return{...Tt,checklist:`${Ft}-checklist`,itemChecked:`${Ft}__checkbox--checked`,noHover:`${Ft}__checkbox--no-hover`,checkbox:`${Ft}__checkbox-check`,checkboxContainer:`${Ft}__checkbox`}}constructor(e,t){this.config=t,this.readOnly=e}renderWrapper(e){let t;return e===!0?(t=Ge.make("ul",[yt.CSS.wrapper,yt.CSS.checklist]),t.addEventListener("click",r=>{const a=r.target;if(a){const s=a.closest(`.${yt.CSS.checkboxContainer}`);s&&s.contains(a)&&this.toggleCheckbox(s)}})):t=Ge.make("ul",[yt.CSS.checklist,yt.CSS.itemChildren]),t}renderItem(e,t){const r=Ge.make("li",[yt.CSS.item,yt.CSS.item]),a=Ge.make("div",yt.CSS.itemContent,{innerHTML:e,contentEditable:(!this.readOnly).toString()}),s=Ge.make("span",yt.CSS.checkbox),i=Ge.make("div",yt.CSS.checkboxContainer);return t.checked===!0&&i.classList.add(yt.CSS.itemChecked),s.innerHTML=ax,i.appendChild(s),r.appendChild(i),r.appendChild(a),r}getItemContent(e){const t=e.querySelector(`.${yt.CSS.itemContent}`);return!t||Ge.isEmpty(t)?"":t.innerHTML}getItemMeta(e){const t=e.querySelector(`.${yt.CSS.checkboxContainer}`);return{checked:t?t.classList.contains(yt.CSS.itemChecked):!1}}composeDefaultMeta(){return{checked:!1}}toggleCheckbox(e){e.classList.toggle(yt.CSS.itemChecked),e.classList.add(yt.CSS.noHover),e.addEventListener("mouseleave",()=>this.removeSpecialHoverBehavior(e),{once:!0})}removeSpecialHoverBehavior(e){e.classList.remove(yt.CSS.noHover)}}function qd(n,e="after"){const t=[];let r;function a(s){switch(e){case"after":return s.nextElementSibling;case"before":return s.previousElementSibling}}for(r=a(n);r!==null;)t.push(r),r=a(r);return t.length!==0?t:null}function Yn(n,e=!0){let t=n;return n.classList.contains(Tt.item)&&(t=n.querySelector(`.${Tt.itemChildren}`)),t===null?[]:e?Array.from(t.querySelectorAll(`:scope > .${Tt.item}`)):Array.from(t.querySelectorAll(`.${Tt.item}`))}function YB(n){return n.nextElementSibling===null}function UB(n){return n.querySelector(`.${Tt.itemChildren}`)!==null}function fo(n){return n.querySelector(`.${Tt.itemChildren}`)}function Gd(n){let e=n;n.classList.contains(Tt.item)&&(e=fo(n)),e!==null&&Yn(e).length===0&&e.remove()}function Js(n){return n.querySelector(`.${Tt.itemContent}`)}function br(n,e=!0){const t=Js(n);t&&da.focus(t,e)}class Kd{get currentItem(){const e=window.getSelection();if(!e)return null;let t=e.anchorNode;return!t||(Fo(t)||(t=t.parentNode),!t)||!Fo(t)?null:t.closest(`.${Tt.item}`)}get currentItemLevel(){const e=this.currentItem;if(e===null)return null;let t=e.parentNode,r=0;for(;t!==null&&t!==this.listWrapper;)Fo(t)&&t.classList.contains(Tt.item)&&(r+=1),t=t.parentNode;return r+1}constructor({data:e,config:t,api:r,readOnly:a,block:s},i){this.config=t,this.data=e,this.readOnly=a,this.api=r,this.block=s,this.renderer=i}render(){return this.listWrapper=this.renderer.renderWrapper(!0),this.data.items.length?this.appendItems(this.data.items,this.listWrapper):this.appendItems([{content:"",meta:{},items:[]}],this.listWrapper),this.readOnly||this.listWrapper.addEventListener("keydown",e=>{switch(e.key){case"Enter":e.shiftKey||this.enterPressed(e);break;case"Backspace":this.backspace(e);break;case"Tab":e.shiftKey?this.shiftTab(e):this.addTab(e);break}},!1),"start"in this.data.meta&&this.data.meta.start!==void 0&&this.changeStartWith(this.data.meta.start),"counterType"in this.data.meta&&this.data.meta.counterType!==void 0&&this.changeCounters(this.data.meta.counterType),this.listWrapper}save(e){const t=e??this.listWrapper,r=i=>Yn(i).map(l=>{const c=fo(l),d=this.renderer.getItemContent(l),u=this.renderer.getItemMeta(l),h=c?r(c):[];return{content:d,meta:u,items:h}}),a=t?r(t):[];let s={style:this.data.style,meta:{},items:a};return this.data.style==="ordered"&&(s.meta={start:this.data.meta.start,counterType:this.data.meta.counterType}),s}static get pasteConfig(){return{tags:["OL","UL","LI"]}}merge(e){const t=this.block.holder.querySelectorAll(`.${Tt.item}`),r=t[t.length-1],a=Js(r);if(r===null||a===null||(a.insertAdjacentHTML("beforeend",e.items[0].content),this.listWrapper===void 0))return;const s=Yn(this.listWrapper);if(s.length===0)return;const i=s[s.length-1];let l=fo(i);const c=e.items.shift();c!==void 0&&(c.items.length!==0&&(l===null&&(l=this.renderer.renderWrapper(!1)),this.appendItems(c.items,l)),e.items.length>0&&this.appendItems(e.items,this.listWrapper))}onPaste(e){const t=e.detail.data;this.data=this.pasteHandler(t);const r=this.listWrapper;r&&r.parentNode&&r.parentNode.replaceChild(this.render(),r)}pasteHandler(e){const{tagName:t}=e;let r="unordered",a;switch(t){case"OL":r="ordered",a="ol";break;case"UL":case"LI":r="unordered",a="ul"}const s={style:r,meta:{},items:[]};r==="ordered"&&(this.data.meta.counterType="numeric",this.data.meta.start=1);const i=l=>Array.from(l.querySelectorAll(":scope > li")).map(c=>{const d=c.querySelector(`:scope > ${a}`),u=d?i(d):[];return{content:c.innerHTML??"",meta:{},items:u}});return s.items=i(e),s}changeStartWith(e){this.listWrapper.style.setProperty("counter-reset",`item ${e-1}`),this.data.meta.start=e}changeCounters(e){this.listWrapper.style.setProperty("--list-counter-type",e),this.data.meta.counterType=e}enterPressed(e){var t;const r=this.currentItem;if(e.stopPropagation(),e.preventDefault(),e.isComposing||r===null)return;const a=((t=this.renderer)==null?void 0:t.getItemContent(r).trim().length)===0,s=r.parentNode===this.listWrapper,i=r.previousElementSibling===null,l=this.api.blocks.getCurrentBlockIndex();if(s&&a)if(YB(r)&&!UB(r)){i?this.convertItemToDefaultBlock(l,!0):this.convertItemToDefaultBlock();return}else{this.splitList(r);return}else if(a){this.unshiftItem(r);return}else this.splitItem(r)}backspace(e){var t;const r=this.currentItem;if(r!==null&&da.isCaretAtStartOfInput(r)&&((t=window.getSelection())==null?void 0:t.isCollapsed)!==!1){if(e.stopPropagation(),r.parentNode===this.listWrapper&&r.previousElementSibling===null){this.convertFirstItemToDefaultBlock();return}e.preventDefault(),this.mergeItemWithPrevious(r)}}shiftTab(e){e.stopPropagation(),e.preventDefault(),this.currentItem!==null&&this.unshiftItem(this.currentItem)}unshiftItem(e){if(!e.parentNode||!Fo(e.parentNode))return;const t=e.parentNode.closest(`.${Tt.item}`);if(!t)return;let r=fo(e);if(e.parentElement===null)return;const a=qd(e);a!==null&&(r===null&&(r=this.renderer.renderWrapper(!1)),a.forEach(s=>{r.appendChild(s)}),e.appendChild(r)),t.after(e),br(e,!1),Gd(t)}splitList(e){const t=Yn(e),r=this.block,a=this.api.blocks.getCurrentBlockIndex();if(t.length!==0){const c=t[0];this.unshiftItem(c),br(e,!1)}if(e.previousElementSibling===null&&e.parentNode===this.listWrapper){this.convertItemToDefaultBlock(a);return}const s=qd(e);if(s===null)return;const i=this.renderer.renderWrapper(!0);s.forEach(c=>{i.appendChild(c)});const l=this.save(i);l.meta.start=this.data.style=="ordered"?1:void 0,this.api.blocks.insert(r==null?void 0:r.name,l,this.config,a+1),this.convertItemToDefaultBlock(a+1),i.remove()}splitItem(e){const[t,r]=da.getCaretNodeAndOffset();if(t===null)return;const a=Js(e);let s;a===null?s="":s=da.getContenteditableSlice(a,t,r,"right",!0);const i=fo(e),l=this.renderItem(s);e==null||e.after(l),i&&l.appendChild(i),br(l)}mergeItemWithPrevious(e){const t=e.previousElementSibling,r=e.parentNode;if(r===null||!Fo(r))return;const a=r.closest(`.${Tt.item}`);if(!t&&!a||t&&!Fo(t))return;let s;if(t){const h=Yn(t,!1);h.length!==0&&h.length!==0?s=h[h.length-1]:s=t}else s=a;const i=this.renderer.getItemContent(e);if(!s)return;br(s,!1);const l=Js(s);if(l===null)return;l.insertAdjacentHTML("beforeend",i);const c=Yn(e);if(c.length===0){e.remove(),Gd(s);return}const d=t||a,u=fo(d)??this.renderer.renderWrapper(!1);t?c.forEach(h=>{u.appendChild(h)}):c.forEach(h=>{u.prepend(h)}),fo(d)===null&&s.appendChild(u),e.remove()}addTab(e){var t;e.stopPropagation(),e.preventDefault();const r=this.currentItem;if(!r)return;if(((t=this.config)==null?void 0:t.maxLevel)!==void 0){const i=this.currentItemLevel;if(i!==null&&i===this.config.maxLevel)return}const a=r.previousSibling;if(a===null||!Fo(a))return;const s=fo(a);if(s)s.appendChild(r),Yn(r).forEach(i=>{s.appendChild(i)});else{const i=this.renderer.renderWrapper(!1);i.appendChild(r),Yn(r).forEach(l=>{i.appendChild(l)}),a.appendChild(i)}Gd(r),br(r,!1)}convertItemToDefaultBlock(e,t){let r;const a=this.currentItem,s=a!==null?this.renderer.getItemContent(a):"";t===!0&&this.api.blocks.delete(),e!==void 0?r=this.api.blocks.insert(void 0,{text:s},void 0,e):r=this.api.blocks.insert(),a==null||a.remove(),this.api.caret.setToBlock(r,"start")}convertFirstItemToDefaultBlock(){const e=this.currentItem;if(e===null)return;const t=Yn(e);if(t.length!==0){const i=t[0];this.unshiftItem(i),br(e)}const r=qd(e),a=this.api.blocks.getCurrentBlockIndex(),s=r===null;this.convertItemToDefaultBlock(a,s)}renderItem(e,t){const r=t??this.renderer.composeDefaultMeta();switch(!0){case this.renderer instanceof Sn:return this.renderer.renderItem(e,r);case this.renderer instanceof xn:return this.renderer.renderItem(e,r);default:return this.renderer.renderItem(e,r)}}appendItems(e,t){e.forEach(r=>{var a;const s=this.renderItem(r.content,r.meta);if(t.appendChild(s),r.items.length){const i=(a=this.renderer)==null?void 0:a.renderWrapper(!1);this.appendItems(r.items,i),s.appendChild(i)}})}}const kr={wrapper:`${Ft}-start-with-field`,input:`${Ft}-start-with-field__input`,startWithElementWrapperInvalid:`${Ft}-start-with-field--invalid`};function WB(n,{value:e,placeholder:t,attributes:r,sanitize:a}){const s=Ge.make("div",kr.wrapper),i=Ge.make("input",kr.input,{placeholder:t,tabIndex:-1,value:e});for(const l in r)i.setAttribute(l,r[l]);return s.appendChild(i),i.addEventListener("input",()=>{a!==void 0&&(i.value=a(i.value));const l=i.checkValidity();!l&&!s.classList.contains(kr.startWithElementWrapperInvalid)&&s.classList.add(kr.startWithElementWrapperInvalid),l&&s.classList.contains(kr.startWithElementWrapperInvalid)&&s.classList.remove(kr.startWithElementWrapperInvalid),l&&n(i.value)}),s}const ua=new Map([["Numeric","numeric"],["Lower Roman","lower-roman"],["Upper Roman","upper-roman"],["Lower Alpha","lower-alpha"],["Upper Alpha","upper-alpha"]]),Km=new Map([["numeric",sx],["lower-roman",ix],["upper-roman",lx],["lower-alpha",dx],["upper-alpha",cx]]);function qB(n){return n.replace(/\D+/g,"")}function GB(n){return typeof n.items[0]=="string"}function KB(n){return!("meta"in n)}function XB(n){return typeof n.items[0]!="string"&&"text"in n.items[0]&&"checked"in n.items[0]&&typeof n.items[0].text=="string"&&typeof n.items[0].checked=="boolean"}function QB(n){const e=[];return GB(n)?(n.items.forEach(t=>{e.push({content:t,meta:{},items:[]})}),{style:n.style,meta:{},items:e}):XB(n)?(n.items.forEach(t=>{e.push({content:t.text,meta:{checked:t.checked},items:[]})}),{style:"checklist",meta:{},items:e}):KB(n)?{style:n.style,meta:{},items:n.items}:structuredClone(n)}class ei{static get isReadOnlySupported(){return!0}static get enableLineBreaks(){return!0}static get toolbox(){return[{icon:_m,title:"Unordered List",data:{style:"unordered"}},{icon:Cm,title:"Ordered List",data:{style:"ordered"}},{icon:wm,title:"Checklist",data:{style:"checklist"}}]}static get pasteConfig(){return{tags:["OL","UL","LI"]}}static get conversionConfig(){return{export:e=>ei.joinRecursive(e),import:(e,t)=>({meta:{},items:[{content:e,meta:{},items:[]}],style:(t==null?void 0:t.defaultStyle)!==void 0?t.defaultStyle:"unordered"})}}get listStyle(){return this.data.style||this.defaultListStyle}set listStyle(e){var t;this.data.style=e,this.changeTabulatorByStyle();const r=this.list.render();(t=this.listElement)==null||t.replaceWith(r),this.listElement=r}constructor({data:e,config:t,api:r,readOnly:a,block:s}){var i;this.api=r,this.readOnly=a,this.config=t,this.block=s,this.defaultListStyle=((i=this.config)==null?void 0:i.defaultStyle)||"unordered",this.defaultCounterTypes=this.config.counterTypes||Array.from(ua.values());const l={style:this.defaultListStyle,meta:{},items:[]};this.data=Object.keys(e).length?QB(e):l,this.listStyle==="ordered"&&this.data.meta.counterType===void 0&&(this.data.meta.counterType="numeric"),this.changeTabulatorByStyle()}static joinRecursive(e){return e.items.map(t=>`${t.content} ${ei.joinRecursive(t)}`).join("")}render(){return this.listElement=this.list.render(),this.listElement}save(){return this.data=this.list.save(),this.data}merge(e){this.list.merge(e)}renderSettings(){const e=[{label:this.api.i18n.t("Unordered"),icon:_m,closeOnActivate:!0,isActive:this.listStyle=="unordered",onActivate:()=>{this.listStyle="unordered"}},{label:this.api.i18n.t("Ordered"),icon:Cm,closeOnActivate:!0,isActive:this.listStyle=="ordered",onActivate:()=>{this.listStyle="ordered"}},{label:this.api.i18n.t("Checklist"),icon:wm,closeOnActivate:!0,isActive:this.listStyle=="checklist",onActivate:()=>{this.listStyle="checklist"}}];if(this.listStyle==="ordered"){const t=WB(s=>this.changeStartWith(Number(s)),{value:String(this.data.meta.start??1),placeholder:"",attributes:{required:"true"},sanitize:s=>qB(s)}),r=[{label:this.api.i18n.t("Start with"),icon:ux,children:{items:[{element:t,type:"html"}]}}],a={label:this.api.i18n.t("Counter type"),icon:Km.get(this.data.meta.counterType),children:{items:[]}};ua.forEach((s,i)=>{const l=ua.get(i);this.defaultCounterTypes.includes(l)&&a.children.items.push({title:this.api.i18n.t(i),icon:Km.get(l),isActive:this.data.meta.counterType===ua.get(i),closeOnActivate:!0,onActivate:()=>{this.changeCounters(ua.get(i))}})}),a.children.items.length>1&&r.push(a),e.push({type:"separator"},...r)}return e}onPaste(e){const{tagName:t}=e.detail.data;switch(t){case"OL":this.listStyle="ordered";break;case"UL":case"LI":this.listStyle="unordered"}this.list.onPaste(e)}pasteHandler(e){return this.list.pasteHandler(e)}changeCounters(e){var t;(t=this.list)==null||t.changeCounters(e),this.data.meta.counterType=e}changeStartWith(e){var t;(t=this.list)==null||t.changeStartWith(e),this.data.meta.start=e}changeTabulatorByStyle(){switch(this.listStyle){case"ordered":this.list=new Kd({data:this.data,readOnly:this.readOnly,api:this.api,config:this.config,block:this.block},new Sn(this.readOnly,this.config));break;case"unordered":this.list=new Kd({data:this.data,readOnly:this.readOnly,api:this.api,config:this.config,block:this.block},new xn(this.readOnly,this.config));break;case"checklist":this.list=new Kd({data:this.data,readOnly:this.readOnly,api:this.api,config:this.config,block:this.block},new yt(this.readOnly,this.config));break}}}const ZB=["id"],JB=re(o.defineComponent({__name:"Editor",props:o.mergeModels({value:{},label:{},maxLength:{default:()=>1/0},isDisabled:{type:Boolean},isError:{type:Boolean},isRequired:{type:Boolean},isBorder:{type:Boolean},placeholder:{}},{value:{required:!0},valueModifiers:{}}),emits:o.mergeModels(["update:isError"],["update:value"]),setup(n,{emit:e}){const t=o.useModel(n,"value"),r=e,a=o.useId(),s=o.computed(()=>`editor-content-${a}`),i=o.ref(),l=o.ref(!1),c=o.ref(0);let d=null,u,h;const p=o.computed(()=>n.maxLength===1/0?null:n.maxLength-c.value);function m(){d=document.getElementById(s.value),d&&(u=()=>{l.value||(l.value=!0)},h=C=>{const T=C.relatedTarget??document.activeElement;!!!(T&&(d!=null&&d.contains(T)))&&l.value&&(l.value=!1)},d.addEventListener("focusin",u,!0),d.addEventListener("focusout",h,!0))}function f(){d&&(d.removeEventListener("focusin",u,!0),d.removeEventListener("focusout",h,!0),d=null)}o.onMounted(()=>{i.value=new NS({holder:s.value,onReady:x,onChange:E,placeholder:n.placeholder,readOnly:n.isDisabled,inlineToolbar:["toParagraph","toHeader","toList","toBold"],tools:{paragraph:{class:WS,config:{preserveBlank:!0}},header:{class:rx,config:{preserveBlank:!0}},list:{class:ei,config:{defaultStyle:"unordered"}},toHeader:{class:qS},toList:{class:GS},toParagraph:{class:KS},toBold:{class:XS}},data:JSON.parse(t.value||"{}")})});let g=!1;async function x(){var C,T;if(t.value){if(typeof t.value=="string"){(C=i.value)==null||C.blocks.render(JSON.parse(t.value));return}(T=i.value)==null||T.render(t.value),await o.nextTick(),m(),c.value=await FS({editor:i.value,limit:n.maxLength})}}async function E(C,T){var F;try{g=!0;const I=await((F=i.value)==null?void 0:F.save());t.value=JSON.stringify(I),r("update:isError",!1),c.value=await zS({api:C,limit:n.maxLength,event:T})}finally{g=!1}}return o.watch(()=>t.value,()=>{g||x()}),o.onUnmounted(()=>{var C;(C=i.value)==null||C.destroy()}),o.onBeforeUnmount(()=>{var C;f(),(C=i.value)==null||C.destroy(),i.value=void 0}),o.watch(()=>n.isDisabled,C=>{var T;(T=i.value)==null||T.readOnly.toggle(C)}),(C,T)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([C.$style.root,{[C.$style["is-border"]]:C.isBorder,[C.$style["is-focused"]]:l.value,[C.$style["is-disabled"]]:C.isDisabled,[C.$style["is-error"]]:C.isError}])},[C.label?(o.openBlock(),o.createBlock(o.unref(me),{key:0,class:o.normalizeClass(C.$style.label),size:"subhead",color:"foreground-layout-layout-1-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(C.label)+" ",1),C.isRequired?(o.openBlock(),o.createBlock(o.unref(me),{key:0,tag:"span",size:"subhead",color:"foreground-layout-layout-1-critical"},{default:o.withCtx(()=>T[0]||(T[0]=[o.createTextVNode(" * ")])),_:1,__:[0]})):o.createCommentVNode("",!0)]),_:1},8,["class"])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(C.$style.wrapper)},[o.createElementVNode("div",{id:s.value,class:o.normalizeClass(C.$style.editor)},null,10,ZB),p.value!==null?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(C.$style.count)},[o.createVNode(o.unref(me),{size:"caption",color:"inherit"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(p.value),1)]),_:1})],2)):o.createCommentVNode("",!0)],2)],2))}}),[["__cssModules",{$style:{root:"Editor__root_870b2","is-border":"Editor__is-border_7bbc0",editor:"Editor__editor_b5509","is-focused":"Editor__is-focused_a21ed","is-error":"Editor__is-error_38ed6","is-disabled":"Editor__is-disabled_3e958",label:"Editor__label_ca5ff",wrapper:"Editor__wrapper_46333",count:"Editor__count_8d0a2"}}]]),eT=["innerHTML"],tT=re(o.defineComponent({__name:"EditorText",props:{value:{}},setup(n){const e=o.computed(()=>jS(JSON.parse(n.value||"{}")));return(t,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(t.$style.root)},[o.createElementVNode("div",{innerHTML:e.value,class:o.normalizeClass(t.$style.text)},null,10,eT)],2))}}),[["__cssModules",{$style:{text:"EditorText__text_a6dbc"}}]]),nT=o.defineComponent({__name:"PageInfoCellSkeleton",props:{isShowDivider:{type:Boolean},labelColor:{default:"foreground-layout-layout-1-primary"}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.$style.root)},[o.createElementVNode("div",{class:o.normalizeClass(e.$style.content)},[o.createElementVNode("div",{class:o.normalizeClass(e.$style.section)},[o.createVNode(o.unref($n),{widthRange:[.3,.6],size:"subhead",color:e.labelColor},null,8,["color"])],2),o.createElementVNode("div",{class:o.normalizeClass(e.$style.section)},[o.createVNode(o.unref($n),{widthRange:[.3,.6],size:"subhead",color:"foreground-layout-layout-1-primary"})],2)],2),e.isShowDivider?(o.openBlock(),o.createBlock(o.unref(An),{key:0,size:"s"})):o.createCommentVNode("",!0)],2))}}),Xm={content:"PageInfoCell__content_1589e",section:"PageInfoCell__section_e2b06","section-label":"PageInfoCell__section-label_857be","section-value":"PageInfoCell__section-value_bd8ff"},Qm=re(nT,[["__cssModules",{$style:Xm}]]),Zm=re(o.defineComponent({__name:"PageInfoCell",props:{label:{},value:{},labelColor:{default:"foreground-layout-layout-1-primary"},isShowDivider:{type:Boolean},valueColor:{default:"foreground-layout-layout-1-primary"}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.$style.root)},[o.createElementVNode("div",{class:o.normalizeClass(e.$style.content)},[e.label?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass([e.$style.section,e.$style["section-label"]])},[o.renderSlot(e.$slots,"label",{},()=>[o.createVNode(o.unref(me),{size:"subhead",color:e.labelColor},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.label),1)]),_:1},8,["color"])])],2)):o.createCommentVNode("",!0),e.value?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass([e.$style.section,e.$style["section-value"]])},[o.renderSlot(e.$slots,"value",{},()=>[o.createVNode(o.unref(me),{size:"subhead",color:e.valueColor},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.value),1)]),_:1},8,["color"])])],2)):o.createCommentVNode("",!0)],2),e.isShowDivider?(o.openBlock(),o.createBlock(o.unref(An),{key:0,size:"s"})):o.createCommentVNode("",!0)],2))}}),[["__cssModules",{$style:Xm}]]),oT=o.defineComponent({__name:"PageInfoCellTable",props:{data:{},labelColor:{}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.$style.root)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.data,(r,a)=>(o.openBlock(),o.createBlock(o.unref(Zm),{key:`${a}-row`,isShowDivider:a!==e.data.length-1||e.data.length===1,class:o.normalizeClass(e.$style.row),value:r.value,label:r.label,labelColor:e.labelColor},o.createSlots({_:2},[r.type==="badge"?{name:"value",fn:o.withCtx(()=>[o.createVNode(o.unref(ni),null,{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(r.value),1)]),_:2},1024)]),key:"0"}:r.type==="amount"?{name:"value",fn:o.withCtx(()=>[o.createVNode(o.unref(Ri),{size:"subhead",value:r.value??"",weight:"regular",color:"foreground-layout-layout-1-primary"},null,8,["value"])]),key:"1"}:void 0]),1032,["isShowDivider","class","value","label","labelColor"]))),128))],2))}}),Jm={root:"PageInfoCellTable__root_73c7c"},rT=re(oT,[["__cssModules",{$style:Jm}]]),aT=re(o.defineComponent({__name:"PageInfoCellTableSkeleton",props:{size:{default:4},labelColor:{default:"foreground-layout-layout-1-primary"}},setup(n){return(e,t)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.$style.root)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Number(e.size),(r,a)=>(o.openBlock(),o.createBlock(o.unref(Qm),{key:`${a}-row`,isShowDivider:a!==Number(e.size)-1,labelColor:e.labelColor,class:o.normalizeClass(e.$style.row)},null,8,["isShowDivider","labelColor","class"]))),128))],2))}}),[["__cssModules",{$style:Jm}]]),sT=re(o.defineComponent({__name:"Summary",props:{data:{},isLoading:{type:Boolean}},setup(n){const e=o.computed(()=>{var t;return(t=n.data)==null?void 0:t.reduce((r,a)=>r+a.type+a.value+a.label,"")});return(t,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(t.$style.root)},[o.createVNode(o.unref(An),{size:"s",opacity:"0.5"}),o.createVNode(o.unref(qn),{class:o.normalizeClass(t.$style.wrapper)},{default:o.withCtx(()=>[t.isLoading?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(t.$style.wrapper)},[o.createVNode(o.unref(Ji),{class:o.normalizeClass(t.$style.list)},{default:o.withCtx(()=>[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(5,(a,s)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:a},[s!==0?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(t.$style["item-divider"])},null,2)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(t.$style.item)},[o.createVNode(o.unref($n),{widthRange:[.5,.8],size:"caption",color:"foreground-layout-layout-1-secondary"}),o.createVNode(o.unref($n),{widthRange:[.3,.5],size:"subhead",color:"foreground-layout-layout-1-primary"})],2)],64))),64))]),_:1},8,["class"])],2)):(o.openBlock(),o.createElementBlock("div",{key:e.value,class:o.normalizeClass(t.$style.wrapper)},[o.createElementVNode("div",{class:o.normalizeClass(t.$style.list)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.data,(a,s)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:a.label+s},[s!==0?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(t.$style["item-divider"])},null,2)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(t.$style.item)},[o.createVNode(o.unref(me),{size:"caption",color:"foreground-layout-layout-1-secondary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.label),1)]),_:2},1024),a.type==="text"?(o.openBlock(),o.createBlock(o.unref(me),{key:0,class:o.normalizeClass(t.$style.value),numberOfLines:"1",size:"subhead",color:"foreground-layout-layout-1-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.value),1)]),_:2},1032,["class"])):(o.openBlock(),o.createBlock(o.unref(Ri),{key:1,value:a.value?a.value:"0",size:"subhead",weight:"regular",color:"foreground-layout-layout-1-primary"},null,8,["value"]))],2)],64))),128))],2)],2))]),_:1},8,["class"]),o.createVNode(o.unref(An),{size:"s"})],2))}}),[["__cssModules",{$style:{list:"Summary__list_d1481",item:"Summary__item_1ed72",value:"Summary__value_1c547","item-divider":"Summary__item-divider_d5721"}}]]),iT={KGS:"KGS"},lT=["inert"],ha=re(o.defineComponent({__name:"FieldBase",props:o.mergeModels({size:{},iconLeft:{},iconRight:{},hasCounter:{type:Boolean},counter:{},isDisabled:{type:Boolean},hasBorder:{type:Boolean}},{isError:{type:Boolean,default:!1},isErrorModifiers:{}}),emits:o.mergeModels(["click"],["update:isError"]),setup(n,{emit:e}){const t=o.useModel(n,"isError"),r=e;return(a,s)=>(o.openBlock(),o.createElementBlock("div",{inert:a.isDisabled,class:o.normalizeClass([a.$style.root,a.$style[`size_${a.size}`],{[a.$style["is-error"]]:t.value,[a.$style["is-disabled"]]:a.isDisabled,[a.$style["has-border"]]:a.hasBorder}]),onClick:s[0]||(s[0]=i=>r("click"))},[a.iconLeft?(o.openBlock(),o.createBlock(o.unref($e),{key:0,name:a.iconLeft,size:"20",color:"icon-input-base-primary"},null,8,["name"])):o.createCommentVNode("",!0),o.renderSlot(a.$slots,"before"),o.createElementVNode("div",{class:o.normalizeClass(a.$style.content)},[o.renderSlot(a.$slots,"default")],2),o.renderSlot(a.$slots,"after"),a.iconRight?(o.openBlock(),o.createBlock(o.unref($e),{key:1,name:a.iconRight,size:"20",color:"icon-input-base-primary"},null,8,["name"])):o.createCommentVNode("",!0),a.hasCounter?(o.openBlock(),o.createBlock(o.unref(me),{key:2,size:"caption",weight:"regular",color:"foreground-layout-layout-1-surface",class:o.normalizeClass(a.$style.counter)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.counter),1)]),_:1},8,["class"])):o.createCommentVNode("",!0)],10,lT))}}),[["__cssModules",{$style:{root:"FieldBase__root_020d6","has-border":"FieldBase__has-border_c2dbe","is-error":"FieldBase__is-error_81680",content:"FieldBase__content_78377","is-disabled":"FieldBase__is-disabled_459b8",size_34:"FieldBase__size_34_22bbd",size_44:"FieldBase__size_44_a875f",counter:"FieldBase__counter_ea907"}}]]),pa=re(o.defineComponent({__name:"FieldWrapper",props:o.mergeModels({label:{},description:{},errorText:{},isDisabled:{type:Boolean}},{isError:{type:Boolean,default:!1},isErrorModifiers:{}}),emits:["update:isError"],setup(n){const e=o.useModel(n,"isError");return(t,r)=>{const a=o.resolveDirective("auto-animate");return o.withDirectives((o.openBlock(),o.createElementBlock("label",{class:o.normalizeClass(t.$style.root)},[t.label?(o.openBlock(),o.createBlock(o.unref(me),{key:0,class:o.normalizeClass(t.$style.label),size:"subhead",weight:"regular",color:"foreground-layout-layout-1-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(t.label),1)]),_:1},8,["class"])):o.createCommentVNode("",!0),o.renderSlot(t.$slots,"default"),t.description||e.value&&t.errorText?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(t.$style.bottom)},[o.createVNode(o.unref($t),null,{default:o.withCtx(()=>[e.value&&t.errorText?(o.openBlock(),o.createBlock(o.unref(me),{key:0,size:"caption",weight:"regular",color:"foreground-layout-layout-1-critical"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(t.errorText),1)]),_:1})):t.description?(o.openBlock(),o.createBlock(o.unref(me),{key:1,size:"caption",weight:"regular",color:"foreground-layout-layout-1-secondary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(t.description),1)]),_:1})):o.createCommentVNode("",!0)]),_:1})],2)):o.createCommentVNode("",!0)],2)),[[a]])}}}),[["__cssModules",{$style:{root:"FieldWrapper__root_d4f25",label:"FieldWrapper__label_53361",bottom:"FieldWrapper__bottom_3c7b2"}}]]),cT=["type","inputmode","autocomplete","maxlength","placeholder"],eg=re(o.defineComponent({__name:"InputField",props:o.mergeModels({autocomplete:{default:"off"},inputmode:{default:"text"},type:{default:"text"},label:{},description:{},errorText:{},isDisabled:{type:Boolean},name:{},placeholder:{},size:{},iconLeft:{},iconRight:{},hasBorder:{type:Boolean},maxLength:{}},{isError:{type:Boolean,default:!1},isErrorModifiers:{},value:{default:""},valueModifiers:{}}),emits:["update:isError","update:value"],setup(n){const e=o.useModel(n,"isError"),t=o.computed(()=>n.maxLength?Number(n.maxLength)-(r.value.length??0):0),r=o.useModel(n,"value");return(a,s)=>(o.openBlock(),o.createBlock(o.unref(pa),{"is-error":e.value,"onUpdate:isError":s[1]||(s[1]=i=>e.value=i),label:a.label,description:a.description,errorText:a.errorText,isDisabled:a.isDisabled},{default:o.withCtx(()=>[o.createVNode(o.unref(ha),{size:a.size,isError:e.value,isDisabled:a.isDisabled,iconLeft:a.iconLeft,iconRight:a.iconRight,hasBorder:a.hasBorder,hasCounter:!!a.maxLength,counter:t.value},{after:o.withCtx(()=>[o.renderSlot(a.$slots,"after")]),default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("input",{type:a.type,inputmode:a.inputmode,autocomplete:a.autocomplete,maxlength:a.maxLength,"onUpdate:modelValue":s[0]||(s[0]=i=>r.value=i),placeholder:a.placeholder,class:o.normalizeClass([a.$style.input,a.$style[`input-size_${a.size}`]])},null,10,cT),[[o.vModelDynamic,r.value]])]),_:3},8,["size","isError","isDisabled","iconLeft","iconRight","hasBorder","hasCounter","counter"])]),_:3},8,["is-error","label","description","errorText","isDisabled"]))}}),[["__cssModules",{$style:{root:"InputField__root_6129f",input:"InputField__input_df4a0","input-size_34":"InputField__input-size_34_993f4","input-size_44":"InputField__input-size_44_6faed"}}]]),dT={phone:{mask:"+{996} 000 000 000"},rubles:{mask:[{mask:"",lazy:!0},{mask:"num ₽",lazy:!1,blocks:{num:{mask:Number,min:0,thousandsSeparator:" ",radix:",",mapToRadix:["."]}}}]},money:{mask:[{mask:"",lazy:!0},{mask:"num",lazy:!1,blocks:{num:{mask:Number,min:0,thousandsSeparator:" ",radix:",",mapToRadix:["."]}}}]},number:{mask:Number},any:{mask:String},date:{mask:Date,lazy:!0}},uT=re(o.defineComponent({__name:"InputMaskField",props:o.mergeModels({autofocus:{type:Boolean},autocomplete:{default:"off"},inputmode:{default:"text"},type:{default:"text"},label:{},description:{},errorText:{},isDisabled:{type:Boolean},name:{},placeholder:{},size:{},iconLeft:{},iconRight:{},hasBorder:{type:Boolean},maxLength:{},mask:{}},{isError:{type:Boolean,default:!1},isErrorModifiers:{},value:{default:""},valueModifiers:{}}),emits:["update:isError","update:value"],setup(n){const e=o.useModel(n,"isError"),t=o.computed(()=>n.maxLength?Number(n.maxLength)-(r.value.length??0):0),r=o.useModel(n,"value"),a=s=>{if(!n.maxLength)return;const i=s.target;i.value.length>Number(n.maxLength)&&(i.value=i.value.slice(0,Number(n.maxLength)),r.value=i.value)};return(s,i)=>(o.openBlock(),o.createBlock(o.unref(pa),{"is-error":e.value,"onUpdate:isError":i[2]||(i[2]=l=>e.value=l),label:s.label,description:s.description,errorText:s.errorText,isDisabled:s.isDisabled},{default:o.withCtx(()=>[o.createVNode(o.unref(ha),{size:s.size,isError:e.value,isDisabled:s.isDisabled,iconLeft:s.iconLeft,iconRight:s.iconRight,hasBorder:s.hasBorder,hasCounter:!!s.maxLength,counter:t.value},{after:o.withCtx(()=>[o.renderSlot(s.$slots,"after")]),default:o.withCtx(()=>[o.createVNode(o.unref(zi),o.mergeProps({unmasked:r.value,"onUpdate:unmasked":i[0]||(i[0]=l=>r.value=l),class:[s.$style.input,s.$style[`input-size_${s.size}`]],type:s.type,ref:"inputRef"},o.unref(dT)[s.mask??"any"],{unmask:!1,autofocus:s.autofocus,placeholder:s.placeholder,autocomplete:s.autocomplete,inputmode:s.inputmode,onAccept:i[1]||(i[1]=l=>e.value=!1),onInput:a}),null,16,["unmasked","class","type","autofocus","placeholder","autocomplete","inputmode"])]),_:3},8,["size","isError","isDisabled","iconLeft","iconRight","hasBorder","hasCounter","counter"])]),_:3},8,["is-error","label","description","errorText","isDisabled"]))}}),[["__cssModules",{$style:{root:"InputMaskField__root_9b1de",input:"InputMaskField__input_d4474","input-size_34":"InputMaskField__input-size_34_96fa0","input-size_44":"InputMaskField__input-size_44_f3144"}}]]),hT=re(o.defineComponent({__name:"InputPassword",props:{autocomplete:{},inputmode:{},label:{},description:{},errorText:{},isDisabled:{type:Boolean},name:{},placeholder:{},size:{},iconLeft:{},hasBorder:{type:Boolean},maxLength:{}},setup(n){const e=o.ref(!0);function t(){e.value=!e.value}const r=n;return(a,s)=>(o.openBlock(),o.createBlock(o.unref(eg),o.mergeProps(r,{type:e.value?"password":"text"}),{after:o.withCtx(()=>[o.createVNode(o.unref($e),{class:o.normalizeClass(a.$style.icon),name:e.value?"outline-eye-open":"outline-eye-close",color:"icon-input-base-primary",size:"18",onClick:t},null,8,["class","name"])]),_:1},16,["type"]))}}),[["__cssModules",{$style:{root:"InputPassword__root_f2045",icon:"InputPassword__icon_2a0a5"}}]]),pT=["id","readonly"],fT=re(o.defineComponent({__name:"MultiSelectField",props:o.mergeModels({list:{},label:{},description:{},errorText:{},isDisabled:{type:Boolean},name:{},placeholder:{},hasBorder:{type:Boolean},hasSearch:{type:Boolean}},{isError:{type:Boolean,default:!1},isErrorModifiers:{},value:{required:!0,default:[]},valueModifiers:{}}),emits:["update:isError","update:value"],setup(n){const e=o.ref(!1),t=o.ref(""),r=o.useId(),a=o.useModel(n,"isError"),s=o.useModel(n,"value"),i=o.useTemplateRef("input"),{isShowDropdown:l,triggerElementRef:c,parentElementRef:d,setIsShowDropdown:u}=Zn(),h=o.computed(()=>!n.hasSearch||!t.value||!e.value?n.list:n.list.filter(E=>E.text.includes(t.value??"")));o.watch(l,E=>{E===!1&&(e.value=!1)});function p(E){n.list.find(C=>C.id===C.id),s.value.includes(E.id)?s.value=s.value.filter(C=>C!==E.id):s.value.push(E.id),o.nextTick(()=>{var C;(C=i.value)==null||C.focus()})}function m(){t.value&&h.value.length===1&&(s.value.push(h.value[0].id),t.value="")}function f(E){if(E.key==="Enter")return m()}function g(E){s.value.includes(E)&&(s.value=s.value.filter(C=>C!==E))}function x(){l.value||u(!0)}return(E,C)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(pa),{for:o.unref(r),"data-ignore-click-outside":"","is-error":a.value,"onUpdate:isError":C[2]||(C[2]=T=>a.value=T),class:o.normalizeClass(E.$style.root),label:E.label,description:E.description,errorText:E.errorText,isDisabled:E.isDisabled,onClick:x},{default:o.withCtx(()=>[o.createVNode(o.unref(ha),{ref_key:"parentElementRef",ref:d,size:"44",isError:a.value,isDisabled:E.isDisabled,hasBorder:E.hasBorder},{before:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.value,(T,F)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(E.$style["chip-wrapper"]),key:F},[o.createVNode(o.unref(za),{view:"base-secondary",onDelete:I=>g(T)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(T),1)]),_:2},1032,["onDelete"])],2))),128))]),after:o.withCtx(()=>[o.createVNode(o.unref($e),{class:o.normalizeClass([E.$style.icon,{[E.$style["is-open"]]:o.unref(l)}]),size:"18",name:"outline-chevron-down",color:"icon-input-base-primary"},null,8,["class"])]),default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("input",{id:o.unref(r),ref:"input",class:o.normalizeClass(E.$style.field),readonly:!E.hasSearch,"onUpdate:modelValue":C[0]||(C[0]=T=>t.value=T),onKeydown:f,onInput:C[1]||(C[1]=T=>e.value=!0)},null,42,pT),[[o.vModelText,t.value]])]),_:1},8,["isError","isDisabled","hasBorder"])]),_:1},8,["for","is-error","class","label","description","errorText","isDisabled"]),o.createVNode(o.unref(Jn),{isShowDropdown:o.unref(l),"onUpdate:isShowDropdown":C[3]||(C[3]=T=>o.isRef(l)?l.value=T:null),verticalOffset:"4",isStretchToParent:!0},{default:o.withCtx(()=>[o.createVNode(o.unref(Rl),{class:o.normalizeClass(E.$style.popover),borderRadius:12,ref_key:"triggerElementRef",ref:c},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(h.value,T=>(o.openBlock(),o.createBlock(o.unref(ms),{key:T.id,text:T.text,view:"base",isActive:s.value.includes(T.id),onClick:()=>p(T)},{default:o.withCtx(()=>[s.value.includes(T.id)?(o.openBlock(),o.createBlock(o.unref($e),{key:0,name:"outline-check",size:"18",color:"icon-common-base-primary-default"})):o.createCommentVNode("",!0)]),_:2},1032,["text","isActive","onClick"]))),128))]),_:1},8,["class"])]),_:1},8,["isShowDropdown"])],64))}}),[["__cssModules",{$style:{root:"MultiSelectField__root_23a3e",icon:"MultiSelectField__icon_368be","is-open":"MultiSelectField__is-open_6e643",field:"MultiSelectField__field_c2201",popover:"MultiSelectField__popover_d5f47","chip-wrapper":"MultiSelectField__chip-wrapper_5bc66"}}]]),mT=["readonly"],gT=re(o.defineComponent({__name:"SelectField",props:o.mergeModels({list:{},label:{},description:{},errorText:{},isDisabled:{type:Boolean},name:{},placeholder:{},iconLeft:{},iconRight:{},hasBorder:{type:Boolean},hasSearch:{type:Boolean}},{isError:{type:Boolean,default:!1},isErrorModifiers:{},value:{default:""},valueModifiers:{}}),emits:["update:isError","update:value"],setup(n){const e=o.ref(!1),t=o.ref(""),r=o.useModel(n,"isError"),a=o.useModel(n,"value"),{isShowDropdown:s,triggerElementRef:i,parentElementRef:l}=Zn(),c=o.computed(()=>!n.hasSearch||!t.value||!e.value?n.list:n.list.filter(d=>d.text.includes(t.value??"")));return o.watch(a,d=>{var u;t.value=((u=n.list.find(h=>h.id===d))==null?void 0:u.text)??""},{immediate:!0}),o.watch(s,d=>{d===!1&&(e.value=!1)}),(d,u)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(pa),{"is-error":r.value,"onUpdate:isError":u[3]||(u[3]=h=>r.value=h),class:o.normalizeClass(d.$style.root),label:d.label,description:d.description,errorText:d.errorText,isDisabled:d.isDisabled},{default:o.withCtx(()=>[o.createVNode(o.unref(ha),{ref_key:"parentElementRef",ref:l,size:"44",isError:r.value,isDisabled:d.isDisabled,iconLeft:d.iconLeft,iconRight:d.iconRight,hasBorder:d.hasBorder,onClick:u[2]||(u[2]=h=>s.value=!o.unref(s))},{after:o.withCtx(()=>[o.createVNode(o.unref($e),{class:o.normalizeClass([d.$style.icon,{[d.$style["is-open"]]:o.unref(s)}]),size:"18",name:"outline-chevron-down",color:"icon-input-base-primary"},null,8,["class"])]),default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("input",{class:o.normalizeClass(d.$style.field),readonly:!d.hasSearch,"onUpdate:modelValue":u[0]||(u[0]=h=>t.value=h),onInput:u[1]||(u[1]=h=>e.value=!0)},null,42,mT),[[o.vModelText,t.value]])]),_:1},8,["isError","isDisabled","iconLeft","iconRight","hasBorder"])]),_:1},8,["is-error","class","label","description","errorText","isDisabled"]),o.createVNode(o.unref(Jn),{isShowDropdown:o.unref(s),"onUpdate:isShowDropdown":u[4]||(u[4]=h=>o.isRef(s)?s.value=h:null),verticalOffset:"4",isStretchToParent:!0},{default:o.withCtx(()=>[o.createVNode(o.unref(Rl),{class:o.normalizeClass(d.$style.popover),borderRadius:12,ref_key:"triggerElementRef",ref:i},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.value,h=>(o.openBlock(),o.createBlock(o.unref(ms),{key:h.id,text:h.text,view:"base",isActive:h.id===a.value,onClick:()=>{a.value=h.id,s.value=!1,t.value=h.text}},{default:o.withCtx(()=>[h.id===a.value?(o.openBlock(),o.createBlock(o.unref($e),{key:0,name:"outline-check",size:"18",color:"icon-common-base-primary-default"})):o.createCommentVNode("",!0)]),_:2},1032,["text","isActive","onClick"]))),128))]),_:1},8,["class"])]),_:1},8,["isShowDropdown"])],64))}}),[["__cssModules",{$style:{root:"SelectField__root_62305",icon:"SelectField__icon_161d0","is-open":"SelectField__is-open_c25f4",field:"SelectField__field_71d4e",popover:"SelectField__popover_078de"}}]]),yT=["placeholder"],bT=re(o.defineComponent({__name:"MultiInputField",props:o.mergeModels({label:{},description:{},errorText:{},isDisabled:{type:Boolean},name:{},placeholder:{},hasBorder:{type:Boolean},maxLength:{}},{isError:{type:Boolean,default:!1},isErrorModifiers:{},value:{required:!0,default:new Set},valueModifiers:{}}),emits:["update:isError","update:value"],setup(n){const e=o.ref(""),t=o.useModel(n,"isError"),r=o.useModel(n,"value");function a(c){e.value&&i.value&&c.key==="Enter"&&(r.value.add(e.value),e.value="")}function s(c){r.value.has(c)&&r.value.delete(c)}const i=o.computed(()=>n.maxLength?r.value.size<Number(n.maxLength):!0),l=o.computed(()=>n.maxLength?`${r.value.size}/${n.maxLength}`:void 0);return(c,d)=>(o.openBlock(),o.createBlock(o.unref(pa),{"is-error":t.value,"onUpdate:isError":d[1]||(d[1]=u=>t.value=u),label:c.label,description:c.description,errorText:c.errorText,isDisabled:c.isDisabled},{default:o.withCtx(()=>[o.createVNode(o.unref(ha),{ref:"parentElementRef",size:"44",class:o.normalizeClass(c.$style.wrapper),isError:t.value,isDisabled:c.isDisabled,hasBorder:c.hasBorder,hasCounter:!!c.maxLength,counter:l.value},{before:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,(u,h)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(c.$style["chip-wrapper"]),key:h},[o.createVNode(o.unref(za),{onDelete:p=>s(u)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(u),1)]),_:2},1032,["onDelete"])],2))),128))]),default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("input",{class:o.normalizeClass(c.$style.field),placeholder:c.placeholder,"onUpdate:modelValue":d[0]||(d[0]=u=>e.value=u),onKeydown:a},null,42,yT),[[o.vModelText,e.value]])]),_:1},8,["class","isError","isDisabled","hasBorder","hasCounter","counter"])]),_:1},8,["is-error","label","description","errorText","isDisabled"]))}}),[["__cssModules",{$style:{root:"MultiInputField__root_32acd",wrapper:"MultiInputField__wrapper_ac300","chip-wrapper":"MultiInputField__chip-wrapper_64b92",input:"MultiInputField__input_2ad8e"}}]]),kT=["onClick"],vT=re(o.defineComponent({__name:"Tabs",props:o.mergeModels({value:{},label:{},view:{},size:{},isDisabled:{type:Boolean},data:{}},{value:{required:!0},valueModifiers:{}}),emits:["update:value"],setup(n){const e=o.useModel(n,"value"),t=o.useCssModule(),r=o.ref([]),a=o.ref({transform:"translateX(0)",width:"0",height:"0"}),s=o.ref(!1);function i(g,x){g&&(r.value[x]=g)}function l(g){const x=r.value[g];if(x){const{offsetLeft:E,offsetWidth:C,offsetHeight:T}=x,F={transform:`translateX(${E}px)`,width:`${C}px`,height:n.view==="flat"?"1px":`${T}px`};a.value=F,s.value&&(a.value={...F,transition:"transform 0.3s ease, width 0.3s ease"})}}function c(g){return n.data.findIndex(x=>x.id===g)}function d(g){n.isDisabled||(e.value=n.data[g].id)}function u(){const g=c(e.value);g!==-1&&o.nextTick(()=>l(g))}o.onMounted(()=>{o.nextTick(()=>{const g=c(e.value);g!==-1&&l(g),s.value=!0}),window.addEventListener("resize",u,{passive:!0})}),o.onBeforeUnmount(()=>{window.removeEventListener("resize",u)}),o.watch(e,g=>{const x=c(g);x!==-1&&o.nextTick(()=>l(x))});const h=o.computed(()=>({default:"text-common-base-primary-default",flat:"foreground-layout-layout-1-secondary","flat-secondary":"text-common-base-secondary-default"})[n.view]),p=o.computed(()=>{switch(n.view){case"default":return n.size==="28_caption"?"caption":"subhead";case"flat":return n.size==="subhead"?"subhead":"body";case"flat-secondary":return"subhead";default:return"subhead"}}),m=o.computed(()=>n.size==="28_caption"?16:18);function f(){n.view==="flat-secondary"&&console.warn(`[Tabs] 'view="${n.view}"' не поддерживает props size "${n.size}"
|
|
85
85
|
Поддерживается только props size "default"`),n.view==="default"&&["body","subhead","default"].includes(n.size)&&console.warn(`[Tabs] 'view="${n.view}"' не поддерживает props size "${n.size}"
|
|
86
86
|
Поддерживается только props size "${["28_caption","36_subhead"].join(", ")}"
|
|
87
87
|
`),n.view==="flat"&&["28_caption","36_subhead","default"].includes(n.size)&&console.warn(`[Tabs] 'view="${n.view}"' не поддерживает props size "${n.size}"
|
|
88
88
|
Поддерживается только props size "${["body","subhead"].join(", ")}"
|
|
89
|
-
`)}return o.watch(()=>n.view,f,{immediate:!0}),o.watch(()=>n.size,f,{immediate:!0}),(g,x)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([o.unref(t).root,g.$style[`view_${g.view}`],g.$style[`size_${g.size}`],{[g.$style["is-disabled"]]:g.isDisabled}])},[g.label?(o.openBlock(),o.createBlock(o.unref(me),{key:0,size:"subhead",color:"text-common-base-primary-default"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(g.label),1)]),_:1})):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(o.unref(t).wrapper)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(g.data,(E,C)=>(o.openBlock(),o.createElementBlock("div",{key:`${E.id}-${C}`,ref_for:!0,ref:T=>i(T,C),class:o.normalizeClass([o.unref(t).item,{[o.unref(t)["is-active"]]:E.id===e.value}]),onClick:T=>d(C)},[E.iconLeft&&g.view==="default"?(o.openBlock(),o.createBlock(o.unref($e),{key:0,name:E.iconLeft,color:"icon-common-base-primary-default",size:m.value},null,8,["name","size"])):o.createCommentVNode("",!0),o.createVNode(o.unref(me),{tag:"span",class:o.normalizeClass(o.unref(t)["item-content"]),size:p.value,weight:"regular",color:h.value},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(E.text),1)]),_:2},1032,["class","size","color"]),g.view==="flat-secondary"?(o.openBlock(),o.createBlock(o.unref(me),{key:1,class:o.normalizeClass(o.unref(t)["fake-hover-item-content"]),tag:"span",size:p.value,weight:"semibold",color:h.value},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(E.text),1)]),_:2},1032,["class","size","color"])):o.createCommentVNode("",!0),E.iconRight&&g.view==="default"?(o.openBlock(),o.createBlock(o.unref($e),{key:2,name:E.iconRight,color:"icon-common-base-primary-default",size:m.value},null,8,["name","size"])):o.createCommentVNode("",!0)],10,kT))),128)),o.createElementVNode("div",{class:o.normalizeClass(o.unref(t).caret),style:o.normalizeStyle(a.value)},null,6)],2)],2))}}),[["__cssModules",{$style:{root:"Tabs__root_d7a36","is-disabled":"Tabs__is-disabled_7e6a4",item:"Tabs__item_17457",view_default:"Tabs__view_default_a26a9",wrapper:"Tabs__wrapper_f6551",size_28_caption:"Tabs__size_28_caption_9cdec",caret:"Tabs__caret_a03a0",size_36_subhead:"Tabs__size_36_subhead_e4f56","view_flat-secondary":"Tabs__view_flat-secondary_af14a","fake-hover-item-content":"Tabs__fake-hover-item-content_fbb9b","item-content":"Tabs__item-content_5668c","is-active":"Tabs__is-active_73cdf",view_flat:"Tabs__view_flat_bb6dd"}}]]),wT=Symbol("bubble_tabs_context"),_T=n=>{o.provide(wT,n)},CT=re(o.defineComponent({__name:"BubbleTabs",props:o.mergeModels({label:{},size:{}},{active:{required:!0},activeModifiers:{}}),emits:["update:active"],setup(n){const e=o.useTemplateRef("items"),t=o.useModel(n,"active"),r=o.ref({width:0,height:0,top:0,left:0}),a=o.computed(()=>{if(!e.value)return{width:"0",height:"0",left:"0",top:"0"};const s=e.value.getBoundingClientRect(),i=r.value;return{width:`${r.value.width}px`,height:`${r.value.height}px`,top:`${i.top-s.top}px`,left:`${i.left-s.left}px`}});return _T({active:t,activeRect:r}),(s,i)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([s.$style.root,s.$style[`size_${s.size}`]])},[s.label?(o.openBlock(),o.createBlock(o.unref(me),{key:0,class:o.normalizeClass(s.$style.label),size:"subhead",weight:"regular",color:"foreground-layout-layout-1-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(s.label),1)]),_:1},8,["class"])):o.createCommentVNode("",!0),o.createElementVNode("div",{ref:"items",class:o.normalizeClass(s.$style.items)},[o.withDirectives(o.createElementVNode("div",{class:o.normalizeClass(s.$style.selector),style:o.normalizeStyle(a.value)},null,6),[[o.vShow,r.value.width>0]]),o.renderSlot(s.$slots,"default")],2)],2))}}),[["__cssModules",{$style:{root:"BubbleTabs__root_d5b4f",label:"BubbleTabs__label_9e958",size_28_caption:"BubbleTabs__size_28_caption_96051",items:"BubbleTabs__items_0a859",item:"BubbleTabs__item_10951",selector:"BubbleTabs__selector_ce93e",size_36_subhead:"BubbleTabs__size_36_subhead_3e828","is-active":"BubbleTabs__is-active_aa23c"}}]]),ET=Symbol("flat_tabs_context"),ST=n=>{o.provide(ET,n)},xT=re(o.defineComponent({__name:"FlatTabs",props:o.mergeModels({label:{},size:{}},{active:{required:!0},activeModifiers:{}}),emits:["update:active"],setup(n){const e=o.useTemplateRef("items"),t=o.useModel(n,"active"),r=o.ref({width:0,left:0}),a=o.computed(()=>{if(!e.value)return{width:"0",left:"0"};const l=e.value.getBoundingClientRect(),c=r.value;return{width:`${r.value.width}px`,left:`${c.left-l.left}px`}}),s=n,i=o.computed(()=>s.size);return ST({active:t,activeRect:r,size:i}),(l,c)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([l.$style.root,l.$style[`size_${i.value}`]])},[o.createVNode(o.unref(me),{class:o.normalizeClass(l.$style.label),size:"subhead",weight:"regular",color:"foreground-layout-layout-1-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(l.label),1)]),_:1},8,["class"]),o.createElementVNode("div",{ref:"items",class:o.normalizeClass(l.$style.items)},[o.withDirectives(o.createElementVNode("div",{class:o.normalizeClass(l.$style.selector),style:o.normalizeStyle(a.value)},null,6),[[o.vShow,r.value.width>0]]),o.renderSlot(l.$slots,"default"),o.createVNode(o.unref(An),{class:o.normalizeClass(l.$style.divider),size:"s"},null,8,["class"])],2)],2))}}),[["__cssModules",{$style:{root:"FlatTabs__root_f45ac",items:"FlatTabs__items_6fa24",item:"FlatTabs__item_6342e",selector:"FlatTabs__selector_5ae95",divider:"FlatTabs__divider_f140d"}}]]);X.AnimationFadeBlur=qn,X.Avatar=F_,X.Badge=ni,X.BadgeSkeleton=dg,X.BannerOffer=mg,X.BannerOfferSkeleton=bg,X.Breadcrumbs=L_,X.BubbleTabs=CT,X.Button=tn,X.ButtonIcon=wo,X.ButtonIconSkeleton=jg,X.ButtonSkeleton=Cg,X.CardContent=
|
|
89
|
+
`)}return o.watch(()=>n.view,f,{immediate:!0}),o.watch(()=>n.size,f,{immediate:!0}),(g,x)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([o.unref(t).root,g.$style[`view_${g.view}`],g.$style[`size_${g.size}`],{[g.$style["is-disabled"]]:g.isDisabled}])},[g.label?(o.openBlock(),o.createBlock(o.unref(me),{key:0,size:"subhead",color:"text-common-base-primary-default"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(g.label),1)]),_:1})):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(o.unref(t).wrapper)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(g.data,(E,C)=>(o.openBlock(),o.createElementBlock("div",{key:`${E.id}-${C}`,ref_for:!0,ref:T=>i(T,C),class:o.normalizeClass([o.unref(t).item,{[o.unref(t)["is-active"]]:E.id===e.value}]),onClick:T=>d(C)},[E.iconLeft&&g.view==="default"?(o.openBlock(),o.createBlock(o.unref($e),{key:0,name:E.iconLeft,color:"icon-common-base-primary-default",size:m.value},null,8,["name","size"])):o.createCommentVNode("",!0),o.createVNode(o.unref(me),{tag:"span",class:o.normalizeClass(o.unref(t)["item-content"]),size:p.value,weight:"regular",color:h.value},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(E.text),1)]),_:2},1032,["class","size","color"]),g.view==="flat-secondary"?(o.openBlock(),o.createBlock(o.unref(me),{key:1,class:o.normalizeClass(o.unref(t)["fake-hover-item-content"]),tag:"span",size:p.value,weight:"semibold",color:h.value},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(E.text),1)]),_:2},1032,["class","size","color"])):o.createCommentVNode("",!0),E.iconRight&&g.view==="default"?(o.openBlock(),o.createBlock(o.unref($e),{key:2,name:E.iconRight,color:"icon-common-base-primary-default",size:m.value},null,8,["name","size"])):o.createCommentVNode("",!0)],10,kT))),128)),o.createElementVNode("div",{class:o.normalizeClass(o.unref(t).caret),style:o.normalizeStyle(a.value)},null,6)],2)],2))}}),[["__cssModules",{$style:{root:"Tabs__root_d7a36","is-disabled":"Tabs__is-disabled_7e6a4",item:"Tabs__item_17457",view_default:"Tabs__view_default_a26a9",wrapper:"Tabs__wrapper_f6551",size_28_caption:"Tabs__size_28_caption_9cdec",caret:"Tabs__caret_a03a0",size_36_subhead:"Tabs__size_36_subhead_e4f56","view_flat-secondary":"Tabs__view_flat-secondary_af14a","fake-hover-item-content":"Tabs__fake-hover-item-content_fbb9b","item-content":"Tabs__item-content_5668c","is-active":"Tabs__is-active_73cdf",view_flat:"Tabs__view_flat_bb6dd"}}]]),wT=Symbol("bubble_tabs_context"),_T=n=>{o.provide(wT,n)},CT=re(o.defineComponent({__name:"BubbleTabs",props:o.mergeModels({label:{},size:{}},{active:{required:!0},activeModifiers:{}}),emits:["update:active"],setup(n){const e=o.useTemplateRef("items"),t=o.useModel(n,"active"),r=o.ref({width:0,height:0,top:0,left:0}),a=o.computed(()=>{if(!e.value)return{width:"0",height:"0",left:"0",top:"0"};const s=e.value.getBoundingClientRect(),i=r.value;return{width:`${r.value.width}px`,height:`${r.value.height}px`,top:`${i.top-s.top}px`,left:`${i.left-s.left}px`}});return _T({active:t,activeRect:r}),(s,i)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([s.$style.root,s.$style[`size_${s.size}`]])},[s.label?(o.openBlock(),o.createBlock(o.unref(me),{key:0,class:o.normalizeClass(s.$style.label),size:"subhead",weight:"regular",color:"foreground-layout-layout-1-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(s.label),1)]),_:1},8,["class"])):o.createCommentVNode("",!0),o.createElementVNode("div",{ref:"items",class:o.normalizeClass(s.$style.items)},[o.withDirectives(o.createElementVNode("div",{class:o.normalizeClass(s.$style.selector),style:o.normalizeStyle(a.value)},null,6),[[o.vShow,r.value.width>0]]),o.renderSlot(s.$slots,"default")],2)],2))}}),[["__cssModules",{$style:{root:"BubbleTabs__root_d5b4f",label:"BubbleTabs__label_9e958",size_28_caption:"BubbleTabs__size_28_caption_96051",items:"BubbleTabs__items_0a859",item:"BubbleTabs__item_10951",selector:"BubbleTabs__selector_ce93e",size_36_subhead:"BubbleTabs__size_36_subhead_3e828","is-active":"BubbleTabs__is-active_aa23c"}}]]),ET=Symbol("flat_tabs_context"),ST=n=>{o.provide(ET,n)},xT=re(o.defineComponent({__name:"FlatTabs",props:o.mergeModels({label:{},size:{}},{active:{required:!0},activeModifiers:{}}),emits:["update:active"],setup(n){const e=o.useTemplateRef("items"),t=o.useModel(n,"active"),r=o.ref({width:0,left:0}),a=o.computed(()=>{if(!e.value)return{width:"0",left:"0"};const l=e.value.getBoundingClientRect(),c=r.value;return{width:`${r.value.width}px`,left:`${c.left-l.left}px`}}),s=n,i=o.computed(()=>s.size);return ST({active:t,activeRect:r,size:i}),(l,c)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([l.$style.root,l.$style[`size_${i.value}`]])},[o.createVNode(o.unref(me),{class:o.normalizeClass(l.$style.label),size:"subhead",weight:"regular",color:"foreground-layout-layout-1-primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(l.label),1)]),_:1},8,["class"]),o.createElementVNode("div",{ref:"items",class:o.normalizeClass(l.$style.items)},[o.withDirectives(o.createElementVNode("div",{class:o.normalizeClass(l.$style.selector),style:o.normalizeStyle(a.value)},null,6),[[o.vShow,r.value.width>0]]),o.renderSlot(l.$slots,"default"),o.createVNode(o.unref(An),{class:o.normalizeClass(l.$style.divider),size:"s"},null,8,["class"])],2)],2))}}),[["__cssModules",{$style:{root:"FlatTabs__root_f45ac",items:"FlatTabs__items_6fa24",item:"FlatTabs__item_6342e",selector:"FlatTabs__selector_5ae95",divider:"FlatTabs__divider_f140d"}}]]);X.AnimationFadeBlur=qn,X.Avatar=F_,X.Badge=ni,X.BadgeSkeleton=dg,X.BannerOffer=mg,X.BannerOfferSkeleton=bg,X.Breadcrumbs=L_,X.BubbleTabs=CT,X.Button=tn,X.ButtonIcon=wo,X.ButtonIconSkeleton=jg,X.ButtonSkeleton=Cg,X.CardContent=pu,X.CardContentList=Oy,X.CardContentListSkeleton=Ay,X.CardContentSkeleton=fu,X.CellInfo=Y_,X.Checkbox=Ru,X.CheckboxCell=Ai,X.CheckboxGroupFilter=ps,X.CheckboxGroupFilterChip=Rp,X.CheckboxGroupFilterView=ps,X.Chip=za,X.ColorPicker=V0,X.Container=W0,X.Currency=iT,X.DYNAMIC_VISIBLE_AREA_PROVIDER_NAME=Ii,X.Datepicker=Ip,X.DatepickerFilter=hs,X.DatepickerFilterChip=Hp,X.DatepickerFilterView=hs,X.Divider=An,X.Dropdown=Ny,X.DropdownElement=Jn,X.Dropzone=jy,X.DynamicVisibleArea=Uu,X.Editor=JB,X.EditorText=tT,X.EmptyResponse=xb,X.FilterHub=b_,X.FlatTabs=xT,X.HeaderText=qu,X.Icon=$e,X.IconView=Gu,X.ImageRow=Zy,X.ImageRowSkeleton=Jy,X.Input=Fi,X.InputField=eg,X.InputMaskField=uT,X.InputPassword=hT,X.InputSkeleton=kb,X.Link=wb,X.ListHeader=_b,X.Loader=_r,X.MenuBar=V_,X.MenuBarItem=ms,X.ModalConfirmation=Cb,X.MultiInputField=bT,X.MultiSelectField=fT,X.PageInfoCell=Zm,X.PageInfoCellSkeleton=Qm,X.PageInfoCellTable=rT,X.PageInfoCellTableSkeleton=aT,X.Popover=Rl,X.Price=Ri,X.ResponseBase=ah,X.Section=Bb,X.Select=Ub,X.SelectBase=Wi,X.SelectField=gT,X.SkeletonWrapper=Ji,X.StatusSelect=$_,X.StatusSelectSkeleton=M_,X.StepItem=qp,X.Steps=H_,X.Summary=sT,X.Table=W_,X.TableRow=q_,X.Tabs=vT,X.TheImage=Ho,X.TheText=me,X.TheTextSkeleton=$n,X.ThemePicker=N_,X.ThemePickerSkeleton=P_,X.ToastServiceKey=Fl,X.Toaster=C_,X.ToasterProvider=rk,X.Toggle=hi,X.Tooltip=Kp,X.TransitionFade=Jo,X.TransitionFadeBlur=$t,X.TransitionHeight=H0,X.TransitionSlideDown=ek,X.TransitionSlideRight=X0,X.UserRow=Y0,X.UserRowSkeleton=U0,X.VerificationInfoCell=z_,X.iconNames=lg,X.isCheckboxGroupFilterValue=Lp,X.isDatepickerFilterValue=zp,X.spriteService=S_,X.toastService=w_,X.useCopyToBuffer=Gp,X.useDropdown=Zn,X.useDropdownAnimation=Vu,X.useDropdownElementInject=uh,X.useDynamicVisibleArea=Wu,X.useDynamicVisibleAreaInject=Gy,X.useGlobalConfig=O_,X.useGlobalConfigProvide=D_,X.useToaster=_h,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})});
|