@pksep/yui 0.1.195 → 0.1.196
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/sep-yui.es.ts +4 -2
- package/dist/sep-yui.umd.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/sep-yui.es.ts
CHANGED
|
@@ -79657,7 +79657,9 @@ const T8g = ["id", "data-testid"], j8g = ["data-testid"], x8g = ["data-testid"],
|
|
|
79657
79657
|
},
|
|
79658
79658
|
I.class
|
|
79659
79659
|
]);
|
|
79660
|
-
eg(s, () =>
|
|
79660
|
+
eg(s, () => {
|
|
79661
|
+
t("unmount-open", s.value), o.value = "";
|
|
79662
|
+
}), eg(
|
|
79661
79663
|
() => I.isOpened,
|
|
79662
79664
|
() => {
|
|
79663
79665
|
if (I.disabled) {
|
|
@@ -79868,7 +79870,7 @@ const T8g = ["id", "data-testid"], j8g = ["data-testid"], x8g = ["data-testid"],
|
|
|
79868
79870
|
} : void 0
|
|
79869
79871
|
]), 1032, ["is-opened", "class", "is-use-anchor", "data-testid", "disabled"]));
|
|
79870
79872
|
}
|
|
79871
|
-
}), Iv = /* @__PURE__ */ Kg(v_g, [["__scopeId", "data-v-
|
|
79873
|
+
}), Iv = /* @__PURE__ */ Kg(v_g, [["__scopeId", "data-v-5cb00a14"]]), L_g = ["data-testid"], T_g = /* @__PURE__ */ ng({
|
|
79872
79874
|
name: "Range",
|
|
79873
79875
|
__name: "Range",
|
|
79874
79876
|
props: /* @__PURE__ */ CA({
|
package/dist/sep-yui.umd.ts
CHANGED
|
@@ -1369,7 +1369,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
1369
1369
|
* Copyright 2021 Hyunje Jun, MDBootstrap and Contributors
|
|
1370
1370
|
* Licensed under MIT
|
|
1371
1371
|
*/function rn(C){return getComputedStyle(C)}function ft(C,g){for(var I in g){var e=g[I];typeof e=="number"&&(e=e+"px"),C.style[I]=e}return C}function Uw(C){var g=document.createElement("div");return g.className=C,g}var n9=typeof Element<"u"&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function fs(C,g){if(!n9)throw new Error("No element matching method supported");return n9.call(C,g)}function nr(C){C.remove?C.remove():C.parentNode&&C.parentNode.removeChild(C)}function l9(C,g){return Array.prototype.filter.call(C.children,function(I){return fs(I,g)})}var zC={main:"ps",rtl:"ps__rtl",element:{thumb:function(C){return"ps__thumb-"+C},rail:function(C){return"ps__rail-"+C},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(C){return"ps--active-"+C},scrolling:function(C){return"ps--scrolling-"+C}}},s9={x:null,y:null};function o9(C,g){var I=C.element.classList,e=zC.state.scrolling(g);I.contains(e)?clearTimeout(s9[g]):I.add(e)}function a9(C,g){s9[g]=setTimeout(function(){return C.isAlive&&C.element.classList.remove(zC.state.scrolling(g))},C.settings.scrollingThreshold)}function fxg(C,g){o9(C,g),a9(C,g)}var xh=function(g){this.element=g,this.handlers={}},d9={isEmpty:{configurable:!0}};xh.prototype.bind=function(g,I){typeof this.handlers[g]>"u"&&(this.handlers[g]=[]),this.handlers[g].push(I),this.element.addEventListener(g,I,!1)},xh.prototype.unbind=function(g,I){var e=this;this.handlers[g]=this.handlers[g].filter(function(t){return I&&t!==I?!0:(e.element.removeEventListener(g,t,!1),!1)})},xh.prototype.unbindAll=function(){for(var g in this.handlers)this.unbind(g)},d9.isEmpty.get=function(){var C=this;return Object.keys(this.handlers).every(function(g){return C.handlers[g].length===0})},Object.defineProperties(xh.prototype,d9);var lr=function(){this.eventElements=[]};lr.prototype.eventElement=function(g){var I=this.eventElements.filter(function(e){return e.element===g})[0];return I||(I=new xh(g),this.eventElements.push(I)),I},lr.prototype.bind=function(g,I,e){this.eventElement(g).bind(I,e)},lr.prototype.unbind=function(g,I,e){var t=this.eventElement(g);t.unbind(I,e),t.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(t),1)},lr.prototype.unbindAll=function(){this.eventElements.forEach(function(g){return g.unbindAll()}),this.eventElements=[]},lr.prototype.once=function(g,I,e){var t=this.eventElement(g),i=function(A){t.unbind(I,i),e(A)};t.bind(I,i)};function Ew(C){if(typeof window.CustomEvent=="function")return new CustomEvent(C);var g=document.createEvent("CustomEvent");return g.initCustomEvent(C,!1,!1,void 0),g}function Pw(C,g,I,e,t){e===void 0&&(e=!0),t===void 0&&(t=!1);var i;if(g==="top")i=["contentHeight","containerHeight","scrollTop","y","up","down"];else if(g==="left")i=["contentWidth","containerWidth","scrollLeft","x","left","right"];else throw new Error("A proper axis should be provided");Dxg(C,I,i,e,t)}function Dxg(C,g,I,e,t){var i=I[0],A=I[1],n=I[2],l=I[3],o=I[4],a=I[5];e===void 0&&(e=!0),t===void 0&&(t=!1);var d=C.element;C.reach[l]=null,d[n]<1&&(C.reach[l]="start"),d[n]>C[i]-C[A]-1&&(C.reach[l]="end"),g&&(d.dispatchEvent(Ew("ps-scroll-"+l)),g<0?d.dispatchEvent(Ew("ps-scroll-"+o)):g>0&&d.dispatchEvent(Ew("ps-scroll-"+a)),e&&fxg(C,l)),C.reach[l]&&(g||t)&&d.dispatchEvent(Ew("ps-"+l+"-reach-"+C.reach[l]))}function aC(C){return parseInt(C,10)||0}function Sxg(C){return fs(C,"input,[contenteditable]")||fs(C,"select,[contenteditable]")||fs(C,"textarea,[contenteditable]")||fs(C,"button,[contenteditable]")}function Kxg(C){var g=rn(C);return aC(g.width)+aC(g.paddingLeft)+aC(g.paddingRight)+aC(g.borderLeftWidth)+aC(g.borderRightWidth)}var sr={isWebKit:typeof document<"u"&&"WebkitAppearance"in document.documentElement.style,supportsTouch:typeof window<"u"&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:typeof navigator<"u"&&navigator.msMaxTouchPoints,isChrome:typeof navigator<"u"&&/Chrome/i.test(navigator&&navigator.userAgent)};function Al(C){var g=C.element,I=Math.floor(g.scrollTop),e=g.getBoundingClientRect();C.containerWidth=Math.round(e.width),C.containerHeight=Math.round(e.height),C.contentWidth=g.scrollWidth,C.contentHeight=g.scrollHeight,g.contains(C.scrollbarXRail)||(l9(g,zC.element.rail("x")).forEach(function(t){return nr(t)}),g.appendChild(C.scrollbarXRail)),g.contains(C.scrollbarYRail)||(l9(g,zC.element.rail("y")).forEach(function(t){return nr(t)}),g.appendChild(C.scrollbarYRail)),!C.settings.suppressScrollX&&C.containerWidth+C.settings.scrollXMarginOffset<C.contentWidth?(C.scrollbarXActive=!0,C.railXWidth=C.containerWidth-C.railXMarginWidth,C.railXRatio=C.containerWidth/C.railXWidth,C.scrollbarXWidth=c9(C,aC(C.railXWidth*C.containerWidth/C.contentWidth)),C.scrollbarXLeft=aC((C.negativeScrollAdjustment+g.scrollLeft)*(C.railXWidth-C.scrollbarXWidth)/(C.contentWidth-C.containerWidth))):C.scrollbarXActive=!1,!C.settings.suppressScrollY&&C.containerHeight+C.settings.scrollYMarginOffset<C.contentHeight?(C.scrollbarYActive=!0,C.railYHeight=C.containerHeight-C.railYMarginHeight,C.railYRatio=C.containerHeight/C.railYHeight,C.scrollbarYHeight=c9(C,aC(C.railYHeight*C.containerHeight/C.contentHeight)),C.scrollbarYTop=aC(I*(C.railYHeight-C.scrollbarYHeight)/(C.contentHeight-C.containerHeight))):C.scrollbarYActive=!1,C.scrollbarXLeft>=C.railXWidth-C.scrollbarXWidth&&(C.scrollbarXLeft=C.railXWidth-C.scrollbarXWidth),C.scrollbarYTop>=C.railYHeight-C.scrollbarYHeight&&(C.scrollbarYTop=C.railYHeight-C.scrollbarYHeight),kxg(g,C),C.scrollbarXActive?g.classList.add(zC.state.active("x")):(g.classList.remove(zC.state.active("x")),C.scrollbarXWidth=0,C.scrollbarXLeft=0,g.scrollLeft=C.isRtl===!0?C.contentWidth:0),C.scrollbarYActive?g.classList.add(zC.state.active("y")):(g.classList.remove(zC.state.active("y")),C.scrollbarYHeight=0,C.scrollbarYTop=0,g.scrollTop=0)}function c9(C,g){return C.settings.minScrollbarLength&&(g=Math.max(g,C.settings.minScrollbarLength)),C.settings.maxScrollbarLength&&(g=Math.min(g,C.settings.maxScrollbarLength)),g}function kxg(C,g){var I={width:g.railXWidth},e=Math.floor(C.scrollTop);g.isRtl?I.left=g.negativeScrollAdjustment+C.scrollLeft+g.containerWidth-g.contentWidth:I.left=C.scrollLeft,g.isScrollbarXUsingBottom?I.bottom=g.scrollbarXBottom-e:I.top=g.scrollbarXTop+e,ft(g.scrollbarXRail,I);var t={top:e,height:g.railYHeight};g.isScrollbarYUsingRight?g.isRtl?t.right=g.contentWidth-(g.negativeScrollAdjustment+C.scrollLeft)-g.scrollbarYRight-g.scrollbarYOuterWidth-9:t.right=g.scrollbarYRight-C.scrollLeft:g.isRtl?t.left=g.negativeScrollAdjustment+C.scrollLeft+g.containerWidth*2-g.contentWidth-g.scrollbarYLeft-g.scrollbarYOuterWidth:t.left=g.scrollbarYLeft+C.scrollLeft,ft(g.scrollbarYRail,t),ft(g.scrollbarX,{left:g.scrollbarXLeft,width:g.scrollbarXWidth-g.railBorderXWidth}),ft(g.scrollbarY,{top:g.scrollbarYTop,height:g.scrollbarYHeight-g.railBorderYWidth})}function Fxg(C){C.element,C.event.bind(C.scrollbarY,"mousedown",function(g){return g.stopPropagation()}),C.event.bind(C.scrollbarYRail,"mousedown",function(g){var I=g.pageY-window.pageYOffset-C.scrollbarYRail.getBoundingClientRect().top,e=I>C.scrollbarYTop?1:-1;C.element.scrollTop+=e*C.containerHeight,Al(C),g.stopPropagation()}),C.event.bind(C.scrollbarX,"mousedown",function(g){return g.stopPropagation()}),C.event.bind(C.scrollbarXRail,"mousedown",function(g){var I=g.pageX-window.pageXOffset-C.scrollbarXRail.getBoundingClientRect().left,e=I>C.scrollbarXLeft?1:-1;C.element.scrollLeft+=e*C.containerWidth,Al(C),g.stopPropagation()})}function zxg(C){r9(C,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),r9(C,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])}function r9(C,g){var I=g[0],e=g[1],t=g[2],i=g[3],A=g[4],n=g[5],l=g[6],o=g[7],a=g[8],d=C.element,m=null,u=null,b=null;function Z(B){B.touches&&B.touches[0]&&(B[t]=B.touches[0].pageY),d[l]=m+b*(B[t]-u),o9(C,o),Al(C),B.stopPropagation(),B.type.startsWith("touch")&&B.changedTouches.length>1&&B.preventDefault()}function w(){a9(C,o),C[a].classList.remove(zC.state.clicking),C.event.unbind(C.ownerDocument,"mousemove",Z)}function G(B,p){m=d[l],p&&B.touches&&(B[t]=B.touches[0].pageY),u=B[t],b=(C[e]-C[I])/(C[i]-C[n]),p?C.event.bind(C.ownerDocument,"touchmove",Z):(C.event.bind(C.ownerDocument,"mousemove",Z),C.event.once(C.ownerDocument,"mouseup",w),B.preventDefault()),C[a].classList.add(zC.state.clicking),B.stopPropagation()}C.event.bind(C[A],"mousedown",function(B){G(B)}),C.event.bind(C[A],"touchstart",function(B){G(B,!0)})}function Jxg(C){var g=C.element,I=function(){return fs(g,":hover")},e=function(){return fs(C.scrollbarX,":focus")||fs(C.scrollbarY,":focus")};function t(i,A){var n=Math.floor(g.scrollTop);if(i===0){if(!C.scrollbarYActive)return!1;if(n===0&&A>0||n>=C.contentHeight-C.containerHeight&&A<0)return!C.settings.wheelPropagation}var l=g.scrollLeft;if(A===0){if(!C.scrollbarXActive)return!1;if(l===0&&i<0||l>=C.contentWidth-C.containerWidth&&i>0)return!C.settings.wheelPropagation}return!0}C.event.bind(C.ownerDocument,"keydown",function(i){if(!(i.isDefaultPrevented&&i.isDefaultPrevented()||i.defaultPrevented)&&!(!I()&&!e())){var A=document.activeElement?document.activeElement:C.ownerDocument.activeElement;if(A){if(A.tagName==="IFRAME")A=A.contentDocument.activeElement;else for(;A.shadowRoot;)A=A.shadowRoot.activeElement;if(Sxg(A))return}var n=0,l=0;switch(i.which){case 37:i.metaKey?n=-C.contentWidth:i.altKey?n=-C.containerWidth:n=-30;break;case 38:i.metaKey?l=C.contentHeight:i.altKey?l=C.containerHeight:l=30;break;case 39:i.metaKey?n=C.contentWidth:i.altKey?n=C.containerWidth:n=30;break;case 40:i.metaKey?l=-C.contentHeight:i.altKey?l=-C.containerHeight:l=-30;break;case 32:i.shiftKey?l=C.containerHeight:l=-C.containerHeight;break;case 33:l=C.containerHeight;break;case 34:l=-C.containerHeight;break;case 36:l=C.contentHeight;break;case 35:l=-C.contentHeight;break;default:return}C.settings.suppressScrollX&&n!==0||C.settings.suppressScrollY&&l!==0||(g.scrollTop-=l,g.scrollLeft+=n,Al(C),t(n,l)&&i.preventDefault())}})}function Lxg(C){var g=C.element;function I(A,n){var l=Math.floor(g.scrollTop),o=g.scrollTop===0,a=l+g.offsetHeight===g.scrollHeight,d=g.scrollLeft===0,m=g.scrollLeft+g.offsetWidth===g.scrollWidth,u;return Math.abs(n)>Math.abs(A)?u=o||a:u=d||m,u?!C.settings.wheelPropagation:!0}function e(A){var n=A.deltaX,l=-1*A.deltaY;return(typeof n>"u"||typeof l>"u")&&(n=-1*A.wheelDeltaX/6,l=A.wheelDeltaY/6),A.deltaMode&&A.deltaMode===1&&(n*=10,l*=10),n!==n&&l!==l&&(n=0,l=A.wheelDelta),A.shiftKey?[-l,-n]:[n,l]}function t(A,n,l){if(!sr.isWebKit&&g.querySelector("select:focus"))return!0;if(!g.contains(A))return!1;for(var o=A;o&&o!==g;){if(o.classList.contains(zC.element.consuming))return!0;var a=rn(o);if(l&&a.overflowY.match(/(scroll|auto)/)){var d=o.scrollHeight-o.clientHeight;if(d>0&&(o.scrollTop>0&&l<0||o.scrollTop<d&&l>0))return!0}if(n&&a.overflowX.match(/(scroll|auto)/)){var m=o.scrollWidth-o.clientWidth;if(m>0&&(o.scrollLeft>0&&n<0||o.scrollLeft<m&&n>0))return!0}o=o.parentNode}return!1}function i(A){var n=e(A),l=n[0],o=n[1];if(!t(A.target,l,o)){var a=!1;C.settings.useBothWheelAxes?C.scrollbarYActive&&!C.scrollbarXActive?(o?g.scrollTop-=o*C.settings.wheelSpeed:g.scrollTop+=l*C.settings.wheelSpeed,a=!0):C.scrollbarXActive&&!C.scrollbarYActive&&(l?g.scrollLeft+=l*C.settings.wheelSpeed:g.scrollLeft-=o*C.settings.wheelSpeed,a=!0):(g.scrollTop-=o*C.settings.wheelSpeed,g.scrollLeft+=l*C.settings.wheelSpeed),Al(C),a=a||I(l,o),a&&!A.ctrlKey&&(A.stopPropagation(),A.preventDefault())}}typeof window.onwheel<"u"?C.event.bind(g,"wheel",i):typeof window.onmousewheel<"u"&&C.event.bind(g,"mousewheel",i)}function Txg(C){if(!sr.supportsTouch&&!sr.supportsIePointer)return;var g=C.element;function I(b,Z){var w=Math.floor(g.scrollTop),G=g.scrollLeft,B=Math.abs(b),p=Math.abs(Z);if(p>B){if(Z<0&&w===C.contentHeight-C.containerHeight||Z>0&&w===0)return window.scrollY===0&&Z>0&&sr.isChrome}else if(B>p&&(b<0&&G===C.contentWidth-C.containerWidth||b>0&&G===0))return!0;return!0}function e(b,Z){g.scrollTop-=Z,g.scrollLeft-=b,Al(C)}var t={},i=0,A={},n=null;function l(b){return b.targetTouches?b.targetTouches[0]:b}function o(b){return b.pointerType&&b.pointerType==="pen"&&b.buttons===0?!1:!!(b.targetTouches&&b.targetTouches.length===1||b.pointerType&&b.pointerType!=="mouse"&&b.pointerType!==b.MSPOINTER_TYPE_MOUSE)}function a(b){if(o(b)){var Z=l(b);t.pageX=Z.pageX,t.pageY=Z.pageY,i=new Date().getTime(),n!==null&&clearInterval(n)}}function d(b,Z,w){if(!g.contains(b))return!1;for(var G=b;G&&G!==g;){if(G.classList.contains(zC.element.consuming))return!0;var B=rn(G);if(w&&B.overflowY.match(/(scroll|auto)/)){var p=G.scrollHeight-G.clientHeight;if(p>0&&(G.scrollTop>0&&w<0||G.scrollTop<p&&w>0))return!0}if(Z&&B.overflowX.match(/(scroll|auto)/)){var y=G.scrollWidth-G.clientWidth;if(y>0&&(G.scrollLeft>0&&Z<0||G.scrollLeft<y&&Z>0))return!0}G=G.parentNode}return!1}function m(b){if(o(b)){var Z=l(b),w={pageX:Z.pageX,pageY:Z.pageY},G=w.pageX-t.pageX,B=w.pageY-t.pageY;if(d(b.target,G,B))return;e(G,B),t=w;var p=new Date().getTime(),y=p-i;y>0&&(A.x=G/y,A.y=B/y,i=p),I(G,B)&&b.preventDefault()}}function u(){C.settings.swipeEasing&&(clearInterval(n),n=setInterval(function(){if(C.isInitialized){clearInterval(n);return}if(!A.x&&!A.y){clearInterval(n);return}if(Math.abs(A.x)<.01&&Math.abs(A.y)<.01){clearInterval(n);return}if(!C.element){clearInterval(n);return}e(A.x*30,A.y*30),A.x*=.8,A.y*=.8},10))}sr.supportsTouch?(C.event.bind(g,"touchstart",a),C.event.bind(g,"touchmove",m),C.event.bind(g,"touchend",u)):sr.supportsIePointer&&(window.PointerEvent?(C.event.bind(g,"pointerdown",a),C.event.bind(g,"pointermove",m),C.event.bind(g,"pointerup",u)):window.MSPointerEvent&&(C.event.bind(g,"MSPointerDown",a),C.event.bind(g,"MSPointerMove",m),C.event.bind(g,"MSPointerUp",u)))}var vxg=function(){return{handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1}},jxg={"click-rail":Fxg,"drag-thumb":zxg,keyboard:Jxg,wheel:Lxg,touch:Txg},Oh=function(g,I){var e=this;if(I===void 0&&(I={}),typeof g=="string"&&(g=document.querySelector(g)),!g||!g.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");this.element=g,g.classList.add(zC.main),this.settings=vxg();for(var t in I)this.settings[t]=I[t];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var i=function(){return g.classList.add(zC.state.focus)},A=function(){return g.classList.remove(zC.state.focus)};this.isRtl=rn(g).direction==="rtl",this.isRtl===!0&&g.classList.add(zC.rtl),this.isNegativeScroll=function(){var o=g.scrollLeft,a=null;return g.scrollLeft=-1,a=g.scrollLeft<0,g.scrollLeft=o,a}(),this.negativeScrollAdjustment=this.isNegativeScroll?g.scrollWidth-g.clientWidth:0,this.event=new lr,this.ownerDocument=g.ownerDocument||document,this.scrollbarXRail=Uw(zC.element.rail("x")),g.appendChild(this.scrollbarXRail),this.scrollbarX=Uw(zC.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",i),this.event.bind(this.scrollbarX,"blur",A),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var n=rn(this.scrollbarXRail);this.scrollbarXBottom=parseInt(n.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=aC(n.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=aC(n.borderLeftWidth)+aC(n.borderRightWidth),ft(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=aC(n.marginLeft)+aC(n.marginRight),ft(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=Uw(zC.element.rail("y")),g.appendChild(this.scrollbarYRail),this.scrollbarY=Uw(zC.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",i),this.event.bind(this.scrollbarY,"blur",A),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var l=rn(this.scrollbarYRail);this.scrollbarYRight=parseInt(l.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=aC(l.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?Kxg(this.scrollbarY):null,this.railBorderYWidth=aC(l.borderTopWidth)+aC(l.borderBottomWidth),ft(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=aC(l.marginTop)+aC(l.marginBottom),ft(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:g.scrollLeft<=0?"start":g.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:g.scrollTop<=0?"start":g.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(o){return jxg[o](e)}),this.lastScrollTop=Math.floor(g.scrollTop),this.lastScrollLeft=g.scrollLeft,this.event.bind(this.element,"scroll",function(o){return e.onScroll(o)}),Al(this)};Oh.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,ft(this.scrollbarXRail,{display:"block"}),ft(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=aC(rn(this.scrollbarXRail).marginLeft)+aC(rn(this.scrollbarXRail).marginRight),this.railYMarginHeight=aC(rn(this.scrollbarYRail).marginTop)+aC(rn(this.scrollbarYRail).marginBottom),ft(this.scrollbarXRail,{display:"none"}),ft(this.scrollbarYRail,{display:"none"}),Al(this),Pw(this,"top",0,!1,!0),Pw(this,"left",0,!1,!0),ft(this.scrollbarXRail,{display:""}),ft(this.scrollbarYRail,{display:""}))},Oh.prototype.onScroll=function(g){this.isAlive&&(Al(this),Pw(this,"top",this.element.scrollTop-this.lastScrollTop),Pw(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},Oh.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),nr(this.scrollbarX),nr(this.scrollbarY),nr(this.scrollbarXRail),nr(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},Oh.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(g){return!g.match(/^ps([-_].+|)$/)}).join(" ")};const xxg=s.defineComponent({__name:"PerfectScrollbar",props:{tag:{default:"div"},options:{default:()=>({})}},emits:["scroll","ps-scroll-y","ps-scroll-x","ps-scroll-up","ps-scroll-down","ps-scroll-left","ps-scroll-right","ps-y-reach-start","ps-y-reach-end","ps-x-reach-start","ps-x-reach-end"],setup(C,{expose:g,emit:I}){const e=C,t=I,i=s.ref(null),A=s.ref(null);s.watch(()=>e.options,()=>{l(),n()},{deep:!0}),s.onMounted(()=>{i.value&&n()}),s.onBeforeUnmount(()=>{l()});function n(){i.value&&(A.value=new Oh(i.value,e.options),d())}function l(){A.value&&(d(!1),A.value.destroy(),A.value=null)}const o={scroll:a("scroll"),"ps-scroll-y":a("ps-scroll-y"),"ps-scroll-x":a("ps-scroll-x"),"ps-scroll-up":a("ps-scroll-up"),"ps-scroll-down":a("ps-scroll-down"),"ps-scroll-left":a("ps-scroll-left"),"ps-scroll-right":a("ps-scroll-right"),"ps-y-reach-start":a("ps-y-reach-start"),"ps-y-reach-end":a("ps-y-reach-end"),"ps-x-reach-start":a("ps-x-reach-start"),"ps-x-reach-end":a("ps-x-reach-end")};function a(m){return function(u){t(m,u)}}function d(m=!0){var u;(u=A.value)!=null&&u.element&&Object.entries(o).forEach(([b,Z])=>{var w,G;m?(w=A.value)==null||w.element.addEventListener(b,Z):(G=A.value)==null||G.element.removeEventListener(b,Z)})}return g({ps:A}),(m,u)=>(s.openBlock(),s.createBlock(s.resolveDynamicComponent(m.tag),{ref_key:"scrollbar",ref:i,class:"ps"},{default:s.withCtx(()=>[s.renderSlot(m.$slots,"default")]),_:3},512))}}),Oxg=["data-testid"],pV=s.defineComponent({__name:"Scrollbar",props:{options:{},tag:{},class:{},style:{},thrumbStyle:{},railStyle:{},dataTestid:{default:"ScrollBar"}},emits:["scroll","ps-scroll-y","ps-scroll-x","ps-scroll-up","ps-scroll-down","ps-scroll-left","ps-scroll-right","ps-y-reach-start","ps-y-reach-end","ps-x-reach-start","ps-x-reach-end"],setup(C,{expose:g,emit:I}){const e=C,t=s.ref(null),i=I,A=d=>{i("scroll",d)},n={attributes:!0,attributeFilter:["style"]},l=(d,m)=>u=>{for(const b of u)b.type==="attributes"&&b.attributeName==="style"&&d.style.right!==m&&(d.style.right=m)},o=()=>{var G,B,p,y,Y,R,V,H,z,D,F,T,O,q,Ig,Q,$,Ag,Bg,II,rI,kg,Dg,Ug;if(!t.value)return;const d=t.value.querySelector(".ps__thumb-y"),m=t.value.querySelector(".ps__thumb-x"),u=t.value.querySelector(".ps__rail-y"),b=t.value.querySelector(".ps__rail-x");d.style.background=((B=(G=e.thrumbStyle)==null?void 0:G.y)==null?void 0:B.background)||"var(--primary-color)",d.style.width=((y=(p=e.thrumbStyle)==null?void 0:p.y)==null?void 0:y.width)||"6px",d.style.right="0px",m.style.background=((R=(Y=e.thrumbStyle)==null?void 0:Y.x)==null?void 0:R.background)||"var(--primary-color)",m.style.width=((H=(V=e.thrumbStyle)==null?void 0:V.x)==null?void 0:H.width)||"6px",m.style.right="0px",u.style.background=((D=(z=e.railStyle)==null?void 0:z.y)==null?void 0:D.background)||"var(--button-neutral-color)",u.style.width=((T=(F=e.thrumbStyle)==null?void 0:F.y)==null?void 0:T.width)||"6px",u.style.right=((q=(O=e.railStyle)==null?void 0:O.y)==null?void 0:q.right)||"0px",b.style.background=((Q=(Ig=e.railStyle)==null?void 0:Ig.x)==null?void 0:Q.background)||"var(--button-neutral-color)",b.style.width=((Ag=($=e.thrumbStyle)==null?void 0:$.x)==null?void 0:Ag.width)||"6px",b.style.right=((II=(Bg=e.railStyle)==null?void 0:Bg.x)==null?void 0:II.right)||"0px";const Z=new MutationObserver(l(u,((kg=(rI=e.railStyle)==null?void 0:rI.y)==null?void 0:kg.right)||"0px")),w=new MutationObserver(l(b,((Ug=(Dg=e.railStyle)==null?void 0:Dg.x)==null?void 0:Ug.right)||"0px"));Z.observe(u,n),w.observe(b,n)};return s.watch(()=>e,()=>{o()},{immediate:!0}),g({scrollToTop:()=>{t.value&&(t.value.children[0].scrollTop=0)}}),s.onMounted(()=>{o()}),(d,m)=>(s.openBlock(),s.createElementBlock("div",{ref_key:"scrollbar",ref:t,"data-testid":e.dataTestid},[s.createVNode(s.unref(xxg),{onScroll:A,options:e.options,tag:e.tag,class:s.normalizeClass(e.class),style:s.normalizeStyle(e.style),"data-testid":`${e.dataTestid}-Scroll`,ref_key:"scrollbar",ref:t},{default:s.withCtx(()=>[s.renderSlot(d.$slots,"default")]),_:3},8,["options","tag","class","style","data-testid"])],8,Oxg))}});var _w=(C=>(C.small="small",C.medium="medium",C.big="big",C))(_w||{}),m9=(C=>(C.circled="circled",C.rounded="rounded",C))(m9||{}),u9=(C=>(C.blue="blue",C.red="red",C))(u9||{});const Qxg=["data-testid","checked","disabled"],Uxg=s.defineComponent({__name:"Checkbox",props:{size:{default:_w.medium},circular:{default:m9.rounded},color:{default:u9.blue},checked:{type:Boolean},modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},dataTestid:{default:"Checkbox"}},emits:["change","update:modelValue"],setup(C,{emit:g}){const I=C,e=g,t=s.reactive({isChecked:I.modelValue});s.watchEffect(()=>{t.isChecked=I.modelValue});const i=()=>{t.isChecked=!t.isChecked,e("change",t.isChecked),e("update:modelValue",t.isChecked)};return(A,n)=>(s.openBlock(),s.createElementBlock("input",{type:"checkbox",class:s.normalizeClass(`checkbox-yui-kit checkbox-yui-kit_${I.size} checkbox-yui-kit_${I.circular} checkbox-yui-kit_${I.color}`),"data-testid":`${I.dataTestid}`,tabindex:"0",onChange:i,checked:t.isChecked,disabled:I.disabled,onKeyup:s.withKeys(i,["enter"])},null,42,Qxg))}}),yV=yg(Uxg,[["__scopeId","data-v-7ec339ee"]]),Exg=["data-testid"],Pxg=["src","alt"],_xg={key:1,class:"avatar-yui-kit__fallback"},$xg=["src"],qxg={key:1,class:"avatar-yui-kit__text"},$w=yg(s.defineComponent({__name:"Avatar",props:{initials:{},url:{},isIcon:{type:Boolean},alt:{},defaultImage:{},dataTestid:{}},setup(C){const g=C,I=s.ref(null),e=s.ref(!1),t=s.ref(!1),i=s.computed(()=>g.initials?g.initials.charAt(0).toUpperCase():""),A=s.computed(()=>!g.url||!e.value||t.value),n=()=>{e.value=!0,t.value=!1},l=()=>{t.value=!0,e.value=!1};return s.watch(()=>g.url,async o=>{var a;e.value=!1,t.value=!1,o&&(await s.nextTick(),(a=I.value)!=null&&a.complete&&I.value.naturalWidth>0&&(e.value=!0))},{immediate:!0}),(o,a)=>(s.openBlock(),s.createElementBlock("div",{"data-testid":g.dataTestid,class:"avatar-yui-kit"},[g.url?(s.openBlock(),s.createElementBlock("img",{key:0,ref_key:"imageRef",ref:I,src:g.url,alt:g.alt,class:s.normalizeClass(["avatar-yui-kit__image",{"is-visible":e.value}]),onLoad:n,onError:l},null,42,Pxg)):s.createCommentVNode("",!0),A.value?(s.openBlock(),s.createElementBlock("div",_xg,[g.defaultImage?(s.openBlock(),s.createElementBlock("img",{key:0,src:g.defaultImage,class:"avatar-yui-kit__image is-visible"},null,8,$xg)):(s.openBlock(),s.createElementBlock("div",qxg,s.toDisplayString(i.value),1))])):s.createCommentVNode("",!0)],8,Exg))}}),[["__scopeId","data-v-141a3b60"]]),gOg=["data-testid","aria-label"],IOg=["data-testid"],Qh=yg(s.defineComponent({name:"Tooltip",__name:"Tooltip",props:{hint:{},isShow:{type:Boolean,default:!1},isCanShow:{type:Boolean,default:!0},position:{default:"bottom-center"},size:{default:"small"},type:{default:"black"},hintGap:{},hintClass:{default:""},dataTestid:{default:"Tooltip"}},setup(C){const g=C,I=CSS.supports("top","anchor(bottom)"),e=s.useId(),t=s.computed(()=>`--anchor-tooltip-${e}`),i=s.ref(null),A=s.ref(null),n=s.computed(()=>[{"tooltip-yui-kit__hint_show":g.isShow||o.isShow,"tooltip-yui-kit__hint_bottom-center":g.position==="bottom-center","tooltip-yui-kit__hint_bottom-left":g.position==="bottom-left","tooltip-yui-kit__hint_bottom-right":g.position==="bottom-right","tooltip-yui-kit__hint_top-center":g.position==="top-center","tooltip-yui-kit__hint_top-left":g.position==="top-left","tooltip-yui-kit__hint_top-right":g.position==="top-right","tooltip-yui-kit__hint_left-top":g.position==="left-top","tooltip-yui-kit__hint_left-center":g.position==="left-center","tooltip-yui-kit__hint_left-bottom":g.position==="left-bottom","tooltip-yui-kit__hint_right-top":g.position==="right-top","tooltip-yui-kit__hint_right-center":g.position==="right-center","tooltip-yui-kit__hint_right-bottom":g.position==="right-bottom","tooltip-yui-kit__hint_small":g.size==="small","tooltip-yui-kit__hint_medium":g.size==="medium","tooltip-yui-kit__hint_large":g.size==="large","tooltip-yui-kit__hint_black":g.type==="black","tooltip-yui-kit__hint_blue":g.type==="blue","tooltip-yui-kit__hint_white":g.type==="white",[g.hintClass]:!0}]),l=s.computed(()=>{var R;const Y=(R=i.value)==null?void 0:R.closest("dialog");return Y||"body"}),o=s.reactive({isShow:!1}),a=()=>{w()},d=()=>{G()},m=()=>{u()},u=()=>{requestAnimationFrame(()=>{if(!i.value||!A.value||!o.isShow&&!g.isShow)return;const Y={"--hint-top":"anchor(top)","--hint-left":"anchor(left)","--hint-width":"0","--hint-height":"0","--tooltip-width":"0","--tooltip-height":"0","--hint-visibility":"visible"};I||(Y["--hint-top"]="0",Y["--hint-left"]="0");const R=i.value.getBoundingClientRect(),V=A.value.getBoundingClientRect(),H=window.pageYOffset||document.documentElement.scrollTop,z=window.pageXOffset||document.documentElement.scrollLeft;let D=R.top+H,F=R.left+z;const T=i.value.closest("dialog");if(T){const $=T.getBoundingClientRect();D=R.top-$.top,F=R.left-$.left;const Ag=T.scrollTop,Bg=T.scrollLeft;D+=Ag,F+=Bg}const O=R.width,q=R.height,Ig=V.width,Q=V.height;I||(Y["--hint-top"]=`${D}px`,Y["--hint-left"]=`${F}px`),Y["--tooltip-width"]=`${O}px`,Y["--tooltip-height"]=`${q}px`,Y["--hint-width"]=`${Ig}px`,Y["--hint-height"]=`${Q}px`,A.value&&YI(Y,A.value)})},b=()=>{requestAnimationFrame(()=>{!A.value||g.hintGap===void 0||YI({"--tooltip-hint-gap":g.hintGap},A.value)})},Z=()=>{A.value&&(YI({"position-anchor":`${t.value}`},A.value),u())};s.watch(()=>g.hintGap,b,{immediate:!0}),s.watch(()=>g.isCanShow,()=>{s.nextTick(()=>{Z()})});const w=()=>{o.isShow=!0},G=()=>{o.isShow=!1},B=new MutationObserver(()=>{u()}),p=new ResizeObserver(()=>{var Y;(o.isShow||g.isShow)&&!((Y=i.value)!=null&&Y.matches(":hover"))?G():u()}),y=Y=>{B.observe(Y,{childList:!0,attributes:!0,characterData:!0}),p.observe(Y)};return s.onMounted(()=>{i.value&&YI({"anchor-name":`${t.value}`},i.value),Z(),A.value&&y(A.value),i.value&&y(i.value),I||(window.addEventListener("scroll",u,!0),window.addEventListener("resize",u))}),s.onUnmounted(()=>{p.disconnect(),B.disconnect(),window.removeEventListener("scroll",u,!0),window.removeEventListener("resize",u)}),(Y,R)=>(s.openBlock(),s.createElementBlock("div",{ref_key:"tooltipRef",ref:i,class:"tooltip-yui-kit","data-testid":g.dataTestid,"aria-label":C.hint,onMouseenter:a,onMouseleave:d},[s.renderSlot(Y.$slots,"default",{},void 0,!0),C.isCanShow?(s.openBlock(),s.createBlock(s.Teleport,{key:0,to:l.value},[s.createVNode(s.Transition,{name:"hint-animate",onEnter:m},{default:s.withCtx(()=>[s.withDirectives(s.createElementVNode("div",{ref_key:"hintRef",ref:A,class:s.normalizeClass(["tooltip-yui-kit__hint",n.value]),"data-testid":g.dataTestid},s.toDisplayString(C.hint),11,IOg),[[s.vShow,C.isShow||o.isShow]])]),_:1})],8,["to"])):s.createCommentVNode("",!0)],40,gOg))}}),[["__scopeId","data-v-92266ed5"]]),COg=["data-testid"],eOg=["data-testid"],tOg=["data-testid"],iOg=["onClick","data-testid"],AOg=s.defineComponent({__name:"Popover",props:{isShow:{type:Boolean},iconName:{default:dg.moreVertical},options:{default:()=>[]},tooltip:{default:""},tooltipPosition:{default:"top-left"},isWCUse:{type:Boolean},translateY:{default:"0"},dataTestid:{default:"Popover"}},emits:["close"],setup(C,{emit:g}){const I=C,e=g,t=s.reactive({isShow:!1}),i=s.computed(()=>{var H;const V=(H=o.value)==null?void 0:H.closest("dialog");return V||"body"}),A=CSS.supports("top","anchor(bottom)"),n=s.useId(),l=s.computed(()=>`--anchor-popover-${n}`),o=s.ref(null),a=s.ref(null),d=s.ref(null),m=s.computed(()=>({"popover-yui-kit__wrapper":!0,"active-yui-kit":t.isShow,"empty-yui-kit":I.options.length===0})),u=()=>t.isShow=!t.isShow,b=()=>{t.isShow=!1,e("close")},Z=V=>{V.function(),b()},w=()=>{requestAnimationFrame(()=>{if(!o.value||!a.value||!t.isShow)return;const V={},H=o.value.getBoundingClientRect(),z=window.pageYOffset||document.documentElement.scrollTop,D=window.pageXOffset||document.documentElement.scrollLeft;let F=H.bottom+z,T=H.left+D;const O=o.value.closest("dialog");if(O){const Ig=O.getBoundingClientRect();F=H.top-Ig.top,T=H.left-Ig.left;const Q=O.scrollTop,$=O.scrollLeft;F+=Q,T+=$,F+=10}F+=10,V["--popover-top"]=`${F}px`,A||(V["--popover-left"]=`${T}px`),YI(V,a.value),(()=>{if(!a.value)return;const Ig=a.value.getBoundingClientRect();Ig.right>window.innerWidth&&(A?V["--popover-right"]="anchor(right) ":V["--popover-right"]=`${H.right-Ig.width}px`)})(),V["--popover-right"]&&(V.left="auto",YI(V,a.value))})},G=V=>{const H=V.getBoundingClientRect(),z=document.elementFromPoint(H.left,H.top),D=document.elementFromPoint(H.right,H.bottom);!(z&&V.contains(z))&&!(D&&V.contains(D))&&b()},B=new IntersectionObserver(V=>{V.forEach(H=>{H.isIntersecting||b()})}),p=()=>{o.value&&a.value&&(window.addEventListener("scroll",w,!0),window.addEventListener("resize",w))},y=()=>{o.value&&a.value&&(window.removeEventListener("scroll",w,!0),window.removeEventListener("resize",w))},Y=()=>{o.value&&window.addEventListener("scroll",G.bind(null,o.value),!0)},R=()=>{o.value&&window.removeEventListener("scroll",G.bind(null,o.value),!0)};return s.watch(()=>I.isShow,()=>t.isShow=I.isShow),s.watch(()=>t.isShow,()=>{t.isShow?(w(),Y()):R(),!A&&(t.isShow?p():y())}),s.onMounted(()=>{o.value&&YI({"anchor-name":`${l.value}`},o.value),a.value&&YI({"position-anchor":`${l.value}`},a.value),d.value&&B.observe(d.value),A||w()}),s.onUnmounted(()=>{B.disconnect(),R(),A||y()}),(V,H)=>(s.openBlock(),s.createBlock(Qh,{hint:I.tooltip,size:"small",type:"black",position:I.tooltipPosition,"data-testid":I.dataTestid,"is-can-show":!!I.tooltip&&!t.isShow&&I.options.length>0},{default:s.withCtx(()=>[s.withDirectives((s.openBlock(),s.createElementBlock("div",{class:"popover-yui-kit",ref_key:"popover",ref:d,"data-testid":`${I.dataTestid}-Popover`},[s.createElementVNode("div",{ref_key:"reference",ref:o,class:s.normalizeClass(m.value),"data-testid":`${I.dataTestid}-PopoverShow`,onClick:u},[s.renderSlot(V.$slots,"trigger",{},()=>[s.createVNode(Ng,{class:"popover-yui-kit__icon",name:I.iconName,"data-testid":`${I.dataTestid}-PopoverShow-Icon`},null,8,["name","data-testid"])],!0)],10,eOg),(s.openBlock(),s.createBlock(s.Teleport,{to:i.value,disabled:I.isWCUse},[s.createVNode(s.Transition,{name:"popover-animate"},{default:s.withCtx(()=>[s.withDirectives(s.createElementVNode("div",{class:"popover-yui-kit__content",style:s.normalizeStyle({transform:`translateY(${I.translateY})`}),ref_key:"floating",ref:a},[s.renderSlot(V.$slots,"default",{},()=>{var z;return[(z=I.options)!=null&&z.length?(s.openBlock(),s.createElementBlock("div",{key:0,class:"popover-yui-kit__options","data-testid":`${I.dataTestid}-PopoverShow-Options`},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(I.options,(D,F)=>(s.openBlock(),s.createElementBlock("div",{class:"popover-yui-kit__options__item",key:F,style:s.normalizeStyle(D.style),onClick:s.withModifiers(T=>Z(D),["stop"]),"data-testid":`${I.dataTestid}-Item${F}`},s.toDisplayString(D.value),13,iOg))),128))],8,tOg)):s.createCommentVNode("",!0)]},!0)],4),[[s.vShow,t.isShow]])]),_:3})],8,["to","disabled"]))],8,COg)),[[s.unref(Nc),b,void 0,{bubble:!0}]])]),_:3},8,["hint","position","data-testid","is-can-show"]))}}),or=yg(AOg,[["__scopeId","data-v-8aabde8d"]]),nOg=["data-testid"],lOg={class:"list-yui-kit__item-text"},sOg=yg(s.defineComponent({__name:"MenuItem",props:{active:{type:Boolean},disabled:{type:Boolean},dataTestid:{},iconName:{},text:{},menuType:{}},emits:["click"],setup(C,{emit:g}){const I=g,e=()=>{C.disabled||I("click",C.menuType)};return(t,i)=>(s.openBlock(),s.createElementBlock("li",{class:s.normalizeClass(["list-yui-kit__item",{"list-yui-kit__item--disabled":C.disabled,"list-yui-kit__item--active":C.active}]),onClick:e,"data-testid":C.dataTestid},[s.createVNode(Ng,{name:C.iconName},null,8,["name"]),s.createElementVNode("span",lOg,s.toDisplayString(C.text),1),s.renderSlot(t.$slots,"default",{},void 0,!0)],10,nOg))}}),[["__scopeId","data-v-6b345661"]]);var tC=(C=>(C.profile="profile",C.theme="theme",C.options="options",C.exit="exit",C.qrAuth="qr-auth",C.help="help",C))(tC||{});const oOg={class:"menu-yui-kit__list"},aOg={class:"list-yui-kit"},dOg=yg(s.defineComponent({__name:"UserMenuList",props:{closeAfterClick:{type:Boolean},menuOpen:{type:Boolean},categories:{},texts:{},user:{},languages:{},isBlackTheme:{type:Boolean},dataTestid:{default:"UserMenuList"}},emits:["click","unmount-qr-auth","themeChange","languageSwitch"],setup(C,{emit:g}){const I=C,e=g,t=s.ref(null);s.watch(()=>I.menuOpen,m=>{m||(t.value=null)});const i=m=>{if(t.value=m,m===tC.qrAuth){e("unmount-qr-auth");return}e("click",m)},A=m=>{e("languageSwitch",m)},n=()=>!1,l=m=>({[tC.profile]:"Profile",[tC.qrAuth]:"Auth with QR",[tC.theme]:"Theme",[tC.options]:"Settings",[tC.exit]:"Log Out",[tC.help]:"Help"})[m]??"",o=m=>({[tC.profile]:dg.profile,[tC.qrAuth]:dg.qrCode,[tC.theme]:dg.darkThemeSwitcher,[tC.options]:dg.settings,[tC.exit]:dg.logout,[tC.help]:dg.help})[m]??dg.profile,a=m=>({[tC.profile]:"Profile",[tC.qrAuth]:"QR",[tC.theme]:"Theme",[tC.options]:"Settings",[tC.exit]:"Exit",[tC.help]:"Help"})[m]??m,d=m=>m===tC.theme;return(m,u)=>{var b,Z,w;return s.openBlock(),s.createElementBlock("div",oOg,[s.createElementVNode("ul",aOg,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(I.categories,G=>{var B;return s.openBlock(),s.createBlock(sOg,{key:G,"data-testid":`${I.dataTestid}-${a(G)}-Item`,iconName:o(G),text:((B=I.texts)==null?void 0:B[G])??l(G),menuType:G,disabled:d(G),active:t.value===G,onClick:()=>i(G)},{default:s.withCtx(()=>[G===s.unref(tC).theme?(s.openBlock(),s.createBlock(Qw,{key:0,disabled:"",onChange:n})):s.createCommentVNode("",!0)]),_:2},1032,["data-testid","iconName","text","menuType","disabled","active","onClick"])}),128))]),(b=I.languages)!=null&&b.items?(s.openBlock(),s.createBlock(AG,{key:0,items:(Z=I.languages)==null?void 0:Z.items,"default-value":(w=I.languages)==null?void 0:w.defaultValue,onChange:A,"data-testid":`${I.dataTestid}-Language-Switch`},null,8,["items","default-value","data-testid"])):s.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-20f135bc"]]),cOg=["data-testid"],rOg={class:"menu-yui-kit__wrapper"},mOg={class:"menu-yui-kit__names"},uOg={class:"menu-yui-kit__name"},hOg={class:"menu-yui-kit__role"},YV=yg(s.defineComponent({__name:"UserMenu",props:{closeAfterClick:{type:Boolean},menuOpen:{type:Boolean},categories:{},texts:{},user:{},languages:{},isBlackTheme:{type:Boolean},dataTestid:{default:"UserMenu"}},emits:["click","unmount-qr-auth","themeChange","languageSwitch"],setup(C,{emit:g}){const I=C,e=s.reactive({isShow:!1,isBlackTheme:I.isBlackTheme??!1}),t=g,i=s.computed(()=>({"menu-yui-kit__heading":!0,"active-yui-kit":e.isShow}));function A(m){t("click",m),I.closeAfterClick&&(e.isShow=!1)}const n=s.computed(()=>e.isShow?dg.chevronUp:dg.chevronDown),l=()=>{e.isShow=!e.isShow};function o(m){I.closeAfterClick&&(e.isShow=!1),t("themeChange",m),e.isBlackTheme=m}const a=m=>{I.closeAfterClick&&(e.isShow=!1),t("languageSwitch",m)},d=()=>{I.closeAfterClick&&(e.isShow=!1),t("unmount-qr-auth")};return(m,u)=>(s.openBlock(),s.createElementBlock("div",{class:"menu-yui-kit","data-testid":I.dataTestid},[s.createElementVNode("div",rOg,[s.createVNode(or,{open:e.isShow,onClose:u[0]||(u[0]=b=>e.isShow=!1),placement:"bottom-start","data-testid":`${I.dataTestid}-Popover`},{trigger:s.withCtx(()=>{var b,Z,w;return[s.createElementVNode("div",{class:s.normalizeClass(i.value),onClick:l},[s.createVNode($w,{class:"menu-yui-kit__avatar",url:(b=I.user)==null?void 0:b.avatar,alt:"user-avatar","data-testid":`${I.dataTestid}-Avatar`},null,8,["url","data-testid"]),s.createElementVNode("div",mOg,[s.createElementVNode("p",uOg,s.toDisplayString((Z=I.user)==null?void 0:Z.name),1),s.createElementVNode("p",hOg,s.toDisplayString((w=I.user)==null?void 0:w.role),1)]),s.createVNode(MC,{type:s.unref(QI).ghost,class:"menu-yui-kit__button","data-testid":`${I.dataTestid}-Toggle`},{default:s.withCtx(()=>[s.createVNode(Ng,{class:"menu-yui-kit__button-icon",name:n.value},null,8,["name"])]),_:1},8,["type","data-testid"])],2)]}),default:s.withCtx(()=>[s.createVNode(dOg,{"data-testid":`${I.dataTestid}-List`,"is-black-theme":e.isBlackTheme,"menu-open":e.isShow,languages:I.languages,categories:I.categories,texts:I.texts,onClick:A,onThemeChange:o,onLanguageSwitch:a,onUnmountQrAuth:d},null,8,["data-testid","is-black-theme","menu-open","languages","categories","texts"])]),_:1},8,["open","data-testid"])])],8,cOg))}}),[["__scopeId","data-v-976c86fb"]]);var qw=(C=>(C.default="default",C.minor="minor",C))(qw||{});const bOg=["data-testid"],ZOg=["data-testid"],GOg=["data-testid"],wOg=["data-testid","placeholder","required","maxlength","readonly"],WOg=s.defineComponent({__name:"Textarea",props:{placeholder:{},inputMessage:{},required:{type:Boolean,default:!1},maxlength:{},modelValue:{default:""},readonly:{type:Boolean,default:!1},type:{default:qw.default},modelModifiers:{default:()=>({})},dataTestid:{default:"Textarea"}},emits:["update:modelValue"],setup(C,{emit:g}){const I=C,e=g,t=s.reactive({isPressed:!1,inputElement:I.modelValue}),i=s.computed(()=>[{pressed:t.isPressed,readonly:I.readonly,[I.type]:!0}]),A=()=>{e("update:modelValue",t.inputElement)},n=()=>{I.readonly||(t.isPressed=!0)},l=()=>{t.isPressed=!1};return s.watch(()=>I.modelValue,o=>{t.inputElement=o}),(o,a)=>(s.openBlock(),s.createElementBlock("fieldset",{class:s.normalizeClass(["input-yui-kit",i.value]),onFocusout:l,"data-testid":I.dataTestid},[I.inputMessage?(s.openBlock(),s.createElementBlock("legend",{key:0,class:"input-yui-kit__legend","data-testid":`${I.dataTestid}-Legend`},[s.createTextVNode(s.toDisplayString(I.inputMessage)+" ",1),I.required?(s.openBlock(),s.createElementBlock("sup",{key:0,class:"input-yui-kit__star","data-testid":`${I.dataTestid}-Legend-Star`},"*",8,GOg)):s.createCommentVNode("",!0)],8,ZOg)):s.createCommentVNode("",!0),s.withDirectives(s.createElementVNode("textarea",{"onUpdate:modelValue":a[0]||(a[0]=d=>t.inputElement=d),onFocus:n,onInput:A,"data-testid":`${I.dataTestid}-Textarea`,class:"input-yui-kit__input",placeholder:I.placeholder,required:I.required,maxlength:I.maxlength,readonly:I.readonly},null,40,wOg),[[s.vModelText,t.inputElement]])],42,bOg))}}),VV=yg(WOg,[["__scopeId","data-v-ac7acfbd"]]);var NV=(C=>(C.img="img",C.pdf="pdf",C.docx="docx",C))(NV||{});const BOg=["data-testid"],pOg=["data-testid"],yOg=["src","alt","data-testid"],YOg=["src","data-testid"],VOg=["data-testid"],NOg=["data-testid"],MOg=["data-testid"],MV=yg(s.defineComponent({__name:"Picture",props:{type:{},alt:{},url:{},caption:{},dataTestid:{default:"Picture"}},setup(C){const g=C,I=s.reactive({isLoad:!1,isError:!1}),e=s.computed(()=>I.isError?!1:!g.url||!g.type||g.type==NV.img?!0:Cr(g.url)),t=()=>{I.isLoad=!0},i=()=>{I.isError=!0},A=()=>{I.isLoad=!1,I.isError=!1};return s.watch(()=>g.url,()=>{A()}),(n,l)=>(s.openBlock(),s.createElementBlock("figure",{class:"picture-yui-kit","data-testid":g.dataTestid},[g.type==s.unref(NV).img?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createElementVNode("picture",{class:"picture-yui-kit__picture","data-testid":`${g.dataTestid}-Picture`},[!I.isError&&g.url?(s.openBlock(),s.createElementBlock("img",{key:0,class:"picture-yui-kit__picture_image",src:g.url,alt:g.alt,"data-testid":`${g.dataTestid}-Picture-Img`,onLoad:t,onError:i},null,40,yOg)):(s.openBlock(),s.createElementBlock("img",{key:1,src:s.unref(sn),alt:"not found",class:"picture-yui-kit__picture_image","data-testid":`${g.dataTestid}-Picture-Img`},null,8,YOg))],8,pOg),s.createElementVNode("figcaption",{class:"picture-yui-kit__picture__caption","data-testid":`${g.dataTestid}-Caption`},s.toDisplayString(g.caption),9,VOg)],64)):s.unref(Cr)(g.url)?(s.openBlock(),s.createBlock(tl,{key:1,class:"picture-yui-kit__picture_image",src:g.url,page:1,dataTestid:`${g.dataTestid}-PdfPreview`,onLoad:t},null,8,["src","dataTestid"])):(s.openBlock(),s.createElementBlock("div",{key:2,class:"picture-yui-kit__caption","data-testid":`${g.dataTestid}-Caption-Box`},[s.createElementVNode("h4",{class:"picture-yui-kit__caption__title","data-testid":`${g.dataTestid}-Caption-Title`},s.toDisplayString(g.caption),9,MOg)],8,NOg)),!I.isLoad&&e.value?(s.openBlock(),s.createBlock(vh,{key:3,class:"picture-yui-kit__loader"})):s.createCommentVNode("",!0)],8,BOg))}}),[["__scopeId","data-v-a93165dc"]]);var gW=(C=>(C.success="success",C.warning="warning",C.error="error",C.info="info",C))(gW||{}),h9=(C=>(C.success="Успешно",C.warning="Предупреждение",C.error="Ошибка",C.info="Уведомление",C))(h9||{}),b9=(C=>(C[C.success=dg.checkbox]="success",C[C.warning=dg.alertTriangle]="warning",C[C.error=dg.exitCircle]="error",C[C.info=dg.info]="info",C))(b9||{});const ROg=["id","data-testid"],XOg=["data-testid"],HOg=["data-testid"],fOg=["data-testid"],DOg=["data-testid"],SOg=s.defineComponent({__name:"Notification",props:{type:{default:gW.info},title:{},pushKey:{},description:{default:""},timeout:{default:3},showPopover:{type:Boolean,default:!0},dataTestid:{default:"Notification"}},emits:["close"],setup(C,{expose:g,emit:I}){const e=C,t=I,i=s.ref(null);eg(i,"toggle",()=>{e.timeout>0&&setTimeout(()=>{var o;return(o=i.value)==null?void 0:o.hidePopover()},e.timeout*1e3)});const A=()=>(t("close"),"hide"),n=()=>{var o;(o=i.value)==null||o.showPopover()},l=s.reactive({message:{icon:b9[e.type],title:e.title||h9[e.type],description:e.description}});return s.onMounted(()=>{var o;e.showPopover&&((o=i.value)==null||o.showPopover())}),g({showPopover:n}),(o,a)=>(s.openBlock(),s.createElementBlock("div",{popover:"manual",id:e.pushKey.toString(),class:s.normalizeClass(`push-notification-yui-kit push-notification-yui-kit_${e.type}`),"data-testid":e.dataTestid,ref_key:"popover",ref:i},[s.createElementVNode("div",{class:"notification-yui-kit","data-testid":`${e.dataTestid}-Notification`},[s.createElementVNode("div",{class:"notification-yui-kit__block","data-testid":`${e.dataTestid}-Notification-Block`},[s.createVNode(Ng,{name:l.message.icon,class:"notification-yui-kit__block-icon","data-testid":`${e.dataTestid}-Notification-Icon`},null,8,["name","data-testid"]),s.createElementVNode("h4",{class:"notification-yui-kit__block-title","data-testid":`${e.dataTestid}-Notification-Title`},s.toDisplayString(l.message.title),9,fOg),s.createElementVNode("span",{class:"notification-yui-kit__block-text","data-testid":`${e.dataTestid}-Notification-Description`},s.toDisplayString(l.message.description),9,DOg)],8,HOg),s.createVNode(MC,{class:"notification-yui-kit__exit",type:s.unref(QI).ghost,popovertarget:e.pushKey.toString(),popovertargetaction:A,"data-testid":`${e.dataTestid}-Notification-Button`},{default:s.withCtx(()=>[s.createVNode(Ng,{name:s.unref(dg).crossSmall,"data-testid":`${e.dataTestid}-Notification-Icon`},null,8,["name","data-testid"])]),_:1},8,["type","popovertarget","data-testid"])],8,XOg)],10,ROg))}}),RV=yg(SOg,[["__scopeId","data-v-934d2cab"]]),XV=s.defineComponent({__name:"CopyIcon",props:{content:{default:""},dataTestid:{default:"CopyIcon"}},setup(C){const g=C,I=()=>{const e=g.content,t=document.createElement("textarea");t.value=e;const i=document.querySelectorAll("dialog[open]"),A=i.length?i[i.length-1]:null;A?A.append(t):document.body.append(t),t.select(),t.setSelectionRange(0,99999),document.execCommand("copy"),t.remove()};return(e,t)=>(s.openBlock(),s.createBlock(Ng,{class:"copy-icon-yui-kit",name:s.unref(dg).copy,"data-testid":g.dataTestid,onClick:I},null,8,["name","data-testid"]))}}),KOg=["data-testid"],kOg=["data-testid"],FOg=["data-testid"],zOg=["data-testid"],JOg=["data-testid"],LOg=["data-testid"],TOg=["data-testid"],vOg=["data-testid"],jOg=["data-testid"],xOg=["data-testid"],OOg=["data-testid"],QOg=["data-testid"],UOg=["data-testid"],EOg=["data-testid"],POg=s.defineComponent({__name:"FilterTag",props:{title:{},iconName:{default:dg.filter},options:{default:()=>[]},selectedValues:{default:()=>[]},multiply:{type:Boolean,default:!0},maxShowCount:{default:5},showClearButton:{type:Boolean,default:!1},disallowNull:{type:Boolean,default:!1},dataTestid:{default:"FilterTag"}},emits:["change"],setup(C,{emit:g}){const I=C,e=s.reactive({isShow:!1,options:[]}),t=g,i=s.computed(()=>({"filter-yui-kit__wrapper":!0,"active-yui-kit":e.isShow})),A=()=>e.isShow=!e.isShow,n=()=>{e.isShow=!1},l=s.computed(()=>e.options.filter(u=>u.chose)),o=s.computed(()=>e.options.filter(u=>!u.chose)),a=u=>{I.disallowNull&&u.chose||(u.chose=!u.chose,I.multiply||(e.options=e.options.map(b=>({...b,chose:u.value===b.value&&u.chose}))),e.options.every(b=>b.chose)&&(e.options=e.options.map(b=>({...b,chose:!1}))),t("change",l.value.map(b=>b.value)),e.isShow=!1)},d=()=>{e.options=e.options.map(u=>({...u,chose:!1})),e.isShow=!1,t("change",[])},m=()=>{e.options=I.options.map(u=>({...u,chose:I.selectedValues.includes(u.value)})),e.options.every(u=>u.chose)&&(e.options=e.options.map(u=>({...u,chose:!1})))};return s.watch(()=>[I.options,I.selectedValues],m),s.watch(()=>I.selectedValues,m),s.onMounted(m),(u,b)=>s.withDirectives((s.openBlock(),s.createElementBlock("div",{class:"filter-yui-kit","data-testid":I.dataTestid},[s.createElementVNode("div",{class:s.normalizeClass(i.value),onClick:A,"data-testid":`${I.dataTestid}-Wrapper`},[I.iconName?(s.openBlock(),s.createBlock(Ng,{key:0,name:I.iconName,"data-testid":`${I.dataTestid}-Icon`},null,8,["name","data-testid"])):s.createCommentVNode("",!0),I.title?(s.openBlock(),s.createElementBlock("span",{key:1,"data-testid":`${I.dataTestid}-Title`},s.toDisplayString(I.title),9,FOg)):s.createCommentVNode("",!0),!l.value.length&&!I.disallowNull?(s.openBlock(),s.createBlock(ke,{key:2,disabled:"",text:"Все","data-testid":`${I.dataTestid}-Badges-All`},null,8,["data-testid"])):(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:3},s.renderList(l.value.filter((Z,w)=>w<I.maxShowCount),(Z,w)=>(s.openBlock(),s.createBlock(ke,{key:Z.value,type:Z.type,disabled:"","data-testid":`${I.dataTestid}-Badges${w}`,text:Z.label},null,8,["type","data-testid","text"]))),128)),I.maxShowCount<l.value.length?(s.openBlock(),s.createElementBlock("div",{key:4,class:"filter-yui-kit__counter","data-testid":`${I.dataTestid}-MaxShowCount-Counter`},[s.createTextVNode(" +"+s.toDisplayString(l.value.length-I.maxShowCount)+" ",1),s.createElementVNode("div",{class:"filter-yui-kit__counter-content","data-testid":`${I.dataTestid}-MaxShowCount-Content`},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(l.value.filter((Z,w)=>w>=I.maxShowCount),(Z,w)=>(s.openBlock(),s.createBlock(ke,{key:Z.value,type:Z.type,disabled:"",text:Z.label,"data-testid":`${I.dataTestid}-MaxShow-Badges${w}`},null,8,["type","text","data-testid"]))),128))],8,JOg)],8,zOg)):s.createCommentVNode("",!0),I.showClearButton&&l.value.length>0?(s.openBlock(),s.createElementBlock("button",{key:5,type:"button",class:"filter-yui-kit__close",onClick:s.withModifiers(d,["stop"]),"data-testid":`${I.dataTestid}-Filter-CloseButton`},[s.createVNode(Ng,{name:s.unref(dg).crossSmall,"data-testid":`${I.dataTestid}-CloseButton-Icon`},null,8,["name","data-testid"])],8,LOg)):s.createCommentVNode("",!0)],10,kOg),e.isShow?(s.openBlock(),s.createElementBlock("div",{key:0,class:"filter-yui-kit__select-wrapper","data-testid":`${I.dataTestid}-Select-Wrapper`},[s.createElementVNode("ul",{class:"filter-yui-kit__select-list selected-yui-kit","data-testid":`${I.dataTestid}-Select-List`},[l.value.length?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("li",{key:0,class:"filter-yui-kit__select-item","data-testid":`${I.dataTestid}-Select-Item`},[s.createVNode(ke,{disabled:"",text:"Все","data-testid":`${I.dataTestid}-Select-Badges`},null,8,["data-testid"])],8,jOg)),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(l.value,(Z,w)=>(s.openBlock(),s.createElementBlock("li",{class:"filter-yui-kit__select-item",key:Z.value,"data-testid":`${I.dataTestid}-Select-Item${w}`},[s.createVNode(ke,{disabled:!0,choosed:!I.disallowNull&&Z.chose,type:Z.type,onClick:G=>a(Z),text:Z.label,"data-testid":`${I.dataTestid}-Select-Badges${w}`},null,8,["choosed","type","onClick","text","data-testid"])],8,xOg))),128))],8,vOg),s.createElementVNode("div",{class:"filter-yui-kit__select__divider","data-testid":`${I.dataTestid}-Select-Divider`},null,8,OOg),e.isShow?(s.openBlock(),s.createElementBlock("ul",{key:0,class:"filter-yui-kit__select-list","data-testid":`${I.dataTestid}-Select-List`},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.value,(Z,w)=>(s.openBlock(),s.createElementBlock("li",{class:"filter-yui-kit__select-item",key:Z.value,"data-testid":`${I.dataTestid}-Select-List${w}`},[s.createVNode(ke,{disabled:!0,choosed:!1,type:Z.type,text:Z.label,"data-testid":`${I.dataTestid}-Select-Badges${w}`,onClick:G=>a(Z)},null,8,["type","text","data-testid","onClick"])],8,UOg))),128)),C.disallowNull?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("li",{key:0,class:"filter-yui-kit__select-item","data-testid":`${I.dataTestid}-Select-Item`},[l.value.length?(s.openBlock(),s.createBlock(ke,{key:0,disabled:"","data-testid":`${I.dataTestid}-Select-Badges`,text:"Все",onClick:d},null,8,["data-testid"])):s.createCommentVNode("",!0)],8,EOg))],8,QOg)):s.createCommentVNode("",!0)],8,TOg)):s.createCommentVNode("",!0)],8,KOg)),[[s.unref(Nc),n,void 0,{bubble:!0}]])}}),HV=yg(POg,[["__scopeId","data-v-c0eed368"]]),_Og=["data-testid"],$Og=["data-testid"],qOg=["data-testid"],gQg=["data-testid"],fV=yg(s.defineComponent({__name:"CircularProgress",props:{percent:{},dataTestid:{default:"CircularProgress"}},setup(C){const g=C,I=()=>{const e=Math.min(Math.max(g.percent,0),100),t=e/100*360;if(e<=25)return`polygon(50% 50%, 50% 0%, calc(50% + 50% * cos(${t-90}deg)) 0,calc(50% + 50% * cos(${t-90}deg)) calc(50% + 50% * sin(${t-90}deg)), 50% 50%)`;if(e<=50)return`polygon(50% 50%, 50% 0%, 100% 0%, 100% calc(50% + 50% * sin(${t-90}deg)), calc(50% + 50% * cos(${t-90}deg)) calc(50% + 50% * sin(${t-90}deg)), 50% 50%)`;if(e<=75)return`polygon(50% 50%, 50% 0%, 100% 0%, 100% 100%,
|
|
1372
|
-
calc(50% + 50% * cos(${t-90}deg)) 100%, calc(50% + 50% * cos(${t-90}deg)) calc(50% + 50% * sin(${t-90}deg)), 50% 50%)`;if(e<=100)return`polygon(50% 50%, 50% 0%, 100% 0%, 100% 100%,0% 100%, 0% calc(50% + 50% * sin(${t-90}deg)), 50% 50%)`};return(e,t)=>g.percent<100?(s.openBlock(),s.createElementBlock("div",{key:0,class:"pie-chart","data-testid":`${g.dataTestid}-PieChart`},[s.createElementVNode("div",{class:"pie-chart-border",style:s.normalizeStyle({"border-color":g.percent<50?"var(--error-light-color)":"var(--orange-color)"}),"data-testid":`${g.dataTestid}-PieChart-Border`},[s.createElementVNode("div",{class:"sector",style:s.normalizeStyle({clipPath:I(),"background-color":g.percent<50?"var(--error-light-color)":"var(--orange-color)"}),"data-testid":`${g.dataTestid}-PieChart-Sector`},null,12,qOg)],12,$Og)],8,_Og)):(s.openBlock(),s.createElementBlock("svg",{key:1,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","data-testid":`${g.dataTestid}-Icon`,xmlns:"http://www.w3.org/2000/svg"},[...t[0]||(t[0]=[s.createElementVNode("path",{d:"M8 1C4.136 1 1 4.136 1 8C1 11.864 4.136 15 8 15C11.864 15 15 11.864 15 8C15 4.136 11.864 1 8 1ZM8 13.6C4.906 13.6 2.4 11.094 2.4 8C2.4 4.906 4.906 2.4 8 2.4C11.094 2.4 13.6 4.906 13.6 8C13.6 11.094 11.094 13.6 8 13.6Z",fill:"#3BC648"},null,-1),s.createElementVNode("circle",{cx:"8",cy:"8",r:"4",transform:"rotate(-180 8 8)",fill:"#3BC648"},null,-1),s.createElementVNode("path",{d:"M10 6L7.5 9.83935L6 8.5",stroke:"white","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])],8,gQg))}}),[["__scopeId","data-v-393c7314"]]),IQg=["colspan","rowspan","data-testid"],ar=yg(s.defineComponent({name:"TableTh",__name:"TableTh",props:{colspan:{default:1},rowspan:{default:1},dataTestid:{default:"DataHeader"}},setup(C){const g=C;return(I,e)=>(s.openBlock(),s.createElementBlock("th",{colspan:C.colspan,rowspan:C.rowspan,"data-testid":g.dataTestid,class:"table-th"},[s.renderSlot(I.$slots,"default",{},void 0,!0)],8,IQg))}}),[["__scopeId","data-v-0411515d"]]),CQg=["data-testid"],Uh=yg(s.defineComponent({name:"HeadTableRow",__name:"HeadTableRow",props:{dataTestid:{default:"TableRow"}},setup(C){const g=C;return(I,e)=>(s.openBlock(),s.createElementBlock("tr",{class:"head-table-row","data-testid":g.dataTestid},[s.renderSlot(I.$slots,"default",{},void 0,!0)],8,CQg))}}),[["__scopeId","data-v-1c6483fb"]]),Z9=(C,g,I,e)=>{const t=s.ref(!1),i=s.ref(100);let A=0,n=0;const l=s.computed(()=>[{"scroll-wrapper__track_hide":i.value===100,"scroll-wrapper__track_drag":t.value}]),o=s.computed(()=>i.value<100),a=()=>{if(C.value){const G=C.value.clientWidth,B=C.value.scrollWidth;return G>=B?100:G/B*100}return 100},d=()=>{if(!C.value||!g.value||!I.value||!e.value)return;const{scrollLeft:G,scrollWidth:B,clientWidth:p}=C.value,y=B-p;if(y<=0)return;const Y=G/y,R=e.value.clientWidth,V=I.value.clientWidth,H=R-V,z=Y*H;requestAnimationFrame(()=>{g.value&&YI({"--scroll-bar-left-position":`${z}px`},g.value)})},m=G=>{!C.value||!g.value||(t.value=!0,A=G.clientX,n=C.value.scrollLeft,document.addEventListener("pointermove",u),document.addEventListener("pointerup",b,!0))},u=G=>{if(t.value&&C.value&&I.value){const B=G.clientX-A,p=(C.value.scrollWidth-C.value.clientWidth)/(C.value.clientWidth-I.value.clientWidth);C.value.scrollLeft=n+B*p,d()}},b=()=>{t.value=!1,document.removeEventListener("pointermove",u),document.removeEventListener("pointerup",b,!0)};return{onDrag:u,onTrackClick:G=>{if(C.value&&I.value){const B=G.currentTarget.getBoundingClientRect(),p=G.clientX-B.left,y=I.value.clientWidth,Y=B.width;let R=(p-y/2)*((C.value.scrollWidth-C.value.clientWidth)/(Y-y));R=Math.max(0,Math.min(R,C.value.scrollWidth-C.value.clientWidth)),C.value.scrollLeft=R,d()}},startDrag:m,getPercentHorizontalView:a,changeBarPosition:d,isDragging:t,scrollHorizontalWidthPercent:i,setHorizontalBarWidth:()=>{if(!C.value||!g.value)return;const G=a();i.value=G,YI({"--scroll-horizontal-bar-width":`${G}%`},g.value)},horizontalTrackClass:l,isExistHorizontalTrack:o}},G9=(C,g,I,e)=>{const t=s.ref(!1),i=s.ref(100);let A=0,n=0;const l=s.computed(()=>[{"scroll-wrapper__track_hide":i.value===100,"scroll-wrapper__track_drag":t.value}]),o=s.computed(()=>i.value<100),a=()=>{if(C.value){const G=C.value.clientHeight,B=C.value.scrollHeight;if(G>=B)return 100;if(G<B)return G/B*100}return 100},d=()=>{if(!C.value||!g.value||!I.value||!e.value)return;const{scrollTop:G,scrollHeight:B,clientHeight:p}=C.value,y=B-p;if(y<=0)return;const Y=G/y,R=e.value.clientHeight,V=I.value.clientHeight,H=R-V,z=Y*H;requestAnimationFrame(()=>{g.value&&YI({"--scroll-bar-top-postion":`${z}px`},g.value)})},m=G=>{!C.value||!g.value||(t.value=!0,A=G.clientY,n=C.value.scrollTop,document.addEventListener("pointermove",u),document.addEventListener("pointerup",b))},u=G=>{if(t.value&&C.value&&I.value){const B=G.clientY-A,p=(C.value.scrollHeight-C.value.clientHeight)/(C.value.clientHeight-I.value.clientHeight);C.value.scrollTop=n+B*p,d()}},b=()=>{t.value=!1,document.removeEventListener("pointermove",u),document.removeEventListener("pointerup",b)};return{onDrag:u,onTrackClick:G=>{if(C.value&&I.value){const B=G.currentTarget.getBoundingClientRect(),p=G.clientY-B.top,y=I.value.clientHeight,Y=B.height;let R=(p-y/2)*((C.value.scrollHeight-C.value.clientHeight)/(Y-y));R=Math.max(0,Math.min(R,C.value.scrollHeight-C.value.clientHeight)),C.value.scrollTop=R,d()}},startDrag:m,getProcentVerticalView:a,changeBarPosition:d,isDragging:t,scrollVerticalHeightProcent:i,setVerticalBarHeight:()=>{if(!C.value||!g.value)return;const G=a();i.value=G,YI({"--scroll-vertical-bar-height":`${G}%`},g.value)},verticalTrackClass:l,isExistVerticalTrack:o}},eQg={class:"scroll-wrapper__vertical-wrapper"},tQg={class:"scroll-wrapper__horizont-wrapper"},Eh=yg(s.defineComponent({name:"ScrollWrapper",__name:"ScrollWrapper",props:{isShowVerticalScroll:{type:Boolean,default:!1},isShowHorizontalScroll:{type:Boolean,default:!1}},emits:["unmount-scroll","unmount-paginate","on-mounted"],setup(C,{expose:g,emit:I}){const e=I,t=s.ref(null),i=s.ref(null),A=s.ref(null),n=s.ref(null),l=s.ref(null),o=s.ref(null),{onTrackClick:a,startDrag:d,changeBarPosition:m,setVerticalBarHeight:u,verticalTrackClass:b,isExistVerticalTrack:Z}=G9(t,i,n,A),{changeBarPosition:w,startDrag:G,onTrackClick:B,setHorizontalBarWidth:p,horizontalTrackClass:y,isExistHorizontalTrack:Y}=Z9(t,i,o,l),R=Q=>{m(),w(),e("unmount-scroll",Q)},V=()=>{requestAnimationFrame(()=>{H(),z()})},H=()=>{if(!t.value||!i.value)return;const Q=getComputedStyle(i.value),$=i.value.style.minHeight||Q.minHeight,Ag=i.value.style.maxHeight||Q.maxHeight,Bg=i.value.style.height;YI({"--scroll-wrapper-height":`${Bg}`,"--scroll-wrapper-max-height":`${Ag}`,"--scroll-wrapper-min-height":`${$}`},i.value)},z=()=>{u(),p(),m(),w()},D=()=>{t.value&&t.value.addEventListener("scroll",R)},F=()=>{t.value&&(t.value.scrollTop=0)},T=()=>{t.value&&(t.value.scrollHeight<=t.value.clientHeight?e("unmount-paginate",!0):e("unmount-paginate",!1))},O=new MutationObserver(()=>{V(),T()}),q=new ResizeObserver(()=>{V(),T()}),Ig=Q=>{O.observe(Q,{childList:!0,subtree:!0,attributes:!0}),q.observe(Q)};return g({scrollToTop:F,setHeightSlot:H}),s.onMounted(()=>{V(),D(),i.value&&Ig(i.value),A.value&&Ig(A.value),window.addEventListener("resize",V),e("on-mounted")}),s.onUnmounted(()=>{window.removeEventListener("resize",V)}),(Q,$)=>(s.openBlock(),s.createElementBlock("div",{ref_key:"scrollWrapperRef",ref:i,class:"scroll-wrapper"},[s.createElementVNode("div",eQg,[s.createElementVNode("div",tQg,[s.createElementVNode("div",{ref_key:"slotRef",ref:t,class:"scroll-wrapper__slot"},[s.renderSlot(Q.$slots,"default",{},void 0,!0)],512),s.unref(Y)||C.isShowHorizontalScroll?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"horizontTrackRef",ref:l,class:s.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_horizont",s.unref(y)]),onClick:$[1]||($[1]=s.withModifiers((...Ag)=>s.unref(B)&&s.unref(B)(...Ag),["self","prevent","left"]))},[s.createElementVNode("div",{ref_key:"horizontBarRef",ref:o,class:"scroll-wrapper__bar",onPointerdown:$[0]||($[0]=s.withModifiers((...Ag)=>s.unref(G)&&s.unref(G)(...Ag),["prevent","left"]))},null,544)],2)):s.createCommentVNode("",!0)]),s.unref(Z)||C.isShowVerticalScroll?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"verticalTrackRef",ref:A,class:s.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_vertical",s.unref(b)]),onClick:$[3]||($[3]=s.withModifiers((...Ag)=>s.unref(a)&&s.unref(a)(...Ag),["self","prevent","left"]))},[s.createElementVNode("div",{ref_key:"verticalBarRef",ref:n,class:"scroll-wrapper__bar",onPointerdown:$[2]||($[2]=s.withModifiers((...Ag)=>s.unref(d)&&s.unref(d)(...Ag),["prevent","left"]))},null,544)],2)):s.createCommentVNode("",!0)])],512))}}),[["__scopeId","data-v-0368a565"]]),iQg=["id","data-testid"],AQg=["id","data-testid"],nQg=["id","data-testid"],DV=yg(s.defineComponent({name:"TableNew",__name:"Table",props:{tableId:{},search:{},tbodyId:{},theadId:{},columnCount:{},dataTestid:{default:"Table"},isShowVerticalScroll:{type:Boolean,default:!1},isShowHorizontalScroll:{type:Boolean,default:!1}},emits:["unmount-scroll","unmount-paginate"],setup(C,{expose:g,emit:I}){var p;const e=C,t=I,i=s.reactive({headHeight:0,maxColumnCount:0}),A=s.ref(null),n=s.ref(null),l=s.ref(null),o=s.ref(null),a=s.ref(null),d=y=>{t("unmount-scroll",y)},m=y=>t("unmount-paginate",y),u=()=>{if(!A.value||!a.value)return;const y=A.value.querySelector("thead");if(!y)return;const Y=y.getBoundingClientRect().height;i.headHeight=Y,YI({"--scroll-track-margin-top":`${Y}px`},a.value.$el)},b=()=>{a.value&&a.value.scrollToTop()},Z=()=>{if(a.value&&o.value){const y=getComputedStyle(a.value.$el),Y=Number(y.minHeight.replace(/\D/g,""));if(Y&&Y>0)return;YI({"min-height":`${i.headHeight+108}px`},a.value.$el)}},w=()=>{let y=1;if(n.value){for(let Y=0;Y<n.value.children.length;Y++)y=Math.max(n.value.children[Y].children.length,y);i.maxColumnCount=y}},G=new MutationObserver(()=>{w()}),B=new ResizeObserver(()=>{u()});return g({scrollToTop:b,setHeightSlot:(p=a.value)==null?void 0:p.setHeightSlot,tbodyRef:l,tableRef:A,theadRef:n}),s.onMounted(()=>{u(),w(),window.addEventListener("resize",u),A.value&&B.observe(A.value),n.value&&G.observe(n.value,{childList:!0,subtree:!0}),Z()}),(y,Y)=>(s.openBlock(),s.createBlock(Eh,{ref_key:"scrollWrapperRef",ref:a,class:"table",onUnmountScroll:d,onUnmountPaginate:m,"is-show-vertical-scroll":e.isShowVerticalScroll,"is-show-horizontal-scroll":e.isShowHorizontalScroll,"data-testid":`${e.dataTestid}-ScrollWrapper`},{default:s.withCtx(()=>[s.createElementVNode("table",{ref_key:"tableRef",ref:A,id:e.tableId,class:"table__table","data-testid":`${e.dataTestid}`},[s.renderSlot(y.$slots,"default",{},()=>{var R;return[s.createElementVNode("colgroup",null,[s.renderSlot(y.$slots,"colspan",{},void 0,!0)]),y.$slots.head?(s.openBlock(),s.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:n,id:e.theadId,class:"table__head","data-testid":`${e.dataTestid}-Thead`},[s.renderSlot(y.$slots,"head",{},void 0,!0),y.$slots.search?(s.openBlock(),s.createBlock(Uh,{key:0,class:"table__search-tr",id:(R=e.search)==null?void 0:R.rowId,ref_key:"searchRowRef",ref:o,"data-testid":`${e.dataTestid}-Search-Row`},{default:s.withCtx(()=>{var V;return[s.createVNode(ar,{colspan:e.columnCount||i.maxColumnCount,class:"table__search-th",id:(V=e.search)==null?void 0:V.headId,"data-testid":`${e.dataTestid}-SearchRow-Search`},{default:s.withCtx(()=>[s.renderSlot(y.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","id","data-testid"])]}),_:3},8,["id","data-testid"])):s.createCommentVNode("",!0)],8,AQg)):s.createCommentVNode("",!0),s.renderSlot(y.$slots,"body-group",{},()=>[y.$slots.body?(s.openBlock(),s.createElementBlock("tbody",{key:0,id:e.tbodyId,ref_key:"tbodyRef",ref:l,class:"table__body","data-testid":`${e.dataTestid}-Tbody`},[s.renderSlot(y.$slots,"body",{},void 0,!0)],8,nQg)):s.createCommentVNode("",!0)],!0)]},!0)],8,iQg)]),_:3},8,["is-show-vertical-scroll","is-show-horizontal-scroll","data-testid"]))}}),[["__scopeId","data-v-79da35b2"]]),lQg=["data-testid"],IW=yg(s.defineComponent({name:"TableRow",__name:"TableRow",props:{type:{default:"default"},dataTestid:{}},setup(C){const g=C,I=s.computed(()=>[{"table-row_active":g.type==="selected"}]);return(e,t)=>(s.openBlock(),s.createElementBlock("tr",{class:s.normalizeClass(["table-row",I.value]),"data-testid":g.dataTestid},[s.renderSlot(e.$slots,"default",{},void 0,!0)],10,lQg))}}),[["__scopeId","data-v-19e6cf9d"]]),sQg=["rowspan","colspan","data-testid"],CW=s.defineComponent({name:"TableTd",__name:"TableTd",props:{colspan:{default:1},rowspan:{default:1},dataTestid:{default:"DataCell"}},setup(C){const g=C;return(I,e)=>(s.openBlock(),s.createElementBlock("td",{rowspan:C.rowspan,colspan:C.colspan,class:"table-td","data-testid":g.dataTestid},[s.renderSlot(I.$slots,"default")],8,sQg))}}),SV=yg(s.defineComponent({name:"SectionTableRow",__name:"SectionTableRow",props:{colspan:{},dataTestid:{default:"SectionTableRow"}},setup(C){const g=C;return(I,e)=>(s.openBlock(),s.createBlock(IW,{class:"section-table-row","data-testid":g.dataTestid},{default:s.withCtx(()=>[s.createVNode(CW,{colspan:C.colspan,class:"section-table-row__td","data-testid":`${g.dataTestid}-DataCell`},{default:s.withCtx(()=>[s.renderSlot(I.$slots,"default",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"]))}}),[["__scopeId","data-v-35b23188"]]),oQg=["disabled","name","value","data-testid"],KV=yg(s.defineComponent({name:"Radio",__name:"Radio",props:s.mergeModels({name:{},value:{},disabled:{type:Boolean,default:!1},dataTestid:{default:"Radio"}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(C){const g=C,I=s.useModel(C,"modelValue");return(e,t)=>s.withDirectives((s.openBlock(),s.createElementBlock("input",{"onUpdate:modelValue":t[0]||(t[0]=i=>I.value=i),type:"radio",disabled:C.disabled,name:C.name,value:C.value,class:"radio","data-testid":g.dataTestid},null,8,oQg)),[[s.vModelRadio,I.value]])}}),[["__scopeId","data-v-3db64c64"]]),aQg=["data-testid"],dQg=["data-testid"],w9=yg(s.defineComponent({name:"ChoosenMiniOptions",__name:"ChoosenMiniOptions",props:{options:{},dataTestid:{default:"ChoosenMiniOptions"}},emits:["remove"],setup(C,{emit:g}){const I=C,e=g,t=i=>{e("remove",i)};return(i,A)=>(s.openBlock(),s.createElementBlock("div",{class:"choosen-mini-options","data-testid":I.dataTestid},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(C.options,(n,l)=>(s.openBlock(),s.createElementBlock("div",{key:n.key,class:"choosen-mini-options__option","data-testid":`${I.dataTestid}-Option-Item${l}`},[s.createVNode(ke,{"data-testid":`${I.dataTestid}-Badge${l}`,type:s.unref(GI).blue,text:s.unref(Ky)(n)?n.hint:n.value,class:"choosen-mini-options__badges",disabled:""},null,8,["data-testid","type","text"]),s.createVNode(Ng,{"data-testid":`${I.dataTestid}-Icon${l}`,name:s.unref(dg).crossLarge,width:10,height:10,class:"choosen-mini-options__cross",onClick:o=>t(n.key)},null,8,["data-testid","name","onClick"])],8,dQg))),128))],8,aQg))}}),[["__scopeId","data-v-03762d05"]]),cQg=["data-testid"],rQg=["data-testid"],mQg=["data-testid"],uQg=["data-testid"],hQg=["data-testid"],bQg=["data-testid"],kV=yg(s.defineComponent({name:"BaseFilter",__name:"BaseFilter",props:s.mergeModels({options:{},title:{},isSearch:{type:Boolean,default:!1},isPosibleToClear:{type:Boolean,default:!1},isShowMiniOptions:{type:Boolean,default:!1},isUseAnchor:{type:Boolean,default:!1},isOpened:{type:Boolean,default:!1},tooltipPosition:{default:"top-center"},disabled:{type:Boolean,default:!1},onUnmountPagination:{},defaultOption:{default:"Выберите значение"},class:{},dataTestid:{default:"BaseFilter"}},{modelValue:{},modelModifiers:{}}),emits:s.mergeModels(["change","unmount-open","unmount-search","unmount-search-enter","unmount-pagination"],["update:modelValue"]),setup(C,{emit:g}){const I=C,e=s.reactive({isHovered:!1}),t=g,i=s.ref(null),A=s.ref(null),n=s.useModel(C,"modelValue"),l=s.ref(I.isOpened),o=s.computed(()=>[{filter_disabled:I.disabled},I.class]);s.watch(l,()=>t("unmount-open",l.value)),s.watch(()=>I.isOpened,()=>{if(I.disabled){l.value=!1;return}l.value=I.isOpened}),s.watch(()=>I.onUnmountPagination,()=>{D()});const a=s.ref(""),d=s.computed(()=>{let F=[];return a.value?(zu(I.options)?F=I.options.filter(T=>{var O;return T.value.toLowerCase().includes(a.value.toLowerCase())||((O=T==null?void 0:T.hint)==null?void 0:O.toLowerCase().includes(a.value.toLowerCase()))}):F=I.options.filter(T=>T.value.toLowerCase().includes(a.value.toLowerCase())),F):(zu(I.options),F=I.options,F)}),m=s.computed(()=>{var T;return((T=I.options.find(O=>ln.isArray(n.value)?n.value.includes(O.key):O.key===String(n.value)))==null?void 0:T.value)||I.defaultOption}),u=s.computed(()=>I.options.filter(F=>ln.isArray(n.value)?n.value.includes(F.key)&&F.value!==m.value:F.key===String(n.value))),b=s.computed(()=>I.options.filter(F=>ln.isArray(n.value)?n.value.includes(F.key)&&F.value===m.value:F.key===String(n.value))),Z=s.computed(()=>{var O,q,Ig;const F=I.options;let T;return ln.isArray(n.value)?zu(F)?T=(O=F.find(Q=>Q.value===m.value))==null?void 0:O.hint:T=(q=F.find(Q=>Q.value===m.value))==null?void 0:q.value:T=(Ig=F.find(Q=>Q.key===String(n.value)))==null?void 0:Ig.value,T||""}),w=()=>{e.isHovered=!0},G=()=>{e.isHovered=!1},B=s.computed(()=>{var F;return zu(I.options)?e.isHovered&&!!Z.value:((F=i.value)==null?void 0:F.isSpanOverflow)||!1}),p=s.computed(()=>ln.isArray(n.value)?I.isPosibleToClear&&n.value.length>0:I.isPosibleToClear&&n.value),y=s.computed(()=>ln.isArray(n.value)&&n.value.length>1),Y=s.computed(()=>ln.isArray(n.value)?n.value.length:null),R=async F=>{if(I.disabled){l.value=!1;return}if(ln.isArray(n.value))n.value.includes(F)?n.value=n.value.filter(T=>T!==F):n.value=[...n.value,F];else{let T=I.options.find(O=>O.key===F);!T&&zu(I.options)&&(T=I.options.find(O=>O.hint===F)),n.value=(T==null?void 0:T.key)||"",l.value=!1}await s.nextTick(),t("change",String(n.value))},V=F=>{if(I.disabled){l.value=!1;return}l.value=F},H=async()=>{I.disabled||(ln.isArray(n.value)?n.value=[]:n.value="",await s.nextTick(),t("change",n.value))},z=new IntersectionObserver(F=>{F.forEach(T=>{T.isIntersecting&&t("unmount-pagination")})}),D=()=>{A.value&&I.onUnmountPagination&&(z.unobserve(A.value),z.observe(A.value))};return s.onMounted(()=>{D()}),s.onUnmounted(()=>{z.disconnect()}),(F,T)=>(s.openBlock(),s.createBlock(Mc,{"header-classes":"filter__header","options-classes":"filter__options","is-opened":l.value,class:s.normalizeClass(["filter",o.value]),"is-use-anchor":C.isUseAnchor,"data-testid":I.dataTestid,disabled:C.disabled,onChange:V},s.createSlots({header:s.withCtx(()=>[s.renderSlot(F.$slots,"header",{},()=>[s.createElementVNode("span",{class:s.normalizeClass(["filter__header-title",{"filter__header-title__active":l.value}]),"data-testid":`${I.dataTestid}-Title`},s.toDisplayString(C.title),11,cQg),s.createVNode(Qh,{position:C.tooltipPosition,type:"blue","is-can-show":B.value&&!(y.value&&C.isShowMiniOptions),hint:Z.value,"hint-gap":28,class:"filter__header-tooltip","data-testid":`${I.dataTestid}-Tooltip`},{default:s.withCtx(()=>[s.createVNode(ke,{ref_key:"badgesRef",ref:i,type:C.disabled?s.unref(GI).disabled:m.value===I.defaultOption?s.unref(GI).default:s.unref(GI).blue,class:"filter__options-badge","data-testid":`${I.dataTestid}-Badge`,text:m.value,onMouseenter:w,onMouseleave:G,disabled:""},null,8,["type","data-testid","text"]),y.value&&C.isShowMiniOptions?(s.openBlock(),s.createElementBlock("div",{key:0,class:"filter__values","data-testid":`${I.dataTestid}-Filter-Value`},[s.createVNode(w9,{"data-testid":`${I.dataTestid}-Filter-Value-MiniOptions`,onClick:T[0]||(T[0]=s.withModifiers(()=>{},["stop"])),options:b.value,onRemove:R},null,8,["data-testid","options"])],8,rQg)):s.createCommentVNode("",!0)]),_:1},8,["position","is-can-show","hint","data-testid"]),Y.value&&Y.value>1?(s.openBlock(),s.createElementBlock("span",{key:0,class:"filter__count","data-testid":`${I.dataTestid}-Filter-Count`},[s.createTextVNode(" +"+s.toDisplayString(Y.value-1)+" ",1),y.value?(s.openBlock(),s.createElementBlock("div",{key:0,class:"filter__values","data-testid":`${I.dataTestid}-Filter-Values`},[s.createVNode(w9,{onClick:T[1]||(T[1]=s.withModifiers(()=>{},["stop"])),options:u.value,onRemove:R,"data-testid":`${I.dataTestid}-MiniOptions`},null,8,["options","data-testid"])],8,uQg)):s.createCommentVNode("",!0)],8,mQg)):s.createCommentVNode("",!0),p.value?(s.openBlock(),s.createElementBlock("span",{key:1,class:"filter__cross",onClick:s.withModifiers(H,["stop"]),"data-testid":`${I.dataTestid}-Filter-Cross`},[s.createVNode(Ng,{name:s.unref(dg).crossLarge,width:16,height:16},null,8,["name"])],8,hQg)):s.createCommentVNode("",!0)],!0)]),options:s.withCtx(()=>[C.isSearch?(s.openBlock(),s.createBlock(uh,{key:0,modelValue:a.value,"onUpdate:modelValue":T[2]||(T[2]=O=>a.value=O),"show-history":!1,"data-testid":`${I.dataTestid}-Search`,onInput:T[3]||(T[3]=O=>F.$emit("unmount-search",O)),onEnter:T[4]||(T[4]=O=>F.$emit("unmount-search-enter",O))},null,8,["modelValue","data-testid"])):s.createCommentVNode("",!0),s.createVNode(ky,{"data-testid":`${I.dataTestid}-Options`,class:"filter__options-option",options:d.value,"default-option":m.value,onChange:R},{default:s.withCtx(()=>[s.createElementVNode("li",{class:"filter__options-underline","data-testid":`${I.dataTestid}-Underline`},[...T[5]||(T[5]=[s.createElementVNode("hr",{class:"filter__options-underline-hr"},null,-1)])],8,bQg)]),_:1},8,["data-testid","options","default-option"]),s.withDirectives(s.createElementVNode("div",{ref_key:"lastOptionRef",ref:A,class:"filter__last-option"},null,512),[[s.vShow,C.onUnmountPagination]])]),_:2},[F.$slots.body?{name:"body",fn:s.withCtx(O=>[s.renderSlot(F.$slots,"body",{closeOpenList:O.closeOpenList},void 0,!0)]),key:"0"}:void 0]),1032,["is-opened","class","is-use-anchor","data-testid","disabled"]))}}),[["__scopeId","data-v-68c3b3bc"]]),ZQg=["data-testid"],eW=yg(s.defineComponent({name:"Range",__name:"Range",props:s.mergeModels({min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1},dataTestid:{default:"Range"}},{modelValue:{default:0},modelModifiers:{}}),emits:s.mergeModels(["unmount-change","unmount-input"],["update:modelValue"]),setup(C,{emit:g}){const I=C,e=g,t=s.useModel(C,"modelValue"),i=s.ref(null);s.watch(t,()=>{n()});const A=()=>(t.value-I.min)/(I.max-I.min)*100,n=()=>{requestAnimationFrame(()=>{i.value&&YI({"--progress":A()+"%"},i.value)})},l=a=>{const d=a.target;d&&e("unmount-change",Number(d.value))},o=a=>{const d=a.target;d&&e("unmount-change",Number(d.value))};return s.onMounted(()=>{n()}),(a,d)=>s.withDirectives((s.openBlock(),s.createElementBlock("input",s.mergeProps({ref_key:"input",ref:i,type:"range"},I,{class:"range","onUpdate:modelValue":d[0]||(d[0]=m=>t.value=m),onChange:l,onInput:o,"data-testid":I.dataTestid}),null,16,ZQg)),[[s.vModelText,t.value]])}}),[["__scopeId","data-v-50ada1b8"]]),GQg=["id","data-testid"],wQg=["data-testid"],WQg=["data-testid"],FV=yg(s.defineComponent({name:"TableNew",__name:"TableNew",props:{tableId:{},search:{},tbodyId:{},theadId:{},columnCount:{},dataTestid:{default:"Table"},isShowVerticalScroll:{type:Boolean,default:!1},isShowHorizontalScroll:{type:Boolean,default:!1}},emits:["unmount-scroll","unmount-paginate"],setup(C,{expose:g,emit:I}){var B;const e=C,t=I,i=s.reactive({headHeight:0,maxColumnCount:0}),A=s.ref(null),n=s.ref(null),l=s.ref(null),o=s.ref(null),a=s.ref(null),d=p=>{t("unmount-scroll",p)},m=()=>{if(!A.value||!a.value)return;const p=A.value.querySelector("thead");if(!p)return;const y=p.getBoundingClientRect().height;i.headHeight=y,YI({"--scroll-track-margin-top":`${y}px`},a.value.$el)},u=()=>{a.value&&a.value.scrollToTop()},b=()=>{if(a.value&&o.value){const p=getComputedStyle(a.value.$el),y=Number(p.minHeight.replace(/\D/g,""));if(y&&y>0)return;YI({"min-height":`${i.headHeight+108}px`},a.value.$el)}},Z=()=>{let p=1;if(n.value){for(let y=0;y<n.value.children.length;y++)p=Math.max(n.value.children[y].children.length,p);i.maxColumnCount=p}},w=new MutationObserver(()=>{Z()}),G=new ResizeObserver(()=>{m()});return g({scrollToTop:u,setHeightSlot:(B=a.value)==null?void 0:B.setHeightSlot,tbodyRef:l,tableRef:A,theadRef:n}),s.onMounted(()=>{m(),Z(),window.addEventListener("resize",m),A.value&&G.observe(A.value),n.value&&w.observe(n.value,{childList:!0,subtree:!0}),b()}),(p,y)=>(s.openBlock(),s.createBlock(Eh,{ref_key:"scrollWrapperRef",ref:a,class:"table",onUnmountScroll:d,"is-show-vertical-scroll":e.isShowVerticalScroll,"is-show-horizontal-scroll":e.isShowHorizontalScroll,"data-testid":`${e.dataTestid}-ScrollWrapper`},{default:s.withCtx(()=>[s.createElementVNode("table",{ref_key:"tableRef",ref:A,id:e.tableId,class:"table__table","data-testid":`${e.dataTestid}`},[s.renderSlot(p.$slots,"default",{},()=>[s.createElementVNode("colgroup",null,[s.renderSlot(p.$slots,"colspan",{},void 0,!0)]),p.$slots.head?(s.openBlock(),s.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:n,class:"table__head","data-testid":`${e.dataTestid}-Thead`},[s.renderSlot(p.$slots,"head",{},void 0,!0),p.$slots.search?(s.openBlock(),s.createBlock(Uh,{key:0,class:"table__search-tr",ref_key:"searchRowRef",ref:o,"data-testid":`${e.dataTestid}-Search-Row`},{default:s.withCtx(()=>[s.createVNode(ar,{colspan:i.maxColumnCount,class:"table__search-th","data-testid":`${e.dataTestid}-SearchRow-Search`},{default:s.withCtx(()=>[s.renderSlot(p.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"])):s.createCommentVNode("",!0)],8,wQg)):s.createCommentVNode("",!0),s.renderSlot(p.$slots,"body-group",{},()=>[p.$slots.body?(s.openBlock(),s.createElementBlock("tbody",{key:0,ref_key:"tbodyRef",ref:l,class:"table__body","data-testid":`${e.dataTestid}-Tbody`},[s.renderSlot(p.$slots,"body",{},void 0,!0)],8,WQg)):s.createCommentVNode("",!0)],!0)],!0)],8,GQg)]),_:3},8,["is-show-vertical-scroll","is-show-horizontal-scroll","data-testid"]))}}),[["__scopeId","data-v-30a389ed"]]),BQg=["data-testid"],zV=yg(s.defineComponent({name:"TableRow",__name:"TableRowNew",props:{type:{default:"default"},dataTestid:{}},setup(C){const g=C,I=s.computed(()=>[{"table-row_active":g.type==="selected"}]);return(e,t)=>(s.openBlock(),s.createElementBlock("tr",{class:s.normalizeClass(["table-row",I.value]),"data-testid":g.dataTestid},[s.renderSlot(e.$slots,"default",{},void 0,!0)],10,BQg))}}),[["__scopeId","data-v-c22d3f55"]]),pQg=["data-testid"],tW=yg(s.defineComponent({name:"HeadTableRow",__name:"HeadTableRowNew",props:{dataTestid:{default:"TableRow"}},setup(C){const g=C;return(I,e)=>(s.openBlock(),s.createElementBlock("tr",{class:"head-table-row","data-testid":g.dataTestid},[s.renderSlot(I.$slots,"default",{},void 0,!0)],8,pQg))}}),[["__scopeId","data-v-45b56a2a"]]),yQg={class:"scroll-wrapper__vertical-wrapper"},YQg={class:"scroll-wrapper__horizont-wrapper"},VQg=yg(s.defineComponent({name:"ScrollWrapper",__name:"ScrollWrapperNew",props:{isShowVerticalScroll:{type:Boolean,default:!1},isShowHorizontalScroll:{type:Boolean,default:!1}},emits:["unmount-scroll","unmount-paginate","on-mounted"],setup(C,{expose:g,emit:I}){const e=I,t=s.ref(null),i=s.ref(null),A=s.ref(null),n=s.ref(null),l=s.ref(null),o=s.ref(null),{onTrackClick:a,startDrag:d,changeBarPosition:m,setVerticalBarHeight:u,verticalTrackClass:b,isExistVerticalTrack:Z}=G9(t,i,n,A),{changeBarPosition:w,startDrag:G,onTrackClick:B,setHorizontalBarWidth:p,horizontalTrackClass:y,isExistHorizontalTrack:Y}=Z9(t,i,o,l),R=Ig=>{m(),w(),e("unmount-scroll",Ig)},V=()=>{requestAnimationFrame(()=>{H(),z()})},H=()=>{if(!t.value||!i.value)return;const Ig=getComputedStyle(i.value),Q=i.value.style.minHeight||Ig.minHeight,$=i.value.style.maxHeight||Ig.maxHeight,Ag=i.value.style.height;YI({"--scroll-wrapper-height":`${Ag}`,"--scroll-wrapper-max-height":`${$}`,"--scroll-wrapper-min-height":`${Q}`},i.value)},z=()=>{u(),p(),m(),w()},D=()=>{t.value&&t.value.addEventListener("scroll",R)},F=()=>{t.value&&(t.value.scrollTop=0)},T=new MutationObserver(()=>{V()}),O=new ResizeObserver(()=>{V()}),q=Ig=>{T.observe(Ig,{childList:!0,subtree:!0,attributes:!0}),O.observe(Ig)};return g({scrollToTop:F,setHeightSlot:H}),s.onMounted(()=>{V(),D(),i.value&&q(i.value),A.value&&q(A.value),window.addEventListener("resize",V),e("on-mounted")}),s.onUnmounted(()=>{window.removeEventListener("resize",V)}),(Ig,Q)=>(s.openBlock(),s.createElementBlock("div",{ref_key:"scrollWrapperRef",ref:i,class:"scroll-wrapper"},[s.createElementVNode("div",yQg,[s.createElementVNode("div",YQg,[s.createElementVNode("div",{ref_key:"slotRef",ref:t,class:"scroll-wrapper__slot"},[s.renderSlot(Ig.$slots,"default",{},void 0,!0)],512),s.unref(Y)||C.isShowHorizontalScroll?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"horizontTrackRef",ref:l,class:s.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_horizont",s.unref(y)]),onClick:Q[1]||(Q[1]=s.withModifiers((...$)=>s.unref(B)&&s.unref(B)(...$),["prevent","left"]))},[s.createElementVNode("div",{ref_key:"horizontBarRef",ref:o,class:"scroll-wrapper__bar",onMousedown:Q[0]||(Q[0]=s.withModifiers((...$)=>s.unref(G)&&s.unref(G)(...$),["prevent","left"]))},null,544)],2)):s.createCommentVNode("",!0)]),s.unref(Z)||C.isShowVerticalScroll?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"verticalTrackRef",ref:A,class:s.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_vertical",s.unref(b)]),onClick:Q[3]||(Q[3]=s.withModifiers((...$)=>s.unref(a)&&s.unref(a)(...$),["prevent","left"]))},[s.createElementVNode("div",{ref_key:"verticalBarRef",ref:n,class:"scroll-wrapper__bar",onMousedown:Q[2]||(Q[2]=s.withModifiers((...$)=>s.unref(d)&&s.unref(d)(...$),["prevent","left"]))},null,544)],2)):s.createCommentVNode("",!0)])],512))}}),[["__scopeId","data-v-411a6b7a"]]),NQg=["data-testid"],MQg=["data-testid"],RQg=["data-testid"],JV=yg(s.defineComponent({name:"TableSimple",__name:"TableSimple",props:{dataTestid:{default:"TableSimple"}},setup(C,{expose:g}){const I=C,e=s.ref(null),t=s.ref(null),i=s.ref(null),A=s.ref(null),n=s.computed(()=>{let l=1;if(t.value)for(let o=0;o<t.value.children.length;o++)l=Math.max(t.value.children[o].children.length,l);return l});return g({tbodyRef:i,tableRef:e,theadRef:t}),(l,o)=>(s.openBlock(),s.createElementBlock("table",{ref_key:"tableRef",ref:e,class:"simple-table-yui-kit","data-testid":`${I.dataTestid}`},[s.renderSlot(l.$slots,"default",{},()=>[s.renderSlot(l.$slots,"colspan",{},void 0,!0),l.$slots.head?(s.openBlock(),s.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:t,class:"simple-table-yui-kit__head","data-testid":`${I.dataTestid}-Thead`},[s.renderSlot(l.$slots,"head",{},void 0,!0),l.$slots.search?(s.openBlock(),s.createBlock(tW,{key:0,class:"table-new-yui-kit__search",ref_key:"searchRowRef",ref:A,"data-testid":`${I.dataTestid}-Search-Row`},{default:s.withCtx(()=>[s.createVNode(ar,{colspan:n.value,class:"table-new-yui-kit__th","data-testid":`${I.dataTestid}-SearchRow-Search`},{default:s.withCtx(()=>[s.renderSlot(l.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"])):s.createCommentVNode("",!0)],8,MQg)):s.createCommentVNode("",!0),s.renderSlot(l.$slots,"body-group",{},()=>[l.$slots.body?(s.openBlock(),s.createElementBlock("tbody",{key:0,ref_key:"tbodyRef",ref:i,class:"simple-table-yui-kit__body","data-testid":`${I.dataTestid}-Tbody`},[s.renderSlot(l.$slots,"body",{},void 0,!0)],8,RQg)):s.createCommentVNode("",!0)],!0)],!0)],8,NQg))}}),[["__scopeId","data-v-eaeafe5b"]]),XQg=["data-testid"],HQg=["data-testid"],fQg=["onClick","data-testid"],DQg=["data-testid"],LV=yg(s.defineComponent({name:"Tabs",__name:"Tabs",props:{defaultActiveTabId:{},tabCount:{},dataTestid:{default:"Tabs"}},emits:["unmount-tab"],setup(C,{emit:g}){const I=C,e=g,t=s.reactive({activeTab:1}),i=n=>Array.from({length:n},(l,o)=>o+1);s.watch(()=>I.defaultActiveTabId,()=>{I.defaultActiveTabId&&(t.activeTab=I.defaultActiveTabId)},{immediate:!0});const A=n=>{t.activeTab=n,e("unmount-tab",n)};return(n,l)=>(s.openBlock(),s.createElementBlock("div",{"data-testid":I.dataTestid,class:"tabs"},[s.createElementVNode("nav",{class:"tabs__navigation","data-testid":`${I.dataTestid}-Navigation`},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i(I.tabCount),o=>(s.openBlock(),s.createElementBlock("button",{key:o,onClick:a=>A(o),class:s.normalizeClass(["tabs__navigation-button",{active:t.activeTab===o}]),"data-testid":`${I.dataTestid}-Navigation-Button`},[s.renderSlot(n.$slots,`header${o}`,{},void 0,!0)],10,fQg))),128))],8,HQg),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i(I.tabCount),o=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:o},[t.activeTab===o?(s.openBlock(),s.createElementBlock("article",{key:0,"data-testid":`${I.dataTestid}-Content`,class:"tabs__navigation-content"},[s.renderSlot(n.$slots,`tab${o}`,{},void 0,!0)],8,DQg)):s.createCommentVNode("",!0)],64))),128))],8,XQg))}}),[["__scopeId","data-v-9a94dd67"]]);function pe(C){this.content=C}pe.prototype={constructor:pe,find:function(C){for(var g=0;g<this.content.length;g+=2)if(this.content[g]===C)return g;return-1},get:function(C){var g=this.find(C);return g==-1?void 0:this.content[g+1]},update:function(C,g,I){var e=I&&I!=C?this.remove(I):this,t=e.find(C),i=e.content.slice();return t==-1?i.push(I||C,g):(i[t+1]=g,I&&(i[t]=I)),new pe(i)},remove:function(C){var g=this.find(C);if(g==-1)return this;var I=this.content.slice();return I.splice(g,2),new pe(I)},addToStart:function(C,g){return new pe([C,g].concat(this.remove(C).content))},addToEnd:function(C,g){var I=this.remove(C).content.slice();return I.push(C,g),new pe(I)},addBefore:function(C,g,I){var e=this.remove(g),t=e.content.slice(),i=e.find(C);return t.splice(i==-1?t.length:i,0,g,I),new pe(t)},forEach:function(C){for(var g=0;g<this.content.length;g+=2)C(this.content[g],this.content[g+1])},prepend:function(C){return C=pe.from(C),C.size?new pe(C.content.concat(this.subtract(C).content)):this},append:function(C){return C=pe.from(C),C.size?new pe(this.subtract(C).content.concat(C.content)):this},subtract:function(C){var g=this;C=pe.from(C);for(var I=0;I<C.content.length;I+=2)g=g.remove(C.content[I]);return g},toObject:function(){var C={};return this.forEach(function(g,I){C[g]=I}),C},get size(){return this.content.length>>1}},pe.from=function(C){if(C instanceof pe)return C;var g=[];if(C)for(var I in C)g.push(I,C[I]);return new pe(g)};function W9(C,g,I){for(let e=0;;e++){if(e==C.childCount||e==g.childCount)return C.childCount==g.childCount?null:I;let t=C.child(e),i=g.child(e);if(t==i){I+=t.nodeSize;continue}if(!t.sameMarkup(i))return I;if(t.isText&&t.text!=i.text){for(let A=0;t.text[A]==i.text[A];A++)I++;return I}if(t.content.size||i.content.size){let A=W9(t.content,i.content,I+1);if(A!=null)return A}I+=t.nodeSize}}function B9(C,g,I,e){for(let t=C.childCount,i=g.childCount;;){if(t==0||i==0)return t==i?null:{a:I,b:e};let A=C.child(--t),n=g.child(--i),l=A.nodeSize;if(A==n){I-=l,e-=l;continue}if(!A.sameMarkup(n))return{a:I,b:e};if(A.isText&&A.text!=n.text){let o=0,a=Math.min(A.text.length,n.text.length);for(;o<a&&A.text[A.text.length-o-1]==n.text[n.text.length-o-1];)o++,I--,e--;return{a:I,b:e}}if(A.content.size||n.content.size){let o=B9(A.content,n.content,I-1,e-1);if(o)return o}I-=l,e-=l}}class sg{constructor(g,I){if(this.content=g,this.size=I||0,I==null)for(let e=0;e<g.length;e++)this.size+=g[e].nodeSize}nodesBetween(g,I,e,t=0,i){for(let A=0,n=0;n<I;A++){let l=this.content[A],o=n+l.nodeSize;if(o>g&&e(l,t+n,i||null,A)!==!1&&l.content.size){let a=n+1;l.nodesBetween(Math.max(0,g-a),Math.min(l.content.size,I-a),e,t+a)}n=o}}descendants(g){this.nodesBetween(0,this.size,g)}textBetween(g,I,e,t){let i="",A=!0;return this.nodesBetween(g,I,(n,l)=>{let o=n.isText?n.text.slice(Math.max(g,l)-l,I-l):n.isLeaf?t?typeof t=="function"?t(n):t:n.type.spec.leafText?n.type.spec.leafText(n):"":"";n.isBlock&&(n.isLeaf&&o||n.isTextblock)&&e&&(A?A=!1:i+=e),i+=o},0),i}append(g){if(!g.size)return this;if(!this.size)return g;let I=this.lastChild,e=g.firstChild,t=this.content.slice(),i=0;for(I.isText&&I.sameMarkup(e)&&(t[t.length-1]=I.withText(I.text+e.text),i=1);i<g.content.length;i++)t.push(g.content[i]);return new sg(t,this.size+g.size)}cut(g,I=this.size){if(g==0&&I==this.size)return this;let e=[],t=0;if(I>g)for(let i=0,A=0;A<I;i++){let n=this.content[i],l=A+n.nodeSize;l>g&&((A<g||l>I)&&(n.isText?n=n.cut(Math.max(0,g-A),Math.min(n.text.length,I-A)):n=n.cut(Math.max(0,g-A-1),Math.min(n.content.size,I-A-1))),e.push(n),t+=n.nodeSize),A=l}return new sg(e,t)}cutByIndex(g,I){return g==I?sg.empty:g==0&&I==this.content.length?this:new sg(this.content.slice(g,I))}replaceChild(g,I){let e=this.content[g];if(e==I)return this;let t=this.content.slice(),i=this.size+I.nodeSize-e.nodeSize;return t[g]=I,new sg(t,i)}addToStart(g){return new sg([g].concat(this.content),this.size+g.nodeSize)}addToEnd(g){return new sg(this.content.concat(g),this.size+g.nodeSize)}eq(g){if(this.content.length!=g.content.length)return!1;for(let I=0;I<this.content.length;I++)if(!this.content[I].eq(g.content[I]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(g){let I=this.content[g];if(!I)throw new RangeError("Index "+g+" out of range for "+this);return I}maybeChild(g){return this.content[g]||null}forEach(g){for(let I=0,e=0;I<this.content.length;I++){let t=this.content[I];g(t,e,I),e+=t.nodeSize}}findDiffStart(g,I=0){return W9(this,g,I)}findDiffEnd(g,I=this.size,e=g.size){return B9(this,g,I,e)}findIndex(g){if(g==0)return iW(0,g);if(g==this.size)return iW(this.content.length,g);if(g>this.size||g<0)throw new RangeError(`Position ${g} outside of fragment (${this})`);for(let I=0,e=0;;I++){let t=this.child(I),i=e+t.nodeSize;if(i>=g)return i==g?iW(I+1,i):iW(I,e);e=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(g=>g.toJSON()):null}static fromJSON(g,I){if(!I)return sg.empty;if(!Array.isArray(I))throw new RangeError("Invalid input for Fragment.fromJSON");return new sg(I.map(g.nodeFromJSON))}static fromArray(g){if(!g.length)return sg.empty;let I,e=0;for(let t=0;t<g.length;t++){let i=g[t];e+=i.nodeSize,t&&i.isText&&g[t-1].sameMarkup(i)?(I||(I=g.slice(0,t)),I[I.length-1]=i.withText(I[I.length-1].text+i.text)):I&&I.push(i)}return new sg(I||g,e)}static from(g){if(!g)return sg.empty;if(g instanceof sg)return g;if(Array.isArray(g))return this.fromArray(g);if(g.attrs)return new sg([g],g.nodeSize);throw new RangeError("Can not convert "+g+" to a Fragment"+(g.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}sg.empty=new sg([],0);const TV={index:0,offset:0};function iW(C,g){return TV.index=C,TV.offset=g,TV}function AW(C,g){if(C===g)return!0;if(!(C&&typeof C=="object")||!(g&&typeof g=="object"))return!1;let I=Array.isArray(C);if(Array.isArray(g)!=I)return!1;if(I){if(C.length!=g.length)return!1;for(let e=0;e<C.length;e++)if(!AW(C[e],g[e]))return!1}else{for(let e in C)if(!(e in g)||!AW(C[e],g[e]))return!1;for(let e in g)if(!(e in C))return!1}return!0}let TI=class nX{constructor(g,I){this.type=g,this.attrs=I}addToSet(g){let I,e=!1;for(let t=0;t<g.length;t++){let i=g[t];if(this.eq(i))return g;if(this.type.excludes(i.type))I||(I=g.slice(0,t));else{if(i.type.excludes(this.type))return g;!e&&i.type.rank>this.type.rank&&(I||(I=g.slice(0,t)),I.push(this),e=!0),I&&I.push(i)}}return I||(I=g.slice()),e||I.push(this),I}removeFromSet(g){for(let I=0;I<g.length;I++)if(this.eq(g[I]))return g.slice(0,I).concat(g.slice(I+1));return g}isInSet(g){for(let I=0;I<g.length;I++)if(this.eq(g[I]))return!0;return!1}eq(g){return this==g||this.type==g.type&&AW(this.attrs,g.attrs)}toJSON(){let g={type:this.type.name};for(let I in this.attrs){g.attrs=this.attrs;break}return g}static fromJSON(g,I){if(!I)throw new RangeError("Invalid input for Mark.fromJSON");let e=g.marks[I.type];if(!e)throw new RangeError(`There is no mark type ${I.type} in this schema`);let t=e.create(I.attrs);return e.checkAttrs(t.attrs),t}static sameSet(g,I){if(g==I)return!0;if(g.length!=I.length)return!1;for(let e=0;e<g.length;e++)if(!g[e].eq(I[e]))return!1;return!0}static setFrom(g){if(!g||Array.isArray(g)&&g.length==0)return nX.none;if(g instanceof nX)return[g];let I=g.slice();return I.sort((e,t)=>e.type.rank-t.type.rank),I}};TI.none=[];class nW extends Error{}class bg{constructor(g,I,e){this.content=g,this.openStart=I,this.openEnd=e}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(g,I){let e=y9(this.content,g+this.openStart,I);return e&&new bg(e,this.openStart,this.openEnd)}removeBetween(g,I){return new bg(p9(this.content,g+this.openStart,I+this.openStart),this.openStart,this.openEnd)}eq(g){return this.content.eq(g.content)&&this.openStart==g.openStart&&this.openEnd==g.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let g={content:this.content.toJSON()};return this.openStart>0&&(g.openStart=this.openStart),this.openEnd>0&&(g.openEnd=this.openEnd),g}static fromJSON(g,I){if(!I)return bg.empty;let e=I.openStart||0,t=I.openEnd||0;if(typeof e!="number"||typeof t!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new bg(sg.fromJSON(g,I.content),e,t)}static maxOpen(g,I=!0){let e=0,t=0;for(let i=g.firstChild;i&&!i.isLeaf&&(I||!i.type.spec.isolating);i=i.firstChild)e++;for(let i=g.lastChild;i&&!i.isLeaf&&(I||!i.type.spec.isolating);i=i.lastChild)t++;return new bg(g,e,t)}}bg.empty=new bg(sg.empty,0,0);function p9(C,g,I){let{index:e,offset:t}=C.findIndex(g),i=C.maybeChild(e),{index:A,offset:n}=C.findIndex(I);if(t==g||i.isText){if(n!=I&&!C.child(A).isText)throw new RangeError("Removing non-flat range");return C.cut(0,g).append(C.cut(I))}if(e!=A)throw new RangeError("Removing non-flat range");return C.replaceChild(e,i.copy(p9(i.content,g-t-1,I-t-1)))}function y9(C,g,I,e){let{index:t,offset:i}=C.findIndex(g),A=C.maybeChild(t);if(i==g||A.isText)return e&&!e.canReplace(t,t,I)?null:C.cut(0,g).append(I).append(C.cut(g));let n=y9(A.content,g-i-1,I,A);return n&&C.replaceChild(t,A.copy(n))}function SQg(C,g,I){if(I.openStart>C.depth)throw new nW("Inserted content deeper than insertion position");if(C.depth-I.openStart!=g.depth-I.openEnd)throw new nW("Inconsistent open depths");return Y9(C,g,I,0)}function Y9(C,g,I,e){let t=C.index(e),i=C.node(e);if(t==g.index(e)&&e<C.depth-I.openStart){let A=Y9(C,g,I,e+1);return i.copy(i.content.replaceChild(t,A))}else if(I.content.size)if(!I.openStart&&!I.openEnd&&C.depth==e&&g.depth==e){let A=C.parent,n=A.content;return fa(A,n.cut(0,C.parentOffset).append(I.content).append(n.cut(g.parentOffset)))}else{let{start:A,end:n}=KQg(I,C);return fa(i,N9(C,A,n,g,e))}else return fa(i,lW(C,g,e))}function V9(C,g){if(!g.type.compatibleContent(C.type))throw new nW("Cannot join "+g.type.name+" onto "+C.type.name)}function vV(C,g,I){let e=C.node(I);return V9(e,g.node(I)),e}function Ha(C,g){let I=g.length-1;I>=0&&C.isText&&C.sameMarkup(g[I])?g[I]=C.withText(g[I].text+C.text):g.push(C)}function Ph(C,g,I,e){let t=(g||C).node(I),i=0,A=g?g.index(I):t.childCount;C&&(i=C.index(I),C.depth>I?i++:C.textOffset&&(Ha(C.nodeAfter,e),i++));for(let n=i;n<A;n++)Ha(t.child(n),e);g&&g.depth==I&&g.textOffset&&Ha(g.nodeBefore,e)}function fa(C,g){return C.type.checkContent(g),C.copy(g)}function N9(C,g,I,e,t){let i=C.depth>t&&vV(C,g,t+1),A=e.depth>t&&vV(I,e,t+1),n=[];return Ph(null,C,t,n),i&&A&&g.index(t)==I.index(t)?(V9(i,A),Ha(fa(i,N9(C,g,I,e,t+1)),n)):(i&&Ha(fa(i,lW(C,g,t+1)),n),Ph(g,I,t,n),A&&Ha(fa(A,lW(I,e,t+1)),n)),Ph(e,null,t,n),new sg(n)}function lW(C,g,I){let e=[];if(Ph(null,C,I,e),C.depth>I){let t=vV(C,g,I+1);Ha(fa(t,lW(C,g,I+1)),e)}return Ph(g,null,I,e),new sg(e)}function KQg(C,g){let I=g.depth-C.openStart,t=g.node(I).copy(C.content);for(let i=I-1;i>=0;i--)t=g.node(i).copy(sg.from(t));return{start:t.resolveNoCache(C.openStart+I),end:t.resolveNoCache(t.content.size-C.openEnd-I)}}class _h{constructor(g,I,e){this.pos=g,this.path=I,this.parentOffset=e,this.depth=I.length/3-1}resolveDepth(g){return g==null?this.depth:g<0?this.depth+g:g}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(g){return this.path[this.resolveDepth(g)*3]}index(g){return this.path[this.resolveDepth(g)*3+1]}indexAfter(g){return g=this.resolveDepth(g),this.index(g)+(g==this.depth&&!this.textOffset?0:1)}start(g){return g=this.resolveDepth(g),g==0?0:this.path[g*3-1]+1}end(g){return g=this.resolveDepth(g),this.start(g)+this.node(g).content.size}before(g){if(g=this.resolveDepth(g),!g)throw new RangeError("There is no position before the top-level node");return g==this.depth+1?this.pos:this.path[g*3-1]}after(g){if(g=this.resolveDepth(g),!g)throw new RangeError("There is no position after the top-level node");return g==this.depth+1?this.pos:this.path[g*3-1]+this.path[g*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let g=this.parent,I=this.index(this.depth);if(I==g.childCount)return null;let e=this.pos-this.path[this.path.length-1],t=g.child(I);return e?g.child(I).cut(e):t}get nodeBefore(){let g=this.index(this.depth),I=this.pos-this.path[this.path.length-1];return I?this.parent.child(g).cut(0,I):g==0?null:this.parent.child(g-1)}posAtIndex(g,I){I=this.resolveDepth(I);let e=this.path[I*3],t=I==0?0:this.path[I*3-1]+1;for(let i=0;i<g;i++)t+=e.child(i).nodeSize;return t}marks(){let g=this.parent,I=this.index();if(g.content.size==0)return TI.none;if(this.textOffset)return g.child(I).marks;let e=g.maybeChild(I-1),t=g.maybeChild(I);if(!e){let n=e;e=t,t=n}let i=e.marks;for(var A=0;A<i.length;A++)i[A].type.spec.inclusive===!1&&(!t||!i[A].isInSet(t.marks))&&(i=i[A--].removeFromSet(i));return i}marksAcross(g){let I=this.parent.maybeChild(this.index());if(!I||!I.isInline)return null;let e=I.marks,t=g.parent.maybeChild(g.index());for(var i=0;i<e.length;i++)e[i].type.spec.inclusive===!1&&(!t||!e[i].isInSet(t.marks))&&(e=e[i--].removeFromSet(e));return e}sharedDepth(g){for(let I=this.depth;I>0;I--)if(this.start(I)<=g&&this.end(I)>=g)return I;return 0}blockRange(g=this,I){if(g.pos<this.pos)return g.blockRange(this);for(let e=this.depth-(this.parent.inlineContent||this.pos==g.pos?1:0);e>=0;e--)if(g.pos<=this.end(e)&&(!I||I(this.node(e))))return new sW(this,g,e);return null}sameParent(g){return this.pos-this.parentOffset==g.pos-g.parentOffset}max(g){return g.pos>this.pos?g:this}min(g){return g.pos<this.pos?g:this}toString(){let g="";for(let I=1;I<=this.depth;I++)g+=(g?"/":"")+this.node(I).type.name+"_"+this.index(I-1);return g+":"+this.parentOffset}static resolve(g,I){if(!(I>=0&&I<=g.content.size))throw new RangeError("Position "+I+" out of range");let e=[],t=0,i=I;for(let A=g;;){let{index:n,offset:l}=A.content.findIndex(i),o=i-l;if(e.push(A,n,t+l),!o||(A=A.child(n),A.isText))break;i=o-1,t+=l+1}return new _h(I,e,i)}static resolveCached(g,I){let e=M9.get(g);if(e)for(let i=0;i<e.elts.length;i++){let A=e.elts[i];if(A.pos==I)return A}else M9.set(g,e=new kQg);let t=e.elts[e.i]=_h.resolve(g,I);return e.i=(e.i+1)%FQg,t}}class kQg{constructor(){this.elts=[],this.i=0}}const FQg=12,M9=new WeakMap;class sW{constructor(g,I,e){this.$from=g,this.$to=I,this.depth=e}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const zQg=Object.create(null);let Ds=class lX{constructor(g,I,e,t=TI.none){this.type=g,this.attrs=I,this.marks=t,this.content=e||sg.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(g){return this.content.child(g)}maybeChild(g){return this.content.maybeChild(g)}forEach(g){this.content.forEach(g)}nodesBetween(g,I,e,t=0){this.content.nodesBetween(g,I,e,t,this)}descendants(g){this.nodesBetween(0,this.content.size,g)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(g,I,e,t){return this.content.textBetween(g,I,e,t)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(g){return this==g||this.sameMarkup(g)&&this.content.eq(g.content)}sameMarkup(g){return this.hasMarkup(g.type,g.attrs,g.marks)}hasMarkup(g,I,e){return this.type==g&&AW(this.attrs,I||g.defaultAttrs||zQg)&&TI.sameSet(this.marks,e||TI.none)}copy(g=null){return g==this.content?this:new lX(this.type,this.attrs,g,this.marks)}mark(g){return g==this.marks?this:new lX(this.type,this.attrs,this.content,g)}cut(g,I=this.content.size){return g==0&&I==this.content.size?this:this.copy(this.content.cut(g,I))}slice(g,I=this.content.size,e=!1){if(g==I)return bg.empty;let t=this.resolve(g),i=this.resolve(I),A=e?0:t.sharedDepth(I),n=t.start(A),o=t.node(A).content.cut(t.pos-n,i.pos-n);return new bg(o,t.depth-A,i.depth-A)}replace(g,I,e){return SQg(this.resolve(g),this.resolve(I),e)}nodeAt(g){for(let I=this;;){let{index:e,offset:t}=I.content.findIndex(g);if(I=I.maybeChild(e),!I)return null;if(t==g||I.isText)return I;g-=t+1}}childAfter(g){let{index:I,offset:e}=this.content.findIndex(g);return{node:this.content.maybeChild(I),index:I,offset:e}}childBefore(g){if(g==0)return{node:null,index:0,offset:0};let{index:I,offset:e}=this.content.findIndex(g);if(e<g)return{node:this.content.child(I),index:I,offset:e};let t=this.content.child(I-1);return{node:t,index:I-1,offset:e-t.nodeSize}}resolve(g){return _h.resolveCached(this,g)}resolveNoCache(g){return _h.resolve(this,g)}rangeHasMark(g,I,e){let t=!1;return I>g&&this.nodesBetween(g,I,i=>(e.isInSet(i.marks)&&(t=!0),!t)),t}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let g=this.type.name;return this.content.size&&(g+="("+this.content.toStringInner()+")"),R9(this.marks,g)}contentMatchAt(g){let I=this.type.contentMatch.matchFragment(this.content,0,g);if(!I)throw new Error("Called contentMatchAt on a node with invalid content");return I}canReplace(g,I,e=sg.empty,t=0,i=e.childCount){let A=this.contentMatchAt(g).matchFragment(e,t,i),n=A&&A.matchFragment(this.content,I);if(!n||!n.validEnd)return!1;for(let l=t;l<i;l++)if(!this.type.allowsMarks(e.child(l).marks))return!1;return!0}canReplaceWith(g,I,e,t){if(t&&!this.type.allowsMarks(t))return!1;let i=this.contentMatchAt(g).matchType(e),A=i&&i.matchFragment(this.content,I);return A?A.validEnd:!1}canAppend(g){return g.content.size?this.canReplace(this.childCount,this.childCount,g.content):this.type.compatibleContent(g.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let g=TI.none;for(let I=0;I<this.marks.length;I++){let e=this.marks[I];e.type.checkAttrs(e.attrs),g=e.addToSet(g)}if(!TI.sameSet(g,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(I=>I.type.name)}`);this.content.forEach(I=>I.check())}toJSON(){let g={type:this.type.name};for(let I in this.attrs){g.attrs=this.attrs;break}return this.content.size&&(g.content=this.content.toJSON()),this.marks.length&&(g.marks=this.marks.map(I=>I.toJSON())),g}static fromJSON(g,I){if(!I)throw new RangeError("Invalid input for Node.fromJSON");let e;if(I.marks){if(!Array.isArray(I.marks))throw new RangeError("Invalid mark data for Node.fromJSON");e=I.marks.map(g.markFromJSON)}if(I.type=="text"){if(typeof I.text!="string")throw new RangeError("Invalid text node in JSON");return g.text(I.text,e)}let t=sg.fromJSON(g,I.content),i=g.nodeType(I.type).create(I.attrs,t,e);return i.type.checkAttrs(i.attrs),i}};Ds.prototype.text=void 0;class oW extends Ds{constructor(g,I,e,t){if(super(g,I,null,t),!e)throw new RangeError("Empty text nodes are not allowed");this.text=e}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):R9(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(g,I){return this.text.slice(g,I)}get nodeSize(){return this.text.length}mark(g){return g==this.marks?this:new oW(this.type,this.attrs,this.text,g)}withText(g){return g==this.text?this:new oW(this.type,this.attrs,g,this.marks)}cut(g=0,I=this.text.length){return g==0&&I==this.text.length?this:this.withText(this.text.slice(g,I))}eq(g){return this.sameMarkup(g)&&this.text==g.text}toJSON(){let g=super.toJSON();return g.text=this.text,g}}function R9(C,g){for(let I=C.length-1;I>=0;I--)g=C[I].type.name+"("+g+")";return g}class Da{constructor(g){this.validEnd=g,this.next=[],this.wrapCache=[]}static parse(g,I){let e=new JQg(g,I);if(e.next==null)return Da.empty;let t=X9(e);e.next&&e.err("Unexpected trailing text");let i=QQg(OQg(t));return UQg(i,e),i}matchType(g){for(let I=0;I<this.next.length;I++)if(this.next[I].type==g)return this.next[I].next;return null}matchFragment(g,I=0,e=g.childCount){let t=this;for(let i=I;t&&i<e;i++)t=t.matchType(g.child(i).type);return t}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let g=0;g<this.next.length;g++){let{type:I}=this.next[g];if(!(I.isText||I.hasRequiredAttrs()))return I}return null}compatible(g){for(let I=0;I<this.next.length;I++)for(let e=0;e<g.next.length;e++)if(this.next[I].type==g.next[e].type)return!0;return!1}fillBefore(g,I=!1,e=0){let t=[this];function i(A,n){let l=A.matchFragment(g,e);if(l&&(!I||l.validEnd))return sg.from(n.map(o=>o.createAndFill()));for(let o=0;o<A.next.length;o++){let{type:a,next:d}=A.next[o];if(!(a.isText||a.hasRequiredAttrs())&&t.indexOf(d)==-1){t.push(d);let m=i(d,n.concat(a));if(m)return m}}return null}return i(this,[])}findWrapping(g){for(let e=0;e<this.wrapCache.length;e+=2)if(this.wrapCache[e]==g)return this.wrapCache[e+1];let I=this.computeWrapping(g);return this.wrapCache.push(g,I),I}computeWrapping(g){let I=Object.create(null),e=[{match:this,type:null,via:null}];for(;e.length;){let t=e.shift(),i=t.match;if(i.matchType(g)){let A=[];for(let n=t;n.type;n=n.via)A.push(n.type);return A.reverse()}for(let A=0;A<i.next.length;A++){let{type:n,next:l}=i.next[A];!n.isLeaf&&!n.hasRequiredAttrs()&&!(n.name in I)&&(!t.type||l.validEnd)&&(e.push({match:n.contentMatch,type:n,via:t}),I[n.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(g){if(g>=this.next.length)throw new RangeError(`There's no ${g}th edge in this content match`);return this.next[g]}toString(){let g=[];function I(e){g.push(e);for(let t=0;t<e.next.length;t++)g.indexOf(e.next[t].next)==-1&&I(e.next[t].next)}return I(this),g.map((e,t)=>{let i=t+(e.validEnd?"*":" ")+" ";for(let A=0;A<e.next.length;A++)i+=(A?", ":"")+e.next[A].type.name+"->"+g.indexOf(e.next[A].next);return i}).join(`
|
|
1372
|
+
calc(50% + 50% * cos(${t-90}deg)) 100%, calc(50% + 50% * cos(${t-90}deg)) calc(50% + 50% * sin(${t-90}deg)), 50% 50%)`;if(e<=100)return`polygon(50% 50%, 50% 0%, 100% 0%, 100% 100%,0% 100%, 0% calc(50% + 50% * sin(${t-90}deg)), 50% 50%)`};return(e,t)=>g.percent<100?(s.openBlock(),s.createElementBlock("div",{key:0,class:"pie-chart","data-testid":`${g.dataTestid}-PieChart`},[s.createElementVNode("div",{class:"pie-chart-border",style:s.normalizeStyle({"border-color":g.percent<50?"var(--error-light-color)":"var(--orange-color)"}),"data-testid":`${g.dataTestid}-PieChart-Border`},[s.createElementVNode("div",{class:"sector",style:s.normalizeStyle({clipPath:I(),"background-color":g.percent<50?"var(--error-light-color)":"var(--orange-color)"}),"data-testid":`${g.dataTestid}-PieChart-Sector`},null,12,qOg)],12,$Og)],8,_Og)):(s.openBlock(),s.createElementBlock("svg",{key:1,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","data-testid":`${g.dataTestid}-Icon`,xmlns:"http://www.w3.org/2000/svg"},[...t[0]||(t[0]=[s.createElementVNode("path",{d:"M8 1C4.136 1 1 4.136 1 8C1 11.864 4.136 15 8 15C11.864 15 15 11.864 15 8C15 4.136 11.864 1 8 1ZM8 13.6C4.906 13.6 2.4 11.094 2.4 8C2.4 4.906 4.906 2.4 8 2.4C11.094 2.4 13.6 4.906 13.6 8C13.6 11.094 11.094 13.6 8 13.6Z",fill:"#3BC648"},null,-1),s.createElementVNode("circle",{cx:"8",cy:"8",r:"4",transform:"rotate(-180 8 8)",fill:"#3BC648"},null,-1),s.createElementVNode("path",{d:"M10 6L7.5 9.83935L6 8.5",stroke:"white","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])],8,gQg))}}),[["__scopeId","data-v-393c7314"]]),IQg=["colspan","rowspan","data-testid"],ar=yg(s.defineComponent({name:"TableTh",__name:"TableTh",props:{colspan:{default:1},rowspan:{default:1},dataTestid:{default:"DataHeader"}},setup(C){const g=C;return(I,e)=>(s.openBlock(),s.createElementBlock("th",{colspan:C.colspan,rowspan:C.rowspan,"data-testid":g.dataTestid,class:"table-th"},[s.renderSlot(I.$slots,"default",{},void 0,!0)],8,IQg))}}),[["__scopeId","data-v-0411515d"]]),CQg=["data-testid"],Uh=yg(s.defineComponent({name:"HeadTableRow",__name:"HeadTableRow",props:{dataTestid:{default:"TableRow"}},setup(C){const g=C;return(I,e)=>(s.openBlock(),s.createElementBlock("tr",{class:"head-table-row","data-testid":g.dataTestid},[s.renderSlot(I.$slots,"default",{},void 0,!0)],8,CQg))}}),[["__scopeId","data-v-1c6483fb"]]),Z9=(C,g,I,e)=>{const t=s.ref(!1),i=s.ref(100);let A=0,n=0;const l=s.computed(()=>[{"scroll-wrapper__track_hide":i.value===100,"scroll-wrapper__track_drag":t.value}]),o=s.computed(()=>i.value<100),a=()=>{if(C.value){const G=C.value.clientWidth,B=C.value.scrollWidth;return G>=B?100:G/B*100}return 100},d=()=>{if(!C.value||!g.value||!I.value||!e.value)return;const{scrollLeft:G,scrollWidth:B,clientWidth:p}=C.value,y=B-p;if(y<=0)return;const Y=G/y,R=e.value.clientWidth,V=I.value.clientWidth,H=R-V,z=Y*H;requestAnimationFrame(()=>{g.value&&YI({"--scroll-bar-left-position":`${z}px`},g.value)})},m=G=>{!C.value||!g.value||(t.value=!0,A=G.clientX,n=C.value.scrollLeft,document.addEventListener("pointermove",u),document.addEventListener("pointerup",b,!0))},u=G=>{if(t.value&&C.value&&I.value){const B=G.clientX-A,p=(C.value.scrollWidth-C.value.clientWidth)/(C.value.clientWidth-I.value.clientWidth);C.value.scrollLeft=n+B*p,d()}},b=()=>{t.value=!1,document.removeEventListener("pointermove",u),document.removeEventListener("pointerup",b,!0)};return{onDrag:u,onTrackClick:G=>{if(C.value&&I.value){const B=G.currentTarget.getBoundingClientRect(),p=G.clientX-B.left,y=I.value.clientWidth,Y=B.width;let R=(p-y/2)*((C.value.scrollWidth-C.value.clientWidth)/(Y-y));R=Math.max(0,Math.min(R,C.value.scrollWidth-C.value.clientWidth)),C.value.scrollLeft=R,d()}},startDrag:m,getPercentHorizontalView:a,changeBarPosition:d,isDragging:t,scrollHorizontalWidthPercent:i,setHorizontalBarWidth:()=>{if(!C.value||!g.value)return;const G=a();i.value=G,YI({"--scroll-horizontal-bar-width":`${G}%`},g.value)},horizontalTrackClass:l,isExistHorizontalTrack:o}},G9=(C,g,I,e)=>{const t=s.ref(!1),i=s.ref(100);let A=0,n=0;const l=s.computed(()=>[{"scroll-wrapper__track_hide":i.value===100,"scroll-wrapper__track_drag":t.value}]),o=s.computed(()=>i.value<100),a=()=>{if(C.value){const G=C.value.clientHeight,B=C.value.scrollHeight;if(G>=B)return 100;if(G<B)return G/B*100}return 100},d=()=>{if(!C.value||!g.value||!I.value||!e.value)return;const{scrollTop:G,scrollHeight:B,clientHeight:p}=C.value,y=B-p;if(y<=0)return;const Y=G/y,R=e.value.clientHeight,V=I.value.clientHeight,H=R-V,z=Y*H;requestAnimationFrame(()=>{g.value&&YI({"--scroll-bar-top-postion":`${z}px`},g.value)})},m=G=>{!C.value||!g.value||(t.value=!0,A=G.clientY,n=C.value.scrollTop,document.addEventListener("pointermove",u),document.addEventListener("pointerup",b))},u=G=>{if(t.value&&C.value&&I.value){const B=G.clientY-A,p=(C.value.scrollHeight-C.value.clientHeight)/(C.value.clientHeight-I.value.clientHeight);C.value.scrollTop=n+B*p,d()}},b=()=>{t.value=!1,document.removeEventListener("pointermove",u),document.removeEventListener("pointerup",b)};return{onDrag:u,onTrackClick:G=>{if(C.value&&I.value){const B=G.currentTarget.getBoundingClientRect(),p=G.clientY-B.top,y=I.value.clientHeight,Y=B.height;let R=(p-y/2)*((C.value.scrollHeight-C.value.clientHeight)/(Y-y));R=Math.max(0,Math.min(R,C.value.scrollHeight-C.value.clientHeight)),C.value.scrollTop=R,d()}},startDrag:m,getProcentVerticalView:a,changeBarPosition:d,isDragging:t,scrollVerticalHeightProcent:i,setVerticalBarHeight:()=>{if(!C.value||!g.value)return;const G=a();i.value=G,YI({"--scroll-vertical-bar-height":`${G}%`},g.value)},verticalTrackClass:l,isExistVerticalTrack:o}},eQg={class:"scroll-wrapper__vertical-wrapper"},tQg={class:"scroll-wrapper__horizont-wrapper"},Eh=yg(s.defineComponent({name:"ScrollWrapper",__name:"ScrollWrapper",props:{isShowVerticalScroll:{type:Boolean,default:!1},isShowHorizontalScroll:{type:Boolean,default:!1}},emits:["unmount-scroll","unmount-paginate","on-mounted"],setup(C,{expose:g,emit:I}){const e=I,t=s.ref(null),i=s.ref(null),A=s.ref(null),n=s.ref(null),l=s.ref(null),o=s.ref(null),{onTrackClick:a,startDrag:d,changeBarPosition:m,setVerticalBarHeight:u,verticalTrackClass:b,isExistVerticalTrack:Z}=G9(t,i,n,A),{changeBarPosition:w,startDrag:G,onTrackClick:B,setHorizontalBarWidth:p,horizontalTrackClass:y,isExistHorizontalTrack:Y}=Z9(t,i,o,l),R=Q=>{m(),w(),e("unmount-scroll",Q)},V=()=>{requestAnimationFrame(()=>{H(),z()})},H=()=>{if(!t.value||!i.value)return;const Q=getComputedStyle(i.value),$=i.value.style.minHeight||Q.minHeight,Ag=i.value.style.maxHeight||Q.maxHeight,Bg=i.value.style.height;YI({"--scroll-wrapper-height":`${Bg}`,"--scroll-wrapper-max-height":`${Ag}`,"--scroll-wrapper-min-height":`${$}`},i.value)},z=()=>{u(),p(),m(),w()},D=()=>{t.value&&t.value.addEventListener("scroll",R)},F=()=>{t.value&&(t.value.scrollTop=0)},T=()=>{t.value&&(t.value.scrollHeight<=t.value.clientHeight?e("unmount-paginate",!0):e("unmount-paginate",!1))},O=new MutationObserver(()=>{V(),T()}),q=new ResizeObserver(()=>{V(),T()}),Ig=Q=>{O.observe(Q,{childList:!0,subtree:!0,attributes:!0}),q.observe(Q)};return g({scrollToTop:F,setHeightSlot:H}),s.onMounted(()=>{V(),D(),i.value&&Ig(i.value),A.value&&Ig(A.value),window.addEventListener("resize",V),e("on-mounted")}),s.onUnmounted(()=>{window.removeEventListener("resize",V)}),(Q,$)=>(s.openBlock(),s.createElementBlock("div",{ref_key:"scrollWrapperRef",ref:i,class:"scroll-wrapper"},[s.createElementVNode("div",eQg,[s.createElementVNode("div",tQg,[s.createElementVNode("div",{ref_key:"slotRef",ref:t,class:"scroll-wrapper__slot"},[s.renderSlot(Q.$slots,"default",{},void 0,!0)],512),s.unref(Y)||C.isShowHorizontalScroll?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"horizontTrackRef",ref:l,class:s.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_horizont",s.unref(y)]),onClick:$[1]||($[1]=s.withModifiers((...Ag)=>s.unref(B)&&s.unref(B)(...Ag),["self","prevent","left"]))},[s.createElementVNode("div",{ref_key:"horizontBarRef",ref:o,class:"scroll-wrapper__bar",onPointerdown:$[0]||($[0]=s.withModifiers((...Ag)=>s.unref(G)&&s.unref(G)(...Ag),["prevent","left"]))},null,544)],2)):s.createCommentVNode("",!0)]),s.unref(Z)||C.isShowVerticalScroll?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"verticalTrackRef",ref:A,class:s.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_vertical",s.unref(b)]),onClick:$[3]||($[3]=s.withModifiers((...Ag)=>s.unref(a)&&s.unref(a)(...Ag),["self","prevent","left"]))},[s.createElementVNode("div",{ref_key:"verticalBarRef",ref:n,class:"scroll-wrapper__bar",onPointerdown:$[2]||($[2]=s.withModifiers((...Ag)=>s.unref(d)&&s.unref(d)(...Ag),["prevent","left"]))},null,544)],2)):s.createCommentVNode("",!0)])],512))}}),[["__scopeId","data-v-0368a565"]]),iQg=["id","data-testid"],AQg=["id","data-testid"],nQg=["id","data-testid"],DV=yg(s.defineComponent({name:"TableNew",__name:"Table",props:{tableId:{},search:{},tbodyId:{},theadId:{},columnCount:{},dataTestid:{default:"Table"},isShowVerticalScroll:{type:Boolean,default:!1},isShowHorizontalScroll:{type:Boolean,default:!1}},emits:["unmount-scroll","unmount-paginate"],setup(C,{expose:g,emit:I}){var p;const e=C,t=I,i=s.reactive({headHeight:0,maxColumnCount:0}),A=s.ref(null),n=s.ref(null),l=s.ref(null),o=s.ref(null),a=s.ref(null),d=y=>{t("unmount-scroll",y)},m=y=>t("unmount-paginate",y),u=()=>{if(!A.value||!a.value)return;const y=A.value.querySelector("thead");if(!y)return;const Y=y.getBoundingClientRect().height;i.headHeight=Y,YI({"--scroll-track-margin-top":`${Y}px`},a.value.$el)},b=()=>{a.value&&a.value.scrollToTop()},Z=()=>{if(a.value&&o.value){const y=getComputedStyle(a.value.$el),Y=Number(y.minHeight.replace(/\D/g,""));if(Y&&Y>0)return;YI({"min-height":`${i.headHeight+108}px`},a.value.$el)}},w=()=>{let y=1;if(n.value){for(let Y=0;Y<n.value.children.length;Y++)y=Math.max(n.value.children[Y].children.length,y);i.maxColumnCount=y}},G=new MutationObserver(()=>{w()}),B=new ResizeObserver(()=>{u()});return g({scrollToTop:b,setHeightSlot:(p=a.value)==null?void 0:p.setHeightSlot,tbodyRef:l,tableRef:A,theadRef:n}),s.onMounted(()=>{u(),w(),window.addEventListener("resize",u),A.value&&B.observe(A.value),n.value&&G.observe(n.value,{childList:!0,subtree:!0}),Z()}),(y,Y)=>(s.openBlock(),s.createBlock(Eh,{ref_key:"scrollWrapperRef",ref:a,class:"table",onUnmountScroll:d,onUnmountPaginate:m,"is-show-vertical-scroll":e.isShowVerticalScroll,"is-show-horizontal-scroll":e.isShowHorizontalScroll,"data-testid":`${e.dataTestid}-ScrollWrapper`},{default:s.withCtx(()=>[s.createElementVNode("table",{ref_key:"tableRef",ref:A,id:e.tableId,class:"table__table","data-testid":`${e.dataTestid}`},[s.renderSlot(y.$slots,"default",{},()=>{var R;return[s.createElementVNode("colgroup",null,[s.renderSlot(y.$slots,"colspan",{},void 0,!0)]),y.$slots.head?(s.openBlock(),s.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:n,id:e.theadId,class:"table__head","data-testid":`${e.dataTestid}-Thead`},[s.renderSlot(y.$slots,"head",{},void 0,!0),y.$slots.search?(s.openBlock(),s.createBlock(Uh,{key:0,class:"table__search-tr",id:(R=e.search)==null?void 0:R.rowId,ref_key:"searchRowRef",ref:o,"data-testid":`${e.dataTestid}-Search-Row`},{default:s.withCtx(()=>{var V;return[s.createVNode(ar,{colspan:e.columnCount||i.maxColumnCount,class:"table__search-th",id:(V=e.search)==null?void 0:V.headId,"data-testid":`${e.dataTestid}-SearchRow-Search`},{default:s.withCtx(()=>[s.renderSlot(y.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","id","data-testid"])]}),_:3},8,["id","data-testid"])):s.createCommentVNode("",!0)],8,AQg)):s.createCommentVNode("",!0),s.renderSlot(y.$slots,"body-group",{},()=>[y.$slots.body?(s.openBlock(),s.createElementBlock("tbody",{key:0,id:e.tbodyId,ref_key:"tbodyRef",ref:l,class:"table__body","data-testid":`${e.dataTestid}-Tbody`},[s.renderSlot(y.$slots,"body",{},void 0,!0)],8,nQg)):s.createCommentVNode("",!0)],!0)]},!0)],8,iQg)]),_:3},8,["is-show-vertical-scroll","is-show-horizontal-scroll","data-testid"]))}}),[["__scopeId","data-v-79da35b2"]]),lQg=["data-testid"],IW=yg(s.defineComponent({name:"TableRow",__name:"TableRow",props:{type:{default:"default"},dataTestid:{}},setup(C){const g=C,I=s.computed(()=>[{"table-row_active":g.type==="selected"}]);return(e,t)=>(s.openBlock(),s.createElementBlock("tr",{class:s.normalizeClass(["table-row",I.value]),"data-testid":g.dataTestid},[s.renderSlot(e.$slots,"default",{},void 0,!0)],10,lQg))}}),[["__scopeId","data-v-19e6cf9d"]]),sQg=["rowspan","colspan","data-testid"],CW=s.defineComponent({name:"TableTd",__name:"TableTd",props:{colspan:{default:1},rowspan:{default:1},dataTestid:{default:"DataCell"}},setup(C){const g=C;return(I,e)=>(s.openBlock(),s.createElementBlock("td",{rowspan:C.rowspan,colspan:C.colspan,class:"table-td","data-testid":g.dataTestid},[s.renderSlot(I.$slots,"default")],8,sQg))}}),SV=yg(s.defineComponent({name:"SectionTableRow",__name:"SectionTableRow",props:{colspan:{},dataTestid:{default:"SectionTableRow"}},setup(C){const g=C;return(I,e)=>(s.openBlock(),s.createBlock(IW,{class:"section-table-row","data-testid":g.dataTestid},{default:s.withCtx(()=>[s.createVNode(CW,{colspan:C.colspan,class:"section-table-row__td","data-testid":`${g.dataTestid}-DataCell`},{default:s.withCtx(()=>[s.renderSlot(I.$slots,"default",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"]))}}),[["__scopeId","data-v-35b23188"]]),oQg=["disabled","name","value","data-testid"],KV=yg(s.defineComponent({name:"Radio",__name:"Radio",props:s.mergeModels({name:{},value:{},disabled:{type:Boolean,default:!1},dataTestid:{default:"Radio"}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(C){const g=C,I=s.useModel(C,"modelValue");return(e,t)=>s.withDirectives((s.openBlock(),s.createElementBlock("input",{"onUpdate:modelValue":t[0]||(t[0]=i=>I.value=i),type:"radio",disabled:C.disabled,name:C.name,value:C.value,class:"radio","data-testid":g.dataTestid},null,8,oQg)),[[s.vModelRadio,I.value]])}}),[["__scopeId","data-v-3db64c64"]]),aQg=["data-testid"],dQg=["data-testid"],w9=yg(s.defineComponent({name:"ChoosenMiniOptions",__name:"ChoosenMiniOptions",props:{options:{},dataTestid:{default:"ChoosenMiniOptions"}},emits:["remove"],setup(C,{emit:g}){const I=C,e=g,t=i=>{e("remove",i)};return(i,A)=>(s.openBlock(),s.createElementBlock("div",{class:"choosen-mini-options","data-testid":I.dataTestid},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(C.options,(n,l)=>(s.openBlock(),s.createElementBlock("div",{key:n.key,class:"choosen-mini-options__option","data-testid":`${I.dataTestid}-Option-Item${l}`},[s.createVNode(ke,{"data-testid":`${I.dataTestid}-Badge${l}`,type:s.unref(GI).blue,text:s.unref(Ky)(n)?n.hint:n.value,class:"choosen-mini-options__badges",disabled:""},null,8,["data-testid","type","text"]),s.createVNode(Ng,{"data-testid":`${I.dataTestid}-Icon${l}`,name:s.unref(dg).crossLarge,width:10,height:10,class:"choosen-mini-options__cross",onClick:o=>t(n.key)},null,8,["data-testid","name","onClick"])],8,dQg))),128))],8,aQg))}}),[["__scopeId","data-v-03762d05"]]),cQg=["data-testid"],rQg=["data-testid"],mQg=["data-testid"],uQg=["data-testid"],hQg=["data-testid"],bQg=["data-testid"],kV=yg(s.defineComponent({name:"BaseFilter",__name:"BaseFilter",props:s.mergeModels({options:{},title:{},isSearch:{type:Boolean,default:!1},isPosibleToClear:{type:Boolean,default:!1},isShowMiniOptions:{type:Boolean,default:!1},isUseAnchor:{type:Boolean,default:!1},isOpened:{type:Boolean,default:!1},tooltipPosition:{default:"top-center"},disabled:{type:Boolean,default:!1},onUnmountPagination:{},defaultOption:{default:"Выберите значение"},class:{},dataTestid:{default:"BaseFilter"}},{modelValue:{},modelModifiers:{}}),emits:s.mergeModels(["change","unmount-open","unmount-search","unmount-search-enter","unmount-pagination"],["update:modelValue"]),setup(C,{emit:g}){const I=C,e=s.reactive({isHovered:!1}),t=g,i=s.ref(null),A=s.ref(null),n=s.useModel(C,"modelValue"),l=s.ref(I.isOpened),o=s.computed(()=>[{filter_disabled:I.disabled},I.class]);s.watch(l,()=>{t("unmount-open",l.value),a.value=""}),s.watch(()=>I.isOpened,()=>{if(I.disabled){l.value=!1;return}l.value=I.isOpened}),s.watch(()=>I.onUnmountPagination,()=>{D()});const a=s.ref(""),d=s.computed(()=>{let F=[];return a.value?(zu(I.options)?F=I.options.filter(T=>{var O;return T.value.toLowerCase().includes(a.value.toLowerCase())||((O=T==null?void 0:T.hint)==null?void 0:O.toLowerCase().includes(a.value.toLowerCase()))}):F=I.options.filter(T=>T.value.toLowerCase().includes(a.value.toLowerCase())),F):(zu(I.options),F=I.options,F)}),m=s.computed(()=>{var T;return((T=I.options.find(O=>ln.isArray(n.value)?n.value.includes(O.key):O.key===String(n.value)))==null?void 0:T.value)||I.defaultOption}),u=s.computed(()=>I.options.filter(F=>ln.isArray(n.value)?n.value.includes(F.key)&&F.value!==m.value:F.key===String(n.value))),b=s.computed(()=>I.options.filter(F=>ln.isArray(n.value)?n.value.includes(F.key)&&F.value===m.value:F.key===String(n.value))),Z=s.computed(()=>{var O,q,Ig;const F=I.options;let T;return ln.isArray(n.value)?zu(F)?T=(O=F.find(Q=>Q.value===m.value))==null?void 0:O.hint:T=(q=F.find(Q=>Q.value===m.value))==null?void 0:q.value:T=(Ig=F.find(Q=>Q.key===String(n.value)))==null?void 0:Ig.value,T||""}),w=()=>{e.isHovered=!0},G=()=>{e.isHovered=!1},B=s.computed(()=>{var F;return zu(I.options)?e.isHovered&&!!Z.value:((F=i.value)==null?void 0:F.isSpanOverflow)||!1}),p=s.computed(()=>ln.isArray(n.value)?I.isPosibleToClear&&n.value.length>0:I.isPosibleToClear&&n.value),y=s.computed(()=>ln.isArray(n.value)&&n.value.length>1),Y=s.computed(()=>ln.isArray(n.value)?n.value.length:null),R=async F=>{if(I.disabled){l.value=!1;return}if(ln.isArray(n.value))n.value.includes(F)?n.value=n.value.filter(T=>T!==F):n.value=[...n.value,F];else{let T=I.options.find(O=>O.key===F);!T&&zu(I.options)&&(T=I.options.find(O=>O.hint===F)),n.value=(T==null?void 0:T.key)||"",l.value=!1}await s.nextTick(),t("change",String(n.value))},V=F=>{if(I.disabled){l.value=!1;return}l.value=F},H=async()=>{I.disabled||(ln.isArray(n.value)?n.value=[]:n.value="",await s.nextTick(),t("change",n.value))},z=new IntersectionObserver(F=>{F.forEach(T=>{T.isIntersecting&&t("unmount-pagination")})}),D=()=>{A.value&&I.onUnmountPagination&&(z.unobserve(A.value),z.observe(A.value))};return s.onMounted(()=>{D()}),s.onUnmounted(()=>{z.disconnect()}),(F,T)=>(s.openBlock(),s.createBlock(Mc,{"header-classes":"filter__header","options-classes":"filter__options","is-opened":l.value,class:s.normalizeClass(["filter",o.value]),"is-use-anchor":C.isUseAnchor,"data-testid":I.dataTestid,disabled:C.disabled,onChange:V},s.createSlots({header:s.withCtx(()=>[s.renderSlot(F.$slots,"header",{},()=>[s.createElementVNode("span",{class:s.normalizeClass(["filter__header-title",{"filter__header-title__active":l.value}]),"data-testid":`${I.dataTestid}-Title`},s.toDisplayString(C.title),11,cQg),s.createVNode(Qh,{position:C.tooltipPosition,type:"blue","is-can-show":B.value&&!(y.value&&C.isShowMiniOptions),hint:Z.value,"hint-gap":28,class:"filter__header-tooltip","data-testid":`${I.dataTestid}-Tooltip`},{default:s.withCtx(()=>[s.createVNode(ke,{ref_key:"badgesRef",ref:i,type:C.disabled?s.unref(GI).disabled:m.value===I.defaultOption?s.unref(GI).default:s.unref(GI).blue,class:"filter__options-badge","data-testid":`${I.dataTestid}-Badge`,text:m.value,onMouseenter:w,onMouseleave:G,disabled:""},null,8,["type","data-testid","text"]),y.value&&C.isShowMiniOptions?(s.openBlock(),s.createElementBlock("div",{key:0,class:"filter__values","data-testid":`${I.dataTestid}-Filter-Value`},[s.createVNode(w9,{"data-testid":`${I.dataTestid}-Filter-Value-MiniOptions`,onClick:T[0]||(T[0]=s.withModifiers(()=>{},["stop"])),options:b.value,onRemove:R},null,8,["data-testid","options"])],8,rQg)):s.createCommentVNode("",!0)]),_:1},8,["position","is-can-show","hint","data-testid"]),Y.value&&Y.value>1?(s.openBlock(),s.createElementBlock("span",{key:0,class:"filter__count","data-testid":`${I.dataTestid}-Filter-Count`},[s.createTextVNode(" +"+s.toDisplayString(Y.value-1)+" ",1),y.value?(s.openBlock(),s.createElementBlock("div",{key:0,class:"filter__values","data-testid":`${I.dataTestid}-Filter-Values`},[s.createVNode(w9,{onClick:T[1]||(T[1]=s.withModifiers(()=>{},["stop"])),options:u.value,onRemove:R,"data-testid":`${I.dataTestid}-MiniOptions`},null,8,["options","data-testid"])],8,uQg)):s.createCommentVNode("",!0)],8,mQg)):s.createCommentVNode("",!0),p.value?(s.openBlock(),s.createElementBlock("span",{key:1,class:"filter__cross",onClick:s.withModifiers(H,["stop"]),"data-testid":`${I.dataTestid}-Filter-Cross`},[s.createVNode(Ng,{name:s.unref(dg).crossLarge,width:16,height:16},null,8,["name"])],8,hQg)):s.createCommentVNode("",!0)],!0)]),options:s.withCtx(()=>[C.isSearch?(s.openBlock(),s.createBlock(uh,{key:0,modelValue:a.value,"onUpdate:modelValue":T[2]||(T[2]=O=>a.value=O),"show-history":!1,"data-testid":`${I.dataTestid}-Search`,onInput:T[3]||(T[3]=O=>F.$emit("unmount-search",O)),onEnter:T[4]||(T[4]=O=>F.$emit("unmount-search-enter",O))},null,8,["modelValue","data-testid"])):s.createCommentVNode("",!0),s.createVNode(ky,{"data-testid":`${I.dataTestid}-Options`,class:"filter__options-option",options:d.value,"default-option":m.value,onChange:R},{default:s.withCtx(()=>[s.createElementVNode("li",{class:"filter__options-underline","data-testid":`${I.dataTestid}-Underline`},[...T[5]||(T[5]=[s.createElementVNode("hr",{class:"filter__options-underline-hr"},null,-1)])],8,bQg)]),_:1},8,["data-testid","options","default-option"]),s.withDirectives(s.createElementVNode("div",{ref_key:"lastOptionRef",ref:A,class:"filter__last-option"},null,512),[[s.vShow,C.onUnmountPagination]])]),_:2},[F.$slots.body?{name:"body",fn:s.withCtx(O=>[s.renderSlot(F.$slots,"body",{closeOpenList:O.closeOpenList},void 0,!0)]),key:"0"}:void 0]),1032,["is-opened","class","is-use-anchor","data-testid","disabled"]))}}),[["__scopeId","data-v-5cb00a14"]]),ZQg=["data-testid"],eW=yg(s.defineComponent({name:"Range",__name:"Range",props:s.mergeModels({min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1},dataTestid:{default:"Range"}},{modelValue:{default:0},modelModifiers:{}}),emits:s.mergeModels(["unmount-change","unmount-input"],["update:modelValue"]),setup(C,{emit:g}){const I=C,e=g,t=s.useModel(C,"modelValue"),i=s.ref(null);s.watch(t,()=>{n()});const A=()=>(t.value-I.min)/(I.max-I.min)*100,n=()=>{requestAnimationFrame(()=>{i.value&&YI({"--progress":A()+"%"},i.value)})},l=a=>{const d=a.target;d&&e("unmount-change",Number(d.value))},o=a=>{const d=a.target;d&&e("unmount-change",Number(d.value))};return s.onMounted(()=>{n()}),(a,d)=>s.withDirectives((s.openBlock(),s.createElementBlock("input",s.mergeProps({ref_key:"input",ref:i,type:"range"},I,{class:"range","onUpdate:modelValue":d[0]||(d[0]=m=>t.value=m),onChange:l,onInput:o,"data-testid":I.dataTestid}),null,16,ZQg)),[[s.vModelText,t.value]])}}),[["__scopeId","data-v-50ada1b8"]]),GQg=["id","data-testid"],wQg=["data-testid"],WQg=["data-testid"],FV=yg(s.defineComponent({name:"TableNew",__name:"TableNew",props:{tableId:{},search:{},tbodyId:{},theadId:{},columnCount:{},dataTestid:{default:"Table"},isShowVerticalScroll:{type:Boolean,default:!1},isShowHorizontalScroll:{type:Boolean,default:!1}},emits:["unmount-scroll","unmount-paginate"],setup(C,{expose:g,emit:I}){var B;const e=C,t=I,i=s.reactive({headHeight:0,maxColumnCount:0}),A=s.ref(null),n=s.ref(null),l=s.ref(null),o=s.ref(null),a=s.ref(null),d=p=>{t("unmount-scroll",p)},m=()=>{if(!A.value||!a.value)return;const p=A.value.querySelector("thead");if(!p)return;const y=p.getBoundingClientRect().height;i.headHeight=y,YI({"--scroll-track-margin-top":`${y}px`},a.value.$el)},u=()=>{a.value&&a.value.scrollToTop()},b=()=>{if(a.value&&o.value){const p=getComputedStyle(a.value.$el),y=Number(p.minHeight.replace(/\D/g,""));if(y&&y>0)return;YI({"min-height":`${i.headHeight+108}px`},a.value.$el)}},Z=()=>{let p=1;if(n.value){for(let y=0;y<n.value.children.length;y++)p=Math.max(n.value.children[y].children.length,p);i.maxColumnCount=p}},w=new MutationObserver(()=>{Z()}),G=new ResizeObserver(()=>{m()});return g({scrollToTop:u,setHeightSlot:(B=a.value)==null?void 0:B.setHeightSlot,tbodyRef:l,tableRef:A,theadRef:n}),s.onMounted(()=>{m(),Z(),window.addEventListener("resize",m),A.value&&G.observe(A.value),n.value&&w.observe(n.value,{childList:!0,subtree:!0}),b()}),(p,y)=>(s.openBlock(),s.createBlock(Eh,{ref_key:"scrollWrapperRef",ref:a,class:"table",onUnmountScroll:d,"is-show-vertical-scroll":e.isShowVerticalScroll,"is-show-horizontal-scroll":e.isShowHorizontalScroll,"data-testid":`${e.dataTestid}-ScrollWrapper`},{default:s.withCtx(()=>[s.createElementVNode("table",{ref_key:"tableRef",ref:A,id:e.tableId,class:"table__table","data-testid":`${e.dataTestid}`},[s.renderSlot(p.$slots,"default",{},()=>[s.createElementVNode("colgroup",null,[s.renderSlot(p.$slots,"colspan",{},void 0,!0)]),p.$slots.head?(s.openBlock(),s.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:n,class:"table__head","data-testid":`${e.dataTestid}-Thead`},[s.renderSlot(p.$slots,"head",{},void 0,!0),p.$slots.search?(s.openBlock(),s.createBlock(Uh,{key:0,class:"table__search-tr",ref_key:"searchRowRef",ref:o,"data-testid":`${e.dataTestid}-Search-Row`},{default:s.withCtx(()=>[s.createVNode(ar,{colspan:i.maxColumnCount,class:"table__search-th","data-testid":`${e.dataTestid}-SearchRow-Search`},{default:s.withCtx(()=>[s.renderSlot(p.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"])):s.createCommentVNode("",!0)],8,wQg)):s.createCommentVNode("",!0),s.renderSlot(p.$slots,"body-group",{},()=>[p.$slots.body?(s.openBlock(),s.createElementBlock("tbody",{key:0,ref_key:"tbodyRef",ref:l,class:"table__body","data-testid":`${e.dataTestid}-Tbody`},[s.renderSlot(p.$slots,"body",{},void 0,!0)],8,WQg)):s.createCommentVNode("",!0)],!0)],!0)],8,GQg)]),_:3},8,["is-show-vertical-scroll","is-show-horizontal-scroll","data-testid"]))}}),[["__scopeId","data-v-30a389ed"]]),BQg=["data-testid"],zV=yg(s.defineComponent({name:"TableRow",__name:"TableRowNew",props:{type:{default:"default"},dataTestid:{}},setup(C){const g=C,I=s.computed(()=>[{"table-row_active":g.type==="selected"}]);return(e,t)=>(s.openBlock(),s.createElementBlock("tr",{class:s.normalizeClass(["table-row",I.value]),"data-testid":g.dataTestid},[s.renderSlot(e.$slots,"default",{},void 0,!0)],10,BQg))}}),[["__scopeId","data-v-c22d3f55"]]),pQg=["data-testid"],tW=yg(s.defineComponent({name:"HeadTableRow",__name:"HeadTableRowNew",props:{dataTestid:{default:"TableRow"}},setup(C){const g=C;return(I,e)=>(s.openBlock(),s.createElementBlock("tr",{class:"head-table-row","data-testid":g.dataTestid},[s.renderSlot(I.$slots,"default",{},void 0,!0)],8,pQg))}}),[["__scopeId","data-v-45b56a2a"]]),yQg={class:"scroll-wrapper__vertical-wrapper"},YQg={class:"scroll-wrapper__horizont-wrapper"},VQg=yg(s.defineComponent({name:"ScrollWrapper",__name:"ScrollWrapperNew",props:{isShowVerticalScroll:{type:Boolean,default:!1},isShowHorizontalScroll:{type:Boolean,default:!1}},emits:["unmount-scroll","unmount-paginate","on-mounted"],setup(C,{expose:g,emit:I}){const e=I,t=s.ref(null),i=s.ref(null),A=s.ref(null),n=s.ref(null),l=s.ref(null),o=s.ref(null),{onTrackClick:a,startDrag:d,changeBarPosition:m,setVerticalBarHeight:u,verticalTrackClass:b,isExistVerticalTrack:Z}=G9(t,i,n,A),{changeBarPosition:w,startDrag:G,onTrackClick:B,setHorizontalBarWidth:p,horizontalTrackClass:y,isExistHorizontalTrack:Y}=Z9(t,i,o,l),R=Ig=>{m(),w(),e("unmount-scroll",Ig)},V=()=>{requestAnimationFrame(()=>{H(),z()})},H=()=>{if(!t.value||!i.value)return;const Ig=getComputedStyle(i.value),Q=i.value.style.minHeight||Ig.minHeight,$=i.value.style.maxHeight||Ig.maxHeight,Ag=i.value.style.height;YI({"--scroll-wrapper-height":`${Ag}`,"--scroll-wrapper-max-height":`${$}`,"--scroll-wrapper-min-height":`${Q}`},i.value)},z=()=>{u(),p(),m(),w()},D=()=>{t.value&&t.value.addEventListener("scroll",R)},F=()=>{t.value&&(t.value.scrollTop=0)},T=new MutationObserver(()=>{V()}),O=new ResizeObserver(()=>{V()}),q=Ig=>{T.observe(Ig,{childList:!0,subtree:!0,attributes:!0}),O.observe(Ig)};return g({scrollToTop:F,setHeightSlot:H}),s.onMounted(()=>{V(),D(),i.value&&q(i.value),A.value&&q(A.value),window.addEventListener("resize",V),e("on-mounted")}),s.onUnmounted(()=>{window.removeEventListener("resize",V)}),(Ig,Q)=>(s.openBlock(),s.createElementBlock("div",{ref_key:"scrollWrapperRef",ref:i,class:"scroll-wrapper"},[s.createElementVNode("div",yQg,[s.createElementVNode("div",YQg,[s.createElementVNode("div",{ref_key:"slotRef",ref:t,class:"scroll-wrapper__slot"},[s.renderSlot(Ig.$slots,"default",{},void 0,!0)],512),s.unref(Y)||C.isShowHorizontalScroll?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"horizontTrackRef",ref:l,class:s.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_horizont",s.unref(y)]),onClick:Q[1]||(Q[1]=s.withModifiers((...$)=>s.unref(B)&&s.unref(B)(...$),["prevent","left"]))},[s.createElementVNode("div",{ref_key:"horizontBarRef",ref:o,class:"scroll-wrapper__bar",onMousedown:Q[0]||(Q[0]=s.withModifiers((...$)=>s.unref(G)&&s.unref(G)(...$),["prevent","left"]))},null,544)],2)):s.createCommentVNode("",!0)]),s.unref(Z)||C.isShowVerticalScroll?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"verticalTrackRef",ref:A,class:s.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_vertical",s.unref(b)]),onClick:Q[3]||(Q[3]=s.withModifiers((...$)=>s.unref(a)&&s.unref(a)(...$),["prevent","left"]))},[s.createElementVNode("div",{ref_key:"verticalBarRef",ref:n,class:"scroll-wrapper__bar",onMousedown:Q[2]||(Q[2]=s.withModifiers((...$)=>s.unref(d)&&s.unref(d)(...$),["prevent","left"]))},null,544)],2)):s.createCommentVNode("",!0)])],512))}}),[["__scopeId","data-v-411a6b7a"]]),NQg=["data-testid"],MQg=["data-testid"],RQg=["data-testid"],JV=yg(s.defineComponent({name:"TableSimple",__name:"TableSimple",props:{dataTestid:{default:"TableSimple"}},setup(C,{expose:g}){const I=C,e=s.ref(null),t=s.ref(null),i=s.ref(null),A=s.ref(null),n=s.computed(()=>{let l=1;if(t.value)for(let o=0;o<t.value.children.length;o++)l=Math.max(t.value.children[o].children.length,l);return l});return g({tbodyRef:i,tableRef:e,theadRef:t}),(l,o)=>(s.openBlock(),s.createElementBlock("table",{ref_key:"tableRef",ref:e,class:"simple-table-yui-kit","data-testid":`${I.dataTestid}`},[s.renderSlot(l.$slots,"default",{},()=>[s.renderSlot(l.$slots,"colspan",{},void 0,!0),l.$slots.head?(s.openBlock(),s.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:t,class:"simple-table-yui-kit__head","data-testid":`${I.dataTestid}-Thead`},[s.renderSlot(l.$slots,"head",{},void 0,!0),l.$slots.search?(s.openBlock(),s.createBlock(tW,{key:0,class:"table-new-yui-kit__search",ref_key:"searchRowRef",ref:A,"data-testid":`${I.dataTestid}-Search-Row`},{default:s.withCtx(()=>[s.createVNode(ar,{colspan:n.value,class:"table-new-yui-kit__th","data-testid":`${I.dataTestid}-SearchRow-Search`},{default:s.withCtx(()=>[s.renderSlot(l.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"])):s.createCommentVNode("",!0)],8,MQg)):s.createCommentVNode("",!0),s.renderSlot(l.$slots,"body-group",{},()=>[l.$slots.body?(s.openBlock(),s.createElementBlock("tbody",{key:0,ref_key:"tbodyRef",ref:i,class:"simple-table-yui-kit__body","data-testid":`${I.dataTestid}-Tbody`},[s.renderSlot(l.$slots,"body",{},void 0,!0)],8,RQg)):s.createCommentVNode("",!0)],!0)],!0)],8,NQg))}}),[["__scopeId","data-v-eaeafe5b"]]),XQg=["data-testid"],HQg=["data-testid"],fQg=["onClick","data-testid"],DQg=["data-testid"],LV=yg(s.defineComponent({name:"Tabs",__name:"Tabs",props:{defaultActiveTabId:{},tabCount:{},dataTestid:{default:"Tabs"}},emits:["unmount-tab"],setup(C,{emit:g}){const I=C,e=g,t=s.reactive({activeTab:1}),i=n=>Array.from({length:n},(l,o)=>o+1);s.watch(()=>I.defaultActiveTabId,()=>{I.defaultActiveTabId&&(t.activeTab=I.defaultActiveTabId)},{immediate:!0});const A=n=>{t.activeTab=n,e("unmount-tab",n)};return(n,l)=>(s.openBlock(),s.createElementBlock("div",{"data-testid":I.dataTestid,class:"tabs"},[s.createElementVNode("nav",{class:"tabs__navigation","data-testid":`${I.dataTestid}-Navigation`},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i(I.tabCount),o=>(s.openBlock(),s.createElementBlock("button",{key:o,onClick:a=>A(o),class:s.normalizeClass(["tabs__navigation-button",{active:t.activeTab===o}]),"data-testid":`${I.dataTestid}-Navigation-Button`},[s.renderSlot(n.$slots,`header${o}`,{},void 0,!0)],10,fQg))),128))],8,HQg),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i(I.tabCount),o=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:o},[t.activeTab===o?(s.openBlock(),s.createElementBlock("article",{key:0,"data-testid":`${I.dataTestid}-Content`,class:"tabs__navigation-content"},[s.renderSlot(n.$slots,`tab${o}`,{},void 0,!0)],8,DQg)):s.createCommentVNode("",!0)],64))),128))],8,XQg))}}),[["__scopeId","data-v-9a94dd67"]]);function pe(C){this.content=C}pe.prototype={constructor:pe,find:function(C){for(var g=0;g<this.content.length;g+=2)if(this.content[g]===C)return g;return-1},get:function(C){var g=this.find(C);return g==-1?void 0:this.content[g+1]},update:function(C,g,I){var e=I&&I!=C?this.remove(I):this,t=e.find(C),i=e.content.slice();return t==-1?i.push(I||C,g):(i[t+1]=g,I&&(i[t]=I)),new pe(i)},remove:function(C){var g=this.find(C);if(g==-1)return this;var I=this.content.slice();return I.splice(g,2),new pe(I)},addToStart:function(C,g){return new pe([C,g].concat(this.remove(C).content))},addToEnd:function(C,g){var I=this.remove(C).content.slice();return I.push(C,g),new pe(I)},addBefore:function(C,g,I){var e=this.remove(g),t=e.content.slice(),i=e.find(C);return t.splice(i==-1?t.length:i,0,g,I),new pe(t)},forEach:function(C){for(var g=0;g<this.content.length;g+=2)C(this.content[g],this.content[g+1])},prepend:function(C){return C=pe.from(C),C.size?new pe(C.content.concat(this.subtract(C).content)):this},append:function(C){return C=pe.from(C),C.size?new pe(this.subtract(C).content.concat(C.content)):this},subtract:function(C){var g=this;C=pe.from(C);for(var I=0;I<C.content.length;I+=2)g=g.remove(C.content[I]);return g},toObject:function(){var C={};return this.forEach(function(g,I){C[g]=I}),C},get size(){return this.content.length>>1}},pe.from=function(C){if(C instanceof pe)return C;var g=[];if(C)for(var I in C)g.push(I,C[I]);return new pe(g)};function W9(C,g,I){for(let e=0;;e++){if(e==C.childCount||e==g.childCount)return C.childCount==g.childCount?null:I;let t=C.child(e),i=g.child(e);if(t==i){I+=t.nodeSize;continue}if(!t.sameMarkup(i))return I;if(t.isText&&t.text!=i.text){for(let A=0;t.text[A]==i.text[A];A++)I++;return I}if(t.content.size||i.content.size){let A=W9(t.content,i.content,I+1);if(A!=null)return A}I+=t.nodeSize}}function B9(C,g,I,e){for(let t=C.childCount,i=g.childCount;;){if(t==0||i==0)return t==i?null:{a:I,b:e};let A=C.child(--t),n=g.child(--i),l=A.nodeSize;if(A==n){I-=l,e-=l;continue}if(!A.sameMarkup(n))return{a:I,b:e};if(A.isText&&A.text!=n.text){let o=0,a=Math.min(A.text.length,n.text.length);for(;o<a&&A.text[A.text.length-o-1]==n.text[n.text.length-o-1];)o++,I--,e--;return{a:I,b:e}}if(A.content.size||n.content.size){let o=B9(A.content,n.content,I-1,e-1);if(o)return o}I-=l,e-=l}}class sg{constructor(g,I){if(this.content=g,this.size=I||0,I==null)for(let e=0;e<g.length;e++)this.size+=g[e].nodeSize}nodesBetween(g,I,e,t=0,i){for(let A=0,n=0;n<I;A++){let l=this.content[A],o=n+l.nodeSize;if(o>g&&e(l,t+n,i||null,A)!==!1&&l.content.size){let a=n+1;l.nodesBetween(Math.max(0,g-a),Math.min(l.content.size,I-a),e,t+a)}n=o}}descendants(g){this.nodesBetween(0,this.size,g)}textBetween(g,I,e,t){let i="",A=!0;return this.nodesBetween(g,I,(n,l)=>{let o=n.isText?n.text.slice(Math.max(g,l)-l,I-l):n.isLeaf?t?typeof t=="function"?t(n):t:n.type.spec.leafText?n.type.spec.leafText(n):"":"";n.isBlock&&(n.isLeaf&&o||n.isTextblock)&&e&&(A?A=!1:i+=e),i+=o},0),i}append(g){if(!g.size)return this;if(!this.size)return g;let I=this.lastChild,e=g.firstChild,t=this.content.slice(),i=0;for(I.isText&&I.sameMarkup(e)&&(t[t.length-1]=I.withText(I.text+e.text),i=1);i<g.content.length;i++)t.push(g.content[i]);return new sg(t,this.size+g.size)}cut(g,I=this.size){if(g==0&&I==this.size)return this;let e=[],t=0;if(I>g)for(let i=0,A=0;A<I;i++){let n=this.content[i],l=A+n.nodeSize;l>g&&((A<g||l>I)&&(n.isText?n=n.cut(Math.max(0,g-A),Math.min(n.text.length,I-A)):n=n.cut(Math.max(0,g-A-1),Math.min(n.content.size,I-A-1))),e.push(n),t+=n.nodeSize),A=l}return new sg(e,t)}cutByIndex(g,I){return g==I?sg.empty:g==0&&I==this.content.length?this:new sg(this.content.slice(g,I))}replaceChild(g,I){let e=this.content[g];if(e==I)return this;let t=this.content.slice(),i=this.size+I.nodeSize-e.nodeSize;return t[g]=I,new sg(t,i)}addToStart(g){return new sg([g].concat(this.content),this.size+g.nodeSize)}addToEnd(g){return new sg(this.content.concat(g),this.size+g.nodeSize)}eq(g){if(this.content.length!=g.content.length)return!1;for(let I=0;I<this.content.length;I++)if(!this.content[I].eq(g.content[I]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(g){let I=this.content[g];if(!I)throw new RangeError("Index "+g+" out of range for "+this);return I}maybeChild(g){return this.content[g]||null}forEach(g){for(let I=0,e=0;I<this.content.length;I++){let t=this.content[I];g(t,e,I),e+=t.nodeSize}}findDiffStart(g,I=0){return W9(this,g,I)}findDiffEnd(g,I=this.size,e=g.size){return B9(this,g,I,e)}findIndex(g){if(g==0)return iW(0,g);if(g==this.size)return iW(this.content.length,g);if(g>this.size||g<0)throw new RangeError(`Position ${g} outside of fragment (${this})`);for(let I=0,e=0;;I++){let t=this.child(I),i=e+t.nodeSize;if(i>=g)return i==g?iW(I+1,i):iW(I,e);e=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(g=>g.toJSON()):null}static fromJSON(g,I){if(!I)return sg.empty;if(!Array.isArray(I))throw new RangeError("Invalid input for Fragment.fromJSON");return new sg(I.map(g.nodeFromJSON))}static fromArray(g){if(!g.length)return sg.empty;let I,e=0;for(let t=0;t<g.length;t++){let i=g[t];e+=i.nodeSize,t&&i.isText&&g[t-1].sameMarkup(i)?(I||(I=g.slice(0,t)),I[I.length-1]=i.withText(I[I.length-1].text+i.text)):I&&I.push(i)}return new sg(I||g,e)}static from(g){if(!g)return sg.empty;if(g instanceof sg)return g;if(Array.isArray(g))return this.fromArray(g);if(g.attrs)return new sg([g],g.nodeSize);throw new RangeError("Can not convert "+g+" to a Fragment"+(g.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}sg.empty=new sg([],0);const TV={index:0,offset:0};function iW(C,g){return TV.index=C,TV.offset=g,TV}function AW(C,g){if(C===g)return!0;if(!(C&&typeof C=="object")||!(g&&typeof g=="object"))return!1;let I=Array.isArray(C);if(Array.isArray(g)!=I)return!1;if(I){if(C.length!=g.length)return!1;for(let e=0;e<C.length;e++)if(!AW(C[e],g[e]))return!1}else{for(let e in C)if(!(e in g)||!AW(C[e],g[e]))return!1;for(let e in g)if(!(e in C))return!1}return!0}let TI=class nX{constructor(g,I){this.type=g,this.attrs=I}addToSet(g){let I,e=!1;for(let t=0;t<g.length;t++){let i=g[t];if(this.eq(i))return g;if(this.type.excludes(i.type))I||(I=g.slice(0,t));else{if(i.type.excludes(this.type))return g;!e&&i.type.rank>this.type.rank&&(I||(I=g.slice(0,t)),I.push(this),e=!0),I&&I.push(i)}}return I||(I=g.slice()),e||I.push(this),I}removeFromSet(g){for(let I=0;I<g.length;I++)if(this.eq(g[I]))return g.slice(0,I).concat(g.slice(I+1));return g}isInSet(g){for(let I=0;I<g.length;I++)if(this.eq(g[I]))return!0;return!1}eq(g){return this==g||this.type==g.type&&AW(this.attrs,g.attrs)}toJSON(){let g={type:this.type.name};for(let I in this.attrs){g.attrs=this.attrs;break}return g}static fromJSON(g,I){if(!I)throw new RangeError("Invalid input for Mark.fromJSON");let e=g.marks[I.type];if(!e)throw new RangeError(`There is no mark type ${I.type} in this schema`);let t=e.create(I.attrs);return e.checkAttrs(t.attrs),t}static sameSet(g,I){if(g==I)return!0;if(g.length!=I.length)return!1;for(let e=0;e<g.length;e++)if(!g[e].eq(I[e]))return!1;return!0}static setFrom(g){if(!g||Array.isArray(g)&&g.length==0)return nX.none;if(g instanceof nX)return[g];let I=g.slice();return I.sort((e,t)=>e.type.rank-t.type.rank),I}};TI.none=[];class nW extends Error{}class bg{constructor(g,I,e){this.content=g,this.openStart=I,this.openEnd=e}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(g,I){let e=y9(this.content,g+this.openStart,I);return e&&new bg(e,this.openStart,this.openEnd)}removeBetween(g,I){return new bg(p9(this.content,g+this.openStart,I+this.openStart),this.openStart,this.openEnd)}eq(g){return this.content.eq(g.content)&&this.openStart==g.openStart&&this.openEnd==g.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let g={content:this.content.toJSON()};return this.openStart>0&&(g.openStart=this.openStart),this.openEnd>0&&(g.openEnd=this.openEnd),g}static fromJSON(g,I){if(!I)return bg.empty;let e=I.openStart||0,t=I.openEnd||0;if(typeof e!="number"||typeof t!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new bg(sg.fromJSON(g,I.content),e,t)}static maxOpen(g,I=!0){let e=0,t=0;for(let i=g.firstChild;i&&!i.isLeaf&&(I||!i.type.spec.isolating);i=i.firstChild)e++;for(let i=g.lastChild;i&&!i.isLeaf&&(I||!i.type.spec.isolating);i=i.lastChild)t++;return new bg(g,e,t)}}bg.empty=new bg(sg.empty,0,0);function p9(C,g,I){let{index:e,offset:t}=C.findIndex(g),i=C.maybeChild(e),{index:A,offset:n}=C.findIndex(I);if(t==g||i.isText){if(n!=I&&!C.child(A).isText)throw new RangeError("Removing non-flat range");return C.cut(0,g).append(C.cut(I))}if(e!=A)throw new RangeError("Removing non-flat range");return C.replaceChild(e,i.copy(p9(i.content,g-t-1,I-t-1)))}function y9(C,g,I,e){let{index:t,offset:i}=C.findIndex(g),A=C.maybeChild(t);if(i==g||A.isText)return e&&!e.canReplace(t,t,I)?null:C.cut(0,g).append(I).append(C.cut(g));let n=y9(A.content,g-i-1,I,A);return n&&C.replaceChild(t,A.copy(n))}function SQg(C,g,I){if(I.openStart>C.depth)throw new nW("Inserted content deeper than insertion position");if(C.depth-I.openStart!=g.depth-I.openEnd)throw new nW("Inconsistent open depths");return Y9(C,g,I,0)}function Y9(C,g,I,e){let t=C.index(e),i=C.node(e);if(t==g.index(e)&&e<C.depth-I.openStart){let A=Y9(C,g,I,e+1);return i.copy(i.content.replaceChild(t,A))}else if(I.content.size)if(!I.openStart&&!I.openEnd&&C.depth==e&&g.depth==e){let A=C.parent,n=A.content;return fa(A,n.cut(0,C.parentOffset).append(I.content).append(n.cut(g.parentOffset)))}else{let{start:A,end:n}=KQg(I,C);return fa(i,N9(C,A,n,g,e))}else return fa(i,lW(C,g,e))}function V9(C,g){if(!g.type.compatibleContent(C.type))throw new nW("Cannot join "+g.type.name+" onto "+C.type.name)}function vV(C,g,I){let e=C.node(I);return V9(e,g.node(I)),e}function Ha(C,g){let I=g.length-1;I>=0&&C.isText&&C.sameMarkup(g[I])?g[I]=C.withText(g[I].text+C.text):g.push(C)}function Ph(C,g,I,e){let t=(g||C).node(I),i=0,A=g?g.index(I):t.childCount;C&&(i=C.index(I),C.depth>I?i++:C.textOffset&&(Ha(C.nodeAfter,e),i++));for(let n=i;n<A;n++)Ha(t.child(n),e);g&&g.depth==I&&g.textOffset&&Ha(g.nodeBefore,e)}function fa(C,g){return C.type.checkContent(g),C.copy(g)}function N9(C,g,I,e,t){let i=C.depth>t&&vV(C,g,t+1),A=e.depth>t&&vV(I,e,t+1),n=[];return Ph(null,C,t,n),i&&A&&g.index(t)==I.index(t)?(V9(i,A),Ha(fa(i,N9(C,g,I,e,t+1)),n)):(i&&Ha(fa(i,lW(C,g,t+1)),n),Ph(g,I,t,n),A&&Ha(fa(A,lW(I,e,t+1)),n)),Ph(e,null,t,n),new sg(n)}function lW(C,g,I){let e=[];if(Ph(null,C,I,e),C.depth>I){let t=vV(C,g,I+1);Ha(fa(t,lW(C,g,I+1)),e)}return Ph(g,null,I,e),new sg(e)}function KQg(C,g){let I=g.depth-C.openStart,t=g.node(I).copy(C.content);for(let i=I-1;i>=0;i--)t=g.node(i).copy(sg.from(t));return{start:t.resolveNoCache(C.openStart+I),end:t.resolveNoCache(t.content.size-C.openEnd-I)}}class _h{constructor(g,I,e){this.pos=g,this.path=I,this.parentOffset=e,this.depth=I.length/3-1}resolveDepth(g){return g==null?this.depth:g<0?this.depth+g:g}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(g){return this.path[this.resolveDepth(g)*3]}index(g){return this.path[this.resolveDepth(g)*3+1]}indexAfter(g){return g=this.resolveDepth(g),this.index(g)+(g==this.depth&&!this.textOffset?0:1)}start(g){return g=this.resolveDepth(g),g==0?0:this.path[g*3-1]+1}end(g){return g=this.resolveDepth(g),this.start(g)+this.node(g).content.size}before(g){if(g=this.resolveDepth(g),!g)throw new RangeError("There is no position before the top-level node");return g==this.depth+1?this.pos:this.path[g*3-1]}after(g){if(g=this.resolveDepth(g),!g)throw new RangeError("There is no position after the top-level node");return g==this.depth+1?this.pos:this.path[g*3-1]+this.path[g*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let g=this.parent,I=this.index(this.depth);if(I==g.childCount)return null;let e=this.pos-this.path[this.path.length-1],t=g.child(I);return e?g.child(I).cut(e):t}get nodeBefore(){let g=this.index(this.depth),I=this.pos-this.path[this.path.length-1];return I?this.parent.child(g).cut(0,I):g==0?null:this.parent.child(g-1)}posAtIndex(g,I){I=this.resolveDepth(I);let e=this.path[I*3],t=I==0?0:this.path[I*3-1]+1;for(let i=0;i<g;i++)t+=e.child(i).nodeSize;return t}marks(){let g=this.parent,I=this.index();if(g.content.size==0)return TI.none;if(this.textOffset)return g.child(I).marks;let e=g.maybeChild(I-1),t=g.maybeChild(I);if(!e){let n=e;e=t,t=n}let i=e.marks;for(var A=0;A<i.length;A++)i[A].type.spec.inclusive===!1&&(!t||!i[A].isInSet(t.marks))&&(i=i[A--].removeFromSet(i));return i}marksAcross(g){let I=this.parent.maybeChild(this.index());if(!I||!I.isInline)return null;let e=I.marks,t=g.parent.maybeChild(g.index());for(var i=0;i<e.length;i++)e[i].type.spec.inclusive===!1&&(!t||!e[i].isInSet(t.marks))&&(e=e[i--].removeFromSet(e));return e}sharedDepth(g){for(let I=this.depth;I>0;I--)if(this.start(I)<=g&&this.end(I)>=g)return I;return 0}blockRange(g=this,I){if(g.pos<this.pos)return g.blockRange(this);for(let e=this.depth-(this.parent.inlineContent||this.pos==g.pos?1:0);e>=0;e--)if(g.pos<=this.end(e)&&(!I||I(this.node(e))))return new sW(this,g,e);return null}sameParent(g){return this.pos-this.parentOffset==g.pos-g.parentOffset}max(g){return g.pos>this.pos?g:this}min(g){return g.pos<this.pos?g:this}toString(){let g="";for(let I=1;I<=this.depth;I++)g+=(g?"/":"")+this.node(I).type.name+"_"+this.index(I-1);return g+":"+this.parentOffset}static resolve(g,I){if(!(I>=0&&I<=g.content.size))throw new RangeError("Position "+I+" out of range");let e=[],t=0,i=I;for(let A=g;;){let{index:n,offset:l}=A.content.findIndex(i),o=i-l;if(e.push(A,n,t+l),!o||(A=A.child(n),A.isText))break;i=o-1,t+=l+1}return new _h(I,e,i)}static resolveCached(g,I){let e=M9.get(g);if(e)for(let i=0;i<e.elts.length;i++){let A=e.elts[i];if(A.pos==I)return A}else M9.set(g,e=new kQg);let t=e.elts[e.i]=_h.resolve(g,I);return e.i=(e.i+1)%FQg,t}}class kQg{constructor(){this.elts=[],this.i=0}}const FQg=12,M9=new WeakMap;class sW{constructor(g,I,e){this.$from=g,this.$to=I,this.depth=e}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const zQg=Object.create(null);let Ds=class lX{constructor(g,I,e,t=TI.none){this.type=g,this.attrs=I,this.marks=t,this.content=e||sg.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(g){return this.content.child(g)}maybeChild(g){return this.content.maybeChild(g)}forEach(g){this.content.forEach(g)}nodesBetween(g,I,e,t=0){this.content.nodesBetween(g,I,e,t,this)}descendants(g){this.nodesBetween(0,this.content.size,g)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(g,I,e,t){return this.content.textBetween(g,I,e,t)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(g){return this==g||this.sameMarkup(g)&&this.content.eq(g.content)}sameMarkup(g){return this.hasMarkup(g.type,g.attrs,g.marks)}hasMarkup(g,I,e){return this.type==g&&AW(this.attrs,I||g.defaultAttrs||zQg)&&TI.sameSet(this.marks,e||TI.none)}copy(g=null){return g==this.content?this:new lX(this.type,this.attrs,g,this.marks)}mark(g){return g==this.marks?this:new lX(this.type,this.attrs,this.content,g)}cut(g,I=this.content.size){return g==0&&I==this.content.size?this:this.copy(this.content.cut(g,I))}slice(g,I=this.content.size,e=!1){if(g==I)return bg.empty;let t=this.resolve(g),i=this.resolve(I),A=e?0:t.sharedDepth(I),n=t.start(A),o=t.node(A).content.cut(t.pos-n,i.pos-n);return new bg(o,t.depth-A,i.depth-A)}replace(g,I,e){return SQg(this.resolve(g),this.resolve(I),e)}nodeAt(g){for(let I=this;;){let{index:e,offset:t}=I.content.findIndex(g);if(I=I.maybeChild(e),!I)return null;if(t==g||I.isText)return I;g-=t+1}}childAfter(g){let{index:I,offset:e}=this.content.findIndex(g);return{node:this.content.maybeChild(I),index:I,offset:e}}childBefore(g){if(g==0)return{node:null,index:0,offset:0};let{index:I,offset:e}=this.content.findIndex(g);if(e<g)return{node:this.content.child(I),index:I,offset:e};let t=this.content.child(I-1);return{node:t,index:I-1,offset:e-t.nodeSize}}resolve(g){return _h.resolveCached(this,g)}resolveNoCache(g){return _h.resolve(this,g)}rangeHasMark(g,I,e){let t=!1;return I>g&&this.nodesBetween(g,I,i=>(e.isInSet(i.marks)&&(t=!0),!t)),t}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let g=this.type.name;return this.content.size&&(g+="("+this.content.toStringInner()+")"),R9(this.marks,g)}contentMatchAt(g){let I=this.type.contentMatch.matchFragment(this.content,0,g);if(!I)throw new Error("Called contentMatchAt on a node with invalid content");return I}canReplace(g,I,e=sg.empty,t=0,i=e.childCount){let A=this.contentMatchAt(g).matchFragment(e,t,i),n=A&&A.matchFragment(this.content,I);if(!n||!n.validEnd)return!1;for(let l=t;l<i;l++)if(!this.type.allowsMarks(e.child(l).marks))return!1;return!0}canReplaceWith(g,I,e,t){if(t&&!this.type.allowsMarks(t))return!1;let i=this.contentMatchAt(g).matchType(e),A=i&&i.matchFragment(this.content,I);return A?A.validEnd:!1}canAppend(g){return g.content.size?this.canReplace(this.childCount,this.childCount,g.content):this.type.compatibleContent(g.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let g=TI.none;for(let I=0;I<this.marks.length;I++){let e=this.marks[I];e.type.checkAttrs(e.attrs),g=e.addToSet(g)}if(!TI.sameSet(g,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(I=>I.type.name)}`);this.content.forEach(I=>I.check())}toJSON(){let g={type:this.type.name};for(let I in this.attrs){g.attrs=this.attrs;break}return this.content.size&&(g.content=this.content.toJSON()),this.marks.length&&(g.marks=this.marks.map(I=>I.toJSON())),g}static fromJSON(g,I){if(!I)throw new RangeError("Invalid input for Node.fromJSON");let e;if(I.marks){if(!Array.isArray(I.marks))throw new RangeError("Invalid mark data for Node.fromJSON");e=I.marks.map(g.markFromJSON)}if(I.type=="text"){if(typeof I.text!="string")throw new RangeError("Invalid text node in JSON");return g.text(I.text,e)}let t=sg.fromJSON(g,I.content),i=g.nodeType(I.type).create(I.attrs,t,e);return i.type.checkAttrs(i.attrs),i}};Ds.prototype.text=void 0;class oW extends Ds{constructor(g,I,e,t){if(super(g,I,null,t),!e)throw new RangeError("Empty text nodes are not allowed");this.text=e}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):R9(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(g,I){return this.text.slice(g,I)}get nodeSize(){return this.text.length}mark(g){return g==this.marks?this:new oW(this.type,this.attrs,this.text,g)}withText(g){return g==this.text?this:new oW(this.type,this.attrs,g,this.marks)}cut(g=0,I=this.text.length){return g==0&&I==this.text.length?this:this.withText(this.text.slice(g,I))}eq(g){return this.sameMarkup(g)&&this.text==g.text}toJSON(){let g=super.toJSON();return g.text=this.text,g}}function R9(C,g){for(let I=C.length-1;I>=0;I--)g=C[I].type.name+"("+g+")";return g}class Da{constructor(g){this.validEnd=g,this.next=[],this.wrapCache=[]}static parse(g,I){let e=new JQg(g,I);if(e.next==null)return Da.empty;let t=X9(e);e.next&&e.err("Unexpected trailing text");let i=QQg(OQg(t));return UQg(i,e),i}matchType(g){for(let I=0;I<this.next.length;I++)if(this.next[I].type==g)return this.next[I].next;return null}matchFragment(g,I=0,e=g.childCount){let t=this;for(let i=I;t&&i<e;i++)t=t.matchType(g.child(i).type);return t}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let g=0;g<this.next.length;g++){let{type:I}=this.next[g];if(!(I.isText||I.hasRequiredAttrs()))return I}return null}compatible(g){for(let I=0;I<this.next.length;I++)for(let e=0;e<g.next.length;e++)if(this.next[I].type==g.next[e].type)return!0;return!1}fillBefore(g,I=!1,e=0){let t=[this];function i(A,n){let l=A.matchFragment(g,e);if(l&&(!I||l.validEnd))return sg.from(n.map(o=>o.createAndFill()));for(let o=0;o<A.next.length;o++){let{type:a,next:d}=A.next[o];if(!(a.isText||a.hasRequiredAttrs())&&t.indexOf(d)==-1){t.push(d);let m=i(d,n.concat(a));if(m)return m}}return null}return i(this,[])}findWrapping(g){for(let e=0;e<this.wrapCache.length;e+=2)if(this.wrapCache[e]==g)return this.wrapCache[e+1];let I=this.computeWrapping(g);return this.wrapCache.push(g,I),I}computeWrapping(g){let I=Object.create(null),e=[{match:this,type:null,via:null}];for(;e.length;){let t=e.shift(),i=t.match;if(i.matchType(g)){let A=[];for(let n=t;n.type;n=n.via)A.push(n.type);return A.reverse()}for(let A=0;A<i.next.length;A++){let{type:n,next:l}=i.next[A];!n.isLeaf&&!n.hasRequiredAttrs()&&!(n.name in I)&&(!t.type||l.validEnd)&&(e.push({match:n.contentMatch,type:n,via:t}),I[n.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(g){if(g>=this.next.length)throw new RangeError(`There's no ${g}th edge in this content match`);return this.next[g]}toString(){let g=[];function I(e){g.push(e);for(let t=0;t<e.next.length;t++)g.indexOf(e.next[t].next)==-1&&I(e.next[t].next)}return I(this),g.map((e,t)=>{let i=t+(e.validEnd?"*":" ")+" ";for(let A=0;A<e.next.length;A++)i+=(A?", ":"")+e.next[A].type.name+"->"+g.indexOf(e.next[A].next);return i}).join(`
|
|
1373
1373
|
`)}}Da.empty=new Da(!0);class JQg{constructor(g,I){this.string=g,this.nodeTypes=I,this.inline=null,this.pos=0,this.tokens=g.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(g){return this.next==g&&(this.pos++||!0)}err(g){throw new SyntaxError(g+" (in content expression '"+this.string+"')")}}function X9(C){let g=[];do g.push(LQg(C));while(C.eat("|"));return g.length==1?g[0]:{type:"choice",exprs:g}}function LQg(C){let g=[];do g.push(TQg(C));while(C.next&&C.next!=")"&&C.next!="|");return g.length==1?g[0]:{type:"seq",exprs:g}}function TQg(C){let g=xQg(C);for(;;)if(C.eat("+"))g={type:"plus",expr:g};else if(C.eat("*"))g={type:"star",expr:g};else if(C.eat("?"))g={type:"opt",expr:g};else if(C.eat("{"))g=vQg(C,g);else break;return g}function H9(C){/\D/.test(C.next)&&C.err("Expected number, got '"+C.next+"'");let g=Number(C.next);return C.pos++,g}function vQg(C,g){let I=H9(C),e=I;return C.eat(",")&&(C.next!="}"?e=H9(C):e=-1),C.eat("}")||C.err("Unclosed braced range"),{type:"range",min:I,max:e,expr:g}}function jQg(C,g){let I=C.nodeTypes,e=I[g];if(e)return[e];let t=[];for(let i in I){let A=I[i];A.isInGroup(g)&&t.push(A)}return t.length==0&&C.err("No node type or group '"+g+"' found"),t}function xQg(C){if(C.eat("(")){let g=X9(C);return C.eat(")")||C.err("Missing closing paren"),g}else if(/\W/.test(C.next))C.err("Unexpected token '"+C.next+"'");else{let g=jQg(C,C.next).map(I=>(C.inline==null?C.inline=I.isInline:C.inline!=I.isInline&&C.err("Mixing inline and block content"),{type:"name",value:I}));return C.pos++,g.length==1?g[0]:{type:"choice",exprs:g}}}function OQg(C){let g=[[]];return t(i(C,0),I()),g;function I(){return g.push([])-1}function e(A,n,l){let o={term:l,to:n};return g[A].push(o),o}function t(A,n){A.forEach(l=>l.to=n)}function i(A,n){if(A.type=="choice")return A.exprs.reduce((l,o)=>l.concat(i(o,n)),[]);if(A.type=="seq")for(let l=0;;l++){let o=i(A.exprs[l],n);if(l==A.exprs.length-1)return o;t(o,n=I())}else if(A.type=="star"){let l=I();return e(n,l),t(i(A.expr,l),l),[e(l)]}else if(A.type=="plus"){let l=I();return t(i(A.expr,n),l),t(i(A.expr,l),l),[e(l)]}else{if(A.type=="opt")return[e(n)].concat(i(A.expr,n));if(A.type=="range"){let l=n;for(let o=0;o<A.min;o++){let a=I();t(i(A.expr,l),a),l=a}if(A.max==-1)t(i(A.expr,l),l);else for(let o=A.min;o<A.max;o++){let a=I();e(l,a),t(i(A.expr,l),a),l=a}return[e(l)]}else{if(A.type=="name")return[e(n,void 0,A.value)];throw new Error("Unknown expr type")}}}}function f9(C,g){return g-C}function D9(C,g){let I=[];return e(g),I.sort(f9);function e(t){let i=C[t];if(i.length==1&&!i[0].term)return e(i[0].to);I.push(t);for(let A=0;A<i.length;A++){let{term:n,to:l}=i[A];!n&&I.indexOf(l)==-1&&e(l)}}}function QQg(C){let g=Object.create(null);return I(D9(C,0));function I(e){let t=[];e.forEach(A=>{C[A].forEach(({term:n,to:l})=>{if(!n)return;let o;for(let a=0;a<t.length;a++)t[a][0]==n&&(o=t[a][1]);D9(C,l).forEach(a=>{o||t.push([n,o=[]]),o.indexOf(a)==-1&&o.push(a)})})});let i=g[e.join(",")]=new Da(e.indexOf(C.length-1)>-1);for(let A=0;A<t.length;A++){let n=t[A][1].sort(f9);i.next.push({type:t[A][0],next:g[n.join(",")]||I(n)})}return i}}function UQg(C,g){for(let I=0,e=[C];I<e.length;I++){let t=e[I],i=!t.validEnd,A=[];for(let n=0;n<t.next.length;n++){let{type:l,next:o}=t.next[n];A.push(l.name),i&&!(l.isText||l.hasRequiredAttrs())&&(i=!1),e.indexOf(o)==-1&&e.push(o)}i&&g.err("Only non-generatable nodes ("+A.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function S9(C){let g=Object.create(null);for(let I in C){let e=C[I];if(!e.hasDefault)return null;g[I]=e.default}return g}function K9(C,g){let I=Object.create(null);for(let e in C){let t=g&&g[e];if(t===void 0){let i=C[e];if(i.hasDefault)t=i.default;else throw new RangeError("No value supplied for attribute "+e)}I[e]=t}return I}function k9(C,g,I,e){for(let t in g)if(!(t in C))throw new RangeError(`Unsupported attribute ${t} for ${I} of type ${t}`);for(let t in C){let i=C[t];i.validate&&i.validate(g[t])}}function F9(C,g){let I=Object.create(null);if(g)for(let e in g)I[e]=new PQg(C,e,g[e]);return I}let z9=class qT{constructor(g,I,e){this.name=g,this.schema=I,this.spec=e,this.markSet=null,this.groups=e.group?e.group.split(" "):[],this.attrs=F9(g,e.attrs),this.defaultAttrs=S9(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(e.inline||g=="text"),this.isText=g=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Da.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(g){return this.groups.indexOf(g)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let g in this.attrs)if(this.attrs[g].isRequired)return!0;return!1}compatibleContent(g){return this==g||this.contentMatch.compatible(g.contentMatch)}computeAttrs(g){return!g&&this.defaultAttrs?this.defaultAttrs:K9(this.attrs,g)}create(g=null,I,e){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Ds(this,this.computeAttrs(g),sg.from(I),TI.setFrom(e))}createChecked(g=null,I,e){return I=sg.from(I),this.checkContent(I),new Ds(this,this.computeAttrs(g),I,TI.setFrom(e))}createAndFill(g=null,I,e){if(g=this.computeAttrs(g),I=sg.from(I),I.size){let A=this.contentMatch.fillBefore(I);if(!A)return null;I=A.append(I)}let t=this.contentMatch.matchFragment(I),i=t&&t.fillBefore(sg.empty,!0);return i?new Ds(this,g,I.append(i),TI.setFrom(e)):null}validContent(g){let I=this.contentMatch.matchFragment(g);if(!I||!I.validEnd)return!1;for(let e=0;e<g.childCount;e++)if(!this.allowsMarks(g.child(e).marks))return!1;return!0}checkContent(g){if(!this.validContent(g))throw new RangeError(`Invalid content for node ${this.name}: ${g.toString().slice(0,50)}`)}checkAttrs(g){k9(this.attrs,g,"node",this.name)}allowsMarkType(g){return this.markSet==null||this.markSet.indexOf(g)>-1}allowsMarks(g){if(this.markSet==null)return!0;for(let I=0;I<g.length;I++)if(!this.allowsMarkType(g[I].type))return!1;return!0}allowedMarks(g){if(this.markSet==null)return g;let I;for(let e=0;e<g.length;e++)this.allowsMarkType(g[e].type)?I&&I.push(g[e]):I||(I=g.slice(0,e));return I?I.length?I:TI.none:g}static compile(g,I){let e=Object.create(null);g.forEach((i,A)=>e[i]=new qT(i,I,A));let t=I.spec.topNode||"doc";if(!e[t])throw new RangeError("Schema is missing its top node type ('"+t+"')");if(!e.text)throw new RangeError("Every schema needs a 'text' type");for(let i in e.text.attrs)throw new RangeError("The text node type should not have attributes");return e}};function EQg(C,g,I){let e=I.split("|");return t=>{let i=t===null?"null":typeof t;if(e.indexOf(i)<0)throw new RangeError(`Expected value of type ${e} for attribute ${g} on type ${C}, got ${i}`)}}class PQg{constructor(g,I,e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default,this.validate=typeof e.validate=="string"?EQg(g,I,e.validate):e.validate}get isRequired(){return!this.hasDefault}}class aW{constructor(g,I,e,t){this.name=g,this.rank=I,this.schema=e,this.spec=t,this.attrs=F9(g,t.attrs),this.excluded=null;let i=S9(this.attrs);this.instance=i?new TI(this,i):null}create(g=null){return!g&&this.instance?this.instance:new TI(this,K9(this.attrs,g))}static compile(g,I){let e=Object.create(null),t=0;return g.forEach((i,A)=>e[i]=new aW(i,t++,I,A)),e}removeFromSet(g){for(var I=0;I<g.length;I++)g[I].type==this&&(g=g.slice(0,I).concat(g.slice(I+1)),I--);return g}isInSet(g){for(let I=0;I<g.length;I++)if(g[I].type==this)return g[I]}checkAttrs(g){k9(this.attrs,g,"mark",this.name)}excludes(g){return this.excluded.indexOf(g)>-1}}class J9{constructor(g){this.linebreakReplacement=null,this.cached=Object.create(null);let I=this.spec={};for(let t in g)I[t]=g[t];I.nodes=pe.from(g.nodes),I.marks=pe.from(g.marks||{}),this.nodes=z9.compile(this.spec.nodes,this),this.marks=aW.compile(this.spec.marks,this);let e=Object.create(null);for(let t in this.nodes){if(t in this.marks)throw new RangeError(t+" can not be both a node and a mark");let i=this.nodes[t],A=i.spec.content||"",n=i.spec.marks;if(i.contentMatch=e[A]||(e[A]=Da.parse(A,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=n=="_"?null:n?L9(this,n.split(" ")):n==""||!i.inlineContent?[]:null}for(let t in this.marks){let i=this.marks[t],A=i.spec.excludes;i.excluded=A==null?[i]:A==""?[]:L9(this,A.split(" "))}this.nodeFromJSON=t=>Ds.fromJSON(this,t),this.markFromJSON=t=>TI.fromJSON(this,t),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(g,I=null,e,t){if(typeof g=="string")g=this.nodeType(g);else if(g instanceof z9){if(g.schema!=this)throw new RangeError("Node type from different schema used ("+g.name+")")}else throw new RangeError("Invalid node type: "+g);return g.createChecked(I,e,t)}text(g,I){let e=this.nodes.text;return new oW(e,e.defaultAttrs,g,TI.setFrom(I))}mark(g,I){return typeof g=="string"&&(g=this.marks[g]),g.create(I)}nodeType(g){let I=this.nodes[g];if(!I)throw new RangeError("Unknown node type: "+g);return I}}function L9(C,g){let I=[];for(let e=0;e<g.length;e++){let t=g[e],i=C.marks[t],A=i;if(i)I.push(i);else for(let n in C.marks){let l=C.marks[n];(t=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(t)>-1)&&I.push(A=l)}if(!A)throw new SyntaxError("Unknown mark type: '"+g[e]+"'")}return I}function _Qg(C){return C.tag!=null}function $Qg(C){return C.style!=null}class Ss{constructor(g,I){this.schema=g,this.rules=I,this.tags=[],this.styles=[];let e=this.matchedStyles=[];I.forEach(t=>{if(_Qg(t))this.tags.push(t);else if($Qg(t)){let i=/[^=]*/.exec(t.style)[0];e.indexOf(i)<0&&e.push(i),this.styles.push(t)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let i=g.nodes[t.node];return i.contentMatch.matchType(i)})}parse(g,I={}){let e=new x9(this,I,!1);return e.addAll(g,TI.none,I.from,I.to),e.finish()}parseSlice(g,I={}){let e=new x9(this,I,!0);return e.addAll(g,TI.none,I.from,I.to),bg.maxOpen(e.finish())}matchTag(g,I,e){for(let t=e?this.tags.indexOf(e)+1:0;t<this.tags.length;t++){let i=this.tags[t];if(I4g(g,i.tag)&&(i.namespace===void 0||g.namespaceURI==i.namespace)&&(!i.context||I.matchesContext(i.context))){if(i.getAttrs){let A=i.getAttrs(g);if(A===!1)continue;i.attrs=A||void 0}return i}}}matchStyle(g,I,e,t){for(let i=t?this.styles.indexOf(t)+1:0;i<this.styles.length;i++){let A=this.styles[i],n=A.style;if(!(n.indexOf(g)!=0||A.context&&!e.matchesContext(A.context)||n.length>g.length&&(n.charCodeAt(g.length)!=61||n.slice(g.length+1)!=I))){if(A.getAttrs){let l=A.getAttrs(I);if(l===!1)continue;A.attrs=l||void 0}return A}}}static schemaRules(g){let I=[];function e(t){let i=t.priority==null?50:t.priority,A=0;for(;A<I.length;A++){let n=I[A];if((n.priority==null?50:n.priority)<i)break}I.splice(A,0,t)}for(let t in g.marks){let i=g.marks[t].spec.parseDOM;i&&i.forEach(A=>{e(A=O9(A)),A.mark||A.ignore||A.clearMark||(A.mark=t)})}for(let t in g.nodes){let i=g.nodes[t].spec.parseDOM;i&&i.forEach(A=>{e(A=O9(A)),A.node||A.ignore||A.mark||(A.node=t)})}return I}static fromSchema(g){return g.cached.domParser||(g.cached.domParser=new Ss(g,Ss.schemaRules(g)))}}const T9={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},qQg={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},v9={ol:!0,ul:!0},$h=1,jV=2,qh=4;function j9(C,g,I){return g!=null?(g?$h:0)|(g==="full"?jV:0):C&&C.whitespace=="pre"?$h|jV:I&~qh}class dW{constructor(g,I,e,t,i,A){this.type=g,this.attrs=I,this.marks=e,this.solid=t,this.options=A,this.content=[],this.activeMarks=TI.none,this.match=i||(A&qh?null:g.contentMatch)}findWrapping(g){if(!this.match){if(!this.type)return[];let I=this.type.contentMatch.fillBefore(sg.from(g));if(I)this.match=this.type.contentMatch.matchFragment(I);else{let e=this.type.contentMatch,t;return(t=e.findWrapping(g.type))?(this.match=e,t):null}}return this.match.findWrapping(g.type)}finish(g){if(!(this.options&$h)){let e=this.content[this.content.length-1],t;if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let i=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-t[0].length))}}let I=sg.from(this.content);return!g&&this.match&&(I=I.append(this.match.fillBefore(sg.empty,!0))),this.type?this.type.create(this.attrs,I,this.marks):I}inlineContext(g){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:g.parentNode&&!T9.hasOwnProperty(g.parentNode.nodeName.toLowerCase())}}class x9{constructor(g,I,e){this.parser=g,this.options=I,this.isOpen=e,this.open=0,this.localPreserveWS=!1;let t=I.topNode,i,A=j9(null,I.preserveWhitespace,0)|(e?qh:0);t?i=new dW(t.type,t.attrs,TI.none,!0,I.topMatch||t.type.contentMatch,A):e?i=new dW(null,null,TI.none,!0,null,A):i=new dW(g.schema.topNodeType,null,TI.none,!0,null,A),this.nodes=[i],this.find=I.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(g,I){g.nodeType==3?this.addTextNode(g,I):g.nodeType==1&&this.addElement(g,I)}addTextNode(g,I){let e=g.nodeValue,t=this.top,i=t.options&jV?"full":this.localPreserveWS||(t.options&$h)>0;if(i==="full"||t.inlineContext(g)||/[^ \t\r\n\u000c]/.test(e)){if(i)i!=="full"?e=e.replace(/\r?\n|\r/g," "):e=e.replace(/\r\n?/g,`
|
|
1374
1374
|
`);else if(e=e.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(e)&&this.open==this.nodes.length-1){let A=t.content[t.content.length-1],n=g.previousSibling;(!A||n&&n.nodeName=="BR"||A.isText&&/[ \t\r\n\u000c]$/.test(A.text))&&(e=e.slice(1))}e&&this.insertNode(this.parser.schema.text(e),I,!/\S/.test(e)),this.findInText(g)}else this.findInside(g)}addElement(g,I,e){let t=this.localPreserveWS,i=this.top;(g.tagName=="PRE"||/pre/.test(g.style&&g.style.whiteSpace))&&(this.localPreserveWS=!0);let A=g.nodeName.toLowerCase(),n;v9.hasOwnProperty(A)&&this.parser.normalizeLists&&g4g(g);let l=this.options.ruleFromNode&&this.options.ruleFromNode(g)||(n=this.parser.matchTag(g,this,e));g:if(l?l.ignore:qQg.hasOwnProperty(A))this.findInside(g),this.ignoreFallback(g,I);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(g=l.skip);let o,a=this.needsBlock;if(T9.hasOwnProperty(A))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),o=!0,i.type||(this.needsBlock=!0);else if(!g.firstChild){this.leafFallback(g,I);break g}let d=l&&l.skip?I:this.readStyles(g,I);d&&this.addAll(g,d),o&&this.sync(i),this.needsBlock=a}else{let o=this.readStyles(g,I);o&&this.addElementByRule(g,l,o,l.consuming===!1?n:void 0)}this.localPreserveWS=t}leafFallback(g,I){g.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(g.ownerDocument.createTextNode(`
|
|
1375
1375
|
`),I)}ignoreFallback(g,I){g.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),I,!0)}readStyles(g,I){let e=g.style;if(e&&e.length)for(let t=0;t<this.parser.matchedStyles.length;t++){let i=this.parser.matchedStyles[t],A=e.getPropertyValue(i);if(A)for(let n=void 0;;){let l=this.parser.matchStyle(i,A,this,n);if(!l)break;if(l.ignore)return null;if(l.clearMark?I=I.filter(o=>!l.clearMark(o)):I=I.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)n=l;else break}}return I}addElementByRule(g,I,e,t){let i,A;if(I.node)if(A=this.parser.schema.nodes[I.node],A.isLeaf)this.insertNode(A.create(I.attrs),e,g.nodeName=="BR")||this.leafFallback(g,e);else{let l=this.enter(A,I.attrs||null,e,I.preserveWhitespace);l&&(i=!0,e=l)}else{let l=this.parser.schema.marks[I.mark];e=e.concat(l.create(I.attrs))}let n=this.top;if(A&&A.isLeaf)this.findInside(g);else if(t)this.addElement(g,e,t);else if(I.getContent)this.findInside(g),I.getContent(g,this.parser.schema).forEach(l=>this.insertNode(l,e,!1));else{let l=g;typeof I.contentElement=="string"?l=g.querySelector(I.contentElement):typeof I.contentElement=="function"?l=I.contentElement(g):I.contentElement&&(l=I.contentElement),this.findAround(g,l,!0),this.addAll(l,e),this.findAround(g,l,!1)}i&&this.sync(n)&&this.open--}addAll(g,I,e,t){let i=e||0;for(let A=e?g.childNodes[e]:g.firstChild,n=t==null?null:g.childNodes[t];A!=n;A=A.nextSibling,++i)this.findAtPoint(g,i),this.addDOM(A,I);this.findAtPoint(g,i)}findPlace(g,I,e){let t,i;for(let A=this.open,n=0;A>=0;A--){let l=this.nodes[A],o=l.findWrapping(g);if(o&&(!t||t.length>o.length+n)&&(t=o,i=l,!o.length))break;if(l.solid){if(e)break;n+=2}}if(!t)return null;this.sync(i);for(let A=0;A<t.length;A++)I=this.enterInner(t[A],null,I,!1);return I}insertNode(g,I,e){if(g.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(I=this.enterInner(i,null,I))}let t=this.findPlace(g,I,e);if(t){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(g.type));let A=TI.none;for(let n of t.concat(g.marks))(i.type?i.type.allowsMarkType(n.type):Q9(n.type,g.type))&&(A=n.addToSet(A));return i.content.push(g.mark(A)),!0}return!1}enter(g,I,e,t){let i=this.findPlace(g.create(I),e,!1);return i&&(i=this.enterInner(g,I,e,!0,t)),i}enterInner(g,I,e,t=!1,i){this.closeExtra();let A=this.top;A.match=A.match&&A.match.matchType(g);let n=j9(g,i,A.options);A.options&qh&&A.content.length==0&&(n|=qh);let l=TI.none;return e=e.filter(o=>(A.type?A.type.allowsMarkType(o.type):Q9(o.type,g))?(l=o.addToSet(l),!1):!0),this.nodes.push(new dW(g,I,l,t,null,n)),this.open++,e}closeExtra(g=!1){let I=this.nodes.length-1;if(I>this.open){for(;I>this.open;I--)this.nodes[I-1].content.push(this.nodes[I].finish(g));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(g){for(let I=this.open;I>=0;I--){if(this.nodes[I]==g)return this.open=I,!0;this.localPreserveWS&&(this.nodes[I].options|=$h)}return!1}get currentPos(){this.closeExtra();let g=0;for(let I=this.open;I>=0;I--){let e=this.nodes[I].content;for(let t=e.length-1;t>=0;t--)g+=e[t].nodeSize;I&&g++}return g}findAtPoint(g,I){if(this.find)for(let e=0;e<this.find.length;e++)this.find[e].node==g&&this.find[e].offset==I&&(this.find[e].pos=this.currentPos)}findInside(g){if(this.find)for(let I=0;I<this.find.length;I++)this.find[I].pos==null&&g.nodeType==1&&g.contains(this.find[I].node)&&(this.find[I].pos=this.currentPos)}findAround(g,I,e){if(g!=I&&this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&g.nodeType==1&&g.contains(this.find[t].node)&&I.compareDocumentPosition(this.find[t].node)&(e?2:4)&&(this.find[t].pos=this.currentPos)}findInText(g){if(this.find)for(let I=0;I<this.find.length;I++)this.find[I].node==g&&(this.find[I].pos=this.currentPos-(g.nodeValue.length-this.find[I].offset))}matchesContext(g){if(g.indexOf("|")>-1)return g.split(/\s*\|\s*/).some(this.matchesContext,this);let I=g.split("/"),e=this.options.context,t=!this.isOpen&&(!e||e.parent.type==this.nodes[0].type),i=-(e?e.depth+1:0)+(t?0:1),A=(n,l)=>{for(;n>=0;n--){let o=I[n];if(o==""){if(n==I.length-1||n==0)continue;for(;l>=i;l--)if(A(n-1,l))return!0;return!1}else{let a=l>0||l==0&&t?this.nodes[l].type:e&&l>=i?e.node(l-i).type:null;if(!a||a.name!=o&&!a.isInGroup(o))return!1;l--}}return!0};return A(I.length-1,this.open)}textblockFromContext(){let g=this.options.context;if(g)for(let I=g.depth;I>=0;I--){let e=g.node(I).contentMatchAt(g.indexAfter(I)).defaultType;if(e&&e.isTextblock&&e.defaultAttrs)return e}for(let I in this.parser.schema.nodes){let e=this.parser.schema.nodes[I];if(e.isTextblock&&e.defaultAttrs)return e}}}function g4g(C){for(let g=C.firstChild,I=null;g;g=g.nextSibling){let e=g.nodeType==1?g.nodeName.toLowerCase():null;e&&v9.hasOwnProperty(e)&&I?(I.appendChild(g),g=I):e=="li"?I=g:e&&(I=null)}}function I4g(C,g){return(C.matches||C.msMatchesSelector||C.webkitMatchesSelector||C.mozMatchesSelector).call(C,g)}function O9(C){let g={};for(let I in C)g[I]=C[I];return g}function Q9(C,g){let I=g.schema.nodes;for(let e in I){let t=I[e];if(!t.allowsMarkType(C))continue;let i=[],A=n=>{i.push(n);for(let l=0;l<n.edgeCount;l++){let{type:o,next:a}=n.edge(l);if(o==g||i.indexOf(a)<0&&A(a))return!0}};if(A(t.contentMatch))return!0}}class Sa{constructor(g,I){this.nodes=g,this.marks=I}serializeFragment(g,I={},e){e||(e=xV(I).createDocumentFragment());let t=e,i=[];return g.forEach(A=>{if(i.length||A.marks.length){let n=0,l=0;for(;n<i.length&&l<A.marks.length;){let o=A.marks[l];if(!this.marks[o.type.name]){l++;continue}if(!o.eq(i[n][0])||o.type.spec.spanning===!1)break;n++,l++}for(;n<i.length;)t=i.pop()[1];for(;l<A.marks.length;){let o=A.marks[l++],a=this.serializeMark(o,A.isInline,I);a&&(i.push([o,t]),t.appendChild(a.dom),t=a.contentDOM||a.dom)}}t.appendChild(this.serializeNodeInner(A,I))}),e}serializeNodeInner(g,I){let{dom:e,contentDOM:t}=cW(xV(I),this.nodes[g.type.name](g),null,g.attrs);if(t){if(g.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(g.content,I,t)}return e}serializeNode(g,I={}){let e=this.serializeNodeInner(g,I);for(let t=g.marks.length-1;t>=0;t--){let i=this.serializeMark(g.marks[t],g.isInline,I);i&&((i.contentDOM||i.dom).appendChild(e),e=i.dom)}return e}serializeMark(g,I,e={}){let t=this.marks[g.type.name];return t&&cW(xV(e),t(g,I),null,g.attrs)}static renderSpec(g,I,e=null,t){return cW(g,I,e,t)}static fromSchema(g){return g.cached.domSerializer||(g.cached.domSerializer=new Sa(this.nodesFromSchema(g),this.marksFromSchema(g)))}static nodesFromSchema(g){let I=U9(g.nodes);return I.text||(I.text=e=>e.text),I}static marksFromSchema(g){return U9(g.marks)}}function U9(C){let g={};for(let I in C){let e=C[I].spec.toDOM;e&&(g[I]=e)}return g}function xV(C){return C.document||window.document}const E9=new WeakMap;function C4g(C){let g=E9.get(C);return g===void 0&&E9.set(C,g=e4g(C)),g}function e4g(C){let g=null;function I(e){if(e&&typeof e=="object")if(Array.isArray(e))if(typeof e[0]=="string")g||(g=[]),g.push(e);else for(let t=0;t<e.length;t++)I(e[t]);else for(let t in e)I(e[t])}return I(C),g}function cW(C,g,I,e){if(typeof g=="string")return{dom:C.createTextNode(g)};if(g.nodeType!=null)return{dom:g};if(g.dom&&g.dom.nodeType!=null)return g;let t=g[0],i;if(typeof t!="string")throw new RangeError("Invalid array passed to renderSpec");if(e&&(i=C4g(e))&&i.indexOf(g)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let A=t.indexOf(" ");A>0&&(I=t.slice(0,A),t=t.slice(A+1));let n,l=I?C.createElementNS(I,t):C.createElement(t),o=g[1],a=1;if(o&&typeof o=="object"&&o.nodeType==null&&!Array.isArray(o)){a=2;for(let d in o)if(o[d]!=null){let m=d.indexOf(" ");m>0?l.setAttributeNS(d.slice(0,m),d.slice(m+1),o[d]):d=="style"&&l.style?l.style.cssText=o[d]:l.setAttribute(d,o[d])}}for(let d=a;d<g.length;d++){let m=g[d];if(m===0){if(d<g.length-1||d>a)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:u,contentDOM:b}=cW(C,m,I,e);if(l.appendChild(u),b){if(n)throw new RangeError("Multiple content holes");n=b}}}return{dom:l,contentDOM:n}}const P9=65535,_9=Math.pow(2,16);function t4g(C,g){return C+g*_9}function $9(C){return C&P9}function i4g(C){return(C-(C&P9))/_9}const q9=1,gK=2,rW=4,IK=8;class OV{constructor(g,I,e){this.pos=g,this.delInfo=I,this.recover=e}get deleted(){return(this.delInfo&IK)>0}get deletedBefore(){return(this.delInfo&(q9|rW))>0}get deletedAfter(){return(this.delInfo&(gK|rW))>0}get deletedAcross(){return(this.delInfo&rW)>0}}class ei{constructor(g,I=!1){if(this.ranges=g,this.inverted=I,!g.length&&ei.empty)return ei.empty}recover(g){let I=0,e=$9(g);if(!this.inverted)for(let t=0;t<e;t++)I+=this.ranges[t*3+2]-this.ranges[t*3+1];return this.ranges[e*3]+I+i4g(g)}mapResult(g,I=1){return this._map(g,I,!1)}map(g,I=1){return this._map(g,I,!0)}_map(g,I,e){let t=0,i=this.inverted?2:1,A=this.inverted?1:2;for(let n=0;n<this.ranges.length;n+=3){let l=this.ranges[n]-(this.inverted?t:0);if(l>g)break;let o=this.ranges[n+i],a=this.ranges[n+A],d=l+o;if(g<=d){let m=o?g==l?-1:g==d?1:I:I,u=l+t+(m<0?0:a);if(e)return u;let b=g==(I<0?l:d)?null:t4g(n/3,g-l),Z=g==l?gK:g==d?q9:rW;return(I<0?g!=l:g!=d)&&(Z|=IK),new OV(u,Z,b)}t+=a-o}return e?g+t:new OV(g+t,0,null)}touches(g,I){let e=0,t=$9(I),i=this.inverted?2:1,A=this.inverted?1:2;for(let n=0;n<this.ranges.length;n+=3){let l=this.ranges[n]-(this.inverted?e:0);if(l>g)break;let o=this.ranges[n+i],a=l+o;if(g<=a&&n==t*3)return!0;e+=this.ranges[n+A]-o}return!1}forEach(g){let I=this.inverted?2:1,e=this.inverted?1:2;for(let t=0,i=0;t<this.ranges.length;t+=3){let A=this.ranges[t],n=A-(this.inverted?i:0),l=A+(this.inverted?0:i),o=this.ranges[t+I],a=this.ranges[t+e];g(n,n+o,l,l+a),i+=a-o}}invert(){return new ei(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(g){return g==0?ei.empty:new ei(g<0?[0,-g,0]:[0,0,g])}}ei.empty=new ei([]);class g0{constructor(g,I,e=0,t=g?g.length:0){this.mirror=I,this.from=e,this.to=t,this._maps=g||[],this.ownData=!(g||I)}get maps(){return this._maps}slice(g=0,I=this.maps.length){return new g0(this._maps,this.mirror,g,I)}appendMap(g,I){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(g),I!=null&&this.setMirror(this._maps.length-1,I)}appendMapping(g){for(let I=0,e=this._maps.length;I<g._maps.length;I++){let t=g.getMirror(I);this.appendMap(g._maps[I],t!=null&&t<I?e+t:void 0)}}getMirror(g){if(this.mirror){for(let I=0;I<this.mirror.length;I++)if(this.mirror[I]==g)return this.mirror[I+(I%2?-1:1)]}}setMirror(g,I){this.mirror||(this.mirror=[]),this.mirror.push(g,I)}appendMappingInverted(g){for(let I=g.maps.length-1,e=this._maps.length+g._maps.length;I>=0;I--){let t=g.getMirror(I);this.appendMap(g._maps[I].invert(),t!=null&&t>I?e-t-1:void 0)}}invert(){let g=new g0;return g.appendMappingInverted(this),g}map(g,I=1){if(this.mirror)return this._map(g,I,!0);for(let e=this.from;e<this.to;e++)g=this._maps[e].map(g,I);return g}mapResult(g,I=1){return this._map(g,I,!1)}_map(g,I,e){let t=0;for(let i=this.from;i<this.to;i++){let A=this._maps[i],n=A.mapResult(g,I);if(n.recover!=null){let l=this.getMirror(i);if(l!=null&&l>i&&l<this.to){i=l,g=this._maps[l].recover(n.recover);continue}}t|=n.delInfo,g=n.pos}return e?g:new OV(g,t,null)}}const QV=Object.create(null);class Te{getMap(){return ei.empty}merge(g){return null}static fromJSON(g,I){if(!I||!I.stepType)throw new RangeError("Invalid input for Step.fromJSON");let e=QV[I.stepType];if(!e)throw new RangeError(`No step type ${I.stepType} defined`);return e.fromJSON(g,I)}static jsonID(g,I){if(g in QV)throw new RangeError("Duplicate use of step JSON ID "+g);return QV[g]=I,I.prototype.jsonID=g,I}}class JC{constructor(g,I){this.doc=g,this.failed=I}static ok(g){return new JC(g,null)}static fail(g){return new JC(null,g)}static fromReplace(g,I,e,t){try{return JC.ok(g.replace(I,e,t))}catch(i){if(i instanceof nW)return JC.fail(i.message);throw i}}}function UV(C,g,I){let e=[];for(let t=0;t<C.childCount;t++){let i=C.child(t);i.content.size&&(i=i.copy(UV(i.content,g,i))),i.isInline&&(i=g(i,I,t)),e.push(i)}return sg.fromArray(e)}class Ks extends Te{constructor(g,I,e){super(),this.from=g,this.to=I,this.mark=e}apply(g){let I=g.slice(this.from,this.to),e=g.resolve(this.from),t=e.node(e.sharedDepth(this.to)),i=new bg(UV(I.content,(A,n)=>!A.isAtom||!n.type.allowsMarkType(this.mark.type)?A:A.mark(this.mark.addToSet(A.marks)),t),I.openStart,I.openEnd);return JC.fromReplace(g,this.from,this.to,i)}invert(){return new VA(this.from,this.to,this.mark)}map(g){let I=g.mapResult(this.from,1),e=g.mapResult(this.to,-1);return I.deleted&&e.deleted||I.pos>=e.pos?null:new Ks(I.pos,e.pos,this.mark)}merge(g){return g instanceof Ks&&g.mark.eq(this.mark)&&this.from<=g.to&&this.to>=g.from?new Ks(Math.min(this.from,g.from),Math.max(this.to,g.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(g,I){if(typeof I.from!="number"||typeof I.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Ks(I.from,I.to,g.markFromJSON(I.mark))}}Te.jsonID("addMark",Ks);class VA extends Te{constructor(g,I,e){super(),this.from=g,this.to=I,this.mark=e}apply(g){let I=g.slice(this.from,this.to),e=new bg(UV(I.content,t=>t.mark(this.mark.removeFromSet(t.marks)),g),I.openStart,I.openEnd);return JC.fromReplace(g,this.from,this.to,e)}invert(){return new Ks(this.from,this.to,this.mark)}map(g){let I=g.mapResult(this.from,1),e=g.mapResult(this.to,-1);return I.deleted&&e.deleted||I.pos>=e.pos?null:new VA(I.pos,e.pos,this.mark)}merge(g){return g instanceof VA&&g.mark.eq(this.mark)&&this.from<=g.to&&this.to>=g.from?new VA(Math.min(this.from,g.from),Math.max(this.to,g.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(g,I){if(typeof I.from!="number"||typeof I.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new VA(I.from,I.to,g.markFromJSON(I.mark))}}Te.jsonID("removeMark",VA);class ks extends Te{constructor(g,I){super(),this.pos=g,this.mark=I}apply(g){let I=g.nodeAt(this.pos);if(!I)return JC.fail("No node at mark step's position");let e=I.type.create(I.attrs,null,this.mark.addToSet(I.marks));return JC.fromReplace(g,this.pos,this.pos+1,new bg(sg.from(e),0,I.isLeaf?0:1))}invert(g){let I=g.nodeAt(this.pos);if(I){let e=this.mark.addToSet(I.marks);if(e.length==I.marks.length){for(let t=0;t<I.marks.length;t++)if(!I.marks[t].isInSet(e))return new ks(this.pos,I.marks[t]);return new ks(this.pos,this.mark)}}return new Ka(this.pos,this.mark)}map(g){let I=g.mapResult(this.pos,1);return I.deletedAfter?null:new ks(I.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(g,I){if(typeof I.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new ks(I.pos,g.markFromJSON(I.mark))}}Te.jsonID("addNodeMark",ks);class Ka extends Te{constructor(g,I){super(),this.pos=g,this.mark=I}apply(g){let I=g.nodeAt(this.pos);if(!I)return JC.fail("No node at mark step's position");let e=I.type.create(I.attrs,null,this.mark.removeFromSet(I.marks));return JC.fromReplace(g,this.pos,this.pos+1,new bg(sg.from(e),0,I.isLeaf?0:1))}invert(g){let I=g.nodeAt(this.pos);return!I||!this.mark.isInSet(I.marks)?this:new ks(this.pos,this.mark)}map(g){let I=g.mapResult(this.pos,1);return I.deletedAfter?null:new Ka(I.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(g,I){if(typeof I.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Ka(I.pos,g.markFromJSON(I.mark))}}Te.jsonID("removeNodeMark",Ka);class le extends Te{constructor(g,I,e,t=!1){super(),this.from=g,this.to=I,this.slice=e,this.structure=t}apply(g){return this.structure&&EV(g,this.from,this.to)?JC.fail("Structure replace would overwrite content"):JC.fromReplace(g,this.from,this.to,this.slice)}getMap(){return new ei([this.from,this.to-this.from,this.slice.size])}invert(g){return new le(this.from,this.from+this.slice.size,g.slice(this.from,this.to))}map(g){let I=g.mapResult(this.from,1),e=g.mapResult(this.to,-1);return I.deletedAcross&&e.deletedAcross?null:new le(I.pos,Math.max(I.pos,e.pos),this.slice,this.structure)}merge(g){if(!(g instanceof le)||g.structure||this.structure)return null;if(this.from+this.slice.size==g.from&&!this.slice.openEnd&&!g.slice.openStart){let I=this.slice.size+g.slice.size==0?bg.empty:new bg(this.slice.content.append(g.slice.content),this.slice.openStart,g.slice.openEnd);return new le(this.from,this.to+(g.to-g.from),I,this.structure)}else if(g.to==this.from&&!this.slice.openStart&&!g.slice.openEnd){let I=this.slice.size+g.slice.size==0?bg.empty:new bg(g.slice.content.append(this.slice.content),g.slice.openStart,this.slice.openEnd);return new le(g.from,this.to,I,this.structure)}else return null}toJSON(){let g={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(g.slice=this.slice.toJSON()),this.structure&&(g.structure=!0),g}static fromJSON(g,I){if(typeof I.from!="number"||typeof I.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new le(I.from,I.to,bg.fromJSON(g,I.slice),!!I.structure)}}Te.jsonID("replace",le);class se extends Te{constructor(g,I,e,t,i,A,n=!1){super(),this.from=g,this.to=I,this.gapFrom=e,this.gapTo=t,this.slice=i,this.insert=A,this.structure=n}apply(g){if(this.structure&&(EV(g,this.from,this.gapFrom)||EV(g,this.gapTo,this.to)))return JC.fail("Structure gap-replace would overwrite content");let I=g.slice(this.gapFrom,this.gapTo);if(I.openStart||I.openEnd)return JC.fail("Gap is not a flat range");let e=this.slice.insertAt(this.insert,I.content);return e?JC.fromReplace(g,this.from,this.to,e):JC.fail("Content does not fit in gap")}getMap(){return new ei([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(g){let I=this.gapTo-this.gapFrom;return new se(this.from,this.from+this.slice.size+I,this.from+this.insert,this.from+this.insert+I,g.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(g){let I=g.mapResult(this.from,1),e=g.mapResult(this.to,-1),t=this.from==this.gapFrom?I.pos:g.map(this.gapFrom,-1),i=this.to==this.gapTo?e.pos:g.map(this.gapTo,1);return I.deletedAcross&&e.deletedAcross||t<I.pos||i>e.pos?null:new se(I.pos,e.pos,t,i,this.slice,this.insert,this.structure)}toJSON(){let g={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(g.slice=this.slice.toJSON()),this.structure&&(g.structure=!0),g}static fromJSON(g,I){if(typeof I.from!="number"||typeof I.to!="number"||typeof I.gapFrom!="number"||typeof I.gapTo!="number"||typeof I.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new se(I.from,I.to,I.gapFrom,I.gapTo,bg.fromJSON(g,I.slice),I.insert,!!I.structure)}}Te.jsonID("replaceAround",se);function EV(C,g,I){let e=C.resolve(g),t=I-g,i=e.depth;for(;t>0&&i>0&&e.indexAfter(i)==e.node(i).childCount;)i--,t--;if(t>0){let A=e.node(i).maybeChild(e.indexAfter(i));for(;t>0;){if(!A||A.isLeaf)return!0;A=A.firstChild,t--}}return!1}function A4g(C,g,I,e){let t=[],i=[],A,n;C.doc.nodesBetween(g,I,(l,o,a)=>{if(!l.isInline)return;let d=l.marks;if(!e.isInSet(d)&&a.type.allowsMarkType(e.type)){let m=Math.max(o,g),u=Math.min(o+l.nodeSize,I),b=e.addToSet(d);for(let Z=0;Z<d.length;Z++)d[Z].isInSet(b)||(A&&A.to==m&&A.mark.eq(d[Z])?A.to=u:t.push(A=new VA(m,u,d[Z])));n&&n.to==m?n.to=u:i.push(n=new Ks(m,u,e))}}),t.forEach(l=>C.step(l)),i.forEach(l=>C.step(l))}function n4g(C,g,I,e){let t=[],i=0;C.doc.nodesBetween(g,I,(A,n)=>{if(!A.isInline)return;i++;let l=null;if(e instanceof aW){let o=A.marks,a;for(;a=e.isInSet(o);)(l||(l=[])).push(a),o=a.removeFromSet(o)}else e?e.isInSet(A.marks)&&(l=[e]):l=A.marks;if(l&&l.length){let o=Math.min(n+A.nodeSize,I);for(let a=0;a<l.length;a++){let d=l[a],m;for(let u=0;u<t.length;u++){let b=t[u];b.step==i-1&&d.eq(t[u].style)&&(m=b)}m?(m.to=o,m.step=i):t.push({style:d,from:Math.max(n,g),to:o,step:i})}}}),t.forEach(A=>C.step(new VA(A.from,A.to,A.style)))}function PV(C,g,I,e=I.contentMatch,t=!0){let i=C.doc.nodeAt(g),A=[],n=g+1;for(let l=0;l<i.childCount;l++){let o=i.child(l),a=n+o.nodeSize,d=e.matchType(o.type);if(!d)A.push(new le(n,a,bg.empty));else{e=d;for(let m=0;m<o.marks.length;m++)I.allowsMarkType(o.marks[m].type)||C.step(new VA(n,a,o.marks[m]));if(t&&o.isText&&I.whitespace!="pre"){let m,u=/\r?\n|\r/g,b;for(;m=u.exec(o.text);)b||(b=new bg(sg.from(I.schema.text(" ",I.allowedMarks(o.marks))),0,0)),A.push(new le(n+m.index,n+m.index+m[0].length,b))}}n=a}if(!e.validEnd){let l=e.fillBefore(sg.empty,!0);C.replace(n,n,new bg(l,0,0))}for(let l=A.length-1;l>=0;l--)C.step(A[l])}function l4g(C,g,I){return(g==0||C.canReplace(g,C.childCount))&&(I==C.childCount||C.canReplace(0,I))}function dr(C){let I=C.parent.content.cutByIndex(C.startIndex,C.endIndex);for(let e=C.depth;;--e){let t=C.$from.node(e),i=C.$from.index(e),A=C.$to.indexAfter(e);if(e<C.depth&&t.canReplace(i,A,I))return e;if(e==0||t.type.spec.isolating||!l4g(t,i,A))break}return null}function s4g(C,g,I){let{$from:e,$to:t,depth:i}=g,A=e.before(i+1),n=t.after(i+1),l=A,o=n,a=sg.empty,d=0;for(let b=i,Z=!1;b>I;b--)Z||e.index(b)>0?(Z=!0,a=sg.from(e.node(b).copy(a)),d++):l--;let m=sg.empty,u=0;for(let b=i,Z=!1;b>I;b--)Z||t.after(b+1)<t.end(b)?(Z=!0,m=sg.from(t.node(b).copy(m)),u++):o++;C.step(new se(l,o,A,n,new bg(a.append(m),d,u),a.size-d,!0))}function _V(C,g,I=null,e=C){let t=o4g(C,g),i=t&&a4g(e,g);return i?t.map(CK).concat({type:g,attrs:I}).concat(i.map(CK)):null}function CK(C){return{type:C,attrs:null}}function o4g(C,g){let{parent:I,startIndex:e,endIndex:t}=C,i=I.contentMatchAt(e).findWrapping(g);if(!i)return null;let A=i.length?i[0]:g;return I.canReplaceWith(e,t,A)?i:null}function a4g(C,g){let{parent:I,startIndex:e,endIndex:t}=C,i=I.child(e),A=g.contentMatch.findWrapping(i.type);if(!A)return null;let l=(A.length?A[A.length-1]:g).contentMatch;for(let o=e;l&&o<t;o++)l=l.matchType(I.child(o).type);return!l||!l.validEnd?null:A}function d4g(C,g,I){let e=sg.empty;for(let A=I.length-1;A>=0;A--){if(e.size){let n=I[A].type.contentMatch.matchFragment(e);if(!n||!n.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}e=sg.from(I[A].type.create(I[A].attrs,e))}let t=g.start,i=g.end;C.step(new se(t,i,t,i,new bg(e,0,0),I.length,!0))}function c4g(C,g,I,e,t){if(!e.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=C.steps.length;C.doc.nodesBetween(g,I,(A,n)=>{let l=typeof t=="function"?t(A):t;if(A.isTextblock&&!A.hasMarkup(e,l)&&r4g(C.doc,C.mapping.slice(i).map(n),e)){let o=null;if(e.schema.linebreakReplacement){let u=e.whitespace=="pre",b=!!e.contentMatch.matchType(e.schema.linebreakReplacement);u&&!b?o=!1:!u&&b&&(o=!0)}o===!1&&tK(C,A,n,i),PV(C,C.mapping.slice(i).map(n,1),e,void 0,o===null);let a=C.mapping.slice(i),d=a.map(n,1),m=a.map(n+A.nodeSize,1);return C.step(new se(d,m,d+1,m-1,new bg(sg.from(e.create(l,null,A.marks)),0,0),1,!0)),o===!0&&eK(C,A,n,i),!1}})}function eK(C,g,I,e){g.forEach((t,i)=>{if(t.isText){let A,n=/\r?\n|\r/g;for(;A=n.exec(t.text);){let l=C.mapping.slice(e).map(I+1+i+A.index);C.replaceWith(l,l+1,g.type.schema.linebreakReplacement.create())}}})}function tK(C,g,I,e){g.forEach((t,i)=>{if(t.type==t.type.schema.linebreakReplacement){let A=C.mapping.slice(e).map(I+1+i);C.replaceWith(A,A+1,g.type.schema.text(`
|