# ivyforms/0.4/frontend/dist/admin.js

The Innovative Form Builder – IvyForms, version 0.4. 139 lines.

- Page: https://pluginprobe.com/plugins/ivyforms/0.4/code/frontend/dist/admin.js
- Raw: https://pluginprobe.com/plugins/ivyforms/0.4/raw/frontend/dist/admin.js
- Modified: 2025-09-25T14:53:02+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/ivyforms/0.4/code/frontend/dist/admin.js#L10-L20`.

```javascript
import{_ as bt,c as se,r as cc,o as C,b as oI,i as dc,u as Cl,a as O,d as on,e as N3,f as Ps,g as Tl,h as Fa,j as H,k as Mi,T as aI,l as st,m as Ce,n as F3,p as Jn,q as Bl,s as et,t as At,v as he,w as V,x as F,y as ie,F as $e,z as xe,A as h,E as yt,B as ee,C as dn,D as kt,G as Pn,H as Tn,I as er,J as jn,K as La,L as ra,M as L3,N as Rt,O as q0,P as Qo,Q as Fr,R as tr,S as Kt,U as Ea,V as fc,W as Gn,X as yo,Y as Kn,Z as Me,$ as Da,a0 as Xt,a1 as ov,a2 as ys,a3 as Wu,a4 as bp,a5 as cg,a6 as z,a7 as En,a8 as lt,a9 as bs,aa as hf,ab as De,ac as ae,ad as Sn,ae as iI,af as sI,ag as Ss,ah as Fo,ai as av,aj as lI,ak as Ml,al as Ta,am as uI,an as I,ao as Ir,ap as vo,aq as cI,ar as dI,as as fI,at as B3,au as pI,av as V3,aw as dg,ax as $n,ay as hI,az as mI,aA as vI,aB as gI,aC as yI,aD as Br,aE as Ca,aF as zn,aG as Sp,aH as Lt,aI as Lo,aJ as z3,aK as H3,aL as Ht,aM as ot,aN as U3,aO as W3,aP as fg,aQ as bI,aR as _s,aS as SI,aT as mf,aU as Si,aV as ju,aW as _i,aX as Fe,aY as pc,aZ as Jo,a_ as _I,a$ as wI,b0 as to,b1 as vu,b2 as j3,b3 as K3,b4 as zd,b5 as xI,b6 as iv,b7 as kI,b8 as CI,b9 as vf,ba as II,bb as ws,bc as EI,bd as Wo,be as sv,bf as Ma,bg as us,bh as pg,bi as TI,bj as Y3,bk as MI,bl as Hd,bm as Ku,bn as OI,bo as hg,bp as AI,bq as PI,br as G0,bs as $I,bt as RI,bu as DI,bv as q3,bw as G3,bx as mg,by as NI,bz as $s,bA as FI,bB as LI,bC as lv,bD as J0,bE as BI,bF as VI,bG as zI,bH as HI,bI as UI,bJ as oi,bK as WI,bL as jI,bM as X0,bN as xs,bO as KI,bP as YI,bQ as qI,bR as GI,bS as Q0,bT as JI,bU as XI,bV as Ba,bW as at,bX as QI,bY as J3,bZ as Vl,b_ as ko,b$ as zl,c0 as Rs,c1 as _t,c2 as Vr,c3 as ZI,c4 as Ds,c5 as it,c6 as xn,c7 as oa,c8 as rn,c9 as Ns,ca as Va,cb as hc,cc as eE,cd as cn,ce as Fs,cf as Ls,cg as No,ch as Na,ci as vd,cj as Bs,ck as tE,cl as nE,cm as Z0,cn as rE,co as oE,cp as aE,cq as iE,cr as Vs,cs as X3,ct as sE,cu as sn,cv as lE,cw as vg,cx as _p,cy as Q3,cz as wp,cA as uE,cB as cE,cC as dE,cD as fE,cE as mc,cF as pE,cG as hE,cH as mE,cI as vE,cJ as gE,cK as yE,cL as bE}from"./chunks/index-Ce77lRKi.js";const SE={};function _E(n,e){const t=cc("RouterView");return C(),se(t)}const wE=bt(SE,[["render",_E]]);var xE=1,kE=4;function eb(n){return oI(n,xE|kE)}const Z3=n=>dc?window.requestAnimationFrame(n):setTimeout(n,16),e4=n=>dc?window.cancelAnimationFrame(n):clearTimeout(n),t4=Symbol("buttonGroupContextKey"),CE=(n,e)=>{Cl({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},O(()=>n.type==="text"));const t=on(t4,void 0),r=N3("button"),{form:o}=Ps(),i=Tl(O(()=>t==null?void 0:t.size)),a=Fa(),s=H(),l=Mi(),c=O(()=>n.type||(t==null?void 0:t.type)||""),d=O(()=>{var v,y,b;return(b=(y=n.autoInsertSpace)!=null?y:(v=r.value)==null?void 0:v.autoInsertSpace)!=null?b:!1}),f=O(()=>n.tag==="button"?{ariaDisabled:a.value||n.loading,disabled:a.value||n.loading,autofocus:n.autofocus,type:n.nativeType}:{}),m=O(()=>{var v;const y=(v=l.default)==null?void 0:v.call(l);if(d.value&&(y==null?void 0:y.length)===1){const b=y[0];if((b==null?void 0:b.type)===aI){const _=b.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(_.trim())}}return!1});return{_disabled:a,_size:i,_type:c,_ref:s,_props:f,shouldAddSpace:m,handleClick:v=>{if(a.value||n.loading){v.stopPropagation();return}n.nativeType==="reset"&&(o==null||o.resetFields()),e("click",v)}}},IE=["default","primary","success","warning","info","danger","text",""],EE=["button","submit","reset"],uv=st({size:Bl,disabled:Boolean,type:{type:String,values:IE,default:""},icon:{type:Jn},nativeType:{type:String,values:EE,default:"button"},loading:Boolean,loadingIcon:{type:Jn,default:()=>F3},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:Ce([String,Object]),default:"button"}}),TE={click:n=>n instanceof MouseEvent};function dr(n,e){ME(n)&&(n="100%");var t=OE(n);return n=e===360?n:Math.min(e,Math.max(0,parseFloat(n))),t&&(n=parseInt(String(n*e),10)/100),Math.abs(n-e)<1e-6?1:(e===360?n=(n<0?n%e+e:n%e)/parseFloat(String(e)):n=n%e/parseFloat(String(e)),n)}function gd(n){return Math.min(1,Math.max(0,n))}function ME(n){return typeof n=="string"&&n.indexOf(".")!==-1&&parseFloat(n)===1}function OE(n){return typeof n=="string"&&n.indexOf("%")!==-1}function n4(n){return n=parseFloat(n),(isNaN(n)||n<0||n>1)&&(n=1),n}function yd(n){return n<=1?"".concat(Number(n)*100,"%"):n}function ts(n){return n.length===1?"0"+n:String(n)}function AE(n,e,t){return{r:dr(n,255)*255,g:dr(e,255)*255,b:dr(t,255)*255}}function tb(n,e,t){n=dr(n,255),e=dr(e,255),t=dr(t,255);var r=Math.max(n,e,t),o=Math.min(n,e,t),i=0,a=0,s=(r+o)/2;if(r===o)a=0,i=0;else{var l=r-o;switch(a=s>.5?l/(2-r-o):l/(r+o),r){case n:i=(e-t)/l+(e<t?6:0);break;case e:i=(t-n)/l+2;break;case t:i=(n-e)/l+4;break}i/=6}return{h:i,s:a,l:s}}function sm(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*(6*t):t<1/2?e:t<2/3?n+(e-n)*(2/3-t)*6:n}function PE(n,e,t){var r,o,i;if(n=dr(n,360),e=dr(e,100),t=dr(t,100),e===0)o=t,i=t,r=t;else{var a=t<.5?t*(1+e):t+e-t*e,s=2*t-a;r=sm(s,a,n+1/3),o=sm(s,a,n),i=sm(s,a,n-1/3)}return{r:r*255,g:o*255,b:i*255}}function nb(n,e,t){n=dr(n,255),e=dr(e,255),t=dr(t,255);var r=Math.max(n,e,t),o=Math.min(n,e,t),i=0,a=r,s=r-o,l=r===0?0:s/r;if(r===o)i=0;else{switch(r){case n:i=(e-t)/s+(e<t?6:0);break;case e:i=(t-n)/s+2;break;case t:i=(n-e)/s+4;break}i/=6}return{h:i,s:l,v:a}}function $E(n,e,t){n=dr(n,360)*6,e=dr(e,100),t=dr(t,100);var r=Math.floor(n),o=n-r,i=t*(1-e),a=t*(1-o*e),s=t*(1-(1-o)*e),l=r%6,c=[t,a,i,i,s,t][l],d=[s,t,t,a,i,i][l],f=[i,i,s,t,t,a][l];return{r:c*255,g:d*255,b:f*255}}function rb(n,e,t,r){var o=[ts(Math.round(n).toString(16)),ts(Math.round(e).toString(16)),ts(Math.round(t).toString(16))];return r&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function RE(n,e,t,r,o){var i=[ts(Math.round(n).toString(16)),ts(Math.round(e).toString(16)),ts(Math.round(t).toString(16)),ts(DE(r))];return o&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))&&i[3].startsWith(i[3].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function DE(n){return Math.round(parseFloat(n)*255).toString(16)}function ob(n){return Gr(n)/255}function Gr(n){return parseInt(n,16)}function NE(n){return{r:n>>16,g:(n&65280)>>8,b:n&255}}var cv={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function FE(n){var e={r:0,g:0,b:0},t=1,r=null,o=null,i=null,a=!1,s=!1;return typeof n=="string"&&(n=VE(n)),typeof n=="object"&&(va(n.r)&&va(n.g)&&va(n.b)?(e=AE(n.r,n.g,n.b),a=!0,s=String(n.r).substr(-1)==="%"?"prgb":"rgb"):va(n.h)&&va(n.s)&&va(n.v)?(r=yd(n.s),o=yd(n.v),e=$E(n.h,r,o),a=!0,s="hsv"):va(n.h)&&va(n.s)&&va(n.l)&&(r=yd(n.s),i=yd(n.l),e=PE(n.h,r,i),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(n,"a")&&(t=n.a)),t=n4(t),{ok:a,format:n.format||s,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:t}}var LE="[-\\+]?\\d+%?",BE="[-\\+]?\\d*\\.\\d+%?",li="(?:".concat(BE,")|(?:").concat(LE,")"),lm="[\\s|\\(]+(".concat(li,")[,|\\s]+(").concat(li,")[,|\\s]+(").concat(li,")\\s*\\)?"),um="[\\s|\\(]+(".concat(li,")[,|\\s]+(").concat(li,")[,|\\s]+(").concat(li,")[,|\\s]+(").concat(li,")\\s*\\)?"),Ao={CSS_UNIT:new RegExp(li),rgb:new RegExp("rgb"+lm),rgba:new RegExp("rgba"+um),hsl:new RegExp("hsl"+lm),hsla:new RegExp("hsla"+um),hsv:new RegExp("hsv"+lm),hsva:new RegExp("hsva"+um),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function VE(n){if(n=n.trim().toLowerCase(),n.length===0)return!1;var e=!1;if(cv[n])n=cv[n],e=!0;else if(n==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t=Ao.rgb.exec(n);return t?{r:t[1],g:t[2],b:t[3]}:(t=Ao.rgba.exec(n),t?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Ao.hsl.exec(n),t?{h:t[1],s:t[2],l:t[3]}:(t=Ao.hsla.exec(n),t?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=Ao.hsv.exec(n),t?{h:t[1],s:t[2],v:t[3]}:(t=Ao.hsva.exec(n),t?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=Ao.hex8.exec(n),t?{r:Gr(t[1]),g:Gr(t[2]),b:Gr(t[3]),a:ob(t[4]),format:e?"name":"hex8"}:(t=Ao.hex6.exec(n),t?{r:Gr(t[1]),g:Gr(t[2]),b:Gr(t[3]),format:e?"name":"hex"}:(t=Ao.hex4.exec(n),t?{r:Gr(t[1]+t[1]),g:Gr(t[2]+t[2]),b:Gr(t[3]+t[3]),a:ob(t[4]+t[4]),format:e?"name":"hex8"}:(t=Ao.hex3.exec(n),t?{r:Gr(t[1]+t[1]),g:Gr(t[2]+t[2]),b:Gr(t[3]+t[3]),format:e?"name":"hex"}:!1)))))))))}function va(n){return!!Ao.CSS_UNIT.exec(String(n))}var r4=function(){function n(e,t){e===void 0&&(e=""),t===void 0&&(t={});var r;if(e instanceof n)return e;typeof e=="number"&&(e=NE(e)),this.originalInput=e;var o=FE(e);this.originalInput=e,this.r=o.r,this.g=o.g,this.b=o.b,this.a=o.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=t.format)!==null&&r!==void 0?r:o.format,this.gradientType=t.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=o.ok}return n.prototype.isDark=function(){return this.getBrightness()<128},n.prototype.isLight=function(){return!this.isDark()},n.prototype.getBrightness=function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},n.prototype.getLuminance=function(){var e=this.toRgb(),t,r,o,i=e.r/255,a=e.g/255,s=e.b/255;return i<=.03928?t=i/12.92:t=Math.pow((i+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?o=s/12.92:o=Math.pow((s+.055)/1.055,2.4),.2126*t+.7152*r+.0722*o},n.prototype.getAlpha=function(){return this.a},n.prototype.setAlpha=function(e){return this.a=n4(e),this.roundA=Math.round(100*this.a)/100,this},n.prototype.isMonochrome=function(){var e=this.toHsl().s;return e===0},n.prototype.toHsv=function(){var e=nb(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}},n.prototype.toHsvString=function(){var e=nb(this.r,this.g,this.b),t=Math.round(e.h*360),r=Math.round(e.s*100),o=Math.round(e.v*100);return this.a===1?"hsv(".concat(t,", ").concat(r,"%, ").concat(o,"%)"):"hsva(".concat(t,", ").concat(r,"%, ").concat(o,"%, ").concat(this.roundA,")")},n.prototype.toHsl=function(){var e=tb(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}},n.prototype.toHslString=function(){var e=tb(this.r,this.g,this.b),t=Math.round(e.h*360),r=Math.round(e.s*100),o=Math.round(e.l*100);return this.a===1?"hsl(".concat(t,", ").concat(r,"%, ").concat(o,"%)"):"hsla(".concat(t,", ").concat(r,"%, ").concat(o,"%, ").concat(this.roundA,")")},n.prototype.toHex=function(e){return e===void 0&&(e=!1),rb(this.r,this.g,this.b,e)},n.prototype.toHexString=function(e){return e===void 0&&(e=!1),"#"+this.toHex(e)},n.prototype.toHex8=function(e){return e===void 0&&(e=!1),RE(this.r,this.g,this.b,this.a,e)},n.prototype.toHex8String=function(e){return e===void 0&&(e=!1),"#"+this.toHex8(e)},n.prototype.toHexShortString=function(e){return e===void 0&&(e=!1),this.a===1?this.toHexString(e):this.toHex8String(e)},n.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},n.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(e,", ").concat(t,", ").concat(r,")"):"rgba(".concat(e,", ").concat(t,", ").concat(r,", ").concat(this.roundA,")")},n.prototype.toPercentageRgb=function(){var e=function(t){return"".concat(Math.round(dr(t,255)*100),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},n.prototype.toPercentageRgbString=function(){var e=function(t){return Math.round(dr(t,255)*100)};return this.a===1?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},n.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var e="#"+rb(this.r,this.g,this.b,!1),t=0,r=Object.entries(cv);t<r.length;t++){var o=r[t],i=o[0],a=o[1];if(e===a)return i}return!1},n.prototype.toString=function(e){var t=!!e;e=e??this.format;var r=!1,o=this.a<1&&this.a>=0,i=!t&&o&&(e.startsWith("hex")||e==="name");return i?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},n.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},n.prototype.clone=function(){return new n(this.toString())},n.prototype.lighten=function(e){e===void 0&&(e=10);var t=this.toHsl();return t.l+=e/100,t.l=gd(t.l),new n(t)},n.prototype.brighten=function(e){e===void 0&&(e=10);var t=this.toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(e/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(e/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(e/100)))),new n(t)},n.prototype.darken=function(e){e===void 0&&(e=10);var t=this.toHsl();return t.l-=e/100,t.l=gd(t.l),new n(t)},n.prototype.tint=function(e){return e===void 0&&(e=10),this.mix("white",e)},n.prototype.shade=function(e){return e===void 0&&(e=10),this.mix("black",e)},n.prototype.desaturate=function(e){e===void 0&&(e=10);var t=this.toHsl();return t.s-=e/100,t.s=gd(t.s),new n(t)},n.prototype.saturate=function(e){e===void 0&&(e=10);var t=this.toHsl();return t.s+=e/100,t.s=gd(t.s),new n(t)},n.prototype.greyscale=function(){return this.desaturate(100)},n.prototype.spin=function(e){var t=this.toHsl(),r=(t.h+e)%360;return t.h=r<0?360+r:r,new n(t)},n.prototype.mix=function(e,t){t===void 0&&(t=50);var r=this.toRgb(),o=new n(e).toRgb(),i=t/100,a={r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a};return new n(a)},n.prototype.analogous=function(e,t){e===void 0&&(e=6),t===void 0&&(t=30);var r=this.toHsl(),o=360/t,i=[this];for(r.h=(r.h-(o*e>>1)+720)%360;--e;)r.h=(r.h+o)%360,i.push(new n(r));return i},n.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new n(e)},n.prototype.monochromatic=function(e){e===void 0&&(e=6);for(var t=this.toHsv(),r=t.h,o=t.s,i=t.v,a=[],s=1/e;e--;)a.push(new n({h:r,s:o,v:i})),i=(i+s)%1;return a},n.prototype.splitcomplement=function(){var e=this.toHsl(),t=e.h;return[this,new n({h:(t+72)%360,s:e.s,l:e.l}),new n({h:(t+216)%360,s:e.s,l:e.l})]},n.prototype.onBackground=function(e){var t=this.toRgb(),r=new n(e).toRgb(),o=t.a+r.a*(1-t.a);return new n({r:(t.r*t.a+r.r*r.a*(1-t.a))/o,g:(t.g*t.a+r.g*r.a*(1-t.a))/o,b:(t.b*t.a+r.b*r.a*(1-t.a))/o,a:o})},n.prototype.triad=function(){return this.polyad(3)},n.prototype.tetrad=function(){return this.polyad(4)},n.prototype.polyad=function(e){for(var t=this.toHsl(),r=t.h,o=[this],i=360/e,a=1;a<e;a++)o.push(new n({h:(r+a*i)%360,s:t.s,l:t.l}));return o},n.prototype.equals=function(e){return this.toRgbString()===new n(e).toRgbString()},n}();function Xa(n,e=20){return n.mix("#141414",e).toString()}function zE(n){const e=Fa(),t=et("button");return O(()=>{let r={},o=n.color;if(o){const i=o.match(/var\((.*?)\)/);i&&(o=window.getComputedStyle(window.document.documentElement).getPropertyValue(i[1]));const a=new r4(o),s=n.dark?a.tint(20).toString():Xa(a,20);if(n.plain)r=t.cssVarBlock({"bg-color":n.dark?Xa(a,90):a.tint(90).toString(),"text-color":o,"border-color":n.dark?Xa(a,50):a.tint(50).toString(),"hover-text-color":`var(${t.cssVarName("color-white")})`,"hover-bg-color":o,"hover-border-color":o,"active-bg-color":s,"active-text-color":`var(${t.cssVarName("color-white")})`,"active-border-color":s}),e.value&&(r[t.cssVarBlockName("disabled-bg-color")]=n.dark?Xa(a,90):a.tint(90).toString(),r[t.cssVarBlockName("disabled-text-color")]=n.dark?Xa(a,50):a.tint(50).toString(),r[t.cssVarBlockName("disabled-border-color")]=n.dark?Xa(a,80):a.tint(80).toString());else{const l=n.dark?Xa(a,30):a.tint(30).toString(),c=a.isDark()?`var(${t.cssVarName("color-white")})`:`var(${t.cssVarName("color-black")})`;if(r=t.cssVarBlock({"bg-color":o,"text-color":c,"border-color":o,"hover-bg-color":l,"hover-text-color":c,"hover-border-color":l,"active-bg-color":s,"active-border-color":s}),e.value){const d=n.dark?Xa(a,50):a.tint(50).toString();r[t.cssVarBlockName("disabled-bg-color")]=d,r[t.cssVarBlockName("disabled-text-color")]=n.dark?"rgba(255, 255, 255, 0.5)":`var(${t.cssVarName("color-white")})`,r[t.cssVarBlockName("disabled-border-color")]=d}}}return r})}const HE=he({name:"ElButton"}),UE=he({...HE,props:uv,emits:TE,setup(n,{expose:e,emit:t}){const r=n,o=zE(r),i=et("button"),{_ref:a,_size:s,_type:l,_disabled:c,_props:d,shouldAddSpace:f,handleClick:m}=CE(r,t),g=O(()=>[i.b(),i.m(l.value),i.m(s.value),i.is("disabled",c.value),i.is("loading",r.loading),i.is("plain",r.plain),i.is("round",r.round),i.is("circle",r.circle),i.is("text",r.text),i.is("link",r.link),i.is("has-bg",r.bg)]);return e({ref:a,size:s,type:l,disabled:c,shouldAddSpace:f}),(v,y)=>(C(),se(dn(v.tag),kt({ref_key:"_ref",ref:a},h(d),{class:h(g),style:h(o),onClick:h(m)}),{default:V(()=>[v.loading?(C(),F($e,{key:0},[v.$slots.loading?xe(v.$slots,"loading",{key:0}):(C(),se(h(yt),{key:1,class:ee(h(i).is("loading"))},{default:V(()=>[(C(),se(dn(v.loadingIcon)))]),_:1},8,["class"]))],64)):v.icon||v.$slots.icon?(C(),se(h(yt),{key:1},{default:V(()=>[v.icon?(C(),se(dn(v.icon),{key:0})):xe(v.$slots,"icon",{key:1})]),_:3})):ie("v-if",!0),v.$slots.default?(C(),F("span",{key:2,class:ee({[h(i).em("text","expand")]:h(f)})},[xe(v.$slots,"default")],2)):ie("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var WE=At(UE,[["__file","button.vue"]]);const jE={size:uv.size,type:uv.type},KE=he({name:"ElButtonGroup"}),YE=he({...KE,props:jE,setup(n){const e=n;Pn(t4,Tn({size:er(e,"size"),type:er(e,"type")}));const t=et("button");return(r,o)=>(C(),F("div",{class:ee(h(t).b("group"))},[xe(r.$slots,"default")],2))}});var o4=At(YE,[["__file","button-group.vue"]]);const gf=jn(WE,{ButtonGroup:o4});La(o4);var Ud={exports:{}},qE=Ud.exports,ab;function GE(){return ab||(ab=1,function(n,e){(function(t,r){n.exports=r()})(qE,function(){var t=1e3,r=6e4,o=36e5,i="millisecond",a="second",s="minute",l="hour",c="day",d="week",f="month",m="quarter",g="year",v="date",y="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(G){var N=["th","st","nd","rd"],R=G%100;return"["+G+(N[(R-20)%10]||N[R]||N[0])+"]"}},T=function(G,N,R){var X=String(G);return!X||X.length>=N?G:""+Array(N+1-X.length).join(R)+G},k={s:T,z:function(G){var N=-G.utcOffset(),R=Math.abs(N),X=Math.floor(R/60),te=R%60;return(N<=0?"+":"-")+T(X,2,"0")+":"+T(te,2,"0")},m:function G(N,R){if(N.date()<R.date())return-G(R,N);var X=12*(R.year()-N.year())+(R.month()-N.month()),te=N.clone().add(X,f),Y=R-te<0,re=N.clone().add(X+(Y?-1:1),f);return+(-(X+(R-te)/(Y?te-re:re-te))||0)},a:function(G){return G<0?Math.ceil(G)||0:Math.floor(G)},p:function(G){return{M:f,y:g,w:d,d:c,D:v,h:l,m:s,s:a,ms:i,Q:m}[G]||String(G||"").toLowerCase().replace(/s$/,"")},u:function(G){return G===void 0}},x="en",M={};M[x]=w;var D="$isDayjsObject",A=function(G){return G instanceof j||!(!G||!G[D])},P=function G(N,R,X){var te;if(!N)return x;if(typeof N=="string"){var Y=N.toLowerCase();M[Y]&&(te=Y),R&&(M[Y]=R,te=Y);var re=N.split("-");if(!te&&re.length>1)return G(re[0])}else{var Q=N.name;M[Q]=N,te=Q}return!X&&te&&(x=te),te||!X&&x},$=function(G,N){if(A(G))return G.clone();var R=typeof N=="object"?N:{};return R.date=G,R.args=arguments,new j(R)},B=k;B.l=P,B.i=A,B.w=function(G,N){return $(G,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var j=function(){function G(R){this.$L=P(R.locale,null,!0),this.parse(R),this.$x=this.$x||R.x||{},this[D]=!0}var N=G.prototype;return N.parse=function(R){this.$d=function(X){var te=X.date,Y=X.utc;if(te===null)return new Date(NaN);if(B.u(te))return new Date;if(te instanceof Date)return new Date(te);if(typeof te=="string"&&!/Z$/i.test(te)){var re=te.match(b);if(re){var Q=re[2]-1||0,Z=(re[7]||"0").substring(0,3);return Y?new Date(Date.UTC(re[1],Q,re[3]||1,re[4]||0,re[5]||0,re[6]||0,Z)):new Date(re[1],Q,re[3]||1,re[4]||0,re[5]||0,re[6]||0,Z)}}return new Date(te)}(R),this.init()},N.init=function(){var R=this.$d;this.$y=R.getFullYear(),this.$M=R.getMonth(),this.$D=R.getDate(),this.$W=R.getDay(),this.$H=R.getHours(),this.$m=R.getMinutes(),this.$s=R.getSeconds(),this.$ms=R.getMilliseconds()},N.$utils=function(){return B},N.isValid=function(){return this.$d.toString()!==y},N.isSame=function(R,X){var te=$(R);return this.startOf(X)<=te&&te<=this.endOf(X)},N.isAfter=function(R,X){return $(R)<this.startOf(X)},N.isBefore=function(R,X){return this.endOf(X)<$(R)},N.$g=function(R,X,te){return B.u(R)?this[X]:this.set(te,R)},N.unix=function(){return Math.floor(this.valueOf()/1e3)},N.valueOf=function(){return this.$d.getTime()},N.startOf=function(R,X){var te=this,Y=!!B.u(X)||X,re=B.p(R),Q=function(Ge,mt){var ut=B.w(te.$u?Date.UTC(te.$y,mt,Ge):new Date(te.$y,mt,Ge),te);return Y?ut:ut.endOf(c)},Z=function(Ge,mt){return B.w(te.toDate()[Ge].apply(te.toDate("s"),(Y?[0,0,0,0]:[23,59,59,999]).slice(mt)),te)},q=this.$W,le=this.$M,ye=this.$D,Re="set"+(this.$u?"UTC":"");switch(re){case g:return Y?Q(1,0):Q(31,11);case f:return Y?Q(1,le):Q(0,le+1);case d:var ze=this.$locale().weekStart||0,nt=(q<ze?q+7:q)-ze;return Q(Y?ye-nt:ye+(6-nt),le);case c:case v:return Z(Re+"Hours",0);case l:return Z(Re+"Minutes",1);case s:return Z(Re+"Seconds",2);case a:return Z(Re+"Milliseconds",3);default:return this.clone()}},N.endOf=function(R){return this.startOf(R,!1)},N.$set=function(R,X){var te,Y=B.p(R),re="set"+(this.$u?"UTC":""),Q=(te={},te[c]=re+"Date",te[v]=re+"Date",te[f]=re+"Month",te[g]=re+"FullYear",te[l]=re+"Hours",te[s]=re+"Minutes",te[a]=re+"Seconds",te[i]=re+"Milliseconds",te)[Y],Z=Y===c?this.$D+(X-this.$W):X;if(Y===f||Y===g){var q=this.clone().set(v,1);q.$d[Q](Z),q.init(),this.$d=q.set(v,Math.min(this.$D,q.daysInMonth())).$d}else Q&&this.$d[Q](Z);return this.init(),this},N.set=function(R,X){return this.clone().$set(R,X)},N.get=function(R){return this[B.p(R)]()},N.add=function(R,X){var te,Y=this;R=Number(R);var re=B.p(X),Q=function(le){var ye=$(Y);return B.w(ye.date(ye.date()+Math.round(le*R)),Y)};if(re===f)return this.set(f,this.$M+R);if(re===g)return this.set(g,this.$y+R);if(re===c)return Q(1);if(re===d)return Q(7);var Z=(te={},te[s]=r,te[l]=o,te[a]=t,te)[re]||1,q=this.$d.getTime()+R*Z;return B.w(q,this)},N.subtract=function(R,X){return this.add(-1*R,X)},N.format=function(R){var X=this,te=this.$locale();if(!this.isValid())return te.invalidDate||y;var Y=R||"YYYY-MM-DDTHH:mm:ssZ",re=B.z(this),Q=this.$H,Z=this.$m,q=this.$M,le=te.weekdays,ye=te.months,Re=te.meridiem,ze=function(mt,ut,Pt,gt){return mt&&(mt[ut]||mt(X,Y))||Pt[ut].slice(0,gt)},nt=function(mt){return B.s(Q%12||12,mt,"0")},Ge=Re||function(mt,ut,Pt){var gt=mt<12?"AM":"PM";return Pt?gt.toLowerCase():gt};return Y.replace(_,function(mt,ut){return ut||function(Pt){switch(Pt){case"YY":return String(X.$y).slice(-2);case"YYYY":return B.s(X.$y,4,"0");case"M":return q+1;case"MM":return B.s(q+1,2,"0");case"MMM":return ze(te.monthsShort,q,ye,3);case"MMMM":return ze(ye,q);case"D":return X.$D;case"DD":return B.s(X.$D,2,"0");case"d":return String(X.$W);case"dd":return ze(te.weekdaysMin,X.$W,le,2);case"ddd":return ze(te.weekdaysShort,X.$W,le,3);case"dddd":return le[X.$W];case"H":return String(Q);case"HH":return B.s(Q,2,"0");case"h":return nt(1);case"hh":return nt(2);case"a":return Ge(Q,Z,!0);case"A":return Ge(Q,Z,!1);case"m":return String(Z);case"mm":return B.s(Z,2,"0");case"s":return String(X.$s);case"ss":return B.s(X.$s,2,"0");case"SSS":return B.s(X.$ms,3,"0");case"Z":return re}return null}(mt)||re.replace(":","")})},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.diff=function(R,X,te){var Y,re=this,Q=B.p(X),Z=$(R),q=(Z.utcOffset()-this.utcOffset())*r,le=this-Z,ye=function(){return B.m(re,Z)};switch(Q){case g:Y=ye()/12;break;case f:Y=ye();break;case m:Y=ye()/3;break;case d:Y=(le-q)/6048e5;break;case c:Y=(le-q)/864e5;break;case l:Y=le/o;break;case s:Y=le/r;break;case a:Y=le/t;break;default:Y=le}return te?Y:B.a(Y)},N.daysInMonth=function(){return this.endOf(f).$D},N.$locale=function(){return M[this.$L]},N.locale=function(R,X){if(!R)return this.$L;var te=this.clone(),Y=P(R,X,!0);return Y&&(te.$L=Y),te},N.clone=function(){return B.w(this.$d,this)},N.toDate=function(){return new Date(this.valueOf())},N.toJSON=function(){return this.isValid()?this.toISOString():null},N.toISOString=function(){return this.$d.toISOString()},N.toString=function(){return this.$d.toUTCString()},G}(),U=j.prototype;return $.prototype=U,[["$ms",i],["$s",a],["$m",s],["$H",l],["$W",c],["$M",f],["$y",g],["$D",v]].forEach(function(G){U[G[1]]=function(N){return this.$g(N,G[0],G[1])}}),$.extend=function(G,N){return G.$i||(G(N,j,$),G.$i=!0),$},$.locale=P,$.isDayjs=A,$.unix=function(G){return $(1e3*G)},$.en=M[x],$.Ls=M,$.p={},$})}(Ud)),Ud.exports}var JE=GE();const Qe=ra(JE),cm=(n,e)=>[n>0?n-1:void 0,n,n<e?n+1:void 0],a4=n=>Array.from(Array.from({length:n}).keys()),i4=n=>n.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),s4=n=>n.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),ib=function(n,e){const t=q0(n),r=q0(e);return t&&r?n.getTime()===e.getTime():!t&&!r?n===e:!1},sb=function(n,e){const t=Rt(n),r=Rt(e);return t&&r?n.length!==e.length?!1:n.every((o,i)=>ib(o,e[i])):!t&&!r?ib(n,e):!1},lb=function(n,e,t){const r=L3(e)||e==="x"?Qe(n).locale(t):Qe(n,e).locale(t);return r.isValid()?r:void 0},ub=function(n,e,t){return L3(e)?n:e==="x"?+n:Qe(n).locale(t).format(e)},dm=(n,e)=>{var t;const r=[],o=e==null?void 0:e();for(let i=0;i<n;i++)r.push((t=o==null?void 0:o.includes(i))!=null?t:!1);return r},bd=n=>Rt(n)?n.map(e=>e.toDate()):n.toDate();var Wd={exports:{}},XE=Wd.exports,cb;function QE(){return cb||(cb=1,function(n,e){(function(t,r){n.exports=r()})(XE,function(){return function(t,r,o){var i=r.prototype,a=function(f){return f&&(f.indexOf?f:f.s)},s=function(f,m,g,v,y){var b=f.name?f:f.$locale(),_=a(b[m]),w=a(b[g]),T=_||w.map(function(x){return x.slice(0,v)});if(!y)return T;var k=b.weekStart;return T.map(function(x,M){return T[(M+(k||0))%7]})},l=function(){return o.Ls[o.locale()]},c=function(f,m){return f.formats[m]||function(g){return g.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(v,y,b){return y||b.slice(1)})}(f.formats[m.toUpperCase()])},d=function(){var f=this;return{months:function(m){return m?m.format("MMMM"):s(f,"months")},monthsShort:function(m){return m?m.format("MMM"):s(f,"monthsShort","months",3)},firstDayOfWeek:function(){return f.$locale().weekStart||0},weekdays:function(m){return m?m.format("dddd"):s(f,"weekdays")},weekdaysMin:function(m){return m?m.format("dd"):s(f,"weekdaysMin","weekdays",2)},weekdaysShort:function(m){return m?m.format("ddd"):s(f,"weekdaysShort","weekdays",3)},longDateFormat:function(m){return c(f.$locale(),m)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};i.localeData=function(){return d.bind(this)()},o.localeData=function(){var f=l();return{firstDayOfWeek:function(){return f.weekStart||0},weekdays:function(){return o.weekdays()},weekdaysShort:function(){return o.weekdaysShort()},weekdaysMin:function(){return o.weekdaysMin()},months:function(){return o.months()},monthsShort:function(){return o.monthsShort()},longDateFormat:function(m){return c(f,m)},meridiem:f.meridiem,ordinal:f.ordinal}},o.months=function(){return s(l(),"months")},o.monthsShort=function(){return s(l(),"monthsShort","months",3)},o.weekdays=function(f){return s(l(),"weekdays",null,null,f)},o.weekdaysShort=function(f){return s(l(),"weekdaysShort","weekdays",3,f)},o.weekdaysMin=function(f){return s(l(),"weekdaysMin","weekdays",2,f)}}})}(Wd)),Wd.exports}var ZE=QE();const eT=ra(ZE),tT=["year","years","month","months","date","dates","week","datetime","datetimerange","daterange","monthrange","yearrange"];var jd=(n=>(n[n.TEXT=1]="TEXT",n[n.CLASS=2]="CLASS",n[n.STYLE=4]="STYLE",n[n.PROPS=8]="PROPS",n[n.FULL_PROPS=16]="FULL_PROPS",n[n.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",n[n.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",n[n.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",n[n.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",n[n.NEED_PATCH=512]="NEED_PATCH",n[n.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",n[n.HOISTED=-1]="HOISTED",n[n.BAIL=-2]="BAIL",n))(jd||{});const Tu=n=>{const e=Rt(n)?n:[n],t=[];return e.forEach(r=>{var o;Rt(r)?t.push(...Tu(r)):Qo(r)&&((o=r.component)!=null&&o.subTree)?t.push(r,...Tu(r.component.subTree)):Qo(r)&&Rt(r.children)?t.push(...Tu(r.children)):t.push(r)}),t},nT=(n,e,t)=>Tu(n.subTree).filter(i=>{var a;return Qo(i)&&((a=i.type)==null?void 0:a.name)===e&&!!i.component}).map(i=>i.component.uid).map(i=>t[i]).filter(i=>!!i),rT=(n,e)=>{const t={},r=Fr([]);return{children:r,addChild:a=>{t[a.uid]=a,r.value=nT(n,e,t)},removeChild:a=>{delete t[a],r.value=r.value.filter(s=>s.uid!==a)}}},l4={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:Bl,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},...fc(["ariaControls"])},u4={[Gn]:n=>tr(n)||Kt(n)||Ea(n),change:n=>tr(n)||Kt(n)||Ea(n)},Hl=Symbol("checkboxGroupContextKey"),oT=({model:n,isChecked:e})=>{const t=on(Hl,void 0),r=O(()=>{var i,a;const s=(i=t==null?void 0:t.max)==null?void 0:i.value,l=(a=t==null?void 0:t.min)==null?void 0:a.value;return!yo(s)&&n.value.length>=s&&!e.value||!yo(l)&&n.value.length<=l&&e.value});return{isDisabled:Fa(O(()=>(t==null?void 0:t.disabled.value)||r.value)),isLimitDisabled:r}},aT=(n,{model:e,isLimitExceeded:t,hasOwnLabel:r,isDisabled:o,isLabeledByFormItem:i})=>{const a=on(Hl,void 0),{formItem:s}=Ps(),{emit:l}=Kn();function c(v){var y,b,_,w;return[!0,n.trueValue,n.trueLabel].includes(v)?(b=(y=n.trueValue)!=null?y:n.trueLabel)!=null?b:!0:(w=(_=n.falseValue)!=null?_:n.falseLabel)!=null?w:!1}function d(v,y){l("change",c(v),y)}function f(v){if(t.value)return;const y=v.target;l("change",c(y.checked),v)}async function m(v){t.value||!r.value&&!o.value&&i.value&&(v.composedPath().some(_=>_.tagName==="LABEL")||(e.value=c([!1,n.falseValue,n.falseLabel].includes(e.value)),await Xt(),d(e.value,v)))}const g=O(()=>(a==null?void 0:a.validateEvent)||n.validateEvent);return Me(()=>n.modelValue,()=>{g.value&&(s==null||s.validate("change").catch(v=>Da()))}),{handleChange:f,onClickRoot:m}},iT=n=>{const e=H(!1),{emit:t}=Kn(),r=on(Hl,void 0),o=O(()=>yo(r)===!1),i=H(!1),a=O({get(){var s,l;return o.value?(s=r==null?void 0:r.modelValue)==null?void 0:s.value:(l=n.modelValue)!=null?l:e.value},set(s){var l,c;o.value&&Rt(s)?(i.value=((l=r==null?void 0:r.max)==null?void 0:l.value)!==void 0&&s.length>(r==null?void 0:r.max.value)&&s.length>a.value.length,i.value===!1&&((c=r==null?void 0:r.changeEvent)==null||c.call(r,s))):(t(Gn,s),e.value=s)}});return{model:a,isGroup:o,isLimitExceeded:i}},sT=(n,e,{model:t})=>{const r=on(Hl,void 0),o=H(!1),i=O(()=>ov(n.value)?n.label:n.value),a=O(()=>{const d=t.value;return Ea(d)?d:Rt(d)?ys(i.value)?d.map(Wu).some(f=>bp(f,i.value)):d.map(Wu).includes(i.value):d!=null?d===n.trueValue||d===n.trueLabel:!!d}),s=Tl(O(()=>{var d;return(d=r==null?void 0:r.size)==null?void 0:d.value}),{prop:!0}),l=Tl(O(()=>{var d;return(d=r==null?void 0:r.size)==null?void 0:d.value})),c=O(()=>!!e.default||!ov(i.value));return{checkboxButtonSize:s,isChecked:a,isFocused:o,checkboxSize:l,hasOwnLabel:c,actualValue:i}},c4=(n,e)=>{const{formItem:t}=Ps(),{model:r,isGroup:o,isLimitExceeded:i}=iT(n),{isFocused:a,isChecked:s,checkboxButtonSize:l,checkboxSize:c,hasOwnLabel:d,actualValue:f}=sT(n,e,{model:r}),{isDisabled:m}=oT({model:r,isChecked:s}),{inputId:g,isLabeledByFormItem:v}=cg(n,{formItemContext:t,disableIdGeneration:d,disableIdManagement:o}),{handleChange:y,onClickRoot:b}=aT(n,{model:r,isLimitExceeded:i,hasOwnLabel:d,isDisabled:m,isLabeledByFormItem:v});return(()=>{function w(){var T,k;Rt(r.value)&&!r.value.includes(f.value)?r.value.push(f.value):r.value=(k=(T=n.trueValue)!=null?T:n.trueLabel)!=null?k:!0}n.checked&&w()})(),Cl({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},O(()=>o.value&&ov(n.value))),Cl({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},O(()=>!!n.trueLabel)),Cl({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},O(()=>!!n.falseLabel)),{inputId:g,isLabeledByFormItem:v,isChecked:s,isDisabled:m,isFocused:a,checkboxButtonSize:l,checkboxSize:c,hasOwnLabel:d,model:r,actualValue:f,handleChange:y,onClickRoot:b}},lT=he({name:"ElCheckbox"}),uT=he({...lT,props:l4,emits:u4,setup(n){const e=n,t=Mi(),{inputId:r,isLabeledByFormItem:o,isChecked:i,isDisabled:a,isFocused:s,checkboxSize:l,hasOwnLabel:c,model:d,actualValue:f,handleChange:m,onClickRoot:g}=c4(e,t),v=et("checkbox"),y=O(()=>[v.b(),v.m(l.value),v.is("disabled",a.value),v.is("bordered",e.border),v.is("checked",i.value)]),b=O(()=>[v.e("input"),v.is("disabled",a.value),v.is("checked",i.value),v.is("indeterminate",e.indeterminate),v.is("focus",s.value)]);return(_,w)=>(C(),se(dn(!h(c)&&h(o)?"span":"label"),{class:ee(h(y)),"aria-controls":_.indeterminate?_.ariaControls:null,onClick:h(g)},{default:V(()=>{var T,k,x,M;return[z("span",{class:ee(h(b))},[_.trueValue||_.falseValue||_.trueLabel||_.falseLabel?En((C(),F("input",{key:0,id:h(r),"onUpdate:modelValue":D=>bs(d)?d.value=D:null,class:ee(h(v).e("original")),type:"checkbox",indeterminate:_.indeterminate,name:_.name,tabindex:_.tabindex,disabled:h(a),"true-value":(k=(T=_.trueValue)!=null?T:_.trueLabel)!=null?k:!0,"false-value":(M=(x=_.falseValue)!=null?x:_.falseLabel)!=null?M:!1,onChange:h(m),onFocus:D=>s.value=!0,onBlur:D=>s.value=!1,onClick:lt(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[hf,h(d)]]):En((C(),F("input",{key:1,id:h(r),"onUpdate:modelValue":D=>bs(d)?d.value=D:null,class:ee(h(v).e("original")),type:"checkbox",indeterminate:_.indeterminate,disabled:h(a),value:h(f),name:_.name,tabindex:_.tabindex,onChange:h(m),onFocus:D=>s.value=!0,onBlur:D=>s.value=!1,onClick:lt(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","disabled","value","name","tabindex","onChange","onFocus","onBlur","onClick"])),[[hf,h(d)]]),z("span",{class:ee(h(v).e("inner"))},null,2)],2),h(c)?(C(),F("span",{key:0,class:ee(h(v).e("label"))},[xe(_.$slots,"default"),_.$slots.default?ie("v-if",!0):(C(),F($e,{key:0},[De(ae(_.label),1)],64))],2)):ie("v-if",!0)]}),_:3},8,["class","aria-controls","onClick"]))}});var cT=At(uT,[["__file","checkbox.vue"]]);const dT=he({name:"ElCheckboxButton"}),fT=he({...dT,props:l4,emits:u4,setup(n){const e=n,t=Mi(),{isFocused:r,isChecked:o,isDisabled:i,checkboxButtonSize:a,model:s,actualValue:l,handleChange:c}=c4(e,t),d=on(Hl,void 0),f=et("checkbox"),m=O(()=>{var v,y,b,_;const w=(y=(v=d==null?void 0:d.fill)==null?void 0:v.value)!=null?y:"";return{backgroundColor:w,borderColor:w,color:(_=(b=d==null?void 0:d.textColor)==null?void 0:b.value)!=null?_:"",boxShadow:w?`-1px 0 0 0 ${w}`:void 0}}),g=O(()=>[f.b("button"),f.bm("button",a.value),f.is("disabled",i.value),f.is("checked",o.value),f.is("focus",r.value)]);return(v,y)=>{var b,_,w,T;return C(),F("label",{class:ee(h(g))},[v.trueValue||v.falseValue||v.trueLabel||v.falseLabel?En((C(),F("input",{key:0,"onUpdate:modelValue":k=>bs(s)?s.value=k:null,class:ee(h(f).be("button","original")),type:"checkbox",name:v.name,tabindex:v.tabindex,disabled:h(i),"true-value":(_=(b=v.trueValue)!=null?b:v.trueLabel)!=null?_:!0,"false-value":(T=(w=v.falseValue)!=null?w:v.falseLabel)!=null?T:!1,onChange:h(c),onFocus:k=>r.value=!0,onBlur:k=>r.value=!1,onClick:lt(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[hf,h(s)]]):En((C(),F("input",{key:1,"onUpdate:modelValue":k=>bs(s)?s.value=k:null,class:ee(h(f).be("button","original")),type:"checkbox",name:v.name,tabindex:v.tabindex,disabled:h(i),value:h(l),onChange:h(c),onFocus:k=>r.value=!0,onBlur:k=>r.value=!1,onClick:lt(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","value","onChange","onFocus","onBlur","onClick"])),[[hf,h(s)]]),v.$slots.default||v.label?(C(),F("span",{key:2,class:ee(h(f).be("button","inner")),style:Sn(h(o)?h(m):void 0)},[xe(v.$slots,"default",{},()=>[De(ae(v.label),1)])],6)):ie("v-if",!0)],2)}}});var d4=At(fT,[["__file","checkbox-button.vue"]]);const pT=st({modelValue:{type:Ce(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:Bl,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},...fc(["ariaLabel"])}),hT={[Gn]:n=>Rt(n),change:n=>Rt(n)},mT=he({name:"ElCheckboxGroup"}),vT=he({...mT,props:pT,emits:hT,setup(n,{emit:e}){const t=n,r=et("checkbox"),{formItem:o}=Ps(),{inputId:i,isLabeledByFormItem:a}=cg(t,{formItemContext:o}),s=async c=>{e(Gn,c),await Xt(),e("change",c)},l=O({get(){return t.modelValue},set(c){s(c)}});return Pn(Hl,{...iI(sI(t),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:l,changeEvent:s}),Me(()=>t.modelValue,()=>{t.validateEvent&&(o==null||o.validate("change").catch(c=>Da()))}),(c,d)=>{var f;return C(),se(dn(c.tag),{id:h(i),class:ee(h(r).b("group")),role:"group","aria-label":h(a)?void 0:c.ariaLabel||"checkbox-group","aria-labelledby":h(a)?(f=h(o))==null?void 0:f.labelId:void 0},{default:V(()=>[xe(c.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var f4=At(vT,[["__file","checkbox-group.vue"]]);const gT=jn(cT,{CheckboxButton:d4,CheckboxGroup:f4});La(d4);La(f4);const Qr=n=>!n&&n!==0?[]:Rt(n)?n:[n],db=n=>Kt(n)||tr(n)||Rt(n),yT=st({accordion:Boolean,modelValue:{type:Ce([Array,String,Number]),default:()=>Fo([])}}),bT={[Gn]:db,[Ss]:db},p4=Symbol("collapseContextKey"),ST=(n,e)=>{const t=H(av(n.modelValue)),r=i=>{t.value=i;const a=n.accordion?t.value[0]:t.value;e(Gn,a),e(Ss,a)},o=i=>{if(n.accordion)r([t.value[0]===i?"":i]);else{const a=[...t.value],s=a.indexOf(i);s>-1?a.splice(s,1):a.push(i),r(a)}};return Me(()=>n.modelValue,()=>t.value=av(n.modelValue),{deep:!0}),Pn(p4,{activeNames:t,handleItemClick:o}),{activeNames:t,setActiveNames:r}},_T=()=>{const n=et("collapse");return{rootKls:O(()=>n.b())}},wT=he({name:"ElCollapse"}),xT=he({...wT,props:yT,emits:bT,setup(n,{expose:e,emit:t}){const r=n,{activeNames:o,setActiveNames:i}=ST(r,t),{rootKls:a}=_T();return e({activeNames:o,setActiveNames:i}),(s,l)=>(C(),F("div",{class:ee(h(a))},[xe(s.$slots,"default")],2))}});var kT=At(xT,[["__file","collapse.vue"]]);const CT=he({name:"ElCollapseTransition"}),IT=he({...CT,setup(n){const e=et("collapse-transition"),t=o=>{o.style.maxHeight="",o.style.overflow=o.dataset.oldOverflow,o.style.paddingTop=o.dataset.oldPaddingTop,o.style.paddingBottom=o.dataset.oldPaddingBottom},r={beforeEnter(o){o.dataset||(o.dataset={}),o.dataset.oldPaddingTop=o.style.paddingTop,o.dataset.oldPaddingBottom=o.style.paddingBottom,o.style.height&&(o.dataset.elExistsHeight=o.style.height),o.style.maxHeight=0,o.style.paddingTop=0,o.style.paddingBottom=0},enter(o){requestAnimationFrame(()=>{o.dataset.oldOverflow=o.style.overflow,o.dataset.elExistsHeight?o.style.maxHeight=o.dataset.elExistsHeight:o.scrollHeight!==0?o.style.maxHeight=`${o.scrollHeight}px`:o.style.maxHeight=0,o.style.paddingTop=o.dataset.oldPaddingTop,o.style.paddingBottom=o.dataset.oldPaddingBottom,o.style.overflow="hidden"})},afterEnter(o){o.style.maxHeight="",o.style.overflow=o.dataset.oldOverflow},enterCancelled(o){t(o)},beforeLeave(o){o.dataset||(o.dataset={}),o.dataset.oldPaddingTop=o.style.paddingTop,o.dataset.oldPaddingBottom=o.style.paddingBottom,o.dataset.oldOverflow=o.style.overflow,o.style.maxHeight=`${o.scrollHeight}px`,o.style.overflow="hidden"},leave(o){o.scrollHeight!==0&&(o.style.maxHeight=0,o.style.paddingTop=0,o.style.paddingBottom=0)},afterLeave(o){t(o)},leaveCancelled(o){t(o)}};return(o,i)=>(C(),se(Ml,kt({name:h(e).b()},lI(r)),{default:V(()=>[xe(o.$slots,"default")]),_:3},16,["name"]))}});var ET=At(IT,[["__file","collapse-transition.vue"]]);const h4=jn(ET),TT=st({title:{type:String,default:""},name:{type:Ce([String,Number]),default:void 0},icon:{type:Jn,default:Ta},disabled:Boolean}),MT=n=>{const e=on(p4),{namespace:t}=et("collapse"),r=H(!1),o=H(!1),i=uI(),a=O(()=>i.current++),s=O(()=>{var m;return(m=n.name)!=null?m:`${t.value}-id-${i.prefix}-${h(a)}`}),l=O(()=>e==null?void 0:e.activeNames.value.includes(h(s)));return{focusing:r,id:a,isActive:l,handleFocus:()=>{setTimeout(()=>{o.value?o.value=!1:r.value=!0},50)},handleHeaderClick:()=>{n.disabled||(e==null||e.handleItemClick(h(s)),r.value=!1,o.value=!0)},handleEnterClick:()=>{e==null||e.handleItemClick(h(s))}}},OT=(n,{focusing:e,isActive:t,id:r})=>{const o=et("collapse"),i=O(()=>[o.b("item"),o.is("active",h(t)),o.is("disabled",n.disabled)]),a=O(()=>[o.be("item","header"),o.is("active",h(t)),{focusing:h(e)&&!n.disabled}]),s=O(()=>[o.be("item","arrow"),o.is("active",h(t))]),l=O(()=>o.be("item","wrap")),c=O(()=>o.be("item","content")),d=O(()=>o.b(`content-${h(r)}`)),f=O(()=>o.b(`head-${h(r)}`));return{arrowKls:s,headKls:a,rootKls:i,itemWrapperKls:l,itemContentKls:c,scopedContentId:d,scopedHeadId:f}},AT=he({name:"ElCollapseItem"}),PT=he({...AT,props:TT,setup(n,{expose:e}){const t=n,{focusing:r,id:o,isActive:i,handleFocus:a,handleHeaderClick:s,handleEnterClick:l}=MT(t),{arrowKls:c,headKls:d,rootKls:f,itemWrapperKls:m,itemContentKls:g,scopedContentId:v,scopedHeadId:y}=OT(t,{focusing:r,isActive:i,id:o});return e({isActive:i}),(b,_)=>(C(),F("div",{class:ee(h(f))},[z("button",{id:h(y),class:ee(h(d)),"aria-expanded":h(i),"aria-controls":h(v),"aria-describedby":h(v),tabindex:b.disabled?-1:0,type:"button",onClick:h(s),onKeydown:Ir(lt(h(l),["stop","prevent"]),["space","enter"]),onFocus:h(a),onBlur:w=>r.value=!1},[xe(b.$slots,"title",{},()=>[De(ae(b.title),1)]),xe(b.$slots,"icon",{isActive:h(i)},()=>[I(h(yt),{class:ee(h(c))},{default:V(()=>[(C(),se(dn(b.icon)))]),_:1},8,["class"])])],42,["id","aria-expanded","aria-controls","aria-describedby","tabindex","onClick","onKeydown","onFocus","onBlur"]),I(h(h4),null,{default:V(()=>[En(z("div",{id:h(v),role:"region",class:ee(h(m)),"aria-hidden":!h(i),"aria-labelledby":h(y)},[z("div",{class:ee(h(g))},[xe(b.$slots,"default")],2)],10,["id","aria-hidden","aria-labelledby"]),[[vo,h(i)]])]),_:3})],2))}});var m4=At(PT,[["__file","collapse-item.vue"]]);const $T=jn(kT,{CollapseItem:m4}),RT=La(m4),DT=jn(cI);var Kd={exports:{}},NT=Kd.exports,fb;function FT(){return fb||(fb=1,function(n,e){(function(t,r){n.exports=r()})(NT,function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d/,i=/\d\d/,a=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,l={},c=function(b){return(b=+b)+(b>68?1900:2e3)},d=function(b){return function(_){this[b]=+_}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(b){(this.zone||(this.zone={})).offset=function(_){if(!_||_==="Z")return 0;var w=_.match(/([+-]|\d\d)/g),T=60*w[1]+(+w[2]||0);return T===0?0:w[0]==="+"?-T:T}(b)}],m=function(b){var _=l[b];return _&&(_.indexOf?_:_.s.concat(_.f))},g=function(b,_){var w,T=l.meridiem;if(T){for(var k=1;k<=24;k+=1)if(b.indexOf(T(k,0,_))>-1){w=k>12;break}}else w=b===(_?"pm":"PM");return w},v={A:[s,function(b){this.afternoon=g(b,!1)}],a:[s,function(b){this.afternoon=g(b,!0)}],Q:[o,function(b){this.month=3*(b-1)+1}],S:[o,function(b){this.milliseconds=100*+b}],SS:[i,function(b){this.milliseconds=10*+b}],SSS:[/\d{3}/,function(b){this.milliseconds=+b}],s:[a,d("seconds")],ss:[a,d("seconds")],m:[a,d("minutes")],mm:[a,d("minutes")],H:[a,d("hours")],h:[a,d("hours")],HH:[a,d("hours")],hh:[a,d("hours")],D:[a,d("day")],DD:[i,d("day")],Do:[s,function(b){var _=l.ordinal,w=b.match(/\d+/);if(this.day=w[0],_)for(var T=1;T<=31;T+=1)_(T).replace(/\[|\]/g,"")===b&&(this.day=T)}],w:[a,d("week")],ww:[i,d("week")],M:[a,d("month")],MM:[i,d("month")],MMM:[s,function(b){var _=m("months"),w=(m("monthsShort")||_.map(function(T){return T.slice(0,3)})).indexOf(b)+1;if(w<1)throw new Error;this.month=w%12||w}],MMMM:[s,function(b){var _=m("months").indexOf(b)+1;if(_<1)throw new Error;this.month=_%12||_}],Y:[/[+-]?\d+/,d("year")],YY:[i,function(b){this.year=c(b)}],YYYY:[/\d{4}/,d("year")],Z:f,ZZ:f};function y(b){var _,w;_=b,w=l&&l.formats;for(var T=(b=_.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function($,B,j){var U=j&&j.toUpperCase();return B||w[j]||t[j]||w[U].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(G,N,R){return N||R.slice(1)})})).match(r),k=T.length,x=0;x<k;x+=1){var M=T[x],D=v[M],A=D&&D[0],P=D&&D[1];T[x]=P?{regex:A,parser:P}:M.replace(/^\[|\]$/g,"")}return function($){for(var B={},j=0,U=0;j<k;j+=1){var G=T[j];if(typeof G=="string")U+=G.length;else{var N=G.regex,R=G.parser,X=$.slice(U),te=N.exec(X)[0];R.call(B,te),$=$.replace(te,"")}}return function(Y){var re=Y.afternoon;if(re!==void 0){var Q=Y.hours;re?Q<12&&(Y.hours+=12):Q===12&&(Y.hours=0),delete Y.afternoon}}(B),B}}return function(b,_,w){w.p.customParseFormat=!0,b&&b.parseTwoDigitYear&&(c=b.parseTwoDigitYear);var T=_.prototype,k=T.parse;T.parse=function(x){var M=x.date,D=x.utc,A=x.args;this.$u=D;var P=A[1];if(typeof P=="string"){var $=A[2]===!0,B=A[3]===!0,j=$||B,U=A[2];B&&(U=A[2]),l=this.$locale(),!$&&U&&(l=w.Ls[U]),this.$d=function(X,te,Y,re){try{if(["x","X"].indexOf(te)>-1)return new Date((te==="X"?1e3:1)*X);var Q=y(te)(X),Z=Q.year,q=Q.month,le=Q.day,ye=Q.hours,Re=Q.minutes,ze=Q.seconds,nt=Q.milliseconds,Ge=Q.zone,mt=Q.week,ut=new Date,Pt=le||(Z||q?1:ut.getDate()),gt=Z||ut.getFullYear(),tt=0;Z&&!q||(tt=q>0?q-1:ut.getMonth());var Ct,Bt=ye||0,Ne=Re||0,je=ze||0,Be=nt||0;return Ge?new Date(Date.UTC(gt,tt,Pt,Bt,Ne,je,Be+60*Ge.offset*1e3)):Y?new Date(Date.UTC(gt,tt,Pt,Bt,Ne,je,Be)):(Ct=new Date(gt,tt,Pt,Bt,Ne,je,Be),mt&&(Ct=re(Ct).week(mt).toDate()),Ct)}catch{return new Date("")}}(M,P,D,w),this.init(),U&&U!==!0&&(this.$L=this.locale(U).$L),j&&M!=this.format(P)&&(this.$d=new Date("")),l={}}else if(P instanceof Array)for(var G=P.length,N=1;N<=G;N+=1){A[1]=P[N-1];var R=w.apply(this,A);if(R.isValid()){this.$d=R.$d,this.$L=R.$L,this.init();break}N===G&&(this.$d=new Date(""))}else k.call(this,x)}}})}(Kd)),Kd.exports}var LT=FT();const BT=ra(LT);var Yd={exports:{}},VT=Yd.exports,pb;function zT(){return pb||(pb=1,function(n,e){(function(t,r){n.exports=r()})(VT,function(){return function(t,r){var o=r.prototype,i=o.format;o.format=function(a){var s=this,l=this.$locale();if(!this.isValid())return i.bind(this)(a);var c=this.$utils(),d=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(f){switch(f){case"Q":return Math.ceil((s.$M+1)/3);case"Do":return l.ordinal(s.$D);case"gggg":return s.weekYear();case"GGGG":return s.isoWeekYear();case"wo":return l.ordinal(s.week(),"W");case"w":case"ww":return c.s(s.week(),f==="w"?1:2,"0");case"W":case"WW":return c.s(s.isoWeek(),f==="W"?1:2,"0");case"k":case"kk":return c.s(String(s.$H===0?24:s.$H),f==="k"?1:2,"0");case"X":return Math.floor(s.$d.getTime()/1e3);case"x":return s.$d.getTime();case"z":return"["+s.offsetName()+"]";case"zzz":return"["+s.offsetName("long")+"]";default:return f}});return i.bind(this)(d)}}})}(Yd)),Yd.exports}var HT=zT();const UT=ra(HT);var qd={exports:{}},WT=qd.exports,hb;function jT(){return hb||(hb=1,function(n,e){(function(t,r){n.exports=r()})(WT,function(){var t="week",r="year";return function(o,i,a){var s=i.prototype;s.week=function(l){if(l===void 0&&(l=null),l!==null)return this.add(7*(l-this.week()),"day");var c=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var d=a(this).startOf(r).add(1,r).date(c),f=a(this).endOf(t);if(d.isBefore(f))return 1}var m=a(this).startOf(r).date(c).startOf(t).subtract(1,"millisecond"),g=this.diff(m,t,!0);return g<0?a(this).startOf("week").week():Math.ceil(g)},s.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}})}(qd)),qd.exports}var KT=jT();const YT=ra(KT);var Gd={exports:{}},qT=Gd.exports,mb;function GT(){return mb||(mb=1,function(n,e){(function(t,r){n.exports=r()})(qT,function(){return function(t,r){r.prototype.weekYear=function(){var o=this.month(),i=this.week(),a=this.year();return i===1&&o===11?a+1:o===0&&i>=52?a-1:a}}})}(Gd)),Gd.exports}var JT=GT();const XT=ra(JT);var Jd={exports:{}},QT=Jd.exports,vb;function ZT(){return vb||(vb=1,function(n,e){(function(t,r){n.exports=r()})(QT,function(){return function(t,r,o){r.prototype.dayOfYear=function(i){var a=Math.round((o(this).startOf("day")-o(this).startOf("year"))/864e5)+1;return i==null?a:this.add(i-a,"day")}}})}(Jd)),Jd.exports}var eM=ZT();const tM=ra(eM);var Xd={exports:{}},nM=Xd.exports,gb;function rM(){return gb||(gb=1,function(n,e){(function(t,r){n.exports=r()})(nM,function(){return function(t,r){r.prototype.isSameOrAfter=function(o,i){return this.isSame(o,i)||this.isAfter(o,i)}}})}(Xd)),Xd.exports}var oM=rM();const aM=ra(oM);var Qd={exports:{}},iM=Qd.exports,yb;function sM(){return yb||(yb=1,function(n,e){(function(t,r){n.exports=r()})(iM,function(){return function(t,r){r.prototype.isSameOrBefore=function(o,i){return this.isSame(o,i)||this.isBefore(o,i)}}})}(Qd)),Qd.exports}var lM=sM();const uM=ra(lM),bb=["hours","minutes","seconds"],Sb="HH:mm:ss",ml="YYYY-MM-DD",cM={date:ml,dates:ml,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",months:"YYYY-MM",datetime:`${ml} ${Sb}`,monthrange:"YYYY-MM",yearrange:"YYYY",daterange:ml,datetimerange:`${ml} ${Sb}`},v4=st({disabledHours:{type:Ce(Function)},disabledMinutes:{type:Ce(Function)},disabledSeconds:{type:Ce(Function)}}),dM=st({visible:Boolean,actualVisible:{type:Boolean,default:void 0},format:{type:String,default:""}}),g4=st({id:{type:Ce([Array,String])},name:{type:Ce([Array,String])},popperClass:{type:String,default:""},format:String,valueFormat:String,dateFormat:String,timeFormat:String,type:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:Ce([String,Object]),default:B3},editable:{type:Boolean,default:!0},prefixIcon:{type:Ce([String,Object]),default:""},size:Bl,readonly:Boolean,disabled:Boolean,placeholder:{type:String,default:""},popperOptions:{type:Ce(Object),default:()=>({})},modelValue:{type:Ce([Date,Array,String,Number]),default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:Ce([Date,Array])},defaultTime:{type:Ce([Date,Array])},isRange:Boolean,...v4,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,tabindex:{type:Ce([String,Number]),default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,placement:{type:Ce(String),values:fI,default:"bottom"},fallbackPlacements:{type:Ce(Array),default:["bottom","top","right","left"]},...dI,...fc(["ariaLabel"]),showNow:{type:Boolean,default:!0}}),fM=st({id:{type:Ce(Array)},name:{type:Ce(Array)},modelValue:{type:Ce([Array,String])},startPlaceholder:String,endPlaceholder:String}),pM=he({name:"PickerRangeTrigger",inheritAttrs:!1}),hM=he({...pM,props:fM,emits:["mouseenter","mouseleave","click","touchstart","focus","blur","startInput","endInput","startChange","endChange"],setup(n,{expose:e,emit:t}){const r=pI(),o=et("date"),i=et("range"),a=H(),s=H(),{wrapperRef:l,isFocused:c}=V3(a),d=k=>{t("click",k)},f=k=>{t("mouseenter",k)},m=k=>{t("mouseleave",k)},g=k=>{t("mouseenter",k)},v=k=>{t("startInput",k)},y=k=>{t("endInput",k)},b=k=>{t("startChange",k)},_=k=>{t("endChange",k)};return e({focus:()=>{var k;(k=a.value)==null||k.focus()},blur:()=>{var k,x;(k=a.value)==null||k.blur(),(x=s.value)==null||x.blur()}}),(k,x)=>(C(),F("div",{ref_key:"wrapperRef",ref:l,class:ee([h(o).is("active",h(c)),k.$attrs.class]),style:Sn(k.$attrs.style),onClick:d,onMouseenter:f,onMouseleave:m,onTouchstartPassive:g},[xe(k.$slots,"prefix"),z("input",kt(h(r),{id:k.id&&k.id[0],ref_key:"inputRef",ref:a,name:k.name&&k.name[0],placeholder:k.startPlaceholder,value:k.modelValue&&k.modelValue[0],class:h(i).b("input"),onInput:v,onChange:b}),null,16,["id","name","placeholder","value"]),xe(k.$slots,"range-separator"),z("input",kt(h(r),{id:k.id&&k.id[1],ref_key:"endInputRef",ref:s,name:k.name&&k.name[1],placeholder:k.endPlaceholder,value:k.modelValue&&k.modelValue[1],class:h(i).b("input"),onInput:y,onChange:_}),null,16,["id","name","placeholder","value"]),xe(k.$slots,"suffix")],38))}});var mM=At(hM,[["__file","picker-range-trigger.vue"]]);const vM=he({name:"Picker"}),gM=he({...vM,props:g4,emits:["update:modelValue","change","focus","blur","clear","calendar-change","panel-change","visible-change","keydown"],setup(n,{expose:e,emit:t}){const r=n,o=dg(),{lang:i}=$n(),a=et("date"),s=et("input"),l=et("range"),{form:c,formItem:d}=Ps(),f=on("ElPopperOptions",{}),{valueOnClear:m}=hI(r,null),g=H(),v=H(),y=H(!1),b=H(!1),_=H(null);let w=!1;const{isFocused:T,handleFocus:k,handleBlur:x}=V3(v,{beforeFocus(){return r.readonly||Y.value},afterFocus(){y.value=!0},beforeBlur(W){var _e;return!w&&((_e=g.value)==null?void 0:_e.isFocusInsideContent(W))},afterBlur(){qe(),y.value=!1,w=!1,r.validateEvent&&(d==null||d.validate("blur").catch(W=>Da()))}}),M=O(()=>[a.b("editor"),a.bm("editor",r.type),s.e("wrapper"),a.is("disabled",Y.value),a.is("active",y.value),l.b("editor"),Bt?l.bm("editor",Bt.value):"",o.class]),D=O(()=>[s.e("icon"),l.e("close-icon"),nt.value?"":l.e("close-icon--hidden")]);Me(y,W=>{W?Xt(()=>{W&&(_.value=r.modelValue)}):(Be.value=null,Xt(()=>{A(r.modelValue)}))});const A=(W,_e)=>{(_e||!sb(W,_.value))&&(t("change",W),r.validateEvent&&(d==null||d.validate("change").catch(ke=>Da())))},P=W=>{if(!sb(r.modelValue,W)){let _e;Rt(W)?_e=W.map(ke=>ub(ke,r.valueFormat,i.value)):W&&(_e=ub(W,r.valueFormat,i.value)),t("update:modelValue",W&&_e,i.value)}},$=W=>{t("keydown",W)},B=O(()=>v.value?Array.from(v.value.$el.querySelectorAll("input")):[]),j=(W,_e,ke)=>{const Ee=B.value;Ee.length&&(!ke||ke==="min"?(Ee[0].setSelectionRange(W,_e),Ee[0].focus()):ke==="max"&&(Ee[1].setSelectionRange(W,_e),Ee[1].focus()))},U=(W="",_e=!1)=>{y.value=_e;let ke;Rt(W)?ke=W.map(Ee=>Ee.toDate()):ke=W&&W.toDate(),Be.value=null,P(ke)},G=()=>{b.value=!0},N=()=>{t("visible-change",!0)},R=()=>{b.value=!1,y.value=!1,t("visible-change",!1)},X=()=>{y.value=!0},te=()=>{y.value=!1},Y=O(()=>r.disabled||(c==null?void 0:c.disabled)),re=O(()=>{let W;if(mt.value?ce.value.getDefaultValue&&(W=ce.value.getDefaultValue()):Rt(r.modelValue)?W=r.modelValue.map(_e=>lb(_e,r.valueFormat,i.value)):W=lb(r.modelValue,r.valueFormat,i.value),ce.value.getRangeAvailableTime){const _e=ce.value.getRangeAvailableTime(W);bp(_e,W)||(W=_e,mt.value||P(bd(W)))}return Rt(W)&&W.some(_e=>!_e)&&(W=[]),W}),Q=O(()=>{if(!ce.value.panelReady)return"";const W=ct(re.value);return Rt(Be.value)?[Be.value[0]||W&&W[0]||"",Be.value[1]||W&&W[1]||""]:Be.value!==null?Be.value:!q.value&&mt.value||!y.value&&mt.value?"":W?le.value||ye.value||Re.value?W.join(", "):W:""}),Z=O(()=>r.type.includes("time")),q=O(()=>r.type.startsWith("time")),le=O(()=>r.type==="dates"),ye=O(()=>r.type==="months"),Re=O(()=>r.type==="years"),ze=O(()=>r.prefixIcon||(Z.value?mI:vI)),nt=H(!1),Ge=W=>{r.readonly||Y.value||(nt.value&&(W.stopPropagation(),ce.value.handleClear?ce.value.handleClear():P(m.value),A(m.value,!0),nt.value=!1,R()),t("clear"))},mt=O(()=>{const{modelValue:W}=r;return!W||Rt(W)&&!W.filter(Boolean).length}),ut=async W=>{var _e;r.readonly||Y.value||(((_e=W.target)==null?void 0:_e.tagName)!=="INPUT"||T.value)&&(y.value=!0)},Pt=()=>{r.readonly||Y.value||!mt.value&&r.clearable&&(nt.value=!0)},gt=()=>{nt.value=!1},tt=W=>{var _e;r.readonly||Y.value||(((_e=W.touches[0].target)==null?void 0:_e.tagName)!=="INPUT"||T.value)&&(y.value=!0)},Ct=O(()=>r.type.includes("range")),Bt=Tl(),Ne=O(()=>{var W,_e;return(_e=(W=h(g))==null?void 0:W.popperRef)==null?void 0:_e.contentRef}),je=gI(v,W=>{const _e=h(Ne),ke=yI(v);_e&&(W.target===_e||W.composedPath().includes(_e))||W.target===ke||ke&&W.composedPath().includes(ke)||(y.value=!1)});Br(()=>{je==null||je()});const Be=H(null),qe=()=>{if(Be.value){const W=Je(Q.value);W&&vt(W)&&(P(bd(W)),Be.value=null)}Be.value===""&&(P(m.value),A(m.value),Be.value=null)},Je=W=>W?ce.value.parseUserInput(W):null,ct=W=>W?ce.value.formatToString(W):null,vt=W=>ce.value.isValidValue(W),Se=async W=>{if(r.readonly||Y.value)return;const{code:_e}=W;if($(W),_e===Lt.esc){y.value===!0&&(y.value=!1,W.preventDefault(),W.stopPropagation());return}if(_e===Lt.down&&(ce.value.handleFocusPicker&&(W.preventDefault(),W.stopPropagation()),y.value===!1&&(y.value=!0,await Xt()),ce.value.handleFocusPicker)){ce.value.handleFocusPicker();return}if(_e===Lt.tab){w=!0;return}if(_e===Lt.enter||_e===Lt.numpadEnter){(Be.value===null||Be.value===""||vt(Je(Q.value)))&&(qe(),y.value=!1),W.stopPropagation();return}if(Be.value){W.stopPropagation();return}ce.value.handleKeydownInput&&ce.value.handleKeydownInput(W)},He=W=>{Be.value=W,y.value||(y.value=!0)},Tt=W=>{const _e=W.target;Be.value?Be.value=[_e.value,Be.value[1]]:Be.value=[_e.value,null]},$t=W=>{const _e=W.target;Be.value?Be.value=[Be.value[0],_e.value]:Be.value=[null,_e.value]},wt=()=>{var W;const _e=Be.value,ke=Je(_e&&_e[0]),Ee=h(re);if(ke&&ke.isValid()){Be.value=[ct(ke),((W=Q.value)==null?void 0:W[1])||null];const Ke=[ke,Ee&&(Ee[1]||null)];vt(Ke)&&(P(bd(Ke)),Be.value=null)}},me=()=>{var W;const _e=h(Be),ke=Je(_e&&_e[1]),Ee=h(re);if(ke&&ke.isValid()){Be.value=[((W=h(Q))==null?void 0:W[0])||null,ct(ke)];const Ke=[Ee&&Ee[0],ke];vt(Ke)&&(P(bd(Ke)),Be.value=null)}},ce=H({}),be=W=>{ce.value[W[0]]=W[1],ce.value.panelReady=!0},Te=W=>{t("calendar-change",W)},de=(W,_e,ke)=>{t("panel-change",W,_e,ke)},fe=()=>{var W;(W=v.value)==null||W.focus()},ne=()=>{var W;(W=v.value)==null||W.blur()};return Pn("EP_PICKER_BASE",{props:r}),e({focus:fe,blur:ne,handleOpen:X,handleClose:te,onPick:U}),(W,_e)=>(C(),se(h(Sp),kt({ref_key:"refPopper",ref:g,visible:y.value,effect:"light",pure:"",trigger:"click"},W.$attrs,{role:"dialog",teleported:"",transition:`${h(a).namespace.value}-zoom-in-top`,"popper-class":[`${h(a).namespace.value}-picker__popper`,W.popperClass],"popper-options":h(f),"fallback-placements":W.fallbackPlacements,"gpu-acceleration":!1,placement:W.placement,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:G,onShow:N,onHide:R}),{default:V(()=>[h(Ct)?(C(),se(mM,{key:1,id:W.id,ref_key:"inputRef",ref:v,"model-value":h(Q),name:W.name,disabled:h(Y),readonly:!W.editable||W.readonly,"start-placeholder":W.startPlaceholder,"end-placeholder":W.endPlaceholder,class:ee(h(M)),style:Sn(W.$attrs.style),"aria-label":W.ariaLabel,tabindex:W.tabindex,autocomplete:"off",role:"combobox",onClick:ut,onFocus:h(k),onBlur:h(x),onStartInput:Tt,onStartChange:wt,onEndInput:$t,onEndChange:me,onMousedown:ut,onMouseenter:Pt,onMouseleave:gt,onTouchstartPassive:tt,onKeydown:Se},{prefix:V(()=>[h(ze)?(C(),se(h(yt),{key:0,class:ee([h(s).e("icon"),h(l).e("icon")])},{default:V(()=>[(C(),se(dn(h(ze))))]),_:1},8,["class"])):ie("v-if",!0)]),"range-separator":V(()=>[xe(W.$slots,"range-separator",{},()=>[z("span",{class:ee(h(l).b("separator"))},ae(W.rangeSeparator),3)])]),suffix:V(()=>[W.clearIcon?(C(),se(h(yt),{key:0,class:ee(h(D)),onMousedown:lt(h(zn),["prevent"]),onClick:Ge},{default:V(()=>[(C(),se(dn(W.clearIcon)))]),_:1},8,["class","onMousedown"])):ie("v-if",!0)]),_:3},8,["id","model-value","name","disabled","readonly","start-placeholder","end-placeholder","class","style","aria-label","tabindex","onFocus","onBlur"])):(C(),se(h(Ca),{key:0,id:W.id,ref_key:"inputRef",ref:v,"container-role":"combobox","model-value":h(Q),name:W.name,size:h(Bt),disabled:h(Y),placeholder:W.placeholder,class:ee([h(a).b("editor"),h(a).bm("editor",W.type),W.$attrs.class]),style:Sn(W.$attrs.style),readonly:!W.editable||W.readonly||h(le)||h(ye)||h(Re)||W.type==="week","aria-label":W.ariaLabel,tabindex:W.tabindex,"validate-event":!1,onInput:He,onFocus:h(k),onBlur:h(x),onKeydown:Se,onChange:qe,onMousedown:ut,onMouseenter:Pt,onMouseleave:gt,onTouchstartPassive:tt,onClick:lt(()=>{},["stop"])},{prefix:V(()=>[h(ze)?(C(),se(h(yt),{key:0,class:ee(h(s).e("icon")),onMousedown:lt(ut,["prevent"]),onTouchstartPassive:tt},{default:V(()=>[(C(),se(dn(h(ze))))]),_:1},8,["class","onMousedown"])):ie("v-if",!0)]),suffix:V(()=>[nt.value&&W.clearIcon?(C(),se(h(yt),{key:0,class:ee(`${h(s).e("icon")} clear-icon`),onMousedown:lt(h(zn),["prevent"]),onClick:Ge},{default:V(()=>[(C(),se(dn(W.clearIcon)))]),_:1},8,["class","onMousedown"])):ie("v-if",!0)]),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","aria-label","tabindex","onFocus","onBlur","onClick"]))]),content:V(()=>[xe(W.$slots,"default",{visible:y.value,actualVisible:b.value,parsedValue:h(re),format:W.format,dateFormat:W.dateFormat,timeFormat:W.timeFormat,unlinkPanels:W.unlinkPanels,type:W.type,defaultValue:W.defaultValue,showNow:W.showNow,onPick:U,onSelectRange:j,onSetPickerOption:be,onCalendarChange:Te,onPanelChange:de,onMousedown:lt(()=>{},["stop"])})]),_:3},16,["visible","transition","popper-class","popper-options","fallback-placements","placement"]))}});var yM=At(gM,[["__file","picker.vue"]]);const bM=st({...dM,datetimeRole:String,parsedValue:{type:Ce(Object)}}),SM=({getAvailableHours:n,getAvailableMinutes:e,getAvailableSeconds:t})=>{const r=(a,s,l,c)=>{const d={hour:n,minute:e,second:t};let f=a;return["hour","minute","second"].forEach(m=>{if(d[m]){let g;const v=d[m];switch(m){case"minute":{g=v(f.hour(),s,c);break}case"second":{g=v(f.hour(),f.minute(),s,c);break}default:{g=v(s,c);break}}if(g!=null&&g.length&&!g.includes(f[m]())){const y=l?0:g.length-1;f=f[m](g[y])}}}),f},o={};return{timePickerOptions:o,getAvailableTime:r,onSetOption:([a,s])=>{o[a]=s}}},fm=n=>{const e=(r,o)=>r||o,t=r=>r!==!0;return n.map(e).filter(t)},y4=(n,e,t)=>({getHoursList:(a,s)=>dm(24,n&&(()=>n==null?void 0:n(a,s))),getMinutesList:(a,s,l)=>dm(60,e&&(()=>e==null?void 0:e(a,s,l))),getSecondsList:(a,s,l,c)=>dm(60,t&&(()=>t==null?void 0:t(a,s,l,c)))}),_M=(n,e,t)=>{const{getHoursList:r,getMinutesList:o,getSecondsList:i}=y4(n,e,t);return{getAvailableHours:(c,d)=>fm(r(c,d)),getAvailableMinutes:(c,d,f)=>fm(o(c,d,f)),getAvailableSeconds:(c,d,f,m)=>fm(i(c,d,f,m))}},wM=n=>{const e=H(n.parsedValue);return Me(()=>n.visible,t=>{t||(e.value=n.parsedValue)}),e},xM=st({role:{type:String,required:!0},spinnerDate:{type:Ce(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:Ce(String),default:""},...v4}),kM=100,CM=600,yf={beforeMount(n,e){const t=e.value,{interval:r=kM,delay:o=CM}=Lo(t)?{}:t;let i,a;const s=()=>Lo(t)?t():t.handler(),l=()=>{a&&(clearTimeout(a),a=void 0),i&&(clearInterval(i),i=void 0)};n.addEventListener("mousedown",c=>{c.button===0&&(l(),s(),document.addEventListener("mouseup",()=>l(),{once:!0}),a=setTimeout(()=>{i=setInterval(()=>{s()},r)},o))})}},IM=he({__name:"basic-time-spinner",props:xM,emits:["change","select-range","set-option"],setup(n,{emit:e}){const t=n,r=on("EP_PICKER_BASE"),{isRange:o}=r.props,i=et("time"),{getHoursList:a,getMinutesList:s,getSecondsList:l}=y4(t.disabledHours,t.disabledMinutes,t.disabledSeconds);let c=!1;const d=H(),f=H(),m=H(),g=H(),v={hours:f,minutes:m,seconds:g},y=O(()=>t.showSeconds?bb:bb.slice(0,2)),b=O(()=>{const{spinnerDate:Q}=t,Z=Q.hour(),q=Q.minute(),le=Q.second();return{hours:Z,minutes:q,seconds:le}}),_=O(()=>{const{hours:Q,minutes:Z}=h(b),{role:q,spinnerDate:le}=t,ye=o?void 0:le;return{hours:a(q,ye),minutes:s(Q,q,ye),seconds:l(Q,Z,q,ye)}}),w=O(()=>{const{hours:Q,minutes:Z,seconds:q}=h(b);return{hours:cm(Q,23),minutes:cm(Z,59),seconds:cm(q,59)}}),T=z3(Q=>{c=!1,M(Q)},200),k=Q=>{if(!!!t.amPmMode)return"";const q=t.amPmMode==="A";let le=Q<12?" am":" pm";return q&&(le=le.toUpperCase()),le},x=Q=>{let Z;switch(Q){case"hours":Z=[0,2];break;case"minutes":Z=[3,5];break;case"seconds":Z=[6,8];break}const[q,le]=Z;e("select-range",q,le),d.value=Q},M=Q=>{P(Q,h(b)[Q])},D=()=>{M("hours"),M("minutes"),M("seconds")},A=Q=>Q.querySelector(`.${i.namespace.value}-scrollbar__wrap`),P=(Q,Z)=>{if(t.arrowControl)return;const q=h(v[Q]);q&&q.$el&&(A(q.$el).scrollTop=Math.max(0,Z*$(Q)))},$=Q=>{const Z=h(v[Q]),q=Z==null?void 0:Z.$el.querySelector("li");return q&&Number.parseFloat(H3(q,"height"))||0},B=()=>{U(1)},j=()=>{U(-1)},U=Q=>{d.value||x("hours");const Z=d.value,q=h(b)[Z],le=d.value==="hours"?24:60,ye=G(Z,q,Q,le);N(Z,ye),P(Z,ye),Xt(()=>x(Z))},G=(Q,Z,q,le)=>{let ye=(Z+q+le)%le;const Re=h(_)[Q];for(;Re[ye]&&ye!==Z;)ye=(ye+q+le)%le;return ye},N=(Q,Z)=>{if(h(_)[Q][Z])return;const{hours:ye,minutes:Re,seconds:ze}=h(b);let nt;switch(Q){case"hours":nt=t.spinnerDate.hour(Z).minute(Re).second(ze);break;case"minutes":nt=t.spinnerDate.hour(ye).minute(Z).second(ze);break;case"seconds":nt=t.spinnerDate.hour(ye).minute(Re).second(Z);break}e("change",nt)},R=(Q,{value:Z,disabled:q})=>{q||(N(Q,Z),x(Q),P(Q,Z))},X=Q=>{const Z=h(v[Q]);if(!Z)return;c=!0,T(Q);const q=Math.min(Math.round((A(Z.$el).scrollTop-(te(Q)*.5-10)/$(Q)+3)/$(Q)),Q==="hours"?23:59);N(Q,q)},te=Q=>h(v[Q]).$el.offsetHeight,Y=()=>{const Q=Z=>{const q=h(v[Z]);q&&q.$el&&(A(q.$el).onscroll=()=>{X(Z)})};Q("hours"),Q("minutes"),Q("seconds")};Ht(()=>{Xt(()=>{!t.arrowControl&&Y(),D(),t.role==="start"&&x("hours")})});const re=(Q,Z)=>{v[Z].value=Q??void 0};return e("set-option",[`${t.role}_scrollDown`,U]),e("set-option",[`${t.role}_emitSelectRange`,x]),Me(()=>t.spinnerDate,()=>{c||D()}),(Q,Z)=>(C(),F("div",{class:ee([h(i).b("spinner"),{"has-seconds":Q.showSeconds}])},[Q.arrowControl?ie("v-if",!0):(C(!0),F($e,{key:0},ot(h(y),q=>(C(),se(h(U3),{key:q,ref_for:!0,ref:le=>re(le,q),class:ee(h(i).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":h(i).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:le=>x(q),onMousemove:le=>M(q)},{default:V(()=>[(C(!0),F($e,null,ot(h(_)[q],(le,ye)=>(C(),F("li",{key:ye,class:ee([h(i).be("spinner","item"),h(i).is("active",ye===h(b)[q]),h(i).is("disabled",le)]),onClick:Re=>R(q,{value:ye,disabled:le})},[q==="hours"?(C(),F($e,{key:0},[De(ae(("0"+(Q.amPmMode?ye%12||12:ye)).slice(-2))+ae(k(ye)),1)],64)):(C(),F($e,{key:1},[De(ae(("0"+ye).slice(-2)),1)],64))],10,["onClick"]))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),Q.arrowControl?(C(!0),F($e,{key:1},ot(h(y),q=>(C(),F("div",{key:q,class:ee([h(i).be("spinner","wrapper"),h(i).is("arrow")]),onMouseenter:le=>x(q)},[En((C(),se(h(yt),{class:ee(["arrow-up",h(i).be("spinner","arrow")])},{default:V(()=>[I(h(W3))]),_:1},8,["class"])),[[h(yf),j]]),En((C(),se(h(yt),{class:ee(["arrow-down",h(i).be("spinner","arrow")])},{default:V(()=>[I(h(fg))]),_:1},8,["class"])),[[h(yf),B]]),z("ul",{class:ee(h(i).be("spinner","list"))},[(C(!0),F($e,null,ot(h(w)[q],(le,ye)=>(C(),F("li",{key:ye,class:ee([h(i).be("spinner","item"),h(i).is("active",le===h(b)[q]),h(i).is("disabled",h(_)[q][le])])},[h(Kt)(le)?(C(),F($e,{key:0},[q==="hours"?(C(),F($e,{key:0},[De(ae(("0"+(Q.amPmMode?le%12||12:le)).slice(-2))+ae(k(le)),1)],64)):(C(),F($e,{key:1},[De(ae(("0"+le).slice(-2)),1)],64))],64)):ie("v-if",!0)],2))),128))],2)],42,["onMouseenter"]))),128)):ie("v-if",!0)],2))}});var EM=At(IM,[["__file","basic-time-spinner.vue"]]);const TM=he({__name:"panel-time-pick",props:bM,emits:["pick","select-range","set-picker-option"],setup(n,{emit:e}){const t=n,r=on("EP_PICKER_BASE"),{arrowControl:o,disabledHours:i,disabledMinutes:a,disabledSeconds:s,defaultValue:l}=r.props,{getAvailableHours:c,getAvailableMinutes:d,getAvailableSeconds:f}=_M(i,a,s),m=et("time"),{t:g,lang:v}=$n(),y=H([0,2]),b=wM(t),_=O(()=>yo(t.actualVisible)?`${m.namespace.value}-zoom-in-top`:""),w=O(()=>t.format.includes("ss")),T=O(()=>t.format.includes("A")?"A":t.format.includes("a")?"a":""),k=te=>{const Y=Qe(te).locale(v.value),re=G(Y);return Y.isSame(re)},x=()=>{e("pick",b.value,!1)},M=(te=!1,Y=!1)=>{Y||e("pick",t.parsedValue,te)},D=te=>{if(!t.visible)return;const Y=G(te).millisecond(0);e("pick",Y,!0)},A=(te,Y)=>{e("select-range",te,Y),y.value=[te,Y]},P=te=>{const Y=[0,3].concat(w.value?[6]:[]),re=["hours","minutes"].concat(w.value?["seconds"]:[]),Z=(Y.indexOf(y.value[0])+te+Y.length)%Y.length;B.start_emitSelectRange(re[Z])},$=te=>{const Y=te.code,{left:re,right:Q,up:Z,down:q}=Lt;if([re,Q].includes(Y)){P(Y===re?-1:1),te.preventDefault();return}if([Z,q].includes(Y)){const le=Y===Z?-1:1;B.start_scrollDown(le),te.preventDefault();return}},{timePickerOptions:B,onSetOption:j,getAvailableTime:U}=SM({getAvailableHours:c,getAvailableMinutes:d,getAvailableSeconds:f}),G=te=>U(te,t.datetimeRole||"",!0),N=te=>te?Qe(te,t.format).locale(v.value):null,R=te=>te?te.format(t.format):null,X=()=>Qe(l).locale(v.value);return e("set-picker-option",["isValidValue",k]),e("set-picker-option",["formatToString",R]),e("set-picker-option",["parseUserInput",N]),e("set-picker-option",["handleKeydownInput",$]),e("set-picker-option",["getRangeAvailableTime",G]),e("set-picker-option",["getDefaultValue",X]),(te,Y)=>(C(),se(Ml,{name:h(_)},{default:V(()=>[te.actualVisible||te.visible?(C(),F("div",{key:0,class:ee(h(m).b("panel"))},[z("div",{class:ee([h(m).be("panel","content"),{"has-seconds":h(w)}])},[I(EM,{ref:"spinner",role:te.datetimeRole||"start","arrow-control":h(o),"show-seconds":h(w),"am-pm-mode":h(T),"spinner-date":te.parsedValue,"disabled-hours":h(i),"disabled-minutes":h(a),"disabled-seconds":h(s),onChange:D,onSetOption:h(j),onSelectRange:A},null,8,["role","arrow-control","show-seconds","am-pm-mode","spinner-date","disabled-hours","disabled-minutes","disabled-seconds","onSetOption"])],2),z("div",{class:ee(h(m).be("panel","footer"))},[z("button",{type:"button",class:ee([h(m).be("panel","btn"),"cancel"]),onClick:x},ae(h(g)("el.datepicker.cancel")),3),z("button",{type:"button",class:ee([h(m).be("panel","btn"),"confirm"]),onClick:re=>M()},ae(h(g)("el.datepicker.confirm")),11,["onClick"])],2)],2)):ie("v-if",!0)]),_:1},8,["name"]))}});var dv=At(TM,[["__file","panel-time-pick.vue"]]);const xp=Symbol(),MM=st({...g4,type:{type:Ce(String),default:"date"}}),OM=["date","dates","year","years","month","months","week","range"],gg=st({disabledDate:{type:Ce(Function)},date:{type:Ce(Object),required:!0},minDate:{type:Ce(Object)},maxDate:{type:Ce(Object)},parsedValue:{type:Ce([Object,Array])},rangeState:{type:Ce(Object),default:()=>({endDate:null,selecting:!1})}}),b4=st({type:{type:Ce(String),required:!0,values:tT},dateFormat:String,timeFormat:String,showNow:{type:Boolean,default:!0}}),yg=st({unlinkPanels:Boolean,parsedValue:{type:Ce(Array)}}),bg=n=>({type:String,values:OM,default:n}),AM=st({...b4,parsedValue:{type:Ce([Object,Array])},visible:{type:Boolean},format:{type:String,default:""}}),Ol=n=>{if(!Rt(n))return!1;const[e,t]=n;return Qe.isDayjs(e)&&Qe.isDayjs(t)&&e.isSameOrBefore(t)},Sg=(n,{lang:e,unit:t,unlinkPanels:r})=>{let o;if(Rt(n)){let[i,a]=n.map(s=>Qe(s).locale(e));return r||(a=i.add(1,t)),[i,a]}else n?o=Qe(n):o=Qe();return o=o.locale(e),[o,o.add(1,t)]},PM=(n,e,{columnIndexOffset:t,startDate:r,nextEndDate:o,now:i,unit:a,relativeDateGetter:s,setCellMetadata:l,setRowMetadata:c})=>{for(let d=0;d<n.row;d++){const f=e[d];for(let m=0;m<n.column;m++){let g=f[m+t];g||(g={row:d,column:m,type:"normal",inRange:!1,start:!1,end:!1});const v=d*n.column+m,y=s(v);g.dayjs=y,g.date=y.toDate(),g.timestamp=y.valueOf(),g.type="normal",g.inRange=!!(r&&y.isSameOrAfter(r,a)&&o&&y.isSameOrBefore(o,a))||!!(r&&y.isSameOrBefore(r,a)&&o&&y.isSameOrAfter(o,a)),r!=null&&r.isSameOrAfter(o)?(g.start=!!o&&y.isSame(o,a),g.end=r&&y.isSame(r,a)):(g.start=!!r&&y.isSame(r,a),g.end=!!o&&y.isSame(o,a)),y.isSame(i,a)&&(g.type="today"),l==null||l(g,{rowIndex:d,columnIndex:m}),f[m+t]=g}c==null||c(f)}},bf=(n,e,t)=>{const r=Qe().locale(t).startOf("month").month(e).year(n),o=r.daysInMonth();return a4(o).map(i=>r.add(i,"day").toDate())},Yu=(n,e,t,r)=>{const o=Qe().year(n).month(e).startOf("month"),i=bf(n,e,t).find(a=>!(r!=null&&r(a)));return i?Qe(i).locale(t):o.locale(t)},fv=(n,e,t)=>{const r=n.year();if(!(t!=null&&t(n.toDate())))return n.locale(e);const o=n.month();if(!bf(r,o,e).every(t))return Yu(r,o,e,t);for(let i=0;i<12;i++)if(!bf(r,i,e).every(t))return Yu(r,i,e,t);return n},$M=st({...gg,cellClassName:{type:Ce(Function)},showWeekNumber:Boolean,selectionMode:bg("date")}),RM=["changerange","pick","select"],pv=(n="")=>["normal","today"].includes(n),DM=(n,e)=>{const{lang:t}=$n(),r=H(),o=H(),i=H(),a=H(),s=H([[],[],[],[],[],[]]);let l=!1;const c=n.date.$locale().weekStart||7,d=n.date.locale("en").localeData().weekdaysShort().map(Y=>Y.toLowerCase()),f=O(()=>c>3?7-c:-c),m=O(()=>{const Y=n.date.startOf("month");return Y.subtract(Y.day()||7,"day")}),g=O(()=>d.concat(d).slice(c,c+7)),v=O(()=>bI(h(k)).some(Y=>Y.isCurrent)),y=O(()=>{const Y=n.date.startOf("month"),re=Y.day()||7,Q=Y.daysInMonth(),Z=Y.subtract(1,"month").daysInMonth();return{startOfMonthDay:re,dateCountOfMonth:Q,dateCountOfLastMonth:Z}}),b=O(()=>n.selectionMode==="dates"?Qr(n.parsedValue):[]),_=(Y,{count:re,rowIndex:Q,columnIndex:Z})=>{const{startOfMonthDay:q,dateCountOfMonth:le,dateCountOfLastMonth:ye}=h(y),Re=h(f);if(Q>=0&&Q<=1){const ze=q+Re<0?7+q+Re:q+Re;if(Z+Q*7>=ze)return Y.text=re,!0;Y.text=ye-(ze-Z%7)+1+Q*7,Y.type="prev-month"}else return re<=le?Y.text=re:(Y.text=re-le,Y.type="next-month"),!0;return!1},w=(Y,{columnIndex:re,rowIndex:Q},Z)=>{const{disabledDate:q,cellClassName:le}=n,ye=h(b),Re=_(Y,{count:Z,rowIndex:Q,columnIndex:re}),ze=Y.dayjs.toDate();return Y.selected=ye.find(nt=>nt.isSame(Y.dayjs,"day")),Y.isSelected=!!Y.selected,Y.isCurrent=M(Y),Y.disabled=q==null?void 0:q(ze),Y.customClass=le==null?void 0:le(ze),Re},T=Y=>{if(n.selectionMode==="week"){const[re,Q]=n.showWeekNumber?[1,7]:[0,6],Z=te(Y[re+1]);Y[re].inRange=Z,Y[re].start=Z,Y[Q].inRange=Z,Y[Q].end=Z}},k=O(()=>{const{minDate:Y,maxDate:re,rangeState:Q,showWeekNumber:Z}=n,q=h(f),le=h(s),ye="day";let Re=1;if(Z)for(let ze=0;ze<6;ze++)le[ze][0]||(le[ze][0]={type:"week",text:h(m).add(ze*7+1,ye).week()});return PM({row:6,column:7},le,{startDate:Y,columnIndexOffset:Z?1:0,nextEndDate:Q.endDate||re||Q.selecting&&Y||null,now:Qe().locale(h(t)).startOf(ye),unit:ye,relativeDateGetter:ze=>h(m).add(ze-q,ye),setCellMetadata:(...ze)=>{w(...ze,Re)&&(Re+=1)},setRowMetadata:T}),le});Me(()=>n.date,async()=>{var Y;(Y=h(r))!=null&&Y.contains(document.activeElement)&&(await Xt(),await x())});const x=async()=>{var Y;return(Y=h(o))==null?void 0:Y.focus()},M=Y=>n.selectionMode==="date"&&pv(Y.type)&&D(Y,n.parsedValue),D=(Y,re)=>re?Qe(re).locale(h(t)).isSame(n.date.date(Number(Y.text)),"day"):!1,A=(Y,re)=>{const Q=Y*7+(re-(n.showWeekNumber?1:0))-h(f);return h(m).add(Q,"day")},P=Y=>{var re;if(!n.rangeState.selecting)return;let Q=Y.target;if(Q.tagName==="SPAN"&&(Q=(re=Q.parentNode)==null?void 0:re.parentNode),Q.tagName==="DIV"&&(Q=Q.parentNode),Q.tagName!=="TD")return;const Z=Q.parentNode.rowIndex-1,q=Q.cellIndex;h(k)[Z][q].disabled||(Z!==h(i)||q!==h(a))&&(i.value=Z,a.value=q,e("changerange",{selecting:!0,endDate:A(Z,q)}))},$=Y=>!h(v)&&(Y==null?void 0:Y.text)===1&&Y.type==="normal"||Y.isCurrent,B=Y=>{l||h(v)||n.selectionMode!=="date"||X(Y,!0)},j=Y=>{Y.target.closest("td")&&(l=!0)},U=Y=>{Y.target.closest("td")&&(l=!1)},G=Y=>{!n.rangeState.selecting||!n.minDate?(e("pick",{minDate:Y,maxDate:null}),e("select",!0)):(Y>=n.minDate?e("pick",{minDate:n.minDate,maxDate:Y}):e("pick",{minDate:Y,maxDate:n.minDate}),e("select",!1))},N=Y=>{const re=Y.week(),Q=`${Y.year()}w${re}`;e("pick",{year:Y.year(),week:re,value:Q,date:Y.startOf("week")})},R=(Y,re)=>{const Q=re?Qr(n.parsedValue).filter(Z=>(Z==null?void 0:Z.valueOf())!==Y.valueOf()):Qr(n.parsedValue).concat([Y]);e("pick",Q)},X=(Y,re=!1)=>{const Q=Y.target.closest("td");if(!Q)return;const Z=Q.parentNode.rowIndex-1,q=Q.cellIndex,le=h(k)[Z][q];if(le.disabled||le.type==="week")return;const ye=A(Z,q);switch(n.selectionMode){case"range":{G(ye);break}case"date":{e("pick",ye,re);break}case"week":{N(ye);break}case"dates":{R(ye,!!le.selected);break}}},te=Y=>{if(n.selectionMode!=="week")return!1;let re=n.date.startOf("day");if(Y.type==="prev-month"&&(re=re.subtract(1,"month")),Y.type==="next-month"&&(re=re.add(1,"month")),re=re.date(Number.parseInt(Y.text,10)),n.parsedValue&&!Rt(n.parsedValue)){const Q=(n.parsedValue.day()-c+7)%7-1;return n.parsedValue.subtract(Q,"day").isSame(re,"day")}return!1};return{WEEKS:g,rows:k,tbodyRef:r,currentCellRef:o,focus:x,isCurrent:M,isWeekActive:te,isSelectedCell:$,handlePickDate:X,handleMouseUp:U,handleMouseDown:j,handleMouseMove:P,handleFocus:B}},NM=(n,{isCurrent:e,isWeekActive:t})=>{const r=et("date-table"),{t:o}=$n(),i=O(()=>[r.b(),{"is-week-mode":n.selectionMode==="week"}]),a=O(()=>o("el.datepicker.dateTablePrompt")),s=O(()=>o("el.datepicker.week"));return{tableKls:i,tableLabel:a,weekLabel:s,getCellClasses:d=>{const f=[];return pv(d.type)&&!d.disabled?(f.push("available"),d.type==="today"&&f.push("today")):f.push(d.type),e(d)&&f.push("current"),d.inRange&&(pv(d.type)||n.selectionMode==="week")&&(f.push("in-range"),d.start&&f.push("start-date"),d.end&&f.push("end-date")),d.disabled&&f.push("disabled"),d.selected&&f.push("selected"),d.customClass&&f.push(d.customClass),f.join(" ")},getRowKls:d=>[r.e("row"),{current:t(d)}],t:o}},FM=st({cell:{type:Ce(Object)}});var _g=he({name:"ElDatePickerCell",props:FM,setup(n){const e=et("date-table-cell"),{slots:t}=on(xp);return()=>{const{cell:r}=n;return xe(t,"default",{...r},()=>{var o;return[I("div",{class:e.b()},[I("span",{class:e.e("text")},[(o=r==null?void 0:r.renderText)!=null?o:r==null?void 0:r.text])])]})}}});const LM=he({__name:"basic-date-table",props:$M,emits:RM,setup(n,{expose:e,emit:t}){const r=n,{WEEKS:o,rows:i,tbodyRef:a,currentCellRef:s,focus:l,isCurrent:c,isWeekActive:d,isSelectedCell:f,handlePickDate:m,handleMouseUp:g,handleMouseDown:v,handleMouseMove:y,handleFocus:b}=DM(r,t),{tableLabel:_,tableKls:w,weekLabel:T,getCellClasses:k,getRowKls:x,t:M}=NM(r,{isCurrent:c,isWeekActive:d});return e({focus:l}),(D,A)=>(C(),F("table",{"aria-label":h(_),class:ee(h(w)),cellspacing:"0",cellpadding:"0",role:"grid",onClick:h(m),onMousemove:h(y),onMousedown:lt(h(v),["prevent"]),onMouseup:h(g)},[z("tbody",{ref_key:"tbodyRef",ref:a},[z("tr",null,[D.showWeekNumber?(C(),F("th",{key:0,scope:"col"},ae(h(T)),1)):ie("v-if",!0),(C(!0),F($e,null,ot(h(o),(P,$)=>(C(),F("th",{key:$,"aria-label":h(M)("el.datepicker.weeksFull."+P),scope:"col"},ae(h(M)("el.datepicker.weeks."+P)),9,["aria-label"]))),128))]),(C(!0),F($e,null,ot(h(i),(P,$)=>(C(),F("tr",{key:$,class:ee(h(x)(P[1]))},[(C(!0),F($e,null,ot(P,(B,j)=>(C(),F("td",{key:`${$}.${j}`,ref_for:!0,ref:U=>h(f)(B)&&(s.value=U),class:ee(h(k)(B)),"aria-current":B.isCurrent?"date":void 0,"aria-selected":B.isCurrent,tabindex:h(f)(B)?0:-1,onFocus:h(b)},[I(h(_g),{cell:B},null,8,["cell"])],42,["aria-current","aria-selected","tabindex","onFocus"]))),128))],2))),128))],512)],42,["aria-label","onClick","onMousemove","onMousedown","onMouseup"]))}});var hv=At(LM,[["__file","basic-date-table.vue"]]);const BM=st({...gg,selectionMode:bg("month")}),VM=he({__name:"basic-month-table",props:BM,emits:["changerange","pick","select"],setup(n,{expose:e,emit:t}){const r=n,o=et("month-table"),{t:i,lang:a}=$n(),s=H(),l=H(),c=H(r.date.locale("en").localeData().monthsShort().map(T=>T.toLowerCase())),d=H([[],[],[]]),f=H(),m=H(),g=O(()=>{var T,k;const x=d.value,M=Qe().locale(a.value).startOf("month");for(let D=0;D<3;D++){const A=x[D];for(let P=0;P<4;P++){const $=A[P]||(A[P]={row:D,column:P,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1});$.type="normal";const B=D*4+P,j=r.date.startOf("year").month(B),U=r.rangeState.endDate||r.maxDate||r.rangeState.selecting&&r.minDate||null;$.inRange=!!(r.minDate&&j.isSameOrAfter(r.minDate,"month")&&U&&j.isSameOrBefore(U,"month"))||!!(r.minDate&&j.isSameOrBefore(r.minDate,"month")&&U&&j.isSameOrAfter(U,"month")),(T=r.minDate)!=null&&T.isSameOrAfter(U)?($.start=!!(U&&j.isSame(U,"month")),$.end=r.minDate&&j.isSame(r.minDate,"month")):($.start=!!(r.minDate&&j.isSame(r.minDate,"month")),$.end=!!(U&&j.isSame(U,"month"))),M.isSame(j)&&($.type="today"),$.text=B,$.disabled=((k=r.disabledDate)==null?void 0:k.call(r,j.toDate()))||!1}}return x}),v=()=>{var T;(T=l.value)==null||T.focus()},y=T=>{const k={},x=r.date.year(),M=new Date,D=T.text;return k.disabled=r.disabledDate?bf(x,D,a.value).every(r.disabledDate):!1,k.current=Qr(r.parsedValue).findIndex(A=>Qe.isDayjs(A)&&A.year()===x&&A.month()===D)>=0,k.today=M.getFullYear()===x&&M.getMonth()===D,T.inRange&&(k["in-range"]=!0,T.start&&(k["start-date"]=!0),T.end&&(k["end-date"]=!0)),k},b=T=>{const k=r.date.year(),x=T.text;return Qr(r.date).findIndex(M=>M.year()===k&&M.month()===x)>=0},_=T=>{var k;if(!r.rangeState.selecting)return;let x=T.target;if(x.tagName==="SPAN"&&(x=(k=x.parentNode)==null?void 0:k.parentNode),x.tagName==="DIV"&&(x=x.parentNode),x.tagName!=="TD")return;const M=x.parentNode.rowIndex,D=x.cellIndex;g.value[M][D].disabled||(M!==f.value||D!==m.value)&&(f.value=M,m.value=D,t("changerange",{selecting:!0,endDate:r.date.startOf("year").month(M*4+D)}))},w=T=>{var k;const x=(k=T.target)==null?void 0:k.closest("td");if((x==null?void 0:x.tagName)!=="TD"||_s(x,"disabled"))return;const M=x.cellIndex,A=x.parentNode.rowIndex*4+M,P=r.date.startOf("year").month(A);if(r.selectionMode==="months"){if(T.type==="keydown"){t("pick",Qr(r.parsedValue),!1);return}const $=Yu(r.date.year(),A,a.value,r.disabledDate),B=_s(x,"current")?Qr(r.parsedValue).filter(j=>(j==null?void 0:j.month())!==$.month()):Qr(r.parsedValue).concat([Qe($)]);t("pick",B)}else r.selectionMode==="range"?r.rangeState.selecting?(r.minDate&&P>=r.minDate?t("pick",{minDate:r.minDate,maxDate:P}):t("pick",{minDate:P,maxDate:r.minDate}),t("select",!1)):(t("pick",{minDate:P,maxDate:null}),t("select",!0)):t("pick",A)};return Me(()=>r.date,async()=>{var T,k;(T=s.value)!=null&&T.contains(document.activeElement)&&(await Xt(),(k=l.value)==null||k.focus())}),e({focus:v}),(T,k)=>(C(),F("table",{role:"grid","aria-label":h(i)("el.datepicker.monthTablePrompt"),class:ee(h(o).b()),onClick:w,onMousemove:_},[z("tbody",{ref_key:"tbodyRef",ref:s},[(C(!0),F($e,null,ot(h(g),(x,M)=>(C(),F("tr",{key:M},[(C(!0),F($e,null,ot(x,(D,A)=>(C(),F("td",{key:A,ref_for:!0,ref:P=>b(D)&&(l.value=P),class:ee(y(D)),"aria-selected":`${b(D)}`,"aria-label":h(i)(`el.datepicker.month${+D.text+1}`),tabindex:b(D)?0:-1,onKeydown:[Ir(lt(w,["prevent","stop"]),["space"]),Ir(lt(w,["prevent","stop"]),["enter"])]},[I(h(_g),{cell:{...D,renderText:h(i)("el.datepicker.months."+c.value[D.text])}},null,8,["cell"])],42,["aria-selected","aria-label","tabindex","onKeydown"]))),128))]))),128))],512)],42,["aria-label"]))}});var mv=At(VM,[["__file","basic-month-table.vue"]]);const zM=st({...gg,selectionMode:bg("year")}),HM=he({__name:"basic-year-table",props:zM,emits:["changerange","pick","select"],setup(n,{expose:e,emit:t}){const r=n,o=(k,x)=>{const M=Qe(String(k)).locale(x).startOf("year"),A=M.endOf("year").dayOfYear();return a4(A).map(P=>M.add(P,"day").toDate())},i=et("year-table"),{t:a,lang:s}=$n(),l=H(),c=H(),d=O(()=>Math.floor(r.date.year()/10)*10),f=H([[],[],[]]),m=H(),g=H(),v=O(()=>{var k;const x=f.value,M=Qe().locale(s.value).startOf("year");for(let D=0;D<3;D++){const A=x[D];for(let P=0;P<4&&!(D*4+P>=10);P++){let $=A[P];$||($={row:D,column:P,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1}),$.type="normal";const B=D*4+P+d.value,j=Qe().year(B),U=r.rangeState.endDate||r.maxDate||r.rangeState.selecting&&r.minDate||null;$.inRange=!!(r.minDate&&j.isSameOrAfter(r.minDate,"year")&&U&&j.isSameOrBefore(U,"year"))||!!(r.minDate&&j.isSameOrBefore(r.minDate,"year")&&U&&j.isSameOrAfter(U,"year")),(k=r.minDate)!=null&&k.isSameOrAfter(U)?($.start=!!(U&&j.isSame(U,"year")),$.end=!!(r.minDate&&j.isSame(r.minDate,"year"))):($.start=!!(r.minDate&&j.isSame(r.minDate,"year")),$.end=!!(U&&j.isSame(U,"year"))),M.isSame(j)&&($.type="today"),$.text=B;const N=j.toDate();$.disabled=r.disabledDate&&r.disabledDate(N)||!1,A[P]=$}}return x}),y=()=>{var k;(k=c.value)==null||k.focus()},b=k=>{const x={},M=Qe().locale(s.value),D=k.text;return x.disabled=r.disabledDate?o(D,s.value).every(r.disabledDate):!1,x.today=M.year()===D,x.current=Qr(r.parsedValue).findIndex(A=>A.year()===D)>=0,k.inRange&&(x["in-range"]=!0,k.start&&(x["start-date"]=!0),k.end&&(x["end-date"]=!0)),x},_=k=>{const x=k.text;return Qr(r.date).findIndex(M=>M.year()===x)>=0},w=k=>{var x;const M=(x=k.target)==null?void 0:x.closest("td");if(!M||!M.textContent||_s(M,"disabled"))return;const D=M.cellIndex,P=M.parentNode.rowIndex*4+D+d.value,$=Qe().year(P);if(r.selectionMode==="range")r.rangeState.selecting?(r.minDate&&$>=r.minDate?t("pick",{minDate:r.minDate,maxDate:$}):t("pick",{minDate:$,maxDate:r.minDate}),t("select",!1)):(t("pick",{minDate:$,maxDate:null}),t("select",!0));else if(r.selectionMode==="years"){if(k.type==="keydown"){t("pick",Qr(r.parsedValue),!1);return}const B=fv($.startOf("year"),s.value,r.disabledDate),j=_s(M,"current")?Qr(r.parsedValue).filter(U=>(U==null?void 0:U.year())!==P):Qr(r.parsedValue).concat([B]);t("pick",j)}else t("pick",P)},T=k=>{var x;if(!r.rangeState.selecting)return;const M=(x=k.target)==null?void 0:x.closest("td");if(!M)return;const D=M.parentNode.rowIndex,A=M.cellIndex;v.value[D][A].disabled||(D!==m.value||A!==g.value)&&(m.value=D,g.value=A,t("changerange",{selecting:!0,endDate:Qe().year(d.value).add(D*4+A,"year")}))};return Me(()=>r.date,async()=>{var k,x;(k=l.value)!=null&&k.contains(document.activeElement)&&(await Xt(),(x=c.value)==null||x.focus())}),e({focus:y}),(k,x)=>(C(),F("table",{role:"grid","aria-label":h(a)("el.datepicker.yearTablePrompt"),class:ee(h(i).b()),onClick:w,onMousemove:T},[z("tbody",{ref_key:"tbodyRef",ref:l},[(C(!0),F($e,null,ot(h(v),(M,D)=>(C(),F("tr",{key:D},[(C(!0),F($e,null,ot(M,(A,P)=>(C(),F("td",{key:`${D}_${P}`,ref_for:!0,ref:$=>_(A)&&(c.value=$),class:ee(["available",b(A)]),"aria-selected":_(A),"aria-label":String(A.text),tabindex:_(A)?0:-1,onKeydown:[Ir(lt(w,["prevent","stop"]),["space"]),Ir(lt(w,["prevent","stop"]),["enter"])]},[I(h(_g),{cell:A},null,8,["cell"])],42,["aria-selected","aria-label","tabindex","onKeydown"]))),128))]))),128))],512)],42,["aria-label"]))}});var vv=At(HM,[["__file","basic-year-table.vue"]]);const UM=he({__name:"panel-date-pick",props:AM,emits:["pick","set-picker-option","panel-change"],setup(n,{emit:e}){const t=n,r=(de,fe,ne)=>!0,o=et("picker-panel"),i=et("date-picker"),a=dg(),s=Mi(),{t:l,lang:c}=$n(),d=on("EP_PICKER_BASE"),f=on(SI),{shortcuts:m,disabledDate:g,cellClassName:v,defaultTime:y}=d.props,b=er(d.props,"defaultValue"),_=H(),w=H(Qe().locale(c.value)),T=H(!1);let k=!1;const x=O(()=>Qe(y).locale(c.value)),M=O(()=>w.value.month()),D=O(()=>w.value.year()),A=H([]),P=H(null),$=H(null),B=de=>A.value.length>0?r(de,A.value,t.format||"HH:mm:ss"):!0,j=de=>y&&!Ct.value&&!T.value&&!k?x.value.year(de.year()).month(de.month()).date(de.date()):ze.value?de.millisecond(0):de.startOf("day"),U=(de,...fe)=>{if(!de)e("pick",de,...fe);else if(Rt(de)){const ne=de.map(j);e("pick",ne,...fe)}else e("pick",j(de),...fe);P.value=null,$.value=null,T.value=!1,k=!1},G=async(de,fe)=>{if(re.value==="date"){de=de;let ne=t.parsedValue?t.parsedValue.year(de.year()).month(de.month()).date(de.date()):de;B(ne)||(ne=A.value[0][0].year(de.year()).month(de.month()).date(de.date())),w.value=ne,U(ne,ze.value||fe),t.type==="datetime"&&(await Xt(),wt())}else re.value==="week"?U(de.date):re.value==="dates"&&U(de,!0)},N=de=>{const fe=de?"add":"subtract";w.value=w.value[fe](1,"month"),Te("month")},R=de=>{const fe=w.value,ne=de?"add":"subtract";w.value=X.value==="year"?fe[ne](10,"year"):fe[ne](1,"year"),Te("year")},X=H("date"),te=O(()=>{const de=l("el.datepicker.year");if(X.value==="year"){const fe=Math.floor(D.value/10)*10;return de?`${fe} ${de} - ${fe+9} ${de}`:`${fe} - ${fe+9}`}return`${D.value} ${de}`}),Y=de=>{const fe=Lo(de.value)?de.value():de.value;if(fe){k=!0,U(Qe(fe).locale(c.value));return}de.onClick&&de.onClick({attrs:a,slots:s,emit:e})},re=O(()=>{const{type:de}=t;return["week","month","months","year","years","dates"].includes(de)?de:"date"}),Q=O(()=>re.value==="dates"||re.value==="months"||re.value==="years"),Z=O(()=>re.value==="date"?X.value:re.value),q=O(()=>!!m.length),le=async(de,fe)=>{re.value==="month"?(w.value=Yu(w.value.year(),de,c.value,g),U(w.value,!1)):re.value==="months"?U(de,fe??!0):(w.value=Yu(w.value.year(),de,c.value,g),X.value="date",["month","year","date","week"].includes(re.value)&&(U(w.value,!0),await Xt(),wt())),Te("month")},ye=async(de,fe)=>{if(re.value==="year"){const ne=w.value.startOf("year").year(de);w.value=fv(ne,c.value,g),U(w.value,!1)}else if(re.value==="years")U(de,fe??!0);else{const ne=w.value.year(de);w.value=fv(ne,c.value,g),X.value="month",["month","year","date","week"].includes(re.value)&&(U(w.value,!0),await Xt(),wt())}Te("year")},Re=async de=>{X.value=de,await Xt(),wt()},ze=O(()=>t.type==="datetime"||t.type==="datetimerange"),nt=O(()=>{const de=ze.value||re.value==="dates",fe=re.value==="years",ne=re.value==="months",W=X.value==="date",_e=X.value==="year",ke=X.value==="month";return de&&W||fe&&_e||ne&&ke}),Ge=O(()=>g?t.parsedValue?Rt(t.parsedValue)?g(t.parsedValue[0].toDate()):g(t.parsedValue.toDate()):!0:!1),mt=()=>{if(Q.value)U(t.parsedValue);else{let de=t.parsedValue;if(!de){const fe=Qe(y).locale(c.value),ne=$t();de=fe.year(ne.year()).month(ne.month()).date(ne.date())}w.value=de,U(de)}},ut=O(()=>g?g(Qe().locale(c.value).toDate()):!1),Pt=()=>{const fe=Qe().locale(c.value).toDate();T.value=!0,(!g||!g(fe))&&B(fe)&&(w.value=Qe().locale(c.value),U(w.value))},gt=O(()=>t.timeFormat||s4(t.format)),tt=O(()=>t.dateFormat||i4(t.format)),Ct=O(()=>{if($.value)return $.value;if(!(!t.parsedValue&&!b.value))return(t.parsedValue||w.value).format(gt.value)}),Bt=O(()=>{if(P.value)return P.value;if(!(!t.parsedValue&&!b.value))return(t.parsedValue||w.value).format(tt.value)}),Ne=H(!1),je=()=>{Ne.value=!0},Be=()=>{Ne.value=!1},qe=de=>({hour:de.hour(),minute:de.minute(),second:de.second(),year:de.year(),month:de.month(),date:de.date()}),Je=(de,fe,ne)=>{const{hour:W,minute:_e,second:ke}=qe(de),Ee=t.parsedValue?t.parsedValue.hour(W).minute(_e).second(ke):de;w.value=Ee,U(w.value,!0),ne||(Ne.value=fe)},ct=de=>{const fe=Qe(de,gt.value).locale(c.value);if(fe.isValid()&&B(fe)){const{year:ne,month:W,date:_e}=qe(w.value);w.value=fe.year(ne).month(W).date(_e),$.value=null,Ne.value=!1,U(w.value,!0)}},vt=de=>{const fe=Qe(de,tt.value).locale(c.value);if(fe.isValid()){if(g&&g(fe.toDate()))return;const{hour:ne,minute:W,second:_e}=qe(w.value);w.value=fe.hour(ne).minute(W).second(_e),P.value=null,U(w.value,!0)}},Se=de=>Qe.isDayjs(de)&&de.isValid()&&(g?!g(de.toDate()):!0),He=de=>Rt(de)?de.map(fe=>fe.format(t.format)):de.format(t.format),Tt=de=>Qe(de,t.format).locale(c.value),$t=()=>{const de=Qe(b.value).locale(c.value);if(!b.value){const fe=x.value;return Qe().hour(fe.hour()).minute(fe.minute()).second(fe.second()).locale(c.value)}return de},wt=()=>{var de;["week","month","year","date"].includes(re.value)&&((de=_.value)==null||de.focus())},me=()=>{wt(),re.value==="week"&&be(Lt.down)},ce=de=>{const{code:fe}=de;[Lt.up,Lt.down,Lt.left,Lt.right,Lt.home,Lt.end,Lt.pageUp,Lt.pageDown].includes(fe)&&(be(fe),de.stopPropagation(),de.preventDefault()),[Lt.enter,Lt.space,Lt.numpadEnter].includes(fe)&&P.value===null&&$.value===null&&(de.preventDefault(),U(w.value,!1))},be=de=>{var fe;const{up:ne,down:W,left:_e,right:ke,home:Ee,end:Ke,pageUp:St,pageDown:dt}=Lt,pe={year:{[ne]:-4,[W]:4,[_e]:-1,[ke]:1,offset:(Ue,Zt)=>Ue.setFullYear(Ue.getFullYear()+Zt)},month:{[ne]:-4,[W]:4,[_e]:-1,[ke]:1,offset:(Ue,Zt)=>Ue.setMonth(Ue.getMonth()+Zt)},week:{[ne]:-1,[W]:1,[_e]:-1,[ke]:1,offset:(Ue,Zt)=>Ue.setDate(Ue.getDate()+Zt*7)},date:{[ne]:-7,[W]:7,[_e]:-1,[ke]:1,[Ee]:Ue=>-Ue.getDay(),[Ke]:Ue=>-Ue.getDay()+6,[St]:Ue=>-new Date(Ue.getFullYear(),Ue.getMonth(),0).getDate(),[dt]:Ue=>new Date(Ue.getFullYear(),Ue.getMonth()+1,0).getDate(),offset:(Ue,Zt)=>Ue.setDate(Ue.getDate()+Zt)}},Ae=w.value.toDate();for(;Math.abs(w.value.diff(Ae,"year",!0))<1;){const Ue=pe[Z.value];if(!Ue)return;if(Ue.offset(Ae,Lo(Ue[de])?Ue[de](Ae):(fe=Ue[de])!=null?fe:0),g&&g(Ae))break;const Zt=Qe(Ae).locale(c.value);w.value=Zt,e("pick",Zt,!0);break}},Te=de=>{e("panel-change",w.value.toDate(),de,X.value)};return Me(()=>re.value,de=>{if(["month","year"].includes(de)){X.value=de;return}else if(de==="years"){X.value="year";return}else if(de==="months"){X.value="month";return}X.value="date"},{immediate:!0}),Me(()=>X.value,()=>{f==null||f.updatePopper()}),Me(()=>b.value,de=>{de&&(w.value=$t())},{immediate:!0}),Me(()=>t.parsedValue,de=>{if(de){if(Q.value||Rt(de))return;w.value=de}else w.value=$t()},{immediate:!0}),e("set-picker-option",["isValidValue",Se]),e("set-picker-option",["formatToString",He]),e("set-picker-option",["parseUserInput",Tt]),e("set-picker-option",["handleFocusPicker",me]),(de,fe)=>(C(),F("div",{class:ee([h(o).b(),h(i).b(),{"has-sidebar":de.$slots.sidebar||h(q),"has-time":h(ze)}])},[z("div",{class:ee(h(o).e("body-wrapper"))},[xe(de.$slots,"sidebar",{class:ee(h(o).e("sidebar"))}),h(q)?(C(),F("div",{key:0,class:ee(h(o).e("sidebar"))},[(C(!0),F($e,null,ot(h(m),(ne,W)=>(C(),F("button",{key:W,type:"button",class:ee(h(o).e("shortcut")),onClick:_e=>Y(ne)},ae(ne.text),11,["onClick"]))),128))],2)):ie("v-if",!0),z("div",{class:ee(h(o).e("body"))},[h(ze)?(C(),F("div",{key:0,class:ee(h(i).e("time-header"))},[z("span",{class:ee(h(i).e("editor-wrap"))},[I(h(Ca),{placeholder:h(l)("el.datepicker.selectDate"),"model-value":h(Bt),size:"small","validate-event":!1,onInput:ne=>P.value=ne,onChange:vt},null,8,["placeholder","model-value","onInput"])],2),En((C(),F("span",{class:ee(h(i).e("editor-wrap"))},[I(h(Ca),{placeholder:h(l)("el.datepicker.selectTime"),"model-value":h(Ct),size:"small","validate-event":!1,onFocus:je,onInput:ne=>$.value=ne,onChange:ct},null,8,["placeholder","model-value","onInput"]),I(h(dv),{visible:Ne.value,format:h(gt),"parsed-value":w.value,onPick:Je},null,8,["visible","format","parsed-value"])],2)),[[h(mf),Be]])],2)):ie("v-if",!0),En(z("div",{class:ee([h(i).e("header"),(X.value==="year"||X.value==="month")&&h(i).e("header--bordered")])},[z("span",{class:ee(h(i).e("prev-btn"))},[z("button",{type:"button","aria-label":h(l)("el.datepicker.prevYear"),class:ee(["d-arrow-left",h(o).e("icon-btn")]),onClick:ne=>R(!1)},[xe(de.$slots,"prev-year",{},()=>[I(h(yt),null,{default:V(()=>[I(h(Si))]),_:1})])],10,["aria-label","onClick"]),En(z("button",{type:"button","aria-label":h(l)("el.datepicker.prevMonth"),class:ee([h(o).e("icon-btn"),"arrow-left"]),onClick:ne=>N(!1)},[xe(de.$slots,"prev-month",{},()=>[I(h(yt),null,{default:V(()=>[I(h(ju))]),_:1})])],10,["aria-label","onClick"]),[[vo,X.value==="date"]])],2),z("span",{role:"button",class:ee(h(i).e("header-label")),"aria-live":"polite",tabindex:"0",onKeydown:Ir(ne=>Re("year"),["enter"]),onClick:ne=>Re("year")},ae(h(te)),43,["onKeydown","onClick"]),En(z("span",{role:"button","aria-live":"polite",tabindex:"0",class:ee([h(i).e("header-label"),{active:X.value==="month"}]),onKeydown:Ir(ne=>Re("month"),["enter"]),onClick:ne=>Re("month")},ae(h(l)(`el.datepicker.month${h(M)+1}`)),43,["onKeydown","onClick"]),[[vo,X.value==="date"]]),z("span",{class:ee(h(i).e("next-btn"))},[En(z("button",{type:"button","aria-label":h(l)("el.datepicker.nextMonth"),class:ee([h(o).e("icon-btn"),"arrow-right"]),onClick:ne=>N(!0)},[xe(de.$slots,"next-month",{},()=>[I(h(yt),null,{default:V(()=>[I(h(Ta))]),_:1})])],10,["aria-label","onClick"]),[[vo,X.value==="date"]]),z("button",{type:"button","aria-label":h(l)("el.datepicker.nextYear"),class:ee([h(o).e("icon-btn"),"d-arrow-right"]),onClick:ne=>R(!0)},[xe(de.$slots,"next-year",{},()=>[I(h(yt),null,{default:V(()=>[I(h(_i))]),_:1})])],10,["aria-label","onClick"])],2)],2),[[vo,X.value!=="time"]]),z("div",{class:ee(h(o).e("content")),onKeydown:ce},[X.value==="date"?(C(),se(hv,{key:0,ref_key:"currentViewRef",ref:_,"selection-mode":h(re),date:w.value,"parsed-value":de.parsedValue,"disabled-date":h(g),"cell-class-name":h(v),onPick:G},null,8,["selection-mode","date","parsed-value","disabled-date","cell-class-name"])):ie("v-if",!0),X.value==="year"?(C(),se(vv,{key:1,ref_key:"currentViewRef",ref:_,"selection-mode":h(re),date:w.value,"disabled-date":h(g),"parsed-value":de.parsedValue,onPick:ye},null,8,["selection-mode","date","disabled-date","parsed-value"])):ie("v-if",!0),X.value==="month"?(C(),se(mv,{key:2,ref_key:"currentViewRef",ref:_,"selection-mode":h(re),date:w.value,"parsed-value":de.parsedValue,"disabled-date":h(g),onPick:le},null,8,["selection-mode","date","parsed-value","disabled-date"])):ie("v-if",!0)],34)],2)],2),En(z("div",{class:ee(h(o).e("footer"))},[En(I(h(gf),{text:"",size:"small",class:ee(h(o).e("link-btn")),disabled:h(ut),onClick:Pt},{default:V(()=>[De(ae(h(l)("el.datepicker.now")),1)]),_:1},8,["class","disabled"]),[[vo,!h(Q)&&de.showNow]]),I(h(gf),{plain:"",size:"small",class:ee(h(o).e("link-btn")),disabled:h(Ge),onClick:mt},{default:V(()=>[De(ae(h(l)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])],2),[[vo,h(nt)]])],2))}});var WM=At(UM,[["__file","panel-date-pick.vue"]]);const jM=st({...b4,...yg,visible:Boolean}),S4=n=>{const{emit:e}=Kn(),t=dg(),r=Mi();return i=>{const a=Lo(i.value)?i.value():i.value;if(a){e("pick",[Qe(a[0]).locale(n.value),Qe(a[1]).locale(n.value)]);return}i.onClick&&i.onClick({attrs:t,slots:r,emit:e})}},_4=(n,{defaultValue:e,leftDate:t,rightDate:r,unit:o,onParsedValueChanged:i})=>{const{emit:a}=Kn(),{pickerNs:s}=on(xp),l=et("date-range-picker"),{t:c,lang:d}=$n(),f=S4(d),m=H(),g=H(),v=H({endDate:null,selecting:!1}),y=k=>{v.value=k},b=(k=!1)=>{const x=h(m),M=h(g);Ol([x,M])&&a("pick",[x,M],k)},_=k=>{v.value.selecting=k,k||(v.value.endDate=null)},w=k=>{if(Rt(k)&&k.length===2){const[x,M]=k;m.value=x,t.value=x,g.value=M,i(h(m),h(g))}else T()},T=()=>{const[k,x]=Sg(h(e),{lang:h(d),unit:o,unlinkPanels:n.unlinkPanels});m.value=void 0,g.value=void 0,t.value=k,r.value=x};return Me(e,k=>{k&&T()},{immediate:!0}),Me(()=>n.parsedValue,w,{immediate:!0}),{minDate:m,maxDate:g,rangeState:v,lang:d,ppNs:s,drpNs:l,handleChangeRange:y,handleRangeConfirm:b,handleShortcutClick:f,onSelect:_,onReset:w,t:c}},Sd="month",KM=he({__name:"panel-date-range",props:jM,emits:["pick","set-picker-option","calendar-change","panel-change"],setup(n,{emit:e}){const t=n,r=on("EP_PICKER_BASE"),{disabledDate:o,cellClassName:i,defaultTime:a,clearable:s}=r.props,l=er(r.props,"format"),c=er(r.props,"shortcuts"),d=er(r.props,"defaultValue"),{lang:f}=$n(),m=H(Qe().locale(f.value)),g=H(Qe().locale(f.value).add(1,Sd)),{minDate:v,maxDate:y,rangeState:b,ppNs:_,drpNs:w,handleChangeRange:T,handleRangeConfirm:k,handleShortcutClick:x,onSelect:M,onReset:D,t:A}=_4(t,{defaultValue:d,leftDate:m,rightDate:g,unit:Sd,onParsedValueChanged:de});Me(()=>t.visible,fe=>{!fe&&b.value.selecting&&(D(t.parsedValue),M(!1))});const P=H({min:null,max:null}),$=H({min:null,max:null}),B=O(()=>`${m.value.year()} ${A("el.datepicker.year")} ${A(`el.datepicker.month${m.value.month()+1}`)}`),j=O(()=>`${g.value.year()} ${A("el.datepicker.year")} ${A(`el.datepicker.month${g.value.month()+1}`)}`),U=O(()=>m.value.year()),G=O(()=>m.value.month()),N=O(()=>g.value.year()),R=O(()=>g.value.month()),X=O(()=>!!c.value.length),te=O(()=>P.value.min!==null?P.value.min:v.value?v.value.format(q.value):""),Y=O(()=>P.value.max!==null?P.value.max:y.value||v.value?(y.value||v.value).format(q.value):""),re=O(()=>$.value.min!==null?$.value.min:v.value?v.value.format(Z.value):""),Q=O(()=>$.value.max!==null?$.value.max:y.value||v.value?(y.value||v.value).format(Z.value):""),Z=O(()=>t.timeFormat||s4(l.value)),q=O(()=>t.dateFormat||i4(l.value)),le=fe=>Ol(fe)&&(o?!o(fe[0].toDate())&&!o(fe[1].toDate()):!0),ye=()=>{m.value=m.value.subtract(1,"year"),t.unlinkPanels||(g.value=m.value.add(1,"month")),gt("year")},Re=()=>{m.value=m.value.subtract(1,"month"),t.unlinkPanels||(g.value=m.value.add(1,"month")),gt("month")},ze=()=>{t.unlinkPanels?g.value=g.value.add(1,"year"):(m.value=m.value.add(1,"year"),g.value=m.value.add(1,"month")),gt("year")},nt=()=>{t.unlinkPanels?g.value=g.value.add(1,"month"):(m.value=m.value.add(1,"month"),g.value=m.value.add(1,"month")),gt("month")},Ge=()=>{m.value=m.value.add(1,"year"),gt("year")},mt=()=>{m.value=m.value.add(1,"month"),gt("month")},ut=()=>{g.value=g.value.subtract(1,"year"),gt("year")},Pt=()=>{g.value=g.value.subtract(1,"month"),gt("month")},gt=fe=>{e("panel-change",[m.value.toDate(),g.value.toDate()],fe)},tt=O(()=>{const fe=(G.value+1)%12,ne=G.value+1>=12?1:0;return t.unlinkPanels&&new Date(U.value+ne,fe)<new Date(N.value,R.value)}),Ct=O(()=>t.unlinkPanels&&N.value*12+R.value-(U.value*12+G.value+1)>=12),Bt=O(()=>!(v.value&&y.value&&!b.value.selecting&&Ol([v.value,y.value]))),Ne=O(()=>t.type==="datetime"||t.type==="datetimerange"),je=(fe,ne)=>{if(fe)return a?Qe(a[ne]||a).locale(f.value).year(fe.year()).month(fe.month()).date(fe.date()):fe},Be=(fe,ne=!0)=>{const W=fe.minDate,_e=fe.maxDate,ke=je(W,0),Ee=je(_e,1);y.value===Ee&&v.value===ke||(e("calendar-change",[W.toDate(),_e&&_e.toDate()]),y.value=Ee,v.value=ke,!(!ne||Ne.value)&&k())},qe=H(!1),Je=H(!1),ct=()=>{qe.value=!1},vt=()=>{Je.value=!1},Se=(fe,ne)=>{P.value[ne]=fe;const W=Qe(fe,q.value).locale(f.value);if(W.isValid()){if(o&&o(W.toDate()))return;ne==="min"?(m.value=W,v.value=(v.value||m.value).year(W.year()).month(W.month()).date(W.date()),!t.unlinkPanels&&(!y.value||y.value.isBefore(v.value))&&(g.value=W.add(1,"month"),y.value=v.value.add(1,"month"))):(g.value=W,y.value=(y.value||g.value).year(W.year()).month(W.month()).date(W.date()),!t.unlinkPanels&&(!v.value||v.value.isAfter(y.value))&&(m.value=W.subtract(1,"month"),v.value=y.value.subtract(1,"month")))}},He=(fe,ne)=>{P.value[ne]=null},Tt=(fe,ne)=>{$.value[ne]=fe;const W=Qe(fe,Z.value).locale(f.value);W.isValid()&&(ne==="min"?(qe.value=!0,v.value=(v.value||m.value).hour(W.hour()).minute(W.minute()).second(W.second())):(Je.value=!0,y.value=(y.value||g.value).hour(W.hour()).minute(W.minute()).second(W.second()),g.value=y.value))},$t=(fe,ne)=>{$.value[ne]=null,ne==="min"?(m.value=v.value,qe.value=!1,(!y.value||y.value.isBefore(v.value))&&(y.value=v.value)):(g.value=y.value,Je.value=!1,y.value&&y.value.isBefore(v.value)&&(v.value=y.value))},wt=(fe,ne,W)=>{$.value.min||(fe&&(m.value=fe,v.value=(v.value||m.value).hour(fe.hour()).minute(fe.minute()).second(fe.second())),W||(qe.value=ne),(!y.value||y.value.isBefore(v.value))&&(y.value=v.value,g.value=fe))},me=(fe,ne,W)=>{$.value.max||(fe&&(g.value=fe,y.value=(y.value||g.value).hour(fe.hour()).minute(fe.minute()).second(fe.second())),W||(Je.value=ne),y.value&&y.value.isBefore(v.value)&&(v.value=y.value))},ce=()=>{m.value=Sg(h(d),{lang:h(f),unit:"month",unlinkPanels:t.unlinkPanels})[0],g.value=m.value.add(1,"month"),y.value=void 0,v.value=void 0,e("pick",null)},be=fe=>Rt(fe)?fe.map(ne=>ne.format(l.value)):fe.format(l.value),Te=fe=>Rt(fe)?fe.map(ne=>Qe(ne,l.value).locale(f.value)):Qe(fe,l.value).locale(f.value);function de(fe,ne){if(t.unlinkPanels&&ne){const W=(fe==null?void 0:fe.year())||0,_e=(fe==null?void 0:fe.month())||0,ke=ne.year(),Ee=ne.month();g.value=W===ke&&_e===Ee?ne.add(1,Sd):ne}else g.value=m.value.add(1,Sd),ne&&(g.value=g.value.hour(ne.hour()).minute(ne.minute()).second(ne.second()))}return e("set-picker-option",["isValidValue",le]),e("set-picker-option",["parseUserInput",Te]),e("set-picker-option",["formatToString",be]),e("set-picker-option",["handleClear",ce]),(fe,ne)=>(C(),F("div",{class:ee([h(_).b(),h(w).b(),{"has-sidebar":fe.$slots.sidebar||h(X),"has-time":h(Ne)}])},[z("div",{class:ee(h(_).e("body-wrapper"))},[xe(fe.$slots,"sidebar",{class:ee(h(_).e("sidebar"))}),h(X)?(C(),F("div",{key:0,class:ee(h(_).e("sidebar"))},[(C(!0),F($e,null,ot(h(c),(W,_e)=>(C(),F("button",{key:_e,type:"button",class:ee(h(_).e("shortcut")),onClick:ke=>h(x)(W)},ae(W.text),11,["onClick"]))),128))],2)):ie("v-if",!0),z("div",{class:ee(h(_).e("body"))},[h(Ne)?(C(),F("div",{key:0,class:ee(h(w).e("time-header"))},[z("span",{class:ee(h(w).e("editors-wrap"))},[z("span",{class:ee(h(w).e("time-picker-wrap"))},[I(h(Ca),{size:"small",disabled:h(b).selecting,placeholder:h(A)("el.datepicker.startDate"),class:ee(h(w).e("editor")),"model-value":h(te),"validate-event":!1,onInput:W=>Se(W,"min"),onChange:W=>He(W,"min")},null,8,["disabled","placeholder","class","model-value","onInput","onChange"])],2),En((C(),F("span",{class:ee(h(w).e("time-picker-wrap"))},[I(h(Ca),{size:"small",class:ee(h(w).e("editor")),disabled:h(b).selecting,placeholder:h(A)("el.datepicker.startTime"),"model-value":h(re),"validate-event":!1,onFocus:W=>qe.value=!0,onInput:W=>Tt(W,"min"),onChange:W=>$t(W,"min")},null,8,["class","disabled","placeholder","model-value","onFocus","onInput","onChange"]),I(h(dv),{visible:qe.value,format:h(Z),"datetime-role":"start","parsed-value":m.value,onPick:wt},null,8,["visible","format","parsed-value"])],2)),[[h(mf),ct]])],2),z("span",null,[I(h(yt),null,{default:V(()=>[I(h(Ta))]),_:1})]),z("span",{class:ee([h(w).e("editors-wrap"),"is-right"])},[z("span",{class:ee(h(w).e("time-picker-wrap"))},[I(h(Ca),{size:"small",class:ee(h(w).e("editor")),disabled:h(b).selecting,placeholder:h(A)("el.datepicker.endDate"),"model-value":h(Y),readonly:!h(v),"validate-event":!1,onInput:W=>Se(W,"max"),onChange:W=>He(W,"max")},null,8,["class","disabled","placeholder","model-value","readonly","onInput","onChange"])],2),En((C(),F("span",{class:ee(h(w).e("time-picker-wrap"))},[I(h(Ca),{size:"small",class:ee(h(w).e("editor")),disabled:h(b).selecting,placeholder:h(A)("el.datepicker.endTime"),"model-value":h(Q),readonly:!h(v),"validate-event":!1,onFocus:W=>h(v)&&(Je.value=!0),onInput:W=>Tt(W,"max"),onChange:W=>$t(W,"max")},null,8,["class","disabled","placeholder","model-value","readonly","onFocus","onInput","onChange"]),I(h(dv),{"datetime-role":"end",visible:Je.value,format:h(Z),"parsed-value":g.value,onPick:me},null,8,["visible","format","parsed-value"])],2)),[[h(mf),vt]])],2)],2)):ie("v-if",!0),z("div",{class:ee([[h(_).e("content"),h(w).e("content")],"is-left"])},[z("div",{class:ee(h(w).e("header"))},[z("button",{type:"button",class:ee([h(_).e("icon-btn"),"d-arrow-left"]),"aria-label":h(A)("el.datepicker.prevYear"),onClick:ye},[xe(fe.$slots,"prev-year",{},()=>[I(h(yt),null,{default:V(()=>[I(h(Si))]),_:1})])],10,["aria-label"]),z("button",{type:"button",class:ee([h(_).e("icon-btn"),"arrow-left"]),"aria-label":h(A)("el.datepicker.prevMonth"),onClick:Re},[xe(fe.$slots,"prev-month",{},()=>[I(h(yt),null,{default:V(()=>[I(h(ju))]),_:1})])],10,["aria-label"]),fe.unlinkPanels?(C(),F("button",{key:0,type:"button",disabled:!h(Ct),class:ee([[h(_).e("icon-btn"),{"is-disabled":!h(Ct)}],"d-arrow-right"]),"aria-label":h(A)("el.datepicker.nextYear"),onClick:Ge},[xe(fe.$slots,"next-year",{},()=>[I(h(yt),null,{default:V(()=>[I(h(_i))]),_:1})])],10,["disabled","aria-label"])):ie("v-if",!0),fe.unlinkPanels?(C(),F("button",{key:1,type:"button",disabled:!h(tt),class:ee([[h(_).e("icon-btn"),{"is-disabled":!h(tt)}],"arrow-right"]),"aria-label":h(A)("el.datepicker.nextMonth"),onClick:mt},[xe(fe.$slots,"next-month",{},()=>[I(h(yt),null,{default:V(()=>[I(h(Ta))]),_:1})])],10,["disabled","aria-label"])):ie("v-if",!0),z("div",null,ae(h(B)),1)],2),I(hv,{"selection-mode":"range",date:m.value,"min-date":h(v),"max-date":h(y),"range-state":h(b),"disabled-date":h(o),"cell-class-name":h(i),onChangerange:h(T),onPick:Be,onSelect:h(M)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2),z("div",{class:ee([[h(_).e("content"),h(w).e("content")],"is-right"])},[z("div",{class:ee(h(w).e("header"))},[fe.unlinkPanels?(C(),F("button",{key:0,type:"button",disabled:!h(Ct),class:ee([[h(_).e("icon-btn"),{"is-disabled":!h(Ct)}],"d-arrow-left"]),"aria-label":h(A)("el.datepicker.prevYear"),onClick:ut},[xe(fe.$slots,"prev-year",{},()=>[I(h(yt),null,{default:V(()=>[I(h(Si))]),_:1})])],10,["disabled","aria-label"])):ie("v-if",!0),fe.unlinkPanels?(C(),F("button",{key:1,type:"button",disabled:!h(tt),class:ee([[h(_).e("icon-btn"),{"is-disabled":!h(tt)}],"arrow-left"]),"aria-label":h(A)("el.datepicker.prevMonth"),onClick:Pt},[xe(fe.$slots,"prev-month",{},()=>[I(h(yt),null,{default:V(()=>[I(h(ju))]),_:1})])],10,["disabled","aria-label"])):ie("v-if",!0),z("button",{type:"button","aria-label":h(A)("el.datepicker.nextYear"),class:ee([h(_).e("icon-btn"),"d-arrow-right"]),onClick:ze},[xe(fe.$slots,"next-year",{},()=>[I(h(yt),null,{default:V(()=>[I(h(_i))]),_:1})])],10,["aria-label"]),z("button",{type:"button",class:ee([h(_).e("icon-btn"),"arrow-right"]),"aria-label":h(A)("el.datepicker.nextMonth"),onClick:nt},[xe(fe.$slots,"next-month",{},()=>[I(h(yt),null,{default:V(()=>[I(h(Ta))]),_:1})])],10,["aria-label"]),z("div",null,ae(h(j)),1)],2),I(hv,{"selection-mode":"range",date:g.value,"min-date":h(v),"max-date":h(y),"range-state":h(b),"disabled-date":h(o),"cell-class-name":h(i),onChangerange:h(T),onPick:Be,onSelect:h(M)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2)],2)],2),h(Ne)?(C(),F("div",{key:0,class:ee(h(_).e("footer"))},[h(s)?(C(),se(h(gf),{key:0,text:"",size:"small",class:ee(h(_).e("link-btn")),onClick:ce},{default:V(()=>[De(ae(h(A)("el.datepicker.clear")),1)]),_:1},8,["class"])):ie("v-if",!0),I(h(gf),{plain:"",size:"small",class:ee(h(_).e("link-btn")),disabled:h(Bt),onClick:W=>h(k)(!1)},{default:V(()=>[De(ae(h(A)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled","onClick"])],2)):ie("v-if",!0)],2))}});var YM=At(KM,[["__file","panel-date-range.vue"]]);const qM=st({...yg}),GM=["pick","set-picker-option","calendar-change"],JM=({unlinkPanels:n,leftDate:e,rightDate:t})=>{const{t:r}=$n(),o=()=>{e.value=e.value.subtract(1,"year"),n.value||(t.value=t.value.subtract(1,"year"))},i=()=>{n.value||(e.value=e.value.add(1,"year")),t.value=t.value.add(1,"year")},a=()=>{e.value=e.value.add(1,"year")},s=()=>{t.value=t.value.subtract(1,"year")},l=O(()=>`${e.value.year()} ${r("el.datepicker.year")}`),c=O(()=>`${t.value.year()} ${r("el.datepicker.year")}`),d=O(()=>e.value.year()),f=O(()=>t.value.year()===e.value.year()?e.value.year()+1:t.value.year());return{leftPrevYear:o,rightNextYear:i,leftNextYear:a,rightPrevYear:s,leftLabel:l,rightLabel:c,leftYear:d,rightYear:f}},_d="year",XM=he({name:"DatePickerMonthRange"}),QM=he({...XM,props:qM,emits:GM,setup(n,{emit:e}){const t=n,{lang:r}=$n(),o=on("EP_PICKER_BASE"),{shortcuts:i,disabledDate:a}=o.props,s=er(o.props,"format"),l=er(o.props,"defaultValue"),c=H(Qe().locale(r.value)),d=H(Qe().locale(r.value).add(1,_d)),{minDate:f,maxDate:m,rangeState:g,ppNs:v,drpNs:y,handleChangeRange:b,handleRangeConfirm:_,handleShortcutClick:w,onSelect:T}=_4(t,{defaultValue:l,leftDate:c,rightDate:d,unit:_d,onParsedValueChanged:te}),k=O(()=>!!i.length),{leftPrevYear:x,rightNextYear:M,leftNextYear:D,rightPrevYear:A,leftLabel:P,rightLabel:$,leftYear:B,rightYear:j}=JM({unlinkPanels:er(t,"unlinkPanels"),leftDate:c,rightDate:d}),U=O(()=>t.unlinkPanels&&j.value>B.value+1),G=(Y,re=!0)=>{const Q=Y.minDate,Z=Y.maxDate;m.value===Z&&f.value===Q||(e("calendar-change",[Q.toDate(),Z&&Z.toDate()]),m.value=Z,f.value=Q,re&&_())},N=()=>{c.value=Sg(h(l),{lang:h(r),unit:"year",unlinkPanels:t.unlinkPanels})[0],d.value=c.value.add(1,"year"),e("pick",null)},R=Y=>Rt(Y)?Y.map(re=>re.format(s.value)):Y.format(s.value),X=Y=>Rt(Y)?Y.map(re=>Qe(re,s.value).locale(r.value)):Qe(Y,s.value).locale(r.value);function te(Y,re){if(t.unlinkPanels&&re){const Q=(Y==null?void 0:Y.year())||0,Z=re.year();d.value=Q===Z?re.add(1,_d):re}else d.value=c.value.add(1,_d)}return e("set-picker-option",["isValidValue",Ol]),e("set-picker-option",["formatToString",R]),e("set-picker-option",["parseUserInput",X]),e("set-picker-option",["handleClear",N]),(Y,re)=>(C(),F("div",{class:ee([h(v).b(),h(y).b(),{"has-sidebar":!!Y.$slots.sidebar||h(k)}])},[z("div",{class:ee(h(v).e("body-wrapper"))},[xe(Y.$slots,"sidebar",{class:ee(h(v).e("sidebar"))}),h(k)?(C(),F("div",{key:0,class:ee(h(v).e("sidebar"))},[(C(!0),F($e,null,ot(h(i),(Q,Z)=>(C(),F("button",{key:Z,type:"button",class:ee(h(v).e("shortcut")),onClick:q=>h(w)(Q)},ae(Q.text),11,["onClick"]))),128))],2)):ie("v-if",!0),z("div",{class:ee(h(v).e("body"))},[z("div",{class:ee([[h(v).e("content"),h(y).e("content")],"is-left"])},[z("div",{class:ee(h(y).e("header"))},[z("button",{type:"button",class:ee([h(v).e("icon-btn"),"d-arrow-left"]),onClick:h(x)},[xe(Y.$slots,"prev-year",{},()=>[I(h(yt),null,{default:V(()=>[I(h(Si))]),_:1})])],10,["onClick"]),Y.unlinkPanels?(C(),F("button",{key:0,type:"button",disabled:!h(U),class:ee([[h(v).e("icon-btn"),{[h(v).is("disabled")]:!h(U)}],"d-arrow-right"]),onClick:h(D)},[xe(Y.$slots,"next-year",{},()=>[I(h(yt),null,{default:V(()=>[I(h(_i))]),_:1})])],10,["disabled","onClick"])):ie("v-if",!0),z("div",null,ae(h(P)),1)],2),I(mv,{"selection-mode":"range",date:c.value,"min-date":h(f),"max-date":h(m),"range-state":h(g),"disabled-date":h(a),onChangerange:h(b),onPick:G,onSelect:h(T)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2),z("div",{class:ee([[h(v).e("content"),h(y).e("content")],"is-right"])},[z("div",{class:ee(h(y).e("header"))},[Y.unlinkPanels?(C(),F("button",{key:0,type:"button",disabled:!h(U),class:ee([[h(v).e("icon-btn"),{"is-disabled":!h(U)}],"d-arrow-left"]),onClick:h(A)},[xe(Y.$slots,"prev-year",{},()=>[I(h(yt),null,{default:V(()=>[I(h(Si))]),_:1})])],10,["disabled","onClick"])):ie("v-if",!0),z("button",{type:"button",class:ee([h(v).e("icon-btn"),"d-arrow-right"]),onClick:h(M)},[xe(Y.$slots,"next-year",{},()=>[I(h(yt),null,{default:V(()=>[I(h(_i))]),_:1})])],10,["onClick"]),z("div",null,ae(h($)),1)],2),I(mv,{"selection-mode":"range",date:d.value,"min-date":h(f),"max-date":h(m),"range-state":h(g),"disabled-date":h(a),onChangerange:h(b),onPick:G,onSelect:h(T)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2)],2)],2)],2))}});var ZM=At(QM,[["__file","panel-month-range.vue"]]);const e9=st({...yg}),t9=["pick","set-picker-option","calendar-change"],n9=({unlinkPanels:n,leftDate:e,rightDate:t})=>{const r=()=>{e.value=e.value.subtract(10,"year"),n.value||(t.value=t.value.subtract(10,"year"))},o=()=>{n.value||(e.value=e.value.add(10,"year")),t.value=t.value.add(10,"year")},i=()=>{e.value=e.value.add(10,"year")},a=()=>{t.value=t.value.subtract(10,"year")},s=O(()=>{const f=Math.floor(e.value.year()/10)*10;return`${f}-${f+9}`}),l=O(()=>{const f=Math.floor(t.value.year()/10)*10;return`${f}-${f+9}`}),c=O(()=>Math.floor(e.value.year()/10)*10+9),d=O(()=>Math.floor(t.value.year()/10)*10);return{leftPrevYear:r,rightNextYear:o,leftNextYear:i,rightPrevYear:a,leftLabel:s,rightLabel:l,leftYear:c,rightYear:d}},_b="year",r9=he({name:"DatePickerYearRange"}),o9=he({...r9,props:e9,emits:t9,setup(n,{emit:e}){const t=n,{lang:r}=$n(),o=H(Qe().locale(r.value)),i=H(o.value.add(10,"year")),{pickerNs:a}=on(xp),s=et("date-range-picker"),l=O(()=>!!G.length),c=O(()=>[a.b(),s.b(),{"has-sidebar":!!Mi().sidebar||l.value}]),d=O(()=>({content:[a.e("content"),s.e("content"),"is-left"],arrowLeftBtn:[a.e("icon-btn"),"d-arrow-left"],arrowRightBtn:[a.e("icon-btn"),{[a.is("disabled")]:!x.value},"d-arrow-right"]})),f=O(()=>({content:[a.e("content"),s.e("content"),"is-right"],arrowLeftBtn:[a.e("icon-btn"),{"is-disabled":!x.value},"d-arrow-left"],arrowRightBtn:[a.e("icon-btn"),"d-arrow-right"]})),m=S4(r),{leftPrevYear:g,rightNextYear:v,leftNextYear:y,rightPrevYear:b,leftLabel:_,rightLabel:w,leftYear:T,rightYear:k}=n9({unlinkPanels:er(t,"unlinkPanels"),leftDate:o,rightDate:i}),x=O(()=>t.unlinkPanels&&k.value>T.value+1),M=H(),D=H(),A=H({endDate:null,selecting:!1}),P=q=>{A.value=q},$=(q,le=!0)=>{const ye=q.minDate,Re=q.maxDate;D.value===Re&&M.value===ye||(e("calendar-change",[ye.toDate(),Re&&Re.toDate()]),D.value=Re,M.value=ye,le&&B())},B=(q=!1)=>{Ol([M.value,D.value])&&e("pick",[M.value,D.value],q)},j=q=>{A.value.selecting=q,q||(A.value.endDate=null)},U=on("EP_PICKER_BASE"),{shortcuts:G,disabledDate:N}=U.props,R=er(U.props,"format"),X=er(U.props,"defaultValue"),te=()=>{let q;if(Rt(X.value)){const le=Qe(X.value[0]);let ye=Qe(X.value[1]);return t.unlinkPanels||(ye=le.add(10,_b)),[le,ye]}else X.value?q=Qe(X.value):q=Qe();return q=q.locale(r.value),[q,q.add(10,_b)]};Me(()=>X.value,q=>{if(q){const le=te();o.value=le[0],i.value=le[1]}},{immediate:!0}),Me(()=>t.parsedValue,q=>{if(q&&q.length===2)if(M.value=q[0],D.value=q[1],o.value=M.value,t.unlinkPanels&&D.value){const le=M.value.year(),ye=D.value.year();i.value=le===ye?D.value.add(10,"year"):D.value}else i.value=o.value.add(10,"year");else{const le=te();M.value=void 0,D.value=void 0,o.value=le[0],i.value=le[1]}},{immediate:!0});const Y=q=>Rt(q)?q.map(le=>Qe(le,R.value).locale(r.value)):Qe(q,R.value).locale(r.value),re=q=>Rt(q)?q.map(le=>le.format(R.value)):q.format(R.value),Q=q=>Ol(q)&&(N?!N(q[0].toDate())&&!N(q[1].toDate()):!0),Z=()=>{const q=te();o.value=q[0],i.value=q[1],D.value=void 0,M.value=void 0,e("pick",null)};return e("set-picker-option",["isValidValue",Q]),e("set-picker-option",["parseUserInput",Y]),e("set-picker-option",["formatToString",re]),e("set-picker-option",["handleClear",Z]),(q,le)=>(C(),F("div",{class:ee(h(c))},[z("div",{class:ee(h(a).e("body-wrapper"))},[xe(q.$slots,"sidebar",{class:ee(h(a).e("sidebar"))}),h(l)?(C(),F("div",{key:0,class:ee(h(a).e("sidebar"))},[(C(!0),F($e,null,ot(h(G),(ye,Re)=>(C(),F("button",{key:Re,type:"button",class:ee(h(a).e("shortcut")),onClick:ze=>h(m)(ye)},ae(ye.text),11,["onClick"]))),128))],2)):ie("v-if",!0),z("div",{class:ee(h(a).e("body"))},[z("div",{class:ee(h(d).content)},[z("div",{class:ee(h(s).e("header"))},[z("button",{type:"button",class:ee(h(d).arrowLeftBtn),onClick:h(g)},[xe(q.$slots,"prev-year",{},()=>[I(h(yt),null,{default:V(()=>[I(h(Si))]),_:1})])],10,["onClick"]),q.unlinkPanels?(C(),F("button",{key:0,type:"button",disabled:!h(x),class:ee(h(d).arrowRightBtn),onClick:h(y)},[xe(q.$slots,"next-year",{},()=>[I(h(yt),null,{default:V(()=>[I(h(_i))]),_:1})])],10,["disabled","onClick"])):ie("v-if",!0),z("div",null,ae(h(_)),1)],2),I(vv,{"selection-mode":"range",date:o.value,"min-date":M.value,"max-date":D.value,"range-state":A.value,"disabled-date":h(N),onChangerange:P,onPick:$,onSelect:j},null,8,["date","min-date","max-date","range-state","disabled-date"])],2),z("div",{class:ee(h(f).content)},[z("div",{class:ee(h(s).e("header"))},[q.unlinkPanels?(C(),F("button",{key:0,type:"button",disabled:!h(x),class:ee(h(f).arrowLeftBtn),onClick:h(b)},[xe(q.$slots,"prev-year",{},()=>[I(h(yt),null,{default:V(()=>[I(h(Si))]),_:1})])],10,["disabled","onClick"])):ie("v-if",!0),z("button",{type:"button",class:ee(h(f).arrowRightBtn),onClick:h(v)},[xe(q.$slots,"next-year",{},()=>[I(h(yt),null,{default:V(()=>[I(h(_i))]),_:1})])],10,["onClick"]),z("div",null,ae(h(w)),1)],2),I(vv,{"selection-mode":"range",date:i.value,"min-date":M.value,"max-date":D.value,"range-state":A.value,"disabled-date":h(N),onChangerange:P,onPick:$,onSelect:j},null,8,["date","min-date","max-date","range-state","disabled-date"])],2)],2)],2)],2))}});var a9=At(o9,[["__file","panel-year-range.vue"]]);const i9=function(n){switch(n){case"daterange":case"datetimerange":return YM;case"monthrange":return ZM;case"yearrange":return a9;default:return WM}};Qe.extend(eT);Qe.extend(UT);Qe.extend(BT);Qe.extend(YT);Qe.extend(XT);Qe.extend(tM);Qe.extend(aM);Qe.extend(uM);var s9=he({name:"ElDatePicker",install:null,props:MM,emits:["update:modelValue"],setup(n,{expose:e,emit:t,slots:r}){const o=et("picker-panel");Pn("ElPopperOptions",Tn(er(n,"popperOptions"))),Pn(xp,{slots:r,pickerNs:o});const i=H();e({focus:()=>{var l;(l=i.value)==null||l.focus()},blur:()=>{var l;(l=i.value)==null||l.blur()},handleOpen:()=>{var l;(l=i.value)==null||l.handleOpen()},handleClose:()=>{var l;(l=i.value)==null||l.handleClose()}});const s=l=>{t("update:modelValue",l)};return()=>{var l;const c=(l=n.format)!=null?l:cM[n.type]||ml,d=i9(n.type);return I(yM,kt(n,{format:c,type:n.type,ref:i,"onUpdate:modelValue":s}),{default:f=>I(d,f,{"prev-month":r["prev-month"],"next-month":r["next-month"],"prev-year":r["prev-year"],"next-year":r["next-year"]}),"range-separator":r["range-separator"]})}}});const l9=jn(s9),w4=n=>{if(!n)return{onClick:zn,onMousedown:zn,onMouseup:zn};let e=!1,t=!1;return{onClick:a=>{e&&t&&n(a),e=t=!1},onMousedown:a=>{e=a.target===a.currentTarget},onMouseup:a=>{t=a.target===a.currentTarget}}},u9=st({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:Ce([String,Array,Object])},zIndex:{type:Ce([String,Number])}}),c9={click:n=>n instanceof MouseEvent},d9="overlay";var f9=he({name:"ElOverlay",props:u9,emits:c9,setup(n,{slots:e,emit:t}){const r=et(d9),o=l=>{t("click",l)},{onClick:i,onMousedown:a,onMouseup:s}=w4(n.customMaskEvent?void 0:o);return()=>n.mask?I("div",{class:[r.b(),n.overlayClass],style:{zIndex:n.zIndex},onClick:i,onMousedown:a,onMouseup:s},[xe(e,"default")],jd.STYLE|jd.CLASS|jd.PROPS,["onClick","onMouseup","onMousedown"]):Fe("div",{class:n.overlayClass,style:{zIndex:n.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[xe(e,"default")])}});const p9=f9,x4=Symbol("dialogInjectionKey"),k4=st({center:Boolean,alignCenter:Boolean,closeIcon:{type:Jn},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,headerClass:String,bodyClass:String,footerClass:String,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),h9={close:()=>!0},m9=(n,e,t,r)=>{let o={offsetX:0,offsetY:0};const i=c=>{const d=c.clientX,f=c.clientY,{offsetX:m,offsetY:g}=o,v=n.value.getBoundingClientRect(),y=v.left,b=v.top,_=v.width,w=v.height,T=document.documentElement.clientWidth,k=document.documentElement.clientHeight,x=-y+m,M=-b+g,D=T-y-_+m,A=k-b-w+g,P=B=>{let j=m+B.clientX-d,U=g+B.clientY-f;r!=null&&r.value||(j=Math.min(Math.max(j,x),D),U=Math.min(Math.max(U,M),A)),o={offsetX:j,offsetY:U},n.value&&(n.value.style.transform=`translate(${Jo(j)}, ${Jo(U)})`)},$=()=>{document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",$)};document.addEventListener("mousemove",P),document.addEventListener("mouseup",$)},a=()=>{e.value&&n.value&&e.value.addEventListener("mousedown",i)},s=()=>{e.value&&n.value&&e.value.removeEventListener("mousedown",i)},l=()=>{o={offsetX:0,offsetY:0},n.value&&(n.value.style.transform="none")};return Ht(()=>{pc(()=>{t.value?a():s()})}),Br(()=>{s()}),{resetPosition:l}},v9=(...n)=>e=>{n.forEach(t=>{Lo(t)?t(e):t.value=e})},g9=he({name:"ElDialogContent"}),y9=he({...g9,props:k4,emits:h9,setup(n,{expose:e}){const t=n,{t:r}=$n(),{Close:o}=wI,{dialogRef:i,headerRef:a,bodyId:s,ns:l,style:c}=on(x4),{focusTrapRef:d}=on(_I),f=O(()=>[l.b(),l.is("fullscreen",t.fullscreen),l.is("draggable",t.draggable),l.is("align-center",t.alignCenter),{[l.m("center")]:t.center}]),m=v9(d,i),g=O(()=>t.draggable),v=O(()=>t.overflow),{resetPosition:y}=m9(i,a,g,v);return e({resetPosition:y}),(b,_)=>(C(),F("div",{ref:h(m),class:ee(h(f)),style:Sn(h(c)),tabindex:"-1"},[z("header",{ref_key:"headerRef",ref:a,class:ee([h(l).e("header"),b.headerClass,{"show-close":b.showClose}])},[xe(b.$slots,"header",{},()=>[z("span",{role:"heading","aria-level":b.ariaLevel,class:ee(h(l).e("title"))},ae(b.title),11,["aria-level"])]),b.showClose?(C(),F("button",{key:0,"aria-label":h(r)("el.dialog.close"),class:ee(h(l).e("headerbtn")),type:"button",onClick:w=>b.$emit("close")},[I(h(yt),{class:ee(h(l).e("close"))},{default:V(()=>[(C(),se(dn(b.closeIcon||h(o))))]),_:1},8,["class"])],10,["aria-label","onClick"])):ie("v-if",!0)],2),z("div",{id:h(s),class:ee([h(l).e("body"),b.bodyClass])},[xe(b.$slots,"default")],10,["id"]),b.$slots.footer?(C(),F("footer",{key:0,class:ee([h(l).e("footer"),b.footerClass])},[xe(b.$slots,"footer")],2)):ie("v-if",!0)],6))}});var b9=At(y9,[["__file","dialog-content.vue"]]);const S9=st({...k4,appendToBody:Boolean,appendTo:{type:Ce([String,Object]),default:"body"},beforeClose:{type:Ce(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,headerClass:String,bodyClass:String,footerClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"}}),_9={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[Gn]:n=>Ea(n),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},w9=(n,e={})=>{bs(n)||to("[useLockscreen]","You need to pass a ref param to this function");const t=e.ns||et("popup"),r=O(()=>t.bm("parent","hidden"));if(!dc||_s(document.body,r.value))return;let o=0,i=!1,a="0";const s=()=>{setTimeout(()=>{typeof document>"u"||i&&document&&(document.body.style.width=a,zd(document.body,r.value))},200)};Me(n,l=>{if(!l){s();return}i=!_s(document.body,r.value),i&&(a=document.body.style.width,vu(document.body,r.value)),o=j3(t.namespace.value);const c=document.documentElement.clientHeight<document.body.scrollHeight,d=H3(document.body,"overflowY");o>0&&(c||d==="scroll")&&i&&(document.body.style.width=`calc(100% - ${o}px)`)}),K3(()=>s())},x9=(n,e)=>{var t;const o=Kn().emit,{nextZIndex:i}=xI();let a="";const s=iv(),l=iv(),c=H(!1),d=H(!1),f=H(!1),m=H((t=n.zIndex)!=null?t:i());let g,v;const y=N3("namespace",kI),b=O(()=>{const N={},R=`--${y.value}-dialog`;return n.fullscreen||(n.top&&(N[`${R}-margin-top`]=n.top),n.width&&(N[`${R}-width`]=Jo(n.width))),N}),_=O(()=>n.alignCenter?{display:"flex"}:{});function w(){o("opened")}function T(){o("closed"),o(Gn,!1),n.destroyOnClose&&(f.value=!1)}function k(){o("close")}function x(){v==null||v(),g==null||g(),n.openDelay&&n.openDelay>0?{stop:g}=vf(()=>P(),n.openDelay):P()}function M(){g==null||g(),v==null||v(),n.closeDelay&&n.closeDelay>0?{stop:v}=vf(()=>$(),n.closeDelay):$()}function D(){function N(R){R||(d.value=!0,c.value=!1)}n.beforeClose?n.beforeClose(N):M()}function A(){n.closeOnClickModal&&D()}function P(){dc&&(c.value=!0)}function $(){c.value=!1}function B(){o("openAutoFocus")}function j(){o("closeAutoFocus")}function U(N){var R;((R=N.detail)==null?void 0:R.focusReason)==="pointer"&&N.preventDefault()}n.lockScroll&&w9(c);function G(){n.closeOnPressEscape&&D()}return Me(()=>n.modelValue,N=>{N?(d.value=!1,x(),f.value=!0,m.value=CI(n.zIndex)?i():m.value++,Xt(()=>{o("open"),e.value&&(e.value.parentElement.scrollTop=0,e.value.parentElement.scrollLeft=0,e.value.scrollTop=0)})):c.value&&M()}),Me(()=>n.fullscreen,N=>{e.value&&(N?(a=e.value.style.transform,e.value.style.transform=""):e.value.style.transform=a)}),Ht(()=>{n.modelValue&&(c.value=!0,f.value=!0,x())}),{afterEnter:w,afterLeave:T,beforeLeave:k,handleClose:D,onModalClick:A,close:M,doClose:$,onOpenAutoFocus:B,onCloseAutoFocus:j,onCloseRequested:G,onFocusoutPrevented:U,titleId:s,bodyId:l,closed:d,style:b,overlayDialogStyle:_,rendered:f,visible:c,zIndex:m}},k9=he({name:"ElDialog",inheritAttrs:!1}),C9=he({...k9,props:S9,emits:_9,setup(n,{expose:e}){const t=n,r=Mi();Cl({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},O(()=>!!r.title));const o=et("dialog"),i=H(),a=H(),s=H(),{visible:l,titleId:c,bodyId:d,style:f,overlayDialogStyle:m,rendered:g,zIndex:v,afterEnter:y,afterLeave:b,beforeLeave:_,handleClose:w,onModalClick:T,onOpenAutoFocus:k,onCloseAutoFocus:x,onCloseRequested:M,onFocusoutPrevented:D}=x9(t,i);Pn(x4,{dialogRef:i,headerRef:a,bodyId:d,ns:o,rendered:g,style:f});const A=w4(T),P=O(()=>t.draggable&&!t.fullscreen);return e({visible:l,dialogContentRef:s,resetPosition:()=>{var B;(B=s.value)==null||B.resetPosition()}}),(B,j)=>(C(),se(h(EI),{to:B.appendTo,disabled:B.appendTo!=="body"?!1:!B.appendToBody},{default:V(()=>[I(Ml,{name:"dialog-fade",onAfterEnter:h(y),onAfterLeave:h(b),onBeforeLeave:h(_),persisted:""},{default:V(()=>[En(I(h(p9),{"custom-mask-event":"",mask:B.modal,"overlay-class":B.modalClass,"z-index":h(v)},{default:V(()=>[z("div",{role:"dialog","aria-modal":"true","aria-label":B.title||void 0,"aria-labelledby":B.title?void 0:h(c),"aria-describedby":h(d),class:ee(`${h(o).namespace.value}-overlay-dialog`),style:Sn(h(m)),onClick:h(A).onClick,onMousedown:h(A).onMousedown,onMouseup:h(A).onMouseup},[I(h(II),{loop:"",trapped:h(l),"focus-start-el":"container",onFocusAfterTrapped:h(k),onFocusAfterReleased:h(x),onFocusoutPrevented:h(D),onReleaseRequested:h(M)},{default:V(()=>[h(g)?(C(),se(b9,kt({key:0,ref_key:"dialogContentRef",ref:s},B.$attrs,{center:B.center,"align-center":B.alignCenter,"close-icon":B.closeIcon,draggable:h(P),overflow:B.overflow,fullscreen:B.fullscreen,"header-class":B.headerClass,"body-class":B.bodyClass,"footer-class":B.footerClass,"show-close":B.showClose,title:B.title,"aria-level":B.headerAriaLevel,onClose:h(w)}),ws({header:V(()=>[B.$slots.title?xe(B.$slots,"title",{key:1}):xe(B.$slots,"header",{key:0,close:h(w),titleId:h(c),titleClass:h(o).e("title")})]),default:V(()=>[xe(B.$slots,"default")]),_:2},[B.$slots.footer?{name:"footer",fn:V(()=>[xe(B.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","header-class","body-class","footer-class","show-close","title","aria-level","onClose"])):ie("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,["aria-label","aria-labelledby","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["mask","overlay-class","z-index"]),[[vo,h(l)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var I9=At(C9,[["__file","dialog.vue"]]);const C4=jn(I9),E9=he({inheritAttrs:!1});function T9(n,e,t,r,o,i){return xe(n.$slots,"default")}var M9=At(E9,[["render",T9],["__file","collection.vue"]]);const O9=he({name:"ElCollectionItem",inheritAttrs:!1});function A9(n,e,t,r,o,i){return xe(n.$slots,"default")}var P9=At(O9,[["render",A9],["__file","collection-item.vue"]]);const $9="data-el-collection-item",R9=n=>{const e=`El${n}Collection`,t=`${e}Item`,r=Symbol(e),o=Symbol(t),i={...M9,name:e,setup(){const s=H(null),l=new Map;Pn(r,{itemMap:l,getItems:()=>{const d=h(s);if(!d)return[];const f=Array.from(d.querySelectorAll(`[${$9}]`));return[...l.values()].sort((g,v)=>f.indexOf(g.ref)-f.indexOf(v.ref))},collectionRef:s})}},a={...P9,name:t,setup(s,{attrs:l}){const c=H(null),d=on(r,void 0);Pn(o,{collectionItemRef:c}),Ht(()=>{const f=h(c);f&&d.itemMap.set(f,{ref:f,...l})}),Br(()=>{const f=h(c);d.itemMap.delete(f)})}};return{COLLECTION_INJECTION_KEY:r,COLLECTION_ITEM_INJECTION_KEY:o,ElCollection:i,ElCollectionItem:a}},pm=st({trigger:sv.trigger,triggerKeys:{type:Ce(Array),default:()=>[Lt.enter,Lt.numpadEnter,Lt.space,Lt.down]},effect:{...Wo.effect,default:"light"},type:{type:Ce(String)},placement:{type:Ce(String),default:"bottom"},popperOptions:{type:Ce(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:Ce([Number,String]),default:0},maxHeight:{type:Ce([Number,String]),default:""},popperClass:{type:String,default:""},disabled:Boolean,role:{type:String,default:"menu"},buttonProps:{type:Ce(Object)},teleported:Wo.teleported});st({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:Jn}});st({onKeydown:{type:Ce(Function)}});R9("Dropdown");const D9=he({name:"ImgEmpty"}),N9=he({...D9,setup(n){const e=et("empty"),t=iv();return(r,o)=>(C(),F("svg",{viewBox:"0 0 79 86",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[z("defs",null,[z("linearGradient",{id:`linearGradient-1-${h(t)}`,x1:"38.8503086%",y1:"0%",x2:"61.1496914%",y2:"100%"},[z("stop",{"stop-color":`var(${h(e).cssVarBlockName("fill-color-1")})`,offset:"0%"},null,8,["stop-color"]),z("stop",{"stop-color":`var(${h(e).cssVarBlockName("fill-color-4")})`,offset:"100%"},null,8,["stop-color"])],8,["id"]),z("linearGradient",{id:`linearGradient-2-${h(t)}`,x1:"0%",y1:"9.5%",x2:"100%",y2:"90.5%"},[z("stop",{"stop-color":`var(${h(e).cssVarBlockName("fill-color-1")})`,offset:"0%"},null,8,["stop-color"]),z("stop",{"stop-color":`var(${h(e).cssVarBlockName("fill-color-6")})`,offset:"100%"},null,8,["stop-color"])],8,["id"]),z("rect",{id:`path-3-${h(t)}`,x:"0",y:"0",width:"17",height:"36"},null,8,["id"])]),z("g",{id:"Illustrations",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[z("g",{id:"B-type",transform:"translate(-1268.000000, -535.000000)"},[z("g",{id:"Group-2",transform:"translate(1268.000000, 535.000000)"},[z("path",{id:"Oval-Copy-2",d:"M39.5,86 C61.3152476,86 79,83.9106622 79,81.3333333 C79,78.7560045 57.3152476,78 35.5,78 C13.6847524,78 0,78.7560045 0,81.3333333 C0,83.9106622 17.6847524,86 39.5,86 Z",fill:`var(${h(e).cssVarBlockName("fill-color-3")})`},null,8,["fill"]),z("polygon",{id:"Rectangle-Copy-14",fill:`var(${h(e).cssVarBlockName("fill-color-7")})`,transform:"translate(27.500000, 51.500000) scale(1, -1) translate(-27.500000, -51.500000) ",points:"13 58 53 58 42 45 2 45"},null,8,["fill"]),z("g",{id:"Group-Copy",transform:"translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)"},[z("polygon",{id:"Rectangle-Copy-10",fill:`var(${h(e).cssVarBlockName("fill-color-7")})`,transform:"translate(11.500000, 5.000000) scale(1, -1) translate(-11.500000, -5.000000) ",points:"2.84078316e-14 3 18 3 23 7 5 7"},null,8,["fill"]),z("polygon",{id:"Rectangle-Copy-11",fill:`var(${h(e).cssVarBlockName("fill-color-5")})`,points:"-3.69149156e-15 7 38 7 38 43 -3.69149156e-15 43"},null,8,["fill"]),z("rect",{id:"Rectangle-Copy-12",fill:`url(#linearGradient-1-${h(t)})`,transform:"translate(46.500000, 25.000000) scale(-1, 1) translate(-46.500000, -25.000000) ",x:"38",y:"7",width:"17",height:"36"},null,8,["fill"]),z("polygon",{id:"Rectangle-Copy-13",fill:`var(${h(e).cssVarBlockName("fill-color-2")})`,transform:"translate(39.500000, 3.500000) scale(-1, 1) translate(-39.500000, -3.500000) ",points:"24 7 41 7 55 -3.63806207e-12 38 -3.63806207e-12"},null,8,["fill"])]),z("rect",{id:"Rectangle-Copy-15",fill:`url(#linearGradient-2-${h(t)})`,x:"13",y:"45",width:"40",height:"36"},null,8,["fill"]),z("g",{id:"Rectangle-Copy-17",transform:"translate(53.000000, 45.000000)"},[z("use",{id:"Mask",fill:`var(${h(e).cssVarBlockName("fill-color-8")})`,transform:"translate(8.500000, 18.000000) scale(-1, 1) translate(-8.500000, -18.000000) ","xlink:href":`#path-3-${h(t)}`},null,8,["fill","xlink:href"]),z("polygon",{id:"Rectangle-Copy",fill:`var(${h(e).cssVarBlockName("fill-color-9")})`,mask:`url(#mask-4-${h(t)})`,transform:"translate(12.000000, 9.000000) scale(-1, 1) translate(-12.000000, -9.000000) ",points:"7 0 24 0 20 18 7 16.5"},null,8,["fill","mask"])]),z("polygon",{id:"Rectangle-Copy-18",fill:`var(${h(e).cssVarBlockName("fill-color-2")})`,transform:"translate(66.000000, 51.500000) scale(-1, 1) translate(-66.000000, -51.500000) ",points:"62 45 79 45 70 58 53 58"},null,8,["fill"])])])])]))}});var F9=At(N9,[["__file","img-empty.vue"]]);const L9=st({image:{type:String,default:""},imageSize:Number,description:{type:String,default:""}}),B9=he({name:"ElEmpty"}),V9=he({...B9,props:L9,setup(n){const e=n,{t}=$n(),r=et("empty"),o=O(()=>e.description||t("el.table.emptyText")),i=O(()=>({width:Jo(e.imageSize)}));return(a,s)=>(C(),F("div",{class:ee(h(r).b())},[z("div",{class:ee(h(r).e("image")),style:Sn(h(i))},[a.image?(C(),F("img",{key:0,src:a.image,ondragstart:"return false"},null,8,["src"])):xe(a.$slots,"image",{key:1},()=>[I(F9)])],6),z("div",{class:ee(h(r).e("description"))},[a.$slots.description?xe(a.$slots,"description",{key:0}):(C(),F("p",{key:1},ae(h(o)),1))],2),a.$slots.default?(C(),F("div",{key:0,class:ee(h(r).e("bottom"))},[xe(a.$slots,"default")],2)):ie("v-if",!0)],2))}});var z9=At(V9,[["__file","empty.vue"]]);const H9=jn(z9),U9=st({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.POSITIVE_INFINITY},min:{type:Number,default:Number.NEGATIVE_INFINITY},modelValue:Number,readonly:Boolean,disabled:Boolean,size:Bl,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:n=>n===null||Kt(n)||["min","max"].includes(n),default:null},name:String,placeholder:String,precision:{type:Number,validator:n=>n>=0&&n===Number.parseInt(`${n}`,10)},validateEvent:{type:Boolean,default:!0},...fc(["ariaLabel"])}),W9={[Ss]:(n,e)=>e!==n,blur:n=>n instanceof FocusEvent,focus:n=>n instanceof FocusEvent,[us]:n=>Kt(n)||Ma(n),[Gn]:n=>Kt(n)||Ma(n)},j9=he({name:"ElInputNumber"}),K9=he({...j9,props:U9,emits:W9,setup(n,{expose:e,emit:t}){const r=n,{t:o}=$n(),i=et("input-number"),a=H(),s=Tn({currentValue:r.modelValue,userInput:null}),{formItem:l}=Ps(),c=O(()=>Kt(r.modelValue)&&r.modelValue<=r.min),d=O(()=>Kt(r.modelValue)&&r.modelValue>=r.max),f=O(()=>{const N=_(r.step);return yo(r.precision)?Math.max(_(r.modelValue),N):(N>r.precision,r.precision)}),m=O(()=>r.controls&&r.controlsPosition==="right"),g=Tl(),v=Fa(),y=O(()=>{if(s.userInput!==null)return s.userInput;let N=s.currentValue;if(Ma(N))return"";if(Kt(N)){if(Number.isNaN(N))return"";yo(r.precision)||(N=N.toFixed(r.precision))}return N}),b=(N,R)=>{if(yo(R)&&(R=f.value),R===0)return Math.round(N);let X=String(N);const te=X.indexOf(".");if(te===-1||!X.replace(".","").split("")[te+R])return N;const Q=X.length;return X.charAt(Q-1)==="5"&&(X=`${X.slice(0,Math.max(0,Q-1))}6`),Number.parseFloat(Number(X).toFixed(R))},_=N=>{if(Ma(N))return 0;const R=N.toString(),X=R.indexOf(".");let te=0;return X!==-1&&(te=R.length-X-1),te},w=(N,R=1)=>Kt(N)?b(N+r.step*R):s.currentValue,T=()=>{if(r.readonly||v.value||d.value)return;const N=Number(y.value)||0,R=w(N);M(R),t(us,s.currentValue),U()},k=()=>{if(r.readonly||v.value||c.value)return;const N=Number(y.value)||0,R=w(N,-1);M(R),t(us,s.currentValue),U()},x=(N,R)=>{const{max:X,min:te,step:Y,precision:re,stepStrictly:Q,valueOnClear:Z}=r;X<te&&to("InputNumber","min should not be greater than max.");let q=Number(N);if(Ma(N)||Number.isNaN(q))return null;if(N===""){if(Z===null)return null;q=tr(Z)?{min:te,max:X}[Z]:Z}return Q&&(q=b(Math.round(q/Y)*Y,re),q!==N&&R&&t(Gn,q)),yo(re)||(q=b(q,re)),(q>X||q<te)&&(q=q>X?X:te,R&&t(Gn,q)),q},M=(N,R=!0)=>{var X;const te=s.currentValue,Y=x(N);if(!R){t(Gn,Y);return}te===Y&&N||(s.userInput=null,t(Gn,Y),te!==Y&&t(Ss,Y,te),r.validateEvent&&((X=l==null?void 0:l.validate)==null||X.call(l,"change").catch(re=>Da())),s.currentValue=Y)},D=N=>{s.userInput=N;const R=N===""?null:Number(N);t(us,R),M(R,!1)},A=N=>{const R=N!==""?Number(N):"";(Kt(R)&&!Number.isNaN(R)||N==="")&&M(R),U(),s.userInput=null},P=()=>{var N,R;(R=(N=a.value)==null?void 0:N.focus)==null||R.call(N)},$=()=>{var N,R;(R=(N=a.value)==null?void 0:N.blur)==null||R.call(N)},B=N=>{t("focus",N)},j=N=>{var R,X;s.userInput=null,MI()&&s.currentValue===null&&((R=a.value)!=null&&R.input)&&(a.value.input.value=""),t("blur",N),r.validateEvent&&((X=l==null?void 0:l.validate)==null||X.call(l,"blur").catch(te=>Da()))},U=()=>{s.currentValue!==r.modelValue&&(s.currentValue=r.modelValue)},G=N=>{document.activeElement===N.target&&N.preventDefault()};return Me(()=>r.modelValue,(N,R)=>{const X=x(N,!0);s.userInput===null&&X!==R&&(s.currentValue=X)},{immediate:!0}),Ht(()=>{var N;const{min:R,max:X,modelValue:te}=r,Y=(N=a.value)==null?void 0:N.input;if(Y.setAttribute("role","spinbutton"),Number.isFinite(X)?Y.setAttribute("aria-valuemax",String(X)):Y.removeAttribute("aria-valuemax"),Number.isFinite(R)?Y.setAttribute("aria-valuemin",String(R)):Y.removeAttribute("aria-valuemin"),Y.setAttribute("aria-valuenow",s.currentValue||s.currentValue===0?String(s.currentValue):""),Y.setAttribute("aria-disabled",String(v.value)),!Kt(te)&&te!=null){let re=Number(te);Number.isNaN(re)&&(re=null),t(Gn,re)}Y.addEventListener("wheel",G,{passive:!1})}),pg(()=>{var N,R;const X=(N=a.value)==null?void 0:N.input;X==null||X.setAttribute("aria-valuenow",`${(R=s.currentValue)!=null?R:""}`)}),e({focus:P,blur:$}),(N,R)=>(C(),F("div",{class:ee([h(i).b(),h(i).m(h(g)),h(i).is("disabled",h(v)),h(i).is("without-controls",!N.controls),h(i).is("controls-right",h(m))]),onDragstart:lt(()=>{},["prevent"])},[N.controls?En((C(),F("span",{key:0,role:"button","aria-label":h(o)("el.inputNumber.decrease"),class:ee([h(i).e("decrease"),h(i).is("disabled",h(c))]),onKeydown:Ir(k,["enter"])},[xe(N.$slots,"decrease-icon",{},()=>[I(h(yt),null,{default:V(()=>[h(m)?(C(),se(h(fg),{key:0})):(C(),se(h(TI),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[h(yf),k]]):ie("v-if",!0),N.controls?En((C(),F("span",{key:1,role:"button","aria-label":h(o)("el.inputNumber.increase"),class:ee([h(i).e("increase"),h(i).is("disabled",h(d))]),onKeydown:Ir(T,["enter"])},[xe(N.$slots,"increase-icon",{},()=>[I(h(yt),null,{default:V(()=>[h(m)?(C(),se(h(W3),{key:0})):(C(),se(h(Y3),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[h(yf),T]]):ie("v-if",!0),I(h(Ca),{id:N.id,ref_key:"input",ref:a,type:"number",step:N.step,"model-value":h(y),placeholder:N.placeholder,readonly:N.readonly,disabled:h(v),size:h(g),max:N.max,min:N.min,name:N.name,"aria-label":N.ariaLabel,"validate-event":!1,onKeydown:[Ir(lt(T,["prevent"]),["up"]),Ir(lt(k,["prevent"]),["down"])],onBlur:j,onFocus:B,onInput:D,onChange:A},ws({_:2},[N.$slots.prefix?{name:"prefix",fn:V(()=>[xe(N.$slots,"prefix")])}:void 0,N.$slots.suffix?{name:"suffix",fn:V(()=>[xe(N.$slots,"suffix")])}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","onKeydown"])],42,["onDragstart"]))}});var Y9=At(K9,[["__file","input-number.vue"]]);const q9=jn(Y9),G9=st({type:{type:String,values:["primary","success","warning","info","danger","default"],default:"default"},underline:{type:Boolean,default:!0},disabled:Boolean,href:{type:String,default:""},target:{type:String,default:"_self"},icon:{type:Jn}}),J9={click:n=>n instanceof MouseEvent},X9=he({name:"ElLink"}),Q9=he({...X9,props:G9,emits:J9,setup(n,{emit:e}){const t=n,r=et("link"),o=O(()=>[r.b(),r.m(t.type),r.is("disabled",t.disabled),r.is("underline",t.underline&&!t.disabled)]);function i(a){t.disabled||e("click",a)}return(a,s)=>(C(),F("a",{class:ee(h(o)),href:a.disabled||!a.href?void 0:a.href,target:a.disabled||!a.href?void 0:a.target,onClick:i},[a.icon?(C(),se(h(yt),{key:0},{default:V(()=>[(C(),se(dn(a.icon)))]),_:1})):ie("v-if",!0),a.$slots.default?(C(),F("span",{key:1,class:ee(h(r).e("inner"))},[xe(a.$slots,"default")],2)):ie("v-if",!0),a.$slots.icon?xe(a.$slots,"icon",{key:2}):ie("v-if",!0)],10,["href","target"]))}});var Z9=At(Q9,[["__file","link.vue"]]);const eO=jn(Z9);let tO=class{constructor(e,t){this.parent=e,this.domNode=t,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()}gotoSubIndex(e){e===this.subMenuItems.length?e=0:e<0&&(e=this.subMenuItems.length-1),this.subMenuItems[e].focus(),this.subIndex=e}addListeners(){const e=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,t=>{t.addEventListener("keydown",r=>{let o=!1;switch(r.code){case Lt.down:{this.gotoSubIndex(this.subIndex+1),o=!0;break}case Lt.up:{this.gotoSubIndex(this.subIndex-1),o=!0;break}case Lt.tab:{Hd(e,"mouseleave");break}case Lt.enter:case Lt.numpadEnter:case Lt.space:{o=!0,r.currentTarget.click();break}}return o&&(r.preventDefault(),r.stopPropagation()),!1})})}},nO=class{constructor(e,t){this.domNode=e,this.submenu=null,this.submenu=null,this.init(t)}init(e){this.domNode.setAttribute("tabindex","0");const t=this.domNode.querySelector(`.${e}-menu`);t&&(this.submenu=new tO(this,t)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",e=>{let t=!1;switch(e.code){case Lt.down:{Hd(e.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),t=!0;break}case Lt.up:{Hd(e.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),t=!0;break}case Lt.tab:{Hd(e.currentTarget,"mouseleave");break}case Lt.enter:case Lt.numpadEnter:case Lt.space:{t=!0,e.currentTarget.click();break}}t&&e.preventDefault()})}},rO=class{constructor(e,t){this.domNode=e,this.init(t)}init(e){const t=this.domNode.childNodes;Array.from(t).forEach(r=>{r.nodeType===1&&new nO(r,e)})}};const oO=he({name:"ElMenuCollapseTransition",setup(){const n=et("menu");return{listeners:{onBeforeEnter:t=>t.style.opacity="0.2",onEnter(t,r){vu(t,`${n.namespace.value}-opacity-transition`),t.style.opacity="1",r()},onAfterEnter(t){zd(t,`${n.namespace.value}-opacity-transition`),t.style.opacity=""},onBeforeLeave(t){t.dataset||(t.dataset={}),_s(t,n.m("collapse"))?(zd(t,n.m("collapse")),t.dataset.oldOverflow=t.style.overflow,t.dataset.scrollWidth=t.clientWidth.toString(),vu(t,n.m("collapse"))):(vu(t,n.m("collapse")),t.dataset.oldOverflow=t.style.overflow,t.dataset.scrollWidth=t.clientWidth.toString(),zd(t,n.m("collapse"))),t.style.width=`${t.scrollWidth}px`,t.style.overflow="hidden"},onLeave(t){vu(t,"horizontal-collapse-transition"),t.style.width=`${t.dataset.scrollWidth}px`}}}}});function aO(n,e,t,r,o,i){return C(),se(Ml,kt({mode:"out-in"},n.listeners),{default:V(()=>[xe(n.$slots,"default")]),_:3},16)}var iO=At(oO,[["render",aO],["__file","menu-collapse-transition.vue"]]);function I4(n,e){const t=O(()=>{let o=n.parent;const i=[e.value];for(;o.type.name!=="ElMenu";)o.props.index&&i.unshift(o.props.index),o=o.parent;return i});return{parentMenu:O(()=>{let o=n.parent;for(;o&&!["ElMenu","ElSubMenu"].includes(o.type.name);)o=o.parent;return o}),indexPath:t}}function sO(n){return O(()=>{const t=n.backgroundColor;return t?new r4(t).shade(20).toString():""})}const E4=(n,e)=>{const t=et("menu");return O(()=>t.cssVarBlock({"text-color":n.textColor||"","hover-text-color":n.textColor||"","bg-color":n.backgroundColor||"","hover-bg-color":sO(n).value||"","active-color":n.activeTextColor||"",level:`${e}`}))},lO=st({index:{type:String,required:!0},showTimeout:Number,hideTimeout:Number,popperClass:String,disabled:Boolean,teleported:{type:Boolean,default:void 0},popperOffset:Number,expandCloseIcon:{type:Jn},expandOpenIcon:{type:Jn},collapseCloseIcon:{type:Jn},collapseOpenIcon:{type:Jn}}),hm="ElSubMenu";var wg=he({name:hm,props:lO,setup(n,{slots:e,expose:t}){const r=Kn(),{indexPath:o,parentMenu:i}=I4(r,O(()=>n.index)),a=et("menu"),s=et("sub-menu"),l=on("rootMenu");l||to(hm,"can not inject root menu");const c=on(`subMenu:${i.value.uid}`);c||to(hm,"can not inject sub menu");const d=H({}),f=H({});let m;const g=H(!1),v=H(),y=H(null),b=O(()=>A.value==="horizontal"&&w.value?"bottom-start":"right-start"),_=O(()=>A.value==="horizontal"&&w.value||A.value==="vertical"&&!l.props.collapse?n.expandCloseIcon&&n.expandOpenIcon?M.value?n.expandOpenIcon:n.expandCloseIcon:fg:n.collapseCloseIcon&&n.collapseOpenIcon?M.value?n.collapseOpenIcon:n.collapseCloseIcon:Ta),w=O(()=>c.level===0),T=O(()=>{const re=n.teleported;return re===void 0?w.value:re}),k=O(()=>l.props.collapse?`${a.namespace.value}-zoom-in-left`:`${a.namespace.value}-zoom-in-top`),x=O(()=>A.value==="horizontal"&&w.value?["bottom-start","bottom-end","top-start","top-end","right-start","left-start"]:["right-start","right","right-end","left-start","bottom-start","bottom-end","top-start","top-end"]),M=O(()=>l.openedMenus.includes(n.index)),D=O(()=>{let re=!1;return Object.values(d.value).forEach(Q=>{Q.active&&(re=!0)}),Object.values(f.value).forEach(Q=>{Q.active&&(re=!0)}),re}),A=O(()=>l.props.mode),P=Tn({index:n.index,indexPath:o,active:D}),$=E4(l.props,c.level+1),B=O(()=>{var re;return(re=n.popperOffset)!=null?re:l.props.popperOffset}),j=O(()=>{var re;return(re=n.popperClass)!=null?re:l.props.popperClass}),U=O(()=>{var re;return(re=n.showTimeout)!=null?re:l.props.showTimeout}),G=O(()=>{var re;return(re=n.hideTimeout)!=null?re:l.props.hideTimeout}),N=()=>{var re,Q,Z;return(Z=(Q=(re=y.value)==null?void 0:re.popperRef)==null?void 0:Q.popperInstanceRef)==null?void 0:Z.destroy()},R=re=>{re||N()},X=()=>{l.props.menuTrigger==="hover"&&l.props.mode==="horizontal"||l.props.collapse&&l.props.mode==="vertical"||n.disabled||l.handleSubMenuClick({index:n.index,indexPath:o.value,active:D.value})},te=(re,Q=U.value)=>{var Z;if(re.type!=="focus"){if(l.props.menuTrigger==="click"&&l.props.mode==="horizontal"||!l.props.collapse&&l.props.mode==="vertical"||n.disabled){c.mouseInChild.value=!0;return}c.mouseInChild.value=!0,m==null||m(),{stop:m}=vf(()=>{l.openMenu(n.index,o.value)},Q),T.value&&((Z=i.value.vnode.el)==null||Z.dispatchEvent(new MouseEvent("mouseenter")))}},Y=(re=!1)=>{var Q;if(l.props.menuTrigger==="click"&&l.props.mode==="horizontal"||!l.props.collapse&&l.props.mode==="vertical"){c.mouseInChild.value=!1;return}m==null||m(),c.mouseInChild.value=!1,{stop:m}=vf(()=>!g.value&&l.closeMenu(n.index,o.value),G.value),T.value&&re&&((Q=c.handleMouseleave)==null||Q.call(c,!0))};Me(()=>l.props.collapse,re=>R(!!re));{const re=Z=>{f.value[Z.index]=Z},Q=Z=>{delete f.value[Z.index]};Pn(`subMenu:${r.uid}`,{addSubMenu:re,removeSubMenu:Q,handleMouseleave:Y,mouseInChild:g,level:c.level+1})}return t({opened:M}),Ht(()=>{l.addSubMenu(P),c.addSubMenu(P)}),Br(()=>{c.removeSubMenu(P),l.removeSubMenu(P)}),()=>{var re;const Q=[(re=e.title)==null?void 0:re.call(e),Fe(yt,{class:s.e("icon-arrow"),style:{transform:M.value?n.expandCloseIcon&&n.expandOpenIcon||n.collapseCloseIcon&&n.collapseOpenIcon&&l.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>tr(_.value)?Fe(r.appContext.components[_.value]):Fe(_.value)})],Z=l.isMenuPopup?Fe(Sp,{ref:y,visible:M.value,effect:"light",pure:!0,offset:B.value,showArrow:!1,persistent:!0,popperClass:j.value,placement:b.value,teleported:T.value,fallbackPlacements:x.value,transition:k.value,gpuAcceleration:!1},{content:()=>{var q;return Fe("div",{class:[a.m(A.value),a.m("popup-container"),j.value],onMouseenter:le=>te(le,100),onMouseleave:()=>Y(!0),onFocus:le=>te(le,100)},[Fe("ul",{class:[a.b(),a.m("popup"),a.m(`popup-${b.value}`)],style:$.value},[(q=e.default)==null?void 0:q.call(e)])])},default:()=>Fe("div",{class:s.e("title"),onClick:X},Q)}):Fe($e,{},[Fe("div",{class:s.e("title"),ref:v,onClick:X},Q),Fe(h4,{},{default:()=>{var q;return En(Fe("ul",{role:"menu",class:[a.b(),a.m("inline")],style:$.value},[(q=e.default)==null?void 0:q.call(e)]),[[vo,M.value]])}})]);return Fe("li",{class:[s.b(),s.is("active",D.value),s.is("opened",M.value),s.is("disabled",n.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:M.value,onMouseenter:te,onMouseleave:()=>Y(),onFocus:te},[Z])}}});const uO=st({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:Ce(Array),default:()=>Fo([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:["hover","click"],default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,closeOnClickOutside:Boolean,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperOffset:{type:Number,default:6},ellipsisIcon:{type:Jn,default:()=>OI},popperEffect:{type:Ce(String),default:"dark"},popperClass:String,showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300}}),mm=n=>Rt(n)&&n.every(e=>tr(e)),cO={close:(n,e)=>tr(n)&&mm(e),open:(n,e)=>tr(n)&&mm(e),select:(n,e,t,r)=>tr(n)&&mm(e)&&ys(t)&&(r===void 0||r instanceof Promise)};var dO=he({name:"ElMenu",props:uO,emits:cO,setup(n,{emit:e,slots:t,expose:r}){const o=Kn(),i=o.appContext.config.globalProperties.$router,a=H(),s=et("menu"),l=et("sub-menu"),c=H(-1),d=H(n.defaultOpeneds&&!n.collapse?n.defaultOpeneds.slice(0):[]),f=H(n.defaultActive),m=H({}),g=H({}),v=O(()=>n.mode==="horizontal"||n.mode==="vertical"&&n.collapse),y=()=>{const N=f.value&&m.value[f.value];if(!N||n.mode==="horizontal"||n.collapse)return;N.indexPath.forEach(X=>{const te=g.value[X];te&&b(X,te.indexPath)})},b=(N,R)=>{d.value.includes(N)||(n.uniqueOpened&&(d.value=d.value.filter(X=>R.includes(X))),d.value.push(N),e("open",N,R))},_=N=>{const R=d.value.indexOf(N);R!==-1&&d.value.splice(R,1)},w=(N,R)=>{_(N),e("close",N,R)},T=({index:N,indexPath:R})=>{d.value.includes(N)?w(N,R):b(N,R)},k=N=>{(n.mode==="horizontal"||n.collapse)&&(d.value=[]);const{index:R,indexPath:X}=N;if(!(Ma(R)||Ma(X)))if(n.router&&i){const te=N.route||R,Y=i.push(te).then(re=>(re||(f.value=R),re));e("select",R,X,{index:R,indexPath:X,route:te},Y)}else f.value=R,e("select",R,X,{index:R,indexPath:X})},x=N=>{const R=m.value,X=R[N]||f.value&&R[f.value]||R[n.defaultActive];X?f.value=X.index:f.value=N},M=N=>{const R=getComputedStyle(N),X=Number.parseInt(R.marginLeft,10),te=Number.parseInt(R.marginRight,10);return N.offsetWidth+X+te||0},D=()=>{var N,R;if(!a.value)return-1;const X=Array.from((R=(N=a.value)==null?void 0:N.childNodes)!=null?R:[]).filter(ye=>ye.nodeName!=="#text"||ye.nodeValue),te=64,Y=getComputedStyle(a.value),re=Number.parseInt(Y.paddingLeft,10),Q=Number.parseInt(Y.paddingRight,10),Z=a.value.clientWidth-re-Q;let q=0,le=0;return X.forEach((ye,Re)=>{ye.nodeName!=="#comment"&&(q+=M(ye),q<=Z-te&&(le=Re+1))}),le===X.length?-1:le},A=N=>g.value[N].indexPath,P=(N,R=33.34)=>{let X;return()=>{X&&clearTimeout(X),X=setTimeout(()=>{N()},R)}};let $=!0;const B=()=>{if(c.value===D())return;const N=()=>{c.value=-1,Xt(()=>{c.value=D()})};$?N():P(N)(),$=!1};Me(()=>n.defaultActive,N=>{m.value[N]||(f.value=""),x(N)}),Me(()=>n.collapse,N=>{N&&(d.value=[])}),Me(m.value,y);let j;pc(()=>{n.mode==="horizontal"&&n.ellipsis?j=Ku(a,B).stop:j==null||j()});const U=H(!1);{const N=Y=>{g.value[Y.index]=Y},R=Y=>{delete g.value[Y.index]};Pn("rootMenu",Tn({props:n,openedMenus:d,items:m,subMenus:g,activeIndex:f,isMenuPopup:v,addMenuItem:Y=>{m.value[Y.index]=Y},removeMenuItem:Y=>{delete m.value[Y.index]},addSubMenu:N,removeSubMenu:R,openMenu:b,closeMenu:w,handleMenuItemClick:k,handleSubMenuClick:T})),Pn(`subMenu:${o.uid}`,{addSubMenu:N,removeSubMenu:R,mouseInChild:U,level:0})}Ht(()=>{n.mode==="horizontal"&&new rO(o.vnode.el,s.namespace.value)}),r({open:R=>{const{indexPath:X}=g.value[R];X.forEach(te=>b(te,X))},close:_,handleResize:B});const G=E4(n,0);return()=>{var N,R;let X=(R=(N=t.default)==null?void 0:N.call(t))!=null?R:[];const te=[];if(n.mode==="horizontal"&&a.value){const Q=Tu(X),Z=c.value===-1?Q:Q.slice(0,c.value),q=c.value===-1?[]:Q.slice(c.value);q!=null&&q.length&&n.ellipsis&&(X=Z,te.push(Fe(wg,{index:"sub-menu-more",class:l.e("hide-arrow"),popperOffset:n.popperOffset},{title:()=>Fe(yt,{class:l.e("icon-more")},{default:()=>Fe(n.ellipsisIcon)}),default:()=>q})))}const Y=n.closeOnClickOutside?[[mf,()=>{d.value.length&&(U.value||(d.value.forEach(Q=>e("close",Q,A(Q))),d.value=[]))}]]:[],re=En(Fe("ul",{key:String(n.collapse),role:"menubar",ref:a,style:G.value,class:{[s.b()]:!0,[s.m(n.mode)]:!0,[s.m("collapse")]:n.collapse}},[...X,...te]),Y);return n.collapseTransition&&n.mode==="vertical"?Fe(iO,()=>re):re}}});const fO=st({index:{type:Ce([String,null]),default:null},route:{type:Ce([String,Object])},disabled:Boolean}),pO={click:n=>tr(n.index)&&Rt(n.indexPath)},vm="ElMenuItem",hO=he({name:vm,components:{ElTooltip:Sp},props:fO,emits:pO,setup(n,{emit:e}){const t=Kn(),r=on("rootMenu"),o=et("menu"),i=et("menu-item");r||to(vm,"can not inject root menu");const{parentMenu:a,indexPath:s}=I4(t,er(n,"index")),l=on(`subMenu:${a.value.uid}`);l||to(vm,"can not inject sub menu");const c=O(()=>n.index===r.activeIndex),d=Tn({index:n.index,indexPath:s,active:c}),f=()=>{n.disabled||(r.handleMenuItemClick({index:n.index,indexPath:s.value,route:n.route}),e("click",d))};return Ht(()=>{l.addSubMenu(d),r.addMenuItem(d)}),Br(()=>{l.removeSubMenu(d),r.removeMenuItem(d)}),{parentMenu:a,rootMenu:r,active:c,nsMenu:o,nsMenuItem:i,handleClick:f}}});function mO(n,e,t,r,o,i){const a=cc("el-tooltip");return C(),F("li",{class:ee([n.nsMenuItem.b(),n.nsMenuItem.is("active",n.active),n.nsMenuItem.is("disabled",n.disabled)]),role:"menuitem",tabindex:"-1",onClick:n.handleClick},[n.parentMenu.type.name==="ElMenu"&&n.rootMenu.props.collapse&&n.$slots.title?(C(),se(a,{key:0,effect:n.rootMenu.props.popperEffect,placement:"right","fallback-placements":["left"],persistent:""},{content:V(()=>[xe(n.$slots,"title")]),default:V(()=>[z("div",{class:ee(n.nsMenu.be("tooltip","trigger"))},[xe(n.$slots,"default")],2)]),_:3},8,["effect"])):(C(),F($e,{key:1},[xe(n.$slots,"default"),xe(n.$slots,"title")],64))],10,["onClick"])}var T4=At(hO,[["render",mO],["__file","menu-item.vue"]]);const vO={title:String},gO="ElMenuItemGroup",yO=he({name:gO,props:vO,setup(){return{ns:et("menu-item-group")}}});function bO(n,e,t,r,o,i){return C(),F("li",{class:ee(n.ns.b())},[z("div",{class:ee(n.ns.e("title"))},[n.$slots.title?xe(n.$slots,"title",{key:1}):(C(),F($e,{key:0},[De(ae(n.title),1)],64))],2),z("ul",null,[xe(n.$slots,"default")])],2)}var M4=At(yO,[["render",bO],["__file","menu-item-group.vue"]]);const O4=jn(dO,{MenuItem:T4,MenuItemGroup:M4,SubMenu:wg}),SO=La(T4);La(M4);La(wg);const A4=Symbol("elPaginationKey"),_O=st({disabled:Boolean,currentPage:{type:Number,default:1},prevText:{type:String},prevIcon:{type:Jn}}),wO={click:n=>n instanceof MouseEvent},xO=he({name:"ElPaginationPrev"}),kO=he({...xO,props:_O,emits:wO,setup(n){const e=n,{t}=$n(),r=O(()=>e.disabled||e.currentPage<=1);return(o,i)=>(C(),F("button",{type:"button",class:"btn-prev",disabled:h(r),"aria-label":o.prevText||h(t)("el.pagination.prev"),"aria-disabled":h(r),onClick:a=>o.$emit("click",a)},[o.prevText?(C(),F("span",{key:0},ae(o.prevText),1)):(C(),se(h(yt),{key:1},{default:V(()=>[(C(),se(dn(o.prevIcon)))]),_:1}))],8,["disabled","aria-label","aria-disabled","onClick"]))}});var CO=At(kO,[["__file","prev.vue"]]);const IO=st({disabled:Boolean,currentPage:{type:Number,default:1},pageCount:{type:Number,default:50},nextText:{type:String},nextIcon:{type:Jn}}),EO=he({name:"ElPaginationNext"}),TO=he({...EO,props:IO,emits:["click"],setup(n){const e=n,{t}=$n(),r=O(()=>e.disabled||e.currentPage===e.pageCount||e.pageCount===0);return(o,i)=>(C(),F("button",{type:"button",class:"btn-next",disabled:h(r),"aria-label":o.nextText||h(t)("el.pagination.next"),"aria-disabled":h(r),onClick:a=>o.$emit("click",a)},[o.nextText?(C(),F("span",{key:0},ae(o.nextText),1)):(C(),se(h(yt),{key:1},{default:V(()=>[(C(),se(dn(o.nextIcon)))]),_:1}))],8,["disabled","aria-label","aria-disabled","onClick"]))}});var MO=At(TO,[["__file","next.vue"]]);const xg=()=>on(A4,{}),OO=st({pageSize:{type:Number,required:!0},pageSizes:{type:Ce(Array),default:()=>Fo([10,20,30,40,50,100])},popperClass:{type:String},disabled:Boolean,teleported:Boolean,size:{type:String,values:hg},appendSizeTo:String}),AO=he({name:"ElPaginationSizes"}),PO=he({...AO,props:OO,emits:["page-size-change"],setup(n,{emit:e}){const t=n,{t:r}=$n(),o=et("pagination"),i=xg(),a=H(t.pageSize);Me(()=>t.pageSizes,(c,d)=>{if(!bp(c,d)&&Rt(c)){const f=c.includes(t.pageSize)?t.pageSize:t.pageSizes[0];e("page-size-change",f)}}),Me(()=>t.pageSize,c=>{a.value=c});const s=O(()=>t.pageSizes);function l(c){var d;c!==a.value&&(a.value=c,(d=i.handleSizeChange)==null||d.call(i,Number(c)))}return(c,d)=>(C(),F("span",{class:ee(h(o).e("sizes"))},[I(h(PI),{"model-value":a.value,disabled:c.disabled,"popper-class":c.popperClass,size:c.size,teleported:c.teleported,"validate-event":!1,"append-to":c.appendSizeTo,onChange:l},{default:V(()=>[(C(!0),F($e,null,ot(h(s),f=>(C(),se(h(AI),{key:f,value:f,label:f+h(r)("el.pagination.pagesize")},null,8,["value","label"]))),128))]),_:1},8,["model-value","disabled","popper-class","size","teleported","append-to"])],2))}});var $O=At(PO,[["__file","sizes.vue"]]);const RO=st({size:{type:String,values:hg}}),DO=he({name:"ElPaginationJumper"}),NO=he({...DO,props:RO,setup(n){const{t:e}=$n(),t=et("pagination"),{pageCount:r,disabled:o,currentPage:i,changeEvent:a}=xg(),s=H(),l=O(()=>{var f;return(f=s.value)!=null?f:i==null?void 0:i.value});function c(f){s.value=f?+f:""}function d(f){f=Math.trunc(+f),a==null||a(f),s.value=void 0}return(f,m)=>(C(),F("span",{class:ee(h(t).e("jump")),disabled:h(o)},[z("span",{class:ee([h(t).e("goto")])},ae(h(e)("el.pagination.goto")),3),I(h(Ca),{size:f.size,class:ee([h(t).e("editor"),h(t).is("in-pagination")]),min:1,max:h(r),disabled:h(o),"model-value":h(l),"validate-event":!1,"aria-label":h(e)("el.pagination.page"),type:"number","onUpdate:modelValue":c,onChange:d},null,8,["size","class","max","disabled","model-value","aria-label"]),z("span",{class:ee([h(t).e("classifier")])},ae(h(e)("el.pagination.pageClassifier")),3)],10,["disabled"]))}});var FO=At(NO,[["__file","jumper.vue"]]);const LO=st({total:{type:Number,default:1e3}}),BO=he({name:"ElPaginationTotal"}),VO=he({...BO,props:LO,setup(n){const{t:e}=$n(),t=et("pagination"),{disabled:r}=xg();return(o,i)=>(C(),F("span",{class:ee(h(t).e("total")),disabled:h(r)},ae(h(e)("el.pagination.total",{total:o.total})),11,["disabled"]))}});var zO=At(VO,[["__file","total.vue"]]);const HO=st({currentPage:{type:Number,default:1},pageCount:{type:Number,required:!0},pagerCount:{type:Number,default:7},disabled:Boolean}),UO=he({name:"ElPaginationPager"}),WO=he({...UO,props:HO,emits:["change"],setup(n,{emit:e}){const t=n,r=et("pager"),o=et("icon"),{t:i}=$n(),a=H(!1),s=H(!1),l=H(!1),c=H(!1),d=H(!1),f=H(!1),m=O(()=>{const k=t.pagerCount,x=(k-1)/2,M=Number(t.currentPage),D=Number(t.pageCount);let A=!1,P=!1;D>k&&(M>k-x&&(A=!0),M<D-x&&(P=!0));const $=[];if(A&&!P){const B=D-(k-2);for(let j=B;j<D;j++)$.push(j)}else if(!A&&P)for(let B=2;B<k;B++)$.push(B);else if(A&&P){const B=Math.floor(k/2)-1;for(let j=M-B;j<=M+B;j++)$.push(j)}else for(let B=2;B<D;B++)$.push(B);return $}),g=O(()=>["more","btn-quickprev",o.b(),r.is("disabled",t.disabled)]),v=O(()=>["more","btn-quicknext",o.b(),r.is("disabled",t.disabled)]),y=O(()=>t.disabled?-1:0);pc(()=>{const k=(t.pagerCount-1)/2;a.value=!1,s.value=!1,t.pageCount>t.pagerCount&&(t.currentPage>t.pagerCount-k&&(a.value=!0),t.currentPage<t.pageCount-k&&(s.value=!0))});function b(k=!1){t.disabled||(k?l.value=!0:c.value=!0)}function _(k=!1){k?d.value=!0:f.value=!0}function w(k){const x=k.target;if(x.tagName.toLowerCase()==="li"&&Array.from(x.classList).includes("number")){const M=Number(x.textContent);M!==t.currentPage&&e("change",M)}else x.tagName.toLowerCase()==="li"&&Array.from(x.classList).includes("more")&&T(k)}function T(k){const x=k.target;if(x.tagName.toLowerCase()==="ul"||t.disabled)return;let M=Number(x.textContent);const D=t.pageCount,A=t.currentPage,P=t.pagerCount-2;x.className.includes("more")&&(x.className.includes("quickprev")?M=A-P:x.className.includes("quicknext")&&(M=A+P)),Number.isNaN(+M)||(M<1&&(M=1),M>D&&(M=D)),M!==A&&e("change",M)}return(k,x)=>(C(),F("ul",{class:ee(h(r).b()),onClick:T,onKeyup:Ir(w,["enter"])},[k.pageCount>0?(C(),F("li",{key:0,class:ee([[h(r).is("active",k.currentPage===1),h(r).is("disabled",k.disabled)],"number"]),"aria-current":k.currentPage===1,"aria-label":h(i)("el.pagination.currentPage",{pager:1}),tabindex:h(y)}," 1 ",10,["aria-current","aria-label","tabindex"])):ie("v-if",!0),a.value?(C(),F("li",{key:1,class:ee(h(g)),tabindex:h(y),"aria-label":h(i)("el.pagination.prevPages",{pager:k.pagerCount-2}),onMouseenter:M=>b(!0),onMouseleave:M=>l.value=!1,onFocus:M=>_(!0),onBlur:M=>d.value=!1},[(l.value||d.value)&&!k.disabled?(C(),se(h(Si),{key:0})):(C(),se(h(G0),{key:1}))],42,["tabindex","aria-label","onMouseenter","onMouseleave","onFocus","onBlur"])):ie("v-if",!0),(C(!0),F($e,null,ot(h(m),M=>(C(),F("li",{key:M,class:ee([[h(r).is("active",k.currentPage===M),h(r).is("disabled",k.disabled)],"number"]),"aria-current":k.currentPage===M,"aria-label":h(i)("el.pagination.currentPage",{pager:M}),tabindex:h(y)},ae(M),11,["aria-current","aria-label","tabindex"]))),128)),s.value?(C(),F("li",{key:2,class:ee(h(v)),tabindex:h(y),"aria-label":h(i)("el.pagination.nextPages",{pager:k.pagerCount-2}),onMouseenter:M=>b(),onMouseleave:M=>c.value=!1,onFocus:M=>_(),onBlur:M=>f.value=!1},[(c.value||f.value)&&!k.disabled?(C(),se(h(_i),{key:0})):(C(),se(h(G0),{key:1}))],42,["tabindex","aria-label","onMouseenter","onMouseleave","onFocus","onBlur"])):ie("v-if",!0),k.pageCount>1?(C(),F("li",{key:3,class:ee([[h(r).is("active",k.currentPage===k.pageCount),h(r).is("disabled",k.disabled)],"number"]),"aria-current":k.currentPage===k.pageCount,"aria-label":h(i)("el.pagination.currentPage",{pager:k.pageCount}),tabindex:h(y)},ae(k.pageCount),11,["aria-current","aria-label","tabindex"])):ie("v-if",!0)],42,["onKeyup"]))}});var jO=At(WO,[["__file","pager.vue"]]);const xr=n=>typeof n!="number",KO=st({pageSize:Number,defaultPageSize:Number,total:Number,pageCount:Number,pagerCount:{type:Number,validator:n=>Kt(n)&&Math.trunc(n)===n&&n>4&&n<22&&n%2===1,default:7},currentPage:Number,defaultCurrentPage:Number,layout:{type:String,default:["prev","pager","next","jumper","->","total"].join(", ")},pageSizes:{type:Ce(Array),default:()=>Fo([10,20,30,40,50,100])},popperClass:{type:String,default:""},prevText:{type:String,default:""},prevIcon:{type:Jn,default:()=>ju},nextText:{type:String,default:""},nextIcon:{type:Jn,default:()=>Ta},teleported:{type:Boolean,default:!0},small:Boolean,size:Bl,background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean,appendSizeTo:String}),YO={"update:current-page":n=>Kt(n),"update:page-size":n=>Kt(n),"size-change":n=>Kt(n),change:(n,e)=>Kt(n)&&Kt(e),"current-change":n=>Kt(n),"prev-click":n=>Kt(n),"next-click":n=>Kt(n)},wb="ElPagination";var qO=he({name:wb,props:KO,emits:YO,setup(n,{emit:e,slots:t}){const{t:r}=$n(),o=et("pagination"),i=Kn().vnode.props||{},a=$I(),s=O(()=>{var x;return n.small?"small":(x=n.size)!=null?x:a.value});Cl({from:"small",replacement:"size",version:"3.0.0",scope:"el-pagination",ref:"https://element-plus.org/zh-CN/component/pagination.html"},O(()=>!!n.small));const l="onUpdate:currentPage"in i||"onUpdate:current-page"in i||"onCurrentChange"in i,c="onUpdate:pageSize"in i||"onUpdate:page-size"in i||"onSizeChange"in i,d=O(()=>{if(xr(n.total)&&xr(n.pageCount)||!xr(n.currentPage)&&!l)return!1;if(n.layout.includes("sizes")){if(xr(n.pageCount)){if(!xr(n.total)&&!xr(n.pageSize)&&!c)return!1}else if(!c)return!1}return!0}),f=H(xr(n.defaultPageSize)?10:n.defaultPageSize),m=H(xr(n.defaultCurrentPage)?1:n.defaultCurrentPage),g=O({get(){return xr(n.pageSize)?f.value:n.pageSize},set(x){xr(n.pageSize)&&(f.value=x),c&&(e("update:page-size",x),e("size-change",x))}}),v=O(()=>{let x=0;return xr(n.pageCount)?xr(n.total)||(x=Math.max(1,Math.ceil(n.total/g.value))):x=n.pageCount,x}),y=O({get(){return xr(n.currentPage)?m.value:n.currentPage},set(x){let M=x;x<1?M=1:x>v.value&&(M=v.value),xr(n.currentPage)&&(m.value=M),l&&(e("update:current-page",M),e("current-change",M))}});Me(v,x=>{y.value>x&&(y.value=x)}),Me([y,g],x=>{e("change",...x)},{flush:"post"});function b(x){y.value=x}function _(x){g.value=x;const M=v.value;y.value>M&&(y.value=M)}function w(){n.disabled||(y.value-=1,e("prev-click",y.value))}function T(){n.disabled||(y.value+=1,e("next-click",y.value))}function k(x,M){x&&(x.props||(x.props={}),x.props.class=[x.props.class,M].join(" "))}return Pn(A4,{pageCount:v,disabled:O(()=>n.disabled),currentPage:y,changeEvent:b,handleSizeChange:_}),()=>{var x,M;if(!d.value)return Da(wb,r("el.pagination.deprecationWarning")),null;if(!n.layout||n.hideOnSinglePage&&v.value<=1)return null;const D=[],A=[],P=Fe("div",{class:o.e("rightwrapper")},A),$={prev:Fe(CO,{disabled:n.disabled,currentPage:y.value,prevText:n.prevText,prevIcon:n.prevIcon,onClick:w}),jumper:Fe(FO,{size:s.value}),pager:Fe(jO,{currentPage:y.value,pageCount:v.value,pagerCount:n.pagerCount,onChange:b,disabled:n.disabled}),next:Fe(MO,{disabled:n.disabled,currentPage:y.value,pageCount:v.value,nextText:n.nextText,nextIcon:n.nextIcon,onClick:T}),sizes:Fe($O,{pageSize:g.value,pageSizes:n.pageSizes,popperClass:n.popperClass,disabled:n.disabled,teleported:n.teleported,size:s.value,appendSizeTo:n.appendSizeTo}),slot:(M=(x=t==null?void 0:t.default)==null?void 0:x.call(t))!=null?M:null,total:Fe(zO,{total:xr(n.total)?0:n.total})},B=n.layout.split(",").map(U=>U.trim());let j=!1;return B.forEach(U=>{if(U==="->"){j=!0;return}j?A.push($[U]):D.push($[U])}),k(D[0],o.is("first")),k(D[D.length-1],o.is("last")),j&&A.length>0&&(k(A[0],o.is("first")),k(A[A.length-1],o.is("last")),D.push(P)),Fe("div",{class:[o.b(),o.is("background",n.background),o.m(s.value)]},D)}}});const GO=jn(qO),JO=st({trigger:sv.trigger,placement:pm.placement,disabled:sv.disabled,visible:Wo.visible,transition:Wo.transition,popperOptions:pm.popperOptions,tabindex:pm.tabindex,content:Wo.content,popperStyle:Wo.popperStyle,popperClass:Wo.popperClass,enterable:{...Wo.enterable,default:!0},effect:{...Wo.effect,default:"light"},teleported:Wo.teleported,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),XO={"update:visible":n=>Ea(n),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},QO="onUpdate:visible",ZO=he({name:"ElPopover"}),eA=he({...ZO,props:JO,emits:XO,setup(n,{expose:e,emit:t}){const r=n,o=O(()=>r[QO]),i=et("popover"),a=H(),s=O(()=>{var b;return(b=h(a))==null?void 0:b.popperRef}),l=O(()=>[{width:Jo(r.width)},r.popperStyle]),c=O(()=>[i.b(),r.popperClass,{[i.m("plain")]:!!r.content}]),d=O(()=>r.transition===`${i.namespace.value}-fade-in-linear`),f=()=>{var b;(b=a.value)==null||b.hide()},m=()=>{t("before-enter")},g=()=>{t("before-leave")},v=()=>{t("after-enter")},y=()=>{t("update:visible",!1),t("after-leave")};return e({popperRef:s,hide:f}),(b,_)=>(C(),se(h(Sp),kt({ref_key:"tooltipRef",ref:a},b.$attrs,{trigger:b.trigger,placement:b.placement,disabled:b.disabled,visible:b.visible,transition:b.transition,"popper-options":b.popperOptions,tabindex:b.tabindex,content:b.content,offset:b.offset,"show-after":b.showAfter,"hide-after":b.hideAfter,"auto-close":b.autoClose,"show-arrow":b.showArrow,"aria-label":b.title,effect:b.effect,enterable:b.enterable,"popper-class":h(c),"popper-style":h(l),teleported:b.teleported,persistent:b.persistent,"gpu-acceleration":h(d),"onUpdate:visible":h(o),onBeforeShow:m,onBeforeHide:g,onShow:v,onHide:y}),{content:V(()=>[b.title?(C(),F("div",{key:0,class:ee(h(i).e("title")),role:"title"},ae(b.title),3)):ie("v-if",!0),xe(b.$slots,"default",{},()=>[De(ae(b.content),1)])]),default:V(()=>[b.$slots.reference?xe(b.$slots,"reference",{key:0}):ie("v-if",!0)]),_:3},16,["trigger","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","persistent","gpu-acceleration","onUpdate:visible"]))}});var tA=At(eA,[["__file","popover.vue"]]);const xb=(n,e)=>{const t=e.arg||e.value,r=t==null?void 0:t.popperRef;r&&(r.triggerRef=n)};var nA={mounted(n,e){xb(n,e)},updated(n,e){xb(n,e)}};const rA="popover",oA=RI(nA,rA),aA=jn(tA,{directive:oA}),iA=st({type:{type:String,default:"line",values:["line","circle","dashboard"]},percentage:{type:Number,default:0,validator:n=>n>=0&&n<=100},status:{type:String,default:"",values:["","success","exception","warning"]},indeterminate:Boolean,duration:{type:Number,default:3},strokeWidth:{type:Number,default:6},strokeLinecap:{type:Ce(String),default:"round"},textInside:Boolean,width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:Ce([String,Array,Function]),default:""},striped:Boolean,stripedFlow:Boolean,format:{type:Ce(Function),default:n=>`${n}%`}}),sA=he({name:"ElProgress"}),lA=he({...sA,props:iA,setup(n){const e=n,t={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},r=et("progress"),o=O(()=>{const T={width:`${e.percentage}%`,animationDuration:`${e.duration}s`},k=w(e.percentage);return k.includes("gradient")?T.background=k:T.backgroundColor=k,T}),i=O(()=>(e.strokeWidth/e.width*100).toFixed(1)),a=O(()=>["circle","dashboard"].includes(e.type)?Number.parseInt(`${50-Number.parseFloat(i.value)/2}`,10):0),s=O(()=>{const T=a.value,k=e.type==="dashboard";return`
          M 50 50
          m 0 ${k?"":"-"}${T}
          a ${T} ${T} 0 1 1 0 ${k?"-":""}${T*2}
          a ${T} ${T} 0 1 1 0 ${k?"":"-"}${T*2}
          `}),l=O(()=>2*Math.PI*a.value),c=O(()=>e.type==="dashboard"?.75:1),d=O(()=>`${-1*l.value*(1-c.value)/2}px`),f=O(()=>({strokeDasharray:`${l.value*c.value}px, ${l.value}px`,strokeDashoffset:d.value})),m=O(()=>({strokeDasharray:`${l.value*c.value*(e.percentage/100)}px, ${l.value}px`,strokeDashoffset:d.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),g=O(()=>{let T;return e.color?T=w(e.percentage):T=t[e.status]||t.default,T}),v=O(()=>e.status==="warning"?DI:e.type==="line"?e.status==="success"?q3:B3:e.status==="success"?G3:mg),y=O(()=>e.type==="line"?12+e.strokeWidth*.4:e.width*.111111+2),b=O(()=>e.format(e.percentage));function _(T){const k=100/T.length;return T.map((M,D)=>tr(M)?{color:M,percentage:(D+1)*k}:M).sort((M,D)=>M.percentage-D.percentage)}const w=T=>{var k;const{color:x}=e;if(Lo(x))return x(T);if(tr(x))return x;{const M=_(x);for(const D of M)if(D.percentage>T)return D.color;return(k=M[M.length-1])==null?void 0:k.color}};return(T,k)=>(C(),F("div",{class:ee([h(r).b(),h(r).m(T.type),h(r).is(T.status),{[h(r).m("without-text")]:!T.showText,[h(r).m("text-inside")]:T.textInside}]),role:"progressbar","aria-valuenow":T.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[T.type==="line"?(C(),F("div",{key:0,class:ee(h(r).b("bar"))},[z("div",{class:ee(h(r).be("bar","outer")),style:Sn({height:`${T.strokeWidth}px`})},[z("div",{class:ee([h(r).be("bar","inner"),{[h(r).bem("bar","inner","indeterminate")]:T.indeterminate},{[h(r).bem("bar","inner","striped")]:T.striped},{[h(r).bem("bar","inner","striped-flow")]:T.stripedFlow}]),style:Sn(h(o))},[(T.showText||T.$slots.default)&&T.textInside?(C(),F("div",{key:0,class:ee(h(r).be("bar","innerText"))},[xe(T.$slots,"default",{percentage:T.percentage},()=>[z("span",null,ae(h(b)),1)])],2)):ie("v-if",!0)],6)],6)],2)):(C(),F("div",{key:1,class:ee(h(r).b("circle")),style:Sn({height:`${T.width}px`,width:`${T.width}px`})},[(C(),F("svg",{viewBox:"0 0 100 100"},[z("path",{class:ee(h(r).be("circle","track")),d:h(s),stroke:`var(${h(r).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":T.strokeLinecap,"stroke-width":h(i),fill:"none",style:Sn(h(f))},null,14,["d","stroke","stroke-linecap","stroke-width"]),z("path",{class:ee(h(r).be("circle","path")),d:h(s),stroke:h(g),fill:"none",opacity:T.percentage?1:0,"stroke-linecap":T.strokeLinecap,"stroke-width":h(i),style:Sn(h(m))},null,14,["d","stroke","opacity","stroke-linecap","stroke-width"])]))],6)),(T.showText||T.$slots.default)&&!T.textInside?(C(),F("div",{key:2,class:ee(h(r).e("text")),style:Sn({fontSize:`${h(y)}px`})},[xe(T.$slots,"default",{percentage:T.percentage},()=>[T.status?(C(),se(h(yt),{key:1},{default:V(()=>[(C(),se(dn(h(v))))]),_:1})):(C(),F("span",{key:0},ae(h(b)),1))])],6)):ie("v-if",!0)],10,["aria-valuenow"]))}});var uA=At(lA,[["__file","progress.vue"]]);const cA=jn(uA);var kb=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function dA(n,e){return!!(n===e||kb(n)&&kb(e))}function fA(n,e){if(n.length!==e.length)return!1;for(var t=0;t<n.length;t++)if(!dA(n[t],e[t]))return!1;return!0}function pA(n,e){e===void 0&&(e=fA);var t=null;function r(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];if(t&&t.lastThis===this&&e(o,t.lastArgs))return t.lastResult;var a=n.apply(this,o);return t={lastResult:a,lastArgs:o,lastThis:this},a}return r.clear=function(){t=null},r}const hA=()=>{const e=Kn().proxy.$props;return O(()=>{const t=(r,o,i)=>({});return e.perfMode?NI(t):pA(t)})},Cb=50,Ib="itemRendered",Eb="scroll",gu="forward",gv="backward",ns="auto",P4="smart",yv="start",Sl="center",bv="end",Sv="horizontal",$4="vertical",R4="rtl",_v="negative",D4="positive-ascending",N4="positive-descending",mA={[Sv]:"left",[$4]:"top"},vA=20,wv=$s({type:Ce([Number,Function]),required:!0}),xv=$s({type:Number}),kv=$s({type:Number,default:2}),gA=$s({type:String,values:["ltr","rtl"],default:"ltr"}),Cv=$s({type:Number,default:0}),Sf=$s({type:Number,required:!0}),F4=$s({type:String,values:["horizontal","vertical"],default:$4}),L4=st({className:{type:String,default:""},containerElement:{type:Ce([String,Object]),default:"div"},data:{type:Ce(Array),default:()=>Fo([])},direction:gA,height:{type:[String,Number],required:!0},innerElement:{type:[String,Object],default:"div"},style:{type:Ce([Object,String,Array])},useIsScrolling:{type:Boolean,default:!1},width:{type:[Number,String],required:!1},perfMode:{type:Boolean,default:!0},scrollbarAlwaysOn:{type:Boolean,default:!1}}),yA=st({cache:kv,estimatedItemSize:xv,layout:F4,initScrollOffset:Cv,total:Sf,itemSize:wv,...L4}),Iv={type:Number,default:6},B4={type:Number,default:0},V4={type:Number,default:2},cs=st({columnCache:kv,columnWidth:wv,estimatedColumnWidth:xv,estimatedRowHeight:xv,initScrollLeft:Cv,initScrollTop:Cv,itemKey:{type:Ce(Function),default:({columnIndex:n,rowIndex:e})=>`${e}:${n}`},rowCache:kv,rowHeight:wv,totalColumn:Sf,totalRow:Sf,hScrollbarSize:Iv,vScrollbarSize:Iv,scrollbarStartGap:B4,scrollbarEndGap:V4,role:String,...L4}),z4=st({alwaysOn:Boolean,class:String,layout:F4,total:Sf,ratio:{type:Number,required:!0},clientSize:{type:Number,required:!0},scrollFrom:{type:Number,required:!0},scrollbarSize:Iv,startGap:B4,endGap:V4,visible:Boolean}),wd=(n,e)=>n<e?gu:gv,Tb=n=>n===R4;let ll=null;function Mb(n=!1){if(ll===null||n){const e=document.createElement("div"),t=e.style;t.width="50px",t.height="50px",t.overflow="scroll",t.direction="rtl";const r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",e.appendChild(r),document.body.appendChild(e),e.scrollLeft>0?ll=N4:(e.scrollLeft=1,e.scrollLeft===0?ll=_v:ll=D4),document.body.removeChild(e),ll}return ll}function bA({move:n,size:e,bar:t},r){const o={},i=`translate${t.axis}(${n}px)`;return o[t.size]=e,o.transform=i,o.msTransform=i,o.webkitTransform=i,r==="horizontal"?o.height="100%":o.width="100%",o}const Ob=he({name:"ElVirtualScrollBar",props:z4,emits:["scroll","start-move","stop-move"],setup(n,{emit:e}){const t=O(()=>n.startGap+n.endGap),r=et("virtual-scrollbar"),o=et("scrollbar"),i=H(),a=H();let s=null,l=null;const c=Tn({isDragging:!1,traveled:0}),d=O(()=>FI[n.layout]),f=O(()=>n.clientSize-h(t)),m=O(()=>({position:"absolute",width:`${Sv===n.layout?f.value:n.scrollbarSize}px`,height:`${Sv===n.layout?n.scrollbarSize:f.value}px`,[mA[n.layout]]:"2px",right:"2px",bottom:"2px",borderRadius:"4px"})),g=O(()=>{const M=n.ratio,D=n.clientSize;if(M>=100)return Number.POSITIVE_INFINITY;if(M>=50)return M*D/100;const A=D/3;return Math.floor(Math.min(Math.max(M*D,vA),A))}),v=O(()=>{if(!Number.isFinite(g.value))return{display:"none"};const M=`${g.value}px`;return bA({bar:d.value,size:M,move:c.traveled},n.layout)}),y=O(()=>Math.floor(n.clientSize-g.value-h(t))),b=()=>{window.addEventListener("mousemove",k),window.addEventListener("mouseup",T);const M=h(a);M&&(l=document.onselectstart,document.onselectstart=()=>!1,M.addEventListener("touchmove",k,{passive:!0}),M.addEventListener("touchend",T))},_=()=>{window.removeEventListener("mousemove",k),window.removeEventListener("mouseup",T),document.onselectstart=l,l=null;const M=h(a);M&&(M.removeEventListener("touchmove",k),M.removeEventListener("touchend",T))},w=M=>{M.stopImmediatePropagation(),!(M.ctrlKey||[1,2].includes(M.button))&&(c.isDragging=!0,c[d.value.axis]=M.currentTarget[d.value.offset]-(M[d.value.client]-M.currentTarget.getBoundingClientRect()[d.value.direction]),e("start-move"),b())},T=()=>{c.isDragging=!1,c[d.value.axis]=0,e("stop-move"),_()},k=M=>{const{isDragging:D}=c;if(!D||!a.value||!i.value)return;const A=c[d.value.axis];if(!A)return;e4(s);const P=(i.value.getBoundingClientRect()[d.value.direction]-M[d.value.client])*-1,$=a.value[d.value.offset]-A,B=P-$;s=Z3(()=>{c.traveled=Math.max(n.startGap,Math.min(B,y.value)),e("scroll",B,y.value)})},x=M=>{const D=Math.abs(M.target.getBoundingClientRect()[d.value.direction]-M[d.value.client]),A=a.value[d.value.offset]/2,P=D-A;c.traveled=Math.max(0,Math.min(P,y.value)),e("scroll",P,y.value)};return Me(()=>n.scrollFrom,M=>{c.isDragging||(c.traveled=Math.ceil(M*y.value))}),Br(()=>{_()}),()=>Fe("div",{role:"presentation",ref:i,class:[r.b(),n.class,(n.alwaysOn||c.isDragging)&&"always-on"],style:m.value,onMousedown:lt(x,["stop","prevent"]),onTouchstartPrevent:w},Fe("div",{ref:a,class:o.e("thumb"),style:v.value,onMousedown:w},[]))}}),SA=st({animated:{type:Boolean,default:!1},count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:Ce([Number,Object])}}),_A=st({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}}),wA=he({name:"ElSkeletonItem"}),xA=he({...wA,props:_A,setup(n){const e=et("skeleton");return(t,r)=>(C(),F("div",{class:ee([h(e).e("item"),h(e).e(t.variant)])},[t.variant==="image"?(C(),se(h(LI),{key:0})):ie("v-if",!0)],2))}});var _f=At(xA,[["__file","skeleton-item.vue"]]);const kA=(n,e=0)=>{if(e===0)return n;const t=ys(e)&&!!e.initVal,r=H(t);let o=null;const i=s=>{if(yo(s)){r.value=n.value;return}o&&clearTimeout(o),o=setTimeout(()=>{r.value=n.value},s)},a=s=>{s==="leading"?Kt(e)?i(e):i(e.leading):ys(e)?i(e.trailing):r.value=!1};return Ht(()=>a("leading")),Me(()=>n.value,s=>{a(s?"leading":"trailing")}),r},CA=he({name:"ElSkeleton"}),IA=he({...CA,props:SA,setup(n,{expose:e}){const t=n,r=et("skeleton"),o=kA(er(t,"loading"),t.throttle);return e({uiLoading:o}),(i,a)=>h(o)?(C(),F("div",kt({key:0,class:[h(r).b(),h(r).is("animated",i.animated)]},i.$attrs),[(C(!0),F($e,null,ot(i.count,s=>(C(),F($e,{key:s},[h(o)?xe(i.$slots,"template",{key:s},()=>[I(_f,{class:ee(h(r).is("first")),variant:"p"},null,8,["class"]),(C(!0),F($e,null,ot(i.rows,l=>(C(),se(_f,{key:l,class:ee([h(r).e("paragraph"),h(r).is("last",l===i.rows&&i.rows>1)]),variant:"p"},null,8,["class"]))),128))]):ie("v-if",!0)],64))),128))],16)):xe(i.$slots,"default",lv(kt({key:1},i.$attrs)))}});var EA=At(IA,[["__file","skeleton.vue"]]);const TA=jn(EA,{SkeletonItem:_f}),MA=La(_f),OA=n=>["",...hg].includes(n),AA=st({modelValue:{type:[Boolean,String,Number],default:!1},disabled:Boolean,loading:Boolean,size:{type:String,validator:OA},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:Jn},activeActionIcon:{type:Jn},activeIcon:{type:Jn},inactiveIcon:{type:Jn},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:Ce(Function)},id:String,tabindex:{type:[String,Number]},...fc(["ariaLabel"])}),PA={[Gn]:n=>Ea(n)||tr(n)||Kt(n),[Ss]:n=>Ea(n)||tr(n)||Kt(n),[us]:n=>Ea(n)||tr(n)||Kt(n)},H4="ElSwitch",$A=he({name:H4}),RA=he({...$A,props:AA,emits:PA,setup(n,{expose:e,emit:t}){const r=n,{formItem:o}=Ps(),i=Tl(),a=et("switch"),{inputId:s}=cg(r,{formItemContext:o}),l=Fa(O(()=>r.loading)),c=H(r.modelValue!==!1),d=H(),f=H(),m=O(()=>[a.b(),a.m(i.value),a.is("disabled",l.value),a.is("checked",_.value)]),g=O(()=>[a.e("label"),a.em("label","left"),a.is("active",!_.value)]),v=O(()=>[a.e("label"),a.em("label","right"),a.is("active",_.value)]),y=O(()=>({width:Jo(r.width)}));Me(()=>r.modelValue,()=>{c.value=!0});const b=O(()=>c.value?r.modelValue:!1),_=O(()=>b.value===r.activeValue);[r.activeValue,r.inactiveValue].includes(b.value)||(t(Gn,r.inactiveValue),t(Ss,r.inactiveValue),t(us,r.inactiveValue)),Me(_,x=>{var M;d.value.checked=x,r.validateEvent&&((M=o==null?void 0:o.validate)==null||M.call(o,"change").catch(D=>Da()))});const w=()=>{const x=_.value?r.inactiveValue:r.activeValue;t(Gn,x),t(Ss,x),t(us,x),Xt(()=>{d.value.checked=_.value})},T=()=>{if(l.value)return;const{beforeChange:x}=r;if(!x){w();return}const M=x();[J0(M),Ea(M)].includes(!0)||to(H4,"beforeChange must return type `Promise<boolean>` or `boolean`"),J0(M)?M.then(A=>{A&&w()}).catch(A=>{}):M&&w()},k=()=>{var x,M;(M=(x=d.value)==null?void 0:x.focus)==null||M.call(x)};return Ht(()=>{d.value.checked=_.value}),e({focus:k,checked:_}),(x,M)=>(C(),F("div",{class:ee(h(m)),onClick:lt(T,["prevent"])},[z("input",{id:h(s),ref_key:"input",ref:d,class:ee(h(a).e("input")),type:"checkbox",role:"switch","aria-checked":h(_),"aria-disabled":h(l),"aria-label":x.ariaLabel,name:x.name,"true-value":x.activeValue,"false-value":x.inactiveValue,disabled:h(l),tabindex:x.tabindex,onChange:w,onKeydown:Ir(T,["enter"])},null,42,["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex","onKeydown"]),!x.inlinePrompt&&(x.inactiveIcon||x.inactiveText)?(C(),F("span",{key:0,class:ee(h(g))},[x.inactiveIcon?(C(),se(h(yt),{key:0},{default:V(()=>[(C(),se(dn(x.inactiveIcon)))]),_:1})):ie("v-if",!0),!x.inactiveIcon&&x.inactiveText?(C(),F("span",{key:1,"aria-hidden":h(_)},ae(x.inactiveText),9,["aria-hidden"])):ie("v-if",!0)],2)):ie("v-if",!0),z("span",{ref_key:"core",ref:f,class:ee(h(a).e("core")),style:Sn(h(y))},[x.inlinePrompt?(C(),F("div",{key:0,class:ee(h(a).e("inner"))},[x.activeIcon||x.inactiveIcon?(C(),se(h(yt),{key:0,class:ee(h(a).is("icon"))},{default:V(()=>[(C(),se(dn(h(_)?x.activeIcon:x.inactiveIcon)))]),_:1},8,["class"])):x.activeText||x.inactiveText?(C(),F("span",{key:1,class:ee(h(a).is("text")),"aria-hidden":!h(_)},ae(h(_)?x.activeText:x.inactiveText),11,["aria-hidden"])):ie("v-if",!0)],2)):ie("v-if",!0),z("div",{class:ee(h(a).e("action"))},[x.loading?(C(),se(h(yt),{key:0,class:ee(h(a).is("loading"))},{default:V(()=>[I(h(F3))]),_:1},8,["class"])):h(_)?xe(x.$slots,"active-action",{key:1},()=>[x.activeActionIcon?(C(),se(h(yt),{key:0},{default:V(()=>[(C(),se(dn(x.activeActionIcon)))]),_:1})):ie("v-if",!0)]):h(_)?ie("v-if",!0):xe(x.$slots,"inactive-action",{key:2},()=>[x.inactiveActionIcon?(C(),se(h(yt),{key:0},{default:V(()=>[(C(),se(dn(x.inactiveActionIcon)))]),_:1})):ie("v-if",!0)])],2)],6),!x.inlinePrompt&&(x.activeIcon||x.activeText)?(C(),F("span",{key:1,class:ee(h(v))},[x.activeIcon?(C(),se(h(yt),{key:0},{default:V(()=>[(C(),se(dn(x.activeIcon)))]),_:1})):ie("v-if",!0),!x.activeIcon&&x.activeText?(C(),F("span",{key:1,"aria-hidden":!h(_)},ae(x.activeText),9,["aria-hidden"])):ie("v-if",!0)],2)):ie("v-if",!0)],10,["onClick"]))}});var DA=At(RA,[["__file","switch.vue"]]);const NA=jn(DA);var qu=(n=>(n.ASC="asc",n.DESC="desc",n))(qu||{}),Gu=(n=>(n.CENTER="center",n.RIGHT="right",n))(Gu||{}),wi=(n=>(n.LEFT="left",n.RIGHT="right",n))(wi||{});const Ev={asc:"desc",desc:"asc"},Ju=Symbol("placeholder"),FA=(n,e,t)=>{var r;const o={flexGrow:0,flexShrink:0,...t?{}:{flexGrow:n.flexGrow||0,flexShrink:n.flexShrink||1}};t||(o.flexShrink=1);const i={...(r=n.style)!=null?r:{},...o,flexBasis:"auto",width:n.width};return e||(n.maxWidth&&(i.maxWidth=n.maxWidth),n.minWidth&&(i.minWidth=n.minWidth)),i};function LA(n,e,t){const r=O(()=>h(e).map((b,_)=>{var w,T;return{...b,key:(T=(w=b.key)!=null?w:b.dataKey)!=null?T:_}})),o=O(()=>h(r).filter(b=>!b.hidden)),i=O(()=>h(o).filter(b=>b.fixed==="left"||b.fixed===!0)),a=O(()=>h(o).filter(b=>b.fixed==="right")),s=O(()=>h(o).filter(b=>!b.fixed)),l=O(()=>{const b=[];return h(i).forEach(_=>{b.push({..._,placeholderSign:Ju})}),h(s).forEach(_=>{b.push(_)}),h(a).forEach(_=>{b.push({..._,placeholderSign:Ju})}),b}),c=O(()=>h(i).length||h(a).length),d=O(()=>h(r).reduce((b,_)=>(b[_.key]=FA(_,h(t),n.fixed),b),{})),f=O(()=>h(o).reduce((b,_)=>b+_.width,0)),m=b=>h(r).find(_=>_.key===b),g=b=>h(d)[b],v=(b,_)=>{b.width=_};function y(b){var _;const{key:w}=b.currentTarget.dataset;if(!w)return;const{sortState:T,sortBy:k}=n;let x=qu.ASC;ys(T)?x=Ev[T[w]]:x=Ev[k.order],(_=n.onColumnSort)==null||_.call(n,{column:m(w),key:w,order:x})}return{columns:r,columnsStyles:d,columnsTotalWidth:f,fixedColumnsOnLeft:i,fixedColumnsOnRight:a,hasFixedColumns:c,mainColumns:l,normalColumns:s,visibleColumns:o,getColumn:m,getColumnStyle:g,updateColumnWidth:v,onColumnSorted:y}}const BA=(n,{mainTableRef:e,leftTableRef:t,rightTableRef:r,onMaybeEndReached:o})=>{const i=H({scrollLeft:0,scrollTop:0});function a(g){var v,y,b;const{scrollTop:_}=g;(v=e.value)==null||v.scrollTo(g),(y=t.value)==null||y.scrollToTop(_),(b=r.value)==null||b.scrollToTop(_)}function s(g){i.value=g,a(g)}function l(g){i.value.scrollTop=g,a(h(i))}function c(g){var v,y;i.value.scrollLeft=g,(y=(v=e.value)==null?void 0:v.scrollTo)==null||y.call(v,h(i))}function d(g){var v;s(g),(v=n.onScroll)==null||v.call(n,g)}function f({scrollTop:g}){const{scrollTop:v}=h(i);g!==v&&l(g)}function m(g,v="auto"){var y;(y=e.value)==null||y.scrollToRow(g,v)}return Me(()=>h(i).scrollTop,(g,v)=>{g>v&&o()}),{scrollPos:i,scrollTo:s,scrollToLeft:c,scrollToTop:l,scrollToRow:m,onScroll:d,onVerticalScroll:f}},VA=(n,{mainTableRef:e,leftTableRef:t,rightTableRef:r,tableInstance:o,ns:i,isScrolling:a})=>{const s=Kn(),{emit:l}=s,c=Fr(!1),d=H(n.defaultExpandedRowKeys||[]),f=H(-1),m=Fr(null),g=H({}),v=H({}),y=Fr({}),b=Fr({}),_=Fr({}),w=O(()=>Kt(n.estimatedRowHeight));function T($){var B;(B=n.onRowsRendered)==null||B.call(n,$),$.rowCacheEnd>h(f)&&(f.value=$.rowCacheEnd)}function k({hovered:$,rowKey:B}){if(a.value)return;o.vnode.el.querySelectorAll(`[rowkey="${String(B)}"]`).forEach(G=>{$?G.classList.add(i.is("hovered")):G.classList.remove(i.is("hovered"))})}function x({expanded:$,rowData:B,rowIndex:j,rowKey:U}){var G,N;const R=[...h(d)],X=R.indexOf(U);$?X===-1&&R.push(U):X>-1&&R.splice(X,1),d.value=R,l("update:expandedRowKeys",R),(G=n.onRowExpand)==null||G.call(n,{expanded:$,rowData:B,rowIndex:j,rowKey:U}),(N=n.onExpandedRowsChange)==null||N.call(n,R)}const M=z3(()=>{var $,B,j,U;c.value=!0,g.value={...h(g),...h(v)},D(h(m),!1),v.value={},m.value=null,($=e.value)==null||$.forceUpdate(),(B=t.value)==null||B.forceUpdate(),(j=r.value)==null||j.forceUpdate(),(U=s.proxy)==null||U.$forceUpdate(),c.value=!1},0);function D($,B=!1){h(w)&&[e,t,r].forEach(j=>{const U=h(j);U&&U.resetAfterRowIndex($,B)})}function A($,B,j){const U=h(m);(U===null||U>j)&&(m.value=j),v.value[$]=B}function P({rowKey:$,height:B,rowIndex:j},U){U?U===wi.RIGHT?_.value[$]=B:y.value[$]=B:b.value[$]=B;const G=Math.max(...[y,_,b].map(N=>N.value[$]||0));h(g)[$]!==G&&(A($,G,j),M())}return{expandedRowKeys:d,lastRenderedRowIndex:f,isDynamic:w,isResetting:c,rowHeights:g,resetAfterIndex:D,onRowExpanded:x,onRowHovered:k,onRowsRendered:T,onRowHeightChange:P}},zA=(n,{expandedRowKeys:e,lastRenderedRowIndex:t,resetAfterIndex:r})=>{const o=H({}),i=O(()=>{const s={},{data:l,rowKey:c}=n,d=h(e);if(!d||!d.length)return l;const f=[],m=new Set;d.forEach(v=>m.add(v));let g=l.slice();for(g.forEach(v=>s[v[c]]=0);g.length>0;){const v=g.shift();f.push(v),m.has(v[c])&&Rt(v.children)&&v.children.length>0&&(g=[...v.children,...g],v.children.forEach(y=>s[y[c]]=s[v[c]]+1))}return o.value=s,f}),a=O(()=>{const{data:s,expandColumnKey:l}=n;return l?h(i):s});return Me(a,(s,l)=>{s!==l&&(t.value=-1,r(0,!0))}),{data:a,depthMap:o}},HA=(n,e)=>n+e,Zd=n=>Rt(n)?n.reduce(HA,0):n,ks=(n,e,t={})=>Lo(n)?n(e):n??t,ui=n=>(["width","maxWidth","minWidth","height"].forEach(e=>{n[e]=Jo(n[e])}),n),U4=n=>Qo(n)?e=>Fe(n,e):n,UA=(n,{columnsTotalWidth:e,rowsHeight:t,fixedColumnsOnLeft:r,fixedColumnsOnRight:o})=>{const i=O(()=>{const{fixed:w,width:T,vScrollbarSize:k}=n,x=T-k;return w?Math.max(Math.round(h(e)),x):x}),a=O(()=>h(i)+n.vScrollbarSize),s=O(()=>{const{height:w=0,maxHeight:T=0,footerHeight:k,hScrollbarSize:x}=n;if(T>0){const M=h(g),D=h(t),P=h(m)+M+D+x;return Math.min(P,T-k)}return w-k}),l=O(()=>{const{maxHeight:w}=n,T=h(s);if(Kt(w)&&w>0)return T;const k=h(t)+h(m)+h(g);return Math.min(T,k)}),c=w=>w.width,d=O(()=>Zd(h(r).map(c))),f=O(()=>Zd(h(o).map(c))),m=O(()=>Zd(n.headerHeight)),g=O(()=>{var w;return(((w=n.fixedData)==null?void 0:w.length)||0)*n.rowHeight}),v=O(()=>h(s)-h(m)-h(g)),y=O(()=>{const{style:w={},height:T,width:k}=n;return ui({...w,height:T,width:k})}),b=O(()=>ui({height:n.footerHeight})),_=O(()=>({top:Jo(h(m)),bottom:Jo(n.footerHeight),width:Jo(n.width)}));return{bodyWidth:i,fixedTableHeight:l,mainTableHeight:s,leftTableWidth:d,rightTableWidth:f,headerWidth:a,windowHeight:v,footerHeight:b,emptyStyle:_,rootStyle:y,headerHeight:m}};function WA(n){const e=H(),t=H(),r=H(),{columns:o,columnsStyles:i,columnsTotalWidth:a,fixedColumnsOnLeft:s,fixedColumnsOnRight:l,hasFixedColumns:c,mainColumns:d,onColumnSorted:f}=LA(n,er(n,"columns"),er(n,"fixed")),{scrollTo:m,scrollToLeft:g,scrollToTop:v,scrollToRow:y,onScroll:b,onVerticalScroll:_,scrollPos:w}=BA(n,{mainTableRef:e,leftTableRef:t,rightTableRef:r,onMaybeEndReached:gt}),T=et("table-v2"),k=Kn(),x=Fr(!1),{expandedRowKeys:M,lastRenderedRowIndex:D,isDynamic:A,isResetting:P,rowHeights:$,resetAfterIndex:B,onRowExpanded:j,onRowHeightChange:U,onRowHovered:G,onRowsRendered:N}=VA(n,{mainTableRef:e,leftTableRef:t,rightTableRef:r,tableInstance:k,ns:T,isScrolling:x}),{data:R,depthMap:X}=zA(n,{expandedRowKeys:M,lastRenderedRowIndex:D,resetAfterIndex:B}),te=O(()=>{const{estimatedRowHeight:tt,rowHeight:Ct}=n,Bt=h(R);return Kt(tt)?Object.values(h($)).reduce((Ne,je)=>Ne+je,0):Bt.length*Ct}),{bodyWidth:Y,fixedTableHeight:re,mainTableHeight:Q,leftTableWidth:Z,rightTableWidth:q,headerWidth:le,windowHeight:ye,footerHeight:Re,emptyStyle:ze,rootStyle:nt,headerHeight:Ge}=UA(n,{columnsTotalWidth:a,fixedColumnsOnLeft:s,fixedColumnsOnRight:l,rowsHeight:te}),mt=H(),ut=O(()=>{const tt=h(R).length===0;return Rt(n.fixedData)?n.fixedData.length===0&&tt:tt});function Pt(tt){const{estimatedRowHeight:Ct,rowHeight:Bt,rowKey:Ne}=n;return Ct?h($)[h(R)[tt][Ne]]||Ct:Bt}function gt(){const{onEndReached:tt}=n;if(!tt)return;const{scrollTop:Ct}=h(w),Bt=h(te),Ne=h(ye),je=Bt-(Ct+Ne)+n.hScrollbarSize;h(D)>=0&&Bt===Ct+h(Q)-h(Ge)&&tt(je)}return Me(()=>n.expandedRowKeys,tt=>M.value=tt,{deep:!0}),{columns:o,containerRef:mt,mainTableRef:e,leftTableRef:t,rightTableRef:r,isDynamic:A,isResetting:P,isScrolling:x,hasFixedColumns:c,columnsStyles:i,columnsTotalWidth:a,data:R,expandedRowKeys:M,depthMap:X,fixedColumnsOnLeft:s,fixedColumnsOnRight:l,mainColumns:d,bodyWidth:Y,emptyStyle:ze,rootStyle:nt,headerWidth:le,footerHeight:Re,mainTableHeight:Q,fixedTableHeight:re,leftTableWidth:Z,rightTableWidth:q,showEmpty:ut,getRowHeight:Pt,onColumnSorted:f,onRowHovered:G,onRowExpanded:j,onRowsRendered:N,onRowHeightChange:U,scrollTo:m,scrollToLeft:g,scrollToTop:v,scrollToRow:y,onScroll:b,onVerticalScroll:_}}const kg=Symbol("tableV2"),W4=String,vc={type:Ce(Array),required:!0},Cg={type:Ce(Array)},j4={...Cg,required:!0},jA=String,Ab={type:Ce(Array),default:()=>Fo([])},Qi={type:Number,required:!0},K4={type:Ce([String,Number,Symbol]),default:"id"},Pb={type:Ce(Object)},rs=st({class:String,columns:vc,columnsStyles:{type:Ce(Object),required:!0},depth:Number,expandColumnKey:jA,estimatedRowHeight:{...cs.estimatedRowHeight,default:void 0},isScrolling:Boolean,onRowExpand:{type:Ce(Function)},onRowHover:{type:Ce(Function)},onRowHeightChange:{type:Ce(Function)},rowData:{type:Ce(Object),required:!0},rowEventHandlers:{type:Ce(Object)},rowIndex:{type:Number,required:!0},rowKey:K4,style:{type:Ce(Object)}}),gm={type:Number,required:!0},Ig=st({class:String,columns:vc,fixedHeaderData:{type:Ce(Array)},headerData:{type:Ce(Array),required:!0},headerHeight:{type:Ce([Number,Array]),default:50},rowWidth:gm,rowHeight:{type:Number,default:50},height:gm,width:gm}),ef=st({columns:vc,data:j4,fixedData:Cg,estimatedRowHeight:rs.estimatedRowHeight,width:Qi,height:Qi,headerWidth:Qi,headerHeight:Ig.headerHeight,bodyWidth:Qi,rowHeight:Qi,cache:yA.cache,useIsScrolling:Boolean,scrollbarAlwaysOn:cs.scrollbarAlwaysOn,scrollbarStartGap:cs.scrollbarStartGap,scrollbarEndGap:cs.scrollbarEndGap,class:W4,style:Pb,containerStyle:Pb,getRowHeight:{type:Ce(Function),required:!0},rowKey:rs.rowKey,onRowsRendered:{type:Ce(Function)},onScroll:{type:Ce(Function)}}),KA=st({cache:ef.cache,estimatedRowHeight:rs.estimatedRowHeight,rowKey:K4,headerClass:{type:Ce([String,Function])},headerProps:{type:Ce([Object,Function])},headerCellProps:{type:Ce([Object,Function])},headerHeight:Ig.headerHeight,footerHeight:{type:Number,default:0},rowClass:{type:Ce([String,Function])},rowProps:{type:Ce([Object,Function])},rowHeight:{type:Number,default:50},cellProps:{type:Ce([Object,Function])},columns:vc,data:j4,dataGetter:{type:Ce(Function)},fixedData:Cg,expandColumnKey:rs.expandColumnKey,expandedRowKeys:Ab,defaultExpandedRowKeys:Ab,class:W4,fixed:Boolean,style:{type:Ce(Object)},width:Qi,height:Qi,maxHeight:Number,useIsScrolling:Boolean,indentSize:{type:Number,default:12},iconSize:{type:Number,default:12},hScrollbarSize:cs.hScrollbarSize,vScrollbarSize:cs.vScrollbarSize,scrollbarAlwaysOn:z4.alwaysOn,sortBy:{type:Ce(Object),default:()=>({})},sortState:{type:Ce(Object),default:void 0},onColumnSort:{type:Ce(Function)},onExpandedRowsChange:{type:Ce(Function)},onEndReached:{type:Ce(Function)},onRowExpand:rs.onRowExpand,onScroll:ef.onScroll,onRowsRendered:ef.onRowsRendered,rowEventHandlers:rs.rowEventHandlers}),YA="ElTableV2Header",qA=he({name:YA,props:Ig,setup(n,{slots:e,expose:t}){const r=et("table-v2"),o=on("tableV2GridScrollLeft"),i=H(),a=O(()=>ui({width:n.width,height:n.height})),s=O(()=>ui({width:n.rowWidth,height:n.height})),l=O(()=>av(h(n.headerHeight))),c=m=>{const g=h(i);Xt(()=>{g!=null&&g.scroll&&g.scroll({left:m})})},d=()=>{const m=r.e("fixed-header-row"),{columns:g,fixedHeaderData:v,rowHeight:y}=n;return v==null?void 0:v.map((b,_)=>{var w;const T=ui({height:y,width:"100%"});return(w=e.fixed)==null?void 0:w.call(e,{class:m,columns:g,rowData:b,rowIndex:-(_+1),style:T})})},f=()=>{const m=r.e("dynamic-header-row"),{columns:g}=n;return h(l).map((v,y)=>{var b;const _=ui({width:"100%",height:v});return(b=e.dynamic)==null?void 0:b.call(e,{class:m,columns:g,headerIndex:y,style:_})})};return pg(()=>{o!=null&&o.value&&c(o.value)}),t({scrollToLeft:c}),()=>{if(!(n.height<=0))return I("div",{ref:i,class:n.class,style:h(a),role:"rowgroup"},[I("div",{style:h(s),class:r.e("header")},[f(),d()])])}}});var GA=qA;const JA=({atXEndEdge:n,atXStartEdge:e,atYEndEdge:t,atYStartEdge:r},o)=>{let i=null,a=0,s=0;const l=(d,f)=>{const m=d<=0&&e.value||d>=0&&n.value,g=f<=0&&r.value||f>=0&&t.value;return m&&g};return{hasReachedEdge:l,onWheel:d=>{e4(i);let f=d.deltaX,m=d.deltaY;Math.abs(f)>Math.abs(m)?m=0:f=0,d.shiftKey&&m!==0&&(f=m,m=0),!(l(a,s)&&l(a+f,s+m))&&(a+=f,s+=m,d.preventDefault(),i=Z3(()=>{o(a,s),a=0,s=0}))}}},Y4=({name:n,clearCache:e,getColumnPosition:t,getColumnStartIndexForOffset:r,getColumnStopIndexForStartIndex:o,getEstimatedTotalHeight:i,getEstimatedTotalWidth:a,getColumnOffset:s,getRowOffset:l,getRowPosition:c,getRowStartIndexForOffset:d,getRowStopIndexForStartIndex:f,initCache:m,injectToInstance:g,validateProps:v})=>he({name:n??"ElVirtualList",props:cs,emits:[Ib,Eb],setup(y,{emit:b,expose:_,slots:w}){const T=et("vl");v(y);const k=Kn(),x=H(m(y,k));g==null||g(k,x);const M=H(),D=H(),A=H(),P=H(null),$=H({isScrolling:!1,scrollLeft:Kt(y.initScrollLeft)?y.initScrollLeft:0,scrollTop:Kt(y.initScrollTop)?y.initScrollTop:0,updateRequested:!1,xAxisScrollDir:gu,yAxisScrollDir:gu}),B=hA(),j=O(()=>Number.parseInt(`${y.height}`,10)),U=O(()=>Number.parseInt(`${y.width}`,10)),G=O(()=>{const{totalColumn:Ne,totalRow:je,columnCache:Be}=y,{isScrolling:qe,xAxisScrollDir:Je,scrollLeft:ct}=h($);if(Ne===0||je===0)return[0,0,0,0];const vt=r(y,ct,h(x)),Se=o(y,vt,ct,h(x)),He=!qe||Je===gv?Math.max(1,Be):1,Tt=!qe||Je===gu?Math.max(1,Be):1;return[Math.max(0,vt-He),Math.max(0,Math.min(Ne-1,Se+Tt)),vt,Se]}),N=O(()=>{const{totalColumn:Ne,totalRow:je,rowCache:Be}=y,{isScrolling:qe,yAxisScrollDir:Je,scrollTop:ct}=h($);if(Ne===0||je===0)return[0,0,0,0];const vt=d(y,ct,h(x)),Se=f(y,vt,ct,h(x)),He=!qe||Je===gv?Math.max(1,Be):1,Tt=!qe||Je===gu?Math.max(1,Be):1;return[Math.max(0,vt-He),Math.max(0,Math.min(je-1,Se+Tt)),vt,Se]}),R=O(()=>i(y,h(x))),X=O(()=>a(y,h(x))),te=O(()=>{var Ne;return[{position:"relative",overflow:"hidden",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:y.direction,height:Kt(y.height)?`${y.height}px`:y.height,width:Kt(y.width)?`${y.width}px`:y.width},(Ne=y.style)!=null?Ne:{}]}),Y=O(()=>{const Ne=`${h(X)}px`;return{height:`${h(R)}px`,pointerEvents:h($).isScrolling?"none":void 0,width:Ne}}),re=()=>{const{totalColumn:Ne,totalRow:je}=y;if(Ne>0&&je>0){const[Se,He,Tt,$t]=h(G),[wt,me,ce,be]=h(N);b(Ib,{columnCacheStart:Se,columnCacheEnd:He,rowCacheStart:wt,rowCacheEnd:me,columnVisibleStart:Tt,columnVisibleEnd:$t,rowVisibleStart:ce,rowVisibleEnd:be})}const{scrollLeft:Be,scrollTop:qe,updateRequested:Je,xAxisScrollDir:ct,yAxisScrollDir:vt}=h($);b(Eb,{xAxisScrollDir:ct,scrollLeft:Be,yAxisScrollDir:vt,scrollTop:qe,updateRequested:Je})},Q=Ne=>{const{clientHeight:je,clientWidth:Be,scrollHeight:qe,scrollLeft:Je,scrollTop:ct,scrollWidth:vt}=Ne.currentTarget,Se=h($);if(Se.scrollTop===ct&&Se.scrollLeft===Je)return;let He=Je;if(Tb(y.direction))switch(Mb()){case _v:He=-Je;break;case N4:He=vt-Be-Je;break}$.value={...Se,isScrolling:!0,scrollLeft:He,scrollTop:Math.max(0,Math.min(ct,qe-je)),updateRequested:!0,xAxisScrollDir:wd(Se.scrollLeft,He),yAxisScrollDir:wd(Se.scrollTop,ct)},Xt(()=>nt()),Ge(),re()},Z=(Ne,je)=>{const Be=h(j),qe=(R.value-Be)/je*Ne;ye({scrollTop:Math.min(R.value-Be,qe)})},q=(Ne,je)=>{const Be=h(U),qe=(X.value-Be)/je*Ne;ye({scrollLeft:Math.min(X.value-Be,qe)})},{onWheel:le}=JA({atXStartEdge:O(()=>$.value.scrollLeft<=0),atXEndEdge:O(()=>$.value.scrollLeft>=X.value-h(U)),atYStartEdge:O(()=>$.value.scrollTop<=0),atYEndEdge:O(()=>$.value.scrollTop>=R.value-h(j))},(Ne,je)=>{var Be,qe,Je,ct;(qe=(Be=D.value)==null?void 0:Be.onMouseUp)==null||qe.call(Be),(ct=(Je=A.value)==null?void 0:Je.onMouseUp)==null||ct.call(Je);const vt=h(U),Se=h(j);ye({scrollLeft:Math.min($.value.scrollLeft+Ne,X.value-vt),scrollTop:Math.min($.value.scrollTop+je,R.value-Se)})});BI(M,"wheel",le,{passive:!1});const ye=({scrollLeft:Ne=$.value.scrollLeft,scrollTop:je=$.value.scrollTop})=>{Ne=Math.max(Ne,0),je=Math.max(je,0);const Be=h($);je===Be.scrollTop&&Ne===Be.scrollLeft||($.value={...Be,xAxisScrollDir:wd(Be.scrollLeft,Ne),yAxisScrollDir:wd(Be.scrollTop,je),scrollLeft:Ne,scrollTop:je,updateRequested:!0},Xt(()=>nt()),Ge(),re())},Re=(Ne=0,je=0,Be=ns)=>{const qe=h($);je=Math.max(0,Math.min(je,y.totalColumn-1)),Ne=Math.max(0,Math.min(Ne,y.totalRow-1));const Je=j3(T.namespace.value),ct=h(x),vt=i(y,ct),Se=a(y,ct);ye({scrollLeft:s(y,je,Be,qe.scrollLeft,ct,Se>y.width?Je:0),scrollTop:l(y,Ne,Be,qe.scrollTop,ct,vt>y.height?Je:0)})},ze=(Ne,je)=>{const{columnWidth:Be,direction:qe,rowHeight:Je}=y,ct=B.value(e&&Be,e&&Je,e&&qe),vt=`${Ne},${je}`;if(VI(ct,vt))return ct[vt];{const[,Se]=t(y,je,h(x)),He=h(x),Tt=Tb(qe),[$t,wt]=c(y,Ne,He),[me]=t(y,je,He);return ct[vt]={position:"absolute",left:Tt?void 0:`${Se}px`,right:Tt?`${Se}px`:void 0,top:`${wt}px`,height:`${$t}px`,width:`${me}px`},ct[vt]}},nt=()=>{$.value.isScrolling=!1,Xt(()=>{B.value(-1,null,null)})};Ht(()=>{if(!dc)return;const{initScrollLeft:Ne,initScrollTop:je}=y,Be=h(M);Be&&(Kt(Ne)&&(Be.scrollLeft=Ne),Kt(je)&&(Be.scrollTop=je)),re()});const Ge=()=>{const{direction:Ne}=y,{scrollLeft:je,scrollTop:Be,updateRequested:qe}=h($),Je=h(M);if(qe&&Je){if(Ne===R4)switch(Mb()){case _v:{Je.scrollLeft=-je;break}case D4:{Je.scrollLeft=je;break}default:{const{clientWidth:ct,scrollWidth:vt}=Je;Je.scrollLeft=vt-ct-je;break}}else Je.scrollLeft=Math.max(0,je);Je.scrollTop=Math.max(0,Be)}},{resetAfterColumnIndex:mt,resetAfterRowIndex:ut,resetAfter:Pt}=k.proxy;_({windowRef:M,innerRef:P,getItemStyleCache:B,scrollTo:ye,scrollToItem:Re,states:$,resetAfterColumnIndex:mt,resetAfterRowIndex:ut,resetAfter:Pt});const gt=()=>{const{scrollbarAlwaysOn:Ne,scrollbarStartGap:je,scrollbarEndGap:Be,totalColumn:qe,totalRow:Je}=y,ct=h(U),vt=h(j),Se=h(X),He=h(R),{scrollLeft:Tt,scrollTop:$t}=h($),wt=Fe(Ob,{ref:D,alwaysOn:Ne,startGap:je,endGap:Be,class:T.e("horizontal"),clientSize:ct,layout:"horizontal",onScroll:q,ratio:ct*100/Se,scrollFrom:Tt/(Se-ct),total:Je,visible:!0}),me=Fe(Ob,{ref:A,alwaysOn:Ne,startGap:je,endGap:Be,class:T.e("vertical"),clientSize:vt,layout:"vertical",onScroll:Z,ratio:vt*100/He,scrollFrom:$t/(He-vt),total:qe,visible:!0});return{horizontalScrollbar:wt,verticalScrollbar:me}},tt=()=>{var Ne;const[je,Be]=h(G),[qe,Je]=h(N),{data:ct,totalColumn:vt,totalRow:Se,useIsScrolling:He,itemKey:Tt}=y,$t=[];if(Se>0&&vt>0)for(let wt=qe;wt<=Je;wt++)for(let me=je;me<=Be;me++){const ce=Tt({columnIndex:me,data:ct,rowIndex:wt});$t.push(Fe($e,{key:ce},(Ne=w.default)==null?void 0:Ne.call(w,{columnIndex:me,data:ct,isScrolling:He?h($).isScrolling:void 0,style:ze(wt,me),rowIndex:wt})))}return $t},Ct=()=>{const Ne=dn(y.innerElement),je=tt();return[Fe(Ne,{style:h(Y),ref:P},tr(Ne)?je:{default:()=>je})]};return()=>{const Ne=dn(y.containerElement),{horizontalScrollbar:je,verticalScrollbar:Be}=gt(),qe=Ct();return Fe("div",{key:0,class:T.e("wrapper"),role:y.role},[Fe(Ne,{class:y.className,style:h(te),onScroll:Q,ref:M},tr(Ne)?qe:{default:()=>qe}),je,Be])}}}),{max:wf,min:q4,floor:G4}=Math,XA={column:"columnWidth",row:"rowHeight"},Tv={column:"lastVisitedColumnIndex",row:"lastVisitedRowIndex"},wa=(n,e,t,r)=>{const[o,i,a]=[t[r],n[XA[r]],t[Tv[r]]];if(e>a){let s=0;if(a>=0){const l=o[a];s=l.offset+l.size}for(let l=a+1;l<=e;l++){const c=i(l);o[l]={offset:s,size:c},s+=c}t[Tv[r]]=e}return o[e]},J4=(n,e,t,r,o,i)=>{for(;t<=r;){const a=t+G4((r-t)/2),s=wa(n,a,e,i).offset;if(s===o)return a;s<o?t=a+1:r=a-1}return wf(0,t-1)},QA=(n,e,t,r,o)=>{const i=o==="column"?n.totalColumn:n.totalRow;let a=1;for(;t<i&&wa(n,t,e,o).offset<r;)t+=a,a*=2;return J4(n,e,G4(t/2),q4(t,i-1),r,o)},$b=(n,e,t,r)=>{const[o,i]=[e[r],e[Tv[r]]];return(i>0?o[i].offset:0)>=t?J4(n,e,0,i,t,r):QA(n,e,wf(0,i),t,r)},X4=({totalRow:n},{estimatedRowHeight:e,lastVisitedRowIndex:t,row:r})=>{let o=0;if(t>=n&&(t=n-1),t>=0){const s=r[t];o=s.offset+s.size}const a=(n-t-1)*e;return o+a},Q4=({totalColumn:n},{column:e,estimatedColumnWidth:t,lastVisitedColumnIndex:r})=>{let o=0;if(r>n&&(r=n-1),r>=0){const s=e[r];o=s.offset+s.size}const a=(n-r-1)*t;return o+a},ZA={column:Q4,row:X4},Rb=(n,e,t,r,o,i,a)=>{const[s,l]=[i==="row"?n.height:n.width,ZA[i]],c=wa(n,e,o,i),d=l(n,o),f=wf(0,q4(d-s,c.offset)),m=wf(0,c.offset-s+a+c.size);switch(t===P4&&(r>=m-s&&r<=f+s?t=ns:t=Sl),t){case yv:return f;case bv:return m;case Sl:return Math.round(m+(f-m)/2);case ns:default:return r>=m&&r<=f?r:m>f||r<m?m:f}},eP=Y4({name:"ElDynamicSizeGrid",getColumnPosition:(n,e,t)=>{const r=wa(n,e,t,"column");return[r.size,r.offset]},getRowPosition:(n,e,t)=>{const r=wa(n,e,t,"row");return[r.size,r.offset]},getColumnOffset:(n,e,t,r,o,i)=>Rb(n,e,t,r,o,"column",i),getRowOffset:(n,e,t,r,o,i)=>Rb(n,e,t,r,o,"row",i),getColumnStartIndexForOffset:(n,e,t)=>$b(n,t,e,"column"),getColumnStopIndexForStartIndex:(n,e,t,r)=>{const o=wa(n,e,r,"column"),i=t+n.width;let a=o.offset+o.size,s=e;for(;s<n.totalColumn-1&&a<i;)s++,a+=wa(n,e,r,"column").size;return s},getEstimatedTotalHeight:X4,getEstimatedTotalWidth:Q4,getRowStartIndexForOffset:(n,e,t)=>$b(n,t,e,"row"),getRowStopIndexForStartIndex:(n,e,t,r)=>{const{totalRow:o,height:i}=n,a=wa(n,e,r,"row"),s=t+i;let l=a.size+a.offset,c=e;for(;c<o-1&&l<s;)c++,l+=wa(n,c,r,"row").size;return c},injectToInstance:(n,e)=>{const t=({columnIndex:i,rowIndex:a},s)=>{var l,c;s=yo(s)?!0:s,Kt(i)&&(e.value.lastVisitedColumnIndex=Math.min(e.value.lastVisitedColumnIndex,i-1)),Kt(a)&&(e.value.lastVisitedRowIndex=Math.min(e.value.lastVisitedRowIndex,a-1)),(l=n.exposed)==null||l.getItemStyleCache.value(-1,null,null),s&&((c=n.proxy)==null||c.$forceUpdate())},r=(i,a)=>{t({columnIndex:i},a)},o=(i,a)=>{t({rowIndex:i},a)};Object.assign(n.proxy,{resetAfterColumnIndex:r,resetAfterRowIndex:o,resetAfter:t})},initCache:({estimatedColumnWidth:n=Cb,estimatedRowHeight:e=Cb})=>({column:{},estimatedColumnWidth:n,estimatedRowHeight:e,lastVisitedColumnIndex:-1,lastVisitedRowIndex:-1,row:{}}),clearCache:!1,validateProps:({columnWidth:n,rowHeight:e})=>{}}),tP=Y4({name:"ElFixedSizeGrid",getColumnPosition:({columnWidth:n},e)=>[n,e*n],getRowPosition:({rowHeight:n},e)=>[n,e*n],getEstimatedTotalHeight:({totalRow:n,rowHeight:e})=>e*n,getEstimatedTotalWidth:({totalColumn:n,columnWidth:e})=>e*n,getColumnOffset:({totalColumn:n,columnWidth:e,width:t},r,o,i,a,s)=>{t=Number(t);const l=Math.max(0,n*e-t),c=Math.min(l,r*e),d=Math.max(0,r*e-t+s+e);switch(o==="smart"&&(i>=d-t&&i<=c+t?o=ns:o=Sl),o){case yv:return c;case bv:return d;case Sl:{const f=Math.round(d+(c-d)/2);return f<Math.ceil(t/2)?0:f>l+Math.floor(t/2)?l:f}case ns:default:return i>=d&&i<=c?i:d>c||i<d?d:c}},getRowOffset:({rowHeight:n,height:e,totalRow:t},r,o,i,a,s)=>{e=Number(e);const l=Math.max(0,t*n-e),c=Math.min(l,r*n),d=Math.max(0,r*n-e+s+n);switch(o===P4&&(i>=d-e&&i<=c+e?o=ns:o=Sl),o){case yv:return c;case bv:return d;case Sl:{const f=Math.round(d+(c-d)/2);return f<Math.ceil(e/2)?0:f>l+Math.floor(e/2)?l:f}case ns:default:return i>=d&&i<=c?i:d>c||i<d?d:c}},getColumnStartIndexForOffset:({columnWidth:n,totalColumn:e},t)=>Math.max(0,Math.min(e-1,Math.floor(t/n))),getColumnStopIndexForStartIndex:({columnWidth:n,totalColumn:e,width:t},r,o)=>{const i=r*n,a=Math.ceil((t+o-i)/n);return Math.max(0,Math.min(e-1,r+a-1))},getRowStartIndexForOffset:({rowHeight:n,totalRow:e},t)=>Math.max(0,Math.min(e-1,Math.floor(t/n))),getRowStopIndexForStartIndex:({rowHeight:n,totalRow:e,height:t},r,o)=>{const i=r*n,a=Math.ceil((t+o-i)/n);return Math.max(0,Math.min(e-1,r+a-1))},initCache:()=>{},clearCache:!0,validateProps:({columnWidth:n,rowHeight:e})=>{}}),nP="ElTableV2Grid",rP=n=>{const e=H(),t=H(),r=H(0),o=O(()=>{const{data:b,rowHeight:_,estimatedRowHeight:w}=n;if(!w)return b.length*_}),i=O(()=>{const{fixedData:b,rowHeight:_}=n;return((b==null?void 0:b.length)||0)*_}),a=O(()=>Zd(n.headerHeight)),s=O(()=>{const{height:b}=n;return Math.max(0,b-h(a)-h(i))}),l=O(()=>h(a)+h(i)>0),c=({data:b,rowIndex:_})=>b[_][n.rowKey];function d({rowCacheStart:b,rowCacheEnd:_,rowVisibleStart:w,rowVisibleEnd:T}){var k;(k=n.onRowsRendered)==null||k.call(n,{rowCacheStart:b,rowCacheEnd:_,rowVisibleStart:w,rowVisibleEnd:T})}function f(b,_){var w;(w=t.value)==null||w.resetAfterRowIndex(b,_)}function m(b,_){const w=h(e),T=h(t);ys(b)?(w==null||w.scrollToLeft(b.scrollLeft),r.value=b.scrollLeft,T==null||T.scrollTo(b)):(w==null||w.scrollToLeft(b),r.value=b,T==null||T.scrollTo({scrollLeft:b,scrollTop:_}))}function g(b){var _;(_=h(t))==null||_.scrollTo({scrollTop:b})}function v(b,_){var w;(w=h(t))==null||w.scrollToItem(b,1,_)}function y(){var b,_;(b=h(t))==null||b.$forceUpdate(),(_=h(e))==null||_.$forceUpdate()}return{bodyRef:t,forceUpdate:y,fixedRowHeight:i,gridHeight:s,hasHeader:l,headerHeight:a,headerRef:e,totalHeight:o,itemKey:c,onItemRendered:d,resetAfterRowIndex:f,scrollTo:m,scrollToTop:g,scrollToRow:v,scrollLeft:r}},oP=he({name:nP,props:ef,setup(n,{slots:e,expose:t}){const{ns:r}=on(kg),{bodyRef:o,fixedRowHeight:i,gridHeight:a,hasHeader:s,headerRef:l,headerHeight:c,totalHeight:d,forceUpdate:f,itemKey:m,onItemRendered:g,resetAfterRowIndex:v,scrollTo:y,scrollToTop:b,scrollToRow:_,scrollLeft:w}=rP(n);Pn("tableV2GridScrollLeft",w),t({forceUpdate:f,totalHeight:d,scrollTo:y,scrollToTop:b,scrollToRow:_,resetAfterRowIndex:v});const T=()=>n.bodyWidth;return()=>{const{cache:k,columns:x,data:M,fixedData:D,useIsScrolling:A,scrollbarAlwaysOn:P,scrollbarEndGap:$,scrollbarStartGap:B,style:j,rowHeight:U,bodyWidth:G,estimatedRowHeight:N,headerWidth:R,height:X,width:te,getRowHeight:Y,onScroll:re}=n,Q=Kt(N),Z=Q?eP:tP,q=h(c);return I("div",{role:"table",class:[r.e("table"),n.class],style:j},[I(Z,{ref:o,data:M,useIsScrolling:A,itemKey:m,columnCache:0,columnWidth:Q?T:G,totalColumn:1,totalRow:M.length,rowCache:k,rowHeight:Q?Y:U,width:te,height:h(a),class:r.e("body"),role:"rowgroup",scrollbarStartGap:B,scrollbarEndGap:$,scrollbarAlwaysOn:P,onScroll:re,onItemRendered:g,perfMode:!1},{default:le=>{var ye;const Re=M[le.rowIndex];return(ye=e.row)==null?void 0:ye.call(e,{...le,columns:x,rowData:Re})}}),h(s)&&I(GA,{ref:l,class:r.e("header-wrapper"),columns:x,headerData:M,headerHeight:n.headerHeight,fixedHeaderData:D,rowWidth:R,rowHeight:U,width:te,height:Math.min(q+h(i),X)},{dynamic:e.header,fixed:e.row})])}}});var Eg=oP;function aP(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!Qo(n)}const iP=(n,{slots:e})=>{const{mainTableRef:t,...r}=n;return I(Eg,kt({ref:t},r),aP(e)?e:{default:()=>[e]})};var sP=iP;function lP(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!Qo(n)}const uP=(n,{slots:e})=>{if(!n.columns.length)return;const{leftTableRef:t,...r}=n;return I(Eg,kt({ref:t},r),lP(e)?e:{default:()=>[e]})};var cP=uP;function dP(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!Qo(n)}const fP=(n,{slots:e})=>{if(!n.columns.length)return;const{rightTableRef:t,...r}=n;return I(Eg,kt({ref:t},r),dP(e)?e:{default:()=>[e]})};var pP=fP;const hP=n=>{const{isScrolling:e}=on(kg),t=H(!1),r=H(),o=O(()=>Kt(n.estimatedRowHeight)&&n.rowIndex>=0),i=(l=!1)=>{const c=h(r);if(!c)return;const{columns:d,onRowHeightChange:f,rowKey:m,rowIndex:g,style:v}=n,{height:y}=c.getBoundingClientRect();t.value=!0,Xt(()=>{if(l||y!==Number.parseInt(v.height)){const b=d[0],_=(b==null?void 0:b.placeholderSign)===Ju;f==null||f({rowKey:m,height:y,rowIndex:g},b&&!_&&b.fixed)}})},a=O(()=>{const{rowData:l,rowIndex:c,rowKey:d,onRowHover:f}=n,m=n.rowEventHandlers||{},g={};return Object.entries(m).forEach(([v,y])=>{Lo(y)&&(g[v]=b=>{y({event:b,rowData:l,rowIndex:c,rowKey:d})})}),f&&[{name:"onMouseleave",hovered:!1},{name:"onMouseenter",hovered:!0}].forEach(({name:v,hovered:y})=>{const b=g[v];g[v]=_=>{f({event:_,hovered:y,rowData:l,rowIndex:c,rowKey:d}),b==null||b(_)}}),g}),s=l=>{const{onRowExpand:c,rowData:d,rowIndex:f,rowKey:m}=n;c==null||c({expanded:l,rowData:d,rowIndex:f,rowKey:m})};return Ht(()=>{h(o)&&i(!0)}),{isScrolling:e,measurable:o,measured:t,rowRef:r,eventHandlers:a,onExpand:s}},mP="ElTableV2TableRow",vP=he({name:mP,props:rs,setup(n,{expose:e,slots:t,attrs:r}){const{eventHandlers:o,isScrolling:i,measurable:a,measured:s,rowRef:l,onExpand:c}=hP(n);return e({onExpand:c}),()=>{const{columns:d,columnsStyles:f,expandColumnKey:m,depth:g,rowData:v,rowIndex:y,style:b}=n;let _=d.map((w,T)=>{const k=Rt(v.children)&&v.children.length>0&&w.key===m;return t.cell({column:w,columns:d,columnIndex:T,depth:g,style:f[w.key],rowData:v,rowIndex:y,isScrolling:h(i),expandIconProps:k?{rowData:v,rowIndex:y,onExpand:c}:void 0})});if(t.row&&(_=t.row({cells:_.map(w=>Rt(w)&&w.length===1?w[0]:w),style:b,columns:d,depth:g,rowData:v,rowIndex:y,isScrolling:h(i)})),h(a)){const{height:w,...T}=b||{},k=h(s);return I("div",kt({ref:l,class:n.class,style:k?b:T,role:"row"},r,h(o)),[_])}return I("div",kt(r,{ref:l,class:n.class,style:b,role:"row"},h(o)),[_])}}});var gP=vP;function yP(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!Qo(n)}const bP=(n,{slots:e})=>{const{columns:t,columnsStyles:r,depthMap:o,expandColumnKey:i,expandedRowKeys:a,estimatedRowHeight:s,hasFixedColumns:l,rowData:c,rowIndex:d,style:f,isScrolling:m,rowProps:g,rowClass:v,rowKey:y,rowEventHandlers:b,ns:_,onRowHovered:w,onRowExpanded:T}=n,k=ks(v,{columns:t,rowData:c,rowIndex:d},""),x=ks(g,{columns:t,rowData:c,rowIndex:d}),M=c[y],D=o[M]||0,A=!!i,P=d<0,$=[_.e("row"),k,{[_.e(`row-depth-${D}`)]:A&&d>=0,[_.is("expanded")]:A&&a.includes(M),[_.is("fixed")]:!D&&P,[_.is("customized")]:!!e.row}],B=l?w:void 0,j={...x,columns:t,columnsStyles:r,class:$,depth:D,expandColumnKey:i,estimatedRowHeight:P?void 0:s,isScrolling:m,rowIndex:d,rowData:c,rowKey:M,rowEventHandlers:b,style:f};return I(gP,kt(j,{onRowExpand:T,onMouseenter:N=>{B==null||B({hovered:!0,rowKey:M,event:N,rowData:c,rowIndex:d})},onMouseleave:N=>{B==null||B({hovered:!1,rowKey:M,event:N,rowData:c,rowIndex:d})},rowkey:M}),yP(e)?e:{default:()=>[e]})};var SP=bP;const Tg=(n,{slots:e})=>{var t;const{cellData:r,style:o}=n,i=((t=r==null?void 0:r.toString)==null?void 0:t.call(r))||"",a=xe(e,"default",n,()=>[i]);return I("div",{class:n.class,title:i,style:o},[a])};Tg.displayName="ElTableV2Cell";Tg.inheritAttrs=!1;var _P=Tg;const wP=n=>{const{expanded:e,expandable:t,onExpand:r,style:o,size:i}=n,a={onClick:t?()=>r(!e):void 0,class:n.class};return I(yt,kt(a,{size:i,style:o}),{default:()=>[I(Ta,null,null)]})};var xP=wP;const Z4=({columns:n,column:e,columnIndex:t,depth:r,expandIconProps:o,isScrolling:i,rowData:a,rowIndex:s,style:l,expandedRowKeys:c,ns:d,cellProps:f,expandColumnKey:m,indentSize:g,iconSize:v,rowKey:y},{slots:b})=>{const _=ui(l);if(e.placeholderSign===Ju)return I("div",{class:d.em("row-cell","placeholder"),style:_},null);const{cellRenderer:w,dataKey:T,dataGetter:k}=e,x=Lo(k)?k({columns:n,column:e,columnIndex:t,rowData:a,rowIndex:s}):zI(a,T??""),M=ks(f,{cellData:x,columns:n,column:e,columnIndex:t,rowIndex:s,rowData:a}),D={class:d.e("cell-text"),columns:n,column:e,columnIndex:t,cellData:x,isScrolling:i,rowData:a,rowIndex:s},A=U4(w),P=A?A(D):xe(b,"default",D,()=>[I(_P,D,null)]),$=[d.e("row-cell"),e.class,e.align===Gu.CENTER&&d.is("align-center"),e.align===Gu.RIGHT&&d.is("align-right")],B=s>=0&&m&&e.key===m,j=s>=0&&c.includes(a[y]);let U;const G=`margin-inline-start: ${r*g}px;`;return B&&(ys(o)?U=I(xP,kt(o,{class:[d.e("expand-icon"),d.is("expanded",j)],size:v,expanded:j,style:G,expandable:!0}),null):U=I("div",{style:[G,`width: ${v}px; height: ${v}px;`].join(" ")},null)),I("div",kt({class:$,style:_},M,{role:"cell"}),[U,P])};Z4.inheritAttrs=!1;var Db=Z4;const kP=st({class:String,columns:vc,columnsStyles:{type:Ce(Object),required:!0},headerIndex:Number,style:{type:Ce(Object)}}),CP=he({name:"ElTableV2HeaderRow",props:kP,setup(n,{slots:e}){return()=>{const{columns:t,columnsStyles:r,headerIndex:o,style:i}=n;let a=t.map((s,l)=>e.cell({columns:t,column:s,columnIndex:l,headerIndex:o,style:r[s.key]}));return e.header&&(a=e.header({cells:a.map(s=>Rt(s)&&s.length===1?s[0]:s),columns:t,headerIndex:o})),I("div",{class:n.class,style:i,role:"row"},[a])}}});var IP=CP;function EP(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!Qo(n)}const TP=({columns:n,columnsStyles:e,headerIndex:t,style:r,headerClass:o,headerProps:i,ns:a},{slots:s})=>{const l={columns:n,headerIndex:t},c=[a.e("header-row"),ks(o,l,""),{[a.is("customized")]:!!s.header}],d={...ks(i,l),columnsStyles:e,class:c,columns:n,headerIndex:t,style:r};return I(IP,d,EP(s)?s:{default:()=>[s]})};var MP=TP;const Mg=(n,{slots:e})=>xe(e,"default",n,()=>{var t,r;return[I("div",{class:n.class,title:(t=n.column)==null?void 0:t.title},[(r=n.column)==null?void 0:r.title])]});Mg.displayName="ElTableV2HeaderCell";Mg.inheritAttrs=!1;var OP=Mg;const AP=n=>{const{sortOrder:e}=n;return I(yt,{size:14,class:n.class},{default:()=>[e===qu.ASC?I(HI,null,null):I(UI,null,null)]})};var PP=AP;const $P=(n,{slots:e})=>{const{column:t,ns:r,style:o,onColumnSorted:i}=n,a=ui(o);if(t.placeholderSign===Ju)return I("div",{class:r.em("header-row-cell","placeholder"),style:a},null);const{headerCellRenderer:s,headerClass:l,sortable:c}=t,d={...n,class:r.e("header-cell-text")},f=U4(s),m=f?f(d):xe(e,"default",d,()=>[I(OP,d,null)]),{sortBy:g,sortState:v,headerCellProps:y}=n;let b,_;if(v){const k=v[t.key];b=!!Ev[k],_=b?k:qu.ASC}else b=t.key===g.key,_=b?g.order:qu.ASC;const w=[r.e("header-cell"),ks(l,n,""),t.align===Gu.CENTER&&r.is("align-center"),t.align===Gu.RIGHT&&r.is("align-right"),c&&r.is("sortable")],T={...ks(y,n),onClick:t.sortable?i:void 0,class:w,style:a,"data-key":t.key};return I("div",kt(T,{role:"columnheader"}),[m,c&&I(PP,{class:[r.e("sort-icon"),b&&r.is("sorting")],sortOrder:_},null)])};var Nb=$P;const eS=(n,{slots:e})=>{var t;return I("div",{class:n.class,style:n.style},[(t=e.default)==null?void 0:t.call(e)])};eS.displayName="ElTableV2Footer";var RP=eS;const tS=(n,{slots:e})=>{const t=xe(e,"default",{},()=>[I(H9,null,null)]);return I("div",{class:n.class,style:n.style},[t])};tS.displayName="ElTableV2Empty";var DP=tS;const nS=(n,{slots:e})=>{var t;return I("div",{class:n.class,style:n.style},[(t=e.default)==null?void 0:t.call(e)])};nS.displayName="ElTableV2Overlay";var NP=nS;function uu(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!Qo(n)}const FP="ElTableV2",LP=he({name:FP,props:KA,setup(n,{slots:e,expose:t}){const r=et("table-v2"),{columnsStyles:o,fixedColumnsOnLeft:i,fixedColumnsOnRight:a,mainColumns:s,mainTableHeight:l,fixedTableHeight:c,leftTableWidth:d,rightTableWidth:f,data:m,depthMap:g,expandedRowKeys:v,hasFixedColumns:y,mainTableRef:b,leftTableRef:_,rightTableRef:w,isDynamic:T,isResetting:k,isScrolling:x,bodyWidth:M,emptyStyle:D,rootStyle:A,headerWidth:P,footerHeight:$,showEmpty:B,scrollTo:j,scrollToLeft:U,scrollToTop:G,scrollToRow:N,getRowHeight:R,onColumnSorted:X,onRowHeightChange:te,onRowHovered:Y,onRowExpanded:re,onRowsRendered:Q,onScroll:Z,onVerticalScroll:q}=WA(n);return t({scrollTo:j,scrollToLeft:U,scrollToTop:G,scrollToRow:N}),Pn(kg,{ns:r,isResetting:k,isScrolling:x}),()=>{const{cache:le,cellProps:ye,estimatedRowHeight:Re,expandColumnKey:ze,fixedData:nt,headerHeight:Ge,headerClass:mt,headerProps:ut,headerCellProps:Pt,sortBy:gt,sortState:tt,rowHeight:Ct,rowClass:Bt,rowEventHandlers:Ne,rowKey:je,rowProps:Be,scrollbarAlwaysOn:qe,indentSize:Je,iconSize:ct,useIsScrolling:vt,vScrollbarSize:Se,width:He}=n,Tt=h(m),$t={cache:le,class:r.e("main"),columns:h(s),data:Tt,fixedData:nt,estimatedRowHeight:Re,bodyWidth:h(M)+Se,headerHeight:Ge,headerWidth:h(P),height:h(l),mainTableRef:b,rowKey:je,rowHeight:Ct,scrollbarAlwaysOn:qe,scrollbarStartGap:2,scrollbarEndGap:Se,useIsScrolling:vt,width:He,getRowHeight:R,onRowsRendered:Q,onScroll:Z},wt=h(d),me=h(c),ce={cache:le,class:r.e("left"),columns:h(i),data:Tt,estimatedRowHeight:Re,leftTableRef:_,rowHeight:Ct,bodyWidth:wt,headerWidth:wt,headerHeight:Ge,height:me,rowKey:je,scrollbarAlwaysOn:qe,scrollbarStartGap:2,scrollbarEndGap:Se,useIsScrolling:vt,width:wt,getRowHeight:R,onScroll:q},Te=h(f)+Se,de={cache:le,class:r.e("right"),columns:h(a),data:Tt,estimatedRowHeight:Re,rightTableRef:w,rowHeight:Ct,bodyWidth:Te,headerWidth:Te,headerHeight:Ge,height:me,rowKey:je,scrollbarAlwaysOn:qe,scrollbarStartGap:2,scrollbarEndGap:Se,width:Te,style:`--${h(r.namespace)}-table-scrollbar-size: ${Se}px`,useIsScrolling:vt,getRowHeight:R,onScroll:q},fe=h(o),ne={ns:r,depthMap:h(g),columnsStyles:fe,expandColumnKey:ze,expandedRowKeys:h(v),estimatedRowHeight:Re,hasFixedColumns:h(y),rowProps:Be,rowClass:Bt,rowKey:je,rowEventHandlers:Ne,onRowHovered:Y,onRowExpanded:re,onRowHeightChange:te},W={cellProps:ye,expandColumnKey:ze,indentSize:Je,iconSize:ct,rowKey:je,expandedRowKeys:h(v),ns:r},_e={ns:r,headerClass:mt,headerProps:ut,columnsStyles:fe},ke={ns:r,sortBy:gt,sortState:tt,headerCellProps:Pt,onColumnSorted:X},Ee={row:dt=>I(SP,kt(dt,ne),{row:e.row,cell:pe=>{let Ae;return e.cell?I(Db,kt(pe,W,{style:fe[pe.column.key]}),uu(Ae=e.cell(pe))?Ae:{default:()=>[Ae]}):I(Db,kt(pe,W,{style:fe[pe.column.key]}),null)}}),header:dt=>I(MP,kt(dt,_e),{header:e.header,cell:pe=>{let Ae;return e["header-cell"]?I(Nb,kt(pe,ke,{style:fe[pe.column.key]}),uu(Ae=e["header-cell"](pe))?Ae:{default:()=>[Ae]}):I(Nb,kt(pe,ke,{style:fe[pe.column.key]}),null)}})},Ke=[n.class,r.b(),r.e("root"),{[r.is("dynamic")]:h(T)}],St={class:r.e("footer"),style:h($)};return I("div",{class:Ke,style:h(A)},[I(sP,$t,uu(Ee)?Ee:{default:()=>[Ee]}),I(cP,ce,uu(Ee)?Ee:{default:()=>[Ee]}),I(pP,de,uu(Ee)?Ee:{default:()=>[Ee]}),e.footer&&I(RP,St,{default:e.footer}),h(B)&&I(DP,{class:r.e("empty"),style:h(D)},{default:e.empty}),e.overlay&&I(NP,{class:r.e("overlay")},{default:e.overlay})])}}});var BP=LP;const VP=st({disableWidth:Boolean,disableHeight:Boolean,onResize:{type:Ce(Function)}}),zP=n=>{const e=H(),t=H(0),r=H(0);let o;return Ht(()=>{o=Ku(e,([i])=>{const{width:a,height:s}=i.contentRect,{paddingLeft:l,paddingRight:c,paddingTop:d,paddingBottom:f}=getComputedStyle(i.target),m=Number.parseInt(l)||0,g=Number.parseInt(c)||0,v=Number.parseInt(d)||0,y=Number.parseInt(f)||0;t.value=a-m-g,r.value=s-v-y}).stop}),Br(()=>{o==null||o()}),Me([t,r],([i,a])=>{var s;(s=n.onResize)==null||s.call(n,{width:i,height:a})}),{sizer:e,width:t,height:r}},HP=he({name:"ElAutoResizer",props:VP,setup(n,{slots:e}){const t=et("auto-resizer"),{height:r,width:o,sizer:i}=zP(n),a={width:"100%",height:"100%"};return()=>{var s;return I("div",{ref:i,class:t.b(),style:a},[(s=e.default)==null?void 0:s.call(e,{height:r.value,width:o.value})])}}});var UP=HP;const WP=jn(BP),jP=jn(UP),kp=Symbol("tabsRootContextKey"),KP=st({tabs:{type:Ce(Array),default:()=>Fo([])}}),rS="ElTabBar",YP=he({name:rS}),qP=he({...YP,props:KP,setup(n,{expose:e}){const t=n,r=Kn(),o=on(kp);o||to(rS,"<el-tabs><el-tab-bar /></el-tabs>");const i=et("tabs"),a=H(),s=H(),l=()=>{let g=0,v=0;const y=["top","bottom"].includes(o.props.tabPosition)?"width":"height",b=y==="width"?"x":"y",_=b==="x"?"left":"top";return t.tabs.every(w=>{var T,k;const x=(k=(T=r.parent)==null?void 0:T.refs)==null?void 0:k[`tab-${w.uid}`];if(!x)return!1;if(!w.active)return!0;g=x[`offset${oi(_)}`],v=x[`client${oi(y)}`];const M=window.getComputedStyle(x);return y==="width"&&(v-=Number.parseFloat(M.paddingLeft)+Number.parseFloat(M.paddingRight),g+=Number.parseFloat(M.paddingLeft)),!1}),{[y]:`${v}px`,transform:`translate${oi(b)}(${g}px)`}},c=()=>s.value=l(),d=[],f=()=>{var g;d.forEach(y=>y.stop()),d.length=0;const v=(g=r.parent)==null?void 0:g.refs;if(v){for(const y in v)if(y.startsWith("tab-")){const b=v[y];b&&d.push(Ku(b,c))}}};Me(()=>t.tabs,async()=>{await Xt(),c(),f()},{immediate:!0});const m=Ku(a,()=>c());return Br(()=>{d.forEach(g=>g.stop()),d.length=0,m.stop()}),e({ref:a,update:c}),(g,v)=>(C(),F("div",{ref_key:"barRef",ref:a,class:ee([h(i).e("active-bar"),h(i).is(h(o).props.tabPosition)]),style:Sn(s.value)},null,6))}});var GP=At(qP,[["__file","tab-bar.vue"]]);const JP=st({panes:{type:Ce(Array),default:()=>Fo([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),XP={tabClick:(n,e,t)=>t instanceof Event,tabRemove:(n,e)=>e instanceof Event},Fb="ElTabNav",QP=he({name:Fb,props:JP,emits:XP,setup(n,{expose:e,emit:t}){const r=on(kp);r||to(Fb,"<el-tabs><tab-nav /></el-tabs>");const o=et("tabs"),i=WI(),a=jI(),s=H(),l=H(),c=H(),d=H(),f=H(!1),m=H(0),g=H(!1),v=H(!0),y=O(()=>["top","bottom"].includes(r.props.tabPosition)?"width":"height"),b=O(()=>({transform:`translate${y.value==="width"?"X":"Y"}(-${m.value}px)`})),_=()=>{if(!s.value)return;const A=s.value[`offset${oi(y.value)}`],P=m.value;if(!P)return;const $=P>A?P-A:0;m.value=$},w=()=>{if(!s.value||!l.value)return;const A=l.value[`offset${oi(y.value)}`],P=s.value[`offset${oi(y.value)}`],$=m.value;if(A-$<=P)return;const B=A-$>P*2?$+P:A-P;m.value=B},T=async()=>{const A=l.value;if(!f.value||!c.value||!s.value||!A)return;await Xt();const P=c.value.querySelector(".is-active");if(!P)return;const $=s.value,B=["top","bottom"].includes(r.props.tabPosition),j=P.getBoundingClientRect(),U=$.getBoundingClientRect(),G=B?A.offsetWidth-U.width:A.offsetHeight-U.height,N=m.value;let R=N;B?(j.left<U.left&&(R=N-(U.left-j.left)),j.right>U.right&&(R=N+j.right-U.right)):(j.top<U.top&&(R=N-(U.top-j.top)),j.bottom>U.bottom&&(R=N+(j.bottom-U.bottom))),R=Math.max(R,0),m.value=Math.min(R,G)},k=()=>{var A;if(!l.value||!s.value)return;n.stretch&&((A=d.value)==null||A.update());const P=l.value[`offset${oi(y.value)}`],$=s.value[`offset${oi(y.value)}`],B=m.value;$<P?(f.value=f.value||{},f.value.prev=B,f.value.next=B+$<P,P-B<$&&(m.value=P-$)):(f.value=!1,B>0&&(m.value=0))},x=A=>{let P=0;switch(A.code){case Lt.left:case Lt.up:P=-1;break;case Lt.right:case Lt.down:P=1;break;default:return}const $=Array.from(A.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));let j=$.indexOf(A.target)+P;j<0?j=$.length-1:j>=$.length&&(j=0),$[j].focus({preventScroll:!0}),$[j].click(),M()},M=()=>{v.value&&(g.value=!0)},D=()=>g.value=!1;return Me(i,A=>{A==="hidden"?v.value=!1:A==="visible"&&setTimeout(()=>v.value=!0,50)}),Me(a,A=>{A?setTimeout(()=>v.value=!0,50):v.value=!1}),Ku(c,k),Ht(()=>setTimeout(()=>T(),0)),pg(()=>k()),e({scrollToActiveTab:T,removeFocus:D}),()=>{const A=f.value?[I("span",{class:[o.e("nav-prev"),o.is("disabled",!f.value.prev)],onClick:_},[I(yt,null,{default:()=>[I(ju,null,null)]})]),I("span",{class:[o.e("nav-next"),o.is("disabled",!f.value.next)],onClick:w},[I(yt,null,{default:()=>[I(Ta,null,null)]})])]:null,P=n.panes.map(($,B)=>{var j,U,G,N;const R=$.uid,X=$.props.disabled,te=(U=(j=$.props.name)!=null?j:$.index)!=null?U:`${B}`,Y=!X&&($.isClosable||n.editable);$.index=`${B}`;const re=Y?I(yt,{class:"is-icon-close",onClick:q=>t("tabRemove",$,q)},{default:()=>[I(mg,null,null)]}):null,Q=((N=(G=$.slots).label)==null?void 0:N.call(G))||$.props.label,Z=!X&&$.active?0:-1;return I("div",{ref:`tab-${R}`,class:[o.e("item"),o.is(r.props.tabPosition),o.is("active",$.active),o.is("disabled",X),o.is("closable",Y),o.is("focus",g.value)],id:`tab-${te}`,key:`tab-${R}`,"aria-controls":`pane-${te}`,role:"tab","aria-selected":$.active,tabindex:Z,onFocus:()=>M(),onBlur:()=>D(),onClick:q=>{D(),t("tabClick",$,te,q)},onKeydown:q=>{Y&&(q.code===Lt.delete||q.code===Lt.backspace)&&t("tabRemove",$,q)}},[Q,re])});return I("div",{ref:c,class:[o.e("nav-wrap"),o.is("scrollable",!!f.value),o.is(r.props.tabPosition)]},[A,I("div",{class:o.e("nav-scroll"),ref:s},[I("div",{class:[o.e("nav"),o.is(r.props.tabPosition),o.is("stretch",n.stretch&&["top","bottom"].includes(r.props.tabPosition))],ref:l,style:b.value,role:"tablist",onKeydown:x},[n.type?null:I(GP,{ref:d,tabs:[...n.panes]},null),P])])])}}}),ZP=st({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:Ce(Function),default:()=>!0},stretch:Boolean}),ym=n=>tr(n)||Kt(n),e$={[Gn]:n=>ym(n),tabClick:(n,e)=>e instanceof Event,tabChange:n=>ym(n),edit:(n,e)=>["remove","add"].includes(e),tabRemove:n=>ym(n),tabAdd:()=>!0},t$=he({name:"ElTabs",props:ZP,emits:e$,setup(n,{emit:e,slots:t,expose:r}){var o;const i=et("tabs"),a=O(()=>["left","right"].includes(n.tabPosition)),{children:s,addChild:l,removeChild:c}=rT(Kn(),"ElTabPane"),d=H(),f=H((o=n.modelValue)!=null?o:"0"),m=async(_,w=!1)=>{var T,k;if(!(f.value===_||yo(_)))try{let x;if(n.beforeLeave){const M=n.beforeLeave(_,f.value);x=M instanceof Promise?await M:M}else x=!0;x!==!1&&(f.value=_,w&&(e(Gn,_),e("tabChange",_)),(k=(T=d.value)==null?void 0:T.removeFocus)==null||k.call(T))}catch{}},g=(_,w,T)=>{_.props.disabled||(m(w,!0),e("tabClick",_,T))},v=(_,w)=>{_.props.disabled||yo(_.props.name)||(w.stopPropagation(),e("edit",_.props.name,"remove"),e("tabRemove",_.props.name))},y=()=>{e("edit",void 0,"add"),e("tabAdd")};Me(()=>n.modelValue,_=>m(_)),Me(f,async()=>{var _;await Xt(),(_=d.value)==null||_.scrollToActiveTab()}),Pn(kp,{props:n,currentName:f,registerPane:_=>{s.value.push(_)},sortPane:l,unregisterPane:c}),r({currentName:f});const b=({render:_})=>_();return()=>{const _=t["add-icon"],w=n.editable||n.addable?I("div",{class:[i.e("new-tab"),a.value&&i.e("new-tab-vertical")],tabindex:"0",onClick:y,onKeydown:x=>{[Lt.enter,Lt.numpadEnter].includes(x.code)&&y()}},[_?xe(t,"add-icon"):I(yt,{class:i.is("icon-plus")},{default:()=>[I(Y3,null,null)]})]):null,T=I("div",{class:[i.e("header"),a.value&&i.e("header-vertical"),i.is(n.tabPosition)]},[I(b,{render:()=>{const x=s.value.some(M=>M.slots.label);return I(QP,{ref:d,currentName:f.value,editable:n.editable,type:n.type,panes:s.value,stretch:n.stretch,onTabClick:g,onTabRemove:v},{$stable:!x})}},null),w]),k=I("div",{class:i.e("content")},[xe(t,"default")]);return I("div",{class:[i.b(),i.m(n.tabPosition),{[i.m("card")]:n.type==="card",[i.m("border-card")]:n.type==="border-card"}]},[k,T])}}});var n$=t$;const r$=st({label:{type:String,default:""},name:{type:[String,Number]},closable:Boolean,disabled:Boolean,lazy:Boolean}),oS="ElTabPane",o$=he({name:oS}),a$=he({...o$,props:r$,setup(n){const e=n,t=Kn(),r=Mi(),o=on(kp);o||to(oS,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const i=et("tab-pane"),a=H(),s=O(()=>e.closable||o.props.closable),l=X0(()=>{var g;return o.currentName.value===((g=e.name)!=null?g:a.value)}),c=H(l.value),d=O(()=>{var g;return(g=e.name)!=null?g:a.value}),f=X0(()=>!e.lazy||c.value||l.value);Me(l,g=>{g&&(c.value=!0)});const m=Tn({uid:t.uid,slots:r,props:e,paneName:d,active:l,index:a,isClosable:s});return o.registerPane(m),Ht(()=>{o.sortPane(m)}),xs(()=>{o.unregisterPane(m.uid)}),(g,v)=>h(f)?En((C(),F("div",{key:0,id:`pane-${h(d)}`,class:ee(h(i).b()),role:"tabpanel","aria-hidden":!h(l),"aria-labelledby":`tab-${h(d)}`},[xe(g.$slots,"default")],10,["id","aria-hidden","aria-labelledby"])),[[vo,h(l)]]):ie("v-if",!0)}});var aS=At(a$,[["__file","tab-pane.vue"]]);const i$=jn(n$,{TabPane:aS}),s$=La(aS),iS=Symbol("uploadContextKey"),l$="ElUpload";class u$ extends Error{constructor(e,t,r,o){super(e),this.name="UploadAjaxError",this.status=t,this.method=r,this.url=o}}function Lb(n,e,t){let r;return t.response?r=`${t.response.error||t.response}`:t.responseText?r=`${t.responseText}`:r=`fail to ${e.method} ${n} ${t.status}`,new u$(r,t.status,e.method,n)}function c$(n){const e=n.responseText||n.response;if(!e)return e;try{return JSON.parse(e)}catch{return e}}const d$=n=>{typeof XMLHttpRequest>"u"&&to(l$,"XMLHttpRequest is undefined");const e=new XMLHttpRequest,t=n.action;e.upload&&e.upload.addEventListener("progress",i=>{const a=i;a.percent=i.total>0?i.loaded/i.total*100:0,n.onProgress(a)});const r=new FormData;if(n.data)for(const[i,a]of Object.entries(n.data))Rt(a)&&a.length?r.append(i,...a):r.append(i,a);r.append(n.filename,n.file,n.file.name),e.addEventListener("error",()=>{n.onError(Lb(t,n,e))}),e.addEventListener("load",()=>{if(e.status<200||e.status>=300)return n.onError(Lb(t,n,e));n.onSuccess(c$(e))}),e.open(n.method,t,!0),n.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);const o=n.headers||{};if(o instanceof Headers)o.forEach((i,a)=>e.setRequestHeader(a,i));else for(const[i,a]of Object.entries(o))Ma(a)||e.setRequestHeader(i,String(a));return e.send(r),e},sS=["text","picture","picture-card"];let f$=1;const Mv=()=>Date.now()+f$++,lS=st({action:{type:String,default:"#"},headers:{type:Ce(Object)},method:{type:String,default:"post"},data:{type:Ce([Object,Function,Promise]),default:()=>Fo({})},multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:Ce(Array),default:()=>Fo([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:sS,default:"text"},httpRequest:{type:Ce(Function),default:d$},disabled:Boolean,limit:Number}),p$=st({...lS,beforeUpload:{type:Ce(Function),default:zn},beforeRemove:{type:Ce(Function)},onRemove:{type:Ce(Function),default:zn},onChange:{type:Ce(Function),default:zn},onPreview:{type:Ce(Function),default:zn},onSuccess:{type:Ce(Function),default:zn},onProgress:{type:Ce(Function),default:zn},onError:{type:Ce(Function),default:zn},onExceed:{type:Ce(Function),default:zn},crossorigin:{type:Ce(String)}}),h$=st({files:{type:Ce(Array),default:()=>Fo([])},disabled:{type:Boolean,default:!1},handlePreview:{type:Ce(Function),default:zn},listType:{type:String,values:sS,default:"text"},crossorigin:{type:Ce(String)}}),m$={remove:n=>!!n},v$=he({name:"ElUploadList"}),g$=he({...v$,props:h$,emits:m$,setup(n,{emit:e}){const t=n,{t:r}=$n(),o=et("upload"),i=et("icon"),a=et("list"),s=Fa(),l=H(!1),c=O(()=>[o.b("list"),o.bm("list",t.listType),o.is("disabled",t.disabled)]),d=f=>{e("remove",f)};return(f,m)=>(C(),se(GI,{tag:"ul",class:ee(h(c)),name:h(a).b()},{default:V(()=>[(C(!0),F($e,null,ot(f.files,(g,v)=>(C(),F("li",{key:g.uid||g.name,class:ee([h(o).be("list","item"),h(o).is(g.status),{focusing:l.value}]),tabindex:"0",onKeydown:Ir(y=>!h(s)&&d(g),["delete"]),onFocus:y=>l.value=!0,onBlur:y=>l.value=!1,onClick:y=>l.value=!1},[xe(f.$slots,"default",{file:g,index:v},()=>[f.listType==="picture"||g.status!=="uploading"&&f.listType==="picture-card"?(C(),F("img",{key:0,class:ee(h(o).be("list","item-thumbnail")),src:g.url,crossorigin:f.crossorigin,alt:""},null,10,["src","crossorigin"])):ie("v-if",!0),g.status==="uploading"||f.listType!=="picture-card"?(C(),F("div",{key:1,class:ee(h(o).be("list","item-info"))},[z("a",{class:ee(h(o).be("list","item-name")),onClick:lt(y=>f.handlePreview(g),["prevent"])},[I(h(yt),{class:ee(h(i).m("document"))},{default:V(()=>[I(h(KI))]),_:1},8,["class"]),z("span",{class:ee(h(o).be("list","item-file-name")),title:g.name},ae(g.name),11,["title"])],10,["onClick"]),g.status==="uploading"?(C(),se(h(cA),{key:0,type:f.listType==="picture-card"?"circle":"line","stroke-width":f.listType==="picture-card"?6:2,percentage:Number(g.percentage),style:Sn(f.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):ie("v-if",!0)],2)):ie("v-if",!0),z("label",{class:ee(h(o).be("list","item-status-label"))},[f.listType==="text"?(C(),se(h(yt),{key:0,class:ee([h(i).m("upload-success"),h(i).m("circle-check")])},{default:V(()=>[I(h(q3))]),_:1},8,["class"])):["picture-card","picture"].includes(f.listType)?(C(),se(h(yt),{key:1,class:ee([h(i).m("upload-success"),h(i).m("check")])},{default:V(()=>[I(h(G3))]),_:1},8,["class"])):ie("v-if",!0)],2),h(s)?ie("v-if",!0):(C(),se(h(yt),{key:2,class:ee(h(i).m("close")),onClick:y=>d(g)},{default:V(()=>[I(h(mg))]),_:2},1032,["class","onClick"])),ie(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),ie(" This is a bug which needs to be fixed "),ie(" TODO: Fix the incorrect navigation interaction "),h(s)?ie("v-if",!0):(C(),F("i",{key:3,class:ee(h(i).m("close-tip"))},ae(h(r)("el.upload.deleteTip")),3)),f.listType==="picture-card"?(C(),F("span",{key:4,class:ee(h(o).be("list","item-actions"))},[z("span",{class:ee(h(o).be("list","item-preview")),onClick:y=>f.handlePreview(g)},[I(h(yt),{class:ee(h(i).m("zoom-in"))},{default:V(()=>[I(h(YI))]),_:1},8,["class"])],10,["onClick"]),h(s)?ie("v-if",!0):(C(),F("span",{key:0,class:ee(h(o).be("list","item-delete")),onClick:y=>d(g)},[I(h(yt),{class:ee(h(i).m("delete"))},{default:V(()=>[I(h(qI))]),_:1},8,["class"])],10,["onClick"]))],2)):ie("v-if",!0)])],42,["onKeydown","onFocus","onBlur","onClick"]))),128)),xe(f.$slots,"append")]),_:3},8,["class","name"]))}});var Bb=At(g$,[["__file","upload-list.vue"]]);const y$=st({disabled:{type:Boolean,default:!1}}),b$={file:n=>Rt(n)},uS="ElUploadDrag",S$=he({name:uS}),_$=he({...S$,props:y$,emits:b$,setup(n,{emit:e}){on(iS)||to(uS,"usage: <el-upload><el-upload-dragger /></el-upload>");const r=et("upload"),o=H(!1),i=Fa(),a=l=>{if(i.value)return;o.value=!1,l.stopPropagation();const c=Array.from(l.dataTransfer.files);e("file",c)},s=()=>{i.value||(o.value=!0)};return(l,c)=>(C(),F("div",{class:ee([h(r).b("dragger"),h(r).is("dragover",o.value)]),onDrop:lt(a,["prevent"]),onDragover:lt(s,["prevent"]),onDragleave:lt(d=>o.value=!1,["prevent"])},[xe(l.$slots,"default")],42,["onDrop","onDragover","onDragleave"]))}});var w$=At(_$,[["__file","upload-dragger.vue"]]);const x$=st({...lS,beforeUpload:{type:Ce(Function),default:zn},onRemove:{type:Ce(Function),default:zn},onStart:{type:Ce(Function),default:zn},onSuccess:{type:Ce(Function),default:zn},onProgress:{type:Ce(Function),default:zn},onError:{type:Ce(Function),default:zn},onExceed:{type:Ce(Function),default:zn}}),k$=he({name:"ElUploadContent",inheritAttrs:!1}),C$=he({...k$,props:x$,setup(n,{expose:e}){const t=n,r=et("upload"),o=Fa(),i=Fr({}),a=Fr(),s=y=>{if(y.length===0)return;const{autoUpload:b,limit:_,fileList:w,multiple:T,onStart:k,onExceed:x}=t;if(_&&w.length+y.length>_){x(y,w);return}T||(y=y.slice(0,1));for(const M of y){const D=M;D.uid=Mv(),k(D),b&&l(D)}},l=async y=>{if(a.value.value="",!t.beforeUpload)return d(y);let b,_={};try{const T=t.data,k=t.beforeUpload(y);_=Q0(t.data)?eb(t.data):t.data,b=await k,Q0(t.data)&&bp(T,_)&&(_=eb(t.data))}catch{b=!1}if(b===!1){t.onRemove(y);return}let w=y;b instanceof Blob&&(b instanceof File?w=b:w=new File([b],y.name,{type:y.type})),d(Object.assign(w,{uid:y.uid}),_)},c=async(y,b)=>Lo(y)?y(b):y,d=async(y,b)=>{const{headers:_,data:w,method:T,withCredentials:k,name:x,action:M,onProgress:D,onSuccess:A,onError:P,httpRequest:$}=t;try{b=await c(b??w,y)}catch{t.onRemove(y);return}const{uid:B}=y,j={headers:_||{},withCredentials:k,file:y,data:b,method:T,filename:x,action:M,onProgress:G=>{D(G,y)},onSuccess:G=>{A(G,y),delete i.value[B]},onError:G=>{P(G,y),delete i.value[B]}},U=$(j);i.value[B]=U,U instanceof Promise&&U.then(j.onSuccess,j.onError)},f=y=>{const b=y.target.files;b&&s(Array.from(b))},m=()=>{o.value||(a.value.value="",a.value.click())},g=()=>{m()};return e({abort:y=>{JI(i.value).filter(y?([_])=>String(y.uid)===_:()=>!0).forEach(([_,w])=>{w instanceof XMLHttpRequest&&w.abort(),delete i.value[_]})},upload:l}),(y,b)=>(C(),F("div",{class:ee([h(r).b(),h(r).m(y.listType),h(r).is("drag",y.drag),h(r).is("disabled",h(o))]),tabindex:h(o)?"-1":"0",onClick:m,onKeydown:Ir(lt(g,["self"]),["enter","space"])},[y.drag?(C(),se(w$,{key:0,disabled:h(o),onFile:s},{default:V(()=>[xe(y.$slots,"default")]),_:3},8,["disabled"])):xe(y.$slots,"default",{key:1}),z("input",{ref_key:"inputRef",ref:a,class:ee(h(r).e("input")),name:y.name,disabled:h(o),multiple:y.multiple,accept:y.accept,type:"file",onChange:f,onClick:lt(()=>{},["stop"])},null,42,["name","disabled","multiple","accept","onClick"])],42,["tabindex","onKeydown"]))}});var Vb=At(C$,[["__file","upload-content.vue"]]);const zb="ElUpload",Hb=n=>{var e;(e=n.url)!=null&&e.startsWith("blob:")&&URL.revokeObjectURL(n.url)},I$=(n,e)=>{const t=XI(n,"fileList",void 0,{passive:!0}),r=g=>t.value.find(v=>v.uid===g.uid);function o(g){var v;(v=e.value)==null||v.abort(g)}function i(g=["ready","uploading","success","fail"]){t.value=t.value.filter(v=>!g.includes(v.status))}function a(g){t.value=t.value.filter(v=>v.uid!==g.uid)}const s=(g,v)=>{const y=r(v);y&&(console.error(g),y.status="fail",a(y),n.onError(g,y,t.value),n.onChange(y,t.value))},l=(g,v)=>{const y=r(v);y&&(n.onProgress(g,y,t.value),y.status="uploading",y.percentage=Math.round(g.percent))},c=(g,v)=>{const y=r(v);y&&(y.status="success",y.response=g,n.onSuccess(g,y,t.value),n.onChange(y,t.value))},d=g=>{Ma(g.uid)&&(g.uid=Mv());const v={name:g.name,percentage:0,status:"ready",size:g.size,raw:g,uid:g.uid};if(n.listType==="picture-card"||n.listType==="picture")try{v.url=URL.createObjectURL(g)}catch(y){Da(zb,y.message),n.onError(y,v,t.value)}t.value=[...t.value,v],n.onChange(v,t.value)},f=async g=>{const v=g instanceof File?r(g):g;v||to(zb,"file to be removed not found");const y=b=>{o(b),a(b),n.onRemove(b,t.value),Hb(b)};n.beforeRemove?await n.beforeRemove(v,t.value)!==!1&&y(v):y(v)};function m(){t.value.filter(({status:g})=>g==="ready").forEach(({raw:g})=>{var v;return g&&((v=e.value)==null?void 0:v.upload(g))})}return Me(()=>n.listType,g=>{g!=="picture-card"&&g!=="picture"||(t.value=t.value.map(v=>{const{raw:y,url:b}=v;if(!b&&y)try{v.url=URL.createObjectURL(y)}catch(_){n.onError(_,v,t.value)}return v}))}),Me(t,g=>{for(const v of g)v.uid||(v.uid=Mv()),v.status||(v.status="success")},{immediate:!0,deep:!0}),{uploadFiles:t,abort:o,clearFiles:i,handleError:s,handleProgress:l,handleStart:d,handleSuccess:c,handleRemove:f,submit:m,revokeFileObjectURL:Hb}},E$=he({name:"ElUpload"}),T$=he({...E$,props:p$,setup(n,{expose:e}){const t=n,r=Fa(),o=Fr(),{abort:i,submit:a,clearFiles:s,uploadFiles:l,handleStart:c,handleError:d,handleRemove:f,handleSuccess:m,handleProgress:g,revokeFileObjectURL:v}=I$(t,o),y=O(()=>t.listType==="picture-card"),b=O(()=>({...t,fileList:l.value,onStart:c,onProgress:g,onSuccess:m,onError:d,onRemove:f}));return Br(()=>{l.value.forEach(v)}),Pn(iS,{accept:er(t,"accept")}),e({abort:i,submit:a,clearFiles:s,handleStart:c,handleRemove:f}),(_,w)=>(C(),F("div",null,[h(y)&&_.showFileList?(C(),se(Bb,{key:0,disabled:h(r),"list-type":_.listType,files:h(l),crossorigin:_.crossorigin,"handle-preview":_.onPreview,onRemove:h(f)},ws({append:V(()=>[I(Vb,kt({ref_key:"uploadRef",ref:o},h(b)),{default:V(()=>[_.$slots.trigger?xe(_.$slots,"trigger",{key:0}):ie("v-if",!0),!_.$slots.trigger&&_.$slots.default?xe(_.$slots,"default",{key:1}):ie("v-if",!0)]),_:3},16)]),_:2},[_.$slots.file?{name:"default",fn:V(({file:T,index:k})=>[xe(_.$slots,"file",{file:T,index:k})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):ie("v-if",!0),!h(y)||h(y)&&!_.showFileList?(C(),se(Vb,kt({key:1,ref_key:"uploadRef",ref:o},h(b)),{default:V(()=>[_.$slots.trigger?xe(_.$slots,"trigger",{key:0}):ie("v-if",!0),!_.$slots.trigger&&_.$slots.default?xe(_.$slots,"default",{key:1}):ie("v-if",!0)]),_:3},16)):ie("v-if",!0),_.$slots.trigger?xe(_.$slots,"default",{key:2}):ie("v-if",!0),xe(_.$slots,"tip"),!h(y)&&_.showFileList?(C(),se(Bb,{key:3,disabled:h(r),"list-type":_.listType,files:h(l),crossorigin:_.crossorigin,"handle-preview":_.onPreview,onRemove:h(f)},ws({_:2},[_.$slots.file?{name:"default",fn:V(({file:T,index:k})=>[xe(_.$slots,"file",{file:T,index:k})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):ie("v-if",!0)]))}});var M$=At(T$,[["__file","upload.vue"]]);const O$=jn(M$),A$={xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",fill:"none"};function P$(n,e){return C(),F("svg",A$,e[0]||(e[0]=[z("rect",{width:"40",height:"40",fill:"#F4F6F9",rx:"20"},null,-1)]))}const $$={render:P$},R$={xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",fill:"none"};function D$(n,e){return C(),F("svg",R$,e[0]||(e[0]=[z("rect",{width:"40",height:"40",fill:"#232E3C",rx:"20"},null,-1)]))}const N$={render:D$},F$={xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",fill:"none"};function L$(n,e){return C(),F("svg",F$,e[0]||(e[0]=[Ba('<g fill="#394452"><path d="M13.955 20.316a6.047 6.047 0 1 1 12.094 0 6.047 6.047 0 0 1-12.094 0"></path><path fill-rule="evenodd" d="M20.002 33.316a.907.907 0 0 1-.907-.907V29.99a.907.907 0 1 1 1.814 0v2.419a.907.907 0 0 1-.907.907m13-13c0 .5-.406.907-.907.907h-2.419a.907.907 0 0 1 0-1.814h2.419c.5 0 .907.406.907.907m-21.768 0c0 .5-.406.907-.906.907h-2.42a.907.907 0 0 1 0-1.814h2.42c.5 0 .907.406.907.907m8.768-8.767a.907.907 0 0 1-.907-.907v-2.42a.907.907 0 1 1 1.814 0v2.42c0 .5-.406.907-.907.907" clip-rule="evenodd"></path><g opacity=".6"><path d="M30.077 30.334a.907.907 0 0 1-1.282.058l-2.687-2.457a.907.907 0 1 1 1.224-1.339l2.687 2.457c.37.338.396.912.058 1.281M9.927 30.334a.907.907 0 0 1 .057-1.281l2.687-2.457a.907.907 0 0 1 1.224 1.339l-2.687 2.457a.907.907 0 0 1-1.281-.058M13.924 14.24a.907.907 0 0 1-1.282 0l-2.687-2.688a.907.907 0 0 1 1.282-1.283l2.687 2.688a.907.907 0 0 1 0 1.282M26.079 14.24a.907.907 0 0 1 0-1.283l2.687-2.688a.907.907 0 0 1 1.283 1.283l-2.687 2.687a.907.907 0 0 1-1.283 0"></path></g></g>',1)]))}const B$={render:L$},V$={xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",fill:"none"};function z$(n,e){return C(),F("svg",V$,e[0]||(e[0]=[z("path",{fill:"#DBDEE3",d:"M21.045 19.374c2.26 3.912 1.293 8.818-2.045 11.657a10.4 10.4 0 0 0 5.131-1.397c4.977-2.874 6.69-9.21 3.828-14.165-2.86-4.956-9.204-6.64-14.181-3.767a10.35 10.35 0 0 0-3.636 3.534c4.1-1.368 8.663.258 10.903 4.138"},null,-1),z("path",{fill:"#fff",d:"M21.045 19.373c2.26 3.912 1.293 8.817-2.045 11.657a10.4 10.4 0 0 0 5.131-1.397c4.977-2.874 6.69-9.21 3.828-14.165-2.86-4.956-9.204-6.64-14.181-3.767a10.35 10.35 0 0 0-3.636 3.534c4.1-1.368 8.663.258 10.903 4.138"},null,-1)]))}const H$={render:z$},U$=["aria-label"],W$={class:"ivyforms-theme-switch__images"},j$={class:"ivyforms-theme-switch__images__item"},K$={class:"ivyforms-theme-switch__images__item"},Y$=he({__name:"IvyThemeSwitch",props:{modelValue:{default:"light"},ariaLabel:{default:""}},emits:["update:modelValue"],setup(n,{emit:e}){const{getLabel:t}=at(),r=n,o=e,i=O({get(){return r.modelValue},set(s){o("update:modelValue",s)}});function a(){i.value=i.value==="light"?"dark":"light"}return(s,l)=>(C(),F("div",{class:ee(["ivyforms-theme-switch",{"is-dark":i.value==="dark"}]),"aria-label":r.ariaLabel||h(t)("theme_switch"),role:"button",onClick:a},[I(h($$),{class:"ivyforms-theme-switch__background ivyforms-theme-switch__background--light"}),I(h(N$),{class:"ivyforms-theme-switch__background ivyforms-theme-switch__background--dark"}),z("div",W$,[z("div",j$,[I(h(B$))]),z("div",K$,[I(h(H$))])])],10,U$))}}),q$={},G$={xmlns:"http://www.w3.org/2000/svg",width:"2",height:"30",viewBox:"0 0 2 30",fill:"none"};function J$(n,e){return C(),F("svg",G$,e[0]||(e[0]=[z("path",{d:"M1 1L1 29",stroke:"#5A6C7E","stroke-opacity":"0.2","stroke-linecap":"round"},null,-1)]))}const zs=bt(q$,[["render",J$]]),X$={xmlns:"http://www.w3.org/2000/svg",width:"147",height:"32",fill:"none"};function Q$(n,e){return C(),F("svg",X$,e[0]||(e[0]=[Ba('<path fill="#43D9B8" d="M17.754 13.682q0-5.82 2.952-8.417 3.03-2.598 9.714-2.598H32v9.82q0 12.081-6.89 15.485-2.41 1.194-5.776 1.195h-1.58zM12.64 29.167q-6.501 0-9.687-4.547Q0 20.411 0 12.487v-9.82h1.58q6.682 0 9.714 2.598 2.952 2.598 2.952 8.417v15.485z"></path><g fill="#fff" opacity=".6" style="mix-blend-mode:luminosity;"><path d="M18.395 8.957q-.642 2.013-.641 4.725v15.485h1.58q3.367 0 5.776-1.196 5.523-2.728 6.619-11.031c-2.687-4.261-7.58-7.313-13.334-7.983M13.605 8.957q.642 2.013.641 4.725v15.485h-1.605q-6.502 0-9.688-4.547Q.893 21.684.27 16.941c2.687-4.261 7.58-7.314 13.335-7.984"></path></g><path fill="#03455A" d="M12.016 17.836c.872 3.131.555 6.983-2.117 7.117-3.14.157-6.237-1.098-7.206-3.973s.332-5.91 2.906-6.779 5.603.71 6.417 3.635"></path><path fill="#fff" d="M12.391 18.85c.818 2.911.575 6.478-1.825 6.574-2.822.112-5.618-1.085-6.52-3.761-.903-2.676.234-5.476 2.539-6.253 2.304-.777 5.043.72 5.806 3.44"></path><path fill="#03455A" d="M12.612 23.502c.354-1.306.222-3.075-.22-4.652q-.03-.106-.063-.207a3.48 3.48 0 1 0 .283 4.86"></path><path fill="#fff" d="M6.892 19.801a1.374 1.374 0 1 1 2.748 0 1.374 1.374 0 0 1-2.748 0"></path><path fill="#03455A" d="M20.152 17.837c-.872 3.13-.555 6.982 2.116 7.116 3.141.157 6.238-1.098 7.207-3.973.97-2.876-.332-5.91-2.906-6.779s-5.603.71-6.417 3.636"></path><path fill="#fff" d="M19.777 18.85c-.818 2.911-.575 6.478 1.825 6.574 2.822.112 5.618-1.085 6.52-3.76.903-2.677-.234-5.477-2.539-6.254s-5.043.72-5.806 3.44"></path><path fill="#03455A" d="M19.556 23.502c-.354-1.306-.222-3.075.22-4.652q.03-.106.063-.207a3.48 3.48 0 1 1-.283 4.86"></path><path fill="#fff" d="M25.28 19.788a1.387 1.387 0 1 0-2.774 0 1.387 1.387 0 0 0 2.775 0"></path><path fill="#0A0F1A" d="M38.453 24.773a.65.65 0 0 1-.186.4.51.51 0 0 1-.374.16.58.58 0 0 1-.426-.16.6.6 0 0 1-.134-.4V7.227q0-.24.16-.4a.54.54 0 0 1 .4-.16q.24 0 .4.16t.16.4zM42.432 11.547q.132 0 .266.106a.4.4 0 0 1 .214.24l4.933 11.814-.267.186 5.014-12q.133-.346.56-.346.132 0 .32.106a.35.35 0 0 1 .186.32q0 .134-.026.214l-.054.106-5.306 12.694a.5.5 0 0 1-.507.346.7.7 0 0 1-.32-.08.56.56 0 0 1-.187-.266L41.925 12.32l-.053-.107v-.133q0-.213.133-.373t.427-.16M66.634 11.6q.24 0 .373.16.16.16.16.373v11.894q0 2.053-.827 3.546-.825 1.493-2.24 2.294-1.413.8-3.226.8-1.227 0-2.214-.294-.96-.293-1.573-.72a1 1 0 0 1-.293-.32.4.4 0 0 1 0-.4.6.6 0 0 1 .293-.293.4.4 0 0 1 .4.053q.454.267 1.36.64.934.374 2.08.374 1.547 0 2.693-.72a4.8 4.8 0 0 0 1.814-2q.666-1.28.666-2.96v-1.974l.054.667q-.374.8-1.147 1.467a6.4 6.4 0 0 1-1.707 1.04 5.2 5.2 0 0 1-1.946.373q-1.655 0-2.72-.64a4.05 4.05 0 0 1-1.547-1.813q-.48-1.147-.48-2.694v-8.32q0-.213.133-.373a.54.54 0 0 1 .4-.16.46.46 0 0 1 .374.16q.16.16.16.373v8.32q0 1.894.826 3.014.854 1.12 2.854 1.12 1.2 0 2.266-.587a5.5 5.5 0 0 0 1.787-1.573q.693-.96.693-1.974v-8.32q0-.213.134-.373a.54.54 0 0 1 .4-.16M72.674 25.333q-.64 0-1.04-.373a1.4 1.4 0 0 1-.373-.987V8.027q0-.587.4-.96.4-.4.96-.4h9.013q.587 0 .96.373.4.373.4.933 0 .507-.4.88-.374.374-.96.374h-7.786l.186-.267v5.947l-.16-.32h6.56q.587 0 .96.373.4.373.4.933 0 .507-.4.88-.373.374-.96.374h-6.613l.213-.214v7.04q0 .587-.4.987a1.36 1.36 0 0 1-.96.373M98.776 18.32q0 2.133-.933 3.787a6.87 6.87 0 0 1-2.533 2.56q-1.6.933-3.6.933t-3.6-.933a7.07 7.07 0 0 1-2.56-2.56q-.934-1.654-.934-3.787 0-2.16.934-3.787a7 7 0 0 1 2.56-2.586q1.599-.96 3.6-.96 2 0 3.6.96a6.8 6.8 0 0 1 2.533 2.586q.933 1.627.933 3.787m-2.666 0q0-1.467-.587-2.533a4.36 4.36 0 0 0-1.6-1.707 4 4 0 0 0-2.213-.64 4.1 4.1 0 0 0-2.24.64 4.36 4.36 0 0 0-1.6 1.707q-.587 1.066-.587 2.533 0 1.413.587 2.507a4.36 4.36 0 0 0 1.6 1.706 4.24 4.24 0 0 0 2.24.614q1.227 0 2.213-.614a4.36 4.36 0 0 0 1.6-1.706q.587-1.094.587-2.507M102.861 25.333q-.587 0-.96-.373a1.4 1.4 0 0 1-.373-.987V12.667q0-.586.373-.96.373-.4.96-.4.56 0 .934.4.4.374.4.96v2.986l-.267-1.146q.213-.747.64-1.387.453-.64 1.067-1.12t1.36-.747a4.9 4.9 0 0 1 1.6-.266q.693 0 1.2.373.506.373.506.933 0 .72-.373 1.067a1.24 1.24 0 0 1-.827.32q-.4 0-.773-.16a1.95 1.95 0 0 0-.88-.187q-.56 0-1.147.294a3.3 3.3 0 0 0-1.066.88q-.48.56-.774 1.333a5.3 5.3 0 0 0-.266 1.733v6.4q0 .587-.4.987-.373.373-.934.373M119.447 11.067q1.974 0 3.04.986 1.066.96 1.414 2.614l-.427-.134.187-.426q.346-.694 1.04-1.387a5.8 5.8 0 0 1 1.706-1.173q.987-.48 2.107-.48 1.84 0 2.853.8 1.014.772 1.414 2.106.4 1.307.4 2.934v7.066q0 .587-.374.987-.374.373-.96.373-.56 0-.96-.373a1.4 1.4 0 0 1-.373-.987v-7.04a5.2 5.2 0 0 0-.267-1.706 2.3 2.3 0 0 0-.88-1.227q-.614-.48-1.706-.48-1.04 0-1.867.48a3.32 3.32 0 0 0-1.707 2.933v7.04q0 .587-.373.987-.374.373-.96.373-.587 0-.96-.373a1.4 1.4 0 0 1-.373-.987v-7.066q0-.934-.267-1.707a2.35 2.35 0 0 0-.853-1.227q-.613-.453-1.707-.453-1.04 0-1.84.453a3.3 3.3 0 0 0-1.253 1.227 3.47 3.47 0 0 0-.427 1.707v7.066q0 .587-.4.987-.374.373-.933.373-.588 0-.96-.373a1.4 1.4 0 0 1-.374-.987V12.667q0-.586.374-.96.372-.4.96-.4.56 0 .933.4.4.374.4.96v1.573l-.507.293q.187-.585.614-1.2.426-.613 1.066-1.12a6.3 6.3 0 0 1 1.467-.826 4.6 4.6 0 0 1 1.733-.32M135.819 23.147a1.4 1.4 0 0 1-.213-.854q.026-.506.56-.853a1.12 1.12 0 0 1 .773-.187q.427.027.8.4a6 6 0 0 0 1.653 1.307q.934.48 2.24.48.534-.027 1.094-.16a2.3 2.3 0 0 0 .96-.533q.4-.401.4-1.147 0-.666-.427-1.067-.426-.4-1.12-.64a15 15 0 0 0-1.493-.48 38 38 0 0 1-1.734-.533 7 7 0 0 1-1.546-.747 4 4 0 0 1-1.147-1.226q-.427-.747-.427-1.84 0-1.254.694-2.16a4.87 4.87 0 0 1 1.84-1.414 6.1 6.1 0 0 1 2.48-.506q.773 0 1.626.213.853.187 1.654.613.8.427 1.386 1.12.267.347.294.827.053.48-.427.853a1.06 1.06 0 0 1-.773.24 1.18 1.18 0 0 1-.747-.293 3.3 3.3 0 0 0-1.307-.987q-.8-.373-1.813-.373-.506 0-1.067.16a1.9 1.9 0 0 0-.906.507q-.374.373-.374 1.093 0 .666.427 1.067.453.4 1.173.666.72.267 1.574.48.826.214 1.626.507.827.294 1.467.773.667.454 1.067 1.2.426.72.426 1.84 0 1.307-.773 2.24-.747.907-1.92 1.387-1.146.48-2.427.48a9.1 9.1 0 0 1-3.04-.533q-1.493-.561-2.533-1.92"></path>',11)]))}const Z$={render:Q$},eR={xmlns:"http://www.w3.org/2000/svg",width:"83",height:"72",fill:"none"};function tR(n,e){return C(),F("svg",eR,e[0]||(e[0]=[Ba('<path fill="#43D9B8" d="M44.202 17.958q0-7.638 3.876-11.048Q52.055 3.5 60.827 3.5h2.074v12.89q0 15.855-9.043 20.323-3.162 1.568-7.582 1.568h-2.074zm-6.71 20.323q-8.535 0-12.715-5.967Q20.9 26.79 20.9 16.39V3.5h2.074q8.77 0 12.749 3.41 3.875 3.41 3.875 11.048v20.323z"></path><g fill="#fff" opacity=".6" style="mix-blend-mode:luminosity;"><path d="M45.044 11.756q-.842 2.642-.842 6.202v20.323h2.074q4.42 0 7.581-1.568 7.25-3.581 8.688-14.48c-3.527-5.592-9.948-9.597-17.5-10.477M38.757 11.756q.843 2.642.842 6.202v20.323h-2.107q-8.535 0-12.715-5.967-2.704-3.853-3.522-10.079c3.527-5.593 9.949-9.6 17.502-10.479"></path></g><path fill="#03455A" d="M36.672 23.41c1.144 4.11.729 9.164-2.778 9.34-4.122.207-8.187-1.44-9.459-5.214s.436-7.758 3.815-8.897 7.353.933 8.422 4.771"></path><path fill="#fff" d="M37.165 24.74c1.072 3.822.753 8.504-2.397 8.629-3.703.147-7.373-1.424-8.558-4.936s.308-7.187 3.333-8.207 6.62.944 7.621 4.514"></path><path fill="#03455A" d="M37.454 30.847c.464-1.714.292-4.037-.29-6.107a7 7 0 0 0-.081-.271 4.566 4.566 0 1 0 .371 6.378"></path><path fill="#fff" d="M29.947 25.99a1.803 1.803 0 1 1 3.606 0 1.803 1.803 0 0 1-3.606 0"></path><path fill="#03455A" d="M47.35 23.41c-1.144 4.11-.728 9.164 2.778 9.34 4.122.207 8.187-1.44 9.46-5.214 1.271-3.775-.436-7.758-3.816-8.897s-7.353.933-8.422 4.771"></path><path fill="#fff" d="M46.858 24.74c-1.073 3.822-.754 8.504 2.396 8.629 3.703.147 7.373-1.424 8.558-4.936s-.308-7.187-3.333-8.207-6.62.944-7.621 4.514"></path><path fill="#03455A" d="M46.568 30.847c-.464-1.714-.292-4.037.29-6.107q.038-.138.082-.271a4.566 4.566 0 1 1-.371 6.378"></path><path fill="#fff" d="M54.082 25.972a1.821 1.821 0 1 0-3.642 0 1.821 1.821 0 0 0 3.642 0"></path><path fill="#0A0F1A" d="M1.799 67.58a.5.5 0 0 1-.14.3.38.38 0 0 1-.28.12.43.43 0 0 1-.32-.12.45.45 0 0 1-.1-.3V54.42a.407.407 0 0 1 .42-.42.407.407 0 0 1 .42.42zM4.782 57.66a.32.32 0 0 1 .2.08q.12.06.16.18l3.7 8.86-.2.14 3.76-9q.1-.26.42-.26.1 0 .24.08a.26.26 0 0 1 .14.24q0 .1-.02.16l-.04.08-3.98 9.52a.375.375 0 0 1-.38.26q-.12 0-.24-.06a.42.42 0 0 1-.14-.2l-4-9.5-.04-.08v-.1q0-.16.1-.28t.32-.12M22.934 57.7q.18 0 .28.12.12.12.12.28v8.92q0 1.54-.62 2.66a4.35 4.35 0 0 1-1.68 1.72q-1.06.6-2.42.6a5.8 5.8 0 0 1-1.66-.22q-.72-.22-1.18-.54a.75.75 0 0 1-.22-.24.3.3 0 0 1 0-.3.44.44 0 0 1 .22-.22.3.3 0 0 1 .3.04q.34.2 1.02.48.7.28 1.56.28 1.16 0 2.02-.54.88-.54 1.36-1.5.5-.96.5-2.22v-1.48l.04.5q-.28.6-.86 1.1-.56.48-1.28.78-.7.28-1.46.28-1.24 0-2.04-.48a3.04 3.04 0 0 1-1.16-1.36q-.36-.86-.36-2.02V58.1q0-.16.1-.28.12-.12.3-.12t.28.12q.12.12.12.28v6.24q0 1.42.62 2.26.64.84 2.14.84.9 0 1.7-.44a4.1 4.1 0 0 0 1.34-1.18q.52-.72.52-1.48V58.1q0-.16.1-.28.12-.12.3-.12M27.464 68q-.48 0-.78-.28-.28-.3-.28-.74V55.02q0-.44.3-.72.3-.3.72-.3h6.76q.441 0 .72.28.3.28.3.7 0 .38-.3.66a.98.98 0 0 1-.72.28h-5.84l.14-.2v4.46l-.12-.24h4.92q.441 0 .72.28.3.28.3.7 0 .38-.3.66a.98.98 0 0 1-.72.28h-4.96l.16-.16v5.28q0 .44-.3.74-.3.28-.72.28M47.041 62.74q0 1.6-.7 2.84a5.15 5.15 0 0 1-1.9 1.92q-1.2.7-2.7.7t-2.7-.7a5.3 5.3 0 0 1-1.92-1.92q-.7-1.24-.7-2.84 0-1.62.7-2.84a5.26 5.26 0 0 1 1.92-1.94q1.2-.72 2.7-.72t2.7.72a5.1 5.1 0 0 1 1.9 1.94q.7 1.22.7 2.84m-2 0q0-1.1-.44-1.9a3.27 3.27 0 0 0-1.2-1.28 3 3 0 0 0-1.66-.48q-.92 0-1.68.48a3.27 3.27 0 0 0-1.2 1.28q-.44.8-.44 1.9 0 1.06.44 1.88t1.2 1.28 1.68.46a3.1 3.1 0 0 0 1.66-.46 3.27 3.27 0 0 0 1.2-1.28q.44-.82.44-1.88M50.105 68a.98.98 0 0 1-.72-.28q-.28-.3-.28-.74V58.5q0-.44.28-.72a.94.94 0 0 1 .72-.3q.42 0 .7.3.3.28.3.72v2.24l-.2-.86q.159-.56.48-1.04.34-.48.8-.84.459-.36 1.02-.56.579-.2 1.2-.2.519 0 .9.28.38.28.38.7 0 .54-.28.8a.93.93 0 0 1-.62.24q-.3 0-.58-.12a1.46 1.46 0 0 0-.66-.14q-.42 0-.86.22t-.8.66a3.3 3.3 0 0 0-.58 1q-.2.58-.2 1.3v4.8q0 .44-.3.74a.95.95 0 0 1-.7.28M62.544 57.3q1.48 0 2.28.74.8.72 1.06 1.96l-.32-.1.14-.32q.26-.52.78-1.04.54-.54 1.28-.88.74-.36 1.58-.36 1.38 0 2.14.6.76.58 1.06 1.58.3.98.3 2.2v5.3q0 .44-.28.74a.98.98 0 0 1-.72.28q-.42 0-.72-.28-.28-.3-.28-.74V61.7q0-.7-.2-1.28a1.72 1.72 0 0 0-.66-.92q-.46-.36-1.28-.36-.78 0-1.4.36a2.49 2.49 0 0 0-1.28 2.2v5.28q0 .44-.28.74a.98.98 0 0 1-.72.28.98.98 0 0 1-.72-.28q-.28-.3-.28-.74v-5.3q0-.7-.2-1.28a1.76 1.76 0 0 0-.64-.92q-.46-.34-1.28-.34-.78 0-1.38.34t-.94.92q-.32.58-.32 1.28v5.3q0 .44-.3.74a.95.95 0 0 1-.7.28.98.98 0 0 1-.72-.28q-.28-.3-.28-.74V58.5q0-.44.28-.72a.94.94 0 0 1 .72-.3q.42 0 .7.3.3.28.3.72v1.18l-.38.22a3.4 3.4 0 0 1 .46-.9 4 4 0 0 1 .8-.84q.5-.38 1.1-.62t1.3-.24M74.823 66.36q-.18-.28-.16-.64.02-.38.42-.64a.84.84 0 0 1 .58-.14q.32.02.6.3.56.62 1.24.98.7.36 1.68.36.4-.02.82-.12.42-.12.72-.4.3-.3.3-.86 0-.5-.32-.8t-.84-.48a11 11 0 0 0-1.12-.36 29 29 0 0 1-1.3-.4 5.2 5.2 0 0 1-1.16-.56 3 3 0 0 1-.86-.92q-.32-.56-.32-1.38 0-.94.52-1.62a3.65 3.65 0 0 1 1.38-1.06 4.55 4.55 0 0 1 1.86-.38q.58 0 1.22.16.64.14 1.24.46t1.04.84q.2.26.22.62.04.36-.32.64a.8.8 0 0 1-.58.18.88.88 0 0 1-.56-.22 2.5 2.5 0 0 0-.98-.74q-.6-.28-1.36-.28-.38 0-.8.12a1.43 1.43 0 0 0-.68.38q-.28.28-.28.82 0 .5.32.8.34.3.88.5t1.18.36q.62.16 1.22.38.62.22 1.1.58.5.34.8.9.32.54.32 1.38 0 .98-.58 1.68-.56.68-1.44 1.04-.86.36-1.82.36-1.14 0-2.28-.4-1.12-.42-1.9-1.44"></path>',11)]))}const nR={render:tR},rR={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"28",fill:"none"};function oR(n,e){return C(),F("svg",rR,e[0]||(e[0]=[Ba('<path fill="#43D9B8" d="M17.754 11.683q0-5.82 2.952-8.418Q23.736.667 30.42.667H32v9.82q0 12.081-6.89 15.485-2.41 1.195-5.776 1.195h-1.58zM12.64 27.167q-6.501 0-9.687-4.547Q0 18.413 0 10.489V.667h1.58q6.682 0 9.714 2.598 2.952 2.598 2.952 8.418v15.484z"></path><g fill="#fff" opacity=".6" style="mix-blend-mode:luminosity;"><path d="M18.394 6.957q-.64 2.013-.641 4.725v15.485h1.58q3.367 0 5.776-1.196 5.522-2.728 6.62-11.031c-2.688-4.261-7.58-7.313-13.335-7.983M13.604 6.957q.642 2.013.642 4.725v15.485H12.64q-6.502 0-9.688-4.547Q.892 19.684.27 14.941c2.687-4.261 7.58-7.314 13.334-7.984"></path></g><path fill="#03455A" d="M12.015 15.837c.872 3.13.555 6.982-2.116 7.116-3.141.157-6.238-1.098-7.207-3.973-.97-2.876.332-5.91 2.906-6.779s5.603.71 6.417 3.635"></path><path fill="#fff" d="M12.39 16.85c.818 2.911.575 6.478-1.825 6.574-2.821.112-5.618-1.084-6.52-3.76-.903-2.677.234-5.477 2.539-6.254s5.043.72 5.807 3.44"></path><path fill="#03455A" d="M12.611 21.502c.354-1.306.222-3.075-.22-4.652q-.03-.106-.063-.207a3.48 3.48 0 1 0 .283 4.86"></path><path fill="#fff" d="M6.891 17.801a1.374 1.374 0 1 1 2.748 0 1.374 1.374 0 0 1-2.748 0"></path><path fill="#03455A" d="M20.151 15.837c-.872 3.13-.555 6.982 2.117 7.116 3.14.157 6.237-1.098 7.207-3.973s-.332-5.91-2.907-6.779c-2.575-.867-5.603.71-6.417 3.636"></path><path fill="#fff" d="M19.776 16.85c-.817 2.912-.574 6.479 1.826 6.574 2.82.112 5.618-1.084 6.52-3.76.902-2.677-.235-5.477-2.54-6.254-2.304-.777-5.043.72-5.806 3.44"></path><path fill="#03455A" d="M19.555 21.502c-.354-1.305-.222-3.075.22-4.652q.03-.106.063-.207a3.48 3.48 0 1 1-.283 4.86"></path><path fill="#fff" d="M25.28 17.788a1.387 1.387 0 1 0-2.775 0 1.387 1.387 0 0 0 2.775 0"></path>',10)]))}const aR={render:oR},iR=he({__name:"IvyLogo",props:{orientation:{default:"horizontal"}},setup(n){const e=n;return(t,r)=>(C(),F("div",{class:ee(`ivyforms-logo ${e.orientation}`)},[e.orientation==="horizontal"?(C(),se(h(Z$),{key:0})):e.orientation==="vertical"?(C(),se(h(nR),{key:1})):(C(),se(h(aR),{key:2}))],2))}});function cS(n){return QI()?(K3(n),!0):!1}const bm=new WeakMap,sR=(...n)=>{var e;const t=n[0],r=(e=Kn())==null?void 0:e.proxy;if(r==null&&!J3())throw new Error("injectLocal must be called in setup");return r&&bm.has(r)&&t in bm.get(r)?bm.get(r)[t]:on(...n)},dS=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const lR=Object.prototype.toString,uR=n=>lR.call(n)==="[object Object]",Sm=()=>{},cR=dR();function dR(){var n,e;return dS&&((n=window==null?void 0:window.navigator)==null?void 0:n.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function fR(n,e){var t;if(typeof n=="number")return n+e;const r=((t=n.match(/^-?\d+\.?\d*/))==null?void 0:t[0])||"",o=n.slice(r.length),i=Number.parseFloat(r)+e;return Number.isNaN(i)?n:i+o}function Mu(n){return n.endsWith("rem")?Number.parseFloat(n)*16:Number.parseFloat(n)}function pR(n){return Kn()}function _m(n){return Array.isArray(n)?n:[n]}function hR(n,e=!0,t){pR()?Ht(n,t):e?n():Xt(n)}function mR(n,e,t){return Me(n,e,{...t,immediate:!0})}var xd={};/*!
 * cookie
 * Copyright(c) 2012-2014 Roman Shtylman
 * Copyright(c) 2015 Douglas Christopher Wilson
 * MIT Licensed
 */var Ub;function vR(){if(Ub)return xd;Ub=1,xd.parse=a,xd.serialize=c;var n=Object.prototype.toString,e=Object.prototype.hasOwnProperty,t=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,r=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,o=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,i=/^[\u0020-\u003A\u003D-\u007E]*$/;function a(g,v){if(typeof g!="string")throw new TypeError("argument str must be a string");var y={},b=g.length;if(b<2)return y;var _=v&&v.decode||d,w=0,T=0,k=0;do{if(T=g.indexOf("=",w),T===-1)break;if(k=g.indexOf(";",w),k===-1)k=b;else if(T>k){w=g.lastIndexOf(";",T-1)+1;continue}var x=s(g,w,T),M=l(g,T,x),D=g.slice(x,M);if(!e.call(y,D)){var A=s(g,T+1,k),P=l(g,k,A);g.charCodeAt(A)===34&&g.charCodeAt(P-1)===34&&(A++,P--);var $=g.slice(A,P);y[D]=m($,_)}w=k+1}while(w<b);return y}function s(g,v,y){do{var b=g.charCodeAt(v);if(b!==32&&b!==9)return v}while(++v<y);return y}function l(g,v,y){for(;v>y;){var b=g.charCodeAt(--v);if(b!==32&&b!==9)return v+1}return y}function c(g,v,y){var b=y&&y.encode||encodeURIComponent;if(typeof b!="function")throw new TypeError("option encode is invalid");if(!t.test(g))throw new TypeError("argument name is invalid");var _=b(v);if(!r.test(_))throw new TypeError("argument val is invalid");var w=g+"="+_;if(!y)return w;if(y.maxAge!=null){var T=Math.floor(y.maxAge);if(!isFinite(T))throw new TypeError("option maxAge is invalid");w+="; Max-Age="+T}if(y.domain){if(!o.test(y.domain))throw new TypeError("option domain is invalid");w+="; Domain="+y.domain}if(y.path){if(!i.test(y.path))throw new TypeError("option path is invalid");w+="; Path="+y.path}if(y.expires){var k=y.expires;if(!f(k)||isNaN(k.valueOf()))throw new TypeError("option expires is invalid");w+="; Expires="+k.toUTCString()}if(y.httpOnly&&(w+="; HttpOnly"),y.secure&&(w+="; Secure"),y.partitioned&&(w+="; Partitioned"),y.priority){var x=typeof y.priority=="string"?y.priority.toLowerCase():y.priority;switch(x){case"low":w+="; Priority=Low";break;case"medium":w+="; Priority=Medium";break;case"high":w+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(y.sameSite){var M=typeof y.sameSite=="string"?y.sameSite.toLowerCase():y.sameSite;switch(M){case!0:w+="; SameSite=Strict";break;case"lax":w+="; SameSite=Lax";break;case"strict":w+="; SameSite=Strict";break;case"none":w+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return w}function d(g){return g.indexOf("%")!==-1?decodeURIComponent(g):g}function f(g){return n.call(g)==="[object Date]"}function m(g,v){try{return v(g)}catch{return g}}return xd}var tf=vR();function gR(){const n=typeof global>"u"?void 0:global.TEST_HAS_DOCUMENT_COOKIE;return typeof n=="boolean"?n:typeof document=="object"&&typeof document.cookie=="string"}function yR(n){return typeof n=="string"?tf.parse(n):typeof n=="object"&&n!==null?n:{}}function wm(n,e={}){const t=bR(n);if(!e.doNotParse)try{return JSON.parse(t)}catch{}return n}function bR(n){return n&&n[0]==="j"&&n[1]===":"?n.substr(2):n}class SR{constructor(e,t={}){this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.update=()=>{if(!this.HAS_DOCUMENT_COOKIE)return;const o=this.cookies;this.cookies=tf.parse(document.cookie),this._checkChanges(o)};const r=typeof document>"u"?"":document.cookie;this.cookies=yR(e||r),this.defaultSetOptions=t,this.HAS_DOCUMENT_COOKIE=gR()}_emitChange(e){for(let t=0;t<this.changeListeners.length;++t)this.changeListeners[t](e)}_checkChanges(e){new Set(Object.keys(e).concat(Object.keys(this.cookies))).forEach(r=>{e[r]!==this.cookies[r]&&this._emitChange({name:r,value:wm(this.cookies[r])})})}_startPolling(){this.pollingInterval=setInterval(this.update,300)}_stopPolling(){this.pollingInterval&&clearInterval(this.pollingInterval)}get(e,t={}){return t.doNotUpdate||this.update(),wm(this.cookies[e],t)}getAll(e={}){e.doNotUpdate||this.update();const t={};for(let r in this.cookies)t[r]=wm(this.cookies[r],e);return t}set(e,t,r){r?r=Object.assign(Object.assign({},this.defaultSetOptions),r):r=this.defaultSetOptions;const o=typeof t=="string"?t:JSON.stringify(t);this.cookies=Object.assign(Object.assign({},this.cookies),{[e]:o}),this.HAS_DOCUMENT_COOKIE&&(document.cookie=tf.serialize(e,o,r)),this._emitChange({name:e,value:t,options:r})}remove(e,t){const r=t=Object.assign(Object.assign(Object.assign({},this.defaultSetOptions),t),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=Object.assign({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=tf.serialize(e,"",r)),this._emitChange({name:e,value:void 0,options:t})}addChangeListener(e){this.changeListeners.push(e),this.HAS_DOCUMENT_COOKIE&&this.changeListeners.length===1&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.addEventListener("change",this.update):this._startPolling())}removeChangeListener(e){const t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1),this.HAS_DOCUMENT_COOKIE&&this.changeListeners.length===0&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.removeEventListener("change",this.update):this._stopPolling())}}function fS(n,{doNotParse:e=!1,autoUpdateDependencies:t=!1}={},r=new SR){const o=t?[...n||[]]:n;let i=r.getAll({doNotParse:!0});const a=H(0),s=()=>{const l=r.getAll({doNotParse:!0});_R(o||null,l,i)&&a.value++,i=l};return r.addChangeListener(s),cS(()=>{r.removeChangeListener(s)}),{get:(...l)=>(t&&o&&!o.includes(l[0])&&o.push(l[0]),a.value,r.get(l[0],{doNotParse:e,...l[1]})),getAll:(...l)=>(a.value,r.getAll({doNotParse:e,...l[0]})),set:(...l)=>r.set(...l),remove:(...l)=>r.remove(...l),addChangeListener:(...l)=>r.addChangeListener(...l),removeChangeListener:(...l)=>r.removeChangeListener(...l)}}function _R(n,e,t){if(!n)return!0;for(const r of n)if(e[r]!==t[r])return!0;return!1}const aa=Vl("globalState",{state:()=>({currentPage:"",isFullScreenMode:!1,isFullScreenModeInitialized:!1,pageTitle:""}),actions:{setCurrentPage(n){this.currentPage=n},setFullScreenMode(n){this.isFullScreenMode=n,this.isFullScreenModeInitialized=!0},setPageTitle(n){this.pageTitle=n}}});function Og(n){return{all:n=n||new Map,on:function(e,t){var r=n.get(e);r?r.push(t):n.set(e,[t])},off:function(e,t){var r=n.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):n.set(e,[]))},emit:function(e,t){var r=n.get(e);r&&r.slice().map(function(o){o(t)}),(r=n.get("*"))&&r.slice().map(function(o){o(e,t)})}}}const wR=Og(),_l=H("light"),pS=fS(["ivyforms_theme"]),kd=pS.get("ivyforms_theme");kd&&(kd==="light"||kd==="dark")&&(_l.value=kd);const Wb=n=>{_l.value=n,pS.set("ivyforms_theme",n),n==="dark"?document.body.classList.add("ivyforms-theme-dark"):document.body.classList.remove("ivyforms-theme-dark"),wR.emit("theme-changed",n)};function Ag(){return{theme:O({get:()=>_l.value,set:e=>Wb(e)}),isDark:()=>_l.value==="dark",isLight:()=>_l.value==="light",setTheme:Wb,getTheme:()=>_l.value}}const xi="ivyforms-forms",Cr="ivyforms-builder",gc="ivyforms-settings",xR="ivyforms-dashboard",ki="ivyforms-entries",xf="settings",kR="dashboard",Oa="all-forms",Cs="add-form",Is="edit-form",Ci="form-setting",Xu="form-notifications",kf="new-notifications",Cf="edit-notifications",If="form-confirmation",hS="results",Ii="form-results",ds="entry-details",hi="results-entry-details",bo="entries",CR="general-settings",IR="global-settings",ER="security-settings";function jb(n){if(!n)return{};try{return JSON.parse(n)}catch{return{}}}function TR(n){if(!Array.isArray(n)||n.length===0)return[];const e=[],t={};for(const r of n)r.parentId&&typeof r.parentId=="number"&&r.parentId>0?(t[r.parentId]||(t[r.parentId]=[]),t[r.parentId].push(r)):e.push(r);return e.map(r=>{if(r.type==="name"){const i=(t[r.id]??[]).map(s=>{const l=jb(s.settings),c=s.label??String(l.label??"");return{type:"text",id:String(s.id??""),modelValue:s.defaultValue??"",label:c,required:!!s.required||!!l.required,optionHide:!!s.hideLabel||!!l.hideLabel,description:String(s.description??l.description??""),placeholder:String(s.placeholder??l.placeholder??"")}}),a=i.map((s,l)=>`nameField${l+1}`);return{...r,nameFields:i,nameFieldTypes:a}}if(r.type==="address"){const o=t[r.id]??[],i=["streetAddress","addressLine2","city","state","zip","country"],a=o.map((l,c)=>{const d=jb(l.settings),f=l.addressType||String(d.type??"");return{type:f&&f.trim()!==""?f:i[c]??`addressPart${c+1}`,id:String(l.id??""),label:l.label??String(d.label??""),value:l.defaultValue??String(d.value??""),placeholder:l.placeholder??String(d.placeholder??""),required:!!l.required||!!d.required,hideLabel:!!l.hideLabel||!!d.hideLabel,description:String(l.description??d.description??""),requiredMessage:String(l.requiredMessage??d.requiredMessage??""),visible:!!l.visible||!!(d.visible??!0)}}),s=a.map(l=>l.type);return{...r,addressFields:a,addressFieldTypes:s}}return{...r}})}function xm(n){const e=[];for(const t of n){if(t.type==="name"&&Array.isArray(t.nameFields)){const{nameFields:r,...o}=t;e.push({...o,type:"name"}),r.forEach((i,a)=>{e.push({id:i.id&&parseInt(i.id,10)||0,formId:t.formId,fieldIndex:t.fieldIndex,type:"text",label:i.label,defaultValue:i.modelValue,required:i.required,placeholder:i.placeholder,position:t.position,value:i.modelValue,hideLabel:i.optionHide,description:i.description,requiredMessage:"",parentId:t.id,subFieldIndex:a})});continue}if(t.type==="address"&&Array.isArray(t.addressFields)){const{addressFields:r,...o}=t;e.push(o),r.forEach((i,a)=>{const s=JSON.stringify({hideLabel:i.hideLabel,description:i.description,placeholder:i.placeholder,type:i.type,requiredMessage:i.requiredMessage,visible:typeof i.visible=="boolean"?i.visible:!0});e.push({id:i.id&&parseInt(i.id,10)||0,formId:t.formId,fieldIndex:t.fieldIndex,type:"text",label:i.label,defaultValue:i.value,required:i.required,placeholder:i.placeholder,position:t.position,value:i.value,hideLabel:i.hideLabel,description:i.description,requiredMessage:i.requiredMessage,parentId:t.id,addressType:i.type,settings:s,subFieldIndex:a,visible:i.visible})});continue}e.push({...t,id:typeof t.id=="string"?parseInt(t.id,10)||0:t.id||0})}return e}const MR={name:{type:"name",buildSubFields:n=>[{type:"text",id:"",modelValue:"",label:n("first_name"),required:!1,optionHide:!1,description:"",placeholder:"",labelPosition:"top"},{type:"text",id:"",modelValue:"",label:n("last_name"),required:!1,optionHide:!1,description:"",placeholder:"",labelPosition:"top"}],subFieldKey:"nameFields"},address:{type:"address",buildSubFields:n=>[{type:"streetAddress",id:"",label:n("street_address"),value:"",placeholder:"",required:!1,hideLabel:!1,description:"",requiredMessage:"",visible:!0},{type:"addressLine2",id:"",label:n("address_line_2"),value:"",placeholder:"",required:!1,hideLabel:!1,description:"",requiredMessage:"",visible:!0},{type:"city",id:"",label:n("city"),value:"",placeholder:"",required:!1,hideLabel:!1,description:"",requiredMessage:"",visible:!0},{type:"state",id:"",label:n("state"),value:"",placeholder:"",required:!1,hideLabel:!1,description:"",requiredMessage:""},{type:"zip",id:"",label:n("zip"),value:"",placeholder:"",required:!1,hideLabel:!1,description:"",requiredMessage:"",visible:!0},{type:"country",id:"",label:n("country"),value:"",placeholder:"",required:!1,hideLabel:!1,description:"",requiredMessage:"",visible:!0}],subFieldKey:"addressFields"}};function OR(n,e,t){const r=MR[n.type];if(r){const o=r.buildSubFields(t);return{...n,id:n.id??0,formId:n.formId??0,fieldIndex:e,type:r.type,label:n.label??t(r.type),defaultValue:"",value:"",required:!1,[r.subFieldKey]:o,limitMaxLength:n.limitMaxLength||!1,maxLength:n.maxLength||255,labelPosition:n.labelPosition||"top",noDuplicates:n.noDuplicates||!1}}return{...n,id:n.id??0,formId:n.formId??0,fieldIndex:e,defaultValue:"",value:"",required:!1,limitMaxLength:n.limitMaxLength||!1,maxLength:n.maxLength||255,labelPosition:n.labelPosition||"top",noDuplicates:n.noDuplicates||!1,confirmFieldEnabled:n.confirmFieldEnabled||!1,confirmFieldLabel:"",confirmFieldPlaceholder:"",confirmFieldHideLabel:n.confirmFieldEnabled||!1}}function AR(n,e,t){const r=JSON.parse(JSON.stringify(n)),o={...r,id:0,fieldIndex:e,label:`${r.label}${t("copy_label")}`,limitMaxLength:r.limitMaxLength??!1,maxLength:r.maxLength??255,labelPosition:r.labelPosition??"top",noDuplicates:r.noDuplicates??!1};if(r.type==="name"){const i=r.nameFields??[];o.nameFields=i.map(a=>({...a,id:""})),o.nameFieldTypes=(o.nameFields||[]).map((a,s)=>`nameField${s+1}`)}else if(r.type==="address"){const i=r.addressFields??[];o.addressFields=i.map(a=>({...a,id:""})),o.addressFieldTypes=(o.addressFields||[]).map(a=>a.type)}return o}const zt=Vl("formBuilderData",()=>{const n=H(null),e=H(!1),t=H([]),r=H(0),o=H(null),i=H("addField"),a=H(null),s=H("Blank form"),l=H(!0),c=H(!1),d=H(!1),f=H(!1),m=H(!1),g=H(null),v=ko(),y=H(!1),{getLabel:b}=at(),{request:_}=zl(),w=Rs(),T=Q=>{o.value=t.value.find(Z=>Z.fieldIndex===Q)||null,i.value="options"},k=w.createEntityManager("formBuilder",{name:s,description:a,published:l,showTitle:c,showDescription:d,storeEntries:f,fields:t});function x(Q){Q.stopPropagation();const Z=Q.target,q=document.querySelectorAll(".ivyforms-form-builder__list-group__item");let le=!1;q.forEach(ye=>{ye.contains(Z)&&(le=!0)}),le||(o.value=null)}const M=Q=>{var Z;return((Z=o.value)==null?void 0:Z.fieldIndex)===Q},D=(Q,Z)=>{const q=o.value;q&&(q[Q]=Z);const le=t.value.findIndex(ye=>{var Re;return ye.fieldIndex===((Re=o.value)==null?void 0:Re.fieldIndex)});if(le!==-1){const ye=t.value[le];ye!==q&&(ye[Q]=Z)}};function A(Q){t.value.push(OR(Q,r.value,b)),P()}const P=()=>{t.value.forEach((Q,Z)=>{Q.position=Z+1})},$=()=>(r.value++,r.value),B=async Q=>{var q;y.value=!0;const Z=aa();try{const{data:le,error:ye,status:Re}=await _(`form/${Q}/`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!ye&&Re===200&&((q=le==null?void 0:le.data)!=null&&q.data)){n.value=Q,e.value=!0,m.value=!0;const ze=le.data.data;s.value=ze.name||b("blank_form"),a.value=ze.description||"",l.value=ze.published||!1,c.value=ze.showTitle||!1,d.value=ze.showDescription||!1,f.value=ze.storeEntries,g.value=ze.confirmationId||null;const nt=ze.fields||[];t.value=TR(nt),s.value&&Z.setPageTitle(s.value),k.resetUnsavedChanges(),r.value=t.value.length?Math.max(...t.value.map(Ge=>Ge.fieldIndex)):0}else _t({message:b("failed_to_tab_form"),type:"error"}),console.error(b("failed_to_tab_form"),le==null?void 0:le.message)}catch(le){_t({message:b("error_loading_form"),type:"error"}),console.error(b("error_loading_form"),le)}finally{y.value=!1}},j=async()=>{if(!n.value)return;const Q={name:s.value||b("updated_form"),description:a.value||"",published:l.value||!1,showTitle:c.value||!1,showDescription:d.value||!1,storeEntries:f.value,fields:xm(t.value)};try{const{data:Z,error:q,status:le}=await _(`form/update/${n.value}/`,{method:"POST",headers:{"Content-Type":"application/json"},data:Q});!q&&le===200?(_t({message:b("form_updated"),type:"success"}),k.resetUnsavedChanges()):(_t({message:b("failed_to_update_form"),type:"error"}),console.error(b("failed_to_update_form"),Z==null?void 0:Z.message))}catch(Z){_t({message:b("error_updating_form"),type:"error"}),console.error(b("error_updating_form"),Z)}},U=async Q=>{var q,le;const Z={name:s.value||b("blank_form"),description:a.value||"",showTitle:c.value||!1,published:l.value||!1,showDescription:d.value||!1,storeEntries:f.value,fields:xm(t.value),...(Q==null?void 0:Q.template_id)&&{template_id:Q.template_id}};try{const{data:ye,error:Re,status:ze}=await _("form/add/",{method:"POST",headers:{"Content-Type":"application/json"},data:Z});if(!Re&&ze===200&&((le=(q=ye==null?void 0:ye.data)==null?void 0:q.data)!=null&&le.id)){const nt=ye.data.data;n.value=nt.id,g.value=nt.confirmationId,e.value=!0,m.value=!0,await v.push({hash:`manage/${n.value}`}),_t({message:b("form_saved"),type:"success"}),k.resetUnsavedChanges()}else _t({message:b("failed_to_save_form"),type:"error"})}catch(ye){_t({message:`${b("error_save_form")} ${ye}`,type:"error"})}},G=async()=>{var Z,q;const Q={name:s.value||b("blank_form"),description:a.value||"",published:l.value||!1,showTitle:c.value||!1,showDescription:d.value||!1,storeEntries:f.value,fields:xm(t.value)};try{const{data:le,error:ye,status:Re}=await _("form/add/",{method:"POST",headers:{"Content-Type":"application/json"},data:Q});!ye&&Re===200&&((q=(Z=le==null?void 0:le.data)==null?void 0:Z.data)!=null&&q.id)?(n.value=le.data.data.id,e.value=!0,m.value=!0,await v.push({hash:`/settings/general/manage/${n.value}`}),_t({message:b("form_saved"),type:"success"}),k.resetUnsavedChanges()):_t({message:b("failed_to_save_form"),type:"error"})}catch(le){_t({message:`${b("error_save_form")} ${le}`,type:"error"})}},N=Q=>{const Z=t.value.findIndex(q=>q.fieldIndex===Q);if(Z>0){const q=t.value[Z];t.value[Z]=t.value[Z-1],t.value[Z-1]=q,P()}},R=Q=>{const Z=t.value.findIndex(q=>q.fieldIndex===Q);if(Z<t.value.length-1){const q=t.value[Z];t.value[Z]=t.value[Z+1],t.value[Z+1]=q,P()}},X=Q=>{var q;const Z=t.value.findIndex(le=>le.fieldIndex===Q);Z!==-1&&(t.value.splice(Z,1),((q=o.value)==null?void 0:q.fieldIndex)===Q&&(o.value=null),P())},te=Q=>{const Z=t.value.find(Re=>Re.fieldIndex===Q);if(!Z)return;const q=$(),le=AR(Z,q,b),ye=t.value.findIndex(Re=>Re.fieldIndex===Q);t.value.splice(ye+1,0,le),P()},Y=()=>{n.value=null,e.value=!1,t.value=[],r.value=0,o.value=null,i.value="addField",a.value=null,s.value="Blank form",l.value=!0,c.value=!0,d.value=!1,f.value=!0,m.value=!1,g.value=null,y.value=!1},re=(Q,Z)=>{if(!o.value)return;const q=t.value.findIndex(le=>{var ye;return le.fieldIndex===((ye=o.value)==null?void 0:ye.fieldIndex)});q!==-1&&(t.value[q][Q]=Z)};return{formId:n,fields:t,isEditing:e,selectedField:o,activeTab:i,counterFields:r,description:a,name:s,published:l,showTitle:c,showDescription:d,storeEntries:f,isEditingSettingGeneral:m,confirmationId:g,isFormLoading:y,getCurrentState:k.getCurrentState,saveForm:U,loadForm:B,updateForm:j,increaseCounter:$,addField:A,selectField:T,deselectField:x,isSelected:M,updateSelectedField:D,updateFieldOptions:re,updateFieldPositions:P,moveFieldUp:N,moveFieldDown:R,deleteField:X,duplicateField:te,saveFormSettings:G,resetForm:Y}}),Ul=Vl("confirmationSettingBuilder",()=>{const n=H([]),e=H(null),t=H(null),r=H("successMessage"),o=H(!0),i=H(!1),a=H(""),s=H(""),l=H(""),c=H(!1),{getLabel:d}=at(),m=Rs().createEntityManager("confirmationBuilder",{url:s,message:a,type:r,enabled:o,showForm:i,page:l}),g=()=>{m.resetUnsavedChanges()},{request:v}=zl(),y=async M=>{var D;try{const{data:A,error:P,status:$}=await v(`/confirmation/${M}`,{method:"GET"}),B=(D=A==null?void 0:A.data)==null?void 0:D.data;!P&&$===200&&B?(e.value=M,t.value=B.formId,r.value=B.type||"successMessage",o.value=B.enabled||!1,i.value=B.showForm||!1,a.value=B.message||"",s.value=B.url||"",l.value=B.page||"",c.value=!0,g()):_t({message:`${d("failed_to_load_confirmation")} ${(A==null?void 0:A.message)??P}`,type:"error"})}catch(A){_t({message:`${d("failed_to_load_confirmation")} ${A}`,type:"error"})}},b=async M=>{if(!(!M||isNaN(Number(M))))try{const{data:D,error:A,status:P}=await v(`/confirmations/${M}`,{method:"GET"});if(!A&&P===200&&(D!=null&&D.data)){const $=D.data[0][0];e.value=$.id,t.value=$.formId,r.value=$.type||"successMessage",o.value=$.enabled||!1,i.value=$.showForm||!1,a.value=$.message||"",s.value=$.url||"",l.value=$.page||"",c.value=!0,g()}else _t({message:`${d("failed_to_fetch_confirmation")} ${(D==null?void 0:D.message)??A}`,type:"error"})}catch(D){_t({message:`${d("failed_to_fetch_confirmation")} ${D}`,type:"error"})}},_=()=>{e.value=null,t.value=null,r.value="",o.value=!0,i.value=!1,a.value="",s.value="",l.value="",c.value=!1},w=async()=>{var D;const M={formId:t.value??null,type:r.value||"",enabled:o.value||!1,showForm:i.value||!1,message:a.value||"",url:s.value||"",page:l.value||""};try{const{data:A,error:P,status:$}=await v("/confirmation/add/",{method:"POST",data:M});!P&&$===200&&((D=A==null?void 0:A.data)!=null&&D.data)?(e.value=A.data.data.id,n.value.push(A.data),_t({message:d("create_confirmation"),type:"success"}),m.resetUnsavedChanges()):_t({message:`${d("failed_to_create_confirmation")} ${(A==null?void 0:A.message)??P}`,type:"error"})}catch(A){_t({message:`${d("error_creating_confirmation")} ${A}`,type:"error"})}},T=async(M,D)=>{try{const{data:A,error:P,status:$}=await v(`/confirmation/update/${M}/`,{method:"POST",data:D});!P&&$===200?(_t({message:d("update_confirmation"),type:"success"}),m.resetUnsavedChanges()):_t({message:`${d("error_creating_confirmation")}: ${(A==null?void 0:A.message)??P}`,type:"error"})}catch(A){_t({message:`${d("error_to_update_confirmation")} ${A}`,type:"error"})}},k=async M=>{try{const{data:D,error:A,status:P}=await v(`/confirmation/duplicate/${M}/`,{method:"POST"});!A&&P===200&&(D!=null&&D.data)?(_t({message:d("updating_duplicated_confirmation"),type:"success"}),n.value.push(D.data)):_t({message:`${d("failed_to_duplicate_confirmation")} ${(D==null?void 0:D.message)??A}`,type:"error"})}catch(D){_t({message:`${d("error_duplicate_confirmation")} ${D}`,type:"error"})}},x=async M=>{try{const{data:D,error:A,status:P}=await v(`/confirmation/delete/${M}/`,{method:"POST",data:{id:M}});!A&&P===200?(_t({message:d("delete_confirmation"),type:"success"}),n.value=n.value.filter($=>$.id!==M)):_t({message:`${d("failed_to_delete_confirmation")} ${(D==null?void 0:D.message)??A}`,type:"error"})}catch(D){_t({message:`${d("error_delete_confirmation")} ${D}`,type:"error"})}};return{allConfirmations:n,id:e,formId:t,type:r,enabled:o,showForm:i,resetEntityState:g,message:a,url:s,page:l,isEditing:c,getCurrentState:m.getCurrentState,fetchAllConfirmations:b,resetConfirmation:_,createConfirmation:w,updateConfirmation:T,deleteConfirmation:x,loadConfirmation:y,duplicateConfirmation:k}}),PR={class:"ivyforms-header"},$R={class:"ivyforms-header__left"},RR={key:2,class:"ivyforms-header__title ivyforms-flex-1 ivyforms-align-items-center ivyforms-gap-12 medium-18"},DR={class:"ivyforms-header__title-text ivyforms-text-cut"},NR={class:"ivyforms-header__center"},FR={class:"ivyforms-header__right"},LR=he({__name:"PageHeader",setup(n){const{redirectToWordPressAdminPage:e}=oa(),{getLabel:t}=at(),r=fS(),{request:o}=zl(),i=[Cs,Is,xf,Ci,Xu,kf,Cf,If,Ii],a=H(!1),s=aa(),l=on("pageTitle",""),c=O(()=>l||s.pageTitle),d=H(!1),f=Vr(),m=[ds,Cr,Cs,Is,xf,Ci,Xu,kf,Cf,If,Ii,hi],g=O(()=>m.includes(f.name)),{theme:v,setTheme:y}=Ag();ZI(()=>{y(r.get("ivyforms_theme")||"light")});const b=async()=>{const B=!a.value;_(B),d.value=!0;try{const{data:j,error:U,status:G}=await o("setting/update",{method:"POST",headers:{"Content-Type":"application/json"},data:{settingsCategory:"general",settingsOption:"fullscreen",settingsValue:B}});if(G!==200||U){console.error(t("error_update_settings"),U),_(a.value);return}j&&j.success?(a.value=j.data.value,s.setFullScreenMode(j.data.value),typeof window.wpIvySettings<"u"&&(window.wpIvySettings.general.fullscreen=j.data.value)):_(a.value)}catch(j){console.error(t("error_update_settings"),j),_(a.value)}setTimeout(()=>{d.value=!1},1e3)},_=B=>{const j=document.body,U=document.getElementById("adminmenumain"),G=document.getElementById("wpcontent"),N=document.getElementById("wpadminbar"),R=document.getElementsByClassName("wp-toolbar")[0];B?(j.classList.add("ivyforms-fullscreen-mode"),U&&(U.style.display="none"),G&&(G.style.marginLeft="0",G.style.width="100vw",G.style.height="100vh"),N&&(N.style.display="none"),R instanceof HTMLElement&&(R.style.padding="0")):(j.classList.remove("ivyforms-fullscreen-mode"),U&&(U.style.display=""),G&&(G.style.marginLeft="",G.style.width="",G.style.height=""),N&&(N.style.display=""),R instanceof HTMLElement&&(R.style.padding="")),a.value=B,s.setFullScreenMode(B)},w=()=>{window.open("https://wordpress.org/support/plugin/ivyforms/","_blank")},T=Rs(),k=zt(),x=Ul(),M=Ds(),D={formBuilder:()=>k.getCurrentState(),confirmationBuilder:()=>x.getCurrentState(),notificationBuilder:()=>M.getCurrentState()};function A(){T.confirmNavigationIfUnsaved(D,()=>{if(f.name===ds){e(ki);return}if(f.name===hi){const B=f.params.formId;B?e(Cr,`results/entries/${B}`):e(hS);return}if(f.name===Cr||i.includes(f.name)){e(xi);return}})}const P=O(()=>f.name===ds?t("all_entries"):f.name===hi?t("results"):t("all_forms")),$=O(()=>f.name===Cr||i.includes(f.name));return Ht(()=>{var j;let B=s.isFullScreenMode;if(!s.isFullScreenModeInitialized)try{typeof window.wpIvySettings<"u"&&((j=window.wpIvySettings.general)==null?void 0:j.fullscreen)!==void 0&&(B=!!window.wpIvySettings.general.fullscreen)}catch(U){console.warn("Could not read wpIvySettings.general.fullscreen:",U)}a.value=B,s.setFullScreenMode(B),B&&_(!0)}),Me(()=>s.isFullScreenMode,B=>{B!==a.value&&(a.value=B,_(B))}),xs(()=>{a.value&&document.body.classList.remove("ivyforms-fullscreen-mode")}),(B,j)=>{const U=iR,G=zs,N=Y$,R=xn;return C(),F("header",PR,[z("div",$R,[a.value&&g.value?(C(),se(it,{key:0,priority:"tertiary","icon-start":"chevron-left","icon-start-category":"arrows","icon-start-type":"outline",onClick:A},{default:V(()=>[De(ae(P.value),1)]),_:1})):(C(),se(U,{key:1,class:"ivyforms-header__logo",orientation:"logoOnly"})),I(G),$.value?ie("",!0):(C(),F("div",RR,[z("span",DR,ae(c.value),1)])),xe(B.$slots,"left",{},void 0,!0)]),z("div",NR,[xe(B.$slots,"center",{},void 0,!0)]),z("div",FR,[I(R,{content:h(v)==="dark"?h(t)("light_theme"):h(t)("dark_theme"),theme:"inverted",placement:"bottom"},{default:V(()=>[I(N,{modelValue:h(v),"onUpdate:modelValue":j[0]||(j[0]=X=>bs(v)?v.value=X:null),"aria-label":h(t)("theme_switch")},null,8,["modelValue","aria-label"])]),_:1},8,["content"]),I(R,{content:h(t)("support"),placement:"bottom",theme:"inverted"},{default:V(()=>[I(it,{priority:"tertiary","icon-start":"chat-dots","icon-start-type":"outline",onClick:w})]),_:1},8,["content"]),I(G),xe(B.$slots,"right",{},void 0,!0),I(R,{content:a.value?h(t)("collapse"):h(t)("full_screen"),theme:"inverted",disabled:d.value},{default:V(()=>[I(it,{priority:"tertiary","icon-start-category":"arrows","icon-start":a.value?"collapse":"expand",onClick:b},null,8,["icon-start"])]),_:1},8,["content","disabled"])])])}}}),Oi=bt(LR,[["__scopeId","data-v-c8883c0b"]]),BR=he({__name:"DashboardPage",setup(n){const{getLabel:e}=at(),t=e("dashboard");return Pn("pageTitle",t),(r,o)=>{const i=Oi;return C(),se(i)}}}),VR={},zR={class:"ivyforms-menu-wrapper"};function HR(n,e){const t=O4;return C(),F("div",zR,[I(t,kt({class:"ivyforms-menu"},{...n.$props,...n.$attrs}),{default:V(()=>[xe(n.$slots,"default")]),_:3},16)])}const Ai=bt(VR,[["render",HR]]),Zo=he({__name:"IvyHeaderButton",props:{name:{default:""},label:{},priority:{default:"primary"},size:{default:"d"},type:{default:"filled"},disabled:{type:Boolean,default:!1},isActive:{type:Boolean,default:!1},iconStartConfig:{default:void 0},iconEndConfig:{default:void 0},comingSoon:{type:Boolean,default:!1},ariaLabel:{default:""},route:{default:void 0}},emits:["click"],setup(n,{emit:e}){const{getLabel:t}=at(),r={name:"page",size:"l",outerSize:"20px"},o=d=>d?{...r,...d}:void 0,i=n,a=O(()=>o(i.iconStartConfig)),s=O(()=>o(i.iconEndConfig)),l=e,c=()=>{i.disabled||l("click",i.name)};return(d,f)=>{const m=rn,g=Ns,v=SO;return C(),se(v,{index:d.name,route:d.route,class:ee([`size-${d.size}`,"ivyforms-menu-item",`priority-${d.priority}`,`type-${d.type}`,{"is-active-item":d.isActive},{"has-coming-soon":d.comingSoon}]),disabled:d.disabled||d.comingSoon,"aria-label":i.ariaLabel||h(t)("header_button"),onClick:c},{default:V(()=>{var y,b;return[(y=a.value)!=null&&y.name?(C(),se(m,lv(kt({key:0},a.value)),null,16)):ie("",!0),z("span",null,ae(d.label),1),(b=s.value)!=null&&b.name?(C(),se(m,lv(kt({key:1},s.value)),null,16)):ie("",!0),i.comingSoon?(C(),se(g,{key:2,class:"ivyforms-header-button-wrapper__coming-soon",size:"s"})):ie("",!0)]}),_:1},8,["index","route","class","disabled","aria-label"])}}}),UR=he({__name:"PagePanel",props:{width:{type:[String,Number],default:"240px"}},setup(n){const e=n,t=O(()=>typeof e.width=="number"?`${e.width}px`:e.width);return(r,o)=>(C(),F("div",{class:"ivyforms-page-panel",style:Sn({width:t.value})},[xe(r.$slots,"default",{},void 0,!0)],4))}}),yc=bt(UR,[["__scopeId","data-v-e817d512"]]),WR={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"40",fill:"none"};function jR(n,e){return C(),F("svg",WR,e[0]||(e[0]=[z("path",{stroke:"#8B929C",d:"M4 0v39M4 0v16a4 4 0 0 0 4 4h4"},null,-1)]))}const KR={render:jR},YR={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"40",fill:"none"};function qR(n,e){return C(),F("svg",YR,e[0]||(e[0]=[z("path",{stroke:"#8B929C",d:"M4 0v16a4 4 0 0 0 4 4h4"},null,-1)]))}const GR={render:qR},JR={class:"ivyforms-menu-accordion ivyforms-flex ivyforms-flex-direction-column ivyforms-gap-4"},XR={key:1,class:"ivyforms-menu-accordion__group ivyforms-flex ivyforms-flex-direction-column"},QR={key:0,class:"ivyforms-menu-accordion__content ivyforms-mt-0"},ZR={class:"ivyforms-menu-accordion__submenu ivyforms-flex ivyforms-flex-direction-column ivyforms-gap-0 ivyforms-mx-0 ivyforms-my-8"},eD=["onClick"],tD={class:"ivyforms-submenu-item-content ivyforms-flex"},nD={class:"ivyforms-tree-line ivyforms-flex ivyforms-align-items-start"},rD={class:"medium-14"},oD=he({__name:"IvyMenuAccordion",props:{menuItems:{},modelValue:{default:""}},emits:["update:modelValue","menuSelect"],setup(n,{emit:e}){const t=n,r=e,o=H(t.modelValue||(t.menuItems.length>0?t.menuItems[0].index:"")),i=H([]),a=O(()=>{const f=[];return t.menuItems.forEach(m=>{var g;(g=m.subItems)!=null&&g.some(v=>v.index===o.value)&&f.push(m.index)}),f}),s=f=>a.value.includes(f),l=f=>{o.value=f,r("update:modelValue",f),r("menuSelect",f),i.value=[]},c=f=>{const m=i.value.includes(f.index);if(i.value=[],!m&&(i.value.push(f.index),f.subItems&&f.subItems.length>0)){const g=f.subItems[0];o.value=g.index,r("update:modelValue",g.index),r("menuSelect",g.index)}},d=f=>{o.value=f,r("update:modelValue",f),r("menuSelect",f)};return Me(()=>t.modelValue,f=>{o.value=f,t.menuItems.some(g=>{var v;return(v=g.subItems)==null?void 0:v.some(y=>y.index===f)})?t.menuItems.forEach(g=>{var v;(v=g.subItems)!=null&&v.some(y=>y.index===f)&&(i.value.includes(g.index)||i.value.push(g.index))}):i.value=[]}),Ht(()=>{if(!t.modelValue&&o.value&&(r("update:modelValue",o.value),r("menuSelect",o.value)),t.modelValue||o.value){const f=t.modelValue||o.value;t.menuItems.forEach(m=>{var g;(g=m.subItems)!=null&&g.some(v=>v.index===f)&&i.value.push(m.index)})}}),(f,m)=>{const g=O4;return C(),F("div",JR,[(C(!0),F($e,null,ot(f.menuItems,v=>(C(),F($e,{key:v.index},[v.subItems?(C(),F("div",XR,[I(g,{class:"ivyforms-menu",mode:"vertical"},{default:V(()=>[I(Zo,{name:v.index,label:v.label,"is-active":s(v.index),"icon-start-config":v.iconConfig,"icon-end-config":{name:i.value.includes(v.index)?"chevron-up":"chevron-down",type:"outline",category:"arrows",size:"s"},size:"d",type:"tonal",priority:"primary",onClick:y=>c(v)},null,8,["name","label","is-active","icon-start-config","icon-end-config","onClick"])]),_:2},1024),i.value.includes(v.index)?(C(),F("div",QR,[z("div",ZR,[(C(!0),F($e,null,ot(v.subItems,(y,b)=>(C(),F("div",{key:y.index,class:ee(["ivyforms-submenu-item ivyforms-ml-32",{"ivyforms-submenu-item--last":b===v.subItems.length-1},{"ivyforms-submenu-item--active":o.value===y.index}]),onClick:_=>d(y.index)},[z("div",tD,[z("div",nD,[b===v.subItems.length-1?(C(),se(h(GR),{key:0,class:"ivyforms-tree-connector"})):(C(),se(h(KR),{key:1,class:"ivyforms-tree-connector"}))]),y.iconConfig?(C(),se(rn,kt({key:0,ref_for:!0},y.iconConfig),null,16)):ie("",!0),z("span",rD,ae(y.label),1)])],10,eD))),128))])])):ie("",!0)])):(C(),se(g,{key:0,class:"ivyforms-menu",mode:"vertical"},{default:V(()=>[I(Zo,{name:v.index,label:v.label,"is-active":o.value===v.index,"icon-start-config":v.iconConfig,size:"d",type:"tonal",priority:"primary",onClick:y=>l(v.index)},null,8,["name","label","is-active","icon-start-config","onClick"])]),_:2},1024))],64))),128))])}}}),aD=he({__name:"SettingsPagePanel",props:{activeIndex:{}},emits:["update:activeIndex"],setup(n,{emit:e}){const{getLabel:t}=at(),r=n,o=e,i=ko(),a=Vr(),s=H(r.activeIndex||"general"),l=O(()=>[{label:t("general"),index:"general"},{label:t("security"),index:"security",autoNavigateToFirst:!0,subItems:[{index:"security/recaptcha",label:"reCAPTCHA",iconConfig:{name:"recaptcha-colored",type:"fill",category:"security",size:"d"}}]}]),c=d=>{if(s.value=d,o("update:activeIndex",d),d==="general")i.push({path:"/general"});else if(d==="security")i.push({path:"/security/recaptcha"});else if(d.startsWith("security/")){const f=d.split("security/")[1];i.push({path:`/security/${f}`})}};return Ht(()=>{const d=a.path;if(d.includes("/security/")){const f=d.split("/security/")[1];f?(s.value=`security/${f}`,o("update:activeIndex",`security/${f}`)):(s.value="security/recaptcha",o("update:activeIndex","security/recaptcha"))}else d.includes("/security")?(s.value="security/recaptcha",o("update:activeIndex","security/recaptcha")):(s.value="general",o("update:activeIndex","general"))}),(d,f)=>{const m=yc;return C(),se(m,null,{default:V(()=>[I(oD,{modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=g=>s.value=g),"menu-items":l.value,"auto-expand-security":!0,"use-router":!1,class:"ivyforms-settings__menu ivyforms-pr-12",onMenuSelect:c},null,8,["modelValue","menu-items"])]),_:1})}}}),iD={class:"ivyforms-page-section ivyforms-flex ivyforms-flex-1 ivyforms-gap-24"},sD=he({__name:"PageSection",setup(n){const e=aa();return(t,r)=>(C(),F("div",iD,[z("div",{class:ee(["ivyforms-page-section__content",{"ivyforms-page-section__content__fullscreen":h(e).isFullScreenMode}])},[xe(t.$slots,"default",{},void 0,!0)],2)]))}}),Hs=bt(sD,[["__scopeId","data-v-2003a857"]]),lD={};function uD(n,e){const t=cc("router-view"),r=Hs;return C(),se(r,null,{default:V(()=>[I(t,null,{default:V(({Component:o})=>[(C(),se(dn(o)))]),_:1})]),_:1})}const cD=bt(lD,[["render",uD]]),dD=he({__name:"SettingsPage",setup(n){const e=aa(),t=O(()=>e.isFullScreenMode),{getLabel:r}=at(),o=ko();Va();const{redirectToWordPressAdminPage:i}=oa(),a=H("settings"),s=H("general"),l=r("settings");Pn("pageTitle",l);const c=[{label:r("all_forms"),index:Oa},{label:r("entries"),index:bo},{label:r("integrations"),index:"integrations"},{label:r("settings"),index:"settings"}],d=m=>{s.value=m,o.push({path:`/${m}/`})},f=m=>{m!==a.value&&(a.value=m,m===Oa?i(xi):m===bo?i(ki):m==="settings"&&i(gc))};return Ht(()=>{(o.currentRoute.value.path==="/"||o.currentRoute.value.path==="")&&(s.value="general",o.push({path:"/general/"}))}),(m,g)=>{const v=zs,y=Oi;return C(),F($e,null,[I(y,null,{left:V(()=>[t.value?(C(),se(Ai,{key:0,mode:"horizontal",ellipsis:!1},{default:V(()=>[(C(),F($e,null,ot(c,b=>I(Zo,{key:b.index,label:b.label,name:b.index,"is-active":a.value===b.index,type:"tonal","coming-soon":b.index==="integrations",onClick:_=>f(b.index)},null,8,["label","name","is-active","coming-soon","onClick"])),64))]),_:1})):ie("",!0)]),default:V(()=>[I(v)]),_:1}),z("div",{class:ee(["ivyforms-settings-page ivyforms-flex ivyforms-gap-8 ivyforms-p-8",{"ivyforms-fullscreen-mode":t.value}])},[I(aD,{"active-index":s.value,"onUpdate:activeIndex":d},null,8,["active-index"]),I(cD,{"active-index":s.value},null,8,["active-index"])],2)],64)}}}),fD=bt(dD,[["__scopeId","data-v-75adfb33"]]),pD={key:0,class:"ivyforms-toogle__text-block"},hD={key:0,class:"ivyforms-toggle__text-block__title ivyforms-flex ivyforms-align-items-center"},mD={key:0,class:"regular-16"},vD={key:1,class:"ivyforms-toogle__text-block__description"},Pi=he({__name:"IvyToggle",props:{modelValue:{type:[Boolean,String,Number],default:""},label:{default:""},disabled:{type:Boolean,default:!1},size:{default:"d"},priority:{default:"primary"},type:{default:"fill"},textPosition:{default:"right"},title:{default:""},description:{default:""},tooltip:{default:""},ariaLabel:{default:""}},emits:["update:modelValue","change"],setup(n,{emit:e}){const{getLabel:t}=at(),r=n,o=e,i=O({get(){return r.modelValue},set(l){o("update:modelValue",l)}}),a=O(()=>r.type==="stroke-with-text"?r.label?r.label:t("on"):""),s=O(()=>r.type==="stroke-with-text"?r.label?r.label:t("off"):"");return(l,c)=>{const d=NA,f=rn,m=xn;return C(),F("div",{class:ee(["ivyforms-toggle",[`text-position-${r.textPosition}`,`size-${r.size}`,`priority-${r.priority}`,`type-${r.type}`,{"is-disabled":r.disabled}]])},[I(d,kt({modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=g=>i.value=g)},{...l.$props,...l.$attrs,size:""},{"inline-prompt":r.type==="stroke-with-text","active-text":a.value,"inactive-text":s.value,"aria-label":r.ariaLabel||h(t)("toggle_switch"),onChange:c[1]||(c[1]=g=>l.$emit("change",g))}),null,16,["modelValue","inline-prompt","active-text","inactive-text","aria-label"]),r.title||r.tooltip||r.description?(C(),F("div",pD,[r.title||r.tooltip?(C(),F("div",hD,[r.title?(C(),F("div",mD,ae(r.title),1)):ie("",!0),r.tooltip?(C(),se(m,{key:1,content:r.tooltip,"raw-content":"",placement:"top",theme:"inverted","aria-label":r.title},{default:V(()=>[I(f,{name:"question",type:"outline",size:"s",color:"var(--map-base-dusk-symbol-2)",onClick:c[2]||(c[2]=lt(()=>{},["prevent"]))})]),_:1},8,["content","aria-label"])):ie("",!0)])):ie("",!0),r.description?(C(),F("div",vD,ae(r.description),1)):ie("",!0)])):ie("",!0)],2)}}}),gD={class:"ivyforms-settings-general ivyforms-flex ivyforms-flex-1 ivyforms-flex-direction-column ivyforms-pr-20"},yD={class:"ivyforms-settings-general__option-bar ivyforms-pb-8 ivyforms-flex"},bD={class:"ivyforms-settings-general__option-bar__left ivyforms-flex"},SD={class:"ivyforms-settings-general__title medium-18"},_D={class:"ivyforms-settings-general__option-bar__right ivyforms-flex"},wD={class:"ivyforms-settings-general__items ivyforms-pb-8 ivyforms-flex"},xD=he({__name:"GeneralSettingsPage",setup(n){const e=hc(),{getLabel:t}=at();Ht(async()=>{await e.loadAllSettings()});const r=async()=>{await e.saveGeneralSettings()};return(o,i)=>{const a=it,s=Pi;return C(),F("div",gD,[z("div",yD,[z("div",bD,[z("span",SD,ae(h(t)("general")),1)]),z("div",_D,[I(a,{class:ee(["ivyforms-button__action--save"]),priority:"primary",onClick:r},{default:V(()=>[De(ae(h(t)("save")),1)]),_:1})])]),z("div",wD,[I(s,{modelValue:h(e).wcagBackendCompliance,"onUpdate:modelValue":i[0]||(i[0]=l=>h(e).wcagBackendCompliance=l),priority:"primary",size:"d","text-position":"right",title:h(t)("wcag_compliance_settings")},null,8,["modelValue","title"])])])}}}),kD=["aria-live"],CD={class:"ivyforms-notification__content ivyforms-flex-1"},ID={key:0,class:"ivyforms-notification__title ivyforms-flex ivyforms-gap-4"},ED={class:"ivyforms-notification__title-text medium-14 ivyforms-flex-1 ivyforms-align-items-center ivyforms-mt-2"},TD={key:1,class:"ivyforms-notification__description ivyforms-flex ivyforms-gap-4"},MD={class:"ivyforms-notification__description-text regular-14 ivyforms-flex-1 ivyforms-align-items-center ivyforms-mt-2"},OD=["href"],AD={key:0,class:"ivyforms-notification__actions ivyforms-flex ivyforms-align-items-center ivyforms-gap-4"},mS=he({__name:"IvyNotification",props:{type:{default:"stripe"},state:{default:"default"},style:{default:"fill"},title:{default:""},description:{default:""},showIcon:{type:Boolean,default:!1},showTitleIcon:{type:Boolean,default:!0},showDescriptionIcon:{type:Boolean,default:!0},showButton:{type:Boolean,default:!1},buttonLabel:{default:""},showLink:{type:Boolean,default:!1},linkText:{default:""},linkUrl:{default:""}},emits:["buttonClick"],setup(n,{emit:e}){const{getLabel:t}=at(),{isDark:r}=Ag(),o=n,i=e,a=()=>{switch(o.state){case"success":case"notes":return"check-circle";case"danger":case"warning":return"danger";case"upcoming":return"upcoming-soon-colored";case"pro":return"bolt-lightning";default:return"info"}},s=()=>{switch(o.state){case"success":case"notes":return"primary";case"danger":return"danger";case"warning":return"warning";case"upcoming":case"pro":return"secondary";default:return"tertiary"}},l=()=>{switch(o.state){case"default":return"border";default:return"fill"}},c=()=>{switch(o.state){case"pro":return"fill";case"upcoming":return r()?"outline":"fill";default:return"fill-duo"}},d=()=>{switch(o.state){case"upcoming":return"promotion";default:return"global"}},f=()=>{switch(o.state){case"success":return"var(--map-status-success-symbol-0)";case"danger":return"var(--map-status-error-symbol-0)";case"warning":return"var(--map-status-warning-symbol-0)";case"upcoming":return"var(--map-base-purple-symbol-0)";case"pro":return"var(--map-accent-amber-symbol-0)";case"notes":return"var(--map-status-success-symbol-0)";default:return"var(--map-base-dusk-symbol-0)"}},m=()=>a(),g=()=>c(),v=()=>d(),y=()=>f(),b=()=>a(),_=()=>c(),w=()=>d(),T=()=>f(),k=()=>{i("buttonClick")};return(x,M)=>(C(),F("div",{class:ee(["ivyforms-notification ivyforms-flex ivyforms-align-items-center ivyforms-gap-12 ivyforms-p-8",`ivyforms-notification--type-${x.type}`,`ivyforms-notification--state-${x.state}`,`ivyforms-notification--style-${x.style}`]),role:"alert","aria-live":x.state==="danger"?"assertive":"polite"},[z("div",CD,[x.title?(C(),F("div",ID,[x.showTitleIcon?(C(),se(rn,{key:0,name:m(),type:g(),category:v(),size:"s",color:y(),class:"ivyforms-notification__title-icon"},null,8,["name","type","category","color"])):ie("",!0),z("span",ED,ae(x.title),1)])):ie("",!0),x.description?(C(),F("div",TD,[x.showDescriptionIcon?(C(),se(rn,{key:0,name:b(),type:_(),category:w(),size:"s",color:T(),class:"ivyforms-notification__description-icon ivyforms-mt-2"},null,8,["name","type","category","color"])):ie("",!0),z("span",MD,[De(ae(x.description)+" ",1),x.showLink?(C(),F("a",{key:0,class:"ivyforms-notification__description-text__link",href:x.linkUrl,target:"_blank"},ae(x.linkText),9,OD)):ie("",!0)])])):ie("",!0)]),x.showButton||x.$slots.actions?(C(),F("div",AD,[xe(x.$slots,"actions",{},()=>[x.showButton?(C(),se(it,{key:0,priority:s(),type:l(),size:"xs",onClick:k},{default:V(()=>[De(ae(x.buttonLabel||h(t)("action")),1)]),_:1},8,["priority","type"])):ie("",!0)])])):ie("",!0)],10,kD))}}),PD=[{label:"browser_default",value:""},{label:"Arabic",value:"ar"},{label:"Afrikaans",value:"af"},{label:"Amharic",value:"am"},{label:"Armenian",value:"hy"},{label:"Azerbaijani",value:"az"},{label:"Basque",value:"eu"},{label:"Bengali",value:"bn"},{label:"Bulgarian",value:"bg"},{label:"Catalan",value:"ca"},{label:"Chinese (Hong Kong)",value:"zh-HK"},{label:"Chinese (Simplified)",value:"zh-CN"},{label:"Chinese (Traditional)",value:"zh-TW"},{label:"Croatian",value:"hr"},{label:"Czech",value:"cs"},{label:"Danish",value:"da"},{label:"Dutch *",value:"nl"},{label:"English (UK)",value:"en-GB"},{label:"English (US) *",value:"en"},{label:"Estonian",value:"et"},{label:"Filipino",value:"fil"},{label:"Finnish",value:"fi"},{label:"French *",value:"fr"},{label:"French (Canadian)",value:"fr-CA"},{label:"Galician",value:"gl"},{label:"Georgian",value:"ka"},{label:"German *",value:"de"},{label:"German (Austria)",value:"de-AT"},{label:"German (Switzerland)",value:"de-CH"},{label:"Greek",value:"el"},{label:"Gujarati",value:"gu"},{label:"Hebrew",value:"iw"},{label:"Hindi",value:"hi"},{label:"Hungarian",value:"hu"},{label:"Icelandic",value:"is"},{label:"Indonesian",value:"id"},{label:"Italian *",value:"it"},{label:"Japanese",value:"ja"},{label:"Kannada",value:"kn"},{label:"Korean",value:"ko"},{label:"Laothian",value:"lo"},{label:"Latvian",value:"lv"},{label:"Lithuanian",value:"lt"},{label:"Malay",value:"ms"},{label:"Malayalam",value:"ml"},{label:"Marathi",value:"mr"},{label:"Mongolian",value:"mn"},{label:"Norwegian",value:"no"},{label:"Persian",value:"fa"},{label:"Polish",value:"pl"},{label:"Portuguese *",value:"pt"},{label:"Portuguese (Brazil)",value:"pt-BR"},{label:"Portuguese (Portugal)",value:"pt-PT"},{label:"Romanian",value:"ro"},{label:"Russian",value:"ru"},{label:"Serbian",value:"sr"},{label:"Sinhalese",value:"si"},{label:"Slovak",value:"sk"},{label:"Slovenian",value:"sl"},{label:"Spanish *",value:"es"},{label:"Spanish (Latin America)",value:"es-419"},{label:"Swahili",value:"sw"},{label:"Swedish",value:"sv"},{label:"Tamil",value:"ta"},{label:"Telugu",value:"te"},{label:"Thai",value:"th"},{label:"Turkish",value:"tr"},{label:"Ukrainian",value:"uk"},{label:"Urdu",value:"ur"},{label:"Vietnamese",value:"vi"},{label:"Zulu",value:"zu"}],$D=["id"],Us=he({__name:"IvyTabs",props:{background:{type:Boolean,default:!1},comingSoon:{type:Boolean},priority:{default:"primary"},size:{default:"d"},type:{default:"filled"},tabStyle:{default:"fill"},modelValue:{},position:{default:"top"},addTab:{type:Boolean,default:!1},stretch:{type:Boolean,default:!0},minWidth:{default:"50px"},tabs:{}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=H([...t.tabs]),o=e,i=O({get:()=>t.modelValue,set:c=>o("update:modelValue",c)}),a=()=>{const c=`tab-${eE(6)}`;r.value.push({name:c,label:`Page ${r.value.length+1}`}),i.value=c},s=()=>{var c;r.value=r.value.filter(d=>d.name!==i.value),r.value.length>0&&(i.value=((c=r.value[0])==null?void 0:c.name)||"")};Ht(()=>{document.addEventListener("keydown",l)}),xs(()=>{document.removeEventListener("keydown",l)});const l=c=>{if(!r.value.length)return;const d=r.value.findIndex(f=>f.name===i.value);if(d!==-1){if(c.key==="ArrowRight"){let f=(d+1)%r.value.length;for(;r.value[f].disabled&&f!==d;)f=(f+1)%r.value.length;f!==d&&(i.value=r.value[f].name)}else if(c.key==="ArrowLeft"){let f=(d-1+r.value.length)%r.value.length;for(;r.value[f].disabled&&f!==d;)f=(f-1+r.value.length)%r.value.length;f!==d&&(i.value=r.value[f].name)}}};return(c,d)=>{const f=s$,m=i$,g=Ns;return C(),F("div",{class:ee(["ivyforms-tabs-wrapper",`tab-style-${c.tabStyle}`,{"bg-transparent":!c.background}])},[I(m,{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=v=>i.value=v),type:"card","tab-position":c.position,addable:c.addTab,editable:c.addTab,stretch:c.stretch,class:ee([`size-${c.size}`,"ivyforms-tabs-group",`priority-${c.priority}`,`type-${c.type}`,`tab-style-${c.tabStyle}`,{"bg-transparent":!c.background}]),onTabAdd:a,onTabRemove:s},{default:V(()=>[(C(!0),F($e,null,ot(r.value,v=>(C(),se(f,{id:`pane-${v.name}`,key:v.name,name:v.name,"aria-labelledby":`tab-${v.name}`,role:"tabpanel","aria-live":"polite",disabled:v.disabled,type:{minWidth:t.minWidth},onClick:y=>!v.disabled&&(i.value=v.name)},{label:V(()=>{var y;return[z("span",{id:`tab-${v.name}`,class:"ivyforms-tab-label-wrapper"},[(y=v.iconConfig)!=null&&y.name?(C(),se(rn,kt({key:0,ref_for:!0},v.iconConfig,{"aria-hidden":"true"}),null,16)):ie("",!0),De(" "+ae(v.label),1)],8,$D)]}),default:V(()=>[xe(c.$slots,v.name)]),_:2},1032,["id","name","aria-labelledby","disabled","type","onClick"]))),128))]),_:3},8,["modelValue","tab-position","addable","editable","stretch","class"]),t.comingSoon?(C(),se(g,{key:0})):ie("",!0)],2)}}}),RD={class:"ivyforms-checkbox__label-with-tooltip"},DD={key:0,class:"ivyforms-checkbox__description"},pn=he({__name:"IvyCheckbox",props:{modelValue:{type:Boolean},indeterminate:{type:Boolean,default:!1},labelPosition:{default:"right"},description:{default:""},priority:{default:"primary"},size:{default:"d"},type:{default:"withMarker"},disabled:{type:Boolean,default:!1},ariaLabel:{default:""},tooltip:{default:""}},emits:["update:modelValue","change"],setup(n,{emit:e}){const{getLabel:t}=at(),r=n,o=e,i=O({get(){return r.modelValue},set(a){o("update:modelValue",a)}});return(a,s)=>{const l=rn,c=xn,d=gT;return a.$slots.default?(C(),se(d,{key:0,modelValue:i.value,"onUpdate:modelValue":s[1]||(s[1]=f=>i.value=f),class:ee(["ivyforms-checkbox",[`size-${r.size}`,`priority-${r.priority}`,`type-${r.type}`,r.labelPosition==="left"?"label-left":"label-right",{"with-description":r.description},{"is-checked":i.value,"is-indeterminate":r.indeterminate,"is-disabled":r.disabled,"with-marker":r.type==="withMarker"}]]),disabled:r.disabled,"aria-label":r.ariaLabel||h(t)("checkbox"),onChange:s[2]||(s[2]=f=>a.$emit("change",f))},{default:V(()=>[z("span",RD,[xe(a.$slots,"default"),r.tooltip?(C(),se(c,{key:0,content:r.tooltip,"raw-content":"",placement:"top"},{default:V(()=>[I(l,{name:"question",type:"outline",size:"s",color:"var(--map-base-dusk-symbol-2)",class:"ivyforms-checkbox__tooltip-icon",onClick:s[0]||(s[0]=lt(()=>{},["prevent"]))})]),_:1},8,["content"])):ie("",!0)]),r.description?(C(),F("span",DD,ae(r.description),1)):ie("",!0)]),_:3},8,["modelValue","class","disabled","aria-label"])):ie("",!0)}}}),ND={class:"ivyforms-settings-security ivyforms-flex ivyforms-flex-1 ivyforms-flex-direction-column ivyforms-pr-20"},FD={class:"ivyforms-settings-security__option-bar ivyforms-pb-8 ivyforms-flex"},LD={class:"ivyforms-settings-security__option-bar__left ivyforms-flex"},BD={class:"ivyforms-settings-security__title medium-18"},VD={class:"ivyforms-settings-security__option-bar__right ivyforms-flex ivyforms-gap-8"},zD={class:"ivyforms-settings-security__content ivyforms-pt-20 ivyforms-flex ivyforms-flex-direction-column ivyforms-flex-1 ivyforms-gap-24"},HD={class:"ivyforms-settings-security__content__wrapper ivyforms-flex ivyforms-flex-direction-column ivyforms-p-24 ivyforms-gap-24"},UD={class:"ivyforms-settings-security__tabs"},WD={class:"ivyforms-settings-security__field ivyforms-flex ivyforms-flex-direction-column"},jD={for:"site-key",class:"ivyforms-settings-security__field-label medium-14 ivyforms-mb-6"},KD={class:"ivyforms-settings-security__field ivyforms-flex ivyforms-flex-direction-column"},YD={for:"secret-key",class:"ivyforms-settings-security__field-label medium-14 ivyforms-mb-6"},qD={class:"ivyforms-settings-security__field ivyforms-flex ivyforms-flex-direction-column"},GD={class:"ivyforms-settings-security__field-label medium-14 ivyforms-mb-6"},JD={class:"ivyforms-settings-security__field ivyforms-flex ivyforms-flex-direction-column"},XD={for:"hcaptcha-site-key",class:"ivyforms-settings-security__field-label medium-14 ivyforms-mb-6"},QD={class:"ivyforms-settings-security__field ivyforms-flex ivyforms-flex-direction-column"},ZD={for:"hcaptcha-secret-key",class:"ivyforms-settings-security__field-label medium-14 ivyforms-mb-6"},eN={class:"ivyforms-settings-security__field ivyforms-flex ivyforms-flex-direction-column"},tN={for:"turnstile-site-key",class:"ivyforms-settings-security__field-label medium-14 ivyforms-mb-6"},nN={class:"ivyforms-settings-security__field ivyforms-flex ivyforms-flex-direction-column"},rN={for:"turnstile-secret-key",class:"ivyforms-settings-security__field-label medium-14 ivyforms-mb-6"},oN={key:3,class:"ivyforms-settings-security__field ivyforms-flex ivyforms-flex-direction-column"},aN={class:"ivyforms-settings-security__field-label medium-14 ivyforms-mb-6"},iN={class:"ivyforms-settings-security__field-description medium-14 ivyforms-mb-12"},sN={class:"ivyforms-settings-security__toggle"},lN=he({__name:"SecuritySettingsPage",setup(n){const{getLabel:e}=at(),t=hc(),r=Vr(),o=[{name:"v2",label:"v2"},{name:"invisible",label:"Invisible v2"},{name:"v3",label:"v3"}],i=O(()=>r.params.provider||"recaptcha"),a=()=>{switch(i.value){case"recaptcha":return"reCAPTCHA";case"hcaptcha":return"hCaptcha";case"turnstile":return"Turnstile";case"honeypot":return"Honeypot";default:return"reCAPTCHA"}},s=O({get:()=>t.recaptchaType,set:G=>t.setRecaptchaType(G)}),l=O({get:()=>t.recaptchaSiteKey,set:G=>t.setRecaptchaSiteKey(G)}),c=O({get:()=>t.recaptchaSecretKey,set:G=>t.setRecaptchaSecretKey(G)}),d=O({get:()=>t.recaptchaLanguage,set:G=>t.setRecaptchaLanguage(G)}),f=H(""),m=H(""),g=H(""),v=H(""),y=H(!1),b=O(()=>t.isLoading),_=O(()=>PD.map(G=>({...G,label:G.value===""?e("browser_default"):G.label}))),w=G=>{G?t.setRecaptchaType(G):t.setRecaptchaType(s.value)},T=()=>{t.setRecaptchaSiteKey(l.value)},k=()=>{t.setRecaptchaSecretKey(c.value)},x=()=>{t.setRecaptchaLanguage(d.value)},M=()=>{window.open("https://cloud.google.com/security/products/recaptcha","_blank")},D=()=>{},A=()=>{},P=()=>{},$=()=>{},B=()=>{},j=()=>{switch(i.value){case"recaptcha":t.setRecaptchaSiteKey(""),t.setRecaptchaSecretKey(""),t.setRecaptchaLanguage("");break;case"hcaptcha":f.value="",m.value="";break;case"turnstile":g.value="",v.value="";break;case"honeypot":y.value=!1;break}},U=async()=>{switch(i.value){case"recaptcha":await t.saveRecaptchaSettings();break}};return Ht(async()=>{await t.loadAllSettings(),t.recaptchaType||t.setRecaptchaType("v2")}),(G,N)=>{const R=it,X=mS,te=cn;return C(),F("div",ND,[z("div",FD,[z("div",LD,[z("span",BD,ae(a()),1)]),z("div",VD,[I(R,{class:ee(["ivyforms-button__action--reset"]),priority:"tertiary",type:"fill",onClick:j},{default:V(()=>[De(ae(h(e)("clear")),1)]),_:1}),I(R,{class:ee(["ivyforms-button__action--save"]),priority:"primary",loading:b.value,onClick:U},{default:V(()=>[b.value?ie("",!0):(C(),F($e,{key:0},[De(ae(h(e)("save")),1)],64))]),_:1},8,["loading"])])]),z("div",zD,[i.value==="recaptcha"?(C(),F($e,{key:0},[z("div",HD,[z("div",UD,[I(Us,{modelValue:s.value,"onUpdate:modelValue":[N[0]||(N[0]=Y=>s.value=Y),w],tabs:o,size:"d",priority:"tertiary",type:"tonal",width:200,background:!0},null,8,["modelValue"])]),I(X,{type:"stripe",state:"notes",style:"stripe","show-button":!0,"button-label":h(e)("learn_more"),"show-title-icon":!1,"show-description-icon":!0,description:h(e)("recaptcha_instruction"),onButtonClick:M},null,8,["button-label","description"]),z("div",WD,[z("label",jD,ae(h(e)("captcha_site_key")),1),I(te,{modelValue:l.value,"onUpdate:modelValue":[N[1]||(N[1]=Y=>l.value=Y),T],type:"text",placeholder:h(e)("enter_site_key")},null,8,["modelValue","placeholder"])]),z("div",KD,[z("label",YD,ae(h(e)("captcha_secret_key")),1),I(te,{modelValue:c.value,"onUpdate:modelValue":[N[2]||(N[2]=Y=>c.value=Y),k],type:"text",placeholder:h(e)("enter_secret_key")},null,8,["modelValue","placeholder"])])]),z("div",qD,[z("label",GD,ae(h(e)("recaptcha_language")),1),I(Ls,{modelValue:d.value,"onUpdate:modelValue":[N[3]||(N[3]=Y=>d.value=Y),x],placeholder:h(e)("browser_default")},{default:V(()=>[(C(!0),F($e,null,ot(_.value,Y=>(C(),se(Fs,{key:Y.value,value:Y.value,label:Y.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"])])],64)):i.value==="hcaptcha"?(C(),F($e,{key:1},[z("div",JD,[z("label",XD,ae(h(e)("captcha_site_key")),1),I(te,{modelValue:f.value,"onUpdate:modelValue":[N[4]||(N[4]=Y=>f.value=Y),D],type:"text",placeholder:"{{ getLabel('enter_hcaptcha_site_key') }}"},null,8,["modelValue"])]),z("div",QD,[z("label",ZD,ae(h(e)("captcha_secret_key")),1),I(te,{modelValue:m.value,"onUpdate:modelValue":[N[5]||(N[5]=Y=>m.value=Y),A],type:"text",placeholder:"{{ getLabel('enter_hcaptcha_secret_key') }}"},null,8,["modelValue"])])],64)):i.value==="turnstile"?(C(),F($e,{key:2},[z("div",eN,[z("label",tN,ae(h(e)("captcha_site_key")),1),I(te,{modelValue:g.value,"onUpdate:modelValue":[N[6]||(N[6]=Y=>g.value=Y),P],type:"text",placeholder:"{{ getLabel('enter_turnstile_site_key') }}"},null,8,["modelValue"])]),z("div",nN,[z("label",rN,ae(h(e)("captcha_secret_key")),1),I(te,{modelValue:v.value,"onUpdate:modelValue":[N[7]||(N[7]=Y=>v.value=Y),$],type:"text",placeholder:"{{ getLabel('enter_turnstile_secret_key') }}"},null,8,["modelValue"])])],64)):i.value==="honeypot"?(C(),F("div",oN,[z("label",aN,ae(h(e)("honeypot_protection")),1),z("p",iN,ae(h(e)("honeypot_protection_description")),1),z("div",sN,[I(pn,{modelValue:y.value,"onUpdate:modelValue":N[8]||(N[8]=Y=>y.value=Y),label:h(e)("enable_honeypot_protection"),onChange:B},null,8,["modelValue","label"])])])):ie("",!0)])])}}}),uN=bt(lN,[["__scopeId","data-v-c21c50b3"]]),Cp=dS?window:void 0;function yu(n){var e;const t=No(n);return(e=t==null?void 0:t.$el)!=null?e:t}function ka(...n){const e=[],t=()=>{e.forEach(s=>s()),e.length=0},r=(s,l,c,d)=>(s.addEventListener(l,c,d),()=>s.removeEventListener(l,c,d)),o=O(()=>{const s=_m(No(n[0])).filter(l=>l!=null);return s.every(l=>typeof l!="string")?s:void 0}),i=mR(()=>{var s,l;return[(l=(s=o.value)==null?void 0:s.map(c=>yu(c)))!=null?l:[Cp].filter(c=>c!=null),_m(No(o.value?n[1]:n[0])),_m(h(o.value?n[2]:n[1])),No(o.value?n[3]:n[2])]},([s,l,c,d])=>{if(t(),!(s!=null&&s.length)||!(l!=null&&l.length)||!(c!=null&&c.length))return;const f=uR(d)?{...d}:d;e.push(...s.flatMap(m=>l.flatMap(g=>c.map(v=>r(m,g,v,f)))))},{flush:"post"}),a=()=>{i(),t()};return cS(t),a}let Kb=!1;function Ov(n,e,t={}){const{window:r=Cp,ignore:o=[],capture:i=!0,detectIframe:a=!1}=t;if(!r)return Sm;if(cR&&!Kb){Kb=!0;const y={passive:!0};Array.from(r.document.body.children).forEach(b=>ka(b,"click",Sm,y)),ka(r.document.documentElement,"click",Sm,y)}let s=!0;const l=y=>No(o).some(b=>{if(typeof b=="string")return Array.from(r.document.querySelectorAll(b)).some(_=>_===y.target||y.composedPath().includes(_));{const _=yu(b);return _&&(y.target===_||y.composedPath().includes(_))}});function c(y){const b=No(y);return b&&b.$.subTree.shapeFlag===16}function d(y,b){const _=No(y),w=_.$.subTree&&_.$.subTree.children;return w==null||!Array.isArray(w)?!1:w.some(T=>T.el===b.target||b.composedPath().includes(T.el))}const f=y=>{const b=yu(n);if(y.target!=null&&!(!(b instanceof Element)&&c(n)&&d(n,y))&&!(!b||b===y.target||y.composedPath().includes(b))){if(y.detail===0&&(s=!l(y)),!s){s=!0;return}e(y)}};let m=!1;const g=[ka(r,"click",y=>{m||(m=!0,setTimeout(()=>{m=!1},0),f(y))},{passive:!0,capture:i}),ka(r,"pointerdown",y=>{const b=yu(n);s=!l(y)&&!!(b&&!y.composedPath().includes(b))},{passive:!0}),a&&ka(r,"blur",y=>{setTimeout(()=>{var b;const _=yu(n);((b=r.document.activeElement)==null?void 0:b.tagName)==="IFRAME"&&!(_!=null&&_.contains(r.document.activeElement))&&e(y)},0)},{passive:!0})].filter(Boolean);return()=>g.forEach(y=>y())}function cN(){const n=H(!1),e=Kn();return e&&Ht(()=>{n.value=!0},e),n}function dN(n){const e=cN();return O(()=>(e.value,!!n()))}const fN=Symbol("vueuse-ssr-width");function vS(){const n=J3()?sR(fN,null):null;return typeof n=="number"?n:void 0}function cu(n,e={}){const{window:t=Cp,ssrWidth:r=vS()}=e,o=dN(()=>t&&"matchMedia"in t&&typeof t.matchMedia=="function"),i=H(typeof r=="number"),a=Fr(),s=H(!1),l=c=>{s.value=c.matches};return pc(()=>{if(i.value){i.value=!o.value;const c=No(n).split(",");s.value=c.some(d=>{const f=d.includes("not all"),m=d.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),g=d.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let v=!!(m||g);return m&&v&&(v=r>=Mu(m[1])),g&&v&&(v=r<=Mu(g[1])),f?!v:v});return}o.value&&(a.value=t.matchMedia(No(n)),s.value=a.value.matches)}),ka(a,"change",l,{passive:!0}),O(()=>s.value)}function pN(n,e={}){function t(g,v){let y=No(n[No(g)]);return v!=null&&(y=fR(y,v)),typeof y=="number"&&(y=`${y}px`),y}const{window:r=Cp,strategy:o="min-width",ssrWidth:i=vS()}=e,a=typeof i=="number",s=a?H(!1):{value:!0};a&&hR(()=>s.value=!!r);function l(g,v){return!s.value&&a?g==="min"?i>=Mu(v):i<=Mu(v):r?r.matchMedia(`(${g}-width: ${v})`).matches:!1}const c=g=>cu(()=>`(min-width: ${t(g)})`,e),d=g=>cu(()=>`(max-width: ${t(g)})`,e),f=Object.keys(n).reduce((g,v)=>(Object.defineProperty(g,v,{get:()=>o==="min-width"?c(v):d(v),enumerable:!0,configurable:!0}),g),{});function m(){const g=Object.keys(n).map(v=>[v,f[v],Mu(t(v))]).sort((v,y)=>v[2]-y[2]);return O(()=>g.filter(([,v])=>v.value).map(([v])=>v))}return Object.assign(f,{greaterOrEqual:c,smallerOrEqual:d,greater(g){return cu(()=>`(min-width: ${t(g,.1)})`,e)},smaller(g){return cu(()=>`(max-width: ${t(g,-.1)})`,e)},between(g,v){return cu(()=>`(min-width: ${t(g)}) and (max-width: ${t(v,-.1)})`,e)},isGreater(g){return l("min",t(g,.1))},isGreaterOrEqual(g){return l("min",t(g))},isSmaller(g){return l("max",t(g,-.1))},isSmallerOrEqual(g){return l("max",t(g))},isInBetween(g,v){return l("min",t(g))&&l("max",t(v,-.1))},current:m,active(){const g=m();return O(()=>g.value.length===0?"":g.value.at(o==="min-width"?-1:0))}})}function gS(n,e={}){const{threshold:t=50,onSwipe:r,onSwipeEnd:o,onSwipeStart:i,passive:a=!0}=e,s=Tn({x:0,y:0}),l=Tn({x:0,y:0}),c=O(()=>s.x-l.x),d=O(()=>s.y-l.y),{max:f,abs:m}=Math,g=O(()=>f(m(c.value),m(d.value))>=t),v=H(!1),y=O(()=>g.value?m(c.value)>m(d.value)?c.value>0?"left":"right":d.value>0?"up":"down":"none"),b=D=>[D.touches[0].clientX,D.touches[0].clientY],_=(D,A)=>{s.x=D,s.y=A},w=(D,A)=>{l.x=D,l.y=A},T={passive:a,capture:!a},k=D=>{v.value&&(o==null||o(D,y.value)),v.value=!1},x=[ka(n,"touchstart",D=>{if(D.touches.length!==1)return;const[A,P]=b(D);_(A,P),w(A,P),i==null||i(D)},T),ka(n,"touchmove",D=>{if(D.touches.length!==1)return;const[A,P]=b(D);w(A,P),T.capture&&!T.passive&&Math.abs(c.value)>Math.abs(d.value)&&D.preventDefault(),!v.value&&g.value&&(v.value=!0),v.value&&(r==null||r(D))},T),ka(n,["touchend","touchcancel"],k,T)];return{isSwiping:v,direction:y,coordsStart:s,coordsEnd:l,lengthX:c,lengthY:d,stop:()=>x.forEach(D=>D()),isPassiveEventSupported:!0}}const hN=()=>{const n=pN({tabletStart:768,desktopSmallStart:1024,desktopLargeStart:1200}),e=n.smaller("tabletStart"),t=n.between("tabletStart","desktopSmallStart"),r=n.greaterOrEqual("desktopSmallStart"),o=n.between("desktopSmallStart","desktopLargeStart"),i=n.greaterOrEqual("desktopLargeStart");return{isMobile:e,isTablet:t,isDesktop:r,isDesktopSmall:o,isDesktopLarge:i}};function mN(n,e){return!e||!n?!0:Math.ceil(n/e)<=1}const Ip=he({__name:"IvyPagination",props:{total:{type:Number,default:0},pageSize:{type:Number,default:10},currentPage:{type:Number,default:1},background:{type:Boolean,default:!1},more:{type:Boolean,default:!1},count:{type:Boolean,default:!0},ariaLabel:{type:String,default:""}},emits:["update:pageSize","update:currentPage"],setup(n,{emit:e}){const{isMobile:t}=hN(),{getLabel:r}=at(),o=n,i=e,a=H(o.pageSize),s=H(o.currentPage||1);Me(()=>o.pageSize,d=>{a.value=d}),Me(a,d=>{i("update:pageSize",d)}),Me(()=>o.currentPage,d=>{d!==void 0&&(s.value=d)}),Me(s,d=>{i("update:currentPage",d)});const l=O(()=>mN(o.total,a.value)),c=O(()=>l.value?"total, sizes":"total, sizes, prev, pager, next, jumper");return Ht(()=>{Xt(()=>{const d=document.querySelector(".el-pagination__sizes .el-select__input");d&&d.setAttribute("aria-label",r("items_per_page"))})}),(d,f)=>{const m=GO;return C(),se(m,kt({"page-size":a.value,"onUpdate:pageSize":f[0]||(f[0]=g=>a.value=g),"current-page":s.value,"onUpdate:currentPage":f[1]||(f[1]=g=>s.value=g),class:[h(t)?"ivyforms-pagination-mobile":"ivyforms-pagination",{"ivyforms-pagination-single":l.value}],"pager-count":5,"page-sizes":[10,20,30,40],layout:c.value,"aria-label":n.ariaLabel},{...d.$props,...d.$attrs}),null,16,["page-size","current-page","class","layout","aria-label"])}}}),vN={key:0,class:"ivyforms-table__custom-header ivyforms-pt-2"},gN=["onClick"],yN={key:1,style:{display:"flex","align-items":"center",gap:"8px"}},bN={style:{opacity:"0.5",cursor:"not-allowed"}},SN={key:2},_N={key:3,style:{"margin-left":"5px"}},wN={key:0},xN={key:0},kN={key:1},CN={key:1},Ep=he({__name:"IvyTable",props:{data:{},columns:{default:()=>[]},loading:{type:Boolean,default:!1},pagination:{type:Boolean,default:!1},groupBy:{default:""},fixed:{type:Boolean},isCustomHeader:{type:Boolean,default:!1},minTableWidth:{default:240}},emits:["sort-change","width-change"],setup(n,{emit:e}){const t=n,r=e,o=H(document.body.classList.contains("ivyforms-theme-dark")),i=new MutationObserver(()=>{o.value=document.body.classList.contains("ivyforms-theme-dark")}),a=H(null),s=H(0);Ht(()=>{if(a.value){const v=()=>{var _,w;const b=((w=(_=a.value)==null?void 0:_.parentElement)==null?void 0:w.offsetWidth)||t.minTableWidth;s.value=Math.max(t.minTableWidth,Math.floor(b)),r("width-change",s.value)};v(),window.addEventListener("resize",v);const y=new window.ResizeObserver(v);y.observe(a.value),xs(()=>{window.removeEventListener("resize",v),y.disconnect()})}}),i.observe(document.body,{attributes:!0,attributeFilter:["class"]}),xs(()=>{i.disconnect()});const l=()=>{var M;const y=t.data.length+1,b=y*50,_=document.querySelector(".ivyforms-table__container"),w=(M=_==null?void 0:_.parentElement)==null?void 0:M.parentElement,T=w?w.offsetHeight:0,k=t.pagination?T-160:T,x=y>1?0:550;return Math.max(x,Math.min(b,k))},c=O(()=>{var v;return((v=t.columns)==null?void 0:v.filter(y=>y.visible).map(y=>({...y,sortable:y.sortable||!1,headerRenderer:y.headerRenderer||void 0,cellRenderer:y.cellRenderer||(b=>Fe("span",{},b.rowData[y.key])),minWidth:typeof y.minWidth=="string"?parseInt(y.minWidth,10)||100:y.minWidth,width:typeof y.width=="string"?parseInt(y.width,10)||100:y.width})))||[]}),d=H(null),f=H(null),m=v=>{if(!v.sortable)return;d.value===v.key?f.value=f.value==="asc"?"desc":"asc":(d.value=v.key,f.value="asc");const y={column:d.value,order:f.value};r("sort-change",y)},g=({rowData:v})=>{const y=[];return v.status==="unread"&&y.push("ivyforms-unread-entry"),v.selected&&y.push("is-selected"),y.join(" ")};return(v,y)=>{const b=Ns,_=rn,w=WP,T=jP;return C(),F("div",{ref_key:"tableContainerRef",ref:a,class:"ivyforms-table__container",style:Sn({position:"relative",width:s.value+"px"})},[v.isCustomHeader?(C(),F("div",vN,[xe(v.$slots,"header")])):ie("",!0),I(T,{class:ee({loading:t.loading})},{default:V(({width:k})=>[I(w,kt({ref:"tableV2Ref"},v.$attrs,{columns:c.value,data:t.data,width:Math.max(k,t.minTableWidth),height:l(),class:"ivyforms-table",fixed:t.fixed,"row-class":g,"h-scrollbar-size":20,"v-scrollbar-size":10}),{"header-cell":V(({column:x})=>[z("div",{style:Sn({display:"flex",alignItems:"center",cursor:x.sortable?"pointer":"default"}),onClick:M=>m(x)},[x.headerRenderer?(C(),se(dn(x.headerRenderer()),{key:0})):x.comingSoon?(C(),F("div",yN,[z("div",bN,ae(x.title),1),I(b,{size:"s"})])):(C(),F("span",SN,ae(x.title),1)),x.sortable?(C(),F("span",_N,[d.value===x.key?(C(),F("span",wN,[f.value==="asc"?(C(),F("span",xN,[I(_,{size:"d","outer-size":"20px",name:o.value?"sort-asc-dark":"sort-asc",category:"table"},null,8,["name"])])):f.value==="desc"?(C(),F("span",kN,[I(_,{size:"d","outer-size":"20px",name:o.value?"sort-desc-dark":"sort-desc",category:"table"},null,8,["name"])])):ie("",!0)])):(C(),F("span",CN,[I(_,{size:"d","outer-size":"20px",name:"arrow-up-down-2",category:"arrows",type:"outline",color:"var(--map-base-dusk-symbol-2)"})]))])):ie("",!0)],12,gN)]),empty:V(()=>[xe(v.$slots,"empty")]),_:2},1040,["columns","data","width","height","fixed"])]),_:3},8,["class"])],4)}}}),IN={xmlns:"http://www.w3.org/2000/svg",width:"199",height:"200",fill:"none"};function EN(n,e){return C(),F("svg",IN,e[0]||(e[0]=[Ba('<path fill="#8B929C" fill-opacity=".3" d="M172.234 99.896c0 41.062-33.288 74.349-74.35 74.349s-74.35-33.287-74.35-74.35c0-41.061 33.288-74.35 74.35-74.35s74.35 33.289 74.35 74.35" opacity=".44"></path><mask id="a" width="150" height="150" x="23" y="25" maskUnits="userSpaceOnUse" style="mask-type:alpha;"><path fill="#232E3C" d="M172.234 99.896c0 41.062-33.288 74.349-74.35 74.349s-74.35-33.287-74.35-74.35c0-41.061 33.288-74.35 74.35-74.35s74.35 33.289 74.35 74.35"></path></mask><g mask="url(#a)"><path fill="#37C6AB" d="M85.747 109.575c1.092.289 1.697 1.073 1.766 2.106.12 1.692-4.503 3.03-5.627 4.401-1.114 1.373-3.098 8.207-5.709 10.032 0 0-6.638 3.851-12.797 2.885-3.536-.554-5.83-6.445-9.382-6.011.489-.102 4.55-5.68 8.5-6.906 1.514-.466 3.76 3.605 4.68 3.116.11-.053.213-.114.306-.168 3.139-1.882 6.36-2.668 7.98-3.961.495-.385 1.12-.962 1.825-1.602 1.656-1.465 3.763-3.238 5.735-3.764 1.107-.29 2.016-.31 2.723-.128"></path><path fill="#C53434" d="M85.747 109.575c1.092.289 1.697 1.073 1.766 2.106.12 1.691-4.503 3.03-5.627 4.401-1.114 1.373-3.278 8.092-5.888 9.917 0 0-6.233 3.947-12.618 3-3.402-.505-5.997-6.425-9.382-6.011.489-.102 5.433 3.738 9.383 2.511 10.454.099 9.913-4.495 17.55-10.574 3.063-2.436 6.122-2.882 4.816-5.35" opacity=".14"></path><path fill="#01384D" d="M77.29 113.467c.033.082.058.165.092.247.119.329.242.673.182 1.013-.053.34-.278.629-.505.887a10.86 10.86 0 0 1-7.316 3.624c-.852.059-1.706.018-2.563-.04.109-.053.211-.114.305-.169 3.138-1.881 6.36-2.667 7.98-3.96.495-.387 1.12-.962 1.825-1.602" opacity=".59"></path><path fill="#37C6AB" d="M66.952 145.294s7.275 4.972 8.908 10.325c1.634 5.355.23 8.16-.534 9.434 0 0 6.374-1.403 9.18 0 2.804 1.401 1.783 4.787-1.531 5.006-3.314.221-7.393-1.31-14.022-.673-6.63.639-8.814.256-9.25-2.676-.438-2.931-4.185-20.906 7.249-21.416"></path><path fill="#C53434" d="M66.952 145.294s7.275 4.972 8.908 10.325c1.634 5.355.23 8.16-.534 9.434 0 0 6.374-1.403 9.18 0 2.804 1.401 1.783 4.787-1.531 5.006-3.314.221-7.393-1.31-14.022-.673-6.63.639-8.814.256-9.25-2.676-.438-2.931-4.185-20.906 7.249-21.416" opacity=".14"></path><path fill="#37C6AB" d="M73.545 160.593c-.513 5.606-6.118 7.136-10.6 7.901q-1.046.173-2.226.267c-2.731.229-6.035.177-9.967.161-2.072 0-4.329 0-6.76.061l-.75.023c-5.506.16-13.782 1.828-19.19.612l-.298-.069c-2.937-.742-4.956-2.393-5.116-5.706 0-.099-.009-.215-.009-.32-.007-.819.047-1.676.154-2.556.382-3.143 1.437-6.638 2.792-10.225a131 131 0 0 1 2.247-5.561c1.822-4.267 3.763-8.475 5.202-12.222a52 52 0 0 0 1.139-3.235c.03-.077.054-.16.077-.237 1.599-5.239 2.203-10.585 2.425-14.387.183-3.242.09-5.369.09-5.369s2.984 3.151 9.868 4.719c1.53.351 3.25.619 5.17.758 4.887.352 8.857-.513 11.71-1.561a.2.2 0 0 0 .054-.014c.083-.032.16-.062.245-.093.014 0 .03-.008.045-.015 3.112-1.185 4.81-2.524 4.81-2.524a20 20 0 0 0-.305 4.283c.107 3.618 1.055 7.067 1.866 10.409.475 1.935.903 3.833 1.094 5.706.512 5.025-.665 10.134-1.094 12.941-.06.39-.108.742-.13 1.033a4 4 0 0 0-.007.688c.183 1.782 7.977 8.918 7.464 14.532"></path><path fill="#FEF3C6" d="M62.04 147.171c-.627 4.672-1.72 8.536-3.265 10.891-1.063 1.613-2.34 2.525-3.832 2.493-3.128-.062-5.285-1.253-6.685-3.495-.903-1.423-1.491-3.274-1.828-5.523-.214-1.414-.328-2.99-.36-4.71-.014-.88-.008-1.791.016-2.746.03-.865.069-1.767.13-2.7.062-1.064.145-2.164.245-3.312.053-.658.1-1.323.13-1.973.36-9.064-2.256-17.286-3.97-21.645 1.53.351 3.251.619 5.17.757 4.889.352 8.858-.513 11.711-1.56a2.664 2.664 0 0 0 .298-.107c.015 0 .03-.009.046-.016.351 1.293.666 2.624.948 4.001 2.004 9.636 2.417 21.009 1.247 29.645"></path><path fill="#C53434" d="M64.352 115.284a15.1 15.1 0 0 1-3.556 2.24 13 13 0 0 1-1.507.582c-4.39 1.407-9.83.941-11.405 1.361-1.567.421-1.162 4.23-.527 8.299.298 1.889.45 5.292.344 8.788a57 57 0 0 1-.36 5.001 27 27 0 0 1-.405 2.532c-.222 1.071-.497 1.989-.833 2.678-.008.022-.023.038-.03.06-.873 1.828-.383 3.244.358 4.712.796 1.584 1.867 3.228 1.828 5.523-.076 4.45-.29 7.861-2.653 9.903-1.523 1.317 2.302.689 5.146 1.959-2.072 0-4.329 0-6.76.061l-.75.023c-5.506.16-13.782 1.828-19.19.612q-.15-.034-.298-.069c-2.937-.742-4.956-2.393-5.117-5.706 0-.099-.008-.215-.008-.321-.007-.818.047-1.676.153-2.555.383-3.143 1.438-6.638 2.793-10.225a131 131 0 0 1 2.247-5.561c1.822-4.267 3.763-8.475 5.202-12.222a52 52 0 0 0 1.139-3.235c.03-.077.054-.16.077-.237 1.599-5.239 2.203-10.585 2.425-14.387.183-3.242.09-5.369.09-5.369s2.984 3.151 9.868 4.719c1.53.351 3.25.619 5.17.758 4.887.351 8.857-.513 11.71-1.561a.2.2 0 0 0 .053-.014l.245-.094q.022-.002.046-.014c3.112-1.185 4.81-2.524 4.81-2.524a20 20 0 0 0-.305 4.283" opacity=".14"></path><path fill="#37C6AB" d="M74.57 131.692c.194.513.156 1.068-.125 1.635-1.125 2.257-6.052.125-8.008 1.311-1.957 1.197-6.784 8.485-9.108 8.824-2.328.345-6.929-.964-12.709-3.26-4.905-1.962-12.758-8.061-10.907-12.911.941-2.465 4.272-4.32 8.795-4.052 4.37.257 9.866 2.507 15.402 8.111.38.38 5.403-3.49 10.138-2.906 3.537.434 5.992 1.691 6.523 3.248"></path><path fill="#C53434" d="M74.57 131.692c.194.513.156 1.068-.125 1.635-1.125 2.257-6.052.125-8.008 1.311-1.957 1.197-6.784 8.485-9.108 8.824-2.328.345-6.929-.964-12.709-3.26-4.905-1.962-12.758-8.061-10.907-12.911.941-2.465 4.272-4.32 8.795-4.052-6.375 1.343-6.505 5.511 3.098 11.847 10.007 6.597 13.085 3.355 16.372.141 3.291-3.208 5.336-2.715 9.331-2.177 1.16.159 2.26-.395 3.262-1.358" opacity=".14"></path><path fill="#01384D" d="M30.72 140.623c-.291.658-.941 1.071-1.56 1.438-1.76 1.071-3.527 2.142-5.34 3.12 1.822-4.267 3.763-8.473 5.201-12.221.536 1.729 1.003 3.488 1.523 5.17.26.81.52 1.713.176 2.493" opacity=".59"></path><path fill="#37C6AB" d="M49.484 172.334c.016 1.062-.848 2.042-2.194 2.326-2.678.55-4.972-.299-11.427-.429s-11.396 1.017-13.56 0c-.858-.398-1.615-.98-2.219-1.95-.933-1.485-1.491-3.895-1.453-7.994.068-7.289 1.69-12.283 4.23-15.449 2.868-3.595 6.906-4.842 11.189-4.437 2.456.231 4.688 1.141 6.57 2.487v.008c4.298 3.074 6.77 8.474 5.844 13.438-1.34 7.144-9.118 8.413-9.118 8.413 2.417-.123 4.842-.382 9.118.818 2.117.597 3.005 1.72 3.02 2.769"></path><path fill="#01384D" d="M29.534 157.518c-.833 1.859-2.172 3.473-2.884 5.386-.465 1.261-.65 2.615-1.14 3.862-.97 2.47-3.035 4.275-5.43 5.514-.933-1.484-1.491-3.894-1.453-7.992.07-7.288 1.691-12.284 4.23-15.45.07.024.138.053.206.077 1.148.436 2.295.879 3.435 1.315.971.375 1.98.772 2.692 1.529 1.384 1.5 1.17 3.902.344 5.759" opacity=".59"></path><path fill="#C53434" d="M49.484 172.334c.016 1.062-.848 2.042-2.194 2.326-2.678.55-4.972-.299-11.427-.429s-11.396 1.017-13.56 0c-.858-.398-1.615-.98-2.219-1.95-.933-1.485-1.491-3.895-1.453-7.994.068-7.289 1.69-12.283 4.23-15.449 2.868-3.595 6.906-4.842 11.189-4.437 2.456.231 4.688 1.141 6.57 2.487v.008c-8.49-3.68-15.77-.803-16.796 12.688-1.025 13.499 1.155 13.018 7.067 12.697 4.873-.268 13.76.986 18.593.053" opacity=".14"></path><path fill="#37C6AB" d="M43.24 86.563c-.925.162-1.804.398-2.623.697-6.164 2.18-9.37 7.655-10.769 10.814-.612 1.407-.872 2.355-.872 2.355-2.027-11.373 2.41-24.956 7.182-25.437 4.788-.483 7.083 11.57 7.083 11.57"></path><path fill="#01384D" d="M40.617 87.26c-6.165 2.18-9.37 7.656-10.77 10.814-.596-9.605 2.7-20.856 6.005-21.453 2.746-.497 4.199 6.807 4.765 10.64" opacity=".59"></path><path fill="#37C6AB" d="m67.312 95.053-1.232-1.452c-1.95-2.325-5.79-5.683-12.467-7.428a31 31 0 0 0-2.34-.519s.8-11.806 6.134-11.808c4.771-.003 9.77 11.808 9.905 21.207"></path><path fill="#01384D" d="M66.08 93.6c-1.95-2.324-5.79-5.683-12.467-7.426.3-3.42 1.316-10.424 4.642-10.133 3.825.336 7.512 11.157 7.825 17.56" opacity=".59"></path><path fill="#FEF3C6" d="M68.862 107.666a15.7 15.7 0 0 1-1.936 3.053c-.007.007-.007.015-.014.015-1.447 1.812-3.382 3.418-5.799 4.695-7.548 4.024-17.759 2.578-20.55 1.622-2.502-.849-9.523-3.457-11.305-11.151a16.5 16.5 0 0 1-.367-2.509c-.497-7.267 4.184-15.741 14.823-17.736h.008q2.17-.414 4.673-.436c4.466-.031 8.16.81 11.15 2.095q.046.013.046.015c6.334 2.732 9.515 7.465 10.218 10.227.88 3.403.566 6.936-.947 10.11"></path><path fill="#37C6AB" d="M29.259 105.9a16.6 16.6 0 0 1-.368-2.509c-.496-7.266 4.184-15.74 14.822-17.737h.009c2.83.766 7.395 2.83 9.362 8.36 2.776 7.839-8.705 18.93-23.825 11.886M68.865 107.666c-3.067-.359-6.524-2.049-8.497-5.675-3.456-6.355-1.89-12.03-.773-14.66 6.334 2.73 9.515 7.463 10.219 10.224.879 3.405.565 6.936-.949 10.111"></path><path fill="#C53434" d="M66.912 110.733c-1.446 1.812-3.38 3.419-5.799 4.697-7.548 4.022-17.759 2.576-20.55 1.621-2.5-.85-9.523-3.458-11.304-11.152a16.6 16.6 0 0 1-.368-2.509c-.497-7.265 4.184-15.74 14.823-17.736h.008q2.17-.414 4.673-.436c4.466-.03 8.16.811 11.151 2.096-.872-.29-13.797-4.422-22.195 3.09-8.689 7.778-2.51 23.427 7.763 25.238 8.244 1.455 15.411.269 21.798-4.909" opacity=".14"></path><path stroke="#014D5D" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width=".579" d="M42.76 103.367s-11.486-4.979-25.05-3.641M42.76 104.963s-14.28-.404-24.134 2.392M68.457 100.361s5.962-3.695 15.426-3.468M68.457 101.958s7.714-2.857 15.988.154"></path><path fill="#01384D" d="M57.392 100.71c-.473 0-.773-.215-.954-.477a1 1 0 0 1-.122.167c-.185.206-.448.31-.777.31-.907 0-1.177-.788-1.195-1.205a.2.2 0 0 1 .191-.207h.01a.2.2 0 0 1 .2.19c.003.085.059.821.794.821.215 0 .373-.058.482-.177.207-.228.175-.612.175-.616a.2.2 0 0 1 .05-.153c.11-.12.343-.037.35.125.005.085.06.821.796.821.215 0 .372-.058.482-.177.206-.228.175-.612.174-.616a.2.2 0 0 1 .18-.217c.107-.017.206.069.218.178.002.024.05.563-.277.923q-.28.31-.777.31"></path><path fill="#01384D" d="M56.399 99.698a.2.2 0 0 1-.2-.2v-2.202a.2.2 0 1 1 .4 0v2.201a.2.2 0 0 1-.2.201M56.364 102.559a1.47 1.47 0 0 1-1.054-.44.2.2 0 0 1 .021-.281.2.2 0 0 1 .282.02c.027.031.627.682 1.686-.034a.2.2 0 1 1 .225.33c-.446.302-.837.405-1.16.405"></path><path fill="#01384D" d="M54.941 96.22c0-1.233 2.905-1.393 2.905 0s-2.905 1.472-2.905 0"></path><path fill="#FDE047" d="M46.554 91.799c7.243.05 7.298 10.866 0 10.866-7.297 0-7.74-10.92 0-10.866M63.014 91.774c5.531.039 5.574 8.654 0 8.654s-5.91-8.697 0-8.654"></path><path fill="#01384D" d="M48.896 94.227c4.406.028 4.439 6.383 0 6.383-4.44 0-4.709-6.414 0-6.383M64.22 93.597c3.241.022 3.265 4.742 0 4.742s-3.465-4.766 0-4.742"></path></g><rect width="75" height="20" x="88.5" y="62.5" fill="#8B929C" fill-opacity=".1" rx="10"></rect><rect width="75" height="20" x="88.5" y="62.5" stroke="#C0C5CB" rx="10"></rect><rect width="75" height="20" x="88.5" y="87.5" fill="#7A69EE" fill-opacity=".1" rx="10"></rect><rect width="75" height="20" x="88.5" y="87.5" stroke="#7A69EE" rx="10"></rect><rect width="42" height="20" x="88.5" y="112.5" fill="#8B929C" fill-opacity=".1" rx="10"></rect><rect width="42" height="20" x="88.5" y="112.5" stroke="#C0C5CB" rx="10"></rect>',9)]))}const TN={render:EN},MN={xmlns:"http://www.w3.org/2000/svg",width:"118",height:"61",fill:"none"};function ON(n,e){return C(),F("svg",MN,e[0]||(e[0]=[Ba('<rect width="74" height="28" x="43.5" y="32.5" fill="#fff" rx="3.5"></rect><rect width="74" height="28" x="43.5" y="32.5" stroke="#C0C5CB" stroke-dasharray="6 6" rx="3.5"></rect><rect width="85" height="39" x=".5" y="1.5" fill="#fff" rx="3.5"></rect><rect width="85" height="39" x=".5" y="1.5" stroke="#7A69EE" rx="3.5"></rect><path stroke="#394452" stroke-width="1.5" d="M10 21c0-3.771 0-5.657 1.172-6.828S14.229 13 18 13h4c3.771 0 5.657 0 6.828 1.172S30 17.229 30 21s0 5.657-1.172 6.828S25.771 29 22 29h-4c-3.771 0-5.657 0-6.828-1.172S10 24.771 10 21Z"></path><path stroke="#394452" stroke-linecap="round" stroke-width="1.5" d="m14 17 2.159 1.8c1.837 1.53 2.755 2.295 3.841 2.295s2.005-.765 3.841-2.296L26 17"></path><path fill="#212832" d="M43.526 24.64V26h-5.284v-1.36zm-4.799-8.593V26h-1.715v-9.953zm4.109 4.156v1.34h-4.594v-1.34zm.656-4.156v1.367h-5.25v-1.367zm2.92 4.06V26h-1.648v-7.396h1.551zm-.267 1.921-.561-.006q0-.766.191-1.416.192-.65.56-1.128.37-.484.917-.745.554-.266 1.278-.266.506 0 .923.15.424.144.732.458.315.315.478.807.171.491.171 1.19V26h-1.648v-4.785q0-.54-.163-.848a.9.9 0 0 0-.459-.437 1.7 1.7 0 0 0-.704-.137q-.465 0-.793.178-.321.177-.526.485a2.2 2.2 0 0 0-.3.711 3.7 3.7 0 0 0-.096.861m4.586-.437-.772.17q0-.669.185-1.264.191-.601.553-1.053.37-.458.91-.717a2.8 2.8 0 0 1 1.237-.26q.567 0 1.011.157.451.15.766.479.315.327.479.854.164.52.164 1.258V26h-1.655v-4.792q0-.56-.164-.868a.85.85 0 0 0-.45-.424 1.8 1.8 0 0 0-.705-.123q-.382 0-.677.143a1.34 1.34 0 0 0-.485.39 1.7 1.7 0 0 0-.3.568 2.4 2.4 0 0 0-.097.697m10.398 2.926v-3.528q0-.396-.144-.683a1 1 0 0 0-.437-.445q-.288-.157-.725-.157-.403 0-.697.137a1.1 1.1 0 0 0-.458.369.9.9 0 0 0-.164.526h-1.64q0-.437.211-.847.212-.411.615-.732.404-.321.964-.506a4 4 0 0 1 1.258-.184q.834 0 1.477.28.65.28 1.018.848.376.56.376 1.408v3.288q0 .505.069.91.074.396.212.69V26h-1.689a3 3 0 0 1-.185-.677 5.5 5.5 0 0 1-.061-.806m.24-3.015.013 1.018h-1.183q-.458 0-.806.09a1.7 1.7 0 0 0-.581.245q-.233.165-.35.397a1.16 1.16 0 0 0-.115.526q0 .294.136.54.138.24.397.376.267.137.642.137.507 0 .882-.205.383-.211.602-.513.219-.307.232-.58l.534.73a2.5 2.5 0 0 1-.28.602q-.2.322-.52.616-.315.286-.76.471a2.6 2.6 0 0 1-1.01.185q-.726 0-1.293-.287a2.3 2.3 0 0 1-.889-.787 2.04 2.04 0 0 1-.32-1.127q0-.588.218-1.04.226-.457.656-.765.438-.307 1.067-.465.628-.164 1.435-.164zm4.9-2.898V26h-1.654v-7.396zm-1.763-1.942q0-.375.246-.622.253-.253.697-.253.438 0 .69.253a.83.83 0 0 1 .254.622.82.82 0 0 1-.253.615q-.254.246-.69.246-.446 0-.698-.246a.83.83 0 0 1-.246-.615m5.332-1.162V26h-1.654V15.5z"></path><g clip-rule="evenodd" filter="url(#a)"><path fill="#fff" fill-rule="evenodd" d="M78.673 4.848c.487-.186 1.448-.072 1.702.492.216.481.402 1.293.412 1.12.025-.384-.024-1.215.14-1.65.118-.316.351-.614.696-.72.289-.089.629-.12.93-.057.317.067.651.3.776.52.368.649.374 1.978.39 1.907.066-.283.072-1.28.288-1.65.143-.244.505-.463.697-.498.299-.055.666-.071.979-.009.253.051.595.358.687.507.223.359.347 1.37.385 1.727.016.147.075-.41.297-.767.413-.665 1.872-.794 1.927.666.026.68.02.65.02 1.108 0 .537-.012.862-.04 1.252-.03.415-.118 1.358-.245 1.814-.087.313-.376 1.018-.663 1.44 0 0-1.09 1.303-1.209 1.888-.118.586-.079.59-.103 1.005s.123.96.123.96-.813.11-1.253.036c-.397-.064-.888-.874-1.015-1.122-.175-.342-.547-.276-.692-.024-.228.399-.72 1.114-1.066 1.159-.68.087-2.086.031-3.188.02 0 0 .188-1.052-.23-1.413-.31-.271-.843-.817-1.162-1.104l-.844-.96c-.287-.374-1.017-.967-1.262-2.067-.216-.974-.195-1.452.038-1.843.235-.397.68-.613.867-.65.21-.044.702-.041.888.064.226.128.318.166.495.407.234.32.317.475.216.126-.077-.273-.326-.62-.44-1.01-.11-.376-.407-.982-.386-1.59.008-.23.105-.802.845-1.084"></path><path stroke="#080C11" stroke-linecap="round" stroke-linejoin="round" stroke-width=".75" d="M78.673 4.848c.487-.186 1.448-.072 1.702.492.216.481.402 1.293.412 1.12.025-.384-.024-1.215.14-1.65.118-.316.351-.614.696-.72.289-.089.629-.12.93-.057.317.067.651.3.776.52.368.649.374 1.978.39 1.907.066-.283.072-1.28.288-1.65.143-.244.505-.463.697-.498.299-.055.666-.071.979-.009.253.051.595.358.687.507.223.359.347 1.37.385 1.727.016.147.075-.41.297-.767.413-.665 1.872-.794 1.927.666.026.68.02.65.02 1.108 0 .537-.012.862-.04 1.252-.03.415-.118 1.358-.245 1.814-.087.313-.376 1.018-.663 1.44 0 0-1.09 1.303-1.209 1.888-.118.586-.079.59-.103 1.005s.123.96.123.96-.813.11-1.253.036c-.397-.064-.888-.874-1.015-1.122-.175-.342-.547-.276-.692-.024-.228.399-.72 1.114-1.066 1.159-.68.087-2.086.031-3.188.02 0 0 .188-1.052-.23-1.413-.31-.271-.843-.817-1.162-1.104l-.844-.96c-.287-.374-1.017-.967-1.262-2.067-.216-.974-.195-1.452.038-1.843.235-.397.68-.613.867-.65.21-.044.702-.041.888.064.226.128.318.166.495.407.234.32.317.475.216.126-.077-.273-.326-.62-.44-1.01-.11-.376-.407-.982-.386-1.59.008-.23.105-.802.845-1.084"></path></g><path fill="#080C11" fill-rule="evenodd" d="M82 9.5a.5.5 0 0 0-1 0v3a.5.5 0 0 0 1 0zm1.5-.5a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 .5-.5m2 0a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 .5-.5" clip-rule="evenodd"></path><defs><filter id="a" width="17.75" height="16.75" x="73.625" y="2.625" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feColorMatrix values="0 0 0 0 0.027451 0 0 0 0 0.12549 0 0 0 0 0.239216 0 0 0 0.24 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_1437_271071"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_1437_271071" result="shape"></feBlend></filter></defs>',10)]))}const AN={render:ON},PN={xmlns:"http://www.w3.org/2000/svg",width:"118",height:"61",fill:"none"};function $N(n,e){return C(),F("svg",PN,e[0]||(e[0]=[Ba('<rect width="74" height="28" x="43.5" y="32.5" fill="#161E27" rx="3.5"></rect><rect width="74" height="28" x="43.5" y="32.5" stroke="#535D69" stroke-dasharray="6 6" rx="3.5"></rect><rect width="85" height="39" x=".5" y="1.5" fill="#2A3540" rx="3.5"></rect><rect width="85" height="39" x=".5" y="1.5" stroke="#7A69EE" rx="3.5"></rect><path stroke="#DBDEE3" stroke-width="1.5" d="M10 21c0-3.771 0-5.657 1.172-6.828S14.229 13 18 13h4c3.771 0 5.657 0 6.828 1.172S30 17.229 30 21s0 5.657-1.172 6.828S25.771 29 22 29h-4c-3.771 0-5.657 0-6.828-1.172S10 24.771 10 21Z"></path><path stroke="#DBDEE3" stroke-linecap="round" stroke-width="1.5" d="m14 17 2.159 1.8c1.837 1.53 2.755 2.295 3.841 2.295s2.005-.765 3.841-2.296L26 17"></path><path fill="#F4F6F9" d="M43.526 24.64V26h-5.284v-1.36zm-4.799-8.593V26h-1.715v-9.953zm4.109 4.156v1.34h-4.594v-1.34zm.656-4.156v1.367h-5.25v-1.367zm2.92 4.06V26h-1.648v-7.396h1.551zm-.267 1.921-.561-.006q0-.766.191-1.416.192-.65.56-1.128.37-.484.917-.745.554-.266 1.278-.266.506 0 .923.15.424.144.732.458.315.315.478.807.171.491.171 1.19V26h-1.648v-4.785q0-.54-.163-.848a.9.9 0 0 0-.459-.437 1.7 1.7 0 0 0-.704-.137q-.465 0-.793.178-.321.177-.526.485a2.2 2.2 0 0 0-.3.711 3.7 3.7 0 0 0-.096.861m4.586-.437-.772.17q0-.669.185-1.264.191-.601.553-1.053.37-.458.91-.717a2.8 2.8 0 0 1 1.237-.26q.567 0 1.011.157.451.15.766.479.315.327.479.854.164.52.164 1.258V26h-1.655v-4.792q0-.56-.164-.868a.85.85 0 0 0-.45-.424 1.8 1.8 0 0 0-.705-.123q-.382 0-.677.143a1.34 1.34 0 0 0-.485.39 1.7 1.7 0 0 0-.3.568 2.4 2.4 0 0 0-.097.697m10.398 2.926v-3.528q0-.396-.144-.683a1 1 0 0 0-.437-.445q-.288-.157-.725-.157-.403 0-.697.137a1.1 1.1 0 0 0-.458.369.9.9 0 0 0-.164.526h-1.64q0-.437.211-.847.212-.411.615-.732.404-.321.964-.506a4 4 0 0 1 1.258-.184q.834 0 1.477.28.65.28 1.018.848.376.56.376 1.408v3.288q0 .505.069.91.074.396.212.69V26h-1.689a3 3 0 0 1-.185-.677 5.5 5.5 0 0 1-.061-.806m.24-3.015.013 1.018h-1.183q-.458 0-.806.09a1.7 1.7 0 0 0-.581.245q-.233.165-.35.397a1.16 1.16 0 0 0-.115.526q0 .294.136.54.138.24.397.376.267.137.642.137.507 0 .882-.205.383-.211.602-.513.219-.307.232-.58l.534.73a2.5 2.5 0 0 1-.28.602q-.2.322-.52.616-.315.286-.76.471a2.6 2.6 0 0 1-1.01.185q-.726 0-1.293-.287a2.3 2.3 0 0 1-.889-.787 2.04 2.04 0 0 1-.32-1.127q0-.588.218-1.04.226-.457.656-.765.438-.307 1.067-.465.628-.164 1.435-.164zm4.9-2.898V26h-1.654v-7.396zm-1.763-1.942q0-.375.246-.622.253-.253.697-.253.438 0 .69.253a.83.83 0 0 1 .254.622.82.82 0 0 1-.253.615q-.254.246-.69.246-.446 0-.698-.246a.83.83 0 0 1-.246-.615m5.332-1.162V26h-1.654V15.5z"></path><g clip-rule="evenodd" filter="url(#a)"><path fill="#fff" fill-rule="evenodd" d="M78.673 4.848c.487-.186 1.448-.072 1.702.492.216.481.402 1.293.412 1.12.025-.384-.024-1.215.14-1.65.118-.316.351-.614.696-.72.289-.089.629-.12.93-.057.317.067.651.3.776.52.368.649.374 1.978.39 1.907.066-.283.072-1.28.288-1.65.143-.244.505-.463.697-.498.299-.055.666-.071.979-.009.253.051.595.358.687.507.223.359.347 1.37.385 1.727.016.147.075-.41.297-.767.413-.665 1.872-.794 1.927.666.026.68.02.65.02 1.108 0 .537-.012.862-.04 1.252-.03.415-.118 1.358-.245 1.814-.087.313-.376 1.018-.663 1.44 0 0-1.09 1.303-1.209 1.888-.118.586-.079.59-.103 1.005s.123.96.123.96-.813.11-1.253.036c-.397-.064-.888-.874-1.015-1.122-.175-.342-.547-.276-.692-.024-.228.399-.72 1.114-1.066 1.159-.68.087-2.086.031-3.188.02 0 0 .188-1.052-.23-1.413-.31-.271-.843-.817-1.162-1.104l-.844-.96c-.287-.374-1.017-.967-1.262-2.067-.216-.974-.195-1.452.038-1.843.235-.397.68-.613.867-.65.21-.044.702-.041.888.064.226.128.318.166.495.407.234.32.317.475.216.126-.077-.273-.326-.62-.44-1.01-.11-.376-.407-.982-.386-1.59.008-.23.105-.802.845-1.084"></path><path stroke="#080C11" stroke-linecap="round" stroke-linejoin="round" stroke-width=".75" d="M78.673 4.848c.487-.186 1.448-.072 1.702.492.216.481.402 1.293.412 1.12.025-.384-.024-1.215.14-1.65.118-.316.351-.614.696-.72.289-.089.629-.12.93-.057.317.067.651.3.776.52.368.649.374 1.978.39 1.907.066-.283.072-1.28.288-1.65.143-.244.505-.463.697-.498.299-.055.666-.071.979-.009.253.051.595.358.687.507.223.359.347 1.37.385 1.727.016.147.075-.41.297-.767.413-.665 1.872-.794 1.927.666.026.68.02.65.02 1.108 0 .537-.012.862-.04 1.252-.03.415-.118 1.358-.245 1.814-.087.313-.376 1.018-.663 1.44 0 0-1.09 1.303-1.209 1.888-.118.586-.079.59-.103 1.005s.123.96.123.96-.813.11-1.253.036c-.397-.064-.888-.874-1.015-1.122-.175-.342-.547-.276-.692-.024-.228.399-.72 1.114-1.066 1.159-.68.087-2.086.031-3.188.02 0 0 .188-1.052-.23-1.413-.31-.271-.843-.817-1.162-1.104l-.844-.96c-.287-.374-1.017-.967-1.262-2.067-.216-.974-.195-1.452.038-1.843.235-.397.68-.613.867-.65.21-.044.702-.041.888.064.226.128.318.166.495.407.234.32.317.475.216.126-.077-.273-.326-.62-.44-1.01-.11-.376-.407-.982-.386-1.59.008-.23.105-.802.845-1.084"></path></g><path fill="#080C11" fill-rule="evenodd" d="M82 9.5a.5.5 0 0 0-1 0v3a.5.5 0 0 0 1 0zm1.5-.5a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 .5-.5m2 0a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 .5-.5" clip-rule="evenodd"></path><defs><filter id="a" width="17.75" height="16.75" x="73.625" y="2.625" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feColorMatrix values="0 0 0 0 0.027451 0 0 0 0 0.12549 0 0 0 0 0.239216 0 0 0 0.24 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_1437_271071"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_1437_271071" result="shape"></feBlend></filter></defs>',10)]))}const RN={render:$N},DN={xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200",fill:"none"};function NN(n,e){return C(),F("svg",DN,e[0]||(e[0]=[Ba('<path fill="#8B929C" fill-opacity=".3" d="M179.04 108.84c0 43.162-34.99 78.151-78.152 78.151s-78.15-34.989-78.15-78.151 34.988-78.153 78.15-78.153 78.152 34.99 78.152 78.153" opacity=".44"></path><path fill="#9C8EF4" d="M63.25 130.137c0 .814-.029 1.649-.164 2.424-.14.796-.66 1.498-.93 2.241-.277.756-.716 1.404-1.114 2.092-.402.694-.858 1.302-1.371 1.912-.515.612-.877 1.356-1.49 1.87-.61.513-1.353.829-2.047 1.23-.688.398-1.335.877-2.092 1.153-.743.27-1.55.292-2.347.432-.775.135-1.542.242-2.355.242-.814 0-1.613.078-2.388-.058-.797-.139-1.52-.489-2.263-.761-.757-.274-1.436-.646-2.124-1.044-.694-.402-1.561-.56-2.171-1.073-.612-.513-.868-1.381-1.384-1.994-.512-.61-1.325-1.012-1.727-1.706-.398-.687-.425-1.56-.7-2.317-.271-.743-.888-1.416-1.027-2.212-.135-.775.032-1.617.032-2.431 0-.813.02-1.622.155-2.397.14-.798.246-1.621.516-2.364.276-.756.93-1.336 1.327-2.024.402-.694.565-1.563 1.078-2.173.514-.612 1.076-1.238 1.688-1.753.61-.513 1.46-.723 2.154-1.125.688-.398 1.422-.68 2.178-.956.743-.27 1.455-.698 2.252-.837.775-.136 1.59.124 2.404.124s1.641-.335 2.416-.199c.796.139 1.472.708 2.215.978.757.276 1.52.482 2.208.88.694.402 1.297.91 1.907 1.422a13.6 13.6 0 0 1 1.677 1.678c.512.61.911 1.277 1.312 1.971.399.687.666 1.404.942 2.161.27.743.841 1.409.98 2.206.136.775.254 1.595.254 2.408"></path><path fill="#7A69EE" d="M43.452 142.359c-1.865-11.714-.848-20.422-.102-24.482q-.345.155-.68.337c-.321 1.851-.67 4.496-.817 7.824-1.303-1.862-2.116-3.835-2.62-5.51q-.249.272-.484.551c.587 1.828 1.536 3.959 3.068 5.945a77 77 0 0 0-.024 3.555c-2.027-1.573-3.928-3.602-5.443-5.414q-.05.104-.091.211c-.055.15-.099.305-.142.46.56.659 1.164 1.341 1.807 2.018-.785.539-1.582 1.206-2.334 1.896l-.003.387q-.001.233-.016.47c.885-.844 1.85-1.679 2.782-2.309.533.545 1.09 1.079 1.66 1.59-.76 3.075-1.092 6.207-1.23 8.675q.121.115.227.24c.13.154.243.324.349.501.106-2.449.403-5.724 1.174-8.962q.628.534 1.274 1.014c.083 3.166.371 6.737.97 10.634q.335.192.675.369M52.263 130.101a94 94 0 0 1 3.925-2.262c.52.67 2.288 3.045 4.15 6.591-2.452-.943-5.324-2.331-8.075-4.329m-3.404 1.438a56 56 0 0 1-.801-1.47c1.61-2.951 3.268-5.377 4.844-7.354.328-.033 1.32-.114 2.97-.112-.262.977-1.033 3.664-2.14 5.916a95 95 0 0 0-4.873 3.02m12.33 3.208c-1.916-3.769-3.812-6.364-4.455-7.201q.695-.371 1.416-.737a75 75 0 0 1 5.095 3.868q.006-.27.006-.54c0-.084-.006-.169-.008-.253a77 77 0 0 0-4.47-3.387 56 56 0 0 1 3.082-1.413 18 18 0 0 0-.221-.565c-2.438 1.023-4.88 2.286-6.982 3.473.991-2.239 1.656-4.64 1.85-5.384 1.151.016 2.57.074 4.25.205a15 15 0 0 0-.413-.647c-3.529-.257-5.815-.184-6.902-.111q.594-.714 1.164-1.345a87 87 0 0 1 4.096-.438c-.2-.189-.397-.38-.61-.559l-.002-.002c-1.2.109-2.187.22-2.838.299.492-.518.965-.985 1.417-1.412a8 8 0 0 0-.484-.307q-.04-.02-.077-.038c-2.429 2.321-5.458 5.889-8.383 11.163q-.278-.548-.523-1.053c.07-.763.688-6.131 4.698-11.897-.047-.011-.092-.025-.139-.033a2.5 2.5 0 0 0-.559-.027c-3.137 4.631-4.162 8.975-4.48 10.93a41 41 0 0 1-1.232-2.963c.154-3.373.573-6.069.89-7.721-.227.076-.45.167-.67.263-.471 2.567-1.085 7.159-.828 12.718l-.014.004.019.067c.203 4.271.924 9.107 2.62 14.033q.325.021.657.017c-1.412-4.035-2.163-8.014-2.5-11.67 1.002 2.707 3.04 7.229 6.587 11.324.244-.032.487-.061.728-.098-5.23-5.874-7.235-12.78-7.487-13.71a56 56 0 0 1-.051-3.675c1.264 3.061 4.687 10.37 10.538 16.078l.16-.097q.196-.111.396-.218c-3.142-3.032-5.586-6.543-7.367-9.616.217-.145.574-.381 1.042-.682 2.843 3.939 6.418 6.394 9.148 7.832q.151-.215.318-.416l.06-.073c-2.667-1.391-6.197-3.789-9.01-7.674q.445-.282.978-.611c3.51 2.592 7.242 4.196 10.09 5.152q.143-.27.263-.556-.419-.138-.863-.297"></path><path stroke="#7A69EE" stroke-linecap="round" stroke-width="1.5" d="M41.5 140.5s-18 2-17.5 5.5 25 2 25 2 27.5-1.5 28 0-11.5 2.5-11.5 2.5-14 0-13.5 2.5 14 3 18.5 3 40.1-.5 42.5-10.5c1.5-2.667 1.4-9-11-13"></path><path fill="#C53434" d="M108.411 104.279c5.382 6.127 3.552 8.525 7.165 14.543 3.609 6.012 12.26 12.921 23.435 10.031 7.165-1.851 12.151-4.844 14.8-6.762-.42-2.105-1.178-4.484-2.395-6.658l-.019-.028c-5.152-9.152-22.332-17.225-22.332-17.225s-3.52-1.133-7.806-2.954c-2.926-1.247-6.212-2.814-8.977-4.553-11.964-1.624-8.806 7.977-3.871 13.606" opacity=".14"></path><path fill="#37C6AB" d="M84.125 125.007c2.302 2.437 5.027 4.365 8.248 5.523 2.04.734 4.274 1.44 6.643 2.09a124 124 0 0 0 12.619 2.766c8.167 1.353 16.745 1.927 24.116 1.13 13.757-1.49 17.154-3.686 17.154-3.686s7.802 2.721 10.976 2.365c3.091-.345 11.441-.745 10.523-4.235a2 2 0 0 0-.088-.287c-1.46-3.758-7.629-.641-11.974-2.638a74 74 0 0 0-5.825-2.37c-1.014-.357-1.755-.594-2.098-.704a6 6 0 0 1-.209-.065 23 23 0 0 0-.401-2.805c-.419-2.105-1.177-4.483-2.395-6.658l-.018-.027c-5.153-9.152-22.332-17.227-22.332-17.227s-2.604-.84-6.062-2.234a87 87 0 0 1-1.745-.72c-2.925-1.246-6.213-2.814-8.977-4.552-2.033-1.282-3.783-2.659-4.921-4.075-2.112-2.647-3.944-5.112-6.225-6.962-3.045-2.47-6.905-3.824-13.34-3.002-2.232.286-4.215.938-5.942 1.902-7.014 3.866-9.909 12.669-8.316 21.935 1.446 8.36 4.563 18.171 10.588 24.536"></path><path fill="#C53434" d="M111.636 135.385c8.167 1.354 16.744 1.926 24.116 1.13 13.756-1.49 17.155-3.686 17.155-3.686s7.8 2.721 10.974 2.365c3.092-.345 11.442-.745 10.523-4.235-7.425 3.674-18.995 2.245-18.375-1.028.282-1.507.427-3.01.489-4.267a73 73 0 0 0-2.097-.703q-.21-.062-.21-.064a23 23 0 0 0-.402-2.808c-.419-2.104-1.177-4.482-2.394-6.657-.008-.011-.01-.016-.019-.027-5.152-9.153-22.331-17.227-22.331-17.227s-2.603-.84-6.062-2.234a14729 14729 0 0 0-11.367 39.441" opacity=".14"></path><path fill="#FEF3C6" d="M84.125 125.007c2.302 2.437 5.028 4.366 8.248 5.523 11.644 4.175 29.615 7.479 43.379 5.987 4.933-.534 8.533-1.159 11.123-1.742 4.526-1.016 7.765-5.105 7.548-9.739l-.003-.074c-.268-5.212-2.753-9.146-3.006-9.529-.008-.011-.01-.017-.018-.027 0 0-13.481-1.683-10.995 8.251 2.486 9.927-5.91 12.447-24.178 9.344-18.273-3.102-20.374-4.905-26.364-10.503-5.985-5.599-10.98-5.568-5.734 2.509"></path><path fill="#01384D" d="M87.136 87.902c.54 1.844.313 3.854.883 5.685.525 1.686 1.682 3.104 2.955 4.329.819.776 1.706 1.51 2.757 1.916 2.183.852 4.785.228 6.861 1.307 1.141.588 1.976 1.621 2.991 2.405 3.473 2.7 9.13 1.869 11.682-1.715.965-1.36 1.506-2.994 2.534-4.31.884-1.127 2.151-1.746 3.46-2.293-5.069-2.162-11.218-5.277-13.897-8.629-4.944-6.18-8.314-11.403-19.566-9.962-2.233.284-4.215.937-5.943 1.9q.032.154.074.312c.91 3.386 4.231 5.69 5.209 9.055" opacity=".59"></path><path fill="#C53434" d="M84.125 125.007c2.302 2.437 5.028 4.366 8.248 5.523 2.04.735 4.275 1.44 6.643 2.09 1.002-5.83 1.432-13.133-.75-19.284-4.439-12.501-19.544-11.465-15.489-24.159 4.049-12.686 18.357-9.54 18.357-9.54-3.044-2.471-6.905-3.825-13.34-3.002-2.232.285-4.215.937-5.942 1.902-7.013 3.865-9.908 12.668-8.315 21.934 1.445 8.36 4.563 18.171 10.588 24.536" opacity=".14"></path><path fill="#37C6AB" d="M108.822 126.995c1.204 5.116 4.439 12.075 7.45 13.869 3.017 1.795 13.827 3.055 19.778 3.405 4.791.286 12.756.496 15.467-1.59.654-.5 1.007-1.136.939-1.935-.276-3.198-6.246-1.427-8.716-1.547-2.469-.121-8.527-3.405-10.588-4.564-.733-.417-1.467-2.526-2.475-5.214-1.916-5.157-4.832-12.459-10.657-14.067-8.862-2.44-12.407 6.528-11.198 11.643"></path><path fill="#C53434" d="M108.823 126.995c1.204 5.116 4.438 12.075 7.449 13.869 3.017 1.795 13.827 3.055 19.778 3.405 4.791.286 12.756.496 15.467-1.59-16.877 2.062-34.82-6.178-37.228-11.041-2.583-5.23 3.712-7.071 7.819-4.052 3.397 2.502 7.322 2.063 8.569 1.833-1.916-5.157-4.832-12.459-10.657-14.067-8.862-2.44-12.407 6.528-11.197 11.643" opacity=".14"></path><path fill="#37C6AB" d="M85.337 131.227c4.71 3.06 13.276 5.617 18.193 6.514 2.156.397 3.638-.072 4.291-.884.835-1.025.321-2.629-1.859-3.711-3.88-1.933-9.085-1.141-8.266-5.876.82-4.737.163-10.678-4.904-16.769-.386-.457-.861-.968-1.414-1.474-.007-.005-.008-.012-.015-.016a16 16 0 0 0-1.595-1.299c-.006 0-.014-.004-.015-.011-3.085-2.203-7.55-3.705-12.162-.487-6.515 4.546 3.037 20.955 7.746 24.013"></path><path fill="#C53434" d="M85.338 131.227c4.71 3.06 13.276 5.617 18.193 6.514 2.156.397 3.638-.072 4.291-.884-7.765-1.034-20.124-4.286-25.77-16.043-5.065-10.531 2.637-15.951 7.702-13.113-3.085-2.202-7.55-3.705-12.162-.487-6.515 4.546 3.037 20.955 7.746 24.013" opacity=".14"></path><path fill="#37C6AB" d="M134.72 88.471c2.025 3.753 3.749 7.683 3.749 7.683s.92-.057 2.434.084c2.756.246 7.484 1.148 12.188 4.232q.868.561 1.729 1.233s-3.797-11.627-13.419-16.445c-8.035-4.019-8.282.256-6.681 3.213"></path><path fill="#01384D" d="M140.903 96.238c2.756.247 7.485 1.148 12.188 4.232-1.379-3.073-3.787-7.554-7.229-10.844-5.468-5.21-10.166-5.91-10.161-3.808.011 1.722 3.375 5.26 5.202 10.42" opacity=".59"></path><path stroke="#7A69EE" stroke-linecap="round" stroke-width="1.5" d="M115.312 92c-8.333 4.167-23 17.8-15 39"></path><path stroke="#7A69EE" stroke-linecap="round" stroke-width="1.5" d="M115.311 101C106.978 105.167 96 115.5 100 130.5"></path><path fill="#37C6AB" d="M111.677 104.915c4.93 6.93 6.844 12.732 6.844 12.732-.02-1.149.025-2.231.122-3.243.645-6.823 3.642-10.656 6.045-12.671 1.739-1.452 3.168-1.959 3.168-1.959-6.507-5.925-17.778-8.497-20.091-6.335-2.304 2.16-1.019 4.548 3.912 11.476"></path><path fill="#01384D" d="M110.03 99.83c2.343 3.252 6.682 9.063 8.61 14.573.646-6.822 3.643-10.656 6.047-12.669-2.247-1.749-7.349-5.478-11.472-6.69-5.451-1.606-6.028.849-3.185 4.786" opacity=".59"></path><path fill="#FEF3C6" d="M117.976 116.84c.24.846.54 1.637.877 2.352 3.325 7.082 10.667 8.15 13.273 8.45 2.902.347 13.095-.378 19.569-5.846a19 19 0 0 0 1.816-1.732c.006-.001.006-.001.012-.009 2.111-2.271 3.447-4.807 4.065-7.395.803-3.389.371-6.88-1.189-9.99-1.255-2.531-5.322-6.453-12.029-7.78-3.171-.628-6.942-.683-11.288.283-1.608.365-3.091.827-4.435 1.396l-.006.001c-9.895 4.152-12.665 13.332-10.665 20.27"></path><path fill="#37C6AB" d="M118.85 119.195a16.5 16.5 0 0 1-.879-2.354c-1.993-6.936.776-16.121 10.668-20.27l.008-.002c2.901.153 7.754 1.204 10.81 6.151 4.322 7.017-4.491 20.151-20.607 16.475M157.586 112.662c-3.045.289-6.747-.627-9.414-3.729-4.671-5.437-4.333-11.263-3.801-14.043 6.706 1.325 10.772 5.249 12.029 7.779 1.561 3.113 1.994 6.602 1.186 9.993"></path><path fill="#C53434" d="M117.975 116.84c.24.846.54 1.636.877 2.352 3.325 7.082 10.668 8.15 13.273 8.45 2.902.346 13.096-.378 19.569-5.847a19 19 0 0 0 1.817-1.731c-18.527 11.635-35.984-.853-31.128-13.179 4.86-12.328 21.986-11.995 21.986-11.995-3.17-.628-6.942-.683-11.287.282-1.608.366-3.091.828-4.436 1.397l-.005.001c-9.896 4.152-12.665 13.332-10.666 20.27" opacity=".14"></path><path stroke="#014D5D" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width=".472" d="M131.401 113.928s-12.163-2.43-25.025 1.687M131.734 115.478s-13.918 2.581-22.882 7.343M155.672 105.669s5.005-4.822 14.222-6.571M156.003 107.215s6.878-4.373 15.521-3.178"></path><path fill="#01384D" d="M141.718 104.471c-.256-1.195 2.523-1.954 2.814-.605.289 1.349-2.508 2.031-2.814.605M143.231 108.696c.318-.068.551-.224.688-.461q.053-.093.084-.188c.228.217.564.362 1.022.263q.481-.104.69-.461c.241-.419.082-.931.075-.952a.198.198 0 0 0-.377.12c.002.004.113.37-.043.635-.08.138-.22.227-.428.272-.712.153-.92-.55-.94-.631-.042-.156-.282-.189-.364-.049a.2.2 0 0 0-.021.159c.002.003.113.37-.041.635q-.118.206-.43.272c-.71.151-.919-.551-.94-.632a.2.2 0 0 0-.233-.143l-.009.001a.2.2 0 0 0-.141.242c.102.4.529 1.107 1.408.918"></path><path fill="#01384D" d="M143.852 107.536a.2.2 0 0 0 .151-.236l-.458-2.133a.198.198 0 1 0-.387.083l.458 2.134a.2.2 0 0 0 .236.152M144.412 110.316c.313-.068.671-.247 1.041-.633a.2.2 0 0 0-.007-.281.2.2 0 0 0-.281.007c-.878.917-1.597.405-1.626.383a.198.198 0 0 0-.239.317c.008.005.467.345 1.112.207"></path><path fill="#FDE047" d="M132.668 101.933c7.028-1.459 9.332 9.008 2.262 10.527s-9.771-8.966-2.262-10.527M148.608 98.483c5.366-1.113 7.2 7.225 1.801 8.385-5.4 1.16-7.536-7.195-1.801-8.385"></path><path fill="#01384D" d="M134.747 104.392c4.274-.889 5.63 5.262 1.328 6.184-4.3.925-5.896-5.234-1.328-6.184M150.429 100.384c3.144-.654 4.15 3.914.987 4.593-3.165.681-4.348-3.895-.987-4.593"></path><path fill="#37C6AB" d="M52.298 60.811c5.362 1.43 9.627 4.02 13.293 11.478 3.665 7.464 5.241 10.724 13.433 14.563l2.176-5.88s-2.327-.772-4.939-3.269c-1.808-1.729-3.757-4.295-5.16-8.012-3.413-9.062-11.27-12.678-17.252-13.688a10 10 0 0 0-1.067-.124c-5.013-.339-5.504 3.596-.484 4.932"></path><path fill="#C53434" d="M52.298 60.813c5.362 1.43 9.627 4.02 13.293 11.477 3.665 7.464 5.241 10.725 13.433 14.563l2.176-5.88s-2.327-.772-4.939-3.268c-3.25 2.327-5.435-.905-7.766-5.545-2.697-5.356-7.324-11.046-13.646-13.873-1.965-.879-2.396-1.699-2.068-2.407-5.012-.339-5.503 3.596-.483 4.933" opacity=".14"></path>',30)]))}const FN={render:NN},LN={xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200",fill:"none",viewBox:"0 0 174 155"};function BN(n,e){return C(),F("svg",LN,e[0]||(e[0]=[Ba('<path fill="#8B929C" fill-opacity=".3" d="M163.646 75.594c0 41.694-33.799 75.493-75.493 75.493s-75.492-33.799-75.492-75.493S46.459.099 88.153.099s75.493 33.8 75.493 75.495" opacity=".44"></path><path fill="#01384D" d="M119.825 91.312c-1.608 2.6-3.958 4.738-6.731 6.009-2.369 1.079-5.008 1.57-7.213 2.947-1.763 1.098-3.169 2.716-5.028 3.641-2.715 1.347-6.047.981-8.753-.376-1.474-.732-2.85-1.791-3.64-3.246-.568-1.058-.79-2.252-1.136-3.41a15.77 15.77 0 0 0-5.527-7.914c-.772-.579-1.822-1.185-2.794-1.888q.375-.142.75-.27c19.397-6.73 32.907-2.783 40.072 4.507" opacity=".59"></path><path fill="#37C6AB" d="M144.363 63.606c-5.615 2.89-9.736 6.808-12.009 15.996-2.273 9.196-3.236 13.212-11.421 19.472l-3.852-6.02s1.993-1.184 4.083-3.968c1.8-2.397 3.678-5.98 4.42-11.035 1.608-10.921 9.476-16.853 15.89-19.424 6.423-2.572 8.513 2.089 2.889 4.978"></path><path fill="#C53434" d="M144.363 63.606c-5.615 2.89-9.736 6.808-12.009 15.996-2.273 9.196-3.236 13.212-11.421 19.472l-3.852-6.02s1.993-1.184 4.083-3.968c4.824 4.488 6.472 2.813 8.619-6.422 2.33-10.035 3.187-12.721 8.234-17.69 5.046-4.97 7.704-7.012 3.457-6.347 6.423-2.572 8.513 2.089 2.889 4.978" opacity=".14"></path><path fill="#37C6AB" d="M126.71 134.06c-1.445 4.661-.646 6.905-2.725 8.35-2.09 1.444-8.032 2.888-10.276 1.761-.473-.24-.809-.529-1.029-.857-.82-1.222.018-2.936 1.675-3.957 2.08-1.281 2.08-1.763.799-4.006-1.02-1.791-6.395-7.117-9.524-9.948a.2.2 0 0 0-.048-.039c-.791-.723-1.436-1.281-1.821-1.57-1.926-1.444-4.178-1.608-13.327.636-1.34.328-2.86.665-4.499.973-1.29.25-2.666.472-4.082.664-4.034.54-8.455.799-12.576.356-5.105-.529-9.746-2.118-12.684-5.517-4.45-5.171-5.807-12.047-6.192-16.545-.24-2.774-.117-4.641-.117-4.641s1.32-1.493 8.582-4.797c4.305-1.955 10.699-4.555 20.137-7.848.25-.096.5-.183.75-.27 19.396-6.73 32.906-2.783 40.072 4.507 2.464 2.504 4.179 5.412 5.122 8.408 3.688 11.709-1.444 21.504-2.089 22.428-.645.925 2.725 3.244 3.852 4.054 1.126.8 1.445 3.207 0 7.858"></path><path fill="#FEF3C6" d="M105.63 125.403c-.809-.741-1.474-1.309-1.868-1.608-1.925-1.445-4.179-1.609-13.328.635-9.148 2.254-26.636 4.816-33.84-3.524-7.194-8.35-6.308-21.187-6.308-21.187s1.319-1.492 8.58-4.795c1.002 6.095 5.644 24.952 24.26 23.526 22.168-1.695 22.504 6.953 22.504 6.953"></path><path fill="#37C6AB" d="M88.15 115.281c-.038.28-.075.577-.124.886-.376 2.523-1.136 5.816-2.09 9.236-2.206 7.867-5.441 16.419-7.386 17.854-1.28.944-3.718 1.425-6.047 1.493-2.9.086-5.644-.453-5.818-1.493-.326-1.878 3.043-4.381 3.505-9.197.203-2.08-.326-4.709-.914-7.637-.77-3.842-1.627-8.195-1.07-12.461.29-2.167.723-7.983 7.147-10.256 6.414-2.263 13.762 3.592 12.798 11.575"></path><path fill="#C53434" d="M105.581 125.364c-.79-.723-1.434-1.281-1.82-1.57-1.925-1.445-4.179-1.608-13.328.636-1.338.328-2.86.664-4.497.972-2.206 7.868-5.441 16.42-7.386 17.855-1.282.943-3.718 1.425-6.047 1.493 2.185-1.562 4.998-4.296 6.5-8.601 1.386-3.977 2.243-7.193 2.85-10.082.568-2.697.915-5.124 1.271-7.618.222-1.531 2.195-2.234 4.902-2.282 6.384-.135 16.833 3.361 17.603 7.935.068.386.048.809-.048 1.262" opacity=".14"></path><path fill="#C53434" d="M126.71 134.06c-1.445 4.661-.646 6.905-2.725 8.35-2.09 1.444-8.032 2.888-10.276 1.761-.473-.24-.809-.529-1.029-.857 2.011.088 4.333-.172 5.845-1.473 3.149-2.716 4.333-4.728 2.714-9.533-1.607-4.816-3.678-4.344-5.42-8.321-1.744-3.977 3.187-7.338-2.263-19.231-5.461-11.893-23.681-12.422-28.091-11.816-4.402.596-6.665 8.782-16.026 11.816-6.856 2.225-15.118.626-19.038-.395-.24-2.774-.117-4.641-.117-4.641s1.32-1.493 8.582-4.797c4.305-1.955 10.699-4.555 20.137-7.848.25-.096.5-.183.75-.27 19.396-6.73 32.906-2.783 40.072 4.507 2.464 2.504 4.179 5.412 5.122 8.408 3.688 11.709-1.444 21.504-2.089 22.428-.645.925 2.725 3.244 3.852 4.054 1.126.8 1.445 3.207 0 7.858" opacity=".14"></path><path fill="#37C6AB" d="M70.19 124.593c-1.31 3.534-6.075 17.817-7.683 18.943-1.292.896-4.344 1.8-7.3 1.492a9.2 9.2 0 0 1-2.1-.452c-3.457-1.204-.867-3.929 0-5.219.876-1.282 1.694-1.926 1.116-8.34-.288-3.13-.558-8.022-.76-12.202-.222-4.4-.356-8.022-.356-8.022 4.247 12.355 17.083 13.8 17.083 13.8"></path><path fill="#C53434" d="M70.19 124.593c-1.31 3.534-6.075 17.817-7.683 18.943-1.292.896-4.344 1.8-7.3 1.492 3.764-1.049 5.75-3.785 6.654-6.114 1.367-3.487 1.531-9.746-3.14-13.512-2.224-1.801-4.016-4.381-5.258-6.587-.222-4.4-.356-8.022-.356-8.022 4.247 12.355 17.083 13.8 17.083 13.8" opacity=".14"></path><path fill="#37C6AB" d="M106.805 123.631c-.155 4.651-5.932 14.762-7.704 17.17-1.088 1.493-2.86 2.118-4.93 2.34-1.272.144-2.648.125-4.055.068-3.688-.154-1.281-3.689 0-4.97 1.28-1.29 2.725-4.015 2.408-7.068-.136-1.377-.424-3.217-.684-4.815-.309-1.936-.598-3.525-.598-3.525 4.007-4.333 15.727-3.852 15.563.8"></path><path fill="#C53434" d="M106.805 123.631c-.155 4.651-5.932 14.762-7.704 17.171-1.089 1.492-2.861 2.118-4.931 2.34 6.096-7.724 8.504-15.14 6.077-17.489-1.993-1.936-6.385-.241-8.407.703-.309-1.936-.598-3.524-.598-3.524 4.007-4.334 15.727-3.852 15.563.799" opacity=".14"></path><path fill="#C53434" d="M106.805 123.631c-.155 4.651-5.932 14.762-7.704 17.171-1.089 1.492-2.861 2.118-4.931 2.34 6.096-7.724 8.504-15.14 6.077-17.489-1.993-1.936-6.385-.241-8.407.703-.309-1.936-.598-3.524-.598-3.524 4.007-4.334 15.727-3.852 15.563.799" opacity=".14"></path><path fill="#37C6AB" d="M81.661 79.274s-.607-1.156-1.908-2.744c-2.397-2.928-7.183-7.31-14.973-8.619-1.85-.318-3.862-.453-6.058-.356 0 0 8.436-14.542 14.86-13.906 6.432.645 8.08 25.625 8.08 25.625"></path><path fill="#01384D" d="M79.753 76.53c-2.397-2.927-7.183-7.31-14.975-8.619 1.416-3.227 5.634-12.115 9.45-11.855 3.9.279 5.207 15.552 5.525 20.474" opacity=".59"></path><path fill="#01384D" d="M67.858 69.832s3.086-10.356 6.37-9.582c3.28.773 1.748 13.662 1.748 13.662z"></path><path fill="#37C6AB" d="M49.9 68.287s-1.82.423-4.227 1.772c-.01.008 0 .008 0 .008a21.64 21.64 0 0 0-9.033 9.65 24.3 24.3 0 0 0-1.473 3.891s-.501-17.623 2.35-24.2c2.86-6.588 12.384 8.879 12.384 8.879"></path><path fill="#01384D" d="M45.672 70.06c-.009.009.001.008.001.008a21.63 21.63 0 0 0-9.033 9.65c-.298-7.252.656-18.47 2.272-19.646 1.628-1.184 5.172 6.357 6.76 9.987" opacity=".59"></path><path fill="#01384D" d="M37.99 77.578s-.106-12.42 1.913-13.687c2.017-1.266 4.666 8.829 4.666 8.829z"></path><path fill="#FEF3C6" d="M82.104 87.854c-1.108 7.57-6.155 11.7-10.709 13.915-3.177 1.552-15.313 2.976-22.159.897-2.447-.742-5.2-1.744-7.627-3.467-2.937-2.081-5.382-5.201-6.202-10.18a22 22 0 0 1-.298-3.9c.028-8.243 4.661-14.031 11.845-16.833a28 28 0 0 1 5.595-1.483 33 33 0 0 1 3.871-.386c.664-.038 1.348-.048 2.042-.038 13.376.145 22.9 5.239 23.786 16.226.154 1.907.096 3.66-.144 5.249"></path><path fill="#37C6AB" d="M48.13 85.275c-1.475 6.615-8.197 7.097-12.724 3.746a22.5 22.5 0 0 1-.298-3.9c.03-8.244 4.662-14.032 11.847-16.833 1.154 3.89 2.59 10.64 1.175 16.987M82.104 87.854c-8.302 6.385-25.973 6.163-27.456-3.718-1.28-8.455.617-14.83 1.772-17.719a29 29 0 0 1 2.042-.038c13.376.145 22.9 5.239 23.786 16.226.154 1.907.096 3.66-.144 5.249"></path><path fill="#C53434" d="M82.104 87.854c-1.108 7.57-6.155 11.7-10.709 13.915-3.177 1.552-15.313 2.976-22.159.897-2.447-.742-5.2-1.744-7.627-3.467.29.086.597.192.906.299 24.383 8.618 39.28-10.537 32.674-22.449-6.606-11.922-22.64-10.246-22.64-10.246a33 33 0 0 1 3.871-.386c.664-.038 1.348-.048 2.042-.038 13.376.145 22.9 5.239 23.786 16.226.154 1.907.096 3.66-.144 5.249" opacity=".14"></path><path fill="#FDE047" d="M42.433 88.058c-4.185 0-6.22-3.747-5.85-7.107.297-2.764 2.21-5.258 5.85-5.23.795.01 1.497.145 2.126.396 5.368 2.09 4.702 11.94-2.126 11.94"></path><path fill="#01384D" d="M41.105 78.914c4.603.035 4.638 7.506 0 7.506s-4.919-7.542 0-7.506"></path><path fill="#FDE047" d="M61.973 87.93c-4.58 0-6.806-3.746-6.4-7.107.323-2.763 2.416-5.257 6.4-5.228.871.01 1.638.144 2.326.395 5.876 2.089 5.149 11.94-2.326 11.94"></path><path fill="#01384D" d="M60.518 78.787c5.038.033 5.075 7.506 0 7.506s-5.382-7.543 0-7.506"></path><path stroke="#014D5D" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width=".48" d="M39.903 90.694s-8.85-5.16-23.616-3.706M35.932 92.459s-8.919-.466-19.644 2.578M65.472 90.694s14.628-5.16 29.394-3.706M69.444 92.458s14.696-.465 25.422 2.58"></path><path fill="#9C8EF4" d="m29.925 109.052 133.991-9.068s-4.195-39.403-14.699-66.367c0 0-48.495-8.354-110.554 4.33 0 0-5.283 8.533-8.738 71.105"></path><path fill="#CEC4FD" d="M38.663 37.947s-5.236 3.11-18.56 11.75c0 0-6.261 39.108-6.904 58.059 0 0 8.734.335 16.725 1.297 0 0 4.993-59.394 8.74-71.106"></path><path fill="#9C8EF4" d="m29.923 109.052-6.13-14.574H3.89l9.308 13.279z"></path><path fill="#CEC4FD" d="m29.925 109.053 6.708-17.11s101.116-7.603 135.784-7.925l-8.501 15.967s-119.833 8.104-133.991 9.068"></path>',32)]))}const VN={render:BN},zN={class:"ivyforms-page-empty-state__text"},HN={class:"medium-16"},UN={class:"ivyforms-page-empty-state__text__subtitle regular-14"},WN=he({__name:"PageEmptyState",props:{title:{default:""},subtitle:{default:""},image:{default:"fields"}},setup(n){const e=n,{isDark:t,isLight:r}=Ag();return(o,i)=>(C(),F("div",{class:ee(["ivyforms-page-empty-state",`ivyforms-page-empty-state__${e.image}`])},[e.image==="fields"?(C(),se(h(TN),{key:0})):e.image==="form-builder"&&h(r)()?(C(),se(h(AN),{key:1})):e.image==="form-builder"&&h(t)()?(C(),se(h(RN),{key:2})):e.image==="filters"?(C(),se(h(FN),{key:3})):e.image==="not-found"?(C(),se(h(VN),{key:4})):ie("",!0),z("div",zN,[z("span",HN,ae(e.title),1),z("span",UN,ae(e.subtitle),1)]),xe(o.$slots,"actionButton",{},void 0,!0)],2))}}),Es=bt(WN,[["__scopeId","data-v-81e1614a"]]),jN={};function KN(n,e){const t=TA;return C(),se(t,kt({class:"ivyforms-skeleton"},{...n.$props,...n.$attrs},{animated:""}),ws({_:2},[n.$slots.template?{name:"template",fn:V(()=>[xe(n.$slots,"template")]),key:"0"}:void 0,n.$slots.default?{name:"default",fn:V(()=>[xe(n.$slots,"default")]),key:"1"}:void 0]),1040)}const bc=bt(jN,[["render",KN]]),YN={};function qN(n,e){const t=MA;return C(),se(t,kt({class:"ivyforms-skeleton-item"},{...n.$props,...n.$attrs}),null,16)}const Sc=bt(YN,[["render",qN]]),GN={class:"ivyforms-all-forms__header"},JN=he({__name:"AllFormsTableHeader",props:{selectedIds:{},loading:{type:Boolean}},emits:["unselect-all","reload","update:loading"],setup(n,{emit:e}){const t=Na(),{getLabel:r}=at(),o=n,i=e,a=H(!1),s=()=>{o.selectedIds.length>0&&t.handleActionClick(null,o.selectedIds,"forms","delete",{setLoading:d=>{a.value=d,i("update:loading",d)}})},l=O(()=>o.selectedIds.length>0),c=d=>{d||i("unselect-all")};return(d,f)=>(C(),F("div",GN,[I(pn,{type:"checkmark",indeterminate:"",size:"s","model-value":l.value,class:"ivyforms-ml-12","onUpdate:modelValue":c},{default:V(()=>[xe(d.$slots,"default")]),_:3},8,["model-value"]),I(it,{priority:"danger",size:"xs",onClick:s},{default:V(()=>[De(ae(h(r)("delete")),1)]),_:1})]))}}),XN=["aria-label"],QN={key:0,class:"ivyforms-indicator-button__indicator-x"},Pg=he({__name:"IvyIndicatorButton",props:{type:{default:"sort"},color:{default:"tertiary"},indicator:{type:Boolean,default:!1},indicatorPriority:{default:"secondary"},customHideIndicator:{type:Function,default:void 0},ariaLabel:{default:""}},setup(n){const{getLabel:e}=at(),t=n,r=H(t.indicator),o=H(!1),i=H(!1),a=H(!1),s=O(()=>r.value&&(i.value||a.value)),l=()=>{o.value=!o.value},c=()=>{t.customHideIndicator?t.customHideIndicator():r.value=!1,o.value=!1,i.value=!1,a.value=!1};Me(()=>t.indicator,v=>{r.value=v}),Me(r,v=>{v||(i.value=!1,a.value=!1)});const d=v=>{const y={sort:{default:"sort-default",hover:"sort-from-top",active:"sort-from-top"},filter:{default:"filter",hover:"filter",active:"filter"},folder:{default:"folder",hover:"folder",active:"folder"},datepicker:{default:"calendar-dot",hover:"calendar-dot",active:"calendar-dot"},import:{default:"import",hover:"import",active:"import"},export:{default:"export",hover:"export",active:"export"}};return o.value?y[v].active:i.value?y[v].hover:y[v].default},f=()=>t.color==="tertiary"?"var(--map-base-dusk-fill--4)":"var(--map-ground-level-3)",m=()=>t.color!=="tertiary"&&(i.value||o.value)?"var(--map-base-purple-symbol-0)":"var(--map-base-dusk-symbol-2)",g=O(()=>d(t.type));return(v,y)=>{const b=rn;return C(),F("button",{class:ee(["ivyforms-indicator-button__wrapper",{"is-active":o.value,"is-fab":t.color==="fab"}]),style:Sn({background:f()}),"aria-label":t.ariaLabel||h(e)("indicator_button"),onClick:l,onMouseenter:y[2]||(y[2]=_=>i.value=!0),onMouseleave:y[3]||(y[3]=_=>i.value=!1)},[I(b,{name:g.value,color:m(),type:"outline",size:"l"},null,8,["name","color"]),r.value?(C(),F("span",{key:0,class:ee(["ivyforms-indicator-button__indicator",`priority-${t.indicatorPriority}`]),onMouseenter:y[0]||(y[0]=_=>a.value=!0),onMouseleave:y[1]||(y[1]=_=>a.value=!1),onClick:lt(c,["stop"])},[s.value?(C(),F("span",QN,"×")):ie("",!0)],34)):ie("",!0)],46,XN)}}}),ZN={class:"ivyforms-search"},Ws=he({__name:"IvySearch",props:{modelValue:{default:""},placeholder:{default:""},isSecondary:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:e}){const t=e;function r(o){t("update:modelValue",o)}return(o,i)=>{const a=cn;return C(),F("div",ZN,[I(a,{ref:"elInputRef","model-value":o.modelValue,clearable:!0,placeholder:o.placeholder,"icon-start":"search","icon-start-type":"outline",class:ee({"is-secondary":o.isSecondary}),"onUpdate:modelValue":r},null,8,["model-value","placeholder","class"])])}}});var bu={exports:{}};/**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */var eF=bu.exports,Yb;function tF(){return Yb||(Yb=1,function(n,e){(function(){var t,r="4.17.21",o=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",c=500,d="__lodash_placeholder__",f=1,m=2,g=4,v=1,y=2,b=1,_=2,w=4,T=8,k=16,x=32,M=64,D=128,A=256,P=512,$=30,B="...",j=800,U=16,G=1,N=2,R=3,X=1/0,te=9007199254740991,Y=17976931348623157e292,re=NaN,Q=4294967295,Z=Q-1,q=Q>>>1,le=[["ary",D],["bind",b],["bindKey",_],["curry",T],["curryRight",k],["flip",P],["partial",x],["partialRight",M],["rearg",A]],ye="[object Arguments]",Re="[object Array]",ze="[object AsyncFunction]",nt="[object Boolean]",Ge="[object Date]",mt="[object DOMException]",ut="[object Error]",Pt="[object Function]",gt="[object GeneratorFunction]",tt="[object Map]",Ct="[object Number]",Bt="[object Null]",Ne="[object Object]",je="[object Promise]",Be="[object Proxy]",qe="[object RegExp]",Je="[object Set]",ct="[object String]",vt="[object Symbol]",Se="[object Undefined]",He="[object WeakMap]",Tt="[object WeakSet]",$t="[object ArrayBuffer]",wt="[object DataView]",me="[object Float32Array]",ce="[object Float64Array]",be="[object Int8Array]",Te="[object Int16Array]",de="[object Int32Array]",fe="[object Uint8Array]",ne="[object Uint8ClampedArray]",W="[object Uint16Array]",_e="[object Uint32Array]",ke=/\b__p \+= '';/g,Ee=/\b(__p \+=) '' \+/g,Ke=/(__e\(.*?\)|\b__t\)) \+\n'';/g,St=/&(?:amp|lt|gt|quot|#39);/g,dt=/[&<>"']/g,pe=RegExp(St.source),Ae=RegExp(dt.source),Ue=/<%-([\s\S]+?)%>/g,Zt=/<%([\s\S]+?)%>/g,zr=/<%=([\s\S]+?)%>/g,Ys=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Hr=/^\w*$/,Fi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yl=/[\\^$.*+?()[\]{}|]/g,Gp=RegExp(Yl.source),ln=/^\s+/,Jp=/\s/,F_=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,L_=/\{\n\/\* \[wrapped with (.+)\] \*/,B_=/,? & /,V_=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,z_=/[()=,{}\[\]\/\s]/,H_=/\\(\\)?/g,U_=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,w1=/\w*$/,W_=/^[-+]0x[0-9a-f]+$/i,j_=/^0b[01]+$/i,K_=/^\[object .+?Constructor\]$/,Y_=/^0o[0-7]+$/i,q_=/^(?:0|[1-9]\d*)$/,G_=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Tc=/($^)/,J_=/['\n\r\u2028\u2029\\]/g,Mc="\\ud800-\\udfff",X_="\\u0300-\\u036f",Q_="\\ufe20-\\ufe2f",Z_="\\u20d0-\\u20ff",x1=X_+Q_+Z_,k1="\\u2700-\\u27bf",C1="a-z\\xdf-\\xf6\\xf8-\\xff",e6="\\xac\\xb1\\xd7\\xf7",t6="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",n6="\\u2000-\\u206f",r6=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",I1="A-Z\\xc0-\\xd6\\xd8-\\xde",E1="\\ufe0e\\ufe0f",T1=e6+t6+n6+r6,Xp="['’]",o6="["+Mc+"]",M1="["+T1+"]",Oc="["+x1+"]",O1="\\d+",a6="["+k1+"]",A1="["+C1+"]",P1="[^"+Mc+T1+O1+k1+C1+I1+"]",Qp="\\ud83c[\\udffb-\\udfff]",i6="(?:"+Oc+"|"+Qp+")",$1="[^"+Mc+"]",Zp="(?:\\ud83c[\\udde6-\\uddff]){2}",eh="[\\ud800-\\udbff][\\udc00-\\udfff]",qs="["+I1+"]",R1="\\u200d",D1="(?:"+A1+"|"+P1+")",s6="(?:"+qs+"|"+P1+")",N1="(?:"+Xp+"(?:d|ll|m|re|s|t|ve))?",F1="(?:"+Xp+"(?:D|LL|M|RE|S|T|VE))?",L1=i6+"?",B1="["+E1+"]?",l6="(?:"+R1+"(?:"+[$1,Zp,eh].join("|")+")"+B1+L1+")*",u6="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",c6="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",V1=B1+L1+l6,d6="(?:"+[a6,Zp,eh].join("|")+")"+V1,f6="(?:"+[$1+Oc+"?",Oc,Zp,eh,o6].join("|")+")",p6=RegExp(Xp,"g"),h6=RegExp(Oc,"g"),th=RegExp(Qp+"(?="+Qp+")|"+f6+V1,"g"),m6=RegExp([qs+"?"+A1+"+"+N1+"(?="+[M1,qs,"$"].join("|")+")",s6+"+"+F1+"(?="+[M1,qs+D1,"$"].join("|")+")",qs+"?"+D1+"+"+N1,qs+"+"+F1,c6,u6,O1,d6].join("|"),"g"),v6=RegExp("["+R1+Mc+x1+E1+"]"),g6=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,y6=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],b6=-1,_n={};_n[me]=_n[ce]=_n[be]=_n[Te]=_n[de]=_n[fe]=_n[ne]=_n[W]=_n[_e]=!0,_n[ye]=_n[Re]=_n[$t]=_n[nt]=_n[wt]=_n[Ge]=_n[ut]=_n[Pt]=_n[tt]=_n[Ct]=_n[Ne]=_n[qe]=_n[Je]=_n[ct]=_n[He]=!1;var yn={};yn[ye]=yn[Re]=yn[$t]=yn[wt]=yn[nt]=yn[Ge]=yn[me]=yn[ce]=yn[be]=yn[Te]=yn[de]=yn[tt]=yn[Ct]=yn[Ne]=yn[qe]=yn[Je]=yn[ct]=yn[vt]=yn[fe]=yn[ne]=yn[W]=yn[_e]=!0,yn[ut]=yn[Pt]=yn[He]=!1;var S6={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",Ĳ:"IJ",ĳ:"ij",Œ:"Oe",œ:"oe",ŉ:"'n",ſ:"s"},_6={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},w6={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},x6={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},k6=parseFloat,C6=parseInt,z1=typeof vd=="object"&&vd&&vd.Object===Object&&vd,I6=typeof self=="object"&&self&&self.Object===Object&&self,ar=z1||I6||Function("return this")(),nh=e&&!e.nodeType&&e,Li=nh&&!0&&n&&!n.nodeType&&n,H1=Li&&Li.exports===nh,rh=H1&&z1.process,ro=function(){try{var ve=Li&&Li.require&&Li.require("util").types;return ve||rh&&rh.binding&&rh.binding("util")}catch{}}(),U1=ro&&ro.isArrayBuffer,W1=ro&&ro.isDate,j1=ro&&ro.isMap,K1=ro&&ro.isRegExp,Y1=ro&&ro.isSet,q1=ro&&ro.isTypedArray;function Ur(ve,Ie,we){switch(we.length){case 0:return ve.call(Ie);case 1:return ve.call(Ie,we[0]);case 2:return ve.call(Ie,we[0],we[1]);case 3:return ve.call(Ie,we[0],we[1],we[2])}return ve.apply(Ie,we)}function E6(ve,Ie,we,rt){for(var Dt=-1,un=ve==null?0:ve.length;++Dt<un;){var Yn=ve[Dt];Ie(rt,Yn,we(Yn),ve)}return rt}function oo(ve,Ie){for(var we=-1,rt=ve==null?0:ve.length;++we<rt&&Ie(ve[we],we,ve)!==!1;);return ve}function T6(ve,Ie){for(var we=ve==null?0:ve.length;we--&&Ie(ve[we],we,ve)!==!1;);return ve}function G1(ve,Ie){for(var we=-1,rt=ve==null?0:ve.length;++we<rt;)if(!Ie(ve[we],we,ve))return!1;return!0}function Ha(ve,Ie){for(var we=-1,rt=ve==null?0:ve.length,Dt=0,un=[];++we<rt;){var Yn=ve[we];Ie(Yn,we,ve)&&(un[Dt++]=Yn)}return un}function Ac(ve,Ie){var we=ve==null?0:ve.length;return!!we&&Gs(ve,Ie,0)>-1}function oh(ve,Ie,we){for(var rt=-1,Dt=ve==null?0:ve.length;++rt<Dt;)if(we(Ie,ve[rt]))return!0;return!1}function kn(ve,Ie){for(var we=-1,rt=ve==null?0:ve.length,Dt=Array(rt);++we<rt;)Dt[we]=Ie(ve[we],we,ve);return Dt}function Ua(ve,Ie){for(var we=-1,rt=Ie.length,Dt=ve.length;++we<rt;)ve[Dt+we]=Ie[we];return ve}function ah(ve,Ie,we,rt){var Dt=-1,un=ve==null?0:ve.length;for(rt&&un&&(we=ve[++Dt]);++Dt<un;)we=Ie(we,ve[Dt],Dt,ve);return we}function M6(ve,Ie,we,rt){var Dt=ve==null?0:ve.length;for(rt&&Dt&&(we=ve[--Dt]);Dt--;)we=Ie(we,ve[Dt],Dt,ve);return we}function ih(ve,Ie){for(var we=-1,rt=ve==null?0:ve.length;++we<rt;)if(Ie(ve[we],we,ve))return!0;return!1}var O6=sh("length");function A6(ve){return ve.split("")}function P6(ve){return ve.match(V_)||[]}function J1(ve,Ie,we){var rt;return we(ve,function(Dt,un,Yn){if(Ie(Dt,un,Yn))return rt=un,!1}),rt}function Pc(ve,Ie,we,rt){for(var Dt=ve.length,un=we+(rt?1:-1);rt?un--:++un<Dt;)if(Ie(ve[un],un,ve))return un;return-1}function Gs(ve,Ie,we){return Ie===Ie?W6(ve,Ie,we):Pc(ve,X1,we)}function $6(ve,Ie,we,rt){for(var Dt=we-1,un=ve.length;++Dt<un;)if(rt(ve[Dt],Ie))return Dt;return-1}function X1(ve){return ve!==ve}function Q1(ve,Ie){var we=ve==null?0:ve.length;return we?uh(ve,Ie)/we:re}function sh(ve){return function(Ie){return Ie==null?t:Ie[ve]}}function lh(ve){return function(Ie){return ve==null?t:ve[Ie]}}function Z1(ve,Ie,we,rt,Dt){return Dt(ve,function(un,Yn,vn){we=rt?(rt=!1,un):Ie(we,un,Yn,vn)}),we}function R6(ve,Ie){var we=ve.length;for(ve.sort(Ie);we--;)ve[we]=ve[we].value;return ve}function uh(ve,Ie){for(var we,rt=-1,Dt=ve.length;++rt<Dt;){var un=Ie(ve[rt]);un!==t&&(we=we===t?un:we+un)}return we}function ch(ve,Ie){for(var we=-1,rt=Array(ve);++we<ve;)rt[we]=Ie(we);return rt}function D6(ve,Ie){return kn(Ie,function(we){return[we,ve[we]]})}function ey(ve){return ve&&ve.slice(0,oy(ve)+1).replace(ln,"")}function Wr(ve){return function(Ie){return ve(Ie)}}function dh(ve,Ie){return kn(Ie,function(we){return ve[we]})}function ql(ve,Ie){return ve.has(Ie)}function ty(ve,Ie){for(var we=-1,rt=ve.length;++we<rt&&Gs(Ie,ve[we],0)>-1;);return we}function ny(ve,Ie){for(var we=ve.length;we--&&Gs(Ie,ve[we],0)>-1;);return we}function N6(ve,Ie){for(var we=ve.length,rt=0;we--;)ve[we]===Ie&&++rt;return rt}var F6=lh(S6),L6=lh(_6);function B6(ve){return"\\"+x6[ve]}function V6(ve,Ie){return ve==null?t:ve[Ie]}function Js(ve){return v6.test(ve)}function z6(ve){return g6.test(ve)}function H6(ve){for(var Ie,we=[];!(Ie=ve.next()).done;)we.push(Ie.value);return we}function fh(ve){var Ie=-1,we=Array(ve.size);return ve.forEach(function(rt,Dt){we[++Ie]=[Dt,rt]}),we}function ry(ve,Ie){return function(we){return ve(Ie(we))}}function Wa(ve,Ie){for(var we=-1,rt=ve.length,Dt=0,un=[];++we<rt;){var Yn=ve[we];(Yn===Ie||Yn===d)&&(ve[we]=d,un[Dt++]=we)}return un}function $c(ve){var Ie=-1,we=Array(ve.size);return ve.forEach(function(rt){we[++Ie]=rt}),we}function U6(ve){var Ie=-1,we=Array(ve.size);return ve.forEach(function(rt){we[++Ie]=[rt,rt]}),we}function W6(ve,Ie,we){for(var rt=we-1,Dt=ve.length;++rt<Dt;)if(ve[rt]===Ie)return rt;return-1}function j6(ve,Ie,we){for(var rt=we+1;rt--;)if(ve[rt]===Ie)return rt;return rt}function Xs(ve){return Js(ve)?Y6(ve):O6(ve)}function Co(ve){return Js(ve)?q6(ve):A6(ve)}function oy(ve){for(var Ie=ve.length;Ie--&&Jp.test(ve.charAt(Ie)););return Ie}var K6=lh(w6);function Y6(ve){for(var Ie=th.lastIndex=0;th.test(ve);)++Ie;return Ie}function q6(ve){return ve.match(th)||[]}function G6(ve){return ve.match(m6)||[]}var J6=function ve(Ie){Ie=Ie==null?ar:Qs.defaults(ar.Object(),Ie,Qs.pick(ar,y6));var we=Ie.Array,rt=Ie.Date,Dt=Ie.Error,un=Ie.Function,Yn=Ie.Math,vn=Ie.Object,ph=Ie.RegExp,X6=Ie.String,ao=Ie.TypeError,Rc=we.prototype,Q6=un.prototype,Zs=vn.prototype,Dc=Ie["__core-js_shared__"],Nc=Q6.toString,hn=Zs.hasOwnProperty,Z6=0,ay=function(){var u=/[^.]+$/.exec(Dc&&Dc.keys&&Dc.keys.IE_PROTO||"");return u?"Symbol(src)_1."+u:""}(),Fc=Zs.toString,e5=Nc.call(vn),t5=ar._,n5=ph("^"+Nc.call(hn).replace(Yl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Lc=H1?Ie.Buffer:t,ja=Ie.Symbol,Bc=Ie.Uint8Array,iy=Lc?Lc.allocUnsafe:t,Vc=ry(vn.getPrototypeOf,vn),sy=vn.create,ly=Zs.propertyIsEnumerable,zc=Rc.splice,uy=ja?ja.isConcatSpreadable:t,Gl=ja?ja.iterator:t,Bi=ja?ja.toStringTag:t,Hc=function(){try{var u=Wi(vn,"defineProperty");return u({},"",{}),u}catch{}}(),r5=Ie.clearTimeout!==ar.clearTimeout&&Ie.clearTimeout,o5=rt&&rt.now!==ar.Date.now&&rt.now,a5=Ie.setTimeout!==ar.setTimeout&&Ie.setTimeout,Uc=Yn.ceil,Wc=Yn.floor,hh=vn.getOwnPropertySymbols,i5=Lc?Lc.isBuffer:t,cy=Ie.isFinite,s5=Rc.join,l5=ry(vn.keys,vn),qn=Yn.max,fr=Yn.min,u5=rt.now,c5=Ie.parseInt,dy=Yn.random,d5=Rc.reverse,mh=Wi(Ie,"DataView"),Jl=Wi(Ie,"Map"),vh=Wi(Ie,"Promise"),el=Wi(Ie,"Set"),Xl=Wi(Ie,"WeakMap"),Ql=Wi(vn,"create"),jc=Xl&&new Xl,tl={},f5=ji(mh),p5=ji(Jl),h5=ji(vh),m5=ji(el),v5=ji(Xl),Kc=ja?ja.prototype:t,Zl=Kc?Kc.valueOf:t,fy=Kc?Kc.toString:t;function K(u){if(Rn(u)&&!Ft(u)&&!(u instanceof en)){if(u instanceof io)return u;if(hn.call(u,"__wrapped__"))return p0(u)}return new io(u)}var nl=function(){function u(){}return function(p){if(!Mn(p))return{};if(sy)return sy(p);u.prototype=p;var S=new u;return u.prototype=t,S}}();function Yc(){}function io(u,p){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!p,this.__index__=0,this.__values__=t}K.templateSettings={escape:Ue,evaluate:Zt,interpolate:zr,variable:"",imports:{_:K}},K.prototype=Yc.prototype,K.prototype.constructor=K,io.prototype=nl(Yc.prototype),io.prototype.constructor=io;function en(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Q,this.__views__=[]}function g5(){var u=new en(this.__wrapped__);return u.__actions__=Or(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Or(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Or(this.__views__),u}function y5(){if(this.__filtered__){var u=new en(this);u.__dir__=-1,u.__filtered__=!0}else u=this.clone(),u.__dir__*=-1;return u}function b5(){var u=this.__wrapped__.value(),p=this.__dir__,S=Ft(u),E=p<0,L=S?u.length:0,J=Aw(0,L,this.__views__),oe=J.start,ue=J.end,ge=ue-oe,Oe=E?ue:oe-1,Pe=this.__iteratees__,Le=Pe.length,Xe=0,ht=fr(ge,this.__takeCount__);if(!S||!E&&L==ge&&ht==ge)return Ny(u,this.__actions__);var It=[];e:for(;ge--&&Xe<ht;){Oe+=p;for(var Wt=-1,Et=u[Oe];++Wt<Le;){var Qt=Pe[Wt],an=Qt.iteratee,Yr=Qt.type,wr=an(Et);if(Yr==N)Et=wr;else if(!wr){if(Yr==G)continue e;break e}}It[Xe++]=Et}return It}en.prototype=nl(Yc.prototype),en.prototype.constructor=en;function Vi(u){var p=-1,S=u==null?0:u.length;for(this.clear();++p<S;){var E=u[p];this.set(E[0],E[1])}}function S5(){this.__data__=Ql?Ql(null):{},this.size=0}function _5(u){var p=this.has(u)&&delete this.__data__[u];return this.size-=p?1:0,p}function w5(u){var p=this.__data__;if(Ql){var S=p[u];return S===l?t:S}return hn.call(p,u)?p[u]:t}function x5(u){var p=this.__data__;return Ql?p[u]!==t:hn.call(p,u)}function k5(u,p){var S=this.__data__;return this.size+=this.has(u)?0:1,S[u]=Ql&&p===t?l:p,this}Vi.prototype.clear=S5,Vi.prototype.delete=_5,Vi.prototype.get=w5,Vi.prototype.has=x5,Vi.prototype.set=k5;function sa(u){var p=-1,S=u==null?0:u.length;for(this.clear();++p<S;){var E=u[p];this.set(E[0],E[1])}}function C5(){this.__data__=[],this.size=0}function I5(u){var p=this.__data__,S=qc(p,u);if(S<0)return!1;var E=p.length-1;return S==E?p.pop():zc.call(p,S,1),--this.size,!0}function E5(u){var p=this.__data__,S=qc(p,u);return S<0?t:p[S][1]}function T5(u){return qc(this.__data__,u)>-1}function M5(u,p){var S=this.__data__,E=qc(S,u);return E<0?(++this.size,S.push([u,p])):S[E][1]=p,this}sa.prototype.clear=C5,sa.prototype.delete=I5,sa.prototype.get=E5,sa.prototype.has=T5,sa.prototype.set=M5;function la(u){var p=-1,S=u==null?0:u.length;for(this.clear();++p<S;){var E=u[p];this.set(E[0],E[1])}}function O5(){this.size=0,this.__data__={hash:new Vi,map:new(Jl||sa),string:new Vi}}function A5(u){var p=id(this,u).delete(u);return this.size-=p?1:0,p}function P5(u){return id(this,u).get(u)}function $5(u){return id(this,u).has(u)}function R5(u,p){var S=id(this,u),E=S.size;return S.set(u,p),this.size+=S.size==E?0:1,this}la.prototype.clear=O5,la.prototype.delete=A5,la.prototype.get=P5,la.prototype.has=$5,la.prototype.set=R5;function zi(u){var p=-1,S=u==null?0:u.length;for(this.__data__=new la;++p<S;)this.add(u[p])}function D5(u){return this.__data__.set(u,l),this}function N5(u){return this.__data__.has(u)}zi.prototype.add=zi.prototype.push=D5,zi.prototype.has=N5;function Io(u){var p=this.__data__=new sa(u);this.size=p.size}function F5(){this.__data__=new sa,this.size=0}function L5(u){var p=this.__data__,S=p.delete(u);return this.size=p.size,S}function B5(u){return this.__data__.get(u)}function V5(u){return this.__data__.has(u)}function z5(u,p){var S=this.__data__;if(S instanceof sa){var E=S.__data__;if(!Jl||E.length<o-1)return E.push([u,p]),this.size=++S.size,this;S=this.__data__=new la(E)}return S.set(u,p),this.size=S.size,this}Io.prototype.clear=F5,Io.prototype.delete=L5,Io.prototype.get=B5,Io.prototype.has=V5,Io.prototype.set=z5;function py(u,p){var S=Ft(u),E=!S&&Ki(u),L=!S&&!E&&Ja(u),J=!S&&!E&&!L&&il(u),oe=S||E||L||J,ue=oe?ch(u.length,X6):[],ge=ue.length;for(var Oe in u)(p||hn.call(u,Oe))&&!(oe&&(Oe=="length"||L&&(Oe=="offset"||Oe=="parent")||J&&(Oe=="buffer"||Oe=="byteLength"||Oe=="byteOffset")||fa(Oe,ge)))&&ue.push(Oe);return ue}function hy(u){var p=u.length;return p?u[Eh(0,p-1)]:t}function H5(u,p){return sd(Or(u),Hi(p,0,u.length))}function U5(u){return sd(Or(u))}function gh(u,p,S){(S!==t&&!Eo(u[p],S)||S===t&&!(p in u))&&ua(u,p,S)}function eu(u,p,S){var E=u[p];(!(hn.call(u,p)&&Eo(E,S))||S===t&&!(p in u))&&ua(u,p,S)}function qc(u,p){for(var S=u.length;S--;)if(Eo(u[S][0],p))return S;return-1}function W5(u,p,S,E){return Ka(u,function(L,J,oe){p(E,L,S(L),oe)}),E}function my(u,p){return u&&Ho(p,Xn(p),u)}function j5(u,p){return u&&Ho(p,Pr(p),u)}function ua(u,p,S){p=="__proto__"&&Hc?Hc(u,p,{configurable:!0,enumerable:!0,value:S,writable:!0}):u[p]=S}function yh(u,p){for(var S=-1,E=p.length,L=we(E),J=u==null;++S<E;)L[S]=J?t:Qh(u,p[S]);return L}function Hi(u,p,S){return u===u&&(S!==t&&(u=u<=S?u:S),p!==t&&(u=u>=p?u:p)),u}function so(u,p,S,E,L,J){var oe,ue=p&f,ge=p&m,Oe=p&g;if(S&&(oe=L?S(u,E,L,J):S(u)),oe!==t)return oe;if(!Mn(u))return u;var Pe=Ft(u);if(Pe){if(oe=$w(u),!ue)return Or(u,oe)}else{var Le=pr(u),Xe=Le==Pt||Le==gt;if(Ja(u))return By(u,ue);if(Le==Ne||Le==ye||Xe&&!L){if(oe=ge||Xe?{}:o0(u),!ue)return ge?ww(u,j5(oe,u)):_w(u,my(oe,u))}else{if(!yn[Le])return L?u:{};oe=Rw(u,Le,ue)}}J||(J=new Io);var ht=J.get(u);if(ht)return ht;J.set(u,oe),$0(u)?u.forEach(function(Et){oe.add(so(Et,p,S,Et,u,J))}):A0(u)&&u.forEach(function(Et,Qt){oe.set(Qt,so(Et,p,S,Qt,u,J))});var It=Oe?ge?Lh:Fh:ge?Pr:Xn,Wt=Pe?t:It(u);return oo(Wt||u,function(Et,Qt){Wt&&(Qt=Et,Et=u[Qt]),eu(oe,Qt,so(Et,p,S,Qt,u,J))}),oe}function K5(u){var p=Xn(u);return function(S){return vy(S,u,p)}}function vy(u,p,S){var E=S.length;if(u==null)return!E;for(u=vn(u);E--;){var L=S[E],J=p[L],oe=u[L];if(oe===t&&!(L in u)||!J(oe))return!1}return!0}function gy(u,p,S){if(typeof u!="function")throw new ao(a);return su(function(){u.apply(t,S)},p)}function tu(u,p,S,E){var L=-1,J=Ac,oe=!0,ue=u.length,ge=[],Oe=p.length;if(!ue)return ge;S&&(p=kn(p,Wr(S))),E?(J=oh,oe=!1):p.length>=o&&(J=ql,oe=!1,p=new zi(p));e:for(;++L<ue;){var Pe=u[L],Le=S==null?Pe:S(Pe);if(Pe=E||Pe!==0?Pe:0,oe&&Le===Le){for(var Xe=Oe;Xe--;)if(p[Xe]===Le)continue e;ge.push(Pe)}else J(p,Le,E)||ge.push(Pe)}return ge}var Ka=Wy(zo),yy=Wy(Sh,!0);function Y5(u,p){var S=!0;return Ka(u,function(E,L,J){return S=!!p(E,L,J),S}),S}function Gc(u,p,S){for(var E=-1,L=u.length;++E<L;){var J=u[E],oe=p(J);if(oe!=null&&(ue===t?oe===oe&&!Kr(oe):S(oe,ue)))var ue=oe,ge=J}return ge}function q5(u,p,S,E){var L=u.length;for(S=Ut(S),S<0&&(S=-S>L?0:L+S),E=E===t||E>L?L:Ut(E),E<0&&(E+=L),E=S>E?0:D0(E);S<E;)u[S++]=p;return u}function by(u,p){var S=[];return Ka(u,function(E,L,J){p(E,L,J)&&S.push(E)}),S}function ir(u,p,S,E,L){var J=-1,oe=u.length;for(S||(S=Nw),L||(L=[]);++J<oe;){var ue=u[J];p>0&&S(ue)?p>1?ir(ue,p-1,S,E,L):Ua(L,ue):E||(L[L.length]=ue)}return L}var bh=jy(),Sy=jy(!0);function zo(u,p){return u&&bh(u,p,Xn)}function Sh(u,p){return u&&Sy(u,p,Xn)}function Jc(u,p){return Ha(p,function(S){return pa(u[S])})}function Ui(u,p){p=qa(p,u);for(var S=0,E=p.length;u!=null&&S<E;)u=u[Uo(p[S++])];return S&&S==E?u:t}function _y(u,p,S){var E=p(u);return Ft(u)?E:Ua(E,S(u))}function Sr(u){return u==null?u===t?Se:Bt:Bi&&Bi in vn(u)?Ow(u):Uw(u)}function _h(u,p){return u>p}function G5(u,p){return u!=null&&hn.call(u,p)}function J5(u,p){return u!=null&&p in vn(u)}function X5(u,p,S){return u>=fr(p,S)&&u<qn(p,S)}function wh(u,p,S){for(var E=S?oh:Ac,L=u[0].length,J=u.length,oe=J,ue=we(J),ge=1/0,Oe=[];oe--;){var Pe=u[oe];oe&&p&&(Pe=kn(Pe,Wr(p))),ge=fr(Pe.length,ge),ue[oe]=!S&&(p||L>=120&&Pe.length>=120)?new zi(oe&&Pe):t}Pe=u[0];var Le=-1,Xe=ue[0];e:for(;++Le<L&&Oe.length<ge;){var ht=Pe[Le],It=p?p(ht):ht;if(ht=S||ht!==0?ht:0,!(Xe?ql(Xe,It):E(Oe,It,S))){for(oe=J;--oe;){var Wt=ue[oe];if(!(Wt?ql(Wt,It):E(u[oe],It,S)))continue e}Xe&&Xe.push(It),Oe.push(ht)}}return Oe}function Q5(u,p,S,E){return zo(u,function(L,J,oe){p(E,S(L),J,oe)}),E}function nu(u,p,S){p=qa(p,u),u=l0(u,p);var E=u==null?u:u[Uo(uo(p))];return E==null?t:Ur(E,u,S)}function wy(u){return Rn(u)&&Sr(u)==ye}function Z5(u){return Rn(u)&&Sr(u)==$t}function ew(u){return Rn(u)&&Sr(u)==Ge}function ru(u,p,S,E,L){return u===p?!0:u==null||p==null||!Rn(u)&&!Rn(p)?u!==u&&p!==p:tw(u,p,S,E,ru,L)}function tw(u,p,S,E,L,J){var oe=Ft(u),ue=Ft(p),ge=oe?Re:pr(u),Oe=ue?Re:pr(p);ge=ge==ye?Ne:ge,Oe=Oe==ye?Ne:Oe;var Pe=ge==Ne,Le=Oe==Ne,Xe=ge==Oe;if(Xe&&Ja(u)){if(!Ja(p))return!1;oe=!0,Pe=!1}if(Xe&&!Pe)return J||(J=new Io),oe||il(u)?t0(u,p,S,E,L,J):Tw(u,p,ge,S,E,L,J);if(!(S&v)){var ht=Pe&&hn.call(u,"__wrapped__"),It=Le&&hn.call(p,"__wrapped__");if(ht||It){var Wt=ht?u.value():u,Et=It?p.value():p;return J||(J=new Io),L(Wt,Et,S,E,J)}}return Xe?(J||(J=new Io),Mw(u,p,S,E,L,J)):!1}function nw(u){return Rn(u)&&pr(u)==tt}function xh(u,p,S,E){var L=S.length,J=L,oe=!E;if(u==null)return!J;for(u=vn(u);L--;){var ue=S[L];if(oe&&ue[2]?ue[1]!==u[ue[0]]:!(ue[0]in u))return!1}for(;++L<J;){ue=S[L];var ge=ue[0],Oe=u[ge],Pe=ue[1];if(oe&&ue[2]){if(Oe===t&&!(ge in u))return!1}else{var Le=new Io;if(E)var Xe=E(Oe,Pe,ge,u,p,Le);if(!(Xe===t?ru(Pe,Oe,v|y,E,Le):Xe))return!1}}return!0}function xy(u){if(!Mn(u)||Lw(u))return!1;var p=pa(u)?n5:K_;return p.test(ji(u))}function rw(u){return Rn(u)&&Sr(u)==qe}function ow(u){return Rn(u)&&pr(u)==Je}function aw(u){return Rn(u)&&pd(u.length)&&!!_n[Sr(u)]}function ky(u){return typeof u=="function"?u:u==null?$r:typeof u=="object"?Ft(u)?Ey(u[0],u[1]):Iy(u):K0(u)}function kh(u){if(!iu(u))return l5(u);var p=[];for(var S in vn(u))hn.call(u,S)&&S!="constructor"&&p.push(S);return p}function iw(u){if(!Mn(u))return Hw(u);var p=iu(u),S=[];for(var E in u)E=="constructor"&&(p||!hn.call(u,E))||S.push(E);return S}function Ch(u,p){return u<p}function Cy(u,p){var S=-1,E=Ar(u)?we(u.length):[];return Ka(u,function(L,J,oe){E[++S]=p(L,J,oe)}),E}function Iy(u){var p=Vh(u);return p.length==1&&p[0][2]?i0(p[0][0],p[0][1]):function(S){return S===u||xh(S,u,p)}}function Ey(u,p){return Hh(u)&&a0(p)?i0(Uo(u),p):function(S){var E=Qh(S,u);return E===t&&E===p?Zh(S,u):ru(p,E,v|y)}}function Xc(u,p,S,E,L){u!==p&&bh(p,function(J,oe){if(L||(L=new Io),Mn(J))sw(u,p,oe,S,Xc,E,L);else{var ue=E?E(Wh(u,oe),J,oe+"",u,p,L):t;ue===t&&(ue=J),gh(u,oe,ue)}},Pr)}function sw(u,p,S,E,L,J,oe){var ue=Wh(u,S),ge=Wh(p,S),Oe=oe.get(ge);if(Oe){gh(u,S,Oe);return}var Pe=J?J(ue,ge,S+"",u,p,oe):t,Le=Pe===t;if(Le){var Xe=Ft(ge),ht=!Xe&&Ja(ge),It=!Xe&&!ht&&il(ge);Pe=ge,Xe||ht||It?Ft(ue)?Pe=ue:Bn(ue)?Pe=Or(ue):ht?(Le=!1,Pe=By(ge,!0)):It?(Le=!1,Pe=Vy(ge,!0)):Pe=[]:lu(ge)||Ki(ge)?(Pe=ue,Ki(ue)?Pe=N0(ue):(!Mn(ue)||pa(ue))&&(Pe=o0(ge))):Le=!1}Le&&(oe.set(ge,Pe),L(Pe,ge,E,J,oe),oe.delete(ge)),gh(u,S,Pe)}function Ty(u,p){var S=u.length;if(S)return p+=p<0?S:0,fa(p,S)?u[p]:t}function My(u,p,S){p.length?p=kn(p,function(J){return Ft(J)?function(oe){return Ui(oe,J.length===1?J[0]:J)}:J}):p=[$r];var E=-1;p=kn(p,Wr(xt()));var L=Cy(u,function(J,oe,ue){var ge=kn(p,function(Oe){return Oe(J)});return{criteria:ge,index:++E,value:J}});return R6(L,function(J,oe){return Sw(J,oe,S)})}function lw(u,p){return Oy(u,p,function(S,E){return Zh(u,E)})}function Oy(u,p,S){for(var E=-1,L=p.length,J={};++E<L;){var oe=p[E],ue=Ui(u,oe);S(ue,oe)&&ou(J,qa(oe,u),ue)}return J}function uw(u){return function(p){return Ui(p,u)}}function Ih(u,p,S,E){var L=E?$6:Gs,J=-1,oe=p.length,ue=u;for(u===p&&(p=Or(p)),S&&(ue=kn(u,Wr(S)));++J<oe;)for(var ge=0,Oe=p[J],Pe=S?S(Oe):Oe;(ge=L(ue,Pe,ge,E))>-1;)ue!==u&&zc.call(ue,ge,1),zc.call(u,ge,1);return u}function Ay(u,p){for(var S=u?p.length:0,E=S-1;S--;){var L=p[S];if(S==E||L!==J){var J=L;fa(L)?zc.call(u,L,1):Oh(u,L)}}return u}function Eh(u,p){return u+Wc(dy()*(p-u+1))}function cw(u,p,S,E){for(var L=-1,J=qn(Uc((p-u)/(S||1)),0),oe=we(J);J--;)oe[E?J:++L]=u,u+=S;return oe}function Th(u,p){var S="";if(!u||p<1||p>te)return S;do p%2&&(S+=u),p=Wc(p/2),p&&(u+=u);while(p);return S}function Yt(u,p){return jh(s0(u,p,$r),u+"")}function dw(u){return hy(sl(u))}function fw(u,p){var S=sl(u);return sd(S,Hi(p,0,S.length))}function ou(u,p,S,E){if(!Mn(u))return u;p=qa(p,u);for(var L=-1,J=p.length,oe=J-1,ue=u;ue!=null&&++L<J;){var ge=Uo(p[L]),Oe=S;if(ge==="__proto__"||ge==="constructor"||ge==="prototype")return u;if(L!=oe){var Pe=ue[ge];Oe=E?E(Pe,ge,ue):t,Oe===t&&(Oe=Mn(Pe)?Pe:fa(p[L+1])?[]:{})}eu(ue,ge,Oe),ue=ue[ge]}return u}var Py=jc?function(u,p){return jc.set(u,p),u}:$r,pw=Hc?function(u,p){return Hc(u,"toString",{configurable:!0,enumerable:!1,value:tm(p),writable:!0})}:$r;function hw(u){return sd(sl(u))}function lo(u,p,S){var E=-1,L=u.length;p<0&&(p=-p>L?0:L+p),S=S>L?L:S,S<0&&(S+=L),L=p>S?0:S-p>>>0,p>>>=0;for(var J=we(L);++E<L;)J[E]=u[E+p];return J}function mw(u,p){var S;return Ka(u,function(E,L,J){return S=p(E,L,J),!S}),!!S}function Qc(u,p,S){var E=0,L=u==null?E:u.length;if(typeof p=="number"&&p===p&&L<=q){for(;E<L;){var J=E+L>>>1,oe=u[J];oe!==null&&!Kr(oe)&&(S?oe<=p:oe<p)?E=J+1:L=J}return L}return Mh(u,p,$r,S)}function Mh(u,p,S,E){var L=0,J=u==null?0:u.length;if(J===0)return 0;p=S(p);for(var oe=p!==p,ue=p===null,ge=Kr(p),Oe=p===t;L<J;){var Pe=Wc((L+J)/2),Le=S(u[Pe]),Xe=Le!==t,ht=Le===null,It=Le===Le,Wt=Kr(Le);if(oe)var Et=E||It;else Oe?Et=It&&(E||Xe):ue?Et=It&&Xe&&(E||!ht):ge?Et=It&&Xe&&!ht&&(E||!Wt):ht||Wt?Et=!1:Et=E?Le<=p:Le<p;Et?L=Pe+1:J=Pe}return fr(J,Z)}function $y(u,p){for(var S=-1,E=u.length,L=0,J=[];++S<E;){var oe=u[S],ue=p?p(oe):oe;if(!S||!Eo(ue,ge)){var ge=ue;J[L++]=oe===0?0:oe}}return J}function Ry(u){return typeof u=="number"?u:Kr(u)?re:+u}function jr(u){if(typeof u=="string")return u;if(Ft(u))return kn(u,jr)+"";if(Kr(u))return fy?fy.call(u):"";var p=u+"";return p=="0"&&1/u==-1/0?"-0":p}function Ya(u,p,S){var E=-1,L=Ac,J=u.length,oe=!0,ue=[],ge=ue;if(S)oe=!1,L=oh;else if(J>=o){var Oe=p?null:Iw(u);if(Oe)return $c(Oe);oe=!1,L=ql,ge=new zi}else ge=p?[]:ue;e:for(;++E<J;){var Pe=u[E],Le=p?p(Pe):Pe;if(Pe=S||Pe!==0?Pe:0,oe&&Le===Le){for(var Xe=ge.length;Xe--;)if(ge[Xe]===Le)continue e;p&&ge.push(Le),ue.push(Pe)}else L(ge,Le,S)||(ge!==ue&&ge.push(Le),ue.push(Pe))}return ue}function Oh(u,p){return p=qa(p,u),u=l0(u,p),u==null||delete u[Uo(uo(p))]}function Dy(u,p,S,E){return ou(u,p,S(Ui(u,p)),E)}function Zc(u,p,S,E){for(var L=u.length,J=E?L:-1;(E?J--:++J<L)&&p(u[J],J,u););return S?lo(u,E?0:J,E?J+1:L):lo(u,E?J+1:0,E?L:J)}function Ny(u,p){var S=u;return S instanceof en&&(S=S.value()),ah(p,function(E,L){return L.func.apply(L.thisArg,Ua([E],L.args))},S)}function Ah(u,p,S){var E=u.length;if(E<2)return E?Ya(u[0]):[];for(var L=-1,J=we(E);++L<E;)for(var oe=u[L],ue=-1;++ue<E;)ue!=L&&(J[L]=tu(J[L]||oe,u[ue],p,S));return Ya(ir(J,1),p,S)}function Fy(u,p,S){for(var E=-1,L=u.length,J=p.length,oe={};++E<L;){var ue=E<J?p[E]:t;S(oe,u[E],ue)}return oe}function Ph(u){return Bn(u)?u:[]}function $h(u){return typeof u=="function"?u:$r}function qa(u,p){return Ft(u)?u:Hh(u,p)?[u]:f0(fn(u))}var vw=Yt;function Ga(u,p,S){var E=u.length;return S=S===t?E:S,!p&&S>=E?u:lo(u,p,S)}var Ly=r5||function(u){return ar.clearTimeout(u)};function By(u,p){if(p)return u.slice();var S=u.length,E=iy?iy(S):new u.constructor(S);return u.copy(E),E}function Rh(u){var p=new u.constructor(u.byteLength);return new Bc(p).set(new Bc(u)),p}function gw(u,p){var S=p?Rh(u.buffer):u.buffer;return new u.constructor(S,u.byteOffset,u.byteLength)}function yw(u){var p=new u.constructor(u.source,w1.exec(u));return p.lastIndex=u.lastIndex,p}function bw(u){return Zl?vn(Zl.call(u)):{}}function Vy(u,p){var S=p?Rh(u.buffer):u.buffer;return new u.constructor(S,u.byteOffset,u.length)}function zy(u,p){if(u!==p){var S=u!==t,E=u===null,L=u===u,J=Kr(u),oe=p!==t,ue=p===null,ge=p===p,Oe=Kr(p);if(!ue&&!Oe&&!J&&u>p||J&&oe&&ge&&!ue&&!Oe||E&&oe&&ge||!S&&ge||!L)return 1;if(!E&&!J&&!Oe&&u<p||Oe&&S&&L&&!E&&!J||ue&&S&&L||!oe&&L||!ge)return-1}return 0}function Sw(u,p,S){for(var E=-1,L=u.criteria,J=p.criteria,oe=L.length,ue=S.length;++E<oe;){var ge=zy(L[E],J[E]);if(ge){if(E>=ue)return ge;var Oe=S[E];return ge*(Oe=="desc"?-1:1)}}return u.index-p.index}function Hy(u,p,S,E){for(var L=-1,J=u.length,oe=S.length,ue=-1,ge=p.length,Oe=qn(J-oe,0),Pe=we(ge+Oe),Le=!E;++ue<ge;)Pe[ue]=p[ue];for(;++L<oe;)(Le||L<J)&&(Pe[S[L]]=u[L]);for(;Oe--;)Pe[ue++]=u[L++];return Pe}function Uy(u,p,S,E){for(var L=-1,J=u.length,oe=-1,ue=S.length,ge=-1,Oe=p.length,Pe=qn(J-ue,0),Le=we(Pe+Oe),Xe=!E;++L<Pe;)Le[L]=u[L];for(var ht=L;++ge<Oe;)Le[ht+ge]=p[ge];for(;++oe<ue;)(Xe||L<J)&&(Le[ht+S[oe]]=u[L++]);return Le}function Or(u,p){var S=-1,E=u.length;for(p||(p=we(E));++S<E;)p[S]=u[S];return p}function Ho(u,p,S,E){var L=!S;S||(S={});for(var J=-1,oe=p.length;++J<oe;){var ue=p[J],ge=E?E(S[ue],u[ue],ue,S,u):t;ge===t&&(ge=u[ue]),L?ua(S,ue,ge):eu(S,ue,ge)}return S}function _w(u,p){return Ho(u,zh(u),p)}function ww(u,p){return Ho(u,n0(u),p)}function ed(u,p){return function(S,E){var L=Ft(S)?E6:W5,J=p?p():{};return L(S,u,xt(E,2),J)}}function rl(u){return Yt(function(p,S){var E=-1,L=S.length,J=L>1?S[L-1]:t,oe=L>2?S[2]:t;for(J=u.length>3&&typeof J=="function"?(L--,J):t,oe&&_r(S[0],S[1],oe)&&(J=L<3?t:J,L=1),p=vn(p);++E<L;){var ue=S[E];ue&&u(p,ue,E,J)}return p})}function Wy(u,p){return function(S,E){if(S==null)return S;if(!Ar(S))return u(S,E);for(var L=S.length,J=p?L:-1,oe=vn(S);(p?J--:++J<L)&&E(oe[J],J,oe)!==!1;);return S}}function jy(u){return function(p,S,E){for(var L=-1,J=vn(p),oe=E(p),ue=oe.length;ue--;){var ge=oe[u?ue:++L];if(S(J[ge],ge,J)===!1)break}return p}}function xw(u,p,S){var E=p&b,L=au(u);function J(){var oe=this&&this!==ar&&this instanceof J?L:u;return oe.apply(E?S:this,arguments)}return J}function Ky(u){return function(p){p=fn(p);var S=Js(p)?Co(p):t,E=S?S[0]:p.charAt(0),L=S?Ga(S,1).join(""):p.slice(1);return E[u]()+L}}function ol(u){return function(p){return ah(W0(U0(p).replace(p6,"")),u,"")}}function au(u){return function(){var p=arguments;switch(p.length){case 0:return new u;case 1:return new u(p[0]);case 2:return new u(p[0],p[1]);case 3:return new u(p[0],p[1],p[2]);case 4:return new u(p[0],p[1],p[2],p[3]);case 5:return new u(p[0],p[1],p[2],p[3],p[4]);case 6:return new u(p[0],p[1],p[2],p[3],p[4],p[5]);case 7:return new u(p[0],p[1],p[2],p[3],p[4],p[5],p[6])}var S=nl(u.prototype),E=u.apply(S,p);return Mn(E)?E:S}}function kw(u,p,S){var E=au(u);function L(){for(var J=arguments.length,oe=we(J),ue=J,ge=al(L);ue--;)oe[ue]=arguments[ue];var Oe=J<3&&oe[0]!==ge&&oe[J-1]!==ge?[]:Wa(oe,ge);if(J-=Oe.length,J<S)return Xy(u,p,td,L.placeholder,t,oe,Oe,t,t,S-J);var Pe=this&&this!==ar&&this instanceof L?E:u;return Ur(Pe,this,oe)}return L}function Yy(u){return function(p,S,E){var L=vn(p);if(!Ar(p)){var J=xt(S,3);p=Xn(p),S=function(ue){return J(L[ue],ue,L)}}var oe=u(p,S,E);return oe>-1?L[J?p[oe]:oe]:t}}function qy(u){return da(function(p){var S=p.length,E=S,L=io.prototype.thru;for(u&&p.reverse();E--;){var J=p[E];if(typeof J!="function")throw new ao(a);if(L&&!oe&&ad(J)=="wrapper")var oe=new io([],!0)}for(E=oe?E:S;++E<S;){J=p[E];var ue=ad(J),ge=ue=="wrapper"?Bh(J):t;ge&&Uh(ge[0])&&ge[1]==(D|T|x|A)&&!ge[4].length&&ge[9]==1?oe=oe[ad(ge[0])].apply(oe,ge[3]):oe=J.length==1&&Uh(J)?oe[ue]():oe.thru(J)}return function(){var Oe=arguments,Pe=Oe[0];if(oe&&Oe.length==1&&Ft(Pe))return oe.plant(Pe).value();for(var Le=0,Xe=S?p[Le].apply(this,Oe):Pe;++Le<S;)Xe=p[Le].call(this,Xe);return Xe}})}function td(u,p,S,E,L,J,oe,ue,ge,Oe){var Pe=p&D,Le=p&b,Xe=p&_,ht=p&(T|k),It=p&P,Wt=Xe?t:au(u);function Et(){for(var Qt=arguments.length,an=we(Qt),Yr=Qt;Yr--;)an[Yr]=arguments[Yr];if(ht)var wr=al(Et),qr=N6(an,wr);if(E&&(an=Hy(an,E,L,ht)),J&&(an=Uy(an,J,oe,ht)),Qt-=qr,ht&&Qt<Oe){var Vn=Wa(an,wr);return Xy(u,p,td,Et.placeholder,S,an,Vn,ue,ge,Oe-Qt)}var To=Le?S:this,ma=Xe?To[u]:u;return Qt=an.length,ue?an=Ww(an,ue):It&&Qt>1&&an.reverse(),Pe&&ge<Qt&&(an.length=ge),this&&this!==ar&&this instanceof Et&&(ma=Wt||au(ma)),ma.apply(To,an)}return Et}function Gy(u,p){return function(S,E){return Q5(S,u,p(E),{})}}function nd(u,p){return function(S,E){var L;if(S===t&&E===t)return p;if(S!==t&&(L=S),E!==t){if(L===t)return E;typeof S=="string"||typeof E=="string"?(S=jr(S),E=jr(E)):(S=Ry(S),E=Ry(E)),L=u(S,E)}return L}}function Dh(u){return da(function(p){return p=kn(p,Wr(xt())),Yt(function(S){var E=this;return u(p,function(L){return Ur(L,E,S)})})})}function rd(u,p){p=p===t?" ":jr(p);var S=p.length;if(S<2)return S?Th(p,u):p;var E=Th(p,Uc(u/Xs(p)));return Js(p)?Ga(Co(E),0,u).join(""):E.slice(0,u)}function Cw(u,p,S,E){var L=p&b,J=au(u);function oe(){for(var ue=-1,ge=arguments.length,Oe=-1,Pe=E.length,Le=we(Pe+ge),Xe=this&&this!==ar&&this instanceof oe?J:u;++Oe<Pe;)Le[Oe]=E[Oe];for(;ge--;)Le[Oe++]=arguments[++ue];return Ur(Xe,L?S:this,Le)}return oe}function Jy(u){return function(p,S,E){return E&&typeof E!="number"&&_r(p,S,E)&&(S=E=t),p=ha(p),S===t?(S=p,p=0):S=ha(S),E=E===t?p<S?1:-1:ha(E),cw(p,S,E,u)}}function od(u){return function(p,S){return typeof p=="string"&&typeof S=="string"||(p=co(p),S=co(S)),u(p,S)}}function Xy(u,p,S,E,L,J,oe,ue,ge,Oe){var Pe=p&T,Le=Pe?oe:t,Xe=Pe?t:oe,ht=Pe?J:t,It=Pe?t:J;p|=Pe?x:M,p&=~(Pe?M:x),p&w||(p&=-4);var Wt=[u,p,L,ht,Le,It,Xe,ue,ge,Oe],Et=S.apply(t,Wt);return Uh(u)&&u0(Et,Wt),Et.placeholder=E,c0(Et,u,p)}function Nh(u){var p=Yn[u];return function(S,E){if(S=co(S),E=E==null?0:fr(Ut(E),292),E&&cy(S)){var L=(fn(S)+"e").split("e"),J=p(L[0]+"e"+(+L[1]+E));return L=(fn(J)+"e").split("e"),+(L[0]+"e"+(+L[1]-E))}return p(S)}}var Iw=el&&1/$c(new el([,-0]))[1]==X?function(u){return new el(u)}:om;function Qy(u){return function(p){var S=pr(p);return S==tt?fh(p):S==Je?U6(p):D6(p,u(p))}}function ca(u,p,S,E,L,J,oe,ue){var ge=p&_;if(!ge&&typeof u!="function")throw new ao(a);var Oe=E?E.length:0;if(Oe||(p&=-97,E=L=t),oe=oe===t?oe:qn(Ut(oe),0),ue=ue===t?ue:Ut(ue),Oe-=L?L.length:0,p&M){var Pe=E,Le=L;E=L=t}var Xe=ge?t:Bh(u),ht=[u,p,S,E,L,Pe,Le,J,oe,ue];if(Xe&&zw(ht,Xe),u=ht[0],p=ht[1],S=ht[2],E=ht[3],L=ht[4],ue=ht[9]=ht[9]===t?ge?0:u.length:qn(ht[9]-Oe,0),!ue&&p&(T|k)&&(p&=-25),!p||p==b)var It=xw(u,p,S);else p==T||p==k?It=kw(u,p,ue):(p==x||p==(b|x))&&!L.length?It=Cw(u,p,S,E):It=td.apply(t,ht);var Wt=Xe?Py:u0;return c0(Wt(It,ht),u,p)}function Zy(u,p,S,E){return u===t||Eo(u,Zs[S])&&!hn.call(E,S)?p:u}function e0(u,p,S,E,L,J){return Mn(u)&&Mn(p)&&(J.set(p,u),Xc(u,p,t,e0,J),J.delete(p)),u}function Ew(u){return lu(u)?t:u}function t0(u,p,S,E,L,J){var oe=S&v,ue=u.length,ge=p.length;if(ue!=ge&&!(oe&&ge>ue))return!1;var Oe=J.get(u),Pe=J.get(p);if(Oe&&Pe)return Oe==p&&Pe==u;var Le=-1,Xe=!0,ht=S&y?new zi:t;for(J.set(u,p),J.set(p,u);++Le<ue;){var It=u[Le],Wt=p[Le];if(E)var Et=oe?E(Wt,It,Le,p,u,J):E(It,Wt,Le,u,p,J);if(Et!==t){if(Et)continue;Xe=!1;break}if(ht){if(!ih(p,function(Qt,an){if(!ql(ht,an)&&(It===Qt||L(It,Qt,S,E,J)))return ht.push(an)})){Xe=!1;break}}else if(!(It===Wt||L(It,Wt,S,E,J))){Xe=!1;break}}return J.delete(u),J.delete(p),Xe}function Tw(u,p,S,E,L,J,oe){switch(S){case wt:if(u.byteLength!=p.byteLength||u.byteOffset!=p.byteOffset)return!1;u=u.buffer,p=p.buffer;case $t:return!(u.byteLength!=p.byteLength||!J(new Bc(u),new Bc(p)));case nt:case Ge:case Ct:return Eo(+u,+p);case ut:return u.name==p.name&&u.message==p.message;case qe:case ct:return u==p+"";case tt:var ue=fh;case Je:var ge=E&v;if(ue||(ue=$c),u.size!=p.size&&!ge)return!1;var Oe=oe.get(u);if(Oe)return Oe==p;E|=y,oe.set(u,p);var Pe=t0(ue(u),ue(p),E,L,J,oe);return oe.delete(u),Pe;case vt:if(Zl)return Zl.call(u)==Zl.call(p)}return!1}function Mw(u,p,S,E,L,J){var oe=S&v,ue=Fh(u),ge=ue.length,Oe=Fh(p),Pe=Oe.length;if(ge!=Pe&&!oe)return!1;for(var Le=ge;Le--;){var Xe=ue[Le];if(!(oe?Xe in p:hn.call(p,Xe)))return!1}var ht=J.get(u),It=J.get(p);if(ht&&It)return ht==p&&It==u;var Wt=!0;J.set(u,p),J.set(p,u);for(var Et=oe;++Le<ge;){Xe=ue[Le];var Qt=u[Xe],an=p[Xe];if(E)var Yr=oe?E(an,Qt,Xe,p,u,J):E(Qt,an,Xe,u,p,J);if(!(Yr===t?Qt===an||L(Qt,an,S,E,J):Yr)){Wt=!1;break}Et||(Et=Xe=="constructor")}if(Wt&&!Et){var wr=u.constructor,qr=p.constructor;wr!=qr&&"constructor"in u&&"constructor"in p&&!(typeof wr=="function"&&wr instanceof wr&&typeof qr=="function"&&qr instanceof qr)&&(Wt=!1)}return J.delete(u),J.delete(p),Wt}function da(u){return jh(s0(u,t,v0),u+"")}function Fh(u){return _y(u,Xn,zh)}function Lh(u){return _y(u,Pr,n0)}var Bh=jc?function(u){return jc.get(u)}:om;function ad(u){for(var p=u.name+"",S=tl[p],E=hn.call(tl,p)?S.length:0;E--;){var L=S[E],J=L.func;if(J==null||J==u)return L.name}return p}function al(u){var p=hn.call(K,"placeholder")?K:u;return p.placeholder}function xt(){var u=K.iteratee||nm;return u=u===nm?ky:u,arguments.length?u(arguments[0],arguments[1]):u}function id(u,p){var S=u.__data__;return Fw(p)?S[typeof p=="string"?"string":"hash"]:S.map}function Vh(u){for(var p=Xn(u),S=p.length;S--;){var E=p[S],L=u[E];p[S]=[E,L,a0(L)]}return p}function Wi(u,p){var S=V6(u,p);return xy(S)?S:t}function Ow(u){var p=hn.call(u,Bi),S=u[Bi];try{u[Bi]=t;var E=!0}catch{}var L=Fc.call(u);return E&&(p?u[Bi]=S:delete u[Bi]),L}var zh=hh?function(u){return u==null?[]:(u=vn(u),Ha(hh(u),function(p){return ly.call(u,p)}))}:am,n0=hh?function(u){for(var p=[];u;)Ua(p,zh(u)),u=Vc(u);return p}:am,pr=Sr;(mh&&pr(new mh(new ArrayBuffer(1)))!=wt||Jl&&pr(new Jl)!=tt||vh&&pr(vh.resolve())!=je||el&&pr(new el)!=Je||Xl&&pr(new Xl)!=He)&&(pr=function(u){var p=Sr(u),S=p==Ne?u.constructor:t,E=S?ji(S):"";if(E)switch(E){case f5:return wt;case p5:return tt;case h5:return je;case m5:return Je;case v5:return He}return p});function Aw(u,p,S){for(var E=-1,L=S.length;++E<L;){var J=S[E],oe=J.size;switch(J.type){case"drop":u+=oe;break;case"dropRight":p-=oe;break;case"take":p=fr(p,u+oe);break;case"takeRight":u=qn(u,p-oe);break}}return{start:u,end:p}}function Pw(u){var p=u.match(L_);return p?p[1].split(B_):[]}function r0(u,p,S){p=qa(p,u);for(var E=-1,L=p.length,J=!1;++E<L;){var oe=Uo(p[E]);if(!(J=u!=null&&S(u,oe)))break;u=u[oe]}return J||++E!=L?J:(L=u==null?0:u.length,!!L&&pd(L)&&fa(oe,L)&&(Ft(u)||Ki(u)))}function $w(u){var p=u.length,S=new u.constructor(p);return p&&typeof u[0]=="string"&&hn.call(u,"index")&&(S.index=u.index,S.input=u.input),S}function o0(u){return typeof u.constructor=="function"&&!iu(u)?nl(Vc(u)):{}}function Rw(u,p,S){var E=u.constructor;switch(p){case $t:return Rh(u);case nt:case Ge:return new E(+u);case wt:return gw(u,S);case me:case ce:case be:case Te:case de:case fe:case ne:case W:case _e:return Vy(u,S);case tt:return new E;case Ct:case ct:return new E(u);case qe:return yw(u);case Je:return new E;case vt:return bw(u)}}function Dw(u,p){var S=p.length;if(!S)return u;var E=S-1;return p[E]=(S>1?"& ":"")+p[E],p=p.join(S>2?", ":" "),u.replace(F_,`{
/* [wrapped with `+p+`] */
`)}function Nw(u){return Ft(u)||Ki(u)||!!(uy&&u&&u[uy])}function fa(u,p){var S=typeof u;return p=p??te,!!p&&(S=="number"||S!="symbol"&&q_.test(u))&&u>-1&&u%1==0&&u<p}function _r(u,p,S){if(!Mn(S))return!1;var E=typeof p;return(E=="number"?Ar(S)&&fa(p,S.length):E=="string"&&p in S)?Eo(S[p],u):!1}function Hh(u,p){if(Ft(u))return!1;var S=typeof u;return S=="number"||S=="symbol"||S=="boolean"||u==null||Kr(u)?!0:Hr.test(u)||!Ys.test(u)||p!=null&&u in vn(p)}function Fw(u){var p=typeof u;return p=="string"||p=="number"||p=="symbol"||p=="boolean"?u!=="__proto__":u===null}function Uh(u){var p=ad(u),S=K[p];if(typeof S!="function"||!(p in en.prototype))return!1;if(u===S)return!0;var E=Bh(S);return!!E&&u===E[0]}function Lw(u){return!!ay&&ay in u}var Bw=Dc?pa:im;function iu(u){var p=u&&u.constructor,S=typeof p=="function"&&p.prototype||Zs;return u===S}function a0(u){return u===u&&!Mn(u)}function i0(u,p){return function(S){return S==null?!1:S[u]===p&&(p!==t||u in vn(S))}}function Vw(u){var p=dd(u,function(E){return S.size===c&&S.clear(),E}),S=p.cache;return p}function zw(u,p){var S=u[1],E=p[1],L=S|E,J=L<(b|_|D),oe=E==D&&S==T||E==D&&S==A&&u[7].length<=p[8]||E==(D|A)&&p[7].length<=p[8]&&S==T;if(!(J||oe))return u;E&b&&(u[2]=p[2],L|=S&b?0:w);var ue=p[3];if(ue){var ge=u[3];u[3]=ge?Hy(ge,ue,p[4]):ue,u[4]=ge?Wa(u[3],d):p[4]}return ue=p[5],ue&&(ge=u[5],u[5]=ge?Uy(ge,ue,p[6]):ue,u[6]=ge?Wa(u[5],d):p[6]),ue=p[7],ue&&(u[7]=ue),E&D&&(u[8]=u[8]==null?p[8]:fr(u[8],p[8])),u[9]==null&&(u[9]=p[9]),u[0]=p[0],u[1]=L,u}function Hw(u){var p=[];if(u!=null)for(var S in vn(u))p.push(S);return p}function Uw(u){return Fc.call(u)}function s0(u,p,S){return p=qn(p===t?u.length-1:p,0),function(){for(var E=arguments,L=-1,J=qn(E.length-p,0),oe=we(J);++L<J;)oe[L]=E[p+L];L=-1;for(var ue=we(p+1);++L<p;)ue[L]=E[L];return ue[p]=S(oe),Ur(u,this,ue)}}function l0(u,p){return p.length<2?u:Ui(u,lo(p,0,-1))}function Ww(u,p){for(var S=u.length,E=fr(p.length,S),L=Or(u);E--;){var J=p[E];u[E]=fa(J,S)?L[J]:t}return u}function Wh(u,p){if(!(p==="constructor"&&typeof u[p]=="function")&&p!="__proto__")return u[p]}var u0=d0(Py),su=a5||function(u,p){return ar.setTimeout(u,p)},jh=d0(pw);function c0(u,p,S){var E=p+"";return jh(u,Dw(E,jw(Pw(E),S)))}function d0(u){var p=0,S=0;return function(){var E=u5(),L=U-(E-S);if(S=E,L>0){if(++p>=j)return arguments[0]}else p=0;return u.apply(t,arguments)}}function sd(u,p){var S=-1,E=u.length,L=E-1;for(p=p===t?E:p;++S<p;){var J=Eh(S,L),oe=u[J];u[J]=u[S],u[S]=oe}return u.length=p,u}var f0=Vw(function(u){var p=[];return u.charCodeAt(0)===46&&p.push(""),u.replace(Fi,function(S,E,L,J){p.push(L?J.replace(H_,"$1"):E||S)}),p});function Uo(u){if(typeof u=="string"||Kr(u))return u;var p=u+"";return p=="0"&&1/u==-1/0?"-0":p}function ji(u){if(u!=null){try{return Nc.call(u)}catch{}try{return u+""}catch{}}return""}function jw(u,p){return oo(le,function(S){var E="_."+S[0];p&S[1]&&!Ac(u,E)&&u.push(E)}),u.sort()}function p0(u){if(u instanceof en)return u.clone();var p=new io(u.__wrapped__,u.__chain__);return p.__actions__=Or(u.__actions__),p.__index__=u.__index__,p.__values__=u.__values__,p}function Kw(u,p,S){(S?_r(u,p,S):p===t)?p=1:p=qn(Ut(p),0);var E=u==null?0:u.length;if(!E||p<1)return[];for(var L=0,J=0,oe=we(Uc(E/p));L<E;)oe[J++]=lo(u,L,L+=p);return oe}function Yw(u){for(var p=-1,S=u==null?0:u.length,E=0,L=[];++p<S;){var J=u[p];J&&(L[E++]=J)}return L}function qw(){var u=arguments.length;if(!u)return[];for(var p=we(u-1),S=arguments[0],E=u;E--;)p[E-1]=arguments[E];return Ua(Ft(S)?Or(S):[S],ir(p,1))}var Gw=Yt(function(u,p){return Bn(u)?tu(u,ir(p,1,Bn,!0)):[]}),Jw=Yt(function(u,p){var S=uo(p);return Bn(S)&&(S=t),Bn(u)?tu(u,ir(p,1,Bn,!0),xt(S,2)):[]}),Xw=Yt(function(u,p){var S=uo(p);return Bn(S)&&(S=t),Bn(u)?tu(u,ir(p,1,Bn,!0),t,S):[]});function Qw(u,p,S){var E=u==null?0:u.length;return E?(p=S||p===t?1:Ut(p),lo(u,p<0?0:p,E)):[]}function Zw(u,p,S){var E=u==null?0:u.length;return E?(p=S||p===t?1:Ut(p),p=E-p,lo(u,0,p<0?0:p)):[]}function ex(u,p){return u&&u.length?Zc(u,xt(p,3),!0,!0):[]}function tx(u,p){return u&&u.length?Zc(u,xt(p,3),!0):[]}function nx(u,p,S,E){var L=u==null?0:u.length;return L?(S&&typeof S!="number"&&_r(u,p,S)&&(S=0,E=L),q5(u,p,S,E)):[]}function h0(u,p,S){var E=u==null?0:u.length;if(!E)return-1;var L=S==null?0:Ut(S);return L<0&&(L=qn(E+L,0)),Pc(u,xt(p,3),L)}function m0(u,p,S){var E=u==null?0:u.length;if(!E)return-1;var L=E-1;return S!==t&&(L=Ut(S),L=S<0?qn(E+L,0):fr(L,E-1)),Pc(u,xt(p,3),L,!0)}function v0(u){var p=u==null?0:u.length;return p?ir(u,1):[]}function rx(u){var p=u==null?0:u.length;return p?ir(u,X):[]}function ox(u,p){var S=u==null?0:u.length;return S?(p=p===t?1:Ut(p),ir(u,p)):[]}function ax(u){for(var p=-1,S=u==null?0:u.length,E={};++p<S;){var L=u[p];E[L[0]]=L[1]}return E}function g0(u){return u&&u.length?u[0]:t}function ix(u,p,S){var E=u==null?0:u.length;if(!E)return-1;var L=S==null?0:Ut(S);return L<0&&(L=qn(E+L,0)),Gs(u,p,L)}function sx(u){var p=u==null?0:u.length;return p?lo(u,0,-1):[]}var lx=Yt(function(u){var p=kn(u,Ph);return p.length&&p[0]===u[0]?wh(p):[]}),ux=Yt(function(u){var p=uo(u),S=kn(u,Ph);return p===uo(S)?p=t:S.pop(),S.length&&S[0]===u[0]?wh(S,xt(p,2)):[]}),cx=Yt(function(u){var p=uo(u),S=kn(u,Ph);return p=typeof p=="function"?p:t,p&&S.pop(),S.length&&S[0]===u[0]?wh(S,t,p):[]});function dx(u,p){return u==null?"":s5.call(u,p)}function uo(u){var p=u==null?0:u.length;return p?u[p-1]:t}function fx(u,p,S){var E=u==null?0:u.length;if(!E)return-1;var L=E;return S!==t&&(L=Ut(S),L=L<0?qn(E+L,0):fr(L,E-1)),p===p?j6(u,p,L):Pc(u,X1,L,!0)}function px(u,p){return u&&u.length?Ty(u,Ut(p)):t}var hx=Yt(y0);function y0(u,p){return u&&u.length&&p&&p.length?Ih(u,p):u}function mx(u,p,S){return u&&u.length&&p&&p.length?Ih(u,p,xt(S,2)):u}function vx(u,p,S){return u&&u.length&&p&&p.length?Ih(u,p,t,S):u}var gx=da(function(u,p){var S=u==null?0:u.length,E=yh(u,p);return Ay(u,kn(p,function(L){return fa(L,S)?+L:L}).sort(zy)),E});function yx(u,p){var S=[];if(!(u&&u.length))return S;var E=-1,L=[],J=u.length;for(p=xt(p,3);++E<J;){var oe=u[E];p(oe,E,u)&&(S.push(oe),L.push(E))}return Ay(u,L),S}function Kh(u){return u==null?u:d5.call(u)}function bx(u,p,S){var E=u==null?0:u.length;return E?(S&&typeof S!="number"&&_r(u,p,S)?(p=0,S=E):(p=p==null?0:Ut(p),S=S===t?E:Ut(S)),lo(u,p,S)):[]}function Sx(u,p){return Qc(u,p)}function _x(u,p,S){return Mh(u,p,xt(S,2))}function wx(u,p){var S=u==null?0:u.length;if(S){var E=Qc(u,p);if(E<S&&Eo(u[E],p))return E}return-1}function xx(u,p){return Qc(u,p,!0)}function kx(u,p,S){return Mh(u,p,xt(S,2),!0)}function Cx(u,p){var S=u==null?0:u.length;if(S){var E=Qc(u,p,!0)-1;if(Eo(u[E],p))return E}return-1}function Ix(u){return u&&u.length?$y(u):[]}function Ex(u,p){return u&&u.length?$y(u,xt(p,2)):[]}function Tx(u){var p=u==null?0:u.length;return p?lo(u,1,p):[]}function Mx(u,p,S){return u&&u.length?(p=S||p===t?1:Ut(p),lo(u,0,p<0?0:p)):[]}function Ox(u,p,S){var E=u==null?0:u.length;return E?(p=S||p===t?1:Ut(p),p=E-p,lo(u,p<0?0:p,E)):[]}function Ax(u,p){return u&&u.length?Zc(u,xt(p,3),!1,!0):[]}function Px(u,p){return u&&u.length?Zc(u,xt(p,3)):[]}var $x=Yt(function(u){return Ya(ir(u,1,Bn,!0))}),Rx=Yt(function(u){var p=uo(u);return Bn(p)&&(p=t),Ya(ir(u,1,Bn,!0),xt(p,2))}),Dx=Yt(function(u){var p=uo(u);return p=typeof p=="function"?p:t,Ya(ir(u,1,Bn,!0),t,p)});function Nx(u){return u&&u.length?Ya(u):[]}function Fx(u,p){return u&&u.length?Ya(u,xt(p,2)):[]}function Lx(u,p){return p=typeof p=="function"?p:t,u&&u.length?Ya(u,t,p):[]}function Yh(u){if(!(u&&u.length))return[];var p=0;return u=Ha(u,function(S){if(Bn(S))return p=qn(S.length,p),!0}),ch(p,function(S){return kn(u,sh(S))})}function b0(u,p){if(!(u&&u.length))return[];var S=Yh(u);return p==null?S:kn(S,function(E){return Ur(p,t,E)})}var Bx=Yt(function(u,p){return Bn(u)?tu(u,p):[]}),Vx=Yt(function(u){return Ah(Ha(u,Bn))}),zx=Yt(function(u){var p=uo(u);return Bn(p)&&(p=t),Ah(Ha(u,Bn),xt(p,2))}),Hx=Yt(function(u){var p=uo(u);return p=typeof p=="function"?p:t,Ah(Ha(u,Bn),t,p)}),Ux=Yt(Yh);function Wx(u,p){return Fy(u||[],p||[],eu)}function jx(u,p){return Fy(u||[],p||[],ou)}var Kx=Yt(function(u){var p=u.length,S=p>1?u[p-1]:t;return S=typeof S=="function"?(u.pop(),S):t,b0(u,S)});function S0(u){var p=K(u);return p.__chain__=!0,p}function Yx(u,p){return p(u),u}function ld(u,p){return p(u)}var qx=da(function(u){var p=u.length,S=p?u[0]:0,E=this.__wrapped__,L=function(J){return yh(J,u)};return p>1||this.__actions__.length||!(E instanceof en)||!fa(S)?this.thru(L):(E=E.slice(S,+S+(p?1:0)),E.__actions__.push({func:ld,args:[L],thisArg:t}),new io(E,this.__chain__).thru(function(J){return p&&!J.length&&J.push(t),J}))});function Gx(){return S0(this)}function Jx(){return new io(this.value(),this.__chain__)}function Xx(){this.__values__===t&&(this.__values__=R0(this.value()));var u=this.__index__>=this.__values__.length,p=u?t:this.__values__[this.__index__++];return{done:u,value:p}}function Qx(){return this}function Zx(u){for(var p,S=this;S instanceof Yc;){var E=p0(S);E.__index__=0,E.__values__=t,p?L.__wrapped__=E:p=E;var L=E;S=S.__wrapped__}return L.__wrapped__=u,p}function ek(){var u=this.__wrapped__;if(u instanceof en){var p=u;return this.__actions__.length&&(p=new en(this)),p=p.reverse(),p.__actions__.push({func:ld,args:[Kh],thisArg:t}),new io(p,this.__chain__)}return this.thru(Kh)}function tk(){return Ny(this.__wrapped__,this.__actions__)}var nk=ed(function(u,p,S){hn.call(u,S)?++u[S]:ua(u,S,1)});function rk(u,p,S){var E=Ft(u)?G1:Y5;return S&&_r(u,p,S)&&(p=t),E(u,xt(p,3))}function ok(u,p){var S=Ft(u)?Ha:by;return S(u,xt(p,3))}var ak=Yy(h0),ik=Yy(m0);function sk(u,p){return ir(ud(u,p),1)}function lk(u,p){return ir(ud(u,p),X)}function uk(u,p,S){return S=S===t?1:Ut(S),ir(ud(u,p),S)}function _0(u,p){var S=Ft(u)?oo:Ka;return S(u,xt(p,3))}function w0(u,p){var S=Ft(u)?T6:yy;return S(u,xt(p,3))}var ck=ed(function(u,p,S){hn.call(u,S)?u[S].push(p):ua(u,S,[p])});function dk(u,p,S,E){u=Ar(u)?u:sl(u),S=S&&!E?Ut(S):0;var L=u.length;return S<0&&(S=qn(L+S,0)),hd(u)?S<=L&&u.indexOf(p,S)>-1:!!L&&Gs(u,p,S)>-1}var fk=Yt(function(u,p,S){var E=-1,L=typeof p=="function",J=Ar(u)?we(u.length):[];return Ka(u,function(oe){J[++E]=L?Ur(p,oe,S):nu(oe,p,S)}),J}),pk=ed(function(u,p,S){ua(u,S,p)});function ud(u,p){var S=Ft(u)?kn:Cy;return S(u,xt(p,3))}function hk(u,p,S,E){return u==null?[]:(Ft(p)||(p=p==null?[]:[p]),S=E?t:S,Ft(S)||(S=S==null?[]:[S]),My(u,p,S))}var mk=ed(function(u,p,S){u[S?0:1].push(p)},function(){return[[],[]]});function vk(u,p,S){var E=Ft(u)?ah:Z1,L=arguments.length<3;return E(u,xt(p,4),S,L,Ka)}function gk(u,p,S){var E=Ft(u)?M6:Z1,L=arguments.length<3;return E(u,xt(p,4),S,L,yy)}function yk(u,p){var S=Ft(u)?Ha:by;return S(u,fd(xt(p,3)))}function bk(u){var p=Ft(u)?hy:dw;return p(u)}function Sk(u,p,S){(S?_r(u,p,S):p===t)?p=1:p=Ut(p);var E=Ft(u)?H5:fw;return E(u,p)}function _k(u){var p=Ft(u)?U5:hw;return p(u)}function wk(u){if(u==null)return 0;if(Ar(u))return hd(u)?Xs(u):u.length;var p=pr(u);return p==tt||p==Je?u.size:kh(u).length}function xk(u,p,S){var E=Ft(u)?ih:mw;return S&&_r(u,p,S)&&(p=t),E(u,xt(p,3))}var kk=Yt(function(u,p){if(u==null)return[];var S=p.length;return S>1&&_r(u,p[0],p[1])?p=[]:S>2&&_r(p[0],p[1],p[2])&&(p=[p[0]]),My(u,ir(p,1),[])}),cd=o5||function(){return ar.Date.now()};function Ck(u,p){if(typeof p!="function")throw new ao(a);return u=Ut(u),function(){if(--u<1)return p.apply(this,arguments)}}function x0(u,p,S){return p=S?t:p,p=u&&p==null?u.length:p,ca(u,D,t,t,t,t,p)}function k0(u,p){var S;if(typeof p!="function")throw new ao(a);return u=Ut(u),function(){return--u>0&&(S=p.apply(this,arguments)),u<=1&&(p=t),S}}var qh=Yt(function(u,p,S){var E=b;if(S.length){var L=Wa(S,al(qh));E|=x}return ca(u,E,p,S,L)}),C0=Yt(function(u,p,S){var E=b|_;if(S.length){var L=Wa(S,al(C0));E|=x}return ca(p,E,u,S,L)});function I0(u,p,S){p=S?t:p;var E=ca(u,T,t,t,t,t,t,p);return E.placeholder=I0.placeholder,E}function E0(u,p,S){p=S?t:p;var E=ca(u,k,t,t,t,t,t,p);return E.placeholder=E0.placeholder,E}function T0(u,p,S){var E,L,J,oe,ue,ge,Oe=0,Pe=!1,Le=!1,Xe=!0;if(typeof u!="function")throw new ao(a);p=co(p)||0,Mn(S)&&(Pe=!!S.leading,Le="maxWait"in S,J=Le?qn(co(S.maxWait)||0,p):J,Xe="trailing"in S?!!S.trailing:Xe);function ht(Vn){var To=E,ma=L;return E=L=t,Oe=Vn,oe=u.apply(ma,To),oe}function It(Vn){return Oe=Vn,ue=su(Qt,p),Pe?ht(Vn):oe}function Wt(Vn){var To=Vn-ge,ma=Vn-Oe,Y0=p-To;return Le?fr(Y0,J-ma):Y0}function Et(Vn){var To=Vn-ge,ma=Vn-Oe;return ge===t||To>=p||To<0||Le&&ma>=J}function Qt(){var Vn=cd();if(Et(Vn))return an(Vn);ue=su(Qt,Wt(Vn))}function an(Vn){return ue=t,Xe&&E?ht(Vn):(E=L=t,oe)}function Yr(){ue!==t&&Ly(ue),Oe=0,E=ge=L=ue=t}function wr(){return ue===t?oe:an(cd())}function qr(){var Vn=cd(),To=Et(Vn);if(E=arguments,L=this,ge=Vn,To){if(ue===t)return It(ge);if(Le)return Ly(ue),ue=su(Qt,p),ht(ge)}return ue===t&&(ue=su(Qt,p)),oe}return qr.cancel=Yr,qr.flush=wr,qr}var Ik=Yt(function(u,p){return gy(u,1,p)}),Ek=Yt(function(u,p,S){return gy(u,co(p)||0,S)});function Tk(u){return ca(u,P)}function dd(u,p){if(typeof u!="function"||p!=null&&typeof p!="function")throw new ao(a);var S=function(){var E=arguments,L=p?p.apply(this,E):E[0],J=S.cache;if(J.has(L))return J.get(L);var oe=u.apply(this,E);return S.cache=J.set(L,oe)||J,oe};return S.cache=new(dd.Cache||la),S}dd.Cache=la;function fd(u){if(typeof u!="function")throw new ao(a);return function(){var p=arguments;switch(p.length){case 0:return!u.call(this);case 1:return!u.call(this,p[0]);case 2:return!u.call(this,p[0],p[1]);case 3:return!u.call(this,p[0],p[1],p[2])}return!u.apply(this,p)}}function Mk(u){return k0(2,u)}var Ok=vw(function(u,p){p=p.length==1&&Ft(p[0])?kn(p[0],Wr(xt())):kn(ir(p,1),Wr(xt()));var S=p.length;return Yt(function(E){for(var L=-1,J=fr(E.length,S);++L<J;)E[L]=p[L].call(this,E[L]);return Ur(u,this,E)})}),Gh=Yt(function(u,p){var S=Wa(p,al(Gh));return ca(u,x,t,p,S)}),M0=Yt(function(u,p){var S=Wa(p,al(M0));return ca(u,M,t,p,S)}),Ak=da(function(u,p){return ca(u,A,t,t,t,p)});function Pk(u,p){if(typeof u!="function")throw new ao(a);return p=p===t?p:Ut(p),Yt(u,p)}function $k(u,p){if(typeof u!="function")throw new ao(a);return p=p==null?0:qn(Ut(p),0),Yt(function(S){var E=S[p],L=Ga(S,0,p);return E&&Ua(L,E),Ur(u,this,L)})}function Rk(u,p,S){var E=!0,L=!0;if(typeof u!="function")throw new ao(a);return Mn(S)&&(E="leading"in S?!!S.leading:E,L="trailing"in S?!!S.trailing:L),T0(u,p,{leading:E,maxWait:p,trailing:L})}function Dk(u){return x0(u,1)}function Nk(u,p){return Gh($h(p),u)}function Fk(){if(!arguments.length)return[];var u=arguments[0];return Ft(u)?u:[u]}function Lk(u){return so(u,g)}function Bk(u,p){return p=typeof p=="function"?p:t,so(u,g,p)}function Vk(u){return so(u,f|g)}function zk(u,p){return p=typeof p=="function"?p:t,so(u,f|g,p)}function Hk(u,p){return p==null||vy(u,p,Xn(p))}function Eo(u,p){return u===p||u!==u&&p!==p}var Uk=od(_h),Wk=od(function(u,p){return u>=p}),Ki=wy(function(){return arguments}())?wy:function(u){return Rn(u)&&hn.call(u,"callee")&&!ly.call(u,"callee")},Ft=we.isArray,jk=U1?Wr(U1):Z5;function Ar(u){return u!=null&&pd(u.length)&&!pa(u)}function Bn(u){return Rn(u)&&Ar(u)}function Kk(u){return u===!0||u===!1||Rn(u)&&Sr(u)==nt}var Ja=i5||im,Yk=W1?Wr(W1):ew;function qk(u){return Rn(u)&&u.nodeType===1&&!lu(u)}function Gk(u){if(u==null)return!0;if(Ar(u)&&(Ft(u)||typeof u=="string"||typeof u.splice=="function"||Ja(u)||il(u)||Ki(u)))return!u.length;var p=pr(u);if(p==tt||p==Je)return!u.size;if(iu(u))return!kh(u).length;for(var S in u)if(hn.call(u,S))return!1;return!0}function Jk(u,p){return ru(u,p)}function Xk(u,p,S){S=typeof S=="function"?S:t;var E=S?S(u,p):t;return E===t?ru(u,p,t,S):!!E}function Jh(u){if(!Rn(u))return!1;var p=Sr(u);return p==ut||p==mt||typeof u.message=="string"&&typeof u.name=="string"&&!lu(u)}function Qk(u){return typeof u=="number"&&cy(u)}function pa(u){if(!Mn(u))return!1;var p=Sr(u);return p==Pt||p==gt||p==ze||p==Be}function O0(u){return typeof u=="number"&&u==Ut(u)}function pd(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=te}function Mn(u){var p=typeof u;return u!=null&&(p=="object"||p=="function")}function Rn(u){return u!=null&&typeof u=="object"}var A0=j1?Wr(j1):nw;function Zk(u,p){return u===p||xh(u,p,Vh(p))}function e7(u,p,S){return S=typeof S=="function"?S:t,xh(u,p,Vh(p),S)}function t7(u){return P0(u)&&u!=+u}function n7(u){if(Bw(u))throw new Dt(i);return xy(u)}function r7(u){return u===null}function o7(u){return u==null}function P0(u){return typeof u=="number"||Rn(u)&&Sr(u)==Ct}function lu(u){if(!Rn(u)||Sr(u)!=Ne)return!1;var p=Vc(u);if(p===null)return!0;var S=hn.call(p,"constructor")&&p.constructor;return typeof S=="function"&&S instanceof S&&Nc.call(S)==e5}var Xh=K1?Wr(K1):rw;function a7(u){return O0(u)&&u>=-9007199254740991&&u<=te}var $0=Y1?Wr(Y1):ow;function hd(u){return typeof u=="string"||!Ft(u)&&Rn(u)&&Sr(u)==ct}function Kr(u){return typeof u=="symbol"||Rn(u)&&Sr(u)==vt}var il=q1?Wr(q1):aw;function i7(u){return u===t}function s7(u){return Rn(u)&&pr(u)==He}function l7(u){return Rn(u)&&Sr(u)==Tt}var u7=od(Ch),c7=od(function(u,p){return u<=p});function R0(u){if(!u)return[];if(Ar(u))return hd(u)?Co(u):Or(u);if(Gl&&u[Gl])return H6(u[Gl]());var p=pr(u),S=p==tt?fh:p==Je?$c:sl;return S(u)}function ha(u){if(!u)return u===0?u:0;if(u=co(u),u===X||u===-1/0){var p=u<0?-1:1;return p*Y}return u===u?u:0}function Ut(u){var p=ha(u),S=p%1;return p===p?S?p-S:p:0}function D0(u){return u?Hi(Ut(u),0,Q):0}function co(u){if(typeof u=="number")return u;if(Kr(u))return re;if(Mn(u)){var p=typeof u.valueOf=="function"?u.valueOf():u;u=Mn(p)?p+"":p}if(typeof u!="string")return u===0?u:+u;u=ey(u);var S=j_.test(u);return S||Y_.test(u)?C6(u.slice(2),S?2:8):W_.test(u)?re:+u}function N0(u){return Ho(u,Pr(u))}function d7(u){return u?Hi(Ut(u),-9007199254740991,te):u===0?u:0}function fn(u){return u==null?"":jr(u)}var f7=rl(function(u,p){if(iu(p)||Ar(p)){Ho(p,Xn(p),u);return}for(var S in p)hn.call(p,S)&&eu(u,S,p[S])}),F0=rl(function(u,p){Ho(p,Pr(p),u)}),md=rl(function(u,p,S,E){Ho(p,Pr(p),u,E)}),p7=rl(function(u,p,S,E){Ho(p,Xn(p),u,E)}),h7=da(yh);function m7(u,p){var S=nl(u);return p==null?S:my(S,p)}var v7=Yt(function(u,p){u=vn(u);var S=-1,E=p.length,L=E>2?p[2]:t;for(L&&_r(p[0],p[1],L)&&(E=1);++S<E;)for(var J=p[S],oe=Pr(J),ue=-1,ge=oe.length;++ue<ge;){var Oe=oe[ue],Pe=u[Oe];(Pe===t||Eo(Pe,Zs[Oe])&&!hn.call(u,Oe))&&(u[Oe]=J[Oe])}return u}),g7=Yt(function(u){return u.push(t,e0),Ur(L0,t,u)});function y7(u,p){return J1(u,xt(p,3),zo)}function b7(u,p){return J1(u,xt(p,3),Sh)}function S7(u,p){return u==null?u:bh(u,xt(p,3),Pr)}function _7(u,p){return u==null?u:Sy(u,xt(p,3),Pr)}function w7(u,p){return u&&zo(u,xt(p,3))}function x7(u,p){return u&&Sh(u,xt(p,3))}function k7(u){return u==null?[]:Jc(u,Xn(u))}function C7(u){return u==null?[]:Jc(u,Pr(u))}function Qh(u,p,S){var E=u==null?t:Ui(u,p);return E===t?S:E}function I7(u,p){return u!=null&&r0(u,p,G5)}function Zh(u,p){return u!=null&&r0(u,p,J5)}var E7=Gy(function(u,p,S){p!=null&&typeof p.toString!="function"&&(p=Fc.call(p)),u[p]=S},tm($r)),T7=Gy(function(u,p,S){p!=null&&typeof p.toString!="function"&&(p=Fc.call(p)),hn.call(u,p)?u[p].push(S):u[p]=[S]},xt),M7=Yt(nu);function Xn(u){return Ar(u)?py(u):kh(u)}function Pr(u){return Ar(u)?py(u,!0):iw(u)}function O7(u,p){var S={};return p=xt(p,3),zo(u,function(E,L,J){ua(S,p(E,L,J),E)}),S}function A7(u,p){var S={};return p=xt(p,3),zo(u,function(E,L,J){ua(S,L,p(E,L,J))}),S}var P7=rl(function(u,p,S){Xc(u,p,S)}),L0=rl(function(u,p,S,E){Xc(u,p,S,E)}),$7=da(function(u,p){var S={};if(u==null)return S;var E=!1;p=kn(p,function(J){return J=qa(J,u),E||(E=J.length>1),J}),Ho(u,Lh(u),S),E&&(S=so(S,f|m|g,Ew));for(var L=p.length;L--;)Oh(S,p[L]);return S});function R7(u,p){return B0(u,fd(xt(p)))}var D7=da(function(u,p){return u==null?{}:lw(u,p)});function B0(u,p){if(u==null)return{};var S=kn(Lh(u),function(E){return[E]});return p=xt(p),Oy(u,S,function(E,L){return p(E,L[0])})}function N7(u,p,S){p=qa(p,u);var E=-1,L=p.length;for(L||(L=1,u=t);++E<L;){var J=u==null?t:u[Uo(p[E])];J===t&&(E=L,J=S),u=pa(J)?J.call(u):J}return u}function F7(u,p,S){return u==null?u:ou(u,p,S)}function L7(u,p,S,E){return E=typeof E=="function"?E:t,u==null?u:ou(u,p,S,E)}var V0=Qy(Xn),z0=Qy(Pr);function B7(u,p,S){var E=Ft(u),L=E||Ja(u)||il(u);if(p=xt(p,4),S==null){var J=u&&u.constructor;L?S=E?new J:[]:Mn(u)?S=pa(J)?nl(Vc(u)):{}:S={}}return(L?oo:zo)(u,function(oe,ue,ge){return p(S,oe,ue,ge)}),S}function V7(u,p){return u==null?!0:Oh(u,p)}function z7(u,p,S){return u==null?u:Dy(u,p,$h(S))}function H7(u,p,S,E){return E=typeof E=="function"?E:t,u==null?u:Dy(u,p,$h(S),E)}function sl(u){return u==null?[]:dh(u,Xn(u))}function U7(u){return u==null?[]:dh(u,Pr(u))}function W7(u,p,S){return S===t&&(S=p,p=t),S!==t&&(S=co(S),S=S===S?S:0),p!==t&&(p=co(p),p=p===p?p:0),Hi(co(u),p,S)}function j7(u,p,S){return p=ha(p),S===t?(S=p,p=0):S=ha(S),u=co(u),X5(u,p,S)}function K7(u,p,S){if(S&&typeof S!="boolean"&&_r(u,p,S)&&(p=S=t),S===t&&(typeof p=="boolean"?(S=p,p=t):typeof u=="boolean"&&(S=u,u=t)),u===t&&p===t?(u=0,p=1):(u=ha(u),p===t?(p=u,u=0):p=ha(p)),u>p){var E=u;u=p,p=E}if(S||u%1||p%1){var L=dy();return fr(u+L*(p-u+k6("1e-"+((L+"").length-1))),p)}return Eh(u,p)}var Y7=ol(function(u,p,S){return p=p.toLowerCase(),u+(S?H0(p):p)});function H0(u){return em(fn(u).toLowerCase())}function U0(u){return u=fn(u),u&&u.replace(G_,F6).replace(h6,"")}function q7(u,p,S){u=fn(u),p=jr(p);var E=u.length;S=S===t?E:Hi(Ut(S),0,E);var L=S;return S-=p.length,S>=0&&u.slice(S,L)==p}function G7(u){return u=fn(u),u&&Ae.test(u)?u.replace(dt,L6):u}function J7(u){return u=fn(u),u&&Gp.test(u)?u.replace(Yl,"\\$&"):u}var X7=ol(function(u,p,S){return u+(S?"-":"")+p.toLowerCase()}),Q7=ol(function(u,p,S){return u+(S?" ":"")+p.toLowerCase()}),Z7=Ky("toLowerCase");function eC(u,p,S){u=fn(u),p=Ut(p);var E=p?Xs(u):0;if(!p||E>=p)return u;var L=(p-E)/2;return rd(Wc(L),S)+u+rd(Uc(L),S)}function tC(u,p,S){u=fn(u),p=Ut(p);var E=p?Xs(u):0;return p&&E<p?u+rd(p-E,S):u}function nC(u,p,S){u=fn(u),p=Ut(p);var E=p?Xs(u):0;return p&&E<p?rd(p-E,S)+u:u}function rC(u,p,S){return S||p==null?p=0:p&&(p=+p),c5(fn(u).replace(ln,""),p||0)}function oC(u,p,S){return(S?_r(u,p,S):p===t)?p=1:p=Ut(p),Th(fn(u),p)}function aC(){var u=arguments,p=fn(u[0]);return u.length<3?p:p.replace(u[1],u[2])}var iC=ol(function(u,p,S){return u+(S?"_":"")+p.toLowerCase()});function sC(u,p,S){return S&&typeof S!="number"&&_r(u,p,S)&&(p=S=t),S=S===t?Q:S>>>0,S?(u=fn(u),u&&(typeof p=="string"||p!=null&&!Xh(p))&&(p=jr(p),!p&&Js(u))?Ga(Co(u),0,S):u.split(p,S)):[]}var lC=ol(function(u,p,S){return u+(S?" ":"")+em(p)});function uC(u,p,S){return u=fn(u),S=S==null?0:Hi(Ut(S),0,u.length),p=jr(p),u.slice(S,S+p.length)==p}function cC(u,p,S){var E=K.templateSettings;S&&_r(u,p,S)&&(p=t),u=fn(u),p=md({},p,E,Zy);var L=md({},p.imports,E.imports,Zy),J=Xn(L),oe=dh(L,J),ue,ge,Oe=0,Pe=p.interpolate||Tc,Le="__p += '",Xe=ph((p.escape||Tc).source+"|"+Pe.source+"|"+(Pe===zr?U_:Tc).source+"|"+(p.evaluate||Tc).source+"|$","g"),ht="//# sourceURL="+(hn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++b6+"]")+`
`;u.replace(Xe,function(Et,Qt,an,Yr,wr,qr){return an||(an=Yr),Le+=u.slice(Oe,qr).replace(J_,B6),Qt&&(ue=!0,Le+=`' +
__e(`+Qt+`) +
'`),wr&&(ge=!0,Le+=`';
`+wr+`;
__p += '`),an&&(Le+=`' +
((__t = (`+an+`)) == null ? '' : __t) +
'`),Oe=qr+Et.length,Et}),Le+=`';
`;var It=hn.call(p,"variable")&&p.variable;if(!It)Le=`with (obj) {
`+Le+`
}
`;else if(z_.test(It))throw new Dt(s);Le=(ge?Le.replace(ke,""):Le).replace(Ee,"$1").replace(Ke,"$1;"),Le="function("+(It||"obj")+`) {
`+(It?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(ue?", __e = _.escape":"")+(ge?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+Le+`return __p
}`;var Wt=j0(function(){return un(J,ht+"return "+Le).apply(t,oe)});if(Wt.source=Le,Jh(Wt))throw Wt;return Wt}function dC(u){return fn(u).toLowerCase()}function fC(u){return fn(u).toUpperCase()}function pC(u,p,S){if(u=fn(u),u&&(S||p===t))return ey(u);if(!u||!(p=jr(p)))return u;var E=Co(u),L=Co(p),J=ty(E,L),oe=ny(E,L)+1;return Ga(E,J,oe).join("")}function hC(u,p,S){if(u=fn(u),u&&(S||p===t))return u.slice(0,oy(u)+1);if(!u||!(p=jr(p)))return u;var E=Co(u),L=ny(E,Co(p))+1;return Ga(E,0,L).join("")}function mC(u,p,S){if(u=fn(u),u&&(S||p===t))return u.replace(ln,"");if(!u||!(p=jr(p)))return u;var E=Co(u),L=ty(E,Co(p));return Ga(E,L).join("")}function vC(u,p){var S=$,E=B;if(Mn(p)){var L="separator"in p?p.separator:L;S="length"in p?Ut(p.length):S,E="omission"in p?jr(p.omission):E}u=fn(u);var J=u.length;if(Js(u)){var oe=Co(u);J=oe.length}if(S>=J)return u;var ue=S-Xs(E);if(ue<1)return E;var ge=oe?Ga(oe,0,ue).join(""):u.slice(0,ue);if(L===t)return ge+E;if(oe&&(ue+=ge.length-ue),Xh(L)){if(u.slice(ue).search(L)){var Oe,Pe=ge;for(L.global||(L=ph(L.source,fn(w1.exec(L))+"g")),L.lastIndex=0;Oe=L.exec(Pe);)var Le=Oe.index;ge=ge.slice(0,Le===t?ue:Le)}}else if(u.indexOf(jr(L),ue)!=ue){var Xe=ge.lastIndexOf(L);Xe>-1&&(ge=ge.slice(0,Xe))}return ge+E}function gC(u){return u=fn(u),u&&pe.test(u)?u.replace(St,K6):u}var yC=ol(function(u,p,S){return u+(S?" ":"")+p.toUpperCase()}),em=Ky("toUpperCase");function W0(u,p,S){return u=fn(u),p=S?t:p,p===t?z6(u)?G6(u):P6(u):u.match(p)||[]}var j0=Yt(function(u,p){try{return Ur(u,t,p)}catch(S){return Jh(S)?S:new Dt(S)}}),bC=da(function(u,p){return oo(p,function(S){S=Uo(S),ua(u,S,qh(u[S],u))}),u});function SC(u){var p=u==null?0:u.length,S=xt();return u=p?kn(u,function(E){if(typeof E[1]!="function")throw new ao(a);return[S(E[0]),E[1]]}):[],Yt(function(E){for(var L=-1;++L<p;){var J=u[L];if(Ur(J[0],this,E))return Ur(J[1],this,E)}})}function _C(u){return K5(so(u,f))}function tm(u){return function(){return u}}function wC(u,p){return u==null||u!==u?p:u}var xC=qy(),kC=qy(!0);function $r(u){return u}function nm(u){return ky(typeof u=="function"?u:so(u,f))}function CC(u){return Iy(so(u,f))}function IC(u,p){return Ey(u,so(p,f))}var EC=Yt(function(u,p){return function(S){return nu(S,u,p)}}),TC=Yt(function(u,p){return function(S){return nu(u,S,p)}});function rm(u,p,S){var E=Xn(p),L=Jc(p,E);S==null&&!(Mn(p)&&(L.length||!E.length))&&(S=p,p=u,u=this,L=Jc(p,Xn(p)));var J=!(Mn(S)&&"chain"in S)||!!S.chain,oe=pa(u);return oo(L,function(ue){var ge=p[ue];u[ue]=ge,oe&&(u.prototype[ue]=function(){var Oe=this.__chain__;if(J||Oe){var Pe=u(this.__wrapped__),Le=Pe.__actions__=Or(this.__actions__);return Le.push({func:ge,args:arguments,thisArg:u}),Pe.__chain__=Oe,Pe}return ge.apply(u,Ua([this.value()],arguments))})}),u}function MC(){return ar._===this&&(ar._=t5),this}function om(){}function OC(u){return u=Ut(u),Yt(function(p){return Ty(p,u)})}var AC=Dh(kn),PC=Dh(G1),$C=Dh(ih);function K0(u){return Hh(u)?sh(Uo(u)):uw(u)}function RC(u){return function(p){return u==null?t:Ui(u,p)}}var DC=Jy(),NC=Jy(!0);function am(){return[]}function im(){return!1}function FC(){return{}}function LC(){return""}function BC(){return!0}function VC(u,p){if(u=Ut(u),u<1||u>te)return[];var S=Q,E=fr(u,Q);p=xt(p),u-=Q;for(var L=ch(E,p);++S<u;)p(S);return L}function zC(u){return Ft(u)?kn(u,Uo):Kr(u)?[u]:Or(f0(fn(u)))}function HC(u){var p=++Z6;return fn(u)+p}var UC=nd(function(u,p){return u+p},0),WC=Nh("ceil"),jC=nd(function(u,p){return u/p},1),KC=Nh("floor");function YC(u){return u&&u.length?Gc(u,$r,_h):t}function qC(u,p){return u&&u.length?Gc(u,xt(p,2),_h):t}function GC(u){return Q1(u,$r)}function JC(u,p){return Q1(u,xt(p,2))}function XC(u){return u&&u.length?Gc(u,$r,Ch):t}function QC(u,p){return u&&u.length?Gc(u,xt(p,2),Ch):t}var ZC=nd(function(u,p){return u*p},1),eI=Nh("round"),tI=nd(function(u,p){return u-p},0);function nI(u){return u&&u.length?uh(u,$r):0}function rI(u,p){return u&&u.length?uh(u,xt(p,2)):0}return K.after=Ck,K.ary=x0,K.assign=f7,K.assignIn=F0,K.assignInWith=md,K.assignWith=p7,K.at=h7,K.before=k0,K.bind=qh,K.bindAll=bC,K.bindKey=C0,K.castArray=Fk,K.chain=S0,K.chunk=Kw,K.compact=Yw,K.concat=qw,K.cond=SC,K.conforms=_C,K.constant=tm,K.countBy=nk,K.create=m7,K.curry=I0,K.curryRight=E0,K.debounce=T0,K.defaults=v7,K.defaultsDeep=g7,K.defer=Ik,K.delay=Ek,K.difference=Gw,K.differenceBy=Jw,K.differenceWith=Xw,K.drop=Qw,K.dropRight=Zw,K.dropRightWhile=ex,K.dropWhile=tx,K.fill=nx,K.filter=ok,K.flatMap=sk,K.flatMapDeep=lk,K.flatMapDepth=uk,K.flatten=v0,K.flattenDeep=rx,K.flattenDepth=ox,K.flip=Tk,K.flow=xC,K.flowRight=kC,K.fromPairs=ax,K.functions=k7,K.functionsIn=C7,K.groupBy=ck,K.initial=sx,K.intersection=lx,K.intersectionBy=ux,K.intersectionWith=cx,K.invert=E7,K.invertBy=T7,K.invokeMap=fk,K.iteratee=nm,K.keyBy=pk,K.keys=Xn,K.keysIn=Pr,K.map=ud,K.mapKeys=O7,K.mapValues=A7,K.matches=CC,K.matchesProperty=IC,K.memoize=dd,K.merge=P7,K.mergeWith=L0,K.method=EC,K.methodOf=TC,K.mixin=rm,K.negate=fd,K.nthArg=OC,K.omit=$7,K.omitBy=R7,K.once=Mk,K.orderBy=hk,K.over=AC,K.overArgs=Ok,K.overEvery=PC,K.overSome=$C,K.partial=Gh,K.partialRight=M0,K.partition=mk,K.pick=D7,K.pickBy=B0,K.property=K0,K.propertyOf=RC,K.pull=hx,K.pullAll=y0,K.pullAllBy=mx,K.pullAllWith=vx,K.pullAt=gx,K.range=DC,K.rangeRight=NC,K.rearg=Ak,K.reject=yk,K.remove=yx,K.rest=Pk,K.reverse=Kh,K.sampleSize=Sk,K.set=F7,K.setWith=L7,K.shuffle=_k,K.slice=bx,K.sortBy=kk,K.sortedUniq=Ix,K.sortedUniqBy=Ex,K.split=sC,K.spread=$k,K.tail=Tx,K.take=Mx,K.takeRight=Ox,K.takeRightWhile=Ax,K.takeWhile=Px,K.tap=Yx,K.throttle=Rk,K.thru=ld,K.toArray=R0,K.toPairs=V0,K.toPairsIn=z0,K.toPath=zC,K.toPlainObject=N0,K.transform=B7,K.unary=Dk,K.union=$x,K.unionBy=Rx,K.unionWith=Dx,K.uniq=Nx,K.uniqBy=Fx,K.uniqWith=Lx,K.unset=V7,K.unzip=Yh,K.unzipWith=b0,K.update=z7,K.updateWith=H7,K.values=sl,K.valuesIn=U7,K.without=Bx,K.words=W0,K.wrap=Nk,K.xor=Vx,K.xorBy=zx,K.xorWith=Hx,K.zip=Ux,K.zipObject=Wx,K.zipObjectDeep=jx,K.zipWith=Kx,K.entries=V0,K.entriesIn=z0,K.extend=F0,K.extendWith=md,rm(K,K),K.add=UC,K.attempt=j0,K.camelCase=Y7,K.capitalize=H0,K.ceil=WC,K.clamp=W7,K.clone=Lk,K.cloneDeep=Vk,K.cloneDeepWith=zk,K.cloneWith=Bk,K.conformsTo=Hk,K.deburr=U0,K.defaultTo=wC,K.divide=jC,K.endsWith=q7,K.eq=Eo,K.escape=G7,K.escapeRegExp=J7,K.every=rk,K.find=ak,K.findIndex=h0,K.findKey=y7,K.findLast=ik,K.findLastIndex=m0,K.findLastKey=b7,K.floor=KC,K.forEach=_0,K.forEachRight=w0,K.forIn=S7,K.forInRight=_7,K.forOwn=w7,K.forOwnRight=x7,K.get=Qh,K.gt=Uk,K.gte=Wk,K.has=I7,K.hasIn=Zh,K.head=g0,K.identity=$r,K.includes=dk,K.indexOf=ix,K.inRange=j7,K.invoke=M7,K.isArguments=Ki,K.isArray=Ft,K.isArrayBuffer=jk,K.isArrayLike=Ar,K.isArrayLikeObject=Bn,K.isBoolean=Kk,K.isBuffer=Ja,K.isDate=Yk,K.isElement=qk,K.isEmpty=Gk,K.isEqual=Jk,K.isEqualWith=Xk,K.isError=Jh,K.isFinite=Qk,K.isFunction=pa,K.isInteger=O0,K.isLength=pd,K.isMap=A0,K.isMatch=Zk,K.isMatchWith=e7,K.isNaN=t7,K.isNative=n7,K.isNil=o7,K.isNull=r7,K.isNumber=P0,K.isObject=Mn,K.isObjectLike=Rn,K.isPlainObject=lu,K.isRegExp=Xh,K.isSafeInteger=a7,K.isSet=$0,K.isString=hd,K.isSymbol=Kr,K.isTypedArray=il,K.isUndefined=i7,K.isWeakMap=s7,K.isWeakSet=l7,K.join=dx,K.kebabCase=X7,K.last=uo,K.lastIndexOf=fx,K.lowerCase=Q7,K.lowerFirst=Z7,K.lt=u7,K.lte=c7,K.max=YC,K.maxBy=qC,K.mean=GC,K.meanBy=JC,K.min=XC,K.minBy=QC,K.stubArray=am,K.stubFalse=im,K.stubObject=FC,K.stubString=LC,K.stubTrue=BC,K.multiply=ZC,K.nth=px,K.noConflict=MC,K.noop=om,K.now=cd,K.pad=eC,K.padEnd=tC,K.padStart=nC,K.parseInt=rC,K.random=K7,K.reduce=vk,K.reduceRight=gk,K.repeat=oC,K.replace=aC,K.result=N7,K.round=eI,K.runInContext=ve,K.sample=bk,K.size=wk,K.snakeCase=iC,K.some=xk,K.sortedIndex=Sx,K.sortedIndexBy=_x,K.sortedIndexOf=wx,K.sortedLastIndex=xx,K.sortedLastIndexBy=kx,K.sortedLastIndexOf=Cx,K.startCase=lC,K.startsWith=uC,K.subtract=tI,K.sum=nI,K.sumBy=rI,K.template=cC,K.times=VC,K.toFinite=ha,K.toInteger=Ut,K.toLength=D0,K.toLower=dC,K.toNumber=co,K.toSafeInteger=d7,K.toString=fn,K.toUpper=fC,K.trim=pC,K.trimEnd=hC,K.trimStart=mC,K.truncate=vC,K.unescape=gC,K.uniqueId=HC,K.upperCase=yC,K.upperFirst=em,K.each=_0,K.eachRight=w0,K.first=g0,rm(K,function(){var u={};return zo(K,function(p,S){hn.call(K.prototype,S)||(u[S]=p)}),u}(),{chain:!1}),K.VERSION=r,oo(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){K[u].placeholder=K}),oo(["drop","take"],function(u,p){en.prototype[u]=function(S){S=S===t?1:qn(Ut(S),0);var E=this.__filtered__&&!p?new en(this):this.clone();return E.__filtered__?E.__takeCount__=fr(S,E.__takeCount__):E.__views__.push({size:fr(S,Q),type:u+(E.__dir__<0?"Right":"")}),E},en.prototype[u+"Right"]=function(S){return this.reverse()[u](S).reverse()}}),oo(["filter","map","takeWhile"],function(u,p){var S=p+1,E=S==G||S==R;en.prototype[u]=function(L){var J=this.clone();return J.__iteratees__.push({iteratee:xt(L,3),type:S}),J.__filtered__=J.__filtered__||E,J}}),oo(["head","last"],function(u,p){var S="take"+(p?"Right":"");en.prototype[u]=function(){return this[S](1).value()[0]}}),oo(["initial","tail"],function(u,p){var S="drop"+(p?"":"Right");en.prototype[u]=function(){return this.__filtered__?new en(this):this[S](1)}}),en.prototype.compact=function(){return this.filter($r)},en.prototype.find=function(u){return this.filter(u).head()},en.prototype.findLast=function(u){return this.reverse().find(u)},en.prototype.invokeMap=Yt(function(u,p){return typeof u=="function"?new en(this):this.map(function(S){return nu(S,u,p)})}),en.prototype.reject=function(u){return this.filter(fd(xt(u)))},en.prototype.slice=function(u,p){u=Ut(u);var S=this;return S.__filtered__&&(u>0||p<0)?new en(S):(u<0?S=S.takeRight(-u):u&&(S=S.drop(u)),p!==t&&(p=Ut(p),S=p<0?S.dropRight(-p):S.take(p-u)),S)},en.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},en.prototype.toArray=function(){return this.take(Q)},zo(en.prototype,function(u,p){var S=/^(?:filter|find|map|reject)|While$/.test(p),E=/^(?:head|last)$/.test(p),L=K[E?"take"+(p=="last"?"Right":""):p],J=E||/^find/.test(p);L&&(K.prototype[p]=function(){var oe=this.__wrapped__,ue=E?[1]:arguments,ge=oe instanceof en,Oe=ue[0],Pe=ge||Ft(oe),Le=function(Qt){var an=L.apply(K,Ua([Qt],ue));return E&&Xe?an[0]:an};Pe&&S&&typeof Oe=="function"&&Oe.length!=1&&(ge=Pe=!1);var Xe=this.__chain__,ht=!!this.__actions__.length,It=J&&!Xe,Wt=ge&&!ht;if(!J&&Pe){oe=Wt?oe:new en(this);var Et=u.apply(oe,ue);return Et.__actions__.push({func:ld,args:[Le],thisArg:t}),new io(Et,Xe)}return It&&Wt?u.apply(this,ue):(Et=this.thru(Le),It?E?Et.value()[0]:Et.value():Et)})}),oo(["pop","push","shift","sort","splice","unshift"],function(u){var p=Rc[u],S=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",E=/^(?:pop|shift)$/.test(u);K.prototype[u]=function(){var L=arguments;if(E&&!this.__chain__){var J=this.value();return p.apply(Ft(J)?J:[],L)}return this[S](function(oe){return p.apply(Ft(oe)?oe:[],L)})}}),zo(en.prototype,function(u,p){var S=K[p];if(S){var E=S.name+"";hn.call(tl,E)||(tl[E]=[]),tl[E].push({name:p,func:S})}}),tl[td(t,_).name]=[{name:"wrapper",func:t}],en.prototype.clone=g5,en.prototype.reverse=y5,en.prototype.value=b5,K.prototype.at=qx,K.prototype.chain=Gx,K.prototype.commit=Jx,K.prototype.next=Xx,K.prototype.plant=Zx,K.prototype.reverse=ek,K.prototype.toJSON=K.prototype.valueOf=K.prototype.value=tk,K.prototype.first=K.prototype.head,Gl&&(K.prototype[Gl]=Qx),K},Qs=J6();Li?((Li.exports=Qs)._=Qs,nh._=Qs):ar._=Qs}).call(eF)}(bu,bu.exports)),bu.exports}var Al=tF();const nF=["onClick"],rF={class:"ivyforms-context-menu-action__wrapper__content ivyforms-flex ivyforms-align-items-center"},oF={class:"ivyforms-context-menu-action__label ivyforms-mt-2"},aF={key:0,class:"ivy-context-menu-action__right-text regular-14 text-muted ivyforms-mt-2"},iF=he({__name:"IvyContextMenuActions",props:{actions:{default:()=>[]},entityId:{default:null},style:{default:"filled"}},emits:["confirm-delete","action-executed","close-menu"],setup(n,{emit:e}){const t=n,r=e,o=m=>{f(m.isComingSoon)||(m.handler&&m.handler(t.entityId),r("action-executed"))},i=m=>l(m.danger)?"var(--map-status-error-symbol-0)":m.iconColor?m.iconColor:"var(--map-base-dusk-symbol-2)",a=m=>typeof m=="function"?m(t.entityId):m,s=m=>typeof m=="function"?m(t.entityId):m,l=m=>typeof m=="function"?m():m,c=m=>typeof m=="function"?m():m,d=m=>typeof m=="function"?m():m,f=m=>typeof m=="function"?m():m;return(m,g)=>{const v=rn,y=Ns;return C(!0),F($e,null,ot(t.actions,b=>{var _,w;return C(),F("div",{key:a(b.label),class:ee(["ivyforms-context-menu-action regular-14",{divided:c(b.divided),secondary:d(b.secondary),hidden:(_=b==null?void 0:b.isHidden)==null?void 0:_.call(b),ghost:t.style==="ghost",active:(w=b==null?void 0:b.isActive)==null?void 0:w.call(b),"coming-soon":f(b.isComingSoon)}]),onClick:()=>o(b)},[z("div",{class:ee(["ivyforms-context-menu-action__wrapper ivyforms-flex ivyforms-justify-content-between ivyforms-flex-grow ivyforms-gap-8 ivyforms-pr-8 ivyforms-align-items-center",{danger:l(b.danger)}])},[z("div",rF,[b.icon?(C(),se(v,{key:0,color:i(b),name:s(b.icon),type:b.iconType||"outline",category:b.iconCategory||"global",size:b.iconSize||"d",class:"ivyforms-context-menu-action__icon"},null,8,["color","name","type","category","size"])):ie("",!0),z("span",oF,ae(b.label),1)]),b.rightText?(C(),F("div",aF,ae(b.rightText),1)):ie("",!0),f(b.isComingSoon)?(C(),se(y,{key:1})):ie("",!0)],2)],10,nF)}),128)}}}),Tp=Vl("contextMenu",()=>{const n=H(!1),e=Fr(null),t=H({}),r=(i={})=>{n.value&&o(),e.value=iF,t.value=i;const a=t.value.contextMenuButtonRef;let s=null;a&&"$el"in a?s=a.$el:a instanceof HTMLElement&&(s=a),s&&s.classList.add("opened"),n.value=!0},o=()=>{n.value=!1;const i=t.value.contextMenuButtonRef;let a=null;i&&"$el"in i?a=i.$el:i instanceof HTMLElement&&(a=i),a&&a.classList.remove("opened"),typeof t.value.onClose=="function"&&t.value.onClose(),setTimeout(()=>{n.value||(t.value={},e.value=null)},200)};return{isOpen:n,contextMenuContent:e,contextMenuProps:t,openContextMenu:r,closeContextMenu:o}}),fs=he({__name:"IvyLink",props:{href:{default:"#"},priority:{default:"primary"},target:{default:"_self"},rel:{default:"noreferrer"},size:{default:"d"},onClick:{type:Function,default:()=>{}}},setup(n){const e=n,t=H(!1),r=H(!1),o=O(()=>({href:e.href==="#"?"":e.href,target:e.target,rel:e.target==="_blank"?e.rel:""})),i=c=>{e.href==="#"||!e.href?c.preventDefault():r.value=!0,e.onClick&&e.onClick(c)},a=()=>{t.value=!0},s=()=>{t.value=!1},l=()=>{t.value=!1};return(c,d)=>{const f=eO;return C(),F("div",null,[I(f,kt(o.value,{underline:!1,class:["ivyforms-link",`priority-${e.priority} size-${e.size} ${t.value?"pressed":""} ${r.value?"used":""}`],onClick:i,onMousedown:a,onMouseup:s,onMouseleave:l}),{default:V(()=>[xe(c.$slots,"default")]),_:3},16,["class"])])}}}),sF={class:"ivyforms-popover"},js=he({__name:"IvyPopover",props:{popperClass:{default:void 0},popperBackground:{default:"level-2-foreground"},popperArrow:{default:"without-arrow"},isWithScrollbar:{type:Boolean,default:!1}},emits:["show"],setup(n,{expose:e,emit:t}){const r=n,o=t,i=H(),a=()=>{var l;(l=i.value)==null||l.hide()},s=()=>{o("show")};return e({hide:a}),(l,c)=>(C(),F("div",sF,[I(h(aA),kt({ref_key:"elPopoverRef",ref:i},{...l.$props,...l.$attrs},{"popper-class":`ivyforms-popover-popper ${r.popperBackground} ivyforms-popover-arrow ${r.popperArrow}`+(r.isWithScrollbar?" is-with-scrollbar":"")+(r.popperClass?" "+r.popperClass:""),onShow:s}),{reference:V(()=>[xe(l.$slots,"reference")]),default:V(()=>[l.$slots.default&&r.isWithScrollbar?(C(),F($e,{key:0},[],64)):xe(l.$slots,"default",{key:1})]),_:3},16,["popper-class"])]))}}),$g=he({__name:"IvyContextMenu",setup(n){const e=Tp(),{isOpen:t}=Bs(e),r=H(null),o=()=>{e.closeContextMenu()},i=O(()=>e.contextMenuProps);Me(()=>i.value.contextMenuButtonRef,s=>{r.value&&r.value(),s instanceof HTMLElement?r.value=Ov(s,()=>e.closeContextMenu()):s&&s.$el&&s.$el instanceof HTMLElement?r.value=Ov(s.$el,()=>e.closeContextMenu()):r.value=null});const a=O(()=>{const s=e.contextMenuProps.contextMenuButtonRef;return s&&"$el"in s&&s.$el instanceof HTMLElement?s.$el:s instanceof HTMLElement?s:null});return Me(t,s=>{!s&&r.value&&(r.value(),r.value=null)}),(s,l)=>(C(),se(js,{visible:h(t),"popper-class":"ivyforms-popper-context-menu","popper-background":"level-1-foreground",width:205,placement:"bottom-start","virtual-ref":a.value,"show-arrow":!1,"virtual-triggering":""},{default:V(()=>[(C(),se(dn(h(e).contextMenuContent),{actions:h(e).contextMenuProps.actions,"entity-id":h(e).contextMenuProps.entityId,onActionExecuted:o,onCloseMenu:h(e).closeContextMenu},null,40,["actions","entity-id","onCloseMenu"]))]),_:1},8,["visible","virtual-ref"]))}}),Rg=he({__name:"IvyDatePicker",props:{modelValue:{default:null},disabled:{type:Boolean},clearable:{type:Boolean},weekStart:{default:1},prefixIcon:{default:"calendar-mark"},prefixIconColor:{default:"var(--map-base-brand-symbol-2)"},prefixIconColorWhenActive:{default:void 0},clearIconType:{default:"outline"},type:{default:"date"},popperBackground:{default:"level-2-foreground"},rangeSeparator:{default:"-"},loading:{type:Boolean},cellClassName:{type:Function,default:void 0},shortcuts:{default:void 0}},emits:["update:modelValue","change"],setup(n,{emit:e}){tE(c=>({"552f0942":l.value}));const t=n,r=[{text:"Today",value:new Date},{text:"Yesterday",value:()=>{const c=new Date;return c.setTime(c.getTime()-3600*1e3*24),c}},{text:"Last week",value:()=>{const c=new Date,d=new Date;return d.setTime(d.getTime()-3600*1e3*24*7),[d,c]}},{text:"Last month",value:()=>{const c=new Date,d=new Date;return d.setTime(d.getTime()-3600*1e3*24*30),[d,c]}},{text:"Last 3 months",value:()=>{const c=new Date,d=new Date;return d.setTime(d.getTime()-3600*1e3*24*90),[d,c]}},{text:"This month",value:[new Date,new Date]},{text:"This year",value:()=>{const c=new Date;return[new Date(new Date().getFullYear(),0),c]}},{text:"Last 6 months",value:()=>{const c=new Date,d=new Date;return d.setMonth(d.getMonth()-6),[d,c]}}],o=e,i=H(),a=t.prefixIcon?Fr({render(){return Fe(rn,{name:t.prefixIcon,color:t.prefixIconColor})}}):null;Qe.en.weekStart=t.weekStart!==void 0?t.weekStart:1;const s=O({get(){return t.modelValue},set(c){o("update:modelValue",c),Xt(()=>{const d=i.value.querySelector(".el-input__inner"),f=i.value.querySelectorAll(".el-range-input");d?d.blur():f.length&&f.forEach(m=>m.blur())})}}),l=O(()=>t.prefixIconColorWhenActive||t.prefixIconColor);return(c,d)=>{const f=l9,m=DT;return C(),F("div",{ref_key:"ivyDatePickerRef",ref:i,class:"ivyforms-date-picker"},[I(m,null,{default:V(()=>[I(f,kt({modelValue:s.value,"onUpdate:modelValue":d[0]||(d[0]=g=>s.value=g),class:["ivyforms-input ivyforms-input__size__default",{"has-value":Array.isArray(s.value)?s.value.length>0:s.value,"is-clearable":t.clearable}]},{...c.$props,...c.$attrs},{"popper-class":`ivyforms-date-picker-popper ${t.type==="daterange"?"ivyforms-date-range-popper":""} ${t.popperBackground}`,"popper-options":{placement:"bottom-start"},"prefix-icon":h(a),"range-separator":t.rangeSeparator,shortcuts:t.shortcuts?r:void 0,"cell-class-name":g=>{var b;const v=((b=t.cellClassName)==null?void 0:b.call(t,g))||"",y=t.loading?"is-loading":"";return[v,y].filter(Boolean).join(" ")},onChange:d[1]||(d[1]=()=>o("change",s.value))}),null,16,["modelValue","class","popper-class","prefix-icon","range-separator","shortcuts","cell-class-name"])]),_:1})],512)}}}),lF={class:"ivyforms-dialog-wrapper"},uF={key:0,class:"ivyforms-dialog__header__title-wrapper"},cF={key:1,class:"ivyforms-dialog__header__title-wrapper ivyforms-flex ivyforms-flex-direction-column ivyforms-gap-8"},dF={class:"ivyforms-dialog__header__title ivyforms-flex ivyforms-gap-8 ivyforms-justify-content-between ivyforms-align-items-center"},fF={class:"medium-18"},pF={key:0,class:"regular-16 ivyforms-text-secondary"},hF={key:2,class:"ivyforms-dialog__header__close"},mF={key:0,class:"ivyforms-dialog__body"},yS=he({__name:"IvyDialog",props:{modelValue:{type:Boolean,default:!1},title:{default:""},subtitle:{default:""},showClose:{type:Boolean,default:!0},width:{default:"500"},type:{default:"fill"}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=e,o=H(null),i=H(0),a=H(0),s=H(null),l=O({get(){return t.modelValue},set(f){r("update:modelValue",f)}}),c=()=>{i.value=0,d();const{direction:f,lengthY:m}=gS(o,{threshold:0,onSwipe(){f.value==="down"?i.value=Math.min(m.value,window.innerHeight):f.value==="up"&&(i.value=Math.max(i.value-m.value,0))},onSwipeEnd(){f.value==="down"&&Math.abs(m.value)>a.value/2?l.value=!1:i.value=0}});s.value.$el.nextSibling.querySelector(".el-overlay-dialog").scrollTo(0,0)},d=()=>{const f=document.querySelector(".ivyforms-dialog");f&&(a.value=f.clientHeight)};return(f,m)=>{const g=rn,v=C4;return C(),F("div",lF,[I(v,kt({ref_key:"dialogRef",ref:s,modelValue:l.value,"onUpdate:modelValue":m[1]||(m[1]=y=>l.value=y)},{...f.$attrs,...f.$props},{"show-close":!1,style:{bottom:i.value+"px"},class:["ivyforms-dialog",[`type-${t.type}`]],width:t.width,onOpen:m[2]||(m[2]=y=>c())}),ws({header:V(()=>[z("div",{ref_key:"dialogHeader",ref:o,class:"ivyforms-dialog__header"},[m[3]||(m[3]=z("div",{class:"ivyforms-dialog__header__drag-handle"},null,-1)),f.$slots.header?(C(),F("div",uF,[xe(f.$slots,"header")])):ie("",!0),t.title&&!f.$slots.header?(C(),F("div",cF,[z("div",dF,[z("span",fF,ae(t.title),1),xe(f.$slots,"titleButton")]),t.subtitle?(C(),F("span",pF,ae(t.subtitle),1)):ie("",!0)])):ie("",!0),f.showClose?(C(),F("div",hF,[I(g,{priority:"tertiary",name:"close",type:"outline",size:"s",category:"global",color:"var(--map-base-dusk-symbol-2)",onClick:m[0]||(m[0]=y=>l.value=!1)})])):ie("",!0)],512)]),default:V(()=>[f.$slots.default?(C(),F("div",mF,[xe(f.$slots,"default")])):ie("",!0)]),_:2},[f.$slots.footer?{name:"footer",fn:V(()=>[xe(f.$slots,"footer")]),key:"0"}:void 0]),1040,["modelValue","style","class","width"])])}}}),vF={class:"ivyforms-subdialog-wrapper"},gF={class:"ivyforms-subdialog-header-icon"},yF={key:0,class:"ivyforms-subdialog__header__title-wrapper"},bF={key:1,class:"ivyforms-subdialog__header__title-wrapper ivyforms-flex ivyforms-flex-direction-column ivyforms-gap-8"},SF={class:"ivyforms-subdialog__header__title ivyforms-flex ivyforms-gap-8 ivyforms-justify-content-between ivyforms-align-items-center"},_F={class:"medium-14"},wF={key:2,class:"ivyforms-subdialog__header__close"},xF={key:0,class:"ivyforms-subdialog__body"},_c=he({__name:"IvyShortDialog",props:{title:{default:""},subtitle:{default:""},showClose:{type:Boolean,default:!0},width:{default:""},type:{default:"success"},align:{default:"center"},top:{type:Boolean,default:!1}},setup(n){const e=n,{dialogVisible:t,dialogData:r,actionType:o}=Bs(Na()),{confirmAction:i}=Na(),a=()=>{var y,b,_,w;(b=(y=r.value)==null?void 0:y.buttons)!=null&&b.close.function&&((w=(_=r.value)==null?void 0:_.buttons)==null||w.close.function()),t.value=!1},s=()=>{var y,b,_,w;(b=(y=r.value)==null?void 0:y.buttons)!=null&&b.confirm.function?((w=(_=r.value)==null?void 0:_.buttons)==null||w.confirm.function(),t.value=!1):i()},l=H(null),c=H(0),d=H(0),f=H(null),m=()=>{c.value=0,g();const{direction:y,lengthY:b}=gS(l,{threshold:0,onSwipe(){y.value==="down"?c.value=Math.min(b.value,window.innerHeight):y.value==="up"&&(c.value=Math.max(c.value-b.value,0))},onSwipeEnd(){y.value==="down"&&Math.abs(b.value)>d.value/2?t.value=!1:c.value=0}});f.value.$el.nextSibling.querySelector(".el-overlay-dialog").scrollTo(0,0)},g=()=>{const y=document.querySelector(".ivyforms-subdialog");y&&(d.value=y.clientHeight)},v=()=>{if(o.value)switch(o.value){case"duplicate":return"copy";case"unsaved_changes":case"delete":return"danger"}};return(y,b)=>{const _=rn,w=C4;return C(),F("div",vF,[I(w,kt({ref_key:"dialogRef",ref:f,modelValue:h(t),"onUpdate:modelValue":b[1]||(b[1]=T=>bs(t)?t.value=T:null)},{...y.$attrs,type:h(o)},{"show-close":!1,style:{bottom:c.value+"px"},class:["ivyforms-subdialog",[`type-${h(o)}`,`ivyforms-align-${e.align}`,{"position-top":y.top}]],width:e.width,onOpen:b[2]||(b[2]=T=>m())}),ws({header:V(()=>[z("div",{ref_key:"dialogHeader",ref:l,class:"ivyforms-subdialog__header"},[b[3]||(b[3]=z("div",{class:"ivyforms-subdialog__header__drag-handle"},null,-1)),z("div",gF,[I(_,{name:v(),type:"fill-duo",size:"l"},null,8,["name"])]),y.$slots.header?(C(),F("div",yF,[xe(y.$slots,"header")])):ie("",!0),h(r).title&&!y.$slots.header?(C(),F("div",bF,[z("div",SF,[z("span",_F,ae(h(r).title),1),xe(y.$slots,"titleButton")])])):ie("",!0),y.showClose?(C(),F("div",wF,[I(_,{priority:"tertiary",name:"close",type:"outline",size:"s",category:"global",color:"var(--map-base-dusk-symbol-2)",onClick:b[0]||(b[0]=T=>t.value=!1)})])):ie("",!0)],512)]),default:V(()=>[h(r).subtitle?(C(),F("div",xF,ae(h(r).subtitle),1)):ie("",!0)]),_:2},[h(r).buttons?{name:"footer",fn:V(()=>{var T,k,x,M,D;return[I(it,{priority:(k=(T=h(r).buttons)==null?void 0:T.close)!=null&&k.type?h(r).buttons.close.type:"tertiary",size:"d",type:"fill","full-width":!0,onClick:a},{default:V(()=>{var A,P;return[De(ae(((P=(A=h(r).buttons)==null?void 0:A.close)==null?void 0:P.text)||"Closel"),1)]}),_:1},8,["priority"]),(x=h(r).buttons)!=null&&x.confirm?(C(),se(it,{key:0,priority:((D=(M=h(r).buttons)==null?void 0:M.confirm)==null?void 0:D.type)||"primary",size:"d",type:"fill","full-width":!0,onClick:s},{default:V(()=>{var A,P;return[De(ae(((P=(A=h(r).buttons)==null?void 0:A.confirm)==null?void 0:P.text)||"Confirm"),1)]}),_:1},8,["priority"])):ie("",!0)]}),key:"0"}:void 0]),1040,["modelValue","style","class","width"])])}}});var An=(n=>(n.Rename="Rename",n.ShowAll="ShowAll",n.MoveToFolder="MoveToFolder",n.MoveUp="MoveUp",n.Export="Export",n.Entries="Entries",n.Download="Download",n.MarkAsSpam="MarkAsSpam",n.ResendNotification="ResendNotification",n.Save="Save",n.Placeholder="Placeholder",n.AddSubfolder="AddSubfolder",n.Print="Print",n.Folder="Folder",n.MoveDown="MoveDown",n.Import="Import",n.Preview="Preview",n.AddStar="AddStar",n.MarkAsRead="MarkAsRead",n.Trash="Trash",n.SaveAsDraft="SaveAsDraft",n.Cancel="Cancel",n.Edit="Edit",n.SortBy="SortBy",n.Duplicate="Duplicate",n.Translate="Translate",n.Settings="Settings",n.Locate="Locate",n.RemoveStar="RemoveStar",n.MarkAsUnread="MarkAsUnread",n.Restore="Restore",n.Page="Page",n.Delete="Delete",n.Starred="Starred",n.Unstarred="Unstarred",n.Published="Published",n.Unpublished="Unpublished",n.Reset="Reset",n.ResetFilters="Reset Filters",n.Read="Read",n.Unread="Unread",n))(An||{});const Hn=(n,e={})=>{const{getLabel:t}=at();return{...{Edit:{label:t("edit"),icon:"edit",handler:()=>alert("Edit clicked")},Delete:{label:t("delete"),icon:"trash",danger:!0,handler:()=>alert("Delete clicked")},MoveToFolder:{label:t("move_to_folder"),icon:"move-to",showArrow:!0,handler:()=>{alert("Move to folder clicked")}},Folder:{label:"",icon:"folder",handler:o=>{const i=String(o);alert(`${t("move_up")} ${i}`)}},Duplicate:{label:t("duplicate"),icon:"copy",handler:()=>alert("Duplicate clicked")},MoveUp:{label:t("move_up"),icon:"arrow-up",iconCategory:"arrows",handler:()=>alert("Move up clicked")},MoveDown:{label:t("move_down"),icon:"arrow-down",iconCategory:"arrows",handler:()=>alert("Move down clicked")},Save:{label:t("save"),icon:"cloud-save",handler:()=>alert("Save clicked")},SaveAsDraft:{label:t("save_as_draft"),icon:"archive-check",handler:()=>alert("Save as draft clicked")},Cancel:{label:t("cancel"),icon:"close-circle",danger:!0,handler:()=>alert("Cancel clicked")},Print:{label:t("print"),icon:"print",handler:()=>alert("Print clicked")},Export:{label:t("export"),icon:"export",handler:()=>alert("Export clicked")},Import:{label:t("import"),icon:"import",handler:()=>alert("Import clicked")},Download:{label:t("download"),icon:"cloud-download",handler:()=>alert("Download clicked")},MarkAsSpam:{label:t("mark_as_spam"),icon:"spam",handler:()=>alert("Mark as spam clicked")},MarkAsRead:{label:t("mark_as_read"),icon:"read",handler:()=>alert("Mark as read clicked")},MarkAsUnread:{label:t("mark_as_unread"),icon:"unread",handler:()=>alert("Mark as unread clicked")},AddStar:{label:t("add_star"),icon:"star",iconType:"fill",handler:()=>alert("Add star clicked")},RemoveStar:{label:t("remove_star"),icon:"star",handler:()=>alert("Remove star clicked")},Locate:{label:t("locate"),icon:"send-locate",handler:()=>alert("Locate clicked")},Settings:{label:t("settings"),icon:"settings",handler:()=>alert("Settings clicked")},SortBy:{label:t("sort_by"),icon:"sort",handler:()=>alert("Sort by clicked")},Translate:{label:t("translate"),icon:"globe",handler:()=>alert("Translate clicked")},Preview:{label:t("preview"),icon:"preview",handler:()=>alert("Preview clicked")},AddSubfolder:{label:t("add_subfolder"),icon:"plus",handler:()=>alert("Add subfolder clicked")},Trash:{label:t("trash"),icon:"archive",handler:()=>alert("Trash clicked")},Restore:{label:t("restore"),icon:"restore",handler:()=>alert("Restore clicked")},ShowAll:{label:t("show_all"),icon:"checklist",handler:()=>alert("Show all clicked")},Entries:{label:t("entries"),icon:"login",iconCategory:"arrows",handler:()=>alert("Entries clicked")},Page:{label:"",handler:()=>alert("Page clicked")},Placeholder:{label:"[placeholder name]",handler:()=>alert("Placeholder clicked")},Rename:{label:t("rename"),icon:"edit-field",handler:()=>alert("Rename clicked")},ResendNotification:{label:t("resend_notification"),icon:"resend",handler:()=>alert("Resend notification clicked")},Starred:{label:t("starred"),icon:"star",iconCategory:"global",iconType:"fill",iconSize:"s",handler:()=>alert("Starred clicked")},Unstarred:{label:t("unstarred"),icon:"star",iconCategory:"global",iconType:"outline",iconSize:"s",handler:()=>alert("Unstarred clicked")},Unpublished:{label:t("unpublished"),icon:"toggle-off",iconCategory:"global",iconType:"fill",iconSize:"s",handler:()=>alert("Unpublished clicked")},Published:{label:t("published"),icon:"toggle-on",iconCategory:"global",iconType:"fill",iconSize:"s",handler:()=>alert("Published clicked")},Reset:{label:t("reset"),danger:!0,icon:"refresh",iconType:"outline",iconCategory:"arrows",iconSize:"s",handler:()=>alert("Reset")},Read:{label:t("read"),icon:"email",iconSize:"s",handler:()=>alert("Read clicked")},Unread:{label:t("unread"),icon:"unread",iconSize:"s",handler:()=>alert("Unread clicked")},"Reset Filters":{label:t("reset_filters"),danger:!0,icon:"refresh",iconType:"outline",iconCategory:"arrows",iconSize:"s",handler:()=>alert("Reset clicked")}}[n],...e}},bS=6048e5,kF=864e5,qb=Symbol.for("constructDateFrom");function Ei(n,e){return typeof n=="function"?n(e):n&&typeof n=="object"&&qb in n?n[qb](e):n instanceof Date?new n.constructor(e):new Date(e)}function Vo(n,e){return Ei(e||n,n)}let CF={};function Mp(){return CF}function Qu(n,e){var s,l,c,d;const t=Mp(),r=(e==null?void 0:e.weekStartsOn)??((l=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??t.weekStartsOn??((d=(c=t.locale)==null?void 0:c.options)==null?void 0:d.weekStartsOn)??0,o=Vo(n,e==null?void 0:e.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function Ef(n,e){return Qu(n,{...e,weekStartsOn:1})}function SS(n,e){const t=Vo(n,e==null?void 0:e.in),r=t.getFullYear(),o=Ei(t,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Ef(o),a=Ei(t,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Ef(a);return t.getTime()>=i.getTime()?r+1:t.getTime()>=s.getTime()?r:r-1}function Gb(n){const e=Vo(n),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+n-+t}function IF(n,...e){const t=Ei.bind(null,e.find(r=>typeof r=="object"));return e.map(t)}function Jb(n,e){const t=Vo(n,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}function EF(n,e,t){const[r,o]=IF(t==null?void 0:t.in,n,e),i=Jb(r),a=Jb(o),s=+i-Gb(i),l=+a-Gb(a);return Math.round((s-l)/kF)}function TF(n,e){const t=SS(n,e),r=Ei(n,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),Ef(r)}function MF(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function OF(n){return!(!MF(n)&&typeof n!="number"||isNaN(+Vo(n)))}function AF(n,e){const t=Vo(n,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}const PF={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},_S=(n,e,t)=>{let r;const o=PF[n];return typeof o=="string"?r=o:e===1?r=o.one:r=o.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+r:r+" ago":r};function Aa(n){return(e={})=>{const t=e.width?String(e.width):n.defaultWidth;return n.formats[t]||n.formats[n.defaultWidth]}}const $F={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},RF={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},DF={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},NF={date:Aa({formats:$F,defaultWidth:"full"}),time:Aa({formats:RF,defaultWidth:"full"}),dateTime:Aa({formats:DF,defaultWidth:"full"})},FF={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},wS=(n,e,t,r)=>FF[n];function Yo(n){return(e,t)=>{const r=t!=null&&t.context?String(t.context):"standalone";let o;if(r==="formatting"&&n.formattingValues){const a=n.defaultFormattingWidth||n.defaultWidth,s=t!=null&&t.width?String(t.width):a;o=n.formattingValues[s]||n.formattingValues[a]}else{const a=n.defaultWidth,s=t!=null&&t.width?String(t.width):n.defaultWidth;o=n.values[s]||n.values[a]}const i=n.argumentCallback?n.argumentCallback(e):e;return o[i]}}const LF={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},BF={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},VF={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},zF={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},HF={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},UF={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},WF=(n,e)=>{const t=Number(n),r=t%100;if(r>20||r<10)switch(r%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},xS={ordinalNumber:WF,era:Yo({values:LF,defaultWidth:"wide"}),quarter:Yo({values:BF,defaultWidth:"wide",argumentCallback:n=>n-1}),month:Yo({values:VF,defaultWidth:"wide"}),day:Yo({values:zF,defaultWidth:"wide"}),dayPeriod:Yo({values:HF,defaultWidth:"wide",formattingValues:UF,defaultFormattingWidth:"wide"})};function qo(n){return(e,t={})=>{const r=t.width,o=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],i=e.match(o);if(!i)return null;const a=i[0],s=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(s)?KF(s,f=>f.test(a)):jF(s,f=>f.test(a));let c;c=n.valueCallback?n.valueCallback(l):l,c=t.valueCallback?t.valueCallback(c):c;const d=e.slice(a.length);return{value:c,rest:d}}}function jF(n,e){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&e(n[t]))return t}function KF(n,e){for(let t=0;t<n.length;t++)if(e(n[t]))return t}function kS(n){return(e,t={})=>{const r=e.match(n.matchPattern);if(!r)return null;const o=r[0],i=e.match(n.parsePattern);if(!i)return null;let a=n.valueCallback?n.valueCallback(i[0]):i[0];a=t.valueCallback?t.valueCallback(a):a;const s=e.slice(o.length);return{value:a,rest:s}}}const YF=/^(\d+)(th|st|nd|rd)?/i,qF=/\d+/i,GF={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},JF={any:[/^b/i,/^(a|c)/i]},XF={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},QF={any:[/1/i,/2/i,/3/i,/4/i]},ZF={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},eL={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},tL={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},nL={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},rL={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},oL={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},CS={ordinalNumber:kS({matchPattern:YF,parsePattern:qF,valueCallback:n=>parseInt(n,10)}),era:qo({matchPatterns:GF,defaultMatchWidth:"wide",parsePatterns:JF,defaultParseWidth:"any"}),quarter:qo({matchPatterns:XF,defaultMatchWidth:"wide",parsePatterns:QF,defaultParseWidth:"any",valueCallback:n=>n+1}),month:qo({matchPatterns:ZF,defaultMatchWidth:"wide",parsePatterns:eL,defaultParseWidth:"any"}),day:qo({matchPatterns:tL,defaultMatchWidth:"wide",parsePatterns:nL,defaultParseWidth:"any"}),dayPeriod:qo({matchPatterns:rL,defaultMatchWidth:"any",parsePatterns:oL,defaultParseWidth:"any"})},aL={code:"en-US",formatDistance:_S,formatLong:NF,formatRelative:wS,localize:xS,match:CS,options:{weekStartsOn:0,firstWeekContainsDate:1}};function iL(n,e){const t=Vo(n,e==null?void 0:e.in);return EF(t,AF(t))+1}function sL(n,e){const t=Vo(n,e==null?void 0:e.in),r=+Ef(t)-+TF(t);return Math.round(r/bS)+1}function IS(n,e){var d,f,m,g;const t=Vo(n,e==null?void 0:e.in),r=t.getFullYear(),o=Mp(),i=(e==null?void 0:e.firstWeekContainsDate)??((f=(d=e==null?void 0:e.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??o.firstWeekContainsDate??((g=(m=o.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,a=Ei((e==null?void 0:e.in)||n,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=Qu(a,e),l=Ei((e==null?void 0:e.in)||n,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=Qu(l,e);return+t>=+s?r+1:+t>=+c?r:r-1}function lL(n,e){var s,l,c,d;const t=Mp(),r=(e==null?void 0:e.firstWeekContainsDate)??((l=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??t.firstWeekContainsDate??((d=(c=t.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??1,o=IS(n,e),i=Ei((e==null?void 0:e.in)||n,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Qu(i,e)}function uL(n,e){const t=Vo(n,e==null?void 0:e.in),r=+Qu(t,e)-+lL(t,e);return Math.round(r/bS)+1}function mn(n,e){const t=n<0?"-":"",r=Math.abs(n).toString().padStart(e,"0");return t+r}const Qa={y(n,e){const t=n.getFullYear(),r=t>0?t:1-t;return mn(e==="yy"?r%100:r,e.length)},M(n,e){const t=n.getMonth();return e==="M"?String(t+1):mn(t+1,2)},d(n,e){return mn(n.getDate(),e.length)},a(n,e){const t=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(n,e){return mn(n.getHours()%12||12,e.length)},H(n,e){return mn(n.getHours(),e.length)},m(n,e){return mn(n.getMinutes(),e.length)},s(n,e){return mn(n.getSeconds(),e.length)},S(n,e){const t=e.length,r=n.getMilliseconds(),o=Math.trunc(r*Math.pow(10,t-3));return mn(o,e.length)}},ul={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Xb={G:function(n,e,t){const r=n.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(r,{width:"abbreviated"});case"GGGGG":return t.era(r,{width:"narrow"});case"GGGG":default:return t.era(r,{width:"wide"})}},y:function(n,e,t){if(e==="yo"){const r=n.getFullYear(),o=r>0?r:1-r;return t.ordinalNumber(o,{unit:"year"})}return Qa.y(n,e)},Y:function(n,e,t,r){const o=IS(n,r),i=o>0?o:1-o;if(e==="YY"){const a=i%100;return mn(a,2)}return e==="Yo"?t.ordinalNumber(i,{unit:"year"}):mn(i,e.length)},R:function(n,e){const t=SS(n);return mn(t,e.length)},u:function(n,e){const t=n.getFullYear();return mn(t,e.length)},Q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return mn(r,2);case"Qo":return t.ordinalNumber(r,{unit:"quarter"});case"QQQ":return t.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return mn(r,2);case"qo":return t.ordinalNumber(r,{unit:"quarter"});case"qqq":return t.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,e,t){const r=n.getMonth();switch(e){case"M":case"MM":return Qa.M(n,e);case"Mo":return t.ordinalNumber(r+1,{unit:"month"});case"MMM":return t.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(r,{width:"wide",context:"formatting"})}},L:function(n,e,t){const r=n.getMonth();switch(e){case"L":return String(r+1);case"LL":return mn(r+1,2);case"Lo":return t.ordinalNumber(r+1,{unit:"month"});case"LLL":return t.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(r,{width:"wide",context:"standalone"})}},w:function(n,e,t,r){const o=uL(n,r);return e==="wo"?t.ordinalNumber(o,{unit:"week"}):mn(o,e.length)},I:function(n,e,t){const r=sL(n);return e==="Io"?t.ordinalNumber(r,{unit:"week"}):mn(r,e.length)},d:function(n,e,t){return e==="do"?t.ordinalNumber(n.getDate(),{unit:"date"}):Qa.d(n,e)},D:function(n,e,t){const r=iL(n);return e==="Do"?t.ordinalNumber(r,{unit:"dayOfYear"}):mn(r,e.length)},E:function(n,e,t){const r=n.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(r,{width:"short",context:"formatting"});case"EEEE":default:return t.day(r,{width:"wide",context:"formatting"})}},e:function(n,e,t,r){const o=n.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return mn(i,2);case"eo":return t.ordinalNumber(i,{unit:"day"});case"eee":return t.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(o,{width:"short",context:"formatting"});case"eeee":default:return t.day(o,{width:"wide",context:"formatting"})}},c:function(n,e,t,r){const o=n.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return mn(i,e.length);case"co":return t.ordinalNumber(i,{unit:"day"});case"ccc":return t.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(o,{width:"narrow",context:"standalone"});case"cccccc":return t.day(o,{width:"short",context:"standalone"});case"cccc":default:return t.day(o,{width:"wide",context:"standalone"})}},i:function(n,e,t){const r=n.getDay(),o=r===0?7:r;switch(e){case"i":return String(o);case"ii":return mn(o,e.length);case"io":return t.ordinalNumber(o,{unit:"day"});case"iii":return t.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(r,{width:"short",context:"formatting"});case"iiii":default:return t.day(r,{width:"wide",context:"formatting"})}},a:function(n,e,t){const o=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(n,e,t){const r=n.getHours();let o;switch(r===12?o=ul.noon:r===0?o=ul.midnight:o=r/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(n,e,t){const r=n.getHours();let o;switch(r>=17?o=ul.evening:r>=12?o=ul.afternoon:r>=4?o=ul.morning:o=ul.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(n,e,t){if(e==="ho"){let r=n.getHours()%12;return r===0&&(r=12),t.ordinalNumber(r,{unit:"hour"})}return Qa.h(n,e)},H:function(n,e,t){return e==="Ho"?t.ordinalNumber(n.getHours(),{unit:"hour"}):Qa.H(n,e)},K:function(n,e,t){const r=n.getHours()%12;return e==="Ko"?t.ordinalNumber(r,{unit:"hour"}):mn(r,e.length)},k:function(n,e,t){let r=n.getHours();return r===0&&(r=24),e==="ko"?t.ordinalNumber(r,{unit:"hour"}):mn(r,e.length)},m:function(n,e,t){return e==="mo"?t.ordinalNumber(n.getMinutes(),{unit:"minute"}):Qa.m(n,e)},s:function(n,e,t){return e==="so"?t.ordinalNumber(n.getSeconds(),{unit:"second"}):Qa.s(n,e)},S:function(n,e){return Qa.S(n,e)},X:function(n,e,t){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return Zb(r);case"XXXX":case"XX":return Ji(r);case"XXXXX":case"XXX":default:return Ji(r,":")}},x:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"x":return Zb(r);case"xxxx":case"xx":return Ji(r);case"xxxxx":case"xxx":default:return Ji(r,":")}},O:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Qb(r,":");case"OOOO":default:return"GMT"+Ji(r,":")}},z:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Qb(r,":");case"zzzz":default:return"GMT"+Ji(r,":")}},t:function(n,e,t){const r=Math.trunc(+n/1e3);return mn(r,e.length)},T:function(n,e,t){return mn(+n,e.length)}};function Qb(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),o=Math.trunc(r/60),i=r%60;return i===0?t+String(o):t+String(o)+e+mn(i,2)}function Zb(n,e){return n%60===0?(n>0?"-":"+")+mn(Math.abs(n)/60,2):Ji(n,e)}function Ji(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),o=mn(Math.trunc(r/60),2),i=mn(r%60,2);return t+o+e+i}const e2=(n,e)=>{switch(n){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},ES=(n,e)=>{switch(n){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},cL=(n,e)=>{const t=n.match(/(P+)(p+)?/)||[],r=t[1],o=t[2];if(!o)return e2(n,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",e2(r,e)).replace("{{time}}",ES(o,e))},dL={p:ES,P:cL},fL=/^D+$/,pL=/^Y+$/,hL=["D","DD","YY","YYYY"];function mL(n){return fL.test(n)}function vL(n){return pL.test(n)}function gL(n,e,t){const r=yL(n,e,t);if(console.warn(r),hL.includes(n))throw new RangeError(r)}function yL(n,e,t){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${e}\`) for formatting ${r} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const bL=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,SL=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_L=/^'([^]*?)'?$/,wL=/''/g,xL=/[a-zA-Z]/;function kL(n,e,t){var d,f,m,g,v,y,b,_;const r=Mp(),o=(t==null?void 0:t.locale)??r.locale??aL,i=(t==null?void 0:t.firstWeekContainsDate)??((f=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??r.firstWeekContainsDate??((g=(m=r.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,a=(t==null?void 0:t.weekStartsOn)??((y=(v=t==null?void 0:t.locale)==null?void 0:v.options)==null?void 0:y.weekStartsOn)??r.weekStartsOn??((_=(b=r.locale)==null?void 0:b.options)==null?void 0:_.weekStartsOn)??0,s=Vo(n,t==null?void 0:t.in);if(!OF(s))throw new RangeError("Invalid time value");let l=e.match(SL).map(w=>{const T=w[0];if(T==="p"||T==="P"){const k=dL[T];return k(w,o.formatLong)}return w}).join("").match(bL).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const T=w[0];if(T==="'")return{isToken:!1,value:CL(w)};if(Xb[T])return{isToken:!0,value:w};if(T.match(xL))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");return{isToken:!1,value:w}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(w=>{if(!w.isToken)return w.value;const T=w.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&vL(T)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&mL(T))&&gL(T,e,String(n));const k=Xb[T[0]];return k(s,T,o.localize,c)}).join("")}function CL(n){const e=n.match(_L);return e?e[1].replace(wL,"'"):n}const IL={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},EL={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},TL={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ML={date:Aa({formats:IL,defaultWidth:"full"}),time:Aa({formats:EL,defaultWidth:"full"}),dateTime:Aa({formats:TL,defaultWidth:"full"})},OL={code:"en-GB",formatDistance:_S,formatLong:ML,formatRelative:wS,localize:xS,match:CS,options:{weekStartsOn:1,firstWeekContainsDate:4}},AL={lessThanXSeconds:{one:{standalone:"мање од 1 секунде",withPrepositionAgo:"мање од 1 секунде",withPrepositionIn:"мање од 1 секунду"},dual:"мање од {{count}} секунде",other:"мање од {{count}} секунди"},xSeconds:{one:{standalone:"1 секунда",withPrepositionAgo:"1 секунде",withPrepositionIn:"1 секунду"},dual:"{{count}} секунде",other:"{{count}} секунди"},halfAMinute:"пола минуте",lessThanXMinutes:{one:{standalone:"мање од 1 минуте",withPrepositionAgo:"мање од 1 минуте",withPrepositionIn:"мање од 1 минуту"},dual:"мање од {{count}} минуте",other:"мање од {{count}} минута"},xMinutes:{one:{standalone:"1 минута",withPrepositionAgo:"1 минуте",withPrepositionIn:"1 минуту"},dual:"{{count}} минуте",other:"{{count}} минута"},aboutXHours:{one:{standalone:"око 1 сат",withPrepositionAgo:"око 1 сат",withPrepositionIn:"око 1 сат"},dual:"око {{count}} сата",other:"око {{count}} сати"},xHours:{one:{standalone:"1 сат",withPrepositionAgo:"1 сат",withPrepositionIn:"1 сат"},dual:"{{count}} сата",other:"{{count}} сати"},xDays:{one:{standalone:"1 дан",withPrepositionAgo:"1 дан",withPrepositionIn:"1 дан"},dual:"{{count}} дана",other:"{{count}} дана"},aboutXWeeks:{one:{standalone:"око 1 недељу",withPrepositionAgo:"око 1 недељу",withPrepositionIn:"око 1 недељу"},dual:"око {{count}} недеље",other:"око {{count}} недеље"},xWeeks:{one:{standalone:"1 недељу",withPrepositionAgo:"1 недељу",withPrepositionIn:"1 недељу"},dual:"{{count}} недеље",other:"{{count}} недеље"},aboutXMonths:{one:{standalone:"око 1 месец",withPrepositionAgo:"око 1 месец",withPrepositionIn:"око 1 месец"},dual:"око {{count}} месеца",other:"око {{count}} месеци"},xMonths:{one:{standalone:"1 месец",withPrepositionAgo:"1 месец",withPrepositionIn:"1 месец"},dual:"{{count}} месеца",other:"{{count}} месеци"},aboutXYears:{one:{standalone:"око 1 годину",withPrepositionAgo:"око 1 годину",withPrepositionIn:"око 1 годину"},dual:"око {{count}} године",other:"око {{count}} година"},xYears:{one:{standalone:"1 година",withPrepositionAgo:"1 године",withPrepositionIn:"1 годину"},dual:"{{count}} године",other:"{{count}} година"},overXYears:{one:{standalone:"преко 1 годину",withPrepositionAgo:"преко 1 годину",withPrepositionIn:"преко 1 годину"},dual:"преко {{count}} године",other:"преко {{count}} година"},almostXYears:{one:{standalone:"готово 1 годину",withPrepositionAgo:"готово 1 годину",withPrepositionIn:"готово 1 годину"},dual:"готово {{count}} године",other:"готово {{count}} година"}},PL=(n,e,t)=>{let r;const o=AL[n];return typeof o=="string"?r=o:e===1?t!=null&&t.addSuffix?t.comparison&&t.comparison>0?r=o.one.withPrepositionIn:r=o.one.withPrepositionAgo:r=o.one.standalone:e%10>1&&e%10<5&&String(e).substr(-2,1)!=="1"?r=o.dual.replace("{{count}}",String(e)):r=o.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"за "+r:"пре "+r:r},$L={full:"EEEE, d. MMMM yyyy.",long:"d. MMMM yyyy.",medium:"d. MMM yy.",short:"dd. MM. yy."},RL={full:"HH:mm:ss (zzzz)",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},DL={full:"{{date}} 'у' {{time}}",long:"{{date}} 'у' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},NL={date:Aa({formats:$L,defaultWidth:"full"}),time:Aa({formats:RL,defaultWidth:"full"}),dateTime:Aa({formats:DL,defaultWidth:"full"})},FL={lastWeek:n=>{switch(n.getDay()){case 0:return"'прошле недеље у' p";case 3:return"'прошле среде у' p";case 6:return"'прошле суботе у' p";default:return"'прошли' EEEE 'у' p"}},yesterday:"'јуче у' p",today:"'данас у' p",tomorrow:"'сутра у' p",nextWeek:n=>{switch(n.getDay()){case 0:return"'следеће недеље у' p";case 3:return"'следећу среду у' p";case 6:return"'следећу суботу у' p";default:return"'следећи' EEEE 'у' p"}},other:"P"},LL=(n,e,t,r)=>{const o=FL[n];return typeof o=="function"?o(e):o},BL={narrow:["пр.н.е.","АД"],abbreviated:["пр. Хр.","по. Хр."],wide:["Пре Христа","После Христа"]},VL={narrow:["1.","2.","3.","4."],abbreviated:["1. кв.","2. кв.","3. кв.","4. кв."],wide:["1. квартал","2. квартал","3. квартал","4. квартал"]},zL={narrow:["1.","2.","3.","4.","5.","6.","7.","8.","9.","10.","11.","12."],abbreviated:["јан","феб","мар","апр","мај","јун","јул","авг","сеп","окт","нов","дец"],wide:["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар"]},HL={narrow:["1.","2.","3.","4.","5.","6.","7.","8.","9.","10.","11.","12."],abbreviated:["јан","феб","мар","апр","мај","јун","јул","авг","сеп","окт","нов","дец"],wide:["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар"]},UL={narrow:["Н","П","У","С","Ч","П","С"],short:["нед","пон","уто","сре","чет","пет","суб"],abbreviated:["нед","пон","уто","сре","чет","пет","суб"],wide:["недеља","понедељак","уторак","среда","четвртак","петак","субота"]},WL={narrow:{am:"АМ",pm:"ПМ",midnight:"поноћ",noon:"подне",morning:"ујутру",afternoon:"поподне",evening:"увече",night:"ноћу"},abbreviated:{am:"АМ",pm:"ПМ",midnight:"поноћ",noon:"подне",morning:"ујутру",afternoon:"поподне",evening:"увече",night:"ноћу"},wide:{am:"AM",pm:"PM",midnight:"поноћ",noon:"подне",morning:"ујутру",afternoon:"после подне",evening:"увече",night:"ноћу"}},jL={narrow:{am:"AM",pm:"PM",midnight:"поноћ",noon:"подне",morning:"ујутру",afternoon:"поподне",evening:"увече",night:"ноћу"},abbreviated:{am:"AM",pm:"PM",midnight:"поноћ",noon:"подне",morning:"ујутру",afternoon:"поподне",evening:"увече",night:"ноћу"},wide:{am:"AM",pm:"PM",midnight:"поноћ",noon:"подне",morning:"ујутру",afternoon:"после подне",evening:"увече",night:"ноћу"}},KL=(n,e)=>Number(n)+".",YL={ordinalNumber:KL,era:Yo({values:BL,defaultWidth:"wide"}),quarter:Yo({values:VL,defaultWidth:"wide",argumentCallback:n=>n-1}),month:Yo({values:zL,defaultWidth:"wide",formattingValues:HL,defaultFormattingWidth:"wide"}),day:Yo({values:UL,defaultWidth:"wide"}),dayPeriod:Yo({values:jL,defaultWidth:"wide",formattingValues:WL,defaultFormattingWidth:"wide"})},qL=/^(\d+)\./i,GL=/\d+/i,JL={narrow:/^(пр\.н\.е\.|АД)/i,abbreviated:/^(пр\.\s?Хр\.|по\.\s?Хр\.)/i,wide:/^(Пре Христа|пре нове ере|После Христа|нова ера)/i},XL={any:[/^пр/i,/^(по|нова)/i]},QL={narrow:/^[1234]/i,abbreviated:/^[1234]\.\s?кв\.?/i,wide:/^[1234]\. квартал/i},ZL={any:[/1/i,/2/i,/3/i,/4/i]},eB={narrow:/^(10|11|12|[123456789])\./i,abbreviated:/^(јан|феб|мар|апр|мај|јун|јул|авг|сеп|окт|нов|дец)/i,wide:/^((јануар|јануара)|(фебруар|фебруара)|(март|марта)|(април|априла)|(мја|маја)|(јун|јуна)|(јул|јула)|(август|августа)|(септембар|септембра)|(октобар|октобра)|(новембар|новембра)|(децембар|децембра))/i},tB={narrow:[/^1/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^7/i,/^8/i,/^9/i,/^10/i,/^11/i,/^12/i],any:[/^ја/i,/^ф/i,/^мар/i,/^ап/i,/^мај/i,/^јун/i,/^јул/i,/^авг/i,/^с/i,/^о/i,/^н/i,/^д/i]},nB={narrow:/^[пусчн]/i,short:/^(нед|пон|уто|сре|чет|пет|суб)/i,abbreviated:/^(нед|пон|уто|сре|чет|пет|суб)/i,wide:/^(недеља|понедељак|уторак|среда|четвртак|петак|субота)/i},rB={narrow:[/^п/i,/^у/i,/^с/i,/^ч/i,/^п/i,/^с/i,/^н/i],any:[/^нед/i,/^пон/i,/^уто/i,/^сре/i,/^чет/i,/^пет/i,/^суб/i]},oB={any:/^(ам|пм|поноћ|(по)?подне|увече|ноћу|после подне|ујутру)/i},aB={any:{am:/^a/i,pm:/^p/i,midnight:/^поно/i,noon:/^под/i,morning:/ујутру/i,afternoon:/(после\s|по)+подне/i,evening:/(увече)/i,night:/(ноћу)/i}},iB={ordinalNumber:kS({matchPattern:qL,parsePattern:GL,valueCallback:n=>parseInt(n,10)}),era:qo({matchPatterns:JL,defaultMatchWidth:"wide",parsePatterns:XL,defaultParseWidth:"any"}),quarter:qo({matchPatterns:QL,defaultMatchWidth:"wide",parsePatterns:ZL,defaultParseWidth:"any",valueCallback:n=>n+1}),month:qo({matchPatterns:eB,defaultMatchWidth:"wide",parsePatterns:tB,defaultParseWidth:"any"}),day:qo({matchPatterns:nB,defaultMatchWidth:"wide",parsePatterns:rB,defaultParseWidth:"any"}),dayPeriod:qo({matchPatterns:oB,defaultMatchWidth:"any",parsePatterns:aB,defaultParseWidth:"any"})},sB={code:"sr",formatDistance:PL,formatLong:NL,formatRelative:LL,localize:YL,match:iB,options:{weekStartsOn:1,firstWeekContainsDate:1}};function TS(n,e="dateFns"){const t={Y:{dayjs:"YYYY",dateFns:"yyyy"},y:{dayjs:"YY",dateFns:"yy"},F:{all:"MMMM"},M:{dayjs:"MMM",dateFns:"MMM"},m:{all:"MM"},n:{all:"M"},d:{dayjs:"DD",dateFns:"dd"},j:{dayjs:"D",dateFns:"d"},D:{dayjs:"ddd",dateFns:"eee"},l:{dayjs:"dddd",dateFns:"eeee"}};return n.replace(/\b[a-zA-Z]\b/g,r=>{const o=t[r];return(o==null?void 0:o[e])||(o==null?void 0:o.all)||r})}function lB(n){var i,a;if(!n||typeof n=="boolean")return"";let e;if(typeof n=="string"){if(n.trim()===""||(e=new Date(n),isNaN(e.getTime())))return""}else if(typeof n=="number"){if(n===0||(e=new Date(n),isNaN(e.getTime())))return""}else if(n instanceof Date){if(e=n,isNaN(e.getTime()))return""}else return"";const t=((i=window.wpIvyDateFormat)==null?void 0:i.dateFormat)||"dd MMM yyyy",r=((a=window.wpIvyDateFormat)==null?void 0:a.locale)==="sr_RS"?sB:OL,o=TS(t,"dateFns");try{return kL(e,o,{locale:r})}catch{return""}}function uB(n){return Array.isArray(n)?n.map(e=>typeof e=="string"||typeof e=="number"||e instanceof Date||Qe.isDayjs(e)?Qe(e).format("YYYY-MM-DD"):null).filter(Boolean):typeof n=="string"||typeof n=="number"||n instanceof Date||Qe.isDayjs(n)?[Qe(n).format("YYYY-MM-DD")]:[]}const $o={formatWPDate:lB,convertWPFormat:TS,formatDateRangeForApi:uB},cB=Vl("ivyformsTemplate",()=>{const n=H([]),e=H({}),t=H(!1),r=H(null),{getLabel:o}=at(),{request:i}=zl();return{templates:n,categories:e,isLoading:t,error:r,fetchTemplates:async()=>{t.value=!0,r.value=null;try{const{data:_,error:w}=await i("templates",{method:"GET"});if(w)throw new Error(w);if(_.data.success)n.value=Object.values(_.data.data.templates),e.value=_.data.data.categories;else throw new Error(o("failed_to_fetch_template"))}catch(_){throw r.value=_ instanceof Error?_.message:o("failed_to_fetch_template"),console.error(o("template_fetch_error"),_),_t({message:`${o("failed_to_fetch_template")} ${r.value}`,type:"error"}),_}finally{t.value=!1}},getTemplate:async _=>{try{const{data:w,error:T}=await i(`template/${_}`,{method:"GET"});if(T)throw new Error(T);if(w.data.success)return w.data.data;throw new Error(o("failed_to_fetch_template"))}catch(w){return r.value=w instanceof Error?w.message:o("failed_to_fetch_template"),console.error(o("template_fetch_error"),w),_t({message:`${o("failed_to_fetch_template")} ${r.value}`,type:"error"}),null}},getTemplatesByCategory:_=>n.value.filter(w=>w.category===_),searchTemplates:_=>{if(!_.trim())return n.value;const w=_.toLowerCase();return n.value.filter(T=>T.name.toLowerCase().includes(w)||T.description.toLowerCase().includes(w))},clearError:()=>{r.value=null},resetStore:()=>{n.value=[],e.value={},t.value=!1,r.value=null},getTemplateById:_=>n.value.find(w=>w.id===_),getAvailableCategories:()=>Object.values(e.value),getTemplatesCount:()=>n.value.length,getProTemplatesCount:()=>n.value.filter(_=>_.is_pro).length,getFreeTemplatesCount:()=>n.value.filter(_=>!_.is_pro).length}}),dB=["aria-labelledby"],fB=["aria-labelledby"],pB=he({__name:"IvyModal",props:{visible:{type:Boolean},title:{default:""},width:{default:""},maxWidth:{default:"1300px"},showCloseButton:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},closeOnOverlayClick:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},teleport:{type:Boolean,default:!0}},emits:["update:visible","close","open"],setup(n,{emit:e}){const t=n,r=e,o=O({get:()=>t.visible,set:f=>r("update:visible",f)}),i=O(()=>({width:typeof t.width=="number"?`${t.width}px`:t.width,maxWidth:typeof t.maxWidth=="number"?`${t.maxWidth}px`:t.maxWidth})),a=()=>{o.value=!1,r("close")},s=()=>{t.closeOnOverlayClick&&a()},l=f=>{f.key==="Escape"&&t.closeOnEscape&&o.value&&a()},c=()=>{document.body.style.overflow="hidden"},d=()=>{document.body.style.overflow=""};return Ht(()=>{document.addEventListener("keydown",l)}),xs(()=>{document.removeEventListener("keydown",l),d()}),Me(o,f=>{f?(c(),r("open")):d()}),(f,m)=>f.teleport?(C(),se(nE,{key:0,to:"body"},[I(Ml,{name:"ivyforms-modal"},{default:V(()=>[o.value?(C(),F("div",{key:0,class:ee(["ivyforms-modal-overlay",{"ivyforms-modal-local":!f.teleport}]),onClick:lt(s,["self"])},[z("div",{class:"ivyforms-modal-container",style:Sn(i.value),role:"dialog","aria-modal":"true","aria-labelledby":f.title?"ivyforms-modal-title":void 0},[xe(f.$slots,"default",{},void 0,!0)],12,dB)],2)):ie("",!0)]),_:3})])):(C(),se(Ml,{key:1,name:"ivyforms-modal"},{default:V(()=>[o.value?(C(),F("div",{key:0,class:"ivyforms-modal-overlay ivyforms-modal-local",onClick:lt(s,["self"])},[z("div",{class:"ivyforms-modal-container",style:Sn(i.value),role:"dialog","aria-modal":"true","aria-labelledby":f.title?"ivyforms-modal-title":void 0},[xe(f.$slots,"default",{},void 0,!0)],12,fB)])):ie("",!0)]),_:3}))}}),hB=bt(pB,[["__scopeId","data-v-f8c8b308"]]),mB={class:"ivyforms-card"},vB={class:"ivyforms-card__header"},gB={class:"ivyforms-card__image-wrapper"},yB=["src"],bB={key:1,class:"ivyforms-card__image-placeholder"},SB={class:"ivyforms-card__footer"},_B={class:"ivyforms-card__title"},wB={class:"ivyforms-card__desc"},xB=he({__name:"IvyCard",props:{title:{},description:{},image:{},starred:{type:Boolean}},setup(n){const e=n;return(t,r)=>(C(),F("div",mB,[z("div",vB,[xe(t.$slots,"header",{},()=>[z("div",gB,[e.image?(C(),F("img",{key:0,src:e.image,alt:"Card image",class:"ivyforms-card__image"},null,8,yB)):(C(),F("div",bB))])],!0)]),z("div",SB,[xe(t.$slots,"footer",{},()=>[z("div",_B,ae(e.title),1),z("div",wB,ae(e.description),1)],!0)])]))}}),t2=bt(xB,[["__scopeId","data-v-bf3e9d40"]]),kB={key:0,class:"add-form-page ivyforms-flex ivyforms-flex-direction-column ivyforms-p-0"},CB={class:"ivyforms-header ivyforms-flex ivyforms-align-items-center ivyforms-justify-content-between ivyforms-p-24 ivyforms-mb-0"},IB={class:"ivyforms-close ivyforms-flex ivyforms-align-items-center ivyforms-justify-content-center"},EB={class:"ivyforms-options ivyforms-flex ivyforms-gap-16 ivyforms-mb-0 ivyforms-px-24"},TB={class:"ivyforms-option-icon ivyforms-mr-16"},MB={class:"ivyforms-option-title ivyforms-mb-4 ivyforms-gap-8"},OB={class:"ivyforms-option-desc"},AB={class:"ivyforms-option ivyforms-flex ivyforms-option-disabled ivyforms-justify-content-center ivyforms-align-items-center ivyforms-p-24 ivyforms-gap-16"},PB={class:"ivyforms-option-icon ivyforms-flex ivyforms-mr-16"},$B={class:"ivyforms-icon-bg disabled"},RB={class:"ivyforms-option-title ivyforms-flex ivyforms-align-items-center ivyforms-mb-4 ivyforms-gap-8"},DB={class:"ivyforms-option-desc"},NB={class:"ivyforms-templates-section ivyforms-flex ivyforms-flex-direction-column ivyforms-gap-24 ivyforms-p-24"},FB={class:"ivyforms-templates-labels ivyforms-flex ivyforms-flex-direction-column ivyforms-align-items-start ivyforms-gap-8"},LB={class:"ivyforms-select-label ivyforms-m-0"},BB={class:"ivyforms-select-desc ivyforms-m-0"},VB={class:"ivyforms-search ivyforms-m-0"},zB={class:"ivyforms-card-grid ivyforms-flex ivyforms-flex-direction-column ivyforms-gap-16 ivyforms-mt-0"},HB={class:"ivyforms-image-wrapper ivyforms-flex ivyforms-p-0 ivyforms-m-0"},UB=["src","alt"],WB={class:"ivyforms-card-actions-overlay ivyforms-flex ivyforms-flex-direction-column ivyforms-justify-content-center ivyforms-align-items-center ivyforms-m-0 ivyforms-p-0"},jB={class:"ivyforms-overlay-buttons ivyforms-flex ivyforms-flex-direction-column ivyforms-justify-content-center ivyforms-align-items-center ivyforms-gap-8"},KB={class:"ivyforms-card-footer-labels ivyforms-flex ivyforms-flex-direction-column ivyforms-gap-4 ivyforms-align-items-start"},YB={class:"ivyforms-card__title ivyforms-flex ivyforms-align-items-center ivyforms-px-16 ivyforms-mt-16 ivyforms-mb-4 ivyforms-gap-8"},qB={key:0,class:"ivyforms-flash"},GB={class:"ivyforms-card__desc ivyforms-px-16 ivyforms-mb-16 ivyforms-mt-0"},JB={key:2,class:"ivyforms-empty-state ivyforms-flex ivyforms-flex-direction-column ivyforms-align-items-center ivyforms-justify-content-center ivyforms-py-24 ivyforms-px-24"},XB={class:"ivyforms-empty-icon ivyforms-mb-16"},QB={class:"ivyforms-mb-8 ivyforms-m-0"},ZB={class:"ivyforms-m-0"},eV={key:1,class:"preview-form-page ivyforms-p-16"},tV={class:"ivyforms-preview-header ivyforms-flex ivyforms-justify-content-between ivyforms-align-items-center ivyforms-gap-16 ivyforms-mb-24"},nV={class:"ivyforms-preview-header-left ivyforms-flex ivyforms-align-items-center ivyforms-gap-12"},rV={class:"ivyforms-template-info ivyforms-flex ivyforms-flex-direction-column"},oV={key:0,class:"ivyforms-flash"},aV={class:"ivyforms-preview-header-right ivyforms-flex ivyforms-align-items-center ivyforms-gap-8"},iV={class:"ivyforms-preview-form ivyforms-p-16"},sV={class:"ivyforms-form-container"},lV={class:"ivyforms-mb-16"},uV={class:"ivyforms-mb-24"},cV={key:0,class:"ivyforms-loading-fields"},dV=he({__name:"IvyFormsTemplateSelection",props:{visible:{type:Boolean},sourcePageType:{default:"newForm"}},emits:["update:visible","form-created","close"],setup(n,{emit:e}){const{redirectToWordPressAdminPage:t,getHashRedirectLink:r}=oa(),o=n,i=e,a=cB(),s=zt(),l=aa(),{getLabel:c}=at(),d=O({get:()=>o.visible,set:Z=>i("update:visible",Z)}),f=H(""),m=H(!1),g=H(!1),v=H(null),y=H(!1),b=H(null),_=H(0),w=H("desktop"),T=H(!1),k=H(null),x=H("scratch"),M=H([{name:"desktop",label:"",iconConfig:{name:"desktop",type:"outline",size:"d",category:"global"}},{name:"tablet",label:"",iconConfig:{name:"tablet",type:"outline",size:"d",category:"global"}},{name:"mobile",label:"",iconConfig:{name:"mobile",type:"outline",size:"d",category:"global"}}]),D=O(()=>{if(!f.value)return a.templates;const Z=f.value.toLowerCase();return a.templates.filter(q=>q.name.toLowerCase().includes(Z)||q.description.toLowerCase().includes(Z))}),A=O(()=>{const Z=D.value,q=[];for(let le=0;le<Z.length;le+=3)q.push(Z.slice(le,le+3));return q}),P=O(()=>{const Z=a.templates.length>0?a.templates.length:6,q=Array.from({length:Z},(ye,Re)=>({id:`skeleton-${Re}`})),le=[];for(let ye=0;ye<q.length;ye+=3)le.push(q.slice(ye,ye+3));return le}),$=O(()=>_.value>0),B=O(()=>_.value<D.value.length-1),j=async()=>{m.value=!0;try{await a.fetchTemplates()}catch(Z){console.error(c("failed_to_tab_form"),Z)}finally{m.value=!1}},U=async()=>{if(!g.value){g.value=!0,v.value="blank_form";try{await s.resetForm(),await s.saveForm({template_id:"blank_form"}),s.name&&l.setPageTitle(s.name),s.formId&&i("form-created",parseInt(s.formId)),s.formId&&(o.sourcePageType==="allForms"&&window.history.replaceState({fromAllForms:!0},"",r(xi,"/")),t(Cr,`/manage/${s.formId}`)),d.value=!1}catch(Z){console.error(c("failed_to_create_form"),Z)}finally{g.value=!1,v.value=null}}},G=async Z=>{if(b.value=Z,y.value=!0,_.value=D.value.findIndex(q=>q.id===Z.id),!Z.form_data||!Z.form_data.fields||Z.form_data.fields.length===0){T.value=!0;try{const q=await a.getTemplate(Z.id);if(q){const le={...q,form_data:{...q.form_data,published:!!q.form_data.published}};b.value=le,k.value=le.form_data}}catch(q){console.error(c("failed_to_tab_form"),q)}finally{T.value=!1}}else{const q={...Z.form_data,published:!!Z.form_data.published};k.value=q}},N=Z=>{switch(Z){case"text":return Z0;case"email":return iE;case"textarea":case"paragraph":return aE;case"tel":case"phone":return oE;case"number":return rE;default:return Z0}},R=async Z=>{if(!g.value){g.value=!0,v.value=Z.id;try{await s.resetForm();let q=Z;if(!Z.form_data||!Z.form_data.fields||Z.form_data.fields.length===0)try{const le=await a.getTemplate(Z.id);le&&(q={...le,form_data:{...le.form_data,published:!!le.form_data.published}})}catch(le){console.error("Failed to fetch full template data:",le)}q.form_data&&(s.name=q.form_data.name||q.name,s.description=q.form_data.description||q.description,s.showTitle=q.form_data.showTitle??!0,s.showDescription=q.form_data.showDescription??!1,s.published=q.form_data.published??!1,q.form_data.fields&&q.form_data.fields.length>0&&(s.counterFields=0,s.fields=[],q.form_data.fields.forEach((le,ye)=>{const Re=s.increaseCounter();s.addField({id:0,fieldIndex:Re,type:le.type,label:le.label,defaultValue:le.defaultValue||"",required:le.required||!1,placeholder:le.placeholder||"",position:ye+1})}))),await s.saveForm({template_id:Z.id}),s.name&&l.setPageTitle(s.name),s.formId&&(o.sourcePageType==="allForms"&&window.history.replaceState({fromAllForms:!0},"",r(xi,"/")),t(Cr,`/manage/${s.formId}`),i("form-created",parseInt(s.formId))),d.value=!1}catch(q){console.error(c("failed_to_create_form"),q)}finally{g.value=!1,v.value=null}}},X=()=>{g.value=!1,v.value=null,d.value=!1,f.value="",b.value=null,y.value=!1,_.value=0,w.value="desktop",i("close")};Me(d,Z=>{Z&&a.templates.length===0&&j()});const te=async()=>{if($.value){_.value--;const Z=D.value[_.value];if(b.value=Z,!Z.form_data||!Z.form_data.fields||Z.form_data.fields.length===0){T.value=!0;try{const q=await a.getTemplate(Z.id);if(q){const le={...q,form_data:{...q.form_data,published:!!q.form_data.published}};b.value=le,k.value=le.form_data}}catch(q){console.error(c("failed_to_tab_form"),q)}finally{T.value=!1}}else{const q={...Z.form_data,published:!!Z.form_data.published};k.value=q}}},Y=async()=>{if(B.value){_.value++;const Z=D.value[_.value];if(b.value=Z,!Z.form_data||!Z.form_data.fields||Z.form_data.fields.length===0){T.value=!0;try{const q=await a.getTemplate(Z.id);if(q){const le={...q,form_data:{...q.form_data,published:!!q.form_data.published}};b.value=le,k.value=le.form_data}}catch(q){console.error(c("failed_to_tab_form"),q)}finally{T.value=!1}}else{const q={...Z.form_data,published:!!Z.form_data.published};k.value=q}}},re=()=>{y.value=!1,b.value=null,_.value=0,k.value=null,T.value=!1},Q=Z=>{g.value||(x.value=Z,U())};return(Z,q)=>(C(),se(hB,{visible:d.value,"onUpdate:visible":q[4]||(q[4]=le=>d.value=le),teleport:!0,onClose:X},{default:V(()=>{var le,ye,Re,ze,nt;return[y.value?(C(),F("div",eV,[z("div",tV,[z("div",nV,[I(it,{priority:"tertiary","icon-start":"chevron-left","icon-start-category":"arrows","icon-start-type":"outline",onClick:re},{default:V(()=>[De(ae(h(c)("back")),1)]),_:1}),z("div",rV,[z("h3",null,ae((le=b.value)==null?void 0:le.name),1),(ye=b.value)!=null&&ye.is_pro?(C(),F("span",oV,"⚡")):ie("",!0)])]),z("div",aV,[I(it,{priority:"tertiary","icon-start":"arrow-left","icon-start-category":"arrows","icon-start-type":"fill",disabled:!$.value,onClick:te},null,8,["disabled"]),I(it,{priority:"tertiary","icon-start":"arrow-right","icon-start-category":"arrows","icon-start-type":"fill",disabled:!B.value,onClick:Y},null,8,["disabled"]),I(Us,{modelValue:w.value,"onUpdate:modelValue":q[2]||(q[2]=Ge=>w.value=Ge),background:"",tabs:M.value,type:"tonal",priority:"tertiary",size:"d",class:"ivyforms-device-tabs ivyforms-flex ivyforms-align-items-center ivyforms-gap-4"},null,8,["modelValue","tabs"]),I(it,{priority:"primary",loading:g.value,onClick:q[3]||(q[3]=Ge=>R(b.value))},{default:V(()=>[g.value?ie("",!0):(C(),F($e,{key:0},[De(ae(h(c)("use_this_template")),1)],64))]),_:1},8,["loading"])])]),z("div",{class:ee(["ivyforms-preview-content",`device-${w.value}`])},[z("div",iV,[z("div",sV,[z("h2",lV,ae((Re=b.value)==null?void 0:Re.name),1),z("p",uV,ae((ze=b.value)==null?void 0:ze.description),1),T.value?(C(),F("div",cV,q[7]||(q[7]=[z("div",{class:"ivyforms-loading-message"},"Loading template fields...",-1)]))):(nt=k.value)!=null&&nt.fields&&k.value.fields.length>0?(C(!0),F($e,{key:1},ot(k.value.fields,(Ge,mt)=>(C(),se(dn(N(Ge.type)),{key:Ge.id||mt,modelValue:Ge.value,"onUpdate:modelValue":ut=>Ge.value=ut,field:{...Ge,formId:0,fieldIndex:mt,id:parseInt(Ge.id)||0,position:mt,label:Ge.label||"",defaultValue:Ge.defaultValue||"",required:!1,placeholder:Ge.placeholder||"",value:Ge.value||""},class:"ivyforms-form-field ivyforms-mb-16"},null,8,["modelValue","onUpdate:modelValue","field"]))),128)):ie("",!0),I(it,{class:"ivyforms-submit-btn ivyforms-p-10",priority:"tertiary",type:"border"},{default:V(()=>[De(ae(h(c)("submit")),1)]),_:1})])])],2)])):(C(),F("div",kB,[z("div",CB,[z("span",null,ae(h(c)("add_new_form")),1),z("div",IB,[I(rn,{priority:"tertiary",name:"close",type:"outline",size:"s",category:"global",color:"var(--map-base-dusk-symbol-2)",onClick:X})])]),z("div",EB,[z("div",{class:ee(["ivyforms-option ivyforms-flex ivyforms-justify-content-center ivyforms-align-items-center ivyforms-p-24 ivyforms-gap-16",{active:x.value==="scratch","ivyforms-option-disabled":g.value&&v.value==="blank_form"}]),onClick:q[0]||(q[0]=Ge=>Q("scratch"))},[z("div",TB,[z("div",{class:ee(["ivyforms-icon-bg",{active:x.value==="scratch",loading:g.value&&v.value==="blank_form"}])},[g.value&&v.value==="blank_form"?(C(),se(rn,{key:1,name:"loader",size:"d",category:"global",type:"outline",color:"var(--map-base-purple-symbol-0)",class:"ivyforms-loading-icon"})):(C(),se(rn,{key:0,name:"plus-circle",size:"d",category:"global",type:"fill-duo",color:"var(--map-base-purple-symbol-0)"}))],2)]),z("div",null,[z("div",MB,ae(g.value&&v.value==="blank_form"?"":h(c)("start_scratch")),1),z("div",OB,ae(h(c)("start_with_blank_desc")),1)])],2),z("div",AB,[z("div",PB,[z("div",$B,[I(rn,{name:"generate-ai",type:"outline",size:"d",category:"templates",color:"var(--map-base-dusk-symbol-2)"})])]),z("div",null,[z("div",RB,[De(ae(h(c)("generate_with_ai"))+" ",1),I(Ns,{image:"coming-soon-arrow-text",size:"s"})]),z("div",DB,ae(h(c)("generate_with_ai_desc")),1)])])]),z("div",NB,[z("div",FB,[z("div",LB,ae(h(c)("select_a_template")),1),z("div",BB,ae(h(c)("select_template_desc")),1)]),z("div",VB,[I(Ws,{modelValue:f.value,"onUpdate:modelValue":q[1]||(q[1]=Ge=>f.value=Ge),placeholder:h(c)("search_template"),"should-collapse-on-mobile":!1},null,8,["modelValue","placeholder"])]),z("div",zB,[m.value?(C(!0),F($e,{key:0},ot(P.value,(Ge,mt)=>(C(),F("div",{key:`loading-row-${mt}`,class:"ivyforms-card-row ivyforms-flex ivyforms-gap-16"},[(C(!0),F($e,null,ot(Ge,(ut,Pt)=>(C(),F("div",{key:`loading-${mt}-${Pt}`,class:"ivyforms-card-container"},[I(t2,{title:"",description:"",starred:!1,class:"ivyforms-card ivyforms-gap-0 ivyforms-pb-0"},{header:V(()=>q[5]||(q[5]=[z("div",{class:"ivyforms-image-wrapper ivyforms-flex ivyforms-p-0 ivyforms-m-0"},[z("div",{class:"ivyforms-skeleton-image-placeholder ivyforms-flex ivyforms-flex-direction-column ivyforms-p-10 ivyforms-justify-content-center"},[z("div",{class:"skeleton-bar skeleton-bar-1"}),z("div",{class:"skeleton-bar skeleton-bar-2"}),z("div",{class:"skeleton-bar skeleton-bar-3"}),z("div",{class:"skeleton-row ivyforms-flex ivyforms-gap-12 ivyforms-mt-8"},[z("div",{class:"skeleton-pill"}),z("div",{class:"skeleton-pill"})])])],-1)])),footer:V(()=>q[6]||(q[6]=[z("div",{class:"ivyforms-card-footer-labels ivyforms-flex ivyforms-flex-direction-column ivyforms-gap-4 ivyforms-align-items-start"},[z("div",{class:"ivyforms-empty-title ivyforms-px-16 ivyforms-mt-16 ivyforms-mb-4"}),z("div",{class:"ivyforms-empty-desc ivyforms-px-16 ivyforms-mb-16 ivyforms-mt-0"})],-1)])),_:1})]))),128))]))),128)):(C(!0),F($e,{key:1},ot(A.value,(Ge,mt)=>(C(),F("div",{key:mt,class:"ivyforms-card-row ivyforms-flex ivyforms-gap-16"},[(C(!0),F($e,null,ot(Ge,ut=>(C(),F("div",{key:ut.id,class:"ivyforms-card-container"},[I(t2,{title:ut.name,description:ut.description,starred:!1,class:"ivyforms-card ivyforms-gap-0 ivyforms-pb-0"},{header:V(()=>[z("div",HB,[z("img",{src:ut.screenshot,alt:ut.name,class:"ivyforms-image ivyforms-m-0 ivyforms-p-0"},null,8,UB),z("div",WB,[z("div",jB,[I(it,{priority:"tertiary",onClick:Pt=>G(ut)},{default:V(()=>[De(ae(h(c)("preview")),1)]),_:2},1032,["onClick"]),I(it,{priority:"primary",loading:g.value&&v.value===ut.id,onClick:Pt=>R(ut)},{default:V(()=>[g.value?ie("",!0):(C(),F($e,{key:0},[De(ae(h(c)("use_this_template")),1)],64))]),_:2},1032,["loading","onClick"])])])])]),footer:V(()=>[z("div",KB,[z("div",YB,[De(ae(ut.name)+" ",1),ut.is_pro?(C(),F("span",qB)):ie("",!0)]),z("div",GB,ae(ut.description),1)])]),_:2},1032,["title","description"])]))),128))]))),128)),!m.value&&D.value.length===0?(C(),F("div",JB,[z("div",XB,[I(rn,{name:"search",type:"outline",size:"d",category:"global"})]),z("h4",QB,ae(h(c)("no_templates_found")),1),z("p",ZB,ae(h(c)("try_adjusting_criteria")),1)])):ie("",!0)])])]))]}),_:1},8,["visible"]))}}),MS=bt(dV,[["__scopeId","data-v-7b592f32"]]),fV={class:"all-forms ivyforms-flex ivyforms-flex-1 ivyforms-flex-direction-column ivyforms-p-4 ivyforms-gap-24"},pV={class:"ivyforms-all-forms-option-bar"},hV={class:"ivyforms-all-forms-option-bar__left"},mV={class:"ivyforms-all-forms-option-bar__right"},vV={class:"ivyforms-all-forms-table"},gV={key:0,class:"ivyforms-table-skeleton"},yV={class:"ivyforms-all-forms-pagination-container"},bV=he({__name:"AllForms",setup(n){Va();const e=hc(),{getLabel:t}=at(),r=Vs(),o=Tp(),{getHashRedirectLink:i,redirectToWordPressAdminPage:a}=oa(),s=H(),l=H(0),c=H(null),d=H(null),f=H(!1),m=H([]),g=H([]),v=H(0),y=H(null),b=H(!1),_=H(!0),w=H(!1),T=H(!1),k=H({}),x=H(null),M=H(""),D=H(""),A=H(!1),P=Al.debounce(pe=>{D.value=pe},500),$=Tn({starred:null,published:null}),B=Tn({page:1,perPage:10}),j=Tn({column:"id",order:"desc"}),U=Tn({publishedTrueCount:0,publishedFalseCount:0,starredTrueCount:0,starredFalseCount:0}),G=Na(),N=()=>Fe(pn,{modelValue:mt.value,size:"s",type:"checkmark",ariaLabel:t("select_all_forms"),"onUpdate:modelValue":pe=>$t(pe)},()=>[]),R=({rowData:pe})=>pe?Fe(pn,{modelValue:pe.selected,type:"checkmark",size:"s",ariaLabel:t("select_form_header"),"onUpdate:modelValue":Ae=>pe.selected=Ae},()=>[]):null,X=({rowData:pe})=>pe?Fe(fs,{size:"s",href:i(Cr,`/manage/${pe.id}`)},()=>[pe.id]):null,te=({rowData:pe})=>pe?Fe(fs,{size:"s",href:i(Cr,`/manage/${pe.id}`),class:"ivyforms-name-cell"},()=>[pe.name]):null,Y=({rowData:pe})=>pe?Fe(rn,{name:pe.starred?"star-2":"star",type:"fill",size:"d",color:pe.starred?"var(--map-accent-amber-symbol-0)":"var(--map-base-dusk-symbol--1)",style:"cursor: pointer;",onClick:async()=>{pe.starred=!pe.starred,await r.updateStarred(pe.id,pe.starred),pe.starred?(U.starredTrueCount++,U.starredFalseCount--):(U.starredTrueCount--,U.starredFalseCount++)}}):null,re=({rowData:pe})=>pe?Fe(Pi,{modelValue:pe.published,size:"s",ariaLabel:t("status_switch"),"onUpdate:modelValue":async Ae=>{pe.published=Ae,await r.updateStatus(pe.id,pe.published),pe.published?(U.publishedTrueCount++,U.publishedFalseCount--):(U.publishedTrueCount--,U.publishedFalseCount++)}}):null,Q=({rowData:pe})=>{if(!pe)return null;const Ae=r.entryCount[pe.id];return Fe(fs,{size:"s",href:i(Cr,`/manage/${pe.id}/results/entries`)},()=>[Ae!==void 0?Ae:"-"])},Z=({rowData:pe})=>{if(!pe)return null;const Ae=`[ivyforms id=${pe.id}]`;return Fe("div",[Fe(xn,{content:t("copy_shortcode"),placement:"top"},()=>[Fe(it,{iconOnly:!0,iconStart:"copy",size:"s",type:"ghost",priority:"tertiary",iconStartType:"outline",ariaLabel:t("copy_shorcode_table_form"),onClick:Bt(Ae)})]),Fe("span",Ae)])},q=({rowData:pe})=>pe?Fe("div",{class:["ivyforms-column-actions",{hovered:pe.id===x.value}]},[Fe(xn,{content:t("edit"),placement:"top"},()=>[Fe(it,{iconOnly:!0,iconStart:"edit",size:"s",type:"ghost",priority:"tertiary",iconStartType:"outline",onClick:ct(pe.id)})]),Fe(xn,{content:t("duplicate"),placement:"top"},()=>[Fe(it,{iconOnly:!0,iconStart:"copy",size:"s",type:"ghost",priority:"tertiary",iconStartType:"outline",onClick:Se(pe.id)})]),Fe(xn,{content:t("preview"),placement:"top"},()=>[Fe(it,{iconOnly:!0,iconStart:"preview",size:"s",type:"ghost",priority:"tertiary",iconStartType:"outline",onClick:He(pe.id)})]),Fe(xn,{content:t("actions"),placement:"top"},()=>[Fe(it,{iconOnly:!0,iconStart:"context-menu-dot",size:"s",type:"ghost",priority:"tertiary",iconStartType:"outline",ref:Ae=>{k.value[pe.id]=Ae&&"$el"in Ae&&Ae.$el instanceof HTMLElement?Ae.$el:null},onClick:()=>wt(pe.id)})])]):null,le=H([{key:"select",width:56,minWidth:56,headerRenderer:N,cellRenderer:R,visible:!0,showInModal:!1,fixed:wi.LEFT},{key:"star",width:32,minWidth:32,title:t("starred"),headerRenderer:()=>Fe(rn,{name:"star",type:"outline",size:"d",color:"var(--map-base-dusk-symbol-2)"}),cellRenderer:Y,visible:!0,showInModal:!0},{key:"id",title:t("id"),width:40,minWidth:40,cellRenderer:X,visible:!0,showInModal:!0,sortable:!0},{key:"name",title:t("form_name"),width:204,minWidth:204,sortable:!0,cellRenderer:te,visible:!0,showInModal:!0},{key:"published",title:t("status"),width:48,minWidth:48,cellRenderer:re,visible:!0,showInModal:!0},{key:"entries",title:t("entries"),width:54,minWidth:54,cellRenderer:Q,visible:!0,showInModal:!0},{key:"shortcode",title:t("shortcode"),width:160,minWidth:160,cellRenderer:Z,visible:!0,showInModal:!0},{key:"date-created",title:t("date_created"),width:105,minWidth:105,cellRenderer:({rowData:pe})=>Fe("span",$o.formatWPDate(pe.dateCreated)),visible:!0,showInModal:!0},{key:"date-edited",title:t("date_edited"),width:105,minWidth:105,cellRenderer:({rowData:pe})=>Fe("span",$o.formatWPDate(pe.dateEdited)),visible:!0,showInModal:!0},{key:"author",title:t("author"),width:204,minWidth:204,cellRenderer:({rowData:pe})=>Fe("span",pe.author),visible:!0,sortable:!0,showInModal:!0},{key:"actions",headerRenderer:()=>Fe(xn,{content:t("column_visibility"),placement:"left"},()=>[Fe(rn,{name:"eye-opened",type:"outline",size:"d",color:"var(--map-base-dusk-symbol-2)",onClick:ce,style:"cursor: pointer;",ariaLabel:t("column_visibility"),role:"button"})]),class:"ivyforms-cell-actions",width:160,minWidth:160,cellRenderer:q,visible:!0,showInModal:!1,fixed:wi.RIGHT}]),ye=O(()=>{var pe;return $o.convertWPFormat(((pe=window.wpIvyDateFormat)==null?void 0:pe.dateFormat)||"D/M/Y","dayjs")}),Re=O(()=>{const pe=le.value.filter(Hr=>Hr.visible),Ae=pe.filter(Hr=>Hr.showInModal),Ue=l.value||0,Zt=pe.reduce((Hr,Fi)=>Hr+(typeof Fi.width=="number"?Fi.width:0),0),Ys=Ue-Zt>0?Ue/Ae.length:null;return pe.map(Hr=>Hr.showInModal&&Ys?{...Hr,width:Math.floor(Ys)}:Hr)}),ze=O(()=>le.value.reduce((pe,Ae)=>pe+(typeof Ae.minWidth=="number"?Ae.minWidth:parseFloat(Ae.minWidth)||0),0)),nt=O(()=>g.value.some(pe=>pe.selected)),Ge=O(()=>g.value.filter(pe=>pe.selected).map(pe=>pe.id)),mt=O(()=>g.value.length>0&&g.value.every(pe=>pe.selected)),ut=O({get(){return m.value.every(pe=>pe.visible)},set(pe){m.value.forEach(Ue=>{Ue.key!=="id"&&Ue.showInModal&&(Ue.visible=pe)});const Ae=m.value.find(Ue=>Ue.key==="id");Ae&&(Ae.visible=!0)}}),Pt=O(()=>m.value.filter(pe=>pe.visible).length),gt=pe=>{var Ae;return Pt.value===3&&((Ae=m.value.find(Ue=>Ue.key===pe))==null?void 0:Ae.visible)},tt=O(()=>M.value.trim()!==""||y.value||$.starred!==null||$.published!==null),Ct=pe=>({page:B.page,perPage:B.perPage,search:D.value,sortBy:j.column,sortOrder:j.order,dateRange:$o.formatDateRangeForApi(y.value),shouldGetCount:pe,filters:{starred:$.starred,published:$.published}}),Bt=pe=>()=>{navigator.clipboard?navigator.clipboard.writeText(pe).then(()=>{_t({message:t("copied_shortcode"),type:"success"})}):_t({message:t("clipboard_api_not_supported"),type:"error"})};Me(M,P),Me([()=>B.page,()=>B.perPage,()=>D.value,()=>$.starred,()=>$.published,()=>y.value],async()=>{_.value=!0,await r.fetchData(Ct(!1)),g.value=r.tableData,_.value=!1}),Me(()=>r.paginationMeta,pe=>{B.page!==pe.page&&(B.page=pe.page),B.perPage!==pe.perPage&&(B.perPage=pe.perPage)},{deep:!0,immediate:!0}),Me(y,()=>T.value=!!y.value),Me(()=>r.tableData,pe=>{g.value=pe,_.value=!1},{immediate:!0}),Me(()=>r.paginationMeta,pe=>{v.value=Wu(pe).total||0},{immediate:!0}),Me(()=>r.filterCount,pe=>{U.publishedTrueCount=pe.publishedTrueCount,U.publishedFalseCount=pe.publishedFalseCount,U.starredTrueCount=pe.starredTrueCount,U.starredFalseCount=pe.starredFalseCount},{immediate:!0}),Me(()=>m.value.map(pe=>pe.visible),()=>{if(m.value.filter(Ae=>Ae.visible).length===0){const Ae=m.value.find(Ue=>Ue.key==="id");Ae&&(Ae.visible=!0)}});const Ne=async pe=>{_.value=!0;try{await r.fetchData(Ct(pe)),g.value=r.tableData;const Ae=r.paginationMeta;B.page=Ae.page,B.perPage=Ae.perPage,v.value=Ae.total,pe&&(U.publishedTrueCount=r.filterCount.publishedTrueCount,U.publishedFalseCount=r.filterCount.publishedFalseCount,U.starredTrueCount=r.filterCount.starredTrueCount,U.starredFalseCount=r.filterCount.starredFalseCount)}finally{_.value=!1,await me()}},je=({column:pe,order:Ae})=>{j.column=pe,j.order=Ae==="asc"?"asc":Ae==="desc"?"desc":"",B.page=1,Ne(!1)},Be=()=>{A.value=!0},qe=()=>{A.value=!1},Je=()=>{Ne(!1),A.value=!1},ct=pe=>()=>{a(Cr,`/manage/${pe}`)},vt=pe=>()=>{a(Cr,`/manage/${pe}/settings/general`)},Se=pe=>async()=>{await G.handleActionClick(pe,null,"form","duplicate",{setLoading:Ae=>{_.value=Ae}})},He=pe=>()=>{window.open(`${window.wpIvyUrls.siteURL}?ivyforms_preview=${pe}&_wpNonce=${window.wpIvyApiSettings.nonce}`,"_blank")},Tt=()=>{g.value.forEach(pe=>{pe.selected=!1})},$t=pe=>{g.value.forEach(Ae=>Ae.selected=pe)},wt=Al.debounce(pe=>{const Ae=k.value[pe];if(!Ae){_t({message:t("menu_button_element_not_found"),type:"error"});return}x.value=pe,o.openContextMenu({actions:[Hn(An.Entries,{handler:()=>{a(Cr,`/manage/${pe}/results/entries`)}}),Hn(An.Settings,{handler:vt(pe)}),Hn(An.Delete,{handler:async Ue=>{await G.handleActionClick(null,[Ue],"forms","delete",{setLoading:Zt=>{_.value=Zt}})}})],entityId:pe,contextMenuButtonRef:Ae,onClose:()=>{document.querySelectorAll(".el-table-v2__row.hovered").forEach(Zt=>Zt.classList.remove("hovered")),x.value=null}})},100),me=async()=>{await Xt();const pe=document.querySelector(".ivyforms-table");if(!pe)return;const Ae=pe.querySelectorAll(".el-table-v2__row");Ae.length&&Ae.forEach(Ue=>{const Zt=Ue.getAttribute("rowkey");Zt&&(Ue.addEventListener("mouseenter",()=>{x.value=Number(Zt),Ae.forEach(zr=>{zr.getAttribute("rowkey")===Zt&&zr.classList.add("hovered")})}),Ue.addEventListener("mouseleave",()=>{x.value=null,Ae.forEach(zr=>{zr.getAttribute("rowkey")===Zt&&zr.classList.remove("hovered")})}))})},ce=()=>{m.value=le.value.map(pe=>({key:pe.key,visible:pe.visible,showInModal:pe.showInModal??!0,title:pe.title})),f.value=!0},be=()=>{m.value.forEach(Ue=>{const Zt=le.value.find(zr=>zr.key===Ue.key);Zt&&(Zt.visible=Ue.visible)}),le.value=[...le.value];const pe=le.value.filter(Ue=>Ue.visible&&Ue.showInModal),Ae=pe.length>0?`${100/pe.length}%`:"auto";le.value.forEach(Ue=>{Ue.showInModal&&(Ue.width=Ue.visible?Ae:null)}),f.value=!1},Te=()=>{b.value=!0,Xt(()=>{de();const pe=document.querySelector(".el-date-editor");pe==null||pe.click()})},de=()=>{Xt(()=>{const pe=c.value&&"$el"in c.value?c.value.$el:c.value,Ae=d.value&&"$el"in d.value?d.value.$el:d.value;if(pe instanceof HTMLElement&&Ae instanceof HTMLElement){const Ue=pe.getBoundingClientRect();Ae.style.position="absolute",Ae.style.top=`${Ue.bottom+8}px`,Ae.style.left=`${Ue.left}px`,Ae.style.inset="unset"}})},fe=()=>{b.value=!1},ne=()=>{w.value=!1},W=()=>{y.value=null,T.value=!1,b.value=!1},_e=(pe,Ae=500)=>()=>{pe(),setTimeout(()=>{o.closeContextMenu()},Ae)},ke=(pe,Ae)=>{$.starred=pe==="starred"?Ae:null,$.published=pe==="published"?Ae:null,w.value=Ae!==null},Ee=async()=>{if(o.isOpen){o.closeContextMenu();return}o.openContextMenu({actions:[Hn(An.Published,{handler:_e(()=>ke("published",!0)),rightText:U.publishedTrueCount.toString(),isActive:()=>$.published===!0,secondary:!0}),Hn(An.Unpublished,{handler:_e(()=>ke("published",!1)),isActive:()=>$.published===!1,secondary:!0,rightText:U.publishedFalseCount.toString()}),Hn(An.Starred,{handler:_e(()=>ke("starred",!0)),isActive:()=>$.starred===!0,secondary:!0,rightText:U.starredTrueCount.toString()}),Hn(An.Unstarred,{handler:_e(()=>ke("starred",!1)),isActive:()=>$.starred===!1,rightText:U.starredFalseCount.toString(),secondary:!0}),Hn(An.Reset,{handler:_e(()=>{ke("starred",null),ke("published",null)}),secondary:!0})],contextMenuButtonRef:c.value})},Ke=()=>{$.starred=null,$.published=null,w.value=!1},St=()=>{$.starred=null,$.published=null,y.value=null,M.value="",B.page=1,w.value=!1,T.value=!1};function dt(pe){const Ae=c.value&&("$el"in c.value?c.value.$el:c.value),Ue=document.querySelector(".ivyforms-context-menu, .ivyforms-popper-context-menu");o.isOpen&&!(Ae!=null&&Ae.contains(pe.target))&&!(Ue!=null&&Ue.contains(pe.target))&&o.closeContextMenu()}return Ht(()=>{document.addEventListener("mousedown",dt),Ne(!0),e.loadAllSettings()}),xs(()=>{document.removeEventListener("mousedown",dt)}),(pe,Ae)=>{const Ue=Ws,Zt=Pg,zr=JN,Ys=Sc,Hr=bc,Fi=Es,Yl=Ep,Gp=Ip;return C(),F("div",fV,[z("div",pV,[z("div",hV,[I(Ue,{modelValue:M.value,"onUpdate:modelValue":Ae[0]||(Ae[0]=ln=>M.value=ln),class:"ivyforms-search__fixed-width",placeholder:h(t)("search")},null,8,["modelValue","placeholder"]),b.value?(C(),se(Rg,{key:0,ref_key:"datePickerPopperRef",ref:d,modelValue:y.value,"onUpdate:modelValue":Ae[1]||(Ae[1]=ln=>y.value=ln),type:"datetimerange","date-format":ye.value,clearable:"",onClose:fe},null,8,["modelValue","date-format"])):ie("",!0),I(Zt,{color:"tertiary",type:"datepicker","aria-label":h(t)("date_filters"),indicator:T.value,"custom-hide-indicator":W,onClick:Te},null,8,["aria-label","indicator"]),I(Zt,{ref_key:"menuButtonRef",ref:c,color:"tertiary",type:"filter","aria-label":h(t)("filters"),indicator:w.value,"custom-hide-indicator":Ke,onClick:Ee},null,8,["aria-label","indicator"]),I($g,{onClose:ne})]),z("div",mV,[I(it,{"icon-start":"plus",onClick:Be},{default:V(()=>[De(ae(h(t)("form")),1)]),_:1})])]),z("div",vV,[I(Yl,{ref_key:"tableRef",ref:s,data:_.value?[]:g.value,loading:_.value,total:v.value,"row-key":"id",columns:Re.value,"min-table-width":ze.value,"is-custom-header":nt.value,sort:j,pagination:"",onSortChange:je,onWidthChange:Ae[3]||(Ae[3]=ln=>l.value=ln)},{header:V(()=>[I(zr,{loading:_.value,"onUpdate:loading":Ae[2]||(Ae[2]=ln=>_.value=ln),"selected-ids":Ge.value,onUnselectAll:Tt},null,8,["loading","selected-ids"])]),empty:V(()=>[_.value?(C(),F("div",gV,[I(Hr,null,{template:V(()=>[(C(!0),F($e,null,ot(B.perPage,ln=>(C(),se(Ys,{key:ln,class:"ivyforms-skeleton-row"}))),128))]),_:1})])):tt.value?(C(),se(Fi,{key:2,image:"filters",title:h(t)("empty_state_all_forms_title"),subtitle:h(t)("empty_state_all_forms_subtitle")},{actionButton:V(()=>[I(it,{onClick:St},{default:V(()=>[De(ae(h(t)("reset_filters")),1)]),_:1})]),_:1},8,["title","subtitle"])):(C(),se(Fi,{key:1,image:"not-found",title:h(t)("empty_state_all_forms_title"),subtitle:h(t)("empty_state_all_forms_subtitle")},{actionButton:V(()=>[I(it,{"icon-start":"plus",onClick:Be},{default:V(()=>[De(ae(h(t)("form")),1)]),_:1})]),_:1},8,["title","subtitle"]))]),_:1},8,["data","loading","total","columns","min-table-width","is-custom-header","sort"]),I(yS,{modelValue:f.value,"onUpdate:modelValue":Ae[6]||(Ae[6]=ln=>f.value=ln),title:h(t)("edit_table"),subtitle:h(t)("edit_columns"),"show-close":"","align-center":"",width:"400px"},{footer:V(()=>[I(it,{priority:"tertiary",size:"d",type:"fill",onClick:Ae[5]||(Ae[5]=ln=>f.value=!1)},{default:V(()=>[De(ae(h(t)("cancel")),1)]),_:1}),I(it,{priority:"success",size:"d",type:"fill",onClick:be},{default:V(()=>[De(ae(h(t)("save")),1)]),_:1})]),default:V(()=>[I(pn,{modelValue:ut.value,"onUpdate:modelValue":Ae[4]||(Ae[4]=ln=>ut.value=ln),priority:"secondary",size:"s",type:"checkmark",class:"show-all-columns"},{default:V(()=>[xe(pe.$slots,"default",{},()=>[De(ae(h(t)("show_all_forms")),1)])]),_:3},8,["modelValue"]),(C(!0),F($e,null,ot(m.value,ln=>(C(),F("div",{key:ln.key},[ln.showInModal?(C(),se(pn,{key:0,modelValue:ln.visible,"onUpdate:modelValue":Jp=>ln.visible=Jp,disabled:gt(ln.key),priority:"secondary",size:"s",type:"checkmark"},{default:V(()=>[De(ae(ln.title),1)]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):ie("",!0)]))),128))]),_:3},8,["modelValue","title","subtitle"])]),I(_c,{"show-close":"","align-center":"",type:"error",width:"342px"}),z("div",yV,[I(Gp,{"current-page":B.page,"onUpdate:currentPage":Ae[7]||(Ae[7]=ln=>B.page=ln),"page-size":B.perPage,"onUpdate:pageSize":Ae[8]||(Ae[8]=ln=>B.perPage=ln),total:v.value,"aria-label":h(t)("pagination_navigation")},null,8,["current-page","page-size","total","aria-label"])]),I(MS,{visible:A.value,"onUpdate:visible":Ae[9]||(Ae[9]=ln=>A.value=ln),"source-page-type":"allForms",onClose:qe,onFormCreated:Je},null,8,["visible"])])}}}),SV=he({__name:"AllFormsPageSection",setup(n){return Va(),(e,t)=>{const r=bV,o=Hs;return C(),se(o,{"has-table":""},{default:V(()=>[I(r)]),_:1})}}}),_V=he({__name:"FormsPage",setup(n){const{getLabel:e}=at(),{redirectToWordPressAdminPage:t}=oa(),r=e("all_forms");Pn("pageTitle",r);const o=aa(),i=O(()=>o.isFullScreenMode),a=H(Oa),s=[{label:e("all_forms"),index:Oa},{label:e("entries"),index:bo},{label:e("integrations"),index:"integrations"},{label:e("settings"),index:"global-settings",routeName:"global-settings"}],l=c=>{c===Oa?t(xi):c===bo?t(ki):c==="global-settings"&&t(gc)};return(c,d)=>{const f=zs,m=Oi,g=SV;return C(),F($e,null,[I(m,null,{left:V(()=>[i.value?(C(),se(Ai,{key:0,mode:"horizontal",ellipsis:!1},{default:V(()=>[(C(),F($e,null,ot(s,v=>I(Zo,{key:v.index,label:v.label,name:v.index,"is-active":a.value===v.index,type:"tonal","coming-soon":v.index==="integrations",onClick:y=>l(v.index)},null,8,["label","name","is-active","coming-soon","onClick"])),64))]),_:1})):ie("",!0)]),default:V(()=>[I(f)]),_:1}),z("div",{class:ee(["ivyforms-all-forms-page ivyforms-flex ivyforms-gap-8 ivyforms-p-8",{"ivyforms-fullscreen-mode":i.value}])},[I(g)],2)],64)}}}),$i=he({__name:"IvyScrollbar",props:{priority:{default:"mix"}},setup(n,{expose:e}){const t=H(null),r=n;return e({handleScroll:()=>{var d;(d=t.value)==null||d.handleScroll()},scrollTo:(d,f)=>{var m;(m=t.value)==null||m.scrollTo(d,f)},setScrollTop:d=>{var f;(f=t.value)==null||f.setScrollTop(d)},setScrollLeft:d=>{var f;(f=t.value)==null||f.setScrollLeft(d)},update:()=>{var d;(d=t.value)==null||d.update()},getWrapRef:()=>t.value.wrapRef}),(d,f)=>{const m=U3;return C(),se(m,kt({ref_key:"scrollbar",ref:t},{...d.$props,...d.$attrs},{class:["ivyforms-scrollbar",`priority-${r.priority}`]}),{default:V(()=>[xe(d.$slots,"default")]),_:3},16,["class"])}}});var nf={exports:{}};const wV=X3(sE);/**!
 * Sortable 1.14.0
 * @author	RubaXa   <trash@rubaxa.org>
 * @author	owenm    <owen23355@gmail.com>
 * @license MIT
 */function n2(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),t.push.apply(t,r)}return t}function ea(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?n2(Object(t),!0).forEach(function(r){xV(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):n2(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function rf(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rf=function(e){return typeof e}:rf=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rf(n)}function xV(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function _o(){return _o=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},_o.apply(this,arguments)}function kV(n,e){if(n==null)return{};var t={},r=Object.keys(n),o,i;for(i=0;i<r.length;i++)o=r[i],!(e.indexOf(o)>=0)&&(t[o]=n[o]);return t}function CV(n,e){if(n==null)return{};var t=kV(n,e),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(o=0;o<i.length;o++)r=i[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(n,r)&&(t[r]=n[r])}return t}function IV(n){return EV(n)||TV(n)||MV(n)||OV()}function EV(n){if(Array.isArray(n))return Av(n)}function TV(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function MV(n,e){if(n){if(typeof n=="string")return Av(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);if(t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set")return Array.from(n);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Av(n,e)}}function Av(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function OV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var AV="1.14.0";function Pa(n){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(n)}var za=Pa(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),wc=Pa(/Edge/i),r2=Pa(/firefox/i),Ou=Pa(/safari/i)&&!Pa(/chrome/i)&&!Pa(/android/i),OS=Pa(/iP(ad|od|hone)/i),PV=Pa(/chrome/i)&&Pa(/android/i),AS={capture:!1,passive:!1};function tn(n,e,t){n.addEventListener(e,t,!za&&AS)}function Gt(n,e,t){n.removeEventListener(e,t,!za&&AS)}function Tf(n,e){if(e){if(e[0]===">"&&(e=e.substring(1)),n)try{if(n.matches)return n.matches(e);if(n.msMatchesSelector)return n.msMatchesSelector(e);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(e)}catch{return!1}return!1}}function $V(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function Po(n,e,t,r){if(n){t=t||document;do{if(e!=null&&(e[0]===">"?n.parentNode===t&&Tf(n,e):Tf(n,e))||r&&n===t)return n;if(n===t)break}while(n=$V(n))}return null}var o2=/\s+/g;function On(n,e,t){if(n&&e)if(n.classList)n.classList[t?"add":"remove"](e);else{var r=(" "+n.className+" ").replace(o2," ").replace(" "+e+" "," ");n.className=(r+(t?" "+e:"")).replace(o2," ")}}function pt(n,e,t){var r=n&&n.style;if(r){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(t=n.currentStyle),e===void 0?t:t[e];!(e in r)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),r[e]=t+(typeof t=="string"?"":"px")}}function ps(n,e){var t="";if(typeof n=="string")t=n;else do{var r=pt(n,"transform");r&&r!=="none"&&(t=r+" "+t)}while(!e&&(n=n.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(t)}function PS(n,e,t){if(n){var r=n.getElementsByTagName(e),o=0,i=r.length;if(t)for(;o<i;o++)t(r[o],o);return r}return[]}function Xo(){var n=document.scrollingElement;return n||document.documentElement}function In(n,e,t,r,o){if(!(!n.getBoundingClientRect&&n!==window)){var i,a,s,l,c,d,f;if(n!==window&&n.parentNode&&n!==Xo()?(i=n.getBoundingClientRect(),a=i.top,s=i.left,l=i.bottom,c=i.right,d=i.height,f=i.width):(a=0,s=0,l=window.innerHeight,c=window.innerWidth,d=window.innerHeight,f=window.innerWidth),(e||t)&&n!==window&&(o=o||n.parentNode,!za))do if(o&&o.getBoundingClientRect&&(pt(o,"transform")!=="none"||t&&pt(o,"position")!=="static")){var m=o.getBoundingClientRect();a-=m.top+parseInt(pt(o,"border-top-width")),s-=m.left+parseInt(pt(o,"border-left-width")),l=a+i.height,c=s+i.width;break}while(o=o.parentNode);if(r&&n!==window){var g=ps(o||n),v=g&&g.a,y=g&&g.d;g&&(a/=y,s/=v,f/=v,d/=y,l=a+d,c=s+f)}return{top:a,left:s,bottom:l,right:c,width:f,height:d}}}function a2(n,e,t){for(var r=ci(n,!0),o=In(n)[e];r;){var i=In(r)[t],a=void 0;if(a=o>=i,!a)return r;if(r===Xo())break;r=ci(r,!1)}return!1}function Pl(n,e,t,r){for(var o=0,i=0,a=n.children;i<a.length;){if(a[i].style.display!=="none"&&a[i]!==Mt.ghost&&(r||a[i]!==Mt.dragged)&&Po(a[i],t.draggable,n,!1)){if(o===e)return a[i];o++}i++}return null}function Dg(n,e){for(var t=n.lastElementChild;t&&(t===Mt.ghost||pt(t,"display")==="none"||e&&!Tf(t,e));)t=t.previousElementSibling;return t||null}function Ln(n,e){var t=0;if(!n||!n.parentNode)return-1;for(;n=n.previousElementSibling;)n.nodeName.toUpperCase()!=="TEMPLATE"&&n!==Mt.clone&&(!e||Tf(n,e))&&t++;return t}function i2(n){var e=0,t=0,r=Xo();if(n)do{var o=ps(n),i=o.a,a=o.d;e+=n.scrollLeft*i,t+=n.scrollTop*a}while(n!==r&&(n=n.parentNode));return[e,t]}function RV(n,e){for(var t in n)if(n.hasOwnProperty(t)){for(var r in e)if(e.hasOwnProperty(r)&&e[r]===n[t][r])return Number(t)}return-1}function ci(n,e){if(!n||!n.getBoundingClientRect)return Xo();var t=n,r=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var o=pt(t);if(t.clientWidth<t.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return Xo();if(r||e)return t;r=!0}}while(t=t.parentNode);return Xo()}function DV(n,e){if(n&&e)for(var t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function km(n,e){return Math.round(n.top)===Math.round(e.top)&&Math.round(n.left)===Math.round(e.left)&&Math.round(n.height)===Math.round(e.height)&&Math.round(n.width)===Math.round(e.width)}var Au;function $S(n,e){return function(){if(!Au){var t=arguments,r=this;t.length===1?n.call(r,t[0]):n.apply(r,t),Au=setTimeout(function(){Au=void 0},e)}}}function NV(){clearTimeout(Au),Au=void 0}function RS(n,e,t){n.scrollLeft+=e,n.scrollTop+=t}function Ng(n){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(n).cloneNode(!0):t?t(n).clone(!0)[0]:n.cloneNode(!0)}function s2(n,e){pt(n,"position","absolute"),pt(n,"top",e.top),pt(n,"left",e.left),pt(n,"width",e.width),pt(n,"height",e.height)}function Cm(n){pt(n,"position",""),pt(n,"top",""),pt(n,"left",""),pt(n,"width",""),pt(n,"height","")}var vr="Sortable"+new Date().getTime();function FV(){var n=[],e;return{captureAnimationState:function(){if(n=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(o){if(!(pt(o,"display")==="none"||o===Mt.ghost)){n.push({target:o,rect:In(o)});var i=ea({},n[n.length-1].rect);if(o.thisAnimationDuration){var a=ps(o,!0);a&&(i.top-=a.f,i.left-=a.e)}o.fromRect=i}})}},addAnimationState:function(r){n.push(r)},removeAnimationState:function(r){n.splice(RV(n,{target:r}),1)},animateAll:function(r){var o=this;if(!this.options.animation){clearTimeout(e),typeof r=="function"&&r();return}var i=!1,a=0;n.forEach(function(s){var l=0,c=s.target,d=c.fromRect,f=In(c),m=c.prevFromRect,g=c.prevToRect,v=s.rect,y=ps(c,!0);y&&(f.top-=y.f,f.left-=y.e),c.toRect=f,c.thisAnimationDuration&&km(m,f)&&!km(d,f)&&(v.top-f.top)/(v.left-f.left)===(d.top-f.top)/(d.left-f.left)&&(l=BV(v,m,g,o.options)),km(f,d)||(c.prevFromRect=d,c.prevToRect=f,l||(l=o.options.animation),o.animate(c,v,f,l)),l&&(i=!0,a=Math.max(a,l),clearTimeout(c.animationResetTimer),c.animationResetTimer=setTimeout(function(){c.animationTime=0,c.prevFromRect=null,c.fromRect=null,c.prevToRect=null,c.thisAnimationDuration=null},l),c.thisAnimationDuration=l)}),clearTimeout(e),i?e=setTimeout(function(){typeof r=="function"&&r()},a):typeof r=="function"&&r(),n=[]},animate:function(r,o,i,a){if(a){pt(r,"transition",""),pt(r,"transform","");var s=ps(this.el),l=s&&s.a,c=s&&s.d,d=(o.left-i.left)/(l||1),f=(o.top-i.top)/(c||1);r.animatingX=!!d,r.animatingY=!!f,pt(r,"transform","translate3d("+d+"px,"+f+"px,0)"),this.forRepaintDummy=LV(r),pt(r,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),pt(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){pt(r,"transition",""),pt(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},a)}}}}function LV(n){return n.offsetWidth}function BV(n,e,t,r){return Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*r.animation}var cl=[],Im={initializeByDefault:!0},xc={mount:function(e){for(var t in Im)Im.hasOwnProperty(t)&&!(t in e)&&(e[t]=Im[t]);cl.forEach(function(r){if(r.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),cl.push(e)},pluginEvent:function(e,t,r){var o=this;this.eventCanceled=!1,r.cancel=function(){o.eventCanceled=!0};var i=e+"Global";cl.forEach(function(a){t[a.pluginName]&&(t[a.pluginName][i]&&t[a.pluginName][i](ea({sortable:t},r)),t.options[a.pluginName]&&t[a.pluginName][e]&&t[a.pluginName][e](ea({sortable:t},r)))})},initializePlugins:function(e,t,r,o){cl.forEach(function(s){var l=s.pluginName;if(!(!e.options[l]&&!s.initializeByDefault)){var c=new s(e,t,e.options);c.sortable=e,c.options=e.options,e[l]=c,_o(r,c.defaults)}});for(var i in e.options)if(e.options.hasOwnProperty(i)){var a=this.modifyOption(e,i,e.options[i]);typeof a<"u"&&(e.options[i]=a)}},getEventProperties:function(e,t){var r={};return cl.forEach(function(o){typeof o.eventProperties=="function"&&_o(r,o.eventProperties.call(t[o.pluginName],e))}),r},modifyOption:function(e,t,r){var o;return cl.forEach(function(i){e[i.pluginName]&&i.optionListeners&&typeof i.optionListeners[t]=="function"&&(o=i.optionListeners[t].call(e[i.pluginName],r))}),o}};function Su(n){var e=n.sortable,t=n.rootEl,r=n.name,o=n.targetEl,i=n.cloneEl,a=n.toEl,s=n.fromEl,l=n.oldIndex,c=n.newIndex,d=n.oldDraggableIndex,f=n.newDraggableIndex,m=n.originalEvent,g=n.putSortable,v=n.extraEventProperties;if(e=e||t&&t[vr],!!e){var y,b=e.options,_="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!za&&!wc?y=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(y=document.createEvent("Event"),y.initEvent(r,!0,!0)),y.to=a||t,y.from=s||t,y.item=o||t,y.clone=i,y.oldIndex=l,y.newIndex=c,y.oldDraggableIndex=d,y.newDraggableIndex=f,y.originalEvent=m,y.pullMode=g?g.lastPutMode:void 0;var w=ea(ea({},v),xc.getEventProperties(r,e));for(var T in w)y[T]=w[T];t&&t.dispatchEvent(y),b[_]&&b[_].call(e,y)}}var VV=["evt"],Rr=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=r.evt,i=CV(r,VV);xc.pluginEvent.bind(Mt)(e,t,ea({dragEl:Ye,parentEl:Nn,ghostEl:Vt,rootEl:Cn,nextEl:Xi,lastDownEl:of,cloneEl:Fn,cloneHidden:ai,dragStarted:_u,putSortable:sr,activeSortable:Mt.active,originalEvent:o,oldIndex:wl,oldDraggableIndex:Pu,newIndex:Xr,newDraggableIndex:ti,hideGhostForTarget:LS,unhideGhostForTarget:BS,cloneNowHidden:function(){ai=!0},cloneNowShown:function(){ai=!1},dispatchSortableEvent:function(s){kr({sortable:t,name:s,originalEvent:o})}},i))};function kr(n){Su(ea({putSortable:sr,cloneEl:Fn,targetEl:Ye,rootEl:Cn,oldIndex:wl,oldDraggableIndex:Pu,newIndex:Xr,newDraggableIndex:ti},n))}var Ye,Nn,Vt,Cn,Xi,of,Fn,ai,wl,Xr,Pu,ti,Cd,sr,vl=!1,Mf=!1,Of=[],Yi,Mo,Em,Tm,l2,u2,_u,dl,$u,Ru=!1,Id=!1,af,hr,Mm=[],Pv=!1,Af=[],Op=typeof document<"u",Ed=OS,c2=wc||za?"cssFloat":"float",zV=Op&&!PV&&!OS&&"draggable"in document.createElement("div"),DS=function(){if(Op){if(za)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}}(),NS=function(e,t){var r=pt(e),o=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),i=Pl(e,0,t),a=Pl(e,1,t),s=i&&pt(i),l=a&&pt(a),c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+In(i).width,d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+In(a).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&s.float&&s.float!=="none"){var f=s.float==="left"?"left":"right";return a&&(l.clear==="both"||l.clear===f)?"vertical":"horizontal"}return i&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||c>=o&&r[c2]==="none"||a&&r[c2]==="none"&&c+d>o)?"vertical":"horizontal"},HV=function(e,t,r){var o=r?e.left:e.top,i=r?e.right:e.bottom,a=r?e.width:e.height,s=r?t.left:t.top,l=r?t.right:t.bottom,c=r?t.width:t.height;return o===s||i===l||o+a/2===s+c/2},UV=function(e,t){var r;return Of.some(function(o){var i=o[vr].options.emptyInsertThreshold;if(!(!i||Dg(o))){var a=In(o),s=e>=a.left-i&&e<=a.right+i,l=t>=a.top-i&&t<=a.bottom+i;if(s&&l)return r=o}}),r},FS=function(e){function t(i,a){return function(s,l,c,d){var f=s.options.group.name&&l.options.group.name&&s.options.group.name===l.options.group.name;if(i==null&&(a||f))return!0;if(i==null||i===!1)return!1;if(a&&i==="clone")return i;if(typeof i=="function")return t(i(s,l,c,d),a)(s,l,c,d);var m=(a?s:l).options.group.name;return i===!0||typeof i=="string"&&i===m||i.join&&i.indexOf(m)>-1}}var r={},o=e.group;(!o||rf(o)!="object")&&(o={name:o}),r.name=o.name,r.checkPull=t(o.pull,!0),r.checkPut=t(o.put),r.revertClone=o.revertClone,e.group=r},LS=function(){!DS&&Vt&&pt(Vt,"display","none")},BS=function(){!DS&&Vt&&pt(Vt,"display","")};Op&&document.addEventListener("click",function(n){if(Mf)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),Mf=!1,!1},!0);var qi=function(e){if(Ye){e=e.touches?e.touches[0]:e;var t=UV(e.clientX,e.clientY);if(t){var r={};for(var o in e)e.hasOwnProperty(o)&&(r[o]=e[o]);r.target=r.rootEl=t,r.preventDefault=void 0,r.stopPropagation=void 0,t[vr]._onDragOver(r)}}},WV=function(e){Ye&&Ye.parentNode[vr]._isOutsideThisEl(e.target)};function Mt(n,e){if(!(n&&n.nodeType&&n.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));this.el=n,this.options=e=_o({},e),n[vr]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(n.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return NS(n,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,s){a.setData("Text",s.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Mt.supportPointer!==!1&&"PointerEvent"in window&&!Ou,emptyInsertThreshold:5};xc.initializePlugins(this,n,t);for(var r in t)!(r in e)&&(e[r]=t[r]);FS(e);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=e.forceFallback?!1:zV,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?tn(n,"pointerdown",this._onTapStart):(tn(n,"mousedown",this._onTapStart),tn(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(tn(n,"dragover",this),tn(n,"dragenter",this)),Of.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),_o(this,FV())}Mt.prototype={constructor:Mt,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(dl=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,Ye):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,r=this.el,o=this.options,i=o.preventOnFilter,a=e.type,s=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,l=(s||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,d=o.filter;if(QV(r),!Ye&&!(/mousedown|pointerdown/.test(a)&&e.button!==0||o.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&Ou&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=Po(l,o.draggable,r,!1),!(l&&l.animated)&&of!==l)){if(wl=Ln(l),Pu=Ln(l,o.draggable),typeof d=="function"){if(d.call(this,e,l,this)){kr({sortable:t,rootEl:c,name:"filter",targetEl:l,toEl:r,fromEl:r}),Rr("filter",t,{evt:e}),i&&e.cancelable&&e.preventDefault();return}}else if(d&&(d=d.split(",").some(function(f){if(f=Po(c,f.trim(),r,!1),f)return kr({sortable:t,rootEl:f,name:"filter",targetEl:l,fromEl:r,toEl:r}),Rr("filter",t,{evt:e}),!0}),d)){i&&e.cancelable&&e.preventDefault();return}o.handle&&!Po(c,o.handle,r,!1)||this._prepareDragStart(e,s,l)}}},_prepareDragStart:function(e,t,r){var o=this,i=o.el,a=o.options,s=i.ownerDocument,l;if(r&&!Ye&&r.parentNode===i){var c=In(r);if(Cn=i,Ye=r,Nn=Ye.parentNode,Xi=Ye.nextSibling,of=r,Cd=a.group,Mt.dragged=Ye,Yi={target:Ye,clientX:(t||e).clientX,clientY:(t||e).clientY},l2=Yi.clientX-c.left,u2=Yi.clientY-c.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Ye.style["will-change"]="all",l=function(){if(Rr("delayEnded",o,{evt:e}),Mt.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!r2&&o.nativeDraggable&&(Ye.draggable=!0),o._triggerDragStart(e,t),kr({sortable:o,name:"choose",originalEvent:e}),On(Ye,a.chosenClass,!0)},a.ignore.split(",").forEach(function(d){PS(Ye,d.trim(),Om)}),tn(s,"dragover",qi),tn(s,"mousemove",qi),tn(s,"touchmove",qi),tn(s,"mouseup",o._onDrop),tn(s,"touchend",o._onDrop),tn(s,"touchcancel",o._onDrop),r2&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Ye.draggable=!0),Rr("delayStart",this,{evt:e}),a.delay&&(!a.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(wc||za))){if(Mt.eventCanceled){this._onDrop();return}tn(s,"mouseup",o._disableDelayedDrag),tn(s,"touchend",o._disableDelayedDrag),tn(s,"touchcancel",o._disableDelayedDrag),tn(s,"mousemove",o._delayedDragTouchMoveHandler),tn(s,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&tn(s,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(l,a.delay)}else l()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Ye&&Om(Ye),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Gt(e,"mouseup",this._disableDelayedDrag),Gt(e,"touchend",this._disableDelayedDrag),Gt(e,"touchcancel",this._disableDelayedDrag),Gt(e,"mousemove",this._delayedDragTouchMoveHandler),Gt(e,"touchmove",this._delayedDragTouchMoveHandler),Gt(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?tn(document,"pointermove",this._onTouchMove):t?tn(document,"touchmove",this._onTouchMove):tn(document,"mousemove",this._onTouchMove):(tn(Ye,"dragend",this),tn(Cn,"dragstart",this._onDragStart));try{document.selection?sf(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(vl=!1,Cn&&Ye){Rr("dragStarted",this,{evt:t}),this.nativeDraggable&&tn(document,"dragover",WV);var r=this.options;!e&&On(Ye,r.dragClass,!1),On(Ye,r.ghostClass,!0),Mt.active=this,e&&this._appendGhost(),kr({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Mo){this._lastX=Mo.clientX,this._lastY=Mo.clientY,LS();for(var e=document.elementFromPoint(Mo.clientX,Mo.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Mo.clientX,Mo.clientY),e!==t);)t=e;if(Ye.parentNode[vr]._isOutsideThisEl(e),t)do{if(t[vr]){var r=void 0;if(r=t[vr]._onDragOver({clientX:Mo.clientX,clientY:Mo.clientY,target:e,rootEl:t}),r&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);BS()}},_onTouchMove:function(e){if(Yi){var t=this.options,r=t.fallbackTolerance,o=t.fallbackOffset,i=e.touches?e.touches[0]:e,a=Vt&&ps(Vt,!0),s=Vt&&a&&a.a,l=Vt&&a&&a.d,c=Ed&&hr&&i2(hr),d=(i.clientX-Yi.clientX+o.x)/(s||1)+(c?c[0]-Mm[0]:0)/(s||1),f=(i.clientY-Yi.clientY+o.y)/(l||1)+(c?c[1]-Mm[1]:0)/(l||1);if(!Mt.active&&!vl){if(r&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<r)return;this._onDragStart(e,!0)}if(Vt){a?(a.e+=d-(Em||0),a.f+=f-(Tm||0)):a={a:1,b:0,c:0,d:1,e:d,f};var m="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");pt(Vt,"webkitTransform",m),pt(Vt,"mozTransform",m),pt(Vt,"msTransform",m),pt(Vt,"transform",m),Em=d,Tm=f,Mo=i}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Vt){var e=this.options.fallbackOnBody?document.body:Cn,t=In(Ye,!0,Ed,!0,e),r=this.options;if(Ed){for(hr=e;pt(hr,"position")==="static"&&pt(hr,"transform")==="none"&&hr!==document;)hr=hr.parentNode;hr!==document.body&&hr!==document.documentElement?(hr===document&&(hr=Xo()),t.top+=hr.scrollTop,t.left+=hr.scrollLeft):hr=Xo(),Mm=i2(hr)}Vt=Ye.cloneNode(!0),On(Vt,r.ghostClass,!1),On(Vt,r.fallbackClass,!0),On(Vt,r.dragClass,!0),pt(Vt,"transition",""),pt(Vt,"transform",""),pt(Vt,"box-sizing","border-box"),pt(Vt,"margin",0),pt(Vt,"top",t.top),pt(Vt,"left",t.left),pt(Vt,"width",t.width),pt(Vt,"height",t.height),pt(Vt,"opacity","0.8"),pt(Vt,"position",Ed?"absolute":"fixed"),pt(Vt,"zIndex","100000"),pt(Vt,"pointerEvents","none"),Mt.ghost=Vt,e.appendChild(Vt),pt(Vt,"transform-origin",l2/parseInt(Vt.style.width)*100+"% "+u2/parseInt(Vt.style.height)*100+"%")}},_onDragStart:function(e,t){var r=this,o=e.dataTransfer,i=r.options;if(Rr("dragStart",this,{evt:e}),Mt.eventCanceled){this._onDrop();return}Rr("setupClone",this),Mt.eventCanceled||(Fn=Ng(Ye),Fn.draggable=!1,Fn.style["will-change"]="",this._hideClone(),On(Fn,this.options.chosenClass,!1),Mt.clone=Fn),r.cloneId=sf(function(){Rr("clone",r),!Mt.eventCanceled&&(r.options.removeCloneOnHide||Cn.insertBefore(Fn,Ye),r._hideClone(),kr({sortable:r,name:"clone"}))}),!t&&On(Ye,i.dragClass,!0),t?(Mf=!0,r._loopId=setInterval(r._emulateDragOver,50)):(Gt(document,"mouseup",r._onDrop),Gt(document,"touchend",r._onDrop),Gt(document,"touchcancel",r._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(r,o,Ye)),tn(document,"drop",r),pt(Ye,"transform","translateZ(0)")),vl=!0,r._dragStartId=sf(r._dragStarted.bind(r,t,e)),tn(document,"selectstart",r),_u=!0,Ou&&pt(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,r=e.target,o,i,a,s=this.options,l=s.group,c=Mt.active,d=Cd===l,f=s.sort,m=sr||c,g,v=this,y=!1;if(Pv)return;function b(te,Y){Rr(te,v,ea({evt:e,isOwner:d,axis:g?"vertical":"horizontal",revert:a,dragRect:o,targetRect:i,canSort:f,fromSortable:m,target:r,completed:w,onMove:function(Q,Z){return Td(Cn,t,Ye,o,Q,In(Q),e,Z)},changed:T},Y))}function _(){b("dragOverAnimationCapture"),v.captureAnimationState(),v!==m&&m.captureAnimationState()}function w(te){return b("dragOverCompleted",{insertion:te}),te&&(d?c._hideClone():c._showClone(v),v!==m&&(On(Ye,sr?sr.options.ghostClass:c.options.ghostClass,!1),On(Ye,s.ghostClass,!0)),sr!==v&&v!==Mt.active?sr=v:v===Mt.active&&sr&&(sr=null),m===v&&(v._ignoreWhileAnimating=r),v.animateAll(function(){b("dragOverAnimationComplete"),v._ignoreWhileAnimating=null}),v!==m&&(m.animateAll(),m._ignoreWhileAnimating=null)),(r===Ye&&!Ye.animated||r===t&&!r.animated)&&(dl=null),!s.dragoverBubble&&!e.rootEl&&r!==document&&(Ye.parentNode[vr]._isOutsideThisEl(e.target),!te&&qi(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),y=!0}function T(){Xr=Ln(Ye),ti=Ln(Ye,s.draggable),kr({sortable:v,name:"change",toEl:t,newIndex:Xr,newDraggableIndex:ti,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),r=Po(r,s.draggable,t,!0),b("dragOver"),Mt.eventCanceled)return y;if(Ye.contains(e.target)||r.animated&&r.animatingX&&r.animatingY||v._ignoreWhileAnimating===r)return w(!1);if(Mf=!1,c&&!s.disabled&&(d?f||(a=Nn!==Cn):sr===this||(this.lastPutMode=Cd.checkPull(this,c,Ye,e))&&l.checkPut(this,c,Ye,e))){if(g=this._getDirection(e,r)==="vertical",o=In(Ye),b("dragOverValid"),Mt.eventCanceled)return y;if(a)return Nn=Cn,_(),this._hideClone(),b("revert"),Mt.eventCanceled||(Xi?Cn.insertBefore(Ye,Xi):Cn.appendChild(Ye)),w(!0);var k=Dg(t,s.draggable);if(!k||qV(e,g,this)&&!k.animated){if(k===Ye)return w(!1);if(k&&t===e.target&&(r=k),r&&(i=In(r)),Td(Cn,t,Ye,o,r,i,e,!!r)!==!1)return _(),t.appendChild(Ye),Nn=t,T(),w(!0)}else if(k&&YV(e,g,this)){var x=Pl(t,0,s,!0);if(x===Ye)return w(!1);if(r=x,i=In(r),Td(Cn,t,Ye,o,r,i,e,!1)!==!1)return _(),t.insertBefore(Ye,x),Nn=t,T(),w(!0)}else if(r.parentNode===t){i=In(r);var M=0,D,A=Ye.parentNode!==t,P=!HV(Ye.animated&&Ye.toRect||o,r.animated&&r.toRect||i,g),$=g?"top":"left",B=a2(r,"top","top")||a2(Ye,"top","top"),j=B?B.scrollTop:void 0;dl!==r&&(D=i[$],Ru=!1,Id=!P&&s.invertSwap||A),M=GV(e,r,i,g,P?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,Id,dl===r);var U;if(M!==0){var G=Ln(Ye);do G-=M,U=Nn.children[G];while(U&&(pt(U,"display")==="none"||U===Vt))}if(M===0||U===r)return w(!1);dl=r,$u=M;var N=r.nextElementSibling,R=!1;R=M===1;var X=Td(Cn,t,Ye,o,r,i,e,R);if(X!==!1)return(X===1||X===-1)&&(R=X===1),Pv=!0,setTimeout(KV,30),_(),R&&!N?t.appendChild(Ye):r.parentNode.insertBefore(Ye,R?N:r),B&&RS(B,0,j-B.scrollTop),Nn=Ye.parentNode,D!==void 0&&!Id&&(af=Math.abs(D-In(r)[$])),T(),w(!0)}if(t.contains(Ye))return w(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Gt(document,"mousemove",this._onTouchMove),Gt(document,"touchmove",this._onTouchMove),Gt(document,"pointermove",this._onTouchMove),Gt(document,"dragover",qi),Gt(document,"mousemove",qi),Gt(document,"touchmove",qi)},_offUpEvents:function(){var e=this.el.ownerDocument;Gt(e,"mouseup",this._onDrop),Gt(e,"touchend",this._onDrop),Gt(e,"pointerup",this._onDrop),Gt(e,"touchcancel",this._onDrop),Gt(document,"selectstart",this)},_onDrop:function(e){var t=this.el,r=this.options;if(Xr=Ln(Ye),ti=Ln(Ye,r.draggable),Rr("drop",this,{evt:e}),Nn=Ye&&Ye.parentNode,Xr=Ln(Ye),ti=Ln(Ye,r.draggable),Mt.eventCanceled){this._nulling();return}vl=!1,Id=!1,Ru=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),$v(this.cloneId),$v(this._dragStartId),this.nativeDraggable&&(Gt(document,"drop",this),Gt(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ou&&pt(document.body,"user-select",""),pt(Ye,"transform",""),e&&(_u&&(e.cancelable&&e.preventDefault(),!r.dropBubble&&e.stopPropagation()),Vt&&Vt.parentNode&&Vt.parentNode.removeChild(Vt),(Cn===Nn||sr&&sr.lastPutMode!=="clone")&&Fn&&Fn.parentNode&&Fn.parentNode.removeChild(Fn),Ye&&(this.nativeDraggable&&Gt(Ye,"dragend",this),Om(Ye),Ye.style["will-change"]="",_u&&!vl&&On(Ye,sr?sr.options.ghostClass:this.options.ghostClass,!1),On(Ye,this.options.chosenClass,!1),kr({sortable:this,name:"unchoose",toEl:Nn,newIndex:null,newDraggableIndex:null,originalEvent:e}),Cn!==Nn?(Xr>=0&&(kr({rootEl:Nn,name:"add",toEl:Nn,fromEl:Cn,originalEvent:e}),kr({sortable:this,name:"remove",toEl:Nn,originalEvent:e}),kr({rootEl:Nn,name:"sort",toEl:Nn,fromEl:Cn,originalEvent:e}),kr({sortable:this,name:"sort",toEl:Nn,originalEvent:e})),sr&&sr.save()):Xr!==wl&&Xr>=0&&(kr({sortable:this,name:"update",toEl:Nn,originalEvent:e}),kr({sortable:this,name:"sort",toEl:Nn,originalEvent:e})),Mt.active&&((Xr==null||Xr===-1)&&(Xr=wl,ti=Pu),kr({sortable:this,name:"end",toEl:Nn,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Rr("nulling",this),Cn=Ye=Nn=Vt=Xi=Fn=of=ai=Yi=Mo=_u=Xr=ti=wl=Pu=dl=$u=sr=Cd=Mt.dragged=Mt.ghost=Mt.clone=Mt.active=null,Af.forEach(function(e){e.checked=!0}),Af.length=Em=Tm=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Ye&&(this._onDragOver(e),jV(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,r=this.el.children,o=0,i=r.length,a=this.options;o<i;o++)t=r[o],Po(t,a.draggable,this.el,!1)&&e.push(t.getAttribute(a.dataIdAttr)||XV(t));return e},sort:function(e,t){var r={},o=this.el;this.toArray().forEach(function(i,a){var s=o.children[a];Po(s,this.options.draggable,o,!1)&&(r[i]=s)},this),t&&this.captureAnimationState(),e.forEach(function(i){r[i]&&(o.removeChild(r[i]),o.appendChild(r[i]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return Po(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var r=this.options;if(t===void 0)return r[e];var o=xc.modifyOption(this,e,t);typeof o<"u"?r[e]=o:r[e]=t,e==="group"&&FS(r)},destroy:function(){Rr("destroy",this);var e=this.el;e[vr]=null,Gt(e,"mousedown",this._onTapStart),Gt(e,"touchstart",this._onTapStart),Gt(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(Gt(e,"dragover",this),Gt(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Of.splice(Of.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!ai){if(Rr("hideClone",this),Mt.eventCanceled)return;pt(Fn,"display","none"),this.options.removeCloneOnHide&&Fn.parentNode&&Fn.parentNode.removeChild(Fn),ai=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(ai){if(Rr("showClone",this),Mt.eventCanceled)return;Ye.parentNode==Cn&&!this.options.group.revertClone?Cn.insertBefore(Fn,Ye):Xi?Cn.insertBefore(Fn,Xi):Cn.appendChild(Fn),this.options.group.revertClone&&this.animate(Ye,Fn),pt(Fn,"display",""),ai=!1}}};function jV(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function Td(n,e,t,r,o,i,a,s){var l,c=n[vr],d=c.options.onMove,f;return window.CustomEvent&&!za&&!wc?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=e,l.from=n,l.dragged=t,l.draggedRect=r,l.related=o||e,l.relatedRect=i||In(e),l.willInsertAfter=s,l.originalEvent=a,n.dispatchEvent(l),d&&(f=d.call(c,l,a)),f}function Om(n){n.draggable=!1}function KV(){Pv=!1}function YV(n,e,t){var r=In(Pl(t.el,0,t.options,!0)),o=10;return e?n.clientX<r.left-o||n.clientY<r.top&&n.clientX<r.right:n.clientY<r.top-o||n.clientY<r.bottom&&n.clientX<r.left}function qV(n,e,t){var r=In(Dg(t.el,t.options.draggable)),o=10;return e?n.clientX>r.right+o||n.clientX<=r.right&&n.clientY>r.bottom&&n.clientX>=r.left:n.clientX>r.right&&n.clientY>r.top||n.clientX<=r.right&&n.clientY>r.bottom+o}function GV(n,e,t,r,o,i,a,s){var l=r?n.clientY:n.clientX,c=r?t.height:t.width,d=r?t.top:t.left,f=r?t.bottom:t.right,m=!1;if(!a){if(s&&af<c*o){if(!Ru&&($u===1?l>d+c*i/2:l<f-c*i/2)&&(Ru=!0),Ru)m=!0;else if($u===1?l<d+af:l>f-af)return-$u}else if(l>d+c*(1-o)/2&&l<f-c*(1-o)/2)return JV(e)}return m=m||a,m&&(l<d+c*i/2||l>f-c*i/2)?l>d+c/2?1:-1:0}function JV(n){return Ln(Ye)<Ln(n)?1:-1}function XV(n){for(var e=n.tagName+n.className+n.src+n.href+n.textContent,t=e.length,r=0;t--;)r+=e.charCodeAt(t);return r.toString(36)}function QV(n){Af.length=0;for(var e=n.getElementsByTagName("input"),t=e.length;t--;){var r=e[t];r.checked&&Af.push(r)}}function sf(n){return setTimeout(n,0)}function $v(n){return clearTimeout(n)}Op&&tn(document,"touchmove",function(n){(Mt.active||vl)&&n.cancelable&&n.preventDefault()});Mt.utils={on:tn,off:Gt,css:pt,find:PS,is:function(e,t){return!!Po(e,t,e,!1)},extend:DV,throttle:$S,closest:Po,toggleClass:On,clone:Ng,index:Ln,nextTick:sf,cancelNextTick:$v,detectDirection:NS,getChild:Pl};Mt.get=function(n){return n[vr]};Mt.mount=function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(Mt.utils=ea(ea({},Mt.utils),r.utils)),xc.mount(r)})};Mt.create=function(n,e){return new Mt(n,e)};Mt.version=AV;var Un=[],wu,Rv,Dv=!1,Am,Pm,Pf,xu;function ZV(){function n(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return n.prototype={dragStarted:function(t){var r=t.originalEvent;this.sortable.nativeDraggable?tn(document,"dragover",this._handleAutoScroll):this.options.supportPointer?tn(document,"pointermove",this._handleFallbackAutoScroll):r.touches?tn(document,"touchmove",this._handleFallbackAutoScroll):tn(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var r=t.originalEvent;!this.options.dragOverBubble&&!r.rootEl&&this._handleAutoScroll(r)},drop:function(){this.sortable.nativeDraggable?Gt(document,"dragover",this._handleAutoScroll):(Gt(document,"pointermove",this._handleFallbackAutoScroll),Gt(document,"touchmove",this._handleFallbackAutoScroll),Gt(document,"mousemove",this._handleFallbackAutoScroll)),d2(),lf(),NV()},nulling:function(){Pf=Rv=wu=Dv=xu=Am=Pm=null,Un.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,r){var o=this,i=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,s=document.elementFromPoint(i,a);if(Pf=t,r||this.options.forceAutoScrollFallback||wc||za||Ou){$m(t,this.options,s,r);var l=ci(s,!0);Dv&&(!xu||i!==Am||a!==Pm)&&(xu&&d2(),xu=setInterval(function(){var c=ci(document.elementFromPoint(i,a),!0);c!==l&&(l=c,lf()),$m(t,o.options,c,r)},10),Am=i,Pm=a)}else{if(!this.options.bubbleScroll||ci(s,!0)===Xo()){lf();return}$m(t,this.options,ci(s,!1),!1)}}},_o(n,{pluginName:"scroll",initializeByDefault:!0})}function lf(){Un.forEach(function(n){clearInterval(n.pid)}),Un=[]}function d2(){clearInterval(xu)}var $m=$S(function(n,e,t,r){if(e.scroll){var o=(n.touches?n.touches[0]:n).clientX,i=(n.touches?n.touches[0]:n).clientY,a=e.scrollSensitivity,s=e.scrollSpeed,l=Xo(),c=!1,d;Rv!==t&&(Rv=t,lf(),wu=e.scroll,d=e.scrollFn,wu===!0&&(wu=ci(t,!0)));var f=0,m=wu;do{var g=m,v=In(g),y=v.top,b=v.bottom,_=v.left,w=v.right,T=v.width,k=v.height,x=void 0,M=void 0,D=g.scrollWidth,A=g.scrollHeight,P=pt(g),$=g.scrollLeft,B=g.scrollTop;g===l?(x=T<D&&(P.overflowX==="auto"||P.overflowX==="scroll"||P.overflowX==="visible"),M=k<A&&(P.overflowY==="auto"||P.overflowY==="scroll"||P.overflowY==="visible")):(x=T<D&&(P.overflowX==="auto"||P.overflowX==="scroll"),M=k<A&&(P.overflowY==="auto"||P.overflowY==="scroll"));var j=x&&(Math.abs(w-o)<=a&&$+T<D)-(Math.abs(_-o)<=a&&!!$),U=M&&(Math.abs(b-i)<=a&&B+k<A)-(Math.abs(y-i)<=a&&!!B);if(!Un[f])for(var G=0;G<=f;G++)Un[G]||(Un[G]={});(Un[f].vx!=j||Un[f].vy!=U||Un[f].el!==g)&&(Un[f].el=g,Un[f].vx=j,Un[f].vy=U,clearInterval(Un[f].pid),(j!=0||U!=0)&&(c=!0,Un[f].pid=setInterval((function(){r&&this.layer===0&&Mt.active._onTouchMove(Pf);var N=Un[this.layer].vy?Un[this.layer].vy*s:0,R=Un[this.layer].vx?Un[this.layer].vx*s:0;typeof d=="function"&&d.call(Mt.dragged.parentNode[vr],R,N,n,Pf,Un[this.layer].el)!=="continue"||RS(Un[this.layer].el,R,N)}).bind({layer:f}),24))),f++}while(e.bubbleScroll&&m!==l&&(m=ci(m,!1)));Dv=c}},30),VS=function(e){var t=e.originalEvent,r=e.putSortable,o=e.dragEl,i=e.activeSortable,a=e.dispatchSortableEvent,s=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var c=r||i;s();var d=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,f=document.elementFromPoint(d.clientX,d.clientY);l(),c&&!c.el.contains(f)&&(a("spill"),this.onSpill({dragEl:o,putSortable:r}))}};function Fg(){}Fg.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,r=e.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var o=Pl(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(t,o):this.sortable.el.appendChild(t),this.sortable.animateAll(),r&&r.animateAll()},drop:VS};_o(Fg,{pluginName:"revertOnSpill"});function Lg(){}Lg.prototype={onSpill:function(e){var t=e.dragEl,r=e.putSortable,o=r||this.sortable;o.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),o.animateAll()},drop:VS};_o(Lg,{pluginName:"removeOnSpill"});var fo;function ez(){function n(){this.defaults={swapClass:"sortable-swap-highlight"}}return n.prototype={dragStart:function(t){var r=t.dragEl;fo=r},dragOverValid:function(t){var r=t.completed,o=t.target,i=t.onMove,a=t.activeSortable,s=t.changed,l=t.cancel;if(a.options.swap){var c=this.sortable.el,d=this.options;if(o&&o!==c){var f=fo;i(o)!==!1?(On(o,d.swapClass,!0),fo=o):fo=null,f&&f!==fo&&On(f,d.swapClass,!1)}s(),r(!0),l()}},drop:function(t){var r=t.activeSortable,o=t.putSortable,i=t.dragEl,a=o||this.sortable,s=this.options;fo&&On(fo,s.swapClass,!1),fo&&(s.swap||o&&o.options.swap)&&i!==fo&&(a.captureAnimationState(),a!==r&&r.captureAnimationState(),tz(i,fo),a.animateAll(),a!==r&&r.animateAll())},nulling:function(){fo=null}},_o(n,{pluginName:"swap",eventProperties:function(){return{swapItem:fo}}})}function tz(n,e){var t=n.parentNode,r=e.parentNode,o,i;!t||!r||t.isEqualNode(e)||r.isEqualNode(n)||(o=Ln(n),i=Ln(e),t.isEqualNode(r)&&o<i&&i++,t.insertBefore(e,t.children[o]),r.insertBefore(n,r.children[i]))}var Nt=[],Jr=[],du,Oo,fu=!1,Dr=!1,fl=!1,bn,pu,Md;function nz(){function n(e){for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this));e.options.supportPointer?tn(document,"pointerup",this._deselectMultiDrag):(tn(document,"mouseup",this._deselectMultiDrag),tn(document,"touchend",this._deselectMultiDrag)),tn(document,"keydown",this._checkKeyDown),tn(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,setData:function(o,i){var a="";Nt.length&&Oo===e?Nt.forEach(function(s,l){a+=(l?", ":"")+s.textContent}):a=i.textContent,o.setData("Text",a)}}}return n.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){var r=t.dragEl;bn=r},delayEnded:function(){this.isMultiDrag=~Nt.indexOf(bn)},setupClone:function(t){var r=t.sortable,o=t.cancel;if(this.isMultiDrag){for(var i=0;i<Nt.length;i++)Jr.push(Ng(Nt[i])),Jr[i].sortableIndex=Nt[i].sortableIndex,Jr[i].draggable=!1,Jr[i].style["will-change"]="",On(Jr[i],this.options.selectedClass,!1),Nt[i]===bn&&On(Jr[i],this.options.chosenClass,!1);r._hideClone(),o()}},clone:function(t){var r=t.sortable,o=t.rootEl,i=t.dispatchSortableEvent,a=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||Nt.length&&Oo===r&&(f2(!0,o),i("clone"),a()))},showClone:function(t){var r=t.cloneNowShown,o=t.rootEl,i=t.cancel;this.isMultiDrag&&(f2(!1,o),Jr.forEach(function(a){pt(a,"display","")}),r(),Md=!1,i())},hideClone:function(t){var r=this;t.sortable;var o=t.cloneNowHidden,i=t.cancel;this.isMultiDrag&&(Jr.forEach(function(a){pt(a,"display","none"),r.options.removeCloneOnHide&&a.parentNode&&a.parentNode.removeChild(a)}),o(),Md=!0,i())},dragStartGlobal:function(t){t.sortable,!this.isMultiDrag&&Oo&&Oo.multiDrag._deselectMultiDrag(),Nt.forEach(function(r){r.sortableIndex=Ln(r)}),Nt=Nt.sort(function(r,o){return r.sortableIndex-o.sortableIndex}),fl=!0},dragStarted:function(t){var r=this,o=t.sortable;if(this.isMultiDrag){if(this.options.sort&&(o.captureAnimationState(),this.options.animation)){Nt.forEach(function(a){a!==bn&&pt(a,"position","absolute")});var i=In(bn,!1,!0,!0);Nt.forEach(function(a){a!==bn&&s2(a,i)}),Dr=!0,fu=!0}o.animateAll(function(){Dr=!1,fu=!1,r.options.animation&&Nt.forEach(function(a){Cm(a)}),r.options.sort&&Od()})}},dragOver:function(t){var r=t.target,o=t.completed,i=t.cancel;Dr&&~Nt.indexOf(r)&&(o(!1),i())},revert:function(t){var r=t.fromSortable,o=t.rootEl,i=t.sortable,a=t.dragRect;Nt.length>1&&(Nt.forEach(function(s){i.addAnimationState({target:s,rect:Dr?In(s):a}),Cm(s),s.fromRect=a,r.removeAnimationState(s)}),Dr=!1,rz(!this.options.removeCloneOnHide,o))},dragOverCompleted:function(t){var r=t.sortable,o=t.isOwner,i=t.insertion,a=t.activeSortable,s=t.parentEl,l=t.putSortable,c=this.options;if(i){if(o&&a._hideClone(),fu=!1,c.animation&&Nt.length>1&&(Dr||!o&&!a.options.sort&&!l)){var d=In(bn,!1,!0,!0);Nt.forEach(function(m){m!==bn&&(s2(m,d),s.appendChild(m))}),Dr=!0}if(!o)if(Dr||Od(),Nt.length>1){var f=Md;a._showClone(r),a.options.animation&&!Md&&f&&Jr.forEach(function(m){a.addAnimationState({target:m,rect:pu}),m.fromRect=pu,m.thisAnimationDuration=null})}else a._showClone(r)}},dragOverAnimationCapture:function(t){var r=t.dragRect,o=t.isOwner,i=t.activeSortable;if(Nt.forEach(function(s){s.thisAnimationDuration=null}),i.options.animation&&!o&&i.multiDrag.isMultiDrag){pu=_o({},r);var a=ps(bn,!0);pu.top-=a.f,pu.left-=a.e}},dragOverAnimationComplete:function(){Dr&&(Dr=!1,Od())},drop:function(t){var r=t.originalEvent,o=t.rootEl,i=t.parentEl,a=t.sortable,s=t.dispatchSortableEvent,l=t.oldIndex,c=t.putSortable,d=c||this.sortable;if(r){var f=this.options,m=i.children;if(!fl)if(f.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),On(bn,f.selectedClass,!~Nt.indexOf(bn)),~Nt.indexOf(bn))Nt.splice(Nt.indexOf(bn),1),du=null,Su({sortable:a,rootEl:o,name:"deselect",targetEl:bn});else{if(Nt.push(bn),Su({sortable:a,rootEl:o,name:"select",targetEl:bn}),r.shiftKey&&du&&a.el.contains(du)){var g=Ln(du),v=Ln(bn);if(~g&&~v&&g!==v){var y,b;for(v>g?(b=g,y=v):(b=v,y=g+1);b<y;b++)~Nt.indexOf(m[b])||(On(m[b],f.selectedClass,!0),Nt.push(m[b]),Su({sortable:a,rootEl:o,name:"select",targetEl:m[b]}))}}else du=bn;Oo=d}if(fl&&this.isMultiDrag){if(Dr=!1,(i[vr].options.sort||i!==o)&&Nt.length>1){var _=In(bn),w=Ln(bn,":not(."+this.options.selectedClass+")");if(!fu&&f.animation&&(bn.thisAnimationDuration=null),d.captureAnimationState(),!fu&&(f.animation&&(bn.fromRect=_,Nt.forEach(function(k){if(k.thisAnimationDuration=null,k!==bn){var x=Dr?In(k):_;k.fromRect=x,d.addAnimationState({target:k,rect:x})}})),Od(),Nt.forEach(function(k){m[w]?i.insertBefore(k,m[w]):i.appendChild(k),w++}),l===Ln(bn))){var T=!1;Nt.forEach(function(k){if(k.sortableIndex!==Ln(k)){T=!0;return}}),T&&s("update")}Nt.forEach(function(k){Cm(k)}),d.animateAll()}Oo=d}(o===i||c&&c.lastPutMode!=="clone")&&Jr.forEach(function(k){k.parentNode&&k.parentNode.removeChild(k)})}},nullingGlobal:function(){this.isMultiDrag=fl=!1,Jr.length=0},destroyGlobal:function(){this._deselectMultiDrag(),Gt(document,"pointerup",this._deselectMultiDrag),Gt(document,"mouseup",this._deselectMultiDrag),Gt(document,"touchend",this._deselectMultiDrag),Gt(document,"keydown",this._checkKeyDown),Gt(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(typeof fl<"u"&&fl)&&Oo===this.sortable&&!(t&&Po(t.target,this.options.draggable,this.sortable.el,!1))&&!(t&&t.button!==0))for(;Nt.length;){var r=Nt[0];On(r,this.options.selectedClass,!1),Nt.shift(),Su({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:r})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},_o(n,{pluginName:"multiDrag",utils:{select:function(t){var r=t.parentNode[vr];!r||!r.options.multiDrag||~Nt.indexOf(t)||(Oo&&Oo!==r&&(Oo.multiDrag._deselectMultiDrag(),Oo=r),On(t,r.options.selectedClass,!0),Nt.push(t))},deselect:function(t){var r=t.parentNode[vr],o=Nt.indexOf(t);!r||!r.options.multiDrag||!~o||(On(t,r.options.selectedClass,!1),Nt.splice(o,1))}},eventProperties:function(){var t=this,r=[],o=[];return Nt.forEach(function(i){r.push({multiDragElement:i,index:i.sortableIndex});var a;Dr&&i!==bn?a=-1:Dr?a=Ln(i,":not(."+t.options.selectedClass+")"):a=Ln(i),o.push({multiDragElement:i,index:a})}),{items:IV(Nt),clones:[].concat(Jr),oldIndicies:r,newIndicies:o}},optionListeners:{multiDragKey:function(t){return t=t.toLowerCase(),t==="ctrl"?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}function rz(n,e){Nt.forEach(function(t,r){var o=e.children[t.sortableIndex+(n?Number(r):0)];o?e.insertBefore(t,o):e.appendChild(t)})}function f2(n,e){Jr.forEach(function(t,r){var o=e.children[t.sortableIndex+(n?Number(r):0)];o?e.insertBefore(t,o):e.appendChild(t)})}function Od(){Nt.forEach(function(n){n!==bn&&n.parentNode&&n.parentNode.removeChild(n)})}Mt.mount(new ZV);Mt.mount(Lg,Fg);const oz=Object.freeze(Object.defineProperty({__proto__:null,MultiDrag:nz,Sortable:Mt,Swap:ez,default:Mt},Symbol.toStringTag,{value:"Module"})),az=X3(oz);var iz=nf.exports,p2;function sz(){return p2||(p2=1,function(n,e){(function(r,o){n.exports=o(wV,az)})(typeof self<"u"?self:iz,function(t,r){return function(o){var i={};function a(s){if(i[s])return i[s].exports;var l=i[s]={i:s,l:!1,exports:{}};return o[s].call(l.exports,l,l.exports,a),l.l=!0,l.exports}return a.m=o,a.c=i,a.d=function(s,l,c){a.o(s,l)||Object.defineProperty(s,l,{enumerable:!0,get:c})},a.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},a.t=function(s,l){if(l&1&&(s=a(s)),l&8||l&4&&typeof s=="object"&&s&&s.__esModule)return s;var c=Object.create(null);if(a.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:s}),l&2&&typeof s!="string")for(var d in s)a.d(c,d,(function(f){return s[f]}).bind(null,d));return c},a.n=function(s){var l=s&&s.__esModule?function(){return s.default}:function(){return s};return a.d(l,"a",l),l},a.o=function(s,l){return Object.prototype.hasOwnProperty.call(s,l)},a.p="",a(a.s="fb15")}({"00ee":function(o,i,a){var s=a("b622"),l=s("toStringTag"),c={};c[l]="z",o.exports=String(c)==="[object z]"},"0366":function(o,i,a){var s=a("1c0b");o.exports=function(l,c,d){if(s(l),c===void 0)return l;switch(d){case 0:return function(){return l.call(c)};case 1:return function(f){return l.call(c,f)};case 2:return function(f,m){return l.call(c,f,m)};case 3:return function(f,m,g){return l.call(c,f,m,g)}}return function(){return l.apply(c,arguments)}}},"057f":function(o,i,a){var s=a("fc6a"),l=a("241c").f,c={}.toString,d=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],f=function(m){try{return l(m)}catch{return d.slice()}};o.exports.f=function(g){return d&&c.call(g)=="[object Window]"?f(g):l(s(g))}},"06cf":function(o,i,a){var s=a("83ab"),l=a("d1e7"),c=a("5c6c"),d=a("fc6a"),f=a("c04e"),m=a("5135"),g=a("0cfb"),v=Object.getOwnPropertyDescriptor;i.f=s?v:function(b,_){if(b=d(b),_=f(_,!0),g)try{return v(b,_)}catch{}if(m(b,_))return c(!l.f.call(b,_),b[_])}},"0cfb":function(o,i,a){var s=a("83ab"),l=a("d039"),c=a("cc12");o.exports=!s&&!l(function(){return Object.defineProperty(c("div"),"a",{get:function(){return 7}}).a!=7})},"13d5":function(o,i,a){var s=a("23e7"),l=a("d58f").left,c=a("a640"),d=a("ae40"),f=c("reduce"),m=d("reduce",{1:0});s({target:"Array",proto:!0,forced:!f||!m},{reduce:function(v){return l(this,v,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"14c3":function(o,i,a){var s=a("c6b6"),l=a("9263");o.exports=function(c,d){var f=c.exec;if(typeof f=="function"){var m=f.call(c,d);if(typeof m!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return m}if(s(c)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return l.call(c,d)}},"159b":function(o,i,a){var s=a("da84"),l=a("fdbc"),c=a("17c2"),d=a("9112");for(var f in l){var m=s[f],g=m&&m.prototype;if(g&&g.forEach!==c)try{d(g,"forEach",c)}catch{g.forEach=c}}},"17c2":function(o,i,a){var s=a("b727").forEach,l=a("a640"),c=a("ae40"),d=l("forEach"),f=c("forEach");o.exports=!d||!f?function(g){return s(this,g,arguments.length>1?arguments[1]:void 0)}:[].forEach},"1be4":function(o,i,a){var s=a("d066");o.exports=s("document","documentElement")},"1c0b":function(o,i){o.exports=function(a){if(typeof a!="function")throw TypeError(String(a)+" is not a function");return a}},"1c7e":function(o,i,a){var s=a("b622"),l=s("iterator"),c=!1;try{var d=0,f={next:function(){return{done:!!d++}},return:function(){c=!0}};f[l]=function(){return this},Array.from(f,function(){throw 2})}catch{}o.exports=function(m,g){if(!g&&!c)return!1;var v=!1;try{var y={};y[l]=function(){return{next:function(){return{done:v=!0}}}},m(y)}catch{}return v}},"1d80":function(o,i){o.exports=function(a){if(a==null)throw TypeError("Can't call method on "+a);return a}},"1dde":function(o,i,a){var s=a("d039"),l=a("b622"),c=a("2d00"),d=l("species");o.exports=function(f){return c>=51||!s(function(){var m=[],g=m.constructor={};return g[d]=function(){return{foo:1}},m[f](Boolean).foo!==1})}},"23cb":function(o,i,a){var s=a("a691"),l=Math.max,c=Math.min;o.exports=function(d,f){var m=s(d);return m<0?l(m+f,0):c(m,f)}},"23e7":function(o,i,a){var s=a("da84"),l=a("06cf").f,c=a("9112"),d=a("6eeb"),f=a("ce4e"),m=a("e893"),g=a("94ca");o.exports=function(v,y){var b=v.target,_=v.global,w=v.stat,T,k,x,M,D,A;if(_?k=s:w?k=s[b]||f(b,{}):k=(s[b]||{}).prototype,k)for(x in y){if(D=y[x],v.noTargetGet?(A=l(k,x),M=A&&A.value):M=k[x],T=g(_?x:b+(w?".":"#")+x,v.forced),!T&&M!==void 0){if(typeof D==typeof M)continue;m(D,M)}(v.sham||M&&M.sham)&&c(D,"sham",!0),d(k,x,D,v)}}},"241c":function(o,i,a){var s=a("ca84"),l=a("7839"),c=l.concat("length","prototype");i.f=Object.getOwnPropertyNames||function(f){return s(f,c)}},"25f0":function(o,i,a){var s=a("6eeb"),l=a("825a"),c=a("d039"),d=a("ad6d"),f="toString",m=RegExp.prototype,g=m[f],v=c(function(){return g.call({source:"a",flags:"b"})!="/a/b"}),y=g.name!=f;(v||y)&&s(RegExp.prototype,f,function(){var _=l(this),w=String(_.source),T=_.flags,k=String(T===void 0&&_ instanceof RegExp&&!("flags"in m)?d.call(_):T);return"/"+w+"/"+k},{unsafe:!0})},"2ca0":function(o,i,a){var s=a("23e7"),l=a("06cf").f,c=a("50c4"),d=a("5a34"),f=a("1d80"),m=a("ab13"),g=a("c430"),v="".startsWith,y=Math.min,b=m("startsWith"),_=!g&&!b&&!!function(){var w=l(String.prototype,"startsWith");return w&&!w.writable}();s({target:"String",proto:!0,forced:!_&&!b},{startsWith:function(T){var k=String(f(this));d(T);var x=c(y(arguments.length>1?arguments[1]:void 0,k.length)),M=String(T);return v?v.call(k,M,x):k.slice(x,x+M.length)===M}})},"2d00":function(o,i,a){var s=a("da84"),l=a("342f"),c=s.process,d=c&&c.versions,f=d&&d.v8,m,g;f?(m=f.split("."),g=m[0]+m[1]):l&&(m=l.match(/Edge\/(\d+)/),(!m||m[1]>=74)&&(m=l.match(/Chrome\/(\d+)/),m&&(g=m[1]))),o.exports=g&&+g},"342f":function(o,i,a){var s=a("d066");o.exports=s("navigator","userAgent")||""},"35a1":function(o,i,a){var s=a("f5df"),l=a("3f8c"),c=a("b622"),d=c("iterator");o.exports=function(f){if(f!=null)return f[d]||f["@@iterator"]||l[s(f)]}},"37e8":function(o,i,a){var s=a("83ab"),l=a("9bf2"),c=a("825a"),d=a("df75");o.exports=s?Object.defineProperties:function(m,g){c(m);for(var v=d(g),y=v.length,b=0,_;y>b;)l.f(m,_=v[b++],g[_]);return m}},"3bbe":function(o,i,a){var s=a("861d");o.exports=function(l){if(!s(l)&&l!==null)throw TypeError("Can't set "+String(l)+" as a prototype");return l}},"3ca3":function(o,i,a){var s=a("6547").charAt,l=a("69f3"),c=a("7dd0"),d="String Iterator",f=l.set,m=l.getterFor(d);c(String,"String",function(g){f(this,{type:d,string:String(g),index:0})},function(){var v=m(this),y=v.string,b=v.index,_;return b>=y.length?{value:void 0,done:!0}:(_=s(y,b),v.index+=_.length,{value:_,done:!1})})},"3f8c":function(o,i){o.exports={}},4160:function(o,i,a){var s=a("23e7"),l=a("17c2");s({target:"Array",proto:!0,forced:[].forEach!=l},{forEach:l})},"428f":function(o,i,a){var s=a("da84");o.exports=s},"44ad":function(o,i,a){var s=a("d039"),l=a("c6b6"),c="".split;o.exports=s(function(){return!Object("z").propertyIsEnumerable(0)})?function(d){return l(d)=="String"?c.call(d,""):Object(d)}:Object},"44d2":function(o,i,a){var s=a("b622"),l=a("7c73"),c=a("9bf2"),d=s("unscopables"),f=Array.prototype;f[d]==null&&c.f(f,d,{configurable:!0,value:l(null)}),o.exports=function(m){f[d][m]=!0}},"44e7":function(o,i,a){var s=a("861d"),l=a("c6b6"),c=a("b622"),d=c("match");o.exports=function(f){var m;return s(f)&&((m=f[d])!==void 0?!!m:l(f)=="RegExp")}},4930:function(o,i,a){var s=a("d039");o.exports=!!Object.getOwnPropertySymbols&&!s(function(){return!String(Symbol())})},"4d64":function(o,i,a){var s=a("fc6a"),l=a("50c4"),c=a("23cb"),d=function(f){return function(m,g,v){var y=s(m),b=l(y.length),_=c(v,b),w;if(f&&g!=g){for(;b>_;)if(w=y[_++],w!=w)return!0}else for(;b>_;_++)if((f||_ in y)&&y[_]===g)return f||_||0;return!f&&-1}};o.exports={includes:d(!0),indexOf:d(!1)}},"4de4":function(o,i,a){var s=a("23e7"),l=a("b727").filter,c=a("1dde"),d=a("ae40"),f=c("filter"),m=d("filter");s({target:"Array",proto:!0,forced:!f||!m},{filter:function(v){return l(this,v,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(o,i,a){var s=a("0366"),l=a("7b0b"),c=a("9bdd"),d=a("e95a"),f=a("50c4"),m=a("8418"),g=a("35a1");o.exports=function(y){var b=l(y),_=typeof this=="function"?this:Array,w=arguments.length,T=w>1?arguments[1]:void 0,k=T!==void 0,x=g(b),M=0,D,A,P,$,B,j;if(k&&(T=s(T,w>2?arguments[2]:void 0,2)),x!=null&&!(_==Array&&d(x)))for($=x.call(b),B=$.next,A=new _;!(P=B.call($)).done;M++)j=k?c($,T,[P.value,M],!0):P.value,m(A,M,j);else for(D=f(b.length),A=new _(D);D>M;M++)j=k?T(b[M],M):b[M],m(A,M,j);return A.length=M,A}},"4fad":function(o,i,a){var s=a("23e7"),l=a("6f53").entries;s({target:"Object",stat:!0},{entries:function(d){return l(d)}})},"50c4":function(o,i,a){var s=a("a691"),l=Math.min;o.exports=function(c){return c>0?l(s(c),9007199254740991):0}},5135:function(o,i){var a={}.hasOwnProperty;o.exports=function(s,l){return a.call(s,l)}},5319:function(o,i,a){var s=a("d784"),l=a("825a"),c=a("7b0b"),d=a("50c4"),f=a("a691"),m=a("1d80"),g=a("8aa5"),v=a("14c3"),y=Math.max,b=Math.min,_=Math.floor,w=/\$([$&'`]|\d\d?|<[^>]*>)/g,T=/\$([$&'`]|\d\d?)/g,k=function(x){return x===void 0?x:String(x)};s("replace",2,function(x,M,D,A){var P=A.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,$=A.REPLACE_KEEPS_$0,B=P?"$":"$0";return[function(G,N){var R=m(this),X=G==null?void 0:G[x];return X!==void 0?X.call(G,R,N):M.call(String(R),G,N)},function(U,G){if(!P&&$||typeof G=="string"&&G.indexOf(B)===-1){var N=D(M,U,this,G);if(N.done)return N.value}var R=l(U),X=String(this),te=typeof G=="function";te||(G=String(G));var Y=R.global;if(Y){var re=R.unicode;R.lastIndex=0}for(var Q=[];;){var Z=v(R,X);if(Z===null||(Q.push(Z),!Y))break;var q=String(Z[0]);q===""&&(R.lastIndex=g(X,d(R.lastIndex),re))}for(var le="",ye=0,Re=0;Re<Q.length;Re++){Z=Q[Re];for(var ze=String(Z[0]),nt=y(b(f(Z.index),X.length),0),Ge=[],mt=1;mt<Z.length;mt++)Ge.push(k(Z[mt]));var ut=Z.groups;if(te){var Pt=[ze].concat(Ge,nt,X);ut!==void 0&&Pt.push(ut);var gt=String(G.apply(void 0,Pt))}else gt=j(ze,X,nt,Ge,ut,G);nt>=ye&&(le+=X.slice(ye,nt)+gt,ye=nt+ze.length)}return le+X.slice(ye)}];function j(U,G,N,R,X,te){var Y=N+U.length,re=R.length,Q=T;return X!==void 0&&(X=c(X),Q=w),M.call(te,Q,function(Z,q){var le;switch(q.charAt(0)){case"$":return"$";case"&":return U;case"`":return G.slice(0,N);case"'":return G.slice(Y);case"<":le=X[q.slice(1,-1)];break;default:var ye=+q;if(ye===0)return Z;if(ye>re){var Re=_(ye/10);return Re===0?Z:Re<=re?R[Re-1]===void 0?q.charAt(1):R[Re-1]+q.charAt(1):Z}le=R[ye-1]}return le===void 0?"":le})}})},5692:function(o,i,a){var s=a("c430"),l=a("c6cd");(o.exports=function(c,d){return l[c]||(l[c]=d!==void 0?d:{})})("versions",[]).push({version:"3.6.5",mode:s?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(o,i,a){var s=a("d066"),l=a("241c"),c=a("7418"),d=a("825a");o.exports=s("Reflect","ownKeys")||function(m){var g=l.f(d(m)),v=c.f;return v?g.concat(v(m)):g}},"5a34":function(o,i,a){var s=a("44e7");o.exports=function(l){if(s(l))throw TypeError("The method doesn't accept regular expressions");return l}},"5c6c":function(o,i){o.exports=function(a,s){return{enumerable:!(a&1),configurable:!(a&2),writable:!(a&4),value:s}}},"5db7":function(o,i,a){var s=a("23e7"),l=a("a2bf"),c=a("7b0b"),d=a("50c4"),f=a("1c0b"),m=a("65f0");s({target:"Array",proto:!0},{flatMap:function(v){var y=c(this),b=d(y.length),_;return f(v),_=m(y,0),_.length=l(_,y,y,b,0,1,v,arguments.length>1?arguments[1]:void 0),_}})},6547:function(o,i,a){var s=a("a691"),l=a("1d80"),c=function(d){return function(f,m){var g=String(l(f)),v=s(m),y=g.length,b,_;return v<0||v>=y?d?"":void 0:(b=g.charCodeAt(v),b<55296||b>56319||v+1===y||(_=g.charCodeAt(v+1))<56320||_>57343?d?g.charAt(v):b:d?g.slice(v,v+2):(b-55296<<10)+(_-56320)+65536)}};o.exports={codeAt:c(!1),charAt:c(!0)}},"65f0":function(o,i,a){var s=a("861d"),l=a("e8b5"),c=a("b622"),d=c("species");o.exports=function(f,m){var g;return l(f)&&(g=f.constructor,typeof g=="function"&&(g===Array||l(g.prototype))?g=void 0:s(g)&&(g=g[d],g===null&&(g=void 0))),new(g===void 0?Array:g)(m===0?0:m)}},"69f3":function(o,i,a){var s=a("7f9a"),l=a("da84"),c=a("861d"),d=a("9112"),f=a("5135"),m=a("f772"),g=a("d012"),v=l.WeakMap,y,b,_,w=function(P){return _(P)?b(P):y(P,{})},T=function(P){return function($){var B;if(!c($)||(B=b($)).type!==P)throw TypeError("Incompatible receiver, "+P+" required");return B}};if(s){var k=new v,x=k.get,M=k.has,D=k.set;y=function(P,$){return D.call(k,P,$),$},b=function(P){return x.call(k,P)||{}},_=function(P){return M.call(k,P)}}else{var A=m("state");g[A]=!0,y=function(P,$){return d(P,A,$),$},b=function(P){return f(P,A)?P[A]:{}},_=function(P){return f(P,A)}}o.exports={set:y,get:b,has:_,enforce:w,getterFor:T}},"6eeb":function(o,i,a){var s=a("da84"),l=a("9112"),c=a("5135"),d=a("ce4e"),f=a("8925"),m=a("69f3"),g=m.get,v=m.enforce,y=String(String).split("String");(o.exports=function(b,_,w,T){var k=T?!!T.unsafe:!1,x=T?!!T.enumerable:!1,M=T?!!T.noTargetGet:!1;if(typeof w=="function"&&(typeof _=="string"&&!c(w,"name")&&l(w,"name",_),v(w).source=y.join(typeof _=="string"?_:"")),b===s){x?b[_]=w:d(_,w);return}else k?!M&&b[_]&&(x=!0):delete b[_];x?b[_]=w:l(b,_,w)})(Function.prototype,"toString",function(){return typeof this=="function"&&g(this).source||f(this)})},"6f53":function(o,i,a){var s=a("83ab"),l=a("df75"),c=a("fc6a"),d=a("d1e7").f,f=function(m){return function(g){for(var v=c(g),y=l(v),b=y.length,_=0,w=[],T;b>_;)T=y[_++],(!s||d.call(v,T))&&w.push(m?[T,v[T]]:v[T]);return w}};o.exports={entries:f(!0),values:f(!1)}},"73d9":function(o,i,a){var s=a("44d2");s("flatMap")},7418:function(o,i){i.f=Object.getOwnPropertySymbols},"746f":function(o,i,a){var s=a("428f"),l=a("5135"),c=a("e538"),d=a("9bf2").f;o.exports=function(f){var m=s.Symbol||(s.Symbol={});l(m,f)||d(m,f,{value:c.f(f)})}},7839:function(o,i){o.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(o,i,a){var s=a("1d80");o.exports=function(l){return Object(s(l))}},"7c73":function(o,i,a){var s=a("825a"),l=a("37e8"),c=a("7839"),d=a("d012"),f=a("1be4"),m=a("cc12"),g=a("f772"),v=">",y="<",b="prototype",_="script",w=g("IE_PROTO"),T=function(){},k=function(P){return y+_+v+P+y+"/"+_+v},x=function(P){P.write(k("")),P.close();var $=P.parentWindow.Object;return P=null,$},M=function(){var P=m("iframe"),$="java"+_+":",B;return P.style.display="none",f.appendChild(P),P.src=String($),B=P.contentWindow.document,B.open(),B.write(k("document.F=Object")),B.close(),B.F},D,A=function(){try{D=document.domain&&new ActiveXObject("htmlfile")}catch{}A=D?x(D):M();for(var P=c.length;P--;)delete A[b][c[P]];return A()};d[w]=!0,o.exports=Object.create||function($,B){var j;return $!==null?(T[b]=s($),j=new T,T[b]=null,j[w]=$):j=A(),B===void 0?j:l(j,B)}},"7dd0":function(o,i,a){var s=a("23e7"),l=a("9ed3"),c=a("e163"),d=a("d2bb"),f=a("d44e"),m=a("9112"),g=a("6eeb"),v=a("b622"),y=a("c430"),b=a("3f8c"),_=a("ae93"),w=_.IteratorPrototype,T=_.BUGGY_SAFARI_ITERATORS,k=v("iterator"),x="keys",M="values",D="entries",A=function(){return this};o.exports=function(P,$,B,j,U,G,N){l(B,$,j);var R=function(Re){if(Re===U&&Q)return Q;if(!T&&Re in Y)return Y[Re];switch(Re){case x:return function(){return new B(this,Re)};case M:return function(){return new B(this,Re)};case D:return function(){return new B(this,Re)}}return function(){return new B(this)}},X=$+" Iterator",te=!1,Y=P.prototype,re=Y[k]||Y["@@iterator"]||U&&Y[U],Q=!T&&re||R(U),Z=$=="Array"&&Y.entries||re,q,le,ye;if(Z&&(q=c(Z.call(new P)),w!==Object.prototype&&q.next&&(!y&&c(q)!==w&&(d?d(q,w):typeof q[k]!="function"&&m(q,k,A)),f(q,X,!0,!0),y&&(b[X]=A))),U==M&&re&&re.name!==M&&(te=!0,Q=function(){return re.call(this)}),(!y||N)&&Y[k]!==Q&&m(Y,k,Q),b[$]=Q,U)if(le={values:R(M),keys:G?Q:R(x),entries:R(D)},N)for(ye in le)(T||te||!(ye in Y))&&g(Y,ye,le[ye]);else s({target:$,proto:!0,forced:T||te},le);return le}},"7f9a":function(o,i,a){var s=a("da84"),l=a("8925"),c=s.WeakMap;o.exports=typeof c=="function"&&/native code/.test(l(c))},"825a":function(o,i,a){var s=a("861d");o.exports=function(l){if(!s(l))throw TypeError(String(l)+" is not an object");return l}},"83ab":function(o,i,a){var s=a("d039");o.exports=!s(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},8418:function(o,i,a){var s=a("c04e"),l=a("9bf2"),c=a("5c6c");o.exports=function(d,f,m){var g=s(f);g in d?l.f(d,g,c(0,m)):d[g]=m}},"861d":function(o,i){o.exports=function(a){return typeof a=="object"?a!==null:typeof a=="function"}},8875:function(o,i,a){var s,l,c;(function(d,f){l=[],s=f,c=typeof s=="function"?s.apply(i,l):s,c!==void 0&&(o.exports=c)})(typeof self<"u"?self:this,function(){function d(){var f=Object.getOwnPropertyDescriptor(document,"currentScript");if(!f&&"currentScript"in document&&document.currentScript||f&&f.get!==d&&document.currentScript)return document.currentScript;try{throw new Error}catch(D){var m=/.*at [^(]*\((.*):(.+):(.+)\)$/ig,g=/@([^@]*):(\d+):(\d+)\s*$/ig,v=m.exec(D.stack)||g.exec(D.stack),y=v&&v[1]||!1,b=v&&v[2]||!1,_=document.location.href.replace(document.location.hash,""),w,T,k,x=document.getElementsByTagName("script");y===_&&(w=document.documentElement.outerHTML,T=new RegExp("(?:[^\\n]+?\\n){0,"+(b-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),k=w.replace(T,"$1").trim());for(var M=0;M<x.length;M++)if(x[M].readyState==="interactive"||x[M].src===y||y===_&&x[M].innerHTML&&x[M].innerHTML.trim()===k)return x[M];return null}}return d})},8925:function(o,i,a){var s=a("c6cd"),l=Function.toString;typeof s.inspectSource!="function"&&(s.inspectSource=function(c){return l.call(c)}),o.exports=s.inspectSource},"8aa5":function(o,i,a){var s=a("6547").charAt;o.exports=function(l,c,d){return c+(d?s(l,c).length:1)}},"8bbf":function(o,i){o.exports=t},"90e3":function(o,i){var a=0,s=Math.random();o.exports=function(l){return"Symbol("+String(l===void 0?"":l)+")_"+(++a+s).toString(36)}},9112:function(o,i,a){var s=a("83ab"),l=a("9bf2"),c=a("5c6c");o.exports=s?function(d,f,m){return l.f(d,f,c(1,m))}:function(d,f,m){return d[f]=m,d}},9263:function(o,i,a){var s=a("ad6d"),l=a("9f7f"),c=RegExp.prototype.exec,d=String.prototype.replace,f=c,m=function(){var b=/a/,_=/b*/g;return c.call(b,"a"),c.call(_,"a"),b.lastIndex!==0||_.lastIndex!==0}(),g=l.UNSUPPORTED_Y||l.BROKEN_CARET,v=/()??/.exec("")[1]!==void 0,y=m||v||g;y&&(f=function(_){var w=this,T,k,x,M,D=g&&w.sticky,A=s.call(w),P=w.source,$=0,B=_;return D&&(A=A.replace("y",""),A.indexOf("g")===-1&&(A+="g"),B=String(_).slice(w.lastIndex),w.lastIndex>0&&(!w.multiline||w.multiline&&_[w.lastIndex-1]!==`
`)&&(P="(?: "+P+")",B=" "+B,$++),k=new RegExp("^(?:"+P+")",A)),v&&(k=new RegExp("^"+P+"$(?!\\s)",A)),m&&(T=w.lastIndex),x=c.call(D?k:w,B),D?x?(x.input=x.input.slice($),x[0]=x[0].slice($),x.index=w.lastIndex,w.lastIndex+=x[0].length):w.lastIndex=0:m&&x&&(w.lastIndex=w.global?x.index+x[0].length:T),v&&x&&x.length>1&&d.call(x[0],k,function(){for(M=1;M<arguments.length-2;M++)arguments[M]===void 0&&(x[M]=void 0)}),x}),o.exports=f},"94ca":function(o,i,a){var s=a("d039"),l=/#|\.prototype\./,c=function(v,y){var b=f[d(v)];return b==g?!0:b==m?!1:typeof y=="function"?s(y):!!y},d=c.normalize=function(v){return String(v).replace(l,".").toLowerCase()},f=c.data={},m=c.NATIVE="N",g=c.POLYFILL="P";o.exports=c},"99af":function(o,i,a){var s=a("23e7"),l=a("d039"),c=a("e8b5"),d=a("861d"),f=a("7b0b"),m=a("50c4"),g=a("8418"),v=a("65f0"),y=a("1dde"),b=a("b622"),_=a("2d00"),w=b("isConcatSpreadable"),T=9007199254740991,k="Maximum allowed index exceeded",x=_>=51||!l(function(){var P=[];return P[w]=!1,P.concat()[0]!==P}),M=y("concat"),D=function(P){if(!d(P))return!1;var $=P[w];return $!==void 0?!!$:c(P)},A=!x||!M;s({target:"Array",proto:!0,forced:A},{concat:function($){var B=f(this),j=v(B,0),U=0,G,N,R,X,te;for(G=-1,R=arguments.length;G<R;G++)if(te=G===-1?B:arguments[G],D(te)){if(X=m(te.length),U+X>T)throw TypeError(k);for(N=0;N<X;N++,U++)N in te&&g(j,U,te[N])}else{if(U>=T)throw TypeError(k);g(j,U++,te)}return j.length=U,j}})},"9bdd":function(o,i,a){var s=a("825a");o.exports=function(l,c,d,f){try{return f?c(s(d)[0],d[1]):c(d)}catch(g){var m=l.return;throw m!==void 0&&s(m.call(l)),g}}},"9bf2":function(o,i,a){var s=a("83ab"),l=a("0cfb"),c=a("825a"),d=a("c04e"),f=Object.defineProperty;i.f=s?f:function(g,v,y){if(c(g),v=d(v,!0),c(y),l)try{return f(g,v,y)}catch{}if("get"in y||"set"in y)throw TypeError("Accessors not supported");return"value"in y&&(g[v]=y.value),g}},"9ed3":function(o,i,a){var s=a("ae93").IteratorPrototype,l=a("7c73"),c=a("5c6c"),d=a("d44e"),f=a("3f8c"),m=function(){return this};o.exports=function(g,v,y){var b=v+" Iterator";return g.prototype=l(s,{next:c(1,y)}),d(g,b,!1,!0),f[b]=m,g}},"9f7f":function(o,i,a){var s=a("d039");function l(c,d){return RegExp(c,d)}i.UNSUPPORTED_Y=s(function(){var c=l("a","y");return c.lastIndex=2,c.exec("abcd")!=null}),i.BROKEN_CARET=s(function(){var c=l("^r","gy");return c.lastIndex=2,c.exec("str")!=null})},a2bf:function(o,i,a){var s=a("e8b5"),l=a("50c4"),c=a("0366"),d=function(f,m,g,v,y,b,_,w){for(var T=y,k=0,x=_?c(_,w,3):!1,M;k<v;){if(k in g){if(M=x?x(g[k],k,m):g[k],b>0&&s(M))T=d(f,m,M,l(M.length),T,b-1)-1;else{if(T>=9007199254740991)throw TypeError("Exceed the acceptable array length");f[T]=M}T++}k++}return T};o.exports=d},a352:function(o,i){o.exports=r},a434:function(o,i,a){var s=a("23e7"),l=a("23cb"),c=a("a691"),d=a("50c4"),f=a("7b0b"),m=a("65f0"),g=a("8418"),v=a("1dde"),y=a("ae40"),b=v("splice"),_=y("splice",{ACCESSORS:!0,0:0,1:2}),w=Math.max,T=Math.min,k=9007199254740991,x="Maximum allowed length exceeded";s({target:"Array",proto:!0,forced:!b||!_},{splice:function(D,A){var P=f(this),$=d(P.length),B=l(D,$),j=arguments.length,U,G,N,R,X,te;if(j===0?U=G=0:j===1?(U=0,G=$-B):(U=j-2,G=T(w(c(A),0),$-B)),$+U-G>k)throw TypeError(x);for(N=m(P,G),R=0;R<G;R++)X=B+R,X in P&&g(N,R,P[X]);if(N.length=G,U<G){for(R=B;R<$-G;R++)X=R+G,te=R+U,X in P?P[te]=P[X]:delete P[te];for(R=$;R>$-G+U;R--)delete P[R-1]}else if(U>G)for(R=$-G;R>B;R--)X=R+G-1,te=R+U-1,X in P?P[te]=P[X]:delete P[te];for(R=0;R<U;R++)P[R+B]=arguments[R+2];return P.length=$-G+U,N}})},a4d3:function(o,i,a){var s=a("23e7"),l=a("da84"),c=a("d066"),d=a("c430"),f=a("83ab"),m=a("4930"),g=a("fdbf"),v=a("d039"),y=a("5135"),b=a("e8b5"),_=a("861d"),w=a("825a"),T=a("7b0b"),k=a("fc6a"),x=a("c04e"),M=a("5c6c"),D=a("7c73"),A=a("df75"),P=a("241c"),$=a("057f"),B=a("7418"),j=a("06cf"),U=a("9bf2"),G=a("d1e7"),N=a("9112"),R=a("6eeb"),X=a("5692"),te=a("f772"),Y=a("d012"),re=a("90e3"),Q=a("b622"),Z=a("e538"),q=a("746f"),le=a("d44e"),ye=a("69f3"),Re=a("b727").forEach,ze=te("hidden"),nt="Symbol",Ge="prototype",mt=Q("toPrimitive"),ut=ye.set,Pt=ye.getterFor(nt),gt=Object[Ge],tt=l.Symbol,Ct=c("JSON","stringify"),Bt=j.f,Ne=U.f,je=$.f,Be=G.f,qe=X("symbols"),Je=X("op-symbols"),ct=X("string-to-symbol-registry"),vt=X("symbol-to-string-registry"),Se=X("wks"),He=l.QObject,Tt=!He||!He[Ge]||!He[Ge].findChild,$t=f&&v(function(){return D(Ne({},"a",{get:function(){return Ne(this,"a",{value:7}).a}})).a!=7})?function(ke,Ee,Ke){var St=Bt(gt,Ee);St&&delete gt[Ee],Ne(ke,Ee,Ke),St&&ke!==gt&&Ne(gt,Ee,St)}:Ne,wt=function(ke,Ee){var Ke=qe[ke]=D(tt[Ge]);return ut(Ke,{type:nt,tag:ke,description:Ee}),f||(Ke.description=Ee),Ke},me=g?function(ke){return typeof ke=="symbol"}:function(ke){return Object(ke)instanceof tt},ce=function(Ee,Ke,St){Ee===gt&&ce(Je,Ke,St),w(Ee);var dt=x(Ke,!0);return w(St),y(qe,dt)?(St.enumerable?(y(Ee,ze)&&Ee[ze][dt]&&(Ee[ze][dt]=!1),St=D(St,{enumerable:M(0,!1)})):(y(Ee,ze)||Ne(Ee,ze,M(1,{})),Ee[ze][dt]=!0),$t(Ee,dt,St)):Ne(Ee,dt,St)},be=function(Ee,Ke){w(Ee);var St=k(Ke),dt=A(St).concat(W(St));return Re(dt,function(pe){(!f||de.call(St,pe))&&ce(Ee,pe,St[pe])}),Ee},Te=function(Ee,Ke){return Ke===void 0?D(Ee):be(D(Ee),Ke)},de=function(Ee){var Ke=x(Ee,!0),St=Be.call(this,Ke);return this===gt&&y(qe,Ke)&&!y(Je,Ke)?!1:St||!y(this,Ke)||!y(qe,Ke)||y(this,ze)&&this[ze][Ke]?St:!0},fe=function(Ee,Ke){var St=k(Ee),dt=x(Ke,!0);if(!(St===gt&&y(qe,dt)&&!y(Je,dt))){var pe=Bt(St,dt);return pe&&y(qe,dt)&&!(y(St,ze)&&St[ze][dt])&&(pe.enumerable=!0),pe}},ne=function(Ee){var Ke=je(k(Ee)),St=[];return Re(Ke,function(dt){!y(qe,dt)&&!y(Y,dt)&&St.push(dt)}),St},W=function(Ee){var Ke=Ee===gt,St=je(Ke?Je:k(Ee)),dt=[];return Re(St,function(pe){y(qe,pe)&&(!Ke||y(gt,pe))&&dt.push(qe[pe])}),dt};if(m||(tt=function(){if(this instanceof tt)throw TypeError("Symbol is not a constructor");var Ee=!arguments.length||arguments[0]===void 0?void 0:String(arguments[0]),Ke=re(Ee),St=function(dt){this===gt&&St.call(Je,dt),y(this,ze)&&y(this[ze],Ke)&&(this[ze][Ke]=!1),$t(this,Ke,M(1,dt))};return f&&Tt&&$t(gt,Ke,{configurable:!0,set:St}),wt(Ke,Ee)},R(tt[Ge],"toString",function(){return Pt(this).tag}),R(tt,"withoutSetter",function(ke){return wt(re(ke),ke)}),G.f=de,U.f=ce,j.f=fe,P.f=$.f=ne,B.f=W,Z.f=function(ke){return wt(Q(ke),ke)},f&&(Ne(tt[Ge],"description",{configurable:!0,get:function(){return Pt(this).description}}),d||R(gt,"propertyIsEnumerable",de,{unsafe:!0}))),s({global:!0,wrap:!0,forced:!m,sham:!m},{Symbol:tt}),Re(A(Se),function(ke){q(ke)}),s({target:nt,stat:!0,forced:!m},{for:function(ke){var Ee=String(ke);if(y(ct,Ee))return ct[Ee];var Ke=tt(Ee);return ct[Ee]=Ke,vt[Ke]=Ee,Ke},keyFor:function(Ee){if(!me(Ee))throw TypeError(Ee+" is not a symbol");if(y(vt,Ee))return vt[Ee]},useSetter:function(){Tt=!0},useSimple:function(){Tt=!1}}),s({target:"Object",stat:!0,forced:!m,sham:!f},{create:Te,defineProperty:ce,defineProperties:be,getOwnPropertyDescriptor:fe}),s({target:"Object",stat:!0,forced:!m},{getOwnPropertyNames:ne,getOwnPropertySymbols:W}),s({target:"Object",stat:!0,forced:v(function(){B.f(1)})},{getOwnPropertySymbols:function(Ee){return B.f(T(Ee))}}),Ct){var _e=!m||v(function(){var ke=tt();return Ct([ke])!="[null]"||Ct({a:ke})!="{}"||Ct(Object(ke))!="{}"});s({target:"JSON",stat:!0,forced:_e},{stringify:function(Ee,Ke,St){for(var dt=[Ee],pe=1,Ae;arguments.length>pe;)dt.push(arguments[pe++]);if(Ae=Ke,!(!_(Ke)&&Ee===void 0||me(Ee)))return b(Ke)||(Ke=function(Ue,Zt){if(typeof Ae=="function"&&(Zt=Ae.call(this,Ue,Zt)),!me(Zt))return Zt}),dt[1]=Ke,Ct.apply(null,dt)}})}tt[Ge][mt]||N(tt[Ge],mt,tt[Ge].valueOf),le(tt,nt),Y[ze]=!0},a630:function(o,i,a){var s=a("23e7"),l=a("4df4"),c=a("1c7e"),d=!c(function(f){Array.from(f)});s({target:"Array",stat:!0,forced:d},{from:l})},a640:function(o,i,a){var s=a("d039");o.exports=function(l,c){var d=[][l];return!!d&&s(function(){d.call(null,c||function(){throw 1},1)})}},a691:function(o,i){var a=Math.ceil,s=Math.floor;o.exports=function(l){return isNaN(l=+l)?0:(l>0?s:a)(l)}},ab13:function(o,i,a){var s=a("b622"),l=s("match");o.exports=function(c){var d=/./;try{"/./"[c](d)}catch{try{return d[l]=!1,"/./"[c](d)}catch{}}return!1}},ac1f:function(o,i,a){var s=a("23e7"),l=a("9263");s({target:"RegExp",proto:!0,forced:/./.exec!==l},{exec:l})},ad6d:function(o,i,a){var s=a("825a");o.exports=function(){var l=s(this),c="";return l.global&&(c+="g"),l.ignoreCase&&(c+="i"),l.multiline&&(c+="m"),l.dotAll&&(c+="s"),l.unicode&&(c+="u"),l.sticky&&(c+="y"),c}},ae40:function(o,i,a){var s=a("83ab"),l=a("d039"),c=a("5135"),d=Object.defineProperty,f={},m=function(g){throw g};o.exports=function(g,v){if(c(f,g))return f[g];v||(v={});var y=[][g],b=c(v,"ACCESSORS")?v.ACCESSORS:!1,_=c(v,0)?v[0]:m,w=c(v,1)?v[1]:void 0;return f[g]=!!y&&!l(function(){if(b&&!s)return!0;var T={length:-1};b?d(T,1,{enumerable:!0,get:m}):T[1]=1,y.call(T,_,w)})}},ae93:function(o,i,a){var s=a("e163"),l=a("9112"),c=a("5135"),d=a("b622"),f=a("c430"),m=d("iterator"),g=!1,v=function(){return this},y,b,_;[].keys&&(_=[].keys(),"next"in _?(b=s(s(_)),b!==Object.prototype&&(y=b)):g=!0),y==null&&(y={}),!f&&!c(y,m)&&l(y,m,v),o.exports={IteratorPrototype:y,BUGGY_SAFARI_ITERATORS:g}},b041:function(o,i,a){var s=a("00ee"),l=a("f5df");o.exports=s?{}.toString:function(){return"[object "+l(this)+"]"}},b0c0:function(o,i,a){var s=a("83ab"),l=a("9bf2").f,c=Function.prototype,d=c.toString,f=/^\s*function ([^ (]*)/,m="name";s&&!(m in c)&&l(c,m,{configurable:!0,get:function(){try{return d.call(this).match(f)[1]}catch{return""}}})},b622:function(o,i,a){var s=a("da84"),l=a("5692"),c=a("5135"),d=a("90e3"),f=a("4930"),m=a("fdbf"),g=l("wks"),v=s.Symbol,y=m?v:v&&v.withoutSetter||d;o.exports=function(b){return c(g,b)||(f&&c(v,b)?g[b]=v[b]:g[b]=y("Symbol."+b)),g[b]}},b64b:function(o,i,a){var s=a("23e7"),l=a("7b0b"),c=a("df75"),d=a("d039"),f=d(function(){c(1)});s({target:"Object",stat:!0,forced:f},{keys:function(g){return c(l(g))}})},b727:function(o,i,a){var s=a("0366"),l=a("44ad"),c=a("7b0b"),d=a("50c4"),f=a("65f0"),m=[].push,g=function(v){var y=v==1,b=v==2,_=v==3,w=v==4,T=v==6,k=v==5||T;return function(x,M,D,A){for(var P=c(x),$=l(P),B=s(M,D,3),j=d($.length),U=0,G=A||f,N=y?G(x,j):b?G(x,0):void 0,R,X;j>U;U++)if((k||U in $)&&(R=$[U],X=B(R,U,P),v)){if(y)N[U]=X;else if(X)switch(v){case 3:return!0;case 5:return R;case 6:return U;case 2:m.call(N,R)}else if(w)return!1}return T?-1:_||w?w:N}};o.exports={forEach:g(0),map:g(1),filter:g(2),some:g(3),every:g(4),find:g(5),findIndex:g(6)}},c04e:function(o,i,a){var s=a("861d");o.exports=function(l,c){if(!s(l))return l;var d,f;if(c&&typeof(d=l.toString)=="function"&&!s(f=d.call(l))||typeof(d=l.valueOf)=="function"&&!s(f=d.call(l))||!c&&typeof(d=l.toString)=="function"&&!s(f=d.call(l)))return f;throw TypeError("Can't convert object to primitive value")}},c430:function(o,i){o.exports=!1},c6b6:function(o,i){var a={}.toString;o.exports=function(s){return a.call(s).slice(8,-1)}},c6cd:function(o,i,a){var s=a("da84"),l=a("ce4e"),c="__core-js_shared__",d=s[c]||l(c,{});o.exports=d},c740:function(o,i,a){var s=a("23e7"),l=a("b727").findIndex,c=a("44d2"),d=a("ae40"),f="findIndex",m=!0,g=d(f);f in[]&&Array(1)[f](function(){m=!1}),s({target:"Array",proto:!0,forced:m||!g},{findIndex:function(y){return l(this,y,arguments.length>1?arguments[1]:void 0)}}),c(f)},c8ba:function(o,i){var a;a=function(){return this}();try{a=a||new Function("return this")()}catch{typeof window=="object"&&(a=window)}o.exports=a},c975:function(o,i,a){var s=a("23e7"),l=a("4d64").indexOf,c=a("a640"),d=a("ae40"),f=[].indexOf,m=!!f&&1/[1].indexOf(1,-0)<0,g=c("indexOf"),v=d("indexOf",{ACCESSORS:!0,1:0});s({target:"Array",proto:!0,forced:m||!g||!v},{indexOf:function(b){return m?f.apply(this,arguments)||0:l(this,b,arguments.length>1?arguments[1]:void 0)}})},ca84:function(o,i,a){var s=a("5135"),l=a("fc6a"),c=a("4d64").indexOf,d=a("d012");o.exports=function(f,m){var g=l(f),v=0,y=[],b;for(b in g)!s(d,b)&&s(g,b)&&y.push(b);for(;m.length>v;)s(g,b=m[v++])&&(~c(y,b)||y.push(b));return y}},caad:function(o,i,a){var s=a("23e7"),l=a("4d64").includes,c=a("44d2"),d=a("ae40"),f=d("indexOf",{ACCESSORS:!0,1:0});s({target:"Array",proto:!0,forced:!f},{includes:function(g){return l(this,g,arguments.length>1?arguments[1]:void 0)}}),c("includes")},cc12:function(o,i,a){var s=a("da84"),l=a("861d"),c=s.document,d=l(c)&&l(c.createElement);o.exports=function(f){return d?c.createElement(f):{}}},ce4e:function(o,i,a){var s=a("da84"),l=a("9112");o.exports=function(c,d){try{l(s,c,d)}catch{s[c]=d}return d}},d012:function(o,i){o.exports={}},d039:function(o,i){o.exports=function(a){try{return!!a()}catch{return!0}}},d066:function(o,i,a){var s=a("428f"),l=a("da84"),c=function(d){return typeof d=="function"?d:void 0};o.exports=function(d,f){return arguments.length<2?c(s[d])||c(l[d]):s[d]&&s[d][f]||l[d]&&l[d][f]}},d1e7:function(o,i,a){var s={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,c=l&&!s.call({1:2},1);i.f=c?function(f){var m=l(this,f);return!!m&&m.enumerable}:s},d28b:function(o,i,a){var s=a("746f");s("iterator")},d2bb:function(o,i,a){var s=a("825a"),l=a("3bbe");o.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var c=!1,d={},f;try{f=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,f.call(d,[]),c=d instanceof Array}catch{}return function(g,v){return s(g),l(v),c?f.call(g,v):g.__proto__=v,g}}():void 0)},d3b7:function(o,i,a){var s=a("00ee"),l=a("6eeb"),c=a("b041");s||l(Object.prototype,"toString",c,{unsafe:!0})},d44e:function(o,i,a){var s=a("9bf2").f,l=a("5135"),c=a("b622"),d=c("toStringTag");o.exports=function(f,m,g){f&&!l(f=g?f:f.prototype,d)&&s(f,d,{configurable:!0,value:m})}},d58f:function(o,i,a){var s=a("1c0b"),l=a("7b0b"),c=a("44ad"),d=a("50c4"),f=function(m){return function(g,v,y,b){s(v);var _=l(g),w=c(_),T=d(_.length),k=m?T-1:0,x=m?-1:1;if(y<2)for(;;){if(k in w){b=w[k],k+=x;break}if(k+=x,m?k<0:T<=k)throw TypeError("Reduce of empty array with no initial value")}for(;m?k>=0:T>k;k+=x)k in w&&(b=v(b,w[k],k,_));return b}};o.exports={left:f(!1),right:f(!0)}},d784:function(o,i,a){a("ac1f");var s=a("6eeb"),l=a("d039"),c=a("b622"),d=a("9263"),f=a("9112"),m=c("species"),g=!l(function(){var w=/./;return w.exec=function(){var T=[];return T.groups={a:"7"},T},"".replace(w,"$<a>")!=="7"}),v=function(){return"a".replace(/./,"$0")==="$0"}(),y=c("replace"),b=function(){return/./[y]?/./[y]("a","$0")==="":!1}(),_=!l(function(){var w=/(?:)/,T=w.exec;w.exec=function(){return T.apply(this,arguments)};var k="ab".split(w);return k.length!==2||k[0]!=="a"||k[1]!=="b"});o.exports=function(w,T,k,x){var M=c(w),D=!l(function(){var U={};return U[M]=function(){return 7},""[w](U)!=7}),A=D&&!l(function(){var U=!1,G=/a/;return w==="split"&&(G={},G.constructor={},G.constructor[m]=function(){return G},G.flags="",G[M]=/./[M]),G.exec=function(){return U=!0,null},G[M](""),!U});if(!D||!A||w==="replace"&&!(g&&v&&!b)||w==="split"&&!_){var P=/./[M],$=k(M,""[w],function(U,G,N,R,X){return G.exec===d?D&&!X?{done:!0,value:P.call(G,N,R)}:{done:!0,value:U.call(N,G,R)}:{done:!1}},{REPLACE_KEEPS_$0:v,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:b}),B=$[0],j=$[1];s(String.prototype,w,B),s(RegExp.prototype,M,T==2?function(U,G){return j.call(U,this,G)}:function(U){return j.call(U,this)})}x&&f(RegExp.prototype[M],"sham",!0)}},d81d:function(o,i,a){var s=a("23e7"),l=a("b727").map,c=a("1dde"),d=a("ae40"),f=c("map"),m=d("map");s({target:"Array",proto:!0,forced:!f||!m},{map:function(v){return l(this,v,arguments.length>1?arguments[1]:void 0)}})},da84:function(o,i,a){(function(s){var l=function(c){return c&&c.Math==Math&&c};o.exports=l(typeof globalThis=="object"&&globalThis)||l(typeof window=="object"&&window)||l(typeof self=="object"&&self)||l(typeof s=="object"&&s)||Function("return this")()}).call(this,a("c8ba"))},dbb4:function(o,i,a){var s=a("23e7"),l=a("83ab"),c=a("56ef"),d=a("fc6a"),f=a("06cf"),m=a("8418");s({target:"Object",stat:!0,sham:!l},{getOwnPropertyDescriptors:function(v){for(var y=d(v),b=f.f,_=c(y),w={},T=0,k,x;_.length>T;)x=b(y,k=_[T++]),x!==void 0&&m(w,k,x);return w}})},dbf1:function(o,i,a){(function(s){a.d(i,"a",function(){return c});function l(){return typeof window<"u"?window.console:s.console}var c=l()}).call(this,a("c8ba"))},ddb0:function(o,i,a){var s=a("da84"),l=a("fdbc"),c=a("e260"),d=a("9112"),f=a("b622"),m=f("iterator"),g=f("toStringTag"),v=c.values;for(var y in l){var b=s[y],_=b&&b.prototype;if(_){if(_[m]!==v)try{d(_,m,v)}catch{_[m]=v}if(_[g]||d(_,g,y),l[y]){for(var w in c)if(_[w]!==c[w])try{d(_,w,c[w])}catch{_[w]=c[w]}}}}},df75:function(o,i,a){var s=a("ca84"),l=a("7839");o.exports=Object.keys||function(d){return s(d,l)}},e01a:function(o,i,a){var s=a("23e7"),l=a("83ab"),c=a("da84"),d=a("5135"),f=a("861d"),m=a("9bf2").f,g=a("e893"),v=c.Symbol;if(l&&typeof v=="function"&&(!("description"in v.prototype)||v().description!==void 0)){var y={},b=function(){var M=arguments.length<1||arguments[0]===void 0?void 0:String(arguments[0]),D=this instanceof b?new v(M):M===void 0?v():v(M);return M===""&&(y[D]=!0),D};g(b,v);var _=b.prototype=v.prototype;_.constructor=b;var w=_.toString,T=String(v("test"))=="Symbol(test)",k=/^Symbol\((.*)\)[^)]+$/;m(_,"description",{configurable:!0,get:function(){var M=f(this)?this.valueOf():this,D=w.call(M);if(d(y,M))return"";var A=T?D.slice(7,-1):D.replace(k,"$1");return A===""?void 0:A}}),s({global:!0,forced:!0},{Symbol:b})}},e163:function(o,i,a){var s=a("5135"),l=a("7b0b"),c=a("f772"),d=a("e177"),f=c("IE_PROTO"),m=Object.prototype;o.exports=d?Object.getPrototypeOf:function(g){return g=l(g),s(g,f)?g[f]:typeof g.constructor=="function"&&g instanceof g.constructor?g.constructor.prototype:g instanceof Object?m:null}},e177:function(o,i,a){var s=a("d039");o.exports=!s(function(){function l(){}return l.prototype.constructor=null,Object.getPrototypeOf(new l)!==l.prototype})},e260:function(o,i,a){var s=a("fc6a"),l=a("44d2"),c=a("3f8c"),d=a("69f3"),f=a("7dd0"),m="Array Iterator",g=d.set,v=d.getterFor(m);o.exports=f(Array,"Array",function(y,b){g(this,{type:m,target:s(y),index:0,kind:b})},function(){var y=v(this),b=y.target,_=y.kind,w=y.index++;return!b||w>=b.length?(y.target=void 0,{value:void 0,done:!0}):_=="keys"?{value:w,done:!1}:_=="values"?{value:b[w],done:!1}:{value:[w,b[w]],done:!1}},"values"),c.Arguments=c.Array,l("keys"),l("values"),l("entries")},e439:function(o,i,a){var s=a("23e7"),l=a("d039"),c=a("fc6a"),d=a("06cf").f,f=a("83ab"),m=l(function(){d(1)}),g=!f||m;s({target:"Object",stat:!0,forced:g,sham:!f},{getOwnPropertyDescriptor:function(y,b){return d(c(y),b)}})},e538:function(o,i,a){var s=a("b622");i.f=s},e893:function(o,i,a){var s=a("5135"),l=a("56ef"),c=a("06cf"),d=a("9bf2");o.exports=function(f,m){for(var g=l(m),v=d.f,y=c.f,b=0;b<g.length;b++){var _=g[b];s(f,_)||v(f,_,y(m,_))}}},e8b5:function(o,i,a){var s=a("c6b6");o.exports=Array.isArray||function(c){return s(c)=="Array"}},e95a:function(o,i,a){var s=a("b622"),l=a("3f8c"),c=s("iterator"),d=Array.prototype;o.exports=function(f){return f!==void 0&&(l.Array===f||d[c]===f)}},f5df:function(o,i,a){var s=a("00ee"),l=a("c6b6"),c=a("b622"),d=c("toStringTag"),f=l(function(){return arguments}())=="Arguments",m=function(g,v){try{return g[v]}catch{}};o.exports=s?l:function(g){var v,y,b;return g===void 0?"Undefined":g===null?"Null":typeof(y=m(v=Object(g),d))=="string"?y:f?l(v):(b=l(v))=="Object"&&typeof v.callee=="function"?"Arguments":b}},f772:function(o,i,a){var s=a("5692"),l=a("90e3"),c=s("keys");o.exports=function(d){return c[d]||(c[d]=l(d))}},fb15:function(o,i,a){if(a.r(i),typeof window<"u"){var s=window.document.currentScript;{var l=a("8875");s=l(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:l})}var c=s&&s.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);c&&(a.p=c[1])}a("99af"),a("4de4"),a("4160"),a("c975"),a("d81d"),a("a434"),a("159b"),a("a4d3"),a("e439"),a("dbb4"),a("b64b");function d(me,ce,be){return ce in me?Object.defineProperty(me,ce,{value:be,enumerable:!0,configurable:!0,writable:!0}):me[ce]=be,me}function f(me,ce){var be=Object.keys(me);if(Object.getOwnPropertySymbols){var Te=Object.getOwnPropertySymbols(me);ce&&(Te=Te.filter(function(de){return Object.getOwnPropertyDescriptor(me,de).enumerable})),be.push.apply(be,Te)}return be}function m(me){for(var ce=1;ce<arguments.length;ce++){var be=arguments[ce]!=null?arguments[ce]:{};ce%2?f(Object(be),!0).forEach(function(Te){d(me,Te,be[Te])}):Object.getOwnPropertyDescriptors?Object.defineProperties(me,Object.getOwnPropertyDescriptors(be)):f(Object(be)).forEach(function(Te){Object.defineProperty(me,Te,Object.getOwnPropertyDescriptor(be,Te))})}return me}function g(me){if(Array.isArray(me))return me}a("e01a"),a("d28b"),a("e260"),a("d3b7"),a("3ca3"),a("ddb0");function v(me,ce){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(me)))){var be=[],Te=!0,de=!1,fe=void 0;try{for(var ne=me[Symbol.iterator](),W;!(Te=(W=ne.next()).done)&&(be.push(W.value),!(ce&&be.length===ce));Te=!0);}catch(_e){de=!0,fe=_e}finally{try{!Te&&ne.return!=null&&ne.return()}finally{if(de)throw fe}}return be}}a("a630"),a("fb6a"),a("b0c0"),a("25f0");function y(me,ce){(ce==null||ce>me.length)&&(ce=me.length);for(var be=0,Te=new Array(ce);be<ce;be++)Te[be]=me[be];return Te}function b(me,ce){if(me){if(typeof me=="string")return y(me,ce);var be=Object.prototype.toString.call(me).slice(8,-1);if(be==="Object"&&me.constructor&&(be=me.constructor.name),be==="Map"||be==="Set")return Array.from(me);if(be==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(be))return y(me,ce)}}function _(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w(me,ce){return g(me)||v(me,ce)||b(me,ce)||_()}function T(me){if(Array.isArray(me))return y(me)}function k(me){if(typeof Symbol<"u"&&Symbol.iterator in Object(me))return Array.from(me)}function x(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M(me){return T(me)||k(me)||b(me)||x()}var D=a("a352"),A=a.n(D);function P(me){me.parentElement!==null&&me.parentElement.removeChild(me)}function $(me,ce,be){var Te=be===0?me.children[0]:me.children[be-1].nextSibling;me.insertBefore(ce,Te)}var B=a("dbf1");a("13d5"),a("4fad"),a("ac1f"),a("5319");function j(me){var ce=Object.create(null);return function(Te){var de=ce[Te];return de||(ce[Te]=me(Te))}}var U=/-(\w)/g,G=j(function(me){return me.replace(U,function(ce,be){return be.toUpperCase()})});a("5db7"),a("73d9");var N=["Start","Add","Remove","Update","End"],R=["Choose","Unchoose","Sort","Filter","Clone"],X=["Move"],te=[X,N,R].flatMap(function(me){return me}).map(function(me){return"on".concat(me)}),Y={manage:X,manageAndEmit:N,emit:R};function re(me){return te.indexOf(me)!==-1}a("caad"),a("2ca0");var Q=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function Z(me){return Q.includes(me)}function q(me){return["transition-group","TransitionGroup"].includes(me)}function le(me){return["id","class","role","style"].includes(me)||me.startsWith("data-")||me.startsWith("aria-")||me.startsWith("on")}function ye(me){return me.reduce(function(ce,be){var Te=w(be,2),de=Te[0],fe=Te[1];return ce[de]=fe,ce},{})}function Re(me){var ce=me.$attrs,be=me.componentData,Te=be===void 0?{}:be,de=ye(Object.entries(ce).filter(function(fe){var ne=w(fe,2),W=ne[0];return ne[1],le(W)}));return m(m({},de),Te)}function ze(me){var ce=me.$attrs,be=me.callBackBuilder,Te=ye(nt(ce));Object.entries(be).forEach(function(fe){var ne=w(fe,2),W=ne[0],_e=ne[1];Y[W].forEach(function(ke){Te["on".concat(ke)]=_e(ke)})});var de="[data-draggable]".concat(Te.draggable||"");return m(m({},Te),{},{draggable:de})}function nt(me){return Object.entries(me).filter(function(ce){var be=w(ce,2),Te=be[0];return be[1],!le(Te)}).map(function(ce){var be=w(ce,2),Te=be[0],de=be[1];return[G(Te),de]}).filter(function(ce){var be=w(ce,2),Te=be[0];return be[1],!re(Te)})}a("c740");function Ge(me,ce){if(!(me instanceof ce))throw new TypeError("Cannot call a class as a function")}function mt(me,ce){for(var be=0;be<ce.length;be++){var Te=ce[be];Te.enumerable=Te.enumerable||!1,Te.configurable=!0,"value"in Te&&(Te.writable=!0),Object.defineProperty(me,Te.key,Te)}}function ut(me,ce,be){return ce&&mt(me.prototype,ce),me}var Pt=function(ce){var be=ce.el;return be},gt=function(ce,be){return ce.__draggable_context=be},tt=function(ce){return ce.__draggable_context},Ct=function(){function me(ce){var be=ce.nodes,Te=be.header,de=be.default,fe=be.footer,ne=ce.root,W=ce.realList;Ge(this,me),this.defaultNodes=de,this.children=[].concat(M(Te),M(de),M(fe)),this.externalComponent=ne.externalComponent,this.rootTransition=ne.transition,this.tag=ne.tag,this.realList=W}return ut(me,[{key:"render",value:function(be,Te){var de=this.tag,fe=this.children,ne=this._isRootComponent,W=ne?{default:function(){return fe}}:fe;return be(de,Te,W)}},{key:"updated",value:function(){var be=this.defaultNodes,Te=this.realList;be.forEach(function(de,fe){gt(Pt(de),{element:Te[fe],index:fe})})}},{key:"getUnderlyingVm",value:function(be){return tt(be)}},{key:"getVmIndexFromDomIndex",value:function(be,Te){var de=this.defaultNodes,fe=de.length,ne=Te.children,W=ne.item(be);if(W===null)return fe;var _e=tt(W);if(_e)return _e.index;if(fe===0)return 0;var ke=Pt(de[0]),Ee=M(ne).findIndex(function(Ke){return Ke===ke});return be<Ee?0:fe}},{key:"_isRootComponent",get:function(){return this.externalComponent||this.rootTransition}}]),me}(),Bt=a("8bbf");function Ne(me,ce){var be=me[ce];return be?be():[]}function je(me){var ce=me.$slots,be=me.realList,Te=me.getKey,de=be||[],fe=["header","footer"].map(function(Ke){return Ne(ce,Ke)}),ne=w(fe,2),W=ne[0],_e=ne[1],ke=ce.item;if(!ke)throw new Error("draggable element must have an item slot");var Ee=de.flatMap(function(Ke,St){return ke({element:Ke,index:St}).map(function(dt){return dt.key=Te(Ke),dt.props=m(m({},dt.props||{}),{},{"data-draggable":!0}),dt})});if(Ee.length!==de.length)throw new Error("Item slot must have only one child");return{header:W,footer:_e,default:Ee}}function Be(me){var ce=q(me),be=!Z(me)&&!ce;return{transition:ce,externalComponent:be,tag:be?Object(Bt.resolveComponent)(me):ce?Bt.TransitionGroup:me}}function qe(me){var ce=me.$slots,be=me.tag,Te=me.realList,de=me.getKey,fe=je({$slots:ce,realList:Te,getKey:de}),ne=Be(be);return new Ct({nodes:fe,root:ne,realList:Te})}function Je(me,ce){var be=this;Object(Bt.nextTick)(function(){return be.$emit(me.toLowerCase(),ce)})}function ct(me){var ce=this;return function(be,Te){if(ce.realList!==null)return ce["onDrag".concat(me)](be,Te)}}function vt(me){var ce=this,be=ct.call(this,me);return function(Te,de){be.call(ce,Te,de),Je.call(ce,me,Te)}}var Se=null,He={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:function(ce){return ce}},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},Tt=["update:modelValue","change"].concat(M([].concat(M(Y.manageAndEmit),M(Y.emit)).map(function(me){return me.toLowerCase()}))),$t=Object(Bt.defineComponent)({name:"draggable",inheritAttrs:!1,props:He,emits:Tt,data:function(){return{error:!1}},render:function(){try{this.error=!1;var ce=this.$slots,be=this.$attrs,Te=this.tag,de=this.componentData,fe=this.realList,ne=this.getKey,W=qe({$slots:ce,tag:Te,realList:fe,getKey:ne});this.componentStructure=W;var _e=Re({$attrs:be,componentData:de});return W.render(Bt.h,_e)}catch(ke){return this.error=!0,Object(Bt.h)("pre",{style:{color:"red"}},ke.stack)}},created:function(){this.list!==null&&this.modelValue!==null&&B.a.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted:function(){var ce=this;if(!this.error){var be=this.$attrs,Te=this.$el,de=this.componentStructure;de.updated();var fe=ze({$attrs:be,callBackBuilder:{manageAndEmit:function(_e){return vt.call(ce,_e)},emit:function(_e){return Je.bind(ce,_e)},manage:function(_e){return ct.call(ce,_e)}}}),ne=Te.nodeType===1?Te:Te.parentElement;this._sortable=new A.a(ne,fe),this.targetDomElement=ne,ne.__draggable_component__=this}},updated:function(){this.componentStructure.updated()},beforeUnmount:function(){this._sortable!==void 0&&this._sortable.destroy()},computed:{realList:function(){var ce=this.list;return ce||this.modelValue},getKey:function(){var ce=this.itemKey;return typeof ce=="function"?ce:function(be){return be[ce]}}},watch:{$attrs:{handler:function(ce){var be=this._sortable;be&&nt(ce).forEach(function(Te){var de=w(Te,2),fe=de[0],ne=de[1];be.option(fe,ne)})},deep:!0}},methods:{getUnderlyingVm:function(ce){return this.componentStructure.getUnderlyingVm(ce)||null},getUnderlyingPotencialDraggableComponent:function(ce){return ce.__draggable_component__},emitChanges:function(ce){var be=this;Object(Bt.nextTick)(function(){return be.$emit("change",ce)})},alterList:function(ce){if(this.list){ce(this.list);return}var be=M(this.modelValue);ce(be),this.$emit("update:modelValue",be)},spliceList:function(){var ce=arguments,be=function(de){return de.splice.apply(de,M(ce))};this.alterList(be)},updatePosition:function(ce,be){var Te=function(fe){return fe.splice(be,0,fe.splice(ce,1)[0])};this.alterList(Te)},getRelatedContextFromMoveEvent:function(ce){var be=ce.to,Te=ce.related,de=this.getUnderlyingPotencialDraggableComponent(be);if(!de)return{component:de};var fe=de.realList,ne={list:fe,component:de};if(be!==Te&&fe){var W=de.getUnderlyingVm(Te)||{};return m(m({},W),ne)}return ne},getVmIndexFromDomIndex:function(ce){return this.componentStructure.getVmIndexFromDomIndex(ce,this.targetDomElement)},onDragStart:function(ce){this.context=this.getUnderlyingVm(ce.item),ce.item._underlying_vm_=this.clone(this.context.element),Se=ce.item},onDragAdd:function(ce){var be=ce.item._underlying_vm_;if(be!==void 0){P(ce.item);var Te=this.getVmIndexFromDomIndex(ce.newIndex);this.spliceList(Te,0,be);var de={element:be,newIndex:Te};this.emitChanges({added:de})}},onDragRemove:function(ce){if($(this.$el,ce.item,ce.oldIndex),ce.pullMode==="clone"){P(ce.clone);return}var be=this.context,Te=be.index,de=be.element;this.spliceList(Te,1);var fe={element:de,oldIndex:Te};this.emitChanges({removed:fe})},onDragUpdate:function(ce){P(ce.item),$(ce.from,ce.item,ce.oldIndex);var be=this.context.index,Te=this.getVmIndexFromDomIndex(ce.newIndex);this.updatePosition(be,Te);var de={element:this.context.element,oldIndex:be,newIndex:Te};this.emitChanges({moved:de})},computeFutureIndex:function(ce,be){if(!ce.element)return 0;var Te=M(be.to.children).filter(function(W){return W.style.display!=="none"}),de=Te.indexOf(be.related),fe=ce.component.getVmIndexFromDomIndex(de),ne=Te.indexOf(Se)!==-1;return ne||!be.willInsertAfter?fe:fe+1},onDragMove:function(ce,be){var Te=this.move,de=this.realList;if(!Te||!de)return!0;var fe=this.getRelatedContextFromMoveEvent(ce),ne=this.computeFutureIndex(fe,ce),W=m(m({},this.context),{},{futureIndex:ne}),_e=m(m({},ce),{},{relatedContext:fe,draggedContext:W});return Te(_e,be)},onDragEnd:function(){Se=null}}}),wt=$t;i.default=wt},fb6a:function(o,i,a){var s=a("23e7"),l=a("861d"),c=a("e8b5"),d=a("23cb"),f=a("50c4"),m=a("fc6a"),g=a("8418"),v=a("b622"),y=a("1dde"),b=a("ae40"),_=y("slice"),w=b("slice",{ACCESSORS:!0,0:0,1:2}),T=v("species"),k=[].slice,x=Math.max;s({target:"Array",proto:!0,forced:!_||!w},{slice:function(D,A){var P=m(this),$=f(P.length),B=d(D,$),j=d(A===void 0?$:A,$),U,G,N;if(c(P)&&(U=P.constructor,typeof U=="function"&&(U===Array||c(U.prototype))?U=void 0:l(U)&&(U=U[T],U===null&&(U=void 0)),U===Array||U===void 0))return k.call(P,B,j);for(G=new(U===void 0?Array:U)(x(j-B,0)),N=0;B<j;B++,N++)B in P&&g(G,N,P[B]);return G.length=N,G}})},fc6a:function(o,i,a){var s=a("44ad"),l=a("1d80");o.exports=function(c){return s(l(c))}},fdbc:function(o,i){o.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(o,i,a){var s=a("4930");o.exports=s&&!Symbol.sham&&typeof Symbol.iterator=="symbol"}}).default})}(nf)),nf.exports}var lz=sz();const Ap=ra(lz),uz={class:"ivyforms-field__text"},cz={key:0,class:"ivyforms-description-message regular-14"},dz=he({__name:"TextField",props:{fieldIndex:{}},setup(n){const e=n,t=zt(),r=O(()=>t.fields.find(m=>m.fieldIndex===e.fieldIndex)),o=O(()=>{var m;return((m=r.value)==null?void 0:m.label)||""}),i=O(()=>{var m;return((m=r.value)==null?void 0:m.placeholder)||""}),a=O(()=>{var m;return((m=r.value)==null?void 0:m.required)||!1}),s=O(()=>{var m;return((m=r.value)==null?void 0:m.hideLabel)||!1}),l=O(()=>{var m;return((m=r.value)==null?void 0:m.fieldIndex)??e.fieldIndex}),c=O(()=>{var m;return((m=r.value)==null?void 0:m.defaultValue)||""}),d=O(()=>{var m;return((m=r.value)==null?void 0:m.description)||""}),f=O(()=>{var m,g;return((m=r.value)==null?void 0:m.labelPosition)==="default"?"top":((g=r.value)==null?void 0:g.labelPosition)||"top"});return(m,g)=>{const v=cn,y=sn;return C(),F("div",uz,[I(y,{label:s.value?"":o.value,required:a.value,"label-position":f.value},{default:V(()=>[I(v,{id:l.value,readonly:"",placeholder:i.value,"model-value":c.value,type:"text"},null,8,["id","placeholder","model-value"]),d.value?(C(),F("div",cz,ae(d.value),1)):ie("",!0)]),_:1},8,["label","required","label-position"])])}}}),h2=bt(dz,[["__scopeId","data-v-6b58b8f7"]]),fz={class:"ivyforms-field__email"},pz={key:0,class:"ivyforms-description-message regular-14"},hz=he({__name:"EmailField",props:{fieldIndex:{}},setup(n){const e=n,t=zt(),r=O(()=>t.fields.find(v=>v.fieldIndex===e.fieldIndex)),o=O(()=>{var v;return((v=r.value)==null?void 0:v.label)||""}),i=O(()=>{var v;return((v=r.value)==null?void 0:v.placeholder)||""}),a=O(()=>{var v;return((v=r.value)==null?void 0:v.required)||!1}),s=O(()=>{var v;return((v=r.value)==null?void 0:v.hideLabel)||!1}),l=O(()=>{var v;return((v=r.value)==null?void 0:v.fieldIndex)??e.fieldIndex}),c=O(()=>{var v;return((v=r.value)==null?void 0:v.defaultValue)||""}),d=O(()=>{var v,y;return((v=r.value)==null?void 0:v.labelPosition)==="default"?"top":((y=r.value)==null?void 0:y.labelPosition)||"top"}),f=O(()=>{var v;return((v=r.value)==null?void 0:v.description)||""}),m=O(()=>{var v;return((v=r.value)==null?void 0:v.confirmFieldLabel)||""}),g=O(()=>{var v;return((v=r.value)==null?void 0:v.confirmFieldPlaceholder)||""});return(v,y)=>{var w,T;const b=cn,_=sn;return C(),F("div",fz,[I(_,{label:s.value?"":o.value,required:a.value,"label-position":d.value},{default:V(()=>[I(b,{id:l.value,readonly:"",placeholder:i.value,"model-value":c.value,type:"email"},null,8,["id","placeholder","model-value"]),f.value?(C(),F("div",pz,ae(f.value),1)):ie("",!0)]),_:1},8,["label","required","label-position"]),(w=r.value)!=null&&w.confirmFieldEnabled?(C(),se(_,{key:0,label:(T=r.value)!=null&&T.confirmFieldHideLabel?"":m.value,required:a.value},{default:V(()=>[I(b,{id:l.value+"-confirm",readonly:"",placeholder:g.value,"model-value":"",type:"email"},null,8,["id","placeholder"])]),_:1},8,["label","required"])):ie("",!0)])}}}),mz=bt(hz,[["__scopeId","data-v-5d8b966c"]]),vz={class:"ivyforms-field__numeric"},gz={key:0,class:"ivyforms-description-message regular-14"},yz=he({__name:"NumericField",props:{fieldIndex:{}},setup(n){const e=n,t=zt(),r=O(()=>t.fields.find(m=>m.fieldIndex===e.fieldIndex)),o=O(()=>{var m;return((m=r.value)==null?void 0:m.label)||""}),i=O(()=>{var m;return((m=r.value)==null?void 0:m.placeholder)||""}),a=O(()=>{var m;return((m=r.value)==null?void 0:m.required)||!1}),s=O(()=>{var m;return((m=r.value)==null?void 0:m.hideLabel)||!1}),l=O(()=>{var m;return((m=r.value)==null?void 0:m.fieldIndex)??e.fieldIndex}),c=O(()=>{var m;return((m=r.value)==null?void 0:m.defaultValue)||""}),d=O(()=>{var m;return((m=r.value)==null?void 0:m.description)||""}),f=O(()=>{var m,g;return((m=r.value)==null?void 0:m.labelPosition)==="default"?"top":((g=r.value)==null?void 0:g.labelPosition)||"top"});return(m,g)=>{const v=cn,y=sn;return C(),F("div",vz,[I(y,{label:s.value?"":o.value,required:a.value,"label-position":f.value},{default:V(()=>[I(v,{id:l.value,readonly:"",placeholder:i.value,"model-value":c.value,type:"number"},null,8,["id","placeholder","model-value"]),d.value?(C(),F("div",gz,ae(d.value),1)):ie("",!0)]),_:1},8,["label","required","label-position"])])}}}),bz=bt(yz,[["__scopeId","data-v-12e4ab49"]]),Sz={class:"ivyforms-field__paragraph"},_z={key:0,class:"ivyforms-description-message regular-14"},wz=he({__name:"ParagraphField",props:{fieldIndex:{}},setup(n){const e=n,t=zt(),r=O(()=>t.fields.find(g=>g.fieldIndex===e.fieldIndex)),o=O(()=>{var g;return((g=r.value)==null?void 0:g.label)||""}),i=O(()=>{var g;return((g=r.value)==null?void 0:g.placeholder)||""}),a=O(()=>{var g;return((g=r.value)==null?void 0:g.required)||!1}),s=O(()=>{var g;return((g=r.value)==null?void 0:g.hideLabel)||!1}),l=O(()=>{var g;return((g=r.value)==null?void 0:g.fieldIndex)??e.fieldIndex}),c=O(()=>{var g;return((g=r.value)==null?void 0:g.defaultValue)||""}),d=O(()=>{var g,v;return((g=r.value)==null?void 0:g.rows)<=0?3:(v=r.value)==null?void 0:v.rows}),f=O(()=>{var g;return((g=r.value)==null?void 0:g.description)||""}),m=O(()=>{var g,v;return((g=r.value)==null?void 0:g.labelPosition)==="default"?"top":((v=r.value)==null?void 0:v.labelPosition)||"top"});return(g,v)=>{const y=cn,b=sn;return C(),F("div",Sz,[I(b,{label:s.value?"":o.value,required:a.value,"label-position":m.value},{default:V(()=>[I(y,{id:l.value,readonly:"",placeholder:i.value,"model-value":c.value,type:"textarea",rows:d.value},null,8,["id","placeholder","model-value","rows"]),f.value?(C(),F("div",_z,ae(f.value),1)):ie("",!0)]),_:1},8,["label","required","label-position"])])}}}),xz=bt(wz,[["__scopeId","data-v-b5b64bf6"]]),kz={class:"ivyforms-field__phone"},Cz={key:0,class:"ivyforms-description-message regular-14"},Iz=he({__name:"PhoneField",props:{fieldIndex:{}},setup(n){const e=n,t=zt(),r=O(()=>t.fields.find(m=>m.fieldIndex===e.fieldIndex)),o=O(()=>{var m;return((m=r.value)==null?void 0:m.label)||""}),i=O(()=>{var m;return((m=r.value)==null?void 0:m.placeholder)||"(___) __ - __ - __"}),a=O(()=>{var m;return((m=r.value)==null?void 0:m.required)||!1}),s=O(()=>{var m;return((m=r.value)==null?void 0:m.hideLabel)||!1}),l=O(()=>{var m;return((m=r.value)==null?void 0:m.fieldIndex)??e.fieldIndex}),c=O(()=>{var m;return((m=r.value)==null?void 0:m.defaultValue)||""}),d=O(()=>{var m;return((m=r.value)==null?void 0:m.description)||""}),f=O(()=>{var m,g;return((m=r.value)==null?void 0:m.labelPosition)==="default"?"top":((g=r.value)==null?void 0:g.labelPosition)||"top"});return(m,g)=>{const v=sn;return C(),F("div",kz,[I(v,{label:s.value?"":o.value,required:a.value,"label-position":f.value},{default:V(()=>[I(lE,{id:l.value,disabled:"",placeholder:i.value,"model-value":c.value,type:"number"},null,8,["id","placeholder","model-value"]),d.value?(C(),F("div",Cz,ae(d.value),1)):ie("",!0)]),_:1},8,["label","required","label-position"])])}}}),Ez=bt(Iz,[["__scopeId","data-v-084becc8"]]),Tz={class:"ivyforms-form-builder-field-recaptcha"},Mz={key:0},Oz={key:0,class:"ivyforms-recaptcha-widget"},Az={class:"ivyforms-recaptcha-widget__header"},Pz={class:"ivyforms-recaptcha-widget__checkbox"},$z={class:"ivyforms-recaptcha-widget__text"},Rz={class:"ivyforms-recaptcha-widget__logos"},Dz={key:1,class:"ivyforms-recaptcha-badge"},Nz={class:"ivyforms-recaptcha-badge__icon"},Fz={class:"ivyforms-recaptcha-badge__content"},Lz={class:"ivyforms-recaptcha-badge__text"},Bz={class:"ivyforms-recaptcha-badge__protected"},Vz={class:"ivyforms-recaptcha-badge__links"},zz={href:"#",class:"ivyforms-recaptcha-badge__link"},Hz={href:"#",class:"ivyforms-recaptcha-badge__link"},Uz={key:1,class:"ivyforms-recaptcha-warning"},Wz=he({__name:"RecaptchaField",props:{fieldIndex:{}},setup(n){const{getLabel:e}=at(),t=hc(),{getHashRedirectLink:r}=oa(),o=()=>r(gc,"/security/recaptcha"),i=O(()=>t.isRecaptchaConfigured),a=O(()=>t.recaptchaType);return(s,l)=>{const c=rn,d=mS,f=sn;return C(),F("div",Tz,[I(f,null,{default:V(()=>[i.value?(C(),F("div",Mz,[a.value==="v2"?(C(),F("div",Oz,[z("div",Az,[z("div",Pz,[I(c,{name:"check",type:"outline",category:"global",size:"s",class:"ivyforms-recaptcha-widget__icon"})]),z("span",$z,ae(h(e)("not_a_robot")),1),z("div",Rz,[I(c,{name:"recaptcha-colored",type:"fill",category:"security",size:"d"})])])])):(C(),F("div",Dz,[z("div",Nz,[I(c,{name:"recaptcha-colored",type:"fill",category:"security",size:"d"})]),z("div",Fz,[z("div",Lz,[z("span",Bz,ae(h(e)("protected_by"))+" reCAPTCHA",1)]),z("div",Vz,[z("a",zz,ae(h(e)("privacy")),1),l[0]||(l[0]=z("span",{class:"ivyforms-recaptcha-badge__separator"},"-",-1)),z("a",Hz,ae(h(e)("terms")),1)])])]))])):(C(),F("div",Uz,[I(d,{state:"warning",description:h(e)("recaptcha_not_configured"),"show-button":!1,"show-link":!0,"link-text":h(e)("configure_now"),"link-url":o()},null,8,["description","link-text","link-url"])]))]),_:1})])}}}),jz=bt(Wz,[["__scopeId","data-v-90ae1975"]]),Kz={key:0,class:"ivyforms-name-fields__main-label ivyforms-mb-8 regular-16"},Yz={class:"ivyforms-name-fields__layout ivyforms-flex ivyforms-flex-direction-row ivyforms-flex-wrap-wrap ivyforms-gap-16"},qz={key:0,class:"ivyforms-name-fields__layout-field-description regular-14 ivyforms-width-100"},Gz=he({__name:"NameField",props:{fieldIndex:{}},setup(n){const{getLabel:e}=at(),t=n,r=zt(),o=O(()=>r.fields.find(a=>a.fieldIndex===t.fieldIndex)),i=O(()=>{var a;return((a=o.value)==null?void 0:a.nameFields)||[]});return(a,s)=>{var d,f,m;const l=cn,c=sn;return C(),F("div",{class:ee(["ivyforms-name-fields",{"ivyforms-name-fields--readonly":!!((d=o.value)!=null&&d.readOnly)}])},[(f=o.value)!=null&&f.hideLabel?ie("",!0):(C(),F("div",Kz,ae(((m=o.value)==null?void 0:m.label)||h(e)("name")),1)),z("div",Yz,[(C(!0),F($e,null,ot(i.value,g=>(C(),F("div",{key:g.id,class:ee(["ivyforms-name-fields__layout-field ivyforms-flex-1",g.type.toLowerCase()+"-name"])},[I(c,{label:g.optionHide?"":g.label,required:g.required},{default:V(()=>[I(l,{id:g.id,readonly:"","model-value":g.modelValue,type:"text",placeholder:g.placeholder},null,8,["id","model-value","placeholder"]),g.description?(C(),F("div",qz,ae(g.description),1)):ie("",!0)]),_:2},1032,["label","required"])],2))),128))])],2)}}}),Jz=bt(Gz,[["__scopeId","data-v-c101dd78"]]),Xz={class:"ivyforms-field__website"},Qz={key:0,class:"ivyforms-description-message regular-14"},Zz=he({__name:"WebsiteField",props:{fieldIndex:{}},setup(n){const e=n,t=zt(),r=O(()=>t.fields.find(m=>m.fieldIndex===e.fieldIndex)),o=O(()=>{var m;return((m=r.value)==null?void 0:m.label)||""}),i=O(()=>{var m;return((m=r.value)==null?void 0:m.placeholder)||""}),a=O(()=>{var m;return((m=r.value)==null?void 0:m.required)||!1}),s=O(()=>{var m;return((m=r.value)==null?void 0:m.hideLabel)||!1}),l=O(()=>{var m;return((m=r.value)==null?void 0:m.fieldIndex)??e.fieldIndex}),c=O(()=>{var m;return((m=r.value)==null?void 0:m.defaultValue)||""}),d=O(()=>{var m;return((m=r.value)==null?void 0:m.description)||""}),f=O(()=>{var m,g;return((m=r.value)==null?void 0:m.labelPosition)==="default"?"top":((g=r.value)==null?void 0:g.labelPosition)||"top"});return(m,g)=>{const v=cn,y=sn;return C(),F("div",Xz,[I(y,{label:s.value?"":o.value,required:a.value,"label-position":f.value},{default:V(()=>[I(v,{id:l.value,readonly:"",placeholder:i.value,"model-value":c.value,type:"website"},null,8,["id","placeholder","model-value"]),d.value?(C(),F("div",Qz,ae(d.value),1)):ie("",!0)]),_:1},8,["label","required","label-position"])])}}}),eH=bt(Zz,[["__scopeId","data-v-45ae56bd"]]),tH={class:"ivyforms-field__radio"},nH=he({__name:"RadioField",props:{fieldIndex:{}},setup(n){var f;const e=n,t=zt(),r=O(()=>t.fields.find(m=>m.fieldIndex===e.fieldIndex)),o=O(()=>{var m;return((m=r.value)==null?void 0:m.label)||""}),i=O(()=>{var m;return((m=r.value)==null?void 0:m.required)||!1}),a=O(()=>{var m;return((m=r.value)==null?void 0:m.hideLabel)||!1}),s=O(()=>{var m;return((m=r.value)==null?void 0:m.fieldIndex)??e.fieldIndex}),l=H("");if(!l.value&&((f=r.value)!=null&&f.fieldOptions)){const m=r.value.fieldOptions.find(g=>g.isDefault);m&&(l.value=m.value)}function c(m){const g=m.slice();for(let v=g.length-1;v>0;v--){const y=Math.floor(Math.random()*(v+1));[g[v],g[y]]=[g[y],g[v]]}return g}const d=O(()=>{var g,v;let m=((g=r.value)==null?void 0:g.fieldOptions)||[];return(v=r.value)!=null&&v.shuffleOptions&&(m=c(m)),m.map(y=>({label:y.label,value:y.value,id:y.id}))});return(m,g)=>{const v=_p,y=vg,b=sn;return C(),F("div",tH,[I(b,{label:a.value?"":o.value,required:i.value},{default:V(()=>[I(y,{id:s.value,modelValue:l.value,"onUpdate:modelValue":g[0]||(g[0]=_=>l.value=_),direction:"horizontal",readonly:"",class:"ivyforms-field__radio-group ivyforms-flex ivyforms-gap-8"},{default:V(()=>[(C(!0),F($e,null,ot(d.value,_=>(C(),se(v,{id:_.id,key:_.id||_.value,value:_.value,label:_.label,priority:"secondary",class:"ivyforms-field__radio-option"},null,8,["id","value","label"]))),128))]),_:1},8,["id","modelValue"])]),_:1},8,["label","required"])])}}}),rH=bt(nH,[["__scopeId","data-v-e60b6d93"]]),oH={key:0,class:"ivyforms-field__address-label ivyforms-mb-16 regular-16"},aH={class:"ivyforms-field__address-layout ivyforms-flex ivyforms-flex-direction-column ivyforms-gap-16 ivyforms-width-100"},iH={key:0,class:"ivyforms-field__address-description regular-14"},sH={class:"ivyforms-field__address-row ivyforms-field__address-row--three-cols ivyforms-flex ivyforms-flex-direction-row ivyforms-gap-16 ivyforms-width-100"},lH={key:2,class:"ivyforms-field__address-description regular-14"},uH=he({__name:"AddressField",props:{fieldIndex:{}},setup(n){const{getLabel:e}=at(),t=n,r=zt(),o=O(()=>r.fields.find(l=>l.fieldIndex===t.fieldIndex)),i=O(()=>{var l;return(((l=o.value)==null?void 0:l.addressFields)||[]).filter(c=>c.visible!==!1)}),a=Q3.map(l=>l.name),s=O({get:()=>{var l;return((l=i.value.find(c=>c.type==="country"))==null?void 0:l.value)||""},set:()=>{}});return(l,c)=>{var v,y,b;const d=cn,f=sn,m=Fs,g=Ls;return C(),F("div",{class:ee(["ivyforms-field__address",{"ivyforms-field__address--readonly":!!((v=o.value)!=null&&v.readOnly)}])},[(y=o.value)!=null&&y.hideLabel?ie("",!0):(C(),F("div",oH,ae(((b=o.value)==null?void 0:b.label)||h(e)("address")),1)),z("div",aH,[(C(!0),F($e,null,ot(i.value.slice(0,3),_=>(C(),F("div",{key:_.type,class:"ivyforms-field__address-row ivyforms-field__address-row--full ivyforms-flex ivyforms-flex-direction-row ivyforms-width-100"},[z("div",{class:ee(["ivyforms-field__address-field",_.type.toLowerCase()+"-address"])},[I(f,{label:_.hideLabel?"":_.label,required:_.required},{default:V(()=>[I(d,{id:_.id,readonly:"","model-value":_.value,type:"text",placeholder:_.placeholder},null,8,["id","model-value","placeholder"]),_.description?(C(),F("div",iH,ae(_.description),1)):ie("",!0)]),_:2},1032,["label","required"])],2)]))),128)),z("div",sH,[(C(!0),F($e,null,ot(i.value.slice(3,6),_=>(C(),F("div",{key:_.type,class:ee(["ivyforms-field__address-field",_.type.toLowerCase()+"-address"])},[I(f,{label:_.hideLabel?"":_.label,required:_.required},{default:V(()=>[_.type==="country"?(C(),se(g,{key:0,id:_.id,modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=w=>s.value=w),placeholder:h(e)("select_country"),disabled:"",readonly:""},{default:V(()=>[I(m,{value:""},{default:V(()=>[De(ae(h(e)("select_country")),1)]),_:1}),(C(!0),F($e,null,ot(h(a),w=>(C(),se(m,{key:w,value:w},{default:V(()=>[De(ae(w),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["id","modelValue","placeholder"])):(C(),se(d,{key:1,id:_.id,readonly:"","model-value":_.value,type:"text",placeholder:_.placeholder},null,8,["id","model-value","placeholder"])),_.description?(C(),F("div",lH,ae(_.description),1)):ie("",!0)]),_:2},1032,["label","required"])],2))),128))])])],2)}}}),cH=bt(uH,[["__scopeId","data-v-7ec53321"]]),dH={class:"ivyforms-field-unit__action-buttons"},fH=he({__name:"IvyFieldUnit",props:{variant:{},type:{},fieldIndex:{}},setup(n){const e=zt(),t=H(null),r=n,o=()=>{e.selectField(r.fieldIndex)},i=H(!1),a=O(()=>e.isSelected(r.fieldIndex)),s=O(()=>{const c=r.fieldIndex,d=e.fields.find(g=>g.fieldIndex===c),f=e.fields.length;if(!d)return[];const m=d.position;return[{icon:"arrow-up",category:"arrows",type:"outline",hidden:f===1||m===1,handler:()=>{e.moveFieldUp(d.fieldIndex)}},{icon:"arrow-down",category:"arrows",type:"outline",hidden:f===1||m===f,handler:()=>{e.moveFieldDown(d.fieldIndex)}},{icon:"settings",category:"global",type:"outline",hidden:!1,handler:()=>{o()}},{icon:"copy",category:"global",type:"outline",hidden:!1,handler:()=>{e.duplicateField(d.fieldIndex)}},{icon:"trash",category:"global",type:"outline",hidden:!1,handler:()=>{e.deleteField(d.fieldIndex)}}]}),l=c=>{switch(c){case"text":return h2;case"email":return mz;case"number":return bz;case"textarea":return xz;case"phone":return Ez;case"name":return Jz;case"website":return eH;case"recaptcha":return jz;case"radio":return rH;case"address":return cH;default:return h2}};return(c,d)=>(C(),F("div",{ref_key:"fieldRef",ref:t,class:ee(["ivyforms-field-unit",{"ivyforms-field-unit--hovered":i.value,"ivyforms-field-unit--selected":a.value}]),onMouseover:d[0]||(d[0]=f=>i.value=!0),onMouseleave:d[1]||(d[1]=f=>i.value=!1),onClick:lt(o,["stop"])},[(C(),se(dn(l(c.type)),{"field-index":c.fieldIndex,readonly:""},null,8,["field-index"])),En(z("div",dH,[(C(!0),F($e,null,ot(s.value,(f,m)=>En((C(),se(it,{key:m,size:"d",class:ee([{"ivyforms-field-unit__drag-item":f.icon==="move"}]),priority:"white",type:"ghost","icon-only":"","icon-start":f.icon,"icon-start-category":f.category,"icon-start-type":f.type,onClick:lt(f.handler,["stop","prevent"])},null,8,["class","icon-start","icon-start-category","icon-start-type","onClick"])),[[vo,!f.hidden]])),128))],512),[[vo,i.value||a.value]])],34))}}),pH=bt(fH,[["__scopeId","data-v-13ce9179"]]),hH={key:1},mH={class:"ivyforms-form-builder__submit-button ivyforms-p-12"},vH=he({__name:"FormBuilder",setup(n){const{getLabel:e}=at();Va();const t=Vr(),r=zt(),o=O(()=>r.fields),i=H(!1),a=()=>e("empty_state_title");Ht(async()=>{t.params.id&&(r.formId=t.params.id,r.fields.length||(r.counterFields=0))});const s=b=>"ivyforms-field-unit_"+r.formId+"_"+b.fieldIndex,l=()=>{i.value=!0},c=()=>{i.value=!1,y()},d=b=>{b.preventDefault(),document.querySelectorAll(".ivyforms-form-builder__list-group__item").forEach(k=>{k.classList.remove("dragging-over-top","dragging-over-bottom")});const _=b.currentTarget,w=_.getBoundingClientRect();b.clientY-w.top<w.height/2?_.classList.add("dragging-over-top"):_.classList.add("dragging-over-bottom"),document.querySelectorAll(".action-buttons").forEach(k=>{k.classList.add("hidden")})},f=b=>{b.preventDefault(),[...document.querySelectorAll(".ivyforms-form-builder__list-group__item")].some(w=>w.matches(":hover"))||document.querySelectorAll(".ivyforms-form-builder__list-group__item").forEach(w=>{w.classList.remove("dragging-over-top","dragging-over-bottom")})},m=b=>{b.preventDefault(),document.querySelectorAll(".ivyforms-form-builder__list-group__item").forEach(_=>{_.classList.remove("dragging-over-top","dragging-over-bottom")}),document.querySelectorAll(".action-buttons").forEach(_=>{_.classList.remove("hidden")})},g=b=>{r.selectField(b)},v=b=>{r.deselectField(b)},y=()=>{r.fields.forEach((b,_)=>{b.position=_+1})};return(b,_)=>{const w=Es,T=it,k=wp;return C(),F("div",{class:"ivyforms-form-builder ivyforms-flex ivyforms-flex-1 ivyforms-flex-direction-column ivyforms-pr-20 ivyforms-pt-10",onClick:v},[I(k,null,{default:V(()=>[I(h(Ap),{class:"ivyforms-form-builder__drop-area ivyforms-form-builder__list-group",list:o.value,group:"d_fields","item-key":"name","drag-class":"drag-class",onChange:y,onDragstart:l,onDragend:c},{item:V(({element:x})=>[z("div",{class:"ivyforms-form-builder__list-group__item",onDragover:d,onDragleave:f,onDrop:m},[I(pH,{id:s(x),variant:"default",type:x.type,"field-index":x.fieldIndex,onSelectField:g},null,8,["id","type","field-index"])],32)]),footer:V(()=>[o.value.length===0?(C(),F("div",{key:0,class:"ivyforms-form-builder__item__wrapper__empty",onDragover:d,onDragleave:f},[I(w,{title:a(),image:"form-builder"},null,8,["title"])],32)):ie("",!0),o.value.length!==0?(C(),F("div",hH,[z("div",mH,[I(T,{priority:"tertiary",type:"border",readonly:"",onClick:_[0]||(_[0]=lt(()=>{},["prevent"]))},{default:V(()=>[De(ae(h(e)("submit")),1)]),_:1})])])):ie("",!0)]),_:1},8,["list"])]),_:1})])}}}),gH=bt(vH,[["__scopeId","data-v-5cda581e"]]),yH={class:"ivyforms-form-builder-page__section-header ivyforms-flex ivyforms-flex-1 ivyforms-p-12"},bH={class:"ivyforms-form-builder-page__section-header__right"},SH=he({__name:"FormBuilderPageSectionHeader",setup(n){const{getLabel:e}=at();Va();const t=zt(),r=()=>{if(!t.formId){_t({message:e("form_id_not_found"),type:"error"});return}const o=`[ivyforms id=${t.formId}]`;navigator.clipboard?navigator.clipboard.writeText(o).then(()=>{_t({message:e("shortcode_copied"),type:"success"})}):_t({message:e("clipboard_api_not_supported"),type:"error"})};return(o,i)=>{const a=it,s=xn;return C(),F("div",yH,[i[0]||(i[0]=z("div",{class:"ivyforms-form-builder-page__section-header__left"},null,-1)),z("div",bH,[I(s,{content:h(e)("copy_shortcode"),placement:"top",theme:"inverted"},{default:V(()=>[I(a,{size:"s",priority:"tertiary",type:"fill","icon-only":"","icon-start":"code","icon-start-category":"global","icon-start-type":"fill",onClick:lt(r,["stop"])})]),_:1},8,["content"])])])}}}),_H=bt(SH,[["__scopeId","data-v-7f74d008"]]),wH={},xH={class:"ivyforms-form-builder-section ivyforms-flex ivyforms-flex-1 ivyforms-gap-8 ivyforms-flex-direction-column"};function kH(n,e){const t=_H,r=gH,o=$i,i=Hs;return C(),F("div",xH,[I(t),I(i,null,{default:V(()=>[I(o,null,{default:V(()=>[I(r)]),_:1})]),_:1})])}const CH=bt(wH,[["render",kH],["__scopeId","data-v-ea2cd0a0"]]),IH={class:"ivyforms-field-style ivyforms-pr-8"},EH=he({__name:"FieldStyleTabContent",setup(n){const{getLabel:e}=at();return(t,r)=>{const o=$i;return C(),se(o,null,{default:V(()=>[z("div",IH,ae(h(e)("style_data")),1)]),_:1})}}}),TH={},MH={class:"ivyforms-divider"};function OH(n,e){return C(),F("div",MH)}const Ro=bt(TH,[["render",OH],["__scopeId","data-v-2f5ea421"]]),Bg=he({__name:"IvyNumberInput",props:{modelValue:{},min:{default:Number.MIN_SAFE_INTEGER},max:{default:Number.MAX_SAFE_INTEGER},fullWidth:{type:Boolean,default:!0},filled:{type:Boolean},secondary:{type:Boolean}},emits:["update:modelValue","input"],setup(n,{expose:e,emit:t}){const r=n,o=t,i=H(),a=O({get(){return r.modelValue===null?void 0:r.modelValue},set(l){o("update:modelValue",l??null)}});return e({focus:()=>{var l;(l=i.value)==null||l.focus()}}),(l,c)=>{const d=rn,f=q9;return C(),se(f,kt({ref_key:"elInputNumberRef",ref:i},{...l.$attrs,...l.$props},{modelValue:a.value,"onUpdate:modelValue":c[0]||(c[0]=m=>a.value=m),"value-on-clear":"min",placeholder:"",class:["ivyforms-input-number",[{"ivyforms-full-width":l.fullWidth,"is-filled":r.filled,"is-secondary":r.secondary}]]}),{"decrease-icon":V(()=>[I(d,{priority:"tertiary",name:"minus",size:"s",type:"outline",color:"var(--map-base-dusk-symbol-2)"})]),"increase-icon":V(()=>[I(d,{priority:"tertiary",name:"plus",size:"s",type:"outline",color:"var(--map-base-dusk-symbol-2)"})]),_:1},16,["modelValue","class"])}}}),AH={key:0,class:"ivyforms-advanced-field-options ivyforms-flex ivyforms-flex-direction-column ivyforms-gap-16 ivyforms-pt-16 ivyforms-pr-8"},PH={key:0,class:"ivyforms-advanced-field-options__max-length ivyforms-flex ivyforms-flex-direction-column ivyforms-gap-16"},$H={key:1,class:"ivyforms-advanced-field-options__default-value ivyforms-flex ivyforms-flex-direction-column ivyforms-gap-16"},RH={key:2},DH={class:"ivyforms-label-position-options"},NH={key:3,class:"ivyforms-advanced-field-options__duplicates ivyforms-flex ivyforms-flex-direction-column ivyforms-gap-16"},FH=he({__name:"AdvancedFieldOptions",setup(n){const{getLabel:e}=at(),{selectedField:t}=Bs(zt()),{updateSelectedField:r}=zt(),o=(d,f)=>{r(d,f)},i=O(()=>["text","email","number","textarea","website","phone","name"].includes(t.value.type)),a=O(()=>["text","email","textarea","website","phone"].includes(t.value.type)),s=O(()=>["text","email","number","textarea","website"].includes(t.value.type)),l=O(()=>["text","email","number","website","phone"].includes(t.value.type)),c=O(()=>["text","email","number","textarea","website","phone"].includes(t.value.type));return(d,f)=>{const m=Pi,g=Bg,v=sn,y=Ro,b=cn,_=_p,w=vg,T=pn;return i.value?(C(),F("div",AH,[a.value?(C(),F("div",PH,[I(m,{modelValue:h(t).limitMaxLength,"onUpdate:modelValue":f[0]||(f[0]=k=>h(t).limitMaxLength=k),priority:"secondary",size:"d",title:h(e)("limit_maximum_length"),"text-position":"right",onChange:f[1]||(f[1]=k=>o("limitMaxLength",k))},null,8,["modelValue","title"]),h(t).limitMaxLength?(C(),se(v,{key:0,label:h(e)("maximum_length")},{default:V(()=>[I(g,{modelValue:h(t).maxLength,"onUpdate:modelValue":f[2]||(f[2]=k=>h(t).maxLength=k),min:1,max:65535,onInput:f[3]||(f[3]=k=>o("maxLength",k))},null,8,["modelValue"])]),_:1},8,["label"])):ie("",!0),I(y)])):ie("",!0),s.value?(C(),F("div",$H,[I(v,{label:h(e)("default_value")},{default:V(()=>[["text","email","number","website"].includes(h(t).type)?(C(),se(b,{key:0,modelValue:h(t).defaultValue,"onUpdate:modelValue":f[4]||(f[4]=k=>h(t).defaultValue=k),onInput:f[5]||(f[5]=k=>o("defaultValue",k))},null,8,["modelValue"])):ie("",!0),h(t).type==="textarea"?(C(),se(b,{key:1,modelValue:h(t).defaultValue,"onUpdate:modelValue":f[6]||(f[6]=k=>h(t).defaultValue=k),type:"textarea"},null,8,["modelValue"])):ie("",!0)]),_:1},8,["label"]),I(y)])):ie("",!0),c.value?(C(),F("div",RH,[I(v,{label:h(e)("label_position")},{default:V(()=>[z("div",DH,[I(w,{modelValue:h(t).labelPosition,"onUpdate:modelValue":f[7]||(f[7]=k=>h(t).labelPosition=k),priority:"secondary",onChange:f[8]||(f[8]=k=>o("labelPosition",k))},{default:V(()=>[I(_,{value:"default",priority:"secondary"},{default:V(()=>[De(ae(h(e)("label_position_default")),1)]),_:1}),I(_,{value:"top",priority:"secondary"},{default:V(()=>[De(ae(h(e)("label_position_top")),1)]),_:1}),I(_,{value:"left",priority:"secondary"},{default:V(()=>[De(ae(h(e)("label_position_left")),1)]),_:1}),I(_,{value:"right",priority:"secondary"},{default:V(()=>[De(ae(h(e)("label_position_right")),1)]),_:1})]),_:1},8,["modelValue"])])]),_:1},8,["label"])])):ie("",!0),l.value?(C(),F("div",NH,[I(y),I(T,{modelValue:h(t).noDuplicates,"onUpdate:modelValue":f[9]||(f[9]=k=>h(t).noDuplicates=k),priority:"secondary",type:"checkmark",onChange:f[10]||(f[10]=k=>o("noDuplicates",k))},{default:V(()=>[De(ae(h(e)("no_duplicates")),1)]),_:1},8,["modelValue"])])):ie("",!0)])):ie("",!0)}}}),LH=bt(FH,[["__scopeId","data-v-2e55ef06"]]),BH={class:"ivyforms-choice-item__top ivyforms-flex ivyforms-flex-direction-row ivyforms-align-items-center ivyforms-gap-12 ivyforms-mb-4"},VH={class:"ivyforms-choice-item__drag-handle"},zH={class:"ivyforms-choice-item__select ivyforms-flex ivyforms-align-items-center ivyforms-mr-8"},HH={key:0,class:"ivyforms-choice-item__default-label"},UH={key:0,class:"ivyforms-choice-item__default-label"},WH={key:0,class:"ivyforms-choice-item__image"},jH=["src"],KH={class:"ivyforms-choice-item__inputs ivyforms-flex ivyforms-flex-direction-row ivyforms-align-items-center ivyforms-gap-8"},YH=he({__name:"IvyChoiceItem",props:{id:{type:[String,Number],required:!0},label:{type:String,required:!0},value:{type:String,default:""},number:{type:Number,default:1},showValue:{type:Boolean,default:!1},calcValueEnabled:{type:Boolean,default:!1},type:{type:String,default:"single"},disabledDelete:{type:Boolean,default:!1},displayMode:{type:String,default:"none"},imageUrl:{type:String,default:""},iconName:{type:String,default:""},isDefault:{type:Boolean,default:!1},radioModelValue:{type:[String,Number],default:null},radioValue:{type:[String,Number],default:null},error:{type:String,default:""}},emits:["delete","move","update:label","update:value","update:number","set-default","try-delete"],setup(n,{emit:e}){const{getLabel:t}=at(),r=n,o=e,i=H(r.label),a=H(r.value),s=H(r.number);Me(()=>r.label,f=>i.value=f),Me(()=>r.value,f=>a.value=f),Me(()=>r.number,f=>s.value=f);const l=O(()=>r.type==="single"||r.type==="radio"),c=O(()=>r.type==="multiple"||r.type==="checkbox");function d(){r.disabledDelete?o("try-delete"):o("delete")}return(f,m)=>{const g=rn,v=_p,y=pn,b=it,_=cn,w=Bg,T=Ro;return C(),F($e,null,[z("div",kt({class:"ivyforms-choice-item ivyforms-flex ivyforms-flex-direction-column ivyforms-gap-8 ivyforms-mb-8 ivyforms-radius-8 ivyforms-py-8 ivyforms-px-12"},f.$attrs),[z("div",BH,[z("div",VH,[I(g,{name:"drag",category:"builder",type:"outline"})]),z("div",zH,[l.value?(C(),se(v,{key:0,priority:"secondary",class:"ivyforms-choice-item__type-icon","model-value":n.isDefault,value:!0,"onUpdate:modelValue":m[0]||(m[0]=k=>f.$emit("set-default",n.id))},{default:V(()=>[n.isDefault?(C(),F("div",HH,ae(h(t)("default")),1)):ie("",!0)]),_:1},8,["model-value"])):c.value?(C(),se(y,{key:1,name:"checkbox",class:"ivyforms-choice-item__type-icon","model-value":n.isDefault,onChange:m[1]||(m[1]=k=>f.$emit("set-default",n.id))},{default:V(()=>[n.isDefault?(C(),F("div",UH,ae(h(t)("default")),1)):ie("",!0)]),_:1},8,["model-value"])):ie("",!0)]),n.displayMode==="withImage"?(C(),F("div",WH,[z("img",{src:n.imageUrl,alt:"option image"},null,8,jH)])):n.displayMode==="withIcons"&&n.iconName?(C(),se(g,{key:1,name:n.iconName},null,8,["name"])):ie("",!0),I(b,{"icon-start":"trash","icon-start-type":"outline",priority:"danger",type:"ghost",class:ee(["ivyforms-choice-item__delete-btn ivyforms-ml-auto",{"ivyforms-choice-item__delete-btn--is-disabled":n.disabledDelete}]),onClick:d},null,8,["class"])]),z("div",KH,[I(sn,{error:n.error,style:Sn(n.showValue?"flex: 1 1 50%":"flex: 1 1 100%")},{default:V(()=>[I(_,{modelValue:i.value,"onUpdate:modelValue":m[2]||(m[2]=k=>i.value=k),placeholder:h(t)("option_label"),onInput:m[3]||(m[3]=k=>f.$emit("update:label",i.value))},null,8,["modelValue","placeholder"])]),_:1},8,["error","style"]),n.showValue?(C(),se(sn,{key:0,style:"flex: 1 1 50%"},{default:V(()=>[I(_,{modelValue:a.value,"onUpdate:modelValue":m[4]||(m[4]=k=>a.value=k),placeholder:h(t)("option_value"),onInput:m[5]||(m[5]=k=>f.$emit("update:value",a.value))},null,8,["modelValue","placeholder"])]),_:1})):ie("",!0),n.calcValueEnabled?(C(),se(w,{key:1,modelValue:s.value,"onUpdate:modelValue":m[6]||(m[6]=k=>s.value=k),onInput:m[7]||(m[7]=k=>f.$emit("update:number",s.value))},null,8,["modelValue"])):ie("",!0)])],16),I(T)],64)}}}),qH=bt(YH,[["__scopeId","data-v-12b8dd05"]]),GH={class:"ivyforms-choice-list"},JH={class:"ivyforms-choice-list__header ivyforms-gap-16 ivyforms-flex ivyforms-flex-direction-column"},XH={class:"ivyforms-choice-list__title ivyforms-flex ivyforms-align-items-center medium-14"},QH={class:"ivyforms-choice-list__toggles ivyforms-flex ivyforms-justify-content-between"},ZH={class:"ivyforms-choice-list__footer ivyforms-pt-16 ivyforms-gap-16 ivyforms-flex ivyforms-flex-direction-column"},eU={class:"ivyforms-choice-list__actions ivyforms-flex ivyforms-justify-content-between"},tU={class:"ivyforms-flex ivyforms-gap-8 ivyforms-mt-8 ivyforms-flex-direction-column"},nU=he({__name:"IvyChoiceList",props:{choices:{type:Array,required:!0,default:()=>[]},showValues:{type:Boolean,default:!0},shuffleOptions:{type:Boolean,default:!1},type:{type:String,default:"single"}},emits:["update:choices","update:showValues","update:shuffleOptions","update:defaultValue"],setup(n,{emit:e}){var M,D;const{getLabel:t}=at(),r=n,o=e,i=H(r.showValues),a=H(!1),s=H(r.shuffleOptions),l=H(!1),c=r.type,d=H([...r.choices]),f=H(d.value.length>0?Math.max(...d.value.map(A=>A.id))+1:1),m=H(((M=d.value.find(A=>A.isDefault))==null?void 0:M.id)||((D=d.value[0])==null?void 0:D.id));function g(){d.value.forEach((A,P)=>{A.position=P+1})}Me(()=>r.choices,A=>{var P,$;d.value=[...A],f.value=d.value.length>0?Math.max(...d.value.map(B=>B.id))+1:1,m.value=((P=d.value.find(B=>B.isDefault))==null?void 0:P.id)||(($=d.value[0])==null?void 0:$.id),g()},{deep:!0,immediate:!0}),Me(i,A=>o("update:showValues",A)),Me(s,A=>o("update:shuffleOptions",A)),Me(()=>r.shuffleOptions,A=>{s.value=A});function v(A){if(m.value=A,c==="radio"||c==="single")d.value.forEach($=>{$.isDefault=$.id===A});else{const $=d.value.find(B=>B.id===A);$&&($.isDefault=!$.isDefault)}x();const P=d.value.find($=>$.id===A);P&&o("update:defaultValue",P.value)}function y(){let A=1,P=`option${A}`;const $=new Set(d.value.map(B=>B.value));for(;$.has(P);)A++,P=`option${A}`;return P}function b(){const A=d.value.length+1;let P="";(c==="radio"||c==="checkbox")&&(P=`Option ${A}`);const $={id:f.value++,label:P,value:y(),number:A,isDefault:!1,position:A};d.value.push($),g(),x(),d.value.length===1&&v($.id)}function _(A){if(d.value.length===1)return;const P=d.value[A].isDefault;if(d.value.splice(A,1),g(),x(),P||!d.value.some($=>$.isDefault))d.value[0]&&v(d.value[0].id);else{const $=d.value.find(B=>B.isDefault);$&&o("update:defaultValue",$.value)}}function w(A,P,$=!1){const B=d.value.find(j=>j.id===A);B&&(B.label=P),$&&x()}function T(A,P,$=!1){const B=d.value.find(j=>j.id===A);B&&(!P||d.value.filter(j=>j.value===P).length>1?B.value=y():B.value=P),$&&x()}function k(){g(),x()}function x(){o("update:choices",d.value.map((A,P)=>({...A,position:P+1})))}return(A,P)=>{const $=rn,B=xn,j=pn,U=qH,G=it;return C(),F("div",GH,[z("div",JH,[z("div",XH,[De(ae(h(t)("option_list"))+" ",1),I(B,null,{content:V(()=>[De(ae(h(t)("configure_options_field")),1)]),default:V(()=>[I($,{name:"question",type:"outline",size:"xs",color:"var(--map-base-text-0)"})]),_:1})]),z("div",QH,[I(j,{modelValue:i.value,"onUpdate:modelValue":P[0]||(P[0]=N=>i.value=N),priority:"secondary",type:"checkmark"},{default:V(()=>[De(ae(h(t)("show_values")),1)]),_:1},8,["modelValue"])])]),I(h(Ap),{modelValue:d.value,"onUpdate:modelValue":P[2]||(P[2]=N=>d.value=N),"item-key":"id",handle:".ivyforms-choice-item__drag-handle",animation:150,class:"ivyforms-choice-list__items-list",onEnd:k},{item:V(({element:N,index:R})=>[z("div",null,[I(U,kt({id:N.id},N.attrs||{},{label:N.label,value:N.value,"show-value":i.value,"calc-value-enabled":a.value,type:h(c),"disabled-delete":d.value.length===1,"is-default":N.isDefault,"radio-model-value":m.value,"radio-value":N.id,onSetDefault:P[1]||(P[1]=X=>v(X)),onDelete:X=>_(R),"onUpdate:label":X=>w(N.id,X),"onUpdate:value":X=>T(N.id,X),onBlurLabel:X=>w(N.id,X,!0),onBlurValue:X=>T(N.id,X,!0),"onUpdate:modelValue":v}),null,16,["id","label","value","show-value","calc-value-enabled","type","disabled-delete","is-default","radio-model-value","radio-value","onDelete","onUpdate:label","onUpdate:value","onBlurLabel","onBlurValue"])])]),_:1},8,["modelValue"]),z("div",ZH,[z("div",eU,[I(G,{priority:"secondary",onClick:b},{default:V(()=>[De(ae(h(t)("add_option")),1)]),_:1})]),z("div",tU,[I(j,{modelValue:s.value,"onUpdate:modelValue":P[3]||(P[3]=N=>s.value=N),priority:"secondary",type:"checkmark"},{default:V(()=>[De(ae(h(t)("shuffle_options"))+" ",1),I(B,null,{content:V(()=>[De(ae(h(t)("randomize_order_options")),1)]),default:V(()=>[I($,{name:"question",type:"outline",size:"s",color:"var(--map-base-text-0)"})]),_:1})]),_:1},8,["modelValue"]),h(c)==="select"?(C(),se(j,{key:0,modelValue:l.value,"onUpdate:modelValue":P[4]||(P[4]=N=>l.value=N),priority:"secondary",type:"checkmark"},{default:V(()=>[De(ae(h(t)("enable_search"))+" ",1),I(B,null,{content:V(()=>[De(ae(h(t)("allow_search_options")),1)]),default:V(()=>[I($,{name:"question",type:"outline",size:"s",color:"var(--map-base-text-0)"})]),_:1})]),_:1},8,["modelValue"])):ie("",!0)])])])}}}),rU=bt(nU,[["__scopeId","data-v-bb92ea4c"]]),oU={class:"ivyforms-option-item__header__left ivyforms-flex ivyforms-align-items-center ivyforms-gap-8"},aU={class:"ivyforms-option-item__header__left__title medium-14"},iU={key:0,class:"ivyforms-option-item__content ivyforms-pt-8 ivyforms-pb-16 ivyforms-px-16 ivyforms-flex ivyforms-flex-direction-column ivyforms-border-radius-8 ivyforms-gap-16"},sU=he({inheritAttrs:!1,__name:"FieldOptionsItem",props:{title:{},collapsed:{type:Boolean},showDrag:{type:Boolean,default:!0},showTrash:{type:Boolean,default:!0},showDropdown:{type:Boolean,default:!0},disableDelete:{type:Boolean,default:!1},dragIcon:{default:()=>({name:"drag",category:"builder",type:"outline"})},trashIcon:{default:()=>({name:"trash",category:"global",type:"outline"})}},emits:["update:collapsed","delete"],setup(n,{emit:e}){const t=n,r=e,o=O(()=>t.showDrag!==!1),i=O(()=>t.showTrash!==!1),a=O(()=>t.showDropdown!==!1),s=O(()=>{var d,f,m;return{name:((d=t.dragIcon)==null?void 0:d.name)??"drag",category:((f=t.dragIcon)==null?void 0:f.category)??"builder",type:((m=t.dragIcon)==null?void 0:m.type)??"outline"}}),l=()=>r("update:collapsed",!t.collapsed),c=()=>{t.disableDelete||r("delete")};return(d,f)=>(C(),F("div",kt({class:["ivyforms-option-item ivyforms-mb-8 ivyforms-border-radius-8",{collapsed:d.collapsed}]},d.$attrs),[z("div",{class:"ivyforms-option-item__header ivyforms-flex ivyforms-align-items-center ivyforms-justify-content-between ivyforms-border-radius-8 ivyforms-px-8",onClick:l},[z("div",oU,[o.value?(C(),se(rn,{key:0,class:ee(["ivyforms-option-item__header__left__drag-icon",d.collapsed?"ivyforms-option-item__header__left__drag-icon--handle":"ivyforms-option-item__header__left__drag-icon--disabled",d.collapsed?"ivyforms-drag-handle":""]),name:s.value.name,category:s.value.category,type:s.value.type,onClick:f[0]||(f[0]=lt(()=>{},["stop"]))},null,8,["class","name","category","type"])):ie("",!0),xe(d.$slots,"header-actions",{},void 0,!0),z("span",aU,ae(d.title),1)]),z("div",{class:"ivyforms-option-actions ivyforms-flex ivyforms-align-items-center ivyforms-gap-4",onClick:f[1]||(f[1]=lt(()=>{},["stop"]))},[i.value?(C(),se(it,{key:0,priority:"danger",type:"ghost",size:"d","icon-start":"trash","icon-start-category":"global","icon-start-type":"outline","icon-only":"",disabled:d.disableDelete,"aria-label":"Delete",class:"ivyforms-trash-action",onClick:c},null,8,["disabled"])):ie("",!0),a.value?(C(),se(it,{key:1,priority:"tertiary",type:"ghost",size:"d","icon-start":"chevron-down","icon-start-category":"arrows","icon-start-type":"outline","icon-only":"",class:ee(["ivyforms-dropdown-toggle",{expanded:!d.collapsed}]),"aria-label":"Toggle section",onClick:l},null,8,["class"])):ie("",!0)])]),d.collapsed?ie("",!0):(C(),F("div",iU,[xe(d.$slots,"default",{},void 0,!0)]))],16))}}),zS=bt(sU,[["__scopeId","data-v-8056b645"]]),lU={class:"ivyforms-name-field-options ivyforms-flex ivyforms-flex-direction-column ivyforms-gap-16 ivyforms-pr-8 ivyforms-pt-16"},uU={class:"ivyforms-name-field-options__checkbox-row ivyforms-flex ivyforms-gap-16"},cU={class:"ivyforms-name-options-list-label medium-14"},dU={class:"ivyforms-flex ivyforms-flex-direction-column"},fU=he({__name:"NameFieldOptions",setup(n){const{getLabel:e}=at(),{selectedField:t}=Bs(zt()),{updateSelectedField:r,updateFieldOptions:o}=zt(),i=O({get:()=>{var j;return((j=t.value)==null?void 0:j.nameFields)||[]},set:j=>y("nameFields",j)}),a=H([]);let s=!1;Me(i,j=>{s||(a.value=[...j])},{immediate:!0,deep:!0}),Me(a,j=>{s&&y("nameFields",j)},{deep:!0});const l=H([]);Me(i,(j,U)=>{const G=j.length;if(!U||U.length===0){l.value=new Array(G).fill(!0),G>0&&(l.value[0]=!1);return}const N=l.value;l.value=new Array(G).fill(!0);for(let R=0;R<G;R++)l.value[R]=N[R]??!1},{immediate:!0});const c=O({get:()=>{var j;return((j=t.value)==null?void 0:j.hideLabel)||!1},set:j=>y("hideLabel",j)}),d=O({get:()=>{var j;return((j=t.value)==null?void 0:j.readOnly)||!1},set:j=>{if(y("readOnly",j),j){const U=i.value.map(G=>({...G,required:!1,requiredMessage:""}));y("nameFields",U)}}}),f=O({get:()=>{var j;return((j=t.value)==null?void 0:j.cssClasses)||""},set:j=>y("cssClasses",j)}),m=O(()=>i.value.length>=5),g=O(()=>i.value.some(j=>!!j.required)),v=O(()=>d.value),y=(j,U)=>{r(j,U),o(j,U)},b=j=>j.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),_=()=>{const j=e("name_field");let U=i.value.length;const G=new RegExp(`^${b(j)}\\s+(\\d+)$`,"i");for(const N of i.value){const R=/^nameField(\d+)$/i.exec(N.type||"");if(R){const te=parseInt(R[1],10);te>U&&(U=te)}const X=G.exec(N.label||"");if(X){const te=parseInt(X[1],10);te>U&&(U=te)}}return U+1},w=(j,U,G)=>{const N=[...i.value];N[j]={...N[j],[U]:G},y("nameFields",N)},T=j=>{if(i.value.length<=1)return;const U=[...i.value];U.splice(j,1),y("nameFields",U)},k=()=>{if(m.value)return;const j=[...i.value],U=_();j.push({type:`nameField${U}`,id:"",modelValue:"",label:`${e("name_field")} ${U}`,required:!1,optionHide:!1,description:"",placeholder:""}),y("nameFields",j)},x=()=>{s=!1,$()},M=()=>{s=!0,$()},D=j=>{j.preventDefault(),document.querySelectorAll(".ivyforms-name-option-item").forEach(R=>{R.classList.remove("dragging-over-top","dragging-over-bottom")});const U=j.currentTarget,G=U.getBoundingClientRect();j.clientY-G.top<G.height/2?U.classList.add("dragging-over-top"):U.classList.add("dragging-over-bottom")},A=j=>{j.preventDefault(),[...document.querySelectorAll(".ivyforms-name-option-item")].some(G=>G.matches(":hover"))||document.querySelectorAll(".ivyforms-name-option-item").forEach(G=>{G.classList.remove("dragging-over-top","dragging-over-bottom")})},P=j=>{j.preventDefault(),$()},$=()=>{document.querySelectorAll(".ivyforms-name-option-item").forEach(j=>{j.classList.remove("dragging-over-top","dragging-over-bottom")})},B=(j,U)=>{w(j,"required",!!U),U&&d.value&&y("readOnly",!1)};return(j,U)=>(C(),F("div",lU,[I(sn,{label:h(e)("label")},{default:V(()=>[I(cn,{modelValue:h(t).label,"onUpdate:modelValue":U[0]||(U[0]=G=>h(t).label=G),onInput:U[1]||(U[1]=G=>y("label",G))},null,8,["modelValue"])]),_:1},8,["label"]),z("div",uU,[I(pn,{modelValue:c.value,"onUpdate:modelValue":U[2]||(U[2]=G=>c.value=G),priority:"secondary",type:"checkmark",onChange:U[3]||(U[3]=G=>y("hideLabel",G))},{default:V(()=>[De(ae(h(e)("hide_label")),1)]),_:1},8,["modelValue"]),I(pn,{modelValue:d.value,"onUpdate:modelValue":U[4]||(U[4]=G=>d.value=G),priority:"secondary",type:"checkmark",disabled:g.value,onChange:U[5]||(U[5]=G=>y("readOnly",G))},{default:V(()=>[De(ae(h(e)("read_only")),1)]),_:1},8,["modelValue","disabled"])]),I(Ro),z("div",cU,ae(h(e)("options_list"))+":",1),z("div",dU,[I(h(Ap),{modelValue:a.value,"onUpdate:modelValue":U[6]||(U[6]=G=>a.value=G),handle:".ivyforms-drag-handle","item-key":"id","ghost-class":"ivyforms-drag-ghost","chosen-class":"ivyforms-drag-chosen",onStart:M,onEnd:x},{item:V(({element:G,index:N})=>[I(zS,{class:"ivyforms-name-option-item",title:G.label||`${h(e)("name_field")} ${N+1}`,collapsed:l.value[N],"disable-delete":i.value.length<=1,"drag-icon":{name:"drag",category:"builder",type:"outline"},"trash-icon":{name:"trash",category:"global",type:"outline"},"dropdown-icon":{collapsed:"chevron-down",expanded:"chevron-up",category:"arrows",type:"outline"},"onUpdate:collapsed":R=>l.value[N]=R,onDelete:R=>i.value.length>1&&T(N),onDragover:D,onDragleave:A,onDrop:P},{default:V(()=>[I(sn,{label:h(e)("sublabel")},{default:V(()=>[I(cn,{modelValue:G.label,"onUpdate:modelValue":R=>G.label=R,onInput:R=>w(N,"label",R)},null,8,["modelValue","onUpdate:modelValue","onInput"])]),_:2},1032,["label"]),I(sn,{label:h(e)("description_message")},{default:V(()=>[I(cn,{modelValue:G.description,"onUpdate:modelValue":R=>G.description=R,placeholder:h(e)("enter_description_here"),onInput:R=>w(N,"description",R)},null,8,["modelValue","onUpdate:modelValue","placeholder","onInput"])]),_:2},1032,["label"]),I(pn,{modelValue:G.optionHide,"onUpdate:modelValue":R=>G.optionHide=R,priority:"secondary",type:"checkmark",onChange:R=>w(N,"optionHide",R)},{default:V(()=>[De(ae(h(e)("hide_label")),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]),I(Ro),I(pn,{modelValue:G.required,"onUpdate:modelValue":R=>G.required=R,priority:"secondary",type:"checkmark",disabled:v.value,onChange:R=>B(N,R)},{default:V(()=>[De(ae(h(e)("required")),1)]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onChange"]),I(sn,{label:h(e)("required_message")},{default:V(()=>[I(cn,{modelValue:G.requiredMessage,"onUpdate:modelValue":R=>G.requiredMessage=R,placeholder:h(e)("this_field_is_required"),disabled:v.value||!G.required,onInput:R=>w(N,"requiredMessage",R)},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","onInput"])]),_:2},1032,["label"]),I(Ro),I(sn,{label:h(e)("placeholder")},{default:V(()=>[I(cn,{modelValue:G.placeholder,"onUpdate:modelValue":R=>G.placeholder=R,placeholder:h(e)("enter_text_here"),onInput:R=>w(N,"placeholder",R)},null,8,["modelValue","onUpdate:modelValue","placeholder","onInput"])]),_:2},1032,["label"]),I(sn,{label:h(e)("default_value")},{default:V(()=>[I(cn,{modelValue:G.modelValue,"onUpdate:modelValue":R=>G.modelValue=R,onInput:R=>w(N,"modelValue",R)},null,8,["modelValue","onUpdate:modelValue","onInput"])]),_:2},1032,["label"])]),_:2},1032,["title","collapsed","disable-delete","onUpdate:collapsed","onDelete"])]),_:1},8,["modelValue"])]),I(it,{priority:"secondary",type:"fill",size:"d","icon-start-category":"global","icon-start-name":"plus",disabled:m.value,onClick:k},{default:V(()=>[De(ae(h(e)("add_option")),1)]),_:1},8,["disabled"]),I(Ro),I(sn,{label:h(e)("css_classes")},{default:V(()=>[I(cn,{modelValue:f.value,"onUpdate:modelValue":U[7]||(U[7]=G=>f.value=G),onInput:U[8]||(U[8]=G=>y("cssClasses",G))},null,8,["modelValue"])]),_:1},8,["label"])]))}}),HS=bt(fU,[["__scopeId","data-v-66954623"]]),pU={key:1,class:"ivyforms-general-field-options ivyforms-flex ivyforms-flex-direction-column ivyforms-gap-16 ivyforms-pt-16 ivyforms-pr-8"},hU={class:"ivyforms-checkbox-row ivyforms-flex ivyforms-gap-16"},mU={key:2,class:"ivyforms-number-section ivyforms-flex ivyforms-flex-direction-column ivyforms-gap-16"},vU={class:"ivyforms-number-range ivyforms-flex ivyforms-gap-16"},gU={key:8,class:"ivyforms-email-confirmation ivyforms-flex ivyforms-flex-direction-column ivyforms-gap-16"},yU=he({__name:"GeneralFieldOptions",setup(n){const{getLabel:e}=at(),{selectedField:t}=Bs(zt()),{updateFieldOptions:r,updateSelectedField:o}=zt(),i=(d,f)=>{o(d,f),r(d,f)};Me(()=>t.value&&t.value.fieldOptions,d=>{t.value&&t.value.type==="radio"&&r("fieldOptions",d)},{deep:!0});const a=O({get(){return t.value?!t.value.rows||t.value.rows===0?null:t.value.rows:null},set(d){o("rows",d==null?0:Number(d))}}),s=d=>{a.value=d},l=O({get(){var d;return((d=t.value)==null?void 0:d.requiredMessage)||""},set(d){o("requiredMessage",d)}}),c=O({get(){var f;const d=(f=t.value)==null?void 0:f.description;return typeof d=="string"||typeof d=="number"?d:""},set(d){o("description",d)}});return(d,f)=>{const m=cn,g=sn,v=pn,y=Ro,b=rU,_=Fs,w=Ls,T=Pi,k=Bg;return h(t).type==="name"?(C(),se(HS,{key:0})):(C(),F("div",pU,[I(g,{label:h(e)("label")},{default:V(()=>[I(m,{modelValue:h(t).label,"onUpdate:modelValue":f[0]||(f[0]=x=>h(t).label=x),onInput:f[1]||(f[1]=x=>i("label",x))},null,8,["modelValue"])]),_:1},8,["label"]),I(v,{modelValue:h(t).hideLabel,"onUpdate:modelValue":f[2]||(f[2]=x=>h(t).hideLabel=x),priority:"secondary",type:"checkmark",onChange:f[3]||(f[3]=x=>i("hideLabel",x))},{default:V(()=>[De(ae(h(e)("hide_label")),1)]),_:1},8,["modelValue"]),I(g,{label:h(e)("description")},{default:V(()=>[I(m,{modelValue:c.value,"onUpdate:modelValue":f[4]||(f[4]=x=>c.value=x),placeholder:h(e)("field_desc_placeholder"),onInput:f[5]||(f[5]=x=>i("description",x))},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),I(y),z("div",hU,[I(v,{modelValue:h(t).required,"onUpdate:modelValue":f[6]||(f[6]=x=>h(t).required=x),priority:"secondary",type:"checkmark",disabled:h(t).readOnly,onChange:f[7]||(f[7]=x=>i("required",x))},{default:V(()=>[De(ae(h(e)("required")),1)]),_:1},8,["modelValue","disabled"]),I(v,{modelValue:h(t).readOnly,"onUpdate:modelValue":f[8]||(f[8]=x=>h(t).readOnly=x),priority:"secondary",type:"checkmark",disabled:h(t).required||h(t).confirmFieldEnabled,onChange:f[9]||(f[9]=x=>i("readOnly",x))},{default:V(()=>[De(ae(h(e)("read_only")),1)]),_:1},8,["modelValue","disabled"])]),h(t).required?(C(),se(g,{key:0,label:h(e)("required_message")},{default:V(()=>[I(m,{modelValue:l.value,"onUpdate:modelValue":f[10]||(f[10]=x=>l.value=x),placeholder:h(e)("required_message_placeholder"),onInput:f[11]||(f[11]=x=>i("requiredMessage",x))},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):ie("",!0),I(y),h(t).type==="radio"?(C(),F($e,{key:1},[I(b,{choices:h(t).fieldOptions,"onUpdate:choices":[f[12]||(f[12]=x=>h(t).fieldOptions=x),f[15]||(f[15]=x=>h(r)("fieldOptions",x))],"show-values":h(t).showValues,"onUpdate:showValues":f[13]||(f[13]=x=>h(t).showValues=x),"shuffle-options":h(t).shuffleOptions,"onUpdate:shuffleOptions":f[14]||(f[14]=x=>h(t).shuffleOptions=x),type:h(t).type},null,8,["choices","show-values","shuffle-options","type"]),I(y)],64)):ie("",!0),h(t).type==="number"?(C(),F("div",mU,[z("div",vU,[I(g,{label:h(e)("range_from")},{default:V(()=>[I(m,{"model-value":h(t).minValue===null?"":h(t).minValue,type:"number",max:h(t).maxValue??void 0,min:Number.MIN_SAFE_INTEGER,"onUpdate:modelValue":f[16]||(f[16]=x=>i("minValue",x))},null,8,["model-value","max","min"])]),_:1},8,["label"]),I(g,{label:h(e)("range_to")},{default:V(()=>[I(m,{"model-value":h(t).maxValue===null?"":h(t).maxValue,type:"number",min:h(t).minValue??void 0,max:Number.MAX_SAFE_INTEGER,"onUpdate:modelValue":f[17]||(f[17]=x=>i("maxValue",x))},null,8,["model-value","min","max"])]),_:1},8,["label"])]),I(y),h(t).type==="number"?(C(),se(g,{key:0,label:h(e)("step")},{default:V(()=>[I(m,{"model-value":h(t).step===null?1:h(t).step,type:"number",min:"1","onUpdate:modelValue":f[18]||(f[18]=x=>i("step",Number(x)<1?1:Number(x)))},null,8,["model-value"])]),_:1},8,["label"])):ie("",!0),h(t).type==="number"?(C(),se(g,{key:1,label:h(e)("number_format")},{default:V(()=>[I(w,{"model-value":h(t).numberFormat||"",class:"ivyforms-number-format-select","onUpdate:modelValue":f[19]||(f[19]=x=>i("numberFormat",x))},{default:V(()=>[I(_,{label:h(e)("number_format_none"),value:""},null,8,["label"]),I(_,{label:h(e)("number_format_us_decimal"),value:"us_decimal"},null,8,["label"]),I(_,{label:h(e)("number_format_us_int"),value:"us_int"},null,8,["label"]),I(_,{label:h(e)("number_format_eu_decimal"),value:"eu_decimal"},null,8,["label"]),I(_,{label:h(e)("number_format_eu_int"),value:"eu_int"},null,8,["label"])]),_:1},8,["model-value"])]),_:1},8,["label"])):ie("",!0),I(y)])):ie("",!0),h(t).type!=="checkbox"&&h(t).type!=="radio"?(C(),F($e,{key:3},[I(g,{label:h(e)("placeholder")},{default:V(()=>[I(m,{modelValue:h(t).placeholder,"onUpdate:modelValue":f[20]||(f[20]=x=>h(t).placeholder=x),onInput:f[21]||(f[21]=x=>i("placeholder",x))},null,8,["modelValue"])]),_:1},8,["label"]),I(y)],64)):ie("",!0),h(t).type==="phone"?(C(),F($e,{key:4},[I(g,{label:h(e)("phone_format")},{default:V(()=>[I(w,{modelValue:h(t).phoneFormat,"onUpdate:modelValue":f[22]||(f[22]=x=>h(t).phoneFormat=x),placeholder:h(e)("phone_format"),onChange:f[23]||(f[23]=x=>i("phoneFormat",x))},{default:V(()=>[I(_,{value:"international"},{default:V(()=>[De(ae(h(e)("phone_format_international")),1)]),_:1}),I(_,{value:"national"},{default:V(()=>[De(ae(h(e)("phone_format_national")),1)]),_:1}),I(_,{value:"e164"},{default:V(()=>[De(ae(h(e)("phone_format_e164")),1)]),_:1})]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),I(y)],64)):ie("",!0),I(g,{label:h(e)("css_classes")},{default:V(()=>[I(m,{modelValue:h(t).cssClasses,"onUpdate:modelValue":f[24]||(f[24]=x=>h(t).cssClasses=x),placeholder:h(e)("css_classes_placeholder"),onInput:f[25]||(f[25]=x=>i("cssClasses",x))},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),h(t).type==="phone"?(C(),F($e,{key:5},[I(y),I(T,{modelValue:h(t).phoneAutoDetect,"onUpdate:modelValue":f[26]||(f[26]=x=>h(t).phoneAutoDetect=x),priority:"secondary",title:h(e)("enable_auto_country_detection"),"text-position":"right",onChange:f[27]||(f[27]=x=>i("phoneAutoDetect",x))},null,8,["modelValue","title"])],64)):ie("",!0),h(t).type==="textarea"?(C(),se(y,{key:6})):ie("",!0),h(t).type==="textarea"?(C(),se(g,{key:7,label:h(e)("text_area_size")},{default:V(()=>[I(k,{modelValue:a.value,"onUpdate:modelValue":f[28]||(f[28]=x=>a.value=x),min:0,placeholder:h(e)("rows"),onInput:s},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):ie("",!0),h(t).type==="email"?(C(),F("div",gU,[I(y),I(T,{modelValue:h(t).confirmFieldEnabled,"onUpdate:modelValue":f[29]||(f[29]=x=>h(t).confirmFieldEnabled=x),priority:"secondary",title:h(e)("enable_email_confirmation"),"text-position":"right",disabled:h(t).readOnly,onChange:f[30]||(f[30]=x=>i("confirmFieldEnabled",x))},null,8,["modelValue","title","disabled"]),h(t).confirmFieldEnabled?(C(),F($e,{key:0},[I(g,{label:h(e)("confirmation_label")},{default:V(()=>[I(m,{modelValue:h(t).confirmFieldLabel,"onUpdate:modelValue":f[31]||(f[31]=x=>h(t).confirmFieldLabel=x),placeholder:h(e)("confirmation_label_placeholder"),onInput:f[32]||(f[32]=x=>i("confirmFieldLabel",x))},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),I(g,{label:h(e)("confirmation_placeholder")},{default:V(()=>[I(m,{modelValue:h(t).confirmFieldPlaceholder,"onUpdate:modelValue":f[33]||(f[33]=x=>h(t).confirmFieldPlaceholder=x),placeholder:h(e)("confirmation_placeholder_placeholder"),onInput:f[34]||(f[34]=x=>i("confirmFieldPlaceholder",x))},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),I(v,{modelValue:h(t).confirmFieldHideLabel,"onUpdate:modelValue":f[35]||(f[35]=x=>h(t).confirmFieldHideLabel=x),priority:"secondary",type:"checkmark",onChange:f[36]||(f[36]=x=>i("confirmFieldHideLabel",x))},{default:V(()=>[De(ae(h(e)("hide_confirmation_label")),1)]),_:1},8,["modelValue"])],64)):ie("",!0)])):ie("",!0)]))}}}),bU=bt(yU,[["__scopeId","data-v-b2fbd014"]]),SU={class:"ivyforms-address-field-options ivyforms-flex ivyforms-flex-direction-column ivyforms-gap-16 ivyforms-pr-8 ivyforms-pt-16"},_U={class:"ivyforms-address-field-options__checkbox-row ivyforms-flex ivyforms-gap-16"},wU={class:"ivyforms-address-field-options__options-list-label medium-14"},xU={class:"ivyforms-address-field-options__address-options ivyforms-flex ivyforms-flex-direction-column"},kU=he({__name:"AddressFieldOptions",setup(n){const{getLabel:e}=at(),{selectedField:t}=Bs(zt()),{updateSelectedField:r,updateFieldOptions:o}=zt(),i=O({get:()=>{var v;return((v=t.value)==null?void 0:v.addressFields)||[]},set:v=>f("addressFields",v)}),a=H([]);Me(i,(v,y)=>{const b=v.length;if(!y||y.length===0){a.value=new Array(b).fill(!0),b>0&&(a.value[0]=!1);return}const _=a.value;a.value=new Array(b).fill(!0);for(let w=0;w<b;w++)a.value[w]=_[w]??!1},{immediate:!0});const s=O({get:()=>{var v;return((v=t.value)==null?void 0:v.hideLabel)||!1},set:v=>f("hideLabel",v)}),l=O({get:()=>{var v;return((v=t.value)==null?void 0:v.countryDefaultValue)||""},set:v=>f("countryDefaultValue",v)}),c=Q3.map(v=>v.name),d=v=>{switch(v){case"streetAddress":return e("street_address");case"addressLine2":return e("address_line_2");case"city":return e("city");case"state":return e("state");case"zip":return e("zip");case"country":return e("country");default:return v}},f=(v,y)=>{r(v,y),o(v,y)},m=(v,y,b)=>{const _=[...i.value];_[v]={..._[v],[y]:b},f("addressFields",_)},g=(v,y)=>{m(v,"required",!!y)};return(v,y)=>(C(),F("div",SU,[I(sn,{label:h(e)("label")},{default:V(()=>[I(cn,{"model-value":h(t).label,onInput:y[0]||(y[0]=b=>f("label",b))},null,8,["model-value"])]),_:1},8,["label"]),z("div",_U,[I(pn,{modelValue:s.value,"onUpdate:modelValue":y[1]||(y[1]=b=>s.value=b),priority:"secondary",type:"checkmark",onChange:y[2]||(y[2]=b=>f("hideLabel",b))},{default:V(()=>[De(ae(h(e)("hide_label")),1)]),_:1},8,["modelValue"])]),I(Ro),z("div",wU,ae(h(e)("address_fields"))+": ",1),z("div",xU,[(C(!0),F($e,null,ot(i.value,(b,_)=>(C(),se(zS,{key:b.type,title:b.label||d(b.type),collapsed:a.value[_],"show-trash":!1,"dropdown-icon":{collapsed:"chevron-down",expanded:"chevron-up",category:"arrows",type:"outline"},"onUpdate:collapsed":w=>a.value[_]=w},{"header-actions":V(()=>[I(pn,{modelValue:b.visible,"onUpdate:modelValue":w=>b.visible=w,class:"ivyforms-address-field-options__option-item-visible-checkbox","aria-label":h(e)("show_field"),priority:"secondary",type:"withMarker",onChange:w=>m(_,"visible",w)},{default:V(()=>[De(ae(h(e)("")),1)]),_:2},1032,["modelValue","onUpdate:modelValue","aria-label","onChange"])]),default:V(()=>[I(sn,{label:h(e)("sublabel")},{default:V(()=>[I(cn,{modelValue:b.label,"onUpdate:modelValue":w=>b.label=w,onInput:w=>m(_,"label",w)},null,8,["modelValue","onUpdate:modelValue","onInput"])]),_:2},1032,["label"]),I(sn,{label:h(e)("description_message")},{default:V(()=>[I(cn,{modelValue:b.description,"onUpdate:modelValue":w=>b.description=w,placeholder:h(e)("enter_description_here"),onInput:w=>m(_,"description",w)},null,8,["modelValue","onUpdate:modelValue","placeholder","onInput"])]),_:2},1032,["label"]),I(pn,{modelValue:b.hideLabel,"onUpdate:modelValue":w=>b.hideLabel=w,priority:"secondary",type:"checkmark",onChange:w=>m(_,"hideLabel",w)},{default:V(()=>[De(ae(h(e)("hide_label")),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]),I(Ro),I(pn,{modelValue:b.required,"onUpdate:modelValue":w=>b.required=w,priority:"secondary",type:"checkmark",onChange:w=>g(_,w)},{default:V(()=>[De(ae(h(e)("required")),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]),I(sn,{label:h(e)("required_message")},{default:V(()=>[I(cn,{modelValue:b.requiredMessage,"onUpdate:modelValue":w=>b.requiredMessage=w,placeholder:h(e)("this_field_is_required"),onInput:w=>m(_,"requiredMessage",w)},null,8,["modelValue","onUpdate:modelValue","placeholder","onInput"])]),_:2},1032,["label"]),I(Ro),I(sn,{label:h(e)("placeholder")},{default:V(()=>[I(cn,{modelValue:b.placeholder,"onUpdate:modelValue":w=>b.placeholder=w,placeholder:h(e)("enter_text_here"),onInput:w=>m(_,"placeholder",w)},null,8,["modelValue","onUpdate:modelValue","placeholder","onInput"])]),_:2},1032,["label"]),b.type==="country"?(C(),se(sn,{key:0,label:h(e)("default_value")},{default:V(()=>[I(Ls,{modelValue:l.value,"onUpdate:modelValue":y[3]||(y[3]=w=>l.value=w),placeholder:h(e)("select_country"),onChange:y[4]||(y[4]=w=>f("countryDefaultValue",w))},{default:V(()=>[(C(!0),F($e,null,ot(h(c),w=>(C(),se(Fs,{key:w,value:w},{default:V(()=>[De(ae(w),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])):ie("",!0)]),_:2},1032,["title","collapsed","onUpdate:collapsed"]))),128))]),I(Ro),I(sn,{label:h(e)("css_classes")},{default:V(()=>[I(cn,{"model-value":h(t).cssClasses,onInput:y[5]||(y[5]=b=>f("cssClasses",b))},null,8,["model-value"])]),_:1},8,["label"])]))}}),CU=bt(kU,[["__scopeId","data-v-57b2d641"]]),IU={key:0,class:"ivyforms-secondary-tab-menu ivyforms-pr-8"},EU={class:"ivyforms-secondary-tab-menu__tabs"},TU={class:"ivyforms-secondary-tab-menu__content"},MU={key:0},OU={key:1},AU={key:2},PU={key:1},$U=he({__name:"FieldOptionsTabContent",props:{field:{default:null}},setup(n){const{getLabel:e}=at(),t=()=>e("no_field_selected"),r=()=>e("please_select_field"),o=H("general"),i=[{name:"general",label:e("general")},{name:"advanced",label:e("advanced")}];return(a,s)=>{const l=Us,c=CU,d=HS,f=bU,m=LH,g=Es;return a.field?(C(),F("div",IU,[z("div",EU,[I(l,{modelValue:o.value,"onUpdate:modelValue":s[0]||(s[0]=v=>o.value=v),type:"tonal",priority:"secondary",tabs:i,size:"s"},null,8,["modelValue"])]),z("div",TU,[o.value==="general"?(C(),F("div",MU,[a.field.type==="address"?(C(),se(c,{key:0})):a.field.type==="name"?(C(),se(d,{key:1})):(C(),se(f,{key:2,field:a.field},null,8,["field"]))])):ie("",!0),o.value==="advanced"?(C(),F("div",OU,[I(m)])):ie("",!0),o.value==="smartLogic"?(C(),F("div",AU)):ie("",!0)])])):(C(),F("div",PU,[I(g,{title:t(),subtitle:r(),image:"fields"},null,8,["title","subtitle"])]))}}}),RU=bt($U,[["__scopeId","data-v-3def0501"]]),DU=he({__name:"IvyCollapse",props:{accordion:{type:Boolean,default:!1}},setup(n){const e=H(["1"]),t=n;return(r,o)=>{const i=$T;return C(),se(i,kt({modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=a=>e.value=a),class:"ivyforms-collapse ivyforms-width-100"},r.$attrs,{accordion:t.accordion}),{default:V(()=>[xe(r.$slots,"default",{},void 0,!0)]),_:3},16,["modelValue","accordion"])}}}),NU=bt(DU,[["__scopeId","data-v-1086a760"]]),FU={class:"el-icon el-collapse-item__arrow"},LU={class:"ivyforms-collapse-item__title"},BU=he({__name:"IvyCollapseItem",props:{disabled:{type:Boolean,default:!1},comingSoon:{type:Boolean,default:!1},title:{type:String,default:""}},setup(n){const e=n,t=O(()=>e.disabled||e.comingSoon);return(r,o)=>{const i=Ns,a=RT;return C(),se(a,kt({class:["ivyforms-collapse-item",{"is-disabled":t.value}]},r.$attrs,{disabled:t.value}),{icon:V(({isActive:s})=>[e.comingSoon?(C(),se(i,{key:0,class:"ivyforms-collapse-item__coming-soon"})):ie("",!0),z("i",FU,[(C(),se(dn(s?h(uE):h(cE)),{class:"icon"}))])]),title:V(()=>[z("span",LU,[xe(r.$slots,"title",{},()=>[De(ae(e.title),1)],!0)])]),default:V(()=>[xe(r.$slots,"default",{},void 0,!0)]),_:3},16,["class","disabled"])}}}),VU=bt(BU,[["__scopeId","data-v-fb2e46f9"]]),zU=["disabled"],HU={class:"ivyforms-add-field__left-content"},UU={class:"ivyforms-add-field__name"},WU={class:"ivyforms-add-field__right-content"},jU=he({__name:"IvyAddField",props:{type:{default:"fill"},disabled:{type:Boolean,default:!1},comingSoon:{type:Boolean},iconStart:{default:""},iconEnd:{default:""},iconStartCategory:{default:"global"},iconEndCategory:{default:"global"},iconStartType:{default:"fill"},iconEndType:{default:"fill"},fieldName:{default:""},fieldType:{default:"text"}},setup(n){const e=n;return(t,r)=>{const o=rn,i=Ns;return C(),F("button",{class:ee(["ivyforms-add-field",["ivyforms-add-field__type__"+e.type,{"is-icon-start":e.iconStart,"is-icon-end":e.iconEnd}]]),disabled:e.disabled||e.comingSoon},[z("span",HU,[e.iconStart?(C(),se(o,{key:0,name:e.iconStart,category:e.iconStartCategory,type:e.iconStartType,class:"ivyforms-add-field__icon-start",size:"d"},null,8,["name","category","type"])):ie("",!0),z("span",UU,ae(e.fieldName),1)]),z("span",WU,[e.iconEnd?(C(),se(o,{key:0,name:e.iconEnd,category:e.iconEndCategory,type:e.iconEndType,class:"ivyforms-add-field__icon-end",size:"l"},null,8,["name","category","type"])):ie("",!0)]),e.comingSoon?(C(),se(i,{key:0,class:"ivyforms-add-field__coming-soon",size:"s"})):ie("",!0)],10,zU)}}}),KU=bt(jU,[["__scopeId","data-v-a73bdd2c"]]),YU={class:"ivyforms-add-field__drag-area ivyforms-flex-1 ivyforms-pr-8 ivyforms-gap-8"},qU=he({__name:"AddFieldTabContent",setup(n){const{getLabel:e}=at(),t=zt(),r=hc();Ht(async()=>{r.allSettings||await r.loadAllSettings()});const o=v=>v.filter(y=>y.comingSoon?!1:y.type==="recaptcha"?!t.fields.some(b=>b.type==="recaptcha"):!0),i=v=>v.filter(y=>y.comingSoon===!0),a=v=>v.filter(y=>y.comingSoon?!1:y.type==="recaptcha"?t.fields.some(_=>_.type==="recaptcha"):!1),s=O(()=>g.map(v=>({...v,draggableFields:o(v.dragFields),comingSoonFields:i(v.dragFields),disabledFields:a(v.dragFields)}))),l=v=>{if(t.isFormLoading||v==="recaptcha"&&t.fields.some(w=>w.type==="recaptcha"))return;(!Number.isFinite(t.counterFields)||t.counterFields<0)&&(t.counterFields=0);const y=t.increaseCounter(),b=m({type:v},y);t.addField({...b,position:t.fields.length+1}),c()},c=()=>{t.fields.forEach((v,y)=>{v.position=y+1})},d=v=>{var _;if(t.isFormLoading){v.preventDefault();return}const y=v.target,b=m(y.__draggable_context.element,t.counterFields);(_=v.dataTransfer)==null||_.setData("fieldData",JSON.stringify(b))},f=v=>{const y=t.increaseCounter();return m(v,y)},m=(v,y)=>{switch(v.type){case"text":return{id:0,fieldIndex:y,type:"text",label:e("text"),required:!1,defaultValue:"",placeholder:"",position:0};case"email":return{id:0,fieldIndex:y,type:"email",label:e("email"),required:!1,defaultValue:"",placeholder:"",position:0};case"number":return{id:0,fieldIndex:y,type:"number",label:e("number"),required:!1,defaultValue:"",placeholder:"",position:0};case"textarea":return{id:0,fieldIndex:y,type:"textarea",label:e("paragraph"),required:!1,defaultValue:"",placeholder:"",position:0};case"phone":return{id:0,fieldIndex:y,type:"phone",label:e("phone"),required:!1,defaultValue:"",placeholder:"",position:0};case"website":return{id:0,fieldIndex:y,type:"website",label:e("website"),required:!1,defaultValue:"",placeholder:"",position:0};case"recaptcha":return{id:0,fieldIndex:y,type:"recaptcha",label:e("recaptcha"),required:!1,defaultValue:"",placeholder:"",position:0};case"radio":return{id:0,fieldIndex:y,type:"radio",label:e("radio_button"),required:!1,defaultValue:e("option_1"),placeholder:"",position:0,fieldOptions:[{id:0,label:e("option_1"),value:"option1",isDefault:!0,position:1},{id:0,label:e("option_2"),value:"option2",isDefault:!1,position:2}],shuffleOptions:!1,showValues:!0};case"address":{const b=["streetAddress","addressLine2","city","state","zip","country"],_=b.map(w=>({type:w,id:"",label:e(w==="addressLine2"?"address_line_2":w),value:"",placeholder:"",required:!1,hideLabel:!1,description:"",requiredMessage:"",visible:!0}));return{id:0,fieldIndex:y,type:"address",label:e("address"),hideLabel:!1,cssClasses:"",labelPosition:"top",addressFieldTypes:b,addressFields:_,countryDefaultValue:"",position:0}}case"name":{const b=["nameField1","nameField2"],_=b.map((w,T)=>({type:w,id:"",modelValue:"",label:e(T===0?"first_name":"last_name"),required:!1,optionHide:!1,description:"",placeholder:""}));return{id:0,fieldIndex:y,type:"name",label:e("name"),required:!1,defaultValue:"",placeholder:"",position:0,nameFieldTypes:b,nameFields:_}}}},g=[{title:"General",name:"1",dragFields:[{type:"text",name:e("text"),iconStart:"field",iconStartType:"outline",iconStartCategory:"global"},{type:"email",name:e("email"),iconStart:"email",iconStartType:"outline",iconStartCategory:"global"},{type:"number",name:e("number"),iconStart:"hashtag",iconStartType:"outline",iconStartCategory:"global"},{type:"textarea",name:e("paragraph"),iconStart:"paragraph",iconStartType:"outline",iconStartCategory:"global"},{type:"phone",name:e("phone"),iconStart:"phone",iconStartType:"outline",iconStartCategory:"global"},{type:"website",name:e("website"),iconStart:"globe",iconStartType:"outline",iconStartCategory:"global"},{type:"name",name:e("name"),iconStart:"user",iconStartType:"outline",iconStartCategory:"global"},{type:"address",name:e("address"),iconStart:"location",iconStartType:"outline",iconStartCategory:"global"},{type:"time",name:e("time"),iconStart:"clock",iconStartType:"outline",iconStartCategory:"global",comingSoon:!0},{type:"checkbox",name:e("checkbox"),iconStart:"checkbox",iconStartType:"outline",iconStartCategory:"global",comingSoon:!0},{type:"dropdown",name:e("dropdown"),iconStart:"chevron-square-down",iconStartType:"outline",iconStartCategory:"arrows",comingSoon:!0},{type:"radio",name:e("radio_button"),iconStart:"radio",iconStartType:"outline",iconStartCategory:"global"}]},{title:e("security"),name:"2",dragFields:[{type:"recaptcha",name:e("recaptcha"),iconStart:"recaptcha",iconStartType:"fill",iconStartCategory:"security"}]}];return(v,y)=>{const b=KU,_=VU,w=NU;return C(),se(w,{accordion:!1},{default:V(()=>[(C(!0),F($e,null,ot(s.value,(T,k)=>(C(),se(_,{key:k,title:T.title,name:T.name,"coming-soon":T.dragFields.length===0},{default:V(()=>[z("div",YU,[I(h(Ap),{class:"ivyforms-add-field__draggable-wrapper",list:T.draggableFields,sort:!1,group:{name:"d_fields",pull:"clone",put:!1},clone:f,"item-key":"type",disabled:h(t).isFormLoading,onDragstart:y[0]||(y[0]=x=>d(x))},{item:V(({element:x})=>[I(b,{"field-type":x.type,"field-name":x.name,"icon-start":x.iconStart,"icon-start-category":x.iconStartCategory,"icon-start-type":x.iconStartType,disabled:h(t).isFormLoading,onClick:M=>l(x.type)},null,8,["field-type","field-name","icon-start","icon-start-category","icon-start-type","disabled","onClick"])]),_:2},1032,["list","disabled"]),(C(!0),F($e,null,ot(T.comingSoonFields,x=>(C(),se(b,{key:x.type,"field-type":x.type,"field-name":x.name,"icon-start":x.iconStart,"icon-start-category":x.iconStartCategory,"icon-start-type":x.iconStartType,"coming-soon":!0,disabled:!0},null,8,["field-type","field-name","icon-start","icon-start-category","icon-start-type"]))),128)),(C(!0),F($e,null,ot(T.disabledFields,x=>(C(),se(b,{key:`disabled-${x.type}`,"field-type":x.type,"field-name":x.name,"icon-start":x.iconStart,"icon-start-category":x.iconStartCategory,"icon-start-type":x.iconStartType,"coming-soon":!1,disabled:!0},null,8,["field-type","field-name","icon-start","icon-start-category","icon-start-type"]))),128))])]),_:2},1032,["title","name","coming-soon"]))),128))]),_:1})}}}),GU=bt(qU,[["__scopeId","data-v-912ad207"]]),JU={class:"ivyforms-tabs-container ivyforms-pb-16 ivyforms-pr-12"},XU={class:"ivyforms-tab-content ivyforms-pr-12 ivyforms-width-100"},QU={key:0},ZU={key:1},eW={key:2},tW=he({__name:"FormBuilderPagePanel",setup(n){const{getLabel:e}=at();Va();const t=zt(),r=H("addField"),o=[{name:"addField",label:e("add_field")},{name:"options",label:e("options")},{name:"style",label:e("style"),disabled:!0}];return Me(()=>t.selectedField,i=>{i&&(r.value="options")}),(i,a)=>{const s=Us,l=GU,c=RU,d=EH,f=$i,m=yc;return C(),se(m,{width:360},{default:V(()=>[z("div",JU,[I(s,{modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=g=>r.value=g),background:"",type:"filled",size:"s",priority:"primary",tabs:o,"coming-soon":!0},null,8,["modelValue"])]),z("div",XU,[I(f,null,{default:V(()=>[r.value==="addField"?(C(),F("div",QU,[I(l)])):ie("",!0),r.value==="options"?(C(),F("div",ZU,[I(c,{field:h(t).selectedField},null,8,["field"])])):ie("",!0),r.value==="style"?(C(),F("div",eW,[I(d)])):ie("",!0)]),_:1})])]),_:1})}}}),nW=bt(tW,[["__scopeId","data-v-a2500ae8"]]),rW=["disabled","aria-label"],oW={key:0,class:"ivyforms-button-option__spinner-container"},aW={key:2},Wl=he({__name:"IvyButtonOption",props:{priority:{default:"primary"},type:{default:"fill"},size:{default:"d"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},active:{type:Boolean,default:!1},iconStart:{default:""},iconEnd:{default:""},iconStartCategory:{default:"global"},iconEndCategory:{default:"global"},iconStartType:{default:"fill"},iconEndType:{default:"fill"},fullWidth:{type:Boolean,default:!1},iconOnly:{type:Boolean,default:!1},ariaLabel:{default:""}},setup(n){const{getLabel:e}=at(),t=n,r=()=>{(document==null?void 0:document.activeElement).blur()},o=i=>{i.preventDefault()};return(i,a)=>{const s=rn;return C(),F("button",{class:ee(["ivyforms-button-option",["ivyforms-button-option__priority__"+t.priority,"ivyforms-button-option__type__"+t.type,"ivyforms-button-option__size__"+t.size,{"is-active":t.active,"is-loading":t.loading,"is-icon-start":t.iconStart&&i.$slots.default&&!t.iconOnly,"is-icon-end":t.iconEnd&&i.$slots.default&&!t.iconOnly,"is-icon-only":(t.iconStart||t.iconEnd)&&!i.$slots.default||t.iconOnly}]]),disabled:t.disabled||t.loading,"aria-label":t.ariaLabel||h(e)("option_button"),style:Sn({width:t.fullWidth?"100%":void 0}),onClick:r,onMousedown:o},[t.loading?(C(),F("span",oW,a[0]||(a[0]=[z("svg",{viewBox:"0 0 50 50",class:"ivyforms-button-option__spinner"},[z("circle",{class:"ivyforms-button-option__spinner__line",cx:"25",cy:"25",r:"22.5"})],-1)]))):ie("",!0),t.iconStart&&!t.loading?(C(),se(s,{key:1,name:t.iconStart,category:t.iconStartCategory,type:t.iconStartType,size:t.size,class:"ivyforms-button-option__icon-start"},null,8,["name","category","type","size"])):ie("",!0),i.$slots.default&&!t.iconOnly?(C(),F("span",aW,[xe(i.$slots,"default")])):ie("",!0),t.iconEnd?(C(),se(s,{key:3,name:t.iconEnd,category:t.iconEndCategory,type:t.iconEndType,size:t.size,class:"ivyforms-button-option__icon-end"},null,8,["name","category","type","size"])):ie("",!0),a[1]||(a[1]=z("svg",{class:"ivyforms-button-option__transition",width:"100%",height:"100%",fill:"none"},[z("g",null,[z("rect",{width:"100%",height:"100%"})])],-1))],46,rW)}}}),iW=["onClick"],sW={class:"ivyforms-flex ivyforms-align-items-center ivyforms-gap-4 ivyforms-width-100"},lW={class:"ivyforms-width-100"},uW={class:"ivyforms-filter-item-label ivyforms-width-100 ivyforms-flex ivyforms-align-items-start ivyforms-justify-content-between ivyforms-gap-4"},cW={class:"ivyforms-filter-item-value regular-14"},dW={key:0,class:"ivyforms-filter-item-subtitle"},fW={class:"ivyforms-filter-item__children__items"},pW=["onClick"],hW={key:2,class:"ivyforms-filter-options--empty ivyforms-p-16"},mW={class:"ivyforms-filter-options--empty__text medium-14 ivyforms-mb-8 text-align-center"},vW={class:"ivyforms-filter-options--empty__text regular-12 text-align-center"},gW=he({__name:"IvyFilterItems",props:{options:{},selectedItems:{},filterText:{},loading:{type:Boolean}},emits:["select"],setup(n,{emit:e}){const{getLabel:t}=at(),r=m=>`${t("no_results_for")} ${m}`,o=n,i=e,a=H([]),s=O(()=>{const m=JSON.parse(JSON.stringify(o.options));return o.filterText?m.filter(g=>{if(g.children){const v=g.children.filter(y=>y.label.toLowerCase().includes(o.filterText.toLowerCase()));return g.children=v,v.length>0}return g.label.toLowerCase().includes(o.filterText.toLowerCase())}):m}),l=m=>{if(m.children){const g=d(m);for(const v of m.children)g&&c(v)||i("select",v.value);return}i("select",m.value)},c=m=>Array.isArray(o.selectedItems)?m.children?m.children.every(g=>o.selectedItems.includes(g.value)):o.selectedItems.includes(m.value):o.selectedItems===m.value,d=m=>Array.isArray(o.selectedItems)&&m.children?!m.children.every(g=>o.selectedItems.includes(g.value))&&m.children.some(g=>o.selectedItems.includes(g.value)):!1,f=m=>{const g=a.value.findIndex(v=>v===m);g===-1?a.value.push(m):a.value.splice(g,1)};return(m,g)=>{const v=Wl,y=rn,b=pn,_=Sc,w=bc;return C(),F("div",null,[m.loading?ie("",!0):(C(!0),F($e,{key:0},ot(s.value,(T,k)=>(C(),F("div",{key:k,class:ee(["ivyforms-filter-options",{"ivyforms-filter-options--parent":T.children}])},[z("div",{class:ee(["ivyforms-filter-item",{"ivyforms-filter-item--parent":T.children,"is-selected":c(T)&&!Array.isArray(o.selectedItems)}]),onClick:x=>T.children?void 0:l(T)},[z("div",sW,[T.children?(C(),se(v,{key:0,type:"ghost","icon-start-type":"outline","icon-start":"arrow-down","icon-start-category":"arrows",size:"xs",class:ee(["ivyforms-filter-item__collapse-button",{collapsed:a.value.includes(T.value)}]),onClick:x=>f(T.value)},null,8,["class","onClick"])):ie("",!0),T.icon?(C(),se(y,{key:1,name:T.icon,category:T.iconCategory||"global",color:T.iconColor,type:T.iconType,"outer-size":"20px"},null,8,["name","category","color","type"])):ie("",!0),z("div",lW,[z("div",uW,[De(ae(T.label)+" ",1),z("div",cW,ae(T.labelId),1)]),T.subtitle?(C(),F("div",dW,ae(T.subtitle),1)):ie("",!0)])]),Array.isArray(o.selectedItems)?(C(),se(b,{key:0,indeterminate:d(T),"model-value":c(T),onChange:x=>T.children?l(T):void 0},null,8,["indeterminate","model-value","onChange"])):ie("",!0)],10,iW),T.children?(C(),F("div",{key:0,class:ee(["ivyforms-filter-item__children__wrapper",{collapsed:a.value.includes(T.value)}])},[z("div",fW,[(C(!0),F($e,null,ot(T.children,(x,M)=>(C(),F("div",{key:M,class:"ivyforms-filter-item",onClick:D=>l(x)},[De(ae(x.label)+" ",1),I(b,{"model-value":c(x)},null,8,["model-value"])],8,pW))),128))])],2)):ie("",!0)],2))),128)),m.loading?(C(),se(w,{key:1},{template:V(()=>[(C(),F($e,null,ot(10,T=>z("div",{key:T,class:"ivyforms-filter-options--parent ivyforms-py-8"},[I(_,{style:{height:"20px"}})])),64))]),_:1})):ie("",!0),!s.value.length&&!m.loading?(C(),F("div",hW,[z("div",mW,ae(r(m.filterText)),1),z("div",vW,ae(h(t)("try_adjusting_search")),1)])):ie("",!0)])}}}),yW={key:0,class:"ivyforms-filter__button__loading"},bW={key:0,class:"ivyforms-filter__button__placeholder"},SW={key:1,class:"ivyforms-filter__button__label"},_W={class:"ivyforms-text-cut"},wW={key:2,class:"ivyforms-filter__button__clear ivyforms-filter__icon"},xW={key:3,class:"ivyforms-filter__button__arrow ivyforms-filter__icon"},kW={key:0,class:"ivyforms-filter__search"},Pp=he({__name:"IvyFilter",props:{modelValue:{},size:{default:"d"},priority:{default:"primary"},popperClass:{default:""},icon:{default:"filter"},iconCategory:{default:"global"},iconColor:{default:""},iconType:{default:"outline"},clearable:{type:Boolean},searchable:{type:Boolean,default:!0},disabled:{type:Boolean},placeholder:{default:""},loading:{type:Boolean},options:{},popoverWidth:{default:"272px"},showOnlyIcon:{type:Boolean},type:{default:"fill"},popperBackground:{default:"level-2-foreground"},isFullWidth:{type:Boolean,default:!1},remoteMethod:{}},emits:["update:modelValue","visibleChange","change"],setup(n,{emit:e}){const{getLabel:t}=at(),r=n,o=e,i=H(!1),a=H(!1),s=H(null),l=H(null),c=H("");Ov(s,()=>{h(l)});const d=O({get(){return r.modelValue},set(k){o("update:modelValue",k),o("change",k)}}),f=O(()=>{const k=d.value;return r.clearable&&(Array.isArray(k)?k.length:k)}),m=O(()=>{const k=d.value;return Array.isArray(k)?k.length>0:!!k}),g=H(d.value),v=()=>{for(const k of r.options){if(k.children){for(const x of k.children)if(x.value===d.value[0])return x.label}if(k.value===(Array.isArray(d.value)?d.value[0]:d.value))return k.label}},y=()=>{r.clearable&&(Array.isArray(d.value)?d.value=[]:d.value=null,o("update:modelValue",Array.isArray(d.value)?[]:null))},b=()=>{Array.isArray(d.value)?g.value=[...d.value]:g.value=d.value,i.value=!0,T("")},_=()=>{i.value=!1,c.value=""},w=k=>{if(Array.isArray(d.value)){const x=d.value.findIndex(M=>M===k);x===-1?d.value.push(k):d.value.splice(x,1)}else d.value=k,l.value&&l.value.hide()},T=async k=>{r.remoteMethod&&(a.value=!0,await r.remoteMethod(k),a.value=!1)};return(k,x)=>{const M=Wl,D=rn,A=Ws,P=gW,$=$i,B=js;return C(),F("div",{class:ee(["ivyforms-filter",[`size-${r.size}`,{"is-clearable":f.value,"is-open":i.value,"has-value":Array.isArray(d.value)?d.value.length>0:d.value,"is-disabled":r.disabled,"is-icon-only":r.showOnlyIcon,"is-full-width":r.isFullWidth,"is-loading":r.loading}]])},[r.showOnlyIcon?(C(),se(M,{key:0,ref_key:"filterButtonRef",ref:s,"icon-start":r.icon,"icon-start-type":r.iconType,"icon-start-category":r.iconCategory,type:r.type,priority:r.priority,active:m.value,onClick:x[0]||(x[0]=j=>b())},null,8,["icon-start","icon-start-type","icon-start-category","type","priority","active"])):(C(),F("div",{key:1,ref_key:"filterButtonRef",ref:s,class:ee(["ivyforms-filter__button",{"ivyforms-filter__button--border":r.type==="border","ivyforms-filter__button--loading":r.loading}]),onClick:x[1]||(x[1]=j=>b())},[r.loading?(C(),F("div",yW,x[5]||(x[5]=[z("span",{class:"ivyforms-filter__button__spinner-container"},[z("svg",{viewBox:"0 0 50 50",class:"ivyforms-filter__button__spinner"},[z("circle",{class:"ivyforms-filter__button__spinner__line",cx:"25",cy:"25",r:"22.5"})])],-1)]))):ie("",!0),r.loading?ie("",!0):(C(),F($e,{key:1},[m.value?ie("",!0):(C(),F("span",bW,ae(r.placeholder),1)),m.value?(C(),F("div",SW,[z("span",_W,ae(v()),1)])):ie("",!0)],64)),f.value&&!r.loading?(C(),F("div",wW,[I(D,{class:"ivyforms-filter__icon",name:"close",size:"s",priority:"tertiary",type:"outline",color:"var(--map-base-dusk-symbol-2)",onClick:lt(y,["stop"])})])):r.loading?ie("",!0):(C(),F("div",xW,[I(D,{priority:"tertiary",name:"chevron-down",type:"outline",category:"arrows",size:"s",color:"var(--map-base-dusk-symbol-2)"})]))],2)),I(B,{ref_key:"filterPopoverRef",ref:l,trigger:"click",placement:"bottom-start","virtual-ref":s.value,"show-arrow":!1,width:k.popoverWidth,"virtual-triggering":"","popper-class":"ivyforms-filter-popover","popper-background":r.popperBackground,"is-with-scrollbar":!1,onBeforeEnter:x[3]||(x[3]=j=>i.value=!0),onAfterLeave:x[4]||(x[4]=j=>_())},{default:V(()=>[k.searchable?(C(),F("div",kW,[I(A,{modelValue:c.value,"onUpdate:modelValue":[x[2]||(x[2]=j=>c.value=j),T],placeholder:h(t)("search"),"should-collapse-on-mobile":!1},null,8,["modelValue","placeholder"])])):ie("",!0),I($,null,{default:V(()=>[I(P,{class:"ivyforms-filter-popover__items",options:k.options,"selected-items":d.value,"filter-text":c.value,loading:a.value,onSelect:w},null,8,["options","selected-items","filter-text","loading"])]),_:1})]),_:1},8,["virtual-ref","width","popper-background"])],2)}}});function $p(){const n=ko(),e=Rs(),t=Na(),r=zt(),o=Ul(),i=Ds();function a(){return{hasFormBuilderUnsaved:e.hasUnsavedChanges("formBuilder",()=>r.getCurrentState()).value,hasConfirmationUnsaved:e.hasUnsavedChanges("confirmationBuilder",()=>o.getCurrentState()).value,hasNotificationUnsaved:e.hasUnsavedChanges("notificationBuilder",()=>i.getCurrentState()).value}}async function s(f){return o.id&&o.formId==f||(await o.fetchAllConfirmations(f),o.id)||(o.formId=f,await o.createConfirmation()),o.id}async function l(f,m=null){const{hasFormBuilderUnsaved:g,hasConfirmationUnsaved:v,hasNotificationUnsaved:y}=a();if(g||v||y)return f.routeName?{name:m,params:{id:r.formId}}:void 0;if(f.routeName==="form-confirmation"){const b=r.formId,_=await s(b);return{name:f.routeName,params:{formId:b,confirmationId:_}}}return f.routeName==="form-notifications"?{name:f.routeName,params:{formId:r.formId}}:f.routeName?{name:f.routeName,params:{id:r.formId}}:void 0}async function c(f,m){if(m(f.routeName))return;const{hasFormBuilderUnsaved:g,hasConfirmationUnsaved:v,hasNotificationUnsaved:y}=a(),b=async()=>{if(f.routeName==="form-confirmation"){const _=r.formId,w=await s(_);await n.push({name:f.routeName,params:{formId:_,confirmationId:w}});return}if(f.routeName==="form-notifications"){await n.push({name:f.routeName,params:{formId:r.formId}});return}await n.push({name:f.routeName,params:{id:r.formId}})};g||v||y?t.showUnsavedChangesDialog(async()=>{g&&e.resetUnsavedChanges("formBuilder",()=>r.getCurrentState()),v&&e.resetUnsavedChanges("confirmationBuilder",()=>o.getCurrentState()),y&&e.resetUnsavedChanges("notificationBuilder",()=>i.getCurrentState()),await b()}):await b()}function d(f,m){const g=n.currentRoute.value.matched;if(g.some(({name:v})=>v===f))return!0;if(g.length>1&&m==="settings"){const v=g[g.length-2];if(v&&v.name===xf)return!0}return!!(m==="notifications"&&g.some(({name:v})=>v===kf||v===Cf))}return{getMenuRoute:l,onMenuClick:c,isActive:d}}function xa(n){const e=zt(),{getLabel:t}=at();if(e.formId&&e.name){const r=n.value.findIndex(o=>o.value===e.formId);r===-1?n.value.push({value:e.formId,labelId:`${t("id")}: ${e.formId}`,label:e.name}):n.value[r].label=e.name}}const CW=he({__name:"FormBuilderPage",setup(n){const{getLabel:e}=at(),{redirectToWordPressAdminPage:t}=oa(),r=ko(),o=H(!1),i=Rs(),a={formBuilder:()=>f.getCurrentState(),confirmationBuilder:()=>y.getCurrentState(),notificationBuilder:()=>v.getCurrentState()},s=O(()=>[{label:e("build"),index:"build",routeName:f.isEditing?Is:Cs},{label:e("settings"),index:"settings",routeName:Ci},{label:e("results"),index:"results",routeName:Ii}]),l=H([]),c=H(!1),d=H(!1),f=zt(),m=aa(),g=Vs(),v=Ds(),y=Ul(),b=$p(),_=O(()=>f.formId),w=async()=>{c.value=!0;try{await g.fetchData({page:1,perPage:100}),l.value=g.tableData.map($=>({value:$.id,labelId:`${e("id")}: ${$.id}`,label:$.name||`Form #${$.id}`}))}catch($){console.error(e("failed_to_fetch_form"),$),_t({message:e("failed_to_fetch_form"),type:"error"})}finally{c.value=!1}},T=async $=>{if(!$){f.resetForm(),v.allNotifications=[],v.formId=null,y.allConfirmations=[],y.formId=null,await r.push({path:"/"});return}d.value=!0;try{await f.loadForm($),r.currentRoute.value.path.includes("/settings/general/")||r.currentRoute.value.path.includes("/settings/notification")||r.currentRoute.value.path.includes("/settings/confirmation")?(await r.push({path:`/manage/${$}/settings/general`}),_t({message:e("form_loaded"),type:"success"})):r.currentRoute.value.path.includes("/settings/notification/")?(await v.fetchData(parseInt($)),await r.push({path:`/settings/notification/${$}`}),_t({message:e("notification_loaded"),type:"success"})):(await r.push({path:`/manage/${$}`}),_t({message:e("form_loaded"),type:"success"}))}catch(B){console.error(e("failed_to_load_form"),B),_t({message:e("failed_to_load_form"),type:"error"})}finally{d.value=!1}},k=async $=>{i.confirmNavigationIfUnsaved(a,()=>{T($)})},x=async()=>{d.value=!0;try{await f.saveForm(),await w(),xa(l)}finally{d.value=!1}},M=async()=>{d.value=!0;try{await f.updateForm(),await w(),xa(l)}finally{d.value=!1}},D=()=>{f.formId||_t({message:e("first_save_form"),type:"error"}),window.open(`${window.wpIvyUrls.siteURL}?ivyforms_preview=${f.formId}&_wpNonce=${window.wpIvyApiSettings.nonce}`,"_blank")};Ht(async()=>{await w();let B=r.currentRoute.value.params.formId;Array.isArray(B)&&(B=B[0]),B?(o.value=!1,f.formId=B,await f.loadForm(B),xa(l)):(o.value=!0,xa(l)),m.setCurrentPage("FormBuilderPage");const j=document.getElementById("adminmenu");if(j){const U=G=>{i.anyUnsaved(a)&&(G.preventDefault(),i.confirmNavigationIfUnsaved(a,()=>{const R=G.target.closest("a");R&&(window.location.href=R.href)}))};j.addEventListener("click",U,!0),Br(()=>j.removeEventListener("click",U,!0))}}),Me(()=>r.currentRoute.value.params.formId,$=>{$||(o.value=!0,f.resetForm())},{immediate:!1}),Me(()=>f.name,$=>{if($&&f.formId){const B=l.value.findIndex(j=>j.value===f.formId);B!==-1?l.value[B].label=$:xa(l)}});const A=async $=>{try{if(await w(),xa(l),$&&f.formId&&f.name){const B=l.value.findIndex(j=>j.value===f.formId);B===-1?l.value.push({value:f.formId,labelId:`${e("id")}: ${f.formId}`,label:f.name}):l.value[B].label=f.name,m.setPageTitle(f.name)}o.value=!1}catch(B){console.error(e("failed_to_load_form"),B),o.value=!1}},P=()=>{o.value=!1,t(xi)};return($,B)=>{const j=Pp,U=Zo,G=Ai,N=xn,R=zs,X=Oi,te=nW,Y=CH;return C(),F($e,null,[I(X,null,{left:V(()=>[I(j,{modelValue:_.value,"onUpdate:modelValue":B[0]||(B[0]=re=>_.value=re),size:"s",type:"border",placeholder:h(e)("select_form"),options:l.value,loading:c.value||d.value,onChange:k},null,8,["modelValue","placeholder","options","loading"])]),center:V(()=>[I(G,{mode:"horizontal",ellipsis:!1,router:""},{default:V(()=>[(C(!0),F($e,null,ot(s.value,re=>(C(),se(U,{key:re.index,label:re.label,name:re.index,type:"tonal","is-active":h(b).isActive(re.routeName,re.index),route:h(b).getMenuRoute(re,h(Cs)),onClick:Q=>h(b).onMenuClick(re,h(b).isActive)},null,8,["label","name","is-active","route","onClick"]))),128))]),_:1})]),right:V(()=>[I(N,{content:h(e)("preview_form"),placement:"bottom",theme:"inverted"},{default:V(()=>[I(it,{priority:"tertiary","icon-start":"eye-opened","icon-start-type":"outline",onClick:D})]),_:1},8,["content"]),h(f).isEditing?(C(),se(it,{key:0,class:ee(["ivyforms-button__action ivyforms-button__action--update"]),priority:"primary",loading:d.value,onClick:M},{default:V(()=>[d.value?ie("",!0):(C(),F($e,{key:0},[De(ae(h(e)("update")),1)],64))]),_:1},8,["loading"])):(C(),se(it,{key:1,class:ee(["ivyforms-button__action ivyforms-button__action--save"]),priority:"primary",loading:d.value,onClick:x},{default:V(()=>[d.value?ie("",!0):(C(),F($e,{key:0},[De(ae(h(e)("save")),1)],64))]),_:1},8,["loading"])),I(R)]),_:1}),z("div",{class:ee(["ivyforms-form-builder-page ivyforms-flex ivyforms-gap-8 ivyforms-p-8",{"ivyforms-form-builder-page--fullscreen-mode":h(m).isFullScreenMode}])},[I(te),I(Y),I(MS,{visible:o.value,"onUpdate:visible":B[1]||(B[1]=re=>o.value=re),onFormCreated:A,onClose:P},null,8,["visible"])],2),I(_c,{"show-close":"","align-center":"",width:"342px"})],64)}}}),m2=bt(CW,[["__scopeId","data-v-8b321e09"]]),IW=he({__name:"FormSettingsPageSection",emits:["update:isAddingNotification"],setup(n,{emit:e}){const t=e,r=()=>{t("update:isAddingNotification",!1)};return(o,i)=>{const a=cc("router-view"),s=Hs;return C(),se(s,null,{default:V(()=>[I(a,null,{default:V(({Component:l})=>[(C(),se(dn(l),{onCreated:r},null,32))]),_:1})]),_:1})}}}),EW=he({__name:"FormSettingsPagePanel",setup(n){const{getLabel:e}=at(),t=Rs(),r=H("vertical"),o=[{label:e("general_settings"),index:"general",routeName:Ci},{label:e("notifications"),index:"notifications",routeName:Xu},{label:e("confirmations"),index:"confirmations",routeName:If}],i=zt(),a=Ul(),s=Ds(),l=Og(),c=$p();return Ht(()=>{const d=t.setupAdminMenuListener(l,()=>t.hasUnsavedChanges("formBuilder",()=>i.getCurrentState()).value||t.hasUnsavedChanges("confirmationBuilder",()=>a.getCurrentState()).value||t.hasUnsavedChanges("notificationBuilder",()=>s.getCurrentState()).value);Br(d)}),(d,f)=>{const m=Zo,g=Ai,v=yc;return C(),se(v,null,{default:V(()=>[I(g,{mode:r.value,ellipsis:!1,class:"ivyforms-form-builder-settings__menu ivyforms-pr-12",router:""},{default:V(()=>[(C(),F($e,null,ot(o,y=>I(m,{key:y.index,label:y.label,name:y.index,type:"tonal","is-active":h(c).isActive(y.routeName,y.index),route:h(c).getMenuRoute(y),onClick:b=>h(c).onMenuClick(y,h(c).isActive)},null,8,["label","name","is-active","route","onClick"])),64))]),_:1},8,["mode"])]),_:1})}}}),TW=he({__name:"FormBuilderSettingsPage",setup(n){const{getLabel:e}=at(),t=zt(),r=aa(),o=Vs(),i=Ds(),a=Ul(),s=Rs(),l=H("general"),c=H(!1),d=H("horizontal"),f=Vr(),m=ko(),g=$p(),v=O(()=>t.formId||null),y=H([]),b=H(!1),_=H(!1),w=O(()=>[{label:e("build"),index:"build",routeName:t.isEditing?Is:Cs},{label:e("settings"),index:"settings",routeName:Ci},{label:e("results"),index:"results",routeName:Ii}]),T=()=>{t.formId||_t({message:e("first_save_form"),type:"error"}),window.open(`${window.wpIvyUrls.siteURL}?ivyforms_preview=${t.formId}&_wpNonce=${window.wpIvyApiSettings.nonce}`,"_blank")},k=async A=>{if(!A){t.resetForm(),i.allNotifications=[],i.formId=null,a.allConfirmations=[],a.formId=null,await m.push({path:"/"});return}_.value=!0;try{await t.loadForm(A);const $=(m.currentRoute.value.path+m.currentRoute.value.hash).match(/\/settings\/(\w+)/),B=$?$[1]:null;B?(await m.push({path:`/manage/${A}/settings/${B}`}),l.value=B,_t({message:e("form_loaded"),type:"success"})):(await m.push({path:`/manage/${A}`}),_t({message:e("form_loaded"),type:"success"}))}catch(P){console.error(e("failed_to_load_form"),P),_t({message:e("failed_to_load_form"),type:"error"})}finally{_.value=!1}},x=async()=>{b.value=!0;try{await o.fetchData({page:1,perPage:100}),y.value=o.tableData.map(A=>({value:A.id,labelId:`${e("id")}: ${A.id}`,label:A.name||`Form #${A.id}`}))}catch(A){console.error(e("failed_to_load_form"),A),_t({message:e("failed_to_fetch_form"),type:"error"})}finally{b.value=!1}};function M(A){const P=A.name?A.name.toString():"";if(P.includes("notification"))l.value="notifications",c.value=!0;else if(P.includes("confirmation"))l.value="confirmations",c.value=!1;else if(P.includes("general")||P.includes("settings"))l.value="general",c.value=!1;else{const $=A.path+A.hash;$.includes("/notification")?(l.value="notifications",c.value=!0):$.includes("/confirmation")?(l.value="confirmations",c.value=!1):(l.value="general",c.value=!1)}}Ht(async()=>{await x();const A=f.params.formId,P=Array.isArray(A)?A[0]:A;if(P&&!t.formId){_.value=!0;try{await t.loadForm(P),xa(y)}catch(B){console.error(e("failed_to_load_form"),B),_t({message:e("failed_to_load_form"),type:"error"})}finally{_.value=!1}}else xa(y);t.formId||(t.counterFields=0),M(f),s.resetUnsavedChanges("formBuilder",()=>t.getCurrentState());const $=s.setupAdminMenuListener(D,()=>s.hasUnsavedChanges("formBuilder",()=>t.getCurrentState()).value||s.hasUnsavedChanges("confirmationBuilder",()=>a.getCurrentState()).value||s.hasUnsavedChanges("notificationBuilder",()=>i.getCurrentState()).value);Br($)}),Me(()=>t.name,A=>{if(A&&t.formId){const P=y.value.findIndex($=>$.value===t.formId);P!==-1?y.value[P].label=A:xa(y)}}),Me(()=>[f.path,f.hash,f.name],()=>{M(f)},{immediate:!0});const D=Og();return(A,P)=>{const $=Pp,B=Zo,j=Ai,U=it,G=xn,N=zs,R=Oi,X=EW,te=IW;return C(),F($e,null,[I(R,null,{left:V(()=>[I($,{modelValue:v.value,"onUpdate:modelValue":P[0]||(P[0]=Y=>v.value=Y),size:"s",type:"border",placeholder:"Select a form",options:y.value,loading:b.value||_.value,onChange:k},null,8,["modelValue","options","loading"])]),center:V(()=>[I(j,{mode:d.value,ellipsis:!1,router:""},{default:V(()=>[(C(!0),F($e,null,ot(w.value,Y=>(C(),se(B,{key:Y.index,label:Y.label,name:Y.index,type:"tonal","is-active":h(g).isActive(Y.routeName,Y.index),route:h(g).getMenuRoute(Y,h(Ci)),onClick:re=>h(g).onMenuClick(Y,h(g).isActive)},null,8,["label","name","is-active","route","onClick"]))),128))]),_:1},8,["mode"])]),right:V(()=>[I(G,{content:h(e)("preview_form"),placement:"bottom",theme:"inverted"},{default:V(()=>[I(U,{priority:"tertiary","icon-start":"eye-opened","icon-start-type":"outline",onClick:T})]),_:1},8,["content"]),I(N)]),_:1}),z("div",{class:ee(["ivyforms-form-builder-settings-page ivyforms-flex ivyforms-gap-8 ivyforms-p-8",{"ivyforms-fullscreen-mode":h(r).isFullScreenMode}])},[(C(),se(X,{key:v.value,"active-index":l.value},null,8,["active-index"])),I(te,{"active-index":l.value,"is-adding-notification":c.value},null,8,["active-index","is-adding-notification"])],2),I(_c,{"align-center":"",width:"342px"})],64)}}}),MW=bt(TW,[["__scopeId","data-v-cd2f135e"]]);function lr(n){this.content=n}lr.prototype={constructor:lr,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,o=r.find(n),i=r.content.slice();return o==-1?i.push(t||n,e):(i[o+1]=e,t&&(i[o]=t)),new lr(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new lr(t)},addToStart:function(n,e){return new lr([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new lr(t)},addBefore:function(n,e,t){var r=this.remove(e),o=r.content.slice(),i=r.find(n);return o.splice(i==-1?o.length:i,0,e,t),new lr(o)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=lr.from(n),n.size?new lr(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=lr.from(n),n.size?new lr(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=lr.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};lr.from=function(n){if(n instanceof lr)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new lr(e)};function US(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let o=n.child(r),i=e.child(r);if(o==i){t+=o.nodeSize;continue}if(!o.sameMarkup(i))return t;if(o.isText&&o.text!=i.text){for(let a=0;o.text[a]==i.text[a];a++)t++;return t}if(o.content.size||i.content.size){let a=US(o.content,i.content,t+1);if(a!=null)return a}t+=o.nodeSize}}function WS(n,e,t,r){for(let o=n.childCount,i=e.childCount;;){if(o==0||i==0)return o==i?null:{a:t,b:r};let a=n.child(--o),s=e.child(--i),l=a.nodeSize;if(a==s){t-=l,r-=l;continue}if(!a.sameMarkup(s))return{a:t,b:r};if(a.isText&&a.text!=s.text){let c=0,d=Math.min(a.text.length,s.text.length);for(;c<d&&a.text[a.text.length-c-1]==s.text[s.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(a.content.size||s.content.size){let c=WS(a.content,s.content,t-1,r-1);if(c)return c}t-=l,r-=l}}class Ve{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,o=0,i){for(let a=0,s=0;s<t;a++){let l=this.content[a],c=s+l.nodeSize;if(c>e&&r(l,o+s,i||null,a)!==!1&&l.content.size){let d=s+1;l.nodesBetween(Math.max(0,e-d),Math.min(l.content.size,t-d),r,o+d)}s=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,o){let i="",a=!0;return this.nodesBetween(e,t,(s,l)=>{let c=s.isText?s.text.slice(Math.max(e,l)-l,t-l):s.isLeaf?o?typeof o=="function"?o(s):o:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&c||s.isTextblock)&&r&&(a?a=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,o=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(o[o.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)o.push(e.content[i]);return new Ve(o,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],o=0;if(t>e)for(let i=0,a=0;a<t;i++){let s=this.content[i],l=a+s.nodeSize;l>e&&((a<e||l>t)&&(s.isText?s=s.cut(Math.max(0,e-a),Math.min(s.text.length,t-a)):s=s.cut(Math.max(0,e-a-1),Math.min(s.content.size,t-a-1))),r.push(s),o+=s.nodeSize),a=l}return new Ve(r,o)}cutByIndex(e,t){return e==t?Ve.empty:e==0&&t==this.content.length?this:new Ve(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let o=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return o[e]=t,new Ve(o,i)}addToStart(e){return new Ve([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Ve(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))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(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let o=this.content[t];e(o,r,t),r+=o.nodeSize}}findDiffStart(e,t=0){return US(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return WS(this,e,t,r)}findIndex(e,t=-1){if(e==0)return Ad(0,e);if(e==this.size)return Ad(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,o=0;;r++){let i=this.child(r),a=o+i.nodeSize;if(a>=e)return a==e||t>0?Ad(r+1,a):Ad(r,o);o=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return Ve.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new Ve(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Ve.empty;let t,r=0;for(let o=0;o<e.length;o++){let i=e[o];r+=i.nodeSize,o&&i.isText&&e[o-1].sameMarkup(i)?(t||(t=e.slice(0,o)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new Ve(t||e,r)}static from(e){if(!e)return Ve.empty;if(e instanceof Ve)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Ve([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Ve.empty=new Ve([],0);const Rm={index:0,offset:0};function Ad(n,e){return Rm.index=n,Rm.offset=e,Rm}function $f(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!$f(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!$f(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let gn=class Nv{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let o=0;o<e.length;o++){let i=e[o];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,o));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,o)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&$f(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let o=r.create(t.attrs);return r.checkAttrs(o.attrs),o}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Nv.none;if(e instanceof Nv)return[e];let t=e.slice();return t.sort((r,o)=>r.type.rank-o.type.rank),t}};gn.none=[];class Rf extends Error{}class Ze{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=KS(this.content,e+this.openStart,t);return r&&new Ze(r,this.openStart,this.openEnd)}removeBetween(e,t){return new Ze(jS(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return Ze.empty;let r=t.openStart||0,o=t.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Ze(Ve.fromJSON(e,t.content),r,o)}static maxOpen(e,t=!0){let r=0,o=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)o++;return new Ze(e,r,o)}}Ze.empty=new Ze(Ve.empty,0,0);function jS(n,e,t){let{index:r,offset:o}=n.findIndex(e),i=n.maybeChild(r),{index:a,offset:s}=n.findIndex(t);if(o==e||i.isText){if(s!=t&&!n.child(a).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=a)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(jS(i.content,e-o-1,t-o-1)))}function KS(n,e,t,r){let{index:o,offset:i}=n.findIndex(e),a=n.maybeChild(o);if(i==e||a.isText)return n.cut(0,e).append(t).append(n.cut(e));let s=KS(a.content,e-i-1,t);return s&&n.replaceChild(o,a.copy(s))}function OW(n,e,t){if(t.openStart>n.depth)throw new Rf("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Rf("Inconsistent open depths");return YS(n,e,t,0)}function YS(n,e,t,r){let o=n.index(r),i=n.node(r);if(o==e.index(r)&&r<n.depth-t.openStart){let a=YS(n,e,t,r+1);return i.copy(i.content.replaceChild(o,a))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let a=n.parent,s=a.content;return ms(a,s.cut(0,n.parentOffset).append(t.content).append(s.cut(e.parentOffset)))}else{let{start:a,end:s}=AW(t,n);return ms(i,GS(n,a,s,e,r))}else return ms(i,Df(n,e,r))}function qS(n,e){if(!e.type.compatibleContent(n.type))throw new Rf("Cannot join "+e.type.name+" onto "+n.type.name)}function Fv(n,e,t){let r=n.node(t);return qS(r,e.node(t)),r}function hs(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function Du(n,e,t,r){let o=(e||n).node(t),i=0,a=e?e.index(t):o.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(hs(n.nodeAfter,r),i++));for(let s=i;s<a;s++)hs(o.child(s),r);e&&e.depth==t&&e.textOffset&&hs(e.nodeBefore,r)}function ms(n,e){return n.type.checkContent(e),n.copy(e)}function GS(n,e,t,r,o){let i=n.depth>o&&Fv(n,e,o+1),a=r.depth>o&&Fv(t,r,o+1),s=[];return Du(null,n,o,s),i&&a&&e.index(o)==t.index(o)?(qS(i,a),hs(ms(i,GS(n,e,t,r,o+1)),s)):(i&&hs(ms(i,Df(n,e,o+1)),s),Du(e,t,o,s),a&&hs(ms(a,Df(t,r,o+1)),s)),Du(r,null,o,s),new Ve(s)}function Df(n,e,t){let r=[];if(Du(null,n,t,r),n.depth>t){let o=Fv(n,e,t+1);hs(ms(o,Df(n,e,t+1)),r)}return Du(e,null,t,r),new Ve(r)}function AW(n,e){let t=e.depth-n.openStart,o=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)o=e.node(i).copy(Ve.from(o));return{start:o.resolveNoCache(n.openStart+t),end:o.resolveNoCache(o.content.size-n.openEnd-t)}}class Zu{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(t);return r?e.child(t).cut(r):o}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],o=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)o+=r.child(i).nodeSize;return o}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return gn.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),o=e.maybeChild(t);if(!r){let s=r;r=o,o=s}let i=r.marks;for(var a=0;a<i.length;a++)i[a].type.spec.inclusive===!1&&(!o||!i[a].isInSet(o.marks))&&(i=i[a--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,o=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!o||!r[i].isInSet(o.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Nf(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],o=0,i=t;for(let a=e;;){let{index:s,offset:l}=a.content.findIndex(i),c=i-l;if(r.push(a,s,o+l),!c||(a=a.child(s),a.isText))break;i=c-1,o+=l+1}return new Zu(t,r,i)}static resolveCached(e,t){let r=v2.get(e);if(r)for(let i=0;i<r.elts.length;i++){let a=r.elts[i];if(a.pos==t)return a}else v2.set(e,r=new PW);let o=r.elts[r.i]=Zu.resolve(e,t);return r.i=(r.i+1)%$W,o}}class PW{constructor(){this.elts=[],this.i=0}}const $W=12,v2=new WeakMap;class Nf{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}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 RW=Object.create(null);let mi=class Lv{constructor(e,t,r,o=gn.none){this.type=e,this.attrs=t,this.marks=o,this.content=r||Ve.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,o=0){this.content.nodesBetween(e,t,r,o,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,o){return this.content.textBetween(e,t,r,o)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&$f(this.attrs,t||e.defaultAttrs||RW)&&gn.sameSet(this.marks,r||gn.none)}copy(e=null){return e==this.content?this:new Lv(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Lv(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return Ze.empty;let o=this.resolve(e),i=this.resolve(t),a=r?0:o.sharedDepth(t),s=o.start(a),c=o.node(a).content.cut(o.pos-s,i.pos-s);return new Ze(c,o.depth-a,i.depth-a)}replace(e,t,r){return OW(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:o}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(o==e||t.isText)return t;e-=o+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let o=this.content.child(t-1);return{node:o,index:t-1,offset:r-o.nodeSize}}resolve(e){return Zu.resolveCached(this,e)}resolveNoCache(e){return Zu.resolve(this,e)}rangeHasMark(e,t,r){let o=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}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 e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),JS(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=Ve.empty,o=0,i=r.childCount){let a=this.contentMatchAt(e).matchFragment(r,o,i),s=a&&a.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(let l=o;l<i;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,t,r,o){if(o&&!this.type.allowsMarks(o))return!1;let i=this.contentMatchAt(e).matchType(r),a=i&&i.matchFragment(this.content,t);return a?a.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=gn.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!gn.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let o=Ve.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,o,r);return i.type.checkAttrs(i.attrs),i}};mi.prototype.text=void 0;class Ff extends mi{constructor(e,t,r,o){if(super(e,t,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):JS(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Ff(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Ff(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function JS(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Ts{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new DW(e,t);if(r.next==null)return Ts.empty;let o=XS(r);r.next&&r.err("Unexpected trailing text");let i=HW(zW(o));return UW(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let o=this;for(let i=t;o&&i<r;i++)o=o.matchType(e.child(i).type);return o}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let o=[this];function i(a,s){let l=a.matchFragment(e,r);if(l&&(!t||l.validEnd))return Ve.from(s.map(c=>c.createAndFill()));for(let c=0;c<a.next.length;c++){let{type:d,next:f}=a.next[c];if(!(d.isText||d.hasRequiredAttrs())&&o.indexOf(f)==-1){o.push(f);let m=i(f,s.concat(d));if(m)return m}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let o=r.shift(),i=o.match;if(i.matchType(e)){let a=[];for(let s=o;s.type;s=s.via)a.push(s.type);return a.reverse()}for(let a=0;a<i.next.length;a++){let{type:s,next:l}=i.next[a];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in t)&&(!o.type||l.validEnd)&&(r.push({match:s.contentMatch,type:s,via:o}),t[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let o=0;o<r.next.length;o++)e.indexOf(r.next[o].next)==-1&&t(r.next[o].next)}return t(this),e.map((r,o)=>{let i=o+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;a++)i+=(a?", ":"")+r.next[a].type.name+"->"+e.indexOf(r.next[a].next);return i}).join(`
`)}}Ts.empty=new Ts(!0);class DW{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.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(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function XS(n){let e=[];do e.push(NW(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function NW(n){let e=[];do e.push(FW(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function FW(n){let e=VW(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=LW(n,e);else break;return e}function g2(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function LW(n,e){let t=g2(n),r=t;return n.eat(",")&&(n.next!="}"?r=g2(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function BW(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let o=[];for(let i in t){let a=t[i];a.isInGroup(e)&&o.push(a)}return o.length==0&&n.err("No node type or group '"+e+"' found"),o}function VW(n){if(n.eat("(")){let e=XS(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=BW(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function zW(n){let e=[[]];return o(i(n,0),t()),e;function t(){return e.push([])-1}function r(a,s,l){let c={term:l,to:s};return e[a].push(c),c}function o(a,s){a.forEach(l=>l.to=s)}function i(a,s){if(a.type=="choice")return a.exprs.reduce((l,c)=>l.concat(i(c,s)),[]);if(a.type=="seq")for(let l=0;;l++){let c=i(a.exprs[l],s);if(l==a.exprs.length-1)return c;o(c,s=t())}else if(a.type=="star"){let l=t();return r(s,l),o(i(a.expr,l),l),[r(l)]}else if(a.type=="plus"){let l=t();return o(i(a.expr,s),l),o(i(a.expr,l),l),[r(l)]}else{if(a.type=="opt")return[r(s)].concat(i(a.expr,s));if(a.type=="range"){let l=s;for(let c=0;c<a.min;c++){let d=t();o(i(a.expr,l),d),l=d}if(a.max==-1)o(i(a.expr,l),l);else for(let c=a.min;c<a.max;c++){let d=t();r(l,d),o(i(a.expr,l),d),l=d}return[r(l)]}else{if(a.type=="name")return[r(s,void 0,a.value)];throw new Error("Unknown expr type")}}}}function QS(n,e){return e-n}function y2(n,e){let t=[];return r(e),t.sort(QS);function r(o){let i=n[o];if(i.length==1&&!i[0].term)return r(i[0].to);t.push(o);for(let a=0;a<i.length;a++){let{term:s,to:l}=i[a];!s&&t.indexOf(l)==-1&&r(l)}}}function HW(n){let e=Object.create(null);return t(y2(n,0));function t(r){let o=[];r.forEach(a=>{n[a].forEach(({term:s,to:l})=>{if(!s)return;let c;for(let d=0;d<o.length;d++)o[d][0]==s&&(c=o[d][1]);y2(n,l).forEach(d=>{c||o.push([s,c=[]]),c.indexOf(d)==-1&&c.push(d)})})});let i=e[r.join(",")]=new Ts(r.indexOf(n.length-1)>-1);for(let a=0;a<o.length;a++){let s=o[a][1].sort(QS);i.next.push({type:o[a][0],next:e[s.join(",")]||t(s)})}return i}}function UW(n,e){for(let t=0,r=[n];t<r.length;t++){let o=r[t],i=!o.validEnd,a=[];for(let s=0;s<o.next.length;s++){let{type:l,next:c}=o.next[s];a.push(l.name),i&&!(l.isText||l.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function ZS(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function e8(n,e){let t=Object.create(null);for(let r in n){let o=e&&e[r];if(o===void 0){let i=n[r];if(i.hasDefault)o=i.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=o}return t}function t8(n,e,t,r){for(let o in e)if(!(o in n))throw new RangeError(`Unsupported attribute ${o} for ${t} of type ${o}`);for(let o in n){let i=n[o];i.validate&&i.validate(e[o])}}function n8(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new jW(n,r,e[r]);return t}let b2=class r8{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=n8(e,r.attrs),this.defaultAttrs=ZS(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Ts.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:e8(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new mi(this,this.computeAttrs(e),Ve.from(t),gn.setFrom(r))}createChecked(e=null,t,r){return t=Ve.from(t),this.checkContent(t),new mi(this,this.computeAttrs(e),t,gn.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=Ve.from(t),t.size){let a=this.contentMatch.fillBefore(t);if(!a)return null;t=a.append(t)}let o=this.contentMatch.matchFragment(t),i=o&&o.fillBefore(Ve.empty,!0);return i?new mi(this,e,t.append(i),gn.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){t8(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:gn.none:e}static compile(e,t){let r=Object.create(null);e.forEach((i,a)=>r[i]=new r8(i,t,a));let o=t.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function WW(n,e,t){let r=t.split("|");return o=>{let i=o===null?"null":typeof o;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${i}`)}}class jW{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?WW(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Rp{constructor(e,t,r,o){this.name=e,this.rank=t,this.schema=r,this.spec=o,this.attrs=n8(e,o.attrs),this.excluded=null;let i=ZS(this.attrs);this.instance=i?new gn(this,i):null}create(e=null){return!e&&this.instance?this.instance:new gn(this,e8(this.attrs,e))}static compile(e,t){let r=Object.create(null),o=0;return e.forEach((i,a)=>r[i]=new Rp(i,o++,t,a)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){t8(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class o8{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let o in e)t[o]=e[o];t.nodes=lr.from(e.nodes),t.marks=lr.from(e.marks||{}),this.nodes=b2.compile(this.spec.nodes,this),this.marks=Rp.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],a=i.spec.content||"",s=i.spec.marks;if(i.contentMatch=r[a]||(r[a]=Ts.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=s=="_"?null:s?S2(this,s.split(" ")):s==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],a=i.spec.excludes;i.excluded=a==null?[i]:a==""?[]:S2(this,a.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,o){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof b2){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,o)}text(e,t){let r=this.nodes.text;return new Ff(r,r.defaultAttrs,e,gn.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return mi.fromJSON(this,e)}markFromJSON(e){return gn.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function S2(n,e){let t=[];for(let r=0;r<e.length;r++){let o=e[r],i=n.marks[o],a=i;if(i)t.push(i);else for(let s in n.marks){let l=n.marks[s];(o=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(o)>-1)&&t.push(a=l)}if(!a)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function KW(n){return n.tag!=null}function YW(n){return n.style!=null}class vi{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(o=>{if(KW(o))this.tags.push(o);else if(YW(o)){let i=/[^=]*/.exec(o.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let i=e.nodes[o.node];return i.contentMatch.matchType(i)})}parse(e,t={}){let r=new w2(this,t,!1);return r.addAll(e,gn.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new w2(this,t,!0);return r.addAll(e,gn.none,t.from,t.to),Ze.maxOpen(r.finish())}matchTag(e,t,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let i=this.tags[o];if(JW(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||t.matchesContext(i.context))){if(i.getAttrs){let a=i.getAttrs(e);if(a===!1)continue;i.attrs=a||void 0}return i}}}matchStyle(e,t,r,o){for(let i=o?this.styles.indexOf(o)+1:0;i<this.styles.length;i++){let a=this.styles[i],s=a.style;if(!(s.indexOf(e)!=0||a.context&&!r.matchesContext(a.context)||s.length>e.length&&(s.charCodeAt(e.length)!=61||s.slice(e.length+1)!=t))){if(a.getAttrs){let l=a.getAttrs(t);if(l===!1)continue;a.attrs=l||void 0}return a}}}static schemaRules(e){let t=[];function r(o){let i=o.priority==null?50:o.priority,a=0;for(;a<t.length;a++){let s=t[a];if((s.priority==null?50:s.priority)<i)break}t.splice(a,0,o)}for(let o in e.marks){let i=e.marks[o].spec.parseDOM;i&&i.forEach(a=>{r(a=x2(a)),a.mark||a.ignore||a.clearMark||(a.mark=o)})}for(let o in e.nodes){let i=e.nodes[o].spec.parseDOM;i&&i.forEach(a=>{r(a=x2(a)),a.node||a.ignore||a.mark||(a.node=o)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new vi(e,vi.schemaRules(e)))}}const a8={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},qW={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},i8={ol:!0,ul:!0},ec=1,Bv=2,uf=4;function _2(n,e,t){return e!=null?(e?ec:0)|(e==="full"?Bv:0):n&&n.whitespace=="pre"?ec|Bv:t&-5}class Pd{constructor(e,t,r,o,i,a){this.type=e,this.attrs=t,this.marks=r,this.solid=o,this.options=a,this.content=[],this.activeMarks=gn.none,this.match=i||(a&uf?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(Ve.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(e.type))?(this.match=r,o):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&ec)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let t=Ve.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(Ve.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!a8.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class w2{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let o=t.topNode,i,a=_2(null,t.preserveWhitespace,0)|(r?uf:0);o?i=new Pd(o.type,o.attrs,gn.none,!0,t.topMatch||o.type.contentMatch,a):r?i=new Pd(null,null,gn.none,!0,null,a):i=new Pd(e.schema.topNodeType,null,gn.none,!0,null,a),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,o=this.top,i=o.options&Bv?"full":this.localPreserveWS||(o.options&ec)>0;if(i==="full"||o.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)i!=="full"?r=r.replace(/\r?\n|\r/g," "):r=r.replace(/\r\n?/g,`
`);else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=o.content[o.content.length-1],s=e.previousSibling;(!a||s&&s.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),t,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let o=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let a=e.nodeName.toLowerCase(),s;i8.hasOwnProperty(a)&&this.parser.normalizeLists&&GW(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(s=this.parser.matchTag(e,this,r));e:if(l?l.ignore:qW.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,t);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let c,d=this.needsBlock;if(a8.hasOwnProperty(a))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),c=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let f=l&&l.skip?t:this.readStyles(e,t);f&&this.addAll(e,f),c&&this.sync(i),this.needsBlock=d}else{let c=this.readStyles(e,t);c&&this.addElementByRule(e,l,c,l.consuming===!1?s:void 0)}this.localPreserveWS=o}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
`),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let o=0;o<this.parser.matchedStyles.length;o++){let i=this.parser.matchedStyles[o],a=r.getPropertyValue(i);if(a)for(let s=void 0;;){let l=this.parser.matchStyle(i,a,this,s);if(!l)break;if(l.ignore)return null;if(l.clearMark?t=t.filter(c=>!l.clearMark(c)):t=t.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)s=l;else break}}return t}addElementByRule(e,t,r,o){let i,a;if(t.node)if(a=this.parser.schema.nodes[t.node],a.isLeaf)this.insertNode(a.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(a,t.attrs||null,r,t.preserveWhitespace);l&&(i=!0,r=l)}else{let l=this.parser.schema.marks[t.mark];r=r.concat(l.create(t.attrs))}let s=this.top;if(a&&a.isLeaf)this.findInside(e);else if(o)this.addElement(e,r,o);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof t.contentElement=="string"?l=e.querySelector(t.contentElement):typeof t.contentElement=="function"?l=t.contentElement(e):t.contentElement&&(l=t.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}i&&this.sync(s)&&this.open--}addAll(e,t,r,o){let i=r||0;for(let a=r?e.childNodes[r]:e.firstChild,s=o==null?null:e.childNodes[o];a!=s;a=a.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(a,t);this.findAtPoint(e,i)}findPlace(e,t,r){let o,i;for(let a=this.open,s=0;a>=0;a--){let l=this.nodes[a],c=l.findWrapping(e);if(c&&(!o||o.length>c.length+s)&&(o=c,i=l,!c.length))break;if(l.solid){if(r)break;s+=2}}if(!o)return null;this.sync(i);for(let a=0;a<o.length;a++)t=this.enterInner(o[a],null,t,!1);return t}insertNode(e,t,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(t=this.enterInner(i,null,t))}let o=this.findPlace(e,t,r);if(o){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let a=gn.none;for(let s of o.concat(e.marks))(i.type?i.type.allowsMarkType(s.type):k2(s.type,e.type))&&(a=s.addToSet(a));return i.content.push(e.mark(a)),!0}return!1}enter(e,t,r,o){let i=this.findPlace(e.create(t),r,!1);return i&&(i=this.enterInner(e,t,r,!0,o)),i}enterInner(e,t,r,o=!1,i){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(e);let s=_2(e,i,a.options);a.options&uf&&a.content.length==0&&(s|=uf);let l=gn.none;return r=r.filter(c=>(a.type?a.type.allowsMarkType(c.type):k2(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new Pd(e,t,l,o,null,s)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));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(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=ec)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&e.nodeType==1&&e.contains(this.find[o].node)&&t.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),a=(s,l)=>{for(;s>=0;s--){let c=t[s];if(c==""){if(s==t.length-1||s==0)continue;for(;l>=i;l--)if(a(s-1,l))return!0;return!1}else{let d=l>0||l==0&&o?this.nodes[l].type:r&&l>=i?r.node(l-i).type:null;if(!d||d.name!=c&&!d.isInGroup(c))return!1;l--}}return!0};return a(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function GW(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&i8.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function JW(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function x2(n){let e={};for(let t in n)e[t]=n[t];return e}function k2(n,e){let t=e.schema.nodes;for(let r in t){let o=t[r];if(!o.allowsMarkType(n))continue;let i=[],a=s=>{i.push(s);for(let l=0;l<s.edgeCount;l++){let{type:c,next:d}=s.edge(l);if(c==e||i.indexOf(d)<0&&a(d))return!0}};if(a(o.contentMatch))return!0}}class Ks{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=Dm(t).createDocumentFragment());let o=r,i=[];return e.forEach(a=>{if(i.length||a.marks.length){let s=0,l=0;for(;s<i.length&&l<a.marks.length;){let c=a.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(i[s][0])||c.type.spec.spanning===!1)break;s++,l++}for(;s<i.length;)o=i.pop()[1];for(;l<a.marks.length;){let c=a.marks[l++],d=this.serializeMark(c,a.isInline,t);d&&(i.push([c,o]),o.appendChild(d.dom),o=d.contentDOM||d.dom)}}o.appendChild(this.serializeNodeInner(a,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:o}=cf(Dm(t),this.nodes[e.type.name](e),null,e.attrs);if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,o)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let o=e.marks.length-1;o>=0;o--){let i=this.serializeMark(e.marks[o],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,t,r={}){let o=this.marks[e.type.name];return o&&cf(Dm(r),o(e,t),null,e.attrs)}static renderSpec(e,t,r=null,o){return cf(e,t,r,o)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Ks(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=C2(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return C2(e.marks)}}function C2(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Dm(n){return n.document||window.document}const I2=new WeakMap;function XW(n){let e=I2.get(n);return e===void 0&&I2.set(n,e=QW(n)),e}function QW(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let o=0;o<r.length;o++)t(r[o]);else for(let o in r)t(r[o])}return t(n),e}function cf(n,e,t,r){if(typeof e=="string")return{dom:n.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let o=e[0],i;if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=XW(r))&&i.indexOf(e)>-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=o.indexOf(" ");a>0&&(t=o.slice(0,a),o=o.slice(a+1));let s,l=t?n.createElementNS(t,o):n.createElement(o),c=e[1],d=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){d=2;for(let f in c)if(c[f]!=null){let m=f.indexOf(" ");m>0?l.setAttributeNS(f.slice(0,m),f.slice(m+1),c[f]):l.setAttribute(f,c[f])}}for(let f=d;f<e.length;f++){let m=e[f];if(m===0){if(f<e.length-1||f>d)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:g,contentDOM:v}=cf(n,m,t,r);if(l.appendChild(g),v){if(s)throw new RangeError("Multiple content holes");s=v}}}return{dom:l,contentDOM:s}}const s8=65535,l8=Math.pow(2,16);function ZW(n,e){return n+e*l8}function E2(n){return n&s8}function ej(n){return(n-(n&s8))/l8}const u8=1,c8=2,df=4,d8=8;class Vv{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&d8)>0}get deletedBefore(){return(this.delInfo&(u8|df))>0}get deletedAfter(){return(this.delInfo&(c8|df))>0}get deletedAcross(){return(this.delInfo&df)>0}}class Zr{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&Zr.empty)return Zr.empty}recover(e){let t=0,r=E2(e);if(!this.inverted)for(let o=0;o<r;o++)t+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[r*3]+t+ej(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let o=0,i=this.inverted?2:1,a=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?o:0);if(l>e)break;let c=this.ranges[s+i],d=this.ranges[s+a],f=l+c;if(e<=f){let m=c?e==l?-1:e==f?1:t:t,g=l+o+(m<0?0:d);if(r)return g;let v=e==(t<0?l:f)?null:ZW(s/3,e-l),y=e==l?c8:e==f?u8:df;return(t<0?e!=l:e!=f)&&(y|=d8),new Vv(g,y,v)}o+=d-c}return r?e+o:new Vv(e+o,0,null)}touches(e,t){let r=0,o=E2(t),i=this.inverted?2:1,a=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?r:0);if(l>e)break;let c=this.ranges[s+i],d=l+c;if(e<=d&&s==o*3)return!0;r+=this.ranges[s+a]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o<this.ranges.length;o+=3){let a=this.ranges[o],s=a-(this.inverted?i:0),l=a+(this.inverted?0:i),c=this.ranges[o+t],d=this.ranges[o+r];e(s,s+c,l,l+d),i+=d-c}}invert(){return new Zr(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Zr.empty:new Zr(e<0?[0,-e,0]:[0,0,e])}}Zr.empty=new Zr([]);class Lf{constructor(e,t,r=0,o=e?e.length:0){this.mirror=t,this.from=r,this.to=o,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new Lf(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,r=this._maps.length;t<e._maps.length;t++){let o=e.getMirror(t);this.appendMap(e._maps[t],o!=null&&o<t?r+o:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this._maps.length+e._maps.length;t>=0;t--){let o=e.getMirror(t);this.appendMap(e._maps[t].invert(),o!=null&&o>t?r-o-1:void 0)}}invert(){let e=new Lf;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let o=0;for(let i=this.from;i<this.to;i++){let a=this._maps[i],s=a.mapResult(e,t);if(s.recover!=null){let l=this.getMirror(i);if(l!=null&&l>i&&l<this.to){i=l,e=this._maps[l].recover(s.recover);continue}}o|=s.delInfo,e=s.pos}return r?e:new Vv(e,o,null)}}const Nm=Object.create(null);class br{getMap(){return Zr.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Nm[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in Nm)throw new RangeError("Duplicate use of step JSON ID "+e);return Nm[e]=t,t.prototype.jsonID=e,t}}class Wn{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new Wn(e,null)}static fail(e){return new Wn(null,e)}static fromReplace(e,t,r,o){try{return Wn.ok(e.replace(t,r,o))}catch(i){if(i instanceof Rf)return Wn.fail(i.message);throw i}}}function Vg(n,e,t){let r=[];for(let o=0;o<n.childCount;o++){let i=n.child(o);i.content.size&&(i=i.copy(Vg(i.content,e,i))),i.isInline&&(i=e(i,t,o)),r.push(i)}return Ve.fromArray(r)}class di extends br{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new Ze(Vg(t.content,(a,s)=>!a.isAtom||!s.type.allowsMarkType(this.mark.type)?a:a.mark(this.mark.addToSet(a.marks)),o),t.openStart,t.openEnd);return Wn.fromReplace(e,this.from,this.to,i)}invert(){return new Go(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new di(t.pos,r.pos,this.mark)}merge(e){return e instanceof di&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new di(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new di(t.from,t.to,e.markFromJSON(t.mark))}}br.jsonID("addMark",di);class Go extends br{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new Ze(Vg(t.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),t.openStart,t.openEnd);return Wn.fromReplace(e,this.from,this.to,r)}invert(){return new di(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Go(t.pos,r.pos,this.mark)}merge(e){return e instanceof Go&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Go(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Go(t.from,t.to,e.markFromJSON(t.mark))}}br.jsonID("removeMark",Go);class fi extends br{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Wn.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return Wn.fromReplace(e,this.pos,this.pos+1,new Ze(Ve.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let o=0;o<t.marks.length;o++)if(!t.marks[o].isInSet(r))return new fi(this.pos,t.marks[o]);return new fi(this.pos,this.mark)}}return new Ms(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new fi(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new fi(t.pos,e.markFromJSON(t.mark))}}br.jsonID("addNodeMark",fi);class Ms extends br{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Wn.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return Wn.fromReplace(e,this.pos,this.pos+1,new Ze(Ve.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new fi(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Ms(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Ms(t.pos,e.markFromJSON(t.mark))}}br.jsonID("removeNodeMark",Ms);class Zn extends br{constructor(e,t,r,o=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=o}apply(e){return this.structure&&zv(e,this.from,this.to)?Wn.fail("Structure replace would overwrite content"):Wn.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Zr([this.from,this.to-this.from,this.slice.size])}invert(e){return new Zn(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new Zn(t.pos,Math.max(t.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof Zn)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?Ze.empty:new Ze(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Zn(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?Ze.empty:new Ze(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Zn(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Zn(t.from,t.to,Ze.fromJSON(e,t.slice),!!t.structure)}}br.jsonID("replace",Zn);class nr extends br{constructor(e,t,r,o,i,a,s=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=a,this.structure=s}apply(e){if(this.structure&&(zv(e,this.from,this.gapFrom)||zv(e,this.gapTo,this.to)))return Wn.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Wn.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?Wn.fromReplace(e,this.from,this.to,r):Wn.fail("Content does not fit in gap")}getMap(){return new Zr([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new nr(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||o<t.pos||i>r.pos?null:new nr(t.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new nr(t.from,t.to,t.gapFrom,t.gapTo,Ze.fromJSON(e,t.slice),t.insert,!!t.structure)}}br.jsonID("replaceAround",nr);function zv(n,e,t){let r=n.resolve(e),o=t-e,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let a=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}}return!1}function tj(n,e,t,r){let o=[],i=[],a,s;n.doc.nodesBetween(e,t,(l,c,d)=>{if(!l.isInline)return;let f=l.marks;if(!r.isInSet(f)&&d.type.allowsMarkType(r.type)){let m=Math.max(c,e),g=Math.min(c+l.nodeSize,t),v=r.addToSet(f);for(let y=0;y<f.length;y++)f[y].isInSet(v)||(a&&a.to==m&&a.mark.eq(f[y])?a.to=g:o.push(a=new Go(m,g,f[y])));s&&s.to==m?s.to=g:i.push(s=new di(m,g,r))}}),o.forEach(l=>n.step(l)),i.forEach(l=>n.step(l))}function nj(n,e,t,r){let o=[],i=0;n.doc.nodesBetween(e,t,(a,s)=>{if(!a.isInline)return;i++;let l=null;if(r instanceof Rp){let c=a.marks,d;for(;d=r.isInSet(c);)(l||(l=[])).push(d),c=d.removeFromSet(c)}else r?r.isInSet(a.marks)&&(l=[r]):l=a.marks;if(l&&l.length){let c=Math.min(s+a.nodeSize,t);for(let d=0;d<l.length;d++){let f=l[d],m;for(let g=0;g<o.length;g++){let v=o[g];v.step==i-1&&f.eq(o[g].style)&&(m=v)}m?(m.to=c,m.step=i):o.push({style:f,from:Math.max(s,e),to:c,step:i})}}}),o.forEach(a=>n.step(new Go(a.from,a.to,a.style)))}function zg(n,e,t,r=t.contentMatch,o=!0){let i=n.doc.nodeAt(e),a=[],s=e+1;for(let l=0;l<i.childCount;l++){let c=i.child(l),d=s+c.nodeSize,f=r.matchType(c.type);if(!f)a.push(new Zn(s,d,Ze.empty));else{r=f;for(let m=0;m<c.marks.length;m++)t.allowsMarkType(c.marks[m].type)||n.step(new Go(s,d,c.marks[m]));if(o&&c.isText&&t.whitespace!="pre"){let m,g=/\r?\n|\r/g,v;for(;m=g.exec(c.text);)v||(v=new Ze(Ve.from(t.schema.text(" ",t.allowedMarks(c.marks))),0,0)),a.push(new Zn(s+m.index,s+m.index+m[0].length,v))}}s=d}if(!r.validEnd){let l=r.fillBefore(Ve.empty,!0);n.replace(s,s,new Ze(l,0,0))}for(let l=a.length-1;l>=0;l--)n.step(a[l])}function rj(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function jl(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth;;--r){let o=n.$from.node(r),i=n.$from.index(r),a=n.$to.indexAfter(r);if(r<n.depth&&o.canReplace(i,a,t))return r;if(r==0||o.type.spec.isolating||!rj(o,i,a))break}return null}function oj(n,e,t){let{$from:r,$to:o,depth:i}=e,a=r.before(i+1),s=o.after(i+1),l=a,c=s,d=Ve.empty,f=0;for(let v=i,y=!1;v>t;v--)y||r.index(v)>0?(y=!0,d=Ve.from(r.node(v).copy(d)),f++):l--;let m=Ve.empty,g=0;for(let v=i,y=!1;v>t;v--)y||o.after(v+1)<o.end(v)?(y=!0,m=Ve.from(o.node(v).copy(m)),g++):c++;n.step(new nr(l,c,a,s,new Ze(d.append(m),f,g),d.size-f,!0))}function Hg(n,e,t=null,r=n){let o=aj(n,e),i=o&&ij(r,e);return i?o.map(T2).concat({type:e,attrs:t}).concat(i.map(T2)):null}function T2(n){return{type:n,attrs:null}}function aj(n,e){let{parent:t,startIndex:r,endIndex:o}=n,i=t.contentMatchAt(r).findWrapping(e);if(!i)return null;let a=i.length?i[0]:e;return t.canReplaceWith(r,o,a)?i:null}function ij(n,e){let{parent:t,startIndex:r,endIndex:o}=n,i=t.child(r),a=e.contentMatch.findWrapping(i.type);if(!a)return null;let l=(a.length?a[a.length-1]:e).contentMatch;for(let c=r;l&&c<o;c++)l=l.matchType(t.child(c).type);return!l||!l.validEnd?null:a}function sj(n,e,t){let r=Ve.empty;for(let a=t.length-1;a>=0;a--){if(r.size){let s=t[a].type.contentMatch.matchFragment(r);if(!s||!s.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=Ve.from(t[a].type.create(t[a].attrs,r))}let o=e.start,i=e.end;n.step(new nr(o,i,o,i,new Ze(r,0,0),t.length,!0))}function lj(n,e,t,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=n.steps.length;n.doc.nodesBetween(e,t,(a,s)=>{let l=typeof o=="function"?o(a):o;if(a.isTextblock&&!a.hasMarkup(r,l)&&uj(n.doc,n.mapping.slice(i).map(s),r)){let c=null;if(r.schema.linebreakReplacement){let g=r.whitespace=="pre",v=!!r.contentMatch.matchType(r.schema.linebreakReplacement);g&&!v?c=!1:!g&&v&&(c=!0)}c===!1&&p8(n,a,s,i),zg(n,n.mapping.slice(i).map(s,1),r,void 0,c===null);let d=n.mapping.slice(i),f=d.map(s,1),m=d.map(s+a.nodeSize,1);return n.step(new nr(f,m,f+1,m-1,new Ze(Ve.from(r.create(l,null,a.marks)),0,0),1,!0)),c===!0&&f8(n,a,s,i),!1}})}function f8(n,e,t,r){e.forEach((o,i)=>{if(o.isText){let a,s=/\r?\n|\r/g;for(;a=s.exec(o.text);){let l=n.mapping.slice(r).map(t+1+i+a.index);n.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function p8(n,e,t,r){e.forEach((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let a=n.mapping.slice(r).map(t+1+i);n.replaceWith(a,a+1,e.type.schema.text(`
`))}})}function uj(n,e,t){let r=n.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,t)}function cj(n,e,t,r,o){let i=n.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");t||(t=i.type);let a=t.create(r,null,o||i.marks);if(i.isLeaf)return n.replaceWith(e,e+i.nodeSize,a);if(!t.validContent(i.content))throw new RangeError("Invalid content for node type "+t.name);n.step(new nr(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new Ze(Ve.from(a),0,0),1,!0))}function $a(n,e,t=1,r){let o=n.resolve(e),i=o.depth-t,a=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!a.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,d=t-2;c>i;c--,d--){let f=o.node(c),m=o.index(c);if(f.type.spec.isolating)return!1;let g=f.content.cutByIndex(m,f.childCount),v=r&&r[d+1];v&&(g=g.replaceChild(0,v.type.create(v.attrs)));let y=r&&r[d]||f;if(!f.canReplace(m+1,f.childCount)||!y.type.validContent(g))return!1}let s=o.indexAfter(i),l=r&&r[0];return o.node(i).canReplaceWith(s,s,l?l.type:o.node(i+1).type)}function dj(n,e,t=1,r){let o=n.doc.resolve(e),i=Ve.empty,a=Ve.empty;for(let s=o.depth,l=o.depth-t,c=t-1;s>l;s--,c--){i=Ve.from(o.node(s).copy(i));let d=r&&r[c];a=Ve.from(d?d.type.create(d.attrs,a):o.node(s).copy(a))}n.step(new Zn(e,e,new Ze(i.append(a),t,t),!0))}function Ri(n,e){let t=n.resolve(e),r=t.index();return h8(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function fj(n,e){e.content.size||n.type.compatibleContent(e.type);let t=n.contentMatchAt(n.childCount),{linebreakReplacement:r}=n.type.schema;for(let o=0;o<e.childCount;o++){let i=e.child(o),a=i.type==r?n.type.schema.nodes.text:i.type;if(t=t.matchType(a),!t||!n.type.allowsMarks(i.marks))return!1}return t.validEnd}function h8(n,e){return!!(n&&e&&!n.isLeaf&&fj(n,e))}function Dp(n,e,t=-1){let r=n.resolve(e);for(let o=r.depth;;o--){let i,a,s=r.index(o);if(o==r.depth?(i=r.nodeBefore,a=r.nodeAfter):t>0?(i=r.node(o+1),s++,a=r.node(o).maybeChild(s)):(i=r.node(o).maybeChild(s-1),a=r.node(o+1)),i&&!i.isTextblock&&h8(i,a)&&r.node(o).canReplace(s,s+1))return e;if(o==0)break;e=t<0?r.before(o):r.after(o)}}function pj(n,e,t){let r=null,{linebreakReplacement:o}=n.doc.type.schema,i=n.doc.resolve(e-t),a=i.node().type;if(o&&a.inlineContent){let d=a.whitespace=="pre",f=!!a.contentMatch.matchType(o);d&&!f?r=!1:!d&&f&&(r=!0)}let s=n.steps.length;if(r===!1){let d=n.doc.resolve(e+t);p8(n,d.node(),d.before(),s)}a.inlineContent&&zg(n,e+t-1,a,i.node().contentMatchAt(i.index()),r==null);let l=n.mapping.slice(s),c=l.map(e-t);if(n.step(new Zn(c,l.map(e+t,-1),Ze.empty,!0)),r===!0){let d=n.doc.resolve(c);f8(n,d.node(),d.before(),n.steps.length)}return n}function hj(n,e,t){let r=n.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),t))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,t))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,t))return r.after(o+1);if(i<r.node(o).childCount)return null}return null}function mj(n,e,t){let r=n.resolve(e);if(!t.content.size)return e;let o=t.content;for(let i=0;i<t.openStart;i++)o=o.firstChild.content;for(let i=1;i<=(t.openStart==0&&t.size?2:1);i++)for(let a=r.depth;a>=0;a--){let s=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,l=r.index(a)+(s>0?1:0),c=r.node(a),d=!1;if(i==1)d=c.canReplace(l,l,o);else{let f=c.contentMatchAt(l).findWrapping(o.firstChild.type);d=f&&c.canReplaceWith(l,l,f[0])}if(d)return s==0?r.pos:s<0?r.before(a+1):r.after(a+1)}return null}function Np(n,e,t=e,r=Ze.empty){if(e==t&&!r.size)return null;let o=n.resolve(e),i=n.resolve(t);return m8(o,i,r)?new Zn(e,t,r):new vj(o,i,r).fit()}function m8(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}class vj{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=Ve.empty;for(let o=0;o<=e.depth;o++){let i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=Ve.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let i=this.placed,a=r.depth,s=o.depth;for(;a&&s&&i.childCount==1;)i=i.firstChild.content,a--,s--;let l=new Ze(i,a,s);return e>-1?new nr(r.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||r.pos!=this.$to.pos?new Zn(r.pos,o.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<e;r++){let i=t.firstChild;if(t.childCount>1&&(o=0),i.type.spec.isolating&&o<=r){e=r;break}t=i.content}for(let t=1;t<=2;t++)for(let r=t==1?e:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=Fm(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let a=o.firstChild;for(let s=this.depth;s>=0;s--){let{type:l,match:c}=this.frontier[s],d,f=null;if(t==1&&(a?c.matchType(a.type)||(f=c.fillBefore(Ve.from(a),!1)):i&&l.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:s,parent:i,inject:f};if(t==2&&a&&(d=c.findWrapping(a.type)))return{sliceDepth:r,frontierDepth:s,parent:i,wrap:d};if(i&&c.matchType(i.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,o=Fm(e,t);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new Ze(e,t+1,Math.max(r,o.size+t>=e.size-r?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,o=Fm(e,t);if(o.childCount<=1&&t>0){let i=e.size-t<=t+o.size;this.unplaced=new Ze(ku(e,t-1,1),t-1,i?t-1:r)}else this.unplaced=new Ze(ku(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:o,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let y=0;y<i.length;y++)this.openFrontierNode(i[y]);let a=this.unplaced,s=r?r.content:a.content,l=a.openStart-e,c=0,d=[],{match:f,type:m}=this.frontier[t];if(o){for(let y=0;y<o.childCount;y++)d.push(o.child(y));f=f.matchFragment(o)}let g=s.size+e-(a.content.size-a.openEnd);for(;c<s.childCount;){let y=s.child(c),b=f.matchType(y.type);if(!b)break;c++,(c>1||l==0||y.content.size)&&(f=b,d.push(v8(y.mark(m.allowedMarks(y.marks)),c==1?l:0,c==s.childCount?g:-1)))}let v=c==s.childCount;v||(g=-1),this.placed=Cu(this.placed,t,Ve.from(d)),this.frontier[t].match=f,v&&g<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let y=0,b=s;y<g;y++){let _=b.lastChild;this.frontier.push({type:_.type,match:_.contentMatchAt(_.childCount)}),b=_.content}this.unplaced=v?e==0?Ze.empty:new Ze(ku(a.content,e-1,1),e-1,g<0?a.openEnd:e-1):new Ze(ku(a.content,e,c),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!Lm(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:r}=this.$to,o=this.$to.after(r);for(;r>1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:o}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),a=Lm(e,t,o,r,i);if(a){for(let s=t-1;s>=0;s--){let{match:l,type:c}=this.frontier[s],d=Lm(e,s,c,l,!0);if(!d||d.childCount)continue e}return{depth:t,fit:a,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=Cu(this.placed,t.depth,t.fit)),e=t.move;for(let r=t.depth+1;r<=e.depth;r++){let o=e.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,e.index(r));this.openFrontierNode(o.type,o.attrs,i)}return e}openFrontierNode(e,t=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=Cu(this.placed,this.depth,Ve.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(Ve.empty,!0);t.childCount&&(this.placed=Cu(this.placed,this.frontier.length,t))}}function ku(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(ku(n.firstChild.content,e-1,t)))}function Cu(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(Cu(n.lastChild.content,e-1,t)))}function Fm(n,e){for(let t=0;t<e;t++)n=n.firstChild.content;return n}function v8(n,e,t){if(e<=0)return n;let r=n.content;return e>1&&(r=r.replaceChild(0,v8(r.firstChild,e-1,r.childCount==1?t-1:0))),e>0&&(r=n.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(Ve.empty,!0)))),n.copy(r)}function Lm(n,e,t,r,o){let i=n.node(e),a=o?n.indexAfter(e):n.index(e);if(a==i.childCount&&!t.compatibleContent(i.type))return null;let s=r.fillBefore(i.content,!0,a);return s&&!gj(t,i.content,a)?s:null}function gj(n,e,t){for(let r=t;r<e.childCount;r++)if(!n.allowsMarks(e.child(r).marks))return!0;return!1}function yj(n){return n.spec.defining||n.spec.definingForContent}function bj(n,e,t,r){if(!r.size)return n.deleteRange(e,t);let o=n.doc.resolve(e),i=n.doc.resolve(t);if(m8(o,i,r))return n.step(new Zn(e,t,r));let a=y8(o,n.doc.resolve(t));a[a.length-1]==0&&a.pop();let s=-(o.depth+1);a.unshift(s);for(let m=o.depth,g=o.pos-1;m>0;m--,g--){let v=o.node(m).type.spec;if(v.defining||v.definingAsContext||v.isolating)break;a.indexOf(m)>-1?s=m:o.before(m)==g&&a.splice(1,0,-m)}let l=a.indexOf(s),c=[],d=r.openStart;for(let m=r.content,g=0;;g++){let v=m.firstChild;if(c.push(v),g==r.openStart)break;m=v.content}for(let m=d-1;m>=0;m--){let g=c[m],v=yj(g.type);if(v&&!g.sameMarkup(o.node(Math.abs(s)-1)))d=m;else if(v||!g.type.isTextblock)break}for(let m=r.openStart;m>=0;m--){let g=(m+d+1)%(r.openStart+1),v=c[g];if(v)for(let y=0;y<a.length;y++){let b=a[(y+l)%a.length],_=!0;b<0&&(_=!1,b=-b);let w=o.node(b-1),T=o.index(b-1);if(w.canReplaceWith(T,T,v.type,v.marks))return n.replace(o.before(b),_?i.after(b):t,new Ze(g8(r.content,0,r.openStart,g),g,r.openEnd))}}let f=n.steps.length;for(let m=a.length-1;m>=0&&(n.replace(e,t,r),!(n.steps.length>f));m--){let g=a[m];g<0||(e=o.before(g),t=i.after(g))}}function g8(n,e,t,r,o){if(e<t){let i=n.firstChild;n=n.replaceChild(0,i.copy(g8(i.content,e+1,t,r,i)))}if(e>r){let i=o.contentMatchAt(0),a=i.fillBefore(n).append(n);n=a.append(i.matchFragment(a).fillBefore(Ve.empty,!0))}return n}function Sj(n,e,t,r){if(!r.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let o=hj(n.doc,e,r.type);o!=null&&(e=t=o)}n.replaceRange(e,t,new Ze(Ve.from(r),0,0))}function _j(n,e,t){let r=n.doc.resolve(e),o=n.doc.resolve(t),i=y8(r,o);for(let a=0;a<i.length;a++){let s=i[a],l=a==i.length-1;if(l&&s==0||r.node(s).type.contentMatch.validEnd)return n.delete(r.start(s),o.end(s));if(s>0&&(l||r.node(s-1).canReplace(r.index(s-1),o.indexAfter(s-1))))return n.delete(r.before(s),o.after(s))}for(let a=1;a<=r.depth&&a<=o.depth;a++)if(e-r.start(a)==r.depth-a&&t>r.end(a)&&o.end(a)-t!=o.depth-a&&r.start(a-1)==o.start(a-1)&&r.node(a-1).canReplace(r.index(a-1),o.index(a-1)))return n.delete(r.before(a),t);n.delete(e,t)}function y8(n,e){let t=[],r=Math.min(n.depth,e.depth);for(let o=r;o>=0;o--){let i=n.start(o);if(i<n.pos-(n.depth-o)||e.end(o)>e.pos+(e.depth-o)||n.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(i==e.start(o)||o==n.depth&&o==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==i-1)&&t.push(o)}return t}class Il extends br{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return Wn.fail("No node at attribute step's position");let r=Object.create(null);for(let i in t.attrs)r[i]=t.attrs[i];r[this.attr]=this.value;let o=t.type.create(r,null,t.marks);return Wn.fromReplace(e,this.pos,this.pos+1,new Ze(Ve.from(o),0,t.isLeaf?0:1))}getMap(){return Zr.empty}invert(e){return new Il(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Il(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Il(t.pos,t.attr,t.value)}}br.jsonID("attr",Il);class tc extends br{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let o in e.attrs)t[o]=e.attrs[o];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return Wn.ok(r)}getMap(){return Zr.empty}invert(e){return new tc(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new tc(t.attr,t.value)}}br.jsonID("docAttr",tc);let $l=class extends Error{};$l=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t};$l.prototype=Object.create(Error.prototype);$l.prototype.constructor=$l;$l.prototype.name="TransformError";class b8{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Lf}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new $l(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,r=Ze.empty){let o=Np(this.doc,e,t,r);return o&&this.step(o),this}replaceWith(e,t,r){return this.replace(e,t,new Ze(Ve.from(r),0,0))}delete(e,t){return this.replace(e,t,Ze.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return bj(this,e,t,r),this}replaceRangeWith(e,t,r){return Sj(this,e,t,r),this}deleteRange(e,t){return _j(this,e,t),this}lift(e,t){return oj(this,e,t),this}join(e,t=1){return pj(this,e,t),this}wrap(e,t){return sj(this,e,t),this}setBlockType(e,t=e,r,o=null){return lj(this,e,t,r,o),this}setNodeMarkup(e,t,r=null,o){return cj(this,e,t,r,o),this}setNodeAttribute(e,t,r){return this.step(new Il(e,t,r)),this}setDocAttribute(e,t){return this.step(new tc(e,t)),this}addNodeMark(e,t){return this.step(new fi(e,t)),this}removeNodeMark(e,t){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(t instanceof gn)t.isInSet(r.marks)&&this.step(new Ms(e,t));else{let o=r.marks,i,a=[];for(;i=t.isInSet(o);)a.push(new Ms(e,i)),o=i.removeFromSet(o);for(let s=a.length-1;s>=0;s--)this.step(a[s])}return this}split(e,t=1,r){return dj(this,e,t,r),this}addMark(e,t,r){return tj(this,e,t,r),this}removeMark(e,t,r){return nj(this,e,t,r),this}clearIncompatible(e,t,r){return zg(this,e,t,r),this}}const Bm=Object.create(null);class nn{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new wj(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=Ze.empty){let r=t.content.lastChild,o=null;for(let s=0;s<t.openEnd;s++)o=r,r=r.lastChild;let i=e.steps.length,a=this.ranges;for(let s=0;s<a.length;s++){let{$from:l,$to:c}=a[s],d=e.mapping.slice(i);e.replaceRange(d.map(l.pos),d.map(c.pos),s?Ze.empty:t),s==0&&A2(e,i,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,t){let r=e.steps.length,o=this.ranges;for(let i=0;i<o.length;i++){let{$from:a,$to:s}=o[i],l=e.mapping.slice(r),c=l.map(a.pos),d=l.map(s.pos);i?e.deleteRange(c,d):(e.replaceRangeWith(c,d,t),A2(e,r,t.isInline?-1:1))}}static findFrom(e,t,r=!1){let o=e.parent.inlineContent?new qt(e):gl(e.node(0),e.parent,e.pos,e.index(),t,r);if(o)return o;for(let i=e.depth-1;i>=0;i--){let a=t<0?gl(e.node(0),e.node(i),e.before(i+1),e.index(i),t,r):gl(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,t,r);if(a)return a}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new eo(e.node(0))}static atStart(e){return gl(e,e,0,0,1)||new eo(e)}static atEnd(e){return gl(e,e,e.content.size,e.childCount,-1)||new eo(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Bm[t.type];if(!r)throw new RangeError(`No selection type ${t.type} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in Bm)throw new RangeError("Duplicate use of selection JSON ID "+e);return Bm[e]=t,t.prototype.jsonID=e,t}getBookmark(){return qt.between(this.$anchor,this.$head).getBookmark()}}nn.prototype.visible=!0;class wj{constructor(e,t){this.$from=e,this.$to=t}}let M2=!1;function O2(n){!M2&&!n.parent.inlineContent&&(M2=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class qt extends nn{constructor(e,t=e){O2(e),O2(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return nn.near(r);let o=e.resolve(t.map(this.anchor));return new qt(o.parent.inlineContent?o:r,r)}replace(e,t=Ze.empty){if(super.replace(e,t),t==Ze.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof qt&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Fp(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new qt(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){let o=e.resolve(t);return new this(o,r==t?o:e.resolve(r))}static between(e,t,r){let o=e.pos-t.pos;if((!r||o)&&(r=o>=0?1:-1),!t.parent.inlineContent){let i=nn.findFrom(t,r,!0)||nn.findFrom(t,-r,!0);if(i)t=i.$head;else return nn.near(t,r)}return e.parent.inlineContent||(o==0?e=t:(e=(nn.findFrom(e,-r,!0)||nn.findFrom(e,r,!0)).$anchor,e.pos<t.pos!=o<0&&(e=t))),new qt(e,t)}}nn.jsonID("text",qt);class Fp{constructor(e,t){this.anchor=e,this.head=t}map(e){return new Fp(e.map(this.anchor),e.map(this.head))}resolve(e){return qt.between(e.resolve(this.anchor),e.resolve(this.head))}}class Ot extends nn{constructor(e){let t=e.nodeAfter,r=e.node(0).resolve(e.pos+t.nodeSize);super(e,r),this.node=t}map(e,t){let{deleted:r,pos:o}=t.mapResult(this.anchor),i=e.resolve(o);return r?nn.near(i):new Ot(i)}content(){return new Ze(Ve.from(this.node),0,0)}eq(e){return e instanceof Ot&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Ug(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Ot(e.resolve(t.anchor))}static create(e,t){return new Ot(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}Ot.prototype.visible=!1;nn.jsonID("node",Ot);class Ug{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:r}=e.mapResult(this.anchor);return t?new Fp(r,r):new Ug(r)}resolve(e){let t=e.resolve(this.anchor),r=t.nodeAfter;return r&&Ot.isSelectable(r)?new Ot(t):nn.near(t)}}class eo extends nn{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=Ze.empty){if(t==Ze.empty){e.delete(0,e.doc.content.size);let r=nn.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new eo(e)}map(e){return new eo(e)}eq(e){return e instanceof eo}getBookmark(){return xj}}nn.jsonID("all",eo);const xj={map(){return this},resolve(n){return new eo(n)}};function gl(n,e,t,r,o,i=!1){if(e.inlineContent)return qt.create(n,t);for(let a=r-(o>0?0:1);o>0?a<e.childCount:a>=0;a+=o){let s=e.child(a);if(s.isAtom){if(!i&&Ot.isSelectable(s))return Ot.create(n,t-(o<0?s.nodeSize:0))}else{let l=gl(n,s,t+o,o<0?s.childCount:0,o,i);if(l)return l}t+=s.nodeSize*o}return null}function A2(n,e,t){let r=n.steps.length-1;if(r<e)return;let o=n.steps[r];if(!(o instanceof Zn||o instanceof nr))return;let i=n.mapping.maps[r],a;i.forEach((s,l,c,d)=>{a==null&&(a=d)}),n.setSelection(nn.near(n.doc.resolve(a),t))}const P2=1,$2=2,R2=4;class kj extends b8{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|P2)&-3,this.storedMarks=null,this}get selectionSet(){return(this.updated&P2)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=$2,this}ensureMarks(e){return gn.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&$2)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&-3,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let r=this.selection;return t&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||gn.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,r){let o=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(o.text(e),!0):this.deleteSelection();{if(r==null&&(r=t),r=r??t,!e)return this.deleteRange(t,r);let i=this.storedMarks;if(!i){let a=this.doc.resolve(t);i=r==t?a.marks():a.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(t,r,o.text(e,i)),this.selection.empty||this.setSelection(nn.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=R2,this}get scrolledIntoView(){return(this.updated&R2)>0}}function D2(n,e){return!e||!n?n:n.bind(e)}class Iu{constructor(e,t,r){this.name=e,this.init=D2(t.init,r),this.apply=D2(t.apply,r)}}const Cj=[new Iu("doc",{init(n){return n.doc||n.schema.topNodeType.createAndFill()},apply(n){return n.doc}}),new Iu("selection",{init(n,e){return n.selection||nn.atStart(e.doc)},apply(n){return n.selection}}),new Iu("storedMarks",{init(n){return n.storedMarks||null},apply(n,e,t,r){return r.selection.$cursor?n.storedMarks:null}}),new Iu("scrollToSelection",{init(){return 0},apply(n,e){return n.scrolledIntoView?e+1:e}})];class Vm{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Cj.slice(),t&&t.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Iu(r.key,r.spec.state,r))})}}class xl{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=t){let o=this.config.plugins[r];if(o.spec.filterTransaction&&!o.spec.filterTransaction.call(o,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],r=this.applyInner(e),o=null;for(;;){let i=!1;for(let a=0;a<this.config.plugins.length;a++){let s=this.config.plugins[a];if(s.spec.appendTransaction){let l=o?o[a].n:0,c=o?o[a].state:this,d=l<t.length&&s.spec.appendTransaction.call(s,l?t.slice(l):t,c,r);if(d&&r.filterTransaction(d,a)){if(d.setMeta("appendedTransaction",e),!o){o=[];for(let f=0;f<this.config.plugins.length;f++)o.push(f<a?{state:r,n:t.length}:{state:this,n:0})}t.push(d),r=r.applyInner(d),i=!0}o&&(o[a]={state:r,n:t.length})}}if(!i)return{state:r,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new xl(this.config),r=this.config.fields;for(let o=0;o<r.length;o++){let i=r[o];t[i.name]=i.apply(e,this[i.name],this,t)}return t}get tr(){return new kj(this)}static create(e){let t=new Vm(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new xl(t);for(let o=0;o<t.fields.length;o++)r[t.fields[o].name]=t.fields[o].init(e,r);return r}reconfigure(e){let t=new Vm(this.schema,e.plugins),r=t.fields,o=new xl(t);for(let i=0;i<r.length;i++){let a=r[i].name;o[a]=this.hasOwnProperty(a)?this[a]:r[i].init(e,o)}return o}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=e[r],i=o.spec.state;i&&i.toJSON&&(t[r]=i.toJSON.call(o,this[o.key]))}return t}static fromJSON(e,t,r){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new Vm(e.schema,e.plugins),i=new xl(o);return o.fields.forEach(a=>{if(a.name=="doc")i.doc=mi.fromJSON(e.schema,t.doc);else if(a.name=="selection")i.selection=nn.fromJSON(i.doc,t.selection);else if(a.name=="storedMarks")t.storedMarks&&(i.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let s in r){let l=r[s],c=l.spec.state;if(l.key==a.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(t,s)){i[a.name]=c.fromJSON.call(l,e,t[s],i);return}}i[a.name]=a.init(e,i)}}),i}}function S8(n,e,t){for(let r in n){let o=n[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=S8(o,e,{})),t[r]=o}return t}class no{constructor(e){this.spec=e,this.props={},e.props&&S8(e.props,this,this.props),this.key=e.key?e.key.key:_8("plugin")}getState(e){return e[this.key]}}const zm=Object.create(null);function _8(n){return n in zm?n+"$"+ ++zm[n]:(zm[n]=0,n+"$")}class ia{constructor(e="key"){this.key=_8(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const ur=function(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e},Rl=function(n){let e=n.assignedSlot||n.parentNode;return e&&e.nodeType==11?e.host:e};let Hv=null;const _a=function(n,e,t){let r=Hv||(Hv=document.createRange());return r.setEnd(n,t??n.nodeValue.length),r.setStart(n,e||0),r},Ij=function(){Hv=null},Os=function(n,e,t,r){return t&&(N2(n,e,t,r,-1)||N2(n,e,t,r,1))},Ej=/^(img|br|input|textarea|hr)$/i;function N2(n,e,t,r,o){for(;;){if(n==t&&e==r)return!0;if(e==(o<0?0:go(n))){let i=n.parentNode;if(!i||i.nodeType!=1||kc(n)||Ej.test(n.nodeName)||n.contentEditable=="false")return!1;e=ur(n)+(o<0?0:1),n=i}else if(n.nodeType==1){if(n=n.childNodes[e+(o<0?-1:0)],n.contentEditable=="false")return!1;e=o<0?go(n):0}else return!1}}function go(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Tj(n,e){for(;;){if(n.nodeType==3&&e)return n;if(n.nodeType==1&&e>0){if(n.contentEditable=="false")return null;n=n.childNodes[e-1],e=go(n)}else if(n.parentNode&&!kc(n))e=ur(n),n=n.parentNode;else return null}}function Mj(n,e){for(;;){if(n.nodeType==3&&e<n.nodeValue.length)return n;if(n.nodeType==1&&e<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[e],e=0}else if(n.parentNode&&!kc(n))e=ur(n)+1,n=n.parentNode;else return null}}function Oj(n,e,t){for(let r=e==0,o=e==go(n);r||o;){if(n==t)return!0;let i=ur(n);if(n=n.parentNode,!n)return!1;r=r&&i==0,o=o&&i==go(n)}}function kc(n){let e;for(let t=n;t&&!(e=t.pmViewDesc);t=t.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==n||e.contentDOM==n)}const Lp=function(n){return n.focusNode&&Os(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function Zi(n,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=n,t.key=t.code=e,t}function Aj(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Pj(n,e,t){if(n.caretPositionFromPoint)try{let r=n.caretPositionFromPoint(e,t);if(r)return{node:r.offsetNode,offset:Math.min(go(r.offsetNode),r.offset)}}catch{}if(n.caretRangeFromPoint){let r=n.caretRangeFromPoint(e,t);if(r)return{node:r.startContainer,offset:Math.min(go(r.startContainer),r.startOffset)}}}const ta=typeof navigator<"u"?navigator:null,F2=typeof document<"u"?document:null,Di=ta&&ta.userAgent||"",Uv=/Edge\/(\d+)/.exec(Di),w8=/MSIE \d/.exec(Di),Wv=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Di),Lr=!!(w8||Wv||Uv),gi=w8?document.documentMode:Wv?+Wv[1]:Uv?+Uv[1]:0,Bo=!Lr&&/gecko\/(\d+)/i.test(Di);Bo&&+(/Firefox\/(\d+)/.exec(Di)||[0,0])[1];const jv=!Lr&&/Chrome\/(\d+)/.exec(Di),gr=!!jv,x8=jv?+jv[1]:0,Er=!Lr&&!!ta&&/Apple Computer/.test(ta.vendor),Dl=Er&&(/Mobile\/\w+/.test(Di)||!!ta&&ta.maxTouchPoints>2),mo=Dl||(ta?/Mac/.test(ta.platform):!1),$j=ta?/Win/.test(ta.platform):!1,Ia=/Android \d/.test(Di),Cc=!!F2&&"webkitFontSmoothing"in F2.documentElement.style,Rj=Cc?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Dj(n){let e=n.defaultView&&n.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function ga(n,e){return typeof n=="number"?n:n[e]}function Nj(n){let e=n.getBoundingClientRect(),t=e.width/n.offsetWidth||1,r=e.height/n.offsetHeight||1;return{left:e.left,right:e.left+n.clientWidth*t,top:e.top,bottom:e.top+n.clientHeight*r}}function L2(n,e,t){let r=n.someProp("scrollThreshold")||0,o=n.someProp("scrollMargin")||5,i=n.dom.ownerDocument;for(let a=t||n.dom;a;){if(a.nodeType!=1){a=Rl(a);continue}let s=a,l=s==i.body,c=l?Dj(i):Nj(s),d=0,f=0;if(e.top<c.top+ga(r,"top")?f=-(c.top-e.top+ga(o,"top")):e.bottom>c.bottom-ga(r,"bottom")&&(f=e.bottom-e.top>c.bottom-c.top?e.top+ga(o,"top")-c.top:e.bottom-c.bottom+ga(o,"bottom")),e.left<c.left+ga(r,"left")?d=-(c.left-e.left+ga(o,"left")):e.right>c.right-ga(r,"right")&&(d=e.right-c.right+ga(o,"right")),d||f)if(l)i.defaultView.scrollBy(d,f);else{let g=s.scrollLeft,v=s.scrollTop;f&&(s.scrollTop+=f),d&&(s.scrollLeft+=d);let y=s.scrollLeft-g,b=s.scrollTop-v;e={left:e.left-y,top:e.top-b,right:e.right-y,bottom:e.bottom-b}}let m=l?"fixed":getComputedStyle(a).position;if(/^(fixed|sticky)$/.test(m))break;a=m=="absolute"?a.offsetParent:Rl(a)}}function Fj(n){let e=n.dom.getBoundingClientRect(),t=Math.max(0,e.top),r,o;for(let i=(e.left+e.right)/2,a=t+1;a<Math.min(innerHeight,e.bottom);a+=5){let s=n.root.elementFromPoint(i,a);if(!s||s==n.dom||!n.dom.contains(s))continue;let l=s.getBoundingClientRect();if(l.top>=t-20){r=s,o=l.top;break}}return{refDOM:r,refTop:o,stack:k8(n.dom)}}function k8(n){let e=[],t=n.ownerDocument;for(let r=n;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),n!=t);r=Rl(r));return e}function Lj({refDOM:n,refTop:e,stack:t}){let r=n?n.getBoundingClientRect().top:0;C8(t,r==0?0:r-e)}function C8(n,e){for(let t=0;t<n.length;t++){let{dom:r,top:o,left:i}=n[t];r.scrollTop!=o+e&&(r.scrollTop=o+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let pl=null;function Bj(n){if(n.setActive)return n.setActive();if(pl)return n.focus(pl);let e=k8(n);n.focus(pl==null?{get preventScroll(){return pl={preventScroll:!0},!0}}:void 0),pl||(pl=!1,C8(e,0))}function I8(n,e){let t,r=2e8,o,i=0,a=e.top,s=e.top,l,c;for(let d=n.firstChild,f=0;d;d=d.nextSibling,f++){let m;if(d.nodeType==1)m=d.getClientRects();else if(d.nodeType==3)m=_a(d).getClientRects();else continue;for(let g=0;g<m.length;g++){let v=m[g];if(v.top<=a&&v.bottom>=s){a=Math.max(v.bottom,a),s=Math.min(v.top,s);let y=v.left>e.left?v.left-e.left:v.right<e.left?e.left-v.right:0;if(y<r){t=d,r=y,o=y&&t.nodeType==3?{left:v.right<e.left?v.right:v.left,top:e.top}:e,d.nodeType==1&&y&&(i=f+(e.left>=(v.left+v.right)/2?1:0));continue}}else v.top>e.top&&!l&&v.left<=e.left&&v.right>=e.left&&(l=d,c={left:Math.max(v.left,Math.min(v.right,e.left)),top:v.top});!t&&(e.left>=v.right&&e.top>=v.top||e.left>=v.left&&e.top>=v.bottom)&&(i=f+1)}}return!t&&l&&(t=l,o=c,r=0),t&&t.nodeType==3?Vj(t,o):!t||r&&t.nodeType==1?{node:n,offset:i}:I8(t,o)}function Vj(n,e){let t=n.nodeValue.length,r=document.createRange();for(let o=0;o<t;o++){r.setEnd(n,o+1),r.setStart(n,o);let i=ei(r,1);if(i.top!=i.bottom&&Wg(e,i))return{node:n,offset:o+(e.left>=(i.left+i.right)/2?1:0)}}return{node:n,offset:0}}function Wg(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function zj(n,e){let t=n.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left<n.getBoundingClientRect().left?t:n}function Hj(n,e,t){let{node:r,offset:o}=I8(e,t),i=-1;if(r.nodeType==1&&!r.firstChild){let a=r.getBoundingClientRect();i=a.left!=a.right&&t.left>(a.left+a.right)/2?1:-1}return n.docView.posFromDOM(r,o,i)}function Uj(n,e,t,r){let o=-1;for(let i=e,a=!1;i!=n.dom;){let s=n.docView.nearestDesc(i,!0),l;if(!s)return null;if(s.dom.nodeType==1&&(s.node.isBlock&&s.parent||!s.contentDOM)&&((l=s.dom.getBoundingClientRect()).width||l.height)&&(s.node.isBlock&&s.parent&&(!a&&l.left>r.left||l.top>r.top?o=s.posBefore:(!a&&l.right<r.left||l.bottom<r.top)&&(o=s.posAfter),a=!0),!s.contentDOM&&o<0&&!s.node.isText))return(s.node.isBlock?r.top<(l.top+l.bottom)/2:r.left<(l.left+l.right)/2)?s.posBefore:s.posAfter;i=s.dom.parentNode}return o>-1?o:n.docView.posFromDOM(e,t,-1)}function E8(n,e,t){let r=n.childNodes.length;if(r&&t.top<t.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-t.top)/(t.bottom-t.top))-2)),i=o;;){let a=n.childNodes[i];if(a.nodeType==1){let s=a.getClientRects();for(let l=0;l<s.length;l++){let c=s[l];if(Wg(e,c))return E8(a,e,c)}}if((i=(i+1)%r)==o)break}return n}function Wj(n,e){let t=n.dom.ownerDocument,r,o=0,i=Pj(t,e.left,e.top);i&&({node:r,offset:o}=i);let a=(n.root.elementFromPoint?n.root:t).elementFromPoint(e.left,e.top),s;if(!a||!n.dom.contains(a.nodeType!=1?a.parentNode:a)){let c=n.dom.getBoundingClientRect();if(!Wg(e,c)||(a=E8(n.dom,e,c),!a))return null}if(Er)for(let c=a;r&&c;c=Rl(c))c.draggable&&(r=void 0);if(a=zj(a,e),r){if(Bo&&r.nodeType==1&&(o=Math.min(o,r.childNodes.length),o<r.childNodes.length)){let d=r.childNodes[o],f;d.nodeName=="IMG"&&(f=d.getBoundingClientRect()).right<=e.left&&f.bottom>e.top&&o++}let c;Cc&&o&&r.nodeType==1&&(c=r.childNodes[o-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&o--,r==n.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?s=n.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(s=Uj(n,r,o,e))}s==null&&(s=Hj(n,a,e));let l=n.docView.nearestDesc(a,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function B2(n){return n.top<n.bottom||n.left<n.right}function ei(n,e){let t=n.getClientRects();if(t.length){let r=t[e<0?0:t.length-1];if(B2(r))return r}return Array.prototype.find.call(t,B2)||n.getBoundingClientRect()}const jj=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function T8(n,e,t){let{node:r,offset:o,atom:i}=n.docView.domFromPos(e,t<0?-1:1),a=Cc||Bo;if(r.nodeType==3)if(a&&(jj.test(r.nodeValue)||(t<0?!o:o==r.nodeValue.length))){let l=ei(_a(r,o,o),t);if(Bo&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let c=ei(_a(r,o-1,o-1),-1);if(c.top==l.top){let d=ei(_a(r,o,o+1),-1);if(d.top!=l.top)return hu(d,d.left<c.left)}}return l}else{let l=o,c=o,d=t<0?1:-1;return t<0&&!o?(c++,d=-1):t>=0&&o==r.nodeValue.length?(l--,d=1):t<0?l--:c++,hu(ei(_a(r,l,c),d),d<0)}if(!n.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&o&&(t<0||o==go(r))){let l=r.childNodes[o-1];if(l.nodeType==1)return Hm(l.getBoundingClientRect(),!1)}if(i==null&&o<go(r)){let l=r.childNodes[o];if(l.nodeType==1)return Hm(l.getBoundingClientRect(),!0)}return Hm(r.getBoundingClientRect(),t>=0)}if(i==null&&o&&(t<0||o==go(r))){let l=r.childNodes[o-1],c=l.nodeType==3?_a(l,go(l)-(a?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return hu(ei(c,1),!1)}if(i==null&&o<go(r)){let l=r.childNodes[o];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let c=l?l.nodeType==3?_a(l,0,a?0:1):l.nodeType==1?l:null:null;if(c)return hu(ei(c,-1),!0)}return hu(ei(r.nodeType==3?_a(r):r,-t),t>=0)}function hu(n,e){if(n.width==0)return n;let t=e?n.left:n.right;return{top:n.top,bottom:n.bottom,left:t,right:t}}function Hm(n,e){if(n.height==0)return n;let t=e?n.top:n.bottom;return{top:t,bottom:t,left:n.left,right:n.right}}function M8(n,e,t){let r=n.state,o=n.root.activeElement;r!=e&&n.updateState(e),o!=n.dom&&n.focus();try{return t()}finally{r!=e&&n.updateState(r),o!=n.dom&&o&&o.focus()}}function Kj(n,e,t){let r=e.selection,o=t=="up"?r.$from:r.$to;return M8(n,e,()=>{let{node:i}=n.docView.domFromPos(o.pos,t=="up"?-1:1);for(;;){let s=n.docView.nearestDesc(i,!0);if(!s)break;if(s.node.isBlock){i=s.contentDOM||s.dom;break}i=s.dom.parentNode}let a=T8(n,o.pos,1);for(let s=i.firstChild;s;s=s.nextSibling){let l;if(s.nodeType==1)l=s.getClientRects();else if(s.nodeType==3)l=_a(s,0,s.nodeValue.length).getClientRects();else continue;for(let c=0;c<l.length;c++){let d=l[c];if(d.bottom>d.top+1&&(t=="up"?a.top-d.top>(d.bottom-a.top)*2:d.bottom-a.bottom>(a.bottom-d.top)*2))return!1}}return!0})}const Yj=/[\u0590-\u08ac]/;function qj(n,e,t){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=n.domSelection();return s?!Yj.test(r.parent.textContent)||!s.modify?t=="left"||t=="backward"?i:a:M8(n,e,()=>{let{focusNode:l,focusOffset:c,anchorNode:d,anchorOffset:f}=n.domSelectionRange(),m=s.caretBidiLevel;s.modify("move",t,"character");let g=r.depth?n.docView.domAfterPos(r.before()):n.dom,{focusNode:v,focusOffset:y}=n.domSelectionRange(),b=v&&!g.contains(v.nodeType==1?v:v.parentNode)||l==v&&c==y;try{s.collapse(d,f),l&&(l!=d||c!=f)&&s.extend&&s.extend(l,c)}catch{}return m!=null&&(s.caretBidiLevel=m),b}):r.pos==r.start()||r.pos==r.end()}let V2=null,z2=null,H2=!1;function Gj(n,e,t){return V2==e&&z2==t?H2:(V2=e,z2=t,H2=t=="up"||t=="down"?Kj(n,e,t):qj(n,e,t))}const So=0,U2=1,as=2,na=3;class Ic{constructor(e,t,r,o){this.parent=e,this.children=t,this.dom=r,this.contentDOM=o,this.dirty=So,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,r=this.posAtStart;;t++){let o=this.children[t];if(o==e)return r;r+=o.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let i,a;if(e==this.contentDOM)i=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.previousSibling}for(;i&&!((a=i.pmViewDesc)&&a.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(a)+a.size:this.posAtStart}else{let i,a;if(e==this.contentDOM)i=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&!((a=i.pmViewDesc)&&a.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(a):this.posAtEnd}let o;if(e==this.dom&&this.contentDOM)o=t>ur(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&t==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let r=!0,o=e;o;o=o.parentNode){let i=this.getDesc(o),a;if(i&&(!t||i.node))if(r&&(a=i.nodeDOM)&&!(a.nodeType==1?a.contains(e.nodeType==1?e:e.parentNode):a==e))r=!1;else return i}}getDesc(e){let t=e.pmViewDesc;for(let r=t;r;r=r.parent)if(r==this)return t}posFromDOM(e,t,r){for(let o=e;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(e,t,r)}return-1}descAt(e){for(let t=0,r=0;t<this.children.length;t++){let o=this.children[t],i=r+o.size;if(r==e&&i!=r){for(;!o.border&&o.children.length;)for(let a=0;a<o.children.length;a++){let s=o.children[a];if(s.size){o=s;break}}return o}if(e<i)return o.descAt(e-r-o.border);r=i}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,o=0;for(let i=0;r<this.children.length;r++){let a=this.children[r],s=i+a.size;if(s>e||a instanceof A8){o=e-i;break}i=s}if(o)return this.children[r].domFromPos(o-this.children[r].border,t);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof O8&&i.side>=0;r--);if(t<=0){let i,a=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,a=!1);return i&&t&&a&&!i.border&&!i.domAtom?i.domFromPos(i.size,t):{node:this.contentDOM,offset:i?ur(i.dom)+1:0}}else{let i,a=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,a=!1);return i&&a&&!i.border&&!i.domAtom?i.domFromPos(0,t):{node:this.contentDOM,offset:i?ur(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,i=-1;for(let a=r,s=0;;s++){let l=this.children[s],c=a+l.size;if(o==-1&&e<=c){let d=a+l.border;if(e>=d&&t<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,t,d);e=a;for(let f=s;f>0;f--){let m=this.children[f-1];if(m.size&&m.dom.parentNode==this.contentDOM&&!m.emptyChildAt(1)){o=ur(m.dom)+1;break}e-=m.size}o==-1&&(o=0)}if(o>-1&&(c>t||s==this.children.length-1)){t=c;for(let d=s+1;d<this.children.length;d++){let f=this.children[d];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){i=ur(f.dom);break}t+=f.size}i==-1&&(i=this.contentDOM.childNodes.length);break}a=c}return{node:this.contentDOM,from:e,to:t,fromOffset:o,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:r}=this.domFromPos(e,0);if(t.nodeType!=1||r==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[r]}setSelection(e,t,r,o=!1){let i=Math.min(e,t),a=Math.max(e,t);for(let g=0,v=0;g<this.children.length;g++){let y=this.children[g],b=v+y.size;if(i>v&&a<b)return y.setSelection(e-v-y.border,t-v-y.border,r,o);v=b}let s=this.domFromPos(e,e?-1:1),l=t==e?s:this.domFromPos(t,t?-1:1),c=r.root.getSelection(),d=r.domSelectionRange(),f=!1;if((Bo||Er)&&e==t){let{node:g,offset:v}=s;if(g.nodeType==3){if(f=!!(v&&g.nodeValue[v-1]==`
`),f&&v==g.nodeValue.length)for(let y=g,b;y;y=y.parentNode){if(b=y.nextSibling){b.nodeName=="BR"&&(s=l={node:b.parentNode,offset:ur(b)+1});break}let _=y.pmViewDesc;if(_&&_.node&&_.node.isBlock)break}}else{let y=g.childNodes[v-1];f=y&&(y.nodeName=="BR"||y.contentEditable=="false")}}if(Bo&&d.focusNode&&d.focusNode!=l.node&&d.focusNode.nodeType==1){let g=d.focusNode.childNodes[d.focusOffset];g&&g.contentEditable=="false"&&(o=!0)}if(!(o||f&&Er)&&Os(s.node,s.offset,d.anchorNode,d.anchorOffset)&&Os(l.node,l.offset,d.focusNode,d.focusOffset))return;let m=!1;if((c.extend||e==t)&&!f){c.collapse(s.node,s.offset);try{e!=t&&c.extend(l.node,l.offset),m=!0}catch{}}if(!m){if(e>t){let v=s;s=l,l=v}let g=document.createRange();g.setEnd(l.node,l.offset),g.setStart(s.node,s.offset),c.removeAllRanges(),c.addRange(g)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let r=0,o=0;o<this.children.length;o++){let i=this.children[o],a=r+i.size;if(r==a?e<=a&&t>=r:e<a&&t>r){let s=r+i.border,l=a-i.border;if(e>=s&&t<=l){this.dirty=e==r||t==a?as:U2,e==s&&t==l&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=na:i.markDirty(e-s,t-s);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?as:na}r=a}this.dirty=as}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let r=e==1?as:U2;t.dirty<r&&(t.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class O8 extends Ic{constructor(e,t,r,o){let i,a=t.type.toDOM;if(typeof a=="function"&&(a=a(r,()=>{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!t.type.spec.raw){if(a.nodeType!=1){let s=document.createElement("span");s.appendChild(a),a=s}a.contentEditable="false",a.classList.add("ProseMirror-widget")}super(e,[],a,null),this.widget=t,this.widget=t,i=this}matchesWidget(e){return this.dirty==So&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class Jj extends Ic{constructor(e,t,r,o){super(e,[],t,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class As extends Ic{constructor(e,t,r,o,i){super(e,[],r,o),this.mark=t,this.spec=i}static create(e,t,r,o){let i=o.nodeViews[t.type.name],a=i&&i(t,o,r);return(!a||!a.dom)&&(a=Ks.renderSpec(document,t.type.spec.toDOM(t,r),null,t.attrs)),new As(e,t,a.dom,a.contentDOM||a.dom,a)}parseRule(){return this.dirty&na||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=na&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=So){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=So}}slice(e,t,r){let o=As.create(this.parent,this.mark,!0,r),i=this.children,a=this.size;t<a&&(i=Yv(i,t,a,r)),e>0&&(i=Yv(i,0,e,r));for(let s=0;s<i.length;s++)i[s].parent=o;return o.children=i,o}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class yi extends Ic{constructor(e,t,r,o,i,a,s,l,c){super(e,[],i,a),this.node=t,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=s}static create(e,t,r,o,i,a){let s=i.nodeViews[t.type.name],l,c=s&&s(t,i,()=>{if(!l)return a;if(l.parent)return l.parent.posBeforeChild(l)},r,o),d=c&&c.dom,f=c&&c.contentDOM;if(t.isText){if(!d)d=document.createTextNode(t.text);else if(d.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else d||({dom:d,contentDOM:f}=Ks.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs));!f&&!t.isText&&d.nodeName!="BR"&&(d.hasAttribute("contenteditable")||(d.contentEditable="false"),t.type.spec.draggable&&(d.draggable=!0));let m=d;return d=R8(d,r,t),c?l=new Xj(e,t,r,o,d,f||null,m,c,i,a+1):t.isText?new Bp(e,t,r,o,d,m,i):new yi(e,t,r,o,d,f||null,m,i,a+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let t=this.children.length-1;t>=0;t--){let r=this.children[t];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>Ve.empty)}return e}matchesNode(e,t,r){return this.dirty==So&&e.eq(this.node)&&Bf(t,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let r=this.node.inlineContent,o=t,i=e.composing?this.localCompositionInfo(e,t):null,a=i&&i.pos>-1?i:null,s=i&&i.pos<0,l=new Zj(this,a&&a.node,e);nK(this.node,this.innerDeco,(c,d,f)=>{c.spec.marks?l.syncToMarks(c.spec.marks,r,e):c.type.side>=0&&!f&&l.syncToMarks(d==this.node.childCount?gn.none:this.node.child(d).marks,r,e),l.placeWidget(c,e,o)},(c,d,f,m)=>{l.syncToMarks(c.marks,r,e);let g;l.findNodeMatch(c,d,f,m)||s&&e.state.selection.from>o&&e.state.selection.to<o+c.nodeSize&&(g=l.findIndexWithChild(i.node))>-1&&l.updateNodeAt(c,d,f,g,e)||l.updateNextNode(c,d,f,e,m,o)||l.addNode(c,d,f,e,o),o+=c.nodeSize}),l.syncToMarks([],r,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==as)&&(a&&this.protectLocalComposition(e,a),P8(this.contentDOM,this.children,e),Dl&&rK(this.dom))}localCompositionInfo(e,t){let{from:r,to:o}=e.state.selection;if(!(e.state.selection instanceof qt)||r<t||o>t+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let a=i.nodeValue,s=oK(this.node.content,a,r-t,o-t);return s<0?null:{node:i,pos:s,text:a}}else return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:r,text:o}){if(this.getDesc(t))return;let i=t;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let a=new Jj(this,i,t,o);e.input.compositionNodes.push(a),this.children=Yv(this.children,r,r+o.length,e,a)}update(e,t,r,o){return this.dirty==na||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,r,o),!0)}updateInner(e,t,r,o){this.updateOuterDeco(t),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=So}updateOuterDeco(e){if(Bf(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=$8(this.dom,this.nodeDOM,Kv(this.outerDeco,this.node,t),Kv(e,this.node,t)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function W2(n,e,t,r,o){R8(r,e,n);let i=new yi(void 0,n,e,t,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class Bp extends yi{constructor(e,t,r,o,i,a,s){super(e,t,r,o,i,null,a,s,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,r,o){return this.dirty==na||this.dirty!=So&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=So||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=e,this.dirty=So,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,r){let o=this.node.cut(e,t),i=document.createTextNode(o.text);return new Bp(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=na)}get domAtom(){return!1}isText(e){return this.node.text==e}}class A8 extends Ic{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==So&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class Xj extends yi{constructor(e,t,r,o,i,a,s,l,c,d){super(e,t,r,o,i,a,s,c,d),this.spec=l}update(e,t,r,o){if(this.dirty==na)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,t,r);return i&&this.updateInner(e,t,r,o),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,r,o){this.spec.setSelection?this.spec.setSelection(e,t,r.root):super.setSelection(e,t,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function P8(n,e,t){let r=n.firstChild,o=!1;for(let i=0;i<e.length;i++){let a=e[i],s=a.dom;if(s.parentNode==n){for(;s!=r;)r=j2(r),o=!0;r=r.nextSibling}else o=!0,n.insertBefore(s,r);if(a instanceof As){let l=r?r.previousSibling:n.lastChild;P8(a.contentDOM,a.children,t),r=l?l.nextSibling:n.firstChild}}for(;r;)r=j2(r),o=!0;o&&t.trackWrites==n&&(t.trackWrites=null)}const Nu=function(n){n&&(this.nodeName=n)};Nu.prototype=Object.create(null);const is=[new Nu];function Kv(n,e,t){if(n.length==0)return is;let r=t?is[0]:new Nu,o=[r];for(let i=0;i<n.length;i++){let a=n[i].type.attrs;if(a){a.nodeName&&o.push(r=new Nu(a.nodeName));for(let s in a){let l=a[s];l!=null&&(t&&o.length==1&&o.push(r=new Nu(e.isInline?"span":"div")),s=="class"?r.class=(r.class?r.class+" ":"")+l:s=="style"?r.style=(r.style?r.style+";":"")+l:s!="nodeName"&&(r[s]=l))}}}return o}function $8(n,e,t,r){if(t==is&&r==is)return e;let o=e;for(let i=0;i<r.length;i++){let a=r[i],s=t[i];if(i){let l;s&&s.nodeName==a.nodeName&&o!=n&&(l=o.parentNode)&&l.nodeName.toLowerCase()==a.nodeName||(l=document.createElement(a.nodeName),l.pmIsDeco=!0,l.appendChild(o),s=is[0]),o=l}Qj(o,s||is[0],a)}return o}function Qj(n,e,t){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in t)&&n.removeAttribute(r);for(let r in t)r!="class"&&r!="style"&&r!="nodeName"&&t[r]!=e[r]&&n.setAttribute(r,t[r]);if(e.class!=t.class){let r=e.class?e.class.split(" ").filter(Boolean):[],o=t.class?t.class.split(" ").filter(Boolean):[];for(let i=0;i<r.length;i++)o.indexOf(r[i])==-1&&n.classList.remove(r[i]);for(let i=0;i<o.length;i++)r.indexOf(o[i])==-1&&n.classList.add(o[i]);n.classList.length==0&&n.removeAttribute("class")}if(e.style!=t.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,o;for(;o=r.exec(e.style);)n.style.removeProperty(o[1])}t.style&&(n.style.cssText+=t.style)}}function R8(n,e,t){return $8(n,n,is,Kv(e,t,n.nodeType!=1))}function Bf(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(!n[t].type.eq(e[t].type))return!1;return!0}function j2(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class Zj{constructor(e,t,r){this.lock=t,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=eK(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let r=e;r<t;r++)this.top.children[r].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,r){let o=0,i=this.stack.length>>1,a=Math.min(i,e.length);for(;o<a&&(o==i-1?this.top:this.stack[o+1<<1]).matchesMark(e[o])&&e[o].type.spec.spanning!==!1;)o++;for(;o<i;)this.destroyRest(),this.top.dirty=So,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<e.length;){this.stack.push(this.top,this.index+1);let s=-1;for(let l=this.index;l<Math.min(this.index+3,this.top.children.length);l++){let c=this.top.children[l];if(c.matchesMark(e[i])&&!this.isLocked(c.dom)){s=l;break}}if(s>-1)s>this.index&&(this.changed=!0,this.destroyBetween(this.index,s)),this.top=this.top.children[this.index];else{let l=As.create(this.top,e[i],t,r);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,i++}}findNodeMatch(e,t,r,o){let i=-1,a;if(o>=this.preMatch.index&&(a=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&a.matchesNode(e,t,r))i=this.top.children.indexOf(a,this.index);else for(let s=this.index,l=Math.min(this.top.children.length,s+5);s<l;s++){let c=this.top.children[s];if(c.matchesNode(e,t,r)&&!this.preMatch.matched.has(c)){i=s;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,t,r,o,i){let a=this.top.children[o];return a.dirty==na&&a.dom==a.contentDOM&&(a.dirty=as),a.update(e,t,r,i)?(this.destroyBetween(this.index,o),this.index++,!0):!1}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let o=this.index;o<this.top.children.length;o++)if(this.top.children[o]==r)return o}return-1}e=t}}updateNextNode(e,t,r,o,i,a){for(let s=this.index;s<this.top.children.length;s++){let l=this.top.children[s];if(l instanceof yi){let c=this.preMatch.matched.get(l);if(c!=null&&c!=i)return!1;let d=l.dom,f,m=this.isLocked(d)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=na&&Bf(t,l.outerDeco));if(!m&&l.update(e,t,r,o))return this.destroyBetween(this.index,s),l.dom!=d&&(this.changed=!0),this.index++,!0;if(!m&&(f=this.recreateWrapper(l,e,t,r,o,a)))return this.destroyBetween(this.index,s),this.top.children[this.index]=f,f.contentDOM&&(f.dirty=as,f.updateChildren(o,a+1),f.dirty=So),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,r,o,i,a){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!Bf(r,e.outerDeco)||!o.eq(e.innerDeco))return null;let s=yi.create(this.top,t,r,o,i,a);if(s.contentDOM){s.children=e.children,e.children=[];for(let l of s.children)l.parent=s}return e.destroy(),s}addNode(e,t,r,o,i){let a=yi.create(this.top,e,t,r,o,i);a.contentDOM&&a.updateChildren(o,i+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(e,t,r){let o=this.index<this.top.children.length?this.top.children[this.index]:null;if(o&&o.matchesWidget(e)&&(e==o.widget||!o.widget.type.toDOM.parentNode))this.index++;else{let i=new O8(this.top,e,t,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof As;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof Bp)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Er||gr)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let o=new A8(this.top,[],r,null);t!=this.top?t.children.push(o):t.children.splice(this.index++,0,o),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function eK(n,e){let t=e,r=t.children.length,o=n.childCount,i=new Map,a=[];e:for(;o>0;){let s;for(;;)if(r){let c=t.children[r-1];if(c instanceof As)t=c,r=c.children.length;else{s=c,r--;break}}else{if(t==e)break e;r=t.parent.children.indexOf(t),t=t.parent}let l=s.node;if(l){if(l!=n.child(o-1))break;--o,i.set(s,o),a.push(s)}}return{index:o,matched:i,matches:a.reverse()}}function tK(n,e){return n.type.side-e.type.side}function nK(n,e,t,r){let o=e.locals(n),i=0;if(o.length==0){for(let c=0;c<n.childCount;c++){let d=n.child(c);r(d,o,e.forChild(i,d),c),i+=d.nodeSize}return}let a=0,s=[],l=null;for(let c=0;;){let d,f;for(;a<o.length&&o[a].to==i;){let b=o[a++];b.widget&&(d?(f||(f=[d])).push(b):d=b)}if(d)if(f){f.sort(tK);for(let b=0;b<f.length;b++)t(f[b],c,!!l)}else t(d,c,!!l);let m,g;if(l)g=-1,m=l,l=null;else if(c<n.childCount)g=c,m=n.child(c++);else break;for(let b=0;b<s.length;b++)s[b].to<=i&&s.splice(b--,1);for(;a<o.length&&o[a].from<=i&&o[a].to>i;)s.push(o[a++]);let v=i+m.nodeSize;if(m.isText){let b=v;a<o.length&&o[a].from<b&&(b=o[a].from);for(let _=0;_<s.length;_++)s[_].to<b&&(b=s[_].to);b<v&&(l=m.cut(b-i),m=m.cut(0,b-i),v=b,g=-1)}else for(;a<o.length&&o[a].to<v;)a++;let y=m.isInline&&!m.isLeaf?s.filter(b=>!b.inline):s.slice();r(m,y,e.forChild(i,m),g),i=v}}function rK(n){if(n.nodeName=="UL"||n.nodeName=="OL"){let e=n.style.cssText;n.style.cssText=e+"; list-style: square !important",window.getComputedStyle(n).listStyle,n.style.cssText=e}}function oK(n,e,t,r){for(let o=0,i=0;o<n.childCount&&i<=r;){let a=n.child(o++),s=i;if(i+=a.nodeSize,!a.isText)continue;let l=a.text;for(;o<n.childCount;){let c=n.child(o++);if(i+=c.nodeSize,!c.isText)break;l+=c.text}if(i>=t){if(i>=r&&l.slice(r-e.length-s,r-s)==e)return r-e.length;let c=s<r?l.lastIndexOf(e,r-s-1):-1;if(c>=0&&c+e.length+s>=t)return s+c;if(t==r&&l.length>=r+e.length-s&&l.slice(r-s,r-s+e.length)==e)return r}}return-1}function Yv(n,e,t,r,o){let i=[];for(let a=0,s=0;a<n.length;a++){let l=n[a],c=s,d=s+=l.size;c>=t||d<=e?i.push(l):(c<e&&i.push(l.slice(0,e-c,r)),o&&(i.push(o),o=void 0),d>t&&i.push(l.slice(t-c,l.size,r)))}return i}function jg(n,e=null){let t=n.domSelectionRange(),r=n.state.doc;if(!t.focusNode)return null;let o=n.docView.nearestDesc(t.focusNode),i=o&&o.size==0,a=n.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(a<0)return null;let s=r.resolve(a),l,c;if(Lp(t)){for(l=a;o&&!o.node;)o=o.parent;let f=o.node;if(o&&f.isAtom&&Ot.isSelectable(f)&&o.parent&&!(f.isInline&&Oj(t.focusNode,t.focusOffset,o.dom))){let m=o.posBefore;c=new Ot(a==m?s:r.resolve(m))}}else{if(t instanceof n.dom.ownerDocument.defaultView.Selection&&t.rangeCount>1){let f=a,m=a;for(let g=0;g<t.rangeCount;g++){let v=t.getRangeAt(g);f=Math.min(f,n.docView.posFromDOM(v.startContainer,v.startOffset,1)),m=Math.max(m,n.docView.posFromDOM(v.endContainer,v.endOffset,-1))}if(f<0)return null;[l,a]=m==n.state.selection.anchor?[m,f]:[f,m],s=r.resolve(a)}else l=n.docView.posFromDOM(t.anchorNode,t.anchorOffset,1);if(l<0)return null}let d=r.resolve(l);if(!c){let f=e=="pointer"||n.state.selection.head<s.pos&&!i?1:-1;c=Kg(n,d,s,f)}return c}function D8(n){return n.editable?n.hasFocus():F8(n)&&document.activeElement&&document.activeElement.contains(n.dom)}function Ra(n,e=!1){let t=n.state.selection;if(N8(n,t),!!D8(n)){if(!e&&n.input.mouseDown&&n.input.mouseDown.allowDefault&&gr){let r=n.domSelectionRange(),o=n.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&Os(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){n.input.mouseDown.delayedSelectionSync=!0,n.domObserver.setCurSelection();return}}if(n.domObserver.disconnectSelection(),n.cursorWrapper)iK(n);else{let{anchor:r,head:o}=t,i,a;K2&&!(t instanceof qt)&&(t.$from.parent.inlineContent||(i=Y2(n,t.from)),!t.empty&&!t.$from.parent.inlineContent&&(a=Y2(n,t.to))),n.docView.setSelection(r,o,n,e),K2&&(i&&q2(i),a&&q2(a)),t.visible?n.dom.classList.remove("ProseMirror-hideselection"):(n.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&aK(n))}n.domObserver.setCurSelection(),n.domObserver.connectSelection()}}const K2=Er||gr&&x8<63;function Y2(n,e){let{node:t,offset:r}=n.docView.domFromPos(e,0),o=r<t.childNodes.length?t.childNodes[r]:null,i=r?t.childNodes[r-1]:null;if(Er&&o&&o.contentEditable=="false")return Um(o);if((!o||o.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(o)return Um(o);if(i)return Um(i)}}function Um(n){return n.contentEditable="true",Er&&n.draggable&&(n.draggable=!1,n.wasDraggable=!0),n}function q2(n){n.contentEditable="false",n.wasDraggable&&(n.draggable=!0,n.wasDraggable=null)}function aK(n){let e=n.dom.ownerDocument;e.removeEventListener("selectionchange",n.input.hideSelectionGuard);let t=n.domSelectionRange(),r=t.anchorNode,o=t.anchorOffset;e.addEventListener("selectionchange",n.input.hideSelectionGuard=()=>{(t.anchorNode!=r||t.anchorOffset!=o)&&(e.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!D8(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}function iK(n){let e=n.domSelection(),t=document.createRange();if(!e)return;let r=n.cursorWrapper.dom,o=r.nodeName=="IMG";o?t.setStart(r.parentNode,ur(r)+1):t.setStart(r,0),t.collapse(!0),e.removeAllRanges(),e.addRange(t),!o&&!n.state.selection.visible&&Lr&&gi<=11&&(r.disabled=!0,r.disabled=!1)}function N8(n,e){if(e instanceof Ot){let t=n.docView.descAt(e.from);t!=n.lastSelectedViewDesc&&(G2(n),t&&t.selectNode(),n.lastSelectedViewDesc=t)}else G2(n)}function G2(n){n.lastSelectedViewDesc&&(n.lastSelectedViewDesc.parent&&n.lastSelectedViewDesc.deselectNode(),n.lastSelectedViewDesc=void 0)}function Kg(n,e,t,r){return n.someProp("createSelectionBetween",o=>o(n,e,t))||qt.between(e,t,r)}function J2(n){return n.editable&&!n.hasFocus()?!1:F8(n)}function F8(n){let e=n.domSelectionRange();if(!e.anchorNode)return!1;try{return n.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(n.editable||n.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function sK(n){let e=n.docView.domFromPos(n.state.selection.anchor,0),t=n.domSelectionRange();return Os(e.node,e.offset,t.anchorNode,t.anchorOffset)}function qv(n,e){let{$anchor:t,$head:r}=n.selection,o=e>0?t.max(r):t.min(r),i=o.parent.inlineContent?o.depth?n.doc.resolve(e>0?o.after():o.before()):null:o;return i&&nn.findFrom(i,e)}function ni(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function X2(n,e,t){let r=n.state.selection;if(r instanceof qt)if(t.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let a=n.state.doc.resolve(o.pos+i.nodeSize*(e<0?-1:1));return ni(n,new qt(r.$anchor,a))}else if(r.empty){if(n.endOfTextblock(e>0?"forward":"backward")){let o=qv(n.state,e);return o&&o instanceof Ot?ni(n,o):!1}else if(!(mo&&t.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter,a;if(!i||i.isText)return!1;let s=e<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(a=n.docView.descAt(s))&&!a.contentDOM?Ot.isSelectable(i)?ni(n,new Ot(e<0?n.state.doc.resolve(o.pos-i.nodeSize):o)):Cc?ni(n,new qt(n.state.doc.resolve(e<0?s:s+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof Ot&&r.node.isInline)return ni(n,new qt(e>0?r.$to:r.$from));{let o=qv(n.state,e);return o?ni(n,o):!1}}}function Vf(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Fu(n,e){let t=n.pmViewDesc;return t&&t.size==0&&(e<0||n.nextSibling||n.nodeName!="BR")}function hl(n,e){return e<0?lK(n):uK(n)}function lK(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let o,i,a=!1;for(Bo&&t.nodeType==1&&r<Vf(t)&&Fu(t.childNodes[r],-1)&&(a=!0);;)if(r>0){if(t.nodeType!=1)break;{let s=t.childNodes[r-1];if(Fu(s,-1))o=t,i=--r;else if(s.nodeType==3)t=s,r=t.nodeValue.length;else break}}else{if(L8(t))break;{let s=t.previousSibling;for(;s&&Fu(s,-1);)o=t.parentNode,i=ur(s),s=s.previousSibling;if(s)t=s,r=Vf(t);else{if(t=t.parentNode,t==n.dom)break;r=0}}}a?Gv(n,t,r):o&&Gv(n,o,i)}function uK(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let o=Vf(t),i,a;for(;;)if(r<o){if(t.nodeType!=1)break;let s=t.childNodes[r];if(Fu(s,1))i=t,a=++r;else break}else{if(L8(t))break;{let s=t.nextSibling;for(;s&&Fu(s,1);)i=s.parentNode,a=ur(s)+1,s=s.nextSibling;if(s)t=s,r=0,o=Vf(t);else{if(t=t.parentNode,t==n.dom)break;r=o=0}}}i&&Gv(n,i,a)}function L8(n){let e=n.pmViewDesc;return e&&e.node&&e.node.isBlock}function cK(n,e){for(;n&&e==n.childNodes.length&&!kc(n);)e=ur(n)+1,n=n.parentNode;for(;n&&e<n.childNodes.length;){let t=n.childNodes[e];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;n=t,e=0}}function dK(n,e){for(;n&&!e&&!kc(n);)e=ur(n),n=n.parentNode;for(;n&&e;){let t=n.childNodes[e-1];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;n=t,e=n.childNodes.length}}function Gv(n,e,t){if(e.nodeType!=3){let i,a;(a=cK(e,t))?(e=a,t=0):(i=dK(e,t))&&(e=i,t=i.nodeValue.length)}let r=n.domSelection();if(!r)return;if(Lp(r)){let i=document.createRange();i.setEnd(e,t),i.setStart(e,t),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(e,t);n.domObserver.setCurSelection();let{state:o}=n;setTimeout(()=>{n.state==o&&Ra(n)},50)}function Q2(n,e){let t=n.state.doc.resolve(e);if(!(gr||$j)&&t.parent.inlineContent){let o=n.coordsAtPos(e);if(e>t.start()){let i=n.coordsAtPos(e-1),a=(i.top+i.bottom)/2;if(a>o.top&&a<o.bottom&&Math.abs(i.left-o.left)>1)return i.left<o.left?"ltr":"rtl"}if(e<t.end()){let i=n.coordsAtPos(e+1),a=(i.top+i.bottom)/2;if(a>o.top&&a<o.bottom&&Math.abs(i.left-o.left)>1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(n.dom).direction=="rtl"?"rtl":"ltr"}function Z2(n,e,t){let r=n.state.selection;if(r instanceof qt&&!r.empty||t.indexOf("s")>-1||mo&&t.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){let a=qv(n.state,e);if(a&&a instanceof Ot)return ni(n,a)}if(!o.parent.inlineContent){let a=e<0?o:i,s=r instanceof eo?nn.near(a,e):nn.findFrom(a,e);return s?ni(n,s):!1}return!1}function e3(n,e){if(!(n.state.selection instanceof qt))return!0;let{$head:t,$anchor:r,empty:o}=n.state.selection;if(!t.sameParent(r))return!0;if(!o)return!1;if(n.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(i&&!i.isText){let a=n.state.tr;return e<0?a.delete(t.pos-i.nodeSize,t.pos):a.delete(t.pos,t.pos+i.nodeSize),n.dispatch(a),!0}return!1}function t3(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function fK(n){if(!Er||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;t3(n,r,"true"),setTimeout(()=>t3(n,r,"false"),20)}return!1}function pK(n){let e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}function hK(n,e){let t=e.keyCode,r=pK(e);if(t==8||mo&&t==72&&r=="c")return e3(n,-1)||hl(n,-1);if(t==46&&!e.shiftKey||mo&&t==68&&r=="c")return e3(n,1)||hl(n,1);if(t==13||t==27)return!0;if(t==37||mo&&t==66&&r=="c"){let o=t==37?Q2(n,n.state.selection.from)=="ltr"?-1:1:-1;return X2(n,o,r)||hl(n,o)}else if(t==39||mo&&t==70&&r=="c"){let o=t==39?Q2(n,n.state.selection.from)=="ltr"?1:-1:1;return X2(n,o,r)||hl(n,o)}else{if(t==38||mo&&t==80&&r=="c")return Z2(n,-1,r)||hl(n,-1);if(t==40||mo&&t==78&&r=="c")return fK(n)||Z2(n,1,r)||hl(n,1);if(r==(mo?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function Yg(n,e){n.someProp("transformCopied",g=>{e=g(e,n)});let t=[],{content:r,openStart:o,openEnd:i}=e;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let g=r.firstChild;t.push(g.type.name,g.attrs!=g.type.defaultAttrs?g.attrs:null),r=g.content}let a=n.someProp("clipboardSerializer")||Ks.fromSchema(n.state.schema),s=W8(),l=s.createElement("div");l.appendChild(a.serializeFragment(r,{document:s}));let c=l.firstChild,d,f=0;for(;c&&c.nodeType==1&&(d=U8[c.nodeName.toLowerCase()]);){for(let g=d.length-1;g>=0;g--){let v=s.createElement(d[g]);for(;l.firstChild;)v.appendChild(l.firstChild);l.appendChild(v),f++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${o} ${i}${f?` -${f}`:""} ${JSON.stringify(t)}`);let m=n.someProp("clipboardTextSerializer",g=>g(e,n))||e.content.textBetween(0,e.content.size,`

`);return{dom:l,text:m,slice:e}}function B8(n,e,t,r,o){let i=o.parent.type.spec.code,a,s;if(!t&&!e)return null;let l=e&&(r||i||!t);if(l){if(n.someProp("transformPastedText",m=>{e=m(e,i||r,n)}),i)return e?new Ze(Ve.from(n.state.schema.text(e.replace(/\r\n?/g,`
`))),0,0):Ze.empty;let f=n.someProp("clipboardTextParser",m=>m(e,o,r,n));if(f)s=f;else{let m=o.marks(),{schema:g}=n.state,v=Ks.fromSchema(g);a=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(y=>{let b=a.appendChild(document.createElement("p"));y&&b.appendChild(v.serializeNode(g.text(y,m)))})}}else n.someProp("transformPastedHTML",f=>{t=f(t,n)}),a=yK(t),Cc&&bK(a);let c=a&&a.querySelector("[data-pm-slice]"),d=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let f=+d[3];f>0;f--){let m=a.firstChild;for(;m&&m.nodeType!=1;)m=m.nextSibling;if(!m)break;a=m}if(s||(s=(n.someProp("clipboardParser")||n.someProp("domParser")||vi.fromSchema(n.state.schema)).parseSlice(a,{preserveWhitespace:!!(l||d),context:o,ruleFromNode(m){return m.nodeName=="BR"&&!m.nextSibling&&m.parentNode&&!mK.test(m.parentNode.nodeName)?{ignore:!0}:null}})),d)s=SK(n3(s,+d[1],+d[2]),d[4]);else if(s=Ze.maxOpen(vK(s.content,o),!0),s.openStart||s.openEnd){let f=0,m=0;for(let g=s.content.firstChild;f<s.openStart&&!g.type.spec.isolating;f++,g=g.firstChild);for(let g=s.content.lastChild;m<s.openEnd&&!g.type.spec.isolating;m++,g=g.lastChild);s=n3(s,f,m)}return n.someProp("transformPasted",f=>{s=f(s,n)}),s}const mK=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function vK(n,e){if(n.childCount<2)return n;for(let t=e.depth;t>=0;t--){let o=e.node(t).contentMatchAt(e.index(t)),i,a=[];if(n.forEach(s=>{if(!a)return;let l=o.findWrapping(s.type),c;if(!l)return a=null;if(c=a.length&&i.length&&z8(l,i,s,a[a.length-1],0))a[a.length-1]=c;else{a.length&&(a[a.length-1]=H8(a[a.length-1],i.length));let d=V8(s,l);a.push(d),o=o.matchType(d.type),i=l}}),a)return Ve.from(a)}return n}function V8(n,e,t=0){for(let r=e.length-1;r>=t;r--)n=e[r].create(null,Ve.from(n));return n}function z8(n,e,t,r,o){if(o<n.length&&o<e.length&&n[o]==e[o]){let i=z8(n,e,t,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==n.length-1?t.type:n[o+1]))return r.copy(r.content.append(Ve.from(V8(t,n,o+1))))}}function H8(n,e){if(e==0)return n;let t=n.content.replaceChild(n.childCount-1,H8(n.lastChild,e-1)),r=n.contentMatchAt(n.childCount).fillBefore(Ve.empty,!0);return n.copy(t.append(r))}function Jv(n,e,t,r,o,i){let a=e<0?n.firstChild:n.lastChild,s=a.content;return n.childCount>1&&(i=0),o<r-1&&(s=Jv(s,e,t,r,o+1,i)),o>=t&&(s=e<0?a.contentMatchAt(0).fillBefore(s,i<=o).append(s):s.append(a.contentMatchAt(a.childCount).fillBefore(Ve.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,a.copy(s))}function n3(n,e,t){return e<n.openStart&&(n=new Ze(Jv(n.content,-1,e,n.openStart,0,n.openEnd),e,n.openEnd)),t<n.openEnd&&(n=new Ze(Jv(n.content,1,t,n.openEnd,0,0),n.openStart,t)),n}const U8={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let r3=null;function W8(){return r3||(r3=document.implementation.createHTMLDocument("title"))}let Wm=null;function gK(n){let e=window.trustedTypes;return e?(Wm||(Wm=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:t=>t})),Wm.createHTML(n)):n}function yK(n){let e=/^(\s*<meta [^>]*>)*/.exec(n);e&&(n=n.slice(e[0].length));let t=W8().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(n),o;if((o=r&&U8[r[1].toLowerCase()])&&(n=o.map(i=>"<"+i+">").join("")+n+o.map(i=>"</"+i+">").reverse().join("")),t.innerHTML=gK(n),o)for(let i=0;i<o.length;i++)t=t.querySelector(o[i])||t;return t}function bK(n){let e=n.querySelectorAll(gr?"span:not([class]):not([style])":"span.Apple-converted-space");for(let t=0;t<e.length;t++){let r=e[t];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(n.ownerDocument.createTextNode(" "),r)}}function SK(n,e){if(!n.size)return n;let t=n.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return n}let{content:o,openStart:i,openEnd:a}=n;for(let s=r.length-2;s>=0;s-=2){let l=t.nodes[r[s]];if(!l||l.hasRequiredAttrs())break;o=Ve.from(l.create(r[s+1],o)),i++,a++}return new Ze(o,i,a)}const Tr={},Mr={},_K={touchstart:!0,touchmove:!0};class wK{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function xK(n){for(let e in Tr){let t=Tr[e];n.dom.addEventListener(e,n.input.eventHandlers[e]=r=>{CK(n,r)&&!qg(n,r)&&(n.editable||!(r.type in Mr))&&t(n,r)},_K[e]?{passive:!0}:void 0)}Er&&n.dom.addEventListener("input",()=>null),Xv(n)}function pi(n,e){n.input.lastSelectionOrigin=e,n.input.lastSelectionTime=Date.now()}function kK(n){n.domObserver.stop();for(let e in n.input.eventHandlers)n.dom.removeEventListener(e,n.input.eventHandlers[e]);clearTimeout(n.input.composingTimeout),clearTimeout(n.input.lastIOSEnterFallbackTimeout)}function Xv(n){n.someProp("handleDOMEvents",e=>{for(let t in e)n.input.eventHandlers[t]||n.dom.addEventListener(t,n.input.eventHandlers[t]=r=>qg(n,r))})}function qg(n,e){return n.someProp("handleDOMEvents",t=>{let r=t[e.type];return r?r(n,e)||e.defaultPrevented:!1})}function CK(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=n.dom;t=t.parentNode)if(!t||t.nodeType==11||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function IK(n,e){!qg(n,e)&&Tr[e.type]&&(n.editable||!(e.type in Mr))&&Tr[e.type](n,e)}Mr.keydown=(n,e)=>{let t=e;if(n.input.shiftKey=t.keyCode==16||t.shiftKey,!K8(n,t)&&(n.input.lastKeyCode=t.keyCode,n.input.lastKeyCodeTime=Date.now(),!(Ia&&gr&&t.keyCode==13)))if(t.keyCode!=229&&n.domObserver.forceFlush(),Dl&&t.keyCode==13&&!t.ctrlKey&&!t.altKey&&!t.metaKey){let r=Date.now();n.input.lastIOSEnter=r,n.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{n.input.lastIOSEnter==r&&(n.someProp("handleKeyDown",o=>o(n,Zi(13,"Enter"))),n.input.lastIOSEnter=0)},200)}else n.someProp("handleKeyDown",r=>r(n,t))||hK(n,t)?t.preventDefault():pi(n,"key")};Mr.keyup=(n,e)=>{e.keyCode==16&&(n.input.shiftKey=!1)};Mr.keypress=(n,e)=>{let t=e;if(K8(n,t)||!t.charCode||t.ctrlKey&&!t.altKey||mo&&t.metaKey)return;if(n.someProp("handleKeyPress",o=>o(n,t))){t.preventDefault();return}let r=n.state.selection;if(!(r instanceof qt)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(t.charCode);!/[\r\n]/.test(o)&&!n.someProp("handleTextInput",i=>i(n,r.$from.pos,r.$to.pos,o))&&n.dispatch(n.state.tr.insertText(o).scrollIntoView()),t.preventDefault()}};function Vp(n){return{left:n.clientX,top:n.clientY}}function EK(n,e){let t=e.x-n.clientX,r=e.y-n.clientY;return t*t+r*r<100}function Gg(n,e,t,r,o){if(r==-1)return!1;let i=n.state.doc.resolve(r);for(let a=i.depth+1;a>0;a--)if(n.someProp(e,s=>a>i.depth?s(n,t,i.nodeAfter,i.before(a),o,!0):s(n,t,i.node(a),i.before(a),o,!1)))return!0;return!1}function El(n,e,t){if(n.focused||n.focus(),n.state.selection.eq(e))return;let r=n.state.tr.setSelection(e);r.setMeta("pointer",!0),n.dispatch(r)}function TK(n,e){if(e==-1)return!1;let t=n.state.doc.resolve(e),r=t.nodeAfter;return r&&r.isAtom&&Ot.isSelectable(r)?(El(n,new Ot(t)),!0):!1}function MK(n,e){if(e==-1)return!1;let t=n.state.selection,r,o;t instanceof Ot&&(r=t.node);let i=n.state.doc.resolve(e);for(let a=i.depth+1;a>0;a--){let s=a>i.depth?i.nodeAfter:i.node(a);if(Ot.isSelectable(s)){r&&t.$from.depth>0&&a>=t.$from.depth&&i.before(t.$from.depth+1)==t.$from.pos?o=i.before(t.$from.depth):o=i.before(a);break}}return o!=null?(El(n,Ot.create(n.state.doc,o)),!0):!1}function OK(n,e,t,r,o){return Gg(n,"handleClickOn",e,t,r)||n.someProp("handleClick",i=>i(n,e,r))||(o?MK(n,t):TK(n,t))}function AK(n,e,t,r){return Gg(n,"handleDoubleClickOn",e,t,r)||n.someProp("handleDoubleClick",o=>o(n,e,r))}function PK(n,e,t,r){return Gg(n,"handleTripleClickOn",e,t,r)||n.someProp("handleTripleClick",o=>o(n,e,r))||$K(n,t,r)}function $K(n,e,t){if(t.button!=0)return!1;let r=n.state.doc;if(e==-1)return r.inlineContent?(El(n,qt.create(r,0,r.content.size)),!0):!1;let o=r.resolve(e);for(let i=o.depth+1;i>0;i--){let a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)El(n,qt.create(r,s+1,s+1+a.content.size));else if(Ot.isSelectable(a))El(n,Ot.create(r,s));else continue;return!0}}function Jg(n){return zf(n)}const j8=mo?"metaKey":"ctrlKey";Tr.mousedown=(n,e)=>{let t=e;n.input.shiftKey=t.shiftKey;let r=Jg(n),o=Date.now(),i="singleClick";o-n.input.lastClick.time<500&&EK(t,n.input.lastClick)&&!t[j8]&&(n.input.lastClick.type=="singleClick"?i="doubleClick":n.input.lastClick.type=="doubleClick"&&(i="tripleClick")),n.input.lastClick={time:o,x:t.clientX,y:t.clientY,type:i};let a=n.posAtCoords(Vp(t));a&&(i=="singleClick"?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new RK(n,a,t,!!r)):(i=="doubleClick"?AK:PK)(n,a.pos,a.inside,t)?t.preventDefault():pi(n,"pointer"))};class RK{constructor(e,t,r,o){this.view=e,this.pos=t,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[j8],this.allowDefault=r.shiftKey;let i,a;if(t.inside>-1)i=e.state.doc.nodeAt(t.inside),a=t.inside;else{let d=e.state.doc.resolve(t.pos);i=d.parent,a=d.depth?d.before():0}const s=o?null:r.target,l=s?e.docView.nearestDesc(s,!0):null;this.target=l&&l.dom.nodeType==1?l.dom:null;let{selection:c}=e.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof Ot&&c.from<=a&&c.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Bo&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),pi(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Ra(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Vp(e))),this.updateAllowDefault(e),this.allowDefault||!t?pi(this.view,"pointer"):OK(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Er&&this.mightDrag&&!this.mightDrag.node.isAtom||gr&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(El(this.view,nn.near(this.view.state.doc.resolve(t.pos))),e.preventDefault()):pi(this.view,"pointer")}move(e){this.updateAllowDefault(e),pi(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}Tr.touchstart=n=>{n.input.lastTouch=Date.now(),Jg(n),pi(n,"pointer")};Tr.touchmove=n=>{n.input.lastTouch=Date.now(),pi(n,"pointer")};Tr.contextmenu=n=>Jg(n);function K8(n,e){return n.composing?!0:Er&&Math.abs(e.timeStamp-n.input.compositionEndedAt)<500?(n.input.compositionEndedAt=-2e8,!0):!1}const DK=Ia?5e3:-1;Mr.compositionstart=Mr.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:e}=n,t=e.selection.$to;if(e.selection instanceof qt&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))n.markCursor=n.state.storedMarks||t.marks(),zf(n,!0),n.markCursor=null;else if(zf(n,!e.selection.empty),Bo&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let r=n.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let a=i<0?o.lastChild:o.childNodes[i-1];if(!a)break;if(a.nodeType==3){let s=n.domSelection();s&&s.collapse(a,a.nodeValue.length);break}else o=a,i=-1}}n.input.composing=!0}Y8(n,DK)};Mr.compositionend=(n,e)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=e.timeStamp,n.input.compositionPendingChanges=n.domObserver.pendingRecords().length?n.input.compositionID:0,n.input.compositionNode=null,n.input.compositionPendingChanges&&Promise.resolve().then(()=>n.domObserver.flush()),n.input.compositionID++,Y8(n,20))};function Y8(n,e){clearTimeout(n.input.composingTimeout),e>-1&&(n.input.composingTimeout=setTimeout(()=>zf(n),e))}function q8(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=FK());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function NK(n){let e=n.domSelectionRange();if(!e.focusNode)return null;let t=Tj(e.focusNode,e.focusOffset),r=Mj(e.focusNode,e.focusOffset);if(t&&r&&t!=r){let o=r.pmViewDesc,i=n.domObserver.lastChangedTextNode;if(t==i||r==i)return i;if(!o||!o.isText(r.nodeValue))return r;if(n.input.compositionNode==r){let a=t.pmViewDesc;if(!(!a||!a.isText(t.nodeValue)))return r}}return t||r}function FK(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}function zf(n,e=!1){if(!(Ia&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),q8(n),e||n.docView&&n.docView.dirty){let t=jg(n);return t&&!t.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(t)):(n.markCursor||e)&&!n.state.selection.empty?n.dispatch(n.state.tr.deleteSelection()):n.updateState(n.state),!0}return!1}}function LK(n,e){if(!n.dom.parentNode)return;let t=n.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),n.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),n.focus()},50)}const nc=Lr&&gi<15||Dl&&Rj<604;Tr.copy=Mr.cut=(n,e)=>{let t=e,r=n.state.selection,o=t.type=="cut";if(r.empty)return;let i=nc?null:t.clipboardData,a=r.content(),{dom:s,text:l}=Yg(n,a);i?(t.preventDefault(),i.clearData(),i.setData("text/html",s.innerHTML),i.setData("text/plain",l)):LK(n,s),o&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function BK(n){return n.openStart==0&&n.openEnd==0&&n.content.childCount==1?n.content.firstChild:null}function VK(n,e){if(!n.dom.parentNode)return;let t=n.input.shiftKey||n.state.selection.$from.parent.type.spec.code,r=n.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=n.input.shiftKey&&n.input.lastKeyCode!=45;setTimeout(()=>{n.focus(),r.parentNode&&r.parentNode.removeChild(r),t?rc(n,r.value,null,o,e):rc(n,r.textContent,r.innerHTML,o,e)},50)}function rc(n,e,t,r,o){let i=B8(n,e,t,r,n.state.selection.$from);if(n.someProp("handlePaste",l=>l(n,o,i||Ze.empty)))return!0;if(!i)return!1;let a=BK(i),s=a?n.state.tr.replaceSelectionWith(a,r):n.state.tr.replaceSelection(i);return n.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function G8(n){let e=n.getData("text/plain")||n.getData("Text");if(e)return e;let t=n.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}Mr.paste=(n,e)=>{let t=e;if(n.composing&&!Ia)return;let r=nc?null:t.clipboardData,o=n.input.shiftKey&&n.input.lastKeyCode!=45;r&&rc(n,G8(r),r.getData("text/html"),o,t)?t.preventDefault():VK(n,t)};class J8{constructor(e,t,r){this.slice=e,this.move=t,this.node=r}}const zK=mo?"altKey":"ctrlKey";function X8(n,e){let t=n.someProp("dragCopies",r=>!r(e));return t??!e[zK]}Tr.dragstart=(n,e)=>{let t=e,r=n.input.mouseDown;if(r&&r.done(),!t.dataTransfer)return;let o=n.state.selection,i=o.empty?null:n.posAtCoords(Vp(t)),a;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof Ot?o.to-1:o.to))){if(r&&r.mightDrag)a=Ot.create(n.state.doc,r.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let f=n.docView.nearestDesc(t.target,!0);f&&f.node.type.spec.draggable&&f!=n.docView&&(a=Ot.create(n.state.doc,f.posBefore))}}let s=(a||n.state.selection).content(),{dom:l,text:c,slice:d}=Yg(n,s);(!t.dataTransfer.files.length||!gr||x8>120)&&t.dataTransfer.clearData(),t.dataTransfer.setData(nc?"Text":"text/html",l.innerHTML),t.dataTransfer.effectAllowed="copyMove",nc||t.dataTransfer.setData("text/plain",c),n.dragging=new J8(d,X8(n,t),a)};Tr.dragend=n=>{let e=n.dragging;window.setTimeout(()=>{n.dragging==e&&(n.dragging=null)},50)};Mr.dragover=Mr.dragenter=(n,e)=>e.preventDefault();Mr.drop=(n,e)=>{let t=e,r=n.dragging;if(n.dragging=null,!t.dataTransfer)return;let o=n.posAtCoords(Vp(t));if(!o)return;let i=n.state.doc.resolve(o.pos),a=r&&r.slice;a?n.someProp("transformPasted",v=>{a=v(a,n)}):a=B8(n,G8(t.dataTransfer),nc?null:t.dataTransfer.getData("text/html"),!1,i);let s=!!(r&&X8(n,t));if(n.someProp("handleDrop",v=>v(n,t,a||Ze.empty,s))){t.preventDefault();return}if(!a)return;t.preventDefault();let l=a?mj(n.state.doc,i.pos,a):i.pos;l==null&&(l=i.pos);let c=n.state.tr;if(s){let{node:v}=r;v?v.replace(c):c.deleteSelection()}let d=c.mapping.map(l),f=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,m=c.doc;if(f?c.replaceRangeWith(d,d,a.content.firstChild):c.replaceRange(d,d,a),c.doc.eq(m))return;let g=c.doc.resolve(d);if(f&&Ot.isSelectable(a.content.firstChild)&&g.nodeAfter&&g.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new Ot(g));else{let v=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((y,b,_,w)=>v=w),c.setSelection(Kg(n,g,c.doc.resolve(v)))}n.focus(),n.dispatch(c.setMeta("uiEvent","drop"))};Tr.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&Ra(n)},20))};Tr.blur=(n,e)=>{let t=e;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),t.relatedTarget&&n.dom.contains(t.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)};Tr.beforeinput=(n,e)=>{if(gr&&Ia&&e.inputType=="deleteContentBackward"){n.domObserver.flushSoon();let{domChangeCount:r}=n.input;setTimeout(()=>{if(n.input.domChangeCount!=r||(n.dom.blur(),n.focus(),n.someProp("handleKeyDown",i=>i(n,Zi(8,"Backspace")))))return;let{$cursor:o}=n.state.selection;o&&o.pos>0&&n.dispatch(n.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let n in Mr)Tr[n]=Mr[n];function oc(n,e){if(n==e)return!0;for(let t in n)if(n[t]!==e[t])return!1;for(let t in e)if(!(t in n))return!1;return!0}class Hf{constructor(e,t){this.toDOM=e,this.spec=t||vs,this.side=this.spec.side||0}map(e,t,r,o){let{pos:i,deleted:a}=e.mapResult(t.from+o,this.side<0?-1:1);return a?null:new Do(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof Hf&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&oc(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class bi{constructor(e,t){this.attrs=e,this.spec=t||vs}map(e,t,r,o){let i=e.map(t.from+o,this.spec.inclusiveStart?-1:1)-r,a=e.map(t.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=a?null:new Do(i,a,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof bi&&oc(this.attrs,e.attrs)&&oc(this.spec,e.spec)}static is(e){return e.type instanceof bi}destroy(){}}class Xg{constructor(e,t){this.attrs=e,this.spec=t||vs}map(e,t,r,o){let i=e.mapResult(t.from+o,1);if(i.deleted)return null;let a=e.mapResult(t.to+o,-1);return a.deleted||a.pos<=i.pos?null:new Do(i.pos-r,a.pos-r,this)}valid(e,t){let{index:r,offset:o}=e.content.findIndex(t.from),i;return o==t.from&&!(i=e.child(r)).isText&&o+i.nodeSize==t.to}eq(e){return this==e||e instanceof Xg&&oc(this.attrs,e.attrs)&&oc(this.spec,e.spec)}destroy(){}}class Do{constructor(e,t,r){this.from=e,this.to=t,this.type=r}copy(e,t){return new Do(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,r){return this.type.map(e,this,t,r)}static widget(e,t,r){return new Do(e,e,new Hf(t,r))}static inline(e,t,r,o){return new Do(e,t,new bi(r,o))}static node(e,t,r,o){return new Do(e,t,new Xg(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof bi}get widget(){return this.type instanceof Hf}}const yl=[],vs={};class Qn{constructor(e,t){this.local=e.length?e:yl,this.children=t.length?t:yl}static create(e,t){return t.length?Uf(t,e,0,vs):mr}find(e,t,r){let o=[];return this.findInner(e??0,t??1e9,o,0,r),o}findInner(e,t,r,o,i){for(let a=0;a<this.local.length;a++){let s=this.local[a];s.from<=t&&s.to>=e&&(!i||i(s.spec))&&r.push(s.copy(s.from+o,s.to+o))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<t&&this.children[a+1]>e){let s=this.children[a]+1;this.children[a+2].findInner(e-s,t-s,r,o+s,i)}}map(e,t,r){return this==mr||e.maps.length==0?this:this.mapInner(e,t,0,0,r||vs)}mapInner(e,t,r,o,i){let a;for(let s=0;s<this.local.length;s++){let l=this.local[s].map(e,r,o);l&&l.type.valid(t,l)?(a||(a=[])).push(l):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?HK(this.children,a||[],e,t,r,o,i):a?new Qn(a.sort(gs),yl):mr}add(e,t){return t.length?this==mr?Qn.create(e,t):this.addInner(e,t,0):this}addInner(e,t,r){let o,i=0;e.forEach((s,l)=>{let c=l+r,d;if(d=Z8(t,s,c)){for(o||(o=this.children.slice());i<o.length&&o[i]<l;)i+=3;o[i]==l?o[i+2]=o[i+2].addInner(s,d,c+1):o.splice(i,0,l,l+s.nodeSize,Uf(d,s,c+1,vs)),i+=3}});let a=Q8(i?e_(t):t,-r);for(let s=0;s<a.length;s++)a[s].type.valid(e,a[s])||a.splice(s--,1);return new Qn(a.length?this.local.concat(a).sort(gs):this.local,o||this.children)}remove(e){return e.length==0||this==mr?this:this.removeInner(e,0)}removeInner(e,t){let r=this.children,o=this.local;for(let i=0;i<r.length;i+=3){let a,s=r[i]+t,l=r[i+1]+t;for(let d=0,f;d<e.length;d++)(f=e[d])&&f.from>s&&f.to<l&&(e[d]=null,(a||(a=[])).push(f));if(!a)continue;r==this.children&&(r=this.children.slice());let c=r[i+2].removeInner(a,s+1);c!=mr?r[i+2]=c:(r.splice(i,3),i-=3)}if(o.length){for(let i=0,a;i<e.length;i++)if(a=e[i])for(let s=0;s<o.length;s++)o[s].eq(a,t)&&(o==this.local&&(o=this.local.slice()),o.splice(s--,1))}return r==this.children&&o==this.local?this:o.length||r.length?new Qn(o,r):mr}forChild(e,t){if(this==mr)return this;if(t.isLeaf)return Qn.empty;let r,o;for(let s=0;s<this.children.length;s+=3)if(this.children[s]>=e){this.children[s]==e&&(r=this.children[s+2]);break}let i=e+1,a=i+t.content.size;for(let s=0;s<this.local.length;s++){let l=this.local[s];if(l.from<a&&l.to>i&&l.type instanceof bi){let c=Math.max(i,l.from)-i,d=Math.min(a,l.to)-i;c<d&&(o||(o=[])).push(l.copy(c,d))}}if(o){let s=new Qn(o.sort(gs),yl);return r?new ii([s,r]):s}return r||mr}eq(e){if(this==e)return!0;if(!(e instanceof Qn)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return Qg(this.localsInner(e))}localsInner(e){if(this==mr)return yl;if(e.inlineContent||!this.local.some(bi.is))return this.local;let t=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof bi||t.push(this.local[r]);return t}forEachSet(e){e(this)}}Qn.empty=new Qn([],[]);Qn.removeOverlap=Qg;const mr=Qn.empty;class ii{constructor(e){this.members=e}map(e,t){const r=this.members.map(o=>o.map(e,t,vs));return ii.from(r)}forChild(e,t){if(t.isLeaf)return Qn.empty;let r=[];for(let o=0;o<this.members.length;o++){let i=this.members[o].forChild(e,t);i!=mr&&(i instanceof ii?r=r.concat(i.members):r.push(i))}return ii.from(r)}eq(e){if(!(e instanceof ii)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,r=!0;for(let o=0;o<this.members.length;o++){let i=this.members[o].localsInner(e);if(i.length)if(!t)t=i;else{r&&(t=t.slice(),r=!1);for(let a=0;a<i.length;a++)t.push(i[a])}}return t?Qg(r?t:t.sort(gs)):yl}static from(e){switch(e.length){case 0:return mr;case 1:return e[0];default:return new ii(e.every(t=>t instanceof Qn)?e:e.reduce((t,r)=>t.concat(r instanceof Qn?r:r.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}}function HK(n,e,t,r,o,i,a){let s=n.slice();for(let c=0,d=i;c<t.maps.length;c++){let f=0;t.maps[c].forEach((m,g,v,y)=>{let b=y-v-(g-m);for(let _=0;_<s.length;_+=3){let w=s[_+1];if(w<0||m>w+d-f)continue;let T=s[_]+d-f;g>=T?s[_+1]=m<=T?-2:-1:m>=d&&b&&(s[_]+=b,s[_+1]+=b)}f+=b}),d=t.maps[c].map(d,-1)}let l=!1;for(let c=0;c<s.length;c+=3)if(s[c+1]<0){if(s[c+1]==-2){l=!0,s[c+1]=-1;continue}let d=t.map(n[c]+i),f=d-o;if(f<0||f>=r.content.size){l=!0;continue}let m=t.map(n[c+1]+i,-1),g=m-o,{index:v,offset:y}=r.content.findIndex(f),b=r.maybeChild(v);if(b&&y==f&&y+b.nodeSize==g){let _=s[c+2].mapInner(t,b,d+1,n[c]+i+1,a);_!=mr?(s[c]=f,s[c+1]=g,s[c+2]=_):(s[c+1]=-2,l=!0)}else l=!0}if(l){let c=UK(s,n,e,t,o,i,a),d=Uf(c,r,0,a);e=d.local;for(let f=0;f<s.length;f+=3)s[f+1]<0&&(s.splice(f,3),f-=3);for(let f=0,m=0;f<d.children.length;f+=3){let g=d.children[f];for(;m<s.length&&s[m]<g;)m+=3;s.splice(m,0,d.children[f],d.children[f+1],d.children[f+2])}}return new Qn(e.sort(gs),s)}function Q8(n,e){if(!e||!n.length)return n;let t=[];for(let r=0;r<n.length;r++){let o=n[r];t.push(new Do(o.from+e,o.to+e,o.type))}return t}function UK(n,e,t,r,o,i,a){function s(l,c){for(let d=0;d<l.local.length;d++){let f=l.local[d].map(r,o,c);f?t.push(f):a.onRemove&&a.onRemove(l.local[d].spec)}for(let d=0;d<l.children.length;d+=3)s(l.children[d+2],l.children[d]+c+1)}for(let l=0;l<n.length;l+=3)n[l+1]==-1&&s(n[l+2],e[l]+i+1);return t}function Z8(n,e,t){if(e.isLeaf)return null;let r=t+e.nodeSize,o=null;for(let i=0,a;i<n.length;i++)(a=n[i])&&a.from>t&&a.to<r&&((o||(o=[])).push(a),n[i]=null);return o}function e_(n){let e=[];for(let t=0;t<n.length;t++)n[t]!=null&&e.push(n[t]);return e}function Uf(n,e,t,r){let o=[],i=!1;e.forEach((s,l)=>{let c=Z8(n,s,l+t);if(c){i=!0;let d=Uf(c,s,t+l+1,r);d!=mr&&o.push(l,l+s.nodeSize,d)}});let a=Q8(i?e_(n):n,-t).sort(gs);for(let s=0;s<a.length;s++)a[s].type.valid(e,a[s])||(r.onRemove&&r.onRemove(a[s].spec),a.splice(s--,1));return a.length||o.length?new Qn(a,o):mr}function gs(n,e){return n.from-e.from||n.to-e.to}function Qg(n){let e=n;for(let t=0;t<e.length-1;t++){let r=e[t];if(r.from!=r.to)for(let o=t+1;o<e.length;o++){let i=e[o];if(i.from==r.from){i.to!=r.to&&(e==n&&(e=n.slice()),e[o]=i.copy(i.from,r.to),o3(e,o+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(e==n&&(e=n.slice()),e[t]=r.copy(r.from,i.from),o3(e,o,r.copy(i.from,r.to)));break}}}return e}function o3(n,e,t){for(;e<n.length&&gs(t,n[e])>0;)e++;n.splice(e,0,t)}function jm(n){let e=[];return n.someProp("decorations",t=>{let r=t(n.state);r&&r!=mr&&e.push(r)}),n.cursorWrapper&&e.push(Qn.create(n.state.doc,[n.cursorWrapper.deco])),ii.from(e)}const WK={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},jK=Lr&&gi<=11;class KK{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class YK{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new KK,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;o<r.length;o++)this.queue.push(r[o]);Lr&&gi<=11&&r.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),jK&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,WK)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(J2(this.view)){if(this.suppressingSelectionUpdates)return Ra(this.view);if(Lr&&gi<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Os(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,r;for(let i=e.focusNode;i;i=Rl(i))t.add(i);for(let i=e.anchorNode;i;i=Rl(i))if(t.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let r=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&J2(e)&&!this.ignoreSelectionChange(r),i=-1,a=-1,s=!1,l=[];if(e.editable)for(let d=0;d<t.length;d++){let f=this.registerMutation(t[d],l);f&&(i=i<0?f.from:Math.min(f.from,i),a=a<0?f.to:Math.max(f.to,a),f.typeOver&&(s=!0))}if(Bo&&l.length){let d=l.filter(f=>f.nodeName=="BR");if(d.length==2){let[f,m]=d;f.parentNode&&f.parentNode.parentNode==m.parentNode?m.remove():f.remove()}else{let{focusNode:f}=this.currentSelection;for(let m of d){let g=m.parentNode;g&&g.nodeName=="LI"&&(!f||JK(e,f)!=g)&&m.remove()}}}let c=null;i<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Lp(r)&&(c=jg(e))&&c.eq(nn.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Ra(e),this.currentSelection.set(r),e.scrollToSelection()):(i>-1||o)&&(i>-1&&(e.docView.markDirty(i,a),qK(e)),this.handleDOMChange(i,a,s,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Ra(e),this.currentSelection.set(r))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let d=0;d<e.addedNodes.length;d++){let f=e.addedNodes[d];t.push(f),f.nodeType==3&&(this.lastChangedTextNode=f)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let o=e.previousSibling,i=e.nextSibling;if(Lr&&gi<=11&&e.addedNodes.length)for(let d=0;d<e.addedNodes.length;d++){let{previousSibling:f,nextSibling:m}=e.addedNodes[d];(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(o=f),(!m||Array.prototype.indexOf.call(e.addedNodes,m)<0)&&(i=m)}let a=o&&o.parentNode==e.target?ur(o)+1:0,s=r.localPosFromDOM(e.target,a,-1),l=i&&i.parentNode==e.target?ur(i):e.target.childNodes.length,c=r.localPosFromDOM(e.target,l,1);return{from:s,to:c}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let a3=new WeakMap,i3=!1;function qK(n){if(!a3.has(n)&&(a3.set(n,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace)!==-1)){if(n.requiresGeckoHackNode=Bo,i3)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),i3=!0}}function s3(n,e){let t=e.startContainer,r=e.startOffset,o=e.endContainer,i=e.endOffset,a=n.domAtPos(n.state.selection.anchor);return Os(a.node,a.offset,o,i)&&([t,r,o,i]=[o,i,t,r]),{anchorNode:t,anchorOffset:r,focusNode:o,focusOffset:i}}function GK(n,e){if(e.getComposedRanges){let o=e.getComposedRanges(n.root)[0];if(o)return s3(n,o)}let t;function r(o){o.preventDefault(),o.stopImmediatePropagation(),t=o.getTargetRanges()[0]}return n.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),n.dom.removeEventListener("beforeinput",r,!0),t?s3(n,t):null}function JK(n,e){for(let t=e.parentNode;t&&t!=n.dom;t=t.parentNode){let r=n.docView.nearestDesc(t,!0);if(r&&r.node.isBlock)return t}return null}function XK(n,e,t){let{node:r,fromOffset:o,toOffset:i,from:a,to:s}=n.docView.parseRange(e,t),l=n.domSelectionRange(),c,d=l.anchorNode;if(d&&n.dom.contains(d.nodeType==1?d:d.parentNode)&&(c=[{node:d,offset:l.anchorOffset}],Lp(l)||c.push({node:l.focusNode,offset:l.focusOffset})),gr&&n.input.lastKeyCode===8)for(let b=i;b>o;b--){let _=r.childNodes[b-1],w=_.pmViewDesc;if(_.nodeName=="BR"&&!w){i=b;break}if(!w||w.size)break}let f=n.state.doc,m=n.someProp("domParser")||vi.fromSchema(n.state.schema),g=f.resolve(a),v=null,y=m.parse(r,{topNode:g.parent,topMatch:g.parent.contentMatchAt(g.index()),topOpen:!0,from:o,to:i,preserveWhitespace:g.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:QK,context:g});if(c&&c[0].pos!=null){let b=c[0].pos,_=c[1]&&c[1].pos;_==null&&(_=b),v={anchor:b+a,head:_+a}}return{doc:y,sel:v,from:a,to:s}}function QK(n){let e=n.pmViewDesc;if(e)return e.parseRule();if(n.nodeName=="BR"&&n.parentNode){if(Er&&/^(ul|ol)$/i.test(n.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}else if(n.parentNode.lastChild==n||Er&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if(n.nodeName=="IMG"&&n.getAttribute("mark-placeholder"))return{ignore:!0};return null}const ZK=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function eY(n,e,t,r,o){let i=n.input.compositionPendingChanges||(n.composing?n.input.compositionID:0);if(n.input.compositionPendingChanges=0,e<0){let P=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,$=jg(n,P);if($&&!n.state.selection.eq($)){if(gr&&Ia&&n.input.lastKeyCode===13&&Date.now()-100<n.input.lastKeyCodeTime&&n.someProp("handleKeyDown",j=>j(n,Zi(13,"Enter"))))return;let B=n.state.tr.setSelection($);P=="pointer"?B.setMeta("pointer",!0):P=="key"&&B.scrollIntoView(),i&&B.setMeta("composition",i),n.dispatch(B)}return}let a=n.state.doc.resolve(e),s=a.sharedDepth(t);e=a.before(s+1),t=n.state.doc.resolve(t).after(s+1);let l=n.state.selection,c=XK(n,e,t),d=n.state.doc,f=d.slice(c.from,c.to),m,g;n.input.lastKeyCode===8&&Date.now()-100<n.input.lastKeyCodeTime?(m=n.state.selection.to,g="end"):(m=n.state.selection.from,g="start"),n.input.lastKeyCode=null;let v=rY(f.content,c.doc.content,c.from,m,g);if(v&&n.input.domChangeCount++,(Dl&&n.input.lastIOSEnter>Date.now()-225||Ia)&&o.some(P=>P.nodeType==1&&!ZK.test(P.nodeName))&&(!v||v.endA>=v.endB)&&n.someProp("handleKeyDown",P=>P(n,Zi(13,"Enter")))){n.input.lastIOSEnter=0;return}if(!v)if(r&&l instanceof qt&&!l.empty&&l.$head.sameParent(l.$anchor)&&!n.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))v={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let P=l3(n,n.state.doc,c.sel);if(P&&!P.eq(n.state.selection)){let $=n.state.tr.setSelection(P);i&&$.setMeta("composition",i),n.dispatch($)}}return}n.state.selection.from<n.state.selection.to&&v.start==v.endB&&n.state.selection instanceof qt&&(v.start>n.state.selection.from&&v.start<=n.state.selection.from+2&&n.state.selection.from>=c.from?v.start=n.state.selection.from:v.endA<n.state.selection.to&&v.endA>=n.state.selection.to-2&&n.state.selection.to<=c.to&&(v.endB+=n.state.selection.to-v.endA,v.endA=n.state.selection.to)),Lr&&gi<=11&&v.endB==v.start+1&&v.endA==v.start&&v.start>c.from&&c.doc.textBetween(v.start-c.from-1,v.start-c.from+1)=="  "&&(v.start--,v.endA--,v.endB--);let y=c.doc.resolveNoCache(v.start-c.from),b=c.doc.resolveNoCache(v.endB-c.from),_=d.resolve(v.start),w=y.sameParent(b)&&y.parent.inlineContent&&_.end()>=v.endA,T;if((Dl&&n.input.lastIOSEnter>Date.now()-225&&(!w||o.some(P=>P.nodeName=="DIV"||P.nodeName=="P"))||!w&&y.pos<c.doc.content.size&&(!y.sameParent(b)||!y.parent.inlineContent)&&!/\S/.test(c.doc.textBetween(y.pos,b.pos,"",""))&&(T=nn.findFrom(c.doc.resolve(y.pos+1),1,!0))&&T.head>y.pos)&&n.someProp("handleKeyDown",P=>P(n,Zi(13,"Enter")))){n.input.lastIOSEnter=0;return}if(n.state.selection.anchor>v.start&&nY(d,v.start,v.endA,y,b)&&n.someProp("handleKeyDown",P=>P(n,Zi(8,"Backspace")))){Ia&&gr&&n.domObserver.suppressSelectionUpdates();return}gr&&v.endB==v.start&&(n.input.lastChromeDelete=Date.now()),Ia&&!w&&y.start()!=b.start()&&b.parentOffset==0&&y.depth==b.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==v.endA&&(v.endB-=2,b=c.doc.resolveNoCache(v.endB-c.from),setTimeout(()=>{n.someProp("handleKeyDown",function(P){return P(n,Zi(13,"Enter"))})},20));let k=v.start,x=v.endA,M,D,A;if(w){if(y.pos==b.pos)Lr&&gi<=11&&y.parentOffset==0&&(n.domObserver.suppressSelectionUpdates(),setTimeout(()=>Ra(n),20)),M=n.state.tr.delete(k,x),D=d.resolve(v.start).marksAcross(d.resolve(v.endA));else if(v.endA==v.endB&&(A=tY(y.parent.content.cut(y.parentOffset,b.parentOffset),_.parent.content.cut(_.parentOffset,v.endA-_.start()))))M=n.state.tr,A.type=="add"?M.addMark(k,x,A.mark):M.removeMark(k,x,A.mark);else if(y.parent.child(y.index()).isText&&y.index()==b.index()-(b.textOffset?0:1)){let P=y.parent.textBetween(y.parentOffset,b.parentOffset);if(n.someProp("handleTextInput",$=>$(n,k,x,P)))return;M=n.state.tr.insertText(P,k,x)}}if(M||(M=n.state.tr.replace(k,x,c.doc.slice(v.start-c.from,v.endB-c.from))),c.sel){let P=l3(n,M.doc,c.sel);P&&!(gr&&n.composing&&P.empty&&(v.start!=v.endB||n.input.lastChromeDelete<Date.now()-100)&&(P.head==k||P.head==M.mapping.map(x)-1)||Lr&&P.empty&&P.head==k)&&M.setSelection(P)}D&&M.ensureMarks(D),i&&M.setMeta("composition",i),n.dispatch(M.scrollIntoView())}function l3(n,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:Kg(n,e.resolve(t.anchor),e.resolve(t.head))}function tY(n,e){let t=n.firstChild.marks,r=e.firstChild.marks,o=t,i=r,a,s,l;for(let d=0;d<r.length;d++)o=r[d].removeFromSet(o);for(let d=0;d<t.length;d++)i=t[d].removeFromSet(i);if(o.length==1&&i.length==0)s=o[0],a="add",l=d=>d.mark(s.addToSet(d.marks));else if(o.length==0&&i.length==1)s=i[0],a="remove",l=d=>d.mark(s.removeFromSet(d.marks));else return null;let c=[];for(let d=0;d<e.childCount;d++)c.push(l(e.child(d)));if(Ve.from(c).eq(n))return{mark:s,type:a}}function nY(n,e,t,r,o){if(t-e<=o.pos-r.pos||Km(r,!0,!1)<o.pos)return!1;let i=n.resolve(e);if(!r.parent.isTextblock){let s=i.nodeAfter;return s!=null&&t==e+s.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let a=n.resolve(Km(i,!0,!0));return!a.parent.isTextblock||a.pos>t||Km(a,!0,!1)<t?!1:r.parent.content.cut(r.parentOffset).eq(a.parent.content)}function Km(n,e,t){let r=n.depth,o=e?n.end():n.pos;for(;r>0&&(e||n.indexAfter(r)==n.node(r).childCount);)r--,o++,e=!1;if(t){let i=n.node(r).maybeChild(n.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function rY(n,e,t,r,o){let i=n.findDiffStart(e,t);if(i==null)return null;let{a,b:s}=n.findDiffEnd(e,t+n.size,t+e.size);if(o=="end"){let l=Math.max(0,i-Math.min(a,s));r-=a+l-i}if(a<i&&n.size<e.size){let l=r<=i&&r>=a?i-r:0;i-=l,i&&i<e.size&&u3(e.textBetween(i-1,i+1))&&(i+=l?1:-1),s=i+(s-a),a=i}else if(s<i){let l=r<=i&&r>=s?i-r:0;i-=l,i&&i<n.size&&u3(n.textBetween(i-1,i+1))&&(i+=l?1:-1),a=i+(a-s),s=i}return{start:i,endA:a,endB:s}}function u3(n){if(n.length!=2)return!1;let e=n.charCodeAt(0),t=n.charCodeAt(1);return e>=56320&&e<=57343&&t>=55296&&t<=56319}class oY{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new wK,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(h3),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=f3(this),d3(this),this.nodeViews=p3(this),this.docView=W2(this.state.doc,c3(this),jm(this),this.dom,this),this.domObserver=new YK(this,(r,o,i,a)=>eY(this,r,o,i,a)),this.domObserver.start(),xK(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Xv(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(h3),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let r in this._props)t[r]=this._props[r];t.state=this.state;for(let r in e)t[r]=e[r];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var r;let o=this.state,i=!1,a=!1;e.storedMarks&&this.composing&&(q8(this),a=!0),this.state=e;let s=o.plugins!=e.plugins||this._props.plugins!=t.plugins;if(s||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let g=p3(this);iY(g,this.nodeViews)&&(this.nodeViews=g,i=!0)}(s||t.handleDOMEvents!=this._props.handleDOMEvents)&&Xv(this),this.editable=f3(this),d3(this);let l=jm(this),c=c3(this),d=o.plugins!=e.plugins&&!o.doc.eq(e.doc)?"reset":e.scrollToSelection>o.scrollToSelection?"to selection":"preserve",f=i||!this.docView.matchesNode(e.doc,c,l);(f||!e.selection.eq(o.selection))&&(a=!0);let m=d=="preserve"&&a&&this.dom.style.overflowAnchor==null&&Fj(this);if(a){this.domObserver.stop();let g=f&&(Lr||gr)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&aY(o.selection,e.selection);if(f){let v=gr?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=NK(this)),(i||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=W2(e.doc,c,l,this.dom,this)),v&&!this.trackWrites&&(g=!0)}g||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&sK(this))?Ra(this,g):(N8(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,o),d=="reset"?this.dom.scrollTop=0:d=="to selection"?this.scrollToSelection():m&&Lj(m)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof Ot){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&L2(this,t.getBoundingClientRect(),e)}else L2(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t<this.directPlugins.length;t++){let r=this.directPlugins[t];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let r=this.state.plugins[t];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let r=this.pluginViews[t];r.update&&r.update(this,e)}}updateDraggedNode(e,t){let r=e.node,o=-1;if(this.state.doc.nodeAt(r.from)==r.node)o=r.from;else{let i=r.from+(this.state.doc.content.size-t.doc.content.size);(i>0&&this.state.doc.nodeAt(i))==r.node&&(o=i)}this.dragging=new J8(e.slice,e.move,o<0?void 0:Ot.create(this.state.doc,o))}someProp(e,t){let r=this._props&&this._props[e],o;if(r!=null&&(o=t?t(r):r))return o;for(let a=0;a<this.directPlugins.length;a++){let s=this.directPlugins[a].props[e];if(s!=null&&(o=t?t(s):s))return o}let i=this.state.plugins;if(i)for(let a=0;a<i.length;a++){let s=i[a].props[e];if(s!=null&&(o=t?t(s):s))return o}}hasFocus(){if(Lr){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&Bj(this.dom),Ra(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let t=this.dom.parentNode;t;t=t.parentNode)if(t.nodeType==9||t.nodeType==11&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection()),this._root=t}return e||document}updateRoot(){this._root=null}posAtCoords(e){return Wj(this,e)}coordsAtPos(e,t=1){return T8(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,r=-1){let o=this.docView.posFromDOM(e,t,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(e,t){return Gj(this,t||this.state,e)}pasteHTML(e,t){return rc(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return rc(this,e,null,!0,t||new ClipboardEvent("paste"))}serializeForClipboard(e){return Yg(this,e)}destroy(){this.docView&&(kK(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],jm(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Ij())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return IK(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return e?Er&&this.root.nodeType===11&&Aj(this.dom.ownerDocument)==this.dom&&GK(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function c3(n){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(n.editable),n.someProp("attributes",t=>{if(typeof t=="function"&&(t=t(n.state)),t)for(let r in t)r=="class"?e.class+=" "+t[r]:r=="style"?e.style=(e.style?e.style+";":"")+t[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(t[r]))}),e.translate||(e.translate="no"),[Do.node(0,n.state.doc.content.size,e)]}function d3(n){if(n.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),n.cursorWrapper={dom:e,deco:Do.widget(n.state.selection.from,e,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function f3(n){return!n.someProp("editable",e=>e(n.state)===!1)}function aY(n,e){let t=Math.min(n.$anchor.sharedDepth(n.head),e.$anchor.sharedDepth(e.head));return n.$anchor.start(t)!=e.$anchor.start(t)}function p3(n){let e=Object.create(null);function t(r){for(let o in r)Object.prototype.hasOwnProperty.call(e,o)||(e[o]=r[o])}return n.someProp("nodeViews",t),n.someProp("markViews",t),e}function iY(n,e){let t=0,r=0;for(let o in n){if(n[o]!=e[o])return!0;t++}for(let o in e)r++;return t!=r}function h3(n){if(n.spec.state||n.spec.filterTransaction||n.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Ti={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Wf={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},sY=typeof navigator<"u"&&/Mac/.test(navigator.platform),lY=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var cr=0;cr<10;cr++)Ti[48+cr]=Ti[96+cr]=String(cr);for(var cr=1;cr<=24;cr++)Ti[cr+111]="F"+cr;for(var cr=65;cr<=90;cr++)Ti[cr]=String.fromCharCode(cr+32),Wf[cr]=String.fromCharCode(cr);for(var Ym in Ti)Wf.hasOwnProperty(Ym)||(Wf[Ym]=Ti[Ym]);function uY(n){var e=sY&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||lY&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Wf:Ti)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}const cY=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),dY=typeof navigator<"u"&&/Win/.test(navigator.platform);function fY(n){let e=n.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let r,o,i,a;for(let s=0;s<e.length-1;s++){let l=e[s];if(/^(cmd|meta|m)$/i.test(l))a=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))o=!0;else if(/^s(hift)?$/i.test(l))i=!0;else if(/^mod$/i.test(l))cY?a=!0:o=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(t="Alt-"+t),o&&(t="Ctrl-"+t),a&&(t="Meta-"+t),i&&(t="Shift-"+t),t}function pY(n){let e=Object.create(null);for(let t in n)e[fY(t)]=n[t];return e}function qm(n,e,t=!0){return e.altKey&&(n="Alt-"+n),e.ctrlKey&&(n="Ctrl-"+n),e.metaKey&&(n="Meta-"+n),t&&e.shiftKey&&(n="Shift-"+n),n}function hY(n){return new no({props:{handleKeyDown:mY(n)}})}function mY(n){let e=pY(n);return function(t,r){let o=uY(r),i,a=e[qm(o,r)];if(a&&a(t.state,t.dispatch,t))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let s=e[qm(o,r,!1)];if(s&&s(t.state,t.dispatch,t))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(dY&&r.ctrlKey&&r.altKey)&&(i=Ti[r.keyCode])&&i!=o){let s=e[qm(i,r)];if(s&&s(t.state,t.dispatch,t))return!0}}return!1}}const Zg=(n,e)=>n.selection.empty?!1:(e&&e(n.tr.deleteSelection().scrollIntoView()),!0);function t_(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("backward",n):t.parentOffset>0)?null:t}const n_=(n,e,t)=>{let r=t_(n,t);if(!r)return!1;let o=e1(r);if(!o){let a=r.blockRange(),s=a&&jl(a);return s==null?!1:(e&&e(n.tr.lift(a,s).scrollIntoView()),!0)}let i=o.nodeBefore;if(d_(n,o,e,-1))return!0;if(r.parent.content.size==0&&(Nl(i,"end")||Ot.isSelectable(i)))for(let a=r.depth;;a--){let s=Np(n.doc,r.before(a),r.after(a),Ze.empty);if(s&&s.slice.size<s.to-s.from){if(e){let l=n.tr.step(s);l.setSelection(Nl(i,"end")?nn.findFrom(l.doc.resolve(l.mapping.map(o.pos,-1)),-1):Ot.create(l.doc,o.pos-i.nodeSize)),e(l.scrollIntoView())}return!0}if(a==1||r.node(a-1).childCount>1)break}return i.isAtom&&o.depth==r.depth-1?(e&&e(n.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0):!1},vY=(n,e,t)=>{let r=t_(n,t);if(!r)return!1;let o=e1(r);return o?r_(n,o,e):!1},gY=(n,e,t)=>{let r=a_(n,t);if(!r)return!1;let o=t1(r);return o?r_(n,o,e):!1};function r_(n,e,t){let r=e.nodeBefore,o=r,i=e.pos-1;for(;!o.isTextblock;i--){if(o.type.spec.isolating)return!1;let d=o.lastChild;if(!d)return!1;o=d}let a=e.nodeAfter,s=a,l=e.pos+1;for(;!s.isTextblock;l++){if(s.type.spec.isolating)return!1;let d=s.firstChild;if(!d)return!1;s=d}let c=Np(n.doc,i,l,Ze.empty);if(!c||c.from!=i||c instanceof Zn&&c.slice.size>=l-i)return!1;if(t){let d=n.tr.step(c);d.setSelection(qt.create(d.doc,i)),t(d.scrollIntoView())}return!0}function Nl(n,e,t=!1){for(let r=n;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(t&&r.childCount!=1)return!1}return!1}const o_=(n,e,t)=>{let{$head:r,empty:o}=n.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("backward",n):r.parentOffset>0)return!1;i=e1(r)}let a=i&&i.nodeBefore;return!a||!Ot.isSelectable(a)?!1:(e&&e(n.tr.setSelection(Ot.create(n.doc,i.pos-a.nodeSize)).scrollIntoView()),!0)};function e1(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){if(n.index(e)>0)return n.doc.resolve(n.before(e+1));if(n.node(e).type.spec.isolating)break}return null}function a_(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("forward",n):t.parentOffset<t.parent.content.size)?null:t}const i_=(n,e,t)=>{let r=a_(n,t);if(!r)return!1;let o=t1(r);if(!o)return!1;let i=o.nodeAfter;if(d_(n,o,e,1))return!0;if(r.parent.content.size==0&&(Nl(i,"start")||Ot.isSelectable(i))){let a=Np(n.doc,r.before(),r.after(),Ze.empty);if(a&&a.slice.size<a.to-a.from){if(e){let s=n.tr.step(a);s.setSelection(Nl(i,"start")?nn.findFrom(s.doc.resolve(s.mapping.map(o.pos)),1):Ot.create(s.doc,s.mapping.map(o.pos))),e(s.scrollIntoView())}return!0}}return i.isAtom&&o.depth==r.depth-1?(e&&e(n.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0):!1},s_=(n,e,t)=>{let{$head:r,empty:o}=n.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("forward",n):r.parentOffset<r.parent.content.size)return!1;i=t1(r)}let a=i&&i.nodeAfter;return!a||!Ot.isSelectable(a)?!1:(e&&e(n.tr.setSelection(Ot.create(n.doc,i.pos)).scrollIntoView()),!0)};function t1(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){let t=n.node(e);if(n.index(e)+1<t.childCount)return n.doc.resolve(n.after(e+1));if(t.type.spec.isolating)break}return null}const yY=(n,e)=>{let t=n.selection,r=t instanceof Ot,o;if(r){if(t.node.isTextblock||!Ri(n.doc,t.from))return!1;o=t.from}else if(o=Dp(n.doc,t.from,-1),o==null)return!1;if(e){let i=n.tr.join(o);r&&i.setSelection(Ot.create(i.doc,o-n.doc.resolve(o).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},bY=(n,e)=>{let t=n.selection,r;if(t instanceof Ot){if(t.node.isTextblock||!Ri(n.doc,t.to))return!1;r=t.to}else if(r=Dp(n.doc,t.to,1),r==null)return!1;return e&&e(n.tr.join(r).scrollIntoView()),!0},SY=(n,e)=>{let{$from:t,$to:r}=n.selection,o=t.blockRange(r),i=o&&jl(o);return i==null?!1:(e&&e(n.tr.lift(o,i).scrollIntoView()),!0)},l_=(n,e)=>{let{$head:t,$anchor:r}=n.selection;return!t.parent.type.spec.code||!t.sameParent(r)?!1:(e&&e(n.tr.insertText(`
`).scrollIntoView()),!0)};function n1(n){for(let e=0;e<n.edgeCount;e++){let{type:t}=n.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}const _Y=(n,e)=>{let{$head:t,$anchor:r}=n.selection;if(!t.parent.type.spec.code||!t.sameParent(r))return!1;let o=t.node(-1),i=t.indexAfter(-1),a=n1(o.contentMatchAt(i));if(!a||!o.canReplaceWith(i,i,a))return!1;if(e){let s=t.after(),l=n.tr.replaceWith(s,s,a.createAndFill());l.setSelection(nn.near(l.doc.resolve(s),1)),e(l.scrollIntoView())}return!0},u_=(n,e)=>{let t=n.selection,{$from:r,$to:o}=t;if(t instanceof eo||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=n1(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let a=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,s=n.tr.insert(a,i.createAndFill());s.setSelection(qt.create(s.doc,a+1)),e(s.scrollIntoView())}return!0},c_=(n,e)=>{let{$cursor:t}=n.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let i=t.before();if($a(n.doc,i))return e&&e(n.tr.split(i).scrollIntoView()),!0}let r=t.blockRange(),o=r&&jl(r);return o==null?!1:(e&&e(n.tr.lift(r,o).scrollIntoView()),!0)};function wY(n){return(e,t)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof Ot&&e.selection.node.isBlock)return!r.parentOffset||!$a(e.doc,r.pos)?!1:(t&&t(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],a,s,l=!1,c=!1;for(let g=r.depth;;g--)if(r.node(g).isBlock){l=r.end(g)==r.pos+(r.depth-g),c=r.start(g)==r.pos-(r.depth-g),s=n1(r.node(g-1).contentMatchAt(r.indexAfter(g-1))),i.unshift(l&&s?{type:s}:null),a=g;break}else{if(g==1)return!1;i.unshift(null)}let d=e.tr;(e.selection instanceof qt||e.selection instanceof eo)&&d.deleteSelection();let f=d.mapping.map(r.pos),m=$a(d.doc,f,i.length,i);if(m||(i[0]=s?{type:s}:null,m=$a(d.doc,f,i.length,i)),!m)return!1;if(d.split(f,i.length,i),!l&&c&&r.node(a).type!=s){let g=d.mapping.map(r.before(a)),v=d.doc.resolve(g);s&&r.node(a-1).canReplaceWith(v.index(),v.index()+1,s)&&d.setNodeMarkup(d.mapping.map(r.before(a)),s)}return t&&t(d.scrollIntoView()),!0}}const xY=wY(),kY=(n,e)=>{let{$from:t,to:r}=n.selection,o,i=t.sharedDepth(r);return i==0?!1:(o=t.before(i),e&&e(n.tr.setSelection(Ot.create(n.doc,o))),!0)};function CY(n,e,t){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(t&&t(n.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(o.isTextblock||Ri(n.doc,e.pos))?!1:(t&&t(n.tr.join(e.pos).scrollIntoView()),!0)}function d_(n,e,t,r){let o=e.nodeBefore,i=e.nodeAfter,a,s,l=o.type.spec.isolating||i.type.spec.isolating;if(!l&&CY(n,e,t))return!0;let c=!l&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(a=(s=o.contentMatchAt(o.childCount)).findWrapping(i.type))&&s.matchType(a[0]||i.type).validEnd){if(t){let g=e.pos+i.nodeSize,v=Ve.empty;for(let _=a.length-1;_>=0;_--)v=Ve.from(a[_].create(null,v));v=Ve.from(o.copy(v));let y=n.tr.step(new nr(e.pos-1,g,e.pos,g,new Ze(v,1,0),a.length,!0)),b=y.doc.resolve(g+2*a.length);b.nodeAfter&&b.nodeAfter.type==o.type&&Ri(y.doc,b.pos)&&y.join(b.pos),t(y.scrollIntoView())}return!0}let d=i.type.spec.isolating||r>0&&l?null:nn.findFrom(e,1),f=d&&d.$from.blockRange(d.$to),m=f&&jl(f);if(m!=null&&m>=e.depth)return t&&t(n.tr.lift(f,m).scrollIntoView()),!0;if(c&&Nl(i,"start",!0)&&Nl(o,"end")){let g=o,v=[];for(;v.push(g),!g.isTextblock;)g=g.lastChild;let y=i,b=1;for(;!y.isTextblock;y=y.firstChild)b++;if(g.canReplace(g.childCount,g.childCount,y.content)){if(t){let _=Ve.empty;for(let T=v.length-1;T>=0;T--)_=Ve.from(v[T].copy(_));let w=n.tr.step(new nr(e.pos-v.length,e.pos+i.nodeSize,e.pos+b,e.pos+i.nodeSize-b,new Ze(_,v.length,0),0,!0));t(w.scrollIntoView())}return!0}}return!1}function f_(n){return function(e,t){let r=e.selection,o=n<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(t&&t(e.tr.setSelection(qt.create(e.doc,n<0?o.start(i):o.end(i)))),!0):!1}}const IY=f_(-1),EY=f_(1);function TY(n,e=null){return function(t,r){let{$from:o,$to:i}=t.selection,a=o.blockRange(i),s=a&&Hg(a,n,e);return s?(r&&r(t.tr.wrap(a,s).scrollIntoView()),!0):!1}}function m3(n,e=null){return function(t,r){let o=!1;for(let i=0;i<t.selection.ranges.length&&!o;i++){let{$from:{pos:a},$to:{pos:s}}=t.selection.ranges[i];t.doc.nodesBetween(a,s,(l,c)=>{if(o)return!1;if(!(!l.isTextblock||l.hasMarkup(n,e)))if(l.type==n)o=!0;else{let d=t.doc.resolve(c),f=d.index();o=d.parent.canReplaceWith(f,f+1,n)}})}if(!o)return!1;if(r){let i=t.tr;for(let a=0;a<t.selection.ranges.length;a++){let{$from:{pos:s},$to:{pos:l}}=t.selection.ranges[a];i.setBlockType(s,l,n,e)}r(i.scrollIntoView())}return!0}}function r1(...n){return function(e,t,r){for(let o=0;o<n.length;o++)if(n[o](e,t,r))return!0;return!1}}r1(Zg,n_,o_);r1(Zg,i_,s_);r1(l_,u_,c_,xY);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function MY(n,e=null){return function(t,r){let{$from:o,$to:i}=t.selection,a=o.blockRange(i);if(!a)return!1;let s=r?t.tr:null;return OY(s,a,n,e)?(r&&r(s.scrollIntoView()),!0):!1}}function OY(n,e,t,r=null){let o=!1,i=e,a=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(t)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let l=a.resolve(e.start-2);i=new Nf(l,l,e.depth),e.endIndex<e.parent.childCount&&(e=new Nf(e.$from,a.resolve(e.$to.end(e.depth)),e.depth)),o=!0}let s=Hg(i,t,r,e);return s?(n&&AY(n,e,s,o,t),!0):!1}function AY(n,e,t,r,o){let i=Ve.empty;for(let d=t.length-1;d>=0;d--)i=Ve.from(t[d].type.create(t[d].attrs,i));n.step(new nr(e.start-(r?2:0),e.end,e.start,e.end,new Ze(i,0,0),t.length,!0));let a=0;for(let d=0;d<t.length;d++)t[d].type==o&&(a=d+1);let s=t.length-a,l=e.start+t.length-(r?2:0),c=e.parent;for(let d=e.startIndex,f=e.endIndex,m=!0;d<f;d++,m=!1)!m&&$a(n.doc,l,s)&&(n.split(l,s),l+=2*s),l+=c.child(d).nodeSize;return n}function PY(n){return function(e,t){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,a=>a.childCount>0&&a.firstChild.type==n);return i?t?r.node(i.depth-1).type==n?$Y(e,t,n,i):RY(e,t,i):!0:!1}}function $Y(n,e,t,r){let o=n.tr,i=r.end,a=r.$to.end(r.depth);i<a&&(o.step(new nr(i-1,a,i,a,new Ze(Ve.from(t.create(null,r.parent.copy())),1,0),1,!0)),r=new Nf(o.doc.resolve(r.$from.pos),o.doc.resolve(a),r.depth));const s=jl(r);if(s==null)return!1;o.lift(r,s);let l=o.doc.resolve(o.mapping.map(i,-1)-1);return Ri(o.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&o.join(l.pos),e(o.scrollIntoView()),!0}function RY(n,e,t){let r=n.tr,o=t.parent;for(let g=t.end,v=t.endIndex-1,y=t.startIndex;v>y;v--)g-=o.child(v).nodeSize,r.delete(g-1,g+1);let i=r.doc.resolve(t.start),a=i.nodeAfter;if(r.mapping.map(t.end)!=t.start+i.nodeAfter.nodeSize)return!1;let s=t.startIndex==0,l=t.endIndex==o.childCount,c=i.node(-1),d=i.index(-1);if(!c.canReplace(d+(s?0:1),d+1,a.content.append(l?Ve.empty:Ve.from(o))))return!1;let f=i.pos,m=f+a.nodeSize;return r.step(new nr(f-(s?1:0),m+(l?1:0),f+1,m-1,new Ze((s?Ve.empty:Ve.from(o.copy(Ve.empty))).append(l?Ve.empty:Ve.from(o.copy(Ve.empty))),s?0:1,l?0:1),s?0:1)),e(r.scrollIntoView()),!0}function DY(n){return function(e,t){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,c=>c.childCount>0&&c.firstChild.type==n);if(!i)return!1;let a=i.startIndex;if(a==0)return!1;let s=i.parent,l=s.child(a-1);if(l.type!=n)return!1;if(t){let c=l.lastChild&&l.lastChild.type==s.type,d=Ve.from(c?n.create():null),f=new Ze(Ve.from(n.create(null,Ve.from(s.type.create(null,d)))),c?3:1,0),m=i.start,g=i.end;t(e.tr.step(new nr(m-(c?3:1),g,m,g,f,1,!0)).scrollIntoView())}return!0}}function zp(n){const{state:e,transaction:t}=n;let{selection:r}=t,{doc:o}=t,{storedMarks:i}=t;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=t.selection,o=t.doc,i=t.storedMarks,t}}}class Hp{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:r}=this,{view:o}=t,{tr:i}=r,a=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([s,l])=>[s,(...d)=>{const f=l(...d)(a);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(i),f}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:r,editor:o,state:i}=this,{view:a}=o,s=[],l=!!e,c=e||i.tr,d=()=>(!l&&t&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&a.dispatch(c),s.every(m=>m===!0)),f={...Object.fromEntries(Object.entries(r).map(([m,g])=>[m,(...y)=>{const b=this.buildProps(c,t),_=g(...y)(b);return s.push(_),f}])),run:d};return f}createCan(e){const{rawCommands:t,state:r}=this,o=!1,i=e||r.tr,a=this.buildProps(i,o);return{...Object.fromEntries(Object.entries(t).map(([l,c])=>[l,(...d)=>c(...d)({...a,dispatch:void 0})])),chain:()=>this.createChain(i,o)}}buildProps(e,t=!0){const{rawCommands:r,editor:o,state:i}=this,{view:a}=o,s={tr:e,editor:o,view:a,state:zp({state:i,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(r).map(([l,c])=>[l,(...d)=>c(...d)(s)]))}};return s}}class NY{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){const r=this.callbacks[e];return r&&r.forEach(o=>o.apply(this,t)),this}off(e,t){const r=this.callbacks[e];return r&&(t?this.callbacks[e]=r.filter(o=>o!==t):delete this.callbacks[e]),this}once(e,t){const r=(...o)=>{this.off(e,r),t.apply(this,o)};return this.on(e,r)}removeAllListeners(){this.callbacks={}}}function ft(n,e,t){return n.config[e]===void 0&&n.parent?ft(n.parent,e,t):typeof n.config[e]=="function"?n.config[e].bind({...t,parent:n.parent?ft(n.parent,e,t):null}):n.config[e]}function Up(n){const e=n.filter(o=>o.type==="extension"),t=n.filter(o=>o.type==="node"),r=n.filter(o=>o.type==="mark");return{baseExtensions:e,nodeExtensions:t,markExtensions:r}}function p_(n){const e=[],{nodeExtensions:t,markExtensions:r}=Up(n),o=[...t,...r],i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return n.forEach(a=>{const s={name:a.name,options:a.options,storage:a.storage,extensions:o},l=ft(a,"addGlobalAttributes",s);if(!l)return;l().forEach(d=>{d.types.forEach(f=>{Object.entries(d.attributes).forEach(([m,g])=>{e.push({type:f,name:m,attribute:{...i,...g}})})})})}),o.forEach(a=>{const s={name:a.name,options:a.options,storage:a.storage},l=ft(a,"addAttributes",s);if(!l)return;const c=l();Object.entries(c).forEach(([d,f])=>{const m={...i,...f};typeof(m==null?void 0:m.default)=="function"&&(m.default=m.default()),m!=null&&m.isRequired&&(m==null?void 0:m.default)===void 0&&delete m.default,e.push({type:a.name,name:d,attribute:m})})}),e}function rr(n,e){if(typeof n=="string"){if(!e.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return e.nodes[n]}return n}function or(...n){return n.filter(e=>!!e).reduce((e,t)=>{const r={...e};return Object.entries(t).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}if(o==="class"){const s=i?String(i).split(" "):[],l=r[o]?r[o].split(" "):[],c=s.filter(d=>!l.includes(d));r[o]=[...l,...c].join(" ")}else if(o==="style"){const s=i?i.split(";").map(d=>d.trim()).filter(Boolean):[],l=r[o]?r[o].split(";").map(d=>d.trim()).filter(Boolean):[],c=new Map;l.forEach(d=>{const[f,m]=d.split(":").map(g=>g.trim());c.set(f,m)}),s.forEach(d=>{const[f,m]=d.split(":").map(g=>g.trim());c.set(f,m)}),r[o]=Array.from(c.entries()).map(([d,f])=>`${d}: ${f}`).join("; ")}else r[o]=i}),r},{})}function Qv(n,e){return e.filter(t=>t.type===n.type.name).filter(t=>t.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(n.attrs)||{}:{[t.name]:n.attrs[t.name]}).reduce((t,r)=>or(t,r),{})}function h_(n){return typeof n=="function"}function Jt(n,e=void 0,...t){return h_(n)?e?n.bind(e)(...t):n(...t):n}function FY(n={}){return Object.keys(n).length===0&&n.constructor===Object}function LY(n){return typeof n!="string"?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):n==="true"?!0:n==="false"?!1:n}function v3(n,e){return"style"in n?n:{...n,getAttrs:t=>{const r=n.getAttrs?n.getAttrs(t):n.attrs;if(r===!1)return!1;const o=e.reduce((i,a)=>{const s=a.attribute.parseHTML?a.attribute.parseHTML(t):LY(t.getAttribute(a.name));return s==null?i:{...i,[a.name]:s}},{});return{...r,...o}}}}function g3(n){return Object.fromEntries(Object.entries(n).filter(([e,t])=>e==="attrs"&&FY(t)?!1:t!=null))}function BY(n,e){var t;const r=p_(n),{nodeExtensions:o,markExtensions:i}=Up(n),a=(t=o.find(c=>ft(c,"topNode")))===null||t===void 0?void 0:t.name,s=Object.fromEntries(o.map(c=>{const d=r.filter(_=>_.type===c.name),f={name:c.name,options:c.options,storage:c.storage,editor:e},m=n.reduce((_,w)=>{const T=ft(w,"extendNodeSchema",f);return{..._,...T?T(c):{}}},{}),g=g3({...m,content:Jt(ft(c,"content",f)),marks:Jt(ft(c,"marks",f)),group:Jt(ft(c,"group",f)),inline:Jt(ft(c,"inline",f)),atom:Jt(ft(c,"atom",f)),selectable:Jt(ft(c,"selectable",f)),draggable:Jt(ft(c,"draggable",f)),code:Jt(ft(c,"code",f)),whitespace:Jt(ft(c,"whitespace",f)),linebreakReplacement:Jt(ft(c,"linebreakReplacement",f)),defining:Jt(ft(c,"defining",f)),isolating:Jt(ft(c,"isolating",f)),attrs:Object.fromEntries(d.map(_=>{var w;return[_.name,{default:(w=_==null?void 0:_.attribute)===null||w===void 0?void 0:w.default}]}))}),v=Jt(ft(c,"parseHTML",f));v&&(g.parseDOM=v.map(_=>v3(_,d)));const y=ft(c,"renderHTML",f);y&&(g.toDOM=_=>y({node:_,HTMLAttributes:Qv(_,d)}));const b=ft(c,"renderText",f);return b&&(g.toText=b),[c.name,g]})),l=Object.fromEntries(i.map(c=>{const d=r.filter(b=>b.type===c.name),f={name:c.name,options:c.options,storage:c.storage,editor:e},m=n.reduce((b,_)=>{const w=ft(_,"extendMarkSchema",f);return{...b,...w?w(c):{}}},{}),g=g3({...m,inclusive:Jt(ft(c,"inclusive",f)),excludes:Jt(ft(c,"excludes",f)),group:Jt(ft(c,"group",f)),spanning:Jt(ft(c,"spanning",f)),code:Jt(ft(c,"code",f)),attrs:Object.fromEntries(d.map(b=>{var _;return[b.name,{default:(_=b==null?void 0:b.attribute)===null||_===void 0?void 0:_.default}]}))}),v=Jt(ft(c,"parseHTML",f));v&&(g.parseDOM=v.map(b=>v3(b,d)));const y=ft(c,"renderHTML",f);return y&&(g.toDOM=b=>y({mark:b,HTMLAttributes:Qv(b,d)})),[c.name,g]}));return new o8({topNode:a,nodes:s,marks:l})}function Gm(n,e){return e.nodes[n]||e.marks[n]||null}function y3(n,e){return Array.isArray(e)?e.some(t=>(typeof t=="string"?t:t.name)===n.name):e}function o1(n,e){const t=Ks.fromSchema(e).serializeFragment(n),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(t),o.innerHTML}const VY=(n,e=500)=>{let t="";const r=n.parentOffset;return n.parent.nodesBetween(Math.max(0,r-e),r,(o,i,a,s)=>{var l,c;const d=((c=(l=o.type.spec).toText)===null||c===void 0?void 0:c.call(l,{node:o,pos:i,parent:a,index:s}))||o.textContent||"%leaf%";t+=o.isAtom&&!o.isText?d:d.slice(0,Math.max(0,r-i))}),t};function a1(n){return Object.prototype.toString.call(n)==="[object RegExp]"}class Wp{constructor(e){this.find=e.find,this.handler=e.handler}}const zY=(n,e)=>{if(a1(e))return e.exec(n);const t=e(n);if(!t)return null;const r=[t.text];return r.index=t.index,r.input=n,r.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(t.replaceWith)),r};function $d(n){var e;const{editor:t,from:r,to:o,text:i,rules:a,plugin:s}=n,{view:l}=t;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||!((e=c.nodeBefore||c.nodeAfter)===null||e===void 0)&&e.marks.find(m=>m.type.spec.code))return!1;let d=!1;const f=VY(c)+i;return a.forEach(m=>{if(d)return;const g=zY(f,m.find);if(!g)return;const v=l.state.tr,y=zp({state:l.state,transaction:v}),b={from:r-(g[0].length-i.length),to:o},{commands:_,chain:w,can:T}=new Hp({editor:t,state:y});m.handler({state:y,range:b,match:g,commands:_,chain:w,can:T})===null||!v.steps.length||(v.setMeta(s,{transform:v,from:r,to:o,text:i}),l.dispatch(v),d=!0)}),d}function HY(n){const{editor:e,rules:t}=n,r=new no({state:{init(){return null},apply(o,i,a){const s=o.getMeta(r);if(s)return s;const l=o.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:d}=l;typeof d=="string"?d=d:d=o1(Ve.from(d),a.schema);const{from:f}=l,m=f+d.length;$d({editor:e,from:f,to:m,text:d,rules:t,plugin:r})}),o.selectionSet||o.docChanged?null:i}},props:{handleTextInput(o,i,a,s){return $d({editor:e,from:i,to:a,text:s,rules:t,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:i}=o.state.selection;i&&$d({editor:e,from:i.pos,to:i.pos,text:"",rules:t,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;const{$cursor:a}=o.state.selection;return a?$d({editor:e,from:a.pos,to:a.pos,text:`
`,rules:t,plugin:r}):!1}},isInputRules:!0});return r}function UY(n){return Object.prototype.toString.call(n).slice(8,-1)}function Rd(n){return UY(n)!=="Object"?!1:n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function jp(n,e){const t={...n};return Rd(n)&&Rd(e)&&Object.keys(e).forEach(r=>{Rd(e[r])&&Rd(n[r])?t[r]=jp(n[r],e[r]):t[r]=e[r]}),t}class wo{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Jt(ft(this,"addOptions",{name:this.name}))),this.storage=Jt(ft(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new wo(e)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>jp(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new wo(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=Jt(ft(t,"addOptions",{name:t.name})),t.storage=Jt(ft(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){const{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){const a=o.marks();if(!!!a.find(c=>(c==null?void 0:c.type.name)===t.name))return!1;const l=a.find(c=>(c==null?void 0:c.type.name)===t.name);return l&&r.removeStoredMark(l),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}}function WY(n){return typeof n=="number"}class jY{constructor(e){this.find=e.find,this.handler=e.handler}}const KY=(n,e,t)=>{if(a1(e))return[...n.matchAll(e)];const r=e(n,t);return r?r.map(o=>{const i=[o.text];return i.index=o.index,i.input=n,i.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(o.replaceWith)),i}):[]};function YY(n){const{editor:e,state:t,from:r,to:o,rule:i,pasteEvent:a,dropEvent:s}=n,{commands:l,chain:c,can:d}=new Hp({editor:e,state:t}),f=[];return t.doc.nodesBetween(r,o,(g,v)=>{if(!g.isTextblock||g.type.spec.code)return;const y=Math.max(r,v),b=Math.min(o,v+g.content.size),_=g.textBetween(y-v,b-v,void 0,"￼");KY(_,i.find,a).forEach(T=>{if(T.index===void 0)return;const k=y+T.index+1,x=k+T[0].length,M={from:t.tr.mapping.map(k),to:t.tr.mapping.map(x)},D=i.handler({state:t,range:M,match:T,commands:l,chain:c,can:d,pasteEvent:a,dropEvent:s});f.push(D)})}),f.every(g=>g!==null)}let Dd=null;const qY=n=>{var e;const t=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=t.clipboardData)===null||e===void 0||e.setData("text/html",n),t};function GY(n){const{editor:e,rules:t}=n;let r=null,o=!1,i=!1,a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,s;try{s=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{s=null}const l=({state:d,from:f,to:m,rule:g,pasteEvt:v})=>{const y=d.tr,b=zp({state:d,transaction:y});if(!(!YY({editor:e,state:b,from:Math.max(f-1,0),to:m.b-1,rule:g,pasteEvent:v,dropEvent:s})||!y.steps.length)){try{s=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{s=null}return a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,y}};return t.map(d=>new no({view(f){const m=v=>{var y;r=!((y=f.dom.parentElement)===null||y===void 0)&&y.contains(v.target)?f.dom.parentElement:null,r&&(Dd=e)},g=()=>{Dd&&(Dd=null)};return window.addEventListener("dragstart",m),window.addEventListener("dragend",g),{destroy(){window.removeEventListener("dragstart",m),window.removeEventListener("dragend",g)}}},props:{handleDOMEvents:{drop:(f,m)=>{if(i=r===f.dom.parentElement,s=m,!i){const g=Dd;g&&setTimeout(()=>{const v=g.state.selection;v&&g.commands.deleteRange({from:v.from,to:v.to})},10)}return!1},paste:(f,m)=>{var g;const v=(g=m.clipboardData)===null||g===void 0?void 0:g.getData("text/html");return a=m,o=!!(v!=null&&v.includes("data-pm-slice")),!1}}},appendTransaction:(f,m,g)=>{const v=f[0],y=v.getMeta("uiEvent")==="paste"&&!o,b=v.getMeta("uiEvent")==="drop"&&!i,_=v.getMeta("applyPasteRules"),w=!!_;if(!y&&!b&&!w)return;if(w){let{text:x}=_;typeof x=="string"?x=x:x=o1(Ve.from(x),g.schema);const{from:M}=_,D=M+x.length,A=qY(x);return l({rule:d,state:g,from:M,to:{b:D},pasteEvt:A})}const T=m.doc.content.findDiffStart(g.doc.content),k=m.doc.content.findDiffEnd(g.doc.content);if(!(!WY(T)||!k||T===k.b))return l({rule:d,state:g,from:T,to:k,pasteEvt:a})}}))}function JY(n){const e=n.filter((t,r)=>n.indexOf(t)!==r);return Array.from(new Set(e))}class kl{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=kl.resolve(e),this.schema=BY(this.extensions,t),this.setupExtensions()}static resolve(e){const t=kl.sort(kl.flatten(e)),r=JY(t.map(o=>o.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(o=>`'${o}'`).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map(t=>{const r={name:t.name,options:t.options,storage:t.storage},o=ft(t,"addExtensions",r);return o?[t,...this.flatten(o())]:t}).flat(10)}static sort(e){return e.sort((r,o)=>{const i=ft(r,"priority")||100,a=ft(o,"priority")||100;return i>a?-1:i<a?1:0})}get commands(){return this.extensions.reduce((e,t)=>{const r={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:Gm(t.name,this.schema)},o=ft(t,"addCommands",r);return o?{...e,...o()}:e},{})}get plugins(){const{editor:e}=this,t=kl.sort([...this.extensions].reverse()),r=[],o=[],i=t.map(a=>{const s={name:a.name,options:a.options,storage:a.storage,editor:e,type:Gm(a.name,this.schema)},l=[],c=ft(a,"addKeyboardShortcuts",s);let d={};if(a.type==="mark"&&ft(a,"exitable",s)&&(d.ArrowRight=()=>wo.handleExit({editor:e,mark:a})),c){const y=Object.fromEntries(Object.entries(c()).map(([b,_])=>[b,()=>_({editor:e})]));d={...d,...y}}const f=hY(d);l.push(f);const m=ft(a,"addInputRules",s);y3(a,e.options.enableInputRules)&&m&&r.push(...m());const g=ft(a,"addPasteRules",s);y3(a,e.options.enablePasteRules)&&g&&o.push(...g());const v=ft(a,"addProseMirrorPlugins",s);if(v){const y=v();l.push(...y)}return l}).flat();return[HY({editor:e,rules:r}),...GY({editor:e,rules:o}),...i]}get attributes(){return p_(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=Up(this.extensions);return Object.fromEntries(t.filter(r=>!!ft(r,"addNodeView")).map(r=>{const o=this.attributes.filter(l=>l.type===r.name),i={name:r.name,options:r.options,storage:r.storage,editor:e,type:rr(r.name,this.schema)},a=ft(r,"addNodeView",i);if(!a)return[];const s=(l,c,d,f,m)=>{const g=Qv(l,o);return a()({node:l,view:c,getPos:d,decorations:f,innerDecorations:m,editor:e,extension:r,HTMLAttributes:g})};return[r.name,s]}))}setupExtensions(){this.extensions.forEach(e=>{var t;this.editor.extensionStorage[e.name]=e.storage;const r={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:Gm(e.name,this.schema)};e.type==="mark"&&(!((t=Jt(ft(e,"keepOnSplit",r)))!==null&&t!==void 0)||t)&&this.splittableMarks.push(e.name);const o=ft(e,"onBeforeCreate",r),i=ft(e,"onCreate",r),a=ft(e,"onUpdate",r),s=ft(e,"onSelectionUpdate",r),l=ft(e,"onTransaction",r),c=ft(e,"onFocus",r),d=ft(e,"onBlur",r),f=ft(e,"onDestroy",r);o&&this.editor.on("beforeCreate",o),i&&this.editor.on("create",i),a&&this.editor.on("update",a),s&&this.editor.on("selectionUpdate",s),l&&this.editor.on("transaction",l),c&&this.editor.on("focus",c),d&&this.editor.on("blur",d),f&&this.editor.on("destroy",f)})}}class yr{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Jt(ft(this,"addOptions",{name:this.name}))),this.storage=Jt(ft(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new yr(e)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>jp(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new yr({...this.config,...e});return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=Jt(ft(t,"addOptions",{name:t.name})),t.storage=Jt(ft(t,"addStorage",{name:t.name,options:t.options})),t}}function m_(n,e,t){const{from:r,to:o}=e,{blockSeparator:i=`

`,textSerializers:a={}}=t||{};let s="";return n.nodesBetween(r,o,(l,c,d,f)=>{var m;l.isBlock&&c>r&&(s+=i);const g=a==null?void 0:a[l.type.name];if(g)return d&&(s+=g({node:l,pos:c,parent:d,index:f,range:e})),!1;l.isText&&(s+=(m=l==null?void 0:l.text)===null||m===void 0?void 0:m.slice(Math.max(r,c)-c,o-c))}),s}function v_(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}const XY=yr.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new no({key:new ia("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:n}=this,{state:e,schema:t}=n,{doc:r,selection:o}=e,{ranges:i}=o,a=Math.min(...i.map(d=>d.$from.pos)),s=Math.max(...i.map(d=>d.$to.pos)),l=v_(t);return m_(r,{from:a,to:s},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),QY=()=>({editor:n,view:e})=>(requestAnimationFrame(()=>{var t;n.isDestroyed||(e.dom.blur(),(t=window==null?void 0:window.getSelection())===null||t===void 0||t.removeAllRanges())}),!0),ZY=(n=!1)=>({commands:e})=>e.setContent("",n),eq=()=>({state:n,tr:e,dispatch:t})=>{const{selection:r}=e,{ranges:o}=r;return t&&o.forEach(({$from:i,$to:a})=>{n.doc.nodesBetween(i.pos,a.pos,(s,l)=>{if(s.type.isText)return;const{doc:c,mapping:d}=e,f=c.resolve(d.map(l)),m=c.resolve(d.map(l+s.nodeSize)),g=f.blockRange(m);if(!g)return;const v=jl(g);if(s.type.isTextblock){const{defaultType:y}=f.parent.contentMatchAt(f.index());e.setNodeMarkup(g.start,y)}(v||v===0)&&e.lift(g,v)})}),!0},tq=n=>e=>n(e),nq=()=>({state:n,dispatch:e})=>u_(n,e),rq=(n,e)=>({editor:t,tr:r})=>{const{state:o}=t,i=o.doc.slice(n.from,n.to);r.deleteRange(n.from,n.to);const a=r.mapping.map(e);return r.insert(a,i.content),r.setSelection(new qt(r.doc.resolve(a-1))),!0},oq=()=>({tr:n,dispatch:e})=>{const{selection:t}=n,r=t.$anchor.node();if(r.content.size>0)return!1;const o=n.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(e){const s=o.before(i),l=o.after(i);n.delete(s,l).scrollIntoView()}return!0}return!1},aq=n=>({tr:e,state:t,dispatch:r})=>{const o=rr(n,t.schema),i=e.selection.$anchor;for(let a=i.depth;a>0;a-=1)if(i.node(a).type===o){if(r){const l=i.before(a),c=i.after(a);e.delete(l,c).scrollIntoView()}return!0}return!1},iq=n=>({tr:e,dispatch:t})=>{const{from:r,to:o}=n;return t&&e.delete(r,o),!0},sq=()=>({state:n,dispatch:e})=>Zg(n,e),lq=()=>({commands:n})=>n.keyboardShortcut("Enter"),uq=()=>({state:n,dispatch:e})=>_Y(n,e);function jf(n,e,t={strict:!0}){const r=Object.keys(e);return r.length?r.every(o=>t.strict?e[o]===n[o]:a1(e[o])?e[o].test(n[o]):e[o]===n[o]):!0}function g_(n,e,t={}){return n.find(r=>r.type===e&&jf(Object.fromEntries(Object.keys(t).map(o=>[o,r.attrs[o]])),t))}function b3(n,e,t={}){return!!g_(n,e,t)}function i1(n,e,t){var r;if(!n||!e)return;let o=n.parent.childAfter(n.parentOffset);if((!o.node||!o.node.marks.some(d=>d.type===e))&&(o=n.parent.childBefore(n.parentOffset)),!o.node||!o.node.marks.some(d=>d.type===e)||(t=t||((r=o.node.marks[0])===null||r===void 0?void 0:r.attrs),!g_([...o.node.marks],e,t)))return;let a=o.index,s=n.start()+o.offset,l=a+1,c=s+o.node.nodeSize;for(;a>0&&b3([...n.parent.child(a-1).marks],e,t);)a-=1,s-=n.parent.child(a).nodeSize;for(;l<n.parent.childCount&&b3([...n.parent.child(l).marks],e,t);)c+=n.parent.child(l).nodeSize,l+=1;return{from:s,to:c}}function Ni(n,e){if(typeof n=="string"){if(!e.marks[n])throw Error(`There is no mark type named '${n}'. Maybe you forgot to add the extension?`);return e.marks[n]}return n}const cq=(n,e={})=>({tr:t,state:r,dispatch:o})=>{const i=Ni(n,r.schema),{doc:a,selection:s}=t,{$from:l,from:c,to:d}=s;if(o){const f=i1(l,i,e);if(f&&f.from<=c&&f.to>=d){const m=qt.create(a,f.from,f.to);t.setSelection(m)}}return!0},dq=n=>e=>{const t=typeof n=="function"?n(e):n;for(let r=0;r<t.length;r+=1)if(t[r](e))return!0;return!1};function y_(n){return n instanceof qt}function ss(n=0,e=0,t=0){return Math.min(Math.max(n,e),t)}function b_(n,e=null){if(!e)return null;const t=nn.atStart(n),r=nn.atEnd(n);if(e==="start"||e===!0)return t;if(e==="end")return r;const o=t.from,i=r.to;return e==="all"?qt.create(n,ss(0,o,i),ss(n.content.size,o,i)):qt.create(n,ss(e,o,i),ss(e,o,i))}function fq(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function s1(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const pq=(n=null,e={})=>({editor:t,view:r,tr:o,dispatch:i})=>{e={scrollIntoView:!0,...e};const a=()=>{(s1()||fq())&&r.dom.focus(),requestAnimationFrame(()=>{t.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&t.commands.scrollIntoView())})};if(r.hasFocus()&&n===null||n===!1)return!0;if(i&&n===null&&!y_(t.state.selection))return a(),!0;const s=b_(o.doc,n)||t.state.selection,l=t.state.selection.eq(s);return i&&(l||o.setSelection(s),l&&o.storedMarks&&o.setStoredMarks(o.storedMarks),a()),!0},hq=(n,e)=>t=>n.every((r,o)=>e(r,{...t,index:o})),mq=(n,e)=>({tr:t,commands:r})=>r.insertContentAt({from:t.selection.from,to:t.selection.to},n,e),S_=n=>{const e=n.childNodes;for(let t=e.length-1;t>=0;t-=1){const r=e[t];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?n.removeChild(r):r.nodeType===1&&S_(r)}return n};function Nd(n){const e=`<body>${n}</body>`,t=new window.DOMParser().parseFromString(e,"text/html").body;return S_(t)}function Kf(n,e,t){if(n instanceof mi||n instanceof Ve)return n;t={slice:!0,parseOptions:{},...t};const r=typeof n=="object"&&n!==null,o=typeof n=="string";if(r)try{if(Array.isArray(n)&&n.length>0)return Ve.fromArray(n.map(s=>e.nodeFromJSON(s)));const a=e.nodeFromJSON(n);return t.errorOnInvalidContent&&a.check(),a}catch(i){if(t.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",i),Kf("",e,t)}if(o){if(t.errorOnInvalidContent){let a=!1,s="";const l=new o8({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(a=!0,s=typeof c=="string"?c:c.outerHTML,null)}]}})});if(t.slice?vi.fromSchema(l).parseSlice(Nd(n),t.parseOptions):vi.fromSchema(l).parse(Nd(n),t.parseOptions),t.errorOnInvalidContent&&a)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${s}`)})}const i=vi.fromSchema(e);return t.slice?i.parseSlice(Nd(n),t.parseOptions).content:i.parse(Nd(n),t.parseOptions)}return Kf("",e,t)}function vq(n,e,t){const r=n.steps.length-1;if(r<e)return;const o=n.steps[r];if(!(o instanceof Zn||o instanceof nr))return;const i=n.mapping.maps[r];let a=0;i.forEach((s,l,c,d)=>{a===0&&(a=d)}),n.setSelection(nn.near(n.doc.resolve(a),t))}const gq=n=>!("type"in n),yq=(n,e,t)=>({tr:r,dispatch:o,editor:i})=>{var a;if(o){t={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...t};let s;try{s=Kf(e,i.schema,{parseOptions:{preserveWhitespace:"full",...t.parseOptions},errorOnInvalidContent:(a=t.errorOnInvalidContent)!==null&&a!==void 0?a:i.options.enableContentCheck})}catch(v){return i.emit("contentError",{editor:i,error:v,disableCollaboration:()=>{i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}}),!1}let{from:l,to:c}=typeof n=="number"?{from:n,to:n}:{from:n.from,to:n.to},d=!0,f=!0;if((gq(s)?s:[s]).forEach(v=>{v.check(),d=d?v.isText&&v.marks.length===0:!1,f=f?v.isBlock:!1}),l===c&&f){const{parent:v}=r.doc.resolve(l);v.isTextblock&&!v.type.spec.code&&!v.childCount&&(l-=1,c+=1)}let g;if(d){if(Array.isArray(e))g=e.map(v=>v.text||"").join("");else if(e instanceof Ve){let v="";e.forEach(y=>{y.text&&(v+=y.text)}),g=v}else typeof e=="object"&&e&&e.text?g=e.text:g=e;r.insertText(g,l,c)}else g=s,r.replaceWith(l,c,g);t.updateSelection&&vq(r,r.steps.length-1,-1),t.applyInputRules&&r.setMeta("applyInputRules",{from:l,text:g}),t.applyPasteRules&&r.setMeta("applyPasteRules",{from:l,text:g})}return!0},bq=()=>({state:n,dispatch:e})=>yY(n,e),Sq=()=>({state:n,dispatch:e})=>bY(n,e),_q=()=>({state:n,dispatch:e})=>n_(n,e),wq=()=>({state:n,dispatch:e})=>i_(n,e),xq=()=>({state:n,dispatch:e,tr:t})=>{try{const r=Dp(n.doc,n.selection.$from.pos,-1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch{return!1}},kq=()=>({state:n,dispatch:e,tr:t})=>{try{const r=Dp(n.doc,n.selection.$from.pos,1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch{return!1}},Cq=()=>({state:n,dispatch:e})=>vY(n,e),Iq=()=>({state:n,dispatch:e})=>gY(n,e);function __(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function Eq(n){const e=n.split(/-(?!$)/);let t=e[e.length-1];t==="Space"&&(t=" ");let r,o,i,a;for(let s=0;s<e.length-1;s+=1){const l=e[s];if(/^(cmd|meta|m)$/i.test(l))a=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))o=!0;else if(/^s(hift)?$/i.test(l))i=!0;else if(/^mod$/i.test(l))s1()||__()?a=!0:o=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return r&&(t=`Alt-${t}`),o&&(t=`Ctrl-${t}`),a&&(t=`Meta-${t}`),i&&(t=`Shift-${t}`),t}const Tq=n=>({editor:e,view:t,tr:r,dispatch:o})=>{const i=Eq(n).split(/-(?!$)/),a=i.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),s=new KeyboardEvent("keydown",{key:a==="Space"?" ":a,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{t.someProp("handleKeyDown",c=>c(t,s))});return l==null||l.steps.forEach(c=>{const d=c.map(r.mapping);d&&o&&r.maybeStep(d)}),!0};function ac(n,e,t={}){const{from:r,to:o,empty:i}=n.selection,a=e?rr(e,n.schema):null,s=[];n.doc.nodesBetween(r,o,(f,m)=>{if(f.isText)return;const g=Math.max(r,m),v=Math.min(o,m+f.nodeSize);s.push({node:f,from:g,to:v})});const l=o-r,c=s.filter(f=>a?a.name===f.node.type.name:!0).filter(f=>jf(f.node.attrs,t,{strict:!1}));return i?!!c.length:c.reduce((f,m)=>f+m.to-m.from,0)>=l}const Mq=(n,e={})=>({state:t,dispatch:r})=>{const o=rr(n,t.schema);return ac(t,o,e)?SY(t,r):!1},Oq=()=>({state:n,dispatch:e})=>c_(n,e),Aq=n=>({state:e,dispatch:t})=>{const r=rr(n,e.schema);return PY(r)(e,t)},Pq=()=>({state:n,dispatch:e})=>l_(n,e);function Kp(n,e){return e.nodes[n]?"node":e.marks[n]?"mark":null}function S3(n,e){const t=typeof e=="string"?[e]:e;return Object.keys(n).reduce((r,o)=>(t.includes(o)||(r[o]=n[o]),r),{})}const $q=(n,e)=>({tr:t,state:r,dispatch:o})=>{let i=null,a=null;const s=Kp(typeof n=="string"?n:n.name,r.schema);return s?(s==="node"&&(i=rr(n,r.schema)),s==="mark"&&(a=Ni(n,r.schema)),o&&t.selection.ranges.forEach(l=>{r.doc.nodesBetween(l.$from.pos,l.$to.pos,(c,d)=>{i&&i===c.type&&t.setNodeMarkup(d,void 0,S3(c.attrs,e)),a&&c.marks.length&&c.marks.forEach(f=>{a===f.type&&t.addMark(d,d+c.nodeSize,a.create(S3(f.attrs,e)))})})}),!0):!1},Rq=()=>({tr:n,dispatch:e})=>(e&&n.scrollIntoView(),!0),Dq=()=>({tr:n,dispatch:e})=>{if(e){const t=new eo(n.doc);n.setSelection(t)}return!0},Nq=()=>({state:n,dispatch:e})=>o_(n,e),Fq=()=>({state:n,dispatch:e})=>s_(n,e),Lq=()=>({state:n,dispatch:e})=>kY(n,e),Bq=()=>({state:n,dispatch:e})=>EY(n,e),Vq=()=>({state:n,dispatch:e})=>IY(n,e);function Zv(n,e,t={},r={}){return Kf(n,e,{slice:!1,parseOptions:t,errorOnInvalidContent:r.errorOnInvalidContent})}const zq=(n,e=!1,t={},r={})=>({editor:o,tr:i,dispatch:a,commands:s})=>{var l,c;const{doc:d}=i;if(t.preserveWhitespace!=="full"){const f=Zv(n,o.schema,t,{errorOnInvalidContent:(l=r.errorOnInvalidContent)!==null&&l!==void 0?l:o.options.enableContentCheck});return a&&i.replaceWith(0,d.content.size,f).setMeta("preventUpdate",!e),!0}return a&&i.setMeta("preventUpdate",!e),s.insertContentAt({from:0,to:d.content.size},n,{parseOptions:t,errorOnInvalidContent:(c=r.errorOnInvalidContent)!==null&&c!==void 0?c:o.options.enableContentCheck})};function l1(n,e){const t=Ni(e,n.schema),{from:r,to:o,empty:i}=n.selection,a=[];i?(n.storedMarks&&a.push(...n.storedMarks),a.push(...n.selection.$head.marks())):n.doc.nodesBetween(r,o,l=>{a.push(...l.marks)});const s=a.find(l=>l.type.name===t.name);return s?{...s.attrs}:{}}function Hq(n,e){const t=new b8(n);return e.forEach(r=>{r.steps.forEach(o=>{t.step(o)})}),t}function Uq(n){for(let e=0;e<n.edgeCount;e+=1){const{type:t}=n.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}function Wq(n,e,t){const r=[];return n.nodesBetween(e.from,e.to,(o,i)=>{t(o)&&r.push({node:o,pos:i})}),r}function jq(n,e){for(let t=n.depth;t>0;t-=1){const r=n.node(t);if(e(r))return{pos:t>0?n.before(t):0,start:n.start(t),depth:t,node:r}}}function u1(n){return e=>jq(e.$from,n)}function Kq(n,e){const t={from:0,to:n.content.size};return m_(n,t,e)}function Yq(n,e){const t=rr(e,n.schema),{from:r,to:o}=n.selection,i=[];n.doc.nodesBetween(r,o,s=>{i.push(s)});const a=i.reverse().find(s=>s.type.name===t.name);return a?{...a.attrs}:{}}function w_(n,e){const t=Kp(typeof e=="string"?e:e.name,n.schema);return t==="node"?Yq(n,e):t==="mark"?l1(n,e):{}}function qq(n,e=JSON.stringify){const t={};return n.filter(r=>{const o=e(r);return Object.prototype.hasOwnProperty.call(t,o)?!1:t[o]=!0})}function Gq(n){const e=qq(n);return e.length===1?e:e.filter((t,r)=>!e.filter((i,a)=>a!==r).some(i=>t.oldRange.from>=i.oldRange.from&&t.oldRange.to<=i.oldRange.to&&t.newRange.from>=i.newRange.from&&t.newRange.to<=i.newRange.to))}function Jq(n){const{mapping:e,steps:t}=n,r=[];return e.maps.forEach((o,i)=>{const a=[];if(o.ranges.length)o.forEach((s,l)=>{a.push({from:s,to:l})});else{const{from:s,to:l}=t[i];if(s===void 0||l===void 0)return;a.push({from:s,to:l})}a.forEach(({from:s,to:l})=>{const c=e.slice(i).map(s,-1),d=e.slice(i).map(l),f=e.invert().map(c,-1),m=e.invert().map(d);r.push({oldRange:{from:f,to:m},newRange:{from:c,to:d}})})}),Gq(r)}function c1(n,e,t){const r=[];return n===e?t.resolve(n).marks().forEach(o=>{const i=t.resolve(n),a=i1(i,o.type);a&&r.push({mark:o,...a})}):t.nodesBetween(n,e,(o,i)=>{!o||(o==null?void 0:o.nodeSize)===void 0||r.push(...o.marks.map(a=>({from:i,to:i+o.nodeSize,mark:a})))}),r}function ff(n,e,t){return Object.fromEntries(Object.entries(t).filter(([r])=>{const o=n.find(i=>i.type===e&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}function eg(n,e,t={}){const{empty:r,ranges:o}=n.selection,i=e?Ni(e,n.schema):null;if(r)return!!(n.storedMarks||n.selection.$from.marks()).filter(f=>i?i.name===f.type.name:!0).find(f=>jf(f.attrs,t,{strict:!1}));let a=0;const s=[];if(o.forEach(({$from:f,$to:m})=>{const g=f.pos,v=m.pos;n.doc.nodesBetween(g,v,(y,b)=>{if(!y.isText&&!y.marks.length)return;const _=Math.max(g,b),w=Math.min(v,b+y.nodeSize),T=w-_;a+=T,s.push(...y.marks.map(k=>({mark:k,from:_,to:w})))})}),a===0)return!1;const l=s.filter(f=>i?i.name===f.mark.type.name:!0).filter(f=>jf(f.mark.attrs,t,{strict:!1})).reduce((f,m)=>f+m.to-m.from,0),c=s.filter(f=>i?f.mark.type!==i&&f.mark.type.excludes(i):!0).reduce((f,m)=>f+m.to-m.from,0);return(l>0?l+c:l)>=a}function Xq(n,e,t={}){if(!e)return ac(n,null,t)||eg(n,null,t);const r=Kp(e,n.schema);return r==="node"?ac(n,e,t):r==="mark"?eg(n,e,t):!1}function _3(n,e){const{nodeExtensions:t}=Up(e),r=t.find(a=>a.name===n);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},i=Jt(ft(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function d1(n,{checkChildren:e=!0,ignoreWhitespace:t=!1}={}){var r;if(t){if(n.type.name==="hardBreak")return!0;if(n.isText)return/^\s*$/m.test((r=n.text)!==null&&r!==void 0?r:"")}if(n.isText)return!n.text;if(n.isAtom||n.isLeaf)return!1;if(n.content.childCount===0)return!0;if(e){let o=!0;return n.content.forEach(i=>{o!==!1&&(d1(i,{ignoreWhitespace:t,checkChildren:e})||(o=!1))}),o}return!1}function Qq(n,e,t){var r;const{selection:o}=e;let i=null;if(y_(o)&&(i=o.$cursor),i){const s=(r=n.storedMarks)!==null&&r!==void 0?r:i.marks();return!!t.isInSet(s)||!s.some(l=>l.type.excludes(t))}const{ranges:a}=o;return a.some(({$from:s,$to:l})=>{let c=s.depth===0?n.doc.inlineContent&&n.doc.type.allowsMarkType(t):!1;return n.doc.nodesBetween(s.pos,l.pos,(d,f,m)=>{if(c)return!1;if(d.isInline){const g=!m||m.type.allowsMarkType(t),v=!!t.isInSet(d.marks)||!d.marks.some(y=>y.type.excludes(t));c=g&&v}return!c}),c})}const Zq=(n,e={})=>({tr:t,state:r,dispatch:o})=>{const{selection:i}=t,{empty:a,ranges:s}=i,l=Ni(n,r.schema);if(o)if(a){const c=l1(r,l);t.addStoredMark(l.create({...c,...e}))}else s.forEach(c=>{const d=c.$from.pos,f=c.$to.pos;r.doc.nodesBetween(d,f,(m,g)=>{const v=Math.max(g,d),y=Math.min(g+m.nodeSize,f);m.marks.find(_=>_.type===l)?m.marks.forEach(_=>{l===_.type&&t.addMark(v,y,l.create({..._.attrs,...e}))}):t.addMark(v,y,l.create(e))})});return Qq(r,t,l)},eG=(n,e)=>({tr:t})=>(t.setMeta(n,e),!0),tG=(n,e={})=>({state:t,dispatch:r,chain:o})=>{const i=rr(n,t.schema);let a;return t.selection.$anchor.sameParent(t.selection.$head)&&(a=t.selection.$anchor.parent.attrs),i.isTextblock?o().command(({commands:s})=>m3(i,{...a,...e})(t)?!0:s.clearNodes()).command(({state:s})=>m3(i,{...a,...e})(s,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},nG=n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,o=ss(n,0,r.content.size),i=Ot.create(r,o);e.setSelection(i)}return!0},rG=n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,{from:o,to:i}=typeof n=="number"?{from:n,to:n}:n,a=qt.atStart(r).from,s=qt.atEnd(r).to,l=ss(o,a,s),c=ss(i,a,s),d=qt.create(r,l,c);e.setSelection(d)}return!0},oG=n=>({state:e,dispatch:t})=>{const r=rr(n,e.schema);return DY(r)(e,t)};function w3(n,e){const t=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();if(t){const r=t.filter(o=>e==null?void 0:e.includes(o.type.name));n.tr.ensureMarks(r)}}const aG=({keepMarks:n=!0}={})=>({tr:e,state:t,dispatch:r,editor:o})=>{const{selection:i,doc:a}=e,{$from:s,$to:l}=i,c=o.extensionManager.attributes,d=ff(c,s.node().type.name,s.node().attrs);if(i instanceof Ot&&i.node.isBlock)return!s.parentOffset||!$a(a,s.pos)?!1:(r&&(n&&w3(t,o.extensionManager.splittableMarks),e.split(s.pos).scrollIntoView()),!0);if(!s.parent.isBlock)return!1;const f=l.parentOffset===l.parent.content.size,m=s.depth===0?void 0:Uq(s.node(-1).contentMatchAt(s.indexAfter(-1)));let g=f&&m?[{type:m,attrs:d}]:void 0,v=$a(e.doc,e.mapping.map(s.pos),1,g);if(!g&&!v&&$a(e.doc,e.mapping.map(s.pos),1,m?[{type:m}]:void 0)&&(v=!0,g=m?[{type:m,attrs:d}]:void 0),r){if(v&&(i instanceof qt&&e.deleteSelection(),e.split(e.mapping.map(s.pos),1,g),m&&!f&&!s.parentOffset&&s.parent.type!==m)){const y=e.mapping.map(s.before()),b=e.doc.resolve(y);s.node(-1).canReplaceWith(b.index(),b.index()+1,m)&&e.setNodeMarkup(e.mapping.map(s.before()),m)}n&&w3(t,o.extensionManager.splittableMarks),e.scrollIntoView()}return v},iG=(n,e={})=>({tr:t,state:r,dispatch:o,editor:i})=>{var a;const s=rr(n,r.schema),{$from:l,$to:c}=r.selection,d=r.selection.node;if(d&&d.isBlock||l.depth<2||!l.sameParent(c))return!1;const f=l.node(-1);if(f.type!==s)return!1;const m=i.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==s||l.index(-2)!==l.node(-2).childCount-1)return!1;if(o){let _=Ve.empty;const w=l.index(-1)?1:l.index(-2)?2:3;for(let A=l.depth-w;A>=l.depth-3;A-=1)_=Ve.from(l.node(A).copy(_));const T=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,k={...ff(m,l.node().type.name,l.node().attrs),...e},x=((a=s.contentMatch.defaultType)===null||a===void 0?void 0:a.createAndFill(k))||void 0;_=_.append(Ve.from(s.createAndFill(null,x)||void 0));const M=l.before(l.depth-(w-1));t.replace(M,l.after(-T),new Ze(_,4-w,0));let D=-1;t.doc.nodesBetween(M,t.doc.content.size,(A,P)=>{if(D>-1)return!1;A.isTextblock&&A.content.size===0&&(D=P+1)}),D>-1&&t.setSelection(qt.near(t.doc.resolve(D))),t.scrollIntoView()}return!0}const g=c.pos===l.end()?f.contentMatchAt(0).defaultType:null,v={...ff(m,f.type.name,f.attrs),...e},y={...ff(m,l.node().type.name,l.node().attrs),...e};t.delete(l.pos,c.pos);const b=g?[{type:s,attrs:v},{type:g,attrs:y}]:[{type:s,attrs:v}];if(!$a(t.doc,l.pos,2))return!1;if(o){const{selection:_,storedMarks:w}=r,{splittableMarks:T}=i.extensionManager,k=w||_.$to.parentOffset&&_.$from.marks();if(t.split(l.pos,2,b).scrollIntoView(),!k||!o)return!0;const x=k.filter(M=>T.includes(M.type.name));t.ensureMarks(x)}return!0},Jm=(n,e)=>{const t=u1(a=>a.type===e)(n.selection);if(!t)return!0;const r=n.doc.resolve(Math.max(0,t.pos-1)).before(t.depth);if(r===void 0)return!0;const o=n.doc.nodeAt(r);return t.node.type===(o==null?void 0:o.type)&&Ri(n.doc,t.pos)&&n.join(t.pos),!0},Xm=(n,e)=>{const t=u1(a=>a.type===e)(n.selection);if(!t)return!0;const r=n.doc.resolve(t.start).after(t.depth);if(r===void 0)return!0;const o=n.doc.nodeAt(r);return t.node.type===(o==null?void 0:o.type)&&Ri(n.doc,r)&&n.join(r),!0},sG=(n,e,t,r={})=>({editor:o,tr:i,state:a,dispatch:s,chain:l,commands:c,can:d})=>{const{extensions:f,splittableMarks:m}=o.extensionManager,g=rr(n,a.schema),v=rr(e,a.schema),{selection:y,storedMarks:b}=a,{$from:_,$to:w}=y,T=_.blockRange(w),k=b||y.$to.parentOffset&&y.$from.marks();if(!T)return!1;const x=u1(M=>_3(M.type.name,f))(y);if(T.depth>=1&&x&&T.depth-x.depth<=1){if(x.node.type===g)return c.liftListItem(v);if(_3(x.node.type.name,f)&&g.validContent(x.node.content)&&s)return l().command(()=>(i.setNodeMarkup(x.pos,g),!0)).command(()=>Jm(i,g)).command(()=>Xm(i,g)).run()}return!t||!k||!s?l().command(()=>d().wrapInList(g,r)?!0:c.clearNodes()).wrapInList(g,r).command(()=>Jm(i,g)).command(()=>Xm(i,g)).run():l().command(()=>{const M=d().wrapInList(g,r),D=k.filter(A=>m.includes(A.type.name));return i.ensureMarks(D),M?!0:c.clearNodes()}).wrapInList(g,r).command(()=>Jm(i,g)).command(()=>Xm(i,g)).run()},lG=(n,e={},t={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=t,a=Ni(n,r.schema);return eg(r,a,e)?o.unsetMark(a,{extendEmptyMarkRange:i}):o.setMark(a,e)},uG=(n,e,t={})=>({state:r,commands:o})=>{const i=rr(n,r.schema),a=rr(e,r.schema),s=ac(r,i,t);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),s?o.setNode(a,l):o.setNode(i,{...l,...t})},cG=(n,e={})=>({state:t,commands:r})=>{const o=rr(n,t.schema);return ac(t,o,e)?r.lift(o):r.wrapIn(o,e)},dG=()=>({state:n,dispatch:e})=>{const t=n.plugins;for(let r=0;r<t.length;r+=1){const o=t[r];let i;if(o.spec.isInputRules&&(i=o.getState(n))){if(e){const a=n.tr,s=i.transform;for(let l=s.steps.length-1;l>=0;l-=1)a.step(s.steps[l].invert(s.docs[l]));if(i.text){const l=a.doc.resolve(i.from).marks();a.replaceWith(i.from,i.to,n.schema.text(i.text,l))}else a.delete(i.from,i.to)}return!0}}return!1},fG=()=>({tr:n,dispatch:e})=>{const{selection:t}=n,{empty:r,ranges:o}=t;return r||e&&o.forEach(i=>{n.removeMark(i.$from.pos,i.$to.pos)}),!0},pG=(n,e={})=>({tr:t,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:a=!1}=e,{selection:s}=t,l=Ni(n,r.schema),{$from:c,empty:d,ranges:f}=s;if(!o)return!0;if(d&&a){let{from:m,to:g}=s;const v=(i=c.marks().find(b=>b.type===l))===null||i===void 0?void 0:i.attrs,y=i1(c,l,v);y&&(m=y.from,g=y.to),t.removeMark(m,g,l)}else f.forEach(m=>{t.removeMark(m.$from.pos,m.$to.pos,l)});return t.removeStoredMark(l),!0},hG=(n,e={})=>({tr:t,state:r,dispatch:o})=>{let i=null,a=null;const s=Kp(typeof n=="string"?n:n.name,r.schema);return s?(s==="node"&&(i=rr(n,r.schema)),s==="mark"&&(a=Ni(n,r.schema)),o&&t.selection.ranges.forEach(l=>{const c=l.$from.pos,d=l.$to.pos;let f,m,g,v;t.selection.empty?r.doc.nodesBetween(c,d,(y,b)=>{i&&i===y.type&&(g=Math.max(b,c),v=Math.min(b+y.nodeSize,d),f=b,m=y)}):r.doc.nodesBetween(c,d,(y,b)=>{b<c&&i&&i===y.type&&(g=Math.max(b,c),v=Math.min(b+y.nodeSize,d),f=b,m=y),b>=c&&b<=d&&(i&&i===y.type&&t.setNodeMarkup(b,void 0,{...y.attrs,...e}),a&&y.marks.length&&y.marks.forEach(_=>{if(a===_.type){const w=Math.max(b,c),T=Math.min(b+y.nodeSize,d);t.addMark(w,T,a.create({..._.attrs,...e}))}}))}),m&&(f!==void 0&&t.setNodeMarkup(f,void 0,{...m.attrs,...e}),a&&m.marks.length&&m.marks.forEach(y=>{a===y.type&&t.addMark(g,v,a.create({...y.attrs,...e}))}))}),!0):!1},mG=(n,e={})=>({state:t,dispatch:r})=>{const o=rr(n,t.schema);return TY(o,e)(t,r)},vG=(n,e={})=>({state:t,dispatch:r})=>{const o=rr(n,t.schema);return MY(o,e)(t,r)};var gG=Object.freeze({__proto__:null,blur:QY,clearContent:ZY,clearNodes:eq,command:tq,createParagraphNear:nq,cut:rq,deleteCurrentNode:oq,deleteNode:aq,deleteRange:iq,deleteSelection:sq,enter:lq,exitCode:uq,extendMarkRange:cq,first:dq,focus:pq,forEach:hq,insertContent:mq,insertContentAt:yq,joinBackward:_q,joinDown:Sq,joinForward:wq,joinItemBackward:xq,joinItemForward:kq,joinTextblockBackward:Cq,joinTextblockForward:Iq,joinUp:bq,keyboardShortcut:Tq,lift:Mq,liftEmptyBlock:Oq,liftListItem:Aq,newlineInCode:Pq,resetAttributes:$q,scrollIntoView:Rq,selectAll:Dq,selectNodeBackward:Nq,selectNodeForward:Fq,selectParentNode:Lq,selectTextblockEnd:Bq,selectTextblockStart:Vq,setContent:zq,setMark:Zq,setMeta:eG,setNode:tG,setNodeSelection:nG,setTextSelection:rG,sinkListItem:oG,splitBlock:aG,splitListItem:iG,toggleList:sG,toggleMark:lG,toggleNode:uG,toggleWrap:cG,undoInputRule:dG,unsetAllMarks:fG,unsetMark:pG,updateAttributes:hG,wrapIn:mG,wrapInList:vG});const yG=yr.create({name:"commands",addCommands(){return{...gG}}}),bG=yr.create({name:"drop",addProseMirrorPlugins(){return[new no({key:new ia("tiptapDrop"),props:{handleDrop:(n,e,t,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:t,moved:r})}}})]}}),SG=yr.create({name:"editable",addProseMirrorPlugins(){return[new no({key:new ia("editable"),props:{editable:()=>this.editor.options.editable}})]}}),_G=yr.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:n}=this;return[new no({key:new ia("focusEvents"),props:{handleDOMEvents:{focus:(e,t)=>{n.isFocused=!0;const r=n.state.tr.setMeta("focus",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,t)=>{n.isFocused=!1;const r=n.state.tr.setMeta("blur",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),wG=yr.create({name:"keymap",addKeyboardShortcuts(){const n=()=>this.editor.commands.first(({commands:a})=>[()=>a.undoInputRule(),()=>a.command(({tr:s})=>{const{selection:l,doc:c}=s,{empty:d,$anchor:f}=l,{pos:m,parent:g}=f,v=f.parent.isTextblock&&m>0?s.doc.resolve(m-1):f,y=v.parent.type.spec.isolating,b=f.pos-f.parentOffset,_=y&&v.parent.childCount===1?b===f.pos:nn.atStart(c).from===m;return!d||!g.type.isTextblock||g.textContent.length||!_||_&&f.parent.type.name==="paragraph"?!1:a.clearNodes()}),()=>a.deleteSelection(),()=>a.joinBackward(),()=>a.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:a})=>[()=>a.deleteSelection(),()=>a.deleteCurrentNode(),()=>a.joinForward(),()=>a.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:a})=>[()=>a.newlineInCode(),()=>a.createParagraphNear(),()=>a.liftEmptyBlock(),()=>a.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:n,"Mod-Backspace":n,"Shift-Backspace":n,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":n,"Alt-Backspace":n,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return s1()||__()?i:o},addProseMirrorPlugins(){return[new no({key:new ia("clearDocument"),appendTransaction:(n,e,t)=>{if(n.some(y=>y.getMeta("composition")))return;const r=n.some(y=>y.docChanged)&&!e.doc.eq(t.doc),o=n.some(y=>y.getMeta("preventClearDocument"));if(!r||o)return;const{empty:i,from:a,to:s}=e.selection,l=nn.atStart(e.doc).from,c=nn.atEnd(e.doc).to;if(i||!(a===l&&s===c)||!d1(t.doc))return;const m=t.tr,g=zp({state:t,transaction:m}),{commands:v}=new Hp({editor:this.editor,state:g});if(v.clearNodes(),!!m.steps.length)return m}})]}}),xG=yr.create({name:"paste",addProseMirrorPlugins(){return[new no({key:new ia("tiptapPaste"),props:{handlePaste:(n,e,t)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:t})}}})]}}),kG=yr.create({name:"tabindex",addProseMirrorPlugins(){return[new no({key:new ia("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class es{get name(){return this.node.type.name}constructor(e,t,r=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=t,this.currentNode=o}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!==null&&e!==void 0?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let t=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}t=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:t,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),t=this.resolvedPos.doc.resolve(e);return new es(t,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new es(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new es(e,this.editor)}get children(){const e=[];return this.node.content.forEach((t,r)=>{const o=t.isBlock&&!t.isTextblock,i=t.isAtom&&!t.isText,a=this.pos+r+(i?0:1),s=this.resolvedPos.doc.resolve(a);if(!o&&s.depth<=this.depth)return;const l=new es(s,this.editor,o,o?t:null);o&&(l.actualDepth=this.depth+1),e.push(new es(s,this.editor,o,o?t:null))}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,t={}){let r=null,o=this.parent;for(;o&&!r;){if(o.node.type.name===e)if(Object.keys(t).length>0){const i=o.node.attrs,a=Object.keys(t);for(let s=0;s<a.length;s+=1){const l=a[s];if(i[l]!==t[l])break}}else r=o;o=o.parent}return r}querySelector(e,t={}){return this.querySelectorAll(e,t,!0)[0]||null}querySelectorAll(e,t={},r=!1){let o=[];if(!this.children||this.children.length===0)return o;const i=Object.keys(t);return this.children.forEach(a=>{r&&o.length>0||(a.node.type.name===e&&i.every(l=>t[l]===a.node.attrs[l])&&o.push(a),!(r&&o.length>0)&&(o=o.concat(a.querySelectorAll(e,t,r))))}),o}setAttribute(e){const{tr:t}=this.editor.state;t.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(t)}}const CG=`.ProseMirror {
  position: relative;
}

.ProseMirror {
  word-wrap: break-word;
  white-space: pre-wrap;
  white-space: break-spaces;
  -webkit-font-variant-ligatures: none;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
}

.ProseMirror [contenteditable="false"] {
  white-space: normal;
}

.ProseMirror [contenteditable="false"] [contenteditable="true"] {
  white-space: pre-wrap;
}

.ProseMirror pre {
  white-space: pre-wrap;
}

img.ProseMirror-separator {
  display: inline !important;
  border: none !important;
  margin: 0 !important;
  width: 0 !important;
  height: 0 !important;
}

.ProseMirror-gapcursor {
  display: none;
  pointer-events: none;
  position: absolute;
  margin: 0;
}

.ProseMirror-gapcursor:after {
  content: "";
  display: block;
  position: absolute;
  top: -2px;
  width: 20px;
  border-top: 1px solid black;
  animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
}

@keyframes ProseMirror-cursor-blink {
  to {
    visibility: hidden;
  }
}

.ProseMirror-hideselection *::selection {
  background: transparent;
}

.ProseMirror-hideselection *::-moz-selection {
  background: transparent;
}

.ProseMirror-hideselection * {
  caret-color: transparent;
}

.ProseMirror-focused .ProseMirror-gapcursor {
  display: block;
}

.tippy-box[data-animation=fade][data-state=hidden] {
  opacity: 0
}`;function IG(n,e,t){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const o=document.createElement("style");return e&&o.setAttribute("nonce",e),o.setAttribute("data-tiptap-style",""),o.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(o),o}let EG=class extends NY{constructor(e={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:t})=>{throw t},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:t,slice:r,moved:o})=>this.options.onDrop(t,r,o)),this.on("paste",({event:t,slice:r})=>this.options.onPaste(t,r)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=IG(CG,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,t){const r=h_(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],o=this.state.reconfigure({plugins:r});return this.view.updateState(o),o}unregisterPlugin(e){if(this.isDestroyed)return;const t=this.state.plugins;let r=t;if([].concat(e).forEach(i=>{const a=typeof i=="string"?`${i}$`:i.key;r=t.filter(s=>!s.key.startsWith(a))}),t.length===r.length)return;const o=this.state.reconfigure({plugins:r});return this.view.updateState(o),o}createExtensionManager(){var e,t;const o=[...this.options.enableCoreExtensions?[SG,XY.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||t===void 0?void 0:t.blockSeparator}),yG,_G,wG,kG,bG,xG].filter(i=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[i.name]!==!1:!0):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i==null?void 0:i.type));this.extensionManager=new kl(o,this)}createCommandManager(){this.commandManager=new Hp({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var e;let t;try{t=Zv(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(a){if(!(a instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(a.message))throw a;this.emit("contentError",{editor:this,error:a,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(s=>s.name!=="collaboration"),this.createExtensionManager()}}),t=Zv(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const r=b_(t,this.options.autofocus);this.view=new oY(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(e=this.options.editorProps)===null||e===void 0?void 0:e.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:xl.create({doc:t,selection:r||void 0})});const o=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(o),this.createNodeViews(),this.prependClass();const i=this.view.dom;i.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(a=>{var s;return(s=this.capturedTransaction)===null||s===void 0?void 0:s.step(a)});return}const t=this.state.apply(e),r=!this.state.selection.eq(t.selection);this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});const o=e.getMeta("focus"),i=e.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:e}),i&&this.emit("blur",{editor:this,event:i.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return w_(this.state,e)}isActive(e,t){const r=typeof e=="string"?e:null,o=typeof e=="string"?t:e;return Xq(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return o1(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t=`

`,textSerializers:r={}}=e||{};return Kq(this.state.doc,{blockSeparator:t,textSerializers:{...v_(this.schema),...r}})}get isEmpty(){return d1(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const e=this.view.dom;e&&e.editor&&delete e.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}$node(e,t){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelector(e,t))||null}$nodes(e,t){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelectorAll(e,t))||null}$pos(e){const t=this.state.doc.resolve(e);return new es(t,this)}get $doc(){return this.$pos(0)}};function ic(n){return new Wp({find:n.find,handler:({state:e,range:t,match:r})=>{const o=Jt(n.getAttributes,void 0,r);if(o===!1||o===null)return null;const{tr:i}=e,a=r[r.length-1],s=r[0];if(a){const l=s.search(/\S/),c=t.from+s.indexOf(a),d=c+a.length;if(c1(t.from,t.to,e.doc).filter(g=>g.mark.type.excluded.find(y=>y===n.type&&y!==g.mark.type)).filter(g=>g.to>c).length)return null;d<t.to&&i.delete(d,t.to),c>t.from&&i.delete(t.from+l,c);const m=t.from+l+a.length;i.addMark(t.from+l,m,n.type.create(o||{})),i.removeStoredMark(n.type)}}})}function TG(n){return new Wp({find:n.find,handler:({state:e,range:t,match:r})=>{const o=Jt(n.getAttributes,void 0,r)||{},{tr:i}=e,a=t.from;let s=t.to;const l=n.type.create(o);if(r[1]){const c=r[0].lastIndexOf(r[1]);let d=a+c;d>s?d=s:s=d+r[1].length;const f=r[0][r[0].length-1];i.insertText(f,a+r[0].length-1),i.replaceWith(d,s,l)}else if(r[0]){const c=n.type.isInline?a:a-1;i.insert(c,n.type.create(o)).delete(i.mapping.map(a),i.mapping.map(s))}i.scrollIntoView()}})}function MG(n){return new Wp({find:n.find,handler:({state:e,range:t,match:r})=>{const o=e.doc.resolve(t.from),i=Jt(n.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),n.type))return null;e.tr.delete(t.from,t.to).setBlockType(t.from,t.from,n.type,i)}})}function sc(n){return new Wp({find:n.find,handler:({state:e,range:t,match:r,chain:o})=>{const i=Jt(n.getAttributes,void 0,r)||{},a=e.tr.delete(t.from,t.to),l=a.doc.resolve(t.from).blockRange(),c=l&&Hg(l,n.type,i);if(!c)return null;if(a.wrap(l,c),n.keepMarks&&n.editor){const{selection:f,storedMarks:m}=e,{splittableMarks:g}=n.editor.extensionManager,v=m||f.$to.parentOffset&&f.$from.marks();if(v){const y=v.filter(b=>g.includes(b.type.name));a.ensureMarks(y)}}if(n.keepAttributes){const f=n.type.name==="bulletList"||n.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(f,i).run()}const d=a.doc.resolve(t.from-1).nodeBefore;d&&d.type===n.type&&Ri(a.doc,t.from-1)&&(!n.joinPredicate||n.joinPredicate(r,d))&&a.join(t.from-1)}})}class xo{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Jt(ft(this,"addOptions",{name:this.name}))),this.storage=Jt(ft(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new xo(e)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>jp(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new xo(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=Jt(ft(t,"addOptions",{name:t.name})),t.storage=Jt(ft(t,"addStorage",{name:t.name,options:t.options})),t}}function Fl(n){return new jY({find:n.find,handler:({state:e,range:t,match:r,pasteEvent:o})=>{const i=Jt(n.getAttributes,void 0,r,o);if(i===!1||i===null)return null;const{tr:a}=e,s=r[r.length-1],l=r[0];let c=t.to;if(s){const d=l.search(/\S/),f=t.from+l.indexOf(s),m=f+s.length;if(c1(t.from,t.to,e.doc).filter(v=>v.mark.type.excluded.find(b=>b===n.type&&b!==v.mark.type)).filter(v=>v.to>f).length)return null;m<t.to&&a.delete(m,t.to),f>t.from&&a.delete(t.from+d,f),c=t.from+d+s.length,a.addMark(t.from+d,c,n.type.create(i||{})),a.removeStoredMark(n.type)}}})}function x3(n){return fE((e,t)=>({get(){return e(),n},set(r){n=r,requestAnimationFrame(()=>{requestAnimationFrame(()=>{t()})})}}))}class OG extends EG{constructor(e={}){return super(e),this.contentComponent=null,this.appContext=null,this.reactiveState=x3(this.view.state),this.reactiveExtensionStorage=x3(this.extensionStorage),this.on("beforeTransaction",({nextState:t})=>{this.reactiveState.value=t,this.reactiveExtensionStorage.value=this.extensionStorage}),dE(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(e,t){const r=super.registerPlugin(e,t);return this.reactiveState&&(this.reactiveState.value=r),r}unregisterPlugin(e){const t=super.unregisterPlugin(e);return this.reactiveState&&t&&(this.reactiveState.value=t),t}}const k3=he({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(n){const e=H(),t=Kn();return pc(()=>{const r=n.editor;r&&r.options.element&&e.value&&Xt(()=>{if(!e.value||!r.options.element.firstChild)return;const o=h(e.value);e.value.append(...r.options.element.childNodes),r.contentComponent=t.ctx._,t&&(r.appContext={...t.appContext,provides:t.provides}),r.setOptions({element:o}),r.createNodeViews()})}),Br(()=>{const r=n.editor;r&&(r.contentComponent=null,r.appContext=null)}),{rootEl:e}},render(){return Fe("div",{ref:n=>{this.rootEl=n}})}}),AG=(n={})=>{const e=Fr();return Ht(()=>{e.value=new OG(n)}),Br(()=>{var t,r,o;const i=(t=e.value)===null||t===void 0?void 0:t.options.element,a=i==null?void 0:i.cloneNode(!0);(r=i==null?void 0:i.parentNode)===null||r===void 0||r.replaceChild(a,i),(o=e.value)===null||o===void 0||o.destroy()}),e},PG=he({__name:"IvyFontFamilyPopover",props:{editor:{},ariaLabel:{}},setup(n){const{getLabel:e}=at(),t=H(!0),r=n,o=["Inter","Comic Sans MS","Sans Serif","serif","monospace","cursive"],i=H("Sans Serif"),a=s=>{r.editor.chain().focus().setFontFamily(s).run()};return(s,l)=>{const c=Fs,d=Ls;return C(),se(d,{ref:"elInputRef",modelValue:i.value,"onUpdate:modelValue":l[0]||(l[0]=f=>i.value=f),placeholder:"Select font",clearable:!1,disabled:!1,multiple:!1,class:ee({"is-secondary":t.value}),"aria-label":r.ariaLabel||h(e)("font_family"),onChange:a},{default:V(()=>[(C(),F($e,null,ot(o,f=>I(c,{key:f,value:f,label:f,class:ee({"is-secondary":t.value})},{default:V(()=>[z("span",{style:Sn({fontFamily:f})},ae(f),5)]),_:2},1032,["value","label","class"])),64))]),_:1},8,["modelValue","class","aria-label"])}}}),$G=he({__name:"IvyHeadingPopover",props:{editor:{},ariaLabel:{}},setup(n){const{getLabel:e}=at(),t=n,r=H(!0),o=H("Paragraph"),i=a=>{if(a>0){t.editor.commands.toggleHeading({level:a});return}t.editor.commands.setParagraph()};return(a,s)=>{const l=Fs,c=Ls;return C(),se(c,{modelValue:o.value,"onUpdate:modelValue":s[0]||(s[0]=d=>o.value=d),placeholder:"Select Heading Level",clearable:!1,disabled:!1,multiple:!1,class:ee({"is-secondary":r.value}),"aria-label":t.ariaLabel||h(e)("heading_level"),onChange:i},{default:V(()=>[I(l,{value:0,label:h(e)("paragraph"),class:ee({"is-secondary":r.value})},{default:V(()=>s[1]||(s[1]=[z("p",null,"Paragraph",-1)])),_:1},8,["label","class"]),(C(),F($e,null,ot(6,d=>I(l,{key:d,value:d,label:"Heading "+d,class:ee({"is-secondary":r.value})},{default:V(()=>[(C(),se(dn("h"+d),{"data-item-type":"heading"},{default:V(()=>[De("Heading "+ae(d),1)]),_:2},1024))]),_:2},1032,["value","label","class"])),64))]),_:1},8,["modelValue","class","aria-label"])}}}),RG={class:"ivyforms-flex ivyforms-gap-8"},DG=he({__name:"IvyImagePopover",props:{editor:{}},setup(n){const{getLabel:e}=at(),t=n,r=H(null),o=H(!1),i=H(null),a=H(!1),s=async f=>{const m=await c(f.raw);t.editor.commands.setImage({src:m}),h(r).hide()},l=()=>{t.editor.commands.setImage({src:i.value}),h(r).hide()},c=f=>{const m=new FileReader;return new Promise((g,v)=>{m.onload=y=>{var b;(b=y.target)!=null&&b.result?g(y.target.result):v(new Error("Failed to read file"))},m.onerror=v,m.readAsDataURL(f)})},d=()=>{i.value=null,o.value=!1};return(f,m)=>{const g=O$,v=pn,y=js;return C(),se(y,{ref_key:"popoverRef",ref:r,trigger:"click",width:o.value?350:200,"popper-background":"level-2-foreground",placement:o.value?"bottom-end":"bottom",onHide:d},{reference:V(()=>[I(Wl,{size:"s",type:"ghost",priority:"white","icon-start-category":"text-formatting","icon-start":"image",onClick:m[4]||(m[4]=lt(()=>{},["stop","prevent"]))})]),default:V(()=>[o.value?(C(),F($e,{key:1},[z("div",RG,[I(cn,{modelValue:i.value,"onUpdate:modelValue":m[1]||(m[1]=b=>i.value=b),placeholder:h(e)("image_url")},null,8,["modelValue","placeholder"]),I(it,{onClick:[l,m[2]||(m[2]=lt(()=>{},["stop","prevent"]))]},{default:V(()=>[De(ae(h(e)("save")),1)]),_:1})]),I(v,{modelValue:a.value,"onUpdate:modelValue":m[3]||(m[3]=b=>a.value=b),class:"ivyforms-ml-8"},{default:V(()=>[De(ae(h(e)("open_in_new_tab")),1)]),_:1},8,["modelValue"])],64)):(C(),F($e,{key:0},[I(it,{type:"ghost",class:"insert-image-button",priority:"secondary",onClick:m[0]||(m[0]=lt(b=>o.value=!0,["stop","prevent"]))},{default:V(()=>[De(ae(h(e)("insert_image_by_url")),1)]),_:1}),I(g,{"auto-upload":!1,"show-file-list":!1,"on-change":s},{trigger:V(()=>[I(it,{type:"ghost",priority:"secondary"},{default:V(()=>[De(ae(h(e)("upload_image")),1)]),_:1})]),_:1})],64))]),_:1},8,["width","placement"])}}}),NG={class:"ivyforms-flex ivyforms-gap-8 ivyforms-mt-4"},FG={class:"ivyforms-flex ivyforms-gap-16 ivyforms-mt-4"},LG=he({__name:"IvyLinkPopover",props:{editor:{}},setup(n){const{getLabel:e}=at(),t=n,r=H(null),o=H(""),i=H(!1),a=()=>{t.editor.chain().focus().extendMarkRange("link").setLink({href:o.value,target:i.value===!0?"_blank":"_self"}).run(),h(r).hide()},s=()=>{window.open(o.value,"_blank")},l=()=>{t.editor.chain().focus().extendMarkRange("link").unsetLink().run(),h(r).hide()},c=()=>{const f=t.editor.getAttributes("link");o.value=f.href,i.value=f.target==="_blank"},d=()=>{o.value="",i.value=!1};return(f,m)=>{const g=js;return C(),se(g,{ref_key:"popoverRef",ref:r,class:"ivyforms-link-popover",trigger:"click","popper-background":"level-2-foreground",width:"250",onShow:c,onHide:d},{reference:V(()=>[I(Wl,{size:"s",type:"ghost",priority:"white","icon-start-category":"text-formatting","icon-start":"link",active:f.editor.isActive("link"),onClick:m[2]||(m[2]=lt(()=>{},["stop","prevent"]))},null,8,["active"])]),default:V(()=>[z("div",NG,[I(cn,{modelValue:o.value,"onUpdate:modelValue":m[0]||(m[0]=v=>o.value=v),placeholder:"Enter Link",autofocus:""},null,8,["modelValue"])]),I(pn,{modelValue:i.value,"onUpdate:modelValue":m[1]||(m[1]=v=>i.value=v),class:"ivyforms-ml-8",onClick:s},{default:V(()=>[De(ae(h(e)("open_in_new_tab")),1)]),_:1},8,["modelValue"]),z("div",FG,[I(it,{class:"ivyforms-flex-grow",priority:"white",type:"fill",size:"d",disabled:!f.editor.isActive("link"),onClick:lt(l,["stop","prevent"])},{default:V(()=>[De(ae(h(e)("clear")),1)]),_:1},8,["disabled"]),I(it,{class:"ivyforms-flex-grow",size:"d",onClick:lt(a,["prevent"])},{default:V(()=>[De(ae(h(e)("save")),1)]),_:1})])]),_:1},512)}}}),BG=["#232E3C","#0938B9","#014D5D","#CA8A04","#CC5C00","#970202","#892969","#4034AB","#8B929C","#316BFF","#06A192","#E9B308","#F0852E","#D92E2E","#DE5EB3","#7A69EE","#FFFFFF","#CBE3FF","#D4FEEB","#FEF18B","#FFC799","#F3A5A5","#F7CAE8","#CEC4FD"],VG={class:"ivyforms-color-set"},zG=["onClick"],HG={class:"ivyforms-flex ivyforms-gap-16 ivyforms-mt-24"},UG=he({__name:"IvyColorPickerPopover",props:{editor:{},textStyleProperty:{}},setup(n){const{getLabel:e}=at(),t=n,r=H(null),o=H(null),i=H(null),a=H(null),s=()=>{a.value=l1(t.editor.state,"textStyle")[t.textStyleProperty]||null,r.value.updateHasValue()},l=f=>{a.value=f,r.value.updateHasValue(),t.textStyleProperty==="color"?t.editor.commands.setColor(f):t.editor.chain().focus().setTextBackgroundColor(f).run()},c=()=>{o.value.focus(),t.textStyleProperty==="color"?t.editor.commands.setColor(a.value):t.editor.chain().focus().setTextBackgroundColor(a.value).run(),h(i).hide()},d=()=>{a.value=null,r.value.updateHasValue(),t.textStyleProperty==="color"?t.editor.commands.unsetColor():t.editor.chain().focus().unsetTextBackgroundColor().run()};return(f,m)=>{const g=it,v=js;return C(),se(v,{ref_key:"popoverRef",ref:i,trigger:"click",width:296,onShow:m[2]||(m[2]=y=>s())},{reference:V(()=>[xe(f.$slots,"reference")]),default:V(()=>[z("div",VG,[(C(!0),F($e,null,ot(h(BG),y=>(C(),F("div",{key:y,style:Sn({"background-color":y,border:y==="#FFFFFF"?"1px solid var(--map-base-dusk-stroke--2)":"none",width:y==="#FFFFFF"?"24px":"26px",height:y==="#FFFFFF"?"24px":"26px"}),class:ee(["ivyforms-color-set__item",{"color--selected":a.value===y}]),onMousedown:m[0]||(m[0]=lt(()=>{},["prevent"])),onClick:lt(b=>l(y),["stop"])},null,46,zG))),128))]),I(wp,null,{default:V(()=>[I(sn,{ref_key:"hexFormItemRef",ref:r,label:"Hex"},{default:V(()=>[I(cn,{ref_key:"hexInputRef",ref:o,modelValue:a.value,"onUpdate:modelValue":m[1]||(m[1]=y=>a.value=y),autofocus:"",maxlength:"7"},null,8,["modelValue"])]),_:1},512),z("div",HG,[I(g,{class:"ivyforms-flex-1",type:"border",size:"s",onClick:lt(d,["prevent"])},{default:V(()=>[De(ae(h(e)("reset")),1)]),_:1}),I(g,{class:"ivyforms-flex-1",size:"s",onClick:lt(c,["prevent"])},{default:V(()=>[De(ae(h(e)("save")),1)]),_:1})])]),_:1})]),_:3},512)}}}),WG=he({__name:"IvyTextAlignPopoover",props:{editor:{}},setup(n){const e=n,t=H(null),r=o=>{e.editor.chain().focus().setTextAlign(o).run(),t.value.hide()};return(o,i)=>{const a=Wl,s=js;return C(),se(s,{ref_key:"popoverRef",ref:t,trigger:"click","popper-background":"level-2-foreground",width:"10"},{reference:V(()=>[I(a,{size:"s",type:"ghost",priority:"white","icon-start-category":"text-formatting","icon-start":`text-align-${o.editor.getAttributes(o.editor.state.selection.$anchor.node().type.name).textAlign||"left"}`,onClick:i[0]||(i[0]=lt(()=>{},["stop","prevent"]))},null,8,["icon-start"])]),default:V(()=>[I(a,{size:"s",type:"ghost",priority:"white","icon-start-category":"text-formatting","icon-start":"text-align-left",active:o.editor.isActive({textAlign:"left"}),onClick:i[1]||(i[1]=lt(l=>r("left"),["stop","prevent"]))},null,8,["active"]),I(a,{size:"s",type:"ghost",priority:"white","icon-start-category":"text-formatting","icon-start":"text-align-right",active:o.editor.isActive({textAlign:"right"}),onClick:i[2]||(i[2]=lt(l=>r("right"),["stop","prevent"]))},null,8,["active"]),I(a,{size:"s",type:"ghost",priority:"white","icon-start-category":"text-formatting","icon-start":"text-align-center",active:o.editor.isActive({textAlign:"center"}),onClick:i[3]||(i[3]=lt(l=>r("center"),["stop","prevent"]))},null,8,["active"]),I(a,{size:"s",type:"ghost",priority:"white","icon-start-category":"text-formatting","icon-start":"text-align-justify",active:o.editor.isActive({textAlign:"justify"}),onClick:i[4]||(i[4]=lt(l=>r("justify"),["stop","prevent"]))},null,8,["active"])]),_:1},512)}}});function f1(){const{getLabel:n}=at();return[{key:"all_data",label:n("all_data"),value:"{{all_data}}"},{key:"admin_email",label:n("admin_email"),value:"{{wp.admin_email}}"},{key:"site_url",label:n("site_url"),value:"{{wp.site_url}}"},{key:"site_title",label:n("site_title"),value:"{{wp.site_title}}"},{key:"user_id",label:n("user_id"),value:"{{wp.user_id}}"},{key:"user_name",label:n("user_name"),value:"{{wp.user_name}}"},{key:"user_email",label:n("user_email"),value:"{{wp.user_email}}"},{key:"user_first_name",label:n("user_first_name"),value:"{{wp.user_first_name}}"},{key:"user_last_name",label:n("user_last_name"),value:"{{wp.user_last_name}}"},{key:"user_ip",label:n("user_ip"),value:"{{wp.user_ip}}"},{key:"user_agent",label:n("user_agent"),value:"{{wp.user_agent}}"},{key:"date",label:n("date"),value:"{{wp.date}}"},{key:"post_id",label:n("post_id"),value:"{{wp.post_id}}"},{key:"post_title",label:n("post_title"),value:"{{wp.post_title}}"},{key:"post_permalink",label:n("post_permalink"),value:"{{wp.post_permalink}}"},{key:"referer_url",label:n("referer_url"),value:"{{wp.referer_url}}"},{key:"entry_id",label:n("entry_id"),value:"{{wp.entry_id}}"}]}const jG={class:"ivyforms-placeholders-popover ivyforms-flex ivyforms-flex-direction-column ivyforms-align-items-start ivyforms-gap-8"},KG={class:"ivyforms-placeholders-popover__search ivyforms-flex ivyforms-pl-8 ivyforms-pr-8 ivyforms-flex-direction-column"},YG={key:0,class:"ivyforms-placeholders-popover__empty ivyforms-flex ivyforms-flex-direction-column ivyforms-align-items-center ivyforms-gap-10 medium-14"},qG=["onClick","onMouseenter"],GG={class:"ivyforms-placeholders-popover__item-label regular-14"},JG={class:"ivyforms-placeholders-popover__item-value regular-14"},XG={key:0,class:"ivyforms-placeholders-popover__empty ivyforms-flex ivyforms-flex-direction-column ivyforms-align-items-center ivyforms-gap-10 medium-14"},QG=["onClick","onMouseenter"],ZG={class:"ivyforms-placeholders-popover__item-label regular-14"},eJ={class:"ivyforms-placeholders-popover__item-value regular-14"},x_=he({__name:"IvyPlaceholdersPopover",props:{fields:{type:Array,default:void 0},general:{type:Array,default:void 0}},emits:["insertPlaceholder"],setup(n,{emit:e}){const t=n,{getLabel:r}=at(),o=zt(),i=H("fields"),a=H(""),s=H(null),l=H(null),c=H(null),d=[{name:"fields",label:r("fields")},{name:"general",label:r("general")}],f=O(()=>t.fields!==void 0?t.fields:o.fields),m=O(()=>t.general!==void 0?t.general:f1()),g=O(()=>{if(!a.value)return f.value;const w=a.value.toLowerCase();return f.value.filter(T=>{const k=(T.label||"").toLowerCase(),x=_(T).toLowerCase();return k.includes(w)||x.includes(w)})}),v=O(()=>{if(!a.value)return m.value;const w=a.value.toLowerCase();return m.value.filter(T=>(T.label||"").toLowerCase().includes(w)||(T.value||"").toLowerCase().includes(w))}),y=e;function b(w){y("insertPlaceholder",w)}function _(w){return`{{${w.type}_${w.fieldIndex}}}`}return(w,T)=>{const k=js;return C(),se(k,{ref_key:"popoverRef",ref:c,trigger:"click",width:340},{reference:V(()=>[xe(w.$slots,"reference")]),default:V(()=>[z("div",jG,[I(Us,{modelValue:i.value,"onUpdate:modelValue":T[0]||(T[0]=x=>i.value=x),tabs:d,priority:"secondary",class:"ivyforms-placeholders-popover__tabs ivyforms-flex ivyforms-pl-8 ivyforms-pr-8 ivyforms-flex-direction-column"},null,8,["modelValue"]),z("div",KG,[I(Ws,{modelValue:a.value,"onUpdate:modelValue":T[1]||(T[1]=x=>a.value=x),placeholder:h(r)("search_placeholder")},null,8,["modelValue","placeholder"])]),I($i,{class:"ivyforms-placeholders-popover__list",style:{"max-height":"220px",height:"220px"}},{default:V(()=>[i.value==="fields"?(C(),F($e,{key:0},[g.value.length===0?(C(),F("div",YG,ae(h(r)("no_fields_available")),1)):(C(!0),F($e,{key:1},ot(g.value,x=>(C(),F("div",{key:x.fieldIndex,class:ee(["ivyforms-placeholders-popover__item ivyforms-gap-6 ivyforms-flex ivyforms-justify-content-between ivyforms-align-center",{"is-highlighted":s.value===x.fieldIndex}]),onClick:M=>b(_(x)),onMouseenter:M=>s.value=x.fieldIndex,onMouseleave:T[2]||(T[2]=M=>s.value=null)},[z("span",GG,ae(x.label),1),z("span",JG,ae(_(x)),1)],42,qG))),128))],64)):(C(),F($e,{key:1},[g.value.length===0?(C(),F("div",XG,ae(h(r)("no_placeholders_available")),1)):(C(!0),F($e,{key:1},ot(v.value,x=>(C(),F("div",{key:x.key,class:ee(["ivyforms-placeholders-popover__item ivyforms-gap-6 ivyforms-flex ivyforms-justify-content-between ivyforms-align-center",{"is-highlighted":l.value===x.key}]),onClick:M=>b(x.value),onMouseenter:M=>l.value=x.key,onMouseleave:T[3]||(T[3]=M=>l.value=null)},[z("span",ZG,ae(x.label),1),z("span",eJ,ae(x.value),1)],42,QG))),128))],64))]),_:1})])]),_:3},512)}}}),tJ=xo.create({name:"doc",topNode:!0,content:"block+"}),nJ=xo.create({name:"text",group:"inline"}),rJ=xo.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",or(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),oJ=n=>{if(!n.children.length)return;const e=n.querySelectorAll("span");e&&e.forEach(t=>{var r,o;const i=t.getAttribute("style"),a=(o=(r=t.parentElement)===null||r===void 0?void 0:r.closest("span"))===null||o===void 0?void 0:o.getAttribute("style");t.setAttribute("style",`${a};${i}`)})},aJ=wo.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:n=>n.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&oJ(n),{}):!1}]},renderHTML({HTMLAttributes:n}){return["span",or(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:n})=>{const{selection:e}=n;return n.doc.nodesBetween(e.from,e.to,(t,r)=>{if(t.isTextblock)return!0;t.marks.filter(o=>o.type===this.type).some(o=>Object.values(o.attrs).some(i=>!!i))||n.removeMark(r,r+t.nodeSize,this.type)}),!0}}}}),iJ=yr.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:n=>{var e;return(e=n.style.color)===null||e===void 0?void 0:e.replace(/['"]+/g,"")},renderHTML:n=>n.color?{style:`color: ${n.color}`}:{}}}}]},addCommands(){return{setColor:n=>({chain:e})=>e().setMark("textStyle",{color:n}).run(),unsetColor:()=>({chain:n})=>n().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),sJ=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,lJ=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,uJ=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,cJ=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,dJ=wo.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:n=>n.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:n=>n.type.name===this.name},{style:"font-weight",getAttrs:n=>/^(bold(er)?|[5-9]\d{2,})$/.test(n)&&null}]},renderHTML({HTMLAttributes:n}){return["strong",or(this.options.HTMLAttributes,n),0]},addCommands(){return{setBold:()=>({commands:n})=>n.setMark(this.name),toggleBold:()=>({commands:n})=>n.toggleMark(this.name),unsetBold:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[ic({find:sJ,type:this.type}),ic({find:uJ,type:this.type})]},addPasteRules(){return[Fl({find:lJ,type:this.type}),Fl({find:cJ,type:this.type})]}}),fJ=yr.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:n=>{const e=n.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:n=>n.textAlign?{style:`text-align: ${n.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:n=>({commands:e})=>this.options.alignments.includes(n)?this.options.types.map(t=>e.updateAttributes(t,{textAlign:n})).every(t=>t):!1,unsetTextAlign:()=>({commands:n})=>this.options.types.map(e=>n.resetAttributes(e,"textAlign")).every(e=>e)}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),pJ=xo.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(n=>({tag:`h${n}`,attrs:{level:n}}))},renderHTML({node:n,HTMLAttributes:e}){return[`h${this.options.levels.includes(n.attrs.level)?n.attrs.level:this.options.levels[0]}`,or(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:n=>({commands:e})=>this.options.levels.includes(n.level)?e.setNode(this.name,n):!1,toggleHeading:n=>({commands:e})=>this.options.levels.includes(n.level)?e.toggleNode(this.name,"paragraph",n):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((n,e)=>({...n,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(n=>MG({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${n}})\\s$`),type:this.type,getAttributes:{level:n}}))}}),hJ=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,mJ=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,vJ=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,gJ=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,yJ=wo.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:n=>n.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:n=>n.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:n}){return["em",or(this.options.HTMLAttributes,n),0]},addCommands(){return{setItalic:()=>({commands:n})=>n.setMark(this.name),toggleItalic:()=>({commands:n})=>n.toggleMark(this.name),unsetItalic:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[ic({find:hJ,type:this.type}),ic({find:vJ,type:this.type})]},addPasteRules(){return[Fl({find:mJ,type:this.type}),Fl({find:gJ,type:this.type})]}}),bJ=wo.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["u",or(this.options.HTMLAttributes,n),0]},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),SJ=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,_J=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,wJ=wo.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["s",or(this.options.HTMLAttributes,n),0]},addCommands(){return{setStrike:()=>({commands:n})=>n.setMark(this.name),toggleStrike:()=>({commands:n})=>n.toggleMark(this.name),unsetStrike:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[ic({find:SJ,type:this.type})]},addPasteRules(){return[Fl({find:_J,type:this.type})]}}),xJ=/^\s*>\s$/,kJ=xo.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:n}){return["blockquote",or(this.options.HTMLAttributes,n),0]},addCommands(){return{setBlockquote:()=>({commands:n})=>n.wrapIn(this.name),toggleBlockquote:()=>({commands:n})=>n.toggleWrap(this.name),unsetBlockquote:()=>({commands:n})=>n.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[sc({find:xJ,type:this.type})]}}),CJ="listItem",C3="textStyle",I3=/^\s*([-+*])\s$/,IJ=xo.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:n}){return["ul",or(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleBulletList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(CJ,this.editor.getAttributes(C3)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let n=sc({find:I3,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(n=sc({find:I3,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(C3),editor:this.editor})),[n]}}),EJ=xo.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",or(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),TJ="listItem",E3="textStyle",T3=/^(\d+)\.\s$/,MJ=xo.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1},type:{default:void 0,parseHTML:n=>n.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:n}){const{start:e,...t}=n;return e===1?["ol",or(this.options.HTMLAttributes,t),0]:["ol",or(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(TJ,this.editor.getAttributes(E3)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=sc({find:T3,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(n=sc({find:T3,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(E3)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[n]}}),OJ=wo.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(n){return n!=="super"?!1:null}}]},renderHTML({HTMLAttributes:n}){return["sup",or(this.options.HTMLAttributes,n),0]},addCommands(){return{setSuperscript:()=>({commands:n})=>n.setMark(this.name),toggleSuperscript:()=>({commands:n})=>n.toggleMark(this.name),unsetSuperscript:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),AJ=wo.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(n){return n!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:n}){return["sub",or(this.options.HTMLAttributes,n),0]},addCommands(){return{setSubscript:()=>({commands:n})=>n.setMark(this.name),toggleSubscript:()=>({commands:n})=>n.toggleMark(this.name),unsetSubscript:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),PJ=yr.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:n=>n.style.fontFamily,renderHTML:n=>n.fontFamily?{style:`font-family: ${n.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:n=>({chain:e})=>e().setMark("textStyle",{fontFamily:n}).run(),unsetFontFamily:()=>({chain:n})=>n().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),$J="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",RJ="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",Ll=(n,e)=>{for(const t in e)n[t]=e[t];return n},tg="numeric",ng="ascii",rg="alpha",Lu="asciinumeric",Eu="alphanumeric",og="domain",k_="emoji",DJ="scheme",NJ="slashscheme",Qm="whitespace";function FJ(n,e){return n in e||(e[n]=[]),e[n]}function ls(n,e,t){e[tg]&&(e[Lu]=!0,e[Eu]=!0),e[ng]&&(e[Lu]=!0,e[rg]=!0),e[Lu]&&(e[Eu]=!0),e[rg]&&(e[Eu]=!0),e[Eu]&&(e[og]=!0),e[k_]&&(e[og]=!0);for(const r in e){const o=FJ(r,t);o.indexOf(n)<0&&o.push(n)}}function LJ(n,e){const t={};for(const r in e)e[r].indexOf(n)>=0&&(t[r]=!0);return t}function Nr(n=null){this.j={},this.jr=[],this.jd=null,this.t=n}Nr.groups={};Nr.prototype={accepts(){return!!this.t},go(n){const e=this,t=e.j[n];if(t)return t;for(let r=0;r<e.jr.length;r++){const o=e.jr[r][0],i=e.jr[r][1];if(i&&o.test(n))return i}return e.jd},has(n,e=!1){return e?n in this.j:!!this.go(n)},ta(n,e,t,r){for(let o=0;o<n.length;o++)this.tt(n[o],e,t,r)},tr(n,e,t,r){r=r||Nr.groups;let o;return e&&e.j?o=e:(o=new Nr(e),t&&r&&ls(e,t,r)),this.jr.push([n,o]),o},ts(n,e,t,r){let o=this;const i=n.length;if(!i)return o;for(let a=0;a<i-1;a++)o=o.tt(n[a]);return o.tt(n[i-1],e,t,r)},tt(n,e,t,r){r=r||Nr.groups;const o=this;if(e&&e.j)return o.j[n]=e,e;const i=e;let a,s=o.go(n);if(s?(a=new Nr,Ll(a.j,s.j),a.jr.push.apply(a.jr,s.jr),a.jd=s.jd,a.t=s.t):a=new Nr,i){if(r)if(a.t&&typeof a.t=="string"){const l=Ll(LJ(a.t,r),t);ls(i,l,r)}else t&&ls(i,t,r);a.t=i}return o.j[n]=a,a}};const jt=(n,e,t,r,o)=>n.ta(e,t,r,o),Dn=(n,e,t,r,o)=>n.tr(e,t,r,o),M3=(n,e,t,r,o)=>n.ts(e,t,r,o),We=(n,e,t,r,o)=>n.tt(e,t,r,o),Sa="WORD",ag="UWORD",C_="ASCIINUMERICAL",I_="ALPHANUMERICAL",lc="LOCALHOST",ig="TLD",sg="UTLD",pf="SCHEME",bl="SLASH_SCHEME",p1="NUM",lg="WS",h1="NL",Bu="OPENBRACE",Vu="CLOSEBRACE",Yf="OPENBRACKET",qf="CLOSEBRACKET",Gf="OPENPAREN",Jf="CLOSEPAREN",Xf="OPENANGLEBRACKET",Qf="CLOSEANGLEBRACKET",Zf="FULLWIDTHLEFTPAREN",ep="FULLWIDTHRIGHTPAREN",tp="LEFTCORNERBRACKET",np="RIGHTCORNERBRACKET",rp="LEFTWHITECORNERBRACKET",op="RIGHTWHITECORNERBRACKET",ap="FULLWIDTHLESSTHAN",ip="FULLWIDTHGREATERTHAN",sp="AMPERSAND",m1="APOSTROPHE",lp="ASTERISK",ri="AT",up="BACKSLASH",cp="BACKTICK",dp="CARET",si="COLON",v1="COMMA",fp="DOLLAR",jo="DOT",pp="EQUALS",g1="EXCLAMATION",ho="HYPHEN",zu="PERCENT",hp="PIPE",mp="PLUS",vp="POUND",Hu="QUERY",y1="QUOTE",E_="FULLWIDTHMIDDLEDOT",b1="SEMI",Ko="SLASH",Uu="TILDE",gp="UNDERSCORE",T_="EMOJI",yp="SYM";var M_=Object.freeze({__proto__:null,WORD:Sa,UWORD:ag,ASCIINUMERICAL:C_,ALPHANUMERICAL:I_,LOCALHOST:lc,TLD:ig,UTLD:sg,SCHEME:pf,SLASH_SCHEME:bl,NUM:p1,WS:lg,NL:h1,OPENBRACE:Bu,CLOSEBRACE:Vu,OPENBRACKET:Yf,CLOSEBRACKET:qf,OPENPAREN:Gf,CLOSEPAREN:Jf,OPENANGLEBRACKET:Xf,CLOSEANGLEBRACKET:Qf,FULLWIDTHLEFTPAREN:Zf,FULLWIDTHRIGHTPAREN:ep,LEFTCORNERBRACKET:tp,RIGHTCORNERBRACKET:np,LEFTWHITECORNERBRACKET:rp,RIGHTWHITECORNERBRACKET:op,FULLWIDTHLESSTHAN:ap,FULLWIDTHGREATERTHAN:ip,AMPERSAND:sp,APOSTROPHE:m1,ASTERISK:lp,AT:ri,BACKSLASH:up,BACKTICK:cp,CARET:dp,COLON:si,COMMA:v1,DOLLAR:fp,DOT:jo,EQUALS:pp,EXCLAMATION:g1,HYPHEN:ho,PERCENT:zu,PIPE:hp,PLUS:mp,POUND:vp,QUERY:Hu,QUOTE:y1,FULLWIDTHMIDDLEDOT:E_,SEMI:b1,SLASH:Ko,TILDE:Uu,UNDERSCORE:gp,EMOJI:T_,SYM:yp});const ya=/[a-z]/,mu=new RegExp("\\p{L}","u"),Zm=new RegExp("\\p{Emoji}","u"),ba=/\d/,ev=/\s/,O3="\r",tv=`
`,BJ="️",VJ="‍",nv="￼";let Fd=null,Ld=null;function zJ(n=[]){const e={};Nr.groups=e;const t=new Nr;Fd==null&&(Fd=A3($J)),Ld==null&&(Ld=A3(RJ)),We(t,"'",m1),We(t,"{",Bu),We(t,"}",Vu),We(t,"[",Yf),We(t,"]",qf),We(t,"(",Gf),We(t,")",Jf),We(t,"<",Xf),We(t,">",Qf),We(t,"（",Zf),We(t,"）",ep),We(t,"「",tp),We(t,"」",np),We(t,"『",rp),We(t,"』",op),We(t,"＜",ap),We(t,"＞",ip),We(t,"&",sp),We(t,"*",lp),We(t,"@",ri),We(t,"`",cp),We(t,"^",dp),We(t,":",si),We(t,",",v1),We(t,"$",fp),We(t,".",jo),We(t,"=",pp),We(t,"!",g1),We(t,"-",ho),We(t,"%",zu),We(t,"|",hp),We(t,"+",mp),We(t,"#",vp),We(t,"?",Hu),We(t,'"',y1),We(t,"/",Ko),We(t,";",b1),We(t,"~",Uu),We(t,"_",gp),We(t,"\\",up),We(t,"・",E_);const r=Dn(t,ba,p1,{[tg]:!0});Dn(r,ba,r);const o=Dn(r,ya,C_,{[Lu]:!0}),i=Dn(r,mu,I_,{[Eu]:!0}),a=Dn(t,ya,Sa,{[ng]:!0});Dn(a,ba,o),Dn(a,ya,a),Dn(o,ba,o),Dn(o,ya,o);const s=Dn(t,mu,ag,{[rg]:!0});Dn(s,ya),Dn(s,ba,i),Dn(s,mu,s),Dn(i,ba,i),Dn(i,ya),Dn(i,mu,i);const l=We(t,tv,h1,{[Qm]:!0}),c=We(t,O3,lg,{[Qm]:!0}),d=Dn(t,ev,lg,{[Qm]:!0});We(t,nv,d),We(c,tv,l),We(c,nv,d),Dn(c,ev,d),We(d,O3),We(d,tv),Dn(d,ev,d),We(d,nv,d);const f=Dn(t,Zm,T_,{[k_]:!0});We(f,"#"),Dn(f,Zm,f),We(f,BJ,f);const m=We(f,VJ);We(m,"#"),Dn(m,Zm,f);const g=[[ya,a],[ba,o]],v=[[ya,null],[mu,s],[ba,i]];for(let y=0;y<Fd.length;y++)Za(t,Fd[y],ig,Sa,g);for(let y=0;y<Ld.length;y++)Za(t,Ld[y],sg,ag,v);ls(ig,{tld:!0,ascii:!0},e),ls(sg,{utld:!0,alpha:!0},e),Za(t,"file",pf,Sa,g),Za(t,"mailto",pf,Sa,g),Za(t,"http",bl,Sa,g),Za(t,"https",bl,Sa,g),Za(t,"ftp",bl,Sa,g),Za(t,"ftps",bl,Sa,g),ls(pf,{scheme:!0,ascii:!0},e),ls(bl,{slashscheme:!0,ascii:!0},e),n=n.sort((y,b)=>y[0]>b[0]?1:-1);for(let y=0;y<n.length;y++){const b=n[y][0],w=n[y][1]?{[DJ]:!0}:{[NJ]:!0};b.indexOf("-")>=0?w[og]=!0:ya.test(b)?ba.test(b)?w[Lu]=!0:w[ng]=!0:w[tg]=!0,M3(t,b,b,w)}return M3(t,"localhost",lc,{ascii:!0}),t.jd=new Nr(yp),{start:t,tokens:Ll({groups:e},M_)}}function O_(n,e){const t=HJ(e.replace(/[A-Z]/g,s=>s.toLowerCase())),r=t.length,o=[];let i=0,a=0;for(;a<r;){let s=n,l=null,c=0,d=null,f=-1,m=-1;for(;a<r&&(l=s.go(t[a]));)s=l,s.accepts()?(f=0,m=0,d=s):f>=0&&(f+=t[a].length,m++),c+=t[a].length,i+=t[a].length,a++;i-=f,a-=m,c-=f,o.push({t:d.t,v:e.slice(i-c,i),s:i-c,e:i})}return o}function HJ(n){const e=[],t=n.length;let r=0;for(;r<t;){let o=n.charCodeAt(r),i,a=o<55296||o>56319||r+1===t||(i=n.charCodeAt(r+1))<56320||i>57343?n[r]:n.slice(r,r+2);e.push(a),r+=a.length}return e}function Za(n,e,t,r,o){let i;const a=e.length;for(let s=0;s<a-1;s++){const l=e[s];n.j[l]?i=n.j[l]:(i=new Nr(r),i.jr=o.slice(),n.j[l]=i),n=i}return i=new Nr(t),i.jr=o.slice(),n.j[e[a-1]]=i,i}function A3(n){const e=[],t=[];let r=0,o="0123456789";for(;r<n.length;){let i=0;for(;o.indexOf(n[r+i])>=0;)i++;if(i>0){e.push(t.join(""));for(let a=parseInt(n.substring(r,r+i),10);a>0;a--)t.pop();r+=i}else t.push(n[r]),r++}return e}const uc={defaultProtocol:"http",events:null,format:P3,formatHref:P3,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function S1(n,e=null){let t=Ll({},uc);n&&(t=Ll(t,n instanceof S1?n.o:n));const r=t.ignoreTags,o=[];for(let i=0;i<r.length;i++)o.push(r[i].toUpperCase());this.o=t,e&&(this.defaultRender=e),this.ignoreTags=o}S1.prototype={o:uc,ignoreTags:[],defaultRender(n){return n},check(n){return this.get("validate",n.toString(),n)},get(n,e,t){const r=e!=null;let o=this.o[n];return o&&(typeof o=="object"?(o=t.t in o?o[t.t]:uc[n],typeof o=="function"&&r&&(o=o(e,t))):typeof o=="function"&&r&&(o=o(e,t.t,t)),o)},getObj(n,e,t){let r=this.o[n];return typeof r=="function"&&e!=null&&(r=r(e,t.t,t)),r},render(n){const e=n.render(this);return(this.get("render",null,n)||this.defaultRender)(e,n.t,n)}};function P3(n){return n}function A_(n,e){this.t="token",this.v=n,this.tk=e}A_.prototype={isLink:!1,toString(){return this.v},toHref(n){return this.toString()},toFormattedString(n){const e=this.toString(),t=n.get("truncate",e,this),r=n.get("format",e,this);return t&&r.length>t?r.substring(0,t)+"…":r},toFormattedHref(n){return n.get("formatHref",this.toHref(n.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(n=uc.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(n),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(n){return{type:this.t,value:this.toFormattedString(n),isLink:this.isLink,href:this.toFormattedHref(n),start:this.startIndex(),end:this.endIndex()}},validate(n){return n.get("validate",this.toString(),this)},render(n){const e=this,t=this.toHref(n.get("defaultProtocol")),r=n.get("formatHref",t,this),o=n.get("tagName",t,e),i=this.toFormattedString(n),a={},s=n.get("className",t,e),l=n.get("target",t,e),c=n.get("rel",t,e),d=n.getObj("attributes",t,e),f=n.getObj("events",t,e);return a.href=r,s&&(a.class=s),l&&(a.target=l),c&&(a.rel=c),d&&Ll(a,d),{tagName:o,attributes:a,content:i,eventListeners:f}}};function Yp(n,e){class t extends A_{constructor(o,i){super(o,i),this.t=n}}for(const r in e)t.prototype[r]=e[r];return t.t=n,t}const $3=Yp("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),R3=Yp("text"),UJ=Yp("nl"),Bd=Yp("url",{isLink:!0,toHref(n=uc.defaultProtocol){return this.hasProtocol()?this.v:`${n}://${this.v}`},hasProtocol(){const n=this.tk;return n.length>=2&&n[0].t!==lc&&n[1].t===si}}),po=n=>new Nr(n);function WJ({groups:n}){const e=n.domain.concat([sp,lp,ri,up,cp,dp,fp,pp,ho,p1,zu,hp,mp,vp,Ko,yp,Uu,gp]),t=[si,v1,jo,g1,zu,Hu,y1,b1,Xf,Qf,Bu,Vu,qf,Yf,Gf,Jf,Zf,ep,tp,np,rp,op,ap,ip],r=[sp,m1,lp,up,cp,dp,fp,pp,ho,Bu,Vu,zu,hp,mp,vp,Hu,Ko,yp,Uu,gp],o=po(),i=We(o,Uu);jt(i,r,i),jt(i,n.domain,i);const a=po(),s=po(),l=po();jt(o,n.domain,a),jt(o,n.scheme,s),jt(o,n.slashscheme,l),jt(a,r,i),jt(a,n.domain,a);const c=We(a,ri);We(i,ri,c),We(s,ri,c),We(l,ri,c);const d=We(i,jo);jt(d,r,i),jt(d,n.domain,i);const f=po();jt(c,n.domain,f),jt(f,n.domain,f);const m=We(f,jo);jt(m,n.domain,f);const g=po($3);jt(m,n.tld,g),jt(m,n.utld,g),We(c,lc,g);const v=We(f,ho);We(v,ho,v),jt(v,n.domain,f),jt(g,n.domain,f),We(g,jo,m),We(g,ho,v);const y=We(g,si);jt(y,n.numeric,$3);const b=We(a,ho),_=We(a,jo);We(b,ho,b),jt(b,n.domain,a),jt(_,r,i),jt(_,n.domain,a);const w=po(Bd);jt(_,n.tld,w),jt(_,n.utld,w),jt(w,n.domain,a),jt(w,r,i),We(w,jo,_),We(w,ho,b),We(w,ri,c);const T=We(w,si),k=po(Bd);jt(T,n.numeric,k);const x=po(Bd),M=po();jt(x,e,x),jt(x,t,M),jt(M,e,x),jt(M,t,M),We(w,Ko,x),We(k,Ko,x);const D=We(s,si),A=We(l,si),P=We(A,Ko),$=We(P,Ko);jt(s,n.domain,a),We(s,jo,_),We(s,ho,b),jt(l,n.domain,a),We(l,jo,_),We(l,ho,b),jt(D,n.domain,x),We(D,Ko,x),We(D,Hu,x),jt($,n.domain,x),jt($,e,x),We($,Ko,x);const B=[[Bu,Vu],[Yf,qf],[Gf,Jf],[Xf,Qf],[Zf,ep],[tp,np],[rp,op],[ap,ip]];for(let j=0;j<B.length;j++){const[U,G]=B[j],N=We(x,U);We(M,U,N),We(N,G,x);const R=po(Bd);jt(N,e,R);const X=po();jt(N,t),jt(R,e,R),jt(R,t,X),jt(X,e,R),jt(X,t,X),We(R,G,x),We(X,G,x)}return We(o,lc,w),We(o,h1,UJ),{start:o,tokens:M_}}function jJ(n,e,t){let r=t.length,o=0,i=[],a=[];for(;o<r;){let s=n,l=null,c=null,d=0,f=null,m=-1;for(;o<r&&!(l=s.go(t[o].t));)a.push(t[o++]);for(;o<r&&(c=l||s.go(t[o].t));)l=null,s=c,s.accepts()?(m=0,f=s):m>=0&&m++,o++,d++;if(m<0)o-=d,o<r&&(a.push(t[o]),o++);else{a.length>0&&(i.push(rv(R3,e,a)),a=[]),o-=m,d-=m;const g=f.t,v=t.slice(o-d,o);i.push(rv(g,e,v))}}return a.length>0&&i.push(rv(R3,e,a)),i}function rv(n,e,t){const r=t[0].s,o=t[t.length-1].e,i=e.slice(r,o);return new n(i,t)}const KJ=typeof console<"u"&&console&&console.warn||(()=>{}),YJ="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",wn={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function qJ(){return Nr.groups={},wn.scanner=null,wn.parser=null,wn.tokenQueue=[],wn.pluginQueue=[],wn.customSchemes=[],wn.initialized=!1,wn}function D3(n,e=!1){if(wn.initialized&&KJ(`linkifyjs: already initialized - will not register custom scheme "${n}" ${YJ}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))throw new Error(`linkifyjs: incorrect scheme format.
1. Must only contain digits, lowercase ASCII letters or "-"
2. Cannot start or end with "-"
3. "-" cannot repeat`);wn.customSchemes.push([n,e])}function GJ(){wn.scanner=zJ(wn.customSchemes);for(let n=0;n<wn.tokenQueue.length;n++)wn.tokenQueue[n][1]({scanner:wn.scanner});wn.parser=WJ(wn.scanner.tokens);for(let n=0;n<wn.pluginQueue.length;n++)wn.pluginQueue[n][1]({scanner:wn.scanner,parser:wn.parser});return wn.initialized=!0,wn}function _1(n){return wn.initialized||GJ(),jJ(wn.parser.start,n,O_(wn.scanner.start,n))}_1.scan=O_;function P_(n,e=null,t=null){if(e&&typeof e=="object"){if(t)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);t=e,e=null}const r=new S1(t),o=_1(n),i=[];for(let a=0;a<o.length;a++){const s=o[a];s.isLink&&(!e||s.t===e)&&r.check(s)&&i.push(s.toFormattedObject(r))}return i}function JJ(n){return n.length===1?n[0].isLink:n.length===3&&n[1].isLink?["()","[]"].includes(n[0].value+n[2].value):!1}function XJ(n){return new no({key:new ia("autolink"),appendTransaction:(e,t,r)=>{const o=e.some(c=>c.docChanged)&&!t.doc.eq(r.doc),i=e.some(c=>c.getMeta("preventAutolink"));if(!o||i)return;const{tr:a}=r,s=Hq(t.doc,[...e]);if(Jq(s).forEach(({newRange:c})=>{const d=Wq(r.doc,c,g=>g.isTextblock);let f,m;if(d.length>1?(f=d[0],m=r.doc.textBetween(f.pos,f.pos+f.node.nodeSize,void 0," ")):d.length&&r.doc.textBetween(c.from,c.to," "," ").endsWith(" ")&&(f=d[0],m=r.doc.textBetween(f.pos,c.to,void 0," ")),f&&m){const g=m.split(" ").filter(_=>_!=="");if(g.length<=0)return!1;const v=g[g.length-1],y=f.pos+m.lastIndexOf(v);if(!v)return!1;const b=_1(v).map(_=>_.toObject(n.defaultProtocol));if(!JJ(b))return!1;b.filter(_=>_.isLink).map(_=>({..._,from:y+_.start+1,to:y+_.end+1})).filter(_=>r.schema.marks.code?!r.doc.rangeHasMark(_.from,_.to,r.schema.marks.code):!0).filter(_=>n.validate(_.value)).filter(_=>n.shouldAutoLink(_.value)).forEach(_=>{c1(_.from,_.to,r.doc).some(w=>w.mark.type===n.type)||a.addMark(_.from,_.to,n.type.create({href:_.href}))})}}),!!a.steps.length)return a}})}function QJ(n){return new no({key:new ia("handleClickLink"),props:{handleClick:(e,t,r)=>{var o,i;if(r.button!==0||!e.editable)return!1;let a=r.target;const s=[];for(;a.nodeName!=="DIV";)s.push(a),a=a.parentNode;if(!s.find(m=>m.nodeName==="A"))return!1;const l=w_(e.state,n.type.name),c=r.target,d=(o=c==null?void 0:c.href)!==null&&o!==void 0?o:l.href,f=(i=c==null?void 0:c.target)!==null&&i!==void 0?i:l.target;return c&&d?(window.open(d,f),!0):!1}}})}function ZJ(n){return new no({key:new ia("handlePasteLink"),props:{handlePaste:(e,t,r)=>{const{state:o}=e,{selection:i}=o,{empty:a}=i;if(a)return!1;let s="";r.content.forEach(c=>{s+=c.textContent});const l=P_(s,{defaultProtocol:n.defaultProtocol}).find(c=>c.isLink&&c.value===s);return!s||!l?!1:n.editor.commands.setMark(n.type,{href:l.href})}}})}const eX=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function Gi(n,e){const t=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const o=typeof r=="string"?r:r.scheme;o&&t.push(o)}),!n||n.replace(eX,"").match(new RegExp(`^(?:(?:${t.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const tX=wo.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(n=>{if(typeof n=="string"){D3(n);return}D3(n.scheme,n.optionalSlashes)})},onDestroy(){qJ()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(n,e)=>!!Gi(n,e.protocols),validate:n=>!!n,shouldAutoLink:n=>!!n}},addAttributes(){return{href:{default:null,parseHTML(n){return n.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:n=>{const e=n.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:t=>!!Gi(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:n}){return this.options.isAllowedUri(n.href,{defaultValidate:e=>!!Gi(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",or(this.options.HTMLAttributes,n),0]:["a",or(this.options.HTMLAttributes,{...n,href:""}),0]},addCommands(){return{setLink:n=>({chain:e})=>{const{href:t}=n;return this.options.isAllowedUri(t,{defaultValidate:r=>!!Gi(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,n).setMeta("preventAutolink",!0).run():!1},toggleLink:n=>({chain:e})=>{const{href:t}=n;return this.options.isAllowedUri(t,{defaultValidate:r=>!!Gi(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Fl({find:n=>{const e=[];if(n){const{protocols:t,defaultProtocol:r}=this.options,o=P_(n).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:a=>!!Gi(a,t),protocols:t,defaultProtocol:r}));o.length&&o.forEach(i=>e.push({text:i.value,data:{href:i.href},index:i.start}))}return e},type:this.type,getAttributes:n=>{var e;return{href:(e=n.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){const n=[],{protocols:e,defaultProtocol:t}=this.options;return this.options.autolink&&n.push(XJ({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!Gi(o,e),protocols:e,defaultProtocol:t}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&n.push(QJ({type:this.type})),this.options.linkOnPaste&&n.push(ZJ({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),n}}),nX=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,rX=xo.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:n}){return["img",or(this.options.HTMLAttributes,n)]},addCommands(){return{setImage:n=>({commands:e})=>e.insertContent({type:this.name,attrs:n})}},addInputRules(){return[TG({find:nX,type:this.type,getAttributes:n=>{const[,,e,t,r]=n;return{src:t,alt:e,title:r}}})]}}),oX=yr.create({name:"preserveClass",addGlobalAttributes(){return[{types:["paragraph","heading","bulletList","orderedList","listItem","blockquote"],attributes:{class:{default:null,parseHTML:n=>n.getAttribute("class"),renderHTML:n=>({class:n.class||""})}}}]}});function Vd(n){if(!n||n.indexOf("rgb")<0||n.charAt(0)=="#")return n;const e=/(.*?)rgb\((\d+),\s*(\d+),\s*(\d+)\)/i.exec(n),t=parseInt(e[2],10).toString(16),r=parseInt(e[3],10).toString(16),o=parseInt(e[4],10).toString(16);return("#"+((t.length==1?"0"+t:t)+(r.length==1?"0"+r:r)+(o.length==1?"0"+o:o))).toLowerCase()}const aX=yr.create({name:"IvyEditorColorExtension",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:n=>{var e;return Vd((e=n.style.color)==null?void 0:e.replace(/['"]+/g,""))},renderHTML:n=>n.color?{style:`color: ${Vd(n.color)}`}:{}},backgroundColor:{default:null,parseHTML:n=>{var e;return Vd((e=n.style.backgroundColor)==null?void 0:e.replace(/['"]+/g,""))},renderHTML:n=>n.backgroundColor?{style:`background-color: ${Vd(n.backgroundColor)}`}:{}}}}]},addCommands(){return{setTextBackgroundColor:n=>({chain:e})=>e().setMark("textStyle",{backgroundColor:n}).run(),unsetTextBackgroundColor:()=>({chain:n})=>n().setMark("textStyle",{backgroundColor:null}).removeEmptyTextStyle().run()}}}),iX={class:"ivyforms-editor__tabs-row ivyforms-flex ivyforms-justify-content-between ivyforms-align-items-center"},sX={class:"tab-content"},lX={key:0},uX={key:0,class:"ivyforms-editor__control"},cX={key:1},$_=he({__name:"IvyEditor",props:{modelValue:{},fieldsPlaceholders:{},generalPlaceholders:{}},emits:["update:modelValue","input","insertPlaceholder"],setup(n,{expose:e,emit:t}){const{getLabel:r}=at(),o=H("visual"),i=[{label:r("visual"),index:"visual"},{label:r("html"),index:"html"}],a=n,s=t;function l(v){s("insertPlaceholder",v)}const c=O({get(){return a.modelValue},set(v){s("update:modelValue",v)}}),d=AG({extensions:[tJ,nJ,rJ,dJ,yJ,bJ,wJ,kJ,aJ,iJ,fJ.configure({types:["heading","paragraph"]}),pJ,IJ,MJ,EJ,OJ,AJ,PJ,tX.configure({openOnClick:!0,defaultProtocol:"https"}),rX,oX,aX],content:c.value,onUpdate:()=>{c.value=d.value.getHTML()}});Me(c,()=>{d.value.getHTML()!==c.value&&d.value.commands.setContent(c.value)});const f=()=>{d.value.commands.focus()},m=v=>{var b;const y=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(v.key);(b=d==null?void 0:d.value)!=null&&b.isFocused&&y&&v.stopPropagation()};return e({editor:d,focus:f,hasContent:()=>{var y,b;const v=(b=(y=d==null?void 0:d.value)==null?void 0:y.getJSON())==null?void 0:b.content;return!(Array.isArray(v)&&v.length===1&&!Object.hasOwn(v[0],"content"))}}),(v,y)=>{var B;const b=Us,_=it,w=xn,T=x_,k=Wl,x=WG,M=UG,D=LG,A=DG,P=$G,$=PG;return C(),F("div",{class:ee(["ivyforms-editor",{"is-focused":(B=h(d))==null?void 0:B.isFocused}])},[z("div",iX,[I(b,{modelValue:o.value,"onUpdate:modelValue":y[0]||(y[0]=j=>o.value=j),type:"tonal",priority:"secondary",size:"l",tabs:i.map(j=>({name:j.index,label:j.label}))},null,8,["modelValue","tabs"]),v.fieldsPlaceholders&&v.generalPlaceholders?(C(),se(T,{key:0,fields:v.fieldsPlaceholders,general:v.generalPlaceholders,onInsertPlaceholder:l},{reference:V(()=>[I(w,{content:h(r)("insert_placeholders")},{default:V(()=>[I(_,{size:"s",priority:"tertiary","icon-only":"","icon-start":"context-menu-dot","icon-start-type":"fill","aria-label":h(r)("placeholders"),class:"ivyforms-editor__placeholders-btn"},null,8,["aria-label"])]),_:1},8,["content"])]),_:1},8,["fields","general"])):ie("",!0)]),z("div",sX,[o.value==="visual"?(C(),F("div",lX,[I(h(k3),{class:"ivyforms-editor__content ivyforms-p-12",editor:h(d),onMousedown:f,onKeydown:m},null,8,["editor"]),h(d)?(C(),F("div",uX,[I(k,{size:"s","icon-only":"",type:"ghost",priority:"white","icon-start-category":"text-formatting","icon-start":"text-bold",active:h(d).isActive("bold"),onClick:y[1]||(y[1]=lt(j=>h(d).chain().focus().toggleBold().run(),["stop","prevent"]))},null,8,["active"]),I(k,{size:"s",type:"ghost",priority:"white","icon-only":"","icon-start-category":"text-formatting","icon-start":"text-italic",active:h(d).isActive("italic"),onClick:y[2]||(y[2]=lt(j=>h(d).chain().focus().toggleItalic().run(),["stop","prevent"]))},null,8,["active"]),I(k,{size:"s",type:"ghost",priority:"white","icon-only":"","icon-start-category":"text-formatting","icon-start":"text-underline",active:h(d).isActive("underline"),onClick:y[3]||(y[3]=lt(j=>h(d).chain().focus().toggleUnderline().run(),["stop","prevent"]))},null,8,["active"]),I(k,{size:"s",type:"ghost",priority:"white","icon-only":"","icon-start-category":"text-formatting","icon-start":"text-strikethrough",active:h(d).isActive("strike"),onClick:y[4]||(y[4]=lt(j=>h(d).chain().focus().toggleStrike().run(),["stop","prevent"]))},null,8,["active"]),I(k,{size:"s",type:"ghost",priority:"white","icon-only":"","icon-start-category":"text-formatting","icon-start":"list-bulleted",active:h(d).isActive("bulletList"),onClick:y[5]||(y[5]=lt(j=>h(d).chain().focus().toggleBulletList().run(),["stop","prevent"]))},null,8,["active"]),I(k,{size:"s",type:"ghost",priority:"white","icon-only":"","icon-start-category":"text-formatting","icon-start":"list-numbered",active:h(d).isActive("orderedList"),onClick:y[6]||(y[6]=lt(j=>h(d).chain().focus().toggleOrderedList().run(),["stop","prevent"]))},null,8,["active"]),I(k,{size:"s",type:"ghost",priority:"white","icon-only":"","icon-start-category":"text-formatting","icon-start":"quotes",active:h(d).isActive("blockquote"),onClick:y[7]||(y[7]=lt(j=>h(d).chain().focus().toggleBlockquote().run(),["stop","prevent"]))},null,8,["active"]),I(x,{editor:h(d)},null,8,["editor"]),I(M,{editor:h(d),"text-style-property":"color"},{reference:V(()=>[I(k,{size:"s",type:"ghost",priority:"white","icon-only":"","icon-start-category":"text-formatting","icon-start":"text-color",onClick:y[8]||(y[8]=lt(()=>{},["stop","prevent"]))})]),_:1},8,["editor"]),I(M,{editor:h(d),"text-style-property":"backgroundColor"},{reference:V(()=>[I(k,{size:"s",type:"ghost",priority:"white","icon-only":"","icon-start-category":"text-formatting","icon-start":"bg-highlight",name:"bg-highlight",onClick:y[9]||(y[9]=lt(()=>{},["stop","prevent"]))})]),_:1},8,["editor"]),I(D,{editor:h(d)},null,8,["editor"]),I(A,{editor:h(d)},null,8,["editor"]),I(P,{editor:h(d)},null,8,["editor"]),I($,{editor:h(d)},null,8,["editor"])])):ie("",!0)])):ie("",!0),o.value==="html"?(C(),F("div",cX,[I(h(k3),{class:"ivyforms-editor__content ivyforms-p-12 ivyforms-flex-grow ivyforms-editor-html",editor:h(d),onMousedown:f,onKeydown:m},null,8,["editor"])])):ie("",!0)])],2)}}}),dX={class:"ivyforms-form-builder-settings-notification ivyforms-flex ivyforms-flex-1 ivyforms-flex-direction-column"},fX={class:"ivyforms-form-builder-settings-notification__option-bar ivyforms-pb-8 ivyforms-flex ivyforms-mr-20"},pX={class:"ivyforms-form-builder-settings-notification__option-bar__left ivyforms-flex ivyforms-gap-8"},hX={class:"ivyforms-form-builder-settings-notification__option-bar__right ivyforms-flex ivyforms-gap-8"},mX=he({__name:"FormBuilderManageNotification",setup(n){const e=ko(),t=Vr(),{getLabel:r}=at(),o=O(()=>{const D=t.params.formId;return Array.isArray(D)?D[0]:D}),i=O(()=>{const D=t.params.notificationId;return Array.isArray(D)?D[0]:D}),a=()=>{e.push({name:Xu,params:{formId:o.value}})},s=Ds(),{isEditing:l}=Bs(s),c=H({formName:"",formDescription:""});i.value?(s.loadNotification(Number(i.value)),s.isEditing=!0):(s.resetNotification(o.value),s.isEditing=!1);const d=zt(),f=H(!1),m=H(null),g=H(),v=H(),y=H();function b(D){m.value&&m.value.editor&&m.value.editor.chain().focus().insertContent(D).run()}const _=O(()=>(d.fields||[]).map(D=>({label:D.label,value:`{{${D.type}_${D.fieldIndex}}}`,type:D.type,fieldIndex:D.fieldIndex}))),w=O(()=>f1()),T=O(()=>_.value.filter(D=>D.type==="email")),k=O(()=>w.value.filter(D=>D.key&&D.key==="admin_email")),x=async()=>{f.value=!0;try{const D={name:s.name,sender:s.sender,receiver:s.receiver,enabled:s.enabled,subject:s.subject,message:s.message,smartLogic:s.smartLogic,formId:o.value||s.formId};s.isEditing&&i.value?await s.updateNotification(i.value,D):await s.createNotification(o.value),a()}catch(D){console.error(r("error_saving_notification"),D)}finally{f.value=!1}};function M(D,A){let P;switch(D){case"sender":P=g.value;break;case"receiver":P=v.value;break;case"subject":P=y.value;break}if(P&&P.$el){const $=P.$el.querySelector("input")||P.$el.querySelector("textarea");if($){const B=$.selectionStart,j=$.selectionEnd,U=$.value;$.value=U.slice(0,B)+A+U.slice(j),$.dispatchEvent(new Event("input")),$.setSelectionRange(B+A.length,B+A.length),$.focus()}}}return(D,A)=>{const P=Pi,$=it,B=cn,j=sn,U=xn,G=x_,N=$_,R=wp,X=$i;return C(),F("div",dX,[z("div",fX,[z("div",pX,[I(P,{modelValue:h(s).enabled,"onUpdate:modelValue":A[0]||(A[0]=te=>h(s).enabled=te),priority:"primary",size:"s",title:h(r)("enabled_status"),"text-position":"left"},null,8,["modelValue","title"])]),z("div",hX,[I($,{class:ee(["ivyforms-button__action--cancel"]),priority:"tertiary",onClick:a},{default:V(()=>[De(ae(h(r)("cancel")),1)]),_:1}),I($,{class:ee(["ivyforms-button__action--save"]),priority:"primary",loading:f.value,onClick:x},{default:V(()=>[f.value?ie("",!0):(C(),F($e,{key:0},[De(ae(h(r)(h(l)?"update":"save")),1)],64))]),_:1},8,["loading"])])]),I(X,null,{default:V(()=>[I(R,{model:c.value},{default:V(()=>[I(j,{label:h(r)("name"),prop:"notificationName"},{default:V(()=>[I(B,{modelValue:h(s).name,"onUpdate:modelValue":A[1]||(A[1]=te=>h(s).name=te),placeholder:h(r)("example")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),I(j,{label:h(r)("send_from"),prop:"notificationSender"},{default:V(()=>[I(B,{ref_key:"senderInputRef",ref:g,modelValue:h(s).sender,"onUpdate:modelValue":A[3]||(A[3]=te=>h(s).sender=te),placeholder:"ivy@forms.io"},{suffix:V(()=>[I(G,{fields:T.value,general:k.value,onInsertPlaceholder:A[2]||(A[2]=te=>M("sender",te))},{reference:V(()=>[I(U,{content:h(r)("insert_placeholders")},{default:V(()=>[I($,{size:"s",priority:"tertiary","icon-only":"","icon-start":"context-menu-dot","icon-start-type":"fill",type:"ghost","aria-label":h(r)("placeholders"),class:"ivyforms-editor__placeholders-btn"},null,8,["aria-label"])]),_:1},8,["content"])]),_:1},8,["fields","general"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),I(j,{label:h(r)("send_to"),prop:"notificationReceiver"},{default:V(()=>[I(B,{ref_key:"receiverInputRef",ref:v,modelValue:h(s).receiver,"onUpdate:modelValue":A[5]||(A[5]=te=>h(s).receiver=te),placeholder:"ivy@forms.io"},{suffix:V(()=>[I(G,{fields:T.value,general:k.value,onInsertPlaceholder:A[4]||(A[4]=te=>M("receiver",te))},{reference:V(()=>[I(U,{content:h(r)("insert_placeholders")},{default:V(()=>[I($,{size:"s",priority:"tertiary","icon-only":"","icon-start":"context-menu-dot","icon-start-type":"fill",type:"ghost","aria-label":h(r)("placeholders"),class:"ivyforms-editor__placeholders-btn"},null,8,["aria-label"])]),_:1},8,["content"])]),_:1},8,["fields","general"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),I(j,{label:h(r)("subject"),prop:"notificationSubject"},{default:V(()=>[I(B,{ref_key:"subjectInputRef",ref:y,modelValue:h(s).subject,"onUpdate:modelValue":A[7]||(A[7]=te=>h(s).subject=te),placeholder:h(r)("example")},{suffix:V(()=>[I(G,{onInsertPlaceholder:A[6]||(A[6]=te=>M("subject",te))},{reference:V(()=>[I(U,{content:h(r)("insert_placeholders")},{default:V(()=>[I($,{size:"s",priority:"tertiary","icon-only":"","icon-start":"context-menu-dot","icon-start-type":"fill",type:"ghost","aria-label":h(r)("placeholders"),class:"ivyforms-editor__placeholders-btn"},null,8,["aria-label"])]),_:1},8,["content"])]),_:1})]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),I(j,{label:h(r)("message"),prop:"formDescription",class:"ivyforms-form-builder-settings-notification__editor"},{default:V(()=>[I(N,{ref_key:"editorRef",ref:m,modelValue:h(s).message,"onUpdate:modelValue":A[8]||(A[8]=te=>h(s).message=te),"fields-placeholders":_.value,"general-placeholders":w.value,onInsertPlaceholder:b},null,8,["modelValue","fields-placeholders","general-placeholders"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1})])}}}),ug=bt(mX,[["__scopeId","data-v-8c7f44dd"]]),vX={class:"ivyforms-form-builder-settings ivyforms-flex ivyforms-flex-1 ivyforms-flex-direction-column"},gX={class:"ivyforms-form-builder-settings__option-bar ivyforms-pb-8 ivyforms-flex ivyforms-mr-20"},yX={class:"ivyforms-form-builder-settings__option-bar__left ivyforms-flex ivyforms-gap-8"},bX={class:"ivyforms-form-builder-settings__option-bar__right ivyforms-flex ivyforms-gap-8"},SX={class:"ivyforms-form-checkbox ivyforms-flex ivyforms-flex-direction-column"},_X=he({__name:"FormBuilderSettings",setup(n){const{getLabel:e}=at(),t=Vr(),r=H({formName:"",formDescription:""}),o=zt(),i=H(!1);Ht(async()=>{t.params.id&&await o.loadForm(t.params.id)});const a=async()=>{i.value=!0;try{await o.saveFormSettings()}finally{i.value=!1}},s=async()=>{i.value=!0;try{await o.updateForm()}finally{i.value=!1}};return(l,c)=>{const d=Pi,f=it,m=cn,g=sn,v=pn,y=wp,b=$i;return C(),F("div",vX,[z("div",gX,[z("div",yX,[I(d,{modelValue:h(o).published,"onUpdate:modelValue":c[0]||(c[0]=_=>h(o).published=_),priority:"primary",size:"s",title:h(e)("enabled_status"),"text-position":"left"},null,8,["modelValue","title"])]),z("div",bX,[h(o).isEditingSettingGeneral?(C(),se(f,{key:0,class:ee(["ivyforms-button__action--update"]),priority:"primary",loading:i.value,onClick:s},{default:V(()=>[i.value?ie("",!0):(C(),F($e,{key:0},[De(ae(h(e)("save")),1)],64))]),_:1},8,["loading"])):(C(),se(f,{key:1,class:ee(["ivyforms-button__action--save"]),priority:"primary",loading:i.value,onClick:a},{default:V(()=>[i.value?ie("",!0):(C(),F($e,{key:0},[De(ae(h(e)("save")),1)],64))]),_:1},8,["loading"]))])]),I(b,null,{default:V(()=>[I(y,{model:r.value},{default:V(()=>[I(g,{label:h(e)("form_name"),prop:"formName"},{default:V(()=>[I(m,{modelValue:h(o).name,"onUpdate:modelValue":c[1]||(c[1]=_=>h(o).name=_),placeholder:"ivy@forms.io"},null,8,["modelValue"])]),_:1},8,["label"]),I(g,{label:h(e)("form_desc"),prop:"formDescription",class:"ivyforms-form-settings-description"},{default:V(()=>[I(m,{modelValue:h(o).description,"onUpdate:modelValue":c[2]||(c[2]=_=>h(o).description=_),type:"textarea",placeholder:h(e)("form_description")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),z("div",SX,[I(v,{modelValue:h(o).showTitle,"onUpdate:modelValue":c[3]||(c[3]=_=>h(o).showTitle=_),priority:"secondary",size:"d",type:"checkmark"},{default:V(()=>[De(ae(h(e)("show_form_title")),1)]),_:1},8,["modelValue"]),I(v,{modelValue:h(o).showDescription,"onUpdate:modelValue":c[4]||(c[4]=_=>h(o).showDescription=_),priority:"secondary",size:"d",type:"checkmark"},{default:V(()=>[De(ae(h(e)("show_form_description")),1)]),_:1},8,["modelValue"]),I(v,{modelValue:h(o).storeEntries,"onUpdate:modelValue":c[5]||(c[5]=_=>h(o).storeEntries=_),priority:"secondary",size:"d",type:"checkmark"},{default:V(()=>[De(ae(h(e)("store_entries_db")),1)]),_:1},8,["modelValue"])])]),_:1},8,["model"])]),_:1})])}}}),wX=bt(_X,[["__scopeId","data-v-41746fef"]]),xX={class:"ivyforms-settings-notification ivyforms-flex ivyforms-flex-1 ivyforms-flex-direction-column ivyforms-gap-24 ivyforms-pr-20"},kX={key:0,class:"ivyforms-flex-1 ivyforms-flex ivyforms-flex-direction-column"},CX={class:"ivyforms-settings-notification__option-bar ivyforms-flex ivyforms-gap-8"},IX={class:"ivyforms-settings-notification__option-bar-left ivyforms-flex ivyforms-gap-8"},EX={class:"ivyforms-settings-notification__option-bar-right ivyforms-flex ivyforms-gap-8"},TX={class:"ivyforms-settings-notification__table ivyforms-gap-24 ivyforms-flex ivyforms-flex-1 ivyforms-flex-direction-column"},MX={key:0,class:"ivyforms-table-skeleton"},OX={class:"ivyforms-all-forms-pagination-container"},AX={key:1},PX=he({__name:"FormBuilderNotificationTable",setup(n){const{getLabel:e}=at(),t=zt(),r=Ds(),o=Na(),i=H(""),a=H(""),s=H(!1),l=H(!1),c=H(!1),d=H([]),f=H(0),m=Vr(),g=ko(),v=Al.debounce(R=>{a.value=R},500),y=Tn({page:1,perPage:10}),b=Tn({column:"id",order:"desc"}),_=O(()=>i.value.trim().length>0),w=()=>({page:y.page,perPage:y.perPage,search:a.value,sortBy:b.column,sortOrder:b.order,formId:m.params.formId?parseInt(Array.isArray(m.params.formId)?m.params.formId[0]:m.params.formId,10):t.formId?parseInt(t.formId,10):null}),T=async()=>{s.value=!0;try{await r.searchNotifications(w()),d.value=r.tableData;const R=r.paginationMeta;y.page=R.page,y.perPage=R.perPage,f.value=R.total}catch(R){console.error(e("error_loading_notification"),R)}finally{s.value=!1}};Me(i,v),Me(()=>o.dialogVisible,(R,X)=>{X&&!R&&(o.actionType==="delete"||o.actionType==="duplicate")&&setTimeout(T,300)}),Me([()=>y.page,()=>y.perPage,()=>a.value],async()=>{s.value=!0,await r.searchNotifications(w()),d.value=r.tableData,s.value=!1}),Me(()=>r.tableData,R=>{d.value=R,s.value=!1},{immediate:!0}),Me(()=>r.paginationMeta,R=>{f.value=Wu(R).total||0},{immediate:!0});const k=({column:R,order:X})=>{b.column=R,b.order=X==="asc"?"asc":X==="desc"?"desc":"asc",y.page=1,T()},x=()=>{const R=Array.isArray(m.params.formId)?m.params.formId[0]:m.params.formId||t.formId;r.resetNotification(R),l.value=!0,c.value=!1,g.replace(`/manage/${R}/settings/notification/manage`)},M=()=>{l.value=!1,c.value=!1,T(),g.push({name:"form-notifications",params:{formId:t.formId}})},D=R=>async()=>{s.value=!0;try{await r.loadNotification(R),l.value=!0,c.value=!0}catch(X){console.error(e("error_loading_notification"),X)}finally{s.value=!1;const X=Array.isArray(m.params.formId)?m.params.formId[0]:m.params.formId||t.formId;await g.push(`/manage/${X}/settings/notification/manage/${R}`)}},A=R=>async()=>{await o.handleActionClick(R,null,"notification","duplicate",{setLoading:X=>{s.value=X}})},P=R=>async()=>{await o.handleActionClick(R,null,"notification","delete",{setLoading:X=>{s.value=X}})},$=({rowData:R})=>R?Fe("div",{class:"ivyforms-column-actions"},[Fe(xn,{content:e("edit"),placement:"top"},()=>[Fe(it,{iconOnly:!0,iconStart:"edit",size:"s",type:"ghost",priority:"tertiary",iconStartType:"outline",onClick:D(R.id)})]),Fe(xn,{content:e("duplicate"),placement:"top"},()=>[Fe(it,{iconOnly:!0,iconStart:"copy",size:"s",type:"ghost",priority:"tertiary",iconStartType:"outline",onClick:A(R.id)})]),Fe(xn,{content:e("delete"),placement:"top"},()=>[Fe(it,{iconOnly:!0,iconStart:"trash",size:"s",type:"ghost",priority:"danger",iconStartType:"outline",onClick:P(R.id)})])]):null,B=({rowData:R})=>R?Fe(Pi,{modelValue:R.enabled,size:"s","onUpdate:modelValue":async X=>{R.enabled=X,await r.updateNotification(R.id,R),await T()}}):null,j=({rowData:R})=>R?Fe(fs,{size:"s",href:"#",onClick:D(R.id),class:"ivyforms-name-cell"},()=>[R.name||"No Name"]):null,U=({rowData:R})=>R?Fe("span",R.receiver||"No Receiver"):null,G=({rowData:R})=>R?Fe("span",R.subject||"No Subject"):null,N=H([{key:"enabled",title:e("status"),cellRenderer:B,width:100,visible:!0,class:"status-column"},{key:"name",title:e("name"),cellRenderer:j,width:300,visible:!0,class:"name-column",sortable:!0},{key:"receiver",title:e("receiver"),cellRenderer:U,width:250,visible:!0,class:"receiver-column",sortable:!0},{key:"subject",title:e("subject"),cellRenderer:G,width:300,visible:!0,class:"subject-column",sortable:!0},{key:"actions",title:"",cellRenderer:$,width:200,visible:!0,class:"ivyforms-cell-actions"}]);return Ht(()=>{r.isEditing=!1,T()}),(R,X)=>(C(),F("div",xX,[l.value?(C(),F("div",AX,[I(ug,{onClose:M})])):(C(),F("div",kX,[z("div",CX,[z("div",IX,[I(Ws,{modelValue:i.value,"onUpdate:modelValue":X[0]||(X[0]=te=>i.value=te),placeholder:h(e)("search_notifications"),clearable:""},null,8,["modelValue","placeholder"])]),z("div",EX,[I(it,{"icon-start":"plus",onClick:x},{default:V(()=>[De(ae(h(e)("notifications")),1)]),_:1})])]),z("div",TX,[I(Ep,{columns:N.value,data:s.value?[]:d.value,loading:s.value,sort:b,"row-key":"id",pagination:"",onSortChange:k},{empty:V(()=>[s.value?(C(),F("div",MX,[I(bc,null,{template:V(()=>[(C(!0),F($e,null,ot(y.perPage,te=>(C(),se(Sc,{key:te,class:"ivyforms-skeleton-row",style:{"min-height":"48px","margin-bottom":"8px"}}))),128))]),_:1})])):_.value?(C(),se(Es,{key:2,title:h(e)("empty_search_title"),subtitle:h(e)("empty_search_subtitle")},null,8,["title","subtitle"])):(C(),se(Es,{key:1,image:"not-found",title:h(e)("empty_state_notification_title"),subtitle:h(e)("empty_state_notification_subtitle")},{actionButton:V(()=>[I(it,{"icon-start":"plus",onClick:x},{default:V(()=>[De(ae(h(e)("notifications")),1)]),_:1})]),_:1},8,["title","subtitle"]))]),_:1},8,["columns","data","loading","sort"]),z("div",OX,[I(Ip,{"current-page":y.page,"onUpdate:currentPage":X[1]||(X[1]=te=>y.page=te),"page-size":y.perPage,"onUpdate:pageSize":X[2]||(X[2]=te=>y.perPage=te),total:f.value},null,8,["current-page","page-size","total"])])])]))]))}});function $X(n){if(!n)return!1;const e=n.trim();if(!/^(https?:\/\/)?([a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*|localhost|\d{1,3}(\.\d{1,3}){3}|\[[0-9a-fA-F:]+\])(:\d+)?(\/|$)/.test(e))return!1;const r=e.match(/https?:\/\//gi);if(r&&r.length>1)return!1;let o=e;try{return/^https?:\/\//i.test(e)||(o="https://"+e),new URL(o),!0}catch{return!1}}const RX={key:0,class:"ivyforms-form-builder-settings-confirmation ivyforms-flex ivyforms-flex-1 ivyforms-flex-direction-column ivyforms-pr-20"},DX={class:"ivyforms-form-builder-settings-confirmation__option-bar ivyforms-pb-8 ivyforms-flex"},NX={class:"ivyforms-form-builder-settings-confirmation__option-bar-left ivyforms-flex"},FX={class:"ivyforms-form-builder-settings-confirmation__option-bar-right ivyforms-flex"},LX={key:0,class:"ivyforms-form-builder-settings-confirmation__content-section"},BX={class:"ivyforms-form-builder-settings-confirmation__field-label ivyforms-flex ivyforms-flex-direction-column ivyforms-mb-6 ivyforms-gap-4"},VX={class:"ivyforms-form-builder-settings-confirmation__field-label-row ivyforms-flex ivyforms-gap-4"},zX={class:"confirmation-title medium-14"},HX={class:"redirection-description regular-14"},UX={class:"ivyforms-form-builder-settings-confirmation__radio-section"},WX={key:1,class:"ivyforms-form-builder-settings-confirmation__content-section"},jX={class:"ivyforms-form-builder-settings-confirmation__field-label ivyforms-flex ivyforms-flex-direction-column ivyforms-mb-6 ivyforms-gap-4"},KX={class:"ivyforms-form-builder-settings-confirmation__field-label-row ivyforms-flex ivyforms-gap-4"},YX={class:"confirmation-title medium-14"},qX={key:2,class:"ivyforms-form-builder-settings-confirmation__content-section"},GX=he({__name:"FormBuilderConfirmation",setup(n){const{getLabel:e}=at(),{request:t}=zl(),r=Vr(),o=O(()=>{const x=r.params.formId;return Array.isArray(x)?x[0]:x}),i=O(()=>{const x=r.params.confirmationId;return Array.isArray(x)?x[0]:x}),a=Ul(),s=zt(),l=H("horizontal"),c=H("successMessage"),d=H([]),f=H(!1),m=H(!1),g=H(null),v=H(""),y=H(""),b=[{label:e("success_message"),index:"successMessage"},{label:e("redirect_to_page"),index:"redirectToPage"},{label:e("redirect_to_custom_url"),index:"redirectToCustomUrl"}];function _(x){g.value&&g.value.editor&&g.value.editor.chain().focus().insertContent(x+" ").run()}const w=O(()=>(s.fields||[]).filter(x=>x.type&&typeof x.fieldIndex<"u")),T=O(()=>f1()),k=async()=>{if(v.value="",y.value="",c.value==="redirectToPage"&&!a.page){v.value=e("please_select_a_page");return}if(c.value==="redirectToCustomUrl"){if(!a.url){y.value=e("please_enter_a_url");return}if(!$X(a.url)){y.value=e("please_enter_a_valid_url");return}}m.value=!0;const x={formId:o.value||s.formId,type:c.value,enabled:a.enabled,showForm:a.showForm};switch(c.value){case"successMessage":x.message=a.message||"";break;case"redirectToPage":x.page=a.page||"";break;case"redirectToCustomUrl":x.url=a.url||"";break}a.type=c.value,a.formId=Number(o.value||s.formId);try{a.id?await a.updateConfirmation(a.id,x):await a.createConfirmation()}finally{m.value=!1}};return Ht(async()=>{try{o.value&&await s.loadForm(o.value);const{data:x,error:M,status:D}=await t("wp/v2/pages",{method:"GET",headers:{"Content-Type":"application/json"}},{useNamespace:!1});!M&&D===200&&Array.isArray(x)?d.value=x.map(P=>({value:P.id,label:P.title.rendered})):d.value=[],o.value&&i.value&&await a.loadConfirmation(Number(i.value));const A=a.type;if(c.value=A||"successMessage",typeof a.resetEntityState=="function"&&a.resetEntityState(),f.value=!0,a.page){const P=d.value.find($=>$.value===Number(a.page));a.page=P?P.value:a.page}}catch(x){console.error(e("error_loading_data_confirmation"),x)}}),Me(()=>f.value&&c.value,x=>{x&&a.type!==x&&(a.type=x)}),Me(()=>f.value&&a.type,x=>{x&&c.value!==x&&(c.value=x)}),Me(c,()=>{v.value="",y.value=""}),Me(()=>a.page,x=>{v.value&&x&&(v.value="")}),Me(()=>a.url,x=>{if(y.value){if(y.value===e("please_enter_a_url"))x&&x.trim()!==""&&(y.value="");else if(y.value===e("please_enter_a_valid_url")&&x&&x.trim()!=="")try{const M=x.trim();/^\/\//.test(M)?new URL("http:"+M):new URL(M),y.value=""}catch{}}}),(x,M)=>{const D=Pi,A=it,P=Us,$=rn,B=xn,j=$_,U=_p,G=vg,N=Fs,R=Ls,X=sn,te=cn;return f.value?(C(),F("div",RX,[z("div",DX,[z("div",NX,[I(D,{modelValue:h(a).enabled,"onUpdate:modelValue":M[0]||(M[0]=Y=>h(a).enabled=Y),priority:"primary",size:"s","text-position":"left",title:h(e)("enabled_status")},null,8,["modelValue","title"])]),z("div",FX,[I(A,{class:ee(["ivyforms-button__action--save"]),priority:"primary",loading:m.value,onClick:k},{default:V(()=>[m.value?ie("",!0):(C(),F($e,{key:0},[De(ae(h(e)("save")),1)],64))]),_:1},8,["loading"])])]),I(P,{modelValue:c.value,"onUpdate:modelValue":M[1]||(M[1]=Y=>c.value=Y),mode:l.value,type:"tonal",priority:"tertiary",class:"ivyforms-form-builder-settings-confirmation__menu",tabs:b.map(Y=>({name:Y.index,label:Y.label}))},null,8,["modelValue","mode","tabs"]),c.value==="successMessage"?(C(),F("div",LX,[z("div",BX,[z("div",VX,[z("span",zX,ae(h(e)("success_message")),1),I(B,{content:h(e)("success_message_tooltip"),placement:"top",theme:"inverted"},{default:V(()=>[I($,{name:"question",type:"outline",size:"s",color:"var(--map-base-dusk-symbol-2)",onClick:M[2]||(M[2]=lt(()=>{},["prevent"]))})]),_:1},8,["content"])]),z("span",HX,ae(h(e)("overridden_warn")),1)]),I(j,{ref_key:"editorRef",ref:g,modelValue:h(a).message,"onUpdate:modelValue":M[3]||(M[3]=Y=>h(a).message=Y),"fields-placeholders":w.value,"general-placeholders":T.value,onInsertPlaceholder:_},null,8,["modelValue","fields-placeholders","general-placeholders"]),z("div",UX,[z("p",null,ae(h(e)("after_form_submission")),1),I(G,{modelValue:h(a).showForm,"onUpdate:modelValue":M[4]||(M[4]=Y=>h(a).showForm=Y),priority:"secondary"},{default:V(()=>[I(U,{value:!1,priority:"secondary"},{default:V(()=>[De(ae(h(e)("hide_form")),1)]),_:1}),I(U,{value:!0,priority:"secondary"},{default:V(()=>[De(ae(h(e)("reset_form")),1)]),_:1})]),_:1},8,["modelValue"])])])):c.value==="redirectToPage"?(C(),F("div",WX,[z("div",jX,[z("div",KX,[z("span",YX,ae(h(e)("redirect_to_page")),1),I(B,{content:h(e)("success_message_tooltip"),placement:"top",theme:"inverted"},{default:V(()=>[I($,{name:"question",type:"outline",size:"s",color:"var(--map-base-dusk-symbol-2)",onClick:M[5]||(M[5]=lt(()=>{},["prevent"]))})]),_:1},8,["content"])])]),I(X,{error:v.value},{default:V(()=>[I(R,{modelValue:h(a).page,"onUpdate:modelValue":M[6]||(M[6]=Y=>h(a).page=Y),placeholder:h(e)("select_page")},{default:V(()=>[(C(!0),F($e,null,ot(d.value,Y=>(C(),se(N,{key:Y.value,value:Y.value,label:Y.label},{default:V(()=>[De(ae(Y.label),1)]),_:2},1032,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["error"])])):c.value==="redirectToCustomUrl"?(C(),F("div",qX,[I(X,{error:y.value,label:h(e)("enter_url")},{default:V(()=>[I(te,{modelValue:h(a).url,"onUpdate:modelValue":M[7]||(M[7]=Y=>h(a).url=Y),placeholder:h(e)("enter_url")},null,8,["modelValue","placeholder"])]),_:1},8,["error","label"])])):ie("",!0)])):ie("",!0)}}}),JX={class:"ivyforms-all-entries__header"},R_=he({__name:"AllEntriesTableHeader",props:{selectedIds:{},loading:{type:Boolean}},emits:["unselect-all","reload","update:loading"],setup(n,{emit:e}){const t=Na(),{getLabel:r}=at(),o=n,i=e,a=H(!1),s=()=>{o.selectedIds.length>0&&t.handleActionClick(null,o.selectedIds,"entries","delete",{setLoading:d=>{a.value=d,i("update:loading",d)}})},l=O(()=>o.selectedIds.length>0),c=d=>{d||i("unselect-all")};return(d,f)=>(C(),F("div",JX,[I(pn,{type:"checkmark",indeterminate:"",size:"s","model-value":l.value,class:"ivyforms-ml-6","onUpdate:modelValue":c},{default:V(()=>[xe(d.$slots,"default")]),_:3},8,["model-value"]),I(it,{priority:"danger",size:"xs",onClick:s},{default:V(()=>[De(ae(h(r)("delete")),1)]),_:1})]))}}),XX={class:"all-entries ivyforms-flex ivyforms-flex-1 ivyforms-flex-direction-column ivyforms-p-4 ivyforms-gap-24"},QX={class:"ivyforms-all-entries-option-bar"},ZX={class:"ivyforms-all-entries-option-bar__left"},eQ={class:"ivyforms-all-entries-table"},tQ={key:0,class:"ivyforms-table-skeleton"},nQ={class:"ivyforms-all-entries-pagination-container"},rQ=he({__name:"AllEntries",setup(n){const{getLabel:e}=at();Va();const{getHashRedirectLink:t,redirectToWordPressAdminPage:r}=oa(),o=zt(),i=Vs(),a=mc(),s=Tp(),l=Na(),c=H(),d=H(0),f=H(null),m=H(null),g=H([]),v=H(0),y=H(null),b=H(!1),_=H(!0),w=H(!1),T=H(!1),k=H(null),x=H(""),M=H(""),D=Al.debounce(Se=>{M.value=Se},500),A=Tn({starred:null,read:null}),P=Tn({page:1,perPage:10}),$=Tn({column:"id",order:"desc"}),B=Tn({readTrueCount:0,readFalseCount:0,starredTrueCount:0,starredFalseCount:0}),j=()=>Fe(pn,{modelValue:ye.value,size:"s",type:"checkmark","onUpdate:modelValue":Se=>gt(Se)},()=>[]),U=({rowData:Se})=>Se?Fe(pn,{modelValue:Se.selected,type:"checkmark",size:"s","onUpdate:modelValue":He=>Se.selected=He},()=>[]):null,G=({rowData:Se})=>Se?Fe(fs,{size:"s",href:t(ki,`/details/${Se.id}`),class:Se.status==="unread"?"ivyforms-unread-entry":""},()=>[Se.id]):null,N=({rowData:Se})=>Se?Fe(rn,{name:Se.starred?"star-2":"star",type:"fill",size:"d",color:Se.starred?"var(--map-accent-amber-symbol-0)":"var(--map-base-dusk-symbol--1)",style:"cursor: pointer;",onClick:async()=>{Se.starred=!Se.starred,await a.updateStarred(Se.id,Se.starred),Se.starred?(B.starredTrueCount++,B.starredFalseCount--):(B.starredTrueCount--,B.starredFalseCount++)}}):null,R=({rowData:Se})=>{if(!Se)return null;const He=Se.formId,Tt=re.value[He]||"";return Fe(fs,{size:"s",href:t(Cr,`/manage/${He}`),class:"ivyforms-name-cell"},()=>[Tt])},X=({rowData:Se})=>Se?Fe("div",{class:["ivyforms-column-actions",{hovered:Se.id===k.value}]},[Fe(xn,{content:Se.status==="read"?e("mark_as_unread"):e("mark_as_read"),placement:"top"},Fe(it,{iconOnly:!0,iconStart:Se.status==="read"?"read":"unread",size:"s",type:"ghost",priority:"tertiary",iconStartType:"outline",onClick:async()=>{Se.status=Se.status==="read"?"unread":"read",await a.updateStatus(Se.id,Se.status),Se.status==="read"?(B.readTrueCount++,B.readFalseCount--):(B.readTrueCount--,B.readFalseCount++)}})),Fe(xn,{content:e("preview"),placement:"top"},Fe(it,{iconOnly:!0,iconStart:"preview",size:"s",type:"ghost",priority:"tertiary",iconStartType:"outline",onClick:ut(Se.id)})),Fe(xn,{content:e("delete"),placement:"top"},Fe(it,{iconOnly:!0,iconStart:"trash",size:"s",type:"ghost",priority:"danger",iconStartType:"outline",onClick:tt(Se.id)}))]):null,te=H([{key:"select",width:44,minWidth:44,headerRenderer:j,cellRenderer:U,visible:!0,showInModal:!1,fixed:wi.LEFT},{key:"star",width:32,minWidth:32,title:e("starred"),headerRenderer:()=>Fe(rn,{name:"star",type:"outline",size:"d",color:"var(--map-base-dusk-symbol-2)"}),cellRenderer:N,visible:!0,showInModal:!0},{key:"id",title:e("id"),width:40,minWidth:40,cellRenderer:G,visible:!0,showInModal:!0,sortable:!0,class:"ivyforms-custom-link"},{key:"formName",title:e("form_name"),width:204,minWidth:204,sortable:!0,cellRenderer:R,visible:!0,showInModal:!0},{key:"date-created",title:e("date_submitted"),width:105,minWidth:105,cellRenderer:({rowData:Se})=>Fe("span",$o.formatWPDate(Se.dateCreated)),visible:!0,showInModal:!0},{key:"browser",title:e("browser"),width:100,minWidth:100,cellRenderer:({rowData:Se})=>Fe("span",Se.userAgent||e("unknown")),visible:!0,showInModal:!0},{key:"ip",title:e("ip_address"),width:120,minWidth:120,cellRenderer:({rowData:Se})=>Fe("span",Se.ipAddress||e("unknown")),visible:!0,showInModal:!0},{key:"actions",title:"",class:"ivyforms-cell-actions",width:124,minWidth:124,cellRenderer:X,visible:!0,showInModal:!1,fixed:wi.RIGHT}]),Y=O(()=>{var Se;return $o.convertWPFormat(((Se=window.wpIvyDateFormat)==null?void 0:Se.dateFormat)||"D/M/Y","dayjs")}),re=O(()=>a.formIdToName),Q=O(()=>{const Se=te.value.filter(ce=>ce.visible),He=Se.filter(ce=>ce.showInModal),Tt=d.value||0,$t=Se.reduce((ce,be)=>ce+(typeof be.width=="number"?be.width:0),0),me=Tt-$t>0?Tt/He.length:null;return Se.map(ce=>ce.showInModal&&me?{...ce,width:Math.floor(me)}:ce)}),Z=O(()=>te.value.reduce((Se,He)=>Se+(typeof He.minWidth=="number"?He.minWidth:parseFloat(He.minWidth)||0),0)),q=O(()=>g.value.some(Se=>Se.selected)),le=O(()=>g.value.filter(Se=>Se.selected).map(Se=>Se.id)),ye=O(()=>g.value.length>0&&g.value.every(Se=>Se.selected)),Re=O(()=>x.value.trim()!==""||y.value||A.starred!==null||A.read!==null),ze=Se=>({page:P.page,perPage:P.perPage,search:M.value,sortBy:$.column,sortOrder:$.order,dateRange:$o.formatDateRangeForApi(y.value),shouldGetCount:Se,formId:o.formId?Number(o.formId):void 0,filters:{starred:A.starred,read:A.read},searchFieldValue:!1});Me(x,D),Me([()=>P.page,()=>P.perPage,()=>M.value,()=>A.starred,()=>A.read,()=>y.value],async()=>{_.value=!0,await a.fetchData(ze(!1)),g.value=a.tableData,_.value=!1}),Me([()=>o.formId],async()=>{_.value=!0,await a.fetchData(ze(!0)),g.value=a.tableData,_.value=!1}),Me(y,()=>T.value=!!y.value),Me(()=>a.tableData,Se=>{g.value=Se,_.value=!1},{immediate:!0}),Me(()=>a.paginationMeta,Se=>{P.page!==Se.page&&(P.page=Se.page),P.perPage!==Se.perPage&&(P.perPage=Se.perPage),v.value=Se.total},{deep:!0,immediate:!0}),Me(()=>a.filterCount,Se=>{B.readTrueCount=Se.readTrueCount,B.readFalseCount=Se.readFalseCount,B.starredTrueCount=Se.starredTrueCount,B.starredFalseCount=Se.starredFalseCount},{immediate:!0});const nt=async Se=>{_.value=!0;try{await a.fetchData(ze(Se)),g.value=a.tableData;const He=a.paginationMeta;P.page=He.page,P.perPage=He.perPage,v.value=He.total,Se&&(B.readTrueCount=a.filterCount.readTrueCount,B.readFalseCount=a.filterCount.readFalseCount,B.starredTrueCount=a.filterCount.starredTrueCount,B.starredFalseCount=a.filterCount.starredFalseCount)}finally{_.value=!1,await Ge()}},Ge=async()=>{await Xt();const Se=document.querySelector(".ivyforms-table");if(!Se)return;const He=Se.querySelectorAll(".el-table-v2__row");He.length&&He.forEach(Tt=>{const $t=Tt.getAttribute("rowkey");$t&&(Tt.addEventListener("mouseenter",()=>{k.value=Number($t),He.forEach(wt=>{wt.getAttribute("rowkey")===$t&&wt.classList.add("hovered")})}),Tt.addEventListener("mouseleave",()=>{k.value=null,He.forEach(wt=>{wt.getAttribute("rowkey")===$t&&wt.classList.remove("hovered")})}))})},mt=({column:Se,order:He})=>{$.column=Se,$.order=He==="asc"?"asc":He==="desc"?"desc":"",P.page=1,nt(!1)},ut=Se=>()=>{r(ki,`/details/${Se}`)},Pt=()=>{g.value.forEach(Se=>{Se.selected=!1})},gt=Se=>{g.value.forEach(He=>He.selected=Se)},tt=Se=>async()=>{await l.handleActionClick(Se,null,"entry","delete",{setLoading:He=>{_.value=He}})},Ct=()=>{b.value=!0,Xt(()=>{Bt();const Se=document.querySelector(".el-date-editor");Se==null||Se.click()})},Bt=()=>{Xt(()=>{const Se=f.value&&"$el"in f.value?f.value.$el:f.value,He=m.value&&"$el"in m.value?m.value.$el:m.value;if(Se instanceof HTMLElement&&He instanceof HTMLElement){const Tt=Se.getBoundingClientRect();He.style.position="absolute",He.style.top=`${Tt.bottom+8}px`,He.style.left=`${Tt.left}px`,He.style.inset="unset"}})},Ne=()=>{b.value=!1},je=()=>{y.value=null,T.value=!1,b.value=!1},Be=(Se,He=500)=>()=>{Se(),setTimeout(()=>{s.closeContextMenu()},He)},qe=(Se,He)=>{A.starred=Se==="starred"?He:null,A.read=Se==="read"?He:null,w.value=He!==null},Je=async()=>{if(s.isOpen){s.closeContextMenu();return}s.openContextMenu({actions:[Hn(An.Read,{handler:Be(()=>qe("read","read")),rightText:B.readTrueCount.toString(),isActive:()=>A.read==="read",secondary:!0}),Hn(An.Unread,{handler:Be(()=>qe("read","unread")),isActive:()=>A.read==="unread",secondary:!0,rightText:B.readFalseCount.toString()}),Hn(An.Starred,{handler:Be(()=>qe("starred",!0)),isActive:()=>A.starred===!0,secondary:!0,rightText:B.starredTrueCount.toString()}),Hn(An.Unstarred,{handler:Be(()=>qe("starred",!1)),isActive:()=>A.starred===!1,rightText:B.starredFalseCount.toString(),secondary:!0}),Hn(An.ResetFilters,{handler:Be(()=>{qe("starred",null),qe("read",null)}),secondary:!0})],contextMenuButtonRef:f.value})},ct=()=>{A.starred=null,A.read=null,w.value=!1},vt=()=>{A.starred=null,A.read=null,y.value=null,x.value="",P.page=1,w.value=!1,T.value=!1};return Ht(()=>{nt(!0),i.tableData.length||i.fetchData()}),(Se,He)=>{const Tt=Ws,$t=Pg,wt=R_,me=Sc,ce=bc,be=Es,Te=Ep,de=Ip;return C(),F("div",XX,[z("div",QX,[z("div",ZX,[I(Tt,{modelValue:x.value,"onUpdate:modelValue":He[0]||(He[0]=fe=>x.value=fe),class:"ivyforms-search__fixed-width",placeholder:h(e)("search")},null,8,["modelValue","placeholder"]),b.value?(C(),se(Rg,{key:0,ref_key:"datePickerPopperRef",ref:m,modelValue:y.value,"onUpdate:modelValue":He[1]||(He[1]=fe=>y.value=fe),type:"datetimerange","date-format":Y.value,clearable:"",onClose:Ne},null,8,["modelValue","date-format"])):ie("",!0),I($t,{color:"tertiary",type:"datepicker","aria-label":h(e)("date_filters"),indicator:T.value,"custom-hide-indicator":je,onClick:Ct},null,8,["aria-label","indicator"]),I($t,{ref_key:"menuButtonRef",ref:f,color:"tertiary",type:"filter","aria-label":h(e)("filters"),indicator:w.value,"custom-hide-indicator":ct,onClick:Je},null,8,["aria-label","indicator"]),I($g)])]),z("div",eQ,[I(Te,{ref_key:"tableRef",ref:c,data:_.value?[]:g.value,loading:_.value,total:v.value,"row-key":"id",columns:Q.value,"min-table-width":Z.value,"is-custom-header":q.value,sort:$,pagination:"",onSortChange:mt,onWidthChange:He[3]||(He[3]=fe=>d.value=fe)},{header:V(()=>[I(wt,{loading:_.value,"onUpdate:loading":He[2]||(He[2]=fe=>_.value=fe),"selected-ids":le.value,onUnselectAll:Pt},null,8,["loading","selected-ids"])]),empty:V(()=>[_.value?(C(),F("div",tQ,[I(ce,null,{template:V(()=>[(C(!0),F($e,null,ot(P.perPage,fe=>(C(),se(me,{key:fe,class:"ivyforms-skeleton-row"}))),128))]),_:1})])):Re.value?(C(),se(be,{key:2,image:"filters",title:h(e)("empty_state_filters_all_entries_title"),subtitle:h(e)("empty_state_filters_all_entries_subtitle")},{actionButton:V(()=>[I(it,{onClick:vt},{default:V(()=>[De(ae(h(e)("reset_filters")),1)]),_:1})]),_:1},8,["title","subtitle"])):(C(),se(be,{key:1,image:"not-found",title:h(e)("empty_state_all_entries_title"),subtitle:h(e)("empty_state_all_entries_subtitle")},null,8,["title","subtitle"]))]),_:1},8,["data","loading","total","columns","min-table-width","is-custom-header","sort"])]),I(_c,{"show-close":"","align-center":"",type:"error",width:"342px"}),z("div",nQ,[I(de,{"current-page":P.page,"onUpdate:currentPage":He[4]||(He[4]=fe=>P.page=fe),"page-size":P.perPage,"onUpdate:pageSize":He[5]||(He[5]=fe=>P.perPage=fe),total:v.value},null,8,["current-page","page-size","total"])])])}}}),oQ={};function aQ(n,e){const t=rQ,r=Hs;return C(),se(r,{"has-table":""},{default:V(()=>[I(t)]),_:1})}const iQ=bt(oQ,[["render",aQ]]),sQ={class:"ivyforms-all-entries-page ivyforms-flex ivyforms-gap-8 ivyforms-p-8"},lQ=he({__name:"EntriesPage",setup(n){const{getLabel:e}=at();Va();const t=H(),r=H([]),o=H(!1),i=H(!1),a=Vs(),s=zt(),l=aa(),c=O(()=>l.isFullScreenMode),{redirectToWordPressAdminPage:d}=oa(),f=H(bo),m=O(()=>[{label:e("all_forms"),index:Oa,routeName:Oa},{label:e("entries"),index:bo,routeName:bo},{label:e("integrations"),index:"integrations"},{label:e("settings"),index:"global-settings",routeName:"global-settings"}]),g=e("all_entries");Pn("pageTitle",g);const v=async()=>{o.value=!0;try{await a.fetchData({page:1,perPage:100}),r.value=a.tableData.map(_=>({value:_.id,labelId:`${e("id")}: ${_.id}`,label:_.name||`Form #${_.id}`}))}catch(_){console.error(e("failed_to_fetch_form"),_),_t({message:e("failed_to_fetch_form"),type:"error"})}finally{o.value=!1}},y=_=>{t.value=_,s.formId=String(_)},b=_=>{_===Oa?d(xi):_===bo?d(ki):_==="global-settings"&&d(gc)};return Ht(()=>{v()}),(_,w)=>{const T=Pp,k=zs,x=Oi,M=iQ;return C(),F($e,null,[I(x,null,{left:V(()=>[I(T,{modelValue:t.value,"onUpdate:modelValue":w[0]||(w[0]=D=>t.value=D),size:"s",type:"border",clearable:"",placeholder:h(e)("select_form"),options:r.value,loading:o.value||i.value,onChange:y},null,8,["modelValue","placeholder","options","loading"]),c.value?(C(),se(Ai,{key:0,mode:"horizontal",ellipsis:!1},{default:V(()=>[(C(!0),F($e,null,ot(m.value,D=>(C(),se(Zo,{key:D.index,label:D.label,name:D.index,"is-active":f.value===D.index,type:"tonal","coming-soon":D.index==="integrations",onClick:A=>b(D.index)},null,8,["label","name","is-active","coming-soon","onClick"]))),128))]),_:1})):ie("",!0)]),default:V(()=>[I(k)]),_:1}),z("div",sQ,[I(M)])],64)}}}),uQ=[{key:"id",label:"Entry ID"},{key:"ipAddress",label:"User IP"},{key:"sourceURL",label:"Source URL"},{key:"userAgent",label:"Browser"},{key:"author",label:"User"},{key:"status",label:"Status"},{key:"dateCreated",label:"Submitted On"}],cQ={class:"ivyforms-entry-page-section-title"},dQ={class:"medium-18"},fQ={class:"ivyforms-entry-page-section-content"},pQ={class:"ivyforms-entry-details-table"},hQ={class:"ivyforms-key-column medium-14"},mQ={class:"ivyforms-value-column regular-14"},vQ={key:0,class:"ivyforms-status-cell"},gQ=he({__name:"EntryDetailsPagePanel",setup(n){const e=Vr(),t=ko(),r=mc(),o=zt(),{getLabel:i}=at(),a=on("entry"),s=O(()=>uQ.filter(d=>(a==null?void 0:a.value)&&Object.prototype.hasOwnProperty.call(a.value,d.key))),l=()=>e.name===hi?e.params.entryId:e.params.id,c=async d=>{try{const f=d==="read"?"unread":"read",m=l();await r.updateStatus(Number(m),f),a!=null&&a.value&&(a.value.status=f),d==="read"&&f==="unread"&&(e.name===hi?await t.push({name:Ii,params:{id:e.params.formId}}):(e.name===ds||e.name===bo)&&(o.formId=null,await t.push({name:bo})))}catch(f){console.error(i("failed_to_update_entry_status"),f)}};return(d,f)=>{const m=it,g=yc;return C(),se(g,{width:360},{default:V(()=>[z("div",cQ,[z("span",dQ,ae(h(i)("general_details")),1)]),z("div",fQ,[z("table",pQ,[z("tbody",null,[(C(!0),F($e,null,ot(s.value,v=>(C(),F("tr",{key:v.key},[z("td",hQ,ae(v.label),1),z("td",mQ,[v.label===h(i)("status")?(C(),F("div",vQ,[z("span",null,ae(h(a)[v.key].charAt(0).toUpperCase()+h(a)[v.key].slice(1)),1),I(m,{"icon-only":"","icon-start":h(a)[v.key]==="read"?"read":"unread",size:"s",type:"ghost",priority:"tertiary","icon-start-type":"outline",onClick:y=>c(h(a)[v.key])},null,8,["icon-start","onClick"])])):v.label===h(i)("submitted_on")?(C(),F($e,{key:1},[De(ae(h($o).formatWPDate(h(a)[v.key])),1)],64)):(C(),F($e,{key:2},[De(ae(h(a)[v.key]),1)],64))])]))),128))])])])]),_:1})}}}),yQ=bt(gQ,[["__scopeId","data-v-02bee4a9"]]),D_=Vl("entry",()=>{const n=H(null),e=H([]),t=H(!1),r=H(null),{getLabel:o}=at(),{request:i}=zl(),a=mc();return{entry:n,entryFields:e,loading:t,error:r,fetchEntry:async l=>{try{const{data:c,error:d,status:f}=await i(`entry/${l}`,{method:"GET",headers:{"Content-Type":"application/json"}});!d&&f===200&&(c!=null&&c.data)?(n.value=c.data.entry,e.value=c.data.fields||[],t.value=!1,n.value.status==="unread"&&(await a.updateStatus(l,"read"),n.value.status="read")):(_t({message:o("failed_to_get_entry"),type:"error"}),console.error(o("failed_to_get_entry"),c==null?void 0:c.message))}catch(c){_t({message:`${o("failed_to_get_entry")} ${c}`,type:"error"})}}}}),bQ={class:"ivyforms-entry-page-section-title"},SQ={class:"medium-18"},_Q={class:"ivyforms-entry-page-section-content ivyforms-mt-24"},wQ={class:"ivyforms-entry-table"},xQ={class:"ivyforms-key-column medium-14"},kQ={class:"ivyforms-value-column regular-14"},CQ=he({__name:"EntryPageSectionContent",setup(n){const e=zt(),t=H(!1),r=D_(),{getLabel:o}=at(),i=H(!1),a=O(()=>r.entryFields.filter(c=>{var m;const d=typeof c=="object"&&c!==null?c.fieldId??c.id:c,f=(m=e.fields)==null?void 0:m.find(g=>g.id==d);return!(!f||f.parentId||!t.value&&(c.fieldValue===null||c.fieldValue===""))}));Me(()=>r.entry,async c=>{c&&c.formId&&(!e.fields||e.fields.length===0)&&(i.value=!0,await e.loadForm(c.formId.toString()),i.value=!1)},{immediate:!0});const s=c=>{var m;const d=typeof c=="object"&&c!==null?c.fieldId??c.id:c,f=(m=e.fields)==null?void 0:m.find(g=>g.id==d);return f?f.label:""},l=c=>{var m;const d=typeof c=="object"&&c!==null?c.fieldId??c.id:c,f=(m=e.fields)==null?void 0:m.find(g=>g.id==d);if(f&&f.type==="radio"&&Array.isArray(f.fieldOptions)){const g=f.fieldOptions.find(v=>v.value==c.fieldValue);return g?g.label:c.fieldValue}return c.fieldValue};return(c,d)=>{const f=pn;return C(),F($e,null,[z("div",bQ,[z("span",SQ,ae(h(o)("user_information")),1),I(f,{modelValue:t.value,"onUpdate:modelValue":d[0]||(d[0]=m=>t.value=m),priority:"secondary",type:"checkmark"},{default:V(()=>[De(ae(h(o)("show_empty_fields")),1)]),_:1},8,["modelValue"])]),z("div",_Q,[z("table",wQ,[z("tbody",null,[(C(!0),F($e,null,ot(a.value,m=>(C(),F("tr",{key:m.id},[z("td",xQ,ae(s(m)||""),1),z("td",kQ,ae(l(m)),1)]))),128))])])])],64)}}}),IQ={},EQ={class:"ivyforms-entry-page-section ivyforms-flex ivyforms-flex-1 ivyforms-gap-8 ivyforms-flex-direction-column"};function TQ(n,e){const t=CQ,r=$i,o=Hs;return C(),F("div",EQ,[I(o,{class:"ivyforms-pr-20"},{default:V(()=>[I(r,null,{default:V(()=>[I(t)]),_:1})]),_:1})])}const MQ=bt(IQ,[["render",TQ],["__scopeId","data-v-525cb4ac"]]),OQ={class:"ivyforms-header__navigation"},AQ={class:"ivyforms-header__navigation-text regular-14"},PQ={key:0,class:"ivyforms-count-loader"},$Q={class:"ivyforms-entry-page ivyforms-flex ivyforms-gap-8 ivyforms-p-8"},RQ=he({__name:"EntryPage",setup(n){const{getLabel:e}=at();Va();const t=Vr(),r=ko(),o=D_(),i=zt(),a=mc(),s=O(()=>t.path.includes("/results/entries")&&t.params.formId),l=O(()=>s.value?t.params.entryId:t.params.id),c=O(()=>{var k;return s.value?t.params.formId:((k=o.entry)==null?void 0:k.formId)||i.formId}),d=H(null),f=H(null),m=H([]),g=H(1),v=O(()=>m.value.length),y=H(!1),b=O(()=>i.name?i.name:""),_=async k=>{y.value=!0;try{await o.fetchEntry(k),d.value=o.entry,f.value=o.entryFields,g.value=m.value.findIndex(x=>Number(x.id)===Number(k))+1}finally{y.value=!1}},w=async()=>{if(g.value>1){g.value--;const k=m.value[g.value-1].id;s.value?await r.push({name:hi,params:{formId:c.value,entryId:k}}):await r.push({name:ds,params:{id:k}}),await _(Number(k))}},T=async()=>{if(g.value<v.value){g.value++;const k=m.value[g.value-1].id;s.value?await r.push({name:hi,params:{formId:c.value,entryId:k}}):await r.push({name:ds,params:{id:k}}),await _(Number(k))}};return Ht(async()=>{var k,x;y.value=!0;try{await o.fetchEntry(Number(l.value)),d.value=o.entry,f.value=o.entryFields,s.value&&c.value?await i.loadForm(Array.isArray(c.value)?c.value[0]:c.value):(k=d.value)!=null&&k.formId&&await i.loadForm(d.value.formId);const M=(x=d.value)==null?void 0:x.formId;await a.fetchData({formId:M}),m.value=a.tableData.filter(D=>Number(D.formId)===Number(M)).sort((D,A)=>Number(D.id)-Number(A.id)),g.value=m.value.findIndex(D=>Number(D.id)===Number(l.value))+1,Me(()=>s.value?t.params.entryId:t.params.id,D=>{g.value=m.value.findIndex(A=>Number(A.id)===Number(D))+1},{immediate:!0})}catch(M){console.error(e("failed_to_get_entry"),M)}finally{y.value=!1}}),Pn("entry",d),Pn("pageTitle",b),(k,x)=>{const M=it,D=Oi,A=MQ,P=yQ;return C(),F($e,null,[I(D,null,{center:V(()=>[z("div",OQ,[I(M,{"icon-only":"","icon-start":"chevron-left","icon-start-category":"arrows","icon-start-type":"outline",priority:"tertiary",type:"fill",size:"s",disabled:g.value<=1,onClick:w},null,8,["disabled"]),I(M,{"icon-only":"","icon-start":"chevron-right","icon-start-category":"arrows","icon-start-type":"outline",priority:"tertiary",type:"fill",size:"s",disabled:g.value>=v.value,onClick:T},null,8,["disabled"]),z("span",AQ,[y.value?(C(),F("div",PQ)):(C(),F($e,{key:1},[De(ae(g.value)+"/"+ae(v.value)+" "+ae(h(e)("entries")),1)],64))])])]),_:1}),z("div",$Q,[I(A),I(P)])],64)}}}),N_=bt(RQ,[["__scopeId","data-v-993e6c91"]]),DQ={class:"form-builder-results-entries ivyforms-flex ivyforms-flex-1 ivyforms-flex-direction-column ivyforms-p-4 ivyforms-gap-24"},NQ={class:"form-builder-results-entries__option-bar ivyforms-flex ivyforms-align-items-center ivyforms-justify-content-between ivyforms-gap-8"},FQ={class:"form-builder-results-entries__option-bar-left ivyforms-flex ivyforms-align-items-center ivyforms-gap-8 ivyforms-overflow-visible"},LQ={class:"form-builder-results-entries__table"},BQ={key:0,class:"form-builder-results-entries__table-skeleton"},VQ={class:"form-builder-results-entries__pagination-container"},zQ=he({__name:"FormBuilderResultsEntries",setup(n){const{getHashRedirectLink:e,redirectToWordPressAdminPage:t}=oa(),{getLabel:r}=at(),o=zt(),i=Vs(),a=Vr(),s=mc(),l=Tp(),c=Na(),d=H(),f=H(null),m=H({}),g=H(null),v=H(!1),y=H([]),b=H([]),_=H(0),w=H(null),T=H(!1),k=H(!0),x=H(!1),M=H(!1),D=H(null),A=H([]),P=H(""),$=H(""),B=Al.debounce(ne=>{$.value=ne},500),j=Tn({starred:null,read:null}),U=Tn({page:1,perPage:10}),G=Tn({column:"id",order:"desc"}),N=Tn({readTrueCount:0,readFalseCount:0,starredTrueCount:0,starredFalseCount:0}),R=()=>Fe(pn,{modelValue:mt.value,size:"s",type:"checkmark","onUpdate:modelValue":ne=>Se(ne)},()=>[]),X=({rowData:ne})=>ne?Fe(pn,{modelValue:ne.selected,type:"checkmark",size:"s","onUpdate:modelValue":W=>ne.selected=W},()=>[]):null,te=({rowData:ne})=>{if(!ne)return null;const W=a.params.formId||a.params.id,_e=ne.id,ke=`/manage/${W}/results/entries/details/${_e}`,Ee=e(Cr,ke);return Fe(fs,{size:"s",href:Ee,class:ne.status==="unread"?"ivyforms-unread-entry":""},()=>[ne.id])},Y=({rowData:ne})=>ne?Fe(rn,{name:ne.starred?"star-2":"star",type:"fill",size:"d",color:ne.starred?"var(--map-accent-amber-symbol-0)":"var(--map-base-dusk-symbol--1)",style:"cursor: pointer;",onClick:async()=>{ne.starred=!ne.starred,await s.updateStarred(ne.id,ne.starred),ne.starred?(N.starredTrueCount++,N.starredFalseCount--):(N.starredTrueCount--,N.starredFalseCount++)}}):null,re=({rowData:ne})=>ne?Fe(xn,{content:r("actions"),placement:"top"},()=>[Fe(it,{iconOnly:!0,iconStart:"context-menu-dot",size:"s",type:"ghost",priority:"tertiary",iconStartType:"fill",ref:W=>{m.value[ne.id]=W&&"$el"in W&&W.$el instanceof HTMLElement?W.$el:null},onClick:()=>He(ne)})]):null,Q=H([{key:"select",width:44,minWidth:44,headerRenderer:R,cellRenderer:X,visible:!0,showInModal:!1,fixed:wi.LEFT},{key:"star",width:32,minWidth:32,title:r("starred"),headerRenderer:()=>Fe(rn,{name:"star",type:"outline",size:"d",color:"var(--map-base-dusk-symbol-2)"}),cellRenderer:Y,visible:!0,showInModal:!0},{key:"id",title:r("id"),width:40,minWidth:40,cellRenderer:te,visible:!0,showInModal:!0,sortable:!0,class:"ivyforms-custom-link"},{key:"date-created",title:r("date_submitted"),width:105,minWidth:105,cellRenderer:({rowData:ne})=>Fe("span",$o.formatWPDate(ne.dateCreated)),visible:!0,showInModal:!0},{key:"browser",title:r("browser"),width:100,minWidth:100,cellRenderer:({rowData:ne})=>Fe("span",ne.userAgent||r("unknown")),visible:!0,showInModal:!0},{key:"actions",title:"",headerRenderer:()=>Fe(xn,{content:r("column_visibility"),placement:"left"},()=>[Fe(rn,{name:"eye-opened",type:"outline",size:"d",color:"var(--map-base-dusk-symbol-2)",onClick:Be,class:"ivyforms-ml-6",style:"cursor: pointer;"})]),width:45,minWidth:45,cellRenderer:re,visible:!0,showInModal:!1,fixed:wi.RIGHT}]),Z=O(()=>(o.fields||[]).map((W,_e)=>({key:`field-${W.fieldIndex}`,title:W.label,width:150,minWidth:100,cellRenderer:({rowData:ke})=>{var St;const Ee=(St=s.entryFields.find(dt=>dt.entryId==ke.id&&dt.fieldId==W.id))==null?void 0:St.fieldValue;if(W.type==="radio"&&Array.isArray(W.fieldOptions)){const dt=W.fieldOptions.find(pe=>pe.value==Ee);return Fe("span",dt?dt.label:Ee||"")}let Ke=Ee||"";if(Ke&&W.type==="phone")try{const dt=pE(Ke);dt&&(W.phoneFormat==="international"?Ke=dt.formatInternational():W.phoneFormat==="e164"?Ke=dt.number:Ke=dt.formatNational())}catch{}return W.type==="number"?Fe("span",hE(Ee,W.numberFormat||"")):Fe("span",Ee||"")},visible:_e<4,showInModal:!0})));Me(Z,ne=>{A.value.length===0?A.value=ne.map(W=>({...W})):A.value=ne.map(W=>{const _e=A.value.find(ke=>ke.key===W.key);return _e?{...W,visible:_e.visible}:{...W}})},{immediate:!0});const q=H([]);Me([Q,A],()=>{const ne=Q.value,W=ne.findIndex(Ee=>Ee.key==="id"),_e=ne.slice(0,W+1),ke=ne.slice(W+1);q.value=[..._e,...A.value,...ke]},{immediate:!0});const ye=O(()=>{var ne;return $o.convertWPFormat(((ne=window.wpIvyDateFormat)==null?void 0:ne.dateFormat)||"D/M/Y","dayjs")}),Re=O(()=>{var St,dt;const ne=q.value.filter(pe=>pe.visible),W=ne.filter(pe=>pe.showInModal),_e=((dt=(St=d.value)==null?void 0:St.$el)==null?void 0:dt.offsetWidth)||0,ke=ne.reduce((pe,Ae)=>pe+(typeof Ae.width=="number"?Ae.width:0),0),Ke=_e-ke>0?_e/W.length:null;return ne.map(pe=>pe.showInModal&&Ke?{...pe,width:Math.floor(Ke)}:pe)}),ze=O(()=>Q.value.reduce((ne,W)=>ne+(typeof W.minWidth=="number"?W.minWidth:parseFloat(W.minWidth)||0),0)),nt=O(()=>b.value.some(ne=>ne.selected)),Ge=O(()=>b.value.filter(ne=>ne.selected).map(ne=>ne.id)),mt=O(()=>b.value.length>0&&b.value.every(ne=>ne.selected)),ut=O({get(){return y.value.every(ne=>ne.visible)},set(ne){y.value.forEach(_e=>{_e.key!=="id"&&_e.showInModal&&(_e.visible=ne)});const W=y.value.find(_e=>_e.key==="id");W&&(W.visible=!0)}}),Pt=O(()=>y.value.filter(ne=>ne.visible).length),gt=ne=>{var W;return Pt.value===1&&((W=y.value.find(_e=>_e.key===ne))==null?void 0:W.visible)},tt=O(()=>P.value.trim()!==""||w.value||j.starred!==null||j.read!==null);function Ct(){let ne=o.formId||a.params.formId||a.params.formId;return Array.isArray(ne)&&(ne=ne[0]),ne}const Bt=ne=>({page:U.page,perPage:U.perPage,search:$.value,sortBy:G.column,sortOrder:G.order,dateRange:$o.formatDateRangeForApi(w.value),shouldGetCount:ne,formId:Number(Ct()),filters:{starred:j.starred,read:j.read},searchFieldValue:!0});Me(P,B),Me([()=>U.page,()=>U.perPage,()=>$.value,()=>j.starred,()=>j.read,()=>w.value],async()=>{k.value=!0,await s.fetchData(Bt(!1)),b.value=s.tableData,k.value=!1}),Me(()=>Ct(),async(ne,W)=>{ne&&ne!==W&&(b.value=[],k.value=!0,await s.fetchData(Bt(!1)),b.value=s.tableData,k.value=!1)}),Me(w,()=>M.value=!!w.value),Me(()=>s.tableData,ne=>{b.value=ne,k.value=!1},{immediate:!0}),Me(()=>s.paginationMeta,ne=>{_.value=Wu(ne).total||0},{immediate:!0}),Me(()=>y.value.map(ne=>ne.visible),()=>{if(y.value.filter(W=>W.visible).length===0){const W=y.value.find(_e=>_e.key==="id");W&&(W.visible=!0)}}),Me(()=>c.dialogVisible,(ne,W)=>{W&&!ne&&c.actionType==="delete"&&setTimeout(()=>Ne(!1),300)});const Ne=async ne=>{k.value=!0;try{await s.fetchData(Bt(ne)),b.value=s.tableData;const W=s.paginationMeta;U.page=W.page,U.perPage=W.perPage,_.value=W.total,ne&&(N.readTrueCount=s.filterCount.readTrueCount,N.readFalseCount=s.filterCount.readFalseCount,N.starredTrueCount=s.filterCount.starredTrueCount,N.starredFalseCount=s.filterCount.starredFalseCount)}finally{k.value=!1,await je()}},je=async()=>{await Xt();const ne=document.querySelector(".ivyforms-table");if(!ne)return;const W=ne.querySelectorAll(".el-table-v2__row");W.length&&W.forEach(_e=>{const ke=_e.getAttribute("rowkey");ke&&(_e.addEventListener("mouseenter",()=>{D.value=Number(ke),W.forEach(Ee=>{Ee.getAttribute("rowkey")===ke&&Ee.classList.add("hovered")})}),_e.addEventListener("mouseleave",()=>{D.value=null,W.forEach(Ee=>{Ee.getAttribute("rowkey")===ke&&Ee.classList.remove("hovered")})}))})},Be=()=>{y.value=q.value.map(ne=>({key:ne.key,visible:ne.visible,showInModal:ne.showInModal??!0,title:ne.title})),v.value=!0},qe=()=>{y.value.forEach(ne=>{const W=q.value.find(ke=>ke.key===ne.key);W&&(W.visible=ne.visible);const _e=A.value.find(ke=>ke.key===ne.key);_e&&(_e.visible=ne.visible)}),v.value=!1},Je=({column:ne,order:W})=>{G.column=ne,G.order=W==="asc"?"asc":W==="desc"?"desc":"",U.page=1,Ne(!1)},ct=ne=>()=>{t(ki,`/details/${ne}`)},vt=()=>{b.value.forEach(ne=>{ne.selected=!1})},Se=ne=>{b.value.forEach(W=>W.selected=ne)},He=Al.debounce(ne=>{const W=ne.id,_e=ne.status,ke=m.value[W];if(!ke){console.warn(r("menu_button_element_not_found"));return}D.value=W,l.openContextMenu({actions:[Hn(_e==="unread"?An.MarkAsRead:An.MarkAsUnread,{iconSize:"s",handler:async Ee=>{const Ke=ne.status==="unread"?"read":"unread";await s.updateStatus(Ee,Ke),ne.status=Ke,ne.status==="read"?(N.readTrueCount++,N.readFalseCount--):(N.readTrueCount--,N.readFalseCount++)}}),Hn(An.Preview,{iconSize:"s",handler:ct(W)}),Hn(An.Delete,{iconSize:"s",handler:async Ee=>{await c.handleActionClick(null,[Ee],"entries","delete",{setLoading:Ke=>{k.value=Ke}})}})],entityId:W,contextMenuButtonRef:ke,onClose:()=>{document.querySelectorAll(".el-table-v2__row.hovered").forEach(Ke=>Ke.classList.remove("hovered")),D.value=null}})},100),Tt=()=>{T.value=!0,Xt(()=>{$t();const ne=document.querySelector(".el-date-editor");ne==null||ne.click()})},$t=()=>{Xt(()=>{const ne=f.value&&"$el"in f.value?f.value.$el:f.value,W=g.value&&"$el"in g.value?g.value.$el:g.value;if(ne instanceof HTMLElement&&W instanceof HTMLElement){const _e=ne.getBoundingClientRect();W.style.position="absolute",W.style.top=`${_e.bottom+8}px`,W.style.left=`${_e.left}px`,W.style.inset="unset"}})},wt=()=>{T.value=!1},me=()=>{w.value=null,M.value=!1,T.value=!1},ce=(ne,W=500)=>()=>{ne(),setTimeout(()=>{l.closeContextMenu()},W)},be=(ne,W)=>{j.starred=ne==="starred"?W:null,j.read=ne==="read"?W:null,x.value=W!==null},Te=async()=>{if(l.isOpen){l.closeContextMenu();return}l.openContextMenu({actions:[Hn(An.Read,{handler:ce(()=>be("read","read")),rightText:N.readTrueCount.toString(),isActive:()=>j.read==="read",secondary:!0}),Hn(An.Unread,{handler:ce(()=>be("read","unread")),isActive:()=>j.read==="unread",secondary:!0,rightText:N.readFalseCount.toString()}),Hn(An.Starred,{handler:ce(()=>be("starred",!0)),isActive:()=>j.starred===!0,secondary:!0,rightText:N.starredTrueCount.toString()}),Hn(An.Unstarred,{handler:ce(()=>be("starred",!1)),isActive:()=>j.starred===!1,rightText:N.starredFalseCount.toString(),secondary:!0}),Hn(An.ResetFilters,{handler:ce(()=>{be("starred",null),be("read",null)}),secondary:!0})],contextMenuButtonRef:f.value})},de=()=>{j.starred=null,j.read=null,x.value=!1},fe=()=>{j.starred=null,j.read=null,w.value=null,P.value="",U.page=1,x.value=!1,M.value=!1};return Ht(()=>{Ne(!0),i.tableData.length||i.fetchData()}),(ne,W)=>{const _e=Ws,ke=Pg,Ee=R_,Ke=Sc,St=bc,dt=Es,pe=Ep,Ae=Ip;return C(),F("div",DQ,[z("div",NQ,[z("div",FQ,[I(_e,{modelValue:P.value,"onUpdate:modelValue":W[0]||(W[0]=Ue=>P.value=Ue),class:"ivyforms-search__fixed-width",placeholder:h(r)("search")},null,8,["modelValue","placeholder"]),T.value?(C(),se(Rg,{key:0,ref_key:"datePickerPopperRef",ref:g,modelValue:w.value,"onUpdate:modelValue":W[1]||(W[1]=Ue=>w.value=Ue),type:"datetimerange","date-format":ye.value,clearable:"",onClose:wt},null,8,["modelValue","date-format"])):ie("",!0),I(ke,{color:"tertiary",type:"datepicker","aria-label":h(r)("date_filters"),indicator:M.value,"custom-hide-indicator":me,onClick:Tt},null,8,["aria-label","indicator"]),I(ke,{ref_key:"menuButtonRef",ref:f,color:"tertiary",type:"filter","aria-label":h(r)("filters"),indicator:x.value,"custom-hide-indicator":de,onClick:Te},null,8,["aria-label","indicator"]),I($g)])]),z("div",LQ,[(C(),se(pe,{ref_key:"tableRef",ref:d,key:Array.isArray(h(a).params.formId)?h(a).params.formId[0]:h(a).params.formId,data:k.value?[]:b.value,loading:k.value,total:_.value,"row-key":"id",columns:Re.value,"min-table-width":ze.value,"is-custom-header":nt.value,sort:G,pagination:"",onSortChange:Je},{header:V(()=>[I(Ee,{loading:k.value,"onUpdate:loading":W[2]||(W[2]=Ue=>k.value=Ue),"selected-ids":Ge.value,onUnselectAll:vt},null,8,["loading","selected-ids"])]),empty:V(()=>[k.value?(C(),F("div",BQ,[I(St,null,{template:V(()=>[(C(!0),F($e,null,ot(U.perPage,Ue=>(C(),se(Ke,{key:Ue,class:"form-builder-results-entries__skeleton-row"}))),128))]),_:1})])):tt.value?(C(),se(dt,{key:2,image:"filters",title:h(r)("empty_state_filters_all_entries_title"),subtitle:h(r)("empty_state_filters_all_entries_subtitle")},{actionButton:V(()=>[I(it,{onClick:fe},{default:V(()=>[De(ae(h(r)("reset_filters")),1)]),_:1})]),_:1},8,["title","subtitle"])):(C(),se(dt,{key:1,image:"not-found",title:h(r)("empty_state_all_entries_title"),subtitle:h(r)("empty_state_all_entries_subtitle")},null,8,["title","subtitle"]))]),_:1},8,["data","loading","total","columns","min-table-width","is-custom-header","sort"])),I(yS,{modelValue:v.value,"onUpdate:modelValue":W[5]||(W[5]=Ue=>v.value=Ue),title:h(r)("edit_table"),subtitle:h(r)("edit_columns"),"show-close":"","align-center":"",width:"400px"},{default:V(()=>[I(pn,{modelValue:ut.value,"onUpdate:modelValue":W[3]||(W[3]=Ue=>ut.value=Ue),priority:"secondary",size:"s",type:"checkmark",class:"form-builder-results-entries__show-all-columns"},{default:V(()=>[xe(ne.$slots,"default",{},()=>[De(ae(h(r)("show_all_columns")),1)])]),_:3},8,["modelValue"]),(C(!0),F($e,null,ot(y.value,Ue=>(C(),F("div",{key:Ue.key},[Ue.showInModal?(C(),se(pn,{key:0,modelValue:Ue.visible,"onUpdate:modelValue":Zt=>Ue.visible=Zt,disabled:gt(Ue.key),priority:"secondary",size:"s",type:"checkmark"},{default:V(()=>[De(ae(Ue.title),1)]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):ie("",!0)]))),128))]),footer:V(()=>[I(it,{priority:"tertiary",size:"d",type:"fill",onClick:W[4]||(W[4]=Ue=>v.value=!1)},{default:V(()=>[De(ae(h(r)("cancel")),1)]),_:1}),I(it,{priority:"success",size:"d",type:"fill",onClick:qe},{default:V(()=>[De(ae(h(r)("save")),1)]),_:1})]),_:3},8,["modelValue","title","subtitle"])]),I(_c,{"show-close":"","align-center":"",type:"error",width:"342px"}),z("div",VQ,[I(Ae,{"current-page":U.page,"onUpdate:currentPage":W[6]||(W[6]=Ue=>U.page=Ue),"page-size":U.perPage,"onUpdate:pageSize":W[7]||(W[7]=Ue=>U.perPage=Ue),total:_.value},null,8,["current-page","page-size","total"])])])}}}),HQ={};function UQ(n,e){const t=cc("router-view"),r=Hs;return C(),se(r,null,{default:V(()=>[I(t,null,{default:V(({Component:o})=>[(C(),se(dn(o)))]),_:1})]),_:1})}const WQ=bt(HQ,[["render",UQ]]),jQ=he({__name:"FormResultsPagePanel",props:{activeIndex:{}},emits:["update:activeIndex"],setup(n,{emit:e}){const{getLabel:t}=at(),r=H("vertical"),o=n,i=Vr(),a=zt(),s=O(()=>a.formId||i.params.id),l=e,c=[{label:t("entries"),index:bo,disabled:!1}],d=ko(),f=m=>{l("update:activeIndex",m),m==="entries"&&d.push({path:`/results/entries/${s.value}`})};return(m,g)=>{const v=Zo,y=Ai,b=yc;return C(),se(b,null,{default:V(()=>[I(y,{mode:r.value,ellipsis:!1,class:"ivyforms-form-builder-results__menu"},{default:V(()=>[(C(),F($e,null,ot(c,_=>I(v,{key:_.index,label:_.label,name:_.index,type:"tonal","is-active":o.activeIndex===_.index,"coming-soon":_.disabled,onClick:w=>f(_.index)},null,8,["label","name","is-active","coming-soon","onClick"])),64))]),_:1},8,["mode"])]),_:1})}}}),KQ=he({__name:"FormBuilderResultsPage",setup(n){const e=zt(),t=aa(),r=Vs(),o=H("entries"),i=H([]),a=H(!1),s=H(!1),l=Vr(),c=ko(),d=$p(),{getLabel:f}=at(),m=O(()=>e.formId||null),g=O(()=>[{label:f("build"),index:"build",routeName:e.isEditing?Is:Cs},{label:f("settings"),index:"settings",routeName:Ci},{label:f("results"),index:"results",routeName:Ii}]),v=w=>{o.value=w},y=()=>{e.formId||_t({message:f("first_save_form"),type:"error"}),window.open(`${window.wpIvyUrls.siteURL}?ivyforms_preview=${e.formId}&_wpNonce=${window.wpIvyApiSettings.nonce}`,"_blank")},b=async w=>{w&&await c.push({path:`/manage/${w}/results/entries`})},_=async()=>{a.value=!0;try{if(await r.fetchData({page:1,perPage:100}),i.value=r.tableData.map(w=>({value:w.id,labelId:`${f("id")}: ${w.id}`,label:w.name||`Form #${w.id}`})),!e.formId&&r.tableData.length>0){const w=r.tableData[0].id.toString();e.formId=w,await e.loadForm(w),l.params.formId!==w&&await c.push({path:`/manage/${w}/results/entries`})}}catch(w){console.error(f("failed_to_load_form"),w),_t({message:f("failed_to_fetch_form"),type:"error"})}finally{a.value=!1}};return Ht(async()=>{await _(),e.formId||(e.counterFields=0)}),Me(()=>l.params.formId,async w=>{w&&w!==e.formId&&(e.formId=String(w),await e.loadForm(String(w)))},{immediate:!0}),Me(()=>e.name,w=>{if(w&&e.formId){const T=i.value.findIndex(k=>k.value===e.formId);T!==-1&&(i.value[T].label=w)}}),Me(()=>l.hash,w=>{w.includes("/entries")?o.value="entries":w.includes("/insights")?o.value="insights":w.includes("/report")&&(o.value="report")},{immediate:!0}),(w,T)=>{const k=Pp,x=Zo,M=Ai,D=it,A=xn,P=zs,$=Oi,B=jQ,j=WQ;return C(),F($e,null,[I($,null,{left:V(()=>[I(k,{modelValue:m.value,"onUpdate:modelValue":T[0]||(T[0]=U=>m.value=U),size:"s",type:"border",placeholder:h(f)("select_form"),options:i.value,loading:a.value||s.value,onChange:b},null,8,["modelValue","placeholder","options","loading"])]),center:V(()=>[I(M,{mode:"horizontal",ellipsis:!1,router:""},{default:V(()=>[(C(!0),F($e,null,ot(g.value,U=>(C(),se(x,{key:U.index,label:U.label,name:U.index,type:"tonal","is-active":h(d).isActive(U.routeName,U.index),route:h(d).getMenuRoute(U,h(Ii)),onClick:G=>h(d).onMenuClick(U,h(d).isActive)},null,8,["label","name","is-active","route","onClick"]))),128))]),_:1})]),right:V(()=>[I(A,{content:h(f)("preview_form"),placement:"bottom",theme:"inverted"},{default:V(()=>[I(D,{priority:"tertiary","icon-start":"eye-opened","icon-start-type":"outline",onClick:y})]),_:1},8,["content"]),I(P)]),_:1}),z("div",{class:ee(["ivyforms-form-builder-results-page ivyforms-flex ivyforms-gap-8 ivyforms-p-8",{"ivyforms-fullscreen-mode":h(t).isFullScreenMode}])},[I(B,{"active-index":o.value,"onUpdate:activeIndex":v},null,8,["active-index"]),I(j,{"active-index":o.value},null,8,["active-index"])],2)],64)}}}),YQ=bt(KQ,[["__scopeId","data-v-db534544"]]),Ec=new URLSearchParams(window.location.search).get("page");let Kl=[];Ec===xR&&(Kl=[{path:"/",name:kR,component:BR}]);Ec===xi&&(Kl=[{path:"/",name:Oa,component:_V}]);Ec===Cr&&(Kl=[{path:"/",name:Cs,component:m2},{path:"/manage/:formId(\\d+)",redirect:{name:Is},children:[{path:"",name:Is,component:m2},{path:"settings",name:xf,component:MW,children:[{path:"general",name:Ci,component:wX},{path:"notification",name:Xu,component:PX},{path:"notification/manage",name:kf,component:ug},{path:"notification/manage/:notificationId(\\d+)",name:Cf,component:ug},{path:"confirmation/manage/:confirmationId(\\d+)",name:If,component:GX}]},{path:"results",name:hS,component:YQ,children:[{path:"entries",name:Ii,component:zQ}]},{path:"results/entries/details/:entryId(\\d+)",name:hi,component:N_}]}]);Ec===ki&&(Kl=[{path:"/",name:bo,component:lQ},{path:"/details/:id(\\d+)",name:ds,component:N_}]);Ec===gc&&(Kl=[{path:"/",name:IR,component:fD,children:[{path:"general",name:CR,component:xD},{path:"security",redirect:"security/recaptcha"},{path:"security/:provider(recaptcha|hcaptcha|turnstile|honeypot)",name:ER,component:uN}]}]);const qQ=mE({history:vE(),routes:Kl}),qp=gE(wE),GQ=yE();qp.use(GQ);qp.use(qQ);const JQ=bE();JQ.initialize();qp.config.globalProperties.$labels=at();qp.mount("#ivyforms-app");

```
